@sheetxl/mcp 0.8.0-beta.16 → 0.8.0-beta.17

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 (178) hide show
  1. package/agent/instructions.md +15 -4
  2. package/assets/{B_nQLUWaxp-Q1IfV.js → -cMvbaW1kvHslPKX.js} +2 -2
  3. package/assets/{D1g6IOzdvInVLV-x.js → 0kfwZuOHUkJmVjg6.js} +6 -6
  4. package/assets/{Gqh12ggLm5KlvN3v.js → 1feDuXw6tBXu2XFg.js} +1 -1
  5. package/assets/{DmLbqbAez7Dzwyl7.js → 4qMP71Fe1Ep8kbOX.js} +1 -1
  6. package/assets/{AjWB-QdIkr07kToW.js → 7TRx0dMYnL2i4tqL.js} +193 -193
  7. package/assets/{iqQWGoJaPha0_8lU.js → 8cVPexxAVrFJ9QLX.js} +1 -1
  8. package/assets/{C-AIgWmHugqMcl9J.js → APP8AzsNgQXHTalA.js} +2 -2
  9. package/assets/{Cl98sBOj9GM2XnFe.js → AnF1Kh3Vo2AniIYO.js} +2 -2
  10. package/assets/{B2YEEPHIkNcezk9T.js → B2BfjRdJGZs6afVL.js} +2 -2
  11. package/assets/{DEIkGoOZ_WeuY0Lj.js → B2UxLSteMiPlg8Uu.js} +1 -1
  12. package/assets/{BiGm1tKvxUh8oWbD.js → B3mh2tuvP-lMP6f_.js} +1 -1
  13. package/assets/{CG8zvnxueimOY7wm.js → B6NnxkSmEzCGZEZA.js} +1 -1
  14. package/assets/{DFAqI-o57Kd_Azlt.js → B7Nqa7V-v0cxGBux.js} +1 -1
  15. package/assets/{DTLbKr_XIJMwQJmk.js → B7OyFSpBb1eBvMVd.js} +13 -13
  16. package/assets/{CFdJvXLSbUrvNera.js → B8JX7a6VZlBNA_Bd.js} +8 -8
  17. package/assets/{Z01wJImjl6lBMpf4.js → B9J8nV-dh6jHpzZI.js} +1 -1
  18. package/assets/{C75i_5ip7OhGkuiF.js → B9M_sgHpoc-op6FF.js} +1 -1
  19. package/assets/{POdlv6cpSx6ftJxx.js → BBC_WF8BcAH-k_cQ.js} +1 -1
  20. package/assets/{DdrsYdX3bLixdb_9.js → BGZ_ltNFYvnAmbVR.js} +1 -1
  21. package/assets/{BNrpvJZtIL0Ex_wE.js → BJBoygm-gY68bLAP.js} +15 -15
  22. package/assets/{SaCo3me4_hw2b1L4.js → BJdWgj1hv57eGVl4.js} +389 -389
  23. package/assets/{Co_y6GfwJTYtOmlt.js → BKRLtOdVOUTrLjQN.js} +3 -3
  24. package/assets/{DNhfziNrJGdL8BYs.js → BKjovBsLpX2Fkhov.js} +6 -6
  25. package/assets/{pQUJKbHGetb7dcOr.js → BMJhHHX2LWgOJWGz.js} +1 -1
  26. package/assets/{D-irgQZ2WmkP9dnK.js → BOx4Ut_Rme7NH34X.js} +1 -1
  27. package/assets/{DfzLOnWTNL_2J90y.js → BQYpVYbvfWuUJgdx.js} +1 -1
  28. package/assets/{BtNRIFE92ka4hATo.js → BS4ZsfH5D6aemSpO.js} +1 -1
  29. package/assets/{CZepo1lDTQp1myg6.js → BSAdmOdx3brRE9LW.js} +1 -1
  30. package/assets/{DFn_thWGK0_EZI5k.js → BSY9Tbmz6VEY_F_x.js} +1 -1
  31. package/assets/{Dd8CHUZz7xuYTfp-.js → BT8AGlSg2t7V1QNj.js} +488 -488
  32. package/assets/{SB2aKOIVln0EkgXR.js → BUV7BlOZcuPgDZ__.js} +1 -1
  33. package/assets/{BbXlmp8W_cbr75FN.js → BX5xFncPLyeN7TqA.js} +5 -5
  34. package/assets/{3t-I20nDzFHBd5UJ.js → Bcak_hZpcIkB2gJD.js} +1 -1
  35. package/assets/{C0JSC9gVwR1QxopD.js → BdijGsy5W7yZ_I_n.js} +1 -1
  36. package/assets/{QVWayvB03YMyTKt3.js → BebXDUnlrDDRGW60.js} +2 -2
  37. package/assets/{D7iU4kaxzl_PojNt.js → BgldX21zhey2aR9D.js} +1 -1
  38. package/assets/{DQcus4X_kTKIIyX6.js → BhCbCEPpDzhg5nqL.js} +1 -1
  39. package/assets/{BZbxPclVVopktv3l.js → Bj4BFLBC9Tf6SGSt.js} +1 -1
  40. package/assets/{Di4ehJD7muvtcrN3.js → BjhAYfsKC8iEbtgn.js} +40 -40
  41. package/assets/{Ct5VTtdW77k-WcP_.js → BjnQVl1lb1KEbt2D.js} +51 -51
  42. package/assets/{CAEhAL7-0FG7jdzN.js → BlbxiLf1zD6_fWZs.js} +1 -1
  43. package/assets/{JC8UUcu6m23qqrr3.js → BmM-nHMAAuNatCcN.js} +1 -1
  44. package/assets/{BlWfQ5HPEehB_lPz.js → Bni-y4FJS4rkFYtn.js} +107 -107
  45. package/assets/{C2dG4GHThf9O-IJy.js → BodrfKIAhDFD-X3t.js} +1 -1
  46. package/assets/{C_0RM0w6Pw70Bx_Y.js → BvDcHHJvQMRHthm-.js} +1 -1
  47. package/assets/{4vS8pASPZSU7QcRZ.js → Bw_FtA-1886HMCLJ.js} +3 -3
  48. package/assets/{2GLqCzpAJP6jbaRx.js → Bxkx8QokmRNyXbOI.js} +5 -5
  49. package/assets/{B3MqN3t5naY3moOk.js → Bz1ImBvJwPwBrA5j.js} +1 -1
  50. package/assets/{BpgPKKZwxXklRyo7.js → C2NPIWe0pLs3PAZM.js} +2 -2
  51. package/assets/{DzkccbbE6iXMqQDO.js → C2ZX6ffXsMaEr2d2.js} +305 -305
  52. package/assets/{nmB0nnkFQf5NWo0i.js → C3Q-fjiZZ15waCq_.js} +2 -2
  53. package/assets/{CsjjeeOHE2624pGt.js → C46RpMrfF6FiEFI7.js} +1 -1
  54. package/assets/{LwFDS0HxPZKiiEnN.js → C4deMY87Q_haYyLF.js} +1 -1
  55. package/assets/{CW-ivE6pl3V7vKuT.js → C7iHn3y3HVBHflpA.js} +4 -4
  56. package/assets/{CVRc6jQcH155Z89u.js → CJF3P7U7yBQVF2Cg.js} +1 -1
  57. package/assets/{B16N6VSLY5HPgVkD.js → CLgvdaqeFlESLvbF.js} +1 -1
  58. package/assets/{BUAq-ENCmL0XGLIu.js → CLze192iF2o-aETZ.js} +1 -1
  59. package/assets/{CX-6eYkcr5y0VmQm.js → CMRLNLqYkiqCLMRa.js} +3 -3
  60. package/assets/{CAMrW5ypKhgn105y.js → COa691om4fLN4CUy.js} +1 -1
  61. package/assets/CSLLHl-zum7m1CJl.js +14 -0
  62. package/assets/{DJdRl2yX9DP_D8kh.js → CUbCBf24Ie4A2l4R.js} +2 -2
  63. package/assets/{CDqG64rXHp9-2tXr.js → CWLleOolFzyT0COW.js} +1 -1
  64. package/assets/{C3Wibs7QGFZ1FI7W.js → CaJ9j3l0cERnYqDS.js} +1 -1
  65. package/assets/{CrwtgrD7BbXyCkx0.js → CfA8o-FNret9-D6Y.js} +1 -1
  66. package/assets/{BbDKWV_FQAICqZjP.js → Cl7HHR6Vc9S4n3AP.js} +1 -1
  67. package/assets/{DKRa_Oc4XqB3DABB.js → CqjNsZ2OB4Kx6J3s.js} +8 -8
  68. package/assets/{soSlr334Fv1j5t2m.js → CqwEHSKivMYw7tRZ.js} +1 -1
  69. package/assets/{Dg4JXbd1yPGNZOtL.js → Cr6lm0oXZJaaoAmD.js} +1 -1
  70. package/assets/{Dp-dLoOaBndV2N5i.js → CshK6Ew7OQ7mngI3.js} +2 -2
  71. package/assets/{DBMZF6PRHCko9K9R.js → CsiIgnb_L2x2Go6g.js} +1 -1
  72. package/assets/{BYqyNLuwXl7GKuzh.js → CtmrBbpapaNwjwNB.js} +28 -28
  73. package/assets/{DvFwVzuc5YfagNnH.js → CwRhhoL5ynbe78dB.js} +1 -1
  74. package/assets/{C95HXhZkkhnUx_aE.js → CyI1eGGzJX8nJXaT.js} +2 -2
  75. package/assets/{DMhtIFfkX-DZT_e3.js → Cz4H3Qge2u8er3Ny.js} +3 -3
  76. package/assets/{BrtLeTsrulaU6osB.js → D0OQ6ka8so0BWPwL.js} +1 -1
  77. package/assets/{CJa8JVvKGVBz8Q7q.js → D336KioeSjd-T8n3.js} +2 -2
  78. package/assets/{DBANZf_eAzaCFdIj.js → D5L35C8cbX16BSCF.js} +227 -227
  79. package/assets/{DOZ40EyxD3m0gCos.js → D5VFuX1h50V2jLmZ.js} +305 -305
  80. package/assets/{5B_tapYOcjOv1wGO.js → D6ON3ZLcTAXV3fO6.js} +8353 -8352
  81. package/assets/{BsFWmVYPrLyh5Dre.js → DDhPOQPc-lpyZrUJ.js} +4 -4
  82. package/assets/{iULnLPcNKVpz00r7.js → DE4xC78p5UtS7wH6.js} +1 -1
  83. package/assets/{-PtBguqpLi7Nr4Df.js → DF7-oRscXc_vkMo8.js} +1 -1
  84. package/assets/{BIUUGUhypimIDg2a.js → DMuOMpgIhVgB3eG8.js} +1 -1
  85. package/assets/{TNQaiw20sEAEUiK5.js → DPKeRb9GKmh_WCPv.js} +1 -1
  86. package/assets/{9MXt8KXdWlbEJNc2.js → DSsH28SW8CMrSL-q.js} +1 -1
  87. package/assets/{D2YdqNWXwSHJMPbA.js → DV6WSFmSEKfb3d2s.js} +4 -4
  88. package/assets/{Bdt9nQs8gDIzu_IG.js → DYJcfrNUUJQtxXWX.js} +1 -1
  89. package/assets/{DLhlBqwsDnmscAuL.js → D_peM8fbRgGaWvpq.js} +1 -1
  90. package/assets/{D7ibkNIu_Pn4TeBD.js → DeEZvPW-VvlE28oE.js} +3 -3
  91. package/assets/{CL1-ziDI0aAaVbhJ.js → Dgi2xwb2DN2Gybj3.js} +2 -2
  92. package/assets/{BiE9M6RctwQ339_7.js → DidhZpf9qJAei29Y.js} +1 -1
  93. package/assets/{BlIrJwQGEASCgJdZ.js → Dkg-LQVsZlrHk7A8.js} +1 -1
  94. package/assets/{BBPjYcS8XKQREith.js → DnTfXqCnRCe-1QYI.js} +61 -61
  95. package/assets/{CVbRpT7QPHOMgwTx.js → DoBvgI3Ry8DlGzwQ.js} +1 -1
  96. package/assets/{BjDsx_FHl0mShqHX.js → DrHVew6gwOB6oxCn.js} +1 -1
  97. package/assets/{BRLA4pJWiYdpW-69.js → Dre79rTMoYYikNuB.js} +19 -19
  98. package/assets/{DaILIYfy-jPVTXjz.js → DsCNtBR5jCeqmLBS.js} +2 -2
  99. package/assets/{W2FU69Pfo4chpqtk.js → Dzz3yrKbECzg6caR.js} +1 -1
  100. package/assets/{nDmE2I07HvkpRdR0.js → FvxN6PPps-rNPDo8.js} +1 -1
  101. package/assets/{DfWWAHOjmhqvN3m_.js → G2Wjyx_ETCAcofwm.js} +130 -130
  102. package/assets/{YXC__Myl-BuIFW6s.js → IGAV8DdYH32cW8XU.js} +1 -1
  103. package/assets/{C-gN7uBg-MWHRo4g.js → Jd71-QCmFEcDcYSw.js} +1 -1
  104. package/assets/{CBPkPTmeaEokFPSI.js → Ljri8sTW3dWT4clD.js} +1 -1
  105. package/assets/{D3bxrF1Ys2GSVfQH.js → MW2nt7se27FlH9Yb.js} +1 -1
  106. package/assets/{8NrxfSWBHDaEJvhz.js → Mgs_OJP41a-Nfac3.js} +1 -1
  107. package/assets/{CvJkwRgwm80S2bcd.js → OHBzl-tZOi9Ni8YV.js} +1 -1
  108. package/assets/{BR66nPIzyzlOcP10.js → PbBzI4PlKpCgULLd.js} +1 -1
  109. package/assets/{DR9xHYH6v5G0lOqf.js → UH_biJmLrI9SvckA.js} +3 -3
  110. package/assets/{DFvs1LVzXKm1N5M2.js → Xe7sA_mEwDQpJjcF.js} +2 -2
  111. package/assets/{Dy67BUF2yd8VRPwL.js → YFiGplEq1G4XdCJ2.js} +1 -1
  112. package/assets/{BuhHuKVWppW4L8AV.js → YQtUMMGmb1_WFsh_.js} +1 -1
  113. package/assets/{BCSRsSAEPlwR59H5.js → dcvgOfBmWFTsXoT8.js} +4 -4
  114. package/assets/{Ci7-PIIhZwb2mVv5.js → iBgLe32XErisaUSr.js} +1 -1
  115. package/assets/{rfwqMukKbJBeJBuC.js → kpS1vY0DcE9p8JnI.js} +2 -2
  116. package/assets/{BdMebk9YSA0oxQ_d.js → lcIaYgz4tQGBlzlo.js} +67 -67
  117. package/assets/{CK9h6iDOreaI8GEt.js → nQbVdQrfdz3osBdi.js} +3 -3
  118. package/assets/{CoIjAX2gECGb3Wxl.js → oJNJQJEDQCsjHSmo.js} +1 -1
  119. package/assets/{3_NofB4A4Qhl-4YY.js → qgW-p2sFhMtuu5yw.js} +1 -1
  120. package/assets/{h6EQSu5n2vTsu2yd.js → z24-oIqP_fu2hsOt.js} +1 -1
  121. package/assets/{CIqJdIUKSLZkNwHy.js → z7nDK_gfX7G37XbZ.js} +34 -34
  122. package/index.js +205 -205
  123. package/lib.js +1 -1
  124. package/licenses/dependencies.txt +35 -35
  125. package/package.json +2 -2
  126. package/screenshot-page/assets/{D8s3sJnhFxbI3Dqn.js → 7Xk_eQAcM_HgWrOC.js} +1 -1
  127. package/screenshot-page/assets/{CQFj5AGXfIA9z9zI.js → B1W17rc9ilPFCh31.js} +1 -1
  128. package/screenshot-page/assets/B8UkvH0o9n_G5UO9.js +3 -0
  129. package/screenshot-page/assets/{CZa1rha3RnQUWyOk.js → BD96fN2dSVuoME09.js} +4 -4
  130. package/screenshot-page/assets/BE8ea8S0Q-qogeEs.js +2 -0
  131. package/screenshot-page/assets/{BU5S8KEzPmIA_Flm.js → BKwVcuWOKeH2xREA.js} +1 -1
  132. package/screenshot-page/assets/BNMBa8EZgWX2Eb3c.js +1 -0
  133. package/screenshot-page/assets/{Db6bZVJ-184DJIoe.js → BQCyH9YbEgnH78Ke.js} +2 -2
  134. package/screenshot-page/assets/BcDxaEii3arJqOym.js +1 -0
  135. package/screenshot-page/assets/Be-rukvcufhLamH5.js +1 -0
  136. package/screenshot-page/assets/{Dq7wGcTrNIshovlT.js → Bh33WyohJvbKZVQN.js} +2 -2
  137. package/screenshot-page/assets/C2ty_K_uix4ooip6.js +1 -0
  138. package/screenshot-page/assets/C9mUKjQ3yEzRu9j2.js +2 -0
  139. package/screenshot-page/assets/{DDkL9PZPXAggW2Yr.js → CB2mQ5rbaSw2W4ik.js} +23 -23
  140. package/screenshot-page/assets/{DLFFFQjTi5Ji1940.js → CCVAsuUimIJOkBnk.js} +1 -1
  141. package/screenshot-page/assets/{D7biuwkvm3zAwsBa.js → COoMVTzF50qBNFEu.js} +3 -3
  142. package/screenshot-page/assets/{Bir0SSOHX0w2yo8h.js → CSMEGhAHxl5-4FxB.js} +1 -1
  143. package/screenshot-page/assets/{rOzyaU7hqchMbhRL.js → CT7cY57t9j1sBhAy.js} +1 -1
  144. package/screenshot-page/assets/{BJ2r2WfEL3SgkBAX.js → CTjUtxDw6Z2I9OGc.js} +1 -1
  145. package/screenshot-page/assets/{BIrVK5hdDCUYmxGO.js → CUZobZ3mfNAdEisS.js} +1 -1
  146. package/screenshot-page/assets/{ClzJdxlUDDtBYjH8.js → C_OuKbe6z1it80cj.js} +1 -1
  147. package/screenshot-page/assets/Cbcv49b9jWyY4HKj.js +2 -0
  148. package/screenshot-page/assets/CtZFqwLoeJOvwFrl.js +42 -0
  149. package/screenshot-page/assets/Cz6KFmsp267l_VZS.js +1 -0
  150. package/screenshot-page/assets/{lgeNUp9cU20IAotv.js → D0koRjO2KnWQ1fNV.js} +1 -1
  151. package/screenshot-page/assets/{cTMKPkmZF8FWQaMn.js → DCP8JXEeiwAMiVD2.js} +1 -1
  152. package/screenshot-page/assets/DQAZPADvH5lhlMnK.js +1 -0
  153. package/screenshot-page/assets/DQBUH0j44Vtrykua.js +13 -0
  154. package/screenshot-page/assets/{DyiVrm8mEnEaoZHa.js → DSKOOgcJQeqIc9Us.js} +1 -1
  155. package/screenshot-page/assets/{CguXw0IcKNPbmAbj.js → DXaM3CulPA3aPGV1.js} +2 -2
  156. package/screenshot-page/assets/{CqyMYduWKFvmMs_Z.js → DcUOAH274IbYOuK1.js} +1 -1
  157. package/screenshot-page/assets/{CRsTnamLrPN5-Dsi.js → DdXSKhFUAsKUsQ1u.js} +1 -1
  158. package/screenshot-page/assets/Djl40tfWoPJSvqtv.js +1 -0
  159. package/screenshot-page/assets/TCImIYUUdVD4Z35I.js +1 -0
  160. package/screenshot-page/assets/dQsis-90Up-pIkSq.js +4 -0
  161. package/screenshot-page/assets/{Dn5PwRw7rrTKNnql.js → dXn1GWWjYmuLb1HF.js} +8 -8
  162. package/screenshot-page/index.html +5 -5
  163. package/assets/DsTi7zHk_Xl37bAD.js +0 -14
  164. package/screenshot-page/assets/B7eQ3rE-7Vayb_4O.js +0 -2
  165. package/screenshot-page/assets/B8i4Sr2kMQAXp0rb.js +0 -4
  166. package/screenshot-page/assets/BIHbD4jMsk3NetOd.js +0 -1
  167. package/screenshot-page/assets/BJviQwDXR5L6l1DA.js +0 -1
  168. package/screenshot-page/assets/BM78thqEW6HwXFAK.js +0 -13
  169. package/screenshot-page/assets/C2H2lX8eyKpxpP6M.js +0 -2
  170. package/screenshot-page/assets/CYfkL98Zu43S8-50.js +0 -42
  171. package/screenshot-page/assets/CzsoLbEIUVK5ia1C.js +0 -1
  172. package/screenshot-page/assets/D2IHCJ1QWDKwmhge.js +0 -1
  173. package/screenshot-page/assets/DMxrNtfw275en7pm.js +0 -1
  174. package/screenshot-page/assets/D_kJ3WunvjIINcHC.js +0 -1
  175. package/screenshot-page/assets/DhB6GjSJIeTmIODk.js +0 -1
  176. package/screenshot-page/assets/TilS2JSBGVkd1za3.js +0 -3
  177. package/screenshot-page/assets/UKFgEuwI1UMhPqKF.js +0 -2
  178. package/screenshot-page/assets/hlxJ87-H830aSZBQ.js +0 -1
@@ -1,18 +1,18 @@
1
1
  /**
2
- * @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.16
2
+ * @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.17
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { Q as t, St as e, Z as n, ht as r, ot as o, r as s, u as l } from "./CrwtgrD7BbXyCkx0.js";
8
- import { a as i, r as a } from "./DaILIYfy-jPVTXjz.js";
9
- import { B as c, M as d, _ as h, f as u, ht as _, sn as f, st as g } from "./BNrpvJZtIL0Ex_wE.js";
10
- import { a as p, d as m, l as S, m as w, p as E, u as I } from "./D3bxrF1Ys2GSVfQH.js";
11
- import { $ as y, $r as v, $t as x, A as C, An as b, Ar as R, Ci as A, Cr as k, D as N, Da as M, Ei as F, En as D, Et as T, Fa as G, Fi as B, Fr as V, G as O, Gi as P, Gt as z, H as L, Ha as $, Hn as H, Ht as j, Ia as K, Ii as q, Ja as W, Jt as X, La as U, Ma as J, Mt as Y, Na as Z, Nn as Q, Nr as tt, Oa as et, Or as nt, Pa as rt, Pn as ot, Pr as st, Ra as lt, Rr as it, Sa as at, Sn as ct, Tr as dt, Tt as ht, Ua as ut, V as _t, Vn as ft, Wr as gt, Wt as pt, X as mt, Xn as St, Xt as wt, Y as Et, Yi as It, Yn as yt, Yr as vt, Yt as xt, Za as Ct, Zt as bt, _a as Rt, _i as At, aa as kt, at as Nt, bi as Mt, bt as Ft, ca as Dt, cn as Tt, ct as Gt, d as Bt, eo as Vt, fo as Ot, g as Pt, gn as zt, gt as Lt, ha as $t, hi as Ht, hn as jt, hr as Kt, i as qt, io as Wt, ir as Xt, ja as Ut, ji as Jt, k as Yt, ki as Zt, kr as Qt, lr as te, lt as ee, ma as ne, mn as re, ni as oe, nn as se, o as le, oi as ie, on as ae, or as ce, ot as de, pa as he, pi as ue, pn as _e, po as fe, pr as ge, pt as pe, q as me, qn as Se, ro as we, rt as Ee, s as Ie, si as ye, sr as ve, t as xe, tn as Ce, to as be, ui as Re, ur as Ae, va as ke, vr as Ne, vt as Me, wi as Fe, wn as De, xn as Te, y as Ge, yt as Be, zn as Ve } from "./5B_tapYOcjOv1wGO.js";
12
- import { c as Oe, i as Pe, n as ze, o as Le, s as $e, t as He } from "./Di4ehJD7muvtcrN3.js";
13
- import { C as je, E as Ke, O as qe, _ as We, a as Xe, b as Ue, d as Je, m as Ye, r as Ze, u as Qe } from "./DzkccbbE6iXMqQDO.js";
14
- import { r as tn } from "./BBPjYcS8XKQREith.js";
15
- import { _ as en, a as nn, c as rn, d as on, f as sn, g as ln, h as an, i as cn, l as dn, m as hn, n as un, o as _n, p as fn, r as gn, s as pn, u as mn } from "./BYqyNLuwXl7GKuzh.js";
7
+ import { Q as t, St as e, Z as n, ht as r, ot as o, r as s, u as l } from "./CfA8o-FNret9-D6Y.js";
8
+ import { a as i, r as a } from "./DsCNtBR5jCeqmLBS.js";
9
+ import { B as c, M as d, _ as h, f as u, ht as _, sn as f, st as g } from "./BJBoygm-gY68bLAP.js";
10
+ import { a as p, d as m, l as S, m as w, p as E, u as I } from "./MW2nt7se27FlH9Yb.js";
11
+ import { $ as y, $a as v, A as x, Aa as C, Ai as b, Ar as R, At as A, Cr as k, Dn as N, Ea as M, Ei as F, Et as D, Fa as T, Fi as G, Fn as B, Fr as V, G as O, Ha as P, Hn as z, Ia as L, J as $, Ja as H, Ji as j, Jt as K, Kn as q, M as W, Ma as U, Mi as X, Na as J, Nn as Z, Nt as Q, Pa as Y, Pr as tt, Qa as et, Qt as nt, R as rt, Rn as ot, S as st, Si as lt, Sn as it, St as at, Ti as ct, Tn as dt, Tr as ht, Tt as ut, Ut as _t, Va as ft, Vi as gt, Vr as pt, Wa as mt, Wn as St, Xa as wt, Xt as Et, Yn as It, Z as yt, Zi as vt, Zn as xt, Zr as Ct, _ as bt, _n as Rt, _t as At, ar as kt, b as Nt, ba as Mt, bn as Ft, br as Dt, c as Tt, ci as Gt, cn as Bt, cr as Vt, ct as Ot, d as Pt, di as zt, dn as Lt, ei as $t, et as Ht, fi as jt, fo as Kt, ft as qt, ga as Wt, gi as Ut, gn as Xt, hn as Jt, i as Zt, ia as Qt, ii as Yt, in as te, ja as ee, jr as ne, jt as re, ka as oe, ki as se, kn as le, kr as ie, la as ae, ma as ce, mi as de, mr as he, nn as ue, no as _e, o as fe, on as ge, or as pe, pa as me, po as Se, pt as we, qr as Ee, ro as Ie, rr as ye, s as ve, sa as xe, si as Ce, t as be, tn as Re, tt as Ae, ur as ke, ut as Ne, vn as Me, vt as Fe, wi as De, wr as Te, wt as Ge, yn as Be, z as Ve } from "./D6ON3ZLcTAXV3fO6.js";
12
+ import { c as Oe, i as Pe, n as ze, o as Le, s as $e, t as He } from "./BjhAYfsKC8iEbtgn.js";
13
+ import { C as je, E as Ke, O as qe, _ as We, a as Ue, b as Xe, d as Je, m as Ze, r as Qe, u as Ye } from "./C2ZX6ffXsMaEr2d2.js";
14
+ import { r as tn } from "./DnTfXqCnRCe-1QYI.js";
15
+ import { _ as en, a as nn, c as rn, d as on, f as sn, g as ln, h as an, i as cn, l as dn, m as hn, n as un, o as _n, p as fn, r as gn, s as pn, u as mn } from "./CtmrBbpapaNwjwNB.js";
16
16
  var Sn = class e {
17
17
  constructor(e, n) {
18
18
  this._grid = null, this._value = e, this._axis = n?.axis ?? t.Row, this._maxCoords = n?.maxCoords;
@@ -20,7 +20,7 @@ var Sn = class e {
20
20
  _materialize() {
21
21
  let t = this._grid;
22
22
  if (!t) {
23
- t = new y({
23
+ t = new st({
24
24
  axis: this._axis,
25
25
  maxCoords: this._maxCoords
26
26
  });
@@ -76,18 +76,18 @@ var Sn = class e {
76
76
  if (n) return n.entries(e);
77
77
  if (e?.processRowSkip || e?.processColumnSkip) return this._materialize().entries(e);
78
78
  const r = this._value;
79
- if (null == r) return Gt;
79
+ if (null == r) return N;
80
80
  const o = e?.bounds;
81
- if (o && ((o.colStart ?? 0) > 0 || (o.rowStart ?? 0) > 0 || (o.colEnd ?? 0) < 0 || (o.rowEnd ?? 0) < 0)) return Gt;
82
- const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ? M(e.reuseResult) : void 0, i = this;
81
+ if (o && ((o.colStart ?? 0) > 0 || (o.rowStart ?? 0) > 0 || (o.colEnd ?? 0) < 0 || (o.rowEnd ?? 0) < 0)) return N;
82
+ const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ? ye(e.reuseResult) : void 0, i = this;
83
83
  let a = !1, c = null;
84
84
  return {
85
- next: (t) => c ? c.next(t) : t ? (c = i._materialize().entries(e), c.next(t)) : a ? De : (a = !0, Xt(0, 0, r, s, l)),
85
+ next: (t) => c ? c.next(t) : t ? (c = i._materialize().entries(e), c.next(t)) : a ? $ : (a = !0, fe(0, 0, r, s, l)),
86
86
  [Symbol.iterator]() {
87
87
  return this;
88
88
  },
89
- return: (t) => De,
90
- throw: (t) => De
89
+ return: (t) => $,
90
+ throw: (t) => $
91
91
  };
92
92
  }
93
93
  keys(t) {
@@ -243,7 +243,7 @@ var Sn = class e {
243
243
  _getOrCreate2D(t) {
244
244
  if (!t) throw new Error(In);
245
245
  let e = this._mapScopeTo2Ds.get(t);
246
- return e || (e = new Wt(this._options2D), this._mapScopeTo2Ds.set(t, e), this._last2DKey = t, this._last2DMap = e), e;
246
+ return e || (e = new v(this._options2D), this._mapScopeTo2Ds.set(t, e), this._last2DKey = t, this._last2DMap = e), e;
247
247
  }
248
248
  _cleanupEmpty2D(t, e) {
249
249
  e?.isEmpty() && (this._mapScopeTo2Ds.delete(t), this._last2DKey === t && (this._last2DKey = void 0, this._last2DMap = void 0));
@@ -263,7 +263,7 @@ var Sn = class e {
263
263
  return n.isLambdaCallable = !0, n.checkArity = (n) => n >= e && n <= t.length, n.paramCount = t.length, n;
264
264
  }
265
265
  _function() {
266
- return this._asFunction ??= he(this);
266
+ return this._asFunction ??= me(this);
267
267
  }
268
268
  execute(...t) {
269
269
  return this._function().execute(...t);
@@ -301,7 +301,7 @@ var Sn = class e {
301
301
  try {
302
302
  return t.execute(...e);
303
303
  } catch (t) {
304
- if (ce(t)) throw t;
304
+ if (kt(t)) throw t;
305
305
  return m.isError(t) ? t : new m.Value(t?.message, { cause: t });
306
306
  }
307
307
  };
@@ -341,18 +341,18 @@ var Sn = class e {
341
341
  getTextAt(t, e, n = !1, r, o) {
342
342
  const s = "display" === o, l = this._compiled;
343
343
  if (l.error && !l.ast) return l.error.input;
344
- let i = void 0 !== r ? Ue(l.ast, r) : l.getTokens();
345
- i = Zt(i, l.symbols, !s, s, s ? {
344
+ let i = void 0 !== r ? Xe(l.ast, r) : l.getTokens();
345
+ i = b(i, l.symbols, !s, s, s ? {
346
346
  scope: this._gridId,
347
347
  rowIndex: t,
348
348
  colIndex: e
349
349
  } : null);
350
- const a = s ? this._displayLocale() : dt;
351
- return n ? tt(i, this._getEntireCoords?.(), a) : v(i, this._getEntireCoords?.(), t, e, a);
350
+ const a = s ? this._displayLocale() : Dt;
351
+ return n ? ie(i, this._getEntireCoords?.(), a) : Ct(i, this._getEntireCoords?.(), t, e, a);
352
352
  }
353
353
  _displayLocale() {
354
354
  const t = this._context.getRuntime().getLocaleProfile();
355
- return x(Bt(t.decimal));
355
+ return ue(Pt(t.decimal));
356
356
  }
357
357
  getRecord() {
358
358
  const t = this._record;
@@ -396,7 +396,7 @@ var Sn = class e {
396
396
  $rowEnd: e.$rowEnd,
397
397
  scope: t.scope
398
398
  };
399
- } else n.node.type === ve.Cell ? i = { ...o[n.value] } : n.op === ve.Named ? i = { nameId: n.node.value.nameId } : n.op === ve.TableReference && (i = { table: { ...n.node.value } });
399
+ } else n.node.type === pe.Cell ? i = { ...o[n.value] } : n.op === pe.Named ? i = { nameId: n.node.value.nameId } : n.op === pe.TableReference && (i = { table: { ...n.node.value } });
400
400
  s[t] = i;
401
401
  }
402
402
  return s;
@@ -407,8 +407,8 @@ var Sn = class e {
407
407
  }
408
408
  getTokensAt(t, e, n) {
409
409
  const r = this._compiled;
410
- let o = void 0 !== n ? Ue(r.ast, n) : r.getTokens();
411
- return o = Zt(o, r.symbols, !1, !0), lt(o, t, e);
410
+ let o = void 0 !== n ? Xe(r.ast, n) : r.getTokens();
411
+ return o = b(o, r.symbols, !1, !0), L(o, t, e);
412
412
  }
413
413
  getError() {
414
414
  return this._compiled.error ?? null;
@@ -437,17 +437,17 @@ var Sn = class e {
437
437
  }
438
438
  demandFirstCell() {
439
439
  const t = this._compiled;
440
- t?.ast && Qe(t.ast, t.getFunction);
440
+ t?.ast && Ye(t.ast, t.getFunction);
441
441
  }
442
442
  getPositionVariants() {
443
443
  let e = this._positionVariants;
444
444
  if (void 0 !== e) return e;
445
445
  e = null;
446
- const n = this._compiled, r = n && !n.error && n.ast ? Ze(n.ast, n.getFunction) : null;
446
+ const n = this._compiled, r = n && !n.error && n.ast ? Qe(n.ast, n.getFunction) : null;
447
447
  if (r) {
448
448
  const o = void 0 !== n.ast.firstCell;
449
449
  e = r.map((e) => {
450
- const r = new t(Xe(n.runtime, n.symbols, e, !1, null, n.getFunction), this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
450
+ const r = new t(Ue(n.runtime, n.symbols, e, !1, null, n.getFunction), this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
451
451
  return o && r.demandFirstCell(), r;
452
452
  });
453
453
  }
@@ -462,12 +462,12 @@ var Sn = class e {
462
462
  const n = this._compiled.getTokens(), r = e._compiled.getTokens();
463
463
  if (n.length !== r.length) return !1;
464
464
  const o = this._context.getEntireCoords();
465
- return tt(n, o) === tt(r, o);
465
+ return ie(n, o) === ie(r, o);
466
466
  }
467
467
  getReferences(t, e) {
468
468
  const n = this._compiled, o = n.referenceIndices, s = o.length;
469
469
  if (0 === s) return r.EmptyArray;
470
- const l = n.referencesExecute, i = n.referencesRelative, a = Y(s);
470
+ const l = n.referencesExecute, i = n.referencesRelative, a = A(s);
471
471
  for (let n = 0; n < s; n++) {
472
472
  const r = l[o[n]], s = r.inputs;
473
473
  if (s && 2 === s.length) {
@@ -483,26 +483,26 @@ var Sn = class e {
483
483
  $rowEnd: e.$rowEnd,
484
484
  scope: t.scope
485
485
  };
486
- } else if (r.node.type === ve.Cell) {
486
+ } else if (r.node.type === pe.Cell) {
487
487
  const t = i[r.value];
488
488
  a[n] = { ...t };
489
- } else if (r.op === ve.Named) {
490
- const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(ae.NamedFormula, t)?.toString() ?? t;
489
+ } else if (r.op === pe.Named) {
490
+ const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(Bt.NamedFormula, t)?.toString() ?? t;
491
491
  a[n] = { nameId: e };
492
- } else if (r.op === ve.TableReference) {
492
+ } else if (r.op === pe.TableReference) {
493
493
  const o = r.node.value;
494
494
  let s = this._resolveStructuredRef(o, t, e);
495
495
  !s || m.isError(s) ? a[n] = null : a[n] = {
496
496
  ...s,
497
497
  tableId: o.tableId
498
498
  };
499
- } else r.op === ve.Error && (a[n] = null);
499
+ } else r.op === pe.Error && (a[n] = null);
500
500
  }
501
501
  return a;
502
502
  }
503
503
  getReferencesAt(t, e) {
504
504
  const n = this.getReferences(t, e);
505
- return 0 === n.length ? r.EmptyArray : ue(n, t, e);
505
+ return 0 === n.length ? r.EmptyArray : zt(n, t, e);
506
506
  }
507
507
  getFormatReferences() {
508
508
  const t = this._formatReferences;
@@ -532,7 +532,7 @@ var Sn = class e {
532
532
  e < 0 && (e = i.length + e);
533
533
  const c = i[e];
534
534
  if (void 0 === c) throw new Error(`Invalid reference index: ${e}`);
535
- const d = a[c], h = d.node, u = h.inputs ?? r.EmptyArray, _ = d.op === ve.Named, f = 2 === u.length;
535
+ const d = a[c], h = d.node, u = h.inputs ?? r.EmptyArray, _ = d.op === pe.Named, f = 2 === u.length;
536
536
  let g, p, S = !1;
537
537
  n && m.isError(n) && (n = null), n && "nameId" in n && !_ && (n = null);
538
538
  const w = n && "nameId" in n ? null : n, E = !!w && void 0 !== w.colIndex;
@@ -562,7 +562,7 @@ var Sn = class e {
562
562
  let y = -1, v = -1, x = -1, C = -1;
563
563
  if (f) y = u[0].evalIndex, v = u[1].evalIndex;
564
564
  else if ("cell" === h.type) y = h.evalIndex;
565
- else if (d.op === ve.TableReference) x = h.evalIndex;
565
+ else if (d.op === pe.TableReference) x = h.evalIndex;
566
566
  else {
567
567
  if (!_) throw new Error(`Invalidate reference index: ${e}`);
568
568
  C = h.evalIndex;
@@ -572,26 +572,26 @@ var Sn = class e {
572
572
  const e = this._compiled.symbols;
573
573
  for (let n = 0; n < t.length; n++) {
574
574
  const r = (t[n]?.value)?.scope;
575
- if (r) return e && !e.resolve(ae.Sheet, r) ? null : r;
575
+ if (r) return e && !e.resolve(Bt.Sheet, r) ? null : r;
576
576
  }
577
577
  return null;
578
- }, R = h, A = this._compiled.ast, k = rt(A, (t) => {
578
+ }, R = h, A = this._compiled.ast, k = U(A, (t) => {
579
579
  if (!t || !t.isReference) return;
580
- if (I && t === R) return Mt(g);
580
+ if (I && t === R) return wt(g);
581
581
  const e = t.type;
582
- if (-1 !== C && t.evalIndex === C && e === ve.Named) {
582
+ if (-1 !== C && t.evalIndex === C && e === pe.Named) {
583
583
  if (!n) return F();
584
584
  if (n && "nameId" in n) {
585
- const e = n, r = this._compiled.symbols?.bind(ae.NamedFormula, e.nameId) ?? e.nameId, o = { ...t };
585
+ const e = n, r = this._compiled.symbols?.bind(Bt.NamedFormula, e.nameId) ?? e.nameId, o = { ...t };
586
586
  return o.value = {
587
587
  ...t.value,
588
588
  ...e,
589
589
  nameId: r
590
590
  }, o;
591
591
  }
592
- return S ? Ht(":", Mt(g), Mt(p), !0) : Mt(g);
592
+ return S ? jt(":", wt(g), wt(p), !0) : wt(g);
593
593
  }
594
- if (-1 !== x && t.evalIndex === x && e === ve.TableReference) return n ? S ? Ht(":", Mt(g), Mt(p), !0) : Mt(g) : F();
594
+ if (-1 !== x && t.evalIndex === x && e === pe.TableReference) return n ? S ? jt(":", wt(g), wt(p), !0) : wt(g) : F();
595
595
  if (!n && Ke.includes(t.value)) {
596
596
  const e = t.inputs ?? r.EmptyArray, n = e[0], o = e[1];
597
597
  let s = n.evalIndex === y, l = o.evalIndex === v;
@@ -607,19 +607,19 @@ var Sn = class e {
607
607
  if (n) if (f === S) {
608
608
  let e = l ? g : p;
609
609
  s = { ...t }, s.value = e, s.image = null;
610
- } else s = Ht(":", Mt(g), Mt(p), !0);
610
+ } else s = jt(":", wt(g), wt(p), !0);
611
611
  else s = F(void 0, void 0, b(t)), s.evalIndex = t.evalIndex;
612
612
  return s;
613
613
  }
614
614
  });
615
615
  if (k === A) return this;
616
- const N = Xe(l.runtime, l.symbols, k, !1, l.error, l.getFunction);
616
+ const N = Ue(l.runtime, l.symbols, k, !1, l.error, l.getFunction);
617
617
  return new t(N, this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
618
618
  }
619
619
  reanchorReferences(e, n) {
620
- const r = this._compiled, o = this._gridId, s = this._compiled.symbols.bind(ae.Sheet, e), l = r.transform((t, e) => {
620
+ const r = this._compiled, o = this._gridId, s = this._compiled.symbols.bind(Bt.Sheet, e), l = r.transform((t, e) => {
621
621
  if (!t || !t.isReference) return;
622
- if (t.type !== ve.Cell) return;
622
+ if (t.type !== pe.Cell) return;
623
623
  if (je(e) && e.inputs?.[0] !== t) return;
624
624
  let r;
625
625
  const l = t.value.scope;
@@ -631,7 +631,7 @@ var Sn = class e {
631
631
  if (e === n) return this;
632
632
  const r = this._compiled, o = r.transform((t, r) => {
633
633
  if (!t || !t.isReference) return;
634
- if (t.type !== ve.Cell) return;
634
+ if (t.type !== pe.Cell) return;
635
635
  if (je(r) && r.inputs?.[0] !== t) return;
636
636
  if (t.value.scope !== e) return;
637
637
  const o = { ...t };
@@ -641,7 +641,7 @@ var Sn = class e {
641
641
  }
642
642
  replaceTableReferences(e, n) {
643
643
  const r = this._compiled, o = r.transform((t) => {
644
- if (t?.type !== ve.TableReference) return;
644
+ if (t?.type !== pe.TableReference) return;
645
645
  const r = t.value;
646
646
  if ("object" != typeof r || r?.tableId !== e) return;
647
647
  const o = n(r);
@@ -654,7 +654,7 @@ var Sn = class e {
654
654
  if (o.activeNames.has(r)) return m.BuiltIn.Ref;
655
655
  const s = this._resolvers?.getNamedFormulaBlock?.(r);
656
656
  if (!s) {
657
- const t = this._compiled, e = t.symbols?.resolve(ae.NamedFormula, r), n = e ? e.toString() : r, o = t.getFunction?.(n) ?? null;
657
+ const t = this._compiled, e = t.symbols?.resolve(Bt.NamedFormula, r), n = e ? e.toString() : r, o = t.getFunction?.(n) ?? null;
658
658
  return o ? new vn(o) : m.BuiltIn.Name;
659
659
  }
660
660
  const l = o.gridId, i = o.rowIndex, a = o.colIndex;
@@ -694,15 +694,15 @@ var Sn = class e {
694
694
  f[r.index] = t;
695
695
  continue;
696
696
  }
697
- if (o === ve.Named) {
697
+ if (o === pe.Named) {
698
698
  f[r.index] = this._resolveNamedPrecedents(r.node.value, t, e);
699
699
  continue;
700
700
  }
701
- if (o === ve.Error) {
702
- f[r.index] = Ne(r.node.value);
701
+ if (o === pe.Error) {
702
+ f[r.index] = he(r.node.value);
703
703
  continue;
704
704
  }
705
- if (o === ve.TableReference) {
705
+ if (o === pe.TableReference) {
706
706
  const n = r.node.value;
707
707
  let o;
708
708
  n && (o = this._resolveStructuredRef(n, t, e)), o || (o = m.BuiltIn.Ref), f[r.index] = o;
@@ -729,13 +729,13 @@ var Sn = class e {
729
729
  else {
730
730
  if (" " === o) {
731
731
  const t = l.scope ? a.scope ? null : l.scope : a.scope;
732
- i = t && this._gridId && t !== this._gridId ? m.BuiltIn.Value : Q(l, a);
733
- } else if (":" === o || ".:." === o || ":." === o || ".:" === o) i = kt(l, a);
732
+ i = t && this._gridId && t !== this._gridId ? m.BuiltIn.Value : ot(l, a);
733
+ } else if (":" === o || ".:." === o || ":." === o || ".:" === o) i = Qt(l, a);
734
734
  else if ("," === o) {
735
735
  const t = s.length;
736
736
  for (let e = 0; e < t; e++) {
737
737
  const t = f[s[e]];
738
- void 0 === t || Array.isArray(t) || m.isError(t) || (i = i ? kt(i, t) : t);
738
+ void 0 === t || Array.isArray(t) || m.isError(t) || (i = i ? Qt(i, t) : t);
739
739
  }
740
740
  }
741
741
  f[r.index] = i ?? m.BuiltIn.Null;
@@ -762,7 +762,7 @@ var Sn = class e {
762
762
  const s = e.op;
763
763
  let h, u = null;
764
764
  if (s) {
765
- if (s === ve.Error) h = Ne(e.node.value);
765
+ if (s === pe.Error) h = he(e.node.value);
766
766
  else if (":" === s || ".:." === s || ":." === s || ".:" === s) {
767
767
  const t = e.inputs;
768
768
  if (t && 2 === t.length) {
@@ -791,7 +791,7 @@ var Sn = class e {
791
791
  let s = this._compiled;
792
792
  if (void 0 !== n) {
793
793
  let r;
794
- if (rt(s.ast, (t) => {
794
+ if (U(s.ast, (t) => {
795
795
  t.evalIndex === n && (r = t);
796
796
  }), !r) throw new Error(`Invalid evalIndex: ${n}`);
797
797
  if (s.bindings.length > 0 && !s.error) {
@@ -799,7 +799,7 @@ var Sn = class e {
799
799
  const o = s.evaluations;
800
800
  return (() => o[n] ?? (!0 === r.inLazy ? this._valueOfLazy(r, o, null, t, e) : void 0))();
801
801
  }
802
- s = Xe(o.getRuntime(), s.symbols, Tn(r), !1);
802
+ s = Ue(o.getRuntime(), s.symbols, Tn(r), !1);
803
803
  }
804
804
  if (s.error) return s.error.cause;
805
805
  s.hasVolatile && r.node && o.markVolatile();
@@ -808,13 +808,13 @@ var Sn = class e {
808
808
  const a = s.referencesExecute, c = s.referencesRelative, d = s.referencesAbsolute, h = a.length;
809
809
  for (let n = 0; n < h; n++) {
810
810
  const r = a[n], s = r.op, i = r.node;
811
- if (s) if (s === ve.Named) if (r.node.deferredResolve) l[r.node.evalIndex] = null;
811
+ if (s) if (s === pe.Named) if (r.node.deferredResolve) l[r.node.evalIndex] = null;
812
812
  else {
813
813
  const n = r.node.value;
814
814
  l[r.node.evalIndex] = this._evaluateNamed(n, t, e);
815
815
  }
816
- else if (s === ve.Error) l[i.evalIndex] = Ne(r.node.value);
817
- else if (s === ve.TableReference) {
816
+ else if (s === pe.Error) l[i.evalIndex] = he(r.node.value);
817
+ else if (s === pe.TableReference) {
818
818
  const n = r.node.value;
819
819
  let s;
820
820
  s = n ? this._resolveStructuredRef(n, t, e) : m.BuiltIn.Ref, m.isError(s) || void 0 === s?.colStart ? l[i.evalIndex] = s ?? m.BuiltIn.Ref : l[i.evalIndex] = o.getReference(s);
@@ -830,41 +830,41 @@ var Sn = class e {
830
830
  const o = this._compiled, s = o.ast;
831
831
  if (!s || !s.isReference) return this;
832
832
  if ("cell" === s.type) return this;
833
- if (s.type === ve.Error) return this;
833
+ if (s.type === pe.Error) return this;
834
834
  if ("@" === s.value) return this;
835
835
  if (!r) return this;
836
- const l = be(n) + A(e);
836
+ const l = lt(n) + et(e);
837
837
  if (r.has(l)) return this;
838
- const i = xe("@", s, !0), a = Xe(o.runtime, o.symbols, i, !1, o.error, o.getFunction);
838
+ const i = be("@", s, !0), a = Ue(o.runtime, o.symbols, i, !1, o.error, o.getFunction);
839
839
  return new t(a, this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
840
840
  }
841
841
  _executeNode(t, e, n, r, o = null) {
842
842
  const s = this._context, l = t.inputs, i = l ? l.length : 0, a = t.type;
843
843
  let c;
844
844
  switch (a) {
845
- case ve.Infix: {
845
+ case pe.Infix: {
846
846
  const n = t.value;
847
847
  let r = e[l[0].evalIndex], o = e[l[1].evalIndex];
848
848
  if (!0 === t.firstCell && !t.isReference && this._demandsFirstCell() && (r = An(r), o = An(o)), ("+" === n || "-" === n) && (r = Rn(s, r), "number" == typeof r && (o = Rn(s, o), "number" == typeof o))) {
849
849
  const e = "+" === n ? r + o : r - o;
850
- return Ct(!0 === t.snapsCancellation ? q(e, r) : e, null);
850
+ return rt(!0 === t.snapsCancellation ? G(e, r) : e, null);
851
851
  }
852
852
  if (!t.isReference) {
853
853
  if (r && m.isError(r)) return r;
854
854
  if (o && m.isError(o)) return o;
855
855
  }
856
856
  const i = t.fn ?? (t.fn = !0 === t.snapsCancellation ? qe[t.value] : Je[t.value]);
857
- return c = i ? i(s, r, o) : m.BuiltIn.Value, c = Ct(c, null), c;
857
+ return c = i ? i(s, r, o) : m.BuiltIn.Value, c = rt(c, null), c;
858
858
  }
859
- case ve.Function: {
859
+ case pe.Function: {
860
860
  const s = t.binder;
861
861
  if (void 0 !== s) return "let" === s.kind ? e[l[i - 1].evalIndex] : this._createLambdaValue(t, e, o, n, r);
862
862
  if (!0 === t.hasLazyArgs) {
863
- const s = gt.enter();
863
+ const s = pt.enter();
864
864
  try {
865
- this._fillLazyArgs(l, i, e, o, n, r, s), !0 === t.passOmitted && Dn(l, i), c = this._callFunction(t, Fn, i), c instanceof gt && (c = c._force());
865
+ this._fillLazyArgs(l, i, e, o, n, r, s), !0 === t.passOmitted && Dn(l, i), c = this._callFunction(t, Fn, i), c instanceof pt && (c = c._force());
866
866
  } finally {
867
- gt.leave(s);
867
+ pt.leave(s);
868
868
  }
869
869
  } else {
870
870
  for (let t = 0; t < i; t++) Fn[t] = e[l[t].evalIndex];
@@ -872,22 +872,22 @@ var Sn = class e {
872
872
  }
873
873
  return c;
874
874
  }
875
- case ve.Prefix:
876
- case ve.Postfix: {
875
+ case pe.Prefix:
876
+ case pe.Postfix: {
877
877
  let n = e[l[0].evalIndex];
878
878
  if (!0 === t.firstCell && !t.isReference && "@" !== t.value && this._demandsFirstCell() && (n = An(n)), n && m.isError(n)) return n;
879
- const r = t.fn ?? (t.fn = a === ve.Prefix ? Ye[t.value] : We[t.value]);
879
+ const r = t.fn ?? (t.fn = a === pe.Prefix ? Ze[t.value] : We[t.value]);
880
880
  return c = r ? r(s, n) : m.BuiltIn.Value, c;
881
881
  }
882
- case ve.List:
883
- case ve.Paren: {
882
+ case pe.List:
883
+ case pe.Paren: {
884
884
  if (1 === i) return e[l[0].evalIndex];
885
885
  for (let t = 0; t < i; t++) {
886
886
  const n = e[l[t].evalIndex];
887
- if (null !== n && "object" == typeof n && At(n.scope)) return m.BuiltIn.Name;
887
+ if (null !== n && "object" == typeof n && de(n.scope)) return m.BuiltIn.Name;
888
888
  }
889
889
  let t = !1;
890
- for (let n = 0; n < i; n++) if (wt(e[l[n].evalIndex])) {
890
+ for (let n = 0; n < i; n++) if (Ie(e[l[n].evalIndex])) {
891
891
  t = !0;
892
892
  break;
893
893
  }
@@ -895,17 +895,17 @@ var Sn = class e {
895
895
  const t = [];
896
896
  for (let n = 0; n < i; n++) {
897
897
  const r = e[l[n].evalIndex];
898
- wt(r) ? t.push(...r) : t.push(r);
898
+ Ie(r) ? t.push(...r) : t.push(r);
899
899
  }
900
- const n = Y(t.length);
900
+ const n = A(t.length);
901
901
  for (let e = 0; e < t.length; e++) n[e] = t[e];
902
902
  return n;
903
903
  }
904
- const n = Y(i);
904
+ const n = A(i);
905
905
  for (let t = 0; t < i; t++) n[t] = e[l[t].evalIndex];
906
906
  return n;
907
907
  }
908
- case ve.Named: {
908
+ case pe.Named: {
909
909
  const s = t.binding;
910
910
  if (void 0 !== s) {
911
911
  const n = this._compiled.bindings[s.slot];
@@ -921,12 +921,12 @@ var Sn = class e {
921
921
  }
922
922
  return !0 === t.deferredResolve ? this._evaluateNamed(t.value, n, r) : e[t.evalIndex] ?? null;
923
923
  }
924
- case ve.TableReference: return e[t.evalIndex] ?? null;
925
- case ve.Call: {
924
+ case pe.TableReference: return e[t.evalIndex] ?? null;
925
+ case pe.Call: {
926
926
  const n = e[l[0].evalIndex];
927
927
  return n && m.isError(n) ? n : (c = this._applyCallee(n, t, e), c);
928
928
  }
929
- case ve.Empty: return;
929
+ case pe.Empty: return;
930
930
  }
931
931
  var d;
932
932
  }
@@ -936,7 +936,7 @@ var Sn = class e {
936
936
  const e = t[r];
937
937
  if (!0 === e?.lazyArg) continue;
938
938
  const o = n[e.evalIndex];
939
- !a && (!0 === o?.isIRange ? o.size > 1 : wt(o)) && (a = !0);
939
+ !a && (!0 === o?.isIRange ? o.size > 1 : Ie(o)) && (a = !0);
940
940
  }
941
941
  if (a) {
942
942
  i = [];
@@ -947,7 +947,7 @@ var Sn = class e {
947
947
  }
948
948
  for (let a = 0; a < e; a++) {
949
949
  const e = t[a];
950
- Fn[a] = !0 === e?.lazyArg ? i ? i[a] : gt.deferred(l, a, this, e, n, r, o, s) : n[e.evalIndex];
950
+ Fn[a] = !0 === e?.lazyArg ? i ? i[a] : pt.deferred(l, a, this, e, n, r, o, s) : n[e.evalIndex];
951
951
  }
952
952
  }
953
953
  _createLambdaValue(t, e, n, r, o) {
@@ -972,14 +972,14 @@ var Sn = class e {
972
972
  if (o > e.length || o < s) return m.BuiltIn.Value;
973
973
  const l = new Map(t.frame ?? void 0);
974
974
  for (let t = 0; t < e.length; t++) {
975
- const s = e[t], i = t >= o || r[t + 1]?.type === ve.Empty;
975
+ const s = e[t], i = t >= o || r[t + 1]?.type === pe.Empty;
976
976
  l.set(s.slot, i ? xn : n[r[t + 1].evalIndex]);
977
977
  }
978
978
  return t.owner._evaluateBody(t, l);
979
979
  }
980
980
  if (t instanceof vn) {
981
981
  const e = [];
982
- for (let t = 1; t < r.length; t++) e.push(r[t]?.type === ve.Empty ? void 0 : n[r[t].evalIndex]);
982
+ for (let t = 1; t < r.length; t++) e.push(r[t]?.type === pe.Empty ? void 0 : n[r[t].evalIndex]);
983
983
  return this._dispatchFunction(t.fn, e, e.length);
984
984
  }
985
985
  return t && (t.isIRange || void 0 !== t.colStart) ? m.BuiltIn.Ref : m.BuiltIn.Value;
@@ -995,7 +995,7 @@ var Sn = class e {
995
995
  o.set(n[t].slot, void 0 === r ? xn : r);
996
996
  }
997
997
  const s = this._evaluateBody(t, o);
998
- return Ct(s, this._context);
998
+ return rt(s, this._context);
999
999
  }
1000
1000
  _evaluateBody(t, e) {
1001
1001
  const n = this._calcScope;
@@ -1019,7 +1019,7 @@ var Sn = class e {
1019
1019
  return this._runList(s, e, r, o, n), e[t.evalIndex];
1020
1020
  } catch (t) {
1021
1021
  if (m.isError(t)) return t;
1022
- if (ce(t)) throw t;
1022
+ if (kt(t)) throw t;
1023
1023
  return t instanceof RangeError ? m.BuiltIn.Num : new m.Value(t?.message, { cause: t });
1024
1024
  }
1025
1025
  }
@@ -1032,7 +1032,7 @@ var Sn = class e {
1032
1032
  }
1033
1033
  _listWithin(t) {
1034
1034
  let e;
1035
- rt(this._compiled.ast, (n, r, o) => {
1035
+ U(this._compiled.ast, (n, r, o) => {
1036
1036
  if (n === t) {
1037
1037
  for (let t = o.length - 1; t >= 0; t--) if (void 0 !== o[t].deferred) {
1038
1038
  e = o[t];
@@ -1041,7 +1041,7 @@ var Sn = class e {
1041
1041
  }
1042
1042
  });
1043
1043
  const n = /* @__PURE__ */ new Set();
1044
- rt(t, (t) => {
1044
+ U(t, (t) => {
1045
1045
  n.add(t);
1046
1046
  });
1047
1047
  const r = e?.deferred?.filter((t) => n.has(t)) ?? [];
@@ -1081,7 +1081,7 @@ var Sn = class e {
1081
1081
  try {
1082
1082
  r = t.execute();
1083
1083
  } catch (t) {
1084
- if (ce(t)) throw t;
1084
+ if (kt(t)) throw t;
1085
1085
  r = Gn(t);
1086
1086
  }
1087
1087
  s.argsValues = null, s.argsLength = 0;
@@ -1111,7 +1111,7 @@ var Sn = class e {
1111
1111
  r = t.execute(...o);
1112
1112
  }
1113
1113
  } catch (t) {
1114
- if (ce(t)) throw t;
1114
+ if (kt(t)) throw t;
1115
1115
  r = Gn(t);
1116
1116
  }
1117
1117
  const l = this._calcScope;
@@ -1123,7 +1123,7 @@ var Sn = class e {
1123
1123
  }
1124
1124
  finalizeValue(t) {
1125
1125
  const e = this._context;
1126
- if (et(t)) return m.BuiltIn.Calc;
1126
+ if (M(t)) return m.BuiltIn.Calc;
1127
1127
  if (p(t)) return m.BuiltIn.Calc;
1128
1128
  if (t && void 0 !== t.colStart) try {
1129
1129
  if (t.scope) {
@@ -1132,13 +1132,13 @@ var Sn = class e {
1132
1132
  }
1133
1133
  t = e.getValueAt(t.rowStart, t.colStart, t.scope);
1134
1134
  } catch (t) {
1135
- if (ce(t)) throw t;
1135
+ if (kt(t)) throw t;
1136
1136
  return m.isError(t) ? t : new m.Value(t?.message, { cause: t });
1137
1137
  }
1138
1138
  if (Array.isArray(t) && t.isSheetSpan) return m.BuiltIn.Ref;
1139
1139
  if (Array.isArray(t)) {
1140
- if (wt(t)) {
1141
- const e = Y(t.length);
1140
+ if (Ie(t)) {
1141
+ const e = A(t.length);
1142
1142
  for (let n = 0; n < t.length; n++) e[n] = this.finalizeValue(t[n]);
1143
1143
  return e;
1144
1144
  }
@@ -1150,7 +1150,7 @@ var Sn = class e {
1150
1150
  }
1151
1151
  }
1152
1152
  var n;
1153
- return t?.isIRange ? t.size <= 1 ? (t = 0 === t.size ? null : t.getValueAt(0, 0, Mn), null === (t = Ct(t, e)) && (t = 0)) : (n = t, Cn.has(n) || (t = t.fillEmpty(0))) : null === (t = Ct(t, e)) && (t = 0), t;
1153
+ return t?.isIRange ? t.size <= 1 ? (t = 0 === t.size ? null : t.getValueAt(0, 0, Mn), null === (t = rt(t, e)) && (t = 0)) : (n = t, Cn.has(n) || (t = t.fillEmpty(0))) : null === (t = rt(t, e)) && (t = 0), t;
1154
1154
  }
1155
1155
  finalizeValueForCell(t) {
1156
1156
  const e = this.finalizeValue(t);
@@ -1160,7 +1160,7 @@ var Sn = class e {
1160
1160
  const t = this._compiled;
1161
1161
  if (t.error) return t.error.toString();
1162
1162
  const e = this._calcScope;
1163
- return e?.node ? this.getTextAt(e.node.rowIndex, e.node.colIndex) : tt(t.getTokens(), null);
1163
+ return e?.node ? this.getTextAt(e.node.rowIndex, e.node.colIndex) : ie(t.getTokens(), null);
1164
1164
  }
1165
1165
  get [Symbol.toStringTag]() {
1166
1166
  return "[FormulaBlock]";
@@ -1203,15 +1203,15 @@ var Nn = (t, e, n, r, o, s, l) => {
1203
1203
  } else r[o] = c;
1204
1204
  return s && (s[o] = d), l && (l[o] = h), o + 1;
1205
1205
  }, Mn = Object.freeze({ type: null }), Fn = new Array(255), Dn = (t, e) => {
1206
- for (let n = 0; n < e; n++) t[n]?.type === ve.Empty && (Fn[n] = xn);
1206
+ for (let n = 0; n < e; n++) t[n]?.type === pe.Empty && (Fn[n] = xn);
1207
1207
  }, Tn = (t) => {
1208
1208
  const e = { ...t };
1209
1209
  return delete e.inLazy, delete e.lazyArg, delete e.hasLazyArgs, delete e.deferred, t.inputs && (e.inputs = t.inputs.map((t) => t ? Tn(t) : t)), e;
1210
- }, Gn = (t) => m.isError(t) ? t : t instanceof RangeError ? m.BuiltIn.Num : new m.Value(t?.message, { cause: t }), Bn = ht(4096), Vn = 0, On = () => Bn, Pn = (t, e) => {
1210
+ }, Gn = (t) => m.isError(t) ? t : t instanceof RangeError ? m.BuiltIn.Num : new m.Value(t?.message, { cause: t }), Bn = Jt(4096), Vn = 0, On = () => Bn, Pn = (t, e) => {
1211
1211
  if (0 === e) return void (t.inputsAt = -1);
1212
1212
  const n = Vn, r = n + e;
1213
1213
  if (r > Bn.length) {
1214
- const t = ht(Math.max(r, 2 * Bn.length));
1214
+ const t = Jt(Math.max(r, 2 * Bn.length));
1215
1215
  for (let e = 0; e < n; e++) t[e] = Bn[e];
1216
1216
  Bn = t;
1217
1217
  }
@@ -1226,7 +1226,7 @@ var Nn = (t, e, n, r, o, s, l) => {
1226
1226
  if (n < 0) return;
1227
1227
  const r = Bn;
1228
1228
  for (let t = 0; t < e; t++) r[n + t] = void 0;
1229
- }, $n = 32, Hn = 64, jn = 128, Kn = 768, qn = 3072, Wn = 12288, Xn = 16384, Un = 32768, Jn = 65536, Yn = 1 << 17, Zn = 1 << 18, Qn = 1 << 19, tr = 1 << 20, er = 1 << 21, nr = 1 << 22, rr = 495520, or = 256, sr = 512, lr = 1024, ir = 2048, ar = (t, e, n) => {
1229
+ }, $n = 32, Hn = 64, jn = 128, Kn = 768, qn = 3072, Wn = 12288, Un = 16384, Xn = 32768, Jn = 65536, Zn = 1 << 17, Qn = 1 << 18, Yn = 1 << 19, tr = 1 << 20, er = 1 << 21, nr = 1 << 22, rr = 495520, or = 256, sr = 512, lr = 1024, ir = 2048, ar = (t, e, n) => {
1230
1230
  if (void 0 === e) return () => !1;
1231
1231
  const r = dr(e);
1232
1232
  return (o) => r(o) && n(t.compare(o, e));
@@ -1375,7 +1375,7 @@ var Nn = (t, e, n, r, o, s, l) => {
1375
1375
  return new ur(t, r, o, s, l);
1376
1376
  }, pr = class t {
1377
1377
  static create(e, n, r, o) {
1378
- const s = ct.peek();
1378
+ const s = O.peek();
1379
1379
  if (!s) throw new Error("The sdk WebAssembly is not loaded.");
1380
1380
  const l = (e ?? n)?.getRowCount() ?? 0;
1381
1381
  if ((e?.getColumnCount() ?? 0) > 32 || (n?.getColumnCount() ?? 0) > 32) throw m.BuiltIn.Value;
@@ -1696,7 +1696,7 @@ var Kr = {
1696
1696
  }, Wr = {
1697
1697
  bounds: qr,
1698
1698
  reuseResult: !0
1699
- }, Xr = (t, e) => t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex, Ur = (t, e, n) => null === t || 0 === e && 0 === n ? t : {
1699
+ }, Ur = (t, e) => t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex, Xr = (t, e, n) => null === t || 0 === e && 0 === n ? t : {
1700
1700
  colStart: t.colStart + n,
1701
1701
  rowStart: t.rowStart + e,
1702
1702
  colEnd: t.colEnd + n,
@@ -1707,15 +1707,15 @@ var Kr = {
1707
1707
  colEnd: 0,
1708
1708
  rowEnd: 0,
1709
1709
  scope: null
1710
- }, Yr = null, Zr = null, Qr = {
1710
+ }, Zr = null, Qr = null, Yr = {
1711
1711
  colStart: 0,
1712
1712
  rowStart: 0,
1713
1713
  colEnd: 0,
1714
1714
  rowEnd: 0,
1715
1715
  scope: null
1716
1716
  }, to = (t) => {
1717
- const e = Yr;
1718
- let n = t ?? Zr;
1717
+ const e = Zr;
1718
+ let n = t ?? Qr;
1719
1719
  if (null === n) return null;
1720
1720
  let r = e.getGrid(n);
1721
1721
  if (null === r) return null;
@@ -1727,7 +1727,7 @@ var Kr = {
1727
1727
  const s = e.getFormulas();
1728
1728
  return {
1729
1729
  values: r.getValues(),
1730
- searchFormulas: (t) => (Qr.colStart = t.colStart, Qr.rowStart = t.rowStart, Qr.colEnd = t.colEnd, Qr.rowEnd = t.rowEnd, Qr.scope = n, s.search(Qr))
1730
+ searchFormulas: (t) => (Yr.colStart = t.colStart, Yr.rowStart = t.rowStart, Yr.colEnd = t.colEnd, Yr.rowEnd = t.rowEnd, Yr.scope = n, s.search(Yr))
1731
1731
  };
1732
1732
  }, eo = Object.freeze({
1733
1733
  tokens: Object.freeze([]),
@@ -1784,7 +1784,7 @@ var Kr = {
1784
1784
  return void 0 === o && (o = this._newNode(t, e, this.gridId, null), r.setValueAt(t, e, o)), o;
1785
1785
  }
1786
1786
  _newSparseStore() {
1787
- const t = new y({ axis: w.Axis.Column }), e = this._anchor;
1787
+ const t = new st({ axis: w.Axis.Column }), e = this._anchor;
1788
1788
  return null !== e && t.setValueAt(e.rowIndex, e.colIndex, e), this._nodes = t, t;
1789
1789
  }
1790
1790
  _mintDense() {
@@ -1846,7 +1846,7 @@ var Kr = {
1846
1846
  if (l > i || a > c) return;
1847
1847
  const d = this.gridId;
1848
1848
  let h = null;
1849
- for (let t = a; t <= c; t++) for (let e = l; e <= i; e++) void 0 === o.getValueAt(e, t) && (null === h && (h = new It.Builder()), h.pushAt(t, e, this._newNode(e, t, d, null)));
1849
+ for (let t = a; t <= c; t++) for (let e = l; e <= i; e++) void 0 === o.getValueAt(e, t) && (null === h && (h = new gt.Builder()), h.pushAt(t, e, this._newNode(e, t, d, null)));
1850
1850
  if (null !== h) {
1851
1851
  const t = h.build();
1852
1852
  t && o.setValues(t.tuples);
@@ -1889,7 +1889,7 @@ var Kr = {
1889
1889
  continue;
1890
1890
  }
1891
1891
  kn(i, t, e, Kr), kn(c, t, e, Jr);
1892
- const d = kt(Kr, Jr, a);
1892
+ const d = Qt(Kr, Jr, a);
1893
1893
  o[n] = d ?? m.BuiltIn.Null;
1894
1894
  }
1895
1895
  return this._scratchRow = t, this._scratchCol = e, o;
@@ -1906,11 +1906,11 @@ var Kr = {
1906
1906
  getTouched(t, e) {
1907
1907
  let n = this._touched;
1908
1908
  if (null !== n && this._touchedCycleId === t && this._touchedMarkId === e) return n;
1909
- Yr = this._container, Zr = this.gridId;
1909
+ Zr = this._container, Qr = this.gridId;
1910
1910
  try {
1911
1911
  n = Vr(this._template, this.ref, to);
1912
1912
  } finally {
1913
- Yr = null, Zr = null;
1913
+ Zr = null, Qr = null;
1914
1914
  }
1915
1915
  this._touched = n, this._touchedCycleId = t, this._touchedMarkId = e;
1916
1916
  const r = this.blankShared;
@@ -1980,8 +1980,8 @@ var Kr = {
1980
1980
  densify() {
1981
1981
  if (!this._sparse) return;
1982
1982
  if (this._sparse = !1, null === this._nodes) return;
1983
- const t = this.ref, e = t.rowStart, n = t.colStart, r = t.rowEnd - e + 1, o = t.colEnd - n + 1, s = Y(r);
1984
- for (let t = 0; t < r; t++) s[t] = Y(o);
1983
+ const t = this.ref, e = t.rowStart, n = t.colStart, r = t.rowEnd - e + 1, o = t.colEnd - n + 1, s = A(r);
1984
+ for (let t = 0; t < r; t++) s[t] = A(o);
1985
1985
  this.forEachNode((t) => {
1986
1986
  s[t.rowIndex - e][t.colIndex - n] = t;
1987
1987
  });
@@ -1997,9 +1997,9 @@ var Kr = {
1997
1997
  if (!t) return [[this._newNode(s, o, e, r.EmptyArray)]];
1998
1998
  const l = this._template, i = null !== l, a = i ? null : t.resolvedPrecedentsAt(s, o), c = i ? l.relative.length : a?.length ?? 0;
1999
1999
  this.paramLength = c;
2000
- const d = Y(n.rowEnd - s + 1), h = n.colEnd - o + 1, u = d.length;
2000
+ const d = A(n.rowEnd - s + 1), h = n.colEnd - o + 1, u = d.length;
2001
2001
  for (let n = 0; n < u; n++) {
2002
- const l = Y(h), u = l.length;
2002
+ const l = A(h), u = l.length;
2003
2003
  for (let d = 0; d < u; d++) {
2004
2004
  const h = n + s, u = d + o, _ = i ? null : 0 === c ? r.EmptyArray : 0 === n && 0 === d ? a : t.resolvedPrecedentsAt(h, u);
2005
2005
  l[d] = this._newNode(h, u, e, _);
@@ -2050,7 +2050,7 @@ var Kr = {
2050
2050
  }
2051
2051
  _adoptNode(t, e, n, o) {
2052
2052
  const s = t.ext;
2053
- return null !== s && (s.spillDependents = r.EmptyArray, s.spillRowEnd = -1, s.spillColEnd = -1, s.fixedRef = Ur(s.fixedRef, e - t.rowIndex, n - t.colIndex)), t.block = this, t.gridId = this.gridId, t.rowIndex = e, t.colIndex = n, t.inputsAt = -1, t.precedents = o, t.orderIndex = -1, t.planId = 0, t.planEpoch = 0, t.dependentsEpoch = 0, t.dependents = r.EmptyArray, t;
2053
+ return null !== s && (s.spillDependents = r.EmptyArray, s.spillRowEnd = -1, s.spillColEnd = -1, s.fixedRef = Xr(s.fixedRef, e - t.rowIndex, n - t.colIndex)), t.block = this, t.gridId = this.gridId, t.rowIndex = e, t.colIndex = n, t.inputsAt = -1, t.precedents = o, t.orderIndex = -1, t.planId = 0, t.planEpoch = 0, t.dependentsEpoch = 0, t.dependents = r.EmptyArray, t;
2054
2054
  }
2055
2055
  _copyNode(t, e, n) {
2056
2056
  const o = { ...t };
@@ -2062,7 +2062,7 @@ var Kr = {
2062
2062
  spillColStart: -1,
2063
2063
  spillRowEnd: -1,
2064
2064
  spillColEnd: -1,
2065
- fixedRef: Ur(s.fixedRef, e - t.rowIndex, n - t.colIndex),
2065
+ fixedRef: Xr(s.fixedRef, e - t.rowIndex, n - t.colIndex),
2066
2066
  demandValue: s.demandValue,
2067
2067
  cycleGroup: s.cycleGroup,
2068
2068
  cycleNext: s.cycleNext,
@@ -2087,7 +2087,7 @@ var Kr = {
2087
2087
  const t = e.originRow, o = e.originCol;
2088
2088
  if (0 === o && n.colEnd - n.colStart + 1 === a) c = 0 === t && r.length === i ? r : r.slice(t, t + i);
2089
2089
  else {
2090
- c = Y(i);
2090
+ c = A(i);
2091
2091
  for (let e = 0; e < i; e++) c[e] = r[e + t].slice(o, o + a);
2092
2092
  }
2093
2093
  }
@@ -2102,9 +2102,9 @@ var Kr = {
2102
2102
  }
2103
2103
  return c;
2104
2104
  }
2105
- const d = this.gridId, h = Y(i);
2105
+ const d = this.gridId, h = A(i);
2106
2106
  for (let e = 0; e < i; e++) {
2107
- const n = Y(a);
2107
+ const n = A(a);
2108
2108
  h[e] = n;
2109
2109
  const s = e + r;
2110
2110
  for (let r = 0; r < a; r++) {
@@ -2121,7 +2121,7 @@ var Kr = {
2121
2121
  if (null !== a && 0 === l.originRow && 0 === l.originCol && i.rowStart === n && i.colStart === r && i.rowEnd === e.rowEnd && i.colEnd === e.colEnd) return t._nodes = null, this._nodes = a, void this.forEachNode((t) => {
2122
2122
  this._adoptNode(t, t.rowIndex, t.colIndex, null);
2123
2123
  });
2124
- const c = i.rowStart + l.originRow, d = i.colStart + l.originCol, h = n - c, u = r - d, _ = new It.Builder();
2124
+ const c = i.rowStart + l.originRow, d = i.colStart + l.originCol, h = n - c, u = r - d, _ = new gt.Builder();
2125
2125
  t.forEachNodeIn(c, c + o - 1, d, d + s - 1, (t) => {
2126
2126
  const e = t.rowIndex + h, n = t.colIndex + u;
2127
2127
  this._adoptNode(t, e, n, null), _.pushAt(n, e, t);
@@ -2139,8 +2139,8 @@ var Kr = {
2139
2139
  });
2140
2140
  }
2141
2141
  if (0 === i.length) return;
2142
- i.sort(Xr);
2143
- const a = new It.Builder();
2142
+ i.sort(Ur);
2143
+ const a = new gt.Builder();
2144
2144
  for (let t = 0; t < i.length; t++) {
2145
2145
  const e = i[t];
2146
2146
  t > 0 && i[t - 1].rowIndex === e.rowIndex && i[t - 1].colIndex === e.colIndex || a.pushAt(e.colIndex, e.rowIndex, e);
@@ -2150,7 +2150,7 @@ var Kr = {
2150
2150
  }
2151
2151
  toJSON(t = !1, e = this.ref) {
2152
2152
  const n = e;
2153
- return [Ot(n), this.formula.getTextAt(n.rowStart, n.colStart, t)];
2153
+ return [Kt(n), this.formula.getTextAt(n.rowStart, n.colStart, t)];
2154
2154
  }
2155
2155
  getCoords() {
2156
2156
  return this.ref;
@@ -2545,12 +2545,12 @@ var Kr = {
2545
2545
  const o = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), s = o && t > o.rowEnd + 1 ? {
2546
2546
  ...o,
2547
2547
  rowEnd: t - 1
2548
- } : o, l = new y({
2548
+ } : o, l = new st({
2549
2549
  axis: this._axis,
2550
2550
  maxCoords: s
2551
2551
  });
2552
2552
  for (let t = 0; t < r; t++) l.setValueAt(e[t], 0, n[t]);
2553
- return new Vt(this._runtime, l, {
2553
+ return new Ve(this._runtime, l, {
2554
2554
  colStart: 0,
2555
2555
  rowStart: 0,
2556
2556
  colEnd: 0,
@@ -2583,15 +2583,15 @@ var Kr = {
2583
2583
  return this._calcScope.node ? this._container.evaluateWhatIf(t) : null;
2584
2584
  }
2585
2585
  async _initialize(t) {
2586
- const e = await ye.assertUsable("calcs", 0), n = this._container, r = n.getRuntime();
2587
- this._runtime = new B("Calculation Runtime", {
2586
+ const e = await T.assertUsable("calcs", 0), n = this._container, r = n.getRuntime();
2587
+ this._runtime = new vt("Calculation Runtime", {
2588
2588
  isDate1904: () => r.isDate1904(),
2589
2589
  isR1C1: () => r.isR1C1(),
2590
2590
  getNow: () => n.getNow(),
2591
2591
  getRandom: () => r.getRandom(),
2592
2592
  getLocale: () => r.getLocale()
2593
- }, e), this._calcScope = n.getScope(), this._coerceToNumber = te(this._runtime, E.Number, Nt);
2594
- const { initializeFunctions: o } = await import("./CFdJvXLSbUrvNera.js"), s = this, l = Object.freeze(o(() => s, this._functionProviders)), a = new Z({
2593
+ }, e), this._calcScope = n.getScope(), this._coerceToNumber = ge(this._runtime, E.Number, _t);
2594
+ const { initializeFunctions: o } = await import("./B8JX7a6VZlBNA_Bd.js"), s = this, l = Object.freeze(o(() => s, this._functionProviders)), a = new ee({
2595
2595
  transactions: t ?? new i({ transient: !0 }),
2596
2596
  context: this,
2597
2597
  readonlyFunctions: l,
@@ -2600,7 +2600,7 @@ var Kr = {
2600
2600
  return this._functions = a, { functions: a };
2601
2601
  }
2602
2602
  _createScoped(e) {
2603
- const n = this._container, r = n.getSymbols().bind(ae.Sheet, e);
2603
+ const n = this._container, r = n.getSymbols().bind(Bt.Sheet, e);
2604
2604
  if (!r || !n.getGrid(r)) return null;
2605
2605
  const o = new t(n, this._axis, this._functionProviders);
2606
2606
  return o._runtime = this._runtime, o._functions = this._functions, o._coerceToNumber = this._coerceToNumber, o._instanceScope = this._instanceScope, o._calcScope = {
@@ -2642,7 +2642,7 @@ var Kr = {
2642
2642
  }, t;
2643
2643
  }
2644
2644
  getFunction(t) {
2645
- const e = $t(t);
2645
+ const e = ce(t);
2646
2646
  if (void 0 !== e) {
2647
2647
  const t = this._functions.getByName(e);
2648
2648
  if (t && !t.isLambda()) return t;
@@ -2665,7 +2665,7 @@ var Kr = {
2665
2665
  getFormulaAt(t, e, n) {
2666
2666
  const r = this._container;
2667
2667
  let o;
2668
- if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(ae.Sheet, n) : this._calcScope.gridId, !o) return null;
2668
+ if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(Bt.Sheet, n) : this._calcScope.gridId, !o) return null;
2669
2669
  const s = r.getFormulas();
2670
2670
  if (!s) return null;
2671
2671
  ho.colStart = e, ho.rowStart = t, ho.colEnd = e, ho.rowEnd = t, ho.scope = o;
@@ -2681,15 +2681,15 @@ var Kr = {
2681
2681
  defer(t, e) {
2682
2682
  if ("function" != typeof t) throw new m.Value("defer needs an executor function");
2683
2683
  const n = this._container.getDeferred?.();
2684
- if (n) return ie(n.defer(t, e, it(), U())), n.previous;
2685
- ie(null);
2684
+ if (n) return Yt(n.defer(t, e, V(), Y())), n.previous;
2685
+ Yt(null);
2686
2686
  }
2687
2687
  formatResults(t) {
2688
2688
  const e = this._calcScope.node;
2689
2689
  e && (e.numFmt = t);
2690
2690
  }
2691
2691
  filterHidden(t, e) {
2692
- if (!(t?.isIReferenceRange && t instanceof P)) return t;
2692
+ if (!(t?.isIReferenceRange && t instanceof ae)) return t;
2693
2693
  const n = t.getCoords(), r = this._gridIdOf(n), o = r ? this._container.getGrid(r) : null;
2694
2694
  if (!o) return t;
2695
2695
  if (e?.onlyWhileFiltered && !o.isFiltered()) return t;
@@ -2700,7 +2700,7 @@ var Kr = {
2700
2700
  }) : t;
2701
2701
  }
2702
2702
  _gridIdOf(t) {
2703
- return t.scope ? this._container.getSymbols().bind(ae.Sheet, t.scope) : this._calcScope.gridId;
2703
+ return t.scope ? this._container.getSymbols().bind(Bt.Sheet, t.scope) : this._calcScope.gridId;
2704
2704
  }
2705
2705
  filterTotals(t) {
2706
2706
  const e = t;
@@ -2744,7 +2744,7 @@ var Kr = {
2744
2744
  const n = t?.getCoords()?.scope;
2745
2745
  if (n) e = n;
2746
2746
  else {
2747
- const t = this._container.getSymbols().resolve(ae.Sheet, this._calcScope.gridId);
2747
+ const t = this._container.getSymbols().resolve(Bt.Sheet, this._calcScope.gridId);
2748
2748
  e = t ? t.getName ? t.getName() ?? void 0 : t.toString() : void 0;
2749
2749
  }
2750
2750
  }
@@ -2794,30 +2794,30 @@ var Kr = {
2794
2794
  const r = t.gridId;
2795
2795
  if (r !== this._gridKeyId) {
2796
2796
  this._gridKeyId = r;
2797
- const t = null === r ? null : this._container.getSymbols().resolve(ae.Sheet, r), n = t?.getName ? t.getName() : null;
2797
+ const t = null === r ? null : this._container.getSymbols().resolve(Bt.Sheet, r), n = t?.getName ? t.getName() : null;
2798
2798
  this._gridKey = n ? e(n) : 0;
2799
2799
  }
2800
2800
  }
2801
2801
  return s(this._passSeed, this._gridKey, t.rowIndex, t.colIndex, n);
2802
2802
  }
2803
2803
  compare(t, e, n) {
2804
- return Qt.compare(t, e, this.getRuntime().getLocaleProfile(), n);
2804
+ return Tt.compare(t, e, this.getRuntime().getLocaleProfile(), n);
2805
2805
  }
2806
2806
  _fromTuples(t, e = null, n = !1, r = !1) {
2807
2807
  if (!t) return null;
2808
- const o = le(t.bounds, !0), s = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), l = new y({
2808
+ const o = St(t.bounds, !0), s = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), l = new st({
2809
2809
  axis: this._axis,
2810
2810
  maxCoords: s
2811
2811
  });
2812
2812
  l.setValues(t.tuples);
2813
2813
  let i = e ? { type: e } : void 0;
2814
- return new Vt(this._runtime, l, o, i, n, r);
2814
+ return new Ve(this._runtime, l, o, i, n, r);
2815
2815
  }
2816
2816
  getValueAt(t, e, n = null, o) {
2817
2817
  const s = this._container, l = this._calcScope;
2818
2818
  let i, a;
2819
2819
  if (n) {
2820
- if (i = s.getSymbols().bind(ae.Sheet, n), At(i)) return m.BuiltIn.Ref;
2820
+ if (i = s.getSymbols().bind(Bt.Sheet, n), de(i)) return m.BuiltIn.Ref;
2821
2821
  } else i = l.gridId;
2822
2822
  if (!i) return m.BuiltIn.Ref;
2823
2823
  const c = l.node, d = c ? an(c) : r.EmptyArray, h = d.length;
@@ -2836,12 +2836,12 @@ var Kr = {
2836
2836
  } else a = l;
2837
2837
  break;
2838
2838
  }
2839
- return void 0 === a && (this._onRead?.(i, t, e, t, e), a = s.getGridValues(i)?.getValueAt(t, e) ?? null, s.getDeferred?.()?.hasHolders() && (a = Et(a))), o && o.type, a;
2839
+ return void 0 === a && (this._onRead?.(i, t, e, t, e), a = s.getGridValues(i)?.getValueAt(t, e) ?? null, s.getDeferred?.()?.hasHolders() && (a = Ht(a))), o && o.type, a;
2840
2840
  }
2841
2841
  getSpillAt(t, e, n) {
2842
2842
  const r = this._container, o = this._calcScope;
2843
2843
  let s;
2844
- s = n ? r.getSymbols().bind(ae.Sheet, n) : o.gridId;
2844
+ s = n ? r.getSymbols().bind(Bt.Sheet, n) : o.gridId;
2845
2845
  const l = s === o.gridId ? null : s, i = r.getIncrementalUpdates(s)?.spillSpatial ?? r.getGrid(s)?.getSpills();
2846
2846
  if (i) {
2847
2847
  uo.rowStart = t, uo.colStart = e, uo.rowEnd = t, uo.colEnd = e, uo.scope = s;
@@ -2871,12 +2871,12 @@ var Kr = {
2871
2871
  ...r,
2872
2872
  rowEnd: Math.max(r.rowEnd, t - 1),
2873
2873
  colEnd: Math.max(r.colEnd, e - 1)
2874
- } : r, s = new y({
2874
+ } : r, s = new st({
2875
2875
  axis: this._axis,
2876
2876
  maxCoords: o
2877
2877
  });
2878
- let l = new Vt(this._runtime, s, null, void 0, !1);
2879
- return t > 0 && e > 0 && ("function" == typeof n ? (l = l.resize(t, e), l = l.map(n, fo)) : Array.isArray(n) ? (l = l.replace(n), l = l.resize(t, e)) : l = null != n ? new Vt(this._runtime, s, {
2878
+ let l = new Ve(this._runtime, s, null, void 0, !1);
2879
+ return t > 0 && e > 0 && ("function" == typeof n ? (l = l.resize(t, e), l = l.map(n, fo)) : Array.isArray(n) ? (l = l.replace(n), l = l.resize(t, e)) : l = null != n ? new Ve(this._runtime, s, {
2880
2880
  colStart: 0,
2881
2881
  rowStart: 0,
2882
2882
  colEnd: e - 1,
@@ -2905,7 +2905,7 @@ var Kr = {
2905
2905
  const s = Array.isArray(t);
2906
2906
  if (n = n ?? s, !s && void 0 !== t) {
2907
2907
  const r = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords();
2908
- return new Vt(this._runtime, new Sn(t, {
2908
+ return new Ve(this._runtime, new Sn(t, {
2909
2909
  axis: this._axis,
2910
2910
  maxCoords: r
2911
2911
  }), {
@@ -2920,13 +2920,13 @@ var Kr = {
2920
2920
  if (t[0]?.isIRange) throw m.BuiltIn.Value;
2921
2921
  r = [t];
2922
2922
  }
2923
- const l = this._axis, i = l === w.Axis.Column, a = this._fromTuples(k(r, i, ft(0, 0, void 0, void 0, i), !0), e, n, !s);
2923
+ const l = this._axis, i = l === w.Axis.Column, a = this._fromTuples(se(r, i, Ut(0, 0, void 0, void 0, i), !0), e, n, !s);
2924
2924
  if (a) return a;
2925
- const c = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), d = new y({
2925
+ const c = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), d = new st({
2926
2926
  axis: l,
2927
2927
  maxCoords: c
2928
2928
  }), h = e ? { type: e } : void 0;
2929
- return new Vt(this._runtime, d, o.EmptyRange, h, n);
2929
+ return new Ve(this._runtime, d, o.EmptyRange, h, n);
2930
2930
  }
2931
2931
  getRow() {
2932
2932
  const t = this._calcScope;
@@ -2958,7 +2958,7 @@ var Kr = {
2958
2958
  const r = i?.();
2959
2959
  let o;
2960
2960
  try {
2961
- let n = G(t, r, at, () => {
2961
+ let n = J(t, r, Mt, () => {
2962
2962
  throw m.BuiltIn.Ref;
2963
2963
  }, e);
2964
2964
  if (n.length > 1) throw m.BuiltIn.Ref;
@@ -2994,7 +2994,7 @@ var Kr = {
2994
2994
  if (!t) throw m.BuiltIn.Ref;
2995
2995
  let a = t.scope;
2996
2996
  if (a) {
2997
- if (a = r.getSymbols().bind(ae.Sheet, t.scope), !a) return m.BuiltIn.Ref;
2997
+ if (a = r.getSymbols().bind(Bt.Sheet, t.scope), !a) return m.BuiltIn.Ref;
2998
2998
  const e = r.getSheetSpanIds?.(a) ?? null;
2999
2999
  if (e) {
3000
3000
  if (r.isGridless?.(e[0]) || r.isGridless?.(e[e.length - 1])) return m.BuiltIn.Name;
@@ -3011,7 +3011,7 @@ var Kr = {
3011
3011
  scope: a
3012
3012
  };
3013
3013
  if (r.isGridless?.(a)) {
3014
- const t = new y({ axis: this._axis });
3014
+ const t = new st({ axis: this._axis });
3015
3015
  return this._toReference(t, e, void 0, a, !1, null);
3016
3016
  }
3017
3017
  t = e;
@@ -3032,7 +3032,7 @@ var Kr = {
3032
3032
  else {
3033
3033
  let n = e;
3034
3034
  null !== n && n.isIRange && (n = n.getValueAt(0, 0));
3035
- const r = new y({
3035
+ const r = new st({
3036
3036
  axis: this._axis,
3037
3037
  maxCoords: i?.()
3038
3038
  });
@@ -3054,7 +3054,7 @@ var Kr = {
3054
3054
  _expandSheetSpan(t) {
3055
3055
  if (null === t || "object" != typeof t || !0 === t.isIRange) return null;
3056
3056
  const e = t;
3057
- if (void 0 === e.colStart || !At(e.scope)) return null;
3057
+ if (void 0 === e.colStart || !de(e.scope)) return null;
3058
3058
  const n = this._container, r = n.getSheetSpanIds?.(e.scope) ?? null;
3059
3059
  if (!r) return null;
3060
3060
  if (n.isGridless?.(r[0]) || n.isGridless?.(r[r.length - 1])) return null;
@@ -3076,7 +3076,7 @@ var Kr = {
3076
3076
  const i = this._onRead ?? (s ? this._dynamicRead : null);
3077
3077
  i && (t = new oo(t, o, i));
3078
3078
  try {
3079
- const n = new P(this._runtime, t, e, void 0, r, this._container.resolveScope);
3079
+ const n = new ae(this._runtime, t, e, void 0, r, this._container.resolveScope);
3080
3080
  return n._setCoordsReadHook(this._positionRead), null !== l && n._setErrorIndex(null === i ? l : { hasErrorIn: (t) => (i(o, t.rowStart, t.colStart, t.rowEnd, t.colEnd), l.hasErrorIn(t)) }), n;
3081
3081
  } catch (t) {
3082
3082
  if (t instanceof n) throw m.BuiltIn.Ref;
@@ -3086,7 +3086,7 @@ var Kr = {
3086
3086
  getAddress(t, e = !1) {
3087
3087
  t || (this._calcScope.positionRead = !0, _o.rowIndex = this._calcScope.rowIndex, _o.colIndex = this._calcScope.colIndex, _o.scope = null, t = _o);
3088
3088
  const n = this.getEntireCoords().scope;
3089
- return void 0 !== t.colIndex ? qt(t, n, e) : Ve(t, n, e);
3089
+ return void 0 !== t.colIndex ? Zt(t, n, e) : z(t, n, e);
3090
3090
  }
3091
3091
  parseAsSerialDate(t, e) {
3092
3092
  if (void 0 === t) return;
@@ -3143,7 +3143,7 @@ var Kr = {
3143
3143
  return pr.create(t, e, this._createSparseColumn, n);
3144
3144
  }
3145
3145
  getPivotAt(t) {
3146
- if (!(t instanceof P)) return null;
3146
+ if (!(t instanceof ae)) return null;
3147
3147
  const e = t.getCoords(), n = this._gridIdOf(e), r = (n ? this._container.getGrid(n) : null)?.getPivots();
3148
3148
  if (!r) return null;
3149
3149
  for (let t = 0; t < r.length; t++) {
@@ -3157,16 +3157,16 @@ var Kr = {
3157
3157
  return null;
3158
3158
  }
3159
3159
  parseAsLiteral(t) {
3160
- return jt(t) ?? Me(t);
3160
+ return Q(t) ?? Me(t);
3161
3161
  }
3162
3162
  toText(t) {
3163
- return C(t, this._runtime);
3163
+ return mt(t, this._runtime);
3164
3164
  }
3165
3165
  getRuntime() {
3166
3166
  return this._runtime;
3167
3167
  }
3168
3168
  createRichData(t, e) {
3169
- return Ee.fromJSON({
3169
+ return it.fromJSON({
3170
3170
  type: t,
3171
3171
  data: e
3172
3172
  }, this._container.getRichDataContext?.());
@@ -3294,7 +3294,7 @@ function So(t, e, n) {
3294
3294
  colEnd: a[1]
3295
3295
  };
3296
3296
  }
3297
- var wo = class extends Tt {
3297
+ var wo = class extends Lt {
3298
3298
  constructor(t) {
3299
3299
  const e = (t = { ...t }).container;
3300
3300
  super({
@@ -3302,15 +3302,15 @@ var wo = class extends Tt {
3302
3302
  send: (t, n, r) => e.sendRequest(t, n, r),
3303
3303
  calculation: t.calculation
3304
3304
  }), this._touchedOthers = null, this._iterationId = 0, this._resized = null, this._hiddenRows = null, this._hiddenColumns = null, this._filtered = !1, this._pivots = null, this._demanded = [], this._isProcessingJSON = !1, this._snapshots = null, this._options = t, this._context = t.context, this._container = t.container;
3305
- const n = { ...ke }, o = t.getEntireCoords ?? (() => n);
3305
+ const n = { ...Gt }, o = t.getEntireCoords ?? (() => n);
3306
3306
  if (this._getEntireCoords = o, this._unanchored = !0 === t.unanchored, this._shadowOf = t.shadowOf ?? null, this._arrayFirstCell = !0 === t.arrayFirstCell, this._paged = !0 === t.paged, !this._context || !this._container) throw new Error("Invalid Options");
3307
3307
  const s = t?.onCalculated;
3308
3308
  this._onCalculated = s ? (t) => {
3309
- s(W(nt.results(t, "onCalculated"), this._container.getImager(this._gridId)));
3310
- } : () => {}, this._values = new y({
3309
+ s(H(Te.results(t, "onCalculated"), this._container.getImager(this._gridId)));
3310
+ } : () => {}, this._values = new st({
3311
3311
  axis: w.Axis.Column,
3312
3312
  createRun: rn
3313
- }), this._iterationId = 0, this._contentfulSpatial = new Wt({ updateEntryOptions: {
3313
+ }), this._iterationId = 0, this._contentfulSpatial = new v({ updateEntryOptions: {
3314
3314
  isSplitOnExpand: !0,
3315
3315
  isMergeOnShift: !0
3316
3316
  } });
@@ -3318,7 +3318,7 @@ var wo = class extends Tt {
3318
3318
  isSplitOnExpand: !0,
3319
3319
  isMergeOnShift: !1
3320
3320
  } };
3321
- this._spillSpatial = new Wt(l), this._errorSpatial = new Wt(l), this._calcStatusSpatial = new Wt(l), this._circularSpatial = new Wt(l), this._notifyValues = new Wt(), this._notifyBlank = null, this._notifySpillsInsert = [], this._notifySpillsRemove = [], this._notifyFormats = new Wt(), this._notifyCalcStatus = new Wt(), this._notifyCircular = new Wt(), this._touchedFormulas = [], this._container.registerGrid(this), this._publishMaps();
3321
+ this._spillSpatial = new v(l), this._errorSpatial = new v(l), this._calcStatusSpatial = new v(l), this._circularSpatial = new v(l), this._notifyValues = new v(), this._notifyBlank = null, this._notifySpillsInsert = [], this._notifySpillsRemove = [], this._notifyFormats = new v(), this._notifyCalcStatus = new v(), this._notifyCircular = new v(), this._touchedFormulas = [], this._container.registerGrid(this), this._publishMaps();
3322
3322
  }
3323
3323
  _land(t, e) {
3324
3324
  return this._container.landRequest(t, () => (void 0 !== t && this._versionMaps(t), e()));
@@ -3444,7 +3444,7 @@ var wo = class extends Tt {
3444
3444
  cycleId: this._container.getCycleId(),
3445
3445
  commitId: t.commitId
3446
3446
  };
3447
- const r = st(t.destination, t.coords, t.fitDestination, t.transpose);
3447
+ const r = R(t.destination, t.coords, t.fitDestination, t.transpose);
3448
3448
  return r.scope = this._gridId, this._land(e, () => {
3449
3449
  t.isCut ? this._moveTo(n, t.coords, r) : this._copyTo(n, t.coords, r);
3450
3450
  const e = this._mutationResults(t.commitId);
@@ -3570,8 +3570,8 @@ var wo = class extends Tt {
3570
3570
  const e = this, n = this.getId(), r = { ...t };
3571
3571
  r.range = { ...r.range }, r.range.scope = n, delete r.onShift;
3572
3572
  const o = e._values, s = r.range, l = r.direction, i = l === w.Direction.Left || l === w.Direction.Right, a = l === w.Direction.Down || l === w.Direction.Right, c = a ? 1 : -1, d = e._spillSpatial, h = e._contentfulSpatial;
3573
- J(d, s, i, a);
3574
- const u = [], _ = this._container.getPrecedents().search(s), f = mt(s, d, o, h, void 0, !1, !1, void 0, (t, e, r, o) => {
3573
+ C(d, s, i, a);
3574
+ const u = [], _ = this._container.getPrecedents().search(s), f = Ae(s, d, o, h, void 0, !1, !1, void 0, (t, e, r, o) => {
3575
3575
  u.push({
3576
3576
  colStart: t,
3577
3577
  rowStart: e,
@@ -3589,7 +3589,7 @@ var wo = class extends Tt {
3589
3589
  colEnd: i && 1 === c ? S.colEnd : s.colEnd,
3590
3590
  rowEnd: i || 1 !== c ? s.rowEnd : S.rowEnd,
3591
3591
  scope: n
3592
- }, I = a ? Dt(m, E) : Rt(m, s);
3592
+ }, I = a ? xe(m, E) : Wt(m, s);
3593
3593
  I && (Po(p, m, I.formulas.inserts, I.formulas.removes), e._touchFormulas(I.formulas.removes), e._touchFormulas(I.formulas.inserts));
3594
3594
  const y = i ? s.colEnd - s.colStart + 1 : s.rowEnd - s.rowStart + 1, v = y * c, x = {
3595
3595
  colStart: s.colStart,
@@ -3598,19 +3598,19 @@ var wo = class extends Tt {
3598
3598
  rowEnd: i ? s.rowEnd : S.rowEnd,
3599
3599
  scope: n
3600
3600
  };
3601
- let C;
3602
- const b = R(() => m, () => {
3601
+ let b;
3602
+ const R = ht(() => m, () => {
3603
3603
  const t = g.getDynamics();
3604
- return C = new Map(t), C;
3604
+ return b = new Map(t), b;
3605
3605
  }, x, {
3606
3606
  colIndex: i ? v : 0,
3607
3607
  rowIndex: i ? 0 : v,
3608
3608
  scope: n
3609
3609
  }, a ? void 0 : s);
3610
3610
  let A, k;
3611
- b && (Po(p, m, b.formulas.inserts, b.formulas.removes), e._touchFormulas(b.formulas.removes), e._touchFormulas(b.formulas.inserts)), r.onUpdates = (t, e) => {
3611
+ R && (Po(p, m, R.formulas.inserts, R.formulas.removes), e._touchFormulas(R.formulas.removes), e._touchFormulas(R.formulas.inserts)), r.onUpdates = (t, e) => {
3612
3612
  A = t, k = e;
3613
- }, p.shift(r), (A || k) && (Lo(m, A, k), e._touchFormulas(k), e._touchFormulas(A)), g.setFormulas(p), g.setPrecedents(m), C && g.setDynamics(C), g.bumpCalcEpochs(!0), f?.(a, i ? 0 : v, i ? v : 0);
3613
+ }, p.shift(r), (A || k) && (Lo(m, A, k), e._touchFormulas(k), e._touchFormulas(A)), g.setFormulas(p), g.setPrecedents(m), b && g.setDynamics(b), g.bumpCalcEpochs(!0), f?.(a, i ? 0 : v, i ? v : 0);
3614
3614
  const N = i ? s.colStart : s.rowStart, M = i ? s.colEnd : s.rowEnd, F = (t, e = t.ref) => {
3615
3615
  const r = t.gridId;
3616
3616
  r && g.getGrid(r) && (t.unanchored ? g.invalidateNamed(r) : ((t, e) => {
@@ -3638,9 +3638,9 @@ var wo = class extends Tt {
3638
3638
  const e = _[t].value, n = e.formulaEntry.value, r = e.index < 0 || n.unanchored ? n.ref : So(n, e.index, s);
3639
3639
  null !== r && F(n, r);
3640
3640
  }
3641
- const D = b?.dynamicDependents;
3641
+ const D = R?.dynamicDependents;
3642
3642
  for (let t = 0; t < (D?.length ?? 0); t++) F(D[t].value);
3643
- const T = b?.formulas.inserts;
3643
+ const T = R?.formulas.inserts;
3644
3644
  for (let t = 0; t < (T?.length ?? 0); t++) {
3645
3645
  const e = T[t];
3646
3646
  e.scope !== n && F(e.value);
@@ -3691,9 +3691,9 @@ var wo = class extends Tt {
3691
3691
  let h = c;
3692
3692
  for (let r = 0; r < d.length; r++) {
3693
3693
  const o = d[r];
3694
- if (!D(o)) continue;
3694
+ if (!le(o)) continue;
3695
3695
  let s = l.get(o);
3696
- void 0 === s && (s = Se(o, t, e, n) ?? null, l.set(o, s)), null !== s && (h = h.replaceScopeIds(o, s));
3696
+ void 0 === s && (s = It(o, t, e, n) ?? null, l.set(o, s)), null !== s && (h = h.replaceScopeIds(o, s));
3697
3697
  }
3698
3698
  h !== c && (i.push(o), a.push({
3699
3699
  ...o,
@@ -3840,7 +3840,7 @@ var wo = class extends Tt {
3840
3840
  columns: e.anchor.column - n.colStart
3841
3841
  }, i = {
3842
3842
  ...n,
3843
- value: new bt(n, l, "pivot", s)
3843
+ value: new Re(n, l, "pivot", s)
3844
3844
  };
3845
3845
  o.insert(i), this._notifySpillsInsert.push(i);
3846
3846
  }
@@ -3965,7 +3965,7 @@ var wo = class extends Tt {
3965
3965
  }
3966
3966
  this._pushWithSpills(h, w);
3967
3967
  }
3968
- return h = me(h, 2, t.Row), h.sort(o.rowFirstRangeComparator), h;
3968
+ return h = K(h, 2, t.Row), h.sort(o.rowFirstRangeComparator), h;
3969
3969
  }
3970
3970
  _pushWithSpills(t, e) {
3971
3971
  t.push(e);
@@ -4022,7 +4022,7 @@ var wo = class extends Tt {
4022
4022
  for (let t = 0; t < a.length; t++) {
4023
4023
  const e = a[t];
4024
4024
  if (void 0 === e?.colStart) continue;
4025
- const n = e.scope, o = _(n), s = Ce(e, r.rowStart + I, r.colStart + y), l = Ce(e, r.rowStart + v, r.colStart + x), i = {
4025
+ const n = e.scope, o = _(n), s = te(e, r.rowStart + I, r.colStart + y), l = te(e, r.rowStart + v, r.colStart + x), i = {
4026
4026
  colStart: Math.max(Math.min(s.colStart, l.colStart), o.colStart),
4027
4027
  rowStart: Math.max(Math.min(s.rowStart, l.rowStart), o.rowStart),
4028
4028
  colEnd: Math.min(Math.max(s.colEnd, l.colEnd), o.colEnd),
@@ -4033,7 +4033,7 @@ var wo = class extends Tt {
4033
4033
  }
4034
4034
  f.push(...C);
4035
4035
  }
4036
- return f = me(f, 2, t.Row), f.sort(o.rowFirstRangeComparator), f;
4036
+ return f = K(f, 2, t.Row), f.sort(o.rowFirstRangeComparator), f;
4037
4037
  }
4038
4038
  _directAcrossGrids(t, e) {
4039
4039
  const n = this._gridId, o = t.scope, s = o && o !== n ? this._container.getGrid(o) ?? null : this;
@@ -4054,11 +4054,11 @@ var wo = class extends Tt {
4054
4054
  return i;
4055
4055
  }
4056
4056
  getDependentsAt(t) {
4057
- const e = yt(t, (t) => this._directAcrossGrids(t, !0));
4057
+ const e = Z(t, (t) => this._directAcrossGrids(t, !0));
4058
4058
  return e.sort(o.rowFirstRangeComparator), e;
4059
4059
  }
4060
4060
  getPrecedentsAt(t) {
4061
- const e = yt(t, (t) => this._directAcrossGrids(t, !1));
4061
+ const e = Z(t, (t) => this._directAcrossGrids(t, !1));
4062
4062
  return e.sort(o.rowFirstRangeComparator), e;
4063
4063
  }
4064
4064
  _graphNeighborsNow(t, e, n) {
@@ -4169,8 +4169,8 @@ var wo = class extends Tt {
4169
4169
  if ("scalar" === o) {
4170
4170
  let o = t.evaluateAt(e, n, r);
4171
4171
  if (o && void 0 !== o.colStart) o = t.finalizeValue(o);
4172
- else if (wt(o)) return t.finalizeValue(o);
4173
- const s = Ct(o, this._context);
4172
+ else if (Ie(o)) return t.finalizeValue(o);
4173
+ const s = rt(o, this._context);
4174
4174
  return null === s ? 0 : s;
4175
4175
  }
4176
4176
  return ln(t.finalizeValue(t.evaluateAt(e, n, r)));
@@ -4178,7 +4178,7 @@ var wo = class extends Tt {
4178
4178
  _setReferenceNow(t, e, n, r) {
4179
4179
  const o = this._formulaAt(t, e);
4180
4180
  let s = r;
4181
- r && void 0 !== r.colStart ? s = $(s, t, e) : r && void 0 !== r.colIndex && (s = N(s, t, e));
4181
+ r && void 0 !== r.colStart ? s = ft(s, t, e) : r && void 0 !== r.colIndex && (s = x(s, t, e));
4182
4182
  const l = o.value.formula.setReferenceAt(n, s).getTextAt(t, e);
4183
4183
  return this._land(void 0, () => {
4184
4184
  l ? this._setInputsNow(null, [{
@@ -4199,7 +4199,7 @@ var wo = class extends Tt {
4199
4199
  _setReferenceModeNow(t, e, n, r, o) {
4200
4200
  const s = this.getReferencesAt(t, e)[n];
4201
4201
  if (!s || "nameId" in s) throw new Error(`Reference at index ${n} is not a cell reference and cannot have its style changed.`);
4202
- return this._setReferenceNow(t, e, n, Ae(s, r, o));
4202
+ return this._setReferenceNow(t, e, n, Vt(s, r, o));
4203
4203
  }
4204
4204
  _isVolatileNow(t, e) {
4205
4205
  const n = this._formulaAt(t, e);
@@ -4234,7 +4234,7 @@ var wo = class extends Tt {
4234
4234
  rowStart: u,
4235
4235
  colEnd: o,
4236
4236
  rowEnd: f,
4237
- value: new bt(g, 0, e.value.getKind())
4237
+ value: new Re(g, 0, e.value.getKind())
4238
4238
  });
4239
4239
  }
4240
4240
  return {
@@ -4247,7 +4247,7 @@ var wo = class extends Tt {
4247
4247
  if (0 === o) return;
4248
4248
  const s = this._container, l = n ?? this._gridId, i = null != n ? l : e ?? l, a = s.getScope();
4249
4249
  a.gridId = i;
4250
- const c = e ? s.getSymbols().resolve(ae.Sheet, e)?.toString() : void 0, d = this._context;
4250
+ const c = e ? s.getSymbols().resolve(Bt.Sheet, e)?.toString() : void 0, d = this._context;
4251
4251
  for (let n = 0; n < o; n++) {
4252
4252
  const o = t[n], h = o.value, u = h.ref, _ = h.formula.getTextAt(u.rowStart, u.colStart);
4253
4253
  a.colIndex = u.colStart, a.rowIndex = u.rowStart;
@@ -4279,11 +4279,11 @@ var wo = class extends Tt {
4279
4279
  if ("nameId" in o) continue;
4280
4280
  if ("tableId" in o) continue;
4281
4281
  const g = o, p = g.colStart, m = g.rowStart, w = g.colEnd, E = g.rowEnd;
4282
- let I = g.$colStart ? p : p + s, y = g.$rowStart ? m : m + l, v = g.$colEnd ? w : w + i, x = g.$rowEnd ? E : E + u;
4283
- if (p === Number.MIN_SAFE_INTEGER && (I = a, v = d), m === Number.MIN_SAFE_INTEGER && (y = c, x = h), I < a || v > d || y < c || x > h) {
4284
- const o = a - I, g = c - y, p = d - v, m = h - x;
4282
+ let I = g.$colStart ? p : p + s, v = g.$rowStart ? m : m + l, x = g.$colEnd ? w : w + i, C = g.$rowEnd ? E : E + u;
4283
+ if (p === Number.MIN_SAFE_INTEGER && (I = a, x = d), m === Number.MIN_SAFE_INTEGER && (v = c, C = h), I < a || x > d || v < c || C > h) {
4284
+ const o = a - I, g = c - v, p = d - x, m = h - C;
4285
4285
  Mo.colStart = Math.max(s, s + o), Mo.rowStart = Math.max(l, l + g), Mo.colEnd = Math.min(i, i + p), Mo.rowEnd = Math.min(u, u + m);
4286
- const w = _t(t, Mo, xt);
4286
+ const w = Ge(t, Mo, y);
4287
4287
  if (w) {
4288
4288
  const e = w.length;
4289
4289
  t = w[e - 1], n = t.value, r = n.ref, s = r.colStart, l = r.rowStart, i = r.colEnd, u = r.rowEnd;
@@ -4307,7 +4307,7 @@ var wo = class extends Tt {
4307
4307
  this._removeNow(n);
4308
4308
  const a = this._container, c = a.getPrecedents().clone(), d = a.getFormulas().clone();
4309
4309
  a.setPrecedents(c), a.setFormulas(d);
4310
- const h = Re(c, e, n);
4310
+ const h = Ce(c, e, n);
4311
4311
  h && (Po(d, c, h.formulas.inserts, h.formulas.removes), this._touchFormulas(h.formulas.removes), this._touchFormulas(h.formulas.inserts));
4312
4312
  const u = { cutFrom: e }, _ = i.createCopiedEntries(e, n, u).inserts, f = _.length, g = this._gridId;
4313
4313
  if (g !== l) {
@@ -4355,7 +4355,7 @@ var wo = class extends Tt {
4355
4355
  }
4356
4356
  let p;
4357
4357
  Po(d, c, _), this._touchFormulas(_);
4358
- const S = vt(c, () => {
4358
+ const S = Ee(c, () => {
4359
4359
  const t = a.getDynamics();
4360
4360
  return p = new Map(t), p;
4361
4361
  }, e, n);
@@ -4377,7 +4377,7 @@ var wo = class extends Tt {
4377
4377
  t.values.copyTo(E, {
4378
4378
  colIndex: n.colStart,
4379
4379
  rowIndex: n.rowStart
4380
- }, e), ee(this._errorSpatial, E, n);
4380
+ }, e), we(this._errorSpatial, E, n);
4381
4381
  const I = t.spillSpatial;
4382
4382
  let y = [], v = [];
4383
4383
  for (let t = 0; t < f; t++) {
@@ -4390,7 +4390,7 @@ var wo = class extends Tt {
4390
4390
  const t = (t, e) => {
4391
4391
  t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
4392
4392
  };
4393
- b(a.getCycleId(), v, r.EmptyArray, s._contentfulSpatial, s._spillSpatial, s._values, (t, e, n, r) => {
4393
+ B(a.getCycleId(), v, r.EmptyArray, s._contentfulSpatial, s._spillSpatial, s._values, (t, e, n, r) => {
4394
4394
  x.push({
4395
4395
  colStart: t,
4396
4396
  rowStart: e,
@@ -4436,7 +4436,7 @@ var wo = class extends Tt {
4436
4436
  }
4437
4437
  }
4438
4438
  e && (t = i.concat(e)), t.sort(o.columnFirstRangeComparator);
4439
- const n = new It.Builder((t, e) => new L.ArrayList(t.slice(0, e)));
4439
+ const n = new gt.Builder((t, e) => new ut.ArrayList(t.slice(0, e)));
4440
4440
  let r;
4441
4441
  const s = !0 === this._container.getDeferred?.()?.hasHolders(), a = this._values, c = a.getAxis() === w.Axis.Column, d = t.length;
4442
4442
  for (let e = 0; e < d; e++) {
@@ -4533,9 +4533,9 @@ var wo = class extends Tt {
4533
4533
  const i = e.search(o), a = i.length;
4534
4534
  for (let e = 0; e < a; e++) {
4535
4535
  let r = i[e];
4536
- if (zt(o.rowStart, o.colStart, r) && (s || r.value.getCycleId() === t)) {
4536
+ if (Ft(o.rowStart, o.colStart, r) && (s || r.value.getCycleId() === t)) {
4537
4537
  m || (m = [], n = /* @__PURE__ */ new Set());
4538
- const t = be(r.colStart) + A(r.rowStart);
4538
+ const t = lt(r.colStart) + et(r.rowStart);
4539
4539
  if (n.has(t)) continue;
4540
4540
  n.add(t);
4541
4541
  const e = r.value.getBlockedCoords() ?? o;
@@ -4570,7 +4570,7 @@ var wo = class extends Tt {
4570
4570
  if (t && t.tuples) {
4571
4571
  I = t.tuples;
4572
4572
  let e = t.bounds;
4573
- if (e ? (y = le(e, f), y.scope = l) : y = {
4573
+ if (e ? (y = St(e, f), y.scope = l) : y = {
4574
4574
  colStart: Number.MIN_SAFE_INTEGER,
4575
4575
  rowStart: Number.MIN_SAFE_INTEGER,
4576
4576
  colEnd: Number.MAX_SAFE_INTEGER,
@@ -4593,19 +4593,19 @@ var wo = class extends Tt {
4593
4593
  t.minorStart = n[0];
4594
4594
  const r = n[1];
4595
4595
  t.minorEnd = t.minorStart + r.length - 1;
4596
- const s = le(t, f);
4596
+ const s = St(t, f);
4597
4597
  s.scope = l, x && c.search(s).length > 0 && x.push(s);
4598
4598
  }
4599
4599
  }
4600
4600
  }
4601
- v = Fe(t.tuples, f, l);
4601
+ v = _e(t.tuples, f, l);
4602
4602
  }
4603
4603
  const C = (t, e) => {
4604
4604
  t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
4605
4605
  };
4606
4606
  if (n || I) {
4607
4607
  let t;
4608
- n && (t = mt(n, g, _, S, C, !1, !0, this._notifyValues, (t, e, n, r) => {
4608
+ n && (t = Ae(n, g, _, S, C, !1, !0, this._notifyValues, (t, e, n, r) => {
4609
4609
  E.push({
4610
4610
  colStart: t,
4611
4611
  rowStart: e,
@@ -4613,7 +4613,7 @@ var wo = class extends Tt {
4613
4613
  rowEnd: r,
4614
4614
  scope: l
4615
4615
  });
4616
- })), b(-1, n ? [n] : r.EmptyArray, v, S, g, _, (t, e, n, r) => {
4616
+ })), B(-1, n ? [n] : r.EmptyArray, v, S, g, _, (t, e, n, r) => {
4617
4617
  E.push({
4618
4618
  colStart: t,
4619
4619
  rowStart: e,
@@ -4621,13 +4621,13 @@ var wo = class extends Tt {
4621
4621
  rowEnd: r,
4622
4622
  scope: l
4623
4623
  });
4624
- }, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n), z(p, n)), t?.(), I && (_.setValues(I), Ft(p, I, f));
4624
+ }, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n), Et(p, n)), t?.(), I && (_.setValues(I), D(p, I, f));
4625
4625
  }
4626
- const R = i.getScope();
4627
- let A, k, N, M, F;
4628
- const D = (t, e) => {
4626
+ const b = i.getScope();
4627
+ let R, k, N, M, F;
4628
+ const T = (t, e) => {
4629
4629
  const n = t.rowStart, r = t.colStart;
4630
- R && (R.rowIndex = n, R.colIndex = r);
4630
+ b && (b.rowIndex = n, b.colIndex = r);
4631
4631
  const o = i.createFormulaBlock(l, a, e, n, r), c = new no(t, l, o, i, this._unanchored), d = s?.arrayFixed;
4632
4632
  d && d.colStart === r && d.rowStart === n && (sn(c.getAnchorNode()).fixedRef = {
4633
4633
  colStart: d.colStart,
@@ -4640,8 +4640,8 @@ var wo = class extends Tt {
4640
4640
  scope: l,
4641
4641
  value: c
4642
4642
  };
4643
- A || (A = []), A.push(h);
4644
- }, T = (t) => {
4643
+ R || (R = []), R.push(h);
4644
+ }, G = (t) => {
4645
4645
  const e = {
4646
4646
  ...t,
4647
4647
  scope: l,
@@ -4662,33 +4662,33 @@ var wo = class extends Tt {
4662
4662
  }
4663
4663
  }
4664
4664
  });
4665
- }, G = x ? x.length : 0;
4666
- let B;
4665
+ }, V = x ? x.length : 0;
4666
+ let O;
4667
4667
  if (u > 0) {
4668
- B = Y(u);
4668
+ O = A(u);
4669
4669
  for (let t = 0; t < u; t++) {
4670
4670
  const n = e[t], r = n.value, s = o.sanitizeRange(n);
4671
- B[t] = s, null !== r && D(s, r);
4671
+ O[t] = s, null !== r && T(s, r);
4672
4672
  }
4673
4673
  }
4674
- const V = s?.cloneKey ?? null;
4675
- (G > 0 || u > 0) && (N = i.getFormulas().clone(V));
4676
- for (let t = 0; t < G; t++) T(x[t]);
4677
- for (let t = 0; t < u; t++) T(B[t]);
4678
- const O = k ? k.length : 0;
4679
- if (O > 0) {
4674
+ const P = s?.cloneKey ?? null;
4675
+ (V > 0 || u > 0) && (N = i.getFormulas().clone(P));
4676
+ for (let t = 0; t < V; t++) G(x[t]);
4677
+ for (let t = 0; t < u; t++) G(O[t]);
4678
+ const z = k ? k.length : 0;
4679
+ if (z > 0) {
4680
4680
  const t = i.getDynamics();
4681
4681
  let e = null;
4682
- for (let n = 0; n < O; n++) {
4682
+ for (let n = 0; n < z; n++) {
4683
4683
  const r = k[n].value, o = t.get(r);
4684
- o && (M || (M = i.getPrecedents().clone(V)), M.removeAll(o, Go), e || (e = new Map(t)), e.delete(r));
4684
+ o && (M || (M = i.getPrecedents().clone(P)), M.removeAll(o, Go), e || (e = new Map(t)), e.delete(r));
4685
4685
  }
4686
4686
  e && i.setDynamics(e);
4687
4687
  }
4688
- let P = [];
4689
- if (A || k) {
4690
- M || (M = i.getPrecedents().clone(V)), Po(N, M, A, k), F && Lo(M, F, null);
4691
- const t = A ? this._joinInserted(N, M, A, (t) => {
4688
+ let L = [];
4689
+ if (R || k) {
4690
+ M || (M = i.getPrecedents().clone(P)), Po(N, M, R, k), F && Lo(M, F, null);
4691
+ const t = R ? this._joinInserted(N, M, R, (t) => {
4692
4692
  E.push({
4693
4693
  colStart: t.colStart,
4694
4694
  rowStart: t.rowStart,
@@ -4697,7 +4697,7 @@ var wo = class extends Tt {
4697
4697
  scope: l
4698
4698
  });
4699
4699
  }) : null;
4700
- this._touchFormulas(k), this._touchFormulas(A), this._touchFormulas(F), this._touchFormulas(t);
4700
+ this._touchFormulas(k), this._touchFormulas(R), this._touchFormulas(F), this._touchFormulas(t);
4701
4701
  const e = F ? function(t, ...e) {
4702
4702
  const n = [];
4703
4703
  if (!t) return n;
@@ -4715,8 +4715,8 @@ var wo = class extends Tt {
4715
4715
  }
4716
4716
  }
4717
4717
  return n;
4718
- }(k, x, B) : k;
4719
- b(-1, e, A, S, g, _, (t, e, n, r) => {
4718
+ }(k, x, O) : k;
4719
+ B(-1, e, R, S, g, _, (t, e, n, r) => {
4720
4720
  E.push({
4721
4721
  colStart: t,
4722
4722
  rowStart: e,
@@ -4726,9 +4726,9 @@ var wo = class extends Tt {
4726
4726
  });
4727
4727
  }, this._notifyValues, C, this._notifyCalcStatus, p, f, !0, this._circularSpatial, this._calcStatusSpatial);
4728
4728
  }
4729
- if (M && i.setPrecedents(M), N && (A || k || F) && i.setFormulas(N), A) for (let t = 0; t < A.length; t++) {
4730
- const e = A[t];
4731
- P.push({
4729
+ if (M && i.setPrecedents(M), N && (R || k || F) && i.setFormulas(N), R) for (let t = 0; t < R.length; t++) {
4730
+ const e = R[t];
4731
+ L.push({
4732
4732
  colStart: e.colStart,
4733
4733
  rowStart: e.rowStart,
4734
4734
  colEnd: e.colEnd,
@@ -4738,7 +4738,7 @@ var wo = class extends Tt {
4738
4738
  }
4739
4739
  if (k) for (let t = 0; t < k.length; t++) {
4740
4740
  const e = k[t];
4741
- P.push({
4741
+ L.push({
4742
4742
  colStart: e.colStart,
4743
4743
  rowStart: e.rowStart,
4744
4744
  colEnd: e.colEnd,
@@ -4746,7 +4746,7 @@ var wo = class extends Tt {
4746
4746
  scope: l
4747
4747
  });
4748
4748
  }
4749
- return this._notifyCalcStatus.size() !== m && (i.getDeferred?.()?.noteRepaint(l), i.requestCalculateGrid(l)), E.length > 0 && i.markDirty(E), P;
4749
+ return this._notifyCalcStatus.size() !== m && (i.getDeferred?.()?.noteRepaint(l), i.requestCalculateGrid(l)), E.length > 0 && i.markDirty(E), L;
4750
4750
  }
4751
4751
  _rederivePrecedentsNow(t) {
4752
4752
  const e = this._container, n = e.getPrecedents().clone();
@@ -4784,7 +4784,7 @@ var wo = class extends Tt {
4784
4784
  const s = n[o];
4785
4785
  if (!a(s) || !d(s)) continue;
4786
4786
  h = !1;
4787
- const l = ot(c, s, (t, e, n, r) => {
4787
+ const l = Fe(c, s, (t, e, n, r) => {
4788
4788
  if (!a(t) || !a(e)) return;
4789
4789
  const o = {
4790
4790
  colStart: n.colStart,
@@ -4835,8 +4835,8 @@ var wo = class extends Tt {
4835
4835
  const e = t.data;
4836
4836
  this._values.setValues(e);
4837
4837
  const n = this._values.getAxis() === w.Axis.Column;
4838
- Ft(this._errorSpatial, e, n);
4839
- const r = Fe(e, n, this._gridId);
4838
+ D(this._errorSpatial, e, n);
4839
+ const r = _e(e, n, this._gridId);
4840
4840
  this._contentfulSpatial.load(r);
4841
4841
  }
4842
4842
  const e = this._gridId, n = this._container, r = n.getPrecedents(), o = n.getFormulas(), s = {
@@ -4848,9 +4848,9 @@ var wo = class extends Tt {
4848
4848
  if (c) {
4849
4849
  const t = c.length;
4850
4850
  for (let e = 0; e < t; e++) {
4851
- const t = c[e], n = t[0], r = pe(n, s).split(":")[0];
4851
+ const t = c[e], n = t[0], r = At(n, s).split(":")[0];
4852
4852
  d.add(r);
4853
- const o = we(t, s);
4853
+ const o = De(t, s);
4854
4854
  o && h.add(`${o.rowStart},${o.colStart}`);
4855
4855
  }
4856
4856
  }
@@ -4858,7 +4858,7 @@ var wo = class extends Tt {
4858
4858
  S.colIndex = 0, S.rowIndex = 0, S.gridId = e;
4859
4859
  const w = n.isLegacyIntersect();
4860
4860
  for (let t = 0; t < u; t++) {
4861
- const r = we(l[t], s);
4861
+ const r = De(l[t], s);
4862
4862
  r.scope = e;
4863
4863
  const o = r.value, i = r.rowStart, a = r.colStart;
4864
4864
  S.colIndex = a, S.rowIndex = i;
@@ -4872,7 +4872,7 @@ var wo = class extends Tt {
4872
4872
  for (let t = 0; t < E; t++) {
4873
4873
  const n = g[t];
4874
4874
  if (m.isError(n)) continue;
4875
- const o = fe(b[t], bo[t], Co[t]), s = o.$absColEnd, l = o.$absRowEnd, i = {
4875
+ const o = Se(b[t], bo[t], Co[t]), s = o.$absColEnd, l = o.$absRowEnd, i = {
4876
4876
  colStart: n.colStart,
4877
4877
  rowStart: n.rowStart,
4878
4878
  colEnd: n.colEnd + (s ? 0 : v),
@@ -4895,7 +4895,7 @@ var wo = class extends Tt {
4895
4895
  if (o.load(_), r.load(f), n.bumpCalcEpochs(!0), i.formulaInserts = this._formulaRecords(_), c) {
4896
4896
  const t = [], l = [], a = /* @__PURE__ */ new Map(), d = this._values, h = c.length;
4897
4897
  for (let n = 0; n < h; n++) {
4898
- const r = we(c[n], s), i = r.value ?? "dynamic", h = "error" === i, u = r.colStart, _ = r.rowStart;
4898
+ const r = De(c[n], s), i = r.value ?? "dynamic", h = "error" === i, u = r.colStart, _ = r.rowStart;
4899
4899
  Ro.colStart = u, Ro.rowStart = _, Ro.colEnd = u, Ro.rowEnd = _, Ro.scope = e;
4900
4900
  const f = o.search(Ro);
4901
4901
  if (1 !== f.length) continue;
@@ -4905,13 +4905,13 @@ var wo = class extends Tt {
4905
4905
  colEnd: w,
4906
4906
  rowEnd: E
4907
4907
  };
4908
- "fixed" === i && (sn(S).fixedRef = I, p.densify()), S.cachedValue = h ? m.BuiltIn.Spill : new Vt(g, d, I);
4908
+ "fixed" === i && (sn(S).fixedRef = I, p.densify()), S.cachedValue = h ? m.BuiltIn.Spill : new Ve(g, d, I);
4909
4909
  const y = {
4910
4910
  colStart: u,
4911
4911
  rowStart: _,
4912
4912
  colEnd: w,
4913
4913
  rowEnd: E,
4914
- value: new bt(I, 0, i)
4914
+ value: new Re(I, 0, i)
4915
4915
  };
4916
4916
  l.push(y), t.push({
4917
4917
  colStart: u,
@@ -4919,7 +4919,7 @@ var wo = class extends Tt {
4919
4919
  colEnd: w,
4920
4920
  rowEnd: E,
4921
4921
  value: i
4922
- }), St(a, S, I, -2);
4922
+ }), xt(a, S, I, -2);
4923
4923
  }
4924
4924
  if (this._spillSpatial.load(l), a.size > 0) {
4925
4925
  r.load(Array.from(a.values()).flat()), n.bumpCalcEpochs(!1);
@@ -4936,12 +4936,12 @@ var wo = class extends Tt {
4936
4936
  t.add(e), e.state |= Hn, e.block.calcOnLoad = !0;
4937
4937
  }, r = new Array(y);
4938
4938
  for (let t = 0; t < y; t++) {
4939
- const n = I[t], l = X(n, s);
4939
+ const n = I[t], l = nt(n, s);
4940
4940
  r[t] = { ...l };
4941
4941
  const i = o.search(l), a = i.length;
4942
4942
  for (let t = 0; t < a; t++) {
4943
4943
  const n = i[t];
4944
- V(n, l, e);
4944
+ ne(n, l, e);
4945
4945
  }
4946
4946
  }
4947
4947
  this._markDirtyRegionsNow(r), E = !0;
@@ -5019,7 +5019,7 @@ var wo = class extends Tt {
5019
5019
  }
5020
5020
  _toJSONNow(e) {
5021
5021
  let n = this._container.getFormulas().getSpatialAt(this._gridId)?.all(), r = n ? n.length : 0;
5022
- r > 0 && (n = j(n, t.Column, 2, Bo), n.sort(o.rowFirstRangeComparator)), r = n ? n.length : 0;
5022
+ r > 0 && (n = Ne(n, t.Column, 2, Bo), n.sort(o.rowFirstRangeComparator)), r = n ? n.length : 0;
5023
5023
  const s = this._hiddenRows, l = this._hiddenColumns, i = this._filtered;
5024
5024
  if (0 === r && !s && !l && !i) return null;
5025
5025
  const a = {};
@@ -5036,7 +5036,7 @@ var wo = class extends Tt {
5036
5036
  if (d > 0) {
5037
5037
  const t = this.getEntireCoords(), e = new Array(d);
5038
5038
  for (let n = 0; n < d; n++) {
5039
- const r = c[n], o = Ot(r, t);
5039
+ const r = c[n], o = Kt(r, t);
5040
5040
  e[n] = [o, r.value.getKind()];
5041
5041
  }
5042
5042
  a.formulaArray = e;
@@ -5046,7 +5046,7 @@ var wo = class extends Tt {
5046
5046
  if (h.size > 0) {
5047
5047
  const t = h.values();
5048
5048
  let e = t.next();
5049
- const n = this._values.getAxis() === w.Axis.Column, r = K(!0);
5049
+ const n = this._values.getAxis() === w.Axis.Column, r = tt(!0);
5050
5050
  for (; !e.done;) {
5051
5051
  const o = e.value;
5052
5052
  if (e = t.next(), o.gridId !== u) continue;
@@ -5070,14 +5070,14 @@ var wo = class extends Tt {
5070
5070
  }
5071
5071
  };
5072
5072
  f.isEmpty() || n(f.all());
5073
- const r = g.isEmpty() ? [] : g.all().filter((t) => t.value === Ge.CalcStatus.Working);
5074
- r.length > 0 && n(r), p.length > 0 && n(p), _ = j(e, t.Column, 2);
5073
+ const r = g.isEmpty() ? [] : g.all().filter((t) => t.value === Nt.CalcStatus.Working);
5074
+ r.length > 0 && n(r), p.length > 0 && n(p), _ = Ne(e, t.Column, 2);
5075
5075
  }
5076
5076
  const m = _ ? _.length : 0;
5077
5077
  if (m > 0) {
5078
5078
  const t = new Array(m);
5079
5079
  for (let e = 0; e < m; e++) {
5080
- const n = _[e], r = Ot(n, this.getEntireCoords());
5080
+ const n = _[e], r = Kt(n, this.getEntireCoords());
5081
5081
  t[e] = r;
5082
5082
  }
5083
5083
  a.volatile = t;
@@ -5191,25 +5191,25 @@ function Lo(t, e, n) {
5191
5191
  const s = [];
5192
5192
  for (let t = 0; t < o; t++) {
5193
5193
  const n = e[t], r = [], o = s.length;
5194
- H(n, s, r), s.length > o && (n.value.registeredPrecedents = s.slice(o));
5194
+ q(n, s, r), s.length > o && (n.value.registeredPrecedents = s.slice(o));
5195
5195
  }
5196
5196
  t.load(s);
5197
5197
  }
5198
5198
  To.fill(null, 0, 10);
5199
5199
  var $o = (t) => {
5200
5200
  let e = !1;
5201
- if (pt.forEachLeaf(t, (t, n, r, o) => {
5202
- if (e || t instanceof se) return;
5201
+ if (qt.forEachLeaf(t, (t, n, r, o) => {
5202
+ if (e || t instanceof k) return;
5203
5203
  let s = n + o - r;
5204
5204
  !0 === t.isIRepeatingList && (s = Math.min(s, n + t.getPeriod() - 1));
5205
- for (let r = n; !e && r <= s; r++) e = Pt(t.at(r));
5205
+ for (let r = n; !e && r <= s; r++) e = bt(t.at(r));
5206
5206
  }), !e) return t;
5207
5207
  const n = t.length, r = new Array(n);
5208
- for (let e = 0; e < n; e++) r[e] = Et(t.at(e));
5209
- return new L.ArrayList(r);
5208
+ for (let e = 0; e < n; e++) r[e] = Ht(t.at(e));
5209
+ return new ut.ArrayList(r);
5210
5210
  }, Ho = (t, e, n) => {
5211
5211
  const r = n?.fetchedFrom;
5212
- if (!t) return new re({
5212
+ if (!t) return new Rt({
5213
5213
  source: { buffer: e },
5214
5214
  fetchedFrom: r
5215
5215
  });
@@ -5250,18 +5250,18 @@ var $o = (t) => {
5250
5250
  }
5251
5251
  }
5252
5252
  _moved() {
5253
- Ut(), this._onMoved?.(this);
5253
+ oe(), this._onMoved?.(this);
5254
5254
  }
5255
5255
  _final() {
5256
5256
  const t = this._onFinal;
5257
5257
  this._onFinal = null, t?.(this);
5258
5258
  }
5259
- }, Ko = (t) => t, qo = (t, e) => Ee.fromJSON({
5259
+ }, Ko = (t) => t, qo = (t, e) => it.fromJSON({
5260
5260
  type: t,
5261
5261
  data: e
5262
- }), Wo = (t, e) => globalThis.fetch(t, e), Xo = () => {
5262
+ }), Wo = (t, e) => globalThis.fetch(t, e), Uo = () => {
5263
5263
  throw new Error("getFormulaContext() needs a workbook being calculated");
5264
- }, Uo = () => Promise.reject(/* @__PURE__ */ new Error("parseText() needs a workbook being calculated")), Jo = (t, e) => Ho(null, t, e), Yo = class {
5264
+ }, Xo = () => Promise.reject(/* @__PURE__ */ new Error("parseText() needs a workbook being calculated")), Jo = (t, e) => Ho(null, t, e), Zo = class {
5265
5265
  constructor(t, e, n, r = null, o = 100, s = Ko, l, i = null) {
5266
5266
  this._nextId = 1, this._calls = /* @__PURE__ */ new Map(), this._holders = !1, this._current = [], this._made = [], this._batch = /* @__PURE__ */ new Map(), this._states = /* @__PURE__ */ new Map(), this._moved = /* @__PURE__ */ new Set(), this._settleTimer = null, this._settledAt = 0, this._repaintGrids = /* @__PURE__ */ new Set(), this._settleDirty = [], this._serving = !1, this._external = !1, this.previous = void 0, this._waiters = /* @__PURE__ */ new Set(), this._scope = t, this._onCountsChange = i, this._heldAt = e, this._getRandom = n, this._onSettle = r, this._settleWindow = o, this._normalize = s;
5267
5267
  const a = this._moved;
@@ -5282,8 +5282,8 @@ var $o = (t) => {
5282
5282
  createRichData: l?.createRichData ?? qo,
5283
5283
  addResource: l?.addResource ?? Jo,
5284
5284
  fetch: l?.fetch ?? Wo,
5285
- getFormulaContext: l?.getFormulaContext ?? Xo,
5286
- parseText: l?.parseText ?? Uo
5285
+ getFormulaContext: l?.getFormulaContext ?? Uo,
5286
+ parseText: l?.parseText ?? Xo
5287
5287
  };
5288
5288
  const h = this._deferContext.fetch;
5289
5289
  this._reloadContext = {
@@ -5372,7 +5372,7 @@ var $o = (t) => {
5372
5372
  }, t);
5373
5373
  }
5374
5374
  newHolder(t, e) {
5375
- return this._holders = !0, new oe(t, e.calls, e.direct);
5375
+ return this._holders = !0, new $t(t, e.calls, e.direct);
5376
5376
  }
5377
5377
  defer(t, e, n = null, r = !1) {
5378
5378
  const o = this._scope, s = o.deferOrdinal++;
@@ -5415,12 +5415,12 @@ var $o = (t) => {
5415
5415
  try {
5416
5416
  o = n(e, t);
5417
5417
  } catch (t) {
5418
- Zo(e, t);
5418
+ Qo(e, t);
5419
5419
  continue;
5420
5420
  } finally {
5421
5421
  this._setCurrent(null);
5422
5422
  }
5423
- o && "function" == typeof o.then && o.then(void 0, (t) => Zo(e, t));
5423
+ o && "function" == typeof o.then && o.then(void 0, (t) => Qo(e, t));
5424
5424
  }
5425
5425
  }
5426
5426
  }
@@ -5448,11 +5448,11 @@ var $o = (t) => {
5448
5448
  const e = this._scope, n = e.node;
5449
5449
  if (!n || !this._holders || !e.gridId) return;
5450
5450
  let r = this._heldAt(e.gridId, e.rowIndex, e.colIndex);
5451
- return null === r && Pt(n.cachedValue) && (r = n.cachedValue), null !== r ? r.calls[t] : void 0;
5451
+ return null === r && bt(n.cachedValue) && (r = n.cachedValue), null !== r ? r.calls[t] : void 0;
5452
5452
  }
5453
- }, Zo = (t, e) => {
5453
+ }, Qo = (t, e) => {
5454
5454
  for (const n of t) n.isOpen() && n.reject(e);
5455
- }, Qo = Symbol("-0"), ts = async (t, e) => {
5455
+ }, Yo = Symbol("-0"), ts = async (t, e) => {
5456
5456
  const n = /* @__PURE__ */ new Map(), r = [], o = [];
5457
5457
  for (const e of t) {
5458
5458
  const t = e.payload;
@@ -5468,7 +5468,7 @@ var $o = (t) => {
5468
5468
  }
5469
5469
  continue;
5470
5470
  }
5471
- const s = Object.is(t, -0) ? Qo : t, l = n.get(s);
5471
+ const s = Object.is(t, -0) ? Yo : t, l = n.get(s);
5472
5472
  if (l) l.push(e);
5473
5473
  else {
5474
5474
  const r = {
@@ -5542,7 +5542,7 @@ var $o = (t) => {
5542
5542
  }
5543
5543
  _grow() {
5544
5544
  const t = this._keys, e = this._values, n = this._order, r = this.size, o = Math.max(64, 2 * (this._mask + 1));
5545
- this._keys = new Float64Array(o).fill(-1), this._values = ht(o), this._order = new Int32Array(o), this._mask = o - 1;
5545
+ this._keys = new Float64Array(o).fill(-1), this._values = Jt(o), this._order = new Int32Array(o), this._mask = o - 1;
5546
5546
  for (let o = 0; o < r; o++) {
5547
5547
  const r = t[n[o]], s = Math.floor(r / ns), l = this._slotOf(s, r - s * ns, r);
5548
5548
  this._keys[l] = r, this._values[l] = e[n[o]], this._order[o] = l;
@@ -5936,7 +5936,7 @@ var is = {
5936
5936
  const e = this.getRuns(t ? { bounds: t } : void 0);
5937
5937
  let n = e.next();
5938
5938
  if (n.done) return null;
5939
- const r = new It.Builder();
5939
+ const r = new gt.Builder();
5940
5940
  for (; !n.done;) r.pushMultipleAt(n.value[0], n.value[1], n.value[2]), n = e.next();
5941
5941
  return r.build();
5942
5942
  }
@@ -6229,7 +6229,7 @@ var Es = class {
6229
6229
  if (0 !== (t.state & qn)) return;
6230
6230
  t.state = t.state & ~Kn | $n | sr | ir;
6231
6231
  const e = sn(t);
6232
- e.cycleGroup = this._taintGroup, e.demandValue = Zs(t), this._addCircular(t);
6232
+ e.cycleGroup = this._taintGroup, e.demandValue = Qs(t), this._addCircular(t);
6233
6233
  };
6234
6234
  }
6235
6235
  execute(t, e, n) {
@@ -6284,7 +6284,7 @@ var Es = class {
6284
6284
  };
6285
6285
  const b = /* @__PURE__ */ new Map();
6286
6286
  this._addDynamicPrecedent = (t, e, n) => {
6287
- t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn), St(b, t, e, n));
6287
+ t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn), xt(b, t, e, n));
6288
6288
  };
6289
6289
  const R = /* @__PURE__ */ new Map(), A = (t, e) => {
6290
6290
  (function(t, e, n, r) {
@@ -6292,7 +6292,7 @@ var Es = class {
6292
6292
  let o, s, l, i = Rs, a = [];
6293
6293
  const c = /* @__PURE__ */ new Set(), d = () => {
6294
6294
  const t = o.build();
6295
- t && t.tuples && (l.values.setValues(t.tuples), Ft(l.errorSpatial, t.tuples, r));
6295
+ t && t.tuples && (l.values.setValues(t.tuples), D(l.errorSpatial, t.tuples, r));
6296
6296
  const e = s.done(!0);
6297
6297
  for (let t = 0; t < e.length; t++) {
6298
6298
  const n = e[t];
@@ -6318,7 +6318,7 @@ var Es = class {
6318
6318
  t.length = e, t.sort(Ns);
6319
6319
  for (let h = 0; h < e; h++) {
6320
6320
  const e = t[h], u = e.colIndex, _ = e.rowIndex, f = e.gridId;
6321
- f || console.log("nodeGridId is null", e), f !== i && (i !== Rs && d(), o = new It.Builder(Is), s = K(r), i = f, l = n(f));
6321
+ f || console.log("nodeGridId is null", e), f !== i && (i !== Rs && d(), o = new gt.Builder(Is), s = tt(r), i = f, l = n(f));
6322
6322
  const g = u, p = _, m = e.cachedValue;
6323
6323
  m?.isIRange || (o.pushAt(g, p, m), s.append(g, p));
6324
6324
  const S = e.block, w = e.numFmt;
@@ -6339,7 +6339,7 @@ var Es = class {
6339
6339
  }
6340
6340
  });
6341
6341
  }
6342
- } else null !== w && (l.formatsConflating || (l.formatsConflating = K(r)), l.formatsConflating.append(g, p, w));
6342
+ } else null !== w && (l.formatsConflating || (l.formatsConflating = tt(r)), l.formatsConflating.append(g, p, w));
6343
6343
  }
6344
6344
  d();
6345
6345
  })(t, e, _, !0);
@@ -6409,7 +6409,7 @@ var Es = class {
6409
6409
  if (r?.isIRange && r.size > 1) {
6410
6410
  if (e.uncalculated) return;
6411
6411
  const o = t.rowIndex, s = t.colIndex;
6412
- return new Vt(this._container.getRuntime(), n.getValues().clone(), {
6412
+ return new Ve(this._container.getRuntime(), n.getValues().clone(), {
6413
6413
  rowStart: o,
6414
6414
  colStart: s,
6415
6415
  rowEnd: o + r.getRowCount() - 1,
@@ -6427,7 +6427,7 @@ var Es = class {
6427
6427
  const o = n.endEvaluation(), s = o.calls;
6428
6428
  if (0 === s.length) return e;
6429
6429
  for (let e = 0; e < s.length; e++) if (s[e].isOpen()) {
6430
- t.state |= Qn | er;
6430
+ t.state |= Yn | er;
6431
6431
  break;
6432
6432
  }
6433
6433
  const l = n.newHolder(e, o);
@@ -6483,21 +6483,21 @@ var Es = class {
6483
6483
  }
6484
6484
  _markDownstream(t) {
6485
6485
  const e = this._container.getScope().node;
6486
- e && 0 === (e.state & qn) && (e.state = e.state & ~qn | ir, sn(e).cycleGroup = this._resolveGroup(Ys(t)), this._addCircular(e), this._iterate && (pl[this._iterDownstreamLength++] = e));
6486
+ e && 0 === (e.state & qn) && (e.state = e.state & ~qn | ir, sn(e).cycleGroup = this._resolveGroup(Zs(t)), this._addCircular(e), this._iterate && (pl[this._iterDownstreamLength++] = e));
6487
6487
  }
6488
6488
  _onMemberRead(t) {
6489
6489
  const e = t.state;
6490
6490
  if ((e & qn) === lr) {
6491
6491
  if (this._openGroups.has(this._resolveGroup(t.ext.cycleGroup))) return void (0 === (e & jn) && (t.state |= jn, _l[this._iterHitsLength++] = t));
6492
- } else if (this._sweeping && 0 === (e & Un) && void 0 !== t.ext.demandValue) {
6492
+ } else if (this._sweeping && 0 === (e & Xn) && void 0 !== t.ext.demandValue) {
6493
6493
  const e = this._container.getScope().node;
6494
- if (e && ((e.state & qn) === lr || 0 !== (e.state & Un))) return void this._sweepAlong(t, e);
6494
+ if (e && ((e.state & qn) === lr || 0 !== (e.state & Xn))) return void this._sweepAlong(t, e);
6495
6495
  }
6496
6496
  this._markDownstream(t);
6497
6497
  }
6498
6498
  _sweepAlong(t, e) {
6499
6499
  const n = t.ext, r = e.ext, o = this._resolveGroup(r.cycleGroup);
6500
- (e.state & qn) === lr && this._resolveGroup(n.cycleGroup) === o ? (t.state = t.state & ~qn | lr, n.cycleGroup = o, null === r.cycleNext && (r.cycleNext = t)) : t.state |= Un, this._addIterMember(t, n.demandValue);
6500
+ (e.state & qn) === lr && this._resolveGroup(n.cycleGroup) === o ? (t.state = t.state & ~qn | lr, n.cycleGroup = o, null === r.cycleNext && (r.cycleNext = t)) : t.state |= Xn, this._addIterMember(t, n.demandValue);
6501
6501
  }
6502
6502
  _addIterMember(t, e) {
6503
6503
  let n = this._iterMembersLength++;
@@ -6608,7 +6608,7 @@ var Es = class {
6608
6608
  const e = r.deferCount;
6609
6609
  o = n.finalizeValueForCell(n.evaluateAt(t.rowIndex, t.colIndex)), r.deferCount !== e && (o = this._takeDeferred(t, o));
6610
6610
  } catch (e) {
6611
- if (!(e instanceof Ie)) throw e;
6611
+ if (!(e instanceof ve)) throw e;
6612
6612
  o = t.cachedValue ?? null;
6613
6613
  }
6614
6614
  return this._fitCell(e, o);
@@ -6648,9 +6648,9 @@ var Es = class {
6648
6648
  if (null !== m && null !== m.getShadowOf()) return void vs(_, n, f);
6649
6649
  const S = g.getAxis() === w.Axis.Column, E = S ? w.Axis.Column : w.Axis.Row, I = qs, y = Ws;
6650
6650
  for (let t = 0; t < _.length; t++) {
6651
- const n = _[t], r = S ? n.colStart : n.rowStart, o = S ? n.colEnd : n.rowEnd, s = S ? n.rowStart : n.colStart, l = S ? n.rowEnd - n.rowStart + 1 : n.colEnd - n.colStart + 1, i = new ne([e], l), a = new Array(o - r + 1);
6651
+ const n = _[t], r = S ? n.colStart : n.rowStart, o = S ? n.colEnd : n.rowEnd, s = S ? n.rowStart : n.colStart, l = S ? n.rowEnd - n.rowStart + 1 : n.colEnd - n.colStart + 1, i = new j([e], l), a = new Array(o - r + 1);
6652
6652
  for (let t = r; t <= o; t++) a[t - r] = [t, [[s, i]]];
6653
- g.setValues(a), z(p, n), Ft(p, a, S);
6653
+ g.setValues(a), Et(p, n), D(p, a, S);
6654
6654
  const c = {
6655
6655
  colStart: n.colStart,
6656
6656
  rowStart: n.rowStart,
@@ -6660,19 +6660,19 @@ var Es = class {
6660
6660
  };
6661
6661
  I.push({
6662
6662
  ...c,
6663
- value: new Yt(c, E)
6663
+ value: new W(c, E)
6664
6664
  }), y.push(c);
6665
6665
  }
6666
6666
  n.contentfulSpatial.insertAllNonOverlapping(I), n.notifyValues.insertAllNonOverlapping(y), I.length = 0, y.length = 0, o.setBlankShared(_), this._dirtyBlankReaders(f, _, u === e ? h : null);
6667
6667
  }
6668
6668
  _dirtyBlankReaders(t, e, n) {
6669
6669
  if (null !== n && $r(e, n)) return;
6670
- const r = this._container.getPrecedents(), o = Us, s = Js;
6670
+ const r = this._container.getPrecedents(), o = Xs, s = Js;
6671
6671
  s.scope = t;
6672
6672
  for (let t = 0; t < e.length; t++) null === n ? o.push(e[t]) : Hr(e[t], n, o);
6673
6673
  for (let e = 0; e < o.length; e++) {
6674
6674
  const n = o[e];
6675
- s.colStart = n.colStart, s.rowStart = n.rowStart, s.colEnd = n.colEnd, s.rowEnd = n.rowEnd, 0 !== r.search(s).length && (this._fallbackDirty ?? (this._fallbackDirty = new Wt())).insertNonOverlapping({
6675
+ s.colStart = n.colStart, s.rowStart = n.rowStart, s.colEnd = n.colEnd, s.rowEnd = n.rowEnd, 0 !== r.search(s).length && (this._fallbackDirty ?? (this._fallbackDirty = new v())).insertNonOverlapping({
6676
6676
  colStart: n.colStart,
6677
6677
  rowStart: n.rowStart,
6678
6678
  colEnd: n.colEnd,
@@ -6689,7 +6689,7 @@ var Es = class {
6689
6689
  xs(t, n.blank, e);
6690
6690
  const r = t.getDemandedBlank();
6691
6691
  if (0 === r.length) return;
6692
- const o = this._fallbackDirty ?? (this._fallbackDirty = new Wt()), s = t.gridId, l = Xs;
6692
+ const o = this._fallbackDirty ?? (this._fallbackDirty = new v()), s = t.gridId, l = Us;
6693
6693
  for (let t = 0; t < r.length; t++) {
6694
6694
  const e = r[t];
6695
6695
  l.push({
@@ -6708,7 +6708,7 @@ var Es = class {
6708
6708
  if (null === n) return;
6709
6709
  const r = n.blank;
6710
6710
  if (0 === r.length) return;
6711
- const o = this._fallbackDirty ?? (this._fallbackDirty = new Wt()), s = t.gridId, l = Xs;
6711
+ const o = this._fallbackDirty ?? (this._fallbackDirty = new v()), s = t.gridId, l = Us;
6712
6712
  for (let t = 0; t < r.length; t++) {
6713
6713
  const e = r[t];
6714
6714
  l.push({
@@ -6798,12 +6798,12 @@ var Es = class {
6798
6798
  }
6799
6799
  for (let e = 0; e < t; e++) {
6800
6800
  const t = c[e];
6801
- 0 === (t.state & (Kn | Yn)) && (t.state |= Jn | Yn, i[a++] = t);
6801
+ 0 === (t.state & (Kn | Zn)) && (t.state |= Jn | Zn, i[a++] = t);
6802
6802
  }
6803
6803
  const o = d.nodes, s = d.count;
6804
6804
  for (let t = 0; t < s; t++) {
6805
6805
  const e = o[t];
6806
- 0 === (e.state & Kn) && (e.state = e.state & ~Jn | Yn, i[a++] = e);
6806
+ 0 === (e.state & Kn) && (e.state = e.state & ~Jn | Zn, i[a++] = e);
6807
6807
  }
6808
6808
  continue;
6809
6809
  }
@@ -6821,7 +6821,7 @@ var Es = class {
6821
6821
  continue;
6822
6822
  }
6823
6823
  t.state = -66305 & t.state | sr;
6824
- const n = Zs(t);
6824
+ const n = Qs(t);
6825
6825
  sn(t).demandValue = n, this._pushDemand(t, n);
6826
6826
  const r = t.block;
6827
6827
  r.representative === t && r.isBlankAware(this._passCycleId) && this._fallbackBlank(r, !1);
@@ -6831,13 +6831,13 @@ var Es = class {
6831
6831
  }
6832
6832
  if (d instanceof cn) {
6833
6833
  e.state = -69377 & e.state | sr | ir;
6834
- const t = Zs(e), n = sn(e);
6835
- n.cycleGroup = Ys(d.node), n.demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1), a--;
6834
+ const t = Qs(e), n = sn(e);
6835
+ n.cycleGroup = Zs(d.node), n.demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1), a--;
6836
6836
  continue;
6837
6837
  }
6838
6838
  if (this._iterate || (e.state & qn) !== ir) sn(e).demandValue = r, this._pushDemand(e, r), h && this._finalizeRepresentative(e, r, t(e.gridId), !1);
6839
6839
  else {
6840
- const t = Zs(e);
6840
+ const t = Qs(e);
6841
6841
  sn(e).demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1);
6842
6842
  }
6843
6843
  if (e.state = -66305 & e.state | sr, a--, this._openGroups.size > 0 && (e.state & qn) === lr) {
@@ -6986,11 +6986,11 @@ var Es = class {
6986
6986
  return !1;
6987
6987
  }
6988
6988
  _addCircular(t) {
6989
- 0 === (t.state & Xn) && (t.state |= Xn, dl[this._circularNodesLength++] = t);
6989
+ 0 === (t.state & Un) && (t.state |= Un, dl[this._circularNodesLength++] = t);
6990
6990
  }
6991
6991
  _resetCircular() {
6992
6992
  const t = this._circularNodesLength;
6993
- for (let e = 0; e < t; e++) dl[e].state &= ~Xn;
6993
+ for (let e = 0; e < t; e++) dl[e].state &= ~Un;
6994
6994
  this._circularNodesLength = 0;
6995
6995
  }
6996
6996
  _trackCircular(t, e, n, r, o) {
@@ -7005,7 +7005,7 @@ var Es = class {
7005
7005
  const e = this._cycleOf(i), n = l === lr;
7006
7006
  (n ? e.members : e.downstream).add(t), a = e.getEntry(n);
7007
7007
  }
7008
- s.shownGroup = i, t.state = t.state & ~Wn | l << 2, e.circularConflating || (e.circularConflating = K(o)), e.circularConflating.append(n, r, a);
7008
+ s.shownGroup = i, t.state = t.state & ~Wn | l << 2, e.circularConflating || (e.circularConflating = tt(o)), e.circularConflating.append(n, r, a);
7009
7009
  }
7010
7010
  _cycleOf(t) {
7011
7011
  let e = this._cycles.get(t);
@@ -7382,218 +7382,218 @@ var Es = class {
7382
7382
  const l = Ds(), i = this._container, a = this._context, c = i.getScope(), d = a.getRuntime(), h = i.getDeferred?.() ?? null, u = s.values, _ = s.length;
7383
7383
  zl = this._passCycleId, Ll = this._passMarkId;
7384
7384
  const f = el;
7385
- let g, p, S, E, I, y, v, x, C, b, R, A, k, N = 0;
7386
- const M = /* @__PURE__ */ new Map();
7387
- this._overlays = M;
7388
- const F = (t) => this._overlayFor(t), D = (t) => {
7389
- R = i.getGrid(t), b = R.getEntireCoords.bind(R), p = e(t), S = p.gridId, k = F(t), E = p.values, A = p.errorSpatial, I = p.contentfulSpatial, y = p.spillSpatial, v = p.notifyValues, x = p.notifySpillsInsert, C = p.notifySpillsRemove, p.notifyFormats, p.notifyCalcStatus, c.gridId = S;
7390
- }, T = w.Axis.Column, G = T === w.Axis.Column, B = () => {
7391
- if (N > 0) {
7392
- n(f, N), N = 0;
7393
- for (const t of M.values()) t.reset();
7385
+ let g, p, S, E, I, y, x, C, b, R, A, k, N, M = 0;
7386
+ const F = /* @__PURE__ */ new Map();
7387
+ this._overlays = F;
7388
+ const T = (t) => this._overlayFor(t), G = (t) => {
7389
+ A = i.getGrid(t), R = A.getEntireCoords.bind(A), p = e(t), S = p.gridId, N = T(t), E = p.values, k = p.errorSpatial, I = p.contentfulSpatial, y = p.spillSpatial, x = p.notifyValues, C = p.notifySpillsInsert, b = p.notifySpillsRemove, p.notifyFormats, p.notifyCalcStatus, c.gridId = S;
7390
+ }, B = w.Axis.Column, V = B === w.Axis.Column, O = () => {
7391
+ if (M > 0) {
7392
+ n(f, M), M = 0;
7393
+ for (const t of F.values()) t.reset();
7394
7394
  void 0 !== S && (p = e(S));
7395
7395
  }
7396
7396
  };
7397
- this._flush = B;
7398
- const V = this._exceptTables;
7399
- if (V) for (let t = 0; t < _; t++) {
7397
+ this._flush = O;
7398
+ const P = this._exceptTables;
7399
+ if (P) for (let t = 0; t < _; t++) {
7400
7400
  const e = u[t];
7401
7401
  e.block.hasDataTable() && (e.state = e.state & ~Kn | sr, this._skippedTables.add(e));
7402
7402
  }
7403
- let O = 0;
7404
- for (; O < _;) try {
7405
- for (; O < _; O++) {
7406
- const n = u[O], s = n.colIndex, l = n.rowIndex;
7403
+ let z = 0;
7404
+ for (; z < _;) try {
7405
+ for (; z < _; z++) {
7406
+ const n = u[z], s = n.colIndex, l = n.rowIndex;
7407
7407
  if (1 & n.state && t === n.cycleId) {
7408
7408
  n.state &= -2;
7409
7409
  continue;
7410
7410
  }
7411
- if (V && n.block.hasDataTable()) continue;
7411
+ if (P && n.block.hasDataTable()) continue;
7412
7412
  const a = n.gridId;
7413
- a !== S && D(a);
7414
- const _ = n.block, w = _.representative === n && _.isBlankAware(t), M = n.cachedValue;
7413
+ a !== S && G(a);
7414
+ const _ = n.block, w = _.representative === n && _.isBlankAware(t), F = n.cachedValue;
7415
7415
  let L, $, H = !1;
7416
- "object" == typeof M && null !== M && (M.isIRange ? L = M : m.isError(M, m.Code.Spill) && ($ = M, H = !0));
7416
+ "object" == typeof F && null !== F && (F.isIRange ? L = F : m.isError(F, m.Code.Spill) && ($ = F, H = !0));
7417
7417
  const j = 0 !== (n.state & $n);
7418
- j && (n.state & Kn) !== sr && (B(), this.doDemandEvaluate(t, e, this._demandBatch, B), c.gridId = a);
7419
- const q = j ? null : an(n), W = n.inputsAt;
7420
- if (q && W >= 0) {
7421
- const t = On(), e = q.length;
7418
+ j && (n.state & Kn) !== sr && (O(), this.doDemandEvaluate(t, e, this._demandBatch, O), c.gridId = a);
7419
+ const K = j ? null : an(n), q = n.inputsAt;
7420
+ if (K && q >= 0) {
7421
+ const t = On(), e = K.length;
7422
7422
  for (let n = 0; n < e; n++) {
7423
- const e = q[n];
7423
+ const e = K[n];
7424
7424
  if (m.isError(e)) {
7425
- t[W + n] = e;
7425
+ t[q + n] = e;
7426
7426
  continue;
7427
7427
  }
7428
7428
  const r = e.colStart, o = e.rowStart, s = e.colEnd, l = e.rowEnd;
7429
7429
  if (l !== o || r !== s) {
7430
- let a = e.scope, c = E, h = b, u = k, _ = R;
7431
- a && a !== S && (_ = i.getGrid(a), _ && (c = _.getValues(), u = F(a), h = _.getEntireCoords.bind(_)));
7430
+ let a = e.scope, c = E, h = R, u = N, _ = A;
7431
+ a && a !== S && (_ = i.getGrid(a), _ && (c = _.getValues(), u = T(a), h = _.getEntireCoords.bind(_)));
7432
7432
  let f = _;
7433
7433
  u.intersects(o, r, l, s) && (c = u, f = u);
7434
- const g = new P(d, c, { ...e }, null, h, i.resolveScope);
7435
- g._setErrorIndex(f), t[W + n] = g;
7434
+ const g = new ae(d, c, { ...e }, null, h, i.resolveScope);
7435
+ g._setErrorIndex(f), t[q + n] = g;
7436
7436
  }
7437
7437
  }
7438
7438
  }
7439
- q && null !== h && 0 !== h.getOpenCount() && 0 === (n.state & Zn) && jl(q, S, i) && (n.state |= Zn);
7440
- const X = G ? s : l, U = G ? l : s;
7439
+ K && null !== h && 0 !== h.getOpenCount() && 0 === (n.state & Qn) && jl(K, S, i) && (n.state |= Qn);
7440
+ const U = V ? s : l, X = V ? l : s;
7441
7441
  c.node = n, c.colIndex = s, c.rowIndex = l, c.drawIndex = 0;
7442
7442
  const J = _.formula;
7443
- let Y, Z = null, Q = !1;
7444
- const tt = 4 & n.state ? 0 !== (n.state & nr) ? Ge.CalcStatus.Working : Ge.CalcStatus.Waiting : 0;
7445
- let et = tt;
7446
- const nt = r ? 0 : tt, rt = n.ext;
7447
- if (j && !this._iterate && 0 !== (n.state & qn)) null !== rt && (rt.demandValue = void 0), Y = Zs(n), et = 0;
7443
+ let Z, Q = null, Y = !1;
7444
+ const et = 4 & n.state ? 0 !== (n.state & nr) ? Nt.CalcStatus.Working : Nt.CalcStatus.Waiting : 0;
7445
+ let nt = et;
7446
+ const rt = r ? 0 : et, ot = n.ext;
7447
+ if (j && !this._iterate && 0 !== (n.state & qn)) null !== ot && (ot.demandValue = void 0), Z = Qs(n), nt = 0;
7448
7448
  else {
7449
7449
  if (j) {
7450
- const t = null !== rt ? rt.demandValue : void 0;
7451
- null !== rt && (rt.demandValue = void 0), Y = void 0 === t ? 0 : t;
7450
+ const t = null !== ot ? ot.demandValue : void 0;
7451
+ null !== ot && (ot.demandValue = void 0), Z = void 0 === t ? 0 : t;
7452
7452
  } else {
7453
7453
  if (n.state = n.state & ~Kn | or, c.perCellRead = !1, c.positionRead = !1, 0 !== (n.state & tr)) {
7454
7454
  n.state &= ~tr;
7455
7455
  const t = this._settlePass ? bs(E, y, l, s) : null;
7456
7456
  if (null !== t && t.direct) {
7457
- Q = !0, n.state &= -2621441;
7458
- const e = Et(t);
7459
- e?.isIRange ? (Y = J.finalizeValueForCell(e), Z = t) : Y = t;
7457
+ Y = !0, n.state &= -2621441;
7458
+ const e = Ht(t);
7459
+ e?.isIRange ? (Z = J.finalizeValueForCell(e), Q = t) : Z = t;
7460
7460
  }
7461
7461
  }
7462
- if (!Q) {
7462
+ if (!Y) {
7463
7463
  this._planStats.evaluated++, n.state &= -2621505;
7464
7464
  const t = c.deferCount;
7465
- Y = J.evaluateAt(l, s), Y = J.finalizeValueForCell(Y), (c.perCellRead || c.positionRead) && (n.block.positionRead = !0), c.deferCount !== t && (Y = this._takeDeferred(n, Y), Z = this._spillHolder, this._spillHolder = null);
7465
+ Z = J.evaluateAt(l, s), Z = J.finalizeValueForCell(Z), (c.perCellRead || c.positionRead) && (n.block.positionRead = !0), c.deferCount !== t && (Z = this._takeDeferred(n, Z), Q = this._spillHolder, this._spillHolder = null);
7466
7466
  }
7467
7467
  }
7468
- et = 0 !== (n.state & er) ? Ge.CalcStatus.Working : 0 !== (n.state & (Zn | Qn)) ? Ge.CalcStatus.Waiting : 0, 0 !== et && (n.state |= Qn);
7468
+ nt = 0 !== (n.state & er) ? Nt.CalcStatus.Working : 0 !== (n.state & (Qn | Yn)) ? Nt.CalcStatus.Waiting : 0, 0 !== nt && (n.state |= Yn);
7469
7469
  }
7470
- let ot;
7471
- (n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768), et !== nt && (0 === et ? n.state &= ~(4 | nr) : et === Ge.CalcStatus.Working ? n.state |= 4 | nr : n.state = (4 | n.state) & ~nr, p.calcStatusConflating || (p.calcStatusConflating = K(G)), p.calcStatusConflating.append(X, U, 0 !== et && et)), j && k.takeDemand(l, s);
7472
- const st = n.ext, lt = null !== st ? st.fixedRef : null;
7473
- if (L || $ || lt) {
7474
- Qs.colStart = s, Qs.rowStart = l, Qs.colEnd = s, Qs.rowEnd = l;
7475
- const t = y.search(Qs);
7476
- for (let e = 0; !ot && e < t.length; e++) {
7470
+ let st;
7471
+ (n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768), nt !== rt && (0 === nt ? n.state &= ~(4 | nr) : nt === Nt.CalcStatus.Working ? n.state |= 4 | nr : n.state = (4 | n.state) & ~nr, p.calcStatusConflating || (p.calcStatusConflating = tt(V)), p.calcStatusConflating.append(U, X, 0 !== nt && nt)), j && N.takeDemand(l, s);
7472
+ const lt = n.ext, it = null !== lt ? lt.fixedRef : null;
7473
+ if (L || $ || it) {
7474
+ Ys.colStart = s, Ys.rowStart = l, Ys.colEnd = s, Ys.rowEnd = l;
7475
+ const t = y.search(Ys);
7476
+ for (let e = 0; !st && e < t.length; e++) {
7477
7477
  const n = t[e];
7478
- n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (ot = n);
7478
+ n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (st = n);
7479
7479
  }
7480
- if (ot && (y.remove(ot, Go), !ot || !ot.value.getError())) {
7480
+ if (st && (y.remove(st, Go), !st || !st.value.getError())) {
7481
7481
  const t = {
7482
- ...o.sanitizeRange(ot),
7483
- scope: ot.scope,
7482
+ ...o.sanitizeRange(st),
7483
+ scope: st.scope,
7484
7484
  value: null
7485
7485
  };
7486
- I.insertNonOverlapping(t), E.delete(t), z(A, t);
7486
+ I.insertNonOverlapping(t), E.delete(t), Et(k, t);
7487
7487
  }
7488
7488
  }
7489
- Y = this._fitCell(_, Y);
7490
- let it = 1, at = 1;
7491
- const ct = Y, dt = "object" == typeof Y && null !== Y, ht = dt && ct.isIRange;
7492
- let ut, _t = dt && m.isError(Y, m.Code.Spill);
7493
- if (lt) {
7494
- it = lt.colEnd - lt.colStart + 1, at = lt.rowEnd - lt.rowStart + 1;
7489
+ Z = this._fitCell(_, Z);
7490
+ let at = 1, ct = 1;
7491
+ const dt = Z, ht = "object" == typeof Z && null !== Z, ut = ht && dt.isIRange;
7492
+ let _t, ft = ht && m.isError(Z, m.Code.Spill);
7493
+ if (it) {
7494
+ at = it.colEnd - it.colStart + 1, ct = it.rowEnd - it.rowStart + 1;
7495
7495
  const e = {
7496
- colStart: lt.colStart,
7497
- rowStart: lt.rowStart,
7498
- colEnd: lt.colEnd,
7499
- rowEnd: lt.rowEnd,
7496
+ colStart: it.colStart,
7497
+ rowStart: it.rowStart,
7498
+ colEnd: it.colEnd,
7499
+ rowEnd: it.rowEnd,
7500
7500
  scope: a
7501
- }, r = dn(Y, e, G)?.tuples;
7502
- E.delete(e), r && E.setValues(r), z(A, e), Ft(A, r, G), ut = {
7501
+ }, r = dn(Z, e, V)?.tuples;
7502
+ E.delete(e), r && E.setValues(r), Et(k, e), D(k, r, V), _t = {
7503
7503
  ...e,
7504
- value: new bt(e, t, "fixed", null, Z)
7505
- }, y.insert(ut), i.addDynamicPrecedent(n, e, -2), I.insertNonOverlapping({
7504
+ value: new Re(e, t, "fixed", null, Q)
7505
+ }, y.insert(_t), i.addDynamicPrecedent(n, e, -2), I.insertNonOverlapping({
7506
7506
  ...e,
7507
- value: new Yt(e, T)
7507
+ value: new W(e, B)
7508
7508
  });
7509
- } else if (ht && ct.size > 1) {
7510
- it = ct.getColumnCount(), at = ct.getRowCount();
7509
+ } else if (ut && dt.size > 1) {
7510
+ at = dt.getColumnCount(), ct = dt.getRowCount();
7511
7511
  const e = vl(n), r = null !== e ? l - e.rows : l, c = null !== e ? s - e.columns : s, d = {
7512
7512
  colStart: c,
7513
7513
  rowStart: r,
7514
- colEnd: c + it - 1,
7515
- rowEnd: r + at - 1,
7514
+ colEnd: c + at - 1,
7515
+ rowEnd: r + ct - 1,
7516
7516
  scope: a
7517
- }, h = b(), u = !o.isRangeWithinRange(d, h);
7518
- if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)), _t = u, !_t) {
7517
+ }, h = R(), u = !o.isRangeWithinRange(d, h);
7518
+ if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)), ft = u, !ft) {
7519
7519
  const t = I.search(d);
7520
- if (_t = t.length > 1, !_t && 1 === t.length) {
7520
+ if (ft = t.length > 1, !ft && 1 === t.length) {
7521
7521
  const e = t[0], n = o.intersectRanges(d, e, Ps);
7522
- !n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (_t = !0);
7522
+ !n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (ft = !0);
7523
7523
  }
7524
7524
  }
7525
7525
  let _, f;
7526
- if (_t) Y = m.BuiltIn.Spill, it = 1, at = 1, _ = [[X, [[U, [Y]]]]], E.setValues(_), Ft(A, _, G), f = {
7526
+ if (ft) Z = m.BuiltIn.Spill, at = 1, ct = 1, _ = [[U, [[X, [Z]]]]], E.setValues(_), D(k, _, V), f = {
7527
7527
  colStart: s,
7528
7528
  rowStart: l,
7529
7529
  colEnd: s,
7530
7530
  rowEnd: l
7531
7531
  };
7532
7532
  else {
7533
- const t = hn(ct, G ? c : r, G ? r : c);
7534
- t && (_ = t.tuples), E.delete(d), _ && E.setValues(_), z(A, d), Ft(A, _, G), f = d;
7533
+ const t = hn(dt, V ? c : r, V ? r : c);
7534
+ t && (_ = t.tuples), E.delete(d), _ && E.setValues(_), Et(k, d), D(k, _, V), f = d;
7535
7535
  }
7536
- const g = _t ? {
7536
+ const g = ft ? {
7537
7537
  colStart: s,
7538
7538
  rowStart: l,
7539
7539
  colEnd: s,
7540
7540
  rowEnd: l,
7541
7541
  scope: a
7542
7542
  } : d;
7543
- ut = {
7543
+ _t = {
7544
7544
  ...g,
7545
- value: new bt(g, t, _t ? "error" : "dynamic", _t || null === e ? null : e, Z, _t ? d : null)
7546
- }, y.insert(ut), i.addDynamicPrecedent(n, d, -2), I.insertNonOverlapping({
7545
+ value: new Re(g, t, ft ? "error" : "dynamic", ft || null === e ? null : e, Q, ft ? d : null)
7546
+ }, y.insert(_t), i.addDynamicPrecedent(n, d, -2), I.insertNonOverlapping({
7547
7547
  ...f,
7548
- value: new Yt(f, T)
7548
+ value: new W(f, B)
7549
7549
  });
7550
7550
  }
7551
- !w || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n, Y, p, 0 !== et || j || !0 === ht || _t || null !== lt || Q);
7552
- let ft = !1;
7553
- if ((ot || ut || _t || $) && (ft = o.isEqualRanges(ot, ut), ot && C.push(ot), ut && x.push(ut)), ut || ot) {
7554
- const t = ot ?? ut, e = ut ?? ot, r = {
7551
+ !w || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n, Z, p, 0 !== nt || j || !0 === ut || ft || null !== it || Y);
7552
+ let gt = !1;
7553
+ if ((st || _t || ft || $) && (gt = o.isEqualRanges(st, _t), st && b.push(st), _t && C.push(_t)), _t || st) {
7554
+ const t = st ?? _t, e = _t ?? st, r = {
7555
7555
  colStart: Math.min(s, t.colStart, e.colStart),
7556
7556
  rowStart: Math.min(l, t.rowStart, e.rowStart),
7557
7557
  colEnd: Math.max(s, t.colEnd, e.colEnd),
7558
7558
  rowEnd: Math.max(l, t.rowEnd, e.rowEnd),
7559
7559
  scope: a
7560
7560
  };
7561
- v.insertNonOverlapping(r), ft && _t === H || (this._invalidatePlans(), i.getPrecedents().search(r).length > 0 && (n.state |= 1, g || (g = new Wt()), g.insertNonOverlapping(r)));
7561
+ x.insertNonOverlapping(r), gt && ft === H || (this._invalidatePlans(), i.getPrecedents().search(r).length > 0 && (n.state |= 1, g || (g = new v()), g.insertNonOverlapping(r)));
7562
7562
  }
7563
- n.cachedValue = Y, f[N++] = n;
7564
- const gt = null !== h && h.hasHolders() ? Et(Y) : Y;
7565
- ht || lt || k.push(l, s, gt), N >= (k.observed ? As : ks) && B(), (0 !== (n.state & qn) || null !== n.ext && 0 !== n.ext.shownGroup) && this._trackCircular(n, p, X, U, G);
7566
- const pt = n.dependents, mt = pt.length;
7567
- if (mt > 0) {
7563
+ n.cachedValue = Z, f[M++] = n;
7564
+ const pt = null !== h && h.hasHolders() ? Ht(Z) : Z;
7565
+ ut || it || N.push(l, s, pt), M >= (N.observed ? As : ks) && O(), (0 !== (n.state & qn) || null !== n.ext && 0 !== n.ext.shownGroup) && this._trackCircular(n, p, U, X, V);
7566
+ const mt = n.dependents, St = mt.length;
7567
+ if (St > 0) {
7568
7568
  const t = !!(4 & n.state), e = !this._iterate && 0 !== (n.state & qn);
7569
7569
  e && (this._taintGroup = n.ext.cycleGroup);
7570
- for (let n = 0; n < mt; n++) {
7571
- const r = pt[n];
7570
+ for (let n = 0; n < St; n++) {
7571
+ const r = mt[n];
7572
7572
  e && _n(r, l, s, this._taintDownstream);
7573
7573
  const o = r.value.index;
7574
- o < 0 || (gn(r) && (Ol = o, Pl = gt, _n(r, l, s, $l)), t && _n(r, l, s, Hl));
7574
+ o < 0 || (gn(r) && (Ol = o, Pl = pt, _n(r, l, s, $l)), t && _n(r, l, s, Hl));
7575
7575
  }
7576
7576
  }
7577
7577
  }
7578
7578
  } catch (n) {
7579
- const r = u[O];
7579
+ const r = u[z];
7580
7580
  if (n instanceof on || n instanceof nn && this._iterate) {
7581
7581
  const o = Ks;
7582
7582
  if (o.length = 0, n instanceof on) for (let t = 0; t < n.count; t++) o.push(n.nodes[t]);
7583
- o.push(r), B(), r.state &= ~Kn, this.doDemandEvaluate(t, e, o, B);
7583
+ o.push(r), O(), r.state &= ~Kn, this.doDemandEvaluate(t, e, o, O);
7584
7584
  } else {
7585
7585
  if (!(n instanceof nn || n instanceof cn)) throw n;
7586
7586
  {
7587
7587
  const t = n instanceof nn;
7588
7588
  r.state = -3841 & r.state | $n | sr | (t ? lr : ir);
7589
7589
  const e = sn(r);
7590
- e.demandValue = Zs(r), e.cycleGroup = t ? ++this._cycleGroupNext : Ys(n.node), t && (e.cycleNext = r), this._addCircular(r);
7590
+ e.demandValue = Qs(r), e.cycleGroup = t ? ++this._cycleGroupNext : Zs(n.node), t && (e.cycleNext = r), this._addCircular(r);
7591
7591
  }
7592
7592
  }
7593
7593
  c.gridId = r.gridId;
7594
7594
  }
7595
- c.node = null, c.colIndex = Number.MAX_SAFE_INTEGER, c.rowIndex = Number.MAX_SAFE_INTEGER, B();
7596
- for (const t of M.values()) t.commitDemand();
7595
+ c.node = null, c.colIndex = Number.MAX_SAFE_INTEGER, c.rowIndex = Number.MAX_SAFE_INTEGER, O();
7596
+ for (const t of F.values()) t.commitDemand();
7597
7597
  this._flush = null, this._overlays = null;
7598
7598
  const L = this._fallbackDirty;
7599
7599
  return null !== L && (this._fallbackDirty = null, g ? g.insertAllNonOverlapping(L.all()) : g = L), (() => {
@@ -7602,7 +7602,7 @@ var Es = class {
7602
7602
  Vn = 0;
7603
7603
  })(), this._planStats.evaluateMs += Ds() - l, g;
7604
7604
  }
7605
- }, Is = (t, e) => new L.ArrayList(t.slice(0, e));
7605
+ }, Is = (t, e) => new ut.ArrayList(t.slice(0, e));
7606
7606
  function ys(t, e, n, r, o, s) {
7607
7607
  const l = e.rowStart + n, i = e.rowStart + r, a = e.colStart + o, c = e.colStart + s;
7608
7608
  for (let e = 0; e < t.length; e++) {
@@ -7615,7 +7615,7 @@ function vs(t, e, n) {
7615
7615
  const r = e.values, o = e.errorSpatial, s = qs, l = Ws;
7616
7616
  for (let i = 0; i < t.length; i++) {
7617
7617
  const a = t[i];
7618
- r.delete(a), z(o, a);
7618
+ r.delete(a), Et(o, a);
7619
7619
  const c = {
7620
7620
  colStart: a.colStart,
7621
7621
  rowStart: a.rowStart,
@@ -7644,7 +7644,7 @@ function Cs(t, e, n) {
7644
7644
  }
7645
7645
  var bs = (t, e, n, r) => {
7646
7646
  const o = t.getValueAt(n, r);
7647
- return Pt(o) ? o : ut(e, n, r);
7647
+ return bt(o) ? o : P(e, n, r);
7648
7648
  }, Rs = Symbol("unsetGridId"), As = 1024, ks = 65536;
7649
7649
  function Ns(t, e) {
7650
7650
  return t.scope !== e.scope ? null === t.scope ? -1 : null === e.scope ? 1 : t.scope.localeCompare(e.scope) : t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex;
@@ -7711,21 +7711,21 @@ var Ps = {
7711
7711
  rowEnd: 0,
7712
7712
  colEnd: 0,
7713
7713
  scope: null
7714
- }, Ks = [null], qs = [], Ws = [], Xs = [], Us = [], Js = {
7714
+ }, Ks = [null], qs = [], Ws = [], Us = [], Xs = [], Js = {
7715
7715
  rowStart: 0,
7716
7716
  colStart: 0,
7717
7717
  rowEnd: 0,
7718
7718
  colEnd: 0,
7719
7719
  scope: null
7720
- }, Ys = (t) => {
7720
+ }, Zs = (t) => {
7721
7721
  const e = t.ext;
7722
7722
  return null === e ? 0 : 0 !== (t.state & qn) ? e.cycleGroup : e.shownGroup;
7723
- }, Zs = (t) => Et(t.cachedValue) ?? 0, Qs = {
7723
+ }, Qs = (t) => Ht(t.cachedValue) ?? 0, Ys = {
7724
7724
  rowStart: 0,
7725
7725
  colStart: 0,
7726
7726
  rowEnd: 0,
7727
7727
  colEnd: 0
7728
- }, tl = 1e4, el = Y(tl), nl = Y(tl), rl = Y(tl), ol = Y(tl), sl = Y(tl), ll = Y(tl), il = Y(tl), al = Y(tl), cl = Y(tl), dl = Y(tl), hl = Y(tl), ul = Y(tl), _l = Y(tl), fl = Y(tl), gl = Y(tl), pl = Y(tl), ml = [null], Sl = [], wl = -1, El = -1, Il = -1, yl = -1;
7728
+ }, tl = 1e4, el = A(tl), nl = A(tl), rl = A(tl), ol = A(tl), sl = A(tl), ll = A(tl), il = A(tl), al = A(tl), cl = A(tl), dl = A(tl), hl = A(tl), ul = A(tl), _l = A(tl), fl = A(tl), gl = A(tl), pl = A(tl), ml = [null], Sl = [], wl = -1, El = -1, Il = -1, yl = -1;
7729
7729
  function vl(t) {
7730
7730
  const e = t.block.formula;
7731
7731
  return null !== e && void 0 !== e.getSpillOrigin ? e.getSpillOrigin() : null;
@@ -7738,7 +7738,7 @@ function xl(t) {
7738
7738
  const o = vl(t);
7739
7739
  return Il = null !== o ? t.rowIndex - o.rows : t.rowIndex, yl = null !== o ? t.colIndex - o.columns : t.colIndex, wl = Il + r.getRowCount() - 1, El = yl + r.getColumnCount() - 1, wl > Il || El > yl;
7740
7740
  }
7741
- var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = Y(8), Fl = Y(8), Dl = Y(8), Tl = Array.from({ length: 8 }, () => ({
7741
+ var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = A(8), Fl = A(8), Dl = A(8), Tl = Array.from({ length: 8 }, () => ({
7742
7742
  colStart: 0,
7743
7743
  colEnd: 0,
7744
7744
  rowStart: 0,
@@ -7749,7 +7749,7 @@ var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = Y(8), Fl = Y(8),
7749
7749
  r < 0 || (Bn[r + e] = n);
7750
7750
  })(t, Ol, Pl);
7751
7751
  }, Hl = (t) => {
7752
- t.state |= Zn;
7752
+ t.state |= Qn;
7753
7753
  }, jl = (t, e, n) => {
7754
7754
  for (let r = 0; r < t.length; r++) {
7755
7755
  const o = t[r];
@@ -7770,12 +7770,12 @@ function Kl(t, e) {
7770
7770
  return n === r ? 0 : 1 / 0;
7771
7771
  }
7772
7772
  var ql = {
7773
- values: Y(tl),
7773
+ values: A(tl),
7774
7774
  length: 0
7775
7775
  }, Wl = {
7776
- values: Y(tl),
7776
+ values: A(tl),
7777
7777
  length: 0
7778
- }, Xl = class {
7778
+ }, Ul = class {
7779
7779
  constructor(t) {
7780
7780
  this._namesByKey = /* @__PURE__ */ new Map(), this._namesById = /* @__PURE__ */ new Map(), this._hostsById = /* @__PURE__ */ new Map(), this._loadedData = /* @__PURE__ */ new Map(), this._options = t;
7781
7781
  }
@@ -7784,14 +7784,14 @@ var ql = {
7784
7784
  for (let e = 0; e < a.length; e++) {
7785
7785
  const c = a[e], d = c.getId(), h = c.getSheetNames();
7786
7786
  for (let t = 0; t < h.length; t++) {
7787
- const e = Te(d, t);
7787
+ const e = dt(d, t);
7788
7788
  s.add(e), o && (n(e) ? this._loadedData.get(e) !== (c.getSheetData(t)?.data ?? null) && (r(e), this._registerSheet(c, t, e), i.add(d)) : (this._registerSheet(c, t, e), i.add(d)));
7789
7789
  }
7790
7790
  const u = c.getDefinedNames();
7791
7791
  for (let e = 0; e < u.length; e++) {
7792
7792
  const n = u[e];
7793
7793
  if (!n.name) continue;
7794
- const r = n.sheetIndex, o = Te(d, void 0 !== r && r >= 0 && r < h.length ? r : -1), s = Ul(o, n.name);
7794
+ const r = n.sheetIndex, o = dt(d, void 0 !== r && r >= 0 && r < h.length ? r : -1), s = Xl(o, n.name);
7795
7795
  l.add(s);
7796
7796
  const a = this._namesByKey.get(s);
7797
7797
  if (a) {
@@ -7803,17 +7803,17 @@ var ql = {
7803
7803
  } else this._registerName(c, o, n, t), i.add(d);
7804
7804
  }
7805
7805
  }
7806
- for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(Lt(t).bookId));
7806
+ for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(at(t).bookId));
7807
7807
  for (const [t, e] of this._namesByKey) {
7808
7808
  if (l.has(t)) continue;
7809
7809
  this._namesByKey.delete(t), this._namesById.delete(e.getId());
7810
7810
  const n = this._hostsById.get(e.getId());
7811
- this._hostsById.delete(e.getId()), n?.setPlaceholder(m.BuiltIn.Name.toString()), i.add(Lt(e.getScope()).bookId);
7811
+ this._hostsById.delete(e.getId()), n?.setPlaceholder(m.BuiltIn.Name.toString()), i.add(at(e.getScope()).bookId);
7812
7812
  }
7813
7813
  return i;
7814
7814
  }
7815
7815
  getNameByScope(t, e) {
7816
- return this._namesByKey.get(Ul(e, t)) ?? null;
7816
+ return this._namesByKey.get(Xl(e, t)) ?? null;
7817
7817
  }
7818
7818
  getNameById(t) {
7819
7819
  return this._namesById.get(t) ?? null;
@@ -7821,7 +7821,7 @@ var ql = {
7821
7821
  _registeredSheetGrids() {
7822
7822
  const t = [];
7823
7823
  for (const e of this._options.gridIds()) {
7824
- const n = Lt(e);
7824
+ const n = at(e);
7825
7825
  n && n.sheetIndex >= 0 && t.push(e);
7826
7826
  }
7827
7827
  return t;
@@ -7837,7 +7837,7 @@ var ql = {
7837
7837
  for (let t = 0; t < o.length; t++) {
7838
7838
  const [n, s] = o[t], l = s.length;
7839
7839
  for (let t = 0; t < l; t++) {
7840
- const o = T.fromJSONValue(s.at(t));
7840
+ const o = re.fromJSONValue(s.at(t));
7841
7841
  null != o && e.push({
7842
7842
  col: n + t,
7843
7843
  row: r,
@@ -7848,7 +7848,7 @@ var ql = {
7848
7848
  }
7849
7849
  if (0 === e.length) return null;
7850
7850
  e.sort((t, e) => t.col - e.col || t.row - e.row);
7851
- const n = new It.Builder();
7851
+ const n = new gt.Builder();
7852
7852
  for (let t = 0; t < e.length; t++) n.pushAt(e[t].col, e[t].row, e[t].value);
7853
7853
  return n.build()?.tuples ?? null;
7854
7854
  }(o);
@@ -7861,7 +7861,7 @@ var ql = {
7861
7861
  getScope: () => e,
7862
7862
  refersTo: n.refersTo ?? ""
7863
7863
  };
7864
- this._namesByKey.set(Ul(e, n.name), i), this._namesById.set(l, i);
7864
+ this._namesByKey.set(Xl(e, n.name), i), this._namesById.set(l, i);
7865
7865
  const a = s(l);
7866
7866
  this._hostsById.set(l, a), this._queueBody(l, a, t, e, i.refersTo, r);
7867
7867
  }
@@ -7869,25 +7869,25 @@ var ql = {
7869
7869
  const { queue: l, recompileNamed: i } = this._options;
7870
7870
  let a = o.trim();
7871
7871
  a.startsWith("=") && (a = a.substring(1)), a || (a = m.BuiltIn.Ref.toString());
7872
- const c = Lt(r), d = c.sheetIndex >= 0 ? c.sheetIndex : n.getSheetNames().length > 0 ? 0 : -1, h = Te(c.bookId, d);
7872
+ const c = at(r), d = c.sheetIndex >= 0 ? c.sheetIndex : n.getSheetNames().length > 0 ? 0 : -1, h = dt(c.bookId, d);
7873
7873
  l(async () => {
7874
7874
  this._hostsById.get(t) === e && e.setBody({
7875
7875
  coords: Jl,
7876
7876
  expression: a,
7877
- authoredAt: Yl,
7877
+ authoredAt: Zl,
7878
7878
  scopeGridId: h
7879
7879
  }) && (s || i(t));
7880
7880
  });
7881
7881
  }
7882
- }, Ul = (t, e) => t + "::" + e.toLowerCase(), Jl = Object.freeze({
7882
+ }, Xl = (t, e) => t + "::" + e.toLowerCase(), Jl = Object.freeze({
7883
7883
  colStart: 0,
7884
7884
  rowStart: 0,
7885
7885
  colEnd: 0,
7886
7886
  rowEnd: 0
7887
- }), Yl = Object.freeze({
7887
+ }), Zl = Object.freeze({
7888
7888
  rowIndex: 0,
7889
7889
  colIndex: 0
7890
- }), Zl = class extends a {
7890
+ }), Ql = class extends a {
7891
7891
  constructor(t) {
7892
7892
  super({ transactions: new i({ maxCommits: ri }) }), this._cellFreeContext = null, this._calcScope = {
7893
7893
  rowIndex: 0,
@@ -7905,7 +7905,7 @@ var ql = {
7905
7905
  deferOrdinal: 0,
7906
7906
  deferRoot: !1,
7907
7907
  deferServed: null
7908
- }, this._cycleId = 0, this._staticEpoch = 1, this._precedentEpoch = 1, this._epochSeenFormulas = null, this._epochSeenPrecedents = null, this._epochSeenDynamics = null, this._volatiles = /* @__PURE__ */ new Set(), this._calculatedCommitId = null, this._calculatedEngineId = null, this._holdsGrids = !1, this._engineIds = /* @__PURE__ */ new Map(), this._landingOf = /* @__PURE__ */ new Map(), this._mirroredId = null, this._lastRevert = null, this._symbolIndex = null, this._symbolIndexOf = null, this._sheetsDerived = null, this._tablesDerived = null, this._namesDerived = null, this._collecting = null, this._recompileNamedPending = null, this._recompileLoadedPending = null, this._invalidateNamedPending = null, this.resolveScope = (t) => this._symbols.resolve(ae.Sheet, t)?.toString(), this._heldCloneKey = null, this._callbacks = t.callbacks, this._runtime = t.runtime, this._richData = t.richData ?? Kt.DetachedContext, this._symbols = t.symbols, this._resolvers = t.resolvers, this._getSheetIndex = t.getSheetIndex ?? null, this._legacyIntersect = !0 === t.legacyIntersect, this._gridOptions = t.gridOptions ?? {}, this._calculation = t.calculation;
7908
+ }, this._cycleId = 0, this._staticEpoch = 1, this._precedentEpoch = 1, this._epochSeenFormulas = null, this._epochSeenPrecedents = null, this._epochSeenDynamics = null, this._volatiles = /* @__PURE__ */ new Set(), this._calculatedCommitId = null, this._calculatedEngineId = null, this._holdsGrids = !1, this._engineIds = /* @__PURE__ */ new Map(), this._landingOf = /* @__PURE__ */ new Map(), this._mirroredId = null, this._lastRevert = null, this._symbolIndex = null, this._symbolIndexOf = null, this._sheetsDerived = null, this._tablesDerived = null, this._namesDerived = null, this._collecting = null, this._recompileNamedPending = null, this._recompileLoadedPending = null, this._invalidateNamedPending = null, this.resolveScope = (t) => this._symbols.resolve(Bt.Sheet, t)?.toString(), this._heldCloneKey = null, this._callbacks = t.callbacks, this._runtime = t.runtime, this._richData = t.richData ?? ct.DetachedContext, this._symbols = t.symbols, this._resolvers = t.resolvers, this._getSheetIndex = t.getSheetIndex ?? null, this._legacyIntersect = !0 === t.legacyIntersect, this._gridOptions = t.gridOptions ?? {}, this._calculation = t.calculation;
7909
7909
  const e = t.replica;
7910
7910
  this._updateState({
7911
7911
  gridsAll: /* @__PURE__ */ new Map(),
@@ -7924,8 +7924,8 @@ var ql = {
7924
7924
  } }),
7925
7925
  dynamicByBlock: /* @__PURE__ */ new Map(),
7926
7926
  dirtySpatial: new wn()
7927
- }), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, w.Axis.Column, t.functions), this._deferred = new Yo(this._calcScope, (t, e, n) => this._holderAt(t, e, n), () => this._runtime.getRandom(), () => this._settle(), void 0, (t, e) => this._normalizeResult(t, e), {
7928
- createRichData: (t, e) => Ee.fromJSON({
7927
+ }), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, w.Axis.Column, t.functions), this._deferred = new Zo(this._calcScope, (t, e, n) => this._holderAt(t, e, n), () => this._runtime.getRandom(), () => this._settle(), void 0, (t, e) => this._normalizeResult(t, e), {
7928
+ createRichData: (t, e) => it.fromJSON({
7929
7929
  type: t,
7930
7930
  data: e
7931
7931
  }, this._richData),
@@ -7935,7 +7935,7 @@ var ql = {
7935
7935
  parseText: t.parseText
7936
7936
  }, () => this._callbacks.onPendingChange());
7937
7937
  const n = this._callbacks;
7938
- this._calcExecutor = new Es(this, this._context), t.planCacheMode && (this._calcExecutor.planCacheMode = t.planCacheMode), this._externalBindings = new Xl({
7938
+ this._calcExecutor = new Es(this, this._context), t.planCacheMode && (this._calcExecutor.planCacheMode = t.planCacheMode), this._externalBindings = new Ul({
7939
7939
  books: t.books,
7940
7940
  createGrid: (t) => this.createBackendGrid({ uuid: t }),
7941
7941
  unregisterGrid: (t) => {
@@ -8013,7 +8013,7 @@ var ql = {
8013
8013
  const r = this.getGrid(t);
8014
8014
  if (!r) return null;
8015
8015
  const o = r.getValues().getValueAt(e, n);
8016
- return Pt(o) ? o : ut(r.getSpills(), e, n);
8016
+ return bt(o) ? o : P(r.getSpills(), e, n);
8017
8017
  }
8018
8018
  _settleNow() {
8019
8019
  const t = this._deferred, e = t.takeMoved();
@@ -8033,7 +8033,7 @@ var ql = {
8033
8033
  if (null === _ || !o.isLiveNode(_)) continue;
8034
8034
  const f = _.gridId, g = n.gridsAll.get(f);
8035
8035
  if (!g) continue;
8036
- const p = _.rowIndex, S = _.colIndex, w = g.getValues().getValueAt(p, S), E = Pt(w), I = E ? w : ut(g.getSpills(), p, S);
8036
+ const p = _.rowIndex, S = _.colIndex, w = g.getValues().getValueAt(p, S), E = bt(w), I = E ? w : P(g.getSpills(), p, S);
8037
8037
  if (null === I || I.calls.indexOf(u) < 0) continue;
8038
8038
  if (!I.direct) {
8039
8039
  c.add(_), i(s, f).add(p, S);
@@ -8059,8 +8059,8 @@ var ql = {
8059
8059
  }, n = y.errors.get(t);
8060
8060
  n ? n.push(e) : y.errors.set(t, [e]);
8061
8061
  }
8062
- _.state &= -6815749, Ql.colStart = S, Ql.colEnd = S, Ql.rowStart = p, Ql.rowEnd = p, Ql.scope = f;
8063
- const x = r.search(Ql);
8062
+ _.state &= -6815749, Yl.colStart = S, Yl.colEnd = S, Yl.rowStart = p, Yl.rowEnd = p, Yl.scope = f;
8063
+ const x = r.search(Yl);
8064
8064
  for (let t = 0; t < x.length; t++) {
8065
8065
  const e = x[t], n = e.value;
8066
8066
  if (n.index < 0) {
@@ -8086,7 +8086,7 @@ var ql = {
8086
8086
  }), s[t] = {
8087
8087
  ...e,
8088
8088
  value: !1
8089
- }, z(r.errorSpatial, e);
8089
+ }, Et(r.errorSpatial, e);
8090
8090
  }
8091
8091
  r.notifyCalcStatus.load(s);
8092
8092
  for (const [t, e] of n.errors) r.errorSpatial.load(ni(e).map((e) => ({
@@ -8112,8 +8112,8 @@ var ql = {
8112
8112
  createFormulaBlock(t, e, n, r, o, s, l) {
8113
8113
  const i = this._callbacks.getCompiler(s);
8114
8114
  if (!i) throw new Error("The calculation engine has not started; nothing can compile yet.");
8115
- const a = Lt(t)?.bookId ?? null, c = a ? null : Lt(this._externalBindings.getNameById(t)?.getScope() ?? "")?.bookId ?? null;
8116
- return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ? Te(a ?? c, -1) : this.getSheetName(t), l, a ? { book: a } : void 0), e, this._calcScope, t, () => this.getGrid(t)?.getEntireCoords() ?? null, this._resolvers);
8115
+ const a = at(t)?.bookId ?? null, c = a ? null : at(this._externalBindings.getNameById(t)?.getScope() ?? "")?.bookId ?? null;
8116
+ return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ? dt(a ?? c, -1) : this.getSheetName(t), l, a ? { book: a } : void 0), e, this._calcScope, t, () => this.getGrid(t)?.getEntireCoords() ?? null, this._resolvers);
8117
8117
  }
8118
8118
  getSymbols() {
8119
8119
  return this._symbols;
@@ -8130,15 +8130,15 @@ var ql = {
8130
8130
  return this._sheetsCache().ids;
8131
8131
  }
8132
8132
  getSheetSpanIds(t) {
8133
- const e = D(t);
8133
+ const e = le(t);
8134
8134
  if (e) {
8135
8135
  const t = this.getSheetIds(), n = t.indexOf(e[0]), r = t.indexOf(e[1]);
8136
8136
  return -1 === n || -1 === r ? null : t.slice(Math.min(n, r), Math.max(n, r) + 1);
8137
8137
  }
8138
- const n = Lt(t);
8138
+ const n = at(t);
8139
8139
  if (!n || n.sheetEnd === n.sheetIndex) return null;
8140
8140
  const r = [];
8141
- for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(Te(n.bookId, t));
8141
+ for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(dt(n.bookId, t));
8142
8142
  return r;
8143
8143
  }
8144
8144
  getFormulas() {
@@ -8247,7 +8247,7 @@ var ql = {
8247
8247
  }
8248
8248
  markDirty(t) {
8249
8249
  const e = this._getState(), n = e.dirtySpatial.clone(this._heldCloneKey), r = e.precedentSpatial, o = e.formulaSpatial;
8250
- let s = !1, l = j(t, w.Axis.Column, 2);
8250
+ let s = !1, l = Ne(t, w.Axis.Column, 2);
8251
8251
  for (let t = 0; t < l.length; t++) {
8252
8252
  const e = l[t];
8253
8253
  (r?.has(e) || o?.has(e)) && (s = !0, n.insertNonOverlapping(e));
@@ -8449,7 +8449,7 @@ var ql = {
8449
8449
  }), e;
8450
8450
  }
8451
8451
  createEngineGrid(t) {
8452
- const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ?? ke : r ? () => r : void 0, s = this._callbacks;
8452
+ const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ?? Gt : r ? () => r : void 0, s = this._callbacks;
8453
8453
  return this.createBackendGrid({
8454
8454
  uuid: e,
8455
8455
  shadowOf: t.shadowOf,
@@ -8497,15 +8497,15 @@ var ql = {
8497
8497
  switch (n.type) {
8498
8498
  case "sheets": return this.applySheets(n.sheets), {
8499
8499
  cycleId: this._cycleId,
8500
- commitId: ge(n)
8500
+ commitId: ke(n)
8501
8501
  };
8502
8502
  case "tables": return this.applyTables(n.changes), {
8503
8503
  cycleId: this._cycleId,
8504
- commitId: ge(n)
8504
+ commitId: ke(n)
8505
8505
  };
8506
8506
  case "names": return this.applyNames(n.changes), {
8507
8507
  cycleId: this._cycleId,
8508
- commitId: ge(n)
8508
+ commitId: ke(n)
8509
8509
  };
8510
8510
  case "nameGraph": return {
8511
8511
  cycleId: this._cycleId,
@@ -8518,7 +8518,7 @@ var ql = {
8518
8518
  const o = this.getGrid(t);
8519
8519
  return o ? r ? o._apply(n, this.getCurrentCommitId(), !0) : o._apply(n, e) : {
8520
8520
  cycleId: this._cycleId,
8521
- commitId: ge(n)
8521
+ commitId: ke(n)
8522
8522
  };
8523
8523
  }
8524
8524
  applyHeld(t, e) {
@@ -8583,7 +8583,7 @@ var ql = {
8583
8583
  return l;
8584
8584
  }
8585
8585
  followRestore(t, e) {
8586
- return e === Jt.Status.Off || e === Jt.Status.Error ? (this.retarget(t), !1) : e !== Jt.Status.Running ? (null !== this.restoreTo(t) || this.holdsModelCommit(t) || this.retarget(t), !1) : this.holdsModelCommit(t) ? (this.restoreTo(t), !1) : (this.retarget(t), !0);
8586
+ return e === X.Status.Off || e === X.Status.Error ? (this.retarget(t), !1) : e !== X.Status.Running ? (null !== this.restoreTo(t) || this.holdsModelCommit(t) || this.retarget(t), !1) : this.holdsModelCommit(t) ? (this.restoreTo(t), !1) : (this.retarget(t), !0);
8587
8587
  }
8588
8588
  rebuild(t) {
8589
8589
  this.drop(), this.setReplica(t), this.open();
@@ -8615,13 +8615,13 @@ var ql = {
8615
8615
  if (u.deferCount !== l) {
8616
8616
  const t = this._deferred, e = t.endEvaluation();
8617
8617
  o.cachedValue = e.calls.length > 0 ? t.newHolder(a, e) : void 0, t.flush();
8618
- } else Pt(o.cachedValue) && (o.cachedValue = void 0);
8618
+ } else bt(o.cachedValue) && (o.cachedValue = void 0);
8619
8619
  let c = ln(t.finalizeValue(a));
8620
8620
  return null === c && (c = 0), !r || c?.isIRange || Array.isArray(c) ? c : i.createRange(1, 1, c);
8621
8621
  },
8622
8622
  getCalls: () => {
8623
8623
  const t = f.getAnchorNode().cachedValue;
8624
- return Pt(t) ? t.calls : r.EmptyArray;
8624
+ return bt(t) ? t.calls : r.EmptyArray;
8625
8625
  }
8626
8626
  };
8627
8627
  }
@@ -8638,7 +8638,7 @@ var ql = {
8638
8638
  for (let t = 0; t < n.length; t++) {
8639
8639
  const r = n[t].value;
8640
8640
  if (null == r.gridId) continue;
8641
- if (_e(r.gridId) || this._externalBindings.getNameById(r.gridId)) continue;
8641
+ if (Xt(r.gridId) || this._externalBindings.getNameById(r.gridId)) continue;
8642
8642
  const o = r.getReferencedSymbolIds();
8643
8643
  if (0 === o.length) continue;
8644
8644
  const s = r.ref, l = {
@@ -8701,10 +8701,10 @@ var ql = {
8701
8701
  e ? e.push(l[t]) : s.set(u, [l[t]]);
8702
8702
  continue;
8703
8703
  }
8704
- const _ = null != u && !n.isDefinedName(u) && !_e(u) && !this._externalBindings.getNameById(u);
8704
+ const _ = null != u && !n.isDefinedName(u) && !Xt(u) && !this._externalBindings.getNameById(u);
8705
8705
  if (h && _) for (let t = 0; t < o.length; t++) {
8706
8706
  const [e, n] = o[t];
8707
- a.includes(e) && (h = h.replaceTableReferences(e, (t) => de(t, n) ? F() : null));
8707
+ a.includes(e) && (h = h.replaceTableReferences(e, (t) => Ot(t, n) ? F() : null));
8708
8708
  }
8709
8709
  const f = h && h !== i.formula ? h.getTextAt(d.rowStart, d.colStart) : i.getTextAt(d.rowStart, d.colStart);
8710
8710
  this._writeBlockText(i, f);
@@ -8712,7 +8712,7 @@ var ql = {
8712
8712
  if (s) for (const [t, e] of s) this.getGrid(t)?._rederivePrecedentsNow(e);
8713
8713
  }
8714
8714
  refitTableRows(t, e, n, r, s) {
8715
- const l = this._symbols.bind(ae.Sheet, t);
8715
+ const l = this._symbols.bind(Bt.Sheet, t);
8716
8716
  if (!l) return;
8717
8717
  const i = this._getState().precedentSpatial.search({
8718
8718
  colStart: e.colStart,
@@ -8726,7 +8726,7 @@ var ql = {
8726
8726
  const e = i[t].value;
8727
8727
  if (e.index < 0) continue;
8728
8728
  const n = e.formulaEntry.value, r = n.gridId;
8729
- if (null == r || _e(r) || this._externalBindings.getNameById(r)) continue;
8729
+ if (null == r || Xt(r) || this._externalBindings.getNameById(r)) continue;
8730
8730
  const o = (a ??= /* @__PURE__ */ new Map()).get(n);
8731
8731
  o ? o.includes(e.index) || o.push(e.index) : a.set(n, [e.index]);
8732
8732
  }
@@ -8792,11 +8792,11 @@ var ql = {
8792
8792
  }
8793
8793
  }
8794
8794
  rewriteTableReferences(t, e) {
8795
- const n = (t) => e ? O(t, e) : F(), r = this._callbacks, o = this._getState().formulaSpatial.all3D();
8795
+ const n = (t) => e ? yt(t, e) : F(), r = this._callbacks, o = this._getState().formulaSpatial.all3D();
8796
8796
  for (let e = 0; e < o.length; e++) {
8797
8797
  const s = o[e].value, l = s.gridId;
8798
8798
  if (null == l || !s.getReferencedSymbolIds().includes(t)) continue;
8799
- if (r.isDefinedName(l) || _e(l) || this._externalBindings.getNameById(l)) continue;
8799
+ if (r.isDefinedName(l) || Xt(l) || this._externalBindings.getNameById(l)) continue;
8800
8800
  const i = s.formula, a = i?.replaceTableReferences(t, n);
8801
8801
  if (!a || a === i) continue;
8802
8802
  const c = s.ref;
@@ -9169,7 +9169,7 @@ var ql = {
9169
9169
  toString() {
9170
9170
  return "CalcBackend";
9171
9171
  }
9172
- }, Ql = {
9172
+ }, Yl = {
9173
9173
  colStart: 0,
9174
9174
  rowStart: 0,
9175
9175
  colEnd: 0,
@@ -9177,7 +9177,7 @@ var ql = {
9177
9177
  scope: void 0
9178
9178
  }, ti = class {
9179
9179
  constructor(t) {
9180
- this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating = K(t);
9180
+ this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating = tt(t);
9181
9181
  }
9182
9182
  add(t, e) {
9183
9183
  const n = this._unordered;
@@ -9206,7 +9206,7 @@ var ql = {
9206
9206
  colEnd: t.colEnd,
9207
9207
  rowEnd: t.rowEnd
9208
9208
  }), ni = (t) => {
9209
- const e = j(t, w.Axis.Column, 2), n = new Array(e.length);
9209
+ const e = Ne(t, w.Axis.Column, 2), n = new Array(e.length);
9210
9210
  for (let t = 0; t < e.length; t++) {
9211
9211
  const r = e[t];
9212
9212
  n[t] = {
@@ -9222,4 +9222,4 @@ var ql = {
9222
9222
  for (let n = 0; n < t.length; n++) t[n][2] && (e ??= /* @__PURE__ */ new Set()).add(t[n][0]);
9223
9223
  return e ?? ai;
9224
9224
  };
9225
- export { Zl as CalcBackend };
9225
+ export { Ql as CalcBackend };