@layers-app/editor 0.4.1-progress.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/README.md +37 -1
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.js +2 -2
  4. package/dist/{layers.b6DSxQLV.js → layers.0GV8bqI4.js} +6 -6
  5. package/dist/{layers.D56h41PX.js → layers.2-v72gXD.js} +1 -1
  6. package/dist/{layers.CltyxC3q.js → layers.271NUg7u.js} +1 -1
  7. package/dist/{layers.D2Tzu1xx.js → layers.2YgiancJ.js} +1 -1
  8. package/dist/{layers.XHdBpBIc.js → layers.3DEO2eFX.js} +1 -1
  9. package/dist/{layers.vggOk4T3.js → layers.3PKeLS62.js} +6 -6
  10. package/dist/{layers.DjRYd6_J.js → layers.6M02Y2O6.js} +1 -1
  11. package/dist/{layers.ZQ_-z-aL.js → layers.7DTJccah.js} +3 -3
  12. package/dist/{layers.BvcJQqPP.js → layers.7geZ_Z3x.js} +1 -1
  13. package/dist/{layers.D9Df9NSm.js → layers.88aO_Zsd.js} +2 -2
  14. package/dist/{layers.CWQb-v3n.js → layers.8hFVbiPY.js} +12 -12
  15. package/dist/{layers.BNiUL2Vg.js → layers.9KaBpXFA.js} +5 -5
  16. package/dist/layers.AIKsYMqL.js +8 -0
  17. package/dist/{layers.Y42vCoBD.js → layers.B-0J3b5U.js} +1 -1
  18. package/dist/{layers.CRbZFXp0.js → layers.B4yEsxVs.js} +1 -1
  19. package/dist/{layers.uf8nbAjB.js → layers.B5Xhxhbr.js} +1 -1
  20. package/dist/{layers.1RmgGsLp.js → layers.B6jgTP72.js} +1 -1
  21. package/dist/{layers.DYgifwCe.js → layers.B8a2ydDI.js} +2 -2
  22. package/dist/layers.B9EoV4pJ.js +1 -0
  23. package/dist/{layers.B8vyhX3w.js → layers.BAI7Z-Wd.js} +1 -1
  24. package/dist/{layers.C_YVSLx2.js → layers.BB24KMYM.js} +6 -6
  25. package/dist/{layers.CVO2cgHn.js → layers.BBWAKePM.js} +1 -1
  26. package/dist/{layers.CMV5IiUc.js → layers.BBWcXYuR.js} +1 -1
  27. package/dist/{layers.vmEHkEhU.js → layers.BC3JkNtz.js} +4 -4
  28. package/dist/{layers.Dera5nI8.js → layers.BFKY-mk1.js} +1 -1
  29. package/dist/{layers.O16Qu9DR.js → layers.BGnHNrIw.js} +1 -1
  30. package/dist/{layers.CNcbY4HA.js → layers.BIF7gnlw.js} +1 -1
  31. package/dist/layers.BJDrjORS.js +244 -0
  32. package/dist/{layers.BRbDF_Rn.js → layers.BJtqK_fc.js} +1 -1
  33. package/dist/{layers.DGjpnqy8.js → layers.BLMsv5-v.js} +71 -71
  34. package/dist/layers.BLd2spTm.js +1 -0
  35. package/dist/{layers.B3BB_VRY.js → layers.BLj5XN2k.js} +4 -4
  36. package/dist/{layers.B0J4f_xf.js → layers.BMzZVoyQ.js} +1 -1
  37. package/dist/{layers.ms8NfStk.js → layers.BN0X-mKK.js} +1 -1
  38. package/dist/{layers.Dlx-9qlV.js → layers.BNP0J0MG.js} +1 -1
  39. package/dist/{layers.CeljVLEY.js → layers.BQgrfzZU.js} +1 -1
  40. package/dist/{layers.CyPA2u9-.js → layers.BRFujA4d.js} +1 -1
  41. package/dist/{layers.BV_nreRT.js → layers.BSXvhEG5.js} +1 -1
  42. package/dist/{layers.Dn51Gu3w.js → layers.BSzdascH.js} +1 -1
  43. package/dist/{layers.C3kfFCwy.js → layers.BTsJAbTY.js} +1 -1
  44. package/dist/{layers.CRIXCu9y.js → layers.BUpmCmqT.js} +1 -1
  45. package/dist/{layers.BXlqVxG4.js → layers.BVAnEpZl.js} +1 -1
  46. package/dist/{layers.vsJbLxBG.js → layers.BW84v3Ox.js} +2 -2
  47. package/dist/layers.B_Lan92M.js +1 -0
  48. package/dist/{layers.BfFWkiCr.js → layers.BaW-t_Zc.js} +1 -1
  49. package/dist/{layers.DWyWcSYq.js → layers.BapT0txt.js} +1 -1
  50. package/dist/{layers.DChAJIDE.js → layers.BdqQLuaK.js} +1 -1
  51. package/dist/{layers.RskRv7xC.js → layers.Bdwk_Ggl.js} +1 -1
  52. package/dist/{layers.2aPuvps8.js → layers.Bg7-KHZC.js} +3 -3
  53. package/dist/{layers.1df9kFxm.js → layers.BkFD_pHb.js} +1 -1
  54. package/dist/{layers.3YvcJPBv.js → layers.BlN6GnRT.js} +1 -1
  55. package/dist/{layers.JWXTGwdn.js → layers.Bm84E1I5.js} +1 -1
  56. package/dist/{layers.Lv1hsK8F.js → layers.Bo3tMbEB.js} +1 -1
  57. package/dist/{layers.CUM6WWJc.js → layers.BoOcWXFs.js} +1 -1
  58. package/dist/{layers.OkAEP5sK.js → layers.BrHN_kMd.js} +1 -1
  59. package/dist/{layers.BU089OsF.js → layers.BruMG2wy.js} +1 -1
  60. package/dist/{layers.CQ_Gb_tr.js → layers.BsWPnWD1.js} +1 -1
  61. package/dist/{layers.CsUFpQDp.js → layers.Bu9ZoRYM.js} +1 -1
  62. package/dist/{layers.D8g04PjT.js → layers.BvjpCDHj.js} +1 -1
  63. package/dist/{layers.D5Wk7Brs.js → layers.Bwb7QBBL.js} +1 -1
  64. package/dist/{layers.CA3xAcdD.js → layers.Bx0DgrIz.js} +1 -1
  65. package/dist/{layers.MfF8Mar4.js → layers.By8wynAO.js} +1 -1
  66. package/dist/{layers.B2AGu32C.js → layers.C0Lgw_Sx.js} +1107 -1111
  67. package/dist/{layers.BM5aqSQa.js → layers.C3me1AOA.js} +3 -3
  68. package/dist/{layers.nbOz9XY9.js → layers.C5XL_KJW.js} +1 -1
  69. package/dist/{layers.CnZQE2Pi.js → layers.C65tYhLf.js} +1 -1
  70. package/dist/{layers.BGSQMYfb.js → layers.C67fBVg3.js} +1 -1
  71. package/dist/{layers.B9yJUkZR.js → layers.C6HmVi2T.js} +1 -1
  72. package/dist/{layers.DSNZlSxG.js → layers.C8oO_BiQ.js} +1 -1
  73. package/dist/{layers.C6dIKT7t.js → layers.C9AvvTRV.js} +1 -1
  74. package/dist/{layers.Be4S2sq-.js → layers.CA3DQGmO.js} +1 -1
  75. package/dist/{layers.DS6sUpQY.js → layers.CCoWlQxf.js} +1 -1
  76. package/dist/{layers.B31bUvoU.js → layers.CCy49ah1.js} +1 -1
  77. package/dist/{layers.NZaKqPGi.js → layers.CDftR5Kg.js} +2 -2
  78. package/dist/{layers.Cpp1ZEuF.js → layers.CDw-iNbj.js} +1 -1
  79. package/dist/{layers.DO-43L6O.js → layers.CEDfv2oj.js} +1 -1
  80. package/dist/{layers.CLz5oPPj.js → layers.CGeTu6ph.js} +1 -1
  81. package/dist/{layers.wmlkGZ6N.js → layers.CJlWYRtk.js} +1 -1
  82. package/dist/{layers.D2KUO0dY.js → layers.CKy_DRKv.js} +1 -1
  83. package/dist/{layers.C0uya3UC.js → layers.COEorZbZ.js} +1 -1
  84. package/dist/{layers.DnXE-nI2.js → layers.CP2_7vUR.js} +1 -1
  85. package/dist/{layers.BFGghBqX.js → layers.CPEzOey-.js} +1 -1
  86. package/dist/{layers.BKEU6fbU.js → layers.CSY_lOK0.js} +6 -6
  87. package/dist/{layers.0EGX3HEy.js → layers.CT_bvOgC.js} +1 -1
  88. package/dist/{layers.zPlc1039.js → layers.CUWVPrVU.js} +1 -1
  89. package/dist/{layers.C9s4Ga9-.js → layers.CVCC2rNb.js} +1 -1
  90. package/dist/{layers.BK7LrtsI.js → layers.CXbK6Z0C.js} +1 -1
  91. package/dist/{layers.CzRgGVNU.js → layers.CXzpm8-U.js} +1 -1
  92. package/dist/{layers.BtWb_X9E.js → layers.CYwLZCUi.js} +3 -3
  93. package/dist/{layers.OJEt97_Q.js → layers.CZ6FLSh1.js} +1 -1
  94. package/dist/{layers.CjFEU6yv.js → layers.CZzvHupu.js} +1 -1
  95. package/dist/{layers.DvXH8BN-.js → layers.CaZJgSbm.js} +1 -1
  96. package/dist/{layers.BCCZdUAo.js → layers.CcX1e4Cb.js} +1 -1
  97. package/dist/{layers.pw41pFms.js → layers.CgHCxAKJ.js} +1 -1
  98. package/dist/{layers.D2SIBPjl.js → layers.CgyRf-4B.js} +1 -1
  99. package/dist/{layers.DU9bT12-.js → layers.ChtNiFGR.js} +1 -1
  100. package/dist/{layers.Dj2x2a5K.js → layers.CiYt11kd.js} +1 -1
  101. package/dist/{layers.CFMVSllB.js → layers.Cik9ty7R.js} +1 -1
  102. package/dist/{layers.DMyyjog4.js → layers.Cizp88rb.js} +1 -1
  103. package/dist/{layers.vrcLKgWz.js → layers.Cjxg13wd.js} +24623 -23437
  104. package/dist/{layers.CAt0Toqo.js → layers.Cl6-9OBf.js} +1 -1
  105. package/dist/{layers.DneGJ5YW.js → layers.ClExSsZJ.js} +1 -1
  106. package/dist/{layers.BwReZ0XC.js → layers.CqE1nYk3.js} +1 -1
  107. package/dist/{layers.Fwx6Z-E0.js → layers.CsNI3f74.js} +1 -1
  108. package/dist/{layers.CLX5RFJB.js → layers.CuAECIsO.js} +1 -1
  109. package/dist/{layers.DKvSkiyS.js → layers.CuVNrIcW.js} +1 -1
  110. package/dist/{layers.C_kJ5c3l.js → layers.Cv-z4RwC.js} +1 -1
  111. package/dist/{layers.BY4eBmlK.js → layers.CvPdAUZN.js} +1 -1
  112. package/dist/{layers.CdKuzWdD.js → layers.CvQiknH6.js} +1 -1
  113. package/dist/{layers.GqCRYDXG.js → layers.Cwn1D7F6.js} +1 -1
  114. package/dist/{layers.CaXcZpWP.js → layers.CyOP0v_-.js} +1 -1
  115. package/dist/{layers.CUBdNh1l.js → layers.CyvQNQUj.js} +1 -1
  116. package/dist/layers.Cyzu9PKQ.js +1 -0
  117. package/dist/{layers.mwnm89da.js → layers.Cz4E3Gls.js} +8 -8
  118. package/dist/{layers.BCpU6Rx2.js → layers.D-rCo5dz.js} +1 -1
  119. package/dist/{layers.B7pMHVvI.js → layers.D11yimAp.js} +7 -7
  120. package/dist/{layers.BrlarkcH.js → layers.D1sBwAcX.js} +1 -1
  121. package/dist/{layers.DfHyYQto.js → layers.D22AIgry.js} +1 -1
  122. package/dist/{layers.DwlMkCL5.js → layers.D2Y56Lcj.js} +1 -1
  123. package/dist/{layers.CBmWR4JD.js → layers.D2sjiqI3.js} +1 -1
  124. package/dist/{layers.CPGH36Hx.js → layers.D3OtVkCp.js} +1 -1
  125. package/dist/{layers.Dg-bFIGZ.js → layers.D3pymTps.js} +1 -1
  126. package/dist/{layers.MZxHWl05.js → layers.D44d_6CD.js} +4 -4
  127. package/dist/layers.D4T8fTcj.js +1223 -0
  128. package/dist/{layers.CEpgYsO5.js → layers.D9umovmT.js} +1 -1
  129. package/dist/{layers.6hpmGhQ7.js → layers.DE-6jvOp.js} +1 -1
  130. package/dist/{layers.BX_VhzvH.js → layers.DFWypiYS.js} +1 -1
  131. package/dist/{layers.CX7R1NFA.js → layers.DFZcoBfL.js} +1 -1
  132. package/dist/{layers.7RKu5qAq.js → layers.DGHPyPPP.js} +1 -1
  133. package/dist/{layers.pmoMn3BH.js → layers.DL_hhIIR.js} +3 -3
  134. package/dist/{layers.QKd6brRD.js → layers.DMkqdBNu.js} +1 -1
  135. package/dist/{layers.B9oGbUwj.js → layers.DNpGJLyQ.js} +2 -2
  136. package/dist/{layers.DBFfWJxR.js → layers.DPumOFMF.js} +1 -1
  137. package/dist/{layers.p871JVGx.js → layers.DQ9duwtV.js} +5 -5
  138. package/dist/{layers.AmKAZWLq.js → layers.DQSx2qqb.js} +1 -1
  139. package/dist/{layers.DVysgz_L.js → layers.DRj2t11p.js} +1 -1
  140. package/dist/{layers.CY2dfUZP.js → layers.DWvD3vql.js} +6 -6
  141. package/dist/{layers.B1O1xaS8.js → layers.DXVNKM5t.js} +1 -1
  142. package/dist/{layers.DPRdtwVX.js → layers.DXg_yjAg.js} +1 -1
  143. package/dist/{layers.Bp_LzOtD.js → layers.DYXNu8ur.js} +1 -1
  144. package/dist/layers.Da3-MQaS.js +315 -0
  145. package/dist/{layers.CVg-xbVM.js → layers.DbEYtfVc.js} +2249 -2231
  146. package/dist/{layers.CGWEiDtE.js → layers.Dc79Ci3K.js} +3 -3
  147. package/dist/{layers.Cbk6-WFM.js → layers.DdaAmsdK.js} +1 -1
  148. package/dist/{layers.D97nDwEx.js → layers.DeGb7buU.js} +1 -1
  149. package/dist/{layers.B3jz2GM9.js → layers.DeUrAJLR.js} +4 -4
  150. package/dist/{layers.BSZN_1IW.js → layers.DfLG2r9J.js} +1 -1
  151. package/dist/{layers.DZVdzwBS.js → layers.DfVTedYs.js} +1 -1
  152. package/dist/{layers.C3Efr78e.js → layers.DgM9vwax.js} +1 -1
  153. package/dist/layers.Dhzc98B1.js +1 -0
  154. package/dist/{layers.C4DnE7f4.js → layers.Dit1Y-a1.js} +1 -1
  155. package/dist/{layers.D3rmRYuA.js → layers.Dj4g5Vb5.js} +1 -1
  156. package/dist/{layers.BuQv8-pQ.js → layers.DkOYepgq.js} +1 -1
  157. package/dist/{layers.CwL5PiXG.js → layers.Dld8CjhI.js} +1 -1
  158. package/dist/{layers.DPkkvYnI.js → layers.Dlp-dPD8.js} +28 -28
  159. package/dist/{layers.vXYsjfZS.js → layers.DlrAk6DA.js} +1 -1
  160. package/dist/{layers.C6rE9oi4.js → layers.Dm5fcqXE.js} +1 -1
  161. package/dist/{layers.BrwdJtoi.js → layers.DpuQVg48.js} +1 -1
  162. package/dist/{layers.BcAvrhb2.js → layers.DqT5Jouj.js} +1 -1
  163. package/dist/{layers.CF3SIE-y.js → layers.DrlOZ3DT.js} +1 -1
  164. package/dist/{layers.CHe9Q8ia.js → layers.DsSMSFyE.js} +1 -1
  165. package/dist/layers.DtcuZ6vs.js +187 -0
  166. package/dist/{layers.CHV4TIWj.js → layers.DuGoIpLS.js} +5 -5
  167. package/dist/{layers.Dd8k3mGW.js → layers.DxS_nrN5.js} +1 -1
  168. package/dist/{layers.BEWGfzM9.js → layers.DxhSwb8B.js} +320 -319
  169. package/dist/{layers.CN0RXanE.js → layers.DxwOJMY_.js} +1 -1
  170. package/dist/{layers.BMWTYLoS.js → layers.DyPFKCS6.js} +3 -3
  171. package/dist/{layers.Bm9A8t2O.js → layers.DyydDZDU.js} +1 -1
  172. package/dist/{layers.RkLEX3Zh.js → layers.GaSOetZx.js} +1 -1
  173. package/dist/{layers.xJXWA8H6.js → layers.IAZiYFRK.js} +1 -1
  174. package/dist/layers.JgqeK3h7.js +1 -0
  175. package/dist/layers.K2rcpzhY.js +4 -0
  176. package/dist/{layers.CTinG4fA.js → layers.KIWs25tZ.js} +1 -1
  177. package/dist/{layers.gBi0hIYC.js → layers.LLke4z7b.js} +1 -1
  178. package/dist/{layers.DL83jGn_.js → layers.Marfmnqs.js} +1 -1
  179. package/dist/{layers.BIOgNBCU.js → layers.OFho5MbN.js} +1 -1
  180. package/dist/layers.R8QN7W65.js +1 -0
  181. package/dist/{layers.BpLN4VBV.js → layers.RT_eBoD-.js} +1 -1
  182. package/dist/{layers.erJbqYPP.js → layers.SbloXQp4.js} +1 -1
  183. package/dist/{layers.DvbNClAr.js → layers.SvUN62A9.js} +1 -1
  184. package/dist/{layers.DmXbI_X6.js → layers.TGEy1wS6.js} +1 -1
  185. package/dist/{layers.CEnd1x3K.js → layers.TdE-jeZL.js} +1 -1
  186. package/dist/{layers.BejsVBlP.js → layers.UWRNxgT8.js} +1 -1
  187. package/dist/{layers.CvCD8PmL.js → layers.VA5efHzM.js} +1 -1
  188. package/dist/layers._2_sfSMa.js +1 -0
  189. package/dist/{layers.rNpo9CKl.js → layers.ajIRcGd4.js} +1 -1
  190. package/dist/{layers.B9x4sQmU.js → layers.cjE12qw2.js} +1 -1
  191. package/dist/{layers.COPB0bHF.js → layers.dJvyCZ1b.js} +1 -1
  192. package/dist/{layers.CwE7GdQT.js → layers.da887to_.js} +1 -1
  193. package/dist/{layers.DnyqZntR.js → layers.dhxVHEDE.js} +1 -1
  194. package/dist/{layers.DT14b_tp.js → layers.ejvu1U9t.js} +1 -1
  195. package/dist/{layers.CUKl38op.js → layers.epvyXTdV.js} +5 -5
  196. package/dist/layers.fm_nJlxH.js +6 -0
  197. package/dist/{layers.DRrRO-pI.js → layers.guGfRsPS.js} +1 -1
  198. package/dist/layers.hweLqW3I.js +261 -0
  199. package/dist/{layers.nHHM2gEW.js → layers.j04tfCKj.js} +1 -1
  200. package/dist/{layers.Iok4Hx4P.js → layers.kzDq9Q-l.js} +1 -1
  201. package/dist/{layers.CpvexSFh.js → layers.ldz4asX5.js} +6 -6
  202. package/dist/{layers.DRk9pZsP.js → layers.ov1rbOW3.js} +1 -1
  203. package/dist/{layers.Ru0qupSB.js → layers.pHVqEwm3.js} +1 -1
  204. package/dist/{layers.BmKPR1Q_.js → layers.rgYI6gus.js} +2 -2
  205. package/dist/{layers.B97E5Ket.js → layers.sTUiyAuM.js} +1 -1
  206. package/dist/{layers.Cb-u0SLP.js → layers.uMaAjCOP.js} +5 -5
  207. package/dist/{layers.BVzXy_Es.js → layers.vJ0fdhPp.js} +78 -78
  208. package/dist/{layers.DYrmRjRC.js → layers.vqKLXMfn.js} +1 -1
  209. package/dist/{layers.CacJtvRK.js → layers.wSBHMHgW.js} +1 -1
  210. package/dist/{layers.CutHJDp4.js → layers.yquOOwF7.js} +1 -1
  211. package/dist/{layers.W2ukY1Da.js → layers.zJTwyIu5.js} +1 -1
  212. package/package.json +8 -8
  213. package/dist/layers.5l4Zrk2L.js +0 -1
  214. package/dist/layers.9QK1wiQj.js +0 -1
  215. package/dist/layers.B93hVIUg.js +0 -319
  216. package/dist/layers.BArswBu6.js +0 -1
  217. package/dist/layers.BSJVn_-a.js +0 -4
  218. package/dist/layers.BSQmbaLA.js +0 -1
  219. package/dist/layers.C7lIplJU.js +0 -247
  220. package/dist/layers.COAF7f8g.js +0 -1
  221. package/dist/layers.CTHKUBrY.js +0 -1
  222. package/dist/layers.CcEJHfTE.js +0 -6
  223. package/dist/layers.Cs24L6er.js +0 -261
  224. package/dist/layers.D4fGb2cV.js +0 -1272
  225. package/dist/layers.DRLM7uPa.js +0 -1
  226. package/dist/layers.DnGlTnoF.js +0 -8
  227. package/dist/layers.MRw7LhZs.js +0 -185
  228. package/dist/layers.QgpZpst1.js +0 -1
@@ -1,247 +0,0 @@
1
- import * as i from "lodash-es";
2
- var p = "\0", o = "\0", f = "";
3
- class m {
4
- constructor(e = {}) {
5
- this._isDirected = i.has(e, "directed") ? e.directed : !0, this._isMultigraph = i.has(e, "multigraph") ? e.multigraph : !1, this._isCompound = i.has(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = i.constant(void 0), this._defaultEdgeLabelFn = i.constant(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[o] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
6
- }
7
- /* === Graph functions ========= */
8
- isDirected() {
9
- return this._isDirected;
10
- }
11
- isMultigraph() {
12
- return this._isMultigraph;
13
- }
14
- isCompound() {
15
- return this._isCompound;
16
- }
17
- setGraph(e) {
18
- return this._label = e, this;
19
- }
20
- graph() {
21
- return this._label;
22
- }
23
- /* === Node functions ========== */
24
- setDefaultNodeLabel(e) {
25
- return i.isFunction(e) || (e = i.constant(e)), this._defaultNodeLabelFn = e, this;
26
- }
27
- nodeCount() {
28
- return this._nodeCount;
29
- }
30
- nodes() {
31
- return i.keys(this._nodes);
32
- }
33
- sources() {
34
- var e = this;
35
- return i.filter(this.nodes(), function(t) {
36
- return i.isEmpty(e._in[t]);
37
- });
38
- }
39
- sinks() {
40
- var e = this;
41
- return i.filter(this.nodes(), function(t) {
42
- return i.isEmpty(e._out[t]);
43
- });
44
- }
45
- setNodes(e, t) {
46
- var s = arguments, r = this;
47
- return i.each(e, function(n) {
48
- s.length > 1 ? r.setNode(n, t) : r.setNode(n);
49
- }), this;
50
- }
51
- setNode(e, t) {
52
- return i.has(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = o, this._children[e] = {}, this._children[o][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
53
- }
54
- node(e) {
55
- return this._nodes[e];
56
- }
57
- hasNode(e) {
58
- return i.has(this._nodes, e);
59
- }
60
- removeNode(e) {
61
- var t = this;
62
- if (i.has(this._nodes, e)) {
63
- var s = function(r) {
64
- t.removeEdge(t._edgeObjs[r]);
65
- };
66
- delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], i.each(this.children(e), function(r) {
67
- t.setParent(r);
68
- }), delete this._children[e]), i.each(i.keys(this._in[e]), s), delete this._in[e], delete this._preds[e], i.each(i.keys(this._out[e]), s), delete this._out[e], delete this._sucs[e], --this._nodeCount;
69
- }
70
- return this;
71
- }
72
- setParent(e, t) {
73
- if (!this._isCompound)
74
- throw new Error("Cannot set parent in a non-compound graph");
75
- if (i.isUndefined(t))
76
- t = o;
77
- else {
78
- t += "";
79
- for (var s = t; !i.isUndefined(s); s = this.parent(s))
80
- if (s === e)
81
- throw new Error("Setting " + t + " as parent of " + e + " would create a cycle");
82
- this.setNode(t);
83
- }
84
- return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = t, this._children[t][e] = !0, this;
85
- }
86
- _removeFromParentsChildList(e) {
87
- delete this._children[this._parent[e]][e];
88
- }
89
- parent(e) {
90
- if (this._isCompound) {
91
- var t = this._parent[e];
92
- if (t !== o)
93
- return t;
94
- }
95
- }
96
- children(e) {
97
- if (i.isUndefined(e) && (e = o), this._isCompound) {
98
- var t = this._children[e];
99
- if (t)
100
- return i.keys(t);
101
- } else {
102
- if (e === o)
103
- return this.nodes();
104
- if (this.hasNode(e))
105
- return [];
106
- }
107
- }
108
- predecessors(e) {
109
- var t = this._preds[e];
110
- if (t)
111
- return i.keys(t);
112
- }
113
- successors(e) {
114
- var t = this._sucs[e];
115
- if (t)
116
- return i.keys(t);
117
- }
118
- neighbors(e) {
119
- var t = this.predecessors(e);
120
- if (t)
121
- return i.union(t, this.successors(e));
122
- }
123
- isLeaf(e) {
124
- var t;
125
- return this.isDirected() ? t = this.successors(e) : t = this.neighbors(e), t.length === 0;
126
- }
127
- filterNodes(e) {
128
- var t = new this.constructor({
129
- directed: this._isDirected,
130
- multigraph: this._isMultigraph,
131
- compound: this._isCompound
132
- });
133
- t.setGraph(this.graph());
134
- var s = this;
135
- i.each(this._nodes, function(h, d) {
136
- e(d) && t.setNode(d, h);
137
- }), i.each(this._edgeObjs, function(h) {
138
- t.hasNode(h.v) && t.hasNode(h.w) && t.setEdge(h, s.edge(h));
139
- });
140
- var r = {};
141
- function n(h) {
142
- var d = s.parent(h);
143
- return d === void 0 || t.hasNode(d) ? (r[h] = d, d) : d in r ? r[d] : n(d);
144
- }
145
- return this._isCompound && i.each(t.nodes(), function(h) {
146
- t.setParent(h, n(h));
147
- }), t;
148
- }
149
- /* === Edge functions ========== */
150
- setDefaultEdgeLabel(e) {
151
- return i.isFunction(e) || (e = i.constant(e)), this._defaultEdgeLabelFn = e, this;
152
- }
153
- edgeCount() {
154
- return this._edgeCount;
155
- }
156
- edges() {
157
- return i.values(this._edgeObjs);
158
- }
159
- setPath(e, t) {
160
- var s = this, r = arguments;
161
- return i.reduce(e, function(n, h) {
162
- return r.length > 1 ? s.setEdge(n, h, t) : s.setEdge(n, h), h;
163
- }), this;
164
- }
165
- /*
166
- * setEdge(v, w, [value, [name]])
167
- * setEdge({ v, w, [name] }, [value])
168
- */
169
- setEdge() {
170
- var e, t, s, r, n = !1, h = arguments[0];
171
- typeof h == "object" && h !== null && "v" in h ? (e = h.v, t = h.w, s = h.name, arguments.length === 2 && (r = arguments[1], n = !0)) : (e = h, t = arguments[1], s = arguments[3], arguments.length > 2 && (r = arguments[2], n = !0)), e = "" + e, t = "" + t, i.isUndefined(s) || (s = "" + s);
172
- var d = _(this._isDirected, e, t, s);
173
- if (i.has(this._edgeLabels, d))
174
- return n && (this._edgeLabels[d] = r), this;
175
- if (!i.isUndefined(s) && !this._isMultigraph)
176
- throw new Error("Cannot set a named edge when isMultigraph = false");
177
- this.setNode(e), this.setNode(t), this._edgeLabels[d] = n ? r : this._defaultEdgeLabelFn(e, t, s);
178
- var a = b(this._isDirected, e, t, s);
179
- return e = a.v, t = a.w, Object.freeze(a), this._edgeObjs[d] = a, c(this._preds[t], e), c(this._sucs[e], t), this._in[t][d] = a, this._out[e][d] = a, this._edgeCount++, this;
180
- }
181
- edge(e, t, s) {
182
- var r = arguments.length === 1 ? l(this._isDirected, arguments[0]) : _(this._isDirected, e, t, s);
183
- return this._edgeLabels[r];
184
- }
185
- hasEdge(e, t, s) {
186
- var r = arguments.length === 1 ? l(this._isDirected, arguments[0]) : _(this._isDirected, e, t, s);
187
- return i.has(this._edgeLabels, r);
188
- }
189
- removeEdge(e, t, s) {
190
- var r = arguments.length === 1 ? l(this._isDirected, arguments[0]) : _(this._isDirected, e, t, s), n = this._edgeObjs[r];
191
- return n && (e = n.v, t = n.w, delete this._edgeLabels[r], delete this._edgeObjs[r], g(this._preds[t], e), g(this._sucs[e], t), delete this._in[t][r], delete this._out[e][r], this._edgeCount--), this;
192
- }
193
- inEdges(e, t) {
194
- var s = this._in[e];
195
- if (s) {
196
- var r = i.values(s);
197
- return t ? i.filter(r, function(n) {
198
- return n.v === t;
199
- }) : r;
200
- }
201
- }
202
- outEdges(e, t) {
203
- var s = this._out[e];
204
- if (s) {
205
- var r = i.values(s);
206
- return t ? i.filter(r, function(n) {
207
- return n.w === t;
208
- }) : r;
209
- }
210
- }
211
- nodeEdges(e, t) {
212
- var s = this.inEdges(e, t);
213
- if (s)
214
- return s.concat(this.outEdges(e, t));
215
- }
216
- }
217
- m.prototype._nodeCount = 0;
218
- m.prototype._edgeCount = 0;
219
- function c(u, e) {
220
- u[e] ? u[e]++ : u[e] = 1;
221
- }
222
- function g(u, e) {
223
- --u[e] || delete u[e];
224
- }
225
- function _(u, e, t, s) {
226
- var r = "" + e, n = "" + t;
227
- if (!u && r > n) {
228
- var h = r;
229
- r = n, n = h;
230
- }
231
- return r + f + n + f + (i.isUndefined(s) ? p : s);
232
- }
233
- function b(u, e, t, s) {
234
- var r = "" + e, n = "" + t;
235
- if (!u && r > n) {
236
- var h = r;
237
- r = n, n = h;
238
- }
239
- var d = { v: r, w: n };
240
- return s && (d.name = s), d;
241
- }
242
- function l(u, e) {
243
- return _(u, e.v, e.w, e.name);
244
- }
245
- export {
246
- m as G
247
- };
@@ -1 +0,0 @@
1
- "use strict";const ae=require("lodash-es"),w=require("./layers.9QK1wiQj.js");function te(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const o=te(ae);class oe{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return P(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&P(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,a=r._prev;a!==r;)n.push(JSON.stringify(a,ie)),a=a._prev;return"["+n.join(", ")+"]"}}function P(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ie(e,n){if(e!=="_next"&&e!=="_prev")return n}var fe=o.constant(1);function ue(e,n){if(e.nodeCount()<=1)return[];var r=ce(e,n||fe),a=de(r.graph,r.buckets,r.zeroIdx);return o.flatten(o.map(a,function(t){return e.outEdges(t.v,t.w)}))}function de(e,n,r){for(var a=[],t=n[n.length-1],f=n[0],i;e.nodeCount();){for(;i=f.dequeue();)y(e,n,r,i);for(;i=t.dequeue();)y(e,n,r,i);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(i=n[u].dequeue(),i){a=a.concat(y(e,n,r,i,!0));break}}}return a}function y(e,n,r,a,t){var f=t?[]:void 0;return o.forEach(e.inEdges(a.v),function(i){var u=e.edge(i),d=e.node(i.v);t&&f.push({v:i.v,w:i.w}),d.out-=u,R(n,r,d)}),o.forEach(e.outEdges(a.v),function(i){var u=e.edge(i),d=i.w,c=e.node(d);c.in-=u,R(n,r,c)}),e.removeNode(a.v),f}function ce(e,n){var r=new w.Graph,a=0,t=0;o.forEach(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),o.forEach(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,c=n(u),s=d+c;r.setEdge(u.v,u.w,s),t=Math.max(t,r.node(u.v).out+=c),a=Math.max(a,r.node(u.w).in+=c)});var f=o.range(t+a+3).map(function(){return new oe}),i=a+1;return o.forEach(r.nodes(),function(u){R(f,i,r.node(u))}),{graph:r,buckets:f,zeroIdx:i}}function R(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function se(e){var n=e.graph().acyclicer==="greedy"?ue(e,r(e)):he(e);o.forEach(n,function(a){var t=e.edge(a);e.removeEdge(a),t.forwardName=a.name,t.reversed=!0,e.setEdge(a.w,a.v,t,o.uniqueId("rev"))});function r(a){return function(t){return a.edge(t).weight}}}function he(e){var n=[],r={},a={};function t(f){o.has(a,f)||(a[f]=!0,r[f]=!0,o.forEach(e.outEdges(f),function(i){o.has(r,i.w)?n.push(i):t(i.w)}),delete r[f])}return o.forEach(e.nodes(),t),n}function le(e){o.forEach(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var a=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,a)}})}function b(e,n,r,a){var t;do t=o.uniqueId(a);while(e.hasNode(t));return r.dummy=n,e.setNode(t,r),t}function ve(e){var n=new w.Graph().setGraph(e.graph());return o.forEach(e.nodes(),function(r){n.setNode(r,e.node(r))}),o.forEach(e.edges(),function(r){var a=n.edge(r.v,r.w)||{weight:0,minlen:1},t=e.edge(r);n.setEdge(r.v,r.w,{weight:a.weight+t.weight,minlen:Math.max(a.minlen,t.minlen)})}),n}function q(e){var n=new w.Graph({multigraph:e.isMultigraph()}).setGraph(e.graph());return o.forEach(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),o.forEach(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function O(e,n){var r=e.x,a=e.y,t=n.x-r,f=n.y-a,i=e.width/2,u=e.height/2;if(!t&&!f)throw new Error("Not possible to find intersection inside of the rectangle");var d,c;return Math.abs(f)*i>Math.abs(t)*u?(f<0&&(u=-u),d=u*t/f,c=u):(t<0&&(i=-i),d=i,c=i*f/t),{x:r+d,y:a+c}}function x(e){var n=o.map(o.range(U(e)+1),function(){return[]});return o.forEach(e.nodes(),function(r){var a=e.node(r),t=a.rank;o.isUndefined(t)||(n[t][a.order]=r)}),n}function pe(e){var n=o.min(o.map(e.nodes(),function(r){return e.node(r).rank}));o.forEach(e.nodes(),function(r){var a=e.node(r);o.has(a,"rank")&&(a.rank-=n)})}function me(e){var n=o.min(o.map(e.nodes(),function(f){return e.node(f).rank})),r=[];o.forEach(e.nodes(),function(f){var i=e.node(f).rank-n;r[i]||(r[i]=[]),r[i].push(f)});var a=0,t=e.graph().nodeRankFactor;o.forEach(r,function(f,i){o.isUndefined(f)&&i%t!==0?--a:a&&o.forEach(f,function(u){e.node(u).rank+=a})})}function V(e,n,r,a){var t={width:0,height:0};return arguments.length>=4&&(t.rank=r,t.order=a),b(e,"border",t,n)}function U(e){return o.max(o.map(e.nodes(),function(n){var r=e.node(n).rank;if(!o.isUndefined(r))return r}))}function we(e,n){var r={lhs:[],rhs:[]};return o.forEach(e,function(a){n(a)?r.lhs.push(a):r.rhs.push(a)}),r}function Ee(e,n){return n()}function be(e){function n(r){var a=e.children(r),t=e.node(r);if(a.length&&o.forEach(a,n),o.has(t,"minRank")){t.borderLeft=[],t.borderRight=[];for(var f=t.minRank,i=t.maxRank+1;f<i;++f)B(e,"borderLeft","_bl",r,t,f),B(e,"borderRight","_br",r,t,f)}}o.forEach(e.children(),n)}function B(e,n,r,a,t,f){var i={width:0,height:0,rank:f,borderType:n},u=t[n][f-1],d=b(e,"border",i,r);t[n][f]=d,e.setParent(d,a),u&&e.setEdge(u,d,{weight:1})}function ge(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&W(e)}function ke(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&xe(e),(n==="lr"||n==="rl")&&(ye(e),W(e))}function W(e){o.forEach(e.nodes(),function(n){F(e.node(n))}),o.forEach(e.edges(),function(n){F(e.edge(n))})}function F(e){var n=e.width;e.width=e.height,e.height=n}function xe(e){o.forEach(e.nodes(),function(n){N(e.node(n))}),o.forEach(e.edges(),function(n){var r=e.edge(n);o.forEach(r.points,N),o.has(r,"y")&&N(r)})}function N(e){e.y=-e.y}function ye(e){o.forEach(e.nodes(),function(n){L(e.node(n))}),o.forEach(e.edges(),function(n){var r=e.edge(n);o.forEach(r.points,L),o.has(r,"x")&&L(r)})}function L(e){var n=e.x;e.x=e.y,e.y=n}function Ne(e){e.graph().dummyChains=[],o.forEach(e.edges(),function(n){Le(e,n)})}function Le(e,n){var r=n.v,a=e.node(r).rank,t=n.w,f=e.node(t).rank,i=n.name,u=e.edge(n),d=u.labelRank;if(f!==a+1){e.removeEdge(n);var c,s,h;for(h=0,++a;a<f;++h,++a)u.points=[],s={width:0,height:0,edgeLabel:u,edgeObj:n,rank:a},c=b(e,"edge",s,"_d"),a===d&&(s.width=u.width,s.height=u.height,s.dummy="edge-label",s.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},i),h===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,t,{weight:u.weight},i)}}function Ie(e){o.forEach(e.graph().dummyChains,function(n){var r=e.node(n),a=r.edgeLabel,t;for(e.setEdge(r.edgeObj,a);r.dummy;)t=e.successors(n)[0],e.removeNode(n),a.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(a.x=r.x,a.y=r.y,a.width=r.width,a.height=r.height),n=t,r=e.node(n)})}function C(e){var n={};function r(a){var t=e.node(a);if(o.has(n,a))return t.rank;n[a]=!0;var f=o.min(o.map(e.outEdges(a),function(i){return r(i.w)-e.edge(i).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),t.rank=f}o.forEach(e.sources(),r)}function k(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function $(e){var n=new w.Graph({directed:!1}),r=e.nodes()[0],a=e.nodeCount();n.setNode(r,{});for(var t,f;_e(n,e)<a;)t=Re(n,e),f=n.hasNode(t.v)?k(e,t):-k(e,t),Ce(n,e,f);return n}function _e(e,n){function r(a){o.forEach(n.nodeEdges(a),function(t){var f=t.v,i=a===f?t.w:f;!e.hasNode(i)&&!k(n,t)&&(e.setNode(i,{}),e.setEdge(a,i,{}),r(i))})}return o.forEach(e.nodes(),r),e.nodeCount()}function Re(e,n){return o.minBy(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return k(n,r)})}function Ce(e,n,r){o.forEach(e.nodes(),function(a){n.node(a).rank+=r})}o.constant(1);o.constant(1);function Te(){}Te.prototype=new Error;function z(e,n,r){o.isArray(n)||(n=[n]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),t=[],f={};return o.each(n,function(i){if(!e.hasNode(i))throw new Error("Graph does not have node: "+i);X(e,i,r==="post",f,a,t)}),t}function X(e,n,r,a,t,f){o.has(a,n)||(a[n]=!0,r||f.push(n),o.each(t(n),function(i){X(e,i,r,a,t,f)}),r&&f.push(n))}function Se(e,n){return z(e,n,"post")}function Me(e,n){return z(e,n,"pre")}E.initLowLimValues=S;E.initCutValues=T;E.calcCutValue=H;E.leaveEdge=K;E.enterEdge=Q;E.exchangeEdges=Z;function E(e){e=ve(e),C(e);var n=$(e);S(n),T(n,e);for(var r,a;r=K(n);)a=Q(n,e,r),Z(n,e,r,a)}function T(e,n){var r=Se(e,e.nodes());r=r.slice(0,r.length-1),o.forEach(r,function(a){Pe(e,n,a)})}function Pe(e,n,r){var a=e.node(r),t=a.parent;e.edge(r,t).cutvalue=H(e,n,r)}function H(e,n,r){var a=e.node(r),t=a.parent,f=!0,i=n.edge(r,t),u=0;return i||(f=!1,i=n.edge(t,r)),u=i.weight,o.forEach(n.nodeEdges(r),function(d){var c=d.v===r,s=c?d.w:d.v;if(s!==t){var h=c===f,l=n.edge(d).weight;if(u+=h?l:-l,Ve(e,r,s)){var v=e.edge(r,s).cutvalue;u+=h?-v:v}}}),u}function S(e,n){arguments.length<2&&(n=e.nodes()[0]),J(e,{},1,n)}function J(e,n,r,a,t){var f=r,i=e.node(a);return n[a]=!0,o.forEach(e.neighbors(a),function(u){o.has(n,u)||(r=J(e,n,r,u,a))}),i.low=f,i.lim=r++,t?i.parent=t:delete i.parent,r}function K(e){return o.find(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Q(e,n,r){var a=r.v,t=r.w;n.hasEdge(a,t)||(a=r.w,t=r.v);var f=e.node(a),i=e.node(t),u=f,d=!1;f.lim>i.lim&&(u=i,d=!0);var c=o.filter(n.edges(),function(s){return d===G(e,e.node(s.v),u)&&d!==G(e,e.node(s.w),u)});return o.minBy(c,function(s){return k(n,s)})}function Z(e,n,r,a){var t=r.v,f=r.w;e.removeEdge(t,f),e.setEdge(a.v,a.w,{}),S(e),T(e,n),Oe(e,n)}function Oe(e,n){var r=o.find(e.nodes(),function(t){return!n.node(t).parent}),a=Me(e,r);a=a.slice(1),o.forEach(a,function(t){var f=e.node(t).parent,i=n.edge(t,f),u=!1;i||(i=n.edge(f,t),u=!0),n.node(t).rank=n.node(f).rank+(u?i.minlen:-i.minlen)})}function Ve(e,n,r){return e.hasEdge(n,r)}function G(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Be(e){switch(e.graph().ranker){case"network-simplex":D(e);break;case"tight-tree":Ge(e);break;case"longest-path":Fe(e);break;default:D(e)}}var Fe=C;function Ge(e){C(e),$(e)}function D(e){E(e)}function De(e){var n=b(e,"root",{},"_root"),r=Ae(e),a=o.max(o.values(r))-1,t=2*a+1;e.graph().nestingRoot=n,o.forEach(e.edges(),function(i){e.edge(i).minlen*=t});var f=Ye(e)+1;o.forEach(e.children(),function(i){ee(e,n,t,f,a,r,i)}),e.graph().nodeRankFactor=t}function ee(e,n,r,a,t,f,i){var u=e.children(i);if(!u.length){i!==n&&e.setEdge(n,i,{weight:0,minlen:r});return}var d=V(e,"_bt"),c=V(e,"_bb"),s=e.node(i);e.setParent(d,i),s.borderTop=d,e.setParent(c,i),s.borderBottom=c,o.forEach(u,function(h){ee(e,n,r,a,t,f,h);var l=e.node(h),v=l.borderTop?l.borderTop:h,p=l.borderBottom?l.borderBottom:h,m=l.borderTop?a:2*a,g=v!==p?1:t-f[i]+1;e.setEdge(d,v,{weight:m,minlen:g,nestingEdge:!0}),e.setEdge(p,c,{weight:m,minlen:g,nestingEdge:!0})}),e.parent(i)||e.setEdge(n,d,{weight:0,minlen:t+f[i]})}function Ae(e){var n={};function r(a,t){var f=e.children(a);f&&f.length&&o.forEach(f,function(i){r(i,t+1)}),n[a]=t}return o.forEach(e.children(),function(a){r(a,1)}),n}function Ye(e){return o.reduce(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function je(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,o.forEach(e.edges(),function(r){var a=e.edge(r);a.nestingEdge&&e.removeEdge(r)})}function qe(e,n,r){var a={},t;o.forEach(r,function(f){for(var i=e.parent(f),u,d;i;){if(u=e.parent(i),u?(d=a[u],a[u]=i):(d=t,t=i),d&&d!==i){n.setEdge(d,i);return}i=u}})}function Ue(e,n,r){var a=We(e),t=new w.Graph({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(function(f){return e.node(f)});return o.forEach(e.nodes(),function(f){var i=e.node(f),u=e.parent(f);(i.rank===n||i.minRank<=n&&n<=i.maxRank)&&(t.setNode(f),t.setParent(f,u||a),o.forEach(e[r](f),function(d){var c=d.v===f?d.w:d.v,s=t.edge(c,f),h=o.isUndefined(s)?0:s.weight;t.setEdge(c,f,{weight:e.edge(d).weight+h})}),o.has(i,"minRank")&&t.setNode(f,{borderLeft:i.borderLeft[n],borderRight:i.borderRight[n]}))}),t}function We(e){for(var n;e.hasNode(n=o.uniqueId("_root")););return n}function $e(e,n){for(var r=0,a=1;a<n.length;++a)r+=ze(e,n[a-1],n[a]);return r}function ze(e,n,r){for(var a=o.zipObject(r,o.map(r,function(c,s){return s})),t=o.flatten(o.map(n,function(c){return o.sortBy(o.map(e.outEdges(c),function(s){return{pos:a[s.w],weight:e.edge(s).weight}}),"pos")})),f=1;f<r.length;)f<<=1;var i=2*f-1;f-=1;var u=o.map(new Array(i),function(){return 0}),d=0;return o.forEach(t.forEach(function(c){var s=c.pos+f;u[s]+=c.weight;for(var h=0;s>0;)s%2&&(h+=u[s+1]),s=s-1>>1,u[s]+=c.weight;d+=c.weight*h})),d}function Xe(e){var n={},r=o.filter(e.nodes(),function(u){return!e.children(u).length}),a=o.max(o.map(r,function(u){return e.node(u).rank})),t=o.map(o.range(a+1),function(){return[]});function f(u){if(!o.has(n,u)){n[u]=!0;var d=e.node(u);t[d.rank].push(u),o.forEach(e.successors(u),f)}}var i=o.sortBy(r,function(u){return e.node(u).rank});return o.forEach(i,f),t}function He(e,n){return o.map(n,function(r){var a=e.inEdges(r);if(a.length){var t=o.reduce(a,function(f,i){var u=e.edge(i),d=e.node(i.v);return{sum:f.sum+u.weight*d.order,weight:f.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:t.sum/t.weight,weight:t.weight}}else return{v:r}})}function Je(e,n){var r={};o.forEach(e,function(t,f){var i=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:f};o.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)}),o.forEach(n.edges(),function(t){var f=r[t.v],i=r[t.w];!o.isUndefined(f)&&!o.isUndefined(i)&&(i.indegree++,f.out.push(r[t.w]))});var a=o.filter(r,function(t){return!t.indegree});return Ke(a)}function Ke(e){var n=[];function r(f){return function(i){i.merged||(o.isUndefined(i.barycenter)||o.isUndefined(f.barycenter)||i.barycenter>=f.barycenter)&&Qe(f,i)}}function a(f){return function(i){i.in.push(f),--i.indegree===0&&e.push(i)}}for(;e.length;){var t=e.pop();n.push(t),o.forEach(t.in.reverse(),r(t)),o.forEach(t.out,a(t))}return o.map(o.filter(n,function(f){return!f.merged}),function(f){return o.pick(f,["vs","i","barycenter","weight"])})}function Qe(e,n){var r=0,a=0;e.weight&&(r+=e.barycenter*e.weight,a+=e.weight),n.weight&&(r+=n.barycenter*n.weight,a+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/a,e.weight=a,e.i=Math.min(n.i,e.i),n.merged=!0}function Ze(e,n){var r=we(e,function(s){return o.has(s,"barycenter")}),a=r.lhs,t=o.sortBy(r.rhs,function(s){return-s.i}),f=[],i=0,u=0,d=0;a.sort(en(!!n)),d=A(f,t,d),o.forEach(a,function(s){d+=s.vs.length,f.push(s.vs),i+=s.barycenter*s.weight,u+=s.weight,d=A(f,t,d)});var c={vs:o.flatten(f)};return u&&(c.barycenter=i/u,c.weight=u),c}function A(e,n,r){for(var a;n.length&&(a=o.last(n)).i<=r;)n.pop(),e.push(a.vs),r++;return r}function en(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function ne(e,n,r,a){var t=e.children(n),f=e.node(n),i=f?f.borderLeft:void 0,u=f?f.borderRight:void 0,d={};i&&(t=o.filter(t,function(p){return p!==i&&p!==u}));var c=He(e,t);o.forEach(c,function(p){if(e.children(p.v).length){var m=ne(e,p.v,r,a);d[p.v]=m,o.has(m,"barycenter")&&rn(p,m)}});var s=Je(c,r);nn(s,d);var h=Ze(s,a);if(i&&(h.vs=o.flatten([i,h.vs,u]),e.predecessors(i).length)){var l=e.node(e.predecessors(i)[0]),v=e.node(e.predecessors(u)[0]);o.has(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h}function nn(e,n){o.forEach(e,function(r){r.vs=o.flatten(r.vs.map(function(a){return n[a]?n[a].vs:a}))})}function rn(e,n){o.isUndefined(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function an(e){var n=U(e),r=Y(e,o.range(1,n+1),"inEdges"),a=Y(e,o.range(n-1,-1,-1),"outEdges"),t=Xe(e);j(e,t);for(var f=Number.POSITIVE_INFINITY,i,u=0,d=0;d<4;++u,++d){tn(u%2?r:a,u%4>=2),t=x(e);var c=$e(e,t);c<f&&(d=0,i=o.cloneDeep(t),f=c)}j(e,i)}function Y(e,n,r){return o.map(n,function(a){return Ue(e,a,r)})}function tn(e,n){var r=new w.Graph;o.forEach(e,function(a){var t=a.graph().root,f=ne(a,t,r,n);o.forEach(f.vs,function(i,u){a.node(i).order=u}),qe(a,r,f.vs)})}function j(e,n){o.forEach(n,function(r){o.forEach(r,function(a,t){e.node(a).order=t})})}function on(e){var n=un(e);o.forEach(e.graph().dummyChains,function(r){for(var a=e.node(r),t=a.edgeObj,f=fn(e,n,t.v,t.w),i=f.path,u=f.lca,d=0,c=i[d],s=!0;r!==t.w;){if(a=e.node(r),s){for(;(c=i[d])!==u&&e.node(c).maxRank<a.rank;)d++;c===u&&(s=!1)}if(!s){for(;d<i.length-1&&e.node(c=i[d+1]).minRank<=a.rank;)d++;c=i[d]}e.setParent(r,c),r=e.successors(r)[0]}})}function fn(e,n,r,a){var t=[],f=[],i=Math.min(n[r].low,n[a].low),u=Math.max(n[r].lim,n[a].lim),d,c;d=r;do d=e.parent(d),t.push(d);while(d&&(n[d].low>i||u>n[d].lim));for(c=d,d=a;(d=e.parent(d))!==c;)f.push(d);return{path:t.concat(f.reverse()),lca:c}}function un(e){var n={},r=0;function a(t){var f=r;o.forEach(e.children(t),a),n[t]={low:f,lim:r++}}return o.forEach(e.children(),a),n}function dn(e,n){var r={};function a(t,f){var i=0,u=0,d=t.length,c=o.last(f);return o.forEach(f,function(s,h){var l=sn(e,s),v=l?e.node(l).order:d;(l||s===c)&&(o.forEach(f.slice(u,h+1),function(p){o.forEach(e.predecessors(p),function(m){var g=e.node(m),M=g.order;(M<i||v<M)&&!(g.dummy&&e.node(p).dummy)&&re(r,m,p)})}),u=h+1,i=v)}),f}return o.reduce(n,a),r}function cn(e,n){var r={};function a(f,i,u,d,c){var s;o.forEach(o.range(i,u),function(h){s=f[h],e.node(s).dummy&&o.forEach(e.predecessors(s),function(l){var v=e.node(l);v.dummy&&(v.order<d||v.order>c)&&re(r,l,s)})})}function t(f,i){var u=-1,d,c=0;return o.forEach(i,function(s,h){if(e.node(s).dummy==="border"){var l=e.predecessors(s);l.length&&(d=e.node(l[0]).order,a(i,c,h,u,d),c=h,u=d)}a(i,c,i.length,d,f.length)}),i}return o.reduce(n,t),r}function sn(e,n){if(e.node(n).dummy)return o.find(e.predecessors(n),function(r){return e.node(r).dummy})}function re(e,n,r){if(n>r){var a=n;n=r,r=a}var t=e[n];t||(e[n]=t={}),t[r]=!0}function hn(e,n,r){if(n>r){var a=n;n=r,r=a}return o.has(e[n],r)}function ln(e,n,r,a){var t={},f={},i={};return o.forEach(n,function(u){o.forEach(u,function(d,c){t[d]=d,f[d]=d,i[d]=c})}),o.forEach(n,function(u){var d=-1;o.forEach(u,function(c){var s=a(c);if(s.length){s=o.sortBy(s,function(m){return i[m]});for(var h=(s.length-1)/2,l=Math.floor(h),v=Math.ceil(h);l<=v;++l){var p=s[l];f[c]===c&&d<i[p]&&!hn(r,c,p)&&(f[p]=c,f[c]=t[c]=t[p],d=i[p])}}})}),{root:t,align:f}}function vn(e,n,r,a,t){var f={},i=pn(e,n,r,t),u=t?"borderLeft":"borderRight";function d(h,l){for(var v=i.nodes(),p=v.pop(),m={};p;)m[p]?h(p):(m[p]=!0,v.push(p),v=v.concat(l(p))),p=v.pop()}function c(h){f[h]=i.inEdges(h).reduce(function(l,v){return Math.max(l,f[v.v]+i.edge(v))},0)}function s(h){var l=i.outEdges(h).reduce(function(p,m){return Math.min(p,f[m.w]-i.edge(m))},Number.POSITIVE_INFINITY),v=e.node(h);l!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(f[h]=Math.max(f[h],l))}return d(c,i.predecessors.bind(i)),d(s,i.successors.bind(i)),o.forEach(a,function(h){f[h]=f[r[h]]}),f}function pn(e,n,r,a){var t=new w.Graph,f=e.graph(),i=gn(f.nodesep,f.edgesep,a);return o.forEach(n,function(u){var d;o.forEach(u,function(c){var s=r[c];if(t.setNode(s),d){var h=r[d],l=t.edge(h,s);t.setEdge(h,s,Math.max(i(e,c,d),l||0))}d=c})}),t}function mn(e,n){return o.minBy(o.values(n),function(r){var a=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY;return o.forIn(r,function(f,i){var u=kn(e,i)/2;a=Math.max(f+u,a),t=Math.min(f-u,t)}),a-t})}function wn(e,n){var r=o.values(n),a=o.min(r),t=o.max(r);o.forEach(["u","d"],function(f){o.forEach(["l","r"],function(i){var u=f+i,d=e[u],c;if(d!==n){var s=o.values(d);c=i==="l"?a-o.min(s):t-o.max(s),c&&(e[u]=o.mapValues(d,function(h){return h+c}))}})})}function En(e,n){return o.mapValues(e.ul,function(r,a){if(n)return e[n.toLowerCase()][a];var t=o.sortBy(o.map(e,a));return(t[1]+t[2])/2})}function bn(e){var n=x(e),r=o.merge(dn(e,n),cn(e,n)),a={},t;o.forEach(["u","d"],function(i){t=i==="u"?n:o.values(n).reverse(),o.forEach(["l","r"],function(u){u==="r"&&(t=o.map(t,function(h){return o.values(h).reverse()}));var d=(i==="u"?e.predecessors:e.successors).bind(e),c=ln(e,t,r,d),s=vn(e,t,c.root,c.align,u==="r");u==="r"&&(s=o.mapValues(s,function(h){return-h})),a[i+u]=s})});var f=mn(e,a);return wn(a,f),En(a,e.graph().align)}function gn(e,n,r){return function(a,t,f){var i=a.node(t),u=a.node(f),d=0,c;if(d+=i.width/2,o.has(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":c=-i.width/2;break;case"r":c=i.width/2;break}if(c&&(d+=r?c:-c),c=0,d+=(i.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,o.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":c=u.width/2;break;case"r":c=-u.width/2;break}return c&&(d+=r?c:-c),c=0,d}}function kn(e,n){return e.node(n).width}function xn(e){e=q(e),yn(e),o.forOwn(bn(e),function(n,r){e.node(r).x=n})}function yn(e){var n=x(e),r=e.graph().ranksep,a=0;o.forEach(n,function(t){var f=o.max(o.map(t,function(i){return e.node(i).height}));o.forEach(t,function(i){e.node(i).y=a+f/2}),a+=f+r})}function Nn(e,n){var r=Ee;r("layout",function(){var a=r(" buildLayoutGraph",function(){return Vn(e)});r(" runLayout",function(){Ln(a,r)}),r(" updateInputGraph",function(){In(e,a)})})}function Ln(e,n){n(" makeSpaceForEdgeLabels",function(){Bn(e)}),n(" removeSelfEdges",function(){Wn(e)}),n(" acyclic",function(){se(e)}),n(" nestingGraph.run",function(){De(e)}),n(" rank",function(){Be(q(e))}),n(" injectEdgeLabelProxies",function(){Fn(e)}),n(" removeEmptyRanks",function(){me(e)}),n(" nestingGraph.cleanup",function(){je(e)}),n(" normalizeRanks",function(){pe(e)}),n(" assignRankMinMax",function(){Gn(e)}),n(" removeEdgeLabelProxies",function(){Dn(e)}),n(" normalize.run",function(){Ne(e)}),n(" parentDummyChains",function(){on(e)}),n(" addBorderSegments",function(){be(e)}),n(" order",function(){an(e)}),n(" insertSelfEdges",function(){$n(e)}),n(" adjustCoordinateSystem",function(){ge(e)}),n(" position",function(){xn(e)}),n(" positionSelfEdges",function(){zn(e)}),n(" removeBorderNodes",function(){Un(e)}),n(" normalize.undo",function(){Ie(e)}),n(" fixupEdgeLabelCoords",function(){jn(e)}),n(" undoCoordinateSystem",function(){ke(e)}),n(" translateGraph",function(){An(e)}),n(" assignNodeIntersects",function(){Yn(e)}),n(" reversePoints",function(){qn(e)}),n(" acyclic.undo",function(){le(e)})}function In(e,n){o.forEach(e.nodes(),function(r){var a=e.node(r),t=n.node(r);a&&(a.x=t.x,a.y=t.y,n.children(r).length&&(a.width=t.width,a.height=t.height))}),o.forEach(e.edges(),function(r){var a=e.edge(r),t=n.edge(r);a.points=t.points,o.has(t,"x")&&(a.x=t.x,a.y=t.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var _n=["nodesep","edgesep","ranksep","marginx","marginy"],Rn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Cn=["acyclicer","ranker","rankdir","align"],Tn=["width","height"],Sn={width:0,height:0},Mn=["minlen","weight","width","height","labeloffset"],Pn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},On=["labelpos"];function Vn(e){var n=new w.Graph({multigraph:!0,compound:!0}),r=_(e.graph());return n.setGraph(o.merge({},Rn,I(r,_n),o.pick(r,Cn))),o.forEach(e.nodes(),function(a){var t=_(e.node(a));n.setNode(a,o.defaults(I(t,Tn),Sn)),n.setParent(a,e.parent(a))}),o.forEach(e.edges(),function(a){var t=_(e.edge(a));n.setEdge(a,o.merge({},Pn,I(t,Mn),o.pick(t,On)))}),n}function Bn(e){var n=e.graph();n.ranksep/=2,o.forEach(e.edges(),function(r){var a=e.edge(r);a.minlen*=2,a.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?a.width+=a.labeloffset:a.height+=a.labeloffset)})}function Fn(e){o.forEach(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var a=e.node(n.v),t=e.node(n.w),f={rank:(t.rank-a.rank)/2+a.rank,e:n};b(e,"edge-proxy",f,"_ep")}})}function Gn(e){var n=0;o.forEach(e.nodes(),function(r){var a=e.node(r);a.borderTop&&(a.minRank=e.node(a.borderTop).rank,a.maxRank=e.node(a.borderBottom).rank,n=o.max(n,a.maxRank))}),e.graph().maxRank=n}function Dn(e){o.forEach(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function An(e){var n=Number.POSITIVE_INFINITY,r=0,a=Number.POSITIVE_INFINITY,t=0,f=e.graph(),i=f.marginx||0,u=f.marginy||0;function d(c){var s=c.x,h=c.y,l=c.width,v=c.height;n=Math.min(n,s-l/2),r=Math.max(r,s+l/2),a=Math.min(a,h-v/2),t=Math.max(t,h+v/2)}o.forEach(e.nodes(),function(c){d(e.node(c))}),o.forEach(e.edges(),function(c){var s=e.edge(c);o.has(s,"x")&&d(s)}),n-=i,a-=u,o.forEach(e.nodes(),function(c){var s=e.node(c);s.x-=n,s.y-=a}),o.forEach(e.edges(),function(c){var s=e.edge(c);o.forEach(s.points,function(h){h.x-=n,h.y-=a}),o.has(s,"x")&&(s.x-=n),o.has(s,"y")&&(s.y-=a)}),f.width=r-n+i,f.height=t-a+u}function Yn(e){o.forEach(e.edges(),function(n){var r=e.edge(n),a=e.node(n.v),t=e.node(n.w),f,i;r.points?(f=r.points[0],i=r.points[r.points.length-1]):(r.points=[],f=t,i=a),r.points.unshift(O(a,f)),r.points.push(O(t,i))})}function jn(e){o.forEach(e.edges(),function(n){var r=e.edge(n);if(o.has(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function qn(e){o.forEach(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Un(e){o.forEach(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),a=e.node(r.borderTop),t=e.node(r.borderBottom),f=e.node(o.last(r.borderLeft)),i=e.node(o.last(r.borderRight));r.width=Math.abs(i.x-f.x),r.height=Math.abs(t.y-a.y),r.x=f.x+r.width/2,r.y=a.y+r.height/2}}),o.forEach(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Wn(e){o.forEach(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function $n(e){var n=x(e);o.forEach(n,function(r){var a=0;o.forEach(r,function(t,f){var i=e.node(t);i.order=f+a,o.forEach(i.selfEdges,function(u){b(e,"selfedge",{width:u.label.width,height:u.label.height,rank:i.rank,order:f+ ++a,e:u.e,label:u.label},"_se")}),delete i.selfEdges})})}function zn(e){o.forEach(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var a=e.node(r.e.v),t=a.x+a.width/2,f=a.y,i=r.x-t,u=a.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:t+2*i/3,y:f-u},{x:t+5*i/6,y:f-u},{x:t+i,y:f},{x:t+5*i/6,y:f+u},{x:t+2*i/3,y:f+u}],r.label.x=r.x,r.label.y=r.y}})}function I(e,n){return o.mapValues(o.pick(e,n),Number)}function _(e){var n={};return o.forEach(e,function(r,a){n[a.toLowerCase()]=r}),n}exports.layout=Nn;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),s=require("react"),J=require("react-i18next"),i=require("./layers.MRw7LhZs.js"),Q=require("@mantine/core"),X=require("@layers-app/shared"),k=t=>{const{width:c,height:r,isLoading:h,isError:w,src:f,id:m,altText:p,imageRef:I,maxWidth:g}=t;return u.jsxs("div",{className:"media-wrapper",style:{width:c,height:r,display:"inline-flex",position:"relative"},children:[u.jsx(Q.LoadingOverlay,{visible:h,zIndex:1e3,overlayProps:{backgroundOpacity:.5},loaderProps:{size:24,color:"black"}}),u.jsx(Y,{className:null,src:f,altText:p,imageRef:I,width:"inherit",height:"inherit",maxWidth:g||"auto",id:m})]})};function Y({altText:t,className:c,imageRef:r,src:h,width:w,height:f,maxWidth:m,id:p}){const[I,g]=s.useState(!1);return u.jsx("img",{className:`${c||void 0} ${I?"":"loading"}`,src:h,alt:t,ref:r,style:{height:f,maxWidth:m,width:w},onLoad:()=>{h.includes("splash")?setTimeout(()=>{g(!0)},100):g(!0)},draggable:"false","data-id":p})}function Z({src:t,altText:c,nodeKey:r,width:h,height:w,maxWidth:f,showCaption:m,caption:p,id:I,create:g,alignment:H}){var U,$;const W=s.useRef(null),[C,x]=s.useState(!0),{isCollabActive:z}=i.l(),[l]=i.o(),[S,j]=s.useState(!0),[d,y]=s.useState({width:0,height:0}),{start:D,cancel:T}=i.useCancelUpload(),[_,L]=s.useState(0),{fetchUploadMedia:M,fetchDeleteMedia:P,maxFileSize:K}=s.useContext(i.Context),v=i.mediaMap.has(t)&&(((U=i.mediaMap.get(t))==null?void 0:U.mediaNodeKeys.length)===0||(($=i.mediaMap.get(t))==null?void 0:$.mediaNodeKeys.length)===void 0||t.trim()===""),{t:N}=J.useTranslation(),[ee,F]=s.useState(0);s.useEffect(()=>l.registerDecoratorListener(()=>{F(e=>e+1)}),[v]),s.useEffect(()=>{if(!t||t.startsWith("data:image/")||!t.trim()){x(!1);return}const e=new Image;e.src=t,e.onload=()=>x(!1),e.onerror=()=>{x(!1)}},[t,v]);const B=(e,n)=>{l.update(()=>{i.ms(null);const o=i.us(r);i.$isImageNode(o)&&o.setWidthAndHeight(e,n)})},{historyState:R}=i.useSharedHistoryContext(),{settings:{showNestedEditorTreeView:A}}=i.useSettings(),[b,E]=s.useState(!1);function G(e){return e.endsWith(".svg")||e.includes("image/svg+xml")}function V(e){return new Promise((n,o)=>{if(G(e)){n(0);return}const a=new Image;a.src=e,a.onload=()=>{n(a.width)},a.onerror=()=>{o(new Error("Failed to load image"))}})}s.useEffect(()=>{g&&E(!0)},[g]),s.useEffect(()=>{let e=h,n=w,o=100;(t.includes("unsplash")?t.trim():!v&&t.trim()||t.includes("upload-src-editor"))&&t!=="upload"&&V(t).then(a=>{typeof e=="number"&&e<o&&a<o?(j(!0),y({width:e,height:n})):a<o?(j(!0),y({width:"auto",height:"auto"})):(y({width:a,height:a}),j(!1))}).catch(a=>{console.warn("Ошибка при загрузке изображения:",a.message)})},[t,v]),s.useEffect(()=>{d.width&&d.height&&S&&l.update(()=>{const e=i.us(r);i.$isImageNode(e)&&e.setWidthAndHeight(d.width,d.height)})},[d.width,d.height,S]),s.useEffect(()=>{const e=document.documentElement;i.toggleLockScroll(b,e)},[b]),s.useEffect(()=>l.registerCommand(i.UPLOAD_IMAGE_COMMAND,e=>(t==="upload"&&q(e),!1),i.Ii),[t,C]);const O=(e,n)=>{x(!1),l.update(()=>{const o=i.us(r);i.$isImageNode(o)&&(o.setSrc(e),o.setId(n))})},q=e=>{x(!0);const n=D();M&&M(e[0],(o,a)=>{O(o,a),L(0)},o=>{o&&X.showErrorNotification({message:N("editor.gallery.errorFile")}),L(0),O("","")},n,o=>{L(o)})};return!t||t==="upload"?u.jsx(i.ImagePicker,{uploading:!1,onUpload:e=>{!M||!e.length||(q(e),E(!1))},popoverProps:{opened:b,position:"bottom",onChange:E},onChange:e=>{E(!1),l.update(()=>{const n=i.us(r);i.$isImageNode(n)&&n.setSrc(e)})},children:u.jsx(i.EmptyNodeButton,{title:N("editor.image.add_photo"),icon:"photo",onClick:()=>E(!b),isLoading:C,progress:_,onAfterCancel:()=>{T(),x(!1)}})}):S?u.jsx(k,{width:d.width,height:d.height,isLoading:C,isError:!1,isIcon:S,src:t,id:I,editor:l,nodeKey:r,fetchDeleteMedia:P,altText:c,imageRef:W,maxWidth:f,showCaption:m,caption:p,isCollabActive:z,historyState:R,showNestedEditorTreeView:A,t:N}):u.jsx(i.ResizableContainer,{editor:l,isIcon:S,width:i.parseContainerSize(h),height:i.parseContainerSize(w),initialWidth:d.width||"",initialHeight:d.height||"",onResizeEnd:B,alignment:H,children:u.jsx(k,{width:"inherit",height:"inherit",isLoading:C,isError:!1,isIcon:S,src:t,id:I,editor:l,nodeKey:r,fetchDeleteMedia:P,altText:c,imageRef:W,maxWidth:f,showCaption:m,caption:p,isCollabActive:z,historyState:R,showNestedEditorTreeView:A,t:N})})}exports.default=Z;
@@ -1,6 +0,0 @@
1
- import { e as o, j as s, o as f } from "./layers.mwnm89da.js";
2
- export {
3
- o as default,
4
- s as en,
5
- f as kaa
6
- };