@smarter.sh/ui-chat 0.9.0 → 0.10.0

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 (128) hide show
  1. package/README.md +7 -7
  2. package/dist/embed/mermaid/{abnfDiagram-VCTEODGH-1SbERmPs.js → abnfDiagram-VCTEODGH-CGtrctwA.js} +8 -8
  3. package/dist/embed/mermaid/{arc-VicTtbbz.js → arc-DlzgcAgU.js} +3 -3
  4. package/dist/embed/mermaid/architecture-7GRP2DOG-D66ObL4C.js +3 -0
  5. package/dist/embed/mermaid/{architectureDiagram-5GKGNRK7-CQABdiy9.js → architectureDiagram-5GKGNRK7-CgMNWdVn.js} +50 -40
  6. package/dist/embed/mermaid/{blockDiagram-I7D4REHJ-CtjOz0Jt.js → blockDiagram-I7D4REHJ-Q2YOF2Nl.js} +44 -33
  7. package/dist/embed/mermaid/{c4Diagram-7LVT6UL2-_qBudB6C.js → c4Diagram-7LVT6UL2-DI7_cX7n.js} +10 -10
  8. package/dist/embed/mermaid/channel-CxRe6Ync.js +5 -0
  9. package/dist/embed/mermaid/{chunk-2E4U76K2-CBll2dEU.js → chunk-2E4U76K2-DPc-jkQd.js} +83 -81
  10. package/dist/embed/mermaid/{chunk-2Q5K7J3B-kzxEEeTu.js → chunk-2Q5K7J3B-C1pX24ft.js} +2 -2
  11. package/dist/embed/mermaid/{chunk-4HAMMTFA-Dhz0SVnN.js → chunk-4HAMMTFA-DY_JmJA2.js} +9 -9
  12. package/dist/embed/mermaid/{chunk-5VM5RSS4-Cr17nBXp.js → chunk-5VM5RSS4-BFskf6Qk.js} +2 -2
  13. package/dist/embed/mermaid/{chunk-75Z2AOVW-BsWtLgfj.js → chunk-75Z2AOVW-BugNeXEB.js} +57 -57
  14. package/dist/embed/mermaid/{chunk-CLGD4ZFX-Bkjwlxy9.js → chunk-CLGD4ZFX-BOKCMNQY.js} +4 -4
  15. package/dist/embed/mermaid/{chunk-DU6HZSFF-1zIarP1Q.js → chunk-DU6HZSFF-C09wkxIu.js} +580 -583
  16. package/dist/embed/mermaid/{chunk-F27PBJKO-CiOL12VY.js → chunk-F27PBJKO-C69L38at.js} +5 -5
  17. package/dist/embed/mermaid/{chunk-FOHPRMQF-DS9zEyR5.js → chunk-FOHPRMQF-CLLDWcGe.js} +50 -39
  18. package/dist/embed/mermaid/{chunk-GMAD6QVW-Dc0gE_3Q.js → chunk-GMAD6QVW-NxqJJwNT.js} +76 -17
  19. package/dist/embed/mermaid/{chunk-GVQU2GXP-CWFtOgtb.js → chunk-GVQU2GXP-D4WoQcNg.js} +5 -5
  20. package/dist/embed/mermaid/{chunk-IMKFNOWR-CLyTlLwx.js → chunk-IMKFNOWR-DE94S7XC.js} +9 -9
  21. package/dist/embed/mermaid/{chunk-JWPE2WC7-Ccb0QaC8.js → chunk-JWPE2WC7-BGVSGRTC.js} +2 -2
  22. package/dist/embed/mermaid/{chunk-L3NEJ4N5-DnkSrVO8.js → chunk-L3NEJ4N5-CqdtyK-9.js} +9 -9
  23. package/dist/embed/mermaid/{chunk-LNGE3PJU-ByFTjlja.js → chunk-LNGE3PJU-DqC_0r8u.js} +20 -16
  24. package/dist/embed/mermaid/{chunk-OSK3NFVY-B57tZZIG.js → chunk-OSK3NFVY-B1KjtHOy.js} +11 -11
  25. package/dist/embed/mermaid/{chunk-P2QGCYS3-BUVAOFF-.js → chunk-P2QGCYS3-CP_jp-eQ.js} +3 -3
  26. package/dist/embed/mermaid/{chunk-POPQ4Y6H-BsUdeJ_J.js → chunk-POPQ4Y6H-CSwFrYKY.js} +4 -4
  27. package/dist/embed/mermaid/{chunk-PWAF6VOD-Cb-w19aO.js → chunk-PWAF6VOD-qhXJD1mO.js} +14 -14
  28. package/dist/embed/mermaid/{chunk-SHT3W25Y-znBBpcIu.js → chunk-SHT3W25Y-a5ik03bR.js} +13 -13
  29. package/dist/embed/mermaid/{chunk-SVP7TREG-DrHUM-6R.js → chunk-SVP7TREG-67QXjHHx.js} +5 -5
  30. package/dist/embed/mermaid/{chunk-TICWLB2K-xlGqZZYJ.js → chunk-TICWLB2K-DHg0COuy.js} +10 -10
  31. package/dist/embed/mermaid/{chunk-TLUHSLCS-COwDpXBa.js → chunk-TLUHSLCS-BwEhuf5d.js} +12 -12
  32. package/dist/embed/mermaid/{chunk-XXDRQBXY-pOp8MAr9.js → chunk-XXDRQBXY-BJjzBm4h.js} +3 -3
  33. package/dist/embed/mermaid/{chunk-Y2CYZVJY-i11wjrBe.js → chunk-Y2CYZVJY-BAad7w_K.js} +1 -1
  34. package/dist/embed/mermaid/classDiagram-ZZMXUADV-BlIPVBOk.js +30 -0
  35. package/dist/embed/mermaid/classDiagram-v2-VYDZK3BY-BavoJkSK.js +30 -0
  36. package/dist/embed/mermaid/{cose-bilkent-JH36ORCC-DFvJxZ7v.js → cose-bilkent-JH36ORCC-Cx3-7Rca.js} +58 -50
  37. package/dist/embed/mermaid/cynefin-OW5HDTMX-Cfa1-YuM.js +3 -0
  38. package/dist/embed/mermaid/{cynefinDiagram-5FMLGOSQ-CCm5IQBE.js → cynefinDiagram-5FMLGOSQ-CsV1I6A_.js} +8 -8
  39. package/dist/embed/mermaid/{cytoscape.esm-BstmGtAB.js → cytoscape.esm-CLcfvFJ6.js} +484 -386
  40. package/dist/embed/mermaid/{dagre-BwzzJJA_.js → dagre-COnXXJRS.js} +137 -135
  41. package/dist/embed/mermaid/{dagre-GXQ25YYZ-B3d3iNF-.js → dagre-GXQ25YYZ-BzZWpDkI.js} +18 -16
  42. package/dist/embed/mermaid/{defaultLocale-N-0uLSyg.js → defaultLocale-CQ4Nl88y.js} +12 -12
  43. package/dist/embed/mermaid/{diagram-S7CK7UJ4-BeA5UJrt.js → diagram-S7CK7UJ4-CShsH_ul.js} +19 -11
  44. package/dist/embed/mermaid/{diagram-UQ7AKVKN-DK0uHb-2.js → diagram-UQ7AKVKN-Bb0mFpt2.js} +8 -8
  45. package/dist/embed/mermaid/{diagram-VSXAHHWV-D5JXip1B.js → diagram-VSXAHHWV-DUq5PKM1.js} +8 -8
  46. package/dist/embed/mermaid/{diagram-VX7I27RA-B1VysvG9.js → diagram-VX7I27RA-Co2uyrw2.js} +33 -33
  47. package/dist/embed/mermaid/{diagram-Z3DM3KII-ZGUJaFq-.js → diagram-Z3DM3KII-CTdPPkZs.js} +8 -8
  48. package/dist/embed/mermaid/{dist-DRRwZ4Yi.js → dist-CjR2JtV-.js} +3 -3
  49. package/dist/embed/mermaid/{ebnfDiagram-PWID7BFC-BOahZhWx.js → ebnfDiagram-PWID7BFC-CAQNT7Vt.js} +8 -8
  50. package/dist/embed/mermaid/{erDiagram-RLTQ6QDP-7cGpGRQo.js → erDiagram-RLTQ6QDP-DluYOFtk.js} +16 -16
  51. package/dist/embed/mermaid/eventmodeling-NTZA5JFV-DFSPvGS4.js +3 -0
  52. package/dist/embed/mermaid/flowDiagram-HODETNUW-BKXSV8xL.js +17 -0
  53. package/dist/embed/mermaid/{ganttDiagram-EL5Y4UJY-s6Kx4KlU.js → ganttDiagram-EL5Y4UJY-D2BBzcpY.js} +36 -36
  54. package/dist/embed/mermaid/gitGraph-4MIJSDKK-BTHPY7Tg.js +3 -0
  55. package/dist/embed/mermaid/{gitGraphDiagram-WWUBYQGX-Blwdy0b7.js → gitGraphDiagram-WWUBYQGX-BzZ3sE3s.js} +8 -8
  56. package/dist/embed/mermaid/{graphlib-XW-Jr8pF.js → graphlib-D8JS7ydf.js} +135 -135
  57. package/dist/embed/mermaid/info-A6RAGUB7-4Mm0OyB8.js +3 -0
  58. package/dist/embed/mermaid/{infoDiagram-27XIBGKW-CstzbQPb.js → infoDiagram-27XIBGKW-DcbKIVvy.js} +6 -6
  59. package/dist/embed/mermaid/{init-CsQUQz36.js → init-CFNf60QB.js} +1 -1
  60. package/dist/embed/mermaid/{ishikawaDiagram-5VMMS53U-C6y_w0kd.js → ishikawaDiagram-5VMMS53U-B6q3rvke.js} +10 -8
  61. package/dist/embed/mermaid/{journeyDiagram-3NMN7TZE-BHVux_z1.js → journeyDiagram-3NMN7TZE-CDDY2Xma.js} +7 -7
  62. package/dist/embed/mermaid/{kanban-definition-UXKFOSKX-Cgj-7IHi.js → kanban-definition-UXKFOSKX-w7v22sq3.js} +14 -14
  63. package/dist/embed/mermaid/{katex-DmPOayaq.js → katex-BqirFtOb.js} +21 -12
  64. package/dist/embed/mermaid/{line-brkWVSn0.js → line-DoUHpRzu.js} +4 -4
  65. package/dist/embed/mermaid/{linear-CiZWLcTr.js → linear-CLS335Sc.js} +23 -23
  66. package/dist/embed/mermaid/{mermaid-parser.core-BjLg_By9.js → mermaid-parser.core-BoI6HFCg.js} +41 -35
  67. package/dist/embed/mermaid/mermaid.js +61 -61
  68. package/dist/embed/mermaid/{mindmap-definition-YA3MSWOX-DRc-FzI_.js → mindmap-definition-YA3MSWOX-1bs_tKMD.js} +18 -18
  69. package/dist/embed/mermaid/{ordinal-BubEveRk.js → ordinal-Da0rnhxr.js} +3 -3
  70. package/dist/embed/mermaid/packet-AYTQ26CC-BAodtDR3.js +3 -0
  71. package/dist/embed/mermaid/{path-CnWkkRiY.js → path-hN9ktzbr.js} +3 -3
  72. package/dist/embed/mermaid/{pegDiagram-XKGWAZYB-Cw-aYwaF.js → pegDiagram-XKGWAZYB-DsrQs7Qo.js} +8 -8
  73. package/dist/embed/mermaid/pie-WAS4IAKB-Yw-9-2EN.js +3 -0
  74. package/dist/embed/mermaid/{pieDiagram-E7YTZNPT-DoguGyzq.js → pieDiagram-E7YTZNPT-BvkRs6Xl.js} +15 -15
  75. package/dist/embed/mermaid/{quadrantDiagram-AXDQQJYC-Cu4dMFZL.js → quadrantDiagram-AXDQQJYC-DDSDkbcq.js} +5 -5
  76. package/dist/embed/mermaid/radar-RG4KPBEZ-BtjjaEPe.js +3 -0
  77. package/dist/embed/mermaid/railroad-74A4TZTK-Du7TjeaO.js +3 -0
  78. package/dist/embed/mermaid/railroad-abnf-HS5TGJTU-D3flpty6.js +3 -0
  79. package/dist/embed/mermaid/railroad-ebnf-LZEXJU2U-DWpeYHWC.js +3 -0
  80. package/dist/embed/mermaid/railroad-peg-WCYAUIDC-DKiyz9fh.js +3 -0
  81. package/dist/embed/mermaid/{railroadDiagram-O6MQD6OU-DDX-9GRQ.js → railroadDiagram-O6MQD6OU-T__Cw3ez.js} +8 -8
  82. package/dist/embed/mermaid/{requirementDiagram-BXWQKSXE-z8PPo06M.js → requirementDiagram-BXWQKSXE-ADir8pgL.js} +15 -15
  83. package/dist/embed/mermaid/{rough.esm-DXYGHN3m.js → rough.esm-XhrPyaQA.js} +1 -1
  84. package/dist/embed/mermaid/{sankeyDiagram-P5KCCOFB-CeD0II3M.js → sankeyDiagram-P5KCCOFB-YTgoqhmd.js} +19 -19
  85. package/dist/embed/mermaid/{sequenceDiagram-WJ2MYXX4-Cs-Wxyvw.js → sequenceDiagram-WJ2MYXX4-Dpn6ph0n.js} +9 -9
  86. package/dist/embed/mermaid/{sizeCapture-INFHLROL-DujrpAYz.js → sizeCapture-INFHLROL-C2wlw8KF.js} +2 -2
  87. package/dist/embed/mermaid/{src-DbyMbLVK.js → src-CH4XuqUv.js} +104 -98
  88. package/dist/embed/mermaid/{stateDiagram-D77RDMKH-CqWtgHSc.js → stateDiagram-D77RDMKH-V_8TbftV.js} +20 -20
  89. package/dist/embed/mermaid/stateDiagram-v2-MP3YSRHH-us7SNDcU.js +30 -0
  90. package/dist/embed/mermaid/{swimlanes-42K2YHIH-MutR4uV4.js → swimlanes-42K2YHIH-wzihXC1V.js} +46 -24
  91. package/dist/embed/mermaid/swimlanesDiagram-VR7AAH4N-BML-4Vp0.js +31 -0
  92. package/dist/embed/mermaid/{timeline-definition-24CTP7MA-rZfNRFiT.js → timeline-definition-24CTP7MA-C3BzP6RA.js} +7 -7
  93. package/dist/embed/mermaid/treeView-Q6P3EWNA-Ba1dLcIR.js +3 -0
  94. package/dist/embed/mermaid/treemap-WGGIJYW6-D9G3ZsOW.js +3 -0
  95. package/dist/embed/mermaid/{vennDiagram-4TSXK5OY-KwMHebDQ.js → vennDiagram-4TSXK5OY-Cq1JumSe.js} +8 -8
  96. package/dist/embed/mermaid/wardley-WFR3VGLG-gAtip5-G.js +3 -0
  97. package/dist/embed/mermaid/{wardleyDiagram-VM6X3IG4-C-Fm7GGB.js → wardleyDiagram-VM6X3IG4-HtzestuU.js} +8 -8
  98. package/dist/embed/mermaid/{xychartDiagram-S5SC5T6Z-DZX43ay9.js → xychartDiagram-S5SC5T6Z-BE-W0B_D.js} +14 -14
  99. package/dist/embed.js +59 -59
  100. package/dist/embed.js.map +1 -1
  101. package/dist/smarter-chat-library.es.js +2733 -2641
  102. package/dist/smarter-chat-library.es.js.map +1 -1
  103. package/dist/smarter-chat-library.umd.js +56 -56
  104. package/dist/smarter-chat-library.umd.js.map +1 -1
  105. package/dist/types/src/contract.gen.d.ts +49 -26
  106. package/dist/ui-chat.css +1 -1
  107. package/package.json +1 -1
  108. package/dist/embed/mermaid/architecture-7GRP2DOG-D0nnNZ3B.js +0 -2
  109. package/dist/embed/mermaid/channel-BXMcYHk2.js +0 -5
  110. package/dist/embed/mermaid/classDiagram-ZZMXUADV-C8BeuQnA.js +0 -30
  111. package/dist/embed/mermaid/classDiagram-v2-VYDZK3BY-B3jylZLr.js +0 -30
  112. package/dist/embed/mermaid/cynefin-OW5HDTMX-B6YJOAMM.js +0 -2
  113. package/dist/embed/mermaid/eventmodeling-NTZA5JFV-C3kU50Cz.js +0 -2
  114. package/dist/embed/mermaid/flowDiagram-HODETNUW-D-eJN2AO.js +0 -16
  115. package/dist/embed/mermaid/gitGraph-4MIJSDKK-CqdlGRFk.js +0 -2
  116. package/dist/embed/mermaid/info-A6RAGUB7-2pwra5F3.js +0 -2
  117. package/dist/embed/mermaid/packet-AYTQ26CC-C3h9OoFk.js +0 -2
  118. package/dist/embed/mermaid/pie-WAS4IAKB-CaECYpHT.js +0 -2
  119. package/dist/embed/mermaid/radar-RG4KPBEZ-CoS7pnd_.js +0 -2
  120. package/dist/embed/mermaid/railroad-74A4TZTK-BjHa6MAk.js +0 -2
  121. package/dist/embed/mermaid/railroad-abnf-HS5TGJTU-Bm2YWqjG.js +0 -2
  122. package/dist/embed/mermaid/railroad-ebnf-LZEXJU2U-C7mPpgM3.js +0 -2
  123. package/dist/embed/mermaid/railroad-peg-WCYAUIDC-Cyp07M5x.js +0 -2
  124. package/dist/embed/mermaid/stateDiagram-v2-MP3YSRHH-CPideWIU.js +0 -30
  125. package/dist/embed/mermaid/swimlanesDiagram-VR7AAH4N-BC_o7pti.js +0 -31
  126. package/dist/embed/mermaid/treeView-Q6P3EWNA-C94eS7gV.js +0 -2
  127. package/dist/embed/mermaid/treemap-WGGIJYW6-DnrVJ1h3.js +0 -2
  128. package/dist/embed/mermaid/wardley-WFR3VGLG-DRDACyIN.js +0 -2
@@ -1,4 +1,4 @@
1
- //#region node_modules/cytoscape/dist/cytoscape.esm.mjs
1
+ //#region ../../node_modules/cytoscape/dist/cytoscape.esm.mjs
2
2
  function e(e, t) {
3
3
  (t == null || t > e.length) && (t = e.length);
4
4
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
@@ -1044,7 +1044,7 @@ function xe() {
1044
1044
  }
1045
1045
  var Se, Ce;
1046
1046
  function we() {
1047
- return Ce || (Ce = 1, Se = typeof _e == "object" && _e && _e.Object === Object && _e), Se;
1047
+ return Ce ? Se : (Ce = 1, Se = typeof _e == "object" && _e && _e.Object === Object && _e, Se);
1048
1048
  }
1049
1049
  var Te, Ee;
1050
1050
  function De() {
@@ -1085,7 +1085,7 @@ function Ie() {
1085
1085
  }
1086
1086
  var Le, Re;
1087
1087
  function ze() {
1088
- return Re || (Re = 1, Le = De().Symbol), Le;
1088
+ return Re ? Le : (Re = 1, Le = De().Symbol, Le);
1089
1089
  }
1090
1090
  var Be, Ve;
1091
1091
  function He() {
@@ -1434,88 +1434,90 @@ var kt = !0, At = console.warn != null, jt = console.trace != null, Mt = 2 ** 53
1434
1434
  ]);
1435
1435
  }(), tn = (typeof Set > "u" ? "undefined" : g(Set)) === $t ? en : Set, nn = function(e, t) {
1436
1436
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
1437
- if (e === void 0 || t === void 0 || !I(e)) Lt("An element must have a core reference and parameters set");
1438
- else {
1439
- var r = t.group;
1440
- if (r ??= t.data && t.data.source != null && t.data.target != null ? "edges" : "nodes", r !== "nodes" && r !== "edges") Lt("An element must be of type `nodes` or `edges`; you specified `" + r + "`");
1441
- else {
1442
- this.length = 1, this[0] = this;
1443
- var i = this._private = {
1444
- cy: e,
1445
- single: !0,
1446
- data: t.data || {},
1447
- position: t.position || {
1448
- x: 0,
1449
- y: 0
1450
- },
1451
- autoWidth: void 0,
1452
- autoHeight: void 0,
1453
- autoPadding: void 0,
1454
- compoundBoundsClean: !1,
1455
- listeners: [],
1456
- group: r,
1457
- style: {},
1458
- rstyle: {},
1459
- styleCxts: [],
1460
- styleKeys: {},
1461
- removed: !0,
1462
- selected: !!t.selected,
1463
- selectable: t.selectable === void 0 || !!t.selectable,
1464
- locked: !!t.locked,
1465
- grabbed: !1,
1466
- grabbable: t.grabbable === void 0 || !!t.grabbable,
1467
- pannable: t.pannable === void 0 ? r === "edges" : !!t.pannable,
1468
- active: !1,
1469
- classes: new tn(),
1470
- animation: {
1471
- current: [],
1472
- queue: []
1473
- },
1474
- rscratch: {},
1475
- scratch: t.scratch || {},
1476
- edges: [],
1477
- children: [],
1478
- parent: t.parent && t.parent.isNode() ? t.parent : null,
1479
- traversalCache: {},
1480
- backgrounding: !1,
1481
- bbCache: null,
1482
- bbCacheShift: {
1483
- x: 0,
1484
- y: 0
1485
- },
1486
- bodyBounds: null,
1487
- overlayBounds: null,
1488
- labelBounds: {
1489
- all: null,
1490
- source: null,
1491
- target: null,
1492
- main: null
1493
- },
1494
- arrowBounds: {
1495
- source: null,
1496
- target: null,
1497
- "mid-source": null,
1498
- "mid-target": null
1499
- }
1500
- };
1501
- if (i.position.x ?? (i.position.x = 0), i.position.y ?? (i.position.y = 0), t.renderedPosition) {
1502
- var a = t.renderedPosition, o = e.pan(), s = e.zoom();
1503
- i.position = {
1504
- x: (a.x - o.x) / s,
1505
- y: (a.y - o.y) / s
1506
- };
1507
- }
1508
- var c = [];
1509
- D(t.classes) ? c = t.classes : T(t.classes) && (c = t.classes.split(/\s+/));
1510
- for (var l = 0, u = c.length; l < u; l++) {
1511
- var d = c[l];
1512
- d && d !== "" && i.classes.add(d);
1513
- }
1514
- this.createEmitter(), (n === void 0 || n) && this.restore();
1515
- var f = t.style || t.css;
1516
- f && (zt("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."), this.style(f));
1437
+ if (e === void 0 || t === void 0 || !I(e)) {
1438
+ Lt("An element must have a core reference and parameters set");
1439
+ return;
1440
+ }
1441
+ var r = t.group;
1442
+ if (r ??= t.data && t.data.source != null && t.data.target != null ? "edges" : "nodes", r !== "nodes" && r !== "edges") {
1443
+ Lt("An element must be of type `nodes` or `edges`; you specified `" + r + "`");
1444
+ return;
1445
+ }
1446
+ this.length = 1, this[0] = this;
1447
+ var i = this._private = {
1448
+ cy: e,
1449
+ single: !0,
1450
+ data: t.data || {},
1451
+ position: t.position || {
1452
+ x: 0,
1453
+ y: 0
1454
+ },
1455
+ autoWidth: void 0,
1456
+ autoHeight: void 0,
1457
+ autoPadding: void 0,
1458
+ compoundBoundsClean: !1,
1459
+ listeners: [],
1460
+ group: r,
1461
+ style: {},
1462
+ rstyle: {},
1463
+ styleCxts: [],
1464
+ styleKeys: {},
1465
+ removed: !0,
1466
+ selected: !!t.selected,
1467
+ selectable: t.selectable === void 0 || !!t.selectable,
1468
+ locked: !!t.locked,
1469
+ grabbed: !1,
1470
+ grabbable: t.grabbable === void 0 || !!t.grabbable,
1471
+ pannable: t.pannable === void 0 ? r === "edges" : !!t.pannable,
1472
+ active: !1,
1473
+ classes: new tn(),
1474
+ animation: {
1475
+ current: [],
1476
+ queue: []
1477
+ },
1478
+ rscratch: {},
1479
+ scratch: t.scratch || {},
1480
+ edges: [],
1481
+ children: [],
1482
+ parent: t.parent && t.parent.isNode() ? t.parent : null,
1483
+ traversalCache: {},
1484
+ backgrounding: !1,
1485
+ bbCache: null,
1486
+ bbCacheShift: {
1487
+ x: 0,
1488
+ y: 0
1489
+ },
1490
+ bodyBounds: null,
1491
+ overlayBounds: null,
1492
+ labelBounds: {
1493
+ all: null,
1494
+ source: null,
1495
+ target: null,
1496
+ main: null
1497
+ },
1498
+ arrowBounds: {
1499
+ source: null,
1500
+ target: null,
1501
+ "mid-source": null,
1502
+ "mid-target": null
1517
1503
  }
1504
+ };
1505
+ if (i.position.x ?? (i.position.x = 0), i.position.y ?? (i.position.y = 0), t.renderedPosition) {
1506
+ var a = t.renderedPosition, o = e.pan(), s = e.zoom();
1507
+ i.position = {
1508
+ x: (a.x - o.x) / s,
1509
+ y: (a.y - o.y) / s
1510
+ };
1511
+ }
1512
+ var c = [];
1513
+ D(t.classes) ? c = t.classes : T(t.classes) && (c = t.classes.split(/\s+/));
1514
+ for (var l = 0, u = c.length; l < u; l++) {
1515
+ var d = c[l];
1516
+ d && d !== "" && i.classes.add(d);
1518
1517
  }
1518
+ this.createEmitter(), (n === void 0 || n) && this.restore();
1519
+ var f = t.style || t.css;
1520
+ f && (zt("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."), this.style(f));
1519
1521
  }, rn = function(e) {
1520
1522
  return e = {
1521
1523
  bfs: e.bfs || !e.dfs,
@@ -1561,7 +1563,7 @@ var kt = !0, At = console.warn != null, jt = console.trace != null, Mt = 2 ** 53
1561
1563
  an.bfs = an.breadthFirstSearch, an.dfs = an.depthFirstSearch;
1562
1564
  var on = { exports: {} }, sn = on.exports, cn;
1563
1565
  function ln() {
1564
- return cn || (cn = 1, (function(e, t) {
1566
+ return cn ? on.exports : (cn = 1, (function(e, t) {
1565
1567
  (function() {
1566
1568
  var t, n, r = Math.floor, i, a, o, s, c, l, u = Math.min, d, f, p, m, h;
1567
1569
  n = function(e, t) {
@@ -1609,7 +1611,13 @@ function ln() {
1609
1611
  return g;
1610
1612
  }, m = function(e, t, r, i) {
1611
1613
  var a, o, s;
1612
- for (i ??= n, a = e[r]; r > t && (s = r - 1 >> 1, o = e[s], i(a, o) < 0);) e[r] = o, r = s;
1614
+ for (i ??= n, a = e[r]; r > t;) {
1615
+ if (s = r - 1 >> 1, o = e[s], i(a, o) < 0) {
1616
+ e[r] = o, r = s;
1617
+ continue;
1618
+ }
1619
+ break;
1620
+ }
1613
1621
  return e[r] = a;
1614
1622
  }, h = function(e, t, r) {
1615
1623
  var i, a, o, s, c;
@@ -1654,11 +1662,11 @@ function ln() {
1654
1662
  return t;
1655
1663
  });
1656
1664
  }).call(sn);
1657
- })(on)), on.exports;
1665
+ })(on), on.exports);
1658
1666
  }
1659
1667
  var un, dn;
1660
1668
  function fn() {
1661
- return dn || (dn = 1, un = ln()), un;
1669
+ return dn ? un : (dn = 1, un = ln(), un);
1662
1670
  }
1663
1671
  var pn = /*@__PURE__*/ ve(fn()), mn = Kt({
1664
1672
  root: null,
@@ -1775,7 +1783,11 @@ var pn = /*@__PURE__*/ ve(fn()), mn = Kt({
1775
1783
  var A = k.source(), j = k.target(), M = A.id() === y ? j : A, N = M.id();
1776
1784
  if (this.hasElementWithId(N) && !f[N]) {
1777
1785
  var P = u[y] + s(k);
1778
- x(N) ? P < u[N] && (u[N] = P, d[N] = P + a(M), p.updateItem(M), h[N] = v, g[N] = k) : (u[N] = P, d[N] = P + a(M), _(M, N), h[N] = v, g[N] = k);
1786
+ if (!x(N)) {
1787
+ u[N] = P, d[N] = P + a(M), _(M, N), h[N] = v, g[N] = k;
1788
+ continue;
1789
+ }
1790
+ P < u[N] && (u[N] = P, d[N] = P + a(M), p.updateItem(M), h[N] = v, g[N] = k);
1779
1791
  }
1780
1792
  }
1781
1793
  }
@@ -1922,46 +1934,47 @@ var pn = /*@__PURE__*/ ve(fn()), mn = Kt({
1922
1934
  return e.isLoop();
1923
1935
  });
1924
1936
  var i = n.length, a = r.length, o = Math.ceil((Math.log(i) / Math.LN2) ** 2), s = Math.floor(i / Cn);
1925
- if (i < 2) Lt("At least 2 nodes are required for Karger-Stein algorithm");
1926
- else {
1927
- for (var c = [], l = 0; l < a; l++) {
1928
- var u = r[l];
1929
- c.push([
1930
- l,
1931
- n.indexOf(u.source()),
1932
- n.indexOf(u.target())
1933
- ]);
1934
- }
1935
- for (var d = Infinity, f = [], p = Array(i), m = Array(i), h = Array(i), g = function(e, t) {
1936
- for (var n = 0; n < i; n++) t[n] = e[n];
1937
- }, _ = 0; _ <= o; _++) {
1938
- for (var v = 0; v < i; v++) m[v] = v;
1939
- var y = Tn(m, c.slice(), i, s), b = y.slice();
1940
- g(m, h);
1941
- var x = Tn(m, y, s, 2), S = Tn(h, b, s, 2);
1942
- x.length <= S.length && x.length < d ? (d = x.length, f = x, g(m, p)) : S.length <= x.length && S.length < d && (d = S.length, f = S, g(h, p));
1943
- }
1944
- for (var C = this.spawn(f.map(function(e) {
1945
- return r[e[0]];
1946
- })), w = this.spawn(), T = this.spawn(), E = p[0], D = 0; D < p.length; D++) {
1947
- var O = p[D], k = n[D];
1948
- O === E ? w.merge(k) : T.merge(k);
1949
- }
1950
- var A = function(t) {
1951
- var n = e.spawn();
1952
- return t.forEach(function(t) {
1953
- n.merge(t), t.connectedEdges().forEach(function(t) {
1954
- e.contains(t) && !C.contains(t) && n.merge(t);
1955
- });
1956
- }), n;
1957
- };
1958
- return {
1959
- cut: C,
1960
- components: [A(w), A(T)],
1961
- partition1: w,
1962
- partition2: T
1963
- };
1937
+ if (i < 2) {
1938
+ Lt("At least 2 nodes are required for Karger-Stein algorithm");
1939
+ return;
1940
+ }
1941
+ for (var c = [], l = 0; l < a; l++) {
1942
+ var u = r[l];
1943
+ c.push([
1944
+ l,
1945
+ n.indexOf(u.source()),
1946
+ n.indexOf(u.target())
1947
+ ]);
1964
1948
  }
1949
+ for (var d = Infinity, f = [], p = Array(i), m = Array(i), h = Array(i), g = function(e, t) {
1950
+ for (var n = 0; n < i; n++) t[n] = e[n];
1951
+ }, _ = 0; _ <= o; _++) {
1952
+ for (var v = 0; v < i; v++) m[v] = v;
1953
+ var y = Tn(m, c.slice(), i, s), b = y.slice();
1954
+ g(m, h);
1955
+ var x = Tn(m, y, s, 2), S = Tn(h, b, s, 2);
1956
+ x.length <= S.length && x.length < d ? (d = x.length, f = x, g(m, p)) : S.length <= x.length && S.length < d && (d = S.length, f = S, g(h, p));
1957
+ }
1958
+ for (var C = this.spawn(f.map(function(e) {
1959
+ return r[e[0]];
1960
+ })), w = this.spawn(), T = this.spawn(), E = p[0], D = 0; D < p.length; D++) {
1961
+ var O = p[D], k = n[D];
1962
+ O === E ? w.merge(k) : T.merge(k);
1963
+ }
1964
+ var A = function(t) {
1965
+ var n = e.spawn();
1966
+ return t.forEach(function(t) {
1967
+ n.merge(t), t.connectedEdges().forEach(function(t) {
1968
+ e.contains(t) && !C.contains(t) && n.merge(t);
1969
+ });
1970
+ }), n;
1971
+ };
1972
+ return {
1973
+ cut: C,
1974
+ components: [A(w), A(T)],
1975
+ partition1: w,
1976
+ partition2: T
1977
+ };
1965
1978
  } }, Dn = function(e) {
1966
1979
  return {
1967
1980
  x: e.x,
@@ -2239,7 +2252,15 @@ var lr = function(e, t, n, r, i, a, o) {
2239
2252
  }, pr = function(e, t, n, r, i) {
2240
2253
  e === 0 && (e = 1e-5), t /= e, n /= e, r /= e;
2241
2254
  var a, o = (3 * n - t * t) / 9, s = -(27 * r) + t * (9 * n - t * t * 2), c, l, u, d, f;
2242
- s /= 54, a = o * o * o + s * s, i[1] = 0, d = t / 3, a > 0 ? (l = s + Math.sqrt(a), l = l < 0 ? -((-l) ** (1 / 3)) : l ** (1 / 3), u = s - Math.sqrt(a), u = u < 0 ? -((-u) ** (1 / 3)) : u ** (1 / 3), i[0] = -d + l + u, d += (l + u) / 2, i[4] = i[2] = -d, d = Math.sqrt(3) * (-u + l) / 2, i[3] = d, i[5] = -d) : (i[5] = i[3] = 0, a === 0 ? (f = s < 0 ? -((-s) ** (1 / 3)) : s ** (1 / 3), i[0] = -d + 2 * f, i[4] = i[2] = -(f + d)) : (o = -o, c = o * o * o, c = Math.acos(s / Math.sqrt(c)), f = 2 * Math.sqrt(o), i[0] = -d + f * Math.cos(c / 3), i[2] = -d + f * Math.cos((c + 2 * Math.PI) / 3), i[4] = -d + f * Math.cos((c + 4 * Math.PI) / 3)));
2255
+ if (s /= 54, a = o * o * o + s * s, i[1] = 0, d = t / 3, a > 0) {
2256
+ l = s + Math.sqrt(a), l = l < 0 ? -((-l) ** (1 / 3)) : l ** (1 / 3), u = s - Math.sqrt(a), u = u < 0 ? -((-u) ** (1 / 3)) : u ** (1 / 3), i[0] = -d + l + u, d += (l + u) / 2, i[4] = i[2] = -d, d = Math.sqrt(3) * (-u + l) / 2, i[3] = d, i[5] = -d;
2257
+ return;
2258
+ }
2259
+ if (i[5] = i[3] = 0, a === 0) {
2260
+ f = s < 0 ? -((-s) ** (1 / 3)) : s ** (1 / 3), i[0] = -d + 2 * f, i[4] = i[2] = -(f + d);
2261
+ return;
2262
+ }
2263
+ o = -o, c = o * o * o, c = Math.acos(s / Math.sqrt(c)), f = 2 * Math.sqrt(o), i[0] = -d + f * Math.cos(c / 3), i[2] = -d + f * Math.cos((c + 2 * Math.PI) / 3), i[4] = -d + f * Math.cos((c + 4 * Math.PI) / 3);
2243
2264
  }, mr = function(e, t, n, r, i, a, o, s) {
2244
2265
  var c = 1 * n * n - 4 * n * i + 2 * n * o + 4 * i * i - 4 * i * o + o * o + r * r - 4 * r * a + 2 * r * s + 4 * a * a - 4 * a * s + s * s, l = 9 * n * i - 3 * n * n - 3 * n * o - 6 * i * i + 3 * i * o + 9 * r * a - 3 * r * r - 3 * r * s - 6 * a * a + 3 * a * s, u = 3 * n * n - 6 * n * i + n * o - n * e + 2 * i * i + 2 * i * e - o * e + 3 * r * r - 6 * r * a + r * s - r * t + 2 * a * a + 2 * a * t - s * t, d = 1 * n * i - n * n + n * e - i * e + r * a - r * r + r * t - a * t, f = [];
2245
2266
  pr(c, l, u, d, f);
@@ -3278,28 +3299,31 @@ var la = function(e, t, n, r) {
3278
3299
  }
3279
3300
  };
3280
3301
  }, pa = function(e, t) {
3281
- if (e === t || e.proxy === t) e.reject(/* @__PURE__ */ TypeError("cannot resolve promise with itself"));
3282
- else {
3283
- var n;
3284
- if (g(t) === "object" && t !== null || typeof t == "function") try {
3285
- n = t.then;
3302
+ if (e === t || e.proxy === t) {
3303
+ e.reject(/* @__PURE__ */ TypeError("cannot resolve promise with itself"));
3304
+ return;
3305
+ }
3306
+ var n;
3307
+ if (g(t) === "object" && t !== null || typeof t == "function") try {
3308
+ n = t.then;
3309
+ } catch (t) {
3310
+ e.reject(t);
3311
+ return;
3312
+ }
3313
+ if (typeof n == "function") {
3314
+ var r = !1;
3315
+ try {
3316
+ n.call(t, function(n) {
3317
+ r || (r = !0, n === t ? e.reject(/* @__PURE__ */ TypeError("circular thenable chain")) : pa(e, n));
3318
+ }, function(t) {
3319
+ r || (r = !0, e.reject(t));
3320
+ });
3286
3321
  } catch (t) {
3287
- e.reject(t);
3288
- return;
3322
+ r || e.reject(t);
3289
3323
  }
3290
- if (typeof n == "function") {
3291
- var r = !1;
3292
- try {
3293
- n.call(t, function(n) {
3294
- r || (r = !0, n === t ? e.reject(/* @__PURE__ */ TypeError("circular thenable chain")) : pa(e, n));
3295
- }, function(t) {
3296
- r || (r = !0, e.reject(t));
3297
- });
3298
- } catch (t) {
3299
- r || e.reject(t);
3300
- }
3301
- } else e.fulfill(t);
3324
+ return;
3302
3325
  }
3326
+ e.fulfill(t);
3303
3327
  };
3304
3328
  ca.all = function(e) {
3305
3329
  return new ca(function(t, n) {
@@ -3527,7 +3551,7 @@ var _a = {
3527
3551
  }
3528
3552
  }, va, ya;
3529
3553
  function ba() {
3530
- return ya || (ya = 1, va = Array.isArray), va;
3554
+ return ya ? va : (ya = 1, va = Array.isArray, va);
3531
3555
  }
3532
3556
  var xa, Sa;
3533
3557
  function Ca() {
@@ -3555,7 +3579,7 @@ function Ea() {
3555
3579
  }
3556
3580
  var Da, Oa;
3557
3581
  function ka() {
3558
- return Oa || (Oa = 1, Da = De()["__core-js_shared__"]), Da;
3582
+ return Oa ? Da : (Oa = 1, Da = De()["__core-js_shared__"], Da);
3559
3583
  }
3560
3584
  var Aa, ja;
3561
3585
  function Ma() {
@@ -3620,7 +3644,7 @@ function Wa() {
3620
3644
  }
3621
3645
  var Ga, Ka;
3622
3646
  function qa() {
3623
- return Ka || (Ka = 1, Ga = Wa()(Object, "create")), Ga;
3647
+ return Ka ? Ga : (Ka = 1, Ga = Wa()(Object, "create"), Ga);
3624
3648
  }
3625
3649
  var Ja, Ya;
3626
3650
  function Xa() {
@@ -3781,7 +3805,7 @@ function Io() {
3781
3805
  }
3782
3806
  var Lo, Ro;
3783
3807
  function zo() {
3784
- return Ro || (Ro = 1, Lo = Wa()(De(), "Map")), Lo;
3808
+ return Ro ? Lo : (Ro = 1, Lo = Wa()(De(), "Map"), Lo);
3785
3809
  }
3786
3810
  var Bo, Vo;
3787
3811
  function Ho() {
@@ -5929,9 +5953,15 @@ var Wl = Ul.prototype, Gl = function(e, t, n, r, i, a, o) {
5929
5953
  }, Kl = function(e, t) {
5930
5954
  return e.addEventFields(e.context, t), new Fl(t.type, t);
5931
5955
  }, ql = function(e, t, n) {
5932
- if (R(n)) t(e, n);
5933
- else if (O(n)) t(e, Kl(e, n));
5934
- else for (var r = D(n) ? n : n.split(/\s+/), i = 0; i < r.length; i++) {
5956
+ if (R(n)) {
5957
+ t(e, n);
5958
+ return;
5959
+ }
5960
+ if (O(n)) {
5961
+ t(e, Kl(e, n));
5962
+ return;
5963
+ }
5964
+ for (var r = D(n) ? n : n.split(/\s+/), i = 0; i < r.length; i++) {
5935
5965
  var a = r[i];
5936
5966
  if (!z(a)) {
5937
5967
  var o = a.match(Rl);
@@ -6928,54 +6958,55 @@ X(mu, {
6928
6958
  }), mu.componentsOf = mu.components;
6929
6959
  var xu = function(e, t) {
6930
6960
  var n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
6931
- if (e === void 0) Lt("A collection must have a reference to the core");
6932
- else {
6933
- var i = new Qt(), a = !1;
6934
- if (!t) t = [];
6935
- else if (t.length > 0 && O(t[0]) && !P(t[0])) {
6936
- a = !0;
6937
- for (var o = [], s = new tn(), c = 0, l = t.length; c < l; c++) {
6938
- var u = t[c];
6939
- u.data ??= {};
6940
- var d = u.data;
6941
- if (d.id == null) d.id = Ut();
6942
- else if (e.hasElementWithId(d.id) || s.has(d.id)) continue;
6943
- var f = new nn(e, u, !1);
6944
- o.push(f), s.add(d.id);
6945
- }
6946
- t = o;
6947
- }
6948
- this.length = 0;
6949
- for (var p = 0, m = t.length; p < m; p++) {
6950
- var h = t[p][0];
6951
- if (h != null) {
6952
- var g = h._private.data.id;
6953
- (!n || !i.has(g)) && (n && i.set(g, {
6954
- index: this.length,
6955
- ele: h
6956
- }), this[this.length] = h, this.length++);
6957
- }
6958
- }
6959
- this._private = {
6960
- eles: this,
6961
- cy: e,
6962
- get map() {
6963
- return this.lazyMap ?? this.rebuildMap(), this.lazyMap;
6964
- },
6965
- set map(e) {
6966
- this.lazyMap = e;
6967
- },
6968
- rebuildMap: function() {
6969
- for (var e = this.lazyMap = new Qt(), t = this.eles, n = 0; n < t.length; n++) {
6970
- var r = t[n];
6971
- e.set(r.id(), {
6972
- index: n,
6973
- ele: r
6974
- });
6975
- }
6976
- }
6977
- }, n && (this._private.map = i), a && !r && this.restore();
6961
+ if (e === void 0) {
6962
+ Lt("A collection must have a reference to the core");
6963
+ return;
6964
+ }
6965
+ var i = new Qt(), a = !1;
6966
+ if (!t) t = [];
6967
+ else if (t.length > 0 && O(t[0]) && !P(t[0])) {
6968
+ a = !0;
6969
+ for (var o = [], s = new tn(), c = 0, l = t.length; c < l; c++) {
6970
+ var u = t[c];
6971
+ u.data ??= {};
6972
+ var d = u.data;
6973
+ if (d.id == null) d.id = Ut();
6974
+ else if (e.hasElementWithId(d.id) || s.has(d.id)) continue;
6975
+ var f = new nn(e, u, !1);
6976
+ o.push(f), s.add(d.id);
6977
+ }
6978
+ t = o;
6978
6979
  }
6980
+ this.length = 0;
6981
+ for (var p = 0, m = t.length; p < m; p++) {
6982
+ var h = t[p][0];
6983
+ if (h != null) {
6984
+ var g = h._private.data.id;
6985
+ (!n || !i.has(g)) && (n && i.set(g, {
6986
+ index: this.length,
6987
+ ele: h
6988
+ }), this[this.length] = h, this.length++);
6989
+ }
6990
+ }
6991
+ this._private = {
6992
+ eles: this,
6993
+ cy: e,
6994
+ get map() {
6995
+ return this.lazyMap ?? this.rebuildMap(), this.lazyMap;
6996
+ },
6997
+ set map(e) {
6998
+ this.lazyMap = e;
6999
+ },
7000
+ rebuildMap: function() {
7001
+ for (var e = this.lazyMap = new Qt(), t = this.eles, n = 0; n < t.length; n++) {
7002
+ var r = t[n];
7003
+ e.set(r.id(), {
7004
+ index: n,
7005
+ ele: r
7006
+ });
7007
+ }
7008
+ }
7009
+ }, n && (this._private.map = i), a && !r && this.restore();
6979
7010
  }, Su = nn.prototype = xu.prototype = Object.create(Array.prototype);
6980
7011
  Su.instanceString = function() {
6981
7012
  return "collection";
@@ -7437,7 +7468,7 @@ var Tu = function() {
7437
7468
  function Ou(e, t, n, r, i) {
7438
7469
  if (r === 1 || t === n) return n;
7439
7470
  var a = i(t, n, r);
7440
- return e == null || ((e.roundValue || e.color) && (a = Math.round(a)), e.min !== void 0 && (a = Math.max(a, e.min)), e.max !== void 0 && (a = Math.min(a, e.max))), a;
7471
+ return e == null ? a : ((e.roundValue || e.color) && (a = Math.round(a)), e.min !== void 0 && (a = Math.max(a, e.min)), e.max !== void 0 && (a = Math.min(a, e.max)), a);
7441
7472
  }
7442
7473
  function ku(e, t) {
7443
7474
  return e.pfValue != null || e.value != null ? e.pfValue != null && (t == null || t.type.units !== "%") ? e.pfValue : e.value : e;
@@ -7514,7 +7545,11 @@ function Pu(e, t) {
7514
7545
  e.splice(0, e.length);
7515
7546
  }, u = a.length - 1; u >= 0; u--) {
7516
7547
  var d = a[u], f = d._private;
7517
- f.stopped ? (a.splice(u, 1), f.hooked = !1, f.playing = !1, f.started = !1, l(f.frames)) : (f.playing || f.applying) && (f.playing && f.applying && (f.applying = !1), f.started || Nu(t, d, e), ju(t, d, e, n), f.applying &&= !1, l(f.frames), f.step != null && f.step(e), d.completed() && (a.splice(u, 1), f.hooked = !1, f.playing = !1, f.started = !1, l(f.completes)), s = !0);
7548
+ if (f.stopped) {
7549
+ a.splice(u, 1), f.hooked = !1, f.playing = !1, f.started = !1, l(f.frames);
7550
+ continue;
7551
+ }
7552
+ (f.playing || f.applying) && (f.playing && f.applying && (f.applying = !1), f.started || Nu(t, d, e), ju(t, d, e, n), f.applying &&= !1, l(f.frames), f.step != null && f.step(e), d.completed() && (a.splice(u, 1), f.hooked = !1, f.playing = !1, f.started = !1, l(f.completes)), s = !0);
7518
7553
  }
7519
7554
  return !n && a.length === 0 && o.length === 0 && r.push(t), s;
7520
7555
  }
@@ -7613,16 +7648,23 @@ var zu = {
7613
7648
  zu.jpeg = zu.jpg;
7614
7649
  var Bu = { layout: function(e) {
7615
7650
  var t = this;
7616
- if (e == null) Lt("Layout options must be specified to make a layout");
7617
- else if (e.name == null) Lt("A `name` must be specified to make a layout");
7618
- else {
7619
- var n = e.name, r = t.extension("layout", n);
7620
- if (r == null) Lt("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?");
7621
- else return new r(X({}, e, {
7622
- cy: t,
7623
- eles: T(e.eles) ? t.$(e.eles) : e.eles == null ? t.$() : e.eles
7624
- }));
7651
+ if (e == null) {
7652
+ Lt("Layout options must be specified to make a layout");
7653
+ return;
7625
7654
  }
7655
+ if (e.name == null) {
7656
+ Lt("A `name` must be specified to make a layout");
7657
+ return;
7658
+ }
7659
+ var n = e.name, r = t.extension("layout", n);
7660
+ if (r == null) {
7661
+ Lt("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?");
7662
+ return;
7663
+ }
7664
+ return new r(X({}, e, {
7665
+ cy: t,
7666
+ eles: T(e.eles) ? t.$(e.eles) : e.eles == null ? t.$() : e.eles
7667
+ }));
7626
7668
  } };
7627
7669
  Bu.createLayout = Bu.makeLayout = Bu.layout;
7628
7670
  var Vu = {
@@ -7632,7 +7674,9 @@ var Vu = {
7632
7674
  n.batchNotifications = n.batchNotifications || {};
7633
7675
  var r = n.batchNotifications[e] = n.batchNotifications[e] || this.collection();
7634
7676
  t != null && r.merge(t);
7635
- } else if (n.notificationsEnabled) {
7677
+ return;
7678
+ }
7679
+ if (n.notificationsEnabled) {
7636
7680
  var i = this.renderer();
7637
7681
  !this.destroyed() && i && i.notify(e, t);
7638
7682
  }
@@ -7715,12 +7759,13 @@ var Vu = {
7715
7759
  },
7716
7760
  initRenderer: function(e) {
7717
7761
  var t = this, n = t.extension("renderer", e.name);
7718
- if (n == null) Lt(`Can not initialise: No such renderer \`${e.name}\` found. Did you forget to import it and \`cytoscape.use()\` it?`);
7719
- else {
7720
- e.wheelSensitivity !== void 0 && zt("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");
7721
- var r = Hu(e);
7722
- r.cy = t, t._private.renderer = new n(r), this.notify("init");
7762
+ if (n == null) {
7763
+ Lt(`Can not initialise: No such renderer \`${e.name}\` found. Did you forget to import it and \`cytoscape.use()\` it?`);
7764
+ return;
7723
7765
  }
7766
+ e.wheelSensitivity !== void 0 && zt("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");
7767
+ var r = Hu(e);
7768
+ r.cy = t, t._private.renderer = new n(r), this.notify("init");
7724
7769
  },
7725
7770
  destroyRenderer: function() {
7726
7771
  var e = this;
@@ -8203,34 +8248,43 @@ Qu.appendFromString = function(e) {
8203
8248
  }
8204
8249
  i = l[0];
8205
8250
  var u = l[1];
8206
- if (u !== "core" && new Lc(u).invalid) zt("Skipping parsing of block: Invalid selector found in string stylesheet: " + u), s();
8207
- else {
8208
- var d = l[2], f = !1;
8209
- a = d;
8210
- for (var p = []; !a.match(/^\s*$/);) {
8211
- var m = a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);
8212
- if (!m) {
8213
- zt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + d), f = !0;
8214
- break;
8215
- }
8216
- o = m[0];
8217
- var h = m[1], g = m[2];
8218
- t.properties[h] ? n.parse(h, g) ? (p.push({
8219
- name: h,
8220
- val: g
8221
- }), c()) : (zt("Skipping property: Invalid property definition in: " + o), c()) : (zt("Skipping property: Invalid property name in: " + o), c());
8222
- }
8223
- if (f) {
8224
- s();
8251
+ if (u !== "core" && new Lc(u).invalid) {
8252
+ zt("Skipping parsing of block: Invalid selector found in string stylesheet: " + u), s();
8253
+ continue;
8254
+ }
8255
+ var d = l[2], f = !1;
8256
+ a = d;
8257
+ for (var p = []; !a.match(/^\s*$/);) {
8258
+ var m = a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);
8259
+ if (!m) {
8260
+ zt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + d), f = !0;
8225
8261
  break;
8226
8262
  }
8227
- n.selector(u);
8228
- for (var _ = 0; _ < p.length; _++) {
8229
- var v = p[_];
8230
- n.css(v.name, v.val);
8263
+ o = m[0];
8264
+ var h = m[1], g = m[2];
8265
+ if (!t.properties[h]) {
8266
+ zt("Skipping property: Invalid property name in: " + o), c();
8267
+ continue;
8268
+ }
8269
+ if (!n.parse(h, g)) {
8270
+ zt("Skipping property: Invalid property definition in: " + o), c();
8271
+ continue;
8231
8272
  }
8273
+ p.push({
8274
+ name: h,
8275
+ val: g
8276
+ }), c();
8277
+ }
8278
+ if (f) {
8232
8279
  s();
8280
+ break;
8233
8281
  }
8282
+ n.selector(u);
8283
+ for (var _ = 0; _ < p.length; _++) {
8284
+ var v = p[_];
8285
+ n.css(v.name, v.val);
8286
+ }
8287
+ s();
8234
8288
  }
8235
8289
  return n;
8236
8290
  }, Qu.fromString = function(e) {
@@ -10096,10 +10150,14 @@ ed.parse = function(e, t, n, r) {
10096
10150
  };
10097
10151
  var td = function(e) {
10098
10152
  if (!(this instanceof td)) return new td(e);
10099
- I(e) ? (this._private = {
10153
+ if (!I(e)) {
10154
+ Lt("A style must have a core reference");
10155
+ return;
10156
+ }
10157
+ this._private = {
10100
10158
  cy: e,
10101
10159
  coreStyle: {}
10102
- }, this.length = 0, this.resetToDefault()) : Lt("A style must have a core reference");
10160
+ }, this.length = 0, this.resetToDefault();
10103
10161
  }, nd = td.prototype;
10104
10162
  nd.instanceString = function() {
10105
10163
  return "style";
@@ -10323,7 +10381,7 @@ var rd = {
10323
10381
  zoom: function(e) {
10324
10382
  if (e === void 0) return this._private.zoom;
10325
10383
  var t = this.getZoomedViewport(e), n = this._private;
10326
- return t == null || !t.zoomed || (n.zoom = t.zoom, t.panned && (n.pan.x = t.pan.x, n.pan.y = t.pan.y), this.emit("zoom" + (t.panned ? " pan" : "") + " viewport"), this.notify("viewport")), this;
10384
+ return t == null || !t.zoomed ? this : (n.zoom = t.zoom, t.panned && (n.pan.x = t.pan.x, n.pan.y = t.pan.y), this.emit("zoom" + (t.panned ? " pan" : "") + " viewport"), this.notify("viewport"), this);
10327
10385
  },
10328
10386
  viewport: function(e) {
10329
10387
  var t = this._private, n = !0, r = !0, i = [], a = !1, o = !1;
@@ -10607,14 +10665,15 @@ X(cd, {
10607
10665
  var a = {}, o = function(e, n) {
10608
10666
  for (var r = [], i = [], o = 0; o < e.length; o++) {
10609
10667
  var s = e[o];
10610
- if (!s.data.id) zt("cy.json() cannot handle elements without an ID attribute");
10611
- else {
10612
- var c = "" + s.data.id, l = t.getElementById(c);
10613
- a[c] = !0, l.length === 0 ? (n && (s.group = n), r.push(s)) : i.push({
10614
- ele: l,
10615
- json: s
10616
- });
10668
+ if (!s.data.id) {
10669
+ zt("cy.json() cannot handle elements without an ID attribute");
10670
+ continue;
10617
10671
  }
10672
+ var c = "" + s.data.id, l = t.getElementById(c);
10673
+ a[c] = !0, l.length === 0 ? (n && (s.group = n), r.push(s)) : i.push({
10674
+ ele: l,
10675
+ json: s
10676
+ });
10618
10677
  }
10619
10678
  t.add(r);
10620
10679
  for (var u = 0; u < i.length; u++) {
@@ -10766,7 +10825,11 @@ pd.prototype.run = function() {
10766
10825
  var w = function(e) {
10767
10826
  for (var t = _[e], n = 0; n < t.length; n++) {
10768
10827
  var r = t[n];
10769
- r == null ? (t.splice(n, 1), n--) : fd(r, {
10828
+ if (r == null) {
10829
+ t.splice(n, 1), n--;
10830
+ continue;
10831
+ }
10832
+ fd(r, {
10770
10833
  depth: e,
10771
10834
  index: n
10772
10835
  });
@@ -11253,7 +11316,7 @@ var xd = function(e, t, n) {
11253
11316
  return i >= 0 && a >= 0 ? Math.sqrt(i * i + a * a) : 0;
11254
11317
  }, Nd = function(e, t, n) {
11255
11318
  var r = e.positionX, i = e.positionY, a = e.height || 1, o = e.width || 1, s = n / t, c = a / o, l = {};
11256
- return t === 0 && 0 < n || t === 0 && 0 > n ? (l.x = r, l.y = i + a / 2, l) : 0 < t && -1 * c <= s && s <= c ? (l.x = r + o / 2, l.y = i + o * n / 2 / t, l) : 0 > t && -1 * c <= s && s <= c ? (l.x = r - o / 2, l.y = i - o * n / 2 / t, l) : 0 < n && (s <= -1 * c || s >= c) ? (l.x = r + a * t / 2 / n, l.y = i + a / 2, l) : (0 > n && (s <= -1 * c || s >= c) && (l.x = r - a * t / 2 / n, l.y = i - a / 2), l);
11319
+ return t === 0 && 0 < n || t === 0 && 0 > n ? (l.x = r, l.y = i + a / 2, l) : 0 < t && -1 * c <= s && s <= c ? (l.x = r + o / 2, l.y = i + o * n / 2 / t, l) : 0 > t && -1 * c <= s && s <= c ? (l.x = r - o / 2, l.y = i - o * n / 2 / t, l) : 0 < n && (s <= -1 * c || s >= c) ? (l.x = r + a * t / 2 / n, l.y = i + a / 2, l) : 0 > n && (s <= -1 * c || s >= c) ? (l.x = r - a * t / 2 / n, l.y = i - a / 2, l) : l;
11257
11320
  }, Pd = function(e, t) {
11258
11321
  for (var n = 0; n < e.edgeSize; n++) {
11259
11322
  var r = e.layoutEdges[n], i = e.idToIndex[r.sourceId], a = e.layoutNodes[i], o = e.idToIndex[r.targetId], s = e.layoutNodes[o], c = s.positionX - a.positionX, l = s.positionY - a.positionY;
@@ -12197,7 +12260,11 @@ var nf, rf, af = {}, of = {}, sf, cf, lf, uf, df, ff, pf, mf, hf, gf, _f, vf, yf
12197
12260
  }, Cf = function(e, t) {
12198
12261
  t.x = e.x * -1, t.y = e.y * -1, t.nx = e.nx * -1, t.ny = e.ny * -1, t.ang = e.ang > 0 ? -(Math.PI - e.ang) : Math.PI + e.ang;
12199
12262
  }, wf = function(e, t, n, r, i) {
12200
- e === xf ? Cf(of, af) : Sf(t, e, af), Sf(t, n, of), sf = af.nx * of.ny - af.ny * of.nx, cf = af.nx * of.nx - af.ny * -of.ny, df = Math.asin(Math.max(-1, Math.min(1, sf))), Math.abs(df) < 1e-6 ? (nf = t.x, rf = t.y, pf = hf = 0) : (lf = 1, uf = !1, cf < 0 ? df < 0 ? df = Math.PI + df : (df = Math.PI - df, lf = -1, uf = !0) : df > 0 && (lf = -1, uf = !0), hf = t.radius === void 0 ? r : t.radius, ff = df / 2, gf = Math.min(af.len / 2, of.len / 2), i ? (mf = Math.abs(Math.cos(ff) * hf / Math.sin(ff)), mf > gf ? (mf = gf, pf = Math.abs(mf * Math.sin(ff) / Math.cos(ff))) : pf = hf) : (mf = Math.min(gf, hf), pf = Math.abs(mf * Math.sin(ff) / Math.cos(ff))), yf = t.x + of.nx * mf, bf = t.y + of.ny * mf, nf = yf - of.ny * pf * lf, rf = bf + of.nx * pf * lf, _f = t.x + af.nx * mf, vf = t.y + af.ny * mf, xf = t);
12263
+ if (e === xf ? Cf(of, af) : Sf(t, e, af), Sf(t, n, of), sf = af.nx * of.ny - af.ny * of.nx, cf = af.nx * of.nx - af.ny * -of.ny, df = Math.asin(Math.max(-1, Math.min(1, sf))), Math.abs(df) < 1e-6) {
12264
+ nf = t.x, rf = t.y, pf = hf = 0;
12265
+ return;
12266
+ }
12267
+ lf = 1, uf = !1, cf < 0 ? df < 0 ? df = Math.PI + df : (df = Math.PI - df, lf = -1, uf = !0) : df > 0 && (lf = -1, uf = !0), hf = t.radius === void 0 ? r : t.radius, ff = df / 2, gf = Math.min(af.len / 2, of.len / 2), i ? (mf = Math.abs(Math.cos(ff) * hf / Math.sin(ff)), mf > gf ? (mf = gf, pf = Math.abs(mf * Math.sin(ff) / Math.cos(ff))) : pf = hf) : (mf = Math.min(gf, hf), pf = Math.abs(mf * Math.sin(ff) / Math.cos(ff))), yf = t.x + of.nx * mf, bf = t.y + of.ny * mf, nf = yf - of.ny * pf * lf, rf = bf + of.nx * pf * lf, _f = t.x + af.nx * mf, vf = t.y + af.ny * mf, xf = t;
12201
12268
  };
12202
12269
  function Tf(e, t) {
12203
12270
  t.radius === 0 ? e.lineTo(t.cx, t.cy) : e.arc(t.cx, t.cy, t.radius, t.startAngle, t.endAngle, t.counterClockwise);
@@ -12524,14 +12591,15 @@ kf.findMidptPtsEtc = function(e, t) {
12524
12591
  }, o = [], s = [], c = 0; c < e.length; c++) {
12525
12592
  var l = e[c], u = l._private, d = l.pstyle("curve-style").value;
12526
12593
  if (!l.removed() && l.takesUpSpace()) {
12527
- if (d === "haystack") s.push(l);
12528
- else {
12529
- var f = d === "unbundled-bezier" || ee(d, "segments") || d === "straight" || d === "straight-triangle" || ee(d, "taxi"), m = d === "unbundled-bezier" || d === "bezier", h = u.source, g = u.target, _ = [h.poolIndex(), g.poolIndex()].sort(), v = a(_, f), y = i.get(v);
12530
- y ?? (y = { eles: [] }, o.push({
12531
- pairId: _,
12532
- edgeIsUnbundled: f
12533
- }), i.set(v, y)), y.eles.push(l), f && (y.hasUnbundled = !0), m && (y.hasBezier = !0);
12594
+ if (d === "haystack") {
12595
+ s.push(l);
12596
+ continue;
12534
12597
  }
12598
+ var f = d === "unbundled-bezier" || ee(d, "segments") || d === "straight" || d === "straight-triangle" || ee(d, "taxi"), m = d === "unbundled-bezier" || d === "bezier", h = u.source, g = u.target, _ = [h.poolIndex(), g.poolIndex()].sort(), v = a(_, f), y = i.get(v);
12599
+ y ?? (y = { eles: [] }, o.push({
12600
+ pairId: _,
12601
+ edgeIsUnbundled: f
12602
+ }), i.set(v, y)), y.eles.push(l), f && (y.hasUnbundled = !0), m && (y.hasBezier = !0);
12535
12603
  }
12536
12604
  }
12537
12605
  for (var b = function() {
@@ -13565,8 +13633,11 @@ Jf.registerBinding = function(e, t, n, r) {
13565
13633
  } else M && (N = Math.min(Math.abs(r), N));
13566
13634
  if (!e.scrollingPage) {
13567
13635
  var o = e.cy, s = o.zoom(), c = o.pan(), l = e.projectIntoViewport(t.clientX, t.clientY), u = [l[0] * s + c.x, l[1] * s + c.y];
13568
- if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || C()) t.preventDefault();
13569
- else if (o.panningEnabled() && o.userPanningEnabled() && o.zoomingEnabled() && o.userZoomingEnabled()) {
13636
+ if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || C()) {
13637
+ t.preventDefault();
13638
+ return;
13639
+ }
13640
+ if (o.panningEnabled() && o.userPanningEnabled() && o.zoomingEnabled() && o.userZoomingEnabled()) {
13570
13641
  t.preventDefault(), e.data.wheelZooming = !0, clearTimeout(e.data.wheelTimeout), e.data.wheelTimeout = setTimeout(function() {
13571
13642
  e.data.wheelZooming = !1, e.redrawHint("eles", !0), e.redraw();
13572
13643
  }, 150);
@@ -13879,30 +13950,22 @@ Jf.registerBinding = function(e, t, n, r) {
13879
13950
  r ? r.emit(p) : o.emit(p);
13880
13951
  }
13881
13952
  e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !1, e.touchData.start = null, e.redraw();
13882
- } else {
13883
- if (!t.touches[2] && o.boxSelectionEnabled() && e.touchData.selecting) {
13884
- e.touchData.selecting = !1;
13885
- var m = o.collection(e.getAllInBox(a[0], a[1], a[2], a[3]));
13886
- a[0] = void 0, a[1] = void 0, a[2] = void 0, a[3] = void 0, a[4] = 0, e.redrawHint("select", !0), o.emit(d("boxend")), m.emit(d("box")).stdFilter(function(e) {
13887
- return e.selectable() && !e.selected();
13888
- }).select().emit(d("boxselect")), m.nonempty() && e.redrawHint("eles", !0), e.redraw();
13889
- }
13890
- if (r?.unactivate(), t.touches[2]) e.data.bgActivePosistion = void 0, e.redrawHint("select", !0);
13891
- else if (!t.touches[1] && !t.touches[0] && !t.touches[0]) {
13892
- e.data.bgActivePosistion = void 0, e.redrawHint("select", !0);
13893
- var g = e.dragData.touchDragEles;
13894
- if (r != null) {
13895
- var _ = r._private.grabbed;
13896
- h(g), e.redrawHint("drag", !0), e.redrawHint("eles", !0), _ && (r.emit(d("freeon")), g.emit(d("free")), e.dragData.didDrag && (r.emit(d("dragfreeon")), g.emit(d("dragfree")))), i(r, [
13897
- "touchend",
13898
- "tapend",
13899
- "vmouseup",
13900
- "tapdragout"
13901
- ], t, {
13902
- x: c[0],
13903
- y: c[1]
13904
- }), r.unactivate(), e.touchData.start = null;
13905
- } else i(e.findNearestElement(c[0], c[1], !0, !0), [
13953
+ return;
13954
+ }
13955
+ if (!t.touches[2] && o.boxSelectionEnabled() && e.touchData.selecting) {
13956
+ e.touchData.selecting = !1;
13957
+ var m = o.collection(e.getAllInBox(a[0], a[1], a[2], a[3]));
13958
+ a[0] = void 0, a[1] = void 0, a[2] = void 0, a[3] = void 0, a[4] = 0, e.redrawHint("select", !0), o.emit(d("boxend")), m.emit(d("box")).stdFilter(function(e) {
13959
+ return e.selectable() && !e.selected();
13960
+ }).select().emit(d("boxselect")), m.nonempty() && e.redrawHint("eles", !0), e.redraw();
13961
+ }
13962
+ if (r?.unactivate(), t.touches[2]) e.data.bgActivePosistion = void 0, e.redrawHint("select", !0);
13963
+ else if (!t.touches[1] && !t.touches[0] && !t.touches[0]) {
13964
+ e.data.bgActivePosistion = void 0, e.redrawHint("select", !0);
13965
+ var g = e.dragData.touchDragEles;
13966
+ if (r != null) {
13967
+ var _ = r._private.grabbed;
13968
+ h(g), e.redrawHint("drag", !0), e.redrawHint("eles", !0), _ && (r.emit(d("freeon")), g.emit(d("free")), e.dragData.didDrag && (r.emit(d("dragfreeon")), g.emit(d("dragfree")))), i(r, [
13906
13969
  "touchend",
13907
13970
  "tapend",
13908
13971
  "vmouseup",
@@ -13910,31 +13973,39 @@ Jf.registerBinding = function(e, t, n, r) {
13910
13973
  ], t, {
13911
13974
  x: c[0],
13912
13975
  y: c[1]
13913
- });
13914
- var v = e.touchData.startPosition[0] - c[0], y = v * v, b = e.touchData.startPosition[1] - c[1], x = (y + b * b) * s * s;
13915
- e.touchData.singleTouchMoved || (r || o.$(":selected").unselect(["tapunselect"]), i(r, ["tap", "vclick"], t, {
13916
- x: c[0],
13917
- y: c[1]
13918
- }), ae = !1, t.timeStamp - se <= o.multiClickDebounceTime() ? (oe && clearTimeout(oe), ae = !0, se = null, i(r, ["dbltap", "vdblclick"], t, {
13976
+ }), r.unactivate(), e.touchData.start = null;
13977
+ } else i(e.findNearestElement(c[0], c[1], !0, !0), [
13978
+ "touchend",
13979
+ "tapend",
13980
+ "vmouseup",
13981
+ "tapdragout"
13982
+ ], t, {
13983
+ x: c[0],
13984
+ y: c[1]
13985
+ });
13986
+ var v = e.touchData.startPosition[0] - c[0], y = v * v, b = e.touchData.startPosition[1] - c[1], x = (y + b * b) * s * s;
13987
+ e.touchData.singleTouchMoved || (r || o.$(":selected").unselect(["tapunselect"]), i(r, ["tap", "vclick"], t, {
13988
+ x: c[0],
13989
+ y: c[1]
13990
+ }), ae = !1, t.timeStamp - se <= o.multiClickDebounceTime() ? (oe && clearTimeout(oe), ae = !0, se = null, i(r, ["dbltap", "vdblclick"], t, {
13991
+ x: c[0],
13992
+ y: c[1]
13993
+ })) : (oe = setTimeout(function() {
13994
+ ae || i(r, ["onetap", "voneclick"], t, {
13919
13995
  x: c[0],
13920
13996
  y: c[1]
13921
- })) : (oe = setTimeout(function() {
13922
- ae || i(r, ["onetap", "voneclick"], t, {
13923
- x: c[0],
13924
- y: c[1]
13925
- });
13926
- }, o.multiClickDebounceTime()), se = t.timeStamp)), r != null && !e.dragData.didDrag && r._private.selectable && x < e.touchTapThreshold2 && !e.pinching && (o.selectionType() === "single" ? (o.$(n).unmerge(r).unselect(["tapunselect"]), r.select(["tapselect"])) : r.selected() ? r.unselect(["tapunselect"]) : r.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0;
13927
- }
13928
- for (var S = 0; S < c.length; S++) l[S] = c[S];
13929
- e.dragData.didDrag = !1, t.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [
13930
- null,
13931
- null,
13932
- null,
13933
- null,
13934
- null,
13935
- null
13936
- ], e.touchData.startGPosition = null, e.touchData.didSelect = !1), t.touches.length < 2 && (t.touches.length === 1 && (e.touchData.startGPosition = [t.touches[0].clientX, t.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw());
13997
+ });
13998
+ }, o.multiClickDebounceTime()), se = t.timeStamp)), r != null && !e.dragData.didDrag && r._private.selectable && x < e.touchTapThreshold2 && !e.pinching && (o.selectionType() === "single" ? (o.$(n).unmerge(r).unselect(["tapunselect"]), r.select(["tapselect"])) : r.selected() ? r.unselect(["tapunselect"]) : r.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0;
13937
13999
  }
14000
+ for (var S = 0; S < c.length; S++) l[S] = c[S];
14001
+ e.dragData.didDrag = !1, t.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [
14002
+ null,
14003
+ null,
14004
+ null,
14005
+ null,
14006
+ null,
14007
+ null
14008
+ ], e.touchData.startGPosition = null, e.touchData.didSelect = !1), t.touches.length < 2 && (t.touches.length === 1 && (e.touchData.startGPosition = [t.touches[0].clientX, t.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw());
13938
14009
  }, !1), typeof TouchEvent > "u") {
13939
14010
  var ce = [], X = function(e) {
13940
14011
  return {
@@ -14471,7 +14542,17 @@ $f.clientFunctions = [
14471
14542
  }, t.registerNodeShapes(), t.registerArrowShapes(), t.registerCalculationListeners();
14472
14543
  }, $f.notify = function(e, t) {
14473
14544
  var n = this, r = n.cy;
14474
- this.destroyed || (e === "init" ? n.load() : e === "destroy" ? n.destroy() : ((e === "add" || e === "remove" || e === "move" && r.hasCompoundNodes() || e === "load" || e === "zorder" || e === "mount") && n.invalidateCachedZSortedEles(), e === "viewport" && n.redrawHint("select", !0), e === "gc" && n.redrawHint("gc", !0), (e === "load" || e === "resize" || e === "mount") && (n.invalidateContainerClientCoordsCache(), n.matchCanvasSize(n.container)), n.redrawHint("eles", !0), n.redrawHint("drag", !0), this.startRenderLoop(), this.redraw()));
14545
+ if (!this.destroyed) {
14546
+ if (e === "init") {
14547
+ n.load();
14548
+ return;
14549
+ }
14550
+ if (e === "destroy") {
14551
+ n.destroy();
14552
+ return;
14553
+ }
14554
+ (e === "add" || e === "remove" || e === "move" && r.hasCompoundNodes() || e === "load" || e === "zorder" || e === "mount") && n.invalidateCachedZSortedEles(), e === "viewport" && n.redrawHint("select", !0), e === "gc" && n.redrawHint("gc", !0), (e === "load" || e === "resize" || e === "mount") && (n.invalidateContainerClientCoordsCache(), n.matchCanvasSize(n.container)), n.redrawHint("eles", !0), n.redrawHint("drag", !0), this.startRenderLoop(), this.redraw();
14555
+ }
14475
14556
  }, $f.destroy = function() {
14476
14557
  var e = this;
14477
14558
  e.destroyed = !0, e.cy.stopAnimationLoop();
@@ -14907,14 +14988,15 @@ Vp.makeLayer = function(e, t) {
14907
14988
  if (r.skipping && !a) return null;
14908
14989
  for (var h = null, g = e.length / Tp, _ = !a, v = 0; v < e.length; v++) {
14909
14990
  var y = e[v], b = y._private.rscratch, x = b.imgLayerCaches = b.imgLayerCaches || {}, S = x[n];
14910
- if (S) h = S;
14911
- else {
14912
- if ((!h || h.eles.length >= g || !ar(h.bb, y.boundingBox())) && (h = m({
14913
- insert: !0,
14914
- after: h
14915
- }), !h)) return null;
14916
- d || _ ? r.queueLayer(h, y) : r.drawEleInLayer(h, y, n, t), h.eles.push(y), x[n] = h;
14991
+ if (S) {
14992
+ h = S;
14993
+ continue;
14917
14994
  }
14995
+ if ((!h || h.eles.length >= g || !ar(h.bb, y.boundingBox())) && (h = m({
14996
+ insert: !0,
14997
+ after: h
14998
+ }), !h)) return null;
14999
+ d || _ ? r.queueLayer(h, y) : r.drawEleInLayer(h, y, n, t), h.eles.push(y), x[n] = h;
14918
15000
  }
14919
15001
  return d || (_ ? null : c);
14920
15002
  }, Vp.getEleLevelForLayerLevel = function(e, t) {
@@ -14938,8 +15020,11 @@ Vp.makeLayer = function(e, t) {
14938
15020
  a = o;
14939
15021
  break;
14940
15022
  }
14941
- if (a < 0) this.invalidateLayer(i);
14942
- else for (var s = a, o = 0; o < i.eles.length; o++) if (i.eles[o] !== t[s + o]) {
15023
+ if (a < 0) {
15024
+ this.invalidateLayer(i);
15025
+ continue;
15026
+ }
15027
+ for (var s = a, o = 0; o < i.eles.length; o++) if (i.eles[o] !== t[s + o]) {
14943
15028
  this.invalidateLayer(i);
14944
15029
  break;
14945
15030
  }
@@ -14992,13 +15077,20 @@ Vp.makeLayer = function(e, t) {
14992
15077
  }, Vp.dequeue = function(e) {
14993
15078
  for (var t = this, n = t.layersQueue, r = [], i = 0; i < Fp && n.size() !== 0;) {
14994
15079
  var a = n.peek();
14995
- if (a.replacement) n.pop();
14996
- else if (a.replaces && a !== a.replaces.replacement) n.pop();
14997
- else if (a.invalid) n.pop();
14998
- else {
14999
- var o = a.elesQueue.shift();
15000
- o && (t.drawEleInLayer(a, o, a.level, e), i++), r.length === 0 && r.push(!0), a.elesQueue.length === 0 && (n.pop(), a.reqs = 0, a.replaces && t.applyLayerReplacement(a), t.requestRedraw());
15080
+ if (a.replacement) {
15081
+ n.pop();
15082
+ continue;
15083
+ }
15084
+ if (a.replaces && a !== a.replaces.replacement) {
15085
+ n.pop();
15086
+ continue;
15087
+ }
15088
+ if (a.invalid) {
15089
+ n.pop();
15090
+ continue;
15001
15091
  }
15092
+ var o = a.elesQueue.shift();
15093
+ o && (t.drawEleInLayer(a, o, a.level, e), i++), r.length === 0 && r.push(!0), a.elesQueue.length === 0 && (n.pop(), a.reqs = 0, a.replaces && t.applyLayerReplacement(a), t.requestRedraw());
15002
15094
  }
15003
15095
  return r;
15004
15096
  }, Vp.applyLayerReplacement = function(e) {
@@ -15474,7 +15566,11 @@ um.drawNode = function(e, t, n) {
15474
15566
  }, te = function() {
15475
15567
  for (var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, i = l.backgrounding, a = 0, s = 0; s < b.length; s++) {
15476
15568
  var c = t.cy().style().getIndexedStyle(t, "background-image-containment", "value", s);
15477
- r && c === "over" || !r && c === "inside" ? a++ : y[s] && b[s].complete && !b[s].error && (a++, o.drawInscribedImage(e, b[s], t, s, n));
15569
+ if (r && c === "over" || !r && c === "inside") {
15570
+ a++;
15571
+ continue;
15572
+ }
15573
+ y[s] && b[s].complete && !b[s].error && (a++, o.drawInscribedImage(e, b[s], t, s, n));
15478
15574
  }
15479
15575
  l.backgrounding = a !== x, i !== l.backgrounding && t.updateStyle(!1);
15480
15576
  }, ne = function() {
@@ -15916,7 +16012,7 @@ function wm(e, t) {
15916
16012
  ,
15917
16013
  ,
15918
16014
  ];
15919
- return n[0] = ((e | 0) & 255) / 255, n[1] = (e >> 8 & 255) / 255, n[2] = (e >> 16 & 255) / 255, n[3] = (e >> 24 & 255) / 255, n;
16015
+ return n[0] = (e >> 0 & 255) / 255, n[1] = (e >> 8 & 255) / 255, n[2] = (e >> 16 & 255) / 255, n[3] = (e >> 24 & 255) / 255, n;
15920
16016
  }
15921
16017
  function Tm(e) {
15922
16018
  return e[0] + (e[1] << 8) + (e[2] << 16) + (e[3] << 24);
@@ -16222,43 +16318,44 @@ var Hm = /*#__PURE__*/ function() {
16222
16318
  key: "gc",
16223
16319
  value: function() {
16224
16320
  var e = this, t = this.markedKeys;
16225
- if (t.size === 0) console.log("nothing to garbage collect");
16226
- else {
16227
- var n = [], r = /* @__PURE__ */ new Map(), i = null, a = o(this.atlases), s;
16228
- try {
16229
- var c = function() {
16230
- var a = s.value, c = a.getKeys(), l = Wm(t, c);
16231
- if (l.size === 0) return n.push(a), c.forEach(function(e) {
16232
- return r.set(e, a);
16233
- }), 1;
16234
- i || (i = e._createAtlas(), n.push(i));
16235
- var u = o(c), d;
16236
- try {
16237
- for (u.s(); !(d = u.n()).done;) {
16238
- var p = d.value;
16239
- if (!l.has(p)) {
16240
- var m = f(a.getOffsets(p), 2), h = m[0], g = m[1];
16241
- i.canFit({
16242
- w: h.w + g.w,
16243
- h: h.h
16244
- }) || (i.lock(), i = e._createAtlas(), n.push(i)), a.canvas && (e._copyTextureToNewAtlas(p, a, i), r.set(p, i));
16245
- }
16321
+ if (t.size === 0) {
16322
+ console.log("nothing to garbage collect");
16323
+ return;
16324
+ }
16325
+ var n = [], r = /* @__PURE__ */ new Map(), i = null, a = o(this.atlases), s;
16326
+ try {
16327
+ var c = function() {
16328
+ var a = s.value, c = a.getKeys(), l = Wm(t, c);
16329
+ if (l.size === 0) return n.push(a), c.forEach(function(e) {
16330
+ return r.set(e, a);
16331
+ }), 1;
16332
+ i || (i = e._createAtlas(), n.push(i));
16333
+ var u = o(c), d;
16334
+ try {
16335
+ for (u.s(); !(d = u.n()).done;) {
16336
+ var p = d.value;
16337
+ if (!l.has(p)) {
16338
+ var m = f(a.getOffsets(p), 2), h = m[0], g = m[1];
16339
+ i.canFit({
16340
+ w: h.w + g.w,
16341
+ h: h.h
16342
+ }) || (i.lock(), i = e._createAtlas(), n.push(i)), a.canvas && (e._copyTextureToNewAtlas(p, a, i), r.set(p, i));
16246
16343
  }
16247
- } catch (e) {
16248
- u.e(e);
16249
- } finally {
16250
- u.f();
16251
16344
  }
16252
- a.dispose();
16253
- };
16254
- for (a.s(); !(s = a.n()).done;) if (c()) continue;
16255
- } catch (e) {
16256
- a.e(e);
16257
- } finally {
16258
- a.f();
16259
- }
16260
- this.atlases = n, this.styleKeyToAtlas = r, this.markedKeys = /* @__PURE__ */ new Set();
16345
+ } catch (e) {
16346
+ u.e(e);
16347
+ } finally {
16348
+ u.f();
16349
+ }
16350
+ a.dispose();
16351
+ };
16352
+ for (a.s(); !(s = a.n()).done;) if (c()) continue;
16353
+ } catch (e) {
16354
+ a.e(e);
16355
+ } finally {
16356
+ a.f();
16261
16357
  }
16358
+ this.atlases = n, this.styleKeyToAtlas = r, this.markedKeys = /* @__PURE__ */ new Set();
16262
16359
  }
16263
16360
  },
16264
16361
  {
@@ -17028,34 +17125,35 @@ var Gm = /*#__PURE__*/ function() {
17028
17125
  var r = this.simpleShapeOptions.get(n);
17029
17126
  if (this._isVisible(e, r)) {
17030
17127
  var i = r.shapeProps, a = this._getVertTypeForShape(e, i.shape);
17031
- if (a === void 0 || r.isSimple && !r.isSimple(e, this.renderTarget)) this.drawTexture(e, t, n);
17032
- else {
17033
- var o = this.instanceCount;
17034
- if (this.vertTypeBuffer.getView(o)[0] = a, a === ih || a === ah) {
17035
- var s = r.getBoundingBox(e), c = this._getCornerRadius(e, i.radius, s), l = this.cornerRadiusBuffer.getView(o);
17036
- l[0] = c, l[1] = c, l[2] = c, l[3] = c, a === ah && (l[0] = 0, l[2] = 0);
17037
- }
17038
- wm(t, this.indexBuffer.getView(o));
17039
- var u = this.renderTarget.picking ? 1 : n === "node-body" ? e.effectiveOpacity() : 1, d = this.renderTarget.picking ? 1 : e.pstyle(i.opacity).value * u, f = e.pstyle(i.color).value;
17040
- Cm(f, d, this.colorBuffer.getView(o));
17041
- var p = this.lineWidthBuffer.getView(o);
17042
- if (p[0] = 0, p[1] = 0, i.border) {
17043
- var m = e.pstyle("border-width").value;
17044
- if (m > 0) {
17045
- var h = e.pstyle("border-color").value;
17046
- Cm(h, u * e.pstyle("border-opacity").value, this.borderColorBuffer.getView(o));
17047
- var g = e.pstyle("border-position").value;
17048
- if (g === "inside") p[0] = 0, p[1] = -m;
17049
- else if (g === "outside") p[0] = m, p[1] = 0;
17050
- else {
17051
- var _ = m / 2;
17052
- p[0] = _, p[1] = -_;
17053
- }
17128
+ if (a === void 0 || r.isSimple && !r.isSimple(e, this.renderTarget)) {
17129
+ this.drawTexture(e, t, n);
17130
+ return;
17131
+ }
17132
+ var o = this.instanceCount;
17133
+ if (this.vertTypeBuffer.getView(o)[0] = a, a === ih || a === ah) {
17134
+ var s = r.getBoundingBox(e), c = this._getCornerRadius(e, i.radius, s), l = this.cornerRadiusBuffer.getView(o);
17135
+ l[0] = c, l[1] = c, l[2] = c, l[3] = c, a === ah && (l[0] = 0, l[2] = 0);
17136
+ }
17137
+ wm(t, this.indexBuffer.getView(o));
17138
+ var u = this.renderTarget.picking ? 1 : n === "node-body" ? e.effectiveOpacity() : 1, d = this.renderTarget.picking ? 1 : e.pstyle(i.opacity).value * u, f = e.pstyle(i.color).value;
17139
+ Cm(f, d, this.colorBuffer.getView(o));
17140
+ var p = this.lineWidthBuffer.getView(o);
17141
+ if (p[0] = 0, p[1] = 0, i.border) {
17142
+ var m = e.pstyle("border-width").value;
17143
+ if (m > 0) {
17144
+ var h = e.pstyle("border-color").value;
17145
+ Cm(h, u * e.pstyle("border-opacity").value, this.borderColorBuffer.getView(o));
17146
+ var g = e.pstyle("border-position").value;
17147
+ if (g === "inside") p[0] = 0, p[1] = -m;
17148
+ else if (g === "outside") p[0] = m, p[1] = 0;
17149
+ else {
17150
+ var _ = m / 2;
17151
+ p[0] = _, p[1] = -_;
17054
17152
  }
17055
17153
  }
17056
- var v = this.transformBuffer.getMatrixView(o);
17057
- this.setTransformMatrix(e, v, r), this.simpleCount++, this.instanceCount++, this.instanceCount >= this.maxInstances && this.endBatch();
17058
17154
  }
17155
+ var v = this.transformBuffer.getMatrixView(o);
17156
+ this.setTransformMatrix(e, v, r), this.simpleCount++, this.instanceCount++, this.instanceCount >= this.maxInstances && this.endBatch();
17059
17157
  }
17060
17158
  }
17061
17159
  },