@fecp/designer 5.6.27 → 5.6.29

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 (687) hide show
  1. package/es/_virtual/index2.mjs +5 -3
  2. package/es/_virtual/index3.mjs +3 -5
  3. package/es/_virtual/index4.mjs +2 -2
  4. package/es/_virtual/index5.mjs +2 -2
  5. package/es/designer/package.json.mjs +1 -1
  6. package/es/designer/src/components/DataSourceSelect.vue.mjs +6 -2
  7. package/es/designer/src/layout/property/index.vue.mjs +1 -1
  8. package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
  9. package/es/designer.css +585 -164
  10. package/es/node_modules/@braintree/sanitize-url/dist/index.mjs +1 -1
  11. package/es/node_modules/cose-base/cose-base.mjs +1090 -0
  12. package/es/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.mjs +1 -1
  13. package/es/node_modules/d3-sankey/src/sankeyLinkHorizontal.mjs +1 -1
  14. package/es/node_modules/diagram-js/lib/model/index.mjs +1 -1
  15. package/es/node_modules/echarts/core.mjs +86 -0
  16. package/es/node_modules/echarts/lib/animation/basicTransition.mjs +148 -0
  17. package/es/node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.mjs +79 -0
  18. package/es/node_modules/echarts/lib/animation/customGraphicTransition.mjs +338 -0
  19. package/es/node_modules/echarts/lib/chart/bar/BarSeries.mjs +66 -0
  20. package/es/node_modules/echarts/lib/chart/bar/BarView.mjs +782 -0
  21. package/es/node_modules/echarts/lib/chart/bar/BaseBarSeries.mjs +104 -0
  22. package/es/node_modules/echarts/lib/chart/bar/install.mjs +30 -0
  23. package/es/node_modules/echarts/lib/chart/funnel/FunnelSeries.mjs +99 -0
  24. package/es/node_modules/echarts/lib/chart/funnel/FunnelView.mjs +165 -0
  25. package/es/node_modules/echarts/lib/chart/funnel/funnelLayout.mjs +282 -0
  26. package/es/node_modules/echarts/lib/chart/funnel/install.mjs +13 -0
  27. package/es/node_modules/echarts/lib/chart/helper/Symbol.mjs +248 -0
  28. package/es/node_modules/echarts/lib/chart/helper/SymbolDraw.mjs +156 -0
  29. package/es/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.mjs +104 -0
  30. package/es/node_modules/echarts/lib/chart/helper/createRenderPlanner.mjs +16 -0
  31. package/es/node_modules/echarts/lib/chart/helper/createSeriesData.mjs +113 -0
  32. package/es/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.mjs +18 -0
  33. package/es/node_modules/echarts/lib/chart/helper/labelHelper.mjs +34 -0
  34. package/es/node_modules/echarts/lib/chart/helper/sectorHelper.mjs +22 -0
  35. package/es/node_modules/echarts/lib/chart/line/LineSeries.mjs +108 -0
  36. package/es/node_modules/echarts/lib/chart/line/LineView.mjs +966 -0
  37. package/es/node_modules/echarts/lib/chart/line/helper.mjs +80 -0
  38. package/es/node_modules/echarts/lib/chart/line/install.mjs +24 -0
  39. package/es/node_modules/echarts/lib/chart/line/lineAnimationDiff.mjs +112 -0
  40. package/es/node_modules/echarts/lib/chart/line/poly.mjs +303 -0
  41. package/es/node_modules/echarts/lib/chart/pie/PieSeries.mjs +159 -0
  42. package/es/node_modules/echarts/lib/chart/pie/PieView.mjs +229 -0
  43. package/es/node_modules/echarts/lib/chart/pie/install.mjs +18 -0
  44. package/es/node_modules/echarts/lib/chart/pie/labelLayout.mjs +390 -0
  45. package/es/node_modules/echarts/lib/chart/pie/pieLayout.mjs +185 -0
  46. package/es/node_modules/echarts/lib/chart/radar/RadarSeries.mjs +92 -0
  47. package/es/node_modules/echarts/lib/chart/radar/RadarView.mjs +187 -0
  48. package/es/node_modules/echarts/lib/chart/radar/backwardCompat.mjs +33 -0
  49. package/es/node_modules/echarts/lib/chart/radar/install.mjs +18 -0
  50. package/es/node_modules/echarts/lib/chart/radar/radarLayout.mjs +35 -0
  51. package/es/node_modules/echarts/lib/component/axis/AxisBuilder.mjs +507 -0
  52. package/es/node_modules/echarts/lib/component/axis/AxisView.mjs +54 -0
  53. package/es/node_modules/echarts/lib/component/axis/CartesianAxisView.mjs +199 -0
  54. package/es/node_modules/echarts/lib/component/axis/axisSplitHelper.mjs +82 -0
  55. package/es/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.mjs +74 -0
  56. package/es/node_modules/echarts/lib/component/axisPointer/AxisPointerView.mjs +39 -0
  57. package/es/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.mjs +286 -0
  58. package/es/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.mjs +105 -0
  59. package/es/node_modules/echarts/lib/component/axisPointer/axisTrigger.mjs +292 -0
  60. package/es/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.mjs +52 -0
  61. package/es/node_modules/echarts/lib/component/axisPointer/globalListener.mjs +86 -0
  62. package/es/node_modules/echarts/lib/component/axisPointer/install.mjs +32 -0
  63. package/es/node_modules/echarts/lib/component/axisPointer/modelHelper.mjs +206 -0
  64. package/es/node_modules/echarts/lib/component/axisPointer/viewHelper.mjs +143 -0
  65. package/es/node_modules/echarts/lib/component/dataset/install.mjs +57 -0
  66. package/es/node_modules/echarts/lib/component/graphic/GraphicModel.mjs +161 -0
  67. package/es/node_modules/echarts/lib/component/graphic/GraphicView.mjs +307 -0
  68. package/es/node_modules/echarts/lib/component/graphic/install.mjs +26 -0
  69. package/es/node_modules/echarts/lib/component/grid/install.mjs +10 -0
  70. package/es/node_modules/echarts/lib/component/grid/installSimple.mjs +58 -0
  71. package/es/node_modules/echarts/lib/component/helper/listComponent.mjs +23 -0
  72. package/es/node_modules/echarts/lib/component/legend/LegendModel.mjs +261 -0
  73. package/es/node_modules/echarts/lib/component/legend/LegendView.mjs +417 -0
  74. package/es/node_modules/echarts/lib/component/legend/ScrollableLegendModel.mjs +59 -0
  75. package/es/node_modules/echarts/lib/component/legend/ScrollableLegendView.mjs +313 -0
  76. package/es/node_modules/echarts/lib/component/legend/install.mjs +10 -0
  77. package/es/node_modules/echarts/lib/component/legend/installLegendPlain.mjs +16 -0
  78. package/es/node_modules/echarts/lib/component/legend/installLegendScroll.mjs +14 -0
  79. package/es/node_modules/echarts/lib/component/legend/legendAction.mjs +59 -0
  80. package/es/node_modules/echarts/lib/component/legend/legendFilter.mjs +18 -0
  81. package/es/node_modules/echarts/lib/component/legend/scrollableLegendAction.mjs +15 -0
  82. package/es/node_modules/echarts/lib/component/radar/RadarView.mjs +161 -0
  83. package/es/node_modules/echarts/lib/component/radar/install.mjs +21 -0
  84. package/es/node_modules/echarts/lib/component/title/install.mjs +183 -0
  85. package/es/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.mjs +299 -0
  86. package/es/node_modules/echarts/lib/component/tooltip/TooltipModel.mjs +86 -0
  87. package/es/node_modules/echarts/lib/component/tooltip/TooltipRichContent.mjs +153 -0
  88. package/es/node_modules/echarts/lib/component/tooltip/TooltipView.mjs +693 -0
  89. package/es/node_modules/echarts/lib/component/tooltip/helper.mjs +39 -0
  90. package/es/node_modules/echarts/lib/component/tooltip/install.mjs +23 -0
  91. package/es/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.mjs +95 -0
  92. package/es/node_modules/echarts/lib/component/tooltip/tooltipMarkup.mjs +252 -0
  93. package/es/node_modules/echarts/lib/component/transform/filterTransform.mjs +46 -0
  94. package/es/node_modules/echarts/lib/component/transform/install.mjs +9 -0
  95. package/es/node_modules/echarts/lib/component/transform/sortTransform.mjs +81 -0
  96. package/es/node_modules/echarts/lib/coord/Axis.mjs +176 -0
  97. package/es/node_modules/echarts/lib/coord/CoordinateSystem.mjs +6 -0
  98. package/es/node_modules/echarts/lib/coord/axisAlignTicks.mjs +76 -0
  99. package/es/node_modules/echarts/lib/coord/axisCommonTypes.mjs +9 -0
  100. package/es/node_modules/echarts/lib/coord/axisDefault.mjs +164 -0
  101. package/es/node_modules/echarts/lib/coord/axisHelper.mjs +223 -0
  102. package/es/node_modules/echarts/lib/coord/axisModelCommonMixin.mjs +18 -0
  103. package/es/node_modules/echarts/lib/coord/axisModelCreator.mjs +62 -0
  104. package/es/node_modules/echarts/lib/coord/axisTickLabelBuilder.mjs +266 -0
  105. package/es/node_modules/echarts/lib/coord/cartesian/Axis2D.mjs +40 -0
  106. package/es/node_modules/echarts/lib/coord/cartesian/AxisModel.mjs +24 -0
  107. package/es/node_modules/echarts/lib/coord/cartesian/Cartesian.mjs +35 -0
  108. package/es/node_modules/echarts/lib/coord/cartesian/Cartesian2D.mjs +116 -0
  109. package/es/node_modules/echarts/lib/coord/cartesian/Grid.mjs +376 -0
  110. package/es/node_modules/echarts/lib/coord/cartesian/GridModel.mjs +34 -0
  111. package/es/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.mjs +67 -0
  112. package/es/node_modules/echarts/lib/coord/geo/Region.mjs +231 -0
  113. package/es/node_modules/echarts/lib/coord/geo/parseGeoJson.mjs +94 -0
  114. package/es/node_modules/echarts/lib/coord/radar/IndicatorAxis.mjs +19 -0
  115. package/es/node_modules/echarts/lib/coord/radar/Radar.mjs +138 -0
  116. package/es/node_modules/echarts/lib/coord/radar/RadarModel.mjs +116 -0
  117. package/es/node_modules/echarts/lib/coord/scaleRawExtentInfo.mjs +134 -0
  118. package/es/node_modules/echarts/lib/core/CoordinateSystem.mjs +36 -0
  119. package/es/node_modules/echarts/lib/core/ExtensionAPI.mjs +35 -0
  120. package/es/node_modules/echarts/lib/core/Scheduler.mjs +350 -0
  121. package/es/node_modules/echarts/lib/core/echarts.mjs +1782 -0
  122. package/es/node_modules/echarts/lib/core/impl.mjs +11 -0
  123. package/es/node_modules/echarts/lib/core/lifecycle.mjs +5 -0
  124. package/es/node_modules/echarts/lib/core/locale.mjs +49 -0
  125. package/es/node_modules/echarts/lib/core/task.mjs +171 -0
  126. package/es/node_modules/echarts/lib/data/DataDiffer.mjs +153 -0
  127. package/es/node_modules/echarts/lib/data/DataStore.mjs +820 -0
  128. package/es/node_modules/echarts/lib/data/OrdinalMeta.mjs +65 -0
  129. package/es/node_modules/echarts/lib/data/SeriesData.mjs +647 -0
  130. package/es/node_modules/echarts/lib/data/SeriesDimensionDefine.mjs +16 -0
  131. package/es/node_modules/echarts/lib/data/Source.mjs +211 -0
  132. package/es/node_modules/echarts/lib/data/helper/SeriesDataSchema.mjs +144 -0
  133. package/es/node_modules/echarts/lib/data/helper/createDimensions.mjs +215 -0
  134. package/es/node_modules/echarts/lib/data/helper/dataProvider.mjs +226 -0
  135. package/es/node_modules/echarts/lib/data/helper/dataStackHelper.mjs +107 -0
  136. package/es/node_modules/echarts/lib/data/helper/dataValueHelper.mjs +126 -0
  137. package/es/node_modules/echarts/lib/data/helper/dimensionHelper.mjs +100 -0
  138. package/es/node_modules/echarts/lib/data/helper/sourceHelper.mjs +242 -0
  139. package/es/node_modules/echarts/lib/data/helper/sourceManager.mjs +222 -0
  140. package/es/node_modules/echarts/lib/data/helper/transform.mjs +247 -0
  141. package/es/node_modules/echarts/lib/export/api/format.mjs +16 -0
  142. package/es/node_modules/echarts/lib/export/api/graphic.mjs +54 -0
  143. package/es/node_modules/echarts/lib/export/api/helper.mjs +49 -0
  144. package/es/node_modules/echarts/lib/export/api/number.mjs +21 -0
  145. package/es/node_modules/echarts/lib/export/api/time.mjs +6 -0
  146. package/es/node_modules/echarts/lib/export/api/util.mjs +19 -0
  147. package/es/node_modules/echarts/lib/export/api.mjs +34 -0
  148. package/es/node_modules/echarts/lib/extension.mjs +69 -0
  149. package/es/node_modules/echarts/lib/i18n/langEN.mjs +114 -0
  150. package/es/node_modules/echarts/lib/i18n/langZH.mjs +114 -0
  151. package/es/node_modules/echarts/lib/label/labelGuideHelper.mjs +215 -0
  152. package/es/node_modules/echarts/lib/label/labelLayoutHelper.mjs +215 -0
  153. package/es/node_modules/echarts/lib/label/labelStyle.mjs +330 -0
  154. package/es/node_modules/echarts/lib/label/sectorLabel.mjs +152 -0
  155. package/es/node_modules/echarts/lib/layout/barGrid.mjs +368 -0
  156. package/es/node_modules/echarts/lib/layout/points.mjs +59 -0
  157. package/es/node_modules/echarts/lib/legacy/dataSelectAction.mjs +68 -0
  158. package/es/node_modules/echarts/lib/legacy/getTextRect.mjs +20 -0
  159. package/es/node_modules/echarts/lib/loading/default.mjs +108 -0
  160. package/es/node_modules/echarts/lib/model/Component.mjs +118 -0
  161. package/es/node_modules/echarts/lib/model/Global.mjs +471 -0
  162. package/es/node_modules/echarts/lib/model/Model.mjs +102 -0
  163. package/es/node_modules/echarts/lib/model/OptionManager.mjs +179 -0
  164. package/es/node_modules/echarts/lib/model/Series.mjs +375 -0
  165. package/es/node_modules/echarts/lib/model/globalDefault.mjs +89 -0
  166. package/es/node_modules/echarts/lib/model/internalComponentCreator.mjs +16 -0
  167. package/es/node_modules/echarts/lib/model/mixin/areaStyle.mjs +27 -0
  168. package/es/node_modules/echarts/lib/model/mixin/dataFormat.mjs +108 -0
  169. package/es/node_modules/echarts/lib/model/mixin/itemStyle.mjs +34 -0
  170. package/es/node_modules/echarts/lib/model/mixin/lineStyle.mjs +33 -0
  171. package/es/node_modules/echarts/lib/model/mixin/makeStyleMapper.mjs +26 -0
  172. package/es/node_modules/echarts/lib/model/mixin/palette.mjs +55 -0
  173. package/es/node_modules/echarts/lib/model/mixin/textStyle.mjs +40 -0
  174. package/es/node_modules/echarts/lib/model/referHelper.mjs +90 -0
  175. package/es/node_modules/echarts/lib/preprocessor/backwardCompat.mjs +178 -0
  176. package/es/node_modules/echarts/lib/preprocessor/helper/compatStyle.mjs +239 -0
  177. package/es/node_modules/echarts/lib/processor/dataFilter.mjs +26 -0
  178. package/es/node_modules/echarts/lib/processor/dataSample.mjs +83 -0
  179. package/es/node_modules/echarts/lib/processor/dataStack.mjs +73 -0
  180. package/es/node_modules/echarts/lib/processor/negativeDataFilter.mjs +20 -0
  181. package/es/node_modules/echarts/lib/renderer/installCanvasRenderer.mjs +7 -0
  182. package/es/node_modules/echarts/lib/scale/Interval.mjs +191 -0
  183. package/es/node_modules/echarts/lib/scale/Log.mjs +120 -0
  184. package/es/node_modules/echarts/lib/scale/Ordinal.mjs +124 -0
  185. package/es/node_modules/echarts/lib/scale/Scale.mjs +47 -0
  186. package/es/node_modules/echarts/lib/scale/Time.mjs +373 -0
  187. package/es/node_modules/echarts/lib/scale/helper.mjs +70 -0
  188. package/es/node_modules/echarts/lib/theme/dark.mjs +184 -0
  189. package/es/node_modules/echarts/lib/theme/light.mjs +8 -0
  190. package/es/node_modules/echarts/lib/util/ECEventProcessor.mjs +79 -0
  191. package/es/node_modules/echarts/lib/util/clazz.mjs +149 -0
  192. package/es/node_modules/echarts/lib/util/component.mjs +112 -0
  193. package/es/node_modules/echarts/lib/util/conditionalExpression.mjs +218 -0
  194. package/es/node_modules/echarts/lib/util/decal.mjs +280 -0
  195. package/es/node_modules/echarts/lib/util/event.mjs +16 -0
  196. package/es/node_modules/echarts/lib/util/format.mjs +148 -0
  197. package/es/node_modules/echarts/lib/util/graphic.mjs +378 -0
  198. package/es/node_modules/echarts/lib/util/innerStore.mjs +24 -0
  199. package/es/node_modules/echarts/lib/util/layout.mjs +248 -0
  200. package/es/node_modules/echarts/lib/util/log.mjs +6 -0
  201. package/es/node_modules/echarts/lib/util/model.mjs +385 -0
  202. package/es/node_modules/echarts/lib/util/number.mjs +322 -0
  203. package/es/node_modules/echarts/lib/util/shape/sausage.mjs +67 -0
  204. package/es/node_modules/echarts/lib/util/states.mjs +558 -0
  205. package/es/node_modules/echarts/lib/util/styleCompat.mjs +75 -0
  206. package/es/node_modules/echarts/lib/util/symbol.mjs +266 -0
  207. package/es/node_modules/echarts/lib/util/throttle.mjs +84 -0
  208. package/es/node_modules/echarts/lib/util/time.mjs +254 -0
  209. package/es/node_modules/echarts/lib/util/types.mjs +21 -0
  210. package/es/node_modules/echarts/lib/util/vendor.mjs +12 -0
  211. package/es/node_modules/echarts/lib/view/Chart.mjs +127 -0
  212. package/es/node_modules/echarts/lib/view/Component.mjs +38 -0
  213. package/es/node_modules/echarts/lib/visual/LegendVisualProvider.mjs +29 -0
  214. package/es/node_modules/echarts/lib/visual/decal.mjs +26 -0
  215. package/es/node_modules/echarts/lib/visual/helper.mjs +30 -0
  216. package/es/node_modules/echarts/lib/visual/style.mjs +159 -0
  217. package/es/node_modules/echarts/lib/visual/symbol.mjs +81 -0
  218. package/es/node_modules/grid-layout-plus/es/components/grid-item.vue.mjs +32 -2
  219. package/es/node_modules/grid-layout-plus/es/index.mjs +5 -1
  220. package/es/node_modules/layout-base/layout-base.mjs +3197 -0
  221. package/es/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.mjs +1 -1
  222. package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.mjs +1 -1
  223. package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.mjs +1 -1
  224. package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.mjs +1 -1
  225. package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.mjs +1 -1
  226. package/es/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.mjs +1 -1
  227. package/es/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.mjs +1 -1
  228. package/es/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.mjs +1 -1
  229. package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.mjs +1 -1
  230. package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.mjs +1 -1
  231. package/es/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.mjs +1 -1
  232. package/es/node_modules/object-refs/index.mjs +1 -1
  233. package/es/node_modules/tslib/tslib.es6.mjs +34 -0
  234. package/es/node_modules/zrender/lib/Element.mjs +974 -0
  235. package/es/node_modules/zrender/lib/Handler.mjs +295 -0
  236. package/es/node_modules/zrender/lib/Storage.mjs +156 -0
  237. package/es/node_modules/zrender/lib/animation/Animation.mjs +146 -0
  238. package/es/node_modules/zrender/lib/animation/Animator.mjs +701 -0
  239. package/es/node_modules/zrender/lib/animation/Clip.mjs +63 -0
  240. package/es/node_modules/zrender/lib/animation/cubicEasing.mjs +23 -0
  241. package/es/node_modules/zrender/lib/animation/easing.mjs +187 -0
  242. package/es/node_modules/zrender/lib/animation/requestAnimationFrame.mjs +8 -0
  243. package/es/node_modules/zrender/lib/canvas/Layer.mjs +286 -0
  244. package/es/node_modules/zrender/lib/canvas/Painter.mjs +610 -0
  245. package/es/node_modules/zrender/lib/canvas/dashStyle.mjs +26 -0
  246. package/es/node_modules/zrender/lib/canvas/graphic.mjs +521 -0
  247. package/es/node_modules/zrender/lib/canvas/helper.mjs +82 -0
  248. package/es/node_modules/zrender/lib/config.mjs +17 -0
  249. package/es/node_modules/zrender/lib/contain/arc.mjs +36 -0
  250. package/es/node_modules/zrender/lib/contain/cubic.mjs +15 -0
  251. package/es/node_modules/zrender/lib/contain/line.mjs +23 -0
  252. package/es/node_modules/zrender/lib/contain/path.mjs +289 -0
  253. package/es/node_modules/zrender/lib/contain/polygon.mjs +25 -0
  254. package/es/node_modules/zrender/lib/contain/quadratic.mjs +15 -0
  255. package/es/node_modules/zrender/lib/contain/text.mjs +173 -0
  256. package/es/node_modules/zrender/lib/contain/util.mjs +11 -0
  257. package/es/node_modules/zrender/lib/contain/windingLine.mjs +18 -0
  258. package/es/node_modules/zrender/lib/core/BoundingRect.mjs +203 -0
  259. package/es/node_modules/zrender/lib/core/Eventful.mjs +153 -0
  260. package/es/node_modules/zrender/lib/core/GestureMgr.mjs +81 -0
  261. package/es/node_modules/zrender/lib/core/LRU.mjs +108 -0
  262. package/es/node_modules/zrender/lib/core/OrientedBoundingRect.mjs +119 -0
  263. package/es/node_modules/zrender/lib/core/PathProxy.mjs +693 -0
  264. package/es/node_modules/zrender/lib/core/Point.mjs +131 -0
  265. package/es/node_modules/zrender/lib/core/Transformable.mjs +236 -0
  266. package/es/node_modules/zrender/lib/core/WeakMap.mjs +43 -0
  267. package/es/node_modules/zrender/lib/core/bbox.mjs +108 -0
  268. package/es/node_modules/zrender/lib/core/curve.mjs +336 -0
  269. package/es/node_modules/zrender/lib/core/dom.mjs +92 -0
  270. package/es/node_modules/zrender/lib/core/env.mjs +71 -0
  271. package/es/node_modules/zrender/lib/core/event.mjs +96 -0
  272. package/es/node_modules/zrender/lib/core/fourPointsTransform.mjs +59 -0
  273. package/es/node_modules/zrender/lib/core/matrix.mjs +112 -0
  274. package/es/node_modules/zrender/lib/core/platform.mjs +77 -0
  275. package/es/node_modules/zrender/lib/core/timsort.mjs +510 -0
  276. package/es/node_modules/zrender/lib/core/util.mjs +559 -0
  277. package/es/node_modules/zrender/lib/core/vector.mjs +136 -0
  278. package/es/node_modules/zrender/lib/dom/HandlerProxy.mjs +300 -0
  279. package/es/node_modules/zrender/lib/graphic/CompoundPath.mjs +51 -0
  280. package/es/node_modules/zrender/lib/graphic/Displayable.mjs +314 -0
  281. package/es/node_modules/zrender/lib/graphic/Gradient.mjs +15 -0
  282. package/es/node_modules/zrender/lib/graphic/Group.mjs +174 -0
  283. package/es/node_modules/zrender/lib/graphic/Image.mjs +73 -0
  284. package/es/node_modules/zrender/lib/graphic/IncrementalDisplayable.mjs +113 -0
  285. package/es/node_modules/zrender/lib/graphic/LinearGradient.mjs +19 -0
  286. package/es/node_modules/zrender/lib/graphic/Path.mjs +393 -0
  287. package/es/node_modules/zrender/lib/graphic/RadialGradient.mjs +18 -0
  288. package/es/node_modules/zrender/lib/graphic/TSpan.mjs +66 -0
  289. package/es/node_modules/zrender/lib/graphic/Text.mjs +503 -0
  290. package/es/node_modules/zrender/lib/graphic/constants.mjs +8 -0
  291. package/es/node_modules/zrender/lib/graphic/helper/image.mjs +55 -0
  292. package/es/node_modules/zrender/lib/graphic/helper/parseText.mjs +474 -0
  293. package/es/node_modules/zrender/lib/graphic/helper/poly.mjs +27 -0
  294. package/es/node_modules/zrender/lib/graphic/helper/roundRect.mjs +73 -0
  295. package/es/node_modules/zrender/lib/graphic/helper/roundSector.mjs +218 -0
  296. package/es/node_modules/zrender/lib/graphic/helper/smoothBezier.mjs +64 -0
  297. package/es/node_modules/zrender/lib/graphic/helper/subPixelOptimize.mjs +59 -0
  298. package/es/node_modules/zrender/lib/graphic/shape/Arc.mjs +46 -0
  299. package/es/node_modules/zrender/lib/graphic/shape/BezierCurve.mjs +98 -0
  300. package/es/node_modules/zrender/lib/graphic/shape/Circle.mjs +29 -0
  301. package/es/node_modules/zrender/lib/graphic/shape/Ellipse.mjs +41 -0
  302. package/es/node_modules/zrender/lib/graphic/shape/Line.mjs +70 -0
  303. package/es/node_modules/zrender/lib/graphic/shape/Polygon.mjs +29 -0
  304. package/es/node_modules/zrender/lib/graphic/shape/Polyline.mjs +36 -0
  305. package/es/node_modules/zrender/lib/graphic/shape/Rect.mjs +57 -0
  306. package/es/node_modules/zrender/lib/graphic/shape/Ring.mjs +35 -0
  307. package/es/node_modules/zrender/lib/graphic/shape/Sector.mjs +37 -0
  308. package/es/node_modules/zrender/lib/mixin/Draggable.mjs +68 -0
  309. package/es/node_modules/zrender/lib/svg/helper.mjs +27 -0
  310. package/es/node_modules/zrender/lib/tool/color.mjs +501 -0
  311. package/es/node_modules/zrender/lib/tool/path.mjs +338 -0
  312. package/es/node_modules/zrender/lib/tool/transformPath.mjs +84 -0
  313. package/es/node_modules/zrender/lib/zrender.mjs +323 -0
  314. package/es/packages/mobile/index.mjs +17 -0
  315. package/es/packages/mobile/src/components/all.mjs +18 -1
  316. package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
  317. package/es/packages/mobile/src/components/custom/aiAssistant/AiAssistant.vue.mjs +91 -0
  318. package/es/packages/mobile/src/components/custom/aiAssistant/index.mjs +10 -0
  319. package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +25 -16
  320. package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +7 -3
  321. package/es/packages/mobile/src/components/custom/document/Document.vue.mjs +2 -2
  322. package/es/packages/mobile/src/components/dataDisplay/cardList/CardLayoutRenderer.vue.mjs +246 -0
  323. package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +60 -10
  324. package/es/packages/mobile/src/components/dataDisplay/cardList/index.mjs +2 -0
  325. package/es/packages/mobile/src/components/dataDisplay/cardList/layoutDefinitions.mjs +77 -0
  326. package/es/packages/mobile/src/components/dataDisplay/chart/Chart.vue.mjs +314 -0
  327. package/es/packages/mobile/src/components/dataDisplay/chart/formatters.mjs +20 -0
  328. package/es/packages/mobile/src/components/dataDisplay/chart/index.mjs +7 -0
  329. package/es/packages/mobile/src/components/dataDisplay/chart/optionBuilder.mjs +340 -0
  330. package/es/packages/mobile/src/components/dataDisplay/chart/presets.mjs +29 -0
  331. package/es/packages/mobile/src/components/dataDisplay/chart/useEcharts.mjs +42 -0
  332. package/es/packages/mobile/src/components/form/fieldDrawerSelect/FieldDrawerSelect.vue.mjs +676 -0
  333. package/es/packages/mobile/src/components/form/fieldDrawerSelect/index.mjs +10 -0
  334. package/es/packages/mobile/src/components/navigation/anchorNav/AnchorNav.vue.mjs +101 -0
  335. package/es/packages/mobile/src/components/navigation/anchorNav/index.mjs +7 -0
  336. package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +2 -2
  337. package/es/packages/mobile/src/index.vue.mjs +21 -71
  338. package/es/packages/mobile/src/page.vue.mjs +79 -37
  339. package/es/packages/mobile/src/utils/idea/vue3sfc.mjs +49 -2
  340. package/es/packages/vue/src/components/bus/flowChart/bpmnjs/component/NodeItem.vue.mjs +1 -1
  341. package/es/packages/vue/src/components/bus/flowChart/bpmnjs/component/timeline.vue.mjs +1 -1
  342. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +184 -40
  343. package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +12 -2
  344. package/lib/_virtual/index2.js +6 -4
  345. package/lib/_virtual/index3.js +4 -6
  346. package/lib/_virtual/index4.js +2 -2
  347. package/lib/_virtual/index5.js +2 -2
  348. package/lib/designer/package.json.js +1 -1
  349. package/lib/designer/src/components/DataSourceSelect.vue.js +6 -2
  350. package/lib/designer/src/layout/property/index.vue.js +1 -1
  351. package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
  352. package/lib/designer.css +585 -164
  353. package/lib/node_modules/@braintree/sanitize-url/dist/index.js +1 -1
  354. package/lib/node_modules/cose-base/cose-base.js +1090 -0
  355. package/lib/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js +1 -1
  356. package/lib/node_modules/d3-sankey/src/sankeyLinkHorizontal.js +1 -1
  357. package/lib/node_modules/diagram-js/lib/model/index.js +1 -1
  358. package/lib/node_modules/echarts/core.js +86 -0
  359. package/lib/node_modules/echarts/lib/animation/basicTransition.js +148 -0
  360. package/lib/node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.js +79 -0
  361. package/lib/node_modules/echarts/lib/animation/customGraphicTransition.js +338 -0
  362. package/lib/node_modules/echarts/lib/chart/bar/BarSeries.js +66 -0
  363. package/lib/node_modules/echarts/lib/chart/bar/BarView.js +782 -0
  364. package/lib/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +104 -0
  365. package/lib/node_modules/echarts/lib/chart/bar/install.js +30 -0
  366. package/lib/node_modules/echarts/lib/chart/funnel/FunnelSeries.js +99 -0
  367. package/lib/node_modules/echarts/lib/chart/funnel/FunnelView.js +165 -0
  368. package/lib/node_modules/echarts/lib/chart/funnel/funnelLayout.js +282 -0
  369. package/lib/node_modules/echarts/lib/chart/funnel/install.js +13 -0
  370. package/lib/node_modules/echarts/lib/chart/helper/Symbol.js +248 -0
  371. package/lib/node_modules/echarts/lib/chart/helper/SymbolDraw.js +156 -0
  372. package/lib/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js +104 -0
  373. package/lib/node_modules/echarts/lib/chart/helper/createRenderPlanner.js +16 -0
  374. package/lib/node_modules/echarts/lib/chart/helper/createSeriesData.js +113 -0
  375. package/lib/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +18 -0
  376. package/lib/node_modules/echarts/lib/chart/helper/labelHelper.js +34 -0
  377. package/lib/node_modules/echarts/lib/chart/helper/sectorHelper.js +22 -0
  378. package/lib/node_modules/echarts/lib/chart/line/LineSeries.js +108 -0
  379. package/lib/node_modules/echarts/lib/chart/line/LineView.js +966 -0
  380. package/lib/node_modules/echarts/lib/chart/line/helper.js +80 -0
  381. package/lib/node_modules/echarts/lib/chart/line/install.js +24 -0
  382. package/lib/node_modules/echarts/lib/chart/line/lineAnimationDiff.js +112 -0
  383. package/lib/node_modules/echarts/lib/chart/line/poly.js +303 -0
  384. package/lib/node_modules/echarts/lib/chart/pie/PieSeries.js +159 -0
  385. package/lib/node_modules/echarts/lib/chart/pie/PieView.js +229 -0
  386. package/lib/node_modules/echarts/lib/chart/pie/install.js +18 -0
  387. package/lib/node_modules/echarts/lib/chart/pie/labelLayout.js +390 -0
  388. package/lib/node_modules/echarts/lib/chart/pie/pieLayout.js +185 -0
  389. package/lib/node_modules/echarts/lib/chart/radar/RadarSeries.js +92 -0
  390. package/lib/node_modules/echarts/lib/chart/radar/RadarView.js +187 -0
  391. package/lib/node_modules/echarts/lib/chart/radar/backwardCompat.js +33 -0
  392. package/lib/node_modules/echarts/lib/chart/radar/install.js +18 -0
  393. package/lib/node_modules/echarts/lib/chart/radar/radarLayout.js +35 -0
  394. package/lib/node_modules/echarts/lib/component/axis/AxisBuilder.js +507 -0
  395. package/lib/node_modules/echarts/lib/component/axis/AxisView.js +54 -0
  396. package/lib/node_modules/echarts/lib/component/axis/CartesianAxisView.js +199 -0
  397. package/lib/node_modules/echarts/lib/component/axis/axisSplitHelper.js +82 -0
  398. package/lib/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js +74 -0
  399. package/lib/node_modules/echarts/lib/component/axisPointer/AxisPointerView.js +39 -0
  400. package/lib/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +285 -0
  401. package/lib/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +105 -0
  402. package/lib/node_modules/echarts/lib/component/axisPointer/axisTrigger.js +292 -0
  403. package/lib/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js +52 -0
  404. package/lib/node_modules/echarts/lib/component/axisPointer/globalListener.js +86 -0
  405. package/lib/node_modules/echarts/lib/component/axisPointer/install.js +32 -0
  406. package/lib/node_modules/echarts/lib/component/axisPointer/modelHelper.js +206 -0
  407. package/lib/node_modules/echarts/lib/component/axisPointer/viewHelper.js +143 -0
  408. package/lib/node_modules/echarts/lib/component/dataset/install.js +57 -0
  409. package/lib/node_modules/echarts/lib/component/graphic/GraphicModel.js +161 -0
  410. package/lib/node_modules/echarts/lib/component/graphic/GraphicView.js +307 -0
  411. package/lib/node_modules/echarts/lib/component/graphic/install.js +26 -0
  412. package/lib/node_modules/echarts/lib/component/grid/install.js +10 -0
  413. package/lib/node_modules/echarts/lib/component/grid/installSimple.js +58 -0
  414. package/lib/node_modules/echarts/lib/component/helper/listComponent.js +23 -0
  415. package/lib/node_modules/echarts/lib/component/legend/LegendModel.js +261 -0
  416. package/lib/node_modules/echarts/lib/component/legend/LegendView.js +417 -0
  417. package/lib/node_modules/echarts/lib/component/legend/ScrollableLegendModel.js +59 -0
  418. package/lib/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +313 -0
  419. package/lib/node_modules/echarts/lib/component/legend/install.js +10 -0
  420. package/lib/node_modules/echarts/lib/component/legend/installLegendPlain.js +16 -0
  421. package/lib/node_modules/echarts/lib/component/legend/installLegendScroll.js +14 -0
  422. package/lib/node_modules/echarts/lib/component/legend/legendAction.js +59 -0
  423. package/lib/node_modules/echarts/lib/component/legend/legendFilter.js +18 -0
  424. package/lib/node_modules/echarts/lib/component/legend/scrollableLegendAction.js +15 -0
  425. package/lib/node_modules/echarts/lib/component/radar/RadarView.js +161 -0
  426. package/lib/node_modules/echarts/lib/component/radar/install.js +21 -0
  427. package/lib/node_modules/echarts/lib/component/title/install.js +183 -0
  428. package/lib/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js +299 -0
  429. package/lib/node_modules/echarts/lib/component/tooltip/TooltipModel.js +86 -0
  430. package/lib/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +153 -0
  431. package/lib/node_modules/echarts/lib/component/tooltip/TooltipView.js +693 -0
  432. package/lib/node_modules/echarts/lib/component/tooltip/helper.js +39 -0
  433. package/lib/node_modules/echarts/lib/component/tooltip/install.js +23 -0
  434. package/lib/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js +95 -0
  435. package/lib/node_modules/echarts/lib/component/tooltip/tooltipMarkup.js +252 -0
  436. package/lib/node_modules/echarts/lib/component/transform/filterTransform.js +46 -0
  437. package/lib/node_modules/echarts/lib/component/transform/install.js +9 -0
  438. package/lib/node_modules/echarts/lib/component/transform/sortTransform.js +81 -0
  439. package/lib/node_modules/echarts/lib/coord/Axis.js +176 -0
  440. package/lib/node_modules/echarts/lib/coord/CoordinateSystem.js +6 -0
  441. package/lib/node_modules/echarts/lib/coord/axisAlignTicks.js +76 -0
  442. package/lib/node_modules/echarts/lib/coord/axisCommonTypes.js +9 -0
  443. package/lib/node_modules/echarts/lib/coord/axisDefault.js +164 -0
  444. package/lib/node_modules/echarts/lib/coord/axisHelper.js +223 -0
  445. package/lib/node_modules/echarts/lib/coord/axisModelCommonMixin.js +18 -0
  446. package/lib/node_modules/echarts/lib/coord/axisModelCreator.js +62 -0
  447. package/lib/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +266 -0
  448. package/lib/node_modules/echarts/lib/coord/cartesian/Axis2D.js +40 -0
  449. package/lib/node_modules/echarts/lib/coord/cartesian/AxisModel.js +24 -0
  450. package/lib/node_modules/echarts/lib/coord/cartesian/Cartesian.js +35 -0
  451. package/lib/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js +116 -0
  452. package/lib/node_modules/echarts/lib/coord/cartesian/Grid.js +376 -0
  453. package/lib/node_modules/echarts/lib/coord/cartesian/GridModel.js +34 -0
  454. package/lib/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +67 -0
  455. package/lib/node_modules/echarts/lib/coord/geo/Region.js +231 -0
  456. package/lib/node_modules/echarts/lib/coord/geo/parseGeoJson.js +94 -0
  457. package/lib/node_modules/echarts/lib/coord/radar/IndicatorAxis.js +19 -0
  458. package/lib/node_modules/echarts/lib/coord/radar/Radar.js +138 -0
  459. package/lib/node_modules/echarts/lib/coord/radar/RadarModel.js +116 -0
  460. package/lib/node_modules/echarts/lib/coord/scaleRawExtentInfo.js +134 -0
  461. package/lib/node_modules/echarts/lib/core/CoordinateSystem.js +36 -0
  462. package/lib/node_modules/echarts/lib/core/ExtensionAPI.js +35 -0
  463. package/lib/node_modules/echarts/lib/core/Scheduler.js +350 -0
  464. package/lib/node_modules/echarts/lib/core/echarts.js +1781 -0
  465. package/lib/node_modules/echarts/lib/core/impl.js +11 -0
  466. package/lib/node_modules/echarts/lib/core/lifecycle.js +5 -0
  467. package/lib/node_modules/echarts/lib/core/locale.js +49 -0
  468. package/lib/node_modules/echarts/lib/core/task.js +171 -0
  469. package/lib/node_modules/echarts/lib/data/DataDiffer.js +153 -0
  470. package/lib/node_modules/echarts/lib/data/DataStore.js +820 -0
  471. package/lib/node_modules/echarts/lib/data/OrdinalMeta.js +65 -0
  472. package/lib/node_modules/echarts/lib/data/SeriesData.js +647 -0
  473. package/lib/node_modules/echarts/lib/data/SeriesDimensionDefine.js +16 -0
  474. package/lib/node_modules/echarts/lib/data/Source.js +211 -0
  475. package/lib/node_modules/echarts/lib/data/helper/SeriesDataSchema.js +144 -0
  476. package/lib/node_modules/echarts/lib/data/helper/createDimensions.js +215 -0
  477. package/lib/node_modules/echarts/lib/data/helper/dataProvider.js +226 -0
  478. package/lib/node_modules/echarts/lib/data/helper/dataStackHelper.js +107 -0
  479. package/lib/node_modules/echarts/lib/data/helper/dataValueHelper.js +126 -0
  480. package/lib/node_modules/echarts/lib/data/helper/dimensionHelper.js +100 -0
  481. package/lib/node_modules/echarts/lib/data/helper/sourceHelper.js +242 -0
  482. package/lib/node_modules/echarts/lib/data/helper/sourceManager.js +222 -0
  483. package/lib/node_modules/echarts/lib/data/helper/transform.js +247 -0
  484. package/lib/node_modules/echarts/lib/export/api/format.js +16 -0
  485. package/lib/node_modules/echarts/lib/export/api/graphic.js +54 -0
  486. package/lib/node_modules/echarts/lib/export/api/helper.js +49 -0
  487. package/lib/node_modules/echarts/lib/export/api/number.js +21 -0
  488. package/lib/node_modules/echarts/lib/export/api/time.js +6 -0
  489. package/lib/node_modules/echarts/lib/export/api/util.js +19 -0
  490. package/lib/node_modules/echarts/lib/export/api.js +34 -0
  491. package/lib/node_modules/echarts/lib/extension.js +69 -0
  492. package/lib/node_modules/echarts/lib/i18n/langEN.js +114 -0
  493. package/lib/node_modules/echarts/lib/i18n/langZH.js +114 -0
  494. package/lib/node_modules/echarts/lib/label/labelGuideHelper.js +215 -0
  495. package/lib/node_modules/echarts/lib/label/labelLayoutHelper.js +215 -0
  496. package/lib/node_modules/echarts/lib/label/labelStyle.js +330 -0
  497. package/lib/node_modules/echarts/lib/label/sectorLabel.js +152 -0
  498. package/lib/node_modules/echarts/lib/layout/barGrid.js +368 -0
  499. package/lib/node_modules/echarts/lib/layout/points.js +59 -0
  500. package/lib/node_modules/echarts/lib/legacy/dataSelectAction.js +68 -0
  501. package/lib/node_modules/echarts/lib/legacy/getTextRect.js +20 -0
  502. package/lib/node_modules/echarts/lib/loading/default.js +108 -0
  503. package/lib/node_modules/echarts/lib/model/Component.js +118 -0
  504. package/lib/node_modules/echarts/lib/model/Global.js +471 -0
  505. package/lib/node_modules/echarts/lib/model/Model.js +102 -0
  506. package/lib/node_modules/echarts/lib/model/OptionManager.js +179 -0
  507. package/lib/node_modules/echarts/lib/model/Series.js +375 -0
  508. package/lib/node_modules/echarts/lib/model/globalDefault.js +89 -0
  509. package/lib/node_modules/echarts/lib/model/internalComponentCreator.js +16 -0
  510. package/lib/node_modules/echarts/lib/model/mixin/areaStyle.js +27 -0
  511. package/lib/node_modules/echarts/lib/model/mixin/dataFormat.js +108 -0
  512. package/lib/node_modules/echarts/lib/model/mixin/itemStyle.js +34 -0
  513. package/lib/node_modules/echarts/lib/model/mixin/lineStyle.js +33 -0
  514. package/lib/node_modules/echarts/lib/model/mixin/makeStyleMapper.js +26 -0
  515. package/lib/node_modules/echarts/lib/model/mixin/palette.js +55 -0
  516. package/lib/node_modules/echarts/lib/model/mixin/textStyle.js +40 -0
  517. package/lib/node_modules/echarts/lib/model/referHelper.js +90 -0
  518. package/lib/node_modules/echarts/lib/preprocessor/backwardCompat.js +178 -0
  519. package/lib/node_modules/echarts/lib/preprocessor/helper/compatStyle.js +239 -0
  520. package/lib/node_modules/echarts/lib/processor/dataFilter.js +26 -0
  521. package/lib/node_modules/echarts/lib/processor/dataSample.js +83 -0
  522. package/lib/node_modules/echarts/lib/processor/dataStack.js +73 -0
  523. package/lib/node_modules/echarts/lib/processor/negativeDataFilter.js +20 -0
  524. package/lib/node_modules/echarts/lib/renderer/installCanvasRenderer.js +7 -0
  525. package/lib/node_modules/echarts/lib/scale/Interval.js +191 -0
  526. package/lib/node_modules/echarts/lib/scale/Log.js +120 -0
  527. package/lib/node_modules/echarts/lib/scale/Ordinal.js +124 -0
  528. package/lib/node_modules/echarts/lib/scale/Scale.js +47 -0
  529. package/lib/node_modules/echarts/lib/scale/Time.js +373 -0
  530. package/lib/node_modules/echarts/lib/scale/helper.js +70 -0
  531. package/lib/node_modules/echarts/lib/theme/dark.js +184 -0
  532. package/lib/node_modules/echarts/lib/theme/light.js +8 -0
  533. package/lib/node_modules/echarts/lib/util/ECEventProcessor.js +79 -0
  534. package/lib/node_modules/echarts/lib/util/clazz.js +149 -0
  535. package/lib/node_modules/echarts/lib/util/component.js +112 -0
  536. package/lib/node_modules/echarts/lib/util/conditionalExpression.js +218 -0
  537. package/lib/node_modules/echarts/lib/util/decal.js +280 -0
  538. package/lib/node_modules/echarts/lib/util/event.js +16 -0
  539. package/lib/node_modules/echarts/lib/util/format.js +148 -0
  540. package/lib/node_modules/echarts/lib/util/graphic.js +377 -0
  541. package/lib/node_modules/echarts/lib/util/innerStore.js +24 -0
  542. package/lib/node_modules/echarts/lib/util/layout.js +248 -0
  543. package/lib/node_modules/echarts/lib/util/log.js +6 -0
  544. package/lib/node_modules/echarts/lib/util/model.js +385 -0
  545. package/lib/node_modules/echarts/lib/util/number.js +322 -0
  546. package/lib/node_modules/echarts/lib/util/shape/sausage.js +67 -0
  547. package/lib/node_modules/echarts/lib/util/states.js +558 -0
  548. package/lib/node_modules/echarts/lib/util/styleCompat.js +75 -0
  549. package/lib/node_modules/echarts/lib/util/symbol.js +266 -0
  550. package/lib/node_modules/echarts/lib/util/throttle.js +84 -0
  551. package/lib/node_modules/echarts/lib/util/time.js +254 -0
  552. package/lib/node_modules/echarts/lib/util/types.js +21 -0
  553. package/lib/node_modules/echarts/lib/util/vendor.js +12 -0
  554. package/lib/node_modules/echarts/lib/view/Chart.js +127 -0
  555. package/lib/node_modules/echarts/lib/view/Component.js +38 -0
  556. package/lib/node_modules/echarts/lib/visual/LegendVisualProvider.js +29 -0
  557. package/lib/node_modules/echarts/lib/visual/decal.js +26 -0
  558. package/lib/node_modules/echarts/lib/visual/helper.js +30 -0
  559. package/lib/node_modules/echarts/lib/visual/style.js +159 -0
  560. package/lib/node_modules/echarts/lib/visual/symbol.js +81 -0
  561. package/lib/node_modules/grid-layout-plus/es/components/grid-item.vue.js +32 -2
  562. package/lib/node_modules/grid-layout-plus/es/index.js +4 -1
  563. package/lib/node_modules/layout-base/layout-base.js +3197 -0
  564. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.js +1 -1
  565. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.js +1 -1
  566. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.js +1 -1
  567. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.js +1 -1
  568. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.js +1 -1
  569. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.js +1 -1
  570. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.js +1 -1
  571. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.js +1 -1
  572. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.js +1 -1
  573. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.js +1 -1
  574. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.js +1 -1
  575. package/lib/node_modules/object-refs/index.js +1 -1
  576. package/lib/node_modules/tslib/tslib.es6.js +34 -0
  577. package/lib/node_modules/zrender/lib/Element.js +974 -0
  578. package/lib/node_modules/zrender/lib/Handler.js +295 -0
  579. package/lib/node_modules/zrender/lib/Storage.js +156 -0
  580. package/lib/node_modules/zrender/lib/animation/Animation.js +146 -0
  581. package/lib/node_modules/zrender/lib/animation/Animator.js +701 -0
  582. package/lib/node_modules/zrender/lib/animation/Clip.js +63 -0
  583. package/lib/node_modules/zrender/lib/animation/cubicEasing.js +23 -0
  584. package/lib/node_modules/zrender/lib/animation/easing.js +187 -0
  585. package/lib/node_modules/zrender/lib/animation/requestAnimationFrame.js +7 -0
  586. package/lib/node_modules/zrender/lib/canvas/Layer.js +286 -0
  587. package/lib/node_modules/zrender/lib/canvas/Painter.js +610 -0
  588. package/lib/node_modules/zrender/lib/canvas/dashStyle.js +26 -0
  589. package/lib/node_modules/zrender/lib/canvas/graphic.js +521 -0
  590. package/lib/node_modules/zrender/lib/canvas/helper.js +82 -0
  591. package/lib/node_modules/zrender/lib/config.js +17 -0
  592. package/lib/node_modules/zrender/lib/contain/arc.js +36 -0
  593. package/lib/node_modules/zrender/lib/contain/cubic.js +15 -0
  594. package/lib/node_modules/zrender/lib/contain/line.js +23 -0
  595. package/lib/node_modules/zrender/lib/contain/path.js +289 -0
  596. package/lib/node_modules/zrender/lib/contain/polygon.js +25 -0
  597. package/lib/node_modules/zrender/lib/contain/quadratic.js +15 -0
  598. package/lib/node_modules/zrender/lib/contain/text.js +173 -0
  599. package/lib/node_modules/zrender/lib/contain/util.js +11 -0
  600. package/lib/node_modules/zrender/lib/contain/windingLine.js +18 -0
  601. package/lib/node_modules/zrender/lib/core/BoundingRect.js +203 -0
  602. package/lib/node_modules/zrender/lib/core/Eventful.js +153 -0
  603. package/lib/node_modules/zrender/lib/core/GestureMgr.js +81 -0
  604. package/lib/node_modules/zrender/lib/core/LRU.js +108 -0
  605. package/lib/node_modules/zrender/lib/core/OrientedBoundingRect.js +119 -0
  606. package/lib/node_modules/zrender/lib/core/PathProxy.js +693 -0
  607. package/lib/node_modules/zrender/lib/core/Point.js +131 -0
  608. package/lib/node_modules/zrender/lib/core/Transformable.js +236 -0
  609. package/lib/node_modules/zrender/lib/core/WeakMap.js +43 -0
  610. package/lib/node_modules/zrender/lib/core/bbox.js +108 -0
  611. package/lib/node_modules/zrender/lib/core/curve.js +336 -0
  612. package/lib/node_modules/zrender/lib/core/dom.js +92 -0
  613. package/lib/node_modules/zrender/lib/core/env.js +71 -0
  614. package/lib/node_modules/zrender/lib/core/event.js +96 -0
  615. package/lib/node_modules/zrender/lib/core/fourPointsTransform.js +59 -0
  616. package/lib/node_modules/zrender/lib/core/matrix.js +112 -0
  617. package/lib/node_modules/zrender/lib/core/platform.js +77 -0
  618. package/lib/node_modules/zrender/lib/core/timsort.js +510 -0
  619. package/lib/node_modules/zrender/lib/core/util.js +559 -0
  620. package/lib/node_modules/zrender/lib/core/vector.js +136 -0
  621. package/lib/node_modules/zrender/lib/dom/HandlerProxy.js +300 -0
  622. package/lib/node_modules/zrender/lib/graphic/CompoundPath.js +51 -0
  623. package/lib/node_modules/zrender/lib/graphic/Displayable.js +314 -0
  624. package/lib/node_modules/zrender/lib/graphic/Gradient.js +15 -0
  625. package/lib/node_modules/zrender/lib/graphic/Group.js +174 -0
  626. package/lib/node_modules/zrender/lib/graphic/Image.js +73 -0
  627. package/lib/node_modules/zrender/lib/graphic/IncrementalDisplayable.js +113 -0
  628. package/lib/node_modules/zrender/lib/graphic/LinearGradient.js +19 -0
  629. package/lib/node_modules/zrender/lib/graphic/Path.js +393 -0
  630. package/lib/node_modules/zrender/lib/graphic/RadialGradient.js +18 -0
  631. package/lib/node_modules/zrender/lib/graphic/TSpan.js +66 -0
  632. package/lib/node_modules/zrender/lib/graphic/Text.js +503 -0
  633. package/lib/node_modules/zrender/lib/graphic/constants.js +8 -0
  634. package/lib/node_modules/zrender/lib/graphic/helper/image.js +55 -0
  635. package/lib/node_modules/zrender/lib/graphic/helper/parseText.js +474 -0
  636. package/lib/node_modules/zrender/lib/graphic/helper/poly.js +27 -0
  637. package/lib/node_modules/zrender/lib/graphic/helper/roundRect.js +73 -0
  638. package/lib/node_modules/zrender/lib/graphic/helper/roundSector.js +218 -0
  639. package/lib/node_modules/zrender/lib/graphic/helper/smoothBezier.js +64 -0
  640. package/lib/node_modules/zrender/lib/graphic/helper/subPixelOptimize.js +59 -0
  641. package/lib/node_modules/zrender/lib/graphic/shape/Arc.js +46 -0
  642. package/lib/node_modules/zrender/lib/graphic/shape/BezierCurve.js +98 -0
  643. package/lib/node_modules/zrender/lib/graphic/shape/Circle.js +29 -0
  644. package/lib/node_modules/zrender/lib/graphic/shape/Ellipse.js +41 -0
  645. package/lib/node_modules/zrender/lib/graphic/shape/Line.js +70 -0
  646. package/lib/node_modules/zrender/lib/graphic/shape/Polygon.js +29 -0
  647. package/lib/node_modules/zrender/lib/graphic/shape/Polyline.js +36 -0
  648. package/lib/node_modules/zrender/lib/graphic/shape/Rect.js +57 -0
  649. package/lib/node_modules/zrender/lib/graphic/shape/Ring.js +35 -0
  650. package/lib/node_modules/zrender/lib/graphic/shape/Sector.js +37 -0
  651. package/lib/node_modules/zrender/lib/mixin/Draggable.js +68 -0
  652. package/lib/node_modules/zrender/lib/svg/helper.js +27 -0
  653. package/lib/node_modules/zrender/lib/tool/color.js +501 -0
  654. package/lib/node_modules/zrender/lib/tool/path.js +338 -0
  655. package/lib/node_modules/zrender/lib/tool/transformPath.js +84 -0
  656. package/lib/node_modules/zrender/lib/zrender.js +323 -0
  657. package/lib/packages/mobile/index.js +129 -112
  658. package/lib/packages/mobile/src/components/all.js +127 -110
  659. package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
  660. package/lib/packages/mobile/src/components/custom/aiAssistant/AiAssistant.vue.js +91 -0
  661. package/lib/packages/mobile/src/components/custom/aiAssistant/index.js +10 -0
  662. package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +25 -16
  663. package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +7 -3
  664. package/lib/packages/mobile/src/components/custom/document/Document.vue.js +2 -2
  665. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardLayoutRenderer.vue.js +246 -0
  666. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +59 -9
  667. package/lib/packages/mobile/src/components/dataDisplay/cardList/index.js +2 -0
  668. package/lib/packages/mobile/src/components/dataDisplay/cardList/layoutDefinitions.js +77 -0
  669. package/lib/packages/mobile/src/components/dataDisplay/chart/Chart.vue.js +314 -0
  670. package/lib/packages/mobile/src/components/dataDisplay/chart/formatters.js +20 -0
  671. package/lib/packages/mobile/src/components/dataDisplay/chart/index.js +7 -0
  672. package/lib/packages/mobile/src/components/dataDisplay/chart/optionBuilder.js +340 -0
  673. package/lib/packages/mobile/src/components/dataDisplay/chart/presets.js +29 -0
  674. package/lib/packages/mobile/src/components/dataDisplay/chart/useEcharts.js +42 -0
  675. package/lib/packages/mobile/src/components/form/fieldDrawerSelect/FieldDrawerSelect.vue.js +676 -0
  676. package/lib/packages/mobile/src/components/form/fieldDrawerSelect/index.js +10 -0
  677. package/lib/packages/mobile/src/components/navigation/anchorNav/AnchorNav.vue.js +101 -0
  678. package/lib/packages/mobile/src/components/navigation/anchorNav/index.js +7 -0
  679. package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +2 -2
  680. package/lib/packages/mobile/src/index.vue.js +24 -74
  681. package/lib/packages/mobile/src/page.vue.js +79 -37
  682. package/lib/packages/mobile/src/utils/idea/vue3sfc.js +49 -2
  683. package/lib/packages/vue/src/components/bus/flowChart/bpmnjs/component/NodeItem.vue.js +1 -1
  684. package/lib/packages/vue/src/components/bus/flowChart/bpmnjs/component/timeline.vue.js +1 -1
  685. package/lib/packages/vue/src/components/forms/form/Form.vue.js +183 -39
  686. package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +11 -1
  687. package/package.json +1 -1
@@ -0,0 +1,3197 @@
1
+ import { __module as layoutBase$1 } from "../../_virtual/layout-base2.mjs";
2
+ var layoutBase = layoutBase$1.exports;
3
+ var hasRequiredLayoutBase;
4
+ function requireLayoutBase() {
5
+ if (hasRequiredLayoutBase) return layoutBase$1.exports;
6
+ hasRequiredLayoutBase = 1;
7
+ (function(module, exports) {
8
+ (function webpackUniversalModuleDefinition(root, factory) {
9
+ module.exports = factory();
10
+ })(layoutBase, function() {
11
+ return (
12
+ /******/
13
+ function(modules) {
14
+ var installedModules = {};
15
+ function __webpack_require__(moduleId) {
16
+ if (installedModules[moduleId]) {
17
+ return installedModules[moduleId].exports;
18
+ }
19
+ var module2 = installedModules[moduleId] = {
20
+ /******/
21
+ i: moduleId,
22
+ /******/
23
+ l: false,
24
+ /******/
25
+ exports: {}
26
+ /******/
27
+ };
28
+ modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__);
29
+ module2.l = true;
30
+ return module2.exports;
31
+ }
32
+ __webpack_require__.m = modules;
33
+ __webpack_require__.c = installedModules;
34
+ __webpack_require__.i = function(value) {
35
+ return value;
36
+ };
37
+ __webpack_require__.d = function(exports2, name, getter) {
38
+ if (!__webpack_require__.o(exports2, name)) {
39
+ Object.defineProperty(exports2, name, {
40
+ /******/
41
+ configurable: false,
42
+ /******/
43
+ enumerable: true,
44
+ /******/
45
+ get: getter
46
+ /******/
47
+ });
48
+ }
49
+ };
50
+ __webpack_require__.n = function(module2) {
51
+ var getter = module2 && module2.__esModule ? (
52
+ /******/
53
+ function getDefault() {
54
+ return module2["default"];
55
+ }
56
+ ) : (
57
+ /******/
58
+ function getModuleExports() {
59
+ return module2;
60
+ }
61
+ );
62
+ __webpack_require__.d(getter, "a", getter);
63
+ return getter;
64
+ };
65
+ __webpack_require__.o = function(object, property) {
66
+ return Object.prototype.hasOwnProperty.call(object, property);
67
+ };
68
+ __webpack_require__.p = "";
69
+ return __webpack_require__(__webpack_require__.s = 26);
70
+ }([
71
+ /* 0 */
72
+ /***/
73
+ function(module2, exports2, __webpack_require__) {
74
+ function LayoutConstants() {
75
+ }
76
+ LayoutConstants.QUALITY = 1;
77
+ LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;
78
+ LayoutConstants.DEFAULT_INCREMENTAL = false;
79
+ LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;
80
+ LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;
81
+ LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;
82
+ LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;
83
+ LayoutConstants.DEFAULT_GRAPH_MARGIN = 15;
84
+ LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;
85
+ LayoutConstants.SIMPLE_NODE_SIZE = 40;
86
+ LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;
87
+ LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;
88
+ LayoutConstants.MIN_EDGE_LENGTH = 1;
89
+ LayoutConstants.WORLD_BOUNDARY = 1e6;
90
+ LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1e3;
91
+ LayoutConstants.WORLD_CENTER_X = 1200;
92
+ LayoutConstants.WORLD_CENTER_Y = 900;
93
+ module2.exports = LayoutConstants;
94
+ },
95
+ /* 1 */
96
+ /***/
97
+ function(module2, exports2, __webpack_require__) {
98
+ var LGraphObject = __webpack_require__(2);
99
+ var IGeometry = __webpack_require__(8);
100
+ var IMath = __webpack_require__(9);
101
+ function LEdge(source, target, vEdge) {
102
+ LGraphObject.call(this, vEdge);
103
+ this.isOverlapingSourceAndTarget = false;
104
+ this.vGraphObject = vEdge;
105
+ this.bendpoints = [];
106
+ this.source = source;
107
+ this.target = target;
108
+ }
109
+ LEdge.prototype = Object.create(LGraphObject.prototype);
110
+ for (var prop in LGraphObject) {
111
+ LEdge[prop] = LGraphObject[prop];
112
+ }
113
+ LEdge.prototype.getSource = function() {
114
+ return this.source;
115
+ };
116
+ LEdge.prototype.getTarget = function() {
117
+ return this.target;
118
+ };
119
+ LEdge.prototype.isInterGraph = function() {
120
+ return this.isInterGraph;
121
+ };
122
+ LEdge.prototype.getLength = function() {
123
+ return this.length;
124
+ };
125
+ LEdge.prototype.isOverlapingSourceAndTarget = function() {
126
+ return this.isOverlapingSourceAndTarget;
127
+ };
128
+ LEdge.prototype.getBendpoints = function() {
129
+ return this.bendpoints;
130
+ };
131
+ LEdge.prototype.getLca = function() {
132
+ return this.lca;
133
+ };
134
+ LEdge.prototype.getSourceInLca = function() {
135
+ return this.sourceInLca;
136
+ };
137
+ LEdge.prototype.getTargetInLca = function() {
138
+ return this.targetInLca;
139
+ };
140
+ LEdge.prototype.getOtherEnd = function(node) {
141
+ if (this.source === node) {
142
+ return this.target;
143
+ } else if (this.target === node) {
144
+ return this.source;
145
+ } else {
146
+ throw "Node is not incident with this edge";
147
+ }
148
+ };
149
+ LEdge.prototype.getOtherEndInGraph = function(node, graph) {
150
+ var otherEnd = this.getOtherEnd(node);
151
+ var root = graph.getGraphManager().getRoot();
152
+ while (true) {
153
+ if (otherEnd.getOwner() == graph) {
154
+ return otherEnd;
155
+ }
156
+ if (otherEnd.getOwner() == root) {
157
+ break;
158
+ }
159
+ otherEnd = otherEnd.getOwner().getParent();
160
+ }
161
+ return null;
162
+ };
163
+ LEdge.prototype.updateLength = function() {
164
+ var clipPointCoordinates = new Array(4);
165
+ this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates);
166
+ if (!this.isOverlapingSourceAndTarget) {
167
+ this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];
168
+ this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];
169
+ if (Math.abs(this.lengthX) < 1) {
170
+ this.lengthX = IMath.sign(this.lengthX);
171
+ }
172
+ if (Math.abs(this.lengthY) < 1) {
173
+ this.lengthY = IMath.sign(this.lengthY);
174
+ }
175
+ this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
176
+ }
177
+ };
178
+ LEdge.prototype.updateLengthSimple = function() {
179
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX();
180
+ this.lengthY = this.target.getCenterY() - this.source.getCenterY();
181
+ if (Math.abs(this.lengthX) < 1) {
182
+ this.lengthX = IMath.sign(this.lengthX);
183
+ }
184
+ if (Math.abs(this.lengthY) < 1) {
185
+ this.lengthY = IMath.sign(this.lengthY);
186
+ }
187
+ this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
188
+ };
189
+ module2.exports = LEdge;
190
+ },
191
+ /* 2 */
192
+ /***/
193
+ function(module2, exports2, __webpack_require__) {
194
+ function LGraphObject(vGraphObject) {
195
+ this.vGraphObject = vGraphObject;
196
+ }
197
+ module2.exports = LGraphObject;
198
+ },
199
+ /* 3 */
200
+ /***/
201
+ function(module2, exports2, __webpack_require__) {
202
+ var LGraphObject = __webpack_require__(2);
203
+ var Integer = __webpack_require__(10);
204
+ var RectangleD = __webpack_require__(13);
205
+ var LayoutConstants = __webpack_require__(0);
206
+ var RandomSeed = __webpack_require__(16);
207
+ var PointD = __webpack_require__(4);
208
+ function LNode(gm, loc, size, vNode) {
209
+ if (size == null && vNode == null) {
210
+ vNode = loc;
211
+ }
212
+ LGraphObject.call(this, vNode);
213
+ if (gm.graphManager != null) gm = gm.graphManager;
214
+ this.estimatedSize = Integer.MIN_VALUE;
215
+ this.inclusionTreeDepth = Integer.MAX_VALUE;
216
+ this.vGraphObject = vNode;
217
+ this.edges = [];
218
+ this.graphManager = gm;
219
+ if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);
220
+ else this.rect = new RectangleD();
221
+ }
222
+ LNode.prototype = Object.create(LGraphObject.prototype);
223
+ for (var prop in LGraphObject) {
224
+ LNode[prop] = LGraphObject[prop];
225
+ }
226
+ LNode.prototype.getEdges = function() {
227
+ return this.edges;
228
+ };
229
+ LNode.prototype.getChild = function() {
230
+ return this.child;
231
+ };
232
+ LNode.prototype.getOwner = function() {
233
+ return this.owner;
234
+ };
235
+ LNode.prototype.getWidth = function() {
236
+ return this.rect.width;
237
+ };
238
+ LNode.prototype.setWidth = function(width) {
239
+ this.rect.width = width;
240
+ };
241
+ LNode.prototype.getHeight = function() {
242
+ return this.rect.height;
243
+ };
244
+ LNode.prototype.setHeight = function(height) {
245
+ this.rect.height = height;
246
+ };
247
+ LNode.prototype.getCenterX = function() {
248
+ return this.rect.x + this.rect.width / 2;
249
+ };
250
+ LNode.prototype.getCenterY = function() {
251
+ return this.rect.y + this.rect.height / 2;
252
+ };
253
+ LNode.prototype.getCenter = function() {
254
+ return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
255
+ };
256
+ LNode.prototype.getLocation = function() {
257
+ return new PointD(this.rect.x, this.rect.y);
258
+ };
259
+ LNode.prototype.getRect = function() {
260
+ return this.rect;
261
+ };
262
+ LNode.prototype.getDiagonal = function() {
263
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
264
+ };
265
+ LNode.prototype.getHalfTheDiagonal = function() {
266
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
267
+ };
268
+ LNode.prototype.setRect = function(upperLeft, dimension) {
269
+ this.rect.x = upperLeft.x;
270
+ this.rect.y = upperLeft.y;
271
+ this.rect.width = dimension.width;
272
+ this.rect.height = dimension.height;
273
+ };
274
+ LNode.prototype.setCenter = function(cx, cy) {
275
+ this.rect.x = cx - this.rect.width / 2;
276
+ this.rect.y = cy - this.rect.height / 2;
277
+ };
278
+ LNode.prototype.setLocation = function(x, y) {
279
+ this.rect.x = x;
280
+ this.rect.y = y;
281
+ };
282
+ LNode.prototype.moveBy = function(dx, dy) {
283
+ this.rect.x += dx;
284
+ this.rect.y += dy;
285
+ };
286
+ LNode.prototype.getEdgeListToNode = function(to) {
287
+ var edgeList = [];
288
+ var self = this;
289
+ self.edges.forEach(function(edge) {
290
+ if (edge.target == to) {
291
+ if (edge.source != self) throw "Incorrect edge source!";
292
+ edgeList.push(edge);
293
+ }
294
+ });
295
+ return edgeList;
296
+ };
297
+ LNode.prototype.getEdgesBetween = function(other) {
298
+ var edgeList = [];
299
+ var self = this;
300
+ self.edges.forEach(function(edge) {
301
+ if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target";
302
+ if (edge.target == other || edge.source == other) {
303
+ edgeList.push(edge);
304
+ }
305
+ });
306
+ return edgeList;
307
+ };
308
+ LNode.prototype.getNeighborsList = function() {
309
+ var neighbors = /* @__PURE__ */ new Set();
310
+ var self = this;
311
+ self.edges.forEach(function(edge) {
312
+ if (edge.source == self) {
313
+ neighbors.add(edge.target);
314
+ } else {
315
+ if (edge.target != self) {
316
+ throw "Incorrect incidency!";
317
+ }
318
+ neighbors.add(edge.source);
319
+ }
320
+ });
321
+ return neighbors;
322
+ };
323
+ LNode.prototype.withChildren = function() {
324
+ var withNeighborsList = /* @__PURE__ */ new Set();
325
+ var childNode;
326
+ var children;
327
+ withNeighborsList.add(this);
328
+ if (this.child != null) {
329
+ var nodes = this.child.getNodes();
330
+ for (var i = 0; i < nodes.length; i++) {
331
+ childNode = nodes[i];
332
+ children = childNode.withChildren();
333
+ children.forEach(function(node) {
334
+ withNeighborsList.add(node);
335
+ });
336
+ }
337
+ }
338
+ return withNeighborsList;
339
+ };
340
+ LNode.prototype.getNoOfChildren = function() {
341
+ var noOfChildren = 0;
342
+ var childNode;
343
+ if (this.child == null) {
344
+ noOfChildren = 1;
345
+ } else {
346
+ var nodes = this.child.getNodes();
347
+ for (var i = 0; i < nodes.length; i++) {
348
+ childNode = nodes[i];
349
+ noOfChildren += childNode.getNoOfChildren();
350
+ }
351
+ }
352
+ if (noOfChildren == 0) {
353
+ noOfChildren = 1;
354
+ }
355
+ return noOfChildren;
356
+ };
357
+ LNode.prototype.getEstimatedSize = function() {
358
+ if (this.estimatedSize == Integer.MIN_VALUE) {
359
+ throw "assert failed";
360
+ }
361
+ return this.estimatedSize;
362
+ };
363
+ LNode.prototype.calcEstimatedSize = function() {
364
+ if (this.child == null) {
365
+ return this.estimatedSize = (this.rect.width + this.rect.height) / 2;
366
+ } else {
367
+ this.estimatedSize = this.child.calcEstimatedSize();
368
+ this.rect.width = this.estimatedSize;
369
+ this.rect.height = this.estimatedSize;
370
+ return this.estimatedSize;
371
+ }
372
+ };
373
+ LNode.prototype.scatter = function() {
374
+ var randomCenterX;
375
+ var randomCenterY;
376
+ var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
377
+ var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;
378
+ randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX;
379
+ var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
380
+ var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;
381
+ randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY;
382
+ this.rect.x = randomCenterX;
383
+ this.rect.y = randomCenterY;
384
+ };
385
+ LNode.prototype.updateBounds = function() {
386
+ if (this.getChild() == null) {
387
+ throw "assert failed";
388
+ }
389
+ if (this.getChild().getNodes().length != 0) {
390
+ var childGraph = this.getChild();
391
+ childGraph.updateBounds(true);
392
+ this.rect.x = childGraph.getLeft();
393
+ this.rect.y = childGraph.getTop();
394
+ this.setWidth(childGraph.getRight() - childGraph.getLeft());
395
+ this.setHeight(childGraph.getBottom() - childGraph.getTop());
396
+ if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {
397
+ var width = childGraph.getRight() - childGraph.getLeft();
398
+ var height = childGraph.getBottom() - childGraph.getTop();
399
+ if (this.labelWidth > width) {
400
+ this.rect.x -= (this.labelWidth - width) / 2;
401
+ this.setWidth(this.labelWidth);
402
+ }
403
+ if (this.labelHeight > height) {
404
+ if (this.labelPos == "center") {
405
+ this.rect.y -= (this.labelHeight - height) / 2;
406
+ } else if (this.labelPos == "top") {
407
+ this.rect.y -= this.labelHeight - height;
408
+ }
409
+ this.setHeight(this.labelHeight);
410
+ }
411
+ }
412
+ }
413
+ };
414
+ LNode.prototype.getInclusionTreeDepth = function() {
415
+ if (this.inclusionTreeDepth == Integer.MAX_VALUE) {
416
+ throw "assert failed";
417
+ }
418
+ return this.inclusionTreeDepth;
419
+ };
420
+ LNode.prototype.transform = function(trans) {
421
+ var left = this.rect.x;
422
+ if (left > LayoutConstants.WORLD_BOUNDARY) {
423
+ left = LayoutConstants.WORLD_BOUNDARY;
424
+ } else if (left < -LayoutConstants.WORLD_BOUNDARY) {
425
+ left = -LayoutConstants.WORLD_BOUNDARY;
426
+ }
427
+ var top = this.rect.y;
428
+ if (top > LayoutConstants.WORLD_BOUNDARY) {
429
+ top = LayoutConstants.WORLD_BOUNDARY;
430
+ } else if (top < -LayoutConstants.WORLD_BOUNDARY) {
431
+ top = -LayoutConstants.WORLD_BOUNDARY;
432
+ }
433
+ var leftTop = new PointD(left, top);
434
+ var vLeftTop = trans.inverseTransformPoint(leftTop);
435
+ this.setLocation(vLeftTop.x, vLeftTop.y);
436
+ };
437
+ LNode.prototype.getLeft = function() {
438
+ return this.rect.x;
439
+ };
440
+ LNode.prototype.getRight = function() {
441
+ return this.rect.x + this.rect.width;
442
+ };
443
+ LNode.prototype.getTop = function() {
444
+ return this.rect.y;
445
+ };
446
+ LNode.prototype.getBottom = function() {
447
+ return this.rect.y + this.rect.height;
448
+ };
449
+ LNode.prototype.getParent = function() {
450
+ if (this.owner == null) {
451
+ return null;
452
+ }
453
+ return this.owner.getParent();
454
+ };
455
+ module2.exports = LNode;
456
+ },
457
+ /* 4 */
458
+ /***/
459
+ function(module2, exports2, __webpack_require__) {
460
+ function PointD(x, y) {
461
+ if (x == null && y == null) {
462
+ this.x = 0;
463
+ this.y = 0;
464
+ } else {
465
+ this.x = x;
466
+ this.y = y;
467
+ }
468
+ }
469
+ PointD.prototype.getX = function() {
470
+ return this.x;
471
+ };
472
+ PointD.prototype.getY = function() {
473
+ return this.y;
474
+ };
475
+ PointD.prototype.setX = function(x) {
476
+ this.x = x;
477
+ };
478
+ PointD.prototype.setY = function(y) {
479
+ this.y = y;
480
+ };
481
+ PointD.prototype.getDifference = function(pt) {
482
+ return new DimensionD(this.x - pt.x, this.y - pt.y);
483
+ };
484
+ PointD.prototype.getCopy = function() {
485
+ return new PointD(this.x, this.y);
486
+ };
487
+ PointD.prototype.translate = function(dim) {
488
+ this.x += dim.width;
489
+ this.y += dim.height;
490
+ return this;
491
+ };
492
+ module2.exports = PointD;
493
+ },
494
+ /* 5 */
495
+ /***/
496
+ function(module2, exports2, __webpack_require__) {
497
+ var LGraphObject = __webpack_require__(2);
498
+ var Integer = __webpack_require__(10);
499
+ var LayoutConstants = __webpack_require__(0);
500
+ var LGraphManager = __webpack_require__(6);
501
+ var LNode = __webpack_require__(3);
502
+ var LEdge = __webpack_require__(1);
503
+ var RectangleD = __webpack_require__(13);
504
+ var Point2 = __webpack_require__(12);
505
+ var LinkedList = __webpack_require__(11);
506
+ function LGraph(parent, obj2, vGraph) {
507
+ LGraphObject.call(this, vGraph);
508
+ this.estimatedSize = Integer.MIN_VALUE;
509
+ this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;
510
+ this.edges = [];
511
+ this.nodes = [];
512
+ this.isConnected = false;
513
+ this.parent = parent;
514
+ if (obj2 != null && obj2 instanceof LGraphManager) {
515
+ this.graphManager = obj2;
516
+ } else if (obj2 != null && obj2 instanceof Layout) {
517
+ this.graphManager = obj2.graphManager;
518
+ }
519
+ }
520
+ LGraph.prototype = Object.create(LGraphObject.prototype);
521
+ for (var prop in LGraphObject) {
522
+ LGraph[prop] = LGraphObject[prop];
523
+ }
524
+ LGraph.prototype.getNodes = function() {
525
+ return this.nodes;
526
+ };
527
+ LGraph.prototype.getEdges = function() {
528
+ return this.edges;
529
+ };
530
+ LGraph.prototype.getGraphManager = function() {
531
+ return this.graphManager;
532
+ };
533
+ LGraph.prototype.getParent = function() {
534
+ return this.parent;
535
+ };
536
+ LGraph.prototype.getLeft = function() {
537
+ return this.left;
538
+ };
539
+ LGraph.prototype.getRight = function() {
540
+ return this.right;
541
+ };
542
+ LGraph.prototype.getTop = function() {
543
+ return this.top;
544
+ };
545
+ LGraph.prototype.getBottom = function() {
546
+ return this.bottom;
547
+ };
548
+ LGraph.prototype.isConnected = function() {
549
+ return this.isConnected;
550
+ };
551
+ LGraph.prototype.add = function(obj1, sourceNode, targetNode) {
552
+ if (sourceNode == null && targetNode == null) {
553
+ var newNode = obj1;
554
+ if (this.graphManager == null) {
555
+ throw "Graph has no graph mgr!";
556
+ }
557
+ if (this.getNodes().indexOf(newNode) > -1) {
558
+ throw "Node already in graph!";
559
+ }
560
+ newNode.owner = this;
561
+ this.getNodes().push(newNode);
562
+ return newNode;
563
+ } else {
564
+ var newEdge = obj1;
565
+ if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) {
566
+ throw "Source or target not in graph!";
567
+ }
568
+ if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) {
569
+ throw "Both owners must be this graph!";
570
+ }
571
+ if (sourceNode.owner != targetNode.owner) {
572
+ return null;
573
+ }
574
+ newEdge.source = sourceNode;
575
+ newEdge.target = targetNode;
576
+ newEdge.isInterGraph = false;
577
+ this.getEdges().push(newEdge);
578
+ sourceNode.edges.push(newEdge);
579
+ if (targetNode != sourceNode) {
580
+ targetNode.edges.push(newEdge);
581
+ }
582
+ return newEdge;
583
+ }
584
+ };
585
+ LGraph.prototype.remove = function(obj) {
586
+ var node = obj;
587
+ if (obj instanceof LNode) {
588
+ if (node == null) {
589
+ throw "Node is null!";
590
+ }
591
+ if (!(node.owner != null && node.owner == this)) {
592
+ throw "Owner graph is invalid!";
593
+ }
594
+ if (this.graphManager == null) {
595
+ throw "Owner graph manager is invalid!";
596
+ }
597
+ var edgesToBeRemoved = node.edges.slice();
598
+ var edge;
599
+ var s = edgesToBeRemoved.length;
600
+ for (var i = 0; i < s; i++) {
601
+ edge = edgesToBeRemoved[i];
602
+ if (edge.isInterGraph) {
603
+ this.graphManager.remove(edge);
604
+ } else {
605
+ edge.source.owner.remove(edge);
606
+ }
607
+ }
608
+ var index = this.nodes.indexOf(node);
609
+ if (index == -1) {
610
+ throw "Node not in owner node list!";
611
+ }
612
+ this.nodes.splice(index, 1);
613
+ } else if (obj instanceof LEdge) {
614
+ var edge = obj;
615
+ if (edge == null) {
616
+ throw "Edge is null!";
617
+ }
618
+ if (!(edge.source != null && edge.target != null)) {
619
+ throw "Source and/or target is null!";
620
+ }
621
+ if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) {
622
+ throw "Source and/or target owner is invalid!";
623
+ }
624
+ var sourceIndex = edge.source.edges.indexOf(edge);
625
+ var targetIndex = edge.target.edges.indexOf(edge);
626
+ if (!(sourceIndex > -1 && targetIndex > -1)) {
627
+ throw "Source and/or target doesn't know this edge!";
628
+ }
629
+ edge.source.edges.splice(sourceIndex, 1);
630
+ if (edge.target != edge.source) {
631
+ edge.target.edges.splice(targetIndex, 1);
632
+ }
633
+ var index = edge.source.owner.getEdges().indexOf(edge);
634
+ if (index == -1) {
635
+ throw "Not in owner's edge list!";
636
+ }
637
+ edge.source.owner.getEdges().splice(index, 1);
638
+ }
639
+ };
640
+ LGraph.prototype.updateLeftTop = function() {
641
+ var top = Integer.MAX_VALUE;
642
+ var left = Integer.MAX_VALUE;
643
+ var nodeTop;
644
+ var nodeLeft;
645
+ var margin;
646
+ var nodes = this.getNodes();
647
+ var s = nodes.length;
648
+ for (var i = 0; i < s; i++) {
649
+ var lNode = nodes[i];
650
+ nodeTop = lNode.getTop();
651
+ nodeLeft = lNode.getLeft();
652
+ if (top > nodeTop) {
653
+ top = nodeTop;
654
+ }
655
+ if (left > nodeLeft) {
656
+ left = nodeLeft;
657
+ }
658
+ }
659
+ if (top == Integer.MAX_VALUE) {
660
+ return null;
661
+ }
662
+ if (nodes[0].getParent().paddingLeft != void 0) {
663
+ margin = nodes[0].getParent().paddingLeft;
664
+ } else {
665
+ margin = this.margin;
666
+ }
667
+ this.left = left - margin;
668
+ this.top = top - margin;
669
+ return new Point2(this.left, this.top);
670
+ };
671
+ LGraph.prototype.updateBounds = function(recursive) {
672
+ var left = Integer.MAX_VALUE;
673
+ var right = -Integer.MAX_VALUE;
674
+ var top = Integer.MAX_VALUE;
675
+ var bottom = -Integer.MAX_VALUE;
676
+ var nodeLeft;
677
+ var nodeRight;
678
+ var nodeTop;
679
+ var nodeBottom;
680
+ var margin;
681
+ var nodes = this.nodes;
682
+ var s = nodes.length;
683
+ for (var i = 0; i < s; i++) {
684
+ var lNode = nodes[i];
685
+ if (recursive && lNode.child != null) {
686
+ lNode.updateBounds();
687
+ }
688
+ nodeLeft = lNode.getLeft();
689
+ nodeRight = lNode.getRight();
690
+ nodeTop = lNode.getTop();
691
+ nodeBottom = lNode.getBottom();
692
+ if (left > nodeLeft) {
693
+ left = nodeLeft;
694
+ }
695
+ if (right < nodeRight) {
696
+ right = nodeRight;
697
+ }
698
+ if (top > nodeTop) {
699
+ top = nodeTop;
700
+ }
701
+ if (bottom < nodeBottom) {
702
+ bottom = nodeBottom;
703
+ }
704
+ }
705
+ var boundingRect = new RectangleD(left, top, right - left, bottom - top);
706
+ if (left == Integer.MAX_VALUE) {
707
+ this.left = this.parent.getLeft();
708
+ this.right = this.parent.getRight();
709
+ this.top = this.parent.getTop();
710
+ this.bottom = this.parent.getBottom();
711
+ }
712
+ if (nodes[0].getParent().paddingLeft != void 0) {
713
+ margin = nodes[0].getParent().paddingLeft;
714
+ } else {
715
+ margin = this.margin;
716
+ }
717
+ this.left = boundingRect.x - margin;
718
+ this.right = boundingRect.x + boundingRect.width + margin;
719
+ this.top = boundingRect.y - margin;
720
+ this.bottom = boundingRect.y + boundingRect.height + margin;
721
+ };
722
+ LGraph.calculateBounds = function(nodes) {
723
+ var left = Integer.MAX_VALUE;
724
+ var right = -Integer.MAX_VALUE;
725
+ var top = Integer.MAX_VALUE;
726
+ var bottom = -Integer.MAX_VALUE;
727
+ var nodeLeft;
728
+ var nodeRight;
729
+ var nodeTop;
730
+ var nodeBottom;
731
+ var s = nodes.length;
732
+ for (var i = 0; i < s; i++) {
733
+ var lNode = nodes[i];
734
+ nodeLeft = lNode.getLeft();
735
+ nodeRight = lNode.getRight();
736
+ nodeTop = lNode.getTop();
737
+ nodeBottom = lNode.getBottom();
738
+ if (left > nodeLeft) {
739
+ left = nodeLeft;
740
+ }
741
+ if (right < nodeRight) {
742
+ right = nodeRight;
743
+ }
744
+ if (top > nodeTop) {
745
+ top = nodeTop;
746
+ }
747
+ if (bottom < nodeBottom) {
748
+ bottom = nodeBottom;
749
+ }
750
+ }
751
+ var boundingRect = new RectangleD(left, top, right - left, bottom - top);
752
+ return boundingRect;
753
+ };
754
+ LGraph.prototype.getInclusionTreeDepth = function() {
755
+ if (this == this.graphManager.getRoot()) {
756
+ return 1;
757
+ } else {
758
+ return this.parent.getInclusionTreeDepth();
759
+ }
760
+ };
761
+ LGraph.prototype.getEstimatedSize = function() {
762
+ if (this.estimatedSize == Integer.MIN_VALUE) {
763
+ throw "assert failed";
764
+ }
765
+ return this.estimatedSize;
766
+ };
767
+ LGraph.prototype.calcEstimatedSize = function() {
768
+ var size = 0;
769
+ var nodes = this.nodes;
770
+ var s = nodes.length;
771
+ for (var i = 0; i < s; i++) {
772
+ var lNode = nodes[i];
773
+ size += lNode.calcEstimatedSize();
774
+ }
775
+ if (size == 0) {
776
+ this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;
777
+ } else {
778
+ this.estimatedSize = size / Math.sqrt(this.nodes.length);
779
+ }
780
+ return this.estimatedSize;
781
+ };
782
+ LGraph.prototype.updateConnected = function() {
783
+ var self = this;
784
+ if (this.nodes.length == 0) {
785
+ this.isConnected = true;
786
+ return;
787
+ }
788
+ var queue = new LinkedList();
789
+ var visited = /* @__PURE__ */ new Set();
790
+ var currentNode = this.nodes[0];
791
+ var neighborEdges;
792
+ var currentNeighbor;
793
+ var childrenOfNode = currentNode.withChildren();
794
+ childrenOfNode.forEach(function(node) {
795
+ queue.push(node);
796
+ visited.add(node);
797
+ });
798
+ while (queue.length !== 0) {
799
+ currentNode = queue.shift();
800
+ neighborEdges = currentNode.getEdges();
801
+ var size = neighborEdges.length;
802
+ for (var i = 0; i < size; i++) {
803
+ var neighborEdge = neighborEdges[i];
804
+ currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this);
805
+ if (currentNeighbor != null && !visited.has(currentNeighbor)) {
806
+ var childrenOfNeighbor = currentNeighbor.withChildren();
807
+ childrenOfNeighbor.forEach(function(node) {
808
+ queue.push(node);
809
+ visited.add(node);
810
+ });
811
+ }
812
+ }
813
+ }
814
+ this.isConnected = false;
815
+ if (visited.size >= this.nodes.length) {
816
+ var noOfVisitedInThisGraph = 0;
817
+ visited.forEach(function(visitedNode) {
818
+ if (visitedNode.owner == self) {
819
+ noOfVisitedInThisGraph++;
820
+ }
821
+ });
822
+ if (noOfVisitedInThisGraph == this.nodes.length) {
823
+ this.isConnected = true;
824
+ }
825
+ }
826
+ };
827
+ module2.exports = LGraph;
828
+ },
829
+ /* 6 */
830
+ /***/
831
+ function(module2, exports2, __webpack_require__) {
832
+ var LGraph;
833
+ var LEdge = __webpack_require__(1);
834
+ function LGraphManager(layout) {
835
+ LGraph = __webpack_require__(5);
836
+ this.layout = layout;
837
+ this.graphs = [];
838
+ this.edges = [];
839
+ }
840
+ LGraphManager.prototype.addRoot = function() {
841
+ var ngraph = this.layout.newGraph();
842
+ var nnode = this.layout.newNode(null);
843
+ var root = this.add(ngraph, nnode);
844
+ this.setRootGraph(root);
845
+ return this.rootGraph;
846
+ };
847
+ LGraphManager.prototype.add = function(newGraph, parentNode, newEdge, sourceNode, targetNode) {
848
+ if (newEdge == null && sourceNode == null && targetNode == null) {
849
+ if (newGraph == null) {
850
+ throw "Graph is null!";
851
+ }
852
+ if (parentNode == null) {
853
+ throw "Parent node is null!";
854
+ }
855
+ if (this.graphs.indexOf(newGraph) > -1) {
856
+ throw "Graph already in this graph mgr!";
857
+ }
858
+ this.graphs.push(newGraph);
859
+ if (newGraph.parent != null) {
860
+ throw "Already has a parent!";
861
+ }
862
+ if (parentNode.child != null) {
863
+ throw "Already has a child!";
864
+ }
865
+ newGraph.parent = parentNode;
866
+ parentNode.child = newGraph;
867
+ return newGraph;
868
+ } else {
869
+ targetNode = newEdge;
870
+ sourceNode = parentNode;
871
+ newEdge = newGraph;
872
+ var sourceGraph = sourceNode.getOwner();
873
+ var targetGraph = targetNode.getOwner();
874
+ if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) {
875
+ throw "Source not in this graph mgr!";
876
+ }
877
+ if (!(targetGraph != null && targetGraph.getGraphManager() == this)) {
878
+ throw "Target not in this graph mgr!";
879
+ }
880
+ if (sourceGraph == targetGraph) {
881
+ newEdge.isInterGraph = false;
882
+ return sourceGraph.add(newEdge, sourceNode, targetNode);
883
+ } else {
884
+ newEdge.isInterGraph = true;
885
+ newEdge.source = sourceNode;
886
+ newEdge.target = targetNode;
887
+ if (this.edges.indexOf(newEdge) > -1) {
888
+ throw "Edge already in inter-graph edge list!";
889
+ }
890
+ this.edges.push(newEdge);
891
+ if (!(newEdge.source != null && newEdge.target != null)) {
892
+ throw "Edge source and/or target is null!";
893
+ }
894
+ if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) {
895
+ throw "Edge already in source and/or target incidency list!";
896
+ }
897
+ newEdge.source.edges.push(newEdge);
898
+ newEdge.target.edges.push(newEdge);
899
+ return newEdge;
900
+ }
901
+ }
902
+ };
903
+ LGraphManager.prototype.remove = function(lObj) {
904
+ if (lObj instanceof LGraph) {
905
+ var graph = lObj;
906
+ if (graph.getGraphManager() != this) {
907
+ throw "Graph not in this graph mgr";
908
+ }
909
+ if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) {
910
+ throw "Invalid parent node!";
911
+ }
912
+ var edgesToBeRemoved = [];
913
+ edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());
914
+ var edge;
915
+ var s = edgesToBeRemoved.length;
916
+ for (var i = 0; i < s; i++) {
917
+ edge = edgesToBeRemoved[i];
918
+ graph.remove(edge);
919
+ }
920
+ var nodesToBeRemoved = [];
921
+ nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());
922
+ var node;
923
+ s = nodesToBeRemoved.length;
924
+ for (var i = 0; i < s; i++) {
925
+ node = nodesToBeRemoved[i];
926
+ graph.remove(node);
927
+ }
928
+ if (graph == this.rootGraph) {
929
+ this.setRootGraph(null);
930
+ }
931
+ var index = this.graphs.indexOf(graph);
932
+ this.graphs.splice(index, 1);
933
+ graph.parent = null;
934
+ } else if (lObj instanceof LEdge) {
935
+ edge = lObj;
936
+ if (edge == null) {
937
+ throw "Edge is null!";
938
+ }
939
+ if (!edge.isInterGraph) {
940
+ throw "Not an inter-graph edge!";
941
+ }
942
+ if (!(edge.source != null && edge.target != null)) {
943
+ throw "Source and/or target is null!";
944
+ }
945
+ if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) {
946
+ throw "Source and/or target doesn't know this edge!";
947
+ }
948
+ var index = edge.source.edges.indexOf(edge);
949
+ edge.source.edges.splice(index, 1);
950
+ index = edge.target.edges.indexOf(edge);
951
+ edge.target.edges.splice(index, 1);
952
+ if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) {
953
+ throw "Edge owner graph or owner graph manager is null!";
954
+ }
955
+ if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) {
956
+ throw "Not in owner graph manager's edge list!";
957
+ }
958
+ var index = edge.source.owner.getGraphManager().edges.indexOf(edge);
959
+ edge.source.owner.getGraphManager().edges.splice(index, 1);
960
+ }
961
+ };
962
+ LGraphManager.prototype.updateBounds = function() {
963
+ this.rootGraph.updateBounds(true);
964
+ };
965
+ LGraphManager.prototype.getGraphs = function() {
966
+ return this.graphs;
967
+ };
968
+ LGraphManager.prototype.getAllNodes = function() {
969
+ if (this.allNodes == null) {
970
+ var nodeList = [];
971
+ var graphs = this.getGraphs();
972
+ var s = graphs.length;
973
+ for (var i = 0; i < s; i++) {
974
+ nodeList = nodeList.concat(graphs[i].getNodes());
975
+ }
976
+ this.allNodes = nodeList;
977
+ }
978
+ return this.allNodes;
979
+ };
980
+ LGraphManager.prototype.resetAllNodes = function() {
981
+ this.allNodes = null;
982
+ };
983
+ LGraphManager.prototype.resetAllEdges = function() {
984
+ this.allEdges = null;
985
+ };
986
+ LGraphManager.prototype.resetAllNodesToApplyGravitation = function() {
987
+ this.allNodesToApplyGravitation = null;
988
+ };
989
+ LGraphManager.prototype.getAllEdges = function() {
990
+ if (this.allEdges == null) {
991
+ var edgeList = [];
992
+ var graphs = this.getGraphs();
993
+ graphs.length;
994
+ for (var i = 0; i < graphs.length; i++) {
995
+ edgeList = edgeList.concat(graphs[i].getEdges());
996
+ }
997
+ edgeList = edgeList.concat(this.edges);
998
+ this.allEdges = edgeList;
999
+ }
1000
+ return this.allEdges;
1001
+ };
1002
+ LGraphManager.prototype.getAllNodesToApplyGravitation = function() {
1003
+ return this.allNodesToApplyGravitation;
1004
+ };
1005
+ LGraphManager.prototype.setAllNodesToApplyGravitation = function(nodeList) {
1006
+ if (this.allNodesToApplyGravitation != null) {
1007
+ throw "assert failed";
1008
+ }
1009
+ this.allNodesToApplyGravitation = nodeList;
1010
+ };
1011
+ LGraphManager.prototype.getRoot = function() {
1012
+ return this.rootGraph;
1013
+ };
1014
+ LGraphManager.prototype.setRootGraph = function(graph) {
1015
+ if (graph.getGraphManager() != this) {
1016
+ throw "Root not in this graph mgr!";
1017
+ }
1018
+ this.rootGraph = graph;
1019
+ if (graph.parent == null) {
1020
+ graph.parent = this.layout.newNode("Root node");
1021
+ }
1022
+ };
1023
+ LGraphManager.prototype.getLayout = function() {
1024
+ return this.layout;
1025
+ };
1026
+ LGraphManager.prototype.isOneAncestorOfOther = function(firstNode, secondNode) {
1027
+ if (!(firstNode != null && secondNode != null)) {
1028
+ throw "assert failed";
1029
+ }
1030
+ if (firstNode == secondNode) {
1031
+ return true;
1032
+ }
1033
+ var ownerGraph = firstNode.getOwner();
1034
+ var parentNode;
1035
+ do {
1036
+ parentNode = ownerGraph.getParent();
1037
+ if (parentNode == null) {
1038
+ break;
1039
+ }
1040
+ if (parentNode == secondNode) {
1041
+ return true;
1042
+ }
1043
+ ownerGraph = parentNode.getOwner();
1044
+ if (ownerGraph == null) {
1045
+ break;
1046
+ }
1047
+ } while (true);
1048
+ ownerGraph = secondNode.getOwner();
1049
+ do {
1050
+ parentNode = ownerGraph.getParent();
1051
+ if (parentNode == null) {
1052
+ break;
1053
+ }
1054
+ if (parentNode == firstNode) {
1055
+ return true;
1056
+ }
1057
+ ownerGraph = parentNode.getOwner();
1058
+ if (ownerGraph == null) {
1059
+ break;
1060
+ }
1061
+ } while (true);
1062
+ return false;
1063
+ };
1064
+ LGraphManager.prototype.calcLowestCommonAncestors = function() {
1065
+ var edge;
1066
+ var sourceNode;
1067
+ var targetNode;
1068
+ var sourceAncestorGraph;
1069
+ var targetAncestorGraph;
1070
+ var edges = this.getAllEdges();
1071
+ var s = edges.length;
1072
+ for (var i = 0; i < s; i++) {
1073
+ edge = edges[i];
1074
+ sourceNode = edge.source;
1075
+ targetNode = edge.target;
1076
+ edge.lca = null;
1077
+ edge.sourceInLca = sourceNode;
1078
+ edge.targetInLca = targetNode;
1079
+ if (sourceNode == targetNode) {
1080
+ edge.lca = sourceNode.getOwner();
1081
+ continue;
1082
+ }
1083
+ sourceAncestorGraph = sourceNode.getOwner();
1084
+ while (edge.lca == null) {
1085
+ edge.targetInLca = targetNode;
1086
+ targetAncestorGraph = targetNode.getOwner();
1087
+ while (edge.lca == null) {
1088
+ if (targetAncestorGraph == sourceAncestorGraph) {
1089
+ edge.lca = targetAncestorGraph;
1090
+ break;
1091
+ }
1092
+ if (targetAncestorGraph == this.rootGraph) {
1093
+ break;
1094
+ }
1095
+ if (edge.lca != null) {
1096
+ throw "assert failed";
1097
+ }
1098
+ edge.targetInLca = targetAncestorGraph.getParent();
1099
+ targetAncestorGraph = edge.targetInLca.getOwner();
1100
+ }
1101
+ if (sourceAncestorGraph == this.rootGraph) {
1102
+ break;
1103
+ }
1104
+ if (edge.lca == null) {
1105
+ edge.sourceInLca = sourceAncestorGraph.getParent();
1106
+ sourceAncestorGraph = edge.sourceInLca.getOwner();
1107
+ }
1108
+ }
1109
+ if (edge.lca == null) {
1110
+ throw "assert failed";
1111
+ }
1112
+ }
1113
+ };
1114
+ LGraphManager.prototype.calcLowestCommonAncestor = function(firstNode, secondNode) {
1115
+ if (firstNode == secondNode) {
1116
+ return firstNode.getOwner();
1117
+ }
1118
+ var firstOwnerGraph = firstNode.getOwner();
1119
+ do {
1120
+ if (firstOwnerGraph == null) {
1121
+ break;
1122
+ }
1123
+ var secondOwnerGraph = secondNode.getOwner();
1124
+ do {
1125
+ if (secondOwnerGraph == null) {
1126
+ break;
1127
+ }
1128
+ if (secondOwnerGraph == firstOwnerGraph) {
1129
+ return secondOwnerGraph;
1130
+ }
1131
+ secondOwnerGraph = secondOwnerGraph.getParent().getOwner();
1132
+ } while (true);
1133
+ firstOwnerGraph = firstOwnerGraph.getParent().getOwner();
1134
+ } while (true);
1135
+ return firstOwnerGraph;
1136
+ };
1137
+ LGraphManager.prototype.calcInclusionTreeDepths = function(graph, depth) {
1138
+ if (graph == null && depth == null) {
1139
+ graph = this.rootGraph;
1140
+ depth = 1;
1141
+ }
1142
+ var node;
1143
+ var nodes = graph.getNodes();
1144
+ var s = nodes.length;
1145
+ for (var i = 0; i < s; i++) {
1146
+ node = nodes[i];
1147
+ node.inclusionTreeDepth = depth;
1148
+ if (node.child != null) {
1149
+ this.calcInclusionTreeDepths(node.child, depth + 1);
1150
+ }
1151
+ }
1152
+ };
1153
+ LGraphManager.prototype.includesInvalidEdge = function() {
1154
+ var edge;
1155
+ var s = this.edges.length;
1156
+ for (var i = 0; i < s; i++) {
1157
+ edge = this.edges[i];
1158
+ if (this.isOneAncestorOfOther(edge.source, edge.target)) {
1159
+ return true;
1160
+ }
1161
+ }
1162
+ return false;
1163
+ };
1164
+ module2.exports = LGraphManager;
1165
+ },
1166
+ /* 7 */
1167
+ /***/
1168
+ function(module2, exports2, __webpack_require__) {
1169
+ var LayoutConstants = __webpack_require__(0);
1170
+ function FDLayoutConstants() {
1171
+ }
1172
+ for (var prop in LayoutConstants) {
1173
+ FDLayoutConstants[prop] = LayoutConstants[prop];
1174
+ }
1175
+ FDLayoutConstants.MAX_ITERATIONS = 2500;
1176
+ FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;
1177
+ FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45;
1178
+ FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500;
1179
+ FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4;
1180
+ FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1;
1181
+ FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;
1182
+ FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;
1183
+ FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;
1184
+ FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;
1185
+ FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3;
1186
+ FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33;
1187
+ FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1e3;
1188
+ FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5e3;
1189
+ FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100;
1190
+ FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;
1191
+ FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10;
1192
+ FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;
1193
+ FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1;
1194
+ FDLayoutConstants.MIN_EDGE_LENGTH = 1;
1195
+ FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;
1196
+ module2.exports = FDLayoutConstants;
1197
+ },
1198
+ /* 8 */
1199
+ /***/
1200
+ function(module2, exports2, __webpack_require__) {
1201
+ var Point2 = __webpack_require__(12);
1202
+ function IGeometry() {
1203
+ }
1204
+ IGeometry.calcSeparationAmount = function(rectA, rectB, overlapAmount, separationBuffer) {
1205
+ if (!rectA.intersects(rectB)) {
1206
+ throw "assert failed";
1207
+ }
1208
+ var directions = new Array(2);
1209
+ this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);
1210
+ overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x);
1211
+ overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y);
1212
+ if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) {
1213
+ overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight());
1214
+ } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) {
1215
+ overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight());
1216
+ }
1217
+ if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) {
1218
+ overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom());
1219
+ } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) {
1220
+ overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom());
1221
+ }
1222
+ var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX()));
1223
+ if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) {
1224
+ slope = 1;
1225
+ }
1226
+ var moveByY = slope * overlapAmount[0];
1227
+ var moveByX = overlapAmount[1] / slope;
1228
+ if (overlapAmount[0] < moveByX) {
1229
+ moveByX = overlapAmount[0];
1230
+ } else {
1231
+ moveByY = overlapAmount[1];
1232
+ }
1233
+ overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer);
1234
+ overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer);
1235
+ };
1236
+ IGeometry.decideDirectionsForOverlappingNodes = function(rectA, rectB, directions) {
1237
+ if (rectA.getCenterX() < rectB.getCenterX()) {
1238
+ directions[0] = -1;
1239
+ } else {
1240
+ directions[0] = 1;
1241
+ }
1242
+ if (rectA.getCenterY() < rectB.getCenterY()) {
1243
+ directions[1] = -1;
1244
+ } else {
1245
+ directions[1] = 1;
1246
+ }
1247
+ };
1248
+ IGeometry.getIntersection2 = function(rectA, rectB, result) {
1249
+ var p1x = rectA.getCenterX();
1250
+ var p1y = rectA.getCenterY();
1251
+ var p2x = rectB.getCenterX();
1252
+ var p2y = rectB.getCenterY();
1253
+ if (rectA.intersects(rectB)) {
1254
+ result[0] = p1x;
1255
+ result[1] = p1y;
1256
+ result[2] = p2x;
1257
+ result[3] = p2y;
1258
+ return true;
1259
+ }
1260
+ var topLeftAx = rectA.getX();
1261
+ var topLeftAy = rectA.getY();
1262
+ var topRightAx = rectA.getRight();
1263
+ var bottomLeftAx = rectA.getX();
1264
+ var bottomLeftAy = rectA.getBottom();
1265
+ var bottomRightAx = rectA.getRight();
1266
+ var halfWidthA = rectA.getWidthHalf();
1267
+ var halfHeightA = rectA.getHeightHalf();
1268
+ var topLeftBx = rectB.getX();
1269
+ var topLeftBy = rectB.getY();
1270
+ var topRightBx = rectB.getRight();
1271
+ var bottomLeftBx = rectB.getX();
1272
+ var bottomLeftBy = rectB.getBottom();
1273
+ var bottomRightBx = rectB.getRight();
1274
+ var halfWidthB = rectB.getWidthHalf();
1275
+ var halfHeightB = rectB.getHeightHalf();
1276
+ var clipPointAFound = false;
1277
+ var clipPointBFound = false;
1278
+ if (p1x === p2x) {
1279
+ if (p1y > p2y) {
1280
+ result[0] = p1x;
1281
+ result[1] = topLeftAy;
1282
+ result[2] = p2x;
1283
+ result[3] = bottomLeftBy;
1284
+ return false;
1285
+ } else if (p1y < p2y) {
1286
+ result[0] = p1x;
1287
+ result[1] = bottomLeftAy;
1288
+ result[2] = p2x;
1289
+ result[3] = topLeftBy;
1290
+ return false;
1291
+ } else ;
1292
+ } else if (p1y === p2y) {
1293
+ if (p1x > p2x) {
1294
+ result[0] = topLeftAx;
1295
+ result[1] = p1y;
1296
+ result[2] = topRightBx;
1297
+ result[3] = p2y;
1298
+ return false;
1299
+ } else if (p1x < p2x) {
1300
+ result[0] = topRightAx;
1301
+ result[1] = p1y;
1302
+ result[2] = topLeftBx;
1303
+ result[3] = p2y;
1304
+ return false;
1305
+ } else ;
1306
+ } else {
1307
+ var slopeA = rectA.height / rectA.width;
1308
+ var slopeB = rectB.height / rectB.width;
1309
+ var slopePrime = (p2y - p1y) / (p2x - p1x);
1310
+ var cardinalDirectionA = void 0;
1311
+ var cardinalDirectionB = void 0;
1312
+ var tempPointAx = void 0;
1313
+ var tempPointAy = void 0;
1314
+ var tempPointBx = void 0;
1315
+ var tempPointBy = void 0;
1316
+ if (-slopeA === slopePrime) {
1317
+ if (p1x > p2x) {
1318
+ result[0] = bottomLeftAx;
1319
+ result[1] = bottomLeftAy;
1320
+ clipPointAFound = true;
1321
+ } else {
1322
+ result[0] = topRightAx;
1323
+ result[1] = topLeftAy;
1324
+ clipPointAFound = true;
1325
+ }
1326
+ } else if (slopeA === slopePrime) {
1327
+ if (p1x > p2x) {
1328
+ result[0] = topLeftAx;
1329
+ result[1] = topLeftAy;
1330
+ clipPointAFound = true;
1331
+ } else {
1332
+ result[0] = bottomRightAx;
1333
+ result[1] = bottomLeftAy;
1334
+ clipPointAFound = true;
1335
+ }
1336
+ }
1337
+ if (-slopeB === slopePrime) {
1338
+ if (p2x > p1x) {
1339
+ result[2] = bottomLeftBx;
1340
+ result[3] = bottomLeftBy;
1341
+ clipPointBFound = true;
1342
+ } else {
1343
+ result[2] = topRightBx;
1344
+ result[3] = topLeftBy;
1345
+ clipPointBFound = true;
1346
+ }
1347
+ } else if (slopeB === slopePrime) {
1348
+ if (p2x > p1x) {
1349
+ result[2] = topLeftBx;
1350
+ result[3] = topLeftBy;
1351
+ clipPointBFound = true;
1352
+ } else {
1353
+ result[2] = bottomRightBx;
1354
+ result[3] = bottomLeftBy;
1355
+ clipPointBFound = true;
1356
+ }
1357
+ }
1358
+ if (clipPointAFound && clipPointBFound) {
1359
+ return false;
1360
+ }
1361
+ if (p1x > p2x) {
1362
+ if (p1y > p2y) {
1363
+ cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);
1364
+ cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);
1365
+ } else {
1366
+ cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);
1367
+ cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);
1368
+ }
1369
+ } else {
1370
+ if (p1y > p2y) {
1371
+ cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);
1372
+ cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);
1373
+ } else {
1374
+ cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);
1375
+ cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);
1376
+ }
1377
+ }
1378
+ if (!clipPointAFound) {
1379
+ switch (cardinalDirectionA) {
1380
+ case 1:
1381
+ tempPointAy = topLeftAy;
1382
+ tempPointAx = p1x + -halfHeightA / slopePrime;
1383
+ result[0] = tempPointAx;
1384
+ result[1] = tempPointAy;
1385
+ break;
1386
+ case 2:
1387
+ tempPointAx = bottomRightAx;
1388
+ tempPointAy = p1y + halfWidthA * slopePrime;
1389
+ result[0] = tempPointAx;
1390
+ result[1] = tempPointAy;
1391
+ break;
1392
+ case 3:
1393
+ tempPointAy = bottomLeftAy;
1394
+ tempPointAx = p1x + halfHeightA / slopePrime;
1395
+ result[0] = tempPointAx;
1396
+ result[1] = tempPointAy;
1397
+ break;
1398
+ case 4:
1399
+ tempPointAx = bottomLeftAx;
1400
+ tempPointAy = p1y + -halfWidthA * slopePrime;
1401
+ result[0] = tempPointAx;
1402
+ result[1] = tempPointAy;
1403
+ break;
1404
+ }
1405
+ }
1406
+ if (!clipPointBFound) {
1407
+ switch (cardinalDirectionB) {
1408
+ case 1:
1409
+ tempPointBy = topLeftBy;
1410
+ tempPointBx = p2x + -halfHeightB / slopePrime;
1411
+ result[2] = tempPointBx;
1412
+ result[3] = tempPointBy;
1413
+ break;
1414
+ case 2:
1415
+ tempPointBx = bottomRightBx;
1416
+ tempPointBy = p2y + halfWidthB * slopePrime;
1417
+ result[2] = tempPointBx;
1418
+ result[3] = tempPointBy;
1419
+ break;
1420
+ case 3:
1421
+ tempPointBy = bottomLeftBy;
1422
+ tempPointBx = p2x + halfHeightB / slopePrime;
1423
+ result[2] = tempPointBx;
1424
+ result[3] = tempPointBy;
1425
+ break;
1426
+ case 4:
1427
+ tempPointBx = bottomLeftBx;
1428
+ tempPointBy = p2y + -halfWidthB * slopePrime;
1429
+ result[2] = tempPointBx;
1430
+ result[3] = tempPointBy;
1431
+ break;
1432
+ }
1433
+ }
1434
+ }
1435
+ return false;
1436
+ };
1437
+ IGeometry.getCardinalDirection = function(slope, slopePrime, line) {
1438
+ if (slope > slopePrime) {
1439
+ return line;
1440
+ } else {
1441
+ return 1 + line % 4;
1442
+ }
1443
+ };
1444
+ IGeometry.getIntersection = function(s1, s2, f1, f2) {
1445
+ if (f2 == null) {
1446
+ return this.getIntersection2(s1, s2, f1);
1447
+ }
1448
+ var x1 = s1.x;
1449
+ var y1 = s1.y;
1450
+ var x2 = s2.x;
1451
+ var y2 = s2.y;
1452
+ var x3 = f1.x;
1453
+ var y3 = f1.y;
1454
+ var x4 = f2.x;
1455
+ var y4 = f2.y;
1456
+ var x = void 0, y = void 0;
1457
+ var a1 = void 0, a2 = void 0, b1 = void 0, b2 = void 0, c1 = void 0, c2 = void 0;
1458
+ var denom = void 0;
1459
+ a1 = y2 - y1;
1460
+ b1 = x1 - x2;
1461
+ c1 = x2 * y1 - x1 * y2;
1462
+ a2 = y4 - y3;
1463
+ b2 = x3 - x4;
1464
+ c2 = x4 * y3 - x3 * y4;
1465
+ denom = a1 * b2 - a2 * b1;
1466
+ if (denom === 0) {
1467
+ return null;
1468
+ }
1469
+ x = (b1 * c2 - b2 * c1) / denom;
1470
+ y = (a2 * c1 - a1 * c2) / denom;
1471
+ return new Point2(x, y);
1472
+ };
1473
+ IGeometry.angleOfVector = function(Cx, Cy, Nx, Ny) {
1474
+ var C_angle = void 0;
1475
+ if (Cx !== Nx) {
1476
+ C_angle = Math.atan((Ny - Cy) / (Nx - Cx));
1477
+ if (Nx < Cx) {
1478
+ C_angle += Math.PI;
1479
+ } else if (Ny < Cy) {
1480
+ C_angle += this.TWO_PI;
1481
+ }
1482
+ } else if (Ny < Cy) {
1483
+ C_angle = this.ONE_AND_HALF_PI;
1484
+ } else {
1485
+ C_angle = this.HALF_PI;
1486
+ }
1487
+ return C_angle;
1488
+ };
1489
+ IGeometry.doIntersect = function(p1, p2, p3, p4) {
1490
+ var a = p1.x;
1491
+ var b = p1.y;
1492
+ var c = p2.x;
1493
+ var d = p2.y;
1494
+ var p = p3.x;
1495
+ var q = p3.y;
1496
+ var r = p4.x;
1497
+ var s = p4.y;
1498
+ var det = (c - a) * (s - q) - (r - p) * (d - b);
1499
+ if (det === 0) {
1500
+ return false;
1501
+ } else {
1502
+ var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;
1503
+ var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;
1504
+ return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1;
1505
+ }
1506
+ };
1507
+ IGeometry.HALF_PI = 0.5 * Math.PI;
1508
+ IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;
1509
+ IGeometry.TWO_PI = 2 * Math.PI;
1510
+ IGeometry.THREE_PI = 3 * Math.PI;
1511
+ module2.exports = IGeometry;
1512
+ },
1513
+ /* 9 */
1514
+ /***/
1515
+ function(module2, exports2, __webpack_require__) {
1516
+ function IMath() {
1517
+ }
1518
+ IMath.sign = function(value) {
1519
+ if (value > 0) {
1520
+ return 1;
1521
+ } else if (value < 0) {
1522
+ return -1;
1523
+ } else {
1524
+ return 0;
1525
+ }
1526
+ };
1527
+ IMath.floor = function(value) {
1528
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
1529
+ };
1530
+ IMath.ceil = function(value) {
1531
+ return value < 0 ? Math.floor(value) : Math.ceil(value);
1532
+ };
1533
+ module2.exports = IMath;
1534
+ },
1535
+ /* 10 */
1536
+ /***/
1537
+ function(module2, exports2, __webpack_require__) {
1538
+ function Integer() {
1539
+ }
1540
+ Integer.MAX_VALUE = 2147483647;
1541
+ Integer.MIN_VALUE = -2147483648;
1542
+ module2.exports = Integer;
1543
+ },
1544
+ /* 11 */
1545
+ /***/
1546
+ function(module2, exports2, __webpack_require__) {
1547
+ var _createClass = /* @__PURE__ */ function() {
1548
+ function defineProperties(target, props) {
1549
+ for (var i = 0; i < props.length; i++) {
1550
+ var descriptor = props[i];
1551
+ descriptor.enumerable = descriptor.enumerable || false;
1552
+ descriptor.configurable = true;
1553
+ if ("value" in descriptor) descriptor.writable = true;
1554
+ Object.defineProperty(target, descriptor.key, descriptor);
1555
+ }
1556
+ }
1557
+ return function(Constructor, protoProps, staticProps) {
1558
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
1559
+ if (staticProps) defineProperties(Constructor, staticProps);
1560
+ return Constructor;
1561
+ };
1562
+ }();
1563
+ function _classCallCheck(instance, Constructor) {
1564
+ if (!(instance instanceof Constructor)) {
1565
+ throw new TypeError("Cannot call a class as a function");
1566
+ }
1567
+ }
1568
+ var nodeFrom = function nodeFrom2(value) {
1569
+ return { value, next: null, prev: null };
1570
+ };
1571
+ var add = function add2(prev, node, next, list) {
1572
+ if (prev !== null) {
1573
+ prev.next = node;
1574
+ } else {
1575
+ list.head = node;
1576
+ }
1577
+ if (next !== null) {
1578
+ next.prev = node;
1579
+ } else {
1580
+ list.tail = node;
1581
+ }
1582
+ node.prev = prev;
1583
+ node.next = next;
1584
+ list.length++;
1585
+ return node;
1586
+ };
1587
+ var _remove = function _remove2(node, list) {
1588
+ var prev = node.prev, next = node.next;
1589
+ if (prev !== null) {
1590
+ prev.next = next;
1591
+ } else {
1592
+ list.head = next;
1593
+ }
1594
+ if (next !== null) {
1595
+ next.prev = prev;
1596
+ } else {
1597
+ list.tail = prev;
1598
+ }
1599
+ node.prev = node.next = null;
1600
+ list.length--;
1601
+ return node;
1602
+ };
1603
+ var LinkedList = function() {
1604
+ function LinkedList2(vals) {
1605
+ var _this = this;
1606
+ _classCallCheck(this, LinkedList2);
1607
+ this.length = 0;
1608
+ this.head = null;
1609
+ this.tail = null;
1610
+ if (vals != null) {
1611
+ vals.forEach(function(v) {
1612
+ return _this.push(v);
1613
+ });
1614
+ }
1615
+ }
1616
+ _createClass(LinkedList2, [{
1617
+ key: "size",
1618
+ value: function size() {
1619
+ return this.length;
1620
+ }
1621
+ }, {
1622
+ key: "insertBefore",
1623
+ value: function insertBefore(val, otherNode) {
1624
+ return add(otherNode.prev, nodeFrom(val), otherNode, this);
1625
+ }
1626
+ }, {
1627
+ key: "insertAfter",
1628
+ value: function insertAfter(val, otherNode) {
1629
+ return add(otherNode, nodeFrom(val), otherNode.next, this);
1630
+ }
1631
+ }, {
1632
+ key: "insertNodeBefore",
1633
+ value: function insertNodeBefore(newNode, otherNode) {
1634
+ return add(otherNode.prev, newNode, otherNode, this);
1635
+ }
1636
+ }, {
1637
+ key: "insertNodeAfter",
1638
+ value: function insertNodeAfter(newNode, otherNode) {
1639
+ return add(otherNode, newNode, otherNode.next, this);
1640
+ }
1641
+ }, {
1642
+ key: "push",
1643
+ value: function push(val) {
1644
+ return add(this.tail, nodeFrom(val), null, this);
1645
+ }
1646
+ }, {
1647
+ key: "unshift",
1648
+ value: function unshift(val) {
1649
+ return add(null, nodeFrom(val), this.head, this);
1650
+ }
1651
+ }, {
1652
+ key: "remove",
1653
+ value: function remove(node) {
1654
+ return _remove(node, this);
1655
+ }
1656
+ }, {
1657
+ key: "pop",
1658
+ value: function pop() {
1659
+ return _remove(this.tail, this).value;
1660
+ }
1661
+ }, {
1662
+ key: "popNode",
1663
+ value: function popNode() {
1664
+ return _remove(this.tail, this);
1665
+ }
1666
+ }, {
1667
+ key: "shift",
1668
+ value: function shift() {
1669
+ return _remove(this.head, this).value;
1670
+ }
1671
+ }, {
1672
+ key: "shiftNode",
1673
+ value: function shiftNode() {
1674
+ return _remove(this.head, this);
1675
+ }
1676
+ }, {
1677
+ key: "get_object_at",
1678
+ value: function get_object_at(index) {
1679
+ if (index <= this.length()) {
1680
+ var i = 1;
1681
+ var current = this.head;
1682
+ while (i < index) {
1683
+ current = current.next;
1684
+ i++;
1685
+ }
1686
+ return current.value;
1687
+ }
1688
+ }
1689
+ }, {
1690
+ key: "set_object_at",
1691
+ value: function set_object_at(index, value) {
1692
+ if (index <= this.length()) {
1693
+ var i = 1;
1694
+ var current = this.head;
1695
+ while (i < index) {
1696
+ current = current.next;
1697
+ i++;
1698
+ }
1699
+ current.value = value;
1700
+ }
1701
+ }
1702
+ }]);
1703
+ return LinkedList2;
1704
+ }();
1705
+ module2.exports = LinkedList;
1706
+ },
1707
+ /* 12 */
1708
+ /***/
1709
+ function(module2, exports2, __webpack_require__) {
1710
+ function Point2(x, y, p) {
1711
+ this.x = null;
1712
+ this.y = null;
1713
+ if (x == null && y == null && p == null) {
1714
+ this.x = 0;
1715
+ this.y = 0;
1716
+ } else if (typeof x == "number" && typeof y == "number" && p == null) {
1717
+ this.x = x;
1718
+ this.y = y;
1719
+ } else if (x.constructor.name == "Point" && y == null && p == null) {
1720
+ p = x;
1721
+ this.x = p.x;
1722
+ this.y = p.y;
1723
+ }
1724
+ }
1725
+ Point2.prototype.getX = function() {
1726
+ return this.x;
1727
+ };
1728
+ Point2.prototype.getY = function() {
1729
+ return this.y;
1730
+ };
1731
+ Point2.prototype.getLocation = function() {
1732
+ return new Point2(this.x, this.y);
1733
+ };
1734
+ Point2.prototype.setLocation = function(x, y, p) {
1735
+ if (x.constructor.name == "Point" && y == null && p == null) {
1736
+ p = x;
1737
+ this.setLocation(p.x, p.y);
1738
+ } else if (typeof x == "number" && typeof y == "number" && p == null) {
1739
+ if (parseInt(x) == x && parseInt(y) == y) {
1740
+ this.move(x, y);
1741
+ } else {
1742
+ this.x = Math.floor(x + 0.5);
1743
+ this.y = Math.floor(y + 0.5);
1744
+ }
1745
+ }
1746
+ };
1747
+ Point2.prototype.move = function(x, y) {
1748
+ this.x = x;
1749
+ this.y = y;
1750
+ };
1751
+ Point2.prototype.translate = function(dx, dy) {
1752
+ this.x += dx;
1753
+ this.y += dy;
1754
+ };
1755
+ Point2.prototype.equals = function(obj) {
1756
+ if (obj.constructor.name == "Point") {
1757
+ var pt = obj;
1758
+ return this.x == pt.x && this.y == pt.y;
1759
+ }
1760
+ return this == obj;
1761
+ };
1762
+ Point2.prototype.toString = function() {
1763
+ return new Point2().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
1764
+ };
1765
+ module2.exports = Point2;
1766
+ },
1767
+ /* 13 */
1768
+ /***/
1769
+ function(module2, exports2, __webpack_require__) {
1770
+ function RectangleD(x, y, width, height) {
1771
+ this.x = 0;
1772
+ this.y = 0;
1773
+ this.width = 0;
1774
+ this.height = 0;
1775
+ if (x != null && y != null && width != null && height != null) {
1776
+ this.x = x;
1777
+ this.y = y;
1778
+ this.width = width;
1779
+ this.height = height;
1780
+ }
1781
+ }
1782
+ RectangleD.prototype.getX = function() {
1783
+ return this.x;
1784
+ };
1785
+ RectangleD.prototype.setX = function(x) {
1786
+ this.x = x;
1787
+ };
1788
+ RectangleD.prototype.getY = function() {
1789
+ return this.y;
1790
+ };
1791
+ RectangleD.prototype.setY = function(y) {
1792
+ this.y = y;
1793
+ };
1794
+ RectangleD.prototype.getWidth = function() {
1795
+ return this.width;
1796
+ };
1797
+ RectangleD.prototype.setWidth = function(width) {
1798
+ this.width = width;
1799
+ };
1800
+ RectangleD.prototype.getHeight = function() {
1801
+ return this.height;
1802
+ };
1803
+ RectangleD.prototype.setHeight = function(height) {
1804
+ this.height = height;
1805
+ };
1806
+ RectangleD.prototype.getRight = function() {
1807
+ return this.x + this.width;
1808
+ };
1809
+ RectangleD.prototype.getBottom = function() {
1810
+ return this.y + this.height;
1811
+ };
1812
+ RectangleD.prototype.intersects = function(a) {
1813
+ if (this.getRight() < a.x) {
1814
+ return false;
1815
+ }
1816
+ if (this.getBottom() < a.y) {
1817
+ return false;
1818
+ }
1819
+ if (a.getRight() < this.x) {
1820
+ return false;
1821
+ }
1822
+ if (a.getBottom() < this.y) {
1823
+ return false;
1824
+ }
1825
+ return true;
1826
+ };
1827
+ RectangleD.prototype.getCenterX = function() {
1828
+ return this.x + this.width / 2;
1829
+ };
1830
+ RectangleD.prototype.getMinX = function() {
1831
+ return this.getX();
1832
+ };
1833
+ RectangleD.prototype.getMaxX = function() {
1834
+ return this.getX() + this.width;
1835
+ };
1836
+ RectangleD.prototype.getCenterY = function() {
1837
+ return this.y + this.height / 2;
1838
+ };
1839
+ RectangleD.prototype.getMinY = function() {
1840
+ return this.getY();
1841
+ };
1842
+ RectangleD.prototype.getMaxY = function() {
1843
+ return this.getY() + this.height;
1844
+ };
1845
+ RectangleD.prototype.getWidthHalf = function() {
1846
+ return this.width / 2;
1847
+ };
1848
+ RectangleD.prototype.getHeightHalf = function() {
1849
+ return this.height / 2;
1850
+ };
1851
+ module2.exports = RectangleD;
1852
+ },
1853
+ /* 14 */
1854
+ /***/
1855
+ function(module2, exports2, __webpack_require__) {
1856
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
1857
+ return typeof obj;
1858
+ } : function(obj) {
1859
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1860
+ };
1861
+ function UniqueIDGeneretor() {
1862
+ }
1863
+ UniqueIDGeneretor.lastID = 0;
1864
+ UniqueIDGeneretor.createID = function(obj) {
1865
+ if (UniqueIDGeneretor.isPrimitive(obj)) {
1866
+ return obj;
1867
+ }
1868
+ if (obj.uniqueID != null) {
1869
+ return obj.uniqueID;
1870
+ }
1871
+ obj.uniqueID = UniqueIDGeneretor.getString();
1872
+ UniqueIDGeneretor.lastID++;
1873
+ return obj.uniqueID;
1874
+ };
1875
+ UniqueIDGeneretor.getString = function(id) {
1876
+ if (id == null) id = UniqueIDGeneretor.lastID;
1877
+ return "Object#" + id;
1878
+ };
1879
+ UniqueIDGeneretor.isPrimitive = function(arg) {
1880
+ var type = typeof arg === "undefined" ? "undefined" : _typeof(arg);
1881
+ return arg == null || type != "object" && type != "function";
1882
+ };
1883
+ module2.exports = UniqueIDGeneretor;
1884
+ },
1885
+ /* 15 */
1886
+ /***/
1887
+ function(module2, exports2, __webpack_require__) {
1888
+ function _toConsumableArray(arr) {
1889
+ if (Array.isArray(arr)) {
1890
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
1891
+ arr2[i] = arr[i];
1892
+ }
1893
+ return arr2;
1894
+ } else {
1895
+ return Array.from(arr);
1896
+ }
1897
+ }
1898
+ var LayoutConstants = __webpack_require__(0);
1899
+ var LGraphManager = __webpack_require__(6);
1900
+ var LNode = __webpack_require__(3);
1901
+ var LEdge = __webpack_require__(1);
1902
+ var LGraph = __webpack_require__(5);
1903
+ var PointD = __webpack_require__(4);
1904
+ var Transform = __webpack_require__(17);
1905
+ var Emitter = __webpack_require__(27);
1906
+ function Layout2(isRemoteUse) {
1907
+ Emitter.call(this);
1908
+ this.layoutQuality = LayoutConstants.QUALITY;
1909
+ this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
1910
+ this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
1911
+ this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
1912
+ this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
1913
+ this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
1914
+ this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
1915
+ this.edgeToDummyNodes = /* @__PURE__ */ new Map();
1916
+ this.graphManager = new LGraphManager(this);
1917
+ this.isLayoutFinished = false;
1918
+ this.isSubLayout = false;
1919
+ this.isRemoteUse = false;
1920
+ if (isRemoteUse != null) {
1921
+ this.isRemoteUse = isRemoteUse;
1922
+ }
1923
+ }
1924
+ Layout2.RANDOM_SEED = 1;
1925
+ Layout2.prototype = Object.create(Emitter.prototype);
1926
+ Layout2.prototype.getGraphManager = function() {
1927
+ return this.graphManager;
1928
+ };
1929
+ Layout2.prototype.getAllNodes = function() {
1930
+ return this.graphManager.getAllNodes();
1931
+ };
1932
+ Layout2.prototype.getAllEdges = function() {
1933
+ return this.graphManager.getAllEdges();
1934
+ };
1935
+ Layout2.prototype.getAllNodesToApplyGravitation = function() {
1936
+ return this.graphManager.getAllNodesToApplyGravitation();
1937
+ };
1938
+ Layout2.prototype.newGraphManager = function() {
1939
+ var gm = new LGraphManager(this);
1940
+ this.graphManager = gm;
1941
+ return gm;
1942
+ };
1943
+ Layout2.prototype.newGraph = function(vGraph) {
1944
+ return new LGraph(null, this.graphManager, vGraph);
1945
+ };
1946
+ Layout2.prototype.newNode = function(vNode) {
1947
+ return new LNode(this.graphManager, vNode);
1948
+ };
1949
+ Layout2.prototype.newEdge = function(vEdge) {
1950
+ return new LEdge(null, null, vEdge);
1951
+ };
1952
+ Layout2.prototype.checkLayoutSuccess = function() {
1953
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
1954
+ };
1955
+ Layout2.prototype.runLayout = function() {
1956
+ this.isLayoutFinished = false;
1957
+ if (this.tilingPreLayout) {
1958
+ this.tilingPreLayout();
1959
+ }
1960
+ this.initParameters();
1961
+ var isLayoutSuccessfull;
1962
+ if (this.checkLayoutSuccess()) {
1963
+ isLayoutSuccessfull = false;
1964
+ } else {
1965
+ isLayoutSuccessfull = this.layout();
1966
+ }
1967
+ if (LayoutConstants.ANIMATE === "during") {
1968
+ return false;
1969
+ }
1970
+ if (isLayoutSuccessfull) {
1971
+ if (!this.isSubLayout) {
1972
+ this.doPostLayout();
1973
+ }
1974
+ }
1975
+ if (this.tilingPostLayout) {
1976
+ this.tilingPostLayout();
1977
+ }
1978
+ this.isLayoutFinished = true;
1979
+ return isLayoutSuccessfull;
1980
+ };
1981
+ Layout2.prototype.doPostLayout = function() {
1982
+ if (!this.incremental) {
1983
+ this.transform();
1984
+ }
1985
+ this.update();
1986
+ };
1987
+ Layout2.prototype.update2 = function() {
1988
+ if (this.createBendsAsNeeded) {
1989
+ this.createBendpointsFromDummyNodes();
1990
+ this.graphManager.resetAllEdges();
1991
+ }
1992
+ if (!this.isRemoteUse) {
1993
+ var allEdges = this.graphManager.getAllEdges();
1994
+ for (var i = 0; i < allEdges.length; i++) {
1995
+ allEdges[i];
1996
+ }
1997
+ var nodes = this.graphManager.getRoot().getNodes();
1998
+ for (var i = 0; i < nodes.length; i++) {
1999
+ nodes[i];
2000
+ }
2001
+ this.update(this.graphManager.getRoot());
2002
+ }
2003
+ };
2004
+ Layout2.prototype.update = function(obj) {
2005
+ if (obj == null) {
2006
+ this.update2();
2007
+ } else if (obj instanceof LNode) {
2008
+ var node = obj;
2009
+ if (node.getChild() != null) {
2010
+ var nodes = node.getChild().getNodes();
2011
+ for (var i = 0; i < nodes.length; i++) {
2012
+ update(nodes[i]);
2013
+ }
2014
+ }
2015
+ if (node.vGraphObject != null) {
2016
+ var vNode = node.vGraphObject;
2017
+ vNode.update(node);
2018
+ }
2019
+ } else if (obj instanceof LEdge) {
2020
+ var edge = obj;
2021
+ if (edge.vGraphObject != null) {
2022
+ var vEdge = edge.vGraphObject;
2023
+ vEdge.update(edge);
2024
+ }
2025
+ } else if (obj instanceof LGraph) {
2026
+ var graph = obj;
2027
+ if (graph.vGraphObject != null) {
2028
+ var vGraph = graph.vGraphObject;
2029
+ vGraph.update(graph);
2030
+ }
2031
+ }
2032
+ };
2033
+ Layout2.prototype.initParameters = function() {
2034
+ if (!this.isSubLayout) {
2035
+ this.layoutQuality = LayoutConstants.QUALITY;
2036
+ this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
2037
+ this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
2038
+ this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
2039
+ this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
2040
+ this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
2041
+ this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
2042
+ }
2043
+ if (this.animationDuringLayout) {
2044
+ this.animationOnLayout = false;
2045
+ }
2046
+ };
2047
+ Layout2.prototype.transform = function(newLeftTop) {
2048
+ if (newLeftTop == void 0) {
2049
+ this.transform(new PointD(0, 0));
2050
+ } else {
2051
+ var trans = new Transform();
2052
+ var leftTop = this.graphManager.getRoot().updateLeftTop();
2053
+ if (leftTop != null) {
2054
+ trans.setWorldOrgX(newLeftTop.x);
2055
+ trans.setWorldOrgY(newLeftTop.y);
2056
+ trans.setDeviceOrgX(leftTop.x);
2057
+ trans.setDeviceOrgY(leftTop.y);
2058
+ var nodes = this.getAllNodes();
2059
+ var node;
2060
+ for (var i = 0; i < nodes.length; i++) {
2061
+ node = nodes[i];
2062
+ node.transform(trans);
2063
+ }
2064
+ }
2065
+ }
2066
+ };
2067
+ Layout2.prototype.positionNodesRandomly = function(graph) {
2068
+ if (graph == void 0) {
2069
+ this.positionNodesRandomly(this.getGraphManager().getRoot());
2070
+ this.getGraphManager().getRoot().updateBounds(true);
2071
+ } else {
2072
+ var lNode;
2073
+ var childGraph;
2074
+ var nodes = graph.getNodes();
2075
+ for (var i = 0; i < nodes.length; i++) {
2076
+ lNode = nodes[i];
2077
+ childGraph = lNode.getChild();
2078
+ if (childGraph == null) {
2079
+ lNode.scatter();
2080
+ } else if (childGraph.getNodes().length == 0) {
2081
+ lNode.scatter();
2082
+ } else {
2083
+ this.positionNodesRandomly(childGraph);
2084
+ lNode.updateBounds();
2085
+ }
2086
+ }
2087
+ }
2088
+ };
2089
+ Layout2.prototype.getFlatForest = function() {
2090
+ var flatForest = [];
2091
+ var isForest = true;
2092
+ var allNodes = this.graphManager.getRoot().getNodes();
2093
+ var isFlat = true;
2094
+ for (var i = 0; i < allNodes.length; i++) {
2095
+ if (allNodes[i].getChild() != null) {
2096
+ isFlat = false;
2097
+ }
2098
+ }
2099
+ if (!isFlat) {
2100
+ return flatForest;
2101
+ }
2102
+ var visited = /* @__PURE__ */ new Set();
2103
+ var toBeVisited = [];
2104
+ var parents = /* @__PURE__ */ new Map();
2105
+ var unProcessedNodes = [];
2106
+ unProcessedNodes = unProcessedNodes.concat(allNodes);
2107
+ while (unProcessedNodes.length > 0 && isForest) {
2108
+ toBeVisited.push(unProcessedNodes[0]);
2109
+ while (toBeVisited.length > 0 && isForest) {
2110
+ var currentNode = toBeVisited[0];
2111
+ toBeVisited.splice(0, 1);
2112
+ visited.add(currentNode);
2113
+ var neighborEdges = currentNode.getEdges();
2114
+ for (var i = 0; i < neighborEdges.length; i++) {
2115
+ var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode);
2116
+ if (parents.get(currentNode) != currentNeighbor) {
2117
+ if (!visited.has(currentNeighbor)) {
2118
+ toBeVisited.push(currentNeighbor);
2119
+ parents.set(currentNeighbor, currentNode);
2120
+ } else {
2121
+ isForest = false;
2122
+ break;
2123
+ }
2124
+ }
2125
+ }
2126
+ }
2127
+ if (!isForest) {
2128
+ flatForest = [];
2129
+ } else {
2130
+ var temp = [].concat(_toConsumableArray(visited));
2131
+ flatForest.push(temp);
2132
+ for (var i = 0; i < temp.length; i++) {
2133
+ var value = temp[i];
2134
+ var index = unProcessedNodes.indexOf(value);
2135
+ if (index > -1) {
2136
+ unProcessedNodes.splice(index, 1);
2137
+ }
2138
+ }
2139
+ visited = /* @__PURE__ */ new Set();
2140
+ parents = /* @__PURE__ */ new Map();
2141
+ }
2142
+ }
2143
+ return flatForest;
2144
+ };
2145
+ Layout2.prototype.createDummyNodesForBendpoints = function(edge) {
2146
+ var dummyNodes = [];
2147
+ var prev = edge.source;
2148
+ var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);
2149
+ for (var i = 0; i < edge.bendpoints.length; i++) {
2150
+ var dummyNode = this.newNode(null);
2151
+ dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));
2152
+ graph.add(dummyNode);
2153
+ var dummyEdge = this.newEdge(null);
2154
+ this.graphManager.add(dummyEdge, prev, dummyNode);
2155
+ dummyNodes.add(dummyNode);
2156
+ prev = dummyNode;
2157
+ }
2158
+ var dummyEdge = this.newEdge(null);
2159
+ this.graphManager.add(dummyEdge, prev, edge.target);
2160
+ this.edgeToDummyNodes.set(edge, dummyNodes);
2161
+ if (edge.isInterGraph()) {
2162
+ this.graphManager.remove(edge);
2163
+ } else {
2164
+ graph.remove(edge);
2165
+ }
2166
+ return dummyNodes;
2167
+ };
2168
+ Layout2.prototype.createBendpointsFromDummyNodes = function() {
2169
+ var edges = [];
2170
+ edges = edges.concat(this.graphManager.getAllEdges());
2171
+ edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges);
2172
+ for (var k = 0; k < edges.length; k++) {
2173
+ var lEdge = edges[k];
2174
+ if (lEdge.bendpoints.length > 0) {
2175
+ var path = this.edgeToDummyNodes.get(lEdge);
2176
+ for (var i = 0; i < path.length; i++) {
2177
+ var dummyNode = path[i];
2178
+ var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY());
2179
+ var ebp = lEdge.bendpoints.get(i);
2180
+ ebp.x = p.x;
2181
+ ebp.y = p.y;
2182
+ dummyNode.getOwner().remove(dummyNode);
2183
+ }
2184
+ this.graphManager.add(lEdge, lEdge.source, lEdge.target);
2185
+ }
2186
+ }
2187
+ };
2188
+ Layout2.transform = function(sliderValue, defaultValue, minDiv, maxMul) {
2189
+ if (minDiv != void 0 && maxMul != void 0) {
2190
+ var value = defaultValue;
2191
+ if (sliderValue <= 50) {
2192
+ var minValue = defaultValue / minDiv;
2193
+ value -= (defaultValue - minValue) / 50 * (50 - sliderValue);
2194
+ } else {
2195
+ var maxValue = defaultValue * maxMul;
2196
+ value += (maxValue - defaultValue) / 50 * (sliderValue - 50);
2197
+ }
2198
+ return value;
2199
+ } else {
2200
+ var a, b;
2201
+ if (sliderValue <= 50) {
2202
+ a = 9 * defaultValue / 500;
2203
+ b = defaultValue / 10;
2204
+ } else {
2205
+ a = 9 * defaultValue / 50;
2206
+ b = -8 * defaultValue;
2207
+ }
2208
+ return a * sliderValue + b;
2209
+ }
2210
+ };
2211
+ Layout2.findCenterOfTree = function(nodes) {
2212
+ var list = [];
2213
+ list = list.concat(nodes);
2214
+ var removedNodes = [];
2215
+ var remainingDegrees = /* @__PURE__ */ new Map();
2216
+ var foundCenter = false;
2217
+ var centerNode = null;
2218
+ if (list.length == 1 || list.length == 2) {
2219
+ foundCenter = true;
2220
+ centerNode = list[0];
2221
+ }
2222
+ for (var i = 0; i < list.length; i++) {
2223
+ var node = list[i];
2224
+ var degree = node.getNeighborsList().size;
2225
+ remainingDegrees.set(node, node.getNeighborsList().size);
2226
+ if (degree == 1) {
2227
+ removedNodes.push(node);
2228
+ }
2229
+ }
2230
+ var tempList = [];
2231
+ tempList = tempList.concat(removedNodes);
2232
+ while (!foundCenter) {
2233
+ var tempList2 = [];
2234
+ tempList2 = tempList2.concat(tempList);
2235
+ tempList = [];
2236
+ for (var i = 0; i < list.length; i++) {
2237
+ var node = list[i];
2238
+ var index = list.indexOf(node);
2239
+ if (index >= 0) {
2240
+ list.splice(index, 1);
2241
+ }
2242
+ var neighbours = node.getNeighborsList();
2243
+ neighbours.forEach(function(neighbour) {
2244
+ if (removedNodes.indexOf(neighbour) < 0) {
2245
+ var otherDegree = remainingDegrees.get(neighbour);
2246
+ var newDegree = otherDegree - 1;
2247
+ if (newDegree == 1) {
2248
+ tempList.push(neighbour);
2249
+ }
2250
+ remainingDegrees.set(neighbour, newDegree);
2251
+ }
2252
+ });
2253
+ }
2254
+ removedNodes = removedNodes.concat(tempList);
2255
+ if (list.length == 1 || list.length == 2) {
2256
+ foundCenter = true;
2257
+ centerNode = list[0];
2258
+ }
2259
+ }
2260
+ return centerNode;
2261
+ };
2262
+ Layout2.prototype.setGraphManager = function(gm) {
2263
+ this.graphManager = gm;
2264
+ };
2265
+ module2.exports = Layout2;
2266
+ },
2267
+ /* 16 */
2268
+ /***/
2269
+ function(module2, exports2, __webpack_require__) {
2270
+ function RandomSeed() {
2271
+ }
2272
+ RandomSeed.seed = 1;
2273
+ RandomSeed.x = 0;
2274
+ RandomSeed.nextDouble = function() {
2275
+ RandomSeed.x = Math.sin(RandomSeed.seed++) * 1e4;
2276
+ return RandomSeed.x - Math.floor(RandomSeed.x);
2277
+ };
2278
+ module2.exports = RandomSeed;
2279
+ },
2280
+ /* 17 */
2281
+ /***/
2282
+ function(module2, exports2, __webpack_require__) {
2283
+ var PointD = __webpack_require__(4);
2284
+ function Transform(x, y) {
2285
+ this.lworldOrgX = 0;
2286
+ this.lworldOrgY = 0;
2287
+ this.ldeviceOrgX = 0;
2288
+ this.ldeviceOrgY = 0;
2289
+ this.lworldExtX = 1;
2290
+ this.lworldExtY = 1;
2291
+ this.ldeviceExtX = 1;
2292
+ this.ldeviceExtY = 1;
2293
+ }
2294
+ Transform.prototype.getWorldOrgX = function() {
2295
+ return this.lworldOrgX;
2296
+ };
2297
+ Transform.prototype.setWorldOrgX = function(wox) {
2298
+ this.lworldOrgX = wox;
2299
+ };
2300
+ Transform.prototype.getWorldOrgY = function() {
2301
+ return this.lworldOrgY;
2302
+ };
2303
+ Transform.prototype.setWorldOrgY = function(woy) {
2304
+ this.lworldOrgY = woy;
2305
+ };
2306
+ Transform.prototype.getWorldExtX = function() {
2307
+ return this.lworldExtX;
2308
+ };
2309
+ Transform.prototype.setWorldExtX = function(wex) {
2310
+ this.lworldExtX = wex;
2311
+ };
2312
+ Transform.prototype.getWorldExtY = function() {
2313
+ return this.lworldExtY;
2314
+ };
2315
+ Transform.prototype.setWorldExtY = function(wey) {
2316
+ this.lworldExtY = wey;
2317
+ };
2318
+ Transform.prototype.getDeviceOrgX = function() {
2319
+ return this.ldeviceOrgX;
2320
+ };
2321
+ Transform.prototype.setDeviceOrgX = function(dox) {
2322
+ this.ldeviceOrgX = dox;
2323
+ };
2324
+ Transform.prototype.getDeviceOrgY = function() {
2325
+ return this.ldeviceOrgY;
2326
+ };
2327
+ Transform.prototype.setDeviceOrgY = function(doy) {
2328
+ this.ldeviceOrgY = doy;
2329
+ };
2330
+ Transform.prototype.getDeviceExtX = function() {
2331
+ return this.ldeviceExtX;
2332
+ };
2333
+ Transform.prototype.setDeviceExtX = function(dex) {
2334
+ this.ldeviceExtX = dex;
2335
+ };
2336
+ Transform.prototype.getDeviceExtY = function() {
2337
+ return this.ldeviceExtY;
2338
+ };
2339
+ Transform.prototype.setDeviceExtY = function(dey) {
2340
+ this.ldeviceExtY = dey;
2341
+ };
2342
+ Transform.prototype.transformX = function(x) {
2343
+ var xDevice = 0;
2344
+ var worldExtX = this.lworldExtX;
2345
+ if (worldExtX != 0) {
2346
+ xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX;
2347
+ }
2348
+ return xDevice;
2349
+ };
2350
+ Transform.prototype.transformY = function(y) {
2351
+ var yDevice = 0;
2352
+ var worldExtY = this.lworldExtY;
2353
+ if (worldExtY != 0) {
2354
+ yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY;
2355
+ }
2356
+ return yDevice;
2357
+ };
2358
+ Transform.prototype.inverseTransformX = function(x) {
2359
+ var xWorld = 0;
2360
+ var deviceExtX = this.ldeviceExtX;
2361
+ if (deviceExtX != 0) {
2362
+ xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX;
2363
+ }
2364
+ return xWorld;
2365
+ };
2366
+ Transform.prototype.inverseTransformY = function(y) {
2367
+ var yWorld = 0;
2368
+ var deviceExtY = this.ldeviceExtY;
2369
+ if (deviceExtY != 0) {
2370
+ yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY;
2371
+ }
2372
+ return yWorld;
2373
+ };
2374
+ Transform.prototype.inverseTransformPoint = function(inPoint) {
2375
+ var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y));
2376
+ return outPoint;
2377
+ };
2378
+ module2.exports = Transform;
2379
+ },
2380
+ /* 18 */
2381
+ /***/
2382
+ function(module2, exports2, __webpack_require__) {
2383
+ function _toConsumableArray(arr) {
2384
+ if (Array.isArray(arr)) {
2385
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
2386
+ arr2[i] = arr[i];
2387
+ }
2388
+ return arr2;
2389
+ } else {
2390
+ return Array.from(arr);
2391
+ }
2392
+ }
2393
+ var Layout2 = __webpack_require__(15);
2394
+ var FDLayoutConstants = __webpack_require__(7);
2395
+ var LayoutConstants = __webpack_require__(0);
2396
+ var IGeometry = __webpack_require__(8);
2397
+ var IMath = __webpack_require__(9);
2398
+ function FDLayout() {
2399
+ Layout2.call(this);
2400
+ this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;
2401
+ this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
2402
+ this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;
2403
+ this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;
2404
+ this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;
2405
+ this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;
2406
+ this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;
2407
+ this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;
2408
+ this.displacementThresholdPerNode = 3 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;
2409
+ this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
2410
+ this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
2411
+ this.totalDisplacement = 0;
2412
+ this.oldTotalDisplacement = 0;
2413
+ this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;
2414
+ }
2415
+ FDLayout.prototype = Object.create(Layout2.prototype);
2416
+ for (var prop in Layout2) {
2417
+ FDLayout[prop] = Layout2[prop];
2418
+ }
2419
+ FDLayout.prototype.initParameters = function() {
2420
+ Layout2.prototype.initParameters.call(this, arguments);
2421
+ this.totalIterations = 0;
2422
+ this.notAnimatedIterations = 0;
2423
+ this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;
2424
+ this.grid = [];
2425
+ };
2426
+ FDLayout.prototype.calcIdealEdgeLengths = function() {
2427
+ var edge;
2428
+ var lcaDepth;
2429
+ var source;
2430
+ var target;
2431
+ var sizeOfSourceInLca;
2432
+ var sizeOfTargetInLca;
2433
+ var allEdges = this.getGraphManager().getAllEdges();
2434
+ for (var i = 0; i < allEdges.length; i++) {
2435
+ edge = allEdges[i];
2436
+ edge.idealLength = this.idealEdgeLength;
2437
+ if (edge.isInterGraph) {
2438
+ source = edge.getSource();
2439
+ target = edge.getTarget();
2440
+ sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();
2441
+ sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();
2442
+ if (this.useSmartIdealEdgeLengthCalculation) {
2443
+ edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE;
2444
+ }
2445
+ lcaDepth = edge.getLca().getInclusionTreeDepth();
2446
+ edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth);
2447
+ }
2448
+ }
2449
+ };
2450
+ FDLayout.prototype.initSpringEmbedder = function() {
2451
+ var s = this.getAllNodes().length;
2452
+ if (this.incremental) {
2453
+ if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {
2454
+ this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
2455
+ }
2456
+ this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;
2457
+ } else {
2458
+ if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {
2459
+ this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
2460
+ } else {
2461
+ this.coolingFactor = 1;
2462
+ }
2463
+ this.initialCoolingFactor = this.coolingFactor;
2464
+ this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;
2465
+ }
2466
+ this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations);
2467
+ this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;
2468
+ this.repulsionRange = this.calcRepulsionRange();
2469
+ };
2470
+ FDLayout.prototype.calcSpringForces = function() {
2471
+ var lEdges = this.getAllEdges();
2472
+ var edge;
2473
+ for (var i = 0; i < lEdges.length; i++) {
2474
+ edge = lEdges[i];
2475
+ this.calcSpringForce(edge, edge.idealLength);
2476
+ }
2477
+ };
2478
+ FDLayout.prototype.calcRepulsionForces = function() {
2479
+ var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
2480
+ var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
2481
+ var i, j;
2482
+ var nodeA, nodeB;
2483
+ var lNodes = this.getAllNodes();
2484
+ var processedNodeSet;
2485
+ if (this.useFRGridVariant) {
2486
+ if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) {
2487
+ this.updateGrid();
2488
+ }
2489
+ processedNodeSet = /* @__PURE__ */ new Set();
2490
+ for (i = 0; i < lNodes.length; i++) {
2491
+ nodeA = lNodes[i];
2492
+ this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);
2493
+ processedNodeSet.add(nodeA);
2494
+ }
2495
+ } else {
2496
+ for (i = 0; i < lNodes.length; i++) {
2497
+ nodeA = lNodes[i];
2498
+ for (j = i + 1; j < lNodes.length; j++) {
2499
+ nodeB = lNodes[j];
2500
+ if (nodeA.getOwner() != nodeB.getOwner()) {
2501
+ continue;
2502
+ }
2503
+ this.calcRepulsionForce(nodeA, nodeB);
2504
+ }
2505
+ }
2506
+ }
2507
+ };
2508
+ FDLayout.prototype.calcGravitationalForces = function() {
2509
+ var node;
2510
+ var lNodes = this.getAllNodesToApplyGravitation();
2511
+ for (var i = 0; i < lNodes.length; i++) {
2512
+ node = lNodes[i];
2513
+ this.calcGravitationalForce(node);
2514
+ }
2515
+ };
2516
+ FDLayout.prototype.moveNodes = function() {
2517
+ var lNodes = this.getAllNodes();
2518
+ var node;
2519
+ for (var i = 0; i < lNodes.length; i++) {
2520
+ node = lNodes[i];
2521
+ node.move();
2522
+ }
2523
+ };
2524
+ FDLayout.prototype.calcSpringForce = function(edge, idealLength) {
2525
+ var sourceNode = edge.getSource();
2526
+ var targetNode = edge.getTarget();
2527
+ var length;
2528
+ var springForce;
2529
+ var springForceX;
2530
+ var springForceY;
2531
+ if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) {
2532
+ edge.updateLengthSimple();
2533
+ } else {
2534
+ edge.updateLength();
2535
+ if (edge.isOverlapingSourceAndTarget) {
2536
+ return;
2537
+ }
2538
+ }
2539
+ length = edge.getLength();
2540
+ if (length == 0) return;
2541
+ springForce = this.springConstant * (length - idealLength);
2542
+ springForceX = springForce * (edge.lengthX / length);
2543
+ springForceY = springForce * (edge.lengthY / length);
2544
+ sourceNode.springForceX += springForceX;
2545
+ sourceNode.springForceY += springForceY;
2546
+ targetNode.springForceX -= springForceX;
2547
+ targetNode.springForceY -= springForceY;
2548
+ };
2549
+ FDLayout.prototype.calcRepulsionForce = function(nodeA, nodeB) {
2550
+ var rectA = nodeA.getRect();
2551
+ var rectB = nodeB.getRect();
2552
+ var overlapAmount = new Array(2);
2553
+ var clipPoints = new Array(4);
2554
+ var distanceX;
2555
+ var distanceY;
2556
+ var distanceSquared;
2557
+ var distance;
2558
+ var repulsionForce;
2559
+ var repulsionForceX;
2560
+ var repulsionForceY;
2561
+ if (rectA.intersects(rectB)) {
2562
+ IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2);
2563
+ repulsionForceX = 2 * overlapAmount[0];
2564
+ repulsionForceY = 2 * overlapAmount[1];
2565
+ var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);
2566
+ nodeA.repulsionForceX -= childrenConstant * repulsionForceX;
2567
+ nodeA.repulsionForceY -= childrenConstant * repulsionForceY;
2568
+ nodeB.repulsionForceX += childrenConstant * repulsionForceX;
2569
+ nodeB.repulsionForceY += childrenConstant * repulsionForceY;
2570
+ } else {
2571
+ if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) {
2572
+ distanceX = rectB.getCenterX() - rectA.getCenterX();
2573
+ distanceY = rectB.getCenterY() - rectA.getCenterY();
2574
+ } else {
2575
+ IGeometry.getIntersection(rectA, rectB, clipPoints);
2576
+ distanceX = clipPoints[2] - clipPoints[0];
2577
+ distanceY = clipPoints[3] - clipPoints[1];
2578
+ }
2579
+ if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) {
2580
+ distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST;
2581
+ }
2582
+ if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) {
2583
+ distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST;
2584
+ }
2585
+ distanceSquared = distanceX * distanceX + distanceY * distanceY;
2586
+ distance = Math.sqrt(distanceSquared);
2587
+ repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;
2588
+ repulsionForceX = repulsionForce * distanceX / distance;
2589
+ repulsionForceY = repulsionForce * distanceY / distance;
2590
+ nodeA.repulsionForceX -= repulsionForceX;
2591
+ nodeA.repulsionForceY -= repulsionForceY;
2592
+ nodeB.repulsionForceX += repulsionForceX;
2593
+ nodeB.repulsionForceY += repulsionForceY;
2594
+ }
2595
+ };
2596
+ FDLayout.prototype.calcGravitationalForce = function(node) {
2597
+ var ownerGraph;
2598
+ var ownerCenterX;
2599
+ var ownerCenterY;
2600
+ var distanceX;
2601
+ var distanceY;
2602
+ var absDistanceX;
2603
+ var absDistanceY;
2604
+ var estimatedSize;
2605
+ ownerGraph = node.getOwner();
2606
+ ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;
2607
+ ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;
2608
+ distanceX = node.getCenterX() - ownerCenterX;
2609
+ distanceY = node.getCenterY() - ownerCenterY;
2610
+ absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;
2611
+ absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;
2612
+ if (node.getOwner() == this.graphManager.getRoot()) {
2613
+ estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;
2614
+ if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {
2615
+ node.gravitationForceX = -this.gravityConstant * distanceX;
2616
+ node.gravitationForceY = -this.gravityConstant * distanceY;
2617
+ }
2618
+ } else {
2619
+ estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;
2620
+ if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {
2621
+ node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant;
2622
+ node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant;
2623
+ }
2624
+ }
2625
+ };
2626
+ FDLayout.prototype.isConverged = function() {
2627
+ var converged;
2628
+ var oscilating = false;
2629
+ if (this.totalIterations > this.maxIterations / 3) {
2630
+ oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;
2631
+ }
2632
+ converged = this.totalDisplacement < this.totalDisplacementThreshold;
2633
+ this.oldTotalDisplacement = this.totalDisplacement;
2634
+ return converged || oscilating;
2635
+ };
2636
+ FDLayout.prototype.animate = function() {
2637
+ if (this.animationDuringLayout && !this.isSubLayout) {
2638
+ if (this.notAnimatedIterations == this.animationPeriod) {
2639
+ this.update();
2640
+ this.notAnimatedIterations = 0;
2641
+ } else {
2642
+ this.notAnimatedIterations++;
2643
+ }
2644
+ }
2645
+ };
2646
+ FDLayout.prototype.calcNoOfChildrenForAllNodes = function() {
2647
+ var node;
2648
+ var allNodes = this.graphManager.getAllNodes();
2649
+ for (var i = 0; i < allNodes.length; i++) {
2650
+ node = allNodes[i];
2651
+ node.noOfChildren = node.getNoOfChildren();
2652
+ }
2653
+ };
2654
+ FDLayout.prototype.calcGrid = function(graph) {
2655
+ var sizeX = 0;
2656
+ var sizeY = 0;
2657
+ sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));
2658
+ sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));
2659
+ var grid = new Array(sizeX);
2660
+ for (var i = 0; i < sizeX; i++) {
2661
+ grid[i] = new Array(sizeY);
2662
+ }
2663
+ for (var i = 0; i < sizeX; i++) {
2664
+ for (var j = 0; j < sizeY; j++) {
2665
+ grid[i][j] = new Array();
2666
+ }
2667
+ }
2668
+ return grid;
2669
+ };
2670
+ FDLayout.prototype.addNodeToGrid = function(v, left, top) {
2671
+ var startX = 0;
2672
+ var finishX = 0;
2673
+ var startY = 0;
2674
+ var finishY = 0;
2675
+ startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));
2676
+ finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));
2677
+ startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));
2678
+ finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));
2679
+ for (var i = startX; i <= finishX; i++) {
2680
+ for (var j = startY; j <= finishY; j++) {
2681
+ this.grid[i][j].push(v);
2682
+ v.setGridCoordinates(startX, finishX, startY, finishY);
2683
+ }
2684
+ }
2685
+ };
2686
+ FDLayout.prototype.updateGrid = function() {
2687
+ var i;
2688
+ var nodeA;
2689
+ var lNodes = this.getAllNodes();
2690
+ this.grid = this.calcGrid(this.graphManager.getRoot());
2691
+ for (i = 0; i < lNodes.length; i++) {
2692
+ nodeA = lNodes[i];
2693
+ this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
2694
+ }
2695
+ };
2696
+ FDLayout.prototype.calculateRepulsionForceOfANode = function(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) {
2697
+ if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) {
2698
+ var surrounding = /* @__PURE__ */ new Set();
2699
+ nodeA.surrounding = new Array();
2700
+ var nodeB;
2701
+ var grid = this.grid;
2702
+ for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) {
2703
+ for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) {
2704
+ if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) {
2705
+ for (var k = 0; k < grid[i][j].length; k++) {
2706
+ nodeB = grid[i][j][k];
2707
+ if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) {
2708
+ continue;
2709
+ }
2710
+ if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) {
2711
+ var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2);
2712
+ var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2);
2713
+ if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) {
2714
+ surrounding.add(nodeB);
2715
+ }
2716
+ }
2717
+ }
2718
+ }
2719
+ }
2720
+ }
2721
+ nodeA.surrounding = [].concat(_toConsumableArray(surrounding));
2722
+ }
2723
+ for (i = 0; i < nodeA.surrounding.length; i++) {
2724
+ this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);
2725
+ }
2726
+ };
2727
+ FDLayout.prototype.calcRepulsionRange = function() {
2728
+ return 0;
2729
+ };
2730
+ module2.exports = FDLayout;
2731
+ },
2732
+ /* 19 */
2733
+ /***/
2734
+ function(module2, exports2, __webpack_require__) {
2735
+ var LEdge = __webpack_require__(1);
2736
+ var FDLayoutConstants = __webpack_require__(7);
2737
+ function FDLayoutEdge(source, target, vEdge) {
2738
+ LEdge.call(this, source, target, vEdge);
2739
+ this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
2740
+ }
2741
+ FDLayoutEdge.prototype = Object.create(LEdge.prototype);
2742
+ for (var prop in LEdge) {
2743
+ FDLayoutEdge[prop] = LEdge[prop];
2744
+ }
2745
+ module2.exports = FDLayoutEdge;
2746
+ },
2747
+ /* 20 */
2748
+ /***/
2749
+ function(module2, exports2, __webpack_require__) {
2750
+ var LNode = __webpack_require__(3);
2751
+ function FDLayoutNode(gm, loc, size, vNode) {
2752
+ LNode.call(this, gm, loc, size, vNode);
2753
+ this.springForceX = 0;
2754
+ this.springForceY = 0;
2755
+ this.repulsionForceX = 0;
2756
+ this.repulsionForceY = 0;
2757
+ this.gravitationForceX = 0;
2758
+ this.gravitationForceY = 0;
2759
+ this.displacementX = 0;
2760
+ this.displacementY = 0;
2761
+ this.startX = 0;
2762
+ this.finishX = 0;
2763
+ this.startY = 0;
2764
+ this.finishY = 0;
2765
+ this.surrounding = [];
2766
+ }
2767
+ FDLayoutNode.prototype = Object.create(LNode.prototype);
2768
+ for (var prop in LNode) {
2769
+ FDLayoutNode[prop] = LNode[prop];
2770
+ }
2771
+ FDLayoutNode.prototype.setGridCoordinates = function(_startX, _finishX, _startY, _finishY) {
2772
+ this.startX = _startX;
2773
+ this.finishX = _finishX;
2774
+ this.startY = _startY;
2775
+ this.finishY = _finishY;
2776
+ };
2777
+ module2.exports = FDLayoutNode;
2778
+ },
2779
+ /* 21 */
2780
+ /***/
2781
+ function(module2, exports2, __webpack_require__) {
2782
+ function DimensionD2(width, height) {
2783
+ this.width = 0;
2784
+ this.height = 0;
2785
+ if (width !== null && height !== null) {
2786
+ this.height = height;
2787
+ this.width = width;
2788
+ }
2789
+ }
2790
+ DimensionD2.prototype.getWidth = function() {
2791
+ return this.width;
2792
+ };
2793
+ DimensionD2.prototype.setWidth = function(width) {
2794
+ this.width = width;
2795
+ };
2796
+ DimensionD2.prototype.getHeight = function() {
2797
+ return this.height;
2798
+ };
2799
+ DimensionD2.prototype.setHeight = function(height) {
2800
+ this.height = height;
2801
+ };
2802
+ module2.exports = DimensionD2;
2803
+ },
2804
+ /* 22 */
2805
+ /***/
2806
+ function(module2, exports2, __webpack_require__) {
2807
+ var UniqueIDGeneretor = __webpack_require__(14);
2808
+ function HashMap() {
2809
+ this.map = {};
2810
+ this.keys = [];
2811
+ }
2812
+ HashMap.prototype.put = function(key, value) {
2813
+ var theId = UniqueIDGeneretor.createID(key);
2814
+ if (!this.contains(theId)) {
2815
+ this.map[theId] = value;
2816
+ this.keys.push(key);
2817
+ }
2818
+ };
2819
+ HashMap.prototype.contains = function(key) {
2820
+ UniqueIDGeneretor.createID(key);
2821
+ return this.map[key] != null;
2822
+ };
2823
+ HashMap.prototype.get = function(key) {
2824
+ var theId = UniqueIDGeneretor.createID(key);
2825
+ return this.map[theId];
2826
+ };
2827
+ HashMap.prototype.keySet = function() {
2828
+ return this.keys;
2829
+ };
2830
+ module2.exports = HashMap;
2831
+ },
2832
+ /* 23 */
2833
+ /***/
2834
+ function(module2, exports2, __webpack_require__) {
2835
+ var UniqueIDGeneretor = __webpack_require__(14);
2836
+ function HashSet() {
2837
+ this.set = {};
2838
+ }
2839
+ HashSet.prototype.add = function(obj) {
2840
+ var theId = UniqueIDGeneretor.createID(obj);
2841
+ if (!this.contains(theId)) this.set[theId] = obj;
2842
+ };
2843
+ HashSet.prototype.remove = function(obj) {
2844
+ delete this.set[UniqueIDGeneretor.createID(obj)];
2845
+ };
2846
+ HashSet.prototype.clear = function() {
2847
+ this.set = {};
2848
+ };
2849
+ HashSet.prototype.contains = function(obj) {
2850
+ return this.set[UniqueIDGeneretor.createID(obj)] == obj;
2851
+ };
2852
+ HashSet.prototype.isEmpty = function() {
2853
+ return this.size() === 0;
2854
+ };
2855
+ HashSet.prototype.size = function() {
2856
+ return Object.keys(this.set).length;
2857
+ };
2858
+ HashSet.prototype.addAllTo = function(list) {
2859
+ var keys = Object.keys(this.set);
2860
+ var length = keys.length;
2861
+ for (var i = 0; i < length; i++) {
2862
+ list.push(this.set[keys[i]]);
2863
+ }
2864
+ };
2865
+ HashSet.prototype.size = function() {
2866
+ return Object.keys(this.set).length;
2867
+ };
2868
+ HashSet.prototype.addAll = function(list) {
2869
+ var s = list.length;
2870
+ for (var i = 0; i < s; i++) {
2871
+ var v = list[i];
2872
+ this.add(v);
2873
+ }
2874
+ };
2875
+ module2.exports = HashSet;
2876
+ },
2877
+ /* 24 */
2878
+ /***/
2879
+ function(module2, exports2, __webpack_require__) {
2880
+ var _createClass = /* @__PURE__ */ function() {
2881
+ function defineProperties(target, props) {
2882
+ for (var i = 0; i < props.length; i++) {
2883
+ var descriptor = props[i];
2884
+ descriptor.enumerable = descriptor.enumerable || false;
2885
+ descriptor.configurable = true;
2886
+ if ("value" in descriptor) descriptor.writable = true;
2887
+ Object.defineProperty(target, descriptor.key, descriptor);
2888
+ }
2889
+ }
2890
+ return function(Constructor, protoProps, staticProps) {
2891
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
2892
+ if (staticProps) defineProperties(Constructor, staticProps);
2893
+ return Constructor;
2894
+ };
2895
+ }();
2896
+ function _classCallCheck(instance, Constructor) {
2897
+ if (!(instance instanceof Constructor)) {
2898
+ throw new TypeError("Cannot call a class as a function");
2899
+ }
2900
+ }
2901
+ var LinkedList = __webpack_require__(11);
2902
+ var Quicksort = function() {
2903
+ function Quicksort2(A, compareFunction) {
2904
+ _classCallCheck(this, Quicksort2);
2905
+ if (compareFunction !== null || compareFunction !== void 0) this.compareFunction = this._defaultCompareFunction;
2906
+ var length = void 0;
2907
+ if (A instanceof LinkedList) length = A.size();
2908
+ else length = A.length;
2909
+ this._quicksort(A, 0, length - 1);
2910
+ }
2911
+ _createClass(Quicksort2, [{
2912
+ key: "_quicksort",
2913
+ value: function _quicksort(A, p, r) {
2914
+ if (p < r) {
2915
+ var q = this._partition(A, p, r);
2916
+ this._quicksort(A, p, q);
2917
+ this._quicksort(A, q + 1, r);
2918
+ }
2919
+ }
2920
+ }, {
2921
+ key: "_partition",
2922
+ value: function _partition(A, p, r) {
2923
+ var x = this._get(A, p);
2924
+ var i = p;
2925
+ var j = r;
2926
+ while (true) {
2927
+ while (this.compareFunction(x, this._get(A, j))) {
2928
+ j--;
2929
+ }
2930
+ while (this.compareFunction(this._get(A, i), x)) {
2931
+ i++;
2932
+ }
2933
+ if (i < j) {
2934
+ this._swap(A, i, j);
2935
+ i++;
2936
+ j--;
2937
+ } else return j;
2938
+ }
2939
+ }
2940
+ }, {
2941
+ key: "_get",
2942
+ value: function _get(object, index) {
2943
+ if (object instanceof LinkedList) return object.get_object_at(index);
2944
+ else return object[index];
2945
+ }
2946
+ }, {
2947
+ key: "_set",
2948
+ value: function _set(object, index, value) {
2949
+ if (object instanceof LinkedList) object.set_object_at(index, value);
2950
+ else object[index] = value;
2951
+ }
2952
+ }, {
2953
+ key: "_swap",
2954
+ value: function _swap(A, i, j) {
2955
+ var temp = this._get(A, i);
2956
+ this._set(A, i, this._get(A, j));
2957
+ this._set(A, j, temp);
2958
+ }
2959
+ }, {
2960
+ key: "_defaultCompareFunction",
2961
+ value: function _defaultCompareFunction(a, b) {
2962
+ return b > a;
2963
+ }
2964
+ }]);
2965
+ return Quicksort2;
2966
+ }();
2967
+ module2.exports = Quicksort;
2968
+ },
2969
+ /* 25 */
2970
+ /***/
2971
+ function(module2, exports2, __webpack_require__) {
2972
+ var _createClass = /* @__PURE__ */ function() {
2973
+ function defineProperties(target, props) {
2974
+ for (var i = 0; i < props.length; i++) {
2975
+ var descriptor = props[i];
2976
+ descriptor.enumerable = descriptor.enumerable || false;
2977
+ descriptor.configurable = true;
2978
+ if ("value" in descriptor) descriptor.writable = true;
2979
+ Object.defineProperty(target, descriptor.key, descriptor);
2980
+ }
2981
+ }
2982
+ return function(Constructor, protoProps, staticProps) {
2983
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
2984
+ if (staticProps) defineProperties(Constructor, staticProps);
2985
+ return Constructor;
2986
+ };
2987
+ }();
2988
+ function _classCallCheck(instance, Constructor) {
2989
+ if (!(instance instanceof Constructor)) {
2990
+ throw new TypeError("Cannot call a class as a function");
2991
+ }
2992
+ }
2993
+ var NeedlemanWunsch = function() {
2994
+ function NeedlemanWunsch2(sequence1, sequence2) {
2995
+ var match_score = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
2996
+ var mismatch_penalty = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1;
2997
+ var gap_penalty = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
2998
+ _classCallCheck(this, NeedlemanWunsch2);
2999
+ this.sequence1 = sequence1;
3000
+ this.sequence2 = sequence2;
3001
+ this.match_score = match_score;
3002
+ this.mismatch_penalty = mismatch_penalty;
3003
+ this.gap_penalty = gap_penalty;
3004
+ this.iMax = sequence1.length + 1;
3005
+ this.jMax = sequence2.length + 1;
3006
+ this.grid = new Array(this.iMax);
3007
+ for (var i = 0; i < this.iMax; i++) {
3008
+ this.grid[i] = new Array(this.jMax);
3009
+ for (var j = 0; j < this.jMax; j++) {
3010
+ this.grid[i][j] = 0;
3011
+ }
3012
+ }
3013
+ this.tracebackGrid = new Array(this.iMax);
3014
+ for (var _i = 0; _i < this.iMax; _i++) {
3015
+ this.tracebackGrid[_i] = new Array(this.jMax);
3016
+ for (var _j = 0; _j < this.jMax; _j++) {
3017
+ this.tracebackGrid[_i][_j] = [null, null, null];
3018
+ }
3019
+ }
3020
+ this.alignments = [];
3021
+ this.score = -1;
3022
+ this.computeGrids();
3023
+ }
3024
+ _createClass(NeedlemanWunsch2, [{
3025
+ key: "getScore",
3026
+ value: function getScore() {
3027
+ return this.score;
3028
+ }
3029
+ }, {
3030
+ key: "getAlignments",
3031
+ value: function getAlignments() {
3032
+ return this.alignments;
3033
+ }
3034
+ // Main dynamic programming procedure
3035
+ }, {
3036
+ key: "computeGrids",
3037
+ value: function computeGrids() {
3038
+ for (var j = 1; j < this.jMax; j++) {
3039
+ this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty;
3040
+ this.tracebackGrid[0][j] = [false, false, true];
3041
+ }
3042
+ for (var i = 1; i < this.iMax; i++) {
3043
+ this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty;
3044
+ this.tracebackGrid[i][0] = [false, true, false];
3045
+ }
3046
+ for (var _i2 = 1; _i2 < this.iMax; _i2++) {
3047
+ for (var _j2 = 1; _j2 < this.jMax; _j2++) {
3048
+ var diag = void 0;
3049
+ if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;
3050
+ else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty;
3051
+ var up = this.grid[_i2 - 1][_j2] + this.gap_penalty;
3052
+ var left = this.grid[_i2][_j2 - 1] + this.gap_penalty;
3053
+ var maxOf = [diag, up, left];
3054
+ var indices = this.arrayAllMaxIndexes(maxOf);
3055
+ this.grid[_i2][_j2] = maxOf[indices[0]];
3056
+ this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)];
3057
+ }
3058
+ }
3059
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
3060
+ }
3061
+ // Gets all possible valid sequence combinations
3062
+ }, {
3063
+ key: "alignmentTraceback",
3064
+ value: function alignmentTraceback() {
3065
+ var inProcessAlignments = [];
3066
+ inProcessAlignments.push({
3067
+ pos: [this.sequence1.length, this.sequence2.length],
3068
+ seq1: "",
3069
+ seq2: ""
3070
+ });
3071
+ while (inProcessAlignments[0]) {
3072
+ var current = inProcessAlignments[0];
3073
+ var directions = this.tracebackGrid[current.pos[0]][current.pos[1]];
3074
+ if (directions[0]) {
3075
+ inProcessAlignments.push({
3076
+ pos: [current.pos[0] - 1, current.pos[1] - 1],
3077
+ seq1: this.sequence1[current.pos[0] - 1] + current.seq1,
3078
+ seq2: this.sequence2[current.pos[1] - 1] + current.seq2
3079
+ });
3080
+ }
3081
+ if (directions[1]) {
3082
+ inProcessAlignments.push({
3083
+ pos: [current.pos[0] - 1, current.pos[1]],
3084
+ seq1: this.sequence1[current.pos[0] - 1] + current.seq1,
3085
+ seq2: "-" + current.seq2
3086
+ });
3087
+ }
3088
+ if (directions[2]) {
3089
+ inProcessAlignments.push({
3090
+ pos: [current.pos[0], current.pos[1] - 1],
3091
+ seq1: "-" + current.seq1,
3092
+ seq2: this.sequence2[current.pos[1] - 1] + current.seq2
3093
+ });
3094
+ }
3095
+ if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({
3096
+ sequence1: current.seq1,
3097
+ sequence2: current.seq2
3098
+ });
3099
+ inProcessAlignments.shift();
3100
+ }
3101
+ return this.alignments;
3102
+ }
3103
+ // Helper Functions
3104
+ }, {
3105
+ key: "getAllIndexes",
3106
+ value: function getAllIndexes(arr, val) {
3107
+ var indexes = [], i = -1;
3108
+ while ((i = arr.indexOf(val, i + 1)) !== -1) {
3109
+ indexes.push(i);
3110
+ }
3111
+ return indexes;
3112
+ }
3113
+ }, {
3114
+ key: "arrayAllMaxIndexes",
3115
+ value: function arrayAllMaxIndexes(array) {
3116
+ return this.getAllIndexes(array, Math.max.apply(null, array));
3117
+ }
3118
+ }]);
3119
+ return NeedlemanWunsch2;
3120
+ }();
3121
+ module2.exports = NeedlemanWunsch;
3122
+ },
3123
+ /* 26 */
3124
+ /***/
3125
+ function(module2, exports2, __webpack_require__) {
3126
+ var layoutBase2 = function layoutBase3() {
3127
+ return;
3128
+ };
3129
+ layoutBase2.FDLayout = __webpack_require__(18);
3130
+ layoutBase2.FDLayoutConstants = __webpack_require__(7);
3131
+ layoutBase2.FDLayoutEdge = __webpack_require__(19);
3132
+ layoutBase2.FDLayoutNode = __webpack_require__(20);
3133
+ layoutBase2.DimensionD = __webpack_require__(21);
3134
+ layoutBase2.HashMap = __webpack_require__(22);
3135
+ layoutBase2.HashSet = __webpack_require__(23);
3136
+ layoutBase2.IGeometry = __webpack_require__(8);
3137
+ layoutBase2.IMath = __webpack_require__(9);
3138
+ layoutBase2.Integer = __webpack_require__(10);
3139
+ layoutBase2.Point = __webpack_require__(12);
3140
+ layoutBase2.PointD = __webpack_require__(4);
3141
+ layoutBase2.RandomSeed = __webpack_require__(16);
3142
+ layoutBase2.RectangleD = __webpack_require__(13);
3143
+ layoutBase2.Transform = __webpack_require__(17);
3144
+ layoutBase2.UniqueIDGeneretor = __webpack_require__(14);
3145
+ layoutBase2.Quicksort = __webpack_require__(24);
3146
+ layoutBase2.LinkedList = __webpack_require__(11);
3147
+ layoutBase2.LGraphObject = __webpack_require__(2);
3148
+ layoutBase2.LGraph = __webpack_require__(5);
3149
+ layoutBase2.LEdge = __webpack_require__(1);
3150
+ layoutBase2.LGraphManager = __webpack_require__(6);
3151
+ layoutBase2.LNode = __webpack_require__(3);
3152
+ layoutBase2.Layout = __webpack_require__(15);
3153
+ layoutBase2.LayoutConstants = __webpack_require__(0);
3154
+ layoutBase2.NeedlemanWunsch = __webpack_require__(25);
3155
+ module2.exports = layoutBase2;
3156
+ },
3157
+ /* 27 */
3158
+ /***/
3159
+ function(module2, exports2, __webpack_require__) {
3160
+ function Emitter() {
3161
+ this.listeners = [];
3162
+ }
3163
+ var p = Emitter.prototype;
3164
+ p.addListener = function(event, callback) {
3165
+ this.listeners.push({
3166
+ event,
3167
+ callback
3168
+ });
3169
+ };
3170
+ p.removeListener = function(event, callback) {
3171
+ for (var i = this.listeners.length; i >= 0; i--) {
3172
+ var l = this.listeners[i];
3173
+ if (l.event === event && l.callback === callback) {
3174
+ this.listeners.splice(i, 1);
3175
+ }
3176
+ }
3177
+ };
3178
+ p.emit = function(event, data) {
3179
+ for (var i = 0; i < this.listeners.length; i++) {
3180
+ var l = this.listeners[i];
3181
+ if (event === l.event) {
3182
+ l.callback(data);
3183
+ }
3184
+ }
3185
+ };
3186
+ module2.exports = Emitter;
3187
+ }
3188
+ /******/
3189
+ ])
3190
+ );
3191
+ });
3192
+ })(layoutBase$1);
3193
+ return layoutBase$1.exports;
3194
+ }
3195
+ export {
3196
+ requireLayoutBase as __require
3197
+ };