boxes-react 0.1.6
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/dist/boxes-react.js +49914 -0
- package/dist/boxes-react.umd.js +541 -0
- package/package.json +45 -0
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
(function(Yd,hu){typeof exports=="object"&&typeof module<"u"?hu(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],hu):(Yd=typeof globalThis<"u"?globalThis:Yd||self,hu(Yd.BoxesReact={},Yd.React))})(this,function(Yd,hu){"use strict";var IC={exports:{}},i0={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var uO;function ase(){if(uO)return i0;uO=1;var t=hu,r=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,c=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function h(d,p,b){var m,w={},k=null,P=null;b!==void 0&&(k=""+b),p.key!==void 0&&(k=""+p.key),p.ref!==void 0&&(P=p.ref);for(m in p)s.call(p,m)&&!l.hasOwnProperty(m)&&(w[m]=p[m]);if(d&&d.defaultProps)for(m in p=d.defaultProps,p)w[m]===void 0&&(w[m]=p[m]);return{$$typeof:r,type:d,key:k,ref:P,props:w,_owner:c.current}}return i0.Fragment=a,i0.jsx=h,i0.jsxs=h,i0}var a0={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var cO;function ose(){return cO||(cO=1,process.env.NODE_ENV!=="production"&&function(){var t=hu,r=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),S=Symbol.iterator,M="@@iterator";function L(je){if(je===null||typeof je!="object")return null;var bt=S&&je[S]||je[M];return typeof bt=="function"?bt:null}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(je){{for(var bt=arguments.length,Bt=new Array(bt>1?bt-1:0),un=1;un<bt;un++)Bt[un-1]=arguments[un];I("error",je,Bt)}}function I(je,bt,Bt){{var un=T.ReactDebugCurrentFrame,Ln=un.getStackAddendum();Ln!==""&&(bt+="%s",Bt=Bt.concat([Ln]));var Dn=Bt.map(function(vn){return String(vn)});Dn.unshift("Warning: "+bt),Function.prototype.apply.call(console[je],console,Dn)}}var R=!1,B=!1,F=!1,z=!1,D=!1,H;H=Symbol.for("react.module.reference");function Q(je){return!!(typeof je=="string"||typeof je=="function"||je===s||je===l||D||je===c||je===b||je===m||z||je===P||R||B||F||typeof je=="object"&&je!==null&&(je.$$typeof===k||je.$$typeof===w||je.$$typeof===h||je.$$typeof===d||je.$$typeof===p||je.$$typeof===H||je.getModuleId!==void 0))}function q(je,bt,Bt){var un=je.displayName;if(un)return un;var Ln=bt.displayName||bt.name||"";return Ln!==""?Bt+"("+Ln+")":Bt}function Z(je){return je.displayName||"Context"}function J(je){if(je==null)return null;if(typeof je.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof je=="function")return je.displayName||je.name||null;if(typeof je=="string")return je;switch(je){case s:return"Fragment";case a:return"Portal";case l:return"Profiler";case c:return"StrictMode";case b:return"Suspense";case m:return"SuspenseList"}if(typeof je=="object")switch(je.$$typeof){case d:var bt=je;return Z(bt)+".Consumer";case h:var Bt=je;return Z(Bt._context)+".Provider";case p:return q(je,je.render,"ForwardRef");case w:var un=je.displayName||null;return un!==null?un:J(je.type)||"Memo";case k:{var Ln=je,Dn=Ln._payload,vn=Ln._init;try{return J(vn(Dn))}catch{return null}}}return null}var K=Object.assign,ae=0,se,le,he,fe,pe,me,Te;function Oe(){}Oe.__reactDisabledLog=!0;function ge(){{if(ae===0){se=console.log,le=console.info,he=console.warn,fe=console.error,pe=console.group,me=console.groupCollapsed,Te=console.groupEnd;var je={configurable:!0,enumerable:!0,value:Oe,writable:!0};Object.defineProperties(console,{info:je,log:je,warn:je,error:je,group:je,groupCollapsed:je,groupEnd:je})}ae++}}function xe(){{if(ae--,ae===0){var je={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},je,{value:se}),info:K({},je,{value:le}),warn:K({},je,{value:he}),error:K({},je,{value:fe}),group:K({},je,{value:pe}),groupCollapsed:K({},je,{value:me}),groupEnd:K({},je,{value:Te})})}ae<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Se=T.ReactCurrentDispatcher,Le;function De(je,bt,Bt){{if(Le===void 0)try{throw Error()}catch(Ln){var un=Ln.stack.trim().match(/\n( *(at )?)/);Le=un&&un[1]||""}return`
|
|
18
|
+
`+Le+je}}var Ne=!1,Me;{var ke=typeof WeakMap=="function"?WeakMap:Map;Me=new ke}function He(je,bt){if(!je||Ne)return"";{var Bt=Me.get(je);if(Bt!==void 0)return Bt}var un;Ne=!0;var Ln=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Dn;Dn=Se.current,Se.current=null,ge();try{if(bt){var vn=function(){throw Error()};if(Object.defineProperty(vn.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(vn,[])}catch(Wa){un=Wa}Reflect.construct(je,[],vn)}else{try{vn.call()}catch(Wa){un=Wa}je.call(vn.prototype)}}else{try{throw Error()}catch(Wa){un=Wa}je()}}catch(Wa){if(Wa&&un&&typeof Wa.stack=="string"){for(var Cn=Wa.stack.split(`
|
|
19
|
+
`),Ji=un.stack.split(`
|
|
20
|
+
`),li=Cn.length-1,Ni=Ji.length-1;li>=1&&Ni>=0&&Cn[li]!==Ji[Ni];)Ni--;for(;li>=1&&Ni>=0;li--,Ni--)if(Cn[li]!==Ji[Ni]){if(li!==1||Ni!==1)do if(li--,Ni--,Ni<0||Cn[li]!==Ji[Ni]){var Lo=`
|
|
21
|
+
`+Cn[li].replace(" at new "," at ");return je.displayName&&Lo.includes("<anonymous>")&&(Lo=Lo.replace("<anonymous>",je.displayName)),typeof je=="function"&&Me.set(je,Lo),Lo}while(li>=1&&Ni>=0);break}}}finally{Ne=!1,Se.current=Dn,xe(),Error.prepareStackTrace=Ln}var bc=je?je.displayName||je.name:"",Hu=bc?De(bc):"";return typeof je=="function"&&Me.set(je,Hu),Hu}function Qe(je,bt,Bt){return He(je,!1)}function it(je){var bt=je.prototype;return!!(bt&&bt.isReactComponent)}function ft(je,bt,Bt){if(je==null)return"";if(typeof je=="function")return He(je,it(je));if(typeof je=="string")return De(je);switch(je){case b:return De("Suspense");case m:return De("SuspenseList")}if(typeof je=="object")switch(je.$$typeof){case p:return Qe(je.render);case w:return ft(je.type,bt,Bt);case k:{var un=je,Ln=un._payload,Dn=un._init;try{return ft(Dn(Ln),bt,Bt)}catch{}}}return""}var ze=Object.prototype.hasOwnProperty,$e={},xt=T.ReactDebugCurrentFrame;function st(je){if(je){var bt=je._owner,Bt=ft(je.type,je._source,bt?bt.type:null);xt.setExtraStackFrame(Bt)}else xt.setExtraStackFrame(null)}function Rt(je,bt,Bt,un,Ln){{var Dn=Function.call.bind(ze);for(var vn in je)if(Dn(je,vn)){var Cn=void 0;try{if(typeof je[vn]!="function"){var Ji=Error((un||"React class")+": "+Bt+" type `"+vn+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof je[vn]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ji.name="Invariant Violation",Ji}Cn=je[vn](bt,vn,un,Bt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(li){Cn=li}Cn&&!(Cn instanceof Error)&&(st(Ln),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",un||"React class",Bt,vn,typeof Cn),st(null)),Cn instanceof Error&&!(Cn.message in $e)&&($e[Cn.message]=!0,st(Ln),j("Failed %s type: %s",Bt,Cn.message),st(null))}}}var It=Array.isArray;function Dt(je){return It(je)}function Ut(je){{var bt=typeof Symbol=="function"&&Symbol.toStringTag,Bt=bt&&je[Symbol.toStringTag]||je.constructor.name||"Object";return Bt}}function bn(je){try{return sn(je),!1}catch{return!0}}function sn(je){return""+je}function ir(je){if(bn(je))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ut(je)),sn(je)}var U=T.ReactCurrentOwner,ne={key:!0,ref:!0,__self:!0,__source:!0},ue,we;function Ae(je){if(ze.call(je,"ref")){var bt=Object.getOwnPropertyDescriptor(je,"ref").get;if(bt&&bt.isReactWarning)return!1}return je.ref!==void 0}function ie(je){if(ze.call(je,"key")){var bt=Object.getOwnPropertyDescriptor(je,"key").get;if(bt&&bt.isReactWarning)return!1}return je.key!==void 0}function Pe(je,bt){typeof je.ref=="string"&&U.current}function Fe(je,bt){{var Bt=function(){ue||(ue=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",bt))};Bt.isReactWarning=!0,Object.defineProperty(je,"key",{get:Bt,configurable:!0})}}function We(je,bt){{var Bt=function(){we||(we=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",bt))};Bt.isReactWarning=!0,Object.defineProperty(je,"ref",{get:Bt,configurable:!0})}}var Xe=function(je,bt,Bt,un,Ln,Dn,vn){var Cn={$$typeof:r,type:je,key:bt,ref:Bt,props:vn,_owner:Dn};return Cn._store={},Object.defineProperty(Cn._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Cn,"_self",{configurable:!1,enumerable:!1,writable:!1,value:un}),Object.defineProperty(Cn,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ln}),Object.freeze&&(Object.freeze(Cn.props),Object.freeze(Cn)),Cn};function wt(je,bt,Bt,un,Ln){{var Dn,vn={},Cn=null,Ji=null;Bt!==void 0&&(ir(Bt),Cn=""+Bt),ie(bt)&&(ir(bt.key),Cn=""+bt.key),Ae(bt)&&(Ji=bt.ref,Pe(bt,Ln));for(Dn in bt)ze.call(bt,Dn)&&!ne.hasOwnProperty(Dn)&&(vn[Dn]=bt[Dn]);if(je&&je.defaultProps){var li=je.defaultProps;for(Dn in li)vn[Dn]===void 0&&(vn[Dn]=li[Dn])}if(Cn||Ji){var Ni=typeof je=="function"?je.displayName||je.name||"Unknown":je;Cn&&Fe(vn,Ni),Ji&&We(vn,Ni)}return Xe(je,Cn,Ji,Ln,un,U.current,vn)}}var nt=T.ReactCurrentOwner,Kt=T.ReactDebugCurrentFrame;function Ht(je){if(je){var bt=je._owner,Bt=ft(je.type,je._source,bt?bt.type:null);Kt.setExtraStackFrame(Bt)}else Kt.setExtraStackFrame(null)}var Xt;Xt=!1;function Yn(je){return typeof je=="object"&&je!==null&&je.$$typeof===r}function Gn(){{if(nt.current){var je=J(nt.current.type);if(je)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+je+"`."}return""}}function Qt(je){return""}var Hn={};function gr(je){{var bt=Gn();if(!bt){var Bt=typeof je=="string"?je:je.displayName||je.name;Bt&&(bt=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+Bt+">.")}return bt}}function ii(je,bt){{if(!je._store||je._store.validated||je.key!=null)return;je._store.validated=!0;var Bt=gr(bt);if(Hn[Bt])return;Hn[Bt]=!0;var un="";je&&je._owner&&je._owner!==nt.current&&(un=" It was passed a child from "+J(je._owner.type)+"."),Ht(je),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Bt,un),Ht(null)}}function Wi(je,bt){{if(typeof je!="object")return;if(Dt(je))for(var Bt=0;Bt<je.length;Bt++){var un=je[Bt];Yn(un)&&ii(un,bt)}else if(Yn(je))je._store&&(je._store.validated=!0);else if(je){var Ln=L(je);if(typeof Ln=="function"&&Ln!==je.entries)for(var Dn=Ln.call(je),vn;!(vn=Dn.next()).done;)Yn(vn.value)&&ii(vn.value,bt)}}}function La(je){{var bt=je.type;if(bt==null||typeof bt=="string")return;var Bt;if(typeof bt=="function")Bt=bt.propTypes;else if(typeof bt=="object"&&(bt.$$typeof===p||bt.$$typeof===w))Bt=bt.propTypes;else return;if(Bt){var un=J(bt);Rt(Bt,je.props,"prop",un,je)}else if(bt.PropTypes!==void 0&&!Xt){Xt=!0;var Ln=J(bt);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ln||"Unknown")}typeof bt.getDefaultProps=="function"&&!bt.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pi(je){{for(var bt=Object.keys(je.props),Bt=0;Bt<bt.length;Bt++){var un=bt[Bt];if(un!=="children"&&un!=="key"){Ht(je),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",un),Ht(null);break}}je.ref!==null&&(Ht(je),j("Invalid attribute `ref` supplied to `React.Fragment`."),Ht(null))}}var Bi={};function yi(je,bt,Bt,un,Ln,Dn){{var vn=Q(je);if(!vn){var Cn="";(je===void 0||typeof je=="object"&&je!==null&&Object.keys(je).length===0)&&(Cn+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ji=Qt();Ji?Cn+=Ji:Cn+=Gn();var li;je===null?li="null":Dt(je)?li="array":je!==void 0&&je.$$typeof===r?(li="<"+(J(je.type)||"Unknown")+" />",Cn=" Did you accidentally export a JSX literal instead of a component?"):li=typeof je,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",li,Cn)}var Ni=wt(je,bt,Bt,Ln,Dn);if(Ni==null)return Ni;if(vn){var Lo=bt.children;if(Lo!==void 0)if(un)if(Dt(Lo)){for(var bc=0;bc<Lo.length;bc++)Wi(Lo[bc],je);Object.freeze&&Object.freeze(Lo)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Wi(Lo,je)}if(ze.call(bt,"key")){var Hu=J(je),Wa=Object.keys(bt).filter(function(gl){return gl!=="key"}),vc=Wa.length>0?"{key: someKey, "+Wa.join(": ..., ")+": ...}":"{key: someKey}";if(!Bi[Hu+vc]){var ob=Wa.length>0?"{"+Wa.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,vc,Hu,ob,Hu),Bi[Hu+vc]=!0}}return je===s?Pi(Ni):La(Ni),Ni}}function Oa(je,bt,Bt){return yi(je,bt,Bt,!0)}function pu(je,bt,Bt){return yi(je,bt,Bt,!1)}var Si=pu,Io=Oa;a0.Fragment=s,a0.jsx=Si,a0.jsxs=Io}()),a0}process.env.NODE_ENV==="production"?IC.exports=ase():IC.exports=ose();var sse=IC.exports;function LC(t,r){(r==null||r>t.length)&&(r=t.length);for(var a=0,s=Array(r);a<r;a++)s[a]=t[a];return s}function use(t){if(Array.isArray(t))return t}function cse(t){if(Array.isArray(t))return LC(t)}function bh(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function lse(t,r){for(var a=0;a<r.length;a++){var s=r[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,fO(s.key),s)}}function vh(t,r,a){return r&&lse(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bs(t,r){var a=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=OC(t))||r){a&&(t=a);var s=0,c=function(){};return{s:c,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(p){throw p},f:c}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
31
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,h=!0,d=!1;return{s:function(){a=a.call(t)},n:function(){var p=a.next();return h=p.done,p},e:function(p){d=!0,l=p},f:function(){try{h||a.return==null||a.return()}finally{if(d)throw l}}}}function lO(t,r,a){return(r=fO(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a,t}function fse(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function hse(t,r){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var s,c,l,h,d=[],p=!0,b=!1;try{if(l=(a=a.call(t)).next,r===0){if(Object(a)!==a)return;p=!1}else for(;!(p=(s=l.call(a)).done)&&(d.push(s.value),d.length!==r);p=!0);}catch(m){b=!0,c=m}finally{try{if(!p&&a.return!=null&&(h=a.return(),Object(h)!==h))return}finally{if(b)throw c}}return d}}function dse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
32
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
33
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ja(t,r){return use(t)||hse(t,r)||OC(t,r)||dse()}function $m(t){return cse(t)||fse(t)||OC(t)||pse()}function gse(t,r){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var s=a.call(t,r);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function fO(t){var r=gse(t,"string");return typeof r=="symbol"?r:r+""}function Za(t){"@babel/helpers - typeof";return Za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Za(t)}function OC(t,r){if(t){if(typeof t=="string")return LC(t,r);var a={}.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?LC(t,r):void 0}}var $a=typeof window>"u"?null:window,hO=$a?$a.navigator:null;$a&&$a.document;var bse=Za(""),dO=Za({}),vse=Za(function(){}),yse=typeof HTMLElement>"u"?"undefined":Za(HTMLElement),o0=function(t){return t&&t.instanceString&&Qi(t.instanceString)?t.instanceString():null},cn=function(t){return t!=null&&Za(t)==bse},Qi=function(t){return t!=null&&Za(t)===vse},ci=function(t){return!du(t)&&(Array.isArray?Array.isArray(t):t!=null&&t instanceof Array)},_r=function(t){return t!=null&&Za(t)===dO&&!ci(t)&&t.constructor===Object},mse=function(t){return t!=null&&Za(t)===dO},Lt=function(t){return t!=null&&Za(t)===Za(1)&&!isNaN(t)},wse=function(t){return Lt(t)&&Math.floor(t)===t},Km=function(t){if(yse!=="undefined")return t!=null&&t instanceof HTMLElement},du=function(t){return s0(t)||pO(t)},s0=function(t){return o0(t)==="collection"&&t._private.single},pO=function(t){return o0(t)==="collection"&&!t._private.single},RC=function(t){return o0(t)==="core"},gO=function(t){return o0(t)==="stylesheet"},xse=function(t){return o0(t)==="event"},yh=function(t){return t==null?!0:!!(t===""||t.match(/^\s+$/))},kse=function(t){return typeof HTMLElement>"u"?!1:t instanceof HTMLElement},_se=function(t){return _r(t)&&Lt(t.x1)&&Lt(t.x2)&&Lt(t.y1)&&Lt(t.y2)},Ese=function(t){return mse(t)&&Qi(t.then)},Cse=function(){return hO&&hO.userAgent.match(/msie|trident|edge/i)},Eg=function(t,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var s=[],c=0;c<arguments.length;c++)s.push(arguments[c]);return s.join("$")});var a=function(){var s=this,c=arguments,l,h=r.apply(s,c),d=a.cache;return(l=d[h])||(l=d[h]=t.apply(s,c)),l};return a.cache={},a},DC=Eg(function(t){return t.replace(/([A-Z])/g,function(r){return"-"+r.toLowerCase()})}),Qm=Eg(function(t){return t.replace(/(-\w)/g,function(r){return r[1].toUpperCase()})}),bO=Eg(function(t,r){return t+r[0].toUpperCase()+r.substring(1)},function(t,r){return t+"$"+r}),vO=function(t){return yh(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},mh=function(t,r){return t.slice(-1*r.length)===r},Ka="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Pse="rgb[a]?\\(("+Ka+"[%]?)\\s*,\\s*("+Ka+"[%]?)\\s*,\\s*("+Ka+"[%]?)(?:\\s*,\\s*("+Ka+"))?\\)",Sse="rgb[a]?\\((?:"+Ka+"[%]?)\\s*,\\s*(?:"+Ka+"[%]?)\\s*,\\s*(?:"+Ka+"[%]?)(?:\\s*,\\s*(?:"+Ka+"))?\\)",Nse="hsl[a]?\\(("+Ka+")\\s*,\\s*("+Ka+"[%])\\s*,\\s*("+Ka+"[%])(?:\\s*,\\s*("+Ka+"))?\\)",Tse="hsl[a]?\\((?:"+Ka+")\\s*,\\s*(?:"+Ka+"[%])\\s*,\\s*(?:"+Ka+"[%])(?:\\s*,\\s*(?:"+Ka+"))?\\)",Mse="\\#[0-9a-fA-F]{3}",jse="\\#[0-9a-fA-F]{6}",yO=function(t,r){return t<r?-1:t>r?1:0},Ase=function(t,r){return-1*yO(t,r)},gn=Object.assign!=null?Object.assign.bind(Object):function(t){for(var r=arguments,a=1;a<r.length;a++){var s=r[a];if(s!=null)for(var c=Object.keys(s),l=0;l<c.length;l++){var h=c[l];t[h]=s[h]}}return t},Ise=function(t){if(!(!(t.length===4||t.length===7)||t[0]!=="#")){var r=t.length===4,a,s,c,l=16;return r?(a=parseInt(t[1]+t[1],l),s=parseInt(t[2]+t[2],l),c=parseInt(t[3]+t[3],l)):(a=parseInt(t[1]+t[2],l),s=parseInt(t[3]+t[4],l),c=parseInt(t[5]+t[6],l)),[a,s,c]}},Lse=function(t){var r,a,s,c,l,h,d,p;function b(P,S,M){return M<0&&(M+=1),M>1&&(M-=1),M<1/6?P+(S-P)*6*M:M<1/2?S:M<2/3?P+(S-P)*(2/3-M)*6:P}var m=new RegExp("^"+Nse+"$").exec(t);if(m){if(a=parseInt(m[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,s=parseFloat(m[2]),s<0||s>100||(s=s/100,c=parseFloat(m[3]),c<0||c>100)||(c=c/100,l=m[4],l!==void 0&&(l=parseFloat(l),l<0||l>1)))return;if(s===0)h=d=p=Math.round(c*255);else{var w=c<.5?c*(1+s):c+s-c*s,k=2*c-w;h=Math.round(255*b(k,w,a+1/3)),d=Math.round(255*b(k,w,a)),p=Math.round(255*b(k,w,a-1/3))}r=[h,d,p,l]}return r},Ose=function(t){var r,a=new RegExp("^"+Pse+"$").exec(t);if(a){r=[];for(var s=[],c=1;c<=3;c++){var l=a[c];if(l[l.length-1]==="%"&&(s[c]=!0),l=parseFloat(l),s[c]&&(l=l/100*255),l<0||l>255)return;r.push(Math.floor(l))}var h=s[1]||s[2]||s[3],d=s[1]&&s[2]&&s[3];if(h&&!d)return;var p=a[4];if(p!==void 0){if(p=parseFloat(p),p<0||p>1)return;r.push(p)}}return r},Rse=function(t){return Dse[t.toLowerCase()]},mO=function(t){return(ci(t)?t:null)||Rse(t)||Ise(t)||Ose(t)||Lse(t)},Dse={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]},wO=function(t){for(var r=t.map,a=t.keys,s=a.length,c=0;c<s;c++){var l=a[c];if(_r(l))throw Error("Tried to set map with object key");c<a.length-1?(r[l]==null&&(r[l]={}),r=r[l]):r[l]=t.value}},xO=function(t){for(var r=t.map,a=t.keys,s=a.length,c=0;c<s;c++){var l=a[c];if(_r(l))throw Error("Tried to get map with object key");if(r=r[l],r==null)return r}return r},Wm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function u0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var BC,kO;function c0(){if(kO)return BC;kO=1;function t(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}return BC=t,BC}var GC,_O;function Bse(){if(_O)return GC;_O=1;var t=typeof Wm=="object"&&Wm&&Wm.Object===Object&&Wm;return GC=t,GC}var HC,EO;function Jm(){if(EO)return HC;EO=1;var t=Bse(),r=typeof self=="object"&&self&&self.Object===Object&&self,a=t||r||Function("return this")();return HC=a,HC}var zC,CO;function Gse(){if(CO)return zC;CO=1;var t=Jm(),r=function(){return t.Date.now()};return zC=r,zC}var FC,PO;function Hse(){if(PO)return FC;PO=1;var t=/\s/;function r(a){for(var s=a.length;s--&&t.test(a.charAt(s)););return s}return FC=r,FC}var UC,SO;function zse(){if(SO)return UC;SO=1;var t=Hse(),r=/^\s+/;function a(s){return s&&s.slice(0,t(s)+1).replace(r,"")}return UC=a,UC}var YC,NO;function VC(){if(NO)return YC;NO=1;var t=Jm(),r=t.Symbol;return YC=r,YC}var qC,TO;function Fse(){if(TO)return qC;TO=1;var t=VC(),r=Object.prototype,a=r.hasOwnProperty,s=r.toString,c=t?t.toStringTag:void 0;function l(h){var d=a.call(h,c),p=h[c];try{h[c]=void 0;var b=!0}catch{}var m=s.call(h);return b&&(d?h[c]=p:delete h[c]),m}return qC=l,qC}var ZC,MO;function Use(){if(MO)return ZC;MO=1;var t=Object.prototype,r=t.toString;function a(s){return r.call(s)}return ZC=a,ZC}var $C,jO;function AO(){if(jO)return $C;jO=1;var t=VC(),r=Fse(),a=Use(),s="[object Null]",c="[object Undefined]",l=t?t.toStringTag:void 0;function h(d){return d==null?d===void 0?c:s:l&&l in Object(d)?r(d):a(d)}return $C=h,$C}var KC,IO;function Yse(){if(IO)return KC;IO=1;function t(r){return r!=null&&typeof r=="object"}return KC=t,KC}var QC,LO;function l0(){if(LO)return QC;LO=1;var t=AO(),r=Yse(),a="[object Symbol]";function s(c){return typeof c=="symbol"||r(c)&&t(c)==a}return QC=s,QC}var WC,OO;function Vse(){if(OO)return WC;OO=1;var t=zse(),r=c0(),a=l0(),s=NaN,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt;function p(b){if(typeof b=="number")return b;if(a(b))return s;if(r(b)){var m=typeof b.valueOf=="function"?b.valueOf():b;b=r(m)?m+"":m}if(typeof b!="string")return b===0?b:+b;b=t(b);var w=l.test(b);return w||h.test(b)?d(b.slice(2),w?2:8):c.test(b)?s:+b}return WC=p,WC}var JC,RO;function qse(){if(RO)return JC;RO=1;var t=c0(),r=Gse(),a=Vse(),s="Expected a function",c=Math.max,l=Math.min;function h(d,p,b){var m,w,k,P,S,M,L=0,T=!1,j=!1,I=!0;if(typeof d!="function")throw new TypeError(s);p=a(p)||0,t(b)&&(T=!!b.leading,j="maxWait"in b,k=j?c(a(b.maxWait)||0,p):k,I="trailing"in b?!!b.trailing:I);function R(J){var K=m,ae=w;return m=w=void 0,L=J,P=d.apply(ae,K),P}function B(J){return L=J,S=setTimeout(D,p),T?R(J):P}function F(J){var K=J-M,ae=J-L,se=p-K;return j?l(se,k-ae):se}function z(J){var K=J-M,ae=J-L;return M===void 0||K>=p||K<0||j&&ae>=k}function D(){var J=r();if(z(J))return H(J);S=setTimeout(D,F(J))}function H(J){return S=void 0,I&&m?R(J):(m=w=void 0,P)}function Q(){S!==void 0&&clearTimeout(S),L=0,m=M=w=S=void 0}function q(){return S===void 0?P:H(r())}function Z(){var J=r(),K=z(J);if(m=arguments,w=this,M=J,K){if(S===void 0)return B(M);if(j)return clearTimeout(S),S=setTimeout(D,p),R(M)}return S===void 0&&(S=setTimeout(D,p)),P}return Z.cancel=Q,Z.flush=q,Z}return JC=h,JC}var Zse=qse(),f0=u0(Zse),XC=$a?$a.performance:null,DO=XC&&XC.now?function(){return XC.now()}:function(){return Date.now()},$se=function(){if($a){if($a.requestAnimationFrame)return function(t){$a.requestAnimationFrame(t)};if($a.mozRequestAnimationFrame)return function(t){$a.mozRequestAnimationFrame(t)};if($a.webkitRequestAnimationFrame)return function(t){$a.webkitRequestAnimationFrame(t)};if($a.msRequestAnimationFrame)return function(t){$a.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(DO())},1e3/60)}}(),Xm=function(t){return $se(t)},hf=DO,Vd=9261,BO=65599,Cg=5381,GO=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vd,a=r,s;s=t.next(),!s.done;)a=a*BO+s.value|0;return a},h0=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vd;return r*BO+t|0},d0=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cg;return(r<<5)+r+t|0},Kse=function(t,r){return t*2097152+r},wh=function(t){return t[0]*2097152+t[1]},ew=function(t,r){return[h0(t[0],r[0]),d0(t[1],r[1])]},HO=function(t,r){var a={value:0,done:!1},s=0,c=t.length,l={next:function(){return s<c?a.value=t[s++]:a.done=!0,a}};return GO(l,r)},qd=function(t,r){var a={value:0,done:!1},s=0,c=t.length,l={next:function(){return s<c?a.value=t.charCodeAt(s++):a.done=!0,a}};return GO(l,r)},zO=function(){return Qse(arguments)},Qse=function(t){for(var r,a=0;a<t.length;a++){var s=t[a];a===0?r=qd(s):r=qd(s,r)}return r};function Wse(t,r,a,s,c){var l=c*Math.PI/180,h=Math.cos(l)*(t-a)-Math.sin(l)*(r-s)+a,d=Math.sin(l)*(t-a)+Math.cos(l)*(r-s)+s;return{x:h,y:d}}var Jse=function(t,r,a,s,c,l){return{x:(t-a)*c+a,y:(r-s)*l+s}};function Xse(t,r,a){if(a===0)return t;var s=(r.x1+r.x2)/2,c=(r.y1+r.y2)/2,l=r.w/r.h,h=1/l,d=Wse(t.x,t.y,s,c,a),p=Jse(d.x,d.y,s,c,l,h);return{x:p.x,y:p.y}}var FO=!0,eue=console.warn!=null,tue=console.trace!=null,e3=Number.MAX_SAFE_INTEGER||9007199254740991,UO=function(){return!0},tw=function(){return!1},YO=function(){return 0},t3=function(){},Ri=function(t){throw new Error(t)},VO=function(t){if(t!==void 0)FO=!!t;else return FO},Gr=function(t){VO()&&(eue?console.warn(t):(console.log(t),tue&&console.trace()))},nue=function(t){return gn({},t)},al=function(t){return t==null?t:ci(t)?t.slice():_r(t)?nue(t):t},rue=function(t){return t.slice()},qO=function(t,r){for(r=t="";t++<36;r+=t*51&52?(t^15?8^Math.random()*(t^20?16:4):4).toString(16):"-");return r},iue={},ZO=function(){return iue},To=function(t){var r=Object.keys(t);return function(a){for(var s={},c=0;c<r.length;c++){var l=r[c],h=a==null?void 0:a[l];s[l]=h===void 0?t[l]:h}return s}},xh=function(t,r,a){for(var s=t.length-1;s>=0;s--)t[s]===r&&t.splice(s,1)},n3=function(t){t.splice(0,t.length)},aue=function(t,r){for(var a=0;a<r.length;a++){var s=r[a];t.push(s)}},Gs=function(t,r,a){return a&&(r=bO(a,r)),t[r]},df=function(t,r,a,s){a&&(r=bO(a,r)),t[r]=s},oue=function(){function t(){bh(this,t),this._obj={}}return vh(t,[{key:"set",value:function(r,a){return this._obj[r]=a,this}},{key:"delete",value:function(r){return this._obj[r]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(r){return this._obj[r]!==void 0}},{key:"get",value:function(r){return this._obj[r]}}])}(),pf=typeof Map<"u"?Map:oue,sue="undefined",uue=function(){function t(r){if(bh(this,t),this._obj=Object.create(null),this.size=0,r!=null){var a;r.instanceString!=null&&r.instanceString()===this.instanceString()?a=r.toArray():a=r;for(var s=0;s<a.length;s++)this.add(a[s])}}return vh(t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(r){var a=this._obj;a[r]!==1&&(a[r]=1,this.size++)}},{key:"delete",value:function(r){var a=this._obj;a[r]===1&&(a[r]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(r){return this._obj[r]===1}},{key:"toArray",value:function(){var r=this;return Object.keys(this._obj).filter(function(a){return r.has(a)})}},{key:"forEach",value:function(r,a){return this.toArray().forEach(r,a)}}])}(),Pg=(typeof Set>"u"?"undefined":Za(Set))!==sue?Set:uue,nw=function(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(t===void 0||r===void 0||!RC(t)){Ri("An element must have a core reference and parameters set");return}var s=r.group;if(s==null&&(r.data&&r.data.source!=null&&r.data.target!=null?s="edges":s="nodes"),s!=="nodes"&&s!=="edges"){Ri("An element must be of type `nodes` or `edges`; you specified `"+s+"`");return}this.length=1,this[0]=this;var c=this._private={cy:t,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:s,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?s==="edges":!!r.pannable,active:!1,classes:new Pg,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.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(c.position.x==null&&(c.position.x=0),c.position.y==null&&(c.position.y=0),r.renderedPosition){var l=r.renderedPosition,h=t.pan(),d=t.zoom();c.position={x:(l.x-h.x)/d,y:(l.y-h.y)/d}}var p=[];ci(r.classes)?p=r.classes:cn(r.classes)&&(p=r.classes.split(/\s+/));for(var b=0,m=p.length;b<m;b++){var w=p[b];!w||w===""||c.classes.add(w)}this.createEmitter(),(a===void 0||a)&&this.restore();var k=r.style||r.css;k&&(Gr("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(k))},$O=function(t){return t={bfs:t.bfs||!t.dfs,dfs:t.dfs||!t.bfs},function(r,a,s){var c;_r(r)&&!du(r)&&(c=r,r=c.roots||c.root,a=c.visit,s=c.directed),s=arguments.length===2&&!Qi(a)?a:s,a=Qi(a)?a:function(){};for(var l=this._private.cy,h=r=cn(r)?this.filter(r):r,d=[],p=[],b={},m={},w={},k=0,P,S=this.byGroup(),M=S.nodes,L=S.edges,T=0;T<h.length;T++){var j=h[T],I=j.id();j.isNode()&&(d.unshift(j),t.bfs&&(w[I]=!0,p.push(j)),m[I]=0)}for(var R=function(){var Q=t.bfs?d.shift():d.pop(),q=Q.id();if(t.dfs){if(w[q])return 0;w[q]=!0,p.push(Q)}var Z=m[q],J=b[q],K=J!=null?J.source():null,ae=J!=null?J.target():null,se=J==null?void 0:Q.same(K)?ae[0]:K[0],le;if(le=a(Q,J,se,k++,Z),le===!0)return P=Q,1;if(le===!1)return 1;for(var he=Q.connectedEdges().filter(function(Oe){return(!s||Oe.source().same(Q))&&L.has(Oe)}),fe=0;fe<he.length;fe++){var pe=he[fe],me=pe.connectedNodes().filter(function(Oe){return!Oe.same(Q)&&M.has(Oe)}),Te=me.id();me.length!==0&&!w[Te]&&(me=me[0],d.push(me),t.bfs&&(w[Te]=!0,p.push(me)),b[Te]=pe,m[Te]=m[q]+1)}},B;d.length!==0&&(B=R(),!(B!==0&&B===1)););for(var F=l.collection(),z=0;z<p.length;z++){var D=p[z],H=b[D.id()];H!=null&&F.push(H),F.push(D)}return{path:l.collection(F),found:l.collection(P)}}},p0={breadthFirstSearch:$O({bfs:!0}),depthFirstSearch:$O({dfs:!0})};p0.bfs=p0.breadthFirstSearch,p0.dfs=p0.depthFirstSearch;var r3={exports:{}},cue=r3.exports,KO;function lue(){return KO||(KO=1,function(t,r){(function(){var a,s,c,l,h,d,p,b,m,w,k,P,S,M,L;c=Math.floor,w=Math.min,s=function(T,j){return T<j?-1:T>j?1:0},m=function(T,j,I,R,B){var F;if(I==null&&(I=0),B==null&&(B=s),I<0)throw new Error("lo must be non-negative");for(R==null&&(R=T.length);I<R;)F=c((I+R)/2),B(j,T[F])<0?R=F:I=F+1;return[].splice.apply(T,[I,I-I].concat(j)),j},d=function(T,j,I){return I==null&&(I=s),T.push(j),M(T,0,T.length-1,I)},h=function(T,j){var I,R;return j==null&&(j=s),I=T.pop(),T.length?(R=T[0],T[0]=I,L(T,0,j)):R=I,R},b=function(T,j,I){var R;return I==null&&(I=s),R=T[0],T[0]=j,L(T,0,I),R},p=function(T,j,I){var R;return I==null&&(I=s),T.length&&I(T[0],j)<0&&(R=[T[0],j],j=R[0],T[0]=R[1],L(T,0,I)),j},l=function(T,j){var I,R,B,F,z,D;for(j==null&&(j=s),F=(function(){D=[];for(var H=0,Q=c(T.length/2);0<=Q?H<Q:H>Q;0<=Q?H++:H--)D.push(H);return D}).apply(this).reverse(),z=[],R=0,B=F.length;R<B;R++)I=F[R],z.push(L(T,I,j));return z},S=function(T,j,I){var R;if(I==null&&(I=s),R=T.indexOf(j),R!==-1)return M(T,0,R,I),L(T,R,I)},k=function(T,j,I){var R,B,F,z,D;if(I==null&&(I=s),B=T.slice(0,j),!B.length)return B;for(l(B,I),D=T.slice(j),F=0,z=D.length;F<z;F++)R=D[F],p(B,R,I);return B.sort(I).reverse()},P=function(T,j,I){var R,B,F,z,D,H,Q,q,Z;if(I==null&&(I=s),j*10<=T.length){if(F=T.slice(0,j).sort(I),!F.length)return F;for(B=F[F.length-1],Q=T.slice(j),z=0,H=Q.length;z<H;z++)R=Q[z],I(R,B)<0&&(m(F,R,0,null,I),F.pop(),B=F[F.length-1]);return F}for(l(T,I),Z=[],D=0,q=w(j,T.length);0<=q?D<q:D>q;0<=q?++D:--D)Z.push(h(T,I));return Z},M=function(T,j,I,R){var B,F,z;for(R==null&&(R=s),B=T[I];I>j;){if(z=I-1>>1,F=T[z],R(B,F)<0){T[I]=F,I=z;continue}break}return T[I]=B},L=function(T,j,I){var R,B,F,z,D;for(I==null&&(I=s),B=T.length,D=j,F=T[j],R=2*j+1;R<B;)z=R+1,z<B&&!(I(T[R],T[z])<0)&&(R=z),T[j]=T[R],j=R,R=2*j+1;return T[j]=F,M(T,D,j,I)},a=function(){T.push=d,T.pop=h,T.replace=b,T.pushpop=p,T.heapify=l,T.updateItem=S,T.nlargest=k,T.nsmallest=P;function T(j){this.cmp=j??s,this.nodes=[]}return T.prototype.push=function(j){return d(this.nodes,j,this.cmp)},T.prototype.pop=function(){return h(this.nodes,this.cmp)},T.prototype.peek=function(){return this.nodes[0]},T.prototype.contains=function(j){return this.nodes.indexOf(j)!==-1},T.prototype.replace=function(j){return b(this.nodes,j,this.cmp)},T.prototype.pushpop=function(j){return p(this.nodes,j,this.cmp)},T.prototype.heapify=function(){return l(this.nodes,this.cmp)},T.prototype.updateItem=function(j){return S(this.nodes,j,this.cmp)},T.prototype.clear=function(){return this.nodes=[]},T.prototype.empty=function(){return this.nodes.length===0},T.prototype.size=function(){return this.nodes.length},T.prototype.clone=function(){var j;return j=new T,j.nodes=this.nodes.slice(0),j},T.prototype.toArray=function(){return this.nodes.slice(0)},T.prototype.insert=T.prototype.push,T.prototype.top=T.prototype.peek,T.prototype.front=T.prototype.peek,T.prototype.has=T.prototype.contains,T.prototype.copy=T.prototype.clone,T}(),function(T,j){return t.exports=j()}(this,function(){return a})}).call(cue)}(r3)),r3.exports}var QO,WO;function fue(){return WO||(WO=1,QO=lue()),QO}var hue=fue(),g0=u0(hue),due=To({root:null,weight:function(t){return 1},directed:!1}),pue={dijkstra:function(t){if(!_r(t)){var r=arguments;t={root:r[0],weight:r[1],directed:r[2]}}var a=due(t),s=a.root,c=a.weight,l=a.directed,h=this,d=c,p=cn(s)?this.filter(s)[0]:s[0],b={},m={},w={},k=this.byGroup(),P=k.nodes,S=k.edges;S.unmergeBy(function(K){return K.isLoop()});for(var M=function(K){return b[K.id()]},L=function(K,ae){b[K.id()]=ae,T.updateItem(K)},T=new g0(function(K,ae){return M(K)-M(ae)}),j=0;j<P.length;j++){var I=P[j];b[I.id()]=I.same(p)?0:1/0,T.push(I)}for(var R=function(K,ae){for(var se=(l?K.edgesTo(ae):K.edgesWith(ae)).intersect(S),le=1/0,he,fe=0;fe<se.length;fe++){var pe=se[fe],me=d(pe);(me<le||!he)&&(le=me,he=pe)}return{edge:he,dist:le}};T.size()>0;){var B=T.pop(),F=M(B),z=B.id();if(w[z]=F,F!==1/0)for(var D=B.neighborhood().intersect(P),H=0;H<D.length;H++){var Q=D[H],q=Q.id(),Z=R(B,Q),J=F+Z.dist;J<M(Q)&&(L(Q,J),m[q]={node:B,edge:Z.edge})}}return{distanceTo:function(K){var ae=cn(K)?P.filter(K)[0]:K[0];return w[ae.id()]},pathTo:function(K){var ae=cn(K)?P.filter(K)[0]:K[0],se=[],le=ae,he=le.id();if(ae.length>0)for(se.unshift(ae);m[he];){var fe=m[he];se.unshift(fe.edge),se.unshift(fe.node),le=fe.node,he=le.id()}return h.spawn(se)}}}},gue={kruskal:function(t){t=t||function(j){return 1};for(var r=this.byGroup(),a=r.nodes,s=r.edges,c=a.length,l=new Array(c),h=a,d=function(j){for(var I=0;I<l.length;I++){var R=l[I];if(R.has(j))return I}},p=0;p<c;p++)l[p]=this.spawn(a[p]);for(var b=s.sort(function(j,I){return t(j)-t(I)}),m=0;m<b.length;m++){var w=b[m],k=w.source()[0],P=w.target()[0],S=d(k),M=d(P),L=l[S],T=l[M];S!==M&&(h.merge(w),L.merge(T),l.splice(M,1))}return h}},bue=To({root:null,goal:null,weight:function(t){return 1},heuristic:function(t){return 0},directed:!1}),vue={aStar:function(t){var r=this.cy(),a=bue(t),s=a.root,c=a.goal,l=a.heuristic,h=a.directed,d=a.weight;s=r.collection(s)[0],c=r.collection(c)[0];var p=s.id(),b=c.id(),m={},w={},k={},P=new g0(function(fe,pe){return w[fe.id()]-w[pe.id()]}),S=new Pg,M={},L={},T=function(fe,pe){P.push(fe),S.add(pe)},j,I,R=function(){j=P.pop(),I=j.id(),S.delete(I)},B=function(fe){return S.has(fe)};T(s,p),m[p]=0,w[p]=l(s);for(var F=0;P.size()>0;){if(R(),F++,I===b){for(var z=[],D=c,H=b,Q=L[H];z.unshift(D),Q!=null&&z.unshift(Q),D=M[H],D!=null;)H=D.id(),Q=L[H];return{found:!0,distance:m[I],path:this.spawn(z),steps:F}}k[I]=!0;for(var q=j._private.edges,Z=0;Z<q.length;Z++){var J=q[Z];if(this.hasElementWithId(J.id())&&!(h&&J.data("source")!==I)){var K=J.source(),ae=J.target(),se=K.id()!==I?K:ae,le=se.id();if(this.hasElementWithId(le)&&!k[le]){var he=m[I]+d(J);if(!B(le)){m[le]=he,w[le]=he+l(se),T(se,le),M[le]=j,L[le]=J;continue}he<m[le]&&(m[le]=he,w[le]=he+l(se),M[le]=j,L[le]=J)}}}}return{found:!1,distance:void 0,path:void 0,steps:F}}},yue=To({weight:function(t){return 1},directed:!1}),mue={floydWarshall:function(t){for(var r=this.cy(),a=yue(t),s=a.weight,c=a.directed,l=s,h=this.byGroup(),d=h.nodes,p=h.edges,b=d.length,m=b*b,w=function(me){return d.indexOf(me)},k=function(me){return d[me]},P=new Array(m),S=0;S<m;S++){var M=S%b,L=(S-M)/b;L===M?P[S]=0:P[S]=1/0}for(var T=new Array(m),j=new Array(m),I=0;I<p.length;I++){var R=p[I],B=R.source()[0],F=R.target()[0];if(B!==F){var z=w(B),D=w(F),H=z*b+D,Q=l(R);if(P[H]>Q&&(P[H]=Q,T[H]=D,j[H]=R),!c){var q=D*b+z;!c&&P[q]>Q&&(P[q]=Q,T[q]=z,j[q]=R)}}}for(var Z=0;Z<b;Z++)for(var J=0;J<b;J++)for(var K=J*b+Z,ae=0;ae<b;ae++){var se=J*b+ae,le=Z*b+ae;P[K]+P[le]<P[se]&&(P[se]=P[K]+P[le],T[se]=T[K])}var he=function(me){return(cn(me)?r.filter(me):me)[0]},fe=function(me){return w(he(me))},pe={distance:function(me,Te){var Oe=fe(me),ge=fe(Te);return P[Oe*b+ge]},path:function(me,Te){var Oe=fe(me),ge=fe(Te),xe=k(Oe);if(Oe===ge)return xe.collection();if(T[Oe*b+ge]==null)return r.collection();var Se=r.collection(),Le=Oe,De;for(Se.merge(xe);Oe!==ge;)Le=Oe,Oe=T[Oe*b+ge],De=j[Le*b+Oe],Se.merge(De),Se.merge(k(Oe));return Se}};return pe}},wue=To({weight:function(t){return 1},directed:!1,root:null}),xue={bellmanFord:function(t){var r=this,a=wue(t),s=a.weight,c=a.directed,l=a.root,h=s,d=this,p=this.cy(),b=this.byGroup(),m=b.edges,w=b.nodes,k=w.length,P=new pf,S=!1,M=[];l=p.collection(l)[0],m.unmergeBy(function(ze){return ze.isLoop()});for(var L=m.length,T=function(ze){var $e=P.get(ze.id());return $e||($e={},P.set(ze.id(),$e)),$e},j=function(ze){return(cn(ze)?p.$(ze):ze)[0]},I=function(ze){return T(j(ze)).dist},R=function(ze){for(var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l,xt=j(ze),st=[],Rt=xt;;){if(Rt==null)return r.spawn();var It=T(Rt),Dt=It.edge,Ut=It.pred;if(st.unshift(Rt[0]),Rt.same($e)&&st.length>0)break;Dt!=null&&st.unshift(Dt),Rt=Ut}return d.spawn(st)},B=0;B<k;B++){var F=w[B],z=T(F);F.same(l)?z.dist=0:z.dist=1/0,z.pred=null,z.edge=null}for(var D=!1,H=function(ze,$e,xt,st,Rt,It){var Dt=st.dist+It;Dt<Rt.dist&&!xt.same(st.edge)&&(Rt.dist=Dt,Rt.pred=ze,Rt.edge=xt,D=!0)},Q=1;Q<k;Q++){D=!1;for(var q=0;q<L;q++){var Z=m[q],J=Z.source(),K=Z.target(),ae=h(Z),se=T(J),le=T(K);H(J,K,Z,se,le,ae),c||H(K,J,Z,le,se,ae)}if(!D)break}if(D)for(var he=[],fe=0;fe<L;fe++){var pe=m[fe],me=pe.source(),Te=pe.target(),Oe=h(pe),ge=T(me).dist,xe=T(Te).dist;if(ge+Oe<xe||!c&&xe+Oe<ge)if(S||(Gr("Graph contains a negative weight cycle for Bellman-Ford"),S=!0),t.findNegativeWeightCycles!==!1){var Se=[];ge+Oe<xe&&Se.push(me),!c&&xe+Oe<ge&&Se.push(Te);for(var Le=Se.length,De=0;De<Le;De++){var Ne=Se[De],Me=[Ne];Me.push(T(Ne).edge);for(var ke=T(Ne).pred;Me.indexOf(ke)===-1;)Me.push(ke),Me.push(T(ke).edge),ke=T(ke).pred;Me=Me.slice(Me.indexOf(ke));for(var He=Me[0].id(),Qe=0,it=2;it<Me.length;it+=2)Me[it].id()<He&&(He=Me[it].id(),Qe=it);Me=Me.slice(Qe).concat(Me.slice(0,Qe)),Me.push(Me[0]);var ft=Me.map(function(ze){return ze.id()}).join(",");he.indexOf(ft)===-1&&(M.push(d.spawn(Me)),he.push(ft))}}else break}return{distanceTo:I,pathTo:R,hasNegativeWeightCycle:S,negativeWeightCycles:M}}},kue=Math.sqrt(2),_ue=function(t,r,a){a.length===0&&Ri("Karger-Stein must be run on a connected (sub)graph");for(var s=a[t],c=s[1],l=s[2],h=r[c],d=r[l],p=a,b=p.length-1;b>=0;b--){var m=p[b],w=m[1],k=m[2];(r[w]===h&&r[k]===d||r[w]===d&&r[k]===h)&&p.splice(b,1)}for(var P=0;P<p.length;P++){var S=p[P];S[1]===d?(p[P]=S.slice(),p[P][1]=h):S[2]===d&&(p[P]=S.slice(),p[P][2]=h)}for(var M=0;M<r.length;M++)r[M]===d&&(r[M]=h);return p},i3=function(t,r,a,s){for(;a>s;){var c=Math.floor(Math.random()*r.length);r=_ue(c,t,r),a--}return r},Eue={kargerStein:function(){var t=this,r=this.byGroup(),a=r.nodes,s=r.edges;s.unmergeBy(function(le){return le.isLoop()});var c=a.length,l=s.length,h=Math.ceil(Math.pow(Math.log(c)/Math.LN2,2)),d=Math.floor(c/kue);if(c<2){Ri("At least 2 nodes are required for Karger-Stein algorithm");return}for(var p=[],b=0;b<l;b++){var m=s[b];p.push([b,a.indexOf(m.source()),a.indexOf(m.target())])}for(var w=1/0,k=[],P=new Array(c),S=new Array(c),M=new Array(c),L=function(le,he){for(var fe=0;fe<c;fe++)he[fe]=le[fe]},T=0;T<=h;T++){for(var j=0;j<c;j++)S[j]=j;var I=i3(S,p.slice(),c,d),R=I.slice();L(S,M);var B=i3(S,I,d,2),F=i3(M,R,d,2);B.length<=F.length&&B.length<w?(w=B.length,k=B,L(S,P)):F.length<=B.length&&F.length<w&&(w=F.length,k=F,L(M,P))}for(var z=this.spawn(k.map(function(le){return s[le[0]]})),D=this.spawn(),H=this.spawn(),Q=P[0],q=0;q<P.length;q++){var Z=P[q],J=a[q];Z===Q?D.merge(J):H.merge(J)}var K=function(le){var he=t.spawn();return le.forEach(function(fe){he.merge(fe),fe.connectedEdges().forEach(function(pe){t.contains(pe)&&!z.contains(pe)&&he.merge(pe)})}),he},ae=[K(D),K(H)],se={cut:z,components:ae,partition1:D,partition2:H};return se}},a3,Cue=function(t){return{x:t.x,y:t.y}},rw=function(t,r,a){return{x:t.x*r+a.x,y:t.y*r+a.y}},JO=function(t,r,a){return{x:(t.x-a.x)/r,y:(t.y-a.y)/r}},Sg=function(t){return{x:t[0],y:t[1]}},Pue=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,s=1/0,c=r;c<a;c++){var l=t[c];isFinite(l)&&(s=Math.min(l,s))}return s},Sue=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,s=-1/0,c=r;c<a;c++){var l=t[c];isFinite(l)&&(s=Math.max(l,s))}return s},Nue=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,s=0,c=0,l=r;l<a;l++){var h=t[l];isFinite(h)&&(s+=h,c++)}return s/c},Tue=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;s?t=t.slice(r,a):(a<t.length&&t.splice(a,t.length-a),r>0&&t.splice(0,r));for(var h=0,d=t.length-1;d>=0;d--){var p=t[d];l?isFinite(p)||(t[d]=-1/0,h++):t.splice(d,1)}c&&t.sort(function(w,k){return w-k});var b=t.length,m=Math.floor(b/2);return b%2!==0?t[m+1+h]:(t[m-1+h]+t[m+h])/2},Mue=function(t){return Math.PI*t/180},iw=function(t,r){return Math.atan2(r,t)-Math.PI/2},o3=Math.log2||function(t){return Math.log(t)/Math.log(2)},s3=function(t){return t>0?1:t<0?-1:0},Zd=function(t,r){return Math.sqrt($d(t,r))},$d=function(t,r){var a=r.x-t.x,s=r.y-t.y;return a*a+s*s},jue=function(t){for(var r=t.length,a=0,s=0;s<r;s++)a+=t[s];for(var c=0;c<r;c++)t[c]=t[c]/a;return t},ho=function(t,r,a,s){return(1-s)*(1-s)*t+2*(1-s)*s*r+s*s*a},Ng=function(t,r,a,s){return{x:ho(t.x,r.x,a.x,s),y:ho(t.y,r.y,a.y,s)}},Aue=function(t,r,a,s){var c={x:r.x-t.x,y:r.y-t.y},l=Zd(t,r),h={x:c.x/l,y:c.y/l};return a=a??0,s=s??a*l,{x:t.x+h.x*s,y:t.y+h.y*s}},b0=function(t,r,a){return Math.max(t,Math.min(a,r))},ss=function(t){if(t==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(t.x1!=null&&t.y1!=null){if(t.x2!=null&&t.y2!=null&&t.x2>=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(t.w!=null&&t.h!=null&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},Iue=function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},Lue=function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},Oue=function(t,r){t.x1=Math.min(t.x1,r.x1),t.x2=Math.max(t.x2,r.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r.y1),t.y2=Math.max(t.y2,r.y2),t.h=t.y2-t.y1},XO=function(t,r,a){t.x1=Math.min(t.x1,r),t.x2=Math.max(t.x2,r),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,a),t.y2=Math.max(t.y2,a),t.h=t.y2-t.y1},aw=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.x1-=r,t.x2+=r,t.y1-=r,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},ow=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,s,c,l;if(r.length===1)a=s=c=l=r[0];else if(r.length===2)a=c=r[0],l=s=r[1];else if(r.length===4){var h=ja(r,4);a=h[0],s=h[1],c=h[2],l=h[3]}return t.x1-=l,t.x2+=s,t.y1-=a,t.y2+=c,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},e8=function(t,r){t.x1=r.x1,t.y1=r.y1,t.x2=r.x2,t.y2=r.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},u3=function(t,r){return!(t.x1>r.x2||r.x1>t.x2||t.x2<r.x1||r.x2<t.x1||t.y2<r.y1||r.y2<t.y1||t.y1>r.y2||r.y1>t.y2)},kh=function(t,r,a){return t.x1<=r&&r<=t.x2&&t.y1<=a&&a<=t.y2},t8=function(t,r){return kh(t,r.x,r.y)},n8=function(t,r){return kh(t,r.x1,r.y1)&&kh(t,r.x2,r.y2)},Rue=(a3=Math.hypot)!==null&&a3!==void 0?a3:function(t,r){return Math.sqrt(t*t+r*r)};function Due(t,r){if(t.length<3)throw new Error("Need at least 3 vertices");var a=function(z,D){return{x:z.x+D.x,y:z.y+D.y}},s=function(z,D){return{x:z.x-D.x,y:z.y-D.y}},c=function(z,D){return{x:z.x*D,y:z.y*D}},l=function(z,D){return z.x*D.y-z.y*D.x},h=function(z){var D=Rue(z.x,z.y);return D===0?{x:0,y:0}:{x:z.x/D,y:z.y/D}},d=function(z){for(var D=0,H=0;H<z.length;H++){var Q=z[H],q=z[(H+1)%z.length];D+=Q.x*q.y-q.x*Q.y}return D/2},p=function(z,D,H,Q){var q=s(D,z),Z=s(Q,H),J=l(q,Z);if(Math.abs(J)<1e-9)return a(z,c(q,.5));var K=l(s(H,z),Z)/J;return a(z,c(q,K))},b=t.map(function(z){return{x:z.x,y:z.y}});d(b)<0&&b.reverse();for(var m=b.length,w=[],k=0;k<m;k++){var P=b[k],S=b[(k+1)%m],M=s(S,P),L=h({x:M.y,y:-M.x});w.push(L)}for(var T=w.map(function(z,D){var H=a(b[D],c(z,r)),Q=a(b[(D+1)%m],c(z,r));return{p1:H,p2:Q}}),j=[],I=0;I<m;I++){var R=T[(I-1+m)%m],B=T[I],F=p(R.p1,R.p2,B.p1,B.p2);j.push(F)}return j}function Bue(t,r,a,s,c,l){var h=Zue(t,r,a,s,c),d=Due(h,l),p=ss();return d.forEach(function(b){return XO(p,b.x,b.y)}),p}var r8=function(t,r,a,s,c,l,h){var d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",p=d==="auto"?Eh(c,l):d,b=c/2,m=l/2;p=Math.min(p,b,m);var w=p!==b,k=p!==m,P;if(w){var S=a-b+p-h,M=s-m-h,L=a+b-p+h,T=M;if(P=_h(t,r,a,s,S,M,L,T,!1),P.length>0)return P}if(k){var j=a+b+h,I=s-m+p-h,R=j,B=s+m-p+h;if(P=_h(t,r,a,s,j,I,R,B,!1),P.length>0)return P}if(w){var F=a-b+p-h,z=s+m+h,D=a+b-p+h,H=z;if(P=_h(t,r,a,s,F,z,D,H,!1),P.length>0)return P}if(k){var Q=a-b-h,q=s-m+p-h,Z=Q,J=s+m-p+h;if(P=_h(t,r,a,s,Q,q,Z,J,!1),P.length>0)return P}var K;{var ae=a-b+p,se=s-m+p;if(K=v0(t,r,a,s,ae,se,p+h),K.length>0&&K[0]<=ae&&K[1]<=se)return[K[0],K[1]]}{var le=a+b-p,he=s-m+p;if(K=v0(t,r,a,s,le,he,p+h),K.length>0&&K[0]>=le&&K[1]<=he)return[K[0],K[1]]}{var fe=a+b-p,pe=s+m-p;if(K=v0(t,r,a,s,fe,pe,p+h),K.length>0&&K[0]>=fe&&K[1]>=pe)return[K[0],K[1]]}{var me=a-b+p,Te=s+m-p;if(K=v0(t,r,a,s,me,Te,p+h),K.length>0&&K[0]<=me&&K[1]>=Te)return[K[0],K[1]]}return[]},Gue=function(t,r,a,s,c,l,h){var d=h,p=Math.min(a,c),b=Math.max(a,c),m=Math.min(s,l),w=Math.max(s,l);return p-d<=t&&t<=b+d&&m-d<=r&&r<=w+d},Hue=function(t,r,a,s,c,l,h,d,p){var b={x1:Math.min(a,h,c)-p,x2:Math.max(a,h,c)+p,y1:Math.min(s,d,l)-p,y2:Math.max(s,d,l)+p};return!(t<b.x1||t>b.x2||r<b.y1||r>b.y2)},zue=function(t,r,a,s){a-=s;var c=r*r-4*t*a;if(c<0)return[];var l=Math.sqrt(c),h=2*t,d=(-r+l)/h,p=(-r-l)/h;return[d,p]},Fue=function(t,r,a,s,c){var l=1e-5;t===0&&(t=l),r/=t,a/=t,s/=t;var h,d,p,b,m,w,k,P;if(d=(3*a-r*r)/9,p=-(27*s)+r*(9*a-2*(r*r)),p/=54,h=d*d*d+p*p,c[1]=0,k=r/3,h>0){m=p+Math.sqrt(h),m=m<0?-Math.pow(-m,1/3):Math.pow(m,1/3),w=p-Math.sqrt(h),w=w<0?-Math.pow(-w,1/3):Math.pow(w,1/3),c[0]=-k+m+w,k+=(m+w)/2,c[4]=c[2]=-k,k=Math.sqrt(3)*(-w+m)/2,c[3]=k,c[5]=-k;return}if(c[5]=c[3]=0,h===0){P=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),c[0]=-k+2*P,c[4]=c[2]=-(P+k);return}d=-d,b=d*d*d,b=Math.acos(p/Math.sqrt(b)),P=2*Math.sqrt(d),c[0]=-k+P*Math.cos(b/3),c[2]=-k+P*Math.cos((b+2*Math.PI)/3),c[4]=-k+P*Math.cos((b+4*Math.PI)/3)},Uue=function(t,r,a,s,c,l,h,d){var p=1*a*a-4*a*c+2*a*h+4*c*c-4*c*h+h*h+s*s-4*s*l+2*s*d+4*l*l-4*l*d+d*d,b=1*9*a*c-3*a*a-3*a*h-6*c*c+3*c*h+9*s*l-3*s*s-3*s*d-6*l*l+3*l*d,m=1*3*a*a-6*a*c+a*h-a*t+2*c*c+2*c*t-h*t+3*s*s-6*s*l+s*d-s*r+2*l*l+2*l*r-d*r,w=1*a*c-a*a+a*t-c*t+s*l-s*s+s*r-l*r,k=[];Fue(p,b,m,w,k);for(var P=1e-7,S=[],M=0;M<6;M+=2)Math.abs(k[M+1])<P&&k[M]>=0&&k[M]<=1&&S.push(k[M]);S.push(1),S.push(0);for(var L=-1,T,j,I,R=0;R<S.length;R++)T=Math.pow(1-S[R],2)*a+2*(1-S[R])*S[R]*c+S[R]*S[R]*h,j=Math.pow(1-S[R],2)*s+2*(1-S[R])*S[R]*l+S[R]*S[R]*d,I=Math.pow(T-t,2)+Math.pow(j-r,2),L>=0?I<L&&(L=I):L=I;return L},Yue=function(t,r,a,s,c,l){var h=[t-a,r-s],d=[c-a,l-s],p=d[0]*d[0]+d[1]*d[1],b=h[0]*h[0]+h[1]*h[1],m=h[0]*d[0]+h[1]*d[1],w=m*m/p;return m<0?b:w>p?(t-c)*(t-c)+(r-l)*(r-l):b-w},Hs=function(t,r,a){for(var s,c,l,h,d,p=0,b=0;b<a.length/2;b++)if(s=a[b*2],c=a[b*2+1],b+1<a.length/2?(l=a[(b+1)*2],h=a[(b+1)*2+1]):(l=a[(b+1-a.length/2)*2],h=a[(b+1-a.length/2)*2+1]),!(s==t&&l==t))if(s>=t&&t>=l||s<=t&&t<=l)d=(t-s)/(l-s)*(h-c)+c,d>r&&p++;else continue;return p%2!==0},gf=function(t,r,a,s,c,l,h,d,p){var b=new Array(a.length),m;d[0]!=null?(m=Math.atan(d[1]/d[0]),d[0]<0?m=m+Math.PI/2:m=-m-Math.PI/2):m=d;for(var w=Math.cos(-m),k=Math.sin(-m),P=0;P<b.length/2;P++)b[P*2]=l/2*(a[P*2]*w-a[P*2+1]*k),b[P*2+1]=h/2*(a[P*2+1]*w+a[P*2]*k),b[P*2]+=s,b[P*2+1]+=c;var S;if(p>0){var M=uw(b,-p);S=sw(M)}else S=b;return Hs(t,r,S)},Vue=function(t,r,a,s,c,l,h,d){for(var p=new Array(a.length*2),b=0;b<d.length;b++){var m=d[b];p[b*4+0]=m.startX,p[b*4+1]=m.startY,p[b*4+2]=m.stopX,p[b*4+3]=m.stopY;var w=Math.pow(m.cx-t,2)+Math.pow(m.cy-r,2);if(w<=Math.pow(m.radius,2))return!0}return Hs(t,r,p)},sw=function(t){for(var r=new Array(t.length/2),a,s,c,l,h,d,p,b,m=0;m<t.length/4;m++){a=t[m*4],s=t[m*4+1],c=t[m*4+2],l=t[m*4+3],m<t.length/4-1?(h=t[(m+1)*4],d=t[(m+1)*4+1],p=t[(m+1)*4+2],b=t[(m+1)*4+3]):(h=t[0],d=t[1],p=t[2],b=t[3]);var w=_h(a,s,c,l,h,d,p,b,!0);r[m*2]=w[0],r[m*2+1]=w[1]}return r},uw=function(t,r){for(var a=new Array(t.length*2),s,c,l,h,d=0;d<t.length/2;d++){s=t[d*2],c=t[d*2+1],d<t.length/2-1?(l=t[(d+1)*2],h=t[(d+1)*2+1]):(l=t[0],h=t[1]);var p=h-c,b=-(l-s),m=Math.sqrt(p*p+b*b),w=p/m,k=b/m;a[d*4]=s+w*r,a[d*4+1]=c+k*r,a[d*4+2]=l+w*r,a[d*4+3]=h+k*r}return a},que=function(t,r,a,s,c,l){var h=a-t,d=s-r;h/=c,d/=l;var p=Math.sqrt(h*h+d*d),b=p-1;if(b<0)return[];var m=b/p;return[(a-t)*m+t,(s-r)*m+r]},Kd=function(t,r,a,s,c,l,h){return t-=c,r-=l,t/=a/2+h,r/=s/2+h,t*t+r*r<=1},v0=function(t,r,a,s,c,l,h){var d=[a-t,s-r],p=[t-c,r-l],b=d[0]*d[0]+d[1]*d[1],m=2*(p[0]*d[0]+p[1]*d[1]),w=p[0]*p[0]+p[1]*p[1]-h*h,k=m*m-4*b*w;if(k<0)return[];var P=(-m+Math.sqrt(k))/(2*b),S=(-m-Math.sqrt(k))/(2*b),M=Math.min(P,S),L=Math.max(P,S),T=[];if(M>=0&&M<=1&&T.push(M),L>=0&&L<=1&&T.push(L),T.length===0)return[];var j=T[0]*d[0]+t,I=T[0]*d[1]+r;if(T.length>1){if(T[0]==T[1])return[j,I];var R=T[1]*d[0]+t,B=T[1]*d[1]+r;return[j,I,R,B]}else return[j,I]},c3=function(t,r,a){return r<=t&&t<=a||a<=t&&t<=r?t:t<=r&&r<=a||a<=r&&r<=t?r:a},_h=function(t,r,a,s,c,l,h,d,p){var b=t-c,m=a-t,w=h-c,k=r-l,P=s-r,S=d-l,M=w*k-S*b,L=m*k-P*b,T=S*m-w*P;if(T!==0){var j=M/T,I=L/T,R=.001,B=0-R,F=1+R;return B<=j&&j<=F&&B<=I&&I<=F?[t+j*m,r+j*P]:p?[t+j*m,r+j*P]:[]}else return M===0||L===0?c3(t,a,h)===h?[h,d]:c3(t,a,c)===c?[c,l]:c3(c,h,a)===a?[a,s]:[]:[]},Zue=function(t,r,a,s,c){var l=[],h=s/2,d=c/2,p=r,b=a;l.push({x:p+h*t[0],y:b+d*t[1]});for(var m=1;m<t.length/2;m++)l.push({x:p+h*t[m*2],y:b+d*t[m*2+1]});return l},y0=function(t,r,a,s,c,l,h,d){var p=[],b,m=new Array(a.length),w=!0;l==null&&(w=!1);var k;if(w){for(var P=0;P<m.length/2;P++)m[P*2]=a[P*2]*l+s,m[P*2+1]=a[P*2+1]*h+c;if(d>0){var S=uw(m,-d);k=sw(S)}else k=m}else k=a;for(var M,L,T,j,I=0;I<k.length/2;I++)M=k[I*2],L=k[I*2+1],I<k.length/2-1?(T=k[(I+1)*2],j=k[(I+1)*2+1]):(T=k[0],j=k[1]),b=_h(t,r,s,c,M,L,T,j),b.length!==0&&p.push(b[0],b[1]);return p},$ue=function(t,r,a,s,c,l,h,d,p){var b=[],m,w=new Array(a.length*2);p.forEach(function(T,j){j===0?(w[w.length-2]=T.startX,w[w.length-1]=T.startY):(w[j*4-2]=T.startX,w[j*4-1]=T.startY),w[j*4]=T.stopX,w[j*4+1]=T.stopY,m=v0(t,r,s,c,T.cx,T.cy,T.radius),m.length!==0&&b.push(m[0],m[1])});for(var k=0;k<w.length/4;k++)m=_h(t,r,s,c,w[k*4],w[k*4+1],w[k*4+2],w[k*4+3],!1),m.length!==0&&b.push(m[0],m[1]);if(b.length>2){for(var P=[b[0],b[1]],S=Math.pow(P[0]-t,2)+Math.pow(P[1]-r,2),M=1;M<b.length/2;M++){var L=Math.pow(b[M*2]-t,2)+Math.pow(b[M*2+1]-r,2);L<=S&&(P[0]=b[M*2],P[1]=b[M*2+1],S=L)}return P}return b},cw=function(t,r,a){var s=[t[0]-r[0],t[1]-r[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),l=(c-a)/c;return l<0&&(l=1e-5),[r[0]+l*s[0],r[1]+l*s[1]]},us=function(t,r){var a=l3(t,r);return a=i8(a),a},i8=function(t){for(var r,a,s=t.length/2,c=1/0,l=1/0,h=-1/0,d=-1/0,p=0;p<s;p++)r=t[2*p],a=t[2*p+1],c=Math.min(c,r),h=Math.max(h,r),l=Math.min(l,a),d=Math.max(d,a);for(var b=2/(h-c),m=2/(d-l),w=0;w<s;w++)r=t[2*w]=t[2*w]*b,a=t[2*w+1]=t[2*w+1]*m,c=Math.min(c,r),h=Math.max(h,r),l=Math.min(l,a),d=Math.max(d,a);if(l<-1)for(var k=0;k<s;k++)a=t[2*k+1]=t[2*k+1]+(-1-l);return t},l3=function(t,r){var a=1/t*2*Math.PI,s=t%2===0?Math.PI/2+a/2:Math.PI/2;s+=r;for(var c=new Array(t*2),l,h=0;h<t;h++)l=h*a+s,c[2*h]=Math.cos(l),c[2*h+1]=Math.sin(-l);return c},Eh=function(t,r){return Math.min(t/4,r/4,8)},a8=function(t,r){return Math.min(t/10,r/10,8)},f3=function(){return 8},Kue=function(t,r,a){return[t-2*r+a,2*(r-t),t]},h3=function(t,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}};function p3(t,r){function a(w){for(var k=[],P=0;P<w.length;P++){var S=w[P],M=w[(P+1)%w.length],L={x:M.x-S.x,y:M.y-S.y},T={x:-L.y,y:L.x},j=Math.sqrt(T.x*T.x+T.y*T.y);k.push({x:T.x/j,y:T.y/j})}return k}function s(w,k){var P=1/0,S=-1/0,M=Bs(w),L;try{for(M.s();!(L=M.n()).done;){var T=L.value,j=T.x*k.x+T.y*k.y;P=Math.min(P,j),S=Math.max(S,j)}}catch(I){M.e(I)}finally{M.f()}return{min:P,max:S}}function c(w,k){return!(w.max<k.min||k.max<w.min)}var l=[].concat($m(a(t)),$m(a(r))),h=Bs(l),d;try{for(h.s();!(d=h.n()).done;){var p=d.value,b=s(t,p),m=s(r,p);if(!c(b,m))return!1}}catch(w){h.e(w)}finally{h.f()}return!0}var Que=To({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(t){return 1}}),Wue={pageRank:function(t){for(var r=Que(t),a=r.dampingFactor,s=r.precision,c=r.iterations,l=r.weight,h=this._private.cy,d=this.byGroup(),p=d.nodes,b=d.edges,m=p.length,w=m*m,k=b.length,P=new Array(w),S=new Array(m),M=(1-a)/m,L=0;L<m;L++){for(var T=0;T<m;T++){var j=L*m+T;P[j]=0}S[L]=0}for(var I=0;I<k;I++){var R=b[I],B=R.data("source"),F=R.data("target");if(B!==F){var z=p.indexOfId(B),D=p.indexOfId(F),H=l(R),Q=D*m+z;P[Q]+=H,S[z]+=H}}for(var q=1/m+M,Z=0;Z<m;Z++)if(S[Z]===0)for(var J=0;J<m;J++){var K=J*m+Z;P[K]=q}else for(var ae=0;ae<m;ae++){var se=ae*m+Z;P[se]=P[se]/S[Z]+M}for(var le=new Array(m),he=new Array(m),fe,pe=0;pe<m;pe++)le[pe]=1;for(var me=0;me<c;me++){for(var Te=0;Te<m;Te++)he[Te]=0;for(var Oe=0;Oe<m;Oe++)for(var ge=0;ge<m;ge++){var xe=Oe*m+ge;he[Oe]+=P[xe]*le[ge]}jue(he),fe=le,le=he,he=fe;for(var Se=0,Le=0;Le<m;Le++){var De=fe[Le]-le[Le];Se+=De*De}if(Se<s)break}var Ne={rank:function(Me){return Me=h.collection(Me)[0],le[p.indexOf(Me)]}};return Ne}},o8=To({root:null,weight:function(t){return 1},directed:!1,alpha:0}),Tg={degreeCentralityNormalized:function(t){t=o8(t);var r=this.cy(),a=this.nodes(),s=a.length;if(t.directed){for(var c={},l={},h=0,d=0,p=0;p<s;p++){var b=a[p],m=b.id();t.root=b;var w=this.degreeCentrality(t);h<w.indegree&&(h=w.indegree),d<w.outdegree&&(d=w.outdegree),c[m]=w.indegree,l[m]=w.outdegree}return{indegree:function(T){return h==0?0:(cn(T)&&(T=r.filter(T)),c[T.id()]/h)},outdegree:function(T){return d===0?0:(cn(T)&&(T=r.filter(T)),l[T.id()]/d)}}}else{for(var k={},P=0,S=0;S<s;S++){var M=a[S];t.root=M;var L=this.degreeCentrality(t);P<L.degree&&(P=L.degree),k[M.id()]=L.degree}return{degree:function(T){return P===0?0:(cn(T)&&(T=r.filter(T)),k[T.id()]/P)}}}},degreeCentrality:function(t){t=o8(t);var r=this.cy(),a=this,s=t,c=s.root,l=s.weight,h=s.directed,d=s.alpha;if(c=r.collection(c)[0],h){for(var p=c.connectedEdges(),b=p.filter(function(B){return B.target().same(c)&&a.has(B)}),m=p.filter(function(B){return B.source().same(c)&&a.has(B)}),w=b.length,k=m.length,P=0,S=0,M=0;M<b.length;M++)P+=l(b[M]);for(var L=0;L<m.length;L++)S+=l(m[L]);return{indegree:Math.pow(w,1-d)*Math.pow(P,d),outdegree:Math.pow(k,1-d)*Math.pow(S,d)}}else{for(var T=c.connectedEdges().intersection(a),j=T.length,I=0,R=0;R<T.length;R++)I+=l(T[R]);return{degree:Math.pow(j,1-d)*Math.pow(I,d)}}}};Tg.dc=Tg.degreeCentrality,Tg.dcn=Tg.degreeCentralityNormalised=Tg.degreeCentralityNormalized;var s8=To({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Mg={closenessCentralityNormalized:function(t){for(var r=s8(t),a=r.harmonic,s=r.weight,c=r.directed,l=this.cy(),h={},d=0,p=this.nodes(),b=this.floydWarshall({weight:s,directed:c}),m=0;m<p.length;m++){for(var w=0,k=p[m],P=0;P<p.length;P++)if(m!==P){var S=b.distance(k,p[P]);a?w+=1/S:w+=S}a||(w=1/w),d<w&&(d=w),h[k.id()]=w}return{closeness:function(M){return d==0?0:(cn(M)?M=l.filter(M)[0].id():M=M.id(),h[M]/d)}}},closenessCentrality:function(t){var r=s8(t),a=r.root,s=r.weight,c=r.directed,l=r.harmonic;a=this.filter(a)[0];for(var h=this.dijkstra({root:a,weight:s,directed:c}),d=0,p=this.nodes(),b=0;b<p.length;b++){var m=p[b];if(!m.same(a)){var w=h.distanceTo(m);l?d+=1/w:d+=w}}return l?d:1/d}};Mg.cc=Mg.closenessCentrality,Mg.ccn=Mg.closenessCentralityNormalised=Mg.closenessCentralityNormalized;var Jue=To({weight:null,directed:!1}),g3={betweennessCentrality:function(t){for(var r=Jue(t),a=r.directed,s=r.weight,c=s!=null,l=this.cy(),h=this.nodes(),d={},p={},b=0,m={set:function(T,j){p[T]=j,j>b&&(b=j)},get:function(T){return p[T]}},w=0;w<h.length;w++){var k=h[w],P=k.id();a?d[P]=k.outgoers().nodes():d[P]=k.openNeighborhood().nodes(),m.set(P,0)}for(var S=function(){for(var T=h[M].id(),j=[],I={},R={},B={},F=new g0(function(Te,Oe){return B[Te]-B[Oe]}),z=0;z<h.length;z++){var D=h[z].id();I[D]=[],R[D]=0,B[D]=1/0}for(R[T]=1,B[T]=0,F.push(T);!F.empty();){var H=F.pop();if(j.push(H),c)for(var Q=0;Q<d[H].length;Q++){var q=d[H][Q],Z=l.getElementById(H),J=void 0;Z.edgesTo(q).length>0?J=Z.edgesTo(q)[0]:J=q.edgesTo(Z)[0];var K=s(J);q=q.id(),B[q]>B[H]+K&&(B[q]=B[H]+K,F.nodes.indexOf(q)<0?F.push(q):F.updateItem(q),R[q]=0,I[q]=[]),B[q]==B[H]+K&&(R[q]=R[q]+R[H],I[q].push(H))}else for(var ae=0;ae<d[H].length;ae++){var se=d[H][ae].id();B[se]==1/0&&(F.push(se),B[se]=B[H]+1),B[se]==B[H]+1&&(R[se]=R[se]+R[H],I[se].push(H))}}for(var le={},he=0;he<h.length;he++)le[h[he].id()]=0;for(;j.length>0;){for(var fe=j.pop(),pe=0;pe<I[fe].length;pe++){var me=I[fe][pe];le[me]=le[me]+R[me]/R[fe]*(1+le[fe])}fe!=h[M].id()&&m.set(fe,m.get(fe)+le[fe])}},M=0;M<h.length;M++)S();var L={betweenness:function(T){var j=l.collection(T).id();return m.get(j)},betweennessNormalized:function(T){if(b==0)return 0;var j=l.collection(T).id();return m.get(j)/b}};return L.betweennessNormalised=L.betweennessNormalized,L}};g3.bc=g3.betweennessCentrality;var Xue=To({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),ece=function(t){return Xue(t)},tce=function(t,r){for(var a=0,s=0;s<r.length;s++)a+=r[s](t);return a},nce=function(t,r,a){for(var s=0;s<r;s++)t[s*r+s]=a},u8=function(t,r){for(var a,s=0;s<r;s++){a=0;for(var c=0;c<r;c++)a+=t[c*r+s];for(var l=0;l<r;l++)t[l*r+s]=t[l*r+s]/a}},rce=function(t,r,a){for(var s=new Array(a*a),c=0;c<a;c++){for(var l=0;l<a;l++)s[c*a+l]=0;for(var h=0;h<a;h++)for(var d=0;d<a;d++)s[c*a+d]+=t[c*a+h]*r[h*a+d]}return s},ice=function(t,r,a){for(var s=t.slice(0),c=1;c<a;c++)t=rce(t,s,r);return t},ace=function(t,r,a){for(var s=new Array(r*r),c=0;c<r*r;c++)s[c]=Math.pow(t[c],a);return u8(s,r),s},oce=function(t,r,a,s){for(var c=0;c<a;c++){var l=Math.round(t[c]*Math.pow(10,s))/Math.pow(10,s),h=Math.round(r[c]*Math.pow(10,s))/Math.pow(10,s);if(l!==h)return!1}return!0},sce=function(t,r,a,s){for(var c=[],l=0;l<r;l++){for(var h=[],d=0;d<r;d++)Math.round(t[l*r+d]*1e3)/1e3>0&&h.push(a[d]);h.length!==0&&c.push(s.collection(h))}return c},uce=function(t,r){for(var a=0;a<t.length;a++)if(!r[a]||t[a].id()!==r[a].id())return!1;return!0},cce=function(t){for(var r=0;r<t.length;r++)for(var a=0;a<t.length;a++)r!=a&&uce(t[r],t[a])&&t.splice(a,1);return t},c8=function(t){for(var r=this.nodes(),a=this.edges(),s=this.cy(),c=ece(t),l={},h=0;h<r.length;h++)l[r[h].id()]=h;for(var d=r.length,p=d*d,b=new Array(p),m,w=0;w<p;w++)b[w]=0;for(var k=0;k<a.length;k++){var P=a[k],S=l[P.source().id()],M=l[P.target().id()],L=tce(P,c.attributes);b[S*d+M]+=L,b[M*d+S]+=L}nce(b,d,c.multFactor),u8(b,d);for(var T=!0,j=0;T&&j<c.maxIterations;)T=!1,m=ice(b,d,c.expandFactor),b=ace(m,d,c.inflateFactor),oce(b,m,p,4)||(T=!0),j++;var I=sce(b,d,r,s);return I=cce(I),I},lce={markovClustering:c8,mcl:c8},fce=function(t){return t},l8=function(t,r){return Math.abs(r-t)},f8=function(t,r,a){return t+l8(r,a)},h8=function(t,r,a){return t+Math.pow(a-r,2)},hce=function(t){return Math.sqrt(t)},dce=function(t,r,a){return Math.max(t,l8(r,a))},m0=function(t,r,a,s,c){for(var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:fce,h=s,d,p,b=0;b<t;b++)d=r(b),p=a(b),h=c(h,d,p);return l(h)},jg={euclidean:function(t,r,a){return t>=2?m0(t,r,a,0,h8,hce):m0(t,r,a,0,f8)},squaredEuclidean:function(t,r,a){return m0(t,r,a,0,h8)},manhattan:function(t,r,a){return m0(t,r,a,0,f8)},max:function(t,r,a){return m0(t,r,a,-1/0,dce)}};jg["squared-euclidean"]=jg.squaredEuclidean,jg.squaredeuclidean=jg.squaredEuclidean;function lw(t,r,a,s,c,l){var h;return Qi(t)?h=t:h=jg[t]||jg.euclidean,r===0&&Qi(t)?h(c,l):h(r,a,s,c,l)}var pce=To({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),b3=function(t){return pce(t)},fw=function(t,r,a,s,c){var l=c!=="kMedoids",h=l?function(m){return a[m]}:function(m){return s[m](a)},d=function(m){return s[m](r)},p=a,b=r;return lw(t,s.length,h,d,p,b)},v3=function(t,r,a){for(var s=a.length,c=new Array(s),l=new Array(s),h=new Array(r),d=null,p=0;p<s;p++)c[p]=t.min(a[p]).value,l[p]=t.max(a[p]).value;for(var b=0;b<r;b++){d=[];for(var m=0;m<s;m++)d[m]=Math.random()*(l[m]-c[m])+c[m];h[b]=d}return h},d8=function(t,r,a,s,c){for(var l=1/0,h=0,d=0;d<r.length;d++){var p=fw(a,t,r[d],s,c);p<l&&(l=p,h=d)}return h},p8=function(t,r,a){for(var s=[],c=null,l=0;l<r.length;l++)c=r[l],a[c.id()]===t&&s.push(c);return s},gce=function(t,r,a){return Math.abs(r-t)<=a},bce=function(t,r,a){for(var s=0;s<t.length;s++)for(var c=0;c<t[s].length;c++){var l=Math.abs(t[s][c]-r[s][c]);if(l>a)return!1}return!0},vce=function(t,r,a){for(var s=0;s<a;s++)if(t===r[s])return!0;return!1},g8=function(t,r){var a=new Array(r);if(t.length<50)for(var s=0;s<r;s++){for(var c=t[Math.floor(Math.random()*t.length)];vce(c,a,s);)c=t[Math.floor(Math.random()*t.length)];a[s]=c}else for(var l=0;l<r;l++)a[l]=t[Math.floor(Math.random()*t.length)];return a},b8=function(t,r,a){for(var s=0,c=0;c<r.length;c++)s+=fw("manhattan",r[c],t,a,"kMedoids");return s},yce=function(t){var r=this.cy(),a=this.nodes(),s=null,c=b3(t),l=new Array(c.k),h={},d;c.testMode?typeof c.testCentroids=="number"?(c.testCentroids,d=v3(a,c.k,c.attributes)):Za(c.testCentroids)==="object"?d=c.testCentroids:d=v3(a,c.k,c.attributes):d=v3(a,c.k,c.attributes);for(var p=!0,b=0;p&&b<c.maxIterations;){for(var m=0;m<a.length;m++)s=a[m],h[s.id()]=d8(s,d,c.distance,c.attributes,"kMeans");p=!1;for(var w=0;w<c.k;w++){var k=p8(w,a,h);if(k.length!==0){for(var P=c.attributes.length,S=d[w],M=new Array(P),L=new Array(P),T=0;T<P;T++){L[T]=0;for(var j=0;j<k.length;j++)s=k[j],L[T]+=c.attributes[T](s);M[T]=L[T]/k.length,gce(M[T],S[T],c.sensitivityThreshold)||(p=!0)}d[w]=M,l[w]=r.collection(k)}}b++}return l},mce=function(t){var r=this.cy(),a=this.nodes(),s=null,c=b3(t),l=new Array(c.k),h,d={},p,b=new Array(c.k);c.testMode?typeof c.testCentroids=="number"||(Za(c.testCentroids)==="object"?h=c.testCentroids:h=g8(a,c.k)):h=g8(a,c.k);for(var m=!0,w=0;m&&w<c.maxIterations;){for(var k=0;k<a.length;k++)s=a[k],d[s.id()]=d8(s,h,c.distance,c.attributes,"kMedoids");m=!1;for(var P=0;P<h.length;P++){var S=p8(P,a,d);if(S.length!==0){b[P]=b8(h[P],S,c.attributes);for(var M=0;M<S.length;M++)p=b8(S[M],S,c.attributes),p<b[P]&&(b[P]=p,h[P]=S[M],m=!0);l[P]=r.collection(S)}}w++}return l},wce=function(t,r,a,s,c){for(var l,h,d=0;d<r.length;d++)for(var p=0;p<t.length;p++)s[d][p]=Math.pow(a[d][p],c.m);for(var b=0;b<t.length;b++)for(var m=0;m<c.attributes.length;m++){l=0,h=0;for(var w=0;w<r.length;w++)l+=s[w][b]*c.attributes[m](r[w]),h+=s[w][b];t[b][m]=l/h}},xce=function(t,r,a,s,c){for(var l=0;l<t.length;l++)r[l]=t[l].slice();for(var h,d,p,b=2/(c.m-1),m=0;m<a.length;m++)for(var w=0;w<s.length;w++){h=0;for(var k=0;k<a.length;k++)d=fw(c.distance,s[w],a[m],c.attributes,"cmeans"),p=fw(c.distance,s[w],a[k],c.attributes,"cmeans"),h+=Math.pow(d/p,b);t[w][m]=1/h}},kce=function(t,r,a,s){for(var c=new Array(a.k),l=0;l<c.length;l++)c[l]=[];for(var h,d,p=0;p<r.length;p++){h=-1/0,d=-1;for(var b=0;b<r[0].length;b++)r[p][b]>h&&(h=r[p][b],d=b);c[d].push(t[p])}for(var m=0;m<c.length;m++)c[m]=s.collection(c[m]);return c},v8=function(t){var r=this.cy(),a=this.nodes(),s=b3(t),c,l,h,d,p;d=new Array(a.length);for(var b=0;b<a.length;b++)d[b]=new Array(s.k);h=new Array(a.length);for(var m=0;m<a.length;m++)h[m]=new Array(s.k);for(var w=0;w<a.length;w++){for(var k=0,P=0;P<s.k;P++)h[w][P]=Math.random(),k+=h[w][P];for(var S=0;S<s.k;S++)h[w][S]=h[w][S]/k}l=new Array(s.k);for(var M=0;M<s.k;M++)l[M]=new Array(s.attributes.length);p=new Array(a.length);for(var L=0;L<a.length;L++)p[L]=new Array(s.k);for(var T=!0,j=0;T&&j<s.maxIterations;)T=!1,wce(l,a,h,p,s),xce(h,d,l,a,s),bce(h,d,s.sensitivityThreshold)||(T=!0),j++;return c=kce(a,h,s,r),{clusters:c,degreeOfMembership:h}},_ce={kMeans:yce,kMedoids:mce,fuzzyCMeans:v8,fcm:v8},Ece=To({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),Cce={single:"min",complete:"max"},Pce=function(t){var r=Ece(t),a=Cce[r.linkage];return a!=null&&(r.linkage=a),r},y8=function(t,r,a,s,c){for(var l=0,h=1/0,d,p=c.attributes,b=function(z,D){return lw(c.distance,p.length,function(H){return p[H](z)},function(H){return p[H](D)},z,D)},m=0;m<t.length;m++){var w=t[m].key,k=a[w][s[w]];k<h&&(l=w,h=k)}if(c.mode==="threshold"&&h>=c.threshold||c.mode==="dendrogram"&&t.length===1)return!1;var P=r[l],S=r[s[l]],M;c.mode==="dendrogram"?M={left:P,right:S,key:P.key}:M={value:P.value.concat(S.value),key:P.key},t[P.index]=M,t.splice(S.index,1),r[P.key]=M;for(var L=0;L<t.length;L++){var T=t[L];P.key===T.key?d=1/0:c.linkage==="min"?(d=a[P.key][T.key],a[P.key][T.key]>a[S.key][T.key]&&(d=a[S.key][T.key])):c.linkage==="max"?(d=a[P.key][T.key],a[P.key][T.key]<a[S.key][T.key]&&(d=a[S.key][T.key])):c.linkage==="mean"?d=(a[P.key][T.key]*P.size+a[S.key][T.key]*S.size)/(P.size+S.size):c.mode==="dendrogram"?d=b(T.value,P.value):d=b(T.value[0],P.value[0]),a[P.key][T.key]=a[T.key][P.key]=d}for(var j=0;j<t.length;j++){var I=t[j].key;if(s[I]===P.key||s[I]===S.key){for(var R=I,B=0;B<t.length;B++){var F=t[B].key;a[I][F]<a[I][R]&&(R=F)}s[I]=R}t[j].index=j}return P.key=S.key=P.index=S.index=null,!0},Ag=function(t,r,a){t&&(t.value?r.push(t.value):(t.left&&Ag(t.left,r),t.right&&Ag(t.right,r)))},y3=function(t,r){if(!t)return"";if(t.left&&t.right){var a=y3(t.left,r),s=y3(t.right,r),c=r.add({group:"nodes",data:{id:a+","+s}});return r.add({group:"edges",data:{source:a,target:c.id()}}),r.add({group:"edges",data:{source:s,target:c.id()}}),c.id()}else if(t.value)return t.value.id()},m3=function(t,r,a){if(!t)return[];var s=[],c=[],l=[];return r===0?(t.left&&Ag(t.left,s),t.right&&Ag(t.right,c),l=s.concat(c),[a.collection(l)]):r===1?t.value?[a.collection(t.value)]:(t.left&&Ag(t.left,s),t.right&&Ag(t.right,c),[a.collection(s),a.collection(c)]):t.value?[a.collection(t.value)]:(t.left&&(s=m3(t.left,r-1,a)),t.right&&(c=m3(t.right,r-1,a)),s.concat(c))},m8=function(t){for(var r=this.cy(),a=this.nodes(),s=Pce(t),c=s.attributes,l=function(T,j){return lw(s.distance,c.length,function(I){return c[I](T)},function(I){return c[I](j)},T,j)},h=[],d=[],p=[],b=[],m=0;m<a.length;m++){var w={value:s.mode==="dendrogram"?a[m]:[a[m]],key:m,index:m};h[m]=w,b[m]=w,d[m]=[],p[m]=0}for(var k=0;k<h.length;k++)for(var P=0;P<=k;P++){var S=void 0;s.mode==="dendrogram"?S=k===P?1/0:l(h[k].value,h[P].value):S=k===P?1/0:l(h[k].value[0],h[P].value[0]),d[k][P]=S,d[P][k]=S,S<d[k][p[k]]&&(p[k]=P)}for(var M=y8(h,b,d,p,s);M;)M=y8(h,b,d,p,s);var L;return s.mode==="dendrogram"?(L=m3(h[0],s.dendrogramDepth,r),s.addDendrogram&&y3(h[0],r)):(L=new Array(h.length),h.forEach(function(T,j){T.key=T.index=null,L[j]=r.collection(T.value)})),L},Sce={hierarchicalClustering:m8,hca:m8},Nce=To({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Tce=function(t){var r=t.damping,a=t.preference;.5<=r&&r<1||Ri("Damping must range on [0.5, 1). Got: ".concat(r));var s=["median","mean","min","max"];return s.some(function(c){return c===a})||Lt(a)||Ri("Preference must be one of [".concat(s.map(function(c){return"'".concat(c,"'")}).join(", "),"] or a number. Got: ").concat(a)),Nce(t)},Mce=function(t,r,a,s){var c=function(l,h){return s[h](l)};return-lw(t,s.length,function(l){return c(r,l)},function(l){return c(a,l)},r,a)},jce=function(t,r){var a=null;return r==="median"?a=Tue(t):r==="mean"?a=Nue(t):r==="min"?a=Pue(t):r==="max"?a=Sue(t):a=r,a},Ace=function(t,r,a){for(var s=[],c=0;c<t;c++)r[c*t+c]+a[c*t+c]>0&&s.push(c);return s},w8=function(t,r,a){for(var s=[],c=0;c<t;c++){for(var l=-1,h=-1/0,d=0;d<a.length;d++){var p=a[d];r[c*t+p]>h&&(l=p,h=r[c*t+p])}l>0&&s.push(l)}for(var b=0;b<a.length;b++)s[a[b]]=a[b];return s},Ice=function(t,r,a){for(var s=w8(t,r,a),c=0;c<a.length;c++){for(var l=[],h=0;h<s.length;h++)s[h]===a[c]&&l.push(h);for(var d=-1,p=-1/0,b=0;b<l.length;b++){for(var m=0,w=0;w<l.length;w++)m+=r[l[w]*t+l[b]];m>p&&(d=b,p=m)}a[c]=l[d]}return s=w8(t,r,a),s},x8=function(t){for(var r=this.cy(),a=this.nodes(),s=Tce(t),c={},l=0;l<a.length;l++)c[a[l].id()]=l;var h,d,p,b,m,w;h=a.length,d=h*h,p=new Array(d);for(var k=0;k<d;k++)p[k]=-1/0;for(var P=0;P<h;P++)for(var S=0;S<h;S++)P!==S&&(p[P*h+S]=Mce(s.distance,a[P],a[S],s.attributes));b=jce(p,s.preference);for(var M=0;M<h;M++)p[M*h+M]=b;m=new Array(d);for(var L=0;L<d;L++)m[L]=0;w=new Array(d);for(var T=0;T<d;T++)w[T]=0;for(var j=new Array(h),I=new Array(h),R=new Array(h),B=0;B<h;B++)j[B]=0,I[B]=0,R[B]=0;for(var F=new Array(h*s.minIterations),z=0;z<F.length;z++)F[z]=0;var D;for(D=0;D<s.maxIterations;D++){for(var H=0;H<h;H++){for(var Q=-1/0,q=-1/0,Z=-1,J=0,K=0;K<h;K++)j[K]=m[H*h+K],J=w[H*h+K]+p[H*h+K],J>=Q?(q=Q,Q=J,Z=K):J>q&&(q=J);for(var ae=0;ae<h;ae++)m[H*h+ae]=(1-s.damping)*(p[H*h+ae]-Q)+s.damping*j[ae];m[H*h+Z]=(1-s.damping)*(p[H*h+Z]-q)+s.damping*j[Z]}for(var se=0;se<h;se++){for(var le=0,he=0;he<h;he++)j[he]=w[he*h+se],I[he]=Math.max(0,m[he*h+se]),le+=I[he];le-=I[se],I[se]=m[se*h+se],le+=I[se];for(var fe=0;fe<h;fe++)w[fe*h+se]=(1-s.damping)*Math.min(0,le-I[fe])+s.damping*j[fe];w[se*h+se]=(1-s.damping)*(le-I[se])+s.damping*j[se]}for(var pe=0,me=0;me<h;me++){var Te=w[me*h+me]+m[me*h+me]>0?1:0;F[D%s.minIterations*h+me]=Te,pe+=Te}if(pe>0&&(D>=s.minIterations-1||D==s.maxIterations-1)){for(var Oe=0,ge=0;ge<h;ge++){R[ge]=0;for(var xe=0;xe<s.minIterations;xe++)R[ge]+=F[xe*h+ge];(R[ge]===0||R[ge]===s.minIterations)&&Oe++}if(Oe===h)break}}for(var Se=Ace(h,m,w),Le=Ice(h,p,Se),De={},Ne=0;Ne<Se.length;Ne++)De[Se[Ne]]=[];for(var Me=0;Me<a.length;Me++){var ke=c[a[Me].id()],He=Le[ke];He!=null&&De[He].push(a[Me])}for(var Qe=new Array(Se.length),it=0;it<Se.length;it++)Qe[it]=r.collection(De[Se[it]]);return Qe},Lce={affinityPropagation:x8,ap:x8},Oce=To({root:void 0,directed:!1}),Rce={hierholzer:function(t){if(!_r(t)){var r=arguments;t={root:r[0],directed:r[1]}}var a=Oce(t),s=a.root,c=a.directed,l=this,h=!1,d,p,b;s&&(b=cn(s)?this.filter(s)[0].id():s[0].id());var m={},w={};c?l.forEach(function(T){var j=T.id();if(T.isNode()){var I=T.indegree(!0),R=T.outdegree(!0),B=I-R,F=R-I;B==1?d?h=!0:d=j:F==1?p?h=!0:p=j:(F>1||B>1)&&(h=!0),m[j]=[],T.outgoers().forEach(function(z){z.isEdge()&&m[j].push(z.id())})}else w[j]=[void 0,T.target().id()]}):l.forEach(function(T){var j=T.id();if(T.isNode()){var I=T.degree(!0);I%2&&(d?p?h=!0:p=j:d=j),m[j]=[],T.connectedEdges().forEach(function(R){return m[j].push(R.id())})}else w[j]=[T.source().id(),T.target().id()]});var k={found:!1,trail:void 0};if(h)return k;if(p&&d)if(c){if(b&&p!=b)return k;b=p}else{if(b&&p!=b&&d!=b)return k;b||(b=p)}else b||(b=l[0].id());var P=function(T){for(var j=T,I=[T],R,B,F;m[j].length;)R=m[j].shift(),B=w[R][0],F=w[R][1],j!=F?(m[F]=m[F].filter(function(z){return z!=R}),j=F):!c&&j!=B&&(m[B]=m[B].filter(function(z){return z!=R}),j=B),I.unshift(R),I.unshift(j);return I},S=[],M=[];for(M=P(b);M.length!=1;)m[M[0]].length==0?(S.unshift(l.getElementById(M.shift())),S.unshift(l.getElementById(M.shift()))):M=P(M.shift()).concat(M);S.unshift(l.getElementById(M.shift()));for(var L in m)if(m[L].length)return k;return k.found=!0,k.trail=this.spawn(S,!0),k}},hw=function(){var t=this,r={},a=0,s=0,c=[],l=[],h={},d=function(m,w){for(var k=l.length-1,P=[],S=t.spawn();l[k].x!=m||l[k].y!=w;)P.push(l.pop().edge),k--;P.push(l.pop().edge),P.forEach(function(M){var L=M.connectedNodes().intersection(t);S.merge(M),L.forEach(function(T){var j=T.id(),I=T.connectedEdges().intersection(t);S.merge(T),r[j].cutVertex?S.merge(I.filter(function(R){return R.isLoop()})):S.merge(I)})}),c.push(S)},p=function(m,w,k){m===k&&(s+=1),r[w]={id:a,low:a++,cutVertex:!1};var P=t.getElementById(w).connectedEdges().intersection(t);if(P.size()===0)c.push(t.spawn(t.getElementById(w)));else{var S,M,L,T;P.forEach(function(j){S=j.source().id(),M=j.target().id(),L=S===w?M:S,L!==k&&(T=j.id(),h[T]||(h[T]=!0,l.push({x:w,y:L,edge:j})),L in r?r[w].low=Math.min(r[w].low,r[L].id):(p(m,L,w),r[w].low=Math.min(r[w].low,r[L].low),r[w].id<=r[L].low&&(r[w].cutVertex=!0,d(w,L))))})}};t.forEach(function(m){if(m.isNode()){var w=m.id();w in r||(s=0,p(w,w),r[w].cutVertex=s>1)}});var b=Object.keys(r).filter(function(m){return r[m].cutVertex}).map(function(m){return t.getElementById(m)});return{cut:t.spawn(b),components:c}},Dce={hopcroftTarjanBiconnected:hw,htbc:hw,htb:hw,hopcroftTarjanBiconnectedComponents:hw},dw=function(){var t=this,r={},a=0,s=[],c=[],l=t.spawn(t),h=function(d){c.push(d),r[d]={index:a,low:a++,explored:!1};var p=t.getElementById(d).connectedEdges().intersection(t);if(p.forEach(function(P){var S=P.target().id();S!==d&&(S in r||h(S),r[S].explored||(r[d].low=Math.min(r[d].low,r[S].low)))}),r[d].index===r[d].low){for(var b=t.spawn();;){var m=c.pop();if(b.merge(t.getElementById(m)),r[m].low=r[d].index,r[m].explored=!0,m===d)break}var w=b.edgesWith(b),k=b.merge(w);s.push(k),l=l.difference(k)}};return t.forEach(function(d){if(d.isNode()){var p=d.id();p in r||h(p)}}),{cut:l,components:s}},Bce={tarjanStronglyConnected:dw,tsc:dw,tscc:dw,tarjanStronglyConnectedComponents:dw},k8={};[p0,pue,gue,vue,mue,xue,Eue,Wue,Tg,Mg,g3,lce,_ce,Sce,Lce,Rce,Dce,Bce].forEach(function(t){gn(k8,t)});/*!
|
|
34
|
+
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
|
|
35
|
+
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
|
|
36
|
+
Licensed under The MIT License (http://opensource.org/licenses/MIT)
|
|
37
|
+
*/var _8=0,E8=1,C8=2,fc=function(t){if(!(this instanceof fc))return new fc(t);this.id="Thenable/1.0.7",this.state=_8,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof t=="function"&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};fc.prototype={fulfill:function(t){return P8(this,E8,"fulfillValue",t)},reject:function(t){return P8(this,C8,"rejectReason",t)},then:function(t,r){var a=this,s=new fc;return a.onFulfilled.push(T8(t,s,"fulfill")),a.onRejected.push(T8(r,s,"reject")),S8(a),s.proxy}};var P8=function(t,r,a,s){return t.state===_8&&(t.state=r,t[a]=s,S8(t)),t},S8=function(t){t.state===E8?N8(t,"onFulfilled",t.fulfillValue):t.state===C8&&N8(t,"onRejected",t.rejectReason)},N8=function(t,r,a){if(t[r].length!==0){var s=t[r];t[r]=[];var c=function(){for(var l=0;l<s.length;l++)s[l](a)};typeof setImmediate=="function"?setImmediate(c):setTimeout(c,0)}},T8=function(t,r,a){return function(s){if(typeof t!="function")r[a].call(r,s);else{var c;try{c=t(s)}catch(l){r.reject(l);return}M8(r,c)}}},M8=function(t,r){if(t===r||t.proxy===r){t.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(Za(r)==="object"&&r!==null||typeof r=="function")try{a=r.then}catch(c){t.reject(c);return}if(typeof a=="function"){var s=!1;try{a.call(r,function(c){s||(s=!0,c===r?t.reject(new TypeError("circular thenable chain")):M8(t,c))},function(c){s||(s=!0,t.reject(c))})}catch(c){s||t.reject(c)}return}t.fulfill(r)};fc.all=function(t){return new fc(function(r,a){for(var s=new Array(t.length),c=0,l=function(d,p){s[d]=p,c++,c===t.length&&r(s)},h=0;h<t.length;h++)(function(d){var p=t[d],b=p!=null&&p.then!=null;if(b)p.then(function(w){l(d,w)},function(w){a(w)});else{var m=p;l(d,m)}})(h)})},fc.resolve=function(t){return new fc(function(r,a){r(t)})},fc.reject=function(t){return new fc(function(r,a){a(t)})};var Ig=typeof Promise<"u"?Promise:fc,w3=function(t,r,a){var s=RC(t),c=!s,l=this._private=gn({duration:1e3},r,a);if(l.target=t,l.style=l.style||l.css,l.started=!1,l.playing=!1,l.hooked=!1,l.applying=!1,l.progress=0,l.completes=[],l.frames=[],l.complete&&Qi(l.complete)&&l.completes.push(l.complete),c){var h=t.position();l.startPosition=l.startPosition||{x:h.x,y:h.y},l.startStyle=l.startStyle||t.cy().style().getAnimationStartStyle(t,l.style)}if(s){var d=t.pan();l.startPan={x:d.x,y:d.y},l.startZoom=t.zoom()}this.length=1,this[0]=this},Qd=w3.prototype;gn(Qd,{instanceString:function(){return"animation"},hook:function(){var t=this._private;if(!t.hooked){var r,a=t.target._private.animation;t.queue?r=a.queue:r=a.current,r.push(this),du(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0}return this},play:function(){var t=this._private;return t.progress===1&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var t=this._private;return t.playing=!1,t.started=!1,this},stop:function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(t){var r=this._private;return t===void 0?r.progress*r.duration:this.progress(t/r.duration)},progress:function(t){var r=this._private,a=r.playing;return t===void 0?r.progress:(a&&this.pause(),r.progress=t,r.started=!1,a&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var t=this._private,r=t.playing;r&&this.pause(),t.progress=1-t.progress,t.started=!1;var a=function(d,p){var b=t[d];b!=null&&(t[d]=t[p],t[p]=b)};if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),t.style)for(var s=0;s<t.style.length;s++){var c=t.style[s],l=c.name,h=t.startStyle[l];t.startStyle[l]=c,t.style[s]=h}return r&&this.play(),this},promise:function(t){var r=this._private,a;switch(t){case"frame":a=r.frames;break;default:case"complete":case"completed":a=r.completes}return new Ig(function(s,c){a.push(function(){s()})})}}),Qd.complete=Qd.completed,Qd.run=Qd.play,Qd.running=Qd.playing;var Gce={animated:function(){return function(){var t=this,r=t.length!==void 0,a=r?t:[t],s=this._private.cy||this;if(!s.styleEnabled())return!1;var c=a[0];if(c)return c._private.animation.current.length>0}},clearQueue:function(){return function(){var t=this,r=t.length!==void 0,a=r?t:[t],s=this._private.cy||this;if(!s.styleEnabled())return this;for(var c=0;c<a.length;c++){var l=a[c];l._private.animation.queue=[]}return this}},delay:function(){return function(t,r){var a=this._private.cy||this;return a.styleEnabled()?this.animate({delay:t,duration:t,complete:r}):this}},delayAnimation:function(){return function(t,r){var a=this._private.cy||this;return a.styleEnabled()?this.animation({delay:t,duration:t,complete:r}):this}},animation:function(){return function(t,r){var a=this,s=a.length!==void 0,c=s?a:[a],l=this._private.cy||this,h=!s,d=!h;if(!l.styleEnabled())return this;var p=l.style();t=gn({},t,r);var b=Object.keys(t).length===0;if(b)return new w3(c[0],t);switch(t.duration===void 0&&(t.duration=400),t.duration){case"slow":t.duration=600;break;case"fast":t.duration=200;break}if(d&&(t.style=p.getPropsList(t.style||t.css),t.css=void 0),d&&t.renderedPosition!=null){var m=t.renderedPosition,w=l.pan(),k=l.zoom();t.position=JO(m,k,w)}if(h&&t.panBy!=null){var P=t.panBy,S=l.pan();t.pan={x:S.x+P.x,y:S.y+P.y}}var M=t.center||t.centre;if(h&&M!=null){var L=l.getCenterPan(M.eles,t.zoom);L!=null&&(t.pan=L)}if(h&&t.fit!=null){var T=t.fit,j=l.getFitViewport(T.eles||T.boundingBox,T.padding);j!=null&&(t.pan=j.pan,t.zoom=j.zoom)}if(h&&_r(t.zoom)){var I=l.getZoomedViewport(t.zoom);I!=null?(I.zoomed&&(t.zoom=I.zoom),I.panned&&(t.pan=I.pan)):t.zoom=null}return new w3(c[0],t)}},animate:function(){return function(t,r){var a=this,s=a.length!==void 0,c=s?a:[a],l=this._private.cy||this;if(!l.styleEnabled())return this;r&&(t=gn({},t,r));for(var h=0;h<c.length;h++){var d=c[h],p=d.animated()&&(t.queue===void 0||t.queue),b=d.animation(t,p?{queue:!0}:void 0);b.play()}return this}},stop:function(){return function(t,r){var a=this,s=a.length!==void 0,c=s?a:[a],l=this._private.cy||this;if(!l.styleEnabled())return this;for(var h=0;h<c.length;h++){for(var d=c[h],p=d._private,b=p.animation.current,m=0;m<b.length;m++){var w=b[m],k=w._private;r&&(k.duration=0)}t&&(p.animation.queue=[]),r||(p.animation.current=[])}return l.notify("draw"),this}}},x3,j8;function pw(){if(j8)return x3;j8=1;var t=Array.isArray;return x3=t,x3}var k3,A8;function Hce(){if(A8)return k3;A8=1;var t=pw(),r=l0(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function c(l,h){if(t(l))return!1;var d=typeof l;return d=="number"||d=="symbol"||d=="boolean"||l==null||r(l)?!0:s.test(l)||!a.test(l)||h!=null&&l in Object(h)}return k3=c,k3}var _3,I8;function zce(){if(I8)return _3;I8=1;var t=AO(),r=c0(),a="[object AsyncFunction]",s="[object Function]",c="[object GeneratorFunction]",l="[object Proxy]";function h(d){if(!r(d))return!1;var p=t(d);return p==s||p==c||p==a||p==l}return _3=h,_3}var E3,L8;function Fce(){if(L8)return E3;L8=1;var t=Jm(),r=t["__core-js_shared__"];return E3=r,E3}var C3,O8;function Uce(){if(O8)return C3;O8=1;var t=Fce(),r=function(){var s=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}();function a(s){return!!r&&r in s}return C3=a,C3}var P3,R8;function Yce(){if(R8)return P3;R8=1;var t=Function.prototype,r=t.toString;function a(s){if(s!=null){try{return r.call(s)}catch{}try{return s+""}catch{}}return""}return P3=a,P3}var S3,D8;function Vce(){if(D8)return S3;D8=1;var t=zce(),r=Uce(),a=c0(),s=Yce(),c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,h=Function.prototype,d=Object.prototype,p=h.toString,b=d.hasOwnProperty,m=RegExp("^"+p.call(b).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w(k){if(!a(k)||r(k))return!1;var P=t(k)?m:l;return P.test(s(k))}return S3=w,S3}var N3,B8;function qce(){if(B8)return N3;B8=1;function t(r,a){return r==null?void 0:r[a]}return N3=t,N3}var T3,G8;function M3(){if(G8)return T3;G8=1;var t=Vce(),r=qce();function a(s,c){var l=r(s,c);return t(l)?l:void 0}return T3=a,T3}var j3,H8;function gw(){if(H8)return j3;H8=1;var t=M3(),r=t(Object,"create");return j3=r,j3}var A3,z8;function Zce(){if(z8)return A3;z8=1;var t=gw();function r(){this.__data__=t?t(null):{},this.size=0}return A3=r,A3}var I3,F8;function $ce(){if(F8)return I3;F8=1;function t(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}return I3=t,I3}var L3,U8;function Kce(){if(U8)return L3;U8=1;var t=gw(),r="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;function c(l){var h=this.__data__;if(t){var d=h[l];return d===r?void 0:d}return s.call(h,l)?h[l]:void 0}return L3=c,L3}var O3,Y8;function Qce(){if(Y8)return O3;Y8=1;var t=gw(),r=Object.prototype,a=r.hasOwnProperty;function s(c){var l=this.__data__;return t?l[c]!==void 0:a.call(l,c)}return O3=s,O3}var R3,V8;function Wce(){if(V8)return R3;V8=1;var t=gw(),r="__lodash_hash_undefined__";function a(s,c){var l=this.__data__;return this.size+=this.has(s)?0:1,l[s]=t&&c===void 0?r:c,this}return R3=a,R3}var D3,q8;function Jce(){if(q8)return D3;q8=1;var t=Zce(),r=$ce(),a=Kce(),s=Qce(),c=Wce();function l(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return l.prototype.clear=t,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,D3=l,D3}var B3,Z8;function Xce(){if(Z8)return B3;Z8=1;function t(){this.__data__=[],this.size=0}return B3=t,B3}var G3,$8;function K8(){if($8)return G3;$8=1;function t(r,a){return r===a||r!==r&&a!==a}return G3=t,G3}var H3,Q8;function bw(){if(Q8)return H3;Q8=1;var t=K8();function r(a,s){for(var c=a.length;c--;)if(t(a[c][0],s))return c;return-1}return H3=r,H3}var z3,W8;function ele(){if(W8)return z3;W8=1;var t=bw(),r=Array.prototype,a=r.splice;function s(c){var l=this.__data__,h=t(l,c);if(h<0)return!1;var d=l.length-1;return h==d?l.pop():a.call(l,h,1),--this.size,!0}return z3=s,z3}var F3,J8;function tle(){if(J8)return F3;J8=1;var t=bw();function r(a){var s=this.__data__,c=t(s,a);return c<0?void 0:s[c][1]}return F3=r,F3}var U3,X8;function nle(){if(X8)return U3;X8=1;var t=bw();function r(a){return t(this.__data__,a)>-1}return U3=r,U3}var Y3,eR;function rle(){if(eR)return Y3;eR=1;var t=bw();function r(a,s){var c=this.__data__,l=t(c,a);return l<0?(++this.size,c.push([a,s])):c[l][1]=s,this}return Y3=r,Y3}var V3,tR;function ile(){if(tR)return V3;tR=1;var t=Xce(),r=ele(),a=tle(),s=nle(),c=rle();function l(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return l.prototype.clear=t,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,V3=l,V3}var q3,nR;function ale(){if(nR)return q3;nR=1;var t=M3(),r=Jm(),a=t(r,"Map");return q3=a,q3}var Z3,rR;function ole(){if(rR)return Z3;rR=1;var t=Jce(),r=ile(),a=ale();function s(){this.size=0,this.__data__={hash:new t,map:new(a||r),string:new t}}return Z3=s,Z3}var $3,iR;function sle(){if(iR)return $3;iR=1;function t(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}return $3=t,$3}var K3,aR;function vw(){if(aR)return K3;aR=1;var t=sle();function r(a,s){var c=a.__data__;return t(s)?c[typeof s=="string"?"string":"hash"]:c.map}return K3=r,K3}var Q3,oR;function ule(){if(oR)return Q3;oR=1;var t=vw();function r(a){var s=t(this,a).delete(a);return this.size-=s?1:0,s}return Q3=r,Q3}var W3,sR;function cle(){if(sR)return W3;sR=1;var t=vw();function r(a){return t(this,a).get(a)}return W3=r,W3}var J3,uR;function lle(){if(uR)return J3;uR=1;var t=vw();function r(a){return t(this,a).has(a)}return J3=r,J3}var X3,cR;function fle(){if(cR)return X3;cR=1;var t=vw();function r(a,s){var c=t(this,a),l=c.size;return c.set(a,s),this.size+=c.size==l?0:1,this}return X3=r,X3}var eP,lR;function hle(){if(lR)return eP;lR=1;var t=ole(),r=ule(),a=cle(),s=lle(),c=fle();function l(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return l.prototype.clear=t,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,eP=l,eP}var tP,fR;function dle(){if(fR)return tP;fR=1;var t=hle(),r="Expected a function";function a(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new TypeError(r);var l=function(){var h=arguments,d=c?c.apply(this,h):h[0],p=l.cache;if(p.has(d))return p.get(d);var b=s.apply(this,h);return l.cache=p.set(d,b)||p,b};return l.cache=new(a.Cache||t),l}return a.Cache=t,tP=a,tP}var nP,hR;function ple(){if(hR)return nP;hR=1;var t=dle(),r=500;function a(s){var c=t(s,function(h){return l.size===r&&l.clear(),h}),l=c.cache;return c}return nP=a,nP}var rP,dR;function pR(){if(dR)return rP;dR=1;var t=ple(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=t(function(c){var l=[];return c.charCodeAt(0)===46&&l.push(""),c.replace(r,function(h,d,p,b){l.push(p?b.replace(a,"$1"):d||h)}),l});return rP=s,rP}var iP,gR;function bR(){if(gR)return iP;gR=1;function t(r,a){for(var s=-1,c=r==null?0:r.length,l=Array(c);++s<c;)l[s]=a(r[s],s,r);return l}return iP=t,iP}var aP,vR;function gle(){if(vR)return aP;vR=1;var t=VC(),r=bR(),a=pw(),s=l0(),c=t?t.prototype:void 0,l=c?c.toString:void 0;function h(d){if(typeof d=="string")return d;if(a(d))return r(d,h)+"";if(s(d))return l?l.call(d):"";var p=d+"";return p=="0"&&1/d==-1/0?"-0":p}return aP=h,aP}var oP,yR;function mR(){if(yR)return oP;yR=1;var t=gle();function r(a){return a==null?"":t(a)}return oP=r,oP}var sP,wR;function xR(){if(wR)return sP;wR=1;var t=pw(),r=Hce(),a=pR(),s=mR();function c(l,h){return t(l)?l:r(l,h)?[l]:a(s(l))}return sP=c,sP}var uP,kR;function cP(){if(kR)return uP;kR=1;var t=l0();function r(a){if(typeof a=="string"||t(a))return a;var s=a+"";return s=="0"&&1/a==-1/0?"-0":s}return uP=r,uP}var lP,_R;function ble(){if(_R)return lP;_R=1;var t=xR(),r=cP();function a(s,c){c=t(c,s);for(var l=0,h=c.length;s!=null&&l<h;)s=s[r(c[l++])];return l&&l==h?s:void 0}return lP=a,lP}var fP,ER;function vle(){if(ER)return fP;ER=1;var t=ble();function r(a,s,c){var l=a==null?void 0:t(a,s);return l===void 0?c:l}return fP=r,fP}var yle=vle(),mle=u0(yle),hP,CR;function wle(){if(CR)return hP;CR=1;var t=M3(),r=function(){try{var a=t(Object,"defineProperty");return a({},"",{}),a}catch{}}();return hP=r,hP}var dP,PR;function xle(){if(PR)return dP;PR=1;var t=wle();function r(a,s,c){s=="__proto__"&&t?t(a,s,{configurable:!0,enumerable:!0,value:c,writable:!0}):a[s]=c}return dP=r,dP}var pP,SR;function kle(){if(SR)return pP;SR=1;var t=xle(),r=K8(),a=Object.prototype,s=a.hasOwnProperty;function c(l,h,d){var p=l[h];(!(s.call(l,h)&&r(p,d))||d===void 0&&!(h in l))&&t(l,h,d)}return pP=c,pP}var gP,NR;function _le(){if(NR)return gP;NR=1;var t=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function a(s,c){var l=typeof s;return c=c??t,!!c&&(l=="number"||l!="symbol"&&r.test(s))&&s>-1&&s%1==0&&s<c}return gP=a,gP}var bP,TR;function Ele(){if(TR)return bP;TR=1;var t=kle(),r=xR(),a=_le(),s=c0(),c=cP();function l(h,d,p,b){if(!s(h))return h;d=r(d,h);for(var m=-1,w=d.length,k=w-1,P=h;P!=null&&++m<w;){var S=c(d[m]),M=p;if(S==="__proto__"||S==="constructor"||S==="prototype")return h;if(m!=k){var L=P[S];M=b?b(L,S,P):void 0,M===void 0&&(M=s(L)?L:a(d[m+1])?[]:{})}t(P,S,M),P=P[S]}return h}return bP=l,bP}var vP,MR;function Cle(){if(MR)return vP;MR=1;var t=Ele();function r(a,s,c){return a==null?a:t(a,s,c)}return vP=r,vP}var Ple=Cle(),Sle=u0(Ple),yP,jR;function Nle(){if(jR)return yP;jR=1;function t(r,a){var s=-1,c=r.length;for(a||(a=Array(c));++s<c;)a[s]=r[s];return a}return yP=t,yP}var mP,AR;function Tle(){if(AR)return mP;AR=1;var t=bR(),r=Nle(),a=pw(),s=l0(),c=pR(),l=cP(),h=mR();function d(p){return a(p)?t(p,l):s(p)?[p]:r(c(h(p)))}return mP=d,mP}var Mle=Tle(),jle=u0(Mle),Ale={data:function(t){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(a){},beforeSet:function(a,s){},onSet:function(a){},canSet:function(a){return!0}};return t=gn({},r,t),function(a,s){var c=t,l=this,h=l.length!==void 0,d=h?l:[l],p=h?l[0]:l;if(cn(a)){var b=a.indexOf(".")!==-1,m=b&&jle(a);if(c.allowGetting&&s===void 0){var w;return p&&(c.beforeGet(p),m&&p._private[c.field][a]===void 0?w=mle(p._private[c.field],m):w=p._private[c.field][a]),w}else if(c.allowSetting&&s!==void 0){var k=!c.immutableKeys[a];if(k){var P=lO({},a,s);c.beforeSet(l,P);for(var S=0,M=d.length;S<M;S++){var L=d[S];c.canSet(L)&&(m&&p._private[c.field][a]===void 0?Sle(L._private[c.field],m,s):L._private[c.field][a]=s)}c.updateStyle&&l.updateStyle(),c.onSet(l),c.settingTriggersEvent&&l[c.triggerFnName](c.settingEvent)}}}else if(c.allowSetting&&_r(a)){var T=a,j,I,R=Object.keys(T);c.beforeSet(l,T);for(var B=0;B<R.length;B++){j=R[B],I=T[j];var F=!c.immutableKeys[j];if(F)for(var z=0;z<d.length;z++){var D=d[z];c.canSet(D)&&(D._private[c.field][j]=I)}}c.updateStyle&&l.updateStyle(),c.onSet(l),c.settingTriggersEvent&&l[c.triggerFnName](c.settingEvent)}else if(c.allowBinding&&Qi(a)){var H=a;l.on(c.bindingEvent,H)}else if(c.allowGetting&&a===void 0){var Q;return p&&(c.beforeGet(p),Q=p._private[c.field]),Q}return l}},removeData:function(t){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return t=gn({},r,t),function(a){var s=t,c=this,l=c.length!==void 0,h=l?c:[c];if(cn(a)){for(var d=a.split(/\s+/),p=d.length,b=0;b<p;b++){var m=d[b];if(!yh(m)){var w=!s.immutableKeys[m];if(w)for(var k=0,P=h.length;k<P;k++)h[k]._private[s.field][m]=void 0}}s.triggerEvent&&c[s.triggerFnName](s.event)}else if(a===void 0){for(var S=0,M=h.length;S<M;S++)for(var L=h[S]._private[s.field],T=Object.keys(L),j=0;j<T.length;j++){var I=T[j],R=!s.immutableKeys[I];R&&(L[I]=void 0)}s.triggerEvent&&c[s.triggerFnName](s.event)}return c}}},Ile={eventAliasesOn:function(t){var r=t;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(a,s){var c=this,l=Array.prototype.slice.call(arguments,0);return new Ig(function(h,d){var p=function(w){c.off.apply(c,m),h(w)},b=l.concat([p]),m=b.concat([]);c.on.apply(c,b)})}}},Hr={};[Gce,Ale,Ile].forEach(function(t){gn(Hr,t)});var Lle={animate:Hr.animate(),animation:Hr.animation(),animated:Hr.animated(),clearQueue:Hr.clearQueue(),delay:Hr.delay(),delayAnimation:Hr.delayAnimation(),stop:Hr.stop()},yw={classes:function(t){var r=this;if(t===void 0){var a=[];return r[0]._private.classes.forEach(function(P){return a.push(P)}),a}else ci(t)||(t=(t||"").match(/\S+/g)||[]);for(var s=[],c=new Pg(t),l=0;l<r.length;l++){for(var h=r[l],d=h._private,p=d.classes,b=!1,m=0;m<t.length;m++){var w=t[m],k=p.has(w);if(!k){b=!0;break}}b||(b=p.size!==t.length),b&&(d.classes=c,s.push(h))}return s.length>0&&this.spawn(s).updateStyle().emit("class"),r},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var r=this[0];return r!=null&&r._private.classes.has(t)},toggleClass:function(t,r){ci(t)||(t=t.match(/\S+/g)||[]);for(var a=this,s=r===void 0,c=[],l=0,h=a.length;l<h;l++)for(var d=a[l],p=d._private.classes,b=!1,m=0;m<t.length;m++){var w=t[m],k=p.has(w),P=!1;r||s&&!k?(p.add(w),P=!0):(!r||s&&k)&&(p.delete(w),P=!0),!b&&P&&(c.push(d),b=!0)}return c.length>0&&this.spawn(c).updateStyle().emit("class"),a},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,r){var a=this;if(r==null)r=250;else if(r===0)return a;return a.addClass(t),setTimeout(function(){a.removeClass(t)},r),a}};yw.className=yw.classNames=yw.classes;var Er={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ka,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Er.variable="(?:[\\w-.]|(?:\\\\"+Er.metaChar+"))+",Er.className="(?:[\\w-]|(?:\\\\"+Er.metaChar+"))+",Er.value=Er.string+"|"+Er.number,Er.id=Er.variable,function(){var t,r,a;for(t=Er.comparatorOp.split("|"),a=0;a<t.length;a++)r=t[a],Er.comparatorOp+="|@"+r;for(t=Er.comparatorOp.split("|"),a=0;a<t.length;a++)r=t[a],!(r.indexOf("!")>=0)&&r!=="="&&(Er.comparatorOp+="|\\!"+r)}();var ri=function(){return{checks:[]}},qt={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},wP=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort(function(t,r){return Ase(t.selector,r.selector)}),Ole=function(){for(var t={},r,a=0;a<wP.length;a++)r=wP[a],t[r.selector]=r.matches;return t}(),Rle=function(t,r){return Ole[t](r)},Dle="("+wP.map(function(t){return t.selector}).join("|")+")",Lg=function(t){return t.replace(new RegExp("\\\\("+Er.metaChar+")","g"),function(r,a){return a})},Ch=function(t,r,a){t[t.length-1]=a},xP=[{name:"group",query:!0,regex:"("+Er.group+")",populate:function(t,r,a){var s=ja(a,1),c=s[0];r.checks.push({type:qt.GROUP,value:c==="*"?c:c+"s"})}},{name:"state",query:!0,regex:Dle,populate:function(t,r,a){var s=ja(a,1),c=s[0];r.checks.push({type:qt.STATE,value:c})}},{name:"id",query:!0,regex:"\\#("+Er.id+")",populate:function(t,r,a){var s=ja(a,1),c=s[0];r.checks.push({type:qt.ID,value:Lg(c)})}},{name:"className",query:!0,regex:"\\.("+Er.className+")",populate:function(t,r,a){var s=ja(a,1),c=s[0];r.checks.push({type:qt.CLASS,value:Lg(c)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+Er.variable+")\\s*\\]",populate:function(t,r,a){var s=ja(a,1),c=s[0];r.checks.push({type:qt.DATA_EXIST,field:Lg(c)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Er.variable+")\\s*("+Er.comparatorOp+")\\s*("+Er.value+")\\s*\\]",populate:function(t,r,a){var s=ja(a,3),c=s[0],l=s[1],h=s[2],d=new RegExp("^"+Er.string+"$").exec(h)!=null;d?h=h.substring(1,h.length-1):h=parseFloat(h),r.checks.push({type:qt.DATA_COMPARE,field:Lg(c),operator:l,value:h})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+Er.boolOp+")\\s*("+Er.variable+")\\s*\\]",populate:function(t,r,a){var s=ja(a,2),c=s[0],l=s[1];r.checks.push({type:qt.DATA_BOOL,field:Lg(l),operator:c})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Er.meta+")\\s*("+Er.comparatorOp+")\\s*("+Er.number+")\\s*\\]\\]",populate:function(t,r,a){var s=ja(a,3),c=s[0],l=s[1],h=s[2];r.checks.push({type:qt.META_COMPARE,field:Lg(c),operator:l,value:parseFloat(h)})}},{name:"nextQuery",separator:!0,regex:Er.separator,populate:function(t,r){var a=t.currentSubject,s=t.edgeCount,c=t.compoundCount,l=t[t.length-1];a!=null&&(l.subject=a,t.currentSubject=null),l.edgeCount=s,l.compoundCount=c,t.edgeCount=0,t.compoundCount=0;var h=t[t.length++]=ri();return h}},{name:"directedEdge",separator:!0,regex:Er.directedEdge,populate:function(t,r){if(t.currentSubject==null){var a=ri(),s=r,c=ri();return a.checks.push({type:qt.DIRECTED_EDGE,source:s,target:c}),Ch(t,r,a),t.edgeCount++,c}else{var l=ri(),h=r,d=ri();return l.checks.push({type:qt.NODE_SOURCE,source:h,target:d}),Ch(t,r,l),t.edgeCount++,d}}},{name:"undirectedEdge",separator:!0,regex:Er.undirectedEdge,populate:function(t,r){if(t.currentSubject==null){var a=ri(),s=r,c=ri();return a.checks.push({type:qt.UNDIRECTED_EDGE,nodes:[s,c]}),Ch(t,r,a),t.edgeCount++,c}else{var l=ri(),h=r,d=ri();return l.checks.push({type:qt.NODE_NEIGHBOR,node:h,neighbor:d}),Ch(t,r,l),d}}},{name:"child",separator:!0,regex:Er.child,populate:function(t,r){if(t.currentSubject==null){var a=ri(),s=ri(),c=t[t.length-1];return a.checks.push({type:qt.CHILD,parent:c,child:s}),Ch(t,r,a),t.compoundCount++,s}else if(t.currentSubject===r){var l=ri(),h=t[t.length-1],d=ri(),p=ri(),b=ri(),m=ri();return l.checks.push({type:qt.COMPOUND_SPLIT,left:h,right:d,subject:p}),p.checks=r.checks,r.checks=[{type:qt.TRUE}],m.checks.push({type:qt.TRUE}),d.checks.push({type:qt.PARENT,parent:m,child:b}),Ch(t,h,l),t.currentSubject=p,t.compoundCount++,b}else{var w=ri(),k=ri(),P=[{type:qt.PARENT,parent:w,child:k}];return w.checks=r.checks,r.checks=P,t.compoundCount++,k}}},{name:"descendant",separator:!0,regex:Er.descendant,populate:function(t,r){if(t.currentSubject==null){var a=ri(),s=ri(),c=t[t.length-1];return a.checks.push({type:qt.DESCENDANT,ancestor:c,descendant:s}),Ch(t,r,a),t.compoundCount++,s}else if(t.currentSubject===r){var l=ri(),h=t[t.length-1],d=ri(),p=ri(),b=ri(),m=ri();return l.checks.push({type:qt.COMPOUND_SPLIT,left:h,right:d,subject:p}),p.checks=r.checks,r.checks=[{type:qt.TRUE}],m.checks.push({type:qt.TRUE}),d.checks.push({type:qt.ANCESTOR,ancestor:m,descendant:b}),Ch(t,h,l),t.currentSubject=p,t.compoundCount++,b}else{var w=ri(),k=ri(),P=[{type:qt.ANCESTOR,ancestor:w,descendant:k}];return w.checks=r.checks,r.checks=P,t.compoundCount++,k}}},{name:"subject",modifier:!0,regex:Er.subject,populate:function(t,r){if(t.currentSubject!=null&&t.currentSubject!==r)return Gr("Redefinition of subject in selector `"+t.toString()+"`"),!1;t.currentSubject=r;var a=t[t.length-1],s=a.checks[0],c=s==null?null:s.type;c===qt.DIRECTED_EDGE?s.type=qt.NODE_TARGET:c===qt.UNDIRECTED_EDGE&&(s.type=qt.NODE_NEIGHBOR,s.node=s.nodes[1],s.neighbor=s.nodes[0],s.nodes=null)}}];xP.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var Ble=function(t){for(var r,a,s,c=0;c<xP.length;c++){var l=xP[c],h=l.name,d=t.match(l.regexObj);if(d!=null){a=d,r=l,s=h;var p=d[0];t=t.substring(p.length);break}}return{expr:r,match:a,name:s,remaining:t}},Gle=function(t){var r=t.match(/^\s+/);if(r){var a=r[0];t=t.substring(a.length)}return t},Hle=function(t){var r=this,a=r.inputText=t,s=r[0]=ri();for(r.length=1,a=Gle(a);;){var c=Ble(a);if(c.expr==null)return Gr("The selector `"+t+"`is invalid"),!1;var l=c.match.slice(1),h=c.expr.populate(r,s,l);if(h===!1)return!1;if(h!=null&&(s=h),a=c.remaining,a.match(/^\s*$/))break}var d=r[r.length-1];r.currentSubject!=null&&(d.subject=r.currentSubject),d.edgeCount=r.edgeCount,d.compoundCount=r.compoundCount;for(var p=0;p<r.length;p++){var b=r[p];if(b.compoundCount>0&&b.edgeCount>0)return Gr("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(b.edgeCount>1)return Gr("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;b.edgeCount===1&&Gr("The selector `"+t+"` 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},zle=function(){if(this.toStringCache!=null)return this.toStringCache;for(var t=function(p){return p??""},r=function(p){return cn(p)?'"'+p+'"':t(p)},a=function(p){return" "+p+" "},s=function(p,b){var m=p.type,w=p.value;switch(m){case qt.GROUP:{var k=t(w);return k.substring(0,k.length-1)}case qt.DATA_COMPARE:{var P=p.field,S=p.operator;return"["+P+a(t(S))+r(w)+"]"}case qt.DATA_BOOL:{var M=p.operator,L=p.field;return"["+t(M)+L+"]"}case qt.DATA_EXIST:{var T=p.field;return"["+T+"]"}case qt.META_COMPARE:{var j=p.operator,I=p.field;return"[["+I+a(t(j))+r(w)+"]]"}case qt.STATE:return w;case qt.ID:return"#"+w;case qt.CLASS:return"."+w;case qt.PARENT:case qt.CHILD:return c(p.parent,b)+a(">")+c(p.child,b);case qt.ANCESTOR:case qt.DESCENDANT:return c(p.ancestor,b)+" "+c(p.descendant,b);case qt.COMPOUND_SPLIT:{var R=c(p.left,b),B=c(p.subject,b),F=c(p.right,b);return R+(R.length>0?" ":"")+B+F}case qt.TRUE:return""}},c=function(p,b){return p.checks.reduce(function(m,w,k){return m+(b===p&&k===0?"$":"")+s(w,b)},"")},l="",h=0;h<this.length;h++){var d=this[h];l+=c(d,d.subject),this.length>1&&h<this.length-1&&(l+=", ")}return this.toStringCache=l,l},Fle={parse:Hle,toString:zle},IR=function(t,r,a){var s,c=cn(t),l=Lt(t),h=cn(a),d,p,b=!1,m=!1,w=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),m=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),b=!0),(c||h||b)&&(d=!c&&!l?"":""+t,p=""+a),b&&(t=d=d.toLowerCase(),a=p=p.toLowerCase()),r){case"*=":s=d.indexOf(p)>=0;break;case"$=":s=d.indexOf(p,d.length-p.length)>=0;break;case"^=":s=d.indexOf(p)===0;break;case"=":s=t===a;break;case">":w=!0,s=t>a;break;case">=":w=!0,s=t>=a;break;case"<":w=!0,s=t<a;break;case"<=":w=!0,s=t<=a;break;default:s=!1;break}return m&&(t!=null||!w)&&(s=!s),s},Ule=function(t,r){switch(r){case"?":return!!t;case"!":return!t;case"^":return t===void 0}},Yle=function(t){return t!==void 0},kP=function(t,r){return t.data(r)},Vle=function(t,r){return t[r]()},fa=[],Ci=function(t,r){return t.checks.every(function(a){return fa[a.type](a,r)})};fa[qt.GROUP]=function(t,r){var a=t.value;return a==="*"||a===r.group()},fa[qt.STATE]=function(t,r){var a=t.value;return Rle(a,r)},fa[qt.ID]=function(t,r){var a=t.value;return r.id()===a},fa[qt.CLASS]=function(t,r){var a=t.value;return r.hasClass(a)},fa[qt.META_COMPARE]=function(t,r){var a=t.field,s=t.operator,c=t.value;return IR(Vle(r,a),s,c)},fa[qt.DATA_COMPARE]=function(t,r){var a=t.field,s=t.operator,c=t.value;return IR(kP(r,a),s,c)},fa[qt.DATA_BOOL]=function(t,r){var a=t.field,s=t.operator;return Ule(kP(r,a),s)},fa[qt.DATA_EXIST]=function(t,r){var a=t.field;return t.operator,Yle(kP(r,a))},fa[qt.UNDIRECTED_EDGE]=function(t,r){var a=t.nodes[0],s=t.nodes[1],c=r.source(),l=r.target();return Ci(a,c)&&Ci(s,l)||Ci(s,c)&&Ci(a,l)},fa[qt.NODE_NEIGHBOR]=function(t,r){return Ci(t.node,r)&&r.neighborhood().some(function(a){return a.isNode()&&Ci(t.neighbor,a)})},fa[qt.DIRECTED_EDGE]=function(t,r){return Ci(t.source,r.source())&&Ci(t.target,r.target())},fa[qt.NODE_SOURCE]=function(t,r){return Ci(t.source,r)&&r.outgoers().some(function(a){return a.isNode()&&Ci(t.target,a)})},fa[qt.NODE_TARGET]=function(t,r){return Ci(t.target,r)&&r.incomers().some(function(a){return a.isNode()&&Ci(t.source,a)})},fa[qt.CHILD]=function(t,r){return Ci(t.child,r)&&Ci(t.parent,r.parent())},fa[qt.PARENT]=function(t,r){return Ci(t.parent,r)&&r.children().some(function(a){return Ci(t.child,a)})},fa[qt.DESCENDANT]=function(t,r){return Ci(t.descendant,r)&&r.ancestors().some(function(a){return Ci(t.ancestor,a)})},fa[qt.ANCESTOR]=function(t,r){return Ci(t.ancestor,r)&&r.descendants().some(function(a){return Ci(t.descendant,a)})},fa[qt.COMPOUND_SPLIT]=function(t,r){return Ci(t.subject,r)&&Ci(t.left,r)&&Ci(t.right,r)},fa[qt.TRUE]=function(){return!0},fa[qt.COLLECTION]=function(t,r){var a=t.value;return a.has(r)},fa[qt.FILTER]=function(t,r){var a=t.value;return a(r)};var qle=function(t){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===qt.ID)return t.getElementById(r[0].checks[0].value).collection();var a=function(s){for(var c=0;c<r.length;c++){var l=r[c];if(Ci(l,s))return!0}return!1};return r.text()==null&&(a=function(){return!0}),t.filter(a)},Zle=function(t){for(var r=this,a=0;a<r.length;a++){var s=r[a];if(Ci(s,t))return!0}return!1},$le={matches:Zle,filter:qle},Ph=function(t){this.inputText=t,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,t==null||cn(t)&&t.match(/^\s*$/)||(du(t)?this.addQuery({checks:[{type:qt.COLLECTION,value:t.collection()}]}):Qi(t)?this.addQuery({checks:[{type:qt.FILTER,value:t}]}):cn(t)?this.parse(t)||(this.invalid=!0):Ri("A selector must be created from a string; found "))},Sh=Ph.prototype;[Fle,$le].forEach(function(t){return gn(Sh,t)}),Sh.text=function(){return this.inputText},Sh.size=function(){return this.length},Sh.eq=function(t){return this[t]},Sh.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},Sh.addQuery=function(t){this[this.length++]=t},Sh.selector=Sh.toString;var Nh={allAre:function(t){var r=new Ph(t);return this.every(function(a){return r.matches(a)})},is:function(t){var r=new Ph(t);return this.some(function(a){return r.matches(a)})},some:function(t,r){for(var a=0;a<this.length;a++){var s=r?t.apply(r,[this[a],a,this]):t(this[a],a,this);if(s)return!0}return!1},every:function(t,r){for(var a=0;a<this.length;a++){var s=r?t.apply(r,[this[a],a,this]):t(this[a],a,this);if(!s)return!1}return!0},same:function(t){if(this===t)return!0;t=this.cy().collection(t);var r=this.length,a=t.length;return r!==a?!1:r===1?this[0]===t[0]:this.every(function(s){return t.hasElementWithId(s.id())})},anySame:function(t){return t=this.cy().collection(t),this.some(function(r){return t.hasElementWithId(r.id())})},allAreNeighbors:function(t){t=this.cy().collection(t);var r=this.neighborhood();return t.every(function(a){return r.hasElementWithId(a.id())})},contains:function(t){t=this.cy().collection(t);var r=this;return t.every(function(a){return r.hasElementWithId(a.id())})}};Nh.allAreNeighbours=Nh.allAreNeighbors,Nh.has=Nh.contains,Nh.equal=Nh.equals=Nh.same;var Iu=function(t,r){return function(a,s,c,l){var h=a,d=this,p;if(h==null?p="":du(h)&&h.length===1&&(p=h.id()),d.length===1&&p){var b=d[0]._private,m=b.traversalCache=b.traversalCache||{},w=m[r]=m[r]||[],k=qd(p),P=w[k];return P||(w[k]=t.call(d,a,s,c,l))}else return t.call(d,a,s,c,l)}},Og={parent:function(t){var r=[];if(this.length===1){var a=this[0]._private.parent;if(a)return a}for(var s=0;s<this.length;s++){var c=this[s],l=c._private.parent;l&&r.push(l)}return this.spawn(r,!0).filter(t)},parents:function(t){for(var r=[],a=this.parent();a.nonempty();){for(var s=0;s<a.length;s++){var c=a[s];r.push(c)}a=a.parent()}return this.spawn(r,!0).filter(t)},commonAncestors:function(t){for(var r,a=0;a<this.length;a++){var s=this[a],c=s.parents();r=r||c,r=r.intersect(c)}return r.filter(t)},orphans:function(t){return this.stdFilter(function(r){return r.isOrphan()}).filter(t)},nonorphans:function(t){return this.stdFilter(function(r){return r.isChild()}).filter(t)},children:Iu(function(t){for(var r=[],a=0;a<this.length;a++)for(var s=this[a],c=s._private.children,l=0;l<c.length;l++)r.push(c[l]);return this.spawn(r,!0).filter(t)},"children"),siblings:function(t){return this.parent().children().not(this).filter(t)},isParent:function(){var t=this[0];if(t)return t.isNode()&&t._private.children.length!==0},isChildless:function(){var t=this[0];if(t)return t.isNode()&&t._private.children.length===0},isChild:function(){var t=this[0];if(t)return t.isNode()&&t._private.parent!=null},isOrphan:function(){var t=this[0];if(t)return t.isNode()&&t._private.parent==null},descendants:function(t){var r=[];function a(s){for(var c=0;c<s.length;c++){var l=s[c];r.push(l),l.children().nonempty()&&a(l.children())}}return a(this.children()),this.spawn(r,!0).filter(t)}};function _P(t,r,a,s){for(var c=[],l=new Pg,h=t.cy(),d=h.hasCompoundNodes(),p=0;p<t.length;p++){var b=t[p];a?c.push(b):d&&s(c,l,b)}for(;c.length>0;){var m=c.shift();r(m),l.add(m.id()),d&&s(c,l,m)}return t}function LR(t,r,a){if(a.isParent())for(var s=a._private.children,c=0;c<s.length;c++){var l=s[c];r.has(l.id())||t.push(l)}}Og.forEachDown=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return _P(this,t,r,LR)};function OR(t,r,a){if(a.isChild()){var s=a._private.parent;r.has(s.id())||t.push(s)}}Og.forEachUp=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return _P(this,t,r,OR)};function Kle(t,r,a){OR(t,r,a),LR(t,r,a)}Og.forEachUpAndDown=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return _P(this,t,r,Kle)},Og.ancestors=Og.parents;var w0,RR;w0=RR={data:Hr.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:Hr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Hr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Hr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Hr.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Hr.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}},w0.attr=w0.data,w0.removeAttr=w0.removeData;var Qle=RR,mw={};function EP(t){return function(r){var a=this;if(r===void 0&&(r=!0),a.length!==0)if(a.isNode()&&!a.removed()){for(var s=0,c=a[0],l=c._private.edges,h=0;h<l.length;h++){var d=l[h];!r&&d.isLoop()||(s+=t(c,d))}return s}else return}}gn(mw,{degree:EP(function(t,r){return r.source().same(r.target())?2:1}),indegree:EP(function(t,r){return r.target().same(t)?1:0}),outdegree:EP(function(t,r){return r.source().same(t)?1:0})});function Rg(t,r){return function(a){for(var s,c=this.nodes(),l=0;l<c.length;l++){var h=c[l],d=h[t](a);d!==void 0&&(s===void 0||r(d,s))&&(s=d)}return s}}gn(mw,{minDegree:Rg("degree",function(t,r){return t<r}),maxDegree:Rg("degree",function(t,r){return t>r}),minIndegree:Rg("indegree",function(t,r){return t<r}),maxIndegree:Rg("indegree",function(t,r){return t>r}),minOutdegree:Rg("outdegree",function(t,r){return t<r}),maxOutdegree:Rg("outdegree",function(t,r){return t>r})}),gn(mw,{totalDegree:function(t){for(var r=0,a=this.nodes(),s=0;s<a.length;s++)r+=a[s].degree(t);return r}});var hc,DR,BR=function(t,r,a){for(var s=0;s<t.length;s++){var c=t[s];if(!c.locked()){var l=c._private.position,h={x:r.x!=null?r.x-l.x:0,y:r.y!=null?r.y-l.y:0};c.isParent()&&!(h.x===0&&h.y===0)&&c.children().shift(h,a),c.dirtyBoundingBoxCache()}}},GR={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(t){t.updateCompoundBounds()},beforeSet:function(t,r){BR(t,r,!1)},onSet:function(t){t.dirtyCompoundBoundsCache()},canSet:function(t){return!t.locked()}};hc=DR={position:Hr.data(GR),silentPosition:Hr.data(gn({},GR,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(t,r){BR(t,r,!0)},onSet:function(t){t.dirtyCompoundBoundsCache()}})),positions:function(t,r){if(_r(t))r?this.silentPosition(t):this.position(t);else if(Qi(t)){var a=t,s=this.cy();s.startBatch();for(var c=0;c<this.length;c++){var l=this[c],h=void 0;(h=a(l,c))&&(r?l.silentPosition(h):l.position(h))}s.endBatch()}return this},silentPositions:function(t){return this.positions(t,!0)},shift:function(t,r,a){var s;if(_r(t)?(s={x:Lt(t.x)?t.x:0,y:Lt(t.y)?t.y:0},a=r):cn(t)&&Lt(r)&&(s={x:0,y:0},s[t]=r),s!=null){var c=this.cy();c.startBatch();for(var l=0;l<this.length;l++){var h=this[l];if(!(c.hasCompoundNodes()&&h.isChild()&&h.ancestors().anySame(this))){var d=h.position(),p={x:d.x+s.x,y:d.y+s.y};a?h.silentPosition(p):h.position(p)}}c.endBatch()}return this},silentShift:function(t,r){return _r(t)?this.shift(t,!0):cn(t)&&Lt(r)&&this.shift(t,r,!0),this},renderedPosition:function(t,r){var a=this[0],s=this.cy(),c=s.zoom(),l=s.pan(),h=_r(t)?t:void 0,d=h!==void 0||r!==void 0&&cn(t);if(a&&a.isNode())if(d)for(var p=0;p<this.length;p++){var b=this[p];r!==void 0?b.position(t,(r-l[t])/c):h!==void 0&&b.position(JO(h,c,l))}else{var m=a.position();return h=rw(m,c,l),t===void 0?h:h[t]}else if(!d)return;return this},relativePosition:function(t,r){var a=this[0],s=this.cy(),c=_r(t)?t:void 0,l=c!==void 0||r!==void 0&&cn(t),h=s.hasCompoundNodes();if(a&&a.isNode())if(l)for(var d=0;d<this.length;d++){var p=this[d],b=h?p.parent():null,m=b&&b.length>0,w=m;m&&(b=b[0]);var k=w?b.position():{x:0,y:0};r!==void 0?p.position(t,r+k[t]):c!==void 0&&p.position({x:c.x+k.x,y:c.y+k.y})}else{var P=a.position(),S=h?a.parent():null,M=S&&S.length>0,L=M;M&&(S=S[0]);var T=L?S.position():{x:0,y:0};return c={x:P.x-T.x,y:P.y-T.y},t===void 0?c:c[t]}else if(!l)return;return this}},hc.modelPosition=hc.point=hc.position,hc.modelPositions=hc.points=hc.positions,hc.renderedPoint=hc.renderedPosition,hc.relativePoint=hc.relativePosition;var Wle=DR,Dg,Th;Dg=Th={},Th.renderedBoundingBox=function(t){var r=this.boundingBox(t),a=this.cy(),s=a.zoom(),c=a.pan(),l=r.x1*s+c.x,h=r.x2*s+c.x,d=r.y1*s+c.y,p=r.y2*s+c.y;return{x1:l,x2:h,y1:d,y2:p,w:h-l,h:p-d}},Th.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.cy();return!r.styleEnabled()||!r.hasCompoundNodes()?this:(this.forEachUp(function(a){if(a.isParent()){var s=a._private;s.compoundBoundsClean=!1,s.bbCache=null,t||a.emitAndNotify("bounds")}}),this)},Th.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.cy();if(!r.styleEnabled()||!r.hasCompoundNodes())return this;if(!t&&r.batching())return this;function a(h){if(!h.isParent())return;var d=h._private,p=h.children(),b=h.pstyle("compound-sizing-wrt-labels").value==="include",m={width:{val:h.pstyle("min-width").pfValue,left:h.pstyle("min-width-bias-left"),right:h.pstyle("min-width-bias-right")},height:{val:h.pstyle("min-height").pfValue,top:h.pstyle("min-height-bias-top"),bottom:h.pstyle("min-height-bias-bottom")}},w=p.boundingBox({includeLabels:b,includeOverlays:!1,useCache:!1}),k=d.position;(w.w===0||w.h===0)&&(w={w:h.pstyle("width").pfValue,h:h.pstyle("height").pfValue},w.x1=k.x-w.w/2,w.x2=k.x+w.w/2,w.y1=k.y-w.h/2,w.y2=k.y+w.h/2);function P(H,Q,q){var Z=0,J=0,K=Q+q;return H>0&&K>0&&(Z=Q/K*H,J=q/K*H),{biasDiff:Z,biasComplementDiff:J}}function S(H,Q,q,Z){if(q.units==="%")switch(Z){case"width":return H>0?q.pfValue*H:0;case"height":return Q>0?q.pfValue*Q:0;case"average":return H>0&&Q>0?q.pfValue*(H+Q)/2:0;case"min":return H>0&&Q>0?H>Q?q.pfValue*Q:q.pfValue*H:0;case"max":return H>0&&Q>0?H>Q?q.pfValue*H:q.pfValue*Q:0;default:return 0}else return q.units==="px"?q.pfValue:0}var M=m.width.left.value;m.width.left.units==="px"&&m.width.val>0&&(M=M*100/m.width.val);var L=m.width.right.value;m.width.right.units==="px"&&m.width.val>0&&(L=L*100/m.width.val);var T=m.height.top.value;m.height.top.units==="px"&&m.height.val>0&&(T=T*100/m.height.val);var j=m.height.bottom.value;m.height.bottom.units==="px"&&m.height.val>0&&(j=j*100/m.height.val);var I=P(m.width.val-w.w,M,L),R=I.biasDiff,B=I.biasComplementDiff,F=P(m.height.val-w.h,T,j),z=F.biasDiff,D=F.biasComplementDiff;d.autoPadding=S(w.w,w.h,h.pstyle("padding"),h.pstyle("padding-relative-to").value),d.autoWidth=Math.max(w.w,m.width.val),k.x=(-R+w.x1+w.x2+B)/2,d.autoHeight=Math.max(w.h,m.height.val),k.y=(-z+w.y1+w.y2+D)/2}for(var s=0;s<this.length;s++){var c=this[s],l=c._private;(!l.compoundBoundsClean||t)&&(a(c),r.batching()||(l.compoundBoundsClean=!0))}return this};var Lu=function(t){return t===1/0||t===-1/0?0:t},dc=function(t,r,a,s,c){s-r===0||c-a===0||r==null||a==null||s==null||c==null||(t.x1=r<t.x1?r:t.x1,t.x2=s>t.x2?s:t.x2,t.y1=a<t.y1?a:t.y1,t.y2=c>t.y2?c:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},Mh=function(t,r){return r==null?t:dc(t,r.x1,r.y1,r.x2,r.y2)},x0=function(t,r,a){return Gs(t,r,a)},ww=function(t,r,a){if(!r.cy().headless()){var s=r._private,c=s.rstyle,l=c.arrowWidth/2,h=r.pstyle(a+"-arrow-shape").value,d,p;if(h!=="none"){a==="source"?(d=c.srcX,p=c.srcY):a==="target"?(d=c.tgtX,p=c.tgtY):(d=c.midX,p=c.midY);var b=s.arrowBounds=s.arrowBounds||{},m=b[a]=b[a]||{};m.x1=d-l,m.y1=p-l,m.x2=d+l,m.y2=p+l,m.w=m.x2-m.x1,m.h=m.y2-m.y1,aw(m,1),dc(t,m.x1,m.y1,m.x2,m.y2)}}},CP=function(t,r,a){if(!r.cy().headless()){var s;a?s=a+"-":s="";var c=r._private,l=c.rstyle,h=r.pstyle(s+"label").strValue;if(h){var d=r.pstyle("text-halign"),p=r.pstyle("text-valign"),b=x0(l,"labelWidth",a),m=x0(l,"labelHeight",a),w=x0(l,"labelX",a),k=x0(l,"labelY",a),P=r.pstyle(s+"text-margin-x").pfValue,S=r.pstyle(s+"text-margin-y").pfValue,M=r.isEdge(),L=r.pstyle(s+"text-rotation"),T=r.pstyle("text-outline-width").pfValue,j=r.pstyle("text-border-width").pfValue,I=j/2,R=r.pstyle("text-background-padding").pfValue,B=2,F=m,z=b,D=z/2,H=F/2,Q,q,Z,J;if(M)Q=w-D,q=w+D,Z=k-H,J=k+H;else{switch(d.value){case"left":Q=w-z,q=w;break;case"center":Q=w-D,q=w+D;break;case"right":Q=w,q=w+z;break}switch(p.value){case"top":Z=k-F,J=k;break;case"center":Z=k-H,J=k+H;break;case"bottom":Z=k,J=k+F;break}}var K=P-Math.max(T,I)-R-B,ae=P+Math.max(T,I)+R+B,se=S-Math.max(T,I)-R-B,le=S+Math.max(T,I)+R+B;Q+=K,q+=ae,Z+=se,J+=le;var he=a||"main",fe=c.labelBounds,pe=fe[he]=fe[he]||{};pe.x1=Q,pe.y1=Z,pe.x2=q,pe.y2=J,pe.w=q-Q,pe.h=J-Z,pe.leftPad=K,pe.rightPad=ae,pe.topPad=se,pe.botPad=le;var me=M&&L.strValue==="autorotate",Te=L.pfValue!=null&&L.pfValue!==0;if(me||Te){var Oe=me?x0(c.rstyle,"labelAngle",a):L.pfValue,ge=Math.cos(Oe),xe=Math.sin(Oe),Se=(Q+q)/2,Le=(Z+J)/2;if(!M){switch(d.value){case"left":Se=q;break;case"right":Se=Q;break}switch(p.value){case"top":Le=J;break;case"bottom":Le=Z;break}}var De=function(ft,ze){return ft=ft-Se,ze=ze-Le,{x:ft*ge-ze*xe+Se,y:ft*xe+ze*ge+Le}},Ne=De(Q,Z),Me=De(Q,J),ke=De(q,Z),He=De(q,J);Q=Math.min(Ne.x,Me.x,ke.x,He.x),q=Math.max(Ne.x,Me.x,ke.x,He.x),Z=Math.min(Ne.y,Me.y,ke.y,He.y),J=Math.max(Ne.y,Me.y,ke.y,He.y)}var Qe=he+"Rot",it=fe[Qe]=fe[Qe]||{};it.x1=Q,it.y1=Z,it.x2=q,it.y2=J,it.w=q-Q,it.h=J-Z,dc(t,Q,Z,q,J),dc(c.labelBounds.all,Q,Z,q,J)}return t}},HR=function(t,r){if(!r.cy().headless()){var a=r.pstyle("outline-opacity").value,s=r.pstyle("outline-width").value,c=r.pstyle("outline-offset").value,l=s+c;zR(t,r,a,l,"outside",l/2)}},zR=function(t,r,a,s,c,l){if(!(a===0||s<=0||c==="inside")){var h=r.cy(),d=r.pstyle("shape").value,p=h.renderer().nodeShapes[d],b=r.position(),m=b.x,w=b.y,k=r.width(),P=r.height();if(p.hasMiterBounds){c==="center"&&(s/=2);var S=p.miterBounds(m,w,k,P,s);Mh(t,S)}else l!=null&&l>0&&ow(t,[l,l,l,l])}},Jle=function(t,r){if(!r.cy().headless()){var a=r.pstyle("border-opacity").value,s=r.pstyle("border-width").pfValue,c=r.pstyle("border-position").value;zR(t,r,a,s,c)}},Xle=function(t,r){var a=t._private.cy,s=a.styleEnabled(),c=a.headless(),l=ss(),h=t._private,d=t.isNode(),p=t.isEdge(),b,m,w,k,P,S,M=h.rstyle,L=d&&s?t.pstyle("bounds-expansion").pfValue:[0],T=function(it){return it.pstyle("display").value!=="none"},j=!s||T(t)&&(!p||T(t.source())&&T(t.target()));if(j){var I=0,R=0;s&&r.includeOverlays&&(I=t.pstyle("overlay-opacity").value,I!==0&&(R=t.pstyle("overlay-padding").value));var B=0,F=0;s&&r.includeUnderlays&&(B=t.pstyle("underlay-opacity").value,B!==0&&(F=t.pstyle("underlay-padding").value));var z=Math.max(R,F),D=0,H=0;if(s&&(D=t.pstyle("width").pfValue,H=D/2),d&&r.includeNodes){var Q=t.position();P=Q.x,S=Q.y;var q=t.outerWidth(),Z=q/2,J=t.outerHeight(),K=J/2;b=P-Z,m=P+Z,w=S-K,k=S+K,dc(l,b,w,m,k),s&&HR(l,t),s&&r.includeOutlines&&!c&&HR(l,t),s&&Jle(l,t)}else if(p&&r.includeEdges)if(s&&!c){var ae=t.pstyle("curve-style").strValue;if(b=Math.min(M.srcX,M.midX,M.tgtX),m=Math.max(M.srcX,M.midX,M.tgtX),w=Math.min(M.srcY,M.midY,M.tgtY),k=Math.max(M.srcY,M.midY,M.tgtY),b-=H,m+=H,w-=H,k+=H,dc(l,b,w,m,k),ae==="haystack"){var se=M.haystackPts;if(se&&se.length===2){if(b=se[0].x,w=se[0].y,m=se[1].x,k=se[1].y,b>m){var le=b;b=m,m=le}if(w>k){var he=w;w=k,k=he}dc(l,b-H,w-H,m+H,k+H)}}else if(ae==="bezier"||ae==="unbundled-bezier"||mh(ae,"segments")||mh(ae,"taxi")){var fe;switch(ae){case"bezier":case"unbundled-bezier":fe=M.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":fe=M.linePts;break}if(fe!=null)for(var pe=0;pe<fe.length;pe++){var me=fe[pe];b=me.x-H,m=me.x+H,w=me.y-H,k=me.y+H,dc(l,b,w,m,k)}}}else{var Te=t.source(),Oe=Te.position(),ge=t.target(),xe=ge.position();if(b=Oe.x,m=xe.x,w=Oe.y,k=xe.y,b>m){var Se=b;b=m,m=Se}if(w>k){var Le=w;w=k,k=Le}b-=H,m+=H,w-=H,k+=H,dc(l,b,w,m,k)}if(s&&r.includeEdges&&p&&(ww(l,t,"mid-source"),ww(l,t,"mid-target"),ww(l,t,"source"),ww(l,t,"target")),s){var De=t.pstyle("ghost").value==="yes";if(De){var Ne=t.pstyle("ghost-offset-x").pfValue,Me=t.pstyle("ghost-offset-y").pfValue;dc(l,l.x1+Ne,l.y1+Me,l.x2+Ne,l.y2+Me)}}var ke=h.bodyBounds=h.bodyBounds||{};e8(ke,l),ow(ke,L),aw(ke,1),s&&(b=l.x1,m=l.x2,w=l.y1,k=l.y2,dc(l,b-z,w-z,m+z,k+z));var He=h.overlayBounds=h.overlayBounds||{};e8(He,l),ow(He,L),aw(He,1);var Qe=h.labelBounds=h.labelBounds||{};Qe.all!=null?Lue(Qe.all):Qe.all=ss(),s&&r.includeLabels&&(r.includeMainLabels&&CP(l,t,null),p&&(r.includeSourceLabels&&CP(l,t,"source"),r.includeTargetLabels&&CP(l,t,"target")))}return l.x1=Lu(l.x1),l.y1=Lu(l.y1),l.x2=Lu(l.x2),l.y2=Lu(l.y2),l.w=Lu(l.x2-l.x1),l.h=Lu(l.y2-l.y1),l.w>0&&l.h>0&&j&&(ow(l,L),aw(l,1)),l},FR=function(t){var r=0,a=function(c){return(c?1:0)<<r++},s=0;return s+=a(t.incudeNodes),s+=a(t.includeEdges),s+=a(t.includeLabels),s+=a(t.includeMainLabels),s+=a(t.includeSourceLabels),s+=a(t.includeTargetLabels),s+=a(t.includeOverlays),s+=a(t.includeOutlines),s},UR=function(t){var r=function(l){return Math.round(l)};if(t.isEdge()){var a=t.source().position(),s=t.target().position();return HO([r(a.x),r(a.y),r(s.x),r(s.y)])}else{var c=t.position();return HO([r(c.x),r(c.y)])}},YR=function(t,r){var a=t._private,s,c=t.isEdge(),l=r==null?VR:FR(r),h=l===VR;if(a.bbCache==null?(s=Xle(t,k0),a.bbCache=s,a.bbCachePosKey=UR(t)):s=a.bbCache,!h){var d=t.isNode();s=ss(),(r.includeNodes&&d||r.includeEdges&&!d)&&(r.includeOverlays?Mh(s,a.overlayBounds):Mh(s,a.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!c||r.includeSourceLabels&&r.includeTargetLabels)?Mh(s,a.labelBounds.all):(r.includeMainLabels&&Mh(s,a.labelBounds.mainRot),r.includeSourceLabels&&Mh(s,a.labelBounds.sourceRot),r.includeTargetLabels&&Mh(s,a.labelBounds.targetRot))),s.w=s.x2-s.x1,s.h=s.y2-s.y1}return s},k0={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},VR=FR(k0),qR=To(k0);Th.boundingBox=function(t){var r,a=t===void 0||t.useCache===void 0||t.useCache===!0,s=Eg(function(m){var w=m._private;return w.bbCache==null||w.styleDirty||w.bbCachePosKey!==UR(m)},function(m){return m.id()});if(a&&this.length===1&&!s(this[0]))t===void 0?t=k0:t=qR(t),r=YR(this[0],t);else{r=ss(),t=t||k0;var c=qR(t),l=this,h=l.cy(),d=h.styleEnabled();this.edges().forEach(s),this.nodes().forEach(s),d&&this.recalculateRenderedStyle(a),this.updateCompoundBounds(!a);for(var p=0;p<l.length;p++){var b=l[p];s(b)&&b.dirtyBoundingBoxCache(),Mh(r,YR(b,c))}}return r.x1=Lu(r.x1),r.y1=Lu(r.y1),r.x2=Lu(r.x2),r.y2=Lu(r.y2),r.w=Lu(r.x2-r.x1),r.h=Lu(r.y2-r.y1),r},Th.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var r=this[t]._private;r.bbCache=null,r.bbCachePosKey=null,r.bodyBounds=null,r.overlayBounds=null,r.labelBounds.all=null,r.labelBounds.source=null,r.labelBounds.target=null,r.labelBounds.main=null,r.labelBounds.sourceRot=null,r.labelBounds.targetRot=null,r.labelBounds.mainRot=null,r.arrowBounds.source=null,r.arrowBounds.target=null,r.arrowBounds["mid-source"]=null,r.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},Th.boundingBoxAt=function(t){var r=this.nodes(),a=this.cy(),s=a.hasCompoundNodes(),c=a.collection();if(s&&(c=r.filter(function(b){return b.isParent()}),r=r.not(c)),_r(t)){var l=t;t=function(){return l}}var h=function(b,m){return b._private.bbAtOldPos=t(b,m)},d=function(b){return b._private.bbAtOldPos};a.startBatch(),r.forEach(h).silentPositions(t),s&&(c.dirtyCompoundBoundsCache(),c.dirtyBoundingBoxCache(),c.updateCompoundBounds(!0));var p=Iue(this.boundingBox({useCache:!1}));return r.silentPositions(d),s&&(c.dirtyCompoundBoundsCache(),c.dirtyBoundingBoxCache(),c.updateCompoundBounds(!0)),a.endBatch(),p},Dg.boundingbox=Dg.bb=Dg.boundingBox,Dg.renderedBoundingbox=Dg.renderedBoundingBox;var efe=Th,_0,E0;_0=E0={};var ZR=function(t){t.uppercaseName=vO(t.name),t.autoName="auto"+t.uppercaseName,t.labelName="label"+t.uppercaseName,t.outerName="outer"+t.uppercaseName,t.uppercaseOuterName=vO(t.outerName),_0[t.name]=function(){var r=this[0],a=r._private,s=a.cy,c=s._private.styleEnabled;if(r)if(c){if(r.isParent())return r.updateCompoundBounds(),a[t.autoName]||0;var l=r.pstyle(t.name);switch(l.strValue){case"label":return r.recalculateRenderedStyle(),a.rstyle[t.labelName]||0;default:return l.pfValue}}else return 1},_0["outer"+t.uppercaseName]=function(){var r=this[0],a=r._private,s=a.cy,c=s._private.styleEnabled;if(r)if(c){var l=r[t.name](),h=r.pstyle("border-position").value,d;h==="center"?d=r.pstyle("border-width").pfValue:h==="outside"?d=2*r.pstyle("border-width").pfValue:d=0;var p=2*r.padding();return l+d+p}else return 1},_0["rendered"+t.uppercaseName]=function(){var r=this[0];if(r){var a=r[t.name]();return a*this.cy().zoom()}},_0["rendered"+t.uppercaseOuterName]=function(){var r=this[0];if(r){var a=r[t.outerName]();return a*this.cy().zoom()}}};ZR({name:"width"}),ZR({name:"height"}),E0.padding=function(){var t=this[0],r=t._private;return t.isParent()?(t.updateCompoundBounds(),r.autoPadding!==void 0?r.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue},E0.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},E0.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var tfe=E0,nfe=function(t,r){if(t.isEdge()&&t.takesUpSpace())return r(t)},rfe=function(t,r){if(t.isEdge()&&t.takesUpSpace()){var a=t.cy();return rw(r(t),a.zoom(),a.pan())}},ife=function(t,r){if(t.isEdge()&&t.takesUpSpace()){var a=t.cy(),s=a.pan(),c=a.zoom();return r(t).map(function(l){return rw(l,c,s)})}},afe=function(t){return t.renderer().getControlPoints(t)},ofe=function(t){return t.renderer().getSegmentPoints(t)},sfe=function(t){return t.renderer().getSourceEndpoint(t)},ufe=function(t){return t.renderer().getTargetEndpoint(t)},cfe=function(t){return t.renderer().getEdgeMidpoint(t)},$R={controlPoints:{get:afe,mult:!0},segmentPoints:{get:ofe,mult:!0},sourceEndpoint:{get:sfe},targetEndpoint:{get:ufe},midpoint:{get:cfe}},lfe=function(t){return"rendered"+t[0].toUpperCase()+t.substr(1)},ffe=Object.keys($R).reduce(function(t,r){var a=$R[r],s=lfe(r);return t[r]=function(){return nfe(this,a.get)},a.mult?t[s]=function(){return ife(this,a.get)}:t[s]=function(){return rfe(this,a.get)},t},{}),hfe=gn({},Wle,efe,tfe,ffe);/*!
|
|
38
|
+
Event object based on jQuery events, MIT license
|
|
39
|
+
|
|
40
|
+
https://jquery.org/license/
|
|
41
|
+
https://tldrlegal.com/license/mit-license
|
|
42
|
+
https://github.com/jquery/jquery/blob/master/src/event.js
|
|
43
|
+
*/var KR=function(t,r){this.recycle(t,r)};function C0(){return!1}function xw(){return!0}KR.prototype={instanceString:function(){return"event"},recycle:function(t,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=C0,t!=null&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?xw:C0):t!=null&&t.type?r=t:this.type=t,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,s=this.cy.zoom(),c=this.cy.pan();this.renderedPosition={x:a.x*s+c.x,y:a.y*s+c.y}}this.timeStamp=t&&t.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=xw;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.isPropagationStopped=xw;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=xw,this.stopPropagation()},isDefaultPrevented:C0,isPropagationStopped:C0,isImmediatePropagationStopped:C0};var QR=/^([^.]+)(\.(?:[^.]+))?$/,dfe=".*",WR={qualifierCompare:function(t,r){return t===r},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(t){return t},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},JR=Object.keys(WR),pfe={};function kw(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pfe,r=arguments.length>1?arguments[1]:void 0,a=0;a<JR.length;a++){var s=JR[a];this[s]=t[s]||WR[s]}this.context=r||this.context,this.listeners=[],this.emitting=0}var jh=kw.prototype,XR=function(t,r,a,s,c,l,h){Qi(s)&&(c=s,s=null),h&&(l==null?l=h:l=gn({},l,h));for(var d=ci(a)?a:a.split(/\s+/),p=0;p<d.length;p++){var b=d[p];if(!yh(b)){var m=b.match(QR);if(m){var w=m[1],k=m[2]?m[2]:null,P=r(t,b,w,k,s,c,l);if(P===!1)break}}}},eD=function(t,r){return t.addEventFields(t.context,r),new KR(r.type,r)},gfe=function(t,r,a){if(xse(a)){r(t,a);return}else if(_r(a)){r(t,eD(t,a));return}for(var s=ci(a)?a:a.split(/\s+/),c=0;c<s.length;c++){var l=s[c];if(!yh(l)){var h=l.match(QR);if(h){var d=h[1],p=h[2]?h[2]:null,b=eD(t,{type:d,namespace:p,target:t.context});r(t,b)}}}};jh.on=jh.addListener=function(t,r,a,s,c){return XR(this,function(l,h,d,p,b,m,w){Qi(m)&&l.listeners.push({event:h,callback:m,type:d,namespace:p,qualifier:b,conf:w})},t,r,a,s,c),this},jh.one=function(t,r,a,s){return this.on(t,r,a,s,{one:!0})},jh.removeListener=jh.off=function(t,r,a,s){var c=this;this.emitting!==0&&(this.listeners=rue(this.listeners));for(var l=this.listeners,h=function(p){var b=l[p];XR(c,function(m,w,k,P,S,M){if((b.type===k||t==="*")&&(!P&&b.namespace!==".*"||b.namespace===P)&&(!S||m.qualifierCompare(b.qualifier,S))&&(!M||b.callback===M))return l.splice(p,1),!1},t,r,a,s)},d=l.length-1;d>=0;d--)h(d);return this},jh.removeAllListeners=function(){return this.removeListener("*")},jh.emit=jh.trigger=function(t,r,a){var s=this.listeners,c=s.length;return this.emitting++,ci(r)||(r=[r]),gfe(this,function(l,h){a!=null&&(s=[{event:h.event,type:h.type,namespace:h.namespace,callback:a}],c=s.length);for(var d=function(){var b=s[p];if(b.type===h.type&&(!b.namespace||b.namespace===h.namespace||b.namespace===dfe)&&l.eventMatches(l.context,b,h)){var m=[h];r!=null&&aue(m,r),l.beforeEmit(l.context,b,h),b.conf&&b.conf.one&&(l.listeners=l.listeners.filter(function(P){return P!==b}));var w=l.callbackContext(l.context,b,h),k=b.callback.apply(w,m);l.afterEmit(l.context,b,h),k===!1&&(h.stopPropagation(),h.preventDefault())}},p=0;p<c;p++)d();l.bubble(l.context)&&!h.isPropagationStopped()&&l.parent(l.context).emit(h,r)},t),this.emitting--,this};var bfe={qualifierCompare:function(t,r){return t==null||r==null?t==null&&r==null:t.sameText(r)},eventMatches:function(t,r,a){var s=r.qualifier;return s!=null?t!==a.target&&s0(a.target)&&s.matches(a.target):!0},addEventFields:function(t,r){r.cy=t.cy(),r.target=t},callbackContext:function(t,r,a){return r.qualifier!=null?a.target:t},beforeEmit:function(t,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},bubble:function(){return!0},parent:function(t){return t.isChild()?t.parent():t.cy()}},_w=function(t){return cn(t)?new Ph(t):t},tD={createEmitter:function(){for(var t=0;t<this.length;t++){var r=this[t],a=r._private;a.emitter||(a.emitter=new kw(bfe,r))}return this},emitter:function(){return this._private.emitter},on:function(t,r,a){for(var s=_w(r),c=0;c<this.length;c++){var l=this[c];l.emitter().on(t,s,a)}return this},removeListener:function(t,r,a){for(var s=_w(r),c=0;c<this.length;c++){var l=this[c];l.emitter().removeListener(t,s,a)}return this},removeAllListeners:function(){for(var t=0;t<this.length;t++){var r=this[t];r.emitter().removeAllListeners()}return this},one:function(t,r,a){for(var s=_w(r),c=0;c<this.length;c++){var l=this[c];l.emitter().one(t,s,a)}return this},once:function(t,r,a){for(var s=_w(r),c=0;c<this.length;c++){var l=this[c];l.emitter().on(t,s,a,{once:!0,onceCollection:this})}},emit:function(t,r){for(var a=0;a<this.length;a++){var s=this[a];s.emitter().emit(t,r)}return this},emitAndNotify:function(t,r){if(this.length!==0)return this.cy().notify(t,this),this.emit(t,r),this}};Hr.eventAliasesOn(tD);var nD={nodes:function(t){return this.filter(function(r){return r.isNode()}).filter(t)},edges:function(t){return this.filter(function(r){return r.isEdge()}).filter(t)},byGroup:function(){for(var t=this.spawn(),r=this.spawn(),a=0;a<this.length;a++){var s=this[a];s.isNode()?t.push(s):r.push(s)}return{nodes:t,edges:r}},filter:function(t,r){if(t===void 0)return this;if(cn(t)||du(t))return new Ph(t).filter(this);if(Qi(t)){for(var a=this.spawn(),s=this,c=0;c<s.length;c++){var l=s[c],h=r?t.apply(r,[l,c,s]):t(l,c,s);h&&a.push(l)}return a}return this.spawn()},not:function(t){if(t){cn(t)&&(t=this.filter(t));for(var r=this.spawn(),a=0;a<this.length;a++){var s=this[a],c=t.has(s);c||r.push(s)}return r}else return this},absoluteComplement:function(){var t=this.cy();return t.mutableElements().not(this)},intersect:function(t){if(cn(t)){var r=t;return this.filter(r)}for(var a=this.spawn(),s=this,c=t,l=this.length<t.length,h=l?s:c,d=l?c:s,p=0;p<h.length;p++){var b=h[p];d.has(b)&&a.push(b)}return a},xor:function(t){var r=this._private.cy;cn(t)&&(t=r.$(t));var a=this.spawn(),s=this,c=t,l=function(h,d){for(var p=0;p<h.length;p++){var b=h[p],m=b._private.data.id,w=d.hasElementWithId(m);w||a.push(b)}};return l(s,c),l(c,s),a},diff:function(t){var r=this._private.cy;cn(t)&&(t=r.$(t));var a=this.spawn(),s=this.spawn(),c=this.spawn(),l=this,h=t,d=function(p,b,m){for(var w=0;w<p.length;w++){var k=p[w],P=k._private.data.id,S=b.hasElementWithId(P);S?c.merge(k):m.push(k)}};return d(l,h,a),d(h,l,s),{left:a,right:s,both:c}},add:function(t){var r=this._private.cy;if(!t)return this;if(cn(t)){var a=t;t=r.mutableElements().filter(a)}for(var s=this.spawnSelf(),c=0;c<t.length;c++){var l=t[c],h=!this.has(l);h&&s.push(l)}return s},merge:function(t){var r=this._private,a=r.cy;if(!t)return this;if(t&&cn(t)){var s=t;t=a.mutableElements().filter(s)}for(var c=r.map,l=0;l<t.length;l++){var h=t[l],d=h._private.data.id,p=!c.has(d);if(p){var b=this.length++;this[b]=h,c.set(d,{ele:h,index:b})}}return this},unmergeAt:function(t){var r=this[t],a=r.id(),s=this._private,c=s.map;this[t]=void 0,c.delete(a);var l=t===this.length-1;if(this.length>1&&!l){var h=this.length-1,d=this[h],p=d._private.data.id;this[h]=void 0,this[t]=d,c.set(p,{ele:d,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var r=this._private,a=t._private.data.id,s=r.map,c=s.get(a);if(!c)return this;var l=c.index;return this.unmergeAt(l),this},unmerge:function(t){var r=this._private.cy;if(!t)return this;if(t&&cn(t)){var a=t;t=r.mutableElements().filter(a)}for(var s=0;s<t.length;s++)this.unmergeOne(t[s]);return this},unmergeBy:function(t){for(var r=this.length-1;r>=0;r--){var a=this[r];t(a)&&this.unmergeAt(r)}return this},map:function(t,r){for(var a=[],s=this,c=0;c<s.length;c++){var l=s[c],h=r?t.apply(r,[l,c,s]):t(l,c,s);a.push(h)}return a},reduce:function(t,r){for(var a=r,s=this,c=0;c<s.length;c++)a=t(a,s[c],c,s);return a},max:function(t,r){for(var a=-1/0,s,c=this,l=0;l<c.length;l++){var h=c[l],d=r?t.apply(r,[h,l,c]):t(h,l,c);d>a&&(a=d,s=h)}return{value:a,ele:s}},min:function(t,r){for(var a=1/0,s,c=this,l=0;l<c.length;l++){var h=c[l],d=r?t.apply(r,[h,l,c]):t(h,l,c);d<a&&(a=d,s=h)}return{value:a,ele:s}}},Nr=nD;Nr.u=Nr["|"]=Nr["+"]=Nr.union=Nr.or=Nr.add,Nr["\\"]=Nr["!"]=Nr["-"]=Nr.difference=Nr.relativeComplement=Nr.subtract=Nr.not,Nr.n=Nr["&"]=Nr["."]=Nr.and=Nr.intersection=Nr.intersect,Nr["^"]=Nr["(+)"]=Nr["(-)"]=Nr.symmetricDifference=Nr.symdiff=Nr.xor,Nr.fnFilter=Nr.filterFn=Nr.stdFilter=Nr.filter,Nr.complement=Nr.abscomp=Nr.absoluteComplement;var vfe={isNode:function(){return this.group()==="nodes"},isEdge:function(){return this.group()==="edges"},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 t=this[0];if(t)return t._private.group}},rD=function(t,r){var a=t.cy(),s=a.hasCompoundNodes();function c(b){var m=b.pstyle("z-compound-depth");return m.value==="auto"?s?b.zDepth():0:m.value==="bottom"?-1:m.value==="top"?e3:0}var l=c(t)-c(r);if(l!==0)return l;function h(b){var m=b.pstyle("z-index-compare");return m.value==="auto"&&b.isNode()?1:0}var d=h(t)-h(r);if(d!==0)return d;var p=t.pstyle("z-index").value-r.pstyle("z-index").value;return p!==0?p:t.poolIndex()-r.poolIndex()},Ew={forEach:function(t,r){if(Qi(t))for(var a=this.length,s=0;s<a;s++){var c=this[s],l=r?t.apply(r,[c,s,this]):t(c,s,this);if(l===!1)break}return this},toArray:function(){for(var t=[],r=0;r<this.length;r++)t.push(this[r]);return t},slice:function(t,r){var a=[],s=this.length;r==null&&(r=s),t==null&&(t=0),t<0&&(t=s+t),r<0&&(r=s+r);for(var c=t;c>=0&&c<r&&c<s;c++)a.push(this[c]);return this.spawn(a)},size:function(){return this.length},eq:function(t){return this[t]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(t){if(!Qi(t))return this;var r=this.toArray().sort(t);return this.spawn(r)},sortByZIndex:function(){return this.sort(rD)},zDepth:function(){var t=this[0];if(t){var r=t._private,a=r.group;if(a==="nodes"){var s=r.data.parent?t.parents().size():0;return t.isParent()?s:e3-1}else{var c=r.source,l=r.target,h=c.zDepth(),d=l.zDepth();return Math.max(h,d,0)}}}};Ew.each=Ew.forEach;var yfe=function(){var t="undefined",r=(typeof Symbol>"u"?"undefined":Za(Symbol))!=t&&Za(Symbol.iterator)!=t;r&&(Ew[Symbol.iterator]=function(){var a=this,s={value:void 0,done:!1},c=0,l=this.length;return lO({next:function(){return c<l?s.value=a[c++]:(s.value=void 0,s.done=!0),s}},Symbol.iterator,function(){return this})})};yfe();var mfe=To({nodeDimensionsIncludeLabels:!1}),Cw={layoutDimensions:function(t){t=mfe(t);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(t.nodeDimensionsIncludeLabels){var a=this.boundingBox();r={w:a.w,h:a.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},layoutPositions:function(t,r,a){var s=this.nodes().filter(function(R){return!R.isParent()}),c=this.cy(),l=r.eles,h=function(R){return R.id()},d=Eg(a,h);t.emit({type:"layoutstart",layout:t}),t.animations=[];var p=function(R,B,F){var z={x:B.x1+B.w/2,y:B.y1+B.h/2},D={x:(F.x-z.x)*R,y:(F.y-z.y)*R};return{x:z.x+D.x,y:z.y+D.y}},b=r.spacingFactor&&r.spacingFactor!==1,m=function(){if(!b)return null;for(var R=ss(),B=0;B<s.length;B++){var F=s[B],z=d(F,B);XO(R,z.x,z.y)}return R},w=m(),k=Eg(function(R,B){var F=d(R,B);if(b){var z=Math.abs(r.spacingFactor);F=p(z,w,F)}return r.transform!=null&&(F=r.transform(R,F)),F},h);if(r.animate){for(var P=0;P<s.length;P++){var S=s[P],M=k(S,P),L=r.animateFilter==null||r.animateFilter(S,P);if(L){var T=S.animation({position:M,duration:r.animationDuration,easing:r.animationEasing});t.animations.push(T)}else S.position(M)}if(r.fit){var j=c.animation({fit:{boundingBox:l.boundingBoxAt(k),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});t.animations.push(j)}else if(r.zoom!==void 0&&r.pan!==void 0){var I=c.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});t.animations.push(I)}t.animations.forEach(function(R){return R.play()}),t.one("layoutready",r.ready),t.emit({type:"layoutready",layout:t}),Ig.all(t.animations.map(function(R){return R.promise()})).then(function(){t.one("layoutstop",r.stop),t.emit({type:"layoutstop",layout:t})})}else s.positions(k),r.fit&&c.fit(r.eles,r.padding),r.zoom!=null&&c.zoom(r.zoom),r.pan&&c.pan(r.pan),t.one("layoutready",r.ready),t.emit({type:"layoutready",layout:t}),t.one("layoutstop",r.stop),t.emit({type:"layoutstop",layout:t});return this},layout:function(t){var r=this.cy();return r.makeLayout(gn({},t,{eles:this}))}};Cw.createLayout=Cw.makeLayout=Cw.layout;function iD(t,r,a){var s=a._private,c=s.styleCache=s.styleCache||[],l;return(l=c[t])!=null||(l=c[t]=r(a)),l}function Pw(t,r){return t=qd(t),function(a){return iD(t,r,a)}}function Sw(t,r){t=qd(t);var a=function(s){return r.call(s)};return function(){var s=this[0];if(s)return iD(t,a,s)}}var Mo={recalculateRenderedStyle:function(t){var r=this.cy(),a=r.renderer(),s=r.styleEnabled();return a&&s&&a.recalculateRenderedStyle(this,t),this},dirtyStyleCache:function(){var t=this.cy(),r=function(s){return s._private.styleCache=null};if(t.hasCompoundNodes()){var a;a=this.spawnSelf().merge(this.descendants()).merge(this.parents()),a.merge(a.connectedEdges()),a.forEach(r)}else this.forEach(function(s){r(s),s.connectedEdges().forEach(r)});return this},updateStyle:function(t){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var a=r._private.batchStyleEles;return a.merge(this),this}var s=r.hasCompoundNodes(),c=this;t=!!(t||t===void 0),s&&(c=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var l=c;return t?l.emitAndNotify("style"):l.emit("style"),c.forEach(function(h){return h._private.styleDirty=!0}),this},cleanStyle:function(){var t=this.cy();if(t.styleEnabled())for(var r=0;r<this.length;r++){var a=this[r];a._private.styleDirty&&(a._private.styleDirty=!1,t.style().apply(a))}},parsedStyle:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],s=a.cy();if(s.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,s.style().apply(a));var c=a._private.style[t];return c??(r?s.style().getDefaultProperty(t):null)}},numericStyle:function(t){var r=this[0];if(r.cy().styleEnabled()&&r){var a=r.pstyle(t);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(t){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(t).units},renderedStyle:function(t){var r=this.cy();if(!r.styleEnabled())return this;var a=this[0];if(a)return r.style().getRenderedStyle(a,t)},style:function(t,r){var a=this.cy();if(!a.styleEnabled())return this;var s=!1,c=a.style();if(_r(t)){var l=t;c.applyBypass(this,l,s),this.emitAndNotify("style")}else if(cn(t))if(r===void 0){var h=this[0];return h?c.getStylePropertyValue(h,t):void 0}else c.applyBypass(this,t,r,s),this.emitAndNotify("style");else if(t===void 0){var d=this[0];return d?c.getRawStyle(d):void 0}return this},removeStyle:function(t){var r=this.cy();if(!r.styleEnabled())return this;var a=!1,s=r.style(),c=this;if(t===void 0)for(var l=0;l<c.length;l++){var h=c[l];s.removeAllBypasses(h,a)}else{t=t.split(/\s+/);for(var d=0;d<c.length;d++){var p=c[d];s.removeBypasses(p,t,a)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var t=this.cy();if(!t.styleEnabled())return 1;var r=t.hasCompoundNodes(),a=this[0];if(a){var s=a._private,c=a.pstyle("opacity").value;if(!r)return c;var l=s.data.parent?a.parents():null;if(l)for(var h=0;h<l.length;h++){var d=l[h],p=d.pstyle("opacity").value;c=p*c}return c}},transparent:function(){var t=this.cy();if(!t.styleEnabled())return!1;var r=this[0],a=r.cy().hasCompoundNodes();if(r)return a?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},backgrounding:function(){var t=this.cy();if(!t.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding}};function PP(t,r){var a=t._private,s=a.data.parent?t.parents():null;if(s)for(var c=0;c<s.length;c++){var l=s[c];if(!r(l))return!1}return!0}function SP(t){var r=t.ok,a=t.edgeOkViaNode||t.ok,s=t.parentOk||t.ok;return function(){var c=this.cy();if(!c.styleEnabled())return!0;var l=this[0],h=c.hasCompoundNodes();if(l){var d=l._private;if(!r(l))return!1;if(l.isNode())return!h||PP(l,s);var p=d.source,b=d.target;return a(p)&&(!h||PP(p,a))&&(p===b||a(b)&&(!h||PP(b,a)))}}}var Bg=Pw("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});Mo.takesUpSpace=Sw("takesUpSpace",SP({ok:Bg}));var wfe=Pw("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&Bg(t)}),xfe=Pw("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&Bg(t)});Mo.interactive=Sw("interactive",SP({ok:wfe,parentOk:xfe,edgeOkViaNode:Bg})),Mo.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var kfe=Pw("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&Bg(t)}),_fe=Bg;Mo.visible=Sw("visible",SP({ok:kfe,edgeOkViaNode:_fe})),Mo.hidden=function(){var t=this[0];if(t)return!t.visible()},Mo.isBundledBezier=Sw("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1}),Mo.bypass=Mo.css=Mo.style,Mo.renderedCss=Mo.renderedStyle,Mo.removeBypass=Mo.removeCss=Mo.removeStyle,Mo.pstyle=Mo.parsedStyle;var Ah={};function aD(t){return function(){var r=arguments,a=[];if(r.length===2){var s=r[0],c=r[1];this.on(t.event,s,c)}else if(r.length===1&&Qi(r[0])){var l=r[0];this.on(t.event,l)}else if(r.length===0||r.length===1&&ci(r[0])){for(var h=r.length===1?r[0]:null,d=0;d<this.length;d++){var p=this[d],b=!t.ableField||p._private[t.ableField],m=p._private[t.field]!=t.value;if(t.overrideAble){var w=t.overrideAble(p);if(w!==void 0&&(b=w,!w))return this}b&&(p._private[t.field]=t.value,m&&a.push(p))}var k=this.spawn(a);k.updateStyle(),k.emit(t.event),h&&k.emit(h)}return this}}function Gg(t){Ah[t.field]=function(){var r=this[0];if(r){if(t.overrideField){var a=t.overrideField(r);if(a!==void 0)return a}return r._private[t.field]}},Ah[t.on]=aD({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),Ah[t.off]=aD({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}Gg({field:"locked",overrideField:function(t){return t.cy().autolock()?!0:void 0},on:"lock",off:"unlock"}),Gg({field:"grabbable",overrideField:function(t){return t.cy().autoungrabify()||t.pannable()?!1:void 0},on:"grabify",off:"ungrabify"}),Gg({field:"selected",ableField:"selectable",overrideAble:function(t){return t.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"}),Gg({field:"selectable",overrideField:function(t){return t.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"}),Ah.deselect=Ah.unselect,Ah.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},Gg({field:"active",on:"activate",off:"unactivate"}),Gg({field:"pannable",on:"panify",off:"unpanify"}),Ah.inactive=function(){var t=this[0];if(t)return!t._private.active};var Vo={},oD=function(t){return function(r){for(var a=this,s=[],c=0;c<a.length;c++){var l=a[c];if(l.isNode()){for(var h=!1,d=l.connectedEdges(),p=0;p<d.length;p++){var b=d[p],m=b.source(),w=b.target();if(t.noIncomingEdges&&w===l&&m!==l||t.noOutgoingEdges&&m===l&&w!==l){h=!0;break}}h||s.push(l)}}return this.spawn(s,!0).filter(r)}},sD=function(t){return function(r){for(var a=this,s=[],c=0;c<a.length;c++){var l=a[c];if(l.isNode())for(var h=l.connectedEdges(),d=0;d<h.length;d++){var p=h[d],b=p.source(),m=p.target();t.outgoing&&b===l?(s.push(p),s.push(m)):t.incoming&&m===l&&(s.push(p),s.push(b))}}return this.spawn(s,!0).filter(r)}},uD=function(t){return function(r){for(var a=this,s=[],c={};;){var l=t.outgoing?a.outgoers():a.incomers();if(l.length===0)break;for(var h=!1,d=0;d<l.length;d++){var p=l[d],b=p.id();c[b]||(c[b]=!0,s.push(p),h=!0)}if(!h)break;a=l}return this.spawn(s,!0).filter(r)}};Vo.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},gn(Vo,{roots:oD({noIncomingEdges:!0}),leaves:oD({noOutgoingEdges:!0}),outgoers:Iu(sD({outgoing:!0}),"outgoers"),successors:uD({outgoing:!0}),incomers:Iu(sD({incoming:!0}),"incomers"),predecessors:uD({})}),gn(Vo,{neighborhood:Iu(function(t){for(var r=[],a=this.nodes(),s=0;s<a.length;s++)for(var c=a[s],l=c.connectedEdges(),h=0;h<l.length;h++){var d=l[h],p=d.source(),b=d.target(),m=c===p?b:p;m.length>0&&r.push(m[0]),r.push(d[0])}return this.spawn(r,!0).filter(t)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),Vo.neighbourhood=Vo.neighborhood,Vo.closedNeighbourhood=Vo.closedNeighborhood,Vo.openNeighbourhood=Vo.openNeighborhood,gn(Vo,{source:Iu(function(t){var r=this[0],a;return r&&(a=r._private.source||r.cy().collection()),a&&t?a.filter(t):a},"source"),target:Iu(function(t){var r=this[0],a;return r&&(a=r._private.target||r.cy().collection()),a&&t?a.filter(t):a},"target"),sources:cD({attr:"source"}),targets:cD({attr:"target"})});function cD(t){return function(r){for(var a=[],s=0;s<this.length;s++){var c=this[s],l=c._private[t.attr];l&&a.push(l)}return this.spawn(a,!0).filter(r)}}gn(Vo,{edgesWith:Iu(lD(),"edgesWith"),edgesTo:Iu(lD({thisIsSrc:!0}),"edgesTo")});function lD(t){return function(r){var a=[],s=this._private.cy,c=t||{};cn(r)&&(r=s.$(r));for(var l=0;l<r.length;l++)for(var h=r[l]._private.edges,d=0;d<h.length;d++){var p=h[d],b=p._private.data,m=this.hasElementWithId(b.source)&&r.hasElementWithId(b.target),w=r.hasElementWithId(b.source)&&this.hasElementWithId(b.target),k=m||w;k&&((c.thisIsSrc||c.thisIsTgt)&&(c.thisIsSrc&&!m||c.thisIsTgt&&!w)||a.push(p))}return this.spawn(a,!0)}}gn(Vo,{connectedEdges:Iu(function(t){for(var r=[],a=this,s=0;s<a.length;s++){var c=a[s];if(c.isNode())for(var l=c._private.edges,h=0;h<l.length;h++){var d=l[h];r.push(d)}}return this.spawn(r,!0).filter(t)},"connectedEdges"),connectedNodes:Iu(function(t){for(var r=[],a=this,s=0;s<a.length;s++){var c=a[s];c.isEdge()&&(r.push(c.source()[0]),r.push(c.target()[0]))}return this.spawn(r,!0).filter(t)},"connectedNodes"),parallelEdges:Iu(fD(),"parallelEdges"),codirectedEdges:Iu(fD({codirected:!0}),"codirectedEdges")});function fD(t){var r={codirected:!1};return t=gn({},r,t),function(a){for(var s=[],c=this.edges(),l=t,h=0;h<c.length;h++)for(var d=c[h],p=d._private,b=p.source,m=b._private.data.id,w=p.data.target,k=b._private.edges,P=0;P<k.length;P++){var S=k[P],M=S._private.data,L=M.target,T=M.source,j=L===w&&T===m,I=m===L&&w===T;(l.codirected&&j||!l.codirected&&(j||I))&&s.push(S)}return this.spawn(s,!0).filter(a)}}gn(Vo,{components:function(t){var r=this,a=r.cy(),s=a.collection(),c=t==null?r.nodes():t.nodes(),l=[];t!=null&&c.empty()&&(c=t.sources());var h=function(p,b){s.merge(p),c.unmerge(p),b.merge(p)};if(c.empty())return r.spawn();var d=function(){var p=a.collection();l.push(p);var b=c[0];h(b,p),r.bfs({directed:!1,roots:b,visit:function(m){return h(m,p)}}),p.forEach(function(m){m.connectedEdges().forEach(function(w){r.has(w)&&p.has(w.source())&&p.has(w.target())&&p.merge(w)})})};do d();while(c.length>0);return l},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),Vo.componentsOf=Vo.components;var jo=function(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0){Ri("A collection must have a reference to the core");return}var c=new pf,l=!1;if(!r)r=[];else if(r.length>0&&_r(r[0])&&!s0(r[0])){l=!0;for(var h=[],d=new Pg,p=0,b=r.length;p<b;p++){var m=r[p];m.data==null&&(m.data={});var w=m.data;if(w.id==null)w.id=qO();else if(t.hasElementWithId(w.id)||d.has(w.id))continue;var k=new nw(t,m,!1);h.push(k),d.add(w.id)}r=h}this.length=0;for(var P=0,S=r.length;P<S;P++){var M=r[P][0];if(M!=null){var L=M._private.data.id;(!a||!c.has(L))&&(a&&c.set(L,{index:this.length,ele:M}),this[this.length]=M,this.length++)}}this._private={eles:this,cy:t,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(T){this.lazyMap=T},rebuildMap:function(){for(var T=this.lazyMap=new pf,j=this.eles,I=0;I<j.length;I++){var R=j[I];T.set(R.id(),{index:I,ele:R})}}},a&&(this._private.map=c),l&&!s&&this.restore()},bi=nw.prototype=jo.prototype=Object.create(Array.prototype);bi.instanceString=function(){return"collection"},bi.spawn=function(t,r){return new jo(this.cy(),t,r)},bi.spawnSelf=function(){return this.spawn(this)},bi.cy=function(){return this._private.cy},bi.renderer=function(){return this._private.cy.renderer()},bi.element=function(){return this[0]},bi.collection=function(){return pO(this)?this:new jo(this._private.cy,[this])},bi.unique=function(){return new jo(this._private.cy,this,!0)},bi.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)},bi.getElementById=function(t){t=""+t;var r=this._private.cy,a=this._private.map.get(t);return a?a.ele:new jo(r)},bi.$id=bi.getElementById,bi.poolIndex=function(){var t=this._private.cy,r=t._private.elements,a=this[0]._private.data.id;return r._private.map.get(a).index},bi.indexOf=function(t){var r=t[0]._private.data.id;return this._private.map.get(r).index},bi.indexOfId=function(t){return t=""+t,this._private.map.get(t).index},bi.json=function(t){var r=this.element(),a=this.cy();if(r==null&&t)return this;if(r!=null){var s=r._private;if(_r(t)){if(a.startBatch(),t.data){r.data(t.data);var c=s.data;if(r.isEdge()){var l=!1,h={},d=t.data.source,p=t.data.target;d!=null&&d!=c.source&&(h.source=""+d,l=!0),p!=null&&p!=c.target&&(h.target=""+p,l=!0),l&&(r=r.move(h))}else{var b="parent"in t.data,m=t.data.parent;b&&(m!=null||c.parent!=null)&&m!=c.parent&&(m===void 0&&(m=null),m!=null&&(m=""+m),r=r.move({parent:m}))}}t.position&&r.position(t.position);var w=function(S,M,L){var T=t[S];T!=null&&T!==s[S]&&(T?r[M]():r[L]())};return w("removed","remove","restore"),w("selected","select","unselect"),w("selectable","selectify","unselectify"),w("locked","lock","unlock"),w("grabbable","grabify","ungrabify"),w("pannable","panify","unpanify"),t.classes!=null&&r.classes(t.classes),a.endBatch(),this}else if(t===void 0){var k={data:al(s.data),position:al(s.position),group:s.group,removed:s.removed,selected:s.selected,selectable:s.selectable,locked:s.locked,grabbable:s.grabbable,pannable:s.pannable,classes:null};k.classes="";var P=0;return s.classes.forEach(function(S){return k.classes+=P++===0?S:" "+S}),k}}},bi.jsons=function(){for(var t=[],r=0;r<this.length;r++){var a=this[r],s=a.json();t.push(s)}return t},bi.clone=function(){for(var t=this.cy(),r=[],a=0;a<this.length;a++){var s=this[a],c=s.json(),l=new nw(t,c,!1);r.push(l)}return new jo(t,r)},bi.copy=bi.clone,bi.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=this,s=a.cy(),c=s._private,l=[],h=[],d,p=0,b=a.length;p<b;p++){var m=a[p];r&&!m.removed()||(m.isNode()?l.push(m):h.push(m))}d=l.concat(h);var w,k=function(){d.splice(w,1),w--};for(w=0;w<d.length;w++){var P=d[w],S=P._private,M=S.data;if(P.clearTraversalCache(),!(!r&&!S.removed)){if(M.id===void 0)M.id=qO();else if(Lt(M.id))M.id=""+M.id;else if(yh(M.id)||!cn(M.id)){Ri("Can not create element with invalid string ID `"+M.id+"`"),k();continue}else if(s.hasElementWithId(M.id)){Ri("Can not create second element with ID `"+M.id+"`"),k();continue}}var L=M.id;if(P.isNode()){var T=S.position;T.x==null&&(T.x=0),T.y==null&&(T.y=0)}if(P.isEdge()){for(var j=P,I=["source","target"],R=I.length,B=!1,F=0;F<R;F++){var z=I[F],D=M[z];Lt(D)&&(D=M[z]=""+M[z]),D==null||D===""?(Ri("Can not create edge `"+L+"` with unspecified "+z),B=!0):s.hasElementWithId(D)||(Ri("Can not create edge `"+L+"` with nonexistant "+z+" `"+D+"`"),B=!0)}if(B){k();continue}var H=s.getElementById(M.source),Q=s.getElementById(M.target);H.same(Q)?H._private.edges.push(j):(H._private.edges.push(j),Q._private.edges.push(j)),j._private.source=H,j._private.target=Q}S.map=new pf,S.map.set(L,{ele:P,index:0}),S.removed=!1,r&&s.addToPool(P)}for(var q=0;q<l.length;q++){var Z=l[q],J=Z._private.data;Lt(J.parent)&&(J.parent=""+J.parent);var K=J.parent,ae=K!=null;if(ae||Z._private.parent){var se=Z._private.parent?s.collection().merge(Z._private.parent):s.getElementById(K);if(se.empty())J.parent=void 0;else if(se[0].removed())Gr("Node added with missing parent, reference to parent removed"),J.parent=void 0,Z._private.parent=null;else{for(var le=!1,he=se;!he.empty();){if(Z.same(he)){le=!0,J.parent=void 0;break}he=he.parent()}le||(se[0]._private.children.push(Z),Z._private.parent=se[0],c.hasCompoundNodes=!0)}}}if(d.length>0){for(var fe=d.length===a.length?a:new jo(s,d),pe=0;pe<fe.length;pe++){var me=fe[pe];me.isNode()||(me.parallelEdges().clearTraversalCache(),me.source().clearTraversalCache(),me.target().clearTraversalCache())}var Te;c.hasCompoundNodes?Te=s.collection().merge(fe).merge(fe.connectedNodes()).merge(fe.parent()):Te=fe,Te.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?fe.emitAndNotify("add"):r&&fe.emit("add")}return a},bi.removed=function(){var t=this[0];return t&&t._private.removed},bi.inside=function(){var t=this[0];return t&&!t._private.removed},bi.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=this,s=[],c={},l=a._private.cy;function h(K){for(var ae=K._private.edges,se=0;se<ae.length;se++)p(ae[se])}function d(K){for(var ae=K._private.children,se=0;se<ae.length;se++)p(ae[se])}function p(K){var ae=c[K.id()];r&&K.removed()||ae||(c[K.id()]=!0,K.isNode()?(s.push(K),h(K),d(K)):s.unshift(K))}for(var b=0,m=a.length;b<m;b++){var w=a[b];p(w)}function k(K,ae){var se=K._private.edges;xh(se,ae),K.clearTraversalCache()}function P(K){K.clearTraversalCache()}var S=[];S.ids={};function M(K,ae){ae=ae[0],K=K[0];var se=K._private.children,le=K.id();xh(se,ae),ae._private.parent=null,S.ids[le]||(S.ids[le]=!0,S.push(K))}a.dirtyCompoundBoundsCache(),r&&l.removeFromPool(s);for(var L=0;L<s.length;L++){var T=s[L];if(T.isEdge()){var j=T.source()[0],I=T.target()[0];k(j,T),k(I,T);for(var R=T.parallelEdges(),B=0;B<R.length;B++){var F=R[B];P(F),F.isBundledBezier()&&F.dirtyBoundingBoxCache()}}else{var z=T.parent();z.length!==0&&M(z,T)}r&&(T._private.removed=!0)}var D=l._private.elements;l._private.hasCompoundNodes=!1;for(var H=0;H<D.length;H++){var Q=D[H];if(Q.isParent()){l._private.hasCompoundNodes=!0;break}}var q=new jo(this.cy(),s);q.size()>0&&(t?q.emitAndNotify("remove"):r&&q.emit("remove"));for(var Z=0;Z<S.length;Z++){var J=S[Z];(!r||!J.removed())&&J.updateStyle()}return q},bi.move=function(t){var r=this._private.cy,a=this,s=!1,c=!1,l=function(P){return P==null?P:""+P};if(t.source!==void 0||t.target!==void 0){var h=l(t.source),d=l(t.target),p=h!=null&&r.hasElementWithId(h),b=d!=null&&r.hasElementWithId(d);(p||b)&&(r.batch(function(){a.remove(s,c),a.emitAndNotify("moveout");for(var P=0;P<a.length;P++){var S=a[P],M=S._private.data;S.isEdge()&&(p&&(M.source=h),b&&(M.target=d))}a.restore(s,c)}),a.emitAndNotify("move"))}else if(t.parent!==void 0){var m=l(t.parent),w=m===null||r.hasElementWithId(m);if(w){var k=m===null?void 0:m;r.batch(function(){var P=a.remove(s,c);P.emitAndNotify("moveout");for(var S=0;S<a.length;S++){var M=a[S],L=M._private.data;M.isNode()&&(L.parent=k)}P.restore(s,c)}),a.emitAndNotify("move")}}return this},[k8,Lle,yw,Nh,Og,Qle,mw,hfe,tD,nD,vfe,Ew,Cw,Mo,Ah,Vo].forEach(function(t){gn(bi,t)});var Efe={add:function(t){var r,a=this;if(du(t)){var s=t;if(s._private.cy===a)r=s.restore();else{for(var c=[],l=0;l<s.length;l++){var h=s[l];c.push(h.json())}r=new jo(a,c)}}else if(ci(t)){var d=t;r=new jo(a,d)}else if(_r(t)&&(ci(t.nodes)||ci(t.edges))){for(var p=t,b=[],m=["nodes","edges"],w=0,k=m.length;w<k;w++){var P=m[w],S=p[P];if(ci(S))for(var M=0,L=S.length;M<L;M++){var T=gn({group:P},S[M]);b.push(T)}}r=new jo(a,b)}else{var j=t;r=new nw(a,j).collection()}return r},remove:function(t){if(!du(t)&&cn(t)){var r=t;t=this.$(r)}return t.remove()}};/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */function Cfe(t,r,a,s){var c=4,l=.001,h=1e-7,d=10,p=11,b=1/(p-1),m=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var w=0;w<4;++w)if(typeof arguments[w]!="number"||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;t=Math.min(t,1),a=Math.min(a,1),t=Math.max(t,0),a=Math.max(a,0);var k=m?new Float32Array(p):new Array(p);function P(Q,q){return 1-3*q+3*Q}function S(Q,q){return 3*q-6*Q}function M(Q){return 3*Q}function L(Q,q,Z){return((P(q,Z)*Q+S(q,Z))*Q+M(q))*Q}function T(Q,q,Z){return 3*P(q,Z)*Q*Q+2*S(q,Z)*Q+M(q)}function j(Q,q){for(var Z=0;Z<c;++Z){var J=T(q,t,a);if(J===0)return q;var K=L(q,t,a)-Q;q-=K/J}return q}function I(){for(var Q=0;Q<p;++Q)k[Q]=L(Q*b,t,a)}function R(Q,q,Z){var J,K,ae=0;do K=q+(Z-q)/2,J=L(K,t,a)-Q,J>0?Z=K:q=K;while(Math.abs(J)>h&&++ae<d);return K}function B(Q){for(var q=0,Z=1,J=p-1;Z!==J&&k[Z]<=Q;++Z)q+=b;--Z;var K=(Q-k[Z])/(k[Z+1]-k[Z]),ae=q+K*b,se=T(ae,t,a);return se>=l?j(Q,ae):se===0?ae:R(Q,q,q+b)}var F=!1;function z(){F=!0,(t!==r||a!==s)&&I()}var D=function(Q){return F||z(),t===r&&a===s?Q:Q===0?0:Q===1?1:L(B(Q),r,s)};D.getControlPoints=function(){return[{x:t,y:r},{x:a,y:s}]};var H="generateBezier("+[t,r,a,s]+")";return D.toString=function(){return H},D}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var Pfe=function(){function t(s){return-s.tension*s.x-s.friction*s.v}function r(s,c,l){var h={x:s.x+l.dx*c,v:s.v+l.dv*c,tension:s.tension,friction:s.friction};return{dx:h.v,dv:t(h)}}function a(s,c){var l={dx:s.v,dv:t(s)},h=r(s,c*.5,l),d=r(s,c*.5,h),p=r(s,c,d),b=1/6*(l.dx+2*(h.dx+d.dx)+p.dx),m=1/6*(l.dv+2*(h.dv+d.dv)+p.dv);return s.x=s.x+b*c,s.v=s.v+m*c,s}return function s(c,l,h){var d={x:-1,v:0,tension:null,friction:null},p=[0],b=0,m=1/1e4,w=16/1e3,k,P,S;for(c=parseFloat(c)||500,l=parseFloat(l)||20,h=h||null,d.tension=c,d.friction=l,k=h!==null,k?(b=s(c,l),P=b/h*w):P=w;S=a(S||d,P),p.push(1+S.x),b+=16,Math.abs(S.x)>m&&Math.abs(S.v)>m;);return k?function(M){return p[M*(p.length-1)|0]}:b}}(),vi=function(t,r,a,s){var c=Cfe(t,r,a,s);return function(l,h,d){return l+(h-l)*c(d)}},Nw={linear:function(t,r,a){return t+(r-t)*a},ease:vi(.25,.1,.25,1),"ease-in":vi(.42,0,1,1),"ease-out":vi(0,0,.58,1),"ease-in-out":vi(.42,0,.58,1),"ease-in-sine":vi(.47,0,.745,.715),"ease-out-sine":vi(.39,.575,.565,1),"ease-in-out-sine":vi(.445,.05,.55,.95),"ease-in-quad":vi(.55,.085,.68,.53),"ease-out-quad":vi(.25,.46,.45,.94),"ease-in-out-quad":vi(.455,.03,.515,.955),"ease-in-cubic":vi(.55,.055,.675,.19),"ease-out-cubic":vi(.215,.61,.355,1),"ease-in-out-cubic":vi(.645,.045,.355,1),"ease-in-quart":vi(.895,.03,.685,.22),"ease-out-quart":vi(.165,.84,.44,1),"ease-in-out-quart":vi(.77,0,.175,1),"ease-in-quint":vi(.755,.05,.855,.06),"ease-out-quint":vi(.23,1,.32,1),"ease-in-out-quint":vi(.86,0,.07,1),"ease-in-expo":vi(.95,.05,.795,.035),"ease-out-expo":vi(.19,1,.22,1),"ease-in-out-expo":vi(1,0,0,1),"ease-in-circ":vi(.6,.04,.98,.335),"ease-out-circ":vi(.075,.82,.165,1),"ease-in-out-circ":vi(.785,.135,.15,.86),spring:function(t,r,a){if(a===0)return Nw.linear;var s=Pfe(t,r,a);return function(c,l,h){return c+(l-c)*s(h)}},"cubic-bezier":vi};function hD(t,r,a,s,c){if(s===1||r===a)return a;var l=c(r,a,s);return t==null||((t.roundValue||t.color)&&(l=Math.round(l)),t.min!==void 0&&(l=Math.max(l,t.min)),t.max!==void 0&&(l=Math.min(l,t.max))),l}function dD(t,r){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(r==null||r.type.units!=="%")?t.pfValue:t.value:t}function Hg(t,r,a,s,c){var l=c!=null?c.type:null;a<0?a=0:a>1&&(a=1);var h=dD(t,c),d=dD(r,c);if(Lt(h)&&Lt(d))return hD(l,h,d,a,s);if(ci(h)&&ci(d)){for(var p=[],b=0;b<d.length;b++){var m=h[b],w=d[b];if(m!=null&&w!=null){var k=hD(l,m,w,a,s);p.push(k)}else p.push(w)}return p}}function Sfe(t,r,a,s){var c=!s,l=t._private,h=r._private,d=h.easing,p=h.startTime,b=s?t:t.cy(),m=b.style();if(!h.easingImpl)if(d==null)h.easingImpl=Nw.linear;else{var w;if(cn(d)){var k=m.parse("transition-timing-function",d);w=k.value}else w=d;var P,S;cn(w)?(P=w,S=[]):(P=w[1],S=w.slice(2).map(function(fe){return+fe})),S.length>0?(P==="spring"&&S.push(h.duration),h.easingImpl=Nw[P].apply(null,S)):h.easingImpl=Nw[P]}var M=h.easingImpl,L;if(h.duration===0?L=1:L=(a-p)/h.duration,h.applying&&(L=h.progress),L<0?L=0:L>1&&(L=1),h.delay==null){var T=h.startPosition,j=h.position;if(j&&c&&!t.locked()){var I={};P0(T.x,j.x)&&(I.x=Hg(T.x,j.x,L,M)),P0(T.y,j.y)&&(I.y=Hg(T.y,j.y,L,M)),t.position(I)}var R=h.startPan,B=h.pan,F=l.pan,z=B!=null&&s;z&&(P0(R.x,B.x)&&(F.x=Hg(R.x,B.x,L,M)),P0(R.y,B.y)&&(F.y=Hg(R.y,B.y,L,M)),t.emit("pan"));var D=h.startZoom,H=h.zoom,Q=H!=null&&s;Q&&(P0(D,H)&&(l.zoom=b0(l.minZoom,Hg(D,H,L,M),l.maxZoom)),t.emit("zoom")),(z||Q)&&t.emit("viewport");var q=h.style;if(q&&q.length>0&&c){for(var Z=0;Z<q.length;Z++){var J=q[Z],K=J.name,ae=J,se=h.startStyle[K],le=m.properties[se.name],he=Hg(se,ae,L,M,le);m.overrideBypass(t,K,he)}t.emit("style")}}return h.progress=L,L}function P0(t,r){return t==null||r==null?!1:Lt(t)&&Lt(r)?!0:!!(t&&r)}function Nfe(t,r,a,s){var c=r._private;c.started=!0,c.startTime=a-c.progress*c.duration}function pD(t,r){var a=r._private.aniEles,s=[];function c(m,w){var k=m._private,P=k.animation.current,S=k.animation.queue,M=!1;if(P.length===0){var L=S.shift();L&&P.push(L)}for(var T=function(B){for(var F=B.length-1;F>=0;F--){var z=B[F];z()}B.splice(0,B.length)},j=P.length-1;j>=0;j--){var I=P[j],R=I._private;if(R.stopped){P.splice(j,1),R.hooked=!1,R.playing=!1,R.started=!1,T(R.frames);continue}!R.playing&&!R.applying||(R.playing&&R.applying&&(R.applying=!1),R.started||Nfe(m,I,t),Sfe(m,I,t,w),R.applying&&(R.applying=!1),T(R.frames),R.step!=null&&R.step(t),I.completed()&&(P.splice(j,1),R.hooked=!1,R.playing=!1,R.started=!1,T(R.completes)),M=!0)}return!w&&P.length===0&&S.length===0&&s.push(m),M}for(var l=!1,h=0;h<a.length;h++){var d=a[h],p=c(d);l=l||p}var b=c(r,!0);(l||b)&&(a.length>0?r.notify("draw",a):r.notify("draw")),a.unmerge(s),r.emit("step")}var Tfe={animate:Hr.animate(),animation:Hr.animation(),animated:Hr.animated(),clearQueue:Hr.clearQueue(),delay:Hr.delay(),delayAnimation:Hr.delayAnimation(),stop:Hr.stop(),addToAnimationPool:function(t){var r=this;r.styleEnabled()&&r._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,!t.styleEnabled())return;function r(){t._private.animationsRunning&&Xm(function(s){pD(s,t),r()})}var a=t.renderer();a&&a.beforeRender?a.beforeRender(function(s,c){pD(c,t)},a.beforeRenderPriorities.animations):r()}},Mfe={qualifierCompare:function(t,r){return t==null||r==null?t==null&&r==null:t.sameText(r)},eventMatches:function(t,r,a){var s=r.qualifier;return s!=null?t!==a.target&&s0(a.target)&&s.matches(a.target):!0},addEventFields:function(t,r){r.cy=t,r.target=t},callbackContext:function(t,r,a){return r.qualifier!=null?a.target:t}},Tw=function(t){return cn(t)?new Ph(t):t},gD={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new kw(Mfe,this)),this},emitter:function(){return this._private.emitter},on:function(t,r,a){return this.emitter().on(t,Tw(r),a),this},removeListener:function(t,r,a){return this.emitter().removeListener(t,Tw(r),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,r,a){return this.emitter().one(t,Tw(r),a),this},once:function(t,r,a){return this.emitter().one(t,Tw(r),a),this},emit:function(t,r){return this.emitter().emit(t,r),this},emitAndNotify:function(t,r){return this.emit(t),this.notify(t,r),this}};Hr.eventAliasesOn(gD);var NP={png:function(t){var r=this._private.renderer;return t=t||{},r.png(t)},jpg:function(t){var r=this._private.renderer;return t=t||{},t.bg=t.bg||"#fff",r.jpg(t)}};NP.jpeg=NP.jpg;var Mw={layout:function(t){var r=this;if(t==null){Ri("Layout options must be specified to make a layout");return}if(t.name==null){Ri("A `name` must be specified to make a layout");return}var a=t.name,s=r.extension("layout",a);if(s==null){Ri("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var c;cn(t.eles)?c=r.$(t.eles):c=t.eles!=null?t.eles:r.$();var l=new s(gn({},t,{cy:r,eles:c}));return l}};Mw.createLayout=Mw.makeLayout=Mw.layout;var jfe={notify:function(t,r){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var s=a.batchNotifications[t]=a.batchNotifications[t]||this.collection();r!=null&&s.merge(r);return}if(a.notificationsEnabled){var c=this.renderer();this.destroyed()||!c||c.notify(t,r)}},notifications:function(t){var r=this._private;return t===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return t.batchCount==null&&(t.batchCount=0),t.batchCount===0&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(t.batchCount===0)return this;if(t.batchCount--,t.batchCount===0){t.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(t.batchNotifications).forEach(function(a){var s=t.batchNotifications[a];s.empty()?r.notify(a):r.notify(a,s)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var r=this;return this.batch(function(){for(var a=Object.keys(t),s=0;s<a.length;s++){var c=a[s],l=t[c],h=r.getElementById(c);h.data(l)}})}},Afe=To({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),TP={renderTo:function(t,r,a,s){var c=this._private.renderer;return c.renderTo(t,r,a,s),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(t){var r=this,a=r.extension("renderer",t.name);if(a==null){Ri("Can not initialise: No such renderer `".concat(t.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}t.wheelSensitivity!==void 0&&Gr("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 s=Afe(t);s.cy=r,r._private.renderer=new a(s),this.notify("init")},destroyRenderer:function(){var t=this;t.notify("destroy");var r=t.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(a){var s=a._private;s.rscratch={},s.rstyle={},s.animation.current=[],s.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};TP.invalidateDimensions=TP.resize;var jw={collection:function(t,r){return cn(t)?this.$(t):du(t)?t.collection():ci(t)?(r||(r={}),new jo(this,t,r.unique,r.removed)):new jo(this)},nodes:function(t){var r=this.$(function(a){return a.isNode()});return t?r.filter(t):r},edges:function(t){var r=this.$(function(a){return a.isEdge()});return t?r.filter(t):r},$:function(t){var r=this._private.elements;return t?r.filter(t):r.spawnSelf()},mutableElements:function(){return this._private.elements}};jw.elements=jw.filter=jw.$;var po={},S0="t",Ife="f";po.apply=function(t){for(var r=this,a=r._private,s=a.cy,c=s.collection(),l=0;l<t.length;l++){var h=t[l],d=r.getContextMeta(h);if(!d.empty){var p=r.getContextStyle(d),b=r.applyContextStyle(d,p,h);h._private.appliedInitStyle?r.updateTransitions(h,b.diffProps):h._private.appliedInitStyle=!0;var m=r.updateStyleHints(h);m&&c.push(h)}}return c},po.getPropertiesDiff=function(t,r){var a=this,s=a._private.propDiffs=a._private.propDiffs||{},c=t+"-"+r,l=s[c];if(l)return l;for(var h=[],d={},p=0;p<a.length;p++){var b=a[p],m=t[p]===S0,w=r[p]===S0,k=m!==w,P=b.mappedProperties.length>0;if(k||w&&P){var S=void 0;k&&P||k?S=b.properties:P&&(S=b.mappedProperties);for(var M=0;M<S.length;M++){for(var L=S[M],T=L.name,j=!1,I=p+1;I<a.length;I++){var R=a[I],B=r[I]===S0;if(B&&(j=R.properties[L.name]!=null,j))break}!d[T]&&!j&&(d[T]=!0,h.push(T))}}}return s[c]=h,h},po.getContextMeta=function(t){for(var r=this,a="",s,c=t._private.styleCxtKey||"",l=0;l<r.length;l++){var h=r[l],d=h.selector&&h.selector.matches(t);d?a+=S0:a+=Ife}return s=r.getPropertiesDiff(c,a),t._private.styleCxtKey=a,{key:a,diffPropNames:s,empty:s.length===0}},po.getContextStyle=function(t){var r=t.key,a=this,s=this._private.contextStyles=this._private.contextStyles||{};if(s[r])return s[r];for(var c={_private:{key:r}},l=0;l<a.length;l++){var h=a[l],d=r[l]===S0;if(d)for(var p=0;p<h.properties.length;p++){var b=h.properties[p];c[b.name]=b}}return s[r]=c,c},po.applyContextStyle=function(t,r,a){for(var s=this,c=t.diffPropNames,l={},h=s.types,d=0;d<c.length;d++){var p=c[d],b=r[p],m=a.pstyle(p);if(!b)if(m)m.bypass?b={name:p,deleteBypassed:!0}:b={name:p,delete:!0};else continue;if(m!==b){if(b.mapped===h.fn&&m!=null&&m.mapping!=null&&m.mapping.value===b.value){var w=m.mapping,k=w.fnValue=b.value(a);if(k===w.prevFnValue)continue}var P=l[p]={prev:m};s.applyParsedProperty(a,b),P.next=a.pstyle(p),P.next&&P.next.bypass&&(P.next=P.next.bypassed)}}return{diffProps:l}},po.updateStyleHints=function(t){var r=t._private,a=this,s=a.propertyGroupNames,c=a.propertyGroupKeys,l=function(ke,He,Qe){return a.getPropertiesHash(ke,He,Qe)},h=r.styleKey;if(t.removed())return!1;var d=r.group==="nodes",p=t._private.style;s=Object.keys(p);for(var b=0;b<c.length;b++){var m=c[b];r.styleKeys[m]=[Vd,Cg]}for(var w=function(ke,He){return r.styleKeys[He][0]=h0(ke,r.styleKeys[He][0])},k=function(ke,He){return r.styleKeys[He][1]=d0(ke,r.styleKeys[He][1])},P=function(ke,He){w(ke,He),k(ke,He)},S=function(ke,He){for(var Qe=0;Qe<ke.length;Qe++){var it=ke.charCodeAt(Qe);w(it,He),k(it,He)}},M=2e9,L=function(ke){return-128<ke&&ke<128&&Math.floor(ke)!==ke?M-(ke*1024|0):ke},T=0;T<s.length;T++){var j=s[T],I=p[j];if(I!=null){var R=this.properties[j],B=R.type,F=R.groupKey,z=void 0;R.hashOverride!=null?z=R.hashOverride(t,I):I.pfValue!=null&&(z=I.pfValue);var D=R.enums==null?I.value:null,H=z!=null,Q=D!=null,q=H||Q,Z=I.units;if(B.number&&q&&!B.multiple){var J=H?z:D;P(L(J),F),!H&&Z!=null&&S(Z,F)}else S(I.strValue,F)}}for(var K=[Vd,Cg],ae=0;ae<c.length;ae++){var se=c[ae],le=r.styleKeys[se];K[0]=h0(le[0],K[0]),K[1]=d0(le[1],K[1])}r.styleKey=Kse(K[0],K[1]);var he=r.styleKeys;r.labelDimsKey=wh(he.labelDimensions);var fe=l(t,["label"],he.labelDimensions);if(r.labelKey=wh(fe),r.labelStyleKey=wh(ew(he.commonLabel,fe)),!d){var pe=l(t,["source-label"],he.labelDimensions);r.sourceLabelKey=wh(pe),r.sourceLabelStyleKey=wh(ew(he.commonLabel,pe));var me=l(t,["target-label"],he.labelDimensions);r.targetLabelKey=wh(me),r.targetLabelStyleKey=wh(ew(he.commonLabel,me))}if(d){var Te=r.styleKeys,Oe=Te.nodeBody,ge=Te.nodeBorder,xe=Te.nodeOutline,Se=Te.backgroundImage,Le=Te.compound,De=Te.pie,Ne=Te.stripe,Me=[Oe,ge,xe,Se,Le,De,Ne].filter(function(ke){return ke!=null}).reduce(ew,[Vd,Cg]);r.nodeKey=wh(Me),r.hasPie=De!=null&&De[0]!==Vd&&De[1]!==Cg,r.hasStripe=Ne!=null&&Ne[0]!==Vd&&Ne[1]!==Cg}return h!==r.styleKey},po.clearStyleHints=function(t){var r=t._private;r.styleCxtKey="",r.styleKeys={},r.styleKey=null,r.labelKey=null,r.labelStyleKey=null,r.sourceLabelKey=null,r.sourceLabelStyleKey=null,r.targetLabelKey=null,r.targetLabelStyleKey=null,r.nodeKey=null,r.hasPie=null,r.hasStripe=null},po.applyParsedProperty=function(t,r){var a=this,s=r,c=t._private.style,l,h=a.types,d=a.properties[s.name].type,p=s.bypass,b=c[s.name],m=b&&b.bypass,w=t._private,k="mapping",P=function(Te){return Te==null?null:Te.pfValue!=null?Te.pfValue:Te.value},S=function(){var Te=P(b),Oe=P(s);a.checkTriggers(t,s.name,Te,Oe)};if(r.name==="curve-style"&&t.isEdge()&&(r.value!=="bezier"&&t.isLoop()||r.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(s=r=this.parse(r.name,"bezier",p)),s.delete)return c[s.name]=void 0,S(),!0;if(s.deleteBypassed)return b?b.bypass?(b.bypassed=void 0,S(),!0):!1:(S(),!0);if(s.deleteBypass)return b?b.bypass?(c[s.name]=b.bypassed,S(),!0):!1:(S(),!0);var M=function(){Gr("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+s.name+"` with data field `"+s.field+"`); try a `["+s.field+"]` selector to limit scope to elements with `"+s.field+"` defined")};switch(s.mapped){case h.mapData:{for(var L=s.field.split("."),T=w.data,j=0;j<L.length&&T;j++){var I=L[j];T=T[I]}if(T==null)return M(),!1;var R;if(Lt(T)){var B=s.fieldMax-s.fieldMin;B===0?R=0:R=(T-s.fieldMin)/B}else return Gr("Do not use continuous mappers without specifying numeric data (i.e. `"+s.field+": "+T+"` for `"+t.id()+"` is non-numeric)"),!1;if(R<0?R=0:R>1&&(R=1),d.color){var F=s.valueMin[0],z=s.valueMax[0],D=s.valueMin[1],H=s.valueMax[1],Q=s.valueMin[2],q=s.valueMax[2],Z=s.valueMin[3]==null?1:s.valueMin[3],J=s.valueMax[3]==null?1:s.valueMax[3],K=[Math.round(F+(z-F)*R),Math.round(D+(H-D)*R),Math.round(Q+(q-Q)*R),Math.round(Z+(J-Z)*R)];l={bypass:s.bypass,name:s.name,value:K,strValue:"rgb("+K[0]+", "+K[1]+", "+K[2]+")"}}else if(d.number){var ae=s.valueMin+(s.valueMax-s.valueMin)*R;l=this.parse(s.name,ae,s.bypass,k)}else return!1;if(!l)return M(),!1;l.mapping=s,s=l;break}case h.data:{for(var se=s.field.split("."),le=w.data,he=0;he<se.length&≤he++){var fe=se[he];le=le[fe]}if(le!=null&&(l=this.parse(s.name,le,s.bypass,k)),!l)return M(),!1;l.mapping=s,s=l;break}case h.fn:{var pe=s.value,me=s.fnValue!=null?s.fnValue:pe(t);if(s.prevFnValue=me,me==null)return Gr("Custom function mappers may not return null (i.e. `"+s.name+"` for ele `"+t.id()+"` is null)"),!1;if(l=this.parse(s.name,me,s.bypass,k),!l)return Gr("Custom function mappers may not return invalid values for the property type (i.e. `"+s.name+"` for ele `"+t.id()+"` is invalid)"),!1;l.mapping=al(s),s=l;break}case void 0:break;default:return!1}return p?(m?s.bypassed=b.bypassed:s.bypassed=b,c[s.name]=s):m?b.bypassed=s:c[s.name]=s,S(),!0},po.cleanElements=function(t,r){for(var a=0;a<t.length;a++){var s=t[a];if(this.clearStyleHints(s),s.dirtyCompoundBoundsCache(),s.dirtyBoundingBoxCache(),!r)s._private.style={};else for(var c=s._private.style,l=Object.keys(c),h=0;h<l.length;h++){var d=l[h],p=c[d];p!=null&&(p.bypass?p.bypassed=null:c[d]=null)}}},po.update=function(){var t=this._private.cy,r=t.mutableElements();r.updateStyle()},po.updateTransitions=function(t,r){var a=this,s=t._private,c=t.pstyle("transition-property").value,l=t.pstyle("transition-duration").pfValue,h=t.pstyle("transition-delay").pfValue;if(c.length>0&&l>0){for(var d={},p=!1,b=0;b<c.length;b++){var m=c[b],w=t.pstyle(m),k=r[m];if(k){var P=k.prev,S=P,M=k.next!=null?k.next:w,L=!1,T=void 0,j=1e-6;S&&(Lt(S.pfValue)&&Lt(M.pfValue)?(L=M.pfValue-S.pfValue,T=S.pfValue+j*L):Lt(S.value)&&Lt(M.value)?(L=M.value-S.value,T=S.value+j*L):ci(S.value)&&ci(M.value)&&(L=S.value[0]!==M.value[0]||S.value[1]!==M.value[1]||S.value[2]!==M.value[2],T=S.strValue),L&&(d[m]=M.strValue,this.applyBypass(t,m,T),p=!0))}}if(!p)return;s.transitioning=!0,new Ig(function(I){h>0?t.delayAnimation(h).play().promise().then(I):I()}).then(function(){return t.animation({style:d,duration:l,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){a.removeBypasses(t,c),t.emitAndNotify("style"),s.transitioning=!1})}else s.transitioning&&(this.removeBypasses(t,c),t.emitAndNotify("style"),s.transitioning=!1)},po.checkTrigger=function(t,r,a,s,c,l){var h=this.properties[r],d=c(h);t.removed()||d!=null&&d(a,s,t)&&l(h)},po.checkZOrderTrigger=function(t,r,a,s){var c=this;this.checkTrigger(t,r,a,s,function(l){return l.triggersZOrder},function(){c._private.cy.notify("zorder",t)})},po.checkBoundsTrigger=function(t,r,a,s){this.checkTrigger(t,r,a,s,function(c){return c.triggersBounds},function(c){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},po.checkConnectedEdgesBoundsTrigger=function(t,r,a,s){this.checkTrigger(t,r,a,s,function(c){return c.triggersBoundsOfConnectedEdges},function(c){t.connectedEdges().forEach(function(l){l.dirtyBoundingBoxCache()})})},po.checkParallelEdgesBoundsTrigger=function(t,r,a,s){this.checkTrigger(t,r,a,s,function(c){return c.triggersBoundsOfParallelEdges},function(c){t.parallelEdges().forEach(function(l){l.dirtyBoundingBoxCache()})})},po.checkTriggers=function(t,r,a,s){t.dirtyStyleCache(),this.checkZOrderTrigger(t,r,a,s),this.checkBoundsTrigger(t,r,a,s),this.checkConnectedEdgesBoundsTrigger(t,r,a,s),this.checkParallelEdgesBoundsTrigger(t,r,a,s)};var N0={};N0.applyBypass=function(t,r,a,s){var c=this,l=[],h=!0;if(r==="*"||r==="**"){if(a!==void 0)for(var d=0;d<c.properties.length;d++){var p=c.properties[d],b=p.name,m=this.parse(b,a,!0);m&&l.push(m)}}else if(cn(r)){var w=this.parse(r,a,!0);w&&l.push(w)}else if(_r(r)){var k=r;s=a;for(var P=Object.keys(k),S=0;S<P.length;S++){var M=P[S],L=k[M];if(L===void 0&&(L=k[Qm(M)]),L!==void 0){var T=this.parse(M,L,!0);T&&l.push(T)}}}else return!1;if(l.length===0)return!1;for(var j=!1,I=0;I<t.length;I++){for(var R=t[I],B={},F=void 0,z=0;z<l.length;z++){var D=l[z];if(s){var H=R.pstyle(D.name);F=B[D.name]={prev:H}}j=this.applyParsedProperty(R,al(D))||j,s&&(F.next=R.pstyle(D.name))}j&&this.updateStyleHints(R),s&&this.updateTransitions(R,B,h)}return j},N0.overrideBypass=function(t,r,a){r=DC(r);for(var s=0;s<t.length;s++){var c=t[s],l=c._private.style[r],h=this.properties[r].type,d=h.color,p=h.mutiple,b=l?l.pfValue!=null?l.pfValue:l.value:null;!l||!l.bypass?this.applyBypass(c,r,a):(l.value=a,l.pfValue!=null&&(l.pfValue=a),d?l.strValue="rgb("+a.join(",")+")":p?l.strValue=a.join(" "):l.strValue=""+a,this.updateStyleHints(c)),this.checkTriggers(c,r,b,a)}},N0.removeAllBypasses=function(t,r){return this.removeBypasses(t,this.propertyNames,r)},N0.removeBypasses=function(t,r,a){for(var s=!0,c=0;c<t.length;c++){for(var l=t[c],h={},d=0;d<r.length;d++){var p=r[d],b=this.properties[p],m=l.pstyle(b.name);if(!(!m||!m.bypass)){var w="",k=this.parse(p,w,!0),P=h[b.name]={prev:m};this.applyParsedProperty(l,k),P.next=l.pstyle(b.name)}}this.updateStyleHints(l),a&&this.updateTransitions(l,h,s)}};var MP={};MP.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1},MP.containerCss=function(t){var r=this._private.cy,a=r.container(),s=r.window();if(s&&a&&s.getComputedStyle)return s.getComputedStyle(a).getPropertyValue(t)};var ol={};ol.getRenderedStyle=function(t,r){return r?this.getStylePropertyValue(t,r,!0):this.getRawStyle(t,!0)},ol.getRawStyle=function(t,r){var a=this;if(t=t[0],t){for(var s={},c=0;c<a.properties.length;c++){var l=a.properties[c],h=a.getStylePropertyValue(t,l.name,r);h!=null&&(s[l.name]=h,s[Qm(l.name)]=h)}return s}},ol.getIndexedStyle=function(t,r,a,s){var c=t.pstyle(r)[a][s];return c??t.cy().style().getDefaultProperty(r)[a][0]},ol.getStylePropertyValue=function(t,r,a){var s=this;if(t=t[0],t){var c=s.properties[r];c.alias&&(c=c.pointsTo);var l=c.type,h=t.pstyle(c.name);if(h){var d=h.value,p=h.units,b=h.strValue;if(a&&l.number&&d!=null&&Lt(d)){var m=t.cy().zoom(),w=function(M){return M*m},k=function(M,L){return w(M)+L},P=ci(d),S=P?p.every(function(M){return M!=null}):p!=null;return S?P?d.map(function(M,L){return k(M,p[L])}).join(" "):k(d,p):P?d.map(function(M){return cn(M)?M:""+w(M)}).join(" "):""+w(d)}else if(b!=null)return b}return null}},ol.getAnimationStartStyle=function(t,r){for(var a={},s=0;s<r.length;s++){var c=r[s],l=c.name,h=t.pstyle(l);h!==void 0&&(_r(h)?h=this.parse(l,h.strValue):h=this.parse(l,h)),h&&(a[l]=h)}return a},ol.getPropsList=function(t){var r=this,a=[],s=t,c=r.properties;if(s)for(var l=Object.keys(s),h=0;h<l.length;h++){var d=l[h],p=s[d],b=c[d]||c[DC(d)],m=this.parse(b.name,p);m&&a.push(m)}return a},ol.getNonDefaultPropertiesHash=function(t,r,a){var s=a.slice(),c,l,h,d,p,b;for(p=0;p<r.length;p++)if(c=r[p],l=t.pstyle(c,!1),l!=null)if(l.pfValue!=null)s[0]=h0(d,s[0]),s[1]=d0(d,s[1]);else for(h=l.strValue,b=0;b<h.length;b++)d=h.charCodeAt(b),s[0]=h0(d,s[0]),s[1]=d0(d,s[1]);return s},ol.getPropertiesHash=ol.getNonDefaultPropertiesHash;var Aw={};Aw.appendFromJson=function(t){for(var r=this,a=0;a<t.length;a++){var s=t[a],c=s.selector,l=s.style||s.css,h=Object.keys(l);r.selector(c);for(var d=0;d<h.length;d++){var p=h[d],b=l[p];r.css(p,b)}}return r},Aw.fromJson=function(t){var r=this;return r.resetToDefault(),r.appendFromJson(t),r},Aw.json=function(){for(var t=[],r=this.defaultLength;r<this.length;r++){for(var a=this[r],s=a.selector,c=a.properties,l={},h=0;h<c.length;h++){var d=c[h];l[d.name]=d.strValue}t.push({selector:s?s.toString():"core",style:l})}return t};var jP={};jP.appendFromString=function(t){var r=this,a=this,s=""+t,c,l,h;s=s.replace(/[/][*](\s|.)+?[*][/]/g,"");function d(){s.length>c.length?s=s.substr(c.length):s=""}function p(){l.length>h.length?l=l.substr(h.length):l=""}for(;;){var b=s.match(/^\s*$/);if(b)break;var m=s.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!m){Gr("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+s);break}c=m[0];var w=m[1];if(w!=="core"){var k=new Ph(w);if(k.invalid){Gr("Skipping parsing of block: Invalid selector found in string stylesheet: "+w),d();continue}}var P=m[2],S=!1;l=P;for(var M=[];;){var L=l.match(/^\s*$/);if(L)break;var T=l.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!T){Gr("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+P),S=!0;break}h=T[0];var j=T[1],I=T[2],R=r.properties[j];if(!R){Gr("Skipping property: Invalid property name in: "+h),p();continue}var B=a.parse(j,I);if(!B){Gr("Skipping property: Invalid property definition in: "+h),p();continue}M.push({name:j,val:I}),p()}if(S){d();break}a.selector(w);for(var F=0;F<M.length;F++){var z=M[F];a.css(z.name,z.val)}d()}return a},jP.fromString=function(t){var r=this;return r.resetToDefault(),r.appendFromString(t),r};var Aa={};(function(){var t=Ka,r=Sse,a=Tse,s=Mse,c=jse,l=function(Me){return"^"+Me+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},h=function(Me){var ke=t+"|\\w+|"+r+"|"+a+"|"+s+"|"+c;return"^"+Me+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+ke+")\\s*\\,\\s*("+ke+")\\)$"},d=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];Aa.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},nonNegativeNumber:{number:!0,min: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"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},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","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},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"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},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","circle"]},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","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},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"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},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:l("data")},layoutData:{mapping:!0,regex:l("layoutData")},scratch:{mapping:!0,regex:l("scratch")},mapData:{mapping:!0,regex:h("mapData")},mapLayoutData:{mapping:!0,regex:h("mapLayoutData")},mapScratch:{mapping:!0,regex:h("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:d,singleRegexMatchValue:!0},urls:{regexes:d,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","endpoints"]},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(Me,ke){switch(Me.length){case 2:return ke[0]!=="deg"&&ke[0]!=="rad"&&ke[1]!=="deg"&&ke[1]!=="rad";case 1:return cn(Me[0])||ke[0]==="deg"||ke[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\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(Me){var ke=Me.length;return ke===1||ke===2||ke===4}}};var p={zeroNonZero:function(Me,ke){return(Me==null||ke==null)&&Me!==ke||Me==0&&ke!=0?!0:Me!=0&&ke==0},any:function(Me,ke){return Me!=ke},emptyNonEmpty:function(Me,ke){var He=yh(Me),Qe=yh(ke);return He&&!Qe||!He&&Qe}},b=Aa.types,m=[{name:"label",type:b.text,triggersBounds:p.any,triggersZOrder:p.emptyNonEmpty},{name:"text-rotation",type:b.textRotation,triggersBounds:p.any},{name:"text-margin-x",type:b.bidirectionalSize,triggersBounds:p.any},{name:"text-margin-y",type:b.bidirectionalSize,triggersBounds:p.any}],w=[{name:"source-label",type:b.text,triggersBounds:p.any},{name:"source-text-rotation",type:b.textRotation,triggersBounds:p.any},{name:"source-text-margin-x",type:b.bidirectionalSize,triggersBounds:p.any},{name:"source-text-margin-y",type:b.bidirectionalSize,triggersBounds:p.any},{name:"source-text-offset",type:b.size,triggersBounds:p.any}],k=[{name:"target-label",type:b.text,triggersBounds:p.any},{name:"target-text-rotation",type:b.textRotation,triggersBounds:p.any},{name:"target-text-margin-x",type:b.bidirectionalSize,triggersBounds:p.any},{name:"target-text-margin-y",type:b.bidirectionalSize,triggersBounds:p.any},{name:"target-text-offset",type:b.size,triggersBounds:p.any}],P=[{name:"font-family",type:b.fontFamily,triggersBounds:p.any},{name:"font-style",type:b.fontStyle,triggersBounds:p.any},{name:"font-weight",type:b.fontWeight,triggersBounds:p.any},{name:"font-size",type:b.size,triggersBounds:p.any},{name:"text-transform",type:b.textTransform,triggersBounds:p.any},{name:"text-wrap",type:b.textWrap,triggersBounds:p.any},{name:"text-overflow-wrap",type:b.textOverflowWrap,triggersBounds:p.any},{name:"text-max-width",type:b.size,triggersBounds:p.any},{name:"text-outline-width",type:b.size,triggersBounds:p.any},{name:"line-height",type:b.positiveNumber,triggersBounds:p.any}],S=[{name:"text-valign",type:b.valign,triggersBounds:p.any},{name:"text-halign",type:b.halign,triggersBounds:p.any},{name:"color",type:b.color},{name:"text-outline-color",type:b.color},{name:"text-outline-opacity",type:b.zeroOneNumber},{name:"text-background-color",type:b.color},{name:"text-background-opacity",type:b.zeroOneNumber},{name:"text-background-padding",type:b.size,triggersBounds:p.any},{name:"text-border-opacity",type:b.zeroOneNumber},{name:"text-border-color",type:b.color},{name:"text-border-width",type:b.size,triggersBounds:p.any},{name:"text-border-style",type:b.borderStyle,triggersBounds:p.any},{name:"text-background-shape",type:b.textBackgroundShape,triggersBounds:p.any},{name:"text-justification",type:b.justification},{name:"box-select-labels",type:b.bool,triggersBounds:p.any}],M=[{name:"events",type:b.bool,triggersZOrder:p.any},{name:"text-events",type:b.bool,triggersZOrder:p.any},{name:"box-selection",type:b.boxSelection,triggersZOrder:p.any}],L=[{name:"display",type:b.display,triggersZOrder:p.any,triggersBounds:p.any,triggersBoundsOfConnectedEdges:p.any,triggersBoundsOfParallelEdges:function(Me,ke,He){return Me===ke?!1:He.pstyle("curve-style").value==="bezier"}},{name:"visibility",type:b.visibility,triggersZOrder:p.any},{name:"opacity",type:b.zeroOneNumber,triggersZOrder:p.zeroNonZero},{name:"text-opacity",type:b.zeroOneNumber},{name:"min-zoomed-font-size",type:b.size},{name:"z-compound-depth",type:b.zCompoundDepth,triggersZOrder:p.any},{name:"z-index-compare",type:b.zIndexCompare,triggersZOrder:p.any},{name:"z-index",type:b.number,triggersZOrder:p.any}],T=[{name:"overlay-padding",type:b.size,triggersBounds:p.any},{name:"overlay-color",type:b.color},{name:"overlay-opacity",type:b.zeroOneNumber,triggersBounds:p.zeroNonZero},{name:"overlay-shape",type:b.overlayShape,triggersBounds:p.any},{name:"overlay-corner-radius",type:b.cornerRadius}],j=[{name:"underlay-padding",type:b.size,triggersBounds:p.any},{name:"underlay-color",type:b.color},{name:"underlay-opacity",type:b.zeroOneNumber,triggersBounds:p.zeroNonZero},{name:"underlay-shape",type:b.overlayShape,triggersBounds:p.any},{name:"underlay-corner-radius",type:b.cornerRadius}],I=[{name:"transition-property",type:b.propList},{name:"transition-duration",type:b.time},{name:"transition-delay",type:b.time},{name:"transition-timing-function",type:b.easing}],R=function(Me,ke){return ke.value==="label"?-Me.poolIndex():ke.pfValue},B=[{name:"height",type:b.nodeSize,triggersBounds:p.any,hashOverride:R},{name:"width",type:b.nodeSize,triggersBounds:p.any,hashOverride:R},{name:"shape",type:b.nodeShape,triggersBounds:p.any},{name:"shape-polygon-points",type:b.polygonPointList,triggersBounds:p.any},{name:"corner-radius",type:b.cornerRadius},{name:"background-color",type:b.color},{name:"background-fill",type:b.fill},{name:"background-opacity",type:b.zeroOneNumber},{name:"background-blacken",type:b.nOneOneNumber},{name:"background-gradient-stop-colors",type:b.colors},{name:"background-gradient-stop-positions",type:b.percentages},{name:"background-gradient-direction",type:b.gradientDirection},{name:"padding",type:b.sizeMaybePercent,triggersBounds:p.any},{name:"padding-relative-to",type:b.paddingRelativeTo,triggersBounds:p.any},{name:"bounds-expansion",type:b.boundsExpansion,triggersBounds:p.any}],F=[{name:"border-color",type:b.color},{name:"border-opacity",type:b.zeroOneNumber},{name:"border-width",type:b.size,triggersBounds:p.any},{name:"border-style",type:b.borderStyle},{name:"border-cap",type:b.lineCap},{name:"border-join",type:b.lineJoin},{name:"border-dash-pattern",type:b.numbers},{name:"border-dash-offset",type:b.number},{name:"border-position",type:b.linePosition}],z=[{name:"outline-color",type:b.color},{name:"outline-opacity",type:b.zeroOneNumber},{name:"outline-width",type:b.size,triggersBounds:p.any},{name:"outline-style",type:b.borderStyle},{name:"outline-offset",type:b.size,triggersBounds:p.any}],D=[{name:"background-image",type:b.urls},{name:"background-image-crossorigin",type:b.bgCrossOrigin},{name:"background-image-opacity",type:b.zeroOneNumbers},{name:"background-image-containment",type:b.bgContainment},{name:"background-image-smoothing",type:b.bools},{name:"background-position-x",type:b.bgPos},{name:"background-position-y",type:b.bgPos},{name:"background-width-relative-to",type:b.bgRelativeTo},{name:"background-height-relative-to",type:b.bgRelativeTo},{name:"background-repeat",type:b.bgRepeat},{name:"background-fit",type:b.bgFit},{name:"background-clip",type:b.bgClip},{name:"background-width",type:b.bgWH},{name:"background-height",type:b.bgWH},{name:"background-offset-x",type:b.bgPos},{name:"background-offset-y",type:b.bgPos}],H=[{name:"position",type:b.position,triggersBounds:p.any},{name:"compound-sizing-wrt-labels",type:b.compoundIncludeLabels,triggersBounds:p.any},{name:"min-width",type:b.size,triggersBounds:p.any},{name:"min-width-bias-left",type:b.sizeMaybePercent,triggersBounds:p.any},{name:"min-width-bias-right",type:b.sizeMaybePercent,triggersBounds:p.any},{name:"min-height",type:b.size,triggersBounds:p.any},{name:"min-height-bias-top",type:b.sizeMaybePercent,triggersBounds:p.any},{name:"min-height-bias-bottom",type:b.sizeMaybePercent,triggersBounds:p.any}],Q=[{name:"line-style",type:b.lineStyle},{name:"line-color",type:b.color},{name:"line-fill",type:b.fill},{name:"line-cap",type:b.lineCap},{name:"line-opacity",type:b.zeroOneNumber},{name:"line-dash-pattern",type:b.numbers},{name:"line-dash-offset",type:b.number},{name:"line-outline-width",type:b.size},{name:"line-outline-color",type:b.color},{name:"line-gradient-stop-colors",type:b.colors},{name:"line-gradient-stop-positions",type:b.percentages},{name:"curve-style",type:b.curveStyle,triggersBounds:p.any,triggersBoundsOfParallelEdges:function(Me,ke){return Me===ke?!1:Me==="bezier"||ke==="bezier"}},{name:"haystack-radius",type:b.zeroOneNumber,triggersBounds:p.any},{name:"source-endpoint",type:b.edgeEndpoint,triggersBounds:p.any},{name:"target-endpoint",type:b.edgeEndpoint,triggersBounds:p.any},{name:"control-point-step-size",type:b.size,triggersBounds:p.any},{name:"control-point-distances",type:b.bidirectionalSizes,triggersBounds:p.any},{name:"control-point-weights",type:b.numbers,triggersBounds:p.any},{name:"segment-distances",type:b.bidirectionalSizes,triggersBounds:p.any},{name:"segment-weights",type:b.numbers,triggersBounds:p.any},{name:"segment-radii",type:b.numbers,triggersBounds:p.any},{name:"radius-type",type:b.radiusType,triggersBounds:p.any},{name:"taxi-turn",type:b.bidirectionalSizeMaybePercent,triggersBounds:p.any},{name:"taxi-turn-min-distance",type:b.size,triggersBounds:p.any},{name:"taxi-direction",type:b.axisDirection,triggersBounds:p.any},{name:"taxi-radius",type:b.number,triggersBounds:p.any},{name:"edge-distances",type:b.edgeDistances,triggersBounds:p.any},{name:"arrow-scale",type:b.positiveNumber,triggersBounds:p.any},{name:"loop-direction",type:b.angle,triggersBounds:p.any},{name:"loop-sweep",type:b.angle,triggersBounds:p.any},{name:"source-distance-from-node",type:b.size,triggersBounds:p.any},{name:"target-distance-from-node",type:b.size,triggersBounds:p.any}],q=[{name:"ghost",type:b.bool,triggersBounds:p.any},{name:"ghost-offset-x",type:b.bidirectionalSize,triggersBounds:p.any},{name:"ghost-offset-y",type:b.bidirectionalSize,triggersBounds:p.any},{name:"ghost-opacity",type:b.zeroOneNumber}],Z=[{name:"selection-box-color",type:b.color},{name:"selection-box-opacity",type:b.zeroOneNumber},{name:"selection-box-border-color",type:b.color},{name:"selection-box-border-width",type:b.size},{name:"active-bg-color",type:b.color},{name:"active-bg-opacity",type:b.zeroOneNumber},{name:"active-bg-size",type:b.size},{name:"outside-texture-bg-color",type:b.color},{name:"outside-texture-bg-opacity",type:b.zeroOneNumber}],J=[];Aa.pieBackgroundN=16,J.push({name:"pie-size",type:b.sizeMaybePercent}),J.push({name:"pie-hole",type:b.sizeMaybePercent}),J.push({name:"pie-start-angle",type:b.angle});for(var K=1;K<=Aa.pieBackgroundN;K++)J.push({name:"pie-"+K+"-background-color",type:b.color}),J.push({name:"pie-"+K+"-background-size",type:b.percent}),J.push({name:"pie-"+K+"-background-opacity",type:b.zeroOneNumber});var ae=[];Aa.stripeBackgroundN=16,ae.push({name:"stripe-size",type:b.sizeMaybePercent}),ae.push({name:"stripe-direction",type:b.axisDirectionPrimary});for(var se=1;se<=Aa.stripeBackgroundN;se++)ae.push({name:"stripe-"+se+"-background-color",type:b.color}),ae.push({name:"stripe-"+se+"-background-size",type:b.percent}),ae.push({name:"stripe-"+se+"-background-opacity",type:b.zeroOneNumber});var le=[],he=Aa.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:b.arrowShape,triggersBounds:p.any},{name:"arrow-color",type:b.color},{name:"arrow-fill",type:b.arrowFill},{name:"arrow-width",type:b.arrowWidth}].forEach(function(Me){he.forEach(function(ke){var He=ke+"-"+Me.name,Qe=Me.type,it=Me.triggersBounds;le.push({name:He,type:Qe,triggersBounds:it})})},{});var fe=Aa.properties=[].concat(M,I,L,T,j,q,S,P,m,w,k,B,F,z,D,J,ae,H,Q,le,Z),pe=Aa.propertyGroups={behavior:M,transition:I,visibility:L,overlay:T,underlay:j,ghost:q,commonLabel:S,labelDimensions:P,mainLabel:m,sourceLabel:w,targetLabel:k,nodeBody:B,nodeBorder:F,nodeOutline:z,backgroundImage:D,pie:J,stripe:ae,compound:H,edgeLine:Q,edgeArrow:le,core:Z},me=Aa.propertyGroupNames={},Te=Aa.propertyGroupKeys=Object.keys(pe);Te.forEach(function(Me){me[Me]=pe[Me].map(function(ke){return ke.name}),pe[Me].forEach(function(ke){return ke.groupKey=Me})});var Oe=Aa.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{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"}];Aa.propertyNames=fe.map(function(Me){return Me.name});for(var ge=0;ge<fe.length;ge++){var xe=fe[ge];fe[xe.name]=xe}for(var Se=0;Se<Oe.length;Se++){var Le=Oe[Se],De=fe[Le.pointsTo],Ne={name:Le.name,alias:!0,pointsTo:De};fe.push(Ne),fe[Le.name]=Ne}})(),Aa.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},Aa.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var r=gn({"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","box-selection":"contain","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","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","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","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","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%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(p,b){for(var m=1;m<=Aa.pieBackgroundN;m++){var w=b.name.replace("{{i}}",m),k=b.value;p[w]=k}return p},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(p,b){for(var m=1;m<=Aa.stripeBackgroundN;m++){var w=b.name.replace("{{i}}",m),k=b.value;p[w]=k}return p},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","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,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"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"},{name:"arrow-width",value:1}].reduce(function(p,b){return Aa.arrowPrefixes.forEach(function(m){var w=m+"-"+b.name,k=b.value;p[w]=k}),p},{})),a={},s=0;s<this.properties.length;s++){var c=this.properties[s];if(!c.pointsTo){var l=c.name,h=r[l],d=this.parse(l,h);a[l]=d}}return t.defaultProperties=a,t.defaultProperties},Aa.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 Iw={};Iw.parse=function(t,r,a,s){var c=this;if(Qi(r))return c.parseImplWarn(t,r,a,s);var l=s==="mapping"||s===!0||s===!1||s==null?"dontcare":s,h=a?"t":"f",d=""+r,p=zO(t,d,h,l),b=c.propCache=c.propCache||[],m;return(m=b[p])||(m=b[p]=c.parseImplWarn(t,r,a,s)),(a||s==="mapping")&&(m=al(m),m&&(m.value=al(m.value))),m},Iw.parseImplWarn=function(t,r,a,s){var c=this.parseImpl(t,r,a,s);return!c&&r!=null&&Gr("The style property `".concat(t,": ").concat(r,"` is invalid")),c&&(c.name==="width"||c.name==="height")&&r==="label"&&Gr("The style value of `label` is deprecated for `"+c.name+"`"),c},Iw.parseImpl=function(t,r,a,s){var c=this;t=DC(t);var l=c.properties[t],h=r,d=c.types;if(!l||r===void 0)return null;l.alias&&(l=l.pointsTo,t=l.name);var p=cn(r);p&&(r=r.trim());var b=l.type;if(!b)return null;if(a&&(r===""||r===null))return{name:t,value:r,bypass:!0,deleteBypass:!0};if(Qi(r))return{name:t,value:r,strValue:"fn",mapped:d.fn,bypass:a};var m,w;if(!(!p||s||r.length<7||r[1]!=="a")){if(r.length>=7&&r[0]==="d"&&(m=new RegExp(d.data.regex).exec(r))){if(a)return!1;var k=d.data;return{name:t,value:m,strValue:""+r,mapped:k,field:m[1],bypass:a}}else if(r.length>=10&&r[0]==="m"&&(w=new RegExp(d.mapData.regex).exec(r))){if(a||b.multiple)return!1;var P=d.mapData;if(!(b.color||b.number))return!1;var S=this.parse(t,w[4]);if(!S||S.mapped)return!1;var M=this.parse(t,w[5]);if(!M||M.mapped)return!1;if(S.pfValue===M.pfValue||S.strValue===M.strValue)return Gr("`"+t+": "+r+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+S.strValue+"`"),this.parse(t,S.strValue);if(b.color){var L=S.value,T=M.value,j=L[0]===T[0]&&L[1]===T[1]&&L[2]===T[2]&&(L[3]===T[3]||(L[3]==null||L[3]===1)&&(T[3]==null||T[3]===1));if(j)return!1}return{name:t,value:w,strValue:""+r,mapped:P,field:w[1],fieldMin:parseFloat(w[2]),fieldMax:parseFloat(w[3]),valueMin:S.value,valueMax:M.value,bypass:a}}}if(b.multiple&&s!=="multiple"){var I;if(p?I=r.split(/\s+/):ci(r)?I=r:I=[r],b.evenMultiple&&I.length%2!==0)return null;for(var R=[],B=[],F=[],z="",D=!1,H=0;H<I.length;H++){var Q=c.parse(t,I[H],a,"multiple");D=D||cn(Q.value),R.push(Q.value),F.push(Q.pfValue!=null?Q.pfValue:Q.value),B.push(Q.units),z+=(H>0?" ":"")+Q.strValue}return b.validate&&!b.validate(R,B)?null:b.singleEnum&&D?R.length===1&&cn(R[0])?{name:t,value:R[0],strValue:R[0],bypass:a}:null:{name:t,value:R,pfValue:F,strValue:z,bypass:a,units:B}}var q=function(){for(var De=0;De<b.enums.length;De++){var Ne=b.enums[De];if(Ne===r)return{name:t,value:r,strValue:""+r,bypass:a}}return null};if(b.number){var Z,J="px";if(b.units&&(Z=b.units),b.implicitUnits&&(J=b.implicitUnits),!b.unitless)if(p){var K="px|em"+(b.allowPercent?"|\\%":"");Z&&(K=Z);var ae=r.match("^("+Ka+")("+K+")?$");ae&&(r=ae[1],Z=ae[2]||J)}else(!Z||b.implicitUnits)&&(Z=J);if(r=parseFloat(r),isNaN(r)&&b.enums===void 0)return null;if(isNaN(r)&&b.enums!==void 0)return r=h,q();if(b.integer&&!wse(r)||b.min!==void 0&&(r<b.min||b.strictMin&&r===b.min)||b.max!==void 0&&(r>b.max||b.strictMax&&r===b.max))return null;var se={name:t,value:r,strValue:""+r+(Z||""),units:Z,bypass:a};return b.unitless||Z!=="px"&&Z!=="em"?se.pfValue=r:se.pfValue=Z==="px"||!Z?r:this.getEmSizeInPixels()*r,(Z==="ms"||Z==="s")&&(se.pfValue=Z==="ms"?r:1e3*r),(Z==="deg"||Z==="rad")&&(se.pfValue=Z==="rad"?r:Mue(r)),Z==="%"&&(se.pfValue=r/100),se}else if(b.propList){var le=[],he=""+r;if(he!=="none"){for(var fe=he.split(/\s*,\s*|\s+/),pe=0;pe<fe.length;pe++){var me=fe[pe].trim();c.properties[me]?le.push(me):Gr("`"+me+"` is not a valid property name")}if(le.length===0)return null}return{name:t,value:le,strValue:le.length===0?"none":le.join(" "),bypass:a}}else if(b.color){var Te=mO(r);return Te?{name:t,value:Te,pfValue:Te,strValue:"rgb("+Te[0]+","+Te[1]+","+Te[2]+")",bypass:a}:null}else if(b.regex||b.regexes){if(b.enums){var Oe=q();if(Oe)return Oe}for(var ge=b.regexes?b.regexes:[b.regex],xe=0;xe<ge.length;xe++){var Se=new RegExp(ge[xe]),Le=Se.exec(r);if(Le)return{name:t,value:b.singleRegexMatchValue?Le[1]:Le,strValue:""+r,bypass:a}}return null}else return b.string?{name:t,value:""+r,strValue:""+r,bypass:a}:b.enums?q():null};var go=function(t){if(!(this instanceof go))return new go(t);if(!RC(t)){Ri("A style must have a core reference");return}this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()},qo=go.prototype;qo.instanceString=function(){return"style"},qo.clear=function(){for(var t=this._private,r=t.cy,a=r.elements(),s=0;s<this.length;s++)this[s]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(a,!0),a.forEach(function(c){var l=c[0]._private;l.styleDirty=!0,l.appliedInitStyle=!1}),this},qo.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},qo.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},qo.selector=function(t){var r=t==="core"?null:new Ph(t),a=this.length++;return this[a]={selector:r,properties:[],mappedProperties:[],index:a},this},qo.css=function(){var t=this,r=arguments;if(r.length===1)for(var a=r[0],s=0;s<t.properties.length;s++){var c=t.properties[s],l=a[c.name];l===void 0&&(l=a[Qm(c.name)]),l!==void 0&&this.cssRule(c.name,l)}else r.length===2&&this.cssRule(r[0],r[1]);return this},qo.style=qo.css,qo.cssRule=function(t,r){var a=this.parse(t,r);if(a){var s=this.length-1;this[s].properties.push(a),this[s].properties[a.name]=a,a.name.match(/pie-(\d+)-background-size/)&&a.value&&(this._private.hasPie=!0),a.name.match(/stripe-(\d+)-background-size/)&&a.value&&(this._private.hasStripe=!0),a.mapped&&this[s].mappedProperties.push(a);var c=!this[s].selector;c&&(this._private.coreStyle[a.name]=a)}return this},qo.append=function(t){return gO(t)?t.appendToStyle(this):ci(t)?this.appendFromJson(t):cn(t)&&this.appendFromString(t),this},go.fromJson=function(t,r){var a=new go(t);return a.fromJson(r),a},go.fromString=function(t,r){return new go(t).fromString(r)},[po,N0,MP,ol,Aw,jP,Aa,Iw].forEach(function(t){gn(qo,t)}),go.types=qo.types,go.properties=qo.properties,go.propertyGroups=qo.propertyGroups,go.propertyGroupNames=qo.propertyGroupNames,go.propertyGroupKeys=qo.propertyGroupKeys;var Lfe={style:function(t){if(t){var r=this.setStyle(t);r.update()}return this._private.style},setStyle:function(t){var r=this._private;return gO(t)?r.style=t.generateStyle(this):ci(t)?r.style=go.fromJson(this,t):cn(t)?r.style=go.fromString(this,t):r.style=go(this),r.style},updateStyle:function(){this.mutableElements().updateStyle()}},Ofe="single",Wd={autolock:function(t){if(t!==void 0)this._private.autolock=!!t;else return this._private.autolock;return this},autoungrabify:function(t){if(t!==void 0)this._private.autoungrabify=!!t;else return this._private.autoungrabify;return this},autounselectify:function(t){if(t!==void 0)this._private.autounselectify=!!t;else return this._private.autounselectify;return this},selectionType:function(t){var r=this._private;if(r.selectionType==null&&(r.selectionType=Ofe),t!==void 0)(t==="additive"||t==="single")&&(r.selectionType=t);else return r.selectionType;return this},panningEnabled:function(t){if(t!==void 0)this._private.panningEnabled=!!t;else return this._private.panningEnabled;return this},userPanningEnabled:function(t){if(t!==void 0)this._private.userPanningEnabled=!!t;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(t){if(t!==void 0)this._private.zoomingEnabled=!!t;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(t){if(t!==void 0)this._private.userZoomingEnabled=!!t;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(t){if(t!==void 0)this._private.boxSelectionEnabled=!!t;else return this._private.boxSelectionEnabled;return this},pan:function(){var t=arguments,r=this._private.pan,a,s,c,l,h;switch(t.length){case 0:return r;case 1:if(cn(t[0]))return a=t[0],r[a];if(_r(t[0])){if(!this._private.panningEnabled)return this;c=t[0],l=c.x,h=c.y,Lt(l)&&(r.x=l),Lt(h)&&(r.y=h),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;a=t[0],s=t[1],(a==="x"||a==="y")&&Lt(s)&&(r[a]=s),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(t,r){var a=arguments,s=this._private.pan,c,l,h,d,p;if(!this._private.panningEnabled)return this;switch(a.length){case 1:_r(t)&&(h=a[0],d=h.x,p=h.y,Lt(d)&&(s.x+=d),Lt(p)&&(s.y+=p),this.emit("pan viewport"));break;case 2:c=t,l=r,(c==="x"||c==="y")&&Lt(l)&&(s[c]+=l),this.emit("pan viewport");break}return this.notify("viewport"),this},gc:function(){this.notify("gc")},fit:function(t,r){var a=this.getFitViewport(t,r);if(a){var s=this._private;s.zoom=a.zoom,s.pan=a.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(t,r){if(Lt(t)&&r===void 0&&(r=t,t=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var a;if(cn(t)){var s=t;t=this.$(s)}else if(_se(t)){var c=t;a={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},a.w=a.x2-a.x1,a.h=a.y2-a.y1}else du(t)||(t=this.mutableElements());if(!(du(t)&&t.empty())){a=a||t.boundingBox();var l=this.width(),h=this.height(),d;if(r=Lt(r)?r:0,!isNaN(l)&&!isNaN(h)&&l>0&&h>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){d=Math.min((l-2*r)/a.w,(h-2*r)/a.h),d=d>this._private.maxZoom?this._private.maxZoom:d,d=d<this._private.minZoom?this._private.minZoom:d;var p={x:(l-d*(a.x1+a.x2))/2,y:(h-d*(a.y1+a.y2))/2};return{zoom:d,pan:p}}}}},zoomRange:function(t,r){var a=this._private;if(r==null){var s=t;t=s.min,r=s.max}return Lt(t)&&Lt(r)&&t<=r?(a.minZoom=t,a.maxZoom=r):Lt(t)&&r===void 0&&t<=a.maxZoom?a.minZoom=t:Lt(r)&&t===void 0&&r>=a.minZoom&&(a.maxZoom=r),this},minZoom:function(t){return t===void 0?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return t===void 0?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var r=this._private,a=r.pan,s=r.zoom,c,l,h=!1;if(r.zoomingEnabled||(h=!0),Lt(t)?l=t:_r(t)&&(l=t.level,t.position!=null?c=rw(t.position,s,a):t.renderedPosition!=null&&(c=t.renderedPosition),c!=null&&!r.panningEnabled&&(h=!0)),l=l>r.maxZoom?r.maxZoom:l,l=l<r.minZoom?r.minZoom:l,h||!Lt(l)||l===s||c!=null&&(!Lt(c.x)||!Lt(c.y)))return null;if(c!=null){var d=a,p=s,b=l,m={x:-b/p*(c.x-d.x)+c.x,y:-b/p*(c.y-d.y)+c.y};return{zoomed:!0,panned:!0,zoom:b,pan:m}}else return{zoomed:!0,panned:!1,zoom:l,pan:a}},zoom:function(t){if(t===void 0)return this._private.zoom;var r=this.getZoomedViewport(t),a=this._private;return r==null||!r.zoomed?this:(a.zoom=r.zoom,r.panned&&(a.pan.x=r.pan.x,a.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(t){var r=this._private,a=!0,s=!0,c=[],l=!1,h=!1;if(!t)return this;if(Lt(t.zoom)||(a=!1),_r(t.pan)||(s=!1),!a&&!s)return this;if(a){var d=t.zoom;d<r.minZoom||d>r.maxZoom||!r.zoomingEnabled?l=!0:(r.zoom=d,c.push("zoom"))}if(s&&(!l||!t.cancelOnFailedZoom)&&r.panningEnabled){var p=t.pan;Lt(p.x)&&(r.pan.x=p.x,h=!1),Lt(p.y)&&(r.pan.y=p.y,h=!1),h||c.push("pan")}return c.length>0&&(c.push("viewport"),this.emit(c.join(" ")),this.notify("viewport")),this},center:function(t){var r=this.getCenterPan(t);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,r){if(this._private.panningEnabled){if(cn(t)){var a=t;t=this.mutableElements().filter(a)}else du(t)||(t=this.mutableElements());if(t.length!==0){var s=t.boundingBox(),c=this.width(),l=this.height();r=r===void 0?this._private.zoom:r;var h={x:(c-r*(s.x1+s.x2))/2,y:(l-r*(s.y1+s.y2))/2};return h}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t=this._private,r=t.container,a=this;return t.sizeCache=t.sizeCache||(r?function(){var s=a.window().getComputedStyle(r),c=function(l){return parseFloat(s.getPropertyValue(l))};return{width:r.clientWidth-c("padding-left")-c("padding-right"),height:r.clientHeight-c("padding-top")-c("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,r=this._private.zoom,a=this.renderedExtent(),s={x1:(a.x1-t.x)/r,x2:(a.x2-t.x)/r,y1:(a.y1-t.y)/r,y2:(a.y2-t.y)/r};return s.w=s.x2-s.x1,s.h=s.y2-s.y1,s},renderedExtent:function(){var t=this.width(),r=this.height();return{x1:0,y1:0,x2:t,y2:r,w:t,h:r}},multiClickDebounceTime:function(t){if(t)this._private.multiClickDebounceTime=t;else return this._private.multiClickDebounceTime;return this}};Wd.centre=Wd.center,Wd.autolockNodes=Wd.autolock,Wd.autoungrabifyNodes=Wd.autoungrabify;var T0={data:Hr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Hr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Hr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Hr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};T0.attr=T0.data,T0.removeAttr=T0.removeData;var M0=function(t){var r=this;t=gn({},t);var a=t.container;a&&!Km(a)&&Km(a[0])&&(a=a[0]);var s=a?a._cyreg:null;s=s||{},s&&s.cy&&(s.cy.destroy(),s={});var c=s.readies=s.readies||[];a&&(a._cyreg=s),s.cy=r;var l=$a!==void 0&&a!==void 0&&!t.headless,h=t;h.layout=gn({name:l?"grid":"null"},h.layout),h.renderer=gn({name:l?"canvas":"null"},h.renderer);var d=function(k,P,S){return P!==void 0?P:S!==void 0?S:k},p=this._private={container:a,ready:!1,options:h,elements:new jo(this),listeners:[],aniEles:new jo(this),data:h.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:d(!0,h.zoomingEnabled),userZoomingEnabled:d(!0,h.userZoomingEnabled),panningEnabled:d(!0,h.panningEnabled),userPanningEnabled:d(!0,h.userPanningEnabled),boxSelectionEnabled:d(!0,h.boxSelectionEnabled),autolock:d(!1,h.autolock,h.autolockNodes),autoungrabify:d(!1,h.autoungrabify,h.autoungrabifyNodes),autounselectify:d(!1,h.autounselectify),styleEnabled:h.styleEnabled===void 0?l:h.styleEnabled,zoom:Lt(h.zoom)?h.zoom:1,pan:{x:_r(h.pan)&&Lt(h.pan.x)?h.pan.x:0,y:_r(h.pan)&&Lt(h.pan.y)?h.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:d(250,h.multiClickDebounceTime)};this.createEmitter(),this.selectionType(h.selectionType),this.zoomRange({min:h.minZoom,max:h.maxZoom});var b=function(k,P){var S=k.some(Ese);if(S)return Ig.all(k).then(P);P(k)};p.styleEnabled&&r.setStyle([]);var m=gn({},h,h.renderer);r.initRenderer(m);var w=function(k,P,S){r.notifications(!1);var M=r.mutableElements();M.length>0&&M.remove(),k!=null&&(_r(k)||ci(k))&&r.add(k),r.one("layoutready",function(T){r.notifications(!0),r.emit(T),r.one("load",P),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",S),r.emit("done")});var L=gn({},r._private.options.layout);L.eles=r.elements(),r.layout(L).run()};b([h.style,h.elements],function(k){var P=k[0],S=k[1];p.styleEnabled&&r.style().append(P),w(S,function(){r.startAnimationLoop(),p.ready=!0,Qi(h.ready)&&r.on("ready",h.ready);for(var M=0;M<c.length;M++){var L=c[M];r.on("ready",L)}s&&(s.readies=[]),r.emit("ready")},h.done)})},Lw=M0.prototype;gn(Lw,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(t){return this.isReady()?this.emitter().emit("ready",[],t):this.on("ready",t),this},destroy:function(){var t=this;if(!t.destroyed())return t.stopAnimationLoop(),t.destroyRenderer(),this.emit("destroy"),t._private.destroyed=!0,t},hasElementWithId:function(t){return this._private.elements.hasElementWithId(t)},getElementById:function(t){return this._private.elements.getElementById(t)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(t){return this._private.elements.merge(t),this},removeFromPool:function(t){return this._private.elements.unmerge(t),this},container:function(){return this._private.container||null},window:function(){var t=this._private.container;if(t==null)return $a;var r=this._private.container.ownerDocument;return r===void 0||r==null?$a:r.defaultView||$a},mount:function(t){if(t!=null){var r=this,a=r._private,s=a.options;return!Km(t)&&Km(t[0])&&(t=t[0]),r.stopAnimationLoop(),r.destroyRenderer(),a.container=t,a.styleEnabled=!0,r.invalidateSize(),r.initRenderer(gn({},s,s.renderer,{name:s.renderer.name==="null"?"canvas":s.renderer.name})),r.startAnimationLoop(),r.style(s.style),r.emit("mount"),r}},unmount:function(){var t=this;return t.stopAnimationLoop(),t.destroyRenderer(),t.initRenderer({name:"null"}),t.emit("unmount"),t},options:function(){return al(this._private.options)},json:function(t){var r=this,a=r._private,s=r.mutableElements(),c=function(j){return r.getElementById(j.id())};if(_r(t)){if(r.startBatch(),t.elements){var l={},h=function(j,I){for(var R=[],B=[],F=0;F<j.length;F++){var z=j[F];if(!z.data.id){Gr("cy.json() cannot handle elements without an ID attribute");continue}var D=""+z.data.id,H=r.getElementById(D);l[D]=!0,H.length!==0?B.push({ele:H,json:z}):(I&&(z.group=I),R.push(z))}r.add(R);for(var Q=0;Q<B.length;Q++){var q=B[Q],Z=q.ele,J=q.json;Z.json(J)}};if(ci(t.elements))h(t.elements);else for(var d=["nodes","edges"],p=0;p<d.length;p++){var b=d[p],m=t.elements[b];ci(m)&&h(m,b)}var w=r.collection();s.filter(function(j){return!l[j.id()]}).forEach(function(j){j.isParent()?w.merge(j):j.remove()}),w.forEach(function(j){return j.children().move({parent:null})}),w.forEach(function(j){return c(j).remove()})}t.style&&r.style(t.style),t.zoom!=null&&t.zoom!==a.zoom&&r.zoom(t.zoom),t.pan&&(t.pan.x!==a.pan.x||t.pan.y!==a.pan.y)&&r.pan(t.pan),t.data&&r.data(t.data);for(var k=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],P=0;P<k.length;P++){var S=k[P];t[S]!=null&&r[S](t[S])}return r.endBatch(),this}else{var M=!!t,L={};M?L.elements=this.elements().map(function(j){return j.json()}):(L.elements={},s.forEach(function(j){var I=j.group();L.elements[I]||(L.elements[I]=[]),L.elements[I].push(j.json())})),this._private.styleEnabled&&(L.style=r.style().json()),L.data=al(r.data());var T=a.options;return L.zoomingEnabled=a.zoomingEnabled,L.userZoomingEnabled=a.userZoomingEnabled,L.zoom=a.zoom,L.minZoom=a.minZoom,L.maxZoom=a.maxZoom,L.panningEnabled=a.panningEnabled,L.userPanningEnabled=a.userPanningEnabled,L.pan=al(a.pan),L.boxSelectionEnabled=a.boxSelectionEnabled,L.renderer=al(T.renderer),L.hideEdgesOnViewport=T.hideEdgesOnViewport,L.textureOnViewport=T.textureOnViewport,L.wheelSensitivity=T.wheelSensitivity,L.motionBlur=T.motionBlur,L.multiClickDebounceTime=T.multiClickDebounceTime,L}}}),Lw.$id=Lw.getElementById,[Efe,Tfe,gD,NP,Mw,jfe,TP,jw,Lfe,Wd,T0].forEach(function(t){gn(Lw,t)});var Rfe={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}},Dfe={maximal:!1,acyclic:!1},zg=function(t){return t.scratch("breadthfirst")},bD=function(t,r){return t.scratch("breadthfirst",r)};function vD(t){this.options=gn({},Rfe,Dfe,t)}vD.prototype.run=function(){var t=this.options,r=t.cy,a=t.eles,s=a.nodes().filter(function(st){return st.isChildless()}),c=a,l=t.directed,h=t.acyclic||t.maximal||t.maximalAdjustments>0,d=!!t.boundingBox,p=ss(d?t.boundingBox:structuredClone(r.extent())),b;if(du(t.roots))b=t.roots;else if(ci(t.roots)){for(var m=[],w=0;w<t.roots.length;w++){var k=t.roots[w],P=r.getElementById(k);m.push(P)}b=r.collection(m)}else if(cn(t.roots))b=r.$(t.roots);else if(l)b=s.roots();else{var S=a.components();b=r.collection();for(var M=function(){var st=S[L],Rt=st.maxDegree(!1),It=st.filter(function(Dt){return Dt.degree(!1)===Rt});b=b.add(It)},L=0;L<S.length;L++)M()}var T=[],j={},I=function(st,Rt){T[Rt]==null&&(T[Rt]=[]);var It=T[Rt].length;T[Rt].push(st),bD(st,{index:It,depth:Rt})},R=function(st,Rt){var It=zg(st),Dt=It.depth,Ut=It.index;T[Dt][Ut]=null,st.isChildless()&&I(st,Rt)};c.bfs({roots:b,directed:t.directed,visit:function(st,Rt,It,Dt,Ut){var bn=st[0],sn=bn.id();bn.isChildless()&&I(bn,Ut),j[sn]=!0}});for(var B=[],F=0;F<s.length;F++){var z=s[F];j[z.id()]||B.push(z)}var D=function(st){for(var Rt=T[st],It=0;It<Rt.length;It++){var Dt=Rt[It];if(Dt==null){Rt.splice(It,1),It--;continue}bD(Dt,{depth:st,index:It})}},H=function(st,Rt){for(var It=zg(st),Dt=st.incomers().filter(function(ue){return ue.isNode()&&a.has(ue)}),Ut=-1,bn=st.id(),sn=0;sn<Dt.length;sn++){var ir=Dt[sn],U=zg(ir);Ut=Math.max(Ut,U.depth)}if(It.depth<=Ut){if(!t.acyclic&&Rt[bn])return null;var ne=Ut+1;return R(st,ne),Rt[bn]=ne,!0}return!1};if(l&&h){var Q=[],q={},Z=function(st){return Q.push(st)},J=function(){return Q.shift()};for(s.forEach(function(st){return Q.push(st)});Q.length>0;){var K=J(),ae=H(K,q);if(ae)K.outgoers().filter(function(st){return st.isNode()&&a.has(st)}).forEach(Z);else if(ae===null){Gr("Detected double maximal shift for node `"+K.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var se=0;if(t.avoidOverlap)for(var le=0;le<s.length;le++){var he=s[le],fe=he.layoutDimensions(t),pe=fe.w,me=fe.h;se=Math.max(se,pe,me)}var Te={},Oe=function(st){if(Te[st.id()])return Te[st.id()];for(var Rt=zg(st).depth,It=st.neighborhood(),Dt=0,Ut=0,bn=0;bn<It.length;bn++){var sn=It[bn];if(!(sn.isEdge()||sn.isParent()||!s.has(sn))){var ir=zg(sn);if(ir!=null){var U=ir.index,ne=ir.depth;if(!(U==null||ne==null)){var ue=T[ne].length;ne<Rt&&(Dt+=U/ue,Ut++)}}}}return Ut=Math.max(1,Ut),Dt=Dt/Ut,Ut===0&&(Dt=0),Te[st.id()]=Dt,Dt},ge=function(st,Rt){var It=Oe(st),Dt=Oe(Rt),Ut=It-Dt;return Ut===0?yO(st.id(),Rt.id()):Ut};t.depthSort!==void 0&&(ge=t.depthSort);for(var xe=T.length,Se=0;Se<xe;Se++)T[Se].sort(ge),D(Se);for(var Le=[],De=0;De<B.length;De++)Le.push(B[De]);var Ne=function(){for(var st=0;st<xe;st++)D(st)};Le.length&&(T.unshift(Le),xe=T.length,Ne());for(var Me=0,ke=0;ke<xe;ke++)Me=Math.max(T[ke].length,Me);var He={x:p.x1+p.w/2,y:p.y1+p.h/2},Qe=s.reduce(function(st,Rt){return function(It){return{w:st.w===-1?It.w:(st.w+It.w)/2,h:st.h===-1?It.h:(st.h+It.h)/2}}(Rt.boundingBox({includeLabels:t.nodeDimensionsIncludeLabels}))},{w:-1,h:-1}),it=Math.max(xe===1?0:d?(p.h-t.padding*2-Qe.h)/(xe-1):(p.h-t.padding*2-Qe.h)/(xe+1),se),ft=T.reduce(function(st,Rt){return Math.max(st,Rt.length)},0),ze=function(st){var Rt=zg(st),It=Rt.depth,Dt=Rt.index;if(t.circle){var Ut=Math.min(p.w/2/xe,p.h/2/xe);Ut=Math.max(Ut,se);var bn=Ut*It+Ut-(xe>0&&T[0].length<=3?Ut/2:0),sn=2*Math.PI/T[It].length*Dt;return It===0&&T[0].length===1&&(bn=1),{x:He.x+bn*Math.cos(sn),y:He.y+bn*Math.sin(sn)}}else{var ir=T[It].length,U=Math.max(ir===1?0:d?(p.w-t.padding*2-Qe.w)/((t.grid?ft:ir)-1):(p.w-t.padding*2-Qe.w)/((t.grid?ft:ir)+1),se),ne={x:He.x+(Dt+1-(ir+1)/2)*U,y:He.y+(It+1-(xe+1)/2)*it};return ne}},$e={downward:0,leftward:90,upward:180,rightward:-90};Object.keys($e).indexOf(t.direction)===-1&&Ri("Invalid direction '".concat(t.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys($e).join(", ")));var xt=function(st){return Xse(ze(st),p,$e[t.direction])};return a.nodes().layoutPositions(this,t,xt),this};var Bfe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function yD(t){this.options=gn({},Bfe,t)}yD.prototype.run=function(){var t=this.options,r=t,a=t.cy,s=r.eles,c=r.counterclockwise!==void 0?!r.counterclockwise:r.clockwise,l=s.nodes().not(":parent");r.sort&&(l=l.sort(r.sort));for(var h=ss(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),d={x:h.x1+h.w/2,y:h.y1+h.h/2},p=r.sweep===void 0?2*Math.PI-2*Math.PI/l.length:r.sweep,b=p/Math.max(1,l.length-1),m,w=0,k=0;k<l.length;k++){var P=l[k],S=P.layoutDimensions(r),M=S.w,L=S.h;w=Math.max(w,M,L)}if(Lt(r.radius)?m=r.radius:l.length<=1?m=0:m=Math.min(h.h,h.w)/2-w,l.length>1&&r.avoidOverlap){w*=1.75;var T=Math.cos(b)-Math.cos(0),j=Math.sin(b)-Math.sin(0),I=Math.sqrt(w*w/(T*T+j*j));m=Math.max(I,m)}var R=function(B,F){var z=r.startAngle+F*b*(c?1:-1),D=m*Math.cos(z),H=m*Math.sin(z),Q={x:d.x+D,y:d.y+H};return Q};return s.nodes().layoutPositions(this,r,R),this};var Gfe={fit:!0,padding:30,startAngle:3/2*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(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function mD(t){this.options=gn({},Gfe,t)}mD.prototype.run=function(){for(var t=this.options,r=t,a=r.counterclockwise!==void 0?!r.counterclockwise:r.clockwise,s=t.cy,c=r.eles,l=c.nodes().not(":parent"),h=ss(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:s.width(),h:s.height()}),d={x:h.x1+h.w/2,y:h.y1+h.h/2},p=[],b=0,m=0;m<l.length;m++){var w=l[m],k=void 0;k=r.concentric(w),p.push({value:k,node:w}),w._private.scratch.concentric=k}l.updateStyle();for(var P=0;P<l.length;P++){var S=l[P],M=S.layoutDimensions(r);b=Math.max(b,M.w,M.h)}p.sort(function(it,ft){return ft.value-it.value});for(var L=r.levelWidth(l),T=[[]],j=T[0],I=0;I<p.length;I++){var R=p[I];if(j.length>0){var B=Math.abs(j[0].value-R.value);B>=L&&(j=[],T.push(j))}j.push(R)}var F=b+r.minNodeSpacing;if(!r.avoidOverlap){var z=T.length>0&&T[0].length>1,D=Math.min(h.w,h.h)/2-F,H=D/(T.length+z?1:0);F=Math.min(F,H)}for(var Q=0,q=0;q<T.length;q++){var Z=T[q],J=r.sweep===void 0?2*Math.PI-2*Math.PI/Z.length:r.sweep,K=Z.dTheta=J/Math.max(1,Z.length-1);if(Z.length>1&&r.avoidOverlap){var ae=Math.cos(K)-Math.cos(0),se=Math.sin(K)-Math.sin(0),le=Math.sqrt(F*F/(ae*ae+se*se));Q=Math.max(le,Q)}Z.r=Q,Q+=F}if(r.equidistant){for(var he=0,fe=0,pe=0;pe<T.length;pe++){var me=T[pe],Te=me.r-fe;he=Math.max(he,Te)}fe=0;for(var Oe=0;Oe<T.length;Oe++){var ge=T[Oe];Oe===0&&(fe=ge.r),ge.r=fe,fe+=he}}for(var xe={},Se=0;Se<T.length;Se++)for(var Le=T[Se],De=Le.dTheta,Ne=Le.r,Me=0;Me<Le.length;Me++){var ke=Le[Me],He=r.startAngle+(a?1:-1)*De*Me,Qe={x:d.x+Ne*Math.cos(He),y:d.y+Ne*Math.sin(He)};xe[ke.node.id()]=Qe}return c.nodes().layoutPositions(this,r,function(it){var ft=it.id();return xe[ft]}),this};var AP,Hfe={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(t,r){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(t){return 2048},nodeOverlap:4,idealEdgeLength:function(t){return 32},edgeElasticity:function(t){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function Ow(t){this.options=gn({},Hfe,t),this.options.layout=this;var r=this.options.eles.nodes(),a=this.options.eles.edges(),s=a.filter(function(c){var l=c.source().data("id"),h=c.target().data("id"),d=r.some(function(b){return b.data("id")===l}),p=r.some(function(b){return b.data("id")===h});return!d||!p});this.options.eles=this.options.eles.not(s)}Ow.prototype.run=function(){var t=this.options,r=t.cy,a=this;a.stopped=!1,(t.animate===!0||t.animate===!1)&&a.emit({type:"layoutstart",layout:a}),t.debug===!0?AP=!0:AP=!1;var s=zfe(r,a,t);AP&&Ufe(s),t.randomize&&Yfe(s);var c=hf(),l=function(){Vfe(s,r,t),t.fit===!0&&r.fit(t.padding)},h=function(w){return!(a.stopped||w>=t.numIter||(qfe(s,t),s.temperature=s.temperature*t.coolingFactor,s.temperature<t.minTemp))},d=function(){if(t.animate===!0||t.animate===!1)l(),a.one("layoutstop",t.stop),a.emit({type:"layoutstop",layout:a});else{var w=t.eles.nodes(),k=xD(s,t,w);w.layoutPositions(a,t,k)}},p=0,b=!0;if(t.animate===!0){var m=function(){for(var w=0;b&&w<t.refresh;)b=h(p),p++,w++;if(!b)ED(s,t),d();else{var k=hf();k-c>=t.animationThreshold&&l(),Xm(m)}};m()}else{for(;b;)b=h(p),p++;ED(s,t),d()}return this},Ow.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Ow.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var zfe=function(t,r,a){for(var s=a.eles.edges(),c=a.eles.nodes(),l=ss(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),h={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:c.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:s.size(),temperature:a.initialTemp,clientWidth:l.w,clientHeight:l.h,boundingBox:l},d=a.eles.components(),p={},b=0;b<d.length;b++)for(var m=d[b],w=0;w<m.length;w++){var k=m[w];p[k.id()]=b}for(var b=0;b<h.nodeSize;b++){var P=c[b],S=P.layoutDimensions(a),M={};M.isLocked=P.locked(),M.id=P.data("id"),M.parentId=P.data("parent"),M.cmptId=p[P.id()],M.children=[],M.positionX=P.position("x"),M.positionY=P.position("y"),M.offsetX=0,M.offsetY=0,M.height=S.w,M.width=S.h,M.maxX=M.positionX+M.width/2,M.minX=M.positionX-M.width/2,M.maxY=M.positionY+M.height/2,M.minY=M.positionY-M.height/2,M.padLeft=parseFloat(P.style("padding")),M.padRight=parseFloat(P.style("padding")),M.padTop=parseFloat(P.style("padding")),M.padBottom=parseFloat(P.style("padding")),M.nodeRepulsion=Qi(a.nodeRepulsion)?a.nodeRepulsion(P):a.nodeRepulsion,h.layoutNodes.push(M),h.idToIndex[M.id]=b}for(var L=[],T=0,j=-1,I=[],b=0;b<h.nodeSize;b++){var P=h.layoutNodes[b],R=P.parentId;R!=null?h.layoutNodes[h.idToIndex[R]].children.push(P.id):(L[++j]=P.id,I.push(P.id))}for(h.graphSet.push(I);T<=j;){var B=L[T++],F=h.idToIndex[B],k=h.layoutNodes[F],z=k.children;if(z.length>0){h.graphSet.push(z);for(var b=0;b<z.length;b++)L[++j]=z[b]}}for(var b=0;b<h.graphSet.length;b++)for(var D=h.graphSet[b],w=0;w<D.length;w++){var H=h.idToIndex[D[w]];h.indexToGraph[H]=b}for(var b=0;b<h.edgeSize;b++){var Q=s[b],q={};q.id=Q.data("id"),q.sourceId=Q.data("source"),q.targetId=Q.data("target");var Z=Qi(a.idealEdgeLength)?a.idealEdgeLength(Q):a.idealEdgeLength,J=Qi(a.edgeElasticity)?a.edgeElasticity(Q):a.edgeElasticity,K=h.idToIndex[q.sourceId],ae=h.idToIndex[q.targetId],se=h.indexToGraph[K],le=h.indexToGraph[ae];if(se!=le){for(var he=Ffe(q.sourceId,q.targetId,h),fe=h.graphSet[he],pe=0,M=h.layoutNodes[K];fe.indexOf(M.id)===-1;)M=h.layoutNodes[h.idToIndex[M.parentId]],pe++;for(M=h.layoutNodes[ae];fe.indexOf(M.id)===-1;)M=h.layoutNodes[h.idToIndex[M.parentId]],pe++;Z*=pe*a.nestingFactor}q.idealLength=Z,q.elasticity=J,h.layoutEdges.push(q)}return h},Ffe=function(t,r,a){var s=wD(t,r,0,a);return 2>s.count?0:s.graph},wD=function(t,r,a,s){var c=s.graphSet[a];if(-1<c.indexOf(t)&&-1<c.indexOf(r))return{count:2,graph:a};for(var l=0,h=0;h<c.length;h++){var d=c[h],p=s.idToIndex[d],b=s.layoutNodes[p].children;if(b.length!==0){var m=s.indexToGraph[s.idToIndex[b[0]]],w=wD(t,r,m,s);if(w.count!==0)if(w.count===1){if(l++,l===2)break}else return w}}return{count:l,graph:a}},Ufe,Yfe=function(t,r){for(var a=t.clientWidth,s=t.clientHeight,c=0;c<t.nodeSize;c++){var l=t.layoutNodes[c];l.children.length===0&&!l.isLocked&&(l.positionX=Math.random()*a,l.positionY=Math.random()*s)}},xD=function(t,r,a){var s=t.boundingBox,c={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(a.forEach(function(l){var h=t.layoutNodes[t.idToIndex[l.data("id")]];c.x1=Math.min(c.x1,h.positionX),c.x2=Math.max(c.x2,h.positionX),c.y1=Math.min(c.y1,h.positionY),c.y2=Math.max(c.y2,h.positionY)}),c.w=c.x2-c.x1,c.h=c.y2-c.y1),function(l,h){var d=t.layoutNodes[t.idToIndex[l.data("id")]];if(r.boundingBox){var p=c.w===0?.5:(d.positionX-c.x1)/c.w,b=c.h===0?.5:(d.positionY-c.y1)/c.h;return{x:s.x1+p*s.w,y:s.y1+b*s.h}}else return{x:d.positionX,y:d.positionY}}},Vfe=function(t,r,a){var s=a.layout,c=a.eles.nodes(),l=xD(t,a,c);c.positions(l),t.ready!==!0&&(t.ready=!0,s.one("layoutready",a.ready),s.emit({type:"layoutready",layout:this}))},qfe=function(t,r,a){Zfe(t,r),Qfe(t),Wfe(t,r),Jfe(t),Xfe(t)},Zfe=function(t,r){for(var a=0;a<t.graphSet.length;a++)for(var s=t.graphSet[a],c=s.length,l=0;l<c;l++)for(var h=t.layoutNodes[t.idToIndex[s[l]]],d=l+1;d<c;d++){var p=t.layoutNodes[t.idToIndex[s[d]]];$fe(h,p,t,r)}},kD=function(t){return-1+2*t*Math.random()},$fe=function(t,r,a,s){var c=t.cmptId,l=r.cmptId;if(!(c!==l&&!a.isCompound)){var h=r.positionX-t.positionX,d=r.positionY-t.positionY,p=1;h===0&&d===0&&(h=kD(p),d=kD(p));var b=Kfe(t,r,h,d);if(b>0)var L=s.nodeOverlap*b,M=Math.sqrt(h*h+d*d),T=L*h/M,j=L*d/M;else var m=Rw(t,h,d),w=Rw(r,-1*h,-1*d),k=w.x-m.x,P=w.y-m.y,S=k*k+P*P,M=Math.sqrt(S),L=(t.nodeRepulsion+r.nodeRepulsion)/S,T=L*k/M,j=L*P/M;t.isLocked||(t.offsetX-=T,t.offsetY-=j),r.isLocked||(r.offsetX+=T,r.offsetY+=j)}},Kfe=function(t,r,a,s){if(a>0)var c=t.maxX-r.minX;else var c=r.maxX-t.minX;if(s>0)var l=t.maxY-r.minY;else var l=r.maxY-t.minY;return c>=0&&l>=0?Math.sqrt(c*c+l*l):0},Rw=function(t,r,a){var s=t.positionX,c=t.positionY,l=t.height||1,h=t.width||1,d=a/r,p=l/h,b={};return r===0&&0<a||r===0&&0>a?(b.x=s,b.y=c+l/2,b):0<r&&-1*p<=d&&d<=p?(b.x=s+h/2,b.y=c+h*a/2/r,b):0>r&&-1*p<=d&&d<=p?(b.x=s-h/2,b.y=c-h*a/2/r,b):0<a&&(d<=-1*p||d>=p)?(b.x=s+l*r/2/a,b.y=c+l/2,b):(0>a&&(d<=-1*p||d>=p)&&(b.x=s-l*r/2/a,b.y=c-l/2),b)},Qfe=function(t,r){for(var a=0;a<t.edgeSize;a++){var s=t.layoutEdges[a],c=t.idToIndex[s.sourceId],l=t.layoutNodes[c],h=t.idToIndex[s.targetId],d=t.layoutNodes[h],p=d.positionX-l.positionX,b=d.positionY-l.positionY;if(!(p===0&&b===0)){var m=Rw(l,p,b),w=Rw(d,-1*p,-1*b),k=w.x-m.x,P=w.y-m.y,S=Math.sqrt(k*k+P*P),M=Math.pow(s.idealLength-S,2)/s.elasticity;if(S!==0)var L=M*k/S,T=M*P/S;else var L=0,T=0;l.isLocked||(l.offsetX+=L,l.offsetY+=T),d.isLocked||(d.offsetX-=L,d.offsetY-=T)}}},Wfe=function(t,r){if(r.gravity!==0)for(var a=1,s=0;s<t.graphSet.length;s++){var c=t.graphSet[s],l=c.length;if(s===0)var p=t.clientHeight/2,b=t.clientWidth/2;else var h=t.layoutNodes[t.idToIndex[c[0]]],d=t.layoutNodes[t.idToIndex[h.parentId]],p=d.positionX,b=d.positionY;for(var m=0;m<l;m++){var w=t.layoutNodes[t.idToIndex[c[m]]];if(!w.isLocked){var k=p-w.positionX,P=b-w.positionY,S=Math.sqrt(k*k+P*P);if(S>a){var M=r.gravity*k/S,L=r.gravity*P/S;w.offsetX+=M,w.offsetY+=L}}}}},Jfe=function(t,r){var a=[],s=0,c=-1;for(a.push.apply(a,t.graphSet[0]),c+=t.graphSet[0].length;s<=c;){var l=a[s++],h=t.idToIndex[l],d=t.layoutNodes[h],p=d.children;if(0<p.length&&!d.isLocked){for(var b=d.offsetX,m=d.offsetY,w=0;w<p.length;w++){var k=t.layoutNodes[t.idToIndex[p[w]]];k.offsetX+=b,k.offsetY+=m,a[++c]=p[w]}d.offsetX=0,d.offsetY=0}}},Xfe=function(t,r){for(var a=0;a<t.nodeSize;a++){var s=t.layoutNodes[a];0<s.children.length&&(s.maxX=void 0,s.minX=void 0,s.maxY=void 0,s.minY=void 0)}for(var a=0;a<t.nodeSize;a++){var s=t.layoutNodes[a];if(!(0<s.children.length||s.isLocked)){var c=ehe(s.offsetX,s.offsetY,t.temperature);s.positionX+=c.x,s.positionY+=c.y,s.offsetX=0,s.offsetY=0,s.minX=s.positionX-s.width,s.maxX=s.positionX+s.width,s.minY=s.positionY-s.height,s.maxY=s.positionY+s.height,_D(s,t)}}for(var a=0;a<t.nodeSize;a++){var s=t.layoutNodes[a];0<s.children.length&&!s.isLocked&&(s.positionX=(s.maxX+s.minX)/2,s.positionY=(s.maxY+s.minY)/2,s.width=s.maxX-s.minX,s.height=s.maxY-s.minY)}},ehe=function(t,r,a){var s=Math.sqrt(t*t+r*r);if(s>a)var c={x:a*t/s,y:a*r/s};else var c={x:t,y:r};return c},_D=function(t,r){var a=t.parentId;if(a!=null){var s=r.layoutNodes[r.idToIndex[a]],c=!1;if((s.maxX==null||t.maxX+s.padRight>s.maxX)&&(s.maxX=t.maxX+s.padRight,c=!0),(s.minX==null||t.minX-s.padLeft<s.minX)&&(s.minX=t.minX-s.padLeft,c=!0),(s.maxY==null||t.maxY+s.padBottom>s.maxY)&&(s.maxY=t.maxY+s.padBottom,c=!0),(s.minY==null||t.minY-s.padTop<s.minY)&&(s.minY=t.minY-s.padTop,c=!0),c)return _D(s,r)}},ED=function(t,r){for(var a=t.layoutNodes,s=[],c=0;c<a.length;c++){var l=a[c],h=l.cmptId,d=s[h]=s[h]||[];d.push(l)}for(var p=0,c=0;c<s.length;c++){var b=s[c];if(b){b.x1=1/0,b.x2=-1/0,b.y1=1/0,b.y2=-1/0;for(var m=0;m<b.length;m++){var w=b[m];b.x1=Math.min(b.x1,w.positionX-w.width/2),b.x2=Math.max(b.x2,w.positionX+w.width/2),b.y1=Math.min(b.y1,w.positionY-w.height/2),b.y2=Math.max(b.y2,w.positionY+w.height/2)}b.w=b.x2-b.x1,b.h=b.y2-b.y1,p+=b.w*b.h}}s.sort(function(T,j){return j.w*j.h-T.w*T.h});for(var k=0,P=0,S=0,M=0,L=Math.sqrt(p)*t.clientWidth/t.clientHeight,c=0;c<s.length;c++){var b=s[c];if(b){for(var m=0;m<b.length;m++){var w=b[m];w.isLocked||(w.positionX+=k-b.x1,w.positionY+=P-b.y1)}k+=b.w+r.componentSpacing,S+=b.w+r.componentSpacing,M=Math.max(M,b.h),S>L&&(P+=M+r.componentSpacing,k=0,S=0,M=0)}}},the={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(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function CD(t){this.options=gn({},the,t)}CD.prototype.run=function(){var t=this.options,r=t,a=t.cy,s=r.eles,c=s.nodes().not(":parent");r.sort&&(c=c.sort(r.sort));var l=ss(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()});if(l.h===0||l.w===0)s.nodes().layoutPositions(this,r,function(Oe){return{x:l.x1,y:l.y1}});else{var h=c.size(),d=Math.sqrt(h*l.h/l.w),p=Math.round(d),b=Math.round(l.w/l.h*d),m=function(Oe){if(Oe==null)return Math.min(p,b);var ge=Math.min(p,b);ge==p?p=Oe:b=Oe},w=function(Oe){if(Oe==null)return Math.max(p,b);var ge=Math.max(p,b);ge==p?p=Oe:b=Oe},k=r.rows,P=r.cols!=null?r.cols:r.columns;if(k!=null&&P!=null)p=k,b=P;else if(k!=null&&P==null)p=k,b=Math.ceil(h/p);else if(k==null&&P!=null)b=P,p=Math.ceil(h/b);else if(b*p>h){var S=m(),M=w();(S-1)*M>=h?m(S-1):(M-1)*S>=h&&w(M-1)}else for(;b*p<h;){var L=m(),T=w();(T+1)*L>=h?w(T+1):m(L+1)}var j=l.w/b,I=l.h/p;if(r.condense&&(j=0,I=0),r.avoidOverlap)for(var R=0;R<c.length;R++){var B=c[R],F=B._private.position;(F.x==null||F.y==null)&&(F.x=0,F.y=0);var z=B.layoutDimensions(r),D=r.avoidOverlapPadding,H=z.w+D,Q=z.h+D;j=Math.max(j,H),I=Math.max(I,Q)}for(var q={},Z=function(Oe,ge){return!!q["c-"+Oe+"-"+ge]},J=function(Oe,ge){q["c-"+Oe+"-"+ge]=!0},K=0,ae=0,se=function(){ae++,ae>=b&&(ae=0,K++)},le={},he=0;he<c.length;he++){var fe=c[he],pe=r.position(fe);if(pe&&(pe.row!==void 0||pe.col!==void 0)){var me={row:pe.row,col:pe.col};if(me.col===void 0)for(me.col=0;Z(me.row,me.col);)me.col++;else if(me.row===void 0)for(me.row=0;Z(me.row,me.col);)me.row++;le[fe.id()]=me,J(me.row,me.col)}}var Te=function(Oe,ge){var xe,Se;if(Oe.locked()||Oe.isParent())return!1;var Le=le[Oe.id()];if(Le)xe=Le.col*j+j/2+l.x1,Se=Le.row*I+I/2+l.y1;else{for(;Z(K,ae);)se();xe=ae*j+j/2+l.x1,Se=K*I+I/2+l.y1,J(K,ae),se()}return{x:xe,y:Se}};c.layoutPositions(this,r,Te)}return this};var nhe={ready:function(){},stop:function(){}};function IP(t){this.options=gn({},nhe,t)}IP.prototype.run=function(){var t=this.options,r=t.eles,a=this;return t.cy,a.emit("layoutstart"),r.nodes().positions(function(){return{x:0,y:0}}),a.one("layoutready",t.ready),a.emit("layoutready"),a.one("layoutstop",t.stop),a.emit("layoutstop"),this},IP.prototype.stop=function(){return this};var rhe={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function PD(t){this.options=gn({},rhe,t)}PD.prototype.run=function(){var t=this.options,r=t.eles,a=r.nodes(),s=Qi(t.positions);function c(l){if(t.positions==null)return Cue(l.position());if(s)return t.positions(l);var h=t.positions[l._private.data.id];return h??null}return a.layoutPositions(this,t,function(l,h){var d=c(l);return l.locked()||d==null?!1:d}),this};var ihe={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function SD(t){this.options=gn({},ihe,t)}SD.prototype.run=function(){var t=this.options,r=t.cy,a=t.eles,s=ss(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),c=function(l,h){return{x:s.x1+Math.round(Math.random()*s.w),y:s.y1+Math.round(Math.random()*s.h)}};return a.nodes().layoutPositions(this,t,c),this};var ahe=[{name:"breadthfirst",impl:vD},{name:"circle",impl:yD},{name:"concentric",impl:mD},{name:"cose",impl:Ow},{name:"grid",impl:CD},{name:"null",impl:IP},{name:"preset",impl:PD},{name:"random",impl:SD}];function ND(t){this.options=t,this.notifications=0}var TD=function(){},MD=function(){throw new Error("A headless instance can not render images")};ND.prototype={recalculateRenderedStyle:TD,notify:function(){this.notifications++},init:TD,isHeadless:function(){return!0},png:MD,jpg:MD};var LP={};LP.arrowShapeWidth=.3,LP.registerArrowShapes=function(){var t=this.arrowShapes={},r=this,a=function(p,b,m,w,k,P,S){var M=k.x-m/2-S,L=k.x+m/2+S,T=k.y-m/2-S,j=k.y+m/2+S,I=M<=p&&p<=L&&T<=b&&b<=j;return I},s=function(p,b,m,w,k){var P=p*Math.cos(w)-b*Math.sin(w),S=p*Math.sin(w)+b*Math.cos(w),M=P*m,L=S*m,T=M+k.x,j=L+k.y;return{x:T,y:j}},c=function(p,b,m,w){for(var k=[],P=0;P<p.length;P+=2){var S=p[P],M=p[P+1];k.push(s(S,M,b,m,w))}return k},l=function(p){for(var b=[],m=0;m<p.length;m++){var w=p[m];b.push(w.x,w.y)}return b},h=function(p){return p.pstyle("width").pfValue*p.pstyle("arrow-scale").pfValue*2},d=function(p,b){cn(b)&&(b=t[b]),t[p]=gn({name:p,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(m,w,k,P,S,M){var L=l(c(this.points,k+2*M,P,S)),T=Hs(m,w,L);return T},roughCollide:a,draw:function(m,w,k,P){var S=c(this.points,w,k,P);r.arrowShapeImpl("polygon")(m,S)},spacing:function(m){return 0},gap:h},b)};d("none",{collide:tw,roughCollide:tw,draw:t3,spacing:YO,gap:YO}),d("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),d("arrow","triangle"),d("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:a,draw:function(p,b,m,w,k){var P=c(this.points,b,m,w),S=this.controlPoint,M=s(S[0],S[1],b,m,w);r.arrowShapeImpl(this.name)(p,P,M)},gap:function(p){return h(p)*.8}}),d("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(p,b,m,w,k,P,S){var M=l(c(this.points,m+2*S,w,k)),L=l(c(this.pointsTee,m+2*S,w,k)),T=Hs(p,b,M)||Hs(p,b,L);return T},draw:function(p,b,m,w,k){var P=c(this.points,b,m,w),S=c(this.pointsTee,b,m,w);r.arrowShapeImpl(this.name)(p,P,S)}}),d("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(p,b,m,w,k,P,S){var M=k,L=Math.pow(M.x-p,2)+Math.pow(M.y-b,2)<=Math.pow((m+2*S)*this.radius,2),T=l(c(this.points,m+2*S,w,k));return Hs(p,b,T)||L},draw:function(p,b,m,w,k){var P=c(this.pointsTr,b,m,w);r.arrowShapeImpl(this.name)(p,P,w.x,w.y,this.radius*b)},spacing:function(p){return r.getArrowWidth(p.pstyle("width").pfValue,p.pstyle("arrow-scale").value)*this.radius}}),d("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(p,b){var m=this.baseCrossLinePts.slice(),w=b/p,k=3,P=5;return m[k]=m[k]-w,m[P]=m[P]-w,m},collide:function(p,b,m,w,k,P,S){var M=l(c(this.points,m+2*S,w,k)),L=l(c(this.crossLinePts(m,P),m+2*S,w,k)),T=Hs(p,b,M)||Hs(p,b,L);return T},draw:function(p,b,m,w,k){var P=c(this.points,b,m,w),S=c(this.crossLinePts(b,k),b,m,w);r.arrowShapeImpl(this.name)(p,P,S)}}),d("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(p){return h(p)*.525}}),d("circle",{radius:.15,collide:function(p,b,m,w,k,P,S){var M=k,L=Math.pow(M.x-p,2)+Math.pow(M.y-b,2)<=Math.pow((m+2*S)*this.radius,2);return L},draw:function(p,b,m,w,k){r.arrowShapeImpl(this.name)(p,w.x,w.y,this.radius*b)},spacing:function(p){return r.getArrowWidth(p.pstyle("width").pfValue,p.pstyle("arrow-scale").value)*this.radius}}),d("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(p){return 1},gap:function(p){return 1}}),d("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),d("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(p){return p.pstyle("width").pfValue*p.pstyle("arrow-scale").value}}),d("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(p){return .95*p.pstyle("width").pfValue*p.pstyle("arrow-scale").value}})};var Jd={};Jd.projectIntoViewport=function(t,r){var a=this.cy,s=this.findContainerClientCoords(),c=s[0],l=s[1],h=s[4],d=a.pan(),p=a.zoom(),b=((t-c)/h-d.x)/p,m=((r-l)/h-d.y)/p;return[b,m]},Jd.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,r=t.getBoundingClientRect(),a=this.cy.window().getComputedStyle(t),s=function(L){return parseFloat(a.getPropertyValue(L))},c={left:s("padding-left"),right:s("padding-right"),top:s("padding-top"),bottom:s("padding-bottom")},l={left:s("border-left-width"),right:s("border-right-width"),top:s("border-top-width"),bottom:s("border-bottom-width")},h=t.clientWidth,d=t.clientHeight,p=c.left+c.right,b=c.top+c.bottom,m=l.left+l.right,w=r.width/(h+m),k=h-p,P=d-b,S=r.left+c.left+l.left,M=r.top+c.top+l.top;return this.containerBB=[S,M,k,P,w]},Jd.invalidateContainerClientCoordsCache=function(){this.containerBB=null},Jd.findNearestElement=function(t,r,a,s){return this.findNearestElements(t,r,a,s)[0]},Jd.findNearestElements=function(t,r,a,s){var c=this,l=this,h=l.getCachedZSortedEles(),d=[],p=l.cy.zoom(),b=l.cy.hasCompoundNodes(),m=(s?24:8)/p,w=(s?8:2)/p,k=(s?8:2)/p,P=1/0,S,M;a&&(h=h.interactive);function L(z,D){if(z.isNode()){if(M)return;M=z,d.push(z)}if(z.isEdge()&&(D==null||D<P))if(S){if(S.pstyle("z-compound-depth").value===z.pstyle("z-compound-depth").value&&S.pstyle("z-compound-depth").value===z.pstyle("z-compound-depth").value){for(var H=0;H<d.length;H++)if(d[H].isEdge()){d[H]=z,S=z,P=D??P;break}}}else d.push(z),S=z,P=D??P}function T(z){var D=z.outerWidth()+2*w,H=z.outerHeight()+2*w,Q=D/2,q=H/2,Z=z.position(),J=z.pstyle("corner-radius").value==="auto"?"auto":z.pstyle("corner-radius").pfValue,K=z._private.rscratch;if(Z.x-Q<=t&&t<=Z.x+Q&&Z.y-q<=r&&r<=Z.y+q){var ae=l.nodeShapes[c.getNodeShape(z)];if(ae.checkPoint(t,r,0,D,H,Z.x,Z.y,J,K))return L(z,0),!0}}function j(z){var D=z._private,H=D.rscratch,Q=z.pstyle("width").pfValue,q=z.pstyle("arrow-scale").value,Z=Q/2+m,J=Z*Z,K=Z*2,ae=D.source,se=D.target,le;if(H.edgeType==="segments"||H.edgeType==="straight"||H.edgeType==="haystack"){for(var he=H.allpts,fe=0;fe+3<he.length;fe+=2)if(Gue(t,r,he[fe],he[fe+1],he[fe+2],he[fe+3],K)&&J>(le=Yue(t,r,he[fe],he[fe+1],he[fe+2],he[fe+3])))return L(z,le),!0}else if(H.edgeType==="bezier"||H.edgeType==="multibezier"||H.edgeType==="self"||H.edgeType==="compound"){for(var he=H.allpts,fe=0;fe+5<H.allpts.length;fe+=4)if(Hue(t,r,he[fe],he[fe+1],he[fe+2],he[fe+3],he[fe+4],he[fe+5],K)&&J>(le=Uue(t,r,he[fe],he[fe+1],he[fe+2],he[fe+3],he[fe+4],he[fe+5])))return L(z,le),!0}for(var ae=ae||D.source,se=se||D.target,pe=c.getArrowWidth(Q,q),me=[{name:"source",x:H.arrowStartX,y:H.arrowStartY,angle:H.srcArrowAngle},{name:"target",x:H.arrowEndX,y:H.arrowEndY,angle:H.tgtArrowAngle},{name:"mid-source",x:H.midX,y:H.midY,angle:H.midsrcArrowAngle},{name:"mid-target",x:H.midX,y:H.midY,angle:H.midtgtArrowAngle}],fe=0;fe<me.length;fe++){var Te=me[fe],Oe=l.arrowShapes[z.pstyle(Te.name+"-arrow-shape").value],ge=z.pstyle("width").pfValue;if(Oe.roughCollide(t,r,pe,Te.angle,{x:Te.x,y:Te.y},ge,m)&&Oe.collide(t,r,pe,Te.angle,{x:Te.x,y:Te.y},ge,m))return L(z),!0}b&&d.length>0&&(T(ae),T(se))}function I(z,D,H){return Gs(z,D,H)}function R(z,D){var H=z._private,Q=k,q;D?q=D+"-":q="",z.boundingBox();var Z=H.labelBounds[D||"main"],J=z.pstyle(q+"label").value,K=z.pstyle("text-events").strValue==="yes";if(!(!K||!J)){var ae=I(H.rscratch,"labelX",D),se=I(H.rscratch,"labelY",D),le=I(H.rscratch,"labelAngle",D),he=z.pstyle(q+"text-margin-x").pfValue,fe=z.pstyle(q+"text-margin-y").pfValue,pe=Z.x1-Q-he,me=Z.x2+Q-he,Te=Z.y1-Q-fe,Oe=Z.y2+Q-fe;if(le){var ge=Math.cos(le),xe=Math.sin(le),Se=function(He,Qe){return He=He-ae,Qe=Qe-se,{x:He*ge-Qe*xe+ae,y:He*xe+Qe*ge+se}},Le=Se(pe,Te),De=Se(pe,Oe),Ne=Se(me,Te),Me=Se(me,Oe),ke=[Le.x+he,Le.y+fe,Ne.x+he,Ne.y+fe,Me.x+he,Me.y+fe,De.x+he,De.y+fe];if(Hs(t,r,ke))return L(z),!0}else if(kh(Z,t,r))return L(z),!0}}for(var B=h.length-1;B>=0;B--){var F=h[B];F.isNode()?T(F)||R(F):j(F)||R(F)||R(F,"source")||R(F,"target")}return d},Jd.getAllInBox=function(t,r,a,s){var c=this.getCachedZSortedEles().interactive,l=this.cy.zoom(),h=2/l,d=[],p=Math.min(t,a),b=Math.max(t,a),m=Math.min(r,s),w=Math.max(r,s);t=p,a=b,r=m,s=w;var k=ss({x1:t,y1:r,x2:a,y2:s}),P=[{x:k.x1,y:k.y1},{x:k.x2,y:k.y1},{x:k.x2,y:k.y2},{x:k.x1,y:k.y2}],S=[[P[0],P[1]],[P[1],P[2]],[P[2],P[3]],[P[3],P[0]]];function M(Qe,it,ft){return Gs(Qe,it,ft)}function L(Qe,it){var ft=Qe._private,ze=h,$e="";Qe.boundingBox();var xt=ft.labelBounds.main;if(!xt)return null;var st=M(ft.rscratch,"labelX",it),Rt=M(ft.rscratch,"labelY",it),It=M(ft.rscratch,"labelAngle",it),Dt=Qe.pstyle($e+"text-margin-x").pfValue,Ut=Qe.pstyle($e+"text-margin-y").pfValue,bn=xt.x1-ze-Dt,sn=xt.x2+ze-Dt,ir=xt.y1-ze-Ut,U=xt.y2+ze-Ut;if(It){var ne=Math.cos(It),ue=Math.sin(It),we=function(Ae,ie){return Ae=Ae-st,ie=ie-Rt,{x:Ae*ne-ie*ue+st,y:Ae*ue+ie*ne+Rt}};return[we(bn,ir),we(sn,ir),we(sn,U),we(bn,U)]}else return[{x:bn,y:ir},{x:sn,y:ir},{x:sn,y:U},{x:bn,y:U}]}function T(Qe,it,ft,ze){function $e(xt,st,Rt){return(Rt.y-xt.y)*(st.x-xt.x)>(st.y-xt.y)*(Rt.x-xt.x)}return $e(Qe,ft,ze)!==$e(it,ft,ze)&&$e(Qe,it,ft)!==$e(Qe,it,ze)}for(var j=0;j<c.length;j++){var I=c[j];if(I.isNode()){var R=I,B=R.pstyle("text-events").strValue==="yes",F=R.pstyle("box-selection").strValue,z=R.pstyle("box-select-labels").strValue==="yes";if(F==="none")continue;var D=(F==="overlap"||z)&&B,H=R.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:D});if(F==="contain"){var Q=!1;if(z&&B){var q=L(R);q&&p3(q,P)&&(d.push(R),Q=!0)}!Q&&n8(k,H)&&d.push(R)}else if(F==="overlap"&&u3(k,H)){var Z=R.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1}),J=[{x:Z.x1,y:Z.y1},{x:Z.x2,y:Z.y1},{x:Z.x2,y:Z.y2},{x:Z.x1,y:Z.y2}];if(p3(J,P))d.push(R);else{var K=L(R);K&&p3(K,P)&&d.push(R)}}}else{var ae=I,se=ae._private,le=se.rscratch,he=ae.pstyle("box-selection").strValue;if(he==="none")continue;if(he==="contain"){if(le.startX!=null&&le.startY!=null&&!kh(k,le.startX,le.startY)||le.endX!=null&&le.endY!=null&&!kh(k,le.endX,le.endY))continue;if(le.edgeType==="bezier"||le.edgeType==="multibezier"||le.edgeType==="self"||le.edgeType==="compound"||le.edgeType==="segments"||le.edgeType==="haystack"){for(var fe=se.rstyle.bezierPts||se.rstyle.linePts||se.rstyle.haystackPts,pe=!0,me=0;me<fe.length;me++)if(!t8(k,fe[me])){pe=!1;break}pe&&d.push(ae)}else le.edgeType==="straight"&&d.push(ae)}else if(he==="overlap"){var Te=!1;if(le.startX!=null&&le.startY!=null&&le.endX!=null&&le.endY!=null&&(kh(k,le.startX,le.startY)||kh(k,le.endX,le.endY)))d.push(ae),Te=!0;else if(!Te&&le.edgeType==="haystack"){for(var Oe=se.rstyle.haystackPts,ge=0;ge<Oe.length;ge++)if(t8(k,Oe[ge])){d.push(ae),Te=!0;break}}if(!Te){var xe=se.rstyle.bezierPts||se.rstyle.linePts||se.rstyle.haystackPts;if((!xe||xe.length<2)&&le.edgeType==="straight"&&le.startX!=null&&le.startY!=null&&le.endX!=null&&le.endY!=null&&(xe=[{x:le.startX,y:le.startY},{x:le.endX,y:le.endY}]),!xe||xe.length<2)continue;for(var Se=0;Se<xe.length-1;Se++){for(var Le=xe[Se],De=xe[Se+1],Ne=0;Ne<S.length;Ne++){var Me=ja(S[Ne],2),ke=Me[0],He=Me[1];if(T(Le,De,ke,He)){d.push(ae),Te=!0;break}}if(Te)break}}}}}return d};var Dw={};Dw.calculateArrowAngles=function(t){var r=t._private.rscratch,a=r.edgeType==="haystack",s=r.edgeType==="bezier",c=r.edgeType==="multibezier",l=r.edgeType==="segments",h=r.edgeType==="compound",d=r.edgeType==="self",p,b,m,w,k,P,T,j;if(a?(m=r.haystackPts[0],w=r.haystackPts[1],k=r.haystackPts[2],P=r.haystackPts[3]):(m=r.arrowStartX,w=r.arrowStartY,k=r.arrowEndX,P=r.arrowEndY),T=r.midX,j=r.midY,l)p=m-r.segpts[0],b=w-r.segpts[1];else if(c||h||d||s){var S=r.allpts,M=ho(S[0],S[2],S[4],.1),L=ho(S[1],S[3],S[5],.1);p=m-M,b=w-L}else p=m-T,b=w-j;r.srcArrowAngle=iw(p,b);var T=r.midX,j=r.midY;if(a&&(T=(m+k)/2,j=(w+P)/2),p=k-m,b=P-w,l){var S=r.allpts;if(S.length/2%2===0){var I=S.length/2,R=I-2;p=S[I]-S[R],b=S[I+1]-S[R+1]}else if(r.isRound)p=r.midVector[1],b=-r.midVector[0];else{var I=S.length/2-1,R=I-2;p=S[I]-S[R],b=S[I+1]-S[R+1]}}else if(c||h||d){var S=r.allpts,B=r.ctrlpts,F,z,D,H;if(B.length/2%2===0){var Q=S.length/2-1,q=Q+2,Z=q+2;F=ho(S[Q],S[q],S[Z],0),z=ho(S[Q+1],S[q+1],S[Z+1],0),D=ho(S[Q],S[q],S[Z],1e-4),H=ho(S[Q+1],S[q+1],S[Z+1],1e-4)}else{var q=S.length/2-1,Q=q-2,Z=q+2;F=ho(S[Q],S[q],S[Z],.4999),z=ho(S[Q+1],S[q+1],S[Z+1],.4999),D=ho(S[Q],S[q],S[Z],.5),H=ho(S[Q+1],S[q+1],S[Z+1],.5)}p=D-F,b=H-z}if(r.midtgtArrowAngle=iw(p,b),r.midDispX=p,r.midDispY=b,p*=-1,b*=-1,l){var S=r.allpts;if(S.length/2%2!==0&&!r.isRound){var I=S.length/2-1,J=I+2;p=-(S[J]-S[I]),b=-(S[J+1]-S[I+1])}}if(r.midsrcArrowAngle=iw(p,b),l)p=k-r.segpts[r.segpts.length-2],b=P-r.segpts[r.segpts.length-1];else if(c||h||d||s){var S=r.allpts,K=S.length,M=ho(S[K-6],S[K-4],S[K-2],.9),L=ho(S[K-5],S[K-3],S[K-1],.9);p=k-M,b=P-L}else p=k-T,b=P-j;r.tgtArrowAngle=iw(p,b)},Dw.getArrowWidth=Dw.getArrowHeight=function(t,r){var a=this.arrowWidthCache=this.arrowWidthCache||{},s=a[t+", "+r];return s||(s=Math.max(Math.pow(t*13.37,.9),29)*r,a[t+", "+r]=s,s)};var OP,RP,sl={},Ou={},jD,AD,Xd,Bw,bf,ep,tp,ul,Fg,Gw,ID,LD,DP,BP,OD,RD=function(t,r,a){a.x=r.x-t.x,a.y=r.y-t.y,a.len=Math.sqrt(a.x*a.x+a.y*a.y),a.nx=a.x/a.len,a.ny=a.y/a.len,a.ang=Math.atan2(a.ny,a.nx)},ohe=function(t,r){r.x=t.x*-1,r.y=t.y*-1,r.nx=t.nx*-1,r.ny=t.ny*-1,r.ang=t.ang>0?-(Math.PI-t.ang):Math.PI+t.ang},she=function(t,r,a,s,c){if(t!==OD?RD(r,t,sl):ohe(Ou,sl),RD(r,a,Ou),jD=sl.nx*Ou.ny-sl.ny*Ou.nx,AD=sl.nx*Ou.nx-sl.ny*-Ou.ny,bf=Math.asin(Math.max(-1,Math.min(1,jD))),Math.abs(bf)<1e-6){OP=r.x,RP=r.y,tp=Fg=0;return}Xd=1,Bw=!1,AD<0?bf<0?bf=Math.PI+bf:(bf=Math.PI-bf,Xd=-1,Bw=!0):bf>0&&(Xd=-1,Bw=!0),r.radius!==void 0?Fg=r.radius:Fg=s,ep=bf/2,Gw=Math.min(sl.len/2,Ou.len/2),c?(ul=Math.abs(Math.cos(ep)*Fg/Math.sin(ep)),ul>Gw?(ul=Gw,tp=Math.abs(ul*Math.sin(ep)/Math.cos(ep))):tp=Fg):(ul=Math.min(Gw,Fg),tp=Math.abs(ul*Math.sin(ep)/Math.cos(ep))),DP=r.x+Ou.nx*ul,BP=r.y+Ou.ny*ul,OP=DP-Ou.ny*tp*Xd,RP=BP+Ou.nx*tp*Xd,ID=r.x+sl.nx*ul,LD=r.y+sl.ny*ul,OD=r};function DD(t,r){r.radius===0?t.lineTo(r.cx,r.cy):t.arc(r.cx,r.cy,r.radius,r.startAngle,r.endAngle,r.counterClockwise)}function GP(t,r,a,s){var c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return s===0||r.radius===0?{cx:r.x,cy:r.y,radius:0,startX:r.x,startY:r.y,stopX:r.x,stopY:r.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(she(t,r,a,s,c),{cx:OP,cy:RP,radius:tp,startX:ID,startY:LD,stopX:DP,stopY:BP,startAngle:sl.ang+Math.PI/2*Xd,endAngle:Ou.ang-Math.PI/2*Xd,counterClockwise:Bw})}var j0=.01,uhe=Math.sqrt(2*j0),Zo={};Zo.findMidptPtsEtc=function(t,r){var a=r.posPts,s=r.intersectionPts,c=r.vectorNormInverse,l,h=t.pstyle("source-endpoint"),d=t.pstyle("target-endpoint"),p=h.units!=null&&d.units!=null,b=function(R,B,F,z){var D=z-B,H=F-R,Q=Math.sqrt(H*H+D*D);return{x:-D/Q,y:H/Q}},m=t.pstyle("edge-distances").value;switch(m){case"node-position":l=a;break;case"intersection":l=s;break;case"endpoints":{if(p){var w=this.manualEndptToPx(t.source()[0],h),k=ja(w,2),P=k[0],S=k[1],M=this.manualEndptToPx(t.target()[0],d),L=ja(M,2),T=L[0],j=L[1],I={x1:P,y1:S,x2:T,y2:j};c=b(P,S,T,j),l=I}else Gr("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),l=s;break}}return{midptPts:l,vectorNormInverse:c}},Zo.findHaystackPoints=function(t){for(var r=0;r<t.length;r++){var a=t[r],s=a._private,c=s.rscratch;if(!c.haystack){var l=Math.random()*2*Math.PI;c.source={x:Math.cos(l),y:Math.sin(l)},l=Math.random()*2*Math.PI,c.target={x:Math.cos(l),y:Math.sin(l)}}var h=s.source,d=s.target,p=h.position(),b=d.position(),m=h.width(),w=d.width(),k=h.height(),P=d.height(),S=a.pstyle("haystack-radius").value,M=S/2;c.haystackPts=c.allpts=[c.source.x*m*M+p.x,c.source.y*k*M+p.y,c.target.x*w*M+b.x,c.target.y*P*M+b.y],c.midX=(c.allpts[0]+c.allpts[2])/2,c.midY=(c.allpts[1]+c.allpts[3])/2,c.edgeType="haystack",c.haystack=!0,this.storeEdgeProjections(a),this.calculateArrowAngles(a),this.recalculateEdgeLabelProjections(a),this.calculateLabelAngles(a)}},Zo.findSegmentsPoints=function(t,r){var a=t._private.rscratch,s=t.pstyle("segment-weights"),c=t.pstyle("segment-distances"),l=t.pstyle("segment-radii"),h=t.pstyle("radius-type"),d=Math.min(s.pfValue.length,c.pfValue.length),p=l.pfValue[l.pfValue.length-1],b=h.pfValue[h.pfValue.length-1];a.edgeType="segments",a.segpts=[],a.radii=[],a.isArcRadius=[];for(var m=0;m<d;m++){var w=s.pfValue[m],k=c.pfValue[m],P=1-w,S=w,M=this.findMidptPtsEtc(t,r),L=M.midptPts,T=M.vectorNormInverse,j={x:L.x1*P+L.x2*S,y:L.y1*P+L.y2*S};a.segpts.push(j.x+T.x*k,j.y+T.y*k),a.radii.push(l.pfValue[m]!==void 0?l.pfValue[m]:p),a.isArcRadius.push((h.pfValue[m]!==void 0?h.pfValue[m]:b)==="arc-radius")}},Zo.findLoopPoints=function(t,r,a,s){var c=t._private.rscratch,l=r.dirCounts,h=r.srcPos,d=t.pstyle("control-point-distances"),p=d?d.pfValue[0]:void 0,b=t.pstyle("loop-direction").pfValue,m=t.pstyle("loop-sweep").pfValue,w=t.pstyle("control-point-step-size").pfValue;c.edgeType="self";var k=a,P=w;s&&(k=0,P=p);var S=b-Math.PI/2,M=S-m/2,L=S+m/2,T=b+"_"+m;k=l[T]===void 0?l[T]=0:++l[T],c.ctrlpts=[h.x+Math.cos(M)*1.4*P*(k/3+1),h.y+Math.sin(M)*1.4*P*(k/3+1),h.x+Math.cos(L)*1.4*P*(k/3+1),h.y+Math.sin(L)*1.4*P*(k/3+1)]},Zo.findCompoundLoopPoints=function(t,r,a,s){var c=t._private.rscratch;c.edgeType="compound";var l=r.srcPos,h=r.tgtPos,d=r.srcW,p=r.srcH,b=r.tgtW,m=r.tgtH,w=t.pstyle("control-point-step-size").pfValue,k=t.pstyle("control-point-distances"),P=k?k.pfValue[0]:void 0,S=a,M=w;s&&(S=0,M=P);var L=50,T={x:l.x-d/2,y:l.y-p/2},j={x:h.x-b/2,y:h.y-m/2},I={x:Math.min(T.x,j.x),y:Math.min(T.y,j.y)},R=.5,B=Math.max(R,Math.log(d*j0)),F=Math.max(R,Math.log(b*j0));c.ctrlpts=[I.x,I.y-(1+Math.pow(L,1.12)/100)*M*(S/3+1)*B,I.x-(1+Math.pow(L,1.12)/100)*M*(S/3+1)*F,I.y]},Zo.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"},Zo.findBezierPoints=function(t,r,a,s,c){var l=t._private.rscratch,h=t.pstyle("control-point-step-size").pfValue,d=t.pstyle("control-point-distances"),p=t.pstyle("control-point-weights"),b=d&&p?Math.min(d.value.length,p.value.length):1,m=d?d.pfValue[0]:void 0,w=p.value[0],k=s;l.edgeType=k?"multibezier":"bezier",l.ctrlpts=[];for(var P=0;P<b;P++){var S=(.5-r.eles.length/2+a)*h*(c?-1:1),M=void 0,L=s3(S);k&&(m=d?d.pfValue[P]:h,w=p.value[P]),s?M=m:M=m!==void 0?L*m:void 0;var T=M!==void 0?M:S,j=1-w,I=w,R=this.findMidptPtsEtc(t,r),B=R.midptPts,F=R.vectorNormInverse,z={x:B.x1*j+B.x2*I,y:B.y1*j+B.y2*I};l.ctrlpts.push(z.x+F.x*T,z.y+F.y*T)}},Zo.findTaxiPoints=function(t,r){var a=t._private.rscratch;a.edgeType="segments";var s="vertical",c="horizontal",l="leftward",h="rightward",d="downward",p="upward",b="auto",m=r.posPts,w=r.srcW,k=r.srcH,P=r.tgtW,S=r.tgtH,M=t.pstyle("edge-distances").value,L=M!=="node-position",T=t.pstyle("taxi-direction").value,j=T,I=t.pstyle("taxi-turn"),R=I.units==="%",B=I.pfValue,F=B<0,z=t.pstyle("taxi-turn-min-distance").pfValue,D=L?(w+P)/2:0,H=L?(k+S)/2:0,Q=m.x2-m.x1,q=m.y2-m.y1,Z=function(ie,Pe){return ie>0?Math.max(ie-Pe,0):Math.min(ie+Pe,0)},J=Z(Q,D),K=Z(q,H),ae=!1;j===b?T=Math.abs(J)>Math.abs(K)?c:s:j===p||j===d?(T=s,ae=!0):(j===l||j===h)&&(T=c,ae=!0);var se=T===s,le=se?K:J,he=se?q:Q,fe=s3(he),pe=!1;!(ae&&(R||F))&&(j===d&&he<0||j===p&&he>0||j===l&&he>0||j===h&&he<0)&&(fe*=-1,le=fe*Math.abs(le),pe=!0);var me;if(R){var Te=B<0?1+B:B;me=Te*le}else{var Oe=B<0?le:0;me=Oe+B*fe}var ge=function(ie){return Math.abs(ie)<z||Math.abs(ie)>=Math.abs(le)},xe=ge(me),Se=ge(Math.abs(le)-Math.abs(me)),Le=xe||Se;if(Le&&!pe)if(se){var De=Math.abs(he)<=k/2,Ne=Math.abs(Q)<=P/2;if(De){var Me=(m.x1+m.x2)/2,ke=m.y1,He=m.y2;a.segpts=[Me,ke,Me,He]}else if(Ne){var Qe=(m.y1+m.y2)/2,it=m.x1,ft=m.x2;a.segpts=[it,Qe,ft,Qe]}else a.segpts=[m.x1,m.y2]}else{var ze=Math.abs(he)<=w/2,$e=Math.abs(q)<=S/2;if(ze){var xt=(m.y1+m.y2)/2,st=m.x1,Rt=m.x2;a.segpts=[st,xt,Rt,xt]}else if($e){var It=(m.x1+m.x2)/2,Dt=m.y1,Ut=m.y2;a.segpts=[It,Dt,It,Ut]}else a.segpts=[m.x2,m.y1]}else if(se){var bn=m.y1+me+(L?k/2*fe:0),sn=m.x1,ir=m.x2;a.segpts=[sn,bn,ir,bn]}else{var U=m.x1+me+(L?w/2*fe:0),ne=m.y1,ue=m.y2;a.segpts=[U,ne,U,ue]}if(a.isRound){var we=t.pstyle("taxi-radius").value,Ae=t.pstyle("radius-type").value[0]==="arc-radius";a.radii=new Array(a.segpts.length/2).fill(we),a.isArcRadius=new Array(a.segpts.length/2).fill(Ae)}},Zo.tryToCorrectInvalidPoints=function(t,r){var a=t._private.rscratch;if(a.edgeType==="bezier"){var s=r.srcPos,c=r.tgtPos,l=r.srcW,h=r.srcH,d=r.tgtW,p=r.tgtH,b=r.srcShape,m=r.tgtShape,w=r.srcCornerRadius,k=r.tgtCornerRadius,P=r.srcRs,S=r.tgtRs,M=!Lt(a.startX)||!Lt(a.startY),L=!Lt(a.arrowStartX)||!Lt(a.arrowStartY),T=!Lt(a.endX)||!Lt(a.endY),j=!Lt(a.arrowEndX)||!Lt(a.arrowEndY),I=3,R=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,B=I*R,F=Zd({x:a.ctrlpts[0],y:a.ctrlpts[1]},{x:a.startX,y:a.startY}),z=F<B,D=Zd({x:a.ctrlpts[0],y:a.ctrlpts[1]},{x:a.endX,y:a.endY}),H=D<B,Q=!1;if(M||L||z){Q=!0;var q={x:a.ctrlpts[0]-s.x,y:a.ctrlpts[1]-s.y},Z=Math.sqrt(q.x*q.x+q.y*q.y),J={x:q.x/Z,y:q.y/Z},K=Math.max(l,h),ae={x:a.ctrlpts[0]+J.x*2*K,y:a.ctrlpts[1]+J.y*2*K},se=b.intersectLine(s.x,s.y,l,h,ae.x,ae.y,0,w,P);z?(a.ctrlpts[0]=a.ctrlpts[0]+J.x*(B-F),a.ctrlpts[1]=a.ctrlpts[1]+J.y*(B-F)):(a.ctrlpts[0]=se[0]+J.x*B,a.ctrlpts[1]=se[1]+J.y*B)}if(T||j||H){Q=!0;var le={x:a.ctrlpts[0]-c.x,y:a.ctrlpts[1]-c.y},he=Math.sqrt(le.x*le.x+le.y*le.y),fe={x:le.x/he,y:le.y/he},pe=Math.max(l,h),me={x:a.ctrlpts[0]+fe.x*2*pe,y:a.ctrlpts[1]+fe.y*2*pe},Te=m.intersectLine(c.x,c.y,d,p,me.x,me.y,0,k,S);H?(a.ctrlpts[0]=a.ctrlpts[0]+fe.x*(B-D),a.ctrlpts[1]=a.ctrlpts[1]+fe.y*(B-D)):(a.ctrlpts[0]=Te[0]+fe.x*B,a.ctrlpts[1]=Te[1]+fe.y*B)}Q&&this.findEndpoints(t)}},Zo.storeAllpts=function(t){var r=t._private.rscratch;if(r.edgeType==="multibezier"||r.edgeType==="bezier"||r.edgeType==="self"||r.edgeType==="compound"){r.allpts=[],r.allpts.push(r.startX,r.startY);for(var a=0;a+1<r.ctrlpts.length;a+=2)r.allpts.push(r.ctrlpts[a],r.ctrlpts[a+1]),a+3<r.ctrlpts.length&&r.allpts.push((r.ctrlpts[a]+r.ctrlpts[a+2])/2,(r.ctrlpts[a+1]+r.ctrlpts[a+3])/2);r.allpts.push(r.endX,r.endY);var s,c;r.ctrlpts.length/2%2===0?(s=r.allpts.length/2-1,r.midX=r.allpts[s],r.midY=r.allpts[s+1]):(s=r.allpts.length/2-3,c=.5,r.midX=ho(r.allpts[s],r.allpts[s+2],r.allpts[s+4],c),r.midY=ho(r.allpts[s+1],r.allpts[s+3],r.allpts[s+5],c))}else if(r.edgeType==="straight")r.allpts=[r.startX,r.startY,r.endX,r.endY],r.midX=(r.startX+r.endX+r.arrowStartX+r.arrowEndX)/4,r.midY=(r.startY+r.endY+r.arrowStartY+r.arrowEndY)/4;else if(r.edgeType==="segments"){if(r.allpts=[],r.allpts.push(r.startX,r.startY),r.allpts.push.apply(r.allpts,r.segpts),r.allpts.push(r.endX,r.endY),r.isRound){r.roundCorners=[];for(var l=2;l+3<r.allpts.length;l+=2){var h=r.radii[l/2-1],d=r.isArcRadius[l/2-1];r.roundCorners.push(GP({x:r.allpts[l-2],y:r.allpts[l-1]},{x:r.allpts[l],y:r.allpts[l+1],radius:h},{x:r.allpts[l+2],y:r.allpts[l+3]},h,d))}}if(r.segpts.length%4===0){var p=r.segpts.length/2,b=p-2;r.midX=(r.segpts[b]+r.segpts[p])/2,r.midY=(r.segpts[b+1]+r.segpts[p+1])/2}else{var m=r.segpts.length/2-1;if(!r.isRound)r.midX=r.segpts[m],r.midY=r.segpts[m+1];else{var w={x:r.segpts[m],y:r.segpts[m+1]},k=r.roundCorners[m/2];if(k.radius===0){var P={x:r.segpts[m+2],y:r.segpts[m+3]};r.midX=w.x,r.midY=w.y,r.midVector=[w.y-P.y,P.x-w.x]}else{var S=[w.x-k.cx,w.y-k.cy],M=k.radius/Math.sqrt(Math.pow(S[0],2)+Math.pow(S[1],2));S=S.map(function(L){return L*M}),r.midX=k.cx+S[0],r.midY=k.cy+S[1],r.midVector=S}}}}},Zo.checkForInvalidEdgeWarning=function(t){var r=t[0]._private.rscratch;r.nodesOverlap||Lt(r.startX)&&Lt(r.startY)&&Lt(r.endX)&&Lt(r.endY)?r.loggedErr=!1:r.loggedErr||(r.loggedErr=!0,Gr("Edge `"+t.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."))},Zo.findEdgeControlPoints=function(t){var r=this;if(!(!t||t.length===0)){for(var a=this,s=a.cy,c=s.hasCompoundNodes(),l=new pf,h=function(D,H){return[].concat($m(D),[H?1:0]).join("-")},d=[],p=[],b=0;b<t.length;b++){var m=t[b],w=m._private,k=m.pstyle("curve-style").value;if(!(m.removed()||!m.takesUpSpace())){if(k==="haystack"){p.push(m);continue}var P=k==="unbundled-bezier"||mh(k,"segments")||k==="straight"||k==="straight-triangle"||mh(k,"taxi"),S=k==="unbundled-bezier"||k==="bezier",M=w.source,L=w.target,T=M.poolIndex(),j=L.poolIndex(),I=[T,j].sort(),R=h(I,P),B=l.get(R);B==null&&(B={eles:[]},d.push({pairId:I,edgeIsUnbundled:P}),l.set(R,B)),B.eles.push(m),P&&(B.hasUnbundled=!0),S&&(B.hasBezier=!0)}}for(var F=function(){var D=d[z],H=D.pairId,Q=D.edgeIsUnbundled,q=h(H,Q),Z=l.get(q),J;if(!Z.hasUnbundled){var K=Z.eles[0].parallelEdges().filter(function(we){return we.isBundledBezier()});n3(Z.eles),K.forEach(function(we){return Z.eles.push(we)}),Z.eles.sort(function(we,Ae){return we.poolIndex()-Ae.poolIndex()})}var ae=Z.eles[0],se=ae.source(),le=ae.target();if(se.poolIndex()>le.poolIndex()){var he=se;se=le,le=he}var fe=Z.srcPos=se.position(),pe=Z.tgtPos=le.position(),me=Z.srcW=se.outerWidth(),Te=Z.srcH=se.outerHeight(),Oe=Z.tgtW=le.outerWidth(),ge=Z.tgtH=le.outerHeight(),xe=Z.srcShape=a.nodeShapes[r.getNodeShape(se)],Se=Z.tgtShape=a.nodeShapes[r.getNodeShape(le)],Le=Z.srcCornerRadius=se.pstyle("corner-radius").value==="auto"?"auto":se.pstyle("corner-radius").pfValue,De=Z.tgtCornerRadius=le.pstyle("corner-radius").value==="auto"?"auto":le.pstyle("corner-radius").pfValue,Ne=Z.tgtRs=le._private.rscratch,Me=Z.srcRs=se._private.rscratch;Z.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ke=0;ke<Z.eles.length;ke++){var He=Z.eles[ke],Qe=He[0]._private.rscratch,it=He.pstyle("curve-style").value,ft=it==="unbundled-bezier"||mh(it,"segments")||mh(it,"taxi"),ze=!se.same(He.source());if(!Z.calculatedIntersection&&se!==le&&(Z.hasBezier||Z.hasUnbundled)){Z.calculatedIntersection=!0;var $e=xe.intersectLine(fe.x,fe.y,me,Te,pe.x,pe.y,0,Le,Me),xt=Z.srcIntn=$e,st=Se.intersectLine(pe.x,pe.y,Oe,ge,fe.x,fe.y,0,De,Ne),Rt=Z.tgtIntn=st,It=Z.intersectionPts={x1:$e[0],x2:st[0],y1:$e[1],y2:st[1]},Dt=Z.posPts={x1:fe.x,x2:pe.x,y1:fe.y,y2:pe.y},Ut=st[1]-$e[1],bn=st[0]-$e[0],sn=Math.sqrt(bn*bn+Ut*Ut);Lt(sn)&&sn>=uhe||(sn=Math.sqrt(Math.max(bn*bn,j0)+Math.max(Ut*Ut,j0)));var ir=Z.vector={x:bn,y:Ut},U=Z.vectorNorm={x:ir.x/sn,y:ir.y/sn},ne={x:-U.y,y:U.x};Z.nodesOverlap=!Lt(sn)||Se.checkPoint($e[0],$e[1],0,Oe,ge,pe.x,pe.y,De,Ne)||xe.checkPoint(st[0],st[1],0,me,Te,fe.x,fe.y,Le,Me),Z.vectorNormInverse=ne,J={nodesOverlap:Z.nodesOverlap,dirCounts:Z.dirCounts,calculatedIntersection:!0,hasBezier:Z.hasBezier,hasUnbundled:Z.hasUnbundled,eles:Z.eles,srcPos:pe,srcRs:Ne,tgtPos:fe,tgtRs:Me,srcW:Oe,srcH:ge,tgtW:me,tgtH:Te,srcIntn:Rt,tgtIntn:xt,srcShape:Se,tgtShape:xe,posPts:{x1:Dt.x2,y1:Dt.y2,x2:Dt.x1,y2:Dt.y1},intersectionPts:{x1:It.x2,y1:It.y2,x2:It.x1,y2:It.y1},vector:{x:-ir.x,y:-ir.y},vectorNorm:{x:-U.x,y:-U.y},vectorNormInverse:{x:-ne.x,y:-ne.y}}}var ue=ze?J:Z;Qe.nodesOverlap=ue.nodesOverlap,Qe.srcIntn=ue.srcIntn,Qe.tgtIntn=ue.tgtIntn,Qe.isRound=it.startsWith("round"),c&&(se.isParent()||se.isChild()||le.isParent()||le.isChild())&&(se.parents().anySame(le)||le.parents().anySame(se)||se.same(le)&&se.isParent())?r.findCompoundLoopPoints(He,ue,ke,ft):se===le?r.findLoopPoints(He,ue,ke,ft):it.endsWith("segments")?r.findSegmentsPoints(He,ue):it.endsWith("taxi")?r.findTaxiPoints(He,ue):it==="straight"||!ft&&Z.eles.length%2===1&&ke===Math.floor(Z.eles.length/2)?r.findStraightEdgePoints(He):r.findBezierPoints(He,ue,ke,ft,ze),r.findEndpoints(He),r.tryToCorrectInvalidPoints(He,ue),r.checkForInvalidEdgeWarning(He),r.storeAllpts(He),r.storeEdgeProjections(He),r.calculateArrowAngles(He),r.recalculateEdgeLabelProjections(He),r.calculateLabelAngles(He)}},z=0;z<d.length;z++)F();this.findHaystackPoints(p)}};function BD(t){var r=[];if(t!=null){for(var a=0;a<t.length;a+=2){var s=t[a],c=t[a+1];r.push({x:s,y:c})}return r}}Zo.getSegmentPoints=function(t){var r=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var a=r.edgeType;if(a==="segments")return BD(r.segpts)},Zo.getControlPoints=function(t){var r=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var a=r.edgeType;if(a==="bezier"||a==="multibezier"||a==="self"||a==="compound")return BD(r.ctrlpts)},Zo.getEdgeMidpoint=function(t){var r=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:r.midX,y:r.midY}};var A0={};A0.manualEndptToPx=function(t,r){var a=this,s=t.position(),c=t.outerWidth(),l=t.outerHeight(),h=t._private.rscratch;if(r.value.length===2){var d=[r.pfValue[0],r.pfValue[1]];return r.units[0]==="%"&&(d[0]=d[0]*c),r.units[1]==="%"&&(d[1]=d[1]*l),d[0]+=s.x,d[1]+=s.y,d}else{var p=r.pfValue[0];p=-Math.PI/2+p;var b=2*Math.max(c,l),m=[s.x+Math.cos(p)*b,s.y+Math.sin(p)*b];return a.nodeShapes[this.getNodeShape(t)].intersectLine(s.x,s.y,c,l,m[0],m[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,h)}},A0.findEndpoints=function(t){var r,a,s,c,l=this,h,d=t.source()[0],p=t.target()[0],b=d.position(),m=p.position(),w=t.pstyle("target-arrow-shape").value,k=t.pstyle("source-arrow-shape").value,P=t.pstyle("target-distance-from-node").pfValue,S=t.pstyle("source-distance-from-node").pfValue,M=d._private.rscratch,L=p._private.rscratch,T=t.pstyle("curve-style").value,j=t._private.rscratch,I=j.edgeType,R=mh(T,"taxi"),B=I==="self"||I==="compound",F=I==="bezier"||I==="multibezier"||B,z=I!=="bezier",D=I==="straight"||I==="segments",H=I==="segments",Q=F||z||D,q=B||R,Z=t.pstyle("source-endpoint"),J=q?"outside-to-node":Z.value,K=d.pstyle("corner-radius").value==="auto"?"auto":d.pstyle("corner-radius").pfValue,ae=t.pstyle("target-endpoint"),se=q?"outside-to-node":ae.value,le=p.pstyle("corner-radius").value==="auto"?"auto":p.pstyle("corner-radius").pfValue;j.srcManEndpt=Z,j.tgtManEndpt=ae;var he,fe,pe,me,Te=(r=(ae==null||(a=ae.pfValue)===null||a===void 0?void 0:a.length)===2?ae.pfValue:null)!==null&&r!==void 0?r:[0,0],Oe=(s=(Z==null||(c=Z.pfValue)===null||c===void 0?void 0:c.length)===2?Z.pfValue:null)!==null&&s!==void 0?s:[0,0];if(F){var ge=[j.ctrlpts[0],j.ctrlpts[1]],xe=z?[j.ctrlpts[j.ctrlpts.length-2],j.ctrlpts[j.ctrlpts.length-1]]:ge;he=xe,fe=ge}else if(D){var Se=H?j.segpts.slice(0,2):[m.x+Te[0],m.y+Te[1]],Le=H?j.segpts.slice(j.segpts.length-2):[b.x+Oe[0],b.y+Oe[1]];he=Le,fe=Se}if(se==="inside-to-node")h=[m.x,m.y];else if(ae.units)h=this.manualEndptToPx(p,ae);else if(se==="outside-to-line")h=j.tgtIntn;else if(se==="outside-to-node"||se==="outside-to-node-or-label"?pe=he:(se==="outside-to-line"||se==="outside-to-line-or-label")&&(pe=[b.x,b.y]),h=l.nodeShapes[this.getNodeShape(p)].intersectLine(m.x,m.y,p.outerWidth(),p.outerHeight(),pe[0],pe[1],0,le,L),se==="outside-to-node-or-label"||se==="outside-to-line-or-label"){var De=p._private.rscratch,Ne=De.labelWidth,Me=De.labelHeight,ke=De.labelX,He=De.labelY,Qe=Ne/2,it=Me/2,ft=p.pstyle("text-valign").value;ft==="top"?He-=it:ft==="bottom"&&(He+=it);var ze=p.pstyle("text-halign").value;ze==="left"?ke-=Qe:ze==="right"&&(ke+=Qe);var $e=y0(pe[0],pe[1],[ke-Qe,He-it,ke+Qe,He-it,ke+Qe,He+it,ke-Qe,He+it],m.x,m.y);if($e.length>0){var xt=b,st=$d(xt,Sg(h)),Rt=$d(xt,Sg($e)),It=st;if(Rt<st&&(h=$e,It=Rt),$e.length>2){var Dt=$d(xt,{x:$e[2],y:$e[3]});Dt<It&&(h=[$e[2],$e[3]])}}}var Ut=cw(h,he,l.arrowShapes[w].spacing(t)+P),bn=cw(h,he,l.arrowShapes[w].gap(t)+P);if(j.endX=bn[0],j.endY=bn[1],j.arrowEndX=Ut[0],j.arrowEndY=Ut[1],J==="inside-to-node")h=[b.x,b.y];else if(Z.units)h=this.manualEndptToPx(d,Z);else if(J==="outside-to-line")h=j.srcIntn;else if(J==="outside-to-node"||J==="outside-to-node-or-label"?me=fe:(J==="outside-to-line"||J==="outside-to-line-or-label")&&(me=[m.x,m.y]),h=l.nodeShapes[this.getNodeShape(d)].intersectLine(b.x,b.y,d.outerWidth(),d.outerHeight(),me[0],me[1],0,K,M),J==="outside-to-node-or-label"||J==="outside-to-line-or-label"){var sn=d._private.rscratch,ir=sn.labelWidth,U=sn.labelHeight,ne=sn.labelX,ue=sn.labelY,we=ir/2,Ae=U/2,ie=d.pstyle("text-valign").value;ie==="top"?ue-=Ae:ie==="bottom"&&(ue+=Ae);var Pe=d.pstyle("text-halign").value;Pe==="left"?ne-=we:Pe==="right"&&(ne+=we);var Fe=y0(me[0],me[1],[ne-we,ue-Ae,ne+we,ue-Ae,ne+we,ue+Ae,ne-we,ue+Ae],b.x,b.y);if(Fe.length>0){var We=m,Xe=$d(We,Sg(h)),wt=$d(We,Sg(Fe)),nt=Xe;if(wt<Xe&&(h=[Fe[0],Fe[1]],nt=wt),Fe.length>2){var Kt=$d(We,{x:Fe[2],y:Fe[3]});Kt<nt&&(h=[Fe[2],Fe[3]])}}}var Ht=cw(h,fe,l.arrowShapes[k].spacing(t)+S),Xt=cw(h,fe,l.arrowShapes[k].gap(t)+S);j.startX=Xt[0],j.startY=Xt[1],j.arrowStartX=Ht[0],j.arrowStartY=Ht[1],Q&&(!Lt(j.startX)||!Lt(j.startY)||!Lt(j.endX)||!Lt(j.endY)?j.badLine=!0:j.badLine=!1)},A0.getSourceEndpoint=function(t){var r=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),r.edgeType){case"haystack":return{x:r.haystackPts[0],y:r.haystackPts[1]};default:return{x:r.arrowStartX,y:r.arrowStartY}}},A0.getTargetEndpoint=function(t){var r=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),r.edgeType){case"haystack":return{x:r.haystackPts[2],y:r.haystackPts[3]};default:return{x:r.arrowEndX,y:r.arrowEndY}}};var HP={};function che(t,r,a){for(var s=function(p,b,m,w){return ho(p,b,m,w)},c=r._private,l=c.rstyle.bezierPts,h=0;h<t.bezierProjPcts.length;h++){var d=t.bezierProjPcts[h];l.push({x:s(a[0],a[2],a[4],d),y:s(a[1],a[3],a[5],d)})}}HP.storeEdgeProjections=function(t){var r=t._private,a=r.rscratch,s=a.edgeType;if(r.rstyle.bezierPts=null,r.rstyle.linePts=null,r.rstyle.haystackPts=null,s==="multibezier"||s==="bezier"||s==="self"||s==="compound"){r.rstyle.bezierPts=[];for(var c=0;c+5<a.allpts.length;c+=4)che(this,t,a.allpts.slice(c,c+6))}else if(s==="segments")for(var l=r.rstyle.linePts=[],c=0;c+1<a.allpts.length;c+=2)l.push({x:a.allpts[c],y:a.allpts[c+1]});else if(s==="haystack"){var h=a.haystackPts;r.rstyle.haystackPts=[{x:h[0],y:h[1]},{x:h[2],y:h[3]}]}r.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},HP.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var cl={};cl.recalculateNodeLabelProjection=function(t){var r=t.pstyle("label").strValue;if(!yh(r)){var a,s,c=t._private,l=t.width(),h=t.height(),d=t.padding(),p=t.position(),b=t.pstyle("text-halign").strValue,m=t.pstyle("text-valign").strValue,w=c.rscratch,k=c.rstyle;switch(b){case"left":a=p.x-l/2-d;break;case"right":a=p.x+l/2+d;break;default:a=p.x}switch(m){case"top":s=p.y-h/2-d;break;case"bottom":s=p.y+h/2+d;break;default:s=p.y}w.labelX=a,w.labelY=s,k.labelX=a,k.labelY=s,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};var GD=function(t,r){var a=Math.atan(r/t);return t===0&&a<0&&(a=a*-1),a},HD=function(t,r){var a=r.x-t.x,s=r.y-t.y;return GD(a,s)},lhe=function(t,r,a,s){var c=b0(0,s-.001,1),l=b0(0,s+.001,1),h=Ng(t,r,a,c),d=Ng(t,r,a,l);return HD(h,d)};cl.recalculateEdgeLabelProjections=function(t){var r,a=t._private,s=a.rscratch,c=this,l={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(l.mid||l.source||l.target){r={x:s.midX,y:s.midY};var h=function(m,w,k){df(a.rscratch,m,w,k),df(a.rstyle,m,w,k)};h("labelX",null,r.x),h("labelY",null,r.y);var d=GD(s.midDispX,s.midDispY);h("labelAutoAngle",null,d);var p=function(){if(p.cache)return p.cache;for(var m=[],w=0;w+5<s.allpts.length;w+=4){var k={x:s.allpts[w],y:s.allpts[w+1]},P={x:s.allpts[w+2],y:s.allpts[w+3]},S={x:s.allpts[w+4],y:s.allpts[w+5]};m.push({p0:k,p1:P,p2:S,startDist:0,length:0,segments:[]})}var M=a.rstyle.bezierPts,L=c.bezierProjPcts.length;function T(F,z,D,H,Q){var q=Zd(z,D),Z=F.segments[F.segments.length-1],J={p0:z,p1:D,t0:H,t1:Q,startDist:Z?Z.startDist+Z.length:0,length:q};F.segments.push(J),F.length+=q}for(var j=0;j<m.length;j++){var I=m[j],R=m[j-1];R&&(I.startDist=R.startDist+R.length),T(I,I.p0,M[j*L],0,c.bezierProjPcts[0]);for(var B=0;B<L-1;B++)T(I,M[j*L+B],M[j*L+B+1],c.bezierProjPcts[B],c.bezierProjPcts[B+1]);T(I,M[j*L+L-1],I.p2,c.bezierProjPcts[L-1],1)}return p.cache=m},b=function(m){var w,k=m==="source";if(l[m]){var P=t.pstyle(m+"-text-offset").pfValue;switch(s.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var S=p(),M,L=0,T=0,j=0;j<S.length;j++){for(var I=S[k?j:S.length-1-j],R=0;R<I.segments.length;R++){var B=I.segments[k?R:I.segments.length-1-R],F=j===S.length-1&&R===I.segments.length-1;if(L=T,T+=B.length,T>=P||F){M={cp:I,segment:B};break}}if(M)break}var z=M.cp,D=M.segment,H=(P-L)/D.length,Q=D.t1-D.t0,q=k?D.t0+Q*H:D.t1-Q*H;q=b0(0,q,1),r=Ng(z.p0,z.p1,z.p2,q),w=lhe(z.p0,z.p1,z.p2,q);break}case"straight":case"segments":case"haystack":{for(var Z=0,J,K,ae,se,le=s.allpts.length,he=0;he+3<le&&(k?(ae={x:s.allpts[he],y:s.allpts[he+1]},se={x:s.allpts[he+2],y:s.allpts[he+3]}):(ae={x:s.allpts[le-2-he],y:s.allpts[le-1-he]},se={x:s.allpts[le-4-he],y:s.allpts[le-3-he]}),J=Zd(ae,se),K=Z,Z+=J,!(Z>=P));he+=2);var fe=P-K,pe=fe/J;pe=b0(0,pe,1),r=Aue(ae,se,pe),w=HD(ae,se);break}}h("labelX",m,r.x),h("labelY",m,r.y),h("labelAutoAngle",m,w)}};b("source"),b("target"),this.applyLabelDimensions(t)}},cl.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},cl.applyPrefixedLabelDimensions=function(t,r){var a=t._private,s=this.getLabelText(t,r),c=qd(s,t._private.labelDimsKey);if(Gs(a.rscratch,"prefixedLabelDimsKey",r)!==c){df(a.rscratch,"prefixedLabelDimsKey",r,c);var l=this.calculateLabelDimensions(t,s),h=t.pstyle("line-height").pfValue,d=t.pstyle("text-wrap").strValue,p=Gs(a.rscratch,"labelWrapCachedLines",r)||[],b=d!=="wrap"?1:Math.max(p.length,1),m=l.height/b,w=m*h,k=l.width,P=l.height+(b-1)*(h-1)*m;df(a.rstyle,"labelWidth",r,k),df(a.rscratch,"labelWidth",r,k),df(a.rstyle,"labelHeight",r,P),df(a.rscratch,"labelHeight",r,P),df(a.rscratch,"labelLineHeight",r,w)}},cl.getLabelText=function(t,r){var a=t._private,s=r?r+"-":"",c=t.pstyle(s+"label").strValue,l=t.pstyle("text-transform").value,h=function(Te,Oe){return Oe?(df(a.rscratch,Te,r,Oe),Oe):Gs(a.rscratch,Te,r)};if(!c)return"";l=="none"||(l=="uppercase"?c=c.toUpperCase():l=="lowercase"&&(c=c.toLowerCase()));var d=t.pstyle("text-wrap").value;if(d==="wrap"){var p=h("labelKey");if(p!=null&&h("labelWrapKey")===p)return h("labelWrapCachedText");for(var b="",m=c.split(`
|
|
44
|
+
`),w=t.pstyle("text-max-width").pfValue,k=t.pstyle("text-overflow-wrap").value,P=k==="anywhere",S=[],M=/[\s\u200b]+|$/g,L=0;L<m.length;L++){var T=m[L],j=this.calculateLabelDimensions(t,T),I=j.width;if(P){var R=T.split("").join(b);T=R}if(I>w){var B=T.matchAll(M),F="",z=0,D=Bs(B),H;try{for(D.s();!(H=D.n()).done;){var Q=H.value,q=Q[0],Z=T.substring(z,Q.index);z=Q.index+q.length;var J=F.length===0?Z:F+Z+q,K=this.calculateLabelDimensions(t,J),ae=K.width;ae<=w?F+=Z+q:(F&&S.push(F),F=Z+q)}}catch(Te){D.e(Te)}finally{D.f()}F.match(/^[\s\u200b]+$/)||S.push(F)}else S.push(T)}h("labelWrapCachedLines",S),c=h("labelWrapCachedText",S.join(`
|
|
45
|
+
`)),h("labelWrapKey",p)}else if(d==="ellipsis"){var se=t.pstyle("text-max-width").pfValue,le="",he="…",fe=!1;if(this.calculateLabelDimensions(t,c).width<se)return c;for(var pe=0;pe<c.length;pe++){var me=this.calculateLabelDimensions(t,le+c[pe]+he).width;if(me>se)break;le+=c[pe],pe===c.length-1&&(fe=!0)}return fe||(le+=he),le}return c},cl.getLabelJustification=function(t){var r=t.pstyle("text-justification").strValue,a=t.pstyle("text-halign").strValue;if(r==="auto")if(t.isNode())switch(a){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return r},cl.calculateLabelDimensions=function(t,r){var a=this,s=a.cy.window(),c=s.document,l=0,h=t.pstyle("font-style").strValue,d=t.pstyle("font-size").pfValue,p=t.pstyle("font-family").strValue,b=t.pstyle("font-weight").strValue,m=this.labelCalcCanvas,w=this.labelCalcCanvasContext;if(!m){m=this.labelCalcCanvas=c.createElement("canvas"),w=this.labelCalcCanvasContext=m.getContext("2d");var k=m.style;k.position="absolute",k.left="-9999px",k.top="-9999px",k.zIndex="-1",k.visibility="hidden",k.pointerEvents="none"}w.font="".concat(h," ").concat(b," ").concat(d,"px ").concat(p);for(var P=0,S=0,M=r.split(`
|
|
46
|
+
`),L=0;L<M.length;L++){var T=M[L],j=w.measureText(T),I=Math.ceil(j.width),R=d;P=Math.max(I,P),S+=R}return P+=l,S+=l,{width:P,height:S}},cl.calculateLabelAngle=function(t,r){var a=t._private,s=a.rscratch,c=t.isEdge(),l=r?r+"-":"",h=t.pstyle(l+"text-rotation"),d=h.strValue;return d==="none"?0:c&&d==="autorotate"?s.labelAutoAngle:d==="autorotate"?0:h.pfValue},cl.calculateLabelAngles=function(t){var r=this,a=t.isEdge(),s=t._private,c=s.rscratch;c.labelAngle=r.calculateLabelAngle(t),a&&(c.sourceLabelAngle=r.calculateLabelAngle(t,"source"),c.targetLabelAngle=r.calculateLabelAngle(t,"target"))};var zD={},FD=28,UD=!1;zD.getNodeShape=function(t){var r=this,a=t.pstyle("shape").value;if(a==="cutrectangle"&&(t.width()<FD||t.height()<FD))return UD||(Gr("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),UD=!0),"rectangle";if(t.isParent())return a==="rectangle"||a==="roundrectangle"||a==="round-rectangle"||a==="cutrectangle"||a==="cut-rectangle"||a==="barrel"?a:"rectangle";if(a==="polygon"){var s=t.pstyle("shape-polygon-points").value;return r.nodeShapes.makePolygon(s).name}return a};var Hw={};Hw.registerCalculationListeners=function(){var t=this.cy,r=t.collection(),a=this,s=function(l){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(r.merge(l),h)for(var d=0;d<l.length;d++){var p=l[d],b=p._private,m=b.rstyle;m.clean=!1,m.cleanConnected=!1}};a.binder(t).on("bounds.* dirty.*",function(l){var h=l.target;s(h)}).on("style.* background.*",function(l){var h=l.target;s(h,!1)});var c=function(l){if(l){var h=a.onUpdateEleCalcsFns;r.cleanStyle();for(var d=0;d<r.length;d++){var p=r[d],b=p._private.rstyle;p.isNode()&&!b.cleanConnected&&(s(p.connectedEdges()),b.cleanConnected=!0)}if(h)for(var m=0;m<h.length;m++){var w=h[m];w(l,r)}a.recalculateRenderedStyle(r),r=t.collection()}};a.flushRenderedStyleQueue=function(){c(!0)},a.beforeRender(c,a.beforeRenderPriorities.eleCalcs)},Hw.onUpdateEleCalcs=function(t){var r=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];r.push(t)},Hw.recalculateRenderedStyle=function(t,r){var a=function(I){return I._private.rstyle.cleanConnected};if(t.length!==0){var s=[],c=[];if(!this.destroyed){r===void 0&&(r=!0);for(var l=0;l<t.length;l++){var h=t[l],d=h._private,p=d.rstyle;h.isEdge()&&(!a(h.source())||!a(h.target()))&&(p.clean=!1),h.isEdge()&&h.isBundledBezier()&&h.parallelEdges().some(function(I){return!I._private.rstyle.clean&&I.isBundledBezier()})&&(p.clean=!1),!(r&&p.clean||h.removed())&&h.pstyle("display").value!=="none"&&(d.group==="nodes"?c.push(h):s.push(h),p.clean=!0)}for(var b=0;b<c.length;b++){var m=c[b],w=m._private,k=w.rstyle,P=m.position();this.recalculateNodeLabelProjection(m),k.nodeX=P.x,k.nodeY=P.y,k.nodeW=m.pstyle("width").pfValue,k.nodeH=m.pstyle("height").pfValue}this.recalculateEdgeProjections(s);for(var S=0;S<s.length;S++){var M=s[S],L=M._private,T=L.rstyle,j=L.rscratch;T.srcX=j.arrowStartX,T.srcY=j.arrowStartY,T.tgtX=j.arrowEndX,T.tgtY=j.arrowEndY,T.midX=j.midX,T.midY=j.midY,T.labelAngle=j.labelAngle,T.sourceLabelAngle=j.sourceLabelAngle,T.targetLabelAngle=j.targetLabelAngle}}}};var zw={};zw.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var r=[],a=0;a<t.length;a++){var s=t[a],c=s._private.rscratch;s.grabbed()&&!s.isParent()?r.push(s):c.inDragLayer?t.drag.push(s):t.nondrag.push(s)}for(var a=0;a<r.length;a++){var s=r[a];t.drag.push(s)}}},zw.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},zw.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var r=this.cy.mutableElements().toArray();r.sort(rD),r.interactive=r.filter(function(a){return a.interactive()}),this.cachedZSortedEles=r,this.updateCachedGrabbedEles()}else r=this.cachedZSortedEles;return r};var YD={};[Jd,Dw,Zo,A0,HP,cl,zD,Hw,zw].forEach(function(t){gn(YD,t)});var VD={};VD.getCachedImage=function(t,r,a){var s=this,c=s.imageCache=s.imageCache||{},l=c[t];if(l)return l.image.complete||l.image.addEventListener("load",a),l.image;l=c[t]=c[t]||{};var h=l.image=new Image;h.addEventListener("load",a),h.addEventListener("error",function(){h.error=!0});var d="data:",p=t.substring(0,d.length).toLowerCase()===d;return p||(r=r==="null"?null:r,h.crossOrigin=r),h.src=t,h};var Ug={};Ug.registerBinding=function(t,r,a,s){var c=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var l=[],h=0;h<t.length;h++){var d=t[h];if(d!==void 0){var p=this.binder(d);l.push(p.on.apply(p,c))}}return l}var p=this.binder(t);return p.on.apply(p,c)},Ug.binder=function(t){var r=this,a=r.cy.window(),s=t===a||t===a.document||t===a.document.body||kse(t);if(r.supportsPassiveEvents==null){var c=!1;try{var l=Object.defineProperty({},"passive",{get:function(){return c=!0,!0}});a.addEventListener("test",null,l)}catch{}r.supportsPassiveEvents=c}var h=function(d,p,b){var m=Array.prototype.slice.call(arguments);return s&&r.supportsPassiveEvents&&(m[2]={capture:b??!1,passive:!1,once:!1}),r.bindings.push({target:t,args:m}),(t.addEventListener||t.on).apply(t,m),this};return{on:h,addEventListener:h,addListener:h,bind:h}},Ug.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},Ug.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()},Ug.load=function(){var t=this,r=t.cy.window(),a=function(ie){return ie.selected()},s=function(ie){var Pe=ie.getRootNode();if(Pe&&Pe.nodeType===11&&Pe.host!==void 0)return Pe},c=function(ie,Pe,Fe,We){ie==null&&(ie=t.cy);for(var Xe=0;Xe<Pe.length;Xe++){var wt=Pe[Xe];ie.emit({originalEvent:Fe,type:wt,position:We})}},l=function(ie){return ie.shiftKey||ie.metaKey||ie.ctrlKey},h=function(ie,Pe){var Fe=!0;if(t.cy.hasCompoundNodes()&&ie&&ie.pannable())for(var We=0;Pe&&We<Pe.length;We++){var ie=Pe[We];if(ie.isNode()&&ie.isParent()&&!ie.pannable()){Fe=!1;break}}else Fe=!0;return Fe},d=function(ie){ie[0]._private.grabbed=!0},p=function(ie){ie[0]._private.grabbed=!1},b=function(ie){ie[0]._private.rscratch.inDragLayer=!0},m=function(ie){ie[0]._private.rscratch.inDragLayer=!1},w=function(ie){ie[0]._private.rscratch.isGrabTarget=!0},k=function(ie){ie[0]._private.rscratch.isGrabTarget=!1},P=function(ie,Pe){var Fe=Pe.addToList,We=Fe.has(ie);!We&&ie.grabbable()&&!ie.locked()&&(Fe.merge(ie),d(ie))},S=function(ie,Pe){if(ie.cy().hasCompoundNodes()&&!(Pe.inDragLayer==null&&Pe.addToList==null)){var Fe=ie.descendants();Pe.inDragLayer&&(Fe.forEach(b),Fe.connectedEdges().forEach(b)),Pe.addToList&&P(Fe,Pe)}},M=function(ie,Pe){Pe=Pe||{};var Fe=ie.cy().hasCompoundNodes();Pe.inDragLayer&&(ie.forEach(b),ie.neighborhood().stdFilter(function(We){return!Fe||We.isEdge()}).forEach(b)),Pe.addToList&&ie.forEach(function(We){P(We,Pe)}),S(ie,Pe),j(ie,{inDragLayer:Pe.inDragLayer}),t.updateCachedGrabbedEles()},L=M,T=function(ie){ie&&(t.getCachedZSortedEles().forEach(function(Pe){p(Pe),m(Pe),k(Pe)}),t.updateCachedGrabbedEles())},j=function(ie,Pe){if(!(Pe.inDragLayer==null&&Pe.addToList==null)&&ie.cy().hasCompoundNodes()){var Fe=ie.ancestors().orphans();if(!Fe.same(ie)){var We=Fe.descendants().spawnSelf().merge(Fe).unmerge(ie).unmerge(ie.descendants()),Xe=We.connectedEdges();Pe.inDragLayer&&(Xe.forEach(b),We.forEach(b)),Pe.addToList&&We.forEach(function(wt){P(wt,Pe)})}}},I=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},R=typeof MutationObserver<"u",B=typeof ResizeObserver<"u";R?(t.removeObserver=new MutationObserver(function(ie){for(var Pe=0;Pe<ie.length;Pe++){var Fe=ie[Pe],We=Fe.removedNodes;if(We)for(var Xe=0;Xe<We.length;Xe++){var wt=We[Xe];if(wt===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(ie){t.destroy()});var F=f0(function(){t.cy.resize()},100);R&&(t.styleObserver=new MutationObserver(F),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(r,"resize",F),B&&(t.resizeObserver=new ResizeObserver(F),t.resizeObserver.observe(t.container));var z=function(ie,Pe){for(;ie!=null;)Pe(ie),ie=ie.parentNode},D=function(){t.invalidateContainerClientCoordsCache()};z(t.container,function(ie){t.registerBinding(ie,"transitionend",D),t.registerBinding(ie,"animationend",D),t.registerBinding(ie,"scroll",D)}),t.registerBinding(t.container,"contextmenu",function(ie){ie.preventDefault()});var H=function(){return t.selection[4]!==0},Q=function(ie){for(var Pe=t.findContainerClientCoords(),Fe=Pe[0],We=Pe[1],Xe=Pe[2],wt=Pe[3],nt=ie.touches?ie.touches:[ie],Kt=!1,Ht=0;Ht<nt.length;Ht++){var Xt=nt[Ht];if(Fe<=Xt.clientX&&Xt.clientX<=Fe+Xe&&We<=Xt.clientY&&Xt.clientY<=We+wt){Kt=!0;break}}if(!Kt)return!1;for(var Yn=t.container,Gn=ie.target,Qt=Gn.parentNode,Hn=!1;Qt;){if(Qt===Yn){Hn=!0;break}Qt=Qt.parentNode}return!!Hn};t.registerBinding(t.container,"mousedown",function(ie){if(Q(ie)&&!(t.hoverData.which===1&&ie.which!==1)){ie.preventDefault(),I(),t.hoverData.capture=!0,t.hoverData.which=ie.which;var Pe=t.cy,Fe=[ie.clientX,ie.clientY],We=t.projectIntoViewport(Fe[0],Fe[1]),Xe=t.selection,wt=t.findNearestElements(We[0],We[1],!0,!1),nt=wt[0],Kt=t.dragData.possibleDragElements;t.hoverData.mdownPos=We,t.hoverData.mdownGPos=Fe;var Ht=function(Hn){return{originalEvent:ie,type:Hn,position:{x:We[0],y:We[1]}}},Xt=function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var Hn=t.hoverData.down;Hn?Hn.emit(Ht("taphold")):Pe.emit(Ht("taphold"))}},t.tapholdDuration)};if(ie.which==3){t.hoverData.cxtStarted=!0;var Yn={originalEvent:ie,type:"cxttapstart",position:{x:We[0],y:We[1]}};nt?(nt.activate(),nt.emit(Yn),t.hoverData.down=nt):Pe.emit(Yn),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(ie.which==1){nt&&nt.activate();{if(nt!=null&&t.nodeIsGrabbable(nt)){var Gn=function(Hn){Hn.emit(Ht("grab"))};if(w(nt),!nt.selected())Kt=t.dragData.possibleDragElements=Pe.collection(),L(nt,{addToList:Kt}),nt.emit(Ht("grabon")).emit(Ht("grab"));else{Kt=t.dragData.possibleDragElements=Pe.collection();var Qt=Pe.$(function(Hn){return Hn.isNode()&&Hn.selected()&&t.nodeIsGrabbable(Hn)});M(Qt,{addToList:Kt}),nt.emit(Ht("grabon")),Qt.forEach(Gn)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=nt,t.hoverData.downs=wt,t.hoverData.downTime=new Date().getTime()}c(nt,["mousedown","tapstart","vmousedown"],ie,{x:We[0],y:We[1]}),nt==null?(Xe[4]=1,t.data.bgActivePosistion={x:We[0],y:We[1]},t.redrawHint("select",!0),t.redraw()):nt.pannable()&&(Xe[4]=1),Xt()}Xe[0]=Xe[2]=We[0],Xe[1]=Xe[3]=We[1]}},!1);var q=s(t.container);t.registerBinding([r,q],"mousemove",function(ie){var Pe=t.hoverData.capture;if(!(!Pe&&!Q(ie))){var Fe=!1,We=t.cy,Xe=We.zoom(),wt=[ie.clientX,ie.clientY],nt=t.projectIntoViewport(wt[0],wt[1]),Kt=t.hoverData.mdownPos,Ht=t.hoverData.mdownGPos,Xt=t.selection,Yn=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(Yn=t.findNearestElement(nt[0],nt[1],!0,!1));var Gn=t.hoverData.last,Qt=t.hoverData.down,Hn=[nt[0]-Xt[2],nt[1]-Xt[3]],gr=t.dragData.possibleDragElements,ii;if(Ht){var Wi=wt[0]-Ht[0],La=Wi*Wi,Pi=wt[1]-Ht[1],Bi=Pi*Pi,yi=La+Bi;t.hoverData.isOverThresholdDrag=ii=yi>=t.desktopTapThreshold2}var Oa=l(ie);ii&&(t.hoverData.tapholdCancelled=!0);var pu=function(){var Cn=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Cn.length===0?(Cn.push(Hn[0]),Cn.push(Hn[1])):(Cn[0]+=Hn[0],Cn[1]+=Hn[1])};Fe=!0,c(Yn,["mousemove","vmousemove","tapdrag"],ie,{x:nt[0],y:nt[1]});var Si=function(Cn){return{originalEvent:ie,type:Cn,position:{x:nt[0],y:nt[1]}}},Io=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||We.emit(Si("boxstart")),Xt[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(ii){var je=Si("cxtdrag");Qt?Qt.emit(je):We.emit(je),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||Yn!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(Si("cxtdragout")),t.hoverData.cxtOver=Yn,Yn&&Yn.emit(Si("cxtdragover")))}}else if(t.hoverData.dragging){if(Fe=!0,We.panningEnabled()&&We.userPanningEnabled()){var bt;if(t.hoverData.justStartedPan){var Bt=t.hoverData.mdownPos;bt={x:(nt[0]-Bt[0])*Xe,y:(nt[1]-Bt[1])*Xe},t.hoverData.justStartedPan=!1}else bt={x:Hn[0]*Xe,y:Hn[1]*Xe};We.panBy(bt),We.emit(Si("dragpan")),t.hoverData.dragged=!0}nt=t.projectIntoViewport(ie.clientX,ie.clientY)}else if(Xt[4]==1&&(Qt==null||Qt.pannable())){if(ii){if(!t.hoverData.dragging&&We.boxSelectionEnabled()&&(Oa||!We.panningEnabled()||!We.userPanningEnabled()))Io();else if(!t.hoverData.selecting&&We.panningEnabled()&&We.userPanningEnabled()){var un=h(Qt,t.hoverData.downs);un&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Xt[4]=0,t.data.bgActivePosistion=Sg(Kt),t.redrawHint("select",!0),t.redraw())}Qt&&Qt.pannable()&&Qt.active()&&Qt.unactivate()}}else{if(Qt&&Qt.pannable()&&Qt.active()&&Qt.unactivate(),(!Qt||!Qt.grabbed())&&Yn!=Gn&&(Gn&&c(Gn,["mouseout","tapdragout"],ie,{x:nt[0],y:nt[1]}),Yn&&c(Yn,["mouseover","tapdragover"],ie,{x:nt[0],y:nt[1]}),t.hoverData.last=Yn),Qt)if(ii){if(We.boxSelectionEnabled()&&Oa)Qt&&Qt.grabbed()&&(T(gr),Qt.emit(Si("freeon")),gr.emit(Si("free")),t.dragData.didDrag&&(Qt.emit(Si("dragfreeon")),gr.emit(Si("dragfree")))),Io();else if(Qt&&Qt.grabbed()&&t.nodeIsDraggable(Qt)){var Ln=!t.dragData.didDrag;Ln&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||M(gr,{inDragLayer:!0});var Dn={x:0,y:0};if(Lt(Hn[0])&&Lt(Hn[1])&&(Dn.x+=Hn[0],Dn.y+=Hn[1],Ln)){var vn=t.hoverData.dragDelta;vn&&Lt(vn[0])&&Lt(vn[1])&&(Dn.x+=vn[0],Dn.y+=vn[1])}t.hoverData.draggingEles=!0,gr.silentShift(Dn).emit(Si("position")).emit(Si("drag")),t.redrawHint("drag",!0),t.redraw()}}else pu();Fe=!0}if(Xt[2]=nt[0],Xt[3]=nt[1],Fe)return ie.stopPropagation&&ie.stopPropagation(),ie.preventDefault&&ie.preventDefault(),!1}},!1);var Z,J,K;t.registerBinding(r,"mouseup",function(ie){if(!(t.hoverData.which===1&&ie.which!==1&&t.hoverData.capture)){var Pe=t.hoverData.capture;if(Pe){t.hoverData.capture=!1;var Fe=t.cy,We=t.projectIntoViewport(ie.clientX,ie.clientY),Xe=t.selection,wt=t.findNearestElement(We[0],We[1],!0,!1),nt=t.dragData.possibleDragElements,Kt=t.hoverData.down,Ht=l(ie);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,Kt&&Kt.unactivate();var Xt=function(ii){return{originalEvent:ie,type:ii,position:{x:We[0],y:We[1]}}};if(t.hoverData.which===3){var Yn=Xt("cxttapend");if(Kt?Kt.emit(Yn):Fe.emit(Yn),!t.hoverData.cxtDragged){var Gn=Xt("cxttap");Kt?Kt.emit(Gn):Fe.emit(Gn)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(c(wt,["mouseup","tapend","vmouseup"],ie,{x:We[0],y:We[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(c(Kt,["click","tap","vclick"],ie,{x:We[0],y:We[1]}),J=!1,ie.timeStamp-K<=Fe.multiClickDebounceTime()?(Z&&clearTimeout(Z),J=!0,K=null,c(Kt,["dblclick","dbltap","vdblclick"],ie,{x:We[0],y:We[1]})):(Z=setTimeout(function(){J||c(Kt,["oneclick","onetap","voneclick"],ie,{x:We[0],y:We[1]})},Fe.multiClickDebounceTime()),K=ie.timeStamp)),Kt==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!l(ie)&&(Fe.$(a).unselect(["tapunselect"]),nt.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=nt=Fe.collection()),wt==Kt&&!t.dragData.didDrag&&!t.hoverData.selecting&&wt!=null&&wt._private.selectable&&(t.hoverData.dragging||(Fe.selectionType()==="additive"||Ht?wt.selected()?wt.unselect(["tapunselect"]):wt.select(["tapselect"]):Ht||(Fe.$(a).unmerge(wt).unselect(["tapunselect"]),wt.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Qt=Fe.collection(t.getAllInBox(Xe[0],Xe[1],Xe[2],Xe[3]));t.redrawHint("select",!0),Qt.length>0&&t.redrawHint("eles",!0),Fe.emit(Xt("boxend"));var Hn=function(ii){return ii.selectable()&&!ii.selected()};Fe.selectionType()==="additive"||Ht||Fe.$(a).unmerge(Qt).unselect(),Qt.emit(Xt("box")).stdFilter(Hn).select().emit(Xt("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!Xe[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var gr=Kt&&Kt.grabbed();T(nt),gr&&(Kt.emit(Xt("freeon")),nt.emit(Xt("free")),t.dragData.didDrag&&(Kt.emit(Xt("dragfreeon")),nt.emit(Xt("dragfree"))))}}Xe[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var ae=[],se=4,le,he=1e5,fe=function(ie,Pe){for(var Fe=0;Fe<ie.length;Fe++)if(ie[Fe]%Pe!==0)return!1;return!0},pe=function(ie){for(var Pe=Math.abs(ie[0]),Fe=1;Fe<ie.length;Fe++)if(Math.abs(ie[Fe])!==Pe)return!1;return!0},me=function(ie){var Pe=!1,Fe=ie.deltaY;if(Fe==null&&(ie.wheelDeltaY!=null?Fe=ie.wheelDeltaY/4:ie.wheelDelta!=null&&(Fe=ie.wheelDelta/4)),Fe!==0){if(le==null)if(ae.length>=se){var We=ae;if(le=fe(We,5),!le){var Xe=Math.abs(We[0]);le=pe(We)&&Xe>5}if(le)for(var wt=0;wt<We.length;wt++)he=Math.min(Math.abs(We[wt]),he)}else ae.push(Fe),Pe=!0;else le&&(he=Math.min(Math.abs(Fe),he));if(!t.scrollingPage){var nt=t.cy,Kt=nt.zoom(),Ht=nt.pan(),Xt=t.projectIntoViewport(ie.clientX,ie.clientY),Yn=[Xt[0]*Kt+Ht.x,Xt[1]*Kt+Ht.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||H()){ie.preventDefault();return}if(nt.panningEnabled()&&nt.userPanningEnabled()&&nt.zoomingEnabled()&&nt.userZoomingEnabled()){ie.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var Gn;Pe&&Math.abs(Fe)>5&&(Fe=s3(Fe)*5),Gn=Fe/-250,le&&(Gn/=he,Gn*=3),Gn=Gn*t.wheelSensitivity;var Qt=ie.deltaMode===1;Qt&&(Gn*=33);var Hn=nt.zoom()*Math.pow(10,Gn);ie.type==="gesturechange"&&(Hn=t.gestureStartZoom*ie.scale),nt.zoom({level:Hn,renderedPosition:{x:Yn[0],y:Yn[1]}}),nt.emit({type:ie.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:ie,position:{x:Xt[0],y:Xt[1]}})}}}};t.registerBinding(t.container,"wheel",me,!0),t.registerBinding(r,"scroll",function(ie){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(ie){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||ie.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(ie){t.hasTouchStarted||me(ie)},!0),t.registerBinding(t.container,"mouseout",function(ie){var Pe=t.projectIntoViewport(ie.clientX,ie.clientY);t.cy.emit({originalEvent:ie,type:"mouseout",position:{x:Pe[0],y:Pe[1]}})},!1),t.registerBinding(t.container,"mouseover",function(ie){var Pe=t.projectIntoViewport(ie.clientX,ie.clientY);t.cy.emit({originalEvent:ie,type:"mouseover",position:{x:Pe[0],y:Pe[1]}})},!1);var Te,Oe,ge,xe,Se,Le,De,Ne,Me,ke,He,Qe,it,ft=function(ie,Pe,Fe,We){return Math.sqrt((Fe-ie)*(Fe-ie)+(We-Pe)*(We-Pe))},ze=function(ie,Pe,Fe,We){return(Fe-ie)*(Fe-ie)+(We-Pe)*(We-Pe)},$e;t.registerBinding(t.container,"touchstart",$e=function(ie){if(t.hasTouchStarted=!0,!!Q(ie)){I(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var Pe=t.cy,Fe=t.touchData.now,We=t.touchData.earlier;if(ie.touches[0]){var Xe=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);Fe[0]=Xe[0],Fe[1]=Xe[1]}if(ie.touches[1]){var Xe=t.projectIntoViewport(ie.touches[1].clientX,ie.touches[1].clientY);Fe[2]=Xe[0],Fe[3]=Xe[1]}if(ie.touches[2]){var Xe=t.projectIntoViewport(ie.touches[2].clientX,ie.touches[2].clientY);Fe[4]=Xe[0],Fe[5]=Xe[1]}var wt=function(yi){return{originalEvent:ie,type:yi,position:{x:Fe[0],y:Fe[1]}}};if(ie.touches[1]){t.touchData.singleTouchMoved=!0,T(t.dragData.touchDragEles);var nt=t.findContainerClientCoords();Me=nt[0],ke=nt[1],He=nt[2],Qe=nt[3],Te=ie.touches[0].clientX-Me,Oe=ie.touches[0].clientY-ke,ge=ie.touches[1].clientX-Me,xe=ie.touches[1].clientY-ke,it=0<=Te&&Te<=He&&0<=ge&&ge<=He&&0<=Oe&&Oe<=Qe&&0<=xe&&xe<=Qe;var Kt=Pe.pan(),Ht=Pe.zoom();Se=ft(Te,Oe,ge,xe),Le=ze(Te,Oe,ge,xe),De=[(Te+ge)/2,(Oe+xe)/2],Ne=[(De[0]-Kt.x)/Ht,(De[1]-Kt.y)/Ht];var Xt=200,Yn=Xt*Xt;if(Le<Yn&&!ie.touches[2]){var Gn=t.findNearestElement(Fe[0],Fe[1],!0,!0),Qt=t.findNearestElement(Fe[2],Fe[3],!0,!0);Gn&&Gn.isNode()?(Gn.activate().emit(wt("cxttapstart")),t.touchData.start=Gn):Qt&&Qt.isNode()?(Qt.activate().emit(wt("cxttapstart")),t.touchData.start=Qt):Pe.emit(wt("cxttapstart")),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(ie.touches[2])Pe.boxSelectionEnabled()&&ie.preventDefault();else if(!ie.touches[1]&&ie.touches[0]){var Hn=t.findNearestElements(Fe[0],Fe[1],!0,!0),gr=Hn[0];if(gr!=null&&(gr.activate(),t.touchData.start=gr,t.touchData.starts=Hn,t.nodeIsGrabbable(gr))){var ii=t.dragData.touchDragEles=Pe.collection(),Wi=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),gr.selected()?(Wi=Pe.$(function(yi){return yi.selected()&&t.nodeIsGrabbable(yi)}),M(Wi,{addToList:ii})):L(gr,{addToList:ii}),w(gr),gr.emit(wt("grabon")),Wi?Wi.forEach(function(yi){yi.emit(wt("grab"))}):gr.emit(wt("grab"))}c(gr,["touchstart","tapstart","vmousedown"],ie,{x:Fe[0],y:Fe[1]}),gr==null&&(t.data.bgActivePosistion={x:Xe[0],y:Xe[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&c(t.touchData.start,["taphold"],ie,{x:Fe[0],y:Fe[1]})},t.tapholdDuration)}if(ie.touches.length>=1){for(var La=t.touchData.startPosition=[null,null,null,null,null,null],Pi=0;Pi<Fe.length;Pi++)La[Pi]=We[Pi]=Fe[Pi];var Bi=ie.touches[0];t.touchData.startGPosition=[Bi.clientX,Bi.clientY]}}},!1);var xt;t.registerBinding(r,"touchmove",xt=function(ie){var Pe=t.touchData.capture;if(!(!Pe&&!Q(ie))){var Fe=t.selection,We=t.cy,Xe=t.touchData.now,wt=t.touchData.earlier,nt=We.zoom();if(ie.touches[0]){var Kt=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);Xe[0]=Kt[0],Xe[1]=Kt[1]}if(ie.touches[1]){var Kt=t.projectIntoViewport(ie.touches[1].clientX,ie.touches[1].clientY);Xe[2]=Kt[0],Xe[3]=Kt[1]}if(ie.touches[2]){var Kt=t.projectIntoViewport(ie.touches[2].clientX,ie.touches[2].clientY);Xe[4]=Kt[0],Xe[5]=Kt[1]}var Ht=function(P2){return{originalEvent:ie,type:P2,position:{x:Xe[0],y:Xe[1]}}},Xt=t.touchData.startGPosition,Yn;if(Pe&&ie.touches[0]&&Xt){for(var Gn=[],Qt=0;Qt<Xe.length;Qt++)Gn[Qt]=Xe[Qt]-wt[Qt];var Hn=ie.touches[0].clientX-Xt[0],gr=Hn*Hn,ii=ie.touches[0].clientY-Xt[1],Wi=ii*ii,La=gr+Wi;Yn=La>=t.touchTapThreshold2}if(Pe&&t.touchData.cxt){ie.preventDefault();var Pi=ie.touches[0].clientX-Me,Bi=ie.touches[0].clientY-ke,yi=ie.touches[1].clientX-Me,Oa=ie.touches[1].clientY-ke,pu=ze(Pi,Bi,yi,Oa),Si=pu/Le,Io=150,je=Io*Io,bt=1.5,Bt=bt*bt;if(Si>=Bt||pu>=je){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var un=Ht("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit(un),t.touchData.start=null):We.emit(un)}}if(Pe&&t.touchData.cxt){var un=Ht("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(un):We.emit(un),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var Ln=t.findNearestElement(Xe[0],Xe[1],!0,!0);(!t.touchData.cxtOver||Ln!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(Ht("cxtdragout")),t.touchData.cxtOver=Ln,Ln&&Ln.emit(Ht("cxtdragover")))}else if(Pe&&ie.touches[2]&&We.boxSelectionEnabled())ie.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||We.emit(Ht("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,Fe[4]=1,!Fe||Fe.length===0||Fe[0]===void 0?(Fe[0]=(Xe[0]+Xe[2]+Xe[4])/3,Fe[1]=(Xe[1]+Xe[3]+Xe[5])/3,Fe[2]=(Xe[0]+Xe[2]+Xe[4])/3+1,Fe[3]=(Xe[1]+Xe[3]+Xe[5])/3+1):(Fe[2]=(Xe[0]+Xe[2]+Xe[4])/3,Fe[3]=(Xe[1]+Xe[3]+Xe[5])/3),t.redrawHint("select",!0),t.redraw();else if(Pe&&ie.touches[1]&&!t.touchData.didSelect&&We.zoomingEnabled()&&We.panningEnabled()&&We.userZoomingEnabled()&&We.userPanningEnabled()){ie.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Dn=t.dragData.touchDragEles;if(Dn){t.redrawHint("drag",!0);for(var vn=0;vn<Dn.length;vn++){var Cn=Dn[vn]._private;Cn.grabbed=!1,Cn.rscratch.inDragLayer=!1}}var Ji=t.touchData.start,Pi=ie.touches[0].clientX-Me,Bi=ie.touches[0].clientY-ke,yi=ie.touches[1].clientX-Me,Oa=ie.touches[1].clientY-ke,li=ft(Pi,Bi,yi,Oa),Ni=li/Se;if(it){var Lo=Pi-Te,bc=Bi-Oe,Hu=yi-ge,Wa=Oa-xe,vc=(Lo+Hu)/2,ob=(bc+Wa)/2,gl=We.zoom(),i1=gl*Ni,hp=We.pan(),a1=Ne[0]*gl+hp.x,o1=Ne[1]*gl+hp.y,E2={x:-i1/gl*(a1-hp.x-vc)+a1,y:-i1/gl*(o1-hp.y-ob)+o1};if(Ji&&Ji.active()){var Dn=t.dragData.touchDragEles;T(Dn),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Ji.unactivate().emit(Ht("freeon")),Dn.emit(Ht("free")),t.dragData.didDrag&&(Ji.emit(Ht("dragfreeon")),Dn.emit(Ht("dragfree")))}We.viewport({zoom:i1,pan:E2,cancelOnFailedZoom:!0}),We.emit(Ht("pinchzoom")),Se=li,Te=Pi,Oe=Bi,ge=yi,xe=Oa,t.pinching=!0}if(ie.touches[0]){var Kt=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);Xe[0]=Kt[0],Xe[1]=Kt[1]}if(ie.touches[1]){var Kt=t.projectIntoViewport(ie.touches[1].clientX,ie.touches[1].clientY);Xe[2]=Kt[0],Xe[3]=Kt[1]}if(ie.touches[2]){var Kt=t.projectIntoViewport(ie.touches[2].clientX,ie.touches[2].clientY);Xe[4]=Kt[0],Xe[5]=Kt[1]}}else if(ie.touches[0]&&!t.touchData.didSelect){var Ys=t.touchData.start,sb=t.touchData.last,Ln;if(!t.hoverData.draggingEles&&!t.swipePanning&&(Ln=t.findNearestElement(Xe[0],Xe[1],!0,!0)),Pe&&Ys!=null&&ie.preventDefault(),Pe&&Ys!=null&&t.nodeIsDraggable(Ys))if(Yn){var Dn=t.dragData.touchDragEles,s1=!t.dragData.didDrag;s1&&M(Dn,{inDragLayer:!0}),t.dragData.didDrag=!0;var Rh={x:0,y:0};if(Lt(Gn[0])&&Lt(Gn[1])&&(Rh.x+=Gn[0],Rh.y+=Gn[1],s1)){t.redrawHint("eles",!0);var Vs=t.touchData.dragDelta;Vs&&Lt(Vs[0])&&Lt(Vs[1])&&(Rh.x+=Vs[0],Rh.y+=Vs[1])}t.hoverData.draggingEles=!0,Dn.silentShift(Rh).emit(Ht("position")).emit(Ht("drag")),t.redrawHint("drag",!0),t.touchData.startPosition[0]==wt[0]&&t.touchData.startPosition[1]==wt[1]&&t.redrawHint("eles",!0),t.redraw()}else{var Vs=t.touchData.dragDelta=t.touchData.dragDelta||[];Vs.length===0?(Vs.push(Gn[0]),Vs.push(Gn[1])):(Vs[0]+=Gn[0],Vs[1]+=Gn[1])}if(c(Ys||Ln,["touchmove","tapdrag","vmousemove"],ie,{x:Xe[0],y:Xe[1]}),(!Ys||!Ys.grabbed())&&Ln!=sb&&(sb&&sb.emit(Ht("tapdragout")),Ln&&Ln.emit(Ht("tapdragover"))),t.touchData.last=Ln,Pe)for(var vn=0;vn<Xe.length;vn++)Xe[vn]&&t.touchData.startPosition[vn]&&Yn&&(t.touchData.singleTouchMoved=!0);if(Pe&&(Ys==null||Ys.pannable())&&We.panningEnabled()&&We.userPanningEnabled()){var C2=h(Ys,t.touchData.starts);C2&&(ie.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=Sg(t.touchData.startPosition)),t.swipePanning?(We.panBy({x:Gn[0]*nt,y:Gn[1]*nt}),We.emit(Ht("dragpan"))):Yn&&(t.swipePanning=!0,We.panBy({x:Hn*nt,y:ii*nt}),We.emit(Ht("dragpan")),Ys&&(Ys.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var Kt=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);Xe[0]=Kt[0],Xe[1]=Kt[1]}}for(var Qt=0;Qt<Xe.length;Qt++)wt[Qt]=Xe[Qt];Pe&&ie.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var st;t.registerBinding(r,"touchcancel",st=function(ie){var Pe=t.touchData.start;t.touchData.capture=!1,Pe&&Pe.unactivate()});var Rt,It,Dt,Ut;if(t.registerBinding(r,"touchend",Rt=function(ie){var Pe=t.touchData.start,Fe=t.touchData.capture;if(Fe)ie.touches.length===0&&(t.touchData.capture=!1),ie.preventDefault();else return;var We=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var Xe=t.cy,wt=Xe.zoom(),nt=t.touchData.now,Kt=t.touchData.earlier;if(ie.touches[0]){var Ht=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);nt[0]=Ht[0],nt[1]=Ht[1]}if(ie.touches[1]){var Ht=t.projectIntoViewport(ie.touches[1].clientX,ie.touches[1].clientY);nt[2]=Ht[0],nt[3]=Ht[1]}if(ie.touches[2]){var Ht=t.projectIntoViewport(ie.touches[2].clientX,ie.touches[2].clientY);nt[4]=Ht[0],nt[5]=Ht[1]}var Xt=function(Io){return{originalEvent:ie,type:Io,position:{x:nt[0],y:nt[1]}}};Pe&&Pe.unactivate();var Yn;if(t.touchData.cxt){if(Yn=Xt("cxttapend"),Pe?Pe.emit(Yn):Xe.emit(Yn),!t.touchData.cxtDragged){var Gn=Xt("cxttap");Pe?Pe.emit(Gn):Xe.emit(Gn)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!ie.touches[2]&&Xe.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Qt=Xe.collection(t.getAllInBox(We[0],We[1],We[2],We[3]));We[0]=void 0,We[1]=void 0,We[2]=void 0,We[3]=void 0,We[4]=0,t.redrawHint("select",!0),Xe.emit(Xt("boxend"));var Hn=function(Io){return Io.selectable()&&!Io.selected()};Qt.emit(Xt("box")).stdFilter(Hn).select().emit(Xt("boxselect")),Qt.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(Pe!=null&&Pe.unactivate(),ie.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!ie.touches[1]&&!ie.touches[0]&&!ie.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var gr=t.dragData.touchDragEles;if(Pe!=null){var ii=Pe._private.grabbed;T(gr),t.redrawHint("drag",!0),t.redrawHint("eles",!0),ii&&(Pe.emit(Xt("freeon")),gr.emit(Xt("free")),t.dragData.didDrag&&(Pe.emit(Xt("dragfreeon")),gr.emit(Xt("dragfree")))),c(Pe,["touchend","tapend","vmouseup","tapdragout"],ie,{x:nt[0],y:nt[1]}),Pe.unactivate(),t.touchData.start=null}else{var Wi=t.findNearestElement(nt[0],nt[1],!0,!0);c(Wi,["touchend","tapend","vmouseup","tapdragout"],ie,{x:nt[0],y:nt[1]})}var La=t.touchData.startPosition[0]-nt[0],Pi=La*La,Bi=t.touchData.startPosition[1]-nt[1],yi=Bi*Bi,Oa=Pi+yi,pu=Oa*wt*wt;t.touchData.singleTouchMoved||(Pe||Xe.$(":selected").unselect(["tapunselect"]),c(Pe,["tap","vclick"],ie,{x:nt[0],y:nt[1]}),It=!1,ie.timeStamp-Ut<=Xe.multiClickDebounceTime()?(Dt&&clearTimeout(Dt),It=!0,Ut=null,c(Pe,["dbltap","vdblclick"],ie,{x:nt[0],y:nt[1]})):(Dt=setTimeout(function(){It||c(Pe,["onetap","voneclick"],ie,{x:nt[0],y:nt[1]})},Xe.multiClickDebounceTime()),Ut=ie.timeStamp)),Pe!=null&&!t.dragData.didDrag&&Pe._private.selectable&&pu<t.touchTapThreshold2&&!t.pinching&&(Xe.selectionType()==="single"?(Xe.$(a).unmerge(Pe).unselect(["tapunselect"]),Pe.select(["tapselect"])):Pe.selected()?Pe.unselect(["tapunselect"]):Pe.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}for(var Si=0;Si<nt.length;Si++)Kt[Si]=nt[Si];t.dragData.didDrag=!1,ie.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),ie.touches.length<2&&(ie.touches.length===1&&(t.touchData.startGPosition=[ie.touches[0].clientX,ie.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},!1),typeof TouchEvent>"u"){var bn=[],sn=function(ie){return{clientX:ie.clientX,clientY:ie.clientY,force:1,identifier:ie.pointerId,pageX:ie.pageX,pageY:ie.pageY,radiusX:ie.width/2,radiusY:ie.height/2,screenX:ie.screenX,screenY:ie.screenY,target:ie.target}},ir=function(ie){return{event:ie,touch:sn(ie)}},U=function(ie){bn.push(ir(ie))},ne=function(ie){for(var Pe=0;Pe<bn.length;Pe++){var Fe=bn[Pe];if(Fe.event.pointerId===ie.pointerId){bn.splice(Pe,1);return}}},ue=function(ie){var Pe=bn.filter(function(Fe){return Fe.event.pointerId===ie.pointerId})[0];Pe.event=ie,Pe.touch=sn(ie)},we=function(ie){ie.touches=bn.map(function(Pe){return Pe.touch})},Ae=function(ie){return ie.pointerType==="mouse"||ie.pointerType===4};t.registerBinding(t.container,"pointerdown",function(ie){Ae(ie)||(ie.preventDefault(),U(ie),we(ie),$e(ie))}),t.registerBinding(t.container,"pointerup",function(ie){Ae(ie)||(ne(ie),we(ie),Rt(ie))}),t.registerBinding(t.container,"pointercancel",function(ie){Ae(ie)||(ne(ie),we(ie),st(ie))}),t.registerBinding(t.container,"pointermove",function(ie){Ae(ie)||(ie.preventDefault(),ue(ie),we(ie),xt(ie))})}};var vf={};vf.generatePolygon=function(t,r){return this.nodeShapes[t]={renderer:this,name:t,points:r,draw:function(a,s,c,l,h,d){this.renderer.nodeShapeImpl("polygon",a,s,c,l,h,this.points)},intersectLine:function(a,s,c,l,h,d,p,b){return y0(h,d,this.points,a,s,c/2,l/2,p)},checkPoint:function(a,s,c,l,h,d,p,b){return gf(a,s,this.points,d,p,l,h,[0,-1],c)},hasMiterBounds:t!=="rectangle",miterBounds:function(a,s,c,l,h,d){return Bue(this.points,a,s,c,l,h)}}},vf.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(t,r,a,s,c,l){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c)},intersectLine:function(t,r,a,s,c,l,h,d){return que(c,l,t,r,a/2+h,s/2+h)},checkPoint:function(t,r,a,s,c,l,h,d){return Kd(t,r,s,c,l,h,a)}}},vf.generateRoundPolygon=function(t,r){return this.nodeShapes[t]={renderer:this,name:t,points:r,getOrCreateCorners:function(a,s,c,l,h,d,p){if(d[p]!==void 0&&d[p+"-cx"]===a&&d[p+"-cy"]===s)return d[p];d[p]=new Array(r.length/2),d[p+"-cx"]=a,d[p+"-cy"]=s;var b=c/2,m=l/2;h=h==="auto"?a8(c,l):h;for(var w=new Array(r.length/2),k=0;k<r.length/2;k++)w[k]={x:a+b*r[k*2],y:s+m*r[k*2+1]};var P,S,M,L,T=w.length;for(S=w[T-1],P=0;P<T;P++)M=w[P%T],L=w[(P+1)%T],d[p][P]=GP(S,M,L,h),S=M,M=L;return d[p]},draw:function(a,s,c,l,h,d,p){this.renderer.nodeShapeImpl("round-polygon",a,s,c,l,h,this.points,this.getOrCreateCorners(s,c,l,h,d,p,"drawCorners"))},intersectLine:function(a,s,c,l,h,d,p,b,m){return $ue(h,d,this.points,a,s,c,l,p,this.getOrCreateCorners(a,s,c,l,b,m,"corners"))},checkPoint:function(a,s,c,l,h,d,p,b,m){return Vue(a,s,this.points,d,p,l,h,this.getOrCreateCorners(d,p,l,h,b,m,"corners"))}}},vf.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:us(4,0),draw:function(t,r,a,s,c,l){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c,this.points,l)},intersectLine:function(t,r,a,s,c,l,h,d){return r8(c,l,t,r,a,s,h,d)},checkPoint:function(t,r,a,s,c,l,h,d){var p=s/2,b=c/2;d=d==="auto"?Eh(s,c):d,d=Math.min(p,b,d);var m=d*2;return!!(gf(t,r,this.points,l,h,s,c-m,[0,-1],a)||gf(t,r,this.points,l,h,s-m,c,[0,-1],a)||Kd(t,r,m,m,l-p+d,h-b+d,a)||Kd(t,r,m,m,l+p-d,h-b+d,a)||Kd(t,r,m,m,l+p-d,h+b-d,a)||Kd(t,r,m,m,l-p+d,h+b-d,a))}}},vf.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:f3(),points:us(4,0),draw:function(t,r,a,s,c,l){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c,null,l)},generateCutTrianglePts:function(t,r,a,s,c){var l=c==="auto"?this.cornerLength:c,h=r/2,d=t/2,p=a-d,b=a+d,m=s-h,w=s+h;return{topLeft:[p,m+l,p+l,m,p+l,m+l],topRight:[b-l,m,b,m+l,b-l,m+l],bottomRight:[b,w-l,b-l,w,b-l,w-l],bottomLeft:[p+l,w,p,w-l,p+l,w-l]}},intersectLine:function(t,r,a,s,c,l,h,d){var p=this.generateCutTrianglePts(a+2*h,s+2*h,t,r,d),b=[].concat.apply([],[p.topLeft.splice(0,4),p.topRight.splice(0,4),p.bottomRight.splice(0,4),p.bottomLeft.splice(0,4)]);return y0(c,l,b,t,r)},checkPoint:function(t,r,a,s,c,l,h,d){var p=d==="auto"?this.cornerLength:d;if(gf(t,r,this.points,l,h,s,c-2*p,[0,-1],a)||gf(t,r,this.points,l,h,s-2*p,c,[0,-1],a))return!0;var b=this.generateCutTrianglePts(s,c,l,h);return Hs(t,r,b.topLeft)||Hs(t,r,b.topRight)||Hs(t,r,b.bottomRight)||Hs(t,r,b.bottomLeft)}}},vf.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:us(4,0),draw:function(t,r,a,s,c,l){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c)},intersectLine:function(t,r,a,s,c,l,h,d){var p=.15,b=.5,m=.85,w=this.generateBarrelBezierPts(a+2*h,s+2*h,t,r),k=function(S){var M=Ng({x:S[0],y:S[1]},{x:S[2],y:S[3]},{x:S[4],y:S[5]},p),L=Ng({x:S[0],y:S[1]},{x:S[2],y:S[3]},{x:S[4],y:S[5]},b),T=Ng({x:S[0],y:S[1]},{x:S[2],y:S[3]},{x:S[4],y:S[5]},m);return[S[0],S[1],M.x,M.y,L.x,L.y,T.x,T.y,S[4],S[5]]},P=[].concat(k(w.topLeft),k(w.topRight),k(w.bottomRight),k(w.bottomLeft));return y0(c,l,P,t,r)},generateBarrelBezierPts:function(t,r,a,s){var c=r/2,l=t/2,h=a-l,d=a+l,p=s-c,b=s+c,m=h3(t,r),w=m.heightOffset,k=m.widthOffset,P=m.ctrlPtOffsetPct*t,S={topLeft:[h,p+w,h+P,p,h+k,p],topRight:[d-k,p,d-P,p,d,p+w],bottomRight:[d,b-w,d-P,b,d-k,b],bottomLeft:[h+k,b,h+P,b,h,b-w]};return S.topLeft.isTop=!0,S.topRight.isTop=!0,S.bottomLeft.isBottom=!0,S.bottomRight.isBottom=!0,S},checkPoint:function(t,r,a,s,c,l,h,d){var p=h3(s,c),b=p.heightOffset,m=p.widthOffset;if(gf(t,r,this.points,l,h,s,c-2*b,[0,-1],a)||gf(t,r,this.points,l,h,s-2*m,c,[0,-1],a))return!0;for(var w=this.generateBarrelBezierPts(s,c,l,h),k=function(F,z,D){var H=D[4],Q=D[2],q=D[0],Z=D[5],J=D[1],K=Math.min(H,q),ae=Math.max(H,q),se=Math.min(Z,J),le=Math.max(Z,J);if(K<=F&&F<=ae&&se<=z&&z<=le){var he=Kue(H,Q,q),fe=zue(he[0],he[1],he[2],F),pe=fe.filter(function(me){return 0<=me&&me<=1});if(pe.length>0)return pe[0]}return null},P=Object.keys(w),S=0;S<P.length;S++){var M=P[S],L=w[M],T=k(t,r,L);if(T!=null){var j=L[5],I=L[3],R=L[1],B=ho(j,I,R,T);if(L.isTop&&B<=r||L.isBottom&&r<=B)return!0}}return!1}}},vf.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:us(4,0),draw:function(t,r,a,s,c,l){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c,this.points,l)},intersectLine:function(t,r,a,s,c,l,h,d){var p=t-(a/2+h),b=r-(s/2+h),m=b,w=t+(a/2+h),k=_h(c,l,t,r,p,b,w,m,!1);return k.length>0?k:r8(c,l,t,r,a,s,h,d)},checkPoint:function(t,r,a,s,c,l,h,d){d=d==="auto"?Eh(s,c):d;var p=2*d;if(gf(t,r,this.points,l,h,s,c-p,[0,-1],a)||gf(t,r,this.points,l,h,s-p,c,[0,-1],a))return!0;var b=s/2+2*a,m=c/2+2*a,w=[l-b,h-m,l-b,h,l+b,h,l+b,h-m];return!!(Hs(t,r,w)||Kd(t,r,p,p,l+s/2-d,h+c/2-d,a)||Kd(t,r,p,p,l-s/2+d,h+c/2-d,a))}}},vf.registerNodeShapes=function(){var t=this.nodeShapes={},r=this;this.generateEllipse(),this.generatePolygon("triangle",us(3,0)),this.generateRoundPolygon("round-triangle",us(3,0)),this.generatePolygon("rectangle",us(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var a=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",a),this.generateRoundPolygon("round-diamond",a)}this.generatePolygon("pentagon",us(5,0)),this.generateRoundPolygon("round-pentagon",us(5,0)),this.generatePolygon("hexagon",us(6,0)),this.generateRoundPolygon("round-hexagon",us(6,0)),this.generatePolygon("heptagon",us(7,0)),this.generateRoundPolygon("round-heptagon",us(7,0)),this.generatePolygon("octagon",us(8,0)),this.generateRoundPolygon("round-octagon",us(8,0));var s=new Array(20);{var c=l3(5,0),l=l3(5,Math.PI/5),h=.5*(3-Math.sqrt(5));h*=1.57;for(var d=0;d<l.length/2;d++)l[d*2]*=h,l[d*2+1]*=h;for(var d=0;d<20/4;d++)s[d*4]=c[d*2],s[d*4+1]=c[d*2+1],s[d*4+2]=l[d*2],s[d*4+3]=l[d*2+1]}s=i8(s),this.generatePolygon("star",s),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var p=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",p),this.generateRoundPolygon("round-tag",p)}t.makePolygon=function(b){var m=b.join("$"),w="polygon-"+m,k;return(k=this[w])?k:r.generatePolygon(w,b)}};var I0={};I0.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},I0.redraw=function(t){t=t||ZO();var r=this;r.averageRedrawTime===void 0&&(r.averageRedrawTime=0),r.lastRedrawTime===void 0&&(r.lastRedrawTime=0),r.lastDrawTime===void 0&&(r.lastDrawTime=0),r.requestedFrame=!0,r.renderOptions=t},I0.beforeRender=function(t,r){if(!this.destroyed){r==null&&Ri("Priority is not optional for beforeRender");var a=this.beforeRenderCallbacks;a.push({fn:t,priority:r}),a.sort(function(s,c){return c.priority-s.priority})}};var qD=function(t,r,a){for(var s=t.beforeRenderCallbacks,c=0;c<s.length;c++)s[c].fn(r,a)};I0.startRenderLoop=function(){var t=this,r=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var a=function(s){if(!t.destroyed){if(!r.batching())if(t.requestedFrame&&!t.skipFrame){qD(t,!0,s);var c=hf();t.render(t.renderOptions);var l=t.lastDrawTime=hf();t.averageRedrawTime===void 0&&(t.averageRedrawTime=l-c),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var h=l-c;t.redrawTotalTime+=h,t.lastRedrawTime=h,t.averageRedrawTime=t.averageRedrawTime/2+h/2,t.requestedFrame=!1}else qD(t,!1,s);t.skipFrame=!1,Xm(a)}};Xm(a)}};var fhe=function(t){this.init(t)},ZD=fhe,Yg=ZD.prototype;Yg.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],Yg.init=function(t){var r=this;r.options=t,r.cy=t.cy;var a=r.container=t.cy.container(),s=r.cy.window();if(s){var c=s.document,l=c.head,h="__________cytoscape_stylesheet",d="__________cytoscape_container",p=c.getElementById(h)!=null;if(a.className.indexOf(d)<0&&(a.className=(a.className||"")+" "+d),!p){var b=c.createElement("style");b.id=h,b.textContent="."+d+" { position: relative; }",l.insertBefore(b,l.children[0])}var m=s.getComputedStyle(a),w=m.getPropertyValue("position");w==="static"&&Gr("A Cytoscape container has style position:static and so can not use UI extensions properly")}r.selection=[void 0,void 0,void 0,void 0,0],r.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],r.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},r.dragData={possibleDragElements:[]},r.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]},r.redraws=0,r.showFps=t.showFps,r.debug=t.debug,r.webgl=t.webgl,r.hideEdgesOnViewport=t.hideEdgesOnViewport,r.textureOnViewport=t.textureOnViewport,r.wheelSensitivity=t.wheelSensitivity,r.motionBlurEnabled=t.motionBlur,r.forcedPixelRatio=Lt(t.pixelRatio)?t.pixelRatio:null,r.motionBlur=t.motionBlur,r.motionBlurOpacity=t.motionBlurOpacity,r.motionBlurTransparency=1-r.motionBlurOpacity,r.motionBlurPxRatio=1,r.mbPxRBlurry=1,r.minMbLowQualFrames=4,r.fullQualityMb=!1,r.clearedForMotionBlur=[],r.desktopTapThreshold=t.desktopTapThreshold,r.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,r.touchTapThreshold=t.touchTapThreshold,r.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,r.tapholdDuration=500,r.bindings=[],r.beforeRenderCallbacks=[],r.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},r.registerNodeShapes(),r.registerArrowShapes(),r.registerCalculationListeners()},Yg.notify=function(t,r){var a=this,s=a.cy;if(!this.destroyed){if(t==="init"){a.load();return}if(t==="destroy"){a.destroy();return}(t==="add"||t==="remove"||t==="move"&&s.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&a.invalidateCachedZSortedEles(),t==="viewport"&&a.redrawHint("select",!0),t==="gc"&&a.redrawHint("gc",!0),(t==="load"||t==="resize"||t==="mount")&&(a.invalidateContainerClientCoordsCache(),a.matchCanvasSize(a.container)),a.redrawHint("eles",!0),a.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},Yg.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var r=0;r<t.bindings.length;r++){var a=t.bindings[r],s=a,c=s.target;(c.off||c.removeEventListener).apply(c,s.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}},Yg.isHeadless=function(){return!1},[LP,YD,VD,Ug,vf,I0].forEach(function(t){gn(Yg,t)});var zP=1e3/60,$D={setupDequeueing:function(t){return function(){var r=this,a=this.renderer;if(!r.dequeueingSetup){r.dequeueingSetup=!0;var s=f0(function(){a.redrawHint("eles",!0),a.redrawHint("drag",!0),a.redraw()},t.deqRedrawThreshold),c=function(h,d){var p=hf(),b=a.averageRedrawTime,m=a.lastRedrawTime,w=[],k=a.cy.extent(),P=a.getPixelRatio();for(h||a.flushRenderedStyleQueue();;){var S=hf(),M=S-p,L=S-d;if(m<zP){var T=zP-(h?b:0);if(L>=t.deqFastCost*T)break}else if(h){if(M>=t.deqCost*m||M>=t.deqAvgCost*b)break}else if(L>=t.deqNoDrawCost*zP)break;var j=t.deq(r,P,k);if(j.length>0)for(var I=0;I<j.length;I++)w.push(j[I]);else break}w.length>0&&(t.onDeqd(r,w),!h&&t.shouldRedraw(r,w,P,k)&&s())},l=t.priority||t3;a.beforeRender(c,l(r))}}}},hhe=function(){function t(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tw;bh(this,t),this.idsByKey=new pf,this.keyForId=new pf,this.cachesByLvl=new pf,this.lvls=[],this.getKey=r,this.doesEleInvalidateKey=a}return vh(t,[{key:"getIdsFor",value:function(r){r==null&&Ri("Can not get id list for null key");var a=this.idsByKey,s=this.idsByKey.get(r);return s||(s=new Pg,a.set(r,s)),s}},{key:"addIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).add(a)}},{key:"deleteIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).delete(a)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var a=r.id(),s=this.keyForId.get(a),c=this.getKey(r);this.deleteIdForKey(s,a),this.addIdForKey(c,a),this.keyForId.set(a,c)}},{key:"deleteKeyMappingFor",value:function(r){var a=r.id(),s=this.keyForId.get(a);this.deleteIdForKey(s,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(r){var a=r.id(),s=this.keyForId.get(a),c=this.getKey(r);return s!==c}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var a=this.cachesByLvl,s=this.lvls,c=a.get(r);return c||(c=new pf,a.set(r,c),s.push(r)),c}},{key:"getCache",value:function(r,a){return this.getCachesAt(a).get(r)}},{key:"get",value:function(r,a){var s=this.getKey(r),c=this.getCache(s,a);return c!=null&&this.updateKeyMappingFor(r),c}},{key:"getForCachedKey",value:function(r,a){var s=this.keyForId.get(r.id()),c=this.getCache(s,a);return c}},{key:"hasCache",value:function(r,a){return this.getCachesAt(a).has(r)}},{key:"has",value:function(r,a){var s=this.getKey(r);return this.hasCache(s,a)}},{key:"setCache",value:function(r,a,s){s.key=r,this.getCachesAt(a).set(r,s)}},{key:"set",value:function(r,a,s){var c=this.getKey(r);this.setCache(c,a,s),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,a){this.getCachesAt(a).delete(r)}},{key:"delete",value:function(r,a){var s=this.getKey(r);this.deleteCache(s,a)}},{key:"invalidateKey",value:function(r){var a=this;this.lvls.forEach(function(s){return a.deleteCache(r,s)})}},{key:"invalidate",value:function(r){var a=r.id(),s=this.keyForId.get(a);this.deleteKeyMappingFor(r);var c=this.doesEleInvalidateKey(r);return c&&this.invalidateKey(s),c||this.getNumberOfIdsForKey(s)===0}}])}(),KD=25,Fw=50,Uw=-4,FP=3,QD=7.99,dhe=8,phe=1024,ghe=1024,bhe=1024,vhe=.2,yhe=.8,mhe=10,whe=.15,xhe=.1,khe=.9,_he=.9,Ehe=100,Che=1,Vg={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Phe=To({getKey:null,doesEleInvalidateKey:tw,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:UO,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),L0=function(t,r){var a=this;a.renderer=t,a.onDequeues=[];var s=Phe(r);gn(a,s),a.lookup=new hhe(s.getKey,s.doesEleInvalidateKey),a.setupDequeueing()},Qa=L0.prototype;Qa.reasons=Vg,Qa.getTextureQueue=function(t){var r=this;return r.eleImgCaches=r.eleImgCaches||{},r.eleImgCaches[t]=r.eleImgCaches[t]||[]},Qa.getRetiredTextureQueue=function(t){var r=this,a=r.eleImgCaches.retired=r.eleImgCaches.retired||{},s=a[t]=a[t]||[];return s},Qa.getElementQueue=function(){var t=this,r=t.eleCacheQueue=t.eleCacheQueue||new g0(function(a,s){return s.reqs-a.reqs});return r},Qa.getElementKeyToQueue=function(){var t=this,r=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return r},Qa.getElement=function(t,r,a,s,c){var l=this,h=this.renderer,d=h.cy.zoom(),p=this.lookup;if(!r||r.w===0||r.h===0||isNaN(r.w)||isNaN(r.h)||!t.visible()||t.removed()||!l.allowEdgeTxrCaching&&t.isEdge()||!l.allowParentTxrCaching&&t.isParent())return null;if(s==null&&(s=Math.ceil(o3(d*a))),s<Uw)s=Uw;else if(d>=QD||s>FP)return null;var b=Math.pow(2,s),m=r.h*b,w=r.w*b,k=h.eleTextBiggerThanMin(t,b);if(!this.isVisible(t,k))return null;var P=p.get(t,s);if(P&&P.invalidated&&(P.invalidated=!1,P.texture.invalidatedWidth-=P.width),P)return P;var S;if(m<=KD?S=KD:m<=Fw?S=Fw:S=Math.ceil(m/Fw)*Fw,m>bhe||w>ghe)return null;var M=l.getTextureQueue(S),L=M[M.length-2],T=function(){return l.recycleTexture(S,w)||l.addTexture(S,w)};L||(L=M[M.length-1]),L||(L=T()),L.width-L.usedWidth<w&&(L=T());for(var j=function(ae){return ae&&ae.scaledLabelShown===k},I=c&&c===Vg.dequeue,R=c&&c===Vg.highQuality,B=c&&c===Vg.downscale,F,z=s+1;z<=FP;z++){var D=p.get(t,z);if(D){F=D;break}}var H=F&&F.level===s+1?F:null,Q=function(){L.context.drawImage(H.texture.canvas,H.x,0,H.width,H.height,L.usedWidth,0,w,m)};if(L.context.setTransform(1,0,0,1,0,0),L.context.clearRect(L.usedWidth,0,w,S),j(H))Q();else if(j(F))if(R){for(var q=F.level;q>s;q--)H=l.getElement(t,r,a,q,Vg.downscale);Q()}else return l.queueElement(t,F.level-1),F;else{var Z;if(!I&&!R&&!B)for(var J=s-1;J>=Uw;J--){var K=p.get(t,J);if(K){Z=K;break}}if(j(Z))return l.queueElement(t,s),Z;L.context.translate(L.usedWidth,0),L.context.scale(b,b),this.drawElement(L.context,t,r,k,!1),L.context.scale(1/b,1/b),L.context.translate(-L.usedWidth,0)}return P={x:L.usedWidth,texture:L,level:s,scale:b,width:w,height:m,scaledLabelShown:k},L.usedWidth+=Math.ceil(w+dhe),L.eleCaches.push(P),p.set(t,s,P),l.checkTextureFullness(L),P},Qa.invalidateElements=function(t){for(var r=0;r<t.length;r++)this.invalidateElement(t[r])},Qa.invalidateElement=function(t){var r=this,a=r.lookup,s=[],c=a.isInvalid(t);if(c){for(var l=Uw;l<=FP;l++){var h=a.getForCachedKey(t,l);h&&s.push(h)}var d=a.invalidate(t);if(d)for(var p=0;p<s.length;p++){var b=s[p],m=b.texture;m.invalidatedWidth+=b.width,b.invalidated=!0,r.checkTextureUtility(m)}r.removeFromQueue(t)}},Qa.checkTextureUtility=function(t){t.invalidatedWidth>=vhe*t.width&&this.retireTexture(t)},Qa.checkTextureFullness=function(t){var r=this,a=r.getTextureQueue(t.height);t.usedWidth/t.width>yhe&&t.fullnessChecks>=mhe?xh(a,t):t.fullnessChecks++},Qa.retireTexture=function(t){var r=this,a=t.height,s=r.getTextureQueue(a),c=this.lookup;xh(s,t),t.retired=!0;for(var l=t.eleCaches,h=0;h<l.length;h++){var d=l[h];c.deleteCache(d.key,d.level)}n3(l);var p=r.getRetiredTextureQueue(a);p.push(t)},Qa.addTexture=function(t,r){var a=this,s=a.getTextureQueue(t),c={};return s.push(c),c.eleCaches=[],c.height=t,c.width=Math.max(phe,r),c.usedWidth=0,c.invalidatedWidth=0,c.fullnessChecks=0,c.canvas=a.renderer.makeOffscreenCanvas(c.width,c.height),c.context=c.canvas.getContext("2d"),c},Qa.recycleTexture=function(t,r){for(var a=this,s=a.getTextureQueue(t),c=a.getRetiredTextureQueue(t),l=0;l<c.length;l++){var h=c[l];if(h.width>=r)return h.retired=!1,h.usedWidth=0,h.invalidatedWidth=0,h.fullnessChecks=0,n3(h.eleCaches),h.context.setTransform(1,0,0,1,0,0),h.context.clearRect(0,0,h.width,h.height),xh(c,h),s.push(h),h}},Qa.queueElement=function(t,r){var a=this,s=a.getElementQueue(),c=a.getElementKeyToQueue(),l=this.getKey(t),h=c[l];if(h)h.level=Math.max(h.level,r),h.eles.merge(t),h.reqs++,s.updateItem(h);else{var d={eles:t.spawn().merge(t),level:r,reqs:1,key:l};s.push(d),c[l]=d}},Qa.dequeue=function(t){for(var r=this,a=r.getElementQueue(),s=r.getElementKeyToQueue(),c=[],l=r.lookup,h=0;h<Che&&a.size()>0;h++){var d=a.pop(),p=d.key,b=d.eles[0],m=l.hasCache(b,d.level);if(s[p]=null,!m){c.push(d);var w=r.getBoundingBox(b);r.getElement(b,w,t,d.level,Vg.dequeue)}}return c},Qa.removeFromQueue=function(t){var r=this,a=r.getElementQueue(),s=r.getElementKeyToQueue(),c=this.getKey(t),l=s[c];l!=null&&(l.eles.length===1?(l.reqs=e3,a.updateItem(l),a.pop(),s[c]=null):l.eles.unmerge(t))},Qa.onDequeue=function(t){this.onDequeues.push(t)},Qa.offDequeue=function(t){xh(this.onDequeues,t)},Qa.setupDequeueing=$D.setupDequeueing({deqRedrawThreshold:Ehe,deqCost:whe,deqAvgCost:xhe,deqNoDrawCost:khe,deqFastCost:_he,deq:function(t,r,a){return t.dequeue(r,a)},onDeqd:function(t,r){for(var a=0;a<t.onDequeues.length;a++){var s=t.onDequeues[a];s(r)}},shouldRedraw:function(t,r,a,s){for(var c=0;c<r.length;c++)for(var l=r[c].eles,h=0;h<l.length;h++){var d=l[h].boundingBox();if(u3(d,s))return!0}return!1},priority:function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq}});var She=1,O0=-4,Yw=2,Nhe=3.99,The=50,Mhe=50,jhe=.15,Ahe=.1,Ihe=.9,Lhe=.9,Ohe=1,WD=250,Rhe=4e3*4e3,JD=32767,Dhe=!0,XD=function(t){var r=this,a=r.renderer=t,s=a.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=hf()-2*WD,r.skipping=!1,r.eleTxrDeqs=s.collection(),r.scheduleElementRefinement=f0(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},Mhe),a.beforeRender(function(l,h){h-r.lastInvalidationTime<=WD?r.skipping=!0:r.skipping=!1},a.beforeRenderPriorities.lyrTxrSkip);var c=function(l,h){return h.reqs-l.reqs};r.layersQueue=new g0(c),r.setupDequeueing()},Ao=XD.prototype,eB=0,Bhe=Math.pow(2,53)-1;Ao.makeLayer=function(t,r){var a=Math.pow(2,r),s=Math.ceil(t.w*a),c=Math.ceil(t.h*a),l=this.renderer.makeOffscreenCanvas(s,c),h={id:eB=++eB%Bhe,bb:t,level:r,width:s,height:c,canvas:l,context:l.getContext("2d"),eles:[],elesQueue:[],reqs:0},d=h.context,p=-h.bb.x1,b=-h.bb.y1;return d.scale(a,a),d.translate(p,b),h},Ao.getLayers=function(t,r,a){var s=this,c=s.renderer,l=c.cy,h=l.zoom(),d=s.firstGet;if(s.firstGet=!1,a==null){if(a=Math.ceil(o3(h*r)),a<O0)a=O0;else if(h>=Nhe||a>Yw)return null}s.validateLayersElesOrdering(a,t);var p=s.layersByLevel,b=Math.pow(2,a),m=p[a]=p[a]||[],w,k=s.levelIsComplete(a,t),P,S=function(){var H=function(J){if(s.validateLayersElesOrdering(J,t),s.levelIsComplete(J,t))return P=p[J],!0},Q=function(J){if(!P)for(var K=a+J;O0<=K&&K<=Yw&&!H(K);K+=J);};Q(1),Q(-1);for(var q=m.length-1;q>=0;q--){var Z=m[q];Z.invalid&&xh(m,Z)}};if(!k)S();else return m;var M=function(){if(!w){w=ss();for(var H=0;H<t.length;H++)Oue(w,t[H].boundingBox())}return w},L=function(H){H=H||{};var Q=H.after;M();var q=Math.ceil(w.w*b),Z=Math.ceil(w.h*b);if(q>JD||Z>JD)return null;var J=q*Z;if(J>Rhe)return null;var K=s.makeLayer(w,a);if(Q!=null){var ae=m.indexOf(Q)+1;m.splice(ae,0,K)}else(H.insert===void 0||H.insert)&&m.unshift(K);return K};if(s.skipping&&!d)return null;for(var T=null,j=t.length/She,I=!d,R=0;R<t.length;R++){var B=t[R],F=B._private.rscratch,z=F.imgLayerCaches=F.imgLayerCaches||{},D=z[a];if(D){T=D;continue}if((!T||T.eles.length>=j||!n8(T.bb,B.boundingBox()))&&(T=L({insert:!0,after:T}),!T))return null;P||I?s.queueLayer(T,B):s.drawEleInLayer(T,B,a,r),T.eles.push(B),z[a]=T}return P||(I?null:m)},Ao.getEleLevelForLayerLevel=function(t,r){return t},Ao.drawEleInLayer=function(t,r,a,s){var c=this,l=this.renderer,h=t.context,d=r.boundingBox();d.w===0||d.h===0||!r.visible()||(a=c.getEleLevelForLayerLevel(a,s),l.setImgSmoothing(h,!1),l.drawCachedElement(h,r,null,null,a,Dhe),l.setImgSmoothing(h,!0))},Ao.levelIsComplete=function(t,r){var a=this,s=a.layersByLevel[t];if(!s||s.length===0)return!1;for(var c=0,l=0;l<s.length;l++){var h=s[l];if(h.reqs>0||h.invalid)return!1;c+=h.eles.length}return c===r.length},Ao.validateLayersElesOrdering=function(t,r){var a=this.layersByLevel[t];if(a)for(var s=0;s<a.length;s++){for(var c=a[s],l=-1,h=0;h<r.length;h++)if(c.eles[0]===r[h]){l=h;break}if(l<0){this.invalidateLayer(c);continue}for(var d=l,h=0;h<c.eles.length;h++)if(c.eles[h]!==r[d+h]){this.invalidateLayer(c);break}}},Ao.updateElementsInLayers=function(t,r){for(var a=this,s=s0(t[0]),c=0;c<t.length;c++)for(var l=s?null:t[c],h=s?t[c]:t[c].ele,d=h._private.rscratch,p=d.imgLayerCaches=d.imgLayerCaches||{},b=O0;b<=Yw;b++){var m=p[b];m&&(l&&a.getEleLevelForLayerLevel(m.level)!==l.level||r(m,h,l))}},Ao.haveLayers=function(){for(var t=this,r=!1,a=O0;a<=Yw;a++){var s=t.layersByLevel[a];if(s&&s.length>0){r=!0;break}}return r},Ao.invalidateElements=function(t){var r=this;t.length!==0&&(r.lastInvalidationTime=hf(),!(t.length===0||!r.haveLayers())&&r.updateElementsInLayers(t,function(a,s,c){r.invalidateLayer(a)}))},Ao.invalidateLayer=function(t){if(this.lastInvalidationTime=hf(),!t.invalid){var r=t.level,a=t.eles,s=this.layersByLevel[r];xh(s,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var c=0;c<a.length;c++){var l=a[c]._private.rscratch.imgLayerCaches;l&&(l[r]=null)}}},Ao.refineElementTextures=function(t){var r=this;r.updateElementsInLayers(t,function(a,s,c){var l=a.replacement;if(l||(l=a.replacement=r.makeLayer(a.bb,a.level),l.replaces=a,l.eles=a.eles),!l.reqs)for(var h=0;h<l.eles.length;h++)r.queueLayer(l,l.eles[h])})},Ao.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},Ao.queueLayer=function(t,r){var a=this,s=a.layersQueue,c=t.elesQueue,l=c.hasId=c.hasId||{};if(!t.replacement){if(r){if(l[r.id()])return;c.push(r),l[r.id()]=!0}t.reqs?(t.reqs++,s.updateItem(t)):(t.reqs=1,s.push(t))}},Ao.dequeue=function(t){for(var r=this,a=r.layersQueue,s=[],c=0;c<Ohe&&a.size()!==0;){var l=a.peek();if(l.replacement){a.pop();continue}if(l.replaces&&l!==l.replaces.replacement){a.pop();continue}if(l.invalid){a.pop();continue}var h=l.elesQueue.shift();h&&(r.drawEleInLayer(l,h,l.level,t),c++),s.length===0&&s.push(!0),l.elesQueue.length===0&&(a.pop(),l.reqs=0,l.replaces&&r.applyLayerReplacement(l),r.requestRedraw())}return s},Ao.applyLayerReplacement=function(t){var r=this,a=r.layersByLevel[t.level],s=t.replaces,c=a.indexOf(s);if(!(c<0||s.invalid)){a[c]=t;for(var l=0;l<t.eles.length;l++){var h=t.eles[l]._private,d=h.imgLayerCaches=h.imgLayerCaches||{};d&&(d[t.level]=t)}r.requestRedraw()}},Ao.requestRedraw=f0(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),Ao.setupDequeueing=$D.setupDequeueing({deqRedrawThreshold:The,deqCost:jhe,deqAvgCost:Ahe,deqNoDrawCost:Ihe,deqFastCost:Lhe,deq:function(t,r){return t.dequeue(r)},onDeqd:t3,shouldRedraw:UO,priority:function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq}});var tB={},nB;function Ghe(t,r){for(var a=0;a<r.length;a++){var s=r[a];t.lineTo(s.x,s.y)}}function Hhe(t,r,a){for(var s,c=0;c<r.length;c++){var l=r[c];c===0&&(s=l),t.lineTo(l.x,l.y)}t.quadraticCurveTo(a.x,a.y,s.x,s.y)}function rB(t,r,a){t.beginPath&&t.beginPath();for(var s=r,c=0;c<s.length;c++){var l=s[c];t.lineTo(l.x,l.y)}var h=a,d=a[0];t.moveTo(d.x,d.y);for(var c=1;c<h.length;c++){var l=h[c];t.lineTo(l.x,l.y)}t.closePath&&t.closePath()}function zhe(t,r,a,s,c){t.beginPath&&t.beginPath(),t.arc(a,s,c,0,Math.PI*2,!1);var l=r,h=l[0];t.moveTo(h.x,h.y);for(var d=0;d<l.length;d++){var p=l[d];t.lineTo(p.x,p.y)}t.closePath&&t.closePath()}function Fhe(t,r,a,s){t.arc(r,a,s,0,Math.PI*2,!1)}tB.arrowShapeImpl=function(t){return(nB||(nB={polygon:Ghe,"triangle-backcurve":Hhe,"triangle-tee":rB,"circle-triangle":zhe,"triangle-cross":rB,circle:Fhe}))[t]};var ll={};ll.drawElement=function(t,r,a,s,c,l){var h=this;r.isNode()?h.drawNode(t,r,a,s,c,l):h.drawEdge(t,r,a,s,c,l)},ll.drawElementOverlay=function(t,r){var a=this;r.isNode()?a.drawNodeOverlay(t,r):a.drawEdgeOverlay(t,r)},ll.drawElementUnderlay=function(t,r){var a=this;r.isNode()?a.drawNodeUnderlay(t,r):a.drawEdgeUnderlay(t,r)},ll.drawCachedElementPortion=function(t,r,a,s,c,l,h,d){var p=this,b=a.getBoundingBox(r);if(!(b.w===0||b.h===0)){var m=a.getElement(r,b,s,c,l);if(m!=null){var w=d(p,r);if(w===0)return;var k=h(p,r),P=b.x1,S=b.y1,M=b.w,L=b.h,T,j,I,R,B;if(k!==0){var F=a.getRotationPoint(r);I=F.x,R=F.y,t.translate(I,R),t.rotate(k),B=p.getImgSmoothing(t),B||p.setImgSmoothing(t,!0);var z=a.getRotationOffset(r);T=z.x,j=z.y}else T=P,j=S;var D;w!==1&&(D=t.globalAlpha,t.globalAlpha=D*w),t.drawImage(m.texture.canvas,m.x,0,m.width,m.height,T,j,M,L),w!==1&&(t.globalAlpha=D),k!==0&&(t.rotate(-k),t.translate(-I,-R),B||p.setImgSmoothing(t,!1))}else a.drawElement(t,r)}};var Uhe=function(){return 0},Yhe=function(t,r){return t.getTextAngle(r,null)},Vhe=function(t,r){return t.getTextAngle(r,"source")},qhe=function(t,r){return t.getTextAngle(r,"target")},Zhe=function(t,r){return r.effectiveOpacity()},UP=function(t,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()};ll.drawCachedElement=function(t,r,a,s,c,l){var h=this,d=h.data,p=d.eleTxrCache,b=d.lblTxrCache,m=d.slbTxrCache,w=d.tlbTxrCache,k=r.boundingBox(),P=l===!0?p.reasons.highQuality:null;if(!(k.w===0||k.h===0||!r.visible())&&(!s||u3(k,s))){var S=r.isEdge(),M=r.element()._private.rscratch.badLine;h.drawElementUnderlay(t,r),h.drawCachedElementPortion(t,r,p,a,c,P,Uhe,Zhe),(!S||!M)&&h.drawCachedElementPortion(t,r,b,a,c,P,Yhe,UP),S&&!M&&(h.drawCachedElementPortion(t,r,m,a,c,P,Vhe,UP),h.drawCachedElementPortion(t,r,w,a,c,P,qhe,UP)),h.drawElementOverlay(t,r)}},ll.drawElements=function(t,r){for(var a=this,s=0;s<r.length;s++){var c=r[s];a.drawElement(t,c)}},ll.drawCachedElements=function(t,r,a,s){for(var c=this,l=0;l<r.length;l++){var h=r[l];c.drawCachedElement(t,h,a,s)}},ll.drawCachedNodes=function(t,r,a,s){for(var c=this,l=0;l<r.length;l++){var h=r[l];h.isNode()&&c.drawCachedElement(t,h,a,s)}},ll.drawLayeredElements=function(t,r,a,s){var c=this,l=c.data.lyrTxrCache.getLayers(r,a);if(l)for(var h=0;h<l.length;h++){var d=l[h],p=d.bb;p.w===0||p.h===0||t.drawImage(d.canvas,p.x1,p.y1,p.w,p.h)}else c.drawCachedElements(t,r,a,s)};var yf={};yf.drawEdge=function(t,r,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,h=this,d=r._private.rscratch;if(!(l&&!r.visible())&&!(d.badLine||d.allpts==null||isNaN(d.allpts[0]))){var p;a&&(p=a,t.translate(-p.x1,-p.y1));var b=l?r.pstyle("opacity").value:1,m=l?r.pstyle("line-opacity").value:1,w=r.pstyle("curve-style").value,k=r.pstyle("line-style").value,P=r.pstyle("width").pfValue,S=r.pstyle("line-cap").value,M=r.pstyle("line-outline-width").value,L=r.pstyle("line-outline-color").value,T=b*m,j=b*m,I=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T;w==="straight-triangle"?(h.eleStrokeStyle(t,r,K),h.drawEdgeTrianglePath(r,t,d.allpts)):(t.lineWidth=P,t.lineCap=S,h.eleStrokeStyle(t,r,K),h.drawEdgePath(r,t,d.allpts,k),t.lineCap="butt")},R=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T;if(t.lineWidth=P+M,t.lineCap=S,M>0)h.colorStrokeStyle(t,L[0],L[1],L[2],K);else{t.lineCap="butt";return}w==="straight-triangle"?h.drawEdgeTrianglePath(r,t,d.allpts):(h.drawEdgePath(r,t,d.allpts,k),t.lineCap="butt")},B=function(){c&&h.drawEdgeOverlay(t,r)},F=function(){c&&h.drawEdgeUnderlay(t,r)},z=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j;h.drawArrowheads(t,r,K)},D=function(){h.drawElementText(t,r,null,s)};t.lineJoin="round";var H=r.pstyle("ghost").value==="yes";if(H){var Q=r.pstyle("ghost-offset-x").pfValue,q=r.pstyle("ghost-offset-y").pfValue,Z=r.pstyle("ghost-opacity").value,J=T*Z;t.translate(Q,q),I(J),z(J),t.translate(-Q,-q)}else R();F(),I(),z(),B(),D(),a&&t.translate(p.x1,p.y1)}};var iB=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(r,a){if(a.visible()){var s=a.pstyle("".concat(t,"-opacity")).value;if(s!==0){var c=this,l=c.usePaths(),h=a._private.rscratch,d=a.pstyle("".concat(t,"-padding")).pfValue,p=2*d,b=a.pstyle("".concat(t,"-color")).value;r.lineWidth=p,h.edgeType==="self"&&!l?r.lineCap="butt":r.lineCap="round",c.colorStrokeStyle(r,b[0],b[1],b[2],s),c.drawEdgePath(a,r,h.allpts,"solid")}}}};yf.drawEdgeOverlay=iB("overlay"),yf.drawEdgeUnderlay=iB("underlay"),yf.drawEdgePath=function(t,r,a,s){var c=t._private.rscratch,l=r,h,d=!1,p=this.usePaths(),b=t.pstyle("line-dash-pattern").pfValue,m=t.pstyle("line-dash-offset").pfValue;if(p){var w=a.join("$"),k=c.pathCacheKey&&c.pathCacheKey===w;k?(h=r=c.pathCache,d=!0):(h=r=new Path2D,c.pathCacheKey=w,c.pathCache=h)}if(l.setLineDash)switch(s){case"dotted":l.setLineDash([1,1]);break;case"dashed":l.setLineDash(b),l.lineDashOffset=m;break;case"solid":l.setLineDash([]);break}if(!d&&!c.badLine)switch(r.beginPath&&r.beginPath(),r.moveTo(a[0],a[1]),c.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var P=2;P+3<a.length;P+=4)r.quadraticCurveTo(a[P],a[P+1],a[P+2],a[P+3]);break;case"straight":case"haystack":for(var S=2;S+1<a.length;S+=2)r.lineTo(a[S],a[S+1]);break;case"segments":if(c.isRound){var M=Bs(c.roundCorners),L;try{for(M.s();!(L=M.n()).done;){var T=L.value;DD(r,T)}}catch(I){M.e(I)}finally{M.f()}r.lineTo(a[a.length-2],a[a.length-1])}else for(var j=2;j+1<a.length;j+=2)r.lineTo(a[j],a[j+1]);break}r=l,p?r.stroke(h):r.stroke(),r.setLineDash&&r.setLineDash([])},yf.drawEdgeTrianglePath=function(t,r,a){r.fillStyle=r.strokeStyle;for(var s=t.pstyle("width").pfValue,c=0;c+1<a.length;c+=2){var l=[a[c+2]-a[c],a[c+3]-a[c+1]],h=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[l[1]/h,-l[0]/h],p=[d[0]*s/2,d[1]*s/2];r.beginPath(),r.moveTo(a[c]-p[0],a[c+1]-p[1]),r.lineTo(a[c]+p[0],a[c+1]+p[1]),r.lineTo(a[c+2],a[c+3]),r.closePath(),r.fill()}},yf.drawArrowheads=function(t,r,a){var s=r._private.rscratch,c=s.edgeType==="haystack";c||this.drawArrowhead(t,r,"source",s.arrowStartX,s.arrowStartY,s.srcArrowAngle,a),this.drawArrowhead(t,r,"mid-target",s.midX,s.midY,s.midtgtArrowAngle,a),this.drawArrowhead(t,r,"mid-source",s.midX,s.midY,s.midsrcArrowAngle,a),c||this.drawArrowhead(t,r,"target",s.arrowEndX,s.arrowEndY,s.tgtArrowAngle,a)},yf.drawArrowhead=function(t,r,a,s,c,l,h){if(!(isNaN(s)||s==null||isNaN(c)||c==null||isNaN(l)||l==null)){var d=this,p=r.pstyle(a+"-arrow-shape").value;if(p!=="none"){var b=r.pstyle(a+"-arrow-fill").value==="hollow"?"both":"filled",m=r.pstyle(a+"-arrow-fill").value,w=r.pstyle("width").pfValue,k=r.pstyle(a+"-arrow-width"),P=k.value==="match-line"?w:k.pfValue;k.units==="%"&&(P*=w);var S=r.pstyle("opacity").value;h===void 0&&(h=S);var M=t.globalCompositeOperation;(h!==1||m==="hollow")&&(t.globalCompositeOperation="destination-out",d.colorFillStyle(t,255,255,255,1),d.colorStrokeStyle(t,255,255,255,1),d.drawArrowShape(r,t,b,w,p,P,s,c,l),t.globalCompositeOperation=M);var L=r.pstyle(a+"-arrow-color").value;d.colorFillStyle(t,L[0],L[1],L[2],h),d.colorStrokeStyle(t,L[0],L[1],L[2],h),d.drawArrowShape(r,t,m,w,p,P,s,c,l)}}},yf.drawArrowShape=function(t,r,a,s,c,l,h,d,p){var b=this,m=this.usePaths()&&c!=="triangle-cross",w=!1,k,P=r,S={x:h,y:d},M=t.pstyle("arrow-scale").value,L=this.getArrowWidth(s,M),T=b.arrowShapes[c];if(m){var j=b.arrowPathCache=b.arrowPathCache||[],I=qd(c),R=j[I];R!=null?(k=r=R,w=!0):(k=r=new Path2D,j[I]=k)}w||(r.beginPath&&r.beginPath(),m?T.draw(r,1,0,{x:0,y:0},1):T.draw(r,L,p,S,s),r.closePath&&r.closePath()),r=P,m&&(r.translate(h,d),r.rotate(p),r.scale(L,L)),(a==="filled"||a==="both")&&(m?r.fill(k):r.fill()),(a==="hollow"||a==="both")&&(r.lineWidth=l/(m?L:1),r.lineJoin="miter",m?r.stroke(k):r.stroke()),m&&(r.scale(1/L,1/L),r.rotate(-p),r.translate(-h,-d))};var YP={};YP.safeDrawImage=function(t,r,a,s,c,l,h,d,p,b){if(!(c<=0||l<=0||p<=0||b<=0))try{t.drawImage(r,a,s,c,l,h,d,p,b)}catch(m){Gr(m)}},YP.drawInscribedImage=function(t,r,a,s,c){var l=this,h=a.position(),d=h.x,p=h.y,b=a.cy().style(),m=b.getIndexedStyle.bind(b),w=m(a,"background-fit","value",s),k=m(a,"background-repeat","value",s),P=a.width(),S=a.height(),M=a.padding()*2,L=P+(m(a,"background-width-relative-to","value",s)==="inner"?0:M),T=S+(m(a,"background-height-relative-to","value",s)==="inner"?0:M),j=a._private.rscratch,I=m(a,"background-clip","value",s),R=I==="node",B=m(a,"background-image-opacity","value",s)*c,F=m(a,"background-image-smoothing","value",s),z=a.pstyle("corner-radius").value;z!=="auto"&&(z=a.pstyle("corner-radius").pfValue);var D=r.width||r.cachedW,H=r.height||r.cachedH;(D==null||H==null)&&(document.body.appendChild(r),D=r.cachedW=r.width||r.offsetWidth,H=r.cachedH=r.height||r.offsetHeight,document.body.removeChild(r));var Q=D,q=H;if(m(a,"background-width","value",s)!=="auto"&&(m(a,"background-width","units",s)==="%"?Q=m(a,"background-width","pfValue",s)*L:Q=m(a,"background-width","pfValue",s)),m(a,"background-height","value",s)!=="auto"&&(m(a,"background-height","units",s)==="%"?q=m(a,"background-height","pfValue",s)*T:q=m(a,"background-height","pfValue",s)),!(Q===0||q===0)){if(w==="contain"){var Z=Math.min(L/Q,T/q);Q*=Z,q*=Z}else if(w==="cover"){var Z=Math.max(L/Q,T/q);Q*=Z,q*=Z}var J=d-L/2,K=m(a,"background-position-x","units",s),ae=m(a,"background-position-x","pfValue",s);K==="%"?J+=(L-Q)*ae:J+=ae;var se=m(a,"background-offset-x","units",s),le=m(a,"background-offset-x","pfValue",s);se==="%"?J+=(L-Q)*le:J+=le;var he=p-T/2,fe=m(a,"background-position-y","units",s),pe=m(a,"background-position-y","pfValue",s);fe==="%"?he+=(T-q)*pe:he+=pe;var me=m(a,"background-offset-y","units",s),Te=m(a,"background-offset-y","pfValue",s);me==="%"?he+=(T-q)*Te:he+=Te,j.pathCache&&(J-=d,he-=p,d=0,p=0);var Oe=t.globalAlpha;t.globalAlpha=B;var ge=l.getImgSmoothing(t),xe=!1;if(F==="no"&&ge?(l.setImgSmoothing(t,!1),xe=!0):F==="yes"&&!ge&&(l.setImgSmoothing(t,!0),xe=!0),k==="no-repeat")R&&(t.save(),j.pathCache?t.clip(j.pathCache):(l.nodeShapes[l.getNodeShape(a)].draw(t,d,p,L,T,z,j),t.clip())),l.safeDrawImage(t,r,0,0,D,H,J,he,Q,q),R&&t.restore();else{var Se=t.createPattern(r,k);t.fillStyle=Se,l.nodeShapes[l.getNodeShape(a)].draw(t,d,p,L,T,z,j),t.translate(J,he),t.fill(),t.translate(-J,-he)}t.globalAlpha=Oe,xe&&l.setImgSmoothing(t,ge)}};var np={};np.eleTextBiggerThanMin=function(t,r){if(!r){var a=t.cy().zoom(),s=this.getPixelRatio(),c=Math.ceil(o3(a*s));r=Math.pow(2,c)}var l=t.pstyle("font-size").pfValue*r,h=t.pstyle("min-zoomed-font-size").pfValue;return!(l<h)},np.drawElementText=function(t,r,a,s,c){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,h=this;if(s==null){if(l&&!h.eleTextBiggerThanMin(r))return}else if(s===!1)return;if(r.isNode()){var d=r.pstyle("label");if(!d||!d.value)return;var p=h.getLabelJustification(r);t.textAlign=p,t.textBaseline="bottom"}else{var b=r.element()._private.rscratch.badLine,m=r.pstyle("label"),w=r.pstyle("source-label"),k=r.pstyle("target-label");if(b||(!m||!m.value)&&(!w||!w.value)&&(!k||!k.value))return;t.textAlign="center",t.textBaseline="bottom"}var P=!a,S;a&&(S=a,t.translate(-S.x1,-S.y1)),c==null?(h.drawText(t,r,null,P,l),r.isEdge()&&(h.drawText(t,r,"source",P,l),h.drawText(t,r,"target",P,l))):h.drawText(t,r,c,P,l),a&&t.translate(S.x1,S.y1)},np.getFontCache=function(t){var r;this.fontCaches=this.fontCaches||[];for(var a=0;a<this.fontCaches.length;a++)if(r=this.fontCaches[a],r.context===t)return r;return r={context:t},this.fontCaches.push(r),r},np.setupTextStyle=function(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=r.pstyle("font-style").strValue,c=r.pstyle("font-size").pfValue+"px",l=r.pstyle("font-family").strValue,h=r.pstyle("font-weight").strValue,d=a?r.effectiveOpacity()*r.pstyle("text-opacity").value:1,p=r.pstyle("text-outline-opacity").value*d,b=r.pstyle("color").value,m=r.pstyle("text-outline-color").value;t.font=s+" "+h+" "+c+" "+l,t.lineJoin="round",this.colorFillStyle(t,b[0],b[1],b[2],d),this.colorStrokeStyle(t,m[0],m[1],m[2],p)};function $he(t,r,a,s,c){var l=Math.min(s,c),h=l/2,d=r+s/2,p=a+c/2;t.beginPath(),t.arc(d,p,h,0,Math.PI*2),t.closePath()}function aB(t,r,a,s,c){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,h=Math.min(l,s/2,c/2);t.beginPath(),t.moveTo(r+h,a),t.lineTo(r+s-h,a),t.quadraticCurveTo(r+s,a,r+s,a+h),t.lineTo(r+s,a+c-h),t.quadraticCurveTo(r+s,a+c,r+s-h,a+c),t.lineTo(r+h,a+c),t.quadraticCurveTo(r,a+c,r,a+c-h),t.lineTo(r,a+h),t.quadraticCurveTo(r,a,r+h,a),t.closePath()}np.getTextAngle=function(t,r){var a,s=t._private,c=s.rscratch,l=r?r+"-":"",h=t.pstyle(l+"text-rotation");if(h.strValue==="autorotate"){var d=Gs(c,"labelAngle",r);a=t.isEdge()?d:0}else h.strValue==="none"?a=0:a=h.pfValue;return a},np.drawText=function(t,r,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=r._private,h=l.rscratch,d=c?r.effectiveOpacity():1;if(!(c&&(d===0||r.pstyle("text-opacity").value===0))){a==="main"&&(a=null);var p=Gs(h,"labelX",a),b=Gs(h,"labelY",a),m,w,k=this.getLabelText(r,a);if(k!=null&&k!==""&&!isNaN(p)&&!isNaN(b)){this.setupTextStyle(t,r,c);var P=a?a+"-":"",S=Gs(h,"labelWidth",a),M=Gs(h,"labelHeight",a),L=r.pstyle(P+"text-margin-x").pfValue,T=r.pstyle(P+"text-margin-y").pfValue,j=r.isEdge(),I=r.pstyle("text-halign").value,R=r.pstyle("text-valign").value;j&&(I="center",R="center"),p+=L,b+=T;var B;switch(s?B=this.getTextAngle(r,a):B=0,B!==0&&(m=p,w=b,t.translate(m,w),t.rotate(B),p=0,b=0),R){case"top":break;case"center":b+=M/2;break;case"bottom":b+=M;break}var F=r.pstyle("text-background-opacity").value,z=r.pstyle("text-border-opacity").value,D=r.pstyle("text-border-width").pfValue,H=r.pstyle("text-background-padding").pfValue,Q=r.pstyle("text-background-shape").strValue,q=Q==="round-rectangle"||Q==="roundrectangle",Z=Q==="circle",J=2;if(F>0||D>0&&z>0){var K=t.fillStyle,ae=t.strokeStyle,se=t.lineWidth,le=r.pstyle("text-background-color").value,he=r.pstyle("text-border-color").value,fe=r.pstyle("text-border-style").value,pe=F>0,me=D>0&&z>0,Te=p-H;switch(I){case"left":Te-=S;break;case"center":Te-=S/2;break}var Oe=b-M-H,ge=S+2*H,xe=M+2*H;if(pe&&(t.fillStyle="rgba(".concat(le[0],",").concat(le[1],",").concat(le[2],",").concat(F*d,")")),me&&(t.strokeStyle="rgba(".concat(he[0],",").concat(he[1],",").concat(he[2],",").concat(z*d,")"),t.lineWidth=D,t.setLineDash))switch(fe){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=D/4,t.setLineDash([]);break;case"solid":default:t.setLineDash([]);break}if(q?(t.beginPath(),aB(t,Te,Oe,ge,xe,J)):Z?(t.beginPath(),$he(t,Te,Oe,ge,xe)):(t.beginPath(),t.rect(Te,Oe,ge,xe)),pe&&t.fill(),me&&t.stroke(),me&&fe==="double"){var Se=D/2;t.beginPath(),q?aB(t,Te+Se,Oe+Se,ge-2*Se,xe-2*Se,J):t.rect(Te+Se,Oe+Se,ge-2*Se,xe-2*Se),t.stroke()}t.fillStyle=K,t.strokeStyle=ae,t.lineWidth=se,t.setLineDash&&t.setLineDash([])}var Le=2*r.pstyle("text-outline-width").pfValue;if(Le>0&&(t.lineWidth=Le),r.pstyle("text-wrap").value==="wrap"){var De=Gs(h,"labelWrapCachedLines",a),Ne=Gs(h,"labelLineHeight",a),Me=S/2,ke=this.getLabelJustification(r);switch(ke==="auto"||(I==="left"?ke==="left"?p+=-S:ke==="center"&&(p+=-Me):I==="center"?ke==="left"?p+=-Me:ke==="right"&&(p+=Me):I==="right"&&(ke==="center"?p+=Me:ke==="right"&&(p+=S))),R){case"top":b-=(De.length-1)*Ne;break;case"center":case"bottom":b-=(De.length-1)*Ne;break}for(var He=0;He<De.length;He++)Le>0&&t.strokeText(De[He],p,b),t.fillText(De[He],p,b),b+=Ne}else Le>0&&t.strokeText(k,p,b),t.fillText(k,p,b);B!==0&&(t.rotate(-B),t.translate(-m,-w))}}};var Ih={};Ih.drawNode=function(t,r,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,h=this,d,p,b=r._private,m=b.rscratch,w=r.position();if(!(!Lt(w.x)||!Lt(w.y))&&!(l&&!r.visible())){var k=l?r.effectiveOpacity():1,P=h.usePaths(),S,M=!1,L=r.padding();d=r.width()+2*L,p=r.height()+2*L;var T;a&&(T=a,t.translate(-T.x1,-T.y1));for(var j=r.pstyle("background-image"),I=j.value,R=new Array(I.length),B=new Array(I.length),F=0,z=0;z<I.length;z++){var D=I[z],H=R[z]=D!=null&&D!=="none";if(H){var Q=r.cy().style().getIndexedStyle(r,"background-image-crossorigin","value",z);F++,B[z]=h.getCachedImage(D,Q,function(){b.backgroundTimestamp=Date.now(),r.emitAndNotify("background")})}}var q=r.pstyle("background-blacken").value,Z=r.pstyle("border-width").pfValue,J=r.pstyle("background-opacity").value*k,K=r.pstyle("border-color").value,ae=r.pstyle("border-style").value,se=r.pstyle("border-join").value,le=r.pstyle("border-cap").value,he=r.pstyle("border-position").value,fe=r.pstyle("border-dash-pattern").pfValue,pe=r.pstyle("border-dash-offset").pfValue,me=r.pstyle("border-opacity").value*k,Te=r.pstyle("outline-width").pfValue,Oe=r.pstyle("outline-color").value,ge=r.pstyle("outline-style").value,xe=r.pstyle("outline-opacity").value*k,Se=r.pstyle("outline-offset").value,Le=r.pstyle("corner-radius").value;Le!=="auto"&&(Le=r.pstyle("corner-radius").pfValue);var De=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J;h.eleFillStyle(t,r,we)},Ne=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:me;h.colorStrokeStyle(t,K[0],K[1],K[2],we)},Me=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xe;h.colorStrokeStyle(t,Oe[0],Oe[1],Oe[2],we)},ke=function(we,Ae,ie,Pe){var Fe=h.nodePathCache=h.nodePathCache||[],We=zO(ie==="polygon"?ie+","+Pe.join(","):ie,""+Ae,""+we,""+Le),Xe=Fe[We],wt,nt=!1;return Xe!=null?(wt=Xe,nt=!0,m.pathCache=wt):(wt=new Path2D,Fe[We]=m.pathCache=wt),{path:wt,cacheHit:nt}},He=r.pstyle("shape").strValue,Qe=r.pstyle("shape-polygon-points").pfValue;if(P){t.translate(w.x,w.y);var it=ke(d,p,He,Qe);S=it.path,M=it.cacheHit}var ft=function(){if(!M){var we=w;P&&(we={x:0,y:0}),h.nodeShapes[h.getNodeShape(r)].draw(S||t,we.x,we.y,d,p,Le,m)}P?t.fill(S):t.fill()},ze=function(){for(var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k,Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ie=b.backgrounding,Pe=0,Fe=0;Fe<B.length;Fe++){var We=r.cy().style().getIndexedStyle(r,"background-image-containment","value",Fe);if(Ae&&We==="over"||!Ae&&We==="inside"){Pe++;continue}R[Fe]&&B[Fe].complete&&!B[Fe].error&&(Pe++,h.drawInscribedImage(t,B[Fe],r,Fe,we))}b.backgrounding=Pe!==F,ie!==b.backgrounding&&r.updateStyle(!1)},$e=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k;h.hasPie(r)&&(h.drawPie(t,r,Ae),we&&(P||h.nodeShapes[h.getNodeShape(r)].draw(t,w.x,w.y,d,p,Le,m)))},xt=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k;h.hasStripe(r)&&(t.save(),P?t.clip(m.pathCache):(h.nodeShapes[h.getNodeShape(r)].draw(t,w.x,w.y,d,p,Le,m),t.clip()),h.drawStripe(t,r,Ae),t.restore(),we&&(P||h.nodeShapes[h.getNodeShape(r)].draw(t,w.x,w.y,d,p,Le,m)))},st=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k,Ae=(q>0?q:-q)*we,ie=q>0?0:255;q!==0&&(h.colorFillStyle(t,ie,ie,ie,Ae),P?t.fill(S):t.fill())},Rt=function(){if(Z>0){if(t.lineWidth=Z,t.lineCap=le,t.lineJoin=se,t.setLineDash)switch(ae){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(fe),t.lineDashOffset=pe;break;case"solid":case"double":t.setLineDash([]);break}if(he!=="center"){if(t.save(),t.lineWidth*=2,he==="inside")P?t.clip(S):t.clip();else{var we=new Path2D;we.rect(-d/2-Z,-p/2-Z,d+2*Z,p+2*Z),we.addPath(S),t.clip(we,"evenodd")}P?t.stroke(S):t.stroke(),t.restore()}else P?t.stroke(S):t.stroke();if(ae==="double"){t.lineWidth=Z/3;var Ae=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",P?t.stroke(S):t.stroke(),t.globalCompositeOperation=Ae}t.setLineDash&&t.setLineDash([])}},It=function(){if(Te>0){if(t.lineWidth=Te,t.lineCap="butt",t.setLineDash)switch(ge){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var we=w;P&&(we={x:0,y:0});var Ae=h.getNodeShape(r),ie=Z;he==="inside"&&(ie=0),he==="outside"&&(ie*=2);var Pe=(d+ie+(Te+Se))/d,Fe=(p+ie+(Te+Se))/p,We=d*Pe,Xe=p*Fe,wt=h.nodeShapes[Ae].points,nt;if(P){var Kt=ke(We,Xe,Ae,wt);nt=Kt.path}if(Ae==="ellipse")h.drawEllipsePath(nt||t,we.x,we.y,We,Xe);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(Ae)){var Ht=0,Xt=0,Yn=0;Ae==="round-diamond"?Ht=(ie+Se+Te)*1.4:Ae==="round-heptagon"?(Ht=(ie+Se+Te)*1.075,Yn=-(ie/2+Se+Te)/35):Ae==="round-hexagon"?Ht=(ie+Se+Te)*1.12:Ae==="round-pentagon"?(Ht=(ie+Se+Te)*1.13,Yn=-(ie/2+Se+Te)/15):Ae==="round-tag"?(Ht=(ie+Se+Te)*1.12,Xt=(ie/2+Te+Se)*.07):Ae==="round-triangle"&&(Ht=(ie+Se+Te)*(Math.PI/2),Yn=-(ie+Se/2+Te)/Math.PI),Ht!==0&&(Pe=(d+Ht)/d,We=d*Pe,["round-hexagon","round-tag"].includes(Ae)||(Fe=(p+Ht)/p,Xe=p*Fe)),Le=Le==="auto"?a8(We,Xe):Le;for(var Gn=We/2,Qt=Xe/2,Hn=Le+(ie+Te+Se)/2,gr=new Array(wt.length/2),ii=new Array(wt.length/2),Wi=0;Wi<wt.length/2;Wi++)gr[Wi]={x:we.x+Xt+Gn*wt[Wi*2],y:we.y+Yn+Qt*wt[Wi*2+1]};var La,Pi,Bi,yi,Oa=gr.length;for(Pi=gr[Oa-1],La=0;La<Oa;La++)Bi=gr[La%Oa],yi=gr[(La+1)%Oa],ii[La]=GP(Pi,Bi,yi,Hn),Pi=Bi,Bi=yi;h.drawRoundPolygonPath(nt||t,we.x+Xt,we.y+Yn,d*Pe,p*Fe,wt,ii)}else if(["roundrectangle","round-rectangle"].includes(Ae))Le=Le==="auto"?Eh(We,Xe):Le,h.drawRoundRectanglePath(nt||t,we.x,we.y,We,Xe,Le+(ie+Te+Se)/2);else if(["cutrectangle","cut-rectangle"].includes(Ae))Le=Le==="auto"?f3():Le,h.drawCutRectanglePath(nt||t,we.x,we.y,We,Xe,null,Le+(ie+Te+Se)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(Ae))Le=Le==="auto"?Eh(We,Xe):Le,h.drawBottomRoundRectanglePath(nt||t,we.x,we.y,We,Xe,Le+(ie+Te+Se)/2);else if(Ae==="barrel")h.drawBarrelPath(nt||t,we.x,we.y,We,Xe);else if(Ae.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(Ae)){var pu=(ie+Te+Se)/d;wt=sw(uw(wt,pu)),h.drawPolygonPath(nt||t,we.x,we.y,d,p,wt)}else{var Si=(ie+Te+Se)/d;wt=sw(uw(wt,-Si)),h.drawPolygonPath(nt||t,we.x,we.y,d,p,wt)}if(P?t.stroke(nt):t.stroke(),ge==="double"){t.lineWidth=ie/3;var Io=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",P?t.stroke(nt):t.stroke(),t.globalCompositeOperation=Io}t.setLineDash&&t.setLineDash([])}},Dt=function(){c&&h.drawNodeOverlay(t,r,w,d,p)},Ut=function(){c&&h.drawNodeUnderlay(t,r,w,d,p)},bn=function(){h.drawElementText(t,r,null,s)},sn=r.pstyle("ghost").value==="yes";if(sn){var ir=r.pstyle("ghost-offset-x").pfValue,U=r.pstyle("ghost-offset-y").pfValue,ne=r.pstyle("ghost-opacity").value,ue=ne*k;t.translate(ir,U),Me(),It(),De(ne*J),ft(),ze(ue,!0),Ne(ne*me),Rt(),$e(q!==0||Z!==0),xt(q!==0||Z!==0),ze(ue,!1),st(ue),t.translate(-ir,-U)}P&&t.translate(-w.x,-w.y),Ut(),P&&t.translate(w.x,w.y),Me(),It(),De(),ft(),ze(k,!0),Ne(),Rt(),$e(q!==0||Z!==0),xt(q!==0||Z!==0),ze(k,!1),st(),P&&t.translate(-w.x,-w.y),bn(),Dt(),a&&t.translate(T.x1,T.y1)}};var oB=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(r,a,s,c,l){var h=this;if(a.visible()){var d=a.pstyle("".concat(t,"-padding")).pfValue,p=a.pstyle("".concat(t,"-opacity")).value,b=a.pstyle("".concat(t,"-color")).value,m=a.pstyle("".concat(t,"-shape")).value,w=a.pstyle("".concat(t,"-corner-radius")).value;if(p>0){if(s=s||a.position(),c==null||l==null){var k=a.padding();c=a.width()+2*k,l=a.height()+2*k}h.colorFillStyle(r,b[0],b[1],b[2],p),h.nodeShapes[m].draw(r,s.x,s.y,c+d*2,l+d*2,w),r.fill()}}}};Ih.drawNodeOverlay=oB("overlay"),Ih.drawNodeUnderlay=oB("underlay"),Ih.hasPie=function(t){return t=t[0],t._private.hasPie},Ih.hasStripe=function(t){return t=t[0],t._private.hasStripe},Ih.drawPie=function(t,r,a,s){r=r[0],s=s||r.position();var c=r.cy().style(),l=r.pstyle("pie-size"),h=r.pstyle("pie-hole"),d=r.pstyle("pie-start-angle").pfValue,p=s.x,b=s.y,m=r.width(),w=r.height(),k=Math.min(m,w)/2,P,S=0,M=this.usePaths();if(M&&(p=0,b=0),l.units==="%"?k=k*l.pfValue:l.pfValue!==void 0&&(k=l.pfValue/2),h.units==="%"?P=k*h.pfValue:h.pfValue!==void 0&&(P=h.pfValue/2),!(P>=k))for(var L=1;L<=c.pieBackgroundN;L++){var T=r.pstyle("pie-"+L+"-background-size").value,j=r.pstyle("pie-"+L+"-background-color").value,I=r.pstyle("pie-"+L+"-background-opacity").value*a,R=T/100;R+S>1&&(R=1-S);var B=1.5*Math.PI+2*Math.PI*S;B+=d;var F=2*Math.PI*R,z=B+F;T===0||S>=1||S+R>1||(P===0?(t.beginPath(),t.moveTo(p,b),t.arc(p,b,k,B,z),t.closePath()):(t.beginPath(),t.arc(p,b,k,B,z),t.arc(p,b,P,z,B,!0),t.closePath()),this.colorFillStyle(t,j[0],j[1],j[2],I),t.fill(),S+=R)}},Ih.drawStripe=function(t,r,a,s){r=r[0],s=s||r.position();var c=r.cy().style(),l=s.x,h=s.y,d=r.width(),p=r.height(),b=0,m=this.usePaths();t.save();var w=r.pstyle("stripe-direction").value,k=r.pstyle("stripe-size");switch(w){case"vertical":break;case"righward":t.rotate(-Math.PI/2);break}var P=d,S=p;k.units==="%"?(P=P*k.pfValue,S=S*k.pfValue):k.pfValue!==void 0&&(P=k.pfValue,S=k.pfValue),m&&(l=0,h=0),h-=P/2,l-=S/2;for(var M=1;M<=c.stripeBackgroundN;M++){var L=r.pstyle("stripe-"+M+"-background-size").value,T=r.pstyle("stripe-"+M+"-background-color").value,j=r.pstyle("stripe-"+M+"-background-opacity").value*a,I=L/100;I+b>1&&(I=1-b),!(L===0||b>=1||b+I>1)&&(t.beginPath(),t.rect(l,h+S*b,P,S*I),t.closePath(),this.colorFillStyle(t,T[0],T[1],T[2],j),t.fill(),b+=I)}t.restore()};var cs={},Khe=100;cs.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var r=this.cy.window(),a=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(r.devicePixelRatio||1)/a},cs.paintCache=function(t){for(var r=this.paintCaches=this.paintCaches||[],a=!0,s,c=0;c<r.length;c++)if(s=r[c],s.context===t){a=!1;break}return a&&(s={context:t},r.push(s)),s},cs.createGradientStyleFor=function(t,r,a,s,c){var l,h=this.usePaths(),d=a.pstyle(r+"-gradient-stop-colors").value,p=a.pstyle(r+"-gradient-stop-positions").pfValue;if(s==="radial-gradient")if(a.isEdge()){var b=a.sourceEndpoint(),m=a.targetEndpoint(),w=a.midpoint(),k=Zd(b,w),P=Zd(m,w);l=t.createRadialGradient(w.x,w.y,0,w.x,w.y,Math.max(k,P))}else{var S=h?{x:0,y:0}:a.position(),M=a.paddedWidth(),L=a.paddedHeight();l=t.createRadialGradient(S.x,S.y,0,S.x,S.y,Math.max(M,L))}else if(a.isEdge()){var T=a.sourceEndpoint(),j=a.targetEndpoint();l=t.createLinearGradient(T.x,T.y,j.x,j.y)}else{var I=h?{x:0,y:0}:a.position(),R=a.paddedWidth(),B=a.paddedHeight(),F=R/2,z=B/2,D=a.pstyle("background-gradient-direction").value;switch(D){case"to-bottom":l=t.createLinearGradient(I.x,I.y-z,I.x,I.y+z);break;case"to-top":l=t.createLinearGradient(I.x,I.y+z,I.x,I.y-z);break;case"to-left":l=t.createLinearGradient(I.x+F,I.y,I.x-F,I.y);break;case"to-right":l=t.createLinearGradient(I.x-F,I.y,I.x+F,I.y);break;case"to-bottom-right":case"to-right-bottom":l=t.createLinearGradient(I.x-F,I.y-z,I.x+F,I.y+z);break;case"to-top-right":case"to-right-top":l=t.createLinearGradient(I.x-F,I.y+z,I.x+F,I.y-z);break;case"to-bottom-left":case"to-left-bottom":l=t.createLinearGradient(I.x+F,I.y-z,I.x-F,I.y+z);break;case"to-top-left":case"to-left-top":l=t.createLinearGradient(I.x+F,I.y+z,I.x-F,I.y-z);break}}if(!l)return null;for(var H=p.length===d.length,Q=d.length,q=0;q<Q;q++)l.addColorStop(H?p[q]:q/(Q-1),"rgba("+d[q][0]+","+d[q][1]+","+d[q][2]+","+c+")");return l},cs.gradientFillStyle=function(t,r,a,s){var c=this.createGradientStyleFor(t,"background",r,a,s);if(!c)return null;t.fillStyle=c},cs.colorFillStyle=function(t,r,a,s,c){t.fillStyle="rgba("+r+","+a+","+s+","+c+")"},cs.eleFillStyle=function(t,r,a){var s=r.pstyle("background-fill").value;if(s==="linear-gradient"||s==="radial-gradient")this.gradientFillStyle(t,r,s,a);else{var c=r.pstyle("background-color").value;this.colorFillStyle(t,c[0],c[1],c[2],a)}},cs.gradientStrokeStyle=function(t,r,a,s){var c=this.createGradientStyleFor(t,"line",r,a,s);if(!c)return null;t.strokeStyle=c},cs.colorStrokeStyle=function(t,r,a,s,c){t.strokeStyle="rgba("+r+","+a+","+s+","+c+")"},cs.eleStrokeStyle=function(t,r,a){var s=r.pstyle("line-fill").value;if(s==="linear-gradient"||s==="radial-gradient")this.gradientStrokeStyle(t,r,s,a);else{var c=r.pstyle("line-color").value;this.colorStrokeStyle(t,c[0],c[1],c[2],a)}},cs.matchCanvasSize=function(t){var r=this,a=r.data,s=r.findContainerClientCoords(),c=s[2],l=s[3],h=r.getPixelRatio(),d=r.motionBlurPxRatio;(t===r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]||t===r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG])&&(h=d);var p=c*h,b=l*h,m;if(!(p===r.canvasWidth&&b===r.canvasHeight)){r.fontCaches=null;var w=a.canvasContainer;w.style.width=c+"px",w.style.height=l+"px";for(var k=0;k<r.CANVAS_LAYERS;k++)m=a.canvases[k],m.width=p,m.height=b,m.style.width=c+"px",m.style.height=l+"px";for(var k=0;k<r.BUFFER_COUNT;k++)m=a.bufferCanvases[k],m.width=p,m.height=b,m.style.width=c+"px",m.style.height=l+"px";r.textureMult=1,h<=1&&(m=a.bufferCanvases[r.TEXTURE_BUFFER],r.textureMult=2,m.width=p*r.textureMult,m.height=b*r.textureMult),r.canvasWidth=p,r.canvasHeight=b,r.pixelRatio=h}},cs.renderTo=function(t,r,a,s){this.render({forcedContext:t,forcedZoom:r,forcedPan:a,drawAllLayers:!0,forcedPxRatio:s})},cs.clearCanvas=function(){var t=this,r=t.data;function a(s){s.clearRect(0,0,t.canvasWidth,t.canvasHeight)}a(r.contexts[t.NODE]),a(r.contexts[t.DRAG])},cs.render=function(t){var r=this;t=t||ZO();var a=r.cy,s=t.forcedContext,c=t.drawAllLayers,l=t.drawOnlyNodeLayer,h=t.forcedZoom,d=t.forcedPan,p=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,b=r.data,m=b.canvasNeedsRedraw,w=r.textureOnViewport&&!s&&(r.pinching||r.hoverData.dragging||r.swipePanning||r.data.wheelZooming),k=t.motionBlur!==void 0?t.motionBlur:r.motionBlur,P=r.motionBlurPxRatio,S=a.hasCompoundNodes(),M=r.hoverData.draggingEles,L=!!(r.hoverData.selecting||r.touchData.selecting);k=k&&!s&&r.motionBlurEnabled&&!L;var T=k;s||(r.prevPxRatio!==p&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container),r.redrawHint("eles",!0),r.redrawHint("drag",!0)),r.prevPxRatio=p),!s&&r.motionBlurTimeout&&clearTimeout(r.motionBlurTimeout),k&&(r.mbFrames==null&&(r.mbFrames=0),r.mbFrames++,r.mbFrames<3&&(T=!1),r.mbFrames>r.minMbLowQualFrames&&(r.motionBlurPxRatio=r.mbPxRBlurry)),r.clearingMotionBlur&&(r.motionBlurPxRatio=1),r.textureDrawLastFrame&&!w&&(m[r.NODE]=!0,m[r.SELECT_BOX]=!0);var j=a.style(),I=a.zoom(),R=h!==void 0?h:I,B=a.pan(),F={x:B.x,y:B.y},z={zoom:I,pan:{x:B.x,y:B.y}},D=r.prevViewport,H=D===void 0||z.zoom!==D.zoom||z.pan.x!==D.pan.x||z.pan.y!==D.pan.y;!H&&!(M&&!S)&&(r.motionBlurPxRatio=1),d&&(F=d),R*=p,F.x*=p,F.y*=p;var Q=r.getCachedZSortedEles();function q(Ne,Me,ke,He,Qe){var it=Ne.globalCompositeOperation;Ne.globalCompositeOperation="destination-out",r.colorFillStyle(Ne,255,255,255,r.motionBlurTransparency),Ne.fillRect(Me,ke,He,Qe),Ne.globalCompositeOperation=it}function Z(Ne,Me){var ke,He,Qe,it;!r.clearingMotionBlur&&(Ne===b.bufferContexts[r.MOTIONBLUR_BUFFER_NODE]||Ne===b.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])?(ke={x:B.x*P,y:B.y*P},He=I*P,Qe=r.canvasWidth*P,it=r.canvasHeight*P):(ke=F,He=R,Qe=r.canvasWidth,it=r.canvasHeight),Ne.setTransform(1,0,0,1,0,0),Me==="motionBlur"?q(Ne,0,0,Qe,it):!s&&(Me===void 0||Me)&&Ne.clearRect(0,0,Qe,it),c||(Ne.translate(ke.x,ke.y),Ne.scale(He,He)),d&&Ne.translate(d.x,d.y),h&&Ne.scale(h,h)}if(w||(r.textureDrawLastFrame=!1),w){if(r.textureDrawLastFrame=!0,!r.textureCache){r.textureCache={},r.textureCache.bb=a.mutableElements().boundingBox(),r.textureCache.texture=r.data.bufferCanvases[r.TEXTURE_BUFFER];var J=r.data.bufferContexts[r.TEXTURE_BUFFER];J.setTransform(1,0,0,1,0,0),J.clearRect(0,0,r.canvasWidth*r.textureMult,r.canvasHeight*r.textureMult),r.render({forcedContext:J,drawOnlyNodeLayer:!0,forcedPxRatio:p*r.textureMult});var z=r.textureCache.viewport={zoom:a.zoom(),pan:a.pan(),width:r.canvasWidth,height:r.canvasHeight};z.mpan={x:(0-z.pan.x)/z.zoom,y:(0-z.pan.y)/z.zoom}}m[r.DRAG]=!1,m[r.NODE]=!1;var K=b.contexts[r.NODE],ae=r.textureCache.texture,z=r.textureCache.viewport;K.setTransform(1,0,0,1,0,0),k?q(K,0,0,z.width,z.height):K.clearRect(0,0,z.width,z.height);var se=j.core("outside-texture-bg-color").value,le=j.core("outside-texture-bg-opacity").value;r.colorFillStyle(K,se[0],se[1],se[2],le),K.fillRect(0,0,z.width,z.height);var I=a.zoom();Z(K,!1),K.clearRect(z.mpan.x,z.mpan.y,z.width/z.zoom/p,z.height/z.zoom/p),K.drawImage(ae,z.mpan.x,z.mpan.y,z.width/z.zoom/p,z.height/z.zoom/p)}else r.textureOnViewport&&!s&&(r.textureCache=null);var he=a.extent(),fe=r.pinching||r.hoverData.dragging||r.swipePanning||r.data.wheelZooming||r.hoverData.draggingEles||r.cy.animated(),pe=r.hideEdgesOnViewport&&fe,me=[];if(me[r.NODE]=!m[r.NODE]&&k&&!r.clearedForMotionBlur[r.NODE]||r.clearingMotionBlur,me[r.NODE]&&(r.clearedForMotionBlur[r.NODE]=!0),me[r.DRAG]=!m[r.DRAG]&&k&&!r.clearedForMotionBlur[r.DRAG]||r.clearingMotionBlur,me[r.DRAG]&&(r.clearedForMotionBlur[r.DRAG]=!0),m[r.NODE]||c||l||me[r.NODE]){var Te=k&&!me[r.NODE]&&P!==1,K=s||(Te?r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE]:b.contexts[r.NODE]),Oe=k&&!Te?"motionBlur":void 0;Z(K,Oe),pe?r.drawCachedNodes(K,Q.nondrag,p,he):r.drawLayeredElements(K,Q.nondrag,p,he),r.debug&&r.drawDebugPoints(K,Q.nondrag),!c&&!k&&(m[r.NODE]=!1)}if(!l&&(m[r.DRAG]||c||me[r.DRAG])){var Te=k&&!me[r.DRAG]&&P!==1,K=s||(Te?r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG]:b.contexts[r.DRAG]);Z(K,k&&!Te?"motionBlur":void 0),pe?r.drawCachedNodes(K,Q.drag,p,he):r.drawCachedElements(K,Q.drag,p,he),r.debug&&r.drawDebugPoints(K,Q.drag),!c&&!k&&(m[r.DRAG]=!1)}if(this.drawSelectionRectangle(t,Z),k&&P!==1){var ge=b.contexts[r.NODE],xe=r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE],Se=b.contexts[r.DRAG],Le=r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG],De=function(Ne,Me,ke){Ne.setTransform(1,0,0,1,0,0),ke||!T?Ne.clearRect(0,0,r.canvasWidth,r.canvasHeight):q(Ne,0,0,r.canvasWidth,r.canvasHeight);var He=P;Ne.drawImage(Me,0,0,r.canvasWidth*He,r.canvasHeight*He,0,0,r.canvasWidth,r.canvasHeight)};(m[r.NODE]||me[r.NODE])&&(De(ge,xe,me[r.NODE]),m[r.NODE]=!1),(m[r.DRAG]||me[r.DRAG])&&(De(Se,Le,me[r.DRAG]),m[r.DRAG]=!1)}r.prevViewport=z,r.clearingMotionBlur&&(r.clearingMotionBlur=!1,r.motionBlurCleared=!0,r.motionBlur=!0),k&&(r.motionBlurTimeout=setTimeout(function(){r.motionBlurTimeout=null,r.clearedForMotionBlur[r.NODE]=!1,r.clearedForMotionBlur[r.DRAG]=!1,r.motionBlur=!1,r.clearingMotionBlur=!w,r.mbFrames=0,m[r.NODE]=!0,m[r.DRAG]=!0,r.redraw()},Khe)),s||a.emit("render")};var R0;cs.drawSelectionRectangle=function(t,r){var a=this,s=a.cy,c=a.data,l=s.style(),h=t.drawOnlyNodeLayer,d=t.drawAllLayers,p=c.canvasNeedsRedraw,b=t.forcedContext;if(a.showFps||!h&&p[a.SELECT_BOX]&&!d){var m=b||c.contexts[a.SELECT_BOX];if(r(m),a.selection[4]==1&&(a.hoverData.selecting||a.touchData.selecting)){var w=a.cy.zoom(),k=l.core("selection-box-border-width").value/w;m.lineWidth=k,m.fillStyle="rgba("+l.core("selection-box-color").value[0]+","+l.core("selection-box-color").value[1]+","+l.core("selection-box-color").value[2]+","+l.core("selection-box-opacity").value+")",m.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),k>0&&(m.strokeStyle="rgba("+l.core("selection-box-border-color").value[0]+","+l.core("selection-box-border-color").value[1]+","+l.core("selection-box-border-color").value[2]+","+l.core("selection-box-opacity").value+")",m.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(c.bgActivePosistion&&!a.hoverData.selecting){var w=a.cy.zoom(),P=c.bgActivePosistion;m.fillStyle="rgba("+l.core("active-bg-color").value[0]+","+l.core("active-bg-color").value[1]+","+l.core("active-bg-color").value[2]+","+l.core("active-bg-opacity").value+")",m.beginPath(),m.arc(P.x,P.y,l.core("active-bg-size").pfValue/w,0,2*Math.PI),m.fill()}var S=a.lastRedrawTime;if(a.showFps&&S){S=Math.round(S);var M=Math.round(1e3/S),L="1 frame = "+S+" ms = "+M+" fps";if(m.setTransform(1,0,0,1,0,0),m.fillStyle="rgba(255, 0, 0, 0.75)",m.strokeStyle="rgba(255, 0, 0, 0.75)",m.font="30px Arial",!R0){var T=m.measureText(L);R0=T.actualBoundingBoxAscent}m.fillText(L,0,R0);var j=60;m.strokeRect(0,R0+10,250,20),m.fillRect(0,R0+10,250*Math.min(M/j,1),20)}d||(p[a.SELECT_BOX]=!1)}};function sB(t,r,a){var s=t.createShader(r);if(t.shaderSource(s,a),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(s));return s}function Qhe(t,r,a){var s=sB(t,t.VERTEX_SHADER,r),c=sB(t,t.FRAGMENT_SHADER,a),l=t.createProgram();if(t.attachShader(l,s),t.attachShader(l,c),t.linkProgram(l),!t.getProgramParameter(l,t.LINK_STATUS))throw new Error("Could not initialize shaders");return l}function Whe(t,r,a){a===void 0&&(a=r);var s=t.makeOffscreenCanvas(r,a),c=s.context=s.getContext("2d");return s.clear=function(){return c.clearRect(0,0,s.width,s.height)},s.clear(),s}function VP(t){var r=t.pixelRatio,a=t.cy.zoom(),s=t.cy.pan();return{zoom:a*r,pan:{x:s.x*r,y:s.y*r}}}function Jhe(t){var r=t.pixelRatio,a=t.cy.zoom();return a*r}function Xhe(t,r,a,s,c){var l=s*a+r.x,h=c*a+r.y;return h=Math.round(t.canvasHeight-h),[l,h]}function ede(t){return t.pstyle("background-fill").value!=="solid"||t.pstyle("background-image").strValue!=="none"?!1:t.pstyle("border-width").value===0||t.pstyle("border-opacity").value===0?!0:t.pstyle("border-style").value==="solid"}function tde(t,r){if(t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(t[a]!==r[a])return!1;return!0}function rp(t,r,a){var s=t[0]/255,c=t[1]/255,l=t[2]/255,h=r,d=a||new Array(4);return d[0]=s*h,d[1]=c*h,d[2]=l*h,d[3]=h,d}function qg(t,r){var a=r||new Array(4);return a[0]=(t>>0&255)/255,a[1]=(t>>8&255)/255,a[2]=(t>>16&255)/255,a[3]=(t>>24&255)/255,a}function nde(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function rde(t,r){var a=t.createTexture();return a.buffer=function(s){t.bindTexture(t.TEXTURE_2D,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,s),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},a.deleteTexture=function(){t.deleteTexture(a)},a}function uB(t,r){switch(r){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function cB(t,r,a){switch(r){case t.FLOAT:return new Float32Array(a);case t.INT:return new Int32Array(a)}}function ide(t,r,a,s,c,l){switch(r){case t.FLOAT:return new Float32Array(a.buffer,l*s,c);case t.INT:return new Int32Array(a.buffer,l*s,c)}}function ade(t,r,a,s){var c=uB(t,r),l=ja(c,2),h=l[0],d=l[1],p=cB(t,d,s),b=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,b),t.bufferData(t.ARRAY_BUFFER,p,t.STATIC_DRAW),d===t.FLOAT?t.vertexAttribPointer(a,h,d,!1,0,0):d===t.INT&&t.vertexAttribIPointer(a,h,d,0,0),t.enableVertexAttribArray(a),t.bindBuffer(t.ARRAY_BUFFER,null),b}function fl(t,r,a,s){var c=uB(t,a),l=ja(c,3),h=l[0],d=l[1],p=l[2],b=cB(t,d,r*h),m=h*p,w=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,w),t.bufferData(t.ARRAY_BUFFER,r*m,t.DYNAMIC_DRAW),t.enableVertexAttribArray(s),d===t.FLOAT?t.vertexAttribPointer(s,h,d,!1,m,0):d===t.INT&&t.vertexAttribIPointer(s,h,d,m,0),t.vertexAttribDivisor(s,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var k=new Array(r),P=0;P<r;P++)k[P]=ide(t,d,b,m,h,P);return w.dataArray=b,w.stride=m,w.size=h,w.getView=function(S){return k[S]},w.setPoint=function(S,M,L){var T=k[S];T[0]=M,T[1]=L},w.bufferSubData=function(S){t.bindBuffer(t.ARRAY_BUFFER,w),S?t.bufferSubData(t.ARRAY_BUFFER,0,b,0,S*h):t.bufferSubData(t.ARRAY_BUFFER,0,b)},w}function ode(t,r,a){for(var s=9,c=new Float32Array(r*s),l=new Array(r),h=0;h<r;h++){var d=h*s*4;l[h]=new Float32Array(c.buffer,d,s)}var p=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,p),t.bufferData(t.ARRAY_BUFFER,c.byteLength,t.DYNAMIC_DRAW);for(var b=0;b<3;b++){var m=a+b;t.enableVertexAttribArray(m),t.vertexAttribPointer(m,3,t.FLOAT,!1,3*12,b*12),t.vertexAttribDivisor(m,1)}return t.bindBuffer(t.ARRAY_BUFFER,null),p.getMatrixView=function(w){return l[w]},p.setData=function(w,k){l[k].set(w,0)},p.bufferSubData=function(){t.bindBuffer(t.ARRAY_BUFFER,p),t.bufferSubData(t.ARRAY_BUFFER,0,c)},p}function sde(t){var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r);var a=t.createTexture();return t.bindTexture(t.TEXTURE_2D,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,a,0),t.bindFramebuffer(t.FRAMEBUFFER,null),r.setFramebufferAttachmentSizes=function(s,c){t.bindTexture(t.TEXTURE_2D,a),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,s,c,0,t.RGBA,t.UNSIGNED_BYTE,null)},r}var lB=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,r=arguments.length;r--;)t+=arguments[r]*arguments[r];return Math.sqrt(t)});function qP(){var t=new lB(9);return lB!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function fB(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function ude(t,r,a){var s=r[0],c=r[1],l=r[2],h=r[3],d=r[4],p=r[5],b=r[6],m=r[7],w=r[8],k=a[0],P=a[1],S=a[2],M=a[3],L=a[4],T=a[5],j=a[6],I=a[7],R=a[8];return t[0]=k*s+P*h+S*b,t[1]=k*c+P*d+S*m,t[2]=k*l+P*p+S*w,t[3]=M*s+L*h+T*b,t[4]=M*c+L*d+T*m,t[5]=M*l+L*p+T*w,t[6]=j*s+I*h+R*b,t[7]=j*c+I*d+R*m,t[8]=j*l+I*p+R*w,t}function Vw(t,r,a){var s=r[0],c=r[1],l=r[2],h=r[3],d=r[4],p=r[5],b=r[6],m=r[7],w=r[8],k=a[0],P=a[1];return t[0]=s,t[1]=c,t[2]=l,t[3]=h,t[4]=d,t[5]=p,t[6]=k*s+P*h+b,t[7]=k*c+P*d+m,t[8]=k*l+P*p+w,t}function hB(t,r,a){var s=r[0],c=r[1],l=r[2],h=r[3],d=r[4],p=r[5],b=r[6],m=r[7],w=r[8],k=Math.sin(a),P=Math.cos(a);return t[0]=P*s+k*h,t[1]=P*c+k*d,t[2]=P*l+k*p,t[3]=P*h-k*s,t[4]=P*d-k*c,t[5]=P*p-k*l,t[6]=b,t[7]=m,t[8]=w,t}function ZP(t,r,a){var s=a[0],c=a[1];return t[0]=s*r[0],t[1]=s*r[1],t[2]=s*r[2],t[3]=c*r[3],t[4]=c*r[4],t[5]=c*r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t}function cde(t,r,a){return t[0]=2/r,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/a,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}var lde=function(){function t(r,a,s,c){bh(this,t),this.debugID=Math.floor(Math.random()*1e4),this.r=r,this.texSize=a,this.texRows=s,this.texHeight=Math.floor(a/s),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=c(r,a,a),this.scratch=c(r,a,this.texHeight,"scratch")}return vh(t,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(r){var a=r.w,s=r.h,c=this.texHeight,l=this.texSize,h=c/s,d=a*h,p=s*h;return d>l&&(h=l/a,d=a*h,p=s*h),{scale:h,texW:d,texH:p}}},{key:"draw",value:function(r,a,s){var c=this;if(this.locked)throw new Error("can't draw, atlas is locked");var l=this.texSize,h=this.texRows,d=this.texHeight,p=this.getScale(a),b=p.scale,m=p.texW,w=p.texH,k=function(T,j){if(s&&j){var I=j.context,R=T.x,B=T.row,F=R,z=d*B;I.save(),I.translate(F,z),I.scale(b,b),s(I,a),I.restore()}},P=[null,null],S=function(){k(c.freePointer,c.canvas),P[0]={x:c.freePointer.x,y:c.freePointer.row*d,w:m,h:w},P[1]={x:c.freePointer.x+m,y:c.freePointer.row*d,w:0,h:w},c.freePointer.x+=m,c.freePointer.x==l&&(c.freePointer.x=0,c.freePointer.row++)},M=function(){var T=c.scratch,j=c.canvas;T.clear(),k({x:0,row:0},T);var I=l-c.freePointer.x,R=m-I,B=d;{var F=c.freePointer.x,z=c.freePointer.row*d,D=I;j.context.drawImage(T,0,0,D,B,F,z,D,B),P[0]={x:F,y:z,w:D,h:w}}{var H=I,Q=(c.freePointer.row+1)*d,q=R;j&&j.context.drawImage(T,H,0,q,B,0,Q,q,B),P[1]={x:0,y:Q,w:q,h:w}}c.freePointer.x=R,c.freePointer.row++},L=function(){c.freePointer.x=0,c.freePointer.row++};if(this.freePointer.x+m<=l)S();else{if(this.freePointer.row>=h-1)return!1;this.freePointer.x===l?(L(),S()):this.enableWrapping?M():(L(),S())}return this.keyToLocation.set(r,P),this.needsBuffer=!0,P}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var a=this.texSize,s=this.texRows,c=this.getScale(r),l=c.texW;return this.freePointer.x+l>a?this.freePointer.row<s-1:!0}},{key:"bufferIfNeeded",value:function(r){this.texture||(this.texture=rde(r,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked&&(this.canvas=null,this.scratch=null))}},{key:"dispose",value:function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0}}])}(),fde=function(){function t(r,a,s,c){bh(this,t),this.r=r,this.texSize=a,this.texRows=s,this.createTextureCanvas=c,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}return vh(t,[{key:"getKeys",value:function(){return new Set(this.styleKeyToAtlas.keys())}},{key:"_createAtlas",value:function(){var r=this.r,a=this.texSize,s=this.texRows,c=this.createTextureCanvas;return new lde(r,a,s,c)}},{key:"_getScratchCanvas",value:function(){if(!this.scratch){var r=this.r,a=this.texSize,s=this.texRows,c=this.createTextureCanvas,l=Math.floor(a/s);this.scratch=c(r,a,l,"scratch")}return this.scratch}},{key:"draw",value:function(r,a,s){var c=this.styleKeyToAtlas.get(r);return c||(c=this.atlases[this.atlases.length-1],(!c||!c.canFit(a))&&(c&&c.lock(),c=this._createAtlas(),this.atlases.push(c)),c.draw(r,a,s),this.styleKeyToAtlas.set(r,c)),c}},{key:"getAtlas",value:function(r){return this.styleKeyToAtlas.get(r)}},{key:"hasAtlas",value:function(r){return this.styleKeyToAtlas.has(r)}},{key:"markKeyForGC",value:function(r){this.markedKeys.add(r)}},{key:"gc",value:function(){var r=this,a=this.markedKeys;if(a.size===0){console.log("nothing to garbage collect");return}var s=[],c=new Map,l=null,h=Bs(this.atlases),d;try{var p=function(){var b=d.value,m=b.getKeys(),w=hde(a,m);if(w.size===0)return s.push(b),m.forEach(function(I){return c.set(I,b)}),1;l||(l=r._createAtlas(),s.push(l));var k=Bs(m),P;try{for(k.s();!(P=k.n()).done;){var S=P.value;if(!w.has(S)){var M=b.getOffsets(S),L=ja(M,2),T=L[0],j=L[1];l.canFit({w:T.w+j.w,h:T.h})||(l.lock(),l=r._createAtlas(),s.push(l)),b.canvas&&(r._copyTextureToNewAtlas(S,b,l),c.set(S,l))}}}catch(I){k.e(I)}finally{k.f()}b.dispose()};for(h.s();!(d=h.n()).done;)p()}catch(b){h.e(b)}finally{h.f()}this.atlases=s,this.styleKeyToAtlas=c,this.markedKeys=new Set}},{key:"_copyTextureToNewAtlas",value:function(r,a,s){var c=a.getOffsets(r),l=ja(c,2),h=l[0],d=l[1];if(d.w===0)s.draw(r,h,function(w){w.drawImage(a.canvas,h.x,h.y,h.w,h.h,0,0,h.w,h.h)});else{var p=this._getScratchCanvas();p.clear(),p.context.drawImage(a.canvas,h.x,h.y,h.w,h.h,0,0,h.w,h.h),p.context.drawImage(a.canvas,d.x,d.y,d.w,d.h,h.w,0,d.w,d.h);var b=h.w+d.w,m=h.h;s.draw(r,{w:b,h:m},function(w){w.drawImage(p,0,0,b,m,0,0,b,m)})}}},{key:"getCounts",value:function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}}}])}();function hde(t,r){return t.intersection?t.intersection(r):new Set($m(t).filter(function(a){return r.has(a)}))}var dde=function(){function t(r,a){bh(this,t),this.r=r,this.globalOptions=a,this.atlasSize=a.webglTexSize,this.maxAtlasesPerBatch=a.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}return vh(t,[{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"addAtlasCollection",value:function(r,a){var s=this.globalOptions,c=s.webglTexSize,l=s.createTextureCanvas,h=a.texRows,d=this._cacheScratchCanvas(l),p=new fde(this.r,c,h,d);this.collections.set(r,p)}},{key:"addRenderType",value:function(r,a){var s=a.collection;if(!this.collections.has(s))throw new Error("invalid atlas collection name '".concat(s,"'"));var c=this.collections.get(s),l=gn({type:r,atlasCollection:c},a);this.renderTypes.set(r,l)}},{key:"getRenderTypeOpts",value:function(r){return this.renderTypes.get(r)}},{key:"getAtlasCollection",value:function(r){return this.collections.get(r)}},{key:"_cacheScratchCanvas",value:function(r){var a=-1,s=-1,c=null;return function(l,h,d,p){return p?((!c||h!=a||d!=s)&&(a=h,s=d,c=r(l,h,d)),c):r(l,h,d)}}},{key:"_key",value:function(r,a){return"".concat(r,"-").concat(a)}},{key:"invalidate",value:function(r){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=s.forceRedraw,l=c===void 0?!1:c,h=s.filterEle,d=h===void 0?function(){return!0}:h,p=s.filterType,b=p===void 0?function(){return!0}:p,m=!1,w=!1,k=Bs(r),P;try{for(k.s();!(P=k.n()).done;){var S=P.value;if(d(S)){var M=Bs(this.renderTypes.values()),L;try{var T=function(){var j=L.value,I=j.type;if(b(I)){var R=a.collections.get(j.collection),B=j.getKey(S),F=Array.isArray(B)?B:[B];if(l)F.forEach(function(Q){return R.markKeyForGC(Q)}),w=!0;else{var z=j.getID?j.getID(S):S.id(),D=a._key(I,z),H=a.typeAndIdToKey.get(D);H!==void 0&&!tde(F,H)&&(m=!0,a.typeAndIdToKey.delete(D),H.forEach(function(Q){return R.markKeyForGC(Q)}))}}};for(M.s();!(L=M.n()).done;)T()}catch(j){M.e(j)}finally{M.f()}}}}catch(j){k.e(j)}finally{k.f()}return w&&(this.gc(),m=!1),m}},{key:"gc",value:function(){var r=Bs(this.collections.values()),a;try{for(r.s();!(a=r.n()).done;){var s=a.value;s.gc()}}catch(c){r.e(c)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,a,s,c){var l=this.renderTypes.get(a),h=this.collections.get(l.collection),d=!1,p=h.draw(c,s,function(w){l.drawClipped?(w.save(),w.beginPath(),w.rect(0,0,s.w,s.h),w.clip(),l.drawElement(w,r,s,!0,!0),w.restore()):l.drawElement(w,r,s,!0,!0),d=!0});if(d){var b=l.getID?l.getID(r):r.id(),m=this._key(a,b);this.typeAndIdToKey.has(m)?this.typeAndIdToKey.get(m).push(c):this.typeAndIdToKey.set(m,[c])}return p}},{key:"getAtlasInfo",value:function(r,a){var s=this,c=this.renderTypes.get(a),l=c.getKey(r),h=Array.isArray(l)?l:[l];return h.map(function(d){var p=c.getBoundingBox(r,d),b=s.getOrCreateAtlas(r,a,p,d),m=b.getOffsets(d),w=ja(m,2),k=w[0],P=w[1];return{atlas:b,tex:k,tex1:k,tex2:P,bb:p}})}},{key:"getDebugInfo",value:function(){var r=[],a=Bs(this.collections),s;try{for(a.s();!(s=a.n()).done;){var c=ja(s.value,2),l=c[0],h=c[1],d=h.getCounts(),p=d.keyCount,b=d.atlasCount;r.push({type:l,keyCount:p,atlasCount:b})}}catch(m){a.e(m)}finally{a.f()}return r}}])}(),pde=function(){function t(r){bh(this,t),this.globalOptions=r,this.atlasSize=r.webglTexSize,this.maxAtlasesPerBatch=r.webglTexPerBatch,this.batchAtlases=[]}return vh(t,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,a){return a})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0}},{key:"getAtlasIndexForBatch",value:function(r){var a=this.batchAtlases.indexOf(r);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),a=this.batchAtlases.length-1}return a}}])}(),gde=`
|
|
47
|
+
float circleSD(vec2 p, float r) {
|
|
48
|
+
return distance(vec2(0), p) - r; // signed distance
|
|
49
|
+
}
|
|
50
|
+
`,bde=`
|
|
51
|
+
float rectangleSD(vec2 p, vec2 b) {
|
|
52
|
+
vec2 d = abs(p)-b;
|
|
53
|
+
return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);
|
|
54
|
+
}
|
|
55
|
+
`,vde=`
|
|
56
|
+
float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {
|
|
57
|
+
cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;
|
|
58
|
+
cr.x = (p.y > 0.0) ? cr.x : cr.y;
|
|
59
|
+
vec2 q = abs(p) - b + cr.x;
|
|
60
|
+
return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;
|
|
61
|
+
}
|
|
62
|
+
`,yde=`
|
|
63
|
+
float ellipseSD(vec2 p, vec2 ab) {
|
|
64
|
+
p = abs( p ); // symmetry
|
|
65
|
+
|
|
66
|
+
// find root with Newton solver
|
|
67
|
+
vec2 q = ab*(p-ab);
|
|
68
|
+
float w = (q.x<q.y)? 1.570796327 : 0.0;
|
|
69
|
+
for( int i=0; i<5; i++ ) {
|
|
70
|
+
vec2 cs = vec2(cos(w),sin(w));
|
|
71
|
+
vec2 u = ab*vec2( cs.x,cs.y);
|
|
72
|
+
vec2 v = ab*vec2(-cs.y,cs.x);
|
|
73
|
+
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// compute final point and distance
|
|
77
|
+
float d = length(p-ab*vec2(cos(w),sin(w)));
|
|
78
|
+
|
|
79
|
+
// return signed distance
|
|
80
|
+
return (dot(p/ab,p/ab)>1.0) ? d : -d;
|
|
81
|
+
}
|
|
82
|
+
`,D0={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},qw={IGNORE:1,USE_BB:2},$P=0,dB=1,pB=2,KP=3,Zg=4,Zw=5,B0=6,G0=7,mde=function(){function t(r,a,s){bh(this,t),this.r=r,this.gl=a,this.maxInstances=s.webglBatchSize,this.atlasSize=s.webglTexSize,this.bgColor=s.bgColor,this.debug=s.webglDebug,this.batchDebugInfo=[],s.enableWrapping=!0,s.createTextureCanvas=Whe,this.atlasManager=new dde(r,s),this.batchManager=new pde(s),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(D0.SCREEN),this.pickingProgram=this._createShaderProgram(D0.PICKING),this.vao=this._createVAO()}return vh(t,[{key:"addAtlasCollection",value:function(r,a){this.atlasManager.addAtlasCollection(r,a)}},{key:"addTextureAtlasRenderType",value:function(r,a){this.atlasManager.addRenderType(r,a)}},{key:"addSimpleShapeRenderType",value:function(r,a){this.simpleShapeOptions.set(r,a)}},{key:"invalidate",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.type,c=this.atlasManager;return s?c.invalidate(r,{filterType:function(l){return l===s},forceRedraw:!0}):c.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var a=this.gl,s=`#version 300 es
|
|
83
|
+
precision highp float;
|
|
84
|
+
|
|
85
|
+
uniform mat3 uPanZoomMatrix;
|
|
86
|
+
uniform int uAtlasSize;
|
|
87
|
+
|
|
88
|
+
// instanced
|
|
89
|
+
in vec2 aPosition; // a vertex from the unit square
|
|
90
|
+
|
|
91
|
+
in mat3 aTransform; // used to transform verticies, eg into a bounding box
|
|
92
|
+
in int aVertType; // the type of thing we are rendering
|
|
93
|
+
|
|
94
|
+
// the z-index that is output when using picking mode
|
|
95
|
+
in vec4 aIndex;
|
|
96
|
+
|
|
97
|
+
// For textures
|
|
98
|
+
in int aAtlasId; // which shader unit/atlas to use
|
|
99
|
+
in vec4 aTex; // x/y/w/h of texture in atlas
|
|
100
|
+
|
|
101
|
+
// for edges
|
|
102
|
+
in vec4 aPointAPointB;
|
|
103
|
+
in vec4 aPointCPointD;
|
|
104
|
+
in vec2 aLineWidth; // also used for node border width
|
|
105
|
+
|
|
106
|
+
// simple shapes
|
|
107
|
+
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
|
|
108
|
+
in vec4 aColor; // also used for edges
|
|
109
|
+
in vec4 aBorderColor; // aLineWidth is used for border width
|
|
110
|
+
|
|
111
|
+
// output values passed to the fragment shader
|
|
112
|
+
out vec2 vTexCoord;
|
|
113
|
+
out vec4 vColor;
|
|
114
|
+
out vec2 vPosition;
|
|
115
|
+
// flat values are not interpolated
|
|
116
|
+
flat out int vAtlasId;
|
|
117
|
+
flat out int vVertType;
|
|
118
|
+
flat out vec2 vTopRight;
|
|
119
|
+
flat out vec2 vBotLeft;
|
|
120
|
+
flat out vec4 vCornerRadius;
|
|
121
|
+
flat out vec4 vBorderColor;
|
|
122
|
+
flat out vec2 vBorderWidth;
|
|
123
|
+
flat out vec4 vIndex;
|
|
124
|
+
|
|
125
|
+
void main(void) {
|
|
126
|
+
int vid = gl_VertexID;
|
|
127
|
+
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
|
|
128
|
+
|
|
129
|
+
if(aVertType == `.concat($P,`) {
|
|
130
|
+
float texX = aTex.x; // texture coordinates
|
|
131
|
+
float texY = aTex.y;
|
|
132
|
+
float texW = aTex.z;
|
|
133
|
+
float texH = aTex.w;
|
|
134
|
+
|
|
135
|
+
if(vid == 1 || vid == 2 || vid == 4) {
|
|
136
|
+
texX += texW;
|
|
137
|
+
}
|
|
138
|
+
if(vid == 2 || vid == 4 || vid == 5) {
|
|
139
|
+
texY += texH;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
float d = float(uAtlasSize);
|
|
143
|
+
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
|
|
144
|
+
|
|
145
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
146
|
+
}
|
|
147
|
+
else if(aVertType == `).concat(Zg," || aVertType == ").concat(G0,`
|
|
148
|
+
|| aVertType == `).concat(Zw," || aVertType == ").concat(B0,`) { // simple shapes
|
|
149
|
+
|
|
150
|
+
// the bounding box is needed by the fragment shader
|
|
151
|
+
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
|
|
152
|
+
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
|
|
153
|
+
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
|
|
154
|
+
|
|
155
|
+
// calculations are done in the fragment shader, just pass these along
|
|
156
|
+
vColor = aColor;
|
|
157
|
+
vCornerRadius = aCornerRadius;
|
|
158
|
+
vBorderColor = aBorderColor;
|
|
159
|
+
vBorderWidth = aLineWidth;
|
|
160
|
+
|
|
161
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
162
|
+
}
|
|
163
|
+
else if(aVertType == `).concat(dB,`) {
|
|
164
|
+
vec2 source = aPointAPointB.xy;
|
|
165
|
+
vec2 target = aPointAPointB.zw;
|
|
166
|
+
|
|
167
|
+
// adjust the geometry so that the line is centered on the edge
|
|
168
|
+
position.y = position.y - 0.5;
|
|
169
|
+
|
|
170
|
+
// stretch the unit square into a long skinny rectangle
|
|
171
|
+
vec2 xBasis = target - source;
|
|
172
|
+
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
|
|
173
|
+
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
|
|
174
|
+
|
|
175
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
|
|
176
|
+
vColor = aColor;
|
|
177
|
+
}
|
|
178
|
+
else if(aVertType == `).concat(pB,`) {
|
|
179
|
+
vec2 pointA = aPointAPointB.xy;
|
|
180
|
+
vec2 pointB = aPointAPointB.zw;
|
|
181
|
+
vec2 pointC = aPointCPointD.xy;
|
|
182
|
+
vec2 pointD = aPointCPointD.zw;
|
|
183
|
+
|
|
184
|
+
// adjust the geometry so that the line is centered on the edge
|
|
185
|
+
position.y = position.y - 0.5;
|
|
186
|
+
|
|
187
|
+
vec2 p0, p1, p2, pos;
|
|
188
|
+
if(position.x == 0.0) { // The left side of the unit square
|
|
189
|
+
p0 = pointA;
|
|
190
|
+
p1 = pointB;
|
|
191
|
+
p2 = pointC;
|
|
192
|
+
pos = position;
|
|
193
|
+
} else { // The right side of the unit square, use same approach but flip the geometry upside down
|
|
194
|
+
p0 = pointD;
|
|
195
|
+
p1 = pointC;
|
|
196
|
+
p2 = pointB;
|
|
197
|
+
pos = vec2(0.0, -position.y);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
vec2 p01 = p1 - p0;
|
|
201
|
+
vec2 p12 = p2 - p1;
|
|
202
|
+
vec2 p21 = p1 - p2;
|
|
203
|
+
|
|
204
|
+
// Find the normal vector.
|
|
205
|
+
vec2 tangent = normalize(normalize(p12) + normalize(p01));
|
|
206
|
+
vec2 normal = vec2(-tangent.y, tangent.x);
|
|
207
|
+
|
|
208
|
+
// Find the vector perpendicular to p0 -> p1.
|
|
209
|
+
vec2 p01Norm = normalize(vec2(-p01.y, p01.x));
|
|
210
|
+
|
|
211
|
+
// Determine the bend direction.
|
|
212
|
+
float sigma = sign(dot(p01 + p21, normal));
|
|
213
|
+
float width = aLineWidth[0];
|
|
214
|
+
|
|
215
|
+
if(sign(pos.y) == -sigma) {
|
|
216
|
+
// This is an intersecting vertex. Adjust the position so that there's no overlap.
|
|
217
|
+
vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
|
|
218
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
|
219
|
+
} else {
|
|
220
|
+
// This is a non-intersecting vertex. Treat it like a mitre join.
|
|
221
|
+
vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
|
|
222
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
vColor = aColor;
|
|
226
|
+
}
|
|
227
|
+
else if(aVertType == `).concat(KP,` && vid < 3) {
|
|
228
|
+
// massage the first triangle into an edge arrow
|
|
229
|
+
if(vid == 0)
|
|
230
|
+
position = vec2(-0.15, -0.3);
|
|
231
|
+
if(vid == 1)
|
|
232
|
+
position = vec2( 0.0, 0.0);
|
|
233
|
+
if(vid == 2)
|
|
234
|
+
position = vec2( 0.15, -0.3);
|
|
235
|
+
|
|
236
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
237
|
+
vColor = aColor;
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
vAtlasId = aAtlasId;
|
|
244
|
+
vVertType = aVertType;
|
|
245
|
+
vIndex = aIndex;
|
|
246
|
+
}
|
|
247
|
+
`),c=this.batchManager.getIndexArray(),l=`#version 300 es
|
|
248
|
+
precision highp float;
|
|
249
|
+
|
|
250
|
+
// declare texture unit for each texture atlas in the batch
|
|
251
|
+
`.concat(c.map(function(p){return"uniform sampler2D uTexture".concat(p,";")}).join(`
|
|
252
|
+
`),`
|
|
253
|
+
|
|
254
|
+
uniform vec4 uBGColor;
|
|
255
|
+
uniform float uZoom;
|
|
256
|
+
|
|
257
|
+
in vec2 vTexCoord;
|
|
258
|
+
in vec4 vColor;
|
|
259
|
+
in vec2 vPosition; // model coordinates
|
|
260
|
+
|
|
261
|
+
flat in int vAtlasId;
|
|
262
|
+
flat in vec4 vIndex;
|
|
263
|
+
flat in int vVertType;
|
|
264
|
+
flat in vec2 vTopRight;
|
|
265
|
+
flat in vec2 vBotLeft;
|
|
266
|
+
flat in vec4 vCornerRadius;
|
|
267
|
+
flat in vec4 vBorderColor;
|
|
268
|
+
flat in vec2 vBorderWidth;
|
|
269
|
+
|
|
270
|
+
out vec4 outColor;
|
|
271
|
+
|
|
272
|
+
`).concat(gde,`
|
|
273
|
+
`).concat(bde,`
|
|
274
|
+
`).concat(vde,`
|
|
275
|
+
`).concat(yde,`
|
|
276
|
+
|
|
277
|
+
vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha
|
|
278
|
+
return vec4(
|
|
279
|
+
top.rgb + (bot.rgb * (1.0 - top.a)),
|
|
280
|
+
top.a + (bot.a * (1.0 - top.a))
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance
|
|
285
|
+
// scale to the zoom level so that borders don't look blurry when zoomed in
|
|
286
|
+
// note 1.5 is an aribitrary value chosen because it looks good
|
|
287
|
+
return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d)));
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
void main(void) {
|
|
291
|
+
if(vVertType == `).concat($P,`) {
|
|
292
|
+
// look up the texel from the texture unit
|
|
293
|
+
`).concat(c.map(function(p){return"if(vAtlasId == ".concat(p,") outColor = texture(uTexture").concat(p,", vTexCoord);")}).join(`
|
|
294
|
+
else `),`
|
|
295
|
+
}
|
|
296
|
+
else if(vVertType == `).concat(KP,`) {
|
|
297
|
+
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
|
|
298
|
+
outColor = blend(vColor, uBGColor);
|
|
299
|
+
outColor.a = 1.0; // make opaque, masks out line under arrow
|
|
300
|
+
}
|
|
301
|
+
else if(vVertType == `).concat(Zg,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
|
|
302
|
+
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
|
|
303
|
+
}
|
|
304
|
+
else if(vVertType == `).concat(Zg," || vVertType == ").concat(G0,`
|
|
305
|
+
|| vVertType == `).concat(Zw," || vVertType == ").concat(B0,`) { // use SDF
|
|
306
|
+
|
|
307
|
+
float outerBorder = vBorderWidth[0];
|
|
308
|
+
float innerBorder = vBorderWidth[1];
|
|
309
|
+
float borderPadding = outerBorder * 2.0;
|
|
310
|
+
float w = vTopRight.x - vBotLeft.x - borderPadding;
|
|
311
|
+
float h = vTopRight.y - vBotLeft.y - borderPadding;
|
|
312
|
+
vec2 b = vec2(w/2.0, h/2.0); // half width, half height
|
|
313
|
+
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
|
|
314
|
+
|
|
315
|
+
float d; // signed distance
|
|
316
|
+
if(vVertType == `).concat(Zg,`) {
|
|
317
|
+
d = rectangleSD(p, b);
|
|
318
|
+
} else if(vVertType == `).concat(G0,` && w == h) {
|
|
319
|
+
d = circleSD(p, b.x); // faster than ellipse
|
|
320
|
+
} else if(vVertType == `).concat(G0,`) {
|
|
321
|
+
d = ellipseSD(p, b);
|
|
322
|
+
} else {
|
|
323
|
+
d = roundRectangleSD(p, b, vCornerRadius.wzyx);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
|
|
327
|
+
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
|
|
328
|
+
if(d > 0.0) {
|
|
329
|
+
if(d > outerBorder) {
|
|
330
|
+
discard;
|
|
331
|
+
} else {
|
|
332
|
+
outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);
|
|
333
|
+
}
|
|
334
|
+
} else {
|
|
335
|
+
if(d > innerBorder) {
|
|
336
|
+
vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;
|
|
337
|
+
vec4 innerBorderColor = blend(vBorderColor, vColor);
|
|
338
|
+
outColor = distInterp(innerBorderColor, outerColor, d);
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
vec4 outerColor;
|
|
342
|
+
if(innerBorder == 0.0 && outerBorder == 0.0) {
|
|
343
|
+
outerColor = vec4(0);
|
|
344
|
+
} else if(innerBorder == 0.0) {
|
|
345
|
+
outerColor = vBorderColor;
|
|
346
|
+
} else {
|
|
347
|
+
outerColor = blend(vBorderColor, vColor);
|
|
348
|
+
}
|
|
349
|
+
outColor = distInterp(vColor, outerColor, d - innerBorder);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
outColor = vColor;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
`).concat(r.picking?`if(outColor.a == 0.0) discard;
|
|
358
|
+
else outColor = vIndex;`:"",`
|
|
359
|
+
}
|
|
360
|
+
`),h=Qhe(a,s,l);h.aPosition=a.getAttribLocation(h,"aPosition"),h.aIndex=a.getAttribLocation(h,"aIndex"),h.aVertType=a.getAttribLocation(h,"aVertType"),h.aTransform=a.getAttribLocation(h,"aTransform"),h.aAtlasId=a.getAttribLocation(h,"aAtlasId"),h.aTex=a.getAttribLocation(h,"aTex"),h.aPointAPointB=a.getAttribLocation(h,"aPointAPointB"),h.aPointCPointD=a.getAttribLocation(h,"aPointCPointD"),h.aLineWidth=a.getAttribLocation(h,"aLineWidth"),h.aColor=a.getAttribLocation(h,"aColor"),h.aCornerRadius=a.getAttribLocation(h,"aCornerRadius"),h.aBorderColor=a.getAttribLocation(h,"aBorderColor"),h.uPanZoomMatrix=a.getUniformLocation(h,"uPanZoomMatrix"),h.uAtlasSize=a.getUniformLocation(h,"uAtlasSize"),h.uBGColor=a.getUniformLocation(h,"uBGColor"),h.uZoom=a.getUniformLocation(h,"uZoom"),h.uTextures=[];for(var d=0;d<this.batchManager.getMaxAtlasesPerBatch();d++)h.uTextures.push(a.getUniformLocation(h,"uTexture".concat(d)));return h}},{key:"_createVAO",value:function(){var r=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=r.length/2;var a=this.maxInstances,s=this.gl,c=this.program,l=s.createVertexArray();return s.bindVertexArray(l),ade(s,"vec2",c.aPosition,r),this.transformBuffer=ode(s,a,c.aTransform),this.indexBuffer=fl(s,a,"vec4",c.aIndex),this.vertTypeBuffer=fl(s,a,"int",c.aVertType),this.atlasIdBuffer=fl(s,a,"int",c.aAtlasId),this.texBuffer=fl(s,a,"vec4",c.aTex),this.pointAPointBBuffer=fl(s,a,"vec4",c.aPointAPointB),this.pointCPointDBuffer=fl(s,a,"vec4",c.aPointCPointD),this.lineWidthBuffer=fl(s,a,"vec2",c.aLineWidth),this.colorBuffer=fl(s,a,"vec4",c.aColor),this.cornerRadiusBuffer=fl(s,a,"vec4",c.aCornerRadius),this.borderColorBuffer=fl(s,a,"vec4",c.aBorderColor),s.bindVertexArray(null),l}},{key:"buffers",get:function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return mh(a,"Buffer")}).map(function(a){return r[a]})),this._buffers}},{key:"startFrame",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:D0.SCREEN;this.panZoomMatrix=r,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,a){return r.visible()?a&&a.isVisible?a.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,a,s){var c=this.atlasManager,l=this.batchManager,h=c.getRenderTypeOpts(s);if(this._isVisible(r,h)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&h.getTexPickingMode){var d=h.getTexPickingMode(r);if(d===qw.IGNORE)return;if(d==qw.USE_BB){this.drawPickingRectangle(r,a,s);return}}var p=c.getAtlasInfo(r,s),b=Bs(p),m;try{for(b.s();!(m=b.n()).done;){var w=m.value,k=w.atlas,P=w.tex1,S=w.tex2;l.canAddToCurrentBatch(k)||this.endBatch();for(var M=l.getAtlasIndexForBatch(k),L=0,T=[[P,!0],[S,!1]];L<T.length;L++){var j=ja(T[L],2),I=j[0],R=j[1];if(I.w!=0){var B=this.instanceCount;this.vertTypeBuffer.getView(B)[0]=$P;var F=this.indexBuffer.getView(B);qg(a,F);var z=this.atlasIdBuffer.getView(B);z[0]=M;var D=this.texBuffer.getView(B);D[0]=I.x,D[1]=I.y,D[2]=I.w,D[3]=I.h;var H=this.transformBuffer.getMatrixView(B);this.setTransformMatrix(r,H,h,w,R),this.instanceCount++,R||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(Q){b.e(Q)}finally{b.f()}}}},{key:"setTransformMatrix",value:function(r,a,s,c){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,h=0;if(s.shapeProps&&s.shapeProps.padding&&(h=r.pstyle(s.shapeProps.padding).pfValue),c){var d=c.bb,p=c.tex1,b=c.tex2,m=p.w/(p.w+b.w);l||(m=1-m);var w=this._getAdjustedBB(d,h,l,m);this._applyTransformMatrix(a,w,s,r)}else{var k=s.getBoundingBox(r),P=this._getAdjustedBB(k,h,!0,1);this._applyTransformMatrix(a,P,s,r)}}},{key:"_applyTransformMatrix",value:function(r,a,s,c){var l,h;fB(r);var d=s.getRotation?s.getRotation(c):0;if(d!==0){var p=s.getRotationPoint(c),b=p.x,m=p.y;Vw(r,r,[b,m]),hB(r,r,d);var w=s.getRotationOffset(c);l=w.x+(a.xOffset||0),h=w.y+(a.yOffset||0)}else l=a.x1,h=a.y1;Vw(r,r,[l,h]),ZP(r,r,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(r,a,s,c){var l=r.x1,h=r.y1,d=r.w,p=r.h,b=r.yOffset;a&&(l-=a,h-=a,d+=2*a,p+=2*a);var m=0,w=d*c;return s&&c<1?d=w:!s&&c<1&&(m=d-w,l+=m,d=w),{x1:l,y1:h,w:d,h:p,xOffset:m,yOffset:b}}},{key:"drawPickingRectangle",value:function(r,a,s){var c=this.atlasManager.getRenderTypeOpts(s),l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=Zg;var h=this.indexBuffer.getView(l);qg(a,h);var d=this.colorBuffer.getView(l);rp([0,0,0],1,d);var p=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(r,p,c),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,a,s){var c=this.simpleShapeOptions.get(s);if(this._isVisible(r,c)){var l=c.shapeProps,h=this._getVertTypeForShape(r,l.shape);if(h===void 0||c.isSimple&&!c.isSimple(r)){this.drawTexture(r,a,s);return}var d=this.instanceCount;if(this.vertTypeBuffer.getView(d)[0]=h,h===Zw||h===B0){var p=c.getBoundingBox(r),b=this._getCornerRadius(r,l.radius,p),m=this.cornerRadiusBuffer.getView(d);m[0]=b,m[1]=b,m[2]=b,m[3]=b,h===B0&&(m[0]=0,m[2]=0)}var w=this.indexBuffer.getView(d);qg(a,w);var k=r.pstyle(l.color).value,P=r.pstyle(l.opacity).value,S=this.colorBuffer.getView(d);rp(k,P,S);var M=this.lineWidthBuffer.getView(d);if(M[0]=0,M[1]=0,l.border){var L=r.pstyle("border-width").value;if(L>0){var T=r.pstyle("border-color").value,j=r.pstyle("border-opacity").value,I=this.borderColorBuffer.getView(d);rp(T,j,I);var R=r.pstyle("border-position").value;if(R==="inside")M[0]=0,M[1]=-L;else if(R==="outside")M[0]=L,M[1]=0;else{var B=L/2;M[0]=B,M[1]=-B}}}var F=this.transformBuffer.getMatrixView(d);this.setTransformMatrix(r,F,c),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,a){var s=r.pstyle(a).value;switch(s){case"rectangle":return Zg;case"ellipse":return G0;case"roundrectangle":case"round-rectangle":return Zw;case"bottom-round-rectangle":return B0;default:return}}},{key:"_getCornerRadius",value:function(r,a,s){var c=s.w,l=s.h;if(r.pstyle(a).value==="auto")return Eh(c,l);var h=r.pstyle(a).pfValue,d=c/2,p=l/2;return Math.min(h,p,d)}},{key:"drawEdgeArrow",value:function(r,a,s){if(r.visible()){var c=r._private.rscratch,l,h,d;if(s==="source"?(l=c.arrowStartX,h=c.arrowStartY,d=c.srcArrowAngle):(l=c.arrowEndX,h=c.arrowEndY,d=c.tgtArrowAngle),!(isNaN(l)||l==null||isNaN(h)||h==null||isNaN(d)||d==null)){var p=r.pstyle(s+"-arrow-shape").value;if(p!=="none"){var b=r.pstyle(s+"-arrow-color").value,m=r.pstyle("opacity").value,w=r.pstyle("line-opacity").value,k=m*w,P=r.pstyle("width").pfValue,S=r.pstyle("arrow-scale").value,M=this.r.getArrowWidth(P,S),L=this.instanceCount,T=this.transformBuffer.getMatrixView(L);fB(T),Vw(T,T,[l,h]),ZP(T,T,[M,M]),hB(T,T,d),this.vertTypeBuffer.getView(L)[0]=KP;var j=this.indexBuffer.getView(L);qg(a,j);var I=this.colorBuffer.getView(L);rp(b,k,I),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,a){if(r.visible()){var s=this._getEdgePoints(r);if(s){var c=r.pstyle("opacity").value,l=r.pstyle("line-opacity").value,h=r.pstyle("width").pfValue,d=r.pstyle("line-color").value,p=c*l;if(s.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),s.length==4){var b=this.instanceCount;this.vertTypeBuffer.getView(b)[0]=dB;var m=this.indexBuffer.getView(b);qg(a,m);var w=this.colorBuffer.getView(b);rp(d,p,w);var k=this.lineWidthBuffer.getView(b);k[0]=h;var P=this.pointAPointBBuffer.getView(b);P[0]=s[0],P[1]=s[1],P[2]=s[2],P[3]=s[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var S=0;S<s.length-2;S+=2){var M=this.instanceCount;this.vertTypeBuffer.getView(M)[0]=pB;var L=this.indexBuffer.getView(M);qg(a,L);var T=this.colorBuffer.getView(M);rp(d,p,T);var j=this.lineWidthBuffer.getView(M);j[0]=h;var I=s[S-2],R=s[S-1],B=s[S],F=s[S+1],z=s[S+2],D=s[S+3],H=s[S+4],Q=s[S+5];S==0&&(I=2*B-z+.001,R=2*F-D+.001),S==s.length-4&&(H=2*z-B+.001,Q=2*D-F+.001);var q=this.pointAPointBBuffer.getView(M);q[0]=I,q[1]=R,q[2]=B,q[3]=F;var Z=this.pointCPointDBuffer.getView(M);Z[0]=z,Z[1]=D,Z[2]=H,Z[3]=Q,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(r){var a=r._private.rscratch;return!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))}},{key:"_getEdgePoints",value:function(r){var a=r._private.rscratch;if(this._isValidEdge(r)){var s=a.allpts;if(s.length==4)return s;var c=this._getNumSegments(r);return this._getCurveSegmentPoints(s,c)}}},{key:"_getNumSegments",value:function(r){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(r,a){if(r.length==4)return r;for(var s=Array((a+1)*2),c=0;c<=a;c++)if(c==0)s[0]=r[0],s[1]=r[1];else if(c==a)s[c*2]=r[r.length-2],s[c*2+1]=r[r.length-1];else{var l=c/a;this._setCurvePoint(r,l,s,c*2)}return s}},{key:"_setCurvePoint",value:function(r,a,s,c){if(r.length<=2)s[c]=r[0],s[c+1]=r[1];else{for(var l=Array(r.length-2),h=0;h<l.length;h+=2){var d=(1-a)*r[h]+a*r[h+2],p=(1-a)*r[h+1]+a*r[h+3];l[h]=d,l[h+1]=p}return this._setCurvePoint(l,a,s,c)}}},{key:"endBatch",value:function(){var r=this.gl,a=this.vao,s=this.vertexCount,c=this.instanceCount;if(c!==0){var l=this.renderTarget.picking?this.pickingProgram:this.program;r.useProgram(l),r.bindVertexArray(a);var h=Bs(this.buffers),d;try{for(h.s();!(d=h.n()).done;){var p=d.value;p.bufferSubData(c)}}catch(P){h.e(P)}finally{h.f()}for(var b=this.batchManager.getAtlases(),m=0;m<b.length;m++)b[m].bufferIfNeeded(r);for(var w=0;w<b.length;w++)r.activeTexture(r.TEXTURE0+w),r.bindTexture(r.TEXTURE_2D,b[w].texture),r.uniform1i(l.uTextures[w],w);r.uniform1f(l.uZoom,Jhe(this.r)),r.uniformMatrix3fv(l.uPanZoomMatrix,!1,this.panZoomMatrix),r.uniform1i(l.uAtlasSize,this.batchManager.getAtlasSize());var k=rp(this.bgColor,1);r.uniform4fv(l.uBGColor,k),r.drawArraysInstanced(r.TRIANGLES,0,s,c),r.bindVertexArray(null),r.bindTexture(r.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:c,atlasCount:b.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var r=this.atlasManager.getDebugInfo(),a=r.reduce(function(l,h){return l+h.atlasCount},0),s=this.batchDebugInfo,c=s.reduce(function(l,h){return l+h.count},0);return{atlasInfo:r,totalAtlases:a,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:s.length,batchInfo:s,totalInstances:c}}}])}(),gB={};gB.initWebgl=function(t,r){var a=this,s=a.data.contexts[a.WEBGL];t.bgColor=wde(a),t.webglTexSize=Math.min(t.webglTexSize,s.getParameter(s.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS)),a.webglDebug=t.webglDebug,a.webglDebugShowAtlases=t.webglDebugShowAtlases,a.pickingFrameBuffer=sde(s),a.pickingFrameBuffer.needsDraw=!0,a.drawing=new mde(a,s,t);var c=function(m){return function(w){return a.getTextAngle(w,m)}},l=function(m){return function(w){var k=w.pstyle(m);return k&&k.value}},h=function(m){return function(w){return w.pstyle("".concat(m,"-opacity")).value>0}},d=function(m){var w=m.pstyle("text-events").strValue==="yes";return w?qw.USE_BB:qw.IGNORE},p=function(m){var w=m.position(),k=w.x,P=w.y,S=m.outerWidth(),M=m.outerHeight();return{w:S,h:M,x1:k-S/2,y1:P-M/2}};a.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),a.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),a.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:r.getStyleKey,getBoundingBox:r.getElementBox,drawElement:r.drawElement}),a.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:p,isSimple:ede,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),a.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:p,isVisible:h("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),a.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:p,isVisible:h("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),a.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:d,getKey:QP(r.getLabelKey,null),getBoundingBox:WP(r.getLabelBox,null),drawClipped:!0,drawElement:r.drawLabel,getRotation:c(null),getRotationPoint:r.getLabelRotationPoint,getRotationOffset:r.getLabelRotationOffset,isVisible:l("label")}),a.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:d,getKey:QP(r.getSourceLabelKey,"source"),getBoundingBox:WP(r.getSourceLabelBox,"source"),drawClipped:!0,drawElement:r.drawSourceLabel,getRotation:c("source"),getRotationPoint:r.getSourceLabelRotationPoint,getRotationOffset:r.getSourceLabelRotationOffset,isVisible:l("source-label")}),a.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:d,getKey:QP(r.getTargetLabelKey,"target"),getBoundingBox:WP(r.getTargetLabelBox,"target"),drawClipped:!0,drawElement:r.drawTargetLabel,getRotation:c("target"),getRotationPoint:r.getTargetLabelRotationPoint,getRotationOffset:r.getTargetLabelRotationOffset,isVisible:l("target-label")});var b=f0(function(){console.log("garbage collect flag set"),a.data.gc=!0},1e4);a.onUpdateEleCalcs(function(m,w){var k=!1;w&&w.length>0&&(k|=a.drawing.invalidate(w)),k&&b()}),xde(a)};function wde(t){var r=t.cy.container(),a=r&&r.style&&r.style.backgroundColor||"white";return mO(a)}function bB(t,r){var a=t._private.rscratch;return Gs(a,"labelWrapCachedLines",r)||[]}var QP=function(t,r){return function(a){var s=t(a),c=bB(a,r);return c.length>1?c.map(function(l,h){return"".concat(s,"_").concat(h)}):s}},WP=function(t,r){return function(a,s){var c=t(a);if(typeof s=="string"){var l=s.indexOf("_");if(l>0){var h=Number(s.substring(l+1)),d=bB(a,r),p=c.h/d.length,b=p*h,m=c.y1+b;return{x1:c.x1,w:c.w,y1:m,h:p,yOffset:b}}}return c}};function xde(t){{var r=t.render;t.render=function(l){l=l||{};var h=t.cy;t.webgl&&(h.zoom()>QD?(kde(t),r.call(t,l)):(_de(t),yB(t,l,D0.SCREEN)))}}{var a=t.matchCanvasSize;t.matchCanvasSize=function(l){a.call(t,l),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(l,h,d,p){return Tde(t,l,h)};{var s=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){s.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var c=t.notify;t.notify=function(l,h){c.call(t,l,h),l==="viewport"||l==="bounds"?t.pickingFrameBuffer.needsDraw=!0:l==="background"&&t.drawing.invalidate(h,{type:"node-body"})}}}function kde(t){var r=t.data.contexts[t.WEBGL];r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT)}function _de(t){var r=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,t.canvasWidth,t.canvasHeight),a.restore()};r(t.data.contexts[t.NODE]),r(t.data.contexts[t.DRAG])}function Ede(t){var r=t.canvasWidth,a=t.canvasHeight,s=VP(t),c=s.pan,l=s.zoom,h=qP();Vw(h,h,[c.x,c.y]),ZP(h,h,[l,l]);var d=qP();cde(d,r,a);var p=qP();return ude(p,d,h),p}function vB(t,r){var a=t.canvasWidth,s=t.canvasHeight,c=VP(t),l=c.pan,h=c.zoom;r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,a,s),r.translate(l.x,l.y),r.scale(h,h)}function Cde(t,r){t.drawSelectionRectangle(r,function(a){return vB(t,a)})}function Pde(t){var r=t.data.contexts[t.NODE];r.save(),vB(t,r),r.strokeStyle="rgba(0, 0, 0, 0.3)",r.beginPath(),r.moveTo(-1e3,0),r.lineTo(1e3,0),r.stroke(),r.beginPath(),r.moveTo(0,-1e3),r.lineTo(0,1e3),r.stroke(),r.restore()}function Sde(t){var r=function(s,c,l){for(var h=s.atlasManager.getAtlasCollection(c),d=t.data.contexts[t.NODE],p=h.atlases,b=0;b<p.length;b++){var m=p[b],w=m.canvas;if(w){var k=w.width,P=w.height,S=k*b,M=w.height*l,L=.4;d.save(),d.scale(L,L),d.drawImage(w,S,M),d.strokeStyle="black",d.rect(S,M,k,P),d.stroke(),d.restore()}}},a=0;r(t.drawing,"node",a++),r(t.drawing,"label",a++)}function Nde(t,r,a,s,c){var l,h,d,p,b=VP(t),m=b.pan,w=b.zoom;{var k=Xhe(t,m,w,r,a),P=ja(k,2),S=P[0],M=P[1],L=6;l=S-L/2,h=M-L/2,d=L,p=L}if(d===0||p===0)return[];var T=t.data.contexts[t.WEBGL];T.bindFramebuffer(T.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(T.viewport(0,0,T.canvas.width,T.canvas.height),yB(t,null,D0.PICKING),t.pickingFrameBuffer.needsDraw=!1);var j=d*p,I=new Uint8Array(j*4);T.readPixels(l,h,d,p,T.RGBA,T.UNSIGNED_BYTE,I),T.bindFramebuffer(T.FRAMEBUFFER,null);for(var R=new Set,B=0;B<j;B++){var F=I.slice(B*4,B*4+4),z=nde(F)-1;z>=0&&R.add(z)}return R}function Tde(t,r,a){var s=Nde(t,r,a),c=t.getCachedZSortedEles(),l,h,d=Bs(s),p;try{for(d.s();!(p=d.n()).done;){var b=p.value,m=c[b];if(!l&&m.isNode()&&(l=m),!h&&m.isEdge()&&(h=m),l&&h)break}}catch(w){d.e(w)}finally{d.f()}return[l,h].filter(Boolean)}function JP(t,r,a){var s=t.drawing;r+=1,a.isNode()?(s.drawNode(a,r,"node-underlay"),s.drawNode(a,r,"node-body"),s.drawTexture(a,r,"label"),s.drawNode(a,r,"node-overlay")):(s.drawEdgeLine(a,r),s.drawEdgeArrow(a,r,"source"),s.drawEdgeArrow(a,r,"target"),s.drawTexture(a,r,"label"),s.drawTexture(a,r,"edge-source-label"),s.drawTexture(a,r,"edge-target-label"))}function yB(t,r,a){var s;t.webglDebug&&(s=performance.now());var c=t.drawing,l=0;if(a.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&Cde(t,r),t.data.canvasNeedsRedraw[t.NODE]||a.picking){var h=t.data.contexts[t.WEBGL];a.screen?(h.clearColor(0,0,0,0),h.enable(h.BLEND),h.blendFunc(h.ONE,h.ONE_MINUS_SRC_ALPHA)):h.disable(h.BLEND),h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT),h.viewport(0,0,h.canvas.width,h.canvas.height);var d=Ede(t),p=t.getCachedZSortedEles();if(l=p.length,c.startFrame(d,a),a.screen){for(var b=0;b<p.nondrag.length;b++)JP(t,b,p.nondrag[b]);for(var m=0;m<p.drag.length;m++)JP(t,m,p.drag[m])}else if(a.picking)for(var w=0;w<p.length;w++)JP(t,w,p[w]);c.endFrame(),a.screen&&t.webglDebugShowAtlases&&(Pde(t),Sde(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var k=performance.now(),P=!1,S=Math.ceil(k-s),M=c.getDebugInfo(),L=["".concat(l," elements"),"".concat(M.totalInstances," instances"),"".concat(M.batchCount," batches"),"".concat(M.totalAtlases," atlases"),"".concat(M.wrappedCount," wrapped textures"),"".concat(M.simpleCount," simple shapes")].join(", ");if(P)console.log("WebGL (".concat(a.name,") - time ").concat(S,"ms, ").concat(L));else{console.log("WebGL (".concat(a.name,") - frame time ").concat(S,"ms")),console.log("Totals:"),console.log(" ".concat(L)),console.log("Texture Atlases Used:");var T=M.atlasInfo,j=Bs(T),I;try{for(j.s();!(I=j.n()).done;){var R=I.value;console.log(" ".concat(R.type,": ").concat(R.keyCount," keys, ").concat(R.atlasCount," atlases"))}}catch(B){j.e(B)}finally{j.f()}console.log("")}}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,c.gc())}var Lh={};Lh.drawPolygonPath=function(t,r,a,s,c,l){var h=s/2,d=c/2;t.beginPath&&t.beginPath(),t.moveTo(r+h*l[0],a+d*l[1]);for(var p=1;p<l.length/2;p++)t.lineTo(r+h*l[p*2],a+d*l[p*2+1]);t.closePath()},Lh.drawRoundPolygonPath=function(t,r,a,s,c,l,h){h.forEach(function(d){return DD(t,d)}),t.closePath()},Lh.drawRoundRectanglePath=function(t,r,a,s,c,l){var h=s/2,d=c/2,p=l==="auto"?Eh(s,c):Math.min(l,d,h);t.beginPath&&t.beginPath(),t.moveTo(r,a-d),t.arcTo(r+h,a-d,r+h,a,p),t.arcTo(r+h,a+d,r,a+d,p),t.arcTo(r-h,a+d,r-h,a,p),t.arcTo(r-h,a-d,r,a-d,p),t.lineTo(r,a-d),t.closePath()},Lh.drawBottomRoundRectanglePath=function(t,r,a,s,c,l){var h=s/2,d=c/2,p=l==="auto"?Eh(s,c):l;t.beginPath&&t.beginPath(),t.moveTo(r,a-d),t.lineTo(r+h,a-d),t.lineTo(r+h,a),t.arcTo(r+h,a+d,r,a+d,p),t.arcTo(r-h,a+d,r-h,a,p),t.lineTo(r-h,a-d),t.lineTo(r,a-d),t.closePath()},Lh.drawCutRectanglePath=function(t,r,a,s,c,l,h){var d=s/2,p=c/2,b=h==="auto"?f3():h;t.beginPath&&t.beginPath(),t.moveTo(r-d+b,a-p),t.lineTo(r+d-b,a-p),t.lineTo(r+d,a-p+b),t.lineTo(r+d,a+p-b),t.lineTo(r+d-b,a+p),t.lineTo(r-d+b,a+p),t.lineTo(r-d,a+p-b),t.lineTo(r-d,a-p+b),t.closePath()},Lh.drawBarrelPath=function(t,r,a,s,c){var l=s/2,h=c/2,d=r-l,p=r+l,b=a-h,m=a+h,w=h3(s,c),k=w.widthOffset,P=w.heightOffset,S=w.ctrlPtOffsetPct*k;t.beginPath&&t.beginPath(),t.moveTo(d,b+P),t.lineTo(d,m-P),t.quadraticCurveTo(d+S,m,d+k,m),t.lineTo(p-k,m),t.quadraticCurveTo(p-S,m,p,m-P),t.lineTo(p,b+P),t.quadraticCurveTo(p-S,b,p-k,b),t.lineTo(d+k,b),t.quadraticCurveTo(d+S,b,d,b+P),t.closePath()};for(var mB=Math.sin(0),wB=Math.cos(0),XP={},eS={},xB=Math.PI/40,$g=0*Math.PI;$g<2*Math.PI;$g+=xB)XP[$g]=Math.sin($g),eS[$g]=Math.cos($g);Lh.drawEllipsePath=function(t,r,a,s,c){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(r,a,s/2,c/2,0,0,2*Math.PI);else for(var l,h,d=s/2,p=c/2,b=0*Math.PI;b<2*Math.PI;b+=xB)l=r-d*XP[b]*mB+d*eS[b]*wB,h=a+p*eS[b]*mB+p*XP[b]*wB,b===0?t.moveTo(l,h):t.lineTo(l,h);t.closePath()};var H0={};H0.createBuffer=function(t,r){var a=document.createElement("canvas");return a.width=t,a.height=r,[a,a.getContext("2d")]},H0.bufferCanvasImage=function(t){var r=this.cy,a=r.mutableElements(),s=a.boundingBox(),c=this.findContainerClientCoords(),l=t.full?Math.ceil(s.w):c[2],h=t.full?Math.ceil(s.h):c[3],d=Lt(t.maxWidth)||Lt(t.maxHeight),p=this.getPixelRatio(),b=1;if(t.scale!==void 0)l*=t.scale,h*=t.scale,b=t.scale;else if(d){var m=1/0,w=1/0;Lt(t.maxWidth)&&(m=b*t.maxWidth/l),Lt(t.maxHeight)&&(w=b*t.maxHeight/h),b=Math.min(m,w),l*=b,h*=b}d||(l*=p,h*=p,b*=p);var k=document.createElement("canvas");k.width=l,k.height=h,k.style.width=l+"px",k.style.height=h+"px";var P=k.getContext("2d");if(l>0&&h>0){P.clearRect(0,0,l,h),P.globalCompositeOperation="source-over";var S=this.getCachedZSortedEles();if(t.full)P.translate(-s.x1*b,-s.y1*b),P.scale(b,b),this.drawElements(P,S),P.scale(1/b,1/b),P.translate(s.x1*b,s.y1*b);else{var M=r.pan(),L={x:M.x*b,y:M.y*b};b*=r.zoom(),P.translate(L.x,L.y),P.scale(b,b),this.drawElements(P,S),P.scale(1/b,1/b),P.translate(-L.x,-L.y)}t.bg&&(P.globalCompositeOperation="destination-over",P.fillStyle=t.bg,P.rect(0,0,l,h),P.fill())}return k};function Mde(t,r){for(var a=atob(t),s=new ArrayBuffer(a.length),c=new Uint8Array(s),l=0;l<a.length;l++)c[l]=a.charCodeAt(l);return new Blob([s],{type:r})}function kB(t){var r=t.indexOf(",");return t.substr(r+1)}function _B(t,r,a){var s=function(){return r.toDataURL(a,t.quality)};switch(t.output){case"blob-promise":return new Ig(function(c,l){try{r.toBlob(function(h){h!=null?c(h):l(new Error("`canvas.toBlob()` sent a null value in its callback"))},a,t.quality)}catch(h){l(h)}});case"blob":return Mde(kB(s()),a);case"base64":return kB(s());case"base64uri":default:return s()}}H0.png=function(t){return _B(t,this.bufferCanvasImage(t),"image/png")},H0.jpg=function(t){return _B(t,this.bufferCanvasImage(t),"image/jpeg")};var EB={};EB.nodeShapeImpl=function(t,r,a,s,c,l,h,d){switch(t){case"ellipse":return this.drawEllipsePath(r,a,s,c,l);case"polygon":return this.drawPolygonPath(r,a,s,c,l,h);case"round-polygon":return this.drawRoundPolygonPath(r,a,s,c,l,h,d);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(r,a,s,c,l,d);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(r,a,s,c,l,h,d);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(r,a,s,c,l,d);case"barrel":return this.drawBarrelPath(r,a,s,c,l)}};var jde=CB,rr=CB.prototype;rr.CANVAS_LAYERS=3,rr.SELECT_BOX=0,rr.DRAG=1,rr.NODE=2,rr.WEBGL=3,rr.CANVAS_TYPES=["2d","2d","2d","webgl2"],rr.BUFFER_COUNT=3,rr.TEXTURE_BUFFER=0,rr.MOTIONBLUR_BUFFER_NODE=1,rr.MOTIONBLUR_BUFFER_DRAG=2;function CB(t){var r=this,a=r.cy.window(),s=a.document;t.webgl&&(rr.CANVAS_LAYERS=r.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),r.data={canvases:new Array(rr.CANVAS_LAYERS),contexts:new Array(rr.CANVAS_LAYERS),canvasNeedsRedraw:new Array(rr.CANVAS_LAYERS),bufferCanvases:new Array(rr.BUFFER_COUNT),bufferContexts:new Array(rr.CANVAS_LAYERS)};var c="-webkit-tap-highlight-color",l="rgba(0,0,0,0)";r.data.canvasContainer=s.createElement("div");var h=r.data.canvasContainer.style;r.data.canvasContainer.style[c]=l,h.position="relative",h.zIndex="0",h.overflow="hidden";var d=t.cy.container();d.appendChild(r.data.canvasContainer),d.style[c]=l;var p={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};Cse()&&(p["-ms-touch-action"]="none",p["touch-action"]="none");for(var b=0;b<rr.CANVAS_LAYERS;b++){var m=r.data.canvases[b]=s.createElement("canvas"),w=rr.CANVAS_TYPES[b];r.data.contexts[b]=m.getContext(w),r.data.contexts[b]||Ri("Could not create canvas of type "+w),Object.keys(p).forEach(function(Ne){m.style[Ne]=p[Ne]}),m.style.position="absolute",m.setAttribute("data-id","layer"+b),m.style.zIndex=String(rr.CANVAS_LAYERS-b),r.data.canvasContainer.appendChild(m),r.data.canvasNeedsRedraw[b]=!1}r.data.topCanvas=r.data.canvases[0],r.data.canvases[rr.NODE].setAttribute("data-id","layer"+rr.NODE+"-node"),r.data.canvases[rr.SELECT_BOX].setAttribute("data-id","layer"+rr.SELECT_BOX+"-selectbox"),r.data.canvases[rr.DRAG].setAttribute("data-id","layer"+rr.DRAG+"-drag"),r.data.canvases[rr.WEBGL]&&r.data.canvases[rr.WEBGL].setAttribute("data-id","layer"+rr.WEBGL+"-webgl");for(var b=0;b<rr.BUFFER_COUNT;b++)r.data.bufferCanvases[b]=s.createElement("canvas"),r.data.bufferContexts[b]=r.data.bufferCanvases[b].getContext("2d"),r.data.bufferCanvases[b].style.position="absolute",r.data.bufferCanvases[b].setAttribute("data-id","buffer"+b),r.data.bufferCanvases[b].style.zIndex=String(-b-1),r.data.bufferCanvases[b].style.visibility="hidden";r.pathsEnabled=!0;var k=ss(),P=function(Ne){return{x:(Ne.x1+Ne.x2)/2,y:(Ne.y1+Ne.y2)/2}},S=function(Ne){return{x:-Ne.w/2,y:-Ne.h/2}},M=function(Ne){var Me=Ne[0]._private,ke=Me.oldBackgroundTimestamp===Me.backgroundTimestamp;return!ke},L=function(Ne){return Ne[0]._private.nodeKey},T=function(Ne){return Ne[0]._private.labelStyleKey},j=function(Ne){return Ne[0]._private.sourceLabelStyleKey},I=function(Ne){return Ne[0]._private.targetLabelStyleKey},R=function(Ne,Me,ke,He,Qe){return r.drawElement(Ne,Me,ke,!1,!1,Qe)},B=function(Ne,Me,ke,He,Qe){return r.drawElementText(Ne,Me,ke,He,"main",Qe)},F=function(Ne,Me,ke,He,Qe){return r.drawElementText(Ne,Me,ke,He,"source",Qe)},z=function(Ne,Me,ke,He,Qe){return r.drawElementText(Ne,Me,ke,He,"target",Qe)},D=function(Ne){return Ne.boundingBox(),Ne[0]._private.bodyBounds},H=function(Ne){return Ne.boundingBox(),Ne[0]._private.labelBounds.main||k},Q=function(Ne){return Ne.boundingBox(),Ne[0]._private.labelBounds.source||k},q=function(Ne){return Ne.boundingBox(),Ne[0]._private.labelBounds.target||k},Z=function(Ne,Me){return Me},J=function(Ne){return P(D(Ne))},K=function(Ne,Me,ke){var He=Ne?Ne+"-":"";return{x:Me.x+ke.pstyle(He+"text-margin-x").pfValue,y:Me.y+ke.pstyle(He+"text-margin-y").pfValue}},ae=function(Ne,Me,ke){var He=Ne[0]._private.rscratch;return{x:He[Me],y:He[ke]}},se=function(Ne){return K("",ae(Ne,"labelX","labelY"),Ne)},le=function(Ne){return K("source",ae(Ne,"sourceLabelX","sourceLabelY"),Ne)},he=function(Ne){return K("target",ae(Ne,"targetLabelX","targetLabelY"),Ne)},fe=function(Ne){return S(D(Ne))},pe=function(Ne){return S(Q(Ne))},me=function(Ne){return S(q(Ne))},Te=function(Ne){var Me=H(Ne),ke=S(H(Ne));if(Ne.isNode()){switch(Ne.pstyle("text-halign").value){case"left":ke.x=-Me.w-(Me.leftPad||0);break;case"right":ke.x=-(Me.rightPad||0);break}switch(Ne.pstyle("text-valign").value){case"top":ke.y=-Me.h-(Me.topPad||0);break;case"bottom":ke.y=-(Me.botPad||0);break}}return ke},Oe=r.data.eleTxrCache=new L0(r,{getKey:L,doesEleInvalidateKey:M,drawElement:R,getBoundingBox:D,getRotationPoint:J,getRotationOffset:fe,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),ge=r.data.lblTxrCache=new L0(r,{getKey:T,drawElement:B,getBoundingBox:H,getRotationPoint:se,getRotationOffset:Te,isVisible:Z}),xe=r.data.slbTxrCache=new L0(r,{getKey:j,drawElement:F,getBoundingBox:Q,getRotationPoint:le,getRotationOffset:pe,isVisible:Z}),Se=r.data.tlbTxrCache=new L0(r,{getKey:I,drawElement:z,getBoundingBox:q,getRotationPoint:he,getRotationOffset:me,isVisible:Z}),Le=r.data.lyrTxrCache=new XD(r);r.onUpdateEleCalcs(function(Ne,Me){Oe.invalidateElements(Me),ge.invalidateElements(Me),xe.invalidateElements(Me),Se.invalidateElements(Me),Le.invalidateElements(Me);for(var ke=0;ke<Me.length;ke++){var He=Me[ke]._private;He.oldBackgroundTimestamp=He.backgroundTimestamp}});var De=function(Ne){for(var Me=0;Me<Ne.length;Me++)Le.enqueueElementRefinement(Ne[Me].ele)};Oe.onDequeue(De),ge.onDequeue(De),xe.onDequeue(De),Se.onDequeue(De),t.webgl&&r.initWebgl(t,{getStyleKey:L,getLabelKey:T,getSourceLabelKey:j,getTargetLabelKey:I,drawElement:R,drawLabel:B,drawSourceLabel:F,drawTargetLabel:z,getElementBox:D,getLabelBox:H,getSourceLabelBox:Q,getTargetLabelBox:q,getElementRotationPoint:J,getElementRotationOffset:fe,getLabelRotationPoint:se,getSourceLabelRotationPoint:le,getTargetLabelRotationPoint:he,getLabelRotationOffset:Te,getSourceLabelRotationOffset:pe,getTargetLabelRotationOffset:me})}rr.redrawHint=function(t,r){var a=this;switch(t){case"eles":a.data.canvasNeedsRedraw[rr.NODE]=r;break;case"drag":a.data.canvasNeedsRedraw[rr.DRAG]=r;break;case"select":a.data.canvasNeedsRedraw[rr.SELECT_BOX]=r;break;case"gc":a.data.gc=!0;break}};var Ade=typeof Path2D<"u";rr.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t},rr.usePaths=function(){return Ade&&this.pathsEnabled},rr.setImgSmoothing=function(t,r){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=r:(t.webkitImageSmoothingEnabled=r,t.mozImageSmoothingEnabled=r,t.msImageSmoothingEnabled=r)},rr.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},rr.makeOffscreenCanvas=function(t,r){var a;if((typeof OffscreenCanvas>"u"?"undefined":Za(OffscreenCanvas))!=="undefined")a=new OffscreenCanvas(t,r);else{var s=this.cy.window(),c=s.document;a=c.createElement("canvas"),a.width=t,a.height=r}return a},[tB,ll,yf,YP,np,Ih,cs,gB,Lh,H0,EB].forEach(function(t){gn(rr,t)});var Ide=[{name:"null",impl:ND},{name:"base",impl:ZD},{name:"canvas",impl:jde}],Lde=[{type:"layout",extensions:ahe},{type:"renderer",extensions:Ide}],PB={},SB={};function NB(t,r,a){var s=a,c=function(z){Gr("Can not register `"+r+"` for `"+t+"` since `"+z+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(M0.prototype[r])return c(r);M0.prototype[r]=a}else if(t==="collection"){if(jo.prototype[r])return c(r);jo.prototype[r]=a}else if(t==="layout"){for(var l=function(z){this.options=z,a.call(this,z),_r(this._private)||(this._private={}),this._private.cy=z.cy,this._private.listeners=[],this.createEmitter()},h=l.prototype=Object.create(a.prototype),d=[],p=0;p<d.length;p++){var b=d[p];h[b]=h[b]||function(){return this}}h.start&&!h.run?h.run=function(){return this.start(),this}:!h.start&&h.run&&(h.start=function(){return this.run(),this});var m=a.prototype.stop;h.stop=function(){var z=this.options;if(z&&z.animate){var D=this.animations;if(D)for(var H=0;H<D.length;H++)D[H].stop()}return m?m.call(this):this.emit("layoutstop"),this},h.destroy||(h.destroy=function(){return this}),h.cy=function(){return this._private.cy};var w=function(z){return z._private.cy},k={addEventFields:function(z,D){D.layout=z,D.cy=w(z),D.target=z},bubble:function(){return!0},parent:function(z){return w(z)}};gn(h,{createEmitter:function(){return this._private.emitter=new kw(k,this),this},emitter:function(){return this._private.emitter},on:function(z,D){return this.emitter().on(z,D),this},one:function(z,D){return this.emitter().one(z,D),this},once:function(z,D){return this.emitter().one(z,D),this},removeListener:function(z,D){return this.emitter().removeListener(z,D),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(z,D){return this.emitter().emit(z,D),this}}),Hr.eventAliasesOn(h),s=l}else if(t==="renderer"&&r!=="null"&&r!=="base"){var P=TB("renderer","base"),S=P.prototype,M=a,L=a.prototype,T=function(){P.apply(this,arguments),M.apply(this,arguments)},j=T.prototype;for(var I in S){var R=S[I],B=L[I]!=null;if(B)return c(I);j[I]=R}for(var F in L)j[F]=L[F];S.clientFunctions.forEach(function(z){j[z]=j[z]||function(){Ri("Renderer does not implement `renderer."+z+"()` on its prototype")}}),s=T}else if(t==="__proto__"||t==="constructor"||t==="prototype")return Ri(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return wO({map:PB,keys:[t,r],value:s})}function TB(t,r){return xO({map:PB,keys:[t,r]})}function Ode(t,r,a,s,c){return wO({map:SB,keys:[t,r,a,s],value:c})}function Rde(t,r,a,s){return xO({map:SB,keys:[t,r,a,s]})}var tS=function(){if(arguments.length===2)return TB.apply(null,arguments);if(arguments.length===3)return NB.apply(null,arguments);if(arguments.length===4)return Rde.apply(null,arguments);if(arguments.length===5)return Ode.apply(null,arguments);Ri("Invalid extension access syntax")};M0.prototype.extension=tS,Lde.forEach(function(t){t.extensions.forEach(function(r){NB(t.type,r.name,r.impl)})});var $w=function(){if(!(this instanceof $w))return new $w;this.length=0},ip=$w.prototype;ip.instanceString=function(){return"stylesheet"},ip.selector=function(t){var r=this.length++;return this[r]={selector:t,properties:[]},this},ip.css=function(t,r){var a=this.length-1;if(cn(t))this[a].properties.push({name:t,value:r});else if(_r(t))for(var s=t,c=Object.keys(s),l=0;l<c.length;l++){var h=c[l],d=s[h];if(d!=null){var p=go.properties[h]||go.properties[Qm(h)];if(p!=null){var b=p.name,m=d;this[a].properties.push({name:b,value:m})}}}return this},ip.style=ip.css,ip.generateStyle=function(t){var r=new go(t);return this.appendToStyle(r)},ip.appendToStyle=function(t){for(var r=0;r<this.length;r++){var a=this[r],s=a.selector,c=a.properties;t.selector(s);for(var l=0;l<c.length;l++){var h=c[l];t.css(h.name,h.value)}}return t};var Dde="3.33.1",Ru=function(t){if(t===void 0&&(t={}),_r(t))return new M0(t);if(cn(t))return tS.apply(tS,arguments)};Ru.use=function(t){var r=Array.prototype.slice.call(arguments,1);return r.unshift(Ru),t.apply(null,r),this},Ru.warnings=function(t){return VO(t)},Ru.version=Dde,Ru.stylesheet=Ru.Stylesheet=$w;var Kr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function z0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var MB={exports:{}},nS,jB;function Bde(){if(jB)return nS;jB=1;var t="Expected a function",r="__lodash_hash_undefined__",a="[object Function]",s="[object GeneratorFunction]",c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,h=typeof Kr=="object"&&Kr&&Kr.Object===Object&&Kr,d=typeof self=="object"&&self&&self.Object===Object&&self,p=h||d||Function("return this")();function b(ze,$e){return ze==null?void 0:ze[$e]}function m(ze){var $e=!1;if(ze!=null&&typeof ze.toString!="function")try{$e=!!(ze+"")}catch{}return $e}var w=Array.prototype,k=Function.prototype,P=Object.prototype,S=p["__core-js_shared__"],M=function(){var ze=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||"");return ze?"Symbol(src)_1."+ze:""}(),L=k.toString,T=P.hasOwnProperty,j=P.toString,I=RegExp("^"+L.call(T).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=w.splice,B=De(p,"Map"),F=De(Object,"create");function z(ze){var $e=-1,xt=ze?ze.length:0;for(this.clear();++$e<xt;){var st=ze[$e];this.set(st[0],st[1])}}function D(){this.__data__=F?F(null):{}}function H(ze){return this.has(ze)&&delete this.__data__[ze]}function Q(ze){var $e=this.__data__;if(F){var xt=$e[ze];return xt===r?void 0:xt}return T.call($e,ze)?$e[ze]:void 0}function q(ze){var $e=this.__data__;return F?$e[ze]!==void 0:T.call($e,ze)}function Z(ze,$e){var xt=this.__data__;return xt[ze]=F&&$e===void 0?r:$e,this}z.prototype.clear=D,z.prototype.delete=H,z.prototype.get=Q,z.prototype.has=q,z.prototype.set=Z;function J(ze){var $e=-1,xt=ze?ze.length:0;for(this.clear();++$e<xt;){var st=ze[$e];this.set(st[0],st[1])}}function K(){this.__data__=[]}function ae(ze){var $e=this.__data__,xt=xe($e,ze);if(xt<0)return!1;var st=$e.length-1;return xt==st?$e.pop():R.call($e,xt,1),!0}function se(ze){var $e=this.__data__,xt=xe($e,ze);return xt<0?void 0:$e[xt][1]}function le(ze){return xe(this.__data__,ze)>-1}function he(ze,$e){var xt=this.__data__,st=xe(xt,ze);return st<0?xt.push([ze,$e]):xt[st][1]=$e,this}J.prototype.clear=K,J.prototype.delete=ae,J.prototype.get=se,J.prototype.has=le,J.prototype.set=he;function fe(ze){var $e=-1,xt=ze?ze.length:0;for(this.clear();++$e<xt;){var st=ze[$e];this.set(st[0],st[1])}}function pe(){this.__data__={hash:new z,map:new(B||J),string:new z}}function me(ze){return Le(this,ze).delete(ze)}function Te(ze){return Le(this,ze).get(ze)}function Oe(ze){return Le(this,ze).has(ze)}function ge(ze,$e){return Le(this,ze).set(ze,$e),this}fe.prototype.clear=pe,fe.prototype.delete=me,fe.prototype.get=Te,fe.prototype.has=Oe,fe.prototype.set=ge;function xe(ze,$e){for(var xt=ze.length;xt--;)if(Qe(ze[xt][0],$e))return xt;return-1}function Se(ze){if(!ft(ze)||Me(ze))return!1;var $e=it(ze)||m(ze)?I:l;return $e.test(ke(ze))}function Le(ze,$e){var xt=ze.__data__;return Ne($e)?xt[typeof $e=="string"?"string":"hash"]:xt.map}function De(ze,$e){var xt=b(ze,$e);return Se(xt)?xt:void 0}function Ne(ze){var $e=typeof ze;return $e=="string"||$e=="number"||$e=="symbol"||$e=="boolean"?ze!=="__proto__":ze===null}function Me(ze){return!!M&&M in ze}function ke(ze){if(ze!=null){try{return L.call(ze)}catch{}try{return ze+""}catch{}}return""}function He(ze,$e){if(typeof ze!="function"||$e&&typeof $e!="function")throw new TypeError(t);var xt=function(){var st=arguments,Rt=$e?$e.apply(this,st):st[0],It=xt.cache;if(It.has(Rt))return It.get(Rt);var Dt=ze.apply(this,st);return xt.cache=It.set(Rt,Dt),Dt};return xt.cache=new(He.Cache||fe),xt}He.Cache=fe;function Qe(ze,$e){return ze===$e||ze!==ze&&$e!==$e}function it(ze){var $e=ft(ze)?j.call(ze):"";return $e==a||$e==s}function ft(ze){var $e=typeof ze;return!!ze&&($e=="object"||$e=="function")}return nS=He,nS}var rS,AB;function Gde(){if(AB)return rS;AB=1;var t="Expected a function",r=NaN,a="[object Symbol]",s=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt,p=typeof Kr=="object"&&Kr&&Kr.Object===Object&&Kr,b=typeof self=="object"&&self&&self.Object===Object&&self,m=p||b||Function("return this")(),w=Object.prototype,k=w.toString,P=Math.max,S=Math.min,M=function(){return m.Date.now()};function L(F,z,D){var H,Q,q,Z,J,K,ae=0,se=!1,le=!1,he=!0;if(typeof F!="function")throw new TypeError(t);z=B(z)||0,j(D)&&(se=!!D.leading,le="maxWait"in D,q=le?P(B(D.maxWait)||0,z):q,he="trailing"in D?!!D.trailing:he);function fe(De){var Ne=H,Me=Q;return H=Q=void 0,ae=De,Z=F.apply(Me,Ne),Z}function pe(De){return ae=De,J=setTimeout(Oe,z),se?fe(De):Z}function me(De){var Ne=De-K,Me=De-ae,ke=z-Ne;return le?S(ke,q-Me):ke}function Te(De){var Ne=De-K,Me=De-ae;return K===void 0||Ne>=z||Ne<0||le&&Me>=q}function Oe(){var De=M();if(Te(De))return ge(De);J=setTimeout(Oe,me(De))}function ge(De){return J=void 0,he&&H?fe(De):(H=Q=void 0,Z)}function xe(){J!==void 0&&clearTimeout(J),ae=0,H=K=Q=J=void 0}function Se(){return J===void 0?Z:ge(M())}function Le(){var De=M(),Ne=Te(De);if(H=arguments,Q=this,K=De,Ne){if(J===void 0)return pe(K);if(le)return J=setTimeout(Oe,z),fe(K)}return J===void 0&&(J=setTimeout(Oe,z)),Z}return Le.cancel=xe,Le.flush=Se,Le}function T(F,z,D){var H=!0,Q=!0;if(typeof F!="function")throw new TypeError(t);return j(D)&&(H="leading"in D?!!D.leading:H,Q="trailing"in D?!!D.trailing:Q),L(F,z,{leading:H,maxWait:z,trailing:Q})}function j(F){var z=typeof F;return!!F&&(z=="object"||z=="function")}function I(F){return!!F&&typeof F=="object"}function R(F){return typeof F=="symbol"||I(F)&&k.call(F)==a}function B(F){if(typeof F=="number")return F;if(R(F))return r;if(j(F)){var z=typeof F.valueOf=="function"?F.valueOf():F;F=j(z)?z+"":z}if(typeof F!="string")return F===0?F:+F;F=F.replace(s,"");var D=l.test(F);return D||h.test(F)?d(F.slice(2),D?2:8):c.test(F)?r:+F}return rS=T,rS}(function(t,r){(function(a,s){t.exports=s(Bde(),Gde())})(Kr,function(a,s){return function(c){var l={};function h(d){if(l[d])return l[d].exports;var p=l[d]={i:d,l:!1,exports:{}};return c[d].call(p.exports,p,p.exports,h),p.l=!0,p.exports}return h.m=c,h.c=l,h.i=function(d){return d},h.d=function(d,p,b){h.o(d,p)||Object.defineProperty(d,p,{configurable:!1,enumerable:!0,get:b})},h.n=function(d){var p=d&&d.__esModule?function(){return d.default}:function(){return d};return h.d(p,"a",p),p},h.o=function(d,p){return Object.prototype.hasOwnProperty.call(d,p)},h.p="",h(h.s=12)}([function(c,l,h){c.exports=Object.assign!=null?Object.assign.bind(Object):function(d){for(var p=arguments.length,b=Array(p>1?p-1:0),m=1;m<p;m++)b[m-1]=arguments[m];return b.filter(function(w){return w!=null}).forEach(function(w){Object.keys(w).forEach(function(k){return d[k]=w[k]})}),d}},function(c,l,h){var d=h(10),p=h(0);c.exports=function(b){var m=this;return new d(p({cy:m},b))}},function(c,l,h){function d(){if(this.saveGestureState(),this.cy.zoomingEnabled(!1).panningEnabled(!1).boxSelectionEnabled(!1),this.options.disableBrowserGestures){var m=this.windowListenerOptions;window.addEventListener("touchstart",this.preventDefault,m),window.addEventListener("touchmove",this.preventDefault,m),window.addEventListener("wheel",this.preventDefault,m)}return this}function p(){if(this.cy.zoomingEnabled(this.lastZoomingEnabled).panningEnabled(this.lastPanningEnabled).boxSelectionEnabled(this.lastBoxSelectionEnabled),this.options.disableBrowserGestures){var m=this.windowListenerOptions;window.removeEventListener("touchstart",this.preventDefault,m),window.removeEventListener("touchmove",this.preventDefault,m),window.removeEventListener("wheel",this.preventDefault,m)}return this}function b(){var m=this.cy;return this.lastPanningEnabled=m.panningEnabled(),this.lastZoomingEnabled=m.zoomingEnabled(),this.lastBoxSelectionEnabled=m.boxSelectionEnabled(),this}c.exports={disableGestures:d,resetGestures:p,saveGestureState:b}},function(c,l,h){function d(){var p=this,b=this.cy,m=this.options;return this.addListener(b,"drag",function(){return p.grabbingNode=!0}),this.addListener(b,"free",function(){return p.grabbingNode=!1}),this.addListener(b,"tapstart","node",function(w){var k=w.target;p.drawMode&&p.start(k)}),this.addListener(b,"tapdrag",function(w){p.update(w.position)}),this.addListener(b,"tapdragover","node",function(w){m.snap||p.preview(w.target)}),this.addListener(b,"tapdragout","node",function(w){m.snap||p.unpreview(w.target)}),this.addListener(b,"tapend",function(){p.stop()}),this}c.exports={addCytoscapeListeners:d}},function(c,l,h){var d={canConnect:function(p,b){return!p.same(b)},edgeParams:function(p,b){return{}},hoverDelay:150,snap:!0,snapThreshold:50,snapFrequency:15,noEdgeEventsInDraw:!0,disableBrowserGestures:!0};c.exports=d},function(c,l,h){function d(m){var w=this.cy;return this.drawMode=m??!this.drawMode,this.drawMode?(this.prevUngrabifyState=w.autoungrabify(),w.autoungrabify(!0),this.emit("drawon")):(w.autoungrabify(this.prevUngrabifyState),this.emit("drawoff")),this}function p(){return this.toggleDrawMode(!0)}function b(){return this.toggleDrawMode(!1)}c.exports={toggleDrawMode:d,enableDrawMode:p,disableDrawMode:b}},function(c,l,h){var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},p=h(0),b=function(T){return(typeof T>"u"?"undefined":d(T))===d("")},m=function(T){return(typeof T>"u"?"undefined":d(T))===d([])&&T.length!=null};function w(T,j,I){var R={};return p(R,j,T),p(R.data,j.data,T.data),b(j.classes)?R.classes=j.classes+" "+I:m(j.classes)?R.classes=j.classes.join(" ")+" "+I:R.classes=I,R}function k(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,j=this.cy;this.options;var I=this.presumptiveTargets,R=this.previewEles,B=this.active,F=this.sourceNode,z=this.targetNode,D=T?"eh-preview":"",H=j.collection(),Q=this.canConnect(z);if(B&&Q){if(!z||z.size()===0){R.remove(),this.emit("cancel",this.mp(),F,I);return}if(!T){R.removeClass("eh-preview").style("events",""),this.emit("complete",this.mp(),F,z,R);return}var q=j.add(w({group:"edges",data:{source:F.id(),target:z.id()}},this.edgeParams(z),D));return H=H.merge(q),T?(this.previewEles=H,H.style("events","no")):(H.style("events",""),this.emit("complete",this.mp(),F,z,H)),this}}function P(){return this.makeEdges(!0),this}function S(){return this.previewEles.nonempty()&&this.previewEles.inside()}function M(){return this.previewShown()&&this.previewEles.remove(),this}function L(){var T=this,j=this.sourceNode,I=this.ghostNode,R=this.cy,B=this.mx,F=this.my,z=B,D=F,H=void 0,Q=void 0;if(j)return(!I||I.length===0||I.removed())&&(Q=this.ghostEles=R.collection(),R.batch(function(){I=T.ghostNode=R.add({group:"nodes",classes:"eh-ghost eh-ghost-node",position:{x:0,y:0}}),I.style({"background-color":"blue",width:1e-4,height:1e-4,opacity:0,events:"no"});var q={};H=R.add(p({},q,{group:"edges",data:p({},q.data,{source:j.id(),target:I.id()}),classes:"eh-ghost eh-ghost-edge"})),H.style({events:"no"})}),Q.merge(I).merge(H)),I.position({x:z,y:D}),this}c.exports={makeEdges:k,makePreview:P,removePreview:M,previewShown:S,updateEdge:L}},function(c,l,h){function d(){return this.options.noEdgeEventsInDraw&&this.cy.edges().style("events","no"),this}function p(){return this.options.noEdgeEventsInDraw&&this.cy.edges().style("events",""),this}c.exports={disableEdgeEvents:d,enableEdgeEvents:p}},function(c,l,h){function d(){return this.enabled=!0,this.emit("enable"),this}function p(){return this.enabled=!1,this.emit("disable"),this}c.exports={enable:d,disable:p}},function(c,l,h){var d=h(13),p=Math.sqrt(2);function b(j){var I=this.previewEles,R=this.ghostEles,B=function(q){return I.anySame(q)},F=function(q){return R.anySame(q)},z=function(q){return B(q)||F(q)},D=this.enabled,H=this.active,Q=this.grabbingNode;return D&&!H&&!Q&&j!=null&&j.nonempty()&&!z(j)}function m(j){return this.canStartOn(j)&&this.drawMode}function w(j){return this.canStartOn(j)&&!this.drawMode}function k(j){var I=this;if(this.canStartOn(j)){this.active=!0,this.sourceNode=j,this.sourceNode.addClass("eh-source"),this.disableGestures(),this.disableEdgeEvents();var R=function(B){return B.id()};this.canConnect=d(function(B){return I.options.canConnect(I.sourceNode,B)},R),this.edgeParams=d(function(B){return I.options.edgeParams(I.sourceNode,B)},R),this.emit("start",this.hp(),j)}}function P(j){if(this.active){var I=j;return this.mx=I.x,this.my=I.y,this.updateEdge(),this.throttledSnap(),this}}function S(){if(!this.active||!this.options.snap)return!1;var j=this.cy,I=this.targetNode,R=this.options.snapThreshold,B=this.mp(),F=this.previewEles,z=this.ghostNode,D=function(ge){return p*Math.max(ge.outerWidth(),ge.outerHeight())/2},H=function(ge,xe,Se,Le){var De=Se-ge,Ne=Le-xe;return De*De+Ne*Ne},Q=function(ge,xe){return H(ge.x,ge.y,xe.x,xe.y)},q=function(ge){return Q(ge.position(),B)},Z=function(ge){var xe=D(ge),Se=xe+R;return Se*Se},J=function(ge){return q(ge)<=Z(ge)},K=function(ge){var xe=ge.position(),Se=ge.outerWidth()/2,Le=ge.outerHeight()/2,De=xe.x,Ne=xe.y,Me=B.x,ke=B.y,He=De-Se,Qe=De+Se,it=Ne-Le,ft=Ne+Le,ze=He<=Me&&Me<=Qe,$e=it<=ke&&ke<=ft;if(ze&&$e)return 0;if(ze){var xt=ke-it,st=ke-ft;return Math.min(xt*xt,st*st)}else if($e){var Rt=Me-He,It=Me-Qe;return Math.min(Rt*Rt,It*It)}else return Me<He&&ke<it?H(Me,ke,He,it):Me>Qe&&ke<it?H(Me,ke,Qe,it):Me<He&&ke>ft?H(Me,ke,He,ft):H(Me,ke,Qe,ft)},ae=function(ge,xe){return K(ge)-K(xe)},se=ae,le=!1,he=function(ge){var xe=B,Se=ge.outerWidth(),Le=Se/2,De=ge.outerHeight(),Ne=De/2,Me=ge.position(),ke=Me.x-Le,He=Me.x+Le,Qe=Me.y-Ne,it=Me.y+Ne;return ke<=xe.x&&xe.x<=He&&Qe<=xe.y&&xe.y<=it},fe=function(ge){return ge.same(F)||ge.same(z)},pe=j.nodes(function(ge){return!fe(ge)&&J(ge)}).sort(se),me=!1;I.nonempty()&&!J(I)&&this.unpreview(I);for(var Te=0;Te<pe.length;Te++){var Oe=pe[Te];if(!(Oe.isParent()&&he(Oe))&&!(Oe.isChild()&&!he(Oe.parent()))&&(Oe.same(I)||this.preview(Oe,le))){me=!0;break}}return me}function M(j){var I=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,B=this.options,F=this.sourceNode,z=this.ghostNode,D=this.ghostEles,H=this.presumptiveTargets,Q=this.previewEles,q=this.active,Z=F,J=j.same(z),K=!this.canConnect(j),ae=j.same(this.targetNode);if(!q||J||K||ae)return!1;this.targetNode.nonempty()&&this.unpreview(this.targetNode),clearTimeout(this.previewTimeout);var se=function(){I.targetNode=j,H.merge(j),j.addClass("eh-presumptive-target"),j.addClass("eh-target"),I.emit("hoverover",I.mp(),Z,j),j.addClass("eh-preview"),D.addClass("eh-preview-active"),F.addClass("eh-preview-active"),j.addClass("eh-preview-active"),I.makePreview(),I.emit("previewon",I.mp(),Z,j,Q)};return R&&B.hoverDelay>0?this.previewTimeout=setTimeout(se,B.hoverDelay):se(),!0}function L(j){if(this.active){var I=this.previewTimeout,R=this.sourceNode,B=this.previewEles,F=this.ghostEles,z=this.cy;clearTimeout(I),this.previewTimeout=null;var D=R;return j.removeClass("eh-preview eh-target eh-presumptive-target eh-preview-active"),F.removeClass("eh-preview-active"),R.removeClass("eh-preview-active"),this.targetNode=z.collection(),this.removePreview(D,j),this.emit("hoverout",this.mp(),D,j),this.emit("previewoff",this.mp(),D,j,B),this}}function T(){if(this.active){var j=this.sourceNode,I=this.targetNode,R=this.ghostEles,B=this.presumptiveTargets;return clearTimeout(this.previewTimeout),j.removeClass("eh-source eh-preview-active"),I.removeClass("eh-target eh-preview eh-hover eh-preview-active"),B.removeClass("eh-presumptive-target"),this.makeEdges(),R.remove(),this.clearCollections(),this.resetGestures(),this.enableEdgeEvents(),this.active=!1,this.emit("stop",this.mp(),j),this}}c.exports={start:k,update:P,preview:M,unpreview:L,stop:T,snap:S,canStartOn:b,canStartDrawModeOn:m,canStartNonDrawModeOn:w}},function(c,l,h){var d=h(4),p=h(0),b=h(14),m=h(2),w=h(3),k=h(5),P=h(6),S=h(8),M=h(9),L=h(11),T=h(7);function j(B){var F=B.cy;this.cy=F,this.listeners=[],this.enabled=!0,this.drawMode=!1,this.active=!1,this.grabbingNode=!1,this.clearCollections(),this.mx=0,this.my=0,this.options=p({},d,B),this.saveGestureState(),this.addListeners(),this.throttledSnap=b(this.snap.bind(this),1e3/B.snapFrequency),this.preventDefault=function(H){return H.preventDefault()},this.canConnect=function(){return!1};var z=!1;try{var D=Object.defineProperty({},"passive",{get:function(){z=!0}});window.addEventListener("test",null,D)}catch{}z?this.windowListenerOptions={capture:!0,passive:!1}:this.windowListenerOptions=!0}var I=j.prototype={},R=function(B){return p(I,B)};I.destroy=function(){this.removeListeners()},I.setOptions=function(B){p(this.options,B)},I.mp=function(){return{x:this.mx,y:this.my}},I.hp=function(){return{x:this.hx,y:this.hy}},I.clearCollections=function(){var B=this.cy;this.previewEles=B.collection(),this.ghostEles=B.collection(),this.ghostNode=B.collection(),this.sourceNode=B.collection(),this.targetNode=B.collection(),this.presumptiveTargets=B.collection()},[m,w,k,P,S,M,L,T].forEach(R),c.exports=j},function(c,l,h){var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M};function p(){var M=this;return this.addCytoscapeListeners(),this.addListener(this.cy,"destroy",function(){return M.destroy()}),this}function b(){for(var M=this.listeners.length-1;M>=0;M--){var L=this.listeners[M];this.removeListener(L.target,L.event,L.selector,L.callback,L.options)}return this}function m(M,L,T,j,I){return(typeof T>"u"?"undefined":d(T))!==d("")&&(j=T,I=j,T=null),I==null&&(I=!1),{target:M,event:L,selector:T,callback:j,options:I}}function w(M){return M instanceof Element}function k(M,L,T,j,I){var R=m(M,L,T,j,I);return this.listeners.push(R),w(R.target)?R.target.addEventListener(R.event,R.callback,R.options):R.selector?R.target.addListener(R.event,R.selector,R.callback,R.options):R.target.addListener(R.event,R.callback,R.options),this}function P(M,L,T,j,I){for(var R=m(M,L,T,j,I),B=this.listeners.length-1;B>=0;B--){var F=this.listeners[B];if(R.target===F.target&&R.event===F.event&&(R.selector==null||R.selector===F.selector)&&(R.callback==null||R.callback===F.callback)){this.listeners.splice(B,1),w(R.target)?R.target.removeEventListener(R.event,R.callback,R.options):R.selector?R.target.removeListener(R.event,R.selector,R.callback,R.options):R.target.removeListener(R.event,R.callback,R.options);break}}return this}function S(M,L){for(var T=this.cy,j=arguments.length,I=Array(j>2?j-2:0),R=2;R<j;R++)I[R-2]=arguments[R];return T.emit({type:"eh"+M,position:L},I),this}c.exports={addListener:k,addListeners:p,removeListener:P,removeListeners:b,emit:S}},function(c,l,h){var d=h(1),p=function(b){b&&b("core","edgehandles",d)};typeof cytoscape<"u"&&p(cytoscape),c.exports=p},function(c,l){c.exports=a},function(c,l){c.exports=s}])})})(MB);var Hde=MB.exports;const zde=z0(Hde);var IB={exports:{}};function iS(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var aS,LB;function Fde(){if(LB)return aS;LB=1;function t(){this.__data__=[],this.size=0}return aS=t,aS}var oS,OB;function Kg(){if(OB)return oS;OB=1;function t(r,a){return r===a||r!==r&&a!==a}return oS=t,oS}var sS,RB;function Kw(){if(RB)return sS;RB=1;var t=Kg();function r(a,s){for(var c=a.length;c--;)if(t(a[c][0],s))return c;return-1}return sS=r,sS}var uS,DB;function Ude(){if(DB)return uS;DB=1;var t=Kw(),r=Array.prototype,a=r.splice;function s(c){var l=this.__data__,h=t(l,c);if(h<0)return!1;var d=l.length-1;return h==d?l.pop():a.call(l,h,1),--this.size,!0}return uS=s,uS}var cS,BB;function Yde(){if(BB)return cS;BB=1;var t=Kw();function r(a){var s=this.__data__,c=t(s,a);return c<0?void 0:s[c][1]}return cS=r,cS}var lS,GB;function Vde(){if(GB)return lS;GB=1;var t=Kw();function r(a){return t(this.__data__,a)>-1}return lS=r,lS}var fS,HB;function qde(){if(HB)return fS;HB=1;var t=Kw();function r(a,s){var c=this.__data__,l=t(c,a);return l<0?(++this.size,c.push([a,s])):c[l][1]=s,this}return fS=r,fS}var hS,zB;function Qw(){if(zB)return hS;zB=1;var t=Fde(),r=Ude(),a=Yde(),s=Vde(),c=qde();function l(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return l.prototype.clear=t,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,hS=l,hS}var dS,FB;function Zde(){if(FB)return dS;FB=1;var t=Qw();function r(){this.__data__=new t,this.size=0}return dS=r,dS}var pS,UB;function $de(){if(UB)return pS;UB=1;function t(r){var a=this.__data__,s=a.delete(r);return this.size=a.size,s}return pS=t,pS}var gS,YB;function Kde(){if(YB)return gS;YB=1;function t(r){return this.__data__.get(r)}return gS=t,gS}var bS,VB;function Qde(){if(VB)return bS;VB=1;function t(r){return this.__data__.has(r)}return bS=t,bS}var vS,qB;function ZB(){if(qB)return vS;qB=1;var t=typeof Kr=="object"&&Kr&&Kr.Object===Object&&Kr;return vS=t,vS}var yS,$B;function pc(){if($B)return yS;$B=1;var t=ZB(),r=typeof self=="object"&&self&&self.Object===Object&&self,a=t||r||Function("return this")();return yS=a,yS}var mS,KB;function Qg(){if(KB)return mS;KB=1;var t=pc(),r=t.Symbol;return mS=r,mS}var wS,QB;function Wde(){if(QB)return wS;QB=1;var t=Qg(),r=Object.prototype,a=r.hasOwnProperty,s=r.toString,c=t?t.toStringTag:void 0;function l(h){var d=a.call(h,c),p=h[c];try{h[c]=void 0;var b=!0}catch{}var m=s.call(h);return b&&(d?h[c]=p:delete h[c]),m}return wS=l,wS}var xS,WB;function Jde(){if(WB)return xS;WB=1;var t=Object.prototype,r=t.toString;function a(s){return r.call(s)}return xS=a,xS}var kS,JB;function ap(){if(JB)return kS;JB=1;var t=Qg(),r=Wde(),a=Jde(),s="[object Null]",c="[object Undefined]",l=t?t.toStringTag:void 0;function h(d){return d==null?d===void 0?c:s:l&&l in Object(d)?r(d):a(d)}return kS=h,kS}var _S,XB;function Du(){if(XB)return _S;XB=1;function t(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}return _S=t,_S}var ES,eG;function F0(){if(eG)return ES;eG=1;var t=ap(),r=Du(),a="[object AsyncFunction]",s="[object Function]",c="[object GeneratorFunction]",l="[object Proxy]";function h(d){if(!r(d))return!1;var p=t(d);return p==s||p==c||p==a||p==l}return ES=h,ES}var CS,tG;function Xde(){if(tG)return CS;tG=1;var t=pc(),r=t["__core-js_shared__"];return CS=r,CS}var PS,nG;function epe(){if(nG)return PS;nG=1;var t=Xde(),r=function(){var s=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}();function a(s){return!!r&&r in s}return PS=a,PS}var SS,rG;function iG(){if(rG)return SS;rG=1;var t=Function.prototype,r=t.toString;function a(s){if(s!=null){try{return r.call(s)}catch{}try{return s+""}catch{}}return""}return SS=a,SS}var NS,aG;function tpe(){if(aG)return NS;aG=1;var t=F0(),r=epe(),a=Du(),s=iG(),c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,h=Function.prototype,d=Object.prototype,p=h.toString,b=d.hasOwnProperty,m=RegExp("^"+p.call(b).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w(k){if(!a(k)||r(k))return!1;var P=t(k)?m:l;return P.test(s(k))}return NS=w,NS}var TS,oG;function npe(){if(oG)return TS;oG=1;function t(r,a){return r==null?void 0:r[a]}return TS=t,TS}var MS,sG;function op(){if(sG)return MS;sG=1;var t=tpe(),r=npe();function a(s,c){var l=r(s,c);return t(l)?l:void 0}return MS=a,MS}var jS,uG;function AS(){if(uG)return jS;uG=1;var t=op(),r=pc(),a=t(r,"Map");return jS=a,jS}var IS,cG;function Ww(){if(cG)return IS;cG=1;var t=op(),r=t(Object,"create");return IS=r,IS}var LS,lG;function rpe(){if(lG)return LS;lG=1;var t=Ww();function r(){this.__data__=t?t(null):{},this.size=0}return LS=r,LS}var OS,fG;function ipe(){if(fG)return OS;fG=1;function t(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}return OS=t,OS}var RS,hG;function ape(){if(hG)return RS;hG=1;var t=Ww(),r="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;function c(l){var h=this.__data__;if(t){var d=h[l];return d===r?void 0:d}return s.call(h,l)?h[l]:void 0}return RS=c,RS}var DS,dG;function ope(){if(dG)return DS;dG=1;var t=Ww(),r=Object.prototype,a=r.hasOwnProperty;function s(c){var l=this.__data__;return t?l[c]!==void 0:a.call(l,c)}return DS=s,DS}var BS,pG;function spe(){if(pG)return BS;pG=1;var t=Ww(),r="__lodash_hash_undefined__";function a(s,c){var l=this.__data__;return this.size+=this.has(s)?0:1,l[s]=t&&c===void 0?r:c,this}return BS=a,BS}var GS,gG;function upe(){if(gG)return GS;gG=1;var t=rpe(),r=ipe(),a=ape(),s=ope(),c=spe();function l(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return l.prototype.clear=t,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,GS=l,GS}var HS,bG;function cpe(){if(bG)return HS;bG=1;var t=upe(),r=Qw(),a=AS();function s(){this.size=0,this.__data__={hash:new t,map:new(a||r),string:new t}}return HS=s,HS}var zS,vG;function lpe(){if(vG)return zS;vG=1;function t(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}return zS=t,zS}var FS,yG;function Jw(){if(yG)return FS;yG=1;var t=lpe();function r(a,s){var c=a.__data__;return t(s)?c[typeof s=="string"?"string":"hash"]:c.map}return FS=r,FS}var US,mG;function fpe(){if(mG)return US;mG=1;var t=Jw();function r(a){var s=t(this,a).delete(a);return this.size-=s?1:0,s}return US=r,US}var YS,wG;function hpe(){if(wG)return YS;wG=1;var t=Jw();function r(a){return t(this,a).get(a)}return YS=r,YS}var VS,xG;function dpe(){if(xG)return VS;xG=1;var t=Jw();function r(a){return t(this,a).has(a)}return VS=r,VS}var qS,kG;function ppe(){if(kG)return qS;kG=1;var t=Jw();function r(a,s){var c=t(this,a),l=c.size;return c.set(a,s),this.size+=c.size==l?0:1,this}return qS=r,qS}var ZS,_G;function $S(){if(_G)return ZS;_G=1;var t=cpe(),r=fpe(),a=hpe(),s=dpe(),c=ppe();function l(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return l.prototype.clear=t,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,ZS=l,ZS}var KS,EG;function gpe(){if(EG)return KS;EG=1;var t=Qw(),r=AS(),a=$S(),s=200;function c(l,h){var d=this.__data__;if(d instanceof t){var p=d.__data__;if(!r||p.length<s-1)return p.push([l,h]),this.size=++d.size,this;d=this.__data__=new a(p)}return d.set(l,h),this.size=d.size,this}return KS=c,KS}var QS,CG;function Xw(){if(CG)return QS;CG=1;var t=Qw(),r=Zde(),a=$de(),s=Kde(),c=Qde(),l=gpe();function h(d){var p=this.__data__=new t(d);this.size=p.size}return h.prototype.clear=r,h.prototype.delete=a,h.prototype.get=s,h.prototype.has=c,h.prototype.set=l,QS=h,QS}var WS,PG;function JS(){if(PG)return WS;PG=1;function t(r,a){for(var s=-1,c=r==null?0:r.length;++s<c&&a(r[s],s,r)!==!1;);return r}return WS=t,WS}var XS,SG;function NG(){if(SG)return XS;SG=1;var t=op(),r=function(){try{var a=t(Object,"defineProperty");return a({},"",{}),a}catch{}}();return XS=r,XS}var e5,TG;function e2(){if(TG)return e5;TG=1;var t=NG();function r(a,s,c){s=="__proto__"&&t?t(a,s,{configurable:!0,enumerable:!0,value:c,writable:!0}):a[s]=c}return e5=r,e5}var t5,MG;function t2(){if(MG)return t5;MG=1;var t=e2(),r=Kg(),a=Object.prototype,s=a.hasOwnProperty;function c(l,h,d){var p=l[h];(!(s.call(l,h)&&r(p,d))||d===void 0&&!(h in l))&&t(l,h,d)}return t5=c,t5}var n5,jG;function U0(){if(jG)return n5;jG=1;var t=t2(),r=e2();function a(s,c,l,h){var d=!l;l||(l={});for(var p=-1,b=c.length;++p<b;){var m=c[p],w=h?h(l[m],s[m],m,l,s):void 0;w===void 0&&(w=s[m]),d?r(l,m,w):t(l,m,w)}return l}return n5=a,n5}var r5,AG;function bpe(){if(AG)return r5;AG=1;function t(r,a){for(var s=-1,c=Array(r);++s<r;)c[s]=a(s);return c}return r5=t,r5}var i5,IG;function hl(){if(IG)return i5;IG=1;function t(r){return r!=null&&typeof r=="object"}return i5=t,i5}var a5,LG;function vpe(){if(LG)return a5;LG=1;var t=ap(),r=hl(),a="[object Arguments]";function s(c){return r(c)&&t(c)==a}return a5=s,a5}var o5,OG;function Y0(){if(OG)return o5;OG=1;var t=vpe(),r=hl(),a=Object.prototype,s=a.hasOwnProperty,c=a.propertyIsEnumerable,l=t(function(){return arguments}())?t:function(h){return r(h)&&s.call(h,"callee")&&!c.call(h,"callee")};return o5=l,o5}var s5,RG;function Ia(){if(RG)return s5;RG=1;var t=Array.isArray;return s5=t,s5}var n2={exports:{}},u5,DG;function ype(){if(DG)return u5;DG=1;function t(){return!1}return u5=t,u5}n2.exports;var BG;function Wg(){return BG||(BG=1,function(t,r){var a=pc(),s=ype(),c=r&&!r.nodeType&&r,l=c&&!0&&t&&!t.nodeType&&t,h=l&&l.exports===c,d=h?a.Buffer:void 0,p=d?d.isBuffer:void 0,b=p||s;t.exports=b}(n2,n2.exports)),n2.exports}var c5,GG;function r2(){if(GG)return c5;GG=1;var t=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function a(s,c){var l=typeof s;return c=c??t,!!c&&(l=="number"||l!="symbol"&&r.test(s))&&s>-1&&s%1==0&&s<c}return c5=a,c5}var l5,HG;function f5(){if(HG)return l5;HG=1;var t=9007199254740991;function r(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=t}return l5=r,l5}var h5,zG;function mpe(){if(zG)return h5;zG=1;var t=ap(),r=f5(),a=hl(),s="[object Arguments]",c="[object Array]",l="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",b="[object Map]",m="[object Number]",w="[object Object]",k="[object RegExp]",P="[object Set]",S="[object String]",M="[object WeakMap]",L="[object ArrayBuffer]",T="[object DataView]",j="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",B="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",D="[object Uint8ClampedArray]",H="[object Uint16Array]",Q="[object Uint32Array]",q={};q[j]=q[I]=q[R]=q[B]=q[F]=q[z]=q[D]=q[H]=q[Q]=!0,q[s]=q[c]=q[L]=q[l]=q[T]=q[h]=q[d]=q[p]=q[b]=q[m]=q[w]=q[k]=q[P]=q[S]=q[M]=!1;function Z(J){return a(J)&&r(J.length)&&!!q[t(J)]}return h5=Z,h5}var d5,FG;function i2(){if(FG)return d5;FG=1;function t(r){return function(a){return r(a)}}return d5=t,d5}var a2={exports:{}};a2.exports;var UG;function p5(){return UG||(UG=1,function(t,r){var a=ZB(),s=r&&!r.nodeType&&r,c=s&&!0&&t&&!t.nodeType&&t,l=c&&c.exports===s,h=l&&a.process,d=function(){try{var p=c&&c.require&&c.require("util").types;return p||h&&h.binding&&h.binding("util")}catch{}}();t.exports=d}(a2,a2.exports)),a2.exports}var g5,YG;function V0(){if(YG)return g5;YG=1;var t=mpe(),r=i2(),a=p5(),s=a&&a.isTypedArray,c=s?r(s):t;return g5=c,g5}var b5,VG;function qG(){if(VG)return b5;VG=1;var t=bpe(),r=Y0(),a=Ia(),s=Wg(),c=r2(),l=V0(),h=Object.prototype,d=h.hasOwnProperty;function p(b,m){var w=a(b),k=!w&&r(b),P=!w&&!k&&s(b),S=!w&&!k&&!P&&l(b),M=w||k||P||S,L=M?t(b.length,String):[],T=L.length;for(var j in b)(m||d.call(b,j))&&!(M&&(j=="length"||P&&(j=="offset"||j=="parent")||S&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||c(j,T)))&&L.push(j);return L}return b5=p,b5}var v5,ZG;function o2(){if(ZG)return v5;ZG=1;var t=Object.prototype;function r(a){var s=a&&a.constructor,c=typeof s=="function"&&s.prototype||t;return a===c}return v5=r,v5}var y5,$G;function KG(){if($G)return y5;$G=1;function t(r,a){return function(s){return r(a(s))}}return y5=t,y5}var m5,QG;function wpe(){if(QG)return m5;QG=1;var t=KG(),r=t(Object.keys,Object);return m5=r,m5}var w5,WG;function x5(){if(WG)return w5;WG=1;var t=o2(),r=wpe(),a=Object.prototype,s=a.hasOwnProperty;function c(l){if(!t(l))return r(l);var h=[];for(var d in Object(l))s.call(l,d)&&d!="constructor"&&h.push(d);return h}return w5=c,w5}var k5,JG;function mf(){if(JG)return k5;JG=1;var t=F0(),r=f5();function a(s){return s!=null&&r(s.length)&&!t(s)}return k5=a,k5}var _5,XG;function Oh(){if(XG)return _5;XG=1;var t=qG(),r=x5(),a=mf();function s(c){return a(c)?t(c):r(c)}return _5=s,_5}var E5,eH;function xpe(){if(eH)return E5;eH=1;var t=U0(),r=Oh();function a(s,c){return s&&t(c,r(c),s)}return E5=a,E5}var C5,tH;function kpe(){if(tH)return C5;tH=1;function t(r){var a=[];if(r!=null)for(var s in Object(r))a.push(s);return a}return C5=t,C5}var P5,nH;function _pe(){if(nH)return P5;nH=1;var t=Du(),r=o2(),a=kpe(),s=Object.prototype,c=s.hasOwnProperty;function l(h){if(!t(h))return a(h);var d=r(h),p=[];for(var b in h)b=="constructor"&&(d||!c.call(h,b))||p.push(b);return p}return P5=l,P5}var S5,rH;function sp(){if(rH)return S5;rH=1;var t=qG(),r=_pe(),a=mf();function s(c){return a(c)?t(c,!0):r(c)}return S5=s,S5}var N5,iH;function Epe(){if(iH)return N5;iH=1;var t=U0(),r=sp();function a(s,c){return s&&t(c,r(c),s)}return N5=a,N5}var s2={exports:{}};s2.exports;var aH;function oH(){return aH||(aH=1,function(t,r){var a=pc(),s=r&&!r.nodeType&&r,c=s&&!0&&t&&!t.nodeType&&t,l=c&&c.exports===s,h=l?a.Buffer:void 0,d=h?h.allocUnsafe:void 0;function p(b,m){if(m)return b.slice();var w=b.length,k=d?d(w):new b.constructor(w);return b.copy(k),k}t.exports=p}(s2,s2.exports)),s2.exports}var T5,sH;function uH(){if(sH)return T5;sH=1;function t(r,a){var s=-1,c=r.length;for(a||(a=Array(c));++s<c;)a[s]=r[s];return a}return T5=t,T5}var M5,cH;function lH(){if(cH)return M5;cH=1;function t(r,a){for(var s=-1,c=r==null?0:r.length,l=0,h=[];++s<c;){var d=r[s];a(d,s,r)&&(h[l++]=d)}return h}return M5=t,M5}var j5,fH;function hH(){if(fH)return j5;fH=1;function t(){return[]}return j5=t,j5}var A5,dH;function I5(){if(dH)return A5;dH=1;var t=lH(),r=hH(),a=Object.prototype,s=a.propertyIsEnumerable,c=Object.getOwnPropertySymbols,l=c?function(h){return h==null?[]:(h=Object(h),t(c(h),function(d){return s.call(h,d)}))}:r;return A5=l,A5}var L5,pH;function Cpe(){if(pH)return L5;pH=1;var t=U0(),r=I5();function a(s,c){return t(s,r(s),c)}return L5=a,L5}var O5,gH;function R5(){if(gH)return O5;gH=1;function t(r,a){for(var s=-1,c=a.length,l=r.length;++s<c;)r[l+s]=a[s];return r}return O5=t,O5}var D5,bH;function u2(){if(bH)return D5;bH=1;var t=KG(),r=t(Object.getPrototypeOf,Object);return D5=r,D5}var B5,vH;function yH(){if(vH)return B5;vH=1;var t=R5(),r=u2(),a=I5(),s=hH(),c=Object.getOwnPropertySymbols,l=c?function(h){for(var d=[];h;)t(d,a(h)),h=r(h);return d}:s;return B5=l,B5}var G5,mH;function Ppe(){if(mH)return G5;mH=1;var t=U0(),r=yH();function a(s,c){return t(s,r(s),c)}return G5=a,G5}var H5,wH;function xH(){if(wH)return H5;wH=1;var t=R5(),r=Ia();function a(s,c,l){var h=c(s);return r(s)?h:t(h,l(s))}return H5=a,H5}var z5,kH;function _H(){if(kH)return z5;kH=1;var t=xH(),r=I5(),a=Oh();function s(c){return t(c,a,r)}return z5=s,z5}var F5,EH;function Spe(){if(EH)return F5;EH=1;var t=xH(),r=yH(),a=sp();function s(c){return t(c,a,r)}return F5=s,F5}var U5,CH;function Npe(){if(CH)return U5;CH=1;var t=op(),r=pc(),a=t(r,"DataView");return U5=a,U5}var Y5,PH;function Tpe(){if(PH)return Y5;PH=1;var t=op(),r=pc(),a=t(r,"Promise");return Y5=a,Y5}var V5,SH;function NH(){if(SH)return V5;SH=1;var t=op(),r=pc(),a=t(r,"Set");return V5=a,V5}var q5,TH;function Mpe(){if(TH)return q5;TH=1;var t=op(),r=pc(),a=t(r,"WeakMap");return q5=a,q5}var Z5,MH;function Jg(){if(MH)return Z5;MH=1;var t=Npe(),r=AS(),a=Tpe(),s=NH(),c=Mpe(),l=ap(),h=iG(),d="[object Map]",p="[object Object]",b="[object Promise]",m="[object Set]",w="[object WeakMap]",k="[object DataView]",P=h(t),S=h(r),M=h(a),L=h(s),T=h(c),j=l;return(t&&j(new t(new ArrayBuffer(1)))!=k||r&&j(new r)!=d||a&&j(a.resolve())!=b||s&&j(new s)!=m||c&&j(new c)!=w)&&(j=function(I){var R=l(I),B=R==p?I.constructor:void 0,F=B?h(B):"";if(F)switch(F){case P:return k;case S:return d;case M:return b;case L:return m;case T:return w}return R}),Z5=j,Z5}var $5,jH;function jpe(){if(jH)return $5;jH=1;var t=Object.prototype,r=t.hasOwnProperty;function a(s){var c=s.length,l=new s.constructor(c);return c&&typeof s[0]=="string"&&r.call(s,"index")&&(l.index=s.index,l.input=s.input),l}return $5=a,$5}var K5,AH;function IH(){if(AH)return K5;AH=1;var t=pc(),r=t.Uint8Array;return K5=r,K5}var Q5,LH;function W5(){if(LH)return Q5;LH=1;var t=IH();function r(a){var s=new a.constructor(a.byteLength);return new t(s).set(new t(a)),s}return Q5=r,Q5}var J5,OH;function Ape(){if(OH)return J5;OH=1;var t=W5();function r(a,s){var c=s?t(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}return J5=r,J5}var X5,RH;function Ipe(){if(RH)return X5;RH=1;var t=/\w*$/;function r(a){var s=new a.constructor(a.source,t.exec(a));return s.lastIndex=a.lastIndex,s}return X5=r,X5}var e4,DH;function Lpe(){if(DH)return e4;DH=1;var t=Qg(),r=t?t.prototype:void 0,a=r?r.valueOf:void 0;function s(c){return a?Object(a.call(c)):{}}return e4=s,e4}var t4,BH;function GH(){if(BH)return t4;BH=1;var t=W5();function r(a,s){var c=s?t(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}return t4=r,t4}var n4,HH;function Ope(){if(HH)return n4;HH=1;var t=W5(),r=Ape(),a=Ipe(),s=Lpe(),c=GH(),l="[object Boolean]",h="[object Date]",d="[object Map]",p="[object Number]",b="[object RegExp]",m="[object Set]",w="[object String]",k="[object Symbol]",P="[object ArrayBuffer]",S="[object DataView]",M="[object Float32Array]",L="[object Float64Array]",T="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",R="[object Uint8Array]",B="[object Uint8ClampedArray]",F="[object Uint16Array]",z="[object Uint32Array]";function D(H,Q,q){var Z=H.constructor;switch(Q){case P:return t(H);case l:case h:return new Z(+H);case S:return r(H,q);case M:case L:case T:case j:case I:case R:case B:case F:case z:return c(H,q);case d:return new Z;case p:case w:return new Z(H);case b:return a(H);case m:return new Z;case k:return s(H)}}return n4=D,n4}var r4,zH;function FH(){if(zH)return r4;zH=1;var t=Du(),r=Object.create,a=function(){function s(){}return function(c){if(!t(c))return{};if(r)return r(c);s.prototype=c;var l=new s;return s.prototype=void 0,l}}();return r4=a,r4}var i4,UH;function YH(){if(UH)return i4;UH=1;var t=FH(),r=u2(),a=o2();function s(c){return typeof c.constructor=="function"&&!a(c)?t(r(c)):{}}return i4=s,i4}var a4,VH;function Rpe(){if(VH)return a4;VH=1;var t=Jg(),r=hl(),a="[object Map]";function s(c){return r(c)&&t(c)==a}return a4=s,a4}var o4,qH;function Dpe(){if(qH)return o4;qH=1;var t=Rpe(),r=i2(),a=p5(),s=a&&a.isMap,c=s?r(s):t;return o4=c,o4}var s4,ZH;function Bpe(){if(ZH)return s4;ZH=1;var t=Jg(),r=hl(),a="[object Set]";function s(c){return r(c)&&t(c)==a}return s4=s,s4}var u4,$H;function Gpe(){if($H)return u4;$H=1;var t=Bpe(),r=i2(),a=p5(),s=a&&a.isSet,c=s?r(s):t;return u4=c,u4}var c4,KH;function QH(){if(KH)return c4;KH=1;var t=Xw(),r=JS(),a=t2(),s=xpe(),c=Epe(),l=oH(),h=uH(),d=Cpe(),p=Ppe(),b=_H(),m=Spe(),w=Jg(),k=jpe(),P=Ope(),S=YH(),M=Ia(),L=Wg(),T=Dpe(),j=Du(),I=Gpe(),R=Oh(),B=sp(),F=1,z=2,D=4,H="[object Arguments]",Q="[object Array]",q="[object Boolean]",Z="[object Date]",J="[object Error]",K="[object Function]",ae="[object GeneratorFunction]",se="[object Map]",le="[object Number]",he="[object Object]",fe="[object RegExp]",pe="[object Set]",me="[object String]",Te="[object Symbol]",Oe="[object WeakMap]",ge="[object ArrayBuffer]",xe="[object DataView]",Se="[object Float32Array]",Le="[object Float64Array]",De="[object Int8Array]",Ne="[object Int16Array]",Me="[object Int32Array]",ke="[object Uint8Array]",He="[object Uint8ClampedArray]",Qe="[object Uint16Array]",it="[object Uint32Array]",ft={};ft[H]=ft[Q]=ft[ge]=ft[xe]=ft[q]=ft[Z]=ft[Se]=ft[Le]=ft[De]=ft[Ne]=ft[Me]=ft[se]=ft[le]=ft[he]=ft[fe]=ft[pe]=ft[me]=ft[Te]=ft[ke]=ft[He]=ft[Qe]=ft[it]=!0,ft[J]=ft[K]=ft[Oe]=!1;function ze($e,xt,st,Rt,It,Dt){var Ut,bn=xt&F,sn=xt&z,ir=xt&D;if(st&&(Ut=It?st($e,Rt,It,Dt):st($e)),Ut!==void 0)return Ut;if(!j($e))return $e;var U=M($e);if(U){if(Ut=k($e),!bn)return h($e,Ut)}else{var ne=w($e),ue=ne==K||ne==ae;if(L($e))return l($e,bn);if(ne==he||ne==H||ue&&!It){if(Ut=sn||ue?{}:S($e),!bn)return sn?p($e,c(Ut,$e)):d($e,s(Ut,$e))}else{if(!ft[ne])return It?$e:{};Ut=P($e,ne,bn)}}Dt||(Dt=new t);var we=Dt.get($e);if(we)return we;Dt.set($e,Ut),I($e)?$e.forEach(function(Pe){Ut.add(ze(Pe,xt,st,Pe,$e,Dt))}):T($e)&&$e.forEach(function(Pe,Fe){Ut.set(Fe,ze(Pe,xt,st,Fe,$e,Dt))});var Ae=ir?sn?m:b:sn?B:R,ie=U?void 0:Ae($e);return r(ie||$e,function(Pe,Fe){ie&&(Fe=Pe,Pe=$e[Fe]),a(Ut,Fe,ze(Pe,xt,st,Fe,$e,Dt))}),Ut}return c4=ze,c4}var l4,WH;function Hpe(){if(WH)return l4;WH=1;var t=QH(),r=4;function a(s){return t(s,r)}return l4=a,l4}var f4,JH;function h4(){if(JH)return f4;JH=1;function t(r){return function(){return r}}return f4=t,f4}var d4,XH;function zpe(){if(XH)return d4;XH=1;function t(r){return function(a,s,c){for(var l=-1,h=Object(a),d=c(a),p=d.length;p--;){var b=d[r?p:++l];if(s(h[b],b,h)===!1)break}return a}}return d4=t,d4}var p4,ez;function g4(){if(ez)return p4;ez=1;var t=zpe(),r=t();return p4=r,p4}var b4,tz;function v4(){if(tz)return b4;tz=1;var t=g4(),r=Oh();function a(s,c){return s&&t(s,c,r)}return b4=a,b4}var y4,nz;function Fpe(){if(nz)return y4;nz=1;var t=mf();function r(a,s){return function(c,l){if(c==null)return c;if(!t(c))return a(c,l);for(var h=c.length,d=s?h:-1,p=Object(c);(s?d--:++d<h)&&l(p[d],d,p)!==!1;);return c}}return y4=r,y4}var m4,rz;function c2(){if(rz)return m4;rz=1;var t=v4(),r=Fpe(),a=r(t);return m4=a,m4}var w4,iz;function up(){if(iz)return w4;iz=1;function t(r){return r}return w4=t,w4}var x4,az;function oz(){if(az)return x4;az=1;var t=up();function r(a){return typeof a=="function"?a:t}return x4=r,x4}var k4,sz;function uz(){if(sz)return k4;sz=1;var t=JS(),r=c2(),a=oz(),s=Ia();function c(l,h){var d=s(l)?t:r;return d(l,a(h))}return k4=c,k4}var cz,lz;function fz(){return lz||(lz=1,cz=uz()),cz}var _4,hz;function Upe(){if(hz)return _4;hz=1;var t=c2();function r(a,s){var c=[];return t(a,function(l,h,d){s(l,h,d)&&c.push(l)}),c}return _4=r,_4}var E4,dz;function Ype(){if(dz)return E4;dz=1;var t="__lodash_hash_undefined__";function r(a){return this.__data__.set(a,t),this}return E4=r,E4}var C4,pz;function Vpe(){if(pz)return C4;pz=1;function t(r){return this.__data__.has(r)}return C4=t,C4}var P4,gz;function bz(){if(gz)return P4;gz=1;var t=$S(),r=Ype(),a=Vpe();function s(c){var l=-1,h=c==null?0:c.length;for(this.__data__=new t;++l<h;)this.add(c[l])}return s.prototype.add=s.prototype.push=r,s.prototype.has=a,P4=s,P4}var S4,vz;function qpe(){if(vz)return S4;vz=1;function t(r,a){for(var s=-1,c=r==null?0:r.length;++s<c;)if(a(r[s],s,r))return!0;return!1}return S4=t,S4}var N4,yz;function mz(){if(yz)return N4;yz=1;function t(r,a){return r.has(a)}return N4=t,N4}var T4,wz;function xz(){if(wz)return T4;wz=1;var t=bz(),r=qpe(),a=mz(),s=1,c=2;function l(h,d,p,b,m,w){var k=p&s,P=h.length,S=d.length;if(P!=S&&!(k&&S>P))return!1;var M=w.get(h),L=w.get(d);if(M&&L)return M==d&&L==h;var T=-1,j=!0,I=p&c?new t:void 0;for(w.set(h,d),w.set(d,h);++T<P;){var R=h[T],B=d[T];if(b)var F=k?b(B,R,T,d,h,w):b(R,B,T,h,d,w);if(F!==void 0){if(F)continue;j=!1;break}if(I){if(!r(d,function(z,D){if(!a(I,D)&&(R===z||m(R,z,p,b,w)))return I.push(D)})){j=!1;break}}else if(!(R===B||m(R,B,p,b,w))){j=!1;break}}return w.delete(h),w.delete(d),j}return T4=l,T4}var M4,kz;function Zpe(){if(kz)return M4;kz=1;function t(r){var a=-1,s=Array(r.size);return r.forEach(function(c,l){s[++a]=[l,c]}),s}return M4=t,M4}var j4,_z;function A4(){if(_z)return j4;_z=1;function t(r){var a=-1,s=Array(r.size);return r.forEach(function(c){s[++a]=c}),s}return j4=t,j4}var I4,Ez;function $pe(){if(Ez)return I4;Ez=1;var t=Qg(),r=IH(),a=Kg(),s=xz(),c=Zpe(),l=A4(),h=1,d=2,p="[object Boolean]",b="[object Date]",m="[object Error]",w="[object Map]",k="[object Number]",P="[object RegExp]",S="[object Set]",M="[object String]",L="[object Symbol]",T="[object ArrayBuffer]",j="[object DataView]",I=t?t.prototype:void 0,R=I?I.valueOf:void 0;function B(F,z,D,H,Q,q,Z){switch(D){case j:if(F.byteLength!=z.byteLength||F.byteOffset!=z.byteOffset)return!1;F=F.buffer,z=z.buffer;case T:return!(F.byteLength!=z.byteLength||!q(new r(F),new r(z)));case p:case b:case k:return a(+F,+z);case m:return F.name==z.name&&F.message==z.message;case P:case M:return F==z+"";case w:var J=c;case S:var K=H&h;if(J||(J=l),F.size!=z.size&&!K)return!1;var ae=Z.get(F);if(ae)return ae==z;H|=d,Z.set(F,z);var se=s(J(F),J(z),H,Q,q,Z);return Z.delete(F),se;case L:if(R)return R.call(F)==R.call(z)}return!1}return I4=B,I4}var L4,Cz;function Kpe(){if(Cz)return L4;Cz=1;var t=_H(),r=1,a=Object.prototype,s=a.hasOwnProperty;function c(l,h,d,p,b,m){var w=d&r,k=t(l),P=k.length,S=t(h),M=S.length;if(P!=M&&!w)return!1;for(var L=P;L--;){var T=k[L];if(!(w?T in h:s.call(h,T)))return!1}var j=m.get(l),I=m.get(h);if(j&&I)return j==h&&I==l;var R=!0;m.set(l,h),m.set(h,l);for(var B=w;++L<P;){T=k[L];var F=l[T],z=h[T];if(p)var D=w?p(z,F,T,h,l,m):p(F,z,T,l,h,m);if(!(D===void 0?F===z||b(F,z,d,p,m):D)){R=!1;break}B||(B=T=="constructor")}if(R&&!B){var H=l.constructor,Q=h.constructor;H!=Q&&"constructor"in l&&"constructor"in h&&!(typeof H=="function"&&H instanceof H&&typeof Q=="function"&&Q instanceof Q)&&(R=!1)}return m.delete(l),m.delete(h),R}return L4=c,L4}var O4,Pz;function Qpe(){if(Pz)return O4;Pz=1;var t=Xw(),r=xz(),a=$pe(),s=Kpe(),c=Jg(),l=Ia(),h=Wg(),d=V0(),p=1,b="[object Arguments]",m="[object Array]",w="[object Object]",k=Object.prototype,P=k.hasOwnProperty;function S(M,L,T,j,I,R){var B=l(M),F=l(L),z=B?m:c(M),D=F?m:c(L);z=z==b?w:z,D=D==b?w:D;var H=z==w,Q=D==w,q=z==D;if(q&&h(M)){if(!h(L))return!1;B=!0,H=!1}if(q&&!H)return R||(R=new t),B||d(M)?r(M,L,T,j,I,R):a(M,L,z,T,j,I,R);if(!(T&p)){var Z=H&&P.call(M,"__wrapped__"),J=Q&&P.call(L,"__wrapped__");if(Z||J){var K=Z?M.value():M,ae=J?L.value():L;return R||(R=new t),I(K,ae,T,j,R)}}return q?(R||(R=new t),s(M,L,T,j,I,R)):!1}return O4=S,O4}var R4,Sz;function Nz(){if(Sz)return R4;Sz=1;var t=Qpe(),r=hl();function a(s,c,l,h,d){return s===c?!0:s==null||c==null||!r(s)&&!r(c)?s!==s&&c!==c:t(s,c,l,h,a,d)}return R4=a,R4}var D4,Tz;function Wpe(){if(Tz)return D4;Tz=1;var t=Xw(),r=Nz(),a=1,s=2;function c(l,h,d,p){var b=d.length,m=b,w=!p;if(l==null)return!m;for(l=Object(l);b--;){var k=d[b];if(w&&k[2]?k[1]!==l[k[0]]:!(k[0]in l))return!1}for(;++b<m;){k=d[b];var P=k[0],S=l[P],M=k[1];if(w&&k[2]){if(S===void 0&&!(P in l))return!1}else{var L=new t;if(p)var T=p(S,M,P,l,h,L);if(!(T===void 0?r(M,S,a|s,p,L):T))return!1}}return!0}return D4=c,D4}var B4,Mz;function jz(){if(Mz)return B4;Mz=1;var t=Du();function r(a){return a===a&&!t(a)}return B4=r,B4}var G4,Az;function Jpe(){if(Az)return G4;Az=1;var t=jz(),r=Oh();function a(s){for(var c=r(s),l=c.length;l--;){var h=c[l],d=s[h];c[l]=[h,d,t(d)]}return c}return G4=a,G4}var H4,Iz;function Lz(){if(Iz)return H4;Iz=1;function t(r,a){return function(s){return s==null?!1:s[r]===a&&(a!==void 0||r in Object(s))}}return H4=t,H4}var z4,Oz;function Xpe(){if(Oz)return z4;Oz=1;var t=Wpe(),r=Jpe(),a=Lz();function s(c){var l=r(c);return l.length==1&&l[0][2]?a(l[0][0],l[0][1]):function(h){return h===c||t(h,c,l)}}return z4=s,z4}var F4,Rz;function Xg(){if(Rz)return F4;Rz=1;var t=ap(),r=hl(),a="[object Symbol]";function s(c){return typeof c=="symbol"||r(c)&&t(c)==a}return F4=s,F4}var U4,Dz;function Y4(){if(Dz)return U4;Dz=1;var t=Ia(),r=Xg(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function c(l,h){if(t(l))return!1;var d=typeof l;return d=="number"||d=="symbol"||d=="boolean"||l==null||r(l)?!0:s.test(l)||!a.test(l)||h!=null&&l in Object(h)}return U4=c,U4}var V4,Bz;function ege(){if(Bz)return V4;Bz=1;var t=$S(),r="Expected a function";function a(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new TypeError(r);var l=function(){var h=arguments,d=c?c.apply(this,h):h[0],p=l.cache;if(p.has(d))return p.get(d);var b=s.apply(this,h);return l.cache=p.set(d,b)||p,b};return l.cache=new(a.Cache||t),l}return a.Cache=t,V4=a,V4}var q4,Gz;function tge(){if(Gz)return q4;Gz=1;var t=ege(),r=500;function a(s){var c=t(s,function(h){return l.size===r&&l.clear(),h}),l=c.cache;return c}return q4=a,q4}var Z4,Hz;function nge(){if(Hz)return Z4;Hz=1;var t=tge(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=t(function(c){var l=[];return c.charCodeAt(0)===46&&l.push(""),c.replace(r,function(h,d,p,b){l.push(p?b.replace(a,"$1"):d||h)}),l});return Z4=s,Z4}var $4,zz;function l2(){if(zz)return $4;zz=1;function t(r,a){for(var s=-1,c=r==null?0:r.length,l=Array(c);++s<c;)l[s]=a(r[s],s,r);return l}return $4=t,$4}var K4,Fz;function rge(){if(Fz)return K4;Fz=1;var t=Qg(),r=l2(),a=Ia(),s=Xg(),c=t?t.prototype:void 0,l=c?c.toString:void 0;function h(d){if(typeof d=="string")return d;if(a(d))return r(d,h)+"";if(s(d))return l?l.call(d):"";var p=d+"";return p=="0"&&1/d==-1/0?"-0":p}return K4=h,K4}var Q4,Uz;function Yz(){if(Uz)return Q4;Uz=1;var t=rge();function r(a){return a==null?"":t(a)}return Q4=r,Q4}var W4,Vz;function f2(){if(Vz)return W4;Vz=1;var t=Ia(),r=Y4(),a=nge(),s=Yz();function c(l,h){return t(l)?l:r(l,h)?[l]:a(s(l))}return W4=c,W4}var J4,qz;function q0(){if(qz)return J4;qz=1;var t=Xg();function r(a){if(typeof a=="string"||t(a))return a;var s=a+"";return s=="0"&&1/a==-1/0?"-0":s}return J4=r,J4}var X4,Zz;function h2(){if(Zz)return X4;Zz=1;var t=f2(),r=q0();function a(s,c){c=t(c,s);for(var l=0,h=c.length;s!=null&&l<h;)s=s[r(c[l++])];return l&&l==h?s:void 0}return X4=a,X4}var eN,$z;function ige(){if($z)return eN;$z=1;var t=h2();function r(a,s,c){var l=a==null?void 0:t(a,s);return l===void 0?c:l}return eN=r,eN}var tN,Kz;function age(){if(Kz)return tN;Kz=1;function t(r,a){return r!=null&&a in Object(r)}return tN=t,tN}var nN,Qz;function Wz(){if(Qz)return nN;Qz=1;var t=f2(),r=Y0(),a=Ia(),s=r2(),c=f5(),l=q0();function h(d,p,b){p=t(p,d);for(var m=-1,w=p.length,k=!1;++m<w;){var P=l(p[m]);if(!(k=d!=null&&b(d,P)))break;d=d[P]}return k||++m!=w?k:(w=d==null?0:d.length,!!w&&c(w)&&s(P,w)&&(a(d)||r(d)))}return nN=h,nN}var rN,Jz;function Xz(){if(Jz)return rN;Jz=1;var t=age(),r=Wz();function a(s,c){return s!=null&&r(s,c,t)}return rN=a,rN}var iN,eF;function oge(){if(eF)return iN;eF=1;var t=Nz(),r=ige(),a=Xz(),s=Y4(),c=jz(),l=Lz(),h=q0(),d=1,p=2;function b(m,w){return s(m)&&c(w)?l(h(m),w):function(k){var P=r(k,m);return P===void 0&&P===w?a(k,m):t(w,P,d|p)}}return iN=b,iN}var aN,tF;function nF(){if(tF)return aN;tF=1;function t(r){return function(a){return a==null?void 0:a[r]}}return aN=t,aN}var oN,rF;function sge(){if(rF)return oN;rF=1;var t=h2();function r(a){return function(s){return t(s,a)}}return oN=r,oN}var sN,iF;function uge(){if(iF)return sN;iF=1;var t=nF(),r=sge(),a=Y4(),s=q0();function c(l){return a(l)?t(s(l)):r(l)}return sN=c,sN}var uN,aF;function wf(){if(aF)return uN;aF=1;var t=Xpe(),r=oge(),a=up(),s=Ia(),c=uge();function l(h){return typeof h=="function"?h:h==null?a:typeof h=="object"?s(h)?r(h[0],h[1]):t(h):c(h)}return uN=l,uN}var cN,oF;function sF(){if(oF)return cN;oF=1;var t=lH(),r=Upe(),a=wf(),s=Ia();function c(l,h){var d=s(l)?t:r;return d(l,a(h,3))}return cN=c,cN}var lN,uF;function cge(){if(uF)return lN;uF=1;var t=Object.prototype,r=t.hasOwnProperty;function a(s,c){return s!=null&&r.call(s,c)}return lN=a,lN}var fN,cF;function lF(){if(cF)return fN;cF=1;var t=cge(),r=Wz();function a(s,c){return s!=null&&r(s,c,t)}return fN=a,fN}var hN,fF;function lge(){if(fF)return hN;fF=1;var t=x5(),r=Jg(),a=Y0(),s=Ia(),c=mf(),l=Wg(),h=o2(),d=V0(),p="[object Map]",b="[object Set]",m=Object.prototype,w=m.hasOwnProperty;function k(P){if(P==null)return!0;if(c(P)&&(s(P)||typeof P=="string"||typeof P.splice=="function"||l(P)||d(P)||a(P)))return!P.length;var S=r(P);if(S==p||S==b)return!P.size;if(h(P))return!t(P).length;for(var M in P)if(w.call(P,M))return!1;return!0}return hN=k,hN}var dN,hF;function dF(){if(hF)return dN;hF=1;function t(r){return r===void 0}return dN=t,dN}var pN,pF;function gF(){if(pF)return pN;pF=1;var t=c2(),r=mf();function a(s,c){var l=-1,h=r(s)?Array(s.length):[];return t(s,function(d,p,b){h[++l]=c(d,p,b)}),h}return pN=a,pN}var gN,bF;function vF(){if(bF)return gN;bF=1;var t=l2(),r=wf(),a=gF(),s=Ia();function c(l,h){var d=s(l)?t:a;return d(l,r(h,3))}return gN=c,gN}var bN,yF;function fge(){if(yF)return bN;yF=1;function t(r,a,s,c){var l=-1,h=r==null?0:r.length;for(c&&h&&(s=r[++l]);++l<h;)s=a(s,r[l],l,r);return s}return bN=t,bN}var vN,mF;function hge(){if(mF)return vN;mF=1;function t(r,a,s,c,l){return l(r,function(h,d,p){s=c?(c=!1,h):a(s,h,d,p)}),s}return vN=t,vN}var yN,wF;function xF(){if(wF)return yN;wF=1;var t=fge(),r=c2(),a=wf(),s=hge(),c=Ia();function l(h,d,p){var b=c(h)?t:s,m=arguments.length<3;return b(h,a(d,4),p,m,r)}return yN=l,yN}var mN,kF;function dge(){if(kF)return mN;kF=1;var t=ap(),r=Ia(),a=hl(),s="[object String]";function c(l){return typeof l=="string"||!r(l)&&a(l)&&t(l)==s}return mN=c,mN}var wN,_F;function pge(){if(_F)return wN;_F=1;var t=nF(),r=t("length");return wN=r,wN}var xN,EF;function gge(){if(EF)return xN;EF=1;var t="\\ud800-\\udfff",r="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",c=r+a+s,l="\\ufe0e\\ufe0f",h="\\u200d",d=RegExp("["+h+t+c+l+"]");function p(b){return d.test(b)}return xN=p,xN}var kN,CF;function bge(){if(CF)return kN;CF=1;var t="\\ud800-\\udfff",r="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",c=r+a+s,l="\\ufe0e\\ufe0f",h="["+t+"]",d="["+c+"]",p="\\ud83c[\\udffb-\\udfff]",b="(?:"+d+"|"+p+")",m="[^"+t+"]",w="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",P="\\u200d",S=b+"?",M="["+l+"]?",L="(?:"+P+"(?:"+[m,w,k].join("|")+")"+M+S+")*",T=M+S+L,j="(?:"+[m+d+"?",d,w,k,h].join("|")+")",I=RegExp(p+"(?="+p+")|"+j+T,"g");function R(B){for(var F=I.lastIndex=0;I.test(B);)++F;return F}return kN=R,kN}var _N,PF;function vge(){if(PF)return _N;PF=1;var t=pge(),r=gge(),a=bge();function s(c){return r(c)?a(c):t(c)}return _N=s,_N}var EN,SF;function yge(){if(SF)return EN;SF=1;var t=x5(),r=Jg(),a=mf(),s=dge(),c=vge(),l="[object Map]",h="[object Set]";function d(p){if(p==null)return 0;if(a(p))return s(p)?c(p):p.length;var b=r(p);return b==l||b==h?p.size:t(p).length}return EN=d,EN}var CN,NF;function mge(){if(NF)return CN;NF=1;var t=JS(),r=FH(),a=v4(),s=wf(),c=u2(),l=Ia(),h=Wg(),d=F0(),p=Du(),b=V0();function m(w,k,P){var S=l(w),M=S||h(w)||b(w);if(k=s(k,4),P==null){var L=w&&w.constructor;M?P=S?new L:[]:p(w)?P=d(L)?r(c(w)):{}:P={}}return(M?t:a)(w,function(T,j,I){return k(P,T,j,I)}),P}return CN=m,CN}var PN,TF;function wge(){if(TF)return PN;TF=1;var t=Qg(),r=Y0(),a=Ia(),s=t?t.isConcatSpreadable:void 0;function c(l){return a(l)||r(l)||!!(s&&l&&l[s])}return PN=c,PN}var SN,MF;function NN(){if(MF)return SN;MF=1;var t=R5(),r=wge();function a(s,c,l,h,d){var p=-1,b=s.length;for(l||(l=r),d||(d=[]);++p<b;){var m=s[p];c>0&&l(m)?c>1?a(m,c-1,l,h,d):t(d,m):h||(d[d.length]=m)}return d}return SN=a,SN}var TN,jF;function xge(){if(jF)return TN;jF=1;function t(r,a,s){switch(s.length){case 0:return r.call(a);case 1:return r.call(a,s[0]);case 2:return r.call(a,s[0],s[1]);case 3:return r.call(a,s[0],s[1],s[2])}return r.apply(a,s)}return TN=t,TN}var MN,AF;function IF(){if(AF)return MN;AF=1;var t=xge(),r=Math.max;function a(s,c,l){return c=r(c===void 0?s.length-1:c,0),function(){for(var h=arguments,d=-1,p=r(h.length-c,0),b=Array(p);++d<p;)b[d]=h[c+d];d=-1;for(var m=Array(c+1);++d<c;)m[d]=h[d];return m[c]=l(b),t(s,this,m)}}return MN=a,MN}var jN,LF;function kge(){if(LF)return jN;LF=1;var t=h4(),r=NG(),a=up(),s=r?function(c,l){return r(c,"toString",{configurable:!0,enumerable:!1,value:t(l),writable:!0})}:a;return jN=s,jN}var AN,OF;function _ge(){if(OF)return AN;OF=1;var t=800,r=16,a=Date.now;function s(c){var l=0,h=0;return function(){var d=a(),p=r-(d-h);if(h=d,p>0){if(++l>=t)return arguments[0]}else l=0;return c.apply(void 0,arguments)}}return AN=s,AN}var IN,RF;function DF(){if(RF)return IN;RF=1;var t=kge(),r=_ge(),a=r(t);return IN=a,IN}var LN,BF;function d2(){if(BF)return LN;BF=1;var t=up(),r=IF(),a=DF();function s(c,l){return a(r(c,l,t),c+"")}return LN=s,LN}var ON,GF;function HF(){if(GF)return ON;GF=1;function t(r,a,s,c){for(var l=r.length,h=s+(c?1:-1);c?h--:++h<l;)if(a(r[h],h,r))return h;return-1}return ON=t,ON}var RN,zF;function Ege(){if(zF)return RN;zF=1;function t(r){return r!==r}return RN=t,RN}var DN,FF;function Cge(){if(FF)return DN;FF=1;function t(r,a,s){for(var c=s-1,l=r.length;++c<l;)if(r[c]===a)return c;return-1}return DN=t,DN}var BN,UF;function Pge(){if(UF)return BN;UF=1;var t=HF(),r=Ege(),a=Cge();function s(c,l,h){return l===l?a(c,l,h):t(c,r,h)}return BN=s,BN}var GN,YF;function Sge(){if(YF)return GN;YF=1;var t=Pge();function r(a,s){var c=a==null?0:a.length;return!!c&&t(a,s,0)>-1}return GN=r,GN}var HN,VF;function Nge(){if(VF)return HN;VF=1;function t(r,a,s){for(var c=-1,l=r==null?0:r.length;++c<l;)if(s(a,r[c]))return!0;return!1}return HN=t,HN}var zN,qF;function Tge(){if(qF)return zN;qF=1;function t(){}return zN=t,zN}var FN,ZF;function Mge(){if(ZF)return FN;ZF=1;var t=NH(),r=Tge(),a=A4(),s=1/0,c=t&&1/a(new t([,-0]))[1]==s?function(l){return new t(l)}:r;return FN=c,FN}var UN,$F;function jge(){if($F)return UN;$F=1;var t=bz(),r=Sge(),a=Nge(),s=mz(),c=Mge(),l=A4(),h=200;function d(p,b,m){var w=-1,k=r,P=p.length,S=!0,M=[],L=M;if(m)S=!1,k=a;else if(P>=h){var T=b?null:c(p);if(T)return l(T);S=!1,k=s,L=new t}else L=b?[]:M;e:for(;++w<P;){var j=p[w],I=b?b(j):j;if(j=m||j!==0?j:0,S&&I===I){for(var R=L.length;R--;)if(L[R]===I)continue e;b&&L.push(I),M.push(j)}else k(L,I,m)||(L!==M&&L.push(I),M.push(j))}return M}return UN=d,UN}var YN,KF;function QF(){if(KF)return YN;KF=1;var t=mf(),r=hl();function a(s){return r(s)&&t(s)}return YN=a,YN}var VN,WF;function Age(){if(WF)return VN;WF=1;var t=NN(),r=d2(),a=jge(),s=QF(),c=r(function(l){return a(t(l,1,s,!0))});return VN=c,VN}var qN,JF;function Ige(){if(JF)return qN;JF=1;var t=l2();function r(a,s){return t(s,function(c){return a[c]})}return qN=r,qN}var ZN,XF;function eU(){if(XF)return ZN;XF=1;var t=Ige(),r=Oh();function a(s){return s==null?[]:t(s,r(s))}return ZN=a,ZN}var $N,tU;function Bu(){if(tU)return $N;tU=1;var t;if(typeof iS=="function")try{t={clone:Hpe(),constant:h4(),each:fz(),filter:sF(),has:lF(),isArray:Ia(),isEmpty:lge(),isFunction:F0(),isUndefined:dF(),keys:Oh(),map:vF(),reduce:xF(),size:yge(),transform:mge(),union:Age(),values:eU()}}catch{}return t||(t=window._),$N=t,$N}var KN,nU;function QN(){if(nU)return KN;nU=1;var t=Bu();KN=c;var r="\0",a="\0",s="";function c(m){this._isDirected=t.has(m,"directed")?m.directed:!0,this._isMultigraph=t.has(m,"multigraph")?m.multigraph:!1,this._isCompound=t.has(m,"compound")?m.compound:!1,this._label=void 0,this._defaultNodeLabelFn=t.constant(void 0),this._defaultEdgeLabelFn=t.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}c.prototype._nodeCount=0,c.prototype._edgeCount=0,c.prototype.isDirected=function(){return this._isDirected},c.prototype.isMultigraph=function(){return this._isMultigraph},c.prototype.isCompound=function(){return this._isCompound},c.prototype.setGraph=function(m){return this._label=m,this},c.prototype.graph=function(){return this._label},c.prototype.setDefaultNodeLabel=function(m){return t.isFunction(m)||(m=t.constant(m)),this._defaultNodeLabelFn=m,this},c.prototype.nodeCount=function(){return this._nodeCount},c.prototype.nodes=function(){return t.keys(this._nodes)},c.prototype.sources=function(){var m=this;return t.filter(this.nodes(),function(w){return t.isEmpty(m._in[w])})},c.prototype.sinks=function(){var m=this;return t.filter(this.nodes(),function(w){return t.isEmpty(m._out[w])})},c.prototype.setNodes=function(m,w){var k=arguments,P=this;return t.each(m,function(S){k.length>1?P.setNode(S,w):P.setNode(S)}),this},c.prototype.setNode=function(m,w){return t.has(this._nodes,m)?(arguments.length>1&&(this._nodes[m]=w),this):(this._nodes[m]=arguments.length>1?w:this._defaultNodeLabelFn(m),this._isCompound&&(this._parent[m]=a,this._children[m]={},this._children[a][m]=!0),this._in[m]={},this._preds[m]={},this._out[m]={},this._sucs[m]={},++this._nodeCount,this)},c.prototype.node=function(m){return this._nodes[m]},c.prototype.hasNode=function(m){return t.has(this._nodes,m)},c.prototype.removeNode=function(m){var w=this;if(t.has(this._nodes,m)){var k=function(P){w.removeEdge(w._edgeObjs[P])};delete this._nodes[m],this._isCompound&&(this._removeFromParentsChildList(m),delete this._parent[m],t.each(this.children(m),function(P){w.setParent(P)}),delete this._children[m]),t.each(t.keys(this._in[m]),k),delete this._in[m],delete this._preds[m],t.each(t.keys(this._out[m]),k),delete this._out[m],delete this._sucs[m],--this._nodeCount}return this},c.prototype.setParent=function(m,w){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t.isUndefined(w))w=a;else{w+="";for(var k=w;!t.isUndefined(k);k=this.parent(k))if(k===m)throw new Error("Setting "+w+" as parent of "+m+" would create a cycle");this.setNode(w)}return this.setNode(m),this._removeFromParentsChildList(m),this._parent[m]=w,this._children[w][m]=!0,this},c.prototype._removeFromParentsChildList=function(m){delete this._children[this._parent[m]][m]},c.prototype.parent=function(m){if(this._isCompound){var w=this._parent[m];if(w!==a)return w}},c.prototype.children=function(m){if(t.isUndefined(m)&&(m=a),this._isCompound){var w=this._children[m];if(w)return t.keys(w)}else{if(m===a)return this.nodes();if(this.hasNode(m))return[]}},c.prototype.predecessors=function(m){var w=this._preds[m];if(w)return t.keys(w)},c.prototype.successors=function(m){var w=this._sucs[m];if(w)return t.keys(w)},c.prototype.neighbors=function(m){var w=this.predecessors(m);if(w)return t.union(w,this.successors(m))},c.prototype.isLeaf=function(m){var w;return this.isDirected()?w=this.successors(m):w=this.neighbors(m),w.length===0},c.prototype.filterNodes=function(m){var w=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});w.setGraph(this.graph());var k=this;t.each(this._nodes,function(M,L){m(L)&&w.setNode(L,M)}),t.each(this._edgeObjs,function(M){w.hasNode(M.v)&&w.hasNode(M.w)&&w.setEdge(M,k.edge(M))});var P={};function S(M){var L=k.parent(M);return L===void 0||w.hasNode(L)?(P[M]=L,L):L in P?P[L]:S(L)}return this._isCompound&&t.each(w.nodes(),function(M){w.setParent(M,S(M))}),w},c.prototype.setDefaultEdgeLabel=function(m){return t.isFunction(m)||(m=t.constant(m)),this._defaultEdgeLabelFn=m,this},c.prototype.edgeCount=function(){return this._edgeCount},c.prototype.edges=function(){return t.values(this._edgeObjs)},c.prototype.setPath=function(m,w){var k=this,P=arguments;return t.reduce(m,function(S,M){return P.length>1?k.setEdge(S,M,w):k.setEdge(S,M),M}),this},c.prototype.setEdge=function(){var m,w,k,P,S=!1,M=arguments[0];typeof M=="object"&&M!==null&&"v"in M?(m=M.v,w=M.w,k=M.name,arguments.length===2&&(P=arguments[1],S=!0)):(m=M,w=arguments[1],k=arguments[3],arguments.length>2&&(P=arguments[2],S=!0)),m=""+m,w=""+w,t.isUndefined(k)||(k=""+k);var L=d(this._isDirected,m,w,k);if(t.has(this._edgeLabels,L))return S&&(this._edgeLabels[L]=P),this;if(!t.isUndefined(k)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(m),this.setNode(w),this._edgeLabels[L]=S?P:this._defaultEdgeLabelFn(m,w,k);var T=p(this._isDirected,m,w,k);return m=T.v,w=T.w,Object.freeze(T),this._edgeObjs[L]=T,l(this._preds[w],m),l(this._sucs[m],w),this._in[w][L]=T,this._out[m][L]=T,this._edgeCount++,this},c.prototype.edge=function(m,w,k){var P=arguments.length===1?b(this._isDirected,arguments[0]):d(this._isDirected,m,w,k);return this._edgeLabels[P]},c.prototype.hasEdge=function(m,w,k){var P=arguments.length===1?b(this._isDirected,arguments[0]):d(this._isDirected,m,w,k);return t.has(this._edgeLabels,P)},c.prototype.removeEdge=function(m,w,k){var P=arguments.length===1?b(this._isDirected,arguments[0]):d(this._isDirected,m,w,k),S=this._edgeObjs[P];return S&&(m=S.v,w=S.w,delete this._edgeLabels[P],delete this._edgeObjs[P],h(this._preds[w],m),h(this._sucs[m],w),delete this._in[w][P],delete this._out[m][P],this._edgeCount--),this},c.prototype.inEdges=function(m,w){var k=this._in[m];if(k){var P=t.values(k);return w?t.filter(P,function(S){return S.v===w}):P}},c.prototype.outEdges=function(m,w){var k=this._out[m];if(k){var P=t.values(k);return w?t.filter(P,function(S){return S.w===w}):P}},c.prototype.nodeEdges=function(m,w){var k=this.inEdges(m,w);if(k)return k.concat(this.outEdges(m,w))};function l(m,w){m[w]?m[w]++:m[w]=1}function h(m,w){--m[w]||delete m[w]}function d(m,w,k,P){var S=""+w,M=""+k;if(!m&&S>M){var L=S;S=M,M=L}return S+s+M+s+(t.isUndefined(P)?r:P)}function p(m,w,k,P){var S=""+w,M=""+k;if(!m&&S>M){var L=S;S=M,M=L}var T={v:S,w:M};return P&&(T.name=P),T}function b(m,w){return d(m,w.v,w.w,w.name)}return KN}var rU,iU;function Lge(){return iU||(iU=1,rU="2.1.8"),rU}var aU,oU;function Oge(){return oU||(oU=1,aU={Graph:QN(),version:Lge()}),aU}var WN,sU;function Rge(){if(sU)return WN;sU=1;var t=Bu(),r=QN();WN={write:a,read:l};function a(h){var d={options:{directed:h.isDirected(),multigraph:h.isMultigraph(),compound:h.isCompound()},nodes:s(h),edges:c(h)};return t.isUndefined(h.graph())||(d.value=t.clone(h.graph())),d}function s(h){return t.map(h.nodes(),function(d){var p=h.node(d),b=h.parent(d),m={v:d};return t.isUndefined(p)||(m.value=p),t.isUndefined(b)||(m.parent=b),m})}function c(h){return t.map(h.edges(),function(d){var p=h.edge(d),b={v:d.v,w:d.w};return t.isUndefined(d.name)||(b.name=d.name),t.isUndefined(p)||(b.value=p),b})}function l(h){var d=new r(h.options).setGraph(h.value);return t.each(h.nodes,function(p){d.setNode(p.v,p.value),p.parent&&d.setParent(p.v,p.parent)}),t.each(h.edges,function(p){d.setEdge({v:p.v,w:p.w,name:p.name},p.value)}),d}return WN}var JN,uU;function Dge(){if(uU)return JN;uU=1;var t=Bu();JN=r;function r(a){var s={},c=[],l;function h(d){t.has(s,d)||(s[d]=!0,l.push(d),t.each(a.successors(d),h),t.each(a.predecessors(d),h))}return t.each(a.nodes(),function(d){l=[],h(d),l.length&&c.push(l)}),c}return JN}var XN,cU;function lU(){if(cU)return XN;cU=1;var t=Bu();XN=r;function r(){this._arr=[],this._keyIndices={}}return r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(a){return a.key})},r.prototype.has=function(a){return t.has(this._keyIndices,a)},r.prototype.priority=function(a){var s=this._keyIndices[a];if(s!==void 0)return this._arr[s].priority},r.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(a,s){var c=this._keyIndices;if(a=String(a),!t.has(c,a)){var l=this._arr,h=l.length;return c[a]=h,l.push({key:a,priority:s}),this._decrease(h),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var a=this._arr.pop();return delete this._keyIndices[a.key],this._heapify(0),a.key},r.prototype.decrease=function(a,s){var c=this._keyIndices[a];if(s>this._arr[c].priority)throw new Error("New priority is greater than current priority. Key: "+a+" Old: "+this._arr[c].priority+" New: "+s);this._arr[c].priority=s,this._decrease(c)},r.prototype._heapify=function(a){var s=this._arr,c=2*a,l=c+1,h=a;c<s.length&&(h=s[c].priority<s[h].priority?c:h,l<s.length&&(h=s[l].priority<s[h].priority?l:h),h!==a&&(this._swap(a,h),this._heapify(h)))},r.prototype._decrease=function(a){for(var s=this._arr,c=s[a].priority,l;a!==0&&(l=a>>1,!(s[l].priority<c));)this._swap(a,l),a=l},r.prototype._swap=function(a,s){var c=this._arr,l=this._keyIndices,h=c[a],d=c[s];c[a]=d,c[s]=h,l[d.key]=a,l[h.key]=s},XN}var eT,fU;function hU(){if(fU)return eT;fU=1;var t=Bu(),r=lU();eT=s;var a=t.constant(1);function s(l,h,d,p){return c(l,String(h),d||a,p||function(b){return l.outEdges(b)})}function c(l,h,d,p){var b={},m=new r,w,k,P=function(S){var M=S.v!==w?S.v:S.w,L=b[M],T=d(S),j=k.distance+T;if(T<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+S+" Weight: "+T);j<L.distance&&(L.distance=j,L.predecessor=w,m.decrease(M,j))};for(l.nodes().forEach(function(S){var M=S===h?0:Number.POSITIVE_INFINITY;b[S]={distance:M},m.add(S,M)});m.size()>0&&(w=m.removeMin(),k=b[w],k.distance!==Number.POSITIVE_INFINITY);)p(w).forEach(P);return b}return eT}var tT,dU;function Bge(){if(dU)return tT;dU=1;var t=hU(),r=Bu();tT=a;function a(s,c,l){return r.transform(s.nodes(),function(h,d){h[d]=t(s,d,c,l)},{})}return tT}var nT,pU;function gU(){if(pU)return nT;pU=1;var t=Bu();nT=r;function r(a){var s=0,c=[],l={},h=[];function d(p){var b=l[p]={onStack:!0,lowlink:s,index:s++};if(c.push(p),a.successors(p).forEach(function(k){t.has(l,k)?l[k].onStack&&(b.lowlink=Math.min(b.lowlink,l[k].index)):(d(k),b.lowlink=Math.min(b.lowlink,l[k].lowlink))}),b.lowlink===b.index){var m=[],w;do w=c.pop(),l[w].onStack=!1,m.push(w);while(p!==w);h.push(m)}}return a.nodes().forEach(function(p){t.has(l,p)||d(p)}),h}return nT}var rT,bU;function Gge(){if(bU)return rT;bU=1;var t=Bu(),r=gU();rT=a;function a(s){return t.filter(r(s),function(c){return c.length>1||c.length===1&&s.hasEdge(c[0],c[0])})}return rT}var iT,vU;function Hge(){if(vU)return iT;vU=1;var t=Bu();iT=a;var r=t.constant(1);function a(c,l,h){return s(c,l||r,h||function(d){return c.outEdges(d)})}function s(c,l,h){var d={},p=c.nodes();return p.forEach(function(b){d[b]={},d[b][b]={distance:0},p.forEach(function(m){b!==m&&(d[b][m]={distance:Number.POSITIVE_INFINITY})}),h(b).forEach(function(m){var w=m.v===b?m.w:m.v,k=l(m);d[b][w]={distance:k,predecessor:b}})}),p.forEach(function(b){var m=d[b];p.forEach(function(w){var k=d[w];p.forEach(function(P){var S=k[b],M=m[P],L=k[P],T=S.distance+M.distance;T<L.distance&&(L.distance=T,L.predecessor=M.predecessor)})})}),d}return iT}var aT,yU;function mU(){if(yU)return aT;yU=1;var t=Bu();aT=r,r.CycleException=a;function r(s){var c={},l={},h=[];function d(p){if(t.has(l,p))throw new a;t.has(c,p)||(l[p]=!0,c[p]=!0,t.each(s.predecessors(p),d),delete l[p],h.push(p))}if(t.each(s.sinks(),d),t.size(c)!==s.nodeCount())throw new a;return h}function a(){}return a.prototype=new Error,aT}var oT,wU;function zge(){if(wU)return oT;wU=1;var t=mU();oT=r;function r(a){try{t(a)}catch(s){if(s instanceof t.CycleException)return!1;throw s}return!0}return oT}var sT,xU;function kU(){if(xU)return sT;xU=1;var t=Bu();sT=r;function r(s,c,l){t.isArray(c)||(c=[c]);var h=(s.isDirected()?s.successors:s.neighbors).bind(s),d=[],p={};return t.each(c,function(b){if(!s.hasNode(b))throw new Error("Graph does not have node: "+b);a(s,b,l==="post",p,h,d)}),d}function a(s,c,l,h,d,p){t.has(h,c)||(h[c]=!0,l||p.push(c),t.each(d(c),function(b){a(s,b,l,h,d,p)}),l&&p.push(c))}return sT}var uT,_U;function Fge(){if(_U)return uT;_U=1;var t=kU();uT=r;function r(a,s){return t(a,s,"post")}return uT}var cT,EU;function Uge(){if(EU)return cT;EU=1;var t=kU();cT=r;function r(a,s){return t(a,s,"pre")}return cT}var lT,CU;function Yge(){if(CU)return lT;CU=1;var t=Bu(),r=QN(),a=lU();lT=s;function s(c,l){var h=new r,d={},p=new a,b;function m(k){var P=k.v===b?k.w:k.v,S=p.priority(P);if(S!==void 0){var M=l(k);M<S&&(d[P]=b,p.decrease(P,M))}}if(c.nodeCount()===0)return h;t.each(c.nodes(),function(k){p.add(k,Number.POSITIVE_INFINITY),h.setNode(k)}),p.decrease(c.nodes()[0],0);for(var w=!1;p.size()>0;){if(b=p.removeMin(),t.has(d,b))h.setEdge(b,d[b]);else{if(w)throw new Error("Input graph is not connected: "+c);w=!0}c.nodeEdges(b).forEach(m)}return h}return lT}var PU,SU;function Vge(){return SU||(SU=1,PU={components:Dge(),dijkstra:hU(),dijkstraAll:Bge(),findCycles:Gge(),floydWarshall:Hge(),isAcyclic:zge(),postorder:Fge(),preorder:Uge(),prim:Yge(),tarjan:gU(),topsort:mU()}),PU}var fT,NU;function qge(){if(NU)return fT;NU=1;var t=Oge();return fT={Graph:t.Graph,json:Rge(),alg:Vge(),version:t.version},fT}var hT,TU;function gc(){if(TU)return hT;TU=1;var t;if(typeof iS=="function")try{t=qge()}catch{}return t||(t=window.graphlib),hT=t,hT}var dT,MU;function Zge(){if(MU)return dT;MU=1;var t=QH(),r=1,a=4;function s(c){return t(c,r|a)}return dT=s,dT}var pT,jU;function p2(){if(jU)return pT;jU=1;var t=Kg(),r=mf(),a=r2(),s=Du();function c(l,h,d){if(!s(d))return!1;var p=typeof h;return(p=="number"?r(d)&&a(h,d.length):p=="string"&&h in d)?t(d[h],l):!1}return pT=c,pT}var gT,AU;function $ge(){if(AU)return gT;AU=1;var t=d2(),r=Kg(),a=p2(),s=sp(),c=Object.prototype,l=c.hasOwnProperty,h=t(function(d,p){d=Object(d);var b=-1,m=p.length,w=m>2?p[2]:void 0;for(w&&a(p[0],p[1],w)&&(m=1);++b<m;)for(var k=p[b],P=s(k),S=-1,M=P.length;++S<M;){var L=P[S],T=d[L];(T===void 0||r(T,c[L])&&!l.call(d,L))&&(d[L]=k[L])}return d});return gT=h,gT}var bT,IU;function Kge(){if(IU)return bT;IU=1;var t=wf(),r=mf(),a=Oh();function s(c){return function(l,h,d){var p=Object(l);if(!r(l)){var b=t(h,3);l=a(l),h=function(w){return b(p[w],w,p)}}var m=c(l,h,d);return m>-1?p[b?l[m]:m]:void 0}}return bT=s,bT}var vT,LU;function Qge(){if(LU)return vT;LU=1;var t=/\s/;function r(a){for(var s=a.length;s--&&t.test(a.charAt(s)););return s}return vT=r,vT}var yT,OU;function Wge(){if(OU)return yT;OU=1;var t=Qge(),r=/^\s+/;function a(s){return s&&s.slice(0,t(s)+1).replace(r,"")}return yT=a,yT}var mT,RU;function Jge(){if(RU)return mT;RU=1;var t=Wge(),r=Du(),a=Xg(),s=NaN,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt;function p(b){if(typeof b=="number")return b;if(a(b))return s;if(r(b)){var m=typeof b.valueOf=="function"?b.valueOf():b;b=r(m)?m+"":m}if(typeof b!="string")return b===0?b:+b;b=t(b);var w=l.test(b);return w||h.test(b)?d(b.slice(2),w?2:8):c.test(b)?s:+b}return mT=p,mT}var wT,DU;function BU(){if(DU)return wT;DU=1;var t=Jge(),r=1/0,a=17976931348623157e292;function s(c){if(!c)return c===0?c:0;if(c=t(c),c===r||c===-r){var l=c<0?-1:1;return l*a}return c===c?c:0}return wT=s,wT}var xT,GU;function Xge(){if(GU)return xT;GU=1;var t=BU();function r(a){var s=t(a),c=s%1;return s===s?c?s-c:s:0}return xT=r,xT}var kT,HU;function ebe(){if(HU)return kT;HU=1;var t=HF(),r=wf(),a=Xge(),s=Math.max;function c(l,h,d){var p=l==null?0:l.length;if(!p)return-1;var b=d==null?0:a(d);return b<0&&(b=s(p+b,0)),t(l,r(h,3),b)}return kT=c,kT}var _T,zU;function tbe(){if(zU)return _T;zU=1;var t=Kge(),r=ebe(),a=t(r);return _T=a,_T}var ET,FU;function UU(){if(FU)return ET;FU=1;var t=NN();function r(a){var s=a==null?0:a.length;return s?t(a,1):[]}return ET=r,ET}var CT,YU;function nbe(){if(YU)return CT;YU=1;var t=g4(),r=oz(),a=sp();function s(c,l){return c==null?c:t(c,r(l),a)}return CT=s,CT}var PT,VU;function rbe(){if(VU)return PT;VU=1;function t(r){var a=r==null?0:r.length;return a?r[a-1]:void 0}return PT=t,PT}var ST,qU;function ibe(){if(qU)return ST;qU=1;var t=e2(),r=v4(),a=wf();function s(c,l){var h={};return l=a(l,3),r(c,function(d,p,b){t(h,p,l(d,p,b))}),h}return ST=s,ST}var NT,ZU;function TT(){if(ZU)return NT;ZU=1;var t=Xg();function r(a,s,c){for(var l=-1,h=a.length;++l<h;){var d=a[l],p=s(d);if(p!=null&&(b===void 0?p===p&&!t(p):c(p,b)))var b=p,m=d}return m}return NT=r,NT}var MT,$U;function abe(){if($U)return MT;$U=1;function t(r,a){return r>a}return MT=t,MT}var jT,KU;function obe(){if(KU)return jT;KU=1;var t=TT(),r=abe(),a=up();function s(c){return c&&c.length?t(c,a,r):void 0}return jT=s,jT}var AT,QU;function WU(){if(QU)return AT;QU=1;var t=e2(),r=Kg();function a(s,c,l){(l!==void 0&&!r(s[c],l)||l===void 0&&!(c in s))&&t(s,c,l)}return AT=a,AT}var IT,JU;function sbe(){if(JU)return IT;JU=1;var t=ap(),r=u2(),a=hl(),s="[object Object]",c=Function.prototype,l=Object.prototype,h=c.toString,d=l.hasOwnProperty,p=h.call(Object);function b(m){if(!a(m)||t(m)!=s)return!1;var w=r(m);if(w===null)return!0;var k=d.call(w,"constructor")&&w.constructor;return typeof k=="function"&&k instanceof k&&h.call(k)==p}return IT=b,IT}var LT,XU;function eY(){if(XU)return LT;XU=1;function t(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}return LT=t,LT}var OT,tY;function ube(){if(tY)return OT;tY=1;var t=U0(),r=sp();function a(s){return t(s,r(s))}return OT=a,OT}var RT,nY;function cbe(){if(nY)return RT;nY=1;var t=WU(),r=oH(),a=GH(),s=uH(),c=YH(),l=Y0(),h=Ia(),d=QF(),p=Wg(),b=F0(),m=Du(),w=sbe(),k=V0(),P=eY(),S=ube();function M(L,T,j,I,R,B,F){var z=P(L,j),D=P(T,j),H=F.get(D);if(H){t(L,j,H);return}var Q=B?B(z,D,j+"",L,T,F):void 0,q=Q===void 0;if(q){var Z=h(D),J=!Z&&p(D),K=!Z&&!J&&k(D);Q=D,Z||J||K?h(z)?Q=z:d(z)?Q=s(z):J?(q=!1,Q=r(D,!0)):K?(q=!1,Q=a(D,!0)):Q=[]:w(D)||l(D)?(Q=z,l(z)?Q=S(z):(!m(z)||b(z))&&(Q=c(D))):q=!1}q&&(F.set(D,Q),R(Q,D,I,B,F),F.delete(D)),t(L,j,Q)}return RT=M,RT}var DT,rY;function lbe(){if(rY)return DT;rY=1;var t=Xw(),r=WU(),a=g4(),s=cbe(),c=Du(),l=sp(),h=eY();function d(p,b,m,w,k){p!==b&&a(b,function(P,S){if(k||(k=new t),c(P))s(p,b,S,m,d,w,k);else{var M=w?w(h(p,S),P,S+"",p,b,k):void 0;M===void 0&&(M=P),r(p,S,M)}},l)}return DT=d,DT}var BT,iY;function fbe(){if(iY)return BT;iY=1;var t=d2(),r=p2();function a(s){return t(function(c,l){var h=-1,d=l.length,p=d>1?l[d-1]:void 0,b=d>2?l[2]:void 0;for(p=s.length>3&&typeof p=="function"?(d--,p):void 0,b&&r(l[0],l[1],b)&&(p=d<3?void 0:p,d=1),c=Object(c);++h<d;){var m=l[h];m&&s(c,m,h,p)}return c})}return BT=a,BT}var GT,aY;function hbe(){if(aY)return GT;aY=1;var t=lbe(),r=fbe(),a=r(function(s,c,l){t(s,c,l)});return GT=a,GT}var HT,oY;function sY(){if(oY)return HT;oY=1;function t(r,a){return r<a}return HT=t,HT}var zT,uY;function dbe(){if(uY)return zT;uY=1;var t=TT(),r=sY(),a=up();function s(c){return c&&c.length?t(c,a,r):void 0}return zT=s,zT}var FT,cY;function pbe(){if(cY)return FT;cY=1;var t=TT(),r=wf(),a=sY();function s(c,l){return c&&c.length?t(c,r(l,2),a):void 0}return FT=s,FT}var UT,lY;function gbe(){if(lY)return UT;lY=1;var t=pc(),r=function(){return t.Date.now()};return UT=r,UT}var YT,fY;function bbe(){if(fY)return YT;fY=1;var t=t2(),r=f2(),a=r2(),s=Du(),c=q0();function l(h,d,p,b){if(!s(h))return h;d=r(d,h);for(var m=-1,w=d.length,k=w-1,P=h;P!=null&&++m<w;){var S=c(d[m]),M=p;if(S==="__proto__"||S==="constructor"||S==="prototype")return h;if(m!=k){var L=P[S];M=b?b(L,S,P):void 0,M===void 0&&(M=s(L)?L:a(d[m+1])?[]:{})}t(P,S,M),P=P[S]}return h}return YT=l,YT}var VT,hY;function vbe(){if(hY)return VT;hY=1;var t=h2(),r=bbe(),a=f2();function s(c,l,h){for(var d=-1,p=l.length,b={};++d<p;){var m=l[d],w=t(c,m);h(w,m)&&r(b,a(m,c),w)}return b}return VT=s,VT}var qT,dY;function ybe(){if(dY)return qT;dY=1;var t=vbe(),r=Xz();function a(s,c){return t(s,c,function(l,h){return r(s,h)})}return qT=a,qT}var ZT,pY;function mbe(){if(pY)return ZT;pY=1;var t=UU(),r=IF(),a=DF();function s(c){return a(r(c,void 0,t),c+"")}return ZT=s,ZT}var $T,gY;function wbe(){if(gY)return $T;gY=1;var t=ybe(),r=mbe(),a=r(function(s,c){return s==null?{}:t(s,c)});return $T=a,$T}var KT,bY;function xbe(){if(bY)return KT;bY=1;var t=Math.ceil,r=Math.max;function a(s,c,l,h){for(var d=-1,p=r(t((c-s)/(l||1)),0),b=Array(p);p--;)b[h?p:++d]=s,s+=l;return b}return KT=a,KT}var QT,vY;function kbe(){if(vY)return QT;vY=1;var t=xbe(),r=p2(),a=BU();function s(c){return function(l,h,d){return d&&typeof d!="number"&&r(l,h,d)&&(h=d=void 0),l=a(l),h===void 0?(h=l,l=0):h=a(h),d=d===void 0?l<h?1:-1:a(d),t(l,h,d,c)}}return QT=s,QT}var WT,yY;function _be(){if(yY)return WT;yY=1;var t=kbe(),r=t();return WT=r,WT}var JT,mY;function Ebe(){if(mY)return JT;mY=1;function t(r,a){var s=r.length;for(r.sort(a);s--;)r[s]=r[s].value;return r}return JT=t,JT}var XT,wY;function Cbe(){if(wY)return XT;wY=1;var t=Xg();function r(a,s){if(a!==s){var c=a!==void 0,l=a===null,h=a===a,d=t(a),p=s!==void 0,b=s===null,m=s===s,w=t(s);if(!b&&!w&&!d&&a>s||d&&p&&m&&!b&&!w||l&&p&&m||!c&&m||!h)return 1;if(!l&&!d&&!w&&a<s||w&&c&&h&&!l&&!d||b&&c&&h||!p&&h||!m)return-1}return 0}return XT=r,XT}var eM,xY;function Pbe(){if(xY)return eM;xY=1;var t=Cbe();function r(a,s,c){for(var l=-1,h=a.criteria,d=s.criteria,p=h.length,b=c.length;++l<p;){var m=t(h[l],d[l]);if(m){if(l>=b)return m;var w=c[l];return m*(w=="desc"?-1:1)}}return a.index-s.index}return eM=r,eM}var tM,kY;function Sbe(){if(kY)return tM;kY=1;var t=l2(),r=h2(),a=wf(),s=gF(),c=Ebe(),l=i2(),h=Pbe(),d=up(),p=Ia();function b(m,w,k){w.length?w=t(w,function(M){return p(M)?function(L){return r(L,M.length===1?M[0]:M)}:M}):w=[d];var P=-1;w=t(w,l(a));var S=s(m,function(M,L,T){var j=t(w,function(I){return I(M)});return{criteria:j,index:++P,value:M}});return c(S,function(M,L){return h(M,L,k)})}return tM=b,tM}var nM,_Y;function Nbe(){if(_Y)return nM;_Y=1;var t=NN(),r=Sbe(),a=d2(),s=p2(),c=a(function(l,h){if(l==null)return[];var d=h.length;return d>1&&s(l,h[0],h[1])?h=[]:d>2&&s(h[0],h[1],h[2])&&(h=[h[0]]),r(l,t(h,1),[])});return nM=c,nM}var rM,EY;function Tbe(){if(EY)return rM;EY=1;var t=Yz(),r=0;function a(s){var c=++r;return t(s)+c}return rM=a,rM}var iM,CY;function Mbe(){if(CY)return iM;CY=1;function t(r,a,s){for(var c=-1,l=r.length,h=a.length,d={};++c<l;){var p=c<h?a[c]:void 0;s(d,r[c],p)}return d}return iM=t,iM}var aM,PY;function jbe(){if(PY)return aM;PY=1;var t=t2(),r=Mbe();function a(s,c){return r(s||[],c||[],t)}return aM=a,aM}var oM,SY;function Di(){if(SY)return oM;SY=1;var t;if(typeof iS=="function")try{t={cloneDeep:Zge(),constant:h4(),defaults:$ge(),each:fz(),filter:sF(),find:tbe(),flatten:UU(),forEach:uz(),forIn:nbe(),has:lF(),isUndefined:dF(),last:rbe(),map:vF(),mapValues:ibe(),max:obe(),merge:hbe(),min:dbe(),minBy:pbe(),now:gbe(),pick:wbe(),range:_be(),reduce:xF(),sortBy:Nbe(),uniqueId:Tbe(),values:eU(),zipObject:jbe()}}catch{}return t||(t=window._),oM=t,oM}var sM,NY;function Abe(){if(NY)return sM;NY=1,sM=t;function t(){var s={};s._next=s._prev=s,this._sentinel=s}t.prototype.dequeue=function(){var s=this._sentinel,c=s._prev;if(c!==s)return r(c),c},t.prototype.enqueue=function(s){var c=this._sentinel;s._prev&&s._next&&r(s),s._next=c._next,c._next._prev=s,c._next=s,s._prev=c},t.prototype.toString=function(){for(var s=[],c=this._sentinel,l=c._prev;l!==c;)s.push(JSON.stringify(l,a)),l=l._prev;return"["+s.join(", ")+"]"};function r(s){s._prev._next=s._next,s._next._prev=s._prev,delete s._next,delete s._prev}function a(s,c){if(s!=="_next"&&s!=="_prev")return c}return sM}var uM,TY;function Ibe(){if(TY)return uM;TY=1;var t=Di(),r=gc().Graph,a=Abe();uM=c;var s=t.constant(1);function c(b,m){if(b.nodeCount()<=1)return[];var w=d(b,m||s),k=l(w.graph,w.buckets,w.zeroIdx);return t.flatten(t.map(k,function(P){return b.outEdges(P.v,P.w)}),!0)}function l(b,m,w){for(var k=[],P=m[m.length-1],S=m[0],M;b.nodeCount();){for(;M=S.dequeue();)h(b,m,w,M);for(;M=P.dequeue();)h(b,m,w,M);if(b.nodeCount()){for(var L=m.length-2;L>0;--L)if(M=m[L].dequeue(),M){k=k.concat(h(b,m,w,M,!0));break}}}return k}function h(b,m,w,k,P){var S=P?[]:void 0;return t.forEach(b.inEdges(k.v),function(M){var L=b.edge(M),T=b.node(M.v);P&&S.push({v:M.v,w:M.w}),T.out-=L,p(m,w,T)}),t.forEach(b.outEdges(k.v),function(M){var L=b.edge(M),T=M.w,j=b.node(T);j.in-=L,p(m,w,j)}),b.removeNode(k.v),S}function d(b,m){var w=new r,k=0,P=0;t.forEach(b.nodes(),function(L){w.setNode(L,{v:L,in:0,out:0})}),t.forEach(b.edges(),function(L){var T=w.edge(L.v,L.w)||0,j=m(L),I=T+j;w.setEdge(L.v,L.w,I),P=Math.max(P,w.node(L.v).out+=j),k=Math.max(k,w.node(L.w).in+=j)});var S=t.range(P+k+3).map(function(){return new a}),M=k+1;return t.forEach(w.nodes(),function(L){p(S,M,w.node(L))}),{graph:w,buckets:S,zeroIdx:M}}function p(b,m,w){w.out?w.in?b[w.out-w.in+m].enqueue(w):b[b.length-1].enqueue(w):b[0].enqueue(w)}return uM}var cM,MY;function Lbe(){if(MY)return cM;MY=1;var t=Di(),r=Ibe();cM={run:a,undo:c};function a(l){var h=l.graph().acyclicer==="greedy"?r(l,d(l)):s(l);t.forEach(h,function(p){var b=l.edge(p);l.removeEdge(p),b.forwardName=p.name,b.reversed=!0,l.setEdge(p.w,p.v,b,t.uniqueId("rev"))});function d(p){return function(b){return p.edge(b).weight}}}function s(l){var h=[],d={},p={};function b(m){t.has(p,m)||(p[m]=!0,d[m]=!0,t.forEach(l.outEdges(m),function(w){t.has(d,w.w)?h.push(w):b(w.w)}),delete d[m])}return t.forEach(l.nodes(),b),h}function c(l){t.forEach(l.edges(),function(h){var d=l.edge(h);if(d.reversed){l.removeEdge(h);var p=d.forwardName;delete d.reversed,delete d.forwardName,l.setEdge(h.w,h.v,d,p)}})}return cM}var lM,jY;function zs(){if(jY)return lM;jY=1;var t=Di(),r=gc().Graph;lM={addDummyNode:a,simplify:s,asNonCompoundGraph:c,successorWeights:l,predecessorWeights:h,intersectRect:d,buildLayerMatrix:p,normalizeRanks:b,removeEmptyRanks:m,addBorderNode:w,maxRank:k,partition:P,time:S,notime:M};function a(L,T,j,I){var R;do R=t.uniqueId(I);while(L.hasNode(R));return j.dummy=T,L.setNode(R,j),R}function s(L){var T=new r().setGraph(L.graph());return t.forEach(L.nodes(),function(j){T.setNode(j,L.node(j))}),t.forEach(L.edges(),function(j){var I=T.edge(j.v,j.w)||{weight:0,minlen:1},R=L.edge(j);T.setEdge(j.v,j.w,{weight:I.weight+R.weight,minlen:Math.max(I.minlen,R.minlen)})}),T}function c(L){var T=new r({multigraph:L.isMultigraph()}).setGraph(L.graph());return t.forEach(L.nodes(),function(j){L.children(j).length||T.setNode(j,L.node(j))}),t.forEach(L.edges(),function(j){T.setEdge(j,L.edge(j))}),T}function l(L){var T=t.map(L.nodes(),function(j){var I={};return t.forEach(L.outEdges(j),function(R){I[R.w]=(I[R.w]||0)+L.edge(R).weight}),I});return t.zipObject(L.nodes(),T)}function h(L){var T=t.map(L.nodes(),function(j){var I={};return t.forEach(L.inEdges(j),function(R){I[R.v]=(I[R.v]||0)+L.edge(R).weight}),I});return t.zipObject(L.nodes(),T)}function d(L,T){var j=L.x,I=L.y,R=T.x-j,B=T.y-I,F=L.width/2,z=L.height/2;if(!R&&!B)throw new Error("Not possible to find intersection inside of the rectangle");var D,H;return Math.abs(B)*F>Math.abs(R)*z?(B<0&&(z=-z),D=z*R/B,H=z):(R<0&&(F=-F),D=F,H=F*B/R),{x:j+D,y:I+H}}function p(L){var T=t.map(t.range(k(L)+1),function(){return[]});return t.forEach(L.nodes(),function(j){var I=L.node(j),R=I.rank;t.isUndefined(R)||(T[R][I.order]=j)}),T}function b(L){var T=t.min(t.map(L.nodes(),function(j){return L.node(j).rank}));t.forEach(L.nodes(),function(j){var I=L.node(j);t.has(I,"rank")&&(I.rank-=T)})}function m(L){var T=t.min(t.map(L.nodes(),function(B){return L.node(B).rank})),j=[];t.forEach(L.nodes(),function(B){var F=L.node(B).rank-T;j[F]||(j[F]=[]),j[F].push(B)});var I=0,R=L.graph().nodeRankFactor;t.forEach(j,function(B,F){t.isUndefined(B)&&F%R!==0?--I:I&&t.forEach(B,function(z){L.node(z).rank+=I})})}function w(L,T,j,I){var R={width:0,height:0};return arguments.length>=4&&(R.rank=j,R.order=I),a(L,"border",R,T)}function k(L){return t.max(t.map(L.nodes(),function(T){var j=L.node(T).rank;if(!t.isUndefined(j))return j}))}function P(L,T){var j={lhs:[],rhs:[]};return t.forEach(L,function(I){T(I)?j.lhs.push(I):j.rhs.push(I)}),j}function S(L,T){var j=t.now();try{return T()}finally{console.log(L+" time: "+(t.now()-j)+"ms")}}function M(L,T){return T()}return lM}var fM,AY;function Obe(){if(AY)return fM;AY=1;var t=Di(),r=zs();fM={run:a,undo:c};function a(l){l.graph().dummyChains=[],t.forEach(l.edges(),function(h){s(l,h)})}function s(l,h){var d=h.v,p=l.node(d).rank,b=h.w,m=l.node(b).rank,w=h.name,k=l.edge(h),P=k.labelRank;if(m!==p+1){l.removeEdge(h);var S,M,L;for(L=0,++p;p<m;++L,++p)k.points=[],M={width:0,height:0,edgeLabel:k,edgeObj:h,rank:p},S=r.addDummyNode(l,"edge",M,"_d"),p===P&&(M.width=k.width,M.height=k.height,M.dummy="edge-label",M.labelpos=k.labelpos),l.setEdge(d,S,{weight:k.weight},w),L===0&&l.graph().dummyChains.push(S),d=S;l.setEdge(d,b,{weight:k.weight},w)}}function c(l){t.forEach(l.graph().dummyChains,function(h){var d=l.node(h),p=d.edgeLabel,b;for(l.setEdge(d.edgeObj,p);d.dummy;)b=l.successors(h)[0],l.removeNode(h),p.points.push({x:d.x,y:d.y}),d.dummy==="edge-label"&&(p.x=d.x,p.y=d.y,p.width=d.width,p.height=d.height),h=b,d=l.node(h)})}return fM}var hM,IY;function g2(){if(IY)return hM;IY=1;var t=Di();hM={longestPath:r,slack:a};function r(s){var c={};function l(h){var d=s.node(h);if(t.has(c,h))return d.rank;c[h]=!0;var p=t.min(t.map(s.outEdges(h),function(b){return l(b.w)-s.edge(b).minlen}));return(p===Number.POSITIVE_INFINITY||p===void 0||p===null)&&(p=0),d.rank=p}t.forEach(s.sources(),l)}function a(s,c){return s.node(c.w).rank-s.node(c.v).rank-s.edge(c).minlen}return hM}var dM,LY;function OY(){if(LY)return dM;LY=1;var t=Di(),r=gc().Graph,a=g2().slack;dM=s;function s(d){var p=new r({directed:!1}),b=d.nodes()[0],m=d.nodeCount();p.setNode(b,{});for(var w,k;c(p,d)<m;)w=l(p,d),k=p.hasNode(w.v)?a(d,w):-a(d,w),h(p,d,k);return p}function c(d,p){function b(m){t.forEach(p.nodeEdges(m),function(w){var k=w.v,P=m===k?w.w:k;!d.hasNode(P)&&!a(p,w)&&(d.setNode(P,{}),d.setEdge(m,P,{}),b(P))})}return t.forEach(d.nodes(),b),d.nodeCount()}function l(d,p){return t.minBy(p.edges(),function(b){if(d.hasNode(b.v)!==d.hasNode(b.w))return a(p,b)})}function h(d,p,b){t.forEach(d.nodes(),function(m){p.node(m).rank+=b})}return dM}var pM,RY;function Rbe(){if(RY)return pM;RY=1;var t=Di(),r=OY(),a=g2().slack,s=g2().longestPath,c=gc().alg.preorder,l=gc().alg.postorder,h=zs().simplify;pM=d,d.initLowLimValues=w,d.initCutValues=p,d.calcCutValue=m,d.leaveEdge=P,d.enterEdge=S,d.exchangeEdges=M;function d(I){I=h(I),s(I);var R=r(I);w(R),p(R,I);for(var B,F;B=P(R);)F=S(R,I,B),M(R,I,B,F)}function p(I,R){var B=l(I,I.nodes());B=B.slice(0,B.length-1),t.forEach(B,function(F){b(I,R,F)})}function b(I,R,B){var F=I.node(B),z=F.parent;I.edge(B,z).cutvalue=m(I,R,B)}function m(I,R,B){var F=I.node(B),z=F.parent,D=!0,H=R.edge(B,z),Q=0;return H||(D=!1,H=R.edge(z,B)),Q=H.weight,t.forEach(R.nodeEdges(B),function(q){var Z=q.v===B,J=Z?q.w:q.v;if(J!==z){var K=Z===D,ae=R.edge(q).weight;if(Q+=K?ae:-ae,T(I,B,J)){var se=I.edge(B,J).cutvalue;Q+=K?-se:se}}}),Q}function w(I,R){arguments.length<2&&(R=I.nodes()[0]),k(I,{},1,R)}function k(I,R,B,F,z){var D=B,H=I.node(F);return R[F]=!0,t.forEach(I.neighbors(F),function(Q){t.has(R,Q)||(B=k(I,R,B,Q,F))}),H.low=D,H.lim=B++,z?H.parent=z:delete H.parent,B}function P(I){return t.find(I.edges(),function(R){return I.edge(R).cutvalue<0})}function S(I,R,B){var F=B.v,z=B.w;R.hasEdge(F,z)||(F=B.w,z=B.v);var D=I.node(F),H=I.node(z),Q=D,q=!1;D.lim>H.lim&&(Q=H,q=!0);var Z=t.filter(R.edges(),function(J){return q===j(I,I.node(J.v),Q)&&q!==j(I,I.node(J.w),Q)});return t.minBy(Z,function(J){return a(R,J)})}function M(I,R,B,F){var z=B.v,D=B.w;I.removeEdge(z,D),I.setEdge(F.v,F.w,{}),w(I),p(I,R),L(I,R)}function L(I,R){var B=t.find(I.nodes(),function(z){return!R.node(z).parent}),F=c(I,B);F=F.slice(1),t.forEach(F,function(z){var D=I.node(z).parent,H=R.edge(z,D),Q=!1;H||(H=R.edge(D,z),Q=!0),R.node(z).rank=R.node(D).rank+(Q?H.minlen:-H.minlen)})}function T(I,R,B){return I.hasEdge(R,B)}function j(I,R,B){return B.low<=R.lim&&R.lim<=B.lim}return pM}var gM,DY;function Dbe(){if(DY)return gM;DY=1;var t=g2(),r=t.longestPath,a=OY(),s=Rbe();gM=c;function c(p){switch(p.graph().ranker){case"network-simplex":d(p);break;case"tight-tree":h(p);break;case"longest-path":l(p);break;default:d(p)}}var l=r;function h(p){r(p),a(p)}function d(p){s(p)}return gM}var bM,BY;function Bbe(){if(BY)return bM;BY=1;var t=Di();bM=r;function r(c){var l=s(c);t.forEach(c.graph().dummyChains,function(h){for(var d=c.node(h),p=d.edgeObj,b=a(c,l,p.v,p.w),m=b.path,w=b.lca,k=0,P=m[k],S=!0;h!==p.w;){if(d=c.node(h),S){for(;(P=m[k])!==w&&c.node(P).maxRank<d.rank;)k++;P===w&&(S=!1)}if(!S){for(;k<m.length-1&&c.node(P=m[k+1]).minRank<=d.rank;)k++;P=m[k]}c.setParent(h,P),h=c.successors(h)[0]}})}function a(c,l,h,d){var p=[],b=[],m=Math.min(l[h].low,l[d].low),w=Math.max(l[h].lim,l[d].lim),k,P;k=h;do k=c.parent(k),p.push(k);while(k&&(l[k].low>m||w>l[k].lim));for(P=k,k=d;(k=c.parent(k))!==P;)b.push(k);return{path:p.concat(b.reverse()),lca:P}}function s(c){var l={},h=0;function d(p){var b=h;t.forEach(c.children(p),d),l[p]={low:b,lim:h++}}return t.forEach(c.children(),d),l}return bM}var vM,GY;function Gbe(){if(GY)return vM;GY=1;var t=Di(),r=zs();vM={run:a,cleanup:h};function a(d){var p=r.addDummyNode(d,"root",{},"_root"),b=c(d),m=t.max(t.values(b))-1,w=2*m+1;d.graph().nestingRoot=p,t.forEach(d.edges(),function(P){d.edge(P).minlen*=w});var k=l(d)+1;t.forEach(d.children(),function(P){s(d,p,w,k,m,b,P)}),d.graph().nodeRankFactor=w}function s(d,p,b,m,w,k,P){var S=d.children(P);if(!S.length){P!==p&&d.setEdge(p,P,{weight:0,minlen:b});return}var M=r.addBorderNode(d,"_bt"),L=r.addBorderNode(d,"_bb"),T=d.node(P);d.setParent(M,P),T.borderTop=M,d.setParent(L,P),T.borderBottom=L,t.forEach(S,function(j){s(d,p,b,m,w,k,j);var I=d.node(j),R=I.borderTop?I.borderTop:j,B=I.borderBottom?I.borderBottom:j,F=I.borderTop?m:2*m,z=R!==B?1:w-k[P]+1;d.setEdge(M,R,{weight:F,minlen:z,nestingEdge:!0}),d.setEdge(B,L,{weight:F,minlen:z,nestingEdge:!0})}),d.parent(P)||d.setEdge(p,M,{weight:0,minlen:w+k[P]})}function c(d){var p={};function b(m,w){var k=d.children(m);k&&k.length&&t.forEach(k,function(P){b(P,w+1)}),p[m]=w}return t.forEach(d.children(),function(m){b(m,1)}),p}function l(d){return t.reduce(d.edges(),function(p,b){return p+d.edge(b).weight},0)}function h(d){var p=d.graph();d.removeNode(p.nestingRoot),delete p.nestingRoot,t.forEach(d.edges(),function(b){var m=d.edge(b);m.nestingEdge&&d.removeEdge(b)})}return vM}var yM,HY;function Hbe(){if(HY)return yM;HY=1;var t=Di(),r=zs();yM=a;function a(c){function l(h){var d=c.children(h),p=c.node(h);if(d.length&&t.forEach(d,l),t.has(p,"minRank")){p.borderLeft=[],p.borderRight=[];for(var b=p.minRank,m=p.maxRank+1;b<m;++b)s(c,"borderLeft","_bl",h,p,b),s(c,"borderRight","_br",h,p,b)}}t.forEach(c.children(),l)}function s(c,l,h,d,p,b){var m={width:0,height:0,rank:b,borderType:l},w=p[l][b-1],k=r.addDummyNode(c,"border",m,h);p[l][b]=k,c.setParent(k,d),w&&c.setEdge(w,k,{weight:1})}return yM}var mM,zY;function zbe(){if(zY)return mM;zY=1;var t=Di();mM={adjust:r,undo:a};function r(b){var m=b.graph().rankdir.toLowerCase();(m==="lr"||m==="rl")&&s(b)}function a(b){var m=b.graph().rankdir.toLowerCase();(m==="bt"||m==="rl")&&l(b),(m==="lr"||m==="rl")&&(d(b),s(b))}function s(b){t.forEach(b.nodes(),function(m){c(b.node(m))}),t.forEach(b.edges(),function(m){c(b.edge(m))})}function c(b){var m=b.width;b.width=b.height,b.height=m}function l(b){t.forEach(b.nodes(),function(m){h(b.node(m))}),t.forEach(b.edges(),function(m){var w=b.edge(m);t.forEach(w.points,h),t.has(w,"y")&&h(w)})}function h(b){b.y=-b.y}function d(b){t.forEach(b.nodes(),function(m){p(b.node(m))}),t.forEach(b.edges(),function(m){var w=b.edge(m);t.forEach(w.points,p),t.has(w,"x")&&p(w)})}function p(b){var m=b.x;b.x=b.y,b.y=m}return mM}var wM,FY;function Fbe(){if(FY)return wM;FY=1;var t=Di();wM=r;function r(a){var s={},c=t.filter(a.nodes(),function(b){return!a.children(b).length}),l=t.max(t.map(c,function(b){return a.node(b).rank})),h=t.map(t.range(l+1),function(){return[]});function d(b){if(!t.has(s,b)){s[b]=!0;var m=a.node(b);h[m.rank].push(b),t.forEach(a.successors(b),d)}}var p=t.sortBy(c,function(b){return a.node(b).rank});return t.forEach(p,d),h}return wM}var xM,UY;function Ube(){if(UY)return xM;UY=1;var t=Di();xM=r;function r(s,c){for(var l=0,h=1;h<c.length;++h)l+=a(s,c[h-1],c[h]);return l}function a(s,c,l){for(var h=t.zipObject(l,t.map(l,function(k,P){return P})),d=t.flatten(t.map(c,function(k){return t.sortBy(t.map(s.outEdges(k),function(P){return{pos:h[P.w],weight:s.edge(P).weight}}),"pos")}),!0),p=1;p<l.length;)p<<=1;var b=2*p-1;p-=1;var m=t.map(new Array(b),function(){return 0}),w=0;return t.forEach(d.forEach(function(k){var P=k.pos+p;m[P]+=k.weight;for(var S=0;P>0;)P%2&&(S+=m[P+1]),P=P-1>>1,m[P]+=k.weight;w+=k.weight*S})),w}return xM}var kM,YY;function Ybe(){if(YY)return kM;YY=1;var t=Di();kM=r;function r(a,s){return t.map(s,function(c){var l=a.inEdges(c);if(l.length){var h=t.reduce(l,function(d,p){var b=a.edge(p),m=a.node(p.v);return{sum:d.sum+b.weight*m.order,weight:d.weight+b.weight}},{sum:0,weight:0});return{v:c,barycenter:h.sum/h.weight,weight:h.weight}}else return{v:c}})}return kM}var _M,VY;function Vbe(){if(VY)return _M;VY=1;var t=Di();_M=r;function r(c,l){var h={};t.forEach(c,function(p,b){var m=h[p.v]={indegree:0,in:[],out:[],vs:[p.v],i:b};t.isUndefined(p.barycenter)||(m.barycenter=p.barycenter,m.weight=p.weight)}),t.forEach(l.edges(),function(p){var b=h[p.v],m=h[p.w];!t.isUndefined(b)&&!t.isUndefined(m)&&(m.indegree++,b.out.push(h[p.w]))});var d=t.filter(h,function(p){return!p.indegree});return a(d)}function a(c){var l=[];function h(b){return function(m){m.merged||(t.isUndefined(m.barycenter)||t.isUndefined(b.barycenter)||m.barycenter>=b.barycenter)&&s(b,m)}}function d(b){return function(m){m.in.push(b),--m.indegree===0&&c.push(m)}}for(;c.length;){var p=c.pop();l.push(p),t.forEach(p.in.reverse(),h(p)),t.forEach(p.out,d(p))}return t.map(t.filter(l,function(b){return!b.merged}),function(b){return t.pick(b,["vs","i","barycenter","weight"])})}function s(c,l){var h=0,d=0;c.weight&&(h+=c.barycenter*c.weight,d+=c.weight),l.weight&&(h+=l.barycenter*l.weight,d+=l.weight),c.vs=l.vs.concat(c.vs),c.barycenter=h/d,c.weight=d,c.i=Math.min(l.i,c.i),l.merged=!0}return _M}var EM,qY;function qbe(){if(qY)return EM;qY=1;var t=Di(),r=zs();EM=a;function a(l,h){var d=r.partition(l,function(M){return t.has(M,"barycenter")}),p=d.lhs,b=t.sortBy(d.rhs,function(M){return-M.i}),m=[],w=0,k=0,P=0;p.sort(c(!!h)),P=s(m,b,P),t.forEach(p,function(M){P+=M.vs.length,m.push(M.vs),w+=M.barycenter*M.weight,k+=M.weight,P=s(m,b,P)});var S={vs:t.flatten(m,!0)};return k&&(S.barycenter=w/k,S.weight=k),S}function s(l,h,d){for(var p;h.length&&(p=t.last(h)).i<=d;)h.pop(),l.push(p.vs),d++;return d}function c(l){return function(h,d){return h.barycenter<d.barycenter?-1:h.barycenter>d.barycenter?1:l?d.i-h.i:h.i-d.i}}return EM}var CM,ZY;function Zbe(){if(ZY)return CM;ZY=1;var t=Di(),r=Ybe(),a=Vbe(),s=qbe();CM=c;function c(d,p,b,m){var w=d.children(p),k=d.node(p),P=k?k.borderLeft:void 0,S=k?k.borderRight:void 0,M={};P&&(w=t.filter(w,function(B){return B!==P&&B!==S}));var L=r(d,w);t.forEach(L,function(B){if(d.children(B.v).length){var F=c(d,B.v,b,m);M[B.v]=F,t.has(F,"barycenter")&&h(B,F)}});var T=a(L,b);l(T,M);var j=s(T,m);if(P&&(j.vs=t.flatten([P,j.vs,S],!0),d.predecessors(P).length)){var I=d.node(d.predecessors(P)[0]),R=d.node(d.predecessors(S)[0]);t.has(j,"barycenter")||(j.barycenter=0,j.weight=0),j.barycenter=(j.barycenter*j.weight+I.order+R.order)/(j.weight+2),j.weight+=2}return j}function l(d,p){t.forEach(d,function(b){b.vs=t.flatten(b.vs.map(function(m){return p[m]?p[m].vs:m}),!0)})}function h(d,p){t.isUndefined(d.barycenter)?(d.barycenter=p.barycenter,d.weight=p.weight):(d.barycenter=(d.barycenter*d.weight+p.barycenter*p.weight)/(d.weight+p.weight),d.weight+=p.weight)}return CM}var PM,$Y;function $be(){if($Y)return PM;$Y=1;var t=Di(),r=gc().Graph;PM=a;function a(c,l,h){var d=s(c),p=new r({compound:!0}).setGraph({root:d}).setDefaultNodeLabel(function(b){return c.node(b)});return t.forEach(c.nodes(),function(b){var m=c.node(b),w=c.parent(b);(m.rank===l||m.minRank<=l&&l<=m.maxRank)&&(p.setNode(b),p.setParent(b,w||d),t.forEach(c[h](b),function(k){var P=k.v===b?k.w:k.v,S=p.edge(P,b),M=t.isUndefined(S)?0:S.weight;p.setEdge(P,b,{weight:c.edge(k).weight+M})}),t.has(m,"minRank")&&p.setNode(b,{borderLeft:m.borderLeft[l],borderRight:m.borderRight[l]}))}),p}function s(c){for(var l;c.hasNode(l=t.uniqueId("_root")););return l}return PM}var SM,KY;function Kbe(){if(KY)return SM;KY=1;var t=Di();SM=r;function r(a,s,c){var l={},h;t.forEach(c,function(d){for(var p=a.parent(d),b,m;p;){if(b=a.parent(p),b?(m=l[b],l[b]=p):(m=h,h=p),m&&m!==p){s.setEdge(m,p);return}p=b}})}return SM}var NM,QY;function Qbe(){if(QY)return NM;QY=1;var t=Di(),r=Fbe(),a=Ube(),s=Zbe(),c=$be(),l=Kbe(),h=gc().Graph,d=zs();NM=p;function p(k){var P=d.maxRank(k),S=b(k,t.range(1,P+1),"inEdges"),M=b(k,t.range(P-1,-1,-1),"outEdges"),L=r(k);w(k,L);for(var T=Number.POSITIVE_INFINITY,j,I=0,R=0;R<4;++I,++R){m(I%2?S:M,I%4>=2),L=d.buildLayerMatrix(k);var B=a(k,L);B<T&&(R=0,j=t.cloneDeep(L),T=B)}w(k,j)}function b(k,P,S){return t.map(P,function(M){return c(k,M,S)})}function m(k,P){var S=new h;t.forEach(k,function(M){var L=M.graph().root,T=s(M,L,S,P);t.forEach(T.vs,function(j,I){M.node(j).order=I}),l(M,S,T.vs)})}function w(k,P){t.forEach(P,function(S){t.forEach(S,function(M,L){k.node(M).order=L})})}return NM}var TM,WY;function Wbe(){if(WY)return TM;WY=1;var t=Di(),r=gc().Graph,a=zs();TM={positionX:S,findType1Conflicts:s,findType2Conflicts:c,addConflict:h,hasConflict:d,verticalAlignment:p,horizontalCompaction:b,alignCoordinates:k,findSmallestWidthAlignment:w,balance:P};function s(T,j){var I={};function R(B,F){var z=0,D=0,H=B.length,Q=t.last(F);return t.forEach(F,function(q,Z){var J=l(T,q),K=J?T.node(J).order:H;(J||q===Q)&&(t.forEach(F.slice(D,Z+1),function(ae){t.forEach(T.predecessors(ae),function(se){var le=T.node(se),he=le.order;(he<z||K<he)&&!(le.dummy&&T.node(ae).dummy)&&h(I,se,ae)})}),D=Z+1,z=K)}),F}return t.reduce(j,R),I}function c(T,j){var I={};function R(F,z,D,H,Q){var q;t.forEach(t.range(z,D),function(Z){q=F[Z],T.node(q).dummy&&t.forEach(T.predecessors(q),function(J){var K=T.node(J);K.dummy&&(K.order<H||K.order>Q)&&h(I,J,q)})})}function B(F,z){var D=-1,H,Q=0;return t.forEach(z,function(q,Z){if(T.node(q).dummy==="border"){var J=T.predecessors(q);J.length&&(H=T.node(J[0]).order,R(z,Q,Z,D,H),Q=Z,D=H)}R(z,Q,z.length,H,F.length)}),z}return t.reduce(j,B),I}function l(T,j){if(T.node(j).dummy)return t.find(T.predecessors(j),function(I){return T.node(I).dummy})}function h(T,j,I){if(j>I){var R=j;j=I,I=R}var B=T[j];B||(T[j]=B={}),B[I]=!0}function d(T,j,I){if(j>I){var R=j;j=I,I=R}return t.has(T[j],I)}function p(T,j,I,R){var B={},F={},z={};return t.forEach(j,function(D){t.forEach(D,function(H,Q){B[H]=H,F[H]=H,z[H]=Q})}),t.forEach(j,function(D){var H=-1;t.forEach(D,function(Q){var q=R(Q);if(q.length){q=t.sortBy(q,function(se){return z[se]});for(var Z=(q.length-1)/2,J=Math.floor(Z),K=Math.ceil(Z);J<=K;++J){var ae=q[J];F[Q]===Q&&H<z[ae]&&!d(I,Q,ae)&&(F[ae]=Q,F[Q]=B[Q]=B[ae],H=z[ae])}}})}),{root:B,align:F}}function b(T,j,I,R,B){var F={},z=m(T,j,I,B),D=B?"borderLeft":"borderRight";function H(Z,J){for(var K=z.nodes(),ae=K.pop(),se={};ae;)se[ae]?Z(ae):(se[ae]=!0,K.push(ae),K=K.concat(J(ae))),ae=K.pop()}function Q(Z){F[Z]=z.inEdges(Z).reduce(function(J,K){return Math.max(J,F[K.v]+z.edge(K))},0)}function q(Z){var J=z.outEdges(Z).reduce(function(ae,se){return Math.min(ae,F[se.w]-z.edge(se))},Number.POSITIVE_INFINITY),K=T.node(Z);J!==Number.POSITIVE_INFINITY&&K.borderType!==D&&(F[Z]=Math.max(F[Z],J))}return H(Q,z.predecessors.bind(z)),H(q,z.successors.bind(z)),t.forEach(R,function(Z){F[Z]=F[I[Z]]}),F}function m(T,j,I,R){var B=new r,F=T.graph(),z=M(F.nodesep,F.edgesep,R);return t.forEach(j,function(D){var H;t.forEach(D,function(Q){var q=I[Q];if(B.setNode(q),H){var Z=I[H],J=B.edge(Z,q);B.setEdge(Z,q,Math.max(z(T,Q,H),J||0))}H=Q})}),B}function w(T,j){return t.minBy(t.values(j),function(I){var R=Number.NEGATIVE_INFINITY,B=Number.POSITIVE_INFINITY;return t.forIn(I,function(F,z){var D=L(T,z)/2;R=Math.max(F+D,R),B=Math.min(F-D,B)}),R-B})}function k(T,j){var I=t.values(j),R=t.min(I),B=t.max(I);t.forEach(["u","d"],function(F){t.forEach(["l","r"],function(z){var D=F+z,H=T[D],Q;if(H!==j){var q=t.values(H);Q=z==="l"?R-t.min(q):B-t.max(q),Q&&(T[D]=t.mapValues(H,function(Z){return Z+Q}))}})})}function P(T,j){return t.mapValues(T.ul,function(I,R){if(j)return T[j.toLowerCase()][R];var B=t.sortBy(t.map(T,R));return(B[1]+B[2])/2})}function S(T){var j=a.buildLayerMatrix(T),I=t.merge(s(T,j),c(T,j)),R={},B;t.forEach(["u","d"],function(z){B=z==="u"?j:t.values(j).reverse(),t.forEach(["l","r"],function(D){D==="r"&&(B=t.map(B,function(Z){return t.values(Z).reverse()}));var H=(z==="u"?T.predecessors:T.successors).bind(T),Q=p(T,B,I,H),q=b(T,B,Q.root,Q.align,D==="r");D==="r"&&(q=t.mapValues(q,function(Z){return-Z})),R[z+D]=q})});var F=w(T,R);return k(R,F),P(R,T.graph().align)}function M(T,j,I){return function(R,B,F){var z=R.node(B),D=R.node(F),H=0,Q;if(H+=z.width/2,t.has(z,"labelpos"))switch(z.labelpos.toLowerCase()){case"l":Q=-z.width/2;break;case"r":Q=z.width/2;break}if(Q&&(H+=I?Q:-Q),Q=0,H+=(z.dummy?j:T)/2,H+=(D.dummy?j:T)/2,H+=D.width/2,t.has(D,"labelpos"))switch(D.labelpos.toLowerCase()){case"l":Q=D.width/2;break;case"r":Q=-D.width/2;break}return Q&&(H+=I?Q:-Q),Q=0,H}}function L(T,j){return T.node(j).width}return TM}var MM,JY;function Jbe(){if(JY)return MM;JY=1;var t=Di(),r=zs(),a=Wbe().positionX;MM=s;function s(l){l=r.asNonCompoundGraph(l),c(l),t.forEach(a(l),function(h,d){l.node(d).x=h})}function c(l){var h=r.buildLayerMatrix(l),d=l.graph().ranksep,p=0;t.forEach(h,function(b){var m=t.max(t.map(b,function(w){return l.node(w).height}));t.forEach(b,function(w){l.node(w).y=p+m/2}),p+=m+d})}return MM}var jM,XY;function Xbe(){if(XY)return jM;XY=1;var t=Di(),r=Lbe(),a=Obe(),s=Dbe(),c=zs().normalizeRanks,l=Bbe(),h=zs().removeEmptyRanks,d=Gbe(),p=Hbe(),b=zbe(),m=Qbe(),w=Jbe(),k=zs(),P=gc().Graph;jM=S;function S(ge,xe){var Se=xe&&xe.debugTiming?k.time:k.notime;Se("layout",function(){var Le=Se(" buildLayoutGraph",function(){return H(ge)});Se(" runLayout",function(){M(Le,Se)}),Se(" updateInputGraph",function(){L(ge,Le)})})}function M(ge,xe){xe(" makeSpaceForEdgeLabels",function(){Q(ge)}),xe(" removeSelfEdges",function(){fe(ge)}),xe(" acyclic",function(){r.run(ge)}),xe(" nestingGraph.run",function(){d.run(ge)}),xe(" rank",function(){s(k.asNonCompoundGraph(ge))}),xe(" injectEdgeLabelProxies",function(){q(ge)}),xe(" removeEmptyRanks",function(){h(ge)}),xe(" nestingGraph.cleanup",function(){d.cleanup(ge)}),xe(" normalizeRanks",function(){c(ge)}),xe(" assignRankMinMax",function(){Z(ge)}),xe(" removeEdgeLabelProxies",function(){J(ge)}),xe(" normalize.run",function(){a.run(ge)}),xe(" parentDummyChains",function(){l(ge)}),xe(" addBorderSegments",function(){p(ge)}),xe(" order",function(){m(ge)}),xe(" insertSelfEdges",function(){pe(ge)}),xe(" adjustCoordinateSystem",function(){b.adjust(ge)}),xe(" position",function(){w(ge)}),xe(" positionSelfEdges",function(){me(ge)}),xe(" removeBorderNodes",function(){he(ge)}),xe(" normalize.undo",function(){a.undo(ge)}),xe(" fixupEdgeLabelCoords",function(){se(ge)}),xe(" undoCoordinateSystem",function(){b.undo(ge)}),xe(" translateGraph",function(){K(ge)}),xe(" assignNodeIntersects",function(){ae(ge)}),xe(" reversePoints",function(){le(ge)}),xe(" acyclic.undo",function(){r.undo(ge)})}function L(ge,xe){t.forEach(ge.nodes(),function(Se){var Le=ge.node(Se),De=xe.node(Se);Le&&(Le.x=De.x,Le.y=De.y,xe.children(Se).length&&(Le.width=De.width,Le.height=De.height))}),t.forEach(ge.edges(),function(Se){var Le=ge.edge(Se),De=xe.edge(Se);Le.points=De.points,t.has(De,"x")&&(Le.x=De.x,Le.y=De.y)}),ge.graph().width=xe.graph().width,ge.graph().height=xe.graph().height}var T=["nodesep","edgesep","ranksep","marginx","marginy"],j={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I=["acyclicer","ranker","rankdir","align"],R=["width","height"],B={width:0,height:0},F=["minlen","weight","width","height","labeloffset"],z={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},D=["labelpos"];function H(ge){var xe=new P({multigraph:!0,compound:!0}),Se=Oe(ge.graph());return xe.setGraph(t.merge({},j,Te(Se,T),t.pick(Se,I))),t.forEach(ge.nodes(),function(Le){var De=Oe(ge.node(Le));xe.setNode(Le,t.defaults(Te(De,R),B)),xe.setParent(Le,ge.parent(Le))}),t.forEach(ge.edges(),function(Le){var De=Oe(ge.edge(Le));xe.setEdge(Le,t.merge({},z,Te(De,F),t.pick(De,D)))}),xe}function Q(ge){var xe=ge.graph();xe.ranksep/=2,t.forEach(ge.edges(),function(Se){var Le=ge.edge(Se);Le.minlen*=2,Le.labelpos.toLowerCase()!=="c"&&(xe.rankdir==="TB"||xe.rankdir==="BT"?Le.width+=Le.labeloffset:Le.height+=Le.labeloffset)})}function q(ge){t.forEach(ge.edges(),function(xe){var Se=ge.edge(xe);if(Se.width&&Se.height){var Le=ge.node(xe.v),De=ge.node(xe.w),Ne={rank:(De.rank-Le.rank)/2+Le.rank,e:xe};k.addDummyNode(ge,"edge-proxy",Ne,"_ep")}})}function Z(ge){var xe=0;t.forEach(ge.nodes(),function(Se){var Le=ge.node(Se);Le.borderTop&&(Le.minRank=ge.node(Le.borderTop).rank,Le.maxRank=ge.node(Le.borderBottom).rank,xe=t.max(xe,Le.maxRank))}),ge.graph().maxRank=xe}function J(ge){t.forEach(ge.nodes(),function(xe){var Se=ge.node(xe);Se.dummy==="edge-proxy"&&(ge.edge(Se.e).labelRank=Se.rank,ge.removeNode(xe))})}function K(ge){var xe=Number.POSITIVE_INFINITY,Se=0,Le=Number.POSITIVE_INFINITY,De=0,Ne=ge.graph(),Me=Ne.marginx||0,ke=Ne.marginy||0;function He(Qe){var it=Qe.x,ft=Qe.y,ze=Qe.width,$e=Qe.height;xe=Math.min(xe,it-ze/2),Se=Math.max(Se,it+ze/2),Le=Math.min(Le,ft-$e/2),De=Math.max(De,ft+$e/2)}t.forEach(ge.nodes(),function(Qe){He(ge.node(Qe))}),t.forEach(ge.edges(),function(Qe){var it=ge.edge(Qe);t.has(it,"x")&&He(it)}),xe-=Me,Le-=ke,t.forEach(ge.nodes(),function(Qe){var it=ge.node(Qe);it.x-=xe,it.y-=Le}),t.forEach(ge.edges(),function(Qe){var it=ge.edge(Qe);t.forEach(it.points,function(ft){ft.x-=xe,ft.y-=Le}),t.has(it,"x")&&(it.x-=xe),t.has(it,"y")&&(it.y-=Le)}),Ne.width=Se-xe+Me,Ne.height=De-Le+ke}function ae(ge){t.forEach(ge.edges(),function(xe){var Se=ge.edge(xe),Le=ge.node(xe.v),De=ge.node(xe.w),Ne,Me;Se.points?(Ne=Se.points[0],Me=Se.points[Se.points.length-1]):(Se.points=[],Ne=De,Me=Le),Se.points.unshift(k.intersectRect(Le,Ne)),Se.points.push(k.intersectRect(De,Me))})}function se(ge){t.forEach(ge.edges(),function(xe){var Se=ge.edge(xe);if(t.has(Se,"x"))switch((Se.labelpos==="l"||Se.labelpos==="r")&&(Se.width-=Se.labeloffset),Se.labelpos){case"l":Se.x-=Se.width/2+Se.labeloffset;break;case"r":Se.x+=Se.width/2+Se.labeloffset;break}})}function le(ge){t.forEach(ge.edges(),function(xe){var Se=ge.edge(xe);Se.reversed&&Se.points.reverse()})}function he(ge){t.forEach(ge.nodes(),function(xe){if(ge.children(xe).length){var Se=ge.node(xe),Le=ge.node(Se.borderTop),De=ge.node(Se.borderBottom),Ne=ge.node(t.last(Se.borderLeft)),Me=ge.node(t.last(Se.borderRight));Se.width=Math.abs(Me.x-Ne.x),Se.height=Math.abs(De.y-Le.y),Se.x=Ne.x+Se.width/2,Se.y=Le.y+Se.height/2}}),t.forEach(ge.nodes(),function(xe){ge.node(xe).dummy==="border"&&ge.removeNode(xe)})}function fe(ge){t.forEach(ge.edges(),function(xe){if(xe.v===xe.w){var Se=ge.node(xe.v);Se.selfEdges||(Se.selfEdges=[]),Se.selfEdges.push({e:xe,label:ge.edge(xe)}),ge.removeEdge(xe)}})}function pe(ge){var xe=k.buildLayerMatrix(ge);t.forEach(xe,function(Se){var Le=0;t.forEach(Se,function(De,Ne){var Me=ge.node(De);Me.order=Ne+Le,t.forEach(Me.selfEdges,function(ke){k.addDummyNode(ge,"selfedge",{width:ke.label.width,height:ke.label.height,rank:Me.rank,order:Ne+ ++Le,e:ke.e,label:ke.label},"_se")}),delete Me.selfEdges})})}function me(ge){t.forEach(ge.nodes(),function(xe){var Se=ge.node(xe);if(Se.dummy==="selfedge"){var Le=ge.node(Se.e.v),De=Le.x+Le.width/2,Ne=Le.y,Me=Se.x-De,ke=Le.height/2;ge.setEdge(Se.e,Se.label),ge.removeNode(xe),Se.label.points=[{x:De+2*Me/3,y:Ne-ke},{x:De+5*Me/6,y:Ne-ke},{x:De+Me,y:Ne},{x:De+5*Me/6,y:Ne+ke},{x:De+2*Me/3,y:Ne+ke}],Se.label.x=Se.x,Se.label.y=Se.y}})}function Te(ge,xe){return t.mapValues(t.pick(ge,xe),Number)}function Oe(ge){var xe={};return t.forEach(ge,function(Se,Le){xe[Le.toLowerCase()]=Se}),xe}return jM}var AM,eV;function eve(){if(eV)return AM;eV=1;var t=Di(),r=zs(),a=gc().Graph;AM={debugOrdering:s};function s(c){var l=r.buildLayerMatrix(c),h=new a({compound:!0,multigraph:!0}).setGraph({});return t.forEach(c.nodes(),function(d){h.setNode(d,{label:d}),h.setParent(d,"layer"+c.node(d).rank)}),t.forEach(c.edges(),function(d){h.setEdge(d.v,d.w,{},d.name)}),t.forEach(l,function(d,p){var b="layer"+p;h.setNode(b,{rank:"same"}),t.reduce(d,function(m,w){return h.setEdge(m,w,{style:"invis"}),w})}),h}return AM}var tV,nV;function tve(){return nV||(nV=1,tV="0.8.5"),tV}var rV,iV;function nve(){return iV||(iV=1,rV={graphlib:gc(),layout:Xbe(),debug:eve(),util:{time:zs().time,notime:zs().notime},version:tve()}),rV}(function(t,r){(function(a,s){t.exports=s(nve())})(Kr,function(a){return function(s){var c={};function l(h){if(c[h])return c[h].exports;var d=c[h]={i:h,l:!1,exports:{}};return s[h].call(d.exports,d,d.exports,l),d.l=!0,d.exports}return l.m=s,l.c=c,l.d=function(h,d,p){l.o(h,d)||Object.defineProperty(h,d,{enumerable:!0,get:p})},l.r=function(h){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})},l.t=function(h,d){if(d&1&&(h=l(h)),d&8||d&4&&typeof h=="object"&&h&&h.__esModule)return h;var p=Object.create(null);if(l.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:h}),d&2&&typeof h!="string")for(var b in h)l.d(p,b,(function(m){return h[m]}).bind(null,b));return p},l.n=function(h){var d=h&&h.__esModule?function(){return h.default}:function(){return h};return l.d(d,"a",d),d},l.o=function(h,d){return Object.prototype.hasOwnProperty.call(h,d)},l.p="",l(l.s=0)}([function(s,c,l){var h=l(1),d=function(p){p&&p("layout","dagre",h)};typeof cytoscape<"u"&&d(cytoscape),s.exports=d},function(s,c,l){function h(k){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(P){return typeof P}:h=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},h(k)}var d=function(k){return typeof k=="function"},p=l(2),b=l(3),m=l(4);function w(k){this.options=b({},p,k)}w.prototype.run=function(){var k=this.options,P=this,S=k.cy,M=k.eles,L=function(pe,me){return d(me)?me.apply(pe,[pe]):me},T=k.boundingBox||{x1:0,y1:0,w:S.width(),h:S.height()};T.x2===void 0&&(T.x2=T.x1+T.w),T.w===void 0&&(T.w=T.x2-T.x1),T.y2===void 0&&(T.y2=T.y1+T.h),T.h===void 0&&(T.h=T.y2-T.y1);var j=new m.graphlib.Graph({multigraph:!0,compound:!0}),I={},R=function(pe,me){me!=null&&(I[pe]=me)};R("nodesep",k.nodeSep),R("edgesep",k.edgeSep),R("ranksep",k.rankSep),R("rankdir",k.rankDir),R("align",k.align),R("ranker",k.ranker),R("acyclicer",k.acyclicer),j.setGraph(I),j.setDefaultEdgeLabel(function(){return{}}),j.setDefaultNodeLabel(function(){return{}});var B=M.nodes();d(k.sort)&&(B=B.sort(k.sort));for(var F=0;F<B.length;F++){var z=B[F],D=z.layoutDimensions(k);j.setNode(z.id(),{width:D.w,height:D.h,name:z.id()})}for(var H=0;H<B.length;H++){var Q=B[H];Q.isChild()&&j.setParent(Q.id(),Q.parent().id())}var q=M.edges().stdFilter(function(pe){return!pe.source().isParent()&&!pe.target().isParent()});d(k.sort)&&(q=q.sort(k.sort));for(var Z=0;Z<q.length;Z++){var J=q[Z];j.setEdge(J.source().id(),J.target().id(),{minlen:L(J,k.minLen),weight:L(J,k.edgeWeight),name:J.id()},J.id())}m.layout(j);for(var K=j.nodes(),ae=0;ae<K.length;ae++){var se=K[ae],le=j.node(se);S.getElementById(se).scratch().dagre=le}var he;k.boundingBox?(he={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},B.forEach(function(pe){var me=pe.scratch().dagre;he.x1=Math.min(he.x1,me.x),he.x2=Math.max(he.x2,me.x),he.y1=Math.min(he.y1,me.y),he.y2=Math.max(he.y2,me.y)}),he.w=he.x2-he.x1,he.h=he.y2-he.y1):he=T;var fe=function(pe){if(k.boundingBox){var me=he.w===0?0:(pe.x-he.x1)/he.w,Te=he.h===0?0:(pe.y-he.y1)/he.h;return{x:T.x1+me*T.w,y:T.y1+Te*T.h}}else return pe};return B.layoutPositions(P,k,function(pe){pe=h(pe)==="object"?pe:this;var me=pe.scratch().dagre;return fe({x:me.x,y:me.y})}),this},s.exports=w},function(s,c){var l={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,align:void 0,acyclicer:void 0,ranker:void 0,minLen:function(h){return 1},edgeWeight:function(h){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(h,d){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(h,d){return d},ready:function(){},sort:void 0,stop:function(){}};s.exports=l},function(s,c){s.exports=Object.assign!=null?Object.assign.bind(Object):function(l){for(var h=arguments.length,d=new Array(h>1?h-1:0),p=1;p<h;p++)d[p-1]=arguments[p];return d.forEach(function(b){Object.keys(b).forEach(function(m){return l[m]=b[m]})}),l}},function(s,c){s.exports=a}])})})(IB);var rve=IB.exports;const ive=z0(rve);var aV={exports:{}},oV={},Z0={},sV={},xf={},uV;function cV(){if(uV)return xf;uV=1,Object.defineProperty(xf,"__esModule",{value:!0});var t=function(){function p(b,m,w){this.source=b,this.target=m,this.type=w}return p}();xf.PowerEdge=t;var r=function(){function p(b,m,w,k){var P=this;if(this.linkAccessor=w,this.modules=new Array(b),this.roots=[],k)this.initModulesFromGroup(k);else{this.roots.push(new l);for(var S=0;S<b;++S)this.roots[0].add(this.modules[S]=new s(S))}this.R=m.length,m.forEach(function(M){var L=P.modules[w.getSourceIndex(M)],T=P.modules[w.getTargetIndex(M)],j=w.getType(M);L.outgoing.add(j,T),T.incoming.add(j,L)})}return p.prototype.initModulesFromGroup=function(b){var m=new l;this.roots.push(m);for(var w=0;w<b.leaves.length;++w){var k=b.leaves[w],P=new s(k.id);this.modules[k.id]=P,m.add(P)}if(b.groups)for(var S=0;S<b.groups.length;++S){var M=b.groups[S],L={};for(var T in M)T!=="leaves"&&T!=="groups"&&M.hasOwnProperty(T)&&(L[T]=M[T]);m.add(new s(-1-S,new h,new h,this.initModulesFromGroup(M),L))}return m},p.prototype.merge=function(b,m,w){w===void 0&&(w=0);var k=b.incoming.intersection(m.incoming),P=b.outgoing.intersection(m.outgoing),S=new l;S.add(b),S.add(m);var M=new s(this.modules.length,P,k,S);this.modules.push(M);var L=function(T,j,I){T.forAll(function(R,B){R.forAll(function(F){var z=F[j];z.add(B,M),z.remove(B,b),z.remove(B,m),b[I].remove(B,F),m[I].remove(B,F)})})};return L(P,"incoming","outgoing"),L(k,"outgoing","incoming"),this.R-=k.count()+P.count(),this.roots[w].remove(b),this.roots[w].remove(m),this.roots[w].add(M),M},p.prototype.rootMerges=function(b){b===void 0&&(b=0);for(var m=this.roots[b].modules(),w=m.length,k=new Array(w*(w-1)),P=0,S=0,M=w-1;S<M;++S)for(var L=S+1;L<w;++L){var T=m[S],j=m[L];k[P]={id:P,nEdges:this.nEdges(T,j),a:T,b:j},P++}return k},p.prototype.greedyMerge=function(){for(var b=0;b<this.roots.length;++b)if(!(this.roots[b].modules().length<2)){var m=this.rootMerges(b).sort(function(k,P){return k.nEdges==P.nEdges?k.id-P.id:k.nEdges-P.nEdges}),w=m[0];if(!(w.nEdges>=this.R))return this.merge(w.a,w.b,b),!0}},p.prototype.nEdges=function(b,m){var w=b.incoming.intersection(m.incoming),k=b.outgoing.intersection(m.outgoing);return this.R-w.count()-k.count()},p.prototype.getGroupHierarchy=function(b){var m=this,w=[],k={};a(this.roots[0],k,w);var P=this.allEdges();return P.forEach(function(S){var M=m.modules[S.source],L=m.modules[S.target];b.push(new t(typeof M.gid>"u"?S.source:w[M.gid],typeof L.gid>"u"?S.target:w[L.gid],S.type))}),w},p.prototype.allEdges=function(){var b=[];return p.getEdges(this.roots[0],b),b},p.getEdges=function(b,m){b.forAll(function(w){w.getEdges(m),p.getEdges(w.children,m)})},p}();xf.Configuration=r;function a(p,b,m){p.forAll(function(w){if(w.isLeaf())b.leaves||(b.leaves=[]),b.leaves.push(w.id);else{var k=b;if(w.gid=m.length,!w.isIsland()||w.isPredefined()){if(k={id:w.gid},w.isPredefined())for(var P in w.definition)k[P]=w.definition[P];b.groups||(b.groups=[]),b.groups.push(w.gid),m.push(k)}a(w.children,k,m)}})}var s=function(){function p(b,m,w,k,P){m===void 0&&(m=new h),w===void 0&&(w=new h),k===void 0&&(k=new l),this.id=b,this.outgoing=m,this.incoming=w,this.children=k,this.definition=P}return p.prototype.getEdges=function(b){var m=this;this.outgoing.forAll(function(w,k){w.forAll(function(P){b.push(new t(m.id,P.id,k))})})},p.prototype.isLeaf=function(){return this.children.count()===0},p.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},p.prototype.isPredefined=function(){return typeof this.definition<"u"},p}();xf.Module=s;function c(p,b){var m={};for(var w in p)w in b&&(m[w]=p[w]);return m}var l=function(){function p(){this.table={}}return p.prototype.count=function(){return Object.keys(this.table).length},p.prototype.intersection=function(b){var m=new p;return m.table=c(this.table,b.table),m},p.prototype.intersectionCount=function(b){return this.intersection(b).count()},p.prototype.contains=function(b){return b in this.table},p.prototype.add=function(b){this.table[b.id]=b},p.prototype.remove=function(b){delete this.table[b.id]},p.prototype.forAll=function(b){for(var m in this.table)b(this.table[m])},p.prototype.modules=function(){var b=[];return this.forAll(function(m){m.isPredefined()||b.push(m)}),b},p}();xf.ModuleSet=l;var h=function(){function p(){this.sets={},this.n=0}return p.prototype.count=function(){return this.n},p.prototype.contains=function(b){var m=!1;return this.forAllModules(function(w){!m&&w.id==b&&(m=!0)}),m},p.prototype.add=function(b,m){var w=b in this.sets?this.sets[b]:this.sets[b]=new l;w.add(m),++this.n},p.prototype.remove=function(b,m){var w=this.sets[b];w.remove(m),w.count()===0&&delete this.sets[b],--this.n},p.prototype.forAll=function(b){for(var m in this.sets)b(this.sets[m],Number(m))},p.prototype.forAllModules=function(b){this.forAll(function(m,w){return m.forAll(b)})},p.prototype.intersection=function(b){var m=new p;return this.forAll(function(w,k){if(k in b.sets){var P=w.intersection(b.sets[k]),S=P.count();S>0&&(m.sets[k]=P,m.n+=S)}}),m},p}();xf.LinkSets=h;function d(p,b,m,w){for(var k=p.length,P=new r(k,b,m,w);P.greedyMerge(););var S=[],M=P.getGroupHierarchy(S);return S.forEach(function(L){var T=function(j){var I=L[j];typeof I=="number"&&(L[j]=p[I])};T("source"),T("target")}),{groups:M,powerEdges:S}}return xf.getGroups=d,xf}var cp={},lV;function IM(){if(lV)return cp;lV=1,Object.defineProperty(cp,"__esModule",{value:!0});function t(p,b){var m={};for(var w in p)m[w]={};for(var w in b)m[w]={};return Object.keys(m).length}function r(p,b){var m=0;for(var w in p)typeof b[w]<"u"&&++m;return m}function a(p,b){var m={},w=function(k,P){typeof m[k]>"u"&&(m[k]={}),m[k][P]={}};return p.forEach(function(k){var P=b.getSourceIndex(k),S=b.getTargetIndex(k);w(P,S),w(S,P)}),m}function s(p,b,m,w){var k=a(p,w);p.forEach(function(P){var S=k[w.getSourceIndex(P)],M=k[w.getTargetIndex(P)];w.setLength(P,1+b*m(S,M))})}function c(p,b,m){m===void 0&&(m=1),s(p,m,function(w,k){return Math.sqrt(t(w,k)-r(w,k))},b)}cp.symmetricDiffLinkLengths=c;function l(p,b,m){m===void 0&&(m=1),s(p,m,function(w,k){return Math.min(Object.keys(w).length,Object.keys(k).length)<1.1?0:r(w,k)/t(w,k)},b)}cp.jaccardLinkLengths=l;function h(p,b,m,w){var k=d(p,b,w),P={};k.forEach(function(M,L){return M.forEach(function(T){return P[T]=L})});var S=[];return b.forEach(function(M){var L=w.getSourceIndex(M),T=w.getTargetIndex(M),j=P[L],I=P[T];j!==I&&S.push({axis:m,left:L,right:T,gap:w.getMinSeparation(M)})}),S}cp.generateDirectedEdgeConstraints=h;function d(p,b,m){var w=[],k=0,P=[],S=[];function M(H){H.index=H.lowlink=k++,P.push(H),H.onStack=!0;for(var Q=0,q=H.out;Q<q.length;Q++){var Z=q[Q];typeof Z.index>"u"?(M(Z),H.lowlink=Math.min(H.lowlink,Z.lowlink)):Z.onStack&&(H.lowlink=Math.min(H.lowlink,Z.index))}if(H.lowlink===H.index){for(var J=[];P.length&&(Z=P.pop(),Z.onStack=!1,J.push(Z),Z!==H););S.push(J.map(function(K){return K.id}))}}for(var L=0;L<p;L++)w.push({id:L,out:[]});for(var T=0,j=b;T<j.length;T++){var I=j[T],R=w[m.getSourceIndex(I)],B=w[m.getTargetIndex(I)];R.out.push(B)}for(var F=0,z=w;F<z.length;F++){var D=z[F];typeof D.index>"u"&&M(D)}return S}return cp.stronglyConnectedComponents=d,cp}var eb={},fV;function LM(){if(fV)return eb;fV=1,Object.defineProperty(eb,"__esModule",{value:!0});var t=function(){function s(){this.locks={}}return s.prototype.add=function(c,l){this.locks[c]=l},s.prototype.clear=function(){this.locks={}},s.prototype.isEmpty=function(){for(var c in this.locks)return!1;return!0},s.prototype.apply=function(c){for(var l in this.locks)c(Number(l),this.locks[l])},s}();eb.Locks=t;var r=function(){function s(c,l,h){h===void 0&&(h=null),this.D=l,this.G=h,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new a,this.project=null,this.x=c,this.k=c.length;var d=this.n=c[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new t,this.minD=Number.MAX_VALUE;for(var p=d,b;p--;)for(b=d;--b>p;){var m=l[p][b];m>0&&m<this.minD&&(this.minD=m)}for(this.minD===Number.MAX_VALUE&&(this.minD=1),p=this.k;p--;){for(this.g[p]=new Array(d),this.H[p]=new Array(d),b=d;b--;)this.H[p][b]=new Array(d);this.Hd[p]=new Array(d),this.a[p]=new Array(d),this.b[p]=new Array(d),this.c[p]=new Array(d),this.d[p]=new Array(d),this.e[p]=new Array(d),this.ia[p]=new Array(d),this.ib[p]=new Array(d),this.xtmp[p]=new Array(d)}}return s.createSquareMatrix=function(c,l){for(var h=new Array(c),d=0;d<c;++d){h[d]=new Array(c);for(var p=0;p<c;++p)h[d][p]=l(d,p)}return h},s.prototype.offsetDir=function(){for(var c=this,l=new Array(this.k),h=0,d=0;d<this.k;++d){var p=l[d]=this.random.getNextBetween(.01,1)-.5;h+=p*p}return h=Math.sqrt(h),l.map(function(b){return b*=c.minD/h})},s.prototype.computeDerivatives=function(c){var l=this,h=this.n;if(!(h<1)){for(var d,p=new Array(this.k),b=new Array(this.k),m=new Array(this.k),w=0,k=0;k<h;++k){for(d=0;d<this.k;++d)m[d]=this.g[d][k]=0;for(var P=0;P<h;++P)if(k!==P){for(var S=h;S--;){var M=0;for(d=0;d<this.k;++d){var L=p[d]=c[d][k]-c[d][P];M+=b[d]=L*L}if(M>1e-9)break;var T=this.offsetDir();for(d=0;d<this.k;++d)c[d][P]+=T[d]}var j=Math.sqrt(M),I=this.D[k][P],R=this.G!=null?this.G[k][P]:1;if(R>1&&j>I||!isFinite(I)){for(d=0;d<this.k;++d)this.H[d][k][P]=0;continue}R>1&&(R=1);var B=I*I,F=2*R*(j-I)/(B*j),z=j*j*j,D=2*-R/(B*z);for(isFinite(F)||console.log(F),d=0;d<this.k;++d)this.g[d][k]+=p[d]*F,m[d]-=this.H[d][k][P]=D*(z+I*(b[d]-M)+j*M)}for(d=0;d<this.k;++d)w=Math.max(w,this.H[d][k][k]=m[d])}for(var H=this.snapGridSize/2,Q=this.snapGridSize,q=this.snapStrength,Z=q/(H*H),J=this.numGridSnapNodes,k=0;k<J;++k)for(d=0;d<this.k;++d){var K=this.x[d][k],ae=K/Q,se=ae%1,le=ae-se,he=Math.abs(se),L=he<=.5?K-le*Q:K>0?K-(le+1)*Q:K-(le-1)*Q;-H<L&&L<=H&&(this.scaleSnapByMaxH?(this.g[d][k]+=w*Z*L,this.H[d][k][k]+=w*Z):(this.g[d][k]+=Z*L,this.H[d][k][k]+=Z))}this.locks.isEmpty()||this.locks.apply(function(fe,pe){for(d=0;d<l.k;++d)l.H[d][fe][fe]+=w,l.g[d][fe]-=w*(pe[d]-c[d][fe])})}},s.dotProd=function(c,l){for(var h=0,d=c.length;d--;)h+=c[d]*l[d];return h},s.rightMultiply=function(c,l,h){for(var d=c.length;d--;)h[d]=s.dotProd(c[d],l)},s.prototype.computeStepSize=function(c){for(var l=0,h=0,d=0;d<this.k;++d)l+=s.dotProd(this.g[d],c[d]),s.rightMultiply(this.H[d],c[d],this.Hd[d]),h+=s.dotProd(c[d],this.Hd[d]);return h===0||!isFinite(h)?0:1*l/h},s.prototype.reduceStress=function(){this.computeDerivatives(this.x);for(var c=this.computeStepSize(this.g),l=0;l<this.k;++l)this.takeDescentStep(this.x[l],this.g[l],c);return this.computeStress()},s.copy=function(c,l){for(var h=c.length,d=l[0].length,p=0;p<h;++p)for(var b=0;b<d;++b)l[p][b]=c[p][b]},s.prototype.stepAndProject=function(c,l,h,d){s.copy(c,l),this.takeDescentStep(l[0],h[0],d),this.project&&this.project[0](c[0],c[1],l[0]),this.takeDescentStep(l[1],h[1],d),this.project&&this.project[1](l[0],c[1],l[1]);for(var p=2;p<this.k;p++)this.takeDescentStep(l[p],h[p],d)},s.mApply=function(c,l,h){for(var d=c;d-- >0;)for(var p=l;p-- >0;)h(d,p)},s.prototype.matrixApply=function(c){s.mApply(this.k,this.n,c)},s.prototype.computeNextPosition=function(c,l){var h=this;this.computeDerivatives(c);var d=this.computeStepSize(this.g);if(this.stepAndProject(c,l,this.g,d),this.project){this.matrixApply(function(b,m){return h.e[b][m]=c[b][m]-l[b][m]});var p=this.computeStepSize(this.e);p=Math.max(.2,Math.min(p,1)),this.stepAndProject(c,l,this.e,p)}},s.prototype.run=function(c){for(var l=Number.MAX_VALUE,h=!1;!h&&c-- >0;){var d=this.rungeKutta();h=Math.abs(l/d-1)<this.threshold,l=d}return l},s.prototype.rungeKutta=function(){var c=this;this.computeNextPosition(this.x,this.a),s.mid(this.x,this.a,this.ia),this.computeNextPosition(this.ia,this.b),s.mid(this.x,this.b,this.ib),this.computeNextPosition(this.ib,this.c),this.computeNextPosition(this.c,this.d);var l=0;return this.matrixApply(function(h,d){var p=(c.a[h][d]+2*c.b[h][d]+2*c.c[h][d]+c.d[h][d])/6,b=c.x[h][d]-p;l+=b*b,c.x[h][d]=p}),l},s.mid=function(c,l,h){s.mApply(c.length,c[0].length,function(d,p){return h[d][p]=c[d][p]+(l[d][p]-c[d][p])/2})},s.prototype.takeDescentStep=function(c,l,h){for(var d=0;d<this.n;++d)c[d]=c[d]-h*l[d]},s.prototype.computeStress=function(){for(var c=0,l=0,h=this.n-1;l<h;++l)for(var d=l+1,p=this.n;d<p;++d){for(var b=0,m=0;m<this.k;++m){var w=this.x[m][l]-this.x[m][d];b+=w*w}b=Math.sqrt(b);var k=this.D[l][d];if(isFinite(k)){var P=k-b,S=k*k;c+=P*P/S}}return c},s.zeroDistance=1e-10,s}();eb.Descent=r;var a=function(){function s(c){c===void 0&&(c=1),this.seed=c,this.a=214013,this.c=2531011,this.m=2147483648,this.range=32767}return s.prototype.getNext=function(){return this.seed=(this.seed*this.a+this.c)%this.m,(this.seed>>16)/this.range},s.prototype.getNextBetween=function(c,l){return c+this.getNext()*(l-c)},s}();return eb.PseudoRandom=a,eb}var Fs={},dl={},hV;function OM(){if(hV)return dl;hV=1,Object.defineProperty(dl,"__esModule",{value:!0});var t=function(){function d(p){this.scale=p,this.AB=0,this.AD=0,this.A2=0}return d.prototype.addVariable=function(p){var b=this.scale/p.scale,m=p.offset/p.scale,w=p.weight;this.AB+=w*b*m,this.AD+=w*b*p.desiredPosition,this.A2+=w*b*b},d.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},d}();dl.PositionStats=t;var r=function(){function d(p,b,m,w){w===void 0&&(w=!1),this.left=p,this.right=b,this.gap=m,this.equality=w,this.active=!1,this.unsatisfiable=!1,this.left=p,this.right=b,this.gap=m,this.equality=w}return d.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},d}();dl.Constraint=r;var a=function(){function d(p,b,m){b===void 0&&(b=1),m===void 0&&(m=1),this.desiredPosition=p,this.weight=b,this.scale=m,this.offset=0}return d.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},d.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},d.prototype.visitNeighbours=function(p,b){var m=function(w,k){return w.active&&p!==k&&b(w,k)};this.cOut.forEach(function(w){return m(w,w.right)}),this.cIn.forEach(function(w){return m(w,w.left)})},d}();dl.Variable=a;var s=function(){function d(p){this.vars=[],p.offset=0,this.ps=new t(p.scale),this.addVariable(p)}return d.prototype.addVariable=function(p){p.block=this,this.vars.push(p),this.ps.addVariable(p),this.posn=this.ps.getPosn()},d.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var p=0,b=this.vars.length;p<b;++p)this.ps.addVariable(this.vars[p]);this.posn=this.ps.getPosn()},d.prototype.compute_lm=function(p,b,m){var w=this,k=p.dfdv();return p.visitNeighbours(b,function(P,S){var M=w.compute_lm(S,p,m);S===P.right?(k+=M*P.left.scale,P.lm=M):(k+=M*P.right.scale,P.lm=-M),m(P)}),k/p.scale},d.prototype.populateSplitBlock=function(p,b){var m=this;p.visitNeighbours(b,function(w,k){k.offset=p.offset+(k===w.right?w.gap:-w.gap),m.addVariable(k),m.populateSplitBlock(k,p)})},d.prototype.traverse=function(p,b,m,w){var k=this;m===void 0&&(m=this.vars[0]),w===void 0&&(w=null),m.visitNeighbours(w,function(P,S){b.push(p(P)),k.traverse(p,b,S,m)})},d.prototype.findMinLM=function(){var p=null;return this.compute_lm(this.vars[0],null,function(b){!b.equality&&(p===null||b.lm<p.lm)&&(p=b)}),p},d.prototype.findMinLMBetween=function(p,b){this.compute_lm(p,null,function(){});var m=null;return this.findPath(p,null,b,function(w,k){!w.equality&&w.right===k&&(m===null||w.lm<m.lm)&&(m=w)}),m},d.prototype.findPath=function(p,b,m,w){var k=this,P=!1;return p.visitNeighbours(b,function(S,M){!P&&(M===m||k.findPath(M,p,m,w))&&(P=!0,w(S,M))}),P},d.prototype.isActiveDirectedPathBetween=function(p,b){if(p===b)return!0;for(var m=p.cOut.length;m--;){var w=p.cOut[m];if(w.active&&this.isActiveDirectedPathBetween(w.right,b))return!0}return!1},d.split=function(p){return p.active=!1,[d.createSplitBlock(p.left),d.createSplitBlock(p.right)]},d.createSplitBlock=function(p){var b=new d(p);return b.populateSplitBlock(p,null),b},d.prototype.splitBetween=function(p,b){var m=this.findMinLMBetween(p,b);if(m!==null){var w=d.split(m);return{constraint:m,lb:w[0],rb:w[1]}}return null},d.prototype.mergeAcross=function(p,b,m){b.active=!0;for(var w=0,k=p.vars.length;w<k;++w){var P=p.vars[w];P.offset+=m,this.addVariable(P)}this.posn=this.ps.getPosn()},d.prototype.cost=function(){for(var p=0,b=this.vars.length;b--;){var m=this.vars[b],w=m.position()-m.desiredPosition;p+=w*w*m.weight}return p},d}();dl.Block=s;var c=function(){function d(p){this.vs=p;var b=p.length;for(this.list=new Array(b);b--;){var m=new s(p[b]);this.list[b]=m,m.blockInd=b}}return d.prototype.cost=function(){for(var p=0,b=this.list.length;b--;)p+=this.list[b].cost();return p},d.prototype.insert=function(p){p.blockInd=this.list.length,this.list.push(p)},d.prototype.remove=function(p){var b=this.list.length-1,m=this.list[b];this.list.length=b,p!==m&&(this.list[p.blockInd]=m,m.blockInd=p.blockInd)},d.prototype.merge=function(p){var b=p.left.block,m=p.right.block,w=p.right.offset-p.left.offset-p.gap;b.vars.length<m.vars.length?(m.mergeAcross(b,p,w),this.remove(b)):(b.mergeAcross(m,p,-w),this.remove(m))},d.prototype.forEach=function(p){this.list.forEach(p)},d.prototype.updateBlockPositions=function(){this.list.forEach(function(p){return p.updateWeightedPosition()})},d.prototype.split=function(p){var b=this;this.updateBlockPositions(),this.list.forEach(function(m){var w=m.findMinLM();w!==null&&w.lm<l.LAGRANGIAN_TOLERANCE&&(m=w.left.block,s.split(w).forEach(function(k){return b.insert(k)}),b.remove(m),p.push(w))})},d}();dl.Blocks=c;var l=function(){function d(p,b){this.vs=p,this.cs=b,this.vs=p,p.forEach(function(m){m.cIn=[],m.cOut=[]}),this.cs=b,b.forEach(function(m){m.left.cOut.push(m),m.right.cIn.push(m)}),this.inactive=b.map(function(m){return m.active=!1,m}),this.bs=null}return d.prototype.cost=function(){return this.bs.cost()},d.prototype.setStartingPositions=function(p){this.inactive=this.cs.map(function(b){return b.active=!1,b}),this.bs=new c(this.vs),this.bs.forEach(function(b,m){return b.posn=p[m]})},d.prototype.setDesiredPositions=function(p){this.vs.forEach(function(b,m){return b.desiredPosition=p[m]})},d.prototype.mostViolated=function(){for(var p=Number.MAX_VALUE,b=null,m=this.inactive,w=m.length,k=w,P=0;P<w;++P){var S=m[P];if(!S.unsatisfiable){var M=S.slack();if((S.equality||M<p)&&(p=M,b=S,k=P,S.equality))break}}return k!==w&&(p<d.ZERO_UPPERBOUND&&!b.active||b.equality)&&(m[k]=m[w-1],m.length=w-1),b},d.prototype.satisfy=function(){this.bs==null&&(this.bs=new c(this.vs)),this.bs.split(this.inactive);for(var p=null;(p=this.mostViolated())&&(p.equality||p.slack()<d.ZERO_UPPERBOUND&&!p.active);){var b=p.left.block,m=p.right.block;if(b!==m)this.bs.merge(p);else{if(b.isActiveDirectedPathBetween(p.right,p.left)){p.unsatisfiable=!0;continue}var w=b.splitBetween(p.left,p.right);if(w!==null)this.bs.insert(w.lb),this.bs.insert(w.rb),this.bs.remove(b),this.inactive.push(w.constraint);else{p.unsatisfiable=!0;continue}p.slack()>=0?this.inactive.push(p):this.bs.merge(p)}}},d.prototype.solve=function(){this.satisfy();for(var p=Number.MAX_VALUE,b=this.bs.cost();Math.abs(p-b)>1e-4;)this.satisfy(),p=b,b=this.bs.cost();return b},d.LAGRANGIAN_TOLERANCE=-1e-4,d.ZERO_UPPERBOUND=-1e-10,d}();dl.Solver=l;function h(d,p,b){for(var m=d.map(function(z){return new a(z.desiredCenter)}),w=[],k=d.length,P=0;P<k-1;P++){var S=d[P],M=d[P+1];w.push(new r(m[P],m[P+1],(S.size+M.size)/2))}var L=m[0],T=m[k-1],j=d[0].size/2,I=d[k-1].size/2,R=null,B=null;p&&(R=new a(p,L.weight*1e3),m.push(R),w.push(new r(R,L,j))),b&&(B=new a(b,T.weight*1e3),m.push(B),w.push(new r(T,B,I)));var F=new l(m,w);return F.solve(),{newCenters:m.slice(0,d.length).map(function(z){return z.position()}),lowerBound:R?R.position():L.position()-j,upperBound:B?B.position():T.position()+I}}return dl.removeOverlapInOneDimension=h,dl}var tb={},dV;function pV(){if(dV)return tb;dV=1;var t=Kr&&Kr.__extends||function(){var l=function(h,d){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,b){p.__proto__=b}||function(p,b){for(var m in b)b.hasOwnProperty(m)&&(p[m]=b[m])},l(h,d)};return function(h,d){l(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(tb,"__esModule",{value:!0});var r=function(){function l(){this.findIter=function(h){for(var d=this._root,p=this.iterator();d!==null;){var b=this._comparator(h,d.data);if(b===0)return p._cursor=d,p;p._ancestors.push(d),d=d.get_child(b>0)}return null}}return l.prototype.clear=function(){this._root=null,this.size=0},l.prototype.find=function(h){for(var d=this._root;d!==null;){var p=this._comparator(h,d.data);if(p===0)return d.data;d=d.get_child(p>0)}return null},l.prototype.lowerBound=function(h){return this._bound(h,this._comparator)},l.prototype.upperBound=function(h){var d=this._comparator;function p(b,m){return d(m,b)}return this._bound(h,p)},l.prototype.min=function(){var h=this._root;if(h===null)return null;for(;h.left!==null;)h=h.left;return h.data},l.prototype.max=function(){var h=this._root;if(h===null)return null;for(;h.right!==null;)h=h.right;return h.data},l.prototype.iterator=function(){return new a(this)},l.prototype.each=function(h){for(var d=this.iterator(),p;(p=d.next())!==null;)h(p)},l.prototype.reach=function(h){for(var d=this.iterator(),p;(p=d.prev())!==null;)h(p)},l.prototype._bound=function(h,d){for(var p=this._root,b=this.iterator();p!==null;){var m=this._comparator(h,p.data);if(m===0)return b._cursor=p,b;b._ancestors.push(p),p=p.get_child(m>0)}for(var w=b._ancestors.length-1;w>=0;--w)if(p=b._ancestors[w],d(h,p.data)>0)return b._cursor=p,b._ancestors.length=w,b;return b._ancestors.length=0,b},l}();tb.TreeBase=r;var a=function(){function l(h){this._tree=h,this._ancestors=[],this._cursor=null}return l.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},l.prototype.next=function(){if(this._cursor===null){var h=this._tree._root;h!==null&&this._minNode(h)}else if(this._cursor.right===null){var d;do if(d=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===d)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},l.prototype.prev=function(){if(this._cursor===null){var h=this._tree._root;h!==null&&this._maxNode(h)}else if(this._cursor.left===null){var d;do if(d=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===d)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},l.prototype._minNode=function(h){for(;h.left!==null;)this._ancestors.push(h),h=h.left;this._cursor=h},l.prototype._maxNode=function(h){for(;h.right!==null;)this._ancestors.push(h),h=h.right;this._cursor=h},l}();tb.Iterator=a;var s=function(){function l(h){this.data=h,this.left=null,this.right=null,this.red=!0}return l.prototype.get_child=function(h){return h?this.right:this.left},l.prototype.set_child=function(h,d){h?this.right=d:this.left=d},l}(),c=function(l){t(h,l);function h(d){var p=l.call(this)||this;return p._root=null,p._comparator=d,p.size=0,p}return h.prototype.insert=function(d){var p=!1;if(this._root===null)this._root=new s(d),p=!0,this.size++;else{var b=new s(void 0),m=!1,w=!1,k=null,P=b,S=null,M=this._root;for(P.right=this._root;;){if(M===null?(M=new s(d),S.set_child(m,M),p=!0,this.size++):h.is_red(M.left)&&h.is_red(M.right)&&(M.red=!0,M.left.red=!1,M.right.red=!1),h.is_red(M)&&h.is_red(S)){var L=P.right===k;M===S.get_child(w)?P.set_child(L,h.single_rotate(k,!w)):P.set_child(L,h.double_rotate(k,!w))}var T=this._comparator(M.data,d);if(T===0)break;w=m,m=T<0,k!==null&&(P=k),k=S,S=M,M=M.get_child(m)}this._root=b.right}return this._root.red=!1,p},h.prototype.remove=function(d){if(this._root===null)return!1;var p=new s(void 0),b=p;b.right=this._root;for(var m=null,w=null,k=null,P=!0;b.get_child(P)!==null;){var S=P;w=m,m=b,b=b.get_child(P);var M=this._comparator(d,b.data);if(P=M>0,M===0&&(k=b),!h.is_red(b)&&!h.is_red(b.get_child(P))){if(h.is_red(b.get_child(!P))){var L=h.single_rotate(b,P);m.set_child(S,L),m=L}else if(!h.is_red(b.get_child(!P))){var T=m.get_child(!S);if(T!==null)if(!h.is_red(T.get_child(!S))&&!h.is_red(T.get_child(S)))m.red=!1,T.red=!0,b.red=!0;else{var j=w.right===m;h.is_red(T.get_child(S))?w.set_child(j,h.double_rotate(m,S)):h.is_red(T.get_child(!S))&&w.set_child(j,h.single_rotate(m,S));var I=w.get_child(j);I.red=!0,b.red=!0,I.left.red=!1,I.right.red=!1}}}}return k!==null&&(k.data=b.data,m.set_child(m.right===b,b.get_child(b.left===null)),this.size--),this._root=p.right,this._root!==null&&(this._root.red=!1),k!==null},h.is_red=function(d){return d!==null&&d.red},h.single_rotate=function(d,p){var b=d.get_child(!p);return d.set_child(!p,b.get_child(p)),b.set_child(p,d),d.red=!0,b.red=!1,b},h.double_rotate=function(d,p){return d.set_child(!p,h.single_rotate(d.get_child(!p),!p)),h.single_rotate(d,p)},h}(r);return tb.RBTree=c,tb}var gV;function $0(){if(gV)return Fs;gV=1;var t=Kr&&Kr.__extends||function(){var D=function(H,Q){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(q,Z){q.__proto__=Z}||function(q,Z){for(var J in Z)Z.hasOwnProperty(J)&&(q[J]=Z[J])},D(H,Q)};return function(H,Q){D(H,Q);function q(){this.constructor=H}H.prototype=Q===null?Object.create(Q):(q.prototype=Q.prototype,new q)}}();Object.defineProperty(Fs,"__esModule",{value:!0});var r=OM(),a=pV();function s(D){return D.bounds=typeof D.leaves<"u"?D.leaves.reduce(function(H,Q){return Q.bounds.union(H)},c.empty()):c.empty(),typeof D.groups<"u"&&(D.bounds=D.groups.reduce(function(H,Q){return s(Q).union(H)},D.bounds)),D.bounds=D.bounds.inflate(D.padding),D.bounds}Fs.computeGroupBounds=s;var c=function(){function D(H,Q,q,Z){this.x=H,this.X=Q,this.y=q,this.Y=Z}return D.empty=function(){return new D(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},D.prototype.cx=function(){return(this.x+this.X)/2},D.prototype.cy=function(){return(this.y+this.Y)/2},D.prototype.overlapX=function(H){var Q=this.cx(),q=H.cx();return Q<=q&&H.x<this.X?this.X-H.x:q<=Q&&this.x<H.X?H.X-this.x:0},D.prototype.overlapY=function(H){var Q=this.cy(),q=H.cy();return Q<=q&&H.y<this.Y?this.Y-H.y:q<=Q&&this.y<H.Y?H.Y-this.y:0},D.prototype.setXCentre=function(H){var Q=H-this.cx();this.x+=Q,this.X+=Q},D.prototype.setYCentre=function(H){var Q=H-this.cy();this.y+=Q,this.Y+=Q},D.prototype.width=function(){return this.X-this.x},D.prototype.height=function(){return this.Y-this.y},D.prototype.union=function(H){return new D(Math.min(this.x,H.x),Math.max(this.X,H.X),Math.min(this.y,H.y),Math.max(this.Y,H.Y))},D.prototype.lineIntersections=function(H,Q,q,Z){for(var J=[[this.x,this.y,this.X,this.y],[this.X,this.y,this.X,this.Y],[this.X,this.Y,this.x,this.Y],[this.x,this.Y,this.x,this.y]],K=[],ae=0;ae<4;++ae){var se=D.lineIntersection(H,Q,q,Z,J[ae][0],J[ae][1],J[ae][2],J[ae][3]);se!==null&&K.push({x:se.x,y:se.y})}return K},D.prototype.rayIntersection=function(H,Q){var q=this.lineIntersections(this.cx(),this.cy(),H,Q);return q.length>0?q[0]:null},D.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},D.lineIntersection=function(H,Q,q,Z,J,K,ae,se){var le=q-H,he=ae-J,fe=Z-Q,pe=se-K,me=pe*le-he*fe;if(me==0)return null;var Te=H-J,Oe=Q-K,ge=he*Oe-pe*Te,xe=ge/me,Se=le*Oe-fe*Te,Le=Se/me;return xe>=0&&xe<=1&&Le>=0&&Le<=1?{x:H+xe*le,y:Q+xe*fe}:null},D.prototype.inflate=function(H){return new D(this.x-H,this.X+H,this.y-H,this.Y+H)},D}();Fs.Rectangle=c;function l(D,H,Q){var q=D.rayIntersection(H.cx(),H.cy())||{x:D.cx(),y:D.cy()},Z=H.rayIntersection(D.cx(),D.cy())||{x:H.cx(),y:H.cy()},J=Z.x-q.x,K=Z.y-q.y,ae=Math.sqrt(J*J+K*K),se=ae-Q;return{sourceIntersection:q,targetIntersection:Z,arrowStart:{x:q.x+se*J/ae,y:q.y+se*K/ae}}}Fs.makeEdgeBetween=l;function h(D,H,Q){var q=H.rayIntersection(D.x,D.y);q||(q={x:H.cx(),y:H.cy()});var Z=q.x-D.x,J=q.y-D.y,K=Math.sqrt(Z*Z+J*J);return{x:q.x-Q*Z/K,y:q.y-Q*J/K}}Fs.makeEdgeTo=h;var d=function(){function D(H,Q,q){this.v=H,this.r=Q,this.pos=q,this.prev=m(),this.next=m()}return D}(),p=function(){function D(H,Q,q){this.isOpen=H,this.v=Q,this.pos=q}return D}();function b(D,H){return D.pos>H.pos?1:D.pos<H.pos||D.isOpen?-1:H.isOpen?1:0}function m(){return new a.RBTree(function(D,H){return D.pos-H.pos})}var w={getCentre:function(D){return D.cx()},getOpen:function(D){return D.y},getClose:function(D){return D.Y},getSize:function(D){return D.width()},makeRect:function(D,H,Q,q){return new c(Q-q/2,Q+q/2,D,H)},findNeighbours:M},k={getCentre:function(D){return D.cy()},getOpen:function(D){return D.x},getClose:function(D){return D.X},getSize:function(D){return D.height()},makeRect:function(D,H,Q,q){return new c(D,H,Q-q/2,Q+q/2)},findNeighbours:L};function P(D,H,Q,q){q===void 0&&(q=!1);var Z=D.padding,J=typeof D.groups<"u"?D.groups.length:0,K=typeof D.leaves<"u"?D.leaves.length:0,ae=J?D.groups.reduce(function(Ne,Me){return Ne.concat(P(Me,H,Q,!0))},[]):[],se=(q?2:0)+K+J,le=new Array(se),he=new Array(se),fe=0,pe=function(Ne,Me){he[fe]=Ne,le[fe++]=Me};if(q){var me=D.bounds,Te=H.getCentre(me),Oe=H.getSize(me)/2,ge=H.getOpen(me),xe=H.getClose(me),Se=Te-Oe+Z/2,Le=Te+Oe-Z/2;D.minVar.desiredPosition=Se,pe(H.makeRect(ge,xe,Se,Z),D.minVar),D.maxVar.desiredPosition=Le,pe(H.makeRect(ge,xe,Le,Z),D.maxVar)}K&&D.leaves.forEach(function(Ne){return pe(Ne.bounds,Ne.variable)}),J&&D.groups.forEach(function(Ne){var Me=Ne.bounds;pe(H.makeRect(H.getOpen(Me),H.getClose(Me),H.getCentre(Me),H.getSize(Me)),Ne.minVar)});var De=S(he,le,H,Q);return J&&(le.forEach(function(Ne){Ne.cOut=[],Ne.cIn=[]}),De.forEach(function(Ne){Ne.left.cOut.push(Ne),Ne.right.cIn.push(Ne)}),D.groups.forEach(function(Ne){var Me=(Ne.padding-H.getSize(Ne.bounds))/2;Ne.minVar.cIn.forEach(function(ke){return ke.gap+=Me}),Ne.minVar.cOut.forEach(function(ke){ke.left=Ne.maxVar,ke.gap+=Me})})),ae.concat(De)}function S(D,H,Q,q){var Z,J=D.length,K=2*J;console.assert(H.length>=J);var ae=new Array(K);for(Z=0;Z<J;++Z){var se=D[Z],le=new d(H[Z],se,Q.getCentre(se));ae[Z]=new p(!0,le,Q.getOpen(se)),ae[Z+J]=new p(!1,le,Q.getClose(se))}ae.sort(b);var he=new Array,fe=m();for(Z=0;Z<K;++Z){var pe=ae[Z],le=pe.v;if(pe.isOpen)fe.insert(le),Q.findNeighbours(le,fe);else{fe.remove(le);var me=function(ge,xe){var Se=(Q.getSize(ge.r)+Q.getSize(xe.r))/2+q;he.push(new r.Constraint(ge.v,xe.v,Se))},Te=function(ge,xe,Se){for(var Le,De=le[ge].iterator();(Le=De[ge]())!==null;)Se(Le,le),Le[xe].remove(le)};Te("prev","next",function(ge,xe){return me(ge,xe)}),Te("next","prev",function(ge,xe){return me(xe,ge)})}}return console.assert(fe.size===0),he}function M(D,H){var Q=function(q,Z){for(var J=H.findIter(D),K;(K=J[q]())!==null;){var ae=K.r.overlapX(D.r);if((ae<=0||ae<=K.r.overlapY(D.r))&&(D[q].insert(K),K[Z].insert(D)),ae<=0)break}};Q("next","prev"),Q("prev","next")}function L(D,H){var Q=function(q,Z){var J=H.findIter(D)[q]();J!==null&&J.r.overlapX(D.r)>0&&(D[q].insert(J),J[Z].insert(D))};Q("next","prev"),Q("prev","next")}function T(D,H){return S(D,H,w,1e-6)}Fs.generateXConstraints=T;function j(D,H){return S(D,H,k,1e-6)}Fs.generateYConstraints=j;function I(D){return P(D,w,1e-6)}Fs.generateXGroupConstraints=I;function R(D){return P(D,k,1e-6)}Fs.generateYGroupConstraints=R;function B(D){var H=D.map(function(Z){return new r.Variable(Z.cx())}),Q=T(D,H),q=new r.Solver(H,Q);q.solve(),H.forEach(function(Z,J){return D[J].setXCentre(Z.position())}),H=D.map(function(Z){return new r.Variable(Z.cy())}),Q=j(D,H),q=new r.Solver(H,Q),q.solve(),H.forEach(function(Z,J){return D[J].setYCentre(Z.position())})}Fs.removeOverlaps=B;var F=function(D){t(H,D);function H(Q,q){var Z=D.call(this,0,q)||this;return Z.index=Q,Z}return H}(r.Variable);Fs.IndexedVariable=F;var z=function(){function D(H,Q,q,Z,J){var K=this;if(q===void 0&&(q=null),Z===void 0&&(Z=null),J===void 0&&(J=!1),this.nodes=H,this.groups=Q,this.rootGroup=q,this.avoidOverlaps=J,this.variables=H.map(function(se,le){return se.variable=new F(le,1)}),Z&&this.createConstraints(Z),J&&q&&typeof q.groups<"u"){H.forEach(function(se){if(!se.width||!se.height){se.bounds=new c(se.x,se.x,se.y,se.y);return}var le=se.width/2,he=se.height/2;se.bounds=new c(se.x-le,se.x+le,se.y-he,se.y+he)}),s(q);var ae=H.length;Q.forEach(function(se){K.variables[ae]=se.minVar=new F(ae++,typeof se.stiffness<"u"?se.stiffness:.01),K.variables[ae]=se.maxVar=new F(ae++,typeof se.stiffness<"u"?se.stiffness:.01)})}}return D.prototype.createSeparation=function(H){return new r.Constraint(this.nodes[H.left].variable,this.nodes[H.right].variable,H.gap,typeof H.equality<"u"?H.equality:!1)},D.prototype.makeFeasible=function(H){var Q=this;if(this.avoidOverlaps){var q="x",Z="width";H.axis==="x"&&(q="y",Z="height");var J=H.offsets.map(function(ae){return Q.nodes[ae.node]}).sort(function(ae,se){return ae[q]-se[q]}),K=null;J.forEach(function(ae){if(K){var se=K[q]+K[Z];se>ae[q]&&(ae[q]=se)}K=ae})}},D.prototype.createAlignment=function(H){var Q=this,q=this.nodes[H.offsets[0].node].variable;this.makeFeasible(H);var Z=H.axis==="x"?this.xConstraints:this.yConstraints;H.offsets.slice(1).forEach(function(J){var K=Q.nodes[J.node].variable;Z.push(new r.Constraint(q,K,J.offset,!0))})},D.prototype.createConstraints=function(H){var Q=this,q=function(Z){return typeof Z.type>"u"||Z.type==="separation"};this.xConstraints=H.filter(function(Z){return Z.axis==="x"&&q(Z)}).map(function(Z){return Q.createSeparation(Z)}),this.yConstraints=H.filter(function(Z){return Z.axis==="y"&&q(Z)}).map(function(Z){return Q.createSeparation(Z)}),H.filter(function(Z){return Z.type==="alignment"}).forEach(function(Z){return Q.createAlignment(Z)})},D.prototype.setupVariablesAndBounds=function(H,Q,q,Z){this.nodes.forEach(function(J,K){J.fixed?(J.variable.weight=J.fixedWeight?J.fixedWeight:1e3,q[K]=Z(J)):J.variable.weight=1;var ae=(J.width||0)/2,se=(J.height||0)/2,le=H[K],he=Q[K];J.bounds=new c(le-ae,le+ae,he-se,he+se)})},D.prototype.xProject=function(H,Q,q){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(H,Q,H,q,function(Z){return Z.px},this.xConstraints,I,function(Z){return Z.bounds.setXCentre(q[Z.variable.index]=Z.variable.position())},function(Z){var J=q[Z.minVar.index]=Z.minVar.position(),K=q[Z.maxVar.index]=Z.maxVar.position(),ae=Z.padding/2;Z.bounds.x=J-ae,Z.bounds.X=K+ae})},D.prototype.yProject=function(H,Q,q){!this.rootGroup&&!this.yConstraints||this.project(H,Q,Q,q,function(Z){return Z.py},this.yConstraints,R,function(Z){return Z.bounds.setYCentre(q[Z.variable.index]=Z.variable.position())},function(Z){var J=q[Z.minVar.index]=Z.minVar.position(),K=q[Z.maxVar.index]=Z.maxVar.position(),ae=Z.padding/2;Z.bounds.y=J-ae,Z.bounds.Y=K+ae})},D.prototype.projectFunctions=function(){var H=this;return[function(Q,q,Z){return H.xProject(Q,q,Z)},function(Q,q,Z){return H.yProject(Q,q,Z)}]},D.prototype.project=function(H,Q,q,Z,J,K,ae,se,le){this.setupVariablesAndBounds(H,Q,Z,J),this.rootGroup&&this.avoidOverlaps&&(s(this.rootGroup),K=K.concat(ae(this.rootGroup))),this.solve(this.variables,K,q,Z),this.nodes.forEach(se),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(le),s(this.rootGroup))},D.prototype.solve=function(H,Q,q,Z){var J=new r.Solver(H,Q);J.setStartingPositions(q),J.setDesiredPositions(Z),J.solve()},D}();return Fs.Projection=z,Fs}var b2={},K0={},bV;function vV(){if(bV)return K0;bV=1,Object.defineProperty(K0,"__esModule",{value:!0});var t=function(){function a(s){this.elem=s,this.subheaps=[]}return a.prototype.toString=function(s){for(var c="",l=!1,h=0;h<this.subheaps.length;++h){var d=this.subheaps[h];if(!d.elem){l=!1;continue}l&&(c=c+","),c=c+d.toString(s),l=!0}return c!==""&&(c="("+c+")"),(this.elem?s(this.elem):"")+c},a.prototype.forEach=function(s){this.empty()||(s(this.elem,this),this.subheaps.forEach(function(c){return c.forEach(s)}))},a.prototype.count=function(){return this.empty()?0:1+this.subheaps.reduce(function(s,c){return s+c.count()},0)},a.prototype.min=function(){return this.elem},a.prototype.empty=function(){return this.elem==null},a.prototype.contains=function(s){if(this===s)return!0;for(var c=0;c<this.subheaps.length;c++)if(this.subheaps[c].contains(s))return!0;return!1},a.prototype.isHeap=function(s){var c=this;return this.subheaps.every(function(l){return s(c.elem,l.elem)&&l.isHeap(s)})},a.prototype.insert=function(s,c){return this.merge(new a(s),c)},a.prototype.merge=function(s,c){return this.empty()?s:s.empty()?this:c(this.elem,s.elem)?(this.subheaps.push(s),this):(s.subheaps.push(this),s)},a.prototype.removeMin=function(s){return this.empty()?null:this.mergePairs(s)},a.prototype.mergePairs=function(s){if(this.subheaps.length==0)return new a(null);if(this.subheaps.length==1)return this.subheaps[0];var c=this.subheaps.pop().merge(this.subheaps.pop(),s),l=this.mergePairs(s);return c.merge(l,s)},a.prototype.decreaseKey=function(s,c,l,h){var d=s.removeMin(h);s.elem=d.elem,s.subheaps=d.subheaps,l!==null&&d.elem!==null&&l(s.elem,s);var p=new a(c);return l!==null&&l(c,p),this.merge(p,h)},a}();K0.PairingHeap=t;var r=function(){function a(s){this.lessThan=s}return a.prototype.top=function(){return this.empty()?null:this.root.elem},a.prototype.push=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];for(var l,h=0,d;d=s[h];++h)l=new t(d),this.root=this.empty()?l:this.root.merge(l,this.lessThan);return l},a.prototype.empty=function(){return!this.root||!this.root.elem},a.prototype.isHeap=function(){return this.root.isHeap(this.lessThan)},a.prototype.forEach=function(s){this.root.forEach(s)},a.prototype.pop=function(){if(this.empty())return null;var s=this.root.min();return this.root=this.root.removeMin(this.lessThan),s},a.prototype.reduceKey=function(s,c,l){l===void 0&&(l=null),this.root=this.root.decreaseKey(s,c,l,this.lessThan)},a.prototype.toString=function(s){return this.root.toString(s)},a.prototype.count=function(){return this.root.count()},a}();return K0.PriorityQueue=r,K0}var yV;function v2(){if(yV)return b2;yV=1,Object.defineProperty(b2,"__esModule",{value:!0});var t=vV(),r=function(){function l(h,d){this.id=h,this.distance=d}return l}(),a=function(){function l(h){this.id=h,this.neighbours=[]}return l}(),s=function(){function l(h,d,p){this.node=h,this.prev=d,this.d=p}return l}(),c=function(){function l(h,d,p,b,m){this.n=h,this.es=d,this.neighbours=new Array(this.n);for(var w=this.n;w--;)this.neighbours[w]=new a(w);for(w=this.es.length;w--;){var k=this.es[w],P=p(k),S=b(k),M=m(k);this.neighbours[P].neighbours.push(new r(S,M)),this.neighbours[S].neighbours.push(new r(P,M))}}return l.prototype.DistanceMatrix=function(){for(var h=new Array(this.n),d=0;d<this.n;++d)h[d]=this.dijkstraNeighbours(d);return h},l.prototype.DistancesFromNode=function(h){return this.dijkstraNeighbours(h)},l.prototype.PathFromNodeToNode=function(h,d){return this.dijkstraNeighbours(h,d)},l.prototype.PathFromNodeToNodeWithPrevCost=function(h,d,p){var b=new t.PriorityQueue(function(R,B){return R.d<=B.d}),m=this.neighbours[h],w=new s(m,null,0),k={};for(b.push(w);!b.empty()&&(w=b.pop(),m=w.node,m.id!==d);)for(var P=m.neighbours.length;P--;){var S=m.neighbours[P],M=this.neighbours[S.id];if(!(w.prev&&M.id===w.prev.node.id)){var L=M.id+","+m.id;if(!(L in k&&k[L]<=w.d)){var T=w.prev?p(w.prev.node.id,m.id,M.id):0,j=w.d+S.distance+T;k[L]=j,b.push(new s(M,w,j))}}}for(var I=[];w.prev;)w=w.prev,I.push(w.node.id);return I},l.prototype.dijkstraNeighbours=function(h,d){d===void 0&&(d=-1);for(var p=new t.PriorityQueue(function(T,j){return T.d<=j.d}),b=this.neighbours.length,m=new Array(b);b--;){var w=this.neighbours[b];w.d=b===h?0:Number.POSITIVE_INFINITY,w.q=p.push(w)}for(;!p.empty();){var k=p.pop();if(m[k.id]=k.d,k.id===d){for(var P=[],S=k;typeof S.prev<"u";)P.push(S.prev.id),S=S.prev;return P}for(b=k.neighbours.length;b--;){var M=k.neighbours[b],S=this.neighbours[M.id],L=k.d+M.distance;k.d!==Number.MAX_VALUE&&S.d>L&&(S.d=L,S.prev=k,p.reduceKey(S.q,S,function(j,I){return j.q=I}))}}return m},l}();return b2.Calculator=c,b2}var ha={},mV;function wV(){if(mV)return ha;mV=1;var t=Kr&&Kr.__extends||function(){var J=function(K,ae){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,le){se.__proto__=le}||function(se,le){for(var he in le)le.hasOwnProperty(he)&&(se[he]=le[he])},J(K,ae)};return function(K,ae){J(K,ae);function se(){this.constructor=K}K.prototype=ae===null?Object.create(ae):(se.prototype=ae.prototype,new se)}}();Object.defineProperty(ha,"__esModule",{value:!0});var r=$0(),a=function(){function J(){}return J}();ha.Point=a;var s=function(){function J(K,ae,se,le){this.x1=K,this.y1=ae,this.x2=se,this.y2=le}return J}();ha.LineSegment=s;var c=function(J){t(K,J);function K(){return J!==null&&J.apply(this,arguments)||this}return K}(a);ha.PolyPoint=c;function l(J,K,ae){return(K.x-J.x)*(ae.y-J.y)-(ae.x-J.x)*(K.y-J.y)}ha.isLeft=l;function h(J,K,ae){return l(J,K,ae)>0}function d(J,K,ae){return l(J,K,ae)<0}function p(J){var K=J.slice(0).sort(function(xe,Se){return xe.x!==Se.x?Se.x-xe.x:Se.y-xe.y}),ae=J.length,se,le=0,he=K[0].x;for(se=1;se<ae&&K[se].x===he;++se);var fe=se-1,pe=[];if(pe.push(K[le]),fe===ae-1)K[fe].y!==K[le].y&&pe.push(K[fe]);else{var me,Te=ae-1,Oe=K[ae-1].x;for(se=ae-2;se>=0&&K[se].x===Oe;se--);for(me=se+1,se=fe;++se<=me;)if(!(l(K[le],K[me],K[se])>=0&&se<me)){for(;pe.length>1&&!(l(pe[pe.length-2],pe[pe.length-1],K[se])>0);)pe.length-=1;se!=le&&pe.push(K[se])}Te!=me&&pe.push(K[Te]);var ge=pe.length;for(se=me;--se>=fe;)if(!(l(K[Te],K[fe],K[se])>=0&&se>fe)){for(;pe.length>ge&&!(l(pe[pe.length-2],pe[pe.length-1],K[se])>0);)pe.length-=1;se!=le&&pe.push(K[se])}}return pe}ha.ConvexHull=p;function b(J,K,ae){K.slice(0).sort(function(se,le){return Math.atan2(se.y-J.y,se.x-J.x)-Math.atan2(le.y-J.y,le.x-J.x)}).forEach(ae)}ha.clockwiseRadialSweep=b;function m(J,K){var ae=K.slice(0);return ae.push(K[0]),{rtan:w(J,ae),ltan:k(J,ae)}}function w(J,K){var ae=K.length-1,se,le,he,fe,pe;if(d(J,K[1],K[0])&&!h(J,K[ae-1],K[0]))return 0;for(se=0,le=ae;;){if(le-se===1)return h(J,K[se],K[le])?se:le;if(he=Math.floor((se+le)/2),pe=d(J,K[he+1],K[he]),pe&&!h(J,K[he-1],K[he]))return he;fe=h(J,K[se+1],K[se]),fe?pe||h(J,K[se],K[he])?le=he:se=he:pe&&d(J,K[se],K[he])?le=he:se=he}}function k(J,K){var ae=K.length-1,se,le,he,fe,pe;if(h(J,K[ae-1],K[0])&&!d(J,K[1],K[0]))return 0;for(se=0,le=ae;;){if(le-se===1)return d(J,K[se],K[le])?se:le;if(he=Math.floor((se+le)/2),pe=d(J,K[he+1],K[he]),h(J,K[he-1],K[he])&&!pe)return he;fe=d(J,K[se+1],K[se]),fe?pe?d(J,K[se],K[he])?le=he:se=he:le=he:pe?se=he:h(J,K[se],K[he])?le=he:se=he}}function P(J,K,ae,se,le,he){var fe,pe;fe=ae(K[0],J),pe=se(J[fe],K);for(var me=!1;!me;){for(me=!0;fe===J.length-1&&(fe=0),!le(K[pe],J[fe],J[fe+1]);)++fe;for(;pe===0&&(pe=K.length-1),!he(J[fe],K[pe],K[pe-1]);)--pe,me=!1}return{t1:fe,t2:pe}}ha.tangent_PolyPolyC=P;function S(J,K){var ae=M(K,J);return{t1:ae.t2,t2:ae.t1}}ha.LRtangent_PolyPolyC=S;function M(J,K){return P(J,K,w,k,h,d)}ha.RLtangent_PolyPolyC=M;function L(J,K){return P(J,K,k,k,d,d)}ha.LLtangent_PolyPolyC=L;function T(J,K){return P(J,K,w,w,h,h)}ha.RRtangent_PolyPolyC=T;var j=function(){function J(K,ae){this.t1=K,this.t2=ae}return J}();ha.BiTangent=j;var I=function(){function J(){}return J}();ha.BiTangents=I;var R=function(J){t(K,J);function K(){return J!==null&&J.apply(this,arguments)||this}return K}(a);ha.TVGPoint=R;var B=function(){function J(K,ae,se,le){this.id=K,this.polyid=ae,this.polyvertid=se,this.p=le,le.vv=this}return J}();ha.VisibilityVertex=B;var F=function(){function J(K,ae){this.source=K,this.target=ae}return J.prototype.length=function(){var K=this.source.p.x-this.target.p.x,ae=this.source.p.y-this.target.p.y;return Math.sqrt(K*K+ae*ae)},J}();ha.VisibilityEdge=F;var z=function(){function J(K,ae){if(this.P=K,this.V=[],this.E=[],ae)this.V=ae.V.slice(0),this.E=ae.E.slice(0);else{for(var se=K.length,le=0;le<se;le++){for(var he=K[le],fe=0;fe<he.length;++fe){var pe=he[fe],me=new B(this.V.length,le,fe,pe);this.V.push(me),fe>0&&this.E.push(new F(he[fe-1].vv,me))}he.length>1&&this.E.push(new F(he[0].vv,he[he.length-1].vv))}for(var le=0;le<se-1;le++)for(var Te=K[le],fe=le+1;fe<se;fe++){var Oe=K[fe],ge=H(Te,Oe);for(var xe in ge){var Se=ge[xe],Le=Te[Se.t1],De=Oe[Se.t2];this.addEdgeIfVisible(Le,De,le,fe)}}}}return J.prototype.addEdgeIfVisible=function(K,ae,se,le){this.intersectsPolys(new s(K.x,K.y,ae.x,ae.y),se,le)||this.E.push(new F(K.vv,ae.vv))},J.prototype.addPoint=function(K,ae){var se=this.P.length;this.V.push(new B(this.V.length,se,0,K));for(var le=0;le<se;++le)if(le!==ae){var he=this.P[le],fe=m(K,he);this.addEdgeIfVisible(K,he[fe.ltan],ae,le),this.addEdgeIfVisible(K,he[fe.rtan],ae,le)}return K.vv},J.prototype.intersectsPolys=function(K,ae,se){for(var le=0,he=this.P.length;le<he;++le)if(le!=ae&&le!=se&&D(K,this.P[le]).length>0)return!0;return!1},J}();ha.TangentVisibilityGraph=z;function D(J,K){for(var ae=[],se=1,le=K.length;se<le;++se){var he=r.Rectangle.lineIntersection(J.x1,J.y1,J.x2,J.y2,K[se-1].x,K[se-1].y,K[se].x,K[se].y);he&&ae.push(he)}return ae}function H(J,K){for(var ae=J.length-1,se=K.length-1,le=new I,he=0;he<ae;++he)for(var fe=0;fe<se;++fe){var pe=J[he==0?ae-1:he-1],me=J[he],Te=J[he+1],Oe=K[fe==0?se-1:fe-1],ge=K[fe],xe=K[fe+1],Se=l(pe,me,ge),Le=l(me,Oe,ge),De=l(me,ge,xe),Ne=l(Oe,ge,me),Me=l(ge,pe,me),ke=l(ge,me,Te);Se>=0&&Le>=0&&De<0&&Ne>=0&&Me>=0&&ke<0?le.ll=new j(he,fe):Se<=0&&Le<=0&&De>0&&Ne<=0&&Me<=0&&ke>0?le.rr=new j(he,fe):Se<=0&&Le>0&&De<=0&&Ne>=0&&Me<0&&ke>=0?le.rl=new j(he,fe):Se>=0&&Le<0&&De>=0&&Ne<=0&&Me>0&&ke<=0&&(le.lr=new j(he,fe))}return le}ha.tangents=H;function Q(J,K){for(var ae=1,se=K.length;ae<se;++ae)if(d(K[ae-1],K[ae],J))return!1;return!0}function q(J,K){return!J.every(function(ae){return!Q(ae,K)})}function Z(J,K){if(q(J,K)||q(K,J))return!0;for(var ae=1,se=J.length;ae<se;++ae){var le=J[ae],he=J[ae-1];if(D(new s(he.x,he.y,le.x,le.y),K).length>0)return!0}return!1}return ha.polysOverlap=Z,ha}var Q0={},xV;function kV(){if(xV)return Q0;xV=1,Object.defineProperty(Q0,"__esModule",{value:!0});var t={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4};function r(s,c,l,S,P,p){P===void 0&&(P=1),p===void 0&&(p=!0);var b=0,m=0,w=c,k=l,P=typeof P<"u"?P:1,S=typeof S<"u"?S:0,M=0,L=0,T=0,j=0,I=[];if(s.length==0)return;R(s),F(s),p&&B(s);function R(q){q.forEach(function(J){Z(J)});function Z(J){var K=Number.MAX_VALUE,ae=Number.MAX_VALUE,se=0,le=0;J.array.forEach(function(he){var fe=typeof he.width<"u"?he.width:S,pe=typeof he.height<"u"?he.height:S;fe/=2,pe/=2,se=Math.max(he.x+fe,se),K=Math.min(he.x-fe,K),le=Math.max(he.y+pe,le),ae=Math.min(he.y-pe,ae)}),J.width=se-K,J.height=le-ae}}function B(q){q.forEach(function(Z){var J={x:0,y:0};Z.array.forEach(function(se){J.x+=se.x,J.y+=se.y}),J.x/=Z.array.length,J.y/=Z.array.length;var K={x:J.x-Z.width/2,y:J.y-Z.height/2},ae={x:Z.x-K.x+w/2-M/2,y:Z.y-K.y+k/2-L/2};Z.array.forEach(function(se){se.x+=ae.x,se.y+=ae.y})})}function F(q,Z){var J=Number.POSITIVE_INFINITY,K=0;q.sort(function(xe,Se){return Se.height-xe.height}),T=q.reduce(function(xe,Se){return xe.width<Se.width?xe.width:Se.width});for(var ae=Oe=T,se=ge=H(q),le=0,he=Number.MAX_VALUE,fe=Number.MAX_VALUE,pe=-1,me=Number.MAX_VALUE,Te=Number.MAX_VALUE;me>T||Te>t.FLOAT_EPSILON;){if(pe!=1)var Oe=se-(se-ae)/t.GOLDEN_SECTION,he=z(q,Oe);if(pe!=0)var ge=ae+(se-ae)/t.GOLDEN_SECTION,fe=z(q,ge);if(me=Math.abs(Oe-ge),Te=Math.abs(he-fe),he<J&&(J=he,K=Oe),fe<J&&(J=fe,K=ge),he>fe?(ae=Oe,Oe=ge,he=fe,pe=1):(se=ge,ge=Oe,fe=he,pe=0),le++>100)break}z(q,K)}function z(q,Z){I=[],M=0,L=0,j=m;for(var J=0;J<q.length;J++){var K=q[J];D(K,Z)}return Math.abs(Q()-P)}function D(q,Z){for(var J=void 0,K=0;K<I.length;K++)if(I[K].space_left>=q.height&&I[K].x+I[K].width+q.width+t.PADDING-Z<=t.FLOAT_EPSILON){J=I[K];break}I.push(q),J!==void 0?(q.x=J.x+J.width+t.PADDING,q.y=J.bottom,q.space_left=q.height,q.bottom=q.y,J.space_left-=q.height+t.PADDING,J.bottom+=q.height+t.PADDING):(q.y=j,j+=q.height+t.PADDING,q.x=b,q.bottom=q.y,q.space_left=q.height),q.y+q.height-L>-1e-4&&(L=q.y+q.height-m),q.x+q.width-M>-1e-4&&(M=q.x+q.width-b)}function H(q){var Z=0;return q.forEach(function(J){return Z+=J.width+t.PADDING}),Z}function Q(){return M/L}}Q0.applyPacking=r;function a(s,c){for(var l={},h={},d=[],p=0,b=0;b<c.length;b++){var m=c[b],w=m.source,k=m.target;h[w.index]?h[w.index].push(k):h[w.index]=[k],h[k.index]?h[k.index].push(w):h[k.index]=[w]}for(var b=0;b<s.length;b++){var P=s[b];l[P.index]||S(P,!0)}function S(M,L){if(l[M.index]===void 0){L&&(p++,d.push({array:[]})),l[M.index]=p,d[p-1].array.push(M);var T=h[M.index];if(T)for(var j=0;j<T.length;j++)S(T[j],!1)}}return d}return Q0.separateGraphs=a,Q0}var _V;function W0(){return _V||(_V=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});var r=cV(),a=IM(),s=LM(),c=$0(),l=v2(),h=wV(),d=kV(),p;(function(w){w[w.start=0]="start",w[w.tick=1]="tick",w[w.end=2]="end"})(p=t.EventType||(t.EventType={}));function b(w){return typeof w.leaves<"u"||typeof w.groups<"u"}var m=function(){function w(){var k=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:w.getSourceIndex,getTargetIndex:w.getTargetIndex,setLength:w.setLinkLength,getType:function(P){return typeof k._linkType=="function"?k._linkType(P):0}}}return w.prototype.on=function(k,P){return this.event||(this.event={}),typeof k=="string"?this.event[p[k]]=P:this.event[k]=P,this},w.prototype.trigger=function(k){this.event&&typeof this.event[k.type]<"u"&&this.event[k.type](k)},w.prototype.kick=function(){for(;!this.tick(););},w.prototype.tick=function(){if(this._alpha<this._threshold)return this._running=!1,this.trigger({type:p.end,alpha:this._alpha=0,stress:this._lastStress}),!0;var k=this._nodes.length;this._links.length;var P,S;for(this._descent.locks.clear(),S=0;S<k;++S)if(P=this._nodes[S],P.fixed){(typeof P.px>"u"||typeof P.py>"u")&&(P.px=P.x,P.py=P.y);var M=[P.px,P.py];this._descent.locks.add(S,M)}var L=this._descent.rungeKutta();return L===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=L),this._lastStress=L,this.updateNodePositions(),this.trigger({type:p.tick,alpha:this._alpha,stress:this._lastStress}),!1},w.prototype.updateNodePositions=function(){for(var k=this._descent.x[0],P=this._descent.x[1],S,M=this._nodes.length;M--;)S=this._nodes[M],S.x=k[M],S.y=P[M]},w.prototype.nodes=function(k){if(!k){if(this._nodes.length===0&&this._links.length>0){var P=0;this._links.forEach(function(M){P=Math.max(P,M.source,M.target)}),this._nodes=new Array(++P);for(var S=0;S<P;++S)this._nodes[S]={}}return this._nodes}return this._nodes=k,this},w.prototype.groups=function(k){var P=this;return k?(this._groups=k,this._rootGroup={},this._groups.forEach(function(S){typeof S.padding>"u"&&(S.padding=1),typeof S.leaves<"u"&&S.leaves.forEach(function(M,L){typeof M=="number"&&((S.leaves[L]=P._nodes[M]).parent=S)}),typeof S.groups<"u"&&S.groups.forEach(function(M,L){typeof M=="number"&&((S.groups[L]=P._groups[M]).parent=S)})}),this._rootGroup.leaves=this._nodes.filter(function(S){return typeof S.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(S){return typeof S.parent>"u"}),this):this._groups},w.prototype.powerGraphGroups=function(k){var P=r.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(P.groups),k(P),this},w.prototype.avoidOverlaps=function(k){return arguments.length?(this._avoidOverlaps=k,this):this._avoidOverlaps},w.prototype.handleDisconnected=function(k){return arguments.length?(this._handleDisconnected=k,this):this._handleDisconnected},w.prototype.flowLayout=function(k,P){return arguments.length||(k="y"),this._directedLinkConstraints={axis:k,getMinSeparation:typeof P=="number"?function(){return P}:P},this},w.prototype.links=function(k){return arguments.length?(this._links=k,this):this._links},w.prototype.constraints=function(k){return arguments.length?(this._constraints=k,this):this._constraints},w.prototype.distanceMatrix=function(k){return arguments.length?(this._distanceMatrix=k,this):this._distanceMatrix},w.prototype.size=function(k){return k?(this._canvasSize=k,this):this._canvasSize},w.prototype.defaultNodeSize=function(k){return k?(this._defaultNodeSize=k,this):this._defaultNodeSize},w.prototype.groupCompactness=function(k){return k?(this._groupCompactness=k,this):this._groupCompactness},w.prototype.linkDistance=function(k){return k?(this._linkDistance=typeof k=="function"?k:+k,this._linkLengthCalculator=null,this):this._linkDistance},w.prototype.linkType=function(k){return this._linkType=k,this},w.prototype.convergenceThreshold=function(k){return k?(this._threshold=typeof k=="function"?k:+k,this):this._threshold},w.prototype.alpha=function(k){return arguments.length?(k=+k,this._alpha?k>0?this._alpha=k:this._alpha=0:k>0&&(this._running||(this._running=!0,this.trigger({type:p.start,alpha:this._alpha=k}),this.kick())),this):this._alpha},w.prototype.getLinkLength=function(k){return typeof this._linkDistance=="function"?+this._linkDistance(k):this._linkDistance},w.setLinkLength=function(k,P){k.length=P},w.prototype.getLinkType=function(k){return typeof this._linkType=="function"?this._linkType(k):0},w.prototype.symmetricDiffLinkLengths=function(k,P){var S=this;return P===void 0&&(P=1),this.linkDistance(function(M){return k*M.length}),this._linkLengthCalculator=function(){return a.symmetricDiffLinkLengths(S._links,S.linkAccessor,P)},this},w.prototype.jaccardLinkLengths=function(k,P){var S=this;return P===void 0&&(P=1),this.linkDistance(function(M){return k*M.length}),this._linkLengthCalculator=function(){return a.jaccardLinkLengths(S._links,S.linkAccessor,P)},this},w.prototype.start=function(k,P,S,M,L,T){var j=this;k===void 0&&(k=0),P===void 0&&(P=0),S===void 0&&(S=0),M===void 0&&(M=0),L===void 0&&(L=!0),T===void 0&&(T=!0);var I,R=this.nodes().length,B=R+2*this._groups.length;this._links.length;var F=this._canvasSize[0],z=this._canvasSize[1],D=new Array(B),H=new Array(B),Q=null,q=this._avoidOverlaps;this._nodes.forEach(function(fe,pe){fe.index=pe,typeof fe.x>"u"&&(fe.x=F/2,fe.y=z/2),D[pe]=fe.x,H[pe]=fe.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var Z;this._distanceMatrix?Z=this._distanceMatrix:(Z=new l.Calculator(B,this._links,w.getSourceIndex,w.getTargetIndex,function(fe){return j.getLinkLength(fe)}).DistanceMatrix(),Q=s.Descent.createSquareMatrix(B,function(){return 2}),this._links.forEach(function(fe){typeof fe.source=="number"&&(fe.source=j._nodes[fe.source]),typeof fe.target=="number"&&(fe.target=j._nodes[fe.target])}),this._links.forEach(function(fe){var pe=w.getSourceIndex(fe),me=w.getTargetIndex(fe);Q[pe][me]=Q[me][pe]=fe.weight||1}));var J=s.Descent.createSquareMatrix(B,function(fe,pe){return Z[fe][pe]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var I=R,K=function(pe,me,Te,Oe){Q[pe][me]=Q[me][pe]=Te,J[pe][me]=J[me][pe]=Oe};this._groups.forEach(function(pe){K(I,I+1,j._groupCompactness,.1),D[I]=0,H[I++]=0,D[I]=0,H[I++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var ae=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,ae=ae.concat(a.generateDirectedEdgeConstraints(R,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new s.Descent([D,H],J),this._descent.locks.clear();for(var I=0;I<R;++I){var se=this._nodes[I];if(se.fixed){se.px=se.x,se.py=se.y;var le=[se.x,se.y];this._descent.locks.add(I,le)}}if(this._descent.threshold=this._threshold,this.initialLayout(k,D,H),ae.length>0&&(this._descent.project=new c.Projection(this._nodes,this._groups,this._rootGroup,ae).projectFunctions()),this._descent.run(P),this.separateOverlappingComponents(F,z,T),this.avoidOverlaps(q),q&&(this._nodes.forEach(function(fe,pe){fe.x=D[pe],fe.y=H[pe]}),this._descent.project=new c.Projection(this._nodes,this._groups,this._rootGroup,ae,!0).projectFunctions(),this._nodes.forEach(function(fe,pe){D[pe]=fe.x,H[pe]=fe.y})),this._descent.G=Q,this._descent.run(S),M){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=R,this._descent.scaleSnapByMaxH=R!=B;var he=s.Descent.createSquareMatrix(B,function(fe,pe){return fe>=R||pe>=R?Q[fe][pe]:0});this._descent.G=he,this._descent.run(M)}return this.updateNodePositions(),this.separateOverlappingComponents(F,z,T),L?this.resume():this},w.prototype.initialLayout=function(k,P,S){if(this._groups.length>0&&k>0){var M=this._nodes.length,L=this._links.map(function(j){return{source:j.source.index,target:j.target.index}}),T=this._nodes.map(function(j){return{index:j.index}});this._groups.forEach(function(j,I){T.push({index:j.index=M+I})}),this._groups.forEach(function(j,I){typeof j.leaves<"u"&&j.leaves.forEach(function(R){return L.push({source:j.index,target:R.index})}),typeof j.groups<"u"&&j.groups.forEach(function(R){return L.push({source:j.index,target:R.index})})}),new w().size(this.size()).nodes(T).links(L).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(k,0,0,0,!1),this._nodes.forEach(function(j){P[j.index]=T[j.index].x,S[j.index]=T[j.index].y})}else this._descent.run(k)},w.prototype.separateOverlappingComponents=function(k,P,S){var M=this;if(S===void 0&&(S=!0),!this._distanceMatrix&&this._handleDisconnected){var L=this._descent.x[0],T=this._descent.x[1];this._nodes.forEach(function(I,R){I.x=L[R],I.y=T[R]});var j=d.separateGraphs(this._nodes,this._links);d.applyPacking(j,k,P,this._defaultNodeSize,1,S),this._nodes.forEach(function(I,R){M._descent.x[0][R]=I.x,M._descent.x[1][R]=I.y,I.bounds&&(I.bounds.setXCentre(I.x),I.bounds.setYCentre(I.y))})}},w.prototype.resume=function(){return this.alpha(.1)},w.prototype.stop=function(){return this.alpha(0)},w.prototype.prepareEdgeRouting=function(k){k===void 0&&(k=0),this._visibilityGraph=new h.TangentVisibilityGraph(this._nodes.map(function(P){return P.bounds.inflate(-k).vertices()}))},w.prototype.routeEdge=function(k,P,S){P===void 0&&(P=5);var M=[],L=new h.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),T={x:k.source.x,y:k.source.y},j={x:k.target.x,y:k.target.y},I=L.addPoint(T,k.source.index),R=L.addPoint(j,k.target.index);L.addEdgeIfVisible(T,j,k.source.index,k.target.index),typeof S<"u"&&S(L);var B=function(ae){return ae.source.id},F=function(ae){return ae.target.id},z=function(ae){return ae.length()},D=new l.Calculator(L.V.length,L.E,B,F,z),H=D.PathFromNodeToNode(I.id,R.id);if(H.length===1||H.length===L.V.length){var Q=c.makeEdgeBetween(k.source.innerBounds,k.target.innerBounds,P);M=[Q.sourceIntersection,Q.arrowStart]}else{for(var q=H.length-2,Z=L.V[H[q]].p,J=L.V[H[0]].p,M=[k.source.innerBounds.rayIntersection(Z.x,Z.y)],K=q;K>=0;--K)M.push(L.V[H[K]].p);M.push(c.makeEdgeTo(J,k.target.innerBounds,P))}return M},w.getSourceIndex=function(k){return typeof k.source=="number"?k.source:k.source.index},w.getTargetIndex=function(k){return typeof k.target=="number"?k.target:k.target.index},w.linkId=function(k){return w.getSourceIndex(k)+"-"+w.getTargetIndex(k)},w.dragStart=function(k){b(k)?w.storeOffset(k,w.dragOrigin(k)):(w.stopNode(k),k.fixed|=2)},w.stopNode=function(k){k.px=k.x,k.py=k.y},w.storeOffset=function(k,P){typeof k.leaves<"u"&&k.leaves.forEach(function(S){S.fixed|=2,w.stopNode(S),S._dragGroupOffsetX=S.x-P.x,S._dragGroupOffsetY=S.y-P.y}),typeof k.groups<"u"&&k.groups.forEach(function(S){return w.storeOffset(S,P)})},w.dragOrigin=function(k){return b(k)?{x:k.bounds.cx(),y:k.bounds.cy()}:k},w.drag=function(k,P){b(k)?(typeof k.leaves<"u"&&k.leaves.forEach(function(S){k.bounds.setXCentre(P.x),k.bounds.setYCentre(P.y),S.px=S._dragGroupOffsetX+P.x,S.py=S._dragGroupOffsetY+P.y}),typeof k.groups<"u"&&k.groups.forEach(function(S){return w.drag(S,P)})):(k.px=P.x,k.py=P.y)},w.dragEnd=function(k){b(k)?(typeof k.leaves<"u"&&k.leaves.forEach(function(P){w.dragEnd(P),delete P._dragGroupOffsetX,delete P._dragGroupOffsetY}),typeof k.groups<"u"&&k.groups.forEach(w.dragEnd)):k.fixed&=-7},w.mouseOver=function(k){k.fixed|=4,k.px=k.x,k.py=k.y},w.mouseOut=function(k){k.fixed&=-5},w}();t.Layout=m}(sV)),sV}var EV;function ave(){if(EV)return Z0;EV=1;var t=Kr&&Kr.__extends||function(){var c=function(l,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var b in p)p.hasOwnProperty(b)&&(d[b]=p[b])},c(l,h)};return function(l,h){c(l,h);function d(){this.constructor=l}l.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}}();Object.defineProperty(Z0,"__esModule",{value:!0});var r=W0(),a=function(c){t(l,c);function l(h){var d=c.call(this)||this,p=h;return p.trigger&&(d.trigger=p.trigger),p.kick&&(d.kick=p.kick),p.drag&&(d.drag=p.drag),p.on&&(d.on=p.on),d.dragstart=d.dragStart=r.Layout.dragStart,d.dragend=d.dragEnd=r.Layout.dragEnd,d}return l.prototype.trigger=function(h){},l.prototype.kick=function(){},l.prototype.drag=function(){},l.prototype.on=function(h,d){return this},l}(r.Layout);Z0.LayoutAdaptor=a;function s(c){return new a(c)}return Z0.adaptor=s,Z0}var y2={},J0={},CV;function ove(){if(CV)return J0;CV=1;var t=Kr&&Kr.__extends||function(){var c=function(l,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var b in p)p.hasOwnProperty(b)&&(d[b]=p[b])},c(l,h)};return function(l,h){c(l,h);function d(){this.constructor=l}l.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}}();Object.defineProperty(J0,"__esModule",{value:!0});var r=W0(),a=function(c){t(l,c);function l(){var h=c.call(this)||this;h.event=d3.dispatch(r.EventType[r.EventType.start],r.EventType[r.EventType.tick],r.EventType[r.EventType.end]);var d=h;return h.drag=function(){if(!p)var p=d3.behavior.drag().origin(r.Layout.dragOrigin).on("dragstart.d3adaptor",r.Layout.dragStart).on("drag.d3adaptor",function(b){r.Layout.drag(b,d3.event),d.resume()}).on("dragend.d3adaptor",r.Layout.dragEnd);if(!arguments.length)return p;this.call(p)},h}return l.prototype.trigger=function(h){var d={type:r.EventType[h.type],alpha:h.alpha,stress:h.stress};this.event[d.type](d)},l.prototype.kick=function(){var h=this;d3.timer(function(){return c.prototype.tick.call(h)})},l.prototype.on=function(h,d){return typeof h=="string"?this.event.on(h,d):this.event.on(r.EventType[h],d),this},l}(r.Layout);J0.D3StyleLayoutAdaptor=a;function s(){return new a}return J0.d3adaptor=s,J0}var m2={},PV;function sve(){if(PV)return m2;PV=1;var t=Kr&&Kr.__extends||function(){var s=function(c,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)d.hasOwnProperty(p)&&(h[p]=d[p])},s(c,l)};return function(c,l){s(c,l);function h(){this.constructor=c}c.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}}();Object.defineProperty(m2,"__esModule",{value:!0});var r=W0(),a=function(s){t(c,s);function c(l){var h=s.call(this)||this;h.d3Context=l,h.event=l.dispatch(r.EventType[r.EventType.start],r.EventType[r.EventType.tick],r.EventType[r.EventType.end]);var d=h;return h.drag=function(){if(!p)var p=l.drag().subject(r.Layout.dragOrigin).on("start.d3adaptor",r.Layout.dragStart).on("drag.d3adaptor",function(b){r.Layout.drag(b,l.event),d.resume()}).on("end.d3adaptor",r.Layout.dragEnd);if(!arguments.length)return p;arguments[0].call(p)},h}return c.prototype.trigger=function(l){var h={type:r.EventType[l.type],alpha:l.alpha,stress:l.stress};this.event.call(h.type,h)},c.prototype.kick=function(){var l=this,h=this.d3Context.timer(function(){return s.prototype.tick.call(l)&&h.stop()})},c.prototype.on=function(l,h){return typeof l=="string"?this.event.on(l,h):this.event.on(r.EventType[l],h),this},c}(r.Layout);return m2.D3StyleLayoutAdaptor=a,m2}var SV;function uve(){if(SV)return y2;SV=1,Object.defineProperty(y2,"__esModule",{value:!0});var t=ove(),r=sve();function a(c){return!c||s(c)?new t.D3StyleLayoutAdaptor:new r.D3StyleLayoutAdaptor(c)}y2.d3adaptor=a;function s(c){var l=/^3\./;return c.version&&c.version.match(l)!==null}return y2}var lp={},NV;function TV(){if(NV)return lp;NV=1,Object.defineProperty(lp,"__esModule",{value:!0});var t=$0(),r=OM(),a=v2(),s=function(){function d(p,b,m){this.id=p,this.rect=b,this.children=m,this.leaf=typeof m>"u"||m.length===0}return d}();lp.NodeWrapper=s;var c=function(){function d(p,b,m,w,k){w===void 0&&(w=null),k===void 0&&(k=null),this.id=p,this.x=b,this.y=m,this.node=w,this.line=k}return d}();lp.Vert=c;var l=function(){function d(p,b){this.s=p,this.t=b;var m=d.findMatch(p,b),w=b.slice(0).reverse(),k=d.findMatch(p,w);m.length>=k.length?(this.length=m.length,this.si=m.si,this.ti=m.ti,this.reversed=!1):(this.length=k.length,this.si=k.si,this.ti=b.length-k.ti-k.length,this.reversed=!0)}return d.findMatch=function(p,b){for(var m=p.length,w=b.length,k={length:0,si:-1,ti:-1},P=new Array(m),S=0;S<m;S++){P[S]=new Array(w);for(var M=0;M<w;M++)if(p[S]===b[M]){var L=P[S][M]=S===0||M===0?1:P[S-1][M-1]+1;L>k.length&&(k.length=L,k.si=S-L+1,k.ti=M-L+1)}else P[S][M]=0}return k},d.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},d}();lp.LongestCommonSubsequence=l;var h=function(){function d(p,b,m){var w=this;m===void 0&&(m=12),this.originalnodes=p,this.groupPadding=m,this.leaves=null,this.nodes=p.map(function(F,z){return new s(z,b.getBounds(F),b.getChildren(F))}),this.leaves=this.nodes.filter(function(F){return F.leaf}),this.groups=this.nodes.filter(function(F){return!F.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(F){return F.children.forEach(function(z){return w.nodes[z].parent=F})}),this.root={children:[]},this.nodes.forEach(function(F){typeof F.parent>"u"&&(F.parent=w.root,w.root.children.push(F.id)),F.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(F,z){return w.getDepth(F)-w.getDepth(z)});var k=this.backToFront.slice(0).reverse().filter(function(F){return!F.leaf});k.forEach(function(F){var z=t.Rectangle.empty();F.children.forEach(function(D){return z=z.union(w.nodes[D].rect)}),F.rect=z.inflate(w.groupPadding)});var P=this.midPoints(this.cols.map(function(F){return F.pos})),S=this.midPoints(this.rows.map(function(F){return F.pos})),M=P[0],L=P[P.length-1],T=S[0],j=S[S.length-1],I=this.rows.map(function(F){return{x1:M,x2:L,y1:F.pos,y2:F.pos}}).concat(S.map(function(F){return{x1:M,x2:L,y1:F,y2:F}})),R=this.cols.map(function(F){return{x1:F.pos,x2:F.pos,y1:T,y2:j}}).concat(P.map(function(F){return{x1:F,x2:F,y1:T,y2:j}})),B=I.concat(R);B.forEach(function(F){return F.verts=[]}),this.verts=[],this.edges=[],I.forEach(function(F){return R.forEach(function(z){var D=new c(w.verts.length,z.x1,F.y1);F.verts.push(D),z.verts.push(D),w.verts.push(D);for(var H=w.backToFront.length;H-- >0;){var Q=w.backToFront[H],q=Q.rect,Z=Math.abs(D.x-q.cx()),J=Math.abs(D.y-q.cy());if(Z<q.width()/2&&J<q.height()/2){D.node=Q;break}}})}),B.forEach(function(F,z){w.nodes.forEach(function(J,K){J.rect.lineIntersections(F.x1,F.y1,F.x2,F.y2).forEach(function(ae,se){var le=new c(w.verts.length,ae.x,ae.y,J,F);w.verts.push(le),F.verts.push(le),J.ports.push(le)})});var D=Math.abs(F.y1-F.y2)<.1,H=function(J,K){return D?K.x-J.x:K.y-J.y};F.verts.sort(H);for(var Q=1;Q<F.verts.length;Q++){var q=F.verts[Q-1],Z=F.verts[Q];q.node&&q.node===Z.node&&q.node.leaf||w.edges.push({source:q.id,target:Z.id,length:Math.abs(H(q,Z))})}})}return d.prototype.avg=function(p){return p.reduce(function(b,m){return b+m})/p.length},d.prototype.getGridLines=function(p){for(var b=[],m=this.leaves.slice(0,this.leaves.length);m.length>0;){var w=m.filter(function(P){return P.rect["overlap"+p.toUpperCase()](m[0].rect)}),k={nodes:w,pos:this.avg(w.map(function(P){return P.rect["c"+p]()}))};b.push(k),k.nodes.forEach(function(P){return m.splice(m.indexOf(P),1)})}return b.sort(function(P,S){return P.pos-S.pos}),b},d.prototype.getDepth=function(p){for(var b=0;p.parent!==this.root;)b++,p=p.parent;return b},d.prototype.midPoints=function(p){for(var b=p[1]-p[0],m=[p[0]-b/2],w=1;w<p.length;w++)m.push((p[w]+p[w-1])/2);return m.push(p[p.length-1]+b/2),m},d.prototype.findLineage=function(p){var b=[p];do p=p.parent,b.push(p);while(p!==this.root);return b.reverse()},d.prototype.findAncestorPathBetween=function(p,b){for(var m=this.findLineage(p),w=this.findLineage(b),k=0;m[k]===w[k];)k++;return{commonAncestor:m[k-1],lineages:m.slice(k).concat(w.slice(k))}},d.prototype.siblingObstacles=function(p,b){var m=this,w=this.findAncestorPathBetween(p,b),k={};w.lineages.forEach(function(S){return k[S.id]={}});var P=w.commonAncestor.children.filter(function(S){return!(S in k)});return w.lineages.filter(function(S){return S.parent!==w.commonAncestor}).forEach(function(S){return P=P.concat(S.parent.children.filter(function(M){return M!==S.id}))}),P.map(function(S){return m.nodes[S]})},d.getSegmentSets=function(p,b,m){for(var w=[],k=0;k<p.length;k++)for(var P=p[k],S=0;S<P.length;S++){var M=P[S];M.edgeid=k,M.i=S;var L=M[1][b]-M[0][b];Math.abs(L)<.1&&w.push(M)}w.sort(function(R,B){return R[0][b]-B[0][b]});for(var T=[],j=null,I=0;I<w.length;I++){var M=w[I];(!j||Math.abs(M[0][b]-j.pos)>.1)&&(j={pos:M[0][b],segments:[]},T.push(j)),j.segments.push(M)}return T},d.nudgeSegs=function(p,b,m,w,k,P){var S=w.length;if(!(S<=1)){for(var M=w.map(function(Q){return new r.Variable(Q[0][p])}),L=[],T=0;T<S;T++)for(var j=0;j<S;j++)if(T!==j){var I=w[T],R=w[j],B=I.edgeid,F=R.edgeid,z=-1,D=-1;p=="x"?k(B,F)&&(I[0][b]<I[1][b]?(z=j,D=T):(z=T,D=j)):k(B,F)&&(I[0][b]<I[1][b]?(z=T,D=j):(z=j,D=T)),z>=0&&L.push(new r.Constraint(M[z],M[D],P))}var H=new r.Solver(M,L);H.solve(),M.forEach(function(Q,q){var Z=w[q],J=Q.position();Z[0][p]=Z[1][p]=J;var K=m[Z.edgeid];Z.i>0&&(K[Z.i-1][1][p]=J),Z.i<K.length-1&&(K[Z.i+1][0][p]=J)})}},d.nudgeSegments=function(p,b,m,w,k){for(var P=d.getSegmentSets(p,b,m),S=0;S<P.length;S++){for(var M=P[S],L=[],T=0;T<M.segments.length;T++){var j=M.segments[T];L.push({type:0,s:j,pos:Math.min(j[0][m],j[1][m])}),L.push({type:1,s:j,pos:Math.max(j[0][m],j[1][m])})}L.sort(function(B,F){return B.pos-F.pos+B.type-F.type});var I=[],R=0;L.forEach(function(B){B.type===0?(I.push(B.s),R++):R--,R==0&&(d.nudgeSegs(b,m,p,I,w,k),I=[])})}},d.prototype.routeEdges=function(p,b,m,w){var k=this,P=p.map(function(L){return k.route(m(L),w(L))}),S=d.orderEdges(P),M=P.map(function(L){return d.makeSegments(L)});return d.nudgeSegments(M,"x","y",S,b),d.nudgeSegments(M,"y","x",S,b),d.unreverseEdges(M,P),M},d.unreverseEdges=function(p,b){p.forEach(function(m,w){var k=b[w];k.reversed&&(m.reverse(),m.forEach(function(P){P.reverse()}))})},d.angleBetween2Lines=function(p,b){var m=Math.atan2(p[0].y-p[1].y,p[0].x-p[1].x),w=Math.atan2(b[0].y-b[1].y,b[0].x-b[1].x),k=m-w;return(k>Math.PI||k<-Math.PI)&&(k=w-m),k},d.isLeft=function(p,b,m){return(b.x-p.x)*(m.y-p.y)-(b.y-p.y)*(m.x-p.x)<=0},d.getOrder=function(p){for(var b={},m=0;m<p.length;m++){var w=p[m];typeof b[w.l]>"u"&&(b[w.l]={}),b[w.l][w.r]=!0}return function(k,P){return typeof b[k]<"u"&&b[k][P]}},d.orderEdges=function(p){for(var b=[],m=0;m<p.length-1;m++)for(var w=m+1;w<p.length;w++){var k=p[m],P=p[w],S=new l(k,P),M,L,T;if(S.length!==0){if(S.reversed&&(P.reverse(),P.reversed=!0,S=new l(k,P)),(S.si<=0||S.ti<=0)&&(S.si+S.length>=k.length||S.ti+S.length>=P.length)){b.push({l:m,r:w});continue}S.si+S.length>=k.length||S.ti+S.length>=P.length?(M=k[S.si+1],T=k[S.si-1],L=P[S.ti-1]):(M=k[S.si+S.length-2],L=k[S.si+S.length],T=P[S.ti+S.length]),d.isLeft(M,L,T)?b.push({l:w,r:m}):b.push({l:m,r:w})}}return d.getOrder(b)},d.makeSegments=function(p){function b(L){return{x:L.x,y:L.y}}for(var m=function(L,T,j){return Math.abs((T.x-L.x)*(j.y-L.y)-(T.y-L.y)*(j.x-L.x))<.001},w=[],k=b(p[0]),P=1;P<p.length;P++){var S=b(p[P]),M=P<p.length-1?p[P+1]:null;(!M||!m(k,S,M))&&(w.push([k,S]),k=S)}return w},d.prototype.route=function(p,b){var m=this,w=this.nodes[p],k=this.nodes[b];this.obstacles=this.siblingObstacles(w,k);var P={};this.obstacles.forEach(function(D){return P[D.id]=D}),this.passableEdges=this.edges.filter(function(D){var H=m.verts[D.source],Q=m.verts[D.target];return!(H.node&&H.node.id in P||Q.node&&Q.node.id in P)});for(var S=1;S<w.ports.length;S++){var M=w.ports[0].id,L=w.ports[S].id;this.passableEdges.push({source:M,target:L,length:0})}for(var S=1;S<k.ports.length;S++){var M=k.ports[0].id,L=k.ports[S].id;this.passableEdges.push({source:M,target:L,length:0})}var T=function(D){return D.source},j=function(D){return D.target},I=function(D){return D.length},R=new a.Calculator(this.verts.length,this.passableEdges,T,j,I),B=function(D,H,Q){var q=m.verts[D],Z=m.verts[H],J=m.verts[Q],K=Math.abs(J.x-q.x),ae=Math.abs(J.y-q.y);return q.node===w&&q.node===Z.node||Z.node===k&&Z.node===J.node?0:K>1&&ae>1?1e3:0},F=R.PathFromNodeToNodeWithPrevCost(w.ports[0].id,k.ports[0].id,B),z=F.reverse().map(function(D){return m.verts[D]});return z.push(this.nodes[k.id].ports[0]),z.filter(function(D,H){return!(H<z.length-1&&z[H+1].node===w&&D.node===w||H>0&&D.node===k&&z[H-1].node===k)})},d.getRoutePath=function(p,b,m,w){var k={routepath:"M "+p[0][0].x+" "+p[0][0].y+" ",arrowpath:""};if(p.length>1)for(var P=0;P<p.length;P++){var S=p[P],M=S[1].x,L=S[1].y,T=M-S[0].x,j=L-S[0].y;if(P<p.length-1){Math.abs(T)>0?M-=T/Math.abs(T)*b:L-=j/Math.abs(j)*b,k.routepath+="L "+M+" "+L+" ";var I=p[P+1],R=I[0].x,B=I[0].y,F=I[1].x,z=I[1].y;T=F-R,j=z-B;var D=d.angleBetween2Lines(S,I)<0?1:0,H,Q;Math.abs(T)>0?(H=R+T/Math.abs(T)*b,Q=B):(H=R,Q=B+j/Math.abs(j)*b);var q=Math.abs(H-M),Z=Math.abs(Q-L);k.routepath+="A "+q+" "+Z+" 0 0 "+D+" "+H+" "+Q+" "}else{var J=[M,L],K,ae;Math.abs(T)>0?(M-=T/Math.abs(T)*w,K=[M,L+m],ae=[M,L-m]):(L-=j/Math.abs(j)*w,K=[M+m,L],ae=[M-m,L]),k.routepath+="L "+M+" "+L+" ",w>0&&(k.arrowpath="M "+J[0]+" "+J[1]+" L "+K[0]+" "+K[1]+" L "+ae[0]+" "+ae[1])}}else{var S=p[0],M=S[1].x,L=S[1].y,T=M-S[0].x,j=L-S[0].y,J=[M,L],K,ae;Math.abs(T)>0?(M-=T/Math.abs(T)*w,K=[M,L+m],ae=[M,L-m]):(L-=j/Math.abs(j)*w,K=[M+m,L],ae=[M-m,L]),k.routepath+="L "+M+" "+L+" ",w>0&&(k.arrowpath="M "+J[0]+" "+J[1]+" L "+K[0]+" "+K[1]+" L "+ae[0]+" "+ae[1])}return k},d}();return lp.GridRouter=h,lp}var nb={},MV;function cve(){if(MV)return nb;MV=1,Object.defineProperty(nb,"__esModule",{value:!0});var t=v2(),r=LM(),a=$0(),s=IM(),c=function(){function p(b,m){this.source=b,this.target=m}return p.prototype.actualLength=function(b){var m=this;return Math.sqrt(b.reduce(function(w,k){var P=k[m.target]-k[m.source];return w+P*P},0))},p}();nb.Link3D=c;var l=function(){function p(b,m,w){b===void 0&&(b=0),m===void 0&&(m=0),w===void 0&&(w=0),this.x=b,this.y=m,this.z=w}return p}();nb.Node3D=l;var h=function(){function p(b,m,w){var k=this;w===void 0&&(w=1),this.nodes=b,this.links=m,this.idealLinkLength=w,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(p.k);for(var P=0;P<p.k;++P)this.result[P]=new Array(b.length);b.forEach(function(S,M){for(var L=0,T=p.dims;L<T.length;L++){var j=T[L];typeof S[j]>"u"&&(S[j]=Math.random())}k.result[0][M]=S.x,k.result[1][M]=S.y,k.result[2][M]=S.z})}return p.prototype.linkLength=function(b){return b.actualLength(this.result)},p.prototype.start=function(b){var m=this;b===void 0&&(b=100);var w=this.nodes.length,k=new d;this.useJaccardLinkLengths&&s.jaccardLinkLengths(this.links,k,1.5),this.links.forEach(function(j){return j.length*=m.idealLinkLength});var P=new t.Calculator(w,this.links,function(j){return j.source},function(j){return j.target},function(j){return j.length}).DistanceMatrix(),S=r.Descent.createSquareMatrix(w,function(j,I){return P[j][I]}),M=r.Descent.createSquareMatrix(w,function(){return 2});this.links.forEach(function(j){var I=j.source,R=j.target;return M[I][R]=M[R][I]=1}),this.descent=new r.Descent(this.result,S),this.descent.threshold=.001,this.descent.G=M,this.constraints&&(this.descent.project=new a.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var L=0;L<this.nodes.length;L++){var T=this.nodes[L];T.fixed&&this.descent.locks.add(L,[T.x,T.y,T.z])}return this.descent.run(b),this},p.prototype.tick=function(){this.descent.locks.clear();for(var b=0;b<this.nodes.length;b++){var m=this.nodes[b];m.fixed&&this.descent.locks.add(b,[m.x,m.y,m.z])}return this.descent.rungeKutta()},p.dims=["x","y","z"],p.k=p.dims.length,p}();nb.Layout3D=h;var d=function(){function p(){}return p.prototype.getSourceIndex=function(b){return b.source},p.prototype.getTargetIndex=function(b){return b.target},p.prototype.getLength=function(b){return b.length},p.prototype.setLength=function(b,m){b.length=m},p}();return nb}var X0={},jV;function lve(){if(jV)return X0;jV=1,Object.defineProperty(X0,"__esModule",{value:!0});var t=W0(),r=TV();function a(l,h,d,p){l.cola.start(0,0,0,10,!1);var b=s(l.cola.nodes(),l.cola.groups(),d,p);return b.routeEdges(l.powerGraph.powerEdges,h,function(m){return m.source.routerNode.id},function(m){return m.target.routerNode.id})}X0.gridify=a;function s(l,h,d,p){l.forEach(function(m){m.routerNode={name:m.name,bounds:m.bounds.inflate(-d)}}),h.forEach(function(m){m.routerNode={bounds:m.bounds.inflate(-p),children:(typeof m.groups<"u"?m.groups.map(function(w){return l.length+w.id}):[]).concat(typeof m.leaves<"u"?m.leaves.map(function(w){return w.index}):[])}});var b=l.concat(h).map(function(m,w){return m.routerNode.id=w,m.routerNode});return new r.GridRouter(b,{getChildren:function(m){return m.children},getBounds:function(m){return m.bounds}},d-p)}function c(l,h,d){var p;l.nodes.forEach(function(k,P){return k.index=P}),new t.Layout().avoidOverlaps(!1).nodes(l.nodes).links(l.links).powerGraphGroups(function(k){p=k,p.groups.forEach(function(P){return P.padding=d})});var b=l.nodes.length,m=[],w=l.nodes.slice(0);return w.forEach(function(k,P){return k.index=P}),p.groups.forEach(function(k){var P=k.index=k.id+b;w.push(k),typeof k.leaves<"u"&&k.leaves.forEach(function(S){return m.push({source:P,target:S.index})}),typeof k.groups<"u"&&k.groups.forEach(function(S){return m.push({source:P,target:S.id+b})})}),p.powerEdges.forEach(function(k){m.push({source:k.source.index,target:k.target.index})}),new t.Layout().size(h).nodes(w).links(m).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new t.Layout().convergenceThreshold(.001).size(h).avoidOverlaps(!0).nodes(l.nodes).links(l.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(k){p=k,p.groups.forEach(function(P){P.padding=d})}).start(50,0,100,0,!1),powerGraph:p}}return X0.powerGraphGridLayout=c,X0}var AV;function fve(){return AV||(AV=1,function(t){function r(a){for(var s in a)t.hasOwnProperty(s)||(t[s]=a[s])}Object.defineProperty(t,"__esModule",{value:!0}),r(ave()),r(uve()),r(LM()),r(wV()),r(TV()),r(kV()),r(W0()),r(cve()),r(IM()),r(cV()),r(vV()),r(pV()),r($0()),r(v2()),r(OM()),r(lve())}(oV)),oV}(function(t,r){(function(a,s){t.exports=s(fve())})(Kr,function(a){return function(s){var c={};function l(h){if(c[h])return c[h].exports;var d=c[h]={i:h,l:!1,exports:{}};return s[h].call(d.exports,d,d.exports,l),d.l=!0,d.exports}return l.m=s,l.c=c,l.i=function(h){return h},l.d=function(h,d,p){l.o(h,d)||Object.defineProperty(h,d,{configurable:!1,enumerable:!0,get:p})},l.n=function(h){var d=h&&h.__esModule?function(){return h.default}:function(){return h};return l.d(d,"a",d),d},l.o=function(h,d){return Object.prototype.hasOwnProperty.call(h,d)},l.p="",l(l.s=3)}([function(s,c,l){var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},d=l(1),p=l(2),b=l(5)||(typeof window<"u"?window.cola:null),m=l(4),w=function(j){return(typeof j>"u"?"undefined":h(j))===h("")},k=function(j){return(typeof j>"u"?"undefined":h(j))===h(0)},P=function(j){return j!=null&&(typeof j>"u"?"undefined":h(j))===h({})},S=function(j){return j!=null&&(typeof j>"u"?"undefined":h(j))===h(function(){})},M=function(){},L=function(j,I){if(S(j)){var R=j;return R.apply(I,[I])}else return j};function T(j){this.options=d({},p,j)}T.prototype.run=function(){var j=this,I=this.options;j.manuallyStopped=!1;var R=I.cy,B=I.eles,F=B.nodes(),z=B.edges(),D=!1,H=function(ke){return ke.isParent()},Q=F.filter(H),q=F.subtract(Q),Z=I.boundingBox||{x1:0,y1:0,w:R.width(),h:R.height()};Z.x2===void 0&&(Z.x2=Z.x1+Z.w),Z.w===void 0&&(Z.w=Z.x2-Z.x1),Z.y2===void 0&&(Z.y2=Z.y1+Z.h),Z.h===void 0&&(Z.h=Z.y2-Z.y1);var J=function(){for(var ke=0;ke<F.length;ke++){var He=F[ke],Qe=He.layoutDimensions(I),it=He.scratch("cola");if(!it.updatedDims){var ft=L(I.nodeSpacing,He);it.width=Qe.w+2*ft,it.height=Qe.h+2*ft}}F.positions(function(ze){var $e=ze.scratch().cola,xt=void 0;return!ze.grabbed()&&q.contains(ze)&&(xt={x:Z.x1+$e.x,y:Z.y1+$e.y},(!k(xt.x)||!k(xt.y))&&(xt=void 0)),xt}),F.updateCompoundBounds(),D||(ae(),D=!0),I.fit&&R.fit(I.padding)},K=function(){I.ungrabifyWhileSimulating&&he.grabify(),R.off("destroy",fe),F.off("grab free position",pe),F.off("lock unlock",me),j.one("layoutstop",I.stop),j.trigger({type:"layoutstop",layout:j})},ae=function(){j.one("layoutready",I.ready),j.trigger({type:"layoutready",layout:j})},se=I.refresh;I.refresh<0?se=1:se=Math.max(1,se);var le=j.adaptor=b.adaptor({trigger:function(ke){var He=b.EventType?b.EventType.tick:null,Qe=b.EventType?b.EventType.end:null;switch(ke.type){case"tick":case He:I.animate&&J();break;case"end":case Qe:J(),I.infinite||K();break}},kick:function(){var ke=!0,He=function(){if(j.manuallyStopped)return K(),!0;var ft=le.tick();return!I.infinite&&!ke&&le.convergenceThreshold(I.convergenceThreshold),ke=!1,ft&&I.infinite&&le.resume(),ft},Qe=function(){for(var ft=void 0,ze=0;ze<se&&!ft;ze++)ft=ft||He();return ft};if(I.animate){var it=function ft(){Qe()||m(ft)};m(it)}else for(;!He(););},on:M,drag:M});j.adaptor=le;var he=F.filter(":grabbable");I.ungrabifyWhileSimulating&&he.ungrabify();var fe=void 0;R.one("destroy",fe=function(){j.stop()});var pe=void 0;F.on("grab free position",pe=function(ke){var He=this,Qe=He.scratch().cola,it=He.position(),ft=ke.cyTarget===He||ke.target===He;if(ft)switch(ke.type){case"grab":le.dragstart(Qe);break;case"free":le.dragend(Qe);break;case"position":(Qe.px!==it.x-Z.x1||Qe.py!==it.y-Z.y1)&&(Qe.px=it.x-Z.x1,Qe.py=it.y-Z.y1);break}});var me=void 0;F.on("lock unlock",me=function(){var ke=this,He=ke.scratch().cola;He.fixed=ke.locked(),ke.locked()?le.dragstart(He):le.dragend(He)}),le.nodes(q.map(function(ke,He){var Qe=L(I.nodeSpacing,ke),it=ke.position(),ft=ke.layoutDimensions(I),ze=ke.scratch().cola={x:I.randomize&&!ke.locked()||it.x===void 0?Math.round(Math.random()*Z.w):it.x,y:I.randomize&&!ke.locked()||it.y===void 0?Math.round(Math.random()*Z.h):it.y,width:ft.w+2*Qe,height:ft.h+2*Qe,index:He,fixed:ke.locked()};return ze}));var Te=[];if(I.alignment){if(I.alignment.vertical){var Oe=I.alignment.vertical;Oe.forEach(function(ke){var He=[];ke.forEach(function(Qe){var it=Qe.node,ft=it.scratch().cola,ze=ft.index;He.push({node:ze,offset:Qe.offset?Qe.offset:0})}),Te.push({type:"alignment",axis:"x",offsets:He})})}if(I.alignment.horizontal){var ge=I.alignment.horizontal;ge.forEach(function(ke){var He=[];ke.forEach(function(Qe){var it=Qe.node,ft=it.scratch().cola,ze=ft.index;He.push({node:ze,offset:Qe.offset?Qe.offset:0})}),Te.push({type:"alignment",axis:"y",offsets:He})})}}I.gapInequalities&&I.gapInequalities.forEach(function(ke){var He=ke.left.scratch().cola.index,Qe=ke.right.scratch().cola.index;Te.push({axis:ke.axis,left:He,right:Qe,gap:ke.gap,equality:ke.equality})}),Te.length>0&&le.constraints(Te),le.groups(Q.map(function(ke,He){var Qe=L(I.nodeSpacing,ke),it=function(st){return parseFloat(ke.style("padding-"+st))},ft=it("left")+Qe,ze=it("right")+Qe,$e=it("top")+Qe,xt=it("bottom")+Qe;return ke.scratch().cola={index:He,padding:Math.max(ft,ze,$e,xt),leaves:ke.children().intersection(q).map(function(st){return st[0].scratch().cola.index}),fixed:ke.locked()},ke}).map(function(ke){return ke.scratch().cola.groups=ke.children().intersection(Q).map(function(He){return He.scratch().cola.index}),ke.scratch().cola}));var xe=void 0,Se=void 0;I.edgeLength!=null?(xe=I.edgeLength,Se="linkDistance"):I.edgeSymDiffLength!=null?(xe=I.edgeSymDiffLength,Se="symmetricDiffLinkLengths"):I.edgeJaccardLength!=null?(xe=I.edgeJaccardLength,Se="jaccardLinkLengths"):(xe=100,Se="linkDistance");var Le=function(ke){return ke.calcLength};if(le.links(z.stdFilter(function(ke){return q.contains(ke.source())&&q.contains(ke.target())}).map(function(ke){var He=ke.scratch().cola={source:ke.source()[0].scratch().cola.index,target:ke.target()[0].scratch().cola.index};return xe!=null&&(He.calcLength=L(xe,ke)),He})),le.size([Z.w,Z.h]),xe!=null&&le[Se](Le),I.flow){var De=void 0,Ne="y",Me=50;w(I.flow)?De={axis:I.flow,minSeparation:Me}:k(I.flow)?De={axis:Ne,minSeparation:I.flow}:P(I.flow)?(De=I.flow,De.axis=De.axis||Ne,De.minSeparation=De.minSeparation!=null?De.minSeparation:Me):De={axis:Ne,minSeparation:Me},le.flowLayout(De.axis,De.minSeparation)}return j.trigger({type:"layoutstart",layout:j}),le.avoidOverlaps(I.avoidOverlap).handleDisconnected(I.handleDisconnected).start(I.unconstrIter,I.userConstIter,I.allConstIter,void 0,void 0,I.centerGraph),I.infinite||setTimeout(function(){j.manuallyStopped||le.stop()},I.maxSimulationTime),this},T.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},s.exports=T},function(s,c,l){s.exports=Object.assign!=null?Object.assign.bind(Object):function(h){for(var d=arguments.length,p=Array(d>1?d-1:0),b=1;b<d;b++)p[b-1]=arguments[b];return p.filter(function(m){return m!=null}).forEach(function(m){Object.keys(m).forEach(function(w){return h[w]=m[w]})}),h}},function(s,c,l){var h={animate:!0,refresh:1,maxSimulationTime:4e3,ungrabifyWhileSimulating:!1,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,ready:function(){},stop:function(){},randomize:!1,avoidOverlap:!0,handleDisconnected:!0,convergenceThreshold:.01,nodeSpacing:function(d){return 10},flow:void 0,alignment:void 0,gapInequalities:void 0,centerGraph:!0,edgeLength:void 0,edgeSymDiffLength:void 0,edgeJaccardLength:void 0,unconstrIter:void 0,userConstIter:void 0,allConstIter:void 0,infinite:!1};s.exports=h},function(s,c,l){var h=l(0),d=function(p){p&&p("layout","cola",h)};typeof cytoscape<"u"&&d(cytoscape),s.exports=d},function(s,c,l){var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},d=void 0;(typeof window>"u"?"undefined":h(window))!=="undefined"?d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(p){return setTimeout(p,16)}:d=function(p){p()},s.exports=d},function(s,c){s.exports=a}])})})(aV);var hve=aV.exports;const dve=z0(hve);var IV={exports:{}},LV={exports:{}},OV;function pve(){return OV||(OV=1,function(t){(function(){var r;typeof window<"u"?(r=window,r.document):r={Array:function(){}};function a(){}function s(){}function c(){}function l(){}function h(){}function d(){}function p(){}function b(){}function m(){}function w(){}function k(){}function P(){}function S(){}function M(){}function L(){}function T(){}function j(){}function I(){}function R(){}function B(){}function F(){}function z(){}function D(){}function H(){}function Q(){}function q(){}function Z(){}function J(){}function K(){}function ae(){}function se(){}function le(){}function he(){}function fe(){}function pe(){}function me(){}function Te(){}function Oe(){}function ge(){}function xe(){}function Se(){}function Le(){}function De(){}function Ne(){}function Me(){}function ke(){}function He(){}function Qe(){}function it(){}function ft(){}function ze(){}function $e(){}function xt(){}function st(){}function Rt(){}function It(){}function Dt(){}function Ut(){}function bn(){}function sn(){}function ir(){}function U(){}function ne(){}function ue(){}function we(){}function Ae(){}function ie(){}function Pe(){}function Fe(){}function We(){}function Xe(){}function wt(){}function nt(){}function Kt(){}function Ht(){}function Xt(){}function Yn(){}function Gn(){}function Qt(){}function Hn(){}function gr(){}function ii(){}function Wi(){}function La(){}function Pi(){}function Bi(){}function yi(){}function Oa(){}function pu(){}function Si(){}function Io(){}function je(){}function bt(){}function Bt(){}function un(){}function Ln(){}function Dn(){}function vn(){}function Cn(){}function Ji(){}function li(){}function Ni(){}function Lo(){}function bc(){}function Hu(){}function Wa(){}function vc(){}function ob(){}function gl(){}function i1(){}function hp(){}function a1(){}function o1(){}function E2(){}function Ys(){}function sb(){}function s1(){}function Rh(){}function Vs(){}function C2(){}function P2(){}function S2(){}function N2(){}function JV(){gQ()}function Hve(){C_e()}function XV(){RX()}function eq(){IQ()}function tq(){Bj()}function nq(){RZ()}function rq(){DZ()}function iq(){o$()}function aq(){cW()}function oq(){hQ()}function sq(){mee()}function uq(){dQ()}function cq(){pQ()}function lq(){lte()}function fq(){i7()}function bl(){jx(this)}function hq(){}function Ve(){_x(this)}function T2(){}function dq(e){this.a=e}function pq(e){this.a=e}function u1(e){this.a=e}function gq(e){this.a=e}function bq(e){this.a=e}function vq(e){this.a=e}function yq(e){this.a=e}function M2(e){this.a=e}function mq(e){this.a=e}function j2(e){this.b=e}function HM(e){this.a=e}function wq(e){this.a=e}function xq(e){this.a=e}function kq(e){this.a=e}function _q(e){this.a=e}function Eq(e){this.a=e}function Cq(e){this.a=e}function Pq(e){this.a=e}function zM(e){this.a=e}function A2(e){this.a=e}function I2(e){this.a=e}function Sq(e){this.a=e}function Nq(e){this.a=e}function FM(e){this.a=e}function c1(e){this.a=e}function L2(e){this.e=e}function dp(e){this.a=e}function Tq(e){this.a=e}function Dh(e){this.a=e}function UM(e){this.a=e}function Mq(e){this.a=e}function jq(e){this.a=e}function O2(e){this.a=e}function Aq(e){this.a=e}function Iq(e){this.a=e}function Lq(e){this.a=e}function Oq(e){this.a=e}function Rq(e){this.a=e}function Dq(e){this.a=e}function pp(e){this.a=e}function Bq(e){this.a=e}function Gq(e){this.a=e}function Hq(e){this.a=e}function zq(e){this.a=e}function Fq(e){this.a=e}function Uq(e){this.a=e}function Yq(e){this.a=e}function Vq(e){this.c=e}function YM(e){this.a=e}function qq(e){this.a=e}function Zq(e){this.a=e}function $q(e){this.a=e}function Kq(e){this.a=e}function Qq(e){this.a=e}function VM(e){this.a=e}function Wq(e){this.a=e}function dn(e){this.a=e}function zu(e){this.a=e}function Bh(e){this.d=e}function hn(e){this.a=e}function yn(e){this.a=e}function ub(e){this.a=e}function cb(e){this.a=e}function qM(e){this.b=e}function l1(e){this.a=e}function f1(e){this.a=e}function V(e){this.c=e}function Oo(e){this.a=e}function Jq(e){this.a=e}function Xq(e){this.a=e}function lb(e){this.b=e}function gp(e){this.b=e}function ZM(e){this.c=e}function $M(e){this.a=e}function KM(e){this.a=e}function h1(e){this.a=e}function QM(){this.a=[]}function WM(e){this.a=e}function R2(e){this.a=e}function eZ(e){e.b=e.a}function tZ(e){e.c=e.d.d}function bo(e,n){e.g=n}function JM(e,n){e.k=n}function zve(e,n){e.a=n}function Fve(e,n){e.b=n}function Uve(e,n){e.e.k=n}function Yve(e){return e.a}function Vve(e){return e.a}function qve(e){return e.a}function Zve(e){return e.a}function $ve(e){return e.a}function Kve(){return null}function Qve(){return null}function D2(){this.c=this}function XM(){jx(this)}function an(){Go(this)}function nZ(e){lke(this,e)}function Wve(e){rK(),WEe(e)}function rZ(e){e.a=new fi}function fb(e,n){e.a=n-e.a}function hb(e,n){e.b=n-e.b}function Gh(){Gh=s}function B2(){B2=s}function Jve(){throw new cr}function Xve(){throw new cr}function e0e(){throw new cr}function t0e(){throw new cr}function n0e(){throw new cr}function r0e(){throw new cr}function i0e(){throw new cr}function a0e(){throw new cr}function o0e(){throw new cr}function iZ(){this.a=new Ve}function aZ(){this.a=new Ve}function oZ(){this.a=new Ve}function sZ(){this.a=new Ve}function G2(){this.a=new Ve}function _f(){this.a=new vc}function bp(){this.a=new UW}function uZ(){this.b=new Ve}function Xi(){fi.call(this)}function cZ(){hx.call(this)}function e6(){hq.call(this)}function d1(){hq.call(this)}function t6(){Ve.call(this)}function lZ(){bl.call(this)}function vp(){bl.call(this)}function n6(){bl.call(this)}function fZ(){bl.call(this)}function db(){bl.call(this)}function yp(){bl.call(this)}function cr(){bl.call(this)}function r6(){this.f=new Ve}function hZ(){this.d=new Ve}function dZ(){this.a=new ai}function pZ(){throw new cr}function gZ(){throw new cr}function bZ(){throw new cr}function vZ(){throw new cr}function s0e(){throw new cr}function i6(){this.a=new Ve}function a6(){a6=s,sm=new c}function Vn(){Vn=s}function pb(){pb=s,U_=new l}function yZ(){yZ=s,Hre=new b}function mZ(){mZ=s,zre=new WQ}function o6(){o6=s,BI=new d}function wZ(){wZ=s,Vre=new S}function s6(){s6=s,Qie=new H}function xZ(){xZ=s,Wie=new J}function u6(e){return mu(e),e}function c6(e){Mr(),this.a=e}function l6(e){eo(),this.a=e}function kZ(e){eo(),this.a=e}function _Z(e){eo(),this.a=e}function EZ(e,n){e.i=n,n.f=e}function u0e(e,n){Rn(e.b,n)}function mp(){bl.call(this)}function CZ(){bl.call(this)}function Ra(){bl.call(this)}function PZ(){uW.call(this)}function SZ(){uW.call(this)}function NZ(){n6.call(this)}function TZ(){vp.call(this)}function gu(e){qZ.call(this,e)}function c0e(e){zK.call(this,e)}function l0e(e){zK.call(this,e)}function f6(e){TK.call(this,e)}function MZ(e){aQ.call(this,e)}function h6(e){bW.call(this,e)}function d6(e){E6.call(this,e)}function gb(e){_p.call(this,e)}function p6(e){TK.call(this,e)}function f0e(e,n){e.a.W().nb(n)}function ls(e,n){return e===n}function H2(e){return e?e.a:0}function qs(e){return e?e.d:0}function z2(e){return e?e.j:0}function jZ(e){gu.call(this,e)}function p1(e){gu.call(this,e)}function $o(e){gu.call(this,e)}function F2(e){$o.call(this,e)}function Ef(){I2.call(this,{})}function AZ(e){nZ.call(this,e)}function IZ(e){nZ.call(this,e)}function h0e(e,n,i){iwe(e,n.b,i)}function d0e(e,n,i){jye(e.c,n,i)}function p0e(e,n,i){e.b.Fc(n,i)}function g6(e){zq.call(this,e)}function U2(e){zq.call(this,e)}function LZ(){this.a=(sr(),rs)}function OZ(){this.a=(sr(),rs)}function ai(){this.a=new an}function b6(){this.a=new A$}function v6(){v6=s,mL=new K}function RZ(){RZ=s,oae=new Oe}function DZ(){DZ=s,lae=new Fe}function Yt(e){return zn(),e}function Re(e){return Tr(e),e}function g0e(e){qZ.call(this,e)}function fs(e){gu.call(this,e)}function Pn(e){gu.call(this,e)}function g1(e){this.c=td(Nt(e))}function oi(){this.a=0,this.b=0}function fi(){yK(this),vu(this)}function BZ(){H_==null&&(H_=[])}function b1(e){e.b=null,e.c=0}function b0e(e,n){return e.b=n,e}function GZ(e,n){return e.c=n,e}function Y2(e,n){return e.f=n,e}function HZ(e,n){return e.g=n,e}function zZ(e,n){return e.a=n,e}function FZ(e,n){return e.f=n,e}function v0e(e,n){return e.k=n,e}function y0e(e,n){return e.e-n.e}function m0e(e,n){return e.d-n.d}function w0e(e){return e<0?-e:e}function UZ(e){return isNaN(e)}function x0e(e){return new A2(e)}function k0e(e){return new Cl(e)}function YZ(e){gu.call(this,e)}function yc(e){gu.call(this,e)}function VZ(e){gu.call(this,e)}function bb(e){gu.call(this,e)}function Hh(e){gu.call(this,e)}function qZ(e){this.f=e,jx(this)}function ZZ(){this.b=0,this.a=0}function wp(){wp=s}function $Z(){$Z=s,Joe=Dxe()}function _0e(e,n,i){e.set(n,i)}function E0e(e,n,i){e.set(n,i)}function KZ(e,n){zp(),SI.dc(e,n)}function ve(e,n){return xW(e,n)}function QZ(e,n){return e.a.B(n)}function zh(e,n){return e.g[n.e]}function V2(e,n){return e.i[n.e]}function q2(e,n){return e.j[n.e]}function Fh(e,n){return e.n[n.e]}function Uh(e,n){return e.o[n.e]}function C0e(e,n){return n in e.a}function P0e(e,n){return e.b-n.b}function S0e(e,n){return e.d-n.d}function N0e(e,n){return e.i-n.i}function et(e,n){return e>n?e:n}function WZ(e,n){return e>n?e:n}function mi(e,n){return e>n?e:n}function mn(e,n){return e<n?e:n}function T0e(e,n){return e<n?e:n}function mc(e,n){return e<n?e:n}function wc(e){return!!e&&e.b}function JZ(e){H1e(e,e.length)}function M0e(e){Q1e(e,e.length)}function vb(e){W1e(e,e.length)}function j0e(e){fs.call(this,e)}function xp(e){VM.call(this,e)}function A0e(e){qq.call(this,e)}function v1(e){Pn.call(this,e)}function Cf(e){lb.call(this,e)}function XZ(e){Cf.call(this,e)}function y6(e){H1.call(this,e)}function kp(){VM.call(this,"")}function Z2(){VM.call(this,"")}function y1(e){return Mf(e),e.n}function e$(e){return Mf(e),e.j}function da(e){return e.e&&e.e()}function t$(e,n){return e.a.sb(n)}function I0e(e,n){return e||Nt(n)}function n$(e,n){return X(e.a,n)}function r$(e,n){return B1e(e.a,n)}function L0e(e,n){return Lk(e,n)<0}function m1(e){return Vn(),""+e}function i$(e){return e?e.d:null}function xc(e){eo(),this.a=Nt(e)}function a$(){oJ(),this.g=new I6}function o$(){o$=s,fae=(ga(),Nu)}function O0e(){lm!=0&&(lm=0),fm=-1}function yb(e){return Cke(e,e.d),e}function Yh(e,n){return e.a.d=n,e}function Vh(e,n){return e.a.a=n,e}function qh(e,n){return e.a.c=n,e}function Zh(e,n){return e.a.f=n,e}function s$(e,n){return e.a.f=n,e}function m6(e,n){return e.a.b=n,e}function w6(e,n,i){e.splice(n,i)}function R0e(e,n){return kA(n,e)}function u$(e,n){return e.b.t(n)}function c$(e,n){return e.c.t(n)}function vl(e,n){return e.a.R(n)}function x6(e,n){return e.get(n)}function $2(e,n){return e.get(n)}function D0e(e,n){return e.test(n)}function wi(e){return e<=0?0-e:e}function l$(e){return Vn(),""+e}function B0e(e){return Vn(),""+e}function K2(e){this.a=new cx(e)}function f$(e){this.a=new Vj(e)}function h$(e){this.a=v(Nt(e),19)}function Q2(e){this.b=v(Nt(e),57)}function d$(e){this.d=v(Nt(e),56)}function Sn(e,n){this.d=e,this.e=n}function W2(e,n){this.b=e,this.a=n}function p$(e,n){this.b=e,this.a=n}function k6(e,n){this.b=e,this.c=n}function _6(e,n){this.a=e,this.b=n}function J2(e,n){this.a=e,this.b=n}function g$(e,n){this.a=e,this.f=n}function X2(e,n){Sn.call(this,e,n)}function b$(e,n){Sn.call(this,e,n)}function v$(e,n){Sn.call(this,e,n)}function y$(e,n){this.b=e,this.c=n}function m$(e,n){this.e=e,this.c=n}function G0e(e,n){this.a=e,this.b=n}function w$(e,n){this.a=e,this.b=n}function x$(e,n){Sn.call(this,e,n)}function k$(e,n){this.a=e,this.b=n}function _$(e){this.a=v(Nt(e),20)}function _p(e){this.a=v(Nt(e),20)}function E$(e){this.a=v(Nt(e),57)}function E6(e){this.b=v(Nt(e),35)}function kt(e,n){this.a=e,this.b=n}function Ar(e,n){this.a=e,this.b=n}function Ep(e,n){Sn.call(this,e,n)}function C6(e,n){return ud(e.b,n)}function H0e(e){return FQ(),e?Yre:Ure}function Pf(e){return e==uo||e==ya}function ex(e){return e==Su||e==ou}function C$(e,n){Ir(e,n,e.a,e.a.a)}function tx(e,n){Ir(e,n,e.c.b,e.c)}function mb(e,n){Sn.call(this,e,n)}function w1(e,n){Sn.call(this,e,n)}function x1(e,n){Sn.call(this,e,n)}function Cp(e,n){Sn.call(this,e,n)}function nx(e,n){Sn.call(this,e,n)}function yl(e,n){Sn.call(this,e,n)}function wb(e,n){Sn.call(this,e,n)}function Pp(e,n){Sn.call(this,e,n)}function rx(e,n){Sn.call(this,e,n)}function xb(e,n){Sn.call(this,e,n)}function k1(e,n){Sn.call(this,e,n)}function _1(e,n){Sn.call(this,e,n)}function ix(e,n){Sn.call(this,e,n)}function ax(e,n){Sn.call(this,e,n)}function P6(e,n){this.b=e,this.a=n}function $h(e,n){this.c=e,this.d=n}function S6(e,n){this.a=e,this.c=n}function P$(e,n){this.e=e,this.c=n}function S$(e,n){this.e=e,this.d=n}function E1(e,n){Sn.call(this,e,n)}function Sp(e,n){Sn.call(this,e,n)}function N$(e,n){this.a=e,this.b=n}function T$(e,n){this.a=e,this.b=n}function ox(e,n){Sn.call(this,e,n)}function kn(e,n){Sn.call(this,e,n)}function Sf(e,n){Sn.call(this,e,n)}function N6(e,n){Sn.call(this,e,n)}function Np(e,n){Sn.call(this,e,n)}function T6(e,n){Sn.call(this,e,n)}function sx(e,n){Sn.call(this,e,n)}function M6(e,n){Sn.call(this,e,n)}function z0e(e,n){return bs(e.c,n)}function ux(e){return e.b<e.d.Y()}function C1(e){return e.d.c+e.e.c}function M$(e,n){return e.c.ab(n)}function F0e(e,n){return e.b.kb(n)}function U0e(e,n){return e.b.lb(n)}function Y0e(e,n){return e.b.pb(n)}function j6(e,n){return e.b.kb(n)}function j$(e,n){return e.b.lb(n)}function V0e(e){return e==Zc||e==rf}function q0e(e){return e==Zc||e==nf}function Zs(e){return e!=Ss&&e!=Yc}function Z0e(e){return ao(e),e.d.Y()}function Kh(e){this.c=e,TJ(this)}function cx(e){EX.call(this,e,0)}function A$(){Vj.call(this,null)}function kb(){l0e.call(this,new an)}function I$(){v$.call(this,"KEY",0)}function lx(e){ad(),aQ.call(this,e)}function $0e(e){r.clearTimeout(e)}function L$(e){return e.Vb(e.b.H())}function A6(e){this.a=v(Nt(e),144)}function I6(){this.b=(Wn(),new an)}function Nf(){Nf=s,hh=new P2}function fx(){fx=s,TC=new s1}function O$(){O$=s,Woe=new C2}function P1(){P1=s,Lre=new g1(",")}function R$(){R$=s}function hx(){mo.call(this,0,0,0,0)}function L6(e,n){Sn.call(this,e,n)}function _b(e,n){Sn.call(this,e,n)}function O6(e,n){Sn.call(this,e,n)}function R6(e,n){Sn.call(this,e,n)}function D$(e){Jh(),br.call(this,e)}function D6(e,n){Sn.call(this,e,n)}function B$(e,n){this.c=e,this.b=n}function G$(e,n){this.a=e,this.b=n}function H$(e,n){this.b=e,this.d=n}function B6(e,n){Sn.call(this,e,n)}function Tp(e,n){Sn.call(this,e,n)}function dx(e,n){Sn.call(this,e,n)}function Eb(e,n){Sn.call(this,e,n)}function Mp(e,n){Sn.call(this,e,n)}function kc(e,n){Sn.call(this,e,n)}function px(e,n){Sn.call(this,e,n)}function G6(e,n){Sn.call(this,e,n)}function Cb(e,n){Sn.call(this,e,n)}function gx(e,n){Sn.call(this,e,n)}function bx(e,n){Sn.call(this,e,n)}function vx(e,n){Sn.call(this,e,n)}function Pb(e,n,i){e.splice(n,0,i)}function Sb(e,n,i){e.g[n.e][n.e]=i}function z$(e,n){e.a=n,e.g=0,e.f=0}function bu(e){return e.a=0,e.b=0,e}function Pa(e){return ia(e.b.c,e,0)}function S1(e){return Math.ceil(e)}function F$(e){return Math.sqrt(e)}function U$(e,n){return $2(e.a,n)}function yx(e,n){return!!LA(e,n)}function mx(e,n){q1e(e,e.length,n)}function N1(e,n){Sn.call(this,e,n)}function T1(e,n){this.b=e,this.a=n}function M1(e,n){this.d=e,this.e=n}function Y$(){Bx(),this.c=new ai}function V$(){Ry(),this.a=new ai}function q$(){return $Z(),new Joe}function Qh(e){if(!e)throw new vp}function j1(e){if(!e)throw new db}function A1(e){if(!e)throw new Ra}function Z$(){this.b=(Wn(),new an)}function $$(){this.b=(Wn(),new an)}function lr(e){this.a=e.a,this.b=e.b}function ut(e){return e??null}function Ti(e){return e?e.zb():null}function K$(e,n){return e.Nb().sb(n)}function Q$(e,n){return e.a.a.a.U(n)}function wx(e,n){return Dwe(e.mb(),n)}function K0e(e,n){return Lr(n.b,e.b)}function Q0e(e,n){return Lr(n.k,e.k)}function H6(e){return Math.floor(e)}function ml(e,n){return e.a+=""+n,e}function _c(e,n){return e.a+=""+n,e}function Ro(e,n){return e.a+=""+n,e}function I1(e){return Tb(e==null),e}function z6(e){return e.d&&a_(e),e.a}function xx(e){return e.d&&a_(e),e.b}function kx(e){return e.d&&a_(e),e.c}function W$(e,n){return Ke(e.a,n),n}function J$(e){Go(this),WJ(this,e)}function X$(e){this.c=e,this.e=!1}function eK(){b$.call(this,"OPEN",0)}function tK(){x$.call(this,"SIZE",0)}function W0e(){qq.call(this,"UTF-8")}function nK(){nK=s,oO={},qm={}}function rK(){rK=s,rh=new vt(ore,0)}function Ja(e){return Nt(e),new Wh(e)}function Nb(e){return Vn(),e.length}function J0e(e,n){return Pme(e.a,n.a)}function X0e(e,n){return dK(e.a,n.a)}function iK(e,n){return e==n?0:e?1:-1}function aK(e){return qs(e.e)-qs(e.g)}function vo(e){return new kt(e.a,e.b)}function e1e(e){return new kt(e.d,e.e)}function _x(e){e.c=Ie(dt,tt,1,0,4,1)}function oK(){v$.call(this,"VALUE",1)}function F6(e){X6.call(this),this.a=e}function sK(e){this.a=new Vte,this.b=e}function Wh(e){this.a=e,D2.call(this)}function uK(e){this.a=e,D2.call(this)}function cK(){DX(),this.d=(qu(),Vm)}function t1e(e){if(!e)throw new fZ}function Tf(e){if(!e)throw new db}function lK(e){if(!e)throw new vp}function Tb(e){if(!e)throw new lZ}function _t(e){if(!e)throw new Ra}function pa(){WM.call(this,new Dp)}function fK(){b$.call(this,"CLOSED",1)}function hs(e){bW.call(this,new h6(e))}function hK(e,n){return++e.d,zr(e,n)}function n1e(e,n){return Hx(e.a,0,n)}function r1e(e,n){return Lr(e.a,n.a)}function jp(e){return If(e.b.mb(),e.a)}function ds(e){return Dx(e.a.mb(),e.b)}function Ex(e,n){return n==e.c?e.d:e.c}function i1e(e,n){return e<n?-1:e>n?1:0}function dK(e,n){return e<n?-1:e>n?1:0}function Cx(e){return e!=null?ws(e):0}function pK(e){this.a=q$(),this.b=e}function gK(e){this.a=q$(),this.b=e}function bK(e){this.a=e,gj.call(this,e)}function vK(){Y6(),this.b=new Bq(this)}function ps(){ps=s,jI=f1e(new g1(", "))}function Ko(){Ko=s,Eo=new eK,cm=new fK}function ar(){ar=s,Bre=new k,AI=new P}function L1(){L1=s,Y_=new I$,II=new oK}function O1(){O1=s,V_=new tK,OI=new SK}function Jh(){Jh=s,$re=new L,Kre=new T}function U6(e){e.g=new Ve,e.b=new Ve}function yK(e){e.a=new S2,e.c=new S2}function Y6(){Y6=s,mae=new Ji,yae=new wQ}function mK(){X2.call(this,"IS_NULL",2)}function wK(){N1.call(this,"Head",1)}function xK(){N1.call(this,"Tail",3)}function V6(e,n){yA.call(this,e,n,null)}function q6(e,n){gd(e,0,e.length,n)}function Mb(e,n){return Ke(n.a,e.a),e.a}function gs(e,n){return e.a*=n,e.b*=n,e}function kK(e,n){Mr(),this.a=e,this.b=n}function a1e(e,n){return e.a[n.d.k][n.k]}function Xa(e,n){return e.a[n.d.k][n.k]}function o1e(e,n){return rk(e.b,n.mc())}function _K(e,n){return i$(Qwe(e.a,n))}function EK(e,n){return i$(Wwe(e.a,n))}function Qr(e,n){return v(oo(e.a,n),20)}function Ze(e,n){return e!=null&&Qk(e,n)}function wl(e){return e.a<e.c.c.length}function R1(e){return e.a<e.c.a.length}function s1e(e,n){return Lr(e.i.a,n.i.a)}function u1e(e,n){return e.i.b=(Tr(n),n)}function c1e(e,n){return e.i.b=(Tr(n),n)}function Px(e,n){return e.a.eb(n)!=null}function Sx(e,n,i){return e.g[n.e][i.e]}function CK(e){return zn(),Vn(),""+e}function PK(){N1.call(this,"Range",2)}function SK(){x$.call(this,"DISTINCT",1)}function NK(){X2.call(this,"NOT_NULL",3)}function Wn(){Wn=s,Gre=new BK((ps(),jI))}function TK(e){this.d=(wn(),new ZM(e))}function Z6(e,n){return HX(e,new kp,n).a}function D1(e,n){return n==null?e.b:YQ(n)}function l1e(e){return e==null?null:e.name}function Xh(e){return typeof e=="number"}function Qo(e){return typeof e=="string"}function $6(e,n){return new qQ(e,e.Y(),n)}function K6(e,n){return new nte(e.a,e.b,n)}function f1e(e){return Nt(ku),new yQ(e,e)}function xl(e){return ji(e,ql),new aa(e)}function MK(e,n){this.a=n,E6.call(this,e)}function jK(e,n){this.a=n,E6.call(this,e)}function AK(e,n){this.a=e,Q2.call(this,n)}function IK(e){this.c=e,this.a=oke(this.c)}function Do(e){var n;n=e.a,e.a=e.b,e.b=n}function h1e(e,n){e.e.j.a=n.a,e.e.j.b=n.b}function d1e(e,n,i){e.a=n^1502,e.b=i^B_}function Da(e,n,i){return e.a+=n,e.b+=i,e}function p1e(e,n,i){return e.a-=n,e.b-=i,e}function Nx(e){return e.a=-e.a,e.b=-e.b,e}function Tx(e){return _t(e.b!=0),e.a.a.c}function B1(e){return _t(e.b!=0),e.c.b.c}function LK(e,n){e.a&&(wj(n),mW(n))}function G1(e,n,i){var u;u=e.ub(n),u.J(i)}function g1e(e,n){return i1e(n.Yb(),e.Yb())}function Mx(e){return v(ct(e.a,e.b),128)}function OK(e){return Kx(e.c,e.c.length)}function b1e(e){return e.l+e.m*$f+e.h*Hc}function Gi(e){return e==Md||e==Ps||e==ki}function Sa(e){return typeof e=="number"}function bs(e,n){return!!n&&e.b[n.e]==n}function Q6(e,n){var i;i=e[Ql],n[Ql]=i}function jb(e,n){$o.call(this,e),this.b=n}function H1(e){lb.call(this,e),this.a=e}function W6(e){gp.call(this,e),this.a=e}function J6(e){Cf.call(this,e),this.a=e}function RK(e){WM.call(this,new mJ(e))}function Ab(e){this.a=e,qM.call(this,e)}function DK(e){this.c=e,this.a=1,this.b=1}function BK(e){this.a=e,this.b=td(Nt("="))}function GK(){this.a=new fi,this.e=new fi}function HK(){this.a=new aZ,this.c=new me}function X6(){this.i=new oi,this.j=new oi}function zK(e){Qh(e.d.c+e.e.c==0),this.b=e}function jx(e){return e.g=null,KZ(e,e.f),e}function ej(e){return ar(),Nt(e),new iQ(e)}function FK(e){return zp(),parseInt(e)||-1}function UK(e,n){return Bb(e.a,n)!=null}function Ib(e,n){return!Awe(e,n)&&!nX(e,n)}function Ec(e){return e.$H||(e.$H=++H3e)}function v1e(e){return e.d!=null?e.d:""+e.e}function z1(e){return e.d!=null?e.d:""+e.e}function Ax(e){return e.b=v(yye(e.a),21)}function ed(e){return typeof e=="boolean"}function YK(e){e.b=new qK(e),e.c=new an}function VK(){this.a=new Ve,this.d=new Ve}function qK(e){yj.call(this,e,null,null)}function ZK(e,n,i,u){Sj.call(this,e,n,i,u)}function $K(e,n,i,u){fk.call(this,e,n,i,u)}function vs(e,n,i,u){fk.call(this,e,n,i,u)}function tj(e,n,i){Yb.call(this,e,n,i,null)}function nj(e,n,i){Yb.call(this,e,n,i,null)}function rj(e,n,i){e.i=n,n.f=e,n.i=i,i.f=n}function ij(e,n){rZ(this),this.e=e,this.f=n}function y1e(e,n){this.d=e,tZ(this),this.b=n}function Ix(e){yK(this),vu(this),Na(this,e)}function Zt(e){return Tb(e==null||ed(e)),e}function Wt(e){return Tb(e==null||Xh(e)),e}function td(e){return Tb(e==null||Qo(e)),e}function On(e,n){return e.a+=n.a,e.b+=n.b,e}function Fu(e,n){return e.a-=n.a,e.b-=n.b,e}function m1e(e,n){return e.i.a=(Tr(n),n+10)}function w1e(e,n){return e.i.a=(Tr(n),n+10)}function kl(e,n){return v(pn(e.k,n),24).a}function x1e(e,n){return K2e(e,n),new TW(e,n)}function aj(e,n){return v(e.b.sb(n),92).a}function KK(e){return v(e,7).b.c.length!=0}function QK(e){return v(e,7).e.c.length!=0}function WK(e){return e.d?ia(e.d.a,e,0):-1}function k1e(e){return e==null?null:e.message}function Mf(e){e.n==null&&Hke(e)}function _1e(e,n,i,u){return JW(e,n,i,u),e}function E1e(e,n){return Vn(),e.indexOf(n)}function en(e,n){if(!n)throw new yp;e.g=n}function oj(e){if(e.e.c!=e.b)throw new mp}function F1(e){if(e.f.c!=e.b)throw new mp}function C1e(e,n){return Nt(e),Nt(n),kA(e,n)}function _l(e,n){this.a=e,this.c=n,this.b=2}function U1(){rZ(this),this.e=-1,this.f=!0}function Lx(){c0e.call(this,new an),this.a=3}function JK(e){fk.call(this,e.d,e.b,e.a,e.c)}function sj(e){fk.call(this,e.d,e.b,e.a,e.c)}function XK(e){zA.call(this,e),this.c=new Ve}function eQ(){X2.call(this,"ALWAYS_TRUE",0)}function tQ(){X2.call(this,"ALWAYS_FALSE",1)}function nQ(e){Rne(),this.a=new Lx,eX(this,e)}function P1e(e){return!e.e&&(e.e=new Ve),e.e}function uj(e){var n;return n=new ob,n.e=e,n}function Ox(e){var n;n=e[Ql]|0,e[Ql]=n+1}function Uu(e,n){e.a.rb(e.b,n),++e.b,e.c=-1}function cj(e,n){Tf(e.c!=-1),e.a.wb(e.c,n)}function S1e(e,n){return zn(),e==n?0:e?1:-1}function Rx(e,n,i){return e.g[n.e][i.e]*e.d}function N1e(e,n,i){return e.apply(n,i)}function lj(e,n,i){return Y1e(e,v(n,17),i)}function T1e(e,n){return n==(Be(),lt)?e.c:e.d}function rQ(e,n){return n!=null&&e.Nb().kb(n)}function M1e(e,n){this.e=n,this.f=e,jx(this)}function iQ(e){this.b=e,this.a=(ar(),ar(),AI)}function aQ(e){eo(),this.a=(wn(),new Cf(e))}function eo(){eo=s,new l6((wn(),wn(),tl))}function oQ(){oQ=s,Eae=Hi(new Jn,(Vr(),IE))}function Lb(e){Gwe.call(this,e,(fA(),aO))}function Cc(e){_x(this),vj(this.c,0,e.ob())}function sQ(e,n,i){this.b=e,this.a=n,this.c=i}function fj(e,n,i){$h.call(this,e,n),this.b=i}function Y1(e,n,i){this.b=e,this.a=n,this.c=i}function hj(e,n){var i;return i=e.e,e.e=n,i}function uQ(e){Go(e.c),e.b.b=e.b,e.b.a=e.b}function V1(e){e.b?V1(e.b):Nn(e.f.b,e.e,e.d)}function dj(e){return _t(e.b!=0),yu(e,e.a.a)}function j1e(e){return _t(e.b!=0),yu(e,e.c.b)}function Dx(e,n){return ar(),Nt(n),new MK(e,n)}function A1e(e,n){return Wn(),new jK(e.mb(),n)}function cQ(e,n){return Vn(),e.charCodeAt(n)}function Ap(e,n,i){return Vn(),e.substr(n,i)}function I1e(e){return Vn(),e==null?ku:za(e)}function Ob(e,n,i){return Sx(e,n.g,i.g)*e.d}function Pc(e,n,i){return{l:e,m:n,h:i}}function Yu(e,n){return Fp(e,new $h(n.a,n.b))}function lQ(e,n,i,u,f){e.d=n,e.e=i,e.c=u,e.b=f}function to(e,n,i,u,f){e.b=n,e.c=i,e.d=u,e.a=f}function _n(e,n){return Ir(e,n,e.c.b,e.c),!0}function Ke(e,n){return e.c[e.c.length]=n,!0}function vt(e,n){Jh(),br.call(this,e),this.a=n}function fQ(){oQ(),this.e=new fi,this.d=new fi}function jf(){jf=s,Qoe=new Ys}function hQ(){hQ=s,zae=Rb(new Jn,(Vr(),cg))}function dQ(){dQ=s,Yae=Rb(new Jn,(Vr(),cg))}function pQ(){pQ=s,Zae=Rb(new Jn,(Vr(),cg))}function Bx(){Bx=s,$ae=Rb(new Jn,(Vr(),cg))}function gQ(){gQ=s,Error.stackTraceLimit=64}function pj(){to(this,!1,!1,!1,!1)}function q1(e){var n;return n=new Ve,Ek(n,e),n}function Ba(e){var n;return n=new fi,PA(n,e),n}function Z1(e){var n;return n=new Jn,Fr(n,e),n}function L1e(e){var n;return n=new o1,n.a=e,n}function v(e,n){return Tb(e==null||Qk(e,n)),e}function $1(e,n){if(e<0||e>=n)throw new NZ}function Wo(e,n){return Nt(e),Nt(n),new _Q(e,n)}function $s(e,n){return Nt(e),Nt(n),new EQ(e,n)}function O1e(e,n){return Vn(),e.lastIndexOf(n)}function Gx(e,n,i){return e<n?i<=e:e<=i||e==n}function bQ(e,n,i){this.d=e,this.b=i,this.a=n}function xi(e,n,i){this.a=e,this.b=n,this.c=i}function vQ(e,n,i){this.a=e,this.b=n,this.c=i}function yQ(e,n){this.a=e,this.b=ku,this.c=n.c}function mQ(e){this.c=e.c,this.a=e.e,this.b=e.b}function gj(e){this.d=e,tZ(this),this.b=$1e(e.d)}function wQ(){bj.call(this),this.a=new Gq(this)}function bj(){this.c=new j,this.d=new aW(this)}function R1e(e){var n;return n=new ai,Ek(n,e),n}function xQ(e){Jo(e.a),bJ(e.c,e.b),e.b=null}function kQ(e){return e.c-v(ct(e.a,e.b),128).b}function D1e(e,n){return e.c<n.c?-1:e.c==n.c?0:1}function B1e(e,n){return Pf(e.b.d)?n.xc():n.wc()}function Hx(e,n,i){return Vn(),e.substr(n,i-n)}function vj(e,n,i){Xk(i,0,e,n,i.length,!1)}function yj(e,n,i){this.c=e,M1.call(this,n,i)}function _Q(e,n){this.b=e,this.a=n,D2.call(this)}function EQ(e,n){this.a=e,this.b=n,D2.call(this)}function CQ(e,n){this.b=e,this.a=n,ji(n,"count")}function zx(e){this.b=e,this.a=Pl(this.b.a).Kb()}function br(e){Jh(),this.c=$re,this.d=Kre,this.b=e}function PQ(e,n,i){B$.call(this,e,n),this.a=i}function SQ(e,n,i){B$.call(this,e,n),this.a=i}function ct(e,n){return qn(n,e.c.length),e.c[n]}function Hi(e,n){return v(ct(e.a,5),18).ib(n),e}function Sc(e,n){return v(ct(e.a,0),18).ib(n),e}function K1(e,n){return v(ct(e.a,1),18).ib(n),e}function zi(e,n){return v(ct(e.a,2),18).ib(n),e}function no(e,n){return v(ct(e.a,3),18).ib(n),e}function Rb(e,n){return v(ct(e.a,4),18).ib(n),e}function G1e(e){return ru(e,(sr(),uo)),e.e=!0,e}function mj(e){zp();var n;return n=SI.ec(e),exe(n)}function Q1(e,n){var i;return i=Jx(e,n),i.g=2,i}function H1e(e,n){var i;for(i=0;i<n;++i)e[i]=0}function NQ(e,n){e.b=n.b,e.c=n.c,e.d=n.d,e.a=n.a}function wj(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function TQ(e){return e.b.c.length+e.e.c.length}function Fx(e){return Array.isArray(e)&&e.ad===a}function MQ(e,n){return ar(),wX(new V(e),n)!=-1}function Ux(e,n,i,u,f,g){return jee(e,n,i,u,f,0,g)}function W1(e,n,i){Jh(),fy.call(this,e.b,n,i,e.d)}function J1(e,n){Jh(),fy.call(this,e.b,n,e.c,e.d)}function El(e,n,i){Ll(n,e.c.length),Pb(e.c,n,i)}function jQ(e,n){return qn(n,e.a.length),e.a[n]}function z1e(e){e.sort(function(n,i){return n-i})}function Nt(e){if(e==null)throw new yp;return e}function Cl(e){if(e==null)throw new yp;this.a=e}function X1(e,n,i){if(e.a!=n)throw new mp;e.a=i}function xj(e,n){if(!e)throw new Pn((Vn(),n))}function kj(e,n){if(!e)throw new YZ((Vn(),n))}function Tr(e){if(e==null)throw new yp;return e}function Yx(e){WM.call(this,new Dp),Na(this,e)}function _j(e){this.a=new cx(e.Y()),Na(this,e)}function ey(e){this.c=e,this.a=new Kh(this.c.a)}function Vu(e){Mr(),this.a=(wn(),new Xq(Nt(e)))}function zn(){zn=s,Xn=(zn(),!1),Ei=!0}function AQ(){AQ=s,tO=Ie(z_,qr,24,256,0,1)}function IQ(){IQ=s,Cae=Hi(Sc(new Jn,(Vr(),SE)),IE)}function Vx(){Vx=s,Jie=new R,eae=new bj,Xie=new B}function LQ(e){return e!=null&&Wx(e)&&e.ad!==a}function qx(e){return!Array.isArray(e)&&e.ad===a}function Af(e,n){return Qo(n)?rW(e,n):f_(e.d,n)}function Ej(e,n){return Ze(n,17)&&bs(e,v(n,17))}function OQ(e,n){return Ze(n,17)&&gwe(e,v(n,17))}function F1e(e,n){return $2(e.a,n)!==void 0}function ln(e,n){var i;return i=Ty(e),Qb(i,n),i}function U1e(e,n){return!e&&(e=[]),e[e.length]=n,e}function Y1e(e,n,i){return Ai(e.a,n),Qx(e,n.e,i)}function V1e(e,n,i){return Vn(),e.lastIndexOf(n,i)}function RQ(e,n,i){if(!e)throw new Pn(T_e(n,i))}function q1e(e,n,i){var u;for(u=0;u<n;++u)e[u]=i}function nd(e,n){var i;return i=e.a.Y(),dk(n,i),i-n}function Zx(e){var n;return n=e.i,n||(e.i=e.T())}function Cj(e){var n;return n=e.c,n||(e.c=e.gb())}function DQ(e){var n;return n=e.c,n||(e.c=e.Jb())}function Pl(e){return e.e?e.e:e.e=e.Ob()}function BQ(e){return e.f?e.f:e.f=e.Pb()}function Z1e(e,n){return Pc(e.l&n.l,e.m&n.m,e.h&n.h)}function GQ(e,n){return Lr((Tr(e),e),(Tr(n),n))}function $1e(e){return Ze(e,20)?v(e,20).tb():e.mb()}function ty(e){for(ar(),Nt(e);e.G();)e.H(),e.I()}function Pj(e){var n;for(n=e;n.g;)n=n.g;return n}function K1e(e){return e.b.i.a+=e.a.f*(e.a.a-1),null}function Ip(e){Tf(e.b!=-1),e.c.vb(e.a=e.b),e.b=-1}function HQ(e){return _t(e.b>0),e.a.sb(e.c=--e.b)}function ny(e){e.b?ny(e.b):e.d.V()&&Af(e.f.b,e.e)}function rd(e){if(ao(e.d),e.d.d!=e.c)throw new mp}function $x(e,n){if(n[Ql]!=e[Ql])throw new mp}function If(e,n){return ar(),Nt(e),Nt(n),new p$(e,n)}function zQ(e,n){Mr(),G0e.call(this,e,Cy(new Oo(n)))}function Sj(e,n,i,u){this.a=e,Yb.call(this,e,n,i,u)}function Sl(e){this.a=Math.cos(e),this.b=Math.sin(e)}function Ks(e,n,i){$o.call(this,e),this.b=n,this.a=i}function Nj(e){this.b=new Ve,this.a=new Ve,this.c=e}function Nl(e){this.c=new oi,this.a=new Ve,this.b=e}function FQ(){FQ=s,Ure=new zM(!1),Yre=new zM(!0)}function Nc(e,n){return++e.d,e.c[e.c.length]=n,!0}function Db(e,n){Ir(e.d,n,e.b.b,e.b),++e.a,e.c=null}function Rn(e,n){var i;return i=e.a.db(n,e),i==null}function Kx(e,n){var i;return i=e.slice(0,n),Vb(i,e)}function ea(e,n){var i;return i=new Array(n),Vb(i,e)}function Qx(e,n,i){var u;return u=e.b[n],e.b[n]=i,u}function Q1e(e,n){var i;for(i=0;i<n;++i)e[i]=null}function W1e(e,n){var i;for(i=0;i<n;++i)e[i]=!1}function J1e(e,n){return zn(),v(n.b,24).a<e?Ei:Xn}function X1e(e,n){return zn(),v(n.a,24).a<e?Ei:Xn}function eye(e,n){return v(DQ(Pl(e.a)).sb(n),21).yb()}function UQ(e){return Wn(),Dx(Gye(e.a).mb(),(L1(),Y_))}function Vt(e){return ar(),new hs(ds($s(e.a,new w)))}function Wx(e){return typeof e===Wy||typeof e===Yne}function tye(e){r.setTimeout(function(){throw e},0)}function nye(e,n){return e>0?new ij(e-1,n):new ij(e,n)}function YQ(e){return Nt(e),Ze(e,345)?v(e,345):za(e)}function Tj(e,n){return xX(e.a,n,(zn(),Xn))==null}function Mj(e,n){var i;return i=e.a.Y(),Fye(n,i),i-1-n}function VQ(e,n,i){var u;return u=Tc(e,n),jme(e,n,i),u}function te(e,n,i){var u;return u=Jx(e,n),IJ(i,u),u}function Jx(e,n){var i;return i=new IA,i.i=e,i.d=n,i}function qQ(e,n,i){this.a=e,dk(i,n),this.c=n,this.b=i}function yo(e,n,i){return t1e(i==null||Tke(e,i)),e[n]=i}function jj(e){e.a=null,e.e=null,Go(e.b),e.d=0,++e.c}function rye(e){Pn.call(this,(Vn(),e??ku))}function iye(e){Pn.call(this,(Vn(),e??ku))}function Lf(e){var n;return n=e.f,n||(e.f=new A6(e))}function Aj(e){var n;return n=e.k,n||(e.k=new bq(e))}function ZQ(e){var n;return n=e.e,n||(e.e=new E$(e))}function id(e){var n;return n=e.e,!n&&(e.e=n=e.gb()),n}function Xx(e){var n,i;return n=e.c.f.d,i=e.d.f.d,n==i}function Ij(e,n){var i;return i=new Ub(e),bA(i,n),i}function Lp(e,n){return e.a+=String.fromCharCode(n),e}function ta(e){return!e.a&&e.d?e.d.b:e.a}function ek(e){return Sa(e)?e|0:e.l|e.m<<22}function aye(e){return ji(e,cI),cd(Ur(Ur(5,e),e/10|0))}function pn(e,n){return Qo(n)?uy(e,n):Ti(Mi(e.d,n))}function Of(e){return Ze(e,19)?v(e,19).Y():gk(e.mb())}function Lj(e){return e?new _j((ps(),e)):R1e(null.mb())}function Rf(e,n){return ut(e)===ut(n)||e!=null&&es(e,n)}function $Q(e,n){return v6(),Lr(Re(Wt(e)),Re(Wt(n)))}function KQ(e){return Wn(),Dx(e.a.bb().mb(),(L1(),II))}function Mr(){Mr=s,eo(),Pv=new yr((wn(),wn(),tl))}function ad(){ad=s,eo(),ig=new lx((wn(),wn(),NC))}function QQ(e,n){if(e==null)throw new bb((Vn(),n))}function oye(e,n){return i7(),(e-n<=0?0-(e-n):e-n)<.2}function sye(e,n){return e.i.b<n.i.b?-1:e.i.b==n.i.b?0:1}function ys(e,n,i,u){e.g[n.e][i.e]=u,e.g[i.e][n.e]=u}function Jo(e){Tf(e.c!=-1),e.d.vb(e.c),e.b=e.c,e.c=-1}function tk(e){this.c=e,this.b=e.a.b.a,Q6(e.a.c,this)}function nk(e){B7.call(this,new Oo(e)),this.a=new oi}function WQ(){f6.call(this,new p6(new an)),this.a=this}function JQ(){kJ(),this.b=(Wn(),new an),this.a=new an}function uye(){return L1(),be(ve(LI,1),Je,188,0,[Y_,II])}function cye(){return Ko(),be(ve(MI,1),Je,159,0,[Eo,cm])}function lye(){return O1(),be(ve(RI,1),Je,205,0,[V_,OI])}function XQ(e){iy(e.a),e.b=Ie(dt,tt,1,e.b.length,4,1)}function eW(e){return!e.b&&(e.b=new Cf(e.c.W())),e.b}function Bb(e,n){var i;return i=new N2,Nne(e,n,i),i.d}function ry(e,n){var i;return i=Jx("",e),i.k=n,i.g=1,i}function iy(e){var n;for(n=e.mb();n.G();)n.H(),n.I()}function Oj(e,n){return Ze(n,79)&&ls(e.b,v(n,79).mc())}function fye(){return py(),be(ve(pae,1),Je,175,0,[i9,LE])}function hye(){return sy(),be(ve(kae,1),Je,193,0,[OE,f9])}function dye(){return zb(),be(ve(Oae,1),Je,192,0,[BE,DE])}function Nn(e,n,i){return Qo(n)?cy(e,n,i):Ta(e.d,n,i)}function pye(e,n,i){e.i=0,e.e=0,n!=i&&cX(e,n,i)}function gye(e,n,i){e.i=0,e.e=0,n!=i&&uX(e,n,i)}function Rj(e,n,i,u){this.d=e,this.b=n,this.a=i,this.c=u}function mo(e,n,i,u){this.d=e,this.e=n,this.c=i,this.b=u}function ay(e,n,i,u){this.a=e,this.c=n,this.b=i,this.d=u}function na(e,n,i,u){Sn.call(this,e,n),this.a=i,this.b=u}function bye(e,n){var i;return i=x6(e.a,n),i??[]}function rk(e,n){return Vn(),e==n?0:e<n?-1:1}function vye(e,n){var i;return i=lwe(e.f,n),On(Nx(i),e.f.d)}function od(e,n){return Ej(e.a,n)?e.b[v(n,17).e]:null}function Ga(e,n){return ut(e)===ut(n)||e!=null&&es(e,n)}function Qn(e,n){if(n==null)throw new yp;return H2e(e,n)}function tW(e){return Tb(e==null||Wx(e)&&e.ad!==a),e}function ro(e){return!e.a&&(e.a=new XZ(e.c.bb())),e.a}function nW(e){return!e.d&&(e.d=new lb(e.c.fb())),e.d}function vu(e){e.a.a=e.c,e.c.b=e.a,e.a.b=e.c.a=null,e.b=0}function yye(e){return _t(e.b<e.d.Y()),e.d.sb(e.c=e.b++)}function rW(e,n){return n==null?f_(e.d,null):dX(e.e,n)}function iW(e,n){this.g=e,this.d=be(ve(Rr,1),oa,9,0,[n])}function aW(e){this.c=e,this.b=new f$(v(Nt(new F),56))}function Qs(){this.a=new Xi,this.b=(ji(3,ql),new aa(3))}function oW(e,n){this.a=e,y1e.call(this,e,v(e.d,20).ub(n))}function oy(e,n,i,u){this.a=e,this.c=n,this.b=i,this.d=u}function ik(e,n,i){this.a=J7,this.d=e,this.b=n,this.c=i}function sW(){this.d=0,this.b=0,this.a=0,this.c=0}function uW(){this.b=new ai,this.d=new fi,this.e=new i6}function wn(){wn=s,tl=new sb,nO=new Rh,NC=new Vs}function Dj(){Dj=s,Rre=new eQ,Ore=new tQ,TI=new mK,Dre=new NK}function sy(){sy=s,OE=new T6("GREEDY",0),f9=new T6(L_,1)}function Bj(){Bj=s,yL=new J1((Ye(),XI),(zn(),zn(),Ei))}function cW(){cW=s,Dae=Hi(no(zi(new Jn,(Vr(),ME)),NE),TE)}function sd(e,n){var i;return i=bk(n),v(pn(e.c,i),24).a}function mye(e,n){var i;return i=Px(e.a,n),i&&(n.f=null),i}function lW(e){var n;return n=e.b.ob(),XW(n,n.length),n}function ak(e){return e<0?-1:e>0?1:0}function wye(){return ga(),be(ve(x3e,1),Je,171,0,[Fv,Ts,Nu])}function xye(){return Sy(),be(ve(aie,1),Je,166,0,[J_,ZI,$I])}function kye(){return fd(),be(ve(yie,1),Je,149,0,[Bv,sE,oE])}function _ye(){return pk(),be(ve(w3e,1),Je,225,0,[Vc,Od,qc])}function Eye(){return Py(),be(ve(C3e,1),Je,221,0,[EL,CL,_L])}function Cye(){return yy(),be(ve(Pae,1),Je,173,0,[RE,d9,h9])}function fW(e,n){return Kb(Z1e(Sa(e)?Ic(e):e,Sa(n)?Ic(n):n))}function Pye(e){return e.b==0?null:(_t(e.b!=0),yu(e,e.a.a))}function Gj(e){e.d=e.d-15,e.b=e.b-15,e.c=e.c+15,e.a=e.a+15}function Hj(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function hW(e,n,i){this.d=e,this.b=new Ve,this.c=n,this.a=i}function ok(e,n){zve(this,new kt(e.a,e.b)),Fve(this,Ba(n))}function Sye(e,n){return n===e?!0:(ao(e),e.d.t(n))}function Nye(e){return e==as||e==Ms}function Tye(e){wl(new V(nv(e.e)))&&(i3e(e),a_e(e))}function dW(e,n){var i;i=v(lA(e.e,n),116),i&&(e.d=!0)}function zj(e,n){var i;return i=e.b.pb(n),XW(i,e.b.Y()),i}function Mye(e){var n;return n=Tte(e,(Be(),lt)),n+=Tte(e,ot),n}function jye(e,n,i){cv(e,n,i,(Be(),ot),e.f),cv(e,n,i,lt,e.n)}function Tn(e,n){e.f&&zr(e.f.f,e),e.f=n,e.f&&Ke(e.f.f,e)}function Wr(e,n){e.d&&zr(e.d.a,e),e.d=n,e.d&&Ke(e.d.a,e)}function Fn(e,n){e.d&&zr(e.d.b,e),e.d=n,e.d&&Ke(e.d.b,e)}function er(e,n){e.c&&zr(e.c.e,e),e.c=n,e.c&&Ke(e.c.e,e)}function sk(e){var n;return n=Ba(e.b),Na(n,e.c),Na(n,e.i),n}function Aye(){sO==256&&(oO=qm,qm={},sO=0),++sO}function Xo(){Xo=s,$c=new O6(Jp,0),uu=new O6(Wp,1)}function Tl(){Tl=s,Tu=new B6(Wp,0),oh=new B6(Jp,1)}function Iye(){return Tl(),be(ve(A3e,1),Je,223,0,[Tu,oh])}function Lye(){return dy(),be(ve(T3e,1),Je,242,0,[Kv,$v])}function Oye(){return Xo(),be(ve(M3e,1),Je,248,0,[$c,uu])}function Rye(){return Bo(),be(ve(j3e,1),Je,247,0,[nc,So])}function Dye(){return qb(),be(ve(Kae,1),Je,194,0,[HE,zE])}function Bye(){return hy(),be(ve(Roe,1),Je,174,0,[aC,A9])}function Fj(e){return wn(),Ze(e,63)?new y6(e):new H1(e)}function Gye(e){var n;return n=e.g,v(n||(e.g=new HM(e)),20)}function Mi(e,n){return PX(e,n,bye(e,n==null?0:e.b.Vc(n)))}function pW(e){var n;return n=gy(e),"n_"+(n??m1(e.k))}function gW(e){return y1(Bp(e))+"@"+(ws(e)>>>0).toString(16)}function Hye(e,n){return S1e(Yt((Tr(e),e)),Yt((Tr(n),n)))}function uy(e,n){return n==null?Ti(Mi(e.d,null)):U$(e.e,n)}function zye(e,n,i){return new Zj(e.c,fne(e.b,ime(e.d,n,i)),e.a)}function vr(e){return Math.max(Math.min(e,Or),-2147483648)|0}function Uj(e){this.e=e,this.b=this.e.a.entries(),this.a=[]}function Yj(e){this.c=e,this.b=new Uf(new zu(this.c.a).a)}function bW(e){this.b=(ar(),ar(),ar(),Bre),this.a=v(Nt(e),35)}function Df(e,n,i){Jh(),vt.call(this,e,n),i!=null&&(this.c=i)}function vW(e,n,i){if(e<0||n<e||n>i)throw new fs(hke(e,n,i))}function Fye(e,n){if(e<0||e>=n)throw new fs(pke(e,n));return e}function uk(e,n){if(e==null)throw new bb((Vn(),n));return e}function Ot(e){if(!Ft(e))throw new Ra;return e.c=e.b,e.b.H()}function Uye(e){function n(){}return n.prototype=e||{},new n}function yW(e){var n;return n=new K2(Nk(e.length)),Qb(n,e),n}function mW(e){var n;n=e.c.b.b,e.b=n,e.a=e.c.b,n.a=e.c.b.b=e}function Vj(e){this.b=null,!e&&(e=(Nf(),Nf(),hh)),this.a=e}function qj(e){this.b=e,this.a=new jn(this.b,this.b.c.length)}function wW(e){return Mr(),Nt(e),Z2e(e||q1(new V(null)))}function Yye(e,n){var i=DI[e.charCodeAt(0)];return i??e}function xW(e,n){var i=e.a=e.a||[];return i[n]||(i[n]=e.Oc(n))}function kW(e,n,i){var u;XA(n,i,e.c.length),u=i-n,w6(e.c,n,u)}function Zj(e,n,i){d$.call(this,n.a),this.c=e,this.b=n,this.a=i}function ck(e){return A1(e.c),e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function _W(e){return A1(e.e),e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function ra(e){return Mn(be(ve(rn,1),nn,10,0,[e.f.i,e.i,e.a]))}function Vye(){return eu(),be(ve(Xre,1),Je,107,0,[$_,Nv,Wl,Sd])}function qye(){return Zu(),be(ve(tie,1),Je,122,0,[Q_,zI,Xf,K_])}function Zye(){return vd(),be(ve(dE,1),Je,139,0,[zv,hE,fE,lE])}function $ye(){return Ku(),be(ve(ug,1),Je,150,0,[cE,Hv,uE,Gv])}function Kye(){return Dj(),be(ve(um,1),Je,136,0,[Rre,Ore,TI,Dre])}function Qye(){return $b(),be(ve(_3e,1),Je,201,0,[Zc,rf,nf,ih])}function Wye(){return Be(),be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt])}function Jye(){return sr(),be(ve(Sv,1),Je,59,0,[rs,ya,uo,ou,Su])}function EW(){EW=s,_ae=Jr((sy(),be(ve(kae,1),Je,193,0,[OE,f9])))}function CW(){CW=s,gae=Jr((py(),be(ve(pae,1),Je,175,0,[i9,LE])))}function PW(){PW=s,Rae=Jr((zb(),be(ve(Oae,1),Je,192,0,[BE,DE])))}function Xye(){return Xs(),be(ve(L3e,1),Je,140,0,[Dm,ch,Dd])}function eme(){return hd(),be(ve(I3e,1),Je,218,0,[m9,Im,Qv])}function tme(){return Cr(),be(ve(O3e,1),Je,219,0,[dC,la,_i])}function nme(){return My(),be(ve(Yoe,1),Je,153,0,[X9,SC,eO])}function rme(){return qu(),be(ve(qoe,1),Je,172,0,[xg,t0,Vm])}function cy(e,n,i){return n==null?Ta(e.d,null,i):Hk(e.e,n,i)}function ime(e,n,i){return new Uy(e,!1,null,(Ko(),Eo),!0,n,i)}function $j(e,n){return OQ(e.a,n)?Qx(e,v(n,17).e,null):null}function ly(e){return Nt(e),QA((ar(),new hs(ds($s(e.a,new w)))))}function ame(e){return wn(),e?new Jq(e):(O$(),Woe)}function SW(e,n){var i,u;return u=nd(e,n),i=e.a.ub(u),new y$(e,i)}function ome(e,n){var i,u;for(u=e.Y(),i=0;i<u;i++)e.wb(i,n[i])}function NW(e,n,i){var u;u=new hp,u.b=n,u.a=i,++n.b,Ke(e.d,u)}function sme(e,n,i){e.d&&zr(e.d.b,e),e.d=n,e.d&&El(e.d.b,i,e)}function lk(e,n,i){XA(n,i,e.Y()),this.c=e,this.a=n,this.b=i-n}function fk(e,n,i,u){this.d=e,this.b=n,this.a=i,this.c=u}function TW(e,n){f6.call(this,VJ(Nt(e),Nt(n))),this.b=e,this.c=n}function jn(e,n){this.a=e,Bh.call(this,e),Ll(n,e.Y()),this.b=n}function fy(e,n,i,u){Jh(),Df.call(this,e,n,i),u!=null&&(this.d=u)}function ume(e,n,i){e.i=0,e.e=0,n!=i&&(cX(e,n,i),uX(e,n,i))}function $(e){return _t(e.a<e.c.c.length),e.b=e.a++,e.c.c[e.b]}function Gb(e){return _t(e.b.b!=e.d.a),e.c=e.b=e.b.b,--e.a,e.c.c}function MW(e,n){var i;return i=1-n,e.a[i]=ky(e.a[i],i),ky(e,n)}function cme(e){var n;return n=(Fi(),Fi(),loe),e.d&&a_(e),Jve(),n}function lme(e){var n;return Sa(e)?(n=e,n==-0?0:n):wxe(e)}function Op(e){var n;return n=(Nt(e),new Cc((ps(),e))),Fy(n),Cy(n)}function fme(e){ar();for(var n;;)if(n=e.H(),!e.G())return n}function jW(e){return F1(e),A1(e.c),e.e=e.a=e.c,e.c=e.c.b,++e.d,e.a}function AW(e){return F1(e),A1(e.e),e.c=e.a=e.e,e.e=e.e.d,--e.d,e.a}function hme(e){var n;n=e.Y(),n!=0&&(e.d.Q(),e.f.c-=n,ny(e))}function dme(e,n,i){var u;u=L2e();try{return N1e(e,n,i)}finally{Ome(u)}}function pme(e){return function(){return dme(e,this,arguments)}}function Hb(e){return Ze(e,19)?v(e,19).V():!e.mb().G()}function yr(e){Mr(),this.a=(wn(),Ze(e,63)?new y6(e):new H1(e))}function hy(){hy=s,aC=new G6(nm,0),A9=new G6("TOP_LEFT",1)}function Bo(){Bo=s,nc=new R6("DOWN",0),So=new R6("UP",1)}function zb(){zb=s,BE=new M6("LAYER_SWEEP",0),DE=new M6(L_,1)}function dy(){dy=s,Kv=new L6("UPPER",0),$v=new L6("LOWER",1)}function gme(e){if(e<0)throw new VZ("Negative array size: "+e)}function Kj(e,n){return Ze(n,21)?Jk(e.a,v(n,21)):!1}function IW(e,n){return Ze(n,21)?Jk(e.a,v(n,21)):!1}function LW(e,n){return Ze(n,21)?Jk(e.a,v(n,21)):!1}function hk(e){var n;return n=new Qs,$u(n,e),_e(n,(Ye(),dr),null),n}function OW(e,n){return n===e?"(this Map)":(Vn(),n==null?ku:za(n))}function Qj(e,n,i,u){return Ze(i,63)?new ZK(e,n,i,u):new Sj(e,n,i,u)}function bme(){return Oc(),be(ve(uL,1),Je,100,0,[th,su,aL,oL,sL])}function vme(){return tr(),be(ve(bie,1),Je,28,0,[Yc,Ss,Dv,Md,Ps,ki])}function yme(){return xs(),be(ve(Qre,1),Je,103,0,[Z_,pm,gm,bm,hm,dm])}function mme(){return zy(),be(ve(rie,1),Je,133,0,[W_,YI,qI,FI,VI,UI])}function RW(){RW=s,mie=Jr((fd(),be(ve(yie,1),Je,149,0,[Bv,sE,oE])))}function DW(){DW=s,oie=Jr((Sy(),be(ve(aie,1),Je,166,0,[J_,ZI,$I])))}function BW(){BW=s,Sae=Jr((yy(),be(ve(Pae,1),Je,173,0,[RE,d9,h9])))}function wme(){return gt(),be(ve(wL,1),Je,132,0,[nr,An,Zn,wr,Po,sa])}function xme(){return Zp(),be(ve(bae,1),Je,125,0,[Zv,o9,c9,u9,s9,a9])}function kme(e){return ar(),Lp(HX((ps(),jI),Lp(new kp,91),e),93).a}function wo(e,n){wn();var i;i=e.ob(),gd(i,0,i.length,n),ome(e,i)}function GW(e,n,i,u,f){this.c=e,this.e=n,this.d=i,this.b=u,this.a=f}function Ws(e,n,i,u,f){Sn.call(this,e,n),this.a=i,this.b=u,this.c=f}function Bf(e,n,i,u,f){Sn.call(this,e,n),this.a=i,this.b=u,this.c=f}function HW(e,n,i){this.a=n,this.c=e,this.b=(Nt(i),new Cc((ps(),i)))}function zW(){_x(this),this.b=new kt(Vi,Vi),this.a=new kt(ti,ti)}function py(){py=s,i9=new N6("QUADRATIC",0),LE=new N6("SCANLINE",1)}function _me(){throw new Hh("Add not supported on this collection")}function FW(e){var n,i;return i=I1e(e.Zb()),n=e.Yb(),n==1?i:i+" x "+n}function fn(e){return _t(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function Eme(e){if(e.Tc())return null;var n=e.k,i=om[n];return i}function dk(e,n){if(e<0||e>n)throw new fs(d7(e,n,"index"));return e}function Cme(e,n){var i;return ao(e),i=e.d.nb(n),i&&(--e.f.c,ny(e)),i}function Fb(e,n,i){var u;u=(Nt(e),new Cc((ps(),e))),lxe(new HW(u,n,i))}function Pme(e,n){return rk((Vn(),e.toLowerCase()),n.toLowerCase())}function Sme(e,n){return rk((Vn(),e.toLowerCase()),n.toLowerCase())}function Nme(){return fA(),be(ve(MC,1),Je,138,0,[aO,Xoe,ese,tse])}function Tme(e,n,i,u){Array.prototype.splice.apply(e,[n,i].concat(u))}function Ir(e,n,i,u){var f;f=new S2,f.c=n,f.b=i,f.a=u,u.b=i.a=f,++e.b}function Wj(e,n){var i;return i=Fj(q1(new yk(e,n))),ty(new yk(e,n)),i}function Mme(e,n,i){if(i){var u=i.gc();e.a[n]=u(i)}else delete e.a[n]}function jme(e,n,i){if(i){var u=i.gc();i=u(i)}else i=void 0;e.a[n]=i}function Ub(e){this.d=e.d,this.c=e.c,this.a=e.a,this.b=e.b}function UW(){this.g=new t6,this.c=new t6,this.a=new Ve,this.k=new Ve}function YW(){this.d=new JQ,this.a=new HK,this.c=new Z$,this.b=new nq}function Jj(){this.i=new Ve,this.g=new oi,this.n=new pj,this.q=new pj}function VW(e,n,i,u){this.e=e,this.b=new Ve,this.d=n,this.a=i,this.c=u}function Rp(){Rp=s,rae=new ae,iae=new se,tae=new le,nae=new he,aae=new fe}function pk(){pk=s,Vc=new ix(Wp,0),Od=new ix(nm,1),qc=new ix(Jp,2)}function qW(){qW=s,eie=Jr((eu(),be(ve(Xre,1),Je,107,0,[$_,Nv,Wl,Sd])))}function ZW(){ZW=s,nie=Jr((Zu(),be(ve(tie,1),Je,122,0,[Q_,zI,Xf,K_])))}function $W(){$W=s,kie=Jr((vd(),be(ve(dE,1),Je,139,0,[zv,hE,fE,lE])))}function KW(){KW=s,xie=Jr((Ku(),be(ve(ug,1),Je,150,0,[cE,Hv,uE,Gv])))}function QW(){QW=s,Qae=Jr((qb(),be(ve(Kae,1),Je,194,0,[HE,zE])))}function WW(){WW=s,Doe=Jr((hy(),be(ve(Roe,1),Je,174,0,[aC,A9])))}function Ml(e){return Nt(e),Ze(e,19)?new Cc((ps(),v(e,19))):q1(e.mb())}function Ame(e){return Yt(Re(Zt(X(e,(Ce(),Xc)))))&&X(e,Ct)!=null}function Ime(e){return Yt(Re(Zt(X(e,(Ce(),Xc)))))&&X(e,Ct)!=null}function JW(e,n,i,u){n==null&&(n=ku),e.a+=""+(Vn(),n.substr(i,u-i))}function XW(e,n){var i;for(i=0;i<n;++i)yo(e,i,new KM(v(e[i],21)))}function Lme(e,n){var i,u;i=v(pxe(e.b,n),19),i&&(u=i.Y(),i.Q(),e.c-=u)}function jl(e,n,i){var u;return u=(qn(n,e.c.length),e.c[n]),e.c[n]=i,u}function Al(e){return _t(e.a<e.c.a.length),e.b=e.a,TJ(e),e.c.b[e.b]}function gk(e){ar();var n;for(n=0;e.G();)e.H(),n=Ur(n,1);return cd(n)}function Xj(e){this.d=e,this.b=this.d.a.entries(),this.a=this.b.next()}function eJ(e){this.g=e,this.f=new Ve,this.a=mn(this.g.c.c,this.g.d.c)}function tJ(e){a6(),this.e=null,this.f=null,this.a="",this.b=e,this.a=""}function Dp(){an.call(this),YK(this),this.b.b=this.b,this.b.a=this.b}function Ome(e){e&&swe((o6(),BI)),--lm,e&&fm!=-1&&($0e(fm),fm=-1)}function Il(e){return!e.c||!e.d?!1:!!e.c.f&&e.c.f==e.d.f}function Rme(){return Date.now?Date.now():new Date().getTime()}function gy(e){return e.c.c.length!=0?v(ct(e.c,0),33).a:null}function nJ(e){return e.c.c.length!=0?v(ct(e.c,0),33).a:null}function Dme(e){return e.d=3,e.c=pwe(e),e.d!=2?(e.d=0,!0):!1}function by(e,n,i){this.a=e,this.b=n,this.c=i,Ke(e.j,this),Ke(n.d,this)}function xo(e,n,i,u){var f;e.c?f=new A2(vr(u)):f=new A2(u),io(n,i,f)}function vy(e){var n,i;return Nt(e),n=aye(e.length),i=new aa(n),Qb(i,e),i}function eA(e){var n,i,u;return n=e&_o,i=e>>22&_o,u=e<0?Gc:0,Pc(n,i,u)}function Bme(){return Oy(),be(ve(Vae,1),Je,141,0,[v9,p9,g9,GE,b9])}function Gme(){return Dy(),be(ve(Moe,1),Je,115,0,[Lm,KE,WE,QE,JE])}function Hme(){return ba(),be(ve(zoe,1),Je,85,0,[fh,Xv,el,vg,sc])}function rJ(){rJ=s,Jre=Jr((sr(),be(ve(Sv,1),Je,59,0,[rs,ya,uo,ou,Su])))}function iJ(){iJ=s,wie=Jr((Be(),be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt])))}function aJ(){aJ=s,gie=Jr((Oc(),be(ve(uL,1),Je,100,0,[th,su,aL,oL,sL])))}function oJ(){oJ=s,Bae=Hi(no(no(no(zi(new Jn,(Vr(),ME)),qL),ML),NE),TE)}function sJ(e,n){var i,u;for(u=n.mb();u.G();)i=v(u.H(),55),Xte(e,i,0,0)}function Js(e,n,i){var u,f;for(f=e.mb();f.G();)u=v(f.H(),55),pv(u,n,i)}function tA(e,n,i){var u,f;for(u=0,f=0;f<n.length;f++)u+=e.Hc(n[f],u,i)}function Gf(e,n){var i;return i=(qn(n,e.c.length),e.c[n]),w6(e.c,n,1),i}function zme(e){var n;for(Nt(e),n=0;n<0&&Ft(e);n++)Ot(e);return n}function Go(e){var n;e.d=new pK(e),e.e=new gK(e),n=e[Ql]|0,e[Ql]=n+1}function uJ(e){e.g=new ai,e.o=new ai,e.c=new ai,e.j=new Ve,e.d=new Ve}function Ll(e,n){if(e<0||e>n)throw new fs("Index: "+e+", Size: "+n)}function qn(e,n){if(e<0||e>=n)throw new fs("Index: "+e+", Size: "+n)}function cJ(e,n){var i,u;return i=n.yb(),u=LA(e,i),!!u&&Ga(u.e,n.zb())}function Fme(e,n){var i;return i=e.d,n>0?v(ct(i.a,n-1),9):null}function Ie(e,n,i,u,f,g){var y;return y=Cee(f,u),f!=9&&be(ve(e,g),n,i,f,y),y}function Hf(e){var n;if(!Mc(e))throw new Ra;return e.d=1,n=e.c,e.c=null,n}function Yb(e,n,i,u){this.f=e,this.e=n,this.d=i,this.b=u,this.c=u?u.d:null}function Ume(e,n){if(e&&typeof e==Wy)try{e.__gwt$exception=n}catch{}}function Yme(e,n){e.a.$b(n.d,e.b)>0&&(Ke(e.c,new fj(n.c,n.d,e.d)),e.b=n.d)}function Vme(e,n){var i;return i=Lr(e.j,n.j),i==0?Lr(e.k,n.k):i}function nA(e){var n,i;return i=v(ct(e.f,0),7),n=v(X(i,(Ce(),Ct)),7),n}function bk(e){var n,i;return i=v(ct(e.f,0),7),n=v(X(i,(Ce(),Ct)),7),n}function qme(e,n){return Lr(Re(Wt(X(e,(Ce(),oc)))),Re(Wt(X(n,oc))))}function lJ(){lJ=s,Voe=Jr((My(),be(ve(Yoe,1),Je,153,0,[X9,SC,eO])))}function fJ(){fJ=s,Zoe=Jr((qu(),be(ve(qoe,1),Je,172,0,[xg,t0,Vm])))}function hJ(){hJ=s,Wre=Jr((xs(),be(ve(Qre,1),Je,103,0,[Z_,pm,gm,bm,hm,dm])))}function dJ(){dJ=s,iie=Jr((zy(),be(ve(rie,1),Je,133,0,[W_,YI,qI,FI,VI,UI])))}function pJ(){pJ=s,vie=Jr((tr(),be(ve(bie,1),Je,28,0,[Yc,Ss,Dv,Md,Ps,ki])))}function gJ(){gJ=s,vae=Jr((Zp(),be(ve(bae,1),Je,125,0,[Zv,o9,c9,u9,s9,a9])))}function Zme(){return Hl(),be(ve(hae,1),Je,109,0,[Nm,Vv,qv,t9,n9,e9,r9,Tm])}function $me(){return Wu(),be(ve(Kn,1),Je,41,0,[ma,Co,xa,Va,Ya,Ua,qi,ka,wa])}function Kme(){return Vp(),be(ve($E,1),Je,123,0,[ZE,qE,VE,UE,FE,YE])}function Qme(){return av(),be(ve(Aoe,1),Je,124,0,[eC,x9,_9,w9,k9,XE])}function rA(){rA=s,HI=new vt("de.cau.cs.kieler.labels.labelManager",null)}function Wme(){return Date.now?Date.now():new Date().getTime()}function Jme(e){var n;return n=v(Kx(e.b,e.b.length),11),new xi(e.a,n,e.c)}function Xme(e,n){var i;return i=(Vn(),n.length),ls(Ap(e,e.length-i,i),n)}function bJ(e,n){var i;return i=new N2,i.c=!0,i.d=n.zb(),Nne(e,n.yb(),i)}function ewe(e,n){var i;return i=n.yb(),Wn(),new _6(i,lee(e.b,i,v(n.zb(),19)))}function zr(e,n){var i;return i=ia(e,n,0),i==-1?!1:(e.vb(i),!0)}function Vb(e,n){return hA(n)!=9&&be(Bp(n),n._c,n.__elementTypeId$,hA(n),e),e}function iA(e){return $x(e.c.a.c,e),_t(e.b!=e.c.a.b),e.a=e.b,e.b=e.b.a,e.a}function aA(e){Tf(!!e.c),$x(e.e,e),e.c.I(),e.c=null,e.b=EA(e),Q6(e.e,e)}function twe(e,n,i){e.a=n,e.c=i,e.b.a.Q(),vu(e.d),e.e.a.c=Ie(dt,tt,1,0,4,1)}function vJ(e,n,i){f6.call(this,VJ(Nt(e),Nt(n))),this.b=e,this.c=n,this.a=i}function yJ(e,n,i,u){this.b=new Uq(this),this.a=e,this.c=n,this.e=i,this.d=u}function mJ(e){EX.call(this,e,0),YK(this),this.b.b=this.b,this.b.a=this.b}function vk(e,n){M1.call(this,e,n),this.a=Ie(G3e,tt,183,2,0,1),this.b=!0}function ud(e,n){return Qo(n)?n==null?!!Mi(e.d,null):F1e(e.e,n):!!Mi(e.d,n)}function oA(e,n){return wp(),(e-n>0?e-n:-(e-n))<=mv||e==n||isNaN(e)&&isNaN(n)}function wJ(e,n){return wp(),(e-n>0?e-n:-(e-n))<=mv||e==n||isNaN(e)&&isNaN(n)}function sA(e){var n,i;n=!0;do n?i=UX(e):i=KX(e),n=!n;while(i);CA(e,e.d)}function io(e,n,i){var u;if(n==null)throw new yp;return u=Qn(e,n),Mme(e,n,i),u}function _e(e,n,i){return!e.n&&(e.n=new an),i==null?Af(e.n,n):Nn(e.n,n,i),e}function ia(e,n,i){for(;i<e.c.length;++i)if(Ga(n,e.c[i]))return i;return-1}function nwe(e,n){for(;n>=e.a.c.length;)Ke(e.a,new fi);return v(ct(e.a,n),20)}function rwe(e,n){var i;return i=v(ev(e.a,n),19),i?lee(e.b,n,i):null}function iwe(e,n,i){var u;u=Qn(e,N_),u||(u=new Ef,io(e,N_,u)),io(u.kc(),n,i)}function Jt(e,n,i,u,f){var g;return g=Jx(e,n),IJ(i,g),g.g=f?8:0,g.f=u,g.e=f,g}function yk(e,n){var i;this.f=e,this.b=n,i=v(pn(e.b,n),126),this.c=i?i.b:null}function uA(e,n){var i,u,f;for(u=0,f=n.length;u<f;++u)i=n[u],Ir(e,i,e.c.b,e.c)}function xJ(e,n,i,u,f,g){var y;y=hk(u),er(y,f),Fn(y,g),jt(e.a,u,new Y1(y,n,i.f))}function cA(e,n,i){var u;return u=0,e.c[i]>0&&(u+=zCe(n)),e.b[i]&&(u+=KCe(n)),u}function lA(e,n){var i;return i=v(Af(e.c,n),176),i?(wj(i),i.e):null}function cd(e){return Lk(e,Or)>0?Or:Lk(e,_u)<0?_u:ek(e)}function awe(e){return ps(),ji(e,"size"),ek(L0e(OX(e,8),sI)?OX(e,8):sI),new Z2}function mk(e){M1e.call(this,(Vn(),e==null?ku:za(e)),Ze(e,46)?v(e,46):null)}function aa(e){_x(this),xj(e>=0,"Initial capacity must not be negative")}function kJ(){kJ=s,$ie=Rb(no(no(new Jn,(Vr(),FL)),DL),GL),Kie=zi(new Jn,BL)}function Ha(){Ha=s,kL=new xe,xL=new Se,wE=new Le,mE=new De,xE=new Ne,kE=new Me}function fA(){fA=s,aO=new N1("All",0),Xoe=new wK,ese=new PK,tse=new xK}function yy(){yy=s,RE=new sx(kre,0),d9=new sx("LONGEST_PATH",1),h9=new sx(L_,2)}function my(){my=s,qre=Pc(_o,_o,524287),Zre=Pc(0,0,524288),eA(1),eA(2),GI=eA(0)}function _J(){_J=s,dae=Jr((Hl(),be(ve(hae,1),Je,109,0,[Nm,Vv,qv,t9,n9,e9,r9,Tm])))}function EJ(){EJ=s,qae=Jr((Oy(),be(ve(Vae,1),Je,141,0,[v9,p9,g9,GE,b9])))}function CJ(){CJ=s,joe=Jr((Dy(),be(ve(Moe,1),Je,115,0,[Lm,KE,WE,QE,JE])))}function PJ(){PJ=s,Foe=Jr((ba(),be(ve(zoe,1),Je,85,0,[fh,Xv,el,vg,sc])))}function SJ(e){s7(),d1e(this,ek(fW(Kb(Mke(Sa(e)?Ic(e):e,24)),PI)),ek(fW(e,PI)))}function Bp(e){return Qo(e)?F_:Xh(e)?n0:ed(e)?R3e:qx(e)||Fx(e)?e.$c:e.$c||m3e}function hA(e){return e.__elementTypeCategory$==null?9:e.__elementTypeCategory$}function owe(e){var n,i;if(e.a){i=null;do n=e.a,e.a=null,i=Kee(n,i);while(e.a);e.a=i}}function swe(e){var n,i;if(e.b){i=null;do n=e.b,e.b=null,i=Kee(n,i);while(e.b);e.b=i}}function ld(e){R$();var n,i;for(i=dI,n=0;n<e.length;n++)e[n]>i&&(i=e[n]);return i}function wy(e,n){var i;return i=v(pn(e.b,n),106),i||(i=n.rc(),Nn(e.b,n,i)),i}function wk(e,n){var i;return i=v(pn(e.c,n),176),i?(LK(e,i),i.e):null}function NJ(e,n,i,u){var f;f=v(wk(e.e,n),116),f.b+=i,f.a+=u,tv(e.e,n,f),e.d=!0}function TJ(e){var n;for(++e.a,n=e.c.a.length;e.a<n;++e.a)if(e.c.b[e.a])return}function uwe(e){var n,i,u;for(n=(e.g==null&&(e.g=mj(e)),e.g),i=0,u=n.length;i<u;++i);}function cwe(e,n){var i,u;return ao(e),u=e.d.V(),i=e.d.ib(n),i&&(++e.f.c,u&&V1(e)),i}function ji(e,n){if(e<0)throw new Pn(n+" cannot be negative but was: "+e);return e}function dA(e){if(!e.a.G()&&(e.a=e.b.mb(),!e.a.G()))throw new Ra;return e.a.H()}function Gp(e){ar();var n;return Nt(e),Ze(e,108)?(n=v(e,108),n):new mq(e)}function Tc(e,n){var i=e.a[n],u=(Tk(),q_)[typeof i];return u?u(i):RA(typeof i)}function xk(e,n){var i,u;for(u=new V(e);u.a<u.c.c.length;)i=v($(u),7),Vy(i,n)}function kk(e,n){var i,u,f,g;for(u=e.d,f=0,g=u.length;f<g;++f)i=u[f],Xa(e.g,i).a=n}function lwe(e,n){var i;return i=Fu(vo(v(pn(e.g,n),10)),e1e(v(pn(e.f,n),198).b)),i}function _k(e){var n;return!Mc(If((n=new hn(e.b.a).a.bb().mb(),new yn(n)),e.a))}function pA(e){var n;Tf(!!e.c),n=e.c.a,yu(e.d,e.c),e.b==e.c?e.b=n:--e.a,e.c=null}function MJ(e){return e.c&&e.d?e.c.f+"("+e.c+")->"+e.d.f+"("+e.d+")":"e_"+Ec(e)}function fwe(e,n){return $b(),e==Zc&&n==rf||e==rf&&n==Zc||e==ih&&n==nf||e==nf&&n==ih}function hwe(e,n){return $b(),e==Zc&&n==nf||e==Zc&&n==ih||e==rf&&n==ih||e==rf&&n==nf}function dwe(){return gv(),be(ve(Loe,1),Je,110,0,[P9,iC,S9,M9,N9,j9,T9,rC])}function jJ(){jJ=s,pie=Jr((Wu(),be(ve(Kn,1),Je,41,0,[ma,Co,xa,Va,Ya,Ua,qi,ka,wa])))}function fd(){fd=s,Bv=new rx("OUTSIDE",0),sE=new rx("INSIDE",1),oE=new rx("FIXED",2)}function Xs(){Xs=s,Dm=new px(Xp,0),ch=new px("TOP",1),Dd=new px("BOTTOM",2)}function qb(){qb=s,HE=new D6("CLASSIC",0),zE=new D6("IMPROVE_STRAIGHTNESS",1)}function gA(){this.e=new oi,this.a=new sW,this.d=new oi,this.b=new Ve,this.c=new Ve}function xy(e,n,i){this.b=n,this.a=e,this.c=i,Ke(this.a.e,this),Ke(this.b.b,this)}function bA(e,n){e.d=mn(e.d,n.d),e.c=et(e.c,n.c),e.a=et(e.a,n.a),e.b=mn(e.b,n.b)}function yu(e,n){var i;return i=n.c,n.a.b=n.b,n.b.a=n.a,n.a=n.b=null,n.c=null,--e.b,i}function Ek(e,n){ar();var i;for(Nt(e),Nt(n),i=!1;n.G();)i=i|e.ib(n.H());return i}function Hp(e){var n;return $x(e.e,e),_t(e.b),e.c=e.a,n=v(e.a.H(),21),e.b=EA(e),n}function pwe(e){for(var n;e.b.G();)if(n=e.b.H(),e.a.D(n))return n;return e.d=2,null}function gwe(e,n){return n&&e.b[n.e]==n?(yo(e.b,n.e,null),--e.c,!0):!1}function bwe(e){return P_<e&&e<Hc?e<0?Math.ceil(e):Math.floor(e):Kb(Q_e(e))}function AJ(e){if(e){if(e.V())throw new Ra;return e.sb(e.Y()-1)}return fme(null.mb())}function vwe(e,n){var i;return i=e.d,n<i.a.c.length-1?v(ct(i.a,n+1),9):null}function IJ(e,n){if(e){n.k=e;var i=Eme(n);if(!i){om[e]=[n];return}i.$c=n}}function LJ(e,n){var i,u;u=!1;do e.i?i=Fwe(e,n):i=zwe(e,n),u=u|i;while(i);return u}function OJ(e,n,i){var u,f;u=n;do f=Re(e.n[u.k])+i,e.n[u.k]=f,u=e.a[u.k];while(u!=n)}function ywe(e){var n,i;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),25),n.vc()}function mwe(){BZ();for(var e=H_,n=0;n<arguments.length;n++)e.push(arguments[n])}function wwe(e,n){var i,u;for(i=0,u=e.Y();i<u;++i)if(Ga(n,e.sb(i)))return i;return-1}function vA(e,n){var i;return uk(e,"set1"),uk(n,"set2"),i=(P1(),new h$(n)),new sQ(e,i,n)}function xwe(e){var n=/function(?:\s+([\w$]+))?\s*\(/,i=n.exec(e);return i&&i[1]||k_}function kwe(e,n,i){$t(i,hre,3),uee(e.c,n,zf(i,1)),yte(e,n,zf(i,1)),Fne(n,zf(i,1)),zt(i)}function RJ(){RJ=s,Toe=Jr((Vp(),be(ve($E,1),Je,123,0,[ZE,qE,VE,UE,FE,YE])))}function DJ(){DJ=s,Ioe=Jr((av(),be(ve(Aoe,1),Je,124,0,[eC,x9,_9,w9,k9,XE])))}function BJ(){BJ=s,$oe=be(ve(pr,1),hr,26,12,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function Cr(){Cr=s,dC=new gx(Kf,0),la=new gx("INPUT",1),_i=new gx("OUTPUT",2)}function GJ(e){this.c=e,this.b=new Uf(new zu(e.b).a),this.a=null,this.d=(ar(),ar(),AI)}function HJ(e){this.e=e,this.d=new K2(Nk(Zx(this.e).Y())),this.c=this.e.a,this.b=this.e.c}function yA(e,n,i){this.c=e,Jj.call(this),this.b=n,this.j=new mo(n.d,n.e,n.c,n.b),this.a=i}function zJ(e,n){e.j>0&&e.c<e.j&&(e.c+=n,e.g&&e.g.d>0&&e.e!=0&&zJ(e.g,n/e.j*e.g.d))}function FJ(e){return e.b.d.f.g==(gt(),Zn)?v(X(e.b.d.f,(Ce(),Ct)),7):e.b.d}function _we(e){return e.b.c.f.g==(gt(),Zn)?v(X(e.b.c.f,(Ce(),Ct)),7):e.b.c}function Mc(e){switch(j1(e.d!=3),e.d){case 2:return!1;case 0:return!0}return Dme(e)}function UJ(e){switch(e.e){case 2:return Be(),lt;case 4:return Be(),ot;default:return e}}function YJ(e){switch(e.e){case 1:return Be(),Et;case 3:return Be(),yt;default:return e}}function Ewe(e){var n;return Ze(e,90)?(n=v(e,90),new h6(n.a)):(ar(),new j2(e))}function VJ(e,n){wn();var i;return i=new cx(1),Qo(e)?cy(i,e,n):Ta(i.d,e,n),new ZM(i)}function qJ(e,n){return e.g?(e.g=qJ(e.g,n),--e.a,e.j=Lc(e.j,n.c),Qu(e)):e.e}function ZJ(e,n){return e.e?(e.e=ZJ(e.e,n),--e.a,e.j=Lc(e.j,n.c),Qu(e)):e.g}function Na(e,n){var i,u,f;for(Tr(n),i=!1,f=n.mb();f.G();)u=f.H(),i=i|e.ib(u);return i}function Cwe(e){var n,i,u;for(n=0,u=e.mb();u.G();)i=u.H(),n+=i!=null?ws(i):0,n=~~n;return n}function Pwe(e){var n,i,u,f;for(i=e.a,u=0,f=i.length;u<f;++u)n=i[u],n.B(null);return null}function Ck(e){var n,i,u;for(u=new Xi,i=e.b.mb();i.G();)n=v(i.H(),92),_n(u,n.a);return u}function Zb(e){var n,i,u;for(n=0,u=e.mb();u.G();)i=Wt(u.H()),n+=(Tr(i),i);return n/e.Y()}function $J(e,n){var i;return i=v(pn(e.c,n),200),i||(i=new hZ,i.c=n,Nn(e.c,i.c,i)),i}function Ai(e,n){var i;return Tr(n),i=n.e,e.b[i]?!1:(yo(e.b,i,n),++e.c,!0)}function ky(e,n){var i,u;return i=1-n,u=e.a[i],e.a[i]=u.a[n],u.a[n]=e,e.b=!0,u.b=!1,u}function KJ(e,n){var i;return Ze(n,10)?(i=v(n,10),e.a==i.a&&e.b==i.b):!1}function mA(e,n,i){return e.g=new _y(n,i),rj(e,e.g,e.i),e.d=mi(2,e.d),++e.a,e.j=Ur(e.j,i),e}function wA(e,n,i){return e.e=new _y(n,i),rj(e.f,e.e,e),e.d=mi(2,e.d),++e.a,e.j=Ur(e.j,i),e}function QJ(e,n){var i=e.a,u=0;for(var f in i)i.hasOwnProperty(f)&&(n[u++]=f);return n}function WJ(e,n){var i,u;for(Tr(n),u=n.bb().mb();u.G();)i=v(u.H(),21),e.db(i.yb(),i.zb())}function Swe(e,n,i){var u;return u=e.a.e[v(n.a,9).k]-e.a.e[v(i.a,9).k],vr(u>0?1:u<0?-1:0)}function JJ(e,n,i){this.g=e,this.d=n,this.e=i,this.a=new Ve,bke(this),wn(),wo(this.a,null)}function _y(e,n){Qh(n>0),this.b=e,this.c=n,this.j=n,this.a=1,this.d=1,this.e=null,this.g=null}function Nwe(e){e.a=null,e.e=null,e.b.c=Ie(dt,tt,1,0,4,1),e.f.c=Ie(dt,tt,1,0,4,1),e.c=null}function Twe(){return jr(),be(ve(C9,1),Je,113,0,[tC,As,Om,nC,sh,uh,Rm,fg,hg,E9])}function Mwe(e){return qf(e,26)*14901161193847656e-24+qf(e,27)*11102230246251565e-32}function Pk(e){return Ze(e,87)?Op(v(e,87)):Ze(e,88)?v(e,88).a:Ze(e,63)?new gb(e):new _p(e)}function XJ(e){var n;return n=v(X(e,(Ce(),ni)),32),e.g==(gt(),Zn)&&(n==(Be(),lt)||n==ot)}function eX(e,n){return kxe(e,n)?(jt(e.a,v(X(n,(Ce(),lh)),18),n),!0):!1}function Fr(e,n){var i;if(n)for(i=0;i<6;i++)v(ct(e.a,i),18).jb(v(ct(n.a,i),19));return e}function zf(e,n){var i;return e.b?null:(i=nye(e.e,e.f),_n(e.a,i),i.g=e,e.d=n,i)}function jc(e,n){var i,u;for(u=xn(e,0);u.b!=u.d.c;)i=v(fn(u),10),i.a+=n.a,i.b+=n.b;return e}function xA(e,n){var i,u;for(i=0;i<n.length;i++)for(u=0;u<n[i].length;u++)n[i][u]=e[i][u]}function jwe(e){var n,i;for(i=new V(e.b.f);i.a<i.c.c.length;)n=v($(i),7),dW(e.a,Yk(n.g))}function $b(){$b=s,Zc=new E1("Q1",0),rf=new E1("Q4",1),nf=new E1("Q2",2),ih=new E1("Q3",3)}function eu(){eu=s,$_=new w1(Kf,0),Nv=new w1(nm,1),Wl=new w1("HEAD",2),Sd=new w1("TAIL",3)}function qu(){qu=s,xg=new vx("AGGRESSIVE",0),t0=new vx("CAREFUL",1),Vm=new vx("OFF",2)}function tX(){tX=s,Ooe=Jr((gv(),be(ve(Loe,1),Je,110,0,[P9,iC,S9,M9,N9,j9,T9,rC])))}function kA(e,n){return zn(),Qo(e)?rk(e,td(n)):Xh(e)?GQ(e,Wt(n)):ed(e)?Hye(e,Zt(n)):e.F(n)}function _A(e,n,i){var u;return u=n.$b(i,e.b),u<0?e.e?_A(e.e,n,i):0:u>0?e.g?_A(e.g,n,i):0:e.c}function Awe(e,n){var i,u;return e.b?(u=e.e,i=e.a.$b(n,u),i<0|i==0&e.d==(Ko(),Eo)):!1}function nX(e,n){var i,u;return e.c?(u=e.g,i=e.a.$b(n,u),i>0|i==0&e.f==(Ko(),Eo)):!1}function Kb(e){var n;return n=e.h,n==0?e.l+e.m*$f:n==Gc?e.l+e.m*$f-Hc:e}function Mn(e){var n,i,u,f;for(n=new oi,u=0,f=e.length;u<f;++u)i=e[u],n.a+=i.a,n.b+=i.b;return n}function Iwe(e){var n,i,u,f;for(i=e.a,u=0,f=i.length;u<f;++u)n=i[u],bX(e,n,(Be(),Et)),bX(e,n,yt)}function Lwe(e){var n,i,u;for(n=1,u=e.mb();u.G();)i=u.H(),n=31*n+(i==null?0:ws(i)),n=~~n;return n}function Owe(e){var n,i;return n=v(e.e&&e.e(),11),i=v(Kx(n,n.length),11),new xi(n,i,n.length)}function rX(e){this.e=ut(X(ta(e[0]),(Ye(),eh)))===ut((Zu(),Xf)),this.a=e,this.c=new an,Iwe(this)}function iX(e){s6(),this.g=(Wn(),new an),this.f=new an,this.b=new an,this.c=new kb,this.i=e}function aX(e){this.o=e,this.g=new Ve,this.j=new fi,this.n=new fi,this.e=new Ve,this.b=new Ve}function Ey(e,n){if(Rn(e.a,n),n.f)throw new gu("CNode belongs to another CGroup.");n.f=e}function Rwe(e,n){typeof window===Wy&&typeof window.$gwt===Wy&&(window.$gwt[e]=n)}function oX(e,n,i,u){var f,g;for(f=S2e(e,n,i,u),f<0&&(f=-f-1),g=i-1;g>=f;g--)e[g+1]=e[g];e[f]=u}function sX(e,n,i,u){var f,g;for(f=B2e(e,n,i,u),f<0&&(f=-f-1),g=i-1;g>=f;g--)e[g+1]=e[g];e[f]=u}function Ac(e,n){var i,u;for(Tr(n),u=n.mb();u.G();)if(i=u.H(),!e.kb(i))return!1;return!0}function Dwe(e,n){ar();var i;for(Nt(n);e.G();)if(i=e.H(),!XJ(v(i,9)))return!1;return!0}function Bwe(e,n){var i,u,f;return i=n.k-e.k,i==0?(u=e.e.a*e.e.b,f=n.e.a*n.e.b,Lr(u,f)):i}function Ic(e){var n,i,u,f;return f=e,u=0,f<0&&(f+=Hc,u=Gc),i=vr(f/$f),n=vr(f-i*$f),Pc(n,i,u)}function Sk(e,n){return e.c.c=Ie(dt,tt,1,0,4,1),Uee(e,e.e,n),Uee(e,e.a,n),wn(),wo(e.c,null),$we(e)}function uX(e,n,i){e.g=i_(e,n,(Be(),ot),e.b),e.d=i_(e,i,ot,e.b),!(e.g.c==0||e.d.c==0)&&Dee(e)}function cX(e,n,i){e.g=i_(e,n,(Be(),lt),e.j),e.d=i_(e,i,lt,e.j),!(e.g.c==0||e.d.c==0)&&Dee(e)}function lX(e,n,i){return new mo(mn(e.a,n.a)-i/2,mn(e.b,n.b)-i/2,wi(e.a-n.a)+i,wi(e.b-n.b)+i)}function EA(e){return e.a.G()?!0:e.a!=e.d?!1:(e.a=new Uj(e.e.d),e.a.G())}function $n(e,n){var i,u;return i=n.ob(),u=i.length,u==0?!1:(vj(e.c,e.c.length,i),!0)}function CA(e,n){var i,u;for(i=0;i<e.a.length;i++)for(u=0;u<e.a[i].length;u++)e.a[i][u]=n[i][u]}function Qb(e,n){wn();var i,u,f,g;for(g=!1,u=0,f=n.length;u<f;++u)i=n[u],g=g|e.ib(i);return g}function Nk(e){return Wn(),e<3?(ji(e,"expectedSize"),e+1):e<sI?vr(e/.75+1):Or}function PA(e,n){var i;return Ze(n,19)?(i=(ps(),v(n,19)),e.jb(i)):Ek(e,v(Nt(n),22).mb())}function fX(e,n){var i,u;u=e.d.f,u.g!=(gt(),nr)&&(i=Vt(Un(u)),Ft(i)&&Nn(n,e,v(Ot(i),12)))}function SA(e,n){var i,u;return gme(n),i=ZX(e,0,n),u=Ie(pr,hr,26,n,12,1),Xk(e,0,u,0,i,!0),u}function Gwe(e,n){var i;this.c=e,i=new Ve,JA(e,i,n,e.b,null,!1,null),this.a=new jn(i,0)}function hX(e){return e.a?nX(e.c.b,e.a.b)?(e.a=null,!1):!0:!1}function Ff(e){if(!e)throw new yc((Vn(),"no calls to next() since the last call to remove()"))}function Tk(){Tk=s,q_={boolean:H0e,number:x0e,string:k0e,object:ate,function:ate,undefined:Kve}}function Mk(){Mk=s,bE=yW(be(ve(Sv,1),Je,59,0,[(sr(),uo),ya])),vE=yW(be(ve(Sv,1),Je,59,0,[Su,ou]))}function NA(e){wn();var n,i,u;for(u=0,i=e.mb();i.G();)n=i.H(),u=u+(n!=null?ws(n):0),u=u|0;return u}function Hwe(e){Gh();var n,i,u;for(u=0,i=id(e).mb();i.G();)n=v(i.H(),83),u=Ur(u,n.Yb());return cd(u)}function mu(e){var n,i;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),25),n.i.Q();e.c.Dc(e),Zte(e)}function dX(e,n){var i;return i=$2(e.a,n),i===void 0?++e.d:(e.a[D_](n),--e.c,Ox(e.b)),i}function zwe(e,n){var i,u,f,g;for(i=!1,u=e.d[n].length,f=u-1;f>0;f--)g=f-1,i=i|tee(e,n,g,f);return i}function Fwe(e,n){var i,u,f,g;for(i=!1,u=e.d[n].length,g=0;g<u-1;g++)f=g+1,i=i|tee(e,n,g,f);return i}function Uwe(e,n){var i,u,f;return i=e.l+n.l,u=e.m+n.m+(i>>22),f=e.h+n.h+(u>>22),Pc(i&_o,u&_o,f&Gc)}function Ywe(e,n){var i,u,f;return i=e.l-n.l,u=e.m-n.m+(i>>22),f=e.h-n.h+(u>>22),Pc(i&_o,u&_o,f&Gc)}function pX(e,n){var i;for(i=0;i<(Vn(),n.length);i++)if(e==n.charCodeAt(i))return!0;return!1}function gX(e,n){var i;for(i=0;i<(Vn(),n.length);i++)if(e==n.charCodeAt(i))return!0;return!1}function X(e,n){var i,u;return e.n&&(u=pn(e.n,n),u!=null)?u:(i=zEe(n),Ze(i,5)&&_e(e,n,i),i)}function jk(e){var n,i,u;for(n=new Xi,u=xn(e,0);u.b!=u.d.c;)i=v(fn(u),10),G1(n,0,new lr(i));return n}function bX(e,n,i){var u,f,g,y;for(y=new _l(n,i),g=0,f=zl(y);f.G();)u=v(f.H(),7),Nn(e.c,u,Tt(g++))}function Vwe(e,n,i){if(Nt(n),i.G())for(ml(n,e.C(i.H()));i.G();)ml(n,e.c),ml(n,e.C(i.H()));return n}function qwe(e,n,i,u,f){u?Cxe(e,n):(Pxe(e,n,f),gCe(e,n,i)),n.c.length>1&&(wo(n,e.b),R_e(e.c,n))}function be(e,n,i,u,f){return f.$c=e,f._c=n,f.ad=a,f.__elementTypeId$=i,f.__elementTypeCategory$=u,f}function Wb(e,n,i){switch(i.e){case 2:e.b=n;break;case 1:e.c=n;break;case 4:e.d=n;break;case 3:e.a=n}}function vX(e,n,i){var u,f;return f=nA(i).g,u=TX(e,n,f).a,u-w0e(v(pn(e.c,n),24).a-v(pn(e.c,i),24).a)}function Lr(e,n){return e<n?-1:e>n?1:e==n?0:isNaN(e)?isNaN(n)?0:1:-1}function Cy(e){switch(e.Y()){case 0:return Pv;case 1:return new Vu(e.mb().H());default:return new yr(e)}}function zp(){zp=s;var e,n;n=!(Error.stackTraceLimit||"stack"in new Error),e=new JV,SI=n?new h:e}function TA(){TA=s,cL=new vt("intCoordinates",(zn(),zn(),Xn)),lL=new br("jsonObject"),gE=new kt(0,0)}function Py(){Py=s,EL=new ox("MIRROR_X",0),CL=new ox("TRANSPOSE",1),_L=new ox("MIRROR_AND_TRANSPOSE",2)}function hd(){hd=s,m9=new dx(Xp,0),Im=new dx("INCOMING_ONLY",1),Qv=new dx("OUTGOING_ONLY",2)}function MA(){return Fi(),be(ve(lg,1),Je,60,0,[cu,Kc,rc,ic,js,Jc,Wc,as,Ms,Qc,ac,of,ah])}function yX(){yX=s;var e,n,i,u;for(af=new FA(lg),n=MA(),i=0,u=n.length;i<u;++i)e=n[i],lj(af,e,null)}function mX(e){wn();var n,i,u;for(u=1,i=e.mb();i.G();)n=i.H(),u=31*u+(n!=null?ws(n):0),u=u|0;return u}function wX(e,n){ar();var i,u;for(uk(n,"predicate"),u=0;e.G();u++)if(i=e.H(),n.D(i))return u;return-1}function jA(e,n){var i,u;return i=e.c.a,u=n.ac(i),e.b.b&&(u=Lc(u,E7(e,n,i))),e.b.c&&(u=Lc(u,_7(e,n,i))),u}function xX(e,n,i){var u,f;return u=new vk(n,i),f=new N2,e.b=Fte(e,e.b,u,f),f.b||++e.c,e.b.b=!1,f.d}function Ak(e,n,i){var u,f,g;for(u=new fi,g=xn(i,0);g.b!=g.d.c;)f=v(fn(g),10),_n(u,new lr(f));c2e(e,n,u)}function AA(e,n){var i;return n===e?!0:Ze(n,144)?(i=v(n,144),e.P().t(i.P())):!1}function kX(e){var n;if(n=e.a.c.length,n>0)return $1(n-1,e.a.c.length),Gf(e.a,n-1);throw new CZ}function _X(e){e.b.c.length-e.e.c.length<0?(en(e,(Be(),ot)),e.a.a=e.j.a):(en(e,(Be(),lt)),e.a.a=0)}function EX(e,n){xj(e>=0,"Negative initial capacity"),xj(n>=0,"Non-positive load factor"),Go(this)}function Uf(e){var n;this.e=e,this.d=new Xj(this.e.e),this.a=this.d,this.b=EA(this),n=e[Ql],this[Ql]=n}function IA(){this.n=null,this.j=null,this.i=null,this.d=null,this.b=null,this.k=null,this.a=null}function Ik(e){var n,i,u,f;for(f=1,i=0,u=e.length;i<u;++i)n=e[i],f=31*f+(n!=null?ws(n):0),f=f|0;return f}function Jr(e){var n,i,u,f;for(n={},u=0,f=e.length;u<f;++u)i=e[u],n[":"+(i.d!=null?i.d:""+i.e)]=i;return n}function CX(e){x_();var n,i,u,f;for(i=UA(),u=0,f=i.length;u<f;++u)if(n=i[u],rQ(n.a,e))return n;return pE}function PX(e,n,i){var u,f,g;for(f=0,g=i.length;f<g;++f)if(u=i[f],e.b.Uc(n,u.yb()))return u;return null}function SX(e,n,i){var u,f;for(f=i.mb();f.G();)if(u=v(f.H(),21),e.Uc(n,u.zb()))return!0;return!1}function LA(e,n){var i,u,f;for(f=e.b;f;){if(i=e.a.$b(n,f.d),i==0)return f;u=i<0?0:1,f=f.a[u]}return null}function Zwe(e,n){var i,u;return i=v(Af(e.a,n),19),i?(u=e.b.Z(),u.jb(i),e.b.c-=i.Y(),i.Q(),u):null}function NX(e,n,i){var u;for(u=v(n.B(e),9);u.g==(gt(),An);)!u.n&&(u.n=new an),Af(u.n,i),u=v(n.B(u),9)}function Lk(e,n){var i;return Sa(e)&&Sa(n)&&(i=e-n,!isNaN(i))?i:See(Sa(e)?Ic(e):e,Sa(n)?Ic(n):n)}function hi(e){var n;return Ze(e,46)?e:(n=e&&e.__gwt$exception,n||(n=new tJ(e),KZ(n,e),Ume(e,n)),n)}function $we(e){var n,i,u;for(n=0,u=new V(e.c);u.a<u.c.c.length;)i=v($(u),226),n+=Ote(e,i.a,i.b);return n}function Kwe(e){var n;return n=new eJ(e),Fb(e.a,aae,new Oo(be(ve(Uv,1),tt,160,0,[n]))),n.d&&Ke(n.f,n.d),n.f}function TX(e,n,i){switch(i.e){case 1:return v(pn(e.d,n),24);case 3:return v(pn(e.j,n),24)}return Tt(0)}function MX(e,n,i){return e.d[n.k][i.k]||(J2e(e,n,i),e.d[n.k][i.k]=!0,e.d[i.k][n.k]=!0),e.a[n.k][i.k]}function OA(e,n,i){var u;return u=n.$b(i,e.b),u<0?e.e?v(I0e(OA(e.e,n,i),e),206):e:u==0?e:e.g?OA(e.g,n,i):null}function es(e,n){return Qo(e)?ls(e,n):Xh(e)||ed(e)?(Tr(e),e===n):qx(e)?e.t(n):(Fx(e),e===n)}function or(e,n){return ls(e.b,n)||Xme(e.b,n)&&(Vn(),n.length==Nb(e.b)||cQ(e.b,Nb(e.b)-n.length-1)==46)}function Ok(e,n){var i,u,f;for(i=0,f=mr(e,n).mb();f.G();)u=v(f.H(),7),i+=X(u,(Ce(),lu))!=null?1:0;return i}function Qwe(e,n){var i,u,f;for(u=null,f=e.b;f;)i=e.a.$b(n,f.d),i>=0?f=f.a[1]:(u=f,f=f.a[0]);return u}function Wwe(e,n){var i,u,f;for(u=null,f=e.b;f;)i=e.a.$b(n,f.d),i<=0?f=f.a[0]:(u=f,f=f.a[1]);return u}function Jwe(e,n,i,u){var f,g;for(g=e.mb();g.G();)f=v(g.H(),33),f.i.a=n.a+(u.a-f.j.a)/2,f.i.b=n.b,n.b+=f.j.b+i}function jX(e,n){var i;e.c.length!=0&&(i=v(fr(e,Ie(Rr,oa,9,e.c.length,0,1)),51),q6(i,new Ut),Ree(i,n))}function AX(e,n){var i;e.c.length!=0&&(i=v(fr(e,Ie(Rr,oa,9,e.c.length,0,1)),51),q6(i,new bn),Ree(i,n))}function IX(e){var n,i;return n=e.g,n==(gt(),Zn)?(i=v(X(e,(Ce(),ni)),32),i==(Be(),yt)||i==Et):!1}function Xr(e,n){var i;return Tr(n),i=e[":"+n],RQ(!!i,"Enum constant undefined: %s",be(ve(dt,1),tt,1,4,[n])),i}function Xwe(e,n,i){if(!e)throw new Pn(hv("lowerEndpoint (%s) > upperEndpoint (%s)",be(ve(dt,1),tt,1,4,[n,i])))}function RA(e){throw Tk(),new jZ("Unexpected typeof result '"+e+"'; please report this bug to the GWT team")}function Rk(e){switch(e.e){case 1:return Et;case 2:return lt;case 3:return yt;case 4:return ot;default:return Sr}}function LX(e){switch(e.e){case 2:return ya;case 1:return uo;case 4:return ou;case 3:return Su;default:return rs}}function e2e(e){return e>=48&&e<58?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function t2e(e,n){var i,u;for(u=KQ(ZQ(e.P()));u.b.G();)if(i=v(QZ(u,u.b.H()),19),i.kb(n))return!0;return!1}function n2e(e){var n;if(!hX(e))throw new Ra;return n=new w$(e.c,e.a),e.b=n,e.a.i==e.c.a?e.a=null:e.a=e.a.i,n}function r2e(e,n){Wn();var i;return e===n?!0:Ze(n,57)?(i=v(n,57),Xee(Pl(e),i.bb())):!1}function i2e(e,n,i,u){return Gh(),ji(i,"oldCount"),ji(u,"newCount"),e.Cb(n)==i?(e.Gb(n,u),!0):!1}function a2e(e,n,i,u,f){return Nt(i),Nt(f),zye(new Zj(e.c,fne(e.b,new Uy(e.d,!0,n,i,!1,null,(Ko(),Eo))),e.a),u,f)}function DA(e){switch(eo(),e.Y()){case 0:return ad(),ig;case 1:return new xc(e.mb().H());default:return new lx(e)}}function Ur(e,n){var i;return Sa(e)&&Sa(n)&&(i=e+n,P_<i&&i<Hc)?i:Kb(Uwe(Sa(e)?Ic(e):e,Sa(n)?Ic(n):n))}function OX(e,n){var i;return Sa(e)&&Sa(n)&&(i=e*n,P_<i&&i<Hc)?i:Kb(YEe(Sa(e)?Ic(e):e,Sa(n)?Ic(n):n))}function Lc(e,n){var i;return Sa(e)&&Sa(n)&&(i=e-n,P_<i&&i<Hc)?i:Kb(Ywe(Sa(e)?Ic(e):e,Sa(n)?Ic(n):n))}function sr(){sr=s,rs=new mb(Kf,0),ya=new mb(Jp,1),uo=new mb(Wp,2),ou=new mb("DOWN",3),Su=new mb("UP",4)}function Zu(){Zu=s,Q_=new x1(Kf,0),zI=new x1("POLYLINE",1),Xf=new x1("ORTHOGONAL",2),K_=new x1("SPLINES",3)}function Sy(){Sy=s,J_=new nx("INHERIT",0),ZI=new nx("INCLUDE_CHILDREN",1),$I=new nx("SEPARATE_CHILDREN",2)}function RX(){RX=s,Nae=zi(Sc(new Jn,(Vr(),PE)),Cm),Tae=Hi(zi(K1(new Jn,EE),_E),Yv),Mae=Hi(no(new Jn,CE),Yv)}function DX(){DX=s,jae=zi(Sc(new Jn,(Vr(),PE)),Cm),Aae=Hi(zi(K1(new Jn,EE),_E),Yv),Iae=Hi(no(new Jn,CE),Yv)}function BX(e){this.a=new pa,this.d=new pa,this.b=new pa,this.c=new pa,this.g=new pa,this.i=new pa,this.f=e}function GX(e,n,i,u,f,g){this.e=new Ve,this.f=(Cr(),dC),Ke(this.e,e),this.d=n,this.a=i,this.b=u,this.f=f,this.c=g}function o2e(e,n,i,u,f,g,y,x){var _;for(_=i;g<y;)_>=u||n<i&&x.$b(e[n],e[_])<=0?yo(f,g++,e[n++]):yo(f,g++,e[_++])}function s2e(e,n,i,u,f){var g,y;for(y=e.mb();y.G();)g=v(y.H(),33),g.i.a=n.a,g.i.b=f?n.b:n.b+u.b-g.j.b,n.a+=g.j.a+i}function u2e(e,n){Bx();var i,u;for(u=Vt(ov(e));Ft(u);)if(i=v(Ot(u),12),i.d.f==n||i.c.f==n)return i;return null}function Dk(e,n,i){var u,f,g;for(u=0,g=xn(e,0);g.b!=g.d.c&&(f=Re(Wt(fn(g))),!(f>i));)f>=n&&++u;return u}function c2e(e,n,i){var u,f,g,y;for(Tr(i),y=!1,g=xn(e,n),f=xn(i,0);f.b!=f.d.c;)u=fn(f),Db(g,u),y=!0;return y}function l2e(e,n){var i,u,f;return n.V()?!1:(f=e.Y(),i=e.d.jb(n),i&&(u=e.d.Y(),e.f.c+=u-f,f==0&&V1(e)),i)}function $u(e,n){var i;return n&&(i=n.n?n.n:(wn(),wn(),nO),i.V()||(e.n?WJ(e.n,i):e.n=new J$(i))),e}function HX(e,n,i){var u;try{Vwe(e,n,i)}catch(f){throw f=hi(f),Ze(f,181)?(u=f,new mk(u)):di(f)}return n}function f2e(e,n,i){var u;try{yke(e,n,i)}catch(f){throw f=hi(f),Ze(f,181)?(u=f,new mk(u)):di(f)}return n}function di(e){var n;return Ze(e,164)&&(n=v(e,164),ut(n.b)!==ut((a6(),sm)))?ut(n.b)===ut(sm)?null:n.b:e}function dd(e,n){var i;for(i=v(X(ta(e),(Ce(),cf)),9);i;){if(i==n)return!0;i=v(X(ta(i),cf),9)}return!1}function h2e(e){switch(v(X(e,(Ce(),Mu)),140).e){case 1:_e(e,Mu,(Xs(),Dd));break;case 2:_e(e,Mu,(Xs(),ch))}}function ms(e){switch(eo(),e.c){case 0:return ad(),ig;case 1:return new xc(Jee(new Kh(e)));default:return new MZ(e)}}function Pr(e){Mr();var n,i;for(n=0,i=e.length;n<i;n++)if(e[n]==null)throw new bb("at index "+n);return new Oo(e)}function d2e(e,n,i){return n.length==0||i.length==0?0:(e.e?e.b=new AZ(e.c):e.b=new IZ(e.c),e.b.Gc(n,i))}function zt(e){if(e.i==null)throw new yc("The task has not begun yet.");e.b||(e.c<e.j&&zJ(e,e.j-e.c),e.b=!0)}function Bk(e,n){var i,u;for(u=new V(n);u.a<u.c.c.length;)i=v($(u),27),zr(e.b.b,i.b),mye(v(i.a,78),v(i.b,25))}function p2e(e,n){var i,u;for(u=new V(e.a);u.a<u.c.c.length;)if(i=v($(u),222),eX(i,n))return;Ke(e.a,new nQ(n))}function g2e(e){var n,i,u;for(n=new Ve,u=new V(e.b);u.a<u.c.c.length;)i=v($(u),251),$n(n,v(i.Ac(),19));return n}function b2e(e,n){var i,u,f;for(f=new Ve,u=mr(e,n).mb();u.G();)i=v(u.H(),7),f.c[f.c.length]=i;return wo(f,new Ht),f}function Yr(e){var n,i,u;for(n=new Ve,u=new V(e.f);u.a<u.c.c.length;)i=v($(u),7),Ke(n,i.b);return Nt(n),new Wh(n)}function Un(e){var n,i,u;for(n=new Ve,u=new V(e.f);u.a<u.c.c.length;)i=v($(u),7),Ke(n,i.e);return Nt(n),new Wh(n)}function Tt(e){var n,i;return e>-129&&e<128?(n=e+128,i=(AQ(),tO)[n],!i&&(i=tO[n]=new YM(e)),i):new YM(e)}function BA(e){var n,i;for(n=e_(e.b,e.d),i=Or;i>n;){if(CA(e,e.d),n==0){i=0;break}UX(e),KX(e),i=n,n=e_(e.b,e.d)}e.c=i}function zX(){s7();var e,n,i;i=B3e+++Wme(),e=vr(Math.floor(i*O_))&PI,n=vr(i-e*CI),this.a=e^1502,this.b=n^B_}function ws(e){return Qo(e)?Kk(e):Xh(e)?vr((Tr(e),e)):ed(e)?Yt((Tr(e),e))?1231:1237:qx(e)?e.v():(Fx(e),Ec(e))}function v2e(e,n,i){var u,f,g;f=new wee,f.d=i,u=Fxe(f,n),g=new YW,Yt(Re(Zt(X(u,yL))))?kwe(g,u,new U1):une(e,g,u),Hne(f,u)}function FX(e,n,i,u){var f,g,y,x;for(x=new _l(n,u),y=0,g=zl(x);g.G();)f=v(g.H(),7),Nn(e.i,f,Tt(y++));Nn(i,n,Tt(y))}function y2e(e,n){var i,u,f,g,y;for(i=0,y=0,f=0,g=n.length;f<g;++f)u=n[f],i=Ate(e,i,u,(Be(),ot),e.f),y=Ate(e,y,u,lt,e.n)}function m2e(e,n){var i,u,f,g;if(e.n)for(u=0,f=n.length;u<f;++u)i=n[u],g=pn(e.n,i),g!=null&&(i.nc(),i.oc())}function w2e(e,n){var i,u,f;for(u=new V(n);u.a<u.c.c.length;)i=v($(u),75),f=k_e(e.a),NJ(e.a,f,i.k,i.j),qp(i,f,!0)}function x2e(e,n){var i,u,f;for(u=new V(n);u.a<u.c.c.length;)i=v($(u),75),f=r_e(e.a),NJ(e.a,f,i.k,i.j),qp(i,f,!0)}function Gk(e){var n,i;return i=v(X(e,(Ye(),is)),59),i==(sr(),rs)?(n=v(X(e,(Ce(),Bd)),15).a,n>=1?ya:ou):i}function Ft(e){if(Nt(e.b),e.b.G())return!0;for(;e.a.G();)if(Nt(e.b=e.Wb(e.a.H())),e.b.G())return!0;return!1}function Yf(e){return(e.d!=e.c.d||e.i!=e.g.d)&&(e.a.c=Ie(dt,tt,1,0,4,1),$n(e.a,e.c),$n(e.a,e.g),e.d=e.c.d,e.i=e.g.d),e.a}function ao(e){var n;if(e.b){if(ao(e.b),e.b.d!=e.c)throw new mp}else e.d.V()&&(n=v(pn(e.f.b,e.e),19),n&&(e.d=n))}function GA(e,n,i,u,f){var g,y,x,_;for(_=vy(e),qwe(n,_,u,f,i),g=0,x=new V(_);x.a<x.c.c.length;)y=v($(x),9),e[g++]=y}function k2e(e){var n,i,u;for(u=v(n$(e.a,(Ye(),Nd)),15).a,i=new V(Vee(e.a));i.a<i.c.c.length;)n=v($(i),626),VCe(e,n,u)}function Jn(){var e,n;for(this.a=new aa(6),n=0;n<6;n++)Ke(this.a,(e=v(da(cae),11),new xi(e,v(ea(e,e.length),11),0)))}function UX(e){var n,i,u;for(u=!1,i=0;i<e.d.length;i++)e.j=(n=new c7(e.e,e.d,i,0),new a7(i,e.d,n)),u=u|LJ(e,i);return u}function _2e(e,n,i){var u,f;for(f=e.a.c,u=f.c.length;u<i;u++)El(f,0,new Nl(e.a));Wr(n,v(ct(f,f.c.length-i),16)),e.b[n.k]=i}function YX(e,n){var i,u;for(i=xn(e,0);i.b!=i.d.c;){if(u=Re(Wt(fn(i))),u==n)return;if(u>n){Gb(i);break}}Db(i,n)}function Hk(e,n,i){var u;return u=$2(e.a,n),E0e(e.a,n,i===void 0?null:i),u===void 0?(++e.c,Ox(e.b)):++e.d,u}function zk(e,n,i){return(n-e<=0?0-(n-e):n-e)<zc||(i-e<=0?0-(i-e):i-e)<zc?!0:n-e>zc?e-i>zc:i-e>zc}function VX(e){switch(e.e){case 0:return KE;case 1:return Lm;case 2:return QE;case 3:return WE;default:return JE}}function HA(e,n){switch(n.e){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function Ny(e){switch(Be(),e.e){case 4:return yt;case 1:return ot;case 3:return Et;case 2:return lt;default:return Sr}}function Fk(e,n){if(n==e.c)return e.d;if(n==e.d)return e.c;throw new Pn("Node "+n+" not part of edge "+e)}function E2e(e,n){var i;return bs(e.a,n)?v(bs(e.a,n)?e.b[n.e]:null,62):(i=new cZ,Ai(e.a,n),Qx(e,n.e,i),i)}function qX(e,n){var i,u,f,g;for(g=e.g.tb(),i=0;g.G();){if(u=Re(Wt(g.H())),f=u-n,f>Kl)return i;f>am&&++i}return i}function Ty(e){var n,i,u,f;return i=(n=v(da((u=e.$c,f=u.f,f==En?u:f)),11),new xi(n,v(ea(n,n.length),11),0)),Ai(i,e),i}function Uk(e,n){var i,u;for(u=new V(n);u.a<u.c.c.length;)i=v($(u),27),Ke(e.b.b,v(i.b,25)),Ey(v(i.a,78),v(i.b,25))}function C2e(e,n,i,u){var f,g,y;for(f=n+1;f<i;++f)for(g=f;g>n&&u.$b(e[g-1],e[g])>0;--g)y=e[g],yo(e,g,e[g-1]),yo(e,g-1,y)}function P2e(e){var n,i;if(!Zs(v(X(e,(Ye(),St)),28)))for(i=new V(e.f);i.a<i.c.c.length;)n=v($(i),7),en(n,(Be(),Sr))}function tu(e,n){switch(n.e){case 1:return Wo(e.f,(Ha(),xL));case 2:return Wo(e.f,(Ha(),kL));default:return wn(),wn(),tl}}function xr(e,n){return Oj(n,(Ye(),iL))?X(e.e,(Ce(),ca)):Oj(n,Jl)?X(e.e,(Ce(),gg)):X(e.e,n)}function S2e(e,n,i,u){var f,g,y;for(g=n,f=i-1;g<=f;){if(y=(g+f)/2|0,e[y]==u)return y;e[y]<u?g=y+1:f=y-1}return-g-1}function Jb(e,n,i){var u,f;for(f=e.mb();f.G();)if(u=f.H(),ut(n)===ut(u)||n!=null&&es(n,u))return i&&f.I(),!0;return!1}function ZX(e,n,i){var u;return RQ(n<=i,"%s > %s",be(ve(dt,1),tt,1,4,[Tt(n),Tt(i)])),u=e.length,i=i<u?i:u,XA(n,i,u),i-n}function $X(e,n){var i,u,f;i=e,f=0;do{if(i==n)return f;if(u=v(X(i,(Ce(),cf)),9),!u)throw new vp;i=ta(u),++f}while(!0)}function KX(e){var n,i,u;for(u=!1,i=e.d.length-1;i>=0;i--)e.j=(n=new c7(e.e,e.d,i,1),new a7(i,e.d,n)),u=u|LJ(e,i);return u}function zA(e){this.f=(Wn(),new an),this.n=new an,this.k=new an,this.g=new ai,this.i=new hee((yZ(),Hre)),this.j=e,y2e(this,e)}function FA(e){var n;this.a=(n=v(e.e&&e.e(),11),new xi(n,v(ea(n,n.length),11),0)),this.b=Ie(dt,tt,1,this.a.a.length,4,1)}function QX(e,n){var i;return n===e?!0:!Ze(n,18)||(i=v(n,18),i.Y()!=e.Y())?!1:e.lb(i)}function Yk(e){switch(Fi(),e.e){case 1:return cu;case 2:return rc;case 3:return js;case 4:return Wc;default:return ah}}function WX(e,n){switch(n.e){case 1:return e.e.d;case 2:return e.e.c;case 3:return e.e.a;case 4:return e.e.b;default:return 0}}function UA(){return x_(),be(ve(Yie,1),Je,67,0,[Fie,zie,Uie,Iie,Aie,Lie,Die,Rie,Oie,Hie,Gie,Bie,Mie,Tie,jie,Sie,Pie,Nie,Eie,_ie,Cie,pE])}function Oc(){Oc=s,th=new wb(Kf,0),su=new wb("JUSTIFIED",1),aL=new wb("BEGIN",2),oL=new wb(nm,3),sL=new wb("END",4)}function Ku(){Ku=s,cE=new k1("PORTS",0),Hv=new k1("PORT_LABELS",1),uE=new k1("NODE_LABELS",2),Gv=new k1("MINIMUM_SIZE",3)}function ga(){ga=s,Fv=new ax("UNKNOWN",0),Ts=new ax("ABOVE",1),Nu=new ax("BELOW",2),Vie=new vt("de.cau.cs.kieler.labelSide",Fv)}function My(){My=s,X9=new bx("EQUALLY_DISTRIBUTED",0),SC=new bx("NORTH_STACKED",1),eO=new bx("NORTH_SEQUENCE",2)}function N2e(){om={},!Array.isArray&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"})}function T2e(e,n){return wp(),wp(),((e-n>0?e-n:-(e-n))<=mv||e==n||isNaN(e)&&isNaN(n)?0:e<n?-1:e>n?1:iK(isNaN(e),isNaN(n)))>0}function YA(e,n){return wp(),wp(),((e-n>0?e-n:-(e-n))<=mv||e==n||isNaN(e)&&isNaN(n)?0:e<n?-1:e>n?1:iK(isNaN(e),isNaN(n)))<0}function Vk(e){var n,i;for(e.d||A_e(e),i=new Xi,n=e.b.mb(),n.H();n.G();)_n(i,v(n.H(),92).a);return _t(i.b!=0),yu(i,i.c.b),i}function JX(e){var n,i,u,f;for(f=new pa,n=new Cc(e.c),Fy(n),u=new V(n);u.a<u.c.c.length;)i=v($(u),7),f.a.db(i,f);return f}function M2e(e,n){var i,u,f;for(Nt(n),u=(f=e.g,v(f||(e.g=new HM(e)),20)).mb();u.G();)i=v(u.H(),21),jt(n,i.zb(),i.yb());return n}function XX(e,n){var i,u,f;return Ze(n,21)?(i=v(n,21),u=i.yb(),f=ev(e.qb(),u),Rf(f,i.zb())&&(f!=null||e.qb().R(u))):!1}function VA(e,n){var i,u,f;for(f=e.g.tb();f.G();)if(i=Re(Wt(f.H())),u=i-n<=0?0-(i-n):i-n,u<Kl)return f.L()-1;return e.g.Y()}function eee(e){var n,i;for(i=new V(e.a);i.a<i.c.c.length;)if(n=v($(i),9),n.g==(gt(),nr)||n.g==sa)return!1;return!0}function $t(e,n,i){if(e.b)throw new yc("The task is already done.");return e.i!=null?!1:(e.i=n,e.j=i,!0)}function j2e(e,n){return e.f<n.f?-1:e.f>n.f?1:e.g<n.g?-1:e.g>n.g?1:e.b-n.b}function A2e(e,n){if(n.c==e)return n.d;if(n.d==e)return n.c;throw new Pn("Input edge is not connected to the input port.")}function qk(e){var n;e.c!=0&&(n=v(ct(e.a,e.b),128),n.b==1?(++e.b,e.b<e.a.c.length&&eZ(v(ct(e.a,e.b),128))):--n.b,--e.c)}function Fp(e,n){return e.b.a=mn(e.b.a,n.c),e.b.b=mn(e.b.b,n.d),e.a.a=et(e.a.a,n.c),e.a.b=et(e.a.b,n.d),e.c[e.c.length]=n,!0}function I2e(e,n,i){var u,f;return u=Re(e.n[n.f.k])+Re(e.d[n.f.k])+n.i.b+n.a.b,f=Re(e.n[i.f.k])+Re(e.d[i.f.k])+i.i.b+i.a.b,f-u}function tee(e,n,i,u){var f,g,y;return f=!1,pEe(e.j,i,u)&&(d0e(e.j,e.d[n][i],e.d[n][u]),g=e.d[n],y=g[u],g[u]=g[i],g[i]=y,f=!0),f}function jy(e,n,i){var u,f,g,y,x;x=ta(e),f=x.a,u=v(X(x,(Ce(),Is)),15).a,g=x.d,y=e.i,n&&(y.a=y.a-f.b-u-g.a),i&&(y.b=y.b-f.d-u-g.b)}function nee(e,n){var i,u,f;for(u=Vt(ov(e));Ft(u);)return i=v(Ot(u),12),f=v(n.B(i),9),new u1(Nt(f.i.b+f.j.b/2));return pb(),pb(),U_}function ree(e){var n,i,u,f,g;for(u=y_(e),n=ks,g=0,f=0;n>.5&&g<50;)f=Lte(u),i=Vf(u,f,!0),n=wi(i.b),++g;return Vf(e,f,!1)}function iee(e){var n,i,u,f,g;for(u=y_(e),n=ks,g=0,f=0;n>.5&&g<50;)f=Ite(u),i=Vf(u,f,!0),n=wi(i.a),++g;return Vf(e,f,!1)}function Ay(e){var n,i,u;for(this.a=new pa,this.e=new ai,this.f=0,i=0,u=e.length;i<u;++i)n=e[i],!this.g&&(this.g=n),Ey(this,n)}function aee(e){U6(this),this.c=e.c,this.f=e.f,this.e=e.e,this.k=e.k,this.d=e.d,this.g=Ba(e.g),this.j=e.j,this.i=e.i,this.b=Ba(e.b)}function Zk(e){switch(e.e){case 1:return sr(),Su;case 4:return sr(),uo;case 2:return sr(),ya;case 3:return sr(),ou}return sr(),rs}function oee(e,n){return dke(e,n)?(Rn(e.g,n),!0):(n.g!=(Be(),Sr)&&Rn(e.i,n),n.e.c.length==0?Rn(e.c,n):Rn(e.b,n),!1)}function see(e,n){var i,u;return Ll(0,e.c.length),i=Wk(n,Ie(dt,tt,1,n.a.Y(),4,1)),u=i.length,u==0?!1:(vj(e.c,0,i),!0)}function $k(e,n){for(var i=0;!n[i]||n[i]=="";)i++;for(var u=n[i++];i<n.length;i++)!n[i]||n[i]==""||(u+=e+n[i]);return u}function L2e(){var e;return lm!=0&&(e=Rme(),e-Fre>2e3&&(Fre=e,fm=r.setTimeout(O0e,10))),lm++==0?(owe((o6(),BI)),!0):!1}function nu(e){var n,i;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),25),n.j.d=-n.j.d-n.j.c,n.o&&(n.g.a=-n.g.a+n.o.j.c);$y(e)}function Xb(e,n){var i;for(i=e;n.b<n.d.Y()&&i==e;)i=(_t(n.b<n.d.Y()),v(n.d.sb(n.c=n.b++),7)).g;i==e||(_t(n.b>0),n.a.sb(n.c=--n.b))}function O2e(e){var n;Gi(v(X(e,(Ye(),St)),28))&&(n=e.c,Ste((qn(0,n.c.length),v(n.c[0],16))),Ste(v(ct(n,n.c.length-1),16)))}function uee(e,n,i){$t(i,"Compound graph preprocessor",1),e.a=new kb,dne(e,n,null),LEe(e,n),_e(n,(Ce(),R9),e.a),e.a=null,Go(e.b),zt(i)}function cee(e){var n,i;return n=v(Ot(Vt(Yr(e))),12),i=v(Ot(Vt(Un(e))),12),!Yt(Re(Zt(X(n,(Ce(),ju)))))||!Yt(Re(Zt(X(i,ju))))}function R2e(e,n,i){n.g==(gt(),nr)&&i.g==An&&(e.d=Ok(n,(Be(),Et)),e.b=Ok(n,yt)),i.g==nr&&n.g==An&&(e.d=Ok(i,(Be(),yt)),e.b=Ok(i,Et))}function D2e(e,n,i){var u,f,g,y;return g=n.g,y=i.g,g!=y?g.e-y.e:(u=e.a[n.k],f=e.a[i.k],!u&&!f?0:u?f?Lr(u.a,f.a):1:-1)}function B2e(e,n,i,u){var f,g,y,x;for(g=n,f=i-1;g<=f;)if(y=g+f>>>1,x=e[y],x<u)g=y+1;else if(x>u)f=y-1;else return y;return-(g+1)}function G2e(e){return Ze(e,137)?(wn(),new J6(v(e,137))):Ze(e,18)?(wn(),new Cf(v(e,18))):Ze(e,20)?Fj(v(e,20)):(wn(),new lb(e))}function lee(e,n,i){return Ze(i,137)?new nj(e,n,v(i,137)):Ze(i,18)?new tj(e,n,v(i,18)):Ze(i,20)?Qj(e,n,v(i,20),null):new Yb(e,n,i,null)}function Up(e,n){var i;i=e.ub(n);try{return i.H()}catch(u){throw u=hi(u),Ze(u,74)?new fs("Can't get element "+n):di(u)}}function ev(e,n){Wn(),Nt(e);try{return e.cb(n)}catch(i){if(i=hi(i),Ze(i,119)||Ze(i,76))return null;throw di(i)}}function H2e(e,n){var i=e.a,u;n=String(n),i.hasOwnProperty(n)&&(u=i[n]);var f=(Tk(),q_)[typeof u],g=f?f(u):RA(typeof u);return g}function fee(e,n,i,u){n<i?(e.b=.5*(n+i),e.p=R_*e.b+.9*n,e.a=R_*e.b+.9*i):(e.b=.5*(n+u),e.p=R_*e.b+.9*u,e.a=R_*e.b+.9*n)}function hee(e){d$.call(this,e),this.b=new Uy(e,!1,null,(Ko(),Eo),!1,null,Eo),this.a=new _y(null,1),EZ(this.a,this.a),this.c=new m}function Iy(e){switch(v6(),this.c=new Ve,this.d=e,e.e){case 0:case 2:this.a=ame(mL),this.b=Vi;break;case 3:case 1:this.a=mL,this.b=ti}}function xs(){xs=s,Z_=new Ep("AUTOMATIC",0),pm=new Ep(Wp,1),gm=new Ep(Jp,2),bm=new Ep("TOP",3),hm=new Ep("BOTTOM",4),dm=new Ep(nm,5)}function Kk(e){nK();var n,i,u;return i=":"+e,u=qm[i],u!==void 0?u:(u=oO[i],n=u===void 0?mke(e):u,Aye(),qm[i]=n,n)}function z2e(e,n,i,u,f,g,y){eo();var x,_;return _=y.length+6,x=new aa(_),Qb(x,be(ve(dt,1),tt,1,4,[e,n,i,u,f,g])),Qb(x,y),Pee(new V(x))}function F2e(e){var n;n=v(X(e,(Ye(),Ma)),18),!n.V()&&(n.kb((Wu(),ma))?(n.nb(ma),n.ib(xa)):n.kb(xa)&&(n.nb(xa),n.ib(ma)))}function U2e(e){var n;n=v(X(e,(Ye(),Ma)),18),!n.V()&&(n.kb((Wu(),Va))?(n.nb(Va),n.ib(Ua)):n.kb(Ua)&&(n.nb(Ua),n.ib(Va)))}function Y2e(e,n){var i,u,f,g;return f=e.g,i=Re(Wt(X(e,(Ce(),oc)))),g=n.g,u=Re(Wt(X(n,oc))),g!=(gt(),Zn)?-1:f!=Zn?1:i==u?0:i<u?-1:1}function V2e(e,n,i){var u,f;return u=mc(kl(e,n.d),kl(e,n.c)),f=mi(kl(e,n.d),kl(e,n.c)),cd(jA(a2e(i,Tt(u),(Ko(),Eo),Tt(f),Eo),(O1(),V_)))}function dee(e,n){Wn(),Nt(e);try{return e.R(n)}catch(i){if(i=hi(i),Ze(i,119)||Ze(i,76))return!1;throw di(i)}}function pee(e,n){ps(),Nt(e);try{return Kj(e,n)}catch(i){if(i=hi(i),Ze(i,119)||Ze(i,76))return!1;throw di(i)}}function q2e(e,n){return e.e<n.e?-1:e.e>n.e?1:e.f<n.f?-1:e.f>n.f?1:Ec(e)-Ec(n)}function gee(e){switch(e.e){case 1:return Be(),lt;case 4:return Be(),yt;case 3:return Be(),ot;case 2:return Be(),Et;default:return Be(),Sr}}function Z2e(e){var n,i;switch(n=Kx(e.c,e.c.length),n.length){case 0:return Pv;case 1:return i=new Vu(n[0]),i;default:return new yr(Pr(n))}}function $2e(e){var n,i,u,f;for(u=Ie(b3e,tt,64,e.c.length,0,1),f=0,i=new V(e);i.a<i.c.c.length;)n=v($(i),64),u[f++]=n;return new Mq(u)}function bee(e){var n,i;if(!e.b)for(e.b=xl(e.a.b.c.length),i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),33),Ke(e.b,new L2(n));return e.b}function pd(e,n){var i,u,f;if(e.e)return 1;for(i=0,f=new V(n.f);f.a<f.c.c.length;)u=v($(f),7),i+=u.b.c.length+u.e.c.length;return i}function vee(e){var n,i,u,f;for(n=!1,f=!1,u=new V(e.f);u.a<u.c.c.length;)i=v($(u),7),n=n|i.g==(Be(),ot),f=f|i.g==lt;return n&&f}function yee(e){var n,i;for(this.b=new Ve,this.c=e,this.a=!1,i=new V(e.b);i.a<i.c.c.length;)n=v($(i),9),this.a=this.a|n.g==(gt(),nr)}function ko(e){X6.call(this),this.g=(gt(),nr),this.f=(ji(6,ql),new aa(6)),this.c=(ji(2,ql),new aa(2)),this.e=new T2,this.b=new T2,this.a=e}function qA(e,n,i,u,f,g){U6(this),this.e=e,this.f=n,this.d=i,this.c=u,this.g=f,this.b=g,this.j=Re(Wt(f.mb().H())),this.i=Re(Wt(AJ(f)))}function K2e(e,n){if(e==null)throw new bb("null key in entry: null="+n);if(n==null)throw new bb("null value in entry: "+e+"=null")}function mee(){mee=s,Fae=Rb(new Jn,(Vr(),cg)),Mm=new vt("linearSegments.inputPrio",Tt(0)),jm=new vt("linearSegments.outputPrio",Tt(0))}function ZA(e){var n,i,u,f;for(i=(f=new ub(e.b).a.bb().mb(),new cb(f));i.a.G();)n=(u=v(i.a.H(),21),v(u.zb(),19)),n.Q();Go(e.b),e.c=0}function xn(e,n){var i,u;if(Ll(n,e.b),n>=e.b>>1)for(u=e.c,i=e.b;i>n;--i)u=u.b;else for(u=e.a.a,i=0;i<n;++i)u=u.a;return new bQ(e,n,u)}function Ol(e,n){var i,u,f;for(f=new oi,u=e.mb();u.G();)i=v(u.H(),55),pv(i,f.a,0),f.a+=i.e.a+n,f.b=et(f.b,i.e.b);return f.b>0&&(f.b+=n),f}function Ly(e,n){var i,u,f;for(f=new oi,u=e.mb();u.G();)i=v(u.H(),55),pv(i,0,f.b),f.b+=i.e.b+n,f.a=et(f.a,i.e.a);return f.a>0&&(f.a+=n),f}function tv(e,n,i){var u,f,g;return f=v(pn(e.c,n),176),f?(g=hj(f,i),LK(e,f),g):(u=new yj(e,n,i),Nn(e.c,n,u),mW(u),null)}function Q2e(e,n){return Qke(e.b).kb(n.c)?Nye(e.b)?!(Gx(n.d,e.c,e.a)&&Gx(n.a,e.c,e.a)):Gx(n.d,e.c,e.a)&&Gx(n.a,e.c,e.a):!1}function W2e(e,n){return e.c<n.c||e.c==n.c&&Xx(e.a)&&Xx(n.a)&&kl(e.d,Ex(e.a,e.b))>kl(e.d,Ex(n.a,n.b))?-1:e.c==n.c&&Ex(e.a,e.b)==Ex(e.a,e.b)?0:1}function J2e(e,n,i){if(e.e)switch(e.b){case 1:gye(e.c,n,i);break;case 0:pye(e.c,n,i)}else ume(e.c,n,i);e.a[n.k][i.k]=e.c.i,e.a[i.k][n.k]=e.c.e}function X2e(e,n,i){switch(i.e){case 1:e.a=n.a/2,e.b=0;break;case 2:e.a=n.a,e.b=n.b/2;break;case 3:e.a=n.a/2,e.b=n.b;break;case 4:e.a=0,e.b=n.b/2}}function $A(e){switch(e.e){case 8:return Be(),yt;case 9:return Be(),Et;case 10:return Be(),ot;case 11:return Be(),lt;default:return Be(),Sr}}function exe(e){var n,i,u;for(n="Ot",u=mc(e.length,5),i=0;i<u;i++)if(ls(e[i].d,n)){e.length>=i+1&&e.splice(0,i+1);break}return e}function Qk(e,n){return Qo(e)?!!Ire[n]:e._c?!!e._c[n]:Xh(e)?!!Are[n]:ed(e)?!!jre[n]:!1}function wee(){TA(),this.i=(Wn(),new an),this.a=new an,this.k=new an,this.j=new an,this.b=new an,this.n=new an,this.f=new an,this.e=new an}function txe(e,n){var i,u;n.a.R(e)||(u=v(X(e,(Ce(),ni)),32),i=v(ct(e.f,0),7),u==(Be(),yt)?en(i,Et):u==Et&&en(i,yt),n.a.db(e,n))}function xee(e){var n,i;return i=mi(1,v(X(e,(Ce(),No)),24).a),e.c.f.g==(gt(),nr)&&e.d.f.g==nr?n=1:e.c.f.g==nr||e.d.f.g==nr?n=2:n=8,i*n}function nxe(e){var n,i,u,f,g;for(g=v(X(e,(Ce(),Ct)),7),n=v(fr(e.b,Ie(_a,va,12,e.b.c.length,0,1)),47),u=0,f=n.length;u<f;++u)i=n[u],Fn(i,g)}function rxe(e){var n,i,u,f,g;for(i=v(X(e,(Ce(),Ct)),7),n=v(fr(e.e,Ie(_a,va,12,e.e.c.length,0,1)),47),f=0,g=n.length;f<g;++f)u=n[f],er(u,i)}function kee(e){var n,i;i=e.i,n=On(new kt(i.a,i.b),e.j),this.d=mn(i.b,n.b),this.a=et(i.b,n.b),this.b=mn(i.a,n.a),this.c=et(i.a,n.a)}function gd(e,n,i,u){var f,g,y,x;!u&&(u=(Nf(),Nf(),hh)),f=(g=ZX(e,n,i),y=(x=new Array(i-n),Vb(x,e)),Xk(e,n,y,0,g,!0),y),p7(f,e,n,i,-n,u)}function fr(e,n){var i,u,f;for(f=e.c.length,n.length<f&&(n=(u=new Array(f),Vb(u,n))),i=0;i<f;++i)yo(n,i,e.c[i]);return n.length>f&&yo(n,f,null),n}function _ee(e,n){var i,u,f;for(f=e.a.length,n.length<f&&(n=(u=new Array(f),Vb(u,n))),i=0;i<f;++i)yo(n,i,e.a[i]);return n.length>f&&yo(n,f,null),n}function za(e){return Qo(e)?e:Xh(e)?l$((Tr(e),e)):ed(e)?CK(Yt((Tr(e),e))):qx(e)?e.w():Fx(e)?gW(e):e.toString?e.toString():"[JavaScriptObject]"}function ixe(e){var n,i,u,f,g;for(g=0,i=e.b,u=0,f=i.length;u<f;++u)n=i[u],n.g==(gt(),An)||Nn(e.c,n,Tt(g++)),FX(e,n,e.d,(Be(),yt)),FX(e,n,e.j,Et)}function Oy(){Oy=s,v9=new _b("SIMPLE",0),p9=new _b(L_,1),g9=new _b("LINEAR_SEGMENTS",2),GE=new _b("BRANDES_KOEPF",3),b9=new _b(kre,4)}function ba(){ba=s,fh=new Cb(Xp,0),Xv=new Cb("FIRST",1),el=new Cb("FIRST_SEPARATE",2),vg=new Cb("LAST",3),sc=new Cb("LAST_SEPARATE",4)}function Ry(){Ry=s,Am=new E2,ooe=zi(new Jn,(Vr(),xm)),soe=Hi(zi(new Jn,Sm),Pm),ioe=Hi(no(zi(K1(new Jn,km),Em),Rd),_m),aoe=Hi(no(new Jn,Rd),wm)}function axe(e){var n,i,u,f;for(i=(f=new hn(e.d.a).a.bb().mb(),new yn(f));i.a.G();)n=(u=v(i.a.H(),21),v(u.yb(),12)),Ke(n.c.e,n),Ke(n.d.b,n)}function KA(e,n){var i,u;if(lK(n>0),(n&-n)==n)return vr(n*qf(e,31)*4656612873077393e-25);do i=qf(e,31),u=i%n;while(i-u+(n-1)<0);return vr(u)}function oxe(e,n){if(e.c.f==n)return e.d.f;if(e.d.f==n)return e.c.f;throw new Pn("Node "+n+" is neither source nor target of edge "+e)}function sxe(e,n,i){return lK(e>=0&&e<=1114111),e>=bv?(n[i++]=55296+(e-bv>>10&1023)&iu,n[i]=56320+(e-bv&1023)&iu,2):(n[i]=e&iu,1)}function uxe(e,n){ar();for(var i,u;e.G();)if(!n.G()||(i=e.H(),u=n.H(),!(ut(i)===ut(u)||i!=null&&es(i,u))))return!1;return!n.G()}function cxe(e){var n,i,u;for(b1(e.b.a),e.a=Ie(mm,tt,25,e.c.b.a.b.c.length,0,1),n=0,u=new V(e.c.b.a.b);u.a<u.c.c.length;)i=v($(u),25),i.k=n++}function lxe(e){var n,i,u,f;for(wo(e.c,e.a),f=new V(e.c);f.a<f.c.c.length;)for(u=$(f),i=new V(e.b);i.a<i.c.c.length;)n=v($(i),160),n.Ec(u)}function nv(e){var n,i;if(!e.a)for(e.a=xl(v(e.e,9).c.c.length),i=new V(v(e.e,9).c);i.a<i.c.c.length;)n=v($(i),33),Ke(e.a,new L2(n));return e.a}function rv(e){var n,i;if(!e.b)for(e.b=xl(v(e.e,7).c.c.length),i=new V(v(e.e,7).c);i.a<i.c.c.length;)n=v($(i),33),Ke(e.b,new L2(n));return e.b}function Eee(e){this.b=e,this.c=(Wn(),new an),this.i=new an,this.d=new an,this.j=new an,this.k=ut(X(ta(e[0]),(Ye(),eh)))===ut((Zu(),Xf)),ixe(this)}function Yp(e){switch(e.e){case 1:return 4.71238898038469;default:case 2:return 0;case 3:return 1.5707963267948966;case 4:return 3.141592653589793}}function QA(e){ar();var n;if(n=zme(e),!Ft(e))throw new fs("position (0) must be less than the number of elements that remained ("+n+")");return Ot(e)}function WA(e,n){var i,u;i=e.ub(n);try{return u=i.H(),i.I(),u}catch(f){throw f=hi(f),Ze(f,74)?new fs("Can't remove element "+n):di(f)}}function Wk(e,n){var i,u,f,g;for(g=e.Y(),n.length<g&&(n=(f=new Array(g),Vb(f,n))),u=e.mb(),i=0;i<g;++i)yo(n,i,u.H());return n.length>g&&yo(n,g,null),n}function bd(e,n,i){if(i&&(n<0||n>i.a.c.length))throw new Pn("index must be >= 0 and <= layer node count");e.d&&zr(e.d.a,e),e.d=i,i&&El(i.a,n,e)}function JA(e,n,i,u,f,g,y,x){var _,C;u&&(_=u.a[0],_&&JA(e,n,i,_,f,g,y),yxe(e,i,u.d,f,g,y)&&n.ib(u),C=u.a[1],C&&JA(e,n,i,C,f,g,y))}function XA(e,n,i){if(e<0)throw new fs(Zne+e+" < 0");if(n>i)throw new fs("toIndex: "+n+" > size "+i);if(e>n)throw new Pn(Zne+e+" > toIndex: "+n)}function Jk(e,n){var i,u,f;return i=n.yb(),f=n.zb(),u=e.cb(i),!(!(ut(f)===ut(u)||f!=null&&es(f,u))||u==null&&!e.R(i))}function fxe(e,n,i){var u;u=n.c.f,u.g==(gt(),An)?(_e(e,(Ce(),ua),v(X(u,ua),7)),_e(e,Zi,v(X(u,Zi),7))):(_e(e,(Ce(),ua),n.c),_e(e,Zi,i.d))}function hxe(e,n,i){var u;u=n.c.f,u.g==(gt(),An)?(_e(e,(Ce(),ua),v(X(u,ua),7)),_e(e,Zi,v(X(u,Zi),7))):(_e(e,(Ce(),ua),n.c),_e(e,Zi,i.d))}function e7(e,n,i){var u,f,g,y,x;for(uwe(e),f=(e.i==null&&(e.i=Ie(g3e,qr,46,0,0,1)),e.i),g=0,y=f.length;g<y;++g)u=f[g],e7(u);x=e.e,x&&e7(x)}function Cee(e,n){var i=new Array(n),u;switch(e){case 11:case 12:u=0;break;case 13:u=!1;break;default:return i}for(var f=0;f<n;++f)i[f]=u;return i}function dxe(e){var n,i,u,f;for(f=Ie(Rr,qr,51,e.a.length,0,2),i=0;i<f.length;i++)u=e.a[i].length,n=Ie(Rr,oa,9,u,0,1),_Ee(e.a[i],0,n,0,u),f[i]=n;return f}function Rc(e){var n,i;if(!e.b)for(e.b=xl(v(e.e,9).f.c.length),i=new V(v(e.e,9).f);i.a<i.c.c.length;)n=v($(i),7),Ke(e.b,new S$(n,e.c));return e.b}function pxe(e,n){Wn(),Nt(e);try{return Qo(n)?rW(e,n):f_(e.d,n)}catch(i){if(i=hi(i),Ze(i,119)||Ze(i,76))return null;throw di(i)}}function gxe(e){var n;return n=(BJ(),$oe),n[e>>>28]|n[e>>24&15]<<4|n[e>>20&15]<<8|n[e>>16&15]<<12|n[e>>12&15]<<16|n[e>>8&15]<<20|n[e>>4&15]<<24|n[e&15]<<28}function bxe(e,n,i){var u,f;return n.c==(Cr(),_i)&&i.c==la?-1:n.c==la&&i.c==_i?1:(u=$X(n.a,e.a),f=$X(i.a,e.a),n.c==_i?f-u:u-f)}function vxe(e){var n,i,u,f,g;for(f=Or,g=null,u=new V(e.d);u.a<u.c.c.length;)i=v($(u),89),i.c.j^i.d.j&&(n=i.d.e-i.c.e-i.a,n<f&&(f=n,g=i));return g}function yxe(e,n,i,u,f,g,y){var x,_;return!(n.Xc()&&(_=e.a.$b(i,u),_<0||_==0)||n.Yc()&&(x=e.a.$b(i,g),x>0||x==0))}function Pee(e){eo();var n,i;if(!e.G())return ad(),ig;if(i=e.H(),!e.G())return new xc(i);n=new pa,Rn(n,Nt(i));do Rn(n,Nt(e.H()));while(e.G());return DA(n)}function mxe(e,n,i){e.e=n,e.a=i,e.d=Sk(e,(Be(),ot)),e.d+=Sk(e,lt),cv(e,n,i,ot,e.f),cv(e,n,i,lt,e.n),e.b=Sk(e,ot),e.b+=Sk(e,lt),cv(e,i,n,ot,e.f),cv(e,i,n,lt,e.n)}function Rl(e){var n,i,u;for(i=(Vn(),e.length),u=0;u<i&&e.charCodeAt(u)<=32;)++u;for(n=i;n>u&&e.charCodeAt(n-1)<=32;)--n;return u>0||n<i?e.substr(u,n-u):e}function Xk(e,n,i,u,f,g){var y,x,_;for(ut(e)===ut(i)&&(e=e.slice(n,n+f),n=0),x=n,_=n+f;x<_;)y=x+1e4<_?x+1e4:_,f=y-x,Tme(i,u,g?f:0,e.slice(x,y)),x=y,u+=f}function wxe(e){var n,i,u;return See(e,(my(),GI))<0?-b1e((n=~e.l+1&_o,i=~e.m+(n==0?1:0)&_o,u=~e.h+(n==0&&i==0?1:0)&Gc,Pc(n,i,u))):e.l+e.m*$f+e.h*Hc}function xxe(e,n){var i;switch(i=e.f,n.e){case 1:return-(e.i.b+e.j.b);case 2:return e.i.a-i.j.a;case 3:return e.i.b-i.j.b;case 4:return-(e.i.a+e.j.a)}return 0}function tr(){tr=s,Yc=new Pp(Kf,0),Ss=new Pp("FREE",1),Dv=new Pp("FIXED_SIDE",2),Md=new Pp("FIXED_ORDER",3),Ps=new Pp("FIXED_RATIO",4),ki=new Pp("FIXED_POS",5)}function kxe(e,n){var i,u,f,g;for(i=v(X(n,(Ce(),lh)),18),g=v(oo(Gt,i),18),f=g.mb();f.G();)if(u=v(f.H(),18),!v(oo(e.a,u),20).V())return!1;return!0}function t7(e,n,i){this.b=new Lx,this.i=new Ve,this.d=new jq(this),this.g=e,this.a=n.c.length,this.c=n,this.e=v(ct(this.c,this.c.c.length-1),9),this.f=i,mEe(this)}function Dy(){Dy=s,Lm=new Eb("ALWAYS_UP",0),KE=new Eb("ALWAYS_DOWN",1),WE=new Eb("DIRECTION_UP",2),QE=new Eb("DIRECTION_DOWN",3),JE=new Eb("SMART",4)}function See(e,n){var i,u,f,g,y,x,_,C;return _=e.h>>19,C=n.h>>19,_!=C?C-_:(f=e.h,x=n.h,f!=x?f-x:(u=e.m,y=n.m,u!=y?u-y:(i=e.l,g=n.l,i-g)))}function Nee(e){var n,i,u,f;for(i=(f=new hn(e.p.a).a.bb().mb(),new yn(f));i.a.G();)if(n=(u=v(i.a.H(),21),v(u.yb(),89)),n.e&&e.b[n.b]<0)return n;return null}function iv(e,n){var i,u,f,g,y;u=mn(e.d,n.d),g=mn(e.e,n.e),f=et(e.d+e.c,n.d+n.c),y=et(e.e+e.b,n.e+n.b),f<u&&(i=u,u=f,f=i),y<g&&(i=g,g=y,y=i),lQ(e,u,g,f-u,y-g)}function By(e,n){var i;if(N_ in e.a){if(i=Qn(e,N_),!i.kc())throw new Ks("The 'properties' property of a graph element must be an object.",i,e);Fee(i.kc(),n,!0)}}function _xe(e,n){var i,u,f;if(u=e.b.j.e,e.a||(u+=e.b.j.b),f=n.b.j.e,n.a||(f+=n.b.j.b),i=Lr(u,f),i==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return i}function n7(e){var n,i;switch(v(X(ta(e),(tn(),xC)),174).e){case 0:return n=e.i,i=e.j,new kt(n.a+i.a/2,n.b+i.b/2);case 1:return new lr(e.i);default:return null}}function ur(){Ha(),X6.call(this),this.g=(Be(),Sr),this.a=new oi,this.d=new T2,this.c=(ji(2,ql),new aa(2)),this.b=(ji(4,ql),new aa(4)),this.e=(ji(4,ql),new aa(4))}function Exe(e,n,i){e.d=0,e.b=0,e_e(e,n,i),n.g==(gt(),wr)&&i.g==An?bk(n).g==(Be(),yt)?e.d=1:e.b=1:i.g==wr&&n.g==An&&(bk(i).g==(Be(),yt)?e.b=1:e.d=1),R2e(e,n,i)}function Cxe(e,n){var i,u;for(u=new V(n);u.a<u.c.c.length;)i=v($(u),9),e.a[i.d.k][i.k].a=Mwe(e.e),e.a[i.d.k][i.k].d=Re(e.a[i.d.k][i.k].a),e.a[i.d.k][i.k].b=1}function Pxe(e,n,i){var u,f,g;for(g=new V(n);g.a<g.c.c.length;)u=v($(g),9),e.a[u.d.k][u.k].e=!1;for(f=new V(n);f.a<f.c.c.length;)u=v($(f),9),K7(e,u,i)}function Sxe(e,n){var i,u,f,g;for(i=0,u=0,g=new V(n.b);g.a<g.c.c.length;)f=v($(g),33),i=et(i,f.j.a),u+=f.j.b;_e(n,(Ce(),Hoe),new kt(i,u)),e.k<i&&(e.k=i),e.j+=u}function Tee(e,n){this.c=(Wn(),new an),this.a=e,this.b=n,this.d=v(X(e,(Ce(),lf)),134),ut(X(e,(tn(),gC)))===ut((qb(),zE))?this.e=new SZ:this.e=new PZ}function e_(e,n){var i,u,f,g;for(f=0,u=0;u<n.length;u++)i=n[u],u<n.length-1&&(g=n[u+1],f+=d2e(e,i,g)),f+=(e.d=new Eee(i),fke(e.d)),f+=(e.a=new zA(i),Mye(e.a));return f}function r7(e){switch(e.c.e){case 1:return Ha(),wE;case 2:return Ha(),mE;case 3:return Ha(),xE;case 4:return Ha(),kE}throw new Hh("Can't filter on undefined side")}function Gy(e,n){var i;try{return i=e.c.a,!Ib(e.b,n)||!i?0:_A(i,e.d,n)}catch(u){if(u=hi(u),Ze(u,119)||Ze(u,76))return 0;throw di(u)}}function Nxe(e){var n,i,u,f,g;for(u=new Uf(new zu(e.b).a);u.b;)i=Hp(u),n=v(i.yb(),9),g=v(v(i.zb(),27).a,9),f=v(v(i.zb(),27).b,10),On(bu(n.i),On(vo(g.i),f))}function Txe(e,n,i){var u,f,g;if(u=Lr(e.a[n.k],e.a[i.k]),u==0){if(f=v(X(n,(Ce(),Gd)),20),g=v(X(i,Gd),20),f.kb(i))return-1;if(g.kb(n))return 1}return u}function Mxe(e,n){var i,u;switch(u=On(vo(e.i),e.a),i=e.f.j,n.e){case 1:return-u.b;case 2:return-u.a+i.a;case 3:return-u.b+i.b;case 4:return-u.a;default:return 0}}function Mee(e,n){var i,u,f,g;for(f=0;f<n.length;f++)for(f+1<n.length&&tA(e,n[f+1],(Cr(),la)),g=n[f],i=0,u=0;u<g.length;u++)f3e(e,g[u]),i+=e.Hc(g[u],i,(Cr(),_i))}function i7(){i7=s,Noe=no(no(Sc(new Jn,(Vr(),QL)),KL),WL),Eoe=Hi(no(zi(K1(new Jn,km),Em),Rd),_m),Poe=zi(new Jn,xm),Soe=Hi(zi(new Jn,Sm),Pm),Coe=Hi(no(new Jn,Rd),wm)}function jxe(e,n,i,u){BZ();var f=H_;function g(){for(var y=0;y<f.length;y++)f[y]()}if(e)try{jC(g)()}catch(y){e(n,y)}else jC(g)()}function Hy(e){if(NI==null&&(NI=/^\s*[+-]?(NaN|Infinity|((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?)\s*$/),!D0e(NI,e))throw new v1(__+e+'"');return parseFloat(e)}function av(){av=s,eC=new Mp(Xp,0),x9=new Mp("LEFTUP",1),_9=new Mp("RIGHTUP",2),w9=new Mp("LEFTDOWN",3),k9=new Mp("RIGHTDOWN",4),XE=new Mp("BALANCED",5)}function Vp(){Vp=s,ZE=new Tp("V_TOP",0),qE=new Tp("V_CENTER",1),VE=new Tp("V_BOTTOM",2),UE=new Tp("H_LEFT",3),FE=new Tp("H_CENTER",4),YE=new Tp("H_RIGHT",5)}function zy(){zy=s,W_=new Cp(Xp,0),YI=new Cp("DIRECTED",1),qI=new Cp("UNDIRECTED",2),FI=new Cp("ASSOCIATION",3),VI=new Cp("GENERALIZATION",4),UI=new Cp("DEPENDENCY",5)}function gt(){gt=s,nr=new Sp("NORMAL",0),An=new Sp("LONG_EDGE",1),Zn=new Sp("EXTERNAL_PORT",2),wr=new Sp("NORTH_SOUTH_PORT",3),Po=new Sp("LABEL",4),sa=new Sp("BIG_NODE",5)}function jee(e,n,i,u,f,g,y){var x,_,C,N,A;if(N=f[g],C=g==y-1,x=C?u:0,A=Cee(x,N),u!=9&&be(ve(e,y-g),n[g],i[g],x,A),!C)for(++g,_=0;_<N;++_)A[_]=jee(e,n,i,u,f,g,y);return A}function ov(e){var n,i,u;for(n=new Ve,u=new V(e.f);u.a<u.c.c.length;)i=v($(u),7),Ke(n,Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[i.b,i.e]))))));return Nt(n),new Wh(n)}function a7(e,n,i){if(this.a=i,e>=n.length)throw new fs("Greedy SwitchDecider: Free layer layer not in graph.");this.b=n[e],this.c=new XK(this.b),this.d=new rX(this.b)}function Aee(e,n){var i;if(this.f=e,this.b=this.f.c,i=e.d,dk(n,i),n>=(i/2|0))for(this.e=e.e,this.d=i;n++<i;)AW(this);else for(this.c=e.a;n-- >0;)jW(this);this.a=null}function Dl(e){var n,i,u;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),25),u=n.j.d,n.j.d=n.j.e,n.j.e=u,u=n.j.c,n.j.c=n.j.b,n.j.b=u,u=n.g.a,n.g.a=n.g.b,n.g.b=u;$y(e)}function Axe(e,n){var i,u,f;for(u=new jn(e.b,0);u.b<u.d.Y();)i=(_t(u.b<u.d.Y()),v(u.d.sb(u.c=u.b++),33)),f=v(X(i,(Ye(),Fa)),107),f==(eu(),Wl)&&(Jo(u),Ke(n.b,i))}function Ixe(e,n,i){var u,f,g,y;for(y=ia(e.f,n,0),g=new r6,g.b=i,u=new jn(e.f,y);u.b<u.d.Y();)f=(_t(u.b<u.d.Y()),v(u.d.sb(u.c=u.b++),9)),f.k=i,Ke(g.f,f),Jo(u);return g}function Lxe(e,n){Gh();var i,u,f;if(n.V())return!1;if(Ze(n,207))for(f=v(n,207),u=f.bb().mb();u.G();)i=v(u.H(),83),e.Bb(i.Zb(),i.Yb());else Ek(e,n.mb());return!0}function vd(){vd=s,zv=new _1("DEFAULT_MINIMUM_SIZE",0),hE=new _1("MINIMUM_SIZE_ACCOUNTS_FOR_INSETS",1),fE=new _1("COMPUTE_INSETS",2),lE=new _1("APPLY_ADDITIONAL_INSETS",3)}function Iee(e){var n,i,u,f;for(i=e.a.b+2,f=Ie(rn,nn,10,i,0,1),f[0]=vo(ra(e.c)),u=xn(e.a,0);u.b!=u.d.c;)n=v(fn(u),10),f[u.a]=new kt(n.a,n.b);return f[i-1]=vo(ra(e.d)),f}function o7(e,n,i){var u,f,g;for(f=e.bb().mb();f.G();)if(u=v(f.H(),21),g=u.yb(),ut(n)===ut(g)||n!=null&&es(n,g))return i&&(u=new M1(u.yb(),u.zb()),f.I()),u;return null}function Oxe(e,n,i){var u,f;return u=e.a[n.d.k][n.k],f=e.a[i.d.k][i.k],u.a!=null&&f.a!=null?GQ(u.a,f.a):u.a!=null?-1:f.a!=null?1:0}function Rxe(e,n,i){var u,f,g;return f=n.c,g=n.d,u=i,Rn(e.a,n)?(oee(e,f)&&(u=!0),oee(e,g)&&(u=!0),u&&(zr(n.c.e,n),zr(n.d.b,n),Rn(e.d,n)),Sxe(e,n),!0):!1}function Vf(e,n,i){var u,f;return f=qX(e,n),f==e.c?aj(e,VA(e,n)):i?($ee(e,n,e.c-f),aj(e,VA(e,n))):(u=new aee(e),$ee(u,n,e.c-f),aj(u,VA(u,n)))}function Dxe(){function e(){try{return new Map().entries().next().done}catch{return!1}}return typeof Map===Yne&&Map.prototype.entries&&e()?Map:DCe()}function oo(e,n){var i;return i=v(pn(e.b,n),19),!i&&(i=e.Z()),Ze(i,137)?new nj(e,n,v(i,137)):Ze(i,18)?new tj(e,n,v(i,18)):Ze(i,20)?Qj(e,n,v(i,20),null):new Yb(e,n,i,null)}function Qu(e){switch(qs(e.e)-qs(e.g)){case-2:return aK(e.g)>0&&(e.g=Hee(e.g)),Gee(e);case 2:return aK(e.e)<0&&(e.e=Gee(e.e)),Hee(e);default:return e.d=1+mi(qs(e.e),qs(e.g)),e}}function Lee(e,n){this.f=(Wn(),new an),this.b=new an,this.j=new an,this.a=e,this.c=n,this.c>0&&ote(this,this.c-1,(Be(),ot)),this.c<this.a.length-1&&ote(this,this.c+1,(Be(),lt))}function Bxe(e){var n;e.c==null&&(n=ut(e.b)===ut(sm)?null:e.b,e.d=n==null?ku:LQ(n)?l1e(tW(n)):Qo(n)?"String":y1(Bp(n)),e.a=e.a+": "+(LQ(n)?k1e(tW(n)):n+""),e.c="("+e.d+") "+e.a)}function Gxe(e){var n,i,u,f;for(i=new V(e.a.c);i.a<i.c.c.length;)for(n=v($(i),9),f=xn(Ba(n.c),0);f.b!=f.d.c;)u=v(fn(f),33),X(u,(Ce(),Ct))==null&&zr(n.c,u);return null}function Bl(e,n){var i,u,f,g,y;for(y=new Ve,u=v(od(af,e),20).mb();u.G();)i=v(u.H(),75),$n(y,i.b);for(Fy(y),xk(y,e.a),g=new V(y);g.a<g.c.c.length;)f=v($(g),7),Uu(n,f)}function Hxe(e){for(var n,i,u,f;e.o.a.c.length!=0;)i=v(kX(e.o),27),u=v(i.a,61),n=v(i.b,89),f=Fk(n,u),n.d==u?(Nc(f.g,n),u.e=f.e+n.a):(Nc(f.c,n),u.e=f.e-n.a),Ke(e.e.a,u)}function Oee(e,n,i){var u,f,g;return ji(i,"count"),Ib(e.b,n)?(g=e.c.a,g?(f=Ie(pr,hr,26,1,12,1),u=O7(g,e.d,n,i,f),X1(e.c,g,u),f[0]):(i>0&&Yy(e,n,i),0)):(Qh(i==0),0)}function Ree(e,n){var i,u,f,g,y;for(f=v(X(n,(Ce(),ca)),15).a*v(X(n,(tn(),Au)),15).a,y=e[0].i.a+e[0].j.a,g=1;g<e.length;g++)i=e[g].i,u=e[g].j,i.a<=y+f&&(i.a=y+f),y=i.a+u.a}function s7(){s7=s;var e,n,i,u;for(rO=Ie(Ea,Ui,26,25,12,1),iO=Ie(Ea,Ui,26,33,12,1),u=152587890625e-16,n=32;n>=0;n--)iO[n]=u,u*=.5;for(i=1,e=24;e>=0;e--)rO[e]=i,i*=.5}function Dee(e){for(;e.g.c!=0&&e.d.c!=0;)Mx(e.g).c>Mx(e.d).c?(e.i+=e.g.c,qk(e.d)):Mx(e.d).c>Mx(e.g).c?(e.e+=e.d.c,qk(e.g)):(e.i+=kQ(e.g),e.e+=kQ(e.d),qk(e.g),qk(e.d))}function zxe(e){if(!e)throw new F2("An element is null. The origin of an edge could not be determined, this might be due to an inconsistency within the internal element mappings.")}function Fxe(e,n){var i,u;return Go(e.i),Go(e.a),Go(e.k),Go(e.j),Go(e.b),Go(e.n),Go(e.f),Go(e.e),e.d&&(u=Qn(e.d,cL.b),u&&u.ic()&&(e.c=u.ic().a)),i=Ine(e,n,null),rne(e,n),i}function Uxe(e){var n,i,u,f,g,y;for(u=ene(y_(e)),n=ks,g=0,f=0;n>.5&&g<50;)f=Lte(u),i=Vf(u,f,!0),n=wi(i.b),++g;return y=Wt(Up(Ba(e.g),Ba(e.g).b-1)),Vf(e,(Tr(y),y-f),!1)}function Yxe(e){var n,i,u,f,g,y;for(u=ene(y_(e)),n=ks,g=0,f=0;n>.5&&g<50;)f=Ite(u),i=Vf(u,f,!0),n=wi(i.a),++g;return y=Wt(Up(Ba(e.g),Ba(e.g).b-1)),Vf(e,(Tr(y),y-f),!1)}function Dc(e){var n,i,u,f;for(f=new xp("["),n=!1,u=e.mb();u.G();)i=u.H(),n?f.a+=", ":n=!0,Ro(f,i===e?"(this Collection)":(Vn(),i==null?ku:za(i)));return f.a+="]",f.a}function Bee(e){var n,i,u,f;for(f=new xp("{"),n=!1,u=e.bb().mb();u.G();)i=v(u.H(),21),n?f.a+=", ":n=!0,Ro(f,OW(e,i.yb())),f.a+="=",Ro(f,OW(e,i.zb()));return f.a+="}",f.a}function Gee(e){var n;return j1(!!e.g),n=e.g,e.g=n.e,n.e=e,n.j=e.j,n.a=e.a,e.a=1+H2(e.e)+H2(e.g),e.j=Ur(Ur(e.c,z2(e.e)),z2(e.g)),e.d=1+mi(qs(e.e),qs(e.g)),n.d=1+mi(qs(n.e),qs(n.g)),n}function Hee(e){var n;return j1(!!e.e),n=e.e,e.e=n.g,n.g=e,n.j=e.j,n.a=e.a,e.a=1+H2(e.e)+H2(e.g),e.j=Ur(Ur(e.c,z2(e.e)),z2(e.g)),e.d=1+mi(qs(e.e),qs(e.g)),n.d=1+mi(qs(n.e),qs(n.g)),n}function Vxe(e){var n;wl(new V(Rc(e.e)))&&(n=v(xr(e.e,(Ye(),St)),28),n==(tr(),ki)?b_e(e.e):n==Ps?hCe(e.e):Yt(Re(Zt(xr(e.e,jv))))||e.e.e.j.a==0&&e.e.e.j.b==0?o_e(e.e):aCe(e))}function u7(e,n,i){var u,f,g;if(f=new V(e),f.a<f.c.c.length){for(g=v($(f),33),u=bne(g,n,i);f.a<f.c.c.length;)g=v($(f),33),bA(u,bne(g,n,i));return new Ub(u)}else return null}function qxe(e,n){var i,u,f,g,y,x;for(f=0,u=new V(n.c);u.a<u.c.c.length;)for(i=v($(u),16),y=new V(i.a);y.a<y.c.c.length;)g=v($(y),9),x=g.j.a+g.e.c+g.e.b+e.b,f=f>x?f:x;return f}function Zxe(e,n){Rp();var i;if(e.c==n.c){if(e.b==n.b||fwe(e.b,n.b)){if(i=V0e(e.b)?1:-1,e.a&&!n.a)return i;if(!e.a&&n.a)return-i}return dK(e.b.e,n.b.e)}else return Lr(e.c,n.c)}function zee(e){var n,i;switch(i=vo(Mn(be(ve(rn,1),nn,10,0,[e.f.i,e.i,e.a]))),n=e.f.e,e.g.e){case 1:i.b-=n.d;break;case 2:i.a+=n.c;break;case 3:i.b+=n.a;break;case 4:i.a-=n.b}return i}function $xe(e,n){var i;return i=0,n.g==(gt(),wr)?(nA(n).f!=e.a&&(z$(e,nA(n).f),e.e=!0),e.e?++e.g:i+=e.f):n.g==An?e.e?i+=e.g:++e.f:n.g==nr&&(z$(e,n),e.e=!1),i}function Kxe(e,n,i,u,f){var g,y,x,_;for(_=null,x=new V(u);x.a<x.c.c.length;)if(y=v($(x),187),y!=i&&ia(y.e,f,0)!=-1){_=y;break}g=hk(f),er(g,i.b),Fn(g,_.b),jt(e.a,f,new Y1(g,n,i.f))}function Qxe(e){switch(v(X(e,(tn(),Dr)),85).e){case 1:_e(e,Dr,(ba(),vg));break;case 2:_e(e,Dr,(ba(),sc));break;case 3:_e(e,Dr,(ba(),Xv));break;case 4:_e(e,Dr,(ba(),el))}}function Fee(e,n,i){var u,f,g,y;if(e)for(f=(g=QJ(e,Ie(F_,qr,2,0,5,1)),new Bh(new Oo(new k$(e,g).b)));f.b<f.d.Y();)u=(_t(f.b<f.d.Y()),td(f.d.sb(f.c=f.b++))),y=Qn(e,u),p3e(n,u,y,i)}function Wxe(e,n,i){var u,f,g,y,x,_;for(f=1;f<e;)f*=2;for(_=2*f-1,f-=1,x=Ie(pr,hr,26,_,12,1),u=0,y=0;y<n;y++)for(g=i[y]+f,++x[g];g>0;)g%2>0&&(u+=x[g+1]),g=(g-1)/2|0,++x[g];return u}function qp(e,n,i){var u,f,g,y;if(e.e=n,i)for(f=(y=new hn(e.a.a).a.bb().mb(),new yn(y));f.a.G();)u=(g=v(f.a.H(),21),v(g.yb(),12)),_e(u,(Ce(),Jv),e.e),en(u.c,n.a),en(u.d,n.b)}function Zp(){Zp=s,Zv=new Np(Xp,0),o9=new Np(Wp,1),c9=new Np(Jp,2),u9=new Np("LEFT_RIGHT_CONSTRAINT_LOCKING",3),s9=new Np("LEFT_RIGHT_CONNECTION_LOCKING",4),a9=new Np("EDGE_LENGTH",5)}function c7(e,n,i,u){var f;this.b=u,this.e=e.a,f=n[i],this.d=Ux(r0,[qr,_v],[227,26],13,[f.length,f.length],2),this.a=Ux(pr,[qr,hr],[52,26],12,[f.length,f.length],2),this.c=new Lee(n,i)}function Jxe(e,n,i,u){var f,g;for(g=n,f=g.d==null||e.a.$b(i.d,g.d)>0?1:0;g.a[f]!=i;)g=g.a[f],f=e.a.$b(i.d,g.d)>0?1:0;g.a[f]=u,u.b=i.b,u.a[0]=i.a[0],u.a[1]=i.a[1],i.a[0]=null,i.a[1]=null}function Xxe(e,n,i){var u,f,g,y;if($t(i,hre,1),Mne(e.d,n),y=ZEe(e.a,n),y.Y()==1)z7(v(y.sb(0),55),i);else for(g=1/y.Y(),f=y.mb();f.G();)u=v(f.H(),55),z7(u,zf(i,g));p0e(e.a,y,n),cne(n),zt(i)}function Uee(e,n,i){var u,f,g,y,x;for(x=new _l(n,i),y=zl(x);y.G();)for(g=v(y.H(),7),f=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[g.b,g.e]))))));Ft(f);)u=v(Ot(f),12),Il(u)||ake(e,n,g,u)}function Yee(e,n){var i,u,f;for(f=mr(e,n),u=f.mb();u.G();)if(i=v(u.H(),7),X(i,(Ce(),lu))!=null||Ft(Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[i.b,i.e]))))))))return!0;return!1}function t_(e){var n,i;if(Hb(e))throw new Pn(Pre);for(i=xn(e,0);i.b!=i.d.c;)n=v(fn(i),10),this.d=mn(this.d,n.b),this.c=et(this.c,n.a),this.a=et(this.a,n.b),this.b=mn(this.b,n.a)}function eke(e,n,i){if(n<0||i<0)throw new Pn("The highx must be bigger then lowx and the highy must be bigger then lowy");return e.a<0?e.a=0:e.a>n&&(e.a=n),e.b<0?e.b=0:e.b>i&&(e.b=i),e}function mr(e,n){switch(n.e){case 1:return Wo(e.f,(Ha(),wE));case 2:return Wo(e.f,(Ha(),mE));case 3:return Wo(e.f,(Ha(),xE));case 4:return Wo(e.f,(Ha(),kE));default:return wn(),wn(),tl}}function tke(e){var n,i,u,f;for(f=(ar(),new hs(ds($s(e.a,new w))));Ft(f);)for(u=v(Ot(f),9),u.g==(gt(),Po)&&_e(u,(Ce(),Fo),(ga(),Nu)),i=Vt(Un(u));Ft(i);)n=v(Ot(i),12),h_(n,(ga(),Nu))}function nke(e){var n,i,u,f;for(f=(ar(),new hs(ds($s(e.a,new w))));Ft(f);)for(u=v(Ot(f),9),u.g==(gt(),Po)&&_e(u,(Ce(),Fo),(ga(),Ts)),i=Vt(Un(u));Ft(i);)n=v(Ot(i),12),h_(n,(ga(),Ts))}function n_(e,n){switch(this.b=new ai,e){case 0:this.d=new Qq(this);break;case 1:this.d=new $q(this);break;case 2:this.d=new Kq(this);break;default:throw new vp}this.c=n,this.a=.2*n}function Vee(e){var n,i,u,f;if(!e.b)for(e.b=new Ve,i=new V(e.a.c);i.a<i.c.c.length;)for(n=v($(i),16),f=new V(n.a);f.a<f.c.c.length;)u=v($(f),9),Ke(e.b,new P$(u,e.c));return e.b}function rke(e,n){var i,u,f;i=T1e(n,e.e),u=v(pn(e.g.f,i),24).a,f=e.a.c.length-1,e.a.c.length!=0&&v(ct(e.a,f),128).c==u?(++v(ct(e.a,f),128).a,++v(ct(e.a,f),128).b):Ke(e.a,new DK(u))}function l7(e){Vn();var n,i;return e>=bv?(n=55296+(e-bv>>10&1023)&iu,i=56320+(e-bv&1023)&iu,String.fromCharCode(n)+(""+String.fromCharCode(i))):String.fromCharCode(e&iu)}function ike(e,n,i,u){var f,g,y;switch(f=ta(i),g=Gk(f),y=new ur,Tn(y,i),u.e){case 1:en(y,Rk(Ny(g)));break;case 2:en(y,Ny(g))}return _e(y,(Ce(),gg),v(X(n,gg),15)),_e(n,Ct,y),Nn(e.b,y,n),y}function ake(e,n,i,u){var f;Ke(e.c,new Rj(e,i,u,v(pn(e.k,i),24).a)),Xx(u)&&(n==e.e?u.d.f!=e.a&&u.c.f!=e.a:u.d.f!=e.e&&u.c.f!=e.e)&&(f=i==u.c?u.d:u.c,Ke(e.c,new Rj(e,f,u,v(pn(e.k,f),24).a)))}function qee(e,n){var i,u,f;if(n===e)return!0;if(!Ze(n,57)||(f=v(n,57),e.Y()!=f.Y()))return!1;for(u=f.bb().mb();u.G();)if(i=v(u.H(),21),!e._(i))return!1;return!0}function Zee(e,n){var i,u,f;return u=new ko(e),$u(u,n),_e(u,(Ce(),Gm),n),_e(u,(Ye(),St),(tr(),ki)),_e(u,zo,(xs(),dm)),bo(u,(gt(),Zn)),i=new ur,Tn(i,u),en(i,(Be(),lt)),f=new ur,Tn(f,u),en(f,ot),u}function f7(e,n){var i,u,f;for(f=Or,u=new V(Yf(n));u.a<u.c.c.length;)i=v($(u),89),i.e&&!e.c[i.b]&&(e.c[i.b]=!0,f=mc(f,f7(e,Fk(i,n))));return e.i[n.b]=e.j,e.g[n.b]=mc(f,e.j++),e.g[n.b]}function $ee(e,n,i){var u,f,g,y;if(y=e.g.tb(),e.e)for(f=0;f<e.c;f++)y.H();else for(f=0;f<e.c-1;f++)y.H();for(g=e.b.tb(),u=Re(Wt(y.H()));u-n<Kl;)u=Re(Wt(y.H())),g.H();y.M(),Yte(e,i,n,g,y)}function Kee(e,n){var i,u,f,g;for(u=0,f=e.length;u<f;u++){g=e[u];try{g[1]?g[0].bd()&&(n=U1e(n,g)):g[0].bd()}catch(y){if(y=hi(y),Ze(y,46))i=y,tye(Ze(i,164)?v(i,164).cc():i);else throw di(y)}}return n}function oke(e){var n,i,u;if(u=e.c.a,!u)return null;if(e.b.b){if(n=e.b.e,i=OA(e.c.a,e.d,n),!i)return null;e.b.d==(Ko(),Eo)&&e.d.$b(n,i.b)==0&&(i=i.i)}else i=e.a.i;return i==e.a||!Ib(e.b,i.b)?null:i}function ske(e,n){var i,u,f,g,y,x;for(g=0,u=new V(n.c);u.a<u.c.c.length;){for(i=v($(u),16),f=0,x=new V(i.a);x.a<x.c.c.length;)y=v($(x),9),f+=y.j.b+y.e.a+y.e.d+e.a;f-=e.a,g=g>f?g:f}return g}function uke(e){var n,i,u,f,g;for(g=Or,f=Or,u=new V(Yf(e));u.a<u.c.c.length;)i=v($(u),89),n=i.d.e-i.c.e,i.d==e&&n<f?f=n:n<g&&(g=n);return f==Or&&(f=-1),g==Or&&(g=-1),new Ar(Tt(f),Tt(g))}function Qee(e,n,i){var u,f,g,y,x;for(n.k=-1,x=tu(n,(Cr(),_i)).mb();x.G();)for(y=v(x.H(),7),f=new V(y.e);f.a<f.c.c.length;)u=v($(f),12),g=u.d.f,n!=g&&(g.k<0?i.ib(u):g.k>0&&Qee(e,g,i));n.k=0}function Wee(e,n){if(0>n)throw new Pn("Top must be smaller or equal to bottom.");if(0>e)throw new Pn("Left must be smaller or equal to right.");this.d=0,this.c=e,this.a=n,this.b=0}function r_(e){var n,i,u;if(e.length==0)throw new Pn(Pre);for(i=0,u=e.length;i<u;++i)n=e[i],this.d=mn(this.d,n.b),this.c=et(this.c,n.a),this.a=et(this.a,n.b),this.b=mn(this.b,n.a)}function cke(){return Vr(),be(ve(cae,1),Je,37,0,[zL,TL,XL,SL,PE,QL,SE,VL,EE,km,YL,UL,Cm,jL,_E,ME,AE,Em,BL,xm,$L,jE,Sm,ML,qL,KL,ZL,NE,OL,Rd,CE,DL,WL,FL,AL,cg,GL,Yv,PL,RL,IL,TE,Pm,_m,LL,IE,HL,NL,JL,wm])}function lke(e,n){var i,u,f,g,y,x,_,C,N;for(N=0,u=0,f=n.length;u<f;++u)for(i=n[u],y=0,x=i.length;y<x;++y)for(g=i[y],C=new V(g.f);C.a<C.c.c.length;)_=v($(C),7),_.k=N++;e.a=Ie(pr,hr,26,N,12,1)}function Jee(e){ar();var n,i,u;if(n=e.H(),!e.G())return n;for(u=new kp,u.a+="expected one element but was: <"+n,i=0;i<4&&e.G();i++)Ro(u,", "+e.H());throw e.G()&&(u.a+=", ..."),u.a+=">",new Pn(u.a)}function fke(e){var n,i,u,f,g;for(n=0,u=e.b,f=0,g=u.length;f<g;++f)i=u[f],n+=$xe(e,i),Gi(v(X(i,(Ye(),St)),28))&&(mr(i,(Be(),yt)).mb().G()&&(n+=Qte(e,i,yt)),mr(i,Et).mb().G()&&(n+=Qte(e,i,Et)));return n}function i_(e,n,i,u){var f,g,y,x,_;if(u.d.c+u.e.c==0)for(y=e.a[e.c],x=0,_=y.length;x<_;++x)g=y[x],Nn(u,g,new JJ(e,g,i));return f=v(Ti(Mi(u.d,n)),284),f.b=0,f.c=f.f,f.c==0||eZ(v(ct(f.a,f.b),128)),f}function Fy(e){var n;wn();var i,u,f,g,y,x;if(Ze(e,63))for(g=0,f=e.Y()-1;g<f;++g,--f)n=e.sb(g),e.wb(g,e.sb(f)),e.wb(f,n);else for(i=e.tb(),y=e.ub(e.Y());i.L()<y.N();)u=i.H(),x=y.M(),i.O(x),y.O(u)}function hke(e,n,i){return e<0||e>i?d7(e,i,"start index"):n<0||n>i?d7(n,i,"end index"):hv("end index (%s) must not be less than start index (%s)",be(ve(dt,1),tt,1,4,[Tt(n),Tt(e)]))}function h7(e){if(!("id"in e.a))throw new jb("Every graph element must specify an 'id' property.",e);if(!Qn(e,"id").lc())throw new jb("Invalid format for 'id'. Must be a string, was "+Qn(e,"id").$c,e)}function Gl(e,n){var i,u,f,g,y,x,_;for(_=e.b,u=v(od(af,e),20).mb();u.G();)for(i=v(u.H(),75),x=(g=new hn(i.c.a).a.bb().mb(),new yn(g));x.a.G();)y=(f=v(x.a.H(),21),v(f.yb(),7)),Uu(n,y),Vy(y,_)}function dke(e,n){var i,u,f;for(f=new V(n.e);f.a<f.c.c.length;)if(i=v($(f),12),i.d.f!=e.f)return!0;for(u=new V(n.b);u.a<u.c.c.length;)if(i=v($(u),12),i.c.f!=e.f)return!0;return!1}function a_(e){var n,i,u,f;for(iy(e.c),iy(e.b),iy(e.a),f=(i=new hn(e.e).a.bb().mb(),new yn(i));f.a.G();)u=(n=v(f.a.H(),21),v(n.yb(),60)),u.c!=2&&(Ai(e.a,u),u.c==0&&Ai(e.c,u)),Ai(e.b,u);e.d=!1}function Xee(e,n){var i;if(e===n)return!0;if(Ze(n,18)){i=v(n,18);try{return e.Y()==i.Y()&&e.lb(i)}catch(u){if(u=hi(u),Ze(u,76)||Ze(u,119))return!1;throw di(u)}}return!1}function Ta(e,n,i){var u,f,g,y;if(y=n==null?0:e.b.Vc(n),f=(u=x6(e.a,y),u??[]),f.length==0)_0e(e.a,y,f);else if(g=PX(e,n,f),g)return g.Ab(i);return yo(f,f.length,new M1(n,i)),++e.c,Ox(e.b),null}function d7(e,n,i){if(e<0)return hv($ne,be(ve(dt,1),tt,1,4,[i,Tt(e)]));if(n<0)throw new Pn(Kne+n);return hv("%s (%s) must not be greater than size (%s)",be(ve(dt,1),tt,1,4,[i,Tt(e),Tt(n)]))}function pke(e,n){if(e<0)return hv($ne,be(ve(dt,1),tt,1,4,["index",Tt(e)]));if(n<0)throw new Pn(Kne+n);return hv("%s (%s) must be less than size (%s)",be(ve(dt,1),tt,1,4,["index",Tt(e),Tt(n)]))}function ete(e){var n,i,u,f;for(f=Ie(Rr,qr,51,e.c.c.length,0,2),u=new jn(e.c,0);u.b<u.d.Y();)n=(_t(u.b<u.d.Y()),v(u.d.sb(u.c=u.b++),16)),i=u.b-1,f[i]=v(fr(n.a,Ie(Rr,oa,9,n.a.c.length,0,1)),51);return f}function $p(e,n,i,u,f){switch(this.c=f,this.d=n,this.a=i,f.e){case 4:this.b=wi(e.b);break;case 1:this.b=wi(e.d);break;case 2:this.b=wi(e.c-u.j.a);break;case 3:this.b=wi(e.a-u.j.b);break;default:this.b=0}}function tte(e,n,i,u,f){var g,y,x,_,C;if(n)for(x=n.mb();x.G();)for(y=v(x.H(),9),C=N7(y,(Cr(),_i),i).mb();C.G();)_=v(C.H(),7),g=v(Ti(Mi(f.d,_)),80),g||(g=new aX(e),u.c[u.c.length]=g,Hte(g,_,f))}function gke(e,n){var i,u,f;if(i=e.c,i.a.Y()>1)throw new Pn("In straight hyperEdges there may be only one edge.");_n((f=new hn(i.a).a.bb().mb(),u=v(new yn(f).a.H(),21),v(u.yb(),12)).a,new kt(n,e.b))}function nte(e,n,i){var u,f;if(this.f=e,u=v(pn(e.b,n),126),f=u?u.a:0,dk(i,f),i>=(f/2|0))for(this.e=u?u.c:null,this.d=f;i++<f;)_W(this);else for(this.c=u?u.b:null;i-- >0;)ck(this);this.b=n,this.a=null}function sv(e,n){(typeof document!==wv||t.exports)&&jC(e(n)),typeof document===wv&&typeof self!==wv&&self.postMessage(n)}function o_(e,n){var i,u,f,g;"x"in e.a&&(f=v(Qn(e,"x"),104),n.i.a=f.a),"y"in e.a&&(g=v(Qn(e,"y"),104),n.i.b=g.a),M_ in e.a&&(u=v(Qn(e,M_),104),n.j.a=u.a),j_ in e.a&&(i=v(Qn(e,j_),104),n.j.b=i.a)}function rte(e,n,i){var u,f;uJ(this),n==(Tl(),Tu)?Rn(this.g,e.c):Rn(this.o,e.c),i==Tu?Rn(this.g,e.d):Rn(this.o,e.d),Rn(this.c,e),u=ra(e.c).b,f=ra(e.d).b,fee(this,u,f,f),this.f=oye(ra(e.c).b,ra(e.d).b)}function bke(e){var n,i,u,f,g,y;for(y=new _l(e.d,e.e),g=zl(y);g.G();)for(f=v(g.H(),7),u=e.e==(Be(),lt)?f.b:f.e,i=new V(u);i.a<i.c.c.length;)n=v($(i),12),!Il(n)&&n.c.f.d!=n.d.f.d&&(rke(e,n),++e.f,++e.c)}function uv(e,n,i){var u,f,g,y,x;for(y=(wn(),new Cf(v(ct(n.a,i),18))),x=new aa(y.b.Y()),f=new gp(y.b.mb());f.b.G();)u=v(f.b.H(),37),g=v(pn(e.a,u),31),g||(g=o3e(u),Nn(e.a,u,g)),x.c[x.c.length]=g;return x}function vke(e,n){var i,u,f,g;for(u=new jn(e.f.c,0);u.b<u.d.Y();)for(i=(_t(u.b<u.d.Y()),v(u.d.sb(u.c=u.b++),16)),g=n[u.b-1],f=new jn(i.a,0);f.b<f.d.Y();)_t(f.b<f.d.Y()),f.d.sb(f.c=f.b++),cj(f,g[f.b-1])}function ite(e){var n,i;if(Zs(v(X(e,(Ye(),St)),28)))for(i=new V(e.f);i.a<i.c.c.length;)n=v($(i),7),n.g==(Be(),Sr)&&_X(n);else{for(i=new V(e.f);i.a<i.c.c.length;)n=v($(i),7),_X(n);_e(e,St,(tr(),Dv))}}function p7(e,n,i,u,f,g){var y,x,_,C;if(y=u-i,y<7){C2e(n,i,u,g);return}if(_=i+f,x=u+f,C=_+(x-_>>1),p7(n,e,_,C,-f,g),p7(n,e,C,x,-f,g),g.$b(e[C-1],e[C])<=0){for(;i<u;)yo(n,i++,e[_++]);return}o2e(e,_,C,x,n,i,u,g)}function ate(e){if(!e)return wZ(),Vre;var n=e.valueOf?e.valueOf():e;if(n!==e){var i=q_[typeof n];return i?i(n):RA(typeof n)}else return e instanceof Array||e instanceof r.Array?new Pq(e):new I2(e)}function s_(e,n,i){var u,f;return u=i.c,f=i.d,e.g[u.b]<=e.i[n.b]&&e.i[n.b]<=e.i[u.b]&&e.g[f.b]<=e.i[n.b]&&e.i[n.b]<=e.i[f.b]?!(e.i[u.b]<e.i[f.b]):e.i[u.b]<e.i[f.b]}function ote(e,n,i){var u,f,g,y,x,_,C,N;for(C=0,f=e.a[n],g=0,y=f.length;g<y;++g){for(u=f[g],N=new _l(u,i),_=zl(N);_.G();)x=v(_.H(),7),Nn(e.f,x,Tt(C)),Gi(v(X(u,(Ye(),St)),28))&&++C;Gi(v(X(u,(Ye(),St)),28))||++C}}function yke(e,n,i){var u,f;if(Nt(n),i.G())for(f=v(i.H(),21),ml(n,D1(e.a,f.yb())),ml(n,e.b),ml(n,D1(e.a,f.zb()));i.G();)ml(n,e.a.c),u=v(i.H(),21),ml(n,D1(e.a,u.yb())),ml(n,e.b),ml(n,D1(e.a,u.zb()));return n}function u_(e,n){var i,u;return i=v(Af(e.b,n),19),i?(u=e.Z(),u.jb(i),e.c-=i.Y(),i.Q(),Ze(u,137)?(wn(),new J6(v(u,137))):Ze(u,18)?(wn(),new Cf(v(u,18))):Ze(u,20)?Fj(v(u,20)):(wn(),new lb(u))):e.$()}function ste(e,n){var i;n.d?n.d.b=n.b:e.a=n.b,n.b?n.b.d=n.d:e.e=n.d,!n.e&&!n.c?(i=v(Af(e.b,n.a),126),i.a=0,++e.c):(i=v(pn(e.b,n.a),126),--i.a,n.e?n.e.c=n.c:i.b=n.c,n.c?n.c.e=n.e:i.c=n.e),--e.d}function g7(e,n,i){switch(i.e){case 1:return new kt(n.a,mn(e.d.b,n.b));case 2:return new kt(et(e.c.a,n.a),n.b);case 3:return new kt(n.a,et(e.c.b,n.b));case 4:return new kt(mn(n.a,e.d.a),n.b)}return new kt(n.a,n.b)}function mke(e){var n,i,u,f;for(n=0,u=(Vn(),e.length),f=u-4,i=0;i<f;)n=e.charCodeAt(i+3)+31*(e.charCodeAt(i+2)+31*(e.charCodeAt(i+1)+31*(e.charCodeAt(i)+31*n))),n=n|0,i+=4;for(;i<u;)n=n*31+cQ(e,i++);return n=n|0,n}function ute(e,n){var i,u,f;for(this.a=e,this.c=n,this.b=Ie(Gae,qr,673,e.length,0,2),i=0;i<e.length;++i)for(f=e[i].length,this.b[i]=Ie(Gae,{673:1,3:1,5:1,6:1},102,f,0,1),u=0;u<f;++u)this.b[i][u]=new iW(this,e[i][u].c)}function Uy(e,n,i,u,f,g,y){var x;this.a=v(Nt(e),56),this.b=n,this.c=f,this.e=i,this.d=v(Nt(u),159),this.g=g,this.f=v(Nt(y),159),n&&e.$b(i,i),f&&e.$b(g,g),n&&f&&(x=e.$b(i,g),Xwe(x<=0,i,g),x==0&&Qh(u!=(Ko(),Eo)|y!=Eo))}function cte(e){if(this.a=e,e.c.f.g==(gt(),Zn))this.c=e.c,this.d=v(X(e.c.f,(Ce(),ni)),32);else if(e.d.f.g==Zn)this.c=e.d,this.d=v(X(e.d.f,(Ce(),ni)),32);else throw new Pn("Edge "+e+" is not an external edge.")}function lte(){lte=s,eoe=no(new Jn,(Vr(),OL)),y9=zi(new Jn,xm),noe=Hi(zi(new Jn,Sm),Pm),Xae=Hi(no(zi(new Jn,jL),AL),IL),roe=zi(new Jn,$L),toe=Hi(new Jn,RL),Wae=Hi(no(zi(K1(new Jn,km),Em),Rd),_m),Jae=Hi(no(new Jn,Rd),wm)}function Yy(e,n,i){var u,f,g,y;return ji(i,fI),i==0?Gy(e,n):(Qh(Ib(e.b,n)),y=e.c.a,y?(g=Ie(pr,hr,26,1,12,1),u=A7(y,e.d,n,i,g),X1(e.c,y,u),g[0]):(e.d.$b(n,n),f=new _y(n,i),rj(e.a,f,e.a),X1(e.c,null,f),0))}function fte(e,n,i){var u,f,g,y,x,_;for(u=0,_=i,n||(u=i*(e.c.length-1),_*=-1),g=new V(e);g.a<g.c.c.length;){for(f=v($(g),9),_e(f,(Ye(),zo),(xs(),dm)),f.j.a=u,x=mr(f,(Be(),ot)).mb();x.G();)y=v(x.H(),7),y.i.a=u;u+=_}}function jt(e,n,i){var u;if(u=v(pn(e.b,n),19),u)return u.ib(i)?(++e.c,!0):!1;if(u=e.Z(),u.ib(i))return++e.c,Nn(e.b,n,u),!0;throw new mk("New Collection violated the Collection spec")}function c_(e,n,i){var u,f,g;for(Jke(e,n,i),g=new Ve,f=new V(e.b.a.b);f.a<f.c.c.length;)u=v($(f),25),n.D(u)&&(Ke(g,new P6(u,!0)),Ke(g,new P6(u,!1)));cxe(e.d),Fb(g,e.c,new Oo(be(ve(Uv,1),tt,160,0,[e.d]))),$ke(e,n,i)}function hte(e,n){var i,u,f,g,y;for(e.c[n.k]=!0,Ke(e.a,n),y=new V(n.f);y.a<y.c.c.length;)for(g=v($(y),7),u=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[g.b,g.e]))))));Ft(u);)i=v(Ot(u),12),f=A2e(g,i).f,e.c[f.k]||hte(e,f)}function b7(e,n,i,u){var f,g,y;if("labels"in n.a){if(y=Qn(n,"labels"),!y.hc())throw new Ks("The 'labels' property of a node must be an array.",y,n);for(g=y.hc(),f=0;f<g.a.length;++f)Ze(Tc(g,f),69)&&UEe(e,v(Tc(g,f),69),i,u)}}function dte(e,n,i){var u,f,g,y,x,_;g=v(ct(n.b,0),12).c,u=g.f,f=u.g,_=v(ct(i.e,0),12).d,y=_.f,x=y.g,f==(gt(),An)?_e(e,(Ce(),ua),v(X(u,ua),7)):_e(e,(Ce(),ua),g),x==An?_e(e,(Ce(),Zi),v(X(y,Zi),7)):_e(e,(Ce(),Zi),_)}function Wu(){Wu=s,ma=new yl("H_LEFT",0),Co=new yl("H_CENTER",1),xa=new yl("H_RIGHT",2),Va=new yl("V_TOP",3),Ya=new yl("V_CENTER",4),Ua=new yl("V_BOTTOM",5),qi=new yl("INSIDE",6),ka=new yl("OUTSIDE",7),wa=new yl("H_PRIORITY",8)}function v7(e){Vx();var n,i,u;for(this.b=Jie,this.c=eae,this.d=(sr(),rs),this.g=(xZ(),Wie),this.a=e,Y2(this,new I),$y(this),u=new V(e.b);u.a<u.c.c.length;)i=v($(u),25),i.f||(n=new Ay(be(ve(mm,1),tt,25,0,[i])),Ke(e.a,n))}function y7(e,n){var i,u,f,g;for(f=1,n.j=!0,u=new V(Yf(n));u.a<u.c.c.length;)i=v($(u),89),e.c[i.b]||(e.c[i.b]=!0,g=Fk(i,n),i.e?f+=y7(e,g):!g.j&&i.a==i.d.e-i.c.e&&(i.e=!0,Rn(e.p,i),f+=y7(e,g)));return f}function l_(e){var n,i,u,f,g,y,x,_;for(f=Vi,u=ti,i=new V(e.e.c);i.a<i.c.c.length;)for(n=v($(i),16),y=new V(n.a);y.a<y.c.c.length;)g=v($(y),9),_=Re(e.n[g.k]),x=_+Re(e.b[e.f[g.k].k]),f=f<_?f:_,u=u>x?u:x;return u-f}function pte(e){var n;return n=new Ef,io(n,"type",new Cl((Mf(Zie),Zie.n))),io(n,S_,new Cl(e.f)),e.b&&io(n,"value",e.b),e.a&&io(n,"context",e.a),io(n,cre,new Cl(Z6(new g1(`
|
|
361
|
+
`),new Bh(new Oo((e.g==null&&(e.g=mj(e)),e.g)))))),n}function wke(e,n){return e.c<n.c?-1:e.c>n.c?1:e.b<n.b?-1:e.b>n.b?1:e.a!=n.a?e.a.b-n.a.b:e.d==0&&n.d==1?-1:e.d==1&&n.d==0?1:0}function gte(e,n){var i,u,f,g,y;if(n===e)return!0;if(!Ze(n,20)||(y=v(n,20),e.Y()!=y.Y()))return!1;for(g=y.mb(),u=e.mb();u.G();)if(i=u.H(),f=g.H(),!(ut(i)===ut(f)||i!=null&&es(i,f)))return!1;return!0}function bte(e){!DI&&(DI=$Ce());var n=e.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(i){return Yye(i)});return'"'+n+'"'}function vte(e,n){var i,u,f,g,y,x,_;for(f=n==1?vE:bE,u=(y=new hn(f.a).a.bb().mb(),new yn(y));u.a.G();)for(i=(g=v(u.a.H(),21),v(g.yb(),59)),_=v(oo(e.f.c,i),18).mb();_.G();)x=v(_.H(),27),zr(e.b.b,x.b),zr(e.b.a,v(x.b,25).f)}function yte(e,n,i){var u,f,g,y;if($t(i,"Recursive layout",2),n.b.c.length!=0){for(y=1/n.b.c.length,g=new V(n.b);g.a<g.c.c.length;)f=v($(g),9),u=v(X(f,(Ce(),uf)),55),u&&(yte(e,u,zf(i,y)),sEe(f,u));Mne(e.d,n),z7(n,i)}cne(n),zt(i)}function m7(e,n){Jj.call(this),this.d=new ai,this.b=v(X(n,(Ce(),ca)),15).a*v(X(n,(tn(),Au)),15).a,this.e=this.b*v(X(n,yg),15).a,this.a=new Xi,this.c=new Xi,this.j=new mo(e.j,e.k,0,e.n-e.k),this.o=e.g,this.g.a=e.i,yne(this,e)}function f_(e,n){var i,u,f,g,y;for(g=n==null?0:e.b.Vc(n),u=(i=x6(e.a,g),i??[]),y=0;y<u.length;y++)if(f=u[y],e.b.Uc(n,f.yb()))return u.length==1?(u.length=0,e.a[D_](g)):u.splice(y,1),--e.c,Ox(e.b),f.zb();return null}function xke(e,n,i){var u;u=null,n&&(u=n.e),Fp(e,new $h(n.i.a-u.b+i.a,n.i.b-u.d+i.b)),Fp(e,new $h(n.i.a-u.b+i.a,n.i.b+n.j.b+u.a+i.b)),Fp(e,new $h(n.i.a+n.j.a+u.c+i.a,n.i.b-u.d+i.b)),Fp(e,new $h(n.i.a+n.j.a+u.c+i.a,n.i.b+n.j.b+u.a+i.b))}function Vy(e,n){switch(n.e){case 2:en(e,(Be(),ot)),e.a.a=e.j.a,e.a.b=e.j.b/2;break;case 4:en(e,(Be(),lt)),e.a.a=0,e.a.b=e.j.b/2;break;case 1:en(e,(Be(),yt)),e.a.a=e.j.a/2,e.a.b=0;break;case 3:en(e,(Be(),Et)),e.a.a=e.j.a/2,e.a.b=e.j.b}}function kke(e,n){Gh();var i,u,f;if(n===e)return!0;if(Ze(n,207)){if(f=v(n,207),e.Y()!=f.Y()||id(e).Y()!=f.bb().Y())return!1;for(u=f.bb().mb();u.G();)if(i=v(u.H(),83),e.Cb(i.Zb())!=i.Yb())return!1;return!0}return!1}function qf(e,n){var i,u,f,g,y,x;return g=e.a*B_+e.b*1502,x=e.b*B_+11,i=Math.floor(x*O_),g+=i,x-=i*CI,g%=CI,e.a=g,e.b=x,n<=24?H6(e.a*rO[n]):(f=e.a*(1<<n-24),y=H6(e.b*iO[n]),u=f+y,u>=2147483648&&(u-=4294967296),u)}function w7(e,n,i){var u,f,g;if(n!=i){u=n;do On(e,u.d),g=v(X(u,(Ce(),cf)),9),g&&(f=u.a,Da(e,f.b,f.d),On(e,g.i),u=ta(g));while(g);u=i;do Fu(e,u.d),g=v(X(u,(Ce(),cf)),9),g&&(f=u.a,p1e(e,f.b,f.d),Fu(e,g.i),u=ta(g));while(g)}}function _ke(e,n){var i,u,f,g,y,x;for(i=new Ve,x=new I6,f=(y=new hn(e.a).a.bb().mb(),new yn(y));f.a.G();)u=(g=v(f.a.H(),21),v(g.yb(),12)),b_(x,u.c,u,null),b_(x,u.d,u,null);for(;x.a;)Ke(i,rEe(x,n,Gi(v(X(n,(Ye(),St)),28))));return i}function Eke(e,n){var i,u,f,g,y;for(g=new V(e.e.a);g.a<g.c.c.length;)if(f=v($(g),61),f.c.c.length==f.g.c.length){for(u=f.e,y=uke(f),i=f.e-v(y.a,24).a+1;i<f.e+v(y.b,24).a;i++)n[i]<n[u]&&(u=i);n[u]<n[f.e]&&(--n[f.e],++n[u],f.e=u)}}function mte(e,n){var i,u,f,g,y,x,_;for(f=n==1?vE:bE,u=(y=new hn(f.a).a.bb().mb(),new yn(y));u.a.G();)for(i=(g=v(u.a.H(),21),v(g.yb(),59)),_=v(oo(e.f.c,i),18).mb();_.G();)x=v(_.H(),27),Ke(e.b.b,v(x.b,25)),Ke(e.b.a,v(x.b,25).f)}function wte(e){Bx();var n,i,u,f,g,y,x;for(i=(Wn(),new Dp),f=new V(e.e.c);f.a<f.c.c.length;)for(u=v($(f),16),y=new V(u.a);y.a<y.c.c.length;)g=v($(y),9),x=e.f[g.k],n=v(wk(i,x),20),n||(n=new Ve,tv(i,x,n)),n.ib(g);return i}function Cke(e,n){var i,u,f,g;for(u=new V(e.a.a);u.a<u.c.c.length;)i=v($(u),78),i.i=!0;for(g=new V(e.a.b);g.a<g.c.c.length;)f=v($(g),25),f.p=Yt(Re(Zt(e.f.B(new Ar(f,n))))),f.f.i=f.f.i&Yt(Re(Zt(e.f.B(new Ar(f,n)))));return e}function xte(e,n){var i,u,f,g;for(f=Ba(Un(n)),u=xn(f,0);u.b!=u.d.c;)return i=v(fn(u),12),g=i.d.f,g.g==(gt(),sa)&&!(Yt(Re(Zt(X(g,(Ce(),Xc)))))&&X(g,Ct)!=null)?(zr(g.d.a,g),Tn(i.c,null),Tn(i.d,null),xte(e,g)):n;return n}function Pke(e,n){var i,u,f,g,y,x,_;if(!n.e)throw new Pn("The input edge is not a tree edge.");for(g=null,f=Or,u=new V(e.d);u.a<u.c.c.length;)i=v($(u),89),x=i.c,_=i.d,s_(e,x,n)&&!s_(e,_,n)&&(y=_.e-x.e-i.a,y<f&&(f=y,g=i));return g}function kte(e,n){var i,u,f,g,y;return g=n.a,g.c.f==n.b?y=g.d:y=g.c,g.c.f==n.b?u=g.c:u=g.d,f=I2e(e.a,y,u),f>0&&f<ks?(i=Dke(e.a,u.f,f),OJ(e.a,u.f,-i),i>0):f<0&&-f<ks?(i=Bke(e.a,u.f,-f),OJ(e.a,u.f,i),i>0):!1}function Ske(e,n,i,u,f){var g,y;KJ(Mn(be(ve(rn,1),nn,10,0,[f.f.i,f.i,f.a])),i)||(n.c==f?G1(n.a,0,new lr(i)):_n(n.a,new lr(i)),u&&!vl(e.a,i)&&(y=v(X(n,(Ye(),dr)),44),y||(y=new Xi,_e(n,dr,y)),g=new lr(i),Ir(y,g,y.c.b,y.c),Rn(e.a,g)))}function _te(e){var n,i,u,f,g,y,x;for(n=0,u=new V(e.a);u.a<u.c.c.length;)for(i=v($(u),9),g=Vt(Un(i));Ft(g);)f=v(Ot(g),12),e==f.d.f.d&&f.c.g==(Be(),lt)&&(y=ra(f.c).b,x=ra(f.d).b,n=n>(x-y<=0?0-(x-y):x-y)?n:x-y<=0?0-(x-y):x-y);return n}function Nke(e,n){var i,u,f;if(ut(n)===ut(Nt(e)))return!0;if(!Ze(n,20)||(u=v(n,20),f=e.Y(),f!=u.Y()))return!1;if(Ze(u,63)){for(i=0;i<f;i++)if(!Rf(e.sb(i),u.sb(i)))return!1;return!0}else return uxe(e.mb(),u.mb())}function Ete(e,n){var i,u,f,g,y,x,_,C;if(f=e.b[n.k],f>=0)return f;for(g=1,x=new V(n.f);x.a<x.c.c.length;)for(y=v($(x),7),u=new V(y.e);u.a<u.c.c.length;)i=v($(u),12),C=i.d.f,n!=C&&(_=Ete(e,C),g=g>_+1?g:_+1);return _2e(e,n,g),g}function Cte(e,n,i){var u,f,g,y,x,_;if(u=0,e.b!=0&&n.b!=0){g=xn(e,0),y=xn(n,0),x=Re(Wt(fn(g))),_=Re(Wt(fn(y))),f=!0;do x>_-i&&x<_+i&&++u,x<=_&&g.b!=g.d.c?x=Re(Wt(fn(g))):_<=x&&y.b!=y.d.c?_=Re(Wt(fn(y))):f=!1;while(f)}return u}function Tke(e,n){switch(hA(e)){case 5:return Qo(n);case 6:return Xh(n);case 7:return ed(n);case 0:return Qk(n,e.__elementTypeId$);case 2:return Wx(n)&&n.ad!==a;case 1:return Wx(n)&&n.ad!==a||Qk(n,e.__elementTypeId$);default:return!0}}function Mke(e,n){var i,u,f,g,y;return n&=63,i=e.h,u=(i&524288)!=0,u&&(i|=-1048576),n<22?(y=i>>n,g=e.m>>n|i<<22-n,f=e.l>>n|e.m<<22-n):n<44?(y=u?Gc:0,g=i>>n-22,f=e.m>>n-22|i<<44-n):(y=u?Gc:0,g=u?_o:0,f=i>>n-44),Pc(f&_o,g&_o,y&Gc)}function Pte(e,n){switch(e.e){case 1:switch(n.e){case 1:return 1;case 4:return 2;case 3:return 3;case 2:return 4}break;case 2:switch(n.e){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4}break;default:throw new Pn(kI)}return 0}function jke(e,n,i){var u,f,g,y,x,_;u=new Ve,u.c[u.c.length]=n,_=n,x=0;do _=ICe(e,_),_&&(u.c[u.c.length]=_),++x;while(_);for(y=(i-(u.c.length-1)*e.d.d)/u.c.length,g=new V(u);g.a<g.c.c.length;)f=v($(g),9),f.j.a=y;return new Ar(Tt(x),y)}function Ake(e,n,i){var u,f,g,y,x,_;u=new Ve,u.c[u.c.length]=n,_=n,x=0;do _=mCe(e,_),_&&(u.c[u.c.length]=_),++x;while(_);for(y=(i-(u.c.length-1)*e.d.d)/u.c.length,g=new V(u);g.a<g.c.c.length;)f=v($(g),9),f.j.a=y;return new Ar(Tt(x),y)}function Ike(e){var n,i,u,f,g,y;for(f=v(ct(e.f,0),7),y=0,u=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[new dp(f),new Dh(f)]))))));Ft(u);)i=v(Ot(u),7),y+=i.f.i.a+i.i.a+i.a.a;n=v(X(e,(Ye(),Xu)),10),g=n?n.a:0,e.i.a=y/(f.b.c.length+f.e.c.length)-g}function Lke(e,n){var i,u,f,g;if(n<2*e.c)throw new Pn("The knot vector must have at least two time the dimension elements.");for(e.j=0,e.i=1,u=0;u<e.c;u++)e.g.ib(0);for(g=n+1-2*e.c,f=1;f<g;f++)e.g.ib(f/g);if(e.e)for(i=0;i<e.c;i++)e.g.ib(1)}function x7(e){var n,i;return i=e.c,e.c=0,EZ(e.f,e.i),e.e?e.g?e.e.d>=e.g.d?(n=e.f,n.e=qJ(e.e,n),n.g=e.g,n.a=e.a-1,n.j=Lc(e.j,i),Qu(n)):(n=e.i,n.g=ZJ(e.g,n),n.e=e.e,n.a=e.a-1,n.j=Lc(e.j,i),Qu(n)):e.e:e.g}function Oke(e){var n,i,u,f,g,y;for(f=new V(e.a);f.a<f.c.c.length;)u=v($(f),9),u.g==(gt(),wr)&&(g=v(X(u,(Ce(),sf)),9),i=u.f,n=(qn(0,i.c.length),v(i.c[0],7)),y=v(X(n,Ct),7),y.g==(Be(),yt)&&u.k>g.k?en(y,Et):y.g==Et&&g.k>u.k&&en(y,yt))}function Rke(e,n,i){var u,f,g,y,x,_,C;for(C=e.b,y=0,g=new V(e.a.b);g.a<g.c.c.length;)f=v($(g),33),y=et(y,f.j.a);return _=MCe(e.a.c,e.a.d,n,i,y),Na(e.a.a,Vk(_)),x=u7(e.a.b,_.a,C),u=new Ub((!_.k&&(_.k=new t_(Ck(_))),_.k)),Gj(u),x?Ij(u,x):u}function Dke(e,n,i){var u,f,g,y,x,_,C;u=i,f=n;do f=e.a[f.k],y=(C=e.f[f.k],Re(e.n[C.k])+Re(e.d[f.k])-f.e.d),x=Fme(f,f.d?ia(f.d.a,f,0):-1),x&&(g=(_=e.f[x.k],Re(e.n[_.k])+Re(e.d[x.k])+x.j.b+x.e.a),u=mn(u,y-(g+Ob(e.j,f,x))));while(n!=f);return u}function Bke(e,n,i){var u,f,g,y,x,_,C;u=i,f=n;do f=e.a[f.k],g=(C=e.f[f.k],Re(e.n[C.k])+Re(e.d[f.k])+f.j.b+f.e.a),x=vwe(f,f.d?ia(f.d.a,f,0):-1),x&&(y=(_=e.f[x.k],Re(e.n[_.k])+Re(e.d[x.k])-x.e.d),u=mn(u,y-(g+Ob(e.j,f,x))));while(n!=f);return u}function k7(e,n,i){var u,f,g;if(ji(i,fI),i==0)return Gy(e,n);g=e.c.a,f=Ie(pr,hr,26,1,12,1);try{if(!Ib(e.b,n)||!g)return 0;u=R7(g,e.d,n,i,f)}catch(y){if(y=hi(y),Ze(y,119)||Ze(y,76))return 0;throw di(y)}return X1(e.c,g,u),f[0]}function Gke(e,n){var i,u,f,g,y;return e.b?(u=v(xr(e.e,(Ye(),Tv)),65),f=u.b+u.c,i=u.d+u.a):(f=n*2,i=n*2),y=et(e.o[1]>0?f+e.i[1]*n+e.n[1]:0,e.o[3]>0?f+e.i[3]*n+e.n[3]:0),g=et(e.o[4]>0?i+e.i[4]*n+e.n[4]:0,e.o[2]>0?i+e.i[2]*n+e.n[2]:0),new kt(y,g)}function Ste(e){var n,i,u,f,g,y;for(y=v(fr(e.a,Ie(Rr,oa,9,e.a.c.length,0,1)),51),q6(y,new Rt),i=null,f=0,g=y.length;f<g&&(u=y[f],u.g==(gt(),Zn));++f)n=v(X(u,(Ce(),ni)),32),!(n!=(Be(),lt)&&n!=ot)&&(i&&v(X(i,Gd),20).ib(u),i=u)}function cv(e,n,i,u,f){var g,y,x,_;for(_=new _l(n,u),x=zl(_);x.G();)g=v(x.H(),7),Nn(e.k,g,Tt(v(pn(e.k,g),24).a+v(Ti(Mi(f.d,i)),24).a));for(_=new _l(i,u),y=zl(_);y.G();)g=v(y.H(),7),Nn(e.k,g,Tt(v(pn(e.k,g),24).a-v(Ti(Mi(f.d,n)),24).a))}function W(e,n,i){var u=om,f,g=u[e],y=g instanceof Array?g[0]:null;g&&!y?E=g:(E=(f=n&&n.prototype,!f&&(f=om[n]),Uye(f)),E._c=i,E.constructor=E,!n&&(E.ad=a),u[e]=E);for(var x=3;x<arguments.length;++x)arguments[x].prototype=E;y&&(E.$c=y)}function Hke(e){if(e.Sc()){var n=e.c;n.Tc()?e.n="["+n.k:n.Sc()?e.n="["+n.Qc():e.n="[L"+n.Qc()+";",e.b=n.Pc()+"[]",e.j=n.Rc()+"[]";return}var i=e.i,u=e.d;u=u.split("/"),e.n=$k(".",[i,$k("$",u)]),e.b=$k(".",[i,$k(".",u)]),e.j=u[u.length-1]}function _7(e,n,i){var u;if(!i)return 0;if(u=e.d.$b(e.b.g,i.b),u>0)return _7(e,n,i.g);if(u==0)switch(e.b.f.e){case 0:return Ur(n._b(i),n.ac(i.g));case 1:return n.ac(i.g);default:throw new XM}else return Ur(Ur(n.ac(i.g),n._b(i)),_7(e,n,i.e))}function E7(e,n,i){var u;if(!i)return 0;if(u=e.d.$b(e.b.e,i.b),u<0)return E7(e,n,i.e);if(u==0)switch(e.b.d.e){case 0:return Ur(n._b(i),n.ac(i.e));case 1:return n.ac(i.e);default:throw new XM}else return Ur(Ur(n.ac(i.e),n._b(i)),E7(e,n,i.g))}function Nte(e,n,i,u){var f,g,y,x;return y=new ko(e),bo(y,(gt(),An)),_e(y,(Ce(),Ct),n),_e(y,(Ye(),St),(tr(),ki)),_e(y,ua,i),_e(y,Zi,u),g=new ur,en(g,(Be(),lt)),Tn(g,y),x=new ur,en(x,ot),Tn(x,y),Fn(n,g),f=new Qs,$u(f,n),_e(f,dr,null),er(f,x),Fn(f,u),y}function Tte(e,n){var i,u,f,g,y,x,_,C,N,A;for(i=0,y=e.j,x=0,_=y.length;x<_;++x)for(g=y[x],A=new _l(g,n),N=zl(A);N.G();)for(C=v(N.H(),7),f=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[C.b,C.e]))))));Ft(f);)u=v(Ot(f),12),Il(u)||(i+=Ote(e,u,C));return i}function zke(e,n){return e.c<n.c?-1:e.c>n.c?1:e.b<n.b?-1:e.b>n.b?1:e.a!=n.a?Ec(e.a)-Ec(n.a):e.d==(dy(),Kv)&&n.d==$v?-1:e.d==$v&&n.d==Kv?1:0}function Fke(e){var n,i,u,f,g,y;for(f=new fi,u=new V(e.d.a);u.a<u.c.c.length;)i=v($(u),61),i.c.c.length==0&&Ir(f,i,f.c.b,f.c);if(f.b>1)for(n=Mb(m6(new bp,e.b++),e.d),y=xn(f,0);y.b!=y.d.c;)g=v(fn(y),61),yd(Yh(qh(Zh(Vh(new _f,1),0),n),g))}function Uke(e,n,i,u){var f,g,y,x,_,C;for(C=0,y=new V(e.a.b);y.a<y.c.c.length;)g=v($(y),33),C=et(C,g.j.a);return _=cCe(e.a.c,n,e.a.d,u,$A(e.b),i),Na(e.a.a,Vk(_)),x=u7(e.a.b,_.a,e.b),f=new Ub((!_.k&&(_.k=new t_(Ck(_))),_.k)),Gj(f),x?Ij(f,x):f}function h_(e,n){var i,u,f,g,y;for(u=new V(e.b);u.a<u.c.c.length;)i=v($(u),33),_e(i,(Ce(),Fo),n);for(y=new V(e.c.c);y.a<y.c.c.length;)f=v($(y),33),_e(f,(Ce(),Fo),n);for(g=new V(e.d.c);g.a<g.c.c.length;)f=v($(g),33),_e(f,(Ce(),Fo),n)}function Hl(){Hl=s,Nm=new Sf(Xp,0),Vv=new Sf("NIKOLOV",1),qv=new Sf("NIKOLOV_PIXEL",2),t9=new Sf("NIKOLOV_IMPROVED",3),n9=new Sf("NIKOLOV_IMPROVED_PIXEL",4),e9=new Sf("DUMMYNODE_PERCENTAGE",5),r9=new Sf("NODECOUNT_PERCENTAGE",6),Tm=new Sf("NO_BOUNDARY",7)}function Mte(e,n){var i,u,f,g,y;if(g=0,y=v(Ti(Mi(n.d,e)),24),!y)return 0;for(f=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[e.b,e.e]))))));Ft(f);)u=v(Ot(f),12),u.c==e?i=v(pn(n,u.d),24):i=v(pn(n,u.c),24),i&&y.a>i.a&&(g=mi(g,y.a-i.a-1));return g}function Yke(e){var n,i;switch(n=v(X(e,(Ye(),og)),15).a,i=v(X(e,sg),15).a,_e(e,sg,new dn(n)),_e(e,og,new dn(i)),v(X(e,zo),103).e){case 1:_e(e,zo,(xs(),bm));break;case 2:_e(e,zo,(xs(),hm));break;case 3:_e(e,zo,(xs(),pm));break;case 4:_e(e,zo,(xs(),gm))}}function Vke(e){var n,i,u,f,g;for(f=(ar(),new hs(ds($s(e.a,new w))));Ft(f);)for(u=v(Ot(f),9),u.g==(gt(),Po)&&(g=cee(u)?(ga(),Nu):(ga(),Ts),_e(u,(Ce(),Fo),g)),i=Vt(Un(u));Ft(i);)n=v(Ot(i),12),g=Yt(Re(Zt(X(n,(Ce(),ju)))))?(ga(),Ts):(ga(),Nu),h_(n,g)}function qke(e){var n,i,u,f,g;for(f=(ar(),new hs(ds($s(e.a,new w))));Ft(f);)for(u=v(Ot(f),9),u.g==(gt(),Po)&&(g=cee(u)?(ga(),Ts):(ga(),Nu),_e(u,(Ce(),Fo),g)),i=Vt(Un(u));Ft(i);)n=v(Ot(i),12),g=Yt(Re(Zt(X(n,(Ce(),ju)))))?(ga(),Nu):(ga(),Ts),h_(n,g)}function C7(e,n,i){var u,f,g;for(g=new V(e.e);g.a<g.c.c.length;)u=v($(g),118),u.b.d<0&&u.c>0&&(u.b.c-=u.c,u.b.c<=0&&u.b.f>0&&_n(n,u.b));for(f=new V(e.b);f.a<f.c.c.length;)u=v($(f),118),u.a.d<0&&u.c>0&&(u.a.f-=u.c,u.a.f<=0&&u.a.c>0&&_n(i,u.a))}function P7(e,n,i){var u,f,g;for(g=new V(e.j);g.a<g.c.c.length;)u=v($(g),117),u.b.i<0&&u.c>0&&(u.b.e-=u.c,u.b.e<=0&&u.b.k>0&&_n(n,u.b));for(f=new V(e.d);f.a<f.c.c.length;)u=v($(f),117),u.a.i<0&&u.c>0&&(u.a.k-=u.c,u.a.k<=0&&u.a.e>0&&_n(i,u.a))}function Zke(e){var n,i,u,f,g;switch(g=e.d.c+e.e.c,g){case 0:return mZ(),zre;case 1:return u=v(Jee(new Uf(new zu(e).a)),21),x1e(u.yb(),u.zb());default:for(f=(Wn(),new Dp),i=new Uf(new zu(e).a);i.b;)n=Hp(i),tv(f,Nt(n.yb()),Nt(n.zb()));return new p6(f)}}function $ke(e,n,i){var u,f,g;for(f=new V(e.b.a.b);f.a<f.c.c.length;)u=v($(f),25),n.D(u)&&(g=Re(Wt(i.B(u))),g>0&&(!(Pf(e.b.d)&&u.q.d)&&!(ex(e.b.d)&&u.q.b)&&(u.j.e+=0>g/2-.5?0:g/2-.5),!(Pf(e.b.d)&&u.q.a)&&!(ex(e.b.d)&&u.q.c)&&(u.j.b-=g-1)))}function Kke(e,n){switch(e.e){case 1:switch(n.e){case 1:return _I;case 4:return .5;case 3:return EI;case 2:return _re}break;case 2:switch(n.e){case 1:return _I;case 2:return .5;case 3:return EI;case 4:return _re}break;default:throw new Pn(kI)}return 0}function d_(e,n){var i,u,f,g;for(g=new jn(e,0),i=(_t(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),48));g.b<g.d.Y();)u=(_t(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),48)),f=new fj(u.c,i.d,n),_t(g.b>0),g.a.sb(g.c=--g.b),Uu(g,f),_t(g.b<g.d.Y()),g.d.sb(g.c=g.b++),f.a=!1,i=u}function jte(e){var n,i,u,f,g,y;for(f=v(X(e,(Ce(),Bm)),7),y=new V(e.f);y.a<y.c.c.length;){for(g=v($(y),7),u=new V(g.e);u.a<u.c.c.length;)return n=v($(u),12),Fn(n,f),g;for(i=new V(g.b);i.a<i.c.c.length;)return n=v($(i),12),er(n,f),g}return null}function Ate(e,n,i,u,f){var g,y,x,_,C,N;for(y=n,g=0,x=!1,N=new _l(i,u),C=zl(N);C.G();)_=v(C.H(),7),x=!0,Nn(e.k,_,Tt(y)),(Gi(v(X(i,(Ye(),St)),28))||_.b.c.length+_.e.c.length>1)&&(++g,++y);return!Gi(v(X(i,(Ye(),St)),28))&&x&&(++g,++y),Nn(f,i,Tt(g)),y}function Ite(e){var n,i,u,f,g,y,x,_,C,N,A,O;for(y=e.b.mb(),x=v(y.H(),92),N=x.a.a,C=N>Kl,_=N<am;y.G();){if(i=x,g=N,f=C,u=_,x=v(y.H(),92),N=x.a.a,C=N>Kl,_=N<am,!(C||_))return Zb(x.b);if(f&&_||u&&C)return n=g/(g-N),A=Zb(i.b),O=Zb(x.b),n*A+(1-n)*O}return 0}function Lte(e){var n,i,u,f,g,y,x,_,C,N,A,O;for(y=e.b.mb(),x=v(y.H(),92),N=x.a.b,C=N>Kl,_=N<am;y.G();){if(i=x,g=N,f=C,u=_,x=v(y.H(),92),N=x.a.b,C=N>Kl,_=N<am,!(C||_))return Zb(x.b);if(f&&_||u&&C)return n=g/(g-N),A=Zb(i.b),O=Zb(x.b),n*A+(1-n)*O}return 0}function Ote(e,n,i){var u,f;return u=0,Xx(n)?vl(e.g,n)?(k7(e.i,Tt(kl(e,n.c)),1)>0,k7(e.i,Tt(kl(e,n.d)),1)>0,Px(e.g,n),u+=V2e(e,n,e.i)):(Rn(e.g,n),Yy(e.i,Tt(kl(e,n.c)),1),Yy(e.i,Tt(kl(e,n.d)),1)):(f=Gy(e.i,Tt(v(pn(e.k,i),24).a)),u+=e.g.a.Y()-f),u}function Qke(e){switch(e.e){case 0:return goe;case 1:return hoe;case 2:return foe;case 3:return yoe;case 4:return voe;case 5:return _oe;case 6:return koe;case 7:return boe;case 8:return doe;case 9:return poe;case 11:return woe;case 10:return moe;default:return xoe}}function qy(e){switch(e.e){case 0:return as;case 1:return cu;case 2:return Kc;case 3:return rc;case 4:return ic;case 5:return js;case 6:return Jc;case 7:return Wc;case 8:return Qc;case 9:return Ms;case 10:return of;case 11:return ac;default:return ah}}function lv(e){switch(e.e){case 0:return js;case 1:return Jc;case 2:return Wc;case 3:return as;case 4:return cu;case 5:return Kc;case 6:return rc;case 7:return ic;case 8:return Qc;case 9:return Ms;case 10:return of;case 11:return ac;default:return ah}}function S7(e){switch(e.e){case 0:return Kc;case 1:return rc;case 2:return ic;case 3:return js;case 4:return Jc;case 5:return Wc;case 6:return as;case 7:return cu;case 8:return Qc;case 9:return Ms;case 10:return of;case 11:return ac;default:return ah}}function Wke(e){var n,i,u,f,g,y,x,_;for(i=(Wn(),new Dp),x=new Yx((ps(),new Oo(e.f))),y=(f=new hn(x.a).a.bb().mb(),new yn(f));y.a.G();){if(g=(u=v(y.a.H(),21),v(u.yb(),9)),!g){jf();break}_=e.i[g.k],n=v(wk(i,_),20),n||(n=new Ve,tv(i,_,n)),n.ib(g)}return i}function Jke(e,n,i){var u,f,g;for(f=new V(e.b.a.b);f.a<f.c.c.length;)u=v($(f),25),n.D(u)&&(g=Re(Wt(i.B(u))),g>0&&(!(Pf(e.b.d)&&u.q.d)&&!(ex(e.b.d)&&u.q.b)&&(u.j.e-=0>g/2-.5?0:g/2-.5),!(Pf(e.b.d)&&u.q.a)&&!(ex(e.b.d)&&u.q.c)&&(u.j.b+=0>g-1?0:g-1)))}function zl(e){var n,i,u;switch(u=e.a.f,e.b){case 0:return new V(e.a.f);case 1:return If((i=new qj(u),i),r7(e));case 2:switch(e.c.e){case 2:case 1:return If(new V(u),r7(e));case 3:case 4:return If((n=new qj(u),n),r7(e))}}throw new Hh("PortOrder not implemented.")}function Xke(e,n){var i;e.d&&(n.c!=e.e.c||hwe(e.e.b,n.b))&&(Ke(e.f,e.d),e.a=e.d.d+e.d.c,e.d=null,e.e=null),q0e(n.b)?e.c=n:e.b=n,(n.b==($b(),Zc)&&!n.a||n.b==nf&&n.a||n.b==ih&&n.a||n.b==rf&&!n.a)&&e.c&&e.b&&(i=new mo(e.a,e.c.d,n.c-e.a,e.b.d-e.c.d),e.d=i,e.e=n)}function Fl(e,n,i,u){this.e=e,this.j=v(X(e,(Ce(),lf)),134),this.f=Ie(Rr,oa,9,n,0,1),this.b=Ie(n0,qr,184,n,6,1),this.a=Ie(Rr,oa,9,n,0,1),this.d=Ie(n0,qr,184,n,6,1),this.i=Ie(Rr,oa,9,n,0,1),this.g=Ie(n0,qr,184,n,6,1),this.n=Ie(n0,qr,184,n,6,1),this.k=i,this.c=u}function e_e(e,n,i){var u,f;if(n.g==(gt(),wr)&&i.g==wr){if(!Gi(v(X(v(X(n,(Ce(),Ct)),9),(Ye(),St)),28))||v(X(n,Ct),9)!=v(X(i,Ct),9))return;if(vee(n)||vee(i)){e.d=1,e.b=1;return}f=v(ct(n.f,0),7).g,u=v(ct(i.f,0),7).g,bk(n).g==(Be(),yt)?Rte(e,n,i,f,u):Rte(e,i,n,u,f)}}function yd(e){if(!e.a.c||!e.a.d)throw new yc((Mf(xae),xae.j+" must have a source and target "+(Mf(l9),l9.j)+" specified."));if(e.a.c==e.a.d)throw new yc("Network simplex does not support self-loops: "+e.a+" "+e.a.c+" "+e.a.d);return Nc(e.a.c.g,e.a),Nc(e.a.d.c,e.a),e.a}function Rte(e,n,i,u,f){u==(Be(),ot)&&f==ot?sd(e,n)>sd(e,i)?e.d=pd(e,i):e.b=pd(e,n):u==lt&&f==lt?sd(e,n)<sd(e,i)?e.d=pd(e,i):e.b=pd(e,n):u==lt&&f==ot?sd(e,n)>sd(e,i)&&(e.d=pd(e,i),e.b=pd(e,n)):sd(e,n)<sd(e,i)&&(e.d=pd(e,i),e.b=pd(e,n))}function t_e(e){var n,i,u,f,g,y,x,_;for(_=e.f.c.length,i=0,n=_,f=2*_,x=new V(e.f);x.a<x.c.c.length;)switch(y=v($(x),7),y.g.e){case 2:case 4:y.k=-1;break;case 1:case 3:u=y.b.c.length,g=y.e.c.length,u>0&&g>0?y.k=n++:u>0?y.k=i++:g>0?y.k=f++:y.k=i++}wo(e.f,new Bi)}function n_e(e,n,i,u){var f,g,y,x,_;i.d.f!=n.f&&(f=new ko(e),bo(f,(gt(),An)),_e(f,(Ce(),Ct),i),_e(f,(Ye(),St),(tr(),ki)),u.c[u.c.length]=f,y=new ur,Tn(y,f),en(y,(Be(),lt)),x=new ur,Tn(x,f),en(x,ot),_=i.d,Fn(i,y),g=new Qs,$u(g,i),_e(g,dr,null),er(g,x),Fn(g,_),dte(f,y,x))}function r_e(e){var n,i,u,f,g,y,x,_,C;for(y=ks,_=ks,x=null,i=new tk(new R2(e.e));i.b!=i.c.a.b;)if(n=iA(i),v(n.d,60).c==1&&(u=v(n.e,116).a,C=v(n.e,116).b,f=y-u>zc,g=u-y<zc&&_-C>zc,(f||g)&&(_=v(n.e,116).b,y=v(n.e,116).a,x=v(n.d,60),_==0&&y==0)))return x;return x}function Dte(e,n){var i,u,f,g,y,x;return g=e.d,x=v(X(e,(Ye(),Cs)),15).a,x<0&&(x=0,_e(e,Cs,new dn(x))),n.j.b=x,y=Math.floor(x/2),u=new ur,en(u,(Be(),lt)),Tn(u,n),u.i.b=y,f=new ur,en(f,ot),Tn(f,n),f.i.b=y,Fn(e,u),i=new Qs,$u(i,e),_e(i,dr,null),er(i,f),Fn(i,g),fxe(n,e,i),Axe(e,i),i}function i_e(e){var n,i;i=v(X(e,(tn(),Dr)),85),n=v(X(e,(Ce(),Mu)),140),i==(ba(),el)?(_e(e,Dr,fh),_e(e,Mu,(Xs(),ch))):i==sc?(_e(e,Dr,fh),_e(e,Mu,(Xs(),Dd))):n==(Xs(),ch)?(_e(e,Dr,el),_e(e,Mu,Dm)):n==Dd&&(_e(e,Dr,sc),_e(e,Mu,Dm))}function a_e(e){var n,i,u,f,g;for(u=new V(nv(e.e));u.a<u.c.c.length;)i=v($(u),129),g=new lr(i.e.i),f=UA()[i.e.k],n=v(od(e.c,f),283),g.b=n.e+n.a,f.b==(pk(),Vc)?g.a=n.d:f.b==Od?g.a=n.d+(n.c-i.e.j.a)/2:f.b==qc&&(g.a=n.d+n.c-i.e.j.a),i.e.i.a=g.a,i.e.i.b=g.b,n.a+=i.e.j.b+e.d}function o_e(e){var n,i,u;for(i=new V(Rc(e));i.a<i.c.c.length;){switch(n=v($(i),161),u=new lr(n.e.i),v(n.e,7).g.e){case 4:u.a=0,u.b=e.e.j.b/2;break;case 2:u.a=e.e.j.a,u.b=e.e.j.b/2;break;case 1:u.a=e.e.j.a/2,u.b=0;break;case 3:u.a=e.e.j.a/2,u.b=e.e.j.b}n.e.i.a=u.a,n.e.i.b=u.b}}function Bte(){this.c=Ie(Ea,Ui,26,(Be(),be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt])).length,12,1),this.b=Ie(Ea,Ui,26,be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt]).length,12,1),this.a=Ie(Ea,Ui,26,be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt]).length,12,1),mx(this.c,Vi),mx(this.b,ti),mx(this.a,ti)}function Gte(e,n,i){var u,f,g,y,x,_,C,N;for(g=Re(Wt(e.b.mb().H())),C=Re(Wt(AJ(n.b))),u=gs(vo(e.a),C-i),f=gs(vo(n.a),i-g),N=On(u,f),gs(N,1/(C-g)),this.a=N,this.b=new Ve,x=!0,y=e.b.mb(),y.H();y.G();)_=Re(Wt(y.H())),x&&_-i>Kl&&(this.b.ib(i),x=!1),this.b.ib(_);x&&this.b.ib(i)}function s_e(e){var n,i,u,f;if(O_e(e,e.n),e.d.c.length>0){for(vb(e.c);y7(e,v($(new V(e.e.a)),61))<e.e.a.c.length;){for(n=vxe(e),f=n.d.e-n.c.e-n.a,n.d.j&&(f=-f),u=new V(e.e.a);u.a<u.c.c.length;)i=v($(u),61),i.j&&(i.e+=f);vb(e.c)}vb(e.c),f7(e,v($(new V(e.e.a)),61)),Pne(e)}}function u_e(e,n){var i,u,f,g,y,x,_;for(i=ti,x=(gt(),nr),f=new V(n.a);f.a<f.c.c.length;)u=v($(f),9),g=u.g,g!=nr&&(y=Wt(X(u,(Ce(),z9))),y==null?(i=i>0?i:0,u.i.b=i+Rx(e.a,g,x)):u.i.b=(Tr(y),y)),_=Rx(e.a,g,x),u.i.b<i+_+u.e.d&&(u.i.b=i+_+u.e.d),i=u.i.b+u.j.b+u.e.a,x=g}function Hte(e,n,i){var u,f,g;for(i.db(n,e),Ke(e.g,n),g=e.o.d.Lc(n),UZ(e.k)?e.k=g:e.k=mn(e.k,g),UZ(e.a)?e.a=g:e.a=et(e.a,g),n.g==e.o.d.Mc()?YX(e.j,g):YX(e.n,g),f=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[new dp(n),new Dh(n)]))))));Ft(f);)u=v(Ot(f),7),i.R(u)||Hte(e,u,i)}function c_e(e){var n,i,u,f,g;for(u=(Vn(),e.length),f=u>0&&(e.charCodeAt(0)==45||e.charCodeAt(0)==43)?1:0,n=f;n<u;n++)if(e2e(e.charCodeAt(n))==-1)throw new v1(__+e+'"');if(g=parseInt(e,10),i=g<_u,isNaN(g))throw new v1(__+e+'"');if(i||g>Or)throw new v1(__+e+'"');return g}function l_e(e,n,i,u){var f,g,y,x;for(f=v(mr(n,(Be(),lt)).mb().H(),7),g=v(mr(n,ot).mb().H(),7),x=new V(e.f);x.a<x.c.c.length;){for(y=v($(x),7);y.b.c.length!=0;)Fn(v(ct(y.b,0),12),f);for(;y.e.c.length!=0;)er(v(ct(y.e,0),12),g)}i||_e(n,(Ce(),ua),null),u||_e(n,(Ce(),Zi),null)}function f_e(e){var n,i,u,f,g,y,x;for(x=new zW,y=new V(e.b);y.a<y.c.c.length;)if(g=v($(y),9),g.g!=(gt(),Zn)){for(xke(x,g,new oi),f=Vt(Un(g));Ft(f);)if(u=v(Ot(f),12),!(u.c.f.g==Zn||u.d.f.g==Zn))for(i=xn(u.a,0);i.b!=i.d.c;)n=v(fn(i),10),Fp(x,new $h(n.a,n.b))}return x}function fv(e,n,i,u){var f,g,y;if(this.e=new Xi,this.a=e,this.b=n,e.b<n.b?(this.j=e.a,this.k=e.b,this.n=n.b):(this.j=n.a,this.k=n.b,this.n=e.b),f=v(X(u,(Ye(),dr)),44),f)for(y=xn(f,0);y.b!=y.d.c;)g=v(fn(y),10),oA(g.a,e.a)&&_n(this.e,g);this.g=i,this.g&&(this.i=this.j-i.j.d),this.f=u}function Ul(e){eo();var n,i,u,f,g,y;for(y=new pa,Qb(y,e),i=(g=new hn(y.a).a.bb().mb(),new yn(g));i.a.G();)n=(u=v(i.a.H(),21),u.yb()),Nt(n);switch(y.a.Y()){case 0:return ad(),ig;case 1:return new xc((f=new hn(y.a).a.bb().mb(),u=v(new yn(f).a.H(),21),u.yb()));default:return new lx(y)}}function Zy(e,n,i,u){var f,g,y;xo(e,i,"x",n.i.a+u.a),xo(e,i,"y",n.i.b+u.b),xo(e,i,M_,n.j.a),xo(e,i,j_,n.j.b),Ze(n,9)&&v(X(n,(Ye(),Rv)),86).kb((vd(),fE))&&(f=v(n,9).b,y=Qn(i,A_),y||(y=new Ef,io(i,A_,y)),g=y.kc(),xo(e,g,"left",f.b),xo(e,g,"top",f.d),xo(e,g,"right",f.c),xo(e,g,gI,f.a))}function zte(e,n){var i,u,f,g,y,x,_,C,N,A;for(y=n==1?vE:bE,g=(_=new hn(y.a).a.bb().mb(),new yn(_));g.a.G();)for(f=(x=v(g.a.H(),21),v(x.yb(),59)),N=v(oo(e.f.c,f),18).mb();N.G();)switch(C=v(N.H(),27),u=v(C.b,25),A=v(C.a,78),i=A.c,f.e){case 2:case 1:u.j.e+=i;break;case 4:case 3:u.j.d+=i}}function h_e(e,n){var i,u,f;n.a?(Tj(e.b,n.b),e.a[n.b.k]=v(EK(e.b,n.b),25),i=v(_K(e.b,n.b),25),i&&(e.a[i.k]=n.b)):(u=v(EK(e.b,n.b),25),u&&u==e.a[n.b.k]&&u.f&&u.f!=n.b.f&&u.i.ib(n.b),f=v(_K(e.b,n.b),25),f&&e.a[f.k]==n.b&&f.f&&f.f!=n.b.f&&n.b.i.ib(f),UK(e.b,n.b))}function d_e(e,n){var i,u,f,g,y,x,_;for(f=new Ve,i=0;i<=e.i;i++)u=new Nl(n),u.k=e.i-i,f.c[f.c.length]=u;for(x=new V(e.o);x.a<x.c.c.length;)y=v($(x),9),Wr(y,v(ct(f,e.i-e.f[y.k]),16));for(g=new V(f);g.a<g.c.c.length;)_=v($(g),16),_.a.c.length==0&&Ip(g);n.c.c=Ie(dt,tt,1,0,4,1),$n(n.c,f)}function p_e(e){var n,i,u,f;for(e.a.a.c=Ie(dt,tt,1,0,4,1),u=new V(e.a.b);u.a<u.c.c.length;)n=v($(u),25),n.f=null;for(f=new V(e.a.b);f.a<f.c.c.length;)n=v($(f),25),!n.o&&Ke(e.a.a,new Ay(be(ve(mm,1),tt,25,0,[n])));for(i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),25),n.o&&Ey(n.o.f,n)}function hv(e,n){var i,u,f,g;for(e=(Vn(),e??ku),i=(e.length+16*n.length,new Z2),g=0,u=0;u<n.length&&(f=e.indexOf("%s",g),f!=-1);)JW(i,e,g,f),_c(i,n[u++]),g=f+2;if(_1e(i,e,g,e.length),u<n.length){for(i.a+=" [",_c(i,n[u++]);u<n.length;)i.a+=", ",_c(i,n[u++]);i.a+="]"}return i.a}function Fte(e,n,i,u){var f,g;if(n){if(f=e.a.$b(i.d,n.d),f==0)return u.d=hj(n,i.e),u.b=!0,n;g=f<0?0:1,n.a[g]=Fte(e,n.a[g],i,u),wc(n.a[g])&&(wc(n.a[1-g])?(n.b=!0,n.a[0].b=!1,n.a[1].b=!1):wc(n.a[g].a[g])?n=ky(n,1-g):wc(n.a[g].a[1-g])&&(n=MW(n,1-g)))}else return i;return n}function g_e(e,n){var i,u,f,g,y,x,_,C,N,A;for(_=Nb(n.a),x=vr(S1(_/e.a)),A=n.a,y=0,C=x,g=0;g<e.a;++g)N=(Vn(),A.substr((0>y?0:y)<_?0>y?0:y:_,(0>(C<_?C:_)?0:C<_?C:_)-((0>y?0:y)<_?0>y?0:y:_))),y=C,C+=x,u=v(ct(e.c,g),9),i=new F6(N),i.j.b=n.j.b,jt(e.b,n,i),Ke(u.c,i);zr(e.g.c,n),Ke(e.i,(f=new T$(e,n),f))}function Ute(e,n,i){var u,f,g,y,x,_,C,N,A;for(n.k=1,g=n.d,A=tu(n,(Cr(),_i)).mb();A.G();)for(N=v(A.H(),7),f=new V(N.e);f.a<f.c.c.length;)u=v($(f),12),C=u.d.f,n!=C&&(y=C.d,y.k<=g.k&&(x=g.k+1,x==i.c.c.length?(_=new Nl(i),_.k=x,Ke(i.c,_),Wr(C,_)):(_=v(ct(i.c,x),16),Wr(C,_)),Ute(e,C,i)))}function b_e(e){var n,i,u,f,g;for(n=e.e.j,u=new V(Rc(e));u.a<u.c.c.length;){switch(i=v($(u),161),f=v(xr(i,(Ye(),Jl)),15),!f&&(f=new dn(0)),g=new lr(i.e.i),v(i.e,7).g.e){case 4:g.a=-i.e.j.a-f.a;break;case 2:g.a=n.a+f.a;break;case 1:g.b=-i.e.j.b-f.a;break;case 3:g.b=n.b+f.a}i.e.i.a=g.a,i.e.i.b=g.b}}function v_e(e){var n,i,u;u=v(X(e,(Ye(),Ma)),18),!u.V()&&(i=(n=v(da(Kn),11),new xi(n,v(ea(n,n.length),11),0)),u.kb((Wu(),qi))?Ai(i,qi):Ai(i,ka),u.kb(wa)||Ai(i,wa),u.kb(ma)?Ai(i,Va):u.kb(Co)?Ai(i,Ya):u.kb(xa)&&Ai(i,Ua),u.kb(Va)?Ai(i,ma):u.kb(Ya)?Ai(i,Co):u.kb(Ua)&&Ai(i,xa),_e(e,Ma,i))}function Yte(e,n,i,u,f){var g,y,x,_,C,N,A,O,G,Y;for(O=qX(e,i),_=0;_<n;_++){for(f.J(i),G=new Ve,Y=v(u.H(),92),N=O+_;N<e.c;N++)x=Y,Y=v(u.H(),92),Ke(G,new Gte(x,Y,i));for(A=O+_;A<e.c;A++)u.M(),A>O+_&&u.I();for(y=new V(G);y.a<y.c.c.length;)g=v($(y),92),u.J(g);if(_<n-1)for(C=O+_;C<e.c;C++)u.M()}}function y_e(e){var n,i,u,f;if(e.d&&v(e.e,7).f.g==(gt(),wr))return wn(),wn(),tl;if(!e.a){for(e.a=new Ve,u=new V(v(e.e,7).b);u.a<u.c.c.length;)n=v($(u),12),Ke(e.a,new c1(n));if(e.d&&(f=v(X(v(e.e,7),(Ce(),lu)),9),f))for(i=Vt(Yr(f));Ft(i);)n=v(Ot(i),12),Ke(e.a,new c1(n))}return e.a}function m_e(e){var n,i,u,f;if(e.d&&v(e.e,7).f.g==(gt(),wr))return wn(),wn(),tl;if(!e.c){for(e.c=new Ve,u=new V(v(e.e,7).e);u.a<u.c.c.length;)n=v($(u),12),Ke(e.c,new c1(n));if(e.d&&(f=v(X(v(e.e,7),(Ce(),lu)),9),f))for(i=Vt(Un(f));Ft(i);)n=v(Ot(i),12),Ke(e.c,new c1(n))}return e.c}function w_e(e,n){var i,u,f,g,y,x,_,C;for(x=v(X(e,(Ce(),Ct)),7),_=Mn(be(ve(rn,1),nn,10,0,[x.f.i,x.i,x.a])).a,C=e.f.i.b,i=v(fr(e.b,Ie(_a,va,12,e.b.c.length,0,1)),47),f=0,g=i.length;f<g;++f)u=i[f],Fn(u,x),tx(u.a,new kt(_,C)),n&&(y=v(X(u,(Ye(),dr)),44),y||(y=new Xi,_e(u,dr,y)),_n(y,new kt(_,C)))}function x_e(e,n){var i,u,f,g,y,x,_,C;for(f=v(X(e,(Ce(),Ct)),7),_=Mn(be(ve(rn,1),nn,10,0,[f.f.i,f.i,f.a])).a,C=e.f.i.b,i=v(fr(e.e,Ie(_a,va,12,e.e.c.length,0,1)),47),y=0,x=i.length;y<x;++y)g=i[y],er(g,f),C$(g.a,new kt(_,C)),n&&(u=v(X(g,(Ye(),dr)),44),u||(u=new Xi,_e(g,dr,u)),_n(u,new kt(_,C)))}function k_e(e){var n,i,u,f,g,y,x,_,C;for(y=ks,_=ks,x=null,i=new tk(new R2(e.e));i.b!=i.c.a.b;)if(n=iA(i),(ut(n.d)===ut((Fi(),Ms))||ut(n.d)===ut(Qc))&&(u=v(n.e,116).a,C=v(n.e,116).b,f=y-u>zc,g=u-y<zc&&_-C>zc,(f||g)&&(_=v(n.e,116).b,y=v(n.e,116).a,x=v(n.d,60),_==0&&y==0)))return x;return x}function __e(e,n){var i,u,f,g,y;e.d=n,Go(e.b),e.c=!1;e:for(u=new V(e.d.c);u.a<u.c.c.length;)for(i=v($(u),16),g=new V(i.a);g.a<g.c.c.length;)if(f=v($(g),9),!Hb(ov(f))){e.c=!0;break e}return y=ln((sr(),rs),be(ve(Sv,1),Je,59,0,[uo,ya])),e.c||(Ai(y,Su),Ai(y,ou)),e.a=new Nj(y),h3e(e),e.a}function Vte(){var e,n,i,u,f;for(this.e=(Wn(),new Dp),this.b=(i=v(da(lg),11),new xi(i,v(ea(i,i.length),11),0)),this.c=(u=v(da(lg),11),new xi(u,v(ea(u,u.length),11),0)),this.a=(f=v(da(lg),11),new xi(f,v(ea(f,f.length),11),0)),n=(Fi(),Fi(),uoe).mb();n.G();)e=v(n.H(),60),tv(this.e,e,new ZZ)}function E_e(e,n,i){var u,f,g,y,x,_;wi(e.k-e.a)<Ju||wi(n.k-n.a)<Ju||(u=Cte(e.n,n.j,i),f=Cte(n.n,e.j,i),g=Dk(e.n,n.k,n.a)+Dk(n.j,e.k,e.a),y=Dk(n.n,e.k,e.a)+Dk(e.j,n.k,n.a),x=16*u+g,_=16*f+y,x<_?new xy(e,n,_-x):x>_?new xy(n,e,x-_):x>0&&_>0&&(new xy(e,n,0),new xy(n,e,0)))}function Yl(e,n){var i,u,f,g,y,x,_,C,N;for(C=new Ve,N=null,u=v(od(af,e),20).mb();u.G();){for(i=v(u.H(),75),_=(g=new hn(i.c.a).a.bb().mb(),new yn(g));_.a.G();)y=(f=v(_.a.H(),21),v(f.yb(),7)),Uu(n,y),Vy(y,e.b);$n(C,i.b),N=e.a}for(Fy(C),xk(C,N),x=new V(C);x.a<x.c.c.length;)y=v($(x),7),Uu(n,y)}function C_e(){var e={layout:function(n){jC(pCe(n))}};typeof document!==wv&&(r.$klay=e),t.exports&&(t.exports=e),typeof document===wv&&typeof self!==wv&&self.addEventListener("message",function(n){e.layout(n.data)},!1)}function dv(e,n,i,u,f){var g,y,x;x=f?u.b:u.a,(x>i.k&&x<i.a||i.j.b!=0&&i.n.b!=0&&(wi(x-Re(Wt(Tx(i.j))))<Ju&&wi(x-Re(Wt(Tx(i.n))))<Ju||wi(x-Re(Wt(B1(i.j))))<Ju&&wi(x-Re(Wt(B1(i.n))))<Ju))&&(vl(e.b,u)||(y=v(X(n,(Ye(),dr)),44),y||(y=new Xi,_e(n,dr,y)),g=new lr(u),Ir(y,g,y.c.b,y.c),Rn(e.b,g)))}function P_e(e,n,i){var u,f,g,y,x,_,C,N,A;for(u=i.c,f=i.d,x=ra(n.c),_=ra(n.d),u==n.c?(x=g7(e,x,f),_=zee(n.d)):(x=zee(n.c),_=g7(e,_,f)),C=new Ix(n.a),Ir(C,x,C.a,C.a.a),Ir(C,_,C.c.b,C.c),y=n.c==u,A=new sZ,g=0;g<C.b-1;++g)N=new Ar(v(Up(C,g),10),v(Up(C,g+1),10)),y&&g==0||!y&&g==C.b-2?A.b=N:Ke(A.a,N);return A}function S_e(e,n){var i,u,f,g;if(g=e.g.e-n.g.e,g!=0)return g;if(i=v(X(e,(Ye(),ec)),24),u=v(X(n,ec),24),i&&u&&(f=i.a-u.a,f!=0))return f;switch(e.g.e){case 1:return Lr(e.i.a,n.i.a);case 2:return Lr(e.i.b,n.i.b);case 3:return Lr(n.i.a,e.i.a);case 4:return Lr(n.i.b,e.i.b);default:throw new yc(gre)}}function N_e(e,n){var i,u,f,g,y;for(y=new oi,g=new V(Rc(e));g.a<g.c.c.length;)switch(f=v($(g),161),v(f.e,7).g.e){case 4:case 2:y.b=et(y.b,f.e.i.b+f.e.j.b+(n?(u=v(f.e,7).d,new vs(u.d,u.b,u.a,u.c)).a:0));break;case 1:case 3:y.a=et(y.a,f.e.i.a+f.e.j.a+(n?(i=v(f.e,7).d,new vs(i.d,i.b,i.a,i.c)).c:0))}return y}function p_(e,n){var i,u,f,g,y,x,_;for(f=new Ve,_=new Ve,i=v(od(af,e),20).mb();i.G();)u=v(i.H(),75),see(f,u.b),see(f,JX(u)),i.G()&&(u=v(i.H(),75),$n(_,JX(u)),$n(_,u.b));for(xk(f,e.b),xk(_,e.a),x=new V(f);x.a<x.c.c.length;)g=v($(x),7),Uu(n,g);for(y=new V(_);y.a<y.c.c.length;)g=v($(y),7),Uu(n,g)}function jr(){jr=s,tC=new kc("COMMENTS",0),As=new kc("EXTERNAL_PORTS",1),Om=new kc("HYPEREDGES",2),nC=new kc("HYPERNODES",3),sh=new kc("NON_FREE_PORTS",4),uh=new kc("NORTH_SOUTH_PORTS",5),Rm=new kc("SELF_LOOPS",6),fg=new kc("CENTER_LABELS",7),hg=new kc("END_LABELS",8),E9=new kc("PARTITIONS",9)}function T_e(e,n){var i,u,f,g;for(e=(Vn(),e??ku),i=(e.length+16*n.length,new Z2),g=0,u=0;u<n.length&&(f=e.indexOf("%s",g),f!=-1);)Ro(i,e.substr(g,f-g)),_c(i,n[u++]),g=f+2;if(Ro(i,Ap(e,g,e.length-g)),u<n.length){for(i.a+=" [",_c(i,n[u++]);u<n.length;)i.a+=", ",_c(i,n[u++]);i.a+="]"}return i.a}function N7(e,n,i){var u,f;switch(f=null,n.e){case 1:f=(Ha(),xL);break;case 2:f=(Ha(),kL)}switch(u=null,i.e){case 1:u=(Ha(),wE);break;case 2:u=(Ha(),mE);break;case 3:u=(Ha(),xE);break;case 4:u=(Ha(),kE)}return f&&u?Wo(e.f,(P1(),new dq(new Oo(be(ve(v3e,1),tt,68,0,[v(Nt(f),68),v(Nt(u),68)]))))):(wn(),wn(),tl)}function T7(e,n,i){var u,f,g,y,x,_,C;for(_=Ba(Un(n)),f=xn(_,0);f.b!=f.d.c;)u=v(fn(f),12),C=u.d.f,!(Yt(Re(Zt(X(C,(Ce(),Xc)))))&&X(C,Ct)!=null)&&C.g==(gt(),sa)&&!Yt(Re(Zt(X(u,ju))))&&u.d.g==(Be(),lt)&&(g=Pa(C.d)-Pa(n.d),g>1&&(i?y=Pa(n.d)+1:y=Pa(C.d)-1,x=v(ct(e.a.c,y),16),Wr(C,x)),T7(e,C,i));return n}function qte(e,n){var i,u,f,g;for(n.d?f=e.a.c==(Xo(),$c)?Yr(n.b):Un(n.b):f=e.a.c==(Xo(),uu)?Yr(n.b):Un(n.b),g=!1,u=(ar(),new hs(ds($s(f.a,new w))));Ft(u);)if(i=v(Ot(u),12),e.c.a[i.c.f.d.k]!==e.c.a[i.d.f.d.k]&&(g=!0,vl(e.b,e.a.f[oxe(i,n.b).k])))return n.c=!0,n.a=i,n;return n.c=g,n.a=null,n}function M_e(e,n,i){var u,f,g,y;for(u=v(X(e.d,(Ye(),QI)),15).a,g=new V(e.a.b);g.a<g.c.c.length;)if(f=v($(g),25),Ze(f,93)&&(y=v(f,93).b,y.g==(gt(),Zn)))switch(v(X(y,(Ce(),ni)),32).e){case 4:y.i.a=n.a-u;break;case 2:y.i.a=i.a+u-(y.j.a+y.e.c);break;case 1:y.i.b=n.b-u;break;case 3:y.i.b=i.b+u-(y.j.b+y.e.a)}}function j_e(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",n=Object.create(null);if(n[e]!==void 0)return!1;var i=Object.getOwnPropertyNames(n);return!(i.length!=0||(n[e]=42,n[e]!==42)||Object.getOwnPropertyNames(n).length==0)}function Zte(e){var n,i,u,f,g,y,x,_,C;for(y=new V(e.a.a);y.a<y.c.c.length;)f=v($(y),78),f.f=0,f.e.a.Q();for(g=new V(e.a.a);g.a<g.c.c.length;)for(f=v($(g),78),i=(C=new hn(f.a.a).a.bb().mb(),new yn(C));i.a.G();)for(n=(u=v(i.a.H(),21),v(u.yb(),25)),_=n.i.mb();_.G();)x=v(_.H(),25),x.f!=f&&(Rn(f.e,x),++x.f.f)}function M7(e,n,i,u){var f,g,y,x;if(n.g==(gt(),sa)){for(g=Vt(Yr(n));Ft(g);)if(f=v(Ot(g),12),y=f.c.f,(y.g==sa||Yt(Re(Zt(X(y,(Ce(),Xc))))))&&e.d.a[f.c.f.d.k]==u&&e.d.a[n.d.k]==i)return!0}if(n.g==An){for(g=Vt(Yr(n));Ft(g);)if(f=v(Ot(g),12),x=f.c.f.g,x==An&&e.d.a[f.c.f.d.k]==u&&e.d.a[n.d.k]==i)return!0}return!1}function A_e(e){var n,i,u,f,g,y;if(f=e.g.tb(),u=e.b.tb(),e.e)for(i=0;i<e.c;i++)f.H();else for(i=0;i<e.c-1;i++)f.H(),f.I();for(n=Re(Wt(f.H()));e.i-n>Kl;){for(g=n,y=0;(n-g<=0?0-(n-g):n-g)<Kl;)++y,n=Re(Wt(f.H())),u.H();y<e.c&&(f.M(),Yte(e,e.c-y,g,u,f),f.H()),u.M()}if(!e.e)for(i=0;i<e.c-1;i++)f.H(),f.I();e.e=!0,e.d=!0}function I_e(e){var n,i,u,f;switch(kx(e.a).c){case 4:return Fi(),js;case 3:return v(cme(e.a).mb().H(),60);case 2:return u=kx(e.a),i=new Kh(u),n=v(Al(i),60),f=v(Al(i),60),lv(n)==f?bs(u,(Fi(),js))?rc:js:qy(qy(n))==f?qy(n):S7(n);case 1:return u=kx(e.a),lv(v(Al(new Kh(u)),60));case 0:return Fi(),ic;default:return null}}function $te(e,n){var i;Jj.call(this),this.a=v(X(n,(Ce(),ca)),15).a,this.c=this.a*v(X(n,(tn(),yg)),15).a,this.b=e,this.j=new mo(e.i.a-e.e.b,e.i.b-e.e.d,e.j.a+e.e.b+e.e.c,e.j.b+e.e.d+e.e.a),bu(this.g),i=Of(Yr(e))-Of(Un(e)),i<0?Wb(this.n,!0,(sr(),uo)):i>0&&Wb(this.n,!0,(sr(),ya)),e.g==(gt(),Zn)&&to(this.n,!1,!1,!1,!1)}function pv(e,n,i){var u,f,g,y,x,_,C,N,A,O;for(g=new kt(n,i),N=new V(e.b);N.a<N.c.c.length;)for(C=v($(N),9),On(C.i,g),O=new V(C.f);O.a<O.c.c.length;)for(A=v($(O),7),f=new V(A.e);f.a<f.c.c.length;)for(u=v($(f),12),jc(u.a,g),y=v(X(u,(Ye(),dr)),44),y&&jc(y,g),_=new V(u.b);_.a<_.c.c.length;)x=v($(_),33),On(x.i,g)}function L_e(e,n,i){var u,f,g,y,x,_,C,N,A,O;for(g=new kt(n,i),N=new V(e.b);N.a<N.c.c.length;)for(C=v($(N),9),On(C.i,g),O=new V(C.f);O.a<O.c.c.length;)for(A=v($(O),7),f=new V(A.e);f.a<f.c.c.length;)for(u=v($(f),12),jc(u.a,g),y=v(X(u,(Ye(),dr)),44),y&&jc(y,g),_=new V(u.b);_.a<_.c.c.length;)x=v($(_),33),On(x.i,g)}function Kte(e,n){var i,u,f,g,y;for(y=new V(e.f);y.a<y.c.c.length;)if(g=v($(y),7),n){if(g.b.c.length!=0)throw new p1((f=gy(e),mI+(f??m1(e.k))+mre+wre+wI))}else for(u=new V(g.b);u.a<u.c.c.length;)if(i=v($(u),12),ut(X(i.c.f,(tn(),Dr)))!==ut((ba(),el)))throw new p1((f=gy(e),mI+(f??m1(e.k))+mre+wre+wI))}function Qte(e,n,i){var u,f,g,y,x,_,C;for(u=0,C=mr(n,i),_=C.mb();_.G();)x=v(_.H(),7),v(X(x,(Ce(),lu)),9)&&(y=v(X(x,lu),9),mr(y,(Be(),ot)).mb().G()&&(u+=(g=e.k?1:TQ(v(ct(y.f,0),7)),g*mc(TX(e,n,i).a-1-v(pn(e.i,x),24).a,vX(e,n,y)))),mr(y,lt).mb().G()&&(u+=(f=e.k?1:TQ(v(ct(y.f,0),7)),f*mc(v(pn(e.i,x),24).a,vX(e,n,y)))));return u}function O_e(e,n){var i,u,f,g,y,x,_;for(f=Ie(pr,hr,26,e.e.a.c.length,12,1),y=new V(e.e.a);y.a<y.c.c.length;)g=v($(y),61),f[g.b]+=g.c.c.length;for(x=Ba(n);x.b!=0;)for(g=v(x.b==0?null:(_t(x.b!=0),yu(x,x.a.a)),61),u=new V(g.g);u.a<u.c.c.length;)i=v($(u),89),_=i.d,_.e=mi(_.e,g.e+i.a),--f[_.b],f[_.b]==0&&Ir(x,_,x.c.b,x.c)}function Wte(e,n,i,u,f,g,y){if(e.d=u.e.i.a,e.e=u.e.i.b,f&&(e.d+=f.e.i.a,e.e+=f.e.i.b),e.c=n.e.j.a,e.b=n.e.j.b,!f)i?e.d-=y+n.e.j.a:e.d+=u.e.j.a+y;else switch(v(f.e,7).g.e){case 0:case 2:e.d+=f.e.j.a+y+g.a+y;break;case 4:e.d-=y+g.a+y+n.e.j.a;break;case 1:e.d+=f.e.j.a+y,e.e-=y+g.b+y+n.e.j.b;break;case 3:e.d+=f.e.j.a+y,e.e+=f.e.j.b+y+g.b+y}}function R_e(e,n){var i,u,f,g,y,x,_,C,N;for(f=new Ve,_=new V(n);_.a<_.c.c.length;)g=v($(_),9),Ke(f,e.b[g.d.k][g.k]);for(CEe(e,f);N=vCe(f);)hEe(e,v(N.a,102),v(N.b,102),f);for(n.c=Ie(dt,tt,1,0,4,1),u=new V(f);u.a<u.c.c.length;)for(i=v($(u),102),y=i.d,x=0,C=y.length;x<C;++x)g=y[x],n.c[n.c.length]=g,e.a[g.d.k][g.k].a=Xa(i.g,i.d[0]).a}function g_(e){var n,i,u,f,g,y,x;for(x=(Wn(),new an),u=new V(e.a.b);u.a<u.c.c.length;)n=v($(u),25),Nn(x,n,new Ve);for(f=new V(e.a.b);f.a<f.c.c.length;)for(n=v($(f),25),n.r=ti,y=n.i.mb();y.G();)g=v(y.H(),25),v(Ti(Mi(x.d,g)),20).ib(n);for(i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),25),n.i.Q(),n.i=v(Ti(Mi(x.d,n)),20);Zte(e)}function D_e(e){var n,i,u,f,g;switch(f=v(ct(e.b,0),9),n=new ko(e),Ke(e.b,n),n.j.a=et(1,f.j.a),n.j.b=et(1,f.j.b),n.i.a=f.i.a,n.i.b=f.i.b,v(X(f,(Ce(),ni)),32).e){case 4:n.i.a+=2;break;case 1:n.i.b+=2;break;case 2:n.i.a-=2;break;case 3:n.i.b-=2}return u=new ur,Tn(u,n),i=new Qs,g=v(ct(f.f,0),7),er(i,g),Fn(i,u),On(bu(u.i),g.i),On(bu(u.a),g.a),n}function B_e(e){var n,i,u,f,g,y,x,_,C;for(C=(Wn(),new an),n=0,i=new G2,x=e.mb();x.G();)g=v(x.H(),9),_=Mb(s$(m6(new bp,n++),g),i),Ta(C.d,g,_);for(y=e.mb();y.G();)for(g=v(y.H(),9),f=Vt(Un(g));Ft(f);)u=v(Ot(f),12),!Il(u)&&yd(Yh(qh(Vh(Zh(new _f,mi(1,v(X(u,(Ce(),No)),24).a)),1),v(pn(C,u.c.f),61)),v(pn(C,u.d.f),61)));return i}function G_e(e){var n,i;if(!e.V()){for(i=v(e.sb(0),75).f,new L7(e),n=new jn(i.f,0),Bl((Fi(),as),n),Gl(of,n),Xb((Be(),yt),n),p_(cu,n),Gl(ac,n),Yl(Kc,n),Bl(Ms,n),Xb(ot,n),p_(rc,n),Bl(Qc,n),Yl(ic,n),Bl(ac,n),Xb(Et,n),p_(js,n),Bl(of,n),Yl(Jc,n),Gl(Qc,n);n.b<n.d.Y();)_t(n.b<n.d.Y()),n.d.sb(n.c=n.b++);p_(Wc,n),Gl(Ms,n),Gl(as,n)}}function H_e(e){var n,i;if(!e.V()){for(i=v(e.sb(0),75).f,new L7(e),n=new jn(i.f,0),Bl((Fi(),as),n),Gl(of,n),Xb((Be(),yt),n),Yl(cu,n),Gl(ac,n),Yl(Kc,n),Bl(Ms,n),Xb(ot,n),Yl(rc,n),Bl(Qc,n),Yl(ic,n),Bl(ac,n),Xb(Et,n),Yl(js,n),Bl(of,n),Yl(Jc,n),Gl(Qc,n);n.b<n.d.Y();)_t(n.b<n.d.Y()),n.d.sb(n.c=n.b++);Yl(Wc,n),Gl(Ms,n),Gl(as,n)}}function Jte(e){var n,i,u,f,g,y,x,_,C;for(f=_u,y=Or,C=new V(e.e.a);C.a<C.c.c.length;)x=v($(C),61),y=mc(y,x.e),f=mi(f,x.e);for(g=0,u=Ie(pr,hr,26,f-y+1,12,1),_=new V(e.e.a);_.a<_.c.c.length;)x=v($(_),61),x.e-=y,++u[x.e];if(e.k)for(i=new V(e.k.c);i.a<i.c.c.length&&(n=v($(i),16),u[g++]+=n.a.c.length,u.length!=g););return u}function z_e(e){var n,i,u,f;for(ywe(e),Nxe(e),f=new kt(Vi,Vi),n=new kt(ti,ti),u=new V(e.a.b);u.a<u.c.c.length;)i=v($(u),25),f.a=mn(f.a,i.j.d),f.b=mn(f.b,i.j.e),n.a=et(n.a,i.j.d+i.j.c),n.b=et(n.b,i.j.e+i.j.b);On(bu(e.d.d),Nx(new kt(f.a,f.b))),On(bu(e.d.e),Fu(new kt(n.a,n.b),f)),M_e(e,f,n),e.a.a.c=Ie(dt,tt,1,0,4,1),e.a.b.c=Ie(dt,tt,1,0,4,1)}function F_e(e,n){var i,u,f,g,y,x,_,C,N,A;if(y=e.e,N=v(X(e,(Ce(),bg)),20),A=0,N){for(_=0,g=N.mb();g.G();)f=v(g.H(),9),_=et(_,f.j.b),A+=f.j.a;A+=n/2*(N.Y()-1),y.d+=_+n}if(i=v(X(e,dg),20),u=0,i){for(_=0,g=i.mb();g.G();)f=v(g.H(),9),_=et(_,f.j.b),u+=f.j.a;u+=n/2*(i.Y()-1),y.a+=_+n}x=A>u?A:u,x>e.j.a&&(C=(x-e.j.a)/2,y.b=et(y.b,C),y.c=et(y.c,C))}function Xte(e,n,i,u){var f,g,y,x,_,C,N,A,O,G;for(y=Da(n.d,i,u),A=new V(n.b);A.a<A.c.c.length;){for(N=v($(A),9),On(N.i,y),G=new V(N.f);G.a<G.c.c.length;)for(O=v($(G),7),g=new V(O.e);g.a<g.c.c.length;)for(f=v($(g),12),jc(f.a,y),x=v(X(f,(Ye(),dr)),44),x&&jc(x,y),C=new V(f.b);C.a<C.c.c.length;)_=v($(C),33),On(_.i,y);Ke(e.b,N),N.a=e}}function U_e(e,n){var i,u,f,g,y;for(e.c==null||e.c.length<n.c.length?e.c=Ie(r0,_v,26,n.c.length,13,1):vb(e.c),e.a=new Ve,u=0,y=new V(n);y.a<y.c.c.length;)f=v($(y),9),f.k=u++;for(i=new fi,g=new V(n);g.a<g.c.c.length;)f=v($(g),9),e.c[f.k]||(hte(e,f),i.b==0||(_t(i.b!=0),v(i.a.a.c,20)).Y()<e.a.c.length?C$(i,e.a):tx(i,e.a),e.a=new Ve);return i}function Y_e(e,n,i){var u,f,g,y,x,_,C,N,A;return u=Yp(e.g),C=On(vo(e.i),e.a),N=On(vo(n.i),n.a),f=On(new lr(C),gs(new Sl(u),i)),A=On(new lr(N),gs(new Sl(u),i)),y=gs(Fu(new lr(f),A),.5),_=On(On(new lr(A),y),gs(new Sl(u),F$(y.a*y.a+y.b*y.b))),x=new nk(be(ve(rn,1),nn,10,0,[C,f,_,A,N])),g=Vf(x,.5,!1),x.a=g,JM(x,new r_(be(ve(rn,1),nn,10,0,[g,C,N]))),x}function j7(e,n){var i,u,f,g,y;if($t(n,"Network simplex",1),e.e.a.c.length<1){zt(n);return}for(g=new V(e.e.a);g.a<g.c.c.length;)f=v($(g),61),f.e=0;for(y=e.e.a.c.length>=40,y&&aEe(e),OEe(e),s_e(e),i=Nee(e),u=0;i&&u<e.f;)V_e(e,i,Pke(e,i)),i=Nee(e),++u;y&&Hxe(e),e.a?Eke(e,Jte(e)):Jte(e),e.b=null,e.d=null,e.p=null,e.c=null,e.g=null,e.i=null,e.n=null,e.o=null,zt(n)}function md(e){var n,i,u,f,g,y,x,_,C,N;for(C=new ai,f=(Wn(),new an),x=0,_=e.length;x<_;++x)y=e[x],n=y.mc(),C.a.db(n,C),n==null?Ta(f.d,null,y):Hk(f.e,n,y),N=Hx(n,(Vn(),n.lastIndexOf(".")+1),n.length),vl(vL,N)||(C.a.db(N,C),N==null?Ta(f.d,null,y):Hk(f.e,N,y),Rn(vL,N));return u=(eo(),Pee((g=new hn(C.a).a.bb().mb(),new yn(g)))),i=Zke(f),new Ar(u,i)}function V_e(e,n,i){var u,f,g;if(!n.e)throw new Pn("Given leave edge is no tree edge.");if(i.e)throw new Pn("Given enter edge is a tree edge already.");for(n.e=!1,Px(e.p,n),i.e=!0,Rn(e.p,i),u=i.d.e-i.c.e-i.a,s_(e,i.d,n)||(u=-u),g=new V(e.e.a);g.a<g.c.c.length;)f=v($(g),61),s_(e,f,n)||(f.e+=u);e.j=1,vb(e.c),f7(e,v($(new V(e.e.a)),61)),Pne(e)}function q_e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G;if(e.V())return new oi;for(C=0,A=0,f=e.mb();f.G();)u=v(f.H(),55),g=u.e,C=et(C,g.a),A+=g.a*g.b;for(C=et(C,Math.sqrt(A)*v(X(v(e.mb().H(),55),(Ce(),Bd)),15).a),O=0,G=0,_=0,i=n,x=e.mb();x.G();)y=v(x.H(),55),N=y.e,O+N.a>C&&(O=0,G+=_+n,_=0),pv(y,O,G),i=et(i,O+N.a),_=et(_,N.b),O+=N.a+n;return new kt(i+n,G+_+n)}function b_(e,n,i,u){var f,g,y;return y=new g$(n,i),e.a?u?(f=v(pn(e.b,n),126),++f.a,y.d=u.d,y.e=u.e,y.b=u,y.c=u,u.e?u.e.c=y:v(pn(e.b,n),126).b=y,u.d?u.d.b=y:e.a=y,u.d=y,u.e=y):(e.e.b=y,y.d=e.e,e.e=y,f=v(pn(e.b,n),126),f?(++f.a,g=f.c,g.c=y,y.e=g,f.c=y):(Nn(e.b,n,new Hj(y)),++e.c)):(e.a=e.e=y,Nn(e.b,n,new Hj(y)),++e.c),++e.d,y}function wu(e){var n,i,u,f,g,y,x,_;if(e.e)throw new yc((Mf(yE),"The "+yE.j+dre));for(e.d==(sr(),rs)&&ru(e,uo),i=new V(e.a.a);i.a<i.c.c.length;)n=v($(i),78),n.f=0;for(y=new V(e.a.b);y.a<y.c.c.length;)for(g=v($(y),25),g.r=ti,f=g.i.mb();f.G();)u=v(f.H(),25),++u.f.f;for(e.b.Cc(e),_=new V(e.a.b);_.a<_.c.c.length;)x=v($(_),25),x.p=!0;return e}function Z_e(e,n,i,u,f){var g,y,x,_;g=new ko(e),bo(g,(gt(),wr)),_e(g,(Ye(),St),(tr(),ki)),_e(g,(Ce(),Ct),n.c.f),y=new ur,_e(y,Ct,n.c),en(y,f),Tn(y,g),_e(n.c,lu,g),x=new ko(e),bo(x,wr),_e(x,St,ki),_e(x,Ct,n.d.f),_=new ur,_e(_,Ct,n.d),en(_,f),Tn(_,x),_e(n.d,lu,x),er(n,y),Fn(n,_),Ll(0,i.c.length),Pb(i.c,0,g),u.c[u.c.length]=x,_e(g,pg,Tt(1)),_e(x,pg,Tt(1))}function $_e(e,n){var i,u,f,g,y;if(y=v(X(e.f,(Ye(),St)),28),g=e.g.e-n.g.e,g!=0||y==(tr(),Dv))return g;if(y==(tr(),Md)&&(i=v(X(e,ec),24),u=v(X(n,ec),24),i&&u&&(f=i.a-u.a,f!=0)))return f;switch(e.g.e){case 1:return Lr(e.i.a,n.i.a);case 2:return Lr(e.i.b,n.i.b);case 3:return Lr(n.i.a,e.i.a);case 4:return Lr(n.i.b,e.i.b);default:throw new yc(gre)}}function ene(e){var n,i,u,f,g,y,x,_,C,N,A;for(x=new Ve,g=Re(Wt(e.g.sb(e.g.Y()-1))),A=e.g.mb();A.G();)N=Wt(A.H()),El(x,0,g-(Tr(N),N));for(y=jk(Ck(e)),C=new Ve,f=new V(x),_=new Ve,n=0;n<e.c-1;n++)Ke(C,Wt($(f)));for(u=xn(y,0);u.b!=u.d.c;)i=v(fn(u),10),Ke(C,Wt($(f))),Ke(_,new ok(i,C)),qn(0,C.c.length),C.c.splice(0,1);return new qA(e.e,e.f,e.d,e.c,x,_)}function A7(e,n,i,u,f){var g,y,x,_,C;return g=n.$b(i,e.b),g<0?(x=e.e,x?(y=x.d,e.e=A7(x,n,i,u,f),f[0]==0&&++e.a,e.j=Ur(e.j,u),e.e.d==y?e:Qu(e)):(f[0]=0,wA(e,i,u))):g>0?(_=e.g,_?(y=_.d,e.g=A7(_,n,i,u,f),f[0]==0&&++e.a,e.j=Ur(e.j,u),e.g.d==y?e:Qu(e)):(f[0]=0,mA(e,i,u))):(f[0]=e.c,C=Ur(e.c,u),Qh(Lk(C,Or)<=0),e.c+=u,e.j=Ur(e.j,u),e)}function K_e(e,n){var i,u,f,g,y,x;f=Ky(n,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | |
|
|
362
|
+
`),vu(e);try{for(u=0,y=0,g=0,x=0;u<f.length;)f[u]!=null&&Nb(Rl(f[u]))>0&&(y%2==0?g=Hy(f[u]):x=Hy(f[u]),y>0&&y%2!=0&&_n(e,new kt(g,x)),++y),++u}catch(_){throw _=hi(_),Ze(_,130)?(i=_,new Pn("The given string does not match the expected format for vectors."+i)):di(_)}}function tne(e,n,i){var u,f,g,y,x,_,C,N;for(f=!0,y=new V(n.c);y.a<y.c.c.length;){for(g=v($(y),16),C=ti,_=new V(g.a);_.a<_.c.c.length;)if(x=v($(_),9),N=Re(i.n[x.k])+Re(i.d[x.k])-x.e.d,u=Re(i.n[x.k])+Re(i.d[x.k])+x.j.b+x.e.a,N>C&&u>C)C=Re(i.n[x.k])+Re(i.d[x.k])+x.j.b+x.e.a;else{f=!1,e.a&&jf();break}if(!f)break}return e.a&&jf(),f}function Q_e(e){var n,i,u,f,g,y,x,_;return isNaN(e)?(my(),GI):e<-9223372036854776e3?(my(),Zre):e>=9223372036854776e3?(my(),qre):(f=!1,e<0&&(f=!0,e=-e),u=0,e>=Hc&&(u=vr(e/Hc),e-=u*Hc),i=0,e>=$f&&(i=vr(e/$f),e-=i*$f),n=vr(e),g=Pc(n,i,u),f&&(y=~g.l+1&_o,x=~g.m+(y==0?1:0)&_o,_=~g.h+(y==0&&x==0?1:0)&Gc,g.l=y,g.m=x,g.h=_),g)}function W_e(e){var n,i,u,f,g,y,x;if(f=rv(e),wl(new V(f))){for(x=new mo(0,0,e.e.j.a,e.e.j.b),i=new V(f);i.a<i.c.c.length;)n=v($(i),129),u=new mo(n.e.i.a,n.e.i.b,n.e.j.a,n.e.j.b),iv(x,u);y=new sj((g=v(e.e,7).d,new vs(g.d,g.b,g.a,g.c))),y.d=-x.e,y.a=x.e+x.b-e.e.j.b,y.b=-x.d,y.c=x.d+x.c-e.e.j.a,v(e.e,7).d.b=y.b,v(e.e,7).d.d=y.d,v(e.e,7).d.c=y.c,v(e.e,7).d.a=y.a}}function nne(e){var n,i,u,f,g;for(g=new V(e.f);g.a<g.c.c.length;)for(f=v($(g),7),u=new V(f.e);u.a<u.c.c.length;)if(i=v($(u),12),ut(X(i.d.f,(tn(),Dr)))!==ut((ba(),sc)))throw new p1((n=gy(e),mI+(n??m1(e.k))+"' has its layer constraint set to LAST or LAST_SEPARATE, but has at least one outgoing edge. Connections between nodes with these "+wI))}function J_e(e,n,i,u){var f,g,y,x,_,C;for(g=new V(e);g.a<g.c.c.length;){if(f=v($(g),12),y=f.c,n.a.R(y))x=(Tl(),Tu);else if(i.a.R(y))x=(Tl(),oh);else throw new Pn("Source port must be in one of the port sets.");if(_=f.d,n.a.R(_))C=(Tl(),Tu);else if(i.a.R(_))C=(Tl(),oh);else throw new Pn("Target port must be in one of the port sets.");Ke(u,new rte(f,x,C))}}function rne(e,n){var i,u,f,g,y,x;if("edges"in n.a){if(x=Qn(n,"edges"),!x.hc())throw new Ks("The 'edges' property of a node has to be an array.",x,n);for(g=x.hc(),y=0;y<g.a.length;++y){if(f=Tc(g,y),!f.kc())throw new Ks("All elements of the 'edges' property must be objects.",f,n);d3e(e,f.kc())}}if(tg in n.a)for(u=Qn(n,tg).hc(),y=0;y<u.a.length;++y)i=Tc(u,y).kc(),rne(e,i)}function $y(e){var n,i,u,f,g,y,x,_;for(u=new V(e.a.a);u.a<u.c.c.length;){for(i=v($(u),78),i.g=null,y=(_=new hn(i.a.a).a.bb().mb(),new yn(_));y.a.G();)f=(n=v(y.a.H(),21),v(n.yb(),25)),bu(f.g),(!i.g||f.j.d<i.g.j.d)&&(i.g=f);for(g=(x=new hn(i.a.a).a.bb().mb(),new yn(x));g.a.G();)f=(n=v(g.a.H(),21),v(n.yb(),25)),f.g.a=f.j.d-i.g.j.d,f.g.b=f.j.e-i.g.j.e}return e}function X_e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;for(i=!1,G=mv*e.b.f*e.b.d,f=new V(n.c);f.a<f.c.c.length;)for(u=v($(f),16),C=new V(u.a),g=v($(C),9),N=Pj(e.a[g.k]);C.a<C.c.c.length;)x=v($(C),9),A=Pj(e.a[x.k]),N!=A&&(O=Ob(e.b,g,x),y=g.i.b+g.j.b+g.e.a+N.a+O,_=x.i.b-x.e.d+A.a,y>_+G&&(Y=N.i+A.i,A.a=(A.i*A.a+N.i*N.a)/Y,A.i=Y,N.g=A,i=!0)),g=x,N=A;return i}function eEe(e){var n,i,u,f,g,y;if(ut(X(e,(Ye(),St)))===ut((tr(),Ps))||ut(X(e,St))===ut(ki)){for(y=new V(e.f);y.a<y.c.c.length;)if(g=v($(y),7),g.g==(Be(),yt)||g.g==Et)return!1}if(Zs(v(X(e,St),28))){for(f=mr(e,(Be(),ot)).mb();f.G();)if(u=v(f.H(),7),u.b.c.length!=0)return!1}for(i=Vt(Un(e));Ft(i);)if(n=v(Ot(i),12),n.c.f==n.d.f)return!1;return!0}function ine(e,n){var i,u,f,g,y,x,_,C,N;if(f=e.f,y=f.j.a,g=f.j.b,y<=0&&g<=0)return Be(),Sr;switch(C=e.i.a,N=e.i.b,x=e.j.a,i=e.j.b,n.e){case 2:case 1:if(C<0)return Be(),lt;if(C+x>y)return Be(),ot;break;case 4:case 3:if(N<0)return Be(),yt;if(N+i>g)return Be(),Et}return _=(C+x/2)/y,u=(N+i/2)/g,_+u<=1&&_-u<=0?(Be(),lt):_+u>=1&&_-u>=0?(Be(),ot):u<.5?(Be(),yt):(Be(),Et)}function ane(e,n,i,u,f,g,y){var x,_,C,N,A,O;for(O=new hx,C=n.mb();C.G();)for(x=v(C.H(),627),A=new V(bee(x));A.a<A.c.c.length;)N=v($(A),129),ut(xr(N,(Ye(),Fa)))===ut((eu(),Sd))&&(Wte(O,N,!1,u,f,g,y),iv(e,O));for(_=i.mb();_.G();)for(x=v(_.H(),627),A=new V(bee(x));A.a<A.c.c.length;)N=v($(A),129),ut(xr(N,(Ye(),Fa)))===ut((eu(),Wl))&&(Wte(O,N,!0,u,f,g,y),iv(e,O))}function I7(e,n){var i,u,f,g,y,x,_,C;for(_=new V(n.f);_.a<_.c.c.length;)for(x=v($(_),7),f=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[x.b,x.e]))))));Ft(f);)u=v(Ot(f),12),i=u.c==x?u.d:u.c,g=i.f,n!=g&&(C=v(X(u,(Ce(),No)),24).a,C<0&&(C=0),y=g.k,e.b[y]==0&&(u.d==i?(e.a[y]-=C+1,e.a[y]<=0&&e.c[y]>0&&_n(e.e,g)):(e.c[y]-=C+1,e.c[y]<=0&&e.a[y]>0&&_n(e.d,g))))}function tEe(e,n){var i,u,f,g,y,x,_,C,N;for(y=new V(n.c);y.a<y.c.c.length;)for(g=v($(y),16),C=new V(g.a);C.a<C.c.c.length;){for(_=v($(C),9),N=new Ve,x=0,f=Vt(Yr(_));Ft(f);)i=v(Ot(f),12),v(X(i,(Ce(),No)),24).a>x&&(x=v(X(i,No),24).a);for(u=Vt(Yr(_));Ft(u);)i=v(Ot(u),12),_.d!=i.c.f.d&&v(X(i,(Ce(),No)),24).a==x&&Ke(N,new Ar(i.c.f,i));wo(N,e.c),El(e.b,_.k,N)}}function nEe(e,n){var i,u,f,g,y,x,_,C,N;for(y=new V(n.c);y.a<y.c.c.length;)for(g=v($(y),16),C=new V(g.a);C.a<C.c.c.length;){for(_=v($(C),9),N=new Ve,x=0,f=Vt(Un(_));Ft(f);)i=v(Ot(f),12),v(X(i,(Ce(),No)),24).a>x&&(x=v(X(i,No),24).a);for(u=Vt(Un(_));Ft(u);)i=v(Ot(u),12),_.d!=i.d.f.d&&v(X(i,(Ce(),No)),24).a==x&&Ke(N,new Ar(i.d.f,i));wo(N,e.c),El(e.f,_.k,N)}}function L7(e){yX();var n,i,u,f,g,y,x,_,C,N;for(this.b=new li,this.c=new Ve,this.a=new Ve,_=MA(),C=0,N=_.length;C<N;++C)x=_[C],lj(af,x,new Ve);for(i=e.mb();i.G();)n=v(i.H(),75),$n(this.a,sk(n)),n.g.a.Y()==0?v(od(af,n.e),20).ib(n):Ke(this.c,n);for(g=(y=new ub(af).a.bb().mb(),new cb(y));g.a.G();)f=(u=v(g.a.H(),21),v(u.zb(),20)),wo(f,this.b);Fy(v(od(af,(Fi(),as)),20))}function one(e,n){var i,u,f,g,y,x,_;if(_=v(X(n,(Ye(),St)),28),_==(tr(),Ps)||_==ki)for(g=(i=v(X(n,(Ce(),Is)),15).a,new kt(n.e.a+n.a.b+n.a.c+2*i,n.e.b+n.a.d+n.a.a+2*i)).b,x=new V(e.a);x.a<x.c.c.length;)y=v($(x),9),y.g==(gt(),Zn)&&(u=v(X(y,ni),32),!(u!=(Be(),ot)&&u!=lt)&&(f=Re(Wt(X(y,oc))),_==Ps&&(f*=g),y.i.b=f-v(X(y,Xu),10).b,jy(y,!1,!0)))}function sne(e,n){var i,u,f,g,y,x,_,C;for(i=new ko(e.d.c),bo(i,(gt(),sa)),_e(i,(Ye(),St),v(X(n,St),28)),_e(i,Ma,v(X(n,Ma),86)),i.k=e.d.b++,Ke(e.b,i),i.j.b=n.j.b,i.j.a=0,C=(Be(),ot),g=Ml(mr(n,C)),_=new V(g);_.a<_.c.c.length;)x=v($(_),7),Tn(x,i);return y=new ur,en(y,C),Tn(y,n),y.i.a=i.j.a,y.i.b=i.j.b/2,f=new ur,en(f,Rk(C)),Tn(f,i),f.i.b=i.j.b/2,f.i.a=-f.j.a,u=new Qs,er(u,y),Fn(u,f),i}function rEe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y;for(_=new Lx,M2e(e,_),f=new BX(n),G=new Ve,Ke(G,(Y=e.j,v(L$(UQ(Y||(e.j=new _q(e)))),7))),O=new Ve;G.c.length!=0;){for(x=v($(new V(G)),7),O.c[O.c.length]=x,u=Wj(e,x),y=new gp(u.b.mb());y.b.G();)if(g=v(y.b.H(),12),Rxe(f,g,i))for(A=v(u_(_,g),20),N=A.mb();N.G();)C=v(N.H(),7),ia(O,C,0)!=-1||(G.c[G.c.length]=C);zr(G,x)}return f}function Ky(e,n){var i,u,f,g,y,x,_;for(i=RegExp(n,"g"),x=Ie(F_,qr,2,0,5,1),u=0,_=e,g=null;;)if(y=i.exec(_),y==null||_==""){x[u]=_;break}else x[u]=Hx(_,0,y.index),_=Hx(_,y.index+y[0].length,(Vn(),_.length)),i.lastIndex=0,g==_&&(x[u]=_.substr(0,1),_=Ap(_,1,_.length-1)),g=_,++u;if(Vn(),e.length>0){for(f=x.length;f>0&&x[f-1]=="";)--f;f<x.length&&(x.length=f)}return x}function iEe(e){var n,i,u,f,g,y;for(y=new V(Rc(e.e));y.a<y.c.c.length;)switch(g=v($(y),161),v(g.e,7).g.e){case 4:e.q.b=et(e.q.b,(i=v(g.e,7).d,new vs(i.d,i.b,i.a,i.c)).c);break;case 2:e.q.c=et(e.q.c,(u=v(g.e,7).d,new vs(u.d,u.b,u.a,u.c)).b);break;case 1:e.q.d=et(e.q.d,(f=v(g.e,7).d,new vs(f.d,f.b,f.a,f.c)).a);break;case 3:e.q.a=et(e.q.a,(n=v(g.e,7).d,new vs(n.d,n.b,n.a,n.c)).d)}}function O7(e,n,i,u,f){var g,y,x;return g=n.$b(i,e.b),g<0?(y=e.e,y?(e.e=O7(y,n,i,u,f),u==0&&f[0]!=0?--e.a:u>0&&f[0]==0&&++e.a,e.j=Ur(e.j,u-f[0]),Qu(e)):(f[0]=0,u>0?wA(e,i,u):e)):g>0?(x=e.g,x?(e.g=O7(x,n,i,u,f),u==0&&f[0]!=0?--e.a:u>0&&f[0]==0&&++e.a,e.j=Ur(e.j,u-f[0]),Qu(e)):(f[0]=0,u>0?mA(e,i,u):e)):(f[0]=e.c,u==0?x7(e):(e.j=Ur(e.j,u-e.c),e.c=u,e))}function aEe(e){var n,i,u,f,g,y,x;for(e.o=new i6,u=new fi,y=new V(e.e.a);y.a<y.c.c.length;)g=v($(y),61),Yf(g).c.length==1&&Ir(u,g,u.c.b,u.c);for(;u.b!=0;)g=v(u.b==0?null:(_t(u.b!=0),yu(u,u.a.a)),61),Yf(g).c.length!=0&&(n=v(ct(Yf(g),0),89),i=g.g.c.length>0,x=Fk(n,g),hK(i?x.c:x.g,n),Yf(x).c.length==1&&Ir(u,x,u.c.b,u.c),f=new Ar(g,n),W$(e.o,f),zr(e.e.a,g))}function R7(e,n,i,u,f){var g,y,x;return g=n.$b(i,e.b),g<0?(y=e.e,y?(e.e=R7(y,n,i,u,f),f[0]>0&&(u>=f[0]?(--e.a,e.j=Lc(e.j,f[0])):e.j=Lc(e.j,u)),f[0]==0?e:Qu(e)):(f[0]=0,e)):g>0?(x=e.g,x?(e.g=R7(x,n,i,u,f),f[0]>0&&(u>=f[0]?(--e.a,e.j=Lc(e.j,f[0])):e.j=Lc(e.j,u)),Qu(e)):(f[0]=0,e)):(f[0]=e.c,u>=e.c?x7(e):(e.c-=u,e.j=Lc(e.j,u),e))}function une(e,n,i){var u,f,g,y,x,_,C,N;for(_=new V(i.b);_.a<_.c.c.length;)x=v($(_),9),y=v(X(x,(Ce(),uf)),55),y&&(N=une(e,n,y),x.j.a=(g=v(X(N,Is),15).a,new kt(N.e.a+N.a.b+N.a.c+2*g,N.e.b+N.a.d+N.a.a+2*g)).a,x.j.b=(f=v(X(N,Is),15).a,new kt(N.e.a+N.a.b+N.a.c+2*f,N.e.b+N.a.d+N.a.a+2*f)).b);return C=new U1,u=td(X(i,(Ye(),KI))),u!=null&&ls(u,"de.cau.cs.kieler.fixed")?l3e(i,C):Xxe(n,i,C),i}function cne(e){var n,i,u,f,g,y,x,_;x=v(X(e,(Ye(),Uc)),18),_=v(X(e,Rv),18),u=v(X(e,(Ce(),Is)),15).a,e.d.a+=u,e.d.b+=u,e.e.a+=2*u,e.e.b+=2*u,_e(e,Is,new dn(0)),f=(i=v(X(e,Is),15).a,new kt(e.e.a+e.a.b+e.a.c+2*i,e.e.b+e.a.d+e.a.a+2*i)),n=new lr(f),x.kb((Ku(),Gv))&&(y=v(X(e,sg),15).a,g=v(X(e,og),15).a,_.kb((vd(),zv))&&(y<=0&&(y=20),g<=0&&(g=20)),n.a=et(f.a,y),n.b=et(f.b,g)),EEe(e,f,n)}function lne(e,n,i){var u,f,g,y,x,_,C,N;if(n.k==0){for(n.k=1,y=i,i||(f=new Ve,g=(u=v(da($r),11),new xi(u,v(ea(u,u.length),11),0)),y=new Ar(f,g)),v(y.a,20).ib(n),n.g==(gt(),Zn)&&v(y.b,18).ib(v(X(n,(Ce(),ni)),32)),_=new V(n.f);_.a<_.c.c.length;)for(x=v($(_),7),N=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[new dp(x),new Dh(x)]))))));Ft(N);)C=v(Ot(N),7),lne(e,C.f,y);return y}return null}function oEe(e,n,i,u){var f,g,y,x,_;switch(_=new lr(n.i),_.a+=n.j.a/2,_.b+=n.j.b/2,x=v(X(n,(Ce(),gg)),15).a,g=e.e,y=e.a,f=e.d,v(X(n,ni),32).e){case 1:_.a+=y.b+f.a-i/2,_.b=-u-x,n.i.b=-(y.d+x+f.b);break;case 2:_.a=g.a+y.b+y.c+x,_.b+=y.d+f.b-u/2,n.i.a=g.a+y.c+x-f.a;break;case 3:_.a+=y.b+f.a-i/2,_.b=g.b+y.d+y.a+x,n.i.b=g.b+y.a+x-f.b;break;case 4:_.a=-i-x,_.b+=y.d+f.b-u/2,n.i.a=-(y.b+x+f.a)}return _}function sEe(e,n){var i,u,f,g,y,x,_;for(g=new V(n.b);g.a<g.c.c.length;)f=v($(g),9),y=X(f,(Ce(),Ct)),Ze(y,7)&&(x=v(y,7),_=oEe(n,f,x.j.a,x.j.b),x.i.a=_.a,x.i.b=_.b,en(x,v(X(f,ni),32)));i=(u=v(X(n,(Ce(),Is)),15).a,new kt(n.e.a+n.a.b+n.a.c+2*u,n.e.b+n.a.d+n.a.a+2*u)),v(X(n,ui),18).kb((jr(),As))?(_e(e,(Ye(),St),(tr(),ki)),v(X(ta(e),ui),18).ib(sh),$7(e,i,!1)):$7(e,i,!0)}function D7(e,n,i){var u,f,g,y,x;switch(x=null,n.e){case 1:for(f=new V(e.f);f.a<f.c.c.length;)if(u=v($(f),7),Yt(Re(Zt(X(u,(Ce(),uC))))))return u;x=new ur,_e(x,(Ce(),uC),(zn(),zn(),Ei));break;case 2:for(y=new V(e.f);y.a<y.c.c.length;)if(g=v($(y),7),Yt(Re(Zt(X(g,(Ce(),cC))))))return g;x=new ur,_e(x,(Ce(),cC),(zn(),zn(),Ei))}return x&&(Tn(x,e),en(x,i),X2e(x.i,e.j,i)),x}function fne(e,n){var i,u,f,g,y,x,_;return Nt(n),Qh(e.a.t(n.a)),u=e.b,g=e.e,y=e.d,e.b?n.b&&(i=e.a.$b(e.e,n.e),(i<0||i==0&&n.d==(Ko(),Eo))&&(g=n.e,y=n.d)):(u=n.b,g=n.e,y=n.d),f=e.c,x=e.g,_=e.f,e.c?n.c&&(i=e.a.$b(e.g,n.g),(i>0||i==0&&n.f==(Ko(),Eo))&&(x=n.g,_=n.f)):(f=n.c,x=n.g,_=n.f),u&&f&&(i=e.a.$b(g,x),(i>0||i==0&&y==(Ko(),Eo)&&_==(Ko(),Eo))&&(g=x,y=(Ko(),Eo),_=cm)),new Uy(e.a,u,g,y,f,x,_)}function uEe(e,n,i,u){var f,g,y,x,_,C,N;if(i.c.f!=n.f)for(f=new ko(e),bo(f,(gt(),An)),_e(f,(Ce(),Ct),i),_e(f,(Ye(),St),(tr(),ki)),u.c[u.c.length]=f,y=new ur,Tn(y,f),en(y,(Be(),lt)),x=new ur,Tn(x,f),en(x,ot),Fn(i,y),g=new Qs,$u(g,i),_e(g,dr,null),er(g,x),Fn(g,n),dte(f,y,x),C=new jn(i.b,0);C.b<C.d.Y();)_=(_t(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),33)),N=v(X(_,Fa),107),N==(eu(),Wl)&&(Jo(C),Ke(g.b,_))}function cEe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y,ee,re;for(g=i+(n.n+1)*e.a,y=n.b,f=new kt(g,y),_=(N=new hn(n.c.a).a.bb().mb(),new yn(N));_.a.G();)x=(C=v(_.a.H(),21),v(C.yb(),12)),Y=ra(x.d),A=ra(x.c),G=new kt(g,A.b),re=new kt(g,Y.b),O=new kt(i-10,A.b),ee=new kt(u,Y.b),Y.a>=u&&A.a>=u&&(O.a=u),Y.a<=i&&A.a<=i&&(ee.a=i-10),n.c.a.Y()==1?uA(x.a,be(ve(rn,1),nn,10,0,[O,G,re,ee])):uA(x.a,be(ve(rn,1),nn,10,0,[O,G,f,re,ee]))}function Vl(e,n){var i,u,f,g,y,x;for(g=e.c,y=e.d,er(e,null),Fn(e,null),n&&Yt(Re(Zt(X(y,(Ce(),uC)))))?er(e,D7(y.f,(Cr(),_i),(Be(),ot))):er(e,y),n&&Yt(Re(Zt(X(g,(Ce(),cC)))))?Fn(e,D7(g.f,(Cr(),la),(Be(),lt))):Fn(e,g),u=new V(e.b);u.a<u.c.c.length;)i=v($(u),33),f=v(X(i,(Ye(),Fa)),107),f==(eu(),Sd)?_e(i,Fa,Wl):f==Wl&&_e(i,Fa,Sd);x=Yt(Re(Zt(X(e,(Ce(),ju))))),_e(e,ju,(zn(),x?Xn:Ei)),e.a=jk(e.a)}function B7(e){var n,i,u,f,g,y;for(U6(this),i=e.Y()-1;i<3;i++)e.rb(0,v(e.sb(0),10));if(e.Y()<4)throw new Pn("At (least dimension + 1) control points are necessary!");for(this.c=3,this.e=!0,this.f=!0,this.d=!1,Lke(this,e.Y()+this.c-1),y=new Ve,g=this.g.mb(),n=0;n<this.c-1;n++)Ke(y,Wt(g.H()));for(f=e.mb();f.G();)u=v(f.H(),10),Ke(y,Wt(g.H())),this.b.ib(new ok(u,y)),qn(0,y.c.length),y.c.splice(0,1)}function lEe(e){var n,i,u,f,g,y,x,_,C,N,A;for(A=new a1,A.d=0,y=new V(e.c);y.a<y.c.c.length;)g=v($(y),16),A.d+=g.a.c.length;for(u=0,f=0,A.a=Ie(pr,hr,26,e.c.c.length,12,1),C=0,A.e=Ie(pr,hr,26,A.d,12,1),i=new V(e.c);i.a<i.c.c.length;)for(n=v($(i),16),n.k=u++,A.a[n.k]=f++,N=0,_=new V(n.a);_.a<_.c.c.length;)x=v($(_),9),x.k=C++,A.e[x.k]=N++;return A.c=new Zq(A),A.b=xl(A.d),tEe(A,e),A.f=xl(A.d),nEe(A,e),A}function fEe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for(x=Ie(pr,hr,26,n.c.c.length,12,1),C=Ie(wL,Je,132,n.c.c.length,0,1),A=e.a,O=0,G=A.length;O<G;++O){for(N=A[O],ee=0,y=new V(N.f);y.a<y.c.c.length;)f=v($(y),9),_=f.g,u=Pa(f.d),++x[u],Y=e.b.a*e.b.d,x[u]>0&&C[u]&&(Y=Rx(e.b,C[u],_)),ee=et(ee,f.d.c.b+Y);for(g=new V(N.f);g.a<g.c.c.length;)f=v($(g),9),f.i.b=ee+f.e.d,i=f.d,i.c.b=ee+f.e.d+f.j.b+f.e.a,C[ia(i.b.c,i,0)]=f.g}}function hne(e){var n,i,u,f,g,y,x,_,C,N;for(_=new V(e.a);_.a<_.c.c.length;)if(x=v($(_),9),x.g==(gt(),Zn)&&(f=v(X(x,(Ce(),ni)),32),f==(Be(),ot)||f==lt))for(u=Vt(ov(x));Ft(u);)i=v(Ot(u),12),n=i.a,n.b!=0&&(C=i.c,C.f==x&&(g=(_t(n.b!=0),v(n.a.a.c,10)),g.b=Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).b),N=i.d,N.f==x&&(y=(_t(n.b!=0),v(n.c.b.c,10)),y.b=Mn(be(ve(rn,1),nn,10,0,[N.f.i,N.i,N.a])).b))}function hEe(e,n,i,u){var f,g,y,x,_,C;for(y=new _ne(e,n,i),_=new jn(u,0),f=!1;_.b<_.d.Y();)x=(_t(_.b<_.d.Y()),v(_.d.sb(_.c=_.b++),102)),x==n||x==i?Jo(_):!f&&Re(Xa(x.g,x.d[0]).a)>Re(Xa(y.g,y.d[0]).a)?(_t(_.b>0),_.a.sb(_.c=--_.b),Uu(_,y),f=!0):x.e&&x.e.Y()>0&&(g=(!x.e&&(x.e=new Ve),x.e).nb(n),C=(!x.e&&(x.e=new Ve),x.e).nb(i),(g||C)&&((!x.e&&(x.e=new Ve),x.e).ib(y),++y.c));f||(u.c[u.c.length]=y)}function dEe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y;i.d.f!=n.f&&(f=new ko(e),bo(f,(gt(),An)),_e(f,(Ce(),Ct),i),_e(f,(Ye(),St),(tr(),ki)),u.c[u.c.length]=f,y=new ur,Tn(y,f),en(y,(Be(),lt)),x=new ur,Tn(x,f),en(x,ot),_=i.d,Fn(i,y),g=new Qs,$u(g,i),_e(g,dr,null),er(g,x),Fn(g,_),C=v(ct(y.b,0),12).c,N=C.f,A=N.g,O=v(ct(x.e,0),12).d,G=O.f,Y=G.g,A==An?_e(f,ua,v(X(N,ua),7)):_e(f,ua,C),Y==An?_e(f,Zi,v(X(G,Zi),7)):_e(f,Zi,O))}function pEe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe;return x=e.b[n],_=e.b[i],C=v(X(x,(Ce(),Gd)),20),C&&C.Y()!=0&&C.kb(_)||(N=x.g!=(gt(),An)&&_.g!=An,A=v(X(x,sf),9),O=v(X(_,sf),9),G=!!A&&A!=x||!!O&&O!=_,Y=A!=O,ee=Yee(x,(Be(),yt)),re=Yee(_,Et),oe=G&&Y||ee||re,N&&oe)||x.g==(gt(),wr)&&_.g==nr||_.g==(gt(),wr)&&x.g==nr?!1:(y=e.b[n],u=e.b[i],mxe(e.c,y,u),Exe(e.d,y,u),g=MX(e.a,y,u)+e.c.d+e.d.d,f=MX(e.a,u,y)+e.c.b+e.d.b,g>f)}function gEe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for(y=n,O=n.d,N=n.c.f,G=n.d.f,A=Pa(N.d),Y=Pa(G.d),x=A;x<Y;x++)f=new ko(e),bo(f,(gt(),An)),_e(f,(Ce(),Ct),y),_e(f,(Ye(),St),(tr(),ki)),_=v(ct(e.c,x+1),16),Wr(f,_),ee=v(X(y,Cs),15).a,ee<0&&(ee=0,_e(y,Cs,new dn(ee))),f.j.b=ee,C=Math.floor(ee/2),u=new ur,en(u,(Be(),lt)),Tn(u,f),u.i.b=C,g=new ur,en(g,ot),Tn(g,f),g.i.b=C,Fn(y,u),i=new Qs,$u(i,y),_e(i,dr,null),er(i,g),Fn(i,O),hxe(f,y,i),y=i}function bEe(e,n){if(Fi(),e==n)return Yk(e);switch(e.e){case 1:switch(n.e){case 4:return as;case 1:return cu;case 2:return Kc;case 3:return ac}case 2:switch(n.e){case 1:return Kc;case 2:return rc;case 3:return ic;case 4:return Ms}case 3:switch(n.e){case 2:return ic;case 3:return js;case 4:return Jc;case 1:return ac}case 4:switch(n.e){case 3:return Jc;case 4:return Wc;case 1:return as;case 2:return Ms}}return ah}function vEe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for(A=new pa,f=null,y=new V(e.c);y.a<y.c.c.length;){for(g=v($(y),16),_=new V(g.a);_.a<_.c.c.length;)x=v($(_),9),x.g==(gt(),Zn)&&(N=v(X(x,(Ce(),Gm)),9),N&&(txe(N,A),O=new ur,Tn(O,x),G=v(X(x,ni),32),en(O,G),Y=v(ct(N.f,0),7),ee=new Qs,er(ee,O),Fn(ee,Y)));f=g}for(i=(C=new hn(A.a).a.bb().mb(),new yn(C));i.a.G();)n=(u=v(i.a.H(),21),v(u.yb(),9)),Wr(n,f);return A}function dne(e,n,i){var u,f,g,y,x,_,C,N,A;for(f=new Ve,C=new V(n.b);C.a<C.c.c.length;)if(_=v($(C),9),x=v(X(_,(Ce(),uf)),55),x&&(u=dne(e,x,_),$n(f,u),uCe(e,x,_),v(X(x,ui),18).kb((jr(),As))))for(A=new V(_.f);A.a<A.c.c.length;)N=v($(A),7),pn(e.b,N)==null&&(g=Qy(N,(tr(),Ss),N.g,-(N.b.c.length-N.e.c.length),N.j,v(X(x,(Ye(),is)),59),x),_e(g,Ct,N),Nn(e.b,N,g),Ke(x.b,g));return y=new Ve,fCe(e,n,i,f,y),i&&iCe(e,n,i,y),y}function yEe(e){var n,i,u,f,g,y,x,_,C,N,A,O;for(n=wte(e),N=(x=new hn(n).a.bb().mb(),new yn(x));N.a.G();){for(C=(f=v(N.a.H(),21),v(f.yb(),9)),A=C.e.d,O=C.j.b+C.e.a,e.d[C.k]=0,i=C;(g=e.a[i.k])!=C;)u=u2e(i,g),e.c==(Xo(),uu)?_=u.d.i.b+u.d.a.b-u.c.i.b-u.c.a.b:_=u.c.i.b+u.c.a.b-u.d.i.b-u.d.a.b,y=Re(e.d[i.k])+_,e.d[g.k]=y,A=et(A,g.e.d-y),O=et(O,y+g.j.b+g.e.a),i=g;i=C;do e.d[i.k]=Re(e.d[i.k])+A,i=e.a[i.k];while(i!=C);e.b[C.k]=A+O}}function v_(e,n,i){var u,f,g,y,x,_,C,N;return u=e.a.k==(Bo(),So)?Vi:ti,x=qte(e,new H$(n,i)),!x.a&&x.c?(_n(e.d,x),u):x.a?(f=x.a.c,_=x.a.d,i?(C=e.a.c==(Xo(),$c)?_:f,g=e.a.c==$c?f:_,y=e.a.f[g.f.k],N=Re(e.a.n[y.k])+Re(e.a.d[g.f.k])+g.i.b+g.a.b-Re(e.a.d[C.f.k])-C.i.b-C.a.b):(C=e.a.c==(Xo(),uu)?_:f,g=e.a.c==uu?f:_,N=Re(e.a.n[e.a.f[g.f.k].k])+Re(e.a.d[g.f.k])+g.i.b+g.a.b-Re(e.a.d[C.f.k])-C.i.b-C.a.b),N):u}function mEe(e){var n,i,u,f,g;for(_e(e.g,(Ce(),L9),Ba(e.g.c)),n=1;n<e.c.c.length-1;++n)_e(v(ct(e.c,n),9),(Ye(),Ma),(Wu(),ln(qi,be(ve(Kn,1),Je,41,0,[Ya,Co]))));for(u=xn(Ba(e.g.c),0);u.b!=u.d.c;)i=v(fn(u),33),f=v(X(e.g,(Ye(),Ma)),86),Ac(f,ln((Wu(),ka),be(ve(Kn,1),Je,41,0,[ma,Ya])))||(Ac(f,ln(ka,be(ve(Kn,1),Je,41,0,[xa,Ya])))?(Ke(e.e.c,i),zr(e.g.c,i),g=new N$(e,i),_e(e.g,oC,g)):(g_e(e,i),Ke(e.i,e.d),_e(e.g,oC,$2e(e.i))))}function pne(e,n,i,u){var f,g,y,x,_,C,N;if(g=Gk(u),x=Yt(Re(Zt(X(u,(tn(),$9))))),(x||Yt(Re(Zt(X(e,(Ye(),jv))))))&&!Zs(v(X(e,(Ye(),St)),28)))f=Ny(g),_=D7(e,i,i==(Cr(),_i)?f:Rk(f));else switch(_=new ur,Tn(_,e),N=_.i,N.a=n.a-e.i.a,N.b=n.b-e.i.b,eke(N,e.j.a,e.j.b),en(_,ine(_,g)),y=v(X(u,(Ce(),ui)),18),C=_.g,g.e){case 2:case 1:(C==(Be(),yt)||C==Et)&&y.ib((jr(),uh));break;case 4:case 3:(C==(Be(),ot)||C==lt)&&y.ib((jr(),uh))}return _}function wEe(e){var n,i,u,f,g,y,x,_;for(u=ej(Ml(e.a)),f=(n=v(da(lg),11),new xi(n,v(ea(n,n.length),11),0));u.a.G()||u.b.mb().G();)i=v(dA(u),12),x=i.c.g,_=i.d.g,x==(Be(),Sr)?_!=Sr&&(y=Yk(_),_e(i,(Ce(),Jv),y),en(i.c,_),Ai(f,y),u.a.I()):_==Sr?(y=Yk(x),_e(i,(Ce(),Jv),y),en(i.d,x),Ai(f,y),u.a.I()):(y=bEe(x,_),_e(i,(Ce(),Jv),y),Ai(f,y),u.a.I());return f.c==1?g=v(Al(new Kh(f)),60):g=(Fi(),ah),qp(e,g,!1),g}function xEe(e,n){var i,u,f,g;for(f=0;f<(Vn(),n.length)&&pX(n.charCodeAt(f),Wne);)++f;for(i=n.length;i>0&&pX(n.charCodeAt(i-1),Jne);)--i;if(f>=i)throw new Pn("The given string does not contain any numbers.");if(g=Ky(n.substr(f,i-f),`,|;|\r|
|
|
363
|
+
`),g.length!=2)throw new Pn("Exactly two numbers are expected, "+g.length+" were found.");try{e.a=Hy(Rl(g[0])),e.b=Hy(Rl(g[1]))}catch(y){throw y=hi(y),Ze(y,130)?(u=y,new Pn(Xne+u)):di(y)}}function kEe(e,n,i){var u,f,g,y,x,_,C,N,A;for(_=i+n.d.c.a,A=new V(n.f);A.a<A.c.c.length;){if(N=v($(A),7),u=Mn(be(ve(rn,1),nn,10,0,[N.f.i,N.i,N.a])),g=new kt(0,u.b),N.g==(Be(),ot))g.a=_;else if(N.g==lt)g.a=i;else continue;if(u.a!=g.a)for(f=N.e.c.length+N.b.c.length>1,x=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[N.b,N.e]))))));Ft(x);)y=v(Ot(x),12),C=y.c==N?y.d:y.c,wi(Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).b-g.b)>1&&Ske(e,y,g,f,N)}}function gne(e,n){var i,u,f,g,y,x;for(y=new Uf(new zu(e.f.b).a);y.b;){if(g=Hp(y),f=v(g.yb(),251),n==1){if(f.yc()!=(sr(),Su)&&f.yc()!=ou)continue}else if(f.yc()!=(sr(),uo)&&f.yc()!=ya)continue;switch(u=v(v(g.zb(),27).b,25),x=v(v(g.zb(),27).a,78),i=x.c,f.yc().e){case 2:u.j.d=e.e.a,u.j.c=et(1,u.j.c+i);break;case 1:u.j.d=u.j.d+i,u.j.c=et(1,u.j.c-i);break;case 4:u.j.e=e.e.b,u.j.b=et(1,u.j.b+i);break;case 3:u.j.e=u.j.e+i,u.j.b=et(1,u.j.b-i)}}}function G7(e,n,i,u,f){var g,y,x,_,C,N,A,O,G;for(O=(Wn(),new an),x=new Ve,tte(e,i,e.d.Mc(),x,O),tte(e,u,e.d.Nc(),x,O),_=new jn(x,0);_.b<_.d.Y();)for(g=(_t(_.b<_.d.Y()),v(_.d.sb(_.c=_.b++),80)),C=new jn(x,_.b);C.b<C.d.Y();)y=(_t(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),80)),E_e(g,y,e.a);for(a3e(x,v(X(n,(Ce(),Hd)),154)),sCe(x),G=-1,A=new V(x);A.a<A.c.c.length;)N=v($(A),80),!(wi(N.k-N.a)<Ju)&&(G=mi(G,N.i),e.d.Kc(N,f));return e.b.a.Q(),G+1}function bne(e,n,i){var u,f;switch(f=new lr(n),u=new lr(e.j),i.e){case 1:case 8:case 7:Da(f,-u.a/2,-u.b),Da(n,0,-(.5+u.b));break;case 3:case 4:case 5:Da(f,-u.a/2,0),Da(n,0,.5+u.b);break;case 0:Da(f,-u.a/2,-u.b),Da(n,0,-(.5+-u.b));break;case 10:case 2:Da(f,0,-u.b/2),Da(n,0,-(.5+u.b));break;case 6:Da(f,-u.a,u.b/2),Da(n,0,-(.5+u.b));break;case 9:Da(f,-u.a/2,0),Da(n,0,-(.5+u.b));break;case 11:Da(f,-u.a,-u.b/2),Da(n,0,-(.5+u.b))}return On(bu(e.i),f),new kee(e)}function _Ee(e,n,i,u,f){jf();var g,y,x,_,C,N,A;if(QQ(e,"src"),QQ(i,"dest"),N=Bp(e),x=Bp(i),kj((N.g&4)!=0,"srcType is not an array"),kj((x.g&4)!=0,"destType is not an array"),C=N.c,g=x.c,kj(C.g&1?C==g:(g.g&1)==0,"Array types don't match"),A=e.length,_=i.length,n<0||u<0||f<0||n+f>A||u+f>_)throw new n6;if((!(C.g&1)||C.g&4)&&N!=x)if(e===i&&n<u)for(n+=f,y=u+f;y-- >u;)i[y]=e[--n];else for(y=u+f;u<y;)i[u++]=e[n++];else f>0&&Xk(e,n,i,u,f,!0)}function EEe(e,n,i){var u,f,g,y,x;if(u=v(X(e,(tn(),vC)),18),i.a>n.a&&(u.kb((Vp(),FE))?e.d.a+=(i.a-n.a)/2:u.kb(YE)&&(e.d.a+=i.a-n.a)),i.b>n.b&&(u.kb((Vp(),qE))?e.d.b+=(i.b-n.b)/2:u.kb(VE)&&(e.d.b+=i.b-n.b)),v(X(e,(Ce(),ui)),18).kb((jr(),As))&&(i.a>n.a||i.b>n.b))for(x=new V(e.b);x.a<x.c.c.length;)y=v($(x),9),y.g==(gt(),Zn)&&(f=v(X(y,ni),32),f==(Be(),ot)?y.i.a+=i.a-n.a:f==Et&&(y.i.b+=i.b-n.b));g=e.a,e.e.a=i.a-g.b-g.c,e.e.b=i.b-g.d-g.a}function H7(e,n,i,u,f,g){var y,x,_;if(y=n.$b(i,e.b),y<0)return x=e.e,x?(e.e=H7(x,n,i,u,f,g),g[0]==u&&(f==0&&g[0]!=0?--e.a:f>0&&g[0]==0&&++e.a,e.j=Ur(e.j,f-g[0])),Qu(e)):(g[0]=0,u==0&&f>0?wA(e,i,f):e);if(y>0)return _=e.g,_?(e.g=H7(_,n,i,u,f,g),g[0]==u&&(f==0&&g[0]!=0?--e.a:f>0&&g[0]==0&&++e.a,e.j=Ur(e.j,f-g[0])),Qu(e)):(g[0]=0,u==0&&f>0?mA(e,i,f):e);if(g[0]=e.c,u==e.c){if(f==0)return x7(e);e.j=Ur(e.j,f-e.c),e.c=f}return e}function y_(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re;for(_=e.e,G=e.f,y=e.d,Y=e.c,N=Y-1,ee=e.g,A=Ba(e.g.xb(1,e.g.Y()-1)),C=new Ve,i=0;i<e.b.Y()-1;i++)x=gs(Fu(vo(v(e.b.sb(i+1),92).a),v(e.b.sb(i),92).a),Y/(Re(Wt(ee.sb(i+Y)))-Re(Wt(ee.sb(i))))),C.c[C.c.length]=x;for(re=new Ve,g=xn(A,0),O=new Ve,n=0;n<N-1;n++)Ke(re,Wt(fn(g)));for(f=new V(C);f.a<f.c.c.length;)u=v($(f),10),Ke(re,Wt(fn(g))),Ke(O,new ok(u,re)),qn(0,re.c.length),re.c.splice(0,1);return new qA(_,G,y,N,A,O)}function vne(e){this.q=new e6,this.p=new e6,this.o=Ie(pr,hr,26,(Be(),be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt])).length,12,1),this.i=Ie(pr,hr,26,be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt]).length,12,1),this.j=Ie(Ea,Ui,26,be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt]).length,12,1),this.n=Ie(Ea,Ui,26,be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt]).length,12,1),this.g=Ie(uL,Je,100,be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt]).length,0,1),this.c=new FA(Yie),this.e=e,JZ(this.o),JZ(this.i),mx(this.n,0)}function z7(e,n){var i,u,f,g,y,x,_,C,N;if(y=n.i!=null&&!n.b,y||$t(n,"Component Layout",1),i=v(X(e,(Ce(),U9)),20),g=1/i.Y(),Yt(Re(Zt(X(e,(Ye(),Mv))))))for(N=i.mb();N.G();)C=v(N.H(),31),e$(Bp(C)),C.sc(e,zf(n,g));else for(N=i.mb();N.G();)C=v(N.H(),31),C.sc(e,zf(n,g));for(f=new V(e.c);f.a<f.c.c.length;)u=v($(f),16),$n(e.b,u.a),u.a.c=Ie(dt,tt,1,0,4,1);for(_=new V(e.b);_.a<_.c.c.length;)x=v($(_),9),Wr(x,null);e.c.c=Ie(dt,tt,1,0,4,1),y||zt(n)}function CEe(e,n){var i,u,f,g,y,x,_,C,N,A,O;for(y=new V(n);y.a<y.c.c.length;)f=v($(y),102),f.e=null,f.c=0;for(x=null,g=new V(n);g.a<g.c.c.length;){for(f=v($(g),102),N=f.d[0],O=v(X(N,(Ce(),Gd)),20).mb();O.G();)A=v(O.H(),9),(!f.e&&(f.e=new Ve),f.e).ib(e.b[A.d.k][A.k]),++e.b[A.d.k][A.k].c;if(N.g==(gt(),nr)){if(x)for(C=K6(new J2(e.c,x),0);C.c;)for(_=v(ck(C),9),u=K6(new J2(e.c,N),0);u.c;)i=v(ck(u),9),P1e(e.b[_.d.k][_.k]).ib(e.b[i.d.k][i.k]),++e.b[i.d.k][i.k].c;x=N}}}function PEe(e,n,i,u){var f,g,y,x,_,C;if(h7(n),g=v(X(u,(Ce(),ui)),18),x=(Ye(),Iv).b,!(x in n.a&&Qn(n,x).ic().a))switch(_=new ur,_e(_,Ct,n),Tn(_,i),y=v(Qn(n,"id"),97),cy(e.k,y.a,_),Nn(e.n,_,n),o_(n,_),By(n,_),b7(e,n,_,u),en(_,v(X(_,Ov),32)),C=v(X(i,St),28),C==(tr(),Yc)&&(C=Ss),f=v(X(u,is),59),f==(sr(),rs)&&(f=ya),HEe(_,C,f,v(X(_,Xu),10)),f.e){case 2:case 1:(_.g==(Be(),yt)||_.g==Et)&&g.ib((jr(),uh));break;case 4:case 3:(_.g==(Be(),ot)||_.g==lt)&&g.ib((jr(),uh))}}function SEe(e,n){var i,u,f,g,y,x,_,C;for(e.f=n,f=n.c.c.length,e.a=Ie(Rr,qr,51,f,0,2),e.d=Ie(Rr,qr,51,f,0,2),e.g=Ie(Rr,qr,51,f,0,2),y=new jn(n.c,0);y.b<y.d.Y();)for(u=(_t(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),16)),x=u.a.c.length,g=y.b-1,e.a[g]=Ie(Rr,oa,9,x,0,1),e.d[g]=Ie(Rr,oa,9,x,0,1),e.g[g]=Ie(Rr,oa,9,x,0,1),C=new jn(u.a,0),i=0;C.b<C.d.Y();)_=(_t(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),9)),_.k=i++,e.d[g][C.b-1]=_,e.a[g][C.b-1]=_,e.g[g][C.b-1]=_;e.b=new X$(e.d),e.e.c&&(e.b.e=!0)}function NEe(e){var n,i,u,f,g,y;for(f=new Ve,y=new V(e.c.f);y.a<y.c.c.length;)g=v($(y),7),g.g==(Be(),ot)&&(f.c[f.c.length]=g);if(e.d.a==(sr(),ya)&&!Zs(v(X(e.c,(Ye(),St)),28)))for(u=Vt(Un(e.c));Ft(u);)i=v(Ot(u),12),Ke(f,i.c);_e(e.c,(Ce(),Wv),new dn(e.c.j.a)),_e(e.c,Xc,(zn(),zn(),Ei)),Ke(e.b,e.c),n=null,e.e==1?n=VEe(e,e.c,Pa(e.c.d),e.c.j.a):e.e==0?n=qEe(e,e.c,Pa(e.c.d),e.c.j.a):e.e==3?n=Ake(e,e.c,e.c.j.a):e.e==2&&(n=jke(e,e.c,e.c.j.a)),n&&new t7(e.c,e.b,Re(Wt(n.b)))}function F7(e,n,i){var u,f,g,y,x,_,C,N;if(f=n.g,Yt(Re(Zt(X(n,(Ce(),Xc)))))&&(f=(gt(),sa)),n.k>=0||i.e&&f==(gt(),sa)&&f!=i.e)return!1;if(n.k=i.b,Ke(i.f,n),i.e=f,f==(gt(),An)||f==wr||f==sa){for(y=new V(n.f);y.a<y.c.c.length;)for(g=v($(y),7),N=(u=new V(new Dh(g).a.e),new UM(u));wl(N.a);)if(C=v($(N.a),12).d,x=C.f,_=x.g,n.d!=x.d){if(f==sa){if(_==sa&&F7(e,x,i))return!0}else if((_==An||_==wr)&&F7(e,x,i))return!0}}return!0}function yne(e,n){var i,u,f,g,y,x,_,C,N;for(uA(e.a,be(ve(rn,1),nn,10,0,[n.a,n.b])),Na(e.c,n.e),e.q.d=e.q.d|n.d,e.q.a=e.q.a|n.c,x=mn(e.j.e,n.k),_=et(e.j.e+e.j.b,n.n),lQ(e.j,n.j,x,0,_-x),Rn(e.d,n.f),n.f.c.f==n.f.d.f&&to(e.n,!0,!0,!0,!0),y=new ai,C=new ai,f=(N=new hn(e.d.a).a.bb().mb(),new yn(N));f.a.G();)u=(g=v(f.a.H(),21),v(g.yb(),12)),Rn(y,u.c),Rn(C,u.d);i=y.a.Y()-C.a.Y(),i<0?(Wb(e.n,!0,(sr(),uo)),Wb(e.n,!1,ya)):i>0&&(Wb(e.n,!1,(sr(),uo)),Wb(e.n,!0,ya))}function TEe(e,n){var i,u,f,g,y,x,_,C,N,A;for(y=0;y<(Vn(),n.length)&&gX(n.charCodeAt(y),Wne);)++y;for(i=n.length;i>0&&gX(n.charCodeAt(i-1),Jne);)--i;if(y<i){N=Ky(n.substr(y,i-y),",|;");try{for(_=0,C=N.length;_<C;++_){if(x=N[_],g=Ky(x,"="),g.length!=2)throw new Pn("Expecting a list of key-value pairs.");f=Rl(g[0]),A=Hy(Rl(g[1])),ls(f,"top")?e.d=A:ls(f,"left")?e.b=A:ls(f,gI)?e.a=A:ls(f,"right")&&(e.c=A)}}catch(O){throw O=hi(O),Ze(O,130)?(u=O,new Pn(Xne+u)):di(O)}}}function MEe(e,n){var i,u,f,g,y,x,_,C,N;for(N=new fi,x=(C=new ub(e.c).a.bb().mb(),new cb(C));x.a.G();)g=(f=v(x.a.H(),21),v(f.zb(),200)),g.b==0&&Ir(N,g,N.c.b,N.c);for(;N.b!=0;)for(g=v(N.b==0?null:(_t(N.b!=0),yu(N,N.a.a)),200),u=new V(g.d);u.a<u.c.c.length;)i=v($(u),279),n.k==(Bo(),nc)?i.b.a=mn(i.b.a,g.a+i.a):i.b.a=et(i.b.a,g.a+i.a),--i.b.b,i.b.b==0&&_n(N,i.b);for(y=(_=new ub(e.c).a.bb().mb(),new cb(_));y.a.G();)g=(f=v(y.a.H(),21),v(f.zb(),200)),n.g[g.c.k]=g.a}function jEe(e,n,i){var u,f,g,y;switch(g=e.i,f=Mn(be(ve(rn,1),nn,10,0,[n.i,n.f.i])),u=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])),y=n.d,n.g.e){case 4:g.a=mn(f.a,u.a)-y.b-e.j.a-i,g.b=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])).b+i;break;case 2:g.a=et(f.a+n.j.a,u.a)+y.c+i,g.b=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])).b+i;break;case 1:g.a=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])).a+i,g.b=mn(f.b,u.b)-y.d-e.j.b-i;break;case 3:g.a=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])).a+i,g.b=et(f.b+n.j.b,u.b)+y.a+i}}function AEe(e,n,i){var u,f,g,y;switch(g=e.i,f=Mn(be(ve(rn,1),nn,10,0,[n.i,n.f.i])),u=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])),y=n.d,n.g.e){case 4:g.a=mn(f.a,u.a)-y.b-e.j.a-i,g.b=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])).b-e.j.b-i;break;case 2:g.a=et(f.a+n.j.a,u.a)+y.c+i,g.b=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])).b-e.j.b-i;break;case 1:g.a=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])).a+i,g.b=mn(f.b,u.b)-y.d-e.j.b-i;break;case 3:g.a=Mn(be(ve(rn,1),nn,10,0,[n.f.i,n.i,n.a])).a+i,g.b=et(f.b+n.j.b,u.b)+y.a+i}}function IEe(e){var n,i;switch(i=v(X(e,(Ce(),ui)),18),n=Z1($ie),Yt(Re(Zt(X(e,(tn(),e0)))))?Sc(n,(Vr(),AE)):zi(n,(Vr(),AE)),X(e,(rA(),HI))!=null&&Fr(n,Kie),v(X(e,(Ye(),is)),59).e){case 2:Hi(Sc(n,(Vr(),zL)),HL);break;case 3:Hi(Sc(n,(Vr(),TL)),NL);break;case 4:Hi(Sc(n,(Vr(),XL)),JL)}return i.kb((jr(),tC))&&Hi(Sc(n,(Vr(),SL)),PL),ut(X(e,Um))!==ut((Hl(),Nm))&&zi(n,(Vr(),UL)),ut(X(e,Ym))!==ut((Zp(),Zv))&&ut(X(e,B9))===ut((Zu(),Xf))&&Hi(n,(Vr(),LL)),i.kb(E9)&&(Sc(n,(Vr(),VL)),zi(n,YL)),n}function gv(){gv=s,P9=new Bf("ONE_SIDED",0,!0,!1,!1),iC=new Bf("TWO_SIDED",1,!1,!1,!1),S9=new Bf("ONE_SIDED_BEST_OF_UP_OR_DOWN",2,!0,!0,!1),M9=new Bf("TWO_SIDED_BEST_OF_UP_OR_DOWN",3,!1,!0,!1),N9=new Bf("ONE_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",4,!0,!0,!0),j9=new Bf("TWO_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",5,!1,!0,!0),T9=new Bf("ONE_SIDED_ORTHOGONAL_HYPEREDGES",6,!0,!1,!0),rC=new Bf("OFF",7,!1,!1,!1)}function m_(e,n,i,u,f,g,y){var x,_,C,N,A,O,G;return A=Yt(Re(Zt(X(n,(tn(),K9))))),O=null,g==(Cr(),la)&&u.c.f==i?O=u.c:g==_i&&u.d.f==i&&(O=u.d),C=y,!y||!A||O?(N=(Be(),Sr),O?N=O.g:Zs(v(X(i,(Ye(),St)),28))&&(N=g==la?lt:ot),_=BEe(e,n,i,g,N,u),x=hk((ta(i),u)),g==la?(er(x,v(ct(_.f,0),7)),Fn(x,f)):(er(x,f),Fn(x,v(ct(_.f,0),7))),C=new GX(u,x,_,v(X(_,(Ce(),Ct)),7),g,!O)):(Ke(y.e,u),G=WZ(v(X(y.d,(Ye(),Cs)),15).a,v(X(u,Cs),15).a),_e(y.d,Cs,new dn(G))),jt(e.a,u,new Y1(C.d,n,g)),C}function U7(e,n,i,u){var f,g,y,x,_,C,N,A;if(g=new ko(e),bo(g,(gt(),wr)),_e(g,(Ye(),St),(tr(),ki)),f=0,n){for(y=new ur,_e(y,(Ce(),Ct),n),_e(g,Ct,n.f),en(y,(Be(),lt)),Tn(y,g),A=v(fr(n.b,Ie(_a,va,12,n.b.c.length,0,1)),47),C=0,N=A.length;C<N;++C)_=A[C],Fn(_,y);_e(n,lu,g),++f}if(i){for(x=new ur,_e(g,(Ce(),Ct),i.f),_e(x,Ct,i),en(x,(Be(),ot)),Tn(x,g),A=v(fr(i.e,Ie(_a,va,12,i.e.c.length,0,1)),47),C=0,N=A.length;C<N;++C)_=A[C],er(_,x);_e(i,lu,g),++f}return _e(g,(Ce(),pg),Tt(f)),u.c[u.c.length]=g,g}function LEe(e,n){var i,u,f,g,y,x,_;for(y=Zx(e.a).mb();y.G();){if(g=v(y.H(),12),g.b.c.length>0)for(u=new Cc(v(oo(e.a,g),18)),wo(u,new FM(n)),f=new jn(g.b,0);f.b<f.d.Y();){switch(i=(_t(f.b<f.d.Y()),v(f.d.sb(f.c=f.b++),33)),x=-1,v(X(i,(Ye(),Fa)),107).e){case 2:x=u.c.length-1;break;case 1:x=u.c.length/2|0;break;case 3:x=0}x!=-1&&(_=(qn(x,u.c.length),v(u.c[x],114)),Ke(_.b.b,i),v(X(ta(_.b.c.f),(Ce(),ui)),18).ib((jr(),hg)),v(X(ta(_.b.c.f),ui),18).ib(fg),Jo(f),_e(i,F9,g))}er(g,null),Fn(g,null)}}function OEe(e){var n,i,u,f,g,y,x,_,C,N,A;for(N=e.e.a.c.length,y=new V(e.e.a);y.a<y.c.c.length;)g=v($(y),61),g.j=!1;for(e.i=Ie(pr,hr,26,N,12,1),e.g=Ie(pr,hr,26,N,12,1),e.n=new Ve,f=0,A=new Ve,_=new V(e.e.a);_.a<_.c.c.length;)x=v($(_),61),x.b=f++,x.c.c.length==0&&Ke(e.n,x),$n(A,x.g);for(n=0,u=new V(A);u.a<u.c.c.length;)i=v($(u),89),i.b=n++,i.e=!1;C=A.c.length,e.b==null||e.b.length<C?(e.b=Ie(Ea,Ui,26,C,12,1),e.c=Ie(r0,_v,26,C,13,1)):vb(e.c),e.d=A,e.p=new RK(Nk(e.d.c.length)),e.j=1}function REe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye;for(ee=e.d,re=n.d,G=v(tu(e,(Cr(),la)).mb().H(),7),de=v(tu(e,_i).mb().H(),7),Y=v(tu(n,la).mb().H(),7),ye=v(tu(n,_i).mb().H(),7),A=v(fr(G.b,Ie(_a,va,12,1,0,1)),47),oe=v(fr(de.e,Ie(_a,va,12,1,0,1)),47),O=v(fr(Y.b,Ie(_a,va,12,1,0,1)),47),ce=v(fr(ye.e,Ie(_a,va,12,1,0,1)),47),Wr(e,re),f=0,_=O.length;f<_;++f)i=O[f],Fn(i,G);for(g=0,C=ce.length;g<C;++g)i=ce[g],er(i,de);for(Wr(n,ee),y=0,N=A.length;y<N;++y)i=A[y],Fn(i,Y);for(u=0,x=oe.length;u<x;++u)i=oe[u],er(i,ye)}function DEe(e){var n,i,u,f,g,y,x,_;for(g=new V(e.a.b);g.a<g.c.c.length;)f=v($(g),25),f.vc();for(_=new kt(Vi,Vi),n=new kt(ti,ti),u=new V(e.a.b);u.a<u.c.c.length;)i=v($(u),25),_.a=mn(_.a,i.j.d),_.b=mn(_.b,i.j.e),n.a=et(n.a,i.j.d+i.j.c),n.b=et(n.b,i.j.e+i.j.b);for(x=Aj(e.c).mb();x.G();)y=v(x.H(),27),i=v(y.b,25),_.a=mn(_.a,i.j.d),_.b=mn(_.b,i.j.e),n.a=et(n.a,i.j.d+i.j.c),n.b=et(n.b,i.j.e+i.j.b);e.d=Nx(new kt(_.a,_.b)),e.e=Fu(new kt(n.a,n.b),_),e.a.a.c=Ie(dt,tt,1,0,4,1),e.a.b.c=Ie(dt,tt,1,0,4,1)}function mne(e){var n,i,u,f,g,y,x;if(x=v(ct(e.f,0),7),x.e.c.length!=0&&x.b.c.length!=0)throw new yc("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.");if(x.e.c.length!=0){for(g=Vi,i=new V(x.e);i.a<i.c.c.length;)n=v($(i),12),y=n.d.f,u=v(X(y,(Ye(),Av)),65),g=mn(g,y.i.a-u.b);return new u1(Nt(g))}if(x.b.c.length!=0){for(f=ti,i=new V(x.b);i.a<i.c.c.length;)n=v($(i),12),y=n.c.f,u=v(X(y,(Ye(),Av)),65),f=et(f,y.i.a+y.j.a+u.c);return new u1(Nt(f))}return pb(),pb(),U_}function BEe(e,n,i,u,f,g){var y,x,_,C,N,A,O;return C=u==(Cr(),la)?g.c:g.d,_=Gk(n),C.f==i?(y=v(pn(e.b,C),9),y||(y=Qy(C,v(X(i,(Ye(),St)),28),f,u==la?-1:1,C.j,_,n),_e(y,(Ce(),Ct),C),Nn(e.b,C,y))):(N=v(X(g,(Ye(),Cs)),15).a,y=Qy((A=new M,O=v(X(n,(Ce(),ca)),15).a*v(X(n,(tn(),Au)),15).a/2,_e(A,gg,new dn(O)),A),v(X(i,St),28),f,u==la?-1:1,new kt(N,N),_,n),x=ike(e,y,i,u),_e(y,Ct,x),Nn(e.b,x,y)),v(X(n,(Ce(),ui)),18).ib((jr(),As)),Zs(v(X(n,(Ye(),St)),28))?_e(n,St,(tr(),Dv)):_e(n,St,(tr(),Ss)),y}function GEe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe;u=v(X(n,(tn(),Z9)),15).a,Ee=v(X(n,mg),24).a,O=4,f=3,Ue=20/Ee,G=!1,_=0,y=Or;do{for(g=_!=1,A=_!=0,qe=0,re=e.a,ce=0,ye=re.length;ce<ye;++ce)Y=re[ce],Y.g=null,CCe(e,Y,g,A,u),qe+=wi(Y.a);do x=X_e(e,n);while(x);for(ee=e.a,oe=0,de=ee.length;oe<de;++oe)if(Y=ee[oe],i=Pj(Y).a,i!=0)for(N=new V(Y.f);N.a<N.c.c.length;)C=v($(N),9),C.i.b+=i;_==0||_==1?(--O,O<=0&&(qe<y||-O>Ee)?(_=2,y=Or):_==0?(_=1,y=qe):(_=0,y=qe)):(G=qe>=y||y-qe<Ue,y=qe,G&&--f)}while(!(G&&f<=0))}function Y7(e,n,i){var u,f,g,y,x,_,C,N,A,O,G;for(A=v(fr(e.f,Ie(sae,yre,7,e.f.c.length,0,1)),346),C=0,N=A.length;C<N;++C){if(_=A[C],i!=(Cr(),la))for(x=v(fr(_.e,Ie(_a,va,12,_.e.c.length,0,1)),47),f=0,g=x.length;f<g;++f)u=x[f],G=v(X(u.d.f,(tn(),Dr)),85),!Yt(Re(Zt(X(u,(Ce(),ju)))))&&!(n==(ba(),vg)&&G==sc)&&Vl(u,!0);if(i!=_i)for(y=v(fr(_.b,Ie(_a,va,12,_.b.c.length,0,1)),47),f=0,g=y.length;f<g;++f)u=y[f],O=v(X(u.c.f,(tn(),Dr)),85),!Yt(Re(Zt(X(u,(Ce(),ju)))))&&!(n==(ba(),Xv)&&O==el)&&Vl(u,!0)}}function HEe(e,n,i,u){var f,g,y,x,_;if(y=e.g,y==(Be(),Sr)&&n!=(tr(),Ss)&&n!=(tr(),Yc)&&(y=ine(e,i),en(e,y),X(e,(Ye(),Jl))==null&&y!=Sr&&(e.i.a!=0||e.i.b!=0)&&_e(e,Jl,new dn(xxe(e,y)))),n==(tr(),Ps)){switch(_=0,y.e){case 1:case 3:g=e.f.j.a,g>0&&(_=e.i.a/g);break;case 2:case 4:f=e.f.j.b,f>0&&(_=e.i.b/f)}_e(e,(Ce(),oc),_)}if(x=e.j,u)e.a.a=u.a,e.a.b=u.b;else if(n!=Ss&&n!=Yc&&y!=Sr)switch(y.e){case 1:e.a.a=x.a/2;break;case 2:e.a.a=x.a,e.a.b=x.b/2;break;case 3:e.a.a=x.a/2,e.a.b=x.b;break;case 4:e.a.b=x.b/2}else e.a.a=x.a/2,e.a.b=x.b/2}function zEe(e){var n,i,u,f;if(Ze(e.a,10))return vo(v(e.a,10));if(Ze(e.a,66))return Jme(v(e.a,86));if(Ze(e.a,50))return v(e.a,50).Wc();if(Ze(e.a,191)){for(n=new b6,f=(u=new Lb(new Ab(new l1(v(e.a,191).a).a).b),new f1(u));ux(f.a.a);)Tj(n,(i=Ax(f.a),i.yb()));return n}else{if(Ze(e.a,13))return new Cc(v(e.a,13));if(Ze(e.a,44)){for(n=new Xi,f=xn(v(e.a,44),0);f.b!=f.d.c;)_n(n,v(fn(f),10));return n}else if(Ze(e.a,58)){for(n=new fi,f=xn(v(e.a,58),0);f.b!=f.d.c;)_n(n,fn(f));return n}else return e.a}}function wd(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;x=0,Y=0,_=SA(e.f,e.f.length),g=e.d,y=e.i,u=e.a,f=e.b;do{for(G=0,N=new V(e.p);N.a<N.c.c.length;)C=v($(N),9),O=Cne(e,C),i=!0,(e.q==(Hl(),Vv)||e.q==qv)&&(i=Yt(Re(Zt(O.b)))),v(O.a,24).a<0&&i?(++G,_=SA(e.f,e.f.length),e.d=e.d+v(O.a,24).a,Y+=g-e.d,g=e.d+v(O.a,24).a,y=e.i,u=Ml(e.a),f=Ml(e.b)):(e.f=SA(_,_.length),e.d=g,e.a=(Nt(u),u?new Cc((ps(),u)):q1(new V(null))),e.b=(Nt(f),f?new Cc((ps(),f)):q1(new V(null))),e.i=y);++x,A=G!=0&&Yt(Re(Zt(n.B(new Ar(Tt(Y),Tt(x))))))}while(A)}function FEe(e,n,i,u){var f,g,y,x,_,C,N;if(!wl(new V(nv(e))))return u;for(N=CX(v(xr(e,(Ye(),Ma)),86)),_=new V(nv(e));_.a<_.c.c.length;)x=v($(_),129),C=CX(v(xr(x,Ma),86)),C==(x_(),pE)&&(C=N),Uve(x,C.e),f=E2e(i,C),f.c=et(f.c,x.e.j.a),f.b+=x.e.j.b+n;for(y=new ey(new h1(i).a);R1(y.a);)switch(g=(y.b=Al(y.a),new T1(y.c,y.b)),f=v(g.b.b[g.a.e],62),f.b-=n,v(g.a,67).e){case 12:case 13:case 14:u.d=et(u.d,f.b+n);break;case 15:u.b=et(u.b,f.c+n);break;case 17:u.c=et(u.c,f.c+n);break;case 18:case 19:case 20:u.a=et(u.a,f.b+n)}return u}function V7(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee;for(uJ(this),i==(Tl(),Tu)?Rn(this.g,e):Rn(this.o,e),G=ks,O=5e-324,C=(y=new hn(n.a).a.bb().mb(),new yn(y));C.a.G();)x=(f=v(C.a.H(),21),v(f.yb(),27)),N=v(x.a,223),u=v(x.b,12),A=u.c,A==e&&(A=u.d),N==Tu?Rn(this.g,A):Rn(this.o,A),ee=Mn(be(ve(rn,1),nn,10,0,[A.f.i,A.i,A.a])).b,G=G<ee?G:ee,O=O>ee?O:ee;for(Y=Mn(be(ve(rn,1),nn,10,0,[e.f.i,e.i,e.a])).b,fee(this,Y,G,O),_=(g=new hn(n.a).a.bb().mb(),new yn(g));_.a.G();)x=(f=v(_.a.H(),21),v(f.yb(),27)),Rn(this.c,v(x.b,12));this.f=!1}function UEe(e,n,i,u){var f,g,y,x,_,C;if(x=(Ye(),Iv).b,!(x in n.a&&Qn(n,x).ic().a)){if(C=Qn(n,S_),C){if(!C.lc())throw new Ks("A label's 'text' property must be a string.",C,n)}else throw new Ks("Labels must have a property 'text'.",null,n);if(_=C.lc().a,g=new F6(_),_e(g,(Ce(),Ct),n),Nn(e.f,g,n),o_(n,g),By(n,g),Ze(i,9)?Ke(v(i,9).c,g):Ze(i,12)?Ke(v(i,12).b,g):Ze(i,7)&&Ke(v(i,7).c,g),Ze(i,12))switch(y=v(X(g,Fa),107),o_(n,g),_e(g,Fa,y),f=v(X(u,ui),18),y.e){case 2:case 3:f.ib((jr(),hg));case 1:case 0:f.ib((jr(),fg)),_e(g,Fa,(eu(),Nv))}}}function q7(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe;for(g=0,y=0,C=new V(e.a);C.a<C.c.c.length;)x=v($(C),9),g=et(g,x.e.b),y=et(y,x.e.c);for(_=new V(e.a);_.a<_.c.c.length;){switch(x=v($(_),9),i=v(X(x,(Ye(),zo)),103),i.e){case 1:Y=0;break;case 2:Y=1;break;case 5:Y=.5;break;default:for(u=0,A=0,G=new V(x.f);G.a<G.c.c.length;)O=v($(G),7),O.b.c.length==0||++u,O.e.c.length==0||++A;u+A==0?Y=.5:Y=A/(u+A)}re=e.c,N=x.j.a,oe=(re.a-N)*Y,Y>.5?oe-=y*2*(Y-.5):Y<.5&&(oe+=g*2*(.5-Y)),f=x.e.b,oe<f&&(oe=f),ee=x.e.c,oe>re.a-ee-N&&(oe=re.a-ee-N),x.i.a=n+oe}}function YEe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt;return i=e.l&8191,u=e.l>>13|(e.m&15)<<9,f=e.m>>4&8191,g=e.m>>17|(e.h&255)<<5,y=(e.h&1048320)>>8,x=n.l&8191,_=n.l>>13|(n.m&15)<<9,C=n.m>>4&8191,N=n.m>>17|(n.h&255)<<5,A=(n.h&1048320)>>8,Ge=i*x,rt=u*x,ht=f*x,pt=g*x,mt=y*x,_!=0&&(rt+=i*_,ht+=u*_,pt+=f*_,mt+=g*_),C!=0&&(ht+=i*C,pt+=u*C,mt+=f*C),N!=0&&(pt+=i*N,mt+=u*N),A!=0&&(mt+=i*A),G=Ge&_o,Y=(rt&511)<<13,O=G+Y,re=Ge>>22,oe=rt>>9,ce=(ht&262143)<<4,de=(pt&31)<<17,ee=re+oe+ce+de,Ee=ht>>18,Ue=pt>>5,qe=(mt&4095)<<8,ye=Ee+Ue+qe,ee+=O>>22,O&=_o,ye+=ee>>22,ee&=_o,ye&=Gc,Pc(O,ee,ye)}function VEe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue;if(re=e.d.c.c.c.length,i>=re-1)return null;for(f=new Ve,f.c[f.c.length]=n,ye=n,y=i,Y=-1,x=v(ct(e.d.c.c,i),16),G=0;G<x.a.c.length;++G)if(oe=v(ct(x.a,G),9),oe==n){Y=G;break}if(ee=Q7(e,1,Y,i,re,e.a),!ee)return null;for(Ee=e.a,O=0,g=0;ye&&Ee>1&&y<re-1;)N=sne(e,ye),A=v(ct(e.d.c.c,y+1),16),Ue=v(ee.sb(O++),24).a,ce=mc(Ue,A.a.c.length),bd(N,ce,A),ye&&(f.c[f.c.length]=ye),ye=N,--Ee,++g,++y;for(de=(u-(f.c.length-1)*e.d.d)/f.c.length,C=new V(f);C.a<C.c.c.length;)_=v($(C),9),_.j.a=de;return new Ar(Tt(g),de)}function qEe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue;if(i<=0)return null;for(f=new Ve,f.c[f.c.length]=n,ye=n,y=i,Y=-1,x=v(ct(e.d.c.c,i),16),G=0;G<x.a.c.length;++G)if(re=v(ct(x.a,G),9),re==n){Y=G;break}if(ee=Q7(e,0,Y,i,e.d.c.c.c.length,e.a),!ee)return null;for(Ee=e.a,O=0,g=0,de=Y;ye&&Ee>1&&y>1;)N=sne(e,ye),x=v(ct(e.d.c.c,y),16),A=v(ct(e.d.c.c,y-1),16),Ue=v(ee.sb(O++),24).a,oe=mc(Ue,A.a.c.length),bd(ye,oe,A),bd(N,de,x),de=oe,ye&&(f.c[f.c.length]=ye),ye=N,--Ee,++g,--y;for(ce=(u-(f.c.length-1)*e.d.d)/f.c.length,C=new V(f);C.a<C.c.c.length;)_=v($(C),9),_.j.a=ce;return new Ar(Tt(g),ce)}function ZEe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;if(e.b=e.c,Y=Zt(X(n,(Ye(),rL))),G=Y==null||Yt((Tr(Y),Y)),g=v(X(n,(Ce(),ui)),18).kb((jr(),As)),f=v(X(n,St),28),i=!(f==(tr(),Md)||f==Ps||f==ki),G&&(i||!g)){for(A=new V(n.b);A.a<A.c.c.length;)C=v($(A),9),C.k=0;for(O=new Ve,N=new V(n.b);N.a<N.c.c.length;)if(C=v($(N),9),u=lne(e,C,null),u){for(_=new gA,$u(_,n),_e(_,lh,v(u.b,18)),NQ(_.a,n.a),x=v(u.a,20).mb();x.G();)y=v(x.H(),9),Ke(_.b,y),y.a=_;O.ib(_)}g&&(e.b=e.a)}else O=new Oo(be(ve(E3e,1),{38:1,39:1,42:1,3:1,8:1,5:1,6:1},55,0,[n]));return O}function $Ee(e){var n,i,u,f,g,y,x,_,C;for(i=new V(e.a.a.b);i.a<i.c.c.length;)for(n=v($(i),25),y=n.i.mb();y.G();)g=v(y.H(),25),n.f!=g.f&&(Pf(e.a.d)?_=e.a.g.tc(n,g):_=e.a.g.uc(n,g),u=n.g.a+n.j.c+_-g.g.a,u=Math.ceil(u),u=0>u?0:u,n.o&&g.o&&Ze(n,82)&&Ze(g,82)&&!_k(vA(v(n,82).d,v(g,82).d))?(f=Mb(new bp,e.d),x=vr(S1(g.g.a-n.g.a)),yd(Yh(qh(Zh(Vh(new _f,0>x?0:x),1),f),e.c[n.f.d])),yd(Yh(qh(Zh(Vh(new _f,0>-x?0:-x),1),f),e.c[g.f.d]))):(C=1,(Ze(n,82)&&Ze(g,93)||Ze(g,82)&&Ze(n,93))&&(C=2),yd(Yh(qh(Zh(Vh(new _f,vr(u)),C),e.c[n.f.d]),e.c[g.f.d]))))}function wne(){wne=s,vL=new ai,bL=md(be(ve(Jf,1),tt,79,0,[(Ye(),KI),lie])),gL=md(be(ve(Jf,1),tt,79,0,[eL,ec,(tn(),W9),fie,(Ce(),No),mg,Q9])),fL=md(be(ve(Jf,1),tt,79,0,[sie,ag,Iv,cie,hie,XI,die,aE,rL,jv,pC,q9,mC,$9,e0,K9,J9,EC,bC])),pL=md(be(ve(Jf,1),tt,79,0,[sg,og,Nd,Cs,Jl,lC,Is,Bd,ca,yg,Au,Z9])),dL=md(be(ve(Jf,1),tt,79,0,[Ov,zo,is,eh,Fa,WI,JI,eE,tE,nE,rE,iE,St,Lv,gC,yC,kC,zd,zm,_C,Um,Fm,wC,Dr,Ym,CC,PC,wg,xC])),hL=md(be(ve(Jf,1),tt,79,0,[Ma,Uc,Rv,vC])),ym=md(be(ve(Jf,1),tt,79,0,[Tv,X_,dr,Av,Xu,Td])),qie=md(be(ve(Jf,1),tt,79,0,[(TA(),cL)]))}function xne(e){var n,i,u,f,g,y,x;for(n=0,g=new V(e.b.a);g.a<g.c.c.length;)u=v($(g),78),u.b=0,u.c=0;for(mte(e,0),Uk(e,e.g),$y(e.c),u6(e.c),i=(sr(),uo),wu(yb(ru(wu(yb(ru(wu(ru(e.c,i)),LX(i)))),i))),ru(e.c,uo),Bk(e,e.g),vte(e,0),gne(e,0),zte(e,1),mte(e,1),Uk(e,e.d),$y(e.c),y=new V(e.b.a);y.a<y.c.c.length;)u=v($(y),78),n+=wi(u.c);for(x=new V(e.b.a);x.a<x.c.c.length;)u=v($(x),78),u.b=0,u.c=0;for(i=Su,wu(yb(ru(wu(yb(ru(wu(u6(ru(e.c,i))),LX(i)))),i))),ru(e.c,uo),Bk(e,e.d),vte(e,1),gne(e,1),zte(e,0),u6(e.c),f=new V(e.b.a);f.a<f.c.c.length;)u=v($(f),78),n+=wi(u.c);return n}function KEe(e){var n,i,u,f,g,y,x;for(n=new Ve,e.g=new Ve,e.d=new Ve,y=new Uf(new zu(e.f.b).a);y.b;)g=Hp(y),Ke(n,v(v(g.zb(),27).b,25)),Pf(v(g.yb(),251).yc())?Ke(e.d,v(g.zb(),27)):Ke(e.g,v(g.zb(),27));for(Uk(e,e.d),Uk(e,e.g),e.c=new v7(e.b),HZ(e.c,(s6(),Qie)),Bk(e,e.d),Bk(e,e.g),$n(n,e.c.a.b),e.e=new kt(Vi,Vi),e.a=new kt(ti,ti),u=new V(n);u.a<u.c.c.length;)i=v($(u),25),e.e.a=mn(e.e.a,i.j.d),e.e.b=mn(e.e.b,i.j.e),e.a.a=et(e.a.a,i.j.d+i.j.c),e.a.b=et(e.a.b,i.j.e+i.j.b);Y2(e.c,new q),x=0;do f=xne(e),++x;while((x<2||f>mv)&&x<10);Y2(e.c,new Z),xne(e),G1e(e.c),DEe(e.f)}function QEe(e){Rp();var n,i,u,f,g,y,x;for(x=new iZ,i=new V(e);i.a<i.c.c.length;)n=v($(i),48),(!x.b||n.c>=x.b.c)&&(x.b=n),(!x.c||n.c<=x.c.c)&&(x.d=x.c,x.c=n),(!x.e||n.d>=x.e.d)&&(x.e=n),(!x.f||n.d<=x.f.d)&&(x.f=n);return u=new Iy(($b(),Zc)),Fb(e,iae,new Oo(be(ve(Uv,1),tt,160,0,[u]))),y=new Iy(rf),Fb(e,rae,new Oo(be(ve(Uv,1),tt,160,0,[y]))),f=new Iy(nf),Fb(e,nae,new Oo(be(ve(Uv,1),tt,160,0,[f]))),g=new Iy(ih),Fb(e,tae,new Oo(be(ve(Uv,1),tt,160,0,[g]))),d_(u.c,Zc),d_(f.c,nf),d_(g.c,ih),d_(y.c,rf),x.a.c=Ie(dt,tt,1,0,4,1),$n(x.a,u.c),$n(x.a,Pk(f.c)),$n(x.a,g.c),$n(x.a,Pk(y.c)),x}function WEe(e){var n,i,u,f,g,y,x,_,C,N;for(f=v(n$(e,(Ye(),Nd)),15).a,x=new V(Vee(e));x.a<x.c.c.length;){for(y=v($(x),626),i=new vne(y),i.d=f,i.k=v(xr(y,tL),15).a,u=v(xr(y,Lv),149),n=Yt(Re(Zt(X(v(y.e,9),(Ce(),O9))))),N=new V(Rc(y));N.a<N.c.c.length;)C=v($(N),161),u==(fd(),sE)?JEe(C,n,f):u==Bv&&NCe(C,f),W_e(C);BCe(i,v(xr(y,Uc),86).kb((Ku(),Hv))),iEe(i),FEe(i.e,i.d,i.c,i.p),wCe(i),Vxe(i),Tye(i),_=new JK((g=v(y.e,9).b,new $K(g.d,g.b,g.a,g.c))),_.b=i.p.b+i.q.b,_.c=i.p.c+i.q.c,_.d=i.p.d+i.q.d,_.a=i.p.a+i.q.a,v(y.e,9).b.b=_.b,v(y.e,9).b.d=_.d,v(y.e,9).b.c=_.c,v(y.e,9).b.a=_.a}}function kne(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;for(_=v(mr(e,(Be(),lt)).mb().H(),7).b,G=v(mr(e,ot).mb().H(),7).e,x=_.c.length,de=ra(v(ct(e.f,0),7));x-- >0;){for(ee=(qn(0,_.c.length),v(_.c[0],12)),f=(qn(0,G.c.length),v(G.c[0],12)),ce=f.d.b,g=ia(ce,f,0),sme(ee,f.d,g),er(f,null),Fn(f,null),Y=ee.a,n&&_n(Y,new lr(de)),u=xn(f.a,0);u.b!=u.d.c;)i=v(fn(u),10),_n(Y,new lr(i));for(oe=ee.b,O=new V(f.b);O.a<O.c.c.length;)A=v($(O),33),oe.c[oe.c.length]=A;if(re=v(X(ee,(Ye(),dr)),44),y=v(X(f,dr),44),y)for(re||(re=new Xi,_e(ee,dr,re)),N=xn(y,0);N.b!=N.d.c;)C=v(fn(N),10),_n(re,new lr(C))}}function JEe(e,n,i){var u,f,g,y,x;if(g=wW(rv(e)),!g.Nb().V()){switch(x=0,v(e.e,7).g.e){case 4:case 2:x=n&&Yt(Re(Zt(X(v(e.e,7),(Ce(),Goe)))))?e.e.j.b:(e.e.j.b-v(g.Nb().sb(0),129).pc().b)/2-i;break;case 1:x=e.e.j.b;break;case 3:x=0}for(v(e.e,7).g==(Be(),Et)&&Op(g),f=new V(rv(e));f.a<f.c.c.length;){switch(u=v($(f),129),y=new lr(e.e.i),v(e.e,7).g.e){case 4:y.a=e.e.j.a+i,y.b=x+i,x+=i+u.e.j.b;break;case 2:y.a=-u.e.j.a-i,y.b=x+i,x+=i+u.e.j.b;break;case 1:y.a=(e.e.j.a-u.e.j.a)/2,y.b=x+i,x+=i+u.e.j.b;break;case 3:y.a=(e.e.j.a-u.e.j.a)/2,y.b=x-i-u.e.j.b,x-=i+u.e.j.b}u.e.i.a=y.a,u.e.i.b=y.b}}}function XEe(e,n){var i,u,f,g,y,x,_,C,N,A;for(e.a=new Nj(Owe(Sv)),u=new V(n.a);u.a<u.c.c.length;){for(i=v($(u),347),x=new Ay(be(ve(mm,1),tt,25,0,[])),Ke(e.a.a,x),C=new V(i.d);C.a<C.c.c.length;)_=v($(C),62),N=new V6(e,_),Z7(N,v(X(i.c,(Ce(),lh)),18)),ud(e.g,i)||(Nn(e.g,i,new kt(_.d,_.e)),Nn(e.f,i,N)),Ke(e.a.b,N),Ey(x,N);for(y=new V(i.b);y.a<y.c.c.length;)g=v($(y),251),N=new V6(e,g.Bc()),Nn(e.b,g,new Ar(x,N)),Z7(N,v(X(i.c,(Ce(),lh)),18)),g.zc()&&(A=new yA(e,g.zc(),1),Z7(A,v(X(i.c,lh),18)),f=new Ay(be(ve(mm,1),tt,25,0,[])),Ey(f,A),jt(e.c,g.yc(),new Ar(x,A)))}return e.a}function eCe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;if(ee=n.c.c.length,!(ee<3)){for(G=Ie(pr,hr,26,ee,12,1),A=0,N=new V(n.c);N.a<N.c.c.length;)C=v($(N),16),G[A++]=C.a.c.length;for(O=new jn(n.c,2),u=1;u<ee-1;u++)for(i=(_t(O.b<O.d.Y()),v(O.d.sb(O.c=O.b++),16)),Y=new V(i.a),g=0,x=0,_=0;_<G[u+1];_++)if(de=v($(Y),9),_==G[u+1]-1||M7(e,de,u+1,u)){for(y=G[u]-1,M7(e,de,u+1,u)&&(y=e.d.e[v(v(v(ct(e.d.b,de.k),20).sb(0),27).a,9).k]);x<=_;){if(ce=v(ct(i.a,x),9),!M7(e,ce,u+1,u))for(oe=v(ct(e.d.b,ce.k),20).mb();oe.G();)re=v(oe.H(),27),f=e.d.e[v(re.a,9).k],(f<g||f>y)&&Rn(e.c,v(re.b,12));++x}g=y}}}function _ne(e,n,i){var u,f,g,y,x,_;for(this.g=e,x=n.d.length,_=i.d.length,this.d=Ie(Rr,oa,9,x+_,0,1),y=0;y<x;y++)this.d[y]=n.d[y];for(g=0;g<_;g++)this.d[x+g]=i.d[g];if(n.e){if(this.e=Ba(n.e),this.e.nb(i),i.e)for(f=i.e.mb();f.G();)u=v(f.H(),102),u!=n&&(this.e.kb(u)?--u.c:this.e.ib(u))}else i.e&&(this.e=Ba(i.e),this.e.nb(n));this.f=n.f+i.f,this.a=n.a+i.a,this.a>0?kk(this,this.f/this.a):Xa(n.g,n.d[0]).a!=null&&Xa(i.g,i.d[0]).a!=null?kk(this,(Re(Xa(n.g,n.d[0]).a)+Re(Xa(i.g,i.d[0]).a))/2):Xa(n.g,n.d[0]).a!=null?kk(this,Xa(n.g,n.d[0]).a):Xa(i.g,i.d[0]).a!=null&&kk(this,Xa(i.g,i.d[0]).a)}function tCe(e,n){var i,u,f,g,y,x,_,C,N,A,O;switch(e.g.e){case 1:if(u=v(X(e,(Ce(),Ct)),12),i=v(X(u,H9),44),i?Yt(Re(Zt(X(u,ju))))&&(i=jk(i)):i=new Xi,C=v(X(e,ua),7),N=Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])),n<=N.a)return N.b;if(Ir(i,N,i.a,i.a.a),A=v(X(e,Zi),7),O=Mn(be(ve(rn,1),nn,10,0,[A.f.i,A.i,A.a])),O.a<=n)return O.b;for(Ir(i,O,i.c.b,i.c),_=xn(i,0),y=v(fn(_),10),x=v(fn(_),10);x.a<n&&_.b!=_.d.c;)y=x,x=v(fn(_),10);return y.b+(n-y.a)/(x.a-y.a)*(x.b-y.b);case 3:switch(g=v(X(v(ct(e.f,0),7),(Ce(),Ct)),7),f=g.f,g.g.e){case 1:return f.i.b;case 3:return f.i.b+f.j.b}}return n7(e).b}function Ene(e){var n,i,u,f,g,y,x,_,C,N,A,O;if(N=ut(X(e.c.f,(Ce(),uf)))===ut(X(e.d.f,uf)),y=new oi,i=v(X(e,(Ye(),X_)),44),i&&i.b>=2)for(vu(e.a),u=0,O=xn(i,0);O.b!=O.d.c;)A=v(fn(O),10),u==0?(n=Fu(Fu(new kt(A.a,A.b),e.c.i),e.c.f.i),e.c.a.a=n.a,e.c.a.b=n.b):u==i.b-1?(n=Fu(Fu(new kt(A.a,A.b),e.d.i),e.d.f.i),e.d.a.a=n.a,e.d.a.b=n.b):_n(e.a,A),++u;if(N)for(_=xn(e.a,0);_.b!=_.d.c;)x=v(fn(_),10),y.a=et(y.a,x.a),y.b=et(y.b,x.b);for(g=new V(e.b);g.a<g.c.c.length;)f=v($(g),33),C=v(X(f,Td),10),C&&(f.i.a=C.a,f.i.b=C.b),N&&(y.a=et(y.a,f.i.a+f.j.a),y.b=et(y.b,f.i.b+f.j.b));return y}function nCe(e,n,i){var u,f,g,y,x,_,C;if(h7(n),u=v(X(i,(Ce(),ui)),18),y=new ko(i),_e(y,Ct,n),Ke(i.b,y),g=v(Qn(n,"id"),97),cy(e.i,g.a,y),Nn(e.j,y,n),o_(n,y),By(n,y),"ports"in n.a){if(C=Qn(n,"ports"),!C.hc())throw new Ks("The 'ports' property of the node must be an array.",C,n);for(_=C.hc(),f=0;f<_.a.length;++f)Ze(Tc(_,f),69)&&PEe(e,v(Tc(_,f),69),y,i)}return b7(e,n,y,i),tg in n.a&&Qn(n,tg).hc().a.length>0&&_e(y,O9,(zn(),zn(),Ei)),x=v(X(y,(Ye(),St)),28),x==(tr(),Yc)||x!=Ss&&u.ib((jr(),sh)),Yt(Re(Zt(X(y,ag))))&&u.ib((jr(),tC)),Yt(Re(Zt(X(y,jv))))&&(u.ib((jr(),nC)),u.ib(Om),_e(y,St,Ss)),y}function Z7(e,n){n.V()&&to(e.n,!0,!0,!0,!0),n.t((Be(),Ad))&&to(e.n,!0,!0,!0,!1),n.t(jd)&&to(e.n,!1,!0,!0,!0),n.t(Id)&&to(e.n,!0,!0,!1,!0),n.t(Ld)&&to(e.n,!0,!1,!0,!0),n.t(ef)&&to(e.n,!1,!0,!0,!1),n.t(Xl)&&to(e.n,!1,!0,!1,!0),n.t(tf)&&to(e.n,!0,!1,!1,!0),n.t(nh)&&to(e.n,!0,!1,!0,!1),n.t(Ns)&&to(e.n,!0,!0,!0,!0),n.t(tc)&&to(e.n,!0,!0,!0,!0),n.t(Ns)&&to(e.n,!0,!0,!0,!0),n.t(qa)&&to(e.n,!0,!0,!0,!0),n.t(fo)&&to(e.n,!0,!0,!0,!0),n.t(lo)&&to(e.n,!0,!0,!0,!0),n.t(si)&&to(e.n,!0,!0,!0,!0)}function Cne(e,n){var i,u,f,g,y,x,_,C,N,A;for(_=!0,f=0,C=e.f[n.k],N=n.j.b+e.n,i=e.c[n.k][2],jl(e.a,C,Tt(v(ct(e.a,C),24).a-1+i)),jl(e.b,C,Re(Wt(ct(e.b,C)))-N+i*e.e),++C,C>=e.i?(++e.i,Ke(e.a,Tt(1)),Ke(e.b,N)):(u=e.c[n.k][1],jl(e.a,C,Tt(v(ct(e.a,C),24).a+1-u)),jl(e.b,C,Re(Wt(ct(e.b,C)))+N-u*e.e)),(e.q==(Hl(),Vv)&&(v(ct(e.a,C),24).a>e.j||v(ct(e.a,C-1),24).a>e.j)||e.q==qv&&(Re(Wt(ct(e.b,C)))>e.k||Re(Wt(ct(e.b,C-1)))>e.k))&&(_=!1),y=Vt(Yr(n));Ft(y);)g=v(Ot(y),12),x=g.c.f,e.f[x.k]==C&&(A=Cne(e,x),f=f+v(A.a,24).a,_=_&&Yt(Re(Zt(A.b))));return e.f[n.k]=C,f=f+e.c[n.k][0],new Ar(Tt(f),(zn(),_?Ei:Xn))}function $7(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe;if(O=new lr(e.j),oe=n.a/O.a,x=n.b/O.b,ee=n.a-O.a,g=n.b-O.b,i)for(f=ut(X(e,(Ye(),St)))===ut((tr(),ki)),Y=new V(e.f);Y.a<Y.c.c.length;)switch(G=v($(Y),7),G.g.e){case 1:f||(G.i.a*=oe);break;case 2:G.i.a+=ee,f||(G.i.b*=x);break;case 3:f||(G.i.a*=oe),G.i.b+=g;break;case 4:f||(G.i.b*=x)}for(C=new V(e.c);C.a<C.c.c.length;)_=v($(C),33),N=_.i.a+_.j.a/2,A=_.i.b+_.j.b/2,re=N/O.a,y=A/O.b,re+y>=1&&(re-y>0&&A>=0?(_.i.a+=ee,_.i.b+=g*y):re-y<0&&N>=0&&(_.i.a+=ee*re,_.i.b+=g));e.j.a=n.a,e.j.b=n.b,_e(e,(Ye(),Uc),(Ku(),u=v(da(ug),11),new xi(u,v(ea(u,u.length),11),0)))}function Pne(e){var n,i,u,f,g,y,x,_,C,N;for(u=new Ve,y=new V(e.e.a);y.a<y.c.c.length;){for(f=v($(y),61),N=0,f.k.c=Ie(dt,tt,1,0,4,1),i=new V(Yf(f));i.a<i.c.c.length;)n=v($(i),89),n.e&&(Ke(f.k,n),++N);N==1&&(u.c[u.c.length]=f)}for(g=new V(u);g.a<g.c.c.length;)for(f=v($(g),61);f.k.c.length==1;){for(C=v($(new V(f.k)),89),e.b[C.b]=C.f,x=C.c,_=C.d,i=new V(Yf(f));i.a<i.c.c.length;)n=v($(i),89),n==C||(n.e?x==n.c||_==n.d?e.b[C.b]-=e.b[n.b]-n.f:e.b[C.b]+=e.b[n.b]-n.f:f==x?n.c==f?e.b[C.b]+=n.f:e.b[C.b]-=n.f:n.c==f?e.b[C.b]-=n.f:e.b[C.b]+=n.f);zr(x.k,C),zr(_.k,C),x==f?f=C.d:f=C.c}}function rCe(e){var n,i,u,f,g,y,x,_,C,N;for(C=new fi,x=new fi,g=new V(e);g.a<g.c.c.length;)u=v($(g),77),u.e=u.d.c.length,u.k=u.j.c.length,u.e==0&&Ir(C,u,C.c.b,C.c),u.k==0&&u.g.a.Y()==0&&Ir(x,u,x.c.b,x.c);for(y=-1;C.b!=0;)for(u=v(WA(C,0),77),i=new V(u.j);i.a<i.c.c.length;)n=v($(i),117),N=n.b,N.n=mi(N.n,u.n+1),y=mi(y,N.n),--N.e,N.e==0&&Ir(C,N,C.c.b,C.c);if(y>-1){for(f=xn(x,0);f.b!=f.d.c;)u=v(fn(f),77),u.n=y;for(;x.b!=0;)for(u=v(WA(x,0),77),i=new V(u.d);i.a<i.c.c.length;)n=v($(i),117),_=n.a,_.g.a.Y()==0&&(_.n=mc(_.n,u.n-1),--_.k,_.k==0&&Ir(x,_,x.c.b,x.c))}}function iCe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee;for(_=new Ve,g=new V(n.b);g.a<g.c.c.length;)for(f=v($(g),9),x=new V(f.f);x.a<x.c.c.length;){for(y=v($(x),7),N=null,de=v(fr(y.e,Ie(_a,va,12,0,0,1)),47),ye=0,Ee=de.length;ye<Ee;++ye)ce=de[ye],dd(ce.d.f,i)||(oe=m_(e,n,i,ce,ce.c,(Cr(),_i),N),oe!=N&&(_.c[_.c.length]=oe),oe.c&&(N=oe));for(C=null,Y=v(fr(y.b,Ie(_a,va,12,0,0,1)),47),ee=0,re=Y.length;ee<re;++ee)G=Y[ee],dd(G.c.f,i)||(oe=m_(e,n,i,G,G.d,(Cr(),la),C),oe!=C&&(_.c[_.c.length]=oe),oe.c&&(C=oe))}for(O=new V(_);O.a<O.c.c.length;)A=v($(O),187),ia(n.b,A.a,0)!=-1||Ke(n.b,A.a),A.c&&(u.c[u.c.length]=A)}function aCe(e){var n,i,u,f,g,y,x,_,C;for(u=e.e.e.j,n=v(xr(e.e,(Ye(),Uc)),86).kb((Ku(),Hv)),s3e(e),g=new V(Rc(e.e));g.a<g.c.c.length;){switch(f=v($(g),161),x=v(xr(f,Jl),15),!x&&(x=new dn(0)),_=f.e.j,y=(i=v(f.e,7).d,new vs(i.d,i.b,i.a,i.c)),C=new lr(f.e.i),v(f.e,7).g.e){case 4:C.a=-_.a-x.a,C.b=e.s-_.b-(n?y.a:0),e.s-=q2(e,(Be(),lt))+_.b+(n?y.d+y.a:0);break;case 2:C.a=u.a+x.a,C.b=e.a+(n?y.d:0),e.a+=q2(e,(Be(),ot))+_.b+(n?y.d+y.a:0);break;case 1:C.a=e.f+(n?y.b:0),C.b=-f.e.j.b-x.a,e.f+=q2(e,(Be(),yt))+_.a+(n?y.b+y.c:0);break;case 3:C.a=e.r-_.a-(n?y.c:0),C.b=u.b+x.a,e.r-=q2(e,(Be(),Et))+_.a+(n?y.b+y.c:0)}f.e.i.a=C.a,f.e.i.b=C.b}}function oCe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe;for(N=new pa,A=new pa,re=new pa,oe=new pa,C=v(X(n,(Ce(),ca)),15).a,g=C*v(X(n,(tn(),Au)),15).a,Yt(Re(Zt(X(n,(Ye(),Mv))))),_=(O=new hn(i.a).a.bb().mb(),new yn(O));_.a.G();)if(x=(y=v(_.a.H(),21),v(y.yb(),9)),G=v(X(x,ni),32),G==(Be(),yt))for(A.a.db(x,A),f=Vt(Yr(x));Ft(f);)u=v(Ot(f),12),Rn(N,u.c.f);else if(G==Et)for(oe.a.db(x,oe),f=Vt(Yr(x));Ft(f);)u=v(Ot(f),12),Rn(re,u.c.f);N.a.Y()!=0&&(Y=new n_(2,g),ee=G7(Y,n,N,A,-C-n.d.b),ee>0&&(e.a=C+(ee-1)*g,n.d.b+=e.a,n.e.b+=e.a)),re.a.Y()!=0&&(Y=new n_(1,g),ee=G7(Y,n,re,oe,n.e.b+C-n.d.b),ee>0&&(n.e.b+=C+(ee-1)*g))}function Sne(e,n){var i,u,f,g,y,x,_,C,N;return Vn(),n.length==0?e.fc(J7,k_,-1,-1):(N=Rl(n),ls(N.substr(0,3),"at ")&&(N=Ap(N,3,N.length-3)),N=N.replace(/\[.*?\]/g,""),y=N.indexOf("("),y==-1?(y=N.indexOf("@"),y==-1?(C=N,N=""):(C=Rl(Ap(N,y+1,N.length-(y+1))),N=Rl(N.substr(0,y)))):(i=N.indexOf(")",y),C=N.substr(y+1,i-(y+1)),N=Rl(N.substr(0,y))),y=E1e(N,l7(46)),y!=-1&&(N=Ap(N,y+1,N.length-(y+1))),(N.length==0||ls(N,"Anonymous function"))&&(N=k_),x=O1e(C,l7(58)),f=V1e(C,l7(58),x-1),_=-1,u=-1,g=J7,x!=-1&&f!=-1&&(g=C.substr(0,f),_=FK(C.substr(f+1,x-(f+1))),u=FK(Ap(C,x+1,C.length-(x+1)))),e.fc(g,N,_,u))}function sCe(e){var n,i,u,f,g,y,x,_,C,N;for(C=new Ve,x=new Ve,y=new V(e);y.a<y.c.c.length;)f=v($(y),80),f.c=f.b.c.length,f.f=f.e.c.length,f.c==0&&(C.c[C.c.length]=f),f.f==0&&f.j.b==0&&(x.c[x.c.length]=f);for(u=-1;C.c.length!=0;)for(f=v(Gf(C,0),80),i=new V(f.e);i.a<i.c.c.length;)n=v($(i),118),N=n.b,N.i=mi(N.i,f.i+1),u=mi(u,N.i),--N.c,N.c==0&&(C.c[C.c.length]=N);if(u>-1){for(g=new V(x);g.a<g.c.c.length;)f=v($(g),80),f.i=u;for(;x.c.length!=0;)for(f=v(Gf(x,0),80),i=new V(f.b);i.a<i.c.c.length;)n=v($(i),118),_=n.a,!(_.j.b>0)&&(_.i=mc(_.i,f.i-1),--_.f,_.f==0&&(x.c[x.c.length]=_))}}function uCe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee;if(Yt(Re(Zt(X(i,(Ye(),aE))))))for(x=new V(i.f);x.a<x.c.c.length;)for(y=v($(x),7),A=v(fr(y.e,Ie(_a,va,12,y.e.c.length,0,1)),47),C=0,N=A.length;C<N;++C)_=A[C],g=_.d.f==i,f=g&&Yt(Re(Zt(X(_,aE)))),f&&(G=_.c,O=v(pn(e.b,G),9),O||(O=Qy(G,(tr(),Ss),G.g,-1,G.j,v(X(n,is),59),n),_e(O,(Ce(),Ct),G),Nn(e.b,G,O),Ke(n.b,O)),ee=_.d,Y=v(pn(e.b,ee),9),Y||(Y=Qy(ee,(tr(),Ss),ee.g,1,ee.j,v(X(n,is),59),n),_e(Y,(Ce(),Ct),ee),Nn(e.b,ee,Y),Ke(n.b,Y)),u=hk(_),er(u,v(ct(O.f,0),7)),Fn(u,v(ct(Y.f,0),7)),jt(e.a,_,new Y1(u,n,(Cr(),_i))),v(X(n,(Ce(),ui)),18).ib((jr(),As)))}function cCe(e,n,i,u,f,g){var y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;switch(G=Yp(e.g),ee=Yp(i.g),Y=On(vo(e.i),e.a),re=On(vo(i.i),i.a),y=On(new lr(Y),gs(new Sl(G),n)),x=On(new lr(re),gs(new Sl(ee),u)),C=Mxe(e,f),f==(Be(),Et)||f==ot?C+=g:C-=g,O=new oi,oe=new oi,f.e){case 1:case 3:O.a=y.a,O.b=Y.b+C,oe.a=x.a,oe.b=O.b;break;case 2:case 4:O.a=Y.a+C,O.b=y.b,oe.a=O.a,oe.b=x.b;break;default:return null}switch(N=gs(On(new kt(O.a,O.b),oe),.5),A=new nk(be(ve(rn,1),nn,10,0,[Y,y,O,N,oe,x,re])),_=ree(A),de=iee(A),f.e){case 1:case 3:A.a=_,ce=Yxe(A);break;case 2:case 4:A.a=de,ce=Uxe(A);break;default:return null}return JM(A,new r_(be(ve(rn,1),nn,10,0,[_,de,ce,Y,re]))),A}function lCe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G;for(g=new cte(n),A=P_e(e,n,g),G=et(v(X(n,(Ye(),Cs)),15).a,1),N=new V(A.a);N.a<N.c.c.length;)C=v($(N),27),_=lX(v(C.a,10),v(C.b,10),G),o=!0,o=o&Yu(i,new kt(_.d,_.e)),o=o&Yu(i,Da(new kt(_.d,_.e),_.c,0)),o=o&Yu(i,Da(new kt(_.d,_.e),0,_.b)),o&Yu(i,Da(new kt(_.d,_.e),_.c,_.b));switch(O=g.d,x=lX(v(A.b.a,10),v(A.b.b,10),G),O==(Be(),lt)||O==ot?(u.c[O.e]=mn(u.c[O.e],x.e),u.b[O.e]=et(u.b[O.e],x.e+x.b)):(u.c[O.e]=mn(u.c[O.e],x.d),u.b[O.e]=et(u.b[O.e],x.d+x.c)),f=ti,y=g.c.f.e,O.e){case 4:f=y.c;break;case 2:f=y.b;break;case 1:f=y.a;break;case 3:f=y.d}return u.a[O.e]=et(u.a[O.e],f),g}function fCe(e,n,i,u,f){var g,y,x,_,C,N,A,O,G,Y,ee,re;for(g=new Ve,C=new V(u);C.a<C.c.c.length;)if(x=v($(C),187),y=null,x.f==(Cr(),_i))for(Y=new V(x.e);Y.a<Y.c.c.length;)G=v($(Y),12),re=G.d.f,ta(re)==n?xJ(e,n,x,G,x.b,G.d):!i||dd(re,i)?Kxe(e,n,x,u,G):(O=m_(e,n,i,G,x.b,_i,y),O!=y&&(g.c[g.c.length]=O),O.c&&(y=O));else for(A=new V(x.e);A.a<A.c.c.length;)if(N=v($(A),12),ee=N.c.f,ta(ee)==n)xJ(e,n,x,N,N.c,x.b);else{if(!i||dd(ee,i))continue;O=m_(e,n,i,N,x.b,la,y),O!=y&&(g.c[g.c.length]=O),O.c&&(y=O)}for(_=new V(g);_.a<_.c.c.length;)x=v($(_),187),ia(n.b,x.a,0)!=-1||Ke(n.b,x.a),x.c&&(f.c[f.c.length]=x)}function hCe(e){var n,i,u,f;for(n=e.e.j,u=new V(Rc(e));u.a<u.c.c.length;){switch(i=v($(u),161),f=v(xr(i,(Ye(),Jl)),15),!f&&(f=new dn(0)),v(i.e,7).g.e){case 4:i.e.i.b=n.b*Re(Wt(xr(i,rh))),i.e.i.a=-i.e.j.a-f.a;break;case 2:i.e.i.b=n.b*Re(Wt(xr(i,rh))),i.e.i.a=n.a+f.a;break;case 1:i.e.i.a=n.a*Re(Wt(xr(i,rh))),i.e.i.b=-i.e.j.b-f.a;break;case 3:i.e.i.a=n.a*Re(Wt(xr(i,rh))),i.e.i.b=n.b+f.a}switch(v(i.e,7).g.e){case 4:i.e.i.b=n.b*Re(Wt(xr(i,rh))),i.e.i.a=-i.e.j.a-f.a;break;case 2:i.e.i.b=n.b*Re(Wt(xr(i,rh))),i.e.i.a=n.a+f.a;break;case 1:i.e.i.a=n.a*Re(Wt(xr(i,rh))),i.e.i.b=-i.e.j.b-f.a;break;case 3:i.e.i.a=n.a*Re(Wt(xr(i,rh))),i.e.i.b=n.b+f.a}}}function dCe(e){var n,i,u,f,g,y,x,_,C;for(g=e.f,f=Lj(sk(e)),C=xn(Ba(e.g),0);C.b!=C.d.c;)if(_=v(fn(C),7),_.e.c.length==0){for(i=new V(_.b);i.a<i.c.c.length;)if(n=v($(i),12),u=n.c,f.a.R(u)){for(y=new jn(g.f,0),x=(_t(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),7));x!=_;)x=(_t(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),7));Uu(y,u),Db(C,u),Vy(u,_.g),Gb(C),Gb(C),f.a.eb(u)!=null}}else for(i=new V(_.e);i.a<i.c.c.length;)if(n=v($(i),12),u=n.d,f.a.R(u)){for(y=new jn(g.f,0),x=(_t(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),7));x!=_;)x=(_t(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),7));_t(y.b>0),y.a.sb(y.c=--y.b),Uu(y,u),Db(C,u),Vy(u,_.g),Gb(C),Gb(C),f.a.eb(u)!=null}}function pCe(e){var n,i,u,f,g,y,x,_,C;g=new I2(e),f=Qn(g,"graph"),_=Qn(g,"success"),u=Qn(g,"error"),y=Qn(g,"options");try{if(!f||!f.kc())throw new p1("Mandatory parameter missing, 'graph' must be specified");v2e(new tq,f.kc(),y?y.kc():null),x=f.kc().a,_&&_.kc()?sv(_.kc().a,x):sv(null,x)}catch(N){if(N=hi(N),Ze(N,73))C=N,u&&u.kc()?sv(u.kc().a,pte(C).a):sv(null,pte(C).a);else if(Ze(N,54))n=N,i=new Ef,io(i,"type",new Cl(y1(n.$c))),n.bc()!=null?io(i,S_,new Cl(n.bc())):io(i,S_,new Cl("null (sic)")),io(i,cre,new Cl(Z6(new g1(`
|
|
364
|
+
`),new Bh(new Oo((n.g==null&&(n.g=mj(n)),n.g)))))),u&&u.kc()?sv(u.kc().a,i.a):sv(null,i.a),e7(n,(jf(),Qoe));else throw di(N)}}function gCe(e,n,i){var u,f,g,y,x,_,C,N,A,O;if(i)for(u=-1,N=new jn(n,0);N.b<N.d.Y();){if(x=(_t(N.b<N.d.Y()),v(N.d.sb(N.c=N.b++),9)),A=e.a[x.d.k][x.k].a,A==null){for(y=u+1,g=new jn(n,N.b);g.b<g.d.Y();)if(O=a1e(e,(_t(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),9))).a,O!=null){y=(Tr(O),O);break}A=(u+y)/2,e.a[x.d.k][x.k].a=A,e.a[x.d.k][x.k].d=(Tr(A),A),e.a[x.d.k][x.k].b=1}u=(Tr(A),A)}else{for(f=0,C=new V(n);C.a<C.c.c.length;)x=v($(C),9),e.a[x.d.k][x.k].a!=null&&(f=et(f,Re(e.a[x.d.k][x.k].a)));for(f+=2,_=new V(n);_.a<_.c.c.length;)x=v($(_),9),e.a[x.d.k][x.k].a==null&&(A=qf(e.e,24)*O_*f-1,e.a[x.d.k][x.k].a=A,e.a[x.d.k][x.k].d=A,e.a[x.d.k][x.k].b=1)}}function bCe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y;for(_=0,C=0,Y=0,G=0,y=0,O=0,A=0,N=0,g=new ey(new h1(e.c).a);R1(g.a);)switch(f=(g.b=Al(g.a),new T1(g.c,g.b)),u=v(f.b.b[f.a.e],62),v(f.a,67).e){case 12:case 13:case 14:O+=u.c+n;break;case 15:case 16:case 17:A+=u.c+n,y=et(y,u.b+n);break;case 18:case 19:case 20:N+=u.c+n;break;case 0:case 1:case 2:Y+=u.c+n;break;case 3:case 4:case 5:G+=u.c+n;break;case 6:case 7:case 8:_+=u.b+n;break;case 9:case 10:case 11:C+=u.b+n}_-=n,C-=n,Y-=n,G-=n,O+=O!=0?n:0,A+=A!=0?n:0,N+=N!=0?n:0,x=e.p.d+y+e.p.a,x+=x!=0?n:0,i.a=et(i.a,Y),i.a=et(i.a,O),i.a=et(i.a,A),i.a=et(i.a,N),i.a=et(i.a,G),i.b=et(i.b,_),i.b=et(i.b,x),i.b=et(i.b,C)}function vCe(e){var n,i,u,f,g,y,x,_;for(n=null,u=new V(e);u.a<u.c.c.length;)i=v($(u),102),Re(Xa(i.g,i.d[0]).a),i.b=null,i.e&&i.e.Y()>0&&i.c==0&&(!n&&(n=new Ve),n.c[n.c.length]=i);if(n)for(;n.c.length!=0;){if(i=v(Gf(n,0),102),i.b&&i.b.c.length>0){for(g=(!i.b&&(i.b=new Ve),new V(i.b));g.a<g.c.c.length;)if(f=v($(g),102),Re(Xa(f.g,f.d[0]).a)==Re(Xa(i.g,i.d[0]).a)){if(ia(e,f,0)>ia(e,i,0))return new Ar(f,i)}else if(Re(Xa(f.g,f.d[0]).a)>Re(Xa(i.g,i.d[0]).a))return new Ar(f,i)}for(x=(!i.e&&(i.e=new Ve),i.e).mb();x.G();)y=v(x.H(),102),_=(!y.b&&(y.b=new Ve),y.b),Ll(0,_.c.length),Pb(_.c,0,i),y.c==_.c.length&&(n.c[n.c.length]=y)}return null}function yCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for(A=(Wn(),new an),N=(ar(),new hs(ds($s(e.a,new w))));Ft(N);)for(C=v(Ot(N),9),f=b2e(C,(Be(),ot)),u=new V(f);u.a<u.c.c.length;)for(i=v($(u),7),y=new V(i.e);y.a<y.c.c.length;){for(g=v($(y),12),ga(),ee=g.d.f,(ee.g==(gt(),An)||ee.g==Po)&&(ee=v(X(ee,(Ce(),Zi)),7).f),Mi(A.d,ee)?n=v(Ti(Mi(A.d,ee)),171):(f.c.length==2?ut(i)===ut((qn(0,f.c.length),f.c[0]))?n=Ts:n=Nu:n=Ts,Ta(A.d,ee,n)),_=new V(g.b);_.a<_.c.c.length;)x=v($(_),33),_e(x,(Ce(),Fo),n);for(Y=new V(g.c.c);Y.a<Y.c.c.length;)O=v($(Y),33),_e(O,(Ce(),Fo),n);for(G=new V(g.d.c);G.a<G.c.c.length;)O=v($(G),33),_e(O,(Ce(),Fo),n)}}function mCe(e,n){var i,u,f,g,y,x,_,C,N;if(Of(Un(n))!=1||v(ly(Un(n)),12).d.f.g!=(gt(),An))return null;for(g=v(ly(Un(n)),12),i=g.d.f,bo(i,(gt(),sa)),_e(i,(Ce(),ua),null),_e(i,Zi,null),_e(i,(Ye(),St),v(X(n,St),28)),_e(i,Ma,v(X(n,Ma),86)),f=X(g.c,Ct),y=null,C=mr(i,(Be(),ot)).mb();C.G();)if(x=v(C.H(),7),x.e.c.length!=0){_e(x,Ct,f),N=g.c,x.j.a=N.j.a,x.j.b=N.j.b,x.a.a=N.a.a,x.a.b=N.a.b,$n(x.c,N.c),N.c.c=Ie(dt,tt,1,0,4,1),y=x;break}if(_e(g.c,Ct,null),!Hb(mr(n,ot)))for(_=new V(Ml(mr(n,ot)));_.a<_.c.c.length;)x=v($(_),7),x.e.c.length==0?(u=new ur,en(u,ot),u.j.a=x.j.a,u.j.b=x.j.b,Tn(u,i),_e(u,Ct,X(x,Ct)),Tn(x,null)):Tn(y,i);return i.j.b=n.j.b,Ke(e.b,i),i}function wCe(e){var n,i,u,f,g,y,x,_,C;if(g=e.e.e.j,y=new lr(g),_=v(xr(e.e,(Ye(),Uc)),86),C=v(xr(e.e,Rv),86),x=v(xr(e.e,St),28),n=bs(_,(Ku(),Hv)),_.c!=0){switch(g.a=0,g.b=0,u=null,x.e){case 1:case 2:case 3:u=Gke(e,e.k);break;case 4:u=new lr(y);break;case 5:u=N_e(e.e,n)}bs(_,cE)&&(u&&(g.a=et(g.a,u.a),g.b=et(g.b,u.b)),n&&(g.a=et(g.a,e.q.b+e.q.c+e.k),g.b=et(g.b,e.q.d+e.q.a+e.k))),bs(_,uE)&&wl(new V(nv(e.e)))&&bCe(e,e.d,g),bs(_,Gv)&&(f=v(xr(e.e,sg),15).a,i=v(xr(e.e,og),15).a,bs(C,(vd(),zv))&&(f<=0&&(f=20),i<=0&&(i=20)),bs(C,hE)?(f>0&&(g.a=et(g.a,f+e.q.b+e.q.c)),i>0&&(g.b=et(g.b,i+e.q.d+e.q.a))):(f>0&&(g.a=et(g.a,f)),i>0&&(g.b=et(g.b,i)))),h1e(e.e,g)}}function Nne(e,n,i){var u,f,g,y,x,_,C,N,A,O,G;if(!e.b)return!1;for(y=null,O=null,_=new vk(null,null),f=1,_.a[1]=e.b,A=_;A.a[f];)C=f,x=O,O=A,A=A.a[f],u=e.a.$b(n,A.d),f=u<0?0:1,u==0&&(!i.c||Ga(A.e,i.d))&&(y=A),!(A&&A.b)&&!wc(A.a[f])&&(wc(A.a[1-f])?O=O.a[C]=ky(A,f):wc(A.a[1-f])||(G=O.a[1-C],G&&(!wc(G.a[1-C])&&!wc(G.a[C])?(O.b=!1,G.b=!0,A.b=!0):(g=x.a[1]==O?1:0,wc(G.a[C])?x.a[g]=MW(O,C):wc(G.a[1-C])&&(x.a[g]=ky(O,C)),A.b=x.a[g].b=!0,x.a[g].a[0].b=!1,x.a[g].a[1].b=!1))));return y&&(i.b=!0,i.d=y.e,A!=y&&(N=new vk(A.d,A.e),Jxe(e,_,y,N),O==y&&(O=N)),O.a[O.a[1]==A?1:0]=A.a[A.a[0]?0:1],--e.c),e.b=_.a[1],e.b&&(e.b.b=!1),i.b}function xCe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;for(u=v(X(e,(Ye(),St)),28),_=e.e,x=e.a,i=v(X(e,(Ce(),Is)),15).a,C=_.a+x.b+x.c+2*i,N=0-x.d-i-e.d.b,G=_.b+x.d+x.a+2*i-e.d.b,A=new Ve,Y=new Ve,g=(O=new hn(n.a).a.bb().mb(),new yn(O));g.a.G();){switch(f=(y=v(g.a.H(),21),v(y.yb(),9)),u.e){case 1:case 2:case 3:Ike(f);break;case 4:ee=v(X(f,Xu),10),re=ee?ee.a:0,f.i.a=C*Re(Wt(X(f,oc)))-re,jy(f,!0,!1);break;case 5:oe=v(X(f,Xu),10),ce=oe?oe.a:0,f.i.a=Re(Wt(X(f,oc)))-ce,jy(f,!0,!1),_.a=et(_.a,f.i.a+f.j.a/2)}switch(v(X(f,ni),32).e){case 1:f.i.b=N,A.c[A.c.length]=f;break;case 3:f.i.b=G,Y.c[Y.c.length]=f}}switch(u.e){case 1:case 2:jX(A,e),jX(Y,e);break;case 3:AX(A,e),AX(Y,e)}}function kCe(e){var n,i,u,f,g,y;return u=v(X(e.a.g,(Ye(),Ma)),86),QX(u,(Wu(),n=v(da(Kn),11),new xi(n,v(ea(n,n.length),11),0)))||(Ac(u,Ty(ma))?(i=v(v(oo(e.a.b,e.b),20).sb(0),33),e.b.i.a=i.i.a,e.b.i.b=i.i.b):Ac(u,Ty(xa))?(f=v(ct(e.a.c,e.a.c.c.length-1),9),g=v(v(oo(e.a.b,e.b),20).sb(v(oo(e.a.b,e.b),20).Y()-1),33),y=f.j.a-(g.i.a+g.j.a),e.b.i.a=e.a.g.j.a-y-e.b.j.a,e.b.i.b=g.i.b):Ac(u,ln(Ya,be(ve(Kn,1),Je,41,0,[Co])))?(i=v(v(oo(e.a.b,e.b),20).sb(0),33),e.b.i.a=(e.a.g.j.a-e.b.j.a)/2,e.b.i.b=i.i.b):Ac(u,Ty(Ya))?(i=v(v(oo(e.a.b,e.b),20).sb(0),33),e.b.i.b=i.i.b):Ac(u,Ty(Co))&&(i=v(v(oo(e.a.b,e.b),20).sb(0),33),e.b.i.a=(e.a.g.j.a-e.b.j.a)/2,e.b.i.b=i.i.b)),null}function Tne(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re;for(Y=new V(e);Y.a<Y.c.c.length;){for(G=v($(Y),9),Do(G.i),Do(G.j),v_e(G),Yke(G),re=new V(G.f);re.a<re.c.c.length;){for(ee=v($(re),7),Do(ee.i),Do(ee.a),Do(ee.j),en(ee,gee(ee.g)),g=v(X(ee,(Ye(),ec)),24),g&&_e(ee,ec,Tt(-g.a)),f=new V(ee.e);f.a<f.c.c.length;){for(u=v($(f),12),i=xn(u.a,0);i.b!=i.d.c;)n=v(fn(i),10),Do(n);if(_=v(X(u,dr),44),_)for(x=xn(_,0);x.b!=x.d.c;)y=v(fn(x),10),Do(y);for(A=new V(u.b);A.a<A.c.c.length;)C=v($(A),33),Do(C.i),Do(C.j)}for(O=new V(ee.c);O.a<O.c.c.length;)C=v($(O),33),Do(C.i),Do(C.j)}for(G.g==(gt(),Zn)&&(_e(G,(Ce(),ni),gee(v(X(G,ni),32))),i_e(G)),N=new V(G.c);N.a<N.c.c.length;)C=v($(N),33),Do(C.j),Do(C.i)}}function _Ce(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;for(zxe(i),dd(n.d.f,n.c.f)?(N=n.c,A=Mn(be(ve(rn,1),nn,10,0,[N.i,N.a])),C=N.f.b,Da(A,-C.b,-C.d),A.a-=u.a,A.b-=u.b):A=ra(n.c),A.a+=u.a,A.b+=u.b,O=new Ef,xo(e,O,"x",A.a),xo(e,O,"y",A.b),io(i,"sourcePoint",O),G=ra(n.d),X(n,(Ce(),hC))!=null&&On(G,v(X(n,hC),10)),On(G,u),Y=new Ef,xo(e,Y,"x",G.a),xo(e,Y,"y",G.b),io(i,"targetPoint",Y),f=new QM,ce=jc(n.a,u),g=0,oe=xn(ce,0);oe.b!=oe.d.c;)ee=v(fn(oe),10),_=new Ef,xo(e,_,"x",ee.a),xo(e,_,"y",ee.b),VQ(f,g++,_);if(ce.b==0?io(i,T_,null):io(i,T_,f),y=v(X(n,(Ye(),dr)),44),g=0,y){for(jc(y,u),x=new QM,re=xn(y,0);re.b!=re.d.c;)ee=v(fn(re),10),_=new Ef,xo(e,_,"x",ee.a),xo(e,_,"y",ee.b),VQ(x,g++,_);io(i,lre,x)}else io(i,lre,null)}function ECe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe;if(ee=e.i,re=e.j,O=e.e,n){for(A=u/2*(n.Y()-1),G=0,C=n.mb();C.G();)x=v(C.H(),9),A+=x.j.a,G=et(G,x.j.b);for(oe=ee.a-(A-re.a)/2,y=ee.b-O.d+G,f=re.a/(n.Y()+1),g=f,_=n.mb();_.G();)x=v(_.H(),9),x.i.a=oe,x.i.b=y-x.j.b,oe+=x.j.a+u/2,N=jte(x),N.i.a=x.j.a/2-N.a.a,N.i.b=x.j.b,Y=v(X(x,(Ce(),Bm)),7),Y.b.c.length+Y.e.c.length==1&&(Y.i.a=g-Y.a.a,Y.i.b=0,Tn(Y,e)),g+=f}if(i){for(A=u/2*(i.Y()-1),G=0,C=i.mb();C.G();)x=v(C.H(),9),A+=x.j.a,G=et(G,x.j.b);for(oe=ee.a-(A-re.a)/2,y=ee.b+re.b+O.a-G,f=re.a/(i.Y()+1),g=f,_=i.mb();_.G();)x=v(_.H(),9),x.i.a=oe,x.i.b=y,oe+=x.j.a+u/2,N=jte(x),N.i.a=x.j.a/2-N.a.a,N.i.b=0,Y=v(X(x,(Ce(),Bm)),7),Y.b.c.length+Y.e.c.length==1&&(Y.i.a=g-Y.a.a,Y.i.b=re.b,Tn(Y,e)),g+=f}}function CCe(e,n,i,u,f){var g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue;for(Ue=0,G=0,A=new V(n.f);A.a<A.c.c.length;){for(N=v($(A),9),O=0,x=0,_=i?v(X(N,Mm),24).a:_u,oe=u?v(X(N,jm),24).a:_u,C=_>oe?_:oe,de=new V(N.f);de.a<de.c.c.length;){if(ce=v($(de),7),ye=N.i.b+ce.i.b+ce.a.b,u)for(y=new V(ce.e);y.a<y.c.c.length;)g=v($(y),12),ee=g.d,Y=ee.f,n!=e.a[Y.k]&&(re=mi(v(X(Y,Mm),24).a,v(X(Y,jm),24).a),Ee=v(X(g,(Ce(),No)),24).a,Ee>=C&&Ee>=re&&(O+=Y.i.b+ee.i.b+ee.a.b-ye,++x));if(i)for(y=new V(ce.b);y.a<y.c.c.length;)g=v($(y),12),ee=g.c,Y=ee.f,n!=e.a[Y.k]&&(re=mi(v(X(Y,Mm),24).a,v(X(Y,jm),24).a),Ee=v(X(g,(Ce(),No)),24).a,Ee>=C&&Ee>=re&&(O+=Y.i.b+ee.i.b+ee.a.b-ye,++x))}x>0&&(Ue+=O/x,++G)}G>0?(n.a=f*Ue/G,n.i=G):(n.a=0,n.i=0)}function PCe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;for(G=n.c.length,O=0,A=new V(e.c);A.a<A.c.c.length;)if(N=v($(A),16),oe=N.a,oe.c.length!=0){for(re=new V(oe),C=0,ce=null,f=v($(re),9);f;){if(g=v(ct(n,f.k),111),g.c>=0){for(_=null,x=new jn(N.a,C+1);x.b<x.d.Y()&&(y=(_t(x.b<x.d.Y()),v(x.d.sb(x.c=x.b++),9)),_=v(ct(n,y.k),111),!(_.d==g.d&&_.c<g.c));)_=null;_&&(ce&&(jl(u,f.k,Tt(v(ct(u,f.k),24).a-1)),v(ct(i,ce.k),20).nb(g)),g=Ixe(g,f,G++),n.c[n.c.length]=g,Ke(i,new Ve),ce?(v(ct(i,ce.k),20).ib(g),Ke(u,Tt(1))):Ke(u,Tt(0)))}Y=null,re.a<re.c.c.length&&(Y=v($(re),9),ee=v(ct(n,Y.k),111),v(ct(i,f.k),20).ib(ee),jl(u,Y.k,Tt(v(ct(u,Y.k),24).a+1))),g.d=O,g.c=C++,ce=f,f=Y}++O}Yt(Re(Zt(X(e,(Ye(),Mv)))))}function ru(e,n){var i;if(e.e)throw new yc((Mf(yE),"The "+yE.j+dre));if(!z0e(e.a,n))throw new gu("The direction "+n+" is not supported by the CGraph instance.");if(n==e.d)return e;switch(i=e.d,e.d=n,i.e){case 0:switch(n.e){case 2:mu(e);break;case 1:nu(e),mu(e);break;case 4:Dl(e),mu(e);break;case 3:Dl(e),nu(e),mu(e)}break;case 2:switch(n.e){case 1:nu(e),g_(e);break;case 4:Dl(e),mu(e);break;case 3:Dl(e),nu(e),mu(e)}break;case 1:switch(n.e){case 2:nu(e),g_(e);break;case 4:nu(e),Dl(e),mu(e);break;case 3:nu(e),Dl(e),nu(e),mu(e)}break;case 4:switch(n.e){case 2:Dl(e),mu(e);break;case 1:Dl(e),nu(e),mu(e);break;case 3:nu(e),g_(e)}break;case 3:switch(n.e){case 2:nu(e),Dl(e),mu(e);break;case 1:nu(e),Dl(e),nu(e),mu(e);break;case 4:nu(e),g_(e)}}return e}function K7(e,n,i){var u,f,g,y,x,_,C,N,A;if(!e.a[n.d.k][n.k].e){for(e.a[n.d.k][n.k].e=!0,e.a[n.d.k][n.k].b=0,e.a[n.d.k][n.k].d=0,e.a[n.d.k][n.k].a=null,N=new V(n.f);N.a<N.c.c.length;)for(C=v($(N),7),A=i?new dp(C):new Dh(C),_=A.mb();_.G();)x=v(_.H(),7),y=x.f,y.d==n.d?y!=n&&(K7(e,y,i),e.a[n.d.k][n.k].b+=e.a[y.d.k][y.k].b,e.a[n.d.k][n.k].d+=e.a[y.d.k][y.k].d):(e.a[n.d.k][n.k].d+=e.d[x.k],++e.a[n.d.k][n.k].b);if(g=v(X(n,(Ce(),I9)),20),g)for(f=g.mb();f.G();)u=v(f.H(),9),n.d==u.d&&(K7(e,u,i),e.a[n.d.k][n.k].b+=e.a[u.d.k][u.k].b,e.a[n.d.k][n.k].d+=e.a[u.d.k][u.k].d);e.a[n.d.k][n.k].b>0&&(e.a[n.d.k][n.k].d+=qf(e.e,24)*O_*.07000000029802322-.03500000014901161,e.a[n.d.k][n.k].a=e.a[n.d.k][n.k].d/e.a[n.d.k][n.k].b)}}function SCe(e,n){var i,u,f,g,y,x,_,C,N,A,O;for(f=new V(e.a.c);f.a<f.c.c.length;)for(i=v($(f),16),_=new V(i.a);_.a<_.c.c.length;)x=v($(_),9),n.i[x.k]=x,n.g[x.k]=n.k==(Bo(),So)?ti:Vi;for(y=e.a.c,n.c==(Xo(),uu)&&(y=Ze(y,87)?Op(v(y,87)):Ze(y,88)?v(y,88).a:Ze(y,63)?new gb(y):new _p(y)),twe(e.e,n,e.b),M0e(n.n),g=y.mb();g.G();)for(i=v(g.H(),16),C=i.a,n.k==(Bo(),So)&&(C=Ze(C,87)?Op(v(C,87)):Ze(C,88)?v(C,88).a:Ze(C,63)?new gb(C):new _p(C)),O=C.mb();O.G();)A=v(O.H(),9),n.f[A.k]==A&&Dne(e,A,n);for(MEe(e,n),u=y.mb();u.G();)for(i=v(u.H(),16),O=new V(i.a);O.a<O.c.c.length;)A=v($(O),9),n.n[A.k]=n.n[n.f[A.k].k],A==n.f[A.k]&&(N=Re(n.g[n.i[A.k].k]),(n.k==(Bo(),So)&&N>ti||n.k==nc&&N<Vi)&&(n.n[A.k]=Re(n.n[A.k])+N));e.e.Jc()}function Mne(e,n){var i,u,f,g,y,x,_,C,N,A,O;m2e(n,be(ve(Jf,1),tt,79,0,[(Ce(),ca),Is,(tn(),mg),Bd])),C=v(X(n,ca),15).a,v(X(n,Au),15).a*C<2&&_e(n,Au,new dn(2/C)),N=v(X(n,(Ye(),is)),59),N==(sr(),rs)&&_e(n,is,Gk(n)),A=v(X(n,W9),24),A.a==0?_e(n,Hd,new zX):_e(n,Hd,new SJ(A.a)),O=new Ane(n),_e(n,lf,O),f=wy(e,v(X(n,yC),180)),x=wy(e,v(X(n,kC),180)),u=wy(e,v(X(n,zm),180)),_=wy(e,v(X(n,_C),180)),g=wy(e,L1e(v(X(n,B9),122))),y=new Jn,_e(n,Boe,y),Fr(Fr(Fr(Fr(Fr(Fr(y,f.qc(n)),x.qc(n)),u.qc(n)),_.qc(n)),g.qc(n)),IEe(n)),i=(ji(30,ql),new aa(30)),_e(n,U9,i),$n(i,uv(e,y,0)),i.c[i.c.length]=f,$n(i,uv(e,y,1)),i.c[i.c.length]=x,$n(i,uv(e,y,2)),i.c[i.c.length]=u,$n(i,uv(e,y,3)),i.c[i.c.length]=_,$n(i,uv(e,y,4)),i.c[i.c.length]=g,$n(i,uv(e,y,5))}function NCe(e,n){var i,u,f,g,y,x;if(g=wW(rv(e)),!g.Nb().V()){switch(f=v(X(v(v(v(g.Nb().sb(0),129),224).e,33),(ga(),Vie)),171),f=f==Fv?Nu:f,x=0,v(e.e,7).g.e){case 4:case 2:f==Nu&&(x=e.e.j.b);break;case 3:x=e.e.j.b}for((v(e.e,7).g==(Be(),yt)||f==Ts)&&(g=Op(g)),u=Gp(g.Nb().mb());u.G();){if(i=v(u.H(),129),y=new lr(i.e.i),f==Ts)switch(v(e.e,7).g.e){case 1:case 4:y.a=-i.e.j.a-n,y.b=x-n-i.e.j.b,x-=n+i.e.j.b;break;case 2:y.a=e.e.j.a+n,y.b=x-n-i.e.j.b,x-=n+i.e.j.b;break;case 3:y.a=-i.e.j.a-n,y.b=x+n,x+=n+i.e.j.b}else switch(v(e.e,7).g.e){case 4:y.a=-i.e.j.a-n,y.b=x+n,x+=n+i.e.j.b;break;case 2:y.a=e.e.j.a+n,y.b=x+n,x+=n+i.e.j.b;break;case 1:y.a=e.e.j.a+n,y.b=x-n-i.e.j.b,x-=n+i.e.j.b;break;case 3:y.a=e.e.j.a+n,y.b=x+n,x+=n+i.e.j.b}i.e.i.a=y.a,i.e.i.b=y.b}}}function TCe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G;for(u=0,f=0,N=0;N<e.length;N++)if(_=e[N],Gi(v(X(_,(Ye(),St)),28)))for(y=mr(_,(Be(),ot)).mb();y.G();)g=v(y.H(),7),g.b.c.length+g.e.c.length>0&&(u+=g.b.c.length+g.e.c.length,Nn(n,g,Tt(u)));else{for(x=mr(_,(Be(),ot)).mb();x.G();)g=v(x.H(),7),u+=g.b.c.length+g.e.c.length;for(y=mr(_,ot).mb();y.G();)g=v(y.H(),7),g.b.c.length+g.e.c.length>0&&Nn(n,g,Tt(u))}for(C=e.length-1;C>=0;C--)if(_=e[C],Gi(v(X(_,(Ye(),St)),28)))for(O=mr(_,(Be(),lt)).mb();O.G();)A=v(O.H(),7),A.b.c.length+A.e.c.length>0&&(f+=A.b.c.length+A.e.c.length,Nn(i,A,Tt(f)));else{for(G=mr(_,(Be(),lt)).mb();G.G();)A=v(G.H(),7),f+=A.b.c.length+A.e.c.length;for(O=mr(_,lt).mb();O.G();)A=v(O.H(),7),A.b.c.length+A.e.c.length>0&&Nn(i,A,Tt(f))}}function MCe(e,n,i,u,f){var g,y,x,_,C,N,A,O,G,Y,ee,re,oe;switch(O=Yp(e.g),Y=Yp(n.g),G=On(vo(e.i),e.a),ee=On(vo(n.i),n.a),_=On(new kt(G.a,G.b),gs(new Sl(O),1.3*i)),re=On(new kt(ee.a,ee.b),gs(new Sl(Y),1.3*u)),x=wi(_.a-re.a),x<f&&(e.g==(Be(),lt)||e.g==ot?_.a<re.a?_.a=re.a-f:_.a=re.a+f:_.a<re.a?re.a=_.a+f:re.a=_.a-f),g=0,y=0,e.g.e){case 4:g=2*(G.a-i)-.5*(_.a+re.a);break;case 2:g=2*(G.a+i)-.5*(_.a+re.a);break;case 1:y=2*(G.b-i)-.5*(_.b+re.b);break;case 3:y=2*(G.b+i)-.5*(_.b+re.b)}switch(n.g.e){case 4:g=2*(ee.a-u)-.5*(re.a+_.a);break;case 2:g=2*(ee.a+u)-.5*(re.a+_.a);break;case 1:y=2*(ee.b-u)-.5*(re.b+_.b);break;case 3:y=2*(ee.b+u)-.5*(re.b+_.b)}return A=new kt(g,y),N=new nk(be(ve(rn,1),nn,10,0,[G,_,A,re,ee])),C=ree(N),oe=iee(N),N.a=C,JM(N,new r_(be(ve(rn,1),nn,10,0,[C,oe,G,ee]))),N}function jne(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re;for(_=i.a,f=v(X(i,(Ce(),Is)),15).a,Y=i.d,x=(u=v(X(i,Is),15).a,new kt(i.e.a+i.a.b+i.a.c+2*u,i.e.b+i.a.d+i.a.a+2*u)),C=x.b,O=new V(e.a);O.a<O.c.c.length;)if(N=v($(O),9),N.g==(gt(),Zn)){switch(g=v(X(N,ni),32),y=v(X(N,G9),10),G=N.i,g.e){case 2:G.a=i.e.a+f+_.c-Y.a;break;case 4:G.a=-Y.a-f-_.b}switch(re=0,g.e){case 2:case 4:n==(tr(),Ps)?(ee=Re(Wt(X(N,oc))),G.b=x.b*ee-v(X(N,(Ye(),Xu)),10).b,re=G.b+y.b,jy(N,!1,!0)):n==ki&&(G.b=Re(Wt(X(N,oc)))-v(X(N,(Ye(),Xu)),10).b,re=G.b+y.b,jy(N,!1,!0))}C=C>re?C:re}for(i.e.b+=C-x.b,A=new V(e.a);A.a<A.c.c.length;)if(N=v($(A),9),N.g==(gt(),Zn))switch(g=v(X(N,ni),32),G=N.i,g.e){case 1:G.b=-Y.b-f-_.d;break;case 3:G.b=i.e.b+f+_.a-Y.b}}function jCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y;for(f=new Ve,_=new V(e.d.f);_.a<_.c.c.length;)y=v($(_),7),y.g==(Be(),ot)&&(f.c[f.c.length]=y);if(e.e.a==(sr(),ya)&&!Zs(v(X(e.d,(Ye(),St)),28)))for(u=Vt(Un(e.d));Ft(u);)i=v(Ot(u),12),Ke(f,i.c);for(g=e.d.j.a,_e(e.d,(Ce(),Wv),new dn(e.d.j.a)),e.d.j.a=e.c,_e(e.d,Xc,(zn(),zn(),Ei)),Ke(e.b,e.d),C=e.d,g-=e.c,N=e.a;N>1;)n=mn(g,e.c),C=(A=new ko(e.e.c),bo(A,(gt(),sa)),_e(A,(Ye(),St),v(X(C,St),28)),_e(A,Ma,v(X(C,Ma),86)),A.k=e.e.b++,Ke(e.b,A),A.j.b=C.j.b,A.j.a=n,O=new ur,en(O,(Be(),ot)),Tn(O,C),O.i.a=A.j.a,O.i.b=A.j.b/2,G=new ur,en(G,lt),Tn(G,A),G.i.b=A.j.b/2,G.i.a=-G.j.a,Y=new Qs,er(Y,O),Fn(Y,G),A),Ke(e.e.c.b,C),--N,g-=e.c+e.e.d;for(new t7(e.d,e.b,e.c),x=new V(f);x.a<x.c.c.length;)y=v($(x),7),zr(e.d.f,y),Tn(y,C)}function ACe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G;if(!(e.p>n.a||n.p>e.a)){for(i=0,u=0,A=(y=new hn(e.o.a).a.bb().mb(),new yn(y));A.a.G();)C=(f=v(A.a.H(),21),v(f.yb(),7)),zk(Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).b,n.p,n.a)&&++i;for(O=(x=new hn(e.g.a).a.bb().mb(),new yn(x));O.a.G();)C=(f=v(O.a.H(),21),v(f.yb(),7)),zk(Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).b,n.p,n.a)&&--i;for(G=(_=new hn(n.o.a).a.bb().mb(),new yn(_));G.a.G();)C=(f=v(G.a.H(),21),v(f.yb(),7)),zk(Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).b,e.p,e.a)&&++u;for(N=(g=new hn(n.g.a).a.bb().mb(),new yn(g));N.a.G();)C=(f=v(N.a.H(),21),v(f.yb(),7)),zk(Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).b,e.p,e.a)&&--u;i<u?new by(e,n,u-i):u<i?new by(n,e,i-u):(new by(n,e,0),new by(e,n,0))}}function Ane(e){var n;this.f=v(X(e,(Ce(),ca)),15).a,this.d=v(X(e,(tn(),yg)),15).a,this.a=this.f*v(X(e,Au),15).a,this.b=this.f*v(X(e,Uoe),15).a,v(X(e,lC),15),this.c=v(X(e,lC),15).a,this.e=v(X(e,(Ye(),Nd)),15).a,n=(gt(),be(ve(wL,1),Je,132,0,[nr,An,Zn,wr,Po,sa])).length,this.g=Ux(Zm,[qr,rm],[250,26],12,[n,n],2),Sb(this,nr,this.f),ys(this,nr,An,this.b),ys(this,nr,wr,this.b),ys(this,nr,Zn,this.c),ys(this,nr,Po,this.b),ys(this,nr,sa,this.b),Sb(this,An,this.a),ys(this,An,wr,this.a),ys(this,An,Zn,this.c),ys(this,An,Po,this.e),ys(this,An,sa,this.b),Sb(this,wr,this.a),ys(this,wr,Zn,this.c),ys(this,wr,Po,this.e),ys(this,wr,sa,this.b),Sb(this,Zn,this.c),ys(this,Zn,Po,this.c),ys(this,Zn,sa,this.c),Sb(this,Po,this.e),ys(this,Po,sa,this.e),Sb(this,sa,this.f)}function ICe(e,n){var i,u,f,g,y,x,_,C,N;if(Of(Yr(n))!=1||v(ly(Yr(n)),12).c.f.g!=(gt(),An))return null;for(i=v(ly(Yr(n)),12),u=i.c.f,bo(u,(gt(),nr)),_e(u,(Ce(),ua),null),_e(u,Zi,null),_e(u,Wv,v(X(n,Wv),15)),_e(u,Xc,(zn(),zn(),Ei)),_e(u,Ct,X(n,Ct)),u.j.b=n.j.b,g=X(i.d,Ct),y=null,C=mr(u,(Be(),lt)).mb();C.G();)if(x=v(C.H(),7),x.b.c.length!=0){_e(x,Ct,g),N=i.d,x.j.a=N.j.a,x.j.b=N.j.b,x.a.a=N.a.a,x.a.b=N.a.b,$n(x.c,N.c),N.c.c=Ie(dt,tt,1,0,4,1),y=x;break}if(_e(i.d,Ct,null),Of(mr(n,lt))>1)for(_=xn(Ba(mr(n,lt)),0);_.b!=_.d.c;)x=v(fn(_),7),x.b.c.length==0?(f=new ur,en(f,lt),f.j.a=x.j.a,f.j.b=x.j.b,Tn(f,u),_e(f,Ct,X(x,Ct)),Tn(x,null)):Tn(y,u);return _e(n,Ct,null),_e(n,Xc,Xn),bo(n,sa),_e(u,(Ye(),St),v(X(n,St),28)),_e(u,Ma,v(X(n,Ma),86)),El(e.b,0,u),u}function Qy(e,n,i,u,f,g,y){var x,_,C,N,A,O;switch(A=i,C=new ko(y),bo(C,(gt(),Zn)),_e(C,(Ce(),G9),f),_e(C,(Ye(),St),(tr(),ki)),_e(C,gg,v(X(e,Jl),15)),_=v(X(e,Xu),10),!_&&(_=new kt(f.a/2,f.b/2)),_e(C,Xu,_),N=new ur,Tn(N,C),n!=Ss&&n!=Yc||(x=g!=(sr(),rs)?g:ya,u>0?A=Ny(x):A=Rk(Ny(x)),_e(e,Ov,A)),A.e){case 4:_e(C,(tn(),Dr),(ba(),el)),_e(C,sC,(hd(),Qv)),C.j.b=f.b,en(N,(Be(),ot)),N.i.b=_.b;break;case 2:_e(C,(tn(),Dr),(ba(),sc)),_e(C,sC,(hd(),Im)),C.j.b=f.b,en(N,(Be(),lt)),N.i.b=_.b;break;case 1:_e(C,Mu,(Xs(),ch)),C.j.a=f.a,en(N,(Be(),Et)),N.i.a=_.a;break;case 3:_e(C,Mu,(Xs(),Dd)),C.j.a=f.a,en(N,(Be(),yt)),N.i.a=_.a}if(n==Md||n==Ps||n==ki){switch(O=0,A.e){case 4:case 2:O=null.cd,n==Ps&&(O/=null.cd);break;case 1:case 3:O=null.cd,n==Ps&&(O/=null.cd)}_e(C,oc,O)}return _e(C,ni,A),C}function LCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;for(C=new Xi,oe=(Wn(),new an),Nn(oe,e,Iee(e)),u=(ji(2,ql),new aa(2)),e.c&&Ke(u,e.c),e.d&&Ke(u,e.d),G=new V(u);G.a<G.c.c.length;)if(O=v($(G),7),n=new fi,Na(n,Ml(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[O.b,O.e]))))))),Jb(n,e,!0),n.b!=0)for(de=v(Ti(Mi(oe.d,e)),34),O==e.d?(Y=de[de.length-1],ce=!0):(Y=de[0],ce=!1),_=1;_<de.length;_++){for(ce?ee=de[de.length-1-_]:ee=de[_],i=xn(n,0);i.b!=i.d.c;)N=v(fn(i),12),A=v(Ti(Mi(oe.d,N)),34),A==null&&(A=Iee(N),Ta(oe.d,N,A)),A.length<=_?pA(i):(ce?re=A[A.length-1-_]:re=A[_],(ee.a!=re.a||ee.b!=re.b)&&(f=ee.a-Y.a,y=ee.b-Y.b,g=re.a-Y.a,x=re.b-Y.b,g*y==x*f&&ak(f)==ak(g)&&ak(y)==ak(x)?((f<=0?0-f:f)<(g<=0?0-g:g)||(y<=0?0-y:y)<(x<=0?0-x:x))&&Ir(C,ee,C.c.b,C.c):_>1&&Ir(C,Y,C.c.b,C.c),pA(i)));Y=ee}return C}function OCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for(e.n=v(X(e.g,(Ce(),ca)),15).a*v(X(e.g,(tn(),yg)),15).a,e.e=e.n*v(X(e.g,Au),15).a,e.i=e.g.c.c.length,x=e.i-1,O=0,e.j=0,e.k=0,e.a=vy(Ie(z_,qr,24,e.i,0,1)),e.b=vy(Ie(n0,qr,184,e.i,6,1)),y=new V(e.g.c);y.a<y.c.c.length;){for(f=v($(y),16),f.k=x,A=new V(f.a);A.a<A.c.c.length;)N=v($(A),9),N.k=O,++O;--x}for(e.f=Ie(pr,hr,26,O,12,1),e.c=Ux(pr,[qr,hr],[52,26],12,[O,3],2),e.o=new Ve,e.p=new Ve,n=0,e.d=0,g=new V(e.g.c);g.a<g.c.c.length;){for(f=v($(g),16),x=f.k,u=0,ee=0,_=f.a.c.length,C=0,A=new V(f.a);A.a<A.c.c.length;)N=v($(A),9),O=N.k,e.f[O]=N.d.k,C+=N.j.b+e.n,i=Of(Yr(N)),Y=Of(Un(N)),e.c[O][0]=Y-i,e.c[O][1]=i,e.c[O][2]=Y,u+=i,ee+=Y,i>0&&Ke(e.p,N),Ke(e.o,N);n-=u,G=_+n,C+=n*e.e,jl(e.a,x,Tt(G)),jl(e.b,x,C),e.j=mi(e.j,G),e.k=et(e.k,C),e.d+=n,n+=ee}}function Be(){Be=s;var e;Sr=new xb(Kf,0),yt=new xb("NORTH",1),ot=new xb("EAST",2),Et=new xb("SOUTH",3),lt=new xb("WEST",4),vm=(wn(),new Cf((e=v(da($r),11),new xi(e,v(ea(e,e.length),11),0)))),Ad=ms(ln(yt,be(ve($r,1),Je,32,0,[]))),jd=ms(ln(ot,be(ve($r,1),Je,32,0,[]))),Id=ms(ln(Et,be(ve($r,1),Je,32,0,[]))),Ld=ms(ln(lt,be(ve($r,1),Je,32,0,[]))),Ns=ms(ln(yt,be(ve($r,1),Je,32,0,[Et]))),tc=ms(ln(ot,be(ve($r,1),Je,32,0,[lt]))),nh=ms(ln(yt,be(ve($r,1),Je,32,0,[lt]))),ef=ms(ln(yt,be(ve($r,1),Je,32,0,[ot]))),tf=ms(ln(Et,be(ve($r,1),Je,32,0,[lt]))),Xl=ms(ln(ot,be(ve($r,1),Je,32,0,[Et]))),lo=ms(ln(yt,be(ve($r,1),Je,32,0,[ot,lt]))),qa=ms(ln(ot,be(ve($r,1),Je,32,0,[Et,lt]))),fo=ms(ln(yt,be(ve($r,1),Je,32,0,[Et,lt]))),co=ms(ln(yt,be(ve($r,1),Je,32,0,[ot,Et]))),si=ms(ln(yt,be(ve($r,1),Je,32,0,[ot,Et,lt])))}function RCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt;for(ye=new Ve,O=new V(e.c);O.a<O.c.c.length;)for(A=v($(O),16),ee=new V(A.a);ee.a<ee.c.c.length;)if(G=v($(ee),9),G.g==(gt(),Zn)&&X(G,(Ce(),Gm))!=null){for(re=null,ce=null,oe=null,qe=new V(G.f);qe.a<qe.c.c.length;)switch(Ue=v($(qe),7),Ue.g.e){case 4:re=Ue;break;case 2:ce=Ue;break;default:oe=Ue}for(de=v(ct(oe.e,0),12),_=new Ix(de.a),x=new lr(oe.i),On(x,G.i),C=xn(_,0),Db(C,x),Ee=jk(de.a),N=new lr(oe.i),On(N,G.i),Ir(Ee,N,Ee.c.b,Ee.c),Ge=v(X(G,Gm),9),rt=v(ct(Ge.f,0),7),y=v(fr(re.b,Ie(_a,va,12,0,0,1)),47),u=0,g=y.length;u<g;++u)n=y[u],Fn(n,rt),Ak(n.a,n.a.b,_);for(y=v(fr(ce.e,Ie(_a,va,12,ce.e.c.length,0,1)),47),i=0,f=y.length;i<f;++i)n=y[i],er(n,rt),Ak(n.a,0,Ee);er(de,null),Fn(de,null),ye.c[ye.c.length]=G}for(Y=new V(ye);Y.a<Y.c.c.length;)G=v($(Y),9),Wr(G,null)}function DCe(){function e(){this.obj=this.createObject()}return e.prototype.createObject=function(n){return Object.create(null)},e.prototype.get=function(n){return this.obj[n]},e.prototype.set=function(n,i){this.obj[n]=i},e.prototype[D_]=function(n){delete this.obj[n]},e.prototype.keys=function(){return Object.getOwnPropertyNames(this.obj)},e.prototype.entries=function(){var n=this.keys(),i=this,u=0;return{next:function(){if(u>=n.length)return{done:!0};var f=n[u++];return{value:[f,i.get(f)],done:!1}}}},j_e()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(n){return this.obj[":"+n]},e.prototype.set=function(n,i){this.obj[":"+n]=i},e.prototype[D_]=function(n){delete this.obj[":"+n]},e.prototype.keys=function(){var n=[];for(var i in this.obj)i.charCodeAt(0)==58&&n.push(i.substring(1));return n}),e}function Ine(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye;if(N=new gA,_e(N,lL,n),Nn(e.e,n,N),_e(N,(Ce(),cf),i),e.d&&Fee(e.d,N,!1),By(n,N),A_ in n.a&&(re=N.a,oe=v(Qn(n,A_),69),ee=v(Qn(oe,"left"),104),ee&&(re.b=ee.a),de=v(Qn(oe,"top"),104),de&&(re.d=de.a),ce=v(Qn(oe,"right"),104),ce&&(re.c=ce.a),f=v(Qn(oe,gI),104),f&&(re.a=f.a)),A=(u=v(da(C9),11),new xi(u,v(ea(u,u.length),11),0)),_e(N,ui,A),e.g==null&&(e.g=Zt(X(N,(Bj(),yL)))),tg in n.a){if(ye=Qn(n,tg),!ye.hc())throw new Ks("The 'children' property of nodes must be an array.",ye,n);if(C=ye.hc(),C.a.length>0){for(i&&_e(i,uf,N),x=Ie(Rr,oa,9,C.a.length,0,1),G=0;G<C.a.length;++G){if(_=Tc(C,G),!_.kc())throw new Ks("A 'children' array contains a non-object node element.",_,n);g=nCe(e,_.kc(),N),x[G]=g}for(O=0;O<C.a.length;++O)Y=Tc(C,O).kc(),y=x[O],tg in Y.a&&!Yt(Re(Zt(X(y,(Ye(),Iv)))))&&Ine(e,Y,y)}}return N}function BCe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;if(wl(new V(Rc(e.e)))){for(x=new V(Rc(e.e));x.a<x.c.c.length;)switch(y=v($(x),161),C=v(y.e,7).g.e,++e.o[C],v(y.e,7).g.e){case 4:case 2:e.n[C]+=y.e.j.b+(n?(u=v(y.e,7).d,new vs(u.d,u.b,u.a,u.c)).a+(f=v(y.e,7).d,new vs(f.d,f.b,f.a,f.c)).d:0);break;case 1:case 3:e.n[C]+=y.e.j.a+(n?(g=v(y.e,7).d,new vs(g.d,g.b,g.a,g.c)).b+(i=v(y.e,7).d,new vs(i.d,i.b,i.a,i.c)).c:0)}for(_=v(xr(e.e,(Ye(),eE)),100),_=_==(Oc(),th)?su:_,e.g[1]=v(xr(e.e,nE),100),e.g[3]=v(xr(e.e,rE),100),e.g[4]=v(xr(e.e,iE),100),e.g[2]=v(xr(e.e,tE),100),A=(Be(),be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt])),G=0,ee=A.length;G<ee;++G)C=A[G],e.g[C.e]=e.g[C.e]==th?_:e.g[C.e];for(e.b=xr(e.e,Tv)!=null,N=be(ve($r,1),Je,32,0,[Sr,yt,ot,Et,lt]),O=0,Y=N.length;O<Y;++O)C=N[O],e.o[C.e]==1?e.i[C.e]=2:!e.b&&e.g[C.e]==su?e.i[C.e]=e.o[C.e]+1:e.i[C.e]=e.o[C.e]-1}}function GCe(e,n,i,u,f,g){var y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee;if(_=v(e.a,16),ee=v(e.b,16),C=v(n.a,18),re=v(n.b,18),_)for(A=new V(_.a);A.a<A.c.c.length;)for(N=v($(A),9),de=mr(N,(Be(),ot)).mb();de.G();)for(ce=v(de.H(),7),C.ib(ce),x=new V(ce.e);x.a<x.c.c.length;)y=v($(x),12),!Il(y)&&(i.c[i.c.length]=y,fX(y,u),oe=y.c.f.g,(oe==(gt(),nr)||oe==wr)&&(f.c[f.c.length]=y),Ee=y.d,ye=Ee.f.d,ye==ee?re.ib(Ee):ye==_?C.ib(Ee):zr(i,y));if(ee)for(A=new V(ee.a);A.a<A.c.c.length;){for(N=v($(A),9),Y=new V(N.f);Y.a<Y.c.c.length;)for(G=v($(Y),7),x=new V(G.e);x.a<x.c.c.length;)y=v($(x),12),Il(y)&&(O=g.a.db(y,g),O==null);for(de=mr(N,(Be(),lt)).mb();de.G();)for(ce=v(de.H(),7),re.ib(ce),x=new V(ce.e);x.a<x.c.c.length;)y=v($(x),12),!Il(y)&&(i.c[i.c.length]=y,fX(y,u),oe=y.c.f.g,(oe==(gt(),nr)||oe==wr)&&(f.c[f.c.length]=y),Ee=y.d,ye=Ee.f.d,ye==ee?re.ib(Ee):ye==_?C.ib(Ee):zr(i,y))}}function HCe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge;for(de=n.c.length,f=new Fl(e.b,i,null,null),Ge=Ie(Ea,Ui,26,de,12,1),ee=Ie(Ea,Ui,26,de,12,1),Y=Ie(Ea,Ui,26,de,12,1),re=0,x=0;x<de;x++)ee[x]=Or,Y[x]=_u;for(_=0;_<de;_++)for(u=(qn(_,n.c.length),v(n.c[_],81)),Ge[_]=l_(u),Ge[re]>Ge[_]&&(re=_),A=new V(e.b.c);A.a<A.c.c.length;)for(N=v($(A),16),ce=new V(N.a);ce.a<ce.c.c.length;)oe=v($(ce),9),Ue=Re(u.n[oe.k])+Re(u.d[oe.k]),ee[_]=ee[_]<Ue?ee[_]:Ue,Y[_]=et(Y[_],Ue+oe.j.b);for(qe=Ie(Ea,Ui,26,de,12,1),C=0;C<de;C++)(qn(C,n.c.length),v(n.c[C],81)).k==(Bo(),nc)?qe[C]=ee[re]-ee[C]:qe[C]=Y[re]-Y[C];for(g=Ie(Ea,Ui,26,de,12,1),G=new V(e.b.c);G.a<G.c.c.length;)for(O=v($(G),16),Ee=new V(O.a);Ee.a<Ee.c.c.length;){for(ye=v($(Ee),9),y=0;y<de;y++)g[y]=Re((qn(y,n.c.length),v(n.c[y],81)).n[ye.k])+Re((qn(y,n.c.length),v(n.c[y],81)).d[ye.k])+qe[y];z1e(g),f.n[ye.k]=(g[1]+g[2])/2,f.d[ye.k]=0}return f}function w_(e,n,i,u,f,g){var y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee;for(ee=null,i==(Tl(),Tu)?ee=e:i==oh&&(ee=n),oe=(O=new hn(ee.a).a.bb().mb(),new yn(O));oe.a.G();){for(re=(N=v(oe.a.H(),21),v(N.yb(),7)),ce=Mn(be(ve(rn,1),nn,10,0,[re.f.i,re.i,re.a])).b,Ee=new ai,y=new ai,_=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[re.b,re.e]))))));Ft(_);)if(x=v(Ot(_),12),Yt(Re(Zt(X(x,(Ce(),ju)))))==u&&ia(f,x,0)!=-1){if(x.d==re?de=x.c:de=x.d,ye=Mn(be(ve(rn,1),nn,10,0,[de.f.i,de.i,de.a])).b,(ye-ce<=0?0-(ye-ce):ye-ce)<.2)continue;ye<ce?e.a.R(de)?Rn(Ee,new Ar(Tu,x)):Rn(Ee,new Ar(oh,x)):e.a.R(de)?Rn(y,new Ar(Tu,x)):Rn(y,new Ar(oh,x))}if(Ee.a.Y()>1)for(Ke(g,new V7(re,Ee,i)),Y=(A=new hn(Ee.a).a.bb().mb(),new yn(A));Y.a.G();)G=(C=v(Y.a.H(),21),v(C.yb(),27)),zr(f,G.b);if(y.a.Y()>1)for(Ke(g,new V7(re,y,i)),Y=(A=new hn(y.a).a.bb().mb(),new yn(A));Y.a.G();)G=(C=v(Y.a.H(),21),v(C.yb(),27)),zr(f,G.b)}}function zCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe;for(f=0,ce=0,oe=(Wn(),new an),u=new an,g=new an,qe=new an,TCe(e,g,qe),n=null,re=0,Ue=0,de=!0,_=!0,O=0,Y=e.length;O<Y;++O){for(N=e[O],Ee=new V(N.f);Ee.a<Ee.c.c.length;)switch(ye=v($(Ee),7),ye.g.e){case 2:f+=Mte(ye,g);break;case 4:f+=Mte(ye,qe)}if(ee=N.g,_&&(ee==(gt(),nr)||ee==wr)){if(C=v(X(N,(Ce(),sf)),9),!C){_=!1;continue}n!=C&&(n&&Nn(oe,n,new Ar(Tt(re),Tt(Ue))),n=C,re=0,Ue=0,de=!0),N==n&&(de=!1),de?(re+=v(X(N,pg),24).a,Nn(u,N,Tt(re))):(Ue+=v(X(N,pg),24).a,Nn(u,N,Tt(Ue)))}}if(n&&Nn(oe,n,new Ar(Tt(re),Tt(Ue))),_)for(x=null,y=0,i=0,de=!0,A=0,G=e.length;A<G;++A)switch(N=e[A],ee=N.g,ee.e){case 0:y=v(Ti(Mi(u.d,N)),24).a,i=v(v(Ti(Mi(oe.d,N)),27).b,24).a,x=N,de=!1;break;case 3:y=v(Ti(Mi(u.d,N)),24).a,C=v(X(N,(Ce(),sf)),9),C!=x&&(i=v(v(Ti(Mi(oe.d,C)),27).a,24).a,x=C,de=!0);break;default:ce+=de?y:i-y}return f+ce}function FCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;for(A=(Wn(),new an),C=new kb,u=new V(e.a.a.b);u.a<u.c.c.length;)if(n=v($(u),25),Ze(n,93))N=v(n,93).b,Ta(A.d,N,n);else if(Ze(n,82))for(g=(Y=new hn(v(n,82).d.a).a.bb().mb(),new yn(Y));g.a.G();)f=(y=v(g.a.H(),21),v(y.yb(),12)),jt(C,f,n);for(i=new V(e.a.a.b);i.a<i.c.c.length;)if(n=v($(i),25),Ze(n,93)){for(N=v(n,93).b,_=Vt(Un(N));Ft(_);)if(x=v(Ot(_),12),!Il(x)&&(re=x.c,de=x.d,!((Be(),Ns).kb(x.c.g)&&Ns.kb(x.d.g)))){if(oe=v(pn(A,x.d.f),25),yd(Yh(qh(Zh(Vh(new _f,0),100),e.c[n.f.d]),e.c[oe.f.d])),re.g==lt&&QK((Ha(),re))){for(G=v(oo(C,x),18).mb();G.G();)if(O=v(G.H(),25),O.j.d<n.j.d){if(ee=e.c[O.f.d],ce=e.c[n.f.d],ee==ce)continue;yd(Yh(qh(Zh(Vh(new _f,1),100),ee),ce))}}if(de.g==ot&&KK((Ha(),de))){for(G=v(oo(C,x),18).mb();G.G();)if(O=v(G.H(),25),O.j.d>n.j.d){if(ee=e.c[n.f.d],ce=e.c[O.f.d],ee==ce)continue;yd(Yh(qh(Zh(Vh(new _f,1),100),ee),ce))}}}}}function Lne(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;switch(y=new mQ(e),x=Ml(Wo(n,y)),wo(x,new bc),f=e.b,f.c){case 2:_=new pp(f.a),i=jp(Wo(x,_)),Mc(i)?C=v(Hf(i),91).b:C=15,_=new pp($A(f)),i=jp(Wo(x,_)),Mc(i)?g=v(Hf(i),91).b:g=15,_=new pp(f.b),i=jp(Wo(x,_)),Mc(i)?N=v(Hf(i),91).b:N=15,u=Uke(e,C,g,N),Rn(n,new $p(u,e.c,e.e,e.a.c.f,f.a)),Rn(n,new $p(u,e.c,e.e,e.a.c.f,$A(f))),Rn(n,new $p(u,e.c,e.e,e.a.c.f,f.b));break;case 1:_=new pp(f.a),i=jp(Wo(x,_)),Mc(i)?C=v(Hf(i),91).b:C=15,_=new pp(f.b),i=jp(Wo(x,_)),Mc(i)?N=v(Hf(i),91).b:N=15,u=Rke(e,C,N),Rn(n,new $p(u,e.c,e.e,e.a.c.f,f.a)),Rn(n,new $p(u,e.c,e.e,e.a.c.f,f.b));break;case 0:_=new pp(f.a),i=jp(Wo(x,_)),Mc(i)?C=v(Hf(i),91).b:C=15,u=(A=e.b,O=Y_e(e.a.c,e.a.d,C),Na(e.a.a,Vk(O)),G=u7(e.a.b,O.a,A),Y=new Ub((!O.k&&(O.k=new t_(Ck(O))),O.k)),Gj(Y),G?Ij(Y,G):Y),Rn(n,new $p(u,e.c,e.e,e.a.c.f,f.a));break;default:throw new Pn("The loopside must be defined.")}return u}function UCe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee;for(x=new V(e.a.c);x.a<x.c.c.length;)for(g=v($(x),16),de=new V(g.a);de.a<de.c.c.length;)ce=v($(de),9),n.f[ce.k]=ce,n.a[ce.k]=ce,n.d[ce.k]=0;for(_=e.a.c,n.c==(Xo(),uu)&&(_=Ze(_,87)?Op(v(_,87)):Ze(_,88)?v(_,88).a:Ze(_,63)?new gb(_):new _p(_)),y=_.mb();y.G();)for(g=v(y.H(),16),G=-1,O=g.a,n.k==(Bo(),So)&&(G=Or,O=Ze(O,87)?Op(v(O,87)):Ze(O,88)?v(O,88).a:Ze(O,63)?new gb(O):new _p(O)),Ee=O.mb();Ee.G();)if(ye=v(Ee.H(),9),n.c==uu?A=v(ct(e.b.f,ye.k),20):A=v(ct(e.b.b,ye.k),20),A.Y()>0)if(u=A.Y(),C=vr(Math.floor((u+1)/2))-1,f=vr(Math.ceil((u+1)/2))-1,n.k==So)for(N=f;N>=C;N--)n.a[ye.k]==ye&&(ee=v(A.sb(N),27),Y=v(ee.a,9),!vl(i,ee.b)&&G>e.b.e[Y.k]&&(n.a[Y.k]=ye,n.f[ye.k]=n.f[Y.k],n.a[ye.k]=n.f[ye.k],G=e.b.e[Y.k]));else for(N=C;N<=f;N++)n.a[ye.k]==ye&&(oe=v(A.sb(N),27),re=v(oe.a,9),!vl(i,oe.b)&&G<e.b.e[re.k]&&(n.a[re.k]=ye,n.f[ye.k]=n.f[re.k],n.a[ye.k]=n.f[ye.k],G=e.b.e[re.k]))}function Fi(){Fi=s,cu=new Ws("N",0,(Be(),yt),yt,0),Kc=new Ws("EN",1,ot,yt,1),rc=new Ws("E",2,ot,ot,0),ic=new Ws("SE",3,Et,ot,1),js=new Ws("S",4,Et,Et,0),Jc=new Ws("WS",5,lt,Et,1),Wc=new Ws("W",6,lt,lt,0),as=new Ws("NW",7,yt,lt,1),Ms=new Ws("ENW",8,ot,lt,2),Qc=new Ws("ESW",9,ot,lt,2),ac=new Ws("SEN",10,Et,yt,2),of=new Ws("SWN",11,Et,yt,2),ah=new Ws(Kf,12,Sr,Sr,3),uoe=z2e(cu,Kc,rc,ic,js,Jc,be(ve(lg,1),Je,60,0,[Wc,as,Ms,Qc,ac,of])),loe=(eo(),Ul(be(ve(dt,1),tt,1,4,[cu,rc,js,Wc]))),coe=Ul(be(ve(dt,1),tt,1,4,[Kc,ic,Jc,as])),goe=new xc(yt),hoe=Ul(be(ve(dt,1),tt,1,4,[ot,yt])),foe=new xc(ot),yoe=Ul(be(ve(dt,1),tt,1,4,[Et,ot])),voe=new xc(Et),_oe=Ul(be(ve(dt,1),tt,1,4,[lt,Et])),koe=new xc(lt),boe=Ul(be(ve(dt,1),tt,1,4,[yt,lt])),doe=Ul(be(ve(dt,1),tt,1,4,[ot,yt,lt])),poe=Ul(be(ve(dt,1),tt,1,4,[ot,Et,lt])),woe=Ul(be(ve(dt,1),tt,1,4,[Et,lt,yt])),moe=Ul(be(ve(dt,1),tt,1,4,[Et,ot,yt])),xoe=(ad(),ig)}function One(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye;if(ce=0,n.e.a==0)for(re=new V(e);re.a<re.c.c.length;)Y=v($(re),9),ce=et(ce,Y.i.a+Y.j.a+Y.e.c);else ce=n.e.a-n.d.a;for(ce-=n.d.a,ee=new V(e);ee.a<ee.c.c.length;){switch(Y=v($(ee),9),fb(Y.i,ce-Y.j.a),F2e(Y),v(X(Y,(Ye(),zo)),103).e){case 1:_e(Y,zo,(xs(),gm));break;case 2:_e(Y,zo,(xs(),pm))}for(oe=Y.j,ye=new V(Y.f);ye.a<ye.c.c.length;){for(de=v($(ye),7),fb(de.i,oe.a-de.j.a),fb(de.a,de.j.a),en(de,UJ(de.g)),y=v(X(de,ec),24),y&&_e(de,ec,Tt(-y.a)),g=new V(de.e);g.a<g.c.c.length;){for(f=v($(g),12),u=xn(f.a,0);u.b!=u.d.c;)i=v(fn(u),10),i.a=ce-i.a;if(C=v(X(f,dr),44),C)for(_=xn(C,0);_.b!=_.d.c;)x=v(fn(_),10),x.a=ce-x.a;for(O=new V(f.b);O.a<O.c.c.length;)N=v($(O),33),fb(N.i,ce-N.j.a)}for(G=new V(de.c);G.a<G.c.c.length;)N=v($(G),33),fb(N.i,-N.j.a)}for(Y.g==(gt(),Zn)&&(_e(Y,(Ce(),ni),UJ(v(X(Y,ni),32))),Qxe(Y)),A=new V(Y.c);A.a<A.c.c.length;)N=v($(A),33),fb(N.i,oe.a-N.j.a)}}function YCe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye;if(ce=0,n.e.b==0)for(re=new V(e);re.a<re.c.c.length;)Y=v($(re),9),ce=et(ce,Y.i.b+Y.j.b+Y.e.a);else ce=n.e.b-n.d.b;for(ce-=n.d.b,ee=new V(e);ee.a<ee.c.c.length;){switch(Y=v($(ee),9),hb(Y.i,ce-Y.j.b),U2e(Y),v(X(Y,(Ye(),zo)),103).e){case 3:_e(Y,zo,(xs(),hm));break;case 4:_e(Y,zo,(xs(),bm))}for(oe=Y.j,ye=new V(Y.f);ye.a<ye.c.c.length;){for(de=v($(ye),7),hb(de.i,oe.b-de.j.b),hb(de.a,de.j.b),en(de,YJ(de.g)),y=v(X(de,ec),24),y&&_e(de,ec,Tt(-y.a)),g=new V(de.e);g.a<g.c.c.length;){for(f=v($(g),12),u=xn(f.a,0);u.b!=u.d.c;)i=v(fn(u),10),i.b=ce-i.b;if(C=v(X(f,dr),44),C)for(_=xn(C,0);_.b!=_.d.c;)x=v(fn(_),10),x.b=ce-x.b;for(O=new V(f.b);O.a<O.c.c.length;)N=v($(O),33),hb(N.i,ce-N.j.b)}for(G=new V(de.c);G.a<G.c.c.length;)N=v($(G),33),hb(N.i,-N.j.b)}for(Y.g==(gt(),Zn)&&(_e(Y,(Ce(),ni),YJ(v(X(Y,ni),32))),h2e(Y)),A=new V(Y.c);A.a<A.c.c.length;)N=v($(A),33),hb(N.i,oe.b-N.j.b)}}function VCe(e,n,i){var u,f,g,y,x,_,C,N,A,O,G;if(u=new mo(n.e.i.a,n.e.i.b,n.e.j.a,n.e.j.b),f=new hx,e.c)for(y=new V(nv(n));y.a<y.c.c.length;)g=v($(y),129),f.d=g.e.i.a+n.e.i.a,f.e=g.e.i.b+n.e.i.b,f.c=g.e.j.a,f.b=g.e.j.b,iv(u,f);for(N=new V(Rc(n));N.a<N.c.c.length;){if(C=v($(N),161),A=C.e.i.a+n.e.i.a,O=C.e.i.b+n.e.i.b,e.e&&(f.d=A,f.e=O,f.c=C.e.j.a,f.b=C.e.j.b,iv(u,f)),e.d)for(y=new V(rv(C));y.a<y.c.c.length;)g=v($(y),129),f.d=g.e.i.a+A,f.e=g.e.i.b+O,f.c=g.e.j.a,f.b=g.e.j.b,iv(u,f);if(e.b){if(G=new kt(-i,-i),ut(xr(n,(Ye(),Lv)))===ut((fd(),Bv)))for(y=new V(rv(C));y.a<y.c.c.length;)g=v($(y),129),G.a+=g.e.j.a+i,G.b+=g.e.j.b+i;G.a=et(G.a,0),G.b=et(G.b,0),ane(u,m_e(C),y_e(C),n,C,G,i)}}e.b&&ane(u,(wn(),wn(),tl),tl,n,null,null,i),_=new sj((x=v(n.e,9).e,new vs(x.d,x.b,x.a,x.c))),_.d=n.e.i.b-u.e,_.a=u.e+u.b-(n.e.i.b+n.e.j.b),_.b=n.e.i.a-u.d,_.c=u.d+u.c-(n.e.i.a+n.e.j.a),v(n.e,9).e.b=_.b,v(n.e,9).e.d=_.d,v(n.e,9).e.c=_.c,v(n.e,9).e.a=_.a}function Rne(){Rne=s,Gt=new kb,jt(Gt,(Be(),vm),si),jt(Gt,Ld,fo),jt(Gt,Ld,si),jt(Gt,jd,co),jt(Gt,jd,si),jt(Gt,Ad,lo),jt(Gt,Ad,si),jt(Gt,Id,qa),jt(Gt,Id,si),jt(Gt,Ns,tc),jt(Gt,Ns,lo),jt(Gt,Ns,qa),jt(Gt,Ns,si),jt(Gt,tc,Ns),jt(Gt,tc,fo),jt(Gt,tc,co),jt(Gt,tc,si),jt(Gt,nh,nh),jt(Gt,nh,lo),jt(Gt,nh,fo),jt(Gt,ef,ef),jt(Gt,ef,lo),jt(Gt,ef,co),jt(Gt,tf,tf),jt(Gt,tf,qa),jt(Gt,tf,fo),jt(Gt,Xl,Xl),jt(Gt,Xl,qa),jt(Gt,Xl,co),jt(Gt,lo,Ad),jt(Gt,lo,Ns),jt(Gt,lo,nh),jt(Gt,lo,ef),jt(Gt,lo,lo),jt(Gt,lo,fo),jt(Gt,lo,co),jt(Gt,lo,si),jt(Gt,qa,Id),jt(Gt,qa,Ns),jt(Gt,qa,tf),jt(Gt,qa,Xl),jt(Gt,qa,qa),jt(Gt,qa,fo),jt(Gt,qa,co),jt(Gt,qa,si),jt(Gt,fo,Ld),jt(Gt,fo,tc),jt(Gt,fo,nh),jt(Gt,fo,tf),jt(Gt,fo,lo),jt(Gt,fo,qa),jt(Gt,fo,fo),jt(Gt,fo,si),jt(Gt,co,jd),jt(Gt,co,tc),jt(Gt,co,ef),jt(Gt,co,Xl),jt(Gt,co,lo),jt(Gt,co,qa),jt(Gt,co,co),jt(Gt,co,si),jt(Gt,si,vm),jt(Gt,si,Ld),jt(Gt,si,jd),jt(Gt,si,Ad),jt(Gt,si,Id),jt(Gt,si,Ns),jt(Gt,si,tc),jt(Gt,si,lo),jt(Gt,si,qa),jt(Gt,si,fo),jt(Gt,si,co),jt(Gt,si,si)}function Dne(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe;if(i.n[n.k]==null){_=!0,i.n[n.k]=0,y=n,oe=i.k==(Bo(),nc)?ti:Vi;do f=e.b.e[y.k],g=y.d.a.c.length,x=y.g,i.k==nc&&f>0||i.k==So&&f<g-1?(i.k==So?C=v(ct(y.d.a,f+1),9):C=v(ct(y.d.a,f-1),9),A=i.f[C.k],N=C.g,Dne(e,A,i),oe=e.e.Ic(oe,n,y),i.i[n.k]==n&&(i.i[n.k]=i.i[A.k]),i.i[n.k]==i.i[A.k]?(re=Rx(e.d,x,N),i.k==So?(u=Re(i.n[n.k]),G=Re(i.n[A.k])+Re(i.d[C.k])-C.e.d-re-y.e.a-y.j.b-Re(i.d[y.k]),_?(_=!1,i.n[n.k]=G<oe?G:oe):i.n[n.k]=u<(G<oe?G:oe)?u:G<oe?G:oe):(u=Re(i.n[n.k]),G=Re(i.n[A.k])+Re(i.d[C.k])+C.j.b+C.e.a+re+y.e.d-Re(i.d[y.k]),_?(_=!1,i.n[n.k]=G>oe?G:oe):i.n[n.k]=u>(G>oe?G:oe)?u:G>oe?G:oe)):(re=e.d.f,ee=$J(e,i.i[n.k]),O=$J(e,i.i[A.k]),i.k==So?(Y=Re(i.n[n.k])+Re(i.d[y.k])+y.j.b+y.e.a+re-(Re(i.n[A.k])+Re(i.d[C.k])-C.e.d),NW(ee,O,Y)):(Y=Re(i.n[n.k])+Re(i.d[y.k])-y.e.d-Re(i.n[A.k])-Re(i.d[C.k])-C.j.b-C.e.a-re,NW(ee,O,Y)))):oe=e.e.Ic(oe,n,y),y=i.a[y.k];while(y!=n);u0e(e.e,n)}}function qCe(e,n,i,u){var f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;if(O=!1,A=!1,Zs(v(X(u,(Ye(),St)),28))){y=!1,x=!1;e:for(Y=new V(u.f);Y.a<Y.c.c.length;)for(G=v($(Y),7),re=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[new dp(G),new Dh(G)]))))));Ft(re);)if(ee=v(Ot(re),7),!Yt(Re(Zt(X(ee.f,ag))))){if(G.g==(Be(),yt)){y=!0;break e}if(G.g==Et){x=!0;break e}}O=x&&!y,A=y&&!x}if(!O&&!A&&u.c.c.length!=0){for(N=0,C=new V(u.c);C.a<C.c.c.length;)_=v($(C),33),N+=_.i.b+_.j.b/2;N/=u.c.c.length,ce=N>=u.j.b/2}else ce=!A;ce?(oe=v(X(u,(Ce(),bg)),20),oe?O?g=oe:(f=v(X(u,dg),20),f?oe.Y()<=f.Y()?g=oe:g=f:(g=new Ve,_e(u,dg,g))):(g=new Ve,_e(u,bg,g))):(f=v(X(u,(Ce(),dg)),20),f?A?g=f:(oe=v(X(u,bg),20),oe?f.Y()<=oe.Y()?g=f:g=oe:(g=new Ve,_e(u,bg,g))):(g=new Ve,_e(u,dg,g))),g.ib(e),_e(e,(Ce(),Bm),i),n.d==i?(Fn(n,null),i.b.c.length+i.e.c.length==0&&Tn(i,null)):(er(n,null),i.b.c.length+i.e.c.length==0&&Tn(i,null)),vu(n.a)}function ZCe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;for(i=new yee(n),i.a||D_e(n),C=f_e(n),_=new kb,re=new Bte,ee=new V(n.b);ee.a<ee.c.c.length;)for(Y=v($(ee),9),f=Vt(Un(Y));Ft(f);)u=v(Ot(f),12),(u.c.f.g==(gt(),Zn)||u.d.f.g==Zn)&&(N=lCe(e,u,C,re),jt(_,Zk(N.d),N.a));for(y=new Ve,de=v(X(i.c,(Ce(),lh)),18).mb();de.G();){switch(ce=v(de.H(),32),G=re.c[ce.e],O=re.b[ce.e],x=re.a[ce.e],g=null,oe=null,ce.e){case 4:g=new mo(e.d.a,G,C.b.a-e.d.a,O-G),oe=new mo(e.d.a,G,x,O-G),Yu(C,new kt(g.d+g.c,g.e)),Yu(C,new kt(g.d+g.c,g.e+g.b));break;case 2:g=new mo(C.a.a,G,e.c.a-C.a.a,O-G),oe=new mo(e.c.a-x,G,x,O-G),Yu(C,new kt(g.d,g.e)),Yu(C,new kt(g.d,g.e+g.b));break;case 1:g=new mo(G,e.d.b,O-G,C.b.b-e.d.b),oe=new mo(G,e.d.b,O-G,x),Yu(C,new kt(g.d,g.e+g.b)),Yu(C,new kt(g.d+g.c,g.e+g.b));break;case 3:g=new mo(G,C.a.b,O-G,e.c.b-C.a.b),oe=new mo(G,e.c.b-x,O-G,x),Yu(C,new kt(g.d,g.e)),Yu(C,new kt(g.d+g.c,g.e))}g&&(A=new dZ,A.d=ce,A.b=g,A.c=oe,A.a=Lj(v(oo(_,Zk(ce)),18)),y.c[y.c.length]=A)}return $n(i.b,y),i.d=Kwe(QEe(C)),i}function $Ce(){var e=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"];return e[34]='\\"',e[92]="\\\\",e[173]="\\u00ad",e[1536]="\\u0600",e[1537]="\\u0601",e[1538]="\\u0602",e[1539]="\\u0603",e[1757]="\\u06dd",e[1807]="\\u070f",e[6068]="\\u17b4",e[6069]="\\u17b5",e[8203]="\\u200b",e[8204]="\\u200c",e[8205]="\\u200d",e[8206]="\\u200e",e[8207]="\\u200f",e[8232]="\\u2028",e[8233]="\\u2029",e[8234]="\\u202a",e[8235]="\\u202b",e[8236]="\\u202c",e[8237]="\\u202d",e[8238]="\\u202e",e[8288]="\\u2060",e[8289]="\\u2061",e[8290]="\\u2062",e[8291]="\\u2063",e[8292]="\\u2064",e[8298]="\\u206a",e[8299]="\\u206b",e[8300]="\\u206c",e[8301]="\\u206d",e[8302]="\\u206e",e[8303]="\\u206f",e[65279]="\\ufeff",e[65529]="\\ufff9",e[65530]="\\ufffa",e[65531]="\\ufffb",e}function KCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue;for(n=0,oe=!0,Ue=null,u=0;u<e.length;u++)if(g=e[u],re=g.g,re==(gt(),nr))Ue=g,oe=!1;else if(re==wr){if(Ze(X(g,(Ce(),Ct)),12)||(i=v(X(g,Ct),9),Ue!=i&&(Ue=i,oe=!0),!Gi(v(X(i,(Ye(),St)),28))))continue;for(O=null,Y=null,de=new V(g.f);de.a<de.c.c.length;)ce=v($(de),7),ce.b.c.length==0?ce.e.c.length==0||(Y=v(X(ce,Ct),7)):O=v(X(ce,Ct),7);for(f=u+1;f<e.length&&(y=e[f],A=y.g,A!=nr);f++)if(A==wr){if(ut(X(y,Ct))!==ut(i))break;for(x=null,C=null,Ee=new V(y.f);Ee.a<Ee.c.c.length;)ye=v($(Ee),7),ye.b.c.length==0?ye.e.c.length==0||(C=v(X(ye,Ct),7)):x=v(X(ye,Ct),7);oe?(G=!1,ee=!1,Y&&x&&Y.k<x.k&&(++n,ee=!0),O&&C&&O.k>C.k&&(++n,G=!0),Y&&C&&Y.k>C.k&&(++n,ee=!0),O&&x&&O.k<x.k&&(++n,G=!0),G&&ee&&O==Y&&--n):(_=!1,N=!1,O&&C&&O.k<C.k&&(++n,N=!0),Y&&x&&Y.k>x.k&&(++n,_=!0),O&&x&&O.k<x.k&&(++n,_=!0),Y&&C&&Y.k>C.k&&(++n,N=!0),_&&N&&x==C&&--n)}}return n}function QCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht;for(de=e.a,ye=0,Ee=de.length;ye<Ee;++ye){for(ce=de[ye],C=Or,N=Or,Y=new V(ce.f);Y.a<Y.c.c.length;)O=v($(Y),9),y=O.d?ia(O.d.a,O,0):-1,y>0?(A=v(ct(O.d.a,y-1),9),Ge=Ob(e.b,O,A),re=O.i.b-O.e.d-(A.i.b+A.j.b+A.e.a+Ge)):re=O.i.b-O.e.d,C=re<C?re:C,y<O.d.a.c.length-1?(A=v(ct(O.d.a,y+1),9),Ge=Ob(e.b,O,A),oe=A.i.b-A.e.d-(O.i.b+O.j.b+O.e.a+Ge)):oe=2*O.i.b,N=oe<N?oe:N;for(_=Or,g=!1,f=v(ct(ce.f,0),9),ht=new V(f.f);ht.a<ht.c.c.length;)for(rt=v($(ht),7),ee=f.i.b+rt.i.b+rt.a.b,u=new V(rt.b);u.a<u.c.c.length;)i=v($(u),12),Ue=i.c,n=Ue.f.i.b+Ue.i.b+Ue.a.b-ee,(n<=0?0-n:n)<(_<=0?0-_:_)&&(n<=0?0-n:n)<(n<0?C:N)&&(_=n,g=!0);for(x=v(ct(ce.f,ce.f.c.length-1),9),qe=new V(x.f);qe.a<qe.c.c.length;)for(Ue=v($(qe),7),ee=x.i.b+Ue.i.b+Ue.a.b,u=new V(Ue.e);u.a<u.c.c.length;)i=v($(u),12),rt=i.d,n=rt.f.i.b+rt.i.b+rt.a.b-ee,(n<=0?0-n:n)<(_<=0?0-_:_)&&(n<=0?0-n:n)<(n<0?C:N)&&(_=n,g=!0);if(g&&_!=0)for(G=new V(ce.f);G.a<G.c.c.length;)O=v($(G),9),O.i.b+=_}}function WCe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht;return A=q_e(Qr(e,(Be(),vm)),n),Y=Ol(Qr(e,Ad),n),ye=Ol(Qr(e,Id),n),Ge=Ly(Qr(e,Ld),n),O=Ly(Qr(e,jd),n),ce=Ol(Qr(e,nh),n),ee=Ol(Qr(e,ef),n),Ue=Ol(Qr(e,tf),n),Ee=Ol(Qr(e,Xl),n),rt=Ly(Qr(e,tc),n),oe=Ol(Qr(e,Ns),n),de=Ol(Qr(e,lo),n),qe=Ol(Qr(e,qa),n),ht=Ly(Qr(e,fo),n),G=Ly(Qr(e,co),n),re=Ol(Qr(e,si),n),i=ld(be(ve(Ea,1),Ui,26,12,[ce.a,Ge.a,Ue.a,ht.a])),u=ld(be(ve(Ea,1),Ui,26,12,[Y.a,A.a,ye.a,re.a])),f=oe.a,g=ld(be(ve(Ea,1),Ui,26,12,[ee.a,O.a,Ee.a,G.a])),C=ld(be(ve(Ea,1),Ui,26,12,[ce.b,Y.b,ee.b,de.b])),_=ld(be(ve(Ea,1),Ui,26,12,[Ge.b,A.b,O.b,re.b])),N=rt.b,x=ld(be(ve(Ea,1),Ui,26,12,[Ue.b,ye.b,Ee.b,qe.b])),Js(Qr(e,vm),i+f,C+N),Js(Qr(e,si),i+f,C+N),Js(Qr(e,Ad),i+f,0),Js(Qr(e,Id),i+f,C+N+_),Js(Qr(e,Ld),0,C+N),Js(Qr(e,jd),i+f+u,C+N),Js(Qr(e,ef),i+f+u,0),Js(Qr(e,tf),0,C+N+_),Js(Qr(e,Xl),i+f+u,C+N+_),Js(Qr(e,tc),0,C),Js(Qr(e,Ns),i,0),Js(Qr(e,qa),0,C+N+_),Js(Qr(e,co),i+f+u,0),y=new oi,y.a=ld(be(ve(Ea,1),Ui,26,12,[i+u+f+g,rt.a,de.a,qe.a])),y.b=ld(be(ve(Ea,1),Ui,26,12,[C+_+N+x,oe.b,ht.b,G.b])),y}function JCe(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;if(u=new Xi,C=null,Y=e.c,G=Y.f.g,G!=(gt(),nr)&&G!=wr)throw new Pn("The target node of the edge must be a normal node or a northSouthPort.");for(G==wr&&(O=v(X(Y,(Ce(),Ct)),7),C=new kt(Mn(be(ve(rn,1),nn,10,0,[O.f.i,O.i,O.a])).a,Mn(be(ve(rn,1),nn,10,0,[Y.f.i,Y.i,Y.a])).b),Y=O),tx(u,Mn(be(ve(rn,1),nn,10,0,[Y.f.i,Y.i,Y.a]))),y=et(5,WX(Y.f,Y.g)),A=new Sl(Yp(Y.g)),A.a*=y,A.b*=y,_n(u,On(A,Mn(be(ve(rn,1),nn,10,0,[Y.f.i,Y.i,Y.a])))),C&&Ir(u,C,u.c.b,u.c),g=e,_=e,x=null,i=!1;g;)f=g.a,f.b!=0&&(i?(_n(u,gs(On(x,(_t(f.b!=0),v(f.a.a.c,10))),.5)),i=!1):i=!0,x=vo((_t(f.b!=0),v(f.c.b.c,10))),Na(u,f),vu(f)),_=g,g=v(Ti(Mi(n.d,g)),12);ee=_.d,ee.f.g==wr&&(O=v(X(ee,(Ce(),Ct)),7),_n(u,new kt(Mn(be(ve(rn,1),nn,10,0,[O.f.i,O.i,O.a])).a,Mn(be(ve(rn,1),nn,10,0,[ee.f.i,ee.i,ee.a])).b)),ee=O),y=et(5,WX(ee.f,ee.g)),A=new Sl(Yp(ee.g)),gs(A,y),_n(u,On(A,Mn(be(ve(rn,1),nn,10,0,[ee.f.i,ee.i,ee.a])))),tx(u,Mn(be(ve(rn,1),nn,10,0,[ee.f.i,ee.i,ee.a]))),N=new B7(u),Na(e.a,Vk(N))}function XCe(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y;if(ut(X(e.c,(Ye(),St)))===ut((tr(),Ps))||ut(X(e.c,St))===ut(ki)){for(N=new V(e.c.f);N.a<N.c.c.length;)if(C=v($(N),7),C.g==(Be(),yt)||C.g==Et)return!1}for(u=Vt(Un(e.c));Ft(u);)if(i=v(Ot(u),12),i.c.f==i.d.f)return!1;if(Zs(v(X(e.c,St),28))){for(G=new Ve,_=mr(e.c,(Be(),lt)).mb();_.G();)y=v(_.H(),7),Ke(G,Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[y.b,y.e]))))));for(Y=(Nt(G),new Wh(G)),G=new Ve,x=mr(e.c,ot).mb();x.G();)y=v(x.H(),7),Ke(G,Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[y.b,y.e]))))));n=(Nt(G),new Wh(G))}else Y=Yr(e.c),n=Un(e.c);return g=!Hb(Un(e.c)),f=!Hb(Yr(e.c)),!g&&!f?!1:g?f?gk((ar(),new hs(ds($s(Y.a,new w)))))==1&&(A=(Nt(Y),v(QA(new hs(ds($s(Y.a,new w)))),12)).c.f,A.g==(gt(),An)&&v(X(A,(Ce(),ua)),7).f!=e.c)?(e.e=2,!0):gk(new hs(ds($s(n.a,new w))))==1&&(O=(Nt(n),v(QA(new hs(ds($s(n.a,new w)))),12)).d.f,O.g==(gt(),An)&&v(X(O,(Ce(),Zi)),7).f!=e.c)?(e.e=3,!0):!1:(e.e=0,!0):(e.e=1,!0)}function e3e(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe;if(u=new Ve,f=Or,g=Or,y=Or,i)for(f=e.e.a,ee=new V(n.f);ee.a<ee.c.c.length;)for(Y=v($(ee),7),_=new V(Y.e);_.a<_.c.c.length;)x=v($(_),12),x.a.b!=0&&(N=v(Tx(x.a),10),N.a<f&&(g=f-N.a,y=Or,u.c=Ie(dt,tt,1,0,4,1),f=N.a),N.a<=f&&(u.c[u.c.length]=x,x.a.b>1&&(y=mn(y,wi(v(Up(x.a,1),10).b-N.b)))));else for(ee=new V(n.f);ee.a<ee.c.c.length;)for(Y=v($(ee),7),_=new V(Y.b);_.a<_.c.c.length;)x=v($(_),12),x.a.b!=0&&(O=v(B1(x.a),10),O.a>f&&(g=O.a-f,y=Or,u.c=Ie(dt,tt,1,0,4,1),f=O.a),O.a>=f&&(u.c[u.c.length]=x,x.a.b>1&&(y=mn(y,wi(v(Up(x.a,x.a.b-2),10).b-O.b)))));if(u.c.length!=0&&g>n.j.a/2&&y>n.j.b/2){for(G=new ur,Tn(G,n),en(G,(Be(),yt)),G.i.a=n.j.a/2,oe=new ur,Tn(oe,n),en(oe,Et),oe.i.a=n.j.a/2,oe.i.b=n.j.b,_=new V(u);_.a<_.c.c.length;)x=v($(_),12),i?(C=v(dj(x.a),10),re=x.a.b==0?ra(x.d):v(Tx(x.a),10),re.b>=C.b?er(x,oe):er(x,G)):(C=v(j1e(x.a),10),re=x.a.b==0?ra(x.c):v(B1(x.a),10),re.b>=C.b?Fn(x,oe):Fn(x,G)),A=v(X(x,(Ye(),dr)),44),A&&Jb(A,C,!0);n.i.a=f-n.j.a/2}}function t3e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;for(oe=new Ve,ce=new Ve,de=new Ve,g=new V(n);g.a<g.c.c.length;)f=v($(g),75),f.k>50?oe.c[oe.c.length]=f:f.k>0?ce.c[ce.c.length]=f:de.c[de.c.length]=f;if(ce.c.length==1&&oe.c.length==0&&($n(oe,ce),ce.c=Ie(dt,tt,1,0,4,1)),oe.c.length!=0&&bs(xx(e.a),(Fi(),cu))&&bs(xx(e.a),(Fi(),js))?w2e(e,oe):$n(ce,oe),ce.c.length==0||x2e(e,ce),de.c.length!=0){if(i=kx(e.a),i.c!=0)for(N=new V(de),_=(Nt(i),ej(new uK(i).a));N.a<N.c.c.length;){for(f=v($(N),75);N.a<N.c.c.length&&f.a.a.Y()<2;)f=v($(N),75);f.a.a.Y()>1&&(ee=v(dA(_),60),qp(f,ee,!0),Ip(N),dW(e.a,ee))}for(O=de.c.length,u=I_e(e),G=new Ve,y=O/z6(e.a).c|0,x=0;x<y;x++)$n(G,z6(e.a));switch(Y=O%z6(e.a).c,Y>3&&($n(G,(Fi(),Fi(),coe)),Y-=4),Y){case 3:Ke(G,lv(u));case 2:re=qy(lv(u));do re=qy(re);while(!bs(xx(e.a),re));G.c[G.c.length]=re,re=S7(lv(u));do re=S7(re);while(!bs(xx(e.a),re));G.c[G.c.length]=re;break;case 1:Ke(G,lv(u))}for(A=new V(G),C=new V(de);A.a<A.c.c.length&&C.a<C.c.c.length;)qp(v($(C),75),v($(A),60),!0)}}function n3e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue;for(N=n.c.c.length,e.a=Ie(Rr,qr,51,N,0,2),e.b=Ie(Rr,qr,51,N,0,2),e.k=Ie(Rr,qr,51,N,0,2),_=Ie(pr,hr,26,N,12,1),y=Ie(r0,_v,26,N,13,1),e.c=Ie(r0,_v,26,N,13,1),e.d=Ie(r0,_v,26,N,13,1),oe=0,Ee=0,O=new jn(n.c,0);O.b<O.d.Y();)for(C=(_t(O.b<O.d.Y()),v(O.d.sb(O.c=O.b++),16)),A=O.b-1,G=C.a.c.length,e.a[A]=Ie(Rr,oa,9,G,0,1),e.k[A]=Ie(Rr,oa,9,G,0,1),e.b[A]=Ie(Rr,oa,9,G,0,1),_[A]=0,y[A]=!1,ce=new jn(C.a,0);ce.b<ce.d.Y();){for(re=(_t(ce.b<ce.d.Y()),v(ce.d.sb(ce.c=ce.b++),9)),e.b[A][ce.b-1]=re,re.k=oe++,Y=v(X(re,(Ce(),sf)),9),Y&&b_(e.g,Y,re,null),ye=new V(re.f);ye.a<ye.c.c.length;){for(de=v($(ye),7),de.k=Ee++,g=new V(de.e);g.a<g.c.c.length;)f=v($(g),12),f.d.f.d==C&&++_[A];de.g==(Be(),ot)?de.e.c.length+de.b.c.length>1&&(e.c[A]=!0):de.g==lt&&de.e.c.length+de.b.c.length>1&&(e.d[A]=!0)}re.g==(gt(),wr)&&(++_[A],y[A]=!0)}for(i=!0,ee=!0,x=0;x<e.d.length-1;x++)u=e.c[x]||e.d[x+1],i=i&u,ee=ee&!u;e.j=Ie(Zm,rm,26,Ee,12,1),Ue=Ie(pr,hr,26,Ee,12,1),i||(e.i=new PQ(_,y,Ue),e.f=e.i),ee||(e.e=new SQ(_,y,Ue),e.f=e.e)}function Bne(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge;for(e.d=new kt(Vi,Vi),e.c=new kt(ti,ti),O=n.mb();O.G();)for(N=v(O.H(),55),de=new V(N.b);de.a<de.c.c.length;)ce=v($(de),9),e.d.a=mn(e.d.a,ce.i.a-ce.e.b),e.d.b=mn(e.d.b,ce.i.b-ce.e.d),e.c.a=et(e.c.a,ce.i.a+ce.j.a+ce.e.c),e.c.b=et(e.c.b,ce.i.b+ce.j.b+ce.e.a);for(x=new oZ,A=n.mb();A.G();)N=v(A.H(),55),u=ZCe(e,N),Ke(x.a,u),u.a=u.a|!v(X(u.c,(Ce(),lh)),18).V();for(e.b=(Mk(),Ge=new Q,Ge.f=new iX(i),Ge.b=XEe(Ge.f,x),Ge),KEe((Y=e.b,new U1,Y)),e.e=new oi,e.a=e.b.f.e,y=new V(x.a);y.a<y.c.c.length;)for(f=v($(y),347),ye=vye(e.b,f),L_e(f.c,ye.a,ye.b),re=new V(f.c.b);re.a<re.c.c.length;)ee=v($(re),9),ee.g==(gt(),Zn)&&(oe=g7(e,ee.i,v(X(ee,(Ce(),ni)),32)),On(bu(ee.i),oe));for(g=new V(x.a);g.a<g.c.c.length;)for(f=v($(g),347),C=new V(g2e(f));C.a<C.c.c.length;)for(_=v($(C),12),qe=new Ix(_.a),G1(qe,0,ra(_.c)),_n(qe,ra(_.d)),G=null,Ue=xn(qe,0);Ue.b!=Ue.d.c;){if(Ee=v(fn(Ue),10),!G){G=Ee;continue}wJ(G.a,Ee.a)?(e.e.a=mn(e.e.a,G.a),e.a.a=et(e.a.a,G.a)):wJ(G.b,Ee.b)&&(e.e.b=mn(e.e.b,G.b),e.a.b=et(e.a.b,G.b)),G=Ee}Nx(e.e),On(e.a,e.e)}function Gne(e,n,i,u,f){var g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt;for(ee=new aa(n.b),ye=new aa(n.b),O=new aa(n.b),Ge=new aa(n.b),re=new aa(n.b),qe=xn(n,0);qe.b!=qe.d.c;)for(Ee=v(fn(qe),7),x=new V(Ee.e);x.a<x.c.c.length;)if(g=v($(x),12),g.c.f==g.d.f){if(Ee.g==g.d.g){Ge.c[Ge.c.length]=g;continue}else if(Ee.g==(Be(),yt)&&g.d.g==Et){re.c[re.c.length]=g;continue}}for(_=new V(re);_.a<_.c.c.length;)g=v($(_),12),Z_e(e,g,i,u,(Be(),ot));for(y=new V(Ge);y.a<y.c.c.length;)g=v($(y),12),rt=new ko(e),bo(rt,(gt(),wr)),_e(rt,(Ye(),St),(tr(),ki)),_e(rt,(Ce(),Ct),g),ht=new ur,_e(ht,Ct,g.d),en(ht,(Be(),lt)),Tn(ht,rt),pt=new ur,_e(pt,Ct,g.c),en(pt,ot),Tn(pt,rt),_e(g.c,lu,rt),_e(g.d,lu,rt),er(g,null),Fn(g,null),i.c[i.c.length]=rt,_e(rt,pg,Tt(2));for(Ue=xn(n,0);Ue.b!=Ue.d.c;)Ee=v(fn(Ue),7),C=Ee.b.c.length>0,oe=Ee.e.c.length>0,C&&oe?O.c[O.c.length]=Ee:C?ee.c[ee.c.length]=Ee:oe&&(ye.c[ye.c.length]=Ee);for(Y=new V(ee);Y.a<Y.c.c.length;)G=v($(Y),7),Ke(f,U7(e,G,null,i));for(de=new V(ye);de.a<de.c.c.length;)ce=v($(de),7),Ke(f,U7(e,null,ce,i));for(A=new V(O);A.a<A.c.c.length;)N=v($(A),7),Ke(f,U7(e,N,N,i))}function Hne(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe;for(ye=new lr(n.d),_=new Ve,de=new V(n.b);de.a<de.c.c.length;)if(oe=v($(de),9),G=v(pn(e.j,oe),69),G){for(Zy(e,oe,G,ye),Ue=new V(oe.f);Ue.a<Ue.c.c.length;)if(Ee=v($(Ue),7),Y=v(pn(e.n,Ee),69),Y&&(Zy(e,Ee,Y,gE),h0e(Y,(Ye(),Ov),new Cl(v1e(Ee.g)))),ut(X(oe,(Ye(),Lv)))!==ut((fd(),oE)))for(re=new V(Ee.c);re.a<re.c.c.length;)ee=v($(re),33),O=v(pn(e.f,ee),69),Zy(e,ee,O,gE);if(v(X(oe,(Ye(),Ma)),86).Y()!=0)for(re=new V(oe.c);re.a<re.c.c.length;)ee=v($(re),33),O=v(pn(e.f,ee),69),Zy(e,ee,O,gE);for(x=Vt(Un(oe));Ft(x);)g=v(Ot(x),12),dd(g.d.f,oe)||(_.c[_.c.length]=g)}if(qe=v(X(n,(Ce(),cf)),9),qe)for(x=Vt(Un(qe));Ft(x);)g=v(Ot(x),12),dd(g.d.f,qe)&&(_.c[_.c.length]=g);for(y=new V(_);y.a<y.c.c.length;)for(g=v($(y),12),A=v(pn(e.b,g),69),_Ce(e,g,A,ye),re=new V(g.b);re.a<re.c.c.length;)ee=v($(re),33),O=v(pn(e.f,ee),69),Zy(e,ee,O,ye);for(i=(u=v(X(n,Is),15).a,new kt(n.e.a+n.a.b+n.a.c+2*u,n.e.b+n.a.d+n.a.a+2*u)),N=v(X(n,cf),9),N&&(N.j.a=i.a,N.j.b=i.b),C=v(X(n,lL),69),xo(e,C,M_,i.a),xo(e,C,j_,i.b),ce=new V(n.b);ce.a<ce.c.c.length;)oe=v($(ce),9),f=v(X(oe,uf),55),f&&Hne(e,f)}function r3e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt;for(pt=new fi,Ge=new fi,oe=-1,_=new V(e);_.a<_.c.c.length;){for(y=v($(_),77),y.i=oe--,A=0,Ee=0,g=new V(y.j);g.a<g.c.c.length;)u=v($(g),117),Ee+=u.c;for(f=new V(y.d);f.a<f.c.c.length;)u=v($(f),117),A+=u.c;y.e=A,y.k=Ee,Ee==0?Ir(Ge,y,Ge.c.b,Ge.c):A==0&&Ir(pt,y,pt.c.b,pt.c)}for(Pt=new Yx((ps(),e)),O=e.c.length,re=O+1,ce=O-1,Y=new Ve;Pt.a.Y()!=0;){for(;Ge.b!=0;)qe=(_t(Ge.b!=0),v(yu(Ge,Ge.a.a),77)),Pt.a.eb(qe)!=null,qe.i=ce--,P7(qe,pt,Ge);for(;pt.b!=0;)rt=(_t(pt.b!=0),v(yu(pt,pt.a.a),77)),Pt.a.eb(rt)!=null,rt.i=re++,P7(rt,pt,Ge);for(ee=_u,C=(de=new hn(Pt.a).a.bb().mb(),new yn(de));C.a.G();)y=(N=v(C.a.H(),21),v(N.yb(),77)),ye=y.k-y.e,ye>=ee&&(ye>ee&&(Y.c=Ie(dt,tt,1,0,4,1),ee=ye),Y.c[Y.c.length]=y);Y.c.length!=0&&(G=v(ct(Y,KA(n,Y.c.length)),77),Pt.a.eb(G)!=null,G.i=re++,P7(G,pt,Ge),Y.c=Ie(dt,tt,1,0,4,1))}for(Ue=e.c.length+1,x=new V(e);x.a<x.c.c.length;)y=v($(x),77),y.i<O&&(y.i+=Ue);for(ht=new V(e);ht.a<ht.c.c.length;)for(rt=v($(ht),77),i=new jn(rt.j,0);i.b<i.d.Y();)u=(_t(i.b<i.d.Y()),v(i.d.sb(i.c=i.b++),117)),mt=u.b,rt.i>mt.i&&(Jo(i),zr(mt.d,u),u.c>0&&(u.a=mt,Ke(mt.j,u),u.b=rt,Ke(rt.d,u)))}function i3e(e){var n,i,u;for(u=new ey(new h1(e.c).a);R1(u.a);)switch(i=(u.b=Al(u.a),new T1(u.c,u.b)),n=v(i.b.b[i.a.e],62),v(i.a,67).e){case 0:n.d=0,n.e=-(n.b+e.d);break;case 1:n.d=(e.e.e.j.a-n.c)/2,n.e=-(n.b+e.d);break;case 2:n.d=e.e.e.j.a-n.c,n.e=-(n.b+e.d);break;case 3:n.d=0,n.e=e.e.e.j.b+e.d;break;case 4:n.d=(e.e.e.j.a-n.c)/2,n.e=e.e.e.j.b+e.d;break;case 5:n.d=e.e.e.j.a-n.c,n.e=e.e.e.j.b+e.d;break;case 6:n.d=-(n.c+e.d),n.e=0;break;case 7:n.d=-(n.c+e.d),n.e=(e.e.e.j.b-n.b)/2;break;case 8:n.d=-(n.c+e.d),n.e=e.e.e.j.b-n.b;break;case 9:n.d=e.e.e.j.a+e.d,n.e=0;break;case 10:n.d=e.e.e.j.a+e.d,n.e=(e.e.e.j.b-n.b)/2;break;case 11:n.d=e.e.e.j.a+e.d,n.e=e.e.e.j.b-n.b;break;case 12:n.d=e.q.b+e.d,n.e=e.q.d+e.d;break;case 13:n.d=(e.e.e.j.a-n.c)/2,n.e=e.q.d+e.d;break;case 14:n.d=e.e.e.j.a-e.q.c-n.c-e.d,n.e=e.q.d+e.d;break;case 15:n.d=e.q.b+e.d,n.e=(e.e.e.j.b-n.b)/2;break;case 16:n.d=(e.e.e.j.a-n.c)/2,n.e=(e.e.e.j.b-n.b)/2;break;case 17:n.d=e.e.e.j.a-e.q.c-n.c-e.d,n.e=(e.e.e.j.b-n.b)/2;break;case 18:n.d=e.q.b+e.d,n.e=e.e.e.j.b-e.q.a-n.b-e.d;break;case 19:n.d=(e.e.e.j.a-n.c)/2,n.e=e.e.e.j.b-e.q.a-n.b-e.d;break;case 20:n.d=e.e.e.j.a-e.q.c-n.c-e.d,n.e=e.e.e.j.b-e.q.a-n.b-e.d}}function a3e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on;for(pt=new fi,Ge=new fi,Y=-1,ce=new V(e);ce.a<ce.c.c.length;){for(re=v($(ce),80),re.d=Y--,_=0,Ee=0,g=new V(re.e);g.a<g.c.c.length;)u=v($(g),118),Ee+=u.c;for(f=new V(re.b);f.a<f.c.c.length;)u=v($(f),118),_+=u.c;re.c=_,re.f=Ee,Ee==0?Ir(Ge,re,Ge.c.b,Ge.c):_==0&&Ir(pt,re,pt.c.b,pt.c)}for(Pt=(on=new b6,PA(on,e),on),C=e.c.length,ee=C-1,G=C+1,A=new Ve;Pt.a.c!=0;){for(;Ge.b!=0;)qe=(_t(Ge.b!=0),v(yu(Ge,Ge.a.a),80)),Bb(Pt.a,qe)!=null,qe.d=ee--,C7(qe,pt,Ge);for(;pt.b!=0;)rt=(_t(pt.b!=0),v(yu(pt,pt.a.a),80)),Bb(Pt.a,rt)!=null,rt.d=G++,C7(rt,pt,Ge);for(O=_u,de=(x=new Lb(new Ab(new l1(Pt.a).a).b),new f1(x));ux(de.a.a);)re=(y=Ax(de.a),v(y.yb(),80)),ye=re.f-re.c,ye>=O&&(ye>O&&(A.c=Ie(dt,tt,1,0,4,1),O=ye),A.c[A.c.length]=re);A.c.length!=0&&(N=v(ct(A,KA(n,A.c.length)),80),Bb(Pt.a,N)!=null,N.d=G++,C7(N,pt,Ge),A.c=Ie(dt,tt,1,0,4,1))}for(Ue=e.c.length+1,oe=new V(e);oe.a<oe.c.c.length;)re=v($(oe),80),re.d<C&&(re.d+=Ue);for(ht=new V(e);ht.a<ht.c.c.length;)for(rt=v($(ht),80),i=new jn(rt.e,0);i.b<i.d.Y();)u=(_t(i.b<i.d.Y()),v(i.d.sb(i.c=i.b++),118)),mt=u.b,rt.d>mt.d&&(Jo(i),zr(mt.b,u),u.c>0&&(u.a=mt,Ke(mt.e,u),u.b=rt,Ke(rt.b,u)))}function o3e(e){switch(e.e){case 14:return new ke;case 37:return new Qe;case 8:return new LZ;case 30:return new OZ;case 38:return new ft;case 3:return new ze;case 47:case 1:return new O2((Py(),CL));case 4:return new $e;case 49:return new xt;case 23:return new Wa;case 13:return new st;case 34:return new It;case 40:return new Dt;case 35:return new sn;case 44:return new vK;case 28:return new ir;case 39:return new U;case 27:return new ne;case 6:return new ue;case 31:return new Pe;case 9:return new rq;case 43:return new We;case 17:return new Xe;case 18:return new Kt;case 29:return new iq;case 11:return new ii;case 12:return new Xt;case 36:return new Yn;case 46:case 0:return new O2((Py(),EL));case 41:return new Qt;case 15:return new Hn;case 33:return new gr;case 42:return new La;case 22:return new Pi;case 19:return new ie;case 10:return new Gn;case 7:return new yi;case 24:return new Oa;case 21:return new pu;case 16:return new Io;case 45:return new je;case 26:return new bt;case 20:return new Bt;case 25:return new un;case 5:return new Ni;case 32:return new Lo;case 48:case 2:return new O2((Py(),_L));default:throw new Pn("No implementation is available for the layout processor "+(e.d!=null?e.d:""+e.e))}}function s3e(e){var n,i,u,f,g,y,x;if(i=e.e.e.j,e.b?n=v(xr(e.e,(Ye(),Tv)),65):n=new vs(e.k,e.k,e.k,e.k),f=i.a,(e.b||e.g[1]!=(Oc(),su))&&(f-=n.b+n.c),g=i.a,(e.b||e.g[3]!=(Oc(),su))&&(g-=n.b+n.c),y=i.b,(e.b||e.g[4]!=(Oc(),su))&&(y-=n.d+n.a),u=i.b,(e.b||e.g[2]!=(Oc(),su))&&(u-=n.d+n.a),zh(e,(Be(),yt))==(Oc(),su))e.j[1]=(f-Fh(e,yt))/V2(e,yt),e.f=e.b?n.b+(Uh(e,yt)==1?e.j[1]:0):e.j[1];else switch(e.j[1]=e.k,x=Fh(e,yt)+e.j[1]*(Uh(e,yt)-1),zh(e,yt).e){case 2:e.f=n.b;break;case 3:e.f=n.b+(f-x)/2;break;case 4:e.f=i.a-x-n.c}if(zh(e,Et)==su)e.j[3]=(g-Fh(e,Et))/V2(e,Et),e.r=i.a-(e.b?n.c+(Uh(e,Et)==1?e.j[3]:0):e.j[3]);else switch(e.j[3]=e.k,x=Fh(e,Et)+e.j[3]*(Uh(e,Et)-1),zh(e,Et).e){case 2:e.r=x+n.b;break;case 3:e.r=i.a-(g-x)/2-n.c;break;case 4:e.r=i.a-n.c}if(zh(e,lt)==su)e.j[4]=(y-Fh(e,lt))/V2(e,lt),e.s=i.b-(e.b?n.a+(Uh(e,lt)==1?e.j[4]:0):e.j[4]);else switch(e.j[4]=e.k,x=Fh(e,lt)+e.j[4]*(Uh(e,lt)-1),zh(e,lt).e){case 2:e.s=x+n.d;break;case 3:e.s=i.b-(y-x)/2-n.a;break;case 4:e.s=i.b-n.a}if(zh(e,ot)==su)e.j[2]=(u-Fh(e,ot))/V2(e,ot),e.a=e.b?n.d+(Uh(e,ot)==1?e.j[2]:0):e.j[2];else switch(e.j[2]=e.k,x=Fh(e,ot)+e.j[2]*(Uh(e,ot)-1),zh(e,ot).e){case 2:e.a=n.d;break;case 3:e.a=n.d+(u-x)/2;break;case 4:e.a=i.b-x-n.a}}function zne(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on;for(mt=0,y=0,A=n[0].d,Ge=i[0].d,Y=0,re=i.length;Y<re;++Y)if(O=i[Y],Gi(v(X(O,(Ye(),St)),28))){for(ce=0,Ee=new V(O.f);Ee.a<Ee.c.c.length&&(ye=v($(Ee),7),ye.g==(Be(),yt));)for(g=new V(ye.b);g.a<g.c.c.length;)if(f=v($(g),12),f.c.f.d==A){++ce;break}for(de=0,qe=new jn(O.f,O.f.c.length);qe.b>0;){for(ye=(_t(qe.b>0),v(qe.a.sb(qe.c=--qe.b),7)),Ue=0,g=new V(ye.b);g.a<g.c.c.length;)f=v($(g),12),f.c.f.d==A&&++Ue;Ue>0&&(ye.g==(Be(),yt)?(e.a[ye.k]=mt,++mt):(e.a[ye.k]=mt+ce+de,++de),y+=Ue)}mt+=de}else{for(oe=0,Ee=new V(O.f);Ee.a<Ee.c.c.length;){for(ye=v($(Ee),7),g=new V(ye.b);g.a<g.c.c.length;)f=v($(g),12),f.c.f.d==A&&++oe;e.a[ye.k]=mt}oe>0&&(++mt,y+=oe)}for(rt=Ie(pr,hr,26,y,12,1),_=0,G=0,ee=n.length;G<ee;++G)if(O=n[G],Gi(v(X(O,(Ye(),St)),28)))for(Ee=new V(O.f);Ee.a<Ee.c.c.length;)for(ye=v($(Ee),7),ht=_,g=new V(ye.e);g.a<g.c.c.length;)f=v($(g),12),pt=f.d,pt.f.d==Ge&&sX(rt,ht,_++,e.a[pt.k]);else for(ht=_,Ee=new V(O.f);Ee.a<Ee.c.c.length;)for(ye=v($(Ee),7),g=new V(ye.e);g.a<g.c.c.length;)f=v($(g),12),pt=f.d,pt.f.d==Ge&&sX(rt,ht,_++,e.a[pt.k]);for(x=1;x<mt;)x*=2;for(on=2*x-1,x-=1,Pt=Ie(pr,hr,26,on,12,1),u=0,N=0;N<y;N++)for(C=rt[N]+x,++Pt[C];C>0;)C%2>0&&(u+=Pt[C+1]),C=(C-1)/2|0,++Pt[C];return u}function Fne(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In;for($t(n,"Compound graph postprocessor",1),i=Yt(Re(Zt(X(e,(tn(),pC))))),x=v(X(e,(Ce(),R9)),144),A=new ai,Ue=x.W().mb();Ue.G();){for(Ee=v(Ue.H(),12),y=new Cc(x.U(Ee)),wo(y,new FM(e)),pt=_we((qn(0,y.c.length),v(y.c[0],114))),Pt=FJ(v(ct(y,y.c.length-1),114)),vu(Ee.a),rt=pt.f,dd(Pt.f,rt)?Ge=v(X(rt,uf),55):Ge=ta(rt),Y=v(X(Ee,(Ye(),dr)),44),MQ(y,oae)?Y?vu(Y):(Y=new Xi,_e(Ee,dr,Y)):Y&&_e(Ee,dr,null),re=null,g=new V(y);g.a<g.c.c.length;){for(f=v($(g),114),ye=new oi,w7(ye,f.a,Ge),oe=f.b,u=new Xi,Ak(u,0,oe.a),jc(u,ye),ht=new lr(ra(oe.c)),mt=new lr(ra(oe.d)),ht.a+=ye.a,ht.b+=ye.b,mt.a+=ye.a,mt.b+=ye.b,re&&(u.b==0?de=mt:de=(_t(u.b!=0),v(u.a.a.c,10)),on=wi(re.a-de.a)>Ju,In=wi(re.b-de.b)>Ju,(!i&&on&&In||i&&(on||In))&&_n(Ee.a,ht)),Na(Ee.a,u),u.b==0?re=ht:re=(_t(u.b!=0),v(u.c.b.c,10)),ce=v(X(oe,dr),44),ce&&(G=new Xi,Ak(G,0,ce),jc(G,ye),Na(Y,G)),FJ(f)==Pt&&(ta(Pt.f)!=f.a&&(ye=new oi,w7(ye,ta(Pt.f),Ge)),_e(Ee,hC,ye)),ee=new jn(oe.b,0);ee.b<ee.d.Y();)_=(_t(ee.b<ee.d.Y()),v(ee.d.sb(ee.c=ee.b++),33)),ut(X(_,F9))===ut(Ee)&&(w7(_.i,ta(oe.c.f),Ge),Jo(ee),Ke(Ee.b,_));A.a.db(oe,A)}er(Ee,pt),Fn(Ee,Pt)}for(N=(qe=new hn(A.a).a.bb().mb(),new yn(qe));N.a.G();)C=(O=v(N.a.H(),21),v(O.yb(),12)),er(C,null),Fn(C,null);zt(n)}function u3e(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on;if(rt=v(X(e,(Ye(),St)),28),rt!=(tr(),Ss)&&rt!=Yc){for(ee=e.c,Y=ee.c.length,A=new aa((ji(Y+2,cI),cd(Ur(Ur(5,Y+2),(Y+2)/10|0)))),re=new aa((ji(Y+2,cI),cd(Ur(Ur(5,Y+2),(Y+2)/10|0)))),Ke(A,new an),Ke(A,new an),Ke(re,new Ve),Ke(re,new Ve),qe=new ai,n=0;n<Y;n++)for(i=(qn(n,ee.c.length),v(ee.c[n],16)),ht=(qn(n,A.c.length),v(A.c[n],57)),oe=(Wn(),new an),A.c[A.c.length]=oe,mt=(qn(n,re.c.length),v(re.c[n],20)),de=new Ve,re.c[re.c.length]=de,f=new V(i.a);f.a<f.c.c.length;){for(u=v($(f),9),C=Vt(Yr(u));Ft(C);)x=v(Ot(C),12),Pt=x.c.f,IX(Pt)&&(qe.a.db(Pt,qe),pt=v(ht.cb(X(Pt,(Ce(),Ct))),9),pt||(pt=Zee(e,Pt),ht.db(X(Pt,Ct),pt),mt.ib(pt)),er(x,v(ct(pt.f,1),7)));for(_=Vt(Un(u));Ft(_);)x=v(Ot(_),12),on=x.d.f,IX(on)&&(qe.a.db(on,qe),ce=v(pn(oe,X(on,(Ce(),Ct))),9),ce||(ce=Zee(e,on),Nn(oe,X(on,Ct),ce),de.c[de.c.length]=ce),Fn(x,v(ct(ce.f,0),7)))}for(O=0;O<re.c.length;O++)if(ye=(qn(O,re.c.length),v(re.c[O],20)),!ye.V())for(O==0?(G=new Nl(e),Ll(0,ee.c.length),Pb(ee.c,0,G)):O==A.c.length-1?(G=new Nl(e),ee.c[ee.c.length]=G):G=(qn(O-1,ee.c.length),v(ee.c[O-1],16)),y=ye.mb();y.G();)g=v(y.H(),9),Wr(g,G);for(Ue=(Ge=new hn(qe.a).a.bb().mb(),new yn(Ge));Ue.a.G();)Ee=(N=v(Ue.a.H(),21),v(N.yb(),9)),Wr(Ee,null)}}function c3e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In,Li;for(on=new Ve,Y=new V(n.c);Y.a<Y.c.c.length;)for(O=v($(Y),16),Ee=new V(O.a);Ee.a<Ee.c.c.length;){for(ye=v($(Ee),9),ye.k=-1,A=_u,Ge=_u,ht=new V(ye.f);ht.a<ht.c.c.length;){for(rt=v($(ht),7),f=new V(rt.b);f.a<f.c.c.length;)i=v($(f),12),pt=v(X(i,(Ce(),No)),24).a,A=A>pt?A:pt;for(u=new V(rt.e);u.a<u.c.c.length;)i=v($(u),12),pt=v(X(i,(Ce(),No)),24).a,Ge=Ge>pt?Ge:pt}_e(ye,Mm,Tt(A)),_e(ye,jm,Tt(Ge))}for(oe=0,G=new V(n.c);G.a<G.c.c.length;)for(O=v($(G),16),Ee=new V(O.a);Ee.a<Ee.c.c.length;)ye=v($(Ee),9),ye.k<0&&(Pt=new r6,Pt.b=oe++,F7(e,ye,Pt),on.c[on.c.length]=Pt);for(qe=xl(on.c.length),N=xl(on.c.length),y=0;y<on.c.length;y++)Ke(qe,new Ve),Ke(N,Tt(0));for(PCe(n,on,qe,N),In=v(fr(on,Ie(Uae,Cre,111,on.c.length,0,1)),625),Ue=v(fr(qe,Ie(y3e,{3:1,5:1,6:1,672:1},20,qe.c.length,0,1)),672),C=Ie(pr,hr,26,N.c.length,12,1),x=0;x<C.length;x++)C[x]=(qn(x,N.c.length),v(N.c[x],24)).a;for(ce=0,de=new Ve,_=0;_<In.length;_++)C[_]==0&&Ke(de,In[_]);for(re=Ie(pr,hr,26,In.length,12,1);de.c.length!=0;)for(Pt=v(Gf(de,0),111),re[Pt.b]=ce++;!Ue[Pt.b].V();)Li=v(Ue[Pt.b].vb(0),111),--C[Li.b],C[Li.b]==0&&(de.c[de.c.length]=Li);for(e.a=Ie(Uae,Cre,111,In.length,0,1),g=0;g<In.length;g++)for(ee=In[g],mt=re[g],e.a[mt]=ee,ee.b=mt,Ee=new V(ee.f);Ee.a<Ee.c.c.length;)ye=v($(Ee),9),ye.k=mt;return e.a}function l3e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt;for($t(n,"Fixed Layout",1),_=v(X(e,(Ye(),eh)),122),ee=0,re=0,de=new V(e.b);de.a<de.c.c.length;){for(oe=v($(de),9),Ge=v(X(oe,Td),10),Ge&&(oe.i.a=Ge.a,oe.i.b=Ge.b,v(X(oe,Uc),86).kb((Ku(),Gv))&&(rt=v(X(oe,sg),15).a,C=v(X(oe,og),15).a,rt>0&&C>0&&$7(oe,new kt(rt,C),!0))),ee=et(ee,oe.i.a+oe.j.a),re=et(re,oe.i.b+oe.j.b),G=new V(oe.c);G.a<G.c.c.length;)A=v($(G),33),Ge=v(X(A,Td),10),Ge&&(A.i.a=Ge.a,A.i.b=Ge.b),ee=et(ee,oe.i.a+A.i.a+A.j.a),re=et(re,oe.i.b+A.i.b+A.j.b);for(Ee=new V(oe.f);Ee.a<Ee.c.c.length;)for(ye=v($(Ee),7),Ge=v(X(ye,Td),10),Ge&&(ye.i.a=Ge.a,ye.i.b=Ge.b),Ue=oe.i.a+ye.i.a,qe=oe.i.b+ye.i.b,ee=et(ee,Ue+ye.j.a),re=et(re,qe+ye.j.b),O=new V(ye.c);O.a<O.c.c.length;)A=v($(O),33),Ge=v(X(A,Td),10),Ge&&(A.i.a=Ge.a,A.i.b=Ge.b),ee=et(ee,Ue+A.i.a+A.j.a),re=et(re,qe+A.i.b+A.j.b);for(x=Vt(Un(oe));Ft(x);)g=v(Ot(x),12),Y=Ene(g),ee=et(ee,Y.a),re=et(re,Y.b);for(y=Vt(Yr(oe));Ft(y);)g=v(Ot(y),12),ut(X(g.c.f,(Ce(),uf)))!==ut(e)&&(Y=Ene(g),ee=et(ee,Y.a),re=et(re,Y.b))}if(_==(Zu(),Xf))for(ce=new V(e.b);ce.a<ce.c.c.length;)for(oe=v($(ce),9),y=Vt(Un(oe));Ft(y);)g=v(Ot(y),12),N=LCe(g),N.b==0?_e(g,dr,null):_e(g,dr,N);e.e.a=ee,e.e.b=re,_e(e,Uc,(Ku(),u=v(da(ug),11),new xi(u,v(ea(u,u.length),11),0))),f=v(X(e,(Ce(),cf)),9),f&&_e(f,Uc,(i=v(da(ug),11),new xi(i,v(ea(i,i.length),11),0))),zt(n)}function f3e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt;if(!Gi(v(X(n,(Ye(),St)),28))){if(n.f.c.length>1){qe=Ie(D3e,qr,15,e.a.length,0,1),C=xl(e.a.length),ee=0,Y=0,i=2*n.d.a.c.length+1;e:for(Ue=new V(n.f);Ue.a<Ue.c.c.length;){if(Ee=v($(Ue),7),oe=Ee.g==(Be(),yt)||Ee.g==Et,mt=0,oe){if(Ge=v(X(Ee,(Ce(),lu)),9),!Ge)continue;for(O=!1,ye=!1,ht=new V(Ge.f);ht.a<ht.c.c.length;)rt=v($(ht),7),ut(X(rt,Ct))===ut(Ee)&&(rt.e.c.length==0?rt.b.c.length==0||(O=!0):ye=!0);O&&!ye?mt=Ee.g==yt?-(Ge.d?ia(Ge.d.a,Ge,0):-1):i-(Ge.d?ia(Ge.d.a,Ge,0):-1):ye&&!O?mt=(Ge.d?ia(Ge.d.a,Ge,0):-1)+1:O&&ye&&(mt=Ee.g==yt?0:i/2)}else{for(de=new V(Ee.e);de.a<de.c.c.length;)if(ce=v($(de),12),f=ce.d,f.f.d==n.d){C.c[C.c.length]=Ee;continue e}else mt+=e.a[f.k];for(A=new V(Ee.b);A.a<A.c.c.length;)if(N=v($(A),12),f=N.c,f.f.d==n.d){C.c[C.c.length]=Ee;continue e}else mt-=e.a[f.k]}Ee.b.c.length+Ee.e.c.length>0?(qe[Ee.k]=new dn(mt/(Ee.b.c.length+Ee.e.c.length)),ee=T0e(ee,qe[Ee.k].a),Y=WZ(Y,qe[Ee.k].a)):oe&&(qe[Ee.k]=new dn(mt))}for(re=(n.d?ia(n.d.a,n,0):-1)+1,G=n.d.a.c.length+1,_=new V(C);_.a<_.c.c.length;){for(x=v($(_),7),mt=0,y=0,g=Vt(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[new dp(x),new Dh(x)]))))));Ft(g);)f=v(Ot(g),7),f.f.d==n.d&&(mt+=WK(f.f)+1,++y);u=mt/y,pt=x.g,pt==(Be(),ot)?u<re?qe[x.k]=new dn(ee-u):qe[x.k]=new dn(Y+(G-u)):pt==lt&&(u<re?qe[x.k]=new dn(Y+u):qe[x.k]=new dn(ee-(G-u)))}wo(n.f,new Fq(qe))}_e(n,St,(tr(),Md))}}function h3e(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt;for(Ge=new Ve,e.a.b.c=Ie(dt,tt,1,0,4,1),ye=(Wn(),new an),oe=new V(e.d.c);oe.a<oe.c.c.length;)for(ee=v($(oe),16),de=new V(ee.a);de.a<de.c.c.length;){if(ce=v($(de),9),Yt(Re(Zt(X(ce,(Ye(),ag)))))&&!Hb(ov(ce))){x=v(ly(ov(ce)),12),Ee=x.c.f,Ee==ce&&(Ee=x.d.f),Ue=new Ar(Ee,Fu(vo(ce.i),Ee.i)),Nn(e.b,ce,Ue);continue}g=new $te(ce,e.d),Ke(e.a.b,g),Ta(ye.d,ce,g)}for(re=new V(e.d.c);re.a<re.c.c.length;)for(ee=v($(re),16),de=new V(ee.a);de.a<de.c.c.length;){for(ce=v($(de),9),g=v(Ti(Mi(ye.d,ce)),25),N=Vt(Un(ce));Ft(N);)if(_=v(Ot(N),12),u=xn(_.a,0),A=!0,Y=null,u.b!=u.d.c){for(n=v(fn(u),10),_.c.g==(Be(),yt)&&(rt=new fv(n,new kt(n.a,g.j.e),g,_),rt.c=!0,Ge.c[Ge.c.length]=rt),_.c.g==Et&&(rt=new fv(n,new kt(n.a,g.j.e+g.j.b),g,_),rt.d=!0,Ge.c[Ge.c.length]=rt);u.b!=u.d.c;)i=v(fn(u),10),oA(n.b,i.b)||(Y=new fv(n,i,null,_),Ge.c[Ge.c.length]=Y,A&&(A=!1,i.b<g.j.e?Y.c=!0:i.b>g.j.e+g.j.b?Y.d=!0:(Y.d=!0,Y.c=!0))),u.b!=u.d.c&&(n=i);Y&&(y=v(pn(ye,_.d.f),25),n.b<y.j.e?Y.c=!0:n.b>y.j.e+y.j.b?Y.d=!0:(Y.d=!0,Y.c=!0))}for(C=Vt(Yr(ce));Ft(C);)_=v(Ot(C),12),_.a.b!=0&&(n=v(B1(_.a),10),_.d.g==(Be(),yt)&&(rt=new fv(n,new kt(n.a,g.j.e),g,_),rt.c=!0,Ge.c[Ge.c.length]=rt),_.d.g==Et&&(rt=new fv(n,new kt(n.a,g.j.e+g.j.b),g,_),rt.d=!0,Ge.c[Ge.c.length]=rt))}if(Ge.c.length!=0){for(wn(),wo(Ge,null),G=(qn(0,Ge.c.length),v(Ge.c[0],142)),f=new m7(G,e.d),O=1;O<Ge.c.length;O++)qe=(qn(O,Ge.c.length),v(Ge.c[O],142)),oA(f.j.d,qe.j)&&!(YA(f.j.e+f.j.b,qe.k)||YA(qe.n,f.j.e))?yne(f,qe):(Ke(e.a.b,f),f=new m7(qe,e.d));Ke(e.a.b,f)}Ge.c=Ie(dt,tt,1,0,4,1),p_e(e)}function Q7(e,n,i,u,f,g){var y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In,Li,Ca,fu;for(x=v(ct(e.d.c.c,u),16),Li=new ai,Y=new ai,G=0;G<x.a.c.length;++G)ce=v(ct(x.a,G),9),G<i?(ht=Li.a.db(ce,Li),ht==null):G>i&&(rt=Y.a.db(ce,Y),rt==null);for(Ca=new ai,ee=new ai,ye=(mt=new hn(Li.a).a.bb().mb(),new yn(mt));ye.a.G();)for(ce=(A=v(ye.a.H(),21),v(A.yb(),9)),y=n==1?Un(ce):Yr(ce),C=(ar(),new hs(ds($s(y.a,new w))));Ft(C);)_=v(Ot(C),12),Pa(ce.d)!=Pa(_.d.f.d)&&Rn(Ca,_.d.f);for(Ee=(Pt=new hn(Y.a).a.bb().mb(),new yn(Pt));Ee.a.G();)for(ce=(A=v(Ee.a.H(),21),v(A.yb(),9)),y=n==1?Un(ce):Yr(ce),C=(ar(),new hs(ds($s(y.a,new w))));Ft(C);)_=v(Ot(C),12),Pa(ce.d)!=Pa(_.d.f.d)&&Rn(ee,_.d.f);for(uae&&jf(),Ge=v(ct(e.d.c.c,u+(n==1?1:-1)),16),re=_u,oe=Or,O=0;O<Ge.a.c.length;O++)ce=v(ct(Ge.a,O),9),Ca.a.R(ce)?re=re>O?re:O:ee.a.R(ce)&&(oe=oe<O?oe:O);if(re<oe){for(Ue=(on=new hn(Ca.a).a.bb().mb(),new yn(on));Ue.a.G();){for(ce=(A=v(Ue.a.H(),21),v(A.yb(),9)),N=Vt(Un(ce));Ft(N);)if(_=v(Ot(N),12),Pa(ce.d)==Pa(_.d.f.d))return null;for(C=Vt(Yr(ce));Ft(C);)if(_=v(Ot(C),12),Pa(ce.d)==Pa(_.c.f.d))return null}for(qe=(pt=new hn(ee.a).a.bb().mb(),new yn(pt));qe.a.G();){for(ce=(A=v(qe.a.H(),21),v(A.yb(),9)),N=Vt(Un(ce));Ft(N);)if(_=v(Ot(N),12),Pa(ce.d)==Pa(_.d.f.d))return null;for(C=Vt(Yr(ce));Ft(C);)if(_=v(Ot(C),12),Pa(ce.d)==Pa(_.c.f.d))return null}for(Li.a.Y()==0?fu=0:Y.a.Y()==0?fu=Ge.a.c.length:fu=re+1,de=new V(x.a);de.a<de.c.c.length;)if(ce=v($(de),9),ce.g==(gt(),wr))return null;return g==1?vy(be(ve(z_,1),qr,24,0,[Tt(fu)])):n==1&&u==f-2||n==0&&u==1?vy(be(ve(z_,1),qr,24,0,[Tt(fu)])):(In=Q7(e,n,fu,u+(n==1?1:-1),f,g-1),In&&n==1&&In.rb(0,Tt(fu)),In)}return null}function d3e(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;if(h7(n),G=(Ye(),Iv).b,!(G in n.a&&Qn(n,G).ic().a)){if(_=Qn(n,"source"),C=Qn(n,"sourcePort"),N=Qn(n,"target"),A=Qn(n,"targetPort"),_){if(!_.lc())throw new Ks("Invalid format of an edge's 'source' property. It must be a string.",_,n)}else throw new Ks("Edges must contain a 'source' property.",null,n);if(N){if(!N.lc())throw new Ks("Invalid format of an edge's 'target' property. It must be a string.",N,n)}else throw new Ks("Edges must contain a 'target' property.",null,n);re=null,ce=null;try{ee=v(uy(e.i,_.lc().a),9),C&&C.lc()&&(re=v(uy(e.k,C.lc().a),7)),oe=v(uy(e.i,N.lc().a),9),A&&A.lc()&&(ce=v(uy(e.k,A.lc().a),7))}catch(ye){throw ye=hi(ye),Ze(ye,76)?new jb("An edge's 'source', 'target', 'sourcePort', and 'targetPort' properties have to be strings.",n):di(ye)}if(!Yt(Re(e.g))&&(!ee||!oe||ta(ee)!=ta(oe)))return;if(!ee||!oe)throw new jb("An edge's source or target node could not be resolved.",n);if(Y=ta(ee),u=new Qs,_e(u,(Ce(),Ct),n),y=v(Qn(n,"id"),97),cy(e.a,y.a,u),Nn(e.b,u,n),By(n,u),b7(e,n,u,Y),f=v(X(Y,ui),18),ee==oe&&f.ib((jr(),Rm)),!re)re=pne(ee,new oi,(Cr(),_i),Y);else if(re.f!=ee)throw new F2("Inconsistent source port reference found.");if(!ce)ce=pne(oe,new oi,(Cr(),la),Y);else if(ce.f!=oe)throw new F2("Inconsistent target port reference found.");if(er(u,re),Fn(u,ce),(Of(Ja((Mr(),new yr(Pr(be(ve(dt,1),tt,1,4,[re.b,re.e]))))))>1||Of(Ja(new yr(Pr(be(ve(dt,1),tt,1,4,[ce.b,ce.e])))))>1)&&f.ib((jr(),Om)),ut(X(Y,(tn(),zm)))===ut((zb(),DE))&&!(T_ in n.a)){i=new Xi;try{for(x=Qn(n,T_).hc(),g=0;g<x.a.length;++g)O=Tc(x,g).kc(),de=new kt(Qn(O,"x").jc().a,Qn(O,"y").jc().a),Ir(i,de,i.c.b,i.c);_e(u,H9,i)}catch(ye){throw ye=hi(ye),Ze(ye,54)?new jb("Invalid format of an edges 'bendPoints' property.",n):di(ye)}}_e(u,dr,null)}}function Vr(){Vr=s,zL=new kn("LEFT_DIR_PREPROCESSOR",0),TL=new kn("DOWN_DIR_PREPROCESSOR",1),XL=new kn("UP_DIR_PREPROCESSOR",2),SL=new kn("COMMENT_PREPROCESSOR",3),PE=new kn("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",4),QL=new kn("SPLINE_SELF_LOOP_PREPROCESSOR",5),SE=new kn("INTERACTIVE_EXTERNAL_PORT_POSITIONER",6),VL=new kn("PARTITION_PREPROCESSOR",7),EE=new kn("BIG_NODES_PREPROCESSOR",8),km=new kn("LABEL_DUMMY_INSERTER",9),YL=new kn("PARTITION_POSTPROCESSOR",10),UL=new kn("NODE_PROMOTION",11),Cm=new kn("LAYER_CONSTRAINT_PROCESSOR",12),jL=new kn("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),_E=new kn("BIG_NODES_INTERMEDIATEPROCESSOR",14),ME=new kn("LONG_EDGE_SPLITTER",15),AE=new kn("PORT_SIDE_PROCESSOR",16),Em=new kn("LABEL_DUMMY_SWITCHER",17),BL=new kn("LABEL_MANAGEMENT_PROCESSOR",18),xm=new kn("INVERTED_PORT_PROCESSOR",19),$L=new kn("SELF_LOOP_PROCESSOR",20),jE=new kn("PORT_LIST_SORTER",21),Sm=new kn("NORTH_SOUTH_PORT_PREPROCESSOR",22),ML=new kn("GREEDY_SWITCH",23),qL=new kn("PORT_DISTRIBUTER",24),KL=new kn("SPLINE_SELF_LOOP_POSITIONER",25),ZL=new kn("SAUSAGE_COMPACTION",26),NE=new kn("IN_LAYER_CONSTRAINT_PROCESSOR",27),OL=new kn("HYPEREDGE_DUMMY_MERGER",28),Rd=new kn("LABEL_SIDE_SELECTOR",29),CE=new kn("BIG_NODES_SPLITTER",30),DL=new kn("LABEL_AND_NODE_SIZE_PROCESSOR",31),WL=new kn("SPLINE_SELF_LOOP_ROUTER",32),FL=new kn("NODE_MARGIN_CALCULATOR",33),AL=new kn("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",34),cg=new kn("HIERARCHICAL_PORT_POSITION_PROCESSOR",35),GL=new kn("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",36),Yv=new kn("BIG_NODES_POSTPROCESSOR",37),PL=new kn("COMMENT_POSTPROCESSOR",38),RL=new kn("HYPERNODE_PROCESSOR",39),IL=new kn("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",40),TE=new kn("LONG_EDGE_JOINER",41),Pm=new kn("NORTH_SOUTH_PORT_POSTPROCESSOR",42),_m=new kn("LABEL_DUMMY_REMOVER",43),LL=new kn("HORIZONTAL_COMPACTOR",44),IE=new kn("REVERSED_EDGE_RESTORER",45),HL=new kn("LEFT_DIR_POSTPROCESSOR",46),NL=new kn("DOWN_DIR_POSTPROCESSOR",47),JL=new kn("UP_DIR_POSTPROCESSOR",48),wm=new kn("END_LABEL_PROCESSOR",49)}function Ce(){Ce=s;var e,n;Ct=new br("origin"),Boe=new br("processingConfiguration"),U9=new br("processors"),O9=new vt("compoundNode",(zn(),zn(),Xn)),Goe=new vt("insideConnections",Xn),uf=new br("nestedLGraph"),cf=new br("parentLNode"),H9=new br("originalBendpoints"),z9=new br("originalDummyNodePosition"),F9=new br("originalLabelEdge"),Y9=new br("representedLabels"),Fo=new vt("labelSide",(ga(),Fv)),ju=new vt("reversed",Xn),Hd=new br("random"),ua=new vt("longEdgeSource",null),Zi=new vt("longEdgeTarget",null),sC=new vt("edgeConstraint",(hd(),m9)),sf=new br("inLayerLayoutUnit"),Mu=new vt("inLayerConstraint",(Xs(),Dm)),Gd=new vt("inLayerSuccessorConstraint",new Ve),lu=new br("portDummy"),pg=new vt("crossingHint",Tt(0)),ui=new vt("graphProperties",(n=v(da(C9),11),new xi(n,v(ea(n,n.length),11),0))),ni=new vt("externalPortSide",(Be(),Sr)),G9=new vt("externalPortSize",new oi),Gm=new br("externalPortReplacedDummy"),lh=new vt("externalPortConnections",(e=v(da($r),11),new xi(e,v(ea(e,e.length),11),0))),oc=new vt(ore,0),I9=new br("barycenterAssociates"),bg=new br("TopSideComments"),dg=new br("BottomSideComments"),Bm=new br("CommentConnectionPort"),uC=new vt("inputCollect",Xn),cC=new vt("outputCollect",Xn),D9=new vt("cyclic",Xn),Wv=new vt("bigNodeOriginalSize",new dn(0)),Xc=new vt("bigNodeInitial",Xn),L9=new vt("de.cau.cs.kieler.klay.layered.bigNodeLabels",new Ve),oC=new vt("de.cau.cs.kieler.klay.layered.postProcess",null),R9=new br("crossHierarchyMap"),hC=new br("targetOffset"),Hoe=new vt("splineLabelSize",new oi),Jv=new vt("splineLoopSide",(Fi(),ah)),fC=new vt("splineSelfLoopComponents",new Ve),V9=new vt("splineSelfLoopMargins",new d1),lf=new br("spacings"),Hm=new vt("partitionConstraint",Xn),gg=new J1((Ye(),Jl),new dn(0)),ca=new W1(iL,new dn(20),new dn(1)),lC=new W1(tL,new dn(10),new dn(1)),Is=new W1(QI,new dn(12),new dn(0)),No=new J1(nL,Tt(0)),Bd=new W1(uie,new dn(pre),new dn(0)),B9=new J1(eh,(Zu(),Xf))}function tn(){tn=s,Um=new vt("de.cau.cs.kieler.klay.layered.nodePromotion",(Hl(),Nm)),Q9=new fy("de.cau.cs.kieler.klay.layered.nodePromotionBoundary",Tt(0),Tt(0),Tt(100)),W9=new vt(are,Tt(1)),yg=new Df("de.cau.cs.kieler.klay.layered.inLayerSpacingFactor",new dn(1),new dn(0)),Au=new vt("de.cau.cs.kieler.klay.layered.edgeSpacingFactor",new dn(.5)),Uoe=new vt("de.cau.cs.kieler.klay.layered.edgeNodeSpacingFactor",new dn(EI)),mC=new vt("de.cau.cs.kieler.klay.layered.distributeNodes",(zn(),zn(),Xn)),wg=new vt("de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers",(qu(),Vm)),yC=new vt("de.cau.cs.kieler.klay.layered.cycleBreaking",(sy(),OE)),kC=new vt("de.cau.cs.kieler.klay.layered.nodeLayering",(yy(),RE)),zm=new vt("de.cau.cs.kieler.klay.layered.crossMin",(zb(),BE)),wC=new vt("de.cau.cs.kieler.klay.layered.greedySwitch",(gv(),iC)),_C=new vt("de.cau.cs.kieler.klay.layered.nodePlace",(Oy(),GE)),Z9=new fy("de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening",new dn(_I),new dn(0),new dn(1)),Fm=new vt("de.cau.cs.kieler.klay.layered.fixedAlignment",(av(),eC)),zd=new vt("de.cau.cs.kieler.klay.layered.edgeLabelSideSelection",(Dy(),Lm)),q9=new vt(ire,Xn),mg=new Df("de.cau.cs.kieler.klay.layered.thoroughness",Tt(10),Tt(1)),Dr=new vt("de.cau.cs.kieler.klay.layered.layerConstraint",(ba(),fh)),$9=new vt("de.cau.cs.kieler.klay.layered.mergeEdges",Xn),K9=new vt("de.cau.cs.kieler.klay.layered.mergeHierarchyEdges",Ei),xC=new vt("de.cau.cs.kieler.klay.layered.interactiveReferencePoint",(hy(),aC)),e0=new vt("de.cau.cs.kieler.klay.layered.feedBackEdges",Xn),pC=new vt("de.cau.cs.kieler.klay.layered.unnecessaryBendpoints",Xn),vC=new vt("de.cau.cs.kieler.klay.layered.contentAlignment",(Vp(),ln(ZE,be(ve($E,1),Je,123,0,[UE])))),J9=new vt("de.cau.cs.kieler.klay.layered.sausageFolding",Xn),PC=new vt("de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement",(My(),SC)),gC=new vt("de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy",(qb(),HE)),EC=new vt("de.cau.cs.kieler.klay.layered.northOrSouthPort",Xn),Ym=new vt("de.cau.cs.kieler.klay.layered.postCompaction",(Zp(),Zv)),CC=new vt("de.cau.cs.kieler.klay.layered.postCompaction.constraints",(py(),LE)),bC=new vt("de.cau.cs.kieler.klay.layered.components.compact",Xn)}function x_(){x_=s,Fie=new na("OUT_T_L",0,(Mr(),new Vu(ln((Wu(),ka),be(ve(Kn,1),Je,41,0,[Va,ma])))),(pk(),Vc)),zie=new na("OUT_T_C",1,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(ka,be(ve(Kn,1),Je,41,0,[Va,Co])),ln(ka,be(ve(Kn,1),Je,41,0,[Va,Co,wa]))]))),Od),Uie=new na("OUT_T_R",2,new Vu(ln(ka,be(ve(Kn,1),Je,41,0,[Va,xa]))),qc),Iie=new na("OUT_B_L",3,new Vu(ln(ka,be(ve(Kn,1),Je,41,0,[Ua,ma]))),Vc),Aie=new na("OUT_B_C",4,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(ka,be(ve(Kn,1),Je,41,0,[Ua,Co])),ln(ka,be(ve(Kn,1),Je,41,0,[Ua,Co,wa]))]))),Od),Lie=new na("OUT_B_R",5,new Vu(ln(ka,be(ve(Kn,1),Je,41,0,[Ua,xa]))),qc),Die=new na("OUT_L_T",6,new Vu(ln(ka,be(ve(Kn,1),Je,41,0,[ma,Va,wa]))),qc),Rie=new na("OUT_L_C",7,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(ka,be(ve(Kn,1),Je,41,0,[ma,Ya])),ln(ka,be(ve(Kn,1),Je,41,0,[ma,Ya,wa]))]))),qc),Oie=new na("OUT_L_B",8,new Vu(ln(ka,be(ve(Kn,1),Je,41,0,[ma,Ua,wa]))),qc),Hie=new na("OUT_R_T",9,new Vu(ln(ka,be(ve(Kn,1),Je,41,0,[xa,Va,wa]))),Vc),Gie=new na("OUT_R_C",10,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(ka,be(ve(Kn,1),Je,41,0,[xa,Ya])),ln(ka,be(ve(Kn,1),Je,41,0,[xa,Ya,wa]))]))),Vc),Bie=new na("OUT_R_B",11,new Vu(ln(ka,be(ve(Kn,1),Je,41,0,[xa,Ua,wa]))),Vc),Mie=new na("IN_T_L",12,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Va,ma])),ln(qi,be(ve(Kn,1),Je,41,0,[Va,ma,wa]))]))),Vc),Tie=new na("IN_T_C",13,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Va,Co])),ln(qi,be(ve(Kn,1),Je,41,0,[Va,Co,wa]))]))),Od),jie=new na("IN_T_R",14,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Va,xa])),ln(qi,be(ve(Kn,1),Je,41,0,[Va,xa,wa]))]))),qc),Sie=new na("IN_C_L",15,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Ya,ma])),ln(qi,be(ve(Kn,1),Je,41,0,[Ya,ma,wa]))]))),Vc),Pie=new na("IN_C_C",16,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Ya,Co])),ln(qi,be(ve(Kn,1),Je,41,0,[Ya,Co,wa]))]))),Od),Nie=new na("IN_C_R",17,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Ya,xa])),ln(qi,be(ve(Kn,1),Je,41,0,[Ya,xa,wa]))]))),qc),Eie=new na("IN_B_L",18,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Ua,ma])),ln(qi,be(ve(Kn,1),Je,41,0,[Ua,ma,wa]))]))),Vc),_ie=new na("IN_B_C",19,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Ua,Co])),ln(qi,be(ve(Kn,1),Je,41,0,[Ua,Co,wa]))]))),Od),Cie=new na("IN_B_R",20,new yr(Pr(be(ve(dt,1),tt,1,4,[ln(qi,be(ve(Kn,1),Je,41,0,[Ua,xa])),ln(qi,be(ve(Kn,1),Je,41,0,[Ua,xa,wa]))]))),qc),pE=new na(Kf,21,Pv,null)}function Une(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In,Li,Ca,fu,Ls,Fd,nl,dh,$i,Oi,Br,gi,Os,os,rl,Uo,kg,Ud,Yo,ff,uc,cc,Rs,Ki,Ds,ph,lc;for(Ud=0,mt=0,In=n.length;mt<In;++mt)if(ht=n[mt],Gi(v(X(ht,(Ye(),St)),28)))for(Oi=new V(ht.f);Oi.a<Oi.c.c.length;){for($i=v($(Oi),7),gi=0,x=new V($i.e);x.a<x.c.c.length;)y=v($(x),12),ht.d!=y.d.f.d&&++gi;gi>0&&(e.a[$i.k]=Ud++)}else{for(Ca=0,Oi=new V(ht.f);Oi.a<Oi.c.c.length;){for($i=v($(Oi),7),x=new V($i.e);x.a<x.c.c.length;)y=v($(x),12),ht.d!=y.d.f.d&&++Ca;e.a[$i.k]=Ud}Ca>0&&++Ud}for(Rs=0,Pt=0,Li=i.length;Pt<Li;++Pt)if(ht=i[Pt],Gi(v(X(ht,(Ye(),St)),28))){for(fu=0,Oi=new V(ht.f);Oi.a<Oi.c.c.length&&($i=v($(Oi),7),$i.g==(Be(),yt));)for(x=new V($i.b);x.a<x.c.c.length;)if(y=v($(x),12),ht.d!=y.c.f.d){++fu;break}for(Fd=0,Os=new jn(ht.f,ht.f.c.length);Os.b>0;){for($i=(_t(Os.b>0),v(Os.a.sb(Os.c=--Os.b),7)),gi=0,x=new V($i.b);x.a<x.c.c.length;)y=v($(x),12),ht.d!=y.c.f.d&&++gi;gi>0&&($i.g==(Be(),yt)?(e.a[$i.k]=Rs,++Rs):(e.a[$i.k]=Rs+fu+Fd,++Fd))}Rs+=Fd}else{for(Ca=0,Oi=new V(ht.f);Oi.a<Oi.c.c.length;){for($i=v($(Oi),7),x=new V($i.b);x.a<x.c.c.length;)y=v($(x),12),ht.d!=y.c.f.d&&++Ca;e.a[$i.k]=Rs}Ca>0&&++Rs}for(Br=(Wn(),new an),G=new pa,pt=0,on=n.length;pt<on;++pt)for(ht=n[pt],uc=new V(ht.f);uc.a<uc.c.c.length;)for(ff=v($(uc),7),x=new V(ff.e);x.a<x.c.c.length;)if(y=v($(x),12),Ds=y.d,ht.d!=Ds.f.d)if(Yo=v(Ti(Mi(Br.d,ff)),197),Ki=v(Ti(Mi(Br.d,Ds)),197),!Yo&&!Ki)O=new VK,G.a.db(O,G),Ke(O.a,y),Ke(O.d,ff),Ta(Br.d,ff,O),Ke(O.d,Ds),Ta(Br.d,Ds,O);else if(!Yo)Ke(Ki.a,y),Ke(Ki.d,ff),Ta(Br.d,ff,Ki);else if(!Ki)Ke(Yo.a,y),Ke(Yo.d,Ds),Ta(Br.d,Ds,Yo);else if(Yo==Ki)Ke(Yo.a,y);else{for(Ke(Yo.a,y),dh=new V(Ki.d);dh.a<dh.c.c.length;)nl=v($(dh),7),Ta(Br.d,nl,Yo);$n(Yo.a,Ki.a),$n(Yo.d,Ki.d),G.a.eb(Ki)!=null}for(Y=v(Wk(G,Ie(N3e,{674:1,3:1,5:1,6:1},197,G.a.Y(),0,1)),674),rt=n[0].d,kg=i[0].d,N=0,A=Y.length;N<A;++N)for(C=Y[N],C.e=Ud,C.f=Rs,Oi=new V(C.d);Oi.a<Oi.c.c.length;)$i=v($(Oi),7),os=e.a[$i.k],$i.f.d==rt?(os<C.e&&(C.e=os),os>C.b&&(C.b=os)):$i.f.d==kg&&(os<C.f&&(C.f=os),os>C.c&&(C.c=os));for(gd(Y,0,Y.length,(Nf(),Nf(),hh)),cc=Ie(pr,hr,26,Y.length,12,1),u=Ie(pr,hr,26,Rs+1,12,1),re=0;re<Y.length;re++)cc[re]=Y[re].f,u[cc[re]]=1;for(g=0,oe=0;oe<u.length;oe++)u[oe]==1?u[oe]=g:--g;for(rl=0,ce=0;ce<cc.length;ce++)cc[ce]+=u[cc[ce]],rl=mi(rl,cc[ce]+1);for(_=1;_<rl;)_*=2;for(lc=2*_-1,_-=1,ph=Ie(pr,hr,26,lc,12,1),f=0,qe=0;qe<cc.length;qe++)for(Ue=cc[qe]+_,++ph[Ue];Ue>0;)Ue%2>0&&(f+=ph[Ue+1]),Ue=(Ue-1)/2|0,++ph[Ue];for(Ge=Ie(Hae,tt,156,Y.length*2,0,1),de=0;de<Y.length;de++)Ge[2*de]=new oy(Y[de],Y[de].e,Y[de].b,(dy(),Kv)),Ge[2*de+1]=new oy(Y[de],Y[de].b,Y[de].e,$v);for(gd(Ge,0,Ge.length,hh),Ls=0,ye=0;ye<Ge.length;ye++)switch(Ge[ye].d.e){case 0:++Ls;break;case 1:--Ls,f+=Ls}for(Uo=Ie(Hae,tt,156,Y.length*2,0,1),Ee=0;Ee<Y.length;Ee++)Uo[2*Ee]=new oy(Y[Ee],Y[Ee].f,Y[Ee].c,(dy(),Kv)),Uo[2*Ee+1]=new oy(Y[Ee],Y[Ee].c,Y[Ee].f,$v);for(gd(Uo,0,Uo.length,hh),Ls=0,ee=0;ee<Uo.length;ee++)switch(Uo[ee].d.e){case 0:++Ls;break;case 1:--Ls,f+=Ls}return f}function Ye(){Ye=s;var e,n;sie=new vt("de.cau.cs.kieler.animate",(zn(),zn(),Ei)),new vt("de.cau.cs.kieler.minAnimTime",Tt(400)),new vt("de.cau.cs.kieler.maxAnimTime",Tt(4e3)),new vt("de.cau.cs.kieler.animTimeFactor",Tt(100)),Tv=new vt("de.cau.cs.kieler.additionalPortSpace",null),ag=new vt("de.cau.cs.kieler.commentBox",Xn),new br("de.cau.cs.kieler.diagramType"),Fa=new vt("de.cau.cs.kieler.edgeLabelPlacement",(eu(),$_)),WI=new vt("de.cau.cs.kieler.edgeType",(zy(),W_)),lie=new br("de.cau.cs.kieler.fontName"),fie=new vt("de.cau.cs.kieler.fontSize",Tt(0)),jv=new vt("de.cau.cs.kieler.hypernode",Xn),dr=new vt("de.cau.cs.kieler.junctionPoints",new Xi),new vt("de.cau.cs.kieler.layoutAncestors",Xn),Av=new vt("de.cau.cs.kieler.margins",new d1),og=new Df("de.cau.cs.kieler.minHeight",new dn(0),new dn(0)),sg=new Df("de.cau.cs.kieler.minWidth",new dn(0),new dn(0)),Iv=new vt("de.cau.cs.kieler.noLayout",Xn),Jl=new br("de.cau.cs.kieler.offset"),Xu=new br("de.cau.cs.kieler.klay.layered.portAnchor"),ec=new br("de.cau.cs.kieler.portIndex"),Ov=new vt("de.cau.cs.kieler.portSide",(Be(),Sr)),new vt("de.cau.cs.kieler.progressBar",Xn),new vt("de.cau.cs.kieler.resetConfig",Ei),new vt("de.cau.cs.kieler.scaleFactor",new dn(1)),Cs=new vt("de.cau.cs.kieler.thickness",new dn(1)),new vt("de.cau.cs.kieler.zoomToFit",Xn),KI=new br("de.cau.cs.kieler.algorithm"),zo=new vt("de.cau.cs.kieler.alignment",(xs(),Z_)),uie=new vt("de.cau.cs.kieler.aspectRatio",new dn(0)),X_=new br("de.cau.cs.kieler.bendPoints"),QI=new vt("de.cau.cs.kieler.borderSpacing",new dn(-1)),Mv=new vt(ire,Xn),is=new vt("de.cau.cs.kieler.direction",(sr(),rs)),eh=new vt("de.cau.cs.kieler.edgeRouting",(Zu(),Q_)),cie=new vt("de.cau.cs.kieler.expandNodes",Xn),JI=new vt("de.cau.cs.kieler.hierarchyHandling",(Sy(),J_)),hie=new vt("de.cau.cs.kieler.interactive",Xn),Nd=new Df("de.cau.cs.kieler.labelSpacing",new dn(3),new dn(0)),XI=new vt("de.cau.cs.kieler.layoutHierarchy",Xn),Ma=new vt("de.cau.cs.kieler.nodeLabelPlacement",(Wu(),n=v(da(Kn),11),new xi(n,v(ea(n,n.length),11),0))),St=new vt("de.cau.cs.kieler.portConstraints",(tr(),Yc)),Lv=new vt("de.cau.cs.kieler.portLabelPlacement",(fd(),Bv)),tL=new Df("de.cau.cs.kieler.portSpacing",new dn(-1),new dn(0)),eE=new vt("de.cau.cs.kieler.portAlignment",(Oc(),su)),nE=new vt("de.cau.cs.kieler.portAlignment.north",th),rE=new vt("de.cau.cs.kieler.portAlignment.south",th),iE=new vt("de.cau.cs.kieler.portAlignment.west",th),tE=new vt("de.cau.cs.kieler.portAlignment.east",th),Td=new br("de.cau.cs.kieler.position"),nL=new br("de.cau.cs.kieler.priority"),new br(are),aE=new vt("de.cau.cs.kieler.selfLoopInside",Xn),rL=new br("de.cau.cs.kieler.separateConnComp"),Uc=new vt("de.cau.cs.kieler.sizeConstraint",(Ku(),e=v(da(ug),11),new xi(e,v(ea(e,e.length),11),0))),Rv=new vt("de.cau.cs.kieler.sizeOptions",ln((vd(),zv),be(ve(dE,1),Je,139,0,[lE]))),iL=new Df("de.cau.cs.kieler.spacing",new dn(-1),new dn(0)),die=new vt("de.cau.cs.kieler.layoutPartitions",Xn),eL=new br("de.cau.cs.kieler.partition")}function p3e(e,n,i,u){wne();var f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;if(!(!u&&(e.n?e.n:(wn(),wn(),nO)).R(new D$(n)))){if(v(bL.a,18).kb(n)){if(!i.lc())throw new $o(fre+n+Qf+i+").");G=v(v(bL.b,57).cb(n),79),Y=i.lc().a,_e(e,G,Y);return}else if(v(gL.a,18).kb(n))try{if(!i.jc())throw new TZ;G=v(v(gL.b,57).cb(n),79),oe=Tt(c_e((Vn(),""+i.jc().a))),_e(e,G,oe);return}catch(de){throw de=hi(de),Ze(de,130)?new $o("Invalid integer format for property '"+n+Qf+i+")."):di(de)}else if(v(fL.a,18).kb(n)){if(!i.ic())throw new $o(fre+n+Qf+i+").");G=v(v(fL.b,57).cb(n),79),oe=(zn(),i.ic().a?Ei:Xn),_e(e,G,oe);return}else if(v(pL.a,18).kb(n)){if(!i.jc())throw new $o("Invalid float format for property '"+n+Qf+i+").");G=v(v(pL.b,57).cb(n),79),oe=new Wq(i.jc().a),_e(e,G,oe);return}else if(v(dL.a,18).kb(n)){if(!i.lc())throw new $o(bI+n+Qf+i+").");N=i.lc().a,A=null;try{or((Ye(),Ov),n)?A=(Be(),v(Xr((iJ(),wie),N),32)):or(zo,n)?A=(xs(),v(Xr((hJ(),Wre),N),103)):or(is,n)?A=(sr(),v(Xr((rJ(),Jre),N),59)):or(eh,n)?A=(Zu(),v(Xr((ZW(),nie),N),122)):or(JI,n)?A=(Sy(),v(Xr((DW(),oie),N),166)):or(eE,n)||or(tE,n)||or(nE,n)||or(rE,n)||or(iE,n)?A=(Oc(),v(Xr((aJ(),gie),N),100)):or(St,n)?A=(tr(),v(Xr((pJ(),vie),N),28)):or(Lv,n)?A=(fd(),v(Xr((RW(),mie),N),149)):or(WI,n)?A=(zy(),v(Xr((dJ(),iie),N),133)):or(Fa,n)?A=(eu(),v(Xr((qW(),eie),N),107)):or((tn(),yC),n)?A=(sy(),v(Xr((EW(),_ae),N),193)):or(kC,n)?A=(yy(),v(Xr((BW(),Sae),N),173)):or(zd,n)?A=(Dy(),v(Xr((CJ(),joe),N),115)):or(gC,n)?A=(qb(),v(Xr((QW(),Qae),N),194)):or(zm,n)?A=(zb(),v(Xr((PW(),Rae),N),192)):or(Um,n)?A=(Hl(),v(Xr((_J(),dae),N),109)):or(_C,n)?A=(Oy(),v(Xr((EJ(),qae),N),141)):or(Ym,n)?A=(Zp(),v(Xr((gJ(),vae),N),125)):or(CC,n)?A=(py(),v(Xr((CW(),gae),N),175)):or(Fm,n)?A=(av(),v(Xr((DJ(),Ioe),N),124)):or(wC,n)?A=(gv(),v(Xr((tX(),Ooe),N),110)):or(Dr,n)?A=(ba(),v(Xr((PJ(),Foe),N),85)):or(PC,n)?A=(My(),v(Xr((lJ(),Voe),N),153)):or(wg,n)?A=(qu(),v(Xr((fJ(),Zoe),N),172)):or(xC,n)&&(A=(hy(),v(Xr((WW(),Doe),N),174)))}catch(de){throw de=hi(de),Ze(de,54)?new $o(bI+n+Qf+i+")."):di(de)}G=v(v(dL.b,57).cb(n),79),_e(e,G,A);return}else if(v(hL.a,18).kb(n)){if(!i.lc())throw new $o(bI+n+Qf+i+").");for(C=i.lc().a,ee=null,_=Ky(C,"[\\[\\]\\s,]+"),y=0,x=_.length;y<x;++y)g=_[y],Nb(Rl(g))!=0&&(or((Ye(),Ma),n)?(!ee&&(ee=(f=v(da(Kn),11),new xi(f,v(ea(f,f.length),11),0))),Ai(ee,(Wu(),v(Xr((jJ(),pie),g),41)))):or(Uc,n)?(!ee&&(ee=(f=v(da(ug),11),new xi(f,v(ea(f,f.length),11),0))),Ai(ee,(Ku(),v(Xr((KW(),xie),g),150)))):or(Rv,n)?(!ee&&(ee=(f=v(da(dE),11),new xi(f,v(ea(f,f.length),11),0))),Ai(ee,(vd(),v(Xr(($W(),kie),g),139)))):or((tn(),vC),n)&&(!ee&&(ee=(f=v(da($E),11),new xi(f,v(ea(f,f.length),11),0))),Ai(ee,(Vp(),v(Xr((RJ(),Toe),g),123)))));G=v(v(hL.b,57).cb(n),79),_e(e,G,ee);return}else if(v(ym.a,18).kb(n)){if(!i.lc())throw new $o("Invalid _other_ format for property '"+n+Qf+i+").");if(or((Ye(),Td),n)||or(Xu,n))try{re=new oi,xEe(re,i.lc().a),G=v(v(ym.b,57).cb(n),79),_e(e,G,re);return}catch(de){throw de=hi(de),Ze(de,29)?new $o("Invalid KVector format for property '"+n+"' "+i+"."):di(de)}else if(or(X_,n)||or(dr,n))try{ce=new Xi,K_e(ce,i.lc().a),G=v(v(ym.b,57).cb(n),79),_e(e,G,ce);return}catch(de){throw de=hi(de),Ze(de,29)?new $o("Invalid KVectorChain format for property '"+n+"' "+i+"."):di(de)}else if(or(Av,n)||or(Tv,n))try{O=new d1,TEe(O,i.lc().a),G=v(v(ym.b,57).cb(n),79),_e(e,G,O);return}catch(de){throw de=hi(de),Ze(de,29)?new $o("Invalid Margins format for property '"+n+"' "+i+"."):di(de)}}else if(v(qie.a,18).kb(n))return;throw new $o("Unsupported layout option '"+n+Qf+i+").")}}var Wy="object",qr={3:1,8:1,5:1,6:1},W7={3:1,46:1},xu={3:1,54:1,46:1},ku="null",k_="anonymous",J7="Unknown",Yne="function",Or=2147483647,Vne={181:1,3:1,54:1,46:1},bv=65536,iu=65535,qne={3:1,54:1,29:1,46:1},__='For input string: "',_u=-2147483648,Zr={56:1},X7={23:1,145:1,185:1},Ui={3:1,5:1},eI="Invalid UTF8 sequence",Zne="fromIndex: ",ei="java.lang",tI="com.google.gwt.core.client",Jy="com.google.gwt.core.client.impl",Xy="java.io",nI="java.nio.charset",rI="javaemul.internal",ts="com.google.common.base",$ne="%s (%s) must not be negative",tt={3:1,5:1,6:1},Kne="negative size: ",Je={3:1,8:1,5:1,11:1,6:1},em={68:1,136:1,3:1,23:1,17:1},Kp={108:1,35:1},at="com.google.common.collect",E_={108:1,35:1,96:1},vv={144:1,3:1},kr={35:1},xd={57:1},At="java.util",Qp={22:1,19:1},Ii={22:1,19:1,18:1},kd={22:1,19:1,20:1},C_={22:1,19:1,20:1,63:1},_d={35:1,96:1},iI={22:1,19:1,18:1,137:1},yv={21:1},Qne="AbstractMapEntry",aI={207:1,22:1,19:1},oI={159:1,3:1,23:1,17:1},sI=1073741824,Bc={22:1},uI={3:1,22:1,19:1},Ed={87:1,3:1,22:1,19:1,20:1,63:1},Cd={3:1,57:1},Pd={3:1,22:1,19:1,18:1},Yi={64:1},cI="arraySize",ql="initialArraySize",lI={64:1,188:1,3:1,23:1,17:1},fI="occurrences",hr={52:1,3:1,5:1},hI={205:1,3:1,23:1,17:1},mv=1e-4,Zf="com.google.gwt.json.client",_o=4194303,Gc=1048575,$f=4194304,Hc=17592186044416,P_=-17592186044416,Wne=`([{"' \r
|
|
365
|
+
`,Jne=`)]}"' \r
|
|
366
|
+
`,Xne="The given string contains parts that cannot be parsed as numbers.",ere="de.cau.cs.kieler.core.math",dI=-17976931348623157e292,tm="de.cau.cs.kieler.core.properties",tre={79:1,23:1},nre="de.cau.cs.kieler.core.util",rre="de.cau.cs.kieler.kiml",Wp="LEFT",Jp="RIGHT",nm="CENTER",Eu="de.cau.cs.kieler.kiml.options",Kf="UNDEFINED",Xp="NONE",ire="de.cau.cs.kieler.debugMode",are="de.cau.cs.kieler.randomSeed",eg="de.cau.cs.kieler.kiml.util.nodespacing",pI="de.cau.cs.kieler.kiml.util.labelspacing",ore="portRatioOrPosition",sre="NodeMarginCalculator",gI="bottom",ure={286:1,121:1,3:1,5:1},wv="undefined",S_="text",cre="stacktrace",nn={34:1,3:1,8:1,5:1,6:1},N_="properties",T_="bendPoints",lre="junctionPoints",M_="width",j_="height",A_="padding",tg="children",oa={38:1,39:1,42:1,51:1,71:1,3:1,8:1,5:1,6:1},I_="de.cau.cs.kieler.klay.gwt.client.layout",fre="Invalid boolean format for property '",Qf="' (",bI="Invalid enum format for property '",vI="de.cau.cs.kieler.klay.layered",hre="Layered layout",Vi=1/0,ti=-1/0,xv="de.cau.cs.kieler.klay.layered.compaction.components",ng="de.cau.cs.kieler.klay.layered.compaction.oned",dre=" instance has been finished already.",Wf="de.cau.cs.kieler.klay.layered.compaction.oned.algs",Cu="de.cau.cs.kieler.klay.layered.compaction.recthull",Ho={68:1},au="de.cau.cs.kieler.klay.layered.components",yI={3:1,5:1,22:1,13:1,19:1,20:1,63:1},pre=1.600000023841858,Ju=.001,Bn={31:1},kv="de.cau.cs.kieler.klay.layered.compound",va={38:1,39:1,47:1,42:1,3:1,8:1,5:1,6:1},pi="de.cau.cs.kieler.klay.layered.graph",gre="Port side is undefined",Mt="de.cau.cs.kieler.klay.layered.intermediate",bre="Big nodes pre-processing",vre=34028234663852886e22,yre={38:1,39:1,42:1,346:1,71:1,3:1,8:1,5:1,6:1},mI="Node '",mre="' has its layer constraint set to FIRST or FIRST_SEPARATE, but has ",wre="at least one incoming edge. Connections between nodes with these ",wI="layer constraints are not supported.",ks=17976931348623157e292,xre="Odd port side processing",rm={250:1,3:1,5:1},zc=1e-8,ns="de.cau.cs.kieler.klay.layered.intermediate.compaction",so="de.cau.cs.kieler.klay.layered.intermediate.greedyswitch",_v={227:1,3:1,5:1},rg="de.cau.cs.kieler.klay.layered.networksimplex",L_="INTERACTIVE",xI="de.cau.cs.kieler.klay.layered.p1cycles",_s={106:1,31:1},im="de.cau.cs.kieler.klay.layered.p2layers",kre="NETWORK_SIMPLEX",Fc="de.cau.cs.kieler.klay.layered.p3order",O_=5960464477539063e-23,kI="Port type is undefined",_I=.30000001192092896,EI=.699999988079071,_re=.8999999761581421,Ere="de.cau.cs.kieler.klay.layered.p3order.constraints",Ev="de.cau.cs.kieler.klay.layered.p3order.counting",Cv="de.cau.cs.kieler.klay.layered.p4nodes",Cre={625:1,3:1,5:1,6:1},Es="de.cau.cs.kieler.klay.layered.p4nodes.bk",Zl="de.cau.cs.kieler.klay.layered.p5edges",$l="de.cau.cs.kieler.klay.layered.p5edges.splines",Kl=1e-6,am=-1e-6,Pre="The list of vectors may not be empty.",R_=.09999999999999998,Pu="de.cau.cs.kieler.klay.layered.properties",Ql="_gwt_modCount",Sre={3:1,22:1,19:1,20:1,63:1},Nre={3:1,5:1,57:1},Tre={3:1,5:1,22:1,19:1,50:1,18:1},D_="delete",B_=15525485,CI=16777216,PI=16777215,Mre={3:1,5:1,22:1,19:1,20:1,63:1},G_={3:1,23:1,17:1,138:1},E,om,H_;N2e(),W(1,null,{},c),E.t=function(e){return this===e},E.u=function(){return this.$c},E.v=function(){return Ec(this)},E.w=function(){return gW(this)},E.toString=function(){return this.w()},W(46,1,W7),E.bc=function(){return this.f},E.w=function(){var e,n;return e=y1(this.$c),n=this.bc(),n!=null?e+": "+n:e},W(54,46,xu),W(72,54,xu,gu),W(164,72,{164:1,3:1,54:1,46:1},tJ),E.bc=function(){return Bxe(this),this.c},E.cc=function(){return ut(this.b)===ut(sm)?null:this.b};var sm,SI;W(642,1,{}),W(356,642,{},h),E.dc=function(e,n){var i={},u=[];e.__gwt$backingJsError={fnStack:u};for(var f=arguments.callee.caller;f;){var g=(zp(),f.name||(f.name=xwe(f.toString())));u.push(g);var y=":"+g,x=i[y];if(x){var _,C;for(_=0,C=x.length;_<C;_++)if(x[_]===f)return}(x||(i[y]=[])).push(f),f=f.caller}},E.ec=function(e){var n,i,u,f,g;for(u=(zp(),g=e.__gwt$backingJsError,g&&g.fnStack?g.fnStack:[]),i=u.length,f=Ie(Koe,qr,146,i,0,1),n=0;n<i;n++)f[n]=new ik(u[n],null,-1);return f},W(643,642,{}),E.dc=function(e,n){function i(f){if(!("stack"in f))try{throw f}catch{}return f}var u;typeof n=="string"?u=i(new Error(n.replace(`
|
|
367
|
+
`," "))):n&&typeof n==Wy&&"stack"in n?u=n:u=i(new Error),e.__gwt$backingJsError=u},E.fc=function(e,n,i,u){return new ik(n,e+"@"+u,i<0?-1:i)},E.ec=function(e){var n,i,u,f,g,y,x;if(f=(zp(),x=e.__gwt$backingJsError,x&&x.stack?x.stack.split(`
|
|
368
|
+
`):[]),g=Ie(Koe,qr,146,0,0,1),n=0,u=f.length,u==0)return g;for(y=Sne(this,f[0]),ls(y.d,k_)||(g[n++]=y),i=1;i<u;i++)g[n++]=Sne(this,f[i]);return g},W(357,643,{},JV),E.fc=function(e,n,i,u){return new ik(n,e,-1)};var jre,Are,Ire;W(181,54,Vne),W(351,181,Vne,g0e),W(288,1,{},IA),E.Oc=function(e){var n;return n=new IA,n.g=4,e>1?n.c=xW(this,e-1):n.c=this,n},E.Pc=function(){return Mf(this),this.b},E.Qc=function(){return y1(this)},E.Rc=function(){return e$(this)},E.Sc=function(){return(this.g&4)!=0},E.Tc=function(){return(this.g&1)!=0},E.w=function(){return(this.g&2?"interface ":this.g&1?"":"class ")+(Mf(this),this.n)},E.g=0,W(119,72,{3:1,119:1,54:1,46:1},lZ),W(29,72,qne,vp,Pn),W(95,72,xu,n6,fs),W(231,1,{3:1,231:1});var NI;W(24,231,{3:1,23:1,24:1,231:1},YM),E.F=function(e){return X0e(this,v(e,24))},E.t=function(e){return Ze(e,24)&&v(e,24).a==this.a},E.v=function(){return this.a},E.w=function(){return m1(this.a)},E.a=0,Ire={3:1,345:1,23:1,2:1},W(350,1,Zr,i1),E.$b=function(e,n){return Sme(td(e),td(n))},W(257,95,xu,j0e),W(145,1,{23:1,145:1}),E.F=function(e){return J0e(this,v(e,145))},E.t=function(e){var n;return e===this?!0:Ze(e,145)?(n=v(e,145),ls(this.a,n.a)):!1},E.v=function(){return Kk(this.a)},E.w=function(){return this.a},W(358,29,qne,iye),W(256,29,{3:1,54:1,29:1,46:1,256:1},rye),W(185,145,X7),W(289,185,X7,A0e),E.Zc=function(e,n,i){var u,f;for(u=Ie(nse,Ui,26,i,12,1),f=0;f<i;++f)u[f]=e[n+f]&255&iu;return u},W(355,185,X7,W0e),E.Zc=function(e,n,i){var u,f,g,y,x,_,C,N;for(g=0,C=0;C<i;){if(++g,f=e[n+C],(f&192)==128)throw new Pn(eI);if(!(f&128))++C;else if((f&224)==192)C+=2;else if((f&240)==224)C+=3;else if((f&248)==240)C+=4;else throw new Pn(eI);if(C>i)throw new fs(eI)}for(y=Ie(nse,Ui,26,g,12,1),N=0,x=0,_=0;_<i;){for(f=e[n+_++],f&128?(f&224)==192?(x=2,f&=31):(f&240)==224?(x=3,f&=15):(f&248)==240?(x=4,f&=7):(f&252)==248&&(x=5,f&=3):(x=1,f&=127);--x>0;){if(u=e[n+_++],(u&192)!=128)throw new Pn("Invalid UTF8 sequence at "+(n+_-1)+", byte="+(u>>>0).toString(16));f=f<<6|u&63}N+=sxe(f,y,N)}return y};var dt=te(ei,"Object",1),g3e=te(ei,"Throwable",46);te(ei,"Exception",54),te(ei,"RuntimeException",72),te(tI,"JavaScriptException",164),te(Jy,"StackTraceCreator/Collector",642),te(Jy,"StackTraceCreator/CollectorLegacy",356),te(Jy,"StackTraceCreator/CollectorModern",643),te(Jy,"StackTraceCreator/CollectorModernNoSourceMap",357),te(Xy,"IOException",181),te(Xy,"UnsupportedEncodingException",351),te(ei,"Class",288),te(ei,"ClassCastException",119),te(ei,"IllegalArgumentException",29),te(ei,"IndexOutOfBoundsException",95),te(ei,"Number",231);var z_=te(ei,"Integer",24),F_=te(ei,"String",2);te(ei,"String/1",350),te(ei,"StringIndexOutOfBoundsException",257),te(nI,"Charset",145),te(nI,"IllegalCharsetNameException",358),te(nI,"UnsupportedCharsetException",256),te(rI,"EmulatedCharset",185),te(rI,"EmulatedCharset/LatinCharset",289),te(rI,"EmulatedCharset/UtfCharset",355),W(669,1,{3:1}),te(ts,"Optional",669),W(601,669,{3:1},l),E.t=function(e){return e===this},E.v=function(){return 2040732332},E.w=function(){return"Optional.absent()"},E.A=function(e){return Nt(e),pb(),U_};var U_;te(ts,"Absent",601);var b3e=Q1(ts,"Function");W(208,1,{},g1),E.C=function(e){return YQ(e)},te(ts,"Joiner",208),W(363,208,{},yQ),E.C=function(e){return D1(this,e)},te(ts,"Joiner/1",363),W(362,1,{},BK),te(ts,"Joiner/MapJoiner",362);var v3e=Q1(ts,"Predicate"),Lre;W(244,1,{68:1,244:1,3:1},dq),E.D=function(e){var n;for(n=0;n<this.a.a.length;n++)if(!v(jQ(this.a,n),68).D(e))return!1;return!0},E.t=function(e){var n;return Ze(e,244)?(n=v(e,244),gte(this.a,n.a)):!1},E.v=function(){return mX(this.a)+306654252},E.w=function(){return"Predicates.and("+Z6((P1(),Lre),new Bh(this.a))+")"},te(ts,"Predicates/AndPredicate",244),W(246,1,{68:1,246:1,3:1},h$),E.D=function(e){try{return this.a.kb(e)}catch(n){if(n=hi(n),Ze(n,76)||Ze(n,119))return!1;throw di(n)}},E.t=function(e){var n;return Ze(e,246)?(n=v(e,246),this.a.t(n.a)):!1},E.v=function(){return this.a.v()},E.w=function(){return"Predicates.in("+this.a+")"},te(ts,"Predicates/InPredicate",246),W(245,1,{68:1,245:1,3:1},pq),E.D=function(e){return es(this.a,e)},E.t=function(e){var n;return Ze(e,245)?(n=v(e,245),es(this.a,n.a)):!1},E.v=function(){return ws(this.a)},E.w=function(){return"Predicates.equalTo("+this.a+")"},te(ts,"Predicates/IsEqualToPredicate",245),W(17,1,{3:1,23:1,17:1}),E.F=function(e){return y0e(this,v(e,17))},E.t=function(e){return this===e},E.v=function(){return Ec(this)},E.w=function(){return z1(this)},E.e=0;var En=te(ei,"Enum",17);W(136,17,em);var Ore,Rre,TI,Dre,um=Jt(ts,"Predicates/ObjectPredicate",136,En,Kye);W(591,136,em,eQ),E.D=function(e){return!0},E.w=function(){return"Predicates.alwaysTrue()"},Jt(ts,"Predicates/ObjectPredicate/1",591,um,null),W(592,136,em,tQ),E.D=function(e){return!1},E.w=function(){return"Predicates.alwaysFalse()"},Jt(ts,"Predicates/ObjectPredicate/2",592,um,null),W(593,136,em,mK),E.D=function(e){return e==null},E.w=function(){return"Predicates.isNull()"},Jt(ts,"Predicates/ObjectPredicate/3",593,um,null),W(594,136,em,NK),E.D=function(e){return e!=null},E.w=function(){return"Predicates.notNull()"},Jt(ts,"Predicates/ObjectPredicate/4",594,um,null),W(177,669,{177:1,3:1},u1),E.t=function(e){var n;return Ze(e,177)?(n=v(e,177),es(this.a,n.a)):!1},E.v=function(){return 1502476572+ws(this.a)},E.w=function(){return"Optional.of("+this.a+")"},E.A=function(e){return new u1(uk(e.B(this.a),"the Function passed to Optional.transform() must not return null."))},te(ts,"Present",177),W(108,1,Kp),E.I=function(){r0e()},te(at,"UnmodifiableIterator",108),W(651,108,E_),E.J=function(e){throw new cr},E.O=function(e){throw new cr},te(at,"UnmodifiableListIterator",651),W(378,651,E_),E.G=function(){return this.b<this.c},E.K=function(){return this.b>0},E.H=function(){if(this.b>=this.c)throw new Ra;return t$(this,this.b++)},E.L=function(){return this.b},E.M=function(){if(this.b<=0)throw new Ra;return t$(this,--this.b)},E.N=function(){return this.b-1},E.b=0,E.c=0,te(at,"AbstractIndexedListIterator",378),W(428,108,Kp),E.G=function(){return Mc(this)},E.H=function(){return Hf(this)},E.d=1,te(at,"AbstractIterator",428),W(653,1,{144:1}),E.P=function(){var e;return e=this.f,e||(this.f=this.S())},E.T=function(){return new Q2(this.P())},E.t=function(e){return AA(this,e)},E.v=function(){return this.P().v()},E.V=function(){return this.Y()==0},E.W=function(){return Zx(this)},E.w=function(){return this.P().w()},te(at,"AbstractMultimap",653),W(294,653,vv),E.Q=function(){ZA(this)},E.R=function(e){return ud(this.b,e)},E.S=function(){return new W2(this,this.b)},E.T=function(){return new AK(this,this.b)},E.$=function(){return G2e(this.Z())},E.U=function(e){return oo(this,e)},E.X=function(e){return u_(this,e)},E.Y=function(){return this.c},E.c=0,te(at,"AbstractMapBasedMultimap",294),W(600,294,vv),E.Z=function(){return new aa(this.a)},E.$=function(){return Mr(),Mr(),Pv},E.U=function(e){return v(oo(this,e),20)},E.X=function(e){return v(u_(this,e),20)},E.P=function(){var e;return e=this.f,e||(this.f=new W2(this,this.b))},E.t=function(e){return AA(this,e)},te(at,"AbstractListMultimap",600),W(388,1,kr),E.G=function(){return this.b.b||this.d.G()},E.H=function(){var e;return this.d.G()||(e=Hp(this.b),e.yb(),this.a=v(e.zb(),19),this.d=this.a.mb()),this.d.H()},E.I=function(){this.d.I(),this.a.V()&&aA(this.b),--this.c.c},te(at,"AbstractMapBasedMultimap/Itr",388),W(389,388,kr,GJ),te(at,"AbstractMapBasedMultimap/1",389),W(638,1,xd),E.Q=function(){this.bb().Q()},E._=function(e){return Jk(this,e)},E.R=function(e){return!!o7(this,e,!1)},E.ab=function(e){var n,i,u;for(i=this.bb().mb();i.G();)if(n=v(i.H(),21),u=n.zb(),ut(e)===ut(u)||e!=null&&es(e,u))return!0;return!1},E.t=function(e){return qee(this,e)},E.cb=function(e){return Ti(o7(this,e,!1))},E.v=function(){return NA(this.bb())},E.V=function(){return this.Y()==0},E.W=function(){return new hn(this)},E.db=function(e,n){throw new Hh("Put not supported on this map")},E.eb=function(e){return Ti(o7(this,e,!0))},E.Y=function(){return this.bb().Y()},E.w=function(){return Bee(this)},E.fb=function(){return new ub(this)},te(At,"AbstractMap",638),W(654,638,xd),E.bb=function(){return Cj(this)},E.W=function(){var e;return e=this.d,e||(this.d=new Q2(this))},E.fb=function(){return ZQ(this)},te(at,"Maps/ViewCachingAbstractMap",654),W(262,654,xd,W2),E.cb=function(e){return rwe(this,e)},E.eb=function(e){return Zwe(this,e)},E.Q=function(){this.a==this.b.b?ZA(this.b):ty(new Yj(this))},E.R=function(e){return dee(this.a,e)},E.hb=function(){return new gq(this)},E.gb=function(){return this.hb()},E.t=function(e){return this===e||qee(this.a,e)},E.v=function(){return NA(new zu(this.a))},E.W=function(){return Zx(this.b)},E.Y=function(){return C1(this.a)},E.w=function(){return Bee(this.a)},te(at,"AbstractMapBasedMultimap/AsMap",262),W(640,1,Qp),E.ib=function(e){return _me()},E.jb=function(e){return Na(this,e)},E.Q=function(){iy(this)},E.kb=function(e){return Jb(this,e,!1)},E.lb=function(e){return Ac(this,e)},E.V=function(){return this.Y()==0},E.nb=function(e){return Jb(this,e,!0)},E.ob=function(){return this.pb(Ie(dt,tt,1,this.Y(),4,1))},E.pb=function(e){return Wk(this,e)},E.w=function(){return Dc(this)},te(At,"AbstractCollection",640),W(641,640,Ii),E.t=function(e){return QX(this,e)},E.v=function(){return NA(this)},te(At,"AbstractSet",641),W(649,641,Ii),te(at,"Sets/ImprovedAbstractSet",649),W(655,649,Ii),E.Q=function(){this.qb().Q()},E.kb=function(e){return XX(this,e)},E.V=function(){return this.qb().V()},E.nb=function(e){var n;return this.kb(e)?(n=v(e,21),this.qb().W().nb(n.yb())):!1},E.Y=function(){return this.qb().Y()},te(at,"Maps/EntrySet",655),W(387,655,Ii,gq),E.kb=function(e){return pee(new zu(this.a.a),e)},E.mb=function(){return new Yj(this.a)},E.qb=function(){return this.a},E.nb=function(e){var n;return pee(new zu(this.a.a),e)?(n=v(e,21),Lme(this.a.b,n.yb()),!0):!1},te(at,"AbstractMapBasedMultimap/AsMap/AsMapEntries",387),W(299,1,kr,Yj),E.H=function(){var e;return e=Hp(this.b),this.a=v(e.zb(),19),ewe(this.c,e)},E.G=function(){return this.b.b},E.I=function(){aA(this.b),this.c.b.c-=this.a.Y(),this.a.Q()},te(at,"AbstractMapBasedMultimap/AsMap/AsMapIterator",299),W(260,649,Ii,Q2),E.Q=function(){this.b.Q()},E.kb=function(e){return this.b.R(e)},E.V=function(){return this.b.V()},E.mb=function(){return Wn(),Dx(this.b.bb().mb(),(L1(),Y_))},E.nb=function(e){return this.b.R(e)?(this.b.eb(e),!0):!1},E.Y=function(){return this.b.Y()},te(at,"Maps/KeySet",260),W(386,260,Ii,AK),E.Q=function(){var e;ty((e=this.b.bb().mb(),new k6(this,e)))},E.lb=function(e){return this.b.W().lb(e)},E.t=function(e){return this===e||this.b.W().t(e)},E.v=function(){return this.b.W().v()},E.mb=function(){var e;return e=this.b.bb().mb(),new k6(this,e)},E.nb=function(e){var n,i;return i=0,n=v(this.b.eb(e),19),n&&(i=n.Y(),n.Q(),this.a.c-=i),i>0},te(at,"AbstractMapBasedMultimap/KeySet",386),W(300,1,kr,k6),E.G=function(){return this.c.G()},E.H=function(){return this.a=v(this.c.H(),21),this.a.yb()},E.I=function(){var e;Ff(!!this.a),e=v(this.a.zb(),19),this.c.I(),this.b.a.c-=e.Y(),e.Q()},te(at,"AbstractMapBasedMultimap/KeySet/1",300),W(216,640,Qp,Yb),E.ib=function(e){return cwe(this,e)},E.jb=function(e){return l2e(this,e)},E.Q=function(){hme(this)},E.kb=function(e){return ao(this),this.d.kb(e)},E.lb=function(e){return ao(this),this.d.lb(e)},E.t=function(e){return Sye(this,e)},E.v=function(){return ao(this),this.d.v()},E.mb=function(){return ao(this),new gj(this)},E.nb=function(e){return Cme(this,e)},E.Y=function(){return ao(this),this.d.Y()},E.w=function(){return ao(this),za(this.d)},te(at,"AbstractMapBasedMultimap/WrappedCollection",216);var y3e=Q1(At,"List");W(297,216,kd,Sj),E.rb=function(e,n){var i;ao(this),i=this.d.V(),v(this.d,20).rb(e,n),++this.a.c,i&&V1(this)},E.sb=function(e){return ao(this),v(this.d,20).sb(e)},E.tb=function(){return ao(this),new bK(this)},E.ub=function(e){return ao(this),new oW(this,e)},E.vb=function(e){var n;return ao(this),n=v(this.d,20).vb(e),--this.a.c,ny(this),n},E.wb=function(e,n){return ao(this),v(this.d,20).wb(e,n)},E.xb=function(e,n){return ao(this),Qj(this.a,this.e,v(this.d,20).xb(e,n),this.b?this.b:this)},te(at,"AbstractMapBasedMultimap/WrappedList",297),W(385,297,C_,ZK),te(at,"AbstractMapBasedMultimap/RandomAccessWrappedList",385),W(189,1,kr,gj),E.G=function(){return rd(this),this.b.G()},E.H=function(){return rd(this),this.b.H()},E.I=function(){this.b.I(),--this.d.f.c,ny(this.d)},te(at,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",189),W(298,189,_d,bK,oW),E.J=function(e){var n;n=Z0e(this.a)==0,(rd(this),v(this.b,96)).J(e),++this.a.a.c,n&&V1(this.a)},E.K=function(){return(rd(this),v(this.b,96)).K()},E.L=function(){return(rd(this),v(this.b,96)).L()},E.M=function(){return(rd(this),v(this.b,96)).M()},E.N=function(){return(rd(this),v(this.b,96)).N()},E.O=function(e){(rd(this),v(this.b,96)).O(e)},te(at,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",298),W(295,216,Ii,tj),te(at,"AbstractMapBasedMultimap/WrappedSet",295),W(296,216,iI,nj),te(at,"AbstractMapBasedMultimap/WrappedSortedSet",296),W(668,1,yv),E.t=function(e){var n;return Ze(e,21)?(n=v(e,21),Rf(this.yb(),n.yb())&&Rf(this.zb(),n.zb())):!1},E.v=function(){var e,n;return e=this.yb(),n=this.zb(),(e==null?0:ws(e))^(n==null?0:ws(n))},E.Ab=function(e){throw new cr},E.w=function(){return this.yb()+"="+this.zb()},te(at,Qne,668),W(390,640,Qp,bq),E.Q=function(){ZA(this.a)},E.kb=function(e){return t2e(this.a,e)},E.mb=function(){return new GJ(this.a)},E.Y=function(){return this.a.c},te(at,"AbstractMultimap/Values",390),W(656,640,aI),E.ib=function(e){return this.Bb(e,1),!0},E.Bb=function(e,n){throw new cr},E.jb=function(e){return Lxe(this,e)},E.Q=function(){ty(this.Eb())},E.kb=function(e){return this.Cb(e)>0},E.Cb=function(e){var n,i;for(i=id(this).mb();i.G();)if(n=v(i.H(),83),Rf(n.Zb(),e))return n.Yb();return 0},E.gb=function(){return new vq(this)},E.bb=function(){return id(this)},E.t=function(e){return kke(this,e)},E.v=function(){return id(this).v()},E.V=function(){return id(this).V()},E.mb=function(){return Gh(),new m$(this,id(this).mb())},E.nb=function(e){return this.Fb(e,1)>0},E.Fb=function(e,n){throw new cr},E.Gb=function(e,n){var i,u;return Gh(),ji(n,"count"),i=this.Cb(e),u=n-i,u>0?this.Bb(e,u):u<0&&this.Fb(e,-u),i},E.Hb=function(e,n,i){return i2e(this,e,n,i)},E.Y=function(){return Hwe(this)},E.w=function(){return za(id(this))},te(at,"AbstractMultiset",656),W(657,649,Ii),E.Q=function(){this.Ib().Q()},E.kb=function(e){var n,i;return Ze(e,83)?(i=v(e,83),i.Yb()<=0?!1:(n=this.Ib().Cb(i.Zb()),n==i.Yb())):!1},E.nb=function(e){var n,i,u,f;return Ze(e,83)&&(i=v(e,83),n=i.Zb(),u=i.Yb(),u!=0)?(f=this.Ib(),f.Hb(n,u,0)):!1},te(at,"Multisets/EntrySet",657),W(396,657,Ii,vq),E.mb=function(){return this.a.Eb()},E.Ib=function(){return this.a},E.Y=function(){return this.a.Db()},te(at,"AbstractMultiset/EntrySet",396),W(384,294,vv),E.Z=function(){return new K2(Nk(this.a))},E.$=function(){return eo(),ad(),ig},E.U=function(e){return v(oo(this,e),18)},E.X=function(e){return v(u_(this,e),18)},E.P=function(){var e;return e=this.f,e||(this.f=new W2(this,this.b))},E.t=function(e){return AA(this,e)},te(at,"AbstractSetMultimap",384),W(342,656,aI),te(at,"AbstractSortedMultiset",342),W(280,600,vv,Lx),E.a=0,te(at,"ArrayListMultimap",280),W(159,17,oI);var cm,Eo,MI=Jt(at,"BoundType",159,En,cye);W(623,159,oI,eK),Jt(at,"BoundType/1",623,MI,null),W(624,159,oI,fK),Jt(at,"BoundType/2",624,MI,null);var jI;W(234,1,Bc),E.w=function(){return kme(this.c.mb())},te(at,"FluentIterable",234),W(170,234,Bc,Wh),E.mb=function(){return Vt(this)},te(at,"FluentIterable/2",170),W(664,1,{}),E.w=function(){return za(ro(this.a.d).b)},te(at,"ForwardingObject",664),W(665,664,Qp),E.ib=function(e){return ro(this.a.d),pZ()},E.jb=function(e){return ro(this.a.d),gZ()},E.Q=function(){ro(this.a.d),bZ()},E.kb=function(e){return j6(ro(this.a.d),e)},E.lb=function(e){return j$(ro(this.a.d),e)},E.V=function(){return ro(this.a.d).b.V()},E.mb=function(){var e;return e=ro(this.a.d).b.mb(),new $M(e)},E.nb=function(e){return ro(this.a.d),vZ()},E.Y=function(){return ro(this.a.d).b.Y()},E.ob=function(){return lW(ro(this.a.d))},E.pb=function(e){return zj(ro(this.a.d),e)},te(at,"ForwardingCollection",665),W(660,640,uI),E.mb=function(){return this.Kb()},E.ib=function(e){return Xve()},E.jb=function(e){return e0e()},E.Q=function(){t0e()},E.kb=function(e){return e!=null&&Jb(this,e,!1)},E.Jb=function(){switch(this.Y()){case 0:return Mr(),Mr(),Pv;case 1:return Mr(),new Vu(this.Kb().H());default:return new zQ(this,this.ob())}},E.nb=function(e){return n0e()},te(at,"ImmutableCollection",660),W(316,660,uI,l6),E.mb=function(){return Gp(this.a.mb())},E.kb=function(e){return e!=null&&this.a.kb(e)},E.lb=function(e){return this.a.lb(e)},E.V=function(){return this.a.V()},E.Kb=function(){return Gp(this.a.mb())},E.Y=function(){return this.a.Y()},E.ob=function(){return this.a.ob()},E.pb=function(e){return this.a.pb(e)},E.w=function(){return za(this.a)},te(at,"ForwardingImmutableCollection",316),W(87,660,Ed),E.mb=function(){return this.Kb()},E.tb=function(){return this.Lb(0)},E.ub=function(e){return this.Lb(e)},E.xb=function(e,n){return this.Mb(e,n)},E.rb=function(e,n){throw new cr},E.t=function(e){return Nke(this,e)},E.v=function(){return Lwe(this)},E.Kb=function(){return this.Lb(0)},E.Lb=function(e){return $6(this,e)},E.vb=function(e){throw new cr},E.wb=function(e,n){throw new cr},E.Mb=function(e,n){var i;return Cy((i=new _$(this),new lk(i,e,n)))};var Pv;te(at,"ImmutableList",87),W(667,87,Ed),E.mb=function(){return Gp(this.Nb().mb())},E.xb=function(e,n){return Cy(this.Nb().xb(e,n))},E.kb=function(e){return rQ(this,e)},E.lb=function(e){return this.Nb().lb(e)},E.t=function(e){return this.Nb().t(e)},E.sb=function(e){return K$(this,e)},E.v=function(){return this.Nb().v()},E.V=function(){return this.Nb().V()},E.Kb=function(){return Gp(this.Nb().mb())},E.Y=function(){return this.Nb().Y()},E.Mb=function(e,n){return Cy(this.Nb().xb(e,n))},E.ob=function(){return this.Nb().pb(Ie(dt,tt,1,this.Nb().Y(),4,1))},E.pb=function(e){return this.Nb().pb(e)},E.w=function(){return za(this.Nb())},te(at,"ForwardingImmutableList",667),W(524,1,Cd),E.bb=function(){return Pl(this)},E.W=function(){return BQ(this)},E.fb=function(){return this.Rb()},E.Q=function(){throw new cr},E.R=function(e){return this.cb(e)!=null},E.ab=function(e){return this.Rb().kb(e)},E.Pb=function(){return new kZ(this)},E.Qb=function(){return new _Z(this)},E.t=function(e){return r2e(this,e)},E.v=function(){return Pl(this).v()},E.V=function(){return this.Y()==0},E.db=function(e,n){return i0e()},E.eb=function(e){throw new cr},E.w=function(){var e;return Wn(),e=Lp(awe(this.Y()),123),f2e(Gre,e,Pl(this).mb()),e.a+="}",e.a},E.Rb=function(){return this.g?this.g:this.g=this.Qb()},E.e=null,E.f=null,E.g=null,te(at,"ImmutableMap",524),W(320,524,Cd),E.R=function(e){return dee(this.d,e)},E.ab=function(e){return M$(this.d,e)},E.Ob=function(){return DA(new yq(this))},E.Pb=function(){return DA(eW(this.d))},E.Qb=function(){return eo(),new l6(nW(this.d))},E.t=function(e){return c$(this.d,e)},E.cb=function(e){return e==null?null:ev(this.d,e)},E.v=function(){return this.d.c.v()},E.V=function(){return this.d.c.V()},E.Y=function(){return this.d.c.Y()},E.w=function(){return za(this.d.c)},te(at,"ForwardingImmutableMap",320),W(666,665,Ii),E.t=function(e){return e===this||u$(ro(this.a.d),e)},E.v=function(){return ro(this.a.d).b.v()},te(at,"ForwardingSet",666),W(523,666,Ii,yq),E.kb=function(e){if(Ze(e,21)&&v(e,21).yb()==null)return!1;try{return j6(ro(this.a.d),e)}catch(n){if(n=hi(n),Ze(n,119))return!1;throw di(n)}},E.pb=function(e){var n;return n=zj(ro(this.a.d),e),ro(this.a.d).b.Y()<n.length&&yo(n,ro(this.a.d).b.Y(),null),n},te(at,"ForwardingImmutableMap/1",523),W(663,660,Pd),E.mb=function(){return this.Kb()},E.t=function(e){return Xee(this,e)},E.v=function(){return Cwe(this)},te(at,"ImmutableSet",663),W(315,663,Pd),E.mb=function(){return Gp(new gp(this.a.b.mb()))},E.kb=function(e){return e!=null&&F0e(this.a,e)},E.lb=function(e){return U0e(this.a,e)},E.v=function(){return this.a.b.v()},E.V=function(){return this.a.b.V()},E.Kb=function(){return Gp(new gp(this.a.b.mb()))},E.Y=function(){return this.a.b.Y()},E.ob=function(){return this.a.b.ob()},E.pb=function(e){return Y0e(this.a,e)},E.w=function(){return za(this.a.b)},te(at,"ForwardingImmutableSet",315),W(178,1,{178:1,3:1},Uy),E.t=function(e){var n;return Ze(e,178)?(n=v(e,178),this.a.t(n.a)&&this.b==n.b&&this.c==n.c&&this.d==n.d&&this.f==n.f&&Rf(this.e,n.e)&&Rf(this.g,n.g)):!1},E.v=function(){return Ik(be(ve(dt,1),tt,1,4,[this.a,this.e,this.d,this.g,this.f]))},E.w=function(){return Lp(_c(Lp(_c(Lp(Ro(_c(new kp,this.a),":"),this.d==(Ko(),cm)?91:40),this.b?this.e:"-∞"),44),this.c?this.g:"∞"),this.f==cm?93:41).a},E.b=!1,E.c=!1,te(at,"GeneralRange",178),W(215,384,vv,kb),E.a=2,te(at,"HashMultimap",215),W(661,87,Ed),E.kb=function(e){return this.Sb().kb(e)},E.V=function(){return this.Sb().V()},E.Y=function(){return this.Sb().Y()},te(at,"ImmutableAsList",661),W(275,320,Cd),E.Rb=function(){return this.Ub()},E.fb=function(){return this.Ub()},E.Ub=function(){return BQ(this.Tb())},te(at,"ImmutableBiMap",275),W(341,668,{3:1,21:1},_6),E.yb=function(){return this.a},E.zb=function(){return this.b},E.Ab=function(e){throw new cr},te(at,"ImmutableEntry",341),W(436,315,Pd,MZ),te(at,"ImmutableEnumSet",436),W(379,378,E_,qQ),te(at,"ImmutableList/1",379),W(266,108,Kp,M2),E.G=function(){return this.a.G()},E.H=function(){return v(this.a.H(),21).yb()},te(at,"ImmutableMap/1",266),W(670,663,Pd),E.mb=function(){var e;return e=Pl(this.a).Kb(),new M2(e)},E.Jb=function(){return new c6(this)},E.Kb=function(){var e;return(e=this.c,e||(this.c=new c6(this))).Kb()},te(at,"ImmutableSet/Indexed",670),W(606,670,Pd,kZ),E.mb=function(){var e;return e=Pl(this.a).Kb(),new M2(e)},E.kb=function(e){return this.a.R(e)},E.Kb=function(){var e;return e=Pl(this.a).Kb(),new M2(e)},E.Y=function(){return this.a.Y()},te(at,"ImmutableMapKeySet",606),W(604,660,uI,_Z),E.mb=function(){return new zx(this)},E.kb=function(e){return e!=null&&(ar(),ar(),wX(new zx(this),(P1(),e==null?(Dj(),TI):new pq(e)))!=-1)},E.Jb=function(){var e;return e=DQ(Pl(this.a)),new kK(this,e)},E.Kb=function(){return new zx(this)},E.Y=function(){return this.a.Y()},te(at,"ImmutableMapValues",604),W(282,108,Kp,zx),E.G=function(){return this.a.G()},E.H=function(){return v(this.a.H(),21).zb()},te(at,"ImmutableMapValues/1",282),W(605,661,Ed,kK),E.Sb=function(){return this.a},E.sb=function(e){return v(this.b.sb(e),21).zb()},te(at,"ImmutableMapValues/2",605),W(311,661,Ed,c6),E.Sb=function(){return this.a},E.sb=function(e){return eye(this.a,e)},te(at,"ImmutableSet/Indexed/1",311),W(414,234,Bc,uK),E.mb=function(){return ej(this.a)},E.w=function(){return Dc(this.a)+" (cycled)"},te(at,"Iterables/1",414),W(105,1,Yi,w),E.B=function(e){return v(e,22).mb()},te(at,"Iterables/12",105),W(415,234,Bc,_Q),E.mb=function(){return jp(this)},te(at,"Iterables/4",415),W(416,234,Bc,EQ),E.mb=function(){return ds(this)},te(at,"Iterables/5",416);var Bre,AI;W(424,651,E_,k),E.G=function(){return!1},E.K=function(){return!1},E.H=function(){throw new Ra},E.L=function(){return 0},E.M=function(){throw new Ra},E.N=function(){return-1},te(at,"Iterators/1",424),W(264,108,Kp,j2),E.G=function(){return!this.a},E.H=function(){if(this.a)throw new Ra;return this.a=!0,this.b},E.a=!1,te(at,"Iterators/11",264),W(425,1,kr,P),E.G=function(){return!1},E.H=function(){throw new Ra},E.I=function(){Ff(!1)},te(at,"Iterators/2",425),W(426,108,Kp,mq),E.G=function(){return this.a.G()},E.H=function(){return this.a.H()},te(at,"Iterators/3",426),W(427,1,kr,iQ),E.G=function(){return this.a.G()||this.b.mb().G()},E.H=function(){return dA(this)},E.I=function(){this.a.I()},te(at,"Iterators/4",427),W(429,428,Kp,p$),te(at,"Iterators/6",429),W(261,1,kr),E.G=function(){return this.b.G()},E.H=function(){return L$(this)},E.I=function(){this.b.I()},te(at,"TransformedIterator",261),W(430,261,kr,MK),E.Vb=function(e){return QZ(this,e)},te(at,"Iterators/7",430),W(313,1,kr),E.G=function(){return Ft(this)},E.H=function(){return Ot(this)},E.I=function(){Ff(!!this.c),this.c.I(),this.c=null},te(at,"MultitransformedIterator",313),W(90,313,{90:1,35:1},hs),E.Wb=function(e){return v(e,35)},te(at,"Iterators/ConcatenatedIterator",90),W(314,313,kr,h6),E.Wb=function(e){return Ewe(v(e,35))},te(at,"Iterators/ConcatenatedIterator/1",314),W(329,653,vv,I6),E.U=function(e){return new J2(this,e)},E.X=function(e){return Wj(this,e)},E.Q=function(){jj(this)},E.R=function(e){return C6(this,e)},E.S=function(){return new A6(this)},E.T=function(){return new wq(this)},E.V=function(){return!this.a},E.Y=function(){return this.d},E.c=0,E.d=0,te(at,"LinkedListMultimap",329),W(647,640,kd),E.rb=function(e,n){throw new Hh("Add not supported on this list")},E.ib=function(e){return this.rb(this.Y(),e),!0},E.Q=function(){this.Xb(0,this.Y())},E.t=function(e){return gte(this,e)},E.v=function(){return mX(this)},E.mb=function(){return new Bh(this)},E.tb=function(){return this.ub(0)},E.ub=function(e){return new jn(this,e)},E.vb=function(e){throw new Hh("Remove not supported on this list")},E.Xb=function(e,n){var i,u;for(u=this.ub(e),i=e;i<n;++i)u.H(),u.I()},E.wb=function(e,n){throw new Hh("Set not supported on this list")},E.xb=function(e,n){return new lk(this,e,n)},E.d=0,te(At,"AbstractList",647),W(648,647,kd),E.rb=function(e,n){G1(this,e,n)},E.sb=function(e){return Up(this,e)},E.mb=function(){return this.ub(0)},E.vb=function(e){return WA(this,e)},E.wb=function(e,n){var i,u;i=this.ub(e);try{return u=i.H(),i.O(n),u}catch(f){throw f=hi(f),Ze(f,74)?new fs("Can't set element "+e):di(f)}},te(At,"AbstractSequentialList",648),W(276,648,kd,J2),E.ub=function(e){return K6(this,e)},E.Y=function(){var e;return e=v(pn(this.a.b,this.b),126),e?e.a:0},te(at,"LinkedListMultimap/1",276),W(330,648,kd,HM),E.ub=function(e){return new Aee(this.a,e)},E.Y=function(){return this.a.d},te(at,"LinkedListMultimap/1EntriesImpl",330),W(563,649,Ii,wq),E.kb=function(e){return C6(this.a,e)},E.mb=function(){return new HJ(this.a)},E.nb=function(e){return!Wj(this.a,e).a.V()},E.Y=function(){return C1(this.a.b)},te(at,"LinkedListMultimap/1KeySetImpl",563),W(562,1,kr,HJ),E.G=function(){return oj(this),!!this.c},E.H=function(){oj(this),A1(this.c),this.a=this.c,Rn(this.d,this.a.a);do this.c=this.c.b;while(this.c&&!Rn(this.d,this.c.a));return this.a.a},E.I=function(){oj(this),Ff(!!this.a),ty(new yk(this.e,this.a.a)),this.a=null,this.b=this.e.c},E.b=0,te(at,"LinkedListMultimap/DistinctKeyIterator",562),W(126,1,{126:1},Hj),E.a=0,te(at,"LinkedListMultimap/KeyList",126),W(560,668,yv,g$),E.yb=function(){return this.a},E.zb=function(){return this.f},E.Ab=function(e){var n;return n=this.f,this.f=e,n},te(at,"LinkedListMultimap/Node",560),W(561,1,_d,Aee),E.J=function(e){v(e,21),a0e()},E.H=function(){return jW(this)},E.M=function(){return AW(this)},E.O=function(e){v(e,21),o0e()},E.G=function(){return F1(this),!!this.c},E.K=function(){return F1(this),!!this.e},E.L=function(){return this.d},E.N=function(){return this.d-1},E.I=function(){F1(this),Ff(!!this.a),this.a!=this.c?(this.e=this.a.d,--this.d):this.c=this.a.b,ste(this.f,this.a),this.a=null,this.b=this.f.c},E.b=0,E.d=0,te(at,"LinkedListMultimap/NodeIterator",561),W(241,1,_d,yk,nte),E.J=function(e){this.e=b_(this.f,this.b,e,this.c),++this.d,this.a=null},E.G=function(){return!!this.c},E.K=function(){return!!this.e},E.H=function(){return ck(this)},E.L=function(){return this.d},E.M=function(){return _W(this)},E.N=function(){return this.d-1},E.I=function(){Ff(!!this.a),this.a!=this.c?(this.e=this.a.e,--this.d):this.c=this.a.c,ste(this.f,this.a),this.a=null},E.O=function(e){j1(!!this.a),this.a.f=e},E.d=0,te(at,"LinkedListMultimap/ValueForKeyIterator",241),W(419,647,kd),E.rb=function(e,n){this.a.rb(e,n)},E.kb=function(e){return this.a.kb(e)},E.sb=function(e){return this.a.sb(e)},E.vb=function(e){return this.a.vb(e)},E.wb=function(e,n){return this.a.wb(e,n)},E.Y=function(){return this.a.Y()},te(at,"Lists/AbstractListWrapper",419),W(420,419,C_),te(at,"Lists/RandomAccessListWrapper",420),W(422,420,C_,_$),E.ub=function(e){return this.a.ub(e)},te(at,"Lists/1",422),W(88,647,{88:1,22:1,19:1,20:1},_p),E.rb=function(e,n){this.a.rb(nd(this,e),n)},E.Q=function(){this.a.Q()},E.sb=function(e){return this.a.sb(Mj(this,e))},E.mb=function(){return SW(this,0)},E.ub=function(e){return SW(this,e)},E.vb=function(e){return this.a.vb(Mj(this,e))},E.Xb=function(e,n){(vW(e,n,this.a.Y()),Pk(this.a.xb(nd(this,n),nd(this,e)))).Q()},E.wb=function(e,n){return this.a.wb(Mj(this,e),n)},E.Y=function(){return this.a.Y()},E.xb=function(e,n){return vW(e,n,this.a.Y()),Pk(this.a.xb(nd(this,n),nd(this,e)))},te(at,"Lists/ReverseList",88),W(220,88,{88:1,22:1,19:1,20:1,63:1},gb),te(at,"Lists/RandomAccessReverseList",220),W(421,1,_d,y$),E.J=function(e){this.c.J(e),this.c.M(),this.a=!1},E.G=function(){return this.c.K()},E.K=function(){return this.c.G()},E.H=function(){if(!this.c.K())throw new Ra;return this.a=!0,this.c.M()},E.L=function(){return nd(this.b,this.c.L())},E.M=function(){if(!this.c.G())throw new Ra;return this.a=!0,this.c.H()},E.N=function(){return nd(this.b,this.c.L())-1},E.I=function(){Ff(this.a),this.c.I(),this.a=!1},E.O=function(e){j1(this.a),this.c.O(e)},E.a=!1,te(at,"Lists/ReverseList/1",421);var Gre;W(376,261,kr,jK),E.Vb=function(e){return Wn(),new _6(e,Q$(this.a,e))},te(at,"Maps/1",376),W(188,17,lI);var Y_,II,LI=Jt(at,"Maps/EntryFunction",188,En,uye);W(374,188,lI,I$),E.B=function(e){return v(e,21).yb()},Jt(at,"Maps/EntryFunction/1",374,LI,null),W(375,188,lI,oK),E.B=function(e){return v(e,21).zb()},Jt(at,"Maps/EntryFunction/2",375,LI,null),W(373,640,Qp,E$),E.Q=function(){this.a.Q()},E.kb=function(e){return this.a.ab(e)},E.V=function(){return this.a.V()},E.mb=function(){return KQ(this)},E.nb=function(e){var n,i;try{return Jb(this,e,!0)}catch(u){if(u=hi(u),Ze(u,45)){for(i=this.a.bb().mb();i.G();)if(n=v(i.H(),21),Rf(e,n.zb()))return this.a.eb(n.yb()),!0;return!1}else throw di(u)}},E.Y=function(){return this.a.Y()},te(at,"Maps/Values",373),W(301,654,xd,A6),E.cb=function(e){return this.a.R(e)?this.a.U(e):null},E.eb=function(e){return this.a.R(e)?this.a.X(e):null},E.Q=function(){this.a.Q()},E.R=function(e){return this.a.R(e)},E.hb=function(){return new xq(this)},E.gb=function(){return this.hb()},E.V=function(){return this.a.V()},E.W=function(){return this.a.W()},E.Y=function(){return this.a.W().Y()},te(at,"Multimaps/AsMap",301),W(393,655,Ii,xq),E.mb=function(){return A1e(this.a.a.W(),new kq(this))},E.qb=function(){return this.a},E.nb=function(e){var n;return XX(this,e)?(n=v(e,21),f0e(this.a,n.yb()),!0):!1},te(at,"Multimaps/AsMap/EntrySet",393),W(395,1,Yi,kq),E.B=function(e){return Q$(this,e)},te(at,"Multimaps/AsMap/EntrySet/1",395),W(391,656,aI,_q),E.Q=function(){jj(this.a)},E.kb=function(e){return C6(this.a,e)},E.Cb=function(e){var n;return n=v(ev(Lf(this.a),e),19),n?n.Y():0},E.gb=function(){return new Cq(this)},E.Db=function(){return Lf(this.a).Y()},E.Eb=function(){return new d6(Cj(Lf(this.a)).mb())},E.mb=function(){return UQ(this)},E.Fb=function(e,n){var i,u,f,g,y;if(ji(n,fI),n==0)return y=v(ev(Lf(this.a),e),19),y?y.Y():0;if(g=v(ev(Lf(this.a),e),19),!g)return 0;if(f=g.Y(),n>=f)g.Q();else for(u=g.mb(),i=0;i<n;i++)u.H(),u.I();return f},te(at,"Multimaps/Keys",391),W(302,261,kr,d6),E.Vb=function(e){return new Eq(v(e,21))},te(at,"Multimaps/Keys/1",302),W(658,1,{83:1}),E.t=function(e){var n;return Ze(e,83)?(n=v(e,83),this.Yb()==n.Yb()&&Rf(this.Zb(),n.Zb())):!1},E.v=function(){var e;return e=this.Zb(),(e==null?0:ws(e))^this.Yb()},E.w=function(){return FW(this)},te(at,"Multisets/AbstractEntry",658),W(394,658,{83:1},Eq),E.Yb=function(){return v(this.a.zb(),19).Y()},E.Zb=function(){return this.a.yb()},te(at,"Multimaps/Keys/1/1",394),W(392,657,Ii,Cq),E.kb=function(e){var n,i;return Ze(e,83)?(i=v(e,83),n=v(Lf(this.a.a).cb(i.Zb()),19),!!n&&n.Y()==i.Yb()):!1},E.V=function(){return!this.a.a.a},E.mb=function(){return new d6(Cj(Lf(this.a.a)).mb())},E.Ib=function(){return this.a},E.nb=function(e){var n,i;return Ze(e,83)&&(i=v(e,83),n=v(Lf(this.a.a).cb(i.Zb()),19),n&&n.Y()==i.Yb())?(n.Q(),!0):!1},E.Y=function(){return Lf(this.a.a).Y()},te(at,"Multimaps/Keys/KeysEntrySet",392),W(659,1,Zr),te(at,"Ordering",659),W(398,659,Zr,p),E.$b=function(e,n){return g1e(v(e,83),v(n,83))},te(at,"Multisets/1",398),W(397,658,{83:1,3:1},CQ),E.Yb=function(){return this.a},E.Zb=function(){return this.b},E.a=0,te(at,"Multisets/ImmutableEntry",397),W(303,1,kr,m$),E.G=function(){return this.d>0||this.c.G()},E.H=function(){if(!(this.d>0||this.c.G()))throw new Ra;return this.d==0&&(this.b=v(this.c.H(),83),this.f=this.d=this.b.Yb()),--this.d,this.a=!0,this.b.Zb()},E.I=function(){Ff(this.a),this.f==1?this.c.I():this.e.Fb(this.b.Zb(),1)>0,--this.f,this.a=!1},E.a=!1,E.d=0,E.f=0,te(at,"Multisets/MultisetIteratorImpl",303),W(622,659,{3:1,56:1},b),E.$b=function(e,n){return C1e(v(e,23),v(n,23))},E.w=function(){return"Ordering.natural()"};var Hre;te(at,"NaturalOrdering",622),W(343,661,Ed,zQ),E.ub=function(e){return $6(this.b,e)},E.Sb=function(){return this.a},E.sb=function(e){return K$(this.b,e)},E.Lb=function(e){return $6(this.b,e)},te(at,"RegularImmutableAsList",343),W(559,275,Cd,WQ),E.Tb=function(){return this.a};var zre;te(at,"RegularImmutableBiMap",559),W(53,667,Ed,yr),E.Nb=function(){return this.a},te(at,"RegularImmutableList",53),W(321,320,Cd,p6),te(at,"RegularImmutableMap",321),W(265,315,Pd,lx);var ig;te(at,"RegularImmutableSet",265),W(650,641,Ii),te(at,"Sets/SetView",650),W(377,650,Ii,sQ),E.kb=function(e){return vl(this.b,e)&&vl(this.c,e)},E.lb=function(e){return Ac(this.b,e)&&Ac(this.c,e)},E.V=function(){return _k(this)},E.mb=function(){var e;return If((e=new hn(this.b.a).a.bb().mb(),new yn(e)),this.a)},E.Y=function(){var e;return gk(If((e=new hn(this.b.a).a.bb().mb(),new yn(e)),this.a))},te(at,"Sets/2",377),W(328,275,Cd,TW,vJ),E.fb=function(){return eo(),new xc(this.c)},E.Tb=function(){var e;return e=this.a,e||(this.a=new vJ(this.c,this.b,this))},E.Ub=function(){return eo(),new xc(this.c)},te(at,"SingletonImmutableBiMap",328),W(127,667,Ed,Vu),E.Nb=function(){return this.a},te(at,"SingletonImmutableList",127),W(135,663,Pd,xc),E.mb=function(){return ar(),new j2(this.a)},E.kb=function(e){return es(this.a,e)},E.Kb=function(){return ar(),new j2(this.a)},E.Y=function(){return 1},te(at,"SingletonImmutableSet",135),W(285,342,{207:1,3:1,22:1,19:1},Zj,hee),E.Bb=function(e,n){return Yy(this,e,n)},E.Cb=function(e){return Gy(this,e)},E.Db=function(){return cd(jA(this,(O1(),OI)))},E.Eb=function(){return new IK(this)},E.Fb=function(e,n){return k7(this,e,n)},E.Gb=function(e,n){return Oee(this,e,n)},E.Hb=function(e,n,i){var u,f,g;return ji(i,"newCount"),ji(n,"oldCount"),Qh(Ib(this.b,e)),g=this.c.a,g?(f=Ie(pr,hr,26,1,12,1),u=H7(g,this.d,e,n,i,f),X1(this.c,g,u),f[0]==n):n==0?(i>0&&Yy(this,e,i),!0):!1},E.Y=function(){return cd(jA(this,(O1(),V_)))},te(at,"TreeMultiset",285),W(619,658,{83:1},w$),E.Yb=function(){var e;return e=this.b.c,e==0?Gy(this.a,this.b.b):e},E.Zb=function(){return this.b.b},te(at,"TreeMultiset/1",619),W(620,1,kr,IK),E.H=function(){return n2e(this)},E.G=function(){return hX(this)},E.I=function(){Ff(!!this.b),Oee(this.c,this.b.b.b,0),this.b=null},te(at,"TreeMultiset/2",620),W(205,17,hI);var OI,V_,RI=Jt(at,"TreeMultiset/Aggregate",205,En,lye);W(617,205,hI,tK),E._b=function(e){return e.c},E.ac=function(e){return e?e.j:0},Jt(at,"TreeMultiset/Aggregate/1",617,RI,null),W(618,205,hI,SK),E._b=function(e){return 1},E.ac=function(e){return e?e.a:0},Jt(at,"TreeMultiset/Aggregate/2",618,RI,null),W(206,658,{83:1,206:1},_y),E.Yb=function(){return this.c},E.Zb=function(){return this.b},E.w=function(){return Gh(),FW(new CQ(this.b,this.c))},E.a=0,E.c=0,E.d=0,E.j=0,te(at,"TreeMultiset/AvlNode",206),W(616,1,{},m),te(at,"TreeMultiset/Reference",616);var m3e=te(tI,"JavaScriptObject$",0),DI;W(628,1,{}),te(tI,"Scheduler",628);var lm=0,Fre=0,fm=-1;W(360,628,{},d);var BI;te(Jy,"SchedulerImpl",360),W(646,1,{}),E.hc=function(){return null},E.ic=function(){return null},E.jc=function(){return null},E.kc=function(){return null},E.lc=function(){return null},te(Zf,"JSONValue",646),W(214,646,{214:1},QM,Pq),E.t=function(e){return Ze(e,214)?this.a==v(e,214).a:!1},E.gc=function(){return Yve},E.v=function(){return Ec(this.a)},E.hc=function(){return this},E.w=function(){var e,n,i;for(i=new xp("["),n=0,e=this.a.length;n<e;n++)n>0&&(i.a+=","),_c(i,Tc(this,n));return i.a+="]",i.a},te(Zf,"JSONArray",214),W(292,646,{},zM),E.gc=function(){return Vve},E.ic=function(){return this},E.w=function(){return CK(this.a)},E.a=!1;var Ure,Yre;te(Zf,"JSONBoolean",292),W(371,72,xu,jZ),te(Zf,"JSONException",371),W(435,646,{},S),E.gc=function(){return Qve},E.w=function(){return ku};var Vre;te(Zf,"JSONNull",435),W(104,646,{104:1},A2),E.t=function(e){return Ze(e,104)?this.a==v(e,104).a:!1},E.gc=function(){return qve},E.v=function(){return vr(Re(this.a))},E.jc=function(){return this},E.w=function(){return this.a+""},E.a=0,te(Zf,"JSONNumber",104),W(69,646,{69:1},Ef,I2),E.t=function(e){return Ze(e,69)?this.a==v(e,69).a:!1},E.gc=function(){return Zve},E.v=function(){return Ec(this.a)},E.kc=function(){return this},E.w=function(){var e,n,i,u,f,g;for(g=new xp("{"),e=!0,f=QJ(this,Ie(F_,qr,2,0,5,1)),i=0,u=f.length;i<u;++i)n=f[i],e?e=!1:g.a+=", ",Ro(g,bte(n)),g.a+=":",_c(g,Qn(this,n));return g.a+="}",g.a},te(Zf,"JSONObject",69),W(361,641,Ii,k$),E.kb=function(e){return Qo(e)&&C0e(this.a,td(e))},E.mb=function(){return new Bh(new Oo(this.b))},E.Y=function(){return this.b.length},te(Zf,"JSONObject/1",361);var q_;W(97,646,{97:1},Cl),E.t=function(e){return Ze(e,97)?ls(this.a,v(e,97).a):!1},E.gc=function(){return $ve},E.v=function(){return Kk(this.a)},E.lc=function(){return this},E.w=function(){return bte(this.a)},te(Zf,"JSONString",97);var qre,Zre,GI;W(186,1,{},U1,ij),E.b=!1,E.c=0,E.d=-1,E.e=0,E.f=!1,E.j=0,te("de.cau.cs.kieler.core.alg","BasicProgressMonitor",186),W(10,1,{10:1,286:1,3:1,5:1},oi,Sl,kt,lr),E.t=function(e){return KJ(this,e)},E.v=function(){return vr(Re(this.a))+gxe(vr(Re(this.b)))},E.w=function(){return"("+this.a+","+this.b+")"},E.a=0,E.b=0;var rn=te(ere,"KVector",10);W(58,648,{3:1,5:1,22:1,19:1,58:1,20:1},fi),E.ib=function(e){return _n(this,e)},E.Q=function(){vu(this)},E.ub=function(e){return xn(this,e)},E.Y=function(){return this.b},E.b=0,te(At,"LinkedList",58),W(44,58,{44:1,286:1,3:1,5:1,22:1,19:1,58:1,20:1},Xi,Ix),E.w=function(){var e,n,i;for(e=new xp("("),n=xn(this,0);n.b!=n.d.c;)i=v(fn(n),10),Ro(e,i.a+","+i.b),n.b!=n.d.c&&(e.a+="; ");return e.a+=")",e.a},te(ere,"KVectorChain",44);var Jf=Q1(tm,"IProperty");W(131,1,{179:1,131:1,3:1},M),te(tm,"MapPropertyHolder",131),W(14,1,tre,J1,W1,br,vt,Df,fy),E.F=function(e){return o1e(this,v(e,79))},E.t=function(e){return Oj(this,e)},E.mc=function(){return this.b},E.nc=function(){return this.c},E.oc=function(){return this.d},E.v=function(){return Kk(this.b)},E.w=function(){return this.b};var $re,Kre;te(tm,"Property",14),W(366,1,{23:1},L),E.F=function(e){return-1},te(tm,"Property/1",366),W(367,1,{23:1},T),E.F=function(e){return 1},te(tm,"Property/2",367),W(27,1,{27:1,22:1},Ar),E.t=function(e){var n,i,u;return Ze(e,27)?(i=v(e,27),n=this.a==null?i.a==null:es(this.a,i.a),u=this.b==null?i.b==null:es(this.b,i.b),n&&u):!1},E.v=function(){var e,n,i,u,f,g;return i=this.a==null?0:ws(this.a),e=i&iu,n=i&-65536,g=this.b==null?0:ws(this.b),u=g&iu,f=g&-65536,e^f>>16&iu|n^u<<16},E.mb=function(){return new Sq(this)},E.w=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+za(this.b)+")":this.b==null?"pair("+za(this.a)+",null)":"pair("+za(this.a)+","+za(this.b)+")"},te(nre,"Pair",27),W(431,1,kr,Sq),E.G=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},E.H=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw new Ra},E.I=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),new db},E.b=!1,E.c=!1,te(nre,"Pair/1",431),W(228,72,xu,p1),te(rre,"UnsupportedConfigurationException",228),W(99,72,xu,$o),te(rre,"UnsupportedGraphException",99);var HI;W(103,17,{103:1,3:1,23:1,17:1},Ep);var Z_,hm,dm,pm,gm,bm,Qre=Jt(Eu,"Alignment",103,En,yme),Wre;W(59,17,{59:1,3:1,23:1,17:1},mb);var ou,uo,ya,rs,Su,Sv=Jt(Eu,"Direction",59,En,Jye),Jre;W(107,17,{107:1,3:1,23:1,17:1},w1);var Nv,Wl,Sd,$_,Xre=Jt(Eu,"EdgeLabelPlacement",107,En,Vye),eie;W(122,17,{122:1,3:1,23:1,17:1},x1);var Xf,zI,K_,Q_,tie=Jt(Eu,"EdgeRouting",122,En,qye),nie;W(133,17,{133:1,3:1,23:1,17:1},Cp);var FI,UI,YI,VI,W_,qI,rie=Jt(Eu,"EdgeType",133,En,mme),iie;W(166,17,{166:1,3:1,23:1,17:1},nx);var ZI,J_,$I,aie=Jt(Eu,"HierarchyHandling",166,En,xye),oie,Tv,KI,zo,sie,uie,X_,QI,ag,Mv,is,Fa,eh,WI,cie,lie,fie,JI,jv,hie,dr,Nd,XI,die,Av,og,sg,Ma,Iv,Jl,eL,eE,tE,nE,rE,iE,Xu,St,ec,Lv,Ov,tL,Td,nL,aE,rL,Uc,Rv,iL,Cs;W(41,17,{41:1,3:1,23:1,17:1},yl);var Co,ma,wa,xa,qi,ka,Ua,Ya,Va,Kn=Jt(Eu,"NodeLabelPlacement",41,En,$me),pie;W(100,17,{100:1,3:1,23:1,17:1},wb);var aL,oL,sL,su,th,uL=Jt(Eu,"PortAlignment",100,En,bme),gie;W(28,17,{28:1,3:1,23:1,17:1},Pp);var Md,ki,Ps,Dv,Ss,Yc,bie=Jt(Eu,"PortConstraints",28,En,vme),vie;W(149,17,{149:1,3:1,23:1,17:1},rx);var oE,sE,Bv,yie=Jt(Eu,"PortLabelPlacement",149,En,kye),mie;W(32,17,{32:1,3:1,23:1,17:1},xb);var ot,yt,jd,Xl,qa,tc,vm,Ad,ef,co,si,lo,Ns,fo,nh,Id,tf,Ld,Et,Sr,lt,$r=Jt(Eu,"PortSide",32,En,Wye),wie;W(150,17,{150:1,3:1,23:1,17:1},k1);var Gv,uE,cE,Hv,ug=Jt(Eu,"SizeConstraint",150,En,$ye),xie;W(139,17,{139:1,3:1,23:1,17:1},_1);var lE,fE,zv,hE,dE=Jt(Eu,"SizeOptions",139,En,Zye),kie;W(62,1,{62:1},hx,mo),E.t=function(e){var n;return e==null||!Ze(e,62)?!1:(n=v(e,62),Ga(this.d,n.d)&&Ga(this.e,n.e)&&Ga(this.c,n.c)&&Ga(this.b,n.b))},E.v=function(){return Ik(be(ve(dt,1),tt,1,4,[this.d,this.e,this.c,this.b]))},E.w=function(){return"Rect[x="+this.d+",y="+this.e+",w="+this.c+",h="+this.b+"]"},E.b=0,E.c=0,E.d=0,E.e=0,te(eg,"Rectangle",62),W(283,62,{283:1,62:1},cZ),E.a=0,te(pI,"LabelGroup",283),W(67,17,{67:1,3:1,23:1,17:1},na);var _ie,Eie,Cie,Pie,Sie,Nie,Tie,Mie,jie,Aie,Iie,Lie,Oie,Rie,Die,Bie,Gie,Hie,zie,Fie,Uie,pE,Yie=Jt(pI,"LabelLocation",67,En,UA);W(225,17,{225:1,3:1,23:1,17:1},ix);var Od,Vc,qc,w3e=Jt(pI,"TextAlignment",225,En,_ye),rh;W(589,1,{},vne),E.a=0,E.b=!1,E.d=0,E.f=0,E.k=0,E.r=0,E.s=0,te(eg,"LabelAndNodeSizeProcessor/NodeData",589),W(171,17,{171:1,3:1,23:1,17:1},ax);var Ts,Nu,Vie,Fv,x3e=Jt(eg,"LabelSide",171,En,wye);W(590,1,{},Nq),E.b=!0,E.c=!0,E.d=!0,E.e=!0,te(eg,sre,590),W(121,1,ure),E.t=function(e){var n;return Ze(e,121)?(n=v(e,121),this.d==n.d&&this.a==n.a&&this.b==n.b&&this.c==n.c):!1},E.v=function(){var e,n;return e=vr(Re(this.b))<<16,e|=vr(Re(this.a))&iu,n=vr(Re(this.c))<<16,n|=vr(Re(this.d))&iu,e^n},E.w=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},E.a=0,E.b=0,E.c=0,E.d=0,te(eg,"Spacing",121),W(232,121,ure,e6,$K,JK),te(eg,"Spacing/Insets",232),W(65,121,{286:1,121:1,65:1,3:1,5:1},d1,vs,sj),te(eg,"Spacing/Margins",65),W(364,1,{},wee),E.c=!1,E.d=null,E.g=null;var cL,lL,gE;te(I_,"JsonGraphImporter",364);var fL,hL,dL,pL,gL,qie,ym,bL,vL;W(417,14,tre,D$),te(I_,"LayoutOptionResolver/DummyProperty",417),W(348,1,{},tq);var yL;te(I_,"RecursiveLGraphLayout",348),W(73,99,{73:1,3:1,54:1,46:1},F2,jb,Ks);var Zie=te(I_,"UnsupportedJsonGraphException",73);W(380,1,{},JQ);var $ie,Kie;te(vI,"GraphConfigurator",380),W(49,1,{},Jn),te(vI,"IntermediateProcessingConfiguration",49),W(365,1,{},YW),te(vI,"KlayLayered",365),W(577,1,{},iX),E.i=0;var Qie;te(xv,"ComponentsToCGraphTransformer",577);var Wie;W(578,1,{},H),E.tc=function(e,n){return mn(e.wc(),n.wc())},E.uc=function(e,n){return mn(e.xc(),n.xc())},te(xv,"ComponentsToCGraphTransformer/1",578),W(25,1,{25:1}),E.k=0,E.o=null,E.p=!0,E.r=ti;var mm=te(ng,"CNode",25);W(198,25,{198:1,25:1},V6,yA),E.vc=function(){this.b.d=this.j.d,this.b.e=this.j.e},E.wc=function(){return this.a!=null?Re(this.a):this.c.i},E.xc=function(){return this.a!=null?Re(this.a):this.c.i},E.w=function(){return""},te(xv,"ComponentsToCGraphTransformer/CRectNode",198),W(549,1,{},Q);var bE,vE;te(xv,"OneDimensionalComponentsCompaction",549),W(550,1,Yi,q),E.B=function(e){return Mk(),zn(),v(v(e,27).a,25).f.f!=0?Ei:Xn},te(xv,"OneDimensionalComponentsCompaction/lambda$0$Type",550),W(551,1,Yi,Z),E.B=function(e){return Mk(),zn(),HA(v(v(e,27).a,25).n,v(v(e,27).b,59))||v(v(e,27).a,25).f.f!=0&&HA(v(v(e,27).a,25).n,v(v(e,27).b,59))?Ei:Xn},te(xv,"OneDimensionalComponentsCompaction/lambda$1$Type",551),W(324,1,{},Nj),te(ng,"CGraph",324),W(78,1,{78:1},Ay),E.b=0,E.c=0,E.d=0,E.f=0,E.i=!0,E.j=ti,te(ng,"CGroup",78),W(470,1,{},J),E.tc=function(e,n){return et(e.wc(),n.wc())},E.uc=function(e,n){return et(e.xc(),n.xc())},te(ng,"ISpacingsHandler/1",470),W(323,1,{},v7),E.e=!1;var Jie,Xie,eae,yE=te(ng,"OneDimensionalCompactor",323);W(554,1,Yi,I),E.B=function(e){return Vx(),zn(),v(v(e,27).a,25).f.f!=0?Ei:Xn},te(ng,"OneDimensionalCompactor/lambda$0$Type",554),W(335,1,{},pj),E.a=!1,E.b=!1,E.c=!1,E.d=!1,te(ng,"Quadruplet",335),W(587,1,{},R),E.Cc=function(e){var n,i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;for(N=Vi,u=new V(e.a.b);u.a<u.c.c.length;)n=v($(u),25),N=mn(N,n.f.g.j.d+n.g.a);for(re=new fi,x=new V(e.a.a);x.a<x.c.c.length;)y=v($(x),78),y.j=N,y.f==0&&Ir(re,y,re.c.b,re.c);for(;re.b!=0;){for(y=v(re.b==0?null:(_t(re.b!=0),yu(re,re.a.a)),78),f=y.g.j.d,G=(ee=new hn(y.a.a).a.bb().mb(),new yn(ee));G.a.G();)A=(g=v(G.a.H(),21),v(g.yb(),25)),ce=y.j+A.g.a,A.f.i||A.j.d<ce?A.r=ce:A.r=A.j.d;for(f-=y.g.r,y.b+=f,e.d==(sr(),ya)||e.d==ou?y.c+=f:y.c-=f,O=(Y=new hn(y.a.a).a.bb().mb(),new yn(Y));O.a.G();)for(A=(g=v(O.a.H(),21),v(g.yb(),25)),C=A.i.mb();C.G();)_=v(C.H(),25),Pf(e.d)?oe=e.g.tc(A,_):oe=e.g.uc(A,_),_.f.j=et(_.f.j,A.r+A.j.c+oe-_.g.a),_.p||(_.f.j=et(_.f.j,_.j.d-_.g.a)),--_.f.f,_.f.f==0&&_n(re,_.f)}for(i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),25),n.j.d=n.r},te(Wf,"LongestPathCompaction",587),W(588,1,{},B),E.Dc=function(e){var n,i,u,f,g,y,x;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v($(i),25),n.i.Q();for(f=new V(e.a.b);f.a<f.c.c.length;)for(u=v($(f),25),y=new V(e.a.b);y.a<y.c.c.length;)g=v($(y),25),u!=g&&(u.f&&u.f==g.f||(Pf(e.d)?x=e.g.uc(u,g):x=e.g.tc(u,g),u!=g.o&&(g.j.d>u.j.d||u.j.d==g.j.d&&u.j.c<g.j.c)&&T2e(g.j.e+g.j.b+x,u.j.e)&&YA(g.j.e,u.j.e+u.j.b+x)&&u.i.ib(g)))},te(Wf,"QuadraticConstraintCalculation",588),W(317,1,{},bj),E.Dc=function(e){this.b=e,c_(this,new z,new D)},te(Wf,"ScanlineConstraintCalculator",317);var Uv=Q1(Cu,"Scanline/EventHandler");W(464,1,{160:1},aW),E.Ec=function(e){h_e(this,v(e,235))},te(Wf,"ScanlineConstraintCalculator/ConstraintsScanlineHandler",464),W(465,1,Zr,F),E.$b=function(e,n){return Lr((v(e,25).j.d+v(e,25).j.c)/2,(v(n,25).j.d+v(n,25).j.c)/2)},te(Wf,"ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",465),W(235,1,{235:1},P6),E.a=!1,te(Wf,"ScanlineConstraintCalculator/Timestamp",235),W(466,1,Zr,j),E.$b=function(e,n){return _xe(e,n)},te(Wf,"ScanlineConstraintCalculator/lambda$0$Type",466),W(467,1,Ho,z),E.D=function(e){return!0},te(Wf,"ScanlineConstraintCalculator/lambda$1$Type",467),W(468,1,Yi,D),E.B=function(e){return 0},te(Wf,"ScanlineConstraintCalculator/lambda$2$Type",468),W(48,1,{48:1},$h,fj),E.t=function(e){var n;return e==null||k3e!=Bp(e)?!1:(n=v(e,48),Ga(this.c,n.c)&&Ga(this.d,n.d))},E.v=function(){return Ik(be(ve(dt,1),tt,1,4,[this.c,this.d]))},E.w=function(){return"("+this.c+", "+this.d+(this.a?"cx":"")+this.b+")"},E.a=!0,E.c=0,E.d=0;var k3e=te(Cu,"Point",48);W(201,17,{201:1,3:1,23:1,17:1},E1);var Zc,nf,ih,rf,_3e=Jt(Cu,"Point/Quadrant",201,En,Qye);W(569,1,{},iZ),E.b=null,E.c=null,E.d=null,E.e=null,E.f=null;var tae,nae,rae,iae,aae;te(Cu,"RectilinearConvexHull",569),W(243,1,{160:1},Iy),E.Ec=function(e){Yme(this,v(e,48))},E.b=0;var mL;te(Cu,"RectilinearConvexHull/MaximalElementsEventHandler",243),W(571,1,Zr,K),E.$b=function(e,n){return $Q(e,n)},te(Cu,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",571),W(570,1,{160:1},eJ),E.Ec=function(e){Xke(this,v(e,48))},E.a=0,E.b=null,E.c=null,E.d=null,E.e=null,te(Cu,"RectilinearConvexHull/RectangleEventHandler",570),W(572,1,Zr,ae),E.$b=function(e,n){return Rp(),v(e,48).c==v(n,48).c?Lr(v(n,48).d,v(e,48).d):Lr(v(e,48).c,v(n,48).c)},te(Cu,"RectilinearConvexHull/lambda$0$Type",572),W(573,1,Zr,se),E.$b=function(e,n){return Rp(),v(e,48).c==v(n,48).c?Lr(v(e,48).d,v(n,48).d):Lr(v(e,48).c,v(n,48).c)},te(Cu,"RectilinearConvexHull/lambda$1$Type",573),W(574,1,Zr,le),E.$b=function(e,n){return Rp(),v(e,48).c==v(n,48).c?Lr(v(n,48).d,v(e,48).d):Lr(v(n,48).c,v(e,48).c)},te(Cu,"RectilinearConvexHull/lambda$2$Type",574),W(575,1,Zr,he),E.$b=function(e,n){return Rp(),v(e,48).c==v(n,48).c?Lr(v(e,48).d,v(n,48).d):Lr(v(n,48).c,v(e,48).c)},te(Cu,"RectilinearConvexHull/lambda$3$Type",575),W(576,1,Zr,fe),E.$b=function(e,n){return Zxe(e,n)},te(Cu,"RectilinearConvexHull/lambda$4$Type",576),W(469,1,{},HW),te(Cu,"Scanline",469),W(662,1,{}),te(au,"AbstractGraphPlacer",662),W(222,1,{222:1},nQ);var Gt;te(au,"ComponentGroup",222),W(434,662,{},aZ),E.Fc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;if(this.a.c=Ie(dt,tt,1,0,4,1),n.b.c=Ie(dt,tt,1,0,4,1),e.V()){n.e.a=0,n.e.b=0;return}for(g=v(e.sb(0),55),$u(n,g),f=e.mb();f.G();)u=v(f.H(),55),p2e(this,u);for(G=new oi,Y=2*v(X(g,(Ce(),ca)),15).a,_=new V(this.a);_.a<_.c.c.length;)y=v($(_),222),C=WCe(y,Y),Js(Aj(y.a),G.a,G.b),G.a+=C.a,G.b+=C.b;if(n.e.a=G.a-Y,n.e.b=G.b-Y,Yt(Re(Zt(X(g,(tn(),bC)))))&&ut(X(g,(Ye(),eh)))===ut((Zu(),Xf))){for(O=e.mb();O.G();)N=v(O.H(),55),pv(N,N.d.a,N.d.b);for(i=new pe,Bne(i,e,Y),A=e.mb();A.G();)N=v(A.H(),55),On(bu(N.d),i.e);On(bu(n.e),i.a)}for(x=new V(this.a);x.a<x.c.c.length;)y=v($(x),222),sJ(n,Aj(y.a))},te(au,"ComponentGroupGraphPlacer",434),W(322,1,{},pe),te(au,"ComponentsCompactor",322),W(13,647,yI,Ve,aa,Cc),E.rb=function(e,n){El(this,e,n)},E.ib=function(e){return Ke(this,e)},E.jb=function(e){return $n(this,e)},E.Q=function(){this.c=Ie(dt,tt,1,0,4,1)},E.kb=function(e){return ia(this,e,0)!=-1},E.sb=function(e){return ct(this,e)},E.V=function(){return this.c.length==0},E.mb=function(){return new V(this)},E.vb=function(e){return Gf(this,e)},E.nb=function(e){return zr(this,e)},E.Xb=function(e,n){kW(this,e,n)},E.wb=function(e,n){return jl(this,e,n)},E.Y=function(){return this.c.length},E.ob=function(){return OK(this)},E.pb=function(e){return fr(this,e)},te(At,"ArrayList",13),W(532,13,yI,zW),E.ib=function(e){return Fp(this,v(e,48))},te(au,"ComponentsCompactor/Hullpoints",532),W(529,1,{347:1},yee),E.a=!1,te(au,"ComponentsCompactor/InternalComponent",529),W(528,1,Bc,oZ),E.mb=function(){return new V(this.a)},te(au,"ComponentsCompactor/InternalConnectedComponents",528),W(531,1,{251:1},cte),E.zc=function(){return null},E.Ac=function(){return this.a},E.yc=function(){return Zk(this.d)},E.Bc=function(){return this.b},te(au,"ComponentsCompactor/InternalExternalExtension",531),W(530,1,{251:1},dZ),E.Ac=function(){return this.a},E.yc=function(){return Zk(this.d)},E.zc=function(){return this.c},E.Bc=function(){return this.b},te(au,"ComponentsCompactor/InternalUnionExternalExtension",530),W(534,1,{},Bte),te(au,"ComponentsCompactor/OuterSegments",534),W(533,1,{},sZ),te(au,"ComponentsCompactor/Segments",533),W(381,1,{},HK),te(au,"ComponentsProcessor",381),W(432,662,{},me),E.Fc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe;if(e.Y()==1){de=v(e.sb(0),55),de!=n&&(n.b.c=Ie(dt,tt,1,0,4,1),Xte(n,de,0,0),$u(n,de),NQ(n.a,de.a),n.e.a=de.e.a,n.e.b=de.e.b);return}else if(e.V()){n.b.c=Ie(dt,tt,1,0,4,1),n.e.a=0,n.e.b=0;return}for(x=e.mb();x.G();){for(g=v(x.H(),55),re=0,Y=new V(g.b);Y.a<Y.c.c.length;)G=v($(Y),9),re+=v(X(G,(Ce(),No)),24).a;g.k=re}for(wo(e,new Te),f=v(e.sb(0),55),n.b.c=Ie(dt,tt,1,0,4,1),$u(n,f),O=0,Ee=0,_=e.mb();_.G();)g=v(_.H(),55),ce=g.e,O=et(O,ce.a),Ee+=ce.a*ce.b;for(O=et(O,Math.sqrt(Ee)*v(X(n,(Ce(),Bd)),15).a),ye=pre*v(X(n,ca),15).a,Ue=0,qe=0,A=0,i=ye,y=e.mb();y.G();)g=v(y.H(),55),ce=g.e,Ue+ce.a>O&&(Ue=0,qe+=A+ye,A=0),ee=g.d,pv(g,Ue+ee.a,qe+ee.b),ee.a=0,ee.b=0,i=et(i,Ue+ce.a),A=et(A,ce.b),Ue+=ce.a+ye;if(n.e.a=i,n.e.b=qe+A,oe=v(X(n,ca),15).a,Yt(Re(Zt(X(f,(tn(),bC)))))){for(u=new pe,Bne(u,e,oe),N=e.mb();N.G();)C=v(N.H(),55),On(bu(C.d),u.e);On(bu(n.e),u.a)}sJ(n,e)},te(au,"SimpleRowGraphPlacer",432),W(433,1,Zr,Te),E.$b=function(e,n){return Bwe(v(e,55),v(n,55))},te(au,"SimpleRowGraphPlacer/1",433),W(369,1,Bn,nq),E.sc=function(e,n){Fne(e,n)};var oae;te(kv,"CompoundGraphPostprocessor",369),W(370,1,Ho,Oe),E.D=function(e){var n;return n=v(X(v(e,114).b,(Ye(),dr)),44),!!n&&n.b!=0},te(kv,"CompoundGraphPostprocessor/1",370),W(368,1,Bn,Z$),E.sc=function(e,n){uee(this,e,n)},te(kv,"CompoundGraphPreprocessor",368),W(187,1,{187:1},GX),E.c=!1,te(kv,"CompoundGraphPreprocessor/ExternalPort",187),W(114,1,{114:1},Y1),E.w=function(){return z1(this.c)+":"+MJ(this.b)},te(kv,"CrossHierarchyEdge",114),W(310,1,Zr,FM),E.$b=function(e,n){return bxe(this,v(e,114),v(n,114))},te(kv,"CrossHierarchyEdgeComparator",310),W(147,131,{179:1,131:1,147:1,3:1}),E.k=0,te(pi,"LGraphElement",147),W(12,147,{179:1,131:1,12:1,147:1,3:1},Qs),E.w=function(){return MJ(this)};var _a=te(pi,"LEdge",12);W(55,147,{179:1,131:1,55:1,147:1,3:1,22:1},gA),E.mb=function(){return new V(this.c)},E.w=function(){return this.c.c.length==0?"G-unlayered"+Dc(this.b):this.b.c.length==0?"G-layered"+Dc(this.c):"G[layerless"+Dc(this.b)+", layers"+Dc(this.c)+"]"};var E3e=te(pi,"LGraph",55);W(273,1,{}),E.pc=function(){return this.e.j},te(pi,"LGraphAdapters/AbstractLShapeAdapter",273),W(240,1,{627:1},c1),E.b=null,te(pi,"LGraphAdapters/LEdgeAdapter",240),W(325,1,{},S6),E.pc=function(){return this.a.e},E.b=null,E.c=!1,te(pi,"LGraphAdapters/LGraphAdapter",325),W(224,273,{129:1,224:1},L2),te(pi,"LGraphAdapters/LLabelAdapter",224),W(555,273,{626:1},P$),E.a=null,E.b=null,E.c=!1,te(pi,"LGraphAdapters/LNodeAdapter",555),W(556,273,{161:1},S$),E.a=null,E.b=null,E.c=null,E.d=!1,te(pi,"LGraphAdapters/LPortAdapter",556),W(557,1,Zr,ge),E.$b=function(e,n){return S_e(v(e,7),v(n,7))},te(pi,"LGraphAdapters/PortComparator",557),W(168,1,{168:1},T2,sW),E.t=function(e){var n;return Ze(e,168)?(n=v(e,168),this.d==n.d&&this.a==n.a&&this.b==n.b&&this.c==n.c):!1},E.v=function(){var e,n;return e=vr(Re(this.b))<<16,e|=vr(Re(this.a))&iu,n=vr(Re(this.c))<<16,n|=vr(Re(this.d))&iu,e^n},E.w=function(){return"Insets[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},E.a=0,E.b=0,E.c=0,E.d=0,te(pi,"LInsets",168),W(165,147,{179:1,131:1,147:1,165:1,3:1}),te(pi,"LShape",165),W(33,165,{179:1,131:1,147:1,33:1,165:1,3:1},F6),E.w=function(){return this.a==null?"l_"+this.k:"l_"+this.a},te(pi,"LLabel",33),W(9,165,{179:1,131:1,147:1,9:1,165:1,3:1},ko),E.w=function(){return pW(this)};var Rr=te(pi,"LNode",9);W(132,17,{132:1,3:1,23:1,17:1},Sp);var sa,Zn,Po,An,nr,wr,wL=Jt(pi,"LNode/NodeType",132,En,wme);W(7,165,{179:1,131:1,147:1,7:1,165:1,3:1},ur),E.w=function(){var e;return e=nJ(this),e==null?"p_"+this.k:"p_"+e};var mE,xL,wE,kL,xE,kE,sae=te(pi,"LPort",7);W(399,1,Ho,xe),E.D=function(e){return QK(e)},te(pi,"LPort/1",399),W(400,1,Ho,Se),E.D=function(e){return KK(e)},te(pi,"LPort/2",400),W(401,1,Ho,Le),E.D=function(e){return v(e,7).g==(Be(),yt)},te(pi,"LPort/3",401),W(402,1,Ho,De),E.D=function(e){return v(e,7).g==(Be(),ot)},te(pi,"LPort/4",402),W(403,1,Ho,Ne),E.D=function(e){return v(e,7).g==(Be(),Et)},te(pi,"LPort/5",403),W(404,1,Ho,Me),E.D=function(e){return v(e,7).g==(Be(),lt)},te(pi,"LPort/6",404),W(190,1,Bc,dp),E.mb=function(){var e;return e=new V(this.a.b),new Tq(e)},te(pi,"LPort/7",190),W(405,1,kr,Tq),E.H=function(){return v($(this.a),12).c},E.G=function(){return wl(this.a)},E.I=function(){Ip(this.a)},te(pi,"LPort/7/1",405),W(169,1,Bc,Dh),E.mb=function(){var e;return e=new V(this.a.e),new UM(e)},te(pi,"LPort/8",169),W(304,1,kr,UM),E.H=function(){return v($(this.a),12).d},E.G=function(){return wl(this.a)},E.I=function(){Ip(this.a)},te(pi,"LPort/8/1",304),W(16,147,{179:1,131:1,147:1,16:1,3:1,22:1},Nl),E.mb=function(){return new V(this.a)},E.w=function(){return"L_"+ia(this.b.c,this,0)+Dc(this.a)},te(pi,"Layer",16),W(437,1,Bn,ke),E.sc=function(e,n){var i,u,f,g,y,x,_;for($t(n,"Big nodes intermediate-processing",1),this.a=e,g=new V(this.a.c);g.a<g.c.c.length;)for(f=v($(g),16),_=Ba(f.a),i=Wo(_,new He),x=If(i.b.mb(),i.a);Mc(x);)y=v(Hf(x),9),ut(X(y,(tn(),Dr)))===ut((ba(),vg))||ut(X(y,Dr))===ut(sc)?(u=T7(this,y,!1),_e(u,Dr,v(X(y,Dr),85)),_e(y,Dr,fh)):T7(this,y,!0);zt(n)},te(Mt,"BigNodesIntermediateProcessor",437),W(438,1,Ho,He),E.D=function(e){return Ame(v(e,9))},te(Mt,"BigNodesIntermediateProcessor/1",438),W(582,1,Yi,Mq),E.B=function(e){var n;return Pwe((n=this,I1(e),n))},te(Mt,"BigNodesLabelHandler/CompoundFunction",582),W(332,1,{},t7),E.a=0,E.e=null,E.f=0,te(Mt,"BigNodesLabelHandler/Handler",332),W(583,1,Yi,jq),E.B=function(e){var n;return Gxe((n=this,I1(e),n))},te(Mt,"BigNodesLabelHandler/Handler/1",583),W(584,1,Yi,N$),E.B=function(e){var n;return K1e((n=this,I1(e),n))},te(Mt,"BigNodesLabelHandler/Handler/2",584),W(585,1,Yi,T$),E.B=function(e){var n;return kCe((n=this,I1(e),n))},te(Mt,"BigNodesLabelHandler/Handler/3",585),W(439,1,Bn,Qe),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for($t(n,"Big nodes post-processing",1),this.a=e,x=new V(this.a.c);x.a<x.c.c.length;)for(y=v($(x),16),i=Wo(y.a,new it),C=If(i.b.mb(),i.a);Mc(C);){for(_=v(Hf(C),9),A=v(X(_,(Ce(),Wv)),15),g=xte(this,_),ee=new Ve,Y=mr(g,(Be(),ot)).mb();Y.G();)O=v(Y.H(),7),ee.c[ee.c.length]=O,N=O.i.a-g.j.a,O.i.a=A.a+N;for(_.j.a=A.a,G=new V(ee);G.a<G.c.c.length;)O=v($(G),7),Tn(O,_);this.a.e.a<_.i.a+_.j.a&&(this.a.e.a=_.i.a+_.j.a),f=v(X(_,L9),20),$n(_.c,f),u=v(X(_,oC),64),u&&u.B(null)}zt(n)},te(Mt,"BigNodesPostProcessor",439),W(440,1,Ho,it),E.D=function(e){return Ime(v(e,9))},te(Mt,"BigNodesPostProcessor/1",440),W(441,1,Bn,LZ),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G;for($t(n,bre,1),this.c=e,A=this.c.b,f=0,_=new V(A);_.a<_.c.c.length;)y=v($(_),9),y.k=f++;for(this.d=v(X(this.c,(Ce(),ca)),15).a,this.a=v(X(this.c,(Ye(),is)),59),this.b=A.c.length,g=vre,C=new V(A);C.a<C.c.c.length;)y=v($(C),9),y.g==(gt(),nr)&&y.j.a<g&&(g=y.j.a);for(g=50>g?50:g,i=new Ve,G=g+this.d,N=new V(A);N.a<N.c.c.length;)if(y=v($(N),9),y.g==(gt(),nr)&&y.j.a>G){for(O=1,u=y.j.a;u>g;)++O,u=(y.j.a-(O-1)*this.d)/O;Ke(i,new VW(this,y,O,u))}for(x=new V(i);x.a<x.c.c.length;)y=v($(x),267),eEe(y.d)&&jCe(y);zt(n)},E.b=0,E.d=0,te(Mt,"BigNodesPreProcessor",441),W(267,1,{267:1},VW),E.a=0,E.c=0,te(Mt,"BigNodesPreProcessor/BigNode",267),W(442,1,Bn,OZ),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for($t(n,bre,1),uae=Yt(Re(Zt(X(e,(Ye(),Mv))))),this.c=e,G=new Ve,y=new V(e.c);y.a<y.c.c.length;)g=v($(y),16),$n(G,g.a);for(f=0,N=new V(G);N.a<N.c.c.length;)_=v($(N),9),_.k=f++;for(this.d=v(X(this.c,(Ce(),ca)),15).a,this.a=v(X(this.c,is),59),this.b=G.c.length,x=vre,A=new V(G);A.a<A.c.c.length;)_=v($(A),9),_.g==(gt(),nr)&&_.j.a<x&&(x=_.j.a);for(x=50>x?50:x,i=new Ve,ee=x+this.d,O=new V(G);O.a<O.c.c.length;)if(_=v($(O),9),_.g==(gt(),nr)&&_.j.a>ee){for(Y=1,u=_.j.a;u>x;)++Y,u=(_.j.a-(Y-1)*this.d)/Y;Ke(i,new hW(this,_,Y))}for(C=new V(i);C.a<C.c.c.length;)_=v($(C),268),XCe(_)&&NEe(_);zt(n)},E.b=0,E.d=0;var uae=!1;te(Mt,"BigNodesSplitter",442),W(268,1,{268:1},hW),E.a=0,E.e=4,te(Mt,"BigNodesSplitter/BigNode",268),W(443,1,Bn,ft),E.sc=function(e,n){var i,u,f,g,y,x,_,C;for($t(n,"Comment post-processing",1),_=v(X(e,(Ce(),ca)),15).a,g=new V(e.c);g.a<g.c.c.length;){for(f=v($(g),16),u=new Ve,x=new V(f.a);x.a<x.c.c.length;)y=v($(x),9),C=v(X(y,bg),20),i=v(X(y,dg),20),(C||i)&&(ECe(y,C,i,_),C&&$n(u,C),i&&$n(u,i));$n(f.a,u)}zt(n)},te(Mt,"CommentPostprocessor",443),W(444,1,Bn,ze),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re;for($t(n,"Comment pre-processing",1),x=new V(e.b);x.a<x.c.c.length;)if(y=v($(x),9),Yt(Re(Zt(X(y,(Ye(),ag)))))){for(u=0,i=null,_=null,G=new V(y.f);G.a<G.c.c.length;)A=v($(G),7),u+=A.b.c.length+A.e.c.length,A.b.c.length==1&&(i=v(ct(A.b,0),12),_=i.c),A.e.c.length==1&&(i=v(ct(A.e,0),12),_=i.d);if(u==1&&_.b.c.length+_.e.c.length==1&&!Yt(Re(Zt(X(_.f,ag)))))qCe(y,i,_,_.f),Ip(x);else{for(re=new Ve,O=new V(y.f);O.a<O.c.c.length;){for(A=v($(O),7),N=new V(A.e);N.a<N.c.c.length;)C=v($(N),12),C.d.e.c.length==0||(re.c[re.c.length]=C);for(g=new V(A.b);g.a<g.c.c.length;)f=v($(g),12),f.c.b.c.length==0||(re.c[re.c.length]=f)}for(ee=new V(re);ee.a<ee.c.c.length;)Y=v($(ee),12),Vl(Y,!0)}}zt(n)},te(Mt,"CommentPreprocessor",444),W(445,1,Bn,$e),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for($t(n,"Edge and layer constraint edge reversal",1),C=new V(e.b);C.a<C.c.c.length;){switch(_=v($(C),9),y=v(X(_,(tn(),Dr)),85),g=null,y.e){case 1:case 2:g=(hd(),Qv);break;case 3:case 4:g=(hd(),Im)}if(g)_e(_,(Ce(),sC),(hd(),Qv)),g==Im?Y7(_,y,(Cr(),_i)):g==Qv&&Y7(_,y,(Cr(),la));else if(Zs(v(X(_,(Ye(),St)),28))&&_.f.c.length!=0){for(i=!0,A=new V(_.f);A.a<A.c.c.length;){if(N=v($(A),7),!(N.g==(Be(),ot)&&N.b.c.length-N.e.c.length>0||N.g==lt&&N.b.c.length-N.e.c.length<0)){i=!1;break}if(N.g==lt){for(f=new V(N.e);f.a<f.c.c.length;)if(u=v($(f),12),x=v(X(u.d.f,Dr),85),x==(ba(),vg)||x==sc){i=!1;break}}if(N.g==ot){for(f=new V(N.b);f.a<f.c.c.length;)if(u=v($(f),12),x=v(X(u.c.f,Dr),85),x==(ba(),Xv)||x==el){i=!1;break}}}i&&Y7(_,y,(Cr(),dC))}}zt(n)},te(Mt,"EdgeAndLayerConstraintEdgeReverser",445),W(446,1,Bn,xt),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for($t(n,"End label placement",1),y=v(X(e,(Ye(),Nd)),15).a,this.a=(Wn(),new an),this.c=new an,this.b=new an,_=new V(e.c);_.a<_.c.c.length;)for(x=v($(_),16),N=new V(x.a);N.a<N.c.c.length;)for(C=v($(N),9),u=Vt(Un(C));Ft(u);)for(i=v(Ot(u),12),g=new V(i.b);g.a<g.c.c.length;)f=v($(g),33),(ut(X(f,Fa))===ut((eu(),Sd))||ut(X(f,Fa))===ut(Wl))&&(A=null,ut(X(f,Fa))===ut(Sd)?A=i.c:ut(X(f,Fa))===ut(Wl)&&(A=i.d),ud(this.a,A.f)||Nn(this.a,A.f,0),ud(this.c,A.f)||Nn(this.c,A.f,0),ud(this.b,A)||Nn(this.b,A,0),ut(X(f,(Ce(),Fo)))===ut((ga(),Ts))?AEe(f,A,y):jEe(f,A,y));zt(n)},te(Mt,"EndLabelProcessor",446),W(269,1,Bn,O2),E.sc=function(e,n){var i,u,f,g,y;for($t(n,"Graph transformation ("+this.a+")",1),f=Ml(e.b),u=new V(e.c);u.a<u.c.c.length;)i=v($(u),16),$n(f,i.a);switch(this.a.e){case 0:One(f,e);break;case 1:Tne(f),y=v(X(e,(tn(),zd)),115),y&&_e(e,zd,VX(y)),Do(e.d),Do(e.e);break;case 2:One(f,e),YCe(f,e),Tne(f),g=v(X(e,(tn(),zd)),115),g&&_e(e,zd,VX(g)),Do(e.d),Do(e.e)}zt(n)},te(Mt,"GraphTransformer",269),W(221,17,{221:1,3:1,23:1,17:1},ox);var _L,EL,CL,C3e=Jt(Mt,"GraphTransformer/Mode",221,En,Eye);W(448,1,Bn,st),E.sc=function(e,n){$t(n,"Hierarchical port constraint processing",1),O2e(e),u3e(e),zt(n)},te(Mt,"HierarchicalPortConstraintProcessor",448),W(449,1,Zr,Rt),E.$b=function(e,n){return Y2e(v(e,9),v(n,9))},te(Mt,"HierarchicalPortConstraintProcessor/NodeComparator",449),W(450,1,Bn,It),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for($t(n,"Hierarchical port dummy size processing",1),_=new Ve,A=new Ve,x=v(X(e,(Ce(),ca)),15).a,N=x*v(X(e,(tn(),Au)),15).a,i=N*2,f=new V(e.c);f.a<f.c.c.length;){for(u=v($(f),16),_.c=Ie(dt,tt,1,0,4,1),A.c=Ie(dt,tt,1,0,4,1),y=new V(u.a);y.a<y.c.c.length;)g=v($(y),9),g.g==(gt(),Zn)&&(C=v(X(g,ni),32),C==(Be(),yt)?_.c[_.c.length]=g:C==Et&&(A.c[A.c.length]=g));fte(_,!0,i),fte(A,!1,i)}zt(n)},te(Mt,"HierarchicalPortDummySizeProcessor",450),W(451,1,Bn,Dt),E.sc=function(e,n){var i,u,f,g;$t(n,"Orthogonally routing hierarchical port edges",1),this.a=0,i=vEe(e),xCe(e,i),oCe(this,e,i),RCe(e),u=v(X(e,(Ye(),St)),28),f=e.c,jne((qn(0,f.c.length),v(f.c[0],16)),u,e),jne(v(ct(f,f.c.length-1),16),u,e),g=e.c,hne((qn(0,g.c.length),v(g.c[0],16))),hne(v(ct(g,g.c.length-1),16)),zt(n)},E.a=0,te(Mt,"HierarchicalPortOrthogonalEdgeRouter",451),W(452,1,Zr,Ut),E.$b=function(e,n){return s1e(v(e,9),v(n,9))},te(Mt,"HierarchicalPortOrthogonalEdgeRouter/1",452),W(453,1,Zr,bn),E.$b=function(e,n){return qme(v(e,9),v(n,9))},te(Mt,"HierarchicalPortOrthogonalEdgeRouter/2",453),W(454,1,Bn,sn),E.sc=function(e,n){var i;$t(n,"Hierarchical port position processing",1),i=e.c,i.c.length>0&&one((qn(0,i.c.length),v(i.c[0],16)),e),i.c.length>1&&one(v(ct(i,i.c.length-1),16),e),zt(n)},te(Mt,"HierarchicalPortPositionProcessor",454),W(471,1,Bn,ir),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for($t(n,"Hyperedge merging",1),G=new jn(e.c,0);G.b<G.d.Y();)if(O=(_t(G.b<G.d.Y()),v(G.d.sb(G.c=G.b++),16)),ee=O.a,ee.c.length!=0)for(x=null,A=null,Y=0;Y<ee.c.length;Y++)i=(qn(Y,ee.c.length),v(ee.c[Y],9)),y=i.g,y==(gt(),An)&&A==An&&(f=v(X(i,(Ce(),ua)),7),C=v(X(x,ua),7),g=v(X(i,Zi),7),N=v(X(x,Zi),7),u=!!f||!!g,_=!!C||!!N,u&&_&&(f==C||g==N)&&(l_e(i,x,f==C,g==N),qn(Y,ee.c.length),w6(ee.c,Y,1),--Y,i=x,y=A)),x=i,A=y;zt(n)},te(Mt,"HyperedgeDummyMerger",471),W(472,1,Bn,U),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for($t(n,"Hypernodes processing",1),f=new V(e.c);f.a<f.c.c.length;)for(u=v($(f),16),x=new V(u.a);x.a<x.c.c.length;)if(y=v($(x),9),Yt(Re(Zt(X(y,(Ye(),jv)))))&&y.f.c.length<=2){for(A=0,N=0,i=0,g=0,C=new V(y.f);C.a<C.c.c.length;)switch(_=v($(C),7),_.g.e){case 1:++A;break;case 2:++N;break;case 3:++i;break;case 4:++g}A==0&&i==0&&e3e(e,y,g<=N)}zt(n)},te(Mt,"HypernodesProcessor",472),W(473,1,Bn,ne),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N;for($t(n,"Layer constraint edge reversal",1),y=new V(e.c);y.a<y.c.c.length;){for(g=v($(y),16),N=-1,i=new Ve,C=v(fr(g.a,Ie(Rr,oa,9,g.a.c.length,0,1)),51),f=0;f<C.length;f++)u=v(X(C[f],(Ce(),Mu)),140),N==-1?u!=(Xs(),ch)&&(N=f):u==(Xs(),ch)&&(Wr(C[f],null),bd(C[f],N++,g)),u==(Xs(),Dd)&&Ke(i,C[f]);for(_=new V(i);_.a<_.c.c.length;)x=v($(_),9),Wr(x,null),Wr(x,g)}zt(n)},te(Mt,"InLayerConstraintProcessor",473),W(474,1,Bn,ue),E.sc=function(e,n){var i,u,f,g,y,x;if(v(X(e,(Ce(),ui)),18).kb((jr(),As))){for(x=new V(e.b);x.a<x.c.c.length;)g=v($(x),9),g.g==(gt(),nr)&&(f=v(X(g,(Ye(),Av)),65),this.c=mn(this.c,g.i.a-f.b),this.a=et(this.a,g.i.a+g.j.a+f.c),this.d=mn(this.d,g.i.b-f.d),this.b=et(this.b,g.i.b+g.j.b+f.a));for(y=new V(e.b);y.a<y.c.c.length;)if(g=v($(y),9),g.g!=(gt(),nr))switch(g.g.e){case 2:if(u=v(X(g,(tn(),Dr)),85),u==(ba(),el)){g.i.a=this.c-10,nee(g,new we).A(new Aq(g));break}if(u==sc){g.i.a=this.a+10,nee(g,new Ae).A(new Iq(g));break}if(i=v(X(g,Mu),140),i==(Xs(),ch)){mne(g).A(new Lq(g)),g.i.b=this.d-10;break}if(i==Dd){mne(g).A(new Oq(g)),g.i.b=this.b+10;break}break;default:throw new Pn("The node type "+g.g+" is not supported by the "+P3e)}}},E.a=ti,E.b=ti,E.c=Vi,E.d=Vi;var P3e=te(Mt,"InteractiveExternalPortPositioner",474);W(475,1,Yi,we),E.B=function(e){return v(e,12).d.f},te(Mt,"InteractiveExternalPortPositioner/lambda$0$Type",475),W(476,1,Yi,Aq),E.B=function(e){return u1e(this.a,e)},te(Mt,"InteractiveExternalPortPositioner/lambda$1$Type",476),W(477,1,Yi,Ae),E.B=function(e){return v(e,12).c.f},te(Mt,"InteractiveExternalPortPositioner/lambda$2$Type",477),W(478,1,Yi,Iq),E.B=function(e){return c1e(this.a,e)},te(Mt,"InteractiveExternalPortPositioner/lambda$3$Type",478),W(479,1,Yi,Lq),E.B=function(e){return m1e(this.a,e)},te(Mt,"InteractiveExternalPortPositioner/lambda$4$Type",479),W(480,1,Yi,Oq),E.B=function(e){return w1e(this.a,e)},te(Mt,"InteractiveExternalPortPositioner/lambda$5$Type",480),W(37,17,{37:1,3:1,23:1,17:1},kn);var _E,Yv,EE,CE,PL,SL,NL,TL,PE,wm,ML,jL,AL,IL,cg,LL,OL,RL,SE,xm,NE,DL,km,_m,Em,BL,Rd,Cm,GL,HL,zL,TE,ME,FL,UL,Pm,Sm,YL,VL,qL,jE,AE,IE,ZL,$L,KL,QL,WL,JL,XL,cae=Jt(Mt,"IntermediateProcessorStrategy",37,En,cke);W(503,1,Bn,ie),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;for($t(n,"Inverted port preprocessing",1),C=e.c,_=new jn(C,0),i=null,ce=new Ve;_.b<_.d.Y();){for(oe=i,i=(_t(_.b<_.d.Y()),v(_.d.sb(_.c=_.b++),16)),O=new V(ce);O.a<O.c.c.length;)N=v($(O),9),Wr(N,oe);for(ce.c=Ie(dt,tt,1,0,4,1),G=new V(i.a);G.a<G.c.c.length;)if(N=v($(G),9),N.g==(gt(),nr)&&Zs(v(X(N,(Ye(),St)),28))){for(re=N7(N,(Cr(),la),(Be(),ot)).mb();re.G();)for(Y=v(re.H(),7),x=Y.b,y=v(fr(x,Ie(_a,va,12,x.c.length,0,1)),47),f=0,g=y.length;f<g;++f)u=y[f],uEe(e,Y,u,ce);for(ee=N7(N,_i,lt).mb();ee.G();)for(Y=v(ee.H(),7),x=Y.e,y=v(fr(x,Ie(_a,va,12,x.c.length,0,1)),47),f=0,g=y.length;f<g;++f)u=y[f],n_e(e,Y,u,ce)}}for(A=new V(ce);A.a<A.c.c.length;)N=v($(A),9),Wr(N,i);zt(n)},te(Mt,"InvertedPortProcessor",503),W(481,1,Bn,Pe),E.sc=function(e,n){$t(n,"Node and Port Label Placement and Node Sizing",1),Wve((B2(),B2(),new S6(e,!1))),zt(n)},te(Mt,"LabelAndNodeSizeProcessor",481),W(482,1,Bn,rq),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;for($t(n,"Label dummy insertions",1),O=new Ve,N=v(X(e,(Ye(),Nd)),15).a,A=v(X(e,is),59),Y=new V(e.b);Y.a<Y.c.c.length;)for(G=v($(Y),9),re=new V(G.f);re.a<re.c.c.length;)for(ee=v($(re),7),x=new V(ee.e);x.a<x.c.c.length;)if(y=v($(x),12),y.c.f!=y.d.f&&MQ(y.b,lae)){for(ce=xl(y.b.c.length),i=new ko(e),bo(i,(gt(),Po)),_e(i,(Ce(),Ct),y),_e(i,Y9,ce),_e(i,St,(tr(),ki)),_e(i,ua,y.c),_e(i,Zi,y.d),O.c[O.c.length]=i,Dte(y,i),de=v(X(y,Cs),15).a,de<0&&(de=0,_e(y,Cs,new dn(de))),oe=Math.floor(de/2),f=new V(i.f);f.a<f.c.c.length;)u=v($(f),7),u.i.b=oe;for(g=i.j,_=new jn(y.b,0);_.b<_.d.Y();)C=(_t(_.b<_.d.Y()),v(_.d.sb(_.c=_.b++),33)),ut(X(C,Fa))===ut((eu(),Nv))&&(A==(sr(),Su)||A==ou?(g.a+=C.j.a+N,g.b=et(g.b,C.j.b)):(g.a=et(g.a,C.j.a),g.b+=C.j.b+N),ce.c[ce.c.length]=C,Jo(_));(A==(sr(),Su)||A==ou)&&(g.a-=N),g.b+=N+de}$n(e.b,O),zt(n)};var lae;te(Mt,"LabelDummyInserter",482),W(483,1,Ho,Fe),E.D=function(e){return ut(X(v(e,33),(Ye(),Fa)))===ut((eu(),Nv))},te(Mt,"LabelDummyInserter/1",483),W(484,1,Bn,We),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O;for($t(n,"Label dummy removal",1),f=v(X(e,(Ye(),Nd)),15).a,x=v(X(e,is),59),y=new V(e.c);y.a<y.c.c.length;)for(g=v($(y),16),C=new jn(g.a,0);C.b<C.d.Y();)_=(_t(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),9)),_.g==(gt(),Po)&&(N=v(X(_,(Ce(),Ct)),12),O=v(X(N,Cs),15).a,i=new lr(_.i),ut(X(_,Fo))===ut((ga(),Nu))&&(i.b+=O+f),u=new kt(_.j.a,_.j.b-O-f),A=v(X(_,Y9),20),x==(sr(),Su)||x==ou?s2e(A,i,f,u,ut(X(_,Fo))!==ut(Ts)):Jwe(A,i,f,u),$n(N.b,A),kne(_,!1),Jo(C));zt(n)},te(Mt,"LabelDummyRemover",484),W(485,1,Bn,Xe),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;for($t(n,"Label dummy switching",1),i=new Ve,A=new Ve,x=new Ve,G=new Ve,y=new V(e.c);y.a<y.c.c.length;)for(g=v($(y),16),N=new V(g.a);N.a<N.c.c.length;)if(C=v($(N),9),C.g==(gt(),Po)){i.c[i.c.length]=C,x.c=Ie(dt,tt,1,0,4,1),G.c=Ie(dt,tt,1,0,4,1),ee=C;do ee=v(Ot(Vt(Yr(ee))),12).c.f,ee.g==An&&(x.c[x.c.length]=ee);while(ee.g==An);ce=C;do ce=v(Ot(Vt(Un(ce))),12).d.f,ce.g==An&&(G.c[G.c.length]=ce);while(ce.g==An);_=x.c.length,Y=G.c.length,_>Y+1?(O=(_+Y)/2|0,Ke(A,new Ar(C,(qn(O,x.c.length),v(x.c[O],9))))):Y>_+1&&(O=((Y-_)/2|0)-1,Ke(A,new Ar(C,(qn(O,G.c.length),v(G.c[O],9)))))}for(oe=new V(A);oe.a<oe.c.c.length;)re=v($(oe),27),REe(v(re.a,9),v(re.b,9));for(f=new V(i);f.a<f.c.c.length;)u=v($(f),9),NX(u,new wt,(Ce(),Zi)),NX(u,new nt,ua);zt(n)},te(Mt,"LabelDummySwitcher",485),W(486,1,Yi,wt),E.B=function(e){return v(Ot(Vt(Yr(v(e,9)))),12).c.f},te(Mt,"LabelDummySwitcher/lambda$0$Type",486),W(487,1,Yi,nt),E.B=function(e){return v(Ot(Vt(Un(v(e,9)))),12).d.f},te(Mt,"LabelDummySwitcher/lambda$1$Type",487),W(488,1,Bn,Kt),E.sc=function(e,n){$t(n,"Label management",1),I1(X(e,(rA(),HI))),zt(n)},te(Mt,"LabelManagementProcessor",488),W(489,1,Bn,iq),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;switch(_=v(X(e,(tn(),zd)),115),$t(n,"Label side selection ("+_+")",1),C=(Nt(e),new Wh(e)),_.e){case 0:nke(C);break;case 1:tke(C);break;case 2:qke(C);break;case 3:Vke(C);break;case 4:yCe(C)}for(x=new V(e.c);x.a<x.c.c.length;)for(y=v($(x),16),u=new V(y.a);u.a<u.c.c.length;){for(i=v($(u),9),G=new V(i.f);G.a<G.c.c.length;)for(A=v($(G),7),g=new V(A.c);g.a<g.c.c.length;)f=v($(g),33),ut(X(f,(Ce(),Fo)))===ut((ga(),Fv))&&_e(f,Fo,fae);if(i.g==(gt(),Po)&&ut(X(i,(Ce(),Fo)))===ut((ga(),Ts)))for(N=v(X(i,Ct),12),ee=v(X(N,(Ye(),Cs)),15).a,Y=i.j.b-Math.ceil(ee/2),O=new V(i.f);O.a<O.c.c.length;)A=v($(O),7),A.i.b=Y}zt(n)};var fae;te(Mt,"LabelSideSelector",489),W(490,1,Zr,Ht),E.$b=function(e,n){return sye(v(e,7),v(n,7))},te(Mt,"LabelSideSelector/1",490),W(495,1,Bn,Xt),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;if($t(n,"Layer constraint application",1),C=e.c,C.c.length==0){zt(n);return}for(g=(qn(0,C.c.length),v(C.c[0],16)),y=v(ct(C,C.c.length-1),16),ce=new Nl(e),de=new Nl(e),_=new V(C);_.a<_.c.c.length;)for(x=v($(_),16),ee=v(fr(x.a,Ie(Rr,oa,9,x.a.c.length,0,1)),51),O=0,Y=ee.length;O<Y;++O)switch(A=ee[O],i=v(X(A,(tn(),Dr)),85),i.e){case 1:Wr(A,g),Kte(A,!1);break;case 2:Wr(A,ce),Kte(A,!0);break;case 3:Wr(A,y),nne(A);break;case 4:Wr(A,de),nne(A)}if(C.c.length>=2){for(N=!0,re=(qn(1,C.c.length),v(C.c[1],16)),G=new V(g.a);G.a<G.c.c.length;){if(A=v($(G),9),ut(X(A,(tn(),Dr)))===ut((ba(),fh))){N=!1;break}for(f=Vt(Un(A));Ft(f);)if(u=v(Ot(f),12),u.d.f.d==re){N=!1;break}if(!N)break}if(N){for(ee=v(fr(g.a,Ie(Rr,oa,9,g.a.c.length,0,1)),51),O=0,Y=ee.length;O<Y;++O)A=ee[O],Wr(A,re);zr(C,g)}}if(C.c.length>=2){for(N=!0,oe=v(ct(C,C.c.length-2),16),G=new V(y.a);G.a<G.c.c.length;){if(A=v($(G),9),ut(X(A,(tn(),Dr)))===ut((ba(),fh))){N=!1;break}for(f=Vt(Yr(A));Ft(f);)if(u=v(Ot(f),12),u.c.f.d==oe){N=!1;break}if(!N)break}if(N){for(ee=v(fr(y.a,Ie(Rr,oa,9,y.a.c.length,0,1)),51),O=0,Y=ee.length;O<Y;++O)A=ee[O],Wr(A,oe);zr(C,y)}}C.c.length==1&&(qn(0,C.c.length),v(C.c[0],16)).a.c.length==0&&Gf(C,0),ce.a.c.length==0||(Ll(0,C.c.length),Pb(C.c,0,ce)),de.a.c.length==0||(C.c[C.c.length]=de),zt(n)},te(Mt,"LayerConstraintProcessor",495),W(496,1,Bn,Yn),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;for($t(n,"Layer size calculation",1),C=ks,_=5e-324,y=new V(e.c);y.a<y.c.c.length;)if(g=v($(y),16),x=g.c,x.a=0,x.b=0,g.a.c.length!=0){for(A=new V(g.a);A.a<A.c.c.length;)N=v($(A),9),G=N.j,O=N.e,x.a=et(x.a,G.a+O.b+O.c);u=v(ct(g.a,0),9),Y=u.i.b-u.e.d,f=v(ct(g.a,g.a.c.length-1),9),i=f.i.b+f.j.b+f.e.a,x.b=i-Y,C=C<Y?C:Y,_=_>i?_:i}e.e.b=_-C,e.d.b-=C,zt(n)},te(Mt,"LayerSizeAndGraphHeightCalculator",496),W(497,1,Bn,Qt),E.sc=function(e,n){var i,u,f,g,y;for($t(n,"Edge joining",1),i=Yt(Re(Zt(X(e,(tn(),pC))))),f=new V(e.c);f.a<f.c.c.length;)for(u=v($(f),16),y=new jn(u.a,0);y.b<y.d.Y();)g=(_t(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),9)),g.g==(gt(),An)&&(kne(g,i),Jo(y));zt(n)},te(Mt,"LongEdgeJoiner",497),W(498,1,Bn,Hn),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G;if($t(n,"Edge splitting",1),e.c.c.length<=2){zt(n);return}for(g=new jn(e.c,0),y=(_t(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16));g.b<g.d.Y();)for(f=y,y=(_t(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16)),_=new V(f.a);_.a<_.c.c.length;)for(x=v($(_),9),N=new V(x.f);N.a<N.c.c.length;)for(C=v($(N),7),u=new V(C.e);u.a<u.c.c.length;)i=v($(u),12),O=i.d,A=O.f.d,A!=f&&A!=y&&Dte(i,(G=new ko(e),bo(G,(gt(),An)),_e(G,(Ce(),Ct),i),_e(G,(Ye(),St),(tr(),ki)),Wr(G,y),G));zt(n)},te(Mt,"LongEdgeSplitter",498),W(499,1,Bn,gr),E.sc=function(e,n){var i,u,f,g,y,x,_,C;for($t(n,"Node margin calculation",1),i=new Nq((B2(),new S6(e,!0))),k2e(i),x=v(X(e,(Ce(),ca)),15).a,f=new V(e.c);f.a<f.c.c.length;)for(u=v($(f),16),y=new V(u.a);y.a<y.c.c.length;)g=v($(y),9),F_e(g,x),_=g.e,C=v(X(g,V9),65),_.b=et(_.b,C.b),_.c=et(_.c,C.c),_.a=et(_.a,C.a),_.d=et(_.d,C.d);zt(n)},te(Mt,sre,499),W(491,1,Bn,ii),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;switch($t(n,"Node promotion heuristic",1),this.g=e,OCe(this),this.q=v(X(e,(tn(),Um)),109),C=v(X(this.g,Q9),24).a,f=new Wi,this.q.e){case 2:case 1:wd(this,f);break;case 3:for(this.q=(Hl(),Tm),wd(this,f),x=0,y=new V(this.a);y.a<y.c.c.length;)g=v($(y),24),x=mi(x,g.a);x>this.j&&(this.q=Vv,wd(this,f));break;case 4:for(this.q=(Hl(),Tm),wd(this,f),_=0,u=new V(this.b);u.a<u.c.c.length;)i=Wt($(u)),_=et(_,(Tr(i),i));_>this.k&&(this.q=qv,wd(this,f));break;case 6:A=vr(S1(this.f.length*C/100)),wd(this,new Rq(A));break;case 5:N=vr(S1(this.d*C/100)),wd(this,new Dq(N));break;default:wd(this,f)}d_e(this,e),zt(n)},E.d=0,E.e=0,E.i=0,E.j=0,E.k=0,E.n=0,te(Mt,"NodePromotion",491),W(492,1,Yi,Wi),E.B=function(e){return zn(),zn(),Ei},te(Mt,"NodePromotion/lambda$0$Type",492),W(493,1,Yi,Rq),E.B=function(e){return J1e(this.a,e)},E.a=0,te(Mt,"NodePromotion/lambda$1$Type",493),W(494,1,Yi,Dq),E.B=function(e){return X1e(this.a,e)},E.a=0,te(Mt,"NodePromotion/lambda$2$Type",494),W(109,17,{109:1,3:1,23:1,17:1},Sf);var e9,Vv,t9,n9,qv,r9,Nm,Tm,hae=Jt(Mt,"NodePromotionStrategy",109,En,Zme),dae;W(500,1,Bn,La),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye;for($t(n,xre,1),G=v(X(e,(Ye(),eh)),122),f=new V(e.c);f.a<f.c.c.length;)for(u=v($(f),16),_=v(fr(u.a,Ie(Rr,oa,9,u.a.c.length,0,1)),51),y=0,x=_.length;y<x;++y)if(g=_[y],g.g==(gt(),wr)){if(G==(Zu(),K_))for(N=new V(g.f);N.a<N.c.c.length;)C=v($(N),7),C.b.c.length==0||nxe(C),C.e.c.length==0||rxe(C);else if(Ze(X(g,(Ce(),Ct)),12))ee=v(X(g,Ct),12),re=v(mr(g,(Be(),lt)).mb().H(),7),oe=v(mr(g,ot).mb().H(),7),ce=v(X(re,Ct),7),de=v(X(oe,Ct),7),er(ee,de),Fn(ee,ce),ye=new lr(oe.f.i),ye.a=Mn(be(ve(rn,1),nn,10,0,[de.f.i,de.i,de.a])).a,_n(ee.a,ye),ye=new lr(re.f.i),ye.a=Mn(be(ve(rn,1),nn,10,0,[ce.f.i,ce.i,ce.a])).a,_n(ee.a,ye);else{if(g.f.c.length>=2){for(Y=!0,A=new V(g.f),i=v($(A),7);A.a<A.c.c.length;)if(O=i,i=v($(A),7),!es(X(O,Ct),X(i,Ct))){Y=!1;break}}else Y=!1;for(N=new V(g.f);N.a<N.c.c.length;)C=v($(N),7),C.b.c.length==0||w_e(C,Y),C.e.c.length==0||x_e(C,Y)}Wr(g,null)}zt(n)},te(Mt,"NorthSouthPortPostprocessor",500),W(501,1,Bn,Pi),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye;for($t(n,xre,1),Y=new Ve,ye=new Ve,C=new V(e.c);C.a<C.c.c.length;)for(_=v($(C),16),re=-1,G=v(fr(_.a,Ie(Rr,oa,9,_.a.c.length,0,1)),51),A=0,O=G.length;A<O;++A)if(N=G[A],++re,!!(N.g==(gt(),nr)&&Zs(v(X(N,(Ye(),St)),28)))){for(Gi(v(X(N,(Ye(),St)),28))||t_e(N),_e(N,(Ce(),sf),N),Y.c=Ie(dt,tt,1,0,4,1),ye.c=Ie(dt,tt,1,0,4,1),i=new Ve,de=new fi,PA(de,mr(N,(Be(),yt))),Gne(e,de,Y,ye,i),x=re,g=new V(Y);g.a<g.c.c.length;)u=v($(g),9),bd(u,x,_),++re,_e(u,sf,N),y=v(ct(u.f,0),7),ee=v(X(y,Ct),7),Yt(Re(Zt(X(ee,(tn(),EC)))))||v(X(u,Gd),20).ib(N);for(vu(de),ce=mr(N,Et).mb();ce.G();)oe=v(ce.H(),7),Ir(de,oe,de.a,de.a.a);for(Gne(e,de,ye,null,i),f=new V(ye);f.a<f.c.c.length;)u=v($(f),9),bd(u,++re,_),_e(u,sf,N),y=v(ct(u.f,0),7),ee=v(X(y,Ct),7),Yt(Re(Zt(X(ee,(tn(),EC)))))||v(X(N,Gd),20).ib(u);i.c.length==0||_e(N,I9,i)}zt(n)},te(Mt,"NorthSouthPortPreprocessor",501),W(502,1,Zr,Bi),E.$b=function(e,n){var i,u;return i=e.g,u=n.g,i!=u?i.e-u.e:e.k==n.k?0:i==(Be(),yt)?e.k-n.k:n.k-e.k},te(Mt,"NorthSouthPortPreprocessor/lambda$0$Type",502),W(504,1,Bn,Gn),E.sc=function(e,n){var i,u,f,g,y,x;for($t(n,"Removing partition constraint edges",1),u=new V(e.c);u.a<u.c.c.length;)for(i=v($(u),16),g=new V(i.a);g.a<g.c.c.length;)for(f=v($(g),9),x=new V(f.f);x.a<x.c.c.length;)y=v($(x),7),Yt(Re(Zt(X(y,(Ce(),Hm)))))&&Ip(x);zt(n)},te(Mt,"PartitionPostprocessor",504),W(505,1,Bn,yi),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for($t(n,"Adding partition constraint edges",1),this.a=new Ve,x=new V(e.b);x.a<x.c.c.length;)g=v($(x),9),f=v(X(g,(Ye(),eL)),24),nwe(this,f.a).ib(g);for(u=0;u<this.a.c.length-1;u++)for(y=v(ct(this.a,u),20).mb();y.G();)for(g=v(y.H(),9),N=new ur,Tn(N,g),en(N,(Be(),ot)),_e(N,(Ce(),Hm),(zn(),zn(),Ei)),C=v(ct(this.a,u+1),20).mb();C.G();)_=v(C.H(),9),A=new ur,Tn(A,_),en(A,lt),_e(A,Hm,Ei),i=new Qs,_e(i,Hm,Ei),_e(i,(Ye(),nL),Tt(20)),er(i,N),Fn(i,A);this.a=null,zt(n)},te(Mt,"PartitionPreprocessor",505),W(506,1,Bn,Oa),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for($t(n,"Port distribution",1),i=ete(e),G=0,N=0,f=0,y=i.length;f<y;++f)for(u=i[f],_=0,C=u.length;_<C;++_)for(x=u[_],x.k=N++,O=new V(x.f);O.a<O.c.c.length;)A=v($(O),7),A.k=G++;for(g=new V(e.c);g.a<g.c.c.length;)u=v($(g),16),Oke(u);ee=v(X(e,(Ce(),Hd)),154),Y=qf(ee,1)!=0?new U2(Ie(Zm,rm,26,G,12,1)):new g6(Ie(Zm,rm,26,G,12,1)),Mee(Y,i),zt(n)},te(Mt,"PortDistributionProcessor",506),W(507,1,Bn,pu),E.sc=function(e,n){var i,u,f,g,y;for($t(n,"Port order processing",1),y=new Si,u=new V(e.c);u.a<u.c.c.length;)for(i=v($(u),16),g=new V(i.a);g.a<g.c.c.length;)f=v($(g),9),Zs(v(X(f,(Ye(),St)),28))&&wo(f.f,y);zt(n)},te(Mt,"PortListSorter",507),W(508,1,Zr,Si),E.$b=function(e,n){return $_e(v(e,7),v(n,7))},te(Mt,"PortListSorter/PortComparator",508),W(509,1,Bn,Io),E.sc=function(e,n){var i,u,f,g,y;for($t(n,"Port side processing",1),y=new V(e.b);y.a<y.c.c.length;)f=v($(y),9),ite(f);for(u=new V(e.c);u.a<u.c.c.length;)for(i=v($(u),16),g=new V(i.a);g.a<g.c.c.length;)f=v($(g),9),ite(f);zt(n)},te(Mt,"PortSideProcessor",509),W(510,1,Bn,je),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for($t(n,"Restoring reversed edges",1),x=new V(e.c);x.a<x.c.c.length;)for(y=v($(x),16),C=new V(y.a);C.a<C.c.c.length;)for(_=v($(C),9),A=new V(_.f);A.a<A.c.c.length;)for(N=v($(A),7),g=v(fr(N.e,Ie(_a,va,12,N.e.c.length,0,1)),47),u=0,f=g.length;u<f;++u)i=g[u],Yt(Re(Zt(X(i,(Ce(),ju)))))&&Vl(i,!1);zt(n)},te(Mt,"ReversedEdgeRestorer",510),W(511,1,Bn,bt),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In;if($t(n,"Sausage Folding",1),this.b=v(X(e,(Ce(),ca)),15).a,this.a=this.b*v(X(e,(tn(),yg)),15).a,Y=ske(this,e),G=e.c.c.length,ee=qxe(this,e),mt=G*ee,f=v(X(e,(Ye(),is)),59),f==(sr(),uo)||f==ya||f==rs?u=v(X(e,Bd),15).a:u=1/v(X(e,Bd),15).a,i=mt/Y,u>i){zt(n);return}ht=0,g=ks;do++ht,i=mt/ht/(Y*ht),O=g,g=i-u<=0?0-(i-u):i-u;while(i>u);for(O<g&&--ht,Ge=G/(1>ht?1:ht)|0,C=Ge,ye=Ge,In=!0;C<G;){A=v(ct(e.c,C),16),rt=!0,ce=null,de=null;e:for(on=new V(A.a);on.a<on.c.c.length;)for(Pt=v($(on),9),x=Vt(Yr(Pt));Ft(x);){if(y=v(Ot(x),12),ce&&ce!=Pt){rt=!1;break e}if(ce=Pt,pt=y.c.f,de&&de!=pt){rt=!1;break e}de=pt}if(In&&rt&&(ye=0,In=!1),C!=ye){for(Ee=v(ct(e.c,ye),16),oe=new V(Ml(A.a));oe.a<oe.c.c.length;)if(re=v($(oe),9),bd(re,Ee.a.c.length,Ee),ye==0)for(x=new V(Ml(Yr(re)));x.a<x.c.c.length;)for(y=v($(x),12),Vl(y,!0),_e(e,D9,(zn(),zn(),Ei)),gEe(e,y),_=new Ve,dEe(e,y.c,y,_),qe=new V(_);qe.a<qe.c.c.length;)Ue=v($(qe),9),bd(Ue,Ee.a.c.length-1,Ee)}ye>=Ge&&(In=!0),++ye,++C}for(N=new jn(e.c,0);N.b<N.d.Y();)A=(_t(N.b<N.d.Y()),v(N.d.sb(N.c=N.b++),16)),A.a.c.length==0&&Jo(N);zt(n)},E.a=0,E.b=0,te(Mt,"SausageFolding",511),W(512,1,Bn,Bt),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;for($t(n,"Self-loop processing",1),i=new Ve,N=new V(e.c);N.a<N.c.c.length;){for(C=v($(N),16),i.c=Ie(dt,tt,1,0,4,1),O=new V(C.a);O.a<O.c.c.length;)for(A=v($(O),9),Y=new V(A.f);Y.a<Y.c.c.length;)for(G=v($(Y),7),_=v(fr(G.e,Ie(_a,va,12,G.e.c.length,0,1)),47),y=0,x=_.length;y<x;++y)g=_[y],g.c.f==g.d.f&&(ee=g.c,oe=g.d,re=ee.g,ce=oe.g,((re==(Be(),yt)||re==Et)&&ce==lt||re==Et&&ce==yt||re==ot&&ce!=ot)&&Vl(g,!1),re==ot&&ce==lt?Ke(i,Nte(e,g,oe,ee)):re==lt&&ce==ot&&Ke(i,Nte(e,g,ee,oe)));for(f=new V(i);f.a<f.c.c.length;)u=v($(f),9),Wr(u,C)}zt(n)},te(Mt,"SelfLoopProcessor",512),W(513,1,Bn,un),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;for($t(n,"Spline SelfLoop positioning",1),N=v(X(e,(tn(),PC)),153),C=new V(e.c);C.a<C.c.c.length;)for(_=v($(C),16),O=new V(_.a);O.a<O.c.c.length;){for(A=v($(O),9),y=v(X(A,(Ce(),fC)),20),x=new Ve,f=y.mb();f.G();)i=v(f.H(),75),axe(i),(G=Lj(i.g),Na(G,i.i),G).a.Y()==0?x.c[x.c.length]=i:(wEe(i),i.g.a.Y()==0||dCe(i));switch(N.e){case 0:Y=new sK(A),jwe(Y),t3e(Y,x);break;case 2:for(g=new V(x);g.a<g.c.c.length;)i=v($(g),75),qp(i,(Fi(),cu),!0);break;case 1:for(u=new V(x);u.a<u.c.c.length;)i=v($(u),75),qp(i,(Fi(),cu),!0)}switch(N.e){case 0:case 1:H_e(y);break;case 2:G_e(y)}}zt(n)},te(Mt,"SplineSelfLoopPositioner",513),W(515,1,{},sK),te(Mt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator",515),W(516,1,{},Vte),E.d=!0,te(Mt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator/SortedLoopSides",516),W(116,1,{116:1},ZZ),E.a=0,E.b=0,te(Mt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator/SortedLoopSides/SizeOfSide",116),W(318,1,{},L7);var af;te(Mt,"SplineSelfLoopPositioner/PortReadder",318),W(514,1,Zr,li),E.$b=function(e,n){return Q0e(v(e,75),v(n,75))},te(Mt,"SplineSelfLoopPositioner/TextWidthComparator",514),W(517,1,Bn,Ni),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce;for($t(n,"Spline SelfLoop pre-processing.",1),N=new pa,O=new V(e.b);O.a<O.c.c.length;){for(A=v($(O),9),P2e(A),N.a.Q(),x=Vt(Un(A));Ft(x);)g=v(Ot(x),12),Il(g)&&(G=N.a.db(g,N),G==null);for(y=(Y=new hn(N.a).a.bb().mb(),new yn(Y));y.a.G();)g=(_=v(y.a.H(),21),v(_.yb(),12)),oe=g.c.g,ce=g.d.g,(oe==(Be(),yt)&&(ce==ot||ce==Et)||oe==ot&&ce==Et||oe==Et&&ce==lt||oe==lt&&(ce==yt||ce==ot))&&Vl(g,!1);if(i=_ke(N,A),_e(A,(Ce(),fC),i),!Gi(v(X(A,(Ye(),St)),28))){for(re=new ai,f=new V(i);f.a<f.c.c.length;)u=v($(f),75),Na(re,sk(u)),Na(re,u.i);for(C=new jn(A.f,0);C.b<C.d.Y();)ee=(_t(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),7)),re.a.R(ee)&&Jo(C)}}zt(n)},te(Mt,"SplineSelfLoopPreProcessor",517),W(518,1,Bn,Lo),E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on;for($t(n,"Spline SelfLoop routing",1),ht=new Hu,O=new V(e.c);O.a<O.c.c.length;)for(A=v($(O),16),ce=new V(A.a);ce.a<ce.c.c.length;){for(oe=v($(ce),9),ye=oe.f,G=new pa,u=v(X(oe,(Ce(),fC)),20).mb();u.G();)i=v(u.H(),75),Na(G,i.a);for(Ee=new Ve,y=(de=new hn(G.a).a.bb().mb(),new yn(de));y.a.G();){for(g=(x=v(y.a.H(),21),v(x.yb(),12)),Ge=g.c,mt=g.d,N=new V(g.c.f.f),qe=0,pt=0,_=0,C=0;_<2;)f=v($(N),7),Ge==f&&(qe=C,++_),mt==f&&(pt=C,++_),++C;Ue=v(X(g,Jv),60),rt=Ue==(Fi(),as)||Ue==Ms?ye.c.length-(pt-qe<0?-(pt-qe):pt-qe)+1:pt-qe<0?-(pt-qe):pt-qe,Ke(Ee,new GW(qe,pt,rt,Ue,g))}if(wo(Ee,ht),ee=new ai,Y=new V(Ee),Y.a<Y.c.c.length){for(re=Lne(v($(Y),195),ee);Y.a<Y.c.c.length;)bA(re,Lne(v($(Y),195),ee));_e(oe,V9,(Pt=new d1,on=new Wee(oe.j.a,oe.j.b),Pt.d=et(0,on.d-re.d),Pt.b=et(0,on.b-re.b),Pt.a=et(0,re.a-on.a),Pt.c=et(0,re.c-on.c),Pt))}}zt(n)},te(Mt,"SplineSelfLoopRouter",518),W(91,1,{91:1},$p),E.w=function(){return this.b+": "+this.d+" -> "+this.a+" "+z1(this.c)},E.a=0,E.b=0,E.d=0,te(Mt,"SplineSelfLoopRouter/LoopPadding",91),W(521,1,Ho,mQ),E.D=function(e){return Q2e(this,v(e,91))},E.a=0,E.c=0,te(Mt,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",521),W(520,1,Zr,bc),E.$b=function(e,n){return K0e(v(e,91),v(n,91))},te(Mt,"SplineSelfLoopRouter/LoopPadding/MarginComparator",520),W(196,1,Ho,pp),E.D=function(e){return v(e,91).c==this.a},te(Mt,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",196),W(195,1,{195:1},GW),E.c=0,E.d=0,E.e=0,te(Mt,"SplineSelfLoopRouter/SelfLoopEdge",195),W(519,1,Zr,Hu),E.$b=function(e,n){return m0e(v(e,195),v(n,195))},te(Mt,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",519),W(82,25,{25:1,82:1},m7),E.vc=function(){var e,n,i,u;for(n=xn(this.a,0);n.b!=n.d.c;)e=v(fn(n),10),e.a=this.j.d;for(u=xn(this.c,0);u.b!=u.d.c;)i=v(fn(u),10),i.a=this.j.d},E.wc=function(){return this.b},E.xc=function(){return this.e},E.w=function(){return Dc(new hn(this.d.a))},E.b=0,E.e=0,te(ns,"CLEdge",82),W(93,25,{25:1,93:1},$te),E.vc=function(){this.b.i.a=this.j.d+this.b.e.b},E.wc=function(){return this.b.g==(gt(),Zn)?0:this.a},E.xc=function(){return this.b.g==(gt(),Zn)?0:this.c},E.w=function(){return za(X(this.b,(Ce(),Ct)))},E.a=0,E.c=0,te(ns,"CLNode",93),W(175,17,{175:1,3:1,23:1,17:1},N6);var i9,LE,pae=Jt(ns,"ConstraintCalculationStrategy",175,En,fye),gae;W(125,17,{125:1,3:1,23:1,17:1},Np);var a9,o9,s9,u9,Zv,c9,bae=Jt(ns,"GraphCompactionStrategy",125,En,xme),vae;W(455,1,Bn,vK),E.sc=function(e,n){var i,u,f;if(u=v(X(e,(tn(),Ym)),125),u!=(Zp(),Zv)){switch($t(n,"Horizontal Compaction",1),this.a=e,f=new $$,i=new v7(__e(f,e)),HZ(i,this.b),v(X(e,CC),175).e){case 1:GZ(i,yae);break;default:GZ(i,(Vx(),Xie))}switch(u.e){case 1:wu(i);break;case 2:wu(ru(i,(sr(),ya)));break;case 3:wu(yb(ru(wu(i),(sr(),ya))));break;case 4:wu(yb(Y2(ru(wu(i),(sr(),ya)),new Ln)));break;case 5:wu(b0e(i,mae))}ru(i,(sr(),uo)),i.e=!0,z_e(f),zt(n)}};var yae,mae;te(ns,"HorizontalGraphCompactor",455),W(462,1,{},Bq),E.tc=function(e,n){var i,u,f;return Ze(e,82)&&Ze(n,82)&&!_k(vA(v(e,82).d,v(n,82).d))||(i=null,Ze(e,93)&&(i=v(e,93).b),u=null,Ze(n,93)&&(u=v(n,93).b),i&&i.g==(gt(),Zn)||u&&u.g==(gt(),Zn))?0:(f=v(X(this.a.a,(Ce(),lf)),134),Sx(f,i?i.g:(gt(),An),u?u.g:(gt(),An)))},E.uc=function(e,n){return Ze(e,82)&&Ze(n,82)&&!_k(vA(v(e,82).d,v(n,82).d))?1:mn(e.xc(),n.xc())},te(ns,"HorizontalGraphCompactor/1",462),W(456,317,{},wQ),E.Dc=function(e){var n,i,u;for(this.b=e,c_(this,new Dn,this.a),c_(this,new vn,this.a),n=Vi,u=new V(this.b.a.b);u.a<u.c.c.length;)i=v($(u),25),!(Ze(i,93)&&v(i,93).b.g==(gt(),Zn))&&(n=mn(n,Re(r$(this.a,i))));n==Vi&&(n=0),c_(this,new Cn,new Hq(n))},te(ns,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation",456),W(457,1,Yi,Gq),E.B=function(e){return r$(this,e)},te(ns,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$0$Type",457),W(458,1,Ho,Dn),E.D=function(e){return Ze(v(e,25),82)},te(ns,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$1$Type",458),W(459,1,Ho,vn),E.D=function(e){return Ze(v(e,25),93)},te(ns,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$2$Type",459),W(460,1,Ho,Cn),E.D=function(e){return!0},te(ns,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$3$Type",460),W(461,1,Yi,Hq),E.B=function(e){return this.a},E.a=0,te(ns,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$4$Type",461),W(463,1,Yi,Ln),E.B=function(e){return Y6(),zn(),HA(v(v(e,27).a,25).n,v(v(e,27).b,59))?Xn:Ei},te(ns,"HorizontalGraphCompactor/lambda$0$Type",463),W(553,1,{},$$),E.c=!1,te(ns,"LGraphToCGraphTransformer",553),W(552,1,{},Ji),E.Cc=function(e){var n,i,u,f,g;for(this.a=e,this.d=new G2,this.c=Ie(l9,tt,61,this.a.a.a.c.length,0,1),this.b=0,i=new V(this.a.a.a);i.a<i.c.c.length;)n=v($(i),78),n.d=this.b,g=Mb(s$(m6(new bp,this.b),n),this.d),this.c[this.b]=g,++this.b;for($Ee(this),FCe(this),Fke(this),j7(uj(this.d),new U1),f=new V(this.a.a.b);f.a<f.c.c.length;)u=v($(f),25),u.r=this.c[u.f.d].e+u.g.a,u.j.d=u.r},E.b=0,te(ns,"NetworkSimplexCompaction",552),W(142,1,{142:1,23:1},fv),E.F=function(e){return Vme(this,v(e,142))},E.c=!1,E.d=!0,E.i=0,E.j=0,E.k=0,E.n=0,te(ns,"VerticalSegment",142),W(586,1,{},X$),E.e=!1,te(so,"AllCrossingsCounter",586),W(339,1,{}),te(so,"BetweenLayerEdgeAllCrossingsCounter",339),W(613,1,{},Lee),E.c=0,E.e=0,E.i=0,te(so,"BetweenLayerEdgeTwoNodeCrossingsCounter",613),W(284,1,{284:1},JJ),E.w=function(){return"AdjacencyList [node="+this.d+", adjacencies= "+this.a+"]"},E.b=0,E.c=0,E.f=0,te(so,"BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList",284),W(128,1,{128:1,23:1},DK),E.F=function(e){return D1e(this,v(e,128))},E.w=function(){return"Adjacency [position="+this.c+", cardinality="+this.a+", currentCardinality="+this.b+"]"},E.a=0,E.b=0,E.c=0,te(so,"BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency",128),W(610,339,{},AZ),E.Gc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In,Li,Ca,fu,Ls,Fd,nl,dh,$i,Oi,Br,gi,Os,os,rl,Uo,kg,Ud,Yo,ff,uc,cc,Rs,Ki,Ds,ph,lc,gh,il,_g,AC,ise;for(Rs=0,on=0,Ca=e.length;on<Ca;++on)if(mt=e[on],Gi(v(X(mt,(Ye(),St)),28)))for(gi=new V(mt.f);gi.a<gi.c.c.length;){for(Br=v($(gi),7),os=0,y=new V(Br.e);y.a<y.c.c.length;)g=v($(y),12),mt.d!=g.d.f.d&&++os;os>0&&(this.a[Br.k]=Rs++)}else{for(Ls=0,gi=new V(mt.f);gi.a<gi.c.c.length;){for(Br=v($(gi),7),y=new V(Br.e);y.a<y.c.c.length;)g=v($(y),12),mt.d!=g.d.f.d&&++Ls;this.a[Br.k]=Rs}Ls>0&&++Rs}for(gh=0,In=0,fu=n.length;In<fu;++In)if(mt=n[In],Gi(v(X(mt,(Ye(),St)),28))){for(Fd=0,gi=new V(mt.f);gi.a<gi.c.c.length&&(Br=v($(gi),7),Br.g==(Be(),yt));)for(y=new V(Br.b);y.a<y.c.c.length;)if(g=v($(y),12),mt.d!=g.c.f.d){++Fd;break}for(dh=0,rl=new jn(mt.f,mt.f.c.length);rl.b>0;){for(Br=(_t(rl.b>0),v(rl.a.sb(rl.c=--rl.b),7)),os=0,y=new V(Br.b);y.a<y.c.c.length;)g=v($(y),12),mt.d!=g.c.f.d&&++os;os>0&&(Br.g==(Be(),yt)?(this.a[Br.k]=gh,++gh):(this.a[Br.k]=gh+Fd+dh,++dh))}gh+=dh}else{for(Ls=0,gi=new V(mt.f);gi.a<gi.c.c.length;){for(Br=v($(gi),7),y=new V(Br.b);y.a<y.c.c.length;)g=v($(y),12),mt.d!=g.c.f.d&&++Ls;this.a[Br.k]=gh}Ls>0&&++gh}for(Os=new an,ee=new ai,Pt=0,Li=e.length;Pt<Li;++Pt)for(mt=e[Pt],ph=new V(mt.f);ph.a<ph.c.c.length;)for(Ds=v($(ph),7),y=new V(Ds.e);y.a<y.c.c.length;)if(g=v($(y),12),_g=g.d,mt.d!=_g.f.d)if(Ki=v(Ti(Mi(Os.d,Ds)),204),il=v(Ti(Mi(Os.d,_g)),204),!Ki&&!il)Y=new GK,ee.a.db(Y,ee),_n(Y.a,g),_n(Y.e,Ds),Ta(Os.d,Ds,Y),_n(Y.e,_g),Ta(Os.d,_g,Y);else if(!Ki)_n(il.a,g),_n(il.e,Ds),Ta(Os.d,Ds,il);else if(!il)_n(Ki.a,g),_n(Ki.e,_g),Ta(Os.d,_g,Ki);else if(Ki==il)_n(Ki.a,g);else{for(_n(Ki.a,g),Oi=xn(il.e,0);Oi.b!=Oi.d.c;)$i=v(fn(Oi),7),Ta(Os.d,$i,Ki);Na(Ki.a,il.a),Na(Ki.e,il.e),ee.a.eb(il)!=null}for(re=v(Wk(ee,Ie(S3e,{675:1,3:1,5:1,6:1},204,ee.a.Y(),0,1)),675),pt=e[0].d,cc=n[0].d,O=0,G=re.length;O<G;++O)for(A=re[O],A.f=Rs,A.g=gh,gi=xn(A.e,0);gi.b!=gi.d.c;)Br=v(fn(gi),7),Uo=this.a[Br.k],Br.f.d==pt?(Uo<A.f&&(A.f=Uo,A.b=Ec(Br)),Uo>A.c&&(A.c=Uo)):Br.f.d==cc&&(Uo<A.g&&(A.g=Uo),Uo>A.d&&(A.d=Uo));for(gd(re,0,re.length,(Nf(),Nf(),hh)),lc=Ie(pr,hr,26,re.length,12,1),i=Ie(pr,hr,26,gh+1,12,1),ce=0;ce<re.length;ce++)lc[ce]=re[ce].g,i[lc[ce]]=1;for(f=0,de=0;de<i.length;de++)i[de]==1?i[de]=f:--f;for(kg=0,ye=0;ye<lc.length;ye++)lc[ye]+=i[lc[ye]],kg=mi(kg,lc[ye]+1);for(N=1;N<kg;)N*=2;for(ise=2*N-1,N-=1,AC=Ie(pr,hr,26,ise,12,1),u=0,_=0,C=lc.length;_<C;++_)for(x=lc[_],Ue=x+N,++AC[Ue];Ue>0;)Ue%2>0&&(u+=AC[Ue+1]),Ue=(Ue-1)/2|0,++AC[Ue];for(ht=Ie(wae,tt,158,re.length*2,0,1),Ee=0;Ee<re.length;Ee++)ht[2*Ee]=new ay(re[Ee],re[Ee].f,re[Ee].c,0),ht[2*Ee+1]=new ay(re[Ee],re[Ee].c,re[Ee].f,1);for(gd(ht,0,ht.length,hh),nl=0,Ge=0,rt=ht.length;Ge<rt;++Ge)switch(qe=ht[Ge],qe.d){case 0:++nl;break;case 1:--nl,u+=nl}for(uc=Ie(wae,tt,158,re.length*2,0,1),oe=0;oe<re.length;oe++)uc[2*oe]=new ay(re[oe],re[oe].g,re[oe].d,0),uc[2*oe+1]=new ay(re[oe],re[oe].d,re[oe].g,1);for(gd(uc,0,uc.length,hh),nl=0,Yo=0,ff=uc.length;Yo<ff;++Yo)switch(Ud=uc[Yo],Ud.d){case 0:++nl;break;case 1:--nl,u+=nl}return u},te(so,"BetweenLayerHyperedgeAllCrossingsCounter",610),W(204,1,{204:1,23:1},GK),E.F=function(e){return j2e(this,v(e,204))},E.b=0,E.c=0,E.d=0,E.f=0,E.g=0;var S3e=te(so,"BetweenLayerHyperedgeAllCrossingsCounter/Hyperedge",204);W(158,1,{158:1,23:1},ay),E.F=function(e){return wke(this,v(e,158))},E.b=0,E.c=0,E.d=0;var wae=te(so,"BetweenLayerHyperedgeAllCrossingsCounter/HyperedgeCorner",158);W(611,339,{},IZ),E.Gc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge;for(Ge=0,g=0,x=e[0].d,ye=n[0].d,N=0,O=n.length;N<O;++N)if(_=n[N],Gi(v(X(_,(Ye(),St)),28))){for(Y=0,oe=new V(_.f);oe.a<oe.c.c.length&&(re=v($(oe),7),re.g==(Be(),yt));)for(f=new V(re.b);f.a<f.c.c.length;)if(u=v($(f),12),u.c.f.d==x){++Y;break}for(ee=0,de=new jn(_.f,_.f.c.length);de.b>0;){for(re=(_t(de.b>0),v(de.a.sb(de.c=--de.b),7)),ce=0,f=new V(re.b);f.a<f.c.c.length;)u=v($(f),12),u.c.f.d==x&&++ce;ce>0&&(re.g==(Be(),yt)?(this.a[re.k]=Ge,++Ge):(this.a[re.k]=Ge+Y+ee,++ee),g+=ce)}Ge+=ee}else{for(G=0,oe=new V(_.f);oe.a<oe.c.c.length;){for(re=v($(oe),7),f=new V(re.b);f.a<f.c.c.length;)u=v($(f),12),u.c.f.d==x&&++G;this.a[re.k]=Ge}G>0&&(++Ge,g+=G)}for(Ee=Ie(pr,hr,26,g,12,1),y=0,C=0,A=e.length;C<A;++C)if(_=e[C],Gi(v(X(_,(Ye(),St)),28)))for(oe=new V(_.f);oe.a<oe.c.c.length;)for(re=v($(oe),7),Ue=y,f=new V(re.e);f.a<f.c.c.length;)u=v($(f),12),qe=u.d,qe.f.d==ye&&oX(Ee,Ue,y++,this.a[qe.k]);else for(Ue=y,oe=new V(_.f);oe.a<oe.c.c.length;)for(re=v($(oe),7),f=new V(re.e);f.a<f.c.c.length;)u=v($(f),12),qe=u.d,qe.f.d==ye&&oX(Ee,Ue,y++,this.a[qe.k]);return i=Wxe(Ge,g,Ee),i},te(so,"BetweenLayerStraightEdgeAllCrossingsCounter",611),W(338,1,{},c7),E.b=0,E.e=!1,te(so,"CrossingMatrixFiller",338),W(447,1,Bn,Wa),E.sc=function(e,n){var i,u,f,g;if($t(n,"Greedy switch crossing reduction",1),this.e=v(X(e,(tn(),wC)),110),i=e.c.c.length,i<2||this.e==(gv(),rC)){zt(n);return}SEe(this,e),this.e.b?(this.e.a?BA(this):sA(this),u=dxe(this),f=this.e.a?this.c:e_(this.b,this.d),this.i=!this.i,this.d=this.g,this.e.a?BA(this):sA(this),g=this.e.a?this.c:e_(this.b,this.d),f<=g&&CA(this,u)):this.e.a?BA(this):sA(this),vke(this,this.a),zt(n)},E.c=0,E.i=!0,te(so,"GreedySwitchProcessor",447),W(340,1,{},zA),te(so,"InLayerEdgeAllCrossingsCounter",340),W(614,340,{},XK),E.b=0,E.d=0,te(so,"InLayerEdgeTwoNodeCrossingCounter",614),W(226,1,{226:1,23:1},Rj),E.F=function(e){return W2e(this,v(e,226))},E.w=function(){return"ComparableEdgeAndPort [port="+this.b+", edge="+this.a+", portPosition="+this.c+"]"},E.c=0,te(so,"InLayerEdgeTwoNodeCrossingCounter/ComparableEdgeAndPort",226),W(612,1,{},Eee),E.e=!0,E.f=0,E.g=0,E.k=!1,te(so,"NorthSouthEdgeAllCrossingsCounter",612),W(615,1,{},rX),E.b=0,E.d=0,E.e=!1,te(so,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",615),W(143,1,Bc,_l),E.mb=function(){return zl(this)},E.b=0,te(so,"PortIterable",143),W(344,1,kr,qj),E.H=function(){return v(HQ(this.a),7)},E.G=function(){return this.a.b>0},E.I=function(){throw new cr},te(so,"PortIterable/1",344),W(336,1,{},a7),te(so,"SwitchDecider",336),W(89,1,{89:1},vc),E.w=function(){return"NEdge[id="+this.b+" w="+this.f+" d="+this.a+"]"},E.a=1,E.b=0,E.e=!1,E.f=0;var xae=te(rg,"NEdge",89);W(157,1,{},_f),te(rg,"NEdge/NEdgeBuilder",157),W(278,1,{},G2),te(rg,"NGraph",278),W(61,1,{61:1},UW),E.b=0,E.d=-1,E.e=0,E.i=-1,E.j=!1;var l9=te(rg,"NNode",61);W(333,13,yI,t6),E.rb=function(e,n){++this.d,Ll(e,this.c.length),Pb(this.c,e,n)},E.ib=function(e){return Nc(this,e)},E.jb=function(e){return++this.d,$n(this,e)},E.Q=function(){++this.d,this.c=Ie(dt,tt,1,0,4,1)},E.vb=function(e){return++this.d,Gf(this,e)},E.nb=function(e){return hK(this,e)},te(rg,"NNode/ChangeAwareArrayList",333),W(199,1,{},bp),te(rg,"NNode/NNodeBuilder",199),W(595,1,{},ob),E.a=!1,E.f=Or,E.j=0,te(rg,"NetworkSimplex",595),W(193,17,{180:1,193:1,3:1,23:1,17:1},T6),E.rc=function(){switch(this.e){case 0:return new fQ;case 1:return new eq;default:throw new Pn("No implementation is available for the cycle breaker "+(this.d!=null?this.d:""+this.e))}};var OE,f9,kae=Jt(xI,"CycleBreakingStrategy",193,En,hye),_ae;W(539,1,_s,fQ),E.qc=function(e){return Eae},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In;for($t(n,"Greedy cycle removal",1),oe=e.b,In=oe.c.length,this.a=Ie(pr,hr,26,In,12,1),this.c=Ie(pr,hr,26,In,12,1),this.b=Ie(pr,hr,26,In,12,1),x=0,ee=new V(oe);ee.a<ee.c.c.length;){for(G=v($(ee),9),G.k=x,Ue=new V(G.f);Ue.a<Ue.c.c.length;){for(ye=v($(Ue),7),g=new V(ye.b);g.a<g.c.c.length;)i=v($(g),12),i.c.f!=G&&(rt=v(X(i,(Ce(),No)),24).a,this.a[x]+=rt>0?rt+1:1);for(f=new V(ye.e);f.a<f.c.c.length;)i=v($(f),12),i.d.f!=G&&(rt=v(X(i,(Ce(),No)),24).a,this.c[x]+=rt>0?rt+1:1)}this.c[x]==0?_n(this.d,G):this.a[x]==0&&_n(this.e,G),++x}for(O=-1,A=1,C=new Ve,ht=v(X(e,(Ce(),Hd)),154);In>0;){for(;this.d.b!=0;)mt=v(dj(this.d),9),this.b[mt.k]=O--,I7(this,mt),--In;for(;this.e.b!=0;)Pt=v(dj(this.e),9),this.b[Pt.k]=A++,I7(this,Pt),--In;if(In>0){for(N=_u,re=new V(oe);re.a<re.c.c.length;)G=v($(re),9),this.b[G.k]==0&&(ce=this.c[G.k]-this.a[G.k],ce>=N&&(ce>N&&(C.c=Ie(dt,tt,1,0,4,1),N=ce),C.c[C.c.length]=G));_=v(ct(C,KA(ht,C.c.length)),9),this.b[_.k]=A++,I7(this,_),--In}}for(pt=oe.c.length+1,x=0;x<oe.c.length;x++)this.b[x]<0&&(this.b[x]+=pt);for(Y=new V(oe);Y.a<Y.c.c.length;)for(G=v($(Y),9),Ge=v(fr(G.f,Ie(sae,yre,7,G.f.c.length,0,1)),346),Ee=0,qe=Ge.length;Ee<qe;++Ee)for(ye=Ge[Ee],de=v(fr(ye.e,Ie(_a,va,12,ye.e.c.length,0,1)),47),u=0,y=de.length;u<y;++u)i=de[u],on=i.d.f.k,this.b[G.k]>this.b[on]&&(Vl(i,!0),_e(e,D9,(zn(),zn(),Ei)));this.a=null,this.c=null,this.b=null,vu(this.e),vu(this.d),zt(n)};var Eae;te(xI,"GreedyCycleBreaker",539),W(540,1,_s,eq),E.qc=function(e){return Cae},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for($t(n,"Interactive cycle breaking",1),N=new Ve,O=new V(e.b);O.a<O.c.c.length;)for(A=v($(O),9),A.k=1,G=n7(A).a,C=tu(A,(Cr(),_i)).mb();C.G();)for(_=v(C.H(),7),f=new V(_.e);f.a<f.c.c.length;)i=v($(f),12),Y=i.d.f,Y!=A&&(ee=n7(Y).a,ee<G&&(N.c[N.c.length]=i));for(g=new V(N);g.a<g.c.c.length;)i=v($(g),12),Vl(i,!0);for(N.c=Ie(dt,tt,1,0,4,1),x=new V(e.b);x.a<x.c.c.length;)y=v($(x),9),y.k>0&&Qee(this,y,N);for(u=new V(N);u.a<u.c.c.length;)i=v($(u),12),Vl(i,!0);N.c=Ie(dt,tt,1,0,4,1),zt(n)};var Cae;te(xI,"InteractiveCycleBreaker",540),W(543,1,_s,gl),E.qc=function(e){return zi(Sc(new Jn,(Vr(),SE)),Cm)},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee;for($t(n,"Interactive node layering",1),i=new Ve,A=new V(e.b);A.a<A.c.c.length;){for(C=v($(A),9),x=C.i.a,y=x+C.j.a,y=x+1>y?x+1:y,ee=new jn(i,0),u=null;ee.b<ee.d.Y();)if(G=(_t(ee.b<ee.d.Y()),v(ee.d.sb(ee.c=ee.b++),239)),G.c>=y){_t(ee.b>0),ee.a.sb(ee.c=--ee.b);break}else G.a>x&&(u?($n(u.b,G.b),u.a=et(u.a,G.a),Jo(ee)):(Ke(G.b,C),G.c=mn(G.c,x),G.a=et(G.a,y),u=G));u||(u=new uZ,u.c=x,u.a=y,Uu(ee,u),Ke(u.b,C))}for(g=e.c,_=0,Y=new V(i);Y.a<Y.c.c.length;)for(G=v($(Y),239),f=new Nl(e),f.k=_++,g.c[g.c.length]=f,O=new V(G.b);O.a<O.c.c.length;)C=v($(O),9),Wr(C,f),C.k=0;for(N=new V(e.b);N.a<N.c.c.length;)C=v($(N),9),C.k==0&&Ute(this,C,e);for(;(qn(0,g.c.length),v(g.c[0],16)).a.c.length==0;)qn(0,g.c.length),g.c.splice(0,1);e.b.c=Ie(dt,tt,1,0,4,1),zt(n)},te(im,"InteractiveLayerer",543),W(239,1,{239:1},uZ),E.a=0,E.c=0,te(im,"InteractiveLayerer/LayerSpan",239),W(173,17,{180:1,173:1,3:1,23:1,17:1},sx),E.rc=function(){switch(this.e){case 0:return new cK;case 1:return new XV;case 2:return new gl;default:throw new Pn("No implementation is available for the layerer "+(this.d!=null?this.d:""+this.e))}};var h9,d9,RE,Pae=Jt(im,"LayeringStrategy",173,En,Cye),Sae;W(542,1,_s,XV),E.qc=function(e){var n;return n=Z1(Nae),Yt(Re(Zt(X(e,(tn(),mC)))))||ut(X(e,wg))===ut((qu(),xg))?Fr(n,Tae):ut(X(e,wg))===ut((qu(),t0))&&Fr(n,Mae),Yt(Re(Zt(X(e,J9))))&&no(n,(Vr(),ZL)),n},E.sc=function(e,n){var i,u,f,g,y;for($t(n,"Longest path layering",1),this.a=e,y=this.a.b,this.b=Ie(pr,hr,26,y.c.length,12,1),i=0,g=new V(y);g.a<g.c.c.length;)u=v($(g),9),u.k=i,this.b[i]=-1,++i;for(f=new V(y);f.a<f.c.c.length;)u=v($(f),9),Ete(this,u);y.c=Ie(dt,tt,1,0,4,1),this.a=null,this.b=null,zt(n)};var Nae,Tae,Mae;te(im,"LongestPathLayerer",542),W(541,1,_s,cK),E.qc=function(e){var n;return n=Z1(jae),Yt(Re(Zt(X(e,(tn(),mC)))))||ut(X(e,wg))===ut((qu(),xg))?(Fr(n,Aae),this.d=(qu(),xg)):ut(X(e,wg))===ut((qu(),t0))&&(Fr(n,Iae),this.d=t0),n},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;if($t(n,"Network simplex layering",1),this.b=e,A=v(X(e,(tn(),mg)),24).a*4,N=this.b.b,N.c.length<1){zt(n);return}for(u=xn(U_e(this,N),0);u.b!=u.d.c;)for(i=v(fn(u),20),g=A*vr(F$(i.Y())),f=B_e(i),j7(zZ(v0e(FZ(uj(f),g),this.b),this.d==(qu(),xg)),zf(n,1)),x=this.b.c,C=new V(f.a);C.a<C.c.c.length;){for(_=v($(C),61);x.c.length<=_.e;)El(x,x.c.length,new Nl(this.b));y=v(_.f,9),Wr(y,v(ct(x,_.e),16))}N.c=Ie(dt,tt,1,0,4,1),this.a=null,this.b=null,this.c=null,zt(n)};var jae,Aae,Iae;te(im,"NetworkSimplexLayerer",541),W(326,1,{}),te(Fc,"AbstractPortDistributor",326),W(558,1,Zr,Fq),E.$b=function(e,n){return D2e(this,v(e,7),v(n,7))},te(Fc,"AbstractPortDistributor/1",558),W(564,1,{},yJ),te(Fc,"BarycenterHeuristic",564),W(272,1,{272:1},Vq),E.b=0,E.d=0,E.e=!1;var Lae=te(Fc,"BarycenterHeuristic/BarycenterState",272);W(565,1,Zr,Uq),E.$b=function(e,n){return Oxe(this.a,e,n)},te(Fc,"BarycenterHeuristic/lambda$0$Type",565),W(192,17,{180:1,192:1,3:1,23:1,17:1},M6),E.rc=function(){switch(this.e){case 0:return new a$;case 1:return new aq;default:throw new Pn("No implementation is available for the crossing minimizer "+(this.d!=null?this.d:""+this.e))}};var DE,BE,Oae=Jt(Fc,"CrossingMinimizationStrategy",192,En,dye),Rae;W(526,1,_s,aq),E.qc=function(e){var n;return n=Z1(Dae),v(X(e,(Ce(),ui)),18).kb((jr(),sh))&&zi(n,(Vr(),jE)),n},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;for($t(n,"Interactive crossing minimization",1),O=0,f=new V(e.c);f.a<f.c.c.length;){for(u=v($(f),16),i=0,C=0,_=new V(u.a);_.a<_.c.c.length;)for(y=v($(_),9),y.i.a>0&&(i+=y.i.a+y.j.a/2,++C),A=new V(y.f);A.a<A.c.c.length;)N=v($(A),7),N.k=O++;for(i/=C,Y=Ie(Ea,Ui,26,u.a.c.length,12,1),g=0,x=new V(u.a);x.a<x.c.c.length;)y=v($(x),9),y.k=g++,Y[y.k]=tCe(y,i),y.g==(gt(),An)&&_e(y,(Ce(),z9),Y[y.k]);wo(u.a,new Yq(Y))}G=new U2(Ie(Zm,rm,26,O,12,1)),Mee(G,ete(e)),zt(n)};var Dae;te(Fc,"InteractiveCrossingMinimizer",526),W(527,1,Zr,Yq),E.$b=function(e,n){return Txe(this,v(e,9),v(n,9))},te(Fc,"InteractiveCrossingMinimizer/1",527),W(525,1,_s,a$),E.qc=function(e){var n;return n=Z1(Bae),v(X(e,(Ce(),ui)),18).kb((jr(),sh))&&zi(n,(Vr(),jE)),n},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt;if($t(n,"Layer sweep crossing minimization",1),pt=v(X(e,(Ce(),Hd)),154),re=e.c.c.length,re<2){zt(n);return}for(n3e(this,e),u=Or,Pt=v(X(e,(tn(),mg)),24).a,i=Ie(Lae,qr,671,e.c.c.length,0,2),O=0,ee=new V(e.c);ee.a<ee.c.c.length;){for(Y=v($(ee),16),Y.k=O,i[O]=Ie(Lae,{671:1,3:1,5:1,6:1},272,Y.a.c.length,0,1),G=0,Ee=new V(Y.a);Ee.a<Ee.c.c.length;)ye=v($(Ee),9),ye.k=G,i[O][G]=new Vq(ye),++G;++O}for(f=new ute(i,this.g),g=new yJ(i,f,pt,this.j),qe=new U2(this.j),de=new g6(this.j),mt=0;mt<Pt&&u>0;mt++){N=qf(pt,1)!=0,C=N?0:re-1,_=this.b[C],rt=qf(pt,1)!=0?qe:de,GA(_,g,N,!1,!0),y=Or,x=!0;do{if(xA(this.b,this.k),ht=y,y=0,y+=cA(this.f,_,C),N){for(oe=1;oe<re;oe++)A=this.b[oe],tA(rt,_,(Cr(),_i)),GA(A,g,!0,!x,!1),y+=cA(this.f,A,oe),this.d[oe]||this.c[oe-1]?y+=Une(this.e,_,A):y+=zne(this.i,_,A),_=A;C=re-1}else{for(oe=re-2;oe>=0;oe--)A=this.b[oe],tA(rt,_,(Cr(),la)),GA(A,g,!1,!x,!1),y+=cA(this.f,A,oe),this.c[oe]||this.d[oe+1]?y+=Une(this.e,A,_):y+=zne(this.i,A,_),_=A;C=0}x=!1,N=!N}while(y<ht&&y>0);(y<u||ht<u)&&(y<=ht?(xA(this.b,this.a),u=y):(xA(this.k,this.a),u=ht))}for(ce=new jn(e.c,0);ce.b<ce.d.Y();)for(Y=(_t(ce.b<ce.d.Y()),v(ce.d.sb(ce.c=ce.b++),16)),Ge=this.a[ce.b-1],Ue=new jn(Y.a,0);Ue.b<Ue.d.Y();)_t(Ue.b<Ue.d.Y()),Ue.d.sb(Ue.c=Ue.b++),cj(Ue,Ge[Ue.b-1]);this.j=null,this.a=null,this.b=null,this.k=null,this.i=null,this.e=null,this.c=null,this.d=null,jj(this.g),zt(n)};var Bae;te(Fc,"LayerSweepCrossingMinimizer",525),W(327,326,{},g6),E.Hc=function(e,n,i){var u,f,g,y,x,_,C,N,A,O,G,Y;if(O=this.a,Gi(v(X(e,(Ye(),St)),28)))switch(i.e){case 1:{for(f=0,x=0,A=new V(e.f);A.a<A.c.c.length;)C=v($(A),7),C.b.c.length!=0&&(++f,C.g==(Be(),yt)&&++x);for(_=n+x,Y=n+f,N=tu(e,(Cr(),la)).mb();N.G();)C=v(N.H(),7),C.g==(Be(),yt)?(O[C.k]=_,--_):(O[C.k]=Y,--Y);return f}case 2:{for(G=0,N=tu(e,(Cr(),_i)).mb();N.G();)C=v(N.H(),7),++G,O[C.k]=n+G;return G}default:throw new vp}else{for(y=4,g=0,A=tu(e,i).mb();A.G();)C=v(A.H(),7),u=Pte(i,C.g),y=y<u-1?y:u-1,g=g>u?g:u;if(g>y){for(N=tu(e,i).mb();N.G();)C=v(N.H(),7),O[C.k]=n+Pte(i,C.g)-y;return g-y}return 0}},te(Fc,"LayerTotalPortDistributor",327),W(274,326,{},U2),E.Hc=function(e,n,i){var u,f,g,y,x,_,C,N,A,O,G;if(A=this.a,Gi(v(X(e,(Ye(),St)),28)))switch(i.e){case 1:{for(f=0,g=0,N=new V(e.f);N.a<N.c.c.length;)_=v($(N),7),_.b.c.length!=0&&(++f,_.g==(Be(),yt)&&++g);for(u=1/(f+1),y=n+g*u,G=n+1-u,C=tu(e,(Cr(),la)).mb();C.G();)_=v(C.H(),7),_.g==(Be(),yt)?(A[_.k]=y,y-=u):(A[_.k]=G,G-=u);break}case 2:{for(x=0,N=new V(e.f);N.a<N.c.c.length;)_=v($(N),7),_.e.c.length==0||++x;for(u=1/(x+1),O=n+u,C=tu(e,(Cr(),_i)).mb();C.G();)_=v(C.H(),7),A[_.k]=O,O+=u;break}default:throw new Pn(kI)}else for(C=tu(e,i).mb();C.G();)_=v(C.H(),7),A[_.k]=n+Kke(i,_.g);return 1},te(Fc,"NodeRelativePortDistributor",274),W(566,1,{},ute),te(Ere,"ForsterConstraintResolver",566),W(102,1,{102:1},iW,_ne),E.w=function(){var e,n;for(n=new kp,n.a+="[",e=0;e<this.d.length;e++)Ro(n,pW(this.d[e])),Xa(this.g,this.d[0]).a!=null&&Ro(Ro((n.a+="<",n),l$(Re(Xa(this.g,this.d[0]).a))),">"),e<this.d.length-1&&(n.a+=", ");return n.a+="]",n.a},E.a=0,E.c=0,E.f=0;var Gae=te(Ere,"ForsterConstraintResolver/ConstraintGroup",102);W(331,1,{}),te(Ev,"AbstractCrossingsCounter",331),W(568,331,{},PQ),te(Ev,"BarthJuengerMutzelCrossingsCounter",568),W(567,331,{},SQ),te(Ev,"HyperedgeCrossingsCounter",567),W(197,1,{197:1,23:1},VK),E.F=function(e){return q2e(this,v(e,197))},E.b=0,E.c=0,E.e=0,E.f=0;var N3e=te(Ev,"HyperedgeCrossingsCounter/Hyperedge",197);W(156,1,{156:1,23:1},oy),E.F=function(e){return zke(this,v(e,156))},E.b=0,E.c=0;var Hae=te(Ev,"HyperedgeCrossingsCounter/HyperedgeCorner",156);W(242,17,{242:1,3:1,23:1,17:1},L6);var $v,Kv,T3e=Jt(Ev,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",242,En,Lye);W(545,1,_s,oq),E.qc=function(e){return v(X(e,(Ce(),ui)),18).kb((jr(),As))?zae:null},E.sc=function(e,n){var i,u;for($t(n,"Interactive node placement",1),this.a=v(X(e,(Ce(),lf)),134),u=new V(e.c);u.a<u.c.c.length;)i=v($(u),16),u_e(this,i);zt(n)};var zae;te(Cv,"InteractiveNodePlacer",545),W(546,1,_s,sq),E.qc=function(e){return v(X(e,(Ce(),ui)),18).kb((jr(),As))?Fae:null},E.sc=function(e,n){$t(n,"Linear segments node placement",1),this.b=v(X(e,(Ce(),lf)),134),c3e(this,e),fEe(this,e),GEe(this,e),QCe(this),this.a=null,this.b=null,zt(n)};var Fae,Mm,jm;te(Cv,"LinearSegmentsNodePlacer",546),W(111,1,{111:1,23:1},r6),E.F=function(e){return P0e(this,v(e,111))},E.t=function(e){var n;return Ze(e,111)?(n=v(e,111),this.b==n.b):!1},E.v=function(){return this.b},E.w=function(){return"ls"+Dc(this.f)},E.a=0,E.b=0,E.c=-1,E.d=-1,E.i=0;var Uae=te(Cv,"LinearSegmentsNodePlacer/LinearSegment",111);W(548,1,_s,uq),E.qc=function(e){return v(X(e,(Ce(),ui)),18).kb((jr(),As))?Yae:null},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In;for(Pt=v(X(e,(Ce(),lf)),134),ye=(Wn(),new an),de=0,f=new G2,_=new V(e.c);_.a<_.c.c.length;)for(y=v($(_),16),ht=null,rt=null,G=new V(y.a);G.a<G.c.c.length;)O=v($(G),9),++de,ce=Mb(new bp,f),ce.f=O,Ta(ye.d,O,ce),O.e.d=S1(O.e.d),rt&&(oe=new vc,oe.f=0,oe.a=vr(H6(ht.e.d+ht.j.b+ht.e.a+Ob(Pt,v(rt.f,9),O))),oe.c=rt,oe.d=ce,Nc(rt.g,oe),Nc(ce.c,oe)),ht=O,rt=ce;for(C=new V(e.c);C.a<C.c.c.length;)for(y=v($(C),16),G=new V(y.a);G.a<G.c.c.length;)for(O=v($(G),9),qe=new V(O.f);qe.a<qe.c.c.length;)Ue=v($(qe),7),In=Ue.i.b+Ue.a.b,In!=Math.floor(In)&&(Ee=In-lme(bwe(Math.round(In))),Ue.i.b-=Ee);for(x=new V(e.c);x.a<x.c.c.length;)for(y=v($(x),16),G=new V(y.a);G.a<G.c.c.length;)for(O=v($(G),9),A=Vt(Un(O));Ft(A);)N=v(Ot(A),12),!Il(N)&&N.d.f.d!=y&&(mt=N.c.f.e.d+N.c.i.b+N.c.a.b,on=N.d.f.e.d+N.d.i.b+N.d.a.b,i=on-mt,Ge=vr(i),u=Mb(new bp,f),Y=new vc,Y.f=xee(N),Y.a=Ge>0?Ge:0,Y.c=u,Y.d=v(pn(ye,N.c.f),61),Nc(Y.c.g,Y),Nc(Y.d.c,Y),pt=new vc,pt.f=xee(N),pt.a=Ge<0?-Ge:0,pt.c=u,pt.d=v(pn(ye,N.d.f),61),Nc(pt.c.g,pt),Nc(pt.d.c,pt));for(g=v(X(e,(tn(),mg)),24).a*vr(Math.sqrt(de)),j7(zZ(FZ(uj(f),g),!1),zf(n,1)),re=new V(f.a);re.a<re.c.c.length;)ee=v($(re),61),ee.f!=null&&(O=v(ee.f,9),O.i.b=ee.e+O.e.d)};var Yae;te(Cv,"NetworkSimplexPlacer",548),W(141,17,{180:1,141:1,3:1,23:1,17:1},_b),E.rc=function(){switch(this.e){case 0:return new cq;case 1:return new oq;case 2:return new sq;case 3:return new Y$;case 4:return new uq;default:throw new Pn("No implementation is available for the node placer "+(this.d!=null?this.d:""+this.e))}};var GE,p9,g9,b9,v9,Vae=Jt(Cv,"NodePlacementStrategy",141,En,Bme),qae;W(544,1,_s,cq),E.qc=function(e){return v(X(e,(Ce(),ui)),18).kb((jr(),As))?Zae:null},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for($t(n,"Simple node placement",1),A=v(X(e,(Ce(),lf)),134),x=0,g=new V(e.c);g.a<g.c.c.length;){for(u=v($(g),16),y=u.c,y.b=0,i=null,C=new V(u.a);C.a<C.c.c.length;)_=v($(C),9),i&&(y.b+=Sx(A,_.g,i.g)*A.d),y.b+=_.e.d+_.j.b+_.e.a,i=_;x=et(x,y.b)}for(f=new V(e.c);f.a<f.c.c.length;)for(u=v($(f),16),y=u.c,N=(x-y.b)/2,i=null,C=new V(u.a);C.a<C.c.c.length;)_=v($(C),9),i&&(N+=Sx(A,_.g,i.g)*A.d),N+=_.e.d,_.i.b=N,N+=_.j.b+_.e.a,i=_;zt(n)};var Zae;te(Cv,"SimpleNodePlacer",544),W(81,1,{81:1},Fl),E.w=function(){var e;return e="",this.c==(Xo(),$c)?e+=Jp:this.c==uu&&(e+=Wp),this.k==(Bo(),nc)?e+="DOWN":this.k==So?e+="UP":e+="BALANCED",e},te(Es,"BKAlignedLayout",81),W(248,17,{248:1,3:1,23:1,17:1},O6);var uu,$c,M3e=Jt(Es,"BKAlignedLayout/HDirection",248,En,Oye);W(247,17,{247:1,3:1,23:1,17:1},R6);var nc,So,j3e=Jt(Es,"BKAlignedLayout/VDirection",247,En,Rye);W(596,1,{},G$),te(Es,"BKAligner",596),W(599,1,{},Tee),te(Es,"BKCompactor",599),W(279,1,{279:1},hp),E.a=0,te(Es,"BKCompactor/ClassEdge",279),W(200,1,{200:1},hZ),E.a=0,E.b=0,te(Es,"BKCompactor/ClassNode",200),W(547,1,_s,Y$),E.qc=function(e){return v(X(e,(Ce(),ui)),18).kb((jr(),As))?$ae:null},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de;switch($t(n,"Brandes & Koepf node placement",1),this.b=e,this.d=lEe(e),this.a=Yt(Re(Zt(X(e,(tn(),q9))))),this.e=ut(X(e,Fm))===ut((av(),XE)),eCe(this,e),G=(ji(4,ql),new aa(4)),v(X(e,Fm),124).e){case 3:Y=new Fl(e,this.d.d,(Bo(),nc),(Xo(),uu)),G.c[G.c.length]=Y;break;case 1:ee=new Fl(e,this.d.d,(Bo(),So),(Xo(),uu)),G.c[G.c.length]=ee;break;case 4:ce=new Fl(e,this.d.d,(Bo(),nc),(Xo(),$c)),G.c[G.c.length]=ce;break;case 2:de=new Fl(e,this.d.d,(Bo(),So),(Xo(),$c)),G.c[G.c.length]=de;break;default:Y=new Fl(e,this.d.d,(Bo(),nc),(Xo(),uu)),ee=new Fl(e,this.d.d,So,uu),ce=new Fl(e,this.d.d,nc,$c),de=new Fl(e,this.d.d,So,$c),G.c[G.c.length]=ce,G.c[G.c.length]=de,G.c[G.c.length]=Y,G.c[G.c.length]=ee}for(i=new G$(e,this.d),g=new V(G);g.a<g.c.c.length;)u=v($(g),81),UCe(i,u,this.c),yEe(u);for(N=new Tee(e,this.d),y=new V(G);y.a<y.c.c.length;)u=v($(y),81),SCe(N,u);if(this.a)for(x=new V(G);x.a<x.c.c.length;)u=v($(x),81),jf(),u+""+l_(u);if(C=null,this.e&&(_=HCe(this,G,this.d.d),tne(this,e,_)&&(C=_)),!C)for(x=new V(G);x.a<x.c.c.length;)u=v($(x),81),tne(this,e,u)&&(!C||l_(C)>l_(u))&&(C=u);for(!C&&(C=(qn(0,G.c.length),v(G.c[0],81))),O=new V(e.c);O.a<O.c.c.length;)for(A=v($(O),16),oe=new V(A.a);oe.a<oe.c.c.length;)re=v($(oe),9),re.i.b=Re(C.n[re.k])+Re(C.d[re.k]);for(this.a&&(jf(),""+wte(C),""+Wke(C)),f=new V(G);f.a<f.c.c.length;)u=v($(f),81),u.f=null,u.b=null,u.a=null,u.d=null,u.i=null,u.g=null,u.n=null;Nwe(this.d),this.c.a.Q(),zt(n)},E.a=!1,E.e=!1;var $ae;te(Es,"BKNodePlacer",547),W(194,17,{194:1,3:1,23:1,17:1},D6);var HE,zE,Kae=Jt(Es,"CompactionStrategy",194,En,Dye),Qae;W(597,1,{},a1),E.d=0,te(Es,"NeighborhoodInformation",597),W(598,1,Zr,Zq),E.$b=function(e,n){return Swe(this,v(e,27),v(n,27))},te(Es,"NeighborhoodInformation/NeighborComparator",598),W(334,1,{}),te(Es,"ThresholdStrategy",334),W(602,334,{},PZ),E.Ic=function(e,n,i){return this.a.k==(Bo(),So)?Vi:ti},E.Jc=function(){},te(Es,"ThresholdStrategy/NullThresholdStrategy",602),W(249,1,{249:1},H$),E.c=!1,E.d=!1,te(Es,"ThresholdStrategy/Postprocessable",249),W(603,334,{},SZ),E.Ic=function(e,n,i){var u,f,g;return f=n==i,u=this.a.a[i.k]==n,f||u?(g=e,this.a.c==(Xo(),$c)?(f&&(g=v_(this,n,!0)),(g==1/0||g==-1/0)&&u&&(g=v_(this,i,!1))):(f&&(g=v_(this,n,!0)),(g==1/0||g==-1/0)&&u&&(g=v_(this,i,!1))),g):e},E.Jc=function(){for(var e,n,i,u;this.d.b!=0;)u=v(Pye(this.d),249),i=qte(this,u),i.a&&(e=i.a,this.c.a[e.c.f.d.k]!==this.c.a[e.d.f.d.k]&&(n=kte(this,u),n||W$(this.e,u)));for(;this.e.a.c.length!=0;)kte(this,v(kX(this.e),249))},te(Es,"ThresholdStrategy/SimpleThresholdStrategy",603),W(423,1,{180:1},o1),E.rc=function(){switch(this.a.e){case 1:return new V$;case 3:return new fq;default:return new lq}},te(Zl,"EdgeRouterFactory",423),W(538,1,_s,lq),E.qc=function(e){var n,i;return i=v(X(e,(Ce(),ui)),18),n=new Jn,i.kb((jr(),Om))&&(Fr(n,eoe),Fr(n,y9)),(i.kb(sh)||Yt(Re(Zt(X(e,(tn(),e0))))))&&(Fr(n,y9),i.kb(uh)&&Fr(n,noe)),i.kb(As)&&Fr(n,Xae),i.kb(Rm)&&Fr(n,roe),i.kb(nC)&&Fr(n,toe),i.kb(fg)&&Fr(n,Wae),i.kb(hg)&&Fr(n,Jae),n},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y;$t(n,"Orthogonal edge routing",1),O=v(X(e,(Ce(),lf)),134),Yt(Re(Zt(X(e,(Ye(),Mv))))),N=new n_(0,O.a),Y=0,g=new jn(e.c,0),y=null,x=null;do _=g.b<g.d.Y()?(_t(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16)):null,C=_?_.a:null,y&&(q7(y,Y),Y+=y.c.a),G=y?Y+O.b:Y,A=G7(N,e,x,C,G),u=!y||wx(x,(Ry(),Am)),f=!_||wx(C,(Ry(),Am)),A>0?(i=O.b+(A-1)*O.a,_&&(i+=O.b),i<O.f&&!u&&!f&&(i=O.f),Y+=i):!u&&!f&&(Y+=O.f),y=_,x=C;while(_);e.e.a=Y,zt(n)};var Wae,Jae,Xae,eoe,toe,y9,noe,roe;te(Zl,"OrthogonalEdgeRouter",538),W(277,1,{},n_),E.a=0,E.c=0,te(Zl,"OrthogonalRoutingGenerator",277),W(118,1,{118:1},xy),E.w=function(){return this.a+"->"+this.b},E.c=0,te(Zl,"OrthogonalRoutingGenerator/Dependency",118),W(80,1,{80:1,23:1},aX),E.F=function(e){return S0e(this,v(e,80))},E.t=function(e){var n;return Ze(e,80)?(n=v(e,80),this.d==n.d):!1},E.v=function(){return this.d},E.w=function(){var e,n,i,u;for(e=new xp("{"),u=new V(this.g);u.a<u.c.c.length;)i=v($(u),7),n=gy(i.f),n==null&&(n="n"+WK(i.f)),e.a+=""+n,u.a<u.c.c.length&&(e.a+=",");return e.a+="}",e.a},E.a=NaN,E.c=0,E.d=0,E.f=0,E.i=0,E.k=NaN,te(Zl,"OrthogonalRoutingGenerator/HyperNode",80),W(580,1,{},$q),E.Kc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for(A=n+e.i*this.a.c,x=new V(e.g);x.a<x.c.c.length;)for(y=v($(x),7),_=Mn(be(ve(rn,1),nn,10,0,[y.f.i,y.i,y.a])).a,u=new V(y.e);u.a<u.c.c.length;)i=v($(u),12),C=i.d,N=Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).a,(_-N<=0?0-(_-N):_-N)>Ju&&(f=new kt(_,A),_n(i.a,f),dv(this.a,i,e,f,!1),g=new kt(N,A),_n(i.a,g),dv(this.a,i,e,g,!1))},E.Lc=function(e){return e.f.i.a+e.i.a+e.a.a},E.Mc=function(){return Be(),Et},E.Nc=function(){return Be(),yt},te(Zl,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",580),W(581,1,{},Kq),E.Kc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for(A=n-e.i*this.a.c,x=new V(e.g);x.a<x.c.c.length;)for(y=v($(x),7),_=Mn(be(ve(rn,1),nn,10,0,[y.f.i,y.i,y.a])).a,u=new V(y.e);u.a<u.c.c.length;)i=v($(u),12),C=i.d,N=Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).a,(_-N<=0?0-(_-N):_-N)>Ju&&(f=new kt(_,A),_n(i.a,f),dv(this.a,i,e,f,!1),g=new kt(N,A),_n(i.a,g),dv(this.a,i,e,g,!1))},E.Lc=function(e){return e.f.i.a+e.i.a+e.a.a},E.Mc=function(){return Be(),yt},E.Nc=function(){return Be(),Et},te(Zl,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",581),W(579,1,{},Qq),E.Kc=function(e,n){var i,u,f,g,y,x,_,C,N,A;for(A=n+e.i*this.a.c,x=new V(e.g);x.a<x.c.c.length;)for(y=v($(x),7),_=Mn(be(ve(rn,1),nn,10,0,[y.f.i,y.i,y.a])).b,u=new V(y.e);u.a<u.c.c.length;)i=v($(u),12),C=i.d,N=Mn(be(ve(rn,1),nn,10,0,[C.f.i,C.i,C.a])).b,(_-N<=0?0-(_-N):_-N)>Ju&&(f=new kt(A,_),_n(i.a,f),dv(this.a,i,e,f,!0),g=new kt(A,N),_n(i.a,g),dv(this.a,i,e,g,!0))},E.Lc=function(e){return e.f.i.b+e.i.b+e.a.b},E.Mc=function(){return Be(),ot},E.Nc=function(){return Be(),lt},te(Zl,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",579),W(535,1,_s,V$),E.qc=function(e){var n,i;return i=v(X(e,(Ce(),ui)),18),n=new Jn,(i.kb((jr(),sh))||Yt(Re(Zt(X(e,(tn(),e0))))))&&(Fr(n,ooe),i.kb(uh)&&Fr(n,soe)),i.kb(fg)&&Fr(n,ioe),i.kb(hg)&&Fr(n,aoe),n},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee;for($t(n,"Polyline edge routing",1),A=v(X(e,(Ce(),ca)),15).a,i=v(X(e,(tn(),Au)),15).a,re=0,e.c.c.length!=0&&(oe=_te(v(ct(e.c,0),16)),re=.4*i*oe),g=new jn(e.c,0);g.b<g.d.Y();){for(f=(_t(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16)),u=wx(f,Am),u&&re>0&&(re-=A),q7(f,re),_=0,N=new V(f.a);N.a<N.c.c.length;){for(C=v($(N),9),x=0,G=Vt(Un(C));Ft(G);)O=v(Ot(G),12),Y=ra(O.c).b,ee=ra(O.d).b,f==O.d.f.d&&(ce=O.c,de=O.d,ye=(Mn(be(ve(rn,1),nn,10,0,[ce.f.i,ce.i,ce.a])).b+Mn(be(ve(rn,1),nn,10,0,[de.f.i,de.i,de.a])).b)/2,ce.g==(Be(),ot)?Ee=new kt(re+ce.f.d.c.a+.4*i*(Y-ee<=0?0-(Y-ee):Y-ee),ye):Ee=new kt(re-.4*i*(Y-ee<=0?0-(Y-ee):Y-ee),ye),G1(O.a,0,Ee),O.c.g==lt&&(Y=0,ee=0)),x=x>(ee-Y<=0?0-(ee-Y):ee-Y)?x:ee-Y<=0?0-(ee-Y):ee-Y;switch(C.g.e){case 0:case 4:case 1:case 3:kEe(this,C,re)}_=_>x?_:x}g.b<g.d.Y()&&(oe=_te((_t(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16))),_=_>oe?_:oe,_t(g.b>0),g.a.sb(g.c=--g.b)),y=.4*i*_,!u&&g.b<g.d.Y()&&(y+=A),re+=f.c.a+y}this.a.a.Q(),e.e.a=re,zt(n)};var ioe,aoe,ooe,soe,Am;te(Zl,"PolylineEdgeRouter",535),W(536,1,Ho,E2),E.D=function(e){return XJ(v(e,9))},te(Zl,"PolylineEdgeRouter/1",536),W(75,1,{75:1},BX),E.w=function(){var e,n,i,u;for(i=new kp,this.e&&Ro(Ro(i,z1(this.e)),": "),n=xn(sk(this),0);n.b!=n.d.c;)e=v(fn(n),7),Ro(Ro(Lp(Ro(i,(u=nJ(e),u==null?"p_"+e.k:"p_"+u)),32),z1(e.g))," / ");return n1e(i,Nb(i.a)-2-1)},E.j=0,E.k=0,te($l,"ConnectedSelfLoopComponent",75),W(60,17,{60:1,3:1,23:1,17:1},Ws),E.c=0;var uoe,coe,loe,rc,Kc,Ms,Qc,cu,as,js,ic,ac,foe,hoe,doe,poe,goe,boe,voe,yoe,moe,woe,xoe,koe,_oe,of,ah,Wc,Jc,lg=Jt($l,"LoopSide",60,En,MA);W(203,1,{},aee,B7,qA),E.w=function(){return this.b.w()},E.c=0,E.d=!1,E.e=!1,E.f=!1,E.i=0,E.j=0,te($l,"NubSpline",203),W(92,1,{92:1},ok,Gte),te($l,"NubSpline/PolarCP",92),W(281,203,{},nk),te($l,"NubsSelfLoop",281),W(112,1,{},Wee,kee,Ub,t_,r_),E.a=dI,E.b=ks,E.c=dI,E.d=ks,te($l,"Rectangle",112),W(537,1,_s,fq),E.qc=function(e){var n,i;return n=new Jn,i=v(X(e,(Ce(),ui)),18),i.kb((jr(),Rm))&&Fr(n,Noe),i.kb(fg)&&Fr(n,Eoe),(i.kb(sh)||Yt(Re(Zt(X(e,(tn(),e0))))))&&(Fr(n,Poe),i.kb(uh)&&Fr(n,Soe)),i.kb(hg)&&Fr(n,Coe),n},E.sc=function(e,n){var i,u,f,g,y,x,_,C,N,A,O,G,Y,ee,re,oe,ce,de,ye,Ee,Ue,qe,Ge,rt,ht,pt,mt,Pt,on,In,Li,Ca;$t(n,"Spline edge routing",1),ye=v(X(e,(Ce(),ca)),15).a,this.a=ye*v(X(e,(tn(),Au)),15).a,Ca=0,re=new V(e.c),oe=null,In=(Wn(),new an),on=new Ve,_=!0,C=!0;do{for(qe=re.a<re.c.c.length?v($(re),16):null,O=new Ve,y=new Ve,ce=new pa,rt=new pa,mt=new pa,GCe(new Ar(oe,qe),new Ar(ce,rt),y,In,on,mt),w_(ce,rt,(Tl(),Tu),!0,y,O),w_(ce,rt,Tu,!1,y,O),w_(ce,rt,oh,!0,y,O),w_(ce,rt,oh,!1,y,O),J_e(y,ce,rt,O),Pt=new jn(O,0);Pt.b<Pt.d.Y();)for(N=(_t(Pt.b<Pt.d.Y()),v(Pt.d.sb(Pt.c=Pt.b++),77)),Li=new jn(O,Pt.b);Li.b<Li.d.Y();)A=(_t(Li.b<Li.d.Y()),v(Li.d.sb(Li.c=Li.b++),77)),ACe(N,A);if(r3e(O,v(X(e,Hd),154)),rCe(O),Ge=Ca+10,qe){for(C=!qe||wx(qe.a,(Ry(),Am)),de=-1,f=new V(O);f.a<f.c.c.length;)i=v($(f),77),de=mi(de,i.n);++de,de>0?(G=(de+1)*this.a,G<ye&&!_&&!C&&(G=ye),Ge+=G):_||C||eee(oe)||eee(qe)||(Ge+=ye),q7(qe,Ge)}for(pt=(Ue=new hn(mt.a).a.bb().mb(),new yn(Ue));pt.a.G();)for(ht=(x=v(pt.a.H(),21),v(x.yb(),12)),Ee=ht.c.f.i,jc(ht.a,Ee),ee=new V(ht.b);ee.a<ee.c.c.length;)Y=v($(ee),33),On(Y.i,Ee);for(g=new V(O);g.a<g.c.c.length;)i=v($(g),77),i.f?gke(i,Ca):cEe(this,i,Ca,Ge);if(qe)Ca=Ge+qe.c.a+10;else{for(de=-1,f=new V(O);f.a<f.c.c.length;)i=v($(f),77),de=mi(de,i.n);de>=0&&(Ca+=(de+2)*this.a)}oe=qe,_=C}while(qe);for(u=new V(on);u.a<u.c.c.length;)i=v($(u),12),JCe(i,In);e.e.a=Ca,zt(n)},E.a=3;var Eoe,Coe,Poe,Soe,Noe;te($l,"SplineEdgeRouter",537),W(117,1,{117:1},by),E.w=function(){return this.a+" ->("+this.c+") "+this.b},E.c=0,te($l,"SplineEdgeRouter/Dependency",117),W(223,17,{223:1,3:1,23:1,17:1},B6);var Tu,oh,A3e=Jt($l,"SplineEdgeRouter/SideToProcess",223,En,Iye);W(77,1,{77:1,23:1},rte,V7),E.F=function(e){return N0e(this,v(e,77))},E.a=0,E.b=0,E.e=0,E.f=!1,E.i=0,E.k=0,E.n=0,E.p=0,te($l,"SplineEdgeRouter/SplineHyperEdge",77),W(123,17,{123:1,3:1,23:1,17:1},Tp);var FE,UE,YE,VE,qE,ZE,$E=Jt(Pu,"ContentAlignment",123,En,Kme),Toe;W(218,17,{218:1,3:1,23:1,17:1},dx);var Im,m9,Qv,I3e=Jt(Pu,"EdgeConstraint",218,En,eme);W(115,17,{115:1,3:1,23:1,17:1},Eb);var KE,Lm,QE,WE,JE,Moe=Jt(Pu,"EdgeLabelSideSelection",115,En,Gme),joe;W(124,17,{124:1,3:1,23:1,17:1},Mp);var XE,w9,x9,eC,k9,_9,Aoe=Jt(Pu,"FixedAlignment",124,En,Qme),Ioe;W(113,17,{113:1,3:1,23:1,17:1},kc);var fg,tC,hg,As,Om,nC,sh,uh,E9,Rm,C9=Jt(Pu,"GraphProperties",113,En,Twe);W(110,17,{110:1,3:1,23:1,17:1},Bf),E.a=!1,E.b=!1,E.c=!1;var rC,P9,S9,N9,T9,iC,M9,j9,Loe=Jt(Pu,"GreedySwitchType",110,En,dwe),Ooe;W(140,17,{140:1,3:1,23:1,17:1},px);var Dd,Dm,ch,L3e=Jt(Pu,"InLayerConstraint",140,En,Xye);W(174,17,{174:1,3:1,23:1,17:1},G6);var aC,A9,Roe=Jt(Pu,"InteractiveReferencePoint",174,En,Bye),Doe,Bd,I9,L9,oC,Xc,Wv,Is,dg,Bm,O9,Boe,pg,R9,D9,sC,B9,lh,Gm,ni,G9,ui,uC,Goe,Mu,sf,Gd,Fo,ua,Zi,uf,gg,Ct,H9,z9,F9,cC,cf,Hm,lu,oc,lC,No,U9,Hd,Y9,ju,ca,lf,Hoe,Jv,fC,V9,hC,bg;W(85,17,{85:1,3:1,23:1,17:1},Cb);var Xv,el,vg,sc,fh,zoe=Jt(Pu,"LayerConstraint",85,En,Hme),Foe;W(219,17,{219:1,3:1,23:1,17:1},gx);var la,_i,dC,O3e=Jt(Pu,"PortType",219,En,tme),pC,gC,bC,vC,zm,yC,q9,mC,zd,Uoe,Au,e0,Fm,wC,xC,Dr,Z9,$9,K9,kC,_C,Um,Q9,EC,yg,Ym,CC,W9,J9,PC,mg,wg;W(153,17,{153:1,3:1,23:1,17:1},bx);var X9,eO,SC,Yoe=Jt(Pu,"SelfLoopPlacement",153,En,nme),Voe;W(134,1,{134:1},Ane),E.a=0,E.b=0,E.c=0,E.d=0,E.e=0,E.f=0,te(Pu,"Spacings",134),W(172,17,{172:1,3:1,23:1,17:1},vx);var xg,t0,Vm,qoe=Jt(Pu,"WideNodesStrategy",172,En,rme),Zoe;W(644,1,{}),te(Xy,"OutputStream",644),W(645,644,{}),te(Xy,"FilterOutputStream",645),W(291,645,{},Ys),te(Xy,"PrintStream",291),W(255,1,{}),E.w=function(){return this.a},te(ei,"AbstractStringBuilder",255),W(621,95,xu,NZ),te(ei,"ArrayIndexOutOfBoundsException",621),W(290,72,xu,fZ,YZ),te(ei,"ArrayStoreException",290),W(252,46,W7),te(ei,"Error",252),W(84,252,W7,XM,mk),te(ei,"AssertionError",84),jre={3:1,349:1,23:1};var Xn,Ei,R3e=te(ei,"Boolean",349);Are={3:1,23:1,184:1,231:1};var n0=te(ei,"Double",184);W(15,231,{3:1,23:1,15:1,231:1},Wq,dn),E.F=function(e){return r1e(this,v(e,15))},E.t=function(e){return Ze(e,15)&&v(e,15).a==this.a},E.v=function(){return vr(this.a)},E.w=function(){return B0e(this.a)},E.a=0;var D3e=te(ei,"Float",15);W(101,72,xu,db,yc),te(ei,"IllegalStateException",101);var tO,$oe;W(608,72,xu,VZ),te(ei,"NegativeArraySizeException",608),W(76,72,{3:1,54:1,76:1,46:1},yp,bb),te(ei,"NullPointerException",76),W(130,29,{3:1,54:1,29:1,130:1,46:1},TZ,v1),te(ei,"NumberFormatException",130),W(146,1,{3:1,146:1},ik),E.t=function(e){var n;return Ze(e,146)?(n=v(e,146),this.c==n.c&&Ga(this.d,n.d)&&Ga(this.a,n.a)&&Ga(this.b,n.b)):!1},E.v=function(){return Ik(be(ve(dt,1),tt,1,4,[Tt(this.c),this.a,this.d,this.b]))},E.w=function(){return this.a+"."+this.d+"("+(this.b!=null?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},E.c=0;var Koe=te(ei,"StackTraceElement",146);W(98,255,{345:1},kp,Z2,xp),te(ei,"StringBuilder",98);var Qoe;W(45,72,{3:1,54:1,46:1,45:1},cr,Hh),te(ei,"UnsupportedOperationException",45),W(213,638,xd),E.Q=function(){Go(this)},E.R=function(e){return ud(this,e)},E.ab=function(e){return SX(this,e,this.e)||SX(this,e,this.d)},E.bb=function(){return new zu(this)},E.cb=function(e){return pn(this,e)},E.db=function(e,n){return Nn(this,e,n)},E.eb=function(e){return Af(this,e)},E.Y=function(){return C1(this)},te(At,"AbstractHashMap",213),W(120,641,Ii,zu),E.Q=function(){this.a.Q()},E.kb=function(e){return Kj(this,e)},E.mb=function(){return new Uf(this.a)},E.nb=function(e){var n;return Kj(this,e)?(n=v(e,21).yb(),this.a.eb(n),!0):!1},E.Y=function(){return this.a.Y()},te(At,"AbstractHashMap/EntrySet",120),W(148,1,kr,Uf),E.H=function(){return Hp(this)},E.G=function(){return this.b},E.I=function(){aA(this)},E.b=!1,te(At,"AbstractHashMap/EntrySetIterator",148),W(162,1,kr,Bh),E.G=function(){return this.b<this.d.Y()},E.H=function(){return _t(this.G()),this.d.sb(this.c=this.b++)},E.I=function(){Jo(this)},E.b=0,E.c=-1,te(At,"AbstractList/IteratorImpl",162),W(43,162,_d,jn),E.J=function(e){Uu(this,e)},E.K=function(){return this.b>0},E.L=function(){return this.b},E.M=function(){return HQ(this)},E.N=function(){return this.b-1},E.O=function(e){cj(this,e)},te(At,"AbstractList/ListIteratorImpl",43),W(258,647,kd,lk),E.rb=function(e,n){Ll(e,this.b),this.c.rb(this.a+e,n),++this.b},E.sb=function(e){return qn(e,this.b),this.c.sb(this.a+e)},E.vb=function(e){var n;return qn(e,this.b),n=this.c.vb(this.a+e),--this.b,n},E.wb=function(e,n){return qn(e,this.b),this.c.wb(this.a+e,n)},E.Y=function(){return this.b},E.a=0,E.b=0,te(At,"AbstractList/SubList",258),W(36,641,Ii,hn),E.Q=function(){this.a.Q()},E.kb=function(e){return this.a.R(e)},E.mb=function(){var e;return e=this.a.bb().mb(),new yn(e)},E.nb=function(e){return this.a.R(e)?(this.a.eb(e),!0):!1},E.Y=function(){return this.a.Y()},te(At,"AbstractMap/1",36),W(40,1,kr,yn),E.G=function(){return this.a.G()},E.H=function(){var e;return e=v(this.a.H(),21),e.yb()},E.I=function(){this.a.I()},te(At,"AbstractMap/1/1",40),W(211,640,Qp,ub),E.Q=function(){this.a.Q()},E.kb=function(e){return this.a.ab(e)},E.mb=function(){var e;return e=this.a.bb().mb(),new cb(e)},E.Y=function(){return this.a.Y()},te(At,"AbstractMap/2",211),W(212,1,kr,cb),E.G=function(){return this.a.G()},E.H=function(){var e;return e=v(this.a.H(),21),e.zb()},E.I=function(){this.a.I()},te(At,"AbstractMap/2/1",212),W(210,1,{210:1,21:1}),E.t=function(e){var n;return Ze(e,21)?(n=v(e,21),Ga(this.d,n.yb())&&Ga(this.e,n.zb())):!1},E.yb=function(){return this.d},E.zb=function(){return this.e},E.v=function(){return Cx(this.d)^Cx(this.e)},E.Ab=function(e){return hj(this,e)},E.w=function(){return this.d+"="+this.e},te(At,"AbstractMap/AbstractEntry",210),W(163,210,{210:1,163:1,21:1},M1),te(At,"AbstractMap/SimpleEntry",163),W(652,1,yv),E.t=function(e){var n;return Ze(e,21)?(n=v(e,21),Ga(this.yb(),n.yb())&&Ga(this.zb(),n.zb())):!1},E.v=function(){return Cx(this.yb())^Cx(this.zb())},E.w=function(){return this.yb()+"="+this.zb()},te(At,Qne,652),W(639,638,xd),E._=function(e){return cJ(this,e)},E.R=function(e){return yx(this,e)},E.bb=function(){return new qM(this)},E.cb=function(e){return Ti(LA(this,e))},E.W=function(){return new l1(this)},te(At,"AbstractNavigableMap",639),W(287,641,Ii,qM),E.kb=function(e){return Ze(e,21)&&cJ(this.b,v(e,21))},E.mb=function(){return new Lb(this.b)},E.nb=function(e){var n;return Ze(e,21)?(n=v(e,21),bJ(this.b,n)):!1},E.Y=function(){return this.b.c},te(At,"AbstractNavigableMap/EntrySet",287),W(229,641,iI,l1),E.Q=function(){b1(this.a)},E.kb=function(e){return yx(this.a,e)},E.mb=function(){var e;return e=new Lb(new Ab(this.a).b),new f1(e)},E.nb=function(e){return yx(this.a,e)?(Bb(this.a,e),!0):!1},E.Y=function(){return this.a.c},te(At,"AbstractNavigableMap/NavigableKeySet",229),W(230,1,kr,f1),E.G=function(){return ux(this.a.a)},E.H=function(){var e;return e=Ax(this.a),e.yb()},E.I=function(){xQ(this.a)},te(At,"AbstractNavigableMap/NavigableKeySet/1",230),W(4,1,kr,V),E.G=function(){return wl(this)},E.H=function(){return $(this)},E.I=function(){Ip(this)},E.a=0,E.b=-1,te(At,"ArrayList/1",4),W(94,647,Sre,Oo),E.kb=function(e){return wwe(this,e)!=-1},E.sb=function(e){return jQ(this,e)},E.wb=function(e,n){var i;return i=(qn(e,this.a.length),this.a[e]),yo(this.a,e,n),i},E.Y=function(){return this.a.length},E.ob=function(){return _ee(this,Ie(dt,tt,1,this.a.length,4,1))},E.pb=function(e){return _ee(this,e)},te(At,"Arrays/ArrayList",94);var tl,nO,NC;W(413,1,Zr,Jq),E.$b=function(e,n){return $Q(n,e)},te(At,"Collections/2",413),W(406,647,Sre,sb),E.kb=function(e){return!1},E.sb=function(e){return qn(e,0),null},E.mb=function(){return wn(),fx(),TC},E.tb=function(){return wn(),fx(),TC},E.Y=function(){return 0},te(At,"Collections/EmptyList",406),W(407,1,_d,s1),E.J=function(e){throw new cr},E.G=function(){return!1},E.K=function(){return!1},E.H=function(){throw new Ra},E.L=function(){return 0},E.M=function(){throw new Ra},E.N=function(){return-1},E.I=function(){throw new db},E.O=function(e){throw new db};var TC;te(At,"Collections/EmptyListIterator",407),W(409,638,Cd,Rh),E.R=function(e){return!1},E.ab=function(e){return!1},E.bb=function(){return wn(),NC},E.cb=function(e){return null},E.W=function(){return wn(),NC},E.Y=function(){return 0},E.fb=function(){return wn(),tl},te(At,"Collections/EmptyMap",409),W(408,641,Pd,Vs),E.kb=function(e){return!1},E.mb=function(){return wn(),fx(),TC},E.Y=function(){return 0},te(At,"Collections/EmptySet",408),W(410,1,Zr,C2),E.$b=function(e,n){return R0e(v(e,23),v(n,23))};var Woe;te(At,"Collections/ReverseComparator",410),W(411,647,{3:1,22:1,19:1,20:1},Xq),E.kb=function(e){return Ga(this.a,e)},E.sb=function(e){return qn(e,1),this.a},E.Y=function(){return 1},te(At,"Collections/SingletonList",411),W(217,1,Qp,lb),E.ib=function(e){return pZ()},E.jb=function(e){return gZ()},E.Q=function(){bZ()},E.kb=function(e){return this.b.kb(e)},E.lb=function(e){return this.b.lb(e)},E.V=function(){return this.b.V()},E.mb=function(){return new gp(this.b.mb())},E.nb=function(e){return vZ()},E.Y=function(){return this.b.Y()},E.ob=function(){return this.b.ob()},E.pb=function(e){return this.b.pb(e)},E.w=function(){return za(this.b)},te(At,"Collections/UnmodifiableCollection",217),W(152,1,kr,gp),E.G=function(){return this.b.G()},E.H=function(){return this.b.H()},E.I=function(){s0e()},te(At,"Collections/UnmodifiableCollectionIterator",152),W(233,217,kd,H1),E.rb=function(e,n){throw new cr},E.t=function(e){return this.a.t(e)},E.sb=function(e){return this.a.sb(e)},E.v=function(){return this.a.v()},E.V=function(){return this.a.V()},E.tb=function(){return new W6(this.a.ub(0))},E.ub=function(e){return new W6(this.a.ub(e))},E.vb=function(e){throw new cr},E.wb=function(e,n){throw new cr},E.xb=function(e,n){return new H1(this.a.xb(e,n))},te(At,"Collections/UnmodifiableList",233),W(309,152,_d,W6),E.J=function(e){throw new cr},E.K=function(){return this.a.K()},E.L=function(){return this.a.L()},E.M=function(){return this.a.M()},E.N=function(){return this.a.N()},E.O=function(e){throw new cr},te(At,"Collections/UnmodifiableListIterator",309),W(305,1,xd,ZM),E.Q=function(){throw new cr},E.R=function(e){return this.c.R(e)},E.ab=function(e){return M$(this,e)},E.bb=function(){return ro(this)},E.t=function(e){return c$(this,e)},E.cb=function(e){return this.c.cb(e)},E.v=function(){return this.c.v()},E.V=function(){return this.c.V()},E.W=function(){return eW(this)},E.db=function(e,n){throw new cr},E.eb=function(e){throw new cr},E.Y=function(){return this.c.Y()},E.w=function(){return za(this.c)},E.fb=function(){return nW(this)},te(At,"Collections/UnmodifiableMap",305),W(151,217,Ii,Cf),E.t=function(e){return u$(this,e)},E.v=function(){return this.b.v()},te(At,"Collections/UnmodifiableSet",151),W(412,151,Ii,XZ),E.kb=function(e){return j6(this,e)},E.lb=function(e){return j$(this,e)},E.mb=function(){var e;return e=this.b.mb(),new $M(e)},E.ob=function(){return lW(this)},E.pb=function(e){return zj(this,e)},te(At,"Collections/UnmodifiableMap/UnmodifiableEntrySet",412),W(263,1,kr,$M),E.H=function(){return new KM(v(this.a.H(),21))},E.G=function(){return this.a.G()},E.I=function(){throw new cr},te(At,"Collections/UnmodifiableMap/UnmodifiableEntrySet/1",263),W(306,1,yv,KM),E.t=function(e){return this.a.t(e)},E.yb=function(){return this.a.yb()},E.zb=function(){return this.a.zb()},E.v=function(){return this.a.v()},E.Ab=function(e){throw new cr},E.w=function(){return za(this.a)},te(At,"Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry",306),W(307,233,C_,y6),te(At,"Collections/UnmodifiableRandomAccessList",307),W(308,151,iI,J6),E.t=function(e){return this.a.t(e)},E.v=function(){return this.a.v()},te(At,"Collections/UnmodifiableSortedSet",308);var hh;W(522,1,Zr,P2),E.$b=function(e,n){return Tr(e),Tr(n),kA(v(e,23),n)},te(At,"Comparators/1",522),W(202,72,xu,mp),te(At,"ConcurrentModificationException",202),W(609,72,xu,CZ),te(At,"EmptyStackException",609),W(319,638,xd,FA),E.db=function(e,n){return lj(this,e,n)},E.Q=function(){XQ(this)},E.R=function(e){return Ej(this.a,e)},E.ab=function(e){var n,i;for(i=new Kh(this.a);i.a<i.c.a.length;)if(n=Al(i),Ga(e,this.b[n.e]))return!0;return!1},E.bb=function(){return new h1(this)},E.cb=function(e){return od(this,e)},E.eb=function(e){return $j(this,e)},E.Y=function(){return this.a.c},te(At,"EnumMap",319),W(236,641,Ii,h1),E.Q=function(){XQ(this.a)},E.kb=function(e){return IW(this,e)},E.mb=function(){return new ey(this.a)},E.nb=function(e){var n;return IW(this,e)?(n=v(e,21).yb(),$j(this.a,n),!0):!1},E.Y=function(){return this.a.a.c},te(At,"EnumMap/EntrySet",236),W(237,1,kr,ey),E.H=function(){return this.b=Al(this.a),new T1(this.c,this.b)},E.G=function(){return R1(this.a)},E.I=function(){Tf(!!this.b),$j(this.c,this.b),this.b=null},te(At,"EnumMap/EntrySetIterator",237),W(238,652,yv,T1),E.yb=function(){return this.a},E.zb=function(){return this.b.b[this.a.e]},E.Ab=function(e){return Qx(this.b,this.a.e,e)},te(At,"EnumMap/MapEntry",238),W(86,641,{22:1,19:1,86:1,18:1}),te(At,"EnumSet",86),W(66,86,{22:1,19:1,86:1,66:1,18:1},xi),E.ib=function(e){return Ai(this,v(e,17))},E.kb=function(e){return Ej(this,e)},E.mb=function(){return new Kh(this)},E.nb=function(e){return OQ(this,e)},E.Y=function(){return this.c},E.c=0,te(At,"EnumSet/EnumSetImpl",66),W(167,1,kr,Kh),E.H=function(){return Al(this)},E.G=function(){return R1(this)},E.I=function(){Tf(this.b!=-1),yo(this.c.b,this.b,null),--this.c.c,this.b=-1},E.a=-1,E.b=-1,te(At,"EnumSet/EnumSetImpl/IteratorImpl",167),W(30,213,Nre,an,cx,J$),E.Uc=function(e,n){return ut(e)===ut(n)||e!=null&&es(e,n)},E.Vc=function(e){var n;return n=ws(e),n|0},te(At,"HashMap",30),W(50,641,Tre,ai,K2,_j),E.ib=function(e){return Rn(this,e)},E.Q=function(){this.a.Q()},E.Wc=function(){return new _j(this)},E.kb=function(e){return vl(this,e)},E.V=function(){return this.a.Y()==0},E.mb=function(){var e;return e=new hn(this.a).a.bb().mb(),new yn(e)},E.nb=function(e){return Px(this,e)},E.Y=function(){return this.a.Y()},E.w=function(){return Dc(new hn(this.a))},te(At,"HashSet",50),W(418,1,Bc,pK),E.mb=function(){return new Uj(this)},E.c=0,te(At,"InternalHashCodeMap",418),W(312,1,kr,Uj),E.H=function(){return this.d=this.a[this.c++],this.d},E.G=function(){var e;return this.c<this.a.length?!0:(e=this.b.next(),e.done?!1:(this.a=e.value[1],this.c=0,!0))},E.I=function(){f_(this.e,this.d.yb()),this.c!=0&&--this.c},E.c=0,E.d=null,te(At,"InternalHashCodeMap/1",312);var Joe;W(382,1,Bc,gK),E.mb=function(){return new Xj(this)},E.c=0,E.d=0,te(At,"InternalStringMap",382),W(293,1,kr,Xj),E.H=function(){return this.c=this.a,this.a=this.b.next(),new vQ(this.d,this.c,this.d.d)},E.G=function(){return!this.a.done},E.I=function(){dX(this.d,this.c.value[0])},te(At,"InternalStringMap/1",293),W(383,652,yv,vQ),E.yb=function(){return this.b.value[0]},E.zb=function(){return this.a.d!=this.c?U$(this.a,this.b.value[0]):this.b.value[1]},E.Ab=function(e){return Hk(this.a,this.b.value[0],e)},E.c=0,te(At,"InternalStringMap/2",383),W(155,30,Nre,Dp,mJ),E.Q=function(){uQ(this)},E.R=function(e){return ud(this.c,e)},E.ab=function(e){var n;for(n=this.b.a;n!=this.b;){if(Ga(n.e,e))return!0;n=n.a}return!1},E.bb=function(){return new R2(this)},E.cb=function(e){return wk(this,e)},E.db=function(e,n){return tv(this,e,n)},E.eb=function(e){return lA(this,e)},E.Y=function(){return C1(this.c)},E.a=!1,te(At,"LinkedHashMap",155),W(176,163,{210:1,163:1,176:1,21:1},qK,yj),te(At,"LinkedHashMap/ChainEntry",176),W(270,641,Ii,R2),E.Q=function(){uQ(this.a)},E.kb=function(e){return LW(this,e)},E.mb=function(){return new tk(this)},E.nb=function(e){var n;return LW(this,e)?(n=v(e,21).yb(),lA(this.a,n),!0):!1},E.Y=function(){return C1(this.a.c)},te(At,"LinkedHashMap/EntrySet",270),W(271,1,kr,tk),E.H=function(){return iA(this)},E.G=function(){return this.b!=this.c.a.b},E.I=function(){Tf(!!this.a),$x(this.c.a.c,this),wj(this.a),Af(this.c.a.c,this.a.d),Q6(this.c.a.c,this),this.a=null},te(At,"LinkedHashMap/EntrySet/EntryIterator",271),W(70,50,Tre,pa,RK,Yx),E.Wc=function(){return new Yx(this)},te(At,"LinkedHashSet",70),W(372,1,_d,bQ),E.J=function(e){Db(this,e)},E.G=function(){return this.b!=this.d.c},E.K=function(){return this.b.b!=this.d.a},E.H=function(){return fn(this)},E.L=function(){return this.a},E.M=function(){return Gb(this)},E.N=function(){return this.a-1},E.I=function(){pA(this)},E.O=function(e){Tf(!!this.c),this.c.c=e},E.a=0,E.c=null,te(At,"LinkedList/ListIteratorImpl",372),W(259,1,{},S2),te(At,"LinkedList/Node",259),W(74,72,{3:1,54:1,46:1,74:1},Ra),te(At,"NoSuchElementException",74),W(154,1,{154:1},zX,SJ),E.a=0,E.b=0;var rO,iO,B3e=0;te(At,"Random",154),W(607,647,Mre),E.rb=function(e,n){$1(e,this.a.c.length+1),El(this.a,e,n)},E.ib=function(e){return Ke(this.a,e)},E.jb=function(e){return $n(this.a,e)},E.Q=function(){this.a.c=Ie(dt,tt,1,0,4,1)},E.kb=function(e){return ia(this.a,e,0)!=-1},E.lb=function(e){return Ac(this.a,e)},E.sb=function(e){return $1(e,this.a.c.length),ct(this.a,e)},E.V=function(){return this.a.c.length==0},E.mb=function(){return new V(this.a)},E.vb=function(e){return $1(e,this.a.c.length),Gf(this.a,e)},E.Xb=function(e,n){kW(this.a,e,n)},E.wb=function(e,n){return $1(e,this.a.c.length),jl(this.a,e,n)},E.Y=function(){return this.a.c.length},E.xb=function(e,n){return new lk(this.a,e,n)},E.ob=function(){return OK(this.a)},E.pb=function(e){return fr(this.a,e)},E.w=function(){return Dc(this.a)},te(At,"Vector",607),W(337,607,Mre,i6),te(At,"Stack",337),W(253,639,Cd,A$,Vj),E.Q=function(){b1(this)},E.bb=function(){return new Ab(this)},E.db=function(e,n){return xX(this,e,n)},E.eb=function(e){return Bb(this,e)},E.Y=function(){return this.c},E.c=0,te(At,"TreeMap",253),W(182,1,kr,Lb),E.H=function(){return Ax(this)},E.G=function(){return ux(this.a)},E.I=function(){xQ(this)},te(At,"TreeMap/EntryIterator",182),W(209,287,Ii,Ab),E.Q=function(){b1(this.a)},te(At,"TreeMap/EntrySet",209),W(183,163,{210:1,163:1,21:1,183:1},vk),E.b=!1;var G3e=te(At,"TreeMap/Node",183);W(254,1,{},N2),E.w=function(){return"State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b},E.a=!1,E.b=!1,E.c=!1,te(At,"TreeMap/State",254),W(138,17,G_,N1),E.Xc=function(){return!1},E.Yc=function(){return!1};var aO,Xoe,ese,tse,MC=Jt(At,"TreeMap/SubMapType",138,En,Nme);W(352,138,G_,wK),E.Yc=function(){return!0},Jt(At,"TreeMap/SubMapType/1",352,MC,null),W(353,138,G_,PK),E.Xc=function(){return!0},E.Yc=function(){return!0},Jt(At,"TreeMap/SubMapType/2",353,MC,null),W(354,138,G_,xK),E.Xc=function(){return!0},Jt(At,"TreeMap/SubMapType/3",354,MC,null),W(191,641,{3:1,22:1,19:1,18:1,137:1,191:1},b6,f$),E.ib=function(e){return Tj(this,e)},E.Q=function(){b1(this.a)},E.kb=function(e){return yx(this.a,e)},E.mb=function(){var e;return e=new Lb(new Ab(new l1(this.a).a).b),new f1(e)},E.nb=function(e){return UK(this,e)},E.Y=function(){return this.a.c},te(At,"TreeSet",191);var H3e=0,oO,sO=0,qm,pr=ry("int","I"),r0=ry("boolean","Z"),nse=ry("char","C"),Ea=ry("double","D"),Zm=ry("float","F"),jC=pme,rse=rse=jxe;mwe(Hve),Rwe("permProps",[[["locale","default"],["user.agent","gecko1_8"]]]),rse(null,"klay",null)})()}(LV)),LV.exports}(function(t,r){(function(a,s){t.exports=s(pve())})(Kr,function(a){return function(s){var c={};function l(h){if(c[h])return c[h].exports;var d=c[h]={i:h,l:!1,exports:{}};return s[h].call(d.exports,d,d.exports,l),d.l=!0,d.exports}return l.m=s,l.c=c,l.i=function(h){return h},l.d=function(h,d,p){l.o(h,d)||Object.defineProperty(h,d,{configurable:!1,enumerable:!0,get:p})},l.n=function(h){var d=h&&h.__esModule?function(){return h.default}:function(){return h};return l.d(d,"a",d),d},l.o=function(h,d){return Object.prototype.hasOwnProperty.call(h,d)},l.p="",l(l.s=3)}([function(s,c,l){var h=l(4),d=l(1),p=l(2),b={addUnnecessaryBendpoints:"de.cau.cs.kieler.klay.layered.unnecessaryBendpoints",alignment:"de.cau.cs.kieler.alignment",aspectRatio:"de.cau.cs.kieler.aspectRatio",borderSpacing:"borderSpacing",compactComponents:"de.cau.cs.kieler.klay.layered.components.compact",compactionStrategy:"de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy",contentAlignment:"de.cau.cs.kieler.klay.layered.contentAlignment",crossingMinimization:"de.cau.cs.kieler.klay.layered.crossMin",cycleBreaking:"de.cau.cs.kieler.klay.layered.cycleBreaking",debugMode:"de.cau.cs.kieler.debugMode",direction:"de.cau.cs.kieler.direction",edgeLabelSideSelection:"de.cau.cs.kieler.klay.layered.edgeLabelSideSelection",edgeRouting:"de.cau.cs.kieler.edgeRouting",edgeSpacingFactor:"de.cau.cs.kieler.klay.layered.edgeSpacingFactor",feedbackEdges:"de.cau.cs.kieler.klay.layered.feedBackEdges",fixedAlignment:"de.cau.cs.kieler.klay.layered.fixedAlignment",greedySwitchCrossingMinimization:"de.cau.cs.kieler.klay.layered.greedySwitch",hierarchyHandling:"de.cau.cs.kieler.hierarchyHandling",inLayerSpacingFactor:"de.cau.cs.kieler.klay.layered.inLayerSpacingFactor",interactiveReferencePoint:"de.cau.cs.kieler.klay.layered.interactiveReferencePoint",layerConstraint:"de.cau.cs.kieler.klay.layered.layerConstraint",layoutHierarchy:"de.cau.cs.kieler.layoutHierarchy",linearSegmentsDeflectionDampening:"de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening",mergeEdges:"de.cau.cs.kieler.klay.layered.mergeEdges",mergeHierarchyCrossingEdges:"de.cau.cs.kieler.klay.layered.mergeHierarchyEdges",noLayout:"de.cau.cs.kieler.noLayout",nodeLabelPlacement:"de.cau.cs.kieler.nodeLabelPlacement",nodeLayering:"de.cau.cs.kieler.klay.layered.nodeLayering",nodePlacement:"de.cau.cs.kieler.klay.layered.nodePlace",portAlignment:"de.cau.cs.kieler.portAlignment",portAlignmentEastern:"de.cau.cs.kieler.portAlignment.east",portAlignmentNorth:"de.cau.cs.kieler.portAlignment.north",portAlignmentSouth:"de.cau.cs.kieler.portAlignment.south",portAlignmentWest:"de.cau.cs.kieler.portAlignment.west",portConstraints:"de.cau.cs.kieler.portConstraints",portLabelPlacement:"de.cau.cs.kieler.portLabelPlacement",portOffset:"de.cau.cs.kieler.offset",portSide:"de.cau.cs.kieler.portSide",portSpacing:"de.cau.cs.kieler.portSpacing",postCompaction:"de.cau.cs.kieler.klay.layered.postCompaction",priority:"de.cau.cs.kieler.priority",randomizationSeed:"de.cau.cs.kieler.randomSeed",routeSelfLoopInside:"de.cau.cs.kieler.selfLoopInside",separateConnectedComponents:"de.cau.cs.kieler.separateConnComp",sizeConstraint:"de.cau.cs.kieler.sizeConstraint",sizeOptions:"de.cau.cs.kieler.sizeOptions",spacing:"de.cau.cs.kieler.spacing",splineSelfLoopPlacement:"de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement",thoroughness:"de.cau.cs.kieler.klay.layered.thoroughness",wideNodesOnMultipleLayers:"de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers"},m=function(T){for(var j=Object.keys(T),I={},R=0;R<j.length;R++){var B=j[R],F=b[B],z=T[B];I[F]=z}return I},w={interactiveReferencePoint:"CENTER"},k=function(T){for(var j=T.parent(),I=T.scratch("klay"),R={x:I.x,y:I.y};j.nonempty();){var B=j.scratch("klay");R.x+=B.x,R.y+=B.y,j=j.parent()}return R},P=function(T,j){var I=T.layoutDimensions(j),R=T.numericStyle("padding"),B={_cyEle:T,id:T.id(),padding:{top:R,left:R,bottom:R,right:R}};return T.isParent()||(B.width=I.w,B.height=I.h),T.scratch("klay",B),B},S=function(T,j){var I={_cyEle:T,id:T.id(),source:T.data("source"),target:T.data("target"),properties:{}},R=j.priority(T);return R!=null&&(I.properties.priority=R),T.scratch("klay",I),I},M=function(T,j,I){for(var R=[],B=[],F={},z={id:"root",children:[],edges:[]},D=0;D<T.length;D++){var H=T[D],Q=P(H,I);R.push(Q),F[H.id()]=Q}for(var q=0;q<j.length;q++){var Z=j[q],J=S(Z,I);B.push(J),F[Z.id()]=J}for(var K=0;K<R.length;K++){var ae=R[K],se=ae._cyEle;if(!se.isChild())z.children.push(ae);else{var le=se.parent(),he=F[le.id()],fe=he.children=he.children||[];fe.push(ae)}}for(var pe=0;pe<B.length;pe++){var me=B[pe],Te=me._cyEle;Te.source().parent(),Te.target().parent(),z.edges.push(me)}return z};function L(T){var j=T.klay;this.options=d({},p,T),this.options.klay=d({},p.klay,j,w)}L.prototype.run=function(){var T=this,j=this.options,I=j.eles,R=I.nodes(),B=I.edges(),F=M(R,B,j);return h.layout({graph:F,options:m(j.klay),success:function(){},error:function(z){throw z}}),R.filter(function(z){return!z.isParent()}).layoutPositions(T,j,k),this},L.prototype.stop=function(){return this},L.prototype.destroy=function(){return this},s.exports=L},function(s,c,l){s.exports=Object.assign!=null?Object.assign.bind(Object):function(h){for(var d=arguments.length,p=Array(d>1?d-1:0),b=1;b<d;b++)p[b-1]=arguments[b];return p.filter(function(m){return m!=null}).forEach(function(m){Object.keys(m).forEach(function(w){return h[w]=m[w]})}),h}},function(s,c,l){var h={nodeDimensionsIncludeLabels:!1,fit:!0,padding:20,animate:!1,animateFilter:function(d,p){return!0},animationDuration:500,animationEasing:void 0,transform:function(d,p){return p},ready:void 0,stop:void 0,klay:{addUnnecessaryBendpoints:!1,aspectRatio:1.6,borderSpacing:20,compactComponents:!1,crossingMinimization:"LAYER_SWEEP",cycleBreaking:"GREEDY",direction:"UNDEFINED",edgeRouting:"ORTHOGONAL",edgeSpacingFactor:.5,feedbackEdges:!1,fixedAlignment:"NONE",inLayerSpacingFactor:1,layoutHierarchy:!1,linearSegmentsDeflectionDampening:.3,mergeEdges:!1,mergeHierarchyCrossingEdges:!0,nodeLayering:"NETWORK_SIMPLEX",nodePlacement:"BRANDES_KOEPF",randomizationSeed:1,routeSelfLoopInside:!1,separateConnectedComponents:!0,spacing:20,thoroughness:7},priority:function(d){return null}};s.exports=h},function(s,c,l){var h=l(0),d=function(p){p&&p("layout","klay",h)};typeof cytoscape<"u"&&d(cytoscape),s.exports=d},function(s,c){s.exports=a}])})})(IV);var gve=IV.exports;const bve=z0(gve);var RV={exports:{}};(function(t,r){(function(a,s){t.exports=s()})(Kr,function(){return function(a){var s={};function c(l){if(s[l])return s[l].exports;var h=s[l]={i:l,l:!1,exports:{}};return a[l].call(h.exports,h,h.exports,c),h.l=!0,h.exports}return c.m=a,c.c=s,c.i=function(l){return l},c.d=function(l,h,d){c.o(l,h)||Object.defineProperty(l,h,{configurable:!1,enumerable:!0,get:d})},c.n=function(l){var h=l&&l.__esModule?function(){return l.default}:function(){return l};return c.d(h,"a",h),h},c.o=function(l,h){return Object.prototype.hasOwnProperty.call(l,h)},c.p="",c(c.s=11)}([function(a,s,c){a.exports=Object.assign!=null?Object.assign.bind(Object):function(l){for(var h=arguments.length,d=Array(h>1?h-1:0),p=1;p<h;p++)d[p-1]=arguments[p];return d.forEach(function(b){Object.keys(b).forEach(function(m){return l[m]=b[m]})}),l}},function(a,s,c){var l=c(0),h=Object.freeze({source:null,target:null,length:80,coeff:2e-4,weight:1});function d(b){return l({},h,b)}function p(b){var m=b.source,w=b.target,k=b.length<0?h.length:b.length,P=w.pos.x-m.pos.x,S=w.pos.y-m.pos.y,M=Math.sqrt(P*P+S*S);M===0&&(P=(Math.random()-.5)/50,S=(Math.random()-.5)/50,M=Math.sqrt(P*P+S*S));var L=M-k,T=(!b.coeff||b.coeff<0?h.springCoeff:b.coeff)*L/M*b.weight;m.force.x+=T*P,m.force.y+=T*S,w.force.x-=T*P,w.force.y-=T*S}a.exports={makeSpring:d,applySpring:p}},function(a,s,c){var l=function(){function K(ae,se){for(var le=0;le<se.length;le++){var he=se[le];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ae,he.key,he)}}return function(ae,se,le){return se&&K(ae.prototype,se),le&&K(ae,le),ae}}();function h(K,ae){if(!(K instanceof ae))throw new TypeError("Cannot call a class as a function")}function d(K,ae){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ae&&(typeof ae=="object"||typeof ae=="function")?ae:K}function p(K,ae){if(typeof ae!="function"&&ae!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ae);K.prototype=Object.create(ae&&ae.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),ae&&(Object.setPrototypeOf?Object.setPrototypeOf(K,ae):K.__proto__=ae)}var b=c(13),m=c(0),w=c(4),k=c(10),P=k.tick,S=c(7),M=S.makeQuadtree,L=c(3),T=L.makeBody,j=c(1),I=j.makeSpring,R=function(K){return typeof K=="function"},B=function(K){return K.isParent()},F=function(K){return!B(K)},z=function(K){return B(K.source())||B(K.target())},D=function(K){return!z(K)},H=function(K){return K.scratch("euler").body},Q=function(K){return B(K)?K.descendants().filter(F):K},q=function(K){var ae=K.scratch("euler");return ae||(ae={},K.scratch("euler",ae)),ae},Z=function(K,ae){return R(K)?K(ae):K},J=function(K){p(ae,K);function ae(se){return h(this,ae),d(this,(ae.__proto__||Object.getPrototypeOf(ae)).call(this,m({},w,se)))}return l(ae,[{key:"prerun",value:function(se){var le=se;le.quadtree=M();var he=le.bodies=[];le.nodes.filter(function(pe){return F(pe)}).forEach(function(pe){var me=q(pe),Te=T({pos:{x:me.x,y:me.y},mass:Z(le.mass,pe),locked:me.locked});Te._cyNode=pe,me.body=Te,Te._scratch=me,he.push(Te)});var fe=le.springs=[];le.edges.filter(D).forEach(function(pe){var me=I({source:H(pe.source()),target:H(pe.target()),length:Z(le.springLength,pe),coeff:Z(le.springCoeff,pe)});me._cyEdge=pe;var Te=q(pe);me._scratch=Te,Te.spring=me,fe.push(me)}),le.edges.filter(z).forEach(function(pe){var me=Q(pe.source()),Te=Q(pe.target());me=[me[0]],Te=[Te[0]],me.forEach(function(Oe){Te.forEach(function(ge){fe.push(I({source:H(Oe),target:H(ge),length:Z(le.springLength,pe),coeff:Z(le.springCoeff,pe)}))})})})}},{key:"tick",value:function(se){var le=P(se),he=le<=se.movementThreshold;return he}}]),ae}(b);a.exports=J},function(a,s,c){var l=Object.freeze({pos:{x:0,y:0},prevPos:{x:0,y:0},force:{x:0,y:0},velocity:{x:0,y:0},mass:1}),h=function(m){return{x:m.x,y:m.y}},d=function(m,w){return m??w},p=function(m,w){return h(d(m,w))};function b(m){var w={};return w.pos=p(m.pos,l.pos),w.prevPos=p(m.prevPos,w.pos),w.force=p(m.force,l.force),w.velocity=p(m.velocity,l.velocity),w.mass=m.mass!=null?m.mass:l.mass,w.locked=m.locked,w}a.exports={makeBody:b}},function(a,s,c){var l=Object.freeze({springLength:function(h){return 80},springCoeff:function(h){return 8e-4},mass:function(h){return 4},gravity:-1.2,pull:.001,theta:.666,dragCoeff:.02,movementThreshold:1,timeStep:20});a.exports=l},function(a,s,c){var l=.02;function h(d,p){var b=void 0;p!=null?b=p:d.dragCoeff!=null?b=d.dragCoeff:b=l,d.force.x-=b*d.velocity.x,d.force.y-=b*d.velocity.y}a.exports={applyDrag:h}},function(a,s,c){function l(h,d){var p=0,b=0,m=0,w=0,k,P=h.length;if(P===0)return 0;for(k=0;k<P;++k){var S=h[k],M=d/S.mass;if(!S.grabbed){S.locked?(S.velocity.x=0,S.velocity.y=0):(S.velocity.x+=M*S.force.x,S.velocity.y+=M*S.force.y);var L=S.velocity.x,T=S.velocity.y,j=Math.sqrt(L*L+T*T);j>1&&(S.velocity.x=L/j,S.velocity.y=T/j),p=d*S.velocity.x,m=d*S.velocity.y,S.pos.x+=p,S.pos.y+=m,b+=Math.abs(p),w+=Math.abs(m)}}return(b*b+w*w)/P}a.exports={integrate:l}},function(a,s,c){var l=c(9),h=c(8),d=function(k){k.x=0,k.y=0},p=function(k,P){var S=1e-8,M=Math.abs(k.x-P.x),L=Math.abs(k.y-P.y);return M<S&&L<S};function b(){var k=[],P=new h,S=[],M=0,L=T();function T(){var B=S[M];return B?(B.quad0=null,B.quad1=null,B.quad2=null,B.quad3=null,B.body=null,B.mass=B.massX=B.massY=0,B.left=B.right=B.top=B.bottom=0):(B=new l,S[M]=B),++M,B}function j(B,F,z,D){var H=k,Q=void 0,q=void 0,Z=void 0,J=void 0,K=0,ae=0,se=1,le=0,he=1;H[0]=L,d(B.force);var fe=-B.pos.x,pe=-B.pos.y,me=Math.sqrt(fe*fe+pe*pe),Te=B.mass*D/me;for(K+=Te*fe,ae+=Te*pe;se;){var Oe=H[le],ge=Oe.body;se-=1,le+=1;var xe=ge!==B;ge&&xe?(q=ge.pos.x-B.pos.x,Z=ge.pos.y-B.pos.y,J=Math.sqrt(q*q+Z*Z),J===0&&(q=(Math.random()-.5)/50,Z=(Math.random()-.5)/50,J=Math.sqrt(q*q+Z*Z)),Q=F*ge.mass*B.mass/(J*J*J),K+=Q*q,ae+=Q*Z):xe&&(q=Oe.massX/Oe.mass-B.pos.x,Z=Oe.massY/Oe.mass-B.pos.y,J=Math.sqrt(q*q+Z*Z),J===0&&(q=(Math.random()-.5)/50,Z=(Math.random()-.5)/50,J=Math.sqrt(q*q+Z*Z)),(Oe.right-Oe.left)/J<z?(Q=F*Oe.mass*B.mass/(J*J*J),K+=Q*q,ae+=Q*Z):(Oe.quad0&&(H[he]=Oe.quad0,se+=1,he+=1),Oe.quad1&&(H[he]=Oe.quad1,se+=1,he+=1),Oe.quad2&&(H[he]=Oe.quad2,se+=1,he+=1),Oe.quad3&&(H[he]=Oe.quad3,se+=1,he+=1)))}B.force.x+=K,B.force.y+=ae}function I(B){if(B.length!==0){var F=Number.MAX_VALUE,z=Number.MAX_VALUE,D=Number.MIN_VALUE,H=Number.MIN_VALUE,Q=void 0,q=B.length;for(Q=q;Q--;){var Z=B[Q].pos.x,J=B[Q].pos.y;Z<F&&(F=Z),Z>D&&(D=Z),J<z&&(z=J),J>H&&(H=J)}var K=D-F,ae=H-z;for(K>ae?H=z+K:D=F+ae,M=0,L=T(),L.left=F,L.right=D,L.top=z,L.bottom=H,Q=q-1,Q>=0&&(L.body=B[Q]);Q--;)R(B[Q])}}function R(B){for(P.reset(),P.push(L,B);!P.isEmpty();){var F=P.pop(),z=F.node,D=F.body;if(z.body){var H=z.body;if(z.body=null,p(H.pos,D.pos)){var Q=3;do{var q=Math.random(),Z=(z.right-z.left)*q,J=(z.bottom-z.top)*q;H.pos.x=z.left+Z,H.pos.y=z.top+J,Q-=1}while(Q>0&&p(H.pos,D.pos));if(Q===0&&p(H.pos,D.pos))return}P.push(z,H),P.push(z,D)}else{var K=D.pos.x,ae=D.pos.y;z.mass=z.mass+D.mass,z.massX=z.massX+D.mass*K,z.massY=z.massY+D.mass*ae;var se=0,le=z.left,he=(z.right+le)/2,fe=z.top,pe=(z.bottom+fe)/2;K>he&&(se=se+1,le=he,he=z.right),ae>pe&&(se=se+2,fe=pe,pe=z.bottom);var me=m(z,se);me?P.push(me,D):(me=T(),me.left=le,me.top=fe,me.right=he,me.bottom=pe,me.body=D,w(z,se,me))}}}return{insertBodies:I,updateBodyForce:j}}function m(k,P){return P===0?k.quad0:P===1?k.quad1:P===2?k.quad2:P===3?k.quad3:null}function w(k,P,S){P===0?k.quad0=S:P===1?k.quad1=S:P===2?k.quad2=S:P===3&&(k.quad3=S)}a.exports={makeQuadtree:b}},function(a,s,c){a.exports=l;function l(){this.stack=[],this.popIdx=0}l.prototype={isEmpty:function(){return this.popIdx===0},push:function(d,p){var b=this.stack[this.popIdx];b?(b.node=d,b.body=p):this.stack[this.popIdx]=new h(d,p),++this.popIdx},pop:function(){if(this.popIdx>0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}};function h(d,p){this.node=d,this.body=p}},function(a,s,c){a.exports=function(){this.body=null,this.quad0=null,this.quad1=null,this.quad2=null,this.quad3=null,this.mass=0,this.massX=0,this.massY=0,this.left=0,this.top=0,this.bottom=0,this.right=0}},function(a,s,c){var l=c(6),h=l.integrate,d=c(5),p=d.applyDrag,b=c(1),m=b.applySpring;function w(k){var P=k.bodies,S=k.springs,M=k.quadtree,L=k.timeStep,T=k.gravity,j=k.theta,I=k.dragCoeff,R=k.pull;P.forEach(function(Q){var q=Q._scratch;q&&(Q.locked=q.locked,Q.grabbed=q.grabbed,Q.pos.x=q.x,Q.pos.y=q.y)}),M.insertBodies(P);for(var B=0;B<P.length;B++){var F=P[B];M.updateBodyForce(F,T,j,R),p(F,I)}for(var z=0;z<S.length;z++){var D=S[z];m(D)}var H=h(P,L);return P.forEach(function(Q){var q=Q._scratch;q&&(q.x=Q.pos.x,q.y=Q.pos.y)}),H}a.exports={tick:w}},function(a,s,c){var l=c(2),h=function(d){d&&d("layout","euler",l)};typeof cytoscape<"u"&&h(cytoscape),a.exports=h},function(a,s,c){a.exports=Object.freeze({animate:!0,refresh:10,maxIterations:1e3,maxSimulationTime:4e3,ungrabifyWhileSimulating:!1,fit:!0,padding:30,boundingBox:void 0,ready:function(){},stop:function(){},randomize:!1,infinite:!1})},function(a,s,c){var l=function(){function T(j,I){for(var R=0;R<I.length;R++){var B=I[R];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(j,B.key,B)}}return function(j,I,R){return I&&T(j.prototype,I),R&&T(j,R),j}}();function h(T,j){if(!(T instanceof j))throw new TypeError("Cannot call a class as a function")}var d=c(0),p=c(12),b=c(14),m=c(15),w=m.setInitialPositionState,k=m.refreshPositions,P=m.getNodePositionData,S=c(16),M=S.multitick,L=function(){function T(j){h(this,T);var I=this.options=d({},p,j),R=I.eles.nodes();if(!I.randomize){R=R.sort(function(D,H){return D.position().x-H.position().x});var B={x:0,y:0},F={};R.forEach(function(D){Object.assign(F,D.position()),Math.abs(B.x-F.x)<I.theta&&Math.abs(B.y-F.y)<I.theta&&D.position({x:Math.random()*100,y:Math.random()*100}),Object.assign(B,F)})}var z=this.state=d({},I,{layout:this,nodes:R,edges:I.eles.edges(),tickIndex:0,firstUpdate:!0});z.animateEnd=I.animate&&I.animate==="end",z.animateContinuously=I.animate&&!z.animateEnd}return l(T,[{key:"run",value:function(){var j=this,I=this.state;if(I.tickIndex=0,I.firstUpdate=!0,I.startTime=Date.now(),I.running=!0,I.currentBoundingBox=b(I.boundingBox,I.cy),I.ready&&j.one("ready",I.ready),I.stop&&j.one("stop",I.stop),I.nodes.forEach(function(fe){return w(fe,I)}),j.prerun(I),I.animateContinuously){var R=function(fe){if(I.ungrabifyWhileSimulating){var pe=P(fe,I).grabbable=fe.grabbable();pe&&fe.ungrabify()}},B=function(fe){if(I.ungrabifyWhileSimulating){var pe=P(fe,I).grabbable;pe&&fe.grabify()}},F=function(fe){return P(fe,I).grabbed=fe.grabbed()},z=function(fe){var pe=fe.target;F(pe)},D=z,H=function(fe){var pe=fe.target,me=P(pe,I),Te=pe.position();me.x=Te.x,me.y=Te.y},Q=function(fe){fe.on("grab",z),fe.on("free",D),fe.on("drag",H)},q=function(fe){fe.removeListener("grab",z),fe.removeListener("free",D),fe.removeListener("drag",H)},Z=function(){I.fit&&I.animateContinuously&&I.cy.fit(I.padding)},J=function(){k(I.nodes,I),Z(),requestAnimationFrame(K)},K=function(){M(I,J,ae)},ae=function(){k(I.nodes,I),Z(),I.nodes.forEach(function(fe){B(fe),q(fe)}),I.running=!1,j.emit("layoutstop")};j.emit("layoutstart"),I.nodes.forEach(function(fe){R(fe),Q(fe)}),K()}else{for(var se=!1,le=function(){},he=function(){return se=!0};!se;)M(I,le,he);I.eles.layoutPositions(this,I,function(fe){var pe=P(fe,I);return{x:pe.x,y:pe.y}})}return j.postrun(I),this}},{key:"prerun",value:function(){}},{key:"postrun",value:function(){}},{key:"tick",value:function(){}},{key:"stop",value:function(){return this.state.running=!1,this}},{key:"destroy",value:function(){return this}}]),T}();a.exports=L},function(a,s,c){a.exports=function(l,h){return l==null?l={x1:0,y1:0,w:h.width(),h:h.height()}:l={x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,w:l.w,h:l.h},l.x2==null&&(l.x2=l.x1+l.w),l.w==null&&(l.w=l.x2-l.x1),l.y2==null&&(l.y2=l.y1+l.h),l.h==null&&(l.h=l.y2-l.y1),l}},function(a,s,c){var l=c(0),h=function(b,m){var w=b.position(),k=m.currentBoundingBox,P=b.scratch(m.name);P==null&&(P={},b.scratch(m.name,P)),l(P,m.randomize?{x:k.x1+Math.random()*k.w,y:k.y1+Math.random()*k.h}:{x:w.x,y:w.y}),P.locked=b.locked()},d=function(b,m){return b.scratch(m.name)},p=function(b,m){b.positions(function(w){var k=w.scratch(m.name);return{x:k.x,y:k.y}})};a.exports={setInitialPositionState:h,getNodePositionData:d,refreshPositions:p}},function(a,s,c){var l=function(){},h=function(p){var b=p,m=p.layout,w=m.tick(b);b.firstUpdate&&(b.animateContinuously&&b.layout.emit("layoutready"),b.firstUpdate=!1),b.tickIndex++;var k=Date.now()-b.startTime;return!b.infinite&&(w||b.tickIndex>=b.maxIterations||k>=b.maxSimulationTime)},d=function(p){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,w=!1,k=p,P=0;P<k.refresh&&(w=!k.running||h(k),!w);P++);w?m():b()};a.exports={tick:h,multitick:d}}])})})(RV);var vve=RV.exports;const yve=z0(vve);Ru.use(zde),Ru.use(ive),Ru.use(dve),Ru.use(bve),Ru.use(yve);let mve=0;function wve(t){return`${t}${Date.now()}_${++mve}`}const DV={random:{label:"Random",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},grid:{label:"Grid",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1,min:.1,max:5,step:.1},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"condense",label:"Condense",type:"boolean",default:!1},{name:"rows",label:"Rows (0=auto)",type:"number",default:0,min:0},{name:"cols",label:"Columns (0=auto)",type:"number",default:0,min:0}]},circle:{label:"Circle",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1.75,min:.1,max:5,step:.1},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"radius",label:"Radius (0=auto)",type:"number",default:0,min:0},{name:"clockwise",label:"Clockwise",type:"boolean",default:!0}]},concentric:{label:"Concentric",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1.75,min:.1,max:5,step:.1},{name:"minNodeSpacing",label:"Min node spacing",type:"number",default:10,min:0},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"equidistant",label:"Equidistant rings",type:"boolean",default:!1},{name:"clockwise",label:"Clockwise",type:"boolean",default:!1}]},breadthfirst:{label:"Breadth-first",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1.75,min:.1,max:5,step:.1},{name:"directed",label:"Directed",type:"boolean",default:!1},{name:"circle",label:"Circular roots",type:"boolean",default:!1},{name:"grid",label:"Grid mode",type:"boolean",default:!1},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"maximalAdjacencies",label:"Maximal adjacencies",type:"boolean",default:!1}]},cose:{label:"CoSE (force-directed)",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"nodeRepulsion",label:"Node repulsion",type:"number",default:2048,min:0,max:1e5},{name:"idealEdgeLength",label:"Ideal edge length",type:"number",default:32,min:1},{name:"edgeElasticity",label:"Edge elasticity",type:"number",default:32,min:0},{name:"gravity",label:"Gravity",type:"number",default:1,min:0},{name:"numIter",label:"Iterations",type:"number",default:1e3,min:1,max:1e4},{name:"randomize",label:"Randomize start",type:"boolean",default:!0},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},dagre:{label:"Dagre (DAG/hierarchical)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1,min:.1,max:5,step:.1},{name:"rankDir",label:"Direction",type:"select",default:"TB",options:["TB","BT","LR","RL"]},{name:"align",label:"Alignment",type:"select",default:"UL",options:["UL","UR","DL","DR"]},{name:"ranker",label:"Ranker",type:"select",default:"network-simplex",options:["network-simplex","tight-tree","longest-path"]},{name:"nodeSep",label:"Node separation",type:"number",default:50,min:0},{name:"rankSep",label:"Rank separation",type:"number",default:50,min:0},{name:"edgeSep",label:"Edge separation",type:"number",default:10,min:0}]},cola:{label:"Cola (constraint-based)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"nodeSpacing",label:"Node spacing",type:"number",default:10,min:0},{name:"edgeLength",label:"Edge length",type:"number",default:45,min:1},{name:"maxSimulationTime",label:"Max simulation time (ms)",type:"number",default:4e3,min:100},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"handleDisconnected",label:"Handle disconnected",type:"boolean",default:!0},{name:"unconstrIter",label:"Unconstrained iterations",type:"number",default:10,min:0},{name:"userConstIter",label:"User constrained iterations",type:"number",default:20,min:0},{name:"allConstIter",label:"All constrained iterations",type:"number",default:20,min:0}]},fcose:{label:"fCoSE (fast force-directed)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"nodeSeparation",label:"Node separation",type:"number",default:75,min:0},{name:"idealEdgeLength",label:"Ideal edge length",type:"number",default:50,min:1},{name:"edgeElasticity",label:"Edge elasticity",type:"number",default:.45,min:0,max:1,step:.01},{name:"gravity",label:"Gravity",type:"number",default:.25,min:0,step:.01},{name:"gravityRange",label:"Gravity range",type:"number",default:3.8,min:0,step:.1},{name:"numIter",label:"Iterations",type:"number",default:2500,min:100},{name:"randomize",label:"Randomize start",type:"boolean",default:!0},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},elk:{label:"ELK",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:20,min:0},{name:"elk.algorithm",label:"Algorithm",type:"select",default:"layered",options:["layered","stress","mrtree","radial","force","disco"]},{name:"elk.direction",label:"Direction",type:"select",default:"DOWN",options:["DOWN","UP","RIGHT","LEFT"]},{name:"elk.spacing.nodeNode",label:"Node spacing",type:"number",default:20,min:0}]},euler:{label:"Euler (force-directed)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"springLength",label:"Spring length",type:"number",default:80,min:1},{name:"springCoeff",label:"Spring coefficient",type:"number",default:8e-4,min:0,step:1e-4},{name:"mass",label:"Node mass",type:"number",default:4,min:1},{name:"gravity",label:"Gravity",type:"number",default:-1.2,step:.1},{name:"pull",label:"Pull force",type:"number",default:.001,min:0,step:1e-4},{name:"theta",label:"Theta (Barnes-Hut)",type:"number",default:.666,min:0,max:1,step:.001},{name:"maxIterations",label:"Max iterations",type:"number",default:1e3,min:100},{name:"randomize",label:"Randomize start",type:"boolean",default:!0},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},spread:{label:"Spread",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"minDist",label:"Min distance",type:"number",default:1,min:0},{name:"expandingFactor",label:"Expanding factor",type:"number",default:-1,step:.1},{name:"maxExpandIterations",label:"Max expand iterations",type:"number",default:4,min:1},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},klay:{label:"KLay (hierarchical)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacing",label:"Spacing",type:"number",default:20,min:0},{name:"klay.direction",label:"Direction",type:"select",default:"DOWN",options:["DOWN","UP","RIGHT","LEFT"]},{name:"klay.edgeRouting",label:"Edge routing",type:"select",default:"ORTHOGONAL",options:["ORTHOGONAL","POLYLINE","SPLINES"]},{name:"klay.nodeLayering",label:"Node layering",type:"select",default:"NETWORK_SIMPLEX",options:["NETWORK_SIMPLEX","LONGEST_PATH","INTERACTIVE"]}]},avsdf:{label:"AVSDF (circular)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:10,min:0},{name:"nodeSeparation",label:"Node separation",type:"number",default:60,min:0}]},cise:{label:"CiSE (clustered)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:10,min:0},{name:"nodeSeparation",label:"Node separation",type:"number",default:12.5,min:0},{name:"idealInterClusterEdgeLengthCoefficient",label:"Inter-cluster edge length",type:"number",default:1.4,min:0,step:.1},{name:"allowNodesInsideCircle",label:"Allow nodes inside circle",type:"boolean",default:!1},{name:"maxRatioOfNodesInsideCircle",label:"Max ratio inside circle",type:"number",default:.1,min:0,max:1,step:.01},{name:"springCoeff",label:"Spring coefficient",type:"number",default:.45,min:0,max:1,step:.01},{name:"nodeRepulsion",label:"Node repulsion",type:"number",default:4500,min:0},{name:"gravity",label:"Gravity",type:"number",default:.25,min:0,step:.01},{name:"gravityRange",label:"Gravity range",type:"number",default:3.8,min:0,step:.1}]}};class xve{constructor(r,a={}){var s;if(!r)throw new Error("Container element is required");this.container=r,this.options={layout:a.layout||{name:"preset"},...a},this._instanceId=Math.random().toString(36).slice(2,9),this.userStylesheet=(a.style||[]).map(c=>({selector:c.selector,style:{...c.style}})),this._nodeTypes=(a.nodeTypes||[]).map(c=>({...c})),this._edgeTypes=(a.edgeTypes||[]).map(c=>({...c})),this.currentEdgeType=this._edgeTypes[0]||null,this.cy=null,this.eventHandlers=new Map,this._lastLayout={name:"dagre",options:{rankdir:"LR",ranksep:60,nodesep:30}},this._undoStack=[],this._redoStack=[],this._restoringState=!1,this._preGrabSnapshot=null,this._clipboard=null,this._pasteOffset=0,this._currentNodeTypeId=((s=this._nodeTypes[0])==null?void 0:s.id)||null,this._selectedElement=null,this._ctxTarget=null,this._ctxPosition=null,this.context={...a.context||{}},this._init(),a.edgeHandle!==!1&&typeof document<"u"&&document.body&&this._initEdgeHandle()}_esc(r){return String(r??"").replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}_injectCSS(){if(document.getElementById("bxe-styles"))return;const r=document.createElement("style");r.id="bxe-styles",r.textContent=`
|
|
369
|
+
.bxe-wrap { display:flex; width:100%; height:100%; overflow:hidden; font-family:system-ui,sans-serif; font-size:13px; }
|
|
370
|
+
.bxe-wrap *, .bxe-wrap *::before, .bxe-wrap *::after { box-sizing:border-box; }
|
|
371
|
+
.bxe-canvas-wrap { flex:1; min-width:0; height:100%; position:relative; overflow:hidden; }
|
|
372
|
+
.bxe-canvas { width:100%; height:100%; }
|
|
373
|
+
.bxe-panzoom { position:absolute; bottom:12px; right:12px; display:flex; flex-direction:column; gap:3px; z-index:10; }
|
|
374
|
+
.bxe-pz-btn { width:28px; height:28px; background:#fff; border:1px solid #aaa; border-radius:4px; cursor:pointer; font-size:15px; font-weight:bold; line-height:1; padding:0; color:#444; display:flex; align-items:center; justify-content:center; box-shadow:0 1px 3px rgba(0,0,0,.15); }
|
|
375
|
+
.bxe-pz-btn:hover { background:#f0f0f0; border-color:#888; }
|
|
376
|
+
.bxe-pz-btn:active { background:#e0e0e0; }
|
|
377
|
+
.bxe-sidebar { width:260px; min-width:260px; height:100%; display:flex; flex-direction:column; background:#f8f9fa; border-left:1px solid #dee2e6; overflow:hidden; }
|
|
378
|
+
.bxe-toolbar { display:flex; gap:4px; padding:4px 8px; background:#fff; border-bottom:1px solid #dee2e6; flex-shrink:0; }
|
|
379
|
+
.bxe-toolbar button { padding:2px 8px; font-size:13px; cursor:pointer; background:#fff; border:1px solid #ccc; border-radius:3px; }
|
|
380
|
+
.bxe-toolbar button:hover:not(:disabled) { background:#f0f0f0; }
|
|
381
|
+
.bxe-toolbar button:disabled { opacity:.4; cursor:default; }
|
|
382
|
+
.bxe-tab-nav { display:flex; background:#fff; border-bottom:1px solid #dee2e6; flex-shrink:0; }
|
|
383
|
+
.bxe-tab-btn { flex:1; padding:6px 4px; font-size:16px; cursor:pointer; background:none; border:none; border-bottom:2px solid transparent; color:#666; }
|
|
384
|
+
.bxe-tab-btn:hover { background:#f0f0f0; }
|
|
385
|
+
.bxe-tab-btn.active { color:#0d6efd; border-bottom-color:#0d6efd; background:#f8f9fa; }
|
|
386
|
+
.bxe-tab-body { flex:1; min-height:0; overflow-y:auto; }
|
|
387
|
+
.bxe-pane { display:none; padding:10px; }
|
|
388
|
+
.bxe-pane.active { display:block; }
|
|
389
|
+
.bxe-pane-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#888; margin-bottom:8px; }
|
|
390
|
+
.bxe-pane-label { font-size:11px; font-weight:600; color:#666; margin-bottom:4px; }
|
|
391
|
+
.bxe-pane-label small { font-weight:normal; color:#999; }
|
|
392
|
+
.bxe-palette { display:flex; flex-direction:column; gap:4px; margin-bottom:10px; }
|
|
393
|
+
.bxe-palette-item { display:flex; align-items:center; gap:8px; padding:5px 8px; border:1px solid #dee2e6; border-radius:5px; cursor:pointer; background:#fff; }
|
|
394
|
+
.bxe-palette-item:hover { background:#e9f0ff; border-color:#90b8f8; }
|
|
395
|
+
.bxe-palette-item.selected { background:#dce8ff; border-color:#4d90fe; }
|
|
396
|
+
.bxe-palette-label { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
397
|
+
.bxe-node-swatch { width:20px; height:20px; border:2px solid #999; flex-shrink:0; }
|
|
398
|
+
.bxe-prop-group { margin-bottom:8px; }
|
|
399
|
+
.bxe-prop-group > label { display:block; font-size:11px; font-weight:600; color:#666; margin-bottom:2px; }
|
|
400
|
+
.bxe-input { width:100%; padding:3px 5px; border:1px solid #ccc; border-radius:3px; font-size:12px; }
|
|
401
|
+
.bxe-input[readonly] { background:#f5f5f5; color:#666; }
|
|
402
|
+
.bxe-prop-table-wrap { border:1px solid #dee2e6; border-radius:4px; overflow:hidden; }
|
|
403
|
+
.bxe-prop-table { width:100%; border-collapse:collapse; font-size:12px; }
|
|
404
|
+
.bxe-prop-table td { padding:2px 4px; border-bottom:1px solid #f0f0f0; vertical-align:top; }
|
|
405
|
+
.bxe-prop-table tr:last-child td { border-bottom:none; }
|
|
406
|
+
.bxe-cell-input { width:100%; border:none; outline:none; font-size:11px; background:transparent; padding:1px 2px; min-height:22px; font-family:inherit; }
|
|
407
|
+
.bxe-cell-input:focus { background:#f0f8ff; }
|
|
408
|
+
.bxe-cell-textarea { resize:vertical; }
|
|
409
|
+
.bxe-btn-del { background:none; border:none; color:#999; cursor:pointer; font-size:14px; line-height:1; padding:0 2px; }
|
|
410
|
+
.bxe-btn-del:hover { color:#dc3545; }
|
|
411
|
+
.bxe-btn-add { display:block; width:100%; margin-top:4px; padding:3px 6px; background:#fff; border:1px solid #ccc; border-radius:3px; font-size:11px; cursor:pointer; text-align:center; }
|
|
412
|
+
.bxe-btn-add:hover { background:#f0f0f0; }
|
|
413
|
+
.bxe-btn-danger { padding:4px 10px; background:#fff; border:1px solid #dc3545; color:#dc3545; border-radius:3px; cursor:pointer; font-size:12px; }
|
|
414
|
+
.bxe-btn-danger:hover { background:#dc3545; color:#fff; }
|
|
415
|
+
.bxe-style-rule { margin-bottom:8px; border:1px solid #dee2e6; border-radius:5px; overflow:hidden; }
|
|
416
|
+
.bxe-style-rule-header { display:flex; align-items:center; gap:4px; background:#e9ecef; padding:4px 6px; }
|
|
417
|
+
.bxe-style-rule-header input { flex:1; border:1px solid #ced4da; border-radius:3px; padding:2px 5px; font-size:11px; font-family:monospace; }
|
|
418
|
+
.bxe-style-rule-props { padding:5px 6px; }
|
|
419
|
+
.bxe-style-prop-row { display:flex; gap:4px; margin-bottom:3px; align-items:center; }
|
|
420
|
+
.bxe-style-prop-row input { flex:1; border:1px solid #e0e0e0; border-radius:3px; padding:2px 4px; font-size:11px; }
|
|
421
|
+
.bxe-btn-link { background:none; border:none; color:#0d6efd; cursor:pointer; font-size:11px; padding:2px 0; }
|
|
422
|
+
.bxe-btn-link:hover { text-decoration:underline; }
|
|
423
|
+
.bxe-empty { color:#999; font-size:12px; text-align:center; padding:12px 0; }
|
|
424
|
+
.bxe-empty-small { color:#999; font-size:11px; padding:2px; }
|
|
425
|
+
.bxe-ctx-menu { position:fixed; z-index:99999; background:#fff; border:1px solid #dee2e6; border-radius:6px; box-shadow:0 4px 16px rgba(0,0,0,.15); min-width:160px; overflow:hidden; }
|
|
426
|
+
.bxe-ctx-item { padding:7px 14px; cursor:pointer; font-size:13px; color:#333; }
|
|
427
|
+
.bxe-ctx-item:hover { background:#f0f4ff; }
|
|
428
|
+
.bxe-ctx-item.danger { color:#dc3545; }
|
|
429
|
+
.bxe-ctx-item.danger:hover { background:#fff0f0; }
|
|
430
|
+
.bxe-ctx-sep { height:1px; background:#dee2e6; }
|
|
431
|
+
.bxe-ctx-row { display:flex; align-items:flex-start; gap:3px; padding:3px 0; border-bottom:1px solid #f0f0f0; }
|
|
432
|
+
.bxe-ctx-key { width:80px; flex-shrink:0; font-family:monospace; }
|
|
433
|
+
.bxe-ctx-val { flex:1; min-width:0; font-family:monospace; font-size:11px; }
|
|
434
|
+
.bxe-ctx-colon { color:#999; font-size:11px; flex-shrink:0; padding-top:3px; }
|
|
435
|
+
.bxe-ctx-obj-val { resize:vertical; min-height:44px; line-height:1.4; white-space:pre; overflow-x:auto; }
|
|
436
|
+
.bxe-ctx-obj-val.bxe-ctx-invalid { border:1px solid #e74c3c !important; background:#fff5f5 !important; }
|
|
437
|
+
.bxe-ctx-type-badge { font-size:9px; color:#888; font-family:monospace; letter-spacing:0; flex-shrink:0; padding-top:4px; }
|
|
438
|
+
.bxe-ctx-addbtns { display:flex; gap:4px; flex-wrap:wrap; padding-top:4px; }
|
|
439
|
+
.bxe-ctx-addbtns .bxe-btn-add { flex:1; }
|
|
440
|
+
`,document.head.appendChild(r)}_createUI(){this.container.style.cssText="display:flex;overflow:hidden;width:100%;height:100%;",this._canvasWrap=document.createElement("div"),this._canvasWrap.className="bxe-canvas-wrap",this.container.appendChild(this._canvasWrap),this._canvasDiv=document.createElement("div"),this._canvasDiv.className="bxe-canvas",this._canvasWrap.appendChild(this._canvasDiv),this._sidebarEl=document.createElement("div"),this._sidebarEl.className="bxe-sidebar";const r=document.createElement("div");r.className="bxe-toolbar",this._undoBtn=document.createElement("button"),this._undoBtn.title="Undo (Ctrl+Z)",this._undoBtn.textContent="↩",this._undoBtn.disabled=!0,this._undoBtn.addEventListener("click",()=>this.undo()),this._redoBtn=document.createElement("button"),this._redoBtn.title="Redo (Ctrl+Y)",this._redoBtn.textContent="↪",this._redoBtn.disabled=!0,this._redoBtn.addEventListener("click",()=>this.redo()),r.appendChild(this._undoBtn),r.appendChild(this._redoBtn),this._sidebarEl.appendChild(r);const a=document.createElement("div");a.className="bxe-tab-nav";const s=[{id:"palette",icon:"✦",title:"Palette"},{id:"properties",icon:"☰",title:"Properties"},{id:"stylesheet",icon:"✏",title:"Stylesheet"},{id:"layout",icon:"⊕",title:"Layout"},{id:"context",icon:"@",title:"Context"}];this._tabBtns={},s.forEach(({id:B,icon:F,title:z})=>{const D=document.createElement("button");D.className="bxe-tab-btn",D.textContent=F,D.title=z,D.dataset.tab=B,D.addEventListener("click",()=>this._switchPane(B)),this._tabBtns[B]=D,a.appendChild(D)}),this._sidebarEl.appendChild(a);const c=document.createElement("div");c.className="bxe-tab-body",this._panes={};const l=document.createElement("div");l.className="bxe-pane",l.dataset.pane="palette";const h=document.createElement("div");h.className="bxe-pane-title",h.textContent="Palette",l.appendChild(h);const d=document.createElement("div");d.className="bxe-pane-label",d.innerHTML="Node type <small>(double-click canvas to add)</small>",l.appendChild(d),this._nodePaletteEl=document.createElement("div"),l.appendChild(this._nodePaletteEl);const p=document.createElement("div");p.className="bxe-pane-label",p.innerHTML="Edge type <small>(drag handle to connect)</small>",l.appendChild(p),this._edgePaletteEl=document.createElement("div"),l.appendChild(this._edgePaletteEl),this._nodePaletteEl.addEventListener("click",B=>{const F=B.target.closest(".bxe-palette-item");F&&this._selectNodeType(F.dataset.typeId)}),this._edgePaletteEl.addEventListener("click",B=>{const F=B.target.closest(".bxe-palette-item");F&&this.setEdgeType(F.dataset.typeId)}),this._panes.palette=l;const b=document.createElement("div");b.className="bxe-pane",b.dataset.pane="properties";const m=document.createElement("div");m.className="bxe-pane-title",m.textContent="Properties",b.appendChild(m),this._propsContentEl=document.createElement("div"),b.appendChild(this._propsContentEl),b.addEventListener("input",B=>this._handlePropertiesEvent(B)),b.addEventListener("change",B=>this._handlePropertiesEvent(B)),b.addEventListener("blur",B=>this._handlePropertiesEvent(B),!0),b.addEventListener("click",B=>this._handlePropertiesEvent(B)),this._panes.properties=b;const w=document.createElement("div");w.className="bxe-pane",w.dataset.pane="stylesheet";const k=document.createElement("div");k.className="bxe-pane-title",k.textContent="Stylesheet",w.appendChild(k),this._stylesheetRulesEl=document.createElement("div"),w.appendChild(this._stylesheetRulesEl);const P=document.createElement("button");P.className="bxe-btn-add",P.textContent="+ Add Rule",P.addEventListener("click",()=>{this.addStyleRule("node",{}),this._switchPane("stylesheet")}),w.appendChild(P),w.addEventListener("change",B=>this._handleStylesheetEvent(B)),w.addEventListener("click",B=>this._handleStylesheetEvent(B)),this._panes.stylesheet=w;const S=document.createElement("div");S.className="bxe-pane",S.dataset.pane="layout";const M=document.createElement("div");M.className="bxe-pane-title",M.textContent="Layout",S.appendChild(M),this._layoutPaneContentEl=document.createElement("div"),S.appendChild(this._layoutPaneContentEl),this._panes.layout=S;const L=document.createElement("div");L.className="bxe-pane",L.dataset.pane="context";const T=document.createElement("div");T.className="bxe-pane-title",T.textContent="JSON-LD Context",L.appendChild(T),this._contextEntriesEl=document.createElement("div"),L.appendChild(this._contextEntriesEl);const j=document.createElement("div");j.className="bxe-ctx-addbtns";const I=document.createElement("button");I.className="bxe-btn-add",I.textContent="+ Add Prefix",I.addEventListener("click",()=>this._addContextEntry("prefix"));const R=document.createElement("button");R.className="bxe-btn-add",R.textContent="+ Add Term",R.addEventListener("click",()=>this._addContextEntry("term")),j.appendChild(I),j.appendChild(R),L.appendChild(j),L.addEventListener("change",B=>this._handleContextEvent(B)),L.addEventListener("click",B=>this._handleContextEvent(B)),this._panes.context=L,[l,b,w,S,L].forEach(B=>c.appendChild(B)),this._sidebarEl.appendChild(c),this.container.appendChild(this._sidebarEl),this._ctxMenu=document.createElement("div"),this._ctxMenu.className="bxe-ctx-menu",this._ctxMenu.style.display="none",this._ctxMenu.addEventListener("click",B=>{var F;const z=B.target.closest(".bxe-ctx-item");if(!z)return;const D=z.dataset.action;if(D==="edit-props")this._ctxTarget&&(this._refreshProperties(this._ctxTarget),this._switchPane("properties"));else if(D==="duplicate"){if((F=this._ctxTarget)!=null&&F.isNode()){const H={...this._ctxTarget.data()};delete H.id,H.label=(H.label||"Node")+" (copy)";const Q=this._ctxTarget.position();this.addNode(H,{x:Q.x+50,y:Q.y+50})}}else D==="cut"?this.cut():D==="copy"?this.copy():D==="paste"?this.paste():D==="delete"?(this.cy.$(":selected").length>0?this.removeSelected():this._ctxTarget&&this.removeElement(this._ctxTarget.id()),this._clearProperties()):D==="add-node-here"&&this._ctxPosition&&this._addNodeAtPosition(this._ctxPosition);this._hideContextMenu()}),document.body.appendChild(this._ctxMenu),this._keydownHandler=B=>{var F,z,D,H;if((B.ctrlKey||B.metaKey)&&B.key==="z"&&!B.shiftKey)B.preventDefault(),this.undo();else if((B.ctrlKey||B.metaKey)&&(B.key==="y"||B.key==="z"&&B.shiftKey))B.preventDefault(),this.redo();else if((B.ctrlKey||B.metaKey)&&B.key==="c"){const Q=(F=document.activeElement)==null?void 0:F.tagName;Q!=="INPUT"&&Q!=="TEXTAREA"&&Q!=="SELECT"&&(B.preventDefault(),this.copy())}else if((B.ctrlKey||B.metaKey)&&B.key==="x"){const Q=(z=document.activeElement)==null?void 0:z.tagName;Q!=="INPUT"&&Q!=="TEXTAREA"&&Q!=="SELECT"&&(B.preventDefault(),this.cut())}else if((B.ctrlKey||B.metaKey)&&B.key==="v"){const Q=(D=document.activeElement)==null?void 0:D.tagName;Q!=="INPUT"&&Q!=="TEXTAREA"&&Q!=="SELECT"&&(B.preventDefault(),this.paste())}else if(B.key==="Delete"||B.key==="Backspace"){const Q=(H=document.activeElement)==null?void 0:H.tagName;Q!=="INPUT"&&Q!=="TEXTAREA"&&Q!=="SELECT"&&this.removeSelected()}},document.addEventListener("keydown",this._keydownHandler),this._switchPane("palette"),this._renderContextPane()}_switchPane(r){Object.entries(this._panes).forEach(([a,s])=>{s.classList.toggle("active",a===r)}),Object.entries(this._tabBtns).forEach(([a,s])=>{s.classList.toggle("active",a===r)})}_renderPalette(){var r;const a=this._nodeTypes,s=this._edgeTypes;if(this._nodePaletteEl){if(!a.length)this._nodePaletteEl.innerHTML='<div class="bxe-empty-small">No node types defined</div>';else{this._nodePaletteEl.innerHTML="";const c=document.createElement("div");c.className="bxe-palette",a.forEach((l,h)=>{const d=l.shape==="ellipse"?"50%":l.shape==="roundrectangle"?"5px":"2px",p=l.color||"#e0e0e0",b=l.borderColor||"#999",m=document.createElement("div");m.className="bxe-palette-item"+(h===0?" selected":""),m.dataset.typeId=l.id;const w=document.createElement("div");w.className="bxe-node-swatch",w.style.cssText=`background:${p};border-color:${b};border-radius:${d}`;const k=document.createElement("span");k.className="bxe-palette-label",k.textContent=l.label,m.appendChild(w),m.appendChild(k),c.appendChild(m)}),this._nodePaletteEl.appendChild(c)}if(!s.length)this._edgePaletteEl.innerHTML='<div class="bxe-empty-small">No edge types defined</div>';else{this._edgePaletteEl.innerHTML="";const c=document.createElement("div");c.className="bxe-palette",s.forEach((l,h)=>{const d=l.color||"#666666",p=l.lineStyle==="dashed"?"6,3":l.lineStyle==="dotted"?"2,3":"none",b=`bxe-arr-${this._instanceId}-${String(l.id).replace(/[^a-zA-Z0-9]/g,"_")}`,m=document.createElement("div");m.className="bxe-palette-item"+(h===0?" selected":""),m.dataset.typeId=l.id;const w=p==="none"?`<line x1="4" y1="11" x2="34" y2="11" stroke="${d}" stroke-width="2" marker-end="url(#${b})"/>`:`<line x1="4" y1="11" x2="34" y2="11" stroke="${d}" stroke-width="2" stroke-dasharray="${p}" marker-end="url(#${b})"/>`;m.innerHTML=`<svg width="44" height="22" style="flex-shrink:0;overflow:visible"><defs><marker id="${b}" markerWidth="6" markerHeight="6" refX="5" refY="3" orient="auto"><path d="M0,0 L6,3 L0,6 Z" fill="${d}"/></marker></defs>${w}</svg><span class="bxe-palette-label">${this._esc(l.label)}</span>`,c.appendChild(m)}),this._edgePaletteEl.appendChild(c)}this._currentNodeTypeId=((r=a[0])==null?void 0:r.id)||null,s[0]&&(this.currentEdgeType=s[0])}}_selectNodeType(r){this._currentNodeTypeId=r,this._nodePaletteEl&&this._nodePaletteEl.querySelectorAll(".bxe-palette-item").forEach(a=>{a.classList.toggle("selected",a.dataset.typeId===r)})}_addNodeAtPosition(r){this._currentNodeTypeId?this.addNodeOfType(this._currentNodeTypeId,r):this.addNode({label:"New Node"},r)}_refreshProperties(r){if(this._selectedElement=r,!this._propsContentEl)return;const a=r.data(),s=r.isNode(),c=new Set(["id","label","source","target","_style"]),l=Object.keys(a).filter(b=>!c.has(b)),h=this._esc(a.id||"");let d=`
|
|
441
|
+
<div class="bxe-prop-group">
|
|
442
|
+
<label>ID</label>
|
|
443
|
+
<input class="bxe-input" type="text" value="${h}" readonly data-field="id">
|
|
444
|
+
</div>
|
|
445
|
+
<div class="bxe-prop-group">
|
|
446
|
+
<label>Label</label>
|
|
447
|
+
<input class="bxe-input" type="text" value="${this._esc(a.label||"")}" placeholder="Enter label" data-field="label" data-element-id="${h}">
|
|
448
|
+
</div>`;s||(d+=`
|
|
449
|
+
<div class="bxe-prop-group">
|
|
450
|
+
<label>Source → Target</label>
|
|
451
|
+
<input class="bxe-input" type="text" value="${this._esc(a.source)} → ${this._esc(a.target)}" readonly>
|
|
452
|
+
</div>`);let p="";l.length?l.forEach(b=>{p+=`
|
|
453
|
+
<tr class="bxe-prop-row" data-key="${this._esc(b)}">
|
|
454
|
+
<td><input class="bxe-cell-input" type="text" value="${this._esc(b)}" placeholder="key" data-field="key"></td>
|
|
455
|
+
<td><textarea class="bxe-cell-input bxe-cell-textarea" placeholder="value" data-field="value" rows="1">${this._esc(String(a[b]??""))}</textarea></td>
|
|
456
|
+
<td><button class="bxe-btn-del" data-action="del-prop" title="Remove">×</button></td>
|
|
457
|
+
</tr>`}):p='<tr class="bxe-no-props-row"><td colspan="3" class="bxe-empty-small">No properties</td></tr>',d+=`
|
|
458
|
+
<div class="bxe-prop-group">
|
|
459
|
+
<label>Properties</label>
|
|
460
|
+
<div class="bxe-prop-table-wrap">
|
|
461
|
+
<table class="bxe-prop-table">
|
|
462
|
+
<colgroup><col style="width:35%"><col style="width:55%"><col style="width:22px"></colgroup>
|
|
463
|
+
<tbody class="bxe-props-tbody" data-element-id="${h}">${p}</tbody>
|
|
464
|
+
</table>
|
|
465
|
+
</div>
|
|
466
|
+
<button class="bxe-btn-add" data-action="add-prop">+ Add Property</button>
|
|
467
|
+
</div>
|
|
468
|
+
<div style="padding-top:8px;border-top:1px solid #eee;">
|
|
469
|
+
<button class="bxe-btn-danger" data-action="delete-el" data-element-id="${h}">Delete</button>
|
|
470
|
+
</div>`,this._propsContentEl.innerHTML=d}_clearProperties(){this._selectedElement=null,this._propsContentEl&&(this._propsContentEl.innerHTML='<div class="bxe-empty">Select a node or edge<br>to edit its properties</div>')}_handlePropertiesEvent(r){var a,s,c;const l=r.target;if(!(!l||!this._selectedElement)){if(r.type==="input"&&l.dataset.field==="label"){const h=this._selectedElement.id();this.updateElement(h,{label:l.value});return}if(r.type==="input"&&l.dataset.field==="value"){const h=l.closest("tr.bxe-prop-row");if(!h)return;const d=h.dataset.key;if(!d)return;this.updateElement(this._selectedElement.id(),{[d]:l.value});return}if(r.type==="blur"&&l.dataset.field==="key"){const h=l.closest("tr.bxe-prop-row");if(!h)return;const d=h.dataset.key,p=l.value.trim();if(!p)return;const b=this._selectedElement.id();if(d&&d!==p){const m=h.querySelector('[data-field="value"]'),w=m?m.value:"";this.updateElement(b,{[d]:void 0,[p]:w})}else if(!d&&p){const m=h.querySelector('[data-field="value"]'),w=m?m.value:"";this.updateElement(b,{[p]:w})}h.dataset.key=p;return}if(r.type==="click"&&l.dataset.action==="add-prop"){const h=(a=this._propsContentEl)==null?void 0:a.querySelector(".bxe-props-tbody");if(!h)return;(s=h.querySelector(".bxe-no-props-row"))==null||s.remove();const d=document.createElement("tr");d.className="bxe-prop-row",d.dataset.key="",d.innerHTML=`
|
|
471
|
+
<td><input class="bxe-cell-input" type="text" value="" placeholder="key" data-field="key"></td>
|
|
472
|
+
<td><textarea class="bxe-cell-input bxe-cell-textarea" placeholder="value" data-field="value" rows="1"></textarea></td>
|
|
473
|
+
<td><button class="bxe-btn-del" data-action="del-prop" title="Remove">×</button></td>`,h.appendChild(d),d.querySelector('[data-field="key"]').focus();return}if(r.type==="click"&&l.dataset.action==="del-prop"){const h=l.closest("tr.bxe-prop-row");if(!h)return;const d=h.dataset.key;d&&this.updateElement(this._selectedElement.id(),{[d]:void 0}),h.remove();const p=(c=this._propsContentEl)==null?void 0:c.querySelector(".bxe-props-tbody");p&&!p.querySelector(".bxe-prop-row")&&(p.innerHTML='<tr class="bxe-no-props-row"><td colspan="3" class="bxe-empty-small">No properties</td></tr>');return}if(r.type==="click"&&l.closest('[data-action="delete-el"]')){if(this.cy.$(":selected").length>0)this.removeSelected();else{const h=this._selectedElement.id();this.removeElement(h)}this._clearProperties()}}}_refreshStylesheet(){if(!this._stylesheetRulesEl)return;const r=this.userStylesheet;if(!r.length){this._stylesheetRulesEl.innerHTML='<div class="bxe-empty">No style rules yet.</div>';return}this._stylesheetRulesEl.innerHTML=r.map((a,s)=>{const c=Object.entries(a.style||{}).map(([l,h])=>`
|
|
474
|
+
<div class="bxe-style-prop-row">
|
|
475
|
+
<input type="text" value="${this._esc(l)}" placeholder="property" data-field="key" data-rule="${s}" data-prop="${this._esc(l)}">
|
|
476
|
+
<input type="text" value="${this._esc(h)}" placeholder="value" data-field="value" data-rule="${s}" data-prop="${this._esc(l)}">
|
|
477
|
+
<button class="bxe-btn-del" data-action="del-prop" data-rule="${s}" data-prop="${this._esc(l)}" title="Remove">×</button>
|
|
478
|
+
</div>`).join("");return`
|
|
479
|
+
<div class="bxe-style-rule" data-rule="${s}">
|
|
480
|
+
<div class="bxe-style-rule-header">
|
|
481
|
+
<input type="text" value="${this._esc(a.selector)}" placeholder="selector" data-field="selector" data-rule="${s}">
|
|
482
|
+
<button class="bxe-btn-del" data-action="del-rule" data-rule="${s}" title="Delete rule">🗑</button>
|
|
483
|
+
</div>
|
|
484
|
+
<div class="bxe-style-rule-props">
|
|
485
|
+
${c}
|
|
486
|
+
<button class="bxe-btn-link" data-action="add-prop" data-rule="${s}">+ property</button>
|
|
487
|
+
</div>
|
|
488
|
+
</div>`}).join("")}_handleStylesheetEvent(r){const a=r.target;if(a){if(r.type==="change"){if(a.dataset.field==="selector"){const s=parseInt(a.dataset.rule),c=this.userStylesheet[s];c&&this.updateStyleRule(s,a.value,c.style);return}if(a.dataset.field==="key"){const s=parseInt(a.dataset.rule),c=a.dataset.prop,l=a.value.trim();if(!l)return;const h=this.userStylesheet[s];if(!h)return;const d={...h.style},p=d[c];delete d[c],d[l]=p,this.updateStyleRule(s,h.selector,d);return}if(a.dataset.field==="value"){const s=parseInt(a.dataset.rule),c=a.dataset.prop,l=this.userStylesheet[s];if(!l)return;this.updateStyleRule(s,l.selector,{...l.style,[c]:a.value});return}}if(r.type==="click"){if(a.dataset.action==="del-rule"){this.removeStyleRule(parseInt(a.dataset.rule));return}if(a.dataset.action==="del-prop"){const s=parseInt(a.dataset.rule),c=a.dataset.prop,l=this.userStylesheet[s];if(!l)return;const h={...l.style};delete h[c],this.updateStyleRule(s,l.selector,h);return}if(a.dataset.action==="add-prop"){const s=parseInt(a.dataset.rule),c=prompt("CSS property name (e.g. background-color):");if(!c)return;const l=prompt(`Value for "${c}":`)??"",h=this.userStylesheet[s];if(!h)return;this.updateStyleRule(s,h.selector,{...h.style,[c]:l});return}}}}_showContextMenu(r,a,s){this._ctxTarget=s;const c=s.isNode(),l=this.cy.$(":selected").length,h=l>1?`Delete (${l})`:"Delete",d=l>0,p=!!this._clipboard;this._ctxMenu.innerHTML=`
|
|
489
|
+
<div class="bxe-ctx-item" data-action="edit-props">Edit Properties</div>
|
|
490
|
+
<div class="bxe-ctx-sep"></div>
|
|
491
|
+
${d?`<div class="bxe-ctx-item" data-action="cut">Cut${l>1?` (${l})`:""}</div>`:""}
|
|
492
|
+
${d?`<div class="bxe-ctx-item" data-action="copy">Copy${l>1?` (${l})`:""}</div>`:""}
|
|
493
|
+
${p?'<div class="bxe-ctx-item" data-action="paste">Paste</div>':""}
|
|
494
|
+
${d||p?'<div class="bxe-ctx-sep"></div>':""}
|
|
495
|
+
${c&&!d?'<div class="bxe-ctx-item" data-action="duplicate">Duplicate</div><div class="bxe-ctx-sep"></div>':""}
|
|
496
|
+
<div class="bxe-ctx-item danger" data-action="delete">${this._esc(h)}</div>`,this._ctxMenu.style.left=r+"px",this._ctxMenu.style.top=a+"px",this._ctxMenu.style.display="block",setTimeout(()=>document.addEventListener("click",()=>this._hideContextMenu(),{once:!0}),50)}_showBackgroundContextMenu(r,a){const s=!!this._clipboard;this._ctxMenu.innerHTML=`
|
|
497
|
+
<div class="bxe-ctx-item" data-action="add-node-here">Add Node Here</div>
|
|
498
|
+
${s?'<div class="bxe-ctx-sep"></div><div class="bxe-ctx-item" data-action="paste">Paste</div>':""}`,this._ctxMenu.style.left=r+"px",this._ctxMenu.style.top=a+"px",this._ctxMenu.style.display="block",setTimeout(()=>document.addEventListener("click",()=>this._hideContextMenu(),{once:!0}),50)}_hideContextMenu(){this._ctxMenu&&(this._ctxMenu.style.display="none")}_updateHistoryButtons(){this._undoBtn&&(this._undoBtn.disabled=!this.canUndo()),this._redoBtn&&(this._redoBtn.disabled=!this.canRedo())}_init(){this._injectCSS(),this._createUI();const r=this._buildStylesheet();this.cy=Ru({container:this._canvasDiv,elements:this.options.elements||{nodes:[],edges:[]},style:r,layout:this.options.layout,userZoomingEnabled:!0,userPanningEnabled:!0,boxSelectionEnabled:!0}),this._initPanzoomControls(),this._setupEvents(),this._renderPalette(),this.createLayoutPanel(this._layoutPaneContentEl),this._refreshStylesheet()}_buildStylesheet(){const r=[{selector:"node",style:{label:"data(label)","text-valign":"center","text-halign":"center","background-color":"#666",color:"#fff","font-size":"12px",width:"60px",height:"60px"}},{selector:"edge",style:{label:"data(label)",width:2,"line-color":"#999","target-arrow-color":"#999","target-arrow-shape":"triangle","curve-style":"bezier","font-size":"10px"}},{selector:":selected",style:{"overlay-color":"#4A90E2","overlay-padding":6,"overlay-opacity":.25,"border-width":3,"border-color":"#4A90E2"}},{selector:".eh-source",style:{"border-width":3,"border-color":"#3498db"}},{selector:".eh-target",style:{"border-width":3,"border-color":"#3498db"}},{selector:".eh-preview, .eh-ghost-edge",style:{"background-color":"#3498db","line-color":"#3498db","target-arrow-color":"#3498db","source-arrow-color":"#3498db","line-style":"dashed"}},{selector:".eh-ghost-edge.eh-preview-active",style:{opacity:0}}],a=this.userStylesheet,s=this._generateElementStyles();return[...r,...a,...s]}_generateElementStyles(){const r=[];if(this.cy)this.cy.elements().forEach(a=>{const s=a.data("_style");if(s&&Object.keys(s).length>0){const c=a.isNode()?"node":"edge";r.push({selector:`${c}[id="${a.id()}"]`,style:s})}});else{const a=this.options.elements||{nodes:[],edges:[]};(a.nodes||[]).forEach(s=>{s.data&&s.data._style&&r.push({selector:`node[id="${s.data.id}"]`,style:s.data._style})}),(a.edges||[]).forEach(s=>{s.data&&s.data._style&&r.push({selector:`edge[id="${s.data.id}"]`,style:s.data._style})})}return r}_setupEvents(){this.cy.on("add remove data",r=>{this._emit("change",{type:r.type,target:r.target})}),this.cy.on("select",r=>{this._emit("select",{target:r.target}),this._emit("selectionChange",{type:"select",target:r.target,selected:this.cy.$(":selected").jsons()}),this._selectedElement=r.target,this._refreshProperties(r.target),this._switchPane("properties")}),this.cy.on("unselect",r=>{this._emit("unselect",{target:r.target}),this._emit("selectionChange",{type:"unselect",target:r.target,selected:this.cy.$(":selected").jsons()}),this.cy.$(":selected").length||this._clearProperties()}),this.cy.on("grabon","node",r=>{if(this._restoringState||this._ehDrawing)return;const a=r.target.position();this._preGrabPos={x:a.x,y:a.y},this._preGrabSnapshot=this.exportGraph()}),this.cy.on("free","node",r=>{if(this._restoringState||this._ehDrawing||!this._preGrabSnapshot)return;const a=r.target.position();(a.x!==this._preGrabPos.x||a.y!==this._preGrabPos.y)&&(this._undoStack.push(this._preGrabSnapshot),this._undoStack.length>50&&this._undoStack.shift(),this._redoStack.length=0,this._emitHistoryChange()),this._preGrabSnapshot=null,this._preGrabPos=null}),this.cy.on("dbltap",r=>{r.target===this.cy&&this._addNodeAtPosition(r.position)}),this.cy.on("cxttap","node,edge",r=>{r.preventDefault(),this._showContextMenu(r.originalEvent.clientX,r.originalEvent.clientY,r.target)}),this.cy.on("cxttap",r=>{r.target===this.cy&&(r.preventDefault(),this._ctxPosition=r.position,this._showBackgroundContextMenu(r.originalEvent.clientX,r.originalEvent.clientY))}),this.cy.on("tap",()=>this._hideContextMenu())}addNode(r,a=null,s={}){this._pushUndo();const c={...r};Object.keys(s).length>0&&(c._style={...c._style||{},...s});const l={group:"nodes",data:c};a&&typeof a.x=="number"&&(l.position=a);const h=this.cy.add(l);return this._updateStylesheet(),this._emit("nodeAdded",{node:h.json()}),h.json()}addEdge(r,a,s={},c={}){this._pushUndo();const l={source:r,target:a,...s};Object.keys(c).length>0&&(l._style=c);const h=this.cy.add({group:"edges",data:l});return this._updateStylesheet(),this._emit("edgeAdded",{edge:h.json()}),h.json()}removeElement(r){this._pushUndo();const a=this.cy.getElementById(r);if(a.length>0){const s=a.json();return a.remove(),this._emit("elementRemoved",{element:s}),!0}return!1}updateElement(r,a,s=null){this._pushUndo();const c=this.cy.getElementById(r);if(c.length===0)return!1;const l=c.data(),h={...a};return s!==null?h._style={...l._style,...s}:l._style&&(h._style=l._style),c.data(h),s!==null&&this._updateStylesheet(),this._emit("elementUpdated",{element:c.json()}),c.json()}updateElementStyle(r,a){this._pushUndo();const s=this.cy.getElementById(r);if(s.length===0)return!1;const c={...s.data("_style")||{},...a};return s.data("_style",c),this._updateStylesheet(),this._emit("styleUpdated",{elementId:r,style:c}),c}_updateStylesheet(){const r=this._buildStylesheet();this.cy.style().fromJson(r).update()}runLayout(r){this._pushUndo(),typeof r=="string"&&(r={name:r});const{name:a,...s}=r;this._lastLayout={name:a,options:{...s}};const c=this.cy.nodes(":selected"),l=c.length>0?c.add(c.edgesWith(c)):this.cy;this._stopRunningLayout();const h=l.layout(r);this._runningLayout=h,h.one("layoutstop",()=>{this._runningLayout=null}),h.run(),this._emit("layoutRun",{options:r})}_stopRunningLayout(){if(this._runningLayout){try{this._runningLayout.stop()}catch{}this._runningLayout=null}}getLastLayout(){return{...this._lastLayout,options:{...this._lastLayout.options}}}setLastLayout(r,a={}){this._lastLayout={name:r,options:{...a}}}getAvailableLayouts(){return Object.entries(DV).filter(([r,a])=>a.builtin||this._isLayoutRegistered(r)).map(([r,a])=>({name:r,label:a.label,params:a.params}))}getLayoutParams(r){var a;return((a=DV[r])==null?void 0:a.params)||[]}_isLayoutRegistered(r){try{const a=this.cy.layout({name:r,stop:()=>{}});return!!(a&&typeof a.run=="function")}catch{return!1}}getElements(){const r=this.cy.json().elements||{};return{nodes:r.nodes||[],edges:r.edges||[]}}loadElements(r){const a=r.nodes||(Array.isArray(r)?r.filter(c=>c.group==="nodes"):[]),s=r.edges||(Array.isArray(r)?r.filter(c=>c.group==="edges"):[]);this.cy.batch(()=>{this.cy.elements().remove(),a.length&&this.cy.add(a),s.length&&this.cy.add(s)}),this._updateStylesheet(),this._emit("elementsLoaded",{elements:r})}exportGraph(){const r=this.cy.json().elements,a=c=>{if(!c.classes)return c;const l=c.classes.split(" ").filter(h=>!h.startsWith("eh-")).join(" ");return l!==c.classes?{...c,classes:l}:c},s=c=>{const l=c.classes||"";return l.includes("eh-ghost")||l.includes("eh-preview")};return{elements:{nodes:(r.nodes||[]).filter(c=>!s(c)).map(a),edges:(r.edges||[]).filter(c=>!s(c)).map(a)},userStylesheet:this.userStylesheet.map(c=>({selector:c.selector,style:{...c.style}})),lastLayout:this.getLastLayout(),context:{...this.context},version:"1.0.0"}}importGraph(r){r.elements&&this.loadElements(r.elements);const a=r.userStylesheet||r.stylesheet;if(a&&(this.userStylesheet=a.map(s=>({selector:s.selector,style:{...s.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet})),r.lastLayout&&(this._lastLayout={name:r.lastLayout.name||"dagre",options:{...r.lastLayout.options||{}}},this._layoutPanel&&this._layoutPanelSync()),this._nodesNeedLayout()){const{name:s,options:c}=this._lastLayout;this.runLayout({name:s,...c})}this._emit("graphImported",{graphData:r}),this._stylesheetRulesEl&&this._refreshStylesheet(),r.context&&(this.context={...r.context},this._renderContextPane())}_nodesNeedLayout(){const r=this.cy.nodes();return r.length?r.every(a=>{const s=a.position();return s.x===0&&s.y===0}):!1}getStylesheet(){return this.userStylesheet.map(r=>({selector:r.selector,style:{...r.style}}))}setStylesheet(r){this._pushUndo(),this.userStylesheet=r.map(a=>({selector:a.selector,style:{...a.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet()}addStyleRule(r,a={}){return this._pushUndo(),this.userStylesheet.push({selector:r,style:{...a}}),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),this.userStylesheet.length-1}updateStyleRule(r,a,s){return this._pushUndo(),r<0||r>=this.userStylesheet.length?!1:(this.userStylesheet[r]={selector:a,style:{...s}},this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),!0)}removeStyleRule(r){return this._pushUndo(),r<0||r>=this.userStylesheet.length?!1:(this.userStylesheet.splice(r,1),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),!0)}getSelected(){return this.cy.$(":selected").toArray().map(r=>r.json())}removeSelected(){const r=this.cy.$(":selected");return r.length?(this._pushUndo(),r.forEach(a=>{const s=a.json();this.cy.remove(a),this._emit("elementRemoved",{element:s})}),this._updateStylesheet(),r.length):0}copy(){const r=this.cy.$("node:selected");if(!r.length)return!1;const a=new Set(r.map(c=>c.id())),s=this.cy.$("edge:selected").filter(c=>a.has(c.data("source"))&&a.has(c.data("target"))).add(this.cy.edges().filter(c=>a.has(c.data("source"))&&a.has(c.data("target"))));return this._clipboard={nodes:r.map(c=>c.json()),edges:s.map(c=>c.json())},this._pasteOffset=0,this._emit("clipboardChange",{hasClipboard:!0}),!0}cut(){return this.copy()?(this.removeSelected(),!0):!1}paste(){if(!this._clipboard)return!1;this._pushUndo(),this._pasteOffset+=20;const r=this._pasteOffset,a={},s=[],c=[];this._clipboard.nodes.forEach(h=>{const d="node-"+Math.random().toString(36).slice(2,9);a[h.data.id]=d;const p={...h.data,id:d},b=h.position?{x:h.position.x+r,y:h.position.y+r}:void 0,m={group:"nodes",data:p};b&&(m.position=b),s.push(m)}),this._clipboard.edges.forEach(h=>{const d=a[h.data.source],p=a[h.data.target];if(!d||!p)return;const b="edge-"+Math.random().toString(36).slice(2,9);c.push({group:"edges",data:{...h.data,id:b,source:d,target:p}})}),this.cy.$(":selected").unselect();const l=this.cy.add([...s,...c]);return l.select(),this._updateStylesheet(),this._emit("paste",{nodes:s,edges:c}),l}canPaste(){return!!this._clipboard}_pushUndo(){var r,a;if(this._restoringState)return;const s=this.exportGraph();console.debug("[Boxes] pushUndo: snapshot has",(r=s.elements.nodes)==null?void 0:r.length,"nodes,",(a=s.elements.edges)==null?void 0:a.length,"edges"),this._undoStack.push(s),this._undoStack.length>50&&this._undoStack.shift(),this._redoStack.length=0,this._emitHistoryChange()}_emitHistoryChange(){this._emit("historyChange",{canUndo:this.canUndo(),canRedo:this.canRedo()}),this._updateHistoryButtons()}_restoreSnapshot(r){this._restoringState=!0;try{this.loadElements(r.elements||{}),this.cy.nodes().length&&this.cy.fit(void 0,30),r.userStylesheet&&(this.userStylesheet=r.userStylesheet.map(a=>({selector:a.selector,style:{...a.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet})),r.lastLayout&&(this._lastLayout={name:r.lastLayout.name,options:{...r.lastLayout.options||{}}},this._layoutPanel&&this._layoutPanelSync())}finally{this._restoringState=!1}if(this._emit("graphImported",{graphData:r}),this._stylesheetRulesEl&&this._refreshStylesheet(),this._selectedElement){const a=this.cy.getElementById(this._selectedElement.id());a.length?this._refreshProperties(a):this._clearProperties()}}undo(){var r,a;if(!this._undoStack.length)return!1;this._stopRunningLayout(),this._preGrabSnapshot=null,this._preGrabPos=null,this._redoStack.push(this.exportGraph());const s=this._undoStack.pop();return console.debug("[Boxes] undo: restoring snapshot with",(r=s.elements.nodes)==null?void 0:r.length,"nodes,",(a=s.elements.edges)==null?void 0:a.length,"edges"),this._restoreSnapshot(s),this._emitHistoryChange(),!0}redo(){var r,a;if(!this._redoStack.length)return!1;this._stopRunningLayout(),this._preGrabSnapshot=null,this._preGrabPos=null,this._undoStack.push(this.exportGraph());const s=this._redoStack.pop();return console.debug("[Boxes] redo: restoring snapshot with",(r=s.elements.nodes)==null?void 0:r.length,"nodes,",(a=s.elements.edges)==null?void 0:a.length,"edges"),this._restoreSnapshot(s),this._emitHistoryChange(),!0}canUndo(){return this._undoStack.length>0}canRedo(){return this._redoStack.length>0}selectElements(r){this.cy.elements().unselect(),r.forEach(a=>{this.cy.getElementById(a).select()})}on(r,a){this.eventHandlers.has(r)||this.eventHandlers.set(r,[]),this.eventHandlers.get(r).push(a)}off(r,a){if(!this.eventHandlers.has(r))return;const s=this.eventHandlers.get(r),c=s.indexOf(a);c>-1&&s.splice(c,1)}_emit(r,a){this.eventHandlers.has(r)&&this.eventHandlers.get(r).forEach(s=>{s(a)})}getCytoscape(){return this.cy}destroy(){var r;this._destroyEdgeHandle(),this._destroyLayoutPanel(),this.cy&&(this.cy.destroy(),this.cy=null),this.eventHandlers.clear(),this._ctxMenu&&((r=this._ctxMenu.parentNode)==null||r.removeChild(this._ctxMenu),this._ctxMenu=null),this._keydownHandler&&(document.removeEventListener("keydown",this._keydownHandler),this._keydownHandler=null),this.container&&(this.container.innerHTML="",this.container.style.cssText="")}getNodeTypes(){return this._nodeTypes.map(r=>({...r}))}getEdgeTypes(){return this._edgeTypes.map(r=>({...r}))}addNodeOfType(r,a=null){const s=this._nodeTypes.find(l=>l.id===r);if(!s)return null;const c={id:wve("n"),label:s.label,...s.data};if(!a){const l=this.cy.pan(),h=this.cy.zoom(),d=this.cy.nodes().length*15,p=this._canvasDiv||this.container;a={x:(p.offsetWidth/2-l.x)/h+d%150-75,y:(p.offsetHeight/2-l.y)/h+Math.floor(d/150)*80}}return this.addNode(c,a)}setEdgeType(r){const a=this._edgeTypes.find(s=>s.id===r)||null;this.currentEdgeType=a,this._emit("edgeTypeChanged",{edgeType:this.currentEdgeType}),this._edgePaletteEl&&this._edgePaletteEl.querySelectorAll(".bxe-palette-item").forEach(s=>{s.classList.toggle("selected",s.dataset.typeId===r)})}getEdgeType(){return this.currentEdgeType?{...this.currentEdgeType}:null}_initPanzoomControls(){const r=document.createElement("div");r.className="bxe-panzoom",r.innerHTML=`
|
|
499
|
+
<button class="bxe-pz-btn" data-pz="zoom-in" title="Zoom in">+</button>
|
|
500
|
+
<button class="bxe-pz-btn" data-pz="fit" title="Fit graph">⊡</button>
|
|
501
|
+
<button class="bxe-pz-btn" data-pz="zoom-out" title="Zoom out">−</button>
|
|
502
|
+
`,this._canvasWrap.appendChild(r),r.addEventListener("click",a=>{const s=a.target.closest("[data-pz]");if(!s)return;const c=this.cy;switch(s.dataset.pz){case"zoom-in":c.zoom({level:c.zoom()*1.3,renderedPosition:{x:c.width()/2,y:c.height()/2}});break;case"zoom-out":c.zoom({level:c.zoom()/1.3,renderedPosition:{x:c.width()/2,y:c.height()/2}});break;case"fit":c.fit(void 0,30);break}})}_initEdgeHandle(){this._eh=this.cy.edgehandles({canConnect:(c,l)=>!c.same(l),edgeParams:(c,l)=>{var h,d;return{data:{label:((h=this.currentEdgeType)==null?void 0:h.label)||"",...((d=this.currentEdgeType)==null?void 0:d.data)||{}}}},snap:!1,noEdgeEventsInDraw:!0,disableBrowserGestures:!0}),this._ehHandleDiv=null,this._ehHandleNode=null,this._ehDrawing=!1;const r=(c,l)=>{const h=c.renderedBoundingBox({includeLabels:!1}),d=this.cy.container().getBoundingClientRect(),p=d.left+(h.x1+h.x2)/2,b=d.top+h.y2,m=16,w=8;l.style.left=`${p-m/2}px`,l.style.top=`${b-w/2}px`},a=()=>{var c;this._ehHandleDiv&&(this._ehHandleDiv.removeEventListener("mousedown",this._ehStartDrawing),(c=this._ehHandleDiv.parentNode)==null||c.removeChild(this._ehHandleDiv),this._ehHandleDiv=null),this._ehHandleNode=null},s=c=>{if(this._ehDrawing)return;a(),this._ehHandleNode=c;const l=document.createElement("div");l.className="boxes-eh-handle",l.style.cssText=["position:fixed","width:16px","height:8px","background:#3498db","border-radius:0 0 16px 16px","cursor:crosshair","z-index:9999","opacity:0.85","pointer-events:auto"].join(";"),l.addEventListener("mousedown",this._ehStartDrawing),document.body.appendChild(l),this._ehHandleDiv=l,r(c,l)};this._ehStartDrawing=c=>{c.preventDefault(),c.stopPropagation(),this._ehHandleNode&&this._eh.start(this._ehHandleNode)},this._ehMouseoverHandler=c=>s(c.target),this._ehRemoveHandler=()=>a(),this._ehWindowMouseup=()=>this._eh.stop(),this.cy.on("mouseover","node",this._ehMouseoverHandler),this.cy.on("grab","node",this._ehRemoveHandler),this.cy.on("tap",c=>{c.target===this.cy&&a()}),this.cy.on("zoom pan",this._ehRemoveHandler),window.addEventListener("mouseup",this._ehWindowMouseup),this._ehCompleteHandler=(c,l,h,d)=>{this._updateStylesheet(),d.forEach(p=>{this._emit("edgeAdded",{edge:p.json()})}),this._emit("edgeHandleComplete",{sourceId:l.id(),targetId:h.id(),edgeType:this.currentEdgeType})},this.cy.on("ehstart",()=>{this._pushUndo(),this._ehDrawing=!0,a()}),this.cy.on("ehstop",()=>{this._ehDrawing=!1}),this.cy.on("ehcomplete",this._ehCompleteHandler)}_destroyEdgeHandle(){var r;this._ehCompleteHandler&&(this.cy.off("ehcomplete",this._ehCompleteHandler),this._ehCompleteHandler=null),this._ehMouseoverHandler&&(this.cy.off("mouseover",this._ehMouseoverHandler),this._ehMouseoverHandler=null),this._ehRemoveHandler&&(this.cy.off("grab",this._ehRemoveHandler),this.cy.off("zoom pan",this._ehRemoveHandler),this._ehRemoveHandler=null),this._ehWindowMouseup&&(window.removeEventListener("mouseup",this._ehWindowMouseup),this._ehWindowMouseup=null),this._ehHandleDiv&&((r=this._ehHandleDiv.parentNode)==null||r.removeChild(this._ehHandleDiv),this._ehHandleDiv=null),this._eh&&(this._eh.destroy(),this._eh=null)}_renderContextPane(){const r=this._contextEntriesEl;if(!r)return;const a=Object.entries(this.context);if(!a.length){r.innerHTML='<div class="bxe-empty">No entries. Add a prefix mapping or term definition.</div>';return}r.innerHTML=a.map(([s,c])=>{const l=typeof c=="object"&&c!==null,h=this._esc(s);if(l){const d=this._esc(JSON.stringify(c,null,2));return`
|
|
503
|
+
<div class="bxe-ctx-row" data-key="${h}">
|
|
504
|
+
<input class="bxe-ctx-key bxe-cell-input" type="text" value="${h}" placeholder="term" data-role="key" />
|
|
505
|
+
<span class="bxe-ctx-colon">:</span>
|
|
506
|
+
<textarea class="bxe-ctx-val bxe-cell-input bxe-ctx-obj-val" rows="2" data-role="val" data-type="object">${d}</textarea>
|
|
507
|
+
<button class="bxe-btn-del" data-role="del" title="Remove">×</button>
|
|
508
|
+
</div>`}else return`
|
|
509
|
+
<div class="bxe-ctx-row" data-key="${h}">
|
|
510
|
+
<input class="bxe-ctx-key bxe-cell-input" type="text" value="${h}" placeholder="prefix" data-role="key" />
|
|
511
|
+
<span class="bxe-ctx-colon">:</span>
|
|
512
|
+
<input class="bxe-ctx-val bxe-cell-input" type="text" value="${this._esc(String(c))}" placeholder="namespace URI" data-role="val" data-type="string" />
|
|
513
|
+
<button class="bxe-btn-del" data-role="del" title="Remove">×</button>
|
|
514
|
+
</div>`}).join("")}_addContextEntry(r){var a;if(r==="term"){let c="term1",l=1;for(;c in this.context;)c=`term${++l}`;this.context[c]={"@type":"@id"}}else{let c="prefix1",l=1;for(;c in this.context;)c=`prefix${++l}`;this.context[c]=""}this._renderContextPane();const s=(a=this._contextEntriesEl)==null?void 0:a.querySelectorAll(".bxe-ctx-key");s!=null&&s.length&&s[s.length-1].focus()}_handleContextEvent(r){const a=r.target.closest(".bxe-ctx-row");if(!a)return;const s=a.dataset.key,c=r.target.dataset.role,l=r.target.dataset.type;if(c==="del")delete this.context[s],this._renderContextPane(),this._emit("contextChanged",{context:{...this.context}});else if(c==="key"&&r.type==="change"){const h=r.target.value.trim();if(!h||h===s){r.target.value=s;return}const d={};for(const[p,b]of Object.entries(this.context))d[p===s?h:p]=b;this.context=d,a.dataset.key=h,this._emit("contextChanged",{context:{...this.context}})}else if(c==="val"&&r.type==="change")if(l==="object")try{const h=JSON.parse(r.target.value);if(typeof h!="object"||h===null||Array.isArray(h))throw new Error("Must be a JSON object");r.target.classList.remove("bxe-ctx-invalid"),this.context[s]=h,this._emit("contextChanged",{context:{...this.context}})}catch{r.target.classList.add("bxe-ctx-invalid")}else this.context[s]=r.target.value,this._emit("contextChanged",{context:{...this.context}})}createLayoutPanel(r){if(!r)return;if(this._destroyLayoutPanel(),!document.getElementById("boxes-layout-panel-css")){const b=document.createElement("style");b.id="boxes-layout-panel-css",b.textContent=`
|
|
515
|
+
.blp-panel { padding: 10px; font-size: 12px; }
|
|
516
|
+
.blp-algo-row { display:flex;align-items:center;gap:8px;margin-bottom:10px; }
|
|
517
|
+
.blp-algo-row label { font-weight:600;white-space:nowrap; }
|
|
518
|
+
.blp-algo-row select { flex:1; }
|
|
519
|
+
.blp-params { border-top:1px solid #eee;padding-top:8px;margin-bottom:8px; }
|
|
520
|
+
.blp-row {
|
|
521
|
+
display:flex;align-items:center;justify-content:space-between;
|
|
522
|
+
margin-bottom:6px;gap:8px;
|
|
523
|
+
}
|
|
524
|
+
.blp-row label { flex:0 0 auto;width:48%;font-size:11px;color:#555; }
|
|
525
|
+
.blp-row input, .blp-row select {
|
|
526
|
+
flex:1;min-width:0;padding:2px 5px;border:1px solid #ccc;
|
|
527
|
+
border-radius:3px;font-size:12px;box-sizing:border-box;
|
|
528
|
+
}
|
|
529
|
+
.blp-row input[type=checkbox] { flex:none;width:auto;align-self:center; }
|
|
530
|
+
.blp-run-btn {
|
|
531
|
+
width:100%;padding:6px;background:#3498db;color:#fff;
|
|
532
|
+
border:none;border-radius:4px;cursor:pointer;font-size:12px;
|
|
533
|
+
}
|
|
534
|
+
.blp-run-btn:hover { background:#2176ae; }
|
|
535
|
+
`,document.head.appendChild(b)}this._layoutPanelTarget=r,r.innerHTML="";const a=document.createElement("div");a.className="blp-panel";const s=document.createElement("div");s.className="blp-algo-row";const c=document.createElement("label");c.textContent="Algorithm";const l=document.createElement("select");this.getAvailableLayouts().forEach(({name:b,label:m})=>{const w=document.createElement("option");w.value=b,w.textContent=m,l.appendChild(w)}),l.value=this._lastLayout.name,s.appendChild(c),s.appendChild(l),a.appendChild(s);const h=document.createElement("div");h.className="blp-params",a.appendChild(h);const d=document.createElement("button");d.className="blp-run-btn",d.textContent="▶ Apply Layout",a.appendChild(d),r.appendChild(a);const p=b=>{const m=this.getLayoutParams(b),w=b===this._lastLayout.name?this._lastLayout.options:{};h.innerHTML="",m.forEach(k=>{const P=document.createElement("div");P.className="blp-row";const S=document.createElement("label");S.textContent=k.label,P.appendChild(S);let M;k.type==="boolean"?(M=document.createElement("input"),M.type="checkbox",M.checked=k.name in w?w[k.name]:k.default):k.type==="select"?(M=document.createElement("select"),k.options.forEach(L=>{const T=document.createElement("option");T.value=L,T.textContent=L,M.appendChild(T)}),M.value=k.name in w?w[k.name]:k.default):(M=document.createElement("input"),M.type="number",k.min!==void 0&&(M.min=k.min),k.max!==void 0&&(M.max=k.max),k.step!==void 0&&(M.step=k.step),M.value=k.name in w?w[k.name]:k.default),M.dataset.param=k.name,P.appendChild(M),h.appendChild(P)})};p(this._lastLayout.name),this._layoutPanelRenderParams=p,l.addEventListener("change",()=>p(l.value)),d.addEventListener("click",()=>{const b=l.value,m=this.getLayoutParams(b),w={};m.forEach(k=>{const P=h.querySelector(`[data-param="${CSS.escape(k.name)}"]`);if(P)if(k.type==="boolean")w[k.name]=P.checked;else if(k.type==="number"){const S=parseFloat(P.value);!isNaN(S)&&!(S===0&&(k.name==="rows"||k.name==="cols"||k.name==="radius"))&&(w[k.name]=S)}else w[k.name]=P.value}),this.runLayout({name:b,...w})}),this._layoutPanelAlgoSel=l,this._layoutPanelParamsDiv=h}_layoutPanelSync(){this._layoutPanelAlgoSel&&(this._layoutPanelAlgoSel.value=this._lastLayout.name,this._layoutPanelRenderParams&&this._layoutPanelRenderParams(this._lastLayout.name))}_destroyLayoutPanel(){this._layoutPanelTarget=null,this._layoutPanelAlgoSel=null,this._layoutPanelParamsDiv=null,this._layoutPanelRenderParams=null}}var BV={},w2={};w2.byteLength=Eve,w2.toByteArray=Pve,w2.fromByteArray=Tve;for(var pl=[],Gu=[],kve=typeof Uint8Array<"u"?Uint8Array:Array,RM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rb=0,_ve=RM.length;rb<_ve;++rb)pl[rb]=RM[rb],Gu[RM.charCodeAt(rb)]=rb;Gu[45]=62,Gu[95]=63;function GV(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=t.indexOf("=");a===-1&&(a=r);var s=a===r?0:4-a%4;return[a,s]}function Eve(t){var r=GV(t),a=r[0],s=r[1];return(a+s)*3/4-s}function Cve(t,r,a){return(r+a)*3/4-a}function Pve(t){var r,a=GV(t),s=a[0],c=a[1],l=new kve(Cve(t,s,c)),h=0,d=c>0?s-4:s,p;for(p=0;p<d;p+=4)r=Gu[t.charCodeAt(p)]<<18|Gu[t.charCodeAt(p+1)]<<12|Gu[t.charCodeAt(p+2)]<<6|Gu[t.charCodeAt(p+3)],l[h++]=r>>16&255,l[h++]=r>>8&255,l[h++]=r&255;return c===2&&(r=Gu[t.charCodeAt(p)]<<2|Gu[t.charCodeAt(p+1)]>>4,l[h++]=r&255),c===1&&(r=Gu[t.charCodeAt(p)]<<10|Gu[t.charCodeAt(p+1)]<<4|Gu[t.charCodeAt(p+2)]>>2,l[h++]=r>>8&255,l[h++]=r&255),l}function Sve(t){return pl[t>>18&63]+pl[t>>12&63]+pl[t>>6&63]+pl[t&63]}function Nve(t,r,a){for(var s,c=[],l=r;l<a;l+=3)s=(t[l]<<16&16711680)+(t[l+1]<<8&65280)+(t[l+2]&255),c.push(Sve(s));return c.join("")}function Tve(t){for(var r,a=t.length,s=a%3,c=[],l=16383,h=0,d=a-s;h<d;h+=l)c.push(Nve(t,h,h+l>d?d:h+l));return s===1?(r=t[a-1],c.push(pl[r>>2]+pl[r<<4&63]+"==")):s===2&&(r=(t[a-2]<<8)+t[a-1],c.push(pl[r>>10]+pl[r>>4&63]+pl[r<<2&63]+"=")),c.join("")}var DM={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */DM.read=function(t,r,a,s,c){var l,h,d=c*8-s-1,p=(1<<d)-1,b=p>>1,m=-7,w=a?c-1:0,k=a?-1:1,P=t[r+w];for(w+=k,l=P&(1<<-m)-1,P>>=-m,m+=d;m>0;l=l*256+t[r+w],w+=k,m-=8);for(h=l&(1<<-m)-1,l>>=-m,m+=s;m>0;h=h*256+t[r+w],w+=k,m-=8);if(l===0)l=1-b;else{if(l===p)return h?NaN:(P?-1:1)*(1/0);h=h+Math.pow(2,s),l=l-b}return(P?-1:1)*h*Math.pow(2,l-s)},DM.write=function(t,r,a,s,c,l){var h,d,p,b=l*8-c-1,m=(1<<b)-1,w=m>>1,k=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=s?0:l-1,S=s?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(d=isNaN(r)?1:0,h=m):(h=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+w>=1?r+=k/p:r+=k*Math.pow(2,1-w),r*p>=2&&(h++,p/=2),h+w>=m?(d=0,h=m):h+w>=1?(d=(r*p-1)*Math.pow(2,c),h=h+w):(d=r*Math.pow(2,w-1)*Math.pow(2,c),h=0));c>=8;t[a+P]=d&255,P+=S,d/=256,c-=8);for(h=h<<c|d,b+=c;b>0;t[a+P]=h&255,P+=S,h/=256,b-=8);t[a+P-S]|=M*128};/*!
|
|
536
|
+
* The buffer module from node.js, for the browser.
|
|
537
|
+
*
|
|
538
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
539
|
+
* @license MIT
|
|
540
|
+
*/(function(t){const r=w2,a=DM,s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=d,t.SlowBuffer=j,t.INSPECT_MAX_BYTES=50;const c=2147483647;t.kMaxLength=c,d.TYPED_ARRAY_SUPPORT=l(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const U=new Uint8Array(1),ne={foo:function(){return 42}};return Object.setPrototypeOf(ne,Uint8Array.prototype),Object.setPrototypeOf(U,ne),U.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function h(U){if(U>c)throw new RangeError('The value "'+U+'" is invalid for option "size"');const ne=new Uint8Array(U);return Object.setPrototypeOf(ne,d.prototype),ne}function d(U,ne,ue){if(typeof U=="number"){if(typeof ne=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(U)}return p(U,ne,ue)}d.poolSize=8192;function p(U,ne,ue){if(typeof U=="string")return k(U,ne);if(ArrayBuffer.isView(U))return S(U);if(U==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(Dt(U,ArrayBuffer)||U&&Dt(U.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Dt(U,SharedArrayBuffer)||U&&Dt(U.buffer,SharedArrayBuffer)))return M(U,ne,ue);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const we=U.valueOf&&U.valueOf();if(we!=null&&we!==U)return d.from(we,ne,ue);const Ae=L(U);if(Ae)return Ae;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return d.from(U[Symbol.toPrimitive]("string"),ne,ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}d.from=function(U,ne,ue){return p(U,ne,ue)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function b(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function m(U,ne,ue){return b(U),U<=0?h(U):ne!==void 0?typeof ue=="string"?h(U).fill(ne,ue):h(U).fill(ne):h(U)}d.alloc=function(U,ne,ue){return m(U,ne,ue)};function w(U){return b(U),h(U<0?0:T(U)|0)}d.allocUnsafe=function(U){return w(U)},d.allocUnsafeSlow=function(U){return w(U)};function k(U,ne){if((typeof ne!="string"||ne==="")&&(ne="utf8"),!d.isEncoding(ne))throw new TypeError("Unknown encoding: "+ne);const ue=I(U,ne)|0;let we=h(ue);const Ae=we.write(U,ne);return Ae!==ue&&(we=we.slice(0,Ae)),we}function P(U){const ne=U.length<0?0:T(U.length)|0,ue=h(ne);for(let we=0;we<ne;we+=1)ue[we]=U[we]&255;return ue}function S(U){if(Dt(U,Uint8Array)){const ne=new Uint8Array(U);return M(ne.buffer,ne.byteOffset,ne.byteLength)}return P(U)}function M(U,ne,ue){if(ne<0||U.byteLength<ne)throw new RangeError('"offset" is outside of buffer bounds');if(U.byteLength<ne+(ue||0))throw new RangeError('"length" is outside of buffer bounds');let we;return ne===void 0&&ue===void 0?we=new Uint8Array(U):ue===void 0?we=new Uint8Array(U,ne):we=new Uint8Array(U,ne,ue),Object.setPrototypeOf(we,d.prototype),we}function L(U){if(d.isBuffer(U)){const ne=T(U.length)|0,ue=h(ne);return ue.length===0||U.copy(ue,0,0,ne),ue}if(U.length!==void 0)return typeof U.length!="number"||Ut(U.length)?h(0):P(U);if(U.type==="Buffer"&&Array.isArray(U.data))return P(U.data)}function T(U){if(U>=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return U|0}function j(U){return+U!=U&&(U=0),d.alloc(+U)}d.isBuffer=function(U){return U!=null&&U._isBuffer===!0&&U!==d.prototype},d.compare=function(U,ne){if(Dt(U,Uint8Array)&&(U=d.from(U,U.offset,U.byteLength)),Dt(ne,Uint8Array)&&(ne=d.from(ne,ne.offset,ne.byteLength)),!d.isBuffer(U)||!d.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(U===ne)return 0;let ue=U.length,we=ne.length;for(let Ae=0,ie=Math.min(ue,we);Ae<ie;++Ae)if(U[Ae]!==ne[Ae]){ue=U[Ae],we=ne[Ae];break}return ue<we?-1:we<ue?1:0},d.isEncoding=function(U){switch(String(U).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(U,ne){if(!Array.isArray(U))throw new TypeError('"list" argument must be an Array of Buffers');if(U.length===0)return d.alloc(0);let ue;if(ne===void 0)for(ne=0,ue=0;ue<U.length;++ue)ne+=U[ue].length;const we=d.allocUnsafe(ne);let Ae=0;for(ue=0;ue<U.length;++ue){let ie=U[ue];if(Dt(ie,Uint8Array))Ae+ie.length>we.length?(d.isBuffer(ie)||(ie=d.from(ie)),ie.copy(we,Ae)):Uint8Array.prototype.set.call(we,ie,Ae);else if(d.isBuffer(ie))ie.copy(we,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=ie.length}return we};function I(U,ne){if(d.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||Dt(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);const ue=U.length,we=arguments.length>2&&arguments[2]===!0;if(!we&&ue===0)return 0;let Ae=!1;for(;;)switch(ne){case"ascii":case"latin1":case"binary":return ue;case"utf8":case"utf-8":return $e(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue*2;case"hex":return ue>>>1;case"base64":return Rt(U).length;default:if(Ae)return we?-1:$e(U).length;ne=(""+ne).toLowerCase(),Ae=!0}}d.byteLength=I;function R(U,ne,ue){let we=!1;if((ne===void 0||ne<0)&&(ne=0),ne>this.length||((ue===void 0||ue>this.length)&&(ue=this.length),ue<=0)||(ue>>>=0,ne>>>=0,ue<=ne))return"";for(U||(U="utf8");;)switch(U){case"hex":return fe(this,ne,ue);case"utf8":case"utf-8":return K(this,ne,ue);case"ascii":return le(this,ne,ue);case"latin1":case"binary":return he(this,ne,ue);case"base64":return J(this,ne,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,ne,ue);default:if(we)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),we=!0}}d.prototype._isBuffer=!0;function B(U,ne,ue){const we=U[ne];U[ne]=U[ue],U[ue]=we}d.prototype.swap16=function(){const U=this.length;if(U%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;ne<U;ne+=2)B(this,ne,ne+1);return this},d.prototype.swap32=function(){const U=this.length;if(U%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ne=0;ne<U;ne+=4)B(this,ne,ne+3),B(this,ne+1,ne+2);return this},d.prototype.swap64=function(){const U=this.length;if(U%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ne=0;ne<U;ne+=8)B(this,ne,ne+7),B(this,ne+1,ne+6),B(this,ne+2,ne+5),B(this,ne+3,ne+4);return this},d.prototype.toString=function(){const U=this.length;return U===0?"":arguments.length===0?K(this,0,U):R.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(U){if(!d.isBuffer(U))throw new TypeError("Argument must be a Buffer");return this===U?!0:d.compare(this,U)===0},d.prototype.inspect=function(){let U="";const ne=t.INSPECT_MAX_BYTES;return U=this.toString("hex",0,ne).replace(/(.{2})/g,"$1 ").trim(),this.length>ne&&(U+=" ... "),"<Buffer "+U+">"},s&&(d.prototype[s]=d.prototype.inspect),d.prototype.compare=function(U,ne,ue,we,Ae){if(Dt(U,Uint8Array)&&(U=d.from(U,U.offset,U.byteLength)),!d.isBuffer(U))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof U);if(ne===void 0&&(ne=0),ue===void 0&&(ue=U?U.length:0),we===void 0&&(we=0),Ae===void 0&&(Ae=this.length),ne<0||ue>U.length||we<0||Ae>this.length)throw new RangeError("out of range index");if(we>=Ae&&ne>=ue)return 0;if(we>=Ae)return-1;if(ne>=ue)return 1;if(ne>>>=0,ue>>>=0,we>>>=0,Ae>>>=0,this===U)return 0;let ie=Ae-we,Pe=ue-ne;const Fe=Math.min(ie,Pe),We=this.slice(we,Ae),Xe=U.slice(ne,ue);for(let wt=0;wt<Fe;++wt)if(We[wt]!==Xe[wt]){ie=We[wt],Pe=Xe[wt];break}return ie<Pe?-1:Pe<ie?1:0};function F(U,ne,ue,we,Ae){if(U.length===0)return-1;if(typeof ue=="string"?(we=ue,ue=0):ue>2147483647?ue=2147483647:ue<-2147483648&&(ue=-2147483648),ue=+ue,Ut(ue)&&(ue=Ae?0:U.length-1),ue<0&&(ue=U.length+ue),ue>=U.length){if(Ae)return-1;ue=U.length-1}else if(ue<0)if(Ae)ue=0;else return-1;if(typeof ne=="string"&&(ne=d.from(ne,we)),d.isBuffer(ne))return ne.length===0?-1:z(U,ne,ue,we,Ae);if(typeof ne=="number")return ne=ne&255,typeof Uint8Array.prototype.indexOf=="function"?Ae?Uint8Array.prototype.indexOf.call(U,ne,ue):Uint8Array.prototype.lastIndexOf.call(U,ne,ue):z(U,[ne],ue,we,Ae);throw new TypeError("val must be string, number or Buffer")}function z(U,ne,ue,we,Ae){let ie=1,Pe=U.length,Fe=ne.length;if(we!==void 0&&(we=String(we).toLowerCase(),we==="ucs2"||we==="ucs-2"||we==="utf16le"||we==="utf-16le")){if(U.length<2||ne.length<2)return-1;ie=2,Pe/=2,Fe/=2,ue/=2}function We(wt,nt){return ie===1?wt[nt]:wt.readUInt16BE(nt*ie)}let Xe;if(Ae){let wt=-1;for(Xe=ue;Xe<Pe;Xe++)if(We(U,Xe)===We(ne,wt===-1?0:Xe-wt)){if(wt===-1&&(wt=Xe),Xe-wt+1===Fe)return wt*ie}else wt!==-1&&(Xe-=Xe-wt),wt=-1}else for(ue+Fe>Pe&&(ue=Pe-Fe),Xe=ue;Xe>=0;Xe--){let wt=!0;for(let nt=0;nt<Fe;nt++)if(We(U,Xe+nt)!==We(ne,nt)){wt=!1;break}if(wt)return Xe}return-1}d.prototype.includes=function(U,ne,ue){return this.indexOf(U,ne,ue)!==-1},d.prototype.indexOf=function(U,ne,ue){return F(this,U,ne,ue,!0)},d.prototype.lastIndexOf=function(U,ne,ue){return F(this,U,ne,ue,!1)};function D(U,ne,ue,we){ue=Number(ue)||0;const Ae=U.length-ue;we?(we=Number(we),we>Ae&&(we=Ae)):we=Ae;const ie=ne.length;we>ie/2&&(we=ie/2);let Pe;for(Pe=0;Pe<we;++Pe){const Fe=parseInt(ne.substr(Pe*2,2),16);if(Ut(Fe))return Pe;U[ue+Pe]=Fe}return Pe}function H(U,ne,ue,we){return It($e(ne,U.length-ue),U,ue,we)}function Q(U,ne,ue,we){return It(xt(ne),U,ue,we)}function q(U,ne,ue,we){return It(Rt(ne),U,ue,we)}function Z(U,ne,ue,we){return It(st(ne,U.length-ue),U,ue,we)}d.prototype.write=function(U,ne,ue,we){if(ne===void 0)we="utf8",ue=this.length,ne=0;else if(ue===void 0&&typeof ne=="string")we=ne,ue=this.length,ne=0;else if(isFinite(ne))ne=ne>>>0,isFinite(ue)?(ue=ue>>>0,we===void 0&&(we="utf8")):(we=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ae=this.length-ne;if((ue===void 0||ue>Ae)&&(ue=Ae),U.length>0&&(ue<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");let ie=!1;for(;;)switch(we){case"hex":return D(this,U,ne,ue);case"utf8":case"utf-8":return H(this,U,ne,ue);case"ascii":case"latin1":case"binary":return Q(this,U,ne,ue);case"base64":return q(this,U,ne,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,U,ne,ue);default:if(ie)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),ie=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(U,ne,ue){return ne===0&&ue===U.length?r.fromByteArray(U):r.fromByteArray(U.slice(ne,ue))}function K(U,ne,ue){ue=Math.min(U.length,ue);const we=[];let Ae=ne;for(;Ae<ue;){const ie=U[Ae];let Pe=null,Fe=ie>239?4:ie>223?3:ie>191?2:1;if(Ae+Fe<=ue){let We,Xe,wt,nt;switch(Fe){case 1:ie<128&&(Pe=ie);break;case 2:We=U[Ae+1],(We&192)===128&&(nt=(ie&31)<<6|We&63,nt>127&&(Pe=nt));break;case 3:We=U[Ae+1],Xe=U[Ae+2],(We&192)===128&&(Xe&192)===128&&(nt=(ie&15)<<12|(We&63)<<6|Xe&63,nt>2047&&(nt<55296||nt>57343)&&(Pe=nt));break;case 4:We=U[Ae+1],Xe=U[Ae+2],wt=U[Ae+3],(We&192)===128&&(Xe&192)===128&&(wt&192)===128&&(nt=(ie&15)<<18|(We&63)<<12|(Xe&63)<<6|wt&63,nt>65535&&nt<1114112&&(Pe=nt))}}Pe===null?(Pe=65533,Fe=1):Pe>65535&&(Pe-=65536,we.push(Pe>>>10&1023|55296),Pe=56320|Pe&1023),we.push(Pe),Ae+=Fe}return se(we)}const ae=4096;function se(U){const ne=U.length;if(ne<=ae)return String.fromCharCode.apply(String,U);let ue="",we=0;for(;we<ne;)ue+=String.fromCharCode.apply(String,U.slice(we,we+=ae));return ue}function le(U,ne,ue){let we="";ue=Math.min(U.length,ue);for(let Ae=ne;Ae<ue;++Ae)we+=String.fromCharCode(U[Ae]&127);return we}function he(U,ne,ue){let we="";ue=Math.min(U.length,ue);for(let Ae=ne;Ae<ue;++Ae)we+=String.fromCharCode(U[Ae]);return we}function fe(U,ne,ue){const we=U.length;(!ne||ne<0)&&(ne=0),(!ue||ue<0||ue>we)&&(ue=we);let Ae="";for(let ie=ne;ie<ue;++ie)Ae+=bn[U[ie]];return Ae}function pe(U,ne,ue){const we=U.slice(ne,ue);let Ae="";for(let ie=0;ie<we.length-1;ie+=2)Ae+=String.fromCharCode(we[ie]+we[ie+1]*256);return Ae}d.prototype.slice=function(U,ne){const ue=this.length;U=~~U,ne=ne===void 0?ue:~~ne,U<0?(U+=ue,U<0&&(U=0)):U>ue&&(U=ue),ne<0?(ne+=ue,ne<0&&(ne=0)):ne>ue&&(ne=ue),ne<U&&(ne=U);const we=this.subarray(U,ne);return Object.setPrototypeOf(we,d.prototype),we};function me(U,ne,ue){if(U%1!==0||U<0)throw new RangeError("offset is not uint");if(U+ne>ue)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(U,ne,ue){U=U>>>0,ne=ne>>>0,ue||me(U,ne,this.length);let we=this[U],Ae=1,ie=0;for(;++ie<ne&&(Ae*=256);)we+=this[U+ie]*Ae;return we},d.prototype.readUintBE=d.prototype.readUIntBE=function(U,ne,ue){U=U>>>0,ne=ne>>>0,ue||me(U,ne,this.length);let we=this[U+--ne],Ae=1;for(;ne>0&&(Ae*=256);)we+=this[U+--ne]*Ae;return we},d.prototype.readUint8=d.prototype.readUInt8=function(U,ne){return U=U>>>0,ne||me(U,1,this.length),this[U]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(U,ne){return U=U>>>0,ne||me(U,2,this.length),this[U]|this[U+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(U,ne){return U=U>>>0,ne||me(U,2,this.length),this[U]<<8|this[U+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(U,ne){return U=U>>>0,ne||me(U,4,this.length),(this[U]|this[U+1]<<8|this[U+2]<<16)+this[U+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(U,ne){return U=U>>>0,ne||me(U,4,this.length),this[U]*16777216+(this[U+1]<<16|this[U+2]<<8|this[U+3])},d.prototype.readBigUInt64LE=sn(function(U){U=U>>>0,Qe(U,"offset");const ne=this[U],ue=this[U+7];(ne===void 0||ue===void 0)&&it(U,this.length-8);const we=ne+this[++U]*2**8+this[++U]*2**16+this[++U]*2**24,Ae=this[++U]+this[++U]*2**8+this[++U]*2**16+ue*2**24;return BigInt(we)+(BigInt(Ae)<<BigInt(32))}),d.prototype.readBigUInt64BE=sn(function(U){U=U>>>0,Qe(U,"offset");const ne=this[U],ue=this[U+7];(ne===void 0||ue===void 0)&&it(U,this.length-8);const we=ne*2**24+this[++U]*2**16+this[++U]*2**8+this[++U],Ae=this[++U]*2**24+this[++U]*2**16+this[++U]*2**8+ue;return(BigInt(we)<<BigInt(32))+BigInt(Ae)}),d.prototype.readIntLE=function(U,ne,ue){U=U>>>0,ne=ne>>>0,ue||me(U,ne,this.length);let we=this[U],Ae=1,ie=0;for(;++ie<ne&&(Ae*=256);)we+=this[U+ie]*Ae;return Ae*=128,we>=Ae&&(we-=Math.pow(2,8*ne)),we},d.prototype.readIntBE=function(U,ne,ue){U=U>>>0,ne=ne>>>0,ue||me(U,ne,this.length);let we=ne,Ae=1,ie=this[U+--we];for(;we>0&&(Ae*=256);)ie+=this[U+--we]*Ae;return Ae*=128,ie>=Ae&&(ie-=Math.pow(2,8*ne)),ie},d.prototype.readInt8=function(U,ne){return U=U>>>0,ne||me(U,1,this.length),this[U]&128?(255-this[U]+1)*-1:this[U]},d.prototype.readInt16LE=function(U,ne){U=U>>>0,ne||me(U,2,this.length);const ue=this[U]|this[U+1]<<8;return ue&32768?ue|4294901760:ue},d.prototype.readInt16BE=function(U,ne){U=U>>>0,ne||me(U,2,this.length);const ue=this[U+1]|this[U]<<8;return ue&32768?ue|4294901760:ue},d.prototype.readInt32LE=function(U,ne){return U=U>>>0,ne||me(U,4,this.length),this[U]|this[U+1]<<8|this[U+2]<<16|this[U+3]<<24},d.prototype.readInt32BE=function(U,ne){return U=U>>>0,ne||me(U,4,this.length),this[U]<<24|this[U+1]<<16|this[U+2]<<8|this[U+3]},d.prototype.readBigInt64LE=sn(function(U){U=U>>>0,Qe(U,"offset");const ne=this[U],ue=this[U+7];(ne===void 0||ue===void 0)&&it(U,this.length-8);const we=this[U+4]+this[U+5]*2**8+this[U+6]*2**16+(ue<<24);return(BigInt(we)<<BigInt(32))+BigInt(ne+this[++U]*2**8+this[++U]*2**16+this[++U]*2**24)}),d.prototype.readBigInt64BE=sn(function(U){U=U>>>0,Qe(U,"offset");const ne=this[U],ue=this[U+7];(ne===void 0||ue===void 0)&&it(U,this.length-8);const we=(ne<<24)+this[++U]*2**16+this[++U]*2**8+this[++U];return(BigInt(we)<<BigInt(32))+BigInt(this[++U]*2**24+this[++U]*2**16+this[++U]*2**8+ue)}),d.prototype.readFloatLE=function(U,ne){return U=U>>>0,ne||me(U,4,this.length),a.read(this,U,!0,23,4)},d.prototype.readFloatBE=function(U,ne){return U=U>>>0,ne||me(U,4,this.length),a.read(this,U,!1,23,4)},d.prototype.readDoubleLE=function(U,ne){return U=U>>>0,ne||me(U,8,this.length),a.read(this,U,!0,52,8)},d.prototype.readDoubleBE=function(U,ne){return U=U>>>0,ne||me(U,8,this.length),a.read(this,U,!1,52,8)};function Te(U,ne,ue,we,Ae,ie){if(!d.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(ne>Ae||ne<ie)throw new RangeError('"value" argument is out of bounds');if(ue+we>U.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(U,ne,ue,we){if(U=+U,ne=ne>>>0,ue=ue>>>0,!we){const Pe=Math.pow(2,8*ue)-1;Te(this,U,ne,ue,Pe,0)}let Ae=1,ie=0;for(this[ne]=U&255;++ie<ue&&(Ae*=256);)this[ne+ie]=U/Ae&255;return ne+ue},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(U,ne,ue,we){if(U=+U,ne=ne>>>0,ue=ue>>>0,!we){const Pe=Math.pow(2,8*ue)-1;Te(this,U,ne,ue,Pe,0)}let Ae=ue-1,ie=1;for(this[ne+Ae]=U&255;--Ae>=0&&(ie*=256);)this[ne+Ae]=U/ie&255;return ne+ue},d.prototype.writeUint8=d.prototype.writeUInt8=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,1,255,0),this[ne]=U&255,ne+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,2,65535,0),this[ne]=U&255,this[ne+1]=U>>>8,ne+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,2,65535,0),this[ne]=U>>>8,this[ne+1]=U&255,ne+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,4,4294967295,0),this[ne+3]=U>>>24,this[ne+2]=U>>>16,this[ne+1]=U>>>8,this[ne]=U&255,ne+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,4,4294967295,0),this[ne]=U>>>24,this[ne+1]=U>>>16,this[ne+2]=U>>>8,this[ne+3]=U&255,ne+4};function Oe(U,ne,ue,we,Ae){He(ne,we,Ae,U,ue,7);let ie=Number(ne&BigInt(4294967295));U[ue++]=ie,ie=ie>>8,U[ue++]=ie,ie=ie>>8,U[ue++]=ie,ie=ie>>8,U[ue++]=ie;let Pe=Number(ne>>BigInt(32)&BigInt(4294967295));return U[ue++]=Pe,Pe=Pe>>8,U[ue++]=Pe,Pe=Pe>>8,U[ue++]=Pe,Pe=Pe>>8,U[ue++]=Pe,ue}function ge(U,ne,ue,we,Ae){He(ne,we,Ae,U,ue,7);let ie=Number(ne&BigInt(4294967295));U[ue+7]=ie,ie=ie>>8,U[ue+6]=ie,ie=ie>>8,U[ue+5]=ie,ie=ie>>8,U[ue+4]=ie;let Pe=Number(ne>>BigInt(32)&BigInt(4294967295));return U[ue+3]=Pe,Pe=Pe>>8,U[ue+2]=Pe,Pe=Pe>>8,U[ue+1]=Pe,Pe=Pe>>8,U[ue]=Pe,ue+8}d.prototype.writeBigUInt64LE=sn(function(U,ne=0){return Oe(this,U,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=sn(function(U,ne=0){return ge(this,U,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(U,ne,ue,we){if(U=+U,ne=ne>>>0,!we){const Fe=Math.pow(2,8*ue-1);Te(this,U,ne,ue,Fe-1,-Fe)}let Ae=0,ie=1,Pe=0;for(this[ne]=U&255;++Ae<ue&&(ie*=256);)U<0&&Pe===0&&this[ne+Ae-1]!==0&&(Pe=1),this[ne+Ae]=(U/ie>>0)-Pe&255;return ne+ue},d.prototype.writeIntBE=function(U,ne,ue,we){if(U=+U,ne=ne>>>0,!we){const Fe=Math.pow(2,8*ue-1);Te(this,U,ne,ue,Fe-1,-Fe)}let Ae=ue-1,ie=1,Pe=0;for(this[ne+Ae]=U&255;--Ae>=0&&(ie*=256);)U<0&&Pe===0&&this[ne+Ae+1]!==0&&(Pe=1),this[ne+Ae]=(U/ie>>0)-Pe&255;return ne+ue},d.prototype.writeInt8=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,1,127,-128),U<0&&(U=255+U+1),this[ne]=U&255,ne+1},d.prototype.writeInt16LE=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,2,32767,-32768),this[ne]=U&255,this[ne+1]=U>>>8,ne+2},d.prototype.writeInt16BE=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,2,32767,-32768),this[ne]=U>>>8,this[ne+1]=U&255,ne+2},d.prototype.writeInt32LE=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,4,2147483647,-2147483648),this[ne]=U&255,this[ne+1]=U>>>8,this[ne+2]=U>>>16,this[ne+3]=U>>>24,ne+4},d.prototype.writeInt32BE=function(U,ne,ue){return U=+U,ne=ne>>>0,ue||Te(this,U,ne,4,2147483647,-2147483648),U<0&&(U=4294967295+U+1),this[ne]=U>>>24,this[ne+1]=U>>>16,this[ne+2]=U>>>8,this[ne+3]=U&255,ne+4},d.prototype.writeBigInt64LE=sn(function(U,ne=0){return Oe(this,U,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=sn(function(U,ne=0){return ge(this,U,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function xe(U,ne,ue,we,Ae,ie){if(ue+we>U.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("Index out of range")}function Se(U,ne,ue,we,Ae){return ne=+ne,ue=ue>>>0,Ae||xe(U,ne,ue,4),a.write(U,ne,ue,we,23,4),ue+4}d.prototype.writeFloatLE=function(U,ne,ue){return Se(this,U,ne,!0,ue)},d.prototype.writeFloatBE=function(U,ne,ue){return Se(this,U,ne,!1,ue)};function Le(U,ne,ue,we,Ae){return ne=+ne,ue=ue>>>0,Ae||xe(U,ne,ue,8),a.write(U,ne,ue,we,52,8),ue+8}d.prototype.writeDoubleLE=function(U,ne,ue){return Le(this,U,ne,!0,ue)},d.prototype.writeDoubleBE=function(U,ne,ue){return Le(this,U,ne,!1,ue)},d.prototype.copy=function(U,ne,ue,we){if(!d.isBuffer(U))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!we&&we!==0&&(we=this.length),ne>=U.length&&(ne=U.length),ne||(ne=0),we>0&&we<ue&&(we=ue),we===ue||U.length===0||this.length===0)return 0;if(ne<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),U.length-ne<we-ue&&(we=U.length-ne+ue);const Ae=we-ue;return this===U&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ne,ue,we):Uint8Array.prototype.set.call(U,this.subarray(ue,we),ne),Ae},d.prototype.fill=function(U,ne,ue,we){if(typeof U=="string"){if(typeof ne=="string"?(we=ne,ne=0,ue=this.length):typeof ue=="string"&&(we=ue,ue=this.length),we!==void 0&&typeof we!="string")throw new TypeError("encoding must be a string");if(typeof we=="string"&&!d.isEncoding(we))throw new TypeError("Unknown encoding: "+we);if(U.length===1){const ie=U.charCodeAt(0);(we==="utf8"&&ie<128||we==="latin1")&&(U=ie)}}else typeof U=="number"?U=U&255:typeof U=="boolean"&&(U=Number(U));if(ne<0||this.length<ne||this.length<ue)throw new RangeError("Out of range index");if(ue<=ne)return this;ne=ne>>>0,ue=ue===void 0?this.length:ue>>>0,U||(U=0);let Ae;if(typeof U=="number")for(Ae=ne;Ae<ue;++Ae)this[Ae]=U;else{const ie=d.isBuffer(U)?U:d.from(U,we),Pe=ie.length;if(Pe===0)throw new TypeError('The value "'+U+'" is invalid for argument "value"');for(Ae=0;Ae<ue-ne;++Ae)this[Ae+ne]=ie[Ae%Pe]}return this};const De={};function Ne(U,ne,ue){De[U]=class extends ue{constructor(){super(),Object.defineProperty(this,"message",{value:ne.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${U}]`,this.stack,delete this.name}get code(){return U}set code(we){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:we,writable:!0})}toString(){return`${this.name} [${U}]: ${this.message}`}}}Ne("ERR_BUFFER_OUT_OF_BOUNDS",function(U){return U?`${U} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ne("ERR_INVALID_ARG_TYPE",function(U,ne){return`The "${U}" argument must be of type number. Received type ${typeof ne}`},TypeError),Ne("ERR_OUT_OF_RANGE",function(U,ne,ue){let we=`The value of "${U}" is out of range.`,Ae=ue;return Number.isInteger(ue)&&Math.abs(ue)>2**32?Ae=Me(String(ue)):typeof ue=="bigint"&&(Ae=String(ue),(ue>BigInt(2)**BigInt(32)||ue<-(BigInt(2)**BigInt(32)))&&(Ae=Me(Ae)),Ae+="n"),we+=` It must be ${ne}. Received ${Ae}`,we},RangeError);function Me(U){let ne="",ue=U.length;const we=U[0]==="-"?1:0;for(;ue>=we+4;ue-=3)ne=`_${U.slice(ue-3,ue)}${ne}`;return`${U.slice(0,ue)}${ne}`}function ke(U,ne,ue){Qe(ne,"offset"),(U[ne]===void 0||U[ne+ue]===void 0)&&it(ne,U.length-(ue+1))}function He(U,ne,ue,we,Ae,ie){if(U>ue||U<ne){const Pe=typeof ne=="bigint"?"n":"";let Fe;throw ne===0||ne===BigInt(0)?Fe=`>= 0${Pe} and < 2${Pe} ** ${(ie+1)*8}${Pe}`:Fe=`>= -(2${Pe} ** ${(ie+1)*8-1}${Pe}) and < 2 ** ${(ie+1)*8-1}${Pe}`,new De.ERR_OUT_OF_RANGE("value",Fe,U)}ke(we,Ae,ie)}function Qe(U,ne){if(typeof U!="number")throw new De.ERR_INVALID_ARG_TYPE(ne,"number",U)}function it(U,ne,ue){throw Math.floor(U)!==U?(Qe(U,ue),new De.ERR_OUT_OF_RANGE("offset","an integer",U)):ne<0?new De.ERR_BUFFER_OUT_OF_BOUNDS:new De.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ne}`,U)}const ft=/[^+/0-9A-Za-z-_]/g;function ze(U){if(U=U.split("=")[0],U=U.trim().replace(ft,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function $e(U,ne){ne=ne||1/0;let ue;const we=U.length;let Ae=null;const ie=[];for(let Pe=0;Pe<we;++Pe){if(ue=U.charCodeAt(Pe),ue>55295&&ue<57344){if(!Ae){if(ue>56319){(ne-=3)>-1&&ie.push(239,191,189);continue}else if(Pe+1===we){(ne-=3)>-1&&ie.push(239,191,189);continue}Ae=ue;continue}if(ue<56320){(ne-=3)>-1&&ie.push(239,191,189),Ae=ue;continue}ue=(Ae-55296<<10|ue-56320)+65536}else Ae&&(ne-=3)>-1&&ie.push(239,191,189);if(Ae=null,ue<128){if((ne-=1)<0)break;ie.push(ue)}else if(ue<2048){if((ne-=2)<0)break;ie.push(ue>>6|192,ue&63|128)}else if(ue<65536){if((ne-=3)<0)break;ie.push(ue>>12|224,ue>>6&63|128,ue&63|128)}else if(ue<1114112){if((ne-=4)<0)break;ie.push(ue>>18|240,ue>>12&63|128,ue>>6&63|128,ue&63|128)}else throw new Error("Invalid code point")}return ie}function xt(U){const ne=[];for(let ue=0;ue<U.length;++ue)ne.push(U.charCodeAt(ue)&255);return ne}function st(U,ne){let ue,we,Ae;const ie=[];for(let Pe=0;Pe<U.length&&!((ne-=2)<0);++Pe)ue=U.charCodeAt(Pe),we=ue>>8,Ae=ue%256,ie.push(Ae),ie.push(we);return ie}function Rt(U){return r.toByteArray(ze(U))}function It(U,ne,ue,we){let Ae;for(Ae=0;Ae<we&&!(Ae+ue>=ne.length||Ae>=U.length);++Ae)ne[Ae+ue]=U[Ae];return Ae}function Dt(U,ne){return U instanceof ne||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===ne.name}function Ut(U){return U!==U}const bn=function(){const U="0123456789abcdef",ne=new Array(256);for(let ue=0;ue<16;++ue){const we=ue*16;for(let Ae=0;Ae<16;++Ae)ne[we+Ae]=U[ue]+U[Ae]}return ne}();function sn(U){return typeof BigInt>"u"?ir:U}function ir(){throw new Error("BigInt not supported")}})(BV);const fp="http://www.w3.org/1999/02/22-rdf-syntax-ns#",e1="http://www.w3.org/2001/XMLSchema#",x2="http://www.w3.org/2000/10/swap/",Us={xsd:{decimal:`${e1}decimal`,boolean:`${e1}boolean`,double:`${e1}double`,integer:`${e1}integer`,string:`${e1}string`},rdf:{type:`${fp}type`,nil:`${fp}nil`,first:`${fp}first`,rest:`${fp}rest`,langString:`${fp}langString`,dirLangString:`${fp}dirLangString`,reifies:`${fp}reifies`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${x2}reify#forSome`,forAll:`${x2}reify#forAll`},log:{implies:`${x2}log#implies`,isImpliedBy:`${x2}log#isImpliedBy`}},{xsd:k2}=Us,Mve=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,HV={"\\":"\\","'":"'",'"':'"',n:`
|
|
541
|
+
`,r:"\r",t:" ",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},jve=/[\x00-\x20<>\\"\{\}\|\^\`]/,Ave={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_dircode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},Ive=/$0^/;class Lve{constructor(r){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9])/i,this._dircode=/^--(ltr)|(rtl)/,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._atKeyword=/^@[a-z]+(?=[\s#<:])/i,this._keyword=/^(?:PREFIX|BASE|VERSION|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,r=r||{},this._isImpliedBy=r.isImpliedBy,this._lineMode=!!r.lineMode){this._n3Mode=!1;for(const a in this)!(a in Ave)&&this[a]instanceof RegExp&&(this[a]=Ive)}else this._n3Mode=r.n3!==!1;this.comments=!!r.comments,this._literalClosingPos=0}_tokenizeToEnd(r,a){let s=this._input,c=s.length;for(;;){let d,p;for(;d=this._newline.exec(s);)this.comments&&(p=this._comment.exec(d[0]))&&l("comment",p[1],"",this._line,d[0].length),s=s.substr(d[0].length,s.length),c=s.length,this._line++;if(!d&&(d=this._whitespace.exec(s))&&(s=s.substr(d[0].length,s.length)),this._endOfFile.test(s))return a&&(this.comments&&(p=this._comment.exec(s))&&l("comment",p[1],"",this._line,s.length),s=null,l("eof","","",this._line,0)),this._input=s;const b=this._line,m=s[0];let w="",k="",P="",S=null,M=0,L=!1;switch(m){case"^":if(s.length<3)break;if(s[1]==="^"){if(this._previousMarker="^^",s=s.substr(2),s[0]!=="<"){L=!0;break}}else{this._n3Mode&&(M=1,w="^");break}case"<":if(S=this._unescapedIri.exec(s))w="IRI",k=S[1];else if(S=this._iri.exec(s)){if(k=this._unescape(S[1]),k===null||jve.test(k))return h(this);w="IRI"}else s.length>2&&s[1]==="<"&&s[2]==="("?(w="<<(",M=3):!this._lineMode&&s.length>(a?1:2)&&s[1]==="<"?(w="<<",M=2):this._n3Mode&&s.length>1&&s[1]==="="&&(M=2,this._isImpliedBy?(w="abbreviation",k="<"):(w="inverse",k=">"));break;case">":s.length>1&&s[1]===">"&&(w=">>",M=2);break;case"_":((S=this._blank.exec(s))||a&&(S=this._blank.exec(`${s} `)))&&(w="blank",P="_",k=S[1]);break;case'"':if(S=this._simpleQuotedString.exec(s))k=S[1];else if({value:k,matchLength:M}=this._parseLiteral(s),k===null)return h(this);(S!==null||M!==0)&&(w="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(S=this._simpleApostropheString.exec(s))k=S[1];else if({value:k,matchLength:M}=this._parseLiteral(s),k===null)return h(this);(S!==null||M!==0)&&(w="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(S=this._variable.exec(s))&&(w="var",k=S[0]);break;case"@":this._previousMarker==="literal"&&(S=this._langcode.exec(s))&&S[1]!=="version"?(w="langcode",k=S[1]):(S=this._atKeyword.exec(s))&&(w=S[0]);break;case".":if(s.length===1?a:s[1]<"0"||s[1]>"9"){w=".",M=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":if(s[1]==="-"){this._previousMarker==="langcode"&&(S=this._dircode.exec(s))&&(w="dircode",M=2,k=S[1]||S[2],M=k.length+2);break}(S=this._number.exec(s)||a&&(S=this._number.exec(`${s} `)))&&(w="literal",k=S[0],P=typeof S[1]=="string"?k2.double:typeof S[2]=="string"?k2.decimal:k2.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":case"V":case"v":(S=this._keyword.exec(s))?w=S[0].toUpperCase():L=!0;break;case"f":case"t":(S=this._boolean.exec(s))?(w="literal",k=S[0],P=k2.boolean):L=!0;break;case"a":(S=this._shortPredicates.exec(s))?(w="abbreviation",k="a"):L=!0;break;case"=":this._n3Mode&&s.length>1&&(w="abbreviation",s[1]!==">"?(M=1,k="="):(M=2,k=">"));break;case"!":if(!this._n3Mode)break;case")":if(!a&&(s.length===1||s.length===2&&s[1]===">"))break;if(s.length>2&&s[1]===">"&&s[2]===">"){w=")>>",M=3;break}case",":case";":case"[":case"]":case"(":case"}":case"~":this._lineMode||(M=1,w=m);break;case"{":!this._lineMode&&s.length>=2&&(s[1]==="|"?(w="{|",M=2):(w=m,M=1));break;case"|":s.length>=2&&s[1]==="}"&&(w="|}",M=2);break;default:L=!0}if(L&&((this._previousMarker==="@prefix"||this._previousMarker==="PREFIX")&&(S=this._prefix.exec(s))?(w="prefix",k=S[1]||""):((S=this._prefixed.exec(s))||a&&(S=this._prefixed.exec(`${s} `)))&&(w="prefixed",P=S[1]||"",k=this._unescape(S[2]))),this._previousMarker==="^^")switch(w){case"prefixed":w="type";break;case"IRI":w="typeIRI";break;default:w=""}if(!w)return a||!/^'''|^"""/.test(s)&&/\n|\r/.test(s)?h(this):this._input=s;const T=M||S[0].length,j=l(w,k,P,b,T);this.previousToken=j,this._previousMarker=w,s=s.substr(T,s.length)}function l(d,p,b,m,w){const k=s?c-s.length:c,P=k+w,S={type:d,value:p,prefix:b,line:m,start:k,end:P};return r(null,S),S}function h(d){r(d._syntaxError(/^\S*/.exec(s)[0]))}}_unescape(r){let a=!1;const s=r.replace(Mve,(c,l,h,d)=>{if(typeof l=="string")return String.fromCharCode(Number.parseInt(l,16));if(typeof h=="string"){let p=Number.parseInt(h,16);return p<=65535?String.fromCharCode(Number.parseInt(h,16)):String.fromCharCode(55296+((p-=65536)>>10),56320+(p&1023))}return d in HV?HV[d]:(a=!0,"")});return a?null:s}_parseLiteral(r){if(r.length>=3){const a=r.match(/^(?:"""|"|'''|'|)/)[0],s=a.length;let c=Math.max(this._literalClosingPos,s);for(;(c=r.indexOf(a,c))>0;){let l=0;for(;r[c-l-1]==="\\";)l++;if(l%2===0){const h=r.substring(s,c),d=h.split(/\r\n|\r|\n/).length-1,p=c+s;if(s===1&&d!==0||s===3&&this._lineMode)break;return this._line+=d,{value:this._unescape(h),matchLength:p}}c++}this._literalClosingPos=r.length-s+1}return{value:"",matchLength:0}}_syntaxError(r){this._input=null;const a=new Error(`Unexpected "${r}" on line ${this._line}.`);return a.context={token:void 0,line:this._line,previousToken:this.previousToken},a}_readStartingBom(r){return r.startsWith("\uFEFF")?r.substr(1):r}tokenize(r,a){if(this._line=1,typeof r=="string")if(this._input=this._readStartingBom(r),typeof a=="function")queueMicrotask(()=>this._tokenizeToEnd(a,!0));else{const s=[];let c;if(this._tokenizeToEnd((l,h)=>l?c=l:s.push(h),!0),c)throw c;return s}else this._pendingBuffer=null,typeof r.setEncoding=="function"&&r.setEncoding("utf8"),r.on("data",s=>{this._input!==null&&s.length!==0&&(this._pendingBuffer&&(s=BV.Buffer.concat([this._pendingBuffer,s]),this._pendingBuffer=null),s[s.length-1]&128?this._pendingBuffer=s:(typeof this._input>"u"?this._input=this._readStartingBom(typeof s=="string"?s:s.toString()):this._input+=s,this._tokenizeToEnd(a,!1)))}),r.on("end",()=>{typeof this._input=="string"&&this._tokenizeToEnd(a,!0)}),r.on("error",a)}}const{rdf:zV,xsd:ib}=Us;let t1,Ove=0;const BM={namedNode:YV,blankNode:VV,variable:ZV,literal:qV,defaultGraph:Gve,quad:GM,triple:GM,fromTerm:n1,fromQuad:$V};class kf{constructor(r){this.id=r}get value(){return this.id}equals(r){return r instanceof kf?this.id===r.id:!!r&&this.termType===r.termType&&this.value===r.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class FV extends kf{get termType(){return"NamedNode"}}class ab extends kf{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const r=this.id;let a=r.lastIndexOf('"')+1;const s=r.lastIndexOf("--");return a<r.length&&r[a++]==="@"?(s>a?r.substr(0,s):r).substr(a).toLowerCase():""}get direction(){const r=this.id,a=r.lastIndexOf('"'),s=r.lastIndexOf("--");return s>a&&s+2<r.length?r.substr(s+2).toLowerCase():""}get datatype(){return new FV(this.datatypeString)}get datatypeString(){const r=this.id,a=r.lastIndexOf('"')+1,s=a<r.length?r[a]:"";return s==="^"?r.substr(a+2):s!=="@"?ib.string:r.indexOf("--",a)>0?zV.dirLangString:zV.langString}equals(r){return r instanceof ab?this.id===r.id:!!r&&!!r.datatype&&this.termType===r.termType&&this.value===r.value&&this.language===r.language&&(this.direction===r.direction||this.direction===""&&!r.direction)&&this.datatype.value===r.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,direction:this.direction,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class Rve extends kf{constructor(r){super(`_:${r}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class Dve extends kf{constructor(r){super(`?${r}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class Bve extends kf{constructor(){return super(""),t1||this}get termType(){return"DefaultGraph"}equals(r){return this===r||!!r&&this.termType===r.termType}}t1=new Bve;class UV extends kf{constructor(r,a,s,c){super(""),this._subject=r,this._predicate=a,this._object=s,this._graph=c||t1}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(r){return!!r&&this._subject.equals(r.subject)&&this._predicate.equals(r.predicate)&&this._object.equals(r.object)&&this._graph.equals(r.graph)}}function YV(t){return new FV(t)}function VV(t){return new Rve(t||`n3-${Ove++}`)}function qV(t,r){if(typeof r=="string")return new ab(`"${t}"@${r.toLowerCase()}`);if(r!==void 0&&!("termType"in r))return new ab(`"${t}"@${r.language.toLowerCase()}${r.direction?`--${r.direction.toLowerCase()}`:""}`);let a=r?r.value:"";return a===""&&(typeof t=="boolean"?a=ib.boolean:typeof t=="number"&&(Number.isFinite(t)?a=Number.isInteger(t)?ib.integer:ib.double:(a=ib.double,Number.isNaN(t)||(t=t>0?"INF":"-INF")))),a===""||a===ib.string?new ab(`"${t}"`):new ab(`"${t}"^^${a}`)}function ZV(t){return new Dve(t)}function Gve(){return t1}function GM(t,r,a,s){return new UV(t,r,a,s)}function n1(t){if(t instanceof kf)return t;switch(t.termType){case"NamedNode":return YV(t.value);case"BlankNode":return VV(t.value);case"Variable":return ZV(t.value);case"DefaultGraph":return t1;case"Literal":return qV(t.value,t.language||t.datatype);case"Quad":return $V(t);default:throw new Error(`Unexpected termType: ${t.termType}`)}}function $V(t){if(t instanceof UV)return t;if(t.termType!=="Quad")throw new Error(`Unexpected termType: ${t.termType}`);return GM(n1(t.subject),n1(t.predicate),n1(t.object),n1(t.graph))}let KV=0;class _2{constructor(r){this._contextStack=[],this._graph=null,r=r||{},this._setBase(r.baseIRI),r.factory&&QV(this,r.factory);const a=typeof r.format=="string"?r.format.match(/\w*$/)[0].toLowerCase():"",s=/turtle/.test(a),c=/trig/.test(a),l=/triple/.test(a),h=/quad/.test(a),d=this._n3Mode=/n3/.test(a),p=l||h;(this._supportsNamedGraphs=!(s||d))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(s||c||l||d),this._isImpliedBy=r.isImpliedBy,p&&(this._resolveRelativeIRI=b=>null),this._blankNodePrefix=typeof r.blankNodePrefix!="string"?"":r.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=r.lexer||new Lve({lineMode:p,n3:d,isImpliedBy:this._isImpliedBy}),this._explicitQuantifiers=!!r.explicitQuantifiers,this._parseUnsupportedVersions=!!r.parseUnsupportedVersions,this._version=r.version}static _resetBlankNodePrefix(){KV=0}_setBase(r){if(!r)this._base="",this._basePath="";else{const a=r.indexOf("#");a>=0&&(r=r.substr(0,a)),this._base=r,this._basePath=r.indexOf("/")<0?r:r.replace(/[^\/?]*(?:\?.*)?$/,""),r=r.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=r[0],this._baseScheme=r[1]}}_saveContext(r,a,s,c,l){const h=this._n3Mode;this._contextStack.push({type:r,subject:s,predicate:c,object:l,graph:a,inverse:h?this._inversePredicate:!1,blankPrefix:h?this._prefixes._:"",quantified:h?this._quantified:null}),h&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(r,a){const s=this._contextStack.pop();if(!s||s.type!==r)return this._error(`Unexpected ${a.type}`,a);this._subject=s.subject,this._predicate=s.predicate,this._object=s.object,this._graph=s.graph,this._n3Mode&&(this._inversePredicate=s.inverse,this._prefixes._=s.blankPrefix,this._quantified=s.quantified)}_readBeforeTopContext(r){return this._version&&!this._isValidVersion(this._version)?this._error(`Detected unsupported version as media type parameter: "${this._version}"`,r):this._readInTopContext(r)}_readInTopContext(r){switch(r.type){case"eof":return this._graph!==null?this._error("Unclosed graph",r):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"VERSION":this._sparqlStyle=!0;case"@version":return this._readVersion;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(r)}}_readEntity(r,a){let s;switch(r.type){case"IRI":case"typeIRI":const c=this._resolveIRI(r.value);if(c===null)return this._error("Invalid IRI",r);s=this._factory.namedNode(c);break;case"type":case"prefixed":const l=this._prefixes[r.prefix];if(l===void 0)return this._error(`Undefined prefix "${r.prefix}:"`,r);s=this._factory.namedNode(l+r.value);break;case"blank":s=this._factory.blankNode(this._prefixes[r.prefix]+r.value);break;case"var":s=this._factory.variable(r.value.substr(1));break;default:return this._error(`Expected entity but got ${r.type}`,r)}return!a&&this._n3Mode&&s.id in this._quantified&&(s=this._quantified[s.id]),s}_readSubject(r){switch(this._predicate=null,r.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._factory.blankNode(),null,null),this._readBlankNodeHead;case"(":const a=this._contextStack;return(a.length&&a[a.length-1]).type==="<<"?this._error("Unexpected list in reified triple",r):(this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem);case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._factory.blankNode(),null,null),this._readSubject):this._error("Unexpected graph",r);case"}":return this._readPunctuation(r);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier="blankNode",this._readQuantifierList):this._error('Unexpected "@forSome"',r);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier="variable",this._readQuantifierList):this._error('Unexpected "@forAll"',r);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",r);if(r.prefix.length===0)return this._literalValue=r.value,this._completeSubjectLiteral;this._subject=this._factory.literal(r.value,this._factory.namedNode(r.prefix));break;case"<<(":return this._n3Mode?(this._saveContext("<<(",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Disallowed triple term as subject",r);case"<<":return this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject;default:if((this._subject=this._readEntity(r))===void 0)return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(r){const a=r.type;switch(a){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[r.value];break;case".":case"]":case"}":case"|}":return this._predicate===null?this._error(`Unexpected ${a}`,r):(this._subject=null,a==="]"?this._readBlankNodeTail(r):this._readPunctuation(r));case";":return this._predicate!==null?this._readPredicate:this._error("Expected predicate but got ;",r);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._factory.blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",r);default:if((this._predicate=this._readEntity(r))===void 0)return}return this._validAnnotation=!0,this._readObject}_readObject(r){switch(r.type){case"literal":if(r.prefix.length===0)return this._literalValue=r.value,this._readDataTypeOrLang;this._object=this._factory.literal(r.value,this._factory.namedNode(r.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._factory.blankNode()),this._readBlankNodeHead;case"(":const a=this._contextStack;return(a.length&&a[a.length-1]).type==="<<"?this._error("Unexpected list in reified triple",r):(this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem);case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",r);case"<<(":return this._saveContext("<<(",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject;case"<<":return this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject;default:if((this._object=this._readEntity(r))===void 0)return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(r){return r.type==="{"?this._readGraph(r):this._readPredicate(r)}_readGraph(r){return r.type!=="{"?this._error(`Expected graph but got ${r.type}`,r):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(r){if(r.type==="]")return this._subject=null,this._readBlankNodeTail(r);{const a=this._contextStack;return(a.length>1&&a[a.length-2]).type==="<<"?this._error("Unexpected compound blank node expression in reified triple",r):(this._predicate=null,this._readPredicate(r))}}_readBlankNodeTail(r){if(r.type!=="]")return this._readBlankNodePunctuation(r);this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph);const a=this._predicate===null;return this._restoreContext("blank",r),this._object!==null?this._getContextEndReader():this._predicate!==null?this._readObject:a?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(r){switch(r.type){case".":case"}":return this._subject=null,this._readPunctuation(r);default:return this._readPredicate(r)}}_readListItem(r){let a=null,s=null,c=this._readListItem;const l=this._subject,h=this._contextStack,d=h[h.length-1];switch(r.type){case"[":this._saveContext("blank",this._graph,s=this._factory.blankNode(),this.RDF_FIRST,this._subject=a=this._factory.blankNode()),c=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,s=this._factory.blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",r),h.length!==0&&h[h.length-1].type==="list"&&this._emit(this._subject,this._predicate,this._object,this._graph),this._predicate===null){if(c=this._readPredicate,this._subject===this.RDF_NIL)return c}else if(c=this._getContextEndReader(),this._object===this.RDF_NIL)return c;s=this.RDF_NIL;break;case"literal":r.prefix.length===0?(this._literalValue=r.value,c=this._readListItemDataTypeOrLang):(a=this._factory.literal(r.value,this._factory.namedNode(r.prefix)),c=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",r);case"<<":this._saveContext("<<",this._graph,null,null,null),this._graph=null,c=this._readSubject;break;default:if((a=this._readEntity(r))===void 0)return}if(s===null&&(this._subject=s=this._factory.blankNode()),r.type==="<<"&&(h[h.length-1].subject=this._subject),l===null?d.predicate===null?d.subject=s:d.object=s:this._emit(l,this.RDF_REST,s,this._graph),a!==null){if(this._n3Mode&&(r.type==="IRI"||r.type==="prefixed"))return this._saveContext("item",this._graph,s,this.RDF_FIRST,a),this._subject=a,this._predicate=null,this._getPathReader(this._readListItem);this._emit(s,this.RDF_FIRST,a,this._graph)}return c}_readDataTypeOrLang(r){return this._completeObjectLiteral(r,!1)}_readListItemDataTypeOrLang(r){return this._completeObjectLiteral(r,!0)}_completeLiteral(r,a){let s=this._factory.literal(this._literalValue),c;switch(r.type){case"type":case"typeIRI":const l=this._readEntity(r);if(l===void 0)return;if(l.value===Us.rdf.langString||l.value===Us.rdf.dirLangString)return this._error("Detected illegal (directional) languaged-tagged string with explicit datatype",r);s=this._factory.literal(this._literalValue,l),r=null;break;case"langcode":if(r.value.split("-").some(h=>h.length>8))return this._error("Detected language tag with subtag longer than 8 characters",r);s=this._factory.literal(this._literalValue,r.value),this._literalLanguage=r.value,r=null,c=this._readDirCode.bind(this,a);break}return{token:r,literal:s,readCb:c}}_readDirCode(r,a,s){if(s.type==="dircode"){const c=this._factory.literal(this._literalValue,{language:this._literalLanguage,direction:s.value});r==="subject"?this._subject=c:this._object=c,this._literalLanguage=void 0,s=null}return r==="subject"?s===null?this._readPredicateOrNamedGraph:this._readPredicateOrNamedGraph(s):this._completeObjectLiteralPost(s,a)}_completeSubjectLiteral(r){const a=this._completeLiteral(r,"subject");return this._subject=a.literal,a.readCb?a.readCb.bind(this,!1):this._readPredicateOrNamedGraph}_completeObjectLiteral(r,a){const s=this._completeLiteral(r,"object");if(s)return this._object=s.literal,s.readCb?s.readCb.bind(this,a):this._completeObjectLiteralPost(s.token,a)}_completeObjectLiteralPost(r,a){return a&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),r===null?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r))}_readFormulaTail(r){return r.type!=="}"?this._readPunctuation(r):(this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",r),this._object===null?this._readPredicate:this._getContextEndReader())}_readPunctuation(r){let a,s=this._graph,c=!1;const l=this._subject,h=this._inversePredicate;switch(r.type){case"}":if(this._graph===null)return this._error("Unexpected graph closing",r);if(this._n3Mode)return this._readFormulaTail(r);this._graph=null;case".":this._subject=null,this._tripleTerm=null,a=this._contextStack.length?this._readSubject:this._readInTopContext,h&&(this._inversePredicate=!1);break;case";":a=this._readPredicate;break;case",":a=this._readObject;break;case"~":a=this._readReifierInAnnotation,c=!0;break;case"{|":this._subject=this._readTripleTerm(),this._validAnnotation=!1,c=!0,a=this._readPredicate;break;case"|}":if(!this._annotation)return this._error("Unexpected annotation syntax closing",r);if(!this._validAnnotation)return this._error("Annotation block can not be empty",r);this._subject=null,this._annotation=!1,a=this._readPunctuation;break;default:if(this._supportsQuads&&this._graph===null&&(s=this._readEntity(r))!==void 0){a=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,r)}if(l!==null&&(!c||c&&!this._annotation)){const d=this._predicate,p=this._object;h?this._emit(p,d,l,s):this._emit(l,d,p,s)}return c&&(this._annotation=!0),a}_readBlankNodePunctuation(r){let a;switch(r.type){case";":a=this._readPredicate;break;case",":a=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,r)}return this._emit(this._subject,this._predicate,this._object,this._graph),a}_readQuadPunctuation(r){return r.type!=="."?this._error("Expected dot to follow quad",r):this._readInTopContext}_readPrefix(r){return r.type!=="prefix"?this._error("Expected prefix to follow @prefix",r):(this._prefix=r.value,this._readPrefixIRI)}_readPrefixIRI(r){if(r.type!=="IRI")return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,r);const a=this._readEntity(r);return this._prefixes[this._prefix]=a.value,this._prefixCallback(this._prefix,a),this._readDeclarationPunctuation}_readBaseIRI(r){const a=r.type==="IRI"&&this._resolveIRI(r.value);return a?(this._setBase(a),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",r)}_isValidVersion(r){return this._parseUnsupportedVersions||_2.SUPPORTED_VERSIONS.includes(r)}_readVersion(r){return r.type!=="literal"?this._error("Expected literal to follow version declaration",r):r.end-r.start!==r.value.length+2?this._error("Version declarations must use single quotes",r):(this._versionCallback(r.value),this._isValidVersion(r.value)?this._readDeclarationPunctuation:this._error(`Detected unsupported version: "${r.value}"`,r))}_readNamedGraphLabel(r){switch(r.type){case"IRI":case"blank":case"prefixed":return this._readSubject(r),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",r)}}_readNamedGraphBlankLabel(r){return r.type!=="]"?this._error("Invalid graph label",r):(this._subject=this._factory.blankNode(),this._readGraph)}_readDeclarationPunctuation(r){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(r)):r.type!=="."?this._error("Expected declaration to end with a dot",r):this._readInTopContext}_readQuantifierList(r){let a;switch(r.type){case"IRI":case"prefixed":if((a=this._readEntity(r,!0))!==void 0)break;default:return this._error(`Unexpected ${r.type}`,r)}return this._explicitQuantifiers?(this._subject===null?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,a,this.QUANTIFIERS_GRAPH)):this._quantified[a.id]=this._factory[this._quantifier](this._factory.blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(r){return r.type===","?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(r))}_getPathReader(r){return this._afterPath=r,this._readPath}_readPath(r){switch(r.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const a=this._contextStack,s=a.length&&a[a.length-1];if(s&&s.type==="item"){const c=this._subject;this._restoreContext("item",r),this._emit(this._subject,this.RDF_FIRST,c,this._graph)}return this._afterPath(r)}}_readForwardPath(r){let a,s;const c=this._factory.blankNode();if((s=this._readEntity(r))!==void 0)return this._predicate===null?(a=this._subject,this._subject=c):(a=this._object,this._object=c),this._emit(a,s,c,this._graph),this._readPath}_readBackwardPath(r){const a=this._factory.blankNode();let s,c;if((s=this._readEntity(r))!==void 0)return this._predicate===null?(c=this._subject,this._subject=a):(c=this._object,this._object=a),this._emit(a,s,c,this._graph),this._readPath}_readTripleTermTail(r){if(r.type!==")>>")return this._error(`Expected )>> but got ${r.type}`,r);const a=this._factory.quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<(",r),this._subject===null?(this._subject=a,this._readPredicate):(this._object=a,this._getContextEndReader())}_readReifiedTripleTailOrReifier(r){return r.type==="~"?this._readReifier:this._readReifiedTripleTail(r)}_readReifiedTripleTail(r){if(r.type!==">>")return this._error(`Expected >> but got ${r.type}`,r);this._tripleTerm=null;const a=this._readTripleTerm();this._restoreContext("<<",r);const s=this._contextStack,c=s.length&&s[s.length-1];return c&&c.type==="list"?(this._emit(this._subject,this.RDF_FIRST,a,this._graph),this._getContextEndReader()):this._subject===null?(this._subject=a,this._readPredicateOrReifierTripleEnd):(this._object=a,this._getContextEndReader())}_readPredicateOrReifierTripleEnd(r){return r.type==="."?(this._subject=null,this._readPunctuation(r)):this._readPredicate(r)}_readReifier(r){return this._reifier=this._readEntity(r),this._readReifiedTripleTail}_readReifierInAnnotation(r){return r.type==="IRI"||r.type==="typeIRI"||r.type==="type"||r.type==="prefixed"||r.type==="blank"||r.type==="var"?(this._reifier=this._readEntity(r),this._readPunctuation):(this._readTripleTerm(),this._subject=null,this._readPunctuation(r))}_readTripleTerm(){const r=this._contextStack,a=r.length&&r[r.length-1],s=a?a.graph:void 0,c=this._reifier||this._factory.blankNode();return this._reifier=null,this._tripleTerm=this._tripleTerm||this._factory.quad(this._subject,this._predicate,this._object),this._emit(c,this.RDF_REIFIES,this._tripleTerm,s||this.DEFAULTGRAPH),c}_getContextEndReader(){const r=this._contextStack;if(!r.length)return this._readPunctuation;switch(r[r.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<(":return this._readTripleTermTail;case"<<":return this._readReifiedTripleTailOrReifier}}_emit(r,a,s,c){this._callback(null,this._factory.quad(r,a,s,c||this.DEFAULTGRAPH))}_error(r,a){const s=new Error(`${r} on line ${a.line}.`);s.context={token:a,line:a.line,previousToken:this._lexer.previousToken},this._callback(s),this._callback=r1}_resolveIRI(r){return/^[a-z][a-z0-9+.-]*:/i.test(r)?r:this._resolveRelativeIRI(r)}_resolveRelativeIRI(r){if(!r.length)return this._base;switch(r[0]){case"#":return this._base+r;case"?":return this._base.replace(/(?:\?.*)?$/,r);case"/":return(r[1]==="/"?this._baseScheme:this._baseRoot)+this._removeDotSegments(r);default:return/^[^/:]*:/.test(r)?null:this._removeDotSegments(this._basePath+r)}}_removeDotSegments(r){if(!/(^|\/)\.\.?($|[/#?])/.test(r))return r;const a=r.length;let s="",c=-1,l=-1,h=0,d="/";for(;c<a;){switch(d){case":":if(l<0&&r[++c]==="/"&&r[++c]==="/")for(;(l=c+1)<a&&r[l]!=="/";)c=l;break;case"?":case"#":c=a;break;case"/":if(r[c+1]===".")switch(d=r[++c+1],d){case"/":s+=r.substring(h,c-1),h=c+1;break;case void 0:case"?":case"#":return s+r.substring(h,c)+r.substr(c+1);case".":if(d=r[++c+1],d===void 0||d==="/"||d==="?"||d==="#"){if(s+=r.substring(h,c-2),(h=s.lastIndexOf("/"))>=l&&(s=s.substr(0,h)),d!=="/")return`${s}/${r.substr(c+1)}`;h=c+1}}}d=r[++c]}return s+r.substring(h)}parse(r,a,s,c){let l,h,d,p;if(a&&(a.onQuad||a.onPrefix||a.onComment||a.onVersion)?(l=a.onQuad,h=a.onPrefix,d=a.onComment,p=a.onVersion):(l=a,h=s,p=c),this._readCallback=this._readBeforeTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${KV++}_`,this._prefixCallback=h||r1,this._versionCallback=p||r1,this._inversePredicate=!1,this._quantified=Object.create(null),!l){const m=[];let w;if(this._callback=(k,P)=>{k?w=k:P&&m.push(P)},this._lexer.tokenize(r).every(k=>this._readCallback=this._readCallback(k)),w)throw w;return m}let b=(m,w)=>{m!==null?(this._callback(m),this._callback=r1):this._readCallback&&(this._readCallback=this._readCallback(w))};d&&(this._lexer.comments=!0,b=(m,w)=>{m!==null?(this._callback(m),this._callback=r1):this._readCallback&&(w.type==="comment"?d(w.value):this._readCallback=this._readCallback(w))}),this._callback=l,this._lexer.tokenize(r,b)}}function r1(){}function QV(t,r){t._factory=r,t.DEFAULTGRAPH=r.defaultGraph(),t.RDF_FIRST=r.namedNode(Us.rdf.first),t.RDF_REST=r.namedNode(Us.rdf.rest),t.RDF_NIL=r.namedNode(Us.rdf.nil),t.RDF_REIFIES=r.namedNode(Us.rdf.reifies),t.N3_FORALL=r.namedNode(Us.r.forAll),t.N3_FORSOME=r.namedNode(Us.r.forSome),t.ABBREVIATIONS={a:r.namedNode(Us.rdf.type),"=":r.namedNode(Us.owl.sameAs),">":r.namedNode(Us.log.implies),"<":r.namedNode(Us.log.isImpliedBy)},t.QUANTIFIERS_GRAPH=r.namedNode("urn:n3:quantifiers")}_2.SUPPORTED_VERSIONS=["1.2","1.2-basic","1.1"],QV(_2.prototype,BM),BM.defaultGraph();const{namedNode:z3e,blankNode:F3e,literal:U3e,defaultGraph:Y3e,quad:V3e}=BM,WV=hu.forwardRef(({elements:t={nodes:[],edges:[]},style:r=[],layout:a={name:"preset"},nodeTypes:s=[],edgeTypes:c=[],onChange:l,onSelect:h,onUnselect:d,onSelectionChange:p,onNodeAdded:b,onEdgeAdded:m,onElementRemoved:w,onElementUpdated:k,onStyleUpdated:P,onLayoutRun:S,onElementsLoaded:M,onGraphImported:L,onEdgeTypeChanged:T,onEdgeHandleComplete:j,onHistoryChange:I},R)=>{const B=hu.useRef(null),F=hu.useRef(null),z=hu.useRef({});return hu.useEffect(()=>{z.current={onChange:l,onSelect:h,onUnselect:d,onSelectionChange:p,onNodeAdded:b,onEdgeAdded:m,onElementRemoved:w,onElementUpdated:k,onStyleUpdated:P,onLayoutRun:S,onElementsLoaded:M,onGraphImported:L,onEdgeTypeChanged:T,onEdgeHandleComplete:j,onHistoryChange:I}}),hu.useEffect(()=>(B.current&&!F.current&&(F.current=new xve(B.current,{elements:t,style:r,layout:a,nodeTypes:s,edgeTypes:c}),Object.entries({change:"onChange",select:"onSelect",unselect:"onUnselect",selectionChange:"onSelectionChange",nodeAdded:"onNodeAdded",edgeAdded:"onEdgeAdded",elementRemoved:"onElementRemoved",elementUpdated:"onElementUpdated",styleUpdated:"onStyleUpdated",layoutRun:"onLayoutRun",elementsLoaded:"onElementsLoaded",graphImported:"onGraphImported",edgeTypeChanged:"onEdgeTypeChanged",edgeHandleComplete:"onEdgeHandleComplete",historyChange:"onHistoryChange"}).forEach(([H,Q])=>{F.current.on(H,q=>{z.current[Q]&&z.current[Q](q)})})),()=>{F.current&&(F.current.destroy(),F.current=null)}),[]),hu.useImperativeHandle(R,()=>({addNode:(...D)=>{var H;return(H=F.current)==null?void 0:H.addNode(...D)},addEdge:(...D)=>{var H;return(H=F.current)==null?void 0:H.addEdge(...D)},addNodeOfType:(...D)=>{var H;return(H=F.current)==null?void 0:H.addNodeOfType(...D)},removeElement:(...D)=>{var H;return(H=F.current)==null?void 0:H.removeElement(...D)},removeSelected:()=>{var D;return(D=F.current)==null?void 0:D.removeSelected()},updateElement:(...D)=>{var H;return(H=F.current)==null?void 0:H.updateElement(...D)},updateElementStyle:(...D)=>{var H;return(H=F.current)==null?void 0:H.updateElementStyle(...D)},runLayout:(...D)=>{var H;return(H=F.current)==null?void 0:H.runLayout(...D)},getAvailableLayouts:()=>{var D;return(D=F.current)==null?void 0:D.getAvailableLayouts()},getElements:()=>{var D;return(D=F.current)==null?void 0:D.getElements()},loadElements:(...D)=>{var H;return(H=F.current)==null?void 0:H.loadElements(...D)},exportGraph:()=>{var D;return(D=F.current)==null?void 0:D.exportGraph()},importGraph:(...D)=>{var H;return(H=F.current)==null?void 0:H.importGraph(...D)},getSelected:()=>{var D;return(D=F.current)==null?void 0:D.getSelected()},selectElements:(...D)=>{var H;return(H=F.current)==null?void 0:H.selectElements(...D)},getCytoscape:()=>{var D;return(D=F.current)==null?void 0:D.getCytoscape()},getNodeTypes:()=>{var D;return(D=F.current)==null?void 0:D.getNodeTypes()},getEdgeTypes:()=>{var D;return(D=F.current)==null?void 0:D.getEdgeTypes()},getEdgeType:()=>{var D;return(D=F.current)==null?void 0:D.getEdgeType()},setEdgeType:(...D)=>{var H;return(H=F.current)==null?void 0:H.setEdgeType(...D)},getStylesheet:()=>{var D;return(D=F.current)==null?void 0:D.getStylesheet()},setStylesheet:(...D)=>{var H;return(H=F.current)==null?void 0:H.setStylesheet(...D)},addStyleRule:(...D)=>{var H;return(H=F.current)==null?void 0:H.addStyleRule(...D)},updateStyleRule:(...D)=>{var H;return(H=F.current)==null?void 0:H.updateStyleRule(...D)},removeStyleRule:(...D)=>{var H;return(H=F.current)==null?void 0:H.removeStyleRule(...D)},undo:()=>{var D;return(D=F.current)==null?void 0:D.undo()},redo:()=>{var D;return(D=F.current)==null?void 0:D.redo()},canUndo:()=>{var D;return(D=F.current)==null?void 0:D.canUndo()},canRedo:()=>{var D;return(D=F.current)==null?void 0:D.canRedo()}}),[]),sse.jsx("div",{ref:B,className:"boxes-editor",style:{width:"100%",height:"100%"}})});WV.displayName="BoxesEditor",Yd.BoxesEditor=WV,Object.defineProperty(Yd,Symbol.toStringTag,{value:"Module"})});
|