@sheetxl/mcp 0.8.0-beta.24 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/assets/{Cf0zmfQYfJ7zM0Ya.js → 0WuReGsjIpidu0Cr.js} +1 -1
  2. package/assets/{B6caaQsfOpFEgYQ4.js → 13QanvzRbNib7VHR.js} +1 -1
  3. package/assets/{DGI_8HyNF0eAv0P5.js → 2c1OYsVAy_w-ex-F.js} +1 -1
  4. package/assets/{B-t1q2NS61c2B8E4.js → 8114GVvAL1oaiJLV.js} +1 -1
  5. package/assets/{B16G2473LTkZP6Mq.js → 8hLtXHueDl7B_SEn.js} +1417 -1356
  6. package/assets/{DRzZ4bEyLRGVOLzV.js → 8mWHFnE0j-CaNsxr.js} +1 -1
  7. package/assets/{DaF9L7No8h8a-cqb.js → B-b7HyruDF2gdj3R.js} +2 -2
  8. package/assets/{CmkgQ5-IG0BSCM3R.js → B3J6davzttys1e7l.js} +3 -3
  9. package/assets/{doqBmhonQlHp-1Ud.js → B3lrS_GHkG6Mw5pN.js} +1 -1
  10. package/assets/{CnI4Nli8vtWdFKvf.js → B5rrqMYFybo3oW9k.js} +21 -21
  11. package/assets/{D6d1DKL15m52ZCuC.js → BB39UJoWw8tjThqY.js} +1 -1
  12. package/assets/{DtVSjxL6N_7WyM8Z.js → BBF_CDIKB2NIXiHg.js} +1 -1
  13. package/assets/{DE7G34oYbvrfXbJ7.js → BBLuTiY3V4MpFphK.js} +294 -294
  14. package/assets/{DM-yGHahbfA_uarn.js → BBZUslaSLC0vlZEb.js} +1 -1
  15. package/assets/{sJVPCrgeh0U6LbAK.js → BCdXK-2-AE6FAdRs.js} +1 -1
  16. package/assets/{CUYQlZz5zWsUdmRy.js → BF0C-5gSMHWBXI_k.js} +1 -1
  17. package/assets/{Xccc6oxtlSvJUDsC.js → BKGTzaNNBlRh7ua3.js} +1 -1
  18. package/assets/BOa1dD_9H3g65WbP.js +14 -0
  19. package/assets/{C-nA4SXN5hWHaxV6.js → BPlrBhzIqyWK19E2.js} +526 -526
  20. package/assets/{xD41vsQY6h60lCqz.js → BR4Wpxs0eSlaoLOl.js} +8 -8
  21. package/assets/{CSXmTA6w6Pnbtqvb.js → BTB4fa2DU21pP7At.js} +1 -1
  22. package/assets/{bv3fZLUPzd14I58C.js → BTamKr78GfsihW1a.js} +485 -485
  23. package/assets/{BPNLZ07Bu_B8Yhf1.js → BVfjBXAMgo4u8Y72.js} +1 -1
  24. package/assets/{TZnuVwhVjkOBax9F.js → BaZAIwIrqn1x69WH.js} +2 -2
  25. package/assets/{b8yACuWy67eIj_j2.js → Ban4yk1SYcz9Cs7n.js} +1 -1
  26. package/assets/{Ds4TB1hn56-RK6_f.js → BfB7Vq09p5uO-L88.js} +1 -1
  27. package/assets/{DOSWSyKkK4eSi4PD.js → BfEmSaLbKgcjIIpn.js} +2 -2
  28. package/assets/{DkQ4kxEKhKYQgfjK.js → Bfpf9b1s1bWyBXIw.js} +1 -1
  29. package/assets/{BrYc6PLonux_gI6b.js → BgHOi7rAHLhztiz-.js} +215 -215
  30. package/assets/{3VycPrqi6qgLOgGY.js → BgN67gyTyx_xz2Ny.js} +6 -6
  31. package/assets/{yz2PTfYm_8EGJPM5.js → BhxIJ8xdUxyMPJ_m.js} +1 -1
  32. package/assets/{Jy-_0a72nn5Iv1NK.js → BlMUrEA8V2S2KH0D.js} +1 -1
  33. package/assets/{CM-q_J5aF6YXmjeu.js → BloJ-e8xad1b_H7X.js} +3 -3
  34. package/assets/{C6PNMev7cs5JLgwy.js → Bm-wDNSoT-3JD2bJ.js} +1 -1
  35. package/assets/{BaYk1vO2hP2S3_1w.js → BoE9cj92LVH2LLy0.js} +2 -2
  36. package/assets/{g2Nu44uuSJFMzxEV.js → BqH4txhrgR2S-2ji.js} +2 -2
  37. package/assets/{DPYFRLJbHGlrcrJq.js → BrHXHm2FNXsL53bo.js} +2 -2
  38. package/assets/{CnKX5SPVE2iuSK42.js → BuFb0lPxYlHccrD9.js} +1 -1
  39. package/assets/{BkekCZ17YTtd07_C.js → ByGn4tk2SE1MH_sZ.js} +2 -2
  40. package/assets/{Cxzowsi6ASdZtzeI.js → C1IE0F-y65XqEYRl.js} +1 -1
  41. package/assets/{7vPlH3_rhJxmmBvG.js → C1JeIUEWW-RL1Rnu.js} +1 -1
  42. package/assets/{a2e_g9YI3J-lUD7-.js → C2sDVxKGBNlTFg6y.js} +1 -1
  43. package/assets/{D_tdoUtUe7cApQJn.js → C30apcFVvDHn2M4R.js} +4 -4
  44. package/assets/{TdDTOcC1TYhk6UuR.js → C3c2PUtIo-aWbjw4.js} +1 -1
  45. package/assets/{suLYEZBtGUhSYeB7.js → C4C3Ot0xeo1O0wm5.js} +1 -1
  46. package/assets/{By1QPrSxtnRiJu0R.js → C8zzCf71C976X7SG.js} +2 -2
  47. package/assets/{BxwB3iTNSE1TgHkb.js → CCS6r_ru_-bq12nu.js} +1 -1
  48. package/assets/{DNSWaXblwhTtI3w7.js → CDDtXZTG6nNFBQZP.js} +1 -1
  49. package/assets/{DL8pez0eKo8arYPj.js → CEa6wNiDRZrans9S.js} +3 -3
  50. package/assets/{Daaro0HbHkKXkBP-.js → CF1fqmS030ry2XQ0.js} +2 -2
  51. package/assets/{P6V3JAiRpC3BWceC.js → CFqF3aUKvOGFOK9O.js} +1 -1
  52. package/assets/{BH7ctzMzOYVTGxzA.js → CI8Pu3ko8VzQYdRD.js} +1 -1
  53. package/assets/{9GnbVPKozgrJpeLW.js → CICMJpasl9o4FaZi.js} +1 -1
  54. package/assets/{CIw6ZC3K9x-ccacl.js → CJcyMzG19TOjqNHS.js} +1 -1
  55. package/assets/{2YT_wstXIH6UIigi.js → CJoREr6-3iOl7iU_.js} +1 -1
  56. package/assets/{B4uS01J0mrSJSftQ.js → CMd7aLIwOA7bxcZm.js} +88 -88
  57. package/assets/{CpvJUGg9ckuCIpIS.js → CNikOloX_losH8Nz.js} +1 -1
  58. package/assets/{C0uu0vLKQh0S508B.js → CRZMD-wS-944FnD_.js} +40 -40
  59. package/assets/{CJ2hV-9ipqOEkLSG.js → CRlLpD9cfhJ9Ov9L.js} +1 -1
  60. package/assets/{DwNcvKM47ZHfvQM6.js → CS07BBUu6ZtXk4TZ.js} +1 -1
  61. package/assets/{DyiH3LlinD-38bG7.js → CX-LNahzNZRc78er.js} +1 -1
  62. package/assets/{DuEtCJEnG_GnJzTX.js → CY3Lmr-fgs6NqXRp.js} +1 -1
  63. package/assets/{KMzONx2Ps841nJHj.js → CbkCnjWs7Fpj5iQY.js} +8 -8
  64. package/assets/{Dlqk7XqKnAZ8Pcj3.js → CdbucPAmUkkc5pcM.js} +155 -156
  65. package/assets/{DRq6lQLndj73WT35.js → CfBJzpZuy1o216iZ.js} +1 -1
  66. package/assets/{Dk9zYXO3VoBhTdex.js → CoSNTR-pg7BZAU7o.js} +1 -1
  67. package/assets/{CFWwwr74qRKOBrg9.js → CpoqmW4E7rFdkRpf.js} +1 -1
  68. package/assets/{BAVltO4Xf7lC0Xr6.js → Cs1df4D35bBjqyvX.js} +1 -1
  69. package/assets/{DIgPlkEabQdKNUQn.js → CsPyLus3kh4QnahD.js} +1 -1
  70. package/assets/{DXCTHw-ZutNIuo_2.js → Cwe_kiigxAfceEK9.js} +1 -1
  71. package/assets/{CzRvg04_TIbwBH5C.js → CwzSgovxnBMrgLmJ.js} +3 -3
  72. package/assets/{BnNB_ejvNaLu6B3o.js → D31pY9r4JAFWw3E4.js} +1 -1
  73. package/assets/DCWHNfq5qCxvALwe.js +199 -0
  74. package/assets/{DGOgx3-IyO8bjF_t.js → DF9WfdyjHuCpsEXh.js} +63 -63
  75. package/assets/{LM2rVDHdB0jVUFcT.js → DOIpXsEXCaI-8VwJ.js} +1 -1
  76. package/assets/{76dPHG5RYA7MUV_g.js → DOXj80NXiglJXsMZ.js} +3 -3
  77. package/assets/{CR1aLf7CWEfPTO9a.js → DQ2vEDfVfsIGSmId.js} +1 -1
  78. package/assets/{Dhy6iU_09lrQnOAV.js → DQtnL5nOzSzVJhit.js} +61 -61
  79. package/assets/{CCF6CwJ6cbeLRl23.js → DRcmbp80jMRjxelW.js} +1 -1
  80. package/assets/{CFNtPYPfDPH-3BXK.js → DRy0AcTiSKQY3bih.js} +1 -1
  81. package/assets/{tWO-mE87mAuj1qih.js → DWr6GqsnMpLwSUno.js} +2 -2
  82. package/assets/{ByYJTTTUuu67hDF-.js → DXrX5tIZ1J5BhpFk.js} +4 -4
  83. package/assets/{CmwNIrRssYuLN2fn.js → DZxHk5oKIVvu3iJR.js} +458 -458
  84. package/assets/{CbJWbjmv4bz4ppIZ.js → Da0CtWhc7saaOdER.js} +318 -318
  85. package/assets/{mZt9BTEejCJZ4YK4.js → Dbi1_JHT_4u0nhwc.js} +1 -1
  86. package/assets/{C9iFJ52KwQTePQ81.js → Dcw7GSCgw_dgsum7.js} +11490 -11497
  87. package/assets/{fEfisM0E2fUYKIyU.js → DfuY8GdoSk8LxDFW.js} +5 -5
  88. package/assets/{CT4czEKWIj1GeQN8.js → DlARYdaCOVKiQzMH.js} +1 -1
  89. package/assets/{BJwiwzwx4Bl5L4Vq.js → DngX5ZuqqFGTp44B.js} +1 -1
  90. package/assets/{DFVQIZ2zZyAphhCF.js → DpwdC4SN_VYB9_ho.js} +1 -1
  91. package/assets/{CIY_RiLu1_FmRLAA.js → Dst0tyK__q2Q_AKk.js} +1 -1
  92. package/assets/{BrJd9jVVv9SQzZol.js → DvHZEP1wpb6549uf.js} +423 -423
  93. package/assets/{DMDTS0LH9Ke9t-3z.js → DzYvbv5u7E2H7IoB.js} +12 -7
  94. package/assets/{BjyXkr-CzV8mVx0t.js → G489eYf-lt3D1riX.js} +1 -1
  95. package/assets/{CKD460cQOgwF6uSV.js → L42Y17f0HUEpfS6U.js} +1 -1
  96. package/assets/{flby0g5gyZ9P2Wu2.js → O3m_QwxIRXMPFTB8.js} +1 -1
  97. package/assets/{7IzItpr7MkdnaAwh.js → P3Or6rEY-fHmQZbH.js} +69 -69
  98. package/assets/{DaHD9SY75O8wDy3p.js → PAzPVx_0jajb_7cO.js} +2 -2
  99. package/assets/{DJfpKncnYnrr28G0.js → PvRzzufo1V8BuC-I.js} +1 -1
  100. package/assets/{CFT_tDogP98gTbh7.js → Sm1ouHLiXlCuQVKV.js} +79 -79
  101. package/assets/{D-vo2bQyAmStQmD9.js → WC-THJfezYSFdiMF.js} +1 -1
  102. package/assets/{DczQhB3mRSUw6GCf.js → YK80feN98r6GVZv5.js} +1 -1
  103. package/assets/{DPLTGglaPovTg9e5.js → cl0C9YlF3Ds-lHps.js} +1 -1
  104. package/assets/{BXWGS09xFG81nnIT.js → eExV3IoVMxYkv5GO.js} +1 -1
  105. package/assets/{qc7rA-Z3a4rkVQPx.js → g3TrQtFS0qJZeshT.js} +215 -215
  106. package/assets/{B8bEJ65vQRqsfBlS.js → gf6l-4XXMXtq8hpJ.js} +5 -5
  107. package/assets/{CEk658HeLJk2cAjM.js → hiKRbrdbpmJglbWC.js} +3 -3
  108. package/assets/{D8k9de_hen-KqBWe.js → j4zqu8S2Be_yum7W.js} +1 -1
  109. package/assets/{Ch9w7xFxVMrvGuC_.js → jNZ7exipVCGRPbzr.js} +1 -1
  110. package/assets/{MosMza0-rXD8uHX_.js → kThU6e6dkzEoaK6n.js} +2 -2
  111. package/assets/{DJGYlGr2Zj7SkYqc.js → knMcDWv3xN7yJBTT.js} +1 -1
  112. package/assets/{BJqo8c5bFKjnq69G.js → ov7L79VlksT4fw7T.js} +11 -11
  113. package/assets/{BifwlrCmEVtjh_1U.js → pLM8Pxl1CscUdvMh.js} +1 -1
  114. package/assets/{NAWWzA_hk4wYtsPP.js → pfa2CH5NQuzku6FP.js} +2 -2
  115. package/assets/{B-5mBXpY9i6-eCrZ.js → q6advQx4x6PXvl0i.js} +35 -35
  116. package/assets/{BWLavTnANLUerdS0.js → qVBjd-c5B8neljc0.js} +2 -2
  117. package/assets/{DqSBb1HmgeU7eg_i.js → rlgXnCh6A88ozBRz.js} +110 -110
  118. package/assets/{DUbIxDAzW1dzrtdI.js → rzi2XAwlfy8BsGEa.js} +1 -1
  119. package/assets/{B7lATTNffVTrDsKE.js → xGASRbzSVVKfEAh-.js} +2 -2
  120. package/assets/{BkHeIMSE7-LehRCs.js → ybnQoU8_KttlHjiy.js} +1 -1
  121. package/index.js +145 -145
  122. package/lib.js +1 -1
  123. package/licenses/dependencies.txt +45 -45
  124. package/package.json +2 -2
  125. package/screenshot-page/assets/-HdF7KAN8PKqrASL.js +1 -0
  126. package/screenshot-page/assets/{C_YKEkTsGB_5gFNg.js → 0P0DnZolMnjPhiea.js} +2 -2
  127. package/screenshot-page/assets/{FcTM4SB17cEX1M3X.js → 5Y11BWntgqmzo9dz.js} +1 -1
  128. package/screenshot-page/assets/{Cx9eq2x1gIXGki3Q.js → B-E9Dzx1wh9RA2yC.js} +1 -1
  129. package/screenshot-page/assets/{CXwbGzavyvYgDbWU.js → B0CDAMDdxSN4en9k.js} +1 -1
  130. package/screenshot-page/assets/B39YZkEvc1U8ZQ8H.js +2 -0
  131. package/screenshot-page/assets/B8Dy_WA9RlWuvMqF.js +4 -0
  132. package/screenshot-page/assets/BAzHRU12l2vyyXq-.js +39 -0
  133. package/screenshot-page/assets/{DR-og7vslxlOZd8j.js → BGIujWi3UayyIWlg.js} +1 -1
  134. package/screenshot-page/assets/BNjmzbnQlBmX-HPQ.js +1 -0
  135. package/screenshot-page/assets/{B-0-chiwq4MIUQy9.js → BOF6KOmT8mH_NQnA.js} +1 -1
  136. package/screenshot-page/assets/{DcrVJCyDwGKeil2U.js → BQTLEc84Eql61S2m.js} +1 -1
  137. package/screenshot-page/assets/{clrFU8i-0wNkmbs7.js → BfkbiKKbYlPpRZqZ.js} +1 -1
  138. package/screenshot-page/assets/{DGkaCFHx4PsOJkFu.js → BhHceo22V3IBfap0.js} +1 -1
  139. package/screenshot-page/assets/{Cx1kZ2u_8JFV2Q8D.js → BiRVjUOUI8Qv0CE1.js} +1 -1
  140. package/screenshot-page/assets/{D6EXAYU-ZH8hjx_7.js → Bne-AygyF1USkPAy.js} +2 -2
  141. package/screenshot-page/assets/{Dkf51CnZh2zPEGMd.js → BpJaTpbR_CQzXj9M.js} +1 -1
  142. package/screenshot-page/assets/{B7pXfEVkcbaMBMhc.js → BrEXXxB9tAI5mmZP.js} +1 -1
  143. package/screenshot-page/assets/{CwCu_r0BW41uLt3P.js → Bt7fKk5ZupUuo_xD.js} +2 -2
  144. package/screenshot-page/assets/BwYQTcPRDDYIeAA5.js +586 -0
  145. package/screenshot-page/assets/ByyC3p23DsLAbUpr.js +1 -0
  146. package/screenshot-page/assets/{D7Yt7xmUlA6-Lq0Q.js → BzI5CCx73aXausKb.js} +9 -9
  147. package/screenshot-page/assets/{DM6hr-bvWV50-Oex.js → C-2hBFk27roWkIrQ.js} +2 -2
  148. package/screenshot-page/assets/{BTJ1NNUzHotNDiDe.js → CAKBmg6tXRtjEWgb.js} +2 -2
  149. package/screenshot-page/assets/CALWodHqzUTIv9le.js +5 -0
  150. package/screenshot-page/assets/{BcZPWw18bdj_ZvA9.js → CGNsyKbDXXz9qMa2.js} +1 -1
  151. package/screenshot-page/assets/CGZYePkVGI5DPBBY.js +1 -0
  152. package/screenshot-page/assets/{Bfq6-treWd_rRiWl.js → CJAgr6wyQGYAd3ZV.js} +1 -1
  153. package/screenshot-page/assets/{BKwDvElKinpn1IK0.js → CL_hAngRQwm_KGdR.js} +1 -1
  154. package/screenshot-page/assets/COL9dj40ytErlGak.js +2 -0
  155. package/screenshot-page/assets/CWA4xGjOeBuxJOzW.js +3 -0
  156. package/screenshot-page/assets/{r2HZG9_SMzF3__ID.js → CX-ITg5RXdV2cefd.js} +6 -6
  157. package/screenshot-page/assets/{C7mXat-6esc1AmRD.js → CXeDqC02BZcixiHS.js} +2 -2
  158. package/screenshot-page/assets/{Pt9ne0xkE2icD3Ih.js → CZaKvnrRdlLj1_X8.js} +1 -1
  159. package/screenshot-page/assets/{a3fvt1Klg1uGE7p6.js → Cg9eIWL8fPmeZFHG.js} +7 -7
  160. package/screenshot-page/assets/{DyxJBLjUkeDuu96F.js → CltB1nb5HHSmYrNG.js} +1 -1
  161. package/screenshot-page/assets/{FqdZRM336KMEcsbU.js → Cq1EzIAt4dHBkzfP.js} +1 -1
  162. package/screenshot-page/assets/{D6Yv5cc1JE7DGd6j.js → CqBSIwwGzWl8mrBe.js} +1 -1
  163. package/screenshot-page/assets/D2TibFqUBAPLcu_2.js +1 -0
  164. package/screenshot-page/assets/{ChSvXfVMLxZsP9zG.js → D4RZZdlItfrgQHcE.js} +1 -1
  165. package/screenshot-page/assets/{J73KTOmdZGNmnq-z.js → D72Rp__0TEqJ972a.js} +1 -1
  166. package/screenshot-page/assets/D8EmNst-H2v0eWcf.js +1 -0
  167. package/screenshot-page/assets/{Tj3B5At0OAN3tDza.js → DACqwpSwlZka3b7s.js} +1 -1
  168. package/screenshot-page/assets/DEy3e1rY-XMdI309.js +1 -0
  169. package/screenshot-page/assets/{CI3Z1f4amZ9G2rPD.js → DJebrQ5mu8uxpX3b.js} +1 -1
  170. package/screenshot-page/assets/{DynKB5GH-vfFMJEy.js → DOsZiE9rOdS_Mm2Q.js} +1 -1
  171. package/screenshot-page/assets/{CSFFMEKyxEFaykqL.js → DTAKTGn53yF_B621.js} +1 -1
  172. package/screenshot-page/assets/{D6Ciix7JAZtdKqmj.js → DYYzsN95gWMsxOaj.js} +1 -1
  173. package/screenshot-page/assets/{DOVt9zHz7FQ2KUQM.js → Da_VIghRFdNrmfZT.js} +1 -1
  174. package/screenshot-page/assets/DaqAdr-mtpVZMOS8.js +2 -0
  175. package/screenshot-page/assets/{0UZBKpOOsp7P-DkP.js → DdmX3djBOA6UCZtf.js} +2 -2
  176. package/screenshot-page/assets/{DEpn6VGd30cHEJOS.js → DfQS5zAy3pN31xNb.js} +1 -1
  177. package/screenshot-page/assets/DhnaoxNYwMobAVP6.js +1 -0
  178. package/screenshot-page/assets/{B-8IMo2f1yGNXOyz.js → GxbRmvyoKhHl0ZYY.js} +13 -8
  179. package/screenshot-page/assets/{zvxBjll3jnL0-vNn.js → Np3jWxG724t5hLHZ.js} +2 -2
  180. package/screenshot-page/assets/{Bg9UyX4yrB2mSdJt.js → QVGvXAvlw1c8vZjy.js} +12 -12
  181. package/screenshot-page/assets/{BbT5KRhoeAKLzy54.js → d8BvDCByceUNvHp7.js} +2 -2
  182. package/screenshot-page/assets/eR9_DaySoB72PvMo.js +1 -0
  183. package/screenshot-page/assets/{CtiTwHzd_ZSzd3W2.js → hB5riGkPy0wXVIig.js} +1 -1
  184. package/screenshot-page/assets/hHvAGynpTvAb97GX.js +1 -0
  185. package/screenshot-page/assets/jFfcyGJ9xruiOUyS.js +1 -0
  186. package/screenshot-page/assets/{DmDFKv_3APEWI-IY.js → jKvAZg0Tp701aw1o.js} +2 -2
  187. package/screenshot-page/assets/{DACSL7FA_J91Z_H7.js → jteb4n23QwBT9m_4.js} +1 -1
  188. package/screenshot-page/assets/mzrDp0emvkWnkXBt.js +1 -0
  189. package/screenshot-page/index.html +15 -15
  190. package/types/scripting-api.json +1 -1
  191. package/types/scripting.d.ts +2 -2
  192. package/assets/6CBUVbF01Bedq0e2.js +0 -199
  193. package/assets/Dfv_T_PQVL0O3lu5.js +0 -14
  194. package/screenshot-page/assets/BDRMUi2BsnBqytIq.js +0 -2
  195. package/screenshot-page/assets/BEjJHVSbtlsNtoq7.js +0 -3
  196. package/screenshot-page/assets/BIuMiduMHSsTGacU.js +0 -2
  197. package/screenshot-page/assets/BPMQ22uISGOm3ymr.js +0 -1
  198. package/screenshot-page/assets/Bxq4FCQhyPbVhhaR.js +0 -2
  199. package/screenshot-page/assets/CNB6WmYfGVZjlCKV.js +0 -5
  200. package/screenshot-page/assets/CXeJV1BW2CVemhPE.js +0 -1
  201. package/screenshot-page/assets/CkxmJxdtjBIxYoMq.js +0 -1
  202. package/screenshot-page/assets/D43IayseD2Cy8OZo.js +0 -4
  203. package/screenshot-page/assets/D8KyhLvfyjLZW92H.js +0 -39
  204. package/screenshot-page/assets/DBxAatsD6aWk7Zb6.js +0 -586
  205. package/screenshot-page/assets/DMhOGCTy8V0N14gY.js +0 -1
  206. package/screenshot-page/assets/DSTlKGmqncM7XHeW.js +0 -1
  207. package/screenshot-page/assets/Dh14XQinAphjZOKC.js +0 -1
  208. package/screenshot-page/assets/Dt8JxbBBr2TeDflQ.js +0 -1
  209. package/screenshot-page/assets/Dxi-bXNjS-CpC5Qr.js +0 -1
  210. package/screenshot-page/assets/Oay0yGsGYgJDzy8r.js +0 -1
  211. package/screenshot-page/assets/QZg76Jflu3Q808W3.js +0 -1
  212. package/screenshot-page/assets/WTrYzPnMQhYDILMR.js +0 -1
  213. package/screenshot-page/assets/qFyplGXRu7IepHio.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.24
2
+ * @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v1.0.0
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 "./DMDTS0LH9Ke9t-3z.js";
8
- import { a as i, r as a } from "./TZnuVwhVjkOBax9F.js";
9
- import { A as c, at as d, mt as h, p as u, sn as _, v as f, z as g } from "./B16G2473LTkZP6Mq.js";
10
- import { a as p, f as m, l as S, m as w, p as E, u as I } from "./DRzZ4bEyLRGVOLzV.js";
11
- import { $t as y, A as v, Aa as x, An as C, Ba as b, Bi as R, C as A, Ci as k, Ct as N, D as M, Da as F, Dr as D, E as T, Ea as G, En as B, Et as V, F as O, Fa as P, Fn as z, Ft as L, G as $, Ga as H, Gt as j, H as K, Ha as q, Ir as W, Ja as U, Jn as X, Jr as J, Ka as Z, Ki as Q, Li as Y, Ln as tt, Mn as et, Mr as nt, Ni as rt, Nr as ot, Or as st, P as lt, Pn as it, Pr as at, Pt as ct, Q as dt, Qi as ht, R as ut, Ri as _t, T as ft, Ta as gt, V as pt, Vn as mt, Wi as St, Wr as wt, X as Et, Y as It, Yr as yt, Z as vt, Zi as xt, Zn as Ct, Zr as bt, _n as Rt, _t as At, a as kt, ao as Nt, bt as Mt, ci as Ft, cn as Dt, cr as Tt, ct as Gt, da as Bt, di as Vt, dt as Ot, ea as Pt, eo as zt, f as Lt, fn as $t, gn as Ht, gr as jt, h as Kt, ha as qt, hi as Wt, hn as Ut, hr as Xt, ht as Jt, i as Zt, in as Qt, it as Yt, j as te, ja as ee, ka as ne, ki as re, kr as oe, lo as se, m as le, mi as ie, mr as ae, nt as ce, o as de, oo as he, pr as ue, qn as _e, r as fe, ra as ge, ri as pe, ro as me, rr as Se, s as we, sa as Ee, sr as Ie, t as ye, tn as ve, to as xe, tr as Ce, ut as be, va as Re, vr as Ae, w as ke, wi as Ne, wn as Me, wt as Fe, xi as De, xr as Te, y as Ge, yi as Be, yn as Ve } from "./C9iFJ52KwQTePQ81.js";
12
- import { _ as Oe, a as Pe, c as ze, d as Le, f as $e, g as He, h as je, i as Ke, l as qe, m as We, n as Ue, o as Xe, p as Je, r as Ze, s as Qe, u as Ye } from "./B-5mBXpY9i6-eCrZ.js";
13
- import { c as tn, i as en, n as nn, o as rn, s as on, t as sn } from "./CnI4Nli8vtWdFKvf.js";
14
- import { C as ln, E as an, O as cn, _ as dn, a as hn, b as un, d as _n, m as fn, r as gn, u as pn } from "./BrJd9jVVv9SQzZol.js";
15
- import { n as mn } from "./6CBUVbF01Bedq0e2.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 "./DzYvbv5u7E2H7IoB.js";
8
+ import { a as i, r as a } from "./BaZAIwIrqn1x69WH.js";
9
+ import { $ as c, Dt as d, I as h, Nt as u, Xt as _, n as f, sn as g } from "./8hLtXHueDl7B_SEn.js";
10
+ import { a as p, f as m, l as S, m as w, p as E, u as I } from "./8mWHFnE0j-CaNsxr.js";
11
+ import { $a as y, $i as v, $r as x, A as C, An as b, At as R, Ba as A, C as k, Ca as N, Cr as M, Di as F, Ea as D, En as T, F as G, Fa as B, Fi as V, Fr as O, Ft as P, Gi as z, Ha as L, Ht as $, Ia as H, In as j, Ji as K, Jn as q, Jt as U, K as X, Ki as W, Kr as J, Kt as Y, La as Q, Li as Z, Ni as tt, Nr as et, Nt as nt, Oi as rt, On as ot, Or as st, P as lt, Pa as it, Qi as at, Qt as ct, Ri as dt, S as ht, Sa as ut, Tt as _t, U as ft, Ui as gt, Un as pt, Ur as mt, Vi as St, Vr as wt, Wr as Et, X as It, Xa as yt, Xi as vt, Xt as xt, Ya as Ct, Yi as bt, Yn as Rt, Yr as At, Z as kt, Zr as Nt, _ as Mt, _i as Ft, _n as Dt, _r as Tt, _t as Gt, aa as Bt, ai as Vt, an as Ot, ao as Pt, bi as zt, bn as Lt, co as $t, dn as Ht, ea as jt, et as Kt, fi as qt, fo as Ut, gi as Xt, ha as Wt, hr as Jt, it as Yt, ja as Qt, jt as Zt, k as te, l as ee, lt as ne, mn as re, mo as oe, mr as se, na as le, nn as ie, no as ae, nr as ce, o as de, oa as he, oi as ue, oo as _e, or as fe, q as ge, qt as pe, ra as me, s as Se, sa as we, si as Ee, tn as Ie, tr as ye, u as ve, ur as xe, ut as Ce, vi as be, wi as Re, wn as Ae, wr as ke, xa as Ne, xn as Me, xt as Fe, yt as De, za as Te, zn as Ge, zr as Be, zt as Ve } from "./Dcw7GSCgw_dgsum7.js";
12
+ import { c as Oe, i as Pe, n as ze, o as Le, s as $e, t as He } from "./B5rrqMYFybo3oW9k.js";
13
+ import { _ as je, a as Ke, c as qe, d as Ue, f as Xe, g as We, h as Je, i as Ye, l as Qe, m as Ze, n as tn, o as en, p as nn, r as rn, s as on, u as sn } from "./q6advQx4x6PXvl0i.js";
14
+ import { C as ln, E as an, O as cn, _ as dn, a as hn, b as un, d as _n, m as fn, r as gn, u as pn } from "./DvHZEP1wpb6549uf.js";
15
+ import { n as mn } from "./DCWHNfq5qCxvALwe.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 be({
23
+ t = new Z({
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 N;
79
+ if (null == r) return Ie;
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 N;
82
- const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ? x(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 Ie;
82
+ const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ? v(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 ? it : (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 ? It : (a = !0, W(0, 0, r, s, l)),
86
86
  [Symbol.iterator]() {
87
87
  return this;
88
88
  },
89
- return: (t) => it,
90
- throw: (t) => it
89
+ return: (t) => It,
90
+ throw: (t) => It
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 me(this._options2D), this._mapScopeTo2Ds.set(t, e), this._last2DKey = t, this._last2DMap = e), e;
246
+ return e || (e = new nt(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 ??= Wt(this);
266
+ return this._asFunction ??= Se(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 (yt(t)) throw t;
304
+ if (N(t)) throw t;
305
305
  return I.isError(t) ? t : new I.Value(t?.message, { cause: t });
306
306
  }
307
307
  };
@@ -342,17 +342,17 @@ var Sn = class e {
342
342
  const s = "display" === o, l = this._compiled;
343
343
  if (l.error && !l.ast) return l.error.input;
344
344
  let i = void 0 !== r ? un(l.ast, r) : l.getTokens();
345
- i = Kt(i, l.symbols, !s, s, s ? {
345
+ i = ke(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() : q;
351
- return n ? oe(i, this._getEntireCoords?.(), a) : Ht(i, this._getEntireCoords?.(), t, e, a);
350
+ const a = s ? this._displayLocale() : Pt;
351
+ return n ? Mt(i, this._getEntireCoords?.(), a) : F(i, this._getEntireCoords?.(), t, e, a);
352
352
  }
353
353
  _displayLocale() {
354
354
  const t = this._context.getRuntime().getLocaleProfile();
355
- return v(he(t.decimal));
355
+ return te(Ct(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 === le.Cell ? i = { ...o[n.value] } : n.op === le.Named ? i = { nameId: n.node.value.nameId } : n.op === le.TableReference && (i = { table: { ...n.node.value } });
399
+ } else n.node.type === M.Cell ? i = { ...o[n.value] } : n.op === M.Named ? i = { nameId: n.node.value.nameId } : n.op === M.TableReference && (i = { table: { ...n.node.value } });
400
400
  s[t] = i;
401
401
  }
402
402
  return s;
@@ -408,7 +408,7 @@ var Sn = class e {
408
408
  getTokensAt(t, e, n) {
409
409
  const r = this._compiled;
410
410
  let o = void 0 !== n ? un(r.ast, n) : r.getTokens();
411
- return o = Kt(o, r.symbols, !1, !0), te(o, t, e);
411
+ return o = ke(o, r.symbols, !1, !0), C(o, t, e);
412
412
  }
413
413
  getError() {
414
414
  return this._compiled.error ?? null;
@@ -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 oe(n, o) === oe(r, o);
465
+ return Mt(n, o) === Mt(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 = Zt(s);
470
+ const l = n.referencesExecute, i = n.referencesRelative, a = gt(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 === le.Cell) {
486
+ } else if (r.node.type === M.Cell) {
487
487
  const t = i[r.value];
488
488
  a[n] = { ...t };
489
- } else if (r.op === le.Named) {
490
- const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(Fe.NamedFormula, t)?.toString() ?? t;
489
+ } else if (r.op === M.Named) {
490
+ const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(ie.NamedFormula, t)?.toString() ?? t;
491
491
  a[n] = { nameId: e };
492
- } else if (r.op === le.TableReference) {
492
+ } else if (r.op === M.TableReference) {
493
493
  const o = r.node.value;
494
494
  let s = this._resolveStructuredRef(o, t, e);
495
495
  !s || I.isError(s) ? a[n] = null : a[n] = {
496
496
  ...s,
497
497
  tableId: o.tableId
498
498
  };
499
- } else r.op === le.Error && (a[n] = null);
499
+ } else r.op === M.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 : Ve(n, t, e);
505
+ return 0 === n.length ? r.EmptyArray : _e(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 === le.Named, f = 2 === u.length;
535
+ const d = a[c], h = d.node, u = h.inputs ?? r.EmptyArray, _ = d.op === M.Named, f = 2 === u.length;
536
536
  let g, p, m = !1;
537
537
  n && I.isError(n) && (n = null), n && "nameId" in n && !_ && (n = null);
538
538
  const S = n && "nameId" in n ? null : n, w = !!S && void 0 !== S.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 === le.TableReference) x = h.evalIndex;
565
+ else if (d.op === M.TableReference) x = h.evalIndex;
566
566
  else {
567
567
  if (!_) throw new Error(`Invalidate reference index: ${e}`);
568
568
  C = h.evalIndex;
@@ -572,31 +572,31 @@ 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(Fe.Sheet, r) ? null : r;
575
+ if (r) return e && !e.resolve(ie.Sheet, r) ? null : r;
576
576
  }
577
577
  return null;
578
- }, R = h, A = this._compiled.ast, k = ft(A, (t) => {
578
+ }, R = h, A = this._compiled.ast, k = Bt(A, (t) => {
579
579
  if (!t || !t.isReference) return;
580
- if (E && t === R) return pt(g);
580
+ if (E && t === R) return Lt(g);
581
581
  const e = t.type;
582
- if (-1 !== C && t.evalIndex === C && e === le.Named) {
583
- if (!n) return we();
582
+ if (-1 !== C && t.evalIndex === C && e === M.Named) {
583
+ if (!n) return O();
584
584
  if (n && "nameId" in n) {
585
- const e = n, r = this._compiled.symbols?.bind(Fe.NamedFormula, e.nameId) ?? e.nameId, o = { ...t };
585
+ const e = n, r = this._compiled.symbols?.bind(ie.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 m ? ye(":", pt(g), pt(p), !0) : pt(g);
592
+ return m ? wt(":", Lt(g), Lt(p), !0) : Lt(g);
593
593
  }
594
- if (-1 !== x && t.evalIndex === x && e === le.TableReference) return n ? m ? ye(":", pt(g), pt(p), !0) : pt(g) : we();
594
+ if (-1 !== x && t.evalIndex === x && e === M.TableReference) return n ? m ? wt(":", Lt(g), Lt(p), !0) : Lt(g) : O();
595
595
  if (!n && an.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;
598
598
  if (s || l) {
599
- const e = we(void 0, void 0, b(n, o));
599
+ const e = O(void 0, void 0, b(n, o));
600
600
  return e.evalIndex = t.evalIndex, e;
601
601
  }
602
602
  }
@@ -607,8 +607,8 @@ var Sn = class e {
607
607
  if (n) if (f === m) {
608
608
  let e = l ? g : p;
609
609
  s = { ...t }, s.value = e, s.image = null;
610
- } else s = ye(":", pt(g), pt(p), !0);
611
- else s = we(void 0, void 0, b(t)), s.evalIndex = t.evalIndex;
610
+ } else s = wt(":", Lt(g), Lt(p), !0);
611
+ else s = O(void 0, void 0, b(t)), s.evalIndex = t.evalIndex;
612
612
  return s;
613
613
  }
614
614
  });
@@ -617,9 +617,9 @@ var Sn = class e {
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(Fe.Sheet, e), l = r.transform((t, e) => {
620
+ const r = this._compiled, o = this._gridId, s = this._compiled.symbols.bind(ie.Sheet, e), l = r.transform((t, e) => {
621
621
  if (!t || !t.isReference) return;
622
- if (t.type !== le.Cell) return;
622
+ if (t.type !== M.Cell) return;
623
623
  if (ln(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 !== le.Cell) return;
634
+ if (t.type !== M.Cell) return;
635
635
  if (ln(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 !== le.TableReference) return;
644
+ if (t?.type !== M.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 I.BuiltIn.Ref;
655
655
  const s = this._resolvers?.getNamedFormulaBlock?.(r);
656
656
  if (!s) {
657
- const t = this._compiled, e = t.symbols?.resolve(Fe.NamedFormula, r), n = e ? e.toString() : r, o = t.getFunction?.(n) ?? null;
657
+ const t = this._compiled, e = t.symbols?.resolve(ie.NamedFormula, r), n = e ? e.toString() : r, o = t.getFunction?.(n) ?? null;
658
658
  return o ? new vn(o) : I.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 === le.Named) {
697
+ if (o === M.Named) {
698
698
  f[r.index] = this._resolveNamedPrecedents(r.node.value, t, e);
699
699
  continue;
700
700
  }
701
- if (o === le.Error) {
702
- f[r.index] = W(r.node.value);
701
+ if (o === M.Error) {
702
+ f[r.index] = L(r.node.value);
703
703
  continue;
704
704
  }
705
- if (o === le.TableReference) {
705
+ if (o === M.TableReference) {
706
706
  const n = r.node.value;
707
707
  let o;
708
708
  n && (o = this._resolveStructuredRef(n, t, e)), o || (o = I.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 ? I.BuiltIn.Value : mt(l, a);
733
- } else if (":" === o || ".:." === o || ":." === o || ".:" === o) i = Ie(l, a);
732
+ i = t && this._gridId && t !== this._gridId ? I.BuiltIn.Value : Re(l, a);
733
+ } else if (":" === o || ".:." === o || ":." === o || ".:" === o) i = q(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) || I.isError(t) || (i = i ? Ie(i, t) : t);
738
+ void 0 === t || Array.isArray(t) || I.isError(t) || (i = i ? q(i, t) : t);
739
739
  }
740
740
  }
741
741
  f[r.index] = i ?? I.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 === le.Error) h = W(e.node.value);
765
+ if (s === M.Error) h = L(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 (ft(s.ast, (t) => {
794
+ if (Bt(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) {
@@ -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 === le.Named) if (r.node.deferredResolve) l[r.node.evalIndex] = null;
811
+ if (s) if (s === M.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 === le.Error) l[i.evalIndex] = W(r.node.value);
817
- else if (s === le.TableReference) {
816
+ else if (s === M.Error) l[i.evalIndex] = L(r.node.value);
817
+ else if (s === M.TableReference) {
818
818
  const n = r.node.value;
819
819
  let s;
820
820
  s = n ? this._resolveStructuredRef(n, t, e) : I.BuiltIn.Ref, I.isError(s) || void 0 === s?.colStart ? l[i.evalIndex] = s ?? I.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 === le.Error) return this;
833
+ if (s.type === M.Error) return this;
834
834
  if ("@" === s.value) return this;
835
835
  if (!r) return this;
836
- const l = K(n) + zt(e);
836
+ const l = Me(n) + R(e);
837
837
  if (r.has(l)) return this;
838
- const i = G("@", s, !0), a = hn(o.runtime, o.symbols, i, !1, o.error, o.getFunction);
838
+ const i = bt("@", s, !0), a = hn(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 le.Infix: {
845
+ case M.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 k(!0 === t.snapsCancellation ? Me(e, r) : e, null);
850
+ return it(!0 === t.snapsCancellation ? Ae(e, r) : e, null);
851
851
  }
852
852
  if (!t.isReference) {
853
853
  if (r && I.isError(r)) return r;
854
854
  if (o && I.isError(o)) return o;
855
855
  }
856
856
  const i = t.fn ?? (t.fn = !0 === t.snapsCancellation ? cn[t.value] : _n[t.value]);
857
- return c = i ? i(s, r, o) : I.BuiltIn.Value, c = k(c, null), c;
857
+ return c = i ? i(s, r, o) : I.BuiltIn.Value, c = it(c, null), c;
858
858
  }
859
- case le.Function: {
859
+ case M.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 = xt.enter();
863
+ const s = Ft.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 xt && (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 Ft && (c = c._force());
866
866
  } finally {
867
- xt.leave(s);
867
+ Ft.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 le.Prefix:
876
- case le.Postfix: {
875
+ case M.Prefix:
876
+ case M.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 && I.isError(n)) return n;
879
- const r = t.fn ?? (t.fn = a === le.Prefix ? fn[t.value] : dn[t.value]);
879
+ const r = t.fn ?? (t.fn = a === M.Prefix ? fn[t.value] : dn[t.value]);
880
880
  return c = r ? r(s, n) : I.BuiltIn.Value, c;
881
881
  }
882
- case le.List:
883
- case le.Paren: {
882
+ case M.List:
883
+ case M.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 && P(n.scope)) return I.BuiltIn.Name;
887
+ if (null !== n && "object" == typeof n && Kt(n.scope)) return I.BuiltIn.Name;
888
888
  }
889
889
  let t = !1;
890
- for (let n = 0; n < i; n++) if (Qt(e[l[n].evalIndex])) {
890
+ for (let n = 0; n < i; n++) if (b(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
- Qt(r) ? t.push(...r) : t.push(r);
898
+ b(r) ? t.push(...r) : t.push(r);
899
899
  }
900
- const n = Zt(t.length);
900
+ const n = gt(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 = Zt(i);
904
+ const n = gt(i);
905
905
  for (let t = 0; t < i; t++) n[t] = e[l[t].evalIndex];
906
906
  return n;
907
907
  }
908
- case le.Named: {
908
+ case M.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 le.TableReference: return e[t.evalIndex] ?? null;
925
- case le.Call: {
924
+ case M.TableReference: return e[t.evalIndex] ?? null;
925
+ case M.Call: {
926
926
  const n = e[l[0].evalIndex];
927
927
  return n && I.isError(n) ? n : (c = this._applyCallee(n, t, e), c);
928
928
  }
929
- case le.Empty: return;
929
+ case M.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 : Qt(o)) && (a = !0);
939
+ !a && (!0 === o?.isIRange ? o.size > 1 : b(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] : xt.deferred(l, a, this, e, n, r, o, s) : n[e.evalIndex];
950
+ Fn[a] = !0 === e?.lazyArg ? i ? i[a] : Ft.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 I.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 === le.Empty;
975
+ const s = e[t], i = t >= o || r[t + 1]?.type === M.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 === le.Empty ? void 0 : n[r[t].evalIndex]);
982
+ for (let t = 1; t < r.length; t++) e.push(r[t]?.type === M.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) || "boolean" == typeof t ? I.BuiltIn.Ref : I.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 k(s, this._context);
998
+ return it(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 (I.isError(t)) return t;
1022
- if (yt(t)) throw t;
1022
+ if (N(t)) throw t;
1023
1023
  return t instanceof RangeError ? I.BuiltIn.Num : new I.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
- ft(this._compiled.ast, (n, r, o) => {
1035
+ Bt(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
- ft(t, (t) => {
1044
+ Bt(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 (yt(t)) throw t;
1084
+ if (N(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 (yt(t)) throw t;
1114
+ if (N(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 (Q(t)) return I.BuiltIn.Calc;
1126
+ if (Qt(t)) return I.BuiltIn.Calc;
1127
1127
  if (p(t)) return I.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 (yt(t)) throw t;
1135
+ if (N(t)) throw t;
1136
1136
  return I.isError(t) ? t : new I.Value(t?.message, { cause: t });
1137
1137
  }
1138
1138
  if (Array.isArray(t) && t.isSheetSpan) return I.BuiltIn.Ref;
1139
1139
  if (Array.isArray(t)) {
1140
- if (Qt(t)) {
1141
- const e = Zt(t.length);
1140
+ if (b(t)) {
1141
+ const e = gt(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 = k(t, e)) && (t = 0)) : (n = t, Cn.has(n) || (t = t.fillEmpty(0))) : null === (t = k(t, e)) && (t = 0), t;
1153
+ return t?.isIRange ? t.size <= 1 ? (t = 0 === t.size ? null : t.getValueAt(0, 0, Mn), null === (t = it(t, e)) && (t = 0)) : (n = t, Cn.has(n) || (t = t.fillEmpty(0))) : null === (t = it(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) : oe(t.getTokens(), null);
1163
+ return e?.node ? this.getTextAt(e.node.rowIndex, e.node.colIndex) : Mt(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 === le.Empty && (Fn[n] = xn);
1206
+ for (let n = 0; n < e; n++) t[n]?.type === M.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) => I.isError(t) ? t : t instanceof RangeError ? I.BuiltIn.Num : new I.Value(t?.message, { cause: t }), Bn = ue(4096), Vn = 0, On = () => Bn, Pn = (t, e) => {
1210
+ }, Gn = (t) => I.isError(t) ? t : t instanceof RangeError ? I.BuiltIn.Num : new I.Value(t?.message, { cause: t }), Bn = vt(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 = ue(Math.max(r, 2 * Bn.length));
1214
+ const t = vt(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, 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) => {
1229
+ }, $n = 32, Hn = 64, jn = 128, Kn = 768, qn = 3072, Un = 12288, Xn = 16384, Wn = 32768, Jn = 65536, Yn = 1 << 17, Qn = 1 << 18, Zn = 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 = et.peek();
1378
+ const s = ge.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 I.BuiltIn.Value;
@@ -1406,11 +1406,11 @@ var Nn = (t, e, n, r, o, s, l) => {
1406
1406
  colStart: o,
1407
1407
  colEnd: o
1408
1408
  });
1409
- new rn().fill(s, new Uint32Array(t, n[o], r));
1409
+ new Le().fill(s, new Uint32Array(t, n[o], r));
1410
1410
  }
1411
1411
  }
1412
1412
  constructor(t, e, n, r, o, s, l) {
1413
- this._cellsByColumn = /* @__PURE__ */ new Map(), this._errors = new nn(), this._values = /* @__PURE__ */ new Map(), this._leafCount = 0, this._withRecords = null, this._wasm = t, this._request = e, this._result = n, this._n = r, this._createColumn = l;
1413
+ this._cellsByColumn = /* @__PURE__ */ new Map(), this._errors = new ze(), this._values = /* @__PURE__ */ new Map(), this._leafCount = 0, this._withRecords = null, this._wasm = t, this._request = e, this._result = n, this._n = r, this._createColumn = l;
1414
1414
  const i = n.row_nodes();
1415
1415
  this._rows = gr(o, i), this._columns = gr(s, n.column_nodes()), this._recordCount = i.length > 0 ? i[4] : 0;
1416
1416
  }
@@ -1437,7 +1437,7 @@ var Nn = (t, e, n, r, o, s, l) => {
1437
1437
  }
1438
1438
  getAggregate(t, e, n, r) {
1439
1439
  if (!e.isBuiltIn()) return;
1440
- const o = on[e.getName().toUpperCase()];
1440
+ const o = $e[e.getName().toUpperCase()];
1441
1441
  if (void 0 === o) return;
1442
1442
  let s = this._values.get(t);
1443
1443
  if (void 0 === s && (s = this._addValues(t), this._values.set(t, s)), null === s || o >= 7 && !s.numeric) return;
@@ -1458,7 +1458,7 @@ var Nn = (t, e, n, r, o, s, l) => {
1458
1458
  doubles: new Float64Array(o, n, e),
1459
1459
  ints: new Int32Array(o, n, 2 * e),
1460
1460
  types: new Uint8Array(o, n + 8 * e, e)
1461
- }, { ok: l, numeric: i } = tn(t, s, this._errors);
1461
+ }, { ok: l, numeric: i } = Oe(t, s, this._errors);
1462
1462
  return l ? {
1463
1463
  leaf: r,
1464
1464
  numeric: i,
@@ -1468,7 +1468,7 @@ var Nn = (t, e, n, r, o, s, l) => {
1468
1468
  _run(t, e) {
1469
1469
  const n = this._request;
1470
1470
  n.clear_measures(), n.add_measure(t, e);
1471
- const r = n.compute(0, !1), o = r.values(0), s = en(this._buffer(), o, this._errors), l = r.cell_count(), i = new Array(l);
1471
+ const r = n.compute(0, !1), o = r.values(0), s = Pe(this._buffer(), o, this._errors), l = r.cell_count(), i = new Array(l);
1472
1472
  for (let t = 0; t < l; t++) i[t] = s(t);
1473
1473
  return o.free(), r.free(), i;
1474
1474
  }
@@ -1674,7 +1674,7 @@ function jr(t, e, n = 0, r = 0) {
1674
1674
  const i = t.rowIndex + r, a = t.colIndex + n;
1675
1675
  if (i < o.rowStart || i > o.rowEnd || a < o.colStart || a > o.colEnd) return;
1676
1676
  const c = e.nodeAt(i, a);
1677
- $e(c).fixedRef = 0 === n && 0 === r ? l : {
1677
+ Xe(c).fixedRef = 0 === n && 0 === r ? l : {
1678
1678
  colStart: l.colStart + n,
1679
1679
  rowStart: l.rowStart + r,
1680
1680
  colEnd: l.colEnd + n,
@@ -1693,10 +1693,10 @@ var Kr = {
1693
1693
  rowStart: 0,
1694
1694
  colEnd: 0,
1695
1695
  rowEnd: 0
1696
- }, Wr = {
1696
+ }, Ur = {
1697
1697
  bounds: qr,
1698
1698
  reuseResult: !0
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 : {
1699
+ }, Xr = (t, e) => t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex, Wr = (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,14 +1707,14 @@ var Kr = {
1707
1707
  colEnd: 0,
1708
1708
  rowEnd: 0,
1709
1709
  scope: null
1710
- }, Zr = null, Qr = null, Yr = {
1710
+ }, Yr = null, Qr = null, Zr = {
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 = Zr;
1717
+ const e = Yr;
1718
1718
  let n = t ?? Qr;
1719
1719
  if (null === n) return null;
1720
1720
  let r = e.getGrid(n);
@@ -1727,7 +1727,7 @@ var Kr = {
1727
1727
  const s = e.getFormulas();
1728
1728
  return {
1729
1729
  values: r.getValues(),
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))
1730
+ searchFormulas: (t) => (Zr.colStart = t.colStart, Zr.rowStart = t.rowStart, Zr.colEnd = t.colEnd, Zr.rowEnd = t.rowEnd, Zr.scope = n, s.search(Zr))
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 be({ axis: E.Axis.Column }), e = this._anchor;
1787
+ const t = new Z({ axis: E.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() {
@@ -1833,7 +1833,7 @@ var Kr = {
1833
1833
  return;
1834
1834
  }
1835
1835
  qr.rowStart = l, qr.rowEnd = i, qr.colStart = a, qr.colEnd = c;
1836
- const h = d.entries(Wr);
1836
+ const h = d.entries(Ur);
1837
1837
  let u = h.next();
1838
1838
  for (; !u.done;) {
1839
1839
  const t = u.value[1];
@@ -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 ht.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 be.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 = Ie(Kr, Jr, a);
1892
+ const d = q(Kr, Jr, a);
1893
1893
  o[n] = d ?? I.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
- Zr = this._container, Qr = this.gridId;
1909
+ Yr = this._container, Qr = this.gridId;
1910
1910
  try {
1911
1911
  n = Vr(this._template, this.ref, to);
1912
1912
  } finally {
1913
- Zr = null, Qr = null;
1913
+ Yr = 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 = Zt(r);
1984
- for (let t = 0; t < r; t++) s[t] = Zt(o);
1983
+ const t = this.ref, e = t.rowStart, n = t.colStart, r = t.rowEnd - e + 1, o = t.colEnd - n + 1, s = gt(r);
1984
+ for (let t = 0; t < r; t++) s[t] = gt(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 = Zt(n.rowEnd - s + 1), h = n.colEnd - o + 1, u = d.length;
2000
+ const d = gt(n.rowEnd - s + 1), h = n.colEnd - o + 1, u = d.length;
2001
2001
  for (let n = 0; n < u; n++) {
2002
- const l = Zt(h), u = l.length;
2002
+ const l = gt(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 = 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;
2053
+ return null !== s && (s.spillDependents = r.EmptyArray, s.spillRowEnd = -1, s.spillColEnd = -1, s.fixedRef = Wr(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: Xr(s.fixedRef, e - t.rowIndex, n - t.colIndex),
2065
+ fixedRef: Wr(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 = Zt(i);
2090
+ c = gt(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 = Zt(i);
2105
+ const d = this.gridId, h = gt(i);
2106
2106
  for (let e = 0; e < i; e++) {
2107
- const n = Zt(a);
2107
+ const n = gt(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 ht.Builder();
2124
+ const c = i.rowStart + l.originRow, d = i.colStart + l.originCol, h = n - c, u = r - d, _ = new be.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(Ur);
2143
- const a = new ht.Builder();
2142
+ i.sort(Xr);
2143
+ const a = new be.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 [Ne(n), this.formula.getTextAt(n.rowStart, n.colStart, t)];
2153
+ return [xe(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 be({
2548
+ } : o, l = new Z({
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 De(this._runtime, l, {
2553
+ return new B(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 wt.assertUsable("calcs", 0), n = this._container, r = n.getRuntime();
2587
- this._runtime = new _t("Calculation Runtime", {
2586
+ const e = await Nt.assertUsable("calcs", 0), n = this._container, r = n.getRuntime();
2587
+ this._runtime = new Jt("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 = Mt(this._runtime, m.Number, qt);
2594
- const { initializeFunctions: o } = await import("./xD41vsQY6h60lCqz.js"), s = this, l = Object.freeze(o(() => s, this._functionProviders)), a = new ke({
2593
+ }, e), this._calcScope = n.getScope(), this._coerceToNumber = Gt(this._runtime, m.Number, Tt);
2594
+ const { initializeFunctions: o } = await import("./BR4Wpxs0eSlaoLOl.js"), s = this, l = Object.freeze(o(() => s, this._functionProviders)), a = new me({
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(Fe.Sheet, e);
2603
+ const n = this._container, r = n.getSymbols().bind(ie.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 = Z(t);
2645
+ const e = ve(t);
2646
2646
  if (void 0 !== e) {
2647
2647
  const t = this._functions.getByName(e);
2648
2648
  if (t && !t.isLambda()) return t;
@@ -2654,7 +2654,7 @@ var Kr = {
2654
2654
  return this._functions._getStamp();
2655
2655
  }
2656
2656
  getNumberFormat(t, e) {
2657
- return h.getEngine().format(t, e, {
2657
+ return _.getEngine().format(t, e, {
2658
2658
  date1904: this.getRuntime().isDate1904(),
2659
2659
  locale: this.getRuntime().getLocale()
2660
2660
  }).text;
@@ -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(Fe.Sheet, n) : this._calcScope.gridId, !o) return null;
2668
+ if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(ie.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 I.Value("defer needs an executor function");
2683
2683
  const n = this._container.getDeferred?.();
2684
- if (n) return Ot(n.defer(t, e, Vt(), M())), n.previous;
2685
- Ot(null);
2684
+ if (n) return dt(n.defer(t, e, At(), we())), n.previous;
2685
+ dt(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 U)) return t;
2692
+ if (!(t?.isIReferenceRange && t instanceof Ot)) 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(Fe.Sheet, t.scope) : this._calcScope.gridId;
2703
+ return t.scope ? this._container.getSymbols().bind(ie.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(Fe.Sheet, this._calcScope.gridId);
2747
+ const t = this._container.getSymbols().resolve(ie.Sheet, this._calcScope.gridId);
2748
2748
  e = t ? t.getName ? t.getName() ?? void 0 : t.toString() : void 0;
2749
2749
  }
2750
2750
  }
@@ -2754,22 +2754,22 @@ var Kr = {
2754
2754
  return this._container.getSheetCount?.() ?? 1;
2755
2755
  }
2756
2756
  isValidDate(t, e = !1) {
2757
- return g(t, e);
2757
+ return c(t, e);
2758
2758
  }
2759
2759
  fromSerialDate(t, e = !1) {
2760
- return c(e ? Math.floor(t) : t, this.getRuntime().isDate1904());
2760
+ return g(e ? Math.floor(t) : t, this.getRuntime().isDate1904());
2761
2761
  }
2762
2762
  toSerialDate(t, e = !1) {
2763
- const n = _(t, this.getRuntime().isDate1904());
2763
+ const n = f(t, this.getRuntime().isDate1904());
2764
2764
  return e ? Math.floor(n) : n;
2765
2765
  }
2766
2766
  getDateParts(t, e) {
2767
- const n = f(t, this.getRuntime().isDate1904(), e);
2767
+ const n = d(t, this.getRuntime().isDate1904(), e);
2768
2768
  if (null === n) throw I.BuiltIn.Num;
2769
2769
  return n;
2770
2770
  }
2771
2771
  getSerialDate(t, e, n, r = 0, o = 0, s = 0, l = 0) {
2772
- return u({
2772
+ return h({
2773
2773
  year: t,
2774
2774
  month: e,
2775
2775
  day: n,
@@ -2782,7 +2782,7 @@ var Kr = {
2782
2782
  }, this.getRuntime().isDate1904());
2783
2783
  }
2784
2784
  getNow() {
2785
- return _(new Date(this.getRuntime().getNow()), this.getRuntime().isDate1904());
2785
+ return f(new Date(this.getRuntime().getNow()), this.getRuntime().isDate1904());
2786
2786
  }
2787
2787
  getRandom() {
2788
2788
  const t = this._calcScope;
@@ -2794,33 +2794,33 @@ 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(Fe.Sheet, r), n = t?.getName ? t.getName() : null;
2797
+ const t = null === r ? null : this._container.getSymbols().resolve(ie.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 ot.compare(t, e, this.getRuntime().getLocaleProfile(), n);
2804
+ return Te.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 = de(t.bounds, !0), s = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), l = new be({
2808
+ const o = Et(t.bounds, !0), s = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), l = new Z({
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 De(this._runtime, l, o, i, n, r);
2814
+ return new B(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(Fe.Sheet, n), P(i)) return I.BuiltIn.Ref;
2820
+ if (i = s.getSymbols().bind(ie.Sheet, n), Kt(i)) return I.BuiltIn.Ref;
2821
2821
  } else i = l.gridId;
2822
2822
  if (!i) return I.BuiltIn.Ref;
2823
- const c = l.node, d = c ? je(c) : r.EmptyArray, h = d.length;
2823
+ const c = l.node, d = c ? Je(c) : r.EmptyArray, h = d.length;
2824
2824
  for (let n = 0; n < h; n++) {
2825
2825
  const r = d[n];
2826
2826
  if (!r) continue;
@@ -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 = Pt(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 = y(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(Fe.Sheet, n) : o.gridId;
2844
+ s = n ? r.getSymbols().bind(ie.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 be({
2874
+ } : r, s = new Z({
2875
2875
  axis: this._axis,
2876
2876
  maxCoords: o
2877
2877
  });
2878
- let l = new De(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 De(this._runtime, s, {
2878
+ let l = new B(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 B(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 De(this._runtime, new Sn(t, {
2908
+ return new B(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 I.BuiltIn.Value;
2921
2921
  r = [t];
2922
2922
  }
2923
- const l = this._axis, i = l === E.Axis.Column, a = this._fromTuples(st(r, i, Ce(0, 0, void 0, void 0, i), !0), e, n, !s);
2923
+ const l = this._axis, i = l === E.Axis.Column, a = this._fromTuples(ue(r, i, Q(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 be({
2925
+ const c = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), d = new Z({
2926
2926
  axis: l,
2927
2927
  maxCoords: c
2928
2928
  }), h = e ? { type: e } : void 0;
2929
- return new De(this._runtime, d, o.EmptyRange, h, n);
2929
+ return new B(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 = T(t, r, ie, () => {
2961
+ let n = he(t, r, de, () => {
2962
2962
  throw I.BuiltIn.Ref;
2963
2963
  }, e);
2964
2964
  if (n.length > 1) throw I.BuiltIn.Ref;
@@ -2994,7 +2994,7 @@ var Kr = {
2994
2994
  if (!t) throw I.BuiltIn.Ref;
2995
2995
  let a = t.scope;
2996
2996
  if (a) {
2997
- if (a = r.getSymbols().bind(Fe.Sheet, t.scope), !a) return I.BuiltIn.Ref;
2997
+ if (a = r.getSymbols().bind(ie.Sheet, t.scope), !a) return I.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 I.BuiltIn.Name;
@@ -3011,7 +3011,7 @@ var Kr = {
3011
3011
  scope: a
3012
3012
  };
3013
3013
  if (r.isGridless?.(a)) {
3014
- const t = new be({ axis: this._axis });
3014
+ const t = new Z({ axis: this._axis });
3015
3015
  return this._toReference(t, e, void 0, a, !1, null);
3016
3016
  }
3017
3017
  t = e;
@@ -3025,14 +3025,14 @@ var Kr = {
3025
3025
  let d;
3026
3026
  const h = n.node;
3027
3027
  let u = -1;
3028
- if (h && (u = co(je(h), t)), -1 !== u) {
3028
+ if (h && (u = co(Je(h), t)), -1 !== u) {
3029
3029
  const e = zn(h, u);
3030
3030
  if (null != e && e.isIReferenceRange) d = e;
3031
3031
  else if (void 0 === e || c.isPendingOverlay) d = this._toReference(c, t, i, o, !1, lo(c, s));
3032
3032
  else {
3033
3033
  let n = e;
3034
3034
  null !== n && n.isIRange && (n = n.getValueAt(0, 0));
3035
- const r = new be({
3035
+ const r = new Z({
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 || !P(e.scope)) return null;
3057
+ if (void 0 === e.colStart || !Kt(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 U(this._runtime, t, e, void 0, r, this._container.resolveScope);
3079
+ const n = new Ot(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 I.BuiltIn.Ref;
@@ -3086,14 +3086,14 @@ 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 ? ae(t, n, e) : kt(t, n, e);
3089
+ return void 0 !== t.colIndex ? z(t, n, e) : mt(t, n, e);
3090
3090
  }
3091
3091
  parseAsSerialDate(t, e) {
3092
3092
  if (void 0 === t) return;
3093
3093
  if ("number" == typeof t) return t;
3094
3094
  if (I.isError(t)) throw t;
3095
3095
  if ("string" != typeof t) throw I.BuiltIn.Value;
3096
- const n = d(this._runtime, t, e);
3096
+ const n = u(this._runtime, t, e);
3097
3097
  if (null === n) throw I.BuiltIn.Value;
3098
3098
  return n;
3099
3099
  }
@@ -3143,30 +3143,30 @@ var Kr = {
3143
3143
  return pr.create(t, e, this._createSparseColumn, n);
3144
3144
  }
3145
3145
  getPivotAt(t) {
3146
- if (!(t instanceof U)) return null;
3146
+ if (!(t instanceof Ot)) 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++) {
3150
3150
  const n = r[t], o = n.range;
3151
3151
  if (e.rowStart > o.rowEnd || e.rowEnd < o.rowStart || e.colStart > o.colEnd || e.colEnd < o.colStart) continue;
3152
3152
  const s = n.block?.anchor;
3153
- if (!s || !n.block.blocked) return sn(n);
3153
+ if (!s || !n.block.blocked) return He(n);
3154
3154
  const l = e.rowStart <= s.row && e.rowEnd >= s.row && e.colStart <= s.column && e.colEnd >= s.column;
3155
- return sn(n, l ? "blocked" : "wanted");
3155
+ return He(n, l ? "blocked" : "wanted");
3156
3156
  }
3157
3157
  return null;
3158
3158
  }
3159
3159
  parseAsLiteral(t) {
3160
- return B(t) ?? ct(t);
3160
+ return T(t) ?? ne(t);
3161
3161
  }
3162
3162
  toText(t) {
3163
- return It(t, this._runtime);
3163
+ return X(t, this._runtime);
3164
3164
  }
3165
3165
  getRuntime() {
3166
3166
  return this._runtime;
3167
3167
  }
3168
3168
  createRichData(t, e) {
3169
- return Jt.fromJSON({
3169
+ return xt.fromJSON({
3170
3170
  type: t,
3171
3171
  data: e
3172
3172
  }, this._container.getRichDataContext?.());
@@ -3291,7 +3291,7 @@ function So(t, e, n) {
3291
3291
  colEnd: a[1]
3292
3292
  };
3293
3293
  }
3294
- var wo = class extends At {
3294
+ var wo = class extends ct {
3295
3295
  constructor(t) {
3296
3296
  const e = (t = { ...t }).container;
3297
3297
  super({
@@ -3299,15 +3299,15 @@ var wo = class extends At {
3299
3299
  send: (t, n, r) => e.sendRequest(t, n, r),
3300
3300
  calculation: t.calculation
3301
3301
  }), 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;
3302
- const n = { ...Ae }, o = t.getEntireCoords ?? (() => n);
3302
+ const n = { ...$t }, o = t.getEntireCoords ?? (() => n);
3303
3303
  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");
3304
3304
  const s = t?.onCalculated;
3305
3305
  this._onCalculated = s ? (t) => {
3306
- s($(V.results(t, "onCalculated"), this._container.getImager(this._gridId)));
3307
- } : () => {}, this._values = new be({
3306
+ s($(ot.results(t, "onCalculated"), this._container.getImager(this._gridId)));
3307
+ } : () => {}, this._values = new Z({
3308
3308
  axis: E.Axis.Column,
3309
- createRun: ze
3310
- }), this._iterationId = 0, this._contentfulSpatial = new me({ updateEntryOptions: {
3309
+ createRun: qe
3310
+ }), this._iterationId = 0, this._contentfulSpatial = new nt({ updateEntryOptions: {
3311
3311
  isSplitOnExpand: !0,
3312
3312
  isMergeOnShift: !0
3313
3313
  } });
@@ -3315,7 +3315,7 @@ var wo = class extends At {
3315
3315
  isSplitOnExpand: !0,
3316
3316
  isMergeOnShift: !1
3317
3317
  } };
3318
- this._spillSpatial = new me(l), this._errorSpatial = new me(l), this._calcStatusSpatial = new me(l), this._circularSpatial = new me(l), this._notifyValues = new me(), this._notifyBlank = null, this._notifySpillsInsert = [], this._notifySpillsRemove = [], this._notifyFormats = new me(), this._notifyCalcStatus = new me(), this._notifyCircular = new me(), this._touchedFormulas = [], this._container.registerGrid(this), this._publishMaps();
3318
+ this._spillSpatial = new nt(l), this._errorSpatial = new nt(l), this._calcStatusSpatial = new nt(l), this._circularSpatial = new nt(l), this._notifyValues = new nt(), this._notifyBlank = null, this._notifySpillsInsert = [], this._notifySpillsRemove = [], this._notifyFormats = new nt(), this._notifyCalcStatus = new nt(), this._notifyCircular = new nt(), this._touchedFormulas = [], this._container.registerGrid(this), this._publishMaps();
3319
3319
  }
3320
3320
  _land(t, e) {
3321
3321
  return this._container.landRequest(t, () => (void 0 !== t && this._versionMaps(t), e()));
@@ -3441,7 +3441,7 @@ var wo = class extends At {
3441
3441
  cycleId: this._container.getCycleId(),
3442
3442
  commitId: t.commitId
3443
3443
  };
3444
- const r = Ut(t.destination, t.coords, t.fitDestination, t.transpose);
3444
+ const r = re(t.destination, t.coords, t.fitDestination, t.transpose);
3445
3445
  return r.scope = this._gridId, this._land(e, () => {
3446
3446
  t.isCut ? this._moveTo(n, t.coords, r) : this._copyTo(n, t.coords, r);
3447
3447
  const e = this._mutationResults(t.commitId);
@@ -3567,8 +3567,8 @@ var wo = class extends At {
3567
3567
  const e = this, n = this.getId(), r = { ...t };
3568
3568
  r.range = { ...r.range }, r.range.scope = n, delete r.onShift;
3569
3569
  const o = e._values, s = r.range, l = r.direction, i = l === E.Direction.Left || l === E.Direction.Right, a = l === E.Direction.Down || l === E.Direction.Right, c = a ? 1 : -1, d = e._spillSpatial, h = e._contentfulSpatial;
3570
- nt(d, s, i, a);
3571
- const u = [], _ = this._container.getPrecedents().search(s), f = O(s, d, o, h, void 0, !1, !1, void 0, (t, e, r, o) => {
3570
+ ht(d, s, i, a);
3571
+ const u = [], _ = this._container.getPrecedents().search(s), f = G(s, d, o, h, void 0, !1, !1, void 0, (t, e, r, o) => {
3572
3572
  u.push({
3573
3573
  colStart: t,
3574
3574
  rowStart: e,
@@ -3586,7 +3586,7 @@ var wo = class extends At {
3586
3586
  colEnd: i && 1 === c ? S.colEnd : s.colEnd,
3587
3587
  rowEnd: i || 1 !== c ? s.rowEnd : S.rowEnd,
3588
3588
  scope: n
3589
- }, I = a ? ge(m, w) : Y(m, s);
3589
+ }, I = a ? ae(m, w) : se(m, s);
3590
3590
  I && (Po(p, m, I.formulas.inserts, I.formulas.removes), e._touchFormulas(I.formulas.removes), e._touchFormulas(I.formulas.inserts));
3591
3591
  const y = i ? s.colEnd - s.colStart + 1 : s.rowEnd - s.rowStart + 1, v = y * c, x = {
3592
3592
  colStart: s.colStart,
@@ -3596,7 +3596,7 @@ var wo = class extends At {
3596
3596
  scope: n
3597
3597
  };
3598
3598
  let C;
3599
- const b = Ge(() => m, () => {
3599
+ const b = st(() => m, () => {
3600
3600
  const t = g.getDynamics();
3601
3601
  return C = new Map(t), C;
3602
3602
  }, x, {
@@ -3688,9 +3688,9 @@ var wo = class extends At {
3688
3688
  let h = c;
3689
3689
  for (let r = 0; r < d.length; r++) {
3690
3690
  const o = d[r];
3691
- if (!at(o)) continue;
3691
+ if (!A(o)) continue;
3692
3692
  let s = l.get(o);
3693
- void 0 === s && (s = pe(o, t, e, n) ?? null, l.set(o, s)), null !== s && (h = h.replaceScopeIds(o, s));
3693
+ void 0 === s && (s = Ee(o, t, e, n) ?? null, l.set(o, s)), null !== s && (h = h.replaceScopeIds(o, s));
3694
3694
  }
3695
3695
  h !== c && (i.push(o), a.push({
3696
3696
  ...o,
@@ -3806,7 +3806,7 @@ var wo = class extends At {
3806
3806
  l || (l = /* @__PURE__ */ new Map(), Eo.set(r, l));
3807
3807
  let i = l.get(e);
3808
3808
  if (!i) {
3809
- const t = L(r);
3809
+ const t = Ce(r);
3810
3810
  i = 0 === e ? t : (n, r) => t(n + e, r) - e, l.set(e, i);
3811
3811
  }
3812
3812
  return i;
@@ -3837,7 +3837,7 @@ var wo = class extends At {
3837
3837
  columns: e.anchor.column - n.colStart
3838
3838
  }, i = {
3839
3839
  ...n,
3840
- value: new ce(n, l, "pivot", s)
3840
+ value: new j(n, l, "pivot", s)
3841
3841
  };
3842
3842
  o.insert(i), this._notifySpillsInsert.push(i);
3843
3843
  }
@@ -3962,7 +3962,7 @@ var wo = class extends At {
3962
3962
  }
3963
3963
  this._pushWithSpills(h, w);
3964
3964
  }
3965
- return h = Yt(h, 2, t.Row), h.sort(o.rowFirstRangeComparator), h;
3965
+ return h = Ge(h, 2, t.Row), h.sort(o.rowFirstRangeComparator), h;
3966
3966
  }
3967
3967
  _pushWithSpills(t, e) {
3968
3968
  t.push(e);
@@ -4030,7 +4030,7 @@ var wo = class extends At {
4030
4030
  }
4031
4031
  f.push(...C);
4032
4032
  }
4033
- return f = Yt(f, 2, t.Row), f.sort(o.rowFirstRangeComparator), f;
4033
+ return f = Ge(f, 2, t.Row), f.sort(o.rowFirstRangeComparator), f;
4034
4034
  }
4035
4035
  _directAcrossGrids(t, e) {
4036
4036
  const n = this._gridId, o = t.scope, s = o && o !== n ? this._container.getGrid(o) ?? null : this;
@@ -4051,11 +4051,11 @@ var wo = class extends At {
4051
4051
  return i;
4052
4052
  }
4053
4053
  getDependentsAt(t) {
4054
- const e = Tt(t, (t) => this._directAcrossGrids(t, !0));
4054
+ const e = Rt(t, (t) => this._directAcrossGrids(t, !0));
4055
4055
  return e.sort(o.rowFirstRangeComparator), e;
4056
4056
  }
4057
4057
  getPrecedentsAt(t) {
4058
- const e = Tt(t, (t) => this._directAcrossGrids(t, !1));
4058
+ const e = Rt(t, (t) => this._directAcrossGrids(t, !1));
4059
4059
  return e.sort(o.rowFirstRangeComparator), e;
4060
4060
  }
4061
4061
  _graphNeighborsNow(t, e, n) {
@@ -4166,16 +4166,16 @@ var wo = class extends At {
4166
4166
  if ("scalar" === o) {
4167
4167
  let o = t.evaluateAt(e, n, r);
4168
4168
  if (o && void 0 !== o.colStart) o = t.finalizeValue(o);
4169
- else if (Qt(o)) return t.finalizeValue(o);
4170
- const s = k(o, this._context);
4169
+ else if (b(o)) return t.finalizeValue(o);
4170
+ const s = it(o, this._context);
4171
4171
  return null === s ? 0 : s;
4172
4172
  }
4173
- return He(t.finalizeValue(t.evaluateAt(e, n, r)));
4173
+ return We(t.finalizeValue(t.evaluateAt(e, n, r)));
4174
4174
  }
4175
4175
  _setReferenceNow(t, e, n, r) {
4176
4176
  const o = this._formulaAt(t, e);
4177
4177
  let s = r;
4178
- r && void 0 !== r.colStart ? s = re(s, t, e) : r && void 0 !== r.colIndex && (s = xe(s, t, e));
4178
+ r && void 0 !== r.colStart ? s = Ve(s, t, e) : r && void 0 !== r.colIndex && (s = Zt(s, t, e));
4179
4179
  const l = o.value.formula.setReferenceAt(n, s).getTextAt(t, e);
4180
4180
  return this._land(void 0, () => {
4181
4181
  l ? this._setInputsNow(null, [{
@@ -4196,7 +4196,7 @@ var wo = class extends At {
4196
4196
  _setReferenceModeNow(t, e, n, r, o) {
4197
4197
  const s = this.getReferencesAt(t, e)[n];
4198
4198
  if (!s || "nameId" in s) throw new Error(`Reference at index ${n} is not a cell reference and cannot have its style changed.`);
4199
- return this._setReferenceNow(t, e, n, z(s, r, o));
4199
+ return this._setReferenceNow(t, e, n, kt(s, r, o));
4200
4200
  }
4201
4201
  _isVolatileNow(t, e) {
4202
4202
  const n = this._formulaAt(t, e);
@@ -4231,7 +4231,7 @@ var wo = class extends At {
4231
4231
  rowStart: u,
4232
4232
  colEnd: o,
4233
4233
  rowEnd: f,
4234
- value: new ce(g, 0, e.value.getKind())
4234
+ value: new j(g, 0, e.value.getKind())
4235
4235
  });
4236
4236
  }
4237
4237
  return {
@@ -4244,7 +4244,7 @@ var wo = class extends At {
4244
4244
  if (0 === o) return;
4245
4245
  const s = this._container, l = n ?? this._gridId, i = null != n ? l : e ?? l, a = s.getScope();
4246
4246
  a.gridId = i;
4247
- const c = e ? s.getSymbols().resolve(Fe.Sheet, e)?.toString() : void 0, d = this._context;
4247
+ const c = e ? s.getSymbols().resolve(ie.Sheet, e)?.toString() : void 0, d = this._context;
4248
4248
  for (let n = 0; n < o; n++) {
4249
4249
  const o = t[n], h = o.value, u = h.ref, _ = h.formula.getTextAt(u.rowStart, u.colStart);
4250
4250
  a.colIndex = u.colStart, a.rowIndex = u.rowStart;
@@ -4280,7 +4280,7 @@ var wo = class extends At {
4280
4280
  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) {
4281
4281
  const o = a - I, g = c - y, p = d - v, m = h - x;
4282
4282
  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);
4283
- const w = vt(t, Mo, Dt);
4283
+ const w = pe(t, Mo, Wt);
4284
4284
  if (w) {
4285
4285
  const e = w.length;
4286
4286
  t = w[e - 1], n = t.value, r = n.ref, s = r.colStart, l = r.rowStart, i = r.colEnd, u = r.rowEnd;
@@ -4304,7 +4304,7 @@ var wo = class extends At {
4304
4304
  this._removeNow(n);
4305
4305
  const a = this._container, c = a.getPrecedents().clone(), d = a.getFormulas().clone();
4306
4306
  a.setPrecedents(c), a.setFormulas(d);
4307
- const h = ut(c, e, n);
4307
+ const h = Dt(c, e, n);
4308
4308
  h && (Po(d, c, h.formulas.inserts, h.formulas.removes), this._touchFormulas(h.formulas.removes), this._touchFormulas(h.formulas.inserts));
4309
4309
  const u = { cutFrom: e }, _ = i.createCopiedEntries(e, n, u).inserts, f = _.length, g = this._gridId;
4310
4310
  if (g !== l) {
@@ -4352,7 +4352,7 @@ var wo = class extends At {
4352
4352
  }
4353
4353
  let p;
4354
4354
  Po(d, c, _), this._touchFormulas(_);
4355
- const m = $t(c, () => {
4355
+ const m = Ht(c, () => {
4356
4356
  const t = a.getDynamics();
4357
4357
  return p = new Map(t), p;
4358
4358
  }, e, n);
@@ -4374,7 +4374,7 @@ var wo = class extends At {
4374
4374
  t.values.copyTo(S, {
4375
4375
  colIndex: n.colStart,
4376
4376
  rowIndex: n.rowStart
4377
- }, e), ne(this._errorSpatial, S, n);
4377
+ }, e), at(this._errorSpatial, S, n);
4378
4378
  const w = t.spillSpatial;
4379
4379
  let y = [], v = [];
4380
4380
  for (let t = 0; t < f; t++) {
@@ -4387,7 +4387,7 @@ var wo = class extends At {
4387
4387
  const t = (t, e) => {
4388
4388
  t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
4389
4389
  };
4390
- rt(a.getCycleId(), v, r.EmptyArray, s._contentfulSpatial, s._spillSpatial, s._values, (t, e, n, r) => {
4390
+ et(a.getCycleId(), v, r.EmptyArray, s._contentfulSpatial, s._spillSpatial, s._values, (t, e, n, r) => {
4391
4391
  x.push({
4392
4392
  colStart: t,
4393
4393
  rowStart: e,
@@ -4433,7 +4433,7 @@ var wo = class extends At {
4433
4433
  }
4434
4434
  }
4435
4435
  e && (t = i.concat(e)), t.sort(o.columnFirstRangeComparator);
4436
- const n = new ht.Builder((t, e) => new dt.ArrayList(t.slice(0, e)));
4436
+ const n = new be.Builder((t, e) => new U.ArrayList(t.slice(0, e)));
4437
4437
  let r;
4438
4438
  const s = !0 === this._container.getDeferred?.()?.hasHolders(), a = this._values, c = a.getAxis() === E.Axis.Column, d = t.length;
4439
4439
  for (let e = 0; e < d; e++) {
@@ -4530,9 +4530,9 @@ var wo = class extends At {
4530
4530
  const i = e.search(o), a = i.length;
4531
4531
  for (let e = 0; e < a; e++) {
4532
4532
  let r = i[e];
4533
- if (Be(o.rowStart, o.colStart, r) && (s || r.value.getCycleId() === t)) {
4533
+ if (fe(o.rowStart, o.colStart, r) && (s || r.value.getCycleId() === t)) {
4534
4534
  m || (m = [], n = /* @__PURE__ */ new Set());
4535
- const t = K(r.colStart) + zt(r.rowStart);
4535
+ const t = Me(r.colStart) + R(r.rowStart);
4536
4536
  if (n.has(t)) continue;
4537
4537
  n.add(t);
4538
4538
  const e = r.value.getBlockedCoords() ?? o;
@@ -4567,7 +4567,7 @@ var wo = class extends At {
4567
4567
  if (t && t.tuples) {
4568
4568
  I = t.tuples;
4569
4569
  let e = t.bounds;
4570
- if (e ? (y = de(e, f), y.scope = l) : y = {
4570
+ if (e ? (y = Et(e, f), y.scope = l) : y = {
4571
4571
  colStart: Number.MIN_SAFE_INTEGER,
4572
4572
  rowStart: Number.MIN_SAFE_INTEGER,
4573
4573
  colEnd: Number.MAX_SAFE_INTEGER,
@@ -4590,19 +4590,19 @@ var wo = class extends At {
4590
4590
  t.minorStart = n[0];
4591
4591
  const r = n[1];
4592
4592
  t.minorEnd = t.minorStart + r.length - 1;
4593
- const s = de(t, f);
4593
+ const s = Et(t, f);
4594
4594
  s.scope = l, x && c.search(s).length > 0 && x.push(s);
4595
4595
  }
4596
4596
  }
4597
4597
  }
4598
- v = Se(t.tuples, f, l);
4598
+ v = pt(t.tuples, f, l);
4599
4599
  }
4600
4600
  const C = (t, e) => {
4601
4601
  t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
4602
4602
  };
4603
4603
  if (n || I) {
4604
4604
  let t;
4605
- n && (t = O(n, g, _, S, C, !1, !0, this._notifyValues, (t, e, n, r) => {
4605
+ n && (t = G(n, g, _, S, C, !1, !0, this._notifyValues, (t, e, n, r) => {
4606
4606
  w.push({
4607
4607
  colStart: t,
4608
4608
  rowStart: e,
@@ -4610,7 +4610,7 @@ var wo = class extends At {
4610
4610
  rowEnd: r,
4611
4611
  scope: l
4612
4612
  });
4613
- })), rt(-1, n ? [n] : r.EmptyArray, v, S, g, _, (t, e, n, r) => {
4613
+ })), et(-1, n ? [n] : r.EmptyArray, v, S, g, _, (t, e, n, r) => {
4614
4614
  w.push({
4615
4615
  colStart: t,
4616
4616
  rowStart: e,
@@ -4618,7 +4618,7 @@ var wo = class extends At {
4618
4618
  rowEnd: r,
4619
4619
  scope: l
4620
4620
  });
4621
- }, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n), J(p, n)), t?.(), I && (_.setValues(I), Ct(p, I, f));
4621
+ }, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n), ut(p, n)), t?.(), I && (_.setValues(I), H(p, I, f));
4622
4622
  }
4623
4623
  const b = i.getScope();
4624
4624
  let R, A, k, N, M;
@@ -4626,7 +4626,7 @@ var wo = class extends At {
4626
4626
  const n = t.rowStart, r = t.colStart;
4627
4627
  b && (b.rowIndex = n, b.colIndex = r);
4628
4628
  const o = i.createFormulaBlock(l, a, e, n, r), c = new no(t, l, o, i, this._unanchored), d = s?.arrayFixed;
4629
- d && d.colStart === r && d.rowStart === n && ($e(c.getAnchorNode()).fixedRef = {
4629
+ d && d.colStart === r && d.rowStart === n && (Xe(c.getAnchorNode()).fixedRef = {
4630
4630
  colStart: d.colStart,
4631
4631
  rowStart: d.rowStart,
4632
4632
  colEnd: d.colEnd,
@@ -4660,31 +4660,31 @@ var wo = class extends At {
4660
4660
  }
4661
4661
  });
4662
4662
  }, T = x ? x.length : 0;
4663
- let G;
4663
+ let B;
4664
4664
  if (u > 0) {
4665
- G = Zt(u);
4665
+ B = gt(u);
4666
4666
  for (let t = 0; t < u; t++) {
4667
4667
  const n = e[t], r = n.value, s = o.sanitizeRange(n);
4668
- G[t] = s, null !== r && F(s, r);
4668
+ B[t] = s, null !== r && F(s, r);
4669
4669
  }
4670
4670
  }
4671
- const B = s?.cloneKey ?? null;
4672
- (T > 0 || u > 0) && (k = i.getFormulas().clone(B));
4671
+ const V = s?.cloneKey ?? null;
4672
+ (T > 0 || u > 0) && (k = i.getFormulas().clone(V));
4673
4673
  for (let t = 0; t < T; t++) D(x[t]);
4674
- for (let t = 0; t < u; t++) D(G[t]);
4675
- const V = A ? A.length : 0;
4676
- if (V > 0) {
4674
+ for (let t = 0; t < u; t++) D(B[t]);
4675
+ const O = A ? A.length : 0;
4676
+ if (O > 0) {
4677
4677
  const t = i.getDynamics();
4678
4678
  let e = null;
4679
- for (let n = 0; n < V; n++) {
4679
+ for (let n = 0; n < O; n++) {
4680
4680
  const r = A[n].value, o = t.get(r);
4681
- o && (N || (N = i.getPrecedents().clone(B)), N.removeAll(o, Go), e || (e = new Map(t)), e.delete(r));
4681
+ o && (N || (N = i.getPrecedents().clone(V)), N.removeAll(o, Go), e || (e = new Map(t)), e.delete(r));
4682
4682
  }
4683
4683
  e && i.setDynamics(e);
4684
4684
  }
4685
4685
  let P = [];
4686
4686
  if (R || A) {
4687
- N || (N = i.getPrecedents().clone(B)), Po(k, N, R, A), M && Lo(N, M, null);
4687
+ N || (N = i.getPrecedents().clone(V)), Po(k, N, R, A), M && Lo(N, M, null);
4688
4688
  const t = R ? this._joinInserted(k, N, R, (t) => {
4689
4689
  w.push({
4690
4690
  colStart: t.colStart,
@@ -4712,8 +4712,8 @@ var wo = class extends At {
4712
4712
  }
4713
4713
  }
4714
4714
  return n;
4715
- }(A, x, G) : A;
4716
- rt(-1, e, R, S, g, _, (t, e, n, r) => {
4715
+ }(A, x, B) : A;
4716
+ et(-1, e, R, S, g, _, (t, e, n, r) => {
4717
4717
  w.push({
4718
4718
  colStart: t,
4719
4719
  rowStart: e,
@@ -4781,7 +4781,7 @@ var wo = class extends At {
4781
4781
  const s = n[o];
4782
4782
  if (!a(s) || !d(s)) continue;
4783
4783
  h = !1;
4784
- const l = X(c, s, (t, e, n, r) => {
4784
+ const l = ce(c, s, (t, e, n, r) => {
4785
4785
  if (!a(t) || !a(e)) return;
4786
4786
  const o = {
4787
4787
  colStart: n.colStart,
@@ -4832,8 +4832,8 @@ var wo = class extends At {
4832
4832
  const e = t.data;
4833
4833
  this._values.setValues(e);
4834
4834
  const n = this._values.getAxis() === E.Axis.Column;
4835
- Ct(this._errorSpatial, e, n);
4836
- const r = Se(e, n, this._gridId);
4835
+ H(this._errorSpatial, e, n);
4836
+ const r = pt(e, n, this._gridId);
4837
4837
  this._contentfulSpatial.load(r);
4838
4838
  }
4839
4839
  const e = this._gridId, n = this._container, r = n.getPrecedents(), o = n.getFormulas(), s = {
@@ -4845,9 +4845,9 @@ var wo = class extends At {
4845
4845
  if (c) {
4846
4846
  const t = c.length;
4847
4847
  for (let e = 0; e < t; e++) {
4848
- const t = c[e], n = t[0], r = Bt(n, s).split(":")[0];
4848
+ const t = c[e], n = t[0], r = oe(n, s).split(":")[0];
4849
4849
  d.add(r);
4850
- const o = j(t, s);
4850
+ const o = _t(t, s);
4851
4851
  o && h.add(`${o.rowStart},${o.colStart}`);
4852
4852
  }
4853
4853
  }
@@ -4855,7 +4855,7 @@ var wo = class extends At {
4855
4855
  m.colIndex = 0, m.rowIndex = 0, m.gridId = e;
4856
4856
  const S = n.isLegacyIntersect();
4857
4857
  for (let t = 0; t < u; t++) {
4858
- const r = j(l[t], s);
4858
+ const r = _t(l[t], s);
4859
4859
  r.scope = e;
4860
4860
  const o = r.value, i = r.rowStart, a = r.colStart;
4861
4861
  m.colIndex = a, m.rowIndex = i;
@@ -4869,7 +4869,7 @@ var wo = class extends At {
4869
4869
  for (let t = 0; t < w; t++) {
4870
4870
  const n = g[t];
4871
4871
  if (I.isError(n)) continue;
4872
- const o = Lt(b[t], bo[t], Co[t]), s = o.$absColEnd, l = o.$absRowEnd, i = {
4872
+ const o = Be(b[t], bo[t], Co[t]), s = o.$absColEnd, l = o.$absRowEnd, i = {
4873
4873
  colStart: n.colStart,
4874
4874
  rowStart: n.rowStart,
4875
4875
  colEnd: n.colEnd + (s ? 0 : v),
@@ -4892,7 +4892,7 @@ var wo = class extends At {
4892
4892
  if (o.load(_), r.load(f), n.bumpCalcEpochs(!0), i.formulaInserts = this._formulaRecords(_), c) {
4893
4893
  const t = [], l = [], a = /* @__PURE__ */ new Map(), d = this._values, h = c.length;
4894
4894
  for (let n = 0; n < h; n++) {
4895
- const r = j(c[n], s), i = r.value ?? "dynamic", h = "error" === i, u = r.colStart, _ = r.rowStart;
4895
+ const r = _t(c[n], s), i = r.value ?? "dynamic", h = "error" === i, u = r.colStart, _ = r.rowStart;
4896
4896
  Ro.colStart = u, Ro.rowStart = _, Ro.colEnd = u, Ro.rowEnd = _, Ro.scope = e;
4897
4897
  const f = o.search(Ro);
4898
4898
  if (1 !== f.length) continue;
@@ -4902,13 +4902,13 @@ var wo = class extends At {
4902
4902
  colEnd: S,
4903
4903
  rowEnd: w
4904
4904
  };
4905
- "fixed" === i && ($e(m).fixedRef = E, p.densify()), m.cachedValue = h ? I.BuiltIn.Spill : new De(g, d, E);
4905
+ "fixed" === i && (Xe(m).fixedRef = E, p.densify()), m.cachedValue = h ? I.BuiltIn.Spill : new B(g, d, E);
4906
4906
  const y = {
4907
4907
  colStart: u,
4908
4908
  rowStart: _,
4909
4909
  colEnd: S,
4910
4910
  rowEnd: w,
4911
- value: new ce(E, 0, i)
4911
+ value: new j(E, 0, i)
4912
4912
  };
4913
4913
  l.push(y), t.push({
4914
4914
  colStart: u,
@@ -4916,7 +4916,7 @@ var wo = class extends At {
4916
4916
  colEnd: S,
4917
4917
  rowEnd: w,
4918
4918
  value: i
4919
- }), D(a, m, E, -2);
4919
+ }), Vt(a, m, E, -2);
4920
4920
  }
4921
4921
  if (this._spillSpatial.load(l), a.size > 0) {
4922
4922
  r.load(Array.from(a.values()).flat()), n.bumpCalcEpochs(!1);
@@ -4933,12 +4933,12 @@ var wo = class extends At {
4933
4933
  t.add(e), e.state |= Hn, e.block.calcOnLoad = !0;
4934
4934
  }, r = new Array(y);
4935
4935
  for (let t = 0; t < y; t++) {
4936
- const n = E[t], l = _e(n, s);
4936
+ const n = E[t], l = ye(n, s);
4937
4937
  r[t] = { ...l };
4938
4938
  const i = o.search(l), a = i.length;
4939
4939
  for (let t = 0; t < a; t++) {
4940
4940
  const n = i[t];
4941
- se(n, l, e);
4941
+ yt(n, l, e);
4942
4942
  }
4943
4943
  }
4944
4944
  this._markDirtyRegionsNow(r), w = !0;
@@ -5016,7 +5016,7 @@ var wo = class extends At {
5016
5016
  }
5017
5017
  _toJSONNow(e) {
5018
5018
  let n = this._container.getFormulas().getSpatialAt(this._gridId)?.all(), r = n ? n.length : 0;
5019
- r > 0 && (n = y(n, t.Column, 2, Bo), n.sort(o.rowFirstRangeComparator)), r = n ? n.length : 0;
5019
+ r > 0 && (n = De(n, t.Column, 2, Bo), n.sort(o.rowFirstRangeComparator)), r = n ? n.length : 0;
5020
5020
  const s = this._hiddenRows, l = this._hiddenColumns, i = this._filtered;
5021
5021
  if (0 === r && !s && !l && !i) return null;
5022
5022
  const a = {};
@@ -5033,7 +5033,7 @@ var wo = class extends At {
5033
5033
  if (d > 0) {
5034
5034
  const t = this.getEntireCoords(), e = new Array(d);
5035
5035
  for (let n = 0; n < d; n++) {
5036
- const r = c[n], o = Ne(r, t);
5036
+ const r = c[n], o = xe(r, t);
5037
5037
  e[n] = [o, r.value.getKind()];
5038
5038
  }
5039
5039
  a.formulaArray = e;
@@ -5043,7 +5043,7 @@ var wo = class extends At {
5043
5043
  if (h.size > 0) {
5044
5044
  const t = h.values();
5045
5045
  let e = t.next();
5046
- const n = this._values.getAxis() === E.Axis.Column, r = b(!0);
5046
+ const n = this._values.getAxis() === E.Axis.Column, r = Yt(!0);
5047
5047
  for (; !e.done;) {
5048
5048
  const o = e.value;
5049
5049
  if (e = t.next(), o.gridId !== u) continue;
@@ -5067,14 +5067,14 @@ var wo = class extends At {
5067
5067
  }
5068
5068
  };
5069
5069
  f.isEmpty() || n(f.all());
5070
- const r = g.isEmpty() ? [] : g.all().filter((t) => t.value === Nt.CalcStatus.Working);
5071
- r.length > 0 && n(r), p.length > 0 && n(p), _ = y(e, t.Column, 2);
5070
+ const r = g.isEmpty() ? [] : g.all().filter((t) => t.value === P.CalcStatus.Working);
5071
+ r.length > 0 && n(r), p.length > 0 && n(p), _ = De(e, t.Column, 2);
5072
5072
  }
5073
5073
  const m = _ ? _.length : 0;
5074
5074
  if (m > 0) {
5075
5075
  const t = new Array(m);
5076
5076
  for (let e = 0; e < m; e++) {
5077
- const n = _[e], r = Ne(n, this.getEntireCoords());
5077
+ const n = _[e], r = xe(n, this.getEntireCoords());
5078
5078
  t[e] = r;
5079
5079
  }
5080
5080
  a.volatile = t;
@@ -5188,25 +5188,25 @@ function Lo(t, e, n) {
5188
5188
  const s = [];
5189
5189
  for (let t = 0; t < o; t++) {
5190
5190
  const n = e[t], r = [], o = s.length;
5191
- Ft(n, s, r), s.length > o && (n.value.registeredPrecedents = s.slice(o));
5191
+ qt(n, s, r), s.length > o && (n.value.registeredPrecedents = s.slice(o));
5192
5192
  }
5193
5193
  t.load(s);
5194
5194
  }
5195
5195
  To.fill(null, 0, 10);
5196
5196
  var $o = (t) => {
5197
5197
  let e = !1;
5198
- if (ve.forEachLeaf(t, (t, n, r, o) => {
5199
- if (e || t instanceof Rt) return;
5198
+ if (Fe.forEachLeaf(t, (t, n, r, o) => {
5199
+ if (e || t instanceof rt) return;
5200
5200
  let s = n + o - r;
5201
5201
  !0 === t.isIRepeatingList && (s = Math.min(s, n + t.getPeriod() - 1));
5202
- for (let r = n; !e && r <= s; r++) e = bt(t.at(r));
5202
+ for (let r = n; !e && r <= s; r++) e = k(t.at(r));
5203
5203
  }), !e) return t;
5204
5204
  const n = t.length, r = new Array(n);
5205
- for (let e = 0; e < n; e++) r[e] = Pt(t.at(e));
5206
- return new dt.ArrayList(r);
5205
+ for (let e = 0; e < n; e++) r[e] = y(t.at(e));
5206
+ return new U.ArrayList(r);
5207
5207
  }, Ho = (t, e, n) => {
5208
5208
  const r = n?.fetchedFrom;
5209
- if (!t) return new Et({
5209
+ if (!t) return new Y({
5210
5210
  source: { buffer: e },
5211
5211
  fetchedFrom: r
5212
5212
  });
@@ -5247,18 +5247,18 @@ var $o = (t) => {
5247
5247
  }
5248
5248
  }
5249
5249
  _moved() {
5250
- A(), this._onMoved?.(this);
5250
+ le(), this._onMoved?.(this);
5251
5251
  }
5252
5252
  _final() {
5253
5253
  const t = this._onFinal;
5254
5254
  this._onFinal = null, t?.(this);
5255
5255
  }
5256
- }, Ko = (t) => t, qo = (t, e) => Jt.fromJSON({
5256
+ }, Ko = (t) => t, qo = (t, e) => xt.fromJSON({
5257
5257
  type: t,
5258
5258
  data: e
5259
- }), Wo = (t, e) => globalThis.fetch(t, e), Uo = () => {
5259
+ }), Uo = (t, e) => globalThis.fetch(t, e), Xo = () => {
5260
5260
  throw new Error("getFormulaContext() needs a workbook being calculated");
5261
- }, Xo = () => Promise.reject(/* @__PURE__ */ new Error("parseText() needs a workbook being calculated")), Jo = (t, e) => Ho(null, t, e), Zo = class {
5261
+ }, Wo = () => Promise.reject(/* @__PURE__ */ new Error("parseText() needs a workbook being calculated")), Jo = (t, e) => Ho(null, t, e), Yo = class {
5262
5262
  constructor(t, e, n, r = null, o = 100, s = Ko, l, i = null) {
5263
5263
  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;
5264
5264
  const a = this._moved;
@@ -5278,9 +5278,9 @@ var $o = (t) => {
5278
5278
  byPayload: ts,
5279
5279
  createRichData: l?.createRichData ?? qo,
5280
5280
  addResource: l?.addResource ?? Jo,
5281
- fetch: l?.fetch ?? Wo,
5282
- getFormulaContext: l?.getFormulaContext ?? Uo,
5283
- parseText: l?.parseText ?? Xo
5281
+ fetch: l?.fetch ?? Uo,
5282
+ getFormulaContext: l?.getFormulaContext ?? Xo,
5283
+ parseText: l?.parseText ?? Wo
5284
5284
  };
5285
5285
  const h = this._deferContext.fetch;
5286
5286
  this._reloadContext = {
@@ -5369,7 +5369,7 @@ var $o = (t) => {
5369
5369
  }, t);
5370
5370
  }
5371
5371
  newHolder(t, e) {
5372
- return this._holders = !0, new Gt(t, e.calls, e.direct);
5372
+ return this._holders = !0, new V(t, e.calls, e.direct);
5373
5373
  }
5374
5374
  defer(t, e, n = null, r = !1) {
5375
5375
  const o = this._scope, s = o.deferOrdinal++;
@@ -5445,11 +5445,11 @@ var $o = (t) => {
5445
5445
  const e = this._scope, n = e.node;
5446
5446
  if (!n || !this._holders || !e.gridId) return;
5447
5447
  let r = this._heldAt(e.gridId, e.rowIndex, e.colIndex);
5448
- return null === r && bt(n.cachedValue) && (r = n.cachedValue), null !== r ? r.calls[t] : void 0;
5448
+ return null === r && k(n.cachedValue) && (r = n.cachedValue), null !== r ? r.calls[t] : void 0;
5449
5449
  }
5450
5450
  }, Qo = (t, e) => {
5451
5451
  for (const n of t) n.isOpen() && n.reject(e);
5452
- }, Yo = Symbol("-0"), ts = async (t, e) => {
5452
+ }, Zo = Symbol("-0"), ts = async (t, e) => {
5453
5453
  const n = /* @__PURE__ */ new Map(), r = [], o = [];
5454
5454
  for (const e of t) {
5455
5455
  const t = e.payload;
@@ -5465,7 +5465,7 @@ var $o = (t) => {
5465
5465
  }
5466
5466
  continue;
5467
5467
  }
5468
- const s = Object.is(t, -0) ? Yo : t, l = n.get(s);
5468
+ const s = Object.is(t, -0) ? Zo : t, l = n.get(s);
5469
5469
  if (l) l.push(e);
5470
5470
  else {
5471
5471
  const r = {
@@ -5539,7 +5539,7 @@ var $o = (t) => {
5539
5539
  }
5540
5540
  _grow() {
5541
5541
  const t = this._keys, e = this._values, n = this._order, r = this.size, o = Math.max(64, 2 * (this._mask + 1));
5542
- this._keys = new Float64Array(o).fill(-1), this._values = ue(o), this._order = new Int32Array(o), this._mask = o - 1;
5542
+ this._keys = new Float64Array(o).fill(-1), this._values = vt(o), this._order = new Int32Array(o), this._mask = o - 1;
5543
5543
  for (let o = 0; o < r; o++) {
5544
5544
  const r = t[n[o]], s = Math.floor(r / ns), l = this._slotOf(s, r - s * ns, r);
5545
5545
  this._keys[l] = r, this._values[l] = e[n[o]], this._order[o] = l;
@@ -5933,7 +5933,7 @@ var is = {
5933
5933
  const e = this.getRuns(t ? { bounds: t } : void 0);
5934
5934
  let n = e.next();
5935
5935
  if (n.done) return null;
5936
- const r = new ht.Builder();
5936
+ const r = new be.Builder();
5937
5937
  for (; !n.done;) r.pushMultipleAt(n.value[0], n.value[1], n.value[2]), n = e.next();
5938
5938
  return r.build();
5939
5939
  }
@@ -6225,7 +6225,7 @@ var Es = class {
6225
6225
  }, this._passHook = (t, e, n, r, o, s) => this._onPassRead(t, e, n, r, o, !0 === s), this._taintDownstream = (t) => {
6226
6226
  if (0 !== (t.state & qn)) return;
6227
6227
  t.state = t.state & ~Kn | $n | sr | ir;
6228
- const e = $e(t);
6228
+ const e = Xe(t);
6229
6229
  e.cycleGroup = this._taintGroup, e.demandValue = Qs(t), this._addCircular(t);
6230
6230
  };
6231
6231
  }
@@ -6279,17 +6279,17 @@ var Es = class {
6279
6279
  dynamicByBlock: m,
6280
6280
  lastUpdates: new Map(S)
6281
6281
  };
6282
- const R = /* @__PURE__ */ new Map();
6282
+ const b = /* @__PURE__ */ new Map();
6283
6283
  this._addDynamicPrecedent = (t, e, n) => {
6284
- t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn), D(R, t, e, n));
6284
+ t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn), Vt(b, t, e, n));
6285
6285
  };
6286
- const A = /* @__PURE__ */ new Map(), k = (t, e) => {
6286
+ const R = /* @__PURE__ */ new Map(), A = (t, e) => {
6287
6287
  (function(t, e, n, r) {
6288
6288
  if (0 === e) return;
6289
6289
  let o, s, l, i = Rs, a = [];
6290
6290
  const c = /* @__PURE__ */ new Set(), d = () => {
6291
6291
  const t = o.build();
6292
- t && t.tuples && (l.values.setValues(t.tuples), Ct(l.errorSpatial, t.tuples, r));
6292
+ t && t.tuples && (l.values.setValues(t.tuples), H(l.errorSpatial, t.tuples, r));
6293
6293
  const e = s.done(!0);
6294
6294
  for (let t = 0; t < e.length; t++) {
6295
6295
  const n = e[t];
@@ -6315,7 +6315,7 @@ var Es = class {
6315
6315
  t.length = e, t.sort(Ns);
6316
6316
  for (let h = 0; h < e; h++) {
6317
6317
  const e = t[h], u = e.colIndex, _ = e.rowIndex, f = e.gridId;
6318
- f || console.log("nodeGridId is null", e), f !== i && (i !== Rs && d(), o = new ht.Builder(Is), s = b(r), i = f, l = n(f));
6318
+ f || console.log("nodeGridId is null", e), f !== i && (i !== Rs && d(), o = new be.Builder(Is), s = Yt(r), i = f, l = n(f));
6319
6319
  const g = u, p = _, m = e.cachedValue;
6320
6320
  m?.isIRange || (o.pushAt(g, p, m), s.append(g, p));
6321
6321
  const S = e.block, w = e.numFmt;
@@ -6336,7 +6336,7 @@ var Es = class {
6336
6336
  }
6337
6337
  });
6338
6338
  }
6339
- } else null !== w && (l.formatsConflating || (l.formatsConflating = b(r)), l.formatsConflating.append(g, p, w));
6339
+ } else null !== w && (l.formatsConflating || (l.formatsConflating = Yt(r)), l.formatsConflating.append(g, p, w));
6340
6340
  }
6341
6341
  d();
6342
6342
  })(t, e, _, !0);
@@ -6344,23 +6344,23 @@ var Es = class {
6344
6344
  const e = t[n];
6345
6345
  e.state = e.state & ~Kn | sr;
6346
6346
  }
6347
- for (const [t, e] of S) A.set(t, e);
6347
+ for (const [t, e] of S) R.set(t, e);
6348
6348
  S.clear();
6349
6349
  };
6350
- let N = r, M = Wl;
6351
- M.length = 0;
6352
- let F = 0, T = !1;
6350
+ let k = r, N = Ul;
6351
+ N.length = 0;
6352
+ let M = 0, F = !1;
6353
6353
  do {
6354
- ++y, I(), this.doMarkAndPlan(t, y, v, M);
6355
- const e = this.doEvaluate(t, _, k, N, M);
6356
- T = void 0 !== e, T && (N = !1, ++y, v.length = 0, this.doCollectDirtyCalcs(t, y, e.all(), v, c, g, w), F > 200 && (++y, I(), this.doMarkAndPlan(t, y, v, M, !0), this.doEvaluate(t, _, k, !1, M), this._hasCycle() || console.error("Too many iterations, possible cycle or leak"), T = !1)), F++;
6357
- } while (T);
6354
+ ++y, I(), this.doMarkAndPlan(t, y, v, N);
6355
+ const e = this.doEvaluate(t, _, A, k, N);
6356
+ F = void 0 !== e, F && (k = !1, ++y, v.length = 0, this.doCollectDirtyCalcs(t, y, e.all(), v, c, g, w), M > 200 && (++y, I(), this.doMarkAndPlan(t, y, v, N, !0), this.doEvaluate(t, _, A, !1, N), this._hasCycle() || console.error("Too many iterations, possible cycle or leak"), F = !1)), M++;
6357
+ } while (F);
6358
6358
  for (const t of E) {
6359
- if (R.has(t)) continue;
6359
+ if (b.has(t)) continue;
6360
6360
  const e = m.get(t);
6361
6361
  e && (g.removeAll(e, Go), m === p && (m = new Map(m)), m.delete(t));
6362
6362
  }
6363
- if (R.size > 0) if (function(t, e, n) {
6363
+ if (b.size > 0) if (function(t, e, n) {
6364
6364
  for (const e of n) if (!t.has(e)) return !1;
6365
6365
  for (const [n, r] of t) {
6366
6366
  const t = e.get(n);
@@ -6379,21 +6379,21 @@ var Es = class {
6379
6379
  }
6380
6380
  }
6381
6381
  return !0;
6382
- }(R, p, E)) g = f, m = p, R.clear();
6382
+ }(b, p, E)) g = f, m = p, b.clear();
6383
6383
  else {
6384
6384
  g === f && (g = g.clone()), m === p && (m = new Map(m));
6385
- for (const t of R.keys()) {
6385
+ for (const t of b.keys()) {
6386
6386
  const e = m.get(t);
6387
6387
  e && g.removeAll(e, Go);
6388
6388
  }
6389
- g.load(Array.from(R.values()).flat());
6390
- for (const [t, e] of R) m.set(t, e);
6391
- R.clear();
6389
+ g.load(Array.from(b.values()).flat());
6390
+ for (const [t, e] of b) m.set(t, e);
6391
+ b.clear();
6392
6392
  }
6393
6393
  return this._gridUpdates = null, this._addDynamicPrecedent = null, this._context._setDynamicReadHook(null), this._passActive = !1, u.getDeferred?.()?.flush(), {
6394
6394
  precedentSpatial: g,
6395
6395
  dynamicByBlock: m,
6396
- lastUpdates: A,
6396
+ lastUpdates: R,
6397
6397
  skippedTables: this._takeSkippedTables()
6398
6398
  };
6399
6399
  }
@@ -6406,7 +6406,7 @@ var Es = class {
6406
6406
  if (r?.isIRange && r.size > 1) {
6407
6407
  if (e.uncalculated) return;
6408
6408
  const o = t.rowIndex, s = t.colIndex;
6409
- return new De(this._container.getRuntime(), n.getValues().clone(), {
6409
+ return new B(this._container.getRuntime(), n.getValues().clone(), {
6410
6410
  rowStart: o,
6411
6411
  colStart: s,
6412
6412
  rowEnd: o + r.getRowCount() - 1,
@@ -6424,7 +6424,7 @@ var Es = class {
6424
6424
  const o = n.endEvaluation(), s = o.calls;
6425
6425
  if (0 === s.length) return e;
6426
6426
  for (let e = 0; e < s.length; e++) if (s[e].isOpen()) {
6427
- t.state |= Yn | er;
6427
+ t.state |= Zn | er;
6428
6428
  break;
6429
6429
  }
6430
6430
  const l = n.newHolder(e, o);
@@ -6450,12 +6450,12 @@ var Es = class {
6450
6450
  const a = this._container.getFormulas().search(js), c = a.length, d = null !== this._iterate, h = this._container.getScope().node, u = null !== h && 0 !== (h.state & Jn);
6451
6451
  let _ = 0, f = null, g = !1, p = !1;
6452
6452
  const m = (t) => {
6453
- if (t.cycleId !== l || t.markId !== i) return void (d || 0 === (t.state & Wn) || (s ? p = !0 : this._demandActive ? this._markDownstream(t) : f = t));
6453
+ if (t.cycleId !== l || t.markId !== i) return void (d || 0 === (t.state & Un) || (s ? p = !0 : this._demandActive ? this._markDownstream(t) : f = t));
6454
6454
  let e = t.state & Kn;
6455
6455
  if (768 !== e || g || (this._flush?.(), g = !0, e = t.state & Kn), e !== or) 0 === e || 768 === e ? cl[_++] = t : 0 !== (t.state & qn) && (s ? p = !0 : d && this._demandActive ? this._onMemberRead(t) : d || this._demandActive ? this._markDownstream(t) : f = t);
6456
6456
  else if (s) p = !0;
6457
6457
  else {
6458
- if (u || (t.state &= ~Jn), !d || !this._demandActive) throw new Pe(t);
6458
+ if (u || (t.state &= ~Jn), !d || !this._demandActive) throw new Ke(t);
6459
6459
  0 === (t.state & jn) && (t.state |= jn, _l[this._iterHitsLength++] = t);
6460
6460
  }
6461
6461
  };
@@ -6474,27 +6474,27 @@ var Es = class {
6474
6474
  }
6475
6475
  c.forEachNodeIn(d, h, u, _, m);
6476
6476
  }
6477
- if (_ > 0) throw new Le(cl, _);
6478
- if (f) throw new Ke(f);
6477
+ if (_ > 0) throw new Ue(cl, _);
6478
+ if (f) throw new Ye(f);
6479
6479
  return p;
6480
6480
  }
6481
6481
  _markDownstream(t) {
6482
6482
  const e = this._container.getScope().node;
6483
- e && 0 === (e.state & qn) && (e.state = e.state & ~qn | ir, $e(e).cycleGroup = this._resolveGroup(Zs(t)), this._addCircular(e), this._iterate && (pl[this._iterDownstreamLength++] = e));
6483
+ e && 0 === (e.state & qn) && (e.state = e.state & ~qn | ir, Xe(e).cycleGroup = this._resolveGroup(Ys(t)), this._addCircular(e), this._iterate && (pl[this._iterDownstreamLength++] = e));
6484
6484
  }
6485
6485
  _onMemberRead(t) {
6486
6486
  const e = t.state;
6487
6487
  if ((e & qn) === lr) {
6488
6488
  if (this._openGroups.has(this._resolveGroup(t.ext.cycleGroup))) return void (0 === (e & jn) && (t.state |= jn, _l[this._iterHitsLength++] = t));
6489
- } else if (this._sweeping && 0 === (e & Xn) && void 0 !== t.ext.demandValue) {
6489
+ } else if (this._sweeping && 0 === (e & Wn) && void 0 !== t.ext.demandValue) {
6490
6490
  const e = this._container.getScope().node;
6491
- if (e && ((e.state & qn) === lr || 0 !== (e.state & Xn))) return void this._sweepAlong(t, e);
6491
+ if (e && ((e.state & qn) === lr || 0 !== (e.state & Wn))) return void this._sweepAlong(t, e);
6492
6492
  }
6493
6493
  this._markDownstream(t);
6494
6494
  }
6495
6495
  _sweepAlong(t, e) {
6496
6496
  const n = t.ext, r = e.ext, o = this._resolveGroup(r.cycleGroup);
6497
- (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);
6497
+ (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 |= Wn, this._addIterMember(t, n.demandValue);
6498
6498
  }
6499
6499
  _addIterMember(t, e) {
6500
6500
  let n = this._iterMembersLength++;
@@ -6577,7 +6577,7 @@ var Es = class {
6577
6577
  };
6578
6578
  this._whatIf = c;
6579
6579
  try {
6580
- const n = Je(e, t), r = Ue({
6580
+ const n = nn(e, t), r = tn({
6581
6581
  container: e,
6582
6582
  evaluate: (t) => this._evaluateWhatIf(t),
6583
6583
  layerFor: d
@@ -6600,12 +6600,12 @@ var Es = class {
6600
6600
  if (!n) return t.cachedValue ?? null;
6601
6601
  const r = this._container.getScope();
6602
6602
  let o;
6603
- Ln(t, Ye(t)), r.gridId = t.gridId, r.node = t, r.rowIndex = t.rowIndex, r.colIndex = t.colIndex, r.drawIndex = 0;
6603
+ Ln(t, sn(t)), r.gridId = t.gridId, r.node = t, r.rowIndex = t.rowIndex, r.colIndex = t.colIndex, r.drawIndex = 0;
6604
6604
  try {
6605
6605
  const e = r.deferCount;
6606
6606
  o = n.finalizeValueForCell(n.evaluateAt(t.rowIndex, t.colIndex)), r.deferCount !== e && (o = this._takeDeferred(t, o));
6607
6607
  } catch (e) {
6608
- if (!(e instanceof ee)) throw e;
6608
+ if (!(e instanceof jt)) throw e;
6609
6609
  o = t.cachedValue ?? null;
6610
6610
  }
6611
6611
  return this._fitCell(e, o);
@@ -6643,11 +6643,11 @@ var Es = class {
6643
6643
  o.blankValue = e, o.blankCycleId = s, o.blankMarkId = l;
6644
6644
  const _ = o.getTouchedCached().blank, f = t.gridId, g = n.values, p = n.errorSpatial, m = this._container.getGrid(f);
6645
6645
  if (null !== m && null !== m.getShadowOf()) return void vs(_, n, f);
6646
- const S = g.getAxis() === E.Axis.Column, w = S ? E.Axis.Column : E.Axis.Row, I = qs, y = Ws;
6646
+ const S = g.getAxis() === E.Axis.Column, w = S ? E.Axis.Column : E.Axis.Row, I = qs, y = Us;
6647
6647
  for (let t = 0; t < _.length; t++) {
6648
- 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 Re([e], l), a = new Array(o - r + 1);
6648
+ 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 tt([e], l), a = new Array(o - r + 1);
6649
6649
  for (let t = r; t <= o; t++) a[t - r] = [t, [[s, i]]];
6650
- g.setValues(a), J(p, n), Ct(p, a, S);
6650
+ g.setValues(a), ut(p, n), H(p, a, S);
6651
6651
  const c = {
6652
6652
  colStart: n.colStart,
6653
6653
  rowStart: n.rowStart,
@@ -6657,19 +6657,19 @@ var Es = class {
6657
6657
  };
6658
6658
  I.push({
6659
6659
  ...c,
6660
- value: new tt(c, w)
6660
+ value: new zt(c, w)
6661
6661
  }), y.push(c);
6662
6662
  }
6663
6663
  n.contentfulSpatial.insertAllNonOverlapping(I), n.notifyValues.insertAllNonOverlapping(y), I.length = 0, y.length = 0, o.setBlankShared(_), this._dirtyBlankReaders(f, _, u === e ? h : null);
6664
6664
  }
6665
6665
  _dirtyBlankReaders(t, e, n) {
6666
6666
  if (null !== n && $r(e, n)) return;
6667
- const r = this._container.getPrecedents(), o = Xs, s = Js;
6667
+ const r = this._container.getPrecedents(), o = Ws, s = Js;
6668
6668
  s.scope = t;
6669
6669
  for (let t = 0; t < e.length; t++) null === n ? o.push(e[t]) : Hr(e[t], n, o);
6670
6670
  for (let e = 0; e < o.length; e++) {
6671
6671
  const n = o[e];
6672
- 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 me())).insertNonOverlapping({
6672
+ 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 nt())).insertNonOverlapping({
6673
6673
  colStart: n.colStart,
6674
6674
  rowStart: n.rowStart,
6675
6675
  colEnd: n.colEnd,
@@ -6686,7 +6686,7 @@ var Es = class {
6686
6686
  xs(t, n.blank, e);
6687
6687
  const r = t.getDemandedBlank();
6688
6688
  if (0 === r.length) return;
6689
- const o = this._fallbackDirty ?? (this._fallbackDirty = new me()), s = t.gridId, l = Us;
6689
+ const o = this._fallbackDirty ?? (this._fallbackDirty = new nt()), s = t.gridId, l = Xs;
6690
6690
  for (let t = 0; t < r.length; t++) {
6691
6691
  const e = r[t];
6692
6692
  l.push({
@@ -6705,7 +6705,7 @@ var Es = class {
6705
6705
  if (null === n) return;
6706
6706
  const r = n.blank;
6707
6707
  if (0 === r.length) return;
6708
- const o = this._fallbackDirty ?? (this._fallbackDirty = new me()), s = t.gridId, l = Us;
6708
+ const o = this._fallbackDirty ?? (this._fallbackDirty = new nt()), s = t.gridId, l = Xs;
6709
6709
  for (let t = 0; t < r.length; t++) {
6710
6710
  const e = r[t];
6711
6711
  l.push({
@@ -6753,12 +6753,12 @@ var Es = class {
6753
6753
  let r;
6754
6754
  0 === n && (e.state = -131841 & e.state | or | $n, this._addCircular(e));
6755
6755
  let d = null, h = !1;
6756
- Ln(e, Ye(e)), e.state &= -65, s.node = e, s.gridId = e.gridId, s.rowIndex = e.rowIndex, s.colIndex = e.colIndex, s.drawIndex = 0, l.evaluations++, h = e.block.representative === e && e.block.isBlankAware(this._passCycleId), s.perCellRead = !1, s.positionRead = !1, o._setReadHook(this._passHook);
6756
+ Ln(e, sn(e)), e.state &= -65, s.node = e, s.gridId = e.gridId, s.rowIndex = e.rowIndex, s.colIndex = e.colIndex, s.drawIndex = 0, l.evaluations++, h = e.block.representative === e && e.block.isBlankAware(this._passCycleId), s.perCellRead = !1, s.positionRead = !1, o._setReadHook(this._passHook);
6757
6757
  try {
6758
6758
  const t = e.block.formula, n = s.deferCount;
6759
6759
  r = t.evaluateAt(e.rowIndex, e.colIndex), r = this._fitCell(e.block, t.finalizeValueForCell(r)), s.deferCount !== n && (r = this._takeDeferred(e, r)), r?.isIRange && r.getValueAt(0, 0);
6760
6760
  } catch (t) {
6761
- if (!(t instanceof Le || t instanceof Pe || t instanceof Ke)) throw t;
6761
+ if (!(t instanceof Ue || t instanceof Ke || t instanceof Ye)) throw t;
6762
6762
  d = t;
6763
6763
  } finally {
6764
6764
  o._setReadHook(null);
@@ -6779,14 +6779,14 @@ var Es = class {
6779
6779
  }
6780
6780
  this._iterHitsLength = 0;
6781
6781
  }
6782
- if (d instanceof Le) {
6782
+ if (d instanceof Ue) {
6783
6783
  if (0 !== (e.state & Jn)) {
6784
6784
  this._unstartPrefetched(e), a = this._unwindSpeculative(i, a - 1);
6785
6785
  continue;
6786
6786
  }
6787
6787
  l.retries++;
6788
6788
  let t = 0;
6789
- const n = je(e), r = n.length;
6789
+ const n = Je(e), r = n.length;
6790
6790
  for (let o = 0; o < r; o++) {
6791
6791
  const r = n[o];
6792
6792
  if (I.isError(r)) continue;
@@ -6795,16 +6795,16 @@ var Es = class {
6795
6795
  }
6796
6796
  for (let e = 0; e < t; e++) {
6797
6797
  const t = c[e];
6798
- 0 === (t.state & (Kn | Zn)) && (t.state |= Jn | Zn, i[a++] = t);
6798
+ 0 === (t.state & (Kn | Yn)) && (t.state |= Jn | Yn, i[a++] = t);
6799
6799
  }
6800
6800
  const o = d.nodes, s = d.count;
6801
6801
  for (let t = 0; t < s; t++) {
6802
6802
  const e = o[t];
6803
- 0 === (e.state & Kn) && (e.state = e.state & ~Jn | Zn, i[a++] = e);
6803
+ 0 === (e.state & Kn) && (e.state = e.state & ~Jn | Yn, i[a++] = e);
6804
6804
  }
6805
6805
  continue;
6806
6806
  }
6807
- if (d instanceof Pe) {
6807
+ if (d instanceof Ke) {
6808
6808
  if (0 !== (e.state & Jn)) {
6809
6809
  this._unstartPrefetched(e), a = this._unwindSpeculative(i, a - 1);
6810
6810
  continue;
@@ -6819,23 +6819,23 @@ var Es = class {
6819
6819
  }
6820
6820
  t.state = -66305 & t.state | sr;
6821
6821
  const n = Qs(t);
6822
- $e(t).demandValue = n, this._pushDemand(t, n);
6822
+ Xe(t).demandValue = n, this._pushDemand(t, n);
6823
6823
  const r = t.block;
6824
6824
  r.representative === t && r.isBlankAware(this._passCycleId) && this._fallbackBlank(r, !1);
6825
6825
  }
6826
6826
  a = t;
6827
6827
  continue;
6828
6828
  }
6829
- if (d instanceof Ke) {
6829
+ if (d instanceof Ye) {
6830
6830
  e.state = -69377 & e.state | sr | ir;
6831
- const t = Qs(e), n = $e(e);
6832
- n.cycleGroup = Zs(d.node), n.demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1), a--;
6831
+ const t = Qs(e), n = Xe(e);
6832
+ n.cycleGroup = Ys(d.node), n.demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1), a--;
6833
6833
  continue;
6834
6834
  }
6835
- if (this._iterate || (e.state & qn) !== ir) $e(e).demandValue = r, this._pushDemand(e, r), h && this._finalizeRepresentative(e, r, t(e.gridId), !1);
6835
+ if (this._iterate || (e.state & qn) !== ir) Xe(e).demandValue = r, this._pushDemand(e, r), h && this._finalizeRepresentative(e, r, t(e.gridId), !1);
6836
6836
  else {
6837
6837
  const t = Qs(e);
6838
- $e(e).demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1);
6838
+ Xe(e).demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1);
6839
6839
  }
6840
6840
  if (e.state = -66305 & e.state | sr, a--, this._openGroups.size > 0 && (e.state & qn) === lr) {
6841
6841
  const t = this._resolveGroup(e.ext.cycleGroup);
@@ -6867,7 +6867,7 @@ var Es = class {
6867
6867
  if ((r & Kn) !== or) continue;
6868
6868
  if (0 !== (r & Jn)) continue;
6869
6869
  l && (r & qn) !== lr && this._addIterMember(e, this._valueOnGrid(e)), e.state = r & ~qn | lr;
6870
- const o = $e(e);
6870
+ const o = Xe(e);
6871
6871
  if (l && (r & qn) === lr) {
6872
6872
  const t = this._resolveGroup(o.cycleGroup);
6873
6873
  if (t !== s) {
@@ -6875,9 +6875,9 @@ var Es = class {
6875
6875
  void 0 !== e && (e < i && (i = e), this._openGroups.delete(t)), this._groupAlias.set(t, s);
6876
6876
  }
6877
6877
  }
6878
- o.cycleGroup = s, c ? $e(c).cycleNext = e : a = e, c = e;
6878
+ o.cycleGroup = s, c ? Xe(c).cycleNext = e : a = e, c = e;
6879
6879
  }
6880
- return c && ($e(c).cycleNext = r ?? a), l && this._openGroups.set(s, i), o;
6880
+ return c && (Xe(c).cycleNext = r ?? a), l && this._openGroups.set(s, i), o;
6881
6881
  }
6882
6882
  _demandSweep(t) {
6883
6883
  const e = this._iterate, n = fl, r = e.maxIteration, o = e.maxChange;
@@ -6945,7 +6945,7 @@ var Es = class {
6945
6945
  this._iterHitsLength = 0;
6946
6946
  }
6947
6947
  _demandEvaluateOne(t, e) {
6948
- const n = this._context, r = this._container.getScope(), o = e.block.formula, s = Ye(e);
6948
+ const n = this._context, r = this._container.getScope(), o = e.block.formula, s = sn(e);
6949
6949
  for (;;) {
6950
6950
  Ln(e, s), e.state &= -65, r.node = e, r.gridId = e.gridId, r.rowIndex = e.rowIndex, r.colIndex = e.colIndex, r.drawIndex = 0, this._demandStats.evaluations++;
6951
6951
  let l, i = null;
@@ -6954,7 +6954,7 @@ var Es = class {
6954
6954
  const t = r.deferCount;
6955
6955
  l = this._fitCell(e.block, o.finalizeValueForCell(o.evaluateAt(e.rowIndex, e.colIndex))), r.deferCount !== t && (l = this._takeDeferred(e, l)), l?.isIRange && l.getValueAt(0, 0);
6956
6956
  } catch (t) {
6957
- if (!(t instanceof Le)) throw t;
6957
+ if (!(t instanceof Ue)) throw t;
6958
6958
  i = t;
6959
6959
  } finally {
6960
6960
  n._setReadHook(null);
@@ -6983,16 +6983,16 @@ var Es = class {
6983
6983
  return !1;
6984
6984
  }
6985
6985
  _addCircular(t) {
6986
- 0 === (t.state & Un) && (t.state |= Un, dl[this._circularNodesLength++] = t);
6986
+ 0 === (t.state & Xn) && (t.state |= Xn, dl[this._circularNodesLength++] = t);
6987
6987
  }
6988
6988
  _resetCircular() {
6989
6989
  const t = this._circularNodesLength;
6990
- for (let e = 0; e < t; e++) dl[e].state &= ~Un;
6990
+ for (let e = 0; e < t; e++) dl[e].state &= ~Xn;
6991
6991
  this._circularNodesLength = 0;
6992
6992
  }
6993
6993
  _trackCircular(t, e, n, r, o) {
6994
- const s = $e(t), l = t.state & qn, i = 0 === l ? 0 : s.cycleGroup;
6995
- if (s.shownGroup === i && (t.state & Wn) === l << 2) return;
6994
+ const s = Xe(t), l = t.state & qn, i = 0 === l ? 0 : s.cycleGroup;
6995
+ if (s.shownGroup === i && (t.state & Un) === l << 2) return;
6996
6996
  if (this._cycleEpoch++, 0 !== s.shownGroup) {
6997
6997
  const e = this._cycles.get(s.shownGroup);
6998
6998
  e && (e.members.delete(t), e.downstream.delete(t), e.isEmpty() && this._cycles.delete(s.shownGroup));
@@ -7002,7 +7002,7 @@ var Es = class {
7002
7002
  const e = this._cycleOf(i), n = l === lr;
7003
7003
  (n ? e.members : e.downstream).add(t), a = e.getEntry(n);
7004
7004
  }
7005
- s.shownGroup = i, t.state = t.state & ~Wn | l << 2, e.circularConflating || (e.circularConflating = b(o)), e.circularConflating.append(n, r, a);
7005
+ s.shownGroup = i, t.state = t.state & ~Un | l << 2, e.circularConflating || (e.circularConflating = Yt(o)), e.circularConflating.append(n, r, a);
7006
7006
  }
7007
7007
  _cycleOf(t) {
7008
7008
  let e = this._cycles.get(t);
@@ -7049,7 +7049,7 @@ var Es = class {
7049
7049
  const n = w.plan, o = w.planLength, s = w.demandStart;
7050
7050
  for (let r = 0; r < o; r++) {
7051
7051
  const o = n[r];
7052
- o.markId = e, o.cycleId = t, o.inDegree = 0, o.state &= ~rr, null !== o.ext && (o.ext.cycleGroup = 0), Pn(o, Ye(o)), i[r] = o;
7052
+ o.markId = e, o.cycleId = t, o.inDegree = 0, o.state &= ~rr, null !== o.ext && (o.ext.cycleGroup = 0), Pn(o, sn(o)), i[r] = o;
7053
7053
  }
7054
7054
  return r.length = o, s < o && this._flagDemandAppendix(i, s, o), p.closureHits++, p.discoveryMs += Ds() - m, s === o;
7055
7055
  }
@@ -7059,13 +7059,13 @@ var Es = class {
7059
7059
  if (r.cycleId === t && r.markId === e) continue;
7060
7060
  r.markId = e, r.cycleId = t, r.inDegree = 0, r.state &= ~rr;
7061
7061
  const o = r.ext;
7062
- null !== o && (o.cycleGroup = 0), (r.planEpoch !== _ || r.planId !== g || null !== o && 0 !== o.shownGroup) && (S = !1), Pn(r, Ye(r)), nl[E++] = r, ol[A++] = r;
7062
+ null !== o && (o.cycleGroup = 0), (r.planEpoch !== _ || r.planId !== g || null !== o && 0 !== o.shownGroup) && (S = !1), Pn(r, sn(r)), nl[E++] = r, ol[A++] = r;
7063
7063
  }
7064
7064
  const k = (n) => {
7065
7065
  if (n.cycleId === t && n.markId === e) return;
7066
7066
  n.markId = e, n.cycleId = t, n.inDegree = 0, n.state &= ~rr;
7067
7067
  const r = n.ext;
7068
- null !== r && (r.cycleGroup = 0), (n.planEpoch !== _ || n.planId !== g || null !== r && 0 !== r.shownGroup) && (S = !1), Pn(n, Ye(n)), nl[E++] = n, ol[A++] = n;
7068
+ null !== r && (r.cycleGroup = 0), (n.planEpoch !== _ || n.planId !== g || null !== r && 0 !== r.shownGroup) && (S = !1), Pn(n, sn(n)), nl[E++] = n, ol[A++] = n;
7069
7069
  }, N = (n, r, o, s, l, i) => {
7070
7070
  if (n.unanchored) return;
7071
7071
  const a = n.ref;
@@ -7082,15 +7082,15 @@ var Es = class {
7082
7082
  $s.colStart = s, $s.rowStart = o, $s.colEnd = i, $s.rowEnd = l, $s.scope = r;
7083
7083
  const a = d.search($s), c = a.length;
7084
7084
  if (c > 0) {
7085
- const r = $e(t);
7085
+ const r = Xe(t);
7086
7086
  r.spillDependents = a, r.spillRowStart = o, r.spillColStart = s, r.spillRowEnd = l, r.spillColEnd = i, rl[y++] = t;
7087
- for (let t = 0; t < c; t++) Oe(a[t], n, e, o, s, l, i, k, N);
7087
+ for (let t = 0; t < c; t++) je(a[t], n, e, o, s, l, i, k, N);
7088
7088
  }
7089
7089
  }
7090
7090
  const i = o.length;
7091
7091
  if (0 !== i) for (let t = 0; t < i; t++) {
7092
7092
  const r = o[t];
7093
- Qe(r, n, e, k, N, M);
7093
+ on(r, n, e, k, N, M);
7094
7094
  }
7095
7095
  }
7096
7096
  const F = Ds();
@@ -7202,11 +7202,11 @@ var Es = class {
7202
7202
  const D = (t) => {
7203
7203
  p.planAssertFailures++, console.error("CalcExecutor: order-stamp fast path would invert a static edge at", t.gridId, t.rowIndex, t.colIndex), S = !1;
7204
7204
  }, T = (n) => {
7205
- n.cycleId === t && n.markId === e ? (bl++, S && n.orderIndex >= Cl.orderIndex && D(Cl)) : this._iterate || 0 === (n.state & Wn) || (this._taintGroup = n.ext.shownGroup, this._taintDownstream(Cl));
7205
+ n.cycleId === t && n.markId === e ? (bl++, S && n.orderIndex >= Cl.orderIndex && D(Cl)) : this._iterate || 0 === (n.state & Un) || (this._taintGroup = n.ext.shownGroup, this._taintDownstream(Cl));
7206
7206
  };
7207
7207
  let G = null;
7208
7208
  const B = (n) => {
7209
- n.cycleId === t && n.markId === e ? (Gl++, n.orderIndex > Bl && (Bl = n.orderIndex)) : null !== Vl || this._iterate || 0 === (n.state & Wn) || (Vl = n.ext.shownGroup);
7209
+ n.cycleId === t && n.markId === e ? (Gl++, n.orderIndex > Bl && (Bl = n.orderIndex)) : null !== Vl || this._iterate || 0 === (n.state & Un) || (Vl = n.ext.shownGroup);
7210
7210
  }, V = (t, e, n, r, o) => {
7211
7211
  null === G && (G = /* @__PURE__ */ new Map());
7212
7212
  let s = G.get(t);
@@ -7231,7 +7231,7 @@ var Es = class {
7231
7231
  }, l.push(i)) : (i = l[s.next], s.next = (s.next + 1) % Al, i.rowFrom = e, i.rowTo = n, i.colFrom = r, i.colTo = o), i.count = Gl, i.maxOrder = Bl, i.shownGroup = Vl, i;
7232
7232
  };
7233
7233
  for (let t = 0; t < E; t++) {
7234
- const e = nl[t], n = je(e), r = n.length;
7234
+ const e = nl[t], n = Je(e), r = n.length;
7235
7235
  let o = 0;
7236
7236
  for (let t = 0; t < r; t++) {
7237
7237
  const r = n[t];
@@ -7275,7 +7275,7 @@ var Es = class {
7275
7275
  const e = rl[t];
7276
7276
  n = e;
7277
7277
  const o = e.ext, s = o.spillDependents, l = s.length;
7278
- for (let t = 0; t < l; t++) Oe(s[t], e.rowIndex, e.colIndex, o.spillRowStart, o.spillColStart, o.spillRowEnd, o.spillColEnd, r);
7278
+ for (let t = 0; t < l; t++) je(s[t], e.rowIndex, e.colIndex, o.spillRowStart, o.spillColStart, o.spillRowEnd, o.spillColEnd, r);
7279
7279
  }
7280
7280
  for (let t = 0; t < E; t++) {
7281
7281
  const e = nl[t];
@@ -7294,14 +7294,14 @@ var Es = class {
7294
7294
  const e = t.colIndex, n = t.rowIndex, r = t.ext;
7295
7295
  if (null !== r) {
7296
7296
  const t = r.spillDependents, o = t.length;
7297
- for (let s = 0; s < o; s++) Oe(t[s], n, e, r.spillRowStart, r.spillColStart, r.spillRowEnd, r.spillColEnd, P);
7297
+ for (let s = 0; s < o; s++) je(t[s], n, e, r.spillRowStart, r.spillColStart, r.spillRowEnd, r.spillColEnd, P);
7298
7298
  }
7299
7299
  let o;
7300
7300
  o = t.dependents;
7301
7301
  const s = o.length;
7302
7302
  if (0 !== s) for (let t = 0; t < s; t++) {
7303
7303
  const r = o[t];
7304
- Xe(r, n, e, P);
7304
+ en(r, n, e, P);
7305
7305
  }
7306
7306
  }
7307
7307
  if (p.kahnMs += Ds() - O, o || a < E) {
@@ -7319,7 +7319,7 @@ var Es = class {
7319
7319
  t.length = 0, o && (a = 0);
7320
7320
  for (let e = 0; e < E; e++) {
7321
7321
  const n = nl[e];
7322
- (o || n.inDegree > 0) && (n.state |= $n, $e(n).demandValue = void 0, t.push(n));
7322
+ (o || n.inDegree > 0) && (n.state |= $n, Xe(n).demandValue = void 0, t.push(n));
7323
7323
  }
7324
7324
  t.sort(Fs);
7325
7325
  const e = t.length, n = a;
@@ -7345,7 +7345,7 @@ var Es = class {
7345
7345
  r.length = 0;
7346
7346
  for (let o = e; o < n; o++) {
7347
7347
  const e = t[o];
7348
- e.state |= $n, $e(e).demandValue = void 0, r.push(e), this._addCircular(e);
7348
+ e.state |= $n, Xe(e).demandValue = void 0, r.push(e), this._addCircular(e);
7349
7349
  }
7350
7350
  }
7351
7351
  _invalidatePlans() {
@@ -7379,11 +7379,11 @@ var Es = class {
7379
7379
  const l = Ds(), i = this._container, a = this._context, c = i.getScope(), d = a.getRuntime(), h = i.getDeferred?.() ?? null, u = s.values, _ = s.length;
7380
7380
  zl = this._passCycleId, Ll = this._passMarkId;
7381
7381
  const f = el;
7382
- let g, p, m, S, w, y, v, x, C, R, A, k, N, M = 0;
7382
+ let g, p, m, S, w, v, x, C, b, R, A, k, N, M = 0;
7383
7383
  const F = /* @__PURE__ */ new Map();
7384
7384
  this._overlays = F;
7385
7385
  const D = (t) => this._overlayFor(t), T = (t) => {
7386
- A = i.getGrid(t), R = A.getEntireCoords.bind(A), p = e(t), m = p.gridId, N = D(t), S = p.values, k = p.errorSpatial, w = p.contentfulSpatial, y = p.spillSpatial, v = p.notifyValues, x = p.notifySpillsInsert, C = p.notifySpillsRemove, p.notifyFormats, p.notifyCalcStatus, c.gridId = m;
7386
+ A = i.getGrid(t), R = A.getEntireCoords.bind(A), p = e(t), m = p.gridId, N = D(t), S = p.values, k = p.errorSpatial, w = p.contentfulSpatial, v = p.spillSpatial, x = p.notifyValues, C = p.notifySpillsInsert, b = p.notifySpillsRemove, p.notifyFormats, p.notifyCalcStatus, c.gridId = m;
7387
7387
  }, G = E.Axis.Column, B = G === E.Axis.Column, V = () => {
7388
7388
  if (M > 0) {
7389
7389
  n(f, M), M = 0;
@@ -7397,10 +7397,10 @@ var Es = class {
7397
7397
  const e = u[t];
7398
7398
  e.block.hasDataTable() && (e.state = e.state & ~Kn | sr, this._skippedTables.add(e));
7399
7399
  }
7400
- let P = 0;
7401
- for (; P < _;) try {
7402
- for (; P < _; P++) {
7403
- const n = u[P], s = n.colIndex, l = n.rowIndex;
7400
+ let z = 0;
7401
+ for (; z < _;) try {
7402
+ for (; z < _; z++) {
7403
+ const n = u[z], s = n.colIndex, l = n.rowIndex;
7404
7404
  if (1 & n.state && t === n.cycleId) {
7405
7405
  n.state &= -2;
7406
7406
  continue;
@@ -7409,17 +7409,17 @@ var Es = class {
7409
7409
  const a = n.gridId;
7410
7410
  a !== m && T(a);
7411
7411
  const _ = n.block, E = _.representative === n && _.isBlankAware(t), F = n.cachedValue;
7412
- let z, L, $ = !1;
7413
- "object" == typeof F && null !== F && (F.isIRange ? z = F : I.isError(F, I.Code.Spill) && (L = F, $ = !0));
7414
- const H = 0 !== (n.state & $n);
7415
- H && (n.state & Kn) !== sr && (V(), this.doDemandEvaluate(t, e, this._demandBatch, V), c.gridId = a);
7416
- const j = H ? null : je(n), K = n.inputsAt;
7417
- if (j && K >= 0) {
7418
- const t = On(), e = j.length;
7412
+ let L, $, K = !1;
7413
+ "object" == typeof F && null !== F && (F.isIRange ? L = F : I.isError(F, I.Code.Spill) && ($ = F, K = !0));
7414
+ const q = 0 !== (n.state & $n);
7415
+ q && (n.state & Kn) !== sr && (V(), this.doDemandEvaluate(t, e, this._demandBatch, V), c.gridId = a);
7416
+ const U = q ? null : Je(n), X = n.inputsAt;
7417
+ if (U && X >= 0) {
7418
+ const t = On(), e = U.length;
7419
7419
  for (let n = 0; n < e; n++) {
7420
- const e = j[n];
7420
+ const e = U[n];
7421
7421
  if (I.isError(e)) {
7422
- t[K + n] = e;
7422
+ t[X + n] = e;
7423
7423
  continue;
7424
7424
  }
7425
7425
  const r = e.colStart, o = e.rowStart, s = e.colEnd, l = e.rowEnd;
@@ -7428,163 +7428,163 @@ var Es = class {
7428
7428
  a && a !== m && (_ = i.getGrid(a), _ && (c = _.getValues(), u = D(a), h = _.getEntireCoords.bind(_)));
7429
7429
  let f = _;
7430
7430
  u.intersects(o, r, l, s) && (c = u, f = u);
7431
- const g = new U(d, c, { ...e }, null, h, i.resolveScope);
7432
- g._setErrorIndex(f), t[K + n] = g;
7431
+ const g = new Ot(d, c, { ...e }, null, h, i.resolveScope);
7432
+ g._setErrorIndex(f), t[X + n] = g;
7433
7433
  }
7434
7434
  }
7435
7435
  }
7436
- j && null !== h && 0 !== h.getOpenCount() && 0 === (n.state & Qn) && jl(j, m, i) && (n.state |= Qn);
7437
- const q = B ? s : l, W = B ? l : s;
7436
+ U && null !== h && 0 !== h.getOpenCount() && 0 === (n.state & Qn) && jl(U, m, i) && (n.state |= Qn);
7437
+ const W = B ? s : l, J = B ? l : s;
7438
7438
  c.node = n, c.colIndex = s, c.rowIndex = l, c.drawIndex = 0;
7439
- const X = _.formula;
7440
- let Z, Q = null, Y = !1;
7441
- const et = 4 & n.state ? 0 !== (n.state & nr) ? Nt.CalcStatus.Working : Nt.CalcStatus.Waiting : 0;
7442
- let nt = et;
7443
- const rt = r ? 0 : et, ot = n.ext;
7444
- if (H && !this._iterate && 0 !== (n.state & qn)) null !== ot && (ot.demandValue = void 0), Z = Qs(n), nt = 0;
7439
+ const Y = _.formula;
7440
+ let Q, Z = null, tt = !1;
7441
+ const et = 4 & n.state ? 0 !== (n.state & nr) ? P.CalcStatus.Working : P.CalcStatus.Waiting : 0;
7442
+ let rt = et;
7443
+ const ot = r ? 0 : et, st = n.ext;
7444
+ if (q && !this._iterate && 0 !== (n.state & qn)) null !== st && (st.demandValue = void 0), Q = Qs(n), rt = 0;
7445
7445
  else {
7446
- if (H) {
7447
- const t = null !== ot ? ot.demandValue : void 0;
7448
- null !== ot && (ot.demandValue = void 0), Z = void 0 === t ? 0 : t;
7446
+ if (q) {
7447
+ const t = null !== st ? st.demandValue : void 0;
7448
+ null !== st && (st.demandValue = void 0), Q = void 0 === t ? 0 : t;
7449
7449
  } else {
7450
7450
  if (n.state = n.state & ~Kn | or, c.perCellRead = !1, c.positionRead = !1, 0 !== (n.state & tr)) {
7451
7451
  n.state &= ~tr;
7452
- const t = this._settlePass ? bs(S, y, l, s) : null;
7452
+ const t = this._settlePass ? bs(S, v, l, s) : null;
7453
7453
  if (null !== t && t.direct) {
7454
- Y = !0, n.state &= -2621441;
7455
- const e = Pt(t);
7456
- e?.isIRange ? (Z = X.finalizeValueForCell(e), Q = t) : Z = t;
7454
+ tt = !0, n.state &= -2621441;
7455
+ const e = y(t);
7456
+ e?.isIRange ? (Q = Y.finalizeValueForCell(e), Z = t) : Q = t;
7457
7457
  }
7458
7458
  }
7459
- if (!Y) {
7459
+ if (!tt) {
7460
7460
  this._planStats.evaluated++, n.state &= -2621505;
7461
7461
  const t = c.deferCount;
7462
- Z = X.evaluateAt(l, s), Z = X.finalizeValueForCell(Z), (c.perCellRead || c.positionRead) && (n.block.positionRead = !0), c.deferCount !== t && (Z = this._takeDeferred(n, Z), Q = this._spillHolder, this._spillHolder = null);
7462
+ Q = Y.evaluateAt(l, s), Q = Y.finalizeValueForCell(Q), (c.perCellRead || c.positionRead) && (n.block.positionRead = !0), c.deferCount !== t && (Q = this._takeDeferred(n, Q), Z = this._spillHolder, this._spillHolder = null);
7463
7463
  }
7464
7464
  }
7465
- nt = 0 !== (n.state & er) ? Nt.CalcStatus.Working : 0 !== (n.state & (Qn | Yn)) ? Nt.CalcStatus.Waiting : 0, 0 !== nt && (n.state |= Yn);
7465
+ rt = 0 !== (n.state & er) ? P.CalcStatus.Working : 0 !== (n.state & (Qn | Zn)) ? P.CalcStatus.Waiting : 0, 0 !== rt && (n.state |= Zn);
7466
7466
  }
7467
- let st;
7468
- (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 = b(B)), p.calcStatusConflating.append(q, W, 0 !== nt && nt)), H && N.takeDemand(l, s);
7469
- const lt = n.ext, it = null !== lt ? lt.fixedRef : null;
7470
- if (z || L || it) {
7471
- Ys.colStart = s, Ys.rowStart = l, Ys.colEnd = s, Ys.rowEnd = l;
7472
- const t = y.search(Ys);
7473
- for (let e = 0; !st && e < t.length; e++) {
7467
+ let lt;
7468
+ (n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768), rt !== ot && (0 === rt ? n.state &= ~(4 | nr) : rt === P.CalcStatus.Working ? n.state |= 4 | nr : n.state = (4 | n.state) & ~nr, p.calcStatusConflating || (p.calcStatusConflating = Yt(B)), p.calcStatusConflating.append(W, J, 0 !== rt && rt)), q && N.takeDemand(l, s);
7469
+ const it = n.ext, at = null !== it ? it.fixedRef : null;
7470
+ if (L || $ || at) {
7471
+ Zs.colStart = s, Zs.rowStart = l, Zs.colEnd = s, Zs.rowEnd = l;
7472
+ const t = v.search(Zs);
7473
+ for (let e = 0; !lt && e < t.length; e++) {
7474
7474
  const n = t[e];
7475
- n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (st = n);
7475
+ n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (lt = n);
7476
7476
  }
7477
- if (st && (y.remove(st, Go), !st || !st.value.getError())) {
7477
+ if (lt && (v.remove(lt, Go), !lt || !lt.value.getError())) {
7478
7478
  const t = {
7479
- ...o.sanitizeRange(st),
7480
- scope: st.scope,
7479
+ ...o.sanitizeRange(lt),
7480
+ scope: lt.scope,
7481
7481
  value: null
7482
7482
  };
7483
- w.insertNonOverlapping(t), S.delete(t), J(k, t);
7483
+ w.insertNonOverlapping(t), S.delete(t), ut(k, t);
7484
7484
  }
7485
7485
  }
7486
- Z = this._fitCell(_, Z);
7487
- let at = 1, ct = 1;
7488
- const dt = Z, ht = "object" == typeof Z && null !== Z, ut = ht && dt.isIRange;
7489
- let _t, ft = ht && I.isError(Z, I.Code.Spill);
7490
- if (it) {
7491
- at = it.colEnd - it.colStart + 1, ct = it.rowEnd - it.rowStart + 1;
7486
+ Q = this._fitCell(_, Q);
7487
+ let ct = 1, dt = 1;
7488
+ const ht = Q, _t = "object" == typeof Q && null !== Q, ft = _t && ht.isIRange;
7489
+ let gt, pt = _t && I.isError(Q, I.Code.Spill);
7490
+ if (at) {
7491
+ ct = at.colEnd - at.colStart + 1, dt = at.rowEnd - at.rowStart + 1;
7492
7492
  const e = {
7493
- colStart: it.colStart,
7494
- rowStart: it.rowStart,
7495
- colEnd: it.colEnd,
7496
- rowEnd: it.rowEnd,
7493
+ colStart: at.colStart,
7494
+ rowStart: at.rowStart,
7495
+ colEnd: at.colEnd,
7496
+ rowEnd: at.rowEnd,
7497
7497
  scope: a
7498
- }, r = qe(Z, e, B)?.tuples;
7499
- S.delete(e), r && S.setValues(r), J(k, e), Ct(k, r, B), _t = {
7498
+ }, r = Qe(Q, e, B)?.tuples;
7499
+ S.delete(e), r && S.setValues(r), ut(k, e), H(k, r, B), gt = {
7500
7500
  ...e,
7501
- value: new ce(e, t, "fixed", null, Q)
7502
- }, y.insert(_t), i.addDynamicPrecedent(n, e, -2), w.insertNonOverlapping({
7501
+ value: new j(e, t, "fixed", null, Z)
7502
+ }, v.insert(gt), i.addDynamicPrecedent(n, e, -2), w.insertNonOverlapping({
7503
7503
  ...e,
7504
- value: new tt(e, G)
7504
+ value: new zt(e, G)
7505
7505
  });
7506
- } else if (ut && dt.size > 1) {
7507
- at = dt.getColumnCount(), ct = dt.getRowCount();
7506
+ } else if (ft && ht.size > 1) {
7507
+ ct = ht.getColumnCount(), dt = ht.getRowCount();
7508
7508
  const e = vl(n), r = null !== e ? l - e.rows : l, c = null !== e ? s - e.columns : s, d = {
7509
7509
  colStart: c,
7510
7510
  rowStart: r,
7511
- colEnd: c + at - 1,
7512
- rowEnd: r + ct - 1,
7511
+ colEnd: c + ct - 1,
7512
+ rowEnd: r + dt - 1,
7513
7513
  scope: a
7514
7514
  }, h = R(), u = !o.isRangeWithinRange(d, h);
7515
- if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)), ft = u, !ft) {
7515
+ if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)), pt = u, !pt) {
7516
7516
  const t = w.search(d);
7517
- if (ft = t.length > 1, !ft && 1 === t.length) {
7517
+ if (pt = t.length > 1, !pt && 1 === t.length) {
7518
7518
  const e = t[0], n = o.intersectRanges(d, e, Ps);
7519
- !n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (ft = !0);
7519
+ !n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (pt = !0);
7520
7520
  }
7521
7521
  }
7522
7522
  let _, f;
7523
- if (ft) Z = I.BuiltIn.Spill, at = 1, ct = 1, _ = [[q, [[W, [Z]]]]], S.setValues(_), Ct(k, _, B), f = {
7523
+ if (pt) Q = I.BuiltIn.Spill, ct = 1, dt = 1, _ = [[W, [[J, [Q]]]]], S.setValues(_), H(k, _, B), f = {
7524
7524
  colStart: s,
7525
7525
  rowStart: l,
7526
7526
  colEnd: s,
7527
7527
  rowEnd: l
7528
7528
  };
7529
7529
  else {
7530
- const t = We(dt, B ? c : r, B ? r : c);
7531
- t && (_ = t.tuples), S.delete(d), _ && S.setValues(_), J(k, d), Ct(k, _, B), f = d;
7530
+ const t = Ze(ht, B ? c : r, B ? r : c);
7531
+ t && (_ = t.tuples), S.delete(d), _ && S.setValues(_), ut(k, d), H(k, _, B), f = d;
7532
7532
  }
7533
- const g = ft ? {
7533
+ const g = pt ? {
7534
7534
  colStart: s,
7535
7535
  rowStart: l,
7536
7536
  colEnd: s,
7537
7537
  rowEnd: l,
7538
7538
  scope: a
7539
7539
  } : d;
7540
- _t = {
7540
+ gt = {
7541
7541
  ...g,
7542
- value: new ce(g, t, ft ? "error" : "dynamic", ft || null === e ? null : e, Q, ft ? d : null)
7543
- }, y.insert(_t), i.addDynamicPrecedent(n, d, -2), w.insertNonOverlapping({
7542
+ value: new j(g, t, pt ? "error" : "dynamic", pt || null === e ? null : e, Z, pt ? d : null)
7543
+ }, v.insert(gt), i.addDynamicPrecedent(n, d, -2), w.insertNonOverlapping({
7544
7544
  ...f,
7545
- value: new tt(f, G)
7545
+ value: new zt(f, G)
7546
7546
  });
7547
7547
  }
7548
- !E || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n, Z, p, 0 !== nt || H || !0 === ut || ft || null !== it || Y);
7549
- let gt = !1;
7550
- if ((st || _t || ft || L) && (gt = o.isEqualRanges(st, _t), st && C.push(st), _t && x.push(_t)), _t || st) {
7551
- const t = st ?? _t, e = _t ?? st, r = {
7548
+ !E || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n, Q, p, 0 !== rt || q || !0 === ft || pt || null !== at || tt);
7549
+ let mt = !1;
7550
+ if ((lt || gt || pt || $) && (mt = o.isEqualRanges(lt, gt), lt && b.push(lt), gt && C.push(gt)), gt || lt) {
7551
+ const t = lt ?? gt, e = gt ?? lt, r = {
7552
7552
  colStart: Math.min(s, t.colStart, e.colStart),
7553
7553
  rowStart: Math.min(l, t.rowStart, e.rowStart),
7554
7554
  colEnd: Math.max(s, t.colEnd, e.colEnd),
7555
7555
  rowEnd: Math.max(l, t.rowEnd, e.rowEnd),
7556
7556
  scope: a
7557
7557
  };
7558
- v.insertNonOverlapping(r), gt && ft === $ || (this._invalidatePlans(), i.getPrecedents().search(r).length > 0 && (n.state |= 1, g || (g = new me()), g.insertNonOverlapping(r)));
7558
+ x.insertNonOverlapping(r), mt && pt === K || (this._invalidatePlans(), i.getPrecedents().search(r).length > 0 && (n.state |= 1, g || (g = new nt()), g.insertNonOverlapping(r)));
7559
7559
  }
7560
- n.cachedValue = Z, f[M++] = n;
7561
- const pt = null !== h && h.hasHolders() ? Pt(Z) : Z;
7562
- ut || it || N.push(l, s, pt), M >= (N.observed ? As : ks) && V(), (0 !== (n.state & qn) || null !== n.ext && 0 !== n.ext.shownGroup) && this._trackCircular(n, p, q, W, B);
7563
- const mt = n.dependents, St = mt.length;
7564
- if (St > 0) {
7560
+ n.cachedValue = Q, f[M++] = n;
7561
+ const St = null !== h && h.hasHolders() ? y(Q) : Q;
7562
+ ft || at || N.push(l, s, St), M >= (N.observed ? As : ks) && V(), (0 !== (n.state & qn) || null !== n.ext && 0 !== n.ext.shownGroup) && this._trackCircular(n, p, W, J, B);
7563
+ const wt = n.dependents, Et = wt.length;
7564
+ if (Et > 0) {
7565
7565
  const t = !!(4 & n.state), e = !this._iterate && 0 !== (n.state & qn);
7566
7566
  e && (this._taintGroup = n.ext.cycleGroup);
7567
- for (let n = 0; n < St; n++) {
7568
- const r = mt[n];
7569
- e && Xe(r, l, s, this._taintDownstream);
7567
+ for (let n = 0; n < Et; n++) {
7568
+ const r = wt[n];
7569
+ e && en(r, l, s, this._taintDownstream);
7570
7570
  const o = r.value.index;
7571
- o < 0 || (Ze(r) && (Ol = o, Pl = pt, Xe(r, l, s, $l)), t && Xe(r, l, s, Hl));
7571
+ o < 0 || (rn(r) && (Ol = o, Pl = St, en(r, l, s, $l)), t && en(r, l, s, Hl));
7572
7572
  }
7573
7573
  }
7574
7574
  }
7575
7575
  } catch (n) {
7576
- const r = u[P];
7577
- if (n instanceof Le || n instanceof Pe && this._iterate) {
7576
+ const r = u[z];
7577
+ if (n instanceof Ue || n instanceof Ke && this._iterate) {
7578
7578
  const o = Ks;
7579
- if (o.length = 0, n instanceof Le) for (let t = 0; t < n.count; t++) o.push(n.nodes[t]);
7579
+ if (o.length = 0, n instanceof Ue) for (let t = 0; t < n.count; t++) o.push(n.nodes[t]);
7580
7580
  o.push(r), V(), r.state &= ~Kn, this.doDemandEvaluate(t, e, o, V);
7581
7581
  } else {
7582
- if (!(n instanceof Pe || n instanceof Ke)) throw n;
7582
+ if (!(n instanceof Ke || n instanceof Ye)) throw n;
7583
7583
  {
7584
- const t = n instanceof Pe;
7584
+ const t = n instanceof Ke;
7585
7585
  r.state = -3841 & r.state | $n | sr | (t ? lr : ir);
7586
- const e = $e(r);
7587
- e.demandValue = Qs(r), e.cycleGroup = t ? ++this._cycleGroupNext : Zs(n.node), t && (e.cycleNext = r), this._addCircular(r);
7586
+ const e = Xe(r);
7587
+ e.demandValue = Qs(r), e.cycleGroup = t ? ++this._cycleGroupNext : Ys(n.node), t && (e.cycleNext = r), this._addCircular(r);
7588
7588
  }
7589
7589
  }
7590
7590
  c.gridId = r.gridId;
@@ -7592,14 +7592,14 @@ var Es = class {
7592
7592
  c.node = null, c.colIndex = Number.MAX_SAFE_INTEGER, c.rowIndex = Number.MAX_SAFE_INTEGER, V();
7593
7593
  for (const t of F.values()) t.commitDemand();
7594
7594
  this._flush = null, this._overlays = null;
7595
- const z = this._fallbackDirty;
7596
- return null !== z && (this._fallbackDirty = null, g ? g.insertAllNonOverlapping(z.all()) : g = z), (() => {
7595
+ const L = this._fallbackDirty;
7596
+ return null !== L && (this._fallbackDirty = null, g ? g.insertAllNonOverlapping(L.all()) : g = L), (() => {
7597
7597
  const t = Bn, e = Vn;
7598
7598
  for (let n = 0; n < e; n++) t[n] = void 0;
7599
7599
  Vn = 0;
7600
7600
  })(), this._planStats.evaluateMs += Ds() - l, g;
7601
7601
  }
7602
- }, Is = (t, e) => new dt.ArrayList(t.slice(0, e));
7602
+ }, Is = (t, e) => new U.ArrayList(t.slice(0, e));
7603
7603
  function ys(t, e, n, r, o, s) {
7604
7604
  const l = e.rowStart + n, i = e.rowStart + r, a = e.colStart + o, c = e.colStart + s;
7605
7605
  for (let e = 0; e < t.length; e++) {
@@ -7609,10 +7609,10 @@ function ys(t, e, n, r, o, s) {
7609
7609
  return !1;
7610
7610
  }
7611
7611
  function vs(t, e, n) {
7612
- const r = e.values, o = e.errorSpatial, s = qs, l = Ws;
7612
+ const r = e.values, o = e.errorSpatial, s = qs, l = Us;
7613
7613
  for (let i = 0; i < t.length; i++) {
7614
7614
  const a = t[i];
7615
- r.delete(a), J(o, a);
7615
+ r.delete(a), ut(o, a);
7616
7616
  const c = {
7617
7617
  colStart: a.colStart,
7618
7618
  rowStart: a.rowStart,
@@ -7641,7 +7641,7 @@ function Cs(t, e, n) {
7641
7641
  }
7642
7642
  var bs = (t, e, n, r) => {
7643
7643
  const o = t.getValueAt(n, r);
7644
- return bt(o) ? o : Ee(e, n, r);
7644
+ return k(o) ? o : Ut(e, n, r);
7645
7645
  }, Rs = Symbol("unsetGridId"), As = 1024, ks = 65536;
7646
7646
  function Ns(t, e) {
7647
7647
  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;
@@ -7708,21 +7708,21 @@ var Ps = {
7708
7708
  rowEnd: 0,
7709
7709
  colEnd: 0,
7710
7710
  scope: null
7711
- }, Ks = [null], qs = [], Ws = [], Us = [], Xs = [], Js = {
7711
+ }, Ks = [null], qs = [], Us = [], Xs = [], Ws = [], Js = {
7712
7712
  rowStart: 0,
7713
7713
  colStart: 0,
7714
7714
  rowEnd: 0,
7715
7715
  colEnd: 0,
7716
7716
  scope: null
7717
- }, Zs = (t) => {
7717
+ }, Ys = (t) => {
7718
7718
  const e = t.ext;
7719
7719
  return null === e ? 0 : 0 !== (t.state & qn) ? e.cycleGroup : e.shownGroup;
7720
- }, Qs = (t) => Pt(t.cachedValue) ?? 0, Ys = {
7720
+ }, Qs = (t) => y(t.cachedValue) ?? 0, Zs = {
7721
7721
  rowStart: 0,
7722
7722
  colStart: 0,
7723
7723
  rowEnd: 0,
7724
7724
  colEnd: 0
7725
- }, tl = 1e4, el = Zt(tl), nl = Zt(tl), rl = Zt(tl), ol = Zt(tl), sl = Zt(tl), ll = Zt(tl), il = Zt(tl), al = Zt(tl), cl = Zt(tl), dl = Zt(tl), hl = Zt(tl), ul = Zt(tl), _l = Zt(tl), fl = Zt(tl), gl = Zt(tl), pl = Zt(tl), ml = [null], Sl = [], wl = -1, El = -1, Il = -1, yl = -1;
7725
+ }, tl = 1e4, el = gt(tl), nl = gt(tl), rl = gt(tl), ol = gt(tl), sl = gt(tl), ll = gt(tl), il = gt(tl), al = gt(tl), cl = gt(tl), dl = gt(tl), hl = gt(tl), ul = gt(tl), _l = gt(tl), fl = gt(tl), gl = gt(tl), pl = gt(tl), ml = [null], Sl = [], wl = -1, El = -1, Il = -1, yl = -1;
7726
7726
  function vl(t) {
7727
7727
  const e = t.block.formula;
7728
7728
  return null !== e && void 0 !== e.getSpillOrigin ? e.getSpillOrigin() : null;
@@ -7735,7 +7735,7 @@ function xl(t) {
7735
7735
  const o = vl(t);
7736
7736
  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;
7737
7737
  }
7738
- var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = Zt(8), Fl = Zt(8), Dl = Zt(8), Tl = Array.from({ length: 8 }, () => ({
7738
+ var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = gt(8), Fl = gt(8), Dl = gt(8), Tl = Array.from({ length: 8 }, () => ({
7739
7739
  colStart: 0,
7740
7740
  colEnd: 0,
7741
7741
  rowStart: 0,
@@ -7767,12 +7767,12 @@ function Kl(t, e) {
7767
7767
  return n === r ? 0 : 1 / 0;
7768
7768
  }
7769
7769
  var ql = {
7770
- values: Zt(tl),
7770
+ values: gt(tl),
7771
7771
  length: 0
7772
- }, Wl = {
7773
- values: Zt(tl),
7772
+ }, Ul = {
7773
+ values: gt(tl),
7774
7774
  length: 0
7775
- }, Ul = class {
7775
+ }, Xl = class {
7776
7776
  constructor(t) {
7777
7777
  this._namesByKey = /* @__PURE__ */ new Map(), this._namesById = /* @__PURE__ */ new Map(), this._hostsById = /* @__PURE__ */ new Map(), this._loadedData = /* @__PURE__ */ new Map(), this._options = t;
7778
7778
  }
@@ -7781,14 +7781,14 @@ var ql = {
7781
7781
  for (let e = 0; e < a.length; e++) {
7782
7782
  const c = a[e], d = c.getId(), h = c.getSheetNames();
7783
7783
  for (let t = 0; t < h.length; t++) {
7784
- const e = R(d, t);
7784
+ const e = D(d, t);
7785
7785
  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)));
7786
7786
  }
7787
7787
  const u = c.getDefinedNames();
7788
7788
  for (let e = 0; e < u.length; e++) {
7789
7789
  const n = u[e];
7790
7790
  if (!n.name) continue;
7791
- const r = n.sheetIndex, o = R(d, void 0 !== r && r >= 0 && r < h.length ? r : -1), s = Xl(o, n.name);
7791
+ const r = n.sheetIndex, o = D(d, void 0 !== r && r >= 0 && r < h.length ? r : -1), s = Wl(o, n.name);
7792
7792
  l.add(s);
7793
7793
  const a = this._namesByKey.get(s);
7794
7794
  if (a) {
@@ -7800,17 +7800,17 @@ var ql = {
7800
7800
  } else this._registerName(c, o, n, t), i.add(d);
7801
7801
  }
7802
7802
  }
7803
- for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(gt(t).bookId));
7803
+ for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(K(t).bookId));
7804
7804
  for (const [t, e] of this._namesByKey) {
7805
7805
  if (l.has(t)) continue;
7806
7806
  this._namesByKey.delete(t), this._namesById.delete(e.getId());
7807
7807
  const n = this._hostsById.get(e.getId());
7808
- this._hostsById.delete(e.getId()), n?.setPlaceholder(I.BuiltIn.Name.toString()), i.add(gt(e.getScope()).bookId);
7808
+ this._hostsById.delete(e.getId()), n?.setPlaceholder(I.BuiltIn.Name.toString()), i.add(K(e.getScope()).bookId);
7809
7809
  }
7810
7810
  return i;
7811
7811
  }
7812
7812
  getNameByScope(t, e) {
7813
- return this._namesByKey.get(Xl(e, t)) ?? null;
7813
+ return this._namesByKey.get(Wl(e, t)) ?? null;
7814
7814
  }
7815
7815
  getNameById(t) {
7816
7816
  return this._namesById.get(t) ?? null;
@@ -7818,7 +7818,7 @@ var ql = {
7818
7818
  _registeredSheetGrids() {
7819
7819
  const t = [];
7820
7820
  for (const e of this._options.gridIds()) {
7821
- const n = gt(e);
7821
+ const n = K(e);
7822
7822
  n && n.sheetIndex >= 0 && t.push(e);
7823
7823
  }
7824
7824
  return t;
@@ -7834,7 +7834,7 @@ var ql = {
7834
7834
  for (let t = 0; t < o.length; t++) {
7835
7835
  const [n, s] = o[t], l = s.length;
7836
7836
  for (let t = 0; t < l; t++) {
7837
- const o = fe.fromJSONValue(s.at(t));
7837
+ const o = J.fromJSONValue(s.at(t));
7838
7838
  null != o && e.push({
7839
7839
  col: n + t,
7840
7840
  row: r,
@@ -7845,7 +7845,7 @@ var ql = {
7845
7845
  }
7846
7846
  if (0 === e.length) return null;
7847
7847
  e.sort((t, e) => t.col - e.col || t.row - e.row);
7848
- const n = new ht.Builder();
7848
+ const n = new be.Builder();
7849
7849
  for (let t = 0; t < e.length; t++) n.pushAt(e[t].col, e[t].row, e[t].value);
7850
7850
  return n.build()?.tuples ?? null;
7851
7851
  }(o);
@@ -7858,7 +7858,7 @@ var ql = {
7858
7858
  getScope: () => e,
7859
7859
  refersTo: n.refersTo ?? ""
7860
7860
  };
7861
- this._namesByKey.set(Xl(e, n.name), i), this._namesById.set(l, i);
7861
+ this._namesByKey.set(Wl(e, n.name), i), this._namesById.set(l, i);
7862
7862
  const a = s(l);
7863
7863
  this._hostsById.set(l, a), this._queueBody(l, a, t, e, i.refersTo, r);
7864
7864
  }
@@ -7866,22 +7866,22 @@ var ql = {
7866
7866
  const { queue: l, recompileNamed: i } = this._options;
7867
7867
  let a = o.trim();
7868
7868
  a.startsWith("=") && (a = a.substring(1)), a || (a = I.BuiltIn.Ref.toString());
7869
- const c = gt(r), d = c.sheetIndex >= 0 ? c.sheetIndex : n.getSheetNames().length > 0 ? 0 : -1, h = R(c.bookId, d);
7869
+ const c = K(r), d = c.sheetIndex >= 0 ? c.sheetIndex : n.getSheetNames().length > 0 ? 0 : -1, h = D(c.bookId, d);
7870
7870
  l(async () => {
7871
7871
  this._hostsById.get(t) === e && e.setBody({
7872
7872
  coords: Jl,
7873
7873
  expression: a,
7874
- authoredAt: Zl,
7874
+ authoredAt: Yl,
7875
7875
  scopeGridId: h
7876
7876
  }) && (s || i(t));
7877
7877
  });
7878
7878
  }
7879
- }, Xl = (t, e) => t + "::" + e.toLowerCase(), Jl = Object.freeze({
7879
+ }, Wl = (t, e) => t + "::" + e.toLowerCase(), Jl = Object.freeze({
7880
7880
  colStart: 0,
7881
7881
  rowStart: 0,
7882
7882
  colEnd: 0,
7883
7883
  rowEnd: 0
7884
- }), Zl = Object.freeze({
7884
+ }), Yl = Object.freeze({
7885
7885
  rowIndex: 0,
7886
7886
  colIndex: 0
7887
7887
  }), Ql = class extends a {
@@ -7902,7 +7902,7 @@ var ql = {
7902
7902
  deferOrdinal: 0,
7903
7903
  deferRoot: !1,
7904
7904
  deferServed: null
7905
- }, 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(Fe.Sheet, t)?.toString(), this._heldCloneKey = null, this._callbacks = t.callbacks, this._runtime = t.runtime, this._richData = t.richData ?? Te.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;
7905
+ }, 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(ie.Sheet, t)?.toString(), this._heldCloneKey = null, this._callbacks = t.callbacks, this._runtime = t.runtime, this._richData = t.richData ?? x.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;
7906
7906
  const e = t.replica;
7907
7907
  this._updateState({
7908
7908
  gridsAll: /* @__PURE__ */ new Map(),
@@ -7921,8 +7921,8 @@ var ql = {
7921
7921
  } }),
7922
7922
  dynamicByBlock: /* @__PURE__ */ new Map(),
7923
7923
  dirtySpatial: new wn()
7924
- }), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, E.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), {
7925
- createRichData: (t, e) => Jt.fromJSON({
7924
+ }), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, E.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), {
7925
+ createRichData: (t, e) => xt.fromJSON({
7926
7926
  type: t,
7927
7927
  data: e
7928
7928
  }, this._richData),
@@ -7932,7 +7932,7 @@ var ql = {
7932
7932
  parseText: t.parseText
7933
7933
  }, () => this._callbacks.onPendingChange());
7934
7934
  const n = this._callbacks;
7935
- this._calcExecutor = new Es(this, this._context), t.planCacheMode && (this._calcExecutor.planCacheMode = t.planCacheMode), this._externalBindings = new Ul({
7935
+ this._calcExecutor = new Es(this, this._context), t.planCacheMode && (this._calcExecutor.planCacheMode = t.planCacheMode), this._externalBindings = new Xl({
7936
7936
  books: t.books,
7937
7937
  createGrid: (t) => this.createBackendGrid({ uuid: t }),
7938
7938
  unregisterGrid: (t) => {
@@ -8010,7 +8010,7 @@ var ql = {
8010
8010
  const r = this.getGrid(t);
8011
8011
  if (!r) return null;
8012
8012
  const o = r.getValues().getValueAt(e, n);
8013
- return bt(o) ? o : Ee(r.getSpills(), e, n);
8013
+ return k(o) ? o : Ut(r.getSpills(), e, n);
8014
8014
  }
8015
8015
  _settleNow() {
8016
8016
  const t = this._deferred, e = t.takeMoved();
@@ -8030,7 +8030,7 @@ var ql = {
8030
8030
  if (null === _ || !o.isLiveNode(_)) continue;
8031
8031
  const f = _.gridId, g = n.gridsAll.get(f);
8032
8032
  if (!g) continue;
8033
- const p = _.rowIndex, m = _.colIndex, S = g.getValues().getValueAt(p, m), w = bt(S), E = w ? S : Ee(g.getSpills(), p, m);
8033
+ const p = _.rowIndex, m = _.colIndex, S = g.getValues().getValueAt(p, m), w = k(S), E = w ? S : Ut(g.getSpills(), p, m);
8034
8034
  if (null === E || E.calls.indexOf(u) < 0) continue;
8035
8035
  if (!E.direct) {
8036
8036
  c.add(_), i(s, f).add(p, m);
@@ -8056,8 +8056,8 @@ var ql = {
8056
8056
  }, n = y.errors.get(t);
8057
8057
  n ? n.push(e) : y.errors.set(t, [e]);
8058
8058
  }
8059
- _.state &= -6815749, Yl.colStart = m, Yl.colEnd = m, Yl.rowStart = p, Yl.rowEnd = p, Yl.scope = f;
8060
- const x = r.search(Yl);
8059
+ _.state &= -6815749, Zl.colStart = m, Zl.colEnd = m, Zl.rowStart = p, Zl.rowEnd = p, Zl.scope = f;
8060
+ const x = r.search(Zl);
8061
8061
  for (let t = 0; t < x.length; t++) {
8062
8062
  const e = x[t], n = e.value;
8063
8063
  if (n.index < 0) {
@@ -8068,7 +8068,7 @@ var ql = {
8068
8068
  });
8069
8069
  continue;
8070
8070
  }
8071
- Xe(e, p, m, h);
8071
+ en(e, p, m, h);
8072
8072
  }
8073
8073
  }
8074
8074
  for (const [e, n] of a) {
@@ -8083,7 +8083,7 @@ var ql = {
8083
8083
  }), s[t] = {
8084
8084
  ...e,
8085
8085
  value: !1
8086
- }, J(r.errorSpatial, e);
8086
+ }, ut(r.errorSpatial, e);
8087
8087
  }
8088
8088
  r.notifyCalcStatus.load(s);
8089
8089
  for (const [t, e] of n.errors) r.errorSpatial.load(ni(e).map((e) => ({
@@ -8109,8 +8109,8 @@ var ql = {
8109
8109
  createFormulaBlock(t, e, n, r, o, s, l) {
8110
8110
  const i = this._callbacks.getCompiler(s);
8111
8111
  if (!i) throw new Error("The calculation engine has not started; nothing can compile yet.");
8112
- const a = gt(t)?.bookId ?? null, c = a ? null : gt(this._externalBindings.getNameById(t)?.getScope() ?? "")?.bookId ?? null;
8113
- return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ? R(a ?? c, -1) : this.getSheetName(t), l, a ? { book: a } : void 0), e, this._calcScope, t, () => this.getGrid(t)?.getEntireCoords() ?? null, this._resolvers);
8112
+ const a = K(t)?.bookId ?? null, c = a ? null : K(this._externalBindings.getNameById(t)?.getScope() ?? "")?.bookId ?? null;
8113
+ return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ? D(a ?? c, -1) : this.getSheetName(t), l, a ? { book: a } : void 0), e, this._calcScope, t, () => this.getGrid(t)?.getEntireCoords() ?? null, this._resolvers);
8114
8114
  }
8115
8115
  getSymbols() {
8116
8116
  return this._symbols;
@@ -8127,15 +8127,15 @@ var ql = {
8127
8127
  return this._sheetsCache().ids;
8128
8128
  }
8129
8129
  getSheetSpanIds(t) {
8130
- const e = at(t);
8130
+ const e = A(t);
8131
8131
  if (e) {
8132
8132
  const t = this.getSheetIds(), n = t.indexOf(e[0]), r = t.indexOf(e[1]);
8133
8133
  return -1 === n || -1 === r ? null : t.slice(Math.min(n, r), Math.max(n, r) + 1);
8134
8134
  }
8135
- const n = gt(t);
8135
+ const n = K(t);
8136
8136
  if (!n || n.sheetEnd === n.sheetIndex) return null;
8137
8137
  const r = [];
8138
- for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(R(n.bookId, t));
8138
+ for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(D(n.bookId, t));
8139
8139
  return r;
8140
8140
  }
8141
8141
  getFormulas() {
@@ -8244,7 +8244,7 @@ var ql = {
8244
8244
  }
8245
8245
  markDirty(t) {
8246
8246
  const e = this._getState(), n = e.dirtySpatial.clone(this._heldCloneKey), r = e.precedentSpatial, o = e.formulaSpatial;
8247
- let s = !1, l = y(t, E.Axis.Column, 2);
8247
+ let s = !1, l = De(t, E.Axis.Column, 2);
8248
8248
  for (let t = 0; t < l.length; t++) {
8249
8249
  const e = l[t];
8250
8250
  (r?.has(e) || o?.has(e)) && (s = !0, n.insertNonOverlapping(e));
@@ -8446,7 +8446,7 @@ var ql = {
8446
8446
  }), e;
8447
8447
  }
8448
8448
  createEngineGrid(t) {
8449
- const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ?? Ae : r ? () => r : void 0, s = this._callbacks;
8449
+ const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ?? $t : r ? () => r : void 0, s = this._callbacks;
8450
8450
  return this.createBackendGrid({
8451
8451
  uuid: e,
8452
8452
  shadowOf: t.shadowOf,
@@ -8494,15 +8494,15 @@ var ql = {
8494
8494
  switch (n.type) {
8495
8495
  case "sheets": return this.applySheets(n.sheets), {
8496
8496
  cycleId: this._cycleId,
8497
- commitId: C(n)
8497
+ commitId: ft(n)
8498
8498
  };
8499
8499
  case "tables": return this.applyTables(n.changes), {
8500
8500
  cycleId: this._cycleId,
8501
- commitId: C(n)
8501
+ commitId: ft(n)
8502
8502
  };
8503
8503
  case "names": return this.applyNames(n.changes), {
8504
8504
  cycleId: this._cycleId,
8505
- commitId: C(n)
8505
+ commitId: ft(n)
8506
8506
  };
8507
8507
  case "nameGraph": return {
8508
8508
  cycleId: this._cycleId,
@@ -8515,7 +8515,7 @@ var ql = {
8515
8515
  const o = this.getGrid(t);
8516
8516
  return o ? r ? o._apply(n, this.getCurrentCommitId(), !0) : o._apply(n, e) : {
8517
8517
  cycleId: this._cycleId,
8518
- commitId: C(n)
8518
+ commitId: ft(n)
8519
8519
  };
8520
8520
  }
8521
8521
  applyHeld(t, e) {
@@ -8580,7 +8580,7 @@ var ql = {
8580
8580
  return l;
8581
8581
  }
8582
8582
  followRestore(t, e) {
8583
- return e === H.Status.Off || e === H.Status.Error ? (this.retarget(t), !1) : e !== H.Status.Running ? (null !== this.restoreTo(t) || this.holdsModelCommit(t) || this.retarget(t), !1) : this.holdsModelCommit(t) ? (this.restoreTo(t), !1) : (this.retarget(t), !0);
8583
+ return e === ee.Status.Off || e === ee.Status.Error ? (this.retarget(t), !1) : e !== ee.Status.Running ? (null !== this.restoreTo(t) || this.holdsModelCommit(t) || this.retarget(t), !1) : this.holdsModelCommit(t) ? (this.restoreTo(t), !1) : (this.retarget(t), !0);
8584
8584
  }
8585
8585
  rebuild(t) {
8586
8586
  this.drop(), this.setReplica(t), this.open();
@@ -8612,13 +8612,13 @@ var ql = {
8612
8612
  if (u.deferCount !== l) {
8613
8613
  const t = this._deferred, e = t.endEvaluation();
8614
8614
  o.cachedValue = e.calls.length > 0 ? t.newHolder(a, e) : void 0, t.flush();
8615
- } else bt(o.cachedValue) && (o.cachedValue = void 0);
8616
- let c = He(t.finalizeValue(a));
8615
+ } else k(o.cachedValue) && (o.cachedValue = void 0);
8616
+ let c = We(t.finalizeValue(a));
8617
8617
  return null === c && (c = 0), !r || c?.isIRange || Array.isArray(c) ? c : i.createRange(1, 1, c);
8618
8618
  },
8619
8619
  getCalls: () => {
8620
8620
  const t = f.getAnchorNode().cachedValue;
8621
- return bt(t) ? t.calls : r.EmptyArray;
8621
+ return k(t) ? t.calls : r.EmptyArray;
8622
8622
  }
8623
8623
  };
8624
8624
  }
@@ -8635,7 +8635,7 @@ var ql = {
8635
8635
  for (let t = 0; t < n.length; t++) {
8636
8636
  const r = n[t].value;
8637
8637
  if (null == r.gridId) continue;
8638
- if (jt(r.gridId) || this._externalBindings.getNameById(r.gridId)) continue;
8638
+ if (St(r.gridId) || this._externalBindings.getNameById(r.gridId)) continue;
8639
8639
  const o = r.getReferencedSymbolIds();
8640
8640
  if (0 === o.length) continue;
8641
8641
  const s = r.ref, l = {
@@ -8698,10 +8698,10 @@ var ql = {
8698
8698
  e ? e.push(l[t]) : s.set(u, [l[t]]);
8699
8699
  continue;
8700
8700
  }
8701
- const _ = null != u && !n.isDefinedName(u) && !jt(u) && !this._externalBindings.getNameById(u);
8701
+ const _ = null != u && !n.isDefinedName(u) && !St(u) && !this._externalBindings.getNameById(u);
8702
8702
  if (h && _) for (let t = 0; t < o.length; t++) {
8703
8703
  const [e, n] = o[t];
8704
- a.includes(e) && (h = h.replaceTableReferences(e, (t) => F(t, n) ? we() : null));
8704
+ a.includes(e) && (h = h.replaceTableReferences(e, (t) => Ne(t, n) ? O() : null));
8705
8705
  }
8706
8706
  const f = h && h !== i.formula ? h.getTextAt(d.rowStart, d.colStart) : i.getTextAt(d.rowStart, d.colStart);
8707
8707
  this._writeBlockText(i, f);
@@ -8709,7 +8709,7 @@ var ql = {
8709
8709
  if (s) for (const [t, e] of s) this.getGrid(t)?._rederivePrecedentsNow(e);
8710
8710
  }
8711
8711
  refitTableRows(t, e, n, r, s) {
8712
- const l = this._symbols.bind(Fe.Sheet, t);
8712
+ const l = this._symbols.bind(ie.Sheet, t);
8713
8713
  if (!l) return;
8714
8714
  const i = this._getState().precedentSpatial.search({
8715
8715
  colStart: e.colStart,
@@ -8723,7 +8723,7 @@ var ql = {
8723
8723
  const e = i[t].value;
8724
8724
  if (e.index < 0) continue;
8725
8725
  const n = e.formulaEntry.value, r = n.gridId;
8726
- if (null == r || jt(r) || this._externalBindings.getNameById(r)) continue;
8726
+ if (null == r || St(r) || this._externalBindings.getNameById(r)) continue;
8727
8727
  const o = (a ??= /* @__PURE__ */ new Map()).get(n);
8728
8728
  o ? o.includes(e.index) || o.push(e.index) : a.set(n, [e.index]);
8729
8729
  }
@@ -8789,11 +8789,11 @@ var ql = {
8789
8789
  }
8790
8790
  }
8791
8791
  rewriteTableReferences(t, e) {
8792
- const n = (t) => e ? St(t, e) : we(), r = this._callbacks, o = this._getState().formulaSpatial.all3D();
8792
+ const n = (t) => e ? Xt(t, e) : O(), r = this._callbacks, o = this._getState().formulaSpatial.all3D();
8793
8793
  for (let e = 0; e < o.length; e++) {
8794
8794
  const s = o[e].value, l = s.gridId;
8795
8795
  if (null == l || !s.getReferencedSymbolIds().includes(t)) continue;
8796
- if (r.isDefinedName(l) || jt(l) || this._externalBindings.getNameById(l)) continue;
8796
+ if (r.isDefinedName(l) || St(l) || this._externalBindings.getNameById(l)) continue;
8797
8797
  const i = s.formula, a = i?.replaceTableReferences(t, n);
8798
8798
  if (!a || a === i) continue;
8799
8799
  const c = s.ref;
@@ -9166,7 +9166,7 @@ var ql = {
9166
9166
  toString() {
9167
9167
  return "CalcBackend";
9168
9168
  }
9169
- }, Yl = {
9169
+ }, Zl = {
9170
9170
  colStart: 0,
9171
9171
  rowStart: 0,
9172
9172
  colEnd: 0,
@@ -9174,7 +9174,7 @@ var ql = {
9174
9174
  scope: void 0
9175
9175
  }, ti = class {
9176
9176
  constructor(t) {
9177
- this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating = b(t);
9177
+ this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating = Yt(t);
9178
9178
  }
9179
9179
  add(t, e) {
9180
9180
  const n = this._unordered;
@@ -9203,7 +9203,7 @@ var ql = {
9203
9203
  colEnd: t.colEnd,
9204
9204
  rowEnd: t.rowEnd
9205
9205
  }), ni = (t) => {
9206
- const e = y(t, E.Axis.Column, 2), n = new Array(e.length);
9206
+ const e = De(t, E.Axis.Column, 2), n = new Array(e.length);
9207
9207
  for (let t = 0; t < e.length; t++) {
9208
9208
  const r = e[t];
9209
9209
  n[t] = {