@layers-app/editor 2.3.25 → 2.3.27

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 (214) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.js +6 -6
  3. package/dist/{layers.Ca2EqmL_.js → layers.-5fXoQ-6.js} +1 -1
  4. package/dist/{layers.D7PjswbX.js → layers.-MyptjBW.js} +1 -1
  5. package/dist/{layers.wAwoIYNj.js → layers.-wx1zEqJ.js} +1 -1
  6. package/dist/{layers.BEl4f3cx.js → layers.0LcA_rgq.js} +1 -1
  7. package/dist/{layers.whrurifU.js → layers.0Wxw4e0U.js} +1 -1
  8. package/dist/{layers.B5myy2z-.js → layers.0zHlfBIN.js} +1 -1
  9. package/dist/{layers.8QO61tuW.js → layers.2PxDiFxd.js} +1 -1
  10. package/dist/{layers.DzxSnHyQ.js → layers.4iMWn5HG.js} +1 -1
  11. package/dist/{layers.CBVkUNC3.js → layers.5x5XNzrm.js} +4 -4
  12. package/dist/layers.6fnszpXd.js +8 -0
  13. package/dist/{layers.CXm6ObLY.js → layers.8MkKSt0Y.js} +1 -1
  14. package/dist/{layers.D2FpdKx1.js → layers.9ZBOGQLg.js} +1 -1
  15. package/dist/layers.9uCqrH5t.js +1 -0
  16. package/dist/{layers.BdOVa2Lu.js → layers.B-IRKn1Q.js} +1 -1
  17. package/dist/{layers.Bj6z2Bi_.js → layers.B-gemM83.js} +1 -1
  18. package/dist/{layers.BtDBZQYC.js → layers.B1angkYw.js} +3 -3
  19. package/dist/{layers.CAZXJMDy.js → layers.B2PhAbFc.js} +1 -1
  20. package/dist/layers.B2qVoax1.js +6 -0
  21. package/dist/{layers.BezdUJbt.js → layers.B5PE4t55.js} +1 -1
  22. package/dist/{layers.BjWvkVIw.js → layers.B5h0mMpu.js} +1 -1
  23. package/dist/{layers.D9y8hW2J.js → layers.B5lOZ3cQ.js} +1 -1
  24. package/dist/{layers.AIFJOh7-.js → layers.B6Lp9fGn.js} +1 -1
  25. package/dist/{layers.BJiXzpn9.js → layers.B6MA5MMV.js} +2 -2
  26. package/dist/{layers.ChEtToB5.js → layers.B7qUE86i.js} +1 -1
  27. package/dist/{layers.BIocoshL.js → layers.B8SPHnlM.js} +1 -1
  28. package/dist/{layers.DGqJ5hvj.js → layers.BATpB8ml.js} +1 -1
  29. package/dist/{layers.C_kd5kKo.js → layers.BBXLw8OJ.js} +2 -2
  30. package/dist/{layers.CyHuYyjp.js → layers.BCrI3-J4.js} +1 -1
  31. package/dist/{layers.DGWWOf_0.js → layers.BED9gz8f.js} +1 -1
  32. package/dist/{layers.BYuk8taG.js → layers.BENTJJay.js} +1 -1
  33. package/dist/{layers.Blr9V5M3.js → layers.BFnccP3F.js} +1 -1
  34. package/dist/{layers.zWZage30.js → layers.BGvvw-Fj.js} +1 -1
  35. package/dist/{layers.C1-gwvMr.js → layers.BIr76blK.js} +1 -1
  36. package/dist/{layers.CAYZJuDT.js → layers.BJpSrNfp.js} +1 -1
  37. package/dist/{layers.C7erSwM7.js → layers.BLS_i4TS.js} +1 -1
  38. package/dist/layers.BMMRiCAE.js +1 -0
  39. package/dist/{layers.DYV6C1d0.js → layers.BPQLhCgm.js} +1 -1
  40. package/dist/{layers.BBDOf8IK.js → layers.BQRSwCZf.js} +1 -1
  41. package/dist/{layers.B2a_o8ri.js → layers.BQnHmGft.js} +1 -1
  42. package/dist/{layers.BZVt-QLH.js → layers.BR1opg7m.js} +1 -1
  43. package/dist/{layers.Fl4w_GiB.js → layers.BRRUxaz9.js} +1 -1
  44. package/dist/{layers.CvWZa1Ly.js → layers.BRaevnzS.js} +1 -1
  45. package/dist/{layers.a8ZVFxGY.js → layers.BSudOVYg.js} +1 -1
  46. package/dist/{layers.BGRsBtn4.js → layers.BSwDfDvh.js} +1 -1
  47. package/dist/{layers.B_a4j9JT.js → layers.BU6qvWsR.js} +1 -1
  48. package/dist/{layers.BIP5DKIx.js → layers.BUlPZ5NW.js} +2 -2
  49. package/dist/{layers.C_ZFEi07.js → layers.BUtrHATE.js} +1 -1
  50. package/dist/{layers.D2IRjCdS.js → layers.BY9BFn4g.js} +1 -1
  51. package/dist/{layers.BxlxNnBd.js → layers.B_gKJhwG.js} +1 -1
  52. package/dist/{layers.D45K0i9c.js → layers.B_voxFTc.js} +1 -1
  53. package/dist/{layers.BREIg8lx.js → layers.BcdpiASN.js} +1 -1
  54. package/dist/{layers.B8S98f6T.js → layers.Bcrw950R.js} +1 -1
  55. package/dist/{layers.DFlrZzzj.js → layers.Bgf_BfoV.js} +1 -1
  56. package/dist/{layers.9NdkIOMa.js → layers.BhVIYBRZ.js} +1 -1
  57. package/dist/{layers.Dpm15kjO.js → layers.Bhl9XKfX.js} +1 -1
  58. package/dist/{layers.DGiEGG3a.js → layers.BlRJwiGf.js} +1 -1
  59. package/dist/{layers.eGrHew7X.js → layers.BmSD2jtd.js} +1 -1
  60. package/dist/{layers.Dv8h6ETT.js → layers.BpWOxVkg.js} +3 -3
  61. package/dist/{layers.7f54VNYV.js → layers.BpZtMmV0.js} +1 -1
  62. package/dist/{layers.27rIMWpz.js → layers.BpulqPoM.js} +1 -1
  63. package/dist/{layers.F9Sgmb8n.js → layers.Bqh2HnC4.js} +2 -2
  64. package/dist/{layers.Y1mT4A1g.js → layers.Br3FiCNG.js} +1 -1
  65. package/dist/{layers.DboE1z0I.js → layers.BsTCRiau.js} +1 -1
  66. package/dist/{layers.COBD5UeH.js → layers.BxFmNPcR.js} +1 -1
  67. package/dist/{layers.CJJVn2Sg.js → layers.ByVWugfj.js} +1 -1
  68. package/dist/{layers.nExtsBSg.js → layers.Bzhbgfqj.js} +1 -1
  69. package/dist/{layers.CrN5hrTq.js → layers.BzodtQNp.js} +1 -1
  70. package/dist/{layers.McCznsG8.js → layers.C-bfAcMP.js} +1 -1
  71. package/dist/{layers.CCt16n9g.js → layers.C10pxuwK.js} +1 -1
  72. package/dist/{layers.DI7rxdN4.js → layers.C15SoLOr.js} +1 -1
  73. package/dist/{layers.CdA3ciX_.js → layers.C198O2sc.js} +1 -1
  74. package/dist/{layers.BIuvPhY1.js → layers.C24XGCcF.js} +1 -1
  75. package/dist/{layers.D01QrYT_.js → layers.C6M4l-tz.js} +1 -1
  76. package/dist/{layers.DBBbzAeF.js → layers.C79L57-I.js} +3 -3
  77. package/dist/{layers.DDb13uwl.js → layers.C8hhx2TF.js} +1 -1
  78. package/dist/{layers.DP7iXR_t.js → layers.CBSQ5kq9.js} +1 -1
  79. package/dist/{layers.Cff_vQHj.js → layers.CCQmId75.js} +1 -1
  80. package/dist/{layers.C_UoU9Pr.js → layers.CDBJ0zLj.js} +1 -1
  81. package/dist/{layers.BYXiCmHM.js → layers.CGUDxtll.js} +1 -1
  82. package/dist/{layers.SSMEV3Dy.js → layers.CJfVXKS6.js} +1 -1
  83. package/dist/{layers.XLAw-Skf.js → layers.CKQVx2Pl.js} +3 -3
  84. package/dist/{layers.DvRC_cCv.js → layers.CLlrhFsn.js} +1 -1
  85. package/dist/{layers.D5ERnHki.js → layers.CLmUDe1R.js} +1 -1
  86. package/dist/{layers.CDnP8wrZ.js → layers.CM-8CCZn.js} +1 -1
  87. package/dist/{layers.IVSwVa4U.js → layers.CN8uxVVv.js} +1 -1
  88. package/dist/{layers.DCW_lplt.js → layers.CQao3Dj8.js} +2 -2
  89. package/dist/{layers.BRjyKhNu.js → layers.CQf8tCq6.js} +1 -1
  90. package/dist/{layers.Bg-O8_VQ.js → layers.CRmUdNhF.js} +3 -3
  91. package/dist/{layers.Z3i_m82-.js → layers.CT3QcU3C.js} +1 -1
  92. package/dist/{layers.joMzqJZZ.js → layers.CTQG7H04.js} +1 -1
  93. package/dist/{layers.C8CndwYI.js → layers.CUc2diiw.js} +1 -1
  94. package/dist/{layers.D4dAi4UA.js → layers.CUu1Lezd.js} +1 -1
  95. package/dist/{layers._qPr88Ps.js → layers.CV-el4dp.js} +1 -1
  96. package/dist/{layers.CZPBFJEI.js → layers.CVDTVqwe.js} +1 -1
  97. package/dist/{layers.CecZpFcg.js → layers.CVRBhwR6.js} +2 -2
  98. package/dist/{layers.7A-AWG6Y.js → layers.CWC6C17J.js} +1 -1
  99. package/dist/{layers.DEjqiXjy.js → layers.CW_zKPAc.js} +1 -1
  100. package/dist/{layers.B4k-NAWn.js → layers.CXNYkJ6S.js} +1 -1
  101. package/dist/{layers.qjmtfq4v.js → layers.C_cOO-AH.js} +1 -1
  102. package/dist/{layers.DzFZNvWd.js → layers.CfxexSAf.js} +1 -1
  103. package/dist/{layers.CrE5RGG3.js → layers.CgInx-gK.js} +1 -1
  104. package/dist/{layers.BWVVpOyg.js → layers.CgjjPDiG.js} +1 -1
  105. package/dist/{layers.rEuTR_6K.js → layers.CjLd-GDd.js} +1 -1
  106. package/dist/{layers.5RnYKqAV.js → layers.CjO4vnQg.js} +1 -1
  107. package/dist/{layers.HUnNXyvo.js → layers.CkHlumb1.js} +1 -1
  108. package/dist/{layers.-zwIePJL.js → layers.CkP7SK17.js} +1 -1
  109. package/dist/{layers.v28WTdBI.js → layers.Ckto9UI4.js} +1 -1
  110. package/dist/{layers.Df0ED9js.js → layers.ClRTyHzp.js} +1 -1
  111. package/dist/{layers.CZw4jFWp.js → layers.Cmgx6S8B.js} +1 -1
  112. package/dist/{layers.CxGFFE3f.js → layers.CpHeWx16.js} +1 -1
  113. package/dist/{layers.DyEx4L6i.js → layers.CpfdZkjc.js} +1 -1
  114. package/dist/layers.CqXhG2Ra.js +1 -0
  115. package/dist/{layers.Dvn7ZJ8r.js → layers.Cqlwct_8.js} +1 -1
  116. package/dist/{layers.CBTTGw3X.js → layers.Cx_yotFZ.js} +3 -3
  117. package/dist/{layers.B6A3MJ1h.js → layers.Cxh8kXZ-.js} +8 -8
  118. package/dist/{layers.lb5LaYmm.js → layers.CyM3cnso.js} +1 -1
  119. package/dist/{layers.C6m-u01R.js → layers.CyxLWTiD.js} +1 -1
  120. package/dist/{layers.BZGXcuTQ.js → layers.Cz72BAWi.js} +1 -1
  121. package/dist/{layers.a8mR40Sd.js → layers.Cz8rugFA.js} +1 -1
  122. package/dist/{layers.C3vVAEap.js → layers.CzmJje2n.js} +4 -4
  123. package/dist/{layers.D2iRzzqA.js → layers.D-41Np6G.js} +1 -1
  124. package/dist/{layers.BwPUoDKo.js → layers.D1OlbZQs.js} +1 -1
  125. package/dist/{layers.hEAkgubG.js → layers.D2t3Pgxg.js} +1 -1
  126. package/dist/{layers.B7DK85Yx.js → layers.D3QU9r8V.js} +1 -1
  127. package/dist/{layers.fNiYy290.js → layers.D43rUbwd.js} +1 -1
  128. package/dist/{layers.CR5rsK4G.js → layers.D5V2J52v.js} +1 -1
  129. package/dist/{layers.CjECQudP.js → layers.D7-KIh7G.js} +1 -1
  130. package/dist/{layers.v2MvQ8qE.js → layers.D7xMYlvR.js} +7 -7
  131. package/dist/{layers.CPanzj95.js → layers.D90DTDHO.js} +1 -1
  132. package/dist/{layers.Bx85HdXX.js → layers.D9ZlU-w1.js} +206 -200
  133. package/dist/{layers.B0rHgMWk.js → layers.DEsqXSPe.js} +1 -1
  134. package/dist/{layers.0kq-YaaF.js → layers.DFSs7JIn.js} +1 -1
  135. package/dist/{layers.hGmfR_RZ.js → layers.DGSh8iWE.js} +1 -1
  136. package/dist/{layers.BWJ0AokJ.js → layers.DHdU8pgj.js} +1 -1
  137. package/dist/{layers.Bg1NNWsc.js → layers.DJnVNBxT.js} +1 -1
  138. package/dist/{layers.BDw79nWf.js → layers.DMFszlYQ.js} +1 -1
  139. package/dist/{layers.B3d-xyco.js → layers.DMjwrQLj.js} +1 -1
  140. package/dist/{layers.Dz3argNj.js → layers.DNVP3P1o.js} +2 -2
  141. package/dist/{layers.BGV5CRZA.js → layers.DPnLe5Cu.js} +1 -1
  142. package/dist/{layers.Bgrwx9LF.js → layers.DQoPGgou.js} +1 -1
  143. package/dist/{layers.CfGMO7hM.js → layers.DSE5yahl.js} +1 -1
  144. package/dist/{layers.jeR5Rj6W.js → layers.DTgr7Av6.js} +1 -1
  145. package/dist/{layers.Cb5hP9-L.js → layers.DV2PmtDd.js} +1 -1
  146. package/dist/{layers.gZltT9rs.js → layers.DWDQjjRC.js} +1 -1
  147. package/dist/{layers.CTS80xfD.js → layers.DXhWU4Fz.js} +2 -2
  148. package/dist/{layers.BfR52kS1.js → layers.D_dfjtoo.js} +2 -2
  149. package/dist/{layers.Bn_ndhxj.js → layers.DeR5a9Jr.js} +1 -1
  150. package/dist/{layers.fnQs_oRY.js → layers.DewLutn2.js} +1 -1
  151. package/dist/{layers.DtXpG_Hf.js → layers.Dh7tyajc.js} +1 -1
  152. package/dist/{layers.CM9VYBQW.js → layers.Di2Rr_Vd.js} +1 -1
  153. package/dist/{layers.D9TTDE3F.js → layers.Di8C3Bta.js} +3 -3
  154. package/dist/{layers.Cr_CQW5n.js → layers.DjsGZqEz.js} +3 -3
  155. package/dist/{layers.Cm3JRLEz.js → layers.Dl-27lpK.js} +1 -1
  156. package/dist/{layers.BcAEnhdo.js → layers.DlGF8YoD.js} +3 -3
  157. package/dist/{layers.CLS5L_EP.js → layers.DnZH4xXh.js} +1 -1
  158. package/dist/{layers.ZmyZ7ic-.js → layers.Dnx8G9xF.js} +1 -1
  159. package/dist/{layers.BzwkJ4CQ.js → layers.DoC-cHDf.js} +1 -1
  160. package/dist/{layers.CbRQHP9A.js → layers.DovFbJ0Y.js} +4 -4
  161. package/dist/{layers.BwMNN22e.js → layers.DsvlpAHP.js} +1 -1
  162. package/dist/{layers.BP32GPh8.js → layers.DtEFOZXB.js} +1 -1
  163. package/dist/{layers.BI9b6cgG.js → layers.DvXQ-pTF.js} +1 -1
  164. package/dist/{layers.COe807mn.js → layers.Dvsl4Z6Q.js} +3 -3
  165. package/dist/{layers.DWVc9Up0.js → layers.DxviyPH0.js} +1 -1
  166. package/dist/{layers.DGSYEXoR.js → layers.DyobFbup.js} +1 -1
  167. package/dist/{layers.BX1xK6Jh.js → layers.DztkVG0m.js} +1 -1
  168. package/dist/{layers.saqp250N.js → layers.EEZV8wFB.js} +1 -1
  169. package/dist/{layers.CFkbejs6.js → layers.G03pElKT.js} +24 -24
  170. package/dist/{layers.Bk4I-9nC.js → layers.Isn7SSqK.js} +1 -1
  171. package/dist/{layers.DIZotUv5.js → layers.KLj8Npgz.js} +1 -1
  172. package/dist/{layers.BWvzS_WI.js → layers.MEmvpEMR.js} +1 -1
  173. package/dist/{layers.BM5RXJ4Y.js → layers.OZ4Cc6Um.js} +1 -1
  174. package/dist/{layers.BUdEpcCm.js → layers.PLD4dRUX.js} +1 -1
  175. package/dist/{layers.C84bILt4.js → layers.SPZoSyri.js} +4430 -4393
  176. package/dist/{layers.DWR11-gz.js → layers.TYIYh5iX.js} +1 -1
  177. package/dist/{layers.DjY4sBCb.js → layers.U2qGM5y0.js} +1 -1
  178. package/dist/{layers.W8cNMU_r.js → layers.U5ecPFb1.js} +1 -1
  179. package/dist/{layers.B-nMUUq4.js → layers.UEo8emoH.js} +1 -1
  180. package/dist/{layers.iKqovVGX.js → layers.UN2ykxc0.js} +89 -89
  181. package/dist/{layers.BP57tVFS.js → layers.YYeCnW7C.js} +1 -1
  182. package/dist/{layers.DpyY2Kx8.js → layers.ZHyI88ul.js} +4 -4
  183. package/dist/{layers.BYnAEiB6.js → layers.ZOQzZu_H.js} +1 -1
  184. package/dist/{layers.xGf-kfN_.js → layers.Zo4we89b.js} +1 -1
  185. package/dist/{layers.BuvLwKuX.js → layers._37hg6KG.js} +1 -1
  186. package/dist/{layers.eXlQp_PR.js → layers.a5vzba3G.js} +1 -1
  187. package/dist/{layers.Deo2Okbh.js → layers.aUlvhkbf.js} +1 -1
  188. package/dist/{layers.dn5gxvrG.js → layers.b30fGQDH.js} +5 -5
  189. package/dist/{layers.1xzfMqy_.js → layers.c8dvMx97.js} +1 -1
  190. package/dist/{layers.AJCUOm9k.js → layers.d3Az6rHI.js} +1 -1
  191. package/dist/{layers.CMOHBO14.js → layers.d45jrq_V.js} +1 -1
  192. package/dist/{layers.BgM_akva.js → layers.e8KJO6-d.js} +1 -1
  193. package/dist/{layers.9dPZtJCn.js → layers.eYp5kkDn.js} +1 -1
  194. package/dist/{layers.Cx09mEZL.js → layers.g2xae00l.js} +1 -1
  195. package/dist/{layers.BHhicaRB.js → layers.hEZUFCgU.js} +1 -1
  196. package/dist/{layers.B7iwfufq.js → layers.j0Ega8H8.js} +1 -1
  197. package/dist/{layers.CfDd2gwA.js → layers.jamH01v0.js} +1 -1
  198. package/dist/{layers.DvV26JRb.js → layers.jsZFZNE1.js} +1 -1
  199. package/dist/{layers.BiLC16cd.js → layers.lugLnedW.js} +1 -1
  200. package/dist/{layers.iIqv8C11.js → layers.mBNiXe38.js} +1 -1
  201. package/dist/{layers.CiKkpvDa.js → layers.rq_adk4i.js} +1 -1
  202. package/dist/{layers.CHb0nYSK.js → layers.sXoUryh2.js} +1 -1
  203. package/dist/{layers.DZtqiuDl.js → layers.tAkfRECQ.js} +1 -1
  204. package/dist/{layers.Co6SrrXn.js → layers.uDM07tKr.js} +2 -2
  205. package/dist/{layers.S6fgkyJ1.js → layers.vGeAi59V.js} +3 -3
  206. package/dist/{layers.CXokQQag.js → layers.vf7X51OR.js} +1 -1
  207. package/dist/{layers.Cz1WPdaO.js → layers.zcMBgJ-u.js} +3 -3
  208. package/dist/{layers.CgXKbLtY.js → layers.zhRc7F4d.js} +1 -1
  209. package/package.json +1 -1
  210. package/dist/layers.BwAoDvhg.js +0 -6
  211. package/dist/layers.Chdtem6v.js +0 -1
  212. package/dist/layers.DYDfNTz5.js +0 -8
  213. package/dist/layers.DjKz28Gx.js +0 -1
  214. package/dist/layers.DjcfaUyC.js +0 -1
@@ -1,11 +1,11 @@
1
1
  import { jsx as n, jsxs as N, Fragment as X } from "react/jsx-runtime";
2
- import { useState as y, useCallback as L, useRef as ne, useEffect as E, useMemo as ie, useContext as Ue } from "react";
2
+ import { useState as y, useCallback as L, useRef as ne, useEffect as O, useMemo as ie, useContext as xe } from "react";
3
3
  import { useTranslation as Y } from "react-i18next";
4
4
  import { useLexicalComposerContext as Z } from "@lexical/react/LexicalComposerContext";
5
- import { Menu as R, Flex as ee, Popover as W, Stack as tt, Button as G, Box as Le, LoadingOverlay as ot } from "@mantine/core";
6
- import { $getNodeByKey as P, COMMAND_PRIORITY_LOW as nt, $setSelection as it } from "lexical";
7
- import { z as rt, B as at, D as lt, F as st, G as Ne, J as oe, N as dt, P as ct, L as re, K as ut, Q as pt, H as M, R as Ae, m as Re, S as Me, U as We, W as O, w as ze, X as mt, Y as gt, n as Se, Z as ht, C as Fe, _ as ft, a0 as wt, a1 as te, a2 as kt, a3 as bt, a4 as vt, a5 as yt, a6 as It, a7 as Ct, a8 as Dt, y as Lt, k as Pe, O as Nt, a9 as St, aa as Pt, ab as Ot, V as Oe, ac as Ee, A as Et } from "./layers.C84bILt4.js";
8
- import { AttachmentsGalleryModal as _e, showErrorNotification as xt } from "@layers-app/shared";
5
+ import { Menu as M, Flex as ee, Popover as W, Stack as tt, Button as G, Box as Le, LoadingOverlay as ot } from "@mantine/core";
6
+ import { $getNodeByKey as E, COMMAND_PRIORITY_LOW as nt, $setSelection as it } from "lexical";
7
+ import { D as rt, z as at, B as lt, F as st, G as dt, J as Ne, N as oe, P as ct, Q as ut, L as re, K as pt, R as mt, H as R, S as Ae, m as Me, U as Re, W as We, X as P, w as ze, Y as gt, Z as ft, n as Se, _ as ht, C as Fe, a0 as wt, a1 as bt, a2 as te, a3 as kt, a4 as vt, a5 as yt, a6 as It, a7 as Ct, a8 as Dt, a9 as Lt, y as Nt, k as Ee, O as St, aa as Et, ab as Pt, ac as Ot, V as Pe, ad as Oe, A as Tt } from "./layers.SPZoSyri.js";
8
+ import { AttachmentsGalleryModal as _e, showErrorNotification as Ut } from "@layers-app/shared";
9
9
  import { useLexicalEditable as ae } from "@lexical/react/useLexicalEditable";
10
10
  import { useDisclosure as V } from "@mantine/hooks";
11
11
  import "@lexical/react/LexicalDecoratorBlockNode";
@@ -17,7 +17,13 @@ import "react-dom";
17
17
  import "@lexical/react/LexicalErrorBoundary";
18
18
  import "@lexical/react/LexicalBlockWithAlignableContents";
19
19
  import "@mantine/notifications";
20
- function Tt(e, i) {
20
+ const xt = (e) => {
21
+ if (typeof e == "number") return e > 0;
22
+ if (e.includes("%")) return e !== rt;
23
+ const i = parseFloat(e);
24
+ return Number.isFinite(i) && i > 0;
25
+ };
26
+ function At(e, i) {
21
27
  const t = document.createElement("a");
22
28
  t.href = e, t.download = i, t.rel = "noopener", document.body.appendChild(t), t.click(), t.remove();
23
29
  }
@@ -35,27 +41,27 @@ async function se(e, i) {
35
41
  throw new Error("fetch failed");
36
42
  const r = await t.blob(), a = URL.createObjectURL(r);
37
43
  try {
38
- Tt(a, i);
44
+ At(a, i);
39
45
  } finally {
40
46
  setTimeout(() => URL.revokeObjectURL(a), 0);
41
47
  }
42
48
  }
43
- function Ut({
49
+ function Mt({
44
50
  editor: e,
45
51
  nodeKey: i,
46
52
  href: t,
47
53
  onClose: r
48
54
  }) {
49
55
  const [a, d] = y(
50
- () => rt(t)
51
- ), [l, c] = y(() => at(t)), [D, b] = y(!1), p = L((u) => {
52
- d(u), b(!1);
56
+ () => at(t)
57
+ ), [l, c] = y(() => lt(t)), [D, k] = y(!1), p = L((u) => {
58
+ d(u), k(!1);
53
59
  }, []), m = L((u) => {
54
- c(u), b(!1);
55
- }, []), f = L(() => {
56
- const u = lt(l.trim(), a);
57
- if (!u || !st(u, a)) {
58
- b(!0);
60
+ c(u), k(!1);
61
+ }, []), h = L(() => {
62
+ const u = st(l.trim(), a);
63
+ if (!u || !dt(u, a)) {
64
+ k(!0);
59
65
  return;
60
66
  }
61
67
  Ne(e, i, oe(u)), r();
@@ -63,9 +69,9 @@ function Ut({
63
69
  Ne(e, i, ""), r();
64
70
  }, [e, i, r]), v = L(
65
71
  (u) => {
66
- u.key === "Enter" ? (u.preventDefault(), f()) : u.key === "Escape" && (u.preventDefault(), r());
72
+ u.key === "Enter" ? (u.preventDefault(), h()) : u.key === "Escape" && (u.preventDefault(), r());
67
73
  },
68
- [f, r]
74
+ [h, r]
69
75
  );
70
76
  return {
71
77
  linkType: a,
@@ -74,7 +80,7 @@ function Ut({
74
80
  onLinkTypeChange: p,
75
81
  onUrlInputChange: m,
76
82
  onUrlInputKeyDown: v,
77
- onSave: f,
83
+ onSave: h,
78
84
  onRemove: I
79
85
  };
80
86
  }
@@ -85,12 +91,12 @@ function de({
85
91
  onClose: r,
86
92
  mobile: a
87
93
  }) {
88
- const d = ne(null), l = Ut({ editor: e, nodeKey: i, href: t, onClose: r });
89
- return E(() => {
94
+ const d = ne(null), l = Mt({ editor: e, nodeKey: i, href: t, onClose: r });
95
+ return O(() => {
90
96
  var c;
91
97
  (c = d.current) == null || c.focus({ preventScroll: !0 });
92
98
  }, []), /* @__PURE__ */ n(
93
- dt,
99
+ ct,
94
100
  {
95
101
  inputRef: d,
96
102
  linkUrl: l.linkUrl,
@@ -116,28 +122,28 @@ function je({
116
122
  onLinkAction: l
117
123
  }) {
118
124
  return /* @__PURE__ */ N(
119
- R,
125
+ M,
120
126
  {
121
127
  opened: e,
122
128
  onChange: i,
123
- transitionProps: ct,
129
+ transitionProps: ut,
124
130
  shadow: "md",
125
131
  position: "bottom-start",
126
132
  offset: 4,
127
133
  withinPortal: !0,
128
134
  closeOnItemClick: !0,
129
135
  children: [
130
- /* @__PURE__ */ n(R.Target, { children: /* @__PURE__ */ n(
136
+ /* @__PURE__ */ n(M.Target, { children: /* @__PURE__ */ n(
131
137
  re,
132
138
  {
133
139
  label: t("editor.toolbar.more"),
134
- icon: ut,
140
+ icon: pt,
135
141
  iconColor: "var(--mantine-color-gray-text)",
136
142
  "aria-label": t("editor.toolbar.more")
137
143
  }
138
144
  ) }),
139
145
  /* @__PURE__ */ N(
140
- R.Dropdown,
146
+ M.Dropdown,
141
147
  {
142
148
  p: 4,
143
149
  miw: 164,
@@ -145,9 +151,9 @@ function je({
145
151
  onMouseDown: (c) => c.preventDefault(),
146
152
  children: [
147
153
  l && /* @__PURE__ */ n(
148
- R.Item,
154
+ M.Item,
149
155
  {
150
- leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(pt, { name: "link", size: 16 }) }),
156
+ leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(mt, { name: "link", size: 16 }) }),
151
157
  onClick: (c) => {
152
158
  c.stopPropagation(), l();
153
159
  },
@@ -155,9 +161,9 @@ function je({
155
161
  }
156
162
  ),
157
163
  /* @__PURE__ */ n(
158
- R.Item,
164
+ M.Item,
159
165
  {
160
- leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(M, { icon: Ae, size: 16 }) }),
166
+ leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(R, { icon: Ae, size: 16 }) }),
161
167
  onClick: (c) => {
162
168
  c.stopPropagation(), r();
163
169
  },
@@ -165,10 +171,10 @@ function je({
165
171
  }
166
172
  ),
167
173
  /* @__PURE__ */ n(
168
- R.Item,
174
+ M.Item,
169
175
  {
170
176
  color: "red",
171
- leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(M, { icon: Re, size: 16 }) }),
177
+ leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(R, { icon: Me, size: 16 }) }),
172
178
  onClick: (c) => {
173
179
  c.stopPropagation(), a();
174
180
  },
@@ -188,7 +194,7 @@ const $e = ({
188
194
  setShown: t,
189
195
  id: r
190
196
  }) => {
191
- const [a, { open: d, close: l }] = V(!1), c = Me(), D = ie(() => [
197
+ const [a, { open: d, close: l }] = V(!1), c = Re(), D = ie(() => [
192
198
  {
193
199
  id: !r || r === "0" ? "" : r,
194
200
  Url: i ?? "",
@@ -233,24 +239,24 @@ const $e = ({
233
239
  }
234
240
  )
235
241
  ] });
236
- }, At = ({
242
+ }, Rt = ({
237
243
  nodeKey: e,
238
244
  src: i,
239
245
  href: t
240
246
  }) => {
241
- const [r] = Z(), a = ae(), [d, l] = y(!1), [c, D] = y(!1), [b, p] = y(!1), { t: m } = Y();
242
- E(() => {
243
- if (!b) return;
247
+ const [r] = Z(), a = ae(), [d, l] = y(!1), [c, D] = y(!1), [k, p] = y(!1), { t: m } = Y();
248
+ O(() => {
249
+ if (!k) return;
244
250
  const v = (u) => {
245
251
  const w = u.target;
246
252
  w != null && w.closest(".floating-link-dropdown") || w != null && w.closest(".floating-link-type-combobox-dropdown") || p(!1);
247
253
  };
248
254
  return document.addEventListener("pointerdown", v, !0), () => document.removeEventListener("pointerdown", v, !0);
249
- }, [b]);
250
- const f = L(() => {
255
+ }, [k]);
256
+ const h = L(() => {
251
257
  r.update(() => {
252
- const v = P(e);
253
- O(v) && v.remove();
258
+ const v = E(e);
259
+ P(v) && v.remove();
254
260
  });
255
261
  }, [r, e]), I = L(async () => {
256
262
  if (i)
@@ -262,7 +268,7 @@ const $e = ({
262
268
  return /* @__PURE__ */ N(
263
269
  W,
264
270
  {
265
- opened: b,
271
+ opened: k,
266
272
  onChange: p,
267
273
  position: "bottom-end",
268
274
  offset: 4,
@@ -298,7 +304,7 @@ const $e = ({
298
304
  onOpenChange: D,
299
305
  t: m,
300
306
  onDownload: () => void I(),
301
- onDelete: f,
307
+ onDelete: h,
302
308
  hasLink: !!t,
303
309
  onLinkAction: () => p(!0)
304
310
  }
@@ -326,24 +332,24 @@ const $e = ({
326
332
  ]
327
333
  }
328
334
  );
329
- }, Rt = () => {
335
+ }, Wt = () => {
330
336
  };
331
- function Mt({ nodeKey: e, src: i, id: t, href: r }) {
332
- const { t: a } = Y(), [d] = Z(), l = ae(), [c, D] = y(!1), [b, p] = y(!1), [m, f] = y(!1);
333
- E(() => {
337
+ function zt({ nodeKey: e, src: i, id: t, href: r }) {
338
+ const { t: a } = Y(), [d] = Z(), l = ae(), [c, D] = y(!1), [k, p] = y(!1), [m, h] = y(!1);
339
+ O(() => {
334
340
  if (!m) return;
335
341
  const u = (w) => {
336
342
  const S = w.target;
337
- S != null && S.closest(".floating-link-dropdown") || S != null && S.closest(".floating-link-type-combobox-dropdown") || f(!1);
343
+ S != null && S.closest(".floating-link-dropdown") || S != null && S.closest(".floating-link-type-combobox-dropdown") || h(!1);
338
344
  };
339
345
  return document.addEventListener("pointerdown", u, !0), () => document.removeEventListener("pointerdown", u, !0);
340
346
  }, [m]);
341
347
  const I = L(() => {
342
348
  p(!1), d.update(() => {
343
- const u = P(e);
344
- if (!O(u)) return;
349
+ const u = E(e);
350
+ if (!P(u)) return;
345
351
  const w = u.getParent();
346
- mt(w) ? w.remove() : u.remove();
352
+ gt(w) ? w.remove() : u.remove();
347
353
  });
348
354
  }, [d, e]), v = L(async () => {
349
355
  if (i)
@@ -356,7 +362,7 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
356
362
  W,
357
363
  {
358
364
  opened: m,
359
- onChange: f,
365
+ onChange: h,
360
366
  position: "bottom-end",
361
367
  offset: 4,
362
368
  shadow: "md",
@@ -379,7 +385,7 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
379
385
  },
380
386
  onClick: (u) => u.stopPropagation(),
381
387
  children: [
382
- /* @__PURE__ */ n($e, { t: a, src: i, setShown: Rt, id: t }),
388
+ /* @__PURE__ */ n($e, { t: a, src: i, setShown: Wt, id: t }),
383
389
  l && /* @__PURE__ */ N(X, { children: [
384
390
  /* @__PURE__ */ n(
385
391
  ze,
@@ -394,13 +400,13 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
394
400
  /* @__PURE__ */ n(
395
401
  je,
396
402
  {
397
- opened: b,
403
+ opened: k,
398
404
  onOpenChange: p,
399
405
  t: a,
400
406
  onDownload: () => void v(),
401
407
  onDelete: I,
402
408
  hasLink: !!r,
403
- onLinkAction: () => f(!0)
409
+ onLinkAction: () => h(!0)
404
410
  }
405
411
  )
406
412
  ] })
@@ -418,7 +424,7 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
418
424
  editor: d,
419
425
  nodeKey: e,
420
426
  href: r,
421
- onClose: () => f(!1)
427
+ onClose: () => h(!1)
422
428
  }
423
429
  )
424
430
  }
@@ -427,8 +433,8 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
427
433
  }
428
434
  );
429
435
  }
430
- function Wt({ nodeKey: e, src: i, id: t, href: r }) {
431
- const { t: a } = Y(), [d] = Z(), l = ae(), c = Me(), [D, { open: b, close: p }] = V(!1), [m, { open: f, close: I }] = V(!1), [v, { open: u, close: w }] = V(!1), S = () => {
436
+ function Ft({ nodeKey: e, src: i, id: t, href: r }) {
437
+ const { t: a } = Y(), [d] = Z(), l = ae(), c = Re(), [D, { open: k, close: p }] = V(!1), [m, { open: h, close: I }] = V(!1), [v, { open: u, close: w }] = V(!1), S = () => {
432
438
  p(), u();
433
439
  }, z = ie(
434
440
  () => [
@@ -452,18 +458,18 @@ function Wt({ nodeKey: e, src: i, id: t, href: r }) {
452
458
  }
453
459
  ],
454
460
  [i, t]
455
- ), h = () => {
456
- p(), f();
457
- }, x = L(async () => {
461
+ ), f = () => {
462
+ p(), h();
463
+ }, T = L(async () => {
458
464
  if (p(), !!i)
459
465
  try {
460
466
  await se(i, le(i));
461
467
  } catch {
462
468
  }
463
- }, [i, p]), A = L(() => {
469
+ }, [i, p]), x = L(() => {
464
470
  p(), d.update(() => {
465
- const C = P(e);
466
- O(C) && C.remove();
471
+ const C = E(e);
472
+ P(C) && C.remove();
467
473
  });
468
474
  }, [d, e, p]);
469
475
  return /* @__PURE__ */ N(X, { children: [
@@ -483,10 +489,10 @@ function Wt({ nodeKey: e, src: i, id: t, href: r }) {
483
489
  re,
484
490
  {
485
491
  label: a("editor.toolbar.more"),
486
- icon: gt,
492
+ icon: ft,
487
493
  iconColor: "var(--mantine-color-gray-text)",
488
494
  "aria-label": a("editor.toolbar.more"),
489
- onClick: b
495
+ onClick: k
490
496
  }
491
497
  )
492
498
  }
@@ -495,7 +501,7 @@ function Wt({ nodeKey: e, src: i, id: t, href: r }) {
495
501
  _e,
496
502
  {
497
503
  opened: m,
498
- onOpenChange: (C) => C ? f() : I(),
504
+ onOpenChange: (C) => C ? h() : I(),
499
505
  attachments: z,
500
506
  allowDownload: c
501
507
  }
@@ -516,9 +522,9 @@ function Wt({ nodeKey: e, src: i, id: t, href: r }) {
516
522
  fullWidth: !0,
517
523
  justify: "flex-start",
518
524
  bg: "var(--editor-action-bg)",
519
- onClick: h,
525
+ onClick: f,
520
526
  leftSection: /* @__PURE__ */ n(
521
- M,
527
+ R,
522
528
  {
523
529
  icon: We,
524
530
  size: 16,
@@ -539,7 +545,7 @@ function Wt({ nodeKey: e, src: i, id: t, href: r }) {
539
545
  bg: "var(--editor-action-bg)",
540
546
  onClick: S,
541
547
  leftSection: /* @__PURE__ */ n(
542
- M,
548
+ R,
543
549
  {
544
550
  icon: ht,
545
551
  size: 16,
@@ -558,9 +564,9 @@ function Wt({ nodeKey: e, src: i, id: t, href: r }) {
558
564
  fullWidth: !0,
559
565
  justify: "flex-start",
560
566
  bg: "var(--editor-action-bg)",
561
- onClick: () => void x(),
567
+ onClick: () => void T(),
562
568
  leftSection: /* @__PURE__ */ n(
563
- M,
569
+ R,
564
570
  {
565
571
  icon: Ae,
566
572
  size: 16,
@@ -579,11 +585,11 @@ function Wt({ nodeKey: e, src: i, id: t, href: r }) {
579
585
  fullWidth: !0,
580
586
  justify: "flex-start",
581
587
  bg: "var(--editor-action-bg)",
582
- onClick: A,
588
+ onClick: x,
583
589
  leftSection: /* @__PURE__ */ n(
584
- M,
590
+ R,
585
591
  {
586
- icon: Re,
592
+ icon: Me,
587
593
  size: 16,
588
594
  color: "var(--mantine-color-red-6)"
589
595
  }
@@ -614,7 +620,7 @@ function Wt({ nodeKey: e, src: i, id: t, href: r }) {
614
620
  )
615
621
  ] });
616
622
  }
617
- const xe = 75, Te = (e) => {
623
+ const Te = 75, Ue = (e) => {
618
624
  const {
619
625
  width: i,
620
626
  height: t,
@@ -624,10 +630,10 @@ const xe = 75, Te = (e) => {
624
630
  id: l,
625
631
  altText: c,
626
632
  imageRef: D,
627
- maxWidth: b,
633
+ maxWidth: k,
628
634
  aspectRatio: p,
629
635
  href: m
630
- } = e, f = ne(null);
636
+ } = e, h = ne(null);
631
637
  return /* @__PURE__ */ N(
632
638
  "div",
633
639
  {
@@ -660,15 +666,15 @@ const xe = 75, Te = (e) => {
660
666
  rel: m ? "noopener noreferrer" : void 0,
661
667
  draggable: !1,
662
668
  onMouseDown: m ? (I) => {
663
- f.current = { x: I.clientX, y: I.clientY };
669
+ h.current = { x: I.clientX, y: I.clientY };
664
670
  } : void 0,
665
671
  onClick: m ? (I) => {
666
672
  I.preventDefault();
667
- const v = f.current;
668
- f.current = null, !(v && Math.hypot(I.clientX - v.x, I.clientY - v.y) > 5) && window.open(oe(m), "_blank", "noopener,noreferrer");
673
+ const v = h.current;
674
+ h.current = null, !(v && Math.hypot(I.clientX - v.x, I.clientY - v.y) > 5) && window.open(oe(m), "_blank", "noopener,noreferrer");
669
675
  } : void 0,
670
676
  children: /* @__PURE__ */ n(
671
- zt,
677
+ _t,
672
678
  {
673
679
  className: null,
674
680
  src: d,
@@ -676,14 +682,14 @@ const xe = 75, Te = (e) => {
676
682
  imageRef: D,
677
683
  width: "inherit",
678
684
  height: "inherit",
679
- maxWidth: b || "auto",
685
+ maxWidth: k || "auto",
680
686
  id: l
681
687
  }
682
688
  )
683
689
  }
684
690
  ),
685
- Oe && /* @__PURE__ */ n(
686
- Wt,
691
+ Pe && /* @__PURE__ */ n(
692
+ Ft,
687
693
  {
688
694
  nodeKey: e.nodeKey,
689
695
  src: d,
@@ -691,8 +697,8 @@ const xe = 75, Te = (e) => {
691
697
  href: m
692
698
  }
693
699
  ),
694
- Ee && /* @__PURE__ */ n(
695
- Mt,
700
+ Oe && /* @__PURE__ */ n(
701
+ zt,
696
702
  {
697
703
  nodeKey: e.nodeKey,
698
704
  src: d,
@@ -700,12 +706,12 @@ const xe = 75, Te = (e) => {
700
706
  href: m
701
707
  }
702
708
  ),
703
- Et && !Oe && !Ee && /* @__PURE__ */ n(At, { nodeKey: e.nodeKey, src: d, href: m })
709
+ Tt && !Pe && !Oe && /* @__PURE__ */ n(Rt, { nodeKey: e.nodeKey, src: d, href: m })
704
710
  ]
705
711
  }
706
712
  );
707
713
  };
708
- function zt({
714
+ function _t({
709
715
  altText: e,
710
716
  className: i,
711
717
  imageRef: t,
@@ -715,7 +721,7 @@ function zt({
715
721
  maxWidth: l,
716
722
  id: c
717
723
  }) {
718
- const [D, b] = y(!1);
724
+ const [D, k] = y(!1);
719
725
  return /* @__PURE__ */ n(
720
726
  "img",
721
727
  {
@@ -730,19 +736,19 @@ function zt({
730
736
  },
731
737
  onLoad: () => {
732
738
  r.includes("splash") ? setTimeout(() => {
733
- b(!0);
734
- }, 100) : b(!0);
739
+ k(!0);
740
+ }, 100) : k(!0);
735
741
  },
736
742
  draggable: "false",
737
743
  "data-id": c
738
744
  }
739
745
  );
740
746
  }
741
- function so(e) {
742
- const { disable: i } = Ue(Fe);
743
- return i && ft.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(Ft, { ...e });
747
+ function uo(e) {
748
+ const { disable: i } = xe(Fe);
749
+ return i && wt.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(jt, { ...e });
744
750
  }
745
- function Ft({
751
+ function jt({
746
752
  src: e,
747
753
  altText: i,
748
754
  nodeKey: t,
@@ -752,32 +758,32 @@ function Ft({
752
758
  showCaption: l,
753
759
  caption: c,
754
760
  id: D,
755
- create: b,
761
+ create: k,
756
762
  alignment: p,
757
763
  imagePickerTab: m,
758
- aspectRatio: f,
764
+ aspectRatio: h,
759
765
  href: I
760
766
  }) {
761
- var be, ve;
762
- const v = ne(null), [u, w] = y(!0), [S, z] = y(!1), [h] = Z(), [x, A] = y(!0), [C, F] = y({
767
+ var ke, ve;
768
+ const v = ne(null), [u, w] = y(!0), [S, z] = y(!1), [f] = Z(), [T, x] = y(!0), [C, F] = y({
763
769
  width: 0,
764
770
  height: 0
765
- }), { start: ce, cancel: ue } = wt(), [_t, _] = y(0), {
771
+ }), { start: ce, cancel: ue } = bt(), [$t, _] = y(0), {
766
772
  fetchUploadMedia: j,
767
773
  fetchDeleteMedia: pe,
768
- maxFileSize: jt,
769
- imperativeHandleRef: T,
770
- disable: Be
771
- } = Ue(Fe), $ = te.has(e) && (((be = te.get(e)) == null ? void 0 : be.mediaNodeKeys.length) === 0 || ((ve = te.get(e)) == null ? void 0 : ve.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: B } = Y(), me = (o) => {
774
+ maxFileSize: Ht,
775
+ imperativeHandleRef: U,
776
+ disable: He
777
+ } = xe(Fe), $ = te.has(e) && (((ke = te.get(e)) == null ? void 0 : ke.mediaNodeKeys.length) === 0 || ((ve = te.get(e)) == null ? void 0 : ve.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: H } = Y(), me = (o) => {
772
778
  if (typeof o == "number") return o > 0 ? o : null;
773
779
  if (typeof o == "string" && !o.includes("%")) {
774
780
  const g = parseFloat(o);
775
781
  return Number.isFinite(g) && g > 0 ? g : null;
776
782
  }
777
783
  return null;
778
- }, U = me(r), ge = me(a), He = U != null || typeof r == "string" && r.includes("%"), he = U && ge ? U / ge : void 0, [Ge, Ve] = y(
784
+ }, A = me(r), ge = me(a), Be = xt(r), fe = A && ge ? A / ge : void 0, [Ge, Ve] = y(
779
785
  void 0
780
- ), fe = ie(() => {
786
+ ), he = ie(() => {
781
787
  try {
782
788
  const o = parseFloat(
783
789
  localStorage.getItem("layers-img-ratio:" + e) || ""
@@ -786,13 +792,13 @@ function Ft({
786
792
  } catch {
787
793
  return;
788
794
  }
789
- }, [e]), Xe = he ?? f ?? fe ?? Ge, [Ye, J] = y(!1), Ze = !Ye && !he && (f ?? fe) != null, [$t, Je] = y(0);
790
- E(() => h.registerDecoratorListener(() => {
795
+ }, [e]), Xe = fe ?? h ?? he ?? Ge, [Ye, J] = y(!1), Ze = !Ye && !fe && (h ?? he) != null, [Bt, Je] = y(0);
796
+ O(() => f.registerDecoratorListener(() => {
791
797
  Je((o) => o + 1);
792
- }), [$]), E(() => {
793
- const o = h.getElementByKey(t);
798
+ }), [$]), O(() => {
799
+ const o = f.getElementByKey(t);
794
800
  o && (o.style.removeProperty("aspect-ratio"), o.style.removeProperty("width"));
795
- }, [h, t]), E(() => {
801
+ }, [f, t]), O(() => {
796
802
  if (!e || e.startsWith("data:image/") || !e.trim()) {
797
803
  w(!1);
798
804
  return;
@@ -806,10 +812,10 @@ function Ft({
806
812
  localStorage.setItem("layers-img-ratio:" + e, String(g));
807
813
  } catch {
808
814
  }
809
- !f && o.naturalWidth >= 100 && h.update(
815
+ !h && o.naturalWidth >= 100 && f.update(
810
816
  () => {
811
- const s = P(t);
812
- O(s) && s.getAspectRatio() == null && s.setAspectRatio(g);
817
+ const s = E(t);
818
+ P(s) && s.getAspectRatio() == null && s.setAspectRatio(g);
813
819
  },
814
820
  { tag: "history-merge" }
815
821
  );
@@ -819,86 +825,86 @@ function Ft({
819
825
  };
820
826
  }, [e, $]);
821
827
  const Qe = (o, g) => {
822
- h.update(() => {
828
+ f.update(() => {
823
829
  it(null);
824
- const s = P(t);
825
- O(s) && s.setWidthAndHeight(o, g);
830
+ const s = E(t);
831
+ P(s) && s.setWidthAndHeight(o, g);
826
832
  });
827
833
  }, { historyState: we } = kt(), {
828
- settings: { showNestedEditorTreeView: ke }
829
- } = bt();
834
+ settings: { showNestedEditorTreeView: be }
835
+ } = vt();
830
836
  function qe(o) {
831
837
  return new Promise((g, s) => {
832
- if (St(o)) {
833
- const H = Pt(o);
834
- g(H ? Ot(H) : { width: 0, height: 0 });
838
+ if (Et(o)) {
839
+ const B = Pt(o);
840
+ g(B ? Ot(B) : { width: 0, height: 0 });
835
841
  return;
836
842
  }
837
- const k = new Image();
838
- k.src = o, k.onload = () => {
839
- g({ width: k.width, height: k.height });
840
- }, k.onerror = () => {
843
+ const b = new Image();
844
+ b.src = o, b.onload = () => {
845
+ g({ width: b.width, height: b.height });
846
+ }, b.onerror = () => {
841
847
  s(new Error("Failed to load image"));
842
848
  };
843
849
  });
844
850
  }
845
- E(() => {
846
- let o = r, g = a, s = xe;
851
+ O(() => {
852
+ let o = r, g = a, s = Te;
847
853
  if ((e.includes("unsplash") ? e.trim() : !$ && e.trim() || e.includes("upload-src-editor")) && e !== "upload") {
848
- if (U != null && U >= s) {
849
- A(!1), F({ width: U, height: U }), J(!0);
854
+ if (A != null && A >= s) {
855
+ x(!1), F({ width: A, height: A }), J(!0);
850
856
  return;
851
857
  }
852
- qe(e).then(({ width: k, height: H }) => {
858
+ qe(e).then(({ width: b, height: B }) => {
853
859
  var ye, Ie;
854
- if (typeof o == "number" && o < s && k < s)
855
- A(!0), F({
860
+ if (typeof o == "number" && o < s && b < s)
861
+ x(!0), F({
856
862
  width: o,
857
863
  height: g
858
864
  });
859
- else if (k < s)
860
- A(!0), F({
861
- width: k,
862
- height: H
865
+ else if (b < s)
866
+ x(!0), F({
867
+ width: b,
868
+ height: B
863
869
  });
864
870
  else if (F({
865
- width: k,
866
- height: k
867
- }), A(!1), !He) {
868
- const K = ((Ie = (ye = h.getElementByKey(t)) == null ? void 0 : ye.parentElement) == null ? void 0 : Ie.getBoundingClientRect().width) ?? 0;
869
- if (K > 0 && k < K) {
870
- const Ce = k / K * 100;
871
- h.update(
871
+ width: b,
872
+ height: b
873
+ }), x(!1), !Be) {
874
+ const K = ((Ie = (ye = f.getElementByKey(t)) == null ? void 0 : ye.parentElement) == null ? void 0 : Ie.getBoundingClientRect().width) ?? 0;
875
+ if (K > 0 && b < K) {
876
+ const Ce = b / K * 100;
877
+ f.update(
872
878
  () => {
873
- const De = P(t);
874
- O(De) && De.setWidthAndHeight(Ce, Ce);
879
+ const De = E(t);
880
+ P(De) && De.setWidthAndHeight(Ce, Ce);
875
881
  },
876
882
  { tag: "history-merge" }
877
883
  );
878
884
  }
879
885
  }
880
886
  J(!0);
881
- }).catch((k) => {
882
- J(!0), console.warn("Ошибка при загрузке изображения:", k.message);
887
+ }).catch((b) => {
888
+ J(!0), console.warn("Ошибка при загрузке изображения:", b.message);
883
889
  });
884
890
  }
885
- }, [e, $]), E(() => {
886
- C.width && C.height && x && h.update(() => {
887
- const o = P(t);
888
- O(o) && o.setWidthAndHeight(C.width, C.height);
891
+ }, [e, $]), O(() => {
892
+ C.width && C.height && T && f.update(() => {
893
+ const o = E(t);
894
+ P(o) && o.setWidthAndHeight(C.width, C.height);
889
895
  });
890
- }, [C.width, C.height, x]);
896
+ }, [C.width, C.height, T]);
891
897
  const Ke = L(
892
- (o) => vt(h, t, o),
893
- [h, t]
898
+ (o) => yt(f, t, o),
899
+ [f, t]
894
900
  ), Q = L(
895
901
  (o, g) => {
896
- z(!1), w(!1), h.update(() => {
897
- const s = P(t);
898
- O(s) && (s.setSrc(o), s.setId(g));
902
+ z(!1), w(!1), f.update(() => {
903
+ const s = E(t);
904
+ P(s) && (s.setSrc(o), s.setId(g));
899
905
  });
900
906
  },
901
- [h, t]
907
+ [f, t]
902
908
  ), et = L(() => {
903
909
  ue(), z(!1), w(!1), _(0);
904
910
  }, [ue]), q = L(
@@ -907,67 +913,67 @@ function Ft({
907
913
  const g = ce();
908
914
  j && j(
909
915
  o[0],
910
- (s, k) => {
911
- Q(s, k), _(0);
916
+ (s, b) => {
917
+ Q(s, b), _(0);
912
918
  },
913
919
  (s) => {
914
- s && xt({
915
- message: B("editor.gallery.errorFile")
920
+ s && Ut({
921
+ message: H("editor.gallery.errorFile")
916
922
  }), _(0), Q(e.startsWith("blob:") ? "upload" : "", "");
917
923
  },
918
924
  g,
919
925
  (s) => {
920
926
  _(s);
921
927
  },
922
- h.getEditorState().read(() => {
923
- const s = P(t);
924
- return O(s) ? s.getId() : void 0;
928
+ f.getEditorState().read(() => {
929
+ const s = E(t);
930
+ return P(s) ? s.getId() : void 0;
925
931
  })
926
932
  );
927
933
  },
928
- [h, j, t, ce, B, Q, e]
934
+ [f, j, t, ce, H, Q, e]
929
935
  );
930
- return E(() => h.registerCommand(
931
- yt,
936
+ return O(() => f.registerCommand(
937
+ It,
932
938
  (o) => !e.startsWith("blob:") && e !== "upload" || o.targetNodeKey !== t ? !1 : (q(o.files), !0),
933
939
  nt
934
- ), [h, q, t, e]), !e || e === "upload" ? S ? /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(It, { onCancel: et }) }) : /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
935
- Ct,
940
+ ), [f, q, t, e]), !e || e === "upload" ? S ? /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(Ct, { onCancel: et }) }) : /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
941
+ Dt,
936
942
  {
937
943
  inline: !0,
938
944
  nodeKey: t,
939
945
  defaultTabValue: m,
940
946
  onWriteTabToNode: Ke,
941
947
  onUpload: (o) => {
942
- var s, k;
948
+ var s, b;
943
949
  if (!j || !o.length) return;
944
950
  q([o[0]]);
945
951
  const g = o.slice(1);
946
- g.length && ((k = (s = T == null ? void 0 : T.current) == null ? void 0 : s.insertImages) == null || k.call(s, g));
952
+ g.length && ((b = (s = U == null ? void 0 : U.current) == null ? void 0 : s.insertImages) == null || b.call(s, g));
947
953
  },
948
954
  popoverProps: {
949
955
  opened: !0,
950
956
  position: "bottom",
951
- zIndex: Dt
957
+ zIndex: Lt
952
958
  },
953
959
  onChange: (o) => {
954
- h.update(() => {
955
- const g = P(t);
956
- O(g) && g.setSrc(o);
960
+ f.update(() => {
961
+ const g = E(t);
962
+ P(g) && g.setSrc(o);
957
963
  });
958
964
  }
959
965
  }
960
- ) }) : x && !Ze ? /* @__PURE__ */ n(
961
- Te,
966
+ ) }) : T && !Ze ? /* @__PURE__ */ n(
967
+ Ue,
962
968
  {
963
969
  width: C.width,
964
970
  height: C.height,
965
971
  isLoading: u,
966
972
  isError: !1,
967
- isIcon: x,
973
+ isIcon: T,
968
974
  src: e,
969
975
  id: D,
970
- editor: h,
976
+ editor: f,
971
977
  nodeKey: t,
972
978
  fetchDeleteMedia: pe,
973
979
  altText: i,
@@ -977,39 +983,39 @@ function Ft({
977
983
  caption: c,
978
984
  isCollabActive: !1,
979
985
  historyState: we,
980
- showNestedEditorTreeView: ke,
981
- t: B,
986
+ showNestedEditorTreeView: be,
987
+ t: H,
982
988
  href: I
983
989
  }
984
990
  ) : /* @__PURE__ */ n(
985
- Lt,
991
+ Nt,
986
992
  {
987
- editor: h,
988
- isIcon: x,
989
- minWidthPx: xe,
990
- width: Pe(r),
991
- height: Pe(a),
993
+ editor: f,
994
+ isIcon: T,
995
+ minWidthPx: Te,
996
+ width: Ee(r),
997
+ height: Ee(a),
992
998
  initialWidth: C.width || "",
993
999
  initialHeight: C.height || "",
994
1000
  onResizeEnd: Qe,
995
1001
  alignment: p,
996
- disable: Be,
1002
+ disable: He,
997
1003
  onRegisterDecoratorEnter: (o) => {
998
- T != null && T.current && (T.current.decoratorEnterAction = o);
1004
+ U != null && U.current && (U.current.decoratorEnterAction = o);
999
1005
  },
1000
- onActivate: () => h.dispatchCommand(Nt, "show_menu"),
1006
+ onActivate: () => f.dispatchCommand(St, "show_menu"),
1001
1007
  children: /* @__PURE__ */ n(
1002
- Te,
1008
+ Ue,
1003
1009
  {
1004
1010
  width: "inherit",
1005
1011
  height: "inherit",
1006
1012
  aspectRatio: Xe,
1007
1013
  isLoading: u,
1008
1014
  isError: !1,
1009
- isIcon: x,
1015
+ isIcon: T,
1010
1016
  src: e,
1011
1017
  id: D,
1012
- editor: h,
1018
+ editor: f,
1013
1019
  nodeKey: t,
1014
1020
  fetchDeleteMedia: pe,
1015
1021
  altText: i,
@@ -1019,8 +1025,8 @@ function Ft({
1019
1025
  caption: c,
1020
1026
  isCollabActive: !1,
1021
1027
  historyState: we,
1022
- showNestedEditorTreeView: ke,
1023
- t: B,
1028
+ showNestedEditorTreeView: be,
1029
+ t: H,
1024
1030
  href: I
1025
1031
  }
1026
1032
  )
@@ -1028,5 +1034,5 @@ function Ft({
1028
1034
  );
1029
1035
  }
1030
1036
  export {
1031
- so as default
1037
+ uo as default
1032
1038
  };