@smartmemory/compose 0.2.0 → 0.2.2-beta

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.
Files changed (76) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{App-VU2lfA8m.js → App-QGVt8tH2.js} +155 -155
  3. package/dist/assets/arc-yX1Dy9Ls.js +1 -0
  4. package/dist/assets/{architectureDiagram-3BPJPVTR-itmOSZLE.js → architectureDiagram-3BPJPVTR-BhtVN7Go.js} +3 -3
  5. package/dist/assets/{blockDiagram-GPEHLZMM-N7MotI_5.js → blockDiagram-GPEHLZMM-Do_uWvAL.js} +4 -4
  6. package/dist/assets/{c4Diagram-AAUBKEIU-DRKW39LH.js → c4Diagram-AAUBKEIU-DhjfNEZ_.js} +3 -3
  7. package/dist/assets/channel-D6hNrRZ2.js +1 -0
  8. package/dist/assets/chunk-2J33WTMH-ZLuzLSr5.js +1 -0
  9. package/dist/assets/{chunk-4BX2VUAB-BTe-QE0R.js → chunk-4BX2VUAB-BkfYx42O.js} +1 -1
  10. package/dist/assets/chunk-55IACEB6-UGWHui37.js +1 -0
  11. package/dist/assets/{chunk-727SXJPM-CBRmkSvh.js → chunk-727SXJPM-DENLKVEd.js} +5 -5
  12. package/dist/assets/{chunk-AQP2D5EJ-BdtQ63fN.js → chunk-AQP2D5EJ-BV-AIq0h.js} +2 -2
  13. package/dist/assets/{chunk-FMBD7UC4-DfYQ2YmB.js → chunk-FMBD7UC4-BO5q1BN_.js} +1 -1
  14. package/dist/assets/chunk-ND2GUHAM-rAAtIsqf.js +1 -0
  15. package/dist/assets/{chunk-QZHKN3VN-DwjqJ9xB.js → chunk-QZHKN3VN-DmZo3sCU.js} +1 -1
  16. package/dist/assets/classDiagram-4FO5ZUOK-DvsVLUph.js +1 -0
  17. package/dist/assets/classDiagram-v2-Q7XG4LA2-DvsVLUph.js +1 -0
  18. package/dist/assets/cose-bilkent-S5V4N54A-BlBShGhI.js +1 -0
  19. package/dist/assets/dagre-BM42HDAG-urcL7_B8.js +4 -0
  20. package/dist/assets/{defaultLocale-CrowFXzY.js → defaultLocale-DX6XiGOO.js} +1 -1
  21. package/dist/assets/diagram-2AECGRRQ-DlfCvqLR.js +43 -0
  22. package/dist/assets/diagram-5GNKFQAL-h5gTsYDo.js +10 -0
  23. package/dist/assets/{diagram-KO2AKTUF-BPalYJed.js → diagram-KO2AKTUF-BbEbRrVo.js} +3 -3
  24. package/dist/assets/diagram-LMA3HP47-jog00Zl2.js +24 -0
  25. package/dist/assets/diagram-OG6HWLK6-B0JVsR6S.js +24 -0
  26. package/dist/assets/{erDiagram-TEJ5UH35-B3OLgtKK.js → erDiagram-TEJ5UH35-DkUnalKg.js} +1 -1
  27. package/dist/assets/{flowDiagram-I6XJVG4X-DdpxVf-5.js → flowDiagram-I6XJVG4X-DewNd_kM.js} +4 -4
  28. package/dist/assets/ganttDiagram-6RSMTGT7-DzDBcVj5.js +292 -0
  29. package/dist/assets/gitGraphDiagram-PVQCEYII-D0CX5WgP.js +106 -0
  30. package/dist/assets/{graph-BEmEBUp_.js → graph-CAnANduQ.js} +1 -1
  31. package/dist/assets/{graph-DnLKqSPg.js → graph-CJVNlri5.js} +2 -2
  32. package/dist/assets/{index-CLb8RFcn.js → index-D4GJb_6L.js} +4 -4
  33. package/dist/assets/infoDiagram-5YYISTIA-B1zzuW9l.js +2 -0
  34. package/dist/assets/{ishikawaDiagram-YF4QCWOH-OyKVgxOz.js → ishikawaDiagram-YF4QCWOH-3hFmuv1F.js} +6 -6
  35. package/dist/assets/{journeyDiagram-JHISSGLW-3FaFyfLR.js → journeyDiagram-JHISSGLW-w9c-l95A.js} +1 -1
  36. package/dist/assets/{kanban-definition-UN3LZRKU-DUPnRo3q.js → kanban-definition-UN3LZRKU-9cL90JL0.js} +7 -7
  37. package/dist/assets/layout-DGIYPm2g.js +1 -0
  38. package/dist/assets/linear-DyDb5wz8.js +1 -0
  39. package/dist/assets/{mindmap-definition-RKZ34NQL-C0CwWNdR.js → mindmap-definition-RKZ34NQL-DBQqsZiD.js} +10 -10
  40. package/dist/assets/{mobile-qvdJ5p0m.js → mobile-CG5tLa2S.js} +1 -1
  41. package/dist/assets/pieDiagram-4H26LBE5-BbIHZku5.js +30 -0
  42. package/dist/assets/{quadrantDiagram-W4KKPZXB-HFtjZSAT.js → quadrantDiagram-W4KKPZXB-DEQSG_lM.js} +1 -1
  43. package/dist/assets/{requirementDiagram-4Y6WPE33-CX_Mz3gv.js → requirementDiagram-4Y6WPE33-BeVnwIwF.js} +3 -3
  44. package/dist/assets/{sankeyDiagram-5OEKKPKP-BR2_eTy9.js → sankeyDiagram-5OEKKPKP-Be-ROw_I.js} +2 -2
  45. package/dist/assets/{sequenceDiagram-3UESZ5HK-CtHp0Qnp.js → sequenceDiagram-3UESZ5HK-E-tnxahu.js} +4 -4
  46. package/dist/assets/stateDiagram-AJRCARHV-3rgFN7hL.js +1 -0
  47. package/dist/assets/stateDiagram-v2-BHNVJYJU-DY_OtnIg.js +1 -0
  48. package/dist/assets/{timeline-definition-PNZ67QCA-GSHqrJ3A.js → timeline-definition-PNZ67QCA-Dcs4QFbE.js} +3 -3
  49. package/dist/assets/vennDiagram-CIIHVFJN-BstUQ900.js +34 -0
  50. package/dist/assets/{wardley-L42UT6IY-Bf-gQIFY.js → wardley-L42UT6IY-CO77hXwj.js} +1 -1
  51. package/dist/assets/{wardleyDiagram-YWT4CUSO-RGxoapr7.js → wardleyDiagram-YWT4CUSO-BvrP3shF.js} +4 -4
  52. package/dist/assets/{xychartDiagram-2RQKCTM6-1_H1qVde.js → xychartDiagram-2RQKCTM6-Btu4JcQO.js} +4 -4
  53. package/dist/index.html +2 -2
  54. package/package.json +1 -1
  55. package/dist/assets/arc-CIeqpX37.js +0 -1
  56. package/dist/assets/channel-DugSMLKi.js +0 -1
  57. package/dist/assets/chunk-2J33WTMH-CF6iSwEb.js +0 -1
  58. package/dist/assets/chunk-55IACEB6-E2hHEsl9.js +0 -1
  59. package/dist/assets/chunk-ND2GUHAM-CDrOVOW5.js +0 -1
  60. package/dist/assets/classDiagram-4FO5ZUOK-D2RRwp7J.js +0 -1
  61. package/dist/assets/classDiagram-v2-Q7XG4LA2-D2RRwp7J.js +0 -1
  62. package/dist/assets/cose-bilkent-S5V4N54A-MHpsrtBZ.js +0 -1
  63. package/dist/assets/dagre-BM42HDAG-DaPz_mPt.js +0 -4
  64. package/dist/assets/diagram-2AECGRRQ-DIdstuOm.js +0 -43
  65. package/dist/assets/diagram-5GNKFQAL-DbkTGVES.js +0 -10
  66. package/dist/assets/diagram-LMA3HP47-vnySSoyd.js +0 -24
  67. package/dist/assets/diagram-OG6HWLK6-Dv3BUJft.js +0 -24
  68. package/dist/assets/ganttDiagram-6RSMTGT7-QALT_Lj9.js +0 -292
  69. package/dist/assets/gitGraphDiagram-PVQCEYII-nITcPPED.js +0 -106
  70. package/dist/assets/infoDiagram-5YYISTIA-CjlRce3x.js +0 -2
  71. package/dist/assets/layout-Bw0msyOw.js +0 -1
  72. package/dist/assets/linear-BeL8i3rv.js +0 -1
  73. package/dist/assets/pieDiagram-4H26LBE5-DaU2jPjX.js +0 -30
  74. package/dist/assets/stateDiagram-AJRCARHV-DmiEmD6G.js +0 -1
  75. package/dist/assets/stateDiagram-v2-BHNVJYJU-7rdO1Tgp.js +0 -1
  76. package/dist/assets/vennDiagram-CIIHVFJN-CNxhQnCU.js +0 -34
@@ -1,4 +1,4 @@
1
- import{c as In,g as xv}from"./mobile-qvdJ5p0m.js";function av(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function sx(t){if(Array.isArray(t))return t}function ux(t){if(Array.isArray(t))return av(t)}function Ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lx(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,gE(a.key),a)}}function Pr(t,e,r){return e&&lx(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bt(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Cv(t))||e){r&&(t=r);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ import{c as In,g as xv}from"./mobile-CG5tLa2S.js";function av(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function sx(t){if(Array.isArray(t))return t}function ux(t){if(Array.isArray(t))return av(t)}function Ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lx(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,gE(a.key),a)}}function Pr(t,e,r){return e&&lx(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bt(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Cv(t))||e){r&&(t=r);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return o=u.done,u},e:function(u){s=!0,i=u},f:function(){try{o||r.return==null||r.return()}finally{if(s)throw i}}}}function dE(t,e,r){return(e=gE(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fx(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function hx(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,n,i,o,s=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(a=i.call(r)).done)&&(s.push(a.value),s.length!==e);u=!0);}catch(f){l=!0,n=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw n}}return s}}function cx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ht(t,e){return sx(t)||hx(t,e)||Cv(t,e)||cx()}function hi(t){return ux(t)||fx(t)||Cv(t)||vx()}function dx(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function gE(t){var e=dx(t,"string");return typeof e=="symbol"?e:e+""}function pt(t){"@babel/helpers - typeof";return pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pt(t)}function Cv(t,e){if(t){if(typeof t=="string")return av(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?av(t,e):void 0}}var dt=typeof window>"u"?null:window,vd=dt?dt.navigator:null;dt&&dt.document;var gx=pt(""),pE=pt({}),px=pt(function(){}),yx=typeof HTMLElement>"u"?"undefined":pt(HTMLElement),dn=function(e){return e&&e.instanceString&&ot(e.instanceString)?e.instanceString():null},Oe=function(e){return e!=null&&pt(e)==gx},ot=function(e){return e!=null&&pt(e)===px},Je=function(e){return!qt(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},He=function(e){return e!=null&&pt(e)===pE&&!Je(e)&&e.constructor===Object},mx=function(e){return e!=null&&pt(e)===pE},Ee=function(e){return e!=null&&pt(e)===pt(1)&&!isNaN(e)},bx=function(e){return Ee(e)&&Math.floor(e)===e},ci=function(e){if(yx!=="undefined")return e!=null&&e instanceof HTMLElement},qt=function(e){return gn(e)||yE(e)},gn=function(e){return dn(e)==="collection"&&e._private.single},yE=function(e){return dn(e)==="collection"&&!e._private.single},Av=function(e){return dn(e)==="core"},mE=function(e){return dn(e)==="stylesheet"},Ex=function(e){return dn(e)==="event"},Rr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},wx=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Tx=function(e){return He(e)&&Ee(e.x1)&&Ee(e.x2)&&Ee(e.y1)&&Ee(e.y2)},xx=function(e){return mx(e)&&ot(e.then)},Cx=function(){return vd&&vd.userAgent.match(/msie|trident|edge/i)},xa=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);return i.join("$")});var a=function(){var i=this,o=arguments,s,u=r.apply(i,o),l=a.cache;return(s=l[u])||(s=l[u]=e.apply(i,o)),s};return a.cache={},a},Lv=xa(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Li=xa(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),bE=xa(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),dd=function(e){return Rr(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},Tr=function(e,r){return e.slice(-1*r.length)===r},gt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Ax="rgb[a]?\\(("+gt+"[%]?)\\s*,\\s*("+gt+"[%]?)\\s*,\\s*("+gt+"[%]?)(?:\\s*,\\s*("+gt+"))?\\)",Lx="rgb[a]?\\((?:"+gt+"[%]?)\\s*,\\s*(?:"+gt+"[%]?)\\s*,\\s*(?:"+gt+"[%]?)(?:\\s*,\\s*(?:"+gt+"))?\\)",Rx="hsl[a]?\\(("+gt+")\\s*,\\s*("+gt+"[%])\\s*,\\s*("+gt+"[%])(?:\\s*,\\s*("+gt+"))?\\)",Sx="hsl[a]?\\((?:"+gt+")\\s*,\\s*(?:"+gt+"[%])\\s*,\\s*(?:"+gt+"[%])(?:\\s*,\\s*(?:"+gt+"))?\\)",Dx="\\#[0-9a-fA-F]{3}",Nx="\\#[0-9a-fA-F]{6}",EE=function(e,r){return e<r?-1:e>r?1:0},Mx=function(e,r){return-1*EE(e,r)},_e=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var a=e[r];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var o=n[i];t[o]=a[o]}}return t},Ox=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,a,n,i,o=16;return r?(a=parseInt(e[1]+e[1],o),n=parseInt(e[2]+e[2],o),i=parseInt(e[3]+e[3],o)):(a=parseInt(e[1]+e[2],o),n=parseInt(e[3]+e[4],o),i=parseInt(e[5]+e[6],o)),[a,n,i]}},Ix=function(e){var r,a,n,i,o,s,u,l;function f(d,g,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(g-d)*6*p:p<1/2?g:p<2/3?d+(g-d)*(2/3-p)*6:d}var h=new RegExp("^"+Rx+"$").exec(e);if(h){if(a=parseInt(h[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(h[2]),n<0||n>100||(n=n/100,i=parseFloat(h[3]),i<0||i>100)||(i=i/100,o=h[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(n===0)s=u=l=Math.round(i*255);else{var v=i<.5?i*(1+n):i+n-i*n,c=2*i-v;s=Math.round(255*f(c,v,a+1/3)),u=Math.round(255*f(c,v,a)),l=Math.round(255*f(c,v,a-1/3))}r=[s,u,l,o]}return r},Px=function(e){var r,a=new RegExp("^"+Ax+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var o=a[i];if(o[o.length-1]==="%"&&(n[i]=!0),o=parseFloat(o),n[i]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var s=n[1]||n[2]||n[3],u=n[1]&&n[2]&&n[3];if(s&&!u)return;var l=a[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)return;r.push(l)}}return r},Fx=function(e){return _x[e.toLowerCase()]},wE=function(e){return(Je(e)?e:null)||Fx(e)||Ox(e)||Px(e)||Ix(e)},_x={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]},TE=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var o=a[i];if(He(o))throw Error("Tried to set map with object key");i<a.length-1?(r[o]==null&&(r[o]={}),r=r[o]):r[o]=e.value}},xE=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var o=a[i];if(He(o))throw Error("Tried to get map with object key");if(r=r[o],r==null)return r}return r},Pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uo,gd;function yn(){if(gd)return uo;gd=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return uo=t,uo}var lo,pd;function Bx(){if(pd)return lo;pd=1;var t=typeof Pn=="object"&&Pn&&Pn.Object===Object&&Pn;return lo=t,lo}var fo,yd;function Ri(){if(yd)return fo;yd=1;var t=Bx(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return fo=r,fo}var ho,md;function kx(){if(md)return ho;md=1;var t=Ri(),e=function(){return t.Date.now()};return ho=e,ho}var co,bd;function qx(){if(bd)return co;bd=1;var t=/\s/;function e(r){for(var a=r.length;a--&&t.test(r.charAt(a)););return a}return co=e,co}var vo,Ed;function Gx(){if(Ed)return vo;Ed=1;var t=qx(),e=/^\s+/;function r(a){return a&&a.slice(0,t(a)+1).replace(e,"")}return vo=r,vo}var go,wd;function Rv(){if(wd)return go;wd=1;var t=Ri(),e=t.Symbol;return go=e,go}var po,Td;function Ux(){if(Td)return po;Td=1;var t=Rv(),e=Object.prototype,r=e.hasOwnProperty,a=e.toString,n=t?t.toStringTag:void 0;function i(o){var s=r.call(o,n),u=o[n];try{o[n]=void 0;var l=!0}catch{}var f=a.call(o);return l&&(s?o[n]=u:delete o[n]),f}return po=i,po}var yo,xd;function zx(){if(xd)return yo;xd=1;var t=Object.prototype,e=t.toString;function r(a){return e.call(a)}return yo=r,yo}var mo,Cd;function CE(){if(Cd)return mo;Cd=1;var t=Rv(),e=Ux(),r=zx(),a="[object Null]",n="[object Undefined]",i=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?n:a:i&&i in Object(s)?e(s):r(s)}return mo=o,mo}var bo,Ad;function Vx(){if(Ad)return bo;Ad=1;function t(e){return e!=null&&typeof e=="object"}return bo=t,bo}var Eo,Ld;function mn(){if(Ld)return Eo;Ld=1;var t=CE(),e=Vx(),r="[object Symbol]";function a(n){return typeof n=="symbol"||e(n)&&t(n)==r}return Eo=a,Eo}var wo,Rd;function Yx(){if(Rd)return wo;Rd=1;var t=Gx(),e=yn(),r=mn(),a=NaN,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(l){if(typeof l=="number")return l;if(r(l))return a;if(e(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=e(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=t(l);var h=i.test(l);return h||o.test(l)?s(l.slice(2),h?2:8):n.test(l)?a:+l}return wo=u,wo}var To,Sd;function Hx(){if(Sd)return To;Sd=1;var t=yn(),e=kx(),r=Yx(),a="Expected a function",n=Math.max,i=Math.min;function o(s,u,l){var f,h,v,c,d,g,p=0,y=!1,b=!1,m=!0;if(typeof s!="function")throw new TypeError(a);u=r(u)||0,t(l)&&(y=!!l.leading,b="maxWait"in l,v=b?n(r(l.maxWait)||0,u):v,m="trailing"in l?!!l.trailing:m);function E(P){var x=f,N=h;return f=h=void 0,p=P,c=s.apply(N,x),c}function T(P){return p=P,d=setTimeout(C,u),y?E(P):c}function L(P){var x=P-g,N=P-p,M=u-x;return b?i(M,v-N):M}function w(P){var x=P-g,N=P-p;return g===void 0||x>=u||x<0||b&&N>=v}function C(){var P=e();if(w(P))return A(P);d=setTimeout(C,L(P))}function A(P){return d=void 0,m&&f?E(P):(f=h=void 0,c)}function R(){d!==void 0&&clearTimeout(d),p=0,f=g=h=d=void 0}function S(){return d===void 0?c:A(e())}function D(){var P=e(),x=w(P);if(f=arguments,h=this,g=P,x){if(d===void 0)return T(g);if(b)return clearTimeout(d),d=setTimeout(C,u),E(g)}return d===void 0&&(d=setTimeout(C,u)),c}return D.cancel=R,D.flush=S,D}return To=o,To}var Xx=Hx(),bn=pn(Xx),xo=dt?dt.performance:null,AE=xo&&xo.now?function(){return xo.now()}:function(){return Date.now()},Wx=(function(){if(dt){if(dt.requestAnimationFrame)return function(t){dt.requestAnimationFrame(t)};if(dt.mozRequestAnimationFrame)return function(t){dt.mozRequestAnimationFrame(t)};if(dt.webkitRequestAnimationFrame)return function(t){dt.webkitRequestAnimationFrame(t)};if(dt.msRequestAnimationFrame)return function(t){dt.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(AE())},1e3/60)}})(),vi=function(e){return Wx(e)},hr=AE,Hr=9261,LE=65599,ga=5381,RE=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hr,a=r,n;n=e.next(),!n.done;)a=a*LE+n.value|0;return a},an=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hr;return r*LE+e|0},nn=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ga;return(r<<5)+r+e|0},$x=function(e,r){return e*2097152+r},br=function(e){return e[0]*2097152+e[1]},Fn=function(e,r){return[an(e[0],r[0]),nn(e[1],r[1])]},Dd=function(e,r){var a={value:0,done:!1},n=0,i=e.length,o={next:function(){return n<i?a.value=e[n++]:a.done=!0,a}};return RE(o,r)},$r=function(e,r){var a={value:0,done:!1},n=0,i=e.length,o={next:function(){return n<i?a.value=e.charCodeAt(n++):a.done=!0,a}};return RE(o,r)},SE=function(){return Kx(arguments)},Kx=function(e){for(var r,a=0;a<e.length;a++){var n=e[a];a===0?r=$r(n):r=$r(n,r)}return r};function Zx(t,e,r,a,n){var i=n*Math.PI/180,o=Math.cos(i)*(t-r)-Math.sin(i)*(e-a)+r,s=Math.sin(i)*(t-r)+Math.cos(i)*(e-a)+a;return{x:o,y:s}}var Qx=function(e,r,a,n,i,o){return{x:(e-a)*i+a,y:(r-n)*o+n}};function Jx(t,e,r){if(r===0)return t;var a=(e.x1+e.x2)/2,n=(e.y1+e.y2)/2,i=e.w/e.h,o=1/i,s=Zx(t.x,t.y,a,n,r),u=Qx(s.x,s.y,a,n,i,o);return{x:u.x,y:u.y}}var Nd=!0,jx=console.warn!=null,eC=console.trace!=null,Sv=Number.MAX_SAFE_INTEGER||9007199254740991,DE=function(){return!0},di=function(){return!1},Md=function(){return 0},Dv=function(){},nt=function(e){throw new Error(e)},NE=function(e){if(e!==void 0)Nd=!!e;else return Nd},Ke=function(e){NE()&&(jx?console.warn(e):(console.log(e),eC&&console.trace()))},tC=function(e){return _e({},e)},rr=function(e){return e==null?e:Je(e)?e.slice():He(e)?tC(e):e},rC=function(e){return e.slice()},ME=function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},aC={},OE=function(){return aC},At=function(e){var r=Object.keys(e);return function(a){for(var n={},i=0;i<r.length;i++){var o=r[i],s=a==null?void 0:a[o];n[o]=s===void 0?e[o]:s}return n}},Sr=function(e,r,a){for(var n=e.length-1;n>=0;n--)e[n]===r&&e.splice(n,1)},Nv=function(e){e.splice(0,e.length)},nC=function(e,r){for(var a=0;a<r.length;a++){var n=r[a];e.push(n)}},Ft=function(e,r,a){return a&&(r=bE(a,r)),e[r]},lr=function(e,r,a,n){a&&(r=bE(a,r)),e[r]=n},iC=(function(){function t(){Ir(this,t),this._obj={}}return Pr(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]}}])})(),fr=typeof Map<"u"?Map:iC,oC="undefined",sC=(function(){function t(e){if(Ir(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var a=0;a<r.length;a++)this.add(r[a])}}return Pr(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)}}])})(),Ra=(typeof Set>"u"?"undefined":pt(Set))!==oC?Set:sC,Si=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!Av(e)){nt("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){nt("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,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:n,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?n==="edges":!!r.pannable,active:!1,classes:new Ra,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(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var o=r.renderedPosition,s=e.pan(),u=e.zoom();i.position={x:(o.x-s.x)/u,y:(o.y-s.y)/u}}var l=[];Je(r.classes)?l=r.classes:Oe(r.classes)&&(l=r.classes.split(/\s+/));for(var f=0,h=l.length;f<h;f++){var v=l[f];!v||v===""||i.classes.add(v)}this.createEmitter(),(a===void 0||a)&&this.restore();var c=r.style||r.css;c&&(Ke("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(c))},Od=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(a,n,i){var o;He(a)&&!qt(a)&&(o=a,a=o.roots||o.root,n=o.visit,i=o.directed),i=arguments.length===2&&!ot(n)?n:i,n=ot(n)?n:function(){};for(var s=this._private.cy,u=a=Oe(a)?this.filter(a):a,l=[],f=[],h={},v={},c={},d=0,g,p=this.byGroup(),y=p.nodes,b=p.edges,m=0;m<u.length;m++){var E=u[m],T=E.id();E.isNode()&&(l.unshift(E),e.bfs&&(c[T]=!0,f.push(E)),v[T]=0)}for(var L=function(){var P=e.bfs?l.shift():l.pop(),x=P.id();if(e.dfs){if(c[x])return 0;c[x]=!0,f.push(P)}var N=v[x],M=h[x],I=M!=null?M.source():null,O=M!=null?M.target():null,k=M==null?void 0:P.same(I)?O[0]:I[0],F;if(F=n(P,M,k,d++,N),F===!0)return g=P,1;if(F===!1)return 1;for(var _=P.connectedEdges().filter(function(U){return(!i||U.source().same(P))&&b.has(U)}),z=0;z<_.length;z++){var X=_[z],q=X.connectedNodes().filter(function(U){return!U.same(P)&&y.has(U)}),G=q.id();q.length!==0&&!c[G]&&(q=q[0],l.push(q),e.bfs&&(c[G]=!0,f.push(q)),h[G]=X,v[G]=v[x]+1)}},w;l.length!==0&&(w=L(),!(w!==0&&w===1)););for(var C=s.collection(),A=0;A<f.length;A++){var R=f[A],S=h[R.id()];S!=null&&C.push(S),C.push(R)}return{path:s.collection(C),found:s.collection(g)}}},on={breadthFirstSearch:Od({bfs:!0}),depthFirstSearch:Od({dfs:!0})};on.bfs=on.breadthFirstSearch;on.dfs=on.depthFirstSearch;var Wn={exports:{}},uC=Wn.exports,Id;function lC(){return Id||(Id=1,(function(t,e){(function(){var r,a,n,i,o,s,u,l,f,h,v,c,d,g,p;n=Math.floor,h=Math.min,a=function(y,b){return y<b?-1:y>b?1:0},f=function(y,b,m,E,T){var L;if(m==null&&(m=0),T==null&&(T=a),m<0)throw new Error("lo must be non-negative");for(E==null&&(E=y.length);m<E;)L=n((m+E)/2),T(b,y[L])<0?E=L:m=L+1;return[].splice.apply(y,[m,m-m].concat(b)),b},s=function(y,b,m){return m==null&&(m=a),y.push(b),g(y,0,y.length-1,m)},o=function(y,b){var m,E;return b==null&&(b=a),m=y.pop(),y.length?(E=y[0],y[0]=m,p(y,0,b)):E=m,E},l=function(y,b,m){var E;return m==null&&(m=a),E=y[0],y[0]=b,p(y,0,m),E},u=function(y,b,m){var E;return m==null&&(m=a),y.length&&m(y[0],b)<0&&(E=[y[0],b],b=E[0],y[0]=E[1],p(y,0,m)),b},i=function(y,b){var m,E,T,L,w,C;for(b==null&&(b=a),L=(function(){C=[];for(var A=0,R=n(y.length/2);0<=R?A<R:A>R;0<=R?A++:A--)C.push(A);return C}).apply(this).reverse(),w=[],E=0,T=L.length;E<T;E++)m=L[E],w.push(p(y,m,b));return w},d=function(y,b,m){var E;if(m==null&&(m=a),E=y.indexOf(b),E!==-1)return g(y,0,E,m),p(y,E,m)},v=function(y,b,m){var E,T,L,w,C;if(m==null&&(m=a),T=y.slice(0,b),!T.length)return T;for(i(T,m),C=y.slice(b),L=0,w=C.length;L<w;L++)E=C[L],u(T,E,m);return T.sort(m).reverse()},c=function(y,b,m){var E,T,L,w,C,A,R,S,D;if(m==null&&(m=a),b*10<=y.length){if(L=y.slice(0,b).sort(m),!L.length)return L;for(T=L[L.length-1],R=y.slice(b),w=0,A=R.length;w<A;w++)E=R[w],m(E,T)<0&&(f(L,E,0,null,m),L.pop(),T=L[L.length-1]);return L}for(i(y,m),D=[],C=0,S=h(b,y.length);0<=S?C<S:C>S;0<=S?++C:--C)D.push(o(y,m));return D},g=function(y,b,m,E){var T,L,w;for(E==null&&(E=a),T=y[m];m>b;){if(w=m-1>>1,L=y[w],E(T,L)<0){y[m]=L,m=w;continue}break}return y[m]=T},p=function(y,b,m){var E,T,L,w,C;for(m==null&&(m=a),T=y.length,C=b,L=y[b],E=2*b+1;E<T;)w=E+1,w<T&&!(m(y[E],y[w])<0)&&(E=w),y[b]=y[E],b=E,E=2*b+1;return y[b]=L,g(y,C,b,m)},r=(function(){y.push=s,y.pop=o,y.replace=l,y.pushpop=u,y.heapify=i,y.updateItem=d,y.nlargest=v,y.nsmallest=c;function y(b){this.cmp=b??a,this.nodes=[]}return y.prototype.push=function(b){return s(this.nodes,b,this.cmp)},y.prototype.pop=function(){return o(this.nodes,this.cmp)},y.prototype.peek=function(){return this.nodes[0]},y.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1},y.prototype.replace=function(b){return l(this.nodes,b,this.cmp)},y.prototype.pushpop=function(b){return u(this.nodes,b,this.cmp)},y.prototype.heapify=function(){return i(this.nodes,this.cmp)},y.prototype.updateItem=function(b){return d(this.nodes,b,this.cmp)},y.prototype.clear=function(){return this.nodes=[]},y.prototype.empty=function(){return this.nodes.length===0},y.prototype.size=function(){return this.nodes.length},y.prototype.clone=function(){var b;return b=new y,b.nodes=this.nodes.slice(0),b},y.prototype.toArray=function(){return this.nodes.slice(0)},y.prototype.insert=y.prototype.push,y.prototype.top=y.prototype.peek,y.prototype.front=y.prototype.peek,y.prototype.has=y.prototype.contains,y.prototype.copy=y.prototype.clone,y})(),(function(y,b){return t.exports=b()})(this,function(){return r})}).call(uC)})(Wn)),Wn.exports}var Co,Pd;function fC(){return Pd||(Pd=1,Co=lC()),Co}var hC=fC(),En=pn(hC),cC=At({root:null,weight:function(e){return 1},directed:!1}),vC={dijkstra:function(e){if(!He(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var a=cC(e),n=a.root,i=a.weight,o=a.directed,s=this,u=i,l=Oe(n)?this.filter(n)[0]:n[0],f={},h={},v={},c=this.byGroup(),d=c.nodes,g=c.edges;g.unmergeBy(function(N){return N.isLoop()});for(var p=function(M){return f[M.id()]},y=function(M,I){f[M.id()]=I,b.updateItem(M)},b=new En(function(N,M){return p(N)-p(M)}),m=0;m<d.length;m++){var E=d[m];f[E.id()]=E.same(l)?0:1/0,b.push(E)}for(var T=function(M,I){for(var O=(o?M.edgesTo(I):M.edgesWith(I)).intersect(g),k=1/0,F,_=0;_<O.length;_++){var z=O[_],X=u(z);(X<k||!F)&&(k=X,F=z)}return{edge:F,dist:k}};b.size()>0;){var L=b.pop(),w=p(L),C=L.id();if(v[C]=w,w!==1/0)for(var A=L.neighborhood().intersect(d),R=0;R<A.length;R++){var S=A[R],D=S.id(),P=T(L,S),x=w+P.dist;x<p(S)&&(y(S,x),h[D]={node:L,edge:P.edge})}}return{distanceTo:function(M){var I=Oe(M)?d.filter(M)[0]:M[0];return v[I.id()]},pathTo:function(M){var I=Oe(M)?d.filter(M)[0]:M[0],O=[],k=I,F=k.id();if(I.length>0)for(O.unshift(I);h[F];){var _=h[F];O.unshift(_.edge),O.unshift(_.node),k=_.node,F=k.id()}return s.spawn(O)}}}},dC={kruskal:function(e){e=e||function(m){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,o=new Array(i),s=a,u=function(E){for(var T=0;T<o.length;T++){var L=o[T];if(L.has(E))return T}},l=0;l<i;l++)o[l]=this.spawn(a[l]);for(var f=n.sort(function(m,E){return e(m)-e(E)}),h=0;h<f.length;h++){var v=f[h],c=v.source()[0],d=v.target()[0],g=u(c),p=u(d),y=o[g],b=o[p];g!==p&&(s.merge(v),y.merge(b),o.splice(p,1))}return s}},gC=At({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),pC={aStar:function(e){var r=this.cy(),a=gC(e),n=a.root,i=a.goal,o=a.heuristic,s=a.directed,u=a.weight;n=r.collection(n)[0],i=r.collection(i)[0];var l=n.id(),f=i.id(),h={},v={},c={},d=new En(function(F,_){return v[F.id()]-v[_.id()]}),g=new Ra,p={},y={},b=function(_,z){d.push(_),g.add(z)},m,E,T=function(){m=d.pop(),E=m.id(),g.delete(E)},L=function(_){return g.has(_)};b(n,l),h[l]=0,v[l]=o(n);for(var w=0;d.size()>0;){if(T(),w++,E===f){for(var C=[],A=i,R=f,S=y[R];C.unshift(A),S!=null&&C.unshift(S),A=p[R],A!=null;)R=A.id(),S=y[R];return{found:!0,distance:h[E],path:this.spawn(C),steps:w}}c[E]=!0;for(var D=m._private.edges,P=0;P<D.length;P++){var x=D[P];if(this.hasElementWithId(x.id())&&!(s&&x.data("source")!==E)){var N=x.source(),M=x.target(),I=N.id()!==E?N:M,O=I.id();if(this.hasElementWithId(O)&&!c[O]){var k=h[E]+u(x);if(!L(O)){h[O]=k,v[O]=k+o(I),b(I,O),p[O]=m,y[O]=x;continue}k<h[O]&&(h[O]=k,v[O]=k+o(I),p[O]=m,y[O]=x)}}}}return{found:!1,distance:void 0,path:void 0,steps:w}}},yC=At({weight:function(e){return 1},directed:!1}),mC={floydWarshall:function(e){for(var r=this.cy(),a=yC(e),n=a.weight,i=a.directed,o=n,s=this.byGroup(),u=s.nodes,l=s.edges,f=u.length,h=f*f,v=function(X){return u.indexOf(X)},c=function(X){return u[X]},d=new Array(h),g=0;g<h;g++){var p=g%f,y=(g-p)/f;y===p?d[g]=0:d[g]=1/0}for(var b=new Array(h),m=new Array(h),E=0;E<l.length;E++){var T=l[E],L=T.source()[0],w=T.target()[0];if(L!==w){var C=v(L),A=v(w),R=C*f+A,S=o(T);if(d[R]>S&&(d[R]=S,b[R]=A,m[R]=T),!i){var D=A*f+C;!i&&d[D]>S&&(d[D]=S,b[D]=C,m[D]=T)}}}for(var P=0;P<f;P++)for(var x=0;x<f;x++)for(var N=x*f+P,M=0;M<f;M++){var I=x*f+M,O=P*f+M;d[N]+d[O]<d[I]&&(d[I]=d[N]+d[O],b[I]=b[N])}var k=function(X){return(Oe(X)?r.filter(X):X)[0]},F=function(X){return v(k(X))},_={distance:function(X,q){var G=F(X),U=F(q);return d[G*f+U]},path:function(X,q){var G=F(X),U=F(q),K=c(G);if(G===U)return K.collection();if(b[G*f+U]==null)return r.collection();var J=r.collection(),H=G,Y;for(J.merge(K);G!==U;)H=G,G=b[G*f+U],Y=m[H*f+G],J.merge(Y),J.merge(c(G));return J}};return _}},bC=At({weight:function(e){return 1},directed:!1,root:null}),EC={bellmanFord:function(e){var r=this,a=bC(e),n=a.weight,i=a.directed,o=a.root,s=n,u=this,l=this.cy(),f=this.byGroup(),h=f.edges,v=f.nodes,c=v.length,d=new fr,g=!1,p=[];o=l.collection(o)[0],h.unmergeBy(function(le){return le.isLoop()});for(var y=h.length,b=function(se){var ve=d.get(se.id());return ve||(ve={},d.set(se.id(),ve)),ve},m=function(se){return(Oe(se)?l.$(se):se)[0]},E=function(se){return b(m(se)).dist},T=function(se){for(var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o,ce=m(se),ye=[],ge=ce;;){if(ge==null)return r.spawn();var de=b(ge),be=de.edge,Re=de.pred;if(ye.unshift(ge[0]),ge.same(ve)&&ye.length>0)break;be!=null&&ye.unshift(be),ge=Re}return u.spawn(ye)},L=0;L<c;L++){var w=v[L],C=b(w);w.same(o)?C.dist=0:C.dist=1/0,C.pred=null,C.edge=null}for(var A=!1,R=function(se,ve,ce,ye,ge,de){var be=ye.dist+de;be<ge.dist&&!ce.same(ye.edge)&&(ge.dist=be,ge.pred=se,ge.edge=ce,A=!0)},S=1;S<c;S++){A=!1;for(var D=0;D<y;D++){var P=h[D],x=P.source(),N=P.target(),M=s(P),I=b(x),O=b(N);R(x,N,P,I,O,M),i||R(N,x,P,O,I,M)}if(!A)break}if(A)for(var k=[],F=0;F<y;F++){var _=h[F],z=_.source(),X=_.target(),q=s(_),G=b(z).dist,U=b(X).dist;if(G+q<U||!i&&U+q<G)if(g||(Ke("Graph contains a negative weight cycle for Bellman-Ford"),g=!0),e.findNegativeWeightCycles!==!1){var K=[];G+q<U&&K.push(z),!i&&U+q<G&&K.push(X);for(var J=K.length,H=0;H<J;H++){var Y=K[H],$=[Y];$.push(b(Y).edge);for(var Q=b(Y).pred;$.indexOf(Q)===-1;)$.push(Q),$.push(b(Q).edge),Q=b(Q).pred;$=$.slice($.indexOf(Q));for(var ee=$[0].id(),te=0,he=2;he<$.length;he+=2)$[he].id()<ee&&(ee=$[he].id(),te=he);$=$.slice(te).concat($.slice(0,te)),$.push($[0]);var xe=$.map(function(le){return le.id()}).join(",");k.indexOf(xe)===-1&&(p.push(u.spawn($)),k.push(xe))}}else break}return{distanceTo:E,pathTo:T,hasNegativeWeightCycle:g,negativeWeightCycles:p}}},wC=Math.sqrt(2),TC=function(e,r,a){a.length===0&&nt("Karger-Stein must be run on a connected (sub)graph");for(var n=a[e],i=n[1],o=n[2],s=r[i],u=r[o],l=a,f=l.length-1;f>=0;f--){var h=l[f],v=h[1],c=h[2];(r[v]===s&&r[c]===u||r[v]===u&&r[c]===s)&&l.splice(f,1)}for(var d=0;d<l.length;d++){var g=l[d];g[1]===u?(l[d]=g.slice(),l[d][1]=s):g[2]===u&&(l[d]=g.slice(),l[d][2]=s)}for(var p=0;p<r.length;p++)r[p]===u&&(r[p]=s);return l},Ao=function(e,r,a,n){for(;a>n;){var i=Math.floor(Math.random()*r.length);r=TC(i,e,r),a--}return r},xC={kargerStein:function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(O){return O.isLoop()});var i=a.length,o=n.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),u=Math.floor(i/wC);if(i<2){nt("At least 2 nodes are required for Karger-Stein algorithm");return}for(var l=[],f=0;f<o;f++){var h=n[f];l.push([f,a.indexOf(h.source()),a.indexOf(h.target())])}for(var v=1/0,c=[],d=new Array(i),g=new Array(i),p=new Array(i),y=function(k,F){for(var _=0;_<i;_++)F[_]=k[_]},b=0;b<=s;b++){for(var m=0;m<i;m++)g[m]=m;var E=Ao(g,l.slice(),i,u),T=E.slice();y(g,p);var L=Ao(g,E,u,2),w=Ao(p,T,u,2);L.length<=w.length&&L.length<v?(v=L.length,c=L,y(g,d)):w.length<=L.length&&w.length<v&&(v=w.length,c=w,y(p,d))}for(var C=this.spawn(c.map(function(O){return n[O[0]]})),A=this.spawn(),R=this.spawn(),S=d[0],D=0;D<d.length;D++){var P=d[D],x=a[D];P===S?A.merge(x):R.merge(x)}var N=function(k){var F=e.spawn();return k.forEach(function(_){F.merge(_),_.connectedEdges().forEach(function(z){e.contains(z)&&!C.contains(z)&&F.merge(z)})}),F},M=[N(A),N(R)],I={cut:C,components:M,partition1:A,partition2:R};return I}},Lo,CC=function(e){return{x:e.x,y:e.y}},Di=function(e,r,a){return{x:e.x*r+a.x,y:e.y*r+a.y}},IE=function(e,r,a){return{x:(e.x-a.x)/r,y:(e.y-a.y)/r}},pa=function(e){return{x:e[0],y:e[1]}},AC=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i<a;i++){var o=e[i];isFinite(o)&&(n=Math.min(o,n))}return n},LC=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i<a;i++){var o=e[i];isFinite(o)&&(n=Math.max(o,n))}return n},RC=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,o=r;o<a;o++){var s=e[o];isFinite(s)&&(n+=s,i++)}return n/i},SC=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a<e.length&&e.splice(a,e.length-a),r>0&&e.splice(0,r));for(var s=0,u=e.length-1;u>=0;u--){var l=e[u];o?isFinite(l)||(e[u]=-1/0,s++):e.splice(u,1)}i&&e.sort(function(v,c){return v-c});var f=e.length,h=Math.floor(f/2);return f%2!==0?e[h+1+s]:(e[h-1+s]+e[h+s])/2},DC=function(e){return Math.PI*e/180},_n=function(e,r){return Math.atan2(r,e)-Math.PI/2},Mv=Math.log2||function(t){return Math.log(t)/Math.log(2)},Ov=function(e){return e>0?1:e<0?-1:0},Kr=function(e,r){return Math.sqrt(Vr(e,r))},Vr=function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},NC=function(e){for(var r=e.length,a=0,n=0;n<r;n++)a+=e[n];for(var i=0;i<r;i++)e[i]=e[i]/a;return e},Et=function(e,r,a,n){return(1-n)*(1-n)*e+2*(1-n)*n*r+n*n*a},ba=function(e,r,a,n){return{x:Et(e.x,r.x,a.x,n),y:Et(e.y,r.y,a.y,n)}},MC=function(e,r,a,n){var i={x:r.x-e.x,y:r.y-e.y},o=Kr(e,r),s={x:i.x/o,y:i.y/o};return a=a??0,n=n??a*o,{x:e.x+s.x*n,y:e.y+s.y*n}},sn=function(e,r,a){return Math.max(e,Math.min(a,r))},Ot=function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},OC=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},IC=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},PC=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},PE=function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},$n=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Kn=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,o;if(r.length===1)a=n=i=o=r[0];else if(r.length===2)a=i=r[0],o=n=r[1];else if(r.length===4){var s=ht(r,4);a=s[0],n=s[1],i=s[2],o=s[3]}return e.x1-=o,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Fd=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Iv=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},xr=function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},_d=function(e,r){return xr(e,r.x,r.y)},FE=function(e,r){return xr(e,r.x1,r.y1)&&xr(e,r.x2,r.y2)},FC=(Lo=Math.hypot)!==null&&Lo!==void 0?Lo:function(t,e){return Math.sqrt(t*t+e*e)};function _C(t,e){if(t.length<3)throw new Error("Need at least 3 vertices");var r=function(C,A){return{x:C.x+A.x,y:C.y+A.y}},a=function(C,A){return{x:C.x-A.x,y:C.y-A.y}},n=function(C,A){return{x:C.x*A,y:C.y*A}},i=function(C,A){return C.x*A.y-C.y*A.x},o=function(C){var A=FC(C.x,C.y);return A===0?{x:0,y:0}:{x:C.x/A,y:C.y/A}},s=function(C){for(var A=0,R=0;R<C.length;R++){var S=C[R],D=C[(R+1)%C.length];A+=S.x*D.y-D.x*S.y}return A/2},u=function(C,A,R,S){var D=a(A,C),P=a(S,R),x=i(D,P);if(Math.abs(x)<1e-9)return r(C,n(D,.5));var N=i(a(R,C),P)/x;return r(C,n(D,N))},l=t.map(function(w){return{x:w.x,y:w.y}});s(l)<0&&l.reverse();for(var f=l.length,h=[],v=0;v<f;v++){var c=l[v],d=l[(v+1)%f],g=a(d,c),p=o({x:g.y,y:-g.x});h.push(p)}for(var y=h.map(function(w,C){var A=r(l[C],n(w,e)),R=r(l[(C+1)%f],n(w,e));return{p1:A,p2:R}}),b=[],m=0;m<f;m++){var E=y[(m-1+f)%f],T=y[m],L=u(E.p1,E.p2,T.p1,T.p2);b.push(L)}return b}function BC(t,e,r,a,n,i){var o=XC(t,e,r,a,n),s=_C(o,i),u=Ot();return s.forEach(function(l){return PE(u,l.x,l.y)}),u}var _E=function(e,r,a,n,i,o,s){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",l=u==="auto"?Dr(i,o):u,f=i/2,h=o/2;l=Math.min(l,f,h);var v=l!==f,c=l!==h,d;if(v){var g=a-f+l-s,p=n-h-s,y=a+f-l+s,b=p;if(d=Cr(e,r,a,n,g,p,y,b,!1),d.length>0)return d}if(c){var m=a+f+s,E=n-h+l-s,T=m,L=n+h-l+s;if(d=Cr(e,r,a,n,m,E,T,L,!1),d.length>0)return d}if(v){var w=a-f+l-s,C=n+h+s,A=a+f-l+s,R=C;if(d=Cr(e,r,a,n,w,C,A,R,!1),d.length>0)return d}if(c){var S=a-f-s,D=n-h+l-s,P=S,x=n+h-l+s;if(d=Cr(e,r,a,n,S,D,P,x,!1),d.length>0)return d}var N;{var M=a-f+l,I=n-h+l;if(N=$a(e,r,a,n,M,I,l+s),N.length>0&&N[0]<=M&&N[1]<=I)return[N[0],N[1]]}{var O=a+f-l,k=n-h+l;if(N=$a(e,r,a,n,O,k,l+s),N.length>0&&N[0]>=O&&N[1]<=k)return[N[0],N[1]]}{var F=a+f-l,_=n+h-l;if(N=$a(e,r,a,n,F,_,l+s),N.length>0&&N[0]>=F&&N[1]>=_)return[N[0],N[1]]}{var z=a-f+l,X=n+h-l;if(N=$a(e,r,a,n,z,X,l+s),N.length>0&&N[0]<=z&&N[1]>=X)return[N[0],N[1]]}return[]},kC=function(e,r,a,n,i,o,s){var u=s,l=Math.min(a,i),f=Math.max(a,i),h=Math.min(n,o),v=Math.max(n,o);return l-u<=e&&e<=f+u&&h-u<=r&&r<=v+u},qC=function(e,r,a,n,i,o,s,u,l){var f={x1:Math.min(a,s,i)-l,x2:Math.max(a,s,i)+l,y1:Math.min(n,u,o)-l,y2:Math.max(n,u,o)+l};return!(e<f.x1||e>f.x2||r<f.y1||r>f.y2)},GC=function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var o=Math.sqrt(i),s=2*e,u=(-r+o)/s,l=(-r-o)/s;return[u,l]},UC=function(e,r,a,n,i){var o=1e-5;e===0&&(e=o),r/=e,a/=e,n/=e;var s,u,l,f,h,v,c,d;if(u=(3*a-r*r)/9,l=-(27*n)+r*(9*a-2*(r*r)),l/=54,s=u*u*u+l*l,i[1]=0,c=r/3,s>0){h=l+Math.sqrt(s),h=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),v=l-Math.sqrt(s),v=v<0?-Math.pow(-v,1/3):Math.pow(v,1/3),i[0]=-c+h+v,c+=(h+v)/2,i[4]=i[2]=-c,c=Math.sqrt(3)*(-v+h)/2,i[3]=c,i[5]=-c;return}if(i[5]=i[3]=0,s===0){d=l<0?-Math.pow(-l,1/3):Math.pow(l,1/3),i[0]=-c+2*d,i[4]=i[2]=-(d+c);return}u=-u,f=u*u*u,f=Math.acos(l/Math.sqrt(f)),d=2*Math.sqrt(u),i[0]=-c+d*Math.cos(f/3),i[2]=-c+d*Math.cos((f+2*Math.PI)/3),i[4]=-c+d*Math.cos((f+4*Math.PI)/3)},zC=function(e,r,a,n,i,o,s,u){var l=1*a*a-4*a*i+2*a*s+4*i*i-4*i*s+s*s+n*n-4*n*o+2*n*u+4*o*o-4*o*u+u*u,f=9*a*i-3*a*a-3*a*s-6*i*i+3*i*s+9*n*o-3*n*n-3*n*u-6*o*o+3*o*u,h=3*a*a-6*a*i+a*s-a*e+2*i*i+2*i*e-s*e+3*n*n-6*n*o+n*u-n*r+2*o*o+2*o*r-u*r,v=1*a*i-a*a+a*e-i*e+n*o-n*n+n*r-o*r,c=[];UC(l,f,h,v,c);for(var d=1e-7,g=[],p=0;p<6;p+=2)Math.abs(c[p+1])<d&&c[p]>=0&&c[p]<=1&&g.push(c[p]);g.push(1),g.push(0);for(var y=-1,b,m,E,T=0;T<g.length;T++)b=Math.pow(1-g[T],2)*a+2*(1-g[T])*g[T]*i+g[T]*g[T]*s,m=Math.pow(1-g[T],2)*n+2*(1-g[T])*g[T]*o+g[T]*g[T]*u,E=Math.pow(b-e,2)+Math.pow(m-r,2),y>=0?E<y&&(y=E):y=E;return y},VC=function(e,r,a,n,i,o){var s=[e-a,r-n],u=[i-a,o-n],l=u[0]*u[0]+u[1]*u[1],f=s[0]*s[0]+s[1]*s[1],h=s[0]*u[0]+s[1]*u[1],v=h*h/l;return h<0?f:v>l?(e-i)*(e-i)+(r-o)*(r-o):f-v},_t=function(e,r,a){for(var n,i,o,s,u,l=0,f=0;f<a.length/2;f++)if(n=a[f*2],i=a[f*2+1],f+1<a.length/2?(o=a[(f+1)*2],s=a[(f+1)*2+1]):(o=a[(f+1-a.length/2)*2],s=a[(f+1-a.length/2)*2+1]),!(n==e&&o==e))if(n>=e&&e>=o||n<=e&&e<=o)u=(e-n)/(o-n)*(s-i)+i,u>r&&l++;else continue;return l%2!==0},cr=function(e,r,a,n,i,o,s,u,l){var f=new Array(a.length),h;u[0]!=null?(h=Math.atan(u[1]/u[0]),u[0]<0?h=h+Math.PI/2:h=-h-Math.PI/2):h=u;for(var v=Math.cos(-h),c=Math.sin(-h),d=0;d<f.length/2;d++)f[d*2]=o/2*(a[d*2]*v-a[d*2+1]*c),f[d*2+1]=s/2*(a[d*2+1]*v+a[d*2]*c),f[d*2]+=n,f[d*2+1]+=i;var g;if(l>0){var p=pi(f,-l);g=gi(p)}else g=f;return _t(e,r,g)},YC=function(e,r,a,n,i,o,s,u){for(var l=new Array(a.length*2),f=0;f<u.length;f++){var h=u[f];l[f*4+0]=h.startX,l[f*4+1]=h.startY,l[f*4+2]=h.stopX,l[f*4+3]=h.stopY;var v=Math.pow(h.cx-e,2)+Math.pow(h.cy-r,2);if(v<=Math.pow(h.radius,2))return!0}return _t(e,r,l)},gi=function(e){for(var r=new Array(e.length/2),a,n,i,o,s,u,l,f,h=0;h<e.length/4;h++){a=e[h*4],n=e[h*4+1],i=e[h*4+2],o=e[h*4+3],h<e.length/4-1?(s=e[(h+1)*4],u=e[(h+1)*4+1],l=e[(h+1)*4+2],f=e[(h+1)*4+3]):(s=e[0],u=e[1],l=e[2],f=e[3]);var v=Cr(a,n,i,o,s,u,l,f,!0);r[h*2]=v[0],r[h*2+1]=v[1]}return r},pi=function(e,r){for(var a=new Array(e.length*2),n,i,o,s,u=0;u<e.length/2;u++){n=e[u*2],i=e[u*2+1],u<e.length/2-1?(o=e[(u+1)*2],s=e[(u+1)*2+1]):(o=e[0],s=e[1]);var l=s-i,f=-(o-n),h=Math.sqrt(l*l+f*f),v=l/h,c=f/h;a[u*4]=n+v*r,a[u*4+1]=i+c*r,a[u*4+2]=o+v*r,a[u*4+3]=s+c*r}return a},HC=function(e,r,a,n,i,o){var s=a-e,u=n-r;s/=i,u/=o;var l=Math.sqrt(s*s+u*u),f=l-1;if(f<0)return[];var h=f/l;return[(a-e)*h+e,(n-r)*h+r]},Wr=function(e,r,a,n,i,o,s){return e-=i,r-=o,e/=a/2+s,r/=n/2+s,e*e+r*r<=1},$a=function(e,r,a,n,i,o,s){var u=[a-e,n-r],l=[e-i,r-o],f=u[0]*u[0]+u[1]*u[1],h=2*(l[0]*u[0]+l[1]*u[1]),v=l[0]*l[0]+l[1]*l[1]-s*s,c=h*h-4*f*v;if(c<0)return[];var d=(-h+Math.sqrt(c))/(2*f),g=(-h-Math.sqrt(c))/(2*f),p=Math.min(d,g),y=Math.max(d,g),b=[];if(p>=0&&p<=1&&b.push(p),y>=0&&y<=1&&b.push(y),b.length===0)return[];var m=b[0]*u[0]+e,E=b[0]*u[1]+r;if(b.length>1){if(b[0]==b[1])return[m,E];var T=b[1]*u[0]+e,L=b[1]*u[1]+r;return[m,E,T,L]}else return[m,E]},Ro=function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},Cr=function(e,r,a,n,i,o,s,u,l){var f=e-i,h=a-e,v=s-i,c=r-o,d=n-r,g=u-o,p=v*c-g*f,y=h*c-d*f,b=g*h-v*d;if(b!==0){var m=p/b,E=y/b,T=.001,L=0-T,w=1+T;return L<=m&&m<=w&&L<=E&&E<=w?[e+m*h,r+m*d]:l?[e+m*h,r+m*d]:[]}else return p===0||y===0?Ro(e,a,s)===s?[s,u]:Ro(e,a,i)===i?[i,o]:Ro(i,s,a)===a?[a,n]:[]:[]},XC=function(e,r,a,n,i){var o=[],s=n/2,u=i/2,l=r,f=a;o.push({x:l+s*e[0],y:f+u*e[1]});for(var h=1;h<e.length/2;h++)o.push({x:l+s*e[h*2],y:f+u*e[h*2+1]});return o},un=function(e,r,a,n,i,o,s,u){var l=[],f,h=new Array(a.length),v=!0;o==null&&(v=!1);var c;if(v){for(var d=0;d<h.length/2;d++)h[d*2]=a[d*2]*o+n,h[d*2+1]=a[d*2+1]*s+i;if(u>0){var g=pi(h,-u);c=gi(g)}else c=h}else c=a;for(var p,y,b,m,E=0;E<c.length/2;E++)p=c[E*2],y=c[E*2+1],E<c.length/2-1?(b=c[(E+1)*2],m=c[(E+1)*2+1]):(b=c[0],m=c[1]),f=Cr(e,r,n,i,p,y,b,m),f.length!==0&&l.push(f[0],f[1]);return l},WC=function(e,r,a,n,i,o,s,u,l){var f=[],h,v=new Array(a.length*2);l.forEach(function(b,m){m===0?(v[v.length-2]=b.startX,v[v.length-1]=b.startY):(v[m*4-2]=b.startX,v[m*4-1]=b.startY),v[m*4]=b.stopX,v[m*4+1]=b.stopY,h=$a(e,r,n,i,b.cx,b.cy,b.radius),h.length!==0&&f.push(h[0],h[1])});for(var c=0;c<v.length/4;c++)h=Cr(e,r,n,i,v[c*4],v[c*4+1],v[c*4+2],v[c*4+3],!1),h.length!==0&&f.push(h[0],h[1]);if(f.length>2){for(var d=[f[0],f[1]],g=Math.pow(d[0]-e,2)+Math.pow(d[1]-r,2),p=1;p<f.length/2;p++){var y=Math.pow(f[p*2]-e,2)+Math.pow(f[p*2+1]-r,2);y<=g&&(d[0]=f[p*2],d[1]=f[p*2+1],g=y)}return d}return f},Bn=function(e,r,a){var n=[e[0]-r[0],e[1]-r[1]],i=Math.sqrt(n[0]*n[0]+n[1]*n[1]),o=(i-a)/i;return o<0&&(o=1e-5),[r[0]+o*n[0],r[1]+o*n[1]]},Mt=function(e,r){var a=nv(e,r);return a=BE(a),a},BE=function(e){for(var r,a,n=e.length/2,i=1/0,o=1/0,s=-1/0,u=-1/0,l=0;l<n;l++)r=e[2*l],a=e[2*l+1],i=Math.min(i,r),s=Math.max(s,r),o=Math.min(o,a),u=Math.max(u,a);for(var f=2/(s-i),h=2/(u-o),v=0;v<n;v++)r=e[2*v]=e[2*v]*f,a=e[2*v+1]=e[2*v+1]*h,i=Math.min(i,r),s=Math.max(s,r),o=Math.min(o,a),u=Math.max(u,a);if(o<-1)for(var c=0;c<n;c++)a=e[2*c+1]=e[2*c+1]+(-1-o);return e},nv=function(e,r){var a=1/e*2*Math.PI,n=e%2===0?Math.PI/2+a/2:Math.PI/2;n+=r;for(var i=new Array(e*2),o,s=0;s<e;s++)o=s*a+n,i[2*s]=Math.cos(o),i[2*s+1]=Math.sin(-o);return i},Dr=function(e,r){return Math.min(e/4,r/4,8)},kE=function(e,r){return Math.min(e/10,r/10,8)},Pv=function(){return 8},$C=function(e,r,a){return[e-2*r+a,2*(r-e),e]},iv=function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}};function So(t,e){function r(h){for(var v=[],c=0;c<h.length;c++){var d=h[c],g=h[(c+1)%h.length],p={x:g.x-d.x,y:g.y-d.y},y={x:-p.y,y:p.x},b=Math.sqrt(y.x*y.x+y.y*y.y);v.push({x:y.x/b,y:y.y/b})}return v}function a(h,v){var c=1/0,d=-1/0,g=Bt(h),p;try{for(g.s();!(p=g.n()).done;){var y=p.value,b=y.x*v.x+y.y*v.y;c=Math.min(c,b),d=Math.max(d,b)}}catch(m){g.e(m)}finally{g.f()}return{min:c,max:d}}function n(h,v){return!(h.max<v.min||v.max<h.min)}var i=[].concat(hi(r(t)),hi(r(e))),o=Bt(i),s;try{for(o.s();!(s=o.n()).done;){var u=s.value,l=a(t,u),f=a(e,u);if(!n(l,f))return!1}}catch(h){o.e(h)}finally{o.f()}return!0}var KC=At({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),ZC={pageRank:function(e){for(var r=KC(e),a=r.dampingFactor,n=r.precision,i=r.iterations,o=r.weight,s=this._private.cy,u=this.byGroup(),l=u.nodes,f=u.edges,h=l.length,v=h*h,c=f.length,d=new Array(v),g=new Array(h),p=(1-a)/h,y=0;y<h;y++){for(var b=0;b<h;b++){var m=y*h+b;d[m]=0}g[y]=0}for(var E=0;E<c;E++){var T=f[E],L=T.data("source"),w=T.data("target");if(L!==w){var C=l.indexOfId(L),A=l.indexOfId(w),R=o(T),S=A*h+C;d[S]+=R,g[C]+=R}}for(var D=1/h+p,P=0;P<h;P++)if(g[P]===0)for(var x=0;x<h;x++){var N=x*h+P;d[N]=D}else for(var M=0;M<h;M++){var I=M*h+P;d[I]=d[I]/g[P]+p}for(var O=new Array(h),k=new Array(h),F,_=0;_<h;_++)O[_]=1;for(var z=0;z<i;z++){for(var X=0;X<h;X++)k[X]=0;for(var q=0;q<h;q++)for(var G=0;G<h;G++){var U=q*h+G;k[q]+=d[U]*O[G]}NC(k),F=O,O=k,k=F;for(var K=0,J=0;J<h;J++){var H=F[J]-O[J];K+=H*H}if(K<n)break}var Y={rank:function(Q){return Q=s.collection(Q)[0],O[l.indexOf(Q)]}};return Y}},Bd=At({root:null,weight:function(e){return 1},directed:!1,alpha:0}),Ea={degreeCentralityNormalized:function(e){e=Bd(e);var r=this.cy(),a=this.nodes(),n=a.length;if(e.directed){for(var f={},h={},v=0,c=0,d=0;d<n;d++){var g=a[d],p=g.id();e.root=g;var y=this.degreeCentrality(e);v<y.indegree&&(v=y.indegree),c<y.outdegree&&(c=y.outdegree),f[p]=y.indegree,h[p]=y.outdegree}return{indegree:function(m){return v==0?0:(Oe(m)&&(m=r.filter(m)),f[m.id()]/v)},outdegree:function(m){return c===0?0:(Oe(m)&&(m=r.filter(m)),h[m.id()]/c)}}}else{for(var i={},o=0,s=0;s<n;s++){var u=a[s];e.root=u;var l=this.degreeCentrality(e);o<l.degree&&(o=l.degree),i[u.id()]=l.degree}return{degree:function(m){return o===0?0:(Oe(m)&&(m=r.filter(m)),i[m.id()]/o)}}}},degreeCentrality:function(e){e=Bd(e);var r=this.cy(),a=this,n=e,i=n.root,o=n.weight,s=n.directed,u=n.alpha;if(i=r.collection(i)[0],s){for(var c=i.connectedEdges(),d=c.filter(function(L){return L.target().same(i)&&a.has(L)}),g=c.filter(function(L){return L.source().same(i)&&a.has(L)}),p=d.length,y=g.length,b=0,m=0,E=0;E<d.length;E++)b+=o(d[E]);for(var T=0;T<g.length;T++)m+=o(g[T]);return{indegree:Math.pow(p,1-u)*Math.pow(b,u),outdegree:Math.pow(y,1-u)*Math.pow(m,u)}}else{for(var l=i.connectedEdges().intersection(a),f=l.length,h=0,v=0;v<l.length;v++)h+=o(l[v]);return{degree:Math.pow(f,1-u)*Math.pow(h,u)}}}};Ea.dc=Ea.degreeCentrality;Ea.dcn=Ea.degreeCentralityNormalised=Ea.degreeCentralityNormalized;var kd=At({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),wa={closenessCentralityNormalized:function(e){for(var r=kd(e),a=r.harmonic,n=r.weight,i=r.directed,o=this.cy(),s={},u=0,l=this.nodes(),f=this.floydWarshall({weight:n,directed:i}),h=0;h<l.length;h++){for(var v=0,c=l[h],d=0;d<l.length;d++)if(h!==d){var g=f.distance(c,l[d]);a?v+=1/g:v+=g}a||(v=1/v),u<v&&(u=v),s[c.id()]=v}return{closeness:function(y){return u==0?0:(Oe(y)?y=o.filter(y)[0].id():y=y.id(),s[y]/u)}}},closenessCentrality:function(e){var r=kd(e),a=r.root,n=r.weight,i=r.directed,o=r.harmonic;a=this.filter(a)[0];for(var s=this.dijkstra({root:a,weight:n,directed:i}),u=0,l=this.nodes(),f=0;f<l.length;f++){var h=l[f];if(!h.same(a)){var v=s.distanceTo(h);o?u+=1/v:u+=v}}return o?u:1/u}};wa.cc=wa.closenessCentrality;wa.ccn=wa.closenessCentralityNormalised=wa.closenessCentralityNormalized;var QC=At({weight:null,directed:!1}),ov={betweennessCentrality:function(e){for(var r=QC(e),a=r.directed,n=r.weight,i=n!=null,o=this.cy(),s=this.nodes(),u={},l={},f=0,h={set:function(m,E){l[m]=E,E>f&&(f=E)},get:function(m){return l[m]}},v=0;v<s.length;v++){var c=s[v],d=c.id();a?u[d]=c.outgoers().nodes():u[d]=c.openNeighborhood().nodes(),h.set(d,0)}for(var g=function(){for(var m=s[p].id(),E=[],T={},L={},w={},C=new En(function(q,G){return w[q]-w[G]}),A=0;A<s.length;A++){var R=s[A].id();T[R]=[],L[R]=0,w[R]=1/0}for(L[m]=1,w[m]=0,C.push(m);!C.empty();){var S=C.pop();if(E.push(S),i)for(var D=0;D<u[S].length;D++){var P=u[S][D],x=o.getElementById(S),N=void 0;x.edgesTo(P).length>0?N=x.edgesTo(P)[0]:N=P.edgesTo(x)[0];var M=n(N);P=P.id(),w[P]>w[S]+M&&(w[P]=w[S]+M,C.nodes.indexOf(P)<0?C.push(P):C.updateItem(P),L[P]=0,T[P]=[]),w[P]==w[S]+M&&(L[P]=L[P]+L[S],T[P].push(S))}else for(var I=0;I<u[S].length;I++){var O=u[S][I].id();w[O]==1/0&&(C.push(O),w[O]=w[S]+1),w[O]==w[S]+1&&(L[O]=L[O]+L[S],T[O].push(S))}}for(var k={},F=0;F<s.length;F++)k[s[F].id()]=0;for(;E.length>0;){for(var _=E.pop(),z=0;z<T[_].length;z++){var X=T[_][z];k[X]=k[X]+L[X]/L[_]*(1+k[_])}_!=s[p].id()&&h.set(_,h.get(_)+k[_])}},p=0;p<s.length;p++)g();var y={betweenness:function(m){var E=o.collection(m).id();return h.get(E)},betweennessNormalized:function(m){if(f==0)return 0;var E=o.collection(m).id();return h.get(E)/f}};return y.betweennessNormalised=y.betweennessNormalized,y}};ov.bc=ov.betweennessCentrality;var JC=At({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),jC=function(e){return JC(e)},eA=function(e,r){for(var a=0,n=0;n<r.length;n++)a+=r[n](e);return a},tA=function(e,r,a){for(var n=0;n<r;n++)e[n*r+n]=a},qE=function(e,r){for(var a,n=0;n<r;n++){a=0;for(var i=0;i<r;i++)a+=e[i*r+n];for(var o=0;o<r;o++)e[o*r+n]=e[o*r+n]/a}},rA=function(e,r,a){for(var n=new Array(a*a),i=0;i<a;i++){for(var o=0;o<a;o++)n[i*a+o]=0;for(var s=0;s<a;s++)for(var u=0;u<a;u++)n[i*a+u]+=e[i*a+s]*r[s*a+u]}return n},aA=function(e,r,a){for(var n=e.slice(0),i=1;i<a;i++)e=rA(e,n,r);return e},nA=function(e,r,a){for(var n=new Array(r*r),i=0;i<r*r;i++)n[i]=Math.pow(e[i],a);return qE(n,r),n},iA=function(e,r,a,n){for(var i=0;i<a;i++){var o=Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n),s=Math.round(r[i]*Math.pow(10,n))/Math.pow(10,n);if(o!==s)return!1}return!0},oA=function(e,r,a,n){for(var i=[],o=0;o<r;o++){for(var s=[],u=0;u<r;u++)Math.round(e[o*r+u]*1e3)/1e3>0&&s.push(a[u]);s.length!==0&&i.push(n.collection(s))}return i},sA=function(e,r){for(var a=0;a<e.length;a++)if(!r[a]||e[a].id()!==r[a].id())return!1;return!0},uA=function(e){for(var r=0;r<e.length;r++)for(var a=0;a<e.length;a++)r!=a&&sA(e[r],e[a])&&e.splice(a,1);return e},qd=function(e){for(var r=this.nodes(),a=this.edges(),n=this.cy(),i=jC(e),o={},s=0;s<r.length;s++)o[r[s].id()]=s;for(var u=r.length,l=u*u,f=new Array(l),h,v=0;v<l;v++)f[v]=0;for(var c=0;c<a.length;c++){var d=a[c],g=o[d.source().id()],p=o[d.target().id()],y=eA(d,i.attributes);f[g*u+p]+=y,f[p*u+g]+=y}tA(f,u,i.multFactor),qE(f,u);for(var b=!0,m=0;b&&m<i.maxIterations;)b=!1,h=aA(f,u,i.expandFactor),f=nA(h,u,i.inflateFactor),iA(f,h,l,4)||(b=!0),m++;var E=oA(f,u,r,n);return E=uA(E),E},lA={markovClustering:qd,mcl:qd},fA=function(e){return e},GE=function(e,r){return Math.abs(r-e)},Gd=function(e,r,a){return e+GE(r,a)},Ud=function(e,r,a){return e+Math.pow(a-r,2)},hA=function(e){return Math.sqrt(e)},cA=function(e,r,a){return Math.max(e,GE(r,a))},Ua=function(e,r,a,n,i){for(var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:fA,s=n,u,l,f=0;f<e;f++)u=r(f),l=a(f),s=i(s,u,l);return o(s)},Ca={euclidean:function(e,r,a){return e>=2?Ua(e,r,a,0,Ud,hA):Ua(e,r,a,0,Gd)},squaredEuclidean:function(e,r,a){return Ua(e,r,a,0,Ud)},manhattan:function(e,r,a){return Ua(e,r,a,0,Gd)},max:function(e,r,a){return Ua(e,r,a,-1/0,cA)}};Ca["squared-euclidean"]=Ca.squaredEuclidean;Ca.squaredeuclidean=Ca.squaredEuclidean;function Ni(t,e,r,a,n,i){var o;return ot(t)?o=t:o=Ca[t]||Ca.euclidean,e===0&&ot(t)?o(n,i):o(e,r,a,n,i)}var vA=At({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Fv=function(e){return vA(e)},yi=function(e,r,a,n,i){var o=i!=="kMedoids",s=o?function(h){return a[h]}:function(h){return n[h](a)},u=function(v){return n[v](r)},l=a,f=r;return Ni(e,n.length,s,u,l,f)},Do=function(e,r,a){for(var n=a.length,i=new Array(n),o=new Array(n),s=new Array(r),u=null,l=0;l<n;l++)i[l]=e.min(a[l]).value,o[l]=e.max(a[l]).value;for(var f=0;f<r;f++){u=[];for(var h=0;h<n;h++)u[h]=Math.random()*(o[h]-i[h])+i[h];s[f]=u}return s},UE=function(e,r,a,n,i){for(var o=1/0,s=0,u=0;u<r.length;u++){var l=yi(a,e,r[u],n,i);l<o&&(o=l,s=u)}return s},zE=function(e,r,a){for(var n=[],i=null,o=0;o<r.length;o++)i=r[o],a[i.id()]===e&&n.push(i);return n},dA=function(e,r,a){return Math.abs(r-e)<=a},gA=function(e,r,a){for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++){var o=Math.abs(e[n][i]-r[n][i]);if(o>a)return!1}return!0},pA=function(e,r,a){for(var n=0;n<a;n++)if(e===r[n])return!0;return!1},zd=function(e,r){var a=new Array(r);if(e.length<50)for(var n=0;n<r;n++){for(var i=e[Math.floor(Math.random()*e.length)];pA(i,a,n);)i=e[Math.floor(Math.random()*e.length)];a[n]=i}else for(var o=0;o<r;o++)a[o]=e[Math.floor(Math.random()*e.length)];return a},Vd=function(e,r,a){for(var n=0,i=0;i<r.length;i++)n+=yi("manhattan",r[i],e,a,"kMedoids");return n},yA=function(e){var r=this.cy(),a=this.nodes(),n=null,i=Fv(e),o=new Array(i.k),s={},u;i.testMode?typeof i.testCentroids=="number"?(i.testCentroids,u=Do(a,i.k,i.attributes)):pt(i.testCentroids)==="object"?u=i.testCentroids:u=Do(a,i.k,i.attributes):u=Do(a,i.k,i.attributes);for(var l=!0,f=0;l&&f<i.maxIterations;){for(var h=0;h<a.length;h++)n=a[h],s[n.id()]=UE(n,u,i.distance,i.attributes,"kMeans");l=!1;for(var v=0;v<i.k;v++){var c=zE(v,a,s);if(c.length!==0){for(var d=i.attributes.length,g=u[v],p=new Array(d),y=new Array(d),b=0;b<d;b++){y[b]=0;for(var m=0;m<c.length;m++)n=c[m],y[b]+=i.attributes[b](n);p[b]=y[b]/c.length,dA(p[b],g[b],i.sensitivityThreshold)||(l=!0)}u[v]=p,o[v]=r.collection(c)}}f++}return o},mA=function(e){var r=this.cy(),a=this.nodes(),n=null,i=Fv(e),o=new Array(i.k),s,u={},l,f=new Array(i.k);i.testMode?typeof i.testCentroids=="number"||(pt(i.testCentroids)==="object"?s=i.testCentroids:s=zd(a,i.k)):s=zd(a,i.k);for(var h=!0,v=0;h&&v<i.maxIterations;){for(var c=0;c<a.length;c++)n=a[c],u[n.id()]=UE(n,s,i.distance,i.attributes,"kMedoids");h=!1;for(var d=0;d<s.length;d++){var g=zE(d,a,u);if(g.length!==0){f[d]=Vd(s[d],g,i.attributes);for(var p=0;p<g.length;p++)l=Vd(g[p],g,i.attributes),l<f[d]&&(f[d]=l,s[d]=g[p],h=!0);o[d]=r.collection(g)}}v++}return o},bA=function(e,r,a,n,i){for(var o,s,u=0;u<r.length;u++)for(var l=0;l<e.length;l++)n[u][l]=Math.pow(a[u][l],i.m);for(var f=0;f<e.length;f++)for(var h=0;h<i.attributes.length;h++){o=0,s=0;for(var v=0;v<r.length;v++)o+=n[v][f]*i.attributes[h](r[v]),s+=n[v][f];e[f][h]=o/s}},EA=function(e,r,a,n,i){for(var o=0;o<e.length;o++)r[o]=e[o].slice();for(var s,u,l,f=2/(i.m-1),h=0;h<a.length;h++)for(var v=0;v<n.length;v++){s=0;for(var c=0;c<a.length;c++)u=yi(i.distance,n[v],a[h],i.attributes,"cmeans"),l=yi(i.distance,n[v],a[c],i.attributes,"cmeans"),s+=Math.pow(u/l,f);e[v][h]=1/s}},wA=function(e,r,a,n){for(var i=new Array(a.k),o=0;o<i.length;o++)i[o]=[];for(var s,u,l=0;l<r.length;l++){s=-1/0,u=-1;for(var f=0;f<r[0].length;f++)r[l][f]>s&&(s=r[l][f],u=f);i[u].push(e[l])}for(var h=0;h<i.length;h++)i[h]=n.collection(i[h]);return i},Yd=function(e){var r=this.cy(),a=this.nodes(),n=Fv(e),i,o,s,u,l;u=new Array(a.length);for(var f=0;f<a.length;f++)u[f]=new Array(n.k);s=new Array(a.length);for(var h=0;h<a.length;h++)s[h]=new Array(n.k);for(var v=0;v<a.length;v++){for(var c=0,d=0;d<n.k;d++)s[v][d]=Math.random(),c+=s[v][d];for(var g=0;g<n.k;g++)s[v][g]=s[v][g]/c}o=new Array(n.k);for(var p=0;p<n.k;p++)o[p]=new Array(n.attributes.length);l=new Array(a.length);for(var y=0;y<a.length;y++)l[y]=new Array(n.k);for(var b=!0,m=0;b&&m<n.maxIterations;)b=!1,bA(o,a,s,l,n),EA(s,u,o,a,n),gA(s,u,n.sensitivityThreshold)||(b=!0),m++;return i=wA(a,s,n,r),{clusters:i,degreeOfMembership:s}},TA={kMeans:yA,kMedoids:mA,fuzzyCMeans:Yd,fcm:Yd},xA=At({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),CA={single:"min",complete:"max"},AA=function(e){var r=xA(e),a=CA[r.linkage];return a!=null&&(r.linkage=a),r},Hd=function(e,r,a,n,i){for(var o=0,s=1/0,u,l=i.attributes,f=function(A,R){return Ni(i.distance,l.length,function(S){return l[S](A)},function(S){return l[S](R)},A,R)},h=0;h<e.length;h++){var v=e[h].key,c=a[v][n[v]];c<s&&(o=v,s=c)}if(i.mode==="threshold"&&s>=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=r[o],g=r[n[o]],p;i.mode==="dendrogram"?p={left:d,right:g,key:d.key}:p={value:d.value.concat(g.value),key:d.key},e[d.index]=p,e.splice(g.index,1),r[d.key]=p;for(var y=0;y<e.length;y++){var b=e[y];d.key===b.key?u=1/0:i.linkage==="min"?(u=a[d.key][b.key],a[d.key][b.key]>a[g.key][b.key]&&(u=a[g.key][b.key])):i.linkage==="max"?(u=a[d.key][b.key],a[d.key][b.key]<a[g.key][b.key]&&(u=a[g.key][b.key])):i.linkage==="mean"?u=(a[d.key][b.key]*d.size+a[g.key][b.key]*g.size)/(d.size+g.size):i.mode==="dendrogram"?u=f(b.value,d.value):u=f(b.value[0],d.value[0]),a[d.key][b.key]=a[b.key][d.key]=u}for(var m=0;m<e.length;m++){var E=e[m].key;if(n[E]===d.key||n[E]===g.key){for(var T=E,L=0;L<e.length;L++){var w=e[L].key;a[E][w]<a[E][T]&&(T=w)}n[E]=T}e[m].index=m}return d.key=g.key=d.index=g.index=null,!0},ya=function(e,r,a){e&&(e.value?r.push(e.value):(e.left&&ya(e.left,r),e.right&&ya(e.right,r)))},sv=function(e,r){if(!e)return"";if(e.left&&e.right){var a=sv(e.left,r),n=sv(e.right,r),i=r.add({group:"nodes",data:{id:a+","+n}});return r.add({group:"edges",data:{source:a,target:i.id()}}),r.add({group:"edges",data:{source:n,target:i.id()}}),i.id()}else if(e.value)return e.value.id()},uv=function(e,r,a){if(!e)return[];var n=[],i=[],o=[];return r===0?(e.left&&ya(e.left,n),e.right&&ya(e.right,i),o=n.concat(i),[a.collection(o)]):r===1?e.value?[a.collection(e.value)]:(e.left&&ya(e.left,n),e.right&&ya(e.right,i),[a.collection(n),a.collection(i)]):e.value?[a.collection(e.value)]:(e.left&&(n=uv(e.left,r-1,a)),e.right&&(i=uv(e.right,r-1,a)),n.concat(i))},Xd=function(e){for(var r=this.cy(),a=this.nodes(),n=AA(e),i=n.attributes,o=function(m,E){return Ni(n.distance,i.length,function(T){return i[T](m)},function(T){return i[T](E)},m,E)},s=[],u=[],l=[],f=[],h=0;h<a.length;h++){var v={value:n.mode==="dendrogram"?a[h]:[a[h]],key:h,index:h};s[h]=v,f[h]=v,u[h]=[],l[h]=0}for(var c=0;c<s.length;c++)for(var d=0;d<=c;d++){var g=void 0;n.mode==="dendrogram"?g=c===d?1/0:o(s[c].value,s[d].value):g=c===d?1/0:o(s[c].value[0],s[d].value[0]),u[c][d]=g,u[d][c]=g,g<u[c][l[c]]&&(l[c]=d)}for(var p=Hd(s,f,u,l,n);p;)p=Hd(s,f,u,l,n);var y;return n.mode==="dendrogram"?(y=uv(s[0],n.dendrogramDepth,r),n.addDendrogram&&sv(s[0],r)):(y=new Array(s.length),s.forEach(function(b,m){b.key=b.index=null,y[m]=r.collection(b.value)})),y},LA={hierarchicalClustering:Xd,hca:Xd},RA=At({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),SA=function(e){var r=e.damping,a=e.preference;.5<=r&&r<1||nt("Damping must range on [0.5, 1). Got: ".concat(r));var n=["median","mean","min","max"];return n.some(function(i){return i===a})||Ee(a)||nt("Preference must be one of [".concat(n.map(function(i){return"'".concat(i,"'")}).join(", "),"] or a number. Got: ").concat(a)),RA(e)},DA=function(e,r,a,n){var i=function(s,u){return n[u](s)};return-Ni(e,n.length,function(o){return i(r,o)},function(o){return i(a,o)},r,a)},NA=function(e,r){var a=null;return r==="median"?a=SC(e):r==="mean"?a=RC(e):r==="min"?a=AC(e):r==="max"?a=LC(e):a=r,a},MA=function(e,r,a){for(var n=[],i=0;i<e;i++)r[i*e+i]+a[i*e+i]>0&&n.push(i);return n},Wd=function(e,r,a){for(var n=[],i=0;i<e;i++){for(var o=-1,s=-1/0,u=0;u<a.length;u++){var l=a[u];r[i*e+l]>s&&(o=l,s=r[i*e+l])}o>0&&n.push(o)}for(var f=0;f<a.length;f++)n[a[f]]=a[f];return n},OA=function(e,r,a){for(var n=Wd(e,r,a),i=0;i<a.length;i++){for(var o=[],s=0;s<n.length;s++)n[s]===a[i]&&o.push(s);for(var u=-1,l=-1/0,f=0;f<o.length;f++){for(var h=0,v=0;v<o.length;v++)h+=r[o[v]*e+o[f]];h>l&&(u=f,l=h)}a[i]=o[u]}return n=Wd(e,r,a),n},$d=function(e){for(var r=this.cy(),a=this.nodes(),n=SA(e),i={},o=0;o<a.length;o++)i[a[o].id()]=o;var s,u,l,f,h,v;s=a.length,u=s*s,l=new Array(u);for(var c=0;c<u;c++)l[c]=-1/0;for(var d=0;d<s;d++)for(var g=0;g<s;g++)d!==g&&(l[d*s+g]=DA(n.distance,a[d],a[g],n.attributes));f=NA(l,n.preference);for(var p=0;p<s;p++)l[p*s+p]=f;h=new Array(u);for(var y=0;y<u;y++)h[y]=0;v=new Array(u);for(var b=0;b<u;b++)v[b]=0;for(var m=new Array(s),E=new Array(s),T=new Array(s),L=0;L<s;L++)m[L]=0,E[L]=0,T[L]=0;for(var w=new Array(s*n.minIterations),C=0;C<w.length;C++)w[C]=0;var A;for(A=0;A<n.maxIterations;A++){for(var R=0;R<s;R++){for(var S=-1/0,D=-1/0,P=-1,x=0,N=0;N<s;N++)m[N]=h[R*s+N],x=v[R*s+N]+l[R*s+N],x>=S?(D=S,S=x,P=N):x>D&&(D=x);for(var M=0;M<s;M++)h[R*s+M]=(1-n.damping)*(l[R*s+M]-S)+n.damping*m[M];h[R*s+P]=(1-n.damping)*(l[R*s+P]-D)+n.damping*m[P]}for(var I=0;I<s;I++){for(var O=0,k=0;k<s;k++)m[k]=v[k*s+I],E[k]=Math.max(0,h[k*s+I]),O+=E[k];O-=E[I],E[I]=h[I*s+I],O+=E[I];for(var F=0;F<s;F++)v[F*s+I]=(1-n.damping)*Math.min(0,O-E[F])+n.damping*m[F];v[I*s+I]=(1-n.damping)*(O-E[I])+n.damping*m[I]}for(var _=0,z=0;z<s;z++){var X=v[z*s+z]+h[z*s+z]>0?1:0;w[A%n.minIterations*s+z]=X,_+=X}if(_>0&&(A>=n.minIterations-1||A==n.maxIterations-1)){for(var q=0,G=0;G<s;G++){T[G]=0;for(var U=0;U<n.minIterations;U++)T[G]+=w[U*s+G];(T[G]===0||T[G]===n.minIterations)&&q++}if(q===s)break}}for(var K=MA(s,h,v),J=OA(s,l,K),H={},Y=0;Y<K.length;Y++)H[K[Y]]=[];for(var $=0;$<a.length;$++){var Q=i[a[$].id()],ee=J[Q];ee!=null&&H[ee].push(a[$])}for(var te=new Array(K.length),he=0;he<K.length;he++)te[he]=r.collection(H[K[he]]);return te},IA={affinityPropagation:$d,ap:$d},PA=At({root:void 0,directed:!1}),FA={hierholzer:function(e){if(!He(e)){var r=arguments;e={root:r[0],directed:r[1]}}var a=PA(e),n=a.root,i=a.directed,o=this,s=!1,u,l,f;n&&(f=Oe(n)?this.filter(n)[0].id():n[0].id());var h={},v={};i?o.forEach(function(b){var m=b.id();if(b.isNode()){var E=b.indegree(!0),T=b.outdegree(!0),L=E-T,w=T-E;L==1?u?s=!0:u=m:w==1?l?s=!0:l=m:(w>1||L>1)&&(s=!0),h[m]=[],b.outgoers().forEach(function(C){C.isEdge()&&h[m].push(C.id())})}else v[m]=[void 0,b.target().id()]}):o.forEach(function(b){var m=b.id();if(b.isNode()){var E=b.degree(!0);E%2&&(u?l?s=!0:l=m:u=m),h[m]=[],b.connectedEdges().forEach(function(T){return h[m].push(T.id())})}else v[m]=[b.source().id(),b.target().id()]});var c={found:!1,trail:void 0};if(s)return c;if(l&&u)if(i){if(f&&l!=f)return c;f=l}else{if(f&&l!=f&&u!=f)return c;f||(f=l)}else f||(f=o[0].id());var d=function(m){for(var E=m,T=[m],L,w,C;h[E].length;)L=h[E].shift(),w=v[L][0],C=v[L][1],E!=C?(h[C]=h[C].filter(function(A){return A!=L}),E=C):!i&&E!=w&&(h[w]=h[w].filter(function(A){return A!=L}),E=w),T.unshift(L),T.unshift(E);return T},g=[],p=[];for(p=d(f);p.length!=1;)h[p[0]].length==0?(g.unshift(o.getElementById(p.shift())),g.unshift(o.getElementById(p.shift()))):p=d(p.shift()).concat(p);g.unshift(o.getElementById(p.shift()));for(var y in h)if(h[y].length)return c;return c.found=!0,c.trail=this.spawn(g,!0),c}},kn=function(){var e=this,r={},a=0,n=0,i=[],o=[],s={},u=function(v,c){for(var d=o.length-1,g=[],p=e.spawn();o[d].x!=v||o[d].y!=c;)g.push(o.pop().edge),d--;g.push(o.pop().edge),g.forEach(function(y){var b=y.connectedNodes().intersection(e);p.merge(y),b.forEach(function(m){var E=m.id(),T=m.connectedEdges().intersection(e);p.merge(m),r[E].cutVertex?p.merge(T.filter(function(L){return L.isLoop()})):p.merge(T)})}),i.push(p)},l=function(v,c,d){v===d&&(n+=1),r[c]={id:a,low:a++,cutVertex:!1};var g=e.getElementById(c).connectedEdges().intersection(e);if(g.size()===0)i.push(e.spawn(e.getElementById(c)));else{var p,y,b,m;g.forEach(function(E){p=E.source().id(),y=E.target().id(),b=p===c?y:p,b!==d&&(m=E.id(),s[m]||(s[m]=!0,o.push({x:c,y:b,edge:E})),b in r?r[c].low=Math.min(r[c].low,r[b].id):(l(v,b,c),r[c].low=Math.min(r[c].low,r[b].low),r[c].id<=r[b].low&&(r[c].cutVertex=!0,u(c,b))))})}};e.forEach(function(h){if(h.isNode()){var v=h.id();v in r||(n=0,l(v,v),r[v].cutVertex=n>1)}});var f=Object.keys(r).filter(function(h){return r[h].cutVertex}).map(function(h){return e.getElementById(h)});return{cut:e.spawn(f),components:i}},_A={hopcroftTarjanBiconnected:kn,htbc:kn,htb:kn,hopcroftTarjanBiconnectedComponents:kn},qn=function(){var e=this,r={},a=0,n=[],i=[],o=e.spawn(e),s=function(l){i.push(l),r[l]={index:a,low:a++,explored:!1};var f=e.getElementById(l).connectedEdges().intersection(e);if(f.forEach(function(g){var p=g.target().id();p!==l&&(p in r||s(p),r[p].explored||(r[l].low=Math.min(r[l].low,r[p].low)))}),r[l].index===r[l].low){for(var h=e.spawn();;){var v=i.pop();if(h.merge(e.getElementById(v)),r[v].low=r[l].index,r[v].explored=!0,v===l)break}var c=h.edgesWith(h),d=h.merge(c);n.push(d),o=o.difference(d)}};return e.forEach(function(u){if(u.isNode()){var l=u.id();l in r||s(l)}}),{cut:o,components:n}},BA={tarjanStronglyConnected:qn,tsc:qn,tscc:qn,tarjanStronglyConnectedComponents:qn},VE={};[on,vC,dC,pC,mC,EC,xC,ZC,Ea,wa,ov,lA,TA,LA,IA,FA,_A,BA].forEach(function(t){_e(VE,t)});/*!
@@ -328,4 +328,4 @@ https://github.com/jquery/jquery/blob/master/src/event.js
328
328
  `).concat(r.picking?`if(outColor.a == 0.0) discard;
329
329
  else outColor = vIndex;`:"",`
330
330
  }
331
- `),s=QS(a,n,o);s.aPosition=a.getAttribLocation(s,"aPosition"),s.aIndex=a.getAttribLocation(s,"aIndex"),s.aVertType=a.getAttribLocation(s,"aVertType"),s.aTransform=a.getAttribLocation(s,"aTransform"),s.aAtlasId=a.getAttribLocation(s,"aAtlasId"),s.aTex=a.getAttribLocation(s,"aTex"),s.aPointAPointB=a.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=a.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=a.getAttribLocation(s,"aLineWidth"),s.aColor=a.getAttribLocation(s,"aColor"),s.aCornerRadius=a.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=a.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=a.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=a.getUniformLocation(s,"uAtlasSize"),s.uBGColor=a.getUniformLocation(s,"uBGColor"),s.uZoom=a.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var u=0;u<this.batchManager.getMaxAtlasesPerBatch();u++)s.uTextures.push(a.getUniformLocation(s,"uTexture".concat(u)));return s}},{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,n=this.gl,i=this.program,o=n.createVertexArray();return n.bindVertexArray(o),oD(n,"vec2",i.aPosition,r),this.transformBuffer=sD(n,a,i.aTransform),this.indexBuffer=er(n,a,"vec4",i.aIndex),this.vertTypeBuffer=er(n,a,"int",i.aVertType),this.atlasIdBuffer=er(n,a,"int",i.aAtlasId),this.texBuffer=er(n,a,"vec4",i.aTex),this.pointAPointBBuffer=er(n,a,"vec4",i.aPointAPointB),this.pointCPointDBuffer=er(n,a,"vec4",i.aPointCPointD),this.lineWidthBuffer=er(n,a,"vec2",i.aLineWidth),this.colorBuffer=er(n,a,"vec4",i.aColor),this.cornerRadiusBuffer=er(n,a,"vec4",i.aCornerRadius),this.borderColorBuffer=er(n,a,"vec4",i.aBorderColor),n.bindVertexArray(null),o}},{key:"buffers",get:function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return Tr(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]:rn.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,n){var i=this.atlasManager,o=this.batchManager,s=i.getRenderTypeOpts(n);if(this._isVisible(r,s)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&s.getTexPickingMode){var u=s.getTexPickingMode(r);if(u===xi.IGNORE)return;if(u==xi.USE_BB){this.drawPickingRectangle(r,a,n);return}}var l=i.getAtlasInfo(r,n),f=Bt(l),h;try{for(f.s();!(h=f.n()).done;){var v=h.value,c=v.atlas,d=v.tex1,g=v.tex2;o.canAddToCurrentBatch(c)||this.endBatch();for(var p=o.getAtlasIndexForBatch(c),y=0,b=[[d,!0],[g,!1]];y<b.length;y++){var m=ht(b[y],2),E=m[0],T=m[1];if(E.w!=0){var L=this.instanceCount;this.vertTypeBuffer.getView(L)[0]=Ps;var w=this.indexBuffer.getView(L);ca(a,w);var C=this.atlasIdBuffer.getView(L);C[0]=p;var A=this.texBuffer.getView(L);A[0]=E.x,A[1]=E.y,A[2]=E.w,A[3]=E.h;var R=this.transformBuffer.getMatrixView(L);this.setTransformMatrix(r,R,s,v,T),this.instanceCount++,T||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(S){f.e(S)}finally{f.f()}}}},{key:"setTransformMatrix",value:function(r,a,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=0;if(n.shapeProps&&n.shapeProps.padding&&(s=r.pstyle(n.shapeProps.padding).pfValue),i){var u=i.bb,l=i.tex1,f=i.tex2,h=l.w/(l.w+f.w);o||(h=1-h);var v=this._getAdjustedBB(u,s,o,h);this._applyTransformMatrix(a,v,n,r)}else{var c=n.getBoundingBox(r),d=this._getAdjustedBB(c,s,!0,1);this._applyTransformMatrix(a,d,n,r)}}},{key:"_applyTransformMatrix",value:function(r,a,n,i){var o,s;Pp(r);var u=n.getRotation?n.getRotation(i):0;if(u!==0){var l=n.getRotationPoint(i),f=l.x,h=l.y;ai(r,r,[f,h]),Fp(r,r,u);var v=n.getRotationOffset(i);o=v.x+(a.xOffset||0),s=v.y+(a.yOffset||0)}else o=a.x1,s=a.y1;ai(r,r,[o,s]),bv(r,r,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(r,a,n,i){var o=r.x1,s=r.y1,u=r.w,l=r.h,f=r.yOffset;a&&(o-=a,s-=a,u+=2*a,l+=2*a);var h=0,v=u*i;return n&&i<1?u=v:!n&&i<1&&(h=u-v,o+=h,u=v),{x1:o,y1:s,w:u,h:l,xOffset:h,yOffset:f}}},{key:"drawPickingRectangle",value:function(r,a,n){var i=this.atlasManager.getRenderTypeOpts(n),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=va;var s=this.indexBuffer.getView(o);ca(a,s);var u=this.colorBuffer.getView(o);zr([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(r,l,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(r,i)){var o=i.shapeProps,s=this._getVertTypeForShape(r,o.shape);if(s===void 0||i.isSimple&&!i.isSimple(r,this.renderTarget)){this.drawTexture(r,a,n);return}var u=this.instanceCount;if(this.vertTypeBuffer.getView(u)[0]=s,s===Xn||s===Xa){var l=i.getBoundingBox(r),f=this._getCornerRadius(r,o.radius,l),h=this.cornerRadiusBuffer.getView(u);h[0]=f,h[1]=f,h[2]=f,h[3]=f,s===Xa&&(h[0]=0,h[2]=0)}var v=this.indexBuffer.getView(u);ca(a,v);var c=this.renderTarget.picking?1:n==="node-body"?r.effectiveOpacity():1,d=this.renderTarget.picking?1:r.pstyle(o.opacity).value*c,g=r.pstyle(o.color).value,p=this.colorBuffer.getView(u);zr(g,d,p);var y=this.lineWidthBuffer.getView(u);if(y[0]=0,y[1]=0,o.border){var b=r.pstyle("border-width").value;if(b>0){var m=r.pstyle("border-color").value,E=c*r.pstyle("border-opacity").value,T=this.borderColorBuffer.getView(u);zr(m,E,T);var L=r.pstyle("border-position").value;if(L==="inside")y[0]=0,y[1]=-b;else if(L==="outside")y[0]=b,y[1]=0;else{var w=b/2;y[0]=w,y[1]=-w}}}var C=this.transformBuffer.getMatrixView(u);this.setTransformMatrix(r,C,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,a){var n=r.pstyle(a).value;switch(n){case"rectangle":return va;case"ellipse":return Wa;case"roundrectangle":case"round-rectangle":return Xn;case"bottom-round-rectangle":return Xa;default:return}}},{key:"_getCornerRadius",value:function(r,a,n){var i=n.w,o=n.h;if(r.pstyle(a).value==="auto")return Dr(i,o);var s=r.pstyle(a).pfValue,u=i/2,l=o/2;return Math.min(s,l,u)}},{key:"drawEdgeArrow",value:function(r,a,n){if(r.visible()){var i=r._private.rscratch,o,s,u;if(n==="source"?(o=i.arrowStartX,s=i.arrowStartY,u=i.srcArrowAngle):(o=i.arrowEndX,s=i.arrowEndY,u=i.tgtArrowAngle),!(isNaN(o)||o==null||isNaN(s)||s==null||isNaN(u)||u==null)){var l=r.pstyle(n+"-arrow-shape").value;if(l!=="none"){var f=r.pstyle(n+"-arrow-color").value,h=r.pstyle("opacity").value,v=r.pstyle("line-opacity").value,c=h*v,d=r.pstyle("width").pfValue,g=r.pstyle("arrow-scale").value,p=this.r.getArrowWidth(d,g),y=this.instanceCount,b=this.transformBuffer.getMatrixView(y);Pp(b),ai(b,b,[o,s]),bv(b,b,[p,p]),Fp(b,b,u),this.vertTypeBuffer.getView(y)[0]=Fs;var m=this.indexBuffer.getView(y);ca(a,m);var E=this.colorBuffer.getView(y);zr(f,c,E),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,a){if(r.visible()){var n=this._getEdgePoints(r);if(n){var i=r.pstyle("opacity").value,o=r.pstyle("line-opacity").value,s=r.pstyle("width").pfValue,u=r.pstyle("line-color").value,l=i*o;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var f=this.instanceCount;this.vertTypeBuffer.getView(f)[0]=_p;var h=this.indexBuffer.getView(f);ca(a,h);var v=this.colorBuffer.getView(f);zr(u,l,v);var c=this.lineWidthBuffer.getView(f);c[0]=s;var d=this.pointAPointBBuffer.getView(f);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var g=0;g<n.length-2;g+=2){var p=this.instanceCount;this.vertTypeBuffer.getView(p)[0]=Bp;var y=this.indexBuffer.getView(p);ca(a,y);var b=this.colorBuffer.getView(p);zr(u,l,b);var m=this.lineWidthBuffer.getView(p);m[0]=s;var E=n[g-2],T=n[g-1],L=n[g],w=n[g+1],C=n[g+2],A=n[g+3],R=n[g+4],S=n[g+5];g==0&&(E=2*L-C+.001,T=2*w-A+.001),g==n.length-4&&(R=2*C-L+.001,S=2*A-w+.001);var D=this.pointAPointBBuffer.getView(p);D[0]=E,D[1]=T,D[2]=L,D[3]=w;var P=this.pointCPointDBuffer.getView(p);P[0]=C,P[1]=A,P[2]=R,P[3]=S,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 n=a.allpts;if(n.length==4)return n;var i=this._getNumSegments(r);return this._getCurveSegmentPoints(n,i)}}},{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 n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=r[0],n[1]=r[1];else if(i==a)n[i*2]=r[r.length-2],n[i*2+1]=r[r.length-1];else{var o=i/a;this._setCurvePoint(r,o,n,i*2)}return n}},{key:"_setCurvePoint",value:function(r,a,n,i){if(r.length<=2)n[i]=r[0],n[i+1]=r[1];else{for(var o=Array(r.length-2),s=0;s<o.length;s+=2){var u=(1-a)*r[s]+a*r[s+2],l=(1-a)*r[s+1]+a*r[s+3];o[s]=u,o[s+1]=l}return this._setCurvePoint(o,a,n,i)}}},{key:"endBatch",value:function(){var r=this.gl,a=this.vao,n=this.vertexCount,i=this.instanceCount;if(i!==0){var o=this.renderTarget.picking?this.pickingProgram:this.program;r.useProgram(o),r.bindVertexArray(a);var s=Bt(this.buffers),u;try{for(s.s();!(u=s.n()).done;){var l=u.value;l.bufferSubData(i)}}catch(d){s.e(d)}finally{s.f()}for(var f=this.batchManager.getAtlases(),h=0;h<f.length;h++)f[h].bufferIfNeeded(r);for(var v=0;v<f.length;v++)r.activeTexture(r.TEXTURE0+v),r.bindTexture(r.TEXTURE_2D,f[v].texture),r.uniform1i(o.uTextures[v],v);r.uniform1f(o.uZoom,jS(this.r)),r.uniformMatrix3fv(o.uPanZoomMatrix,!1,this.panZoomMatrix),r.uniform1i(o.uAtlasSize,this.batchManager.getAtlasSize());var c=zr(this.bgColor,1);r.uniform4fv(o.uBGColor,c),r.drawArraysInstanced(r.TRIANGLES,0,n,i),r.bindVertexArray(null),r.bindTexture(r.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:i,atlasCount:f.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var r=this.atlasManager.getDebugInfo(),a=r.reduce(function(o,s){return o+s.atlasCount},0),n=this.batchDebugInfo,i=n.reduce(function(o,s){return o+s.count},0);return{atlasInfo:r,totalAtlases:a,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:n.length,batchInfo:n,totalInstances:i}}}])})(),$w={};$w.initWebgl=function(t,e){var r=this,a=r.data.contexts[r.WEBGL];t.bgColor=wD(r),t.webglTexSize=Math.min(t.webglTexSize,a.getParameter(a.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,a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,r.pickingFrameBuffer=uD(a),r.pickingFrameBuffer.needsDraw=!0,r.drawing=new ED(r,a,t);var n=function(h){return function(v){return r.getTextAngle(v,h)}},i=function(h){return function(v){var c=v.pstyle(h);return c&&c.value}},o=function(h){return function(v){return v.pstyle("".concat(h,"-opacity")).value>0}},s=function(h){var v=h.pstyle("text-events").strValue==="yes";return v?xi.USE_BB:xi.IGNORE},u=function(h){var v=h.position(),c=v.x,d=v.y,g=h.outerWidth(),p=h.outerHeight();return{w:g,h:p,x1:c-g/2,y1:d-p/2}};r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:u,isSimple:tD,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:u,isVisible:o("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:u,isVisible:o("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:_s(e.getLabelKey,null),getBoundingBox:Bs(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:_s(e.getSourceLabelKey,"source"),getBoundingBox:Bs(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:_s(e.getTargetLabelKey,"target"),getBoundingBox:Bs(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var l=bn(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(f,h){var v=!1;h&&h.length>0&&(v|=r.drawing.invalidate(h)),v&&l()}),TD(r)};function wD(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return wE(r)}function Kw(t,e){var r=t._private.rscratch;return Ft(r,"labelWrapCachedLines",e)||[]}var _s=function(e,r){return function(a){var n=e(a),i=Kw(a,r);return i.length>1?i.map(function(o,s){return"".concat(n,"_").concat(s)}):n}},Bs=function(e,r){return function(a,n){var i=e(a);if(typeof n=="string"){var o=n.indexOf("_");if(o>0){var s=Number(n.substring(o+1)),u=Kw(a,r),l=i.h/u.length,f=l*s,h=i.y1+f;return{x1:i.x1,w:i.w,y1:h,h:l,yOffset:f}}}return i}};function TD(t){{var e=t.render;t.render=function(i){i=i||{};var o=t.cy;t.webgl&&(o.zoom()>Uw?(xD(t),e.call(t,i)):(CD(t),Qw(t,i,rn.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(i){r.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,o,s,u){return ND(t,i,o)};{var a=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){a.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var n=t.notify;t.notify=function(i,o){n.call(t,i,o),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(o,{type:"node-body"})}}}function xD(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function CD(t){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,t.canvasWidth,t.canvasHeight),a.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function AD(t){var e=t.canvasWidth,r=t.canvasHeight,a=$v(t),n=a.pan,i=a.zoom,o=Is();ai(o,o,[n.x,n.y]),bv(o,o,[i,i]);var s=Is();fD(s,e,r);var u=Is();return lD(u,s,o),u}function Zw(t,e){var r=t.canvasWidth,a=t.canvasHeight,n=$v(t),i=n.pan,o=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,a),e.translate(i.x,i.y),e.scale(o,o)}function LD(t,e){t.drawSelectionRectangle(e,function(r){return Zw(t,r)})}function RD(t){var e=t.data.contexts[t.NODE];e.save(),Zw(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function SD(t){var e=function(n,i,o){for(var s=n.atlasManager.getAtlasCollection(i),u=t.data.contexts[t.NODE],l=s.atlases,f=0;f<l.length;f++){var h=l[f],v=h.canvas;if(v){var c=v.width,d=v.height,g=c*f,p=v.height*o,y=.4;u.save(),u.scale(y,y),u.drawImage(v,g,p),u.strokeStyle="black",u.rect(g,p,c,d),u.stroke(),u.restore()}}},r=0;e(t.drawing,"node",r++),e(t.drawing,"label",r++)}function DD(t,e,r,a,n){var i,o,s,u,l=$v(t),f=l.pan,h=l.zoom;{var v=eD(t,f,h,e,r),c=ht(v,2),d=c[0],g=c[1],p=6;i=d-p/2,o=g-p/2,s=p,u=p}if(s===0||u===0)return[];var y=t.data.contexts[t.WEBGL];y.bindFramebuffer(y.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(y.viewport(0,0,y.canvas.width,y.canvas.height),Qw(t,null,rn.PICKING),t.pickingFrameBuffer.needsDraw=!1);var b=s*u,m=new Uint8Array(b*4);y.readPixels(i,o,s,u,y.RGBA,y.UNSIGNED_BYTE,m),y.bindFramebuffer(y.FRAMEBUFFER,null);for(var E=new Set,T=0;T<b;T++){var L=m.slice(T*4,T*4+4),w=aD(L)-1;w>=0&&E.add(w)}return E}function ND(t,e,r){var a=DD(t,e,r),n=t.getCachedZSortedEles(),i,o,s=Bt(a),u;try{for(s.s();!(u=s.n()).done;){var l=u.value,f=n[l];if(!i&&f.isNode()&&(i=f),!o&&f.isEdge()&&(o=f),i&&o)break}}catch(h){s.e(h)}finally{s.f()}return[i,o].filter(Boolean)}function ks(t,e,r){var a=t.drawing;e+=1,r.isNode()?(a.drawNode(r,e,"node-underlay"),a.drawNode(r,e,"node-body"),a.drawTexture(r,e,"label"),a.drawNode(r,e,"node-overlay")):(a.drawEdgeLine(r,e),a.drawEdgeArrow(r,e,"source"),a.drawEdgeArrow(r,e,"target"),a.drawTexture(r,e,"label"),a.drawTexture(r,e,"edge-source-label"),a.drawTexture(r,e,"edge-target-label"))}function Qw(t,e,r){var a;t.webglDebug&&(a=performance.now());var n=t.drawing,i=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&LD(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var o=t.data.contexts[t.WEBGL];r.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=AD(t),u=t.getCachedZSortedEles();if(i=u.length,n.startFrame(s,r),r.screen){for(var l=0;l<u.nondrag.length;l++)ks(t,l,u.nondrag[l]);for(var f=0;f<u.drag.length;f++)ks(t,f,u.drag[f])}else if(r.picking)for(var h=0;h<u.length;h++)ks(t,h,u[h]);n.endFrame(),r.screen&&t.webglDebugShowAtlases&&(RD(t),SD(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var v=performance.now(),c=!1,d=Math.ceil(v-a),g=n.getDebugInfo(),p=["".concat(i," elements"),"".concat(g.totalInstances," instances"),"".concat(g.batchCount," batches"),"".concat(g.totalAtlases," atlases"),"".concat(g.wrappedCount," wrapped textures"),"".concat(g.simpleCount," simple shapes")].join(", ");if(c)console.log("WebGL (".concat(r.name,") - time ").concat(d,"ms, ").concat(p));else{console.log("WebGL (".concat(r.name,") - frame time ").concat(d,"ms")),console.log("Totals:"),console.log(" ".concat(p)),console.log("Texture Atlases Used:");var y=g.atlasInfo,b=Bt(y),m;try{for(b.s();!(m=b.n()).done;){var E=m.value;console.log(" ".concat(E.type,": ").concat(E.keyCount," keys, ").concat(E.atlasCount," atlases"))}}catch(T){b.e(T)}finally{b.f()}console.log("")}}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,n.gc())}var Br={};Br.drawPolygonPath=function(t,e,r,a,n,i){var o=a/2,s=n/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*i[0],r+s*i[1]);for(var u=1;u<i.length/2;u++)t.lineTo(e+o*i[u*2],r+s*i[u*2+1]);t.closePath()};Br.drawRoundPolygonPath=function(t,e,r,a,n,i,o){o.forEach(function(s){return Mw(t,s)}),t.closePath()};Br.drawRoundRectanglePath=function(t,e,r,a,n,i){var o=a/2,s=n/2,u=i==="auto"?Dr(a,n):Math.min(i,s,o);t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.arcTo(e+o,r-s,e+o,r,u),t.arcTo(e+o,r+s,e,r+s,u),t.arcTo(e-o,r+s,e-o,r,u),t.arcTo(e-o,r-s,e,r-s,u),t.lineTo(e,r-s),t.closePath()};Br.drawBottomRoundRectanglePath=function(t,e,r,a,n,i){var o=a/2,s=n/2,u=i==="auto"?Dr(a,n):i;t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.lineTo(e+o,r-s),t.lineTo(e+o,r),t.arcTo(e+o,r+s,e,r+s,u),t.arcTo(e-o,r+s,e-o,r,u),t.lineTo(e-o,r-s),t.lineTo(e,r-s),t.closePath()};Br.drawCutRectanglePath=function(t,e,r,a,n,i,o){var s=a/2,u=n/2,l=o==="auto"?Pv():o;t.beginPath&&t.beginPath(),t.moveTo(e-s+l,r-u),t.lineTo(e+s-l,r-u),t.lineTo(e+s,r-u+l),t.lineTo(e+s,r+u-l),t.lineTo(e+s-l,r+u),t.lineTo(e-s+l,r+u),t.lineTo(e-s,r+u-l),t.lineTo(e-s,r-u+l),t.closePath()};Br.drawBarrelPath=function(t,e,r,a,n){var i=a/2,o=n/2,s=e-i,u=e+i,l=r-o,f=r+o,h=iv(a,n),v=h.widthOffset,c=h.heightOffset,d=h.ctrlPtOffsetPct*v;t.beginPath&&t.beginPath(),t.moveTo(s,l+c),t.lineTo(s,f-c),t.quadraticCurveTo(s+d,f,s+v,f),t.lineTo(u-v,f),t.quadraticCurveTo(u-d,f,u,f-c),t.lineTo(u,l+c),t.quadraticCurveTo(u-d,l,u-v,l),t.lineTo(s+v,l),t.quadraticCurveTo(s+d,l,s,l+c),t.closePath()};var kp=Math.sin(0),qp=Math.cos(0),Ev={},wv={},Jw=Math.PI/40;for(var da=0*Math.PI;da<2*Math.PI;da+=Jw)Ev[da]=Math.sin(da),wv[da]=Math.cos(da);Br.drawEllipsePath=function(t,e,r,a,n){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,a/2,n/2,0,0,2*Math.PI);else for(var i,o,s=a/2,u=n/2,l=0*Math.PI;l<2*Math.PI;l+=Jw)i=e-s*Ev[l]*kp+s*wv[l]*qp,o=r+u*wv[l]*kp+u*Ev[l]*qp,l===0?t.moveTo(i,o):t.lineTo(i,o);t.closePath()};var An={};An.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]};An.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),a=r.boundingBox(),n=this.findContainerClientCoords(),i=t.full?Math.ceil(a.w):n[2],o=t.full?Math.ceil(a.h):n[3],s=Ee(t.maxWidth)||Ee(t.maxHeight),u=this.getPixelRatio(),l=1;if(t.scale!==void 0)i*=t.scale,o*=t.scale,l=t.scale;else if(s){var f=1/0,h=1/0;Ee(t.maxWidth)&&(f=l*t.maxWidth/i),Ee(t.maxHeight)&&(h=l*t.maxHeight/o),l=Math.min(f,h),i*=l,o*=l}s||(i*=u,o*=u,l*=u);var v=document.createElement("canvas");v.width=i,v.height=o,v.style.width=i+"px",v.style.height=o+"px";var c=v.getContext("2d");if(i>0&&o>0){c.clearRect(0,0,i,o),c.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(t.full)c.translate(-a.x1*l,-a.y1*l),c.scale(l,l),this.drawElements(c,d),c.scale(1/l,1/l),c.translate(a.x1*l,a.y1*l);else{var g=e.pan(),p={x:g.x*l,y:g.y*l};l*=e.zoom(),c.translate(p.x,p.y),c.scale(l,l),this.drawElements(c,d),c.scale(1/l,1/l),c.translate(-p.x,-p.y)}t.bg&&(c.globalCompositeOperation="destination-over",c.fillStyle=t.bg,c.rect(0,0,i,o),c.fill())}return v};function MD(t,e){for(var r=atob(t),a=new ArrayBuffer(r.length),n=new Uint8Array(a),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new Blob([a],{type:e})}function Gp(t){var e=t.indexOf(",");return t.substr(e+1)}function jw(t,e,r){var a=function(){return e.toDataURL(r,t.quality)};switch(t.output){case"blob-promise":return new Sa(function(n,i){try{e.toBlob(function(o){o!=null?n(o):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(o){i(o)}});case"blob":return MD(Gp(a()),r);case"base64":return Gp(a());case"base64uri":default:return a()}}An.png=function(t){return jw(t,this.bufferCanvasImage(t),"image/png")};An.jpg=function(t){return jw(t,this.bufferCanvasImage(t),"image/jpeg")};var eT={};eT.nodeShapeImpl=function(t,e,r,a,n,i,o,s){switch(t){case"ellipse":return this.drawEllipsePath(e,r,a,n,i);case"polygon":return this.drawPolygonPath(e,r,a,n,i,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,a,n,i,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,a,n,i,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,a,n,i,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,a,n,i,s);case"barrel":return this.drawBarrelPath(e,r,a,n,i)}};var OD=tT,Ge=tT.prototype;Ge.CANVAS_LAYERS=3;Ge.SELECT_BOX=0;Ge.DRAG=1;Ge.NODE=2;Ge.WEBGL=3;Ge.CANVAS_TYPES=["2d","2d","2d","webgl2"];Ge.BUFFER_COUNT=3;Ge.TEXTURE_BUFFER=0;Ge.MOTIONBLUR_BUFFER_NODE=1;Ge.MOTIONBLUR_BUFFER_DRAG=2;function tT(t){var e=this,r=e.cy.window(),a=r.document;t.webgl&&(Ge.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(Ge.CANVAS_LAYERS),contexts:new Array(Ge.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Ge.CANVAS_LAYERS),bufferCanvases:new Array(Ge.BUFFER_COUNT),bufferContexts:new Array(Ge.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=a.createElement("div");var o=e.data.canvasContainer.style;e.data.canvasContainer.style[n]=i,o.position="relative",o.zIndex="0",o.overflow="hidden";var s=t.cy.container();s.appendChild(e.data.canvasContainer),s.style[n]=i;var u={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};Cx()&&(u["-ms-touch-action"]="none",u["touch-action"]="none");for(var l=0;l<Ge.CANVAS_LAYERS;l++){var f=e.data.canvases[l]=a.createElement("canvas"),h=Ge.CANVAS_TYPES[l];e.data.contexts[l]=f.getContext(h),e.data.contexts[l]||nt("Could not create canvas of type "+h),Object.keys(u).forEach(function(H){f.style[H]=u[H]}),f.style.position="absolute",f.setAttribute("data-id","layer"+l),f.style.zIndex=String(Ge.CANVAS_LAYERS-l),e.data.canvasContainer.appendChild(f),e.data.canvasNeedsRedraw[l]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Ge.NODE].setAttribute("data-id","layer"+Ge.NODE+"-node"),e.data.canvases[Ge.SELECT_BOX].setAttribute("data-id","layer"+Ge.SELECT_BOX+"-selectbox"),e.data.canvases[Ge.DRAG].setAttribute("data-id","layer"+Ge.DRAG+"-drag"),e.data.canvases[Ge.WEBGL]&&e.data.canvases[Ge.WEBGL].setAttribute("data-id","layer"+Ge.WEBGL+"-webgl");for(var l=0;l<Ge.BUFFER_COUNT;l++)e.data.bufferCanvases[l]=a.createElement("canvas"),e.data.bufferContexts[l]=e.data.bufferCanvases[l].getContext("2d"),e.data.bufferCanvases[l].style.position="absolute",e.data.bufferCanvases[l].setAttribute("data-id","buffer"+l),e.data.bufferCanvases[l].style.zIndex=String(-l-1),e.data.bufferCanvases[l].style.visibility="hidden";e.pathsEnabled=!0;var v=Ot(),c=function(Y){return{x:(Y.x1+Y.x2)/2,y:(Y.y1+Y.y2)/2}},d=function(Y){return{x:-Y.w/2,y:-Y.h/2}},g=function(Y){var $=Y[0]._private,Q=$.oldBackgroundTimestamp===$.backgroundTimestamp;return!Q},p=function(Y){return Y[0]._private.nodeKey},y=function(Y){return Y[0]._private.labelStyleKey},b=function(Y){return Y[0]._private.sourceLabelStyleKey},m=function(Y){return Y[0]._private.targetLabelStyleKey},E=function(Y,$,Q,ee,te){return e.drawElement(Y,$,Q,!1,!1,te)},T=function(Y,$,Q,ee,te){return e.drawElementText(Y,$,Q,ee,"main",te)},L=function(Y,$,Q,ee,te){return e.drawElementText(Y,$,Q,ee,"source",te)},w=function(Y,$,Q,ee,te){return e.drawElementText(Y,$,Q,ee,"target",te)},C=function(Y){return Y.boundingBox(),Y[0]._private.bodyBounds},A=function(Y){return Y.boundingBox(),Y[0]._private.labelBounds.main||v},R=function(Y){return Y.boundingBox(),Y[0]._private.labelBounds.source||v},S=function(Y){return Y.boundingBox(),Y[0]._private.labelBounds.target||v},D=function(Y,$){return $},P=function(Y){return c(C(Y))},x=function(Y,$,Q){var ee=Y?Y+"-":"";return{x:$.x+Q.pstyle(ee+"text-margin-x").pfValue,y:$.y+Q.pstyle(ee+"text-margin-y").pfValue}},N=function(Y,$,Q){var ee=Y[0]._private.rscratch;return{x:ee[$],y:ee[Q]}},M=function(Y){return x("",N(Y,"labelX","labelY"),Y)},I=function(Y){return x("source",N(Y,"sourceLabelX","sourceLabelY"),Y)},O=function(Y){return x("target",N(Y,"targetLabelX","targetLabelY"),Y)},k=function(Y){return d(C(Y))},F=function(Y){return d(R(Y))},_=function(Y){return d(S(Y))},z=function(Y){var $=A(Y),Q=d(A(Y));if(Y.isNode()){switch(Y.pstyle("text-halign").value){case"left":Q.x=-$.w-($.leftPad||0);break;case"right":Q.x=-($.rightPad||0);break}switch(Y.pstyle("text-valign").value){case"top":Q.y=-$.h-($.topPad||0);break;case"bottom":Q.y=-($.botPad||0);break}}return Q},X=e.data.eleTxrCache=new Za(e,{getKey:p,doesEleInvalidateKey:g,drawElement:E,getBoundingBox:C,getRotationPoint:P,getRotationOffset:k,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),q=e.data.lblTxrCache=new Za(e,{getKey:y,drawElement:T,getBoundingBox:A,getRotationPoint:M,getRotationOffset:z,isVisible:D}),G=e.data.slbTxrCache=new Za(e,{getKey:b,drawElement:L,getBoundingBox:R,getRotationPoint:I,getRotationOffset:F,isVisible:D}),U=e.data.tlbTxrCache=new Za(e,{getKey:m,drawElement:w,getBoundingBox:S,getRotationPoint:O,getRotationOffset:_,isVisible:D}),K=e.data.lyrTxrCache=new zw(e);e.onUpdateEleCalcs(function(Y,$){X.invalidateElements($),q.invalidateElements($),G.invalidateElements($),U.invalidateElements($),K.invalidateElements($);for(var Q=0;Q<$.length;Q++){var ee=$[Q]._private;ee.oldBackgroundTimestamp=ee.backgroundTimestamp}});var J=function(Y){for(var $=0;$<Y.length;$++)K.enqueueElementRefinement(Y[$].ele)};X.onDequeue(J),q.onDequeue(J),G.onDequeue(J),U.onDequeue(J),t.webgl&&e.initWebgl(t,{getStyleKey:p,getLabelKey:y,getSourceLabelKey:b,getTargetLabelKey:m,drawElement:E,drawLabel:T,drawSourceLabel:L,drawTargetLabel:w,getElementBox:C,getLabelBox:A,getSourceLabelBox:R,getTargetLabelBox:S,getElementRotationPoint:P,getElementRotationOffset:k,getLabelRotationPoint:M,getSourceLabelRotationPoint:I,getTargetLabelRotationPoint:O,getLabelRotationOffset:z,getSourceLabelRotationOffset:F,getTargetLabelRotationOffset:_})}Ge.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Ge.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Ge.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Ge.SELECT_BOX]=e;break;case"gc":r.data.gc=!0;break}};var ID=typeof Path2D<"u";Ge.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};Ge.usePaths=function(){return ID&&this.pathsEnabled};Ge.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};Ge.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};Ge.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":pt(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var a=this.cy.window(),n=a.document;r=n.createElement("canvas"),r.width=t,r.height=e}return r};[Vw,ir,dr,Wv,ea,_r,It,$w,Br,An,eT].forEach(function(t){_e(Ge,t)});var PD=[{name:"null",impl:Sw},{name:"base",impl:qw},{name:"canvas",impl:OD}],FD=[{type:"layout",extensions:nS},{type:"renderer",extensions:PD}],rT={},aT={};function nT(t,e,r){var a=r,n=function(C){Ke("Can not register `"+e+"` for `"+t+"` since `"+C+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(cn.prototype[e])return n(e);cn.prototype[e]=r}else if(t==="collection"){if(Ct.prototype[e])return n(e);Ct.prototype[e]=r}else if(t==="layout"){for(var i=function(C){this.options=C,r.call(this,C),He(this._private)||(this._private={}),this._private.cy=C.cy,this._private.listeners=[],this.createEmitter()},o=i.prototype=Object.create(r.prototype),s=[],u=0;u<s.length;u++){var l=s[u];o[l]=o[l]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var f=r.prototype.stop;o.stop=function(){var w=this.options;if(w&&w.animate){var C=this.animations;if(C)for(var A=0;A<C.length;A++)C[A].stop()}return f?f.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var h=function(C){return C._private.cy},v={addEventFields:function(C,A){A.layout=C,A.cy=h(C),A.target=C},bubble:function(){return!0},parent:function(C){return h(C)}};_e(o,{createEmitter:function(){return this._private.emitter=new _i(v,this),this},emitter:function(){return this._private.emitter},on:function(C,A){return this.emitter().on(C,A),this},one:function(C,A){return this.emitter().one(C,A),this},once:function(C,A){return this.emitter().one(C,A),this},removeListener:function(C,A){return this.emitter().removeListener(C,A),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(C,A){return this.emitter().emit(C,A),this}}),$e.eventAliasesOn(o),a=i}else if(t==="renderer"&&e!=="null"&&e!=="base"){var c=iT("renderer","base"),d=c.prototype,g=r,p=r.prototype,y=function(){c.apply(this,arguments),g.apply(this,arguments)},b=y.prototype;for(var m in d){var E=d[m],T=p[m]!=null;if(T)return n(m);b[m]=E}for(var L in p)b[L]=p[L];d.clientFunctions.forEach(function(w){b[w]=b[w]||function(){nt("Renderer does not implement `renderer."+w+"()` on its prototype")}}),a=y}else if(t==="__proto__"||t==="constructor"||t==="prototype")return nt(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return TE({map:rT,keys:[t,e],value:a})}function iT(t,e){return xE({map:rT,keys:[t,e]})}function _D(t,e,r,a,n){return TE({map:aT,keys:[t,e,r,a],value:n})}function BD(t,e,r,a){return xE({map:aT,keys:[t,e,r,a]})}var Tv=function(){if(arguments.length===2)return iT.apply(null,arguments);if(arguments.length===3)return nT.apply(null,arguments);if(arguments.length===4)return BD.apply(null,arguments);if(arguments.length===5)return _D.apply(null,arguments);nt("Invalid extension access syntax")};cn.prototype.extension=Tv;FD.forEach(function(t){t.extensions.forEach(function(e){nT(t.type,e.name,e.impl)})});var Ci=function(){if(!(this instanceof Ci))return new Ci;this.length=0},Jr=Ci.prototype;Jr.instanceString=function(){return"stylesheet"};Jr.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};Jr.css=function(t,e){var r=this.length-1;if(Oe(t))this[r].properties.push({name:t,value:e});else if(He(t))for(var a=t,n=Object.keys(a),i=0;i<n.length;i++){var o=n[i],s=a[o];if(s!=null){var u=wt.properties[o]||wt.properties[Li(o)];if(u!=null){var l=u.name,f=s;this[r].properties.push({name:l,value:f})}}}return this};Jr.style=Jr.css;Jr.generateStyle=function(t){var e=new wt(t);return this.appendToStyle(e)};Jr.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],a=r.selector,n=r.properties;t.selector(a);for(var i=0;i<n.length;i++){var o=n[i];t.css(o.name,o.value)}}return t};var kD="3.33.4",La=function(e){if(e===void 0&&(e={}),He(e))return new cn(e);if(Oe(e))return Tv.apply(Tv,arguments)};La.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(La),t.apply(null,e),this};La.warnings=function(t){return NE(t)};La.version=kD;La.stylesheet=La.Stylesheet=Ci;var ni={exports:{}};function Kv(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 qs,Up;function qD(){if(Up)return qs;Up=1;function t(){this.__data__=[],this.size=0}return qs=t,qs}var Gs,zp;function Ia(){if(zp)return Gs;zp=1;function t(e,r){return e===r||e!==e&&r!==r}return Gs=t,Gs}var Us,Vp;function Yi(){if(Vp)return Us;Vp=1;var t=Ia();function e(r,a){for(var n=r.length;n--;)if(t(r[n][0],a))return n;return-1}return Us=e,Us}var zs,Yp;function GD(){if(Yp)return zs;Yp=1;var t=Yi(),e=Array.prototype,r=e.splice;function a(n){var i=this.__data__,o=t(i,n);if(o<0)return!1;var s=i.length-1;return o==s?i.pop():r.call(i,o,1),--this.size,!0}return zs=a,zs}var Vs,Hp;function UD(){if(Hp)return Vs;Hp=1;var t=Yi();function e(r){var a=this.__data__,n=t(a,r);return n<0?void 0:a[n][1]}return Vs=e,Vs}var Ys,Xp;function zD(){if(Xp)return Ys;Xp=1;var t=Yi();function e(r){return t(this.__data__,r)>-1}return Ys=e,Ys}var Hs,Wp;function VD(){if(Wp)return Hs;Wp=1;var t=Yi();function e(r,a){var n=this.__data__,i=t(n,r);return i<0?(++this.size,n.push([r,a])):n[i][1]=a,this}return Hs=e,Hs}var Xs,$p;function Hi(){if($p)return Xs;$p=1;var t=qD(),e=GD(),r=UD(),a=zD(),n=VD();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=a,i.prototype.set=n,Xs=i,Xs}var Ws,Kp;function YD(){if(Kp)return Ws;Kp=1;var t=Hi();function e(){this.__data__=new t,this.size=0}return Ws=e,Ws}var $s,Zp;function HD(){if(Zp)return $s;Zp=1;function t(e){var r=this.__data__,a=r.delete(e);return this.size=r.size,a}return $s=t,$s}var Ks,Qp;function XD(){if(Qp)return Ks;Qp=1;function t(e){return this.__data__.get(e)}return Ks=t,Ks}var Zs,Jp;function WD(){if(Jp)return Zs;Jp=1;function t(e){return this.__data__.has(e)}return Zs=t,Zs}var Qs,jp;function oT(){if(jp)return Qs;jp=1;var t=typeof In=="object"&&In&&In.Object===Object&&In;return Qs=t,Qs}var Js,ey;function Jt(){if(ey)return Js;ey=1;var t=oT(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return Js=r,Js}var js,ty;function Pa(){if(ty)return js;ty=1;var t=Jt(),e=t.Symbol;return js=e,js}var eu,ry;function $D(){if(ry)return eu;ry=1;var t=Pa(),e=Object.prototype,r=e.hasOwnProperty,a=e.toString,n=t?t.toStringTag:void 0;function i(o){var s=r.call(o,n),u=o[n];try{o[n]=void 0;var l=!0}catch{}var f=a.call(o);return l&&(s?o[n]=u:delete o[n]),f}return eu=i,eu}var tu,ay;function KD(){if(ay)return tu;ay=1;var t=Object.prototype,e=t.toString;function r(a){return e.call(a)}return tu=r,tu}var ru,ny;function ta(){if(ny)return ru;ny=1;var t=Pa(),e=$D(),r=KD(),a="[object Null]",n="[object Undefined]",i=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?n:a:i&&i in Object(s)?e(s):r(s)}return ru=o,ru}var au,iy;function Yt(){if(iy)return au;iy=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return au=t,au}var nu,oy;function Ln(){if(oy)return nu;oy=1;var t=ta(),e=Yt(),r="[object AsyncFunction]",a="[object Function]",n="[object GeneratorFunction]",i="[object Proxy]";function o(s){if(!e(s))return!1;var u=t(s);return u==a||u==n||u==r||u==i}return nu=o,nu}var iu,sy;function ZD(){if(sy)return iu;sy=1;var t=Jt(),e=t["__core-js_shared__"];return iu=e,iu}var ou,uy;function QD(){if(uy)return ou;uy=1;var t=ZD(),e=(function(){var a=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function r(a){return!!e&&e in a}return ou=r,ou}var su,ly;function sT(){if(ly)return su;ly=1;var t=Function.prototype,e=t.toString;function r(a){if(a!=null){try{return e.call(a)}catch{}try{return a+""}catch{}}return""}return su=r,su}var uu,fy;function JD(){if(fy)return uu;fy=1;var t=Ln(),e=QD(),r=Yt(),a=sT(),n=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,l=s.hasOwnProperty,f=RegExp("^"+u.call(l).replace(n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(v){if(!r(v)||e(v))return!1;var c=t(v)?f:i;return c.test(a(v))}return uu=h,uu}var lu,hy;function jD(){if(hy)return lu;hy=1;function t(e,r){return e==null?void 0:e[r]}return lu=t,lu}var fu,cy;function ra(){if(cy)return fu;cy=1;var t=JD(),e=jD();function r(a,n){var i=e(a,n);return t(i)?i:void 0}return fu=r,fu}var hu,vy;function Zv(){if(vy)return hu;vy=1;var t=ra(),e=Jt(),r=t(e,"Map");return hu=r,hu}var cu,dy;function Xi(){if(dy)return cu;dy=1;var t=ra(),e=t(Object,"create");return cu=e,cu}var vu,gy;function eN(){if(gy)return vu;gy=1;var t=Xi();function e(){this.__data__=t?t(null):{},this.size=0}return vu=e,vu}var du,py;function tN(){if(py)return du;py=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return du=t,du}var gu,yy;function rN(){if(yy)return gu;yy=1;var t=Xi(),e="__lodash_hash_undefined__",r=Object.prototype,a=r.hasOwnProperty;function n(i){var o=this.__data__;if(t){var s=o[i];return s===e?void 0:s}return a.call(o,i)?o[i]:void 0}return gu=n,gu}var pu,my;function aN(){if(my)return pu;my=1;var t=Xi(),e=Object.prototype,r=e.hasOwnProperty;function a(n){var i=this.__data__;return t?i[n]!==void 0:r.call(i,n)}return pu=a,pu}var yu,by;function nN(){if(by)return yu;by=1;var t=Xi(),e="__lodash_hash_undefined__";function r(a,n){var i=this.__data__;return this.size+=this.has(a)?0:1,i[a]=t&&n===void 0?e:n,this}return yu=r,yu}var mu,Ey;function iN(){if(Ey)return mu;Ey=1;var t=eN(),e=tN(),r=rN(),a=aN(),n=nN();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=a,i.prototype.set=n,mu=i,mu}var bu,wy;function oN(){if(wy)return bu;wy=1;var t=iN(),e=Hi(),r=Zv();function a(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return bu=a,bu}var Eu,Ty;function sN(){if(Ty)return Eu;Ty=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Eu=t,Eu}var wu,xy;function Wi(){if(xy)return wu;xy=1;var t=sN();function e(r,a){var n=r.__data__;return t(a)?n[typeof a=="string"?"string":"hash"]:n.map}return wu=e,wu}var Tu,Cy;function uN(){if(Cy)return Tu;Cy=1;var t=Wi();function e(r){var a=t(this,r).delete(r);return this.size-=a?1:0,a}return Tu=e,Tu}var xu,Ay;function lN(){if(Ay)return xu;Ay=1;var t=Wi();function e(r){return t(this,r).get(r)}return xu=e,xu}var Cu,Ly;function fN(){if(Ly)return Cu;Ly=1;var t=Wi();function e(r){return t(this,r).has(r)}return Cu=e,Cu}var Au,Ry;function hN(){if(Ry)return Au;Ry=1;var t=Wi();function e(r,a){var n=t(this,r),i=n.size;return n.set(r,a),this.size+=n.size==i?0:1,this}return Au=e,Au}var Lu,Sy;function Qv(){if(Sy)return Lu;Sy=1;var t=oN(),e=uN(),r=lN(),a=fN(),n=hN();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=a,i.prototype.set=n,Lu=i,Lu}var Ru,Dy;function cN(){if(Dy)return Ru;Dy=1;var t=Hi(),e=Zv(),r=Qv(),a=200;function n(i,o){var s=this.__data__;if(s instanceof t){var u=s.__data__;if(!e||u.length<a-1)return u.push([i,o]),this.size=++s.size,this;s=this.__data__=new r(u)}return s.set(i,o),this.size=s.size,this}return Ru=n,Ru}var Su,Ny;function $i(){if(Ny)return Su;Ny=1;var t=Hi(),e=YD(),r=HD(),a=XD(),n=WD(),i=cN();function o(s){var u=this.__data__=new t(s);this.size=u.size}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=a,o.prototype.has=n,o.prototype.set=i,Su=o,Su}var Du,My;function Jv(){if(My)return Du;My=1;function t(e,r){for(var a=-1,n=e==null?0:e.length;++a<n&&r(e[a],a,e)!==!1;);return e}return Du=t,Du}var Nu,Oy;function uT(){if(Oy)return Nu;Oy=1;var t=ra(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Nu=e,Nu}var Mu,Iy;function Ki(){if(Iy)return Mu;Iy=1;var t=uT();function e(r,a,n){a=="__proto__"&&t?t(r,a,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[a]=n}return Mu=e,Mu}var Ou,Py;function Zi(){if(Py)return Ou;Py=1;var t=Ki(),e=Ia(),r=Object.prototype,a=r.hasOwnProperty;function n(i,o,s){var u=i[o];(!(a.call(i,o)&&e(u,s))||s===void 0&&!(o in i))&&t(i,o,s)}return Ou=n,Ou}var Iu,Fy;function Rn(){if(Fy)return Iu;Fy=1;var t=Zi(),e=Ki();function r(a,n,i,o){var s=!i;i||(i={});for(var u=-1,l=n.length;++u<l;){var f=n[u],h=o?o(i[f],a[f],f,i,a):void 0;h===void 0&&(h=a[f]),s?e(i,f,h):t(i,f,h)}return i}return Iu=r,Iu}var Pu,_y;function vN(){if(_y)return Pu;_y=1;function t(e,r){for(var a=-1,n=Array(e);++a<e;)n[a]=r(a);return n}return Pu=t,Pu}var Fu,By;function or(){if(By)return Fu;By=1;function t(e){return e!=null&&typeof e=="object"}return Fu=t,Fu}var _u,ky;function dN(){if(ky)return _u;ky=1;var t=ta(),e=or(),r="[object Arguments]";function a(n){return e(n)&&t(n)==r}return _u=a,_u}var Bu,qy;function Sn(){if(qy)return Bu;qy=1;var t=dN(),e=or(),r=Object.prototype,a=r.hasOwnProperty,n=r.propertyIsEnumerable,i=t((function(){return arguments})())?t:function(o){return e(o)&&a.call(o,"callee")&&!n.call(o,"callee")};return Bu=i,Bu}var ku,Gy;function ct(){if(Gy)return ku;Gy=1;var t=Array.isArray;return ku=t,ku}var Qa={exports:{}},qu,Uy;function gN(){if(Uy)return qu;Uy=1;function t(){return!1}return qu=t,qu}Qa.exports;var zy;function Fa(){return zy||(zy=1,(function(t,e){var r=Jt(),a=gN(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===n,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,l=u||a;t.exports=l})(Qa,Qa.exports)),Qa.exports}var Gu,Vy;function Qi(){if(Vy)return Gu;Vy=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(a,n){var i=typeof a;return n=n??t,!!n&&(i=="number"||i!="symbol"&&e.test(a))&&a>-1&&a%1==0&&a<n}return Gu=r,Gu}var Uu,Yy;function jv(){if(Yy)return Uu;Yy=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Uu=e,Uu}var zu,Hy;function pN(){if(Hy)return zu;Hy=1;var t=ta(),e=jv(),r=or(),a="[object Arguments]",n="[object Array]",i="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",l="[object Map]",f="[object Number]",h="[object Object]",v="[object RegExp]",c="[object Set]",d="[object String]",g="[object WeakMap]",p="[object ArrayBuffer]",y="[object DataView]",b="[object Float32Array]",m="[object Float64Array]",E="[object Int8Array]",T="[object Int16Array]",L="[object Int32Array]",w="[object Uint8Array]",C="[object Uint8ClampedArray]",A="[object Uint16Array]",R="[object Uint32Array]",S={};S[b]=S[m]=S[E]=S[T]=S[L]=S[w]=S[C]=S[A]=S[R]=!0,S[a]=S[n]=S[p]=S[i]=S[y]=S[o]=S[s]=S[u]=S[l]=S[f]=S[h]=S[v]=S[c]=S[d]=S[g]=!1;function D(P){return r(P)&&e(P.length)&&!!S[t(P)]}return zu=D,zu}var Vu,Xy;function Ji(){if(Xy)return Vu;Xy=1;function t(e){return function(r){return e(r)}}return Vu=t,Vu}var Ja={exports:{}};Ja.exports;var Wy;function ed(){return Wy||(Wy=1,(function(t,e){var r=oT(),a=e&&!e.nodeType&&e,n=a&&!0&&t&&!t.nodeType&&t,i=n&&n.exports===a,o=i&&r.process,s=(function(){try{var u=n&&n.require&&n.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();t.exports=s})(Ja,Ja.exports)),Ja.exports}var Yu,$y;function Dn(){if($y)return Yu;$y=1;var t=pN(),e=Ji(),r=ed(),a=r&&r.isTypedArray,n=a?e(a):t;return Yu=n,Yu}var Hu,Ky;function lT(){if(Ky)return Hu;Ky=1;var t=vN(),e=Sn(),r=ct(),a=Fa(),n=Qi(),i=Dn(),o=Object.prototype,s=o.hasOwnProperty;function u(l,f){var h=r(l),v=!h&&e(l),c=!h&&!v&&a(l),d=!h&&!v&&!c&&i(l),g=h||v||c||d,p=g?t(l.length,String):[],y=p.length;for(var b in l)(f||s.call(l,b))&&!(g&&(b=="length"||c&&(b=="offset"||b=="parent")||d&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||n(b,y)))&&p.push(b);return p}return Hu=u,Hu}var Xu,Zy;function ji(){if(Zy)return Xu;Zy=1;var t=Object.prototype;function e(r){var a=r&&r.constructor,n=typeof a=="function"&&a.prototype||t;return r===n}return Xu=e,Xu}var Wu,Qy;function fT(){if(Qy)return Wu;Qy=1;function t(e,r){return function(a){return e(r(a))}}return Wu=t,Wu}var $u,Jy;function yN(){if(Jy)return $u;Jy=1;var t=fT(),e=t(Object.keys,Object);return $u=e,$u}var Ku,jy;function td(){if(jy)return Ku;jy=1;var t=ji(),e=yN(),r=Object.prototype,a=r.hasOwnProperty;function n(i){if(!t(i))return e(i);var o=[];for(var s in Object(i))a.call(i,s)&&s!="constructor"&&o.push(s);return o}return Ku=n,Ku}var Zu,em;function gr(){if(em)return Zu;em=1;var t=Ln(),e=jv();function r(a){return a!=null&&e(a.length)&&!t(a)}return Zu=r,Zu}var Qu,tm;function kr(){if(tm)return Qu;tm=1;var t=lT(),e=td(),r=gr();function a(n){return r(n)?t(n):e(n)}return Qu=a,Qu}var Ju,rm;function mN(){if(rm)return Ju;rm=1;var t=Rn(),e=kr();function r(a,n){return a&&t(n,e(n),a)}return Ju=r,Ju}var ju,am;function bN(){if(am)return ju;am=1;function t(e){var r=[];if(e!=null)for(var a in Object(e))r.push(a);return r}return ju=t,ju}var el,nm;function EN(){if(nm)return el;nm=1;var t=Yt(),e=ji(),r=bN(),a=Object.prototype,n=a.hasOwnProperty;function i(o){if(!t(o))return r(o);var s=e(o),u=[];for(var l in o)l=="constructor"&&(s||!n.call(o,l))||u.push(l);return u}return el=i,el}var tl,im;function aa(){if(im)return tl;im=1;var t=lT(),e=EN(),r=gr();function a(n){return r(n)?t(n,!0):e(n)}return tl=a,tl}var rl,om;function wN(){if(om)return rl;om=1;var t=Rn(),e=aa();function r(a,n){return a&&t(n,e(n),a)}return rl=r,rl}var ja={exports:{}};ja.exports;var sm;function hT(){return sm||(sm=1,(function(t,e){var r=Jt(),a=e&&!e.nodeType&&e,n=a&&!0&&t&&!t.nodeType&&t,i=n&&n.exports===a,o=i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,f){if(f)return l.slice();var h=l.length,v=s?s(h):new l.constructor(h);return l.copy(v),v}t.exports=u})(ja,ja.exports)),ja.exports}var al,um;function cT(){if(um)return al;um=1;function t(e,r){var a=-1,n=e.length;for(r||(r=Array(n));++a<n;)r[a]=e[a];return r}return al=t,al}var nl,lm;function vT(){if(lm)return nl;lm=1;function t(e,r){for(var a=-1,n=e==null?0:e.length,i=0,o=[];++a<n;){var s=e[a];r(s,a,e)&&(o[i++]=s)}return o}return nl=t,nl}var il,fm;function dT(){if(fm)return il;fm=1;function t(){return[]}return il=t,il}var ol,hm;function rd(){if(hm)return ol;hm=1;var t=vT(),e=dT(),r=Object.prototype,a=r.propertyIsEnumerable,n=Object.getOwnPropertySymbols,i=n?function(o){return o==null?[]:(o=Object(o),t(n(o),function(s){return a.call(o,s)}))}:e;return ol=i,ol}var sl,cm;function TN(){if(cm)return sl;cm=1;var t=Rn(),e=rd();function r(a,n){return t(a,e(a),n)}return sl=r,sl}var ul,vm;function ad(){if(vm)return ul;vm=1;function t(e,r){for(var a=-1,n=r.length,i=e.length;++a<n;)e[i+a]=r[a];return e}return ul=t,ul}var ll,dm;function eo(){if(dm)return ll;dm=1;var t=fT(),e=t(Object.getPrototypeOf,Object);return ll=e,ll}var fl,gm;function gT(){if(gm)return fl;gm=1;var t=ad(),e=eo(),r=rd(),a=dT(),n=Object.getOwnPropertySymbols,i=n?function(o){for(var s=[];o;)t(s,r(o)),o=e(o);return s}:a;return fl=i,fl}var hl,pm;function xN(){if(pm)return hl;pm=1;var t=Rn(),e=gT();function r(a,n){return t(a,e(a),n)}return hl=r,hl}var cl,ym;function pT(){if(ym)return cl;ym=1;var t=ad(),e=ct();function r(a,n,i){var o=n(a);return e(a)?o:t(o,i(a))}return cl=r,cl}var vl,mm;function yT(){if(mm)return vl;mm=1;var t=pT(),e=rd(),r=kr();function a(n){return t(n,r,e)}return vl=a,vl}var dl,bm;function CN(){if(bm)return dl;bm=1;var t=pT(),e=gT(),r=aa();function a(n){return t(n,r,e)}return dl=a,dl}var gl,Em;function AN(){if(Em)return gl;Em=1;var t=ra(),e=Jt(),r=t(e,"DataView");return gl=r,gl}var pl,wm;function LN(){if(wm)return pl;wm=1;var t=ra(),e=Jt(),r=t(e,"Promise");return pl=r,pl}var yl,Tm;function mT(){if(Tm)return yl;Tm=1;var t=ra(),e=Jt(),r=t(e,"Set");return yl=r,yl}var ml,xm;function RN(){if(xm)return ml;xm=1;var t=ra(),e=Jt(),r=t(e,"WeakMap");return ml=r,ml}var bl,Cm;function _a(){if(Cm)return bl;Cm=1;var t=AN(),e=Zv(),r=LN(),a=mT(),n=RN(),i=ta(),o=sT(),s="[object Map]",u="[object Object]",l="[object Promise]",f="[object Set]",h="[object WeakMap]",v="[object DataView]",c=o(t),d=o(e),g=o(r),p=o(a),y=o(n),b=i;return(t&&b(new t(new ArrayBuffer(1)))!=v||e&&b(new e)!=s||r&&b(r.resolve())!=l||a&&b(new a)!=f||n&&b(new n)!=h)&&(b=function(m){var E=i(m),T=E==u?m.constructor:void 0,L=T?o(T):"";if(L)switch(L){case c:return v;case d:return s;case g:return l;case p:return f;case y:return h}return E}),bl=b,bl}var El,Am;function SN(){if(Am)return El;Am=1;var t=Object.prototype,e=t.hasOwnProperty;function r(a){var n=a.length,i=new a.constructor(n);return n&&typeof a[0]=="string"&&e.call(a,"index")&&(i.index=a.index,i.input=a.input),i}return El=r,El}var wl,Lm;function bT(){if(Lm)return wl;Lm=1;var t=Jt(),e=t.Uint8Array;return wl=e,wl}var Tl,Rm;function nd(){if(Rm)return Tl;Rm=1;var t=bT();function e(r){var a=new r.constructor(r.byteLength);return new t(a).set(new t(r)),a}return Tl=e,Tl}var xl,Sm;function DN(){if(Sm)return xl;Sm=1;var t=nd();function e(r,a){var n=a?t(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}return xl=e,xl}var Cl,Dm;function NN(){if(Dm)return Cl;Dm=1;var t=/\w*$/;function e(r){var a=new r.constructor(r.source,t.exec(r));return a.lastIndex=r.lastIndex,a}return Cl=e,Cl}var Al,Nm;function MN(){if(Nm)return Al;Nm=1;var t=Pa(),e=t?t.prototype:void 0,r=e?e.valueOf:void 0;function a(n){return r?Object(r.call(n)):{}}return Al=a,Al}var Ll,Mm;function ET(){if(Mm)return Ll;Mm=1;var t=nd();function e(r,a){var n=a?t(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}return Ll=e,Ll}var Rl,Om;function ON(){if(Om)return Rl;Om=1;var t=nd(),e=DN(),r=NN(),a=MN(),n=ET(),i="[object Boolean]",o="[object Date]",s="[object Map]",u="[object Number]",l="[object RegExp]",f="[object Set]",h="[object String]",v="[object Symbol]",c="[object ArrayBuffer]",d="[object DataView]",g="[object Float32Array]",p="[object Float64Array]",y="[object Int8Array]",b="[object Int16Array]",m="[object Int32Array]",E="[object Uint8Array]",T="[object Uint8ClampedArray]",L="[object Uint16Array]",w="[object Uint32Array]";function C(A,R,S){var D=A.constructor;switch(R){case c:return t(A);case i:case o:return new D(+A);case d:return e(A,S);case g:case p:case y:case b:case m:case E:case T:case L:case w:return n(A,S);case s:return new D;case u:case h:return new D(A);case l:return r(A);case f:return new D;case v:return a(A)}}return Rl=C,Rl}var Sl,Im;function wT(){if(Im)return Sl;Im=1;var t=Yt(),e=Object.create,r=(function(){function a(){}return function(n){if(!t(n))return{};if(e)return e(n);a.prototype=n;var i=new a;return a.prototype=void 0,i}})();return Sl=r,Sl}var Dl,Pm;function TT(){if(Pm)return Dl;Pm=1;var t=wT(),e=eo(),r=ji();function a(n){return typeof n.constructor=="function"&&!r(n)?t(e(n)):{}}return Dl=a,Dl}var Nl,Fm;function IN(){if(Fm)return Nl;Fm=1;var t=_a(),e=or(),r="[object Map]";function a(n){return e(n)&&t(n)==r}return Nl=a,Nl}var Ml,_m;function PN(){if(_m)return Ml;_m=1;var t=IN(),e=Ji(),r=ed(),a=r&&r.isMap,n=a?e(a):t;return Ml=n,Ml}var Ol,Bm;function FN(){if(Bm)return Ol;Bm=1;var t=_a(),e=or(),r="[object Set]";function a(n){return e(n)&&t(n)==r}return Ol=a,Ol}var Il,km;function _N(){if(km)return Il;km=1;var t=FN(),e=Ji(),r=ed(),a=r&&r.isSet,n=a?e(a):t;return Il=n,Il}var Pl,qm;function xT(){if(qm)return Pl;qm=1;var t=$i(),e=Jv(),r=Zi(),a=mN(),n=wN(),i=hT(),o=cT(),s=TN(),u=xN(),l=yT(),f=CN(),h=_a(),v=SN(),c=ON(),d=TT(),g=ct(),p=Fa(),y=PN(),b=Yt(),m=_N(),E=kr(),T=aa(),L=1,w=2,C=4,A="[object Arguments]",R="[object Array]",S="[object Boolean]",D="[object Date]",P="[object Error]",x="[object Function]",N="[object GeneratorFunction]",M="[object Map]",I="[object Number]",O="[object Object]",k="[object RegExp]",F="[object Set]",_="[object String]",z="[object Symbol]",X="[object WeakMap]",q="[object ArrayBuffer]",G="[object DataView]",U="[object Float32Array]",K="[object Float64Array]",J="[object Int8Array]",H="[object Int16Array]",Y="[object Int32Array]",$="[object Uint8Array]",Q="[object Uint8ClampedArray]",ee="[object Uint16Array]",te="[object Uint32Array]",he={};he[A]=he[R]=he[q]=he[G]=he[S]=he[D]=he[U]=he[K]=he[J]=he[H]=he[Y]=he[M]=he[I]=he[O]=he[k]=he[F]=he[_]=he[z]=he[$]=he[Q]=he[ee]=he[te]=!0,he[P]=he[x]=he[X]=!1;function xe(le,se,ve,ce,ye,ge){var de,be=se&L,Re=se&w,Pe=se&C;if(ve&&(de=ye?ve(le,ce,ye,ge):ve(le)),de!==void 0)return de;if(!b(le))return le;var Be=g(le);if(Be){if(de=v(le),!be)return o(le,de)}else{var Ne=h(le),Me=Ne==x||Ne==N;if(p(le))return i(le,be);if(Ne==O||Ne==A||Me&&!ye){if(de=Re||Me?{}:d(le),!be)return Re?u(le,n(de,le)):s(le,a(de,le))}else{if(!he[Ne])return ye?le:{};de=c(le,Ne,be)}}ge||(ge=new t);var ne=ge.get(le);if(ne)return ne;ge.set(le,de),m(le)?le.forEach(function(W){de.add(xe(W,se,ve,W,le,ge))}):y(le)&&le.forEach(function(W,Z){de.set(Z,xe(W,se,ve,Z,le,ge))});var B=Pe?Re?f:l:Re?T:E,V=Be?void 0:B(le);return e(V||le,function(W,Z){V&&(Z=W,W=le[Z]),r(de,Z,xe(W,se,ve,Z,le,ge))}),de}return Pl=xe,Pl}var Fl,Gm;function BN(){if(Gm)return Fl;Gm=1;var t=xT(),e=4;function r(a){return t(a,e)}return Fl=r,Fl}var _l,Um;function id(){if(Um)return _l;Um=1;function t(e){return function(){return e}}return _l=t,_l}var Bl,zm;function kN(){if(zm)return Bl;zm=1;function t(e){return function(r,a,n){for(var i=-1,o=Object(r),s=n(r),u=s.length;u--;){var l=s[e?u:++i];if(a(o[l],l,o)===!1)break}return r}}return Bl=t,Bl}var kl,Vm;function od(){if(Vm)return kl;Vm=1;var t=kN(),e=t();return kl=e,kl}var ql,Ym;function sd(){if(Ym)return ql;Ym=1;var t=od(),e=kr();function r(a,n){return a&&t(a,n,e)}return ql=r,ql}var Gl,Hm;function qN(){if(Hm)return Gl;Hm=1;var t=gr();function e(r,a){return function(n,i){if(n==null)return n;if(!t(n))return r(n,i);for(var o=n.length,s=a?o:-1,u=Object(n);(a?s--:++s<o)&&i(u[s],s,u)!==!1;);return n}}return Gl=e,Gl}var Ul,Xm;function to(){if(Xm)return Ul;Xm=1;var t=sd(),e=qN(),r=e(t);return Ul=r,Ul}var zl,Wm;function na(){if(Wm)return zl;Wm=1;function t(e){return e}return zl=t,zl}var Vl,$m;function CT(){if($m)return Vl;$m=1;var t=na();function e(r){return typeof r=="function"?r:t}return Vl=e,Vl}var Yl,Km;function AT(){if(Km)return Yl;Km=1;var t=Jv(),e=to(),r=CT(),a=ct();function n(i,o){var s=a(i)?t:e;return s(i,r(o))}return Yl=n,Yl}var Hl,Zm;function LT(){return Zm||(Zm=1,Hl=AT()),Hl}var Xl,Qm;function GN(){if(Qm)return Xl;Qm=1;var t=to();function e(r,a){var n=[];return t(r,function(i,o,s){a(i,o,s)&&n.push(i)}),n}return Xl=e,Xl}var Wl,Jm;function UN(){if(Jm)return Wl;Jm=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return Wl=e,Wl}var $l,jm;function zN(){if(jm)return $l;jm=1;function t(e){return this.__data__.has(e)}return $l=t,$l}var Kl,e0;function RT(){if(e0)return Kl;e0=1;var t=Qv(),e=UN(),r=zN();function a(n){var i=-1,o=n==null?0:n.length;for(this.__data__=new t;++i<o;)this.add(n[i])}return a.prototype.add=a.prototype.push=e,a.prototype.has=r,Kl=a,Kl}var Zl,t0;function VN(){if(t0)return Zl;t0=1;function t(e,r){for(var a=-1,n=e==null?0:e.length;++a<n;)if(r(e[a],a,e))return!0;return!1}return Zl=t,Zl}var Ql,r0;function ST(){if(r0)return Ql;r0=1;function t(e,r){return e.has(r)}return Ql=t,Ql}var Jl,a0;function DT(){if(a0)return Jl;a0=1;var t=RT(),e=VN(),r=ST(),a=1,n=2;function i(o,s,u,l,f,h){var v=u&a,c=o.length,d=s.length;if(c!=d&&!(v&&d>c))return!1;var g=h.get(o),p=h.get(s);if(g&&p)return g==s&&p==o;var y=-1,b=!0,m=u&n?new t:void 0;for(h.set(o,s),h.set(s,o);++y<c;){var E=o[y],T=s[y];if(l)var L=v?l(T,E,y,s,o,h):l(E,T,y,o,s,h);if(L!==void 0){if(L)continue;b=!1;break}if(m){if(!e(s,function(w,C){if(!r(m,C)&&(E===w||f(E,w,u,l,h)))return m.push(C)})){b=!1;break}}else if(!(E===T||f(E,T,u,l,h))){b=!1;break}}return h.delete(o),h.delete(s),b}return Jl=i,Jl}var jl,n0;function YN(){if(n0)return jl;n0=1;function t(e){var r=-1,a=Array(e.size);return e.forEach(function(n,i){a[++r]=[i,n]}),a}return jl=t,jl}var ef,i0;function ud(){if(i0)return ef;i0=1;function t(e){var r=-1,a=Array(e.size);return e.forEach(function(n){a[++r]=n}),a}return ef=t,ef}var tf,o0;function HN(){if(o0)return tf;o0=1;var t=Pa(),e=bT(),r=Ia(),a=DT(),n=YN(),i=ud(),o=1,s=2,u="[object Boolean]",l="[object Date]",f="[object Error]",h="[object Map]",v="[object Number]",c="[object RegExp]",d="[object Set]",g="[object String]",p="[object Symbol]",y="[object ArrayBuffer]",b="[object DataView]",m=t?t.prototype:void 0,E=m?m.valueOf:void 0;function T(L,w,C,A,R,S,D){switch(C){case b:if(L.byteLength!=w.byteLength||L.byteOffset!=w.byteOffset)return!1;L=L.buffer,w=w.buffer;case y:return!(L.byteLength!=w.byteLength||!S(new e(L),new e(w)));case u:case l:case v:return r(+L,+w);case f:return L.name==w.name&&L.message==w.message;case c:case g:return L==w+"";case h:var P=n;case d:var x=A&o;if(P||(P=i),L.size!=w.size&&!x)return!1;var N=D.get(L);if(N)return N==w;A|=s,D.set(L,w);var M=a(P(L),P(w),A,R,S,D);return D.delete(L),M;case p:if(E)return E.call(L)==E.call(w)}return!1}return tf=T,tf}var rf,s0;function XN(){if(s0)return rf;s0=1;var t=yT(),e=1,r=Object.prototype,a=r.hasOwnProperty;function n(i,o,s,u,l,f){var h=s&e,v=t(i),c=v.length,d=t(o),g=d.length;if(c!=g&&!h)return!1;for(var p=c;p--;){var y=v[p];if(!(h?y in o:a.call(o,y)))return!1}var b=f.get(i),m=f.get(o);if(b&&m)return b==o&&m==i;var E=!0;f.set(i,o),f.set(o,i);for(var T=h;++p<c;){y=v[p];var L=i[y],w=o[y];if(u)var C=h?u(w,L,y,o,i,f):u(L,w,y,i,o,f);if(!(C===void 0?L===w||l(L,w,s,u,f):C)){E=!1;break}T||(T=y=="constructor")}if(E&&!T){var A=i.constructor,R=o.constructor;A!=R&&"constructor"in i&&"constructor"in o&&!(typeof A=="function"&&A instanceof A&&typeof R=="function"&&R instanceof R)&&(E=!1)}return f.delete(i),f.delete(o),E}return rf=n,rf}var af,u0;function WN(){if(u0)return af;u0=1;var t=$i(),e=DT(),r=HN(),a=XN(),n=_a(),i=ct(),o=Fa(),s=Dn(),u=1,l="[object Arguments]",f="[object Array]",h="[object Object]",v=Object.prototype,c=v.hasOwnProperty;function d(g,p,y,b,m,E){var T=i(g),L=i(p),w=T?f:n(g),C=L?f:n(p);w=w==l?h:w,C=C==l?h:C;var A=w==h,R=C==h,S=w==C;if(S&&o(g)){if(!o(p))return!1;T=!0,A=!1}if(S&&!A)return E||(E=new t),T||s(g)?e(g,p,y,b,m,E):r(g,p,w,y,b,m,E);if(!(y&u)){var D=A&&c.call(g,"__wrapped__"),P=R&&c.call(p,"__wrapped__");if(D||P){var x=D?g.value():g,N=P?p.value():p;return E||(E=new t),m(x,N,y,b,E)}}return S?(E||(E=new t),a(g,p,y,b,m,E)):!1}return af=d,af}var nf,l0;function NT(){if(l0)return nf;l0=1;var t=WN(),e=or();function r(a,n,i,o,s){return a===n?!0:a==null||n==null||!e(a)&&!e(n)?a!==a&&n!==n:t(a,n,i,o,r,s)}return nf=r,nf}var of,f0;function $N(){if(f0)return of;f0=1;var t=$i(),e=NT(),r=1,a=2;function n(i,o,s,u){var l=s.length,f=l,h=!u;if(i==null)return!f;for(i=Object(i);l--;){var v=s[l];if(h&&v[2]?v[1]!==i[v[0]]:!(v[0]in i))return!1}for(;++l<f;){v=s[l];var c=v[0],d=i[c],g=v[1];if(h&&v[2]){if(d===void 0&&!(c in i))return!1}else{var p=new t;if(u)var y=u(d,g,c,i,o,p);if(!(y===void 0?e(g,d,r|a,u,p):y))return!1}}return!0}return of=n,of}var sf,h0;function MT(){if(h0)return sf;h0=1;var t=Yt();function e(r){return r===r&&!t(r)}return sf=e,sf}var uf,c0;function KN(){if(c0)return uf;c0=1;var t=MT(),e=kr();function r(a){for(var n=e(a),i=n.length;i--;){var o=n[i],s=a[o];n[i]=[o,s,t(s)]}return n}return uf=r,uf}var lf,v0;function OT(){if(v0)return lf;v0=1;function t(e,r){return function(a){return a==null?!1:a[e]===r&&(r!==void 0||e in Object(a))}}return lf=t,lf}var ff,d0;function ZN(){if(d0)return ff;d0=1;var t=$N(),e=KN(),r=OT();function a(n){var i=e(n);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(o){return o===n||t(o,n,i)}}return ff=a,ff}var hf,g0;function Ba(){if(g0)return hf;g0=1;var t=ta(),e=or(),r="[object Symbol]";function a(n){return typeof n=="symbol"||e(n)&&t(n)==r}return hf=a,hf}var cf,p0;function ld(){if(p0)return cf;p0=1;var t=ct(),e=Ba(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function n(i,o){if(t(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||e(i)?!0:a.test(i)||!r.test(i)||o!=null&&i in Object(o)}return cf=n,cf}var vf,y0;function QN(){if(y0)return vf;y0=1;var t=Qv(),e="Expected a function";function r(a,n){if(typeof a!="function"||n!=null&&typeof n!="function")throw new TypeError(e);var i=function(){var o=arguments,s=n?n.apply(this,o):o[0],u=i.cache;if(u.has(s))return u.get(s);var l=a.apply(this,o);return i.cache=u.set(s,l)||u,l};return i.cache=new(r.Cache||t),i}return r.Cache=t,vf=r,vf}var df,m0;function JN(){if(m0)return df;m0=1;var t=QN(),e=500;function r(a){var n=t(a,function(o){return i.size===e&&i.clear(),o}),i=n.cache;return n}return df=r,df}var gf,b0;function jN(){if(b0)return gf;b0=1;var t=JN(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,a=t(function(n){var i=[];return n.charCodeAt(0)===46&&i.push(""),n.replace(e,function(o,s,u,l){i.push(u?l.replace(r,"$1"):s||o)}),i});return gf=a,gf}var pf,E0;function ro(){if(E0)return pf;E0=1;function t(e,r){for(var a=-1,n=e==null?0:e.length,i=Array(n);++a<n;)i[a]=r(e[a],a,e);return i}return pf=t,pf}var yf,w0;function eM(){if(w0)return yf;w0=1;var t=Pa(),e=ro(),r=ct(),a=Ba(),n=t?t.prototype:void 0,i=n?n.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return e(s,o)+"";if(a(s))return i?i.call(s):"";var u=s+"";return u=="0"&&1/s==-1/0?"-0":u}return yf=o,yf}var mf,T0;function IT(){if(T0)return mf;T0=1;var t=eM();function e(r){return r==null?"":t(r)}return mf=e,mf}var bf,x0;function ao(){if(x0)return bf;x0=1;var t=ct(),e=ld(),r=jN(),a=IT();function n(i,o){return t(i)?i:e(i,o)?[i]:r(a(i))}return bf=n,bf}var Ef,C0;function Nn(){if(C0)return Ef;C0=1;var t=Ba();function e(r){if(typeof r=="string"||t(r))return r;var a=r+"";return a=="0"&&1/r==-1/0?"-0":a}return Ef=e,Ef}var wf,A0;function no(){if(A0)return wf;A0=1;var t=ao(),e=Nn();function r(a,n){n=t(n,a);for(var i=0,o=n.length;a!=null&&i<o;)a=a[e(n[i++])];return i&&i==o?a:void 0}return wf=r,wf}var Tf,L0;function tM(){if(L0)return Tf;L0=1;var t=no();function e(r,a,n){var i=r==null?void 0:t(r,a);return i===void 0?n:i}return Tf=e,Tf}var xf,R0;function rM(){if(R0)return xf;R0=1;function t(e,r){return e!=null&&r in Object(e)}return xf=t,xf}var Cf,S0;function PT(){if(S0)return Cf;S0=1;var t=ao(),e=Sn(),r=ct(),a=Qi(),n=jv(),i=Nn();function o(s,u,l){u=t(u,s);for(var f=-1,h=u.length,v=!1;++f<h;){var c=i(u[f]);if(!(v=s!=null&&l(s,c)))break;s=s[c]}return v||++f!=h?v:(h=s==null?0:s.length,!!h&&n(h)&&a(c,h)&&(r(s)||e(s)))}return Cf=o,Cf}var Af,D0;function FT(){if(D0)return Af;D0=1;var t=rM(),e=PT();function r(a,n){return a!=null&&e(a,n,t)}return Af=r,Af}var Lf,N0;function aM(){if(N0)return Lf;N0=1;var t=NT(),e=tM(),r=FT(),a=ld(),n=MT(),i=OT(),o=Nn(),s=1,u=2;function l(f,h){return a(f)&&n(h)?i(o(f),h):function(v){var c=e(v,f);return c===void 0&&c===h?r(v,f):t(h,c,s|u)}}return Lf=l,Lf}var Rf,M0;function _T(){if(M0)return Rf;M0=1;function t(e){return function(r){return r==null?void 0:r[e]}}return Rf=t,Rf}var Sf,O0;function nM(){if(O0)return Sf;O0=1;var t=no();function e(r){return function(a){return t(a,r)}}return Sf=e,Sf}var Df,I0;function iM(){if(I0)return Df;I0=1;var t=_T(),e=nM(),r=ld(),a=Nn();function n(i){return r(i)?t(a(i)):e(i)}return Df=n,Df}var Nf,P0;function pr(){if(P0)return Nf;P0=1;var t=ZN(),e=aM(),r=na(),a=ct(),n=iM();function i(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?a(o)?e(o[0],o[1]):t(o):n(o)}return Nf=i,Nf}var Mf,F0;function BT(){if(F0)return Mf;F0=1;var t=vT(),e=GN(),r=pr(),a=ct();function n(i,o){var s=a(i)?t:e;return s(i,r(o,3))}return Mf=n,Mf}var Of,_0;function oM(){if(_0)return Of;_0=1;var t=Object.prototype,e=t.hasOwnProperty;function r(a,n){return a!=null&&e.call(a,n)}return Of=r,Of}var If,B0;function kT(){if(B0)return If;B0=1;var t=oM(),e=PT();function r(a,n){return a!=null&&e(a,n,t)}return If=r,If}var Pf,k0;function sM(){if(k0)return Pf;k0=1;var t=td(),e=_a(),r=Sn(),a=ct(),n=gr(),i=Fa(),o=ji(),s=Dn(),u="[object Map]",l="[object Set]",f=Object.prototype,h=f.hasOwnProperty;function v(c){if(c==null)return!0;if(n(c)&&(a(c)||typeof c=="string"||typeof c.splice=="function"||i(c)||s(c)||r(c)))return!c.length;var d=e(c);if(d==u||d==l)return!c.size;if(o(c))return!t(c).length;for(var g in c)if(h.call(c,g))return!1;return!0}return Pf=v,Pf}var Ff,q0;function qT(){if(q0)return Ff;q0=1;function t(e){return e===void 0}return Ff=t,Ff}var _f,G0;function GT(){if(G0)return _f;G0=1;var t=to(),e=gr();function r(a,n){var i=-1,o=e(a)?Array(a.length):[];return t(a,function(s,u,l){o[++i]=n(s,u,l)}),o}return _f=r,_f}var Bf,U0;function UT(){if(U0)return Bf;U0=1;var t=ro(),e=pr(),r=GT(),a=ct();function n(i,o){var s=a(i)?t:r;return s(i,e(o,3))}return Bf=n,Bf}var kf,z0;function uM(){if(z0)return kf;z0=1;function t(e,r,a,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(a=e[++i]);++i<o;)a=r(a,e[i],i,e);return a}return kf=t,kf}var qf,V0;function lM(){if(V0)return qf;V0=1;function t(e,r,a,n,i){return i(e,function(o,s,u){a=n?(n=!1,o):r(a,o,s,u)}),a}return qf=t,qf}var Gf,Y0;function zT(){if(Y0)return Gf;Y0=1;var t=uM(),e=to(),r=pr(),a=lM(),n=ct();function i(o,s,u){var l=n(o)?t:a,f=arguments.length<3;return l(o,r(s,4),u,f,e)}return Gf=i,Gf}var Uf,H0;function fM(){if(H0)return Uf;H0=1;var t=ta(),e=ct(),r=or(),a="[object String]";function n(i){return typeof i=="string"||!e(i)&&r(i)&&t(i)==a}return Uf=n,Uf}var zf,X0;function hM(){if(X0)return zf;X0=1;var t=_T(),e=t("length");return zf=e,zf}var Vf,W0;function cM(){if(W0)return Vf;W0=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",n=e+r+a,i="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+t+n+i+"]");function u(l){return s.test(l)}return Vf=u,Vf}var Yf,$0;function vM(){if($0)return Yf;$0=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",n=e+r+a,i="\\ufe0e\\ufe0f",o="["+t+"]",s="["+n+"]",u="\\ud83c[\\udffb-\\udfff]",l="(?:"+s+"|"+u+")",f="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",d=l+"?",g="["+i+"]?",p="(?:"+c+"(?:"+[f,h,v].join("|")+")"+g+d+")*",y=g+d+p,b="(?:"+[f+s+"?",s,h,v,o].join("|")+")",m=RegExp(u+"(?="+u+")|"+b+y,"g");function E(T){for(var L=m.lastIndex=0;m.test(T);)++L;return L}return Yf=E,Yf}var Hf,K0;function dM(){if(K0)return Hf;K0=1;var t=hM(),e=cM(),r=vM();function a(n){return e(n)?r(n):t(n)}return Hf=a,Hf}var Xf,Z0;function gM(){if(Z0)return Xf;Z0=1;var t=td(),e=_a(),r=gr(),a=fM(),n=dM(),i="[object Map]",o="[object Set]";function s(u){if(u==null)return 0;if(r(u))return a(u)?n(u):u.length;var l=e(u);return l==i||l==o?u.size:t(u).length}return Xf=s,Xf}var Wf,Q0;function pM(){if(Q0)return Wf;Q0=1;var t=Jv(),e=wT(),r=sd(),a=pr(),n=eo(),i=ct(),o=Fa(),s=Ln(),u=Yt(),l=Dn();function f(h,v,c){var d=i(h),g=d||o(h)||l(h);if(v=a(v,4),c==null){var p=h&&h.constructor;g?c=d?new p:[]:u(h)?c=s(p)?e(n(h)):{}:c={}}return(g?t:r)(h,function(y,b,m){return v(c,y,b,m)}),c}return Wf=f,Wf}var $f,J0;function yM(){if(J0)return $f;J0=1;var t=Pa(),e=Sn(),r=ct(),a=t?t.isConcatSpreadable:void 0;function n(i){return r(i)||e(i)||!!(a&&i&&i[a])}return $f=n,$f}var Kf,j0;function fd(){if(j0)return Kf;j0=1;var t=ad(),e=yM();function r(a,n,i,o,s){var u=-1,l=a.length;for(i||(i=e),s||(s=[]);++u<l;){var f=a[u];n>0&&i(f)?n>1?r(f,n-1,i,o,s):t(s,f):o||(s[s.length]=f)}return s}return Kf=r,Kf}var Zf,eb;function mM(){if(eb)return Zf;eb=1;function t(e,r,a){switch(a.length){case 0:return e.call(r);case 1:return e.call(r,a[0]);case 2:return e.call(r,a[0],a[1]);case 3:return e.call(r,a[0],a[1],a[2])}return e.apply(r,a)}return Zf=t,Zf}var Qf,tb;function VT(){if(tb)return Qf;tb=1;var t=mM(),e=Math.max;function r(a,n,i){return n=e(n===void 0?a.length-1:n,0),function(){for(var o=arguments,s=-1,u=e(o.length-n,0),l=Array(u);++s<u;)l[s]=o[n+s];s=-1;for(var f=Array(n+1);++s<n;)f[s]=o[s];return f[n]=i(l),t(a,this,f)}}return Qf=r,Qf}var Jf,rb;function bM(){if(rb)return Jf;rb=1;var t=id(),e=uT(),r=na(),a=e?function(n,i){return e(n,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:r;return Jf=a,Jf}var jf,ab;function EM(){if(ab)return jf;ab=1;var t=800,e=16,r=Date.now;function a(n){var i=0,o=0;return function(){var s=r(),u=e-(s-o);if(o=s,u>0){if(++i>=t)return arguments[0]}else i=0;return n.apply(void 0,arguments)}}return jf=a,jf}var eh,nb;function YT(){if(nb)return eh;nb=1;var t=bM(),e=EM(),r=e(t);return eh=r,eh}var th,ib;function io(){if(ib)return th;ib=1;var t=na(),e=VT(),r=YT();function a(n,i){return r(e(n,i,t),n+"")}return th=a,th}var rh,ob;function HT(){if(ob)return rh;ob=1;function t(e,r,a,n){for(var i=e.length,o=a+(n?1:-1);n?o--:++o<i;)if(r(e[o],o,e))return o;return-1}return rh=t,rh}var ah,sb;function wM(){if(sb)return ah;sb=1;function t(e){return e!==e}return ah=t,ah}var nh,ub;function TM(){if(ub)return nh;ub=1;function t(e,r,a){for(var n=a-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}return nh=t,nh}var ih,lb;function xM(){if(lb)return ih;lb=1;var t=HT(),e=wM(),r=TM();function a(n,i,o){return i===i?r(n,i,o):t(n,e,o)}return ih=a,ih}var oh,fb;function CM(){if(fb)return oh;fb=1;var t=xM();function e(r,a){var n=r==null?0:r.length;return!!n&&t(r,a,0)>-1}return oh=e,oh}var sh,hb;function AM(){if(hb)return sh;hb=1;function t(e,r,a){for(var n=-1,i=e==null?0:e.length;++n<i;)if(a(r,e[n]))return!0;return!1}return sh=t,sh}var uh,cb;function LM(){if(cb)return uh;cb=1;function t(){}return uh=t,uh}var lh,vb;function RM(){if(vb)return lh;vb=1;var t=mT(),e=LM(),r=ud(),a=1/0,n=t&&1/r(new t([,-0]))[1]==a?function(i){return new t(i)}:e;return lh=n,lh}var fh,db;function SM(){if(db)return fh;db=1;var t=RT(),e=CM(),r=AM(),a=ST(),n=RM(),i=ud(),o=200;function s(u,l,f){var h=-1,v=e,c=u.length,d=!0,g=[],p=g;if(f)d=!1,v=r;else if(c>=o){var y=l?null:n(u);if(y)return i(y);d=!1,v=a,p=new t}else p=l?[]:g;e:for(;++h<c;){var b=u[h],m=l?l(b):b;if(b=f||b!==0?b:0,d&&m===m){for(var E=p.length;E--;)if(p[E]===m)continue e;l&&p.push(m),g.push(b)}else v(p,m,f)||(p!==g&&p.push(m),g.push(b))}return g}return fh=s,fh}var hh,gb;function XT(){if(gb)return hh;gb=1;var t=gr(),e=or();function r(a){return e(a)&&t(a)}return hh=r,hh}var ch,pb;function DM(){if(pb)return ch;pb=1;var t=fd(),e=io(),r=SM(),a=XT(),n=e(function(i){return r(t(i,1,a,!0))});return ch=n,ch}var vh,yb;function NM(){if(yb)return vh;yb=1;var t=ro();function e(r,a){return t(a,function(n){return r[n]})}return vh=e,vh}var dh,mb;function WT(){if(mb)return dh;mb=1;var t=NM(),e=kr();function r(a){return a==null?[]:t(a,e(a))}return dh=r,dh}var gh,bb;function Ht(){if(bb)return gh;bb=1;var t;if(typeof Kv=="function")try{t={clone:BN(),constant:id(),each:LT(),filter:BT(),has:kT(),isArray:ct(),isEmpty:sM(),isFunction:Ln(),isUndefined:qT(),keys:kr(),map:UT(),reduce:zT(),size:gM(),transform:pM(),union:DM(),values:WT()}}catch{}return t||(t=window._),gh=t,gh}var ph,Eb;function hd(){if(Eb)return ph;Eb=1;var t=Ht();ph=n;var e="\0",r="\0",a="";function n(f){this._isDirected=t.has(f,"directed")?f.directed:!0,this._isMultigraph=t.has(f,"multigraph")?f.multigraph:!1,this._isCompound=t.has(f,"compound")?f.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[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(f){return this._label=f,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(f){return t.isFunction(f)||(f=t.constant(f)),this._defaultNodeLabelFn=f,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return t.keys(this._nodes)},n.prototype.sources=function(){var f=this;return t.filter(this.nodes(),function(h){return t.isEmpty(f._in[h])})},n.prototype.sinks=function(){var f=this;return t.filter(this.nodes(),function(h){return t.isEmpty(f._out[h])})},n.prototype.setNodes=function(f,h){var v=arguments,c=this;return t.each(f,function(d){v.length>1?c.setNode(d,h):c.setNode(d)}),this},n.prototype.setNode=function(f,h){return t.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=h),this):(this._nodes[f]=arguments.length>1?h:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=r,this._children[f]={},this._children[r][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},n.prototype.node=function(f){return this._nodes[f]},n.prototype.hasNode=function(f){return t.has(this._nodes,f)},n.prototype.removeNode=function(f){var h=this;if(t.has(this._nodes,f)){var v=function(c){h.removeEdge(h._edgeObjs[c])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],t.each(this.children(f),function(c){h.setParent(c)}),delete this._children[f]),t.each(t.keys(this._in[f]),v),delete this._in[f],delete this._preds[f],t.each(t.keys(this._out[f]),v),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},n.prototype.setParent=function(f,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t.isUndefined(h))h=r;else{h+="";for(var v=h;!t.isUndefined(v);v=this.parent(v))if(v===f)throw new Error("Setting "+h+" as parent of "+f+" would create a cycle");this.setNode(h)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=h,this._children[h][f]=!0,this},n.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},n.prototype.parent=function(f){if(this._isCompound){var h=this._parent[f];if(h!==r)return h}},n.prototype.children=function(f){if(t.isUndefined(f)&&(f=r),this._isCompound){var h=this._children[f];if(h)return t.keys(h)}else{if(f===r)return this.nodes();if(this.hasNode(f))return[]}},n.prototype.predecessors=function(f){var h=this._preds[f];if(h)return t.keys(h)},n.prototype.successors=function(f){var h=this._sucs[f];if(h)return t.keys(h)},n.prototype.neighbors=function(f){var h=this.predecessors(f);if(h)return t.union(h,this.successors(f))},n.prototype.isLeaf=function(f){var h;return this.isDirected()?h=this.successors(f):h=this.neighbors(f),h.length===0},n.prototype.filterNodes=function(f){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var v=this;t.each(this._nodes,function(g,p){f(p)&&h.setNode(p,g)}),t.each(this._edgeObjs,function(g){h.hasNode(g.v)&&h.hasNode(g.w)&&h.setEdge(g,v.edge(g))});var c={};function d(g){var p=v.parent(g);return p===void 0||h.hasNode(p)?(c[g]=p,p):p in c?c[p]:d(p)}return this._isCompound&&t.each(h.nodes(),function(g){h.setParent(g,d(g))}),h},n.prototype.setDefaultEdgeLabel=function(f){return t.isFunction(f)||(f=t.constant(f)),this._defaultEdgeLabelFn=f,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return t.values(this._edgeObjs)},n.prototype.setPath=function(f,h){var v=this,c=arguments;return t.reduce(f,function(d,g){return c.length>1?v.setEdge(d,g,h):v.setEdge(d,g),g}),this},n.prototype.setEdge=function(){var f,h,v,c,d=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(f=g.v,h=g.w,v=g.name,arguments.length===2&&(c=arguments[1],d=!0)):(f=g,h=arguments[1],v=arguments[3],arguments.length>2&&(c=arguments[2],d=!0)),f=""+f,h=""+h,t.isUndefined(v)||(v=""+v);var p=s(this._isDirected,f,h,v);if(t.has(this._edgeLabels,p))return d&&(this._edgeLabels[p]=c),this;if(!t.isUndefined(v)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(h),this._edgeLabels[p]=d?c:this._defaultEdgeLabelFn(f,h,v);var y=u(this._isDirected,f,h,v);return f=y.v,h=y.w,Object.freeze(y),this._edgeObjs[p]=y,i(this._preds[h],f),i(this._sucs[f],h),this._in[h][p]=y,this._out[f][p]=y,this._edgeCount++,this},n.prototype.edge=function(f,h,v){var c=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,f,h,v);return this._edgeLabels[c]},n.prototype.hasEdge=function(f,h,v){var c=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,f,h,v);return t.has(this._edgeLabels,c)},n.prototype.removeEdge=function(f,h,v){var c=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,f,h,v),d=this._edgeObjs[c];return d&&(f=d.v,h=d.w,delete this._edgeLabels[c],delete this._edgeObjs[c],o(this._preds[h],f),o(this._sucs[f],h),delete this._in[h][c],delete this._out[f][c],this._edgeCount--),this},n.prototype.inEdges=function(f,h){var v=this._in[f];if(v){var c=t.values(v);return h?t.filter(c,function(d){return d.v===h}):c}},n.prototype.outEdges=function(f,h){var v=this._out[f];if(v){var c=t.values(v);return h?t.filter(c,function(d){return d.w===h}):c}},n.prototype.nodeEdges=function(f,h){var v=this.inEdges(f,h);if(v)return v.concat(this.outEdges(f,h))};function i(f,h){f[h]?f[h]++:f[h]=1}function o(f,h){--f[h]||delete f[h]}function s(f,h,v,c){var d=""+h,g=""+v;if(!f&&d>g){var p=d;d=g,g=p}return d+a+g+a+(t.isUndefined(c)?e:c)}function u(f,h,v,c){var d=""+h,g=""+v;if(!f&&d>g){var p=d;d=g,g=p}var y={v:d,w:g};return c&&(y.name=c),y}function l(f,h){return s(f,h.v,h.w,h.name)}return ph}var yh,wb;function MM(){return wb||(wb=1,yh="2.1.8"),yh}var mh,Tb;function OM(){return Tb||(Tb=1,mh={Graph:hd(),version:MM()}),mh}var bh,xb;function IM(){if(xb)return bh;xb=1;var t=Ht(),e=hd();bh={write:r,read:i};function r(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:a(o),edges:n(o)};return t.isUndefined(o.graph())||(s.value=t.clone(o.graph())),s}function a(o){return t.map(o.nodes(),function(s){var u=o.node(s),l=o.parent(s),f={v:s};return t.isUndefined(u)||(f.value=u),t.isUndefined(l)||(f.parent=l),f})}function n(o){return t.map(o.edges(),function(s){var u=o.edge(s),l={v:s.v,w:s.w};return t.isUndefined(s.name)||(l.name=s.name),t.isUndefined(u)||(l.value=u),l})}function i(o){var s=new e(o.options).setGraph(o.value);return t.each(o.nodes,function(u){s.setNode(u.v,u.value),u.parent&&s.setParent(u.v,u.parent)}),t.each(o.edges,function(u){s.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),s}return bh}var Eh,Cb;function PM(){if(Cb)return Eh;Cb=1;var t=Ht();Eh=e;function e(r){var a={},n=[],i;function o(s){t.has(a,s)||(a[s]=!0,i.push(s),t.each(r.successors(s),o),t.each(r.predecessors(s),o))}return t.each(r.nodes(),function(s){i=[],o(s),i.length&&n.push(i)}),n}return Eh}var wh,Ab;function $T(){if(Ab)return wh;Ab=1;var t=Ht();wh=e;function e(){this._arr=[],this._keyIndices={}}return e.prototype.size=function(){return this._arr.length},e.prototype.keys=function(){return this._arr.map(function(r){return r.key})},e.prototype.has=function(r){return t.has(this._keyIndices,r)},e.prototype.priority=function(r){var a=this._keyIndices[r];if(a!==void 0)return this._arr[a].priority},e.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},e.prototype.add=function(r,a){var n=this._keyIndices;if(r=String(r),!t.has(n,r)){var i=this._arr,o=i.length;return n[r]=o,i.push({key:r,priority:a}),this._decrease(o),!0}return!1},e.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},e.prototype.decrease=function(r,a){var n=this._keyIndices[r];if(a>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[n].priority+" New: "+a);this._arr[n].priority=a,this._decrease(n)},e.prototype._heapify=function(r){var a=this._arr,n=2*r,i=n+1,o=r;n<a.length&&(o=a[n].priority<a[o].priority?n:o,i<a.length&&(o=a[i].priority<a[o].priority?i:o),o!==r&&(this._swap(r,o),this._heapify(o)))},e.prototype._decrease=function(r){for(var a=this._arr,n=a[r].priority,i;r!==0&&(i=r>>1,!(a[i].priority<n));)this._swap(r,i),r=i},e.prototype._swap=function(r,a){var n=this._arr,i=this._keyIndices,o=n[r],s=n[a];n[r]=s,n[a]=o,i[s.key]=r,i[o.key]=a},wh}var Th,Lb;function KT(){if(Lb)return Th;Lb=1;var t=Ht(),e=$T();Th=a;var r=t.constant(1);function a(i,o,s,u){return n(i,String(o),s||r,u||function(l){return i.outEdges(l)})}function n(i,o,s,u){var l={},f=new e,h,v,c=function(d){var g=d.v!==h?d.v:d.w,p=l[g],y=s(d),b=v.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+d+" Weight: "+y);b<p.distance&&(p.distance=b,p.predecessor=h,f.decrease(g,b))};for(i.nodes().forEach(function(d){var g=d===o?0:Number.POSITIVE_INFINITY;l[d]={distance:g},f.add(d,g)});f.size()>0&&(h=f.removeMin(),v=l[h],v.distance!==Number.POSITIVE_INFINITY);)u(h).forEach(c);return l}return Th}var xh,Rb;function FM(){if(Rb)return xh;Rb=1;var t=KT(),e=Ht();xh=r;function r(a,n,i){return e.transform(a.nodes(),function(o,s){o[s]=t(a,s,n,i)},{})}return xh}var Ch,Sb;function ZT(){if(Sb)return Ch;Sb=1;var t=Ht();Ch=e;function e(r){var a=0,n=[],i={},o=[];function s(u){var l=i[u]={onStack:!0,lowlink:a,index:a++};if(n.push(u),r.successors(u).forEach(function(v){t.has(i,v)?i[v].onStack&&(l.lowlink=Math.min(l.lowlink,i[v].index)):(s(v),l.lowlink=Math.min(l.lowlink,i[v].lowlink))}),l.lowlink===l.index){var f=[],h;do h=n.pop(),i[h].onStack=!1,f.push(h);while(u!==h);o.push(f)}}return r.nodes().forEach(function(u){t.has(i,u)||s(u)}),o}return Ch}var Ah,Db;function _M(){if(Db)return Ah;Db=1;var t=Ht(),e=ZT();Ah=r;function r(a){return t.filter(e(a),function(n){return n.length>1||n.length===1&&a.hasEdge(n[0],n[0])})}return Ah}var Lh,Nb;function BM(){if(Nb)return Lh;Nb=1;var t=Ht();Lh=r;var e=t.constant(1);function r(n,i,o){return a(n,i||e,o||function(s){return n.outEdges(s)})}function a(n,i,o){var s={},u=n.nodes();return u.forEach(function(l){s[l]={},s[l][l]={distance:0},u.forEach(function(f){l!==f&&(s[l][f]={distance:Number.POSITIVE_INFINITY})}),o(l).forEach(function(f){var h=f.v===l?f.w:f.v,v=i(f);s[l][h]={distance:v,predecessor:l}})}),u.forEach(function(l){var f=s[l];u.forEach(function(h){var v=s[h];u.forEach(function(c){var d=v[l],g=f[c],p=v[c],y=d.distance+g.distance;y<p.distance&&(p.distance=y,p.predecessor=g.predecessor)})})}),s}return Lh}var Rh,Mb;function QT(){if(Mb)return Rh;Mb=1;var t=Ht();Rh=e,e.CycleException=r;function e(a){var n={},i={},o=[];function s(u){if(t.has(i,u))throw new r;t.has(n,u)||(i[u]=!0,n[u]=!0,t.each(a.predecessors(u),s),delete i[u],o.push(u))}if(t.each(a.sinks(),s),t.size(n)!==a.nodeCount())throw new r;return o}function r(){}return r.prototype=new Error,Rh}var Sh,Ob;function kM(){if(Ob)return Sh;Ob=1;var t=QT();Sh=e;function e(r){try{t(r)}catch(a){if(a instanceof t.CycleException)return!1;throw a}return!0}return Sh}var Dh,Ib;function JT(){if(Ib)return Dh;Ib=1;var t=Ht();Dh=e;function e(a,n,i){t.isArray(n)||(n=[n]);var o=(a.isDirected()?a.successors:a.neighbors).bind(a),s=[],u={};return t.each(n,function(l){if(!a.hasNode(l))throw new Error("Graph does not have node: "+l);r(a,l,i==="post",u,o,s)}),s}function r(a,n,i,o,s,u){t.has(o,n)||(o[n]=!0,i||u.push(n),t.each(s(n),function(l){r(a,l,i,o,s,u)}),i&&u.push(n))}return Dh}var Nh,Pb;function qM(){if(Pb)return Nh;Pb=1;var t=JT();Nh=e;function e(r,a){return t(r,a,"post")}return Nh}var Mh,Fb;function GM(){if(Fb)return Mh;Fb=1;var t=JT();Mh=e;function e(r,a){return t(r,a,"pre")}return Mh}var Oh,_b;function UM(){if(_b)return Oh;_b=1;var t=Ht(),e=hd(),r=$T();Oh=a;function a(n,i){var o=new e,s={},u=new r,l;function f(v){var c=v.v===l?v.w:v.v,d=u.priority(c);if(d!==void 0){var g=i(v);g<d&&(s[c]=l,u.decrease(c,g))}}if(n.nodeCount()===0)return o;t.each(n.nodes(),function(v){u.add(v,Number.POSITIVE_INFINITY),o.setNode(v)}),u.decrease(n.nodes()[0],0);for(var h=!1;u.size()>0;){if(l=u.removeMin(),t.has(s,l))o.setEdge(l,s[l]);else{if(h)throw new Error("Input graph is not connected: "+n);h=!0}n.nodeEdges(l).forEach(f)}return o}return Oh}var Ih,Bb;function zM(){return Bb||(Bb=1,Ih={components:PM(),dijkstra:KT(),dijkstraAll:FM(),findCycles:_M(),floydWarshall:BM(),isAcyclic:kM(),postorder:qM(),preorder:GM(),prim:UM(),tarjan:ZT(),topsort:QT()}),Ih}var Ph,kb;function VM(){if(kb)return Ph;kb=1;var t=OM();return Ph={Graph:t.Graph,json:IM(),alg:zM(),version:t.version},Ph}var Fh,qb;function Qt(){if(qb)return Fh;qb=1;var t;if(typeof Kv=="function")try{t=VM()}catch{}return t||(t=window.graphlib),Fh=t,Fh}var _h,Gb;function YM(){if(Gb)return _h;Gb=1;var t=xT(),e=1,r=4;function a(n){return t(n,e|r)}return _h=a,_h}var Bh,Ub;function oo(){if(Ub)return Bh;Ub=1;var t=Ia(),e=gr(),r=Qi(),a=Yt();function n(i,o,s){if(!a(s))return!1;var u=typeof o;return(u=="number"?e(s)&&r(o,s.length):u=="string"&&o in s)?t(s[o],i):!1}return Bh=n,Bh}var kh,zb;function HM(){if(zb)return kh;zb=1;var t=io(),e=Ia(),r=oo(),a=aa(),n=Object.prototype,i=n.hasOwnProperty,o=t(function(s,u){s=Object(s);var l=-1,f=u.length,h=f>2?u[2]:void 0;for(h&&r(u[0],u[1],h)&&(f=1);++l<f;)for(var v=u[l],c=a(v),d=-1,g=c.length;++d<g;){var p=c[d],y=s[p];(y===void 0||e(y,n[p])&&!i.call(s,p))&&(s[p]=v[p])}return s});return kh=o,kh}var qh,Vb;function XM(){if(Vb)return qh;Vb=1;var t=pr(),e=gr(),r=kr();function a(n){return function(i,o,s){var u=Object(i);if(!e(i)){var l=t(o,3);i=r(i),o=function(h){return l(u[h],h,u)}}var f=n(i,o,s);return f>-1?u[l?i[f]:f]:void 0}}return qh=a,qh}var Gh,Yb;function WM(){if(Yb)return Gh;Yb=1;var t=/\s/;function e(r){for(var a=r.length;a--&&t.test(r.charAt(a)););return a}return Gh=e,Gh}var Uh,Hb;function $M(){if(Hb)return Uh;Hb=1;var t=WM(),e=/^\s+/;function r(a){return a&&a.slice(0,t(a)+1).replace(e,"")}return Uh=r,Uh}var zh,Xb;function KM(){if(Xb)return zh;Xb=1;var t=$M(),e=Yt(),r=Ba(),a=NaN,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(l){if(typeof l=="number")return l;if(r(l))return a;if(e(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=e(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=t(l);var h=i.test(l);return h||o.test(l)?s(l.slice(2),h?2:8):n.test(l)?a:+l}return zh=u,zh}var Vh,Wb;function jT(){if(Wb)return Vh;Wb=1;var t=KM(),e=1/0,r=17976931348623157e292;function a(n){if(!n)return n===0?n:0;if(n=t(n),n===e||n===-e){var i=n<0?-1:1;return i*r}return n===n?n:0}return Vh=a,Vh}var Yh,$b;function ZM(){if($b)return Yh;$b=1;var t=jT();function e(r){var a=t(r),n=a%1;return a===a?n?a-n:a:0}return Yh=e,Yh}var Hh,Kb;function QM(){if(Kb)return Hh;Kb=1;var t=HT(),e=pr(),r=ZM(),a=Math.max;function n(i,o,s){var u=i==null?0:i.length;if(!u)return-1;var l=s==null?0:r(s);return l<0&&(l=a(u+l,0)),t(i,e(o,3),l)}return Hh=n,Hh}var Xh,Zb;function JM(){if(Zb)return Xh;Zb=1;var t=XM(),e=QM(),r=t(e);return Xh=r,Xh}var Wh,Qb;function ex(){if(Qb)return Wh;Qb=1;var t=fd();function e(r){var a=r==null?0:r.length;return a?t(r,1):[]}return Wh=e,Wh}var $h,Jb;function jM(){if(Jb)return $h;Jb=1;var t=od(),e=CT(),r=aa();function a(n,i){return n==null?n:t(n,e(i),r)}return $h=a,$h}var Kh,jb;function eO(){if(jb)return Kh;jb=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return Kh=t,Kh}var Zh,e1;function tO(){if(e1)return Zh;e1=1;var t=Ki(),e=sd(),r=pr();function a(n,i){var o={};return i=r(i,3),e(n,function(s,u,l){t(o,u,i(s,u,l))}),o}return Zh=a,Zh}var Qh,t1;function cd(){if(t1)return Qh;t1=1;var t=Ba();function e(r,a,n){for(var i=-1,o=r.length;++i<o;){var s=r[i],u=a(s);if(u!=null&&(l===void 0?u===u&&!t(u):n(u,l)))var l=u,f=s}return f}return Qh=e,Qh}var Jh,r1;function rO(){if(r1)return Jh;r1=1;function t(e,r){return e>r}return Jh=t,Jh}var jh,a1;function aO(){if(a1)return jh;a1=1;var t=cd(),e=rO(),r=na();function a(n){return n&&n.length?t(n,r,e):void 0}return jh=a,jh}var ec,n1;function tx(){if(n1)return ec;n1=1;var t=Ki(),e=Ia();function r(a,n,i){(i!==void 0&&!e(a[n],i)||i===void 0&&!(n in a))&&t(a,n,i)}return ec=r,ec}var tc,i1;function nO(){if(i1)return tc;i1=1;var t=ta(),e=eo(),r=or(),a="[object Object]",n=Function.prototype,i=Object.prototype,o=n.toString,s=i.hasOwnProperty,u=o.call(Object);function l(f){if(!r(f)||t(f)!=a)return!1;var h=e(f);if(h===null)return!0;var v=s.call(h,"constructor")&&h.constructor;return typeof v=="function"&&v instanceof v&&o.call(v)==u}return tc=l,tc}var rc,o1;function rx(){if(o1)return rc;o1=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return rc=t,rc}var ac,s1;function iO(){if(s1)return ac;s1=1;var t=Rn(),e=aa();function r(a){return t(a,e(a))}return ac=r,ac}var nc,u1;function oO(){if(u1)return nc;u1=1;var t=tx(),e=hT(),r=ET(),a=cT(),n=TT(),i=Sn(),o=ct(),s=XT(),u=Fa(),l=Ln(),f=Yt(),h=nO(),v=Dn(),c=rx(),d=iO();function g(p,y,b,m,E,T,L){var w=c(p,b),C=c(y,b),A=L.get(C);if(A){t(p,b,A);return}var R=T?T(w,C,b+"",p,y,L):void 0,S=R===void 0;if(S){var D=o(C),P=!D&&u(C),x=!D&&!P&&v(C);R=C,D||P||x?o(w)?R=w:s(w)?R=a(w):P?(S=!1,R=e(C,!0)):x?(S=!1,R=r(C,!0)):R=[]:h(C)||i(C)?(R=w,i(w)?R=d(w):(!f(w)||l(w))&&(R=n(C))):S=!1}S&&(L.set(C,R),E(R,C,m,T,L),L.delete(C)),t(p,b,R)}return nc=g,nc}var ic,l1;function sO(){if(l1)return ic;l1=1;var t=$i(),e=tx(),r=od(),a=oO(),n=Yt(),i=aa(),o=rx();function s(u,l,f,h,v){u!==l&&r(l,function(c,d){if(v||(v=new t),n(c))a(u,l,d,f,s,h,v);else{var g=h?h(o(u,d),c,d+"",u,l,v):void 0;g===void 0&&(g=c),e(u,d,g)}},i)}return ic=s,ic}var oc,f1;function uO(){if(f1)return oc;f1=1;var t=io(),e=oo();function r(a){return t(function(n,i){var o=-1,s=i.length,u=s>1?i[s-1]:void 0,l=s>2?i[2]:void 0;for(u=a.length>3&&typeof u=="function"?(s--,u):void 0,l&&e(i[0],i[1],l)&&(u=s<3?void 0:u,s=1),n=Object(n);++o<s;){var f=i[o];f&&a(n,f,o,u)}return n})}return oc=r,oc}var sc,h1;function lO(){if(h1)return sc;h1=1;var t=sO(),e=uO(),r=e(function(a,n,i){t(a,n,i)});return sc=r,sc}var uc,c1;function ax(){if(c1)return uc;c1=1;function t(e,r){return e<r}return uc=t,uc}var lc,v1;function fO(){if(v1)return lc;v1=1;var t=cd(),e=ax(),r=na();function a(n){return n&&n.length?t(n,r,e):void 0}return lc=a,lc}var fc,d1;function hO(){if(d1)return fc;d1=1;var t=cd(),e=pr(),r=ax();function a(n,i){return n&&n.length?t(n,e(i,2),r):void 0}return fc=a,fc}var hc,g1;function cO(){if(g1)return hc;g1=1;var t=Jt(),e=function(){return t.Date.now()};return hc=e,hc}var cc,p1;function vO(){if(p1)return cc;p1=1;var t=Zi(),e=ao(),r=Qi(),a=Yt(),n=Nn();function i(o,s,u,l){if(!a(o))return o;s=e(s,o);for(var f=-1,h=s.length,v=h-1,c=o;c!=null&&++f<h;){var d=n(s[f]),g=u;if(d==="__proto__"||d==="constructor"||d==="prototype")return o;if(f!=v){var p=c[d];g=l?l(p,d,c):void 0,g===void 0&&(g=a(p)?p:r(s[f+1])?[]:{})}t(c,d,g),c=c[d]}return o}return cc=i,cc}var vc,y1;function dO(){if(y1)return vc;y1=1;var t=no(),e=vO(),r=ao();function a(n,i,o){for(var s=-1,u=i.length,l={};++s<u;){var f=i[s],h=t(n,f);o(h,f)&&e(l,r(f,n),h)}return l}return vc=a,vc}var dc,m1;function gO(){if(m1)return dc;m1=1;var t=dO(),e=FT();function r(a,n){return t(a,n,function(i,o){return e(a,o)})}return dc=r,dc}var gc,b1;function pO(){if(b1)return gc;b1=1;var t=ex(),e=VT(),r=YT();function a(n){return r(e(n,void 0,t),n+"")}return gc=a,gc}var pc,E1;function yO(){if(E1)return pc;E1=1;var t=gO(),e=pO(),r=e(function(a,n){return a==null?{}:t(a,n)});return pc=r,pc}var yc,w1;function mO(){if(w1)return yc;w1=1;var t=Math.ceil,e=Math.max;function r(a,n,i,o){for(var s=-1,u=e(t((n-a)/(i||1)),0),l=Array(u);u--;)l[o?u:++s]=a,a+=i;return l}return yc=r,yc}var mc,T1;function bO(){if(T1)return mc;T1=1;var t=mO(),e=oo(),r=jT();function a(n){return function(i,o,s){return s&&typeof s!="number"&&e(i,o,s)&&(o=s=void 0),i=r(i),o===void 0?(o=i,i=0):o=r(o),s=s===void 0?i<o?1:-1:r(s),t(i,o,s,n)}}return mc=a,mc}var bc,x1;function EO(){if(x1)return bc;x1=1;var t=bO(),e=t();return bc=e,bc}var Ec,C1;function wO(){if(C1)return Ec;C1=1;function t(e,r){var a=e.length;for(e.sort(r);a--;)e[a]=e[a].value;return e}return Ec=t,Ec}var wc,A1;function TO(){if(A1)return wc;A1=1;var t=Ba();function e(r,a){if(r!==a){var n=r!==void 0,i=r===null,o=r===r,s=t(r),u=a!==void 0,l=a===null,f=a===a,h=t(a);if(!l&&!h&&!s&&r>a||s&&u&&f&&!l&&!h||i&&u&&f||!n&&f||!o)return 1;if(!i&&!s&&!h&&r<a||h&&n&&o&&!i&&!s||l&&n&&o||!u&&o||!f)return-1}return 0}return wc=e,wc}var Tc,L1;function xO(){if(L1)return Tc;L1=1;var t=TO();function e(r,a,n){for(var i=-1,o=r.criteria,s=a.criteria,u=o.length,l=n.length;++i<u;){var f=t(o[i],s[i]);if(f){if(i>=l)return f;var h=n[i];return f*(h=="desc"?-1:1)}}return r.index-a.index}return Tc=e,Tc}var xc,R1;function CO(){if(R1)return xc;R1=1;var t=ro(),e=no(),r=pr(),a=GT(),n=wO(),i=Ji(),o=xO(),s=na(),u=ct();function l(f,h,v){h.length?h=t(h,function(g){return u(g)?function(p){return e(p,g.length===1?g[0]:g)}:g}):h=[s];var c=-1;h=t(h,i(r));var d=a(f,function(g,p,y){var b=t(h,function(m){return m(g)});return{criteria:b,index:++c,value:g}});return n(d,function(g,p){return o(g,p,v)})}return xc=l,xc}var Cc,S1;function AO(){if(S1)return Cc;S1=1;var t=fd(),e=CO(),r=io(),a=oo(),n=r(function(i,o){if(i==null)return[];var s=o.length;return s>1&&a(i,o[0],o[1])?o=[]:s>2&&a(o[0],o[1],o[2])&&(o=[o[0]]),e(i,t(o,1),[])});return Cc=n,Cc}var Ac,D1;function LO(){if(D1)return Ac;D1=1;var t=IT(),e=0;function r(a){var n=++e;return t(a)+n}return Ac=r,Ac}var Lc,N1;function RO(){if(N1)return Lc;N1=1;function t(e,r,a){for(var n=-1,i=e.length,o=r.length,s={};++n<i;){var u=n<o?r[n]:void 0;a(s,e[n],u)}return s}return Lc=t,Lc}var Rc,M1;function SO(){if(M1)return Rc;M1=1;var t=Zi(),e=RO();function r(a,n){return e(a||[],n||[],t)}return Rc=r,Rc}var Sc,O1;function it(){if(O1)return Sc;O1=1;var t;if(typeof Kv=="function")try{t={cloneDeep:YM(),constant:id(),defaults:HM(),each:LT(),filter:BT(),find:JM(),flatten:ex(),forEach:AT(),forIn:jM(),has:kT(),isUndefined:qT(),last:eO(),map:UT(),mapValues:tO(),max:aO(),merge:lO(),min:fO(),minBy:hO(),now:cO(),pick:yO(),range:EO(),reduce:zT(),sortBy:AO(),uniqueId:LO(),values:WT(),zipObject:SO()}}catch{}return t||(t=window._),Sc=t,Sc}var Dc,I1;function DO(){if(I1)return Dc;I1=1,Dc=t;function t(){var a={};a._next=a._prev=a,this._sentinel=a}t.prototype.dequeue=function(){var a=this._sentinel,n=a._prev;if(n!==a)return e(n),n},t.prototype.enqueue=function(a){var n=this._sentinel;a._prev&&a._next&&e(a),a._next=n._next,n._next._prev=a,n._next=a,a._prev=n},t.prototype.toString=function(){for(var a=[],n=this._sentinel,i=n._prev;i!==n;)a.push(JSON.stringify(i,r)),i=i._prev;return"["+a.join(", ")+"]"};function e(a){a._prev._next=a._next,a._next._prev=a._prev,delete a._next,delete a._prev}function r(a,n){if(a!=="_next"&&a!=="_prev")return n}return Dc}var Nc,P1;function NO(){if(P1)return Nc;P1=1;var t=it(),e=Qt().Graph,r=DO();Nc=n;var a=t.constant(1);function n(l,f){if(l.nodeCount()<=1)return[];var h=s(l,f||a),v=i(h.graph,h.buckets,h.zeroIdx);return t.flatten(t.map(v,function(c){return l.outEdges(c.v,c.w)}),!0)}function i(l,f,h){for(var v=[],c=f[f.length-1],d=f[0],g;l.nodeCount();){for(;g=d.dequeue();)o(l,f,h,g);for(;g=c.dequeue();)o(l,f,h,g);if(l.nodeCount()){for(var p=f.length-2;p>0;--p)if(g=f[p].dequeue(),g){v=v.concat(o(l,f,h,g,!0));break}}}return v}function o(l,f,h,v,c){var d=c?[]:void 0;return t.forEach(l.inEdges(v.v),function(g){var p=l.edge(g),y=l.node(g.v);c&&d.push({v:g.v,w:g.w}),y.out-=p,u(f,h,y)}),t.forEach(l.outEdges(v.v),function(g){var p=l.edge(g),y=g.w,b=l.node(y);b.in-=p,u(f,h,b)}),l.removeNode(v.v),d}function s(l,f){var h=new e,v=0,c=0;t.forEach(l.nodes(),function(p){h.setNode(p,{v:p,in:0,out:0})}),t.forEach(l.edges(),function(p){var y=h.edge(p.v,p.w)||0,b=f(p),m=y+b;h.setEdge(p.v,p.w,m),c=Math.max(c,h.node(p.v).out+=b),v=Math.max(v,h.node(p.w).in+=b)});var d=t.range(c+v+3).map(function(){return new r}),g=v+1;return t.forEach(h.nodes(),function(p){u(d,g,h.node(p))}),{graph:h,buckets:d,zeroIdx:g}}function u(l,f,h){h.out?h.in?l[h.out-h.in+f].enqueue(h):l[l.length-1].enqueue(h):l[0].enqueue(h)}return Nc}var Mc,F1;function MO(){if(F1)return Mc;F1=1;var t=it(),e=NO();Mc={run:r,undo:n};function r(i){var o=i.graph().acyclicer==="greedy"?e(i,s(i)):a(i);t.forEach(o,function(u){var l=i.edge(u);i.removeEdge(u),l.forwardName=u.name,l.reversed=!0,i.setEdge(u.w,u.v,l,t.uniqueId("rev"))});function s(u){return function(l){return u.edge(l).weight}}}function a(i){var o=[],s={},u={};function l(f){t.has(u,f)||(u[f]=!0,s[f]=!0,t.forEach(i.outEdges(f),function(h){t.has(s,h.w)?o.push(h):l(h.w)}),delete s[f])}return t.forEach(i.nodes(),l),o}function n(i){t.forEach(i.edges(),function(o){var s=i.edge(o);if(s.reversed){i.removeEdge(o);var u=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(o.w,o.v,s,u)}})}return Mc}var Oc,_1;function kt(){if(_1)return Oc;_1=1;var t=it(),e=Qt().Graph;Oc={addDummyNode:r,simplify:a,asNonCompoundGraph:n,successorWeights:i,predecessorWeights:o,intersectRect:s,buildLayerMatrix:u,normalizeRanks:l,removeEmptyRanks:f,addBorderNode:h,maxRank:v,partition:c,time:d,notime:g};function r(p,y,b,m){var E;do E=t.uniqueId(m);while(p.hasNode(E));return b.dummy=y,p.setNode(E,b),E}function a(p){var y=new e().setGraph(p.graph());return t.forEach(p.nodes(),function(b){y.setNode(b,p.node(b))}),t.forEach(p.edges(),function(b){var m=y.edge(b.v,b.w)||{weight:0,minlen:1},E=p.edge(b);y.setEdge(b.v,b.w,{weight:m.weight+E.weight,minlen:Math.max(m.minlen,E.minlen)})}),y}function n(p){var y=new e({multigraph:p.isMultigraph()}).setGraph(p.graph());return t.forEach(p.nodes(),function(b){p.children(b).length||y.setNode(b,p.node(b))}),t.forEach(p.edges(),function(b){y.setEdge(b,p.edge(b))}),y}function i(p){var y=t.map(p.nodes(),function(b){var m={};return t.forEach(p.outEdges(b),function(E){m[E.w]=(m[E.w]||0)+p.edge(E).weight}),m});return t.zipObject(p.nodes(),y)}function o(p){var y=t.map(p.nodes(),function(b){var m={};return t.forEach(p.inEdges(b),function(E){m[E.v]=(m[E.v]||0)+p.edge(E).weight}),m});return t.zipObject(p.nodes(),y)}function s(p,y){var b=p.x,m=p.y,E=y.x-b,T=y.y-m,L=p.width/2,w=p.height/2;if(!E&&!T)throw new Error("Not possible to find intersection inside of the rectangle");var C,A;return Math.abs(T)*L>Math.abs(E)*w?(T<0&&(w=-w),C=w*E/T,A=w):(E<0&&(L=-L),C=L,A=L*T/E),{x:b+C,y:m+A}}function u(p){var y=t.map(t.range(v(p)+1),function(){return[]});return t.forEach(p.nodes(),function(b){var m=p.node(b),E=m.rank;t.isUndefined(E)||(y[E][m.order]=b)}),y}function l(p){var y=t.min(t.map(p.nodes(),function(b){return p.node(b).rank}));t.forEach(p.nodes(),function(b){var m=p.node(b);t.has(m,"rank")&&(m.rank-=y)})}function f(p){var y=t.min(t.map(p.nodes(),function(T){return p.node(T).rank})),b=[];t.forEach(p.nodes(),function(T){var L=p.node(T).rank-y;b[L]||(b[L]=[]),b[L].push(T)});var m=0,E=p.graph().nodeRankFactor;t.forEach(b,function(T,L){t.isUndefined(T)&&L%E!==0?--m:m&&t.forEach(T,function(w){p.node(w).rank+=m})})}function h(p,y,b,m){var E={width:0,height:0};return arguments.length>=4&&(E.rank=b,E.order=m),r(p,"border",E,y)}function v(p){return t.max(t.map(p.nodes(),function(y){var b=p.node(y).rank;if(!t.isUndefined(b))return b}))}function c(p,y){var b={lhs:[],rhs:[]};return t.forEach(p,function(m){y(m)?b.lhs.push(m):b.rhs.push(m)}),b}function d(p,y){var b=t.now();try{return y()}finally{console.log(p+" time: "+(t.now()-b)+"ms")}}function g(p,y){return y()}return Oc}var Ic,B1;function OO(){if(B1)return Ic;B1=1;var t=it(),e=kt();Ic={run:r,undo:n};function r(i){i.graph().dummyChains=[],t.forEach(i.edges(),function(o){a(i,o)})}function a(i,o){var s=o.v,u=i.node(s).rank,l=o.w,f=i.node(l).rank,h=o.name,v=i.edge(o),c=v.labelRank;if(f!==u+1){i.removeEdge(o);var d,g,p;for(p=0,++u;u<f;++p,++u)v.points=[],g={width:0,height:0,edgeLabel:v,edgeObj:o,rank:u},d=e.addDummyNode(i,"edge",g,"_d"),u===c&&(g.width=v.width,g.height=v.height,g.dummy="edge-label",g.labelpos=v.labelpos),i.setEdge(s,d,{weight:v.weight},h),p===0&&i.graph().dummyChains.push(d),s=d;i.setEdge(s,l,{weight:v.weight},h)}}function n(i){t.forEach(i.graph().dummyChains,function(o){var s=i.node(o),u=s.edgeLabel,l;for(i.setEdge(s.edgeObj,u);s.dummy;)l=i.successors(o)[0],i.removeNode(o),u.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(u.x=s.x,u.y=s.y,u.width=s.width,u.height=s.height),o=l,s=i.node(o)})}return Ic}var Pc,k1;function Ai(){if(k1)return Pc;k1=1;var t=it();Pc={longestPath:e,slack:r};function e(a){var n={};function i(o){var s=a.node(o);if(t.has(n,o))return s.rank;n[o]=!0;var u=t.min(t.map(a.outEdges(o),function(l){return i(l.w)-a.edge(l).minlen}));return(u===Number.POSITIVE_INFINITY||u===void 0||u===null)&&(u=0),s.rank=u}t.forEach(a.sources(),i)}function r(a,n){return a.node(n.w).rank-a.node(n.v).rank-a.edge(n).minlen}return Pc}var Fc,q1;function nx(){if(q1)return Fc;q1=1;var t=it(),e=Qt().Graph,r=Ai().slack;Fc=a;function a(s){var u=new e({directed:!1}),l=s.nodes()[0],f=s.nodeCount();u.setNode(l,{});for(var h,v;n(u,s)<f;)h=i(u,s),v=u.hasNode(h.v)?r(s,h):-r(s,h),o(u,s,v);return u}function n(s,u){function l(f){t.forEach(u.nodeEdges(f),function(h){var v=h.v,c=f===v?h.w:v;!s.hasNode(c)&&!r(u,h)&&(s.setNode(c,{}),s.setEdge(f,c,{}),l(c))})}return t.forEach(s.nodes(),l),s.nodeCount()}function i(s,u){return t.minBy(u.edges(),function(l){if(s.hasNode(l.v)!==s.hasNode(l.w))return r(u,l)})}function o(s,u,l){t.forEach(s.nodes(),function(f){u.node(f).rank+=l})}return Fc}var _c,G1;function IO(){if(G1)return _c;G1=1;var t=it(),e=nx(),r=Ai().slack,a=Ai().longestPath,n=Qt().alg.preorder,i=Qt().alg.postorder,o=kt().simplify;_c=s,s.initLowLimValues=h,s.initCutValues=u,s.calcCutValue=f,s.leaveEdge=c,s.enterEdge=d,s.exchangeEdges=g;function s(m){m=o(m),a(m);var E=e(m);h(E),u(E,m);for(var T,L;T=c(E);)L=d(E,m,T),g(E,m,T,L)}function u(m,E){var T=i(m,m.nodes());T=T.slice(0,T.length-1),t.forEach(T,function(L){l(m,E,L)})}function l(m,E,T){var L=m.node(T),w=L.parent;m.edge(T,w).cutvalue=f(m,E,T)}function f(m,E,T){var L=m.node(T),w=L.parent,C=!0,A=E.edge(T,w),R=0;return A||(C=!1,A=E.edge(w,T)),R=A.weight,t.forEach(E.nodeEdges(T),function(S){var D=S.v===T,P=D?S.w:S.v;if(P!==w){var x=D===C,N=E.edge(S).weight;if(R+=x?N:-N,y(m,T,P)){var M=m.edge(T,P).cutvalue;R+=x?-M:M}}}),R}function h(m,E){arguments.length<2&&(E=m.nodes()[0]),v(m,{},1,E)}function v(m,E,T,L,w){var C=T,A=m.node(L);return E[L]=!0,t.forEach(m.neighbors(L),function(R){t.has(E,R)||(T=v(m,E,T,R,L))}),A.low=C,A.lim=T++,w?A.parent=w:delete A.parent,T}function c(m){return t.find(m.edges(),function(E){return m.edge(E).cutvalue<0})}function d(m,E,T){var L=T.v,w=T.w;E.hasEdge(L,w)||(L=T.w,w=T.v);var C=m.node(L),A=m.node(w),R=C,S=!1;C.lim>A.lim&&(R=A,S=!0);var D=t.filter(E.edges(),function(P){return S===b(m,m.node(P.v),R)&&S!==b(m,m.node(P.w),R)});return t.minBy(D,function(P){return r(E,P)})}function g(m,E,T,L){var w=T.v,C=T.w;m.removeEdge(w,C),m.setEdge(L.v,L.w,{}),h(m),u(m,E),p(m,E)}function p(m,E){var T=t.find(m.nodes(),function(w){return!E.node(w).parent}),L=n(m,T);L=L.slice(1),t.forEach(L,function(w){var C=m.node(w).parent,A=E.edge(w,C),R=!1;A||(A=E.edge(C,w),R=!0),E.node(w).rank=E.node(C).rank+(R?A.minlen:-A.minlen)})}function y(m,E,T){return m.hasEdge(E,T)}function b(m,E,T){return T.low<=E.lim&&E.lim<=T.lim}return _c}var Bc,U1;function PO(){if(U1)return Bc;U1=1;var t=Ai(),e=t.longestPath,r=nx(),a=IO();Bc=n;function n(u){switch(u.graph().ranker){case"network-simplex":s(u);break;case"tight-tree":o(u);break;case"longest-path":i(u);break;default:s(u)}}var i=e;function o(u){e(u),r(u)}function s(u){a(u)}return Bc}var kc,z1;function FO(){if(z1)return kc;z1=1;var t=it();kc=e;function e(n){var i=a(n);t.forEach(n.graph().dummyChains,function(o){for(var s=n.node(o),u=s.edgeObj,l=r(n,i,u.v,u.w),f=l.path,h=l.lca,v=0,c=f[v],d=!0;o!==u.w;){if(s=n.node(o),d){for(;(c=f[v])!==h&&n.node(c).maxRank<s.rank;)v++;c===h&&(d=!1)}if(!d){for(;v<f.length-1&&n.node(c=f[v+1]).minRank<=s.rank;)v++;c=f[v]}n.setParent(o,c),o=n.successors(o)[0]}})}function r(n,i,o,s){var u=[],l=[],f=Math.min(i[o].low,i[s].low),h=Math.max(i[o].lim,i[s].lim),v,c;v=o;do v=n.parent(v),u.push(v);while(v&&(i[v].low>f||h>i[v].lim));for(c=v,v=s;(v=n.parent(v))!==c;)l.push(v);return{path:u.concat(l.reverse()),lca:c}}function a(n){var i={},o=0;function s(u){var l=o;t.forEach(n.children(u),s),i[u]={low:l,lim:o++}}return t.forEach(n.children(),s),i}return kc}var qc,V1;function _O(){if(V1)return qc;V1=1;var t=it(),e=kt();qc={run:r,cleanup:o};function r(s){var u=e.addDummyNode(s,"root",{},"_root"),l=n(s),f=t.max(t.values(l))-1,h=2*f+1;s.graph().nestingRoot=u,t.forEach(s.edges(),function(c){s.edge(c).minlen*=h});var v=i(s)+1;t.forEach(s.children(),function(c){a(s,u,h,v,f,l,c)}),s.graph().nodeRankFactor=h}function a(s,u,l,f,h,v,c){var d=s.children(c);if(!d.length){c!==u&&s.setEdge(u,c,{weight:0,minlen:l});return}var g=e.addBorderNode(s,"_bt"),p=e.addBorderNode(s,"_bb"),y=s.node(c);s.setParent(g,c),y.borderTop=g,s.setParent(p,c),y.borderBottom=p,t.forEach(d,function(b){a(s,u,l,f,h,v,b);var m=s.node(b),E=m.borderTop?m.borderTop:b,T=m.borderBottom?m.borderBottom:b,L=m.borderTop?f:2*f,w=E!==T?1:h-v[c]+1;s.setEdge(g,E,{weight:L,minlen:w,nestingEdge:!0}),s.setEdge(T,p,{weight:L,minlen:w,nestingEdge:!0})}),s.parent(c)||s.setEdge(u,g,{weight:0,minlen:h+v[c]})}function n(s){var u={};function l(f,h){var v=s.children(f);v&&v.length&&t.forEach(v,function(c){l(c,h+1)}),u[f]=h}return t.forEach(s.children(),function(f){l(f,1)}),u}function i(s){return t.reduce(s.edges(),function(u,l){return u+s.edge(l).weight},0)}function o(s){var u=s.graph();s.removeNode(u.nestingRoot),delete u.nestingRoot,t.forEach(s.edges(),function(l){var f=s.edge(l);f.nestingEdge&&s.removeEdge(l)})}return qc}var Gc,Y1;function BO(){if(Y1)return Gc;Y1=1;var t=it(),e=kt();Gc=r;function r(n){function i(o){var s=n.children(o),u=n.node(o);if(s.length&&t.forEach(s,i),t.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var l=u.minRank,f=u.maxRank+1;l<f;++l)a(n,"borderLeft","_bl",o,u,l),a(n,"borderRight","_br",o,u,l)}}t.forEach(n.children(),i)}function a(n,i,o,s,u,l){var f={width:0,height:0,rank:l,borderType:i},h=u[i][l-1],v=e.addDummyNode(n,"border",f,o);u[i][l]=v,n.setParent(v,s),h&&n.setEdge(h,v,{weight:1})}return Gc}var Uc,H1;function kO(){if(H1)return Uc;H1=1;var t=it();Uc={adjust:e,undo:r};function e(l){var f=l.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&a(l)}function r(l){var f=l.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&i(l),(f==="lr"||f==="rl")&&(s(l),a(l))}function a(l){t.forEach(l.nodes(),function(f){n(l.node(f))}),t.forEach(l.edges(),function(f){n(l.edge(f))})}function n(l){var f=l.width;l.width=l.height,l.height=f}function i(l){t.forEach(l.nodes(),function(f){o(l.node(f))}),t.forEach(l.edges(),function(f){var h=l.edge(f);t.forEach(h.points,o),t.has(h,"y")&&o(h)})}function o(l){l.y=-l.y}function s(l){t.forEach(l.nodes(),function(f){u(l.node(f))}),t.forEach(l.edges(),function(f){var h=l.edge(f);t.forEach(h.points,u),t.has(h,"x")&&u(h)})}function u(l){var f=l.x;l.x=l.y,l.y=f}return Uc}var zc,X1;function qO(){if(X1)return zc;X1=1;var t=it();zc=e;function e(r){var a={},n=t.filter(r.nodes(),function(l){return!r.children(l).length}),i=t.max(t.map(n,function(l){return r.node(l).rank})),o=t.map(t.range(i+1),function(){return[]});function s(l){if(!t.has(a,l)){a[l]=!0;var f=r.node(l);o[f.rank].push(l),t.forEach(r.successors(l),s)}}var u=t.sortBy(n,function(l){return r.node(l).rank});return t.forEach(u,s),o}return zc}var Vc,W1;function GO(){if(W1)return Vc;W1=1;var t=it();Vc=e;function e(a,n){for(var i=0,o=1;o<n.length;++o)i+=r(a,n[o-1],n[o]);return i}function r(a,n,i){for(var o=t.zipObject(i,t.map(i,function(v,c){return c})),s=t.flatten(t.map(n,function(v){return t.sortBy(t.map(a.outEdges(v),function(c){return{pos:o[c.w],weight:a.edge(c).weight}}),"pos")}),!0),u=1;u<i.length;)u<<=1;var l=2*u-1;u-=1;var f=t.map(new Array(l),function(){return 0}),h=0;return t.forEach(s.forEach(function(v){var c=v.pos+u;f[c]+=v.weight;for(var d=0;c>0;)c%2&&(d+=f[c+1]),c=c-1>>1,f[c]+=v.weight;h+=v.weight*d})),h}return Vc}var Yc,$1;function UO(){if($1)return Yc;$1=1;var t=it();Yc=e;function e(r,a){return t.map(a,function(n){var i=r.inEdges(n);if(i.length){var o=t.reduce(i,function(s,u){var l=r.edge(u),f=r.node(u.v);return{sum:s.sum+l.weight*f.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}return Yc}var Hc,K1;function zO(){if(K1)return Hc;K1=1;var t=it();Hc=e;function e(n,i){var o={};t.forEach(n,function(u,l){var f=o[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:l};t.isUndefined(u.barycenter)||(f.barycenter=u.barycenter,f.weight=u.weight)}),t.forEach(i.edges(),function(u){var l=o[u.v],f=o[u.w];!t.isUndefined(l)&&!t.isUndefined(f)&&(f.indegree++,l.out.push(o[u.w]))});var s=t.filter(o,function(u){return!u.indegree});return r(s)}function r(n){var i=[];function o(l){return function(f){f.merged||(t.isUndefined(f.barycenter)||t.isUndefined(l.barycenter)||f.barycenter>=l.barycenter)&&a(l,f)}}function s(l){return function(f){f.in.push(l),--f.indegree===0&&n.push(f)}}for(;n.length;){var u=n.pop();i.push(u),t.forEach(u.in.reverse(),o(u)),t.forEach(u.out,s(u))}return t.map(t.filter(i,function(l){return!l.merged}),function(l){return t.pick(l,["vs","i","barycenter","weight"])})}function a(n,i){var o=0,s=0;n.weight&&(o+=n.barycenter*n.weight,s+=n.weight),i.weight&&(o+=i.barycenter*i.weight,s+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/s,n.weight=s,n.i=Math.min(i.i,n.i),i.merged=!0}return Hc}var Xc,Z1;function VO(){if(Z1)return Xc;Z1=1;var t=it(),e=kt();Xc=r;function r(i,o){var s=e.partition(i,function(g){return t.has(g,"barycenter")}),u=s.lhs,l=t.sortBy(s.rhs,function(g){return-g.i}),f=[],h=0,v=0,c=0;u.sort(n(!!o)),c=a(f,l,c),t.forEach(u,function(g){c+=g.vs.length,f.push(g.vs),h+=g.barycenter*g.weight,v+=g.weight,c=a(f,l,c)});var d={vs:t.flatten(f,!0)};return v&&(d.barycenter=h/v,d.weight=v),d}function a(i,o,s){for(var u;o.length&&(u=t.last(o)).i<=s;)o.pop(),i.push(u.vs),s++;return s}function n(i){return function(o,s){return o.barycenter<s.barycenter?-1:o.barycenter>s.barycenter?1:i?s.i-o.i:o.i-s.i}}return Xc}var Wc,Q1;function YO(){if(Q1)return Wc;Q1=1;var t=it(),e=UO(),r=zO(),a=VO();Wc=n;function n(s,u,l,f){var h=s.children(u),v=s.node(u),c=v?v.borderLeft:void 0,d=v?v.borderRight:void 0,g={};c&&(h=t.filter(h,function(T){return T!==c&&T!==d}));var p=e(s,h);t.forEach(p,function(T){if(s.children(T.v).length){var L=n(s,T.v,l,f);g[T.v]=L,t.has(L,"barycenter")&&o(T,L)}});var y=r(p,l);i(y,g);var b=a(y,f);if(c&&(b.vs=t.flatten([c,b.vs,d],!0),s.predecessors(c).length)){var m=s.node(s.predecessors(c)[0]),E=s.node(s.predecessors(d)[0]);t.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+m.order+E.order)/(b.weight+2),b.weight+=2}return b}function i(s,u){t.forEach(s,function(l){l.vs=t.flatten(l.vs.map(function(f){return u[f]?u[f].vs:f}),!0)})}function o(s,u){t.isUndefined(s.barycenter)?(s.barycenter=u.barycenter,s.weight=u.weight):(s.barycenter=(s.barycenter*s.weight+u.barycenter*u.weight)/(s.weight+u.weight),s.weight+=u.weight)}return Wc}var $c,J1;function HO(){if(J1)return $c;J1=1;var t=it(),e=Qt().Graph;$c=r;function r(n,i,o){var s=a(n),u=new e({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(l){return n.node(l)});return t.forEach(n.nodes(),function(l){var f=n.node(l),h=n.parent(l);(f.rank===i||f.minRank<=i&&i<=f.maxRank)&&(u.setNode(l),u.setParent(l,h||s),t.forEach(n[o](l),function(v){var c=v.v===l?v.w:v.v,d=u.edge(c,l),g=t.isUndefined(d)?0:d.weight;u.setEdge(c,l,{weight:n.edge(v).weight+g})}),t.has(f,"minRank")&&u.setNode(l,{borderLeft:f.borderLeft[i],borderRight:f.borderRight[i]}))}),u}function a(n){for(var i;n.hasNode(i=t.uniqueId("_root")););return i}return $c}var Kc,j1;function XO(){if(j1)return Kc;j1=1;var t=it();Kc=e;function e(r,a,n){var i={},o;t.forEach(n,function(s){for(var u=r.parent(s),l,f;u;){if(l=r.parent(u),l?(f=i[l],i[l]=u):(f=o,o=u),f&&f!==u){a.setEdge(f,u);return}u=l}})}return Kc}var Zc,eE;function WO(){if(eE)return Zc;eE=1;var t=it(),e=qO(),r=GO(),a=YO(),n=HO(),i=XO(),o=Qt().Graph,s=kt();Zc=u;function u(v){var c=s.maxRank(v),d=l(v,t.range(1,c+1),"inEdges"),g=l(v,t.range(c-1,-1,-1),"outEdges"),p=e(v);h(v,p);for(var y=Number.POSITIVE_INFINITY,b,m=0,E=0;E<4;++m,++E){f(m%2?d:g,m%4>=2),p=s.buildLayerMatrix(v);var T=r(v,p);T<y&&(E=0,b=t.cloneDeep(p),y=T)}h(v,b)}function l(v,c,d){return t.map(c,function(g){return n(v,g,d)})}function f(v,c){var d=new o;t.forEach(v,function(g){var p=g.graph().root,y=a(g,p,d,c);t.forEach(y.vs,function(b,m){g.node(b).order=m}),i(g,d,y.vs)})}function h(v,c){t.forEach(c,function(d){t.forEach(d,function(g,p){v.node(g).order=p})})}return Zc}var Qc,tE;function $O(){if(tE)return Qc;tE=1;var t=it(),e=Qt().Graph,r=kt();Qc={positionX:d,findType1Conflicts:a,findType2Conflicts:n,addConflict:o,hasConflict:s,verticalAlignment:u,horizontalCompaction:l,alignCoordinates:v,findSmallestWidthAlignment:h,balance:c};function a(y,b){var m={};function E(T,L){var w=0,C=0,A=T.length,R=t.last(L);return t.forEach(L,function(S,D){var P=i(y,S),x=P?y.node(P).order:A;(P||S===R)&&(t.forEach(L.slice(C,D+1),function(N){t.forEach(y.predecessors(N),function(M){var I=y.node(M),O=I.order;(O<w||x<O)&&!(I.dummy&&y.node(N).dummy)&&o(m,M,N)})}),C=D+1,w=x)}),L}return t.reduce(b,E),m}function n(y,b){var m={};function E(L,w,C,A,R){var S;t.forEach(t.range(w,C),function(D){S=L[D],y.node(S).dummy&&t.forEach(y.predecessors(S),function(P){var x=y.node(P);x.dummy&&(x.order<A||x.order>R)&&o(m,P,S)})})}function T(L,w){var C=-1,A,R=0;return t.forEach(w,function(S,D){if(y.node(S).dummy==="border"){var P=y.predecessors(S);P.length&&(A=y.node(P[0]).order,E(w,R,D,C,A),R=D,C=A)}E(w,R,w.length,A,L.length)}),w}return t.reduce(b,T),m}function i(y,b){if(y.node(b).dummy)return t.find(y.predecessors(b),function(m){return y.node(m).dummy})}function o(y,b,m){if(b>m){var E=b;b=m,m=E}var T=y[b];T||(y[b]=T={}),T[m]=!0}function s(y,b,m){if(b>m){var E=b;b=m,m=E}return t.has(y[b],m)}function u(y,b,m,E){var T={},L={},w={};return t.forEach(b,function(C){t.forEach(C,function(A,R){T[A]=A,L[A]=A,w[A]=R})}),t.forEach(b,function(C){var A=-1;t.forEach(C,function(R){var S=E(R);if(S.length){S=t.sortBy(S,function(M){return w[M]});for(var D=(S.length-1)/2,P=Math.floor(D),x=Math.ceil(D);P<=x;++P){var N=S[P];L[R]===R&&A<w[N]&&!s(m,R,N)&&(L[N]=R,L[R]=T[R]=T[N],A=w[N])}}})}),{root:T,align:L}}function l(y,b,m,E,T){var L={},w=f(y,b,m,T),C=T?"borderLeft":"borderRight";function A(D,P){for(var x=w.nodes(),N=x.pop(),M={};N;)M[N]?D(N):(M[N]=!0,x.push(N),x=x.concat(P(N))),N=x.pop()}function R(D){L[D]=w.inEdges(D).reduce(function(P,x){return Math.max(P,L[x.v]+w.edge(x))},0)}function S(D){var P=w.outEdges(D).reduce(function(N,M){return Math.min(N,L[M.w]-w.edge(M))},Number.POSITIVE_INFINITY),x=y.node(D);P!==Number.POSITIVE_INFINITY&&x.borderType!==C&&(L[D]=Math.max(L[D],P))}return A(R,w.predecessors.bind(w)),A(S,w.successors.bind(w)),t.forEach(E,function(D){L[D]=L[m[D]]}),L}function f(y,b,m,E){var T=new e,L=y.graph(),w=g(L.nodesep,L.edgesep,E);return t.forEach(b,function(C){var A;t.forEach(C,function(R){var S=m[R];if(T.setNode(S),A){var D=m[A],P=T.edge(D,S);T.setEdge(D,S,Math.max(w(y,R,A),P||0))}A=R})}),T}function h(y,b){return t.minBy(t.values(b),function(m){var E=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;return t.forIn(m,function(L,w){var C=p(y,w)/2;E=Math.max(L+C,E),T=Math.min(L-C,T)}),E-T})}function v(y,b){var m=t.values(b),E=t.min(m),T=t.max(m);t.forEach(["u","d"],function(L){t.forEach(["l","r"],function(w){var C=L+w,A=y[C],R;if(A!==b){var S=t.values(A);R=w==="l"?E-t.min(S):T-t.max(S),R&&(y[C]=t.mapValues(A,function(D){return D+R}))}})})}function c(y,b){return t.mapValues(y.ul,function(m,E){if(b)return y[b.toLowerCase()][E];var T=t.sortBy(t.map(y,E));return(T[1]+T[2])/2})}function d(y){var b=r.buildLayerMatrix(y),m=t.merge(a(y,b),n(y,b)),E={},T;t.forEach(["u","d"],function(w){T=w==="u"?b:t.values(b).reverse(),t.forEach(["l","r"],function(C){C==="r"&&(T=t.map(T,function(D){return t.values(D).reverse()}));var A=(w==="u"?y.predecessors:y.successors).bind(y),R=u(y,T,m,A),S=l(y,T,R.root,R.align,C==="r");C==="r"&&(S=t.mapValues(S,function(D){return-D})),E[w+C]=S})});var L=h(y,E);return v(E,L),c(E,y.graph().align)}function g(y,b,m){return function(E,T,L){var w=E.node(T),C=E.node(L),A=0,R;if(A+=w.width/2,t.has(w,"labelpos"))switch(w.labelpos.toLowerCase()){case"l":R=-w.width/2;break;case"r":R=w.width/2;break}if(R&&(A+=m?R:-R),R=0,A+=(w.dummy?b:y)/2,A+=(C.dummy?b:y)/2,A+=C.width/2,t.has(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":R=C.width/2;break;case"r":R=-C.width/2;break}return R&&(A+=m?R:-R),R=0,A}}function p(y,b){return y.node(b).width}return Qc}var Jc,rE;function KO(){if(rE)return Jc;rE=1;var t=it(),e=kt(),r=$O().positionX;Jc=a;function a(i){i=e.asNonCompoundGraph(i),n(i),t.forEach(r(i),function(o,s){i.node(s).x=o})}function n(i){var o=e.buildLayerMatrix(i),s=i.graph().ranksep,u=0;t.forEach(o,function(l){var f=t.max(t.map(l,function(h){return i.node(h).height}));t.forEach(l,function(h){i.node(h).y=u+f/2}),u+=f+s})}return Jc}var jc,aE;function ZO(){if(aE)return jc;aE=1;var t=it(),e=MO(),r=OO(),a=PO(),n=kt().normalizeRanks,i=FO(),o=kt().removeEmptyRanks,s=_O(),u=BO(),l=kO(),f=WO(),h=KO(),v=kt(),c=Qt().Graph;jc=d;function d(q,G){var U=G&&G.debugTiming?v.time:v.notime;U("layout",function(){var K=U(" buildLayoutGraph",function(){return A(q)});U(" runLayout",function(){g(K,U)}),U(" updateInputGraph",function(){p(q,K)})})}function g(q,G){G(" makeSpaceForEdgeLabels",function(){R(q)}),G(" removeSelfEdges",function(){k(q)}),G(" acyclic",function(){e.run(q)}),G(" nestingGraph.run",function(){s.run(q)}),G(" rank",function(){a(v.asNonCompoundGraph(q))}),G(" injectEdgeLabelProxies",function(){S(q)}),G(" removeEmptyRanks",function(){o(q)}),G(" nestingGraph.cleanup",function(){s.cleanup(q)}),G(" normalizeRanks",function(){n(q)}),G(" assignRankMinMax",function(){D(q)}),G(" removeEdgeLabelProxies",function(){P(q)}),G(" normalize.run",function(){r.run(q)}),G(" parentDummyChains",function(){i(q)}),G(" addBorderSegments",function(){u(q)}),G(" order",function(){f(q)}),G(" insertSelfEdges",function(){F(q)}),G(" adjustCoordinateSystem",function(){l.adjust(q)}),G(" position",function(){h(q)}),G(" positionSelfEdges",function(){_(q)}),G(" removeBorderNodes",function(){O(q)}),G(" normalize.undo",function(){r.undo(q)}),G(" fixupEdgeLabelCoords",function(){M(q)}),G(" undoCoordinateSystem",function(){l.undo(q)}),G(" translateGraph",function(){x(q)}),G(" assignNodeIntersects",function(){N(q)}),G(" reversePoints",function(){I(q)}),G(" acyclic.undo",function(){e.undo(q)})}function p(q,G){t.forEach(q.nodes(),function(U){var K=q.node(U),J=G.node(U);K&&(K.x=J.x,K.y=J.y,G.children(U).length&&(K.width=J.width,K.height=J.height))}),t.forEach(q.edges(),function(U){var K=q.edge(U),J=G.edge(U);K.points=J.points,t.has(J,"x")&&(K.x=J.x,K.y=J.y)}),q.graph().width=G.graph().width,q.graph().height=G.graph().height}var y=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],E=["width","height"],T={width:0,height:0},L=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function A(q){var G=new c({multigraph:!0,compound:!0}),U=X(q.graph());return G.setGraph(t.merge({},b,z(U,y),t.pick(U,m))),t.forEach(q.nodes(),function(K){var J=X(q.node(K));G.setNode(K,t.defaults(z(J,E),T)),G.setParent(K,q.parent(K))}),t.forEach(q.edges(),function(K){var J=X(q.edge(K));G.setEdge(K,t.merge({},w,z(J,L),t.pick(J,C)))}),G}function R(q){var G=q.graph();G.ranksep/=2,t.forEach(q.edges(),function(U){var K=q.edge(U);K.minlen*=2,K.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?K.width+=K.labeloffset:K.height+=K.labeloffset)})}function S(q){t.forEach(q.edges(),function(G){var U=q.edge(G);if(U.width&&U.height){var K=q.node(G.v),J=q.node(G.w),H={rank:(J.rank-K.rank)/2+K.rank,e:G};v.addDummyNode(q,"edge-proxy",H,"_ep")}})}function D(q){var G=0;t.forEach(q.nodes(),function(U){var K=q.node(U);K.borderTop&&(K.minRank=q.node(K.borderTop).rank,K.maxRank=q.node(K.borderBottom).rank,G=t.max(G,K.maxRank))}),q.graph().maxRank=G}function P(q){t.forEach(q.nodes(),function(G){var U=q.node(G);U.dummy==="edge-proxy"&&(q.edge(U.e).labelRank=U.rank,q.removeNode(G))})}function x(q){var G=Number.POSITIVE_INFINITY,U=0,K=Number.POSITIVE_INFINITY,J=0,H=q.graph(),Y=H.marginx||0,$=H.marginy||0;function Q(ee){var te=ee.x,he=ee.y,xe=ee.width,le=ee.height;G=Math.min(G,te-xe/2),U=Math.max(U,te+xe/2),K=Math.min(K,he-le/2),J=Math.max(J,he+le/2)}t.forEach(q.nodes(),function(ee){Q(q.node(ee))}),t.forEach(q.edges(),function(ee){var te=q.edge(ee);t.has(te,"x")&&Q(te)}),G-=Y,K-=$,t.forEach(q.nodes(),function(ee){var te=q.node(ee);te.x-=G,te.y-=K}),t.forEach(q.edges(),function(ee){var te=q.edge(ee);t.forEach(te.points,function(he){he.x-=G,he.y-=K}),t.has(te,"x")&&(te.x-=G),t.has(te,"y")&&(te.y-=K)}),H.width=U-G+Y,H.height=J-K+$}function N(q){t.forEach(q.edges(),function(G){var U=q.edge(G),K=q.node(G.v),J=q.node(G.w),H,Y;U.points?(H=U.points[0],Y=U.points[U.points.length-1]):(U.points=[],H=J,Y=K),U.points.unshift(v.intersectRect(K,H)),U.points.push(v.intersectRect(J,Y))})}function M(q){t.forEach(q.edges(),function(G){var U=q.edge(G);if(t.has(U,"x"))switch((U.labelpos==="l"||U.labelpos==="r")&&(U.width-=U.labeloffset),U.labelpos){case"l":U.x-=U.width/2+U.labeloffset;break;case"r":U.x+=U.width/2+U.labeloffset;break}})}function I(q){t.forEach(q.edges(),function(G){var U=q.edge(G);U.reversed&&U.points.reverse()})}function O(q){t.forEach(q.nodes(),function(G){if(q.children(G).length){var U=q.node(G),K=q.node(U.borderTop),J=q.node(U.borderBottom),H=q.node(t.last(U.borderLeft)),Y=q.node(t.last(U.borderRight));U.width=Math.abs(Y.x-H.x),U.height=Math.abs(J.y-K.y),U.x=H.x+U.width/2,U.y=K.y+U.height/2}}),t.forEach(q.nodes(),function(G){q.node(G).dummy==="border"&&q.removeNode(G)})}function k(q){t.forEach(q.edges(),function(G){if(G.v===G.w){var U=q.node(G.v);U.selfEdges||(U.selfEdges=[]),U.selfEdges.push({e:G,label:q.edge(G)}),q.removeEdge(G)}})}function F(q){var G=v.buildLayerMatrix(q);t.forEach(G,function(U){var K=0;t.forEach(U,function(J,H){var Y=q.node(J);Y.order=H+K,t.forEach(Y.selfEdges,function($){v.addDummyNode(q,"selfedge",{width:$.label.width,height:$.label.height,rank:Y.rank,order:H+ ++K,e:$.e,label:$.label},"_se")}),delete Y.selfEdges})})}function _(q){t.forEach(q.nodes(),function(G){var U=q.node(G);if(U.dummy==="selfedge"){var K=q.node(U.e.v),J=K.x+K.width/2,H=K.y,Y=U.x-J,$=K.height/2;q.setEdge(U.e,U.label),q.removeNode(G),U.label.points=[{x:J+2*Y/3,y:H-$},{x:J+5*Y/6,y:H-$},{x:J+Y,y:H},{x:J+5*Y/6,y:H+$},{x:J+2*Y/3,y:H+$}],U.label.x=U.x,U.label.y=U.y}})}function z(q,G){return t.mapValues(t.pick(q,G),Number)}function X(q){var G={};return t.forEach(q,function(U,K){G[K.toLowerCase()]=U}),G}return jc}var ev,nE;function QO(){if(nE)return ev;nE=1;var t=it(),e=kt(),r=Qt().Graph;ev={debugOrdering:a};function a(n){var i=e.buildLayerMatrix(n),o=new r({compound:!0,multigraph:!0}).setGraph({});return t.forEach(n.nodes(),function(s){o.setNode(s,{label:s}),o.setParent(s,"layer"+n.node(s).rank)}),t.forEach(n.edges(),function(s){o.setEdge(s.v,s.w,{},s.name)}),t.forEach(i,function(s,u){var l="layer"+u;o.setNode(l,{rank:"same"}),t.reduce(s,function(f,h){return o.setEdge(f,h,{style:"invis"}),h})}),o}return ev}var tv,iE;function JO(){return iE||(iE=1,tv="0.8.5"),tv}var rv,oE;function jO(){return oE||(oE=1,rv={graphlib:Qt(),layout:ZO(),debug:QO(),util:{time:kt().time,notime:kt().notime},version:JO()}),rv}var eI=ni.exports,sE;function tI(){return sE||(sE=1,(function(t,e){(function(a,n){t.exports=n(jO())})(eI,function(r){return(function(a){var n={};function i(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return a[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=a,i.c=n,i.d=function(o,s,u){i.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:u})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,s){if(s&1&&(o=i(o)),s&8||s&4&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(i.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),s&2&&typeof o!="string")for(var l in o)i.d(u,l,(function(f){return o[f]}).bind(null,l));return u},i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,"a",s),s},i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},i.p="",i(i.s=0)})([(function(a,n,i){var o=i(1),s=function(l){l&&l("layout","dagre",o)};typeof cytoscape<"u"&&s(cytoscape),a.exports=s}),(function(a,n,i){function o(v){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(d){return typeof d}:o=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},o(v)}var s=function(c){return typeof c=="function"},u=i(2),l=i(3),f=i(4);function h(v){this.options=l({},u,v)}h.prototype.run=function(){var v=this.options,c=this,d=v.cy,g=v.eles,p=function(_,z){return s(z)?z.apply(_,[_]):z},y=v.boundingBox||{x1:0,y1:0,w:d.width(),h:d.height()};y.x2===void 0&&(y.x2=y.x1+y.w),y.w===void 0&&(y.w=y.x2-y.x1),y.y2===void 0&&(y.y2=y.y1+y.h),y.h===void 0&&(y.h=y.y2-y.y1);var b=new f.graphlib.Graph({multigraph:!0,compound:!0}),m={},E=function(_,z){z!=null&&(m[_]=z)};E("nodesep",v.nodeSep),E("edgesep",v.edgeSep),E("ranksep",v.rankSep),E("rankdir",v.rankDir),E("align",v.align),E("ranker",v.ranker),E("acyclicer",v.acyclicer),b.setGraph(m),b.setDefaultEdgeLabel(function(){return{}}),b.setDefaultNodeLabel(function(){return{}});var T=g.nodes();s(v.sort)&&(T=T.sort(v.sort));for(var L=0;L<T.length;L++){var w=T[L],C=w.layoutDimensions(v);b.setNode(w.id(),{width:C.w,height:C.h,name:w.id()})}for(var A=0;A<T.length;A++){var R=T[A];R.isChild()&&b.setParent(R.id(),R.parent().id())}var S=g.edges().stdFilter(function(F){return!F.source().isParent()&&!F.target().isParent()});s(v.sort)&&(S=S.sort(v.sort));for(var D=0;D<S.length;D++){var P=S[D];b.setEdge(P.source().id(),P.target().id(),{minlen:p(P,v.minLen),weight:p(P,v.edgeWeight),name:P.id()},P.id())}f.layout(b);for(var x=b.nodes(),N=0;N<x.length;N++){var M=x[N],I=b.node(M);d.getElementById(M).scratch().dagre=I}var O;v.boundingBox?(O={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},T.forEach(function(F){var _=F.scratch().dagre;O.x1=Math.min(O.x1,_.x),O.x2=Math.max(O.x2,_.x),O.y1=Math.min(O.y1,_.y),O.y2=Math.max(O.y2,_.y)}),O.w=O.x2-O.x1,O.h=O.y2-O.y1):O=y;var k=function(_){if(v.boundingBox){var z=O.w===0?0:(_.x-O.x1)/O.w,X=O.h===0?0:(_.y-O.y1)/O.h;return{x:y.x1+z*y.w,y:y.y1+X*y.h}}else return _};return T.layoutPositions(c,v,function(F){F=o(F)==="object"?F:this;var _=F.scratch().dagre;return k({x:_.x,y:_.y})}),this},a.exports=h}),(function(a,n){var i={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,align:void 0,acyclicer:void 0,ranker:void 0,minLen:function(s){return 1},edgeWeight:function(s){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(s,u){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(s,u){return u},ready:function(){},sort:void 0,stop:function(){}};a.exports=i}),(function(a,n){a.exports=Object.assign!=null?Object.assign.bind(Object):function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];return s.forEach(function(l){Object.keys(l).forEach(function(f){return i[f]=l[f]})}),i}}),(function(a,n){a.exports=r})])})})(ni)),ni.exports}var rI=tI();const bI=xv(rI);var ii={exports:{}},oi={exports:{}},si={exports:{}},aI=si.exports,uE;function nI(){return uE||(uE=1,(function(t,e){(function(a,n){t.exports=n()})(aI,function(){return(function(r){var a={};function n(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return r[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=r,n.c=a,n.i=function(i){return i},n.d=function(i,o,s){n.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(o,"a",o),o},n.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},n.p="",n(n.s=28)})([(function(r,a,n){function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,r.exports=i}),(function(r,a,n){var i=n(2),o=n(8),s=n(9);function u(f,h,v){i.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=h}u.prototype=Object.create(i.prototype);for(var l in i)u[l]=i[l];u.prototype.getSource=function(){return this.source},u.prototype.getTarget=function(){return this.target},u.prototype.isInterGraph=function(){return this.isInterGraph},u.prototype.getLength=function(){return this.length},u.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},u.prototype.getBendpoints=function(){return this.bendpoints},u.prototype.getLca=function(){return this.lca},u.prototype.getSourceInLca=function(){return this.sourceInLca},u.prototype.getTargetInLca=function(){return this.targetInLca},u.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},u.prototype.getOtherEndInGraph=function(f,h){for(var v=this.getOtherEnd(f),c=h.getGraphManager().getRoot();;){if(v.getOwner()==h)return v;if(v.getOwner()==c)break;v=v.getOwner().getParent()}return null},u.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},u.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},r.exports=u}),(function(r,a,n){function i(o){this.vGraphObject=o}r.exports=i}),(function(r,a,n){var i=n(2),o=n(10),s=n(13),u=n(0),l=n(16),f=n(5);function h(c,d,g,p){g==null&&p==null&&(p=d),i.call(this,p),c.graphManager!=null&&(c=c.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=c,g!=null&&d!=null?this.rect=new s(d.x,d.y,g.width,g.height):this.rect=new s}h.prototype=Object.create(i.prototype);for(var v in i)h[v]=i[v];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(c){this.rect.width=c},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(c){this.rect.height=c},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(c,d){this.rect.x=c.x,this.rect.y=c.y,this.rect.width=d.width,this.rect.height=d.height},h.prototype.setCenter=function(c,d){this.rect.x=c-this.rect.width/2,this.rect.y=d-this.rect.height/2},h.prototype.setLocation=function(c,d){this.rect.x=c,this.rect.y=d},h.prototype.moveBy=function(c,d){this.rect.x+=c,this.rect.y+=d},h.prototype.getEdgeListToNode=function(c){var d=[],g=this;return g.edges.forEach(function(p){if(p.target==c){if(p.source!=g)throw"Incorrect edge source!";d.push(p)}}),d},h.prototype.getEdgesBetween=function(c){var d=[],g=this;return g.edges.forEach(function(p){if(!(p.source==g||p.target==g))throw"Incorrect edge source and/or target";(p.target==c||p.source==c)&&d.push(p)}),d},h.prototype.getNeighborsList=function(){var c=new Set,d=this;return d.edges.forEach(function(g){if(g.source==d)c.add(g.target);else{if(g.target!=d)throw"Incorrect incidency!";c.add(g.source)}}),c},h.prototype.withChildren=function(){var c=new Set,d,g;if(c.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)d=p[y],g=d.withChildren(),g.forEach(function(b){c.add(b)});return c},h.prototype.getNoOfChildren=function(){var c=0,d;if(this.child==null)c=1;else for(var g=this.child.getNodes(),p=0;p<g.length;p++)d=g[p],c+=d.getNoOfChildren();return c==0&&(c=1),c},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var c,d,g=-u.INITIAL_WORLD_BOUNDARY,p=u.INITIAL_WORLD_BOUNDARY;c=u.WORLD_CENTER_X+l.nextDouble()*(p-g)+g;var y=-u.INITIAL_WORLD_BOUNDARY,b=u.INITIAL_WORLD_BOUNDARY;d=u.WORLD_CENTER_Y+l.nextDouble()*(b-y)+y,this.rect.x=c,this.rect.y=d},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var c=this.getChild();if(c.updateBounds(!0),this.rect.x=c.getLeft(),this.rect.y=c.getTop(),this.setWidth(c.getRight()-c.getLeft()),this.setHeight(c.getBottom()-c.getTop()),u.NODE_DIMENSIONS_INCLUDE_LABELS){var d=c.getRight()-c.getLeft(),g=c.getBottom()-c.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(d+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>d?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>g?(this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(g+this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(c){var d=this.rect.x;d>u.WORLD_BOUNDARY?d=u.WORLD_BOUNDARY:d<-u.WORLD_BOUNDARY&&(d=-u.WORLD_BOUNDARY);var g=this.rect.y;g>u.WORLD_BOUNDARY?g=u.WORLD_BOUNDARY:g<-u.WORLD_BOUNDARY&&(g=-u.WORLD_BOUNDARY);var p=new f(d,g),y=c.inverseTransformPoint(p);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},r.exports=h}),(function(r,a,n){var i=n(0);function o(){}for(var s in i)o[s]=i[s];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=o.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,r.exports=o}),(function(r,a,n){function i(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(o){this.x=o},i.prototype.setY=function(o){this.y=o},i.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},r.exports=i}),(function(r,a,n){var i=n(2),o=n(10),s=n(0),u=n(7),l=n(3),f=n(1),h=n(13),v=n(12),c=n(11);function d(p,y,b){i.call(this,b),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof u?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}d.prototype=Object.create(i.prototype);for(var g in i)d[g]=i[g];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(p,y,b){if(y==null&&b==null){var m=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(m)>-1)throw"Node already in graph!";return m.owner=this,this.getNodes().push(m),m}else{var E=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(b)>-1))throw"Source or target not in graph!";if(!(y.owner==b.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=b.owner?null:(E.source=y,E.target=b,E.isInterGraph=!1,this.getEdges().push(E),y.edges.push(E),b!=y&&b.edges.push(E),E)}},d.prototype.remove=function(p){var y=p;if(p instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var b=y.edges.slice(),m,E=b.length,T=0;T<E;T++)m=b[T],m.isInterGraph?this.graphManager.remove(m):m.source.owner.remove(m);var L=this.nodes.indexOf(y);if(L==-1)throw"Node not in owner node list!";this.nodes.splice(L,1)}else if(p instanceof f){var m=p;if(m==null)throw"Edge is null!";if(!(m.source!=null&&m.target!=null))throw"Source and/or target is null!";if(!(m.source.owner!=null&&m.target.owner!=null&&m.source.owner==this&&m.target.owner==this))throw"Source and/or target owner is invalid!";var w=m.source.edges.indexOf(m),C=m.target.edges.indexOf(m);if(!(w>-1&&C>-1))throw"Source and/or target doesn't know this edge!";m.source.edges.splice(w,1),m.target!=m.source&&m.target.edges.splice(C,1);var L=m.source.owner.getEdges().indexOf(m);if(L==-1)throw"Not in owner's edge list!";m.source.owner.getEdges().splice(L,1)}},d.prototype.updateLeftTop=function(){for(var p=o.MAX_VALUE,y=o.MAX_VALUE,b,m,E,T=this.getNodes(),L=T.length,w=0;w<L;w++){var C=T[w];b=C.getTop(),m=C.getLeft(),p>b&&(p=b),y>m&&(y=m)}return p==o.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?E=T[0].getParent().paddingLeft:E=this.margin,this.left=y-E,this.top=p-E,new v(this.left,this.top))},d.prototype.updateBounds=function(p){for(var y=o.MAX_VALUE,b=-o.MAX_VALUE,m=o.MAX_VALUE,E=-o.MAX_VALUE,T,L,w,C,A,R=this.nodes,S=R.length,D=0;D<S;D++){var P=R[D];p&&P.child!=null&&P.updateBounds(),T=P.getLeft(),L=P.getRight(),w=P.getTop(),C=P.getBottom(),y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var x=new h(y,m,b-y,E-m);y==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),R[0].getParent().paddingLeft!=null?A=R[0].getParent().paddingLeft:A=this.margin,this.left=x.x-A,this.right=x.x+x.width+A,this.top=x.y-A,this.bottom=x.y+x.height+A},d.calculateBounds=function(p){for(var y=o.MAX_VALUE,b=-o.MAX_VALUE,m=o.MAX_VALUE,E=-o.MAX_VALUE,T,L,w,C,A=p.length,R=0;R<A;R++){var S=p[R];T=S.getLeft(),L=S.getRight(),w=S.getTop(),C=S.getBottom(),y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var D=new h(y,m,b-y,E-m);return D},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,b=y.length,m=0;m<b;m++){var E=y[m];p+=E.calcEstimatedSize()}return p==0?this.estimatedSize=s.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new c,b=new Set,m=this.nodes[0],E,T,L=m.withChildren();for(L.forEach(function(D){y.push(D),b.add(D)});y.length!==0;){m=y.shift(),E=m.getEdges();for(var w=E.length,C=0;C<w;C++){var A=E[C];if(T=A.getOtherEndInGraph(m,this),T!=null&&!b.has(T)){var R=T.withChildren();R.forEach(function(D){y.push(D),b.add(D)})}}}if(this.isConnected=!1,b.size>=this.nodes.length){var S=0;b.forEach(function(D){D.owner==p&&S++}),S==this.nodes.length&&(this.isConnected=!0)}},r.exports=d}),(function(r,a,n){var i,o=n(1);function s(u){i=n(6),this.layout=u,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var u=this.layout.newGraph(),l=this.layout.newNode(null),f=this.add(u,l);return this.setRootGraph(f),this.rootGraph},s.prototype.add=function(u,l,f,h,v){if(f==null&&h==null&&v==null){if(u==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(u)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(u),u.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return u.parent=l,l.child=u,u}else{v=f,h=l,f=u;var c=h.getOwner(),d=v.getOwner();if(!(c!=null&&c.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(c==d)return f.isInterGraph=!1,c.add(f,h,v);if(f.isInterGraph=!0,f.source=h,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},s.prototype.remove=function(u){if(u instanceof i){var l=u;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(l.getEdges());for(var h,v=f.length,c=0;c<v;c++)h=f[c],l.remove(h);var d=[];d=d.concat(l.getNodes());var g;v=d.length;for(var c=0;c<v;c++)g=d[c],l.remove(g);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(u instanceof o){if(h=u,h==null)throw"Edge is null!";if(!h.isInterGraph)throw"Not an inter-graph edge!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.edges.indexOf(h)!=-1&&h.target.edges.indexOf(h)!=-1))throw"Source and/or target doesn't know this edge!";var p=h.source.edges.indexOf(h);if(h.source.edges.splice(p,1),p=h.target.edges.indexOf(h),h.target.edges.splice(p,1),!(h.source.owner!=null&&h.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(h.source.owner.getGraphManager().edges.indexOf(h)==-1)throw"Not in owner graph manager's edge list!";var p=h.source.owner.getGraphManager().edges.indexOf(h);h.source.owner.getGraphManager().edges.splice(p,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){for(var u=[],l=this.getGraphs(),f=l.length,h=0;h<f;h++)u=u.concat(l[h].getNodes());this.allNodes=u}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var u=[],l=this.getGraphs();l.length;for(var f=0;f<l.length;f++)u=u.concat(l[f].getEdges());u=u.concat(this.edges),this.allEdges=u}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(u){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=u},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(u){if(u.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=u,u.parent==null&&(u.parent=this.layout.newNode("Root node"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(u,l){if(!(u!=null&&l!=null))throw"assert failed";if(u==l)return!0;var f=u.getOwner(),h;do{if(h=f.getParent(),h==null)break;if(h==l)return!0;if(f=h.getOwner(),f==null)break}while(!0);f=l.getOwner();do{if(h=f.getParent(),h==null)break;if(h==u)return!0;if(f=h.getOwner(),f==null)break}while(!0);return!1},s.prototype.calcLowestCommonAncestors=function(){for(var u,l,f,h,v,c=this.getAllEdges(),d=c.length,g=0;g<d;g++){if(u=c[g],l=u.source,f=u.target,u.lca=null,u.sourceInLca=l,u.targetInLca=f,l==f){u.lca=l.getOwner();continue}for(h=l.getOwner();u.lca==null;){for(u.targetInLca=f,v=f.getOwner();u.lca==null;){if(v==h){u.lca=v;break}if(v==this.rootGraph)break;if(u.lca!=null)throw"assert failed";u.targetInLca=v.getParent(),v=u.targetInLca.getOwner()}if(h==this.rootGraph)break;u.lca==null&&(u.sourceInLca=h.getParent(),h=u.sourceInLca.getOwner())}if(u.lca==null)throw"assert failed"}},s.prototype.calcLowestCommonAncestor=function(u,l){if(u==l)return u.getOwner();var f=u.getOwner();do{if(f==null)break;var h=l.getOwner();do{if(h==null)break;if(h==f)return h;h=h.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},s.prototype.calcInclusionTreeDepths=function(u,l){u==null&&l==null&&(u=this.rootGraph,l=1);for(var f,h=u.getNodes(),v=h.length,c=0;c<v;c++)f=h[c],f.inclusionTreeDepth=l,f.child!=null&&this.calcInclusionTreeDepths(f.child,l+1)},s.prototype.includesInvalidEdge=function(){for(var u,l=[],f=this.edges.length,h=0;h<f;h++)u=this.edges[h],this.isOneAncestorOfOther(u.source,u.target)&&l.push(u);for(var h=0;h<l.length;h++)this.remove(l[h]);return!1},r.exports=s}),(function(r,a,n){var i=n(12);function o(){}o.calcSeparationAmount=function(s,u,l,f){if(!s.intersects(u))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(s,u,h),l[0]=Math.min(s.getRight(),u.getRight())-Math.max(s.x,u.x),l[1]=Math.min(s.getBottom(),u.getBottom())-Math.max(s.y,u.y),s.getX()<=u.getX()&&s.getRight()>=u.getRight()?l[0]+=Math.min(u.getX()-s.getX(),s.getRight()-u.getRight()):u.getX()<=s.getX()&&u.getRight()>=s.getRight()&&(l[0]+=Math.min(s.getX()-u.getX(),u.getRight()-s.getRight())),s.getY()<=u.getY()&&s.getBottom()>=u.getBottom()?l[1]+=Math.min(u.getY()-s.getY(),s.getBottom()-u.getBottom()):u.getY()<=s.getY()&&u.getBottom()>=s.getBottom()&&(l[1]+=Math.min(s.getY()-u.getY(),u.getBottom()-s.getBottom()));var v=Math.abs((u.getCenterY()-s.getCenterY())/(u.getCenterX()-s.getCenterX()));u.getCenterY()===s.getCenterY()&&u.getCenterX()===s.getCenterX()&&(v=1);var c=v*l[0],d=l[1]/v;l[0]<d?d=l[0]:c=l[1],l[0]=-1*h[0]*(d/2+f),l[1]=-1*h[1]*(c/2+f)},o.decideDirectionsForOverlappingNodes=function(s,u,l){s.getCenterX()<u.getCenterX()?l[0]=-1:l[0]=1,s.getCenterY()<u.getCenterY()?l[1]=-1:l[1]=1},o.getIntersection2=function(s,u,l){var f=s.getCenterX(),h=s.getCenterY(),v=u.getCenterX(),c=u.getCenterY();if(s.intersects(u))return l[0]=f,l[1]=h,l[2]=v,l[3]=c,!0;var d=s.getX(),g=s.getY(),p=s.getRight(),y=s.getX(),b=s.getBottom(),m=s.getRight(),E=s.getWidthHalf(),T=s.getHeightHalf(),L=u.getX(),w=u.getY(),C=u.getRight(),A=u.getX(),R=u.getBottom(),S=u.getRight(),D=u.getWidthHalf(),P=u.getHeightHalf(),x=!1,N=!1;if(f===v){if(h>c)return l[0]=f,l[1]=g,l[2]=v,l[3]=R,!1;if(h<c)return l[0]=f,l[1]=b,l[2]=v,l[3]=w,!1}else if(h===c){if(f>v)return l[0]=d,l[1]=h,l[2]=C,l[3]=c,!1;if(f<v)return l[0]=p,l[1]=h,l[2]=L,l[3]=c,!1}else{var M=s.height/s.width,I=u.height/u.width,O=(c-h)/(v-f),k=void 0,F=void 0,_=void 0,z=void 0,X=void 0,q=void 0;if(-M===O?f>v?(l[0]=y,l[1]=b,x=!0):(l[0]=p,l[1]=g,x=!0):M===O&&(f>v?(l[0]=d,l[1]=g,x=!0):(l[0]=m,l[1]=b,x=!0)),-I===O?v>f?(l[2]=A,l[3]=R,N=!0):(l[2]=C,l[3]=w,N=!0):I===O&&(v>f?(l[2]=L,l[3]=w,N=!0):(l[2]=S,l[3]=R,N=!0)),x&&N)return!1;if(f>v?h>c?(k=this.getCardinalDirection(M,O,4),F=this.getCardinalDirection(I,O,2)):(k=this.getCardinalDirection(-M,O,3),F=this.getCardinalDirection(-I,O,1)):h>c?(k=this.getCardinalDirection(-M,O,1),F=this.getCardinalDirection(-I,O,3)):(k=this.getCardinalDirection(M,O,2),F=this.getCardinalDirection(I,O,4)),!x)switch(k){case 1:z=g,_=f+-T/O,l[0]=_,l[1]=z;break;case 2:_=m,z=h+E*O,l[0]=_,l[1]=z;break;case 3:z=b,_=f+T/O,l[0]=_,l[1]=z;break;case 4:_=y,z=h+-E*O,l[0]=_,l[1]=z;break}if(!N)switch(F){case 1:q=w,X=v+-P/O,l[2]=X,l[3]=q;break;case 2:X=S,q=c+D*O,l[2]=X,l[3]=q;break;case 3:q=R,X=v+P/O,l[2]=X,l[3]=q;break;case 4:X=A,q=c+-D*O,l[2]=X,l[3]=q;break}}return!1},o.getCardinalDirection=function(s,u,l){return s>u?l:1+l%4},o.getIntersection=function(s,u,l,f){if(f==null)return this.getIntersection2(s,u,l);var h=s.x,v=s.y,c=u.x,d=u.y,g=l.x,p=l.y,y=f.x,b=f.y,m=void 0,E=void 0,T=void 0,L=void 0,w=void 0,C=void 0,A=void 0,R=void 0,S=void 0;return T=d-v,w=h-c,A=c*v-h*d,L=b-p,C=g-y,R=y*p-g*b,S=T*C-L*w,S===0?null:(m=(w*R-C*A)/S,E=(L*A-T*R)/S,new i(m,E))},o.angleOfVector=function(s,u,l,f){var h=void 0;return s!==l?(h=Math.atan((f-u)/(l-s)),l<s?h+=Math.PI:f<u&&(h+=this.TWO_PI)):f<u?h=this.ONE_AND_HALF_PI:h=this.HALF_PI,h},o.doIntersect=function(s,u,l,f){var h=s.x,v=s.y,c=u.x,d=u.y,g=l.x,p=l.y,y=f.x,b=f.y,m=(c-h)*(b-p)-(y-g)*(d-v);if(m===0)return!1;var E=((b-p)*(y-h)+(g-y)*(b-v))/m,T=((v-d)*(y-h)+(c-h)*(b-v))/m;return 0<E&&E<1&&0<T&&T<1},o.findCircleLineIntersections=function(s,u,l,f,h,v,c){var d=(l-s)*(l-s)+(f-u)*(f-u),g=2*((s-h)*(l-s)+(u-v)*(f-u)),p=(s-h)*(s-h)+(u-v)*(u-v)-c*c,y=g*g-4*d*p;if(y>=0){var b=(-g+Math.sqrt(g*g-4*d*p))/(2*d),m=(-g-Math.sqrt(g*g-4*d*p))/(2*d),E=null;return b>=0&&b<=1?[b]:m>=0&&m<=1?[m]:E}else return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,r.exports=o}),(function(r,a,n){function i(){}i.sign=function(o){return o>0?1:o<0?-1:0},i.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},i.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},r.exports=i}),(function(r,a,n){function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,r.exports=i}),(function(r,a,n){var i=(function(){function h(v,c){for(var d=0;d<c.length;d++){var g=c[d];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}return function(v,c,d){return c&&h(v.prototype,c),d&&h(v,d),v}})();function o(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}var s=function(v){return{value:v,next:null,prev:null}},u=function(v,c,d,g){return v!==null?v.next=c:g.head=c,d!==null?d.prev=c:g.tail=c,c.prev=v,c.next=d,g.length++,c},l=function(v,c){var d=v.prev,g=v.next;return d!==null?d.next=g:c.head=g,g!==null?g.prev=d:c.tail=d,v.prev=v.next=null,c.length--,v},f=(function(){function h(v){var c=this;o(this,h),this.length=0,this.head=null,this.tail=null,v!=null&&v.forEach(function(d){return c.push(d)})}return i(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(c,d){return u(d.prev,s(c),d,this)}},{key:"insertAfter",value:function(c,d){return u(d,s(c),d.next,this)}},{key:"insertNodeBefore",value:function(c,d){return u(d.prev,c,d,this)}},{key:"insertNodeAfter",value:function(c,d){return u(d,c,d.next,this)}},{key:"push",value:function(c){return u(this.tail,s(c),null,this)}},{key:"unshift",value:function(c){return u(null,s(c),this.head,this)}},{key:"remove",value:function(c){return l(c,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(c){if(c<=this.length()){for(var d=1,g=this.head;d<c;)g=g.next,d++;return g.value}}},{key:"set_object_at",value:function(c,d){if(c<=this.length()){for(var g=1,p=this.head;g<c;)p=p.next,g++;p.value=d}}}]),h})();r.exports=f}),(function(r,a,n){function i(o,s,u){this.x=null,this.y=null,o==null&&s==null&&u==null?(this.x=0,this.y=0):typeof o=="number"&&typeof s=="number"&&u==null?(this.x=o,this.y=s):o.constructor.name=="Point"&&s==null&&u==null&&(u=o,this.x=u.x,this.y=u.y)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(o,s,u){o.constructor.name=="Point"&&s==null&&u==null?(u=o,this.setLocation(u.x,u.y)):typeof o=="number"&&typeof s=="number"&&u==null&&(parseInt(o)==o&&parseInt(s)==s?this.move(o,s):(this.x=Math.floor(o+.5),this.y=Math.floor(s+.5)))},i.prototype.move=function(o,s){this.x=o,this.y=s},i.prototype.translate=function(o,s){this.x+=o,this.y+=s},i.prototype.equals=function(o){if(o.constructor.name=="Point"){var s=o;return this.x==s.x&&this.y==s.y}return this==o},i.prototype.toString=function(){return new i().constructor.name+"[x="+this.x+",y="+this.y+"]"},r.exports=i}),(function(r,a,n){function i(o,s,u,l){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&s!=null&&u!=null&&l!=null&&(this.x=o,this.y=s,this.width=u,this.height=l)}i.prototype.getX=function(){return this.x},i.prototype.setX=function(o){this.x=o},i.prototype.getY=function(){return this.y},i.prototype.setY=function(o){this.y=o},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(o){this.width=o},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(o){this.height=o},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},r.exports=i}),(function(r,a,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(){}o.lastID=0,o.createID=function(s){return o.isPrimitive(s)?s:(s.uniqueID!=null||(s.uniqueID=o.getString(),o.lastID++),s.uniqueID)},o.getString=function(s){return s==null&&(s=o.lastID),"Object#"+s},o.isPrimitive=function(s){var u=typeof s>"u"?"undefined":i(s);return s==null||u!="object"&&u!="function"},r.exports=o}),(function(r,a,n){function i(g){if(Array.isArray(g)){for(var p=0,y=Array(g.length);p<g.length;p++)y[p]=g[p];return y}else return Array.from(g)}var o=n(0),s=n(7),u=n(3),l=n(1),f=n(6),h=n(5),v=n(17),c=n(29);function d(g){c.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}d.RANDOM_SEED=1,d.prototype=Object.create(c.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var g=new s(this);return this.graphManager=g,g},d.prototype.newGraph=function(g){return new f(null,this.graphManager,g)},d.prototype.newNode=function(g){return new u(this.graphManager,g)},d.prototype.newEdge=function(g){return new l(null,null,g)},d.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var g;return this.checkLayoutSuccess()?g=!1:g=this.layout(),o.ANIMATE==="during"?!1:(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),p=0;p<g.length;p++)g[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},d.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof u){var p=g;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),b=0;b<y.length;b++)update(y[b]);if(p.vGraphObject!=null){var m=p.vGraphObject;m.update(p)}}else if(g instanceof l){var E=g;if(E.vGraphObject!=null){var T=E.vGraphObject;T.update(E)}}else if(g instanceof f){var L=g;if(L.vGraphObject!=null){var w=L.vGraphObject;w.update(L)}}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(g){if(g==null)this.transform(new h(0,0));else{var p=new v,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(g.x),p.setWorldOrgY(g.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var b=this.getAllNodes(),m,E=0;E<b.length;E++)m=b[E],m.transform(p)}}},d.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,b=g.getNodes(),m=0;m<b.length;m++)p=b[m],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},d.prototype.getFlatForest=function(){for(var g=[],p=!0,y=this.graphManager.getRoot().getNodes(),b=!0,m=0;m<y.length;m++)y[m].getChild()!=null&&(b=!1);if(!b)return g;var E=new Set,T=[],L=new Map,w=[];for(w=w.concat(y);w.length>0&&p;){for(T.push(w[0]);T.length>0&&p;){var C=T[0];T.splice(0,1),E.add(C);for(var A=C.getEdges(),m=0;m<A.length;m++){var R=A[m].getOtherEnd(C);if(L.get(C)!=R)if(!E.has(R))T.push(R),L.set(R,C);else{p=!1;break}}}if(!p)g=[];else{var S=[].concat(i(E));g.push(S);for(var m=0;m<S.length;m++){var D=S[m],P=w.indexOf(D);P>-1&&w.splice(P,1)}E=new Set,L=new Map}}return g},d.prototype.createDummyNodesForBendpoints=function(g){for(var p=[],y=g.source,b=this.graphManager.calcLowestCommonAncestor(g.source,g.target),m=0;m<g.bendpoints.length;m++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),b.add(E);var T=this.newEdge(null);this.graphManager.add(T,y,E),p.add(E),y=E}var T=this.newEdge(null);return this.graphManager.add(T,y,g.target),this.edgeToDummyNodes.set(g,p),g.isInterGraph()?this.graphManager.remove(g):b.remove(g),p},d.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(i(this.edgeToDummyNodes.keys())).concat(g);for(var p=0;p<g.length;p++){var y=g[p];if(y.bendpoints.length>0){for(var b=this.edgeToDummyNodes.get(y),m=0;m<b.length;m++){var E=b[m],T=new h(E.getCenterX(),E.getCenterY()),L=y.bendpoints.get(m);L.x=T.x,L.y=T.y,E.getOwner().remove(E)}this.graphManager.add(y,y.source,y.target)}}},d.transform=function(g,p,y,b){if(y!=null&&b!=null){var m=p;if(g<=50){var E=p/y;m-=(p-E)/50*(50-g)}else{var T=p*b;m+=(T-p)/50*(g-50)}return m}else{var L,w;return g<=50?(L=9*p/500,w=p/10):(L=9*p/50,w=-8*p),L*g+w}},d.findCenterOfTree=function(g){var p=[];p=p.concat(g);var y=[],b=new Map,m=!1,E=null;(p.length==1||p.length==2)&&(m=!0,E=p[0]);for(var T=0;T<p.length;T++){var L=p[T],w=L.getNeighborsList().size;b.set(L,L.getNeighborsList().size),w==1&&y.push(L)}var C=[];for(C=C.concat(y);!m;){var A=[];A=A.concat(C),C=[];for(var T=0;T<p.length;T++){var L=p[T],R=p.indexOf(L);R>=0&&p.splice(R,1);var S=L.getNeighborsList();S.forEach(function(x){if(y.indexOf(x)<0){var N=b.get(x),M=N-1;M==1&&C.push(x),b.set(x,M)}})}y=y.concat(C),(p.length==1||p.length==2)&&(m=!0,E=p[0])}return E},d.prototype.setGraphManager=function(g){this.graphManager=g},r.exports=d}),(function(r,a,n){function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},r.exports=i}),(function(r,a,n){var i=n(5);function o(s,u){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var u=0,l=this.lworldExtX;return l!=0&&(u=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/l),u},o.prototype.transformY=function(s){var u=0,l=this.lworldExtY;return l!=0&&(u=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/l),u},o.prototype.inverseTransformX=function(s){var u=0,l=this.ldeviceExtX;return l!=0&&(u=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/l),u},o.prototype.inverseTransformY=function(s){var u=0,l=this.ldeviceExtY;return l!=0&&(u=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/l),u},o.prototype.inverseTransformPoint=function(s){var u=new i(this.inverseTransformX(s.x),this.inverseTransformY(s.y));return u},r.exports=o}),(function(r,a,n){function i(c){if(Array.isArray(c)){for(var d=0,g=Array(c.length);d<c.length;d++)g[d]=c[d];return g}else return Array.from(c)}var o=n(15),s=n(4),u=n(0),l=n(8),f=n(9);function h(){o.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}h.prototype=Object.create(o.prototype);for(var v in o)h[v]=o[v];h.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var c,d,g,p,y,b,m,E=this.getGraphManager().getAllEdges(),T=0;T<E.length;T++)c=E[T],d=c.idealLength,c.isInterGraph&&(p=c.getSource(),y=c.getTarget(),b=c.getSourceInLca().getEstimatedSize(),m=c.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(c.idealLength+=b+m-2*u.SIMPLE_NODE_SIZE),g=c.getLca().getInclusionTreeDepth(),c.idealLength+=d*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(p.getInclusionTreeDepth()+y.getInclusionTreeDepth()-2*g))},h.prototype.initSpringEmbedder=function(){var c=this.getAllNodes().length;this.incremental?(c>s.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(c-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(c>s.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(c-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var c=this.getAllEdges(),d,g=0;g<c.length;g++)d=c[g],this.calcSpringForce(d,d.idealLength)},h.prototype.calcRepulsionForces=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,p,y,b,m=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&c&&this.updateGrid(),E=new Set,g=0;g<m.length;g++)y=m[g],this.calculateRepulsionForceOfANode(y,E,c,d),E.add(y);else for(g=0;g<m.length;g++)for(y=m[g],p=g+1;p<m.length;p++)b=m[p],y.getOwner()==b.getOwner()&&this.calcRepulsionForce(y,b)},h.prototype.calcGravitationalForces=function(){for(var c,d=this.getAllNodesToApplyGravitation(),g=0;g<d.length;g++)c=d[g],this.calcGravitationalForce(c)},h.prototype.moveNodes=function(){for(var c=this.getAllNodes(),d,g=0;g<c.length;g++)d=c[g],d.move()},h.prototype.calcSpringForce=function(c,d){var g=c.getSource(),p=c.getTarget(),y,b,m,E;if(this.uniformLeafNodeSizes&&g.getChild()==null&&p.getChild()==null)c.updateLengthSimple();else if(c.updateLength(),c.isOverlapingSourceAndTarget)return;y=c.getLength(),y!=0&&(b=c.edgeElasticity*(y-d),m=b*(c.lengthX/y),E=b*(c.lengthY/y),g.springForceX+=m,g.springForceY+=E,p.springForceX-=m,p.springForceY-=E)},h.prototype.calcRepulsionForce=function(c,d){var g=c.getRect(),p=d.getRect(),y=new Array(2),b=new Array(4),m,E,T,L,w,C,A;if(g.intersects(p)){l.calcSeparationAmount(g,p,y,s.DEFAULT_EDGE_LENGTH/2),C=2*y[0],A=2*y[1];var R=c.noOfChildren*d.noOfChildren/(c.noOfChildren+d.noOfChildren);c.repulsionForceX-=R*C,c.repulsionForceY-=R*A,d.repulsionForceX+=R*C,d.repulsionForceY+=R*A}else this.uniformLeafNodeSizes&&c.getChild()==null&&d.getChild()==null?(m=p.getCenterX()-g.getCenterX(),E=p.getCenterY()-g.getCenterY()):(l.getIntersection(g,p,b),m=b[2]-b[0],E=b[3]-b[1]),Math.abs(m)<s.MIN_REPULSION_DIST&&(m=f.sign(m)*s.MIN_REPULSION_DIST),Math.abs(E)<s.MIN_REPULSION_DIST&&(E=f.sign(E)*s.MIN_REPULSION_DIST),T=m*m+E*E,L=Math.sqrt(T),w=(c.nodeRepulsion/2+d.nodeRepulsion/2)*c.noOfChildren*d.noOfChildren/T,C=w*m/L,A=w*E/L,c.repulsionForceX-=C,c.repulsionForceY-=A,d.repulsionForceX+=C,d.repulsionForceY+=A},h.prototype.calcGravitationalForce=function(c){var d,g,p,y,b,m,E,T;d=c.getOwner(),g=(d.getRight()+d.getLeft())/2,p=(d.getTop()+d.getBottom())/2,y=c.getCenterX()-g,b=c.getCenterY()-p,m=Math.abs(y)+c.getWidth()/2,E=Math.abs(b)+c.getHeight()/2,c.getOwner()==this.graphManager.getRoot()?(T=d.getEstimatedSize()*this.gravityRangeFactor,(m>T||E>T)&&(c.gravitationForceX=-this.gravityConstant*y,c.gravitationForceY=-this.gravityConstant*b)):(T=d.getEstimatedSize()*this.compoundGravityRangeFactor,(m>T||E>T)&&(c.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,c.gravitationForceY=-this.gravityConstant*b*this.compoundGravityConstant))},h.prototype.isConverged=function(){var c,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),c=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,c||d},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var c,d=this.graphManager.getAllNodes(),g=0;g<d.length;g++)c=d[g],c.noOfChildren=c.getNoOfChildren()},h.prototype.calcGrid=function(c){var d=0,g=0;d=parseInt(Math.ceil((c.getRight()-c.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((c.getBottom()-c.getTop())/this.repulsionRange));for(var p=new Array(d),y=0;y<d;y++)p[y]=new Array(g);for(var y=0;y<d;y++)for(var b=0;b<g;b++)p[y][b]=new Array;return p},h.prototype.addNodeToGrid=function(c,d,g){var p=0,y=0,b=0,m=0;p=parseInt(Math.floor((c.getRect().x-d)/this.repulsionRange)),y=parseInt(Math.floor((c.getRect().width+c.getRect().x-d)/this.repulsionRange)),b=parseInt(Math.floor((c.getRect().y-g)/this.repulsionRange)),m=parseInt(Math.floor((c.getRect().height+c.getRect().y-g)/this.repulsionRange));for(var E=p;E<=y;E++)for(var T=b;T<=m;T++)this.grid[E][T].push(c),c.setGridCoordinates(p,y,b,m)},h.prototype.updateGrid=function(){var c,d,g=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),c=0;c<g.length;c++)d=g[c],this.addNodeToGrid(d,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(c,d,g,p){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&g||p){var y=new Set;c.surrounding=new Array;for(var b,m=this.grid,E=c.startX-1;E<c.finishX+2;E++)for(var T=c.startY-1;T<c.finishY+2;T++)if(!(E<0||T<0||E>=m.length||T>=m[0].length)){for(var L=0;L<m[E][T].length;L++)if(b=m[E][T][L],!(c.getOwner()!=b.getOwner()||c==b)&&!d.has(b)&&!y.has(b)){var w=Math.abs(c.getCenterX()-b.getCenterX())-(c.getWidth()/2+b.getWidth()/2),C=Math.abs(c.getCenterY()-b.getCenterY())-(c.getHeight()/2+b.getHeight()/2);w<=this.repulsionRange&&C<=this.repulsionRange&&y.add(b)}}c.surrounding=[].concat(i(y))}for(E=0;E<c.surrounding.length;E++)this.calcRepulsionForce(c,c.surrounding[E])},h.prototype.calcRepulsionRange=function(){return 0},r.exports=h}),(function(r,a,n){var i=n(1),o=n(4);function s(l,f,h){i.call(this,l,f,h),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}s.prototype=Object.create(i.prototype);for(var u in i)s[u]=i[u];r.exports=s}),(function(r,a,n){var i=n(3),o=n(4);function s(l,f,h,v){i.call(this,l,f,h,v),this.nodeRepulsion=o.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}s.prototype=Object.create(i.prototype);for(var u in i)s[u]=i[u];s.prototype.setGridCoordinates=function(l,f,h,v){this.startX=l,this.finishX=f,this.startY=h,this.finishY=v},r.exports=s}),(function(r,a,n){function i(o,s){this.width=0,this.height=0,o!==null&&s!==null&&(this.height=s,this.width=o)}i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(o){this.width=o},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(o){this.height=o},r.exports=i}),(function(r,a,n){var i=n(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(s,u){var l=i.createID(s);this.contains(l)||(this.map[l]=u,this.keys.push(s))},o.prototype.contains=function(s){return i.createID(s),this.map[s]!=null},o.prototype.get=function(s){var u=i.createID(s);return this.map[u]},o.prototype.keySet=function(){return this.keys},r.exports=o}),(function(r,a,n){var i=n(14);function o(){this.set={}}o.prototype.add=function(s){var u=i.createID(s);this.contains(u)||(this.set[u]=s)},o.prototype.remove=function(s){delete this.set[i.createID(s)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(s){return this.set[i.createID(s)]==s},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(s){for(var u=Object.keys(this.set),l=u.length,f=0;f<l;f++)s.push(this.set[u[f]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(s){for(var u=s.length,l=0;l<u;l++){var f=s[l];this.add(f)}},r.exports=o}),(function(r,a,n){function i(){}i.multMat=function(o,s){for(var u=[],l=0;l<o.length;l++){u[l]=[];for(var f=0;f<s[0].length;f++){u[l][f]=0;for(var h=0;h<o[0].length;h++)u[l][f]+=o[l][h]*s[h][f]}}return u},i.transpose=function(o){for(var s=[],u=0;u<o[0].length;u++){s[u]=[];for(var l=0;l<o.length;l++)s[u][l]=o[l][u]}return s},i.multCons=function(o,s){for(var u=[],l=0;l<o.length;l++)u[l]=o[l]*s;return u},i.minusOp=function(o,s){for(var u=[],l=0;l<o.length;l++)u[l]=o[l]-s[l];return u},i.dotProduct=function(o,s){for(var u=0,l=0;l<o.length;l++)u+=o[l]*s[l];return u},i.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},i.normalize=function(o){for(var s=[],u=this.mag(o),l=0;l<o.length;l++)s[l]=o[l]/u;return s},i.multGamma=function(o){for(var s=[],u=0,l=0;l<o.length;l++)u+=o[l];u*=-1/o.length;for(var f=0;f<o.length;f++)s[f]=u+o[f];return s},i.multL=function(o,s,u){for(var l=[],f=[],h=[],v=0;v<s[0].length;v++){for(var c=0,d=0;d<s.length;d++)c+=-.5*s[d][v]*o[d];f[v]=c}for(var g=0;g<u.length;g++){for(var p=0,y=0;y<u.length;y++)p+=u[g][y]*f[y];h[g]=p}for(var b=0;b<s.length;b++){for(var m=0,E=0;E<s[0].length;E++)m+=s[b][E]*h[E];l[b]=m}return l},r.exports=i}),(function(r,a,n){var i=(function(){function l(f,h){for(var v=0;v<h.length;v++){var c=h[v];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}return function(f,h,v){return h&&l(f.prototype,h),v&&l(f,v),f}})();function o(l,f){if(!(l instanceof f))throw new TypeError("Cannot call a class as a function")}var s=n(11),u=(function(){function l(f,h){o(this,l),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var v=void 0;f instanceof s?v=f.size():v=f.length,this._quicksort(f,0,v-1)}return i(l,[{key:"_quicksort",value:function(h,v,c){if(v<c){var d=this._partition(h,v,c);this._quicksort(h,v,d),this._quicksort(h,d+1,c)}}},{key:"_partition",value:function(h,v,c){for(var d=this._get(h,v),g=v,p=c;;){for(;this.compareFunction(d,this._get(h,p));)p--;for(;this.compareFunction(this._get(h,g),d);)g++;if(g<p)this._swap(h,g,p),g++,p--;else return p}}},{key:"_get",value:function(h,v){return h instanceof s?h.get_object_at(v):h[v]}},{key:"_set",value:function(h,v,c){h instanceof s?h.set_object_at(v,c):h[v]=c}},{key:"_swap",value:function(h,v,c){var d=this._get(h,v);this._set(h,v,this._get(h,c)),this._set(h,c,d)}},{key:"_defaultCompareFunction",value:function(h,v){return v>h}}]),l})();r.exports=u}),(function(r,a,n){function i(){}i.svd=function(o){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=o.length,this.n=o[0].length;var s=Math.min(this.m,this.n);this.s=(function(Ie){for(var qe=[];Ie-- >0;)qe.push(0);return qe})(Math.min(this.m+1,this.n)),this.U=(function(Ie){var qe=function ze(Ze){if(Ze.length==0)return 0;for(var tt=[],We=0;We<Ze[0];We++)tt.push(ze(Ze.slice(1)));return tt};return qe(Ie)})([this.m,s]),this.V=(function(Ie){var qe=function ze(Ze){if(Ze.length==0)return 0;for(var tt=[],We=0;We<Ze[0];We++)tt.push(ze(Ze.slice(1)));return tt};return qe(Ie)})([this.n,this.n]);for(var u=(function(Ie){for(var qe=[];Ie-- >0;)qe.push(0);return qe})(this.n),l=(function(Ie){for(var qe=[];Ie-- >0;)qe.push(0);return qe})(this.m),f=!0,h=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),c=0;c<Math.max(h,v);c++){if(c<h){this.s[c]=0;for(var d=c;d<this.m;d++)this.s[c]=i.hypot(this.s[c],o[d][c]);if(this.s[c]!==0){o[c][c]<0&&(this.s[c]=-this.s[c]);for(var g=c;g<this.m;g++)o[g][c]/=this.s[c];o[c][c]+=1}this.s[c]=-this.s[c]}for(var p=c+1;p<this.n;p++){if((function(Ie,qe){return Ie&&qe})(c<h,this.s[c]!==0)){for(var y=0,b=c;b<this.m;b++)y+=o[b][c]*o[b][p];y=-y/o[c][c];for(var m=c;m<this.m;m++)o[m][p]+=y*o[m][c]}u[p]=o[c][p]}if((function(Ie,qe){return qe})(f,c<h))for(var E=c;E<this.m;E++)this.U[E][c]=o[E][c];if(c<v){u[c]=0;for(var T=c+1;T<this.n;T++)u[c]=i.hypot(u[c],u[T]);if(u[c]!==0){u[c+1]<0&&(u[c]=-u[c]);for(var L=c+1;L<this.n;L++)u[L]/=u[c];u[c+1]+=1}if(u[c]=-u[c],(function(Ie,qe){return Ie&&qe})(c+1<this.m,u[c]!==0)){for(var w=c+1;w<this.m;w++)l[w]=0;for(var C=c+1;C<this.n;C++)for(var A=c+1;A<this.m;A++)l[A]+=u[C]*o[A][C];for(var R=c+1;R<this.n;R++)for(var S=-u[R]/u[c+1],D=c+1;D<this.m;D++)o[D][R]+=S*l[D]}for(var P=c+1;P<this.n;P++)this.V[P][c]=u[P]}}var x=Math.min(this.n,this.m+1);h<this.n&&(this.s[h]=o[h][h]),this.m<x&&(this.s[x-1]=0),v+1<x&&(u[v]=o[v][x-1]),u[x-1]=0;{for(var N=h;N<s;N++){for(var M=0;M<this.m;M++)this.U[M][N]=0;this.U[N][N]=1}for(var I=h-1;I>=0;I--)if(this.s[I]!==0){for(var O=I+1;O<s;O++){for(var k=0,F=I;F<this.m;F++)k+=this.U[F][I]*this.U[F][O];k=-k/this.U[I][I];for(var _=I;_<this.m;_++)this.U[_][O]+=k*this.U[_][I]}for(var z=I;z<this.m;z++)this.U[z][I]=-this.U[z][I];this.U[I][I]=1+this.U[I][I];for(var X=0;X<I-1;X++)this.U[X][I]=0}else{for(var q=0;q<this.m;q++)this.U[q][I]=0;this.U[I][I]=1}}for(var G=this.n-1;G>=0;G--){if((function(Ie,qe){return Ie&&qe})(G<v,u[G]!==0))for(var U=G+1;U<s;U++){for(var K=0,J=G+1;J<this.n;J++)K+=this.V[J][G]*this.V[J][U];K=-K/this.V[G+1][G];for(var H=G+1;H<this.n;H++)this.V[H][U]+=K*this.V[H][G]}for(var Y=0;Y<this.n;Y++)this.V[Y][G]=0;this.V[G][G]=1}for(var $=x-1,Q=Math.pow(2,-52),ee=Math.pow(2,-966);x>0;){var te=void 0,he=void 0;for(te=x-2;te>=-1&&te!==-1;te--)if(Math.abs(u[te])<=ee+Q*(Math.abs(this.s[te])+Math.abs(this.s[te+1]))){u[te]=0;break}if(te===x-2)he=4;else{var xe=void 0;for(xe=x-1;xe>=te&&xe!==te;xe--){var le=(xe!==x?Math.abs(u[xe]):0)+(xe!==te+1?Math.abs(u[xe-1]):0);if(Math.abs(this.s[xe])<=ee+Q*le){this.s[xe]=0;break}}xe===te?he=3:xe===x-1?he=1:(he=2,te=xe)}switch(te++,he){case 1:{var se=u[x-2];u[x-2]=0;for(var ve=x-2;ve>=te;ve--){var ce=i.hypot(this.s[ve],se),ye=this.s[ve]/ce,ge=se/ce;this.s[ve]=ce,ve!==te&&(se=-ge*u[ve-1],u[ve-1]=ye*u[ve-1]);for(var de=0;de<this.n;de++)ce=ye*this.V[de][ve]+ge*this.V[de][x-1],this.V[de][x-1]=-ge*this.V[de][ve]+ye*this.V[de][x-1],this.V[de][ve]=ce}}break;case 2:{var be=u[te-1];u[te-1]=0;for(var Re=te;Re<x;Re++){var Pe=i.hypot(this.s[Re],be),Be=this.s[Re]/Pe,Ne=be/Pe;this.s[Re]=Pe,be=-Ne*u[Re],u[Re]=Be*u[Re];for(var Me=0;Me<this.m;Me++)Pe=Be*this.U[Me][Re]+Ne*this.U[Me][te-1],this.U[Me][te-1]=-Ne*this.U[Me][Re]+Be*this.U[Me][te-1],this.U[Me][Re]=Pe}}break;case 3:{var ne=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[x-1]),Math.abs(this.s[x-2])),Math.abs(u[x-2])),Math.abs(this.s[te])),Math.abs(u[te])),B=this.s[x-1]/ne,V=this.s[x-2]/ne,W=u[x-2]/ne,Z=this.s[te]/ne,j=u[te]/ne,ae=((V+B)*(V-B)+W*W)/2,re=B*W*(B*W),ie=0;(function(Ie,qe){return Ie||qe})(ae!==0,re!==0)&&(ie=Math.sqrt(ae*ae+re),ae<0&&(ie=-ie),ie=re/(ae+ie));for(var ue=(Z+B)*(Z-B)+ie,oe=Z*j,fe=te;fe<x-1;fe++){var me=i.hypot(ue,oe),pe=ue/me,we=oe/me;fe!==te&&(u[fe-1]=me),ue=pe*this.s[fe]+we*u[fe],u[fe]=pe*u[fe]-we*this.s[fe],oe=we*this.s[fe+1],this.s[fe+1]=pe*this.s[fe+1];for(var De=0;De<this.n;De++)me=pe*this.V[De][fe]+we*this.V[De][fe+1],this.V[De][fe+1]=-we*this.V[De][fe]+pe*this.V[De][fe+1],this.V[De][fe]=me;if(me=i.hypot(ue,oe),pe=ue/me,we=oe/me,this.s[fe]=me,ue=pe*u[fe]+we*this.s[fe+1],this.s[fe+1]=-we*u[fe]+pe*this.s[fe+1],oe=we*u[fe+1],u[fe+1]=pe*u[fe+1],fe<this.m-1)for(var Le=0;Le<this.m;Le++)me=pe*this.U[Le][fe]+we*this.U[Le][fe+1],this.U[Le][fe+1]=-we*this.U[Le][fe]+pe*this.U[Le][fe+1],this.U[Le][fe]=me}u[x-2]=ue}break;case 4:{if(this.s[te]<=0){this.s[te]=this.s[te]<0?-this.s[te]:0;for(var Te=0;Te<=$;Te++)this.V[Te][te]=-this.V[Te][te]}for(;te<$&&!(this.s[te]>=this.s[te+1]);){var ke=this.s[te];if(this.s[te]=this.s[te+1],this.s[te+1]=ke,te<this.n-1)for(var Ce=0;Ce<this.n;Ce++)ke=this.V[Ce][te+1],this.V[Ce][te+1]=this.V[Ce][te],this.V[Ce][te]=ke;if(te<this.m-1)for(var Ae=0;Ae<this.m;Ae++)ke=this.U[Ae][te+1],this.U[Ae][te+1]=this.U[Ae][te],this.U[Ae][te]=ke;te++}x--}break}}var Ue={U:this.U,V:this.V,S:this.s};return Ue},i.hypot=function(o,s){var u=void 0;return Math.abs(o)>Math.abs(s)?(u=s/o,u=Math.abs(o)*Math.sqrt(1+u*u)):s!=0?(u=o/s,u=Math.abs(s)*Math.sqrt(1+u*u)):u=0,u},r.exports=i}),(function(r,a,n){var i=(function(){function u(l,f){for(var h=0;h<f.length;h++){var v=f[h];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,v.key,v)}}return function(l,f,h){return f&&u(l.prototype,f),h&&u(l,h),l}})();function o(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}var s=(function(){function u(l,f){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,u),this.sequence1=l,this.sequence2=f,this.match_score=h,this.mismatch_penalty=v,this.gap_penalty=c,this.iMax=l.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var d=0;d<this.iMax;d++){this.grid[d]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[d][g]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[p][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return i(u,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var c=1;c<this.jMax;c++){var d=void 0;this.sequence1[v-1]===this.sequence2[c-1]?d=this.grid[v-1][c-1]+this.match_score:d=this.grid[v-1][c-1]+this.mismatch_penalty;var g=this.grid[v-1][c]+this.gap_penalty,p=this.grid[v][c-1]+this.gap_penalty,y=[d,g,p],b=this.arrayAllMaxIndexes(y);this.grid[v][c]=y[b[0]],this.tracebackGrid[v][c]=[b.includes(0),b.includes(1),b.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var h=f[0],v=this.tracebackGrid[h.pos[0]][h.pos[1]];v[0]&&f.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),v[1]&&f.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),v[2]&&f.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,h){for(var v=[],c=-1;(c=f.indexOf(h,c+1))!==-1;)v.push(c);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),u})();r.exports=s}),(function(r,a,n){var i=function(){};i.FDLayout=n(18),i.FDLayoutConstants=n(4),i.FDLayoutEdge=n(19),i.FDLayoutNode=n(20),i.DimensionD=n(21),i.HashMap=n(22),i.HashSet=n(23),i.IGeometry=n(8),i.IMath=n(9),i.Integer=n(10),i.Point=n(12),i.PointD=n(5),i.RandomSeed=n(16),i.RectangleD=n(13),i.Transform=n(17),i.UniqueIDGeneretor=n(14),i.Quicksort=n(25),i.LinkedList=n(11),i.LGraphObject=n(2),i.LGraph=n(6),i.LEdge=n(1),i.LGraphManager=n(7),i.LNode=n(3),i.Layout=n(15),i.LayoutConstants=n(0),i.NeedlemanWunsch=n(27),i.Matrix=n(24),i.SVD=n(26),r.exports=i}),(function(r,a,n){function i(){this.listeners=[]}var o=i.prototype;o.addListener=function(s,u){this.listeners.push({event:s,callback:u})},o.removeListener=function(s,u){for(var l=this.listeners.length;l>=0;l--){var f=this.listeners[l];f.event===s&&f.callback===u&&this.listeners.splice(l,1)}},o.emit=function(s,u){for(var l=0;l<this.listeners.length;l++){var f=this.listeners[l];s===f.event&&f.callback(u)}},r.exports=i})])})})(si)),si.exports}var iI=oi.exports,lE;function oI(){return lE||(lE=1,(function(t,e){(function(a,n){t.exports=n(nI())})(iI,function(r){return(()=>{var a={45:((s,u,l)=>{var f={};f.layoutBase=l(551),f.CoSEConstants=l(806),f.CoSEEdge=l(767),f.CoSEGraph=l(880),f.CoSEGraphManager=l(578),f.CoSELayout=l(765),f.CoSENode=l(991),f.ConstraintHandler=l(902),s.exports=f}),806:((s,u,l)=>{var f=l(551).FDLayoutConstants;function h(){}for(var v in f)h[v]=f[v];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,h.DEFAULT_COMPONENT_SEPERATION=60,h.TILE=!0,h.TILING_PADDING_VERTICAL=10,h.TILING_PADDING_HORIZONTAL=10,h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0,h.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,h.TREE_REDUCTION_ON_INCREMENTAL=!0,h.PURE_INCREMENTAL=h.DEFAULT_INCREMENTAL,s.exports=h}),767:((s,u,l)=>{var f=l(551).FDLayoutEdge;function h(c,d,g){f.call(this,c,d,g)}h.prototype=Object.create(f.prototype);for(var v in f)h[v]=f[v];s.exports=h}),880:((s,u,l)=>{var f=l(551).LGraph;function h(c,d,g){f.call(this,c,d,g)}h.prototype=Object.create(f.prototype);for(var v in f)h[v]=f[v];s.exports=h}),578:((s,u,l)=>{var f=l(551).LGraphManager;function h(c){f.call(this,c)}h.prototype=Object.create(f.prototype);for(var v in f)h[v]=f[v];s.exports=h}),765:((s,u,l)=>{var f=l(551).FDLayout,h=l(578),v=l(880),c=l(991),d=l(767),g=l(806),p=l(902),y=l(551).FDLayoutConstants,b=l(551).LayoutConstants,m=l(551).Point,E=l(551).PointD,T=l(551).DimensionD,L=l(551).Layout,w=l(551).Integer,C=l(551).IGeometry,A=l(551).LGraph,R=l(551).Transform,S=l(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var P in f)D[P]=f[P];D.prototype.newGraphManager=function(){var x=new h(this);return this.graphManager=x,x},D.prototype.newGraph=function(x){return new v(null,this.graphManager,x)},D.prototype.newNode=function(x){return new c(this.graphManager,x)},D.prototype.newEdge=function(x){return new d(null,null,x)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(g.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=g.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=g.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=y.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=y.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=y.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/y.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var x=b.DEFAULT_CREATE_BENDS_AS_NEEDED;return x&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(g.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),M=this.nodesWithGravity.filter(function(k){return N.has(k)});this.graphManager.setAllNodesToApplyGravitation(M)}}else{var x=this.getFlatForest();if(x.length>0)this.positionNodesRadially(x);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),M=this.nodesWithGravity.filter(function(I){return N.has(I)});this.graphManager.setAllNodesToApplyGravitation(M),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(p.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),g.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%y.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var x=new Set(this.getAllNodes()),N=this.nodesWithGravity.filter(function(O){return x.has(O)});this.graphManager.setAllNodesToApplyGravitation(N),this.graphManager.updateBounds(),this.updateGrid(),g.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),g.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var M=!this.isTreeGrowing&&!this.isGrowthFinished,I=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(M,I),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var x=this.graphManager.getAllNodes(),N={},M=0;M<x.length;M++){var I=x[M].rect,O=x[M].id;N[O]={id:O,x:I.getCenterX(),y:I.getCenterY(),w:I.width,h:I.height}}return N},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var x=!1;if(y.ANIMATE==="during")this.emit("layoutstarted");else{for(;!x;)x=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var x=this.getAllNodes(),N,M=0;M<x.length;M++)N=x[M],N.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var M=0;M<x.length;M++)N=x[M],N.move()},D.prototype.initConstraintVariables=function(){var x=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var N=this.graphManager.getAllNodes(),M=0;M<N.length;M++){var I=N[M];this.idToNodeMap.set(I.id,I)}var O=function H(Y){for(var $=Y.getChild().getNodes(),Q,ee=0,te=0;te<$.length;te++)Q=$[te],Q.getChild()==null?x.fixedNodeSet.has(Q.id)&&(ee+=100):ee+=H(Q);return ee};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){x.fixedNodeSet.add($.nodeId)});for(var N=this.graphManager.getAllNodes(),I,M=0;M<N.length;M++)if(I=N[M],I.getChild()!=null){var k=O(I);k>0&&(I.fixedNodeWeight=k)}}if(this.constraints.relativePlacementConstraint){var F=new Map,_=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(H){x.fixedNodesOnHorizontal.add(H),x.fixedNodesOnVertical.add(H)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var z=this.constraints.alignmentConstraint.vertical,M=0;M<z.length;M++)this.dummyToNodeForVerticalAlignment.set("dummy"+M,[]),z[M].forEach(function(Y){F.set(Y,"dummy"+M),x.dummyToNodeForVerticalAlignment.get("dummy"+M).push(Y),x.fixedNodeSet.has(Y)&&x.fixedNodesOnHorizontal.add("dummy"+M)});if(this.constraints.alignmentConstraint.horizontal)for(var X=this.constraints.alignmentConstraint.horizontal,M=0;M<X.length;M++)this.dummyToNodeForHorizontalAlignment.set("dummy"+M,[]),X[M].forEach(function(Y){_.set(Y,"dummy"+M),x.dummyToNodeForHorizontalAlignment.get("dummy"+M).push(Y),x.fixedNodeSet.has(Y)&&x.fixedNodesOnVertical.add("dummy"+M)})}if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(H){var Y,$,Q;for(Q=H.length-1;Q>=2*H.length/3;Q--)Y=Math.floor(Math.random()*(Q+1)),$=H[Q],H[Q]=H[Y],H[Y]=$;return H},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(H){if(H.left){var Y=F.has(H.left)?F.get(H.left):H.left,$=F.has(H.right)?F.get(H.right):H.right;x.nodesInRelativeHorizontal.includes(Y)||(x.nodesInRelativeHorizontal.push(Y),x.nodeToRelativeConstraintMapHorizontal.set(Y,[]),x.dummyToNodeForVerticalAlignment.has(Y)?x.nodeToTempPositionMapHorizontal.set(Y,x.idToNodeMap.get(x.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):x.nodeToTempPositionMapHorizontal.set(Y,x.idToNodeMap.get(Y).getCenterX())),x.nodesInRelativeHorizontal.includes($)||(x.nodesInRelativeHorizontal.push($),x.nodeToRelativeConstraintMapHorizontal.set($,[]),x.dummyToNodeForVerticalAlignment.has($)?x.nodeToTempPositionMapHorizontal.set($,x.idToNodeMap.get(x.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):x.nodeToTempPositionMapHorizontal.set($,x.idToNodeMap.get($).getCenterX())),x.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:$,gap:H.gap}),x.nodeToRelativeConstraintMapHorizontal.get($).push({left:Y,gap:H.gap})}else{var Q=_.has(H.top)?_.get(H.top):H.top,ee=_.has(H.bottom)?_.get(H.bottom):H.bottom;x.nodesInRelativeVertical.includes(Q)||(x.nodesInRelativeVertical.push(Q),x.nodeToRelativeConstraintMapVertical.set(Q,[]),x.dummyToNodeForHorizontalAlignment.has(Q)?x.nodeToTempPositionMapVertical.set(Q,x.idToNodeMap.get(x.dummyToNodeForHorizontalAlignment.get(Q)[0]).getCenterY()):x.nodeToTempPositionMapVertical.set(Q,x.idToNodeMap.get(Q).getCenterY())),x.nodesInRelativeVertical.includes(ee)||(x.nodesInRelativeVertical.push(ee),x.nodeToRelativeConstraintMapVertical.set(ee,[]),x.dummyToNodeForHorizontalAlignment.has(ee)?x.nodeToTempPositionMapVertical.set(ee,x.idToNodeMap.get(x.dummyToNodeForHorizontalAlignment.get(ee)[0]).getCenterY()):x.nodeToTempPositionMapVertical.set(ee,x.idToNodeMap.get(ee).getCenterY())),x.nodeToRelativeConstraintMapVertical.get(Q).push({bottom:ee,gap:H.gap}),x.nodeToRelativeConstraintMapVertical.get(ee).push({top:Q,gap:H.gap})}});else{var q=new Map,G=new Map;this.constraints.relativePlacementConstraint.forEach(function(H){if(H.left){var Y=F.has(H.left)?F.get(H.left):H.left,$=F.has(H.right)?F.get(H.right):H.right;q.has(Y)?q.get(Y).push($):q.set(Y,[$]),q.has($)?q.get($).push(Y):q.set($,[Y])}else{var Q=_.has(H.top)?_.get(H.top):H.top,ee=_.has(H.bottom)?_.get(H.bottom):H.bottom;G.has(Q)?G.get(Q).push(ee):G.set(Q,[ee]),G.has(ee)?G.get(ee).push(Q):G.set(ee,[Q])}});var U=function(Y,$){var Q=[],ee=[],te=new S,he=new Set,xe=0;return Y.forEach(function(le,se){if(!he.has(se)){Q[xe]=[],ee[xe]=!1;var ve=se;for(te.push(ve),he.add(ve),Q[xe].push(ve);te.length!=0;){ve=te.shift(),$.has(ve)&&(ee[xe]=!0);var ce=Y.get(ve);ce.forEach(function(ye){he.has(ye)||(te.push(ye),he.add(ye),Q[xe].push(ye))})}xe++}}),{components:Q,isFixed:ee}},K=U(q,x.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.isFixed;var J=U(G,x.fixedNodesOnVertical);this.componentsOnVertical=J.components,this.fixedComponentsOnVertical=J.isFixed}}},D.prototype.updateDisplacements=function(){var x=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(J){var H=x.idToNodeMap.get(J.nodeId);H.displacementX=0,H.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var N=this.constraints.alignmentConstraint.vertical,M=0;M<N.length;M++){for(var I=0,O=0;O<N[M].length;O++){if(this.fixedNodeSet.has(N[M][O])){I=0;break}I+=this.idToNodeMap.get(N[M][O]).displacementX}for(var k=I/N[M].length,O=0;O<N[M].length;O++)this.idToNodeMap.get(N[M][O]).displacementX=k}if(this.constraints.alignmentConstraint.horizontal)for(var F=this.constraints.alignmentConstraint.horizontal,M=0;M<F.length;M++){for(var _=0,O=0;O<F[M].length;O++){if(this.fixedNodeSet.has(F[M][O])){_=0;break}_+=this.idToNodeMap.get(F[M][O]).displacementY}for(var z=_/F[M].length,O=0;O<F[M].length;O++)this.idToNodeMap.get(F[M][O]).displacementY=z}}if(this.constraints.relativePlacementConstraint)if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(J){if(!x.fixedNodesOnHorizontal.has(J)){var H=0;x.dummyToNodeForVerticalAlignment.has(J)?H=x.idToNodeMap.get(x.dummyToNodeForVerticalAlignment.get(J)[0]).displacementX:H=x.idToNodeMap.get(J).displacementX,x.nodeToRelativeConstraintMapHorizontal.get(J).forEach(function(Y){if(Y.right){var $=x.nodeToTempPositionMapHorizontal.get(Y.right)-x.nodeToTempPositionMapHorizontal.get(J)-H;$<Y.gap&&(H-=Y.gap-$)}else{var $=x.nodeToTempPositionMapHorizontal.get(J)-x.nodeToTempPositionMapHorizontal.get(Y.left)+H;$<Y.gap&&(H+=Y.gap-$)}}),x.nodeToTempPositionMapHorizontal.set(J,x.nodeToTempPositionMapHorizontal.get(J)+H),x.dummyToNodeForVerticalAlignment.has(J)?x.dummyToNodeForVerticalAlignment.get(J).forEach(function(Y){x.idToNodeMap.get(Y).displacementX=H}):x.idToNodeMap.get(J).displacementX=H}}),this.nodesInRelativeVertical.forEach(function(J){if(!x.fixedNodesOnHorizontal.has(J)){var H=0;x.dummyToNodeForHorizontalAlignment.has(J)?H=x.idToNodeMap.get(x.dummyToNodeForHorizontalAlignment.get(J)[0]).displacementY:H=x.idToNodeMap.get(J).displacementY,x.nodeToRelativeConstraintMapVertical.get(J).forEach(function(Y){if(Y.bottom){var $=x.nodeToTempPositionMapVertical.get(Y.bottom)-x.nodeToTempPositionMapVertical.get(J)-H;$<Y.gap&&(H-=Y.gap-$)}else{var $=x.nodeToTempPositionMapVertical.get(J)-x.nodeToTempPositionMapVertical.get(Y.top)+H;$<Y.gap&&(H+=Y.gap-$)}}),x.nodeToTempPositionMapVertical.set(J,x.nodeToTempPositionMapVertical.get(J)+H),x.dummyToNodeForHorizontalAlignment.has(J)?x.dummyToNodeForHorizontalAlignment.get(J).forEach(function(Y){x.idToNodeMap.get(Y).displacementY=H}):x.idToNodeMap.get(J).displacementY=H}});else{for(var M=0;M<this.componentsOnHorizontal.length;M++){var X=this.componentsOnHorizontal[M];if(this.fixedComponentsOnHorizontal[M])for(var O=0;O<X.length;O++)this.dummyToNodeForVerticalAlignment.has(X[O])?this.dummyToNodeForVerticalAlignment.get(X[O]).forEach(function(Y){x.idToNodeMap.get(Y).displacementX=0}):this.idToNodeMap.get(X[O]).displacementX=0;else{for(var q=0,G=0,O=0;O<X.length;O++)if(this.dummyToNodeForVerticalAlignment.has(X[O])){var U=this.dummyToNodeForVerticalAlignment.get(X[O]);q+=U.length*this.idToNodeMap.get(U[0]).displacementX,G+=U.length}else q+=this.idToNodeMap.get(X[O]).displacementX,G++;for(var K=q/G,O=0;O<X.length;O++)this.dummyToNodeForVerticalAlignment.has(X[O])?this.dummyToNodeForVerticalAlignment.get(X[O]).forEach(function(Y){x.idToNodeMap.get(Y).displacementX=K}):this.idToNodeMap.get(X[O]).displacementX=K}}for(var M=0;M<this.componentsOnVertical.length;M++){var X=this.componentsOnVertical[M];if(this.fixedComponentsOnVertical[M])for(var O=0;O<X.length;O++)this.dummyToNodeForHorizontalAlignment.has(X[O])?this.dummyToNodeForHorizontalAlignment.get(X[O]).forEach(function($){x.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(X[O]).displacementY=0;else{for(var q=0,G=0,O=0;O<X.length;O++)if(this.dummyToNodeForHorizontalAlignment.has(X[O])){var U=this.dummyToNodeForHorizontalAlignment.get(X[O]);q+=U.length*this.idToNodeMap.get(U[0]).displacementY,G+=U.length}else q+=this.idToNodeMap.get(X[O]).displacementY,G++;for(var K=q/G,O=0;O<X.length;O++)this.dummyToNodeForHorizontalAlignment.has(X[O])?this.dummyToNodeForHorizontalAlignment.get(X[O]).forEach(function(te){x.idToNodeMap.get(te).displacementY=K}):this.idToNodeMap.get(X[O]).displacementY=K}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var x=[],N,M=this.graphManager.getGraphs(),I=M.length,O;for(O=0;O<I;O++)N=M[O],N.updateConnected(),N.isConnected||(x=x.concat(N.getNodes()));return x},D.prototype.createBendpoints=function(){var x=[];x=x.concat(this.graphManager.getAllEdges());var N=new Set,M;for(M=0;M<x.length;M++){var I=x[M];if(!N.has(I)){var O=I.getSource(),k=I.getTarget();if(O==k)I.getBendpoints().push(new E),I.getBendpoints().push(new E),this.createDummyNodesForBendpoints(I),N.add(I);else{var F=[];if(F=F.concat(O.getEdgeListToNode(k)),F=F.concat(k.getEdgeListToNode(O)),!N.has(F[0])){if(F.length>1){var _;for(_=0;_<F.length;_++){var z=F[_];z.getBendpoints().push(new E),this.createDummyNodesForBendpoints(z)}}F.forEach(function(X){N.add(X)})}}}if(N.size==x.length)break}},D.prototype.positionNodesRadially=function(x){for(var N=new m(0,0),M=Math.ceil(Math.sqrt(x.length)),I=0,O=0,k=0,F=new E(0,0),_=0;_<x.length;_++){_%M==0&&(k=0,O=I,_!=0&&(O+=g.DEFAULT_COMPONENT_SEPERATION),I=0);var z=x[_],X=L.findCenterOfTree(z);N.x=k,N.y=O,F=D.radialLayout(z,X,N),F.y>I&&(I=Math.floor(F.y)),k=Math.floor(F.x+g.DEFAULT_COMPONENT_SEPERATION)}this.transform(new E(b.WORLD_CENTER_X-F.x/2,b.WORLD_CENTER_Y-F.y/2))},D.radialLayout=function(x,N,M){var I=Math.max(this.maxDiagonalInTree(x),g.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(N,null,0,359,0,I);var O=A.calculateBounds(x),k=new R;k.setDeviceOrgX(O.getMinX()),k.setDeviceOrgY(O.getMinY()),k.setWorldOrgX(M.x),k.setWorldOrgY(M.y);for(var F=0;F<x.length;F++){var _=x[F];_.transform(k)}var z=new E(O.getMaxX(),O.getMaxY());return k.inverseTransformPoint(z)},D.branchRadialLayout=function(x,N,M,I,O,k){var F=(I-M+1)/2;F<0&&(F+=180);var _=(F+M)%360,z=_*C.TWO_PI/360,X=O*Math.cos(z),q=O*Math.sin(z);x.setCenter(X,q);var G=[];G=G.concat(x.getEdges());var U=G.length;N!=null&&U--;for(var K=0,J=G.length,H,Y=x.getEdgesBetween(N);Y.length>1;){var $=Y[0];Y.splice(0,1);var Q=G.indexOf($);Q>=0&&G.splice(Q,1),J--,U--}N!=null?H=(G.indexOf(Y[0])+1)%J:H=0;for(var ee=Math.abs(I-M)/U,te=H;K!=U;te=++te%J){var he=G[te].getOtherEnd(x);if(he!=N){var xe=(M+K*ee)%360,le=(xe+ee)%360;D.branchRadialLayout(he,x,xe,le,O+k,k),K++}}},D.maxDiagonalInTree=function(x){for(var N=w.MIN_VALUE,M=0;M<x.length;M++){var I=x[M],O=I.getDiagonal();O>N&&(N=O)}return N},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var x=this,N={};this.memberGroups={},this.idToDummyNode={};for(var M=[],I=this.graphManager.getAllNodes(),O=0;O<I.length;O++){var k=I[O],F=k.getParent();this.getNodeDegreeWithChildren(k)===0&&(F.id==null||!this.getToBeTiled(F))&&M.push(k)}for(var O=0;O<M.length;O++){var k=M[O],_=k.getParent().id;typeof N[_]>"u"&&(N[_]=[]),N[_]=N[_].concat(k)}Object.keys(N).forEach(function(z){if(N[z].length>1){var X="DummyCompound_"+z;x.memberGroups[X]=N[z];var q=N[z][0].getParent(),G=new c(x.graphManager);G.id=X,G.paddingLeft=q.paddingLeft||0,G.paddingRight=q.paddingRight||0,G.paddingBottom=q.paddingBottom||0,G.paddingTop=q.paddingTop||0,x.idToDummyNode[X]=G;var U=x.getGraphManager().add(x.newGraph(),G),K=q.getChild();K.add(G);for(var J=0;J<N[z].length;J++){var H=N[z][J];K.remove(H),U.add(H)}}})},D.prototype.clearCompounds=function(){var x={},N={};this.performDFSOnCompounds();for(var M=0;M<this.compoundOrder.length;M++)N[this.compoundOrder[M].id]=this.compoundOrder[M],x[this.compoundOrder[M].id]=[].concat(this.compoundOrder[M].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[M].getChild()),this.compoundOrder[M].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(x,N)},D.prototype.clearZeroDegreeMembers=function(){var x=this,N=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(M){var I=x.idToDummyNode[M];if(N[M]=x.tileNodes(x.memberGroups[M],I.paddingLeft+I.paddingRight),I.rect.width=N[M].width,I.rect.height=N[M].height,I.setCenter(N[M].centerX,N[M].centerY),I.labelMarginLeft=0,I.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var O=I.rect.width,k=I.rect.height;I.labelWidth&&(I.labelPosHorizontal=="left"?(I.rect.x-=I.labelWidth,I.setWidth(O+I.labelWidth),I.labelMarginLeft=I.labelWidth):I.labelPosHorizontal=="center"&&I.labelWidth>O?(I.rect.x-=(I.labelWidth-O)/2,I.setWidth(I.labelWidth),I.labelMarginLeft=(I.labelWidth-O)/2):I.labelPosHorizontal=="right"&&I.setWidth(O+I.labelWidth)),I.labelHeight&&(I.labelPosVertical=="top"?(I.rect.y-=I.labelHeight,I.setHeight(k+I.labelHeight),I.labelMarginTop=I.labelHeight):I.labelPosVertical=="center"&&I.labelHeight>k?(I.rect.y-=(I.labelHeight-k)/2,I.setHeight(I.labelHeight),I.labelMarginTop=(I.labelHeight-k)/2):I.labelPosVertical=="bottom"&&I.setHeight(k+I.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var x=this.compoundOrder.length-1;x>=0;x--){var N=this.compoundOrder[x],M=N.id,I=N.paddingLeft,O=N.paddingTop,k=N.labelMarginLeft,F=N.labelMarginTop;this.adjustLocations(this.tiledMemberPack[M],N.rect.x,N.rect.y,I,O,k,F)}},D.prototype.repopulateZeroDegreeMembers=function(){var x=this,N=this.tiledZeroDegreePack;Object.keys(N).forEach(function(M){var I=x.idToDummyNode[M],O=I.paddingLeft,k=I.paddingTop,F=I.labelMarginLeft,_=I.labelMarginTop;x.adjustLocations(N[M],I.rect.x,I.rect.y,O,k,F,_)})},D.prototype.getToBeTiled=function(x){var N=x.id;if(this.toBeTiled[N]!=null)return this.toBeTiled[N];var M=x.getChild();if(M==null)return this.toBeTiled[N]=!1,!1;for(var I=M.getNodes(),O=0;O<I.length;O++){var k=I[O];if(this.getNodeDegree(k)>0)return this.toBeTiled[N]=!1,!1;if(k.getChild()==null){this.toBeTiled[k.id]=!1;continue}if(!this.getToBeTiled(k))return this.toBeTiled[N]=!1,!1}return this.toBeTiled[N]=!0,!0},D.prototype.getNodeDegree=function(x){x.id;for(var N=x.getEdges(),M=0,I=0;I<N.length;I++){var O=N[I];O.getSource().id!==O.getTarget().id&&(M=M+1)}return M},D.prototype.getNodeDegreeWithChildren=function(x){var N=this.getNodeDegree(x);if(x.getChild()==null)return N;for(var M=x.getChild().getNodes(),I=0;I<M.length;I++){var O=M[I];N+=this.getNodeDegreeWithChildren(O)}return N},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(x){for(var N=0;N<x.length;N++){var M=x[N];M.getChild()!=null&&this.fillCompexOrderByDFS(M.getChild().getNodes()),this.getToBeTiled(M)&&this.compoundOrder.push(M)}},D.prototype.adjustLocations=function(x,N,M,I,O,k,F){N+=I+k,M+=O+F;for(var _=N,z=0;z<x.rows.length;z++){var X=x.rows[z];N=_;for(var q=0,G=0;G<X.length;G++){var U=X[G];U.rect.x=N,U.rect.y=M,N+=U.rect.width+x.horizontalPadding,U.rect.height>q&&(q=U.rect.height)}M+=q+x.verticalPadding}},D.prototype.tileCompoundMembers=function(x,N){var M=this;this.tiledMemberPack=[],Object.keys(x).forEach(function(I){var O=N[I];if(M.tiledMemberPack[I]=M.tileNodes(x[I],O.paddingLeft+O.paddingRight),O.rect.width=M.tiledMemberPack[I].width,O.rect.height=M.tiledMemberPack[I].height,O.setCenter(M.tiledMemberPack[I].centerX,M.tiledMemberPack[I].centerY),O.labelMarginLeft=0,O.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var k=O.rect.width,F=O.rect.height;O.labelWidth&&(O.labelPosHorizontal=="left"?(O.rect.x-=O.labelWidth,O.setWidth(k+O.labelWidth),O.labelMarginLeft=O.labelWidth):O.labelPosHorizontal=="center"&&O.labelWidth>k?(O.rect.x-=(O.labelWidth-k)/2,O.setWidth(O.labelWidth),O.labelMarginLeft=(O.labelWidth-k)/2):O.labelPosHorizontal=="right"&&O.setWidth(k+O.labelWidth)),O.labelHeight&&(O.labelPosVertical=="top"?(O.rect.y-=O.labelHeight,O.setHeight(F+O.labelHeight),O.labelMarginTop=O.labelHeight):O.labelPosVertical=="center"&&O.labelHeight>F?(O.rect.y-=(O.labelHeight-F)/2,O.setHeight(O.labelHeight),O.labelMarginTop=(O.labelHeight-F)/2):O.labelPosVertical=="bottom"&&O.setHeight(F+O.labelHeight))}})},D.prototype.tileNodes=function(x,N){var M=this.tileNodesByFavoringDim(x,N,!0),I=this.tileNodesByFavoringDim(x,N,!1),O=this.getOrgRatio(M),k=this.getOrgRatio(I),F;return k<O?F=I:F=M,F},D.prototype.getOrgRatio=function(x){var N=x.width,M=x.height,I=N/M;return I<1&&(I=1/I),I},D.prototype.calcIdealRowWidth=function(x,N){var M=g.TILING_PADDING_VERTICAL,I=g.TILING_PADDING_HORIZONTAL,O=x.length,k=0,F=0,_=0;x.forEach(function(J){k+=J.getWidth(),F+=J.getHeight(),J.getWidth()>_&&(_=J.getWidth())});var z=k/O,X=F/O,q=Math.pow(M-I,2)+4*(z+I)*(X+M)*O,G=(I-M+Math.sqrt(q))/(2*(z+I)),U;N?(U=Math.ceil(G),U==G&&U++):U=Math.floor(G);var K=U*(z+I)-I;return _>K&&(K=_),K+=I*2,K},D.prototype.tileNodesByFavoringDim=function(x,N,M){var I=g.TILING_PADDING_VERTICAL,O=g.TILING_PADDING_HORIZONTAL,k=g.TILING_COMPARE_BY,F={rows:[],rowWidth:[],rowHeight:[],width:0,height:N,verticalPadding:I,horizontalPadding:O,centerX:0,centerY:0};k&&(F.idealRowWidth=this.calcIdealRowWidth(x,M));var _=function(H){return H.rect.width*H.rect.height},z=function(H,Y){return _(Y)-_(H)};x.sort(function(J,H){var Y=z;return F.idealRowWidth?(Y=k,Y(J.id,H.id)):Y(J,H)});for(var X=0,q=0,G=0;G<x.length;G++){var U=x[G];X+=U.getCenterX(),q+=U.getCenterY()}F.centerX=X/x.length,F.centerY=q/x.length;for(var G=0;G<x.length;G++){var U=x[G];if(F.rows.length==0)this.insertNodeToRow(F,U,0,N);else if(this.canAddHorizontal(F,U.rect.width,U.rect.height)){var K=F.rows.length-1;F.idealRowWidth||(K=this.getShortestRowIndex(F)),this.insertNodeToRow(F,U,K,N)}else this.insertNodeToRow(F,U,F.rows.length,N);this.shiftToLastRow(F)}return F},D.prototype.insertNodeToRow=function(x,N,M,I){var O=I;if(M==x.rows.length){var k=[];x.rows.push(k),x.rowWidth.push(O),x.rowHeight.push(0)}var F=x.rowWidth[M]+N.rect.width;x.rows[M].length>0&&(F+=x.horizontalPadding),x.rowWidth[M]=F,x.width<F&&(x.width=F);var _=N.rect.height;M>0&&(_+=x.verticalPadding);var z=0;_>x.rowHeight[M]&&(z=x.rowHeight[M],x.rowHeight[M]=_,z=x.rowHeight[M]-z),x.height+=z,x.rows[M].push(N)},D.prototype.getShortestRowIndex=function(x){for(var N=-1,M=Number.MAX_VALUE,I=0;I<x.rows.length;I++)x.rowWidth[I]<M&&(N=I,M=x.rowWidth[I]);return N},D.prototype.getLongestRowIndex=function(x){for(var N=-1,M=Number.MIN_VALUE,I=0;I<x.rows.length;I++)x.rowWidth[I]>M&&(N=I,M=x.rowWidth[I]);return N},D.prototype.canAddHorizontal=function(x,N,M){if(x.idealRowWidth){var I=x.rows.length-1,O=x.rowWidth[I];return O+N+x.horizontalPadding<=x.idealRowWidth}var k=this.getShortestRowIndex(x);if(k<0)return!0;var F=x.rowWidth[k];if(F+x.horizontalPadding+N<=x.width)return!0;var _=0;x.rowHeight[k]<M&&k>0&&(_=M+x.verticalPadding-x.rowHeight[k]);var z;x.width-F>=N+x.horizontalPadding?z=(x.height+_)/(F+N+x.horizontalPadding):z=(x.height+_)/x.width,_=M+x.verticalPadding;var X;return x.width<N?X=(x.height+_)/N:X=(x.height+_)/x.width,X<1&&(X=1/X),z<1&&(z=1/z),z<X},D.prototype.shiftToLastRow=function(x){var N=this.getLongestRowIndex(x),M=x.rowWidth.length-1,I=x.rows[N],O=I[I.length-1],k=O.width+x.horizontalPadding;if(x.width-x.rowWidth[M]>k&&N!=M){I.splice(-1,1),x.rows[M].push(O),x.rowWidth[N]=x.rowWidth[N]-k,x.rowWidth[M]=x.rowWidth[M]+k,x.width=x.rowWidth[instance.getLongestRowIndex(x)];for(var F=Number.MIN_VALUE,_=0;_<I.length;_++)I[_].height>F&&(F=I[_].height);N>0&&(F+=x.verticalPadding);var z=x.rowHeight[N]+x.rowHeight[M];x.rowHeight[N]=F,x.rowHeight[M]<O.height+x.verticalPadding&&(x.rowHeight[M]=O.height+x.verticalPadding);var X=x.rowHeight[N]+x.rowHeight[M];x.height+=X-z,this.shiftToLastRow(x)}},D.prototype.tilingPreLayout=function(){g.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){g.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var x=[],N=!0,M;N;){var I=this.graphManager.getAllNodes(),O=[];N=!1;for(var k=0;k<I.length;k++)if(M=I[k],M.getEdges().length==1&&!M.getEdges()[0].isInterGraph&&M.getChild()==null){if(g.PURE_INCREMENTAL){var F=M.getEdges()[0].getOtherEnd(M),_=new T(M.getCenterX()-F.getCenterX(),M.getCenterY()-F.getCenterY());O.push([M,M.getEdges()[0],M.getOwner(),_])}else O.push([M,M.getEdges()[0],M.getOwner()]);N=!0}if(N==!0){for(var z=[],X=0;X<O.length;X++)O[X][0].getEdges().length==1&&(z.push(O[X]),O[X][0].getOwner().remove(O[X][0]));x.push(z),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=x},D.prototype.growTree=function(x){for(var N=x.length,M=x[N-1],I,O=0;O<M.length;O++)I=M[O],this.findPlaceforPrunedNode(I),I[2].add(I[0]),I[2].add(I[1],I[1].source,I[1].target);x.splice(x.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(x){var N,M,I=x[0];if(I==x[1].source?M=x[1].target:M=x[1].source,g.PURE_INCREMENTAL)I.setCenter(M.getCenterX()+x[3].getWidth(),M.getCenterY()+x[3].getHeight());else{var O=M.startX,k=M.finishX,F=M.startY,_=M.finishY,z=0,X=0,q=0,G=0,U=[z,q,X,G];if(F>0)for(var K=O;K<=k;K++)U[0]+=this.grid[K][F-1].length+this.grid[K][F].length-1;if(k<this.grid.length-1)for(var K=F;K<=_;K++)U[1]+=this.grid[k+1][K].length+this.grid[k][K].length-1;if(_<this.grid[0].length-1)for(var K=O;K<=k;K++)U[2]+=this.grid[K][_+1].length+this.grid[K][_].length-1;if(O>0)for(var K=F;K<=_;K++)U[3]+=this.grid[O-1][K].length+this.grid[O][K].length-1;for(var J=w.MAX_VALUE,H,Y,$=0;$<U.length;$++)U[$]<J?(J=U[$],H=1,Y=$):U[$]==J&&H++;if(H==3&&J==0)U[0]==0&&U[1]==0&&U[2]==0?N=1:U[0]==0&&U[1]==0&&U[3]==0?N=0:U[0]==0&&U[2]==0&&U[3]==0?N=3:U[1]==0&&U[2]==0&&U[3]==0&&(N=2);else if(H==2&&J==0){var Q=Math.floor(Math.random()*2);U[0]==0&&U[1]==0?Q==0?N=0:N=1:U[0]==0&&U[2]==0?Q==0?N=0:N=2:U[0]==0&&U[3]==0?Q==0?N=0:N=3:U[1]==0&&U[2]==0?Q==0?N=1:N=2:U[1]==0&&U[3]==0?Q==0?N=1:N=3:Q==0?N=2:N=3}else if(H==4&&J==0){var Q=Math.floor(Math.random()*4);N=Q}else N=Y;N==0?I.setCenter(M.getCenterX(),M.getCenterY()-M.getHeight()/2-y.DEFAULT_EDGE_LENGTH-I.getHeight()/2):N==1?I.setCenter(M.getCenterX()+M.getWidth()/2+y.DEFAULT_EDGE_LENGTH+I.getWidth()/2,M.getCenterY()):N==2?I.setCenter(M.getCenterX(),M.getCenterY()+M.getHeight()/2+y.DEFAULT_EDGE_LENGTH+I.getHeight()/2):I.setCenter(M.getCenterX()-M.getWidth()/2-y.DEFAULT_EDGE_LENGTH-I.getWidth()/2,M.getCenterY())}},s.exports=D}),991:((s,u,l)=>{var f=l(551).FDLayoutNode,h=l(551).IMath;function v(d,g,p,y){f.call(this,d,g,p,y)}v.prototype=Object.create(f.prototype);for(var c in f)v[c]=f[c];v.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(d,g){for(var p=this.getChild().getNodes(),y,b=0;b<p.length;b++)y=p[b],y.getChild()==null?(y.displacementX+=d,y.displacementY+=g):y.propogateDisplacementToChildren(d,g)},v.prototype.move=function(){var d=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),d.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},v.prototype.setPred1=function(d){this.pred1=d},v.prototype.getPred1=function(){return pred1},v.prototype.getPred2=function(){return pred2},v.prototype.setNext=function(d){this.next=d},v.prototype.getNext=function(){return next},v.prototype.setProcessed=function(d){this.processed=d},v.prototype.isProcessed=function(){return processed},s.exports=v}),902:((s,u,l)=>{function f(p){if(Array.isArray(p)){for(var y=0,b=Array(p.length);y<p.length;y++)b[y]=p[y];return b}else return Array.from(p)}var h=l(806),v=l(551).LinkedList,c=l(551).Matrix,d=l(551).SVD;function g(){}g.handleConstraints=function(p){var y={};y.fixedNodeConstraint=p.constraints.fixedNodeConstraint,y.alignmentConstraint=p.constraints.alignmentConstraint,y.relativePlacementConstraint=p.constraints.relativePlacementConstraint;for(var b=new Map,m=new Map,E=[],T=[],L=p.getAllNodes(),w=0,C=0;C<L.length;C++){var A=L[C];A.getChild()==null&&(m.set(A.id,w++),E.push(A.getCenterX()),T.push(A.getCenterY()),b.set(A.id,A))}y.relativePlacementConstraint&&y.relativePlacementConstraint.forEach(function(V){!V.gap&&V.gap!=0&&(V.left?V.gap=h.DEFAULT_EDGE_LENGTH+b.get(V.left).getWidth()/2+b.get(V.right).getWidth()/2:V.gap=h.DEFAULT_EDGE_LENGTH+b.get(V.top).getHeight()/2+b.get(V.bottom).getHeight()/2)});var R=function(W,Z){return{x:W.x-Z.x,y:W.y-Z.y}},S=function(W){var Z=0,j=0;return W.forEach(function(ae){Z+=E[m.get(ae)],j+=T[m.get(ae)]}),{x:Z/W.size,y:j/W.size}},D=function(W,Z,j,ae,re){function ie(Le,Te){var ke=new Set(Le),Ce=!0,Ae=!1,Ue=void 0;try{for(var Ie=Te[Symbol.iterator](),qe;!(Ce=(qe=Ie.next()).done);Ce=!0){var ze=qe.value;ke.add(ze)}}catch(Ze){Ae=!0,Ue=Ze}finally{try{!Ce&&Ie.return&&Ie.return()}finally{if(Ae)throw Ue}}return ke}var ue=new Map;W.forEach(function(Le,Te){ue.set(Te,0)}),W.forEach(function(Le,Te){Le.forEach(function(ke){ue.set(ke.id,ue.get(ke.id)+1)})});var oe=new Map,fe=new Map,me=new v;ue.forEach(function(Le,Te){Le==0?(me.push(Te),j||(Z=="horizontal"?oe.set(Te,m.has(Te)?E[m.get(Te)]:ae.get(Te)):oe.set(Te,m.has(Te)?T[m.get(Te)]:ae.get(Te)))):oe.set(Te,Number.NEGATIVE_INFINITY),j&&fe.set(Te,new Set([Te]))}),j&&re.forEach(function(Le){var Te=[];if(Le.forEach(function(Ae){j.has(Ae)&&Te.push(Ae)}),Te.length>0){var ke=0;Te.forEach(function(Ae){Z=="horizontal"?(oe.set(Ae,m.has(Ae)?E[m.get(Ae)]:ae.get(Ae)),ke+=oe.get(Ae)):(oe.set(Ae,m.has(Ae)?T[m.get(Ae)]:ae.get(Ae)),ke+=oe.get(Ae))}),ke=ke/Te.length,Le.forEach(function(Ae){j.has(Ae)||oe.set(Ae,ke)})}else{var Ce=0;Le.forEach(function(Ae){Z=="horizontal"?Ce+=m.has(Ae)?E[m.get(Ae)]:ae.get(Ae):Ce+=m.has(Ae)?T[m.get(Ae)]:ae.get(Ae)}),Ce=Ce/Le.length,Le.forEach(function(Ae){oe.set(Ae,Ce)})}});for(var pe=function(){var Te=me.shift(),ke=W.get(Te);ke.forEach(function(Ce){if(oe.get(Ce.id)<oe.get(Te)+Ce.gap)if(j&&j.has(Ce.id)){var Ae=void 0;if(Z=="horizontal"?Ae=m.has(Ce.id)?E[m.get(Ce.id)]:ae.get(Ce.id):Ae=m.has(Ce.id)?T[m.get(Ce.id)]:ae.get(Ce.id),oe.set(Ce.id,Ae),Ae<oe.get(Te)+Ce.gap){var Ue=oe.get(Te)+Ce.gap-Ae;fe.get(Te).forEach(function(Ie){oe.set(Ie,oe.get(Ie)-Ue)})}}else oe.set(Ce.id,oe.get(Te)+Ce.gap);ue.set(Ce.id,ue.get(Ce.id)-1),ue.get(Ce.id)==0&&me.push(Ce.id),j&&fe.set(Ce.id,ie(fe.get(Te),fe.get(Ce.id)))})};me.length!=0;)pe();if(j){var we=new Set;W.forEach(function(Le,Te){Le.length==0&&we.add(Te)});var De=[];fe.forEach(function(Le,Te){if(we.has(Te)){var ke=!1,Ce=!0,Ae=!1,Ue=void 0;try{for(var Ie=Le[Symbol.iterator](),qe;!(Ce=(qe=Ie.next()).done);Ce=!0){var ze=qe.value;j.has(ze)&&(ke=!0)}}catch(We){Ae=!0,Ue=We}finally{try{!Ce&&Ie.return&&Ie.return()}finally{if(Ae)throw Ue}}if(!ke){var Ze=!1,tt=void 0;De.forEach(function(We,Nt){We.has([].concat(f(Le))[0])&&(Ze=!0,tt=Nt)}),Ze?Le.forEach(function(We){De[tt].add(We)}):De.push(new Set(Le))}}}),De.forEach(function(Le,Te){var ke=Number.POSITIVE_INFINITY,Ce=Number.POSITIVE_INFINITY,Ae=Number.NEGATIVE_INFINITY,Ue=Number.NEGATIVE_INFINITY,Ie=!0,qe=!1,ze=void 0;try{for(var Ze=Le[Symbol.iterator](),tt;!(Ie=(tt=Ze.next()).done);Ie=!0){var We=tt.value,Nt=void 0;Z=="horizontal"?Nt=m.has(We)?E[m.get(We)]:ae.get(We):Nt=m.has(We)?T[m.get(We)]:ae.get(We);var Pt=oe.get(We);Nt<ke&&(ke=Nt),Nt>Ae&&(Ae=Nt),Pt<Ce&&(Ce=Pt),Pt>Ue&&(Ue=Pt)}}catch(mr){qe=!0,ze=mr}finally{try{!Ie&&Ze.return&&Ze.return()}finally{if(qe)throw ze}}var mt=(ke+Ae)/2-(Ce+Ue)/2,at=!0,ut=!1,Gt=void 0;try{for(var lt=Le[Symbol.iterator](),qr;!(at=(qr=lt.next()).done);at=!0){var yr=qr.value;oe.set(yr,oe.get(yr)+mt)}}catch(mr){ut=!0,Gt=mr}finally{try{!at&&lt.return&&lt.return()}finally{if(ut)throw Gt}}})}return oe},P=function(W){var Z=0,j=0,ae=0,re=0;if(W.forEach(function(fe){fe.left?E[m.get(fe.left)]-E[m.get(fe.right)]>=0?Z++:j++:T[m.get(fe.top)]-T[m.get(fe.bottom)]>=0?ae++:re++}),Z>j&&ae>re)for(var ie=0;ie<m.size;ie++)E[ie]=-1*E[ie],T[ie]=-1*T[ie];else if(Z>j)for(var ue=0;ue<m.size;ue++)E[ue]=-1*E[ue];else if(ae>re)for(var oe=0;oe<m.size;oe++)T[oe]=-1*T[oe]},x=function(W){var Z=[],j=new v,ae=new Set,re=0;return W.forEach(function(ie,ue){if(!ae.has(ue)){Z[re]=[];var oe=ue;for(j.push(oe),ae.add(oe),Z[re].push(oe);j.length!=0;){oe=j.shift();var fe=W.get(oe);fe.forEach(function(me){ae.has(me.id)||(j.push(me.id),ae.add(me.id),Z[re].push(me.id))})}re++}}),Z},N=function(W){var Z=new Map;return W.forEach(function(j,ae){Z.set(ae,[])}),W.forEach(function(j,ae){j.forEach(function(re){Z.get(ae).push(re),Z.get(re.id).push({id:ae,gap:re.gap,direction:re.direction})})}),Z},M=function(W){var Z=new Map;return W.forEach(function(j,ae){Z.set(ae,[])}),W.forEach(function(j,ae){j.forEach(function(re){Z.get(re.id).push({id:ae,gap:re.gap,direction:re.direction})})}),Z},I=[],O=[],k=!1,F=!1,_=new Set,z=new Map,X=new Map,q=[];if(y.fixedNodeConstraint&&y.fixedNodeConstraint.forEach(function(V){_.add(V.nodeId)}),y.relativePlacementConstraint&&(y.relativePlacementConstraint.forEach(function(V){V.left?(z.has(V.left)?z.get(V.left).push({id:V.right,gap:V.gap,direction:"horizontal"}):z.set(V.left,[{id:V.right,gap:V.gap,direction:"horizontal"}]),z.has(V.right)||z.set(V.right,[])):(z.has(V.top)?z.get(V.top).push({id:V.bottom,gap:V.gap,direction:"vertical"}):z.set(V.top,[{id:V.bottom,gap:V.gap,direction:"vertical"}]),z.has(V.bottom)||z.set(V.bottom,[]))}),X=N(z),q=x(X)),h.TRANSFORM_ON_CONSTRAINT_HANDLING){if(y.fixedNodeConstraint&&y.fixedNodeConstraint.length>1)y.fixedNodeConstraint.forEach(function(V,W){I[W]=[V.position.x,V.position.y],O[W]=[E[m.get(V.nodeId)],T[m.get(V.nodeId)]]}),k=!0;else if(y.alignmentConstraint)(function(){var V=0;if(y.alignmentConstraint.vertical){for(var W=y.alignmentConstraint.vertical,Z=function(oe){var fe=new Set;W[oe].forEach(function(we){fe.add(we)});var me=new Set([].concat(f(fe)).filter(function(we){return _.has(we)})),pe=void 0;me.size>0?pe=E[m.get(me.values().next().value)]:pe=S(fe).x,W[oe].forEach(function(we){I[V]=[pe,T[m.get(we)]],O[V]=[E[m.get(we)],T[m.get(we)]],V++})},j=0;j<W.length;j++)Z(j);k=!0}if(y.alignmentConstraint.horizontal){for(var ae=y.alignmentConstraint.horizontal,re=function(oe){var fe=new Set;ae[oe].forEach(function(we){fe.add(we)});var me=new Set([].concat(f(fe)).filter(function(we){return _.has(we)})),pe=void 0;me.size>0?pe=E[m.get(me.values().next().value)]:pe=S(fe).y,ae[oe].forEach(function(we){I[V]=[E[m.get(we)],pe],O[V]=[E[m.get(we)],T[m.get(we)]],V++})},ie=0;ie<ae.length;ie++)re(ie);k=!0}y.relativePlacementConstraint&&(F=!0)})();else if(y.relativePlacementConstraint){for(var G=0,U=0,K=0;K<q.length;K++)q[K].length>G&&(G=q[K].length,U=K);if(G<X.size/2)P(y.relativePlacementConstraint),k=!1,F=!1;else{var J=new Map,H=new Map,Y=[];q[U].forEach(function(V){z.get(V).forEach(function(W){W.direction=="horizontal"?(J.has(V)?J.get(V).push(W):J.set(V,[W]),J.has(W.id)||J.set(W.id,[]),Y.push({left:V,right:W.id})):(H.has(V)?H.get(V).push(W):H.set(V,[W]),H.has(W.id)||H.set(W.id,[]),Y.push({top:V,bottom:W.id}))})}),P(Y),F=!1;var $=D(J,"horizontal"),Q=D(H,"vertical");q[U].forEach(function(V,W){O[W]=[E[m.get(V)],T[m.get(V)]],I[W]=[],$.has(V)?I[W][0]=$.get(V):I[W][0]=E[m.get(V)],Q.has(V)?I[W][1]=Q.get(V):I[W][1]=T[m.get(V)]}),k=!0}}if(k){for(var ee=void 0,te=c.transpose(I),he=c.transpose(O),xe=0;xe<te.length;xe++)te[xe]=c.multGamma(te[xe]),he[xe]=c.multGamma(he[xe]);var le=c.multMat(te,c.transpose(he)),se=d.svd(le);ee=c.multMat(se.V,c.transpose(se.U));for(var ve=0;ve<m.size;ve++){var ce=[E[ve],T[ve]],ye=[ee[0][0],ee[1][0]],ge=[ee[0][1],ee[1][1]];E[ve]=c.dotProduct(ce,ye),T[ve]=c.dotProduct(ce,ge)}F&&P(y.relativePlacementConstraint)}}if(h.ENFORCE_CONSTRAINTS){if(y.fixedNodeConstraint&&y.fixedNodeConstraint.length>0){var de={x:0,y:0};y.fixedNodeConstraint.forEach(function(V,W){var Z={x:E[m.get(V.nodeId)],y:T[m.get(V.nodeId)]},j=V.position,ae=R(j,Z);de.x+=ae.x,de.y+=ae.y}),de.x/=y.fixedNodeConstraint.length,de.y/=y.fixedNodeConstraint.length,E.forEach(function(V,W){E[W]+=de.x}),T.forEach(function(V,W){T[W]+=de.y}),y.fixedNodeConstraint.forEach(function(V){E[m.get(V.nodeId)]=V.position.x,T[m.get(V.nodeId)]=V.position.y})}if(y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var be=y.alignmentConstraint.vertical,Re=function(W){var Z=new Set;be[W].forEach(function(re){Z.add(re)});var j=new Set([].concat(f(Z)).filter(function(re){return _.has(re)})),ae=void 0;j.size>0?ae=E[m.get(j.values().next().value)]:ae=S(Z).x,Z.forEach(function(re){_.has(re)||(E[m.get(re)]=ae)})},Pe=0;Pe<be.length;Pe++)Re(Pe);if(y.alignmentConstraint.horizontal)for(var Be=y.alignmentConstraint.horizontal,Ne=function(W){var Z=new Set;Be[W].forEach(function(re){Z.add(re)});var j=new Set([].concat(f(Z)).filter(function(re){return _.has(re)})),ae=void 0;j.size>0?ae=T[m.get(j.values().next().value)]:ae=S(Z).y,Z.forEach(function(re){_.has(re)||(T[m.get(re)]=ae)})},Me=0;Me<Be.length;Me++)Ne(Me)}y.relativePlacementConstraint&&(function(){var V=new Map,W=new Map,Z=new Map,j=new Map,ae=new Map,re=new Map,ie=new Set,ue=new Set;if(_.forEach(function(vt){ie.add(vt),ue.add(vt)}),y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var oe=y.alignmentConstraint.vertical,fe=function(Fe){Z.set("dummy"+Fe,[]),oe[Fe].forEach(function(Ve){V.set(Ve,"dummy"+Fe),Z.get("dummy"+Fe).push(Ve),_.has(Ve)&&ie.add("dummy"+Fe)}),ae.set("dummy"+Fe,E[m.get(oe[Fe][0])])},me=0;me<oe.length;me++)fe(me);if(y.alignmentConstraint.horizontal)for(var pe=y.alignmentConstraint.horizontal,we=function(Fe){j.set("dummy"+Fe,[]),pe[Fe].forEach(function(Ve){W.set(Ve,"dummy"+Fe),j.get("dummy"+Fe).push(Ve),_.has(Ve)&&ue.add("dummy"+Fe)}),re.set("dummy"+Fe,T[m.get(pe[Fe][0])])},De=0;De<pe.length;De++)we(De)}var Le=new Map,Te=new Map,ke=function(Fe){z.get(Fe).forEach(function(Ve){var Xt=void 0,bt=void 0;Ve.direction=="horizontal"?(Xt=V.get(Fe)?V.get(Fe):Fe,V.get(Ve.id)?bt={id:V.get(Ve.id),gap:Ve.gap,direction:Ve.direction}:bt=Ve,Le.has(Xt)?Le.get(Xt).push(bt):Le.set(Xt,[bt]),Le.has(bt.id)||Le.set(bt.id,[])):(Xt=W.get(Fe)?W.get(Fe):Fe,W.get(Ve.id)?bt={id:W.get(Ve.id),gap:Ve.gap,direction:Ve.direction}:bt=Ve,Te.has(Xt)?Te.get(Xt).push(bt):Te.set(Xt,[bt]),Te.has(bt.id)||Te.set(bt.id,[]))})},Ce=!0,Ae=!1,Ue=void 0;try{for(var Ie=z.keys()[Symbol.iterator](),qe;!(Ce=(qe=Ie.next()).done);Ce=!0){var ze=qe.value;ke(ze)}}catch(vt){Ae=!0,Ue=vt}finally{try{!Ce&&Ie.return&&Ie.return()}finally{if(Ae)throw Ue}}var Ze=N(Le),tt=N(Te),We=x(Ze),Nt=x(tt),Pt=M(Le),mt=M(Te),at=[],ut=[];We.forEach(function(vt,Fe){at[Fe]=[],vt.forEach(function(Ve){Pt.get(Ve).length==0&&at[Fe].push(Ve)})}),Nt.forEach(function(vt,Fe){ut[Fe]=[],vt.forEach(function(Ve){mt.get(Ve).length==0&&ut[Fe].push(Ve)})});var Gt=D(Le,"horizontal",ie,ae,at),lt=D(Te,"vertical",ue,re,ut),qr=function(Fe){Z.get(Fe)?Z.get(Fe).forEach(function(Ve){E[m.get(Ve)]=Gt.get(Fe)}):E[m.get(Fe)]=Gt.get(Fe)},yr=!0,mr=!1,Mn=void 0;try{for(var ka=Gt.keys()[Symbol.iterator](),On;!(yr=(On=ka.next()).done);yr=!0){var qa=On.value;qr(qa)}}catch(vt){mr=!0,Mn=vt}finally{try{!yr&&ka.return&&ka.return()}finally{if(mr)throw Mn}}var so=function(Fe){j.get(Fe)?j.get(Fe).forEach(function(Ve){T[m.get(Ve)]=lt.get(Fe)}):T[m.get(Fe)]=lt.get(Fe)},sr=!0,ia=!1,Gr=void 0;try{for(var oa=lt.keys()[Symbol.iterator](),Ga;!(sr=(Ga=oa.next()).done);sr=!0){var qa=Ga.value;so(qa)}}catch(vt){ia=!0,Gr=vt}finally{try{!sr&&oa.return&&oa.return()}finally{if(ia)throw Gr}}})()}for(var ne=0;ne<L.length;ne++){var B=L[ne];B.getChild()==null&&B.setCenter(E[m.get(B.id)],T[m.get(B.id)])}},s.exports=g}),551:(s=>{s.exports=r})},n={};function i(s){var u=n[s];if(u!==void 0)return u.exports;var l=n[s]={exports:{}};return a[s](l,l.exports,i),l.exports}var o=i(45);return o})()})})(oi)),oi.exports}var sI=ii.exports,fE;function uI(){return fE||(fE=1,(function(t,e){(function(a,n){t.exports=n(oI())})(sI,function(r){return(()=>{var a={658:(s=>{s.exports=Object.assign!=null?Object.assign.bind(Object):function(u){for(var l=arguments.length,f=Array(l>1?l-1:0),h=1;h<l;h++)f[h-1]=arguments[h];return f.forEach(function(v){Object.keys(v).forEach(function(c){return u[c]=v[c]})}),u}}),548:((s,u,l)=>{var f=(function(){function c(d,g){var p=[],y=!0,b=!1,m=void 0;try{for(var E=d[Symbol.iterator](),T;!(y=(T=E.next()).done)&&(p.push(T.value),!(g&&p.length===g));y=!0);}catch(L){b=!0,m=L}finally{try{!y&&E.return&&E.return()}finally{if(b)throw m}}return p}return function(d,g){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return c(d,g);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),h=l(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(c){for(var d={},g=0;g<c.length;g++)d[c[g].id()]=!0;var p=c.filter(function(y,b){typeof y=="number"&&(y=b);for(var m=y.parent()[0];m!=null;){if(d[m.id()])return!1;m=m.parent()[0]}return!0});return p},v.connectComponents=function(c,d,g,p){var y=new h,b=new Set,m=[],E=void 0,T=void 0,L=void 0,w=!1,C=1,A=[],R=[],S=function(){var P=c.collection();R.push(P);var x=g[0],N=c.collection();N.merge(x).merge(x.descendants().intersection(d)),m.push(x),N.forEach(function(O){y.push(O),b.add(O),P.merge(O)});for(var M=function(){x=y.shift();var k=c.collection();x.neighborhood().nodes().forEach(function(X){d.intersection(x.edgesWith(X)).length>0&&k.merge(X)});for(var F=0;F<k.length;F++){var _=k[F];if(E=g.intersection(_.union(_.ancestors())),E!=null&&!b.has(E[0])){var z=E.union(E.descendants());z.forEach(function(X){y.push(X),b.add(X),P.merge(X),g.has(X)&&m.push(X)})}}};y.length!=0;)M();if(P.forEach(function(O){d.intersection(O.connectedEdges()).forEach(function(k){P.has(k.source())&&P.has(k.target())&&P.merge(k)})}),m.length==g.length&&(w=!0),!w||w&&C>1){T=m[0],L=T.connectedEdges().length,m.forEach(function(O){O.connectedEdges().length<L&&(L=O.connectedEdges().length,T=O)}),A.push(T.id());var I=c.collection();I.merge(m[0]),m.forEach(function(O){I.merge(O)}),m=[],g=g.difference(I),C++}};do S();while(!w);return p&&A.length>0&&p.set("dummy"+(p.size+1),A),R},v.relocateComponent=function(c,d,g){if(!g.fixedNodeConstraint){var p=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,b=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY;if(g.quality=="draft"){var E=!0,T=!1,L=void 0;try{for(var w=d.nodeIndexes[Symbol.iterator](),C;!(E=(C=w.next()).done);E=!0){var A=C.value,R=f(A,2),S=R[0],D=R[1],P=g.cy.getElementById(S);if(P){var x=P.boundingBox(),N=d.xCoords[D]-x.w/2,M=d.xCoords[D]+x.w/2,I=d.yCoords[D]-x.h/2,O=d.yCoords[D]+x.h/2;N<p&&(p=N),M>y&&(y=M),I<b&&(b=I),O>m&&(m=O)}}}catch(X){T=!0,L=X}finally{try{!E&&w.return&&w.return()}finally{if(T)throw L}}var k=c.x-(y+p)/2,F=c.y-(m+b)/2;d.xCoords=d.xCoords.map(function(X){return X+k}),d.yCoords=d.yCoords.map(function(X){return X+F})}else{Object.keys(d).forEach(function(X){var q=d[X],G=q.getRect().x,U=q.getRect().x+q.getRect().width,K=q.getRect().y,J=q.getRect().y+q.getRect().height;G<p&&(p=G),U>y&&(y=U),K<b&&(b=K),J>m&&(m=J)});var _=c.x-(y+p)/2,z=c.y-(m+b)/2;Object.keys(d).forEach(function(X){var q=d[X];q.setCenter(q.getCenterX()+_,q.getCenterY()+z)})}}},v.calcBoundingBox=function(c,d,g,p){for(var y=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,m=Number.MAX_SAFE_INTEGER,E=Number.MIN_SAFE_INTEGER,T=void 0,L=void 0,w=void 0,C=void 0,A=c.descendants().not(":parent"),R=A.length,S=0;S<R;S++){var D=A[S];T=d[p.get(D.id())]-D.width()/2,L=d[p.get(D.id())]+D.width()/2,w=g[p.get(D.id())]-D.height()/2,C=g[p.get(D.id())]+D.height()/2,y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var P={};return P.topLeftX=y,P.topLeftY=m,P.width=b-y,P.height=E-m,P},v.calcParentsWithoutChildren=function(c,d){var g=c.collection();return d.nodes(":parent").forEach(function(p){var y=!1;p.children().forEach(function(b){b.css("display")!="none"&&(y=!0)}),y||g.merge(p)}),g},s.exports=v}),816:((s,u,l)=>{var f=l(548),h=l(140).CoSELayout,v=l(140).CoSENode,c=l(140).layoutBase.PointD,d=l(140).layoutBase.DimensionD,g=l(140).layoutBase.LayoutConstants,p=l(140).layoutBase.FDLayoutConstants,y=l(140).CoSEConstants,b=function(E,T){var L=E.cy,w=E.eles,C=w.nodes(),A=w.edges(),R=void 0,S=void 0,D=void 0,P={};E.randomize&&(R=T.nodeIndexes,S=T.xCoords,D=T.yCoords);var x=function(X){return typeof X=="function"},N=function(X,q){return x(X)?X(q):X},M=f.calcParentsWithoutChildren(L,w),I=function z(X,q,G,U){for(var K=q.length,J=0;J<K;J++){var H=q[J],Y=null;H.intersection(M).length==0&&(Y=H.children());var $=void 0,Q=H.layoutDimensions({nodeDimensionsIncludeLabels:U.nodeDimensionsIncludeLabels});if(H.outerWidth()!=null&&H.outerHeight()!=null)if(U.randomize)if(!H.isParent())$=X.add(new v(G.graphManager,new c(S[R.get(H.id())]-Q.w/2,D[R.get(H.id())]-Q.h/2),new d(parseFloat(Q.w),parseFloat(Q.h))));else{var ee=f.calcBoundingBox(H,S,D,R);H.intersection(M).length==0?$=X.add(new v(G.graphManager,new c(ee.topLeftX,ee.topLeftY),new d(ee.width,ee.height))):$=X.add(new v(G.graphManager,new c(ee.topLeftX,ee.topLeftY),new d(parseFloat(Q.w),parseFloat(Q.h))))}else $=X.add(new v(G.graphManager,new c(H.position("x")-Q.w/2,H.position("y")-Q.h/2),new d(parseFloat(Q.w),parseFloat(Q.h))));else $=X.add(new v(this.graphManager));if($.id=H.data("id"),$.nodeRepulsion=N(U.nodeRepulsion,H),$.paddingLeft=parseInt(H.css("padding")),$.paddingTop=parseInt(H.css("padding")),$.paddingRight=parseInt(H.css("padding")),$.paddingBottom=parseInt(H.css("padding")),U.nodeDimensionsIncludeLabels&&($.labelWidth=H.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=H.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=H.css("text-valign"),$.labelPosHorizontal=H.css("text-halign")),P[H.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),Y!=null&&Y.length>0){var te=void 0;te=G.getGraphManager().add(G.newGraph(),$),z(te,Y,G,U)}}},O=function(X,q,G){for(var U=0,K=0,J=0;J<G.length;J++){var H=G[J],Y=P[H.data("source")],$=P[H.data("target")];if(Y&&$&&Y!==$&&Y.getEdgesBetween($).length==0){var Q=q.add(X.newEdge(),Y,$);Q.id=H.id(),Q.idealLength=N(E.idealEdgeLength,H),Q.edgeElasticity=N(E.edgeElasticity,H),U+=Q.idealLength,K++}}E.idealEdgeLength!=null&&(K>0?y.DEFAULT_EDGE_LENGTH=p.DEFAULT_EDGE_LENGTH=U/K:x(E.idealEdgeLength)?y.DEFAULT_EDGE_LENGTH=p.DEFAULT_EDGE_LENGTH=50:y.DEFAULT_EDGE_LENGTH=p.DEFAULT_EDGE_LENGTH=E.idealEdgeLength,y.MIN_REPULSION_DIST=p.MIN_REPULSION_DIST=p.DEFAULT_EDGE_LENGTH/10,y.DEFAULT_RADIAL_SEPARATION=p.DEFAULT_EDGE_LENGTH)},k=function(X,q){q.fixedNodeConstraint&&(X.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(X.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(X.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};E.nestingFactor!=null&&(y.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=E.nestingFactor),E.gravity!=null&&(y.DEFAULT_GRAVITY_STRENGTH=p.DEFAULT_GRAVITY_STRENGTH=E.gravity),E.numIter!=null&&(y.MAX_ITERATIONS=p.MAX_ITERATIONS=E.numIter),E.gravityRange!=null&&(y.DEFAULT_GRAVITY_RANGE_FACTOR=p.DEFAULT_GRAVITY_RANGE_FACTOR=E.gravityRange),E.gravityCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_STRENGTH=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH=E.gravityCompound),E.gravityRangeCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=E.gravityRangeCompound),E.initialEnergyOnIncremental!=null&&(y.DEFAULT_COOLING_FACTOR_INCREMENTAL=p.DEFAULT_COOLING_FACTOR_INCREMENTAL=E.initialEnergyOnIncremental),E.tilingCompareBy!=null&&(y.TILING_COMPARE_BY=E.tilingCompareBy),E.quality=="proof"?g.QUALITY=2:g.QUALITY=0,y.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=E.nodeDimensionsIncludeLabels,y.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=!E.randomize,y.ANIMATE=p.ANIMATE=g.ANIMATE=E.animate,y.TILE=E.tile,y.TILING_PADDING_VERTICAL=typeof E.tilingPaddingVertical=="function"?E.tilingPaddingVertical.call():E.tilingPaddingVertical,y.TILING_PADDING_HORIZONTAL=typeof E.tilingPaddingHorizontal=="function"?E.tilingPaddingHorizontal.call():E.tilingPaddingHorizontal,y.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=!0,y.PURE_INCREMENTAL=!E.randomize,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=E.uniformNodeDimensions,E.step=="transformed"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!1),E.step=="enforced"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!1),E.step=="cose"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!0),E.step=="all"&&(E.randomize?y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!0),E.fixedNodeConstraint||E.alignmentConstraint||E.relativePlacementConstraint?y.TREE_REDUCTION_ON_INCREMENTAL=!1:y.TREE_REDUCTION_ON_INCREMENTAL=!0;var F=new h,_=F.newGraphManager();return I(_.addRoot(),f.getTopMostNodes(C),F,E),O(F,_,A),k(F,E),F.runLayout(),P};s.exports={coseLayout:b}}),212:((s,u,l)=>{var f=(function(){function E(T,L){for(var w=0;w<L.length;w++){var C=L[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(T,C.key,C)}}return function(T,L,w){return L&&E(T.prototype,L),w&&E(T,w),T}})();function h(E,T){if(!(E instanceof T))throw new TypeError("Cannot call a class as a function")}var v=l(658),c=l(548),d=l(657),g=d.spectralLayout,p=l(816),y=p.coseLayout,b=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(T){return 4500},idealEdgeLength:function(T){return 50},edgeElasticity:function(T){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),m=(function(){function E(T){h(this,E),this.options=v({},b,T)}return f(E,[{key:"run",value:function(){var L=this,w=this.options,C=w.cy,A=w.eles,R=[],S=[],D=void 0,P=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var x=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;x&&(w.tile=!1,w.packComponents=!1);var N=void 0,M=!1;if(C.layoutUtilities&&w.packComponents&&(N=C.layoutUtilities("get"),N||(N=C.layoutUtilities()),M=!0),A.nodes().length>0)if(M){var k=c.getTopMostNodes(w.eles.nodes());if(D=c.connectComponents(C,w.eles,k),D.forEach(function(le){var se=le.boundingBox();P.push({x:se.x1+se.w/2,y:se.y1+se.h/2})}),w.randomize&&D.forEach(function(le){w.eles=le,R.push(g(w))}),w.quality=="default"||w.quality=="proof"){var F=C.collection();if(w.tile){var _=new Map,z=[],X=[],q=0,G={nodeIndexes:_,xCoords:z,yCoords:X},U=[];if(D.forEach(function(le,se){le.edges().length==0&&(le.nodes().forEach(function(ve,ce){F.merge(le.nodes()[ce]),ve.isParent()||(G.nodeIndexes.set(le.nodes()[ce].id(),q++),G.xCoords.push(le.nodes()[0].position().x),G.yCoords.push(le.nodes()[0].position().y))}),U.push(se))}),F.length>1){var K=F.boundingBox();P.push({x:K.x1+K.w/2,y:K.y1+K.h/2}),D.push(F),R.push(G);for(var J=U.length-1;J>=0;J--)D.splice(U[J],1),R.splice(U[J],1),P.splice(U[J],1)}}D.forEach(function(le,se){w.eles=le,S.push(y(w,R[se])),c.relocateComponent(P[se],S[se],w)})}else D.forEach(function(le,se){c.relocateComponent(P[se],R[se],w)});var H=new Set;if(D.length>1){var Y=[],$=A.filter(function(le){return le.css("display")=="none"});D.forEach(function(le,se){var ve=void 0;if(w.quality=="draft"&&(ve=R[se].nodeIndexes),le.nodes().not($).length>0){var ce={};ce.edges=[],ce.nodes=[];var ye=void 0;le.nodes().not($).forEach(function(ge){if(w.quality=="draft")if(!ge.isParent())ye=ve.get(ge.id()),ce.nodes.push({x:R[se].xCoords[ye]-ge.boundingbox().w/2,y:R[se].yCoords[ye]-ge.boundingbox().h/2,width:ge.boundingbox().w,height:ge.boundingbox().h});else{var de=c.calcBoundingBox(ge,R[se].xCoords,R[se].yCoords,ve);ce.nodes.push({x:de.topLeftX,y:de.topLeftY,width:de.width,height:de.height})}else S[se][ge.id()]&&ce.nodes.push({x:S[se][ge.id()].getLeft(),y:S[se][ge.id()].getTop(),width:S[se][ge.id()].getWidth(),height:S[se][ge.id()].getHeight()})}),le.edges().forEach(function(ge){var de=ge.source(),be=ge.target();if(de.css("display")!="none"&&be.css("display")!="none")if(w.quality=="draft"){var Re=ve.get(de.id()),Pe=ve.get(be.id()),Be=[],Ne=[];if(de.isParent()){var Me=c.calcBoundingBox(de,R[se].xCoords,R[se].yCoords,ve);Be.push(Me.topLeftX+Me.width/2),Be.push(Me.topLeftY+Me.height/2)}else Be.push(R[se].xCoords[Re]),Be.push(R[se].yCoords[Re]);if(be.isParent()){var ne=c.calcBoundingBox(be,R[se].xCoords,R[se].yCoords,ve);Ne.push(ne.topLeftX+ne.width/2),Ne.push(ne.topLeftY+ne.height/2)}else Ne.push(R[se].xCoords[Pe]),Ne.push(R[se].yCoords[Pe]);ce.edges.push({startX:Be[0],startY:Be[1],endX:Ne[0],endY:Ne[1]})}else S[se][de.id()]&&S[se][be.id()]&&ce.edges.push({startX:S[se][de.id()].getCenterX(),startY:S[se][de.id()].getCenterY(),endX:S[se][be.id()].getCenterX(),endY:S[se][be.id()].getCenterY()})}),ce.nodes.length>0&&(Y.push(ce),H.add(se))}});var Q=N.packComponents(Y,w.randomize).shifts;if(w.quality=="draft")R.forEach(function(le,se){var ve=le.xCoords.map(function(ye){return ye+Q[se].dx}),ce=le.yCoords.map(function(ye){return ye+Q[se].dy});le.xCoords=ve,le.yCoords=ce});else{var ee=0;H.forEach(function(le){Object.keys(S[le]).forEach(function(se){var ve=S[le][se];ve.setCenter(ve.getCenterX()+Q[ee].dx,ve.getCenterY()+Q[ee].dy)}),ee++})}}}else{var I=w.eles.boundingBox();if(P.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),w.randomize){var O=g(w);R.push(O)}w.quality=="default"||w.quality=="proof"?(S.push(y(w,R[0])),c.relocateComponent(P[0],S[0],w)):c.relocateComponent(P[0],R[0],w)}var te=function(se,ve){if(w.quality=="default"||w.quality=="proof"){typeof se=="number"&&(se=ve);var ce=void 0,ye=void 0,ge=se.data("id");return S.forEach(function(be){ge in be&&(ce={x:be[ge].getRect().getCenterX(),y:be[ge].getRect().getCenterY()},ye=be[ge])}),w.nodeDimensionsIncludeLabels&&(ye.labelWidth&&(ye.labelPosHorizontal=="left"?ce.x+=ye.labelWidth/2:ye.labelPosHorizontal=="right"&&(ce.x-=ye.labelWidth/2)),ye.labelHeight&&(ye.labelPosVertical=="top"?ce.y+=ye.labelHeight/2:ye.labelPosVertical=="bottom"&&(ce.y-=ye.labelHeight/2))),ce==null&&(ce={x:se.position("x"),y:se.position("y")}),{x:ce.x,y:ce.y}}else{var de=void 0;return R.forEach(function(be){var Re=be.nodeIndexes.get(se.id());Re!=null&&(de={x:be.xCoords[Re],y:be.yCoords[Re]})}),de==null&&(de={x:se.position("x"),y:se.position("y")}),{x:de.x,y:de.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var he=c.calcParentsWithoutChildren(C,A),xe=A.filter(function(le){return le.css("display")=="none"});w.eles=A.not(xe),A.nodes().not(":parent").not(xe).layoutPositions(L,w,te),he.length>0&&he.forEach(function(le){le.position(te(le))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),E})();s.exports=m}),657:((s,u,l)=>{var f=l(548),h=l(140).layoutBase.Matrix,v=l(140).layoutBase.SVD,c=function(g){var p=g.cy,y=g.eles,b=y.nodes(),m=y.nodes(":parent"),E=new Map,T=new Map,L=new Map,w=[],C=[],A=[],R=[],S=[],D=[],P=[],x=[],N=void 0,M=1e8,I=1e-9,O=g.piTol,k=g.samplingType,F=g.nodeSeparation,_=void 0,z=function(){for(var W=0,Z=0,j=!1;Z<_;){W=Math.floor(Math.random()*N),j=!1;for(var ae=0;ae<Z;ae++)if(R[ae]==W){j=!0;break}if(!j)R[Z]=W,Z++;else continue}},X=function(W,Z,j){for(var ae=[],re=0,ie=0,ue=0,oe=void 0,fe=[],me=0,pe=1,we=0;we<N;we++)fe[we]=M;for(ae[ie]=W,fe[W]=0;ie>=re;){ue=ae[re++];for(var De=w[ue],Le=0;Le<De.length;Le++)oe=T.get(De[Le]),fe[oe]==M&&(fe[oe]=fe[ue]+1,ae[++ie]=oe);D[ue][Z]=fe[ue]*F}if(j){for(var Te=0;Te<N;Te++)D[Te][Z]<S[Te]&&(S[Te]=D[Te][Z]);for(var ke=0;ke<N;ke++)S[ke]>me&&(me=S[ke],pe=ke)}return pe},q=function(W){var Z=void 0;if(W){Z=Math.floor(Math.random()*N);for(var ae=0;ae<N;ae++)S[ae]=M;for(var re=0;re<_;re++)R[re]=Z,Z=X(Z,re,W)}else{z();for(var j=0;j<_;j++)X(R[j],j,W)}for(var ie=0;ie<N;ie++)for(var ue=0;ue<_;ue++)D[ie][ue]*=D[ie][ue];for(var oe=0;oe<_;oe++)P[oe]=[];for(var fe=0;fe<_;fe++)for(var me=0;me<_;me++)P[fe][me]=D[R[me]][fe]},G=function(){for(var W=v.svd(P),Z=W.S,j=W.U,ae=W.V,re=Z[0]*Z[0]*Z[0],ie=[],ue=0;ue<_;ue++){ie[ue]=[];for(var oe=0;oe<_;oe++)ie[ue][oe]=0,ue==oe&&(ie[ue][oe]=Z[ue]/(Z[ue]*Z[ue]+re/(Z[ue]*Z[ue])))}x=h.multMat(h.multMat(ae,ie),h.transpose(j))},U=function(){for(var W=void 0,Z=void 0,j=[],ae=[],re=[],ie=[],ue=0;ue<N;ue++)j[ue]=Math.random(),ae[ue]=Math.random();j=h.normalize(j),ae=h.normalize(ae);for(var oe=I,fe=I,me=void 0;;){for(var pe=0;pe<N;pe++)re[pe]=j[pe];if(j=h.multGamma(h.multL(h.multGamma(re),D,x)),W=h.dotProduct(re,j),j=h.normalize(j),oe=h.dotProduct(re,j),me=Math.abs(oe/fe),me<=1+O&&me>=1)break;fe=oe}for(var we=0;we<N;we++)re[we]=j[we];for(fe=I;;){for(var De=0;De<N;De++)ie[De]=ae[De];if(ie=h.minusOp(ie,h.multCons(re,h.dotProduct(re,ie))),ae=h.multGamma(h.multL(h.multGamma(ie),D,x)),Z=h.dotProduct(ie,ae),ae=h.normalize(ae),oe=h.dotProduct(ie,ae),me=Math.abs(oe/fe),me<=1+O&&me>=1)break;fe=oe}for(var Le=0;Le<N;Le++)ie[Le]=ae[Le];C=h.multCons(re,Math.sqrt(Math.abs(W))),A=h.multCons(ie,Math.sqrt(Math.abs(Z)))};f.connectComponents(p,y,f.getTopMostNodes(b),E),m.forEach(function(V){f.connectComponents(p,y,f.getTopMostNodes(V.descendants().intersection(y)),E)});for(var K=0,J=0;J<b.length;J++)b[J].isParent()||T.set(b[J].id(),K++);var H=!0,Y=!1,$=void 0;try{for(var Q=E.keys()[Symbol.iterator](),ee;!(H=(ee=Q.next()).done);H=!0){var te=ee.value;T.set(te,K++)}}catch(V){Y=!0,$=V}finally{try{!H&&Q.return&&Q.return()}finally{if(Y)throw $}}for(var he=0;he<T.size;he++)w[he]=[];m.forEach(function(V){for(var W=V.children().intersection(y);W.nodes(":childless").length==0;)W=W.nodes()[0].children().intersection(y);var Z=0,j=W.nodes(":childless")[0].connectedEdges().length;W.nodes(":childless").forEach(function(ae,re){ae.connectedEdges().length<j&&(j=ae.connectedEdges().length,Z=re)}),L.set(V.id(),W.nodes(":childless")[Z].id())}),b.forEach(function(V){var W=void 0;V.isParent()?W=T.get(L.get(V.id())):W=T.get(V.id()),V.neighborhood().nodes().forEach(function(Z){y.intersection(V.edgesWith(Z)).length>0&&(Z.isParent()?w[W].push(L.get(Z.id())):w[W].push(Z.id()))})});var xe=function(W){var Z=T.get(W),j=void 0;E.get(W).forEach(function(ae){p.getElementById(ae).isParent()?j=L.get(ae):j=ae,w[Z].push(j),w[T.get(j)].push(W)})},le=!0,se=!1,ve=void 0;try{for(var ce=E.keys()[Symbol.iterator](),ye;!(le=(ye=ce.next()).done);le=!0){var ge=ye.value;xe(ge)}}catch(V){se=!0,ve=V}finally{try{!le&&ce.return&&ce.return()}finally{if(se)throw ve}}N=T.size;var de=void 0;if(N>2){_=N<g.sampleSize?N:g.sampleSize;for(var be=0;be<N;be++)D[be]=[];for(var Re=0;Re<_;Re++)x[Re]=[];return g.quality=="draft"||g.step=="all"?(q(k),G(),U(),de={nodeIndexes:T,xCoords:C,yCoords:A}):(T.forEach(function(V,W){C.push(p.getElementById(W).position("x")),A.push(p.getElementById(W).position("y"))}),de={nodeIndexes:T,xCoords:C,yCoords:A}),de}else{var Pe=T.keys(),Be=p.getElementById(Pe.next().value),Ne=Be.position(),Me=Be.outerWidth();if(C.push(Ne.x),A.push(Ne.y),N==2){var ne=p.getElementById(Pe.next().value),B=ne.outerWidth();C.push(Ne.x+Me/2+B/2+g.idealEdgeLength),A.push(Ne.y)}return de={nodeIndexes:T,xCoords:C,yCoords:A},de}};s.exports={spectralLayout:c}}),579:((s,u,l)=>{var f=l(212),h=function(c){c&&c("layout","fcose",f)};typeof cytoscape<"u"&&h(cytoscape),s.exports=h}),140:(s=>{s.exports=r})},n={};function i(s){var u=n[s];if(u!==void 0)return u.exports;var l=n[s]={exports:{}};return a[s](l,l.exports,i),l.exports}var o=i(579);return o})()})})(ii)),ii.exports}var lI=uI();const EI=xv(lI);var ui={exports:{}},li={exports:{}},fi={exports:{}},fI=fi.exports,hE;function hI(){return hE||(hE=1,(function(t,e){(function(a,n){t.exports=n()})(fI,function(){return(function(r){var a={};function n(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return r[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=r,n.c=a,n.i=function(i){return i},n.d=function(i,o,s){n.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(o,"a",o),o},n.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},n.p="",n(n.s=26)})([(function(r,a,n){function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,r.exports=i}),(function(r,a,n){var i=n(2),o=n(8),s=n(9);function u(f,h,v){i.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=h}u.prototype=Object.create(i.prototype);for(var l in i)u[l]=i[l];u.prototype.getSource=function(){return this.source},u.prototype.getTarget=function(){return this.target},u.prototype.isInterGraph=function(){return this.isInterGraph},u.prototype.getLength=function(){return this.length},u.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},u.prototype.getBendpoints=function(){return this.bendpoints},u.prototype.getLca=function(){return this.lca},u.prototype.getSourceInLca=function(){return this.sourceInLca},u.prototype.getTargetInLca=function(){return this.targetInLca},u.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},u.prototype.getOtherEndInGraph=function(f,h){for(var v=this.getOtherEnd(f),c=h.getGraphManager().getRoot();;){if(v.getOwner()==h)return v;if(v.getOwner()==c)break;v=v.getOwner().getParent()}return null},u.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},u.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},r.exports=u}),(function(r,a,n){function i(o){this.vGraphObject=o}r.exports=i}),(function(r,a,n){var i=n(2),o=n(10),s=n(13),u=n(0),l=n(16),f=n(4);function h(c,d,g,p){g==null&&p==null&&(p=d),i.call(this,p),c.graphManager!=null&&(c=c.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=c,g!=null&&d!=null?this.rect=new s(d.x,d.y,g.width,g.height):this.rect=new s}h.prototype=Object.create(i.prototype);for(var v in i)h[v]=i[v];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(c){this.rect.width=c},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(c){this.rect.height=c},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(c,d){this.rect.x=c.x,this.rect.y=c.y,this.rect.width=d.width,this.rect.height=d.height},h.prototype.setCenter=function(c,d){this.rect.x=c-this.rect.width/2,this.rect.y=d-this.rect.height/2},h.prototype.setLocation=function(c,d){this.rect.x=c,this.rect.y=d},h.prototype.moveBy=function(c,d){this.rect.x+=c,this.rect.y+=d},h.prototype.getEdgeListToNode=function(c){var d=[],g=this;return g.edges.forEach(function(p){if(p.target==c){if(p.source!=g)throw"Incorrect edge source!";d.push(p)}}),d},h.prototype.getEdgesBetween=function(c){var d=[],g=this;return g.edges.forEach(function(p){if(!(p.source==g||p.target==g))throw"Incorrect edge source and/or target";(p.target==c||p.source==c)&&d.push(p)}),d},h.prototype.getNeighborsList=function(){var c=new Set,d=this;return d.edges.forEach(function(g){if(g.source==d)c.add(g.target);else{if(g.target!=d)throw"Incorrect incidency!";c.add(g.source)}}),c},h.prototype.withChildren=function(){var c=new Set,d,g;if(c.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)d=p[y],g=d.withChildren(),g.forEach(function(b){c.add(b)});return c},h.prototype.getNoOfChildren=function(){var c=0,d;if(this.child==null)c=1;else for(var g=this.child.getNodes(),p=0;p<g.length;p++)d=g[p],c+=d.getNoOfChildren();return c==0&&(c=1),c},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var c,d,g=-u.INITIAL_WORLD_BOUNDARY,p=u.INITIAL_WORLD_BOUNDARY;c=u.WORLD_CENTER_X+l.nextDouble()*(p-g)+g;var y=-u.INITIAL_WORLD_BOUNDARY,b=u.INITIAL_WORLD_BOUNDARY;d=u.WORLD_CENTER_Y+l.nextDouble()*(b-y)+y,this.rect.x=c,this.rect.y=d},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var c=this.getChild();if(c.updateBounds(!0),this.rect.x=c.getLeft(),this.rect.y=c.getTop(),this.setWidth(c.getRight()-c.getLeft()),this.setHeight(c.getBottom()-c.getTop()),u.NODE_DIMENSIONS_INCLUDE_LABELS){var d=c.getRight()-c.getLeft(),g=c.getBottom()-c.getTop();this.labelWidth>d&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>g&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-g)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-g),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(c){var d=this.rect.x;d>u.WORLD_BOUNDARY?d=u.WORLD_BOUNDARY:d<-u.WORLD_BOUNDARY&&(d=-u.WORLD_BOUNDARY);var g=this.rect.y;g>u.WORLD_BOUNDARY?g=u.WORLD_BOUNDARY:g<-u.WORLD_BOUNDARY&&(g=-u.WORLD_BOUNDARY);var p=new f(d,g),y=c.inverseTransformPoint(p);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},r.exports=h}),(function(r,a,n){function i(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(o){this.x=o},i.prototype.setY=function(o){this.y=o},i.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},r.exports=i}),(function(r,a,n){var i=n(2),o=n(10),s=n(0),u=n(6),l=n(3),f=n(1),h=n(13),v=n(12),c=n(11);function d(p,y,b){i.call(this,b),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof u?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}d.prototype=Object.create(i.prototype);for(var g in i)d[g]=i[g];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(p,y,b){if(y==null&&b==null){var m=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(m)>-1)throw"Node already in graph!";return m.owner=this,this.getNodes().push(m),m}else{var E=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(b)>-1))throw"Source or target not in graph!";if(!(y.owner==b.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=b.owner?null:(E.source=y,E.target=b,E.isInterGraph=!1,this.getEdges().push(E),y.edges.push(E),b!=y&&b.edges.push(E),E)}},d.prototype.remove=function(p){var y=p;if(p instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var b=y.edges.slice(),m,E=b.length,T=0;T<E;T++)m=b[T],m.isInterGraph?this.graphManager.remove(m):m.source.owner.remove(m);var L=this.nodes.indexOf(y);if(L==-1)throw"Node not in owner node list!";this.nodes.splice(L,1)}else if(p instanceof f){var m=p;if(m==null)throw"Edge is null!";if(!(m.source!=null&&m.target!=null))throw"Source and/or target is null!";if(!(m.source.owner!=null&&m.target.owner!=null&&m.source.owner==this&&m.target.owner==this))throw"Source and/or target owner is invalid!";var w=m.source.edges.indexOf(m),C=m.target.edges.indexOf(m);if(!(w>-1&&C>-1))throw"Source and/or target doesn't know this edge!";m.source.edges.splice(w,1),m.target!=m.source&&m.target.edges.splice(C,1);var L=m.source.owner.getEdges().indexOf(m);if(L==-1)throw"Not in owner's edge list!";m.source.owner.getEdges().splice(L,1)}},d.prototype.updateLeftTop=function(){for(var p=o.MAX_VALUE,y=o.MAX_VALUE,b,m,E,T=this.getNodes(),L=T.length,w=0;w<L;w++){var C=T[w];b=C.getTop(),m=C.getLeft(),p>b&&(p=b),y>m&&(y=m)}return p==o.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?E=T[0].getParent().paddingLeft:E=this.margin,this.left=y-E,this.top=p-E,new v(this.left,this.top))},d.prototype.updateBounds=function(p){for(var y=o.MAX_VALUE,b=-o.MAX_VALUE,m=o.MAX_VALUE,E=-o.MAX_VALUE,T,L,w,C,A,R=this.nodes,S=R.length,D=0;D<S;D++){var P=R[D];p&&P.child!=null&&P.updateBounds(),T=P.getLeft(),L=P.getRight(),w=P.getTop(),C=P.getBottom(),y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var x=new h(y,m,b-y,E-m);y==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),R[0].getParent().paddingLeft!=null?A=R[0].getParent().paddingLeft:A=this.margin,this.left=x.x-A,this.right=x.x+x.width+A,this.top=x.y-A,this.bottom=x.y+x.height+A},d.calculateBounds=function(p){for(var y=o.MAX_VALUE,b=-o.MAX_VALUE,m=o.MAX_VALUE,E=-o.MAX_VALUE,T,L,w,C,A=p.length,R=0;R<A;R++){var S=p[R];T=S.getLeft(),L=S.getRight(),w=S.getTop(),C=S.getBottom(),y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var D=new h(y,m,b-y,E-m);return D},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,b=y.length,m=0;m<b;m++){var E=y[m];p+=E.calcEstimatedSize()}return p==0?this.estimatedSize=s.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new c,b=new Set,m=this.nodes[0],E,T,L=m.withChildren();for(L.forEach(function(D){y.push(D),b.add(D)});y.length!==0;){m=y.shift(),E=m.getEdges();for(var w=E.length,C=0;C<w;C++){var A=E[C];if(T=A.getOtherEndInGraph(m,this),T!=null&&!b.has(T)){var R=T.withChildren();R.forEach(function(D){y.push(D),b.add(D)})}}}if(this.isConnected=!1,b.size>=this.nodes.length){var S=0;b.forEach(function(D){D.owner==p&&S++}),S==this.nodes.length&&(this.isConnected=!0)}},r.exports=d}),(function(r,a,n){var i,o=n(1);function s(u){i=n(5),this.layout=u,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var u=this.layout.newGraph(),l=this.layout.newNode(null),f=this.add(u,l);return this.setRootGraph(f),this.rootGraph},s.prototype.add=function(u,l,f,h,v){if(f==null&&h==null&&v==null){if(u==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(u)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(u),u.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return u.parent=l,l.child=u,u}else{v=f,h=l,f=u;var c=h.getOwner(),d=v.getOwner();if(!(c!=null&&c.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(c==d)return f.isInterGraph=!1,c.add(f,h,v);if(f.isInterGraph=!0,f.source=h,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},s.prototype.remove=function(u){if(u instanceof i){var l=u;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(l.getEdges());for(var h,v=f.length,c=0;c<v;c++)h=f[c],l.remove(h);var d=[];d=d.concat(l.getNodes());var g;v=d.length;for(var c=0;c<v;c++)g=d[c],l.remove(g);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(u instanceof o){if(h=u,h==null)throw"Edge is null!";if(!h.isInterGraph)throw"Not an inter-graph edge!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.edges.indexOf(h)!=-1&&h.target.edges.indexOf(h)!=-1))throw"Source and/or target doesn't know this edge!";var p=h.source.edges.indexOf(h);if(h.source.edges.splice(p,1),p=h.target.edges.indexOf(h),h.target.edges.splice(p,1),!(h.source.owner!=null&&h.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(h.source.owner.getGraphManager().edges.indexOf(h)==-1)throw"Not in owner graph manager's edge list!";var p=h.source.owner.getGraphManager().edges.indexOf(h);h.source.owner.getGraphManager().edges.splice(p,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){for(var u=[],l=this.getGraphs(),f=l.length,h=0;h<f;h++)u=u.concat(l[h].getNodes());this.allNodes=u}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var u=[],l=this.getGraphs();l.length;for(var f=0;f<l.length;f++)u=u.concat(l[f].getEdges());u=u.concat(this.edges),this.allEdges=u}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(u){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=u},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(u){if(u.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=u,u.parent==null&&(u.parent=this.layout.newNode("Root node"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(u,l){if(!(u!=null&&l!=null))throw"assert failed";if(u==l)return!0;var f=u.getOwner(),h;do{if(h=f.getParent(),h==null)break;if(h==l)return!0;if(f=h.getOwner(),f==null)break}while(!0);f=l.getOwner();do{if(h=f.getParent(),h==null)break;if(h==u)return!0;if(f=h.getOwner(),f==null)break}while(!0);return!1},s.prototype.calcLowestCommonAncestors=function(){for(var u,l,f,h,v,c=this.getAllEdges(),d=c.length,g=0;g<d;g++){if(u=c[g],l=u.source,f=u.target,u.lca=null,u.sourceInLca=l,u.targetInLca=f,l==f){u.lca=l.getOwner();continue}for(h=l.getOwner();u.lca==null;){for(u.targetInLca=f,v=f.getOwner();u.lca==null;){if(v==h){u.lca=v;break}if(v==this.rootGraph)break;if(u.lca!=null)throw"assert failed";u.targetInLca=v.getParent(),v=u.targetInLca.getOwner()}if(h==this.rootGraph)break;u.lca==null&&(u.sourceInLca=h.getParent(),h=u.sourceInLca.getOwner())}if(u.lca==null)throw"assert failed"}},s.prototype.calcLowestCommonAncestor=function(u,l){if(u==l)return u.getOwner();var f=u.getOwner();do{if(f==null)break;var h=l.getOwner();do{if(h==null)break;if(h==f)return h;h=h.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},s.prototype.calcInclusionTreeDepths=function(u,l){u==null&&l==null&&(u=this.rootGraph,l=1);for(var f,h=u.getNodes(),v=h.length,c=0;c<v;c++)f=h[c],f.inclusionTreeDepth=l,f.child!=null&&this.calcInclusionTreeDepths(f.child,l+1)},s.prototype.includesInvalidEdge=function(){for(var u,l=this.edges.length,f=0;f<l;f++)if(u=this.edges[f],this.isOneAncestorOfOther(u.source,u.target))return!0;return!1},r.exports=s}),(function(r,a,n){var i=n(0);function o(){}for(var s in i)o[s]=i[s];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=o.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,r.exports=o}),(function(r,a,n){var i=n(12);function o(){}o.calcSeparationAmount=function(s,u,l,f){if(!s.intersects(u))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(s,u,h),l[0]=Math.min(s.getRight(),u.getRight())-Math.max(s.x,u.x),l[1]=Math.min(s.getBottom(),u.getBottom())-Math.max(s.y,u.y),s.getX()<=u.getX()&&s.getRight()>=u.getRight()?l[0]+=Math.min(u.getX()-s.getX(),s.getRight()-u.getRight()):u.getX()<=s.getX()&&u.getRight()>=s.getRight()&&(l[0]+=Math.min(s.getX()-u.getX(),u.getRight()-s.getRight())),s.getY()<=u.getY()&&s.getBottom()>=u.getBottom()?l[1]+=Math.min(u.getY()-s.getY(),s.getBottom()-u.getBottom()):u.getY()<=s.getY()&&u.getBottom()>=s.getBottom()&&(l[1]+=Math.min(s.getY()-u.getY(),u.getBottom()-s.getBottom()));var v=Math.abs((u.getCenterY()-s.getCenterY())/(u.getCenterX()-s.getCenterX()));u.getCenterY()===s.getCenterY()&&u.getCenterX()===s.getCenterX()&&(v=1);var c=v*l[0],d=l[1]/v;l[0]<d?d=l[0]:c=l[1],l[0]=-1*h[0]*(d/2+f),l[1]=-1*h[1]*(c/2+f)},o.decideDirectionsForOverlappingNodes=function(s,u,l){s.getCenterX()<u.getCenterX()?l[0]=-1:l[0]=1,s.getCenterY()<u.getCenterY()?l[1]=-1:l[1]=1},o.getIntersection2=function(s,u,l){var f=s.getCenterX(),h=s.getCenterY(),v=u.getCenterX(),c=u.getCenterY();if(s.intersects(u))return l[0]=f,l[1]=h,l[2]=v,l[3]=c,!0;var d=s.getX(),g=s.getY(),p=s.getRight(),y=s.getX(),b=s.getBottom(),m=s.getRight(),E=s.getWidthHalf(),T=s.getHeightHalf(),L=u.getX(),w=u.getY(),C=u.getRight(),A=u.getX(),R=u.getBottom(),S=u.getRight(),D=u.getWidthHalf(),P=u.getHeightHalf(),x=!1,N=!1;if(f===v){if(h>c)return l[0]=f,l[1]=g,l[2]=v,l[3]=R,!1;if(h<c)return l[0]=f,l[1]=b,l[2]=v,l[3]=w,!1}else if(h===c){if(f>v)return l[0]=d,l[1]=h,l[2]=C,l[3]=c,!1;if(f<v)return l[0]=p,l[1]=h,l[2]=L,l[3]=c,!1}else{var M=s.height/s.width,I=u.height/u.width,O=(c-h)/(v-f),k=void 0,F=void 0,_=void 0,z=void 0,X=void 0,q=void 0;if(-M===O?f>v?(l[0]=y,l[1]=b,x=!0):(l[0]=p,l[1]=g,x=!0):M===O&&(f>v?(l[0]=d,l[1]=g,x=!0):(l[0]=m,l[1]=b,x=!0)),-I===O?v>f?(l[2]=A,l[3]=R,N=!0):(l[2]=C,l[3]=w,N=!0):I===O&&(v>f?(l[2]=L,l[3]=w,N=!0):(l[2]=S,l[3]=R,N=!0)),x&&N)return!1;if(f>v?h>c?(k=this.getCardinalDirection(M,O,4),F=this.getCardinalDirection(I,O,2)):(k=this.getCardinalDirection(-M,O,3),F=this.getCardinalDirection(-I,O,1)):h>c?(k=this.getCardinalDirection(-M,O,1),F=this.getCardinalDirection(-I,O,3)):(k=this.getCardinalDirection(M,O,2),F=this.getCardinalDirection(I,O,4)),!x)switch(k){case 1:z=g,_=f+-T/O,l[0]=_,l[1]=z;break;case 2:_=m,z=h+E*O,l[0]=_,l[1]=z;break;case 3:z=b,_=f+T/O,l[0]=_,l[1]=z;break;case 4:_=y,z=h+-E*O,l[0]=_,l[1]=z;break}if(!N)switch(F){case 1:q=w,X=v+-P/O,l[2]=X,l[3]=q;break;case 2:X=S,q=c+D*O,l[2]=X,l[3]=q;break;case 3:q=R,X=v+P/O,l[2]=X,l[3]=q;break;case 4:X=A,q=c+-D*O,l[2]=X,l[3]=q;break}}return!1},o.getCardinalDirection=function(s,u,l){return s>u?l:1+l%4},o.getIntersection=function(s,u,l,f){if(f==null)return this.getIntersection2(s,u,l);var h=s.x,v=s.y,c=u.x,d=u.y,g=l.x,p=l.y,y=f.x,b=f.y,m=void 0,E=void 0,T=void 0,L=void 0,w=void 0,C=void 0,A=void 0,R=void 0,S=void 0;return T=d-v,w=h-c,A=c*v-h*d,L=b-p,C=g-y,R=y*p-g*b,S=T*C-L*w,S===0?null:(m=(w*R-C*A)/S,E=(L*A-T*R)/S,new i(m,E))},o.angleOfVector=function(s,u,l,f){var h=void 0;return s!==l?(h=Math.atan((f-u)/(l-s)),l<s?h+=Math.PI:f<u&&(h+=this.TWO_PI)):f<u?h=this.ONE_AND_HALF_PI:h=this.HALF_PI,h},o.doIntersect=function(s,u,l,f){var h=s.x,v=s.y,c=u.x,d=u.y,g=l.x,p=l.y,y=f.x,b=f.y,m=(c-h)*(b-p)-(y-g)*(d-v);if(m===0)return!1;var E=((b-p)*(y-h)+(g-y)*(b-v))/m,T=((v-d)*(y-h)+(c-h)*(b-v))/m;return 0<E&&E<1&&0<T&&T<1},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,r.exports=o}),(function(r,a,n){function i(){}i.sign=function(o){return o>0?1:o<0?-1:0},i.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},i.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},r.exports=i}),(function(r,a,n){function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,r.exports=i}),(function(r,a,n){var i=(function(){function h(v,c){for(var d=0;d<c.length;d++){var g=c[d];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}return function(v,c,d){return c&&h(v.prototype,c),d&&h(v,d),v}})();function o(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}var s=function(v){return{value:v,next:null,prev:null}},u=function(v,c,d,g){return v!==null?v.next=c:g.head=c,d!==null?d.prev=c:g.tail=c,c.prev=v,c.next=d,g.length++,c},l=function(v,c){var d=v.prev,g=v.next;return d!==null?d.next=g:c.head=g,g!==null?g.prev=d:c.tail=d,v.prev=v.next=null,c.length--,v},f=(function(){function h(v){var c=this;o(this,h),this.length=0,this.head=null,this.tail=null,v!=null&&v.forEach(function(d){return c.push(d)})}return i(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(c,d){return u(d.prev,s(c),d,this)}},{key:"insertAfter",value:function(c,d){return u(d,s(c),d.next,this)}},{key:"insertNodeBefore",value:function(c,d){return u(d.prev,c,d,this)}},{key:"insertNodeAfter",value:function(c,d){return u(d,c,d.next,this)}},{key:"push",value:function(c){return u(this.tail,s(c),null,this)}},{key:"unshift",value:function(c){return u(null,s(c),this.head,this)}},{key:"remove",value:function(c){return l(c,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(c){if(c<=this.length()){for(var d=1,g=this.head;d<c;)g=g.next,d++;return g.value}}},{key:"set_object_at",value:function(c,d){if(c<=this.length()){for(var g=1,p=this.head;g<c;)p=p.next,g++;p.value=d}}}]),h})();r.exports=f}),(function(r,a,n){function i(o,s,u){this.x=null,this.y=null,o==null&&s==null&&u==null?(this.x=0,this.y=0):typeof o=="number"&&typeof s=="number"&&u==null?(this.x=o,this.y=s):o.constructor.name=="Point"&&s==null&&u==null&&(u=o,this.x=u.x,this.y=u.y)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(o,s,u){o.constructor.name=="Point"&&s==null&&u==null?(u=o,this.setLocation(u.x,u.y)):typeof o=="number"&&typeof s=="number"&&u==null&&(parseInt(o)==o&&parseInt(s)==s?this.move(o,s):(this.x=Math.floor(o+.5),this.y=Math.floor(s+.5)))},i.prototype.move=function(o,s){this.x=o,this.y=s},i.prototype.translate=function(o,s){this.x+=o,this.y+=s},i.prototype.equals=function(o){if(o.constructor.name=="Point"){var s=o;return this.x==s.x&&this.y==s.y}return this==o},i.prototype.toString=function(){return new i().constructor.name+"[x="+this.x+",y="+this.y+"]"},r.exports=i}),(function(r,a,n){function i(o,s,u,l){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&s!=null&&u!=null&&l!=null&&(this.x=o,this.y=s,this.width=u,this.height=l)}i.prototype.getX=function(){return this.x},i.prototype.setX=function(o){this.x=o},i.prototype.getY=function(){return this.y},i.prototype.setY=function(o){this.y=o},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(o){this.width=o},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(o){this.height=o},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},r.exports=i}),(function(r,a,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(){}o.lastID=0,o.createID=function(s){return o.isPrimitive(s)?s:(s.uniqueID!=null||(s.uniqueID=o.getString(),o.lastID++),s.uniqueID)},o.getString=function(s){return s==null&&(s=o.lastID),"Object#"+s},o.isPrimitive=function(s){var u=typeof s>"u"?"undefined":i(s);return s==null||u!="object"&&u!="function"},r.exports=o}),(function(r,a,n){function i(g){if(Array.isArray(g)){for(var p=0,y=Array(g.length);p<g.length;p++)y[p]=g[p];return y}else return Array.from(g)}var o=n(0),s=n(6),u=n(3),l=n(1),f=n(5),h=n(4),v=n(17),c=n(27);function d(g){c.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}d.RANDOM_SEED=1,d.prototype=Object.create(c.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var g=new s(this);return this.graphManager=g,g},d.prototype.newGraph=function(g){return new f(null,this.graphManager,g)},d.prototype.newNode=function(g){return new u(this.graphManager,g)},d.prototype.newEdge=function(g){return new l(null,null,g)},d.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var g;return this.checkLayoutSuccess()?g=!1:g=this.layout(),o.ANIMATE==="during"?!1:(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),p=0;p<g.length;p++)g[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},d.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof u){var p=g;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),b=0;b<y.length;b++)update(y[b]);if(p.vGraphObject!=null){var m=p.vGraphObject;m.update(p)}}else if(g instanceof l){var E=g;if(E.vGraphObject!=null){var T=E.vGraphObject;T.update(E)}}else if(g instanceof f){var L=g;if(L.vGraphObject!=null){var w=L.vGraphObject;w.update(L)}}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(g){if(g==null)this.transform(new h(0,0));else{var p=new v,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(g.x),p.setWorldOrgY(g.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var b=this.getAllNodes(),m,E=0;E<b.length;E++)m=b[E],m.transform(p)}}},d.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,b=g.getNodes(),m=0;m<b.length;m++)p=b[m],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},d.prototype.getFlatForest=function(){for(var g=[],p=!0,y=this.graphManager.getRoot().getNodes(),b=!0,m=0;m<y.length;m++)y[m].getChild()!=null&&(b=!1);if(!b)return g;var E=new Set,T=[],L=new Map,w=[];for(w=w.concat(y);w.length>0&&p;){for(T.push(w[0]);T.length>0&&p;){var C=T[0];T.splice(0,1),E.add(C);for(var A=C.getEdges(),m=0;m<A.length;m++){var R=A[m].getOtherEnd(C);if(L.get(C)!=R)if(!E.has(R))T.push(R),L.set(R,C);else{p=!1;break}}}if(!p)g=[];else{var S=[].concat(i(E));g.push(S);for(var m=0;m<S.length;m++){var D=S[m],P=w.indexOf(D);P>-1&&w.splice(P,1)}E=new Set,L=new Map}}return g},d.prototype.createDummyNodesForBendpoints=function(g){for(var p=[],y=g.source,b=this.graphManager.calcLowestCommonAncestor(g.source,g.target),m=0;m<g.bendpoints.length;m++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),b.add(E);var T=this.newEdge(null);this.graphManager.add(T,y,E),p.add(E),y=E}var T=this.newEdge(null);return this.graphManager.add(T,y,g.target),this.edgeToDummyNodes.set(g,p),g.isInterGraph()?this.graphManager.remove(g):b.remove(g),p},d.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(i(this.edgeToDummyNodes.keys())).concat(g);for(var p=0;p<g.length;p++){var y=g[p];if(y.bendpoints.length>0){for(var b=this.edgeToDummyNodes.get(y),m=0;m<b.length;m++){var E=b[m],T=new h(E.getCenterX(),E.getCenterY()),L=y.bendpoints.get(m);L.x=T.x,L.y=T.y,E.getOwner().remove(E)}this.graphManager.add(y,y.source,y.target)}}},d.transform=function(g,p,y,b){if(y!=null&&b!=null){var m=p;if(g<=50){var E=p/y;m-=(p-E)/50*(50-g)}else{var T=p*b;m+=(T-p)/50*(g-50)}return m}else{var L,w;return g<=50?(L=9*p/500,w=p/10):(L=9*p/50,w=-8*p),L*g+w}},d.findCenterOfTree=function(g){var p=[];p=p.concat(g);var y=[],b=new Map,m=!1,E=null;(p.length==1||p.length==2)&&(m=!0,E=p[0]);for(var T=0;T<p.length;T++){var L=p[T],w=L.getNeighborsList().size;b.set(L,L.getNeighborsList().size),w==1&&y.push(L)}var C=[];for(C=C.concat(y);!m;){var A=[];A=A.concat(C),C=[];for(var T=0;T<p.length;T++){var L=p[T],R=p.indexOf(L);R>=0&&p.splice(R,1);var S=L.getNeighborsList();S.forEach(function(x){if(y.indexOf(x)<0){var N=b.get(x),M=N-1;M==1&&C.push(x),b.set(x,M)}})}y=y.concat(C),(p.length==1||p.length==2)&&(m=!0,E=p[0])}return E},d.prototype.setGraphManager=function(g){this.graphManager=g},r.exports=d}),(function(r,a,n){function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},r.exports=i}),(function(r,a,n){var i=n(4);function o(s,u){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var u=0,l=this.lworldExtX;return l!=0&&(u=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/l),u},o.prototype.transformY=function(s){var u=0,l=this.lworldExtY;return l!=0&&(u=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/l),u},o.prototype.inverseTransformX=function(s){var u=0,l=this.ldeviceExtX;return l!=0&&(u=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/l),u},o.prototype.inverseTransformY=function(s){var u=0,l=this.ldeviceExtY;return l!=0&&(u=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/l),u},o.prototype.inverseTransformPoint=function(s){var u=new i(this.inverseTransformX(s.x),this.inverseTransformY(s.y));return u},r.exports=o}),(function(r,a,n){function i(c){if(Array.isArray(c)){for(var d=0,g=Array(c.length);d<c.length;d++)g[d]=c[d];return g}else return Array.from(c)}var o=n(15),s=n(7),u=n(0),l=n(8),f=n(9);function h(){o.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.springConstant=s.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=s.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}h.prototype=Object.create(o.prototype);for(var v in o)h[v]=o[v];h.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var c,d,g,p,y,b,m=this.getGraphManager().getAllEdges(),E=0;E<m.length;E++)c=m[E],c.idealLength=this.idealEdgeLength,c.isInterGraph&&(g=c.getSource(),p=c.getTarget(),y=c.getSourceInLca().getEstimatedSize(),b=c.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(c.idealLength+=y+b-2*u.SIMPLE_NODE_SIZE),d=c.getLca().getInclusionTreeDepth(),c.idealLength+=s.DEFAULT_EDGE_LENGTH*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*d))},h.prototype.initSpringEmbedder=function(){var c=this.getAllNodes().length;this.incremental?(c>s.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(c-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(c>s.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(c-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var c=this.getAllEdges(),d,g=0;g<c.length;g++)d=c[g],this.calcSpringForce(d,d.idealLength)},h.prototype.calcRepulsionForces=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,p,y,b,m=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&c&&this.updateGrid(),E=new Set,g=0;g<m.length;g++)y=m[g],this.calculateRepulsionForceOfANode(y,E,c,d),E.add(y);else for(g=0;g<m.length;g++)for(y=m[g],p=g+1;p<m.length;p++)b=m[p],y.getOwner()==b.getOwner()&&this.calcRepulsionForce(y,b)},h.prototype.calcGravitationalForces=function(){for(var c,d=this.getAllNodesToApplyGravitation(),g=0;g<d.length;g++)c=d[g],this.calcGravitationalForce(c)},h.prototype.moveNodes=function(){for(var c=this.getAllNodes(),d,g=0;g<c.length;g++)d=c[g],d.move()},h.prototype.calcSpringForce=function(c,d){var g=c.getSource(),p=c.getTarget(),y,b,m,E;if(this.uniformLeafNodeSizes&&g.getChild()==null&&p.getChild()==null)c.updateLengthSimple();else if(c.updateLength(),c.isOverlapingSourceAndTarget)return;y=c.getLength(),y!=0&&(b=this.springConstant*(y-d),m=b*(c.lengthX/y),E=b*(c.lengthY/y),g.springForceX+=m,g.springForceY+=E,p.springForceX-=m,p.springForceY-=E)},h.prototype.calcRepulsionForce=function(c,d){var g=c.getRect(),p=d.getRect(),y=new Array(2),b=new Array(4),m,E,T,L,w,C,A;if(g.intersects(p)){l.calcSeparationAmount(g,p,y,s.DEFAULT_EDGE_LENGTH/2),C=2*y[0],A=2*y[1];var R=c.noOfChildren*d.noOfChildren/(c.noOfChildren+d.noOfChildren);c.repulsionForceX-=R*C,c.repulsionForceY-=R*A,d.repulsionForceX+=R*C,d.repulsionForceY+=R*A}else this.uniformLeafNodeSizes&&c.getChild()==null&&d.getChild()==null?(m=p.getCenterX()-g.getCenterX(),E=p.getCenterY()-g.getCenterY()):(l.getIntersection(g,p,b),m=b[2]-b[0],E=b[3]-b[1]),Math.abs(m)<s.MIN_REPULSION_DIST&&(m=f.sign(m)*s.MIN_REPULSION_DIST),Math.abs(E)<s.MIN_REPULSION_DIST&&(E=f.sign(E)*s.MIN_REPULSION_DIST),T=m*m+E*E,L=Math.sqrt(T),w=this.repulsionConstant*c.noOfChildren*d.noOfChildren/T,C=w*m/L,A=w*E/L,c.repulsionForceX-=C,c.repulsionForceY-=A,d.repulsionForceX+=C,d.repulsionForceY+=A},h.prototype.calcGravitationalForce=function(c){var d,g,p,y,b,m,E,T;d=c.getOwner(),g=(d.getRight()+d.getLeft())/2,p=(d.getTop()+d.getBottom())/2,y=c.getCenterX()-g,b=c.getCenterY()-p,m=Math.abs(y)+c.getWidth()/2,E=Math.abs(b)+c.getHeight()/2,c.getOwner()==this.graphManager.getRoot()?(T=d.getEstimatedSize()*this.gravityRangeFactor,(m>T||E>T)&&(c.gravitationForceX=-this.gravityConstant*y,c.gravitationForceY=-this.gravityConstant*b)):(T=d.getEstimatedSize()*this.compoundGravityRangeFactor,(m>T||E>T)&&(c.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,c.gravitationForceY=-this.gravityConstant*b*this.compoundGravityConstant))},h.prototype.isConverged=function(){var c,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),c=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,c||d},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var c,d=this.graphManager.getAllNodes(),g=0;g<d.length;g++)c=d[g],c.noOfChildren=c.getNoOfChildren()},h.prototype.calcGrid=function(c){var d=0,g=0;d=parseInt(Math.ceil((c.getRight()-c.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((c.getBottom()-c.getTop())/this.repulsionRange));for(var p=new Array(d),y=0;y<d;y++)p[y]=new Array(g);for(var y=0;y<d;y++)for(var b=0;b<g;b++)p[y][b]=new Array;return p},h.prototype.addNodeToGrid=function(c,d,g){var p=0,y=0,b=0,m=0;p=parseInt(Math.floor((c.getRect().x-d)/this.repulsionRange)),y=parseInt(Math.floor((c.getRect().width+c.getRect().x-d)/this.repulsionRange)),b=parseInt(Math.floor((c.getRect().y-g)/this.repulsionRange)),m=parseInt(Math.floor((c.getRect().height+c.getRect().y-g)/this.repulsionRange));for(var E=p;E<=y;E++)for(var T=b;T<=m;T++)this.grid[E][T].push(c),c.setGridCoordinates(p,y,b,m)},h.prototype.updateGrid=function(){var c,d,g=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),c=0;c<g.length;c++)d=g[c],this.addNodeToGrid(d,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(c,d,g,p){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&g||p){var y=new Set;c.surrounding=new Array;for(var b,m=this.grid,E=c.startX-1;E<c.finishX+2;E++)for(var T=c.startY-1;T<c.finishY+2;T++)if(!(E<0||T<0||E>=m.length||T>=m[0].length)){for(var L=0;L<m[E][T].length;L++)if(b=m[E][T][L],!(c.getOwner()!=b.getOwner()||c==b)&&!d.has(b)&&!y.has(b)){var w=Math.abs(c.getCenterX()-b.getCenterX())-(c.getWidth()/2+b.getWidth()/2),C=Math.abs(c.getCenterY()-b.getCenterY())-(c.getHeight()/2+b.getHeight()/2);w<=this.repulsionRange&&C<=this.repulsionRange&&y.add(b)}}c.surrounding=[].concat(i(y))}for(E=0;E<c.surrounding.length;E++)this.calcRepulsionForce(c,c.surrounding[E])},h.prototype.calcRepulsionRange=function(){return 0},r.exports=h}),(function(r,a,n){var i=n(1),o=n(7);function s(l,f,h){i.call(this,l,f,h),this.idealLength=o.DEFAULT_EDGE_LENGTH}s.prototype=Object.create(i.prototype);for(var u in i)s[u]=i[u];r.exports=s}),(function(r,a,n){var i=n(3);function o(u,l,f,h){i.call(this,u,l,f,h),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}o.prototype=Object.create(i.prototype);for(var s in i)o[s]=i[s];o.prototype.setGridCoordinates=function(u,l,f,h){this.startX=u,this.finishX=l,this.startY=f,this.finishY=h},r.exports=o}),(function(r,a,n){function i(o,s){this.width=0,this.height=0,o!==null&&s!==null&&(this.height=s,this.width=o)}i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(o){this.width=o},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(o){this.height=o},r.exports=i}),(function(r,a,n){var i=n(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(s,u){var l=i.createID(s);this.contains(l)||(this.map[l]=u,this.keys.push(s))},o.prototype.contains=function(s){return i.createID(s),this.map[s]!=null},o.prototype.get=function(s){var u=i.createID(s);return this.map[u]},o.prototype.keySet=function(){return this.keys},r.exports=o}),(function(r,a,n){var i=n(14);function o(){this.set={}}o.prototype.add=function(s){var u=i.createID(s);this.contains(u)||(this.set[u]=s)},o.prototype.remove=function(s){delete this.set[i.createID(s)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(s){return this.set[i.createID(s)]==s},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(s){for(var u=Object.keys(this.set),l=u.length,f=0;f<l;f++)s.push(this.set[u[f]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(s){for(var u=s.length,l=0;l<u;l++){var f=s[l];this.add(f)}},r.exports=o}),(function(r,a,n){var i=(function(){function l(f,h){for(var v=0;v<h.length;v++){var c=h[v];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}return function(f,h,v){return h&&l(f.prototype,h),v&&l(f,v),f}})();function o(l,f){if(!(l instanceof f))throw new TypeError("Cannot call a class as a function")}var s=n(11),u=(function(){function l(f,h){o(this,l),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var v=void 0;f instanceof s?v=f.size():v=f.length,this._quicksort(f,0,v-1)}return i(l,[{key:"_quicksort",value:function(h,v,c){if(v<c){var d=this._partition(h,v,c);this._quicksort(h,v,d),this._quicksort(h,d+1,c)}}},{key:"_partition",value:function(h,v,c){for(var d=this._get(h,v),g=v,p=c;;){for(;this.compareFunction(d,this._get(h,p));)p--;for(;this.compareFunction(this._get(h,g),d);)g++;if(g<p)this._swap(h,g,p),g++,p--;else return p}}},{key:"_get",value:function(h,v){return h instanceof s?h.get_object_at(v):h[v]}},{key:"_set",value:function(h,v,c){h instanceof s?h.set_object_at(v,c):h[v]=c}},{key:"_swap",value:function(h,v,c){var d=this._get(h,v);this._set(h,v,this._get(h,c)),this._set(h,c,d)}},{key:"_defaultCompareFunction",value:function(h,v){return v>h}}]),l})();r.exports=u}),(function(r,a,n){var i=(function(){function u(l,f){for(var h=0;h<f.length;h++){var v=f[h];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,v.key,v)}}return function(l,f,h){return f&&u(l.prototype,f),h&&u(l,h),l}})();function o(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}var s=(function(){function u(l,f){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,u),this.sequence1=l,this.sequence2=f,this.match_score=h,this.mismatch_penalty=v,this.gap_penalty=c,this.iMax=l.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var d=0;d<this.iMax;d++){this.grid[d]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[d][g]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[p][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return i(u,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var c=1;c<this.jMax;c++){var d=void 0;this.sequence1[v-1]===this.sequence2[c-1]?d=this.grid[v-1][c-1]+this.match_score:d=this.grid[v-1][c-1]+this.mismatch_penalty;var g=this.grid[v-1][c]+this.gap_penalty,p=this.grid[v][c-1]+this.gap_penalty,y=[d,g,p],b=this.arrayAllMaxIndexes(y);this.grid[v][c]=y[b[0]],this.tracebackGrid[v][c]=[b.includes(0),b.includes(1),b.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var h=f[0],v=this.tracebackGrid[h.pos[0]][h.pos[1]];v[0]&&f.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),v[1]&&f.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),v[2]&&f.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,h){for(var v=[],c=-1;(c=f.indexOf(h,c+1))!==-1;)v.push(c);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),u})();r.exports=s}),(function(r,a,n){var i=function(){};i.FDLayout=n(18),i.FDLayoutConstants=n(7),i.FDLayoutEdge=n(19),i.FDLayoutNode=n(20),i.DimensionD=n(21),i.HashMap=n(22),i.HashSet=n(23),i.IGeometry=n(8),i.IMath=n(9),i.Integer=n(10),i.Point=n(12),i.PointD=n(4),i.RandomSeed=n(16),i.RectangleD=n(13),i.Transform=n(17),i.UniqueIDGeneretor=n(14),i.Quicksort=n(24),i.LinkedList=n(11),i.LGraphObject=n(2),i.LGraph=n(5),i.LEdge=n(1),i.LGraphManager=n(6),i.LNode=n(3),i.Layout=n(15),i.LayoutConstants=n(0),i.NeedlemanWunsch=n(25),r.exports=i}),(function(r,a,n){function i(){this.listeners=[]}var o=i.prototype;o.addListener=function(s,u){this.listeners.push({event:s,callback:u})},o.removeListener=function(s,u){for(var l=this.listeners.length;l>=0;l--){var f=this.listeners[l];f.event===s&&f.callback===u&&this.listeners.splice(l,1)}},o.emit=function(s,u){for(var l=0;l<this.listeners.length;l++){var f=this.listeners[l];s===f.event&&f.callback(u)}},r.exports=i})])})})(fi)),fi.exports}var cI=li.exports,cE;function vI(){return cE||(cE=1,(function(t,e){(function(a,n){t.exports=n(hI())})(cI,function(r){return(function(a){var n={};function i(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return a[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=a,i.c=n,i.i=function(o){return o},i.d=function(o,s,u){i.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,"a",s),s},i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},i.p="",i(i.s=7)})([(function(a,n){a.exports=r}),(function(a,n,i){var o=i(0).FDLayoutConstants;function s(){}for(var u in o)s[u]=o[u];s.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,s.DEFAULT_RADIAL_SEPARATION=o.DEFAULT_EDGE_LENGTH,s.DEFAULT_COMPONENT_SEPERATION=60,s.TILE=!0,s.TILING_PADDING_VERTICAL=10,s.TILING_PADDING_HORIZONTAL=10,s.TREE_REDUCTION_ON_INCREMENTAL=!1,a.exports=s}),(function(a,n,i){var o=i(0).FDLayoutEdge;function s(l,f,h){o.call(this,l,f,h)}s.prototype=Object.create(o.prototype);for(var u in o)s[u]=o[u];a.exports=s}),(function(a,n,i){var o=i(0).LGraph;function s(l,f,h){o.call(this,l,f,h)}s.prototype=Object.create(o.prototype);for(var u in o)s[u]=o[u];a.exports=s}),(function(a,n,i){var o=i(0).LGraphManager;function s(l){o.call(this,l)}s.prototype=Object.create(o.prototype);for(var u in o)s[u]=o[u];a.exports=s}),(function(a,n,i){var o=i(0).FDLayoutNode,s=i(0).IMath;function u(f,h,v,c){o.call(this,f,h,v,c)}u.prototype=Object.create(o.prototype);for(var l in o)u[l]=o[l];u.prototype.move=function(){var f=this.graphManager.getLayout();this.displacementX=f.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=f.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>f.coolingFactor*f.maxNodeDisplacement&&(this.displacementX=f.coolingFactor*f.maxNodeDisplacement*s.sign(this.displacementX)),Math.abs(this.displacementY)>f.coolingFactor*f.maxNodeDisplacement&&(this.displacementY=f.coolingFactor*f.maxNodeDisplacement*s.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),f.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},u.prototype.propogateDisplacementToChildren=function(f,h){for(var v=this.getChild().getNodes(),c,d=0;d<v.length;d++)c=v[d],c.getChild()==null?(c.moveBy(f,h),c.displacementX+=f,c.displacementY+=h):c.propogateDisplacementToChildren(f,h)},u.prototype.setPred1=function(f){this.pred1=f},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(f){this.next=f},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(f){this.processed=f},u.prototype.isProcessed=function(){return processed},a.exports=u}),(function(a,n,i){var o=i(0).FDLayout,s=i(4),u=i(3),l=i(5),f=i(2),h=i(1),v=i(0).FDLayoutConstants,c=i(0).LayoutConstants,d=i(0).Point,g=i(0).PointD,p=i(0).Layout,y=i(0).Integer,b=i(0).IGeometry,m=i(0).LGraph,E=i(0).Transform;function T(){o.call(this),this.toBeTiled={}}T.prototype=Object.create(o.prototype);for(var L in o)T[L]=o[L];T.prototype.newGraphManager=function(){var w=new s(this);return this.graphManager=w,w},T.prototype.newGraph=function(w){return new u(null,this.graphManager,w)},T.prototype.newNode=function(w){return new l(this.graphManager,w)},T.prototype.newEdge=function(w){return new f(null,null,w)},T.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=v.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=v.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=v.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=v.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=v.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=v.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/v.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=v.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},T.prototype.layout=function(){var w=c.DEFAULT_CREATE_BENDS_AS_NEEDED;return w&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var C=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(D){return C.has(D)});this.graphManager.setAllNodesToApplyGravitation(A)}}else{var w=this.getFlatForest();if(w.length>0)this.positionNodesRadially(w);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var C=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(R){return C.has(R)});this.graphManager.setAllNodesToApplyGravitation(A),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),C=this.nodesWithGravity.filter(function(S){return w.has(S)});this.graphManager.setAllNodesToApplyGravitation(C),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var A=!this.isTreeGrowing&&!this.isGrowthFinished,R=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(A,R),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),C={},A=0;A<w.length;A++){var R=w[A].rect,S=w[A].id;C[S]={id:S,x:R.getCenterX(),y:R.getCenterY(),w:R.width,h:R.height}}return C},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var w=!1;if(v.ANIMATE==="during")this.emit("layoutstarted");else{for(;!w;)w=this.tick();this.graphManager.updateBounds()}},T.prototype.calculateNodesToApplyGravitationTo=function(){var w=[],C,A=this.graphManager.getGraphs(),R=A.length,S;for(S=0;S<R;S++)C=A[S],C.updateConnected(),C.isConnected||(w=w.concat(C.getNodes()));return w},T.prototype.createBendpoints=function(){var w=[];w=w.concat(this.graphManager.getAllEdges());var C=new Set,A;for(A=0;A<w.length;A++){var R=w[A];if(!C.has(R)){var S=R.getSource(),D=R.getTarget();if(S==D)R.getBendpoints().push(new g),R.getBendpoints().push(new g),this.createDummyNodesForBendpoints(R),C.add(R);else{var P=[];if(P=P.concat(S.getEdgeListToNode(D)),P=P.concat(D.getEdgeListToNode(S)),!C.has(P[0])){if(P.length>1){var x;for(x=0;x<P.length;x++){var N=P[x];N.getBendpoints().push(new g),this.createDummyNodesForBendpoints(N)}}P.forEach(function(M){C.add(M)})}}}if(C.size==w.length)break}},T.prototype.positionNodesRadially=function(w){for(var C=new d(0,0),A=Math.ceil(Math.sqrt(w.length)),R=0,S=0,D=0,P=new g(0,0),x=0;x<w.length;x++){x%A==0&&(D=0,S=R,x!=0&&(S+=h.DEFAULT_COMPONENT_SEPERATION),R=0);var N=w[x],M=p.findCenterOfTree(N);C.x=D,C.y=S,P=T.radialLayout(N,M,C),P.y>R&&(R=Math.floor(P.y)),D=Math.floor(P.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(c.WORLD_CENTER_X-P.x/2,c.WORLD_CENTER_Y-P.y/2))},T.radialLayout=function(w,C,A){var R=Math.max(this.maxDiagonalInTree(w),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(C,null,0,359,0,R);var S=m.calculateBounds(w),D=new E;D.setDeviceOrgX(S.getMinX()),D.setDeviceOrgY(S.getMinY()),D.setWorldOrgX(A.x),D.setWorldOrgY(A.y);for(var P=0;P<w.length;P++){var x=w[P];x.transform(D)}var N=new g(S.getMaxX(),S.getMaxY());return D.inverseTransformPoint(N)},T.branchRadialLayout=function(w,C,A,R,S,D){var P=(R-A+1)/2;P<0&&(P+=180);var x=(P+A)%360,N=x*b.TWO_PI/360,M=S*Math.cos(N),I=S*Math.sin(N);w.setCenter(M,I);var O=[];O=O.concat(w.getEdges());var k=O.length;C!=null&&k--;for(var F=0,_=O.length,z,X=w.getEdgesBetween(C);X.length>1;){var q=X[0];X.splice(0,1);var G=O.indexOf(q);G>=0&&O.splice(G,1),_--,k--}C!=null?z=(O.indexOf(X[0])+1)%_:z=0;for(var U=Math.abs(R-A)/k,K=z;F!=k;K=++K%_){var J=O[K].getOtherEnd(w);if(J!=C){var H=(A+F*U)%360,Y=(H+U)%360;T.branchRadialLayout(J,w,H,Y,S+D,D),F++}}},T.maxDiagonalInTree=function(w){for(var C=y.MIN_VALUE,A=0;A<w.length;A++){var R=w[A],S=R.getDiagonal();S>C&&(C=S)}return C},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var w=this,C={};this.memberGroups={},this.idToDummyNode={};for(var A=[],R=this.graphManager.getAllNodes(),S=0;S<R.length;S++){var D=R[S],P=D.getParent();this.getNodeDegreeWithChildren(D)===0&&(P.id==null||!this.getToBeTiled(P))&&A.push(D)}for(var S=0;S<A.length;S++){var D=A[S],x=D.getParent().id;typeof C[x]>"u"&&(C[x]=[]),C[x]=C[x].concat(D)}Object.keys(C).forEach(function(N){if(C[N].length>1){var M="DummyCompound_"+N;w.memberGroups[M]=C[N];var I=C[N][0].getParent(),O=new l(w.graphManager);O.id=M,O.paddingLeft=I.paddingLeft||0,O.paddingRight=I.paddingRight||0,O.paddingBottom=I.paddingBottom||0,O.paddingTop=I.paddingTop||0,w.idToDummyNode[M]=O;var k=w.getGraphManager().add(w.newGraph(),O),F=I.getChild();F.add(O);for(var _=0;_<C[N].length;_++){var z=C[N][_];F.remove(z),k.add(z)}}})},T.prototype.clearCompounds=function(){var w={},C={};this.performDFSOnCompounds();for(var A=0;A<this.compoundOrder.length;A++)C[this.compoundOrder[A].id]=this.compoundOrder[A],w[this.compoundOrder[A].id]=[].concat(this.compoundOrder[A].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[A].getChild()),this.compoundOrder[A].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(w,C)},T.prototype.clearZeroDegreeMembers=function(){var w=this,C=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(A){var R=w.idToDummyNode[A];C[A]=w.tileNodes(w.memberGroups[A],R.paddingLeft+R.paddingRight),R.rect.width=C[A].width,R.rect.height=C[A].height})},T.prototype.repopulateCompounds=function(){for(var w=this.compoundOrder.length-1;w>=0;w--){var C=this.compoundOrder[w],A=C.id,R=C.paddingLeft,S=C.paddingTop;this.adjustLocations(this.tiledMemberPack[A],C.rect.x,C.rect.y,R,S)}},T.prototype.repopulateZeroDegreeMembers=function(){var w=this,C=this.tiledZeroDegreePack;Object.keys(C).forEach(function(A){var R=w.idToDummyNode[A],S=R.paddingLeft,D=R.paddingTop;w.adjustLocations(C[A],R.rect.x,R.rect.y,S,D)})},T.prototype.getToBeTiled=function(w){var C=w.id;if(this.toBeTiled[C]!=null)return this.toBeTiled[C];var A=w.getChild();if(A==null)return this.toBeTiled[C]=!1,!1;for(var R=A.getNodes(),S=0;S<R.length;S++){var D=R[S];if(this.getNodeDegree(D)>0)return this.toBeTiled[C]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[C]=!1,!1}return this.toBeTiled[C]=!0,!0},T.prototype.getNodeDegree=function(w){w.id;for(var C=w.getEdges(),A=0,R=0;R<C.length;R++){var S=C[R];S.getSource().id!==S.getTarget().id&&(A=A+1)}return A},T.prototype.getNodeDegreeWithChildren=function(w){var C=this.getNodeDegree(w);if(w.getChild()==null)return C;for(var A=w.getChild().getNodes(),R=0;R<A.length;R++){var S=A[R];C+=this.getNodeDegreeWithChildren(S)}return C},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},T.prototype.fillCompexOrderByDFS=function(w){for(var C=0;C<w.length;C++){var A=w[C];A.getChild()!=null&&this.fillCompexOrderByDFS(A.getChild().getNodes()),this.getToBeTiled(A)&&this.compoundOrder.push(A)}},T.prototype.adjustLocations=function(w,C,A,R,S){C+=R,A+=S;for(var D=C,P=0;P<w.rows.length;P++){var x=w.rows[P];C=D;for(var N=0,M=0;M<x.length;M++){var I=x[M];I.rect.x=C,I.rect.y=A,C+=I.rect.width+w.horizontalPadding,I.rect.height>N&&(N=I.rect.height)}A+=N+w.verticalPadding}},T.prototype.tileCompoundMembers=function(w,C){var A=this;this.tiledMemberPack=[],Object.keys(w).forEach(function(R){var S=C[R];A.tiledMemberPack[R]=A.tileNodes(w[R],S.paddingLeft+S.paddingRight),S.rect.width=A.tiledMemberPack[R].width,S.rect.height=A.tiledMemberPack[R].height})},T.prototype.tileNodes=function(w,C){var A=h.TILING_PADDING_VERTICAL,R=h.TILING_PADDING_HORIZONTAL,S={rows:[],rowWidth:[],rowHeight:[],width:0,height:C,verticalPadding:A,horizontalPadding:R};w.sort(function(x,N){return x.rect.width*x.rect.height>N.rect.width*N.rect.height?-1:x.rect.width*x.rect.height<N.rect.width*N.rect.height?1:0});for(var D=0;D<w.length;D++){var P=w[D];S.rows.length==0?this.insertNodeToRow(S,P,0,C):this.canAddHorizontal(S,P.rect.width,P.rect.height)?this.insertNodeToRow(S,P,this.getShortestRowIndex(S),C):this.insertNodeToRow(S,P,S.rows.length,C),this.shiftToLastRow(S)}return S},T.prototype.insertNodeToRow=function(w,C,A,R){var S=R;if(A==w.rows.length){var D=[];w.rows.push(D),w.rowWidth.push(S),w.rowHeight.push(0)}var P=w.rowWidth[A]+C.rect.width;w.rows[A].length>0&&(P+=w.horizontalPadding),w.rowWidth[A]=P,w.width<P&&(w.width=P);var x=C.rect.height;A>0&&(x+=w.verticalPadding);var N=0;x>w.rowHeight[A]&&(N=w.rowHeight[A],w.rowHeight[A]=x,N=w.rowHeight[A]-N),w.height+=N,w.rows[A].push(C)},T.prototype.getShortestRowIndex=function(w){for(var C=-1,A=Number.MAX_VALUE,R=0;R<w.rows.length;R++)w.rowWidth[R]<A&&(C=R,A=w.rowWidth[R]);return C},T.prototype.getLongestRowIndex=function(w){for(var C=-1,A=Number.MIN_VALUE,R=0;R<w.rows.length;R++)w.rowWidth[R]>A&&(C=R,A=w.rowWidth[R]);return C},T.prototype.canAddHorizontal=function(w,C,A){var R=this.getShortestRowIndex(w);if(R<0)return!0;var S=w.rowWidth[R];if(S+w.horizontalPadding+C<=w.width)return!0;var D=0;w.rowHeight[R]<A&&R>0&&(D=A+w.verticalPadding-w.rowHeight[R]);var P;w.width-S>=C+w.horizontalPadding?P=(w.height+D)/(S+C+w.horizontalPadding):P=(w.height+D)/w.width,D=A+w.verticalPadding;var x;return w.width<C?x=(w.height+D)/C:x=(w.height+D)/w.width,x<1&&(x=1/x),P<1&&(P=1/P),P<x},T.prototype.shiftToLastRow=function(w){var C=this.getLongestRowIndex(w),A=w.rowWidth.length-1,R=w.rows[C],S=R[R.length-1],D=S.width+w.horizontalPadding;if(w.width-w.rowWidth[A]>D&&C!=A){R.splice(-1,1),w.rows[A].push(S),w.rowWidth[C]=w.rowWidth[C]-D,w.rowWidth[A]=w.rowWidth[A]+D,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var P=Number.MIN_VALUE,x=0;x<R.length;x++)R[x].height>P&&(P=R[x].height);C>0&&(P+=w.verticalPadding);var N=w.rowHeight[C]+w.rowHeight[A];w.rowHeight[C]=P,w.rowHeight[A]<S.height+w.verticalPadding&&(w.rowHeight[A]=S.height+w.verticalPadding);var M=w.rowHeight[C]+w.rowHeight[A];w.height+=M-N,this.shiftToLastRow(w)}},T.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},T.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},T.prototype.reduceTrees=function(){for(var w=[],C=!0,A;C;){var R=this.graphManager.getAllNodes(),S=[];C=!1;for(var D=0;D<R.length;D++)A=R[D],A.getEdges().length==1&&!A.getEdges()[0].isInterGraph&&A.getChild()==null&&(S.push([A,A.getEdges()[0],A.getOwner()]),C=!0);if(C==!0){for(var P=[],x=0;x<S.length;x++)S[x][0].getEdges().length==1&&(P.push(S[x]),S[x][0].getOwner().remove(S[x][0]));w.push(P),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=w},T.prototype.growTree=function(w){for(var C=w.length,A=w[C-1],R,S=0;S<A.length;S++)R=A[S],this.findPlaceforPrunedNode(R),R[2].add(R[0]),R[2].add(R[1],R[1].source,R[1].target);w.splice(w.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},T.prototype.findPlaceforPrunedNode=function(w){var C,A,R=w[0];R==w[1].source?A=w[1].target:A=w[1].source;var S=A.startX,D=A.finishX,P=A.startY,x=A.finishY,N=0,M=0,I=0,O=0,k=[N,I,M,O];if(P>0)for(var F=S;F<=D;F++)k[0]+=this.grid[F][P-1].length+this.grid[F][P].length-1;if(D<this.grid.length-1)for(var F=P;F<=x;F++)k[1]+=this.grid[D+1][F].length+this.grid[D][F].length-1;if(x<this.grid[0].length-1)for(var F=S;F<=D;F++)k[2]+=this.grid[F][x+1].length+this.grid[F][x].length-1;if(S>0)for(var F=P;F<=x;F++)k[3]+=this.grid[S-1][F].length+this.grid[S][F].length-1;for(var _=y.MAX_VALUE,z,X,q=0;q<k.length;q++)k[q]<_?(_=k[q],z=1,X=q):k[q]==_&&z++;if(z==3&&_==0)k[0]==0&&k[1]==0&&k[2]==0?C=1:k[0]==0&&k[1]==0&&k[3]==0?C=0:k[0]==0&&k[2]==0&&k[3]==0?C=3:k[1]==0&&k[2]==0&&k[3]==0&&(C=2);else if(z==2&&_==0){var G=Math.floor(Math.random()*2);k[0]==0&&k[1]==0?G==0?C=0:C=1:k[0]==0&&k[2]==0?G==0?C=0:C=2:k[0]==0&&k[3]==0?G==0?C=0:C=3:k[1]==0&&k[2]==0?G==0?C=1:C=2:k[1]==0&&k[3]==0?G==0?C=1:C=3:G==0?C=2:C=3}else if(z==4&&_==0){var G=Math.floor(Math.random()*4);C=G}else C=X;C==0?R.setCenter(A.getCenterX(),A.getCenterY()-A.getHeight()/2-v.DEFAULT_EDGE_LENGTH-R.getHeight()/2):C==1?R.setCenter(A.getCenterX()+A.getWidth()/2+v.DEFAULT_EDGE_LENGTH+R.getWidth()/2,A.getCenterY()):C==2?R.setCenter(A.getCenterX(),A.getCenterY()+A.getHeight()/2+v.DEFAULT_EDGE_LENGTH+R.getHeight()/2):R.setCenter(A.getCenterX()-A.getWidth()/2-v.DEFAULT_EDGE_LENGTH-R.getWidth()/2,A.getCenterY())},a.exports=T}),(function(a,n,i){var o={};o.layoutBase=i(0),o.CoSEConstants=i(1),o.CoSEEdge=i(2),o.CoSEGraph=i(3),o.CoSEGraphManager=i(4),o.CoSELayout=i(6),o.CoSENode=i(5),a.exports=o})])})})(li)),li.exports}var dI=ui.exports,vE;function gI(){return vE||(vE=1,(function(t,e){(function(a,n){t.exports=n(vI())})(dI,function(r){return(function(a){var n={};function i(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return a[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=a,i.c=n,i.i=function(o){return o},i.d=function(o,s,u){i.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,"a",s),s},i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},i.p="",i(i.s=1)})([(function(a,n){a.exports=r}),(function(a,n,i){var o=i(0).layoutBase.LayoutConstants,s=i(0).layoutBase.FDLayoutConstants,u=i(0).CoSEConstants,l=i(0).CoSELayout,f=i(0).CoSENode,h=i(0).layoutBase.PointD,v=i(0).layoutBase.DimensionD,c={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(b,m){var E={};for(var T in b)E[T]=b[T];for(var T in m)E[T]=m[T];return E}function g(b){this.options=d(c,b),p(this.options)}var p=function(m){m.nodeRepulsion!=null&&(u.DEFAULT_REPULSION_STRENGTH=s.DEFAULT_REPULSION_STRENGTH=m.nodeRepulsion),m.idealEdgeLength!=null&&(u.DEFAULT_EDGE_LENGTH=s.DEFAULT_EDGE_LENGTH=m.idealEdgeLength),m.edgeElasticity!=null&&(u.DEFAULT_SPRING_STRENGTH=s.DEFAULT_SPRING_STRENGTH=m.edgeElasticity),m.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=m.nestingFactor),m.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=s.DEFAULT_GRAVITY_STRENGTH=m.gravity),m.numIter!=null&&(u.MAX_ITERATIONS=s.MAX_ITERATIONS=m.numIter),m.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=s.DEFAULT_GRAVITY_RANGE_FACTOR=m.gravityRange),m.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=m.gravityCompound),m.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=m.gravityRangeCompound),m.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=s.DEFAULT_COOLING_FACTOR_INCREMENTAL=m.initialEnergyOnIncremental),m.quality=="draft"?o.QUALITY=0:m.quality=="proof"?o.QUALITY=2:o.QUALITY=1,u.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=m.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!m.randomize,u.ANIMATE=s.ANIMATE=o.ANIMATE=m.animate,u.TILE=m.tile,u.TILING_PADDING_VERTICAL=typeof m.tilingPaddingVertical=="function"?m.tilingPaddingVertical.call():m.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof m.tilingPaddingHorizontal=="function"?m.tilingPaddingHorizontal.call():m.tilingPaddingHorizontal};g.prototype.run=function(){var b,m,E=this.options;this.idToLNode={};var T=this.layout=new l,L=this;L.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var w=T.newGraphManager();this.gm=w;var C=this.options.eles.nodes(),A=this.options.eles.edges();this.root=w.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(C),T);for(var R=0;R<A.length;R++){var S=A[R],D=this.idToLNode[S.data("source")],P=this.idToLNode[S.data("target")];if(D!==P&&D.getEdgesBetween(P).length==0){var x=w.add(T.newEdge(),D,P);x.id=S.id()}}var N=function(O,k){typeof O=="number"&&(O=k);var F=O.data("id"),_=L.idToLNode[F];return{x:_.getRect().getCenterX(),y:_.getRect().getCenterY()}},M=function I(){for(var O=function(){E.fit&&E.cy.fit(E.eles,E.padding),b||(b=!0,L.cy.one("layoutready",E.ready),L.cy.trigger({type:"layoutready",layout:L}))},k=L.options.refresh,F,_=0;_<k&&!F;_++)F=L.stopped||L.layout.tick();if(F){T.checkLayoutSuccess()&&!T.isSubLayout&&T.doPostLayout(),T.tilingPostLayout&&T.tilingPostLayout(),T.isLayoutFinished=!0,L.options.eles.nodes().positions(N),O(),L.cy.one("layoutstop",L.options.stop),L.cy.trigger({type:"layoutstop",layout:L}),m&&cancelAnimationFrame(m),b=!1;return}var z=L.layout.getPositionsData();E.eles.nodes().positions(function(X,q){if(typeof X=="number"&&(X=q),!X.isParent()){for(var G=X.id(),U=z[G],K=X;U==null&&(U=z[K.data("parent")]||z["DummyCompound_"+K.data("parent")],z[G]=U,K=K.parent()[0],K!=null););return U!=null?{x:U.x,y:U.y}:{x:X.position("x"),y:X.position("y")}}}),O(),m=requestAnimationFrame(I)};return T.addListener("layoutstarted",function(){L.options.animate==="during"&&(m=requestAnimationFrame(M))}),T.runLayout(),this.options.animate!=="during"&&(L.options.eles.nodes().not(":parent").layoutPositions(L,L.options,N),b=!1),this},g.prototype.getTopMostNodes=function(b){for(var m={},E=0;E<b.length;E++)m[b[E].id()]=!0;var T=b.filter(function(L,w){typeof L=="number"&&(L=w);for(var C=L.parent()[0];C!=null;){if(m[C.id()])return!1;C=C.parent()[0]}return!0});return T},g.prototype.processChildrenList=function(b,m,E){for(var T=m.length,L=0;L<T;L++){var w=m[L],C=w.children(),A,R=w.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null?A=b.add(new f(E.graphManager,new h(w.position("x")-R.w/2,w.position("y")-R.h/2),new v(parseFloat(R.w),parseFloat(R.h)))):A=b.add(new f(this.graphManager)),A.id=w.data("id"),A.paddingLeft=parseInt(w.css("padding")),A.paddingTop=parseInt(w.css("padding")),A.paddingRight=parseInt(w.css("padding")),A.paddingBottom=parseInt(w.css("padding")),this.options.nodeDimensionsIncludeLabels&&w.isParent()){var S=w.boundingBox({includeLabels:!0,includeNodes:!1}).w,D=w.boundingBox({includeLabels:!0,includeNodes:!1}).h,P=w.css("text-halign");A.labelWidth=S,A.labelHeight=D,A.labelPos=P}if(this.idToLNode[w.data("id")]=A,isNaN(A.rect.x)&&(A.rect.x=0),isNaN(A.rect.y)&&(A.rect.y=0),C!=null&&C.length>0){var x;x=E.getGraphManager().add(E.newGraph(),A),this.processChildrenList(x,C,E)}}},g.prototype.stop=function(){return this.stopped=!0,this};var y=function(m){m("layout","cose-bilkent",g)};typeof cytoscape<"u"&&y(cytoscape),a.exports=y})])})})(ui)),ui.exports}var pI=gI();const wI=xv(pI);export{La as a,bI as b,wI as c,EI as f};
331
+ `),s=QS(a,n,o);s.aPosition=a.getAttribLocation(s,"aPosition"),s.aIndex=a.getAttribLocation(s,"aIndex"),s.aVertType=a.getAttribLocation(s,"aVertType"),s.aTransform=a.getAttribLocation(s,"aTransform"),s.aAtlasId=a.getAttribLocation(s,"aAtlasId"),s.aTex=a.getAttribLocation(s,"aTex"),s.aPointAPointB=a.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=a.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=a.getAttribLocation(s,"aLineWidth"),s.aColor=a.getAttribLocation(s,"aColor"),s.aCornerRadius=a.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=a.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=a.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=a.getUniformLocation(s,"uAtlasSize"),s.uBGColor=a.getUniformLocation(s,"uBGColor"),s.uZoom=a.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var u=0;u<this.batchManager.getMaxAtlasesPerBatch();u++)s.uTextures.push(a.getUniformLocation(s,"uTexture".concat(u)));return s}},{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,n=this.gl,i=this.program,o=n.createVertexArray();return n.bindVertexArray(o),oD(n,"vec2",i.aPosition,r),this.transformBuffer=sD(n,a,i.aTransform),this.indexBuffer=er(n,a,"vec4",i.aIndex),this.vertTypeBuffer=er(n,a,"int",i.aVertType),this.atlasIdBuffer=er(n,a,"int",i.aAtlasId),this.texBuffer=er(n,a,"vec4",i.aTex),this.pointAPointBBuffer=er(n,a,"vec4",i.aPointAPointB),this.pointCPointDBuffer=er(n,a,"vec4",i.aPointCPointD),this.lineWidthBuffer=er(n,a,"vec2",i.aLineWidth),this.colorBuffer=er(n,a,"vec4",i.aColor),this.cornerRadiusBuffer=er(n,a,"vec4",i.aCornerRadius),this.borderColorBuffer=er(n,a,"vec4",i.aBorderColor),n.bindVertexArray(null),o}},{key:"buffers",get:function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return Tr(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]:rn.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,n){var i=this.atlasManager,o=this.batchManager,s=i.getRenderTypeOpts(n);if(this._isVisible(r,s)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&s.getTexPickingMode){var u=s.getTexPickingMode(r);if(u===xi.IGNORE)return;if(u==xi.USE_BB){this.drawPickingRectangle(r,a,n);return}}var l=i.getAtlasInfo(r,n),f=Bt(l),h;try{for(f.s();!(h=f.n()).done;){var v=h.value,c=v.atlas,d=v.tex1,g=v.tex2;o.canAddToCurrentBatch(c)||this.endBatch();for(var p=o.getAtlasIndexForBatch(c),y=0,b=[[d,!0],[g,!1]];y<b.length;y++){var m=ht(b[y],2),E=m[0],T=m[1];if(E.w!=0){var L=this.instanceCount;this.vertTypeBuffer.getView(L)[0]=Ps;var w=this.indexBuffer.getView(L);ca(a,w);var C=this.atlasIdBuffer.getView(L);C[0]=p;var A=this.texBuffer.getView(L);A[0]=E.x,A[1]=E.y,A[2]=E.w,A[3]=E.h;var R=this.transformBuffer.getMatrixView(L);this.setTransformMatrix(r,R,s,v,T),this.instanceCount++,T||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(S){f.e(S)}finally{f.f()}}}},{key:"setTransformMatrix",value:function(r,a,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=0;if(n.shapeProps&&n.shapeProps.padding&&(s=r.pstyle(n.shapeProps.padding).pfValue),i){var u=i.bb,l=i.tex1,f=i.tex2,h=l.w/(l.w+f.w);o||(h=1-h);var v=this._getAdjustedBB(u,s,o,h);this._applyTransformMatrix(a,v,n,r)}else{var c=n.getBoundingBox(r),d=this._getAdjustedBB(c,s,!0,1);this._applyTransformMatrix(a,d,n,r)}}},{key:"_applyTransformMatrix",value:function(r,a,n,i){var o,s;Pp(r);var u=n.getRotation?n.getRotation(i):0;if(u!==0){var l=n.getRotationPoint(i),f=l.x,h=l.y;ai(r,r,[f,h]),Fp(r,r,u);var v=n.getRotationOffset(i);o=v.x+(a.xOffset||0),s=v.y+(a.yOffset||0)}else o=a.x1,s=a.y1;ai(r,r,[o,s]),bv(r,r,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(r,a,n,i){var o=r.x1,s=r.y1,u=r.w,l=r.h,f=r.yOffset;a&&(o-=a,s-=a,u+=2*a,l+=2*a);var h=0,v=u*i;return n&&i<1?u=v:!n&&i<1&&(h=u-v,o+=h,u=v),{x1:o,y1:s,w:u,h:l,xOffset:h,yOffset:f}}},{key:"drawPickingRectangle",value:function(r,a,n){var i=this.atlasManager.getRenderTypeOpts(n),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=va;var s=this.indexBuffer.getView(o);ca(a,s);var u=this.colorBuffer.getView(o);zr([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(r,l,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(r,i)){var o=i.shapeProps,s=this._getVertTypeForShape(r,o.shape);if(s===void 0||i.isSimple&&!i.isSimple(r,this.renderTarget)){this.drawTexture(r,a,n);return}var u=this.instanceCount;if(this.vertTypeBuffer.getView(u)[0]=s,s===Xn||s===Xa){var l=i.getBoundingBox(r),f=this._getCornerRadius(r,o.radius,l),h=this.cornerRadiusBuffer.getView(u);h[0]=f,h[1]=f,h[2]=f,h[3]=f,s===Xa&&(h[0]=0,h[2]=0)}var v=this.indexBuffer.getView(u);ca(a,v);var c=this.renderTarget.picking?1:n==="node-body"?r.effectiveOpacity():1,d=this.renderTarget.picking?1:r.pstyle(o.opacity).value*c,g=r.pstyle(o.color).value,p=this.colorBuffer.getView(u);zr(g,d,p);var y=this.lineWidthBuffer.getView(u);if(y[0]=0,y[1]=0,o.border){var b=r.pstyle("border-width").value;if(b>0){var m=r.pstyle("border-color").value,E=c*r.pstyle("border-opacity").value,T=this.borderColorBuffer.getView(u);zr(m,E,T);var L=r.pstyle("border-position").value;if(L==="inside")y[0]=0,y[1]=-b;else if(L==="outside")y[0]=b,y[1]=0;else{var w=b/2;y[0]=w,y[1]=-w}}}var C=this.transformBuffer.getMatrixView(u);this.setTransformMatrix(r,C,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,a){var n=r.pstyle(a).value;switch(n){case"rectangle":return va;case"ellipse":return Wa;case"roundrectangle":case"round-rectangle":return Xn;case"bottom-round-rectangle":return Xa;default:return}}},{key:"_getCornerRadius",value:function(r,a,n){var i=n.w,o=n.h;if(r.pstyle(a).value==="auto")return Dr(i,o);var s=r.pstyle(a).pfValue,u=i/2,l=o/2;return Math.min(s,l,u)}},{key:"drawEdgeArrow",value:function(r,a,n){if(r.visible()){var i=r._private.rscratch,o,s,u;if(n==="source"?(o=i.arrowStartX,s=i.arrowStartY,u=i.srcArrowAngle):(o=i.arrowEndX,s=i.arrowEndY,u=i.tgtArrowAngle),!(isNaN(o)||o==null||isNaN(s)||s==null||isNaN(u)||u==null)){var l=r.pstyle(n+"-arrow-shape").value;if(l!=="none"){var f=r.pstyle(n+"-arrow-color").value,h=r.pstyle("opacity").value,v=r.pstyle("line-opacity").value,c=h*v,d=r.pstyle("width").pfValue,g=r.pstyle("arrow-scale").value,p=this.r.getArrowWidth(d,g),y=this.instanceCount,b=this.transformBuffer.getMatrixView(y);Pp(b),ai(b,b,[o,s]),bv(b,b,[p,p]),Fp(b,b,u),this.vertTypeBuffer.getView(y)[0]=Fs;var m=this.indexBuffer.getView(y);ca(a,m);var E=this.colorBuffer.getView(y);zr(f,c,E),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,a){if(r.visible()){var n=this._getEdgePoints(r);if(n){var i=r.pstyle("opacity").value,o=r.pstyle("line-opacity").value,s=r.pstyle("width").pfValue,u=r.pstyle("line-color").value,l=i*o;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var f=this.instanceCount;this.vertTypeBuffer.getView(f)[0]=_p;var h=this.indexBuffer.getView(f);ca(a,h);var v=this.colorBuffer.getView(f);zr(u,l,v);var c=this.lineWidthBuffer.getView(f);c[0]=s;var d=this.pointAPointBBuffer.getView(f);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var g=0;g<n.length-2;g+=2){var p=this.instanceCount;this.vertTypeBuffer.getView(p)[0]=Bp;var y=this.indexBuffer.getView(p);ca(a,y);var b=this.colorBuffer.getView(p);zr(u,l,b);var m=this.lineWidthBuffer.getView(p);m[0]=s;var E=n[g-2],T=n[g-1],L=n[g],w=n[g+1],C=n[g+2],A=n[g+3],R=n[g+4],S=n[g+5];g==0&&(E=2*L-C+.001,T=2*w-A+.001),g==n.length-4&&(R=2*C-L+.001,S=2*A-w+.001);var D=this.pointAPointBBuffer.getView(p);D[0]=E,D[1]=T,D[2]=L,D[3]=w;var P=this.pointCPointDBuffer.getView(p);P[0]=C,P[1]=A,P[2]=R,P[3]=S,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 n=a.allpts;if(n.length==4)return n;var i=this._getNumSegments(r);return this._getCurveSegmentPoints(n,i)}}},{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 n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=r[0],n[1]=r[1];else if(i==a)n[i*2]=r[r.length-2],n[i*2+1]=r[r.length-1];else{var o=i/a;this._setCurvePoint(r,o,n,i*2)}return n}},{key:"_setCurvePoint",value:function(r,a,n,i){if(r.length<=2)n[i]=r[0],n[i+1]=r[1];else{for(var o=Array(r.length-2),s=0;s<o.length;s+=2){var u=(1-a)*r[s]+a*r[s+2],l=(1-a)*r[s+1]+a*r[s+3];o[s]=u,o[s+1]=l}return this._setCurvePoint(o,a,n,i)}}},{key:"endBatch",value:function(){var r=this.gl,a=this.vao,n=this.vertexCount,i=this.instanceCount;if(i!==0){var o=this.renderTarget.picking?this.pickingProgram:this.program;r.useProgram(o),r.bindVertexArray(a);var s=Bt(this.buffers),u;try{for(s.s();!(u=s.n()).done;){var l=u.value;l.bufferSubData(i)}}catch(d){s.e(d)}finally{s.f()}for(var f=this.batchManager.getAtlases(),h=0;h<f.length;h++)f[h].bufferIfNeeded(r);for(var v=0;v<f.length;v++)r.activeTexture(r.TEXTURE0+v),r.bindTexture(r.TEXTURE_2D,f[v].texture),r.uniform1i(o.uTextures[v],v);r.uniform1f(o.uZoom,jS(this.r)),r.uniformMatrix3fv(o.uPanZoomMatrix,!1,this.panZoomMatrix),r.uniform1i(o.uAtlasSize,this.batchManager.getAtlasSize());var c=zr(this.bgColor,1);r.uniform4fv(o.uBGColor,c),r.drawArraysInstanced(r.TRIANGLES,0,n,i),r.bindVertexArray(null),r.bindTexture(r.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:i,atlasCount:f.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var r=this.atlasManager.getDebugInfo(),a=r.reduce(function(o,s){return o+s.atlasCount},0),n=this.batchDebugInfo,i=n.reduce(function(o,s){return o+s.count},0);return{atlasInfo:r,totalAtlases:a,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:n.length,batchInfo:n,totalInstances:i}}}])})(),$w={};$w.initWebgl=function(t,e){var r=this,a=r.data.contexts[r.WEBGL];t.bgColor=wD(r),t.webglTexSize=Math.min(t.webglTexSize,a.getParameter(a.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,a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,r.pickingFrameBuffer=uD(a),r.pickingFrameBuffer.needsDraw=!0,r.drawing=new ED(r,a,t);var n=function(h){return function(v){return r.getTextAngle(v,h)}},i=function(h){return function(v){var c=v.pstyle(h);return c&&c.value}},o=function(h){return function(v){return v.pstyle("".concat(h,"-opacity")).value>0}},s=function(h){var v=h.pstyle("text-events").strValue==="yes";return v?xi.USE_BB:xi.IGNORE},u=function(h){var v=h.position(),c=v.x,d=v.y,g=h.outerWidth(),p=h.outerHeight();return{w:g,h:p,x1:c-g/2,y1:d-p/2}};r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:u,isSimple:tD,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:u,isVisible:o("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:u,isVisible:o("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:_s(e.getLabelKey,null),getBoundingBox:Bs(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:_s(e.getSourceLabelKey,"source"),getBoundingBox:Bs(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:_s(e.getTargetLabelKey,"target"),getBoundingBox:Bs(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var l=bn(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(f,h){var v=!1;h&&h.length>0&&(v|=r.drawing.invalidate(h)),v&&l()}),TD(r)};function wD(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return wE(r)}function Kw(t,e){var r=t._private.rscratch;return Ft(r,"labelWrapCachedLines",e)||[]}var _s=function(e,r){return function(a){var n=e(a),i=Kw(a,r);return i.length>1?i.map(function(o,s){return"".concat(n,"_").concat(s)}):n}},Bs=function(e,r){return function(a,n){var i=e(a);if(typeof n=="string"){var o=n.indexOf("_");if(o>0){var s=Number(n.substring(o+1)),u=Kw(a,r),l=i.h/u.length,f=l*s,h=i.y1+f;return{x1:i.x1,w:i.w,y1:h,h:l,yOffset:f}}}return i}};function TD(t){{var e=t.render;t.render=function(i){i=i||{};var o=t.cy;t.webgl&&(o.zoom()>Uw?(xD(t),e.call(t,i)):(CD(t),Qw(t,i,rn.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(i){r.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,o,s,u){return ND(t,i,o)};{var a=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){a.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var n=t.notify;t.notify=function(i,o){n.call(t,i,o),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(o,{type:"node-body"})}}}function xD(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function CD(t){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,t.canvasWidth,t.canvasHeight),a.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function AD(t){var e=t.canvasWidth,r=t.canvasHeight,a=$v(t),n=a.pan,i=a.zoom,o=Is();ai(o,o,[n.x,n.y]),bv(o,o,[i,i]);var s=Is();fD(s,e,r);var u=Is();return lD(u,s,o),u}function Zw(t,e){var r=t.canvasWidth,a=t.canvasHeight,n=$v(t),i=n.pan,o=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,a),e.translate(i.x,i.y),e.scale(o,o)}function LD(t,e){t.drawSelectionRectangle(e,function(r){return Zw(t,r)})}function RD(t){var e=t.data.contexts[t.NODE];e.save(),Zw(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function SD(t){var e=function(n,i,o){for(var s=n.atlasManager.getAtlasCollection(i),u=t.data.contexts[t.NODE],l=s.atlases,f=0;f<l.length;f++){var h=l[f],v=h.canvas;if(v){var c=v.width,d=v.height,g=c*f,p=v.height*o,y=.4;u.save(),u.scale(y,y),u.drawImage(v,g,p),u.strokeStyle="black",u.rect(g,p,c,d),u.stroke(),u.restore()}}},r=0;e(t.drawing,"node",r++),e(t.drawing,"label",r++)}function DD(t,e,r,a,n){var i,o,s,u,l=$v(t),f=l.pan,h=l.zoom;{var v=eD(t,f,h,e,r),c=ht(v,2),d=c[0],g=c[1],p=6;i=d-p/2,o=g-p/2,s=p,u=p}if(s===0||u===0)return[];var y=t.data.contexts[t.WEBGL];y.bindFramebuffer(y.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(y.viewport(0,0,y.canvas.width,y.canvas.height),Qw(t,null,rn.PICKING),t.pickingFrameBuffer.needsDraw=!1);var b=s*u,m=new Uint8Array(b*4);y.readPixels(i,o,s,u,y.RGBA,y.UNSIGNED_BYTE,m),y.bindFramebuffer(y.FRAMEBUFFER,null);for(var E=new Set,T=0;T<b;T++){var L=m.slice(T*4,T*4+4),w=aD(L)-1;w>=0&&E.add(w)}return E}function ND(t,e,r){var a=DD(t,e,r),n=t.getCachedZSortedEles(),i,o,s=Bt(a),u;try{for(s.s();!(u=s.n()).done;){var l=u.value,f=n[l];if(!i&&f.isNode()&&(i=f),!o&&f.isEdge()&&(o=f),i&&o)break}}catch(h){s.e(h)}finally{s.f()}return[i,o].filter(Boolean)}function ks(t,e,r){var a=t.drawing;e+=1,r.isNode()?(a.drawNode(r,e,"node-underlay"),a.drawNode(r,e,"node-body"),a.drawTexture(r,e,"label"),a.drawNode(r,e,"node-overlay")):(a.drawEdgeLine(r,e),a.drawEdgeArrow(r,e,"source"),a.drawEdgeArrow(r,e,"target"),a.drawTexture(r,e,"label"),a.drawTexture(r,e,"edge-source-label"),a.drawTexture(r,e,"edge-target-label"))}function Qw(t,e,r){var a;t.webglDebug&&(a=performance.now());var n=t.drawing,i=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&LD(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var o=t.data.contexts[t.WEBGL];r.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=AD(t),u=t.getCachedZSortedEles();if(i=u.length,n.startFrame(s,r),r.screen){for(var l=0;l<u.nondrag.length;l++)ks(t,l,u.nondrag[l]);for(var f=0;f<u.drag.length;f++)ks(t,f,u.drag[f])}else if(r.picking)for(var h=0;h<u.length;h++)ks(t,h,u[h]);n.endFrame(),r.screen&&t.webglDebugShowAtlases&&(RD(t),SD(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var v=performance.now(),c=!1,d=Math.ceil(v-a),g=n.getDebugInfo(),p=["".concat(i," elements"),"".concat(g.totalInstances," instances"),"".concat(g.batchCount," batches"),"".concat(g.totalAtlases," atlases"),"".concat(g.wrappedCount," wrapped textures"),"".concat(g.simpleCount," simple shapes")].join(", ");if(c)console.log("WebGL (".concat(r.name,") - time ").concat(d,"ms, ").concat(p));else{console.log("WebGL (".concat(r.name,") - frame time ").concat(d,"ms")),console.log("Totals:"),console.log(" ".concat(p)),console.log("Texture Atlases Used:");var y=g.atlasInfo,b=Bt(y),m;try{for(b.s();!(m=b.n()).done;){var E=m.value;console.log(" ".concat(E.type,": ").concat(E.keyCount," keys, ").concat(E.atlasCount," atlases"))}}catch(T){b.e(T)}finally{b.f()}console.log("")}}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,n.gc())}var Br={};Br.drawPolygonPath=function(t,e,r,a,n,i){var o=a/2,s=n/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*i[0],r+s*i[1]);for(var u=1;u<i.length/2;u++)t.lineTo(e+o*i[u*2],r+s*i[u*2+1]);t.closePath()};Br.drawRoundPolygonPath=function(t,e,r,a,n,i,o){o.forEach(function(s){return Mw(t,s)}),t.closePath()};Br.drawRoundRectanglePath=function(t,e,r,a,n,i){var o=a/2,s=n/2,u=i==="auto"?Dr(a,n):Math.min(i,s,o);t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.arcTo(e+o,r-s,e+o,r,u),t.arcTo(e+o,r+s,e,r+s,u),t.arcTo(e-o,r+s,e-o,r,u),t.arcTo(e-o,r-s,e,r-s,u),t.lineTo(e,r-s),t.closePath()};Br.drawBottomRoundRectanglePath=function(t,e,r,a,n,i){var o=a/2,s=n/2,u=i==="auto"?Dr(a,n):i;t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.lineTo(e+o,r-s),t.lineTo(e+o,r),t.arcTo(e+o,r+s,e,r+s,u),t.arcTo(e-o,r+s,e-o,r,u),t.lineTo(e-o,r-s),t.lineTo(e,r-s),t.closePath()};Br.drawCutRectanglePath=function(t,e,r,a,n,i,o){var s=a/2,u=n/2,l=o==="auto"?Pv():o;t.beginPath&&t.beginPath(),t.moveTo(e-s+l,r-u),t.lineTo(e+s-l,r-u),t.lineTo(e+s,r-u+l),t.lineTo(e+s,r+u-l),t.lineTo(e+s-l,r+u),t.lineTo(e-s+l,r+u),t.lineTo(e-s,r+u-l),t.lineTo(e-s,r-u+l),t.closePath()};Br.drawBarrelPath=function(t,e,r,a,n){var i=a/2,o=n/2,s=e-i,u=e+i,l=r-o,f=r+o,h=iv(a,n),v=h.widthOffset,c=h.heightOffset,d=h.ctrlPtOffsetPct*v;t.beginPath&&t.beginPath(),t.moveTo(s,l+c),t.lineTo(s,f-c),t.quadraticCurveTo(s+d,f,s+v,f),t.lineTo(u-v,f),t.quadraticCurveTo(u-d,f,u,f-c),t.lineTo(u,l+c),t.quadraticCurveTo(u-d,l,u-v,l),t.lineTo(s+v,l),t.quadraticCurveTo(s+d,l,s,l+c),t.closePath()};var kp=Math.sin(0),qp=Math.cos(0),Ev={},wv={},Jw=Math.PI/40;for(var da=0*Math.PI;da<2*Math.PI;da+=Jw)Ev[da]=Math.sin(da),wv[da]=Math.cos(da);Br.drawEllipsePath=function(t,e,r,a,n){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,a/2,n/2,0,0,2*Math.PI);else for(var i,o,s=a/2,u=n/2,l=0*Math.PI;l<2*Math.PI;l+=Jw)i=e-s*Ev[l]*kp+s*wv[l]*qp,o=r+u*wv[l]*kp+u*Ev[l]*qp,l===0?t.moveTo(i,o):t.lineTo(i,o);t.closePath()};var An={};An.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]};An.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),a=r.boundingBox(),n=this.findContainerClientCoords(),i=t.full?Math.ceil(a.w):n[2],o=t.full?Math.ceil(a.h):n[3],s=Ee(t.maxWidth)||Ee(t.maxHeight),u=this.getPixelRatio(),l=1;if(t.scale!==void 0)i*=t.scale,o*=t.scale,l=t.scale;else if(s){var f=1/0,h=1/0;Ee(t.maxWidth)&&(f=l*t.maxWidth/i),Ee(t.maxHeight)&&(h=l*t.maxHeight/o),l=Math.min(f,h),i*=l,o*=l}s||(i*=u,o*=u,l*=u);var v=document.createElement("canvas");v.width=i,v.height=o,v.style.width=i+"px",v.style.height=o+"px";var c=v.getContext("2d");if(i>0&&o>0){c.clearRect(0,0,i,o),c.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(t.full)c.translate(-a.x1*l,-a.y1*l),c.scale(l,l),this.drawElements(c,d),c.scale(1/l,1/l),c.translate(a.x1*l,a.y1*l);else{var g=e.pan(),p={x:g.x*l,y:g.y*l};l*=e.zoom(),c.translate(p.x,p.y),c.scale(l,l),this.drawElements(c,d),c.scale(1/l,1/l),c.translate(-p.x,-p.y)}t.bg&&(c.globalCompositeOperation="destination-over",c.fillStyle=t.bg,c.rect(0,0,i,o),c.fill())}return v};function MD(t,e){for(var r=atob(t),a=new ArrayBuffer(r.length),n=new Uint8Array(a),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new Blob([a],{type:e})}function Gp(t){var e=t.indexOf(",");return t.substr(e+1)}function jw(t,e,r){var a=function(){return e.toDataURL(r,t.quality)};switch(t.output){case"blob-promise":return new Sa(function(n,i){try{e.toBlob(function(o){o!=null?n(o):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(o){i(o)}});case"blob":return MD(Gp(a()),r);case"base64":return Gp(a());case"base64uri":default:return a()}}An.png=function(t){return jw(t,this.bufferCanvasImage(t),"image/png")};An.jpg=function(t){return jw(t,this.bufferCanvasImage(t),"image/jpeg")};var eT={};eT.nodeShapeImpl=function(t,e,r,a,n,i,o,s){switch(t){case"ellipse":return this.drawEllipsePath(e,r,a,n,i);case"polygon":return this.drawPolygonPath(e,r,a,n,i,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,a,n,i,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,a,n,i,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,a,n,i,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,a,n,i,s);case"barrel":return this.drawBarrelPath(e,r,a,n,i)}};var OD=tT,Ge=tT.prototype;Ge.CANVAS_LAYERS=3;Ge.SELECT_BOX=0;Ge.DRAG=1;Ge.NODE=2;Ge.WEBGL=3;Ge.CANVAS_TYPES=["2d","2d","2d","webgl2"];Ge.BUFFER_COUNT=3;Ge.TEXTURE_BUFFER=0;Ge.MOTIONBLUR_BUFFER_NODE=1;Ge.MOTIONBLUR_BUFFER_DRAG=2;function tT(t){var e=this,r=e.cy.window(),a=r.document;t.webgl&&(Ge.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(Ge.CANVAS_LAYERS),contexts:new Array(Ge.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Ge.CANVAS_LAYERS),bufferCanvases:new Array(Ge.BUFFER_COUNT),bufferContexts:new Array(Ge.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=a.createElement("div");var o=e.data.canvasContainer.style;e.data.canvasContainer.style[n]=i,o.position="relative",o.zIndex="0",o.overflow="hidden";var s=t.cy.container();s.appendChild(e.data.canvasContainer),s.style[n]=i;var u={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};Cx()&&(u["-ms-touch-action"]="none",u["touch-action"]="none");for(var l=0;l<Ge.CANVAS_LAYERS;l++){var f=e.data.canvases[l]=a.createElement("canvas"),h=Ge.CANVAS_TYPES[l];e.data.contexts[l]=f.getContext(h),e.data.contexts[l]||nt("Could not create canvas of type "+h),Object.keys(u).forEach(function(H){f.style[H]=u[H]}),f.style.position="absolute",f.setAttribute("data-id","layer"+l),f.style.zIndex=String(Ge.CANVAS_LAYERS-l),e.data.canvasContainer.appendChild(f),e.data.canvasNeedsRedraw[l]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Ge.NODE].setAttribute("data-id","layer"+Ge.NODE+"-node"),e.data.canvases[Ge.SELECT_BOX].setAttribute("data-id","layer"+Ge.SELECT_BOX+"-selectbox"),e.data.canvases[Ge.DRAG].setAttribute("data-id","layer"+Ge.DRAG+"-drag"),e.data.canvases[Ge.WEBGL]&&e.data.canvases[Ge.WEBGL].setAttribute("data-id","layer"+Ge.WEBGL+"-webgl");for(var l=0;l<Ge.BUFFER_COUNT;l++)e.data.bufferCanvases[l]=a.createElement("canvas"),e.data.bufferContexts[l]=e.data.bufferCanvases[l].getContext("2d"),e.data.bufferCanvases[l].style.position="absolute",e.data.bufferCanvases[l].setAttribute("data-id","buffer"+l),e.data.bufferCanvases[l].style.zIndex=String(-l-1),e.data.bufferCanvases[l].style.visibility="hidden";e.pathsEnabled=!0;var v=Ot(),c=function(Y){return{x:(Y.x1+Y.x2)/2,y:(Y.y1+Y.y2)/2}},d=function(Y){return{x:-Y.w/2,y:-Y.h/2}},g=function(Y){var $=Y[0]._private,Q=$.oldBackgroundTimestamp===$.backgroundTimestamp;return!Q},p=function(Y){return Y[0]._private.nodeKey},y=function(Y){return Y[0]._private.labelStyleKey},b=function(Y){return Y[0]._private.sourceLabelStyleKey},m=function(Y){return Y[0]._private.targetLabelStyleKey},E=function(Y,$,Q,ee,te){return e.drawElement(Y,$,Q,!1,!1,te)},T=function(Y,$,Q,ee,te){return e.drawElementText(Y,$,Q,ee,"main",te)},L=function(Y,$,Q,ee,te){return e.drawElementText(Y,$,Q,ee,"source",te)},w=function(Y,$,Q,ee,te){return e.drawElementText(Y,$,Q,ee,"target",te)},C=function(Y){return Y.boundingBox(),Y[0]._private.bodyBounds},A=function(Y){return Y.boundingBox(),Y[0]._private.labelBounds.main||v},R=function(Y){return Y.boundingBox(),Y[0]._private.labelBounds.source||v},S=function(Y){return Y.boundingBox(),Y[0]._private.labelBounds.target||v},D=function(Y,$){return $},P=function(Y){return c(C(Y))},x=function(Y,$,Q){var ee=Y?Y+"-":"";return{x:$.x+Q.pstyle(ee+"text-margin-x").pfValue,y:$.y+Q.pstyle(ee+"text-margin-y").pfValue}},N=function(Y,$,Q){var ee=Y[0]._private.rscratch;return{x:ee[$],y:ee[Q]}},M=function(Y){return x("",N(Y,"labelX","labelY"),Y)},I=function(Y){return x("source",N(Y,"sourceLabelX","sourceLabelY"),Y)},O=function(Y){return x("target",N(Y,"targetLabelX","targetLabelY"),Y)},k=function(Y){return d(C(Y))},F=function(Y){return d(R(Y))},_=function(Y){return d(S(Y))},z=function(Y){var $=A(Y),Q=d(A(Y));if(Y.isNode()){switch(Y.pstyle("text-halign").value){case"left":Q.x=-$.w-($.leftPad||0);break;case"right":Q.x=-($.rightPad||0);break}switch(Y.pstyle("text-valign").value){case"top":Q.y=-$.h-($.topPad||0);break;case"bottom":Q.y=-($.botPad||0);break}}return Q},X=e.data.eleTxrCache=new Za(e,{getKey:p,doesEleInvalidateKey:g,drawElement:E,getBoundingBox:C,getRotationPoint:P,getRotationOffset:k,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),q=e.data.lblTxrCache=new Za(e,{getKey:y,drawElement:T,getBoundingBox:A,getRotationPoint:M,getRotationOffset:z,isVisible:D}),G=e.data.slbTxrCache=new Za(e,{getKey:b,drawElement:L,getBoundingBox:R,getRotationPoint:I,getRotationOffset:F,isVisible:D}),U=e.data.tlbTxrCache=new Za(e,{getKey:m,drawElement:w,getBoundingBox:S,getRotationPoint:O,getRotationOffset:_,isVisible:D}),K=e.data.lyrTxrCache=new zw(e);e.onUpdateEleCalcs(function(Y,$){X.invalidateElements($),q.invalidateElements($),G.invalidateElements($),U.invalidateElements($),K.invalidateElements($);for(var Q=0;Q<$.length;Q++){var ee=$[Q]._private;ee.oldBackgroundTimestamp=ee.backgroundTimestamp}});var J=function(Y){for(var $=0;$<Y.length;$++)K.enqueueElementRefinement(Y[$].ele)};X.onDequeue(J),q.onDequeue(J),G.onDequeue(J),U.onDequeue(J),t.webgl&&e.initWebgl(t,{getStyleKey:p,getLabelKey:y,getSourceLabelKey:b,getTargetLabelKey:m,drawElement:E,drawLabel:T,drawSourceLabel:L,drawTargetLabel:w,getElementBox:C,getLabelBox:A,getSourceLabelBox:R,getTargetLabelBox:S,getElementRotationPoint:P,getElementRotationOffset:k,getLabelRotationPoint:M,getSourceLabelRotationPoint:I,getTargetLabelRotationPoint:O,getLabelRotationOffset:z,getSourceLabelRotationOffset:F,getTargetLabelRotationOffset:_})}Ge.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Ge.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Ge.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Ge.SELECT_BOX]=e;break;case"gc":r.data.gc=!0;break}};var ID=typeof Path2D<"u";Ge.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};Ge.usePaths=function(){return ID&&this.pathsEnabled};Ge.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};Ge.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};Ge.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":pt(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var a=this.cy.window(),n=a.document;r=n.createElement("canvas"),r.width=t,r.height=e}return r};[Vw,ir,dr,Wv,ea,_r,It,$w,Br,An,eT].forEach(function(t){_e(Ge,t)});var PD=[{name:"null",impl:Sw},{name:"base",impl:qw},{name:"canvas",impl:OD}],FD=[{type:"layout",extensions:nS},{type:"renderer",extensions:PD}],rT={},aT={};function nT(t,e,r){var a=r,n=function(C){Ke("Can not register `"+e+"` for `"+t+"` since `"+C+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(cn.prototype[e])return n(e);cn.prototype[e]=r}else if(t==="collection"){if(Ct.prototype[e])return n(e);Ct.prototype[e]=r}else if(t==="layout"){for(var i=function(C){this.options=C,r.call(this,C),He(this._private)||(this._private={}),this._private.cy=C.cy,this._private.listeners=[],this.createEmitter()},o=i.prototype=Object.create(r.prototype),s=[],u=0;u<s.length;u++){var l=s[u];o[l]=o[l]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var f=r.prototype.stop;o.stop=function(){var w=this.options;if(w&&w.animate){var C=this.animations;if(C)for(var A=0;A<C.length;A++)C[A].stop()}return f?f.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var h=function(C){return C._private.cy},v={addEventFields:function(C,A){A.layout=C,A.cy=h(C),A.target=C},bubble:function(){return!0},parent:function(C){return h(C)}};_e(o,{createEmitter:function(){return this._private.emitter=new _i(v,this),this},emitter:function(){return this._private.emitter},on:function(C,A){return this.emitter().on(C,A),this},one:function(C,A){return this.emitter().one(C,A),this},once:function(C,A){return this.emitter().one(C,A),this},removeListener:function(C,A){return this.emitter().removeListener(C,A),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(C,A){return this.emitter().emit(C,A),this}}),$e.eventAliasesOn(o),a=i}else if(t==="renderer"&&e!=="null"&&e!=="base"){var c=iT("renderer","base"),d=c.prototype,g=r,p=r.prototype,y=function(){c.apply(this,arguments),g.apply(this,arguments)},b=y.prototype;for(var m in d){var E=d[m],T=p[m]!=null;if(T)return n(m);b[m]=E}for(var L in p)b[L]=p[L];d.clientFunctions.forEach(function(w){b[w]=b[w]||function(){nt("Renderer does not implement `renderer."+w+"()` on its prototype")}}),a=y}else if(t==="__proto__"||t==="constructor"||t==="prototype")return nt(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return TE({map:rT,keys:[t,e],value:a})}function iT(t,e){return xE({map:rT,keys:[t,e]})}function _D(t,e,r,a,n){return TE({map:aT,keys:[t,e,r,a],value:n})}function BD(t,e,r,a){return xE({map:aT,keys:[t,e,r,a]})}var Tv=function(){if(arguments.length===2)return iT.apply(null,arguments);if(arguments.length===3)return nT.apply(null,arguments);if(arguments.length===4)return BD.apply(null,arguments);if(arguments.length===5)return _D.apply(null,arguments);nt("Invalid extension access syntax")};cn.prototype.extension=Tv;FD.forEach(function(t){t.extensions.forEach(function(e){nT(t.type,e.name,e.impl)})});var Ci=function(){if(!(this instanceof Ci))return new Ci;this.length=0},Jr=Ci.prototype;Jr.instanceString=function(){return"stylesheet"};Jr.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};Jr.css=function(t,e){var r=this.length-1;if(Oe(t))this[r].properties.push({name:t,value:e});else if(He(t))for(var a=t,n=Object.keys(a),i=0;i<n.length;i++){var o=n[i],s=a[o];if(s!=null){var u=wt.properties[o]||wt.properties[Li(o)];if(u!=null){var l=u.name,f=s;this[r].properties.push({name:l,value:f})}}}return this};Jr.style=Jr.css;Jr.generateStyle=function(t){var e=new wt(t);return this.appendToStyle(e)};Jr.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],a=r.selector,n=r.properties;t.selector(a);for(var i=0;i<n.length;i++){var o=n[i];t.css(o.name,o.value)}}return t};var kD="3.33.4",La=function(e){if(e===void 0&&(e={}),He(e))return new cn(e);if(Oe(e))return Tv.apply(Tv,arguments)};La.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(La),t.apply(null,e),this};La.warnings=function(t){return NE(t)};La.version=kD;La.stylesheet=La.Stylesheet=Ci;var ni={exports:{}};function Kv(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 qs,Up;function qD(){if(Up)return qs;Up=1;function t(){this.__data__=[],this.size=0}return qs=t,qs}var Gs,zp;function Ia(){if(zp)return Gs;zp=1;function t(e,r){return e===r||e!==e&&r!==r}return Gs=t,Gs}var Us,Vp;function Yi(){if(Vp)return Us;Vp=1;var t=Ia();function e(r,a){for(var n=r.length;n--;)if(t(r[n][0],a))return n;return-1}return Us=e,Us}var zs,Yp;function GD(){if(Yp)return zs;Yp=1;var t=Yi(),e=Array.prototype,r=e.splice;function a(n){var i=this.__data__,o=t(i,n);if(o<0)return!1;var s=i.length-1;return o==s?i.pop():r.call(i,o,1),--this.size,!0}return zs=a,zs}var Vs,Hp;function UD(){if(Hp)return Vs;Hp=1;var t=Yi();function e(r){var a=this.__data__,n=t(a,r);return n<0?void 0:a[n][1]}return Vs=e,Vs}var Ys,Xp;function zD(){if(Xp)return Ys;Xp=1;var t=Yi();function e(r){return t(this.__data__,r)>-1}return Ys=e,Ys}var Hs,Wp;function VD(){if(Wp)return Hs;Wp=1;var t=Yi();function e(r,a){var n=this.__data__,i=t(n,r);return i<0?(++this.size,n.push([r,a])):n[i][1]=a,this}return Hs=e,Hs}var Xs,$p;function Hi(){if($p)return Xs;$p=1;var t=qD(),e=GD(),r=UD(),a=zD(),n=VD();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=a,i.prototype.set=n,Xs=i,Xs}var Ws,Kp;function YD(){if(Kp)return Ws;Kp=1;var t=Hi();function e(){this.__data__=new t,this.size=0}return Ws=e,Ws}var $s,Zp;function HD(){if(Zp)return $s;Zp=1;function t(e){var r=this.__data__,a=r.delete(e);return this.size=r.size,a}return $s=t,$s}var Ks,Qp;function XD(){if(Qp)return Ks;Qp=1;function t(e){return this.__data__.get(e)}return Ks=t,Ks}var Zs,Jp;function WD(){if(Jp)return Zs;Jp=1;function t(e){return this.__data__.has(e)}return Zs=t,Zs}var Qs,jp;function oT(){if(jp)return Qs;jp=1;var t=typeof In=="object"&&In&&In.Object===Object&&In;return Qs=t,Qs}var Js,ey;function Jt(){if(ey)return Js;ey=1;var t=oT(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return Js=r,Js}var js,ty;function Pa(){if(ty)return js;ty=1;var t=Jt(),e=t.Symbol;return js=e,js}var eu,ry;function $D(){if(ry)return eu;ry=1;var t=Pa(),e=Object.prototype,r=e.hasOwnProperty,a=e.toString,n=t?t.toStringTag:void 0;function i(o){var s=r.call(o,n),u=o[n];try{o[n]=void 0;var l=!0}catch{}var f=a.call(o);return l&&(s?o[n]=u:delete o[n]),f}return eu=i,eu}var tu,ay;function KD(){if(ay)return tu;ay=1;var t=Object.prototype,e=t.toString;function r(a){return e.call(a)}return tu=r,tu}var ru,ny;function ta(){if(ny)return ru;ny=1;var t=Pa(),e=$D(),r=KD(),a="[object Null]",n="[object Undefined]",i=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?n:a:i&&i in Object(s)?e(s):r(s)}return ru=o,ru}var au,iy;function Yt(){if(iy)return au;iy=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return au=t,au}var nu,oy;function Ln(){if(oy)return nu;oy=1;var t=ta(),e=Yt(),r="[object AsyncFunction]",a="[object Function]",n="[object GeneratorFunction]",i="[object Proxy]";function o(s){if(!e(s))return!1;var u=t(s);return u==a||u==n||u==r||u==i}return nu=o,nu}var iu,sy;function ZD(){if(sy)return iu;sy=1;var t=Jt(),e=t["__core-js_shared__"];return iu=e,iu}var ou,uy;function QD(){if(uy)return ou;uy=1;var t=ZD(),e=(function(){var a=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function r(a){return!!e&&e in a}return ou=r,ou}var su,ly;function sT(){if(ly)return su;ly=1;var t=Function.prototype,e=t.toString;function r(a){if(a!=null){try{return e.call(a)}catch{}try{return a+""}catch{}}return""}return su=r,su}var uu,fy;function JD(){if(fy)return uu;fy=1;var t=Ln(),e=QD(),r=Yt(),a=sT(),n=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,l=s.hasOwnProperty,f=RegExp("^"+u.call(l).replace(n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(v){if(!r(v)||e(v))return!1;var c=t(v)?f:i;return c.test(a(v))}return uu=h,uu}var lu,hy;function jD(){if(hy)return lu;hy=1;function t(e,r){return e==null?void 0:e[r]}return lu=t,lu}var fu,cy;function ra(){if(cy)return fu;cy=1;var t=JD(),e=jD();function r(a,n){var i=e(a,n);return t(i)?i:void 0}return fu=r,fu}var hu,vy;function Zv(){if(vy)return hu;vy=1;var t=ra(),e=Jt(),r=t(e,"Map");return hu=r,hu}var cu,dy;function Xi(){if(dy)return cu;dy=1;var t=ra(),e=t(Object,"create");return cu=e,cu}var vu,gy;function eN(){if(gy)return vu;gy=1;var t=Xi();function e(){this.__data__=t?t(null):{},this.size=0}return vu=e,vu}var du,py;function tN(){if(py)return du;py=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return du=t,du}var gu,yy;function rN(){if(yy)return gu;yy=1;var t=Xi(),e="__lodash_hash_undefined__",r=Object.prototype,a=r.hasOwnProperty;function n(i){var o=this.__data__;if(t){var s=o[i];return s===e?void 0:s}return a.call(o,i)?o[i]:void 0}return gu=n,gu}var pu,my;function aN(){if(my)return pu;my=1;var t=Xi(),e=Object.prototype,r=e.hasOwnProperty;function a(n){var i=this.__data__;return t?i[n]!==void 0:r.call(i,n)}return pu=a,pu}var yu,by;function nN(){if(by)return yu;by=1;var t=Xi(),e="__lodash_hash_undefined__";function r(a,n){var i=this.__data__;return this.size+=this.has(a)?0:1,i[a]=t&&n===void 0?e:n,this}return yu=r,yu}var mu,Ey;function iN(){if(Ey)return mu;Ey=1;var t=eN(),e=tN(),r=rN(),a=aN(),n=nN();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=a,i.prototype.set=n,mu=i,mu}var bu,wy;function oN(){if(wy)return bu;wy=1;var t=iN(),e=Hi(),r=Zv();function a(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return bu=a,bu}var Eu,Ty;function sN(){if(Ty)return Eu;Ty=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Eu=t,Eu}var wu,xy;function Wi(){if(xy)return wu;xy=1;var t=sN();function e(r,a){var n=r.__data__;return t(a)?n[typeof a=="string"?"string":"hash"]:n.map}return wu=e,wu}var Tu,Cy;function uN(){if(Cy)return Tu;Cy=1;var t=Wi();function e(r){var a=t(this,r).delete(r);return this.size-=a?1:0,a}return Tu=e,Tu}var xu,Ay;function lN(){if(Ay)return xu;Ay=1;var t=Wi();function e(r){return t(this,r).get(r)}return xu=e,xu}var Cu,Ly;function fN(){if(Ly)return Cu;Ly=1;var t=Wi();function e(r){return t(this,r).has(r)}return Cu=e,Cu}var Au,Ry;function hN(){if(Ry)return Au;Ry=1;var t=Wi();function e(r,a){var n=t(this,r),i=n.size;return n.set(r,a),this.size+=n.size==i?0:1,this}return Au=e,Au}var Lu,Sy;function Qv(){if(Sy)return Lu;Sy=1;var t=oN(),e=uN(),r=lN(),a=fN(),n=hN();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=a,i.prototype.set=n,Lu=i,Lu}var Ru,Dy;function cN(){if(Dy)return Ru;Dy=1;var t=Hi(),e=Zv(),r=Qv(),a=200;function n(i,o){var s=this.__data__;if(s instanceof t){var u=s.__data__;if(!e||u.length<a-1)return u.push([i,o]),this.size=++s.size,this;s=this.__data__=new r(u)}return s.set(i,o),this.size=s.size,this}return Ru=n,Ru}var Su,Ny;function $i(){if(Ny)return Su;Ny=1;var t=Hi(),e=YD(),r=HD(),a=XD(),n=WD(),i=cN();function o(s){var u=this.__data__=new t(s);this.size=u.size}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=a,o.prototype.has=n,o.prototype.set=i,Su=o,Su}var Du,My;function Jv(){if(My)return Du;My=1;function t(e,r){for(var a=-1,n=e==null?0:e.length;++a<n&&r(e[a],a,e)!==!1;);return e}return Du=t,Du}var Nu,Oy;function uT(){if(Oy)return Nu;Oy=1;var t=ra(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Nu=e,Nu}var Mu,Iy;function Ki(){if(Iy)return Mu;Iy=1;var t=uT();function e(r,a,n){a=="__proto__"&&t?t(r,a,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[a]=n}return Mu=e,Mu}var Ou,Py;function Zi(){if(Py)return Ou;Py=1;var t=Ki(),e=Ia(),r=Object.prototype,a=r.hasOwnProperty;function n(i,o,s){var u=i[o];(!(a.call(i,o)&&e(u,s))||s===void 0&&!(o in i))&&t(i,o,s)}return Ou=n,Ou}var Iu,Fy;function Rn(){if(Fy)return Iu;Fy=1;var t=Zi(),e=Ki();function r(a,n,i,o){var s=!i;i||(i={});for(var u=-1,l=n.length;++u<l;){var f=n[u],h=o?o(i[f],a[f],f,i,a):void 0;h===void 0&&(h=a[f]),s?e(i,f,h):t(i,f,h)}return i}return Iu=r,Iu}var Pu,_y;function vN(){if(_y)return Pu;_y=1;function t(e,r){for(var a=-1,n=Array(e);++a<e;)n[a]=r(a);return n}return Pu=t,Pu}var Fu,By;function or(){if(By)return Fu;By=1;function t(e){return e!=null&&typeof e=="object"}return Fu=t,Fu}var _u,ky;function dN(){if(ky)return _u;ky=1;var t=ta(),e=or(),r="[object Arguments]";function a(n){return e(n)&&t(n)==r}return _u=a,_u}var Bu,qy;function Sn(){if(qy)return Bu;qy=1;var t=dN(),e=or(),r=Object.prototype,a=r.hasOwnProperty,n=r.propertyIsEnumerable,i=t((function(){return arguments})())?t:function(o){return e(o)&&a.call(o,"callee")&&!n.call(o,"callee")};return Bu=i,Bu}var ku,Gy;function ct(){if(Gy)return ku;Gy=1;var t=Array.isArray;return ku=t,ku}var Qa={exports:{}},qu,Uy;function gN(){if(Uy)return qu;Uy=1;function t(){return!1}return qu=t,qu}Qa.exports;var zy;function Fa(){return zy||(zy=1,(function(t,e){var r=Jt(),a=gN(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===n,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,l=u||a;t.exports=l})(Qa,Qa.exports)),Qa.exports}var Gu,Vy;function Qi(){if(Vy)return Gu;Vy=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(a,n){var i=typeof a;return n=n??t,!!n&&(i=="number"||i!="symbol"&&e.test(a))&&a>-1&&a%1==0&&a<n}return Gu=r,Gu}var Uu,Yy;function jv(){if(Yy)return Uu;Yy=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Uu=e,Uu}var zu,Hy;function pN(){if(Hy)return zu;Hy=1;var t=ta(),e=jv(),r=or(),a="[object Arguments]",n="[object Array]",i="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",l="[object Map]",f="[object Number]",h="[object Object]",v="[object RegExp]",c="[object Set]",d="[object String]",g="[object WeakMap]",p="[object ArrayBuffer]",y="[object DataView]",b="[object Float32Array]",m="[object Float64Array]",E="[object Int8Array]",T="[object Int16Array]",L="[object Int32Array]",w="[object Uint8Array]",C="[object Uint8ClampedArray]",A="[object Uint16Array]",R="[object Uint32Array]",S={};S[b]=S[m]=S[E]=S[T]=S[L]=S[w]=S[C]=S[A]=S[R]=!0,S[a]=S[n]=S[p]=S[i]=S[y]=S[o]=S[s]=S[u]=S[l]=S[f]=S[h]=S[v]=S[c]=S[d]=S[g]=!1;function D(P){return r(P)&&e(P.length)&&!!S[t(P)]}return zu=D,zu}var Vu,Xy;function Ji(){if(Xy)return Vu;Xy=1;function t(e){return function(r){return e(r)}}return Vu=t,Vu}var Ja={exports:{}};Ja.exports;var Wy;function ed(){return Wy||(Wy=1,(function(t,e){var r=oT(),a=e&&!e.nodeType&&e,n=a&&!0&&t&&!t.nodeType&&t,i=n&&n.exports===a,o=i&&r.process,s=(function(){try{var u=n&&n.require&&n.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();t.exports=s})(Ja,Ja.exports)),Ja.exports}var Yu,$y;function Dn(){if($y)return Yu;$y=1;var t=pN(),e=Ji(),r=ed(),a=r&&r.isTypedArray,n=a?e(a):t;return Yu=n,Yu}var Hu,Ky;function lT(){if(Ky)return Hu;Ky=1;var t=vN(),e=Sn(),r=ct(),a=Fa(),n=Qi(),i=Dn(),o=Object.prototype,s=o.hasOwnProperty;function u(l,f){var h=r(l),v=!h&&e(l),c=!h&&!v&&a(l),d=!h&&!v&&!c&&i(l),g=h||v||c||d,p=g?t(l.length,String):[],y=p.length;for(var b in l)(f||s.call(l,b))&&!(g&&(b=="length"||c&&(b=="offset"||b=="parent")||d&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||n(b,y)))&&p.push(b);return p}return Hu=u,Hu}var Xu,Zy;function ji(){if(Zy)return Xu;Zy=1;var t=Object.prototype;function e(r){var a=r&&r.constructor,n=typeof a=="function"&&a.prototype||t;return r===n}return Xu=e,Xu}var Wu,Qy;function fT(){if(Qy)return Wu;Qy=1;function t(e,r){return function(a){return e(r(a))}}return Wu=t,Wu}var $u,Jy;function yN(){if(Jy)return $u;Jy=1;var t=fT(),e=t(Object.keys,Object);return $u=e,$u}var Ku,jy;function td(){if(jy)return Ku;jy=1;var t=ji(),e=yN(),r=Object.prototype,a=r.hasOwnProperty;function n(i){if(!t(i))return e(i);var o=[];for(var s in Object(i))a.call(i,s)&&s!="constructor"&&o.push(s);return o}return Ku=n,Ku}var Zu,em;function gr(){if(em)return Zu;em=1;var t=Ln(),e=jv();function r(a){return a!=null&&e(a.length)&&!t(a)}return Zu=r,Zu}var Qu,tm;function kr(){if(tm)return Qu;tm=1;var t=lT(),e=td(),r=gr();function a(n){return r(n)?t(n):e(n)}return Qu=a,Qu}var Ju,rm;function mN(){if(rm)return Ju;rm=1;var t=Rn(),e=kr();function r(a,n){return a&&t(n,e(n),a)}return Ju=r,Ju}var ju,am;function bN(){if(am)return ju;am=1;function t(e){var r=[];if(e!=null)for(var a in Object(e))r.push(a);return r}return ju=t,ju}var el,nm;function EN(){if(nm)return el;nm=1;var t=Yt(),e=ji(),r=bN(),a=Object.prototype,n=a.hasOwnProperty;function i(o){if(!t(o))return r(o);var s=e(o),u=[];for(var l in o)l=="constructor"&&(s||!n.call(o,l))||u.push(l);return u}return el=i,el}var tl,im;function aa(){if(im)return tl;im=1;var t=lT(),e=EN(),r=gr();function a(n){return r(n)?t(n,!0):e(n)}return tl=a,tl}var rl,om;function wN(){if(om)return rl;om=1;var t=Rn(),e=aa();function r(a,n){return a&&t(n,e(n),a)}return rl=r,rl}var ja={exports:{}};ja.exports;var sm;function hT(){return sm||(sm=1,(function(t,e){var r=Jt(),a=e&&!e.nodeType&&e,n=a&&!0&&t&&!t.nodeType&&t,i=n&&n.exports===a,o=i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,f){if(f)return l.slice();var h=l.length,v=s?s(h):new l.constructor(h);return l.copy(v),v}t.exports=u})(ja,ja.exports)),ja.exports}var al,um;function cT(){if(um)return al;um=1;function t(e,r){var a=-1,n=e.length;for(r||(r=Array(n));++a<n;)r[a]=e[a];return r}return al=t,al}var nl,lm;function vT(){if(lm)return nl;lm=1;function t(e,r){for(var a=-1,n=e==null?0:e.length,i=0,o=[];++a<n;){var s=e[a];r(s,a,e)&&(o[i++]=s)}return o}return nl=t,nl}var il,fm;function dT(){if(fm)return il;fm=1;function t(){return[]}return il=t,il}var ol,hm;function rd(){if(hm)return ol;hm=1;var t=vT(),e=dT(),r=Object.prototype,a=r.propertyIsEnumerable,n=Object.getOwnPropertySymbols,i=n?function(o){return o==null?[]:(o=Object(o),t(n(o),function(s){return a.call(o,s)}))}:e;return ol=i,ol}var sl,cm;function TN(){if(cm)return sl;cm=1;var t=Rn(),e=rd();function r(a,n){return t(a,e(a),n)}return sl=r,sl}var ul,vm;function ad(){if(vm)return ul;vm=1;function t(e,r){for(var a=-1,n=r.length,i=e.length;++a<n;)e[i+a]=r[a];return e}return ul=t,ul}var ll,dm;function eo(){if(dm)return ll;dm=1;var t=fT(),e=t(Object.getPrototypeOf,Object);return ll=e,ll}var fl,gm;function gT(){if(gm)return fl;gm=1;var t=ad(),e=eo(),r=rd(),a=dT(),n=Object.getOwnPropertySymbols,i=n?function(o){for(var s=[];o;)t(s,r(o)),o=e(o);return s}:a;return fl=i,fl}var hl,pm;function xN(){if(pm)return hl;pm=1;var t=Rn(),e=gT();function r(a,n){return t(a,e(a),n)}return hl=r,hl}var cl,ym;function pT(){if(ym)return cl;ym=1;var t=ad(),e=ct();function r(a,n,i){var o=n(a);return e(a)?o:t(o,i(a))}return cl=r,cl}var vl,mm;function yT(){if(mm)return vl;mm=1;var t=pT(),e=rd(),r=kr();function a(n){return t(n,r,e)}return vl=a,vl}var dl,bm;function CN(){if(bm)return dl;bm=1;var t=pT(),e=gT(),r=aa();function a(n){return t(n,r,e)}return dl=a,dl}var gl,Em;function AN(){if(Em)return gl;Em=1;var t=ra(),e=Jt(),r=t(e,"DataView");return gl=r,gl}var pl,wm;function LN(){if(wm)return pl;wm=1;var t=ra(),e=Jt(),r=t(e,"Promise");return pl=r,pl}var yl,Tm;function mT(){if(Tm)return yl;Tm=1;var t=ra(),e=Jt(),r=t(e,"Set");return yl=r,yl}var ml,xm;function RN(){if(xm)return ml;xm=1;var t=ra(),e=Jt(),r=t(e,"WeakMap");return ml=r,ml}var bl,Cm;function _a(){if(Cm)return bl;Cm=1;var t=AN(),e=Zv(),r=LN(),a=mT(),n=RN(),i=ta(),o=sT(),s="[object Map]",u="[object Object]",l="[object Promise]",f="[object Set]",h="[object WeakMap]",v="[object DataView]",c=o(t),d=o(e),g=o(r),p=o(a),y=o(n),b=i;return(t&&b(new t(new ArrayBuffer(1)))!=v||e&&b(new e)!=s||r&&b(r.resolve())!=l||a&&b(new a)!=f||n&&b(new n)!=h)&&(b=function(m){var E=i(m),T=E==u?m.constructor:void 0,L=T?o(T):"";if(L)switch(L){case c:return v;case d:return s;case g:return l;case p:return f;case y:return h}return E}),bl=b,bl}var El,Am;function SN(){if(Am)return El;Am=1;var t=Object.prototype,e=t.hasOwnProperty;function r(a){var n=a.length,i=new a.constructor(n);return n&&typeof a[0]=="string"&&e.call(a,"index")&&(i.index=a.index,i.input=a.input),i}return El=r,El}var wl,Lm;function bT(){if(Lm)return wl;Lm=1;var t=Jt(),e=t.Uint8Array;return wl=e,wl}var Tl,Rm;function nd(){if(Rm)return Tl;Rm=1;var t=bT();function e(r){var a=new r.constructor(r.byteLength);return new t(a).set(new t(r)),a}return Tl=e,Tl}var xl,Sm;function DN(){if(Sm)return xl;Sm=1;var t=nd();function e(r,a){var n=a?t(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}return xl=e,xl}var Cl,Dm;function NN(){if(Dm)return Cl;Dm=1;var t=/\w*$/;function e(r){var a=new r.constructor(r.source,t.exec(r));return a.lastIndex=r.lastIndex,a}return Cl=e,Cl}var Al,Nm;function MN(){if(Nm)return Al;Nm=1;var t=Pa(),e=t?t.prototype:void 0,r=e?e.valueOf:void 0;function a(n){return r?Object(r.call(n)):{}}return Al=a,Al}var Ll,Mm;function ET(){if(Mm)return Ll;Mm=1;var t=nd();function e(r,a){var n=a?t(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}return Ll=e,Ll}var Rl,Om;function ON(){if(Om)return Rl;Om=1;var t=nd(),e=DN(),r=NN(),a=MN(),n=ET(),i="[object Boolean]",o="[object Date]",s="[object Map]",u="[object Number]",l="[object RegExp]",f="[object Set]",h="[object String]",v="[object Symbol]",c="[object ArrayBuffer]",d="[object DataView]",g="[object Float32Array]",p="[object Float64Array]",y="[object Int8Array]",b="[object Int16Array]",m="[object Int32Array]",E="[object Uint8Array]",T="[object Uint8ClampedArray]",L="[object Uint16Array]",w="[object Uint32Array]";function C(A,R,S){var D=A.constructor;switch(R){case c:return t(A);case i:case o:return new D(+A);case d:return e(A,S);case g:case p:case y:case b:case m:case E:case T:case L:case w:return n(A,S);case s:return new D;case u:case h:return new D(A);case l:return r(A);case f:return new D;case v:return a(A)}}return Rl=C,Rl}var Sl,Im;function wT(){if(Im)return Sl;Im=1;var t=Yt(),e=Object.create,r=(function(){function a(){}return function(n){if(!t(n))return{};if(e)return e(n);a.prototype=n;var i=new a;return a.prototype=void 0,i}})();return Sl=r,Sl}var Dl,Pm;function TT(){if(Pm)return Dl;Pm=1;var t=wT(),e=eo(),r=ji();function a(n){return typeof n.constructor=="function"&&!r(n)?t(e(n)):{}}return Dl=a,Dl}var Nl,Fm;function IN(){if(Fm)return Nl;Fm=1;var t=_a(),e=or(),r="[object Map]";function a(n){return e(n)&&t(n)==r}return Nl=a,Nl}var Ml,_m;function PN(){if(_m)return Ml;_m=1;var t=IN(),e=Ji(),r=ed(),a=r&&r.isMap,n=a?e(a):t;return Ml=n,Ml}var Ol,Bm;function FN(){if(Bm)return Ol;Bm=1;var t=_a(),e=or(),r="[object Set]";function a(n){return e(n)&&t(n)==r}return Ol=a,Ol}var Il,km;function _N(){if(km)return Il;km=1;var t=FN(),e=Ji(),r=ed(),a=r&&r.isSet,n=a?e(a):t;return Il=n,Il}var Pl,qm;function xT(){if(qm)return Pl;qm=1;var t=$i(),e=Jv(),r=Zi(),a=mN(),n=wN(),i=hT(),o=cT(),s=TN(),u=xN(),l=yT(),f=CN(),h=_a(),v=SN(),c=ON(),d=TT(),g=ct(),p=Fa(),y=PN(),b=Yt(),m=_N(),E=kr(),T=aa(),L=1,w=2,C=4,A="[object Arguments]",R="[object Array]",S="[object Boolean]",D="[object Date]",P="[object Error]",x="[object Function]",N="[object GeneratorFunction]",M="[object Map]",I="[object Number]",O="[object Object]",k="[object RegExp]",F="[object Set]",_="[object String]",z="[object Symbol]",X="[object WeakMap]",q="[object ArrayBuffer]",G="[object DataView]",U="[object Float32Array]",K="[object Float64Array]",J="[object Int8Array]",H="[object Int16Array]",Y="[object Int32Array]",$="[object Uint8Array]",Q="[object Uint8ClampedArray]",ee="[object Uint16Array]",te="[object Uint32Array]",he={};he[A]=he[R]=he[q]=he[G]=he[S]=he[D]=he[U]=he[K]=he[J]=he[H]=he[Y]=he[M]=he[I]=he[O]=he[k]=he[F]=he[_]=he[z]=he[$]=he[Q]=he[ee]=he[te]=!0,he[P]=he[x]=he[X]=!1;function xe(le,se,ve,ce,ye,ge){var de,be=se&L,Re=se&w,Pe=se&C;if(ve&&(de=ye?ve(le,ce,ye,ge):ve(le)),de!==void 0)return de;if(!b(le))return le;var Be=g(le);if(Be){if(de=v(le),!be)return o(le,de)}else{var Ne=h(le),Me=Ne==x||Ne==N;if(p(le))return i(le,be);if(Ne==O||Ne==A||Me&&!ye){if(de=Re||Me?{}:d(le),!be)return Re?u(le,n(de,le)):s(le,a(de,le))}else{if(!he[Ne])return ye?le:{};de=c(le,Ne,be)}}ge||(ge=new t);var ne=ge.get(le);if(ne)return ne;ge.set(le,de),m(le)?le.forEach(function(W){de.add(xe(W,se,ve,W,le,ge))}):y(le)&&le.forEach(function(W,Z){de.set(Z,xe(W,se,ve,Z,le,ge))});var B=Pe?Re?f:l:Re?T:E,V=Be?void 0:B(le);return e(V||le,function(W,Z){V&&(Z=W,W=le[Z]),r(de,Z,xe(W,se,ve,Z,le,ge))}),de}return Pl=xe,Pl}var Fl,Gm;function BN(){if(Gm)return Fl;Gm=1;var t=xT(),e=4;function r(a){return t(a,e)}return Fl=r,Fl}var _l,Um;function id(){if(Um)return _l;Um=1;function t(e){return function(){return e}}return _l=t,_l}var Bl,zm;function kN(){if(zm)return Bl;zm=1;function t(e){return function(r,a,n){for(var i=-1,o=Object(r),s=n(r),u=s.length;u--;){var l=s[e?u:++i];if(a(o[l],l,o)===!1)break}return r}}return Bl=t,Bl}var kl,Vm;function od(){if(Vm)return kl;Vm=1;var t=kN(),e=t();return kl=e,kl}var ql,Ym;function sd(){if(Ym)return ql;Ym=1;var t=od(),e=kr();function r(a,n){return a&&t(a,n,e)}return ql=r,ql}var Gl,Hm;function qN(){if(Hm)return Gl;Hm=1;var t=gr();function e(r,a){return function(n,i){if(n==null)return n;if(!t(n))return r(n,i);for(var o=n.length,s=a?o:-1,u=Object(n);(a?s--:++s<o)&&i(u[s],s,u)!==!1;);return n}}return Gl=e,Gl}var Ul,Xm;function to(){if(Xm)return Ul;Xm=1;var t=sd(),e=qN(),r=e(t);return Ul=r,Ul}var zl,Wm;function na(){if(Wm)return zl;Wm=1;function t(e){return e}return zl=t,zl}var Vl,$m;function CT(){if($m)return Vl;$m=1;var t=na();function e(r){return typeof r=="function"?r:t}return Vl=e,Vl}var Yl,Km;function AT(){if(Km)return Yl;Km=1;var t=Jv(),e=to(),r=CT(),a=ct();function n(i,o){var s=a(i)?t:e;return s(i,r(o))}return Yl=n,Yl}var Hl,Zm;function LT(){return Zm||(Zm=1,Hl=AT()),Hl}var Xl,Qm;function GN(){if(Qm)return Xl;Qm=1;var t=to();function e(r,a){var n=[];return t(r,function(i,o,s){a(i,o,s)&&n.push(i)}),n}return Xl=e,Xl}var Wl,Jm;function UN(){if(Jm)return Wl;Jm=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return Wl=e,Wl}var $l,jm;function zN(){if(jm)return $l;jm=1;function t(e){return this.__data__.has(e)}return $l=t,$l}var Kl,e0;function RT(){if(e0)return Kl;e0=1;var t=Qv(),e=UN(),r=zN();function a(n){var i=-1,o=n==null?0:n.length;for(this.__data__=new t;++i<o;)this.add(n[i])}return a.prototype.add=a.prototype.push=e,a.prototype.has=r,Kl=a,Kl}var Zl,t0;function VN(){if(t0)return Zl;t0=1;function t(e,r){for(var a=-1,n=e==null?0:e.length;++a<n;)if(r(e[a],a,e))return!0;return!1}return Zl=t,Zl}var Ql,r0;function ST(){if(r0)return Ql;r0=1;function t(e,r){return e.has(r)}return Ql=t,Ql}var Jl,a0;function DT(){if(a0)return Jl;a0=1;var t=RT(),e=VN(),r=ST(),a=1,n=2;function i(o,s,u,l,f,h){var v=u&a,c=o.length,d=s.length;if(c!=d&&!(v&&d>c))return!1;var g=h.get(o),p=h.get(s);if(g&&p)return g==s&&p==o;var y=-1,b=!0,m=u&n?new t:void 0;for(h.set(o,s),h.set(s,o);++y<c;){var E=o[y],T=s[y];if(l)var L=v?l(T,E,y,s,o,h):l(E,T,y,o,s,h);if(L!==void 0){if(L)continue;b=!1;break}if(m){if(!e(s,function(w,C){if(!r(m,C)&&(E===w||f(E,w,u,l,h)))return m.push(C)})){b=!1;break}}else if(!(E===T||f(E,T,u,l,h))){b=!1;break}}return h.delete(o),h.delete(s),b}return Jl=i,Jl}var jl,n0;function YN(){if(n0)return jl;n0=1;function t(e){var r=-1,a=Array(e.size);return e.forEach(function(n,i){a[++r]=[i,n]}),a}return jl=t,jl}var ef,i0;function ud(){if(i0)return ef;i0=1;function t(e){var r=-1,a=Array(e.size);return e.forEach(function(n){a[++r]=n}),a}return ef=t,ef}var tf,o0;function HN(){if(o0)return tf;o0=1;var t=Pa(),e=bT(),r=Ia(),a=DT(),n=YN(),i=ud(),o=1,s=2,u="[object Boolean]",l="[object Date]",f="[object Error]",h="[object Map]",v="[object Number]",c="[object RegExp]",d="[object Set]",g="[object String]",p="[object Symbol]",y="[object ArrayBuffer]",b="[object DataView]",m=t?t.prototype:void 0,E=m?m.valueOf:void 0;function T(L,w,C,A,R,S,D){switch(C){case b:if(L.byteLength!=w.byteLength||L.byteOffset!=w.byteOffset)return!1;L=L.buffer,w=w.buffer;case y:return!(L.byteLength!=w.byteLength||!S(new e(L),new e(w)));case u:case l:case v:return r(+L,+w);case f:return L.name==w.name&&L.message==w.message;case c:case g:return L==w+"";case h:var P=n;case d:var x=A&o;if(P||(P=i),L.size!=w.size&&!x)return!1;var N=D.get(L);if(N)return N==w;A|=s,D.set(L,w);var M=a(P(L),P(w),A,R,S,D);return D.delete(L),M;case p:if(E)return E.call(L)==E.call(w)}return!1}return tf=T,tf}var rf,s0;function XN(){if(s0)return rf;s0=1;var t=yT(),e=1,r=Object.prototype,a=r.hasOwnProperty;function n(i,o,s,u,l,f){var h=s&e,v=t(i),c=v.length,d=t(o),g=d.length;if(c!=g&&!h)return!1;for(var p=c;p--;){var y=v[p];if(!(h?y in o:a.call(o,y)))return!1}var b=f.get(i),m=f.get(o);if(b&&m)return b==o&&m==i;var E=!0;f.set(i,o),f.set(o,i);for(var T=h;++p<c;){y=v[p];var L=i[y],w=o[y];if(u)var C=h?u(w,L,y,o,i,f):u(L,w,y,i,o,f);if(!(C===void 0?L===w||l(L,w,s,u,f):C)){E=!1;break}T||(T=y=="constructor")}if(E&&!T){var A=i.constructor,R=o.constructor;A!=R&&"constructor"in i&&"constructor"in o&&!(typeof A=="function"&&A instanceof A&&typeof R=="function"&&R instanceof R)&&(E=!1)}return f.delete(i),f.delete(o),E}return rf=n,rf}var af,u0;function WN(){if(u0)return af;u0=1;var t=$i(),e=DT(),r=HN(),a=XN(),n=_a(),i=ct(),o=Fa(),s=Dn(),u=1,l="[object Arguments]",f="[object Array]",h="[object Object]",v=Object.prototype,c=v.hasOwnProperty;function d(g,p,y,b,m,E){var T=i(g),L=i(p),w=T?f:n(g),C=L?f:n(p);w=w==l?h:w,C=C==l?h:C;var A=w==h,R=C==h,S=w==C;if(S&&o(g)){if(!o(p))return!1;T=!0,A=!1}if(S&&!A)return E||(E=new t),T||s(g)?e(g,p,y,b,m,E):r(g,p,w,y,b,m,E);if(!(y&u)){var D=A&&c.call(g,"__wrapped__"),P=R&&c.call(p,"__wrapped__");if(D||P){var x=D?g.value():g,N=P?p.value():p;return E||(E=new t),m(x,N,y,b,E)}}return S?(E||(E=new t),a(g,p,y,b,m,E)):!1}return af=d,af}var nf,l0;function NT(){if(l0)return nf;l0=1;var t=WN(),e=or();function r(a,n,i,o,s){return a===n?!0:a==null||n==null||!e(a)&&!e(n)?a!==a&&n!==n:t(a,n,i,o,r,s)}return nf=r,nf}var of,f0;function $N(){if(f0)return of;f0=1;var t=$i(),e=NT(),r=1,a=2;function n(i,o,s,u){var l=s.length,f=l,h=!u;if(i==null)return!f;for(i=Object(i);l--;){var v=s[l];if(h&&v[2]?v[1]!==i[v[0]]:!(v[0]in i))return!1}for(;++l<f;){v=s[l];var c=v[0],d=i[c],g=v[1];if(h&&v[2]){if(d===void 0&&!(c in i))return!1}else{var p=new t;if(u)var y=u(d,g,c,i,o,p);if(!(y===void 0?e(g,d,r|a,u,p):y))return!1}}return!0}return of=n,of}var sf,h0;function MT(){if(h0)return sf;h0=1;var t=Yt();function e(r){return r===r&&!t(r)}return sf=e,sf}var uf,c0;function KN(){if(c0)return uf;c0=1;var t=MT(),e=kr();function r(a){for(var n=e(a),i=n.length;i--;){var o=n[i],s=a[o];n[i]=[o,s,t(s)]}return n}return uf=r,uf}var lf,v0;function OT(){if(v0)return lf;v0=1;function t(e,r){return function(a){return a==null?!1:a[e]===r&&(r!==void 0||e in Object(a))}}return lf=t,lf}var ff,d0;function ZN(){if(d0)return ff;d0=1;var t=$N(),e=KN(),r=OT();function a(n){var i=e(n);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(o){return o===n||t(o,n,i)}}return ff=a,ff}var hf,g0;function Ba(){if(g0)return hf;g0=1;var t=ta(),e=or(),r="[object Symbol]";function a(n){return typeof n=="symbol"||e(n)&&t(n)==r}return hf=a,hf}var cf,p0;function ld(){if(p0)return cf;p0=1;var t=ct(),e=Ba(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function n(i,o){if(t(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||e(i)?!0:a.test(i)||!r.test(i)||o!=null&&i in Object(o)}return cf=n,cf}var vf,y0;function QN(){if(y0)return vf;y0=1;var t=Qv(),e="Expected a function";function r(a,n){if(typeof a!="function"||n!=null&&typeof n!="function")throw new TypeError(e);var i=function(){var o=arguments,s=n?n.apply(this,o):o[0],u=i.cache;if(u.has(s))return u.get(s);var l=a.apply(this,o);return i.cache=u.set(s,l)||u,l};return i.cache=new(r.Cache||t),i}return r.Cache=t,vf=r,vf}var df,m0;function JN(){if(m0)return df;m0=1;var t=QN(),e=500;function r(a){var n=t(a,function(o){return i.size===e&&i.clear(),o}),i=n.cache;return n}return df=r,df}var gf,b0;function jN(){if(b0)return gf;b0=1;var t=JN(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,a=t(function(n){var i=[];return n.charCodeAt(0)===46&&i.push(""),n.replace(e,function(o,s,u,l){i.push(u?l.replace(r,"$1"):s||o)}),i});return gf=a,gf}var pf,E0;function ro(){if(E0)return pf;E0=1;function t(e,r){for(var a=-1,n=e==null?0:e.length,i=Array(n);++a<n;)i[a]=r(e[a],a,e);return i}return pf=t,pf}var yf,w0;function eM(){if(w0)return yf;w0=1;var t=Pa(),e=ro(),r=ct(),a=Ba(),n=t?t.prototype:void 0,i=n?n.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return e(s,o)+"";if(a(s))return i?i.call(s):"";var u=s+"";return u=="0"&&1/s==-1/0?"-0":u}return yf=o,yf}var mf,T0;function IT(){if(T0)return mf;T0=1;var t=eM();function e(r){return r==null?"":t(r)}return mf=e,mf}var bf,x0;function ao(){if(x0)return bf;x0=1;var t=ct(),e=ld(),r=jN(),a=IT();function n(i,o){return t(i)?i:e(i,o)?[i]:r(a(i))}return bf=n,bf}var Ef,C0;function Nn(){if(C0)return Ef;C0=1;var t=Ba();function e(r){if(typeof r=="string"||t(r))return r;var a=r+"";return a=="0"&&1/r==-1/0?"-0":a}return Ef=e,Ef}var wf,A0;function no(){if(A0)return wf;A0=1;var t=ao(),e=Nn();function r(a,n){n=t(n,a);for(var i=0,o=n.length;a!=null&&i<o;)a=a[e(n[i++])];return i&&i==o?a:void 0}return wf=r,wf}var Tf,L0;function tM(){if(L0)return Tf;L0=1;var t=no();function e(r,a,n){var i=r==null?void 0:t(r,a);return i===void 0?n:i}return Tf=e,Tf}var xf,R0;function rM(){if(R0)return xf;R0=1;function t(e,r){return e!=null&&r in Object(e)}return xf=t,xf}var Cf,S0;function PT(){if(S0)return Cf;S0=1;var t=ao(),e=Sn(),r=ct(),a=Qi(),n=jv(),i=Nn();function o(s,u,l){u=t(u,s);for(var f=-1,h=u.length,v=!1;++f<h;){var c=i(u[f]);if(!(v=s!=null&&l(s,c)))break;s=s[c]}return v||++f!=h?v:(h=s==null?0:s.length,!!h&&n(h)&&a(c,h)&&(r(s)||e(s)))}return Cf=o,Cf}var Af,D0;function FT(){if(D0)return Af;D0=1;var t=rM(),e=PT();function r(a,n){return a!=null&&e(a,n,t)}return Af=r,Af}var Lf,N0;function aM(){if(N0)return Lf;N0=1;var t=NT(),e=tM(),r=FT(),a=ld(),n=MT(),i=OT(),o=Nn(),s=1,u=2;function l(f,h){return a(f)&&n(h)?i(o(f),h):function(v){var c=e(v,f);return c===void 0&&c===h?r(v,f):t(h,c,s|u)}}return Lf=l,Lf}var Rf,M0;function _T(){if(M0)return Rf;M0=1;function t(e){return function(r){return r==null?void 0:r[e]}}return Rf=t,Rf}var Sf,O0;function nM(){if(O0)return Sf;O0=1;var t=no();function e(r){return function(a){return t(a,r)}}return Sf=e,Sf}var Df,I0;function iM(){if(I0)return Df;I0=1;var t=_T(),e=nM(),r=ld(),a=Nn();function n(i){return r(i)?t(a(i)):e(i)}return Df=n,Df}var Nf,P0;function pr(){if(P0)return Nf;P0=1;var t=ZN(),e=aM(),r=na(),a=ct(),n=iM();function i(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?a(o)?e(o[0],o[1]):t(o):n(o)}return Nf=i,Nf}var Mf,F0;function BT(){if(F0)return Mf;F0=1;var t=vT(),e=GN(),r=pr(),a=ct();function n(i,o){var s=a(i)?t:e;return s(i,r(o,3))}return Mf=n,Mf}var Of,_0;function oM(){if(_0)return Of;_0=1;var t=Object.prototype,e=t.hasOwnProperty;function r(a,n){return a!=null&&e.call(a,n)}return Of=r,Of}var If,B0;function kT(){if(B0)return If;B0=1;var t=oM(),e=PT();function r(a,n){return a!=null&&e(a,n,t)}return If=r,If}var Pf,k0;function sM(){if(k0)return Pf;k0=1;var t=td(),e=_a(),r=Sn(),a=ct(),n=gr(),i=Fa(),o=ji(),s=Dn(),u="[object Map]",l="[object Set]",f=Object.prototype,h=f.hasOwnProperty;function v(c){if(c==null)return!0;if(n(c)&&(a(c)||typeof c=="string"||typeof c.splice=="function"||i(c)||s(c)||r(c)))return!c.length;var d=e(c);if(d==u||d==l)return!c.size;if(o(c))return!t(c).length;for(var g in c)if(h.call(c,g))return!1;return!0}return Pf=v,Pf}var Ff,q0;function qT(){if(q0)return Ff;q0=1;function t(e){return e===void 0}return Ff=t,Ff}var _f,G0;function GT(){if(G0)return _f;G0=1;var t=to(),e=gr();function r(a,n){var i=-1,o=e(a)?Array(a.length):[];return t(a,function(s,u,l){o[++i]=n(s,u,l)}),o}return _f=r,_f}var Bf,U0;function UT(){if(U0)return Bf;U0=1;var t=ro(),e=pr(),r=GT(),a=ct();function n(i,o){var s=a(i)?t:r;return s(i,e(o,3))}return Bf=n,Bf}var kf,z0;function uM(){if(z0)return kf;z0=1;function t(e,r,a,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(a=e[++i]);++i<o;)a=r(a,e[i],i,e);return a}return kf=t,kf}var qf,V0;function lM(){if(V0)return qf;V0=1;function t(e,r,a,n,i){return i(e,function(o,s,u){a=n?(n=!1,o):r(a,o,s,u)}),a}return qf=t,qf}var Gf,Y0;function zT(){if(Y0)return Gf;Y0=1;var t=uM(),e=to(),r=pr(),a=lM(),n=ct();function i(o,s,u){var l=n(o)?t:a,f=arguments.length<3;return l(o,r(s,4),u,f,e)}return Gf=i,Gf}var Uf,H0;function fM(){if(H0)return Uf;H0=1;var t=ta(),e=ct(),r=or(),a="[object String]";function n(i){return typeof i=="string"||!e(i)&&r(i)&&t(i)==a}return Uf=n,Uf}var zf,X0;function hM(){if(X0)return zf;X0=1;var t=_T(),e=t("length");return zf=e,zf}var Vf,W0;function cM(){if(W0)return Vf;W0=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",n=e+r+a,i="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+t+n+i+"]");function u(l){return s.test(l)}return Vf=u,Vf}var Yf,$0;function vM(){if($0)return Yf;$0=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",n=e+r+a,i="\\ufe0e\\ufe0f",o="["+t+"]",s="["+n+"]",u="\\ud83c[\\udffb-\\udfff]",l="(?:"+s+"|"+u+")",f="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",d=l+"?",g="["+i+"]?",p="(?:"+c+"(?:"+[f,h,v].join("|")+")"+g+d+")*",y=g+d+p,b="(?:"+[f+s+"?",s,h,v,o].join("|")+")",m=RegExp(u+"(?="+u+")|"+b+y,"g");function E(T){for(var L=m.lastIndex=0;m.test(T);)++L;return L}return Yf=E,Yf}var Hf,K0;function dM(){if(K0)return Hf;K0=1;var t=hM(),e=cM(),r=vM();function a(n){return e(n)?r(n):t(n)}return Hf=a,Hf}var Xf,Z0;function gM(){if(Z0)return Xf;Z0=1;var t=td(),e=_a(),r=gr(),a=fM(),n=dM(),i="[object Map]",o="[object Set]";function s(u){if(u==null)return 0;if(r(u))return a(u)?n(u):u.length;var l=e(u);return l==i||l==o?u.size:t(u).length}return Xf=s,Xf}var Wf,Q0;function pM(){if(Q0)return Wf;Q0=1;var t=Jv(),e=wT(),r=sd(),a=pr(),n=eo(),i=ct(),o=Fa(),s=Ln(),u=Yt(),l=Dn();function f(h,v,c){var d=i(h),g=d||o(h)||l(h);if(v=a(v,4),c==null){var p=h&&h.constructor;g?c=d?new p:[]:u(h)?c=s(p)?e(n(h)):{}:c={}}return(g?t:r)(h,function(y,b,m){return v(c,y,b,m)}),c}return Wf=f,Wf}var $f,J0;function yM(){if(J0)return $f;J0=1;var t=Pa(),e=Sn(),r=ct(),a=t?t.isConcatSpreadable:void 0;function n(i){return r(i)||e(i)||!!(a&&i&&i[a])}return $f=n,$f}var Kf,j0;function fd(){if(j0)return Kf;j0=1;var t=ad(),e=yM();function r(a,n,i,o,s){var u=-1,l=a.length;for(i||(i=e),s||(s=[]);++u<l;){var f=a[u];n>0&&i(f)?n>1?r(f,n-1,i,o,s):t(s,f):o||(s[s.length]=f)}return s}return Kf=r,Kf}var Zf,eb;function mM(){if(eb)return Zf;eb=1;function t(e,r,a){switch(a.length){case 0:return e.call(r);case 1:return e.call(r,a[0]);case 2:return e.call(r,a[0],a[1]);case 3:return e.call(r,a[0],a[1],a[2])}return e.apply(r,a)}return Zf=t,Zf}var Qf,tb;function VT(){if(tb)return Qf;tb=1;var t=mM(),e=Math.max;function r(a,n,i){return n=e(n===void 0?a.length-1:n,0),function(){for(var o=arguments,s=-1,u=e(o.length-n,0),l=Array(u);++s<u;)l[s]=o[n+s];s=-1;for(var f=Array(n+1);++s<n;)f[s]=o[s];return f[n]=i(l),t(a,this,f)}}return Qf=r,Qf}var Jf,rb;function bM(){if(rb)return Jf;rb=1;var t=id(),e=uT(),r=na(),a=e?function(n,i){return e(n,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:r;return Jf=a,Jf}var jf,ab;function EM(){if(ab)return jf;ab=1;var t=800,e=16,r=Date.now;function a(n){var i=0,o=0;return function(){var s=r(),u=e-(s-o);if(o=s,u>0){if(++i>=t)return arguments[0]}else i=0;return n.apply(void 0,arguments)}}return jf=a,jf}var eh,nb;function YT(){if(nb)return eh;nb=1;var t=bM(),e=EM(),r=e(t);return eh=r,eh}var th,ib;function io(){if(ib)return th;ib=1;var t=na(),e=VT(),r=YT();function a(n,i){return r(e(n,i,t),n+"")}return th=a,th}var rh,ob;function HT(){if(ob)return rh;ob=1;function t(e,r,a,n){for(var i=e.length,o=a+(n?1:-1);n?o--:++o<i;)if(r(e[o],o,e))return o;return-1}return rh=t,rh}var ah,sb;function wM(){if(sb)return ah;sb=1;function t(e){return e!==e}return ah=t,ah}var nh,ub;function TM(){if(ub)return nh;ub=1;function t(e,r,a){for(var n=a-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}return nh=t,nh}var ih,lb;function xM(){if(lb)return ih;lb=1;var t=HT(),e=wM(),r=TM();function a(n,i,o){return i===i?r(n,i,o):t(n,e,o)}return ih=a,ih}var oh,fb;function CM(){if(fb)return oh;fb=1;var t=xM();function e(r,a){var n=r==null?0:r.length;return!!n&&t(r,a,0)>-1}return oh=e,oh}var sh,hb;function AM(){if(hb)return sh;hb=1;function t(e,r,a){for(var n=-1,i=e==null?0:e.length;++n<i;)if(a(r,e[n]))return!0;return!1}return sh=t,sh}var uh,cb;function LM(){if(cb)return uh;cb=1;function t(){}return uh=t,uh}var lh,vb;function RM(){if(vb)return lh;vb=1;var t=mT(),e=LM(),r=ud(),a=1/0,n=t&&1/r(new t([,-0]))[1]==a?function(i){return new t(i)}:e;return lh=n,lh}var fh,db;function SM(){if(db)return fh;db=1;var t=RT(),e=CM(),r=AM(),a=ST(),n=RM(),i=ud(),o=200;function s(u,l,f){var h=-1,v=e,c=u.length,d=!0,g=[],p=g;if(f)d=!1,v=r;else if(c>=o){var y=l?null:n(u);if(y)return i(y);d=!1,v=a,p=new t}else p=l?[]:g;e:for(;++h<c;){var b=u[h],m=l?l(b):b;if(b=f||b!==0?b:0,d&&m===m){for(var E=p.length;E--;)if(p[E]===m)continue e;l&&p.push(m),g.push(b)}else v(p,m,f)||(p!==g&&p.push(m),g.push(b))}return g}return fh=s,fh}var hh,gb;function XT(){if(gb)return hh;gb=1;var t=gr(),e=or();function r(a){return e(a)&&t(a)}return hh=r,hh}var ch,pb;function DM(){if(pb)return ch;pb=1;var t=fd(),e=io(),r=SM(),a=XT(),n=e(function(i){return r(t(i,1,a,!0))});return ch=n,ch}var vh,yb;function NM(){if(yb)return vh;yb=1;var t=ro();function e(r,a){return t(a,function(n){return r[n]})}return vh=e,vh}var dh,mb;function WT(){if(mb)return dh;mb=1;var t=NM(),e=kr();function r(a){return a==null?[]:t(a,e(a))}return dh=r,dh}var gh,bb;function Ht(){if(bb)return gh;bb=1;var t;if(typeof Kv=="function")try{t={clone:BN(),constant:id(),each:LT(),filter:BT(),has:kT(),isArray:ct(),isEmpty:sM(),isFunction:Ln(),isUndefined:qT(),keys:kr(),map:UT(),reduce:zT(),size:gM(),transform:pM(),union:DM(),values:WT()}}catch{}return t||(t=window._),gh=t,gh}var ph,Eb;function hd(){if(Eb)return ph;Eb=1;var t=Ht();ph=n;var e="\0",r="\0",a="";function n(f){this._isDirected=t.has(f,"directed")?f.directed:!0,this._isMultigraph=t.has(f,"multigraph")?f.multigraph:!1,this._isCompound=t.has(f,"compound")?f.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[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(f){return this._label=f,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(f){return t.isFunction(f)||(f=t.constant(f)),this._defaultNodeLabelFn=f,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return t.keys(this._nodes)},n.prototype.sources=function(){var f=this;return t.filter(this.nodes(),function(h){return t.isEmpty(f._in[h])})},n.prototype.sinks=function(){var f=this;return t.filter(this.nodes(),function(h){return t.isEmpty(f._out[h])})},n.prototype.setNodes=function(f,h){var v=arguments,c=this;return t.each(f,function(d){v.length>1?c.setNode(d,h):c.setNode(d)}),this},n.prototype.setNode=function(f,h){return t.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=h),this):(this._nodes[f]=arguments.length>1?h:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=r,this._children[f]={},this._children[r][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},n.prototype.node=function(f){return this._nodes[f]},n.prototype.hasNode=function(f){return t.has(this._nodes,f)},n.prototype.removeNode=function(f){var h=this;if(t.has(this._nodes,f)){var v=function(c){h.removeEdge(h._edgeObjs[c])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],t.each(this.children(f),function(c){h.setParent(c)}),delete this._children[f]),t.each(t.keys(this._in[f]),v),delete this._in[f],delete this._preds[f],t.each(t.keys(this._out[f]),v),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},n.prototype.setParent=function(f,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t.isUndefined(h))h=r;else{h+="";for(var v=h;!t.isUndefined(v);v=this.parent(v))if(v===f)throw new Error("Setting "+h+" as parent of "+f+" would create a cycle");this.setNode(h)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=h,this._children[h][f]=!0,this},n.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},n.prototype.parent=function(f){if(this._isCompound){var h=this._parent[f];if(h!==r)return h}},n.prototype.children=function(f){if(t.isUndefined(f)&&(f=r),this._isCompound){var h=this._children[f];if(h)return t.keys(h)}else{if(f===r)return this.nodes();if(this.hasNode(f))return[]}},n.prototype.predecessors=function(f){var h=this._preds[f];if(h)return t.keys(h)},n.prototype.successors=function(f){var h=this._sucs[f];if(h)return t.keys(h)},n.prototype.neighbors=function(f){var h=this.predecessors(f);if(h)return t.union(h,this.successors(f))},n.prototype.isLeaf=function(f){var h;return this.isDirected()?h=this.successors(f):h=this.neighbors(f),h.length===0},n.prototype.filterNodes=function(f){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var v=this;t.each(this._nodes,function(g,p){f(p)&&h.setNode(p,g)}),t.each(this._edgeObjs,function(g){h.hasNode(g.v)&&h.hasNode(g.w)&&h.setEdge(g,v.edge(g))});var c={};function d(g){var p=v.parent(g);return p===void 0||h.hasNode(p)?(c[g]=p,p):p in c?c[p]:d(p)}return this._isCompound&&t.each(h.nodes(),function(g){h.setParent(g,d(g))}),h},n.prototype.setDefaultEdgeLabel=function(f){return t.isFunction(f)||(f=t.constant(f)),this._defaultEdgeLabelFn=f,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return t.values(this._edgeObjs)},n.prototype.setPath=function(f,h){var v=this,c=arguments;return t.reduce(f,function(d,g){return c.length>1?v.setEdge(d,g,h):v.setEdge(d,g),g}),this},n.prototype.setEdge=function(){var f,h,v,c,d=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(f=g.v,h=g.w,v=g.name,arguments.length===2&&(c=arguments[1],d=!0)):(f=g,h=arguments[1],v=arguments[3],arguments.length>2&&(c=arguments[2],d=!0)),f=""+f,h=""+h,t.isUndefined(v)||(v=""+v);var p=s(this._isDirected,f,h,v);if(t.has(this._edgeLabels,p))return d&&(this._edgeLabels[p]=c),this;if(!t.isUndefined(v)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(h),this._edgeLabels[p]=d?c:this._defaultEdgeLabelFn(f,h,v);var y=u(this._isDirected,f,h,v);return f=y.v,h=y.w,Object.freeze(y),this._edgeObjs[p]=y,i(this._preds[h],f),i(this._sucs[f],h),this._in[h][p]=y,this._out[f][p]=y,this._edgeCount++,this},n.prototype.edge=function(f,h,v){var c=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,f,h,v);return this._edgeLabels[c]},n.prototype.hasEdge=function(f,h,v){var c=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,f,h,v);return t.has(this._edgeLabels,c)},n.prototype.removeEdge=function(f,h,v){var c=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,f,h,v),d=this._edgeObjs[c];return d&&(f=d.v,h=d.w,delete this._edgeLabels[c],delete this._edgeObjs[c],o(this._preds[h],f),o(this._sucs[f],h),delete this._in[h][c],delete this._out[f][c],this._edgeCount--),this},n.prototype.inEdges=function(f,h){var v=this._in[f];if(v){var c=t.values(v);return h?t.filter(c,function(d){return d.v===h}):c}},n.prototype.outEdges=function(f,h){var v=this._out[f];if(v){var c=t.values(v);return h?t.filter(c,function(d){return d.w===h}):c}},n.prototype.nodeEdges=function(f,h){var v=this.inEdges(f,h);if(v)return v.concat(this.outEdges(f,h))};function i(f,h){f[h]?f[h]++:f[h]=1}function o(f,h){--f[h]||delete f[h]}function s(f,h,v,c){var d=""+h,g=""+v;if(!f&&d>g){var p=d;d=g,g=p}return d+a+g+a+(t.isUndefined(c)?e:c)}function u(f,h,v,c){var d=""+h,g=""+v;if(!f&&d>g){var p=d;d=g,g=p}var y={v:d,w:g};return c&&(y.name=c),y}function l(f,h){return s(f,h.v,h.w,h.name)}return ph}var yh,wb;function MM(){return wb||(wb=1,yh="2.1.8"),yh}var mh,Tb;function OM(){return Tb||(Tb=1,mh={Graph:hd(),version:MM()}),mh}var bh,xb;function IM(){if(xb)return bh;xb=1;var t=Ht(),e=hd();bh={write:r,read:i};function r(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:a(o),edges:n(o)};return t.isUndefined(o.graph())||(s.value=t.clone(o.graph())),s}function a(o){return t.map(o.nodes(),function(s){var u=o.node(s),l=o.parent(s),f={v:s};return t.isUndefined(u)||(f.value=u),t.isUndefined(l)||(f.parent=l),f})}function n(o){return t.map(o.edges(),function(s){var u=o.edge(s),l={v:s.v,w:s.w};return t.isUndefined(s.name)||(l.name=s.name),t.isUndefined(u)||(l.value=u),l})}function i(o){var s=new e(o.options).setGraph(o.value);return t.each(o.nodes,function(u){s.setNode(u.v,u.value),u.parent&&s.setParent(u.v,u.parent)}),t.each(o.edges,function(u){s.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),s}return bh}var Eh,Cb;function PM(){if(Cb)return Eh;Cb=1;var t=Ht();Eh=e;function e(r){var a={},n=[],i;function o(s){t.has(a,s)||(a[s]=!0,i.push(s),t.each(r.successors(s),o),t.each(r.predecessors(s),o))}return t.each(r.nodes(),function(s){i=[],o(s),i.length&&n.push(i)}),n}return Eh}var wh,Ab;function $T(){if(Ab)return wh;Ab=1;var t=Ht();wh=e;function e(){this._arr=[],this._keyIndices={}}return e.prototype.size=function(){return this._arr.length},e.prototype.keys=function(){return this._arr.map(function(r){return r.key})},e.prototype.has=function(r){return t.has(this._keyIndices,r)},e.prototype.priority=function(r){var a=this._keyIndices[r];if(a!==void 0)return this._arr[a].priority},e.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},e.prototype.add=function(r,a){var n=this._keyIndices;if(r=String(r),!t.has(n,r)){var i=this._arr,o=i.length;return n[r]=o,i.push({key:r,priority:a}),this._decrease(o),!0}return!1},e.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},e.prototype.decrease=function(r,a){var n=this._keyIndices[r];if(a>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[n].priority+" New: "+a);this._arr[n].priority=a,this._decrease(n)},e.prototype._heapify=function(r){var a=this._arr,n=2*r,i=n+1,o=r;n<a.length&&(o=a[n].priority<a[o].priority?n:o,i<a.length&&(o=a[i].priority<a[o].priority?i:o),o!==r&&(this._swap(r,o),this._heapify(o)))},e.prototype._decrease=function(r){for(var a=this._arr,n=a[r].priority,i;r!==0&&(i=r>>1,!(a[i].priority<n));)this._swap(r,i),r=i},e.prototype._swap=function(r,a){var n=this._arr,i=this._keyIndices,o=n[r],s=n[a];n[r]=s,n[a]=o,i[s.key]=r,i[o.key]=a},wh}var Th,Lb;function KT(){if(Lb)return Th;Lb=1;var t=Ht(),e=$T();Th=a;var r=t.constant(1);function a(i,o,s,u){return n(i,String(o),s||r,u||function(l){return i.outEdges(l)})}function n(i,o,s,u){var l={},f=new e,h,v,c=function(d){var g=d.v!==h?d.v:d.w,p=l[g],y=s(d),b=v.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+d+" Weight: "+y);b<p.distance&&(p.distance=b,p.predecessor=h,f.decrease(g,b))};for(i.nodes().forEach(function(d){var g=d===o?0:Number.POSITIVE_INFINITY;l[d]={distance:g},f.add(d,g)});f.size()>0&&(h=f.removeMin(),v=l[h],v.distance!==Number.POSITIVE_INFINITY);)u(h).forEach(c);return l}return Th}var xh,Rb;function FM(){if(Rb)return xh;Rb=1;var t=KT(),e=Ht();xh=r;function r(a,n,i){return e.transform(a.nodes(),function(o,s){o[s]=t(a,s,n,i)},{})}return xh}var Ch,Sb;function ZT(){if(Sb)return Ch;Sb=1;var t=Ht();Ch=e;function e(r){var a=0,n=[],i={},o=[];function s(u){var l=i[u]={onStack:!0,lowlink:a,index:a++};if(n.push(u),r.successors(u).forEach(function(v){t.has(i,v)?i[v].onStack&&(l.lowlink=Math.min(l.lowlink,i[v].index)):(s(v),l.lowlink=Math.min(l.lowlink,i[v].lowlink))}),l.lowlink===l.index){var f=[],h;do h=n.pop(),i[h].onStack=!1,f.push(h);while(u!==h);o.push(f)}}return r.nodes().forEach(function(u){t.has(i,u)||s(u)}),o}return Ch}var Ah,Db;function _M(){if(Db)return Ah;Db=1;var t=Ht(),e=ZT();Ah=r;function r(a){return t.filter(e(a),function(n){return n.length>1||n.length===1&&a.hasEdge(n[0],n[0])})}return Ah}var Lh,Nb;function BM(){if(Nb)return Lh;Nb=1;var t=Ht();Lh=r;var e=t.constant(1);function r(n,i,o){return a(n,i||e,o||function(s){return n.outEdges(s)})}function a(n,i,o){var s={},u=n.nodes();return u.forEach(function(l){s[l]={},s[l][l]={distance:0},u.forEach(function(f){l!==f&&(s[l][f]={distance:Number.POSITIVE_INFINITY})}),o(l).forEach(function(f){var h=f.v===l?f.w:f.v,v=i(f);s[l][h]={distance:v,predecessor:l}})}),u.forEach(function(l){var f=s[l];u.forEach(function(h){var v=s[h];u.forEach(function(c){var d=v[l],g=f[c],p=v[c],y=d.distance+g.distance;y<p.distance&&(p.distance=y,p.predecessor=g.predecessor)})})}),s}return Lh}var Rh,Mb;function QT(){if(Mb)return Rh;Mb=1;var t=Ht();Rh=e,e.CycleException=r;function e(a){var n={},i={},o=[];function s(u){if(t.has(i,u))throw new r;t.has(n,u)||(i[u]=!0,n[u]=!0,t.each(a.predecessors(u),s),delete i[u],o.push(u))}if(t.each(a.sinks(),s),t.size(n)!==a.nodeCount())throw new r;return o}function r(){}return r.prototype=new Error,Rh}var Sh,Ob;function kM(){if(Ob)return Sh;Ob=1;var t=QT();Sh=e;function e(r){try{t(r)}catch(a){if(a instanceof t.CycleException)return!1;throw a}return!0}return Sh}var Dh,Ib;function JT(){if(Ib)return Dh;Ib=1;var t=Ht();Dh=e;function e(a,n,i){t.isArray(n)||(n=[n]);var o=(a.isDirected()?a.successors:a.neighbors).bind(a),s=[],u={};return t.each(n,function(l){if(!a.hasNode(l))throw new Error("Graph does not have node: "+l);r(a,l,i==="post",u,o,s)}),s}function r(a,n,i,o,s,u){t.has(o,n)||(o[n]=!0,i||u.push(n),t.each(s(n),function(l){r(a,l,i,o,s,u)}),i&&u.push(n))}return Dh}var Nh,Pb;function qM(){if(Pb)return Nh;Pb=1;var t=JT();Nh=e;function e(r,a){return t(r,a,"post")}return Nh}var Mh,Fb;function GM(){if(Fb)return Mh;Fb=1;var t=JT();Mh=e;function e(r,a){return t(r,a,"pre")}return Mh}var Oh,_b;function UM(){if(_b)return Oh;_b=1;var t=Ht(),e=hd(),r=$T();Oh=a;function a(n,i){var o=new e,s={},u=new r,l;function f(v){var c=v.v===l?v.w:v.v,d=u.priority(c);if(d!==void 0){var g=i(v);g<d&&(s[c]=l,u.decrease(c,g))}}if(n.nodeCount()===0)return o;t.each(n.nodes(),function(v){u.add(v,Number.POSITIVE_INFINITY),o.setNode(v)}),u.decrease(n.nodes()[0],0);for(var h=!1;u.size()>0;){if(l=u.removeMin(),t.has(s,l))o.setEdge(l,s[l]);else{if(h)throw new Error("Input graph is not connected: "+n);h=!0}n.nodeEdges(l).forEach(f)}return o}return Oh}var Ih,Bb;function zM(){return Bb||(Bb=1,Ih={components:PM(),dijkstra:KT(),dijkstraAll:FM(),findCycles:_M(),floydWarshall:BM(),isAcyclic:kM(),postorder:qM(),preorder:GM(),prim:UM(),tarjan:ZT(),topsort:QT()}),Ih}var Ph,kb;function VM(){if(kb)return Ph;kb=1;var t=OM();return Ph={Graph:t.Graph,json:IM(),alg:zM(),version:t.version},Ph}var Fh,qb;function Qt(){if(qb)return Fh;qb=1;var t;if(typeof Kv=="function")try{t=VM()}catch{}return t||(t=window.graphlib),Fh=t,Fh}var _h,Gb;function YM(){if(Gb)return _h;Gb=1;var t=xT(),e=1,r=4;function a(n){return t(n,e|r)}return _h=a,_h}var Bh,Ub;function oo(){if(Ub)return Bh;Ub=1;var t=Ia(),e=gr(),r=Qi(),a=Yt();function n(i,o,s){if(!a(s))return!1;var u=typeof o;return(u=="number"?e(s)&&r(o,s.length):u=="string"&&o in s)?t(s[o],i):!1}return Bh=n,Bh}var kh,zb;function HM(){if(zb)return kh;zb=1;var t=io(),e=Ia(),r=oo(),a=aa(),n=Object.prototype,i=n.hasOwnProperty,o=t(function(s,u){s=Object(s);var l=-1,f=u.length,h=f>2?u[2]:void 0;for(h&&r(u[0],u[1],h)&&(f=1);++l<f;)for(var v=u[l],c=a(v),d=-1,g=c.length;++d<g;){var p=c[d],y=s[p];(y===void 0||e(y,n[p])&&!i.call(s,p))&&(s[p]=v[p])}return s});return kh=o,kh}var qh,Vb;function XM(){if(Vb)return qh;Vb=1;var t=pr(),e=gr(),r=kr();function a(n){return function(i,o,s){var u=Object(i);if(!e(i)){var l=t(o,3);i=r(i),o=function(h){return l(u[h],h,u)}}var f=n(i,o,s);return f>-1?u[l?i[f]:f]:void 0}}return qh=a,qh}var Gh,Yb;function WM(){if(Yb)return Gh;Yb=1;var t=/\s/;function e(r){for(var a=r.length;a--&&t.test(r.charAt(a)););return a}return Gh=e,Gh}var Uh,Hb;function $M(){if(Hb)return Uh;Hb=1;var t=WM(),e=/^\s+/;function r(a){return a&&a.slice(0,t(a)+1).replace(e,"")}return Uh=r,Uh}var zh,Xb;function KM(){if(Xb)return zh;Xb=1;var t=$M(),e=Yt(),r=Ba(),a=NaN,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(l){if(typeof l=="number")return l;if(r(l))return a;if(e(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=e(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=t(l);var h=i.test(l);return h||o.test(l)?s(l.slice(2),h?2:8):n.test(l)?a:+l}return zh=u,zh}var Vh,Wb;function jT(){if(Wb)return Vh;Wb=1;var t=KM(),e=1/0,r=17976931348623157e292;function a(n){if(!n)return n===0?n:0;if(n=t(n),n===e||n===-e){var i=n<0?-1:1;return i*r}return n===n?n:0}return Vh=a,Vh}var Yh,$b;function ZM(){if($b)return Yh;$b=1;var t=jT();function e(r){var a=t(r),n=a%1;return a===a?n?a-n:a:0}return Yh=e,Yh}var Hh,Kb;function QM(){if(Kb)return Hh;Kb=1;var t=HT(),e=pr(),r=ZM(),a=Math.max;function n(i,o,s){var u=i==null?0:i.length;if(!u)return-1;var l=s==null?0:r(s);return l<0&&(l=a(u+l,0)),t(i,e(o,3),l)}return Hh=n,Hh}var Xh,Zb;function JM(){if(Zb)return Xh;Zb=1;var t=XM(),e=QM(),r=t(e);return Xh=r,Xh}var Wh,Qb;function ex(){if(Qb)return Wh;Qb=1;var t=fd();function e(r){var a=r==null?0:r.length;return a?t(r,1):[]}return Wh=e,Wh}var $h,Jb;function jM(){if(Jb)return $h;Jb=1;var t=od(),e=CT(),r=aa();function a(n,i){return n==null?n:t(n,e(i),r)}return $h=a,$h}var Kh,jb;function eO(){if(jb)return Kh;jb=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return Kh=t,Kh}var Zh,e1;function tO(){if(e1)return Zh;e1=1;var t=Ki(),e=sd(),r=pr();function a(n,i){var o={};return i=r(i,3),e(n,function(s,u,l){t(o,u,i(s,u,l))}),o}return Zh=a,Zh}var Qh,t1;function cd(){if(t1)return Qh;t1=1;var t=Ba();function e(r,a,n){for(var i=-1,o=r.length;++i<o;){var s=r[i],u=a(s);if(u!=null&&(l===void 0?u===u&&!t(u):n(u,l)))var l=u,f=s}return f}return Qh=e,Qh}var Jh,r1;function rO(){if(r1)return Jh;r1=1;function t(e,r){return e>r}return Jh=t,Jh}var jh,a1;function aO(){if(a1)return jh;a1=1;var t=cd(),e=rO(),r=na();function a(n){return n&&n.length?t(n,r,e):void 0}return jh=a,jh}var ec,n1;function tx(){if(n1)return ec;n1=1;var t=Ki(),e=Ia();function r(a,n,i){(i!==void 0&&!e(a[n],i)||i===void 0&&!(n in a))&&t(a,n,i)}return ec=r,ec}var tc,i1;function nO(){if(i1)return tc;i1=1;var t=ta(),e=eo(),r=or(),a="[object Object]",n=Function.prototype,i=Object.prototype,o=n.toString,s=i.hasOwnProperty,u=o.call(Object);function l(f){if(!r(f)||t(f)!=a)return!1;var h=e(f);if(h===null)return!0;var v=s.call(h,"constructor")&&h.constructor;return typeof v=="function"&&v instanceof v&&o.call(v)==u}return tc=l,tc}var rc,o1;function rx(){if(o1)return rc;o1=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return rc=t,rc}var ac,s1;function iO(){if(s1)return ac;s1=1;var t=Rn(),e=aa();function r(a){return t(a,e(a))}return ac=r,ac}var nc,u1;function oO(){if(u1)return nc;u1=1;var t=tx(),e=hT(),r=ET(),a=cT(),n=TT(),i=Sn(),o=ct(),s=XT(),u=Fa(),l=Ln(),f=Yt(),h=nO(),v=Dn(),c=rx(),d=iO();function g(p,y,b,m,E,T,L){var w=c(p,b),C=c(y,b),A=L.get(C);if(A){t(p,b,A);return}var R=T?T(w,C,b+"",p,y,L):void 0,S=R===void 0;if(S){var D=o(C),P=!D&&u(C),x=!D&&!P&&v(C);R=C,D||P||x?o(w)?R=w:s(w)?R=a(w):P?(S=!1,R=e(C,!0)):x?(S=!1,R=r(C,!0)):R=[]:h(C)||i(C)?(R=w,i(w)?R=d(w):(!f(w)||l(w))&&(R=n(C))):S=!1}S&&(L.set(C,R),E(R,C,m,T,L),L.delete(C)),t(p,b,R)}return nc=g,nc}var ic,l1;function sO(){if(l1)return ic;l1=1;var t=$i(),e=tx(),r=od(),a=oO(),n=Yt(),i=aa(),o=rx();function s(u,l,f,h,v){u!==l&&r(l,function(c,d){if(v||(v=new t),n(c))a(u,l,d,f,s,h,v);else{var g=h?h(o(u,d),c,d+"",u,l,v):void 0;g===void 0&&(g=c),e(u,d,g)}},i)}return ic=s,ic}var oc,f1;function uO(){if(f1)return oc;f1=1;var t=io(),e=oo();function r(a){return t(function(n,i){var o=-1,s=i.length,u=s>1?i[s-1]:void 0,l=s>2?i[2]:void 0;for(u=a.length>3&&typeof u=="function"?(s--,u):void 0,l&&e(i[0],i[1],l)&&(u=s<3?void 0:u,s=1),n=Object(n);++o<s;){var f=i[o];f&&a(n,f,o,u)}return n})}return oc=r,oc}var sc,h1;function lO(){if(h1)return sc;h1=1;var t=sO(),e=uO(),r=e(function(a,n,i){t(a,n,i)});return sc=r,sc}var uc,c1;function ax(){if(c1)return uc;c1=1;function t(e,r){return e<r}return uc=t,uc}var lc,v1;function fO(){if(v1)return lc;v1=1;var t=cd(),e=ax(),r=na();function a(n){return n&&n.length?t(n,r,e):void 0}return lc=a,lc}var fc,d1;function hO(){if(d1)return fc;d1=1;var t=cd(),e=pr(),r=ax();function a(n,i){return n&&n.length?t(n,e(i,2),r):void 0}return fc=a,fc}var hc,g1;function cO(){if(g1)return hc;g1=1;var t=Jt(),e=function(){return t.Date.now()};return hc=e,hc}var cc,p1;function vO(){if(p1)return cc;p1=1;var t=Zi(),e=ao(),r=Qi(),a=Yt(),n=Nn();function i(o,s,u,l){if(!a(o))return o;s=e(s,o);for(var f=-1,h=s.length,v=h-1,c=o;c!=null&&++f<h;){var d=n(s[f]),g=u;if(d==="__proto__"||d==="constructor"||d==="prototype")return o;if(f!=v){var p=c[d];g=l?l(p,d,c):void 0,g===void 0&&(g=a(p)?p:r(s[f+1])?[]:{})}t(c,d,g),c=c[d]}return o}return cc=i,cc}var vc,y1;function dO(){if(y1)return vc;y1=1;var t=no(),e=vO(),r=ao();function a(n,i,o){for(var s=-1,u=i.length,l={};++s<u;){var f=i[s],h=t(n,f);o(h,f)&&e(l,r(f,n),h)}return l}return vc=a,vc}var dc,m1;function gO(){if(m1)return dc;m1=1;var t=dO(),e=FT();function r(a,n){return t(a,n,function(i,o){return e(a,o)})}return dc=r,dc}var gc,b1;function pO(){if(b1)return gc;b1=1;var t=ex(),e=VT(),r=YT();function a(n){return r(e(n,void 0,t),n+"")}return gc=a,gc}var pc,E1;function yO(){if(E1)return pc;E1=1;var t=gO(),e=pO(),r=e(function(a,n){return a==null?{}:t(a,n)});return pc=r,pc}var yc,w1;function mO(){if(w1)return yc;w1=1;var t=Math.ceil,e=Math.max;function r(a,n,i,o){for(var s=-1,u=e(t((n-a)/(i||1)),0),l=Array(u);u--;)l[o?u:++s]=a,a+=i;return l}return yc=r,yc}var mc,T1;function bO(){if(T1)return mc;T1=1;var t=mO(),e=oo(),r=jT();function a(n){return function(i,o,s){return s&&typeof s!="number"&&e(i,o,s)&&(o=s=void 0),i=r(i),o===void 0?(o=i,i=0):o=r(o),s=s===void 0?i<o?1:-1:r(s),t(i,o,s,n)}}return mc=a,mc}var bc,x1;function EO(){if(x1)return bc;x1=1;var t=bO(),e=t();return bc=e,bc}var Ec,C1;function wO(){if(C1)return Ec;C1=1;function t(e,r){var a=e.length;for(e.sort(r);a--;)e[a]=e[a].value;return e}return Ec=t,Ec}var wc,A1;function TO(){if(A1)return wc;A1=1;var t=Ba();function e(r,a){if(r!==a){var n=r!==void 0,i=r===null,o=r===r,s=t(r),u=a!==void 0,l=a===null,f=a===a,h=t(a);if(!l&&!h&&!s&&r>a||s&&u&&f&&!l&&!h||i&&u&&f||!n&&f||!o)return 1;if(!i&&!s&&!h&&r<a||h&&n&&o&&!i&&!s||l&&n&&o||!u&&o||!f)return-1}return 0}return wc=e,wc}var Tc,L1;function xO(){if(L1)return Tc;L1=1;var t=TO();function e(r,a,n){for(var i=-1,o=r.criteria,s=a.criteria,u=o.length,l=n.length;++i<u;){var f=t(o[i],s[i]);if(f){if(i>=l)return f;var h=n[i];return f*(h=="desc"?-1:1)}}return r.index-a.index}return Tc=e,Tc}var xc,R1;function CO(){if(R1)return xc;R1=1;var t=ro(),e=no(),r=pr(),a=GT(),n=wO(),i=Ji(),o=xO(),s=na(),u=ct();function l(f,h,v){h.length?h=t(h,function(g){return u(g)?function(p){return e(p,g.length===1?g[0]:g)}:g}):h=[s];var c=-1;h=t(h,i(r));var d=a(f,function(g,p,y){var b=t(h,function(m){return m(g)});return{criteria:b,index:++c,value:g}});return n(d,function(g,p){return o(g,p,v)})}return xc=l,xc}var Cc,S1;function AO(){if(S1)return Cc;S1=1;var t=fd(),e=CO(),r=io(),a=oo(),n=r(function(i,o){if(i==null)return[];var s=o.length;return s>1&&a(i,o[0],o[1])?o=[]:s>2&&a(o[0],o[1],o[2])&&(o=[o[0]]),e(i,t(o,1),[])});return Cc=n,Cc}var Ac,D1;function LO(){if(D1)return Ac;D1=1;var t=IT(),e=0;function r(a){var n=++e;return t(a)+n}return Ac=r,Ac}var Lc,N1;function RO(){if(N1)return Lc;N1=1;function t(e,r,a){for(var n=-1,i=e.length,o=r.length,s={};++n<i;){var u=n<o?r[n]:void 0;a(s,e[n],u)}return s}return Lc=t,Lc}var Rc,M1;function SO(){if(M1)return Rc;M1=1;var t=Zi(),e=RO();function r(a,n){return e(a||[],n||[],t)}return Rc=r,Rc}var Sc,O1;function it(){if(O1)return Sc;O1=1;var t;if(typeof Kv=="function")try{t={cloneDeep:YM(),constant:id(),defaults:HM(),each:LT(),filter:BT(),find:JM(),flatten:ex(),forEach:AT(),forIn:jM(),has:kT(),isUndefined:qT(),last:eO(),map:UT(),mapValues:tO(),max:aO(),merge:lO(),min:fO(),minBy:hO(),now:cO(),pick:yO(),range:EO(),reduce:zT(),sortBy:AO(),uniqueId:LO(),values:WT(),zipObject:SO()}}catch{}return t||(t=window._),Sc=t,Sc}var Dc,I1;function DO(){if(I1)return Dc;I1=1,Dc=t;function t(){var a={};a._next=a._prev=a,this._sentinel=a}t.prototype.dequeue=function(){var a=this._sentinel,n=a._prev;if(n!==a)return e(n),n},t.prototype.enqueue=function(a){var n=this._sentinel;a._prev&&a._next&&e(a),a._next=n._next,n._next._prev=a,n._next=a,a._prev=n},t.prototype.toString=function(){for(var a=[],n=this._sentinel,i=n._prev;i!==n;)a.push(JSON.stringify(i,r)),i=i._prev;return"["+a.join(", ")+"]"};function e(a){a._prev._next=a._next,a._next._prev=a._prev,delete a._next,delete a._prev}function r(a,n){if(a!=="_next"&&a!=="_prev")return n}return Dc}var Nc,P1;function NO(){if(P1)return Nc;P1=1;var t=it(),e=Qt().Graph,r=DO();Nc=n;var a=t.constant(1);function n(l,f){if(l.nodeCount()<=1)return[];var h=s(l,f||a),v=i(h.graph,h.buckets,h.zeroIdx);return t.flatten(t.map(v,function(c){return l.outEdges(c.v,c.w)}),!0)}function i(l,f,h){for(var v=[],c=f[f.length-1],d=f[0],g;l.nodeCount();){for(;g=d.dequeue();)o(l,f,h,g);for(;g=c.dequeue();)o(l,f,h,g);if(l.nodeCount()){for(var p=f.length-2;p>0;--p)if(g=f[p].dequeue(),g){v=v.concat(o(l,f,h,g,!0));break}}}return v}function o(l,f,h,v,c){var d=c?[]:void 0;return t.forEach(l.inEdges(v.v),function(g){var p=l.edge(g),y=l.node(g.v);c&&d.push({v:g.v,w:g.w}),y.out-=p,u(f,h,y)}),t.forEach(l.outEdges(v.v),function(g){var p=l.edge(g),y=g.w,b=l.node(y);b.in-=p,u(f,h,b)}),l.removeNode(v.v),d}function s(l,f){var h=new e,v=0,c=0;t.forEach(l.nodes(),function(p){h.setNode(p,{v:p,in:0,out:0})}),t.forEach(l.edges(),function(p){var y=h.edge(p.v,p.w)||0,b=f(p),m=y+b;h.setEdge(p.v,p.w,m),c=Math.max(c,h.node(p.v).out+=b),v=Math.max(v,h.node(p.w).in+=b)});var d=t.range(c+v+3).map(function(){return new r}),g=v+1;return t.forEach(h.nodes(),function(p){u(d,g,h.node(p))}),{graph:h,buckets:d,zeroIdx:g}}function u(l,f,h){h.out?h.in?l[h.out-h.in+f].enqueue(h):l[l.length-1].enqueue(h):l[0].enqueue(h)}return Nc}var Mc,F1;function MO(){if(F1)return Mc;F1=1;var t=it(),e=NO();Mc={run:r,undo:n};function r(i){var o=i.graph().acyclicer==="greedy"?e(i,s(i)):a(i);t.forEach(o,function(u){var l=i.edge(u);i.removeEdge(u),l.forwardName=u.name,l.reversed=!0,i.setEdge(u.w,u.v,l,t.uniqueId("rev"))});function s(u){return function(l){return u.edge(l).weight}}}function a(i){var o=[],s={},u={};function l(f){t.has(u,f)||(u[f]=!0,s[f]=!0,t.forEach(i.outEdges(f),function(h){t.has(s,h.w)?o.push(h):l(h.w)}),delete s[f])}return t.forEach(i.nodes(),l),o}function n(i){t.forEach(i.edges(),function(o){var s=i.edge(o);if(s.reversed){i.removeEdge(o);var u=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(o.w,o.v,s,u)}})}return Mc}var Oc,_1;function kt(){if(_1)return Oc;_1=1;var t=it(),e=Qt().Graph;Oc={addDummyNode:r,simplify:a,asNonCompoundGraph:n,successorWeights:i,predecessorWeights:o,intersectRect:s,buildLayerMatrix:u,normalizeRanks:l,removeEmptyRanks:f,addBorderNode:h,maxRank:v,partition:c,time:d,notime:g};function r(p,y,b,m){var E;do E=t.uniqueId(m);while(p.hasNode(E));return b.dummy=y,p.setNode(E,b),E}function a(p){var y=new e().setGraph(p.graph());return t.forEach(p.nodes(),function(b){y.setNode(b,p.node(b))}),t.forEach(p.edges(),function(b){var m=y.edge(b.v,b.w)||{weight:0,minlen:1},E=p.edge(b);y.setEdge(b.v,b.w,{weight:m.weight+E.weight,minlen:Math.max(m.minlen,E.minlen)})}),y}function n(p){var y=new e({multigraph:p.isMultigraph()}).setGraph(p.graph());return t.forEach(p.nodes(),function(b){p.children(b).length||y.setNode(b,p.node(b))}),t.forEach(p.edges(),function(b){y.setEdge(b,p.edge(b))}),y}function i(p){var y=t.map(p.nodes(),function(b){var m={};return t.forEach(p.outEdges(b),function(E){m[E.w]=(m[E.w]||0)+p.edge(E).weight}),m});return t.zipObject(p.nodes(),y)}function o(p){var y=t.map(p.nodes(),function(b){var m={};return t.forEach(p.inEdges(b),function(E){m[E.v]=(m[E.v]||0)+p.edge(E).weight}),m});return t.zipObject(p.nodes(),y)}function s(p,y){var b=p.x,m=p.y,E=y.x-b,T=y.y-m,L=p.width/2,w=p.height/2;if(!E&&!T)throw new Error("Not possible to find intersection inside of the rectangle");var C,A;return Math.abs(T)*L>Math.abs(E)*w?(T<0&&(w=-w),C=w*E/T,A=w):(E<0&&(L=-L),C=L,A=L*T/E),{x:b+C,y:m+A}}function u(p){var y=t.map(t.range(v(p)+1),function(){return[]});return t.forEach(p.nodes(),function(b){var m=p.node(b),E=m.rank;t.isUndefined(E)||(y[E][m.order]=b)}),y}function l(p){var y=t.min(t.map(p.nodes(),function(b){return p.node(b).rank}));t.forEach(p.nodes(),function(b){var m=p.node(b);t.has(m,"rank")&&(m.rank-=y)})}function f(p){var y=t.min(t.map(p.nodes(),function(T){return p.node(T).rank})),b=[];t.forEach(p.nodes(),function(T){var L=p.node(T).rank-y;b[L]||(b[L]=[]),b[L].push(T)});var m=0,E=p.graph().nodeRankFactor;t.forEach(b,function(T,L){t.isUndefined(T)&&L%E!==0?--m:m&&t.forEach(T,function(w){p.node(w).rank+=m})})}function h(p,y,b,m){var E={width:0,height:0};return arguments.length>=4&&(E.rank=b,E.order=m),r(p,"border",E,y)}function v(p){return t.max(t.map(p.nodes(),function(y){var b=p.node(y).rank;if(!t.isUndefined(b))return b}))}function c(p,y){var b={lhs:[],rhs:[]};return t.forEach(p,function(m){y(m)?b.lhs.push(m):b.rhs.push(m)}),b}function d(p,y){var b=t.now();try{return y()}finally{console.log(p+" time: "+(t.now()-b)+"ms")}}function g(p,y){return y()}return Oc}var Ic,B1;function OO(){if(B1)return Ic;B1=1;var t=it(),e=kt();Ic={run:r,undo:n};function r(i){i.graph().dummyChains=[],t.forEach(i.edges(),function(o){a(i,o)})}function a(i,o){var s=o.v,u=i.node(s).rank,l=o.w,f=i.node(l).rank,h=o.name,v=i.edge(o),c=v.labelRank;if(f!==u+1){i.removeEdge(o);var d,g,p;for(p=0,++u;u<f;++p,++u)v.points=[],g={width:0,height:0,edgeLabel:v,edgeObj:o,rank:u},d=e.addDummyNode(i,"edge",g,"_d"),u===c&&(g.width=v.width,g.height=v.height,g.dummy="edge-label",g.labelpos=v.labelpos),i.setEdge(s,d,{weight:v.weight},h),p===0&&i.graph().dummyChains.push(d),s=d;i.setEdge(s,l,{weight:v.weight},h)}}function n(i){t.forEach(i.graph().dummyChains,function(o){var s=i.node(o),u=s.edgeLabel,l;for(i.setEdge(s.edgeObj,u);s.dummy;)l=i.successors(o)[0],i.removeNode(o),u.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(u.x=s.x,u.y=s.y,u.width=s.width,u.height=s.height),o=l,s=i.node(o)})}return Ic}var Pc,k1;function Ai(){if(k1)return Pc;k1=1;var t=it();Pc={longestPath:e,slack:r};function e(a){var n={};function i(o){var s=a.node(o);if(t.has(n,o))return s.rank;n[o]=!0;var u=t.min(t.map(a.outEdges(o),function(l){return i(l.w)-a.edge(l).minlen}));return(u===Number.POSITIVE_INFINITY||u===void 0||u===null)&&(u=0),s.rank=u}t.forEach(a.sources(),i)}function r(a,n){return a.node(n.w).rank-a.node(n.v).rank-a.edge(n).minlen}return Pc}var Fc,q1;function nx(){if(q1)return Fc;q1=1;var t=it(),e=Qt().Graph,r=Ai().slack;Fc=a;function a(s){var u=new e({directed:!1}),l=s.nodes()[0],f=s.nodeCount();u.setNode(l,{});for(var h,v;n(u,s)<f;)h=i(u,s),v=u.hasNode(h.v)?r(s,h):-r(s,h),o(u,s,v);return u}function n(s,u){function l(f){t.forEach(u.nodeEdges(f),function(h){var v=h.v,c=f===v?h.w:v;!s.hasNode(c)&&!r(u,h)&&(s.setNode(c,{}),s.setEdge(f,c,{}),l(c))})}return t.forEach(s.nodes(),l),s.nodeCount()}function i(s,u){return t.minBy(u.edges(),function(l){if(s.hasNode(l.v)!==s.hasNode(l.w))return r(u,l)})}function o(s,u,l){t.forEach(s.nodes(),function(f){u.node(f).rank+=l})}return Fc}var _c,G1;function IO(){if(G1)return _c;G1=1;var t=it(),e=nx(),r=Ai().slack,a=Ai().longestPath,n=Qt().alg.preorder,i=Qt().alg.postorder,o=kt().simplify;_c=s,s.initLowLimValues=h,s.initCutValues=u,s.calcCutValue=f,s.leaveEdge=c,s.enterEdge=d,s.exchangeEdges=g;function s(m){m=o(m),a(m);var E=e(m);h(E),u(E,m);for(var T,L;T=c(E);)L=d(E,m,T),g(E,m,T,L)}function u(m,E){var T=i(m,m.nodes());T=T.slice(0,T.length-1),t.forEach(T,function(L){l(m,E,L)})}function l(m,E,T){var L=m.node(T),w=L.parent;m.edge(T,w).cutvalue=f(m,E,T)}function f(m,E,T){var L=m.node(T),w=L.parent,C=!0,A=E.edge(T,w),R=0;return A||(C=!1,A=E.edge(w,T)),R=A.weight,t.forEach(E.nodeEdges(T),function(S){var D=S.v===T,P=D?S.w:S.v;if(P!==w){var x=D===C,N=E.edge(S).weight;if(R+=x?N:-N,y(m,T,P)){var M=m.edge(T,P).cutvalue;R+=x?-M:M}}}),R}function h(m,E){arguments.length<2&&(E=m.nodes()[0]),v(m,{},1,E)}function v(m,E,T,L,w){var C=T,A=m.node(L);return E[L]=!0,t.forEach(m.neighbors(L),function(R){t.has(E,R)||(T=v(m,E,T,R,L))}),A.low=C,A.lim=T++,w?A.parent=w:delete A.parent,T}function c(m){return t.find(m.edges(),function(E){return m.edge(E).cutvalue<0})}function d(m,E,T){var L=T.v,w=T.w;E.hasEdge(L,w)||(L=T.w,w=T.v);var C=m.node(L),A=m.node(w),R=C,S=!1;C.lim>A.lim&&(R=A,S=!0);var D=t.filter(E.edges(),function(P){return S===b(m,m.node(P.v),R)&&S!==b(m,m.node(P.w),R)});return t.minBy(D,function(P){return r(E,P)})}function g(m,E,T,L){var w=T.v,C=T.w;m.removeEdge(w,C),m.setEdge(L.v,L.w,{}),h(m),u(m,E),p(m,E)}function p(m,E){var T=t.find(m.nodes(),function(w){return!E.node(w).parent}),L=n(m,T);L=L.slice(1),t.forEach(L,function(w){var C=m.node(w).parent,A=E.edge(w,C),R=!1;A||(A=E.edge(C,w),R=!0),E.node(w).rank=E.node(C).rank+(R?A.minlen:-A.minlen)})}function y(m,E,T){return m.hasEdge(E,T)}function b(m,E,T){return T.low<=E.lim&&E.lim<=T.lim}return _c}var Bc,U1;function PO(){if(U1)return Bc;U1=1;var t=Ai(),e=t.longestPath,r=nx(),a=IO();Bc=n;function n(u){switch(u.graph().ranker){case"network-simplex":s(u);break;case"tight-tree":o(u);break;case"longest-path":i(u);break;default:s(u)}}var i=e;function o(u){e(u),r(u)}function s(u){a(u)}return Bc}var kc,z1;function FO(){if(z1)return kc;z1=1;var t=it();kc=e;function e(n){var i=a(n);t.forEach(n.graph().dummyChains,function(o){for(var s=n.node(o),u=s.edgeObj,l=r(n,i,u.v,u.w),f=l.path,h=l.lca,v=0,c=f[v],d=!0;o!==u.w;){if(s=n.node(o),d){for(;(c=f[v])!==h&&n.node(c).maxRank<s.rank;)v++;c===h&&(d=!1)}if(!d){for(;v<f.length-1&&n.node(c=f[v+1]).minRank<=s.rank;)v++;c=f[v]}n.setParent(o,c),o=n.successors(o)[0]}})}function r(n,i,o,s){var u=[],l=[],f=Math.min(i[o].low,i[s].low),h=Math.max(i[o].lim,i[s].lim),v,c;v=o;do v=n.parent(v),u.push(v);while(v&&(i[v].low>f||h>i[v].lim));for(c=v,v=s;(v=n.parent(v))!==c;)l.push(v);return{path:u.concat(l.reverse()),lca:c}}function a(n){var i={},o=0;function s(u){var l=o;t.forEach(n.children(u),s),i[u]={low:l,lim:o++}}return t.forEach(n.children(),s),i}return kc}var qc,V1;function _O(){if(V1)return qc;V1=1;var t=it(),e=kt();qc={run:r,cleanup:o};function r(s){var u=e.addDummyNode(s,"root",{},"_root"),l=n(s),f=t.max(t.values(l))-1,h=2*f+1;s.graph().nestingRoot=u,t.forEach(s.edges(),function(c){s.edge(c).minlen*=h});var v=i(s)+1;t.forEach(s.children(),function(c){a(s,u,h,v,f,l,c)}),s.graph().nodeRankFactor=h}function a(s,u,l,f,h,v,c){var d=s.children(c);if(!d.length){c!==u&&s.setEdge(u,c,{weight:0,minlen:l});return}var g=e.addBorderNode(s,"_bt"),p=e.addBorderNode(s,"_bb"),y=s.node(c);s.setParent(g,c),y.borderTop=g,s.setParent(p,c),y.borderBottom=p,t.forEach(d,function(b){a(s,u,l,f,h,v,b);var m=s.node(b),E=m.borderTop?m.borderTop:b,T=m.borderBottom?m.borderBottom:b,L=m.borderTop?f:2*f,w=E!==T?1:h-v[c]+1;s.setEdge(g,E,{weight:L,minlen:w,nestingEdge:!0}),s.setEdge(T,p,{weight:L,minlen:w,nestingEdge:!0})}),s.parent(c)||s.setEdge(u,g,{weight:0,minlen:h+v[c]})}function n(s){var u={};function l(f,h){var v=s.children(f);v&&v.length&&t.forEach(v,function(c){l(c,h+1)}),u[f]=h}return t.forEach(s.children(),function(f){l(f,1)}),u}function i(s){return t.reduce(s.edges(),function(u,l){return u+s.edge(l).weight},0)}function o(s){var u=s.graph();s.removeNode(u.nestingRoot),delete u.nestingRoot,t.forEach(s.edges(),function(l){var f=s.edge(l);f.nestingEdge&&s.removeEdge(l)})}return qc}var Gc,Y1;function BO(){if(Y1)return Gc;Y1=1;var t=it(),e=kt();Gc=r;function r(n){function i(o){var s=n.children(o),u=n.node(o);if(s.length&&t.forEach(s,i),t.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var l=u.minRank,f=u.maxRank+1;l<f;++l)a(n,"borderLeft","_bl",o,u,l),a(n,"borderRight","_br",o,u,l)}}t.forEach(n.children(),i)}function a(n,i,o,s,u,l){var f={width:0,height:0,rank:l,borderType:i},h=u[i][l-1],v=e.addDummyNode(n,"border",f,o);u[i][l]=v,n.setParent(v,s),h&&n.setEdge(h,v,{weight:1})}return Gc}var Uc,H1;function kO(){if(H1)return Uc;H1=1;var t=it();Uc={adjust:e,undo:r};function e(l){var f=l.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&a(l)}function r(l){var f=l.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&i(l),(f==="lr"||f==="rl")&&(s(l),a(l))}function a(l){t.forEach(l.nodes(),function(f){n(l.node(f))}),t.forEach(l.edges(),function(f){n(l.edge(f))})}function n(l){var f=l.width;l.width=l.height,l.height=f}function i(l){t.forEach(l.nodes(),function(f){o(l.node(f))}),t.forEach(l.edges(),function(f){var h=l.edge(f);t.forEach(h.points,o),t.has(h,"y")&&o(h)})}function o(l){l.y=-l.y}function s(l){t.forEach(l.nodes(),function(f){u(l.node(f))}),t.forEach(l.edges(),function(f){var h=l.edge(f);t.forEach(h.points,u),t.has(h,"x")&&u(h)})}function u(l){var f=l.x;l.x=l.y,l.y=f}return Uc}var zc,X1;function qO(){if(X1)return zc;X1=1;var t=it();zc=e;function e(r){var a={},n=t.filter(r.nodes(),function(l){return!r.children(l).length}),i=t.max(t.map(n,function(l){return r.node(l).rank})),o=t.map(t.range(i+1),function(){return[]});function s(l){if(!t.has(a,l)){a[l]=!0;var f=r.node(l);o[f.rank].push(l),t.forEach(r.successors(l),s)}}var u=t.sortBy(n,function(l){return r.node(l).rank});return t.forEach(u,s),o}return zc}var Vc,W1;function GO(){if(W1)return Vc;W1=1;var t=it();Vc=e;function e(a,n){for(var i=0,o=1;o<n.length;++o)i+=r(a,n[o-1],n[o]);return i}function r(a,n,i){for(var o=t.zipObject(i,t.map(i,function(v,c){return c})),s=t.flatten(t.map(n,function(v){return t.sortBy(t.map(a.outEdges(v),function(c){return{pos:o[c.w],weight:a.edge(c).weight}}),"pos")}),!0),u=1;u<i.length;)u<<=1;var l=2*u-1;u-=1;var f=t.map(new Array(l),function(){return 0}),h=0;return t.forEach(s.forEach(function(v){var c=v.pos+u;f[c]+=v.weight;for(var d=0;c>0;)c%2&&(d+=f[c+1]),c=c-1>>1,f[c]+=v.weight;h+=v.weight*d})),h}return Vc}var Yc,$1;function UO(){if($1)return Yc;$1=1;var t=it();Yc=e;function e(r,a){return t.map(a,function(n){var i=r.inEdges(n);if(i.length){var o=t.reduce(i,function(s,u){var l=r.edge(u),f=r.node(u.v);return{sum:s.sum+l.weight*f.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}return Yc}var Hc,K1;function zO(){if(K1)return Hc;K1=1;var t=it();Hc=e;function e(n,i){var o={};t.forEach(n,function(u,l){var f=o[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:l};t.isUndefined(u.barycenter)||(f.barycenter=u.barycenter,f.weight=u.weight)}),t.forEach(i.edges(),function(u){var l=o[u.v],f=o[u.w];!t.isUndefined(l)&&!t.isUndefined(f)&&(f.indegree++,l.out.push(o[u.w]))});var s=t.filter(o,function(u){return!u.indegree});return r(s)}function r(n){var i=[];function o(l){return function(f){f.merged||(t.isUndefined(f.barycenter)||t.isUndefined(l.barycenter)||f.barycenter>=l.barycenter)&&a(l,f)}}function s(l){return function(f){f.in.push(l),--f.indegree===0&&n.push(f)}}for(;n.length;){var u=n.pop();i.push(u),t.forEach(u.in.reverse(),o(u)),t.forEach(u.out,s(u))}return t.map(t.filter(i,function(l){return!l.merged}),function(l){return t.pick(l,["vs","i","barycenter","weight"])})}function a(n,i){var o=0,s=0;n.weight&&(o+=n.barycenter*n.weight,s+=n.weight),i.weight&&(o+=i.barycenter*i.weight,s+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/s,n.weight=s,n.i=Math.min(i.i,n.i),i.merged=!0}return Hc}var Xc,Z1;function VO(){if(Z1)return Xc;Z1=1;var t=it(),e=kt();Xc=r;function r(i,o){var s=e.partition(i,function(g){return t.has(g,"barycenter")}),u=s.lhs,l=t.sortBy(s.rhs,function(g){return-g.i}),f=[],h=0,v=0,c=0;u.sort(n(!!o)),c=a(f,l,c),t.forEach(u,function(g){c+=g.vs.length,f.push(g.vs),h+=g.barycenter*g.weight,v+=g.weight,c=a(f,l,c)});var d={vs:t.flatten(f,!0)};return v&&(d.barycenter=h/v,d.weight=v),d}function a(i,o,s){for(var u;o.length&&(u=t.last(o)).i<=s;)o.pop(),i.push(u.vs),s++;return s}function n(i){return function(o,s){return o.barycenter<s.barycenter?-1:o.barycenter>s.barycenter?1:i?s.i-o.i:o.i-s.i}}return Xc}var Wc,Q1;function YO(){if(Q1)return Wc;Q1=1;var t=it(),e=UO(),r=zO(),a=VO();Wc=n;function n(s,u,l,f){var h=s.children(u),v=s.node(u),c=v?v.borderLeft:void 0,d=v?v.borderRight:void 0,g={};c&&(h=t.filter(h,function(T){return T!==c&&T!==d}));var p=e(s,h);t.forEach(p,function(T){if(s.children(T.v).length){var L=n(s,T.v,l,f);g[T.v]=L,t.has(L,"barycenter")&&o(T,L)}});var y=r(p,l);i(y,g);var b=a(y,f);if(c&&(b.vs=t.flatten([c,b.vs,d],!0),s.predecessors(c).length)){var m=s.node(s.predecessors(c)[0]),E=s.node(s.predecessors(d)[0]);t.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+m.order+E.order)/(b.weight+2),b.weight+=2}return b}function i(s,u){t.forEach(s,function(l){l.vs=t.flatten(l.vs.map(function(f){return u[f]?u[f].vs:f}),!0)})}function o(s,u){t.isUndefined(s.barycenter)?(s.barycenter=u.barycenter,s.weight=u.weight):(s.barycenter=(s.barycenter*s.weight+u.barycenter*u.weight)/(s.weight+u.weight),s.weight+=u.weight)}return Wc}var $c,J1;function HO(){if(J1)return $c;J1=1;var t=it(),e=Qt().Graph;$c=r;function r(n,i,o){var s=a(n),u=new e({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(l){return n.node(l)});return t.forEach(n.nodes(),function(l){var f=n.node(l),h=n.parent(l);(f.rank===i||f.minRank<=i&&i<=f.maxRank)&&(u.setNode(l),u.setParent(l,h||s),t.forEach(n[o](l),function(v){var c=v.v===l?v.w:v.v,d=u.edge(c,l),g=t.isUndefined(d)?0:d.weight;u.setEdge(c,l,{weight:n.edge(v).weight+g})}),t.has(f,"minRank")&&u.setNode(l,{borderLeft:f.borderLeft[i],borderRight:f.borderRight[i]}))}),u}function a(n){for(var i;n.hasNode(i=t.uniqueId("_root")););return i}return $c}var Kc,j1;function XO(){if(j1)return Kc;j1=1;var t=it();Kc=e;function e(r,a,n){var i={},o;t.forEach(n,function(s){for(var u=r.parent(s),l,f;u;){if(l=r.parent(u),l?(f=i[l],i[l]=u):(f=o,o=u),f&&f!==u){a.setEdge(f,u);return}u=l}})}return Kc}var Zc,eE;function WO(){if(eE)return Zc;eE=1;var t=it(),e=qO(),r=GO(),a=YO(),n=HO(),i=XO(),o=Qt().Graph,s=kt();Zc=u;function u(v){var c=s.maxRank(v),d=l(v,t.range(1,c+1),"inEdges"),g=l(v,t.range(c-1,-1,-1),"outEdges"),p=e(v);h(v,p);for(var y=Number.POSITIVE_INFINITY,b,m=0,E=0;E<4;++m,++E){f(m%2?d:g,m%4>=2),p=s.buildLayerMatrix(v);var T=r(v,p);T<y&&(E=0,b=t.cloneDeep(p),y=T)}h(v,b)}function l(v,c,d){return t.map(c,function(g){return n(v,g,d)})}function f(v,c){var d=new o;t.forEach(v,function(g){var p=g.graph().root,y=a(g,p,d,c);t.forEach(y.vs,function(b,m){g.node(b).order=m}),i(g,d,y.vs)})}function h(v,c){t.forEach(c,function(d){t.forEach(d,function(g,p){v.node(g).order=p})})}return Zc}var Qc,tE;function $O(){if(tE)return Qc;tE=1;var t=it(),e=Qt().Graph,r=kt();Qc={positionX:d,findType1Conflicts:a,findType2Conflicts:n,addConflict:o,hasConflict:s,verticalAlignment:u,horizontalCompaction:l,alignCoordinates:v,findSmallestWidthAlignment:h,balance:c};function a(y,b){var m={};function E(T,L){var w=0,C=0,A=T.length,R=t.last(L);return t.forEach(L,function(S,D){var P=i(y,S),x=P?y.node(P).order:A;(P||S===R)&&(t.forEach(L.slice(C,D+1),function(N){t.forEach(y.predecessors(N),function(M){var I=y.node(M),O=I.order;(O<w||x<O)&&!(I.dummy&&y.node(N).dummy)&&o(m,M,N)})}),C=D+1,w=x)}),L}return t.reduce(b,E),m}function n(y,b){var m={};function E(L,w,C,A,R){var S;t.forEach(t.range(w,C),function(D){S=L[D],y.node(S).dummy&&t.forEach(y.predecessors(S),function(P){var x=y.node(P);x.dummy&&(x.order<A||x.order>R)&&o(m,P,S)})})}function T(L,w){var C=-1,A,R=0;return t.forEach(w,function(S,D){if(y.node(S).dummy==="border"){var P=y.predecessors(S);P.length&&(A=y.node(P[0]).order,E(w,R,D,C,A),R=D,C=A)}E(w,R,w.length,A,L.length)}),w}return t.reduce(b,T),m}function i(y,b){if(y.node(b).dummy)return t.find(y.predecessors(b),function(m){return y.node(m).dummy})}function o(y,b,m){if(b>m){var E=b;b=m,m=E}var T=y[b];T||(y[b]=T={}),T[m]=!0}function s(y,b,m){if(b>m){var E=b;b=m,m=E}return t.has(y[b],m)}function u(y,b,m,E){var T={},L={},w={};return t.forEach(b,function(C){t.forEach(C,function(A,R){T[A]=A,L[A]=A,w[A]=R})}),t.forEach(b,function(C){var A=-1;t.forEach(C,function(R){var S=E(R);if(S.length){S=t.sortBy(S,function(M){return w[M]});for(var D=(S.length-1)/2,P=Math.floor(D),x=Math.ceil(D);P<=x;++P){var N=S[P];L[R]===R&&A<w[N]&&!s(m,R,N)&&(L[N]=R,L[R]=T[R]=T[N],A=w[N])}}})}),{root:T,align:L}}function l(y,b,m,E,T){var L={},w=f(y,b,m,T),C=T?"borderLeft":"borderRight";function A(D,P){for(var x=w.nodes(),N=x.pop(),M={};N;)M[N]?D(N):(M[N]=!0,x.push(N),x=x.concat(P(N))),N=x.pop()}function R(D){L[D]=w.inEdges(D).reduce(function(P,x){return Math.max(P,L[x.v]+w.edge(x))},0)}function S(D){var P=w.outEdges(D).reduce(function(N,M){return Math.min(N,L[M.w]-w.edge(M))},Number.POSITIVE_INFINITY),x=y.node(D);P!==Number.POSITIVE_INFINITY&&x.borderType!==C&&(L[D]=Math.max(L[D],P))}return A(R,w.predecessors.bind(w)),A(S,w.successors.bind(w)),t.forEach(E,function(D){L[D]=L[m[D]]}),L}function f(y,b,m,E){var T=new e,L=y.graph(),w=g(L.nodesep,L.edgesep,E);return t.forEach(b,function(C){var A;t.forEach(C,function(R){var S=m[R];if(T.setNode(S),A){var D=m[A],P=T.edge(D,S);T.setEdge(D,S,Math.max(w(y,R,A),P||0))}A=R})}),T}function h(y,b){return t.minBy(t.values(b),function(m){var E=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;return t.forIn(m,function(L,w){var C=p(y,w)/2;E=Math.max(L+C,E),T=Math.min(L-C,T)}),E-T})}function v(y,b){var m=t.values(b),E=t.min(m),T=t.max(m);t.forEach(["u","d"],function(L){t.forEach(["l","r"],function(w){var C=L+w,A=y[C],R;if(A!==b){var S=t.values(A);R=w==="l"?E-t.min(S):T-t.max(S),R&&(y[C]=t.mapValues(A,function(D){return D+R}))}})})}function c(y,b){return t.mapValues(y.ul,function(m,E){if(b)return y[b.toLowerCase()][E];var T=t.sortBy(t.map(y,E));return(T[1]+T[2])/2})}function d(y){var b=r.buildLayerMatrix(y),m=t.merge(a(y,b),n(y,b)),E={},T;t.forEach(["u","d"],function(w){T=w==="u"?b:t.values(b).reverse(),t.forEach(["l","r"],function(C){C==="r"&&(T=t.map(T,function(D){return t.values(D).reverse()}));var A=(w==="u"?y.predecessors:y.successors).bind(y),R=u(y,T,m,A),S=l(y,T,R.root,R.align,C==="r");C==="r"&&(S=t.mapValues(S,function(D){return-D})),E[w+C]=S})});var L=h(y,E);return v(E,L),c(E,y.graph().align)}function g(y,b,m){return function(E,T,L){var w=E.node(T),C=E.node(L),A=0,R;if(A+=w.width/2,t.has(w,"labelpos"))switch(w.labelpos.toLowerCase()){case"l":R=-w.width/2;break;case"r":R=w.width/2;break}if(R&&(A+=m?R:-R),R=0,A+=(w.dummy?b:y)/2,A+=(C.dummy?b:y)/2,A+=C.width/2,t.has(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":R=C.width/2;break;case"r":R=-C.width/2;break}return R&&(A+=m?R:-R),R=0,A}}function p(y,b){return y.node(b).width}return Qc}var Jc,rE;function KO(){if(rE)return Jc;rE=1;var t=it(),e=kt(),r=$O().positionX;Jc=a;function a(i){i=e.asNonCompoundGraph(i),n(i),t.forEach(r(i),function(o,s){i.node(s).x=o})}function n(i){var o=e.buildLayerMatrix(i),s=i.graph().ranksep,u=0;t.forEach(o,function(l){var f=t.max(t.map(l,function(h){return i.node(h).height}));t.forEach(l,function(h){i.node(h).y=u+f/2}),u+=f+s})}return Jc}var jc,aE;function ZO(){if(aE)return jc;aE=1;var t=it(),e=MO(),r=OO(),a=PO(),n=kt().normalizeRanks,i=FO(),o=kt().removeEmptyRanks,s=_O(),u=BO(),l=kO(),f=WO(),h=KO(),v=kt(),c=Qt().Graph;jc=d;function d(q,G){var U=G&&G.debugTiming?v.time:v.notime;U("layout",function(){var K=U(" buildLayoutGraph",function(){return A(q)});U(" runLayout",function(){g(K,U)}),U(" updateInputGraph",function(){p(q,K)})})}function g(q,G){G(" makeSpaceForEdgeLabels",function(){R(q)}),G(" removeSelfEdges",function(){k(q)}),G(" acyclic",function(){e.run(q)}),G(" nestingGraph.run",function(){s.run(q)}),G(" rank",function(){a(v.asNonCompoundGraph(q))}),G(" injectEdgeLabelProxies",function(){S(q)}),G(" removeEmptyRanks",function(){o(q)}),G(" nestingGraph.cleanup",function(){s.cleanup(q)}),G(" normalizeRanks",function(){n(q)}),G(" assignRankMinMax",function(){D(q)}),G(" removeEdgeLabelProxies",function(){P(q)}),G(" normalize.run",function(){r.run(q)}),G(" parentDummyChains",function(){i(q)}),G(" addBorderSegments",function(){u(q)}),G(" order",function(){f(q)}),G(" insertSelfEdges",function(){F(q)}),G(" adjustCoordinateSystem",function(){l.adjust(q)}),G(" position",function(){h(q)}),G(" positionSelfEdges",function(){_(q)}),G(" removeBorderNodes",function(){O(q)}),G(" normalize.undo",function(){r.undo(q)}),G(" fixupEdgeLabelCoords",function(){M(q)}),G(" undoCoordinateSystem",function(){l.undo(q)}),G(" translateGraph",function(){x(q)}),G(" assignNodeIntersects",function(){N(q)}),G(" reversePoints",function(){I(q)}),G(" acyclic.undo",function(){e.undo(q)})}function p(q,G){t.forEach(q.nodes(),function(U){var K=q.node(U),J=G.node(U);K&&(K.x=J.x,K.y=J.y,G.children(U).length&&(K.width=J.width,K.height=J.height))}),t.forEach(q.edges(),function(U){var K=q.edge(U),J=G.edge(U);K.points=J.points,t.has(J,"x")&&(K.x=J.x,K.y=J.y)}),q.graph().width=G.graph().width,q.graph().height=G.graph().height}var y=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],E=["width","height"],T={width:0,height:0},L=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function A(q){var G=new c({multigraph:!0,compound:!0}),U=X(q.graph());return G.setGraph(t.merge({},b,z(U,y),t.pick(U,m))),t.forEach(q.nodes(),function(K){var J=X(q.node(K));G.setNode(K,t.defaults(z(J,E),T)),G.setParent(K,q.parent(K))}),t.forEach(q.edges(),function(K){var J=X(q.edge(K));G.setEdge(K,t.merge({},w,z(J,L),t.pick(J,C)))}),G}function R(q){var G=q.graph();G.ranksep/=2,t.forEach(q.edges(),function(U){var K=q.edge(U);K.minlen*=2,K.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?K.width+=K.labeloffset:K.height+=K.labeloffset)})}function S(q){t.forEach(q.edges(),function(G){var U=q.edge(G);if(U.width&&U.height){var K=q.node(G.v),J=q.node(G.w),H={rank:(J.rank-K.rank)/2+K.rank,e:G};v.addDummyNode(q,"edge-proxy",H,"_ep")}})}function D(q){var G=0;t.forEach(q.nodes(),function(U){var K=q.node(U);K.borderTop&&(K.minRank=q.node(K.borderTop).rank,K.maxRank=q.node(K.borderBottom).rank,G=t.max(G,K.maxRank))}),q.graph().maxRank=G}function P(q){t.forEach(q.nodes(),function(G){var U=q.node(G);U.dummy==="edge-proxy"&&(q.edge(U.e).labelRank=U.rank,q.removeNode(G))})}function x(q){var G=Number.POSITIVE_INFINITY,U=0,K=Number.POSITIVE_INFINITY,J=0,H=q.graph(),Y=H.marginx||0,$=H.marginy||0;function Q(ee){var te=ee.x,he=ee.y,xe=ee.width,le=ee.height;G=Math.min(G,te-xe/2),U=Math.max(U,te+xe/2),K=Math.min(K,he-le/2),J=Math.max(J,he+le/2)}t.forEach(q.nodes(),function(ee){Q(q.node(ee))}),t.forEach(q.edges(),function(ee){var te=q.edge(ee);t.has(te,"x")&&Q(te)}),G-=Y,K-=$,t.forEach(q.nodes(),function(ee){var te=q.node(ee);te.x-=G,te.y-=K}),t.forEach(q.edges(),function(ee){var te=q.edge(ee);t.forEach(te.points,function(he){he.x-=G,he.y-=K}),t.has(te,"x")&&(te.x-=G),t.has(te,"y")&&(te.y-=K)}),H.width=U-G+Y,H.height=J-K+$}function N(q){t.forEach(q.edges(),function(G){var U=q.edge(G),K=q.node(G.v),J=q.node(G.w),H,Y;U.points?(H=U.points[0],Y=U.points[U.points.length-1]):(U.points=[],H=J,Y=K),U.points.unshift(v.intersectRect(K,H)),U.points.push(v.intersectRect(J,Y))})}function M(q){t.forEach(q.edges(),function(G){var U=q.edge(G);if(t.has(U,"x"))switch((U.labelpos==="l"||U.labelpos==="r")&&(U.width-=U.labeloffset),U.labelpos){case"l":U.x-=U.width/2+U.labeloffset;break;case"r":U.x+=U.width/2+U.labeloffset;break}})}function I(q){t.forEach(q.edges(),function(G){var U=q.edge(G);U.reversed&&U.points.reverse()})}function O(q){t.forEach(q.nodes(),function(G){if(q.children(G).length){var U=q.node(G),K=q.node(U.borderTop),J=q.node(U.borderBottom),H=q.node(t.last(U.borderLeft)),Y=q.node(t.last(U.borderRight));U.width=Math.abs(Y.x-H.x),U.height=Math.abs(J.y-K.y),U.x=H.x+U.width/2,U.y=K.y+U.height/2}}),t.forEach(q.nodes(),function(G){q.node(G).dummy==="border"&&q.removeNode(G)})}function k(q){t.forEach(q.edges(),function(G){if(G.v===G.w){var U=q.node(G.v);U.selfEdges||(U.selfEdges=[]),U.selfEdges.push({e:G,label:q.edge(G)}),q.removeEdge(G)}})}function F(q){var G=v.buildLayerMatrix(q);t.forEach(G,function(U){var K=0;t.forEach(U,function(J,H){var Y=q.node(J);Y.order=H+K,t.forEach(Y.selfEdges,function($){v.addDummyNode(q,"selfedge",{width:$.label.width,height:$.label.height,rank:Y.rank,order:H+ ++K,e:$.e,label:$.label},"_se")}),delete Y.selfEdges})})}function _(q){t.forEach(q.nodes(),function(G){var U=q.node(G);if(U.dummy==="selfedge"){var K=q.node(U.e.v),J=K.x+K.width/2,H=K.y,Y=U.x-J,$=K.height/2;q.setEdge(U.e,U.label),q.removeNode(G),U.label.points=[{x:J+2*Y/3,y:H-$},{x:J+5*Y/6,y:H-$},{x:J+Y,y:H},{x:J+5*Y/6,y:H+$},{x:J+2*Y/3,y:H+$}],U.label.x=U.x,U.label.y=U.y}})}function z(q,G){return t.mapValues(t.pick(q,G),Number)}function X(q){var G={};return t.forEach(q,function(U,K){G[K.toLowerCase()]=U}),G}return jc}var ev,nE;function QO(){if(nE)return ev;nE=1;var t=it(),e=kt(),r=Qt().Graph;ev={debugOrdering:a};function a(n){var i=e.buildLayerMatrix(n),o=new r({compound:!0,multigraph:!0}).setGraph({});return t.forEach(n.nodes(),function(s){o.setNode(s,{label:s}),o.setParent(s,"layer"+n.node(s).rank)}),t.forEach(n.edges(),function(s){o.setEdge(s.v,s.w,{},s.name)}),t.forEach(i,function(s,u){var l="layer"+u;o.setNode(l,{rank:"same"}),t.reduce(s,function(f,h){return o.setEdge(f,h,{style:"invis"}),h})}),o}return ev}var tv,iE;function JO(){return iE||(iE=1,tv="0.8.5"),tv}var rv,oE;function jO(){return oE||(oE=1,rv={graphlib:Qt(),layout:ZO(),debug:QO(),util:{time:kt().time,notime:kt().notime},version:JO()}),rv}var eI=ni.exports,sE;function tI(){return sE||(sE=1,(function(t,e){(function(a,n){t.exports=n(jO())})(eI,function(r){return(function(a){var n={};function i(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return a[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=a,i.c=n,i.d=function(o,s,u){i.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:u})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,s){if(s&1&&(o=i(o)),s&8||s&4&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(i.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),s&2&&typeof o!="string")for(var l in o)i.d(u,l,(function(f){return o[f]}).bind(null,l));return u},i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,"a",s),s},i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},i.p="",i(i.s=0)})([(function(a,n,i){var o=i(1),s=function(l){l&&l("layout","dagre",o)};typeof cytoscape<"u"&&s(cytoscape),a.exports=s}),(function(a,n,i){function o(v){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(d){return typeof d}:o=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},o(v)}var s=function(c){return typeof c=="function"},u=i(2),l=i(3),f=i(4);function h(v){this.options=l({},u,v)}h.prototype.run=function(){var v=this.options,c=this,d=v.cy,g=v.eles,p=function(_,z){return s(z)?z.apply(_,[_]):z},y=v.boundingBox||{x1:0,y1:0,w:d.width(),h:d.height()};y.x2===void 0&&(y.x2=y.x1+y.w),y.w===void 0&&(y.w=y.x2-y.x1),y.y2===void 0&&(y.y2=y.y1+y.h),y.h===void 0&&(y.h=y.y2-y.y1);var b=new f.graphlib.Graph({multigraph:!0,compound:!0}),m={},E=function(_,z){z!=null&&(m[_]=z)};E("nodesep",v.nodeSep),E("edgesep",v.edgeSep),E("ranksep",v.rankSep),E("rankdir",v.rankDir),E("align",v.align),E("ranker",v.ranker),E("acyclicer",v.acyclicer),b.setGraph(m),b.setDefaultEdgeLabel(function(){return{}}),b.setDefaultNodeLabel(function(){return{}});var T=g.nodes();s(v.sort)&&(T=T.sort(v.sort));for(var L=0;L<T.length;L++){var w=T[L],C=w.layoutDimensions(v);b.setNode(w.id(),{width:C.w,height:C.h,name:w.id()})}for(var A=0;A<T.length;A++){var R=T[A];R.isChild()&&b.setParent(R.id(),R.parent().id())}var S=g.edges().stdFilter(function(F){return!F.source().isParent()&&!F.target().isParent()});s(v.sort)&&(S=S.sort(v.sort));for(var D=0;D<S.length;D++){var P=S[D];b.setEdge(P.source().id(),P.target().id(),{minlen:p(P,v.minLen),weight:p(P,v.edgeWeight),name:P.id()},P.id())}f.layout(b);for(var x=b.nodes(),N=0;N<x.length;N++){var M=x[N],I=b.node(M);d.getElementById(M).scratch().dagre=I}var O;v.boundingBox?(O={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},T.forEach(function(F){var _=F.scratch().dagre;O.x1=Math.min(O.x1,_.x),O.x2=Math.max(O.x2,_.x),O.y1=Math.min(O.y1,_.y),O.y2=Math.max(O.y2,_.y)}),O.w=O.x2-O.x1,O.h=O.y2-O.y1):O=y;var k=function(_){if(v.boundingBox){var z=O.w===0?0:(_.x-O.x1)/O.w,X=O.h===0?0:(_.y-O.y1)/O.h;return{x:y.x1+z*y.w,y:y.y1+X*y.h}}else return _};return T.layoutPositions(c,v,function(F){F=o(F)==="object"?F:this;var _=F.scratch().dagre;return k({x:_.x,y:_.y})}),this},a.exports=h}),(function(a,n){var i={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,align:void 0,acyclicer:void 0,ranker:void 0,minLen:function(s){return 1},edgeWeight:function(s){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(s,u){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(s,u){return u},ready:function(){},sort:void 0,stop:function(){}};a.exports=i}),(function(a,n){a.exports=Object.assign!=null?Object.assign.bind(Object):function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];return s.forEach(function(l){Object.keys(l).forEach(function(f){return i[f]=l[f]})}),i}}),(function(a,n){a.exports=r})])})})(ni)),ni.exports}var rI=tI();const bI=xv(rI);var ii={exports:{}},oi={exports:{}},si={exports:{}},aI=si.exports,uE;function nI(){return uE||(uE=1,(function(t,e){(function(a,n){t.exports=n()})(aI,function(){return(function(r){var a={};function n(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return r[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=r,n.c=a,n.i=function(i){return i},n.d=function(i,o,s){n.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(o,"a",o),o},n.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},n.p="",n(n.s=28)})([(function(r,a,n){function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,r.exports=i}),(function(r,a,n){var i=n(2),o=n(8),s=n(9);function u(f,h,v){i.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=h}u.prototype=Object.create(i.prototype);for(var l in i)u[l]=i[l];u.prototype.getSource=function(){return this.source},u.prototype.getTarget=function(){return this.target},u.prototype.isInterGraph=function(){return this.isInterGraph},u.prototype.getLength=function(){return this.length},u.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},u.prototype.getBendpoints=function(){return this.bendpoints},u.prototype.getLca=function(){return this.lca},u.prototype.getSourceInLca=function(){return this.sourceInLca},u.prototype.getTargetInLca=function(){return this.targetInLca},u.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},u.prototype.getOtherEndInGraph=function(f,h){for(var v=this.getOtherEnd(f),c=h.getGraphManager().getRoot();;){if(v.getOwner()==h)return v;if(v.getOwner()==c)break;v=v.getOwner().getParent()}return null},u.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},u.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},r.exports=u}),(function(r,a,n){function i(o){this.vGraphObject=o}r.exports=i}),(function(r,a,n){var i=n(2),o=n(10),s=n(13),u=n(0),l=n(16),f=n(5);function h(c,d,g,p){g==null&&p==null&&(p=d),i.call(this,p),c.graphManager!=null&&(c=c.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=c,g!=null&&d!=null?this.rect=new s(d.x,d.y,g.width,g.height):this.rect=new s}h.prototype=Object.create(i.prototype);for(var v in i)h[v]=i[v];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(c){this.rect.width=c},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(c){this.rect.height=c},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(c,d){this.rect.x=c.x,this.rect.y=c.y,this.rect.width=d.width,this.rect.height=d.height},h.prototype.setCenter=function(c,d){this.rect.x=c-this.rect.width/2,this.rect.y=d-this.rect.height/2},h.prototype.setLocation=function(c,d){this.rect.x=c,this.rect.y=d},h.prototype.moveBy=function(c,d){this.rect.x+=c,this.rect.y+=d},h.prototype.getEdgeListToNode=function(c){var d=[],g=this;return g.edges.forEach(function(p){if(p.target==c){if(p.source!=g)throw"Incorrect edge source!";d.push(p)}}),d},h.prototype.getEdgesBetween=function(c){var d=[],g=this;return g.edges.forEach(function(p){if(!(p.source==g||p.target==g))throw"Incorrect edge source and/or target";(p.target==c||p.source==c)&&d.push(p)}),d},h.prototype.getNeighborsList=function(){var c=new Set,d=this;return d.edges.forEach(function(g){if(g.source==d)c.add(g.target);else{if(g.target!=d)throw"Incorrect incidency!";c.add(g.source)}}),c},h.prototype.withChildren=function(){var c=new Set,d,g;if(c.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)d=p[y],g=d.withChildren(),g.forEach(function(b){c.add(b)});return c},h.prototype.getNoOfChildren=function(){var c=0,d;if(this.child==null)c=1;else for(var g=this.child.getNodes(),p=0;p<g.length;p++)d=g[p],c+=d.getNoOfChildren();return c==0&&(c=1),c},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var c,d,g=-u.INITIAL_WORLD_BOUNDARY,p=u.INITIAL_WORLD_BOUNDARY;c=u.WORLD_CENTER_X+l.nextDouble()*(p-g)+g;var y=-u.INITIAL_WORLD_BOUNDARY,b=u.INITIAL_WORLD_BOUNDARY;d=u.WORLD_CENTER_Y+l.nextDouble()*(b-y)+y,this.rect.x=c,this.rect.y=d},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var c=this.getChild();if(c.updateBounds(!0),this.rect.x=c.getLeft(),this.rect.y=c.getTop(),this.setWidth(c.getRight()-c.getLeft()),this.setHeight(c.getBottom()-c.getTop()),u.NODE_DIMENSIONS_INCLUDE_LABELS){var d=c.getRight()-c.getLeft(),g=c.getBottom()-c.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(d+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>d?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>g?(this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(g+this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(c){var d=this.rect.x;d>u.WORLD_BOUNDARY?d=u.WORLD_BOUNDARY:d<-u.WORLD_BOUNDARY&&(d=-u.WORLD_BOUNDARY);var g=this.rect.y;g>u.WORLD_BOUNDARY?g=u.WORLD_BOUNDARY:g<-u.WORLD_BOUNDARY&&(g=-u.WORLD_BOUNDARY);var p=new f(d,g),y=c.inverseTransformPoint(p);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},r.exports=h}),(function(r,a,n){var i=n(0);function o(){}for(var s in i)o[s]=i[s];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=o.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,r.exports=o}),(function(r,a,n){function i(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(o){this.x=o},i.prototype.setY=function(o){this.y=o},i.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},r.exports=i}),(function(r,a,n){var i=n(2),o=n(10),s=n(0),u=n(7),l=n(3),f=n(1),h=n(13),v=n(12),c=n(11);function d(p,y,b){i.call(this,b),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof u?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}d.prototype=Object.create(i.prototype);for(var g in i)d[g]=i[g];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(p,y,b){if(y==null&&b==null){var m=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(m)>-1)throw"Node already in graph!";return m.owner=this,this.getNodes().push(m),m}else{var E=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(b)>-1))throw"Source or target not in graph!";if(!(y.owner==b.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=b.owner?null:(E.source=y,E.target=b,E.isInterGraph=!1,this.getEdges().push(E),y.edges.push(E),b!=y&&b.edges.push(E),E)}},d.prototype.remove=function(p){var y=p;if(p instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var b=y.edges.slice(),m,E=b.length,T=0;T<E;T++)m=b[T],m.isInterGraph?this.graphManager.remove(m):m.source.owner.remove(m);var L=this.nodes.indexOf(y);if(L==-1)throw"Node not in owner node list!";this.nodes.splice(L,1)}else if(p instanceof f){var m=p;if(m==null)throw"Edge is null!";if(!(m.source!=null&&m.target!=null))throw"Source and/or target is null!";if(!(m.source.owner!=null&&m.target.owner!=null&&m.source.owner==this&&m.target.owner==this))throw"Source and/or target owner is invalid!";var w=m.source.edges.indexOf(m),C=m.target.edges.indexOf(m);if(!(w>-1&&C>-1))throw"Source and/or target doesn't know this edge!";m.source.edges.splice(w,1),m.target!=m.source&&m.target.edges.splice(C,1);var L=m.source.owner.getEdges().indexOf(m);if(L==-1)throw"Not in owner's edge list!";m.source.owner.getEdges().splice(L,1)}},d.prototype.updateLeftTop=function(){for(var p=o.MAX_VALUE,y=o.MAX_VALUE,b,m,E,T=this.getNodes(),L=T.length,w=0;w<L;w++){var C=T[w];b=C.getTop(),m=C.getLeft(),p>b&&(p=b),y>m&&(y=m)}return p==o.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?E=T[0].getParent().paddingLeft:E=this.margin,this.left=y-E,this.top=p-E,new v(this.left,this.top))},d.prototype.updateBounds=function(p){for(var y=o.MAX_VALUE,b=-o.MAX_VALUE,m=o.MAX_VALUE,E=-o.MAX_VALUE,T,L,w,C,A,R=this.nodes,S=R.length,D=0;D<S;D++){var P=R[D];p&&P.child!=null&&P.updateBounds(),T=P.getLeft(),L=P.getRight(),w=P.getTop(),C=P.getBottom(),y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var x=new h(y,m,b-y,E-m);y==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),R[0].getParent().paddingLeft!=null?A=R[0].getParent().paddingLeft:A=this.margin,this.left=x.x-A,this.right=x.x+x.width+A,this.top=x.y-A,this.bottom=x.y+x.height+A},d.calculateBounds=function(p){for(var y=o.MAX_VALUE,b=-o.MAX_VALUE,m=o.MAX_VALUE,E=-o.MAX_VALUE,T,L,w,C,A=p.length,R=0;R<A;R++){var S=p[R];T=S.getLeft(),L=S.getRight(),w=S.getTop(),C=S.getBottom(),y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var D=new h(y,m,b-y,E-m);return D},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,b=y.length,m=0;m<b;m++){var E=y[m];p+=E.calcEstimatedSize()}return p==0?this.estimatedSize=s.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new c,b=new Set,m=this.nodes[0],E,T,L=m.withChildren();for(L.forEach(function(D){y.push(D),b.add(D)});y.length!==0;){m=y.shift(),E=m.getEdges();for(var w=E.length,C=0;C<w;C++){var A=E[C];if(T=A.getOtherEndInGraph(m,this),T!=null&&!b.has(T)){var R=T.withChildren();R.forEach(function(D){y.push(D),b.add(D)})}}}if(this.isConnected=!1,b.size>=this.nodes.length){var S=0;b.forEach(function(D){D.owner==p&&S++}),S==this.nodes.length&&(this.isConnected=!0)}},r.exports=d}),(function(r,a,n){var i,o=n(1);function s(u){i=n(6),this.layout=u,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var u=this.layout.newGraph(),l=this.layout.newNode(null),f=this.add(u,l);return this.setRootGraph(f),this.rootGraph},s.prototype.add=function(u,l,f,h,v){if(f==null&&h==null&&v==null){if(u==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(u)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(u),u.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return u.parent=l,l.child=u,u}else{v=f,h=l,f=u;var c=h.getOwner(),d=v.getOwner();if(!(c!=null&&c.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(c==d)return f.isInterGraph=!1,c.add(f,h,v);if(f.isInterGraph=!0,f.source=h,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},s.prototype.remove=function(u){if(u instanceof i){var l=u;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(l.getEdges());for(var h,v=f.length,c=0;c<v;c++)h=f[c],l.remove(h);var d=[];d=d.concat(l.getNodes());var g;v=d.length;for(var c=0;c<v;c++)g=d[c],l.remove(g);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(u instanceof o){if(h=u,h==null)throw"Edge is null!";if(!h.isInterGraph)throw"Not an inter-graph edge!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.edges.indexOf(h)!=-1&&h.target.edges.indexOf(h)!=-1))throw"Source and/or target doesn't know this edge!";var p=h.source.edges.indexOf(h);if(h.source.edges.splice(p,1),p=h.target.edges.indexOf(h),h.target.edges.splice(p,1),!(h.source.owner!=null&&h.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(h.source.owner.getGraphManager().edges.indexOf(h)==-1)throw"Not in owner graph manager's edge list!";var p=h.source.owner.getGraphManager().edges.indexOf(h);h.source.owner.getGraphManager().edges.splice(p,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){for(var u=[],l=this.getGraphs(),f=l.length,h=0;h<f;h++)u=u.concat(l[h].getNodes());this.allNodes=u}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var u=[],l=this.getGraphs();l.length;for(var f=0;f<l.length;f++)u=u.concat(l[f].getEdges());u=u.concat(this.edges),this.allEdges=u}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(u){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=u},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(u){if(u.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=u,u.parent==null&&(u.parent=this.layout.newNode("Root node"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(u,l){if(!(u!=null&&l!=null))throw"assert failed";if(u==l)return!0;var f=u.getOwner(),h;do{if(h=f.getParent(),h==null)break;if(h==l)return!0;if(f=h.getOwner(),f==null)break}while(!0);f=l.getOwner();do{if(h=f.getParent(),h==null)break;if(h==u)return!0;if(f=h.getOwner(),f==null)break}while(!0);return!1},s.prototype.calcLowestCommonAncestors=function(){for(var u,l,f,h,v,c=this.getAllEdges(),d=c.length,g=0;g<d;g++){if(u=c[g],l=u.source,f=u.target,u.lca=null,u.sourceInLca=l,u.targetInLca=f,l==f){u.lca=l.getOwner();continue}for(h=l.getOwner();u.lca==null;){for(u.targetInLca=f,v=f.getOwner();u.lca==null;){if(v==h){u.lca=v;break}if(v==this.rootGraph)break;if(u.lca!=null)throw"assert failed";u.targetInLca=v.getParent(),v=u.targetInLca.getOwner()}if(h==this.rootGraph)break;u.lca==null&&(u.sourceInLca=h.getParent(),h=u.sourceInLca.getOwner())}if(u.lca==null)throw"assert failed"}},s.prototype.calcLowestCommonAncestor=function(u,l){if(u==l)return u.getOwner();var f=u.getOwner();do{if(f==null)break;var h=l.getOwner();do{if(h==null)break;if(h==f)return h;h=h.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},s.prototype.calcInclusionTreeDepths=function(u,l){u==null&&l==null&&(u=this.rootGraph,l=1);for(var f,h=u.getNodes(),v=h.length,c=0;c<v;c++)f=h[c],f.inclusionTreeDepth=l,f.child!=null&&this.calcInclusionTreeDepths(f.child,l+1)},s.prototype.includesInvalidEdge=function(){for(var u,l=[],f=this.edges.length,h=0;h<f;h++)u=this.edges[h],this.isOneAncestorOfOther(u.source,u.target)&&l.push(u);for(var h=0;h<l.length;h++)this.remove(l[h]);return!1},r.exports=s}),(function(r,a,n){var i=n(12);function o(){}o.calcSeparationAmount=function(s,u,l,f){if(!s.intersects(u))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(s,u,h),l[0]=Math.min(s.getRight(),u.getRight())-Math.max(s.x,u.x),l[1]=Math.min(s.getBottom(),u.getBottom())-Math.max(s.y,u.y),s.getX()<=u.getX()&&s.getRight()>=u.getRight()?l[0]+=Math.min(u.getX()-s.getX(),s.getRight()-u.getRight()):u.getX()<=s.getX()&&u.getRight()>=s.getRight()&&(l[0]+=Math.min(s.getX()-u.getX(),u.getRight()-s.getRight())),s.getY()<=u.getY()&&s.getBottom()>=u.getBottom()?l[1]+=Math.min(u.getY()-s.getY(),s.getBottom()-u.getBottom()):u.getY()<=s.getY()&&u.getBottom()>=s.getBottom()&&(l[1]+=Math.min(s.getY()-u.getY(),u.getBottom()-s.getBottom()));var v=Math.abs((u.getCenterY()-s.getCenterY())/(u.getCenterX()-s.getCenterX()));u.getCenterY()===s.getCenterY()&&u.getCenterX()===s.getCenterX()&&(v=1);var c=v*l[0],d=l[1]/v;l[0]<d?d=l[0]:c=l[1],l[0]=-1*h[0]*(d/2+f),l[1]=-1*h[1]*(c/2+f)},o.decideDirectionsForOverlappingNodes=function(s,u,l){s.getCenterX()<u.getCenterX()?l[0]=-1:l[0]=1,s.getCenterY()<u.getCenterY()?l[1]=-1:l[1]=1},o.getIntersection2=function(s,u,l){var f=s.getCenterX(),h=s.getCenterY(),v=u.getCenterX(),c=u.getCenterY();if(s.intersects(u))return l[0]=f,l[1]=h,l[2]=v,l[3]=c,!0;var d=s.getX(),g=s.getY(),p=s.getRight(),y=s.getX(),b=s.getBottom(),m=s.getRight(),E=s.getWidthHalf(),T=s.getHeightHalf(),L=u.getX(),w=u.getY(),C=u.getRight(),A=u.getX(),R=u.getBottom(),S=u.getRight(),D=u.getWidthHalf(),P=u.getHeightHalf(),x=!1,N=!1;if(f===v){if(h>c)return l[0]=f,l[1]=g,l[2]=v,l[3]=R,!1;if(h<c)return l[0]=f,l[1]=b,l[2]=v,l[3]=w,!1}else if(h===c){if(f>v)return l[0]=d,l[1]=h,l[2]=C,l[3]=c,!1;if(f<v)return l[0]=p,l[1]=h,l[2]=L,l[3]=c,!1}else{var M=s.height/s.width,I=u.height/u.width,O=(c-h)/(v-f),k=void 0,F=void 0,_=void 0,z=void 0,X=void 0,q=void 0;if(-M===O?f>v?(l[0]=y,l[1]=b,x=!0):(l[0]=p,l[1]=g,x=!0):M===O&&(f>v?(l[0]=d,l[1]=g,x=!0):(l[0]=m,l[1]=b,x=!0)),-I===O?v>f?(l[2]=A,l[3]=R,N=!0):(l[2]=C,l[3]=w,N=!0):I===O&&(v>f?(l[2]=L,l[3]=w,N=!0):(l[2]=S,l[3]=R,N=!0)),x&&N)return!1;if(f>v?h>c?(k=this.getCardinalDirection(M,O,4),F=this.getCardinalDirection(I,O,2)):(k=this.getCardinalDirection(-M,O,3),F=this.getCardinalDirection(-I,O,1)):h>c?(k=this.getCardinalDirection(-M,O,1),F=this.getCardinalDirection(-I,O,3)):(k=this.getCardinalDirection(M,O,2),F=this.getCardinalDirection(I,O,4)),!x)switch(k){case 1:z=g,_=f+-T/O,l[0]=_,l[1]=z;break;case 2:_=m,z=h+E*O,l[0]=_,l[1]=z;break;case 3:z=b,_=f+T/O,l[0]=_,l[1]=z;break;case 4:_=y,z=h+-E*O,l[0]=_,l[1]=z;break}if(!N)switch(F){case 1:q=w,X=v+-P/O,l[2]=X,l[3]=q;break;case 2:X=S,q=c+D*O,l[2]=X,l[3]=q;break;case 3:q=R,X=v+P/O,l[2]=X,l[3]=q;break;case 4:X=A,q=c+-D*O,l[2]=X,l[3]=q;break}}return!1},o.getCardinalDirection=function(s,u,l){return s>u?l:1+l%4},o.getIntersection=function(s,u,l,f){if(f==null)return this.getIntersection2(s,u,l);var h=s.x,v=s.y,c=u.x,d=u.y,g=l.x,p=l.y,y=f.x,b=f.y,m=void 0,E=void 0,T=void 0,L=void 0,w=void 0,C=void 0,A=void 0,R=void 0,S=void 0;return T=d-v,w=h-c,A=c*v-h*d,L=b-p,C=g-y,R=y*p-g*b,S=T*C-L*w,S===0?null:(m=(w*R-C*A)/S,E=(L*A-T*R)/S,new i(m,E))},o.angleOfVector=function(s,u,l,f){var h=void 0;return s!==l?(h=Math.atan((f-u)/(l-s)),l<s?h+=Math.PI:f<u&&(h+=this.TWO_PI)):f<u?h=this.ONE_AND_HALF_PI:h=this.HALF_PI,h},o.doIntersect=function(s,u,l,f){var h=s.x,v=s.y,c=u.x,d=u.y,g=l.x,p=l.y,y=f.x,b=f.y,m=(c-h)*(b-p)-(y-g)*(d-v);if(m===0)return!1;var E=((b-p)*(y-h)+(g-y)*(b-v))/m,T=((v-d)*(y-h)+(c-h)*(b-v))/m;return 0<E&&E<1&&0<T&&T<1},o.findCircleLineIntersections=function(s,u,l,f,h,v,c){var d=(l-s)*(l-s)+(f-u)*(f-u),g=2*((s-h)*(l-s)+(u-v)*(f-u)),p=(s-h)*(s-h)+(u-v)*(u-v)-c*c,y=g*g-4*d*p;if(y>=0){var b=(-g+Math.sqrt(g*g-4*d*p))/(2*d),m=(-g-Math.sqrt(g*g-4*d*p))/(2*d),E=null;return b>=0&&b<=1?[b]:m>=0&&m<=1?[m]:E}else return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,r.exports=o}),(function(r,a,n){function i(){}i.sign=function(o){return o>0?1:o<0?-1:0},i.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},i.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},r.exports=i}),(function(r,a,n){function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,r.exports=i}),(function(r,a,n){var i=(function(){function h(v,c){for(var d=0;d<c.length;d++){var g=c[d];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}return function(v,c,d){return c&&h(v.prototype,c),d&&h(v,d),v}})();function o(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}var s=function(v){return{value:v,next:null,prev:null}},u=function(v,c,d,g){return v!==null?v.next=c:g.head=c,d!==null?d.prev=c:g.tail=c,c.prev=v,c.next=d,g.length++,c},l=function(v,c){var d=v.prev,g=v.next;return d!==null?d.next=g:c.head=g,g!==null?g.prev=d:c.tail=d,v.prev=v.next=null,c.length--,v},f=(function(){function h(v){var c=this;o(this,h),this.length=0,this.head=null,this.tail=null,v!=null&&v.forEach(function(d){return c.push(d)})}return i(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(c,d){return u(d.prev,s(c),d,this)}},{key:"insertAfter",value:function(c,d){return u(d,s(c),d.next,this)}},{key:"insertNodeBefore",value:function(c,d){return u(d.prev,c,d,this)}},{key:"insertNodeAfter",value:function(c,d){return u(d,c,d.next,this)}},{key:"push",value:function(c){return u(this.tail,s(c),null,this)}},{key:"unshift",value:function(c){return u(null,s(c),this.head,this)}},{key:"remove",value:function(c){return l(c,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(c){if(c<=this.length()){for(var d=1,g=this.head;d<c;)g=g.next,d++;return g.value}}},{key:"set_object_at",value:function(c,d){if(c<=this.length()){for(var g=1,p=this.head;g<c;)p=p.next,g++;p.value=d}}}]),h})();r.exports=f}),(function(r,a,n){function i(o,s,u){this.x=null,this.y=null,o==null&&s==null&&u==null?(this.x=0,this.y=0):typeof o=="number"&&typeof s=="number"&&u==null?(this.x=o,this.y=s):o.constructor.name=="Point"&&s==null&&u==null&&(u=o,this.x=u.x,this.y=u.y)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(o,s,u){o.constructor.name=="Point"&&s==null&&u==null?(u=o,this.setLocation(u.x,u.y)):typeof o=="number"&&typeof s=="number"&&u==null&&(parseInt(o)==o&&parseInt(s)==s?this.move(o,s):(this.x=Math.floor(o+.5),this.y=Math.floor(s+.5)))},i.prototype.move=function(o,s){this.x=o,this.y=s},i.prototype.translate=function(o,s){this.x+=o,this.y+=s},i.prototype.equals=function(o){if(o.constructor.name=="Point"){var s=o;return this.x==s.x&&this.y==s.y}return this==o},i.prototype.toString=function(){return new i().constructor.name+"[x="+this.x+",y="+this.y+"]"},r.exports=i}),(function(r,a,n){function i(o,s,u,l){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&s!=null&&u!=null&&l!=null&&(this.x=o,this.y=s,this.width=u,this.height=l)}i.prototype.getX=function(){return this.x},i.prototype.setX=function(o){this.x=o},i.prototype.getY=function(){return this.y},i.prototype.setY=function(o){this.y=o},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(o){this.width=o},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(o){this.height=o},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},r.exports=i}),(function(r,a,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(){}o.lastID=0,o.createID=function(s){return o.isPrimitive(s)?s:(s.uniqueID!=null||(s.uniqueID=o.getString(),o.lastID++),s.uniqueID)},o.getString=function(s){return s==null&&(s=o.lastID),"Object#"+s},o.isPrimitive=function(s){var u=typeof s>"u"?"undefined":i(s);return s==null||u!="object"&&u!="function"},r.exports=o}),(function(r,a,n){function i(g){if(Array.isArray(g)){for(var p=0,y=Array(g.length);p<g.length;p++)y[p]=g[p];return y}else return Array.from(g)}var o=n(0),s=n(7),u=n(3),l=n(1),f=n(6),h=n(5),v=n(17),c=n(29);function d(g){c.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}d.RANDOM_SEED=1,d.prototype=Object.create(c.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var g=new s(this);return this.graphManager=g,g},d.prototype.newGraph=function(g){return new f(null,this.graphManager,g)},d.prototype.newNode=function(g){return new u(this.graphManager,g)},d.prototype.newEdge=function(g){return new l(null,null,g)},d.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var g;return this.checkLayoutSuccess()?g=!1:g=this.layout(),o.ANIMATE==="during"?!1:(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),p=0;p<g.length;p++)g[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},d.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof u){var p=g;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),b=0;b<y.length;b++)update(y[b]);if(p.vGraphObject!=null){var m=p.vGraphObject;m.update(p)}}else if(g instanceof l){var E=g;if(E.vGraphObject!=null){var T=E.vGraphObject;T.update(E)}}else if(g instanceof f){var L=g;if(L.vGraphObject!=null){var w=L.vGraphObject;w.update(L)}}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(g){if(g==null)this.transform(new h(0,0));else{var p=new v,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(g.x),p.setWorldOrgY(g.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var b=this.getAllNodes(),m,E=0;E<b.length;E++)m=b[E],m.transform(p)}}},d.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,b=g.getNodes(),m=0;m<b.length;m++)p=b[m],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},d.prototype.getFlatForest=function(){for(var g=[],p=!0,y=this.graphManager.getRoot().getNodes(),b=!0,m=0;m<y.length;m++)y[m].getChild()!=null&&(b=!1);if(!b)return g;var E=new Set,T=[],L=new Map,w=[];for(w=w.concat(y);w.length>0&&p;){for(T.push(w[0]);T.length>0&&p;){var C=T[0];T.splice(0,1),E.add(C);for(var A=C.getEdges(),m=0;m<A.length;m++){var R=A[m].getOtherEnd(C);if(L.get(C)!=R)if(!E.has(R))T.push(R),L.set(R,C);else{p=!1;break}}}if(!p)g=[];else{var S=[].concat(i(E));g.push(S);for(var m=0;m<S.length;m++){var D=S[m],P=w.indexOf(D);P>-1&&w.splice(P,1)}E=new Set,L=new Map}}return g},d.prototype.createDummyNodesForBendpoints=function(g){for(var p=[],y=g.source,b=this.graphManager.calcLowestCommonAncestor(g.source,g.target),m=0;m<g.bendpoints.length;m++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),b.add(E);var T=this.newEdge(null);this.graphManager.add(T,y,E),p.add(E),y=E}var T=this.newEdge(null);return this.graphManager.add(T,y,g.target),this.edgeToDummyNodes.set(g,p),g.isInterGraph()?this.graphManager.remove(g):b.remove(g),p},d.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(i(this.edgeToDummyNodes.keys())).concat(g);for(var p=0;p<g.length;p++){var y=g[p];if(y.bendpoints.length>0){for(var b=this.edgeToDummyNodes.get(y),m=0;m<b.length;m++){var E=b[m],T=new h(E.getCenterX(),E.getCenterY()),L=y.bendpoints.get(m);L.x=T.x,L.y=T.y,E.getOwner().remove(E)}this.graphManager.add(y,y.source,y.target)}}},d.transform=function(g,p,y,b){if(y!=null&&b!=null){var m=p;if(g<=50){var E=p/y;m-=(p-E)/50*(50-g)}else{var T=p*b;m+=(T-p)/50*(g-50)}return m}else{var L,w;return g<=50?(L=9*p/500,w=p/10):(L=9*p/50,w=-8*p),L*g+w}},d.findCenterOfTree=function(g){var p=[];p=p.concat(g);var y=[],b=new Map,m=!1,E=null;(p.length==1||p.length==2)&&(m=!0,E=p[0]);for(var T=0;T<p.length;T++){var L=p[T],w=L.getNeighborsList().size;b.set(L,L.getNeighborsList().size),w==1&&y.push(L)}var C=[];for(C=C.concat(y);!m;){var A=[];A=A.concat(C),C=[];for(var T=0;T<p.length;T++){var L=p[T],R=p.indexOf(L);R>=0&&p.splice(R,1);var S=L.getNeighborsList();S.forEach(function(x){if(y.indexOf(x)<0){var N=b.get(x),M=N-1;M==1&&C.push(x),b.set(x,M)}})}y=y.concat(C),(p.length==1||p.length==2)&&(m=!0,E=p[0])}return E},d.prototype.setGraphManager=function(g){this.graphManager=g},r.exports=d}),(function(r,a,n){function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},r.exports=i}),(function(r,a,n){var i=n(5);function o(s,u){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var u=0,l=this.lworldExtX;return l!=0&&(u=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/l),u},o.prototype.transformY=function(s){var u=0,l=this.lworldExtY;return l!=0&&(u=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/l),u},o.prototype.inverseTransformX=function(s){var u=0,l=this.ldeviceExtX;return l!=0&&(u=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/l),u},o.prototype.inverseTransformY=function(s){var u=0,l=this.ldeviceExtY;return l!=0&&(u=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/l),u},o.prototype.inverseTransformPoint=function(s){var u=new i(this.inverseTransformX(s.x),this.inverseTransformY(s.y));return u},r.exports=o}),(function(r,a,n){function i(c){if(Array.isArray(c)){for(var d=0,g=Array(c.length);d<c.length;d++)g[d]=c[d];return g}else return Array.from(c)}var o=n(15),s=n(4),u=n(0),l=n(8),f=n(9);function h(){o.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}h.prototype=Object.create(o.prototype);for(var v in o)h[v]=o[v];h.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var c,d,g,p,y,b,m,E=this.getGraphManager().getAllEdges(),T=0;T<E.length;T++)c=E[T],d=c.idealLength,c.isInterGraph&&(p=c.getSource(),y=c.getTarget(),b=c.getSourceInLca().getEstimatedSize(),m=c.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(c.idealLength+=b+m-2*u.SIMPLE_NODE_SIZE),g=c.getLca().getInclusionTreeDepth(),c.idealLength+=d*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(p.getInclusionTreeDepth()+y.getInclusionTreeDepth()-2*g))},h.prototype.initSpringEmbedder=function(){var c=this.getAllNodes().length;this.incremental?(c>s.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(c-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(c>s.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(c-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var c=this.getAllEdges(),d,g=0;g<c.length;g++)d=c[g],this.calcSpringForce(d,d.idealLength)},h.prototype.calcRepulsionForces=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,p,y,b,m=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&c&&this.updateGrid(),E=new Set,g=0;g<m.length;g++)y=m[g],this.calculateRepulsionForceOfANode(y,E,c,d),E.add(y);else for(g=0;g<m.length;g++)for(y=m[g],p=g+1;p<m.length;p++)b=m[p],y.getOwner()==b.getOwner()&&this.calcRepulsionForce(y,b)},h.prototype.calcGravitationalForces=function(){for(var c,d=this.getAllNodesToApplyGravitation(),g=0;g<d.length;g++)c=d[g],this.calcGravitationalForce(c)},h.prototype.moveNodes=function(){for(var c=this.getAllNodes(),d,g=0;g<c.length;g++)d=c[g],d.move()},h.prototype.calcSpringForce=function(c,d){var g=c.getSource(),p=c.getTarget(),y,b,m,E;if(this.uniformLeafNodeSizes&&g.getChild()==null&&p.getChild()==null)c.updateLengthSimple();else if(c.updateLength(),c.isOverlapingSourceAndTarget)return;y=c.getLength(),y!=0&&(b=c.edgeElasticity*(y-d),m=b*(c.lengthX/y),E=b*(c.lengthY/y),g.springForceX+=m,g.springForceY+=E,p.springForceX-=m,p.springForceY-=E)},h.prototype.calcRepulsionForce=function(c,d){var g=c.getRect(),p=d.getRect(),y=new Array(2),b=new Array(4),m,E,T,L,w,C,A;if(g.intersects(p)){l.calcSeparationAmount(g,p,y,s.DEFAULT_EDGE_LENGTH/2),C=2*y[0],A=2*y[1];var R=c.noOfChildren*d.noOfChildren/(c.noOfChildren+d.noOfChildren);c.repulsionForceX-=R*C,c.repulsionForceY-=R*A,d.repulsionForceX+=R*C,d.repulsionForceY+=R*A}else this.uniformLeafNodeSizes&&c.getChild()==null&&d.getChild()==null?(m=p.getCenterX()-g.getCenterX(),E=p.getCenterY()-g.getCenterY()):(l.getIntersection(g,p,b),m=b[2]-b[0],E=b[3]-b[1]),Math.abs(m)<s.MIN_REPULSION_DIST&&(m=f.sign(m)*s.MIN_REPULSION_DIST),Math.abs(E)<s.MIN_REPULSION_DIST&&(E=f.sign(E)*s.MIN_REPULSION_DIST),T=m*m+E*E,L=Math.sqrt(T),w=(c.nodeRepulsion/2+d.nodeRepulsion/2)*c.noOfChildren*d.noOfChildren/T,C=w*m/L,A=w*E/L,c.repulsionForceX-=C,c.repulsionForceY-=A,d.repulsionForceX+=C,d.repulsionForceY+=A},h.prototype.calcGravitationalForce=function(c){var d,g,p,y,b,m,E,T;d=c.getOwner(),g=(d.getRight()+d.getLeft())/2,p=(d.getTop()+d.getBottom())/2,y=c.getCenterX()-g,b=c.getCenterY()-p,m=Math.abs(y)+c.getWidth()/2,E=Math.abs(b)+c.getHeight()/2,c.getOwner()==this.graphManager.getRoot()?(T=d.getEstimatedSize()*this.gravityRangeFactor,(m>T||E>T)&&(c.gravitationForceX=-this.gravityConstant*y,c.gravitationForceY=-this.gravityConstant*b)):(T=d.getEstimatedSize()*this.compoundGravityRangeFactor,(m>T||E>T)&&(c.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,c.gravitationForceY=-this.gravityConstant*b*this.compoundGravityConstant))},h.prototype.isConverged=function(){var c,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),c=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,c||d},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var c,d=this.graphManager.getAllNodes(),g=0;g<d.length;g++)c=d[g],c.noOfChildren=c.getNoOfChildren()},h.prototype.calcGrid=function(c){var d=0,g=0;d=parseInt(Math.ceil((c.getRight()-c.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((c.getBottom()-c.getTop())/this.repulsionRange));for(var p=new Array(d),y=0;y<d;y++)p[y]=new Array(g);for(var y=0;y<d;y++)for(var b=0;b<g;b++)p[y][b]=new Array;return p},h.prototype.addNodeToGrid=function(c,d,g){var p=0,y=0,b=0,m=0;p=parseInt(Math.floor((c.getRect().x-d)/this.repulsionRange)),y=parseInt(Math.floor((c.getRect().width+c.getRect().x-d)/this.repulsionRange)),b=parseInt(Math.floor((c.getRect().y-g)/this.repulsionRange)),m=parseInt(Math.floor((c.getRect().height+c.getRect().y-g)/this.repulsionRange));for(var E=p;E<=y;E++)for(var T=b;T<=m;T++)this.grid[E][T].push(c),c.setGridCoordinates(p,y,b,m)},h.prototype.updateGrid=function(){var c,d,g=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),c=0;c<g.length;c++)d=g[c],this.addNodeToGrid(d,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(c,d,g,p){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&g||p){var y=new Set;c.surrounding=new Array;for(var b,m=this.grid,E=c.startX-1;E<c.finishX+2;E++)for(var T=c.startY-1;T<c.finishY+2;T++)if(!(E<0||T<0||E>=m.length||T>=m[0].length)){for(var L=0;L<m[E][T].length;L++)if(b=m[E][T][L],!(c.getOwner()!=b.getOwner()||c==b)&&!d.has(b)&&!y.has(b)){var w=Math.abs(c.getCenterX()-b.getCenterX())-(c.getWidth()/2+b.getWidth()/2),C=Math.abs(c.getCenterY()-b.getCenterY())-(c.getHeight()/2+b.getHeight()/2);w<=this.repulsionRange&&C<=this.repulsionRange&&y.add(b)}}c.surrounding=[].concat(i(y))}for(E=0;E<c.surrounding.length;E++)this.calcRepulsionForce(c,c.surrounding[E])},h.prototype.calcRepulsionRange=function(){return 0},r.exports=h}),(function(r,a,n){var i=n(1),o=n(4);function s(l,f,h){i.call(this,l,f,h),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}s.prototype=Object.create(i.prototype);for(var u in i)s[u]=i[u];r.exports=s}),(function(r,a,n){var i=n(3),o=n(4);function s(l,f,h,v){i.call(this,l,f,h,v),this.nodeRepulsion=o.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}s.prototype=Object.create(i.prototype);for(var u in i)s[u]=i[u];s.prototype.setGridCoordinates=function(l,f,h,v){this.startX=l,this.finishX=f,this.startY=h,this.finishY=v},r.exports=s}),(function(r,a,n){function i(o,s){this.width=0,this.height=0,o!==null&&s!==null&&(this.height=s,this.width=o)}i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(o){this.width=o},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(o){this.height=o},r.exports=i}),(function(r,a,n){var i=n(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(s,u){var l=i.createID(s);this.contains(l)||(this.map[l]=u,this.keys.push(s))},o.prototype.contains=function(s){return i.createID(s),this.map[s]!=null},o.prototype.get=function(s){var u=i.createID(s);return this.map[u]},o.prototype.keySet=function(){return this.keys},r.exports=o}),(function(r,a,n){var i=n(14);function o(){this.set={}}o.prototype.add=function(s){var u=i.createID(s);this.contains(u)||(this.set[u]=s)},o.prototype.remove=function(s){delete this.set[i.createID(s)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(s){return this.set[i.createID(s)]==s},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(s){for(var u=Object.keys(this.set),l=u.length,f=0;f<l;f++)s.push(this.set[u[f]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(s){for(var u=s.length,l=0;l<u;l++){var f=s[l];this.add(f)}},r.exports=o}),(function(r,a,n){function i(){}i.multMat=function(o,s){for(var u=[],l=0;l<o.length;l++){u[l]=[];for(var f=0;f<s[0].length;f++){u[l][f]=0;for(var h=0;h<o[0].length;h++)u[l][f]+=o[l][h]*s[h][f]}}return u},i.transpose=function(o){for(var s=[],u=0;u<o[0].length;u++){s[u]=[];for(var l=0;l<o.length;l++)s[u][l]=o[l][u]}return s},i.multCons=function(o,s){for(var u=[],l=0;l<o.length;l++)u[l]=o[l]*s;return u},i.minusOp=function(o,s){for(var u=[],l=0;l<o.length;l++)u[l]=o[l]-s[l];return u},i.dotProduct=function(o,s){for(var u=0,l=0;l<o.length;l++)u+=o[l]*s[l];return u},i.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},i.normalize=function(o){for(var s=[],u=this.mag(o),l=0;l<o.length;l++)s[l]=o[l]/u;return s},i.multGamma=function(o){for(var s=[],u=0,l=0;l<o.length;l++)u+=o[l];u*=-1/o.length;for(var f=0;f<o.length;f++)s[f]=u+o[f];return s},i.multL=function(o,s,u){for(var l=[],f=[],h=[],v=0;v<s[0].length;v++){for(var c=0,d=0;d<s.length;d++)c+=-.5*s[d][v]*o[d];f[v]=c}for(var g=0;g<u.length;g++){for(var p=0,y=0;y<u.length;y++)p+=u[g][y]*f[y];h[g]=p}for(var b=0;b<s.length;b++){for(var m=0,E=0;E<s[0].length;E++)m+=s[b][E]*h[E];l[b]=m}return l},r.exports=i}),(function(r,a,n){var i=(function(){function l(f,h){for(var v=0;v<h.length;v++){var c=h[v];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}return function(f,h,v){return h&&l(f.prototype,h),v&&l(f,v),f}})();function o(l,f){if(!(l instanceof f))throw new TypeError("Cannot call a class as a function")}var s=n(11),u=(function(){function l(f,h){o(this,l),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var v=void 0;f instanceof s?v=f.size():v=f.length,this._quicksort(f,0,v-1)}return i(l,[{key:"_quicksort",value:function(h,v,c){if(v<c){var d=this._partition(h,v,c);this._quicksort(h,v,d),this._quicksort(h,d+1,c)}}},{key:"_partition",value:function(h,v,c){for(var d=this._get(h,v),g=v,p=c;;){for(;this.compareFunction(d,this._get(h,p));)p--;for(;this.compareFunction(this._get(h,g),d);)g++;if(g<p)this._swap(h,g,p),g++,p--;else return p}}},{key:"_get",value:function(h,v){return h instanceof s?h.get_object_at(v):h[v]}},{key:"_set",value:function(h,v,c){h instanceof s?h.set_object_at(v,c):h[v]=c}},{key:"_swap",value:function(h,v,c){var d=this._get(h,v);this._set(h,v,this._get(h,c)),this._set(h,c,d)}},{key:"_defaultCompareFunction",value:function(h,v){return v>h}}]),l})();r.exports=u}),(function(r,a,n){function i(){}i.svd=function(o){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=o.length,this.n=o[0].length;var s=Math.min(this.m,this.n);this.s=(function(Ie){for(var qe=[];Ie-- >0;)qe.push(0);return qe})(Math.min(this.m+1,this.n)),this.U=(function(Ie){var qe=function ze(Ze){if(Ze.length==0)return 0;for(var tt=[],We=0;We<Ze[0];We++)tt.push(ze(Ze.slice(1)));return tt};return qe(Ie)})([this.m,s]),this.V=(function(Ie){var qe=function ze(Ze){if(Ze.length==0)return 0;for(var tt=[],We=0;We<Ze[0];We++)tt.push(ze(Ze.slice(1)));return tt};return qe(Ie)})([this.n,this.n]);for(var u=(function(Ie){for(var qe=[];Ie-- >0;)qe.push(0);return qe})(this.n),l=(function(Ie){for(var qe=[];Ie-- >0;)qe.push(0);return qe})(this.m),f=!0,h=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),c=0;c<Math.max(h,v);c++){if(c<h){this.s[c]=0;for(var d=c;d<this.m;d++)this.s[c]=i.hypot(this.s[c],o[d][c]);if(this.s[c]!==0){o[c][c]<0&&(this.s[c]=-this.s[c]);for(var g=c;g<this.m;g++)o[g][c]/=this.s[c];o[c][c]+=1}this.s[c]=-this.s[c]}for(var p=c+1;p<this.n;p++){if((function(Ie,qe){return Ie&&qe})(c<h,this.s[c]!==0)){for(var y=0,b=c;b<this.m;b++)y+=o[b][c]*o[b][p];y=-y/o[c][c];for(var m=c;m<this.m;m++)o[m][p]+=y*o[m][c]}u[p]=o[c][p]}if((function(Ie,qe){return qe})(f,c<h))for(var E=c;E<this.m;E++)this.U[E][c]=o[E][c];if(c<v){u[c]=0;for(var T=c+1;T<this.n;T++)u[c]=i.hypot(u[c],u[T]);if(u[c]!==0){u[c+1]<0&&(u[c]=-u[c]);for(var L=c+1;L<this.n;L++)u[L]/=u[c];u[c+1]+=1}if(u[c]=-u[c],(function(Ie,qe){return Ie&&qe})(c+1<this.m,u[c]!==0)){for(var w=c+1;w<this.m;w++)l[w]=0;for(var C=c+1;C<this.n;C++)for(var A=c+1;A<this.m;A++)l[A]+=u[C]*o[A][C];for(var R=c+1;R<this.n;R++)for(var S=-u[R]/u[c+1],D=c+1;D<this.m;D++)o[D][R]+=S*l[D]}for(var P=c+1;P<this.n;P++)this.V[P][c]=u[P]}}var x=Math.min(this.n,this.m+1);h<this.n&&(this.s[h]=o[h][h]),this.m<x&&(this.s[x-1]=0),v+1<x&&(u[v]=o[v][x-1]),u[x-1]=0;{for(var N=h;N<s;N++){for(var M=0;M<this.m;M++)this.U[M][N]=0;this.U[N][N]=1}for(var I=h-1;I>=0;I--)if(this.s[I]!==0){for(var O=I+1;O<s;O++){for(var k=0,F=I;F<this.m;F++)k+=this.U[F][I]*this.U[F][O];k=-k/this.U[I][I];for(var _=I;_<this.m;_++)this.U[_][O]+=k*this.U[_][I]}for(var z=I;z<this.m;z++)this.U[z][I]=-this.U[z][I];this.U[I][I]=1+this.U[I][I];for(var X=0;X<I-1;X++)this.U[X][I]=0}else{for(var q=0;q<this.m;q++)this.U[q][I]=0;this.U[I][I]=1}}for(var G=this.n-1;G>=0;G--){if((function(Ie,qe){return Ie&&qe})(G<v,u[G]!==0))for(var U=G+1;U<s;U++){for(var K=0,J=G+1;J<this.n;J++)K+=this.V[J][G]*this.V[J][U];K=-K/this.V[G+1][G];for(var H=G+1;H<this.n;H++)this.V[H][U]+=K*this.V[H][G]}for(var Y=0;Y<this.n;Y++)this.V[Y][G]=0;this.V[G][G]=1}for(var $=x-1,Q=Math.pow(2,-52),ee=Math.pow(2,-966);x>0;){var te=void 0,he=void 0;for(te=x-2;te>=-1&&te!==-1;te--)if(Math.abs(u[te])<=ee+Q*(Math.abs(this.s[te])+Math.abs(this.s[te+1]))){u[te]=0;break}if(te===x-2)he=4;else{var xe=void 0;for(xe=x-1;xe>=te&&xe!==te;xe--){var le=(xe!==x?Math.abs(u[xe]):0)+(xe!==te+1?Math.abs(u[xe-1]):0);if(Math.abs(this.s[xe])<=ee+Q*le){this.s[xe]=0;break}}xe===te?he=3:xe===x-1?he=1:(he=2,te=xe)}switch(te++,he){case 1:{var se=u[x-2];u[x-2]=0;for(var ve=x-2;ve>=te;ve--){var ce=i.hypot(this.s[ve],se),ye=this.s[ve]/ce,ge=se/ce;this.s[ve]=ce,ve!==te&&(se=-ge*u[ve-1],u[ve-1]=ye*u[ve-1]);for(var de=0;de<this.n;de++)ce=ye*this.V[de][ve]+ge*this.V[de][x-1],this.V[de][x-1]=-ge*this.V[de][ve]+ye*this.V[de][x-1],this.V[de][ve]=ce}}break;case 2:{var be=u[te-1];u[te-1]=0;for(var Re=te;Re<x;Re++){var Pe=i.hypot(this.s[Re],be),Be=this.s[Re]/Pe,Ne=be/Pe;this.s[Re]=Pe,be=-Ne*u[Re],u[Re]=Be*u[Re];for(var Me=0;Me<this.m;Me++)Pe=Be*this.U[Me][Re]+Ne*this.U[Me][te-1],this.U[Me][te-1]=-Ne*this.U[Me][Re]+Be*this.U[Me][te-1],this.U[Me][Re]=Pe}}break;case 3:{var ne=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[x-1]),Math.abs(this.s[x-2])),Math.abs(u[x-2])),Math.abs(this.s[te])),Math.abs(u[te])),B=this.s[x-1]/ne,V=this.s[x-2]/ne,W=u[x-2]/ne,Z=this.s[te]/ne,j=u[te]/ne,ae=((V+B)*(V-B)+W*W)/2,re=B*W*(B*W),ie=0;(function(Ie,qe){return Ie||qe})(ae!==0,re!==0)&&(ie=Math.sqrt(ae*ae+re),ae<0&&(ie=-ie),ie=re/(ae+ie));for(var ue=(Z+B)*(Z-B)+ie,oe=Z*j,fe=te;fe<x-1;fe++){var me=i.hypot(ue,oe),pe=ue/me,we=oe/me;fe!==te&&(u[fe-1]=me),ue=pe*this.s[fe]+we*u[fe],u[fe]=pe*u[fe]-we*this.s[fe],oe=we*this.s[fe+1],this.s[fe+1]=pe*this.s[fe+1];for(var De=0;De<this.n;De++)me=pe*this.V[De][fe]+we*this.V[De][fe+1],this.V[De][fe+1]=-we*this.V[De][fe]+pe*this.V[De][fe+1],this.V[De][fe]=me;if(me=i.hypot(ue,oe),pe=ue/me,we=oe/me,this.s[fe]=me,ue=pe*u[fe]+we*this.s[fe+1],this.s[fe+1]=-we*u[fe]+pe*this.s[fe+1],oe=we*u[fe+1],u[fe+1]=pe*u[fe+1],fe<this.m-1)for(var Le=0;Le<this.m;Le++)me=pe*this.U[Le][fe]+we*this.U[Le][fe+1],this.U[Le][fe+1]=-we*this.U[Le][fe]+pe*this.U[Le][fe+1],this.U[Le][fe]=me}u[x-2]=ue}break;case 4:{if(this.s[te]<=0){this.s[te]=this.s[te]<0?-this.s[te]:0;for(var Te=0;Te<=$;Te++)this.V[Te][te]=-this.V[Te][te]}for(;te<$&&!(this.s[te]>=this.s[te+1]);){var ke=this.s[te];if(this.s[te]=this.s[te+1],this.s[te+1]=ke,te<this.n-1)for(var Ce=0;Ce<this.n;Ce++)ke=this.V[Ce][te+1],this.V[Ce][te+1]=this.V[Ce][te],this.V[Ce][te]=ke;if(te<this.m-1)for(var Ae=0;Ae<this.m;Ae++)ke=this.U[Ae][te+1],this.U[Ae][te+1]=this.U[Ae][te],this.U[Ae][te]=ke;te++}x--}break}}var Ue={U:this.U,V:this.V,S:this.s};return Ue},i.hypot=function(o,s){var u=void 0;return Math.abs(o)>Math.abs(s)?(u=s/o,u=Math.abs(o)*Math.sqrt(1+u*u)):s!=0?(u=o/s,u=Math.abs(s)*Math.sqrt(1+u*u)):u=0,u},r.exports=i}),(function(r,a,n){var i=(function(){function u(l,f){for(var h=0;h<f.length;h++){var v=f[h];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,v.key,v)}}return function(l,f,h){return f&&u(l.prototype,f),h&&u(l,h),l}})();function o(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}var s=(function(){function u(l,f){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,u),this.sequence1=l,this.sequence2=f,this.match_score=h,this.mismatch_penalty=v,this.gap_penalty=c,this.iMax=l.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var d=0;d<this.iMax;d++){this.grid[d]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[d][g]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[p][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return i(u,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var c=1;c<this.jMax;c++){var d=void 0;this.sequence1[v-1]===this.sequence2[c-1]?d=this.grid[v-1][c-1]+this.match_score:d=this.grid[v-1][c-1]+this.mismatch_penalty;var g=this.grid[v-1][c]+this.gap_penalty,p=this.grid[v][c-1]+this.gap_penalty,y=[d,g,p],b=this.arrayAllMaxIndexes(y);this.grid[v][c]=y[b[0]],this.tracebackGrid[v][c]=[b.includes(0),b.includes(1),b.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var h=f[0],v=this.tracebackGrid[h.pos[0]][h.pos[1]];v[0]&&f.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),v[1]&&f.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),v[2]&&f.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,h){for(var v=[],c=-1;(c=f.indexOf(h,c+1))!==-1;)v.push(c);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),u})();r.exports=s}),(function(r,a,n){var i=function(){};i.FDLayout=n(18),i.FDLayoutConstants=n(4),i.FDLayoutEdge=n(19),i.FDLayoutNode=n(20),i.DimensionD=n(21),i.HashMap=n(22),i.HashSet=n(23),i.IGeometry=n(8),i.IMath=n(9),i.Integer=n(10),i.Point=n(12),i.PointD=n(5),i.RandomSeed=n(16),i.RectangleD=n(13),i.Transform=n(17),i.UniqueIDGeneretor=n(14),i.Quicksort=n(25),i.LinkedList=n(11),i.LGraphObject=n(2),i.LGraph=n(6),i.LEdge=n(1),i.LGraphManager=n(7),i.LNode=n(3),i.Layout=n(15),i.LayoutConstants=n(0),i.NeedlemanWunsch=n(27),i.Matrix=n(24),i.SVD=n(26),r.exports=i}),(function(r,a,n){function i(){this.listeners=[]}var o=i.prototype;o.addListener=function(s,u){this.listeners.push({event:s,callback:u})},o.removeListener=function(s,u){for(var l=this.listeners.length;l>=0;l--){var f=this.listeners[l];f.event===s&&f.callback===u&&this.listeners.splice(l,1)}},o.emit=function(s,u){for(var l=0;l<this.listeners.length;l++){var f=this.listeners[l];s===f.event&&f.callback(u)}},r.exports=i})])})})(si)),si.exports}var iI=oi.exports,lE;function oI(){return lE||(lE=1,(function(t,e){(function(a,n){t.exports=n(nI())})(iI,function(r){return(()=>{var a={45:((s,u,l)=>{var f={};f.layoutBase=l(551),f.CoSEConstants=l(806),f.CoSEEdge=l(767),f.CoSEGraph=l(880),f.CoSEGraphManager=l(578),f.CoSELayout=l(765),f.CoSENode=l(991),f.ConstraintHandler=l(902),s.exports=f}),806:((s,u,l)=>{var f=l(551).FDLayoutConstants;function h(){}for(var v in f)h[v]=f[v];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,h.DEFAULT_COMPONENT_SEPERATION=60,h.TILE=!0,h.TILING_PADDING_VERTICAL=10,h.TILING_PADDING_HORIZONTAL=10,h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0,h.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,h.TREE_REDUCTION_ON_INCREMENTAL=!0,h.PURE_INCREMENTAL=h.DEFAULT_INCREMENTAL,s.exports=h}),767:((s,u,l)=>{var f=l(551).FDLayoutEdge;function h(c,d,g){f.call(this,c,d,g)}h.prototype=Object.create(f.prototype);for(var v in f)h[v]=f[v];s.exports=h}),880:((s,u,l)=>{var f=l(551).LGraph;function h(c,d,g){f.call(this,c,d,g)}h.prototype=Object.create(f.prototype);for(var v in f)h[v]=f[v];s.exports=h}),578:((s,u,l)=>{var f=l(551).LGraphManager;function h(c){f.call(this,c)}h.prototype=Object.create(f.prototype);for(var v in f)h[v]=f[v];s.exports=h}),765:((s,u,l)=>{var f=l(551).FDLayout,h=l(578),v=l(880),c=l(991),d=l(767),g=l(806),p=l(902),y=l(551).FDLayoutConstants,b=l(551).LayoutConstants,m=l(551).Point,E=l(551).PointD,T=l(551).DimensionD,L=l(551).Layout,w=l(551).Integer,C=l(551).IGeometry,A=l(551).LGraph,R=l(551).Transform,S=l(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var P in f)D[P]=f[P];D.prototype.newGraphManager=function(){var x=new h(this);return this.graphManager=x,x},D.prototype.newGraph=function(x){return new v(null,this.graphManager,x)},D.prototype.newNode=function(x){return new c(this.graphManager,x)},D.prototype.newEdge=function(x){return new d(null,null,x)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(g.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=g.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=g.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=y.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=y.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=y.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/y.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var x=b.DEFAULT_CREATE_BENDS_AS_NEEDED;return x&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(g.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),M=this.nodesWithGravity.filter(function(k){return N.has(k)});this.graphManager.setAllNodesToApplyGravitation(M)}}else{var x=this.getFlatForest();if(x.length>0)this.positionNodesRadially(x);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),M=this.nodesWithGravity.filter(function(I){return N.has(I)});this.graphManager.setAllNodesToApplyGravitation(M),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(p.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),g.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%y.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var x=new Set(this.getAllNodes()),N=this.nodesWithGravity.filter(function(O){return x.has(O)});this.graphManager.setAllNodesToApplyGravitation(N),this.graphManager.updateBounds(),this.updateGrid(),g.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),g.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var M=!this.isTreeGrowing&&!this.isGrowthFinished,I=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(M,I),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var x=this.graphManager.getAllNodes(),N={},M=0;M<x.length;M++){var I=x[M].rect,O=x[M].id;N[O]={id:O,x:I.getCenterX(),y:I.getCenterY(),w:I.width,h:I.height}}return N},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var x=!1;if(y.ANIMATE==="during")this.emit("layoutstarted");else{for(;!x;)x=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var x=this.getAllNodes(),N,M=0;M<x.length;M++)N=x[M],N.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var M=0;M<x.length;M++)N=x[M],N.move()},D.prototype.initConstraintVariables=function(){var x=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var N=this.graphManager.getAllNodes(),M=0;M<N.length;M++){var I=N[M];this.idToNodeMap.set(I.id,I)}var O=function H(Y){for(var $=Y.getChild().getNodes(),Q,ee=0,te=0;te<$.length;te++)Q=$[te],Q.getChild()==null?x.fixedNodeSet.has(Q.id)&&(ee+=100):ee+=H(Q);return ee};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){x.fixedNodeSet.add($.nodeId)});for(var N=this.graphManager.getAllNodes(),I,M=0;M<N.length;M++)if(I=N[M],I.getChild()!=null){var k=O(I);k>0&&(I.fixedNodeWeight=k)}}if(this.constraints.relativePlacementConstraint){var F=new Map,_=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(H){x.fixedNodesOnHorizontal.add(H),x.fixedNodesOnVertical.add(H)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var z=this.constraints.alignmentConstraint.vertical,M=0;M<z.length;M++)this.dummyToNodeForVerticalAlignment.set("dummy"+M,[]),z[M].forEach(function(Y){F.set(Y,"dummy"+M),x.dummyToNodeForVerticalAlignment.get("dummy"+M).push(Y),x.fixedNodeSet.has(Y)&&x.fixedNodesOnHorizontal.add("dummy"+M)});if(this.constraints.alignmentConstraint.horizontal)for(var X=this.constraints.alignmentConstraint.horizontal,M=0;M<X.length;M++)this.dummyToNodeForHorizontalAlignment.set("dummy"+M,[]),X[M].forEach(function(Y){_.set(Y,"dummy"+M),x.dummyToNodeForHorizontalAlignment.get("dummy"+M).push(Y),x.fixedNodeSet.has(Y)&&x.fixedNodesOnVertical.add("dummy"+M)})}if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(H){var Y,$,Q;for(Q=H.length-1;Q>=2*H.length/3;Q--)Y=Math.floor(Math.random()*(Q+1)),$=H[Q],H[Q]=H[Y],H[Y]=$;return H},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(H){if(H.left){var Y=F.has(H.left)?F.get(H.left):H.left,$=F.has(H.right)?F.get(H.right):H.right;x.nodesInRelativeHorizontal.includes(Y)||(x.nodesInRelativeHorizontal.push(Y),x.nodeToRelativeConstraintMapHorizontal.set(Y,[]),x.dummyToNodeForVerticalAlignment.has(Y)?x.nodeToTempPositionMapHorizontal.set(Y,x.idToNodeMap.get(x.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):x.nodeToTempPositionMapHorizontal.set(Y,x.idToNodeMap.get(Y).getCenterX())),x.nodesInRelativeHorizontal.includes($)||(x.nodesInRelativeHorizontal.push($),x.nodeToRelativeConstraintMapHorizontal.set($,[]),x.dummyToNodeForVerticalAlignment.has($)?x.nodeToTempPositionMapHorizontal.set($,x.idToNodeMap.get(x.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):x.nodeToTempPositionMapHorizontal.set($,x.idToNodeMap.get($).getCenterX())),x.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:$,gap:H.gap}),x.nodeToRelativeConstraintMapHorizontal.get($).push({left:Y,gap:H.gap})}else{var Q=_.has(H.top)?_.get(H.top):H.top,ee=_.has(H.bottom)?_.get(H.bottom):H.bottom;x.nodesInRelativeVertical.includes(Q)||(x.nodesInRelativeVertical.push(Q),x.nodeToRelativeConstraintMapVertical.set(Q,[]),x.dummyToNodeForHorizontalAlignment.has(Q)?x.nodeToTempPositionMapVertical.set(Q,x.idToNodeMap.get(x.dummyToNodeForHorizontalAlignment.get(Q)[0]).getCenterY()):x.nodeToTempPositionMapVertical.set(Q,x.idToNodeMap.get(Q).getCenterY())),x.nodesInRelativeVertical.includes(ee)||(x.nodesInRelativeVertical.push(ee),x.nodeToRelativeConstraintMapVertical.set(ee,[]),x.dummyToNodeForHorizontalAlignment.has(ee)?x.nodeToTempPositionMapVertical.set(ee,x.idToNodeMap.get(x.dummyToNodeForHorizontalAlignment.get(ee)[0]).getCenterY()):x.nodeToTempPositionMapVertical.set(ee,x.idToNodeMap.get(ee).getCenterY())),x.nodeToRelativeConstraintMapVertical.get(Q).push({bottom:ee,gap:H.gap}),x.nodeToRelativeConstraintMapVertical.get(ee).push({top:Q,gap:H.gap})}});else{var q=new Map,G=new Map;this.constraints.relativePlacementConstraint.forEach(function(H){if(H.left){var Y=F.has(H.left)?F.get(H.left):H.left,$=F.has(H.right)?F.get(H.right):H.right;q.has(Y)?q.get(Y).push($):q.set(Y,[$]),q.has($)?q.get($).push(Y):q.set($,[Y])}else{var Q=_.has(H.top)?_.get(H.top):H.top,ee=_.has(H.bottom)?_.get(H.bottom):H.bottom;G.has(Q)?G.get(Q).push(ee):G.set(Q,[ee]),G.has(ee)?G.get(ee).push(Q):G.set(ee,[Q])}});var U=function(Y,$){var Q=[],ee=[],te=new S,he=new Set,xe=0;return Y.forEach(function(le,se){if(!he.has(se)){Q[xe]=[],ee[xe]=!1;var ve=se;for(te.push(ve),he.add(ve),Q[xe].push(ve);te.length!=0;){ve=te.shift(),$.has(ve)&&(ee[xe]=!0);var ce=Y.get(ve);ce.forEach(function(ye){he.has(ye)||(te.push(ye),he.add(ye),Q[xe].push(ye))})}xe++}}),{components:Q,isFixed:ee}},K=U(q,x.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.isFixed;var J=U(G,x.fixedNodesOnVertical);this.componentsOnVertical=J.components,this.fixedComponentsOnVertical=J.isFixed}}},D.prototype.updateDisplacements=function(){var x=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(J){var H=x.idToNodeMap.get(J.nodeId);H.displacementX=0,H.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var N=this.constraints.alignmentConstraint.vertical,M=0;M<N.length;M++){for(var I=0,O=0;O<N[M].length;O++){if(this.fixedNodeSet.has(N[M][O])){I=0;break}I+=this.idToNodeMap.get(N[M][O]).displacementX}for(var k=I/N[M].length,O=0;O<N[M].length;O++)this.idToNodeMap.get(N[M][O]).displacementX=k}if(this.constraints.alignmentConstraint.horizontal)for(var F=this.constraints.alignmentConstraint.horizontal,M=0;M<F.length;M++){for(var _=0,O=0;O<F[M].length;O++){if(this.fixedNodeSet.has(F[M][O])){_=0;break}_+=this.idToNodeMap.get(F[M][O]).displacementY}for(var z=_/F[M].length,O=0;O<F[M].length;O++)this.idToNodeMap.get(F[M][O]).displacementY=z}}if(this.constraints.relativePlacementConstraint)if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(J){if(!x.fixedNodesOnHorizontal.has(J)){var H=0;x.dummyToNodeForVerticalAlignment.has(J)?H=x.idToNodeMap.get(x.dummyToNodeForVerticalAlignment.get(J)[0]).displacementX:H=x.idToNodeMap.get(J).displacementX,x.nodeToRelativeConstraintMapHorizontal.get(J).forEach(function(Y){if(Y.right){var $=x.nodeToTempPositionMapHorizontal.get(Y.right)-x.nodeToTempPositionMapHorizontal.get(J)-H;$<Y.gap&&(H-=Y.gap-$)}else{var $=x.nodeToTempPositionMapHorizontal.get(J)-x.nodeToTempPositionMapHorizontal.get(Y.left)+H;$<Y.gap&&(H+=Y.gap-$)}}),x.nodeToTempPositionMapHorizontal.set(J,x.nodeToTempPositionMapHorizontal.get(J)+H),x.dummyToNodeForVerticalAlignment.has(J)?x.dummyToNodeForVerticalAlignment.get(J).forEach(function(Y){x.idToNodeMap.get(Y).displacementX=H}):x.idToNodeMap.get(J).displacementX=H}}),this.nodesInRelativeVertical.forEach(function(J){if(!x.fixedNodesOnHorizontal.has(J)){var H=0;x.dummyToNodeForHorizontalAlignment.has(J)?H=x.idToNodeMap.get(x.dummyToNodeForHorizontalAlignment.get(J)[0]).displacementY:H=x.idToNodeMap.get(J).displacementY,x.nodeToRelativeConstraintMapVertical.get(J).forEach(function(Y){if(Y.bottom){var $=x.nodeToTempPositionMapVertical.get(Y.bottom)-x.nodeToTempPositionMapVertical.get(J)-H;$<Y.gap&&(H-=Y.gap-$)}else{var $=x.nodeToTempPositionMapVertical.get(J)-x.nodeToTempPositionMapVertical.get(Y.top)+H;$<Y.gap&&(H+=Y.gap-$)}}),x.nodeToTempPositionMapVertical.set(J,x.nodeToTempPositionMapVertical.get(J)+H),x.dummyToNodeForHorizontalAlignment.has(J)?x.dummyToNodeForHorizontalAlignment.get(J).forEach(function(Y){x.idToNodeMap.get(Y).displacementY=H}):x.idToNodeMap.get(J).displacementY=H}});else{for(var M=0;M<this.componentsOnHorizontal.length;M++){var X=this.componentsOnHorizontal[M];if(this.fixedComponentsOnHorizontal[M])for(var O=0;O<X.length;O++)this.dummyToNodeForVerticalAlignment.has(X[O])?this.dummyToNodeForVerticalAlignment.get(X[O]).forEach(function(Y){x.idToNodeMap.get(Y).displacementX=0}):this.idToNodeMap.get(X[O]).displacementX=0;else{for(var q=0,G=0,O=0;O<X.length;O++)if(this.dummyToNodeForVerticalAlignment.has(X[O])){var U=this.dummyToNodeForVerticalAlignment.get(X[O]);q+=U.length*this.idToNodeMap.get(U[0]).displacementX,G+=U.length}else q+=this.idToNodeMap.get(X[O]).displacementX,G++;for(var K=q/G,O=0;O<X.length;O++)this.dummyToNodeForVerticalAlignment.has(X[O])?this.dummyToNodeForVerticalAlignment.get(X[O]).forEach(function(Y){x.idToNodeMap.get(Y).displacementX=K}):this.idToNodeMap.get(X[O]).displacementX=K}}for(var M=0;M<this.componentsOnVertical.length;M++){var X=this.componentsOnVertical[M];if(this.fixedComponentsOnVertical[M])for(var O=0;O<X.length;O++)this.dummyToNodeForHorizontalAlignment.has(X[O])?this.dummyToNodeForHorizontalAlignment.get(X[O]).forEach(function($){x.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(X[O]).displacementY=0;else{for(var q=0,G=0,O=0;O<X.length;O++)if(this.dummyToNodeForHorizontalAlignment.has(X[O])){var U=this.dummyToNodeForHorizontalAlignment.get(X[O]);q+=U.length*this.idToNodeMap.get(U[0]).displacementY,G+=U.length}else q+=this.idToNodeMap.get(X[O]).displacementY,G++;for(var K=q/G,O=0;O<X.length;O++)this.dummyToNodeForHorizontalAlignment.has(X[O])?this.dummyToNodeForHorizontalAlignment.get(X[O]).forEach(function(te){x.idToNodeMap.get(te).displacementY=K}):this.idToNodeMap.get(X[O]).displacementY=K}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var x=[],N,M=this.graphManager.getGraphs(),I=M.length,O;for(O=0;O<I;O++)N=M[O],N.updateConnected(),N.isConnected||(x=x.concat(N.getNodes()));return x},D.prototype.createBendpoints=function(){var x=[];x=x.concat(this.graphManager.getAllEdges());var N=new Set,M;for(M=0;M<x.length;M++){var I=x[M];if(!N.has(I)){var O=I.getSource(),k=I.getTarget();if(O==k)I.getBendpoints().push(new E),I.getBendpoints().push(new E),this.createDummyNodesForBendpoints(I),N.add(I);else{var F=[];if(F=F.concat(O.getEdgeListToNode(k)),F=F.concat(k.getEdgeListToNode(O)),!N.has(F[0])){if(F.length>1){var _;for(_=0;_<F.length;_++){var z=F[_];z.getBendpoints().push(new E),this.createDummyNodesForBendpoints(z)}}F.forEach(function(X){N.add(X)})}}}if(N.size==x.length)break}},D.prototype.positionNodesRadially=function(x){for(var N=new m(0,0),M=Math.ceil(Math.sqrt(x.length)),I=0,O=0,k=0,F=new E(0,0),_=0;_<x.length;_++){_%M==0&&(k=0,O=I,_!=0&&(O+=g.DEFAULT_COMPONENT_SEPERATION),I=0);var z=x[_],X=L.findCenterOfTree(z);N.x=k,N.y=O,F=D.radialLayout(z,X,N),F.y>I&&(I=Math.floor(F.y)),k=Math.floor(F.x+g.DEFAULT_COMPONENT_SEPERATION)}this.transform(new E(b.WORLD_CENTER_X-F.x/2,b.WORLD_CENTER_Y-F.y/2))},D.radialLayout=function(x,N,M){var I=Math.max(this.maxDiagonalInTree(x),g.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(N,null,0,359,0,I);var O=A.calculateBounds(x),k=new R;k.setDeviceOrgX(O.getMinX()),k.setDeviceOrgY(O.getMinY()),k.setWorldOrgX(M.x),k.setWorldOrgY(M.y);for(var F=0;F<x.length;F++){var _=x[F];_.transform(k)}var z=new E(O.getMaxX(),O.getMaxY());return k.inverseTransformPoint(z)},D.branchRadialLayout=function(x,N,M,I,O,k){var F=(I-M+1)/2;F<0&&(F+=180);var _=(F+M)%360,z=_*C.TWO_PI/360,X=O*Math.cos(z),q=O*Math.sin(z);x.setCenter(X,q);var G=[];G=G.concat(x.getEdges());var U=G.length;N!=null&&U--;for(var K=0,J=G.length,H,Y=x.getEdgesBetween(N);Y.length>1;){var $=Y[0];Y.splice(0,1);var Q=G.indexOf($);Q>=0&&G.splice(Q,1),J--,U--}N!=null?H=(G.indexOf(Y[0])+1)%J:H=0;for(var ee=Math.abs(I-M)/U,te=H;K!=U;te=++te%J){var he=G[te].getOtherEnd(x);if(he!=N){var xe=(M+K*ee)%360,le=(xe+ee)%360;D.branchRadialLayout(he,x,xe,le,O+k,k),K++}}},D.maxDiagonalInTree=function(x){for(var N=w.MIN_VALUE,M=0;M<x.length;M++){var I=x[M],O=I.getDiagonal();O>N&&(N=O)}return N},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var x=this,N={};this.memberGroups={},this.idToDummyNode={};for(var M=[],I=this.graphManager.getAllNodes(),O=0;O<I.length;O++){var k=I[O],F=k.getParent();this.getNodeDegreeWithChildren(k)===0&&(F.id==null||!this.getToBeTiled(F))&&M.push(k)}for(var O=0;O<M.length;O++){var k=M[O],_=k.getParent().id;typeof N[_]>"u"&&(N[_]=[]),N[_]=N[_].concat(k)}Object.keys(N).forEach(function(z){if(N[z].length>1){var X="DummyCompound_"+z;x.memberGroups[X]=N[z];var q=N[z][0].getParent(),G=new c(x.graphManager);G.id=X,G.paddingLeft=q.paddingLeft||0,G.paddingRight=q.paddingRight||0,G.paddingBottom=q.paddingBottom||0,G.paddingTop=q.paddingTop||0,x.idToDummyNode[X]=G;var U=x.getGraphManager().add(x.newGraph(),G),K=q.getChild();K.add(G);for(var J=0;J<N[z].length;J++){var H=N[z][J];K.remove(H),U.add(H)}}})},D.prototype.clearCompounds=function(){var x={},N={};this.performDFSOnCompounds();for(var M=0;M<this.compoundOrder.length;M++)N[this.compoundOrder[M].id]=this.compoundOrder[M],x[this.compoundOrder[M].id]=[].concat(this.compoundOrder[M].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[M].getChild()),this.compoundOrder[M].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(x,N)},D.prototype.clearZeroDegreeMembers=function(){var x=this,N=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(M){var I=x.idToDummyNode[M];if(N[M]=x.tileNodes(x.memberGroups[M],I.paddingLeft+I.paddingRight),I.rect.width=N[M].width,I.rect.height=N[M].height,I.setCenter(N[M].centerX,N[M].centerY),I.labelMarginLeft=0,I.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var O=I.rect.width,k=I.rect.height;I.labelWidth&&(I.labelPosHorizontal=="left"?(I.rect.x-=I.labelWidth,I.setWidth(O+I.labelWidth),I.labelMarginLeft=I.labelWidth):I.labelPosHorizontal=="center"&&I.labelWidth>O?(I.rect.x-=(I.labelWidth-O)/2,I.setWidth(I.labelWidth),I.labelMarginLeft=(I.labelWidth-O)/2):I.labelPosHorizontal=="right"&&I.setWidth(O+I.labelWidth)),I.labelHeight&&(I.labelPosVertical=="top"?(I.rect.y-=I.labelHeight,I.setHeight(k+I.labelHeight),I.labelMarginTop=I.labelHeight):I.labelPosVertical=="center"&&I.labelHeight>k?(I.rect.y-=(I.labelHeight-k)/2,I.setHeight(I.labelHeight),I.labelMarginTop=(I.labelHeight-k)/2):I.labelPosVertical=="bottom"&&I.setHeight(k+I.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var x=this.compoundOrder.length-1;x>=0;x--){var N=this.compoundOrder[x],M=N.id,I=N.paddingLeft,O=N.paddingTop,k=N.labelMarginLeft,F=N.labelMarginTop;this.adjustLocations(this.tiledMemberPack[M],N.rect.x,N.rect.y,I,O,k,F)}},D.prototype.repopulateZeroDegreeMembers=function(){var x=this,N=this.tiledZeroDegreePack;Object.keys(N).forEach(function(M){var I=x.idToDummyNode[M],O=I.paddingLeft,k=I.paddingTop,F=I.labelMarginLeft,_=I.labelMarginTop;x.adjustLocations(N[M],I.rect.x,I.rect.y,O,k,F,_)})},D.prototype.getToBeTiled=function(x){var N=x.id;if(this.toBeTiled[N]!=null)return this.toBeTiled[N];var M=x.getChild();if(M==null)return this.toBeTiled[N]=!1,!1;for(var I=M.getNodes(),O=0;O<I.length;O++){var k=I[O];if(this.getNodeDegree(k)>0)return this.toBeTiled[N]=!1,!1;if(k.getChild()==null){this.toBeTiled[k.id]=!1;continue}if(!this.getToBeTiled(k))return this.toBeTiled[N]=!1,!1}return this.toBeTiled[N]=!0,!0},D.prototype.getNodeDegree=function(x){x.id;for(var N=x.getEdges(),M=0,I=0;I<N.length;I++){var O=N[I];O.getSource().id!==O.getTarget().id&&(M=M+1)}return M},D.prototype.getNodeDegreeWithChildren=function(x){var N=this.getNodeDegree(x);if(x.getChild()==null)return N;for(var M=x.getChild().getNodes(),I=0;I<M.length;I++){var O=M[I];N+=this.getNodeDegreeWithChildren(O)}return N},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(x){for(var N=0;N<x.length;N++){var M=x[N];M.getChild()!=null&&this.fillCompexOrderByDFS(M.getChild().getNodes()),this.getToBeTiled(M)&&this.compoundOrder.push(M)}},D.prototype.adjustLocations=function(x,N,M,I,O,k,F){N+=I+k,M+=O+F;for(var _=N,z=0;z<x.rows.length;z++){var X=x.rows[z];N=_;for(var q=0,G=0;G<X.length;G++){var U=X[G];U.rect.x=N,U.rect.y=M,N+=U.rect.width+x.horizontalPadding,U.rect.height>q&&(q=U.rect.height)}M+=q+x.verticalPadding}},D.prototype.tileCompoundMembers=function(x,N){var M=this;this.tiledMemberPack=[],Object.keys(x).forEach(function(I){var O=N[I];if(M.tiledMemberPack[I]=M.tileNodes(x[I],O.paddingLeft+O.paddingRight),O.rect.width=M.tiledMemberPack[I].width,O.rect.height=M.tiledMemberPack[I].height,O.setCenter(M.tiledMemberPack[I].centerX,M.tiledMemberPack[I].centerY),O.labelMarginLeft=0,O.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var k=O.rect.width,F=O.rect.height;O.labelWidth&&(O.labelPosHorizontal=="left"?(O.rect.x-=O.labelWidth,O.setWidth(k+O.labelWidth),O.labelMarginLeft=O.labelWidth):O.labelPosHorizontal=="center"&&O.labelWidth>k?(O.rect.x-=(O.labelWidth-k)/2,O.setWidth(O.labelWidth),O.labelMarginLeft=(O.labelWidth-k)/2):O.labelPosHorizontal=="right"&&O.setWidth(k+O.labelWidth)),O.labelHeight&&(O.labelPosVertical=="top"?(O.rect.y-=O.labelHeight,O.setHeight(F+O.labelHeight),O.labelMarginTop=O.labelHeight):O.labelPosVertical=="center"&&O.labelHeight>F?(O.rect.y-=(O.labelHeight-F)/2,O.setHeight(O.labelHeight),O.labelMarginTop=(O.labelHeight-F)/2):O.labelPosVertical=="bottom"&&O.setHeight(F+O.labelHeight))}})},D.prototype.tileNodes=function(x,N){var M=this.tileNodesByFavoringDim(x,N,!0),I=this.tileNodesByFavoringDim(x,N,!1),O=this.getOrgRatio(M),k=this.getOrgRatio(I),F;return k<O?F=I:F=M,F},D.prototype.getOrgRatio=function(x){var N=x.width,M=x.height,I=N/M;return I<1&&(I=1/I),I},D.prototype.calcIdealRowWidth=function(x,N){var M=g.TILING_PADDING_VERTICAL,I=g.TILING_PADDING_HORIZONTAL,O=x.length,k=0,F=0,_=0;x.forEach(function(J){k+=J.getWidth(),F+=J.getHeight(),J.getWidth()>_&&(_=J.getWidth())});var z=k/O,X=F/O,q=Math.pow(M-I,2)+4*(z+I)*(X+M)*O,G=(I-M+Math.sqrt(q))/(2*(z+I)),U;N?(U=Math.ceil(G),U==G&&U++):U=Math.floor(G);var K=U*(z+I)-I;return _>K&&(K=_),K+=I*2,K},D.prototype.tileNodesByFavoringDim=function(x,N,M){var I=g.TILING_PADDING_VERTICAL,O=g.TILING_PADDING_HORIZONTAL,k=g.TILING_COMPARE_BY,F={rows:[],rowWidth:[],rowHeight:[],width:0,height:N,verticalPadding:I,horizontalPadding:O,centerX:0,centerY:0};k&&(F.idealRowWidth=this.calcIdealRowWidth(x,M));var _=function(H){return H.rect.width*H.rect.height},z=function(H,Y){return _(Y)-_(H)};x.sort(function(J,H){var Y=z;return F.idealRowWidth?(Y=k,Y(J.id,H.id)):Y(J,H)});for(var X=0,q=0,G=0;G<x.length;G++){var U=x[G];X+=U.getCenterX(),q+=U.getCenterY()}F.centerX=X/x.length,F.centerY=q/x.length;for(var G=0;G<x.length;G++){var U=x[G];if(F.rows.length==0)this.insertNodeToRow(F,U,0,N);else if(this.canAddHorizontal(F,U.rect.width,U.rect.height)){var K=F.rows.length-1;F.idealRowWidth||(K=this.getShortestRowIndex(F)),this.insertNodeToRow(F,U,K,N)}else this.insertNodeToRow(F,U,F.rows.length,N);this.shiftToLastRow(F)}return F},D.prototype.insertNodeToRow=function(x,N,M,I){var O=I;if(M==x.rows.length){var k=[];x.rows.push(k),x.rowWidth.push(O),x.rowHeight.push(0)}var F=x.rowWidth[M]+N.rect.width;x.rows[M].length>0&&(F+=x.horizontalPadding),x.rowWidth[M]=F,x.width<F&&(x.width=F);var _=N.rect.height;M>0&&(_+=x.verticalPadding);var z=0;_>x.rowHeight[M]&&(z=x.rowHeight[M],x.rowHeight[M]=_,z=x.rowHeight[M]-z),x.height+=z,x.rows[M].push(N)},D.prototype.getShortestRowIndex=function(x){for(var N=-1,M=Number.MAX_VALUE,I=0;I<x.rows.length;I++)x.rowWidth[I]<M&&(N=I,M=x.rowWidth[I]);return N},D.prototype.getLongestRowIndex=function(x){for(var N=-1,M=Number.MIN_VALUE,I=0;I<x.rows.length;I++)x.rowWidth[I]>M&&(N=I,M=x.rowWidth[I]);return N},D.prototype.canAddHorizontal=function(x,N,M){if(x.idealRowWidth){var I=x.rows.length-1,O=x.rowWidth[I];return O+N+x.horizontalPadding<=x.idealRowWidth}var k=this.getShortestRowIndex(x);if(k<0)return!0;var F=x.rowWidth[k];if(F+x.horizontalPadding+N<=x.width)return!0;var _=0;x.rowHeight[k]<M&&k>0&&(_=M+x.verticalPadding-x.rowHeight[k]);var z;x.width-F>=N+x.horizontalPadding?z=(x.height+_)/(F+N+x.horizontalPadding):z=(x.height+_)/x.width,_=M+x.verticalPadding;var X;return x.width<N?X=(x.height+_)/N:X=(x.height+_)/x.width,X<1&&(X=1/X),z<1&&(z=1/z),z<X},D.prototype.shiftToLastRow=function(x){var N=this.getLongestRowIndex(x),M=x.rowWidth.length-1,I=x.rows[N],O=I[I.length-1],k=O.width+x.horizontalPadding;if(x.width-x.rowWidth[M]>k&&N!=M){I.splice(-1,1),x.rows[M].push(O),x.rowWidth[N]=x.rowWidth[N]-k,x.rowWidth[M]=x.rowWidth[M]+k,x.width=x.rowWidth[instance.getLongestRowIndex(x)];for(var F=Number.MIN_VALUE,_=0;_<I.length;_++)I[_].height>F&&(F=I[_].height);N>0&&(F+=x.verticalPadding);var z=x.rowHeight[N]+x.rowHeight[M];x.rowHeight[N]=F,x.rowHeight[M]<O.height+x.verticalPadding&&(x.rowHeight[M]=O.height+x.verticalPadding);var X=x.rowHeight[N]+x.rowHeight[M];x.height+=X-z,this.shiftToLastRow(x)}},D.prototype.tilingPreLayout=function(){g.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){g.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var x=[],N=!0,M;N;){var I=this.graphManager.getAllNodes(),O=[];N=!1;for(var k=0;k<I.length;k++)if(M=I[k],M.getEdges().length==1&&!M.getEdges()[0].isInterGraph&&M.getChild()==null){if(g.PURE_INCREMENTAL){var F=M.getEdges()[0].getOtherEnd(M),_=new T(M.getCenterX()-F.getCenterX(),M.getCenterY()-F.getCenterY());O.push([M,M.getEdges()[0],M.getOwner(),_])}else O.push([M,M.getEdges()[0],M.getOwner()]);N=!0}if(N==!0){for(var z=[],X=0;X<O.length;X++)O[X][0].getEdges().length==1&&(z.push(O[X]),O[X][0].getOwner().remove(O[X][0]));x.push(z),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=x},D.prototype.growTree=function(x){for(var N=x.length,M=x[N-1],I,O=0;O<M.length;O++)I=M[O],this.findPlaceforPrunedNode(I),I[2].add(I[0]),I[2].add(I[1],I[1].source,I[1].target);x.splice(x.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(x){var N,M,I=x[0];if(I==x[1].source?M=x[1].target:M=x[1].source,g.PURE_INCREMENTAL)I.setCenter(M.getCenterX()+x[3].getWidth(),M.getCenterY()+x[3].getHeight());else{var O=M.startX,k=M.finishX,F=M.startY,_=M.finishY,z=0,X=0,q=0,G=0,U=[z,q,X,G];if(F>0)for(var K=O;K<=k;K++)U[0]+=this.grid[K][F-1].length+this.grid[K][F].length-1;if(k<this.grid.length-1)for(var K=F;K<=_;K++)U[1]+=this.grid[k+1][K].length+this.grid[k][K].length-1;if(_<this.grid[0].length-1)for(var K=O;K<=k;K++)U[2]+=this.grid[K][_+1].length+this.grid[K][_].length-1;if(O>0)for(var K=F;K<=_;K++)U[3]+=this.grid[O-1][K].length+this.grid[O][K].length-1;for(var J=w.MAX_VALUE,H,Y,$=0;$<U.length;$++)U[$]<J?(J=U[$],H=1,Y=$):U[$]==J&&H++;if(H==3&&J==0)U[0]==0&&U[1]==0&&U[2]==0?N=1:U[0]==0&&U[1]==0&&U[3]==0?N=0:U[0]==0&&U[2]==0&&U[3]==0?N=3:U[1]==0&&U[2]==0&&U[3]==0&&(N=2);else if(H==2&&J==0){var Q=Math.floor(Math.random()*2);U[0]==0&&U[1]==0?Q==0?N=0:N=1:U[0]==0&&U[2]==0?Q==0?N=0:N=2:U[0]==0&&U[3]==0?Q==0?N=0:N=3:U[1]==0&&U[2]==0?Q==0?N=1:N=2:U[1]==0&&U[3]==0?Q==0?N=1:N=3:Q==0?N=2:N=3}else if(H==4&&J==0){var Q=Math.floor(Math.random()*4);N=Q}else N=Y;N==0?I.setCenter(M.getCenterX(),M.getCenterY()-M.getHeight()/2-y.DEFAULT_EDGE_LENGTH-I.getHeight()/2):N==1?I.setCenter(M.getCenterX()+M.getWidth()/2+y.DEFAULT_EDGE_LENGTH+I.getWidth()/2,M.getCenterY()):N==2?I.setCenter(M.getCenterX(),M.getCenterY()+M.getHeight()/2+y.DEFAULT_EDGE_LENGTH+I.getHeight()/2):I.setCenter(M.getCenterX()-M.getWidth()/2-y.DEFAULT_EDGE_LENGTH-I.getWidth()/2,M.getCenterY())}},s.exports=D}),991:((s,u,l)=>{var f=l(551).FDLayoutNode,h=l(551).IMath;function v(d,g,p,y){f.call(this,d,g,p,y)}v.prototype=Object.create(f.prototype);for(var c in f)v[c]=f[c];v.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(d,g){for(var p=this.getChild().getNodes(),y,b=0;b<p.length;b++)y=p[b],y.getChild()==null?(y.displacementX+=d,y.displacementY+=g):y.propogateDisplacementToChildren(d,g)},v.prototype.move=function(){var d=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),d.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},v.prototype.setPred1=function(d){this.pred1=d},v.prototype.getPred1=function(){return pred1},v.prototype.getPred2=function(){return pred2},v.prototype.setNext=function(d){this.next=d},v.prototype.getNext=function(){return next},v.prototype.setProcessed=function(d){this.processed=d},v.prototype.isProcessed=function(){return processed},s.exports=v}),902:((s,u,l)=>{function f(p){if(Array.isArray(p)){for(var y=0,b=Array(p.length);y<p.length;y++)b[y]=p[y];return b}else return Array.from(p)}var h=l(806),v=l(551).LinkedList,c=l(551).Matrix,d=l(551).SVD;function g(){}g.handleConstraints=function(p){var y={};y.fixedNodeConstraint=p.constraints.fixedNodeConstraint,y.alignmentConstraint=p.constraints.alignmentConstraint,y.relativePlacementConstraint=p.constraints.relativePlacementConstraint;for(var b=new Map,m=new Map,E=[],T=[],L=p.getAllNodes(),w=0,C=0;C<L.length;C++){var A=L[C];A.getChild()==null&&(m.set(A.id,w++),E.push(A.getCenterX()),T.push(A.getCenterY()),b.set(A.id,A))}y.relativePlacementConstraint&&y.relativePlacementConstraint.forEach(function(V){!V.gap&&V.gap!=0&&(V.left?V.gap=h.DEFAULT_EDGE_LENGTH+b.get(V.left).getWidth()/2+b.get(V.right).getWidth()/2:V.gap=h.DEFAULT_EDGE_LENGTH+b.get(V.top).getHeight()/2+b.get(V.bottom).getHeight()/2)});var R=function(W,Z){return{x:W.x-Z.x,y:W.y-Z.y}},S=function(W){var Z=0,j=0;return W.forEach(function(ae){Z+=E[m.get(ae)],j+=T[m.get(ae)]}),{x:Z/W.size,y:j/W.size}},D=function(W,Z,j,ae,re){function ie(Le,Te){var ke=new Set(Le),Ce=!0,Ae=!1,Ue=void 0;try{for(var Ie=Te[Symbol.iterator](),qe;!(Ce=(qe=Ie.next()).done);Ce=!0){var ze=qe.value;ke.add(ze)}}catch(Ze){Ae=!0,Ue=Ze}finally{try{!Ce&&Ie.return&&Ie.return()}finally{if(Ae)throw Ue}}return ke}var ue=new Map;W.forEach(function(Le,Te){ue.set(Te,0)}),W.forEach(function(Le,Te){Le.forEach(function(ke){ue.set(ke.id,ue.get(ke.id)+1)})});var oe=new Map,fe=new Map,me=new v;ue.forEach(function(Le,Te){Le==0?(me.push(Te),j||(Z=="horizontal"?oe.set(Te,m.has(Te)?E[m.get(Te)]:ae.get(Te)):oe.set(Te,m.has(Te)?T[m.get(Te)]:ae.get(Te)))):oe.set(Te,Number.NEGATIVE_INFINITY),j&&fe.set(Te,new Set([Te]))}),j&&re.forEach(function(Le){var Te=[];if(Le.forEach(function(Ae){j.has(Ae)&&Te.push(Ae)}),Te.length>0){var ke=0;Te.forEach(function(Ae){Z=="horizontal"?(oe.set(Ae,m.has(Ae)?E[m.get(Ae)]:ae.get(Ae)),ke+=oe.get(Ae)):(oe.set(Ae,m.has(Ae)?T[m.get(Ae)]:ae.get(Ae)),ke+=oe.get(Ae))}),ke=ke/Te.length,Le.forEach(function(Ae){j.has(Ae)||oe.set(Ae,ke)})}else{var Ce=0;Le.forEach(function(Ae){Z=="horizontal"?Ce+=m.has(Ae)?E[m.get(Ae)]:ae.get(Ae):Ce+=m.has(Ae)?T[m.get(Ae)]:ae.get(Ae)}),Ce=Ce/Le.length,Le.forEach(function(Ae){oe.set(Ae,Ce)})}});for(var pe=function(){var Te=me.shift(),ke=W.get(Te);ke.forEach(function(Ce){if(oe.get(Ce.id)<oe.get(Te)+Ce.gap)if(j&&j.has(Ce.id)){var Ae=void 0;if(Z=="horizontal"?Ae=m.has(Ce.id)?E[m.get(Ce.id)]:ae.get(Ce.id):Ae=m.has(Ce.id)?T[m.get(Ce.id)]:ae.get(Ce.id),oe.set(Ce.id,Ae),Ae<oe.get(Te)+Ce.gap){var Ue=oe.get(Te)+Ce.gap-Ae;fe.get(Te).forEach(function(Ie){oe.set(Ie,oe.get(Ie)-Ue)})}}else oe.set(Ce.id,oe.get(Te)+Ce.gap);ue.set(Ce.id,ue.get(Ce.id)-1),ue.get(Ce.id)==0&&me.push(Ce.id),j&&fe.set(Ce.id,ie(fe.get(Te),fe.get(Ce.id)))})};me.length!=0;)pe();if(j){var we=new Set;W.forEach(function(Le,Te){Le.length==0&&we.add(Te)});var De=[];fe.forEach(function(Le,Te){if(we.has(Te)){var ke=!1,Ce=!0,Ae=!1,Ue=void 0;try{for(var Ie=Le[Symbol.iterator](),qe;!(Ce=(qe=Ie.next()).done);Ce=!0){var ze=qe.value;j.has(ze)&&(ke=!0)}}catch(We){Ae=!0,Ue=We}finally{try{!Ce&&Ie.return&&Ie.return()}finally{if(Ae)throw Ue}}if(!ke){var Ze=!1,tt=void 0;De.forEach(function(We,Nt){We.has([].concat(f(Le))[0])&&(Ze=!0,tt=Nt)}),Ze?Le.forEach(function(We){De[tt].add(We)}):De.push(new Set(Le))}}}),De.forEach(function(Le,Te){var ke=Number.POSITIVE_INFINITY,Ce=Number.POSITIVE_INFINITY,Ae=Number.NEGATIVE_INFINITY,Ue=Number.NEGATIVE_INFINITY,Ie=!0,qe=!1,ze=void 0;try{for(var Ze=Le[Symbol.iterator](),tt;!(Ie=(tt=Ze.next()).done);Ie=!0){var We=tt.value,Nt=void 0;Z=="horizontal"?Nt=m.has(We)?E[m.get(We)]:ae.get(We):Nt=m.has(We)?T[m.get(We)]:ae.get(We);var Pt=oe.get(We);Nt<ke&&(ke=Nt),Nt>Ae&&(Ae=Nt),Pt<Ce&&(Ce=Pt),Pt>Ue&&(Ue=Pt)}}catch(mr){qe=!0,ze=mr}finally{try{!Ie&&Ze.return&&Ze.return()}finally{if(qe)throw ze}}var mt=(ke+Ae)/2-(Ce+Ue)/2,at=!0,ut=!1,Gt=void 0;try{for(var lt=Le[Symbol.iterator](),qr;!(at=(qr=lt.next()).done);at=!0){var yr=qr.value;oe.set(yr,oe.get(yr)+mt)}}catch(mr){ut=!0,Gt=mr}finally{try{!at&&lt.return&&lt.return()}finally{if(ut)throw Gt}}})}return oe},P=function(W){var Z=0,j=0,ae=0,re=0;if(W.forEach(function(fe){fe.left?E[m.get(fe.left)]-E[m.get(fe.right)]>=0?Z++:j++:T[m.get(fe.top)]-T[m.get(fe.bottom)]>=0?ae++:re++}),Z>j&&ae>re)for(var ie=0;ie<m.size;ie++)E[ie]=-1*E[ie],T[ie]=-1*T[ie];else if(Z>j)for(var ue=0;ue<m.size;ue++)E[ue]=-1*E[ue];else if(ae>re)for(var oe=0;oe<m.size;oe++)T[oe]=-1*T[oe]},x=function(W){var Z=[],j=new v,ae=new Set,re=0;return W.forEach(function(ie,ue){if(!ae.has(ue)){Z[re]=[];var oe=ue;for(j.push(oe),ae.add(oe),Z[re].push(oe);j.length!=0;){oe=j.shift();var fe=W.get(oe);fe.forEach(function(me){ae.has(me.id)||(j.push(me.id),ae.add(me.id),Z[re].push(me.id))})}re++}}),Z},N=function(W){var Z=new Map;return W.forEach(function(j,ae){Z.set(ae,[])}),W.forEach(function(j,ae){j.forEach(function(re){Z.get(ae).push(re),Z.get(re.id).push({id:ae,gap:re.gap,direction:re.direction})})}),Z},M=function(W){var Z=new Map;return W.forEach(function(j,ae){Z.set(ae,[])}),W.forEach(function(j,ae){j.forEach(function(re){Z.get(re.id).push({id:ae,gap:re.gap,direction:re.direction})})}),Z},I=[],O=[],k=!1,F=!1,_=new Set,z=new Map,X=new Map,q=[];if(y.fixedNodeConstraint&&y.fixedNodeConstraint.forEach(function(V){_.add(V.nodeId)}),y.relativePlacementConstraint&&(y.relativePlacementConstraint.forEach(function(V){V.left?(z.has(V.left)?z.get(V.left).push({id:V.right,gap:V.gap,direction:"horizontal"}):z.set(V.left,[{id:V.right,gap:V.gap,direction:"horizontal"}]),z.has(V.right)||z.set(V.right,[])):(z.has(V.top)?z.get(V.top).push({id:V.bottom,gap:V.gap,direction:"vertical"}):z.set(V.top,[{id:V.bottom,gap:V.gap,direction:"vertical"}]),z.has(V.bottom)||z.set(V.bottom,[]))}),X=N(z),q=x(X)),h.TRANSFORM_ON_CONSTRAINT_HANDLING){if(y.fixedNodeConstraint&&y.fixedNodeConstraint.length>1)y.fixedNodeConstraint.forEach(function(V,W){I[W]=[V.position.x,V.position.y],O[W]=[E[m.get(V.nodeId)],T[m.get(V.nodeId)]]}),k=!0;else if(y.alignmentConstraint)(function(){var V=0;if(y.alignmentConstraint.vertical){for(var W=y.alignmentConstraint.vertical,Z=function(oe){var fe=new Set;W[oe].forEach(function(we){fe.add(we)});var me=new Set([].concat(f(fe)).filter(function(we){return _.has(we)})),pe=void 0;me.size>0?pe=E[m.get(me.values().next().value)]:pe=S(fe).x,W[oe].forEach(function(we){I[V]=[pe,T[m.get(we)]],O[V]=[E[m.get(we)],T[m.get(we)]],V++})},j=0;j<W.length;j++)Z(j);k=!0}if(y.alignmentConstraint.horizontal){for(var ae=y.alignmentConstraint.horizontal,re=function(oe){var fe=new Set;ae[oe].forEach(function(we){fe.add(we)});var me=new Set([].concat(f(fe)).filter(function(we){return _.has(we)})),pe=void 0;me.size>0?pe=E[m.get(me.values().next().value)]:pe=S(fe).y,ae[oe].forEach(function(we){I[V]=[E[m.get(we)],pe],O[V]=[E[m.get(we)],T[m.get(we)]],V++})},ie=0;ie<ae.length;ie++)re(ie);k=!0}y.relativePlacementConstraint&&(F=!0)})();else if(y.relativePlacementConstraint){for(var G=0,U=0,K=0;K<q.length;K++)q[K].length>G&&(G=q[K].length,U=K);if(G<X.size/2)P(y.relativePlacementConstraint),k=!1,F=!1;else{var J=new Map,H=new Map,Y=[];q[U].forEach(function(V){z.get(V).forEach(function(W){W.direction=="horizontal"?(J.has(V)?J.get(V).push(W):J.set(V,[W]),J.has(W.id)||J.set(W.id,[]),Y.push({left:V,right:W.id})):(H.has(V)?H.get(V).push(W):H.set(V,[W]),H.has(W.id)||H.set(W.id,[]),Y.push({top:V,bottom:W.id}))})}),P(Y),F=!1;var $=D(J,"horizontal"),Q=D(H,"vertical");q[U].forEach(function(V,W){O[W]=[E[m.get(V)],T[m.get(V)]],I[W]=[],$.has(V)?I[W][0]=$.get(V):I[W][0]=E[m.get(V)],Q.has(V)?I[W][1]=Q.get(V):I[W][1]=T[m.get(V)]}),k=!0}}if(k){for(var ee=void 0,te=c.transpose(I),he=c.transpose(O),xe=0;xe<te.length;xe++)te[xe]=c.multGamma(te[xe]),he[xe]=c.multGamma(he[xe]);var le=c.multMat(te,c.transpose(he)),se=d.svd(le);ee=c.multMat(se.V,c.transpose(se.U));for(var ve=0;ve<m.size;ve++){var ce=[E[ve],T[ve]],ye=[ee[0][0],ee[1][0]],ge=[ee[0][1],ee[1][1]];E[ve]=c.dotProduct(ce,ye),T[ve]=c.dotProduct(ce,ge)}F&&P(y.relativePlacementConstraint)}}if(h.ENFORCE_CONSTRAINTS){if(y.fixedNodeConstraint&&y.fixedNodeConstraint.length>0){var de={x:0,y:0};y.fixedNodeConstraint.forEach(function(V,W){var Z={x:E[m.get(V.nodeId)],y:T[m.get(V.nodeId)]},j=V.position,ae=R(j,Z);de.x+=ae.x,de.y+=ae.y}),de.x/=y.fixedNodeConstraint.length,de.y/=y.fixedNodeConstraint.length,E.forEach(function(V,W){E[W]+=de.x}),T.forEach(function(V,W){T[W]+=de.y}),y.fixedNodeConstraint.forEach(function(V){E[m.get(V.nodeId)]=V.position.x,T[m.get(V.nodeId)]=V.position.y})}if(y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var be=y.alignmentConstraint.vertical,Re=function(W){var Z=new Set;be[W].forEach(function(re){Z.add(re)});var j=new Set([].concat(f(Z)).filter(function(re){return _.has(re)})),ae=void 0;j.size>0?ae=E[m.get(j.values().next().value)]:ae=S(Z).x,Z.forEach(function(re){_.has(re)||(E[m.get(re)]=ae)})},Pe=0;Pe<be.length;Pe++)Re(Pe);if(y.alignmentConstraint.horizontal)for(var Be=y.alignmentConstraint.horizontal,Ne=function(W){var Z=new Set;Be[W].forEach(function(re){Z.add(re)});var j=new Set([].concat(f(Z)).filter(function(re){return _.has(re)})),ae=void 0;j.size>0?ae=T[m.get(j.values().next().value)]:ae=S(Z).y,Z.forEach(function(re){_.has(re)||(T[m.get(re)]=ae)})},Me=0;Me<Be.length;Me++)Ne(Me)}y.relativePlacementConstraint&&(function(){var V=new Map,W=new Map,Z=new Map,j=new Map,ae=new Map,re=new Map,ie=new Set,ue=new Set;if(_.forEach(function(vt){ie.add(vt),ue.add(vt)}),y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var oe=y.alignmentConstraint.vertical,fe=function(Fe){Z.set("dummy"+Fe,[]),oe[Fe].forEach(function(Ve){V.set(Ve,"dummy"+Fe),Z.get("dummy"+Fe).push(Ve),_.has(Ve)&&ie.add("dummy"+Fe)}),ae.set("dummy"+Fe,E[m.get(oe[Fe][0])])},me=0;me<oe.length;me++)fe(me);if(y.alignmentConstraint.horizontal)for(var pe=y.alignmentConstraint.horizontal,we=function(Fe){j.set("dummy"+Fe,[]),pe[Fe].forEach(function(Ve){W.set(Ve,"dummy"+Fe),j.get("dummy"+Fe).push(Ve),_.has(Ve)&&ue.add("dummy"+Fe)}),re.set("dummy"+Fe,T[m.get(pe[Fe][0])])},De=0;De<pe.length;De++)we(De)}var Le=new Map,Te=new Map,ke=function(Fe){z.get(Fe).forEach(function(Ve){var Xt=void 0,bt=void 0;Ve.direction=="horizontal"?(Xt=V.get(Fe)?V.get(Fe):Fe,V.get(Ve.id)?bt={id:V.get(Ve.id),gap:Ve.gap,direction:Ve.direction}:bt=Ve,Le.has(Xt)?Le.get(Xt).push(bt):Le.set(Xt,[bt]),Le.has(bt.id)||Le.set(bt.id,[])):(Xt=W.get(Fe)?W.get(Fe):Fe,W.get(Ve.id)?bt={id:W.get(Ve.id),gap:Ve.gap,direction:Ve.direction}:bt=Ve,Te.has(Xt)?Te.get(Xt).push(bt):Te.set(Xt,[bt]),Te.has(bt.id)||Te.set(bt.id,[]))})},Ce=!0,Ae=!1,Ue=void 0;try{for(var Ie=z.keys()[Symbol.iterator](),qe;!(Ce=(qe=Ie.next()).done);Ce=!0){var ze=qe.value;ke(ze)}}catch(vt){Ae=!0,Ue=vt}finally{try{!Ce&&Ie.return&&Ie.return()}finally{if(Ae)throw Ue}}var Ze=N(Le),tt=N(Te),We=x(Ze),Nt=x(tt),Pt=M(Le),mt=M(Te),at=[],ut=[];We.forEach(function(vt,Fe){at[Fe]=[],vt.forEach(function(Ve){Pt.get(Ve).length==0&&at[Fe].push(Ve)})}),Nt.forEach(function(vt,Fe){ut[Fe]=[],vt.forEach(function(Ve){mt.get(Ve).length==0&&ut[Fe].push(Ve)})});var Gt=D(Le,"horizontal",ie,ae,at),lt=D(Te,"vertical",ue,re,ut),qr=function(Fe){Z.get(Fe)?Z.get(Fe).forEach(function(Ve){E[m.get(Ve)]=Gt.get(Fe)}):E[m.get(Fe)]=Gt.get(Fe)},yr=!0,mr=!1,Mn=void 0;try{for(var ka=Gt.keys()[Symbol.iterator](),On;!(yr=(On=ka.next()).done);yr=!0){var qa=On.value;qr(qa)}}catch(vt){mr=!0,Mn=vt}finally{try{!yr&&ka.return&&ka.return()}finally{if(mr)throw Mn}}var so=function(Fe){j.get(Fe)?j.get(Fe).forEach(function(Ve){T[m.get(Ve)]=lt.get(Fe)}):T[m.get(Fe)]=lt.get(Fe)},sr=!0,ia=!1,Gr=void 0;try{for(var oa=lt.keys()[Symbol.iterator](),Ga;!(sr=(Ga=oa.next()).done);sr=!0){var qa=Ga.value;so(qa)}}catch(vt){ia=!0,Gr=vt}finally{try{!sr&&oa.return&&oa.return()}finally{if(ia)throw Gr}}})()}for(var ne=0;ne<L.length;ne++){var B=L[ne];B.getChild()==null&&B.setCenter(E[m.get(B.id)],T[m.get(B.id)])}},s.exports=g}),551:(s=>{s.exports=r})},n={};function i(s){var u=n[s];if(u!==void 0)return u.exports;var l=n[s]={exports:{}};return a[s](l,l.exports,i),l.exports}var o=i(45);return o})()})})(oi)),oi.exports}var sI=ii.exports,fE;function uI(){return fE||(fE=1,(function(t,e){(function(a,n){t.exports=n(oI())})(sI,function(r){return(()=>{var a={658:(s=>{s.exports=Object.assign!=null?Object.assign.bind(Object):function(u){for(var l=arguments.length,f=Array(l>1?l-1:0),h=1;h<l;h++)f[h-1]=arguments[h];return f.forEach(function(v){Object.keys(v).forEach(function(c){return u[c]=v[c]})}),u}}),548:((s,u,l)=>{var f=(function(){function c(d,g){var p=[],y=!0,b=!1,m=void 0;try{for(var E=d[Symbol.iterator](),T;!(y=(T=E.next()).done)&&(p.push(T.value),!(g&&p.length===g));y=!0);}catch(L){b=!0,m=L}finally{try{!y&&E.return&&E.return()}finally{if(b)throw m}}return p}return function(d,g){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return c(d,g);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),h=l(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(c){for(var d={},g=0;g<c.length;g++)d[c[g].id()]=!0;var p=c.filter(function(y,b){typeof y=="number"&&(y=b);for(var m=y.parent()[0];m!=null;){if(d[m.id()])return!1;m=m.parent()[0]}return!0});return p},v.connectComponents=function(c,d,g,p){var y=new h,b=new Set,m=[],E=void 0,T=void 0,L=void 0,w=!1,C=1,A=[],R=[],S=function(){var P=c.collection();R.push(P);var x=g[0],N=c.collection();N.merge(x).merge(x.descendants().intersection(d)),m.push(x),N.forEach(function(O){y.push(O),b.add(O),P.merge(O)});for(var M=function(){x=y.shift();var k=c.collection();x.neighborhood().nodes().forEach(function(X){d.intersection(x.edgesWith(X)).length>0&&k.merge(X)});for(var F=0;F<k.length;F++){var _=k[F];if(E=g.intersection(_.union(_.ancestors())),E!=null&&!b.has(E[0])){var z=E.union(E.descendants());z.forEach(function(X){y.push(X),b.add(X),P.merge(X),g.has(X)&&m.push(X)})}}};y.length!=0;)M();if(P.forEach(function(O){d.intersection(O.connectedEdges()).forEach(function(k){P.has(k.source())&&P.has(k.target())&&P.merge(k)})}),m.length==g.length&&(w=!0),!w||w&&C>1){T=m[0],L=T.connectedEdges().length,m.forEach(function(O){O.connectedEdges().length<L&&(L=O.connectedEdges().length,T=O)}),A.push(T.id());var I=c.collection();I.merge(m[0]),m.forEach(function(O){I.merge(O)}),m=[],g=g.difference(I),C++}};do S();while(!w);return p&&A.length>0&&p.set("dummy"+(p.size+1),A),R},v.relocateComponent=function(c,d,g){if(!g.fixedNodeConstraint){var p=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,b=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY;if(g.quality=="draft"){var E=!0,T=!1,L=void 0;try{for(var w=d.nodeIndexes[Symbol.iterator](),C;!(E=(C=w.next()).done);E=!0){var A=C.value,R=f(A,2),S=R[0],D=R[1],P=g.cy.getElementById(S);if(P){var x=P.boundingBox(),N=d.xCoords[D]-x.w/2,M=d.xCoords[D]+x.w/2,I=d.yCoords[D]-x.h/2,O=d.yCoords[D]+x.h/2;N<p&&(p=N),M>y&&(y=M),I<b&&(b=I),O>m&&(m=O)}}}catch(X){T=!0,L=X}finally{try{!E&&w.return&&w.return()}finally{if(T)throw L}}var k=c.x-(y+p)/2,F=c.y-(m+b)/2;d.xCoords=d.xCoords.map(function(X){return X+k}),d.yCoords=d.yCoords.map(function(X){return X+F})}else{Object.keys(d).forEach(function(X){var q=d[X],G=q.getRect().x,U=q.getRect().x+q.getRect().width,K=q.getRect().y,J=q.getRect().y+q.getRect().height;G<p&&(p=G),U>y&&(y=U),K<b&&(b=K),J>m&&(m=J)});var _=c.x-(y+p)/2,z=c.y-(m+b)/2;Object.keys(d).forEach(function(X){var q=d[X];q.setCenter(q.getCenterX()+_,q.getCenterY()+z)})}}},v.calcBoundingBox=function(c,d,g,p){for(var y=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,m=Number.MAX_SAFE_INTEGER,E=Number.MIN_SAFE_INTEGER,T=void 0,L=void 0,w=void 0,C=void 0,A=c.descendants().not(":parent"),R=A.length,S=0;S<R;S++){var D=A[S];T=d[p.get(D.id())]-D.width()/2,L=d[p.get(D.id())]+D.width()/2,w=g[p.get(D.id())]-D.height()/2,C=g[p.get(D.id())]+D.height()/2,y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var P={};return P.topLeftX=y,P.topLeftY=m,P.width=b-y,P.height=E-m,P},v.calcParentsWithoutChildren=function(c,d){var g=c.collection();return d.nodes(":parent").forEach(function(p){var y=!1;p.children().forEach(function(b){b.css("display")!="none"&&(y=!0)}),y||g.merge(p)}),g},s.exports=v}),816:((s,u,l)=>{var f=l(548),h=l(140).CoSELayout,v=l(140).CoSENode,c=l(140).layoutBase.PointD,d=l(140).layoutBase.DimensionD,g=l(140).layoutBase.LayoutConstants,p=l(140).layoutBase.FDLayoutConstants,y=l(140).CoSEConstants,b=function(E,T){var L=E.cy,w=E.eles,C=w.nodes(),A=w.edges(),R=void 0,S=void 0,D=void 0,P={};E.randomize&&(R=T.nodeIndexes,S=T.xCoords,D=T.yCoords);var x=function(X){return typeof X=="function"},N=function(X,q){return x(X)?X(q):X},M=f.calcParentsWithoutChildren(L,w),I=function z(X,q,G,U){for(var K=q.length,J=0;J<K;J++){var H=q[J],Y=null;H.intersection(M).length==0&&(Y=H.children());var $=void 0,Q=H.layoutDimensions({nodeDimensionsIncludeLabels:U.nodeDimensionsIncludeLabels});if(H.outerWidth()!=null&&H.outerHeight()!=null)if(U.randomize)if(!H.isParent())$=X.add(new v(G.graphManager,new c(S[R.get(H.id())]-Q.w/2,D[R.get(H.id())]-Q.h/2),new d(parseFloat(Q.w),parseFloat(Q.h))));else{var ee=f.calcBoundingBox(H,S,D,R);H.intersection(M).length==0?$=X.add(new v(G.graphManager,new c(ee.topLeftX,ee.topLeftY),new d(ee.width,ee.height))):$=X.add(new v(G.graphManager,new c(ee.topLeftX,ee.topLeftY),new d(parseFloat(Q.w),parseFloat(Q.h))))}else $=X.add(new v(G.graphManager,new c(H.position("x")-Q.w/2,H.position("y")-Q.h/2),new d(parseFloat(Q.w),parseFloat(Q.h))));else $=X.add(new v(this.graphManager));if($.id=H.data("id"),$.nodeRepulsion=N(U.nodeRepulsion,H),$.paddingLeft=parseInt(H.css("padding")),$.paddingTop=parseInt(H.css("padding")),$.paddingRight=parseInt(H.css("padding")),$.paddingBottom=parseInt(H.css("padding")),U.nodeDimensionsIncludeLabels&&($.labelWidth=H.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=H.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=H.css("text-valign"),$.labelPosHorizontal=H.css("text-halign")),P[H.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),Y!=null&&Y.length>0){var te=void 0;te=G.getGraphManager().add(G.newGraph(),$),z(te,Y,G,U)}}},O=function(X,q,G){for(var U=0,K=0,J=0;J<G.length;J++){var H=G[J],Y=P[H.data("source")],$=P[H.data("target")];if(Y&&$&&Y!==$&&Y.getEdgesBetween($).length==0){var Q=q.add(X.newEdge(),Y,$);Q.id=H.id(),Q.idealLength=N(E.idealEdgeLength,H),Q.edgeElasticity=N(E.edgeElasticity,H),U+=Q.idealLength,K++}}E.idealEdgeLength!=null&&(K>0?y.DEFAULT_EDGE_LENGTH=p.DEFAULT_EDGE_LENGTH=U/K:x(E.idealEdgeLength)?y.DEFAULT_EDGE_LENGTH=p.DEFAULT_EDGE_LENGTH=50:y.DEFAULT_EDGE_LENGTH=p.DEFAULT_EDGE_LENGTH=E.idealEdgeLength,y.MIN_REPULSION_DIST=p.MIN_REPULSION_DIST=p.DEFAULT_EDGE_LENGTH/10,y.DEFAULT_RADIAL_SEPARATION=p.DEFAULT_EDGE_LENGTH)},k=function(X,q){q.fixedNodeConstraint&&(X.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(X.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(X.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};E.nestingFactor!=null&&(y.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=E.nestingFactor),E.gravity!=null&&(y.DEFAULT_GRAVITY_STRENGTH=p.DEFAULT_GRAVITY_STRENGTH=E.gravity),E.numIter!=null&&(y.MAX_ITERATIONS=p.MAX_ITERATIONS=E.numIter),E.gravityRange!=null&&(y.DEFAULT_GRAVITY_RANGE_FACTOR=p.DEFAULT_GRAVITY_RANGE_FACTOR=E.gravityRange),E.gravityCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_STRENGTH=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH=E.gravityCompound),E.gravityRangeCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=E.gravityRangeCompound),E.initialEnergyOnIncremental!=null&&(y.DEFAULT_COOLING_FACTOR_INCREMENTAL=p.DEFAULT_COOLING_FACTOR_INCREMENTAL=E.initialEnergyOnIncremental),E.tilingCompareBy!=null&&(y.TILING_COMPARE_BY=E.tilingCompareBy),E.quality=="proof"?g.QUALITY=2:g.QUALITY=0,y.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=E.nodeDimensionsIncludeLabels,y.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=!E.randomize,y.ANIMATE=p.ANIMATE=g.ANIMATE=E.animate,y.TILE=E.tile,y.TILING_PADDING_VERTICAL=typeof E.tilingPaddingVertical=="function"?E.tilingPaddingVertical.call():E.tilingPaddingVertical,y.TILING_PADDING_HORIZONTAL=typeof E.tilingPaddingHorizontal=="function"?E.tilingPaddingHorizontal.call():E.tilingPaddingHorizontal,y.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=!0,y.PURE_INCREMENTAL=!E.randomize,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=E.uniformNodeDimensions,E.step=="transformed"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!1),E.step=="enforced"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!1),E.step=="cose"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!0),E.step=="all"&&(E.randomize?y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!0),E.fixedNodeConstraint||E.alignmentConstraint||E.relativePlacementConstraint?y.TREE_REDUCTION_ON_INCREMENTAL=!1:y.TREE_REDUCTION_ON_INCREMENTAL=!0;var F=new h,_=F.newGraphManager();return I(_.addRoot(),f.getTopMostNodes(C),F,E),O(F,_,A),k(F,E),F.runLayout(),P};s.exports={coseLayout:b}}),212:((s,u,l)=>{var f=(function(){function E(T,L){for(var w=0;w<L.length;w++){var C=L[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(T,C.key,C)}}return function(T,L,w){return L&&E(T.prototype,L),w&&E(T,w),T}})();function h(E,T){if(!(E instanceof T))throw new TypeError("Cannot call a class as a function")}var v=l(658),c=l(548),d=l(657),g=d.spectralLayout,p=l(816),y=p.coseLayout,b=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(T){return 4500},idealEdgeLength:function(T){return 50},edgeElasticity:function(T){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),m=(function(){function E(T){h(this,E),this.options=v({},b,T)}return f(E,[{key:"run",value:function(){var L=this,w=this.options,C=w.cy,A=w.eles,R=[],S=[],D=void 0,P=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var x=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;x&&(w.tile=!1,w.packComponents=!1);var N=void 0,M=!1;if(C.layoutUtilities&&w.packComponents&&(N=C.layoutUtilities("get"),N||(N=C.layoutUtilities()),M=!0),A.nodes().length>0)if(M){var k=c.getTopMostNodes(w.eles.nodes());if(D=c.connectComponents(C,w.eles,k),D.forEach(function(le){var se=le.boundingBox();P.push({x:se.x1+se.w/2,y:se.y1+se.h/2})}),w.randomize&&D.forEach(function(le){w.eles=le,R.push(g(w))}),w.quality=="default"||w.quality=="proof"){var F=C.collection();if(w.tile){var _=new Map,z=[],X=[],q=0,G={nodeIndexes:_,xCoords:z,yCoords:X},U=[];if(D.forEach(function(le,se){le.edges().length==0&&(le.nodes().forEach(function(ve,ce){F.merge(le.nodes()[ce]),ve.isParent()||(G.nodeIndexes.set(le.nodes()[ce].id(),q++),G.xCoords.push(le.nodes()[0].position().x),G.yCoords.push(le.nodes()[0].position().y))}),U.push(se))}),F.length>1){var K=F.boundingBox();P.push({x:K.x1+K.w/2,y:K.y1+K.h/2}),D.push(F),R.push(G);for(var J=U.length-1;J>=0;J--)D.splice(U[J],1),R.splice(U[J],1),P.splice(U[J],1)}}D.forEach(function(le,se){w.eles=le,S.push(y(w,R[se])),c.relocateComponent(P[se],S[se],w)})}else D.forEach(function(le,se){c.relocateComponent(P[se],R[se],w)});var H=new Set;if(D.length>1){var Y=[],$=A.filter(function(le){return le.css("display")=="none"});D.forEach(function(le,se){var ve=void 0;if(w.quality=="draft"&&(ve=R[se].nodeIndexes),le.nodes().not($).length>0){var ce={};ce.edges=[],ce.nodes=[];var ye=void 0;le.nodes().not($).forEach(function(ge){if(w.quality=="draft")if(!ge.isParent())ye=ve.get(ge.id()),ce.nodes.push({x:R[se].xCoords[ye]-ge.boundingbox().w/2,y:R[se].yCoords[ye]-ge.boundingbox().h/2,width:ge.boundingbox().w,height:ge.boundingbox().h});else{var de=c.calcBoundingBox(ge,R[se].xCoords,R[se].yCoords,ve);ce.nodes.push({x:de.topLeftX,y:de.topLeftY,width:de.width,height:de.height})}else S[se][ge.id()]&&ce.nodes.push({x:S[se][ge.id()].getLeft(),y:S[se][ge.id()].getTop(),width:S[se][ge.id()].getWidth(),height:S[se][ge.id()].getHeight()})}),le.edges().forEach(function(ge){var de=ge.source(),be=ge.target();if(de.css("display")!="none"&&be.css("display")!="none")if(w.quality=="draft"){var Re=ve.get(de.id()),Pe=ve.get(be.id()),Be=[],Ne=[];if(de.isParent()){var Me=c.calcBoundingBox(de,R[se].xCoords,R[se].yCoords,ve);Be.push(Me.topLeftX+Me.width/2),Be.push(Me.topLeftY+Me.height/2)}else Be.push(R[se].xCoords[Re]),Be.push(R[se].yCoords[Re]);if(be.isParent()){var ne=c.calcBoundingBox(be,R[se].xCoords,R[se].yCoords,ve);Ne.push(ne.topLeftX+ne.width/2),Ne.push(ne.topLeftY+ne.height/2)}else Ne.push(R[se].xCoords[Pe]),Ne.push(R[se].yCoords[Pe]);ce.edges.push({startX:Be[0],startY:Be[1],endX:Ne[0],endY:Ne[1]})}else S[se][de.id()]&&S[se][be.id()]&&ce.edges.push({startX:S[se][de.id()].getCenterX(),startY:S[se][de.id()].getCenterY(),endX:S[se][be.id()].getCenterX(),endY:S[se][be.id()].getCenterY()})}),ce.nodes.length>0&&(Y.push(ce),H.add(se))}});var Q=N.packComponents(Y,w.randomize).shifts;if(w.quality=="draft")R.forEach(function(le,se){var ve=le.xCoords.map(function(ye){return ye+Q[se].dx}),ce=le.yCoords.map(function(ye){return ye+Q[se].dy});le.xCoords=ve,le.yCoords=ce});else{var ee=0;H.forEach(function(le){Object.keys(S[le]).forEach(function(se){var ve=S[le][se];ve.setCenter(ve.getCenterX()+Q[ee].dx,ve.getCenterY()+Q[ee].dy)}),ee++})}}}else{var I=w.eles.boundingBox();if(P.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),w.randomize){var O=g(w);R.push(O)}w.quality=="default"||w.quality=="proof"?(S.push(y(w,R[0])),c.relocateComponent(P[0],S[0],w)):c.relocateComponent(P[0],R[0],w)}var te=function(se,ve){if(w.quality=="default"||w.quality=="proof"){typeof se=="number"&&(se=ve);var ce=void 0,ye=void 0,ge=se.data("id");return S.forEach(function(be){ge in be&&(ce={x:be[ge].getRect().getCenterX(),y:be[ge].getRect().getCenterY()},ye=be[ge])}),w.nodeDimensionsIncludeLabels&&(ye.labelWidth&&(ye.labelPosHorizontal=="left"?ce.x+=ye.labelWidth/2:ye.labelPosHorizontal=="right"&&(ce.x-=ye.labelWidth/2)),ye.labelHeight&&(ye.labelPosVertical=="top"?ce.y+=ye.labelHeight/2:ye.labelPosVertical=="bottom"&&(ce.y-=ye.labelHeight/2))),ce==null&&(ce={x:se.position("x"),y:se.position("y")}),{x:ce.x,y:ce.y}}else{var de=void 0;return R.forEach(function(be){var Re=be.nodeIndexes.get(se.id());Re!=null&&(de={x:be.xCoords[Re],y:be.yCoords[Re]})}),de==null&&(de={x:se.position("x"),y:se.position("y")}),{x:de.x,y:de.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var he=c.calcParentsWithoutChildren(C,A),xe=A.filter(function(le){return le.css("display")=="none"});w.eles=A.not(xe),A.nodes().not(":parent").not(xe).layoutPositions(L,w,te),he.length>0&&he.forEach(function(le){le.position(te(le))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),E})();s.exports=m}),657:((s,u,l)=>{var f=l(548),h=l(140).layoutBase.Matrix,v=l(140).layoutBase.SVD,c=function(g){var p=g.cy,y=g.eles,b=y.nodes(),m=y.nodes(":parent"),E=new Map,T=new Map,L=new Map,w=[],C=[],A=[],R=[],S=[],D=[],P=[],x=[],N=void 0,M=1e8,I=1e-9,O=g.piTol,k=g.samplingType,F=g.nodeSeparation,_=void 0,z=function(){for(var W=0,Z=0,j=!1;Z<_;){W=Math.floor(Math.random()*N),j=!1;for(var ae=0;ae<Z;ae++)if(R[ae]==W){j=!0;break}if(!j)R[Z]=W,Z++;else continue}},X=function(W,Z,j){for(var ae=[],re=0,ie=0,ue=0,oe=void 0,fe=[],me=0,pe=1,we=0;we<N;we++)fe[we]=M;for(ae[ie]=W,fe[W]=0;ie>=re;){ue=ae[re++];for(var De=w[ue],Le=0;Le<De.length;Le++)oe=T.get(De[Le]),fe[oe]==M&&(fe[oe]=fe[ue]+1,ae[++ie]=oe);D[ue][Z]=fe[ue]*F}if(j){for(var Te=0;Te<N;Te++)D[Te][Z]<S[Te]&&(S[Te]=D[Te][Z]);for(var ke=0;ke<N;ke++)S[ke]>me&&(me=S[ke],pe=ke)}return pe},q=function(W){var Z=void 0;if(W){Z=Math.floor(Math.random()*N);for(var ae=0;ae<N;ae++)S[ae]=M;for(var re=0;re<_;re++)R[re]=Z,Z=X(Z,re,W)}else{z();for(var j=0;j<_;j++)X(R[j],j,W)}for(var ie=0;ie<N;ie++)for(var ue=0;ue<_;ue++)D[ie][ue]*=D[ie][ue];for(var oe=0;oe<_;oe++)P[oe]=[];for(var fe=0;fe<_;fe++)for(var me=0;me<_;me++)P[fe][me]=D[R[me]][fe]},G=function(){for(var W=v.svd(P),Z=W.S,j=W.U,ae=W.V,re=Z[0]*Z[0]*Z[0],ie=[],ue=0;ue<_;ue++){ie[ue]=[];for(var oe=0;oe<_;oe++)ie[ue][oe]=0,ue==oe&&(ie[ue][oe]=Z[ue]/(Z[ue]*Z[ue]+re/(Z[ue]*Z[ue])))}x=h.multMat(h.multMat(ae,ie),h.transpose(j))},U=function(){for(var W=void 0,Z=void 0,j=[],ae=[],re=[],ie=[],ue=0;ue<N;ue++)j[ue]=Math.random(),ae[ue]=Math.random();j=h.normalize(j),ae=h.normalize(ae);for(var oe=I,fe=I,me=void 0;;){for(var pe=0;pe<N;pe++)re[pe]=j[pe];if(j=h.multGamma(h.multL(h.multGamma(re),D,x)),W=h.dotProduct(re,j),j=h.normalize(j),oe=h.dotProduct(re,j),me=Math.abs(oe/fe),me<=1+O&&me>=1)break;fe=oe}for(var we=0;we<N;we++)re[we]=j[we];for(fe=I;;){for(var De=0;De<N;De++)ie[De]=ae[De];if(ie=h.minusOp(ie,h.multCons(re,h.dotProduct(re,ie))),ae=h.multGamma(h.multL(h.multGamma(ie),D,x)),Z=h.dotProduct(ie,ae),ae=h.normalize(ae),oe=h.dotProduct(ie,ae),me=Math.abs(oe/fe),me<=1+O&&me>=1)break;fe=oe}for(var Le=0;Le<N;Le++)ie[Le]=ae[Le];C=h.multCons(re,Math.sqrt(Math.abs(W))),A=h.multCons(ie,Math.sqrt(Math.abs(Z)))};f.connectComponents(p,y,f.getTopMostNodes(b),E),m.forEach(function(V){f.connectComponents(p,y,f.getTopMostNodes(V.descendants().intersection(y)),E)});for(var K=0,J=0;J<b.length;J++)b[J].isParent()||T.set(b[J].id(),K++);var H=!0,Y=!1,$=void 0;try{for(var Q=E.keys()[Symbol.iterator](),ee;!(H=(ee=Q.next()).done);H=!0){var te=ee.value;T.set(te,K++)}}catch(V){Y=!0,$=V}finally{try{!H&&Q.return&&Q.return()}finally{if(Y)throw $}}for(var he=0;he<T.size;he++)w[he]=[];m.forEach(function(V){for(var W=V.children().intersection(y);W.nodes(":childless").length==0;)W=W.nodes()[0].children().intersection(y);var Z=0,j=W.nodes(":childless")[0].connectedEdges().length;W.nodes(":childless").forEach(function(ae,re){ae.connectedEdges().length<j&&(j=ae.connectedEdges().length,Z=re)}),L.set(V.id(),W.nodes(":childless")[Z].id())}),b.forEach(function(V){var W=void 0;V.isParent()?W=T.get(L.get(V.id())):W=T.get(V.id()),V.neighborhood().nodes().forEach(function(Z){y.intersection(V.edgesWith(Z)).length>0&&(Z.isParent()?w[W].push(L.get(Z.id())):w[W].push(Z.id()))})});var xe=function(W){var Z=T.get(W),j=void 0;E.get(W).forEach(function(ae){p.getElementById(ae).isParent()?j=L.get(ae):j=ae,w[Z].push(j),w[T.get(j)].push(W)})},le=!0,se=!1,ve=void 0;try{for(var ce=E.keys()[Symbol.iterator](),ye;!(le=(ye=ce.next()).done);le=!0){var ge=ye.value;xe(ge)}}catch(V){se=!0,ve=V}finally{try{!le&&ce.return&&ce.return()}finally{if(se)throw ve}}N=T.size;var de=void 0;if(N>2){_=N<g.sampleSize?N:g.sampleSize;for(var be=0;be<N;be++)D[be]=[];for(var Re=0;Re<_;Re++)x[Re]=[];return g.quality=="draft"||g.step=="all"?(q(k),G(),U(),de={nodeIndexes:T,xCoords:C,yCoords:A}):(T.forEach(function(V,W){C.push(p.getElementById(W).position("x")),A.push(p.getElementById(W).position("y"))}),de={nodeIndexes:T,xCoords:C,yCoords:A}),de}else{var Pe=T.keys(),Be=p.getElementById(Pe.next().value),Ne=Be.position(),Me=Be.outerWidth();if(C.push(Ne.x),A.push(Ne.y),N==2){var ne=p.getElementById(Pe.next().value),B=ne.outerWidth();C.push(Ne.x+Me/2+B/2+g.idealEdgeLength),A.push(Ne.y)}return de={nodeIndexes:T,xCoords:C,yCoords:A},de}};s.exports={spectralLayout:c}}),579:((s,u,l)=>{var f=l(212),h=function(c){c&&c("layout","fcose",f)};typeof cytoscape<"u"&&h(cytoscape),s.exports=h}),140:(s=>{s.exports=r})},n={};function i(s){var u=n[s];if(u!==void 0)return u.exports;var l=n[s]={exports:{}};return a[s](l,l.exports,i),l.exports}var o=i(579);return o})()})})(ii)),ii.exports}var lI=uI();const EI=xv(lI);var ui={exports:{}},li={exports:{}},fi={exports:{}},fI=fi.exports,hE;function hI(){return hE||(hE=1,(function(t,e){(function(a,n){t.exports=n()})(fI,function(){return(function(r){var a={};function n(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return r[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=r,n.c=a,n.i=function(i){return i},n.d=function(i,o,s){n.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(o,"a",o),o},n.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},n.p="",n(n.s=26)})([(function(r,a,n){function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,r.exports=i}),(function(r,a,n){var i=n(2),o=n(8),s=n(9);function u(f,h,v){i.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=h}u.prototype=Object.create(i.prototype);for(var l in i)u[l]=i[l];u.prototype.getSource=function(){return this.source},u.prototype.getTarget=function(){return this.target},u.prototype.isInterGraph=function(){return this.isInterGraph},u.prototype.getLength=function(){return this.length},u.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},u.prototype.getBendpoints=function(){return this.bendpoints},u.prototype.getLca=function(){return this.lca},u.prototype.getSourceInLca=function(){return this.sourceInLca},u.prototype.getTargetInLca=function(){return this.targetInLca},u.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},u.prototype.getOtherEndInGraph=function(f,h){for(var v=this.getOtherEnd(f),c=h.getGraphManager().getRoot();;){if(v.getOwner()==h)return v;if(v.getOwner()==c)break;v=v.getOwner().getParent()}return null},u.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},u.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},r.exports=u}),(function(r,a,n){function i(o){this.vGraphObject=o}r.exports=i}),(function(r,a,n){var i=n(2),o=n(10),s=n(13),u=n(0),l=n(16),f=n(4);function h(c,d,g,p){g==null&&p==null&&(p=d),i.call(this,p),c.graphManager!=null&&(c=c.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=c,g!=null&&d!=null?this.rect=new s(d.x,d.y,g.width,g.height):this.rect=new s}h.prototype=Object.create(i.prototype);for(var v in i)h[v]=i[v];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(c){this.rect.width=c},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(c){this.rect.height=c},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(c,d){this.rect.x=c.x,this.rect.y=c.y,this.rect.width=d.width,this.rect.height=d.height},h.prototype.setCenter=function(c,d){this.rect.x=c-this.rect.width/2,this.rect.y=d-this.rect.height/2},h.prototype.setLocation=function(c,d){this.rect.x=c,this.rect.y=d},h.prototype.moveBy=function(c,d){this.rect.x+=c,this.rect.y+=d},h.prototype.getEdgeListToNode=function(c){var d=[],g=this;return g.edges.forEach(function(p){if(p.target==c){if(p.source!=g)throw"Incorrect edge source!";d.push(p)}}),d},h.prototype.getEdgesBetween=function(c){var d=[],g=this;return g.edges.forEach(function(p){if(!(p.source==g||p.target==g))throw"Incorrect edge source and/or target";(p.target==c||p.source==c)&&d.push(p)}),d},h.prototype.getNeighborsList=function(){var c=new Set,d=this;return d.edges.forEach(function(g){if(g.source==d)c.add(g.target);else{if(g.target!=d)throw"Incorrect incidency!";c.add(g.source)}}),c},h.prototype.withChildren=function(){var c=new Set,d,g;if(c.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)d=p[y],g=d.withChildren(),g.forEach(function(b){c.add(b)});return c},h.prototype.getNoOfChildren=function(){var c=0,d;if(this.child==null)c=1;else for(var g=this.child.getNodes(),p=0;p<g.length;p++)d=g[p],c+=d.getNoOfChildren();return c==0&&(c=1),c},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var c,d,g=-u.INITIAL_WORLD_BOUNDARY,p=u.INITIAL_WORLD_BOUNDARY;c=u.WORLD_CENTER_X+l.nextDouble()*(p-g)+g;var y=-u.INITIAL_WORLD_BOUNDARY,b=u.INITIAL_WORLD_BOUNDARY;d=u.WORLD_CENTER_Y+l.nextDouble()*(b-y)+y,this.rect.x=c,this.rect.y=d},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var c=this.getChild();if(c.updateBounds(!0),this.rect.x=c.getLeft(),this.rect.y=c.getTop(),this.setWidth(c.getRight()-c.getLeft()),this.setHeight(c.getBottom()-c.getTop()),u.NODE_DIMENSIONS_INCLUDE_LABELS){var d=c.getRight()-c.getLeft(),g=c.getBottom()-c.getTop();this.labelWidth>d&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>g&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-g)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-g),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(c){var d=this.rect.x;d>u.WORLD_BOUNDARY?d=u.WORLD_BOUNDARY:d<-u.WORLD_BOUNDARY&&(d=-u.WORLD_BOUNDARY);var g=this.rect.y;g>u.WORLD_BOUNDARY?g=u.WORLD_BOUNDARY:g<-u.WORLD_BOUNDARY&&(g=-u.WORLD_BOUNDARY);var p=new f(d,g),y=c.inverseTransformPoint(p);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},r.exports=h}),(function(r,a,n){function i(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(o){this.x=o},i.prototype.setY=function(o){this.y=o},i.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},r.exports=i}),(function(r,a,n){var i=n(2),o=n(10),s=n(0),u=n(6),l=n(3),f=n(1),h=n(13),v=n(12),c=n(11);function d(p,y,b){i.call(this,b),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof u?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}d.prototype=Object.create(i.prototype);for(var g in i)d[g]=i[g];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(p,y,b){if(y==null&&b==null){var m=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(m)>-1)throw"Node already in graph!";return m.owner=this,this.getNodes().push(m),m}else{var E=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(b)>-1))throw"Source or target not in graph!";if(!(y.owner==b.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=b.owner?null:(E.source=y,E.target=b,E.isInterGraph=!1,this.getEdges().push(E),y.edges.push(E),b!=y&&b.edges.push(E),E)}},d.prototype.remove=function(p){var y=p;if(p instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var b=y.edges.slice(),m,E=b.length,T=0;T<E;T++)m=b[T],m.isInterGraph?this.graphManager.remove(m):m.source.owner.remove(m);var L=this.nodes.indexOf(y);if(L==-1)throw"Node not in owner node list!";this.nodes.splice(L,1)}else if(p instanceof f){var m=p;if(m==null)throw"Edge is null!";if(!(m.source!=null&&m.target!=null))throw"Source and/or target is null!";if(!(m.source.owner!=null&&m.target.owner!=null&&m.source.owner==this&&m.target.owner==this))throw"Source and/or target owner is invalid!";var w=m.source.edges.indexOf(m),C=m.target.edges.indexOf(m);if(!(w>-1&&C>-1))throw"Source and/or target doesn't know this edge!";m.source.edges.splice(w,1),m.target!=m.source&&m.target.edges.splice(C,1);var L=m.source.owner.getEdges().indexOf(m);if(L==-1)throw"Not in owner's edge list!";m.source.owner.getEdges().splice(L,1)}},d.prototype.updateLeftTop=function(){for(var p=o.MAX_VALUE,y=o.MAX_VALUE,b,m,E,T=this.getNodes(),L=T.length,w=0;w<L;w++){var C=T[w];b=C.getTop(),m=C.getLeft(),p>b&&(p=b),y>m&&(y=m)}return p==o.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?E=T[0].getParent().paddingLeft:E=this.margin,this.left=y-E,this.top=p-E,new v(this.left,this.top))},d.prototype.updateBounds=function(p){for(var y=o.MAX_VALUE,b=-o.MAX_VALUE,m=o.MAX_VALUE,E=-o.MAX_VALUE,T,L,w,C,A,R=this.nodes,S=R.length,D=0;D<S;D++){var P=R[D];p&&P.child!=null&&P.updateBounds(),T=P.getLeft(),L=P.getRight(),w=P.getTop(),C=P.getBottom(),y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var x=new h(y,m,b-y,E-m);y==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),R[0].getParent().paddingLeft!=null?A=R[0].getParent().paddingLeft:A=this.margin,this.left=x.x-A,this.right=x.x+x.width+A,this.top=x.y-A,this.bottom=x.y+x.height+A},d.calculateBounds=function(p){for(var y=o.MAX_VALUE,b=-o.MAX_VALUE,m=o.MAX_VALUE,E=-o.MAX_VALUE,T,L,w,C,A=p.length,R=0;R<A;R++){var S=p[R];T=S.getLeft(),L=S.getRight(),w=S.getTop(),C=S.getBottom(),y>T&&(y=T),b<L&&(b=L),m>w&&(m=w),E<C&&(E=C)}var D=new h(y,m,b-y,E-m);return D},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,b=y.length,m=0;m<b;m++){var E=y[m];p+=E.calcEstimatedSize()}return p==0?this.estimatedSize=s.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new c,b=new Set,m=this.nodes[0],E,T,L=m.withChildren();for(L.forEach(function(D){y.push(D),b.add(D)});y.length!==0;){m=y.shift(),E=m.getEdges();for(var w=E.length,C=0;C<w;C++){var A=E[C];if(T=A.getOtherEndInGraph(m,this),T!=null&&!b.has(T)){var R=T.withChildren();R.forEach(function(D){y.push(D),b.add(D)})}}}if(this.isConnected=!1,b.size>=this.nodes.length){var S=0;b.forEach(function(D){D.owner==p&&S++}),S==this.nodes.length&&(this.isConnected=!0)}},r.exports=d}),(function(r,a,n){var i,o=n(1);function s(u){i=n(5),this.layout=u,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var u=this.layout.newGraph(),l=this.layout.newNode(null),f=this.add(u,l);return this.setRootGraph(f),this.rootGraph},s.prototype.add=function(u,l,f,h,v){if(f==null&&h==null&&v==null){if(u==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(u)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(u),u.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return u.parent=l,l.child=u,u}else{v=f,h=l,f=u;var c=h.getOwner(),d=v.getOwner();if(!(c!=null&&c.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(c==d)return f.isInterGraph=!1,c.add(f,h,v);if(f.isInterGraph=!0,f.source=h,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},s.prototype.remove=function(u){if(u instanceof i){var l=u;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(l.getEdges());for(var h,v=f.length,c=0;c<v;c++)h=f[c],l.remove(h);var d=[];d=d.concat(l.getNodes());var g;v=d.length;for(var c=0;c<v;c++)g=d[c],l.remove(g);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(u instanceof o){if(h=u,h==null)throw"Edge is null!";if(!h.isInterGraph)throw"Not an inter-graph edge!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.edges.indexOf(h)!=-1&&h.target.edges.indexOf(h)!=-1))throw"Source and/or target doesn't know this edge!";var p=h.source.edges.indexOf(h);if(h.source.edges.splice(p,1),p=h.target.edges.indexOf(h),h.target.edges.splice(p,1),!(h.source.owner!=null&&h.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(h.source.owner.getGraphManager().edges.indexOf(h)==-1)throw"Not in owner graph manager's edge list!";var p=h.source.owner.getGraphManager().edges.indexOf(h);h.source.owner.getGraphManager().edges.splice(p,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){for(var u=[],l=this.getGraphs(),f=l.length,h=0;h<f;h++)u=u.concat(l[h].getNodes());this.allNodes=u}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var u=[],l=this.getGraphs();l.length;for(var f=0;f<l.length;f++)u=u.concat(l[f].getEdges());u=u.concat(this.edges),this.allEdges=u}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(u){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=u},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(u){if(u.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=u,u.parent==null&&(u.parent=this.layout.newNode("Root node"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(u,l){if(!(u!=null&&l!=null))throw"assert failed";if(u==l)return!0;var f=u.getOwner(),h;do{if(h=f.getParent(),h==null)break;if(h==l)return!0;if(f=h.getOwner(),f==null)break}while(!0);f=l.getOwner();do{if(h=f.getParent(),h==null)break;if(h==u)return!0;if(f=h.getOwner(),f==null)break}while(!0);return!1},s.prototype.calcLowestCommonAncestors=function(){for(var u,l,f,h,v,c=this.getAllEdges(),d=c.length,g=0;g<d;g++){if(u=c[g],l=u.source,f=u.target,u.lca=null,u.sourceInLca=l,u.targetInLca=f,l==f){u.lca=l.getOwner();continue}for(h=l.getOwner();u.lca==null;){for(u.targetInLca=f,v=f.getOwner();u.lca==null;){if(v==h){u.lca=v;break}if(v==this.rootGraph)break;if(u.lca!=null)throw"assert failed";u.targetInLca=v.getParent(),v=u.targetInLca.getOwner()}if(h==this.rootGraph)break;u.lca==null&&(u.sourceInLca=h.getParent(),h=u.sourceInLca.getOwner())}if(u.lca==null)throw"assert failed"}},s.prototype.calcLowestCommonAncestor=function(u,l){if(u==l)return u.getOwner();var f=u.getOwner();do{if(f==null)break;var h=l.getOwner();do{if(h==null)break;if(h==f)return h;h=h.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},s.prototype.calcInclusionTreeDepths=function(u,l){u==null&&l==null&&(u=this.rootGraph,l=1);for(var f,h=u.getNodes(),v=h.length,c=0;c<v;c++)f=h[c],f.inclusionTreeDepth=l,f.child!=null&&this.calcInclusionTreeDepths(f.child,l+1)},s.prototype.includesInvalidEdge=function(){for(var u,l=this.edges.length,f=0;f<l;f++)if(u=this.edges[f],this.isOneAncestorOfOther(u.source,u.target))return!0;return!1},r.exports=s}),(function(r,a,n){var i=n(0);function o(){}for(var s in i)o[s]=i[s];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=o.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,r.exports=o}),(function(r,a,n){var i=n(12);function o(){}o.calcSeparationAmount=function(s,u,l,f){if(!s.intersects(u))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(s,u,h),l[0]=Math.min(s.getRight(),u.getRight())-Math.max(s.x,u.x),l[1]=Math.min(s.getBottom(),u.getBottom())-Math.max(s.y,u.y),s.getX()<=u.getX()&&s.getRight()>=u.getRight()?l[0]+=Math.min(u.getX()-s.getX(),s.getRight()-u.getRight()):u.getX()<=s.getX()&&u.getRight()>=s.getRight()&&(l[0]+=Math.min(s.getX()-u.getX(),u.getRight()-s.getRight())),s.getY()<=u.getY()&&s.getBottom()>=u.getBottom()?l[1]+=Math.min(u.getY()-s.getY(),s.getBottom()-u.getBottom()):u.getY()<=s.getY()&&u.getBottom()>=s.getBottom()&&(l[1]+=Math.min(s.getY()-u.getY(),u.getBottom()-s.getBottom()));var v=Math.abs((u.getCenterY()-s.getCenterY())/(u.getCenterX()-s.getCenterX()));u.getCenterY()===s.getCenterY()&&u.getCenterX()===s.getCenterX()&&(v=1);var c=v*l[0],d=l[1]/v;l[0]<d?d=l[0]:c=l[1],l[0]=-1*h[0]*(d/2+f),l[1]=-1*h[1]*(c/2+f)},o.decideDirectionsForOverlappingNodes=function(s,u,l){s.getCenterX()<u.getCenterX()?l[0]=-1:l[0]=1,s.getCenterY()<u.getCenterY()?l[1]=-1:l[1]=1},o.getIntersection2=function(s,u,l){var f=s.getCenterX(),h=s.getCenterY(),v=u.getCenterX(),c=u.getCenterY();if(s.intersects(u))return l[0]=f,l[1]=h,l[2]=v,l[3]=c,!0;var d=s.getX(),g=s.getY(),p=s.getRight(),y=s.getX(),b=s.getBottom(),m=s.getRight(),E=s.getWidthHalf(),T=s.getHeightHalf(),L=u.getX(),w=u.getY(),C=u.getRight(),A=u.getX(),R=u.getBottom(),S=u.getRight(),D=u.getWidthHalf(),P=u.getHeightHalf(),x=!1,N=!1;if(f===v){if(h>c)return l[0]=f,l[1]=g,l[2]=v,l[3]=R,!1;if(h<c)return l[0]=f,l[1]=b,l[2]=v,l[3]=w,!1}else if(h===c){if(f>v)return l[0]=d,l[1]=h,l[2]=C,l[3]=c,!1;if(f<v)return l[0]=p,l[1]=h,l[2]=L,l[3]=c,!1}else{var M=s.height/s.width,I=u.height/u.width,O=(c-h)/(v-f),k=void 0,F=void 0,_=void 0,z=void 0,X=void 0,q=void 0;if(-M===O?f>v?(l[0]=y,l[1]=b,x=!0):(l[0]=p,l[1]=g,x=!0):M===O&&(f>v?(l[0]=d,l[1]=g,x=!0):(l[0]=m,l[1]=b,x=!0)),-I===O?v>f?(l[2]=A,l[3]=R,N=!0):(l[2]=C,l[3]=w,N=!0):I===O&&(v>f?(l[2]=L,l[3]=w,N=!0):(l[2]=S,l[3]=R,N=!0)),x&&N)return!1;if(f>v?h>c?(k=this.getCardinalDirection(M,O,4),F=this.getCardinalDirection(I,O,2)):(k=this.getCardinalDirection(-M,O,3),F=this.getCardinalDirection(-I,O,1)):h>c?(k=this.getCardinalDirection(-M,O,1),F=this.getCardinalDirection(-I,O,3)):(k=this.getCardinalDirection(M,O,2),F=this.getCardinalDirection(I,O,4)),!x)switch(k){case 1:z=g,_=f+-T/O,l[0]=_,l[1]=z;break;case 2:_=m,z=h+E*O,l[0]=_,l[1]=z;break;case 3:z=b,_=f+T/O,l[0]=_,l[1]=z;break;case 4:_=y,z=h+-E*O,l[0]=_,l[1]=z;break}if(!N)switch(F){case 1:q=w,X=v+-P/O,l[2]=X,l[3]=q;break;case 2:X=S,q=c+D*O,l[2]=X,l[3]=q;break;case 3:q=R,X=v+P/O,l[2]=X,l[3]=q;break;case 4:X=A,q=c+-D*O,l[2]=X,l[3]=q;break}}return!1},o.getCardinalDirection=function(s,u,l){return s>u?l:1+l%4},o.getIntersection=function(s,u,l,f){if(f==null)return this.getIntersection2(s,u,l);var h=s.x,v=s.y,c=u.x,d=u.y,g=l.x,p=l.y,y=f.x,b=f.y,m=void 0,E=void 0,T=void 0,L=void 0,w=void 0,C=void 0,A=void 0,R=void 0,S=void 0;return T=d-v,w=h-c,A=c*v-h*d,L=b-p,C=g-y,R=y*p-g*b,S=T*C-L*w,S===0?null:(m=(w*R-C*A)/S,E=(L*A-T*R)/S,new i(m,E))},o.angleOfVector=function(s,u,l,f){var h=void 0;return s!==l?(h=Math.atan((f-u)/(l-s)),l<s?h+=Math.PI:f<u&&(h+=this.TWO_PI)):f<u?h=this.ONE_AND_HALF_PI:h=this.HALF_PI,h},o.doIntersect=function(s,u,l,f){var h=s.x,v=s.y,c=u.x,d=u.y,g=l.x,p=l.y,y=f.x,b=f.y,m=(c-h)*(b-p)-(y-g)*(d-v);if(m===0)return!1;var E=((b-p)*(y-h)+(g-y)*(b-v))/m,T=((v-d)*(y-h)+(c-h)*(b-v))/m;return 0<E&&E<1&&0<T&&T<1},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,r.exports=o}),(function(r,a,n){function i(){}i.sign=function(o){return o>0?1:o<0?-1:0},i.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},i.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},r.exports=i}),(function(r,a,n){function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,r.exports=i}),(function(r,a,n){var i=(function(){function h(v,c){for(var d=0;d<c.length;d++){var g=c[d];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}return function(v,c,d){return c&&h(v.prototype,c),d&&h(v,d),v}})();function o(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}var s=function(v){return{value:v,next:null,prev:null}},u=function(v,c,d,g){return v!==null?v.next=c:g.head=c,d!==null?d.prev=c:g.tail=c,c.prev=v,c.next=d,g.length++,c},l=function(v,c){var d=v.prev,g=v.next;return d!==null?d.next=g:c.head=g,g!==null?g.prev=d:c.tail=d,v.prev=v.next=null,c.length--,v},f=(function(){function h(v){var c=this;o(this,h),this.length=0,this.head=null,this.tail=null,v!=null&&v.forEach(function(d){return c.push(d)})}return i(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(c,d){return u(d.prev,s(c),d,this)}},{key:"insertAfter",value:function(c,d){return u(d,s(c),d.next,this)}},{key:"insertNodeBefore",value:function(c,d){return u(d.prev,c,d,this)}},{key:"insertNodeAfter",value:function(c,d){return u(d,c,d.next,this)}},{key:"push",value:function(c){return u(this.tail,s(c),null,this)}},{key:"unshift",value:function(c){return u(null,s(c),this.head,this)}},{key:"remove",value:function(c){return l(c,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(c){if(c<=this.length()){for(var d=1,g=this.head;d<c;)g=g.next,d++;return g.value}}},{key:"set_object_at",value:function(c,d){if(c<=this.length()){for(var g=1,p=this.head;g<c;)p=p.next,g++;p.value=d}}}]),h})();r.exports=f}),(function(r,a,n){function i(o,s,u){this.x=null,this.y=null,o==null&&s==null&&u==null?(this.x=0,this.y=0):typeof o=="number"&&typeof s=="number"&&u==null?(this.x=o,this.y=s):o.constructor.name=="Point"&&s==null&&u==null&&(u=o,this.x=u.x,this.y=u.y)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(o,s,u){o.constructor.name=="Point"&&s==null&&u==null?(u=o,this.setLocation(u.x,u.y)):typeof o=="number"&&typeof s=="number"&&u==null&&(parseInt(o)==o&&parseInt(s)==s?this.move(o,s):(this.x=Math.floor(o+.5),this.y=Math.floor(s+.5)))},i.prototype.move=function(o,s){this.x=o,this.y=s},i.prototype.translate=function(o,s){this.x+=o,this.y+=s},i.prototype.equals=function(o){if(o.constructor.name=="Point"){var s=o;return this.x==s.x&&this.y==s.y}return this==o},i.prototype.toString=function(){return new i().constructor.name+"[x="+this.x+",y="+this.y+"]"},r.exports=i}),(function(r,a,n){function i(o,s,u,l){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&s!=null&&u!=null&&l!=null&&(this.x=o,this.y=s,this.width=u,this.height=l)}i.prototype.getX=function(){return this.x},i.prototype.setX=function(o){this.x=o},i.prototype.getY=function(){return this.y},i.prototype.setY=function(o){this.y=o},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(o){this.width=o},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(o){this.height=o},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},r.exports=i}),(function(r,a,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(){}o.lastID=0,o.createID=function(s){return o.isPrimitive(s)?s:(s.uniqueID!=null||(s.uniqueID=o.getString(),o.lastID++),s.uniqueID)},o.getString=function(s){return s==null&&(s=o.lastID),"Object#"+s},o.isPrimitive=function(s){var u=typeof s>"u"?"undefined":i(s);return s==null||u!="object"&&u!="function"},r.exports=o}),(function(r,a,n){function i(g){if(Array.isArray(g)){for(var p=0,y=Array(g.length);p<g.length;p++)y[p]=g[p];return y}else return Array.from(g)}var o=n(0),s=n(6),u=n(3),l=n(1),f=n(5),h=n(4),v=n(17),c=n(27);function d(g){c.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}d.RANDOM_SEED=1,d.prototype=Object.create(c.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var g=new s(this);return this.graphManager=g,g},d.prototype.newGraph=function(g){return new f(null,this.graphManager,g)},d.prototype.newNode=function(g){return new u(this.graphManager,g)},d.prototype.newEdge=function(g){return new l(null,null,g)},d.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var g;return this.checkLayoutSuccess()?g=!1:g=this.layout(),o.ANIMATE==="during"?!1:(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),p=0;p<g.length;p++)g[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},d.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof u){var p=g;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),b=0;b<y.length;b++)update(y[b]);if(p.vGraphObject!=null){var m=p.vGraphObject;m.update(p)}}else if(g instanceof l){var E=g;if(E.vGraphObject!=null){var T=E.vGraphObject;T.update(E)}}else if(g instanceof f){var L=g;if(L.vGraphObject!=null){var w=L.vGraphObject;w.update(L)}}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(g){if(g==null)this.transform(new h(0,0));else{var p=new v,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(g.x),p.setWorldOrgY(g.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var b=this.getAllNodes(),m,E=0;E<b.length;E++)m=b[E],m.transform(p)}}},d.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,b=g.getNodes(),m=0;m<b.length;m++)p=b[m],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},d.prototype.getFlatForest=function(){for(var g=[],p=!0,y=this.graphManager.getRoot().getNodes(),b=!0,m=0;m<y.length;m++)y[m].getChild()!=null&&(b=!1);if(!b)return g;var E=new Set,T=[],L=new Map,w=[];for(w=w.concat(y);w.length>0&&p;){for(T.push(w[0]);T.length>0&&p;){var C=T[0];T.splice(0,1),E.add(C);for(var A=C.getEdges(),m=0;m<A.length;m++){var R=A[m].getOtherEnd(C);if(L.get(C)!=R)if(!E.has(R))T.push(R),L.set(R,C);else{p=!1;break}}}if(!p)g=[];else{var S=[].concat(i(E));g.push(S);for(var m=0;m<S.length;m++){var D=S[m],P=w.indexOf(D);P>-1&&w.splice(P,1)}E=new Set,L=new Map}}return g},d.prototype.createDummyNodesForBendpoints=function(g){for(var p=[],y=g.source,b=this.graphManager.calcLowestCommonAncestor(g.source,g.target),m=0;m<g.bendpoints.length;m++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),b.add(E);var T=this.newEdge(null);this.graphManager.add(T,y,E),p.add(E),y=E}var T=this.newEdge(null);return this.graphManager.add(T,y,g.target),this.edgeToDummyNodes.set(g,p),g.isInterGraph()?this.graphManager.remove(g):b.remove(g),p},d.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(i(this.edgeToDummyNodes.keys())).concat(g);for(var p=0;p<g.length;p++){var y=g[p];if(y.bendpoints.length>0){for(var b=this.edgeToDummyNodes.get(y),m=0;m<b.length;m++){var E=b[m],T=new h(E.getCenterX(),E.getCenterY()),L=y.bendpoints.get(m);L.x=T.x,L.y=T.y,E.getOwner().remove(E)}this.graphManager.add(y,y.source,y.target)}}},d.transform=function(g,p,y,b){if(y!=null&&b!=null){var m=p;if(g<=50){var E=p/y;m-=(p-E)/50*(50-g)}else{var T=p*b;m+=(T-p)/50*(g-50)}return m}else{var L,w;return g<=50?(L=9*p/500,w=p/10):(L=9*p/50,w=-8*p),L*g+w}},d.findCenterOfTree=function(g){var p=[];p=p.concat(g);var y=[],b=new Map,m=!1,E=null;(p.length==1||p.length==2)&&(m=!0,E=p[0]);for(var T=0;T<p.length;T++){var L=p[T],w=L.getNeighborsList().size;b.set(L,L.getNeighborsList().size),w==1&&y.push(L)}var C=[];for(C=C.concat(y);!m;){var A=[];A=A.concat(C),C=[];for(var T=0;T<p.length;T++){var L=p[T],R=p.indexOf(L);R>=0&&p.splice(R,1);var S=L.getNeighborsList();S.forEach(function(x){if(y.indexOf(x)<0){var N=b.get(x),M=N-1;M==1&&C.push(x),b.set(x,M)}})}y=y.concat(C),(p.length==1||p.length==2)&&(m=!0,E=p[0])}return E},d.prototype.setGraphManager=function(g){this.graphManager=g},r.exports=d}),(function(r,a,n){function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},r.exports=i}),(function(r,a,n){var i=n(4);function o(s,u){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var u=0,l=this.lworldExtX;return l!=0&&(u=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/l),u},o.prototype.transformY=function(s){var u=0,l=this.lworldExtY;return l!=0&&(u=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/l),u},o.prototype.inverseTransformX=function(s){var u=0,l=this.ldeviceExtX;return l!=0&&(u=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/l),u},o.prototype.inverseTransformY=function(s){var u=0,l=this.ldeviceExtY;return l!=0&&(u=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/l),u},o.prototype.inverseTransformPoint=function(s){var u=new i(this.inverseTransformX(s.x),this.inverseTransformY(s.y));return u},r.exports=o}),(function(r,a,n){function i(c){if(Array.isArray(c)){for(var d=0,g=Array(c.length);d<c.length;d++)g[d]=c[d];return g}else return Array.from(c)}var o=n(15),s=n(7),u=n(0),l=n(8),f=n(9);function h(){o.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.springConstant=s.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=s.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}h.prototype=Object.create(o.prototype);for(var v in o)h[v]=o[v];h.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var c,d,g,p,y,b,m=this.getGraphManager().getAllEdges(),E=0;E<m.length;E++)c=m[E],c.idealLength=this.idealEdgeLength,c.isInterGraph&&(g=c.getSource(),p=c.getTarget(),y=c.getSourceInLca().getEstimatedSize(),b=c.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(c.idealLength+=y+b-2*u.SIMPLE_NODE_SIZE),d=c.getLca().getInclusionTreeDepth(),c.idealLength+=s.DEFAULT_EDGE_LENGTH*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*d))},h.prototype.initSpringEmbedder=function(){var c=this.getAllNodes().length;this.incremental?(c>s.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(c-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(c>s.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(c-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var c=this.getAllEdges(),d,g=0;g<c.length;g++)d=c[g],this.calcSpringForce(d,d.idealLength)},h.prototype.calcRepulsionForces=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,p,y,b,m=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&c&&this.updateGrid(),E=new Set,g=0;g<m.length;g++)y=m[g],this.calculateRepulsionForceOfANode(y,E,c,d),E.add(y);else for(g=0;g<m.length;g++)for(y=m[g],p=g+1;p<m.length;p++)b=m[p],y.getOwner()==b.getOwner()&&this.calcRepulsionForce(y,b)},h.prototype.calcGravitationalForces=function(){for(var c,d=this.getAllNodesToApplyGravitation(),g=0;g<d.length;g++)c=d[g],this.calcGravitationalForce(c)},h.prototype.moveNodes=function(){for(var c=this.getAllNodes(),d,g=0;g<c.length;g++)d=c[g],d.move()},h.prototype.calcSpringForce=function(c,d){var g=c.getSource(),p=c.getTarget(),y,b,m,E;if(this.uniformLeafNodeSizes&&g.getChild()==null&&p.getChild()==null)c.updateLengthSimple();else if(c.updateLength(),c.isOverlapingSourceAndTarget)return;y=c.getLength(),y!=0&&(b=this.springConstant*(y-d),m=b*(c.lengthX/y),E=b*(c.lengthY/y),g.springForceX+=m,g.springForceY+=E,p.springForceX-=m,p.springForceY-=E)},h.prototype.calcRepulsionForce=function(c,d){var g=c.getRect(),p=d.getRect(),y=new Array(2),b=new Array(4),m,E,T,L,w,C,A;if(g.intersects(p)){l.calcSeparationAmount(g,p,y,s.DEFAULT_EDGE_LENGTH/2),C=2*y[0],A=2*y[1];var R=c.noOfChildren*d.noOfChildren/(c.noOfChildren+d.noOfChildren);c.repulsionForceX-=R*C,c.repulsionForceY-=R*A,d.repulsionForceX+=R*C,d.repulsionForceY+=R*A}else this.uniformLeafNodeSizes&&c.getChild()==null&&d.getChild()==null?(m=p.getCenterX()-g.getCenterX(),E=p.getCenterY()-g.getCenterY()):(l.getIntersection(g,p,b),m=b[2]-b[0],E=b[3]-b[1]),Math.abs(m)<s.MIN_REPULSION_DIST&&(m=f.sign(m)*s.MIN_REPULSION_DIST),Math.abs(E)<s.MIN_REPULSION_DIST&&(E=f.sign(E)*s.MIN_REPULSION_DIST),T=m*m+E*E,L=Math.sqrt(T),w=this.repulsionConstant*c.noOfChildren*d.noOfChildren/T,C=w*m/L,A=w*E/L,c.repulsionForceX-=C,c.repulsionForceY-=A,d.repulsionForceX+=C,d.repulsionForceY+=A},h.prototype.calcGravitationalForce=function(c){var d,g,p,y,b,m,E,T;d=c.getOwner(),g=(d.getRight()+d.getLeft())/2,p=(d.getTop()+d.getBottom())/2,y=c.getCenterX()-g,b=c.getCenterY()-p,m=Math.abs(y)+c.getWidth()/2,E=Math.abs(b)+c.getHeight()/2,c.getOwner()==this.graphManager.getRoot()?(T=d.getEstimatedSize()*this.gravityRangeFactor,(m>T||E>T)&&(c.gravitationForceX=-this.gravityConstant*y,c.gravitationForceY=-this.gravityConstant*b)):(T=d.getEstimatedSize()*this.compoundGravityRangeFactor,(m>T||E>T)&&(c.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,c.gravitationForceY=-this.gravityConstant*b*this.compoundGravityConstant))},h.prototype.isConverged=function(){var c,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),c=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,c||d},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var c,d=this.graphManager.getAllNodes(),g=0;g<d.length;g++)c=d[g],c.noOfChildren=c.getNoOfChildren()},h.prototype.calcGrid=function(c){var d=0,g=0;d=parseInt(Math.ceil((c.getRight()-c.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((c.getBottom()-c.getTop())/this.repulsionRange));for(var p=new Array(d),y=0;y<d;y++)p[y]=new Array(g);for(var y=0;y<d;y++)for(var b=0;b<g;b++)p[y][b]=new Array;return p},h.prototype.addNodeToGrid=function(c,d,g){var p=0,y=0,b=0,m=0;p=parseInt(Math.floor((c.getRect().x-d)/this.repulsionRange)),y=parseInt(Math.floor((c.getRect().width+c.getRect().x-d)/this.repulsionRange)),b=parseInt(Math.floor((c.getRect().y-g)/this.repulsionRange)),m=parseInt(Math.floor((c.getRect().height+c.getRect().y-g)/this.repulsionRange));for(var E=p;E<=y;E++)for(var T=b;T<=m;T++)this.grid[E][T].push(c),c.setGridCoordinates(p,y,b,m)},h.prototype.updateGrid=function(){var c,d,g=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),c=0;c<g.length;c++)d=g[c],this.addNodeToGrid(d,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(c,d,g,p){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&g||p){var y=new Set;c.surrounding=new Array;for(var b,m=this.grid,E=c.startX-1;E<c.finishX+2;E++)for(var T=c.startY-1;T<c.finishY+2;T++)if(!(E<0||T<0||E>=m.length||T>=m[0].length)){for(var L=0;L<m[E][T].length;L++)if(b=m[E][T][L],!(c.getOwner()!=b.getOwner()||c==b)&&!d.has(b)&&!y.has(b)){var w=Math.abs(c.getCenterX()-b.getCenterX())-(c.getWidth()/2+b.getWidth()/2),C=Math.abs(c.getCenterY()-b.getCenterY())-(c.getHeight()/2+b.getHeight()/2);w<=this.repulsionRange&&C<=this.repulsionRange&&y.add(b)}}c.surrounding=[].concat(i(y))}for(E=0;E<c.surrounding.length;E++)this.calcRepulsionForce(c,c.surrounding[E])},h.prototype.calcRepulsionRange=function(){return 0},r.exports=h}),(function(r,a,n){var i=n(1),o=n(7);function s(l,f,h){i.call(this,l,f,h),this.idealLength=o.DEFAULT_EDGE_LENGTH}s.prototype=Object.create(i.prototype);for(var u in i)s[u]=i[u];r.exports=s}),(function(r,a,n){var i=n(3);function o(u,l,f,h){i.call(this,u,l,f,h),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}o.prototype=Object.create(i.prototype);for(var s in i)o[s]=i[s];o.prototype.setGridCoordinates=function(u,l,f,h){this.startX=u,this.finishX=l,this.startY=f,this.finishY=h},r.exports=o}),(function(r,a,n){function i(o,s){this.width=0,this.height=0,o!==null&&s!==null&&(this.height=s,this.width=o)}i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(o){this.width=o},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(o){this.height=o},r.exports=i}),(function(r,a,n){var i=n(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(s,u){var l=i.createID(s);this.contains(l)||(this.map[l]=u,this.keys.push(s))},o.prototype.contains=function(s){return i.createID(s),this.map[s]!=null},o.prototype.get=function(s){var u=i.createID(s);return this.map[u]},o.prototype.keySet=function(){return this.keys},r.exports=o}),(function(r,a,n){var i=n(14);function o(){this.set={}}o.prototype.add=function(s){var u=i.createID(s);this.contains(u)||(this.set[u]=s)},o.prototype.remove=function(s){delete this.set[i.createID(s)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(s){return this.set[i.createID(s)]==s},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(s){for(var u=Object.keys(this.set),l=u.length,f=0;f<l;f++)s.push(this.set[u[f]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(s){for(var u=s.length,l=0;l<u;l++){var f=s[l];this.add(f)}},r.exports=o}),(function(r,a,n){var i=(function(){function l(f,h){for(var v=0;v<h.length;v++){var c=h[v];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}return function(f,h,v){return h&&l(f.prototype,h),v&&l(f,v),f}})();function o(l,f){if(!(l instanceof f))throw new TypeError("Cannot call a class as a function")}var s=n(11),u=(function(){function l(f,h){o(this,l),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var v=void 0;f instanceof s?v=f.size():v=f.length,this._quicksort(f,0,v-1)}return i(l,[{key:"_quicksort",value:function(h,v,c){if(v<c){var d=this._partition(h,v,c);this._quicksort(h,v,d),this._quicksort(h,d+1,c)}}},{key:"_partition",value:function(h,v,c){for(var d=this._get(h,v),g=v,p=c;;){for(;this.compareFunction(d,this._get(h,p));)p--;for(;this.compareFunction(this._get(h,g),d);)g++;if(g<p)this._swap(h,g,p),g++,p--;else return p}}},{key:"_get",value:function(h,v){return h instanceof s?h.get_object_at(v):h[v]}},{key:"_set",value:function(h,v,c){h instanceof s?h.set_object_at(v,c):h[v]=c}},{key:"_swap",value:function(h,v,c){var d=this._get(h,v);this._set(h,v,this._get(h,c)),this._set(h,c,d)}},{key:"_defaultCompareFunction",value:function(h,v){return v>h}}]),l})();r.exports=u}),(function(r,a,n){var i=(function(){function u(l,f){for(var h=0;h<f.length;h++){var v=f[h];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,v.key,v)}}return function(l,f,h){return f&&u(l.prototype,f),h&&u(l,h),l}})();function o(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}var s=(function(){function u(l,f){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,u),this.sequence1=l,this.sequence2=f,this.match_score=h,this.mismatch_penalty=v,this.gap_penalty=c,this.iMax=l.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var d=0;d<this.iMax;d++){this.grid[d]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[d][g]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[p][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return i(u,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var c=1;c<this.jMax;c++){var d=void 0;this.sequence1[v-1]===this.sequence2[c-1]?d=this.grid[v-1][c-1]+this.match_score:d=this.grid[v-1][c-1]+this.mismatch_penalty;var g=this.grid[v-1][c]+this.gap_penalty,p=this.grid[v][c-1]+this.gap_penalty,y=[d,g,p],b=this.arrayAllMaxIndexes(y);this.grid[v][c]=y[b[0]],this.tracebackGrid[v][c]=[b.includes(0),b.includes(1),b.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var h=f[0],v=this.tracebackGrid[h.pos[0]][h.pos[1]];v[0]&&f.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),v[1]&&f.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),v[2]&&f.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,h){for(var v=[],c=-1;(c=f.indexOf(h,c+1))!==-1;)v.push(c);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),u})();r.exports=s}),(function(r,a,n){var i=function(){};i.FDLayout=n(18),i.FDLayoutConstants=n(7),i.FDLayoutEdge=n(19),i.FDLayoutNode=n(20),i.DimensionD=n(21),i.HashMap=n(22),i.HashSet=n(23),i.IGeometry=n(8),i.IMath=n(9),i.Integer=n(10),i.Point=n(12),i.PointD=n(4),i.RandomSeed=n(16),i.RectangleD=n(13),i.Transform=n(17),i.UniqueIDGeneretor=n(14),i.Quicksort=n(24),i.LinkedList=n(11),i.LGraphObject=n(2),i.LGraph=n(5),i.LEdge=n(1),i.LGraphManager=n(6),i.LNode=n(3),i.Layout=n(15),i.LayoutConstants=n(0),i.NeedlemanWunsch=n(25),r.exports=i}),(function(r,a,n){function i(){this.listeners=[]}var o=i.prototype;o.addListener=function(s,u){this.listeners.push({event:s,callback:u})},o.removeListener=function(s,u){for(var l=this.listeners.length;l>=0;l--){var f=this.listeners[l];f.event===s&&f.callback===u&&this.listeners.splice(l,1)}},o.emit=function(s,u){for(var l=0;l<this.listeners.length;l++){var f=this.listeners[l];s===f.event&&f.callback(u)}},r.exports=i})])})})(fi)),fi.exports}var cI=li.exports,cE;function vI(){return cE||(cE=1,(function(t,e){(function(a,n){t.exports=n(hI())})(cI,function(r){return(function(a){var n={};function i(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return a[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=a,i.c=n,i.i=function(o){return o},i.d=function(o,s,u){i.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,"a",s),s},i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},i.p="",i(i.s=7)})([(function(a,n){a.exports=r}),(function(a,n,i){var o=i(0).FDLayoutConstants;function s(){}for(var u in o)s[u]=o[u];s.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,s.DEFAULT_RADIAL_SEPARATION=o.DEFAULT_EDGE_LENGTH,s.DEFAULT_COMPONENT_SEPERATION=60,s.TILE=!0,s.TILING_PADDING_VERTICAL=10,s.TILING_PADDING_HORIZONTAL=10,s.TREE_REDUCTION_ON_INCREMENTAL=!1,a.exports=s}),(function(a,n,i){var o=i(0).FDLayoutEdge;function s(l,f,h){o.call(this,l,f,h)}s.prototype=Object.create(o.prototype);for(var u in o)s[u]=o[u];a.exports=s}),(function(a,n,i){var o=i(0).LGraph;function s(l,f,h){o.call(this,l,f,h)}s.prototype=Object.create(o.prototype);for(var u in o)s[u]=o[u];a.exports=s}),(function(a,n,i){var o=i(0).LGraphManager;function s(l){o.call(this,l)}s.prototype=Object.create(o.prototype);for(var u in o)s[u]=o[u];a.exports=s}),(function(a,n,i){var o=i(0).FDLayoutNode,s=i(0).IMath;function u(f,h,v,c){o.call(this,f,h,v,c)}u.prototype=Object.create(o.prototype);for(var l in o)u[l]=o[l];u.prototype.move=function(){var f=this.graphManager.getLayout();this.displacementX=f.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=f.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>f.coolingFactor*f.maxNodeDisplacement&&(this.displacementX=f.coolingFactor*f.maxNodeDisplacement*s.sign(this.displacementX)),Math.abs(this.displacementY)>f.coolingFactor*f.maxNodeDisplacement&&(this.displacementY=f.coolingFactor*f.maxNodeDisplacement*s.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),f.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},u.prototype.propogateDisplacementToChildren=function(f,h){for(var v=this.getChild().getNodes(),c,d=0;d<v.length;d++)c=v[d],c.getChild()==null?(c.moveBy(f,h),c.displacementX+=f,c.displacementY+=h):c.propogateDisplacementToChildren(f,h)},u.prototype.setPred1=function(f){this.pred1=f},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(f){this.next=f},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(f){this.processed=f},u.prototype.isProcessed=function(){return processed},a.exports=u}),(function(a,n,i){var o=i(0).FDLayout,s=i(4),u=i(3),l=i(5),f=i(2),h=i(1),v=i(0).FDLayoutConstants,c=i(0).LayoutConstants,d=i(0).Point,g=i(0).PointD,p=i(0).Layout,y=i(0).Integer,b=i(0).IGeometry,m=i(0).LGraph,E=i(0).Transform;function T(){o.call(this),this.toBeTiled={}}T.prototype=Object.create(o.prototype);for(var L in o)T[L]=o[L];T.prototype.newGraphManager=function(){var w=new s(this);return this.graphManager=w,w},T.prototype.newGraph=function(w){return new u(null,this.graphManager,w)},T.prototype.newNode=function(w){return new l(this.graphManager,w)},T.prototype.newEdge=function(w){return new f(null,null,w)},T.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=v.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=v.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=v.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=v.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=v.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=v.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/v.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=v.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},T.prototype.layout=function(){var w=c.DEFAULT_CREATE_BENDS_AS_NEEDED;return w&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var C=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(D){return C.has(D)});this.graphManager.setAllNodesToApplyGravitation(A)}}else{var w=this.getFlatForest();if(w.length>0)this.positionNodesRadially(w);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var C=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(R){return C.has(R)});this.graphManager.setAllNodesToApplyGravitation(A),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),C=this.nodesWithGravity.filter(function(S){return w.has(S)});this.graphManager.setAllNodesToApplyGravitation(C),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var A=!this.isTreeGrowing&&!this.isGrowthFinished,R=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(A,R),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),C={},A=0;A<w.length;A++){var R=w[A].rect,S=w[A].id;C[S]={id:S,x:R.getCenterX(),y:R.getCenterY(),w:R.width,h:R.height}}return C},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var w=!1;if(v.ANIMATE==="during")this.emit("layoutstarted");else{for(;!w;)w=this.tick();this.graphManager.updateBounds()}},T.prototype.calculateNodesToApplyGravitationTo=function(){var w=[],C,A=this.graphManager.getGraphs(),R=A.length,S;for(S=0;S<R;S++)C=A[S],C.updateConnected(),C.isConnected||(w=w.concat(C.getNodes()));return w},T.prototype.createBendpoints=function(){var w=[];w=w.concat(this.graphManager.getAllEdges());var C=new Set,A;for(A=0;A<w.length;A++){var R=w[A];if(!C.has(R)){var S=R.getSource(),D=R.getTarget();if(S==D)R.getBendpoints().push(new g),R.getBendpoints().push(new g),this.createDummyNodesForBendpoints(R),C.add(R);else{var P=[];if(P=P.concat(S.getEdgeListToNode(D)),P=P.concat(D.getEdgeListToNode(S)),!C.has(P[0])){if(P.length>1){var x;for(x=0;x<P.length;x++){var N=P[x];N.getBendpoints().push(new g),this.createDummyNodesForBendpoints(N)}}P.forEach(function(M){C.add(M)})}}}if(C.size==w.length)break}},T.prototype.positionNodesRadially=function(w){for(var C=new d(0,0),A=Math.ceil(Math.sqrt(w.length)),R=0,S=0,D=0,P=new g(0,0),x=0;x<w.length;x++){x%A==0&&(D=0,S=R,x!=0&&(S+=h.DEFAULT_COMPONENT_SEPERATION),R=0);var N=w[x],M=p.findCenterOfTree(N);C.x=D,C.y=S,P=T.radialLayout(N,M,C),P.y>R&&(R=Math.floor(P.y)),D=Math.floor(P.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(c.WORLD_CENTER_X-P.x/2,c.WORLD_CENTER_Y-P.y/2))},T.radialLayout=function(w,C,A){var R=Math.max(this.maxDiagonalInTree(w),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(C,null,0,359,0,R);var S=m.calculateBounds(w),D=new E;D.setDeviceOrgX(S.getMinX()),D.setDeviceOrgY(S.getMinY()),D.setWorldOrgX(A.x),D.setWorldOrgY(A.y);for(var P=0;P<w.length;P++){var x=w[P];x.transform(D)}var N=new g(S.getMaxX(),S.getMaxY());return D.inverseTransformPoint(N)},T.branchRadialLayout=function(w,C,A,R,S,D){var P=(R-A+1)/2;P<0&&(P+=180);var x=(P+A)%360,N=x*b.TWO_PI/360,M=S*Math.cos(N),I=S*Math.sin(N);w.setCenter(M,I);var O=[];O=O.concat(w.getEdges());var k=O.length;C!=null&&k--;for(var F=0,_=O.length,z,X=w.getEdgesBetween(C);X.length>1;){var q=X[0];X.splice(0,1);var G=O.indexOf(q);G>=0&&O.splice(G,1),_--,k--}C!=null?z=(O.indexOf(X[0])+1)%_:z=0;for(var U=Math.abs(R-A)/k,K=z;F!=k;K=++K%_){var J=O[K].getOtherEnd(w);if(J!=C){var H=(A+F*U)%360,Y=(H+U)%360;T.branchRadialLayout(J,w,H,Y,S+D,D),F++}}},T.maxDiagonalInTree=function(w){for(var C=y.MIN_VALUE,A=0;A<w.length;A++){var R=w[A],S=R.getDiagonal();S>C&&(C=S)}return C},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var w=this,C={};this.memberGroups={},this.idToDummyNode={};for(var A=[],R=this.graphManager.getAllNodes(),S=0;S<R.length;S++){var D=R[S],P=D.getParent();this.getNodeDegreeWithChildren(D)===0&&(P.id==null||!this.getToBeTiled(P))&&A.push(D)}for(var S=0;S<A.length;S++){var D=A[S],x=D.getParent().id;typeof C[x]>"u"&&(C[x]=[]),C[x]=C[x].concat(D)}Object.keys(C).forEach(function(N){if(C[N].length>1){var M="DummyCompound_"+N;w.memberGroups[M]=C[N];var I=C[N][0].getParent(),O=new l(w.graphManager);O.id=M,O.paddingLeft=I.paddingLeft||0,O.paddingRight=I.paddingRight||0,O.paddingBottom=I.paddingBottom||0,O.paddingTop=I.paddingTop||0,w.idToDummyNode[M]=O;var k=w.getGraphManager().add(w.newGraph(),O),F=I.getChild();F.add(O);for(var _=0;_<C[N].length;_++){var z=C[N][_];F.remove(z),k.add(z)}}})},T.prototype.clearCompounds=function(){var w={},C={};this.performDFSOnCompounds();for(var A=0;A<this.compoundOrder.length;A++)C[this.compoundOrder[A].id]=this.compoundOrder[A],w[this.compoundOrder[A].id]=[].concat(this.compoundOrder[A].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[A].getChild()),this.compoundOrder[A].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(w,C)},T.prototype.clearZeroDegreeMembers=function(){var w=this,C=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(A){var R=w.idToDummyNode[A];C[A]=w.tileNodes(w.memberGroups[A],R.paddingLeft+R.paddingRight),R.rect.width=C[A].width,R.rect.height=C[A].height})},T.prototype.repopulateCompounds=function(){for(var w=this.compoundOrder.length-1;w>=0;w--){var C=this.compoundOrder[w],A=C.id,R=C.paddingLeft,S=C.paddingTop;this.adjustLocations(this.tiledMemberPack[A],C.rect.x,C.rect.y,R,S)}},T.prototype.repopulateZeroDegreeMembers=function(){var w=this,C=this.tiledZeroDegreePack;Object.keys(C).forEach(function(A){var R=w.idToDummyNode[A],S=R.paddingLeft,D=R.paddingTop;w.adjustLocations(C[A],R.rect.x,R.rect.y,S,D)})},T.prototype.getToBeTiled=function(w){var C=w.id;if(this.toBeTiled[C]!=null)return this.toBeTiled[C];var A=w.getChild();if(A==null)return this.toBeTiled[C]=!1,!1;for(var R=A.getNodes(),S=0;S<R.length;S++){var D=R[S];if(this.getNodeDegree(D)>0)return this.toBeTiled[C]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[C]=!1,!1}return this.toBeTiled[C]=!0,!0},T.prototype.getNodeDegree=function(w){w.id;for(var C=w.getEdges(),A=0,R=0;R<C.length;R++){var S=C[R];S.getSource().id!==S.getTarget().id&&(A=A+1)}return A},T.prototype.getNodeDegreeWithChildren=function(w){var C=this.getNodeDegree(w);if(w.getChild()==null)return C;for(var A=w.getChild().getNodes(),R=0;R<A.length;R++){var S=A[R];C+=this.getNodeDegreeWithChildren(S)}return C},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},T.prototype.fillCompexOrderByDFS=function(w){for(var C=0;C<w.length;C++){var A=w[C];A.getChild()!=null&&this.fillCompexOrderByDFS(A.getChild().getNodes()),this.getToBeTiled(A)&&this.compoundOrder.push(A)}},T.prototype.adjustLocations=function(w,C,A,R,S){C+=R,A+=S;for(var D=C,P=0;P<w.rows.length;P++){var x=w.rows[P];C=D;for(var N=0,M=0;M<x.length;M++){var I=x[M];I.rect.x=C,I.rect.y=A,C+=I.rect.width+w.horizontalPadding,I.rect.height>N&&(N=I.rect.height)}A+=N+w.verticalPadding}},T.prototype.tileCompoundMembers=function(w,C){var A=this;this.tiledMemberPack=[],Object.keys(w).forEach(function(R){var S=C[R];A.tiledMemberPack[R]=A.tileNodes(w[R],S.paddingLeft+S.paddingRight),S.rect.width=A.tiledMemberPack[R].width,S.rect.height=A.tiledMemberPack[R].height})},T.prototype.tileNodes=function(w,C){var A=h.TILING_PADDING_VERTICAL,R=h.TILING_PADDING_HORIZONTAL,S={rows:[],rowWidth:[],rowHeight:[],width:0,height:C,verticalPadding:A,horizontalPadding:R};w.sort(function(x,N){return x.rect.width*x.rect.height>N.rect.width*N.rect.height?-1:x.rect.width*x.rect.height<N.rect.width*N.rect.height?1:0});for(var D=0;D<w.length;D++){var P=w[D];S.rows.length==0?this.insertNodeToRow(S,P,0,C):this.canAddHorizontal(S,P.rect.width,P.rect.height)?this.insertNodeToRow(S,P,this.getShortestRowIndex(S),C):this.insertNodeToRow(S,P,S.rows.length,C),this.shiftToLastRow(S)}return S},T.prototype.insertNodeToRow=function(w,C,A,R){var S=R;if(A==w.rows.length){var D=[];w.rows.push(D),w.rowWidth.push(S),w.rowHeight.push(0)}var P=w.rowWidth[A]+C.rect.width;w.rows[A].length>0&&(P+=w.horizontalPadding),w.rowWidth[A]=P,w.width<P&&(w.width=P);var x=C.rect.height;A>0&&(x+=w.verticalPadding);var N=0;x>w.rowHeight[A]&&(N=w.rowHeight[A],w.rowHeight[A]=x,N=w.rowHeight[A]-N),w.height+=N,w.rows[A].push(C)},T.prototype.getShortestRowIndex=function(w){for(var C=-1,A=Number.MAX_VALUE,R=0;R<w.rows.length;R++)w.rowWidth[R]<A&&(C=R,A=w.rowWidth[R]);return C},T.prototype.getLongestRowIndex=function(w){for(var C=-1,A=Number.MIN_VALUE,R=0;R<w.rows.length;R++)w.rowWidth[R]>A&&(C=R,A=w.rowWidth[R]);return C},T.prototype.canAddHorizontal=function(w,C,A){var R=this.getShortestRowIndex(w);if(R<0)return!0;var S=w.rowWidth[R];if(S+w.horizontalPadding+C<=w.width)return!0;var D=0;w.rowHeight[R]<A&&R>0&&(D=A+w.verticalPadding-w.rowHeight[R]);var P;w.width-S>=C+w.horizontalPadding?P=(w.height+D)/(S+C+w.horizontalPadding):P=(w.height+D)/w.width,D=A+w.verticalPadding;var x;return w.width<C?x=(w.height+D)/C:x=(w.height+D)/w.width,x<1&&(x=1/x),P<1&&(P=1/P),P<x},T.prototype.shiftToLastRow=function(w){var C=this.getLongestRowIndex(w),A=w.rowWidth.length-1,R=w.rows[C],S=R[R.length-1],D=S.width+w.horizontalPadding;if(w.width-w.rowWidth[A]>D&&C!=A){R.splice(-1,1),w.rows[A].push(S),w.rowWidth[C]=w.rowWidth[C]-D,w.rowWidth[A]=w.rowWidth[A]+D,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var P=Number.MIN_VALUE,x=0;x<R.length;x++)R[x].height>P&&(P=R[x].height);C>0&&(P+=w.verticalPadding);var N=w.rowHeight[C]+w.rowHeight[A];w.rowHeight[C]=P,w.rowHeight[A]<S.height+w.verticalPadding&&(w.rowHeight[A]=S.height+w.verticalPadding);var M=w.rowHeight[C]+w.rowHeight[A];w.height+=M-N,this.shiftToLastRow(w)}},T.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},T.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},T.prototype.reduceTrees=function(){for(var w=[],C=!0,A;C;){var R=this.graphManager.getAllNodes(),S=[];C=!1;for(var D=0;D<R.length;D++)A=R[D],A.getEdges().length==1&&!A.getEdges()[0].isInterGraph&&A.getChild()==null&&(S.push([A,A.getEdges()[0],A.getOwner()]),C=!0);if(C==!0){for(var P=[],x=0;x<S.length;x++)S[x][0].getEdges().length==1&&(P.push(S[x]),S[x][0].getOwner().remove(S[x][0]));w.push(P),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=w},T.prototype.growTree=function(w){for(var C=w.length,A=w[C-1],R,S=0;S<A.length;S++)R=A[S],this.findPlaceforPrunedNode(R),R[2].add(R[0]),R[2].add(R[1],R[1].source,R[1].target);w.splice(w.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},T.prototype.findPlaceforPrunedNode=function(w){var C,A,R=w[0];R==w[1].source?A=w[1].target:A=w[1].source;var S=A.startX,D=A.finishX,P=A.startY,x=A.finishY,N=0,M=0,I=0,O=0,k=[N,I,M,O];if(P>0)for(var F=S;F<=D;F++)k[0]+=this.grid[F][P-1].length+this.grid[F][P].length-1;if(D<this.grid.length-1)for(var F=P;F<=x;F++)k[1]+=this.grid[D+1][F].length+this.grid[D][F].length-1;if(x<this.grid[0].length-1)for(var F=S;F<=D;F++)k[2]+=this.grid[F][x+1].length+this.grid[F][x].length-1;if(S>0)for(var F=P;F<=x;F++)k[3]+=this.grid[S-1][F].length+this.grid[S][F].length-1;for(var _=y.MAX_VALUE,z,X,q=0;q<k.length;q++)k[q]<_?(_=k[q],z=1,X=q):k[q]==_&&z++;if(z==3&&_==0)k[0]==0&&k[1]==0&&k[2]==0?C=1:k[0]==0&&k[1]==0&&k[3]==0?C=0:k[0]==0&&k[2]==0&&k[3]==0?C=3:k[1]==0&&k[2]==0&&k[3]==0&&(C=2);else if(z==2&&_==0){var G=Math.floor(Math.random()*2);k[0]==0&&k[1]==0?G==0?C=0:C=1:k[0]==0&&k[2]==0?G==0?C=0:C=2:k[0]==0&&k[3]==0?G==0?C=0:C=3:k[1]==0&&k[2]==0?G==0?C=1:C=2:k[1]==0&&k[3]==0?G==0?C=1:C=3:G==0?C=2:C=3}else if(z==4&&_==0){var G=Math.floor(Math.random()*4);C=G}else C=X;C==0?R.setCenter(A.getCenterX(),A.getCenterY()-A.getHeight()/2-v.DEFAULT_EDGE_LENGTH-R.getHeight()/2):C==1?R.setCenter(A.getCenterX()+A.getWidth()/2+v.DEFAULT_EDGE_LENGTH+R.getWidth()/2,A.getCenterY()):C==2?R.setCenter(A.getCenterX(),A.getCenterY()+A.getHeight()/2+v.DEFAULT_EDGE_LENGTH+R.getHeight()/2):R.setCenter(A.getCenterX()-A.getWidth()/2-v.DEFAULT_EDGE_LENGTH-R.getWidth()/2,A.getCenterY())},a.exports=T}),(function(a,n,i){var o={};o.layoutBase=i(0),o.CoSEConstants=i(1),o.CoSEEdge=i(2),o.CoSEGraph=i(3),o.CoSEGraphManager=i(4),o.CoSELayout=i(6),o.CoSENode=i(5),a.exports=o})])})})(li)),li.exports}var dI=ui.exports,vE;function gI(){return vE||(vE=1,(function(t,e){(function(a,n){t.exports=n(vI())})(dI,function(r){return(function(a){var n={};function i(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return a[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=a,i.c=n,i.i=function(o){return o},i.d=function(o,s,u){i.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,"a",s),s},i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},i.p="",i(i.s=1)})([(function(a,n){a.exports=r}),(function(a,n,i){var o=i(0).layoutBase.LayoutConstants,s=i(0).layoutBase.FDLayoutConstants,u=i(0).CoSEConstants,l=i(0).CoSELayout,f=i(0).CoSENode,h=i(0).layoutBase.PointD,v=i(0).layoutBase.DimensionD,c={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(b,m){var E={};for(var T in b)E[T]=b[T];for(var T in m)E[T]=m[T];return E}function g(b){this.options=d(c,b),p(this.options)}var p=function(m){m.nodeRepulsion!=null&&(u.DEFAULT_REPULSION_STRENGTH=s.DEFAULT_REPULSION_STRENGTH=m.nodeRepulsion),m.idealEdgeLength!=null&&(u.DEFAULT_EDGE_LENGTH=s.DEFAULT_EDGE_LENGTH=m.idealEdgeLength),m.edgeElasticity!=null&&(u.DEFAULT_SPRING_STRENGTH=s.DEFAULT_SPRING_STRENGTH=m.edgeElasticity),m.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=m.nestingFactor),m.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=s.DEFAULT_GRAVITY_STRENGTH=m.gravity),m.numIter!=null&&(u.MAX_ITERATIONS=s.MAX_ITERATIONS=m.numIter),m.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=s.DEFAULT_GRAVITY_RANGE_FACTOR=m.gravityRange),m.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=m.gravityCompound),m.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=m.gravityRangeCompound),m.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=s.DEFAULT_COOLING_FACTOR_INCREMENTAL=m.initialEnergyOnIncremental),m.quality=="draft"?o.QUALITY=0:m.quality=="proof"?o.QUALITY=2:o.QUALITY=1,u.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=m.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!m.randomize,u.ANIMATE=s.ANIMATE=o.ANIMATE=m.animate,u.TILE=m.tile,u.TILING_PADDING_VERTICAL=typeof m.tilingPaddingVertical=="function"?m.tilingPaddingVertical.call():m.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof m.tilingPaddingHorizontal=="function"?m.tilingPaddingHorizontal.call():m.tilingPaddingHorizontal};g.prototype.run=function(){var b,m,E=this.options;this.idToLNode={};var T=this.layout=new l,L=this;L.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var w=T.newGraphManager();this.gm=w;var C=this.options.eles.nodes(),A=this.options.eles.edges();this.root=w.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(C),T);for(var R=0;R<A.length;R++){var S=A[R],D=this.idToLNode[S.data("source")],P=this.idToLNode[S.data("target")];if(D!==P&&D.getEdgesBetween(P).length==0){var x=w.add(T.newEdge(),D,P);x.id=S.id()}}var N=function(O,k){typeof O=="number"&&(O=k);var F=O.data("id"),_=L.idToLNode[F];return{x:_.getRect().getCenterX(),y:_.getRect().getCenterY()}},M=function I(){for(var O=function(){E.fit&&E.cy.fit(E.eles,E.padding),b||(b=!0,L.cy.one("layoutready",E.ready),L.cy.trigger({type:"layoutready",layout:L}))},k=L.options.refresh,F,_=0;_<k&&!F;_++)F=L.stopped||L.layout.tick();if(F){T.checkLayoutSuccess()&&!T.isSubLayout&&T.doPostLayout(),T.tilingPostLayout&&T.tilingPostLayout(),T.isLayoutFinished=!0,L.options.eles.nodes().positions(N),O(),L.cy.one("layoutstop",L.options.stop),L.cy.trigger({type:"layoutstop",layout:L}),m&&cancelAnimationFrame(m),b=!1;return}var z=L.layout.getPositionsData();E.eles.nodes().positions(function(X,q){if(typeof X=="number"&&(X=q),!X.isParent()){for(var G=X.id(),U=z[G],K=X;U==null&&(U=z[K.data("parent")]||z["DummyCompound_"+K.data("parent")],z[G]=U,K=K.parent()[0],K!=null););return U!=null?{x:U.x,y:U.y}:{x:X.position("x"),y:X.position("y")}}}),O(),m=requestAnimationFrame(I)};return T.addListener("layoutstarted",function(){L.options.animate==="during"&&(m=requestAnimationFrame(M))}),T.runLayout(),this.options.animate!=="during"&&(L.options.eles.nodes().not(":parent").layoutPositions(L,L.options,N),b=!1),this},g.prototype.getTopMostNodes=function(b){for(var m={},E=0;E<b.length;E++)m[b[E].id()]=!0;var T=b.filter(function(L,w){typeof L=="number"&&(L=w);for(var C=L.parent()[0];C!=null;){if(m[C.id()])return!1;C=C.parent()[0]}return!0});return T},g.prototype.processChildrenList=function(b,m,E){for(var T=m.length,L=0;L<T;L++){var w=m[L],C=w.children(),A,R=w.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null?A=b.add(new f(E.graphManager,new h(w.position("x")-R.w/2,w.position("y")-R.h/2),new v(parseFloat(R.w),parseFloat(R.h)))):A=b.add(new f(this.graphManager)),A.id=w.data("id"),A.paddingLeft=parseInt(w.css("padding")),A.paddingTop=parseInt(w.css("padding")),A.paddingRight=parseInt(w.css("padding")),A.paddingBottom=parseInt(w.css("padding")),this.options.nodeDimensionsIncludeLabels&&w.isParent()){var S=w.boundingBox({includeLabels:!0,includeNodes:!1}).w,D=w.boundingBox({includeLabels:!0,includeNodes:!1}).h,P=w.css("text-halign");A.labelWidth=S,A.labelHeight=D,A.labelPos=P}if(this.idToLNode[w.data("id")]=A,isNaN(A.rect.x)&&(A.rect.x=0),isNaN(A.rect.y)&&(A.rect.y=0),C!=null&&C.length>0){var x;x=E.getGraphManager().add(E.newGraph(),A),this.processChildrenList(x,C,E)}}},g.prototype.stop=function(){return this.stopped=!0,this};var y=function(m){m("layout","cose-bilkent",g)};typeof cytoscape<"u"&&y(cytoscape),a.exports=y})])})})(ui)),ui.exports}var pI=gI();const wI=xv(pI);export{wI as a,bI as b,La as c,EI as f};