@sheetxl/mcp 0.8.0-beta.17 → 0.8.0-beta.18
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.
- package/assets/{COa691om4fLN4CUy.js → 10d0ZbYF23zeF8_1.js} +1 -1
- package/assets/{DDhPOQPc-lpyZrUJ.js → 8hZAYFV_v2KmJ_NL.js} +4 -4
- package/assets/{B3mh2tuvP-lMP6f_.js → 9rJMq-cyOmajlBEQ.js} +1 -1
- package/assets/{oJNJQJEDQCsjHSmo.js → ARPN5UhoadZC1yqE.js} +1 -1
- package/assets/{Bj4BFLBC9Tf6SGSt.js → B-6CmVJvxPNZB9bE.js} +1 -1
- package/assets/{BjhAYfsKC8iEbtgn.js → B2C5njsdPylyQOCM.js} +30 -30
- package/assets/{CyI1eGGzJX8nJXaT.js → B74Ls4nlmyBxWanf.js} +2 -2
- package/assets/{7TRx0dMYnL2i4tqL.js → B7GE-6NROw0onnLD.js} +254 -254
- package/assets/{C46RpMrfF6FiEFI7.js → BCeSyFXflYgNP_ES.js} +1 -1
- package/assets/{B9J8nV-dh6jHpzZI.js → BDNqot_JWBuVW_pC.js} +1 -1
- package/assets/{Cz4H3Qge2u8er3Ny.js → BEtUOCupmeICfGE1.js} +3 -3
- package/assets/{Jd71-QCmFEcDcYSw.js → BFGVZsstQm2MWi7Y.js} +1 -1
- package/assets/{C7iHn3y3HVBHflpA.js → BFcxaubQp1WMeknL.js} +33 -33
- package/assets/{iBgLe32XErisaUSr.js → BM-ax5N1GzF9KkI4.js} +1 -1
- package/assets/{PbBzI4PlKpCgULLd.js → BMc-Hsrp_iifxzG_.js} +1 -1
- package/assets/{B9M_sgHpoc-op6FF.js → BOdkvYo03yZ96iZt.js} +1 -1
- package/assets/{BSY9Tbmz6VEY_F_x.js → BQ76ntZm9YFicjXj.js} +1 -1
- package/assets/{Bw_FtA-1886HMCLJ.js → BQeb2zXfAs5lRoGt.js} +3 -3
- package/assets/{Xe7sA_mEwDQpJjcF.js → BQsLqKWy17wy3znE.js} +2 -2
- package/assets/{4qMP71Fe1Ep8kbOX.js → BQzUK7KiJeJpu-rK.js} +1 -1
- package/assets/{Bcak_hZpcIkB2gJD.js → BRQd_GNkeaBTl3Zr.js} +1 -1
- package/assets/{Mgs_OJP41a-Nfac3.js → BSvHkSY0R0EU0gC4.js} +1 -1
- package/assets/{B7Nqa7V-v0cxGBux.js → BV11qLZKVWxFwVGV.js} +1 -1
- package/assets/{BMJhHHX2LWgOJWGz.js → BatIfPAYElNTXVzb.js} +1 -1
- package/assets/{APP8AzsNgQXHTalA.js → BedBCvJP064ZYuO8.js} +2 -2
- package/assets/{lcIaYgz4tQGBlzlo.js → BgGFX6QJ30T3seyX.js} +109 -109
- package/assets/{Dzz3yrKbECzg6caR.js → BhHneZZ7gq4dRaEJ.js} +1 -1
- package/assets/{BjnQVl1lb1KEbt2D.js → BhJ1mH7pUONJScU7.js} +39 -39
- package/assets/{Cl7HHR6Vc9S4n3AP.js → Bi4pI6e3AwTjn-lQ.js} +1 -1
- package/assets/{BX5xFncPLyeN7TqA.js → Bi8ct8GYvMDKHCE3.js} +5 -5
- package/assets/{Bz1ImBvJwPwBrA5j.js → Bqq5Sl5E9ytcPJ3J.js} +1 -1
- package/assets/{DidhZpf9qJAei29Y.js → BrwNVveK5LvYkoGk.js} +1 -1
- package/assets/{D0OQ6ka8so0BWPwL.js → BsYVa-oRhTLH6wnH.js} +1 -1
- package/assets/{CUbCBf24Ie4A2l4R.js → BwQM6Q6HHQTXznpy.js} +2 -2
- package/assets/{BgldX21zhey2aR9D.js → BxizypreLEtLqpIc.js} +1 -1
- package/assets/{BBC_WF8BcAH-k_cQ.js → Byd5zSRU6LWfL2No.js} +1 -1
- package/assets/{B2UxLSteMiPlg8Uu.js → Bz5ioWvl-Xl3xspC.js} +1 -1
- package/assets/{CMRLNLqYkiqCLMRa.js → C3PZVWI_SEXYrzVk.js} +3 -3
- package/assets/{CfA8o-FNret9-D6Y.js → CDqOifqA400y7KQY.js} +1 -1
- package/assets/{BJBoygm-gY68bLAP.js → CGGpkGg85FZsnYHc.js} +15 -15
- package/assets/{BQYpVYbvfWuUJgdx.js → CJoWPN_DsFbaGAiE.js} +1 -1
- package/assets/{z24-oIqP_fu2hsOt.js → CL4BYdfIXgFQA8nY.js} +1 -1
- package/assets/{YQtUMMGmb1_WFsh_.js → CLBxNjtPjuGX1KnU.js} +1 -1
- package/assets/{DF7-oRscXc_vkMo8.js → CLsD7YwSKAsliRZy.js} +1 -1
- package/assets/{dcvgOfBmWFTsXoT8.js → CMXukie7sxP12H2E.js} +4 -4
- package/assets/{z7nDK_gfX7G37XbZ.js → CNE-erNKNIT7bUb1.js} +109 -109
- package/assets/{BKRLtOdVOUTrLjQN.js → CPa4og3WQ7BgHrsO.js} +3 -3
- package/assets/{D336KioeSjd-T8n3.js → CPkGFumcwSKh5zea.js} +2 -2
- package/assets/{DeEZvPW-VvlE28oE.js → CQBFUsemb94zMBo6.js} +3 -3
- package/assets/{DPKeRb9GKmh_WCPv.js → CT6kRDlkfvKq8XGZ.js} +1 -1
- package/assets/{DV6WSFmSEKfb3d2s.js → CWuPUrDsnBxboJ02.js} +4 -4
- package/assets/{C4deMY87Q_haYyLF.js → CYUerpa6WB0Hc3fs.js} +1 -1
- package/assets/{nQbVdQrfdz3osBdi.js → CYcb-DojX92VNGzd.js} +3 -3
- package/assets/{8cVPexxAVrFJ9QLX.js → C_UAskmm-u2Iw9Nl.js} +1 -1
- package/assets/{BdijGsy5W7yZ_I_n.js → CcB4xmoUFWBbSISF.js} +1 -1
- package/assets/{Dkg-LQVsZlrHk7A8.js → CiKd3BnRjhac2Hik.js} +1 -1
- package/assets/{DsCNtBR5jCeqmLBS.js → CkO0JR629W2kcDMd.js} +2 -2
- package/assets/{UH_biJmLrI9SvckA.js → CmlxzZYM5hOAAcx5.js} +3 -3
- package/assets/{BKjovBsLpX2Fkhov.js → CnCtLKkz0bdXIxn2.js} +92 -92
- package/assets/{CJF3P7U7yBQVF2Cg.js → CnLLwj7OCz4U71wa.js} +1 -1
- package/assets/{qgW-p2sFhMtuu5yw.js → CoQFpWEh4CUgcdwe.js} +1 -1
- package/assets/{CqwEHSKivMYw7tRZ.js → Ct8BhGWuqN5yOpUF.js} +1 -1
- package/assets/{Dre79rTMoYYikNuB.js → Cv8UXBL7O7h1uMR8.js} +19 -19
- package/assets/{CLgvdaqeFlESLvbF.js → CvkibaXI8SOD22pw.js} +1 -1
- package/assets/{BT8AGlSg2t7V1QNj.js → CzoexWLhnn08u05j.js} +577 -577
- package/assets/{BUV7BlOZcuPgDZ__.js → D0-I0aLr6w8IvxFD.js} +1 -1
- package/assets/{DoBvgI3Ry8DlGzwQ.js → D1pD8u8nRprUvn-u.js} +1 -1
- package/assets/{CLze192iF2o-aETZ.js → D2IMjoGcj5oz1Kr7.js} +1 -1
- package/assets/{Bni-y4FJS4rkFYtn.js → D2sRTakzE5POMnhF.js} +2215 -2109
- package/assets/{Bxkx8QokmRNyXbOI.js → D49iRcrfnODORRNC.js} +5 -5
- package/assets/{BlbxiLf1zD6_fWZs.js → D5nleqRNvTcmN5_9.js} +1 -1
- package/assets/{BS4ZsfH5D6aemSpO.js → D5wI7O_L6QVNXj5I.js} +1 -1
- package/assets/{C2NPIWe0pLs3PAZM.js → DCHjwIx59QhiV2Zx.js} +2 -2
- package/assets/{BGZ_ltNFYvnAmbVR.js → DH7Rur7rNOYzv35r.js} +1 -1
- package/assets/{CaJ9j3l0cERnYqDS.js → DI_SAQ7hesioI9TW.js} +1 -1
- package/assets/{AnF1Kh3Vo2AniIYO.js → DKnwIboAj_Sg9aVP.js} +2 -2
- package/assets/{Dgi2xwb2DN2Gybj3.js → DL3ms6Hf2uEGaMgH.js} +2 -2
- package/assets/{D_peM8fbRgGaWvpq.js → DMGq2icilGiyfBTM.js} +1 -1
- package/assets/{BSAdmOdx3brRE9LW.js → DMnhlFBJ2AlVx2_t.js} +1 -1
- package/assets/{D6ON3ZLcTAXV3fO6.js → DN4zv4AjDxTsLFsA.js} +11097 -9112
- package/assets/{D5L35C8cbX16BSCF.js → DP-FzazhSKAvylUa.js} +1132 -1067
- package/assets/{BodrfKIAhDFD-X3t.js → DSDlxGN059KmkCxT.js} +1 -1
- package/assets/{0kfwZuOHUkJmVjg6.js → DWK-OKV0MErx-IrU.js} +6 -6
- package/assets/{CqjNsZ2OB4Kx6J3s.js → DY1x1ZN7ZyE4OR1-.js} +8 -8
- package/assets/{DE4xC78p5UtS7wH6.js → DafqFM-FGeZJ_fzg.js} +1 -1
- package/assets/{BebXDUnlrDDRGW60.js → DbwDQlhCuGoasVUz.js} +2 -2
- package/assets/{CWLleOolFzyT0COW.js → DcjJ_zTfdh6RqmVZ.js} +1 -1
- package/assets/{DnTfXqCnRCe-1QYI.js → Del35nO_1HyjItI0.js} +59 -59
- package/assets/{BvDcHHJvQMRHthm-.js → Dh2iae-q0IngEeyH.js} +1 -1
- package/assets/{B6NnxkSmEzCGZEZA.js → Dhg0yeTmVfmRV5rK.js} +1 -1
- package/assets/{kpS1vY0DcE9p8JnI.js → DjoFujVwGRAxviCF.js} +2 -2
- package/assets/{Cr6lm0oXZJaaoAmD.js → DlWRvc1pLGPCRMwi.js} +1 -1
- package/assets/{B2BfjRdJGZs6afVL.js → DmCRCUmmkoRNCS9J.js} +2 -2
- package/assets/{CsiIgnb_L2x2Go6g.js → DmUCKxOYIBM6DX64.js} +1 -1
- package/assets/{-cMvbaW1kvHslPKX.js → Du9_Ajy9KvnwHApK.js} +2 -2
- package/assets/{D5VFuX1h50V2jLmZ.js → DwOPJ5TXttTx69oF.js} +226 -225
- package/assets/{OHBzl-tZOi9Ni8YV.js → DzEJwSC-_aavYiFd.js} +1 -1
- package/assets/{1feDuXw6tBXu2XFg.js → EDEUvF-L72a6fMCK.js} +1 -1
- package/assets/{DMuOMpgIhVgB3eG8.js → F0HGXXl9AizCAcFy.js} +1 -1
- package/assets/{DSsH28SW8CMrSL-q.js → Iv_Zbm3pMLOK2uxf.js} +1 -1
- package/assets/LLdkCOYvtc1-vOsy.js +14 -0
- package/assets/{B7OyFSpBb1eBvMVd.js → MfkAFluI0ZyU0UDV.js} +13 -13
- package/assets/{BOx4Ut_Rme7NH34X.js → NZeFs1MV5h-uMZqJ.js} +1 -1
- package/assets/{B8JX7a6VZlBNA_Bd.js → Rpi4k7hMH8wPAIcB.js} +14 -14
- package/assets/{BhCbCEPpDzhg5nqL.js → SCOKwiDu6SYiQrQ0.js} +1 -1
- package/assets/{DYJcfrNUUJQtxXWX.js → VL-vwx7Pyw1zqIx9.js} +1 -1
- package/assets/{G2Wjyx_ETCAcofwm.js → VcmpHRbBIrw6av3U.js} +1290 -1263
- package/assets/{CshK6Ew7OQ7mngI3.js → XDQBri0_cS5paHej.js} +2 -2
- package/assets/{CtmrBbpapaNwjwNB.js → gAg9rL3U8fWUDeEb.js} +25 -25
- package/assets/{CwRhhoL5ynbe78dB.js → hLMlKg3lU36xZ6G6.js} +1 -1
- package/assets/{DrHVew6gwOB6oxCn.js → hvCnPO_Fu7Nqz0rs.js} +1 -1
- package/assets/{BmM-nHMAAuNatCcN.js → nPoObUd0MvWI-j0F.js} +1 -1
- package/assets/{BJdWgj1hv57eGVl4.js → nnqtgWxMIc_Nc-IP.js} +594 -594
- package/assets/{C2ZX6ffXsMaEr2d2.js → o9G5KuG1VkSazTvI.js} +383 -383
- package/assets/{IGAV8DdYH32cW8XU.js → pg7E7B7ouG2qdZve.js} +1 -1
- package/assets/{MW2nt7se27FlH9Yb.js → r9WSFw3a-_a5hlPm.js} +1 -1
- package/assets/{Ljri8sTW3dWT4clD.js → rIReGgfQ90pzLAbU.js} +1 -1
- package/assets/{FvxN6PPps-rNPDo8.js → vXZw1AmMzswOZMiP.js} +1 -1
- package/assets/{C3Q-fjiZZ15waCq_.js → wZ-GQhOhikv-_3iQ.js} +2 -2
- package/assets/{YFiGplEq1G4XdCJ2.js → yBFl0kPv-nwFtG4Z.js} +1 -1
- package/index.js +1175 -1104
- package/lib.js +1 -1
- package/licenses/dependencies.txt +11 -11
- package/package.json +2 -2
- package/resources/locales/@sheetxl/sdk/de/model.msg.json +15 -0
- package/resources/locales/@sheetxl/sdk/en/model.msg.json +15 -0
- package/screenshot-page/assets/{Djl40tfWoPJSvqtv.js → 2XWoSsrRz2kognCK.js} +1 -1
- package/screenshot-page/assets/{CT7cY57t9j1sBhAy.js → 5TxlmdZxlCDkawVW.js} +1 -1
- package/screenshot-page/assets/{CSMEGhAHxl5-4FxB.js → B7u12-Sf0HF7g4wI.js} +1 -1
- package/screenshot-page/assets/BCOjWc-VhkuVoCVf.js +1 -0
- package/screenshot-page/assets/BqQ2A9WL6mcRxbSt.js +2 -0
- package/screenshot-page/assets/Bw4kRw8JKyNRlLE2.js +1 -0
- package/screenshot-page/assets/BwF-LAYFu91KqvJ8.js +2 -0
- package/screenshot-page/assets/{D_rtIYQ7FDC2CoEn.js → Bwk0ScujWaYYqx5G.js} +1 -1
- package/screenshot-page/assets/ByehV0cOs5aIySS-.js +13 -0
- package/screenshot-page/assets/{CUZobZ3mfNAdEisS.js → C0F9BL11dkgzjp7Y.js} +1 -1
- package/screenshot-page/assets/{Bh33WyohJvbKZVQN.js → C1lrvl0Ad1-NjWKG.js} +2 -2
- package/screenshot-page/assets/{B1W17rc9ilPFCh31.js → C3KvRJ_eXd6xnmlO.js} +1 -1
- package/screenshot-page/assets/C3QIYFX-vF_1DVmi.js +586 -0
- package/screenshot-page/assets/C6vseMcEu3To1U6k.js +4 -0
- package/screenshot-page/assets/CM9cBiCjJIY64PWg.js +1 -0
- package/screenshot-page/assets/{CTjUtxDw6Z2I9OGc.js → CNFMt4XhKy4tlsUn.js} +1 -1
- package/screenshot-page/assets/COpZTXe_J1mSpeYD.js +5 -0
- package/screenshot-page/assets/{BMwQInar0xVS5FRu.js → CafJ2T5GCjkumgLh.js} +1 -1
- package/screenshot-page/assets/CaiPDssAQqXac5AG.js +3 -0
- package/screenshot-page/assets/Cfs_rQCXBMVhJgat.js +1 -0
- package/screenshot-page/assets/CijzqW2bsxOQdDxl.js +2 -0
- package/screenshot-page/assets/{BKwVcuWOKeH2xREA.js → CpZHZoz3xpJMDWI0.js} +1 -1
- package/screenshot-page/assets/{DXaM3CulPA3aPGV1.js → Csjis_Fk8q4mSqdp.js} +2 -2
- package/screenshot-page/assets/{CB2mQ5rbaSw2W4ik.js → D1TqM0Bt65K6svMS.js} +23 -23
- package/screenshot-page/assets/D5kEl0N4l6MzdmTG.js +1 -0
- package/screenshot-page/assets/{B8qybUclSjEYP5FJ.js → D6WTzLygjgK85siu.js} +2 -2
- package/screenshot-page/assets/D7e00cCBTtcIRmjV.js +1 -0
- package/screenshot-page/assets/{-N4OYIMgf6f5vgNy.js → DGB9wBuDWt0bzTNE.js} +1 -1
- package/screenshot-page/assets/{CfkssmHURDicfYvR.js → DNoZea7QMO9zB6D5.js} +1 -1
- package/screenshot-page/assets/DZ2zDgzt-mnhg3Kd.js +1 -0
- package/screenshot-page/assets/DaVBDkeZxbXnuyGz.js +42 -0
- package/screenshot-page/assets/{Cbcv49b9jWyY4HKj.js → DgNbqKuVd-Q170VZ.js} +2 -2
- package/screenshot-page/assets/{C71ZZMVLfHdPl441.js → Di8Yn8O-rD9idC2h.js} +1 -1
- package/screenshot-page/assets/DjtXY9uxB3QP6hU3.js +1 -0
- package/screenshot-page/assets/DknSteOdQ6CdF0RT.js +1 -0
- package/screenshot-page/assets/Dv-4mfeFKIoD5jaY.js +3 -0
- package/screenshot-page/assets/DzlbsQ0qqdQEl80f.js +1 -0
- package/screenshot-page/assets/F6yLCIlSWZ1lAUEp.js +2 -0
- package/screenshot-page/assets/HZAIE0lHXXFqlb2v.js +1 -0
- package/screenshot-page/assets/Lr2MYBmoCKMLBl_6.js +5 -0
- package/screenshot-page/assets/{BD96fN2dSVuoME09.js → NDzpWLUA0pbyI-Rd.js} +3 -3
- package/screenshot-page/assets/O-S3tcMip6iXUjQF.js +1 -0
- package/screenshot-page/assets/eV_6j-vFozPgfcjz.js +1 -0
- package/screenshot-page/assets/{DcUOAH274IbYOuK1.js → iAWaCU0XkY0ktnNk.js} +1 -1
- package/screenshot-page/assets/it1wnIFQtbJ4Dm8N.js +1 -0
- package/screenshot-page/assets/mCyh2440vZi8s1uY.js +39 -0
- package/screenshot-page/assets/{DdXSKhFUAsKUsQ1u.js → t4FRkJl27a0itCt6.js} +1 -1
- package/screenshot-page/assets/{D0koRjO2KnWQ1fNV.js → tPEJNcr51GaPfk3O.js} +1 -1
- package/screenshot-page/assets/zEVoxCTt-ZW8Aowg.js +16 -0
- package/screenshot-page/index.html +10 -9
- package/screenshot-page/resources/locales/@sheetxl/sdk/de/model.msg.json +15 -0
- package/screenshot-page/resources/locales/@sheetxl/sdk/en/model.msg.json +15 -0
- package/types/scripting-api.json +11445 -11299
- package/types/scripting-enums.json +22 -1
- package/types/scripting.d.ts +623 -0
- package/assets/CSLLHl-zum7m1CJl.js +0 -14
- package/screenshot-page/assets/7Xk_eQAcM_HgWrOC.js +0 -1
- package/screenshot-page/assets/B8UkvH0o9n_G5UO9.js +0 -3
- package/screenshot-page/assets/BE8ea8S0Q-qogeEs.js +0 -2
- package/screenshot-page/assets/BNMBa8EZgWX2Eb3c.js +0 -1
- package/screenshot-page/assets/BQCyH9YbEgnH78Ke.js +0 -2
- package/screenshot-page/assets/BcDxaEii3arJqOym.js +0 -1
- package/screenshot-page/assets/Be-rukvcufhLamH5.js +0 -1
- package/screenshot-page/assets/C2ty_K_uix4ooip6.js +0 -1
- package/screenshot-page/assets/C9mUKjQ3yEzRu9j2.js +0 -2
- package/screenshot-page/assets/CCVAsuUimIJOkBnk.js +0 -1
- package/screenshot-page/assets/CFfgJlXaIS8QMx5O.js +0 -1
- package/screenshot-page/assets/CN8u05DjKwNHbUHN.js +0 -5
- package/screenshot-page/assets/COoMVTzF50qBNFEu.js +0 -39
- package/screenshot-page/assets/C_OuKbe6z1it80cj.js +0 -1
- package/screenshot-page/assets/CtZFqwLoeJOvwFrl.js +0 -42
- package/screenshot-page/assets/Cz6KFmsp267l_VZS.js +0 -1
- package/screenshot-page/assets/DCP8JXEeiwAMiVD2.js +0 -1
- package/screenshot-page/assets/DQAZPADvH5lhlMnK.js +0 -1
- package/screenshot-page/assets/DQBUH0j44Vtrykua.js +0 -13
- package/screenshot-page/assets/DRncpwDkZZX8rL9S.js +0 -20
- package/screenshot-page/assets/DSKOOgcJQeqIc9Us.js +0 -3
- package/screenshot-page/assets/LYyM_ig973jLdOU0.js +0 -2
- package/screenshot-page/assets/TCImIYUUdVD4Z35I.js +0 -1
- package/screenshot-page/assets/Tph2vYqw17-NBCtd.js +0 -1
- package/screenshot-page/assets/dQsis-90Up-pIkSq.js +0 -4
- package/screenshot-page/assets/dXn1GWWjYmuLb1HF.js +0 -586
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.18
|
|
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 "./
|
|
8
|
-
import { a as i, r as a } from "./
|
|
9
|
-
import { B as c, M as d, _ as h, f as u, ht as _, sn as f, st as g } from "./
|
|
10
|
-
import { a as p, d as m, l as S, m as w, p as E, u as I } from "./
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
7
|
+
import { Q as t, St as e, Z as n, ht as r, ot as o, r as s, u as l } from "./CDqOifqA400y7KQY.js";
|
|
8
|
+
import { a as i, r as a } from "./CkO0JR629W2kcDMd.js";
|
|
9
|
+
import { B as c, M as d, _ as h, f as u, ht as _, sn as f, st as g } from "./CGGpkGg85FZsnYHc.js";
|
|
10
|
+
import { a as p, d as m, l as S, m as w, p as E, u as I } from "./r9WSFw3a-_a5hlPm.js";
|
|
11
|
+
import { Aa as y, Ai as v, An as x, At as C, Bt as b, C as A, D as R, Dr as k, E as N, Ea as M, Ei as F, F as D, G as T, Ha as G, Hr as B, Ht as V, Ii as O, In as P, It as z, Ji as L, Jr as $, Jt as H, Ka as j, Ki as K, Kt as q, La as U, Lt as W, M as X, Ma as J, Mi as Q, Mt as Y, N as Z, Nn as tt, Oi as et, Ot as nt, Pn as rt, Pr as ot, Pt as st, Qa as lt, Qn as it, Qr as at, Qt as ct, R as dt, Si as ht, Sn as ut, Ti as _t, Ua as ft, V as gt, Va as pt, Vn as mt, Vr as St, Vt as wt, Xa as Et, Xn as It, Y as yt, Ya as vt, Yn as xt, Yr as Ct, Z as bt, Zr as At, _t as Rt, a as kt, aa as Nt, ai as Mt, an as Ft, b as Dt, bn as Tt, br as Gt, c as Bt, ca as Vt, ci as Ot, dt as Pt, er as zt, et as Lt, fa as $t, fo as Ht, fr as jt, g as Kt, ga as qt, gn as Ut, hr as Wt, ht as Xt, i as Jt, ii as Qt, ir as Yt, it as Zt, ja as te, kr as ee, la as ne, li as re, ln as oe, lo as se, lr as le, lt as ie, m as ae, mo as ce, mr as de, na as he, nn as ue, no as _e, nt as fe, oi as ge, oo as pe, or as me, qi as Se, r as we, si as Ee, so as Ie, sr as ye, ta as ve, to as xe, tr as Ce, ui as be, ur as Ae, ut as Re, va as ke, vi as Ne, wt as Me, x as Fe, xi as De, xr as Te, yi as Ge, yr as Be, zi as Ve } from "./DN4zv4AjDxTsLFsA.js";
|
|
12
|
+
import { C as Oe, E as Pe, O as ze, d as Le, f as $e, h as He, r as je, u as Ke, v as qe, x as Ue } from "./o9G5KuG1VkSazTvI.js";
|
|
13
|
+
import { r as We } from "./Del35nO_1HyjItI0.js";
|
|
14
|
+
import { _ as Xe, a as Je, c as Qe, d as Ye, f as Ze, g as tn, h as en, i as nn, l as rn, m as on, n as sn, o as ln, p as an, r as cn, s as dn, u as hn } from "./gAg9rL3U8fWUDeEb.js";
|
|
15
|
+
import { c as un, i as _n, n as fn, o as gn, s as pn, t as mn } from "./B2C5njsdPylyQOCM.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
|
|
23
|
+
t = new N({
|
|
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
|
|
79
|
+
if (null == r) return mt;
|
|
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
|
|
82
|
-
const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ?
|
|
81
|
+
if (o && ((o.colStart ?? 0) > 0 || (o.rowStart ?? 0) > 0 || (o.colEnd ?? 0) < 0 || (o.rowEnd ?? 0) < 0)) return mt;
|
|
82
|
+
const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ? Be(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 ?
|
|
85
|
+
next: (t) => c ? c.next(t) : t ? (c = i._materialize().entries(e), c.next(t)) : a ? Zt : (a = !0, Jt(0, 0, r, s, l)),
|
|
86
86
|
[Symbol.iterator]() {
|
|
87
87
|
return this;
|
|
88
88
|
},
|
|
89
|
-
return: (t) =>
|
|
90
|
-
throw: (t) =>
|
|
89
|
+
return: (t) => Zt,
|
|
90
|
+
throw: (t) => Zt
|
|
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
|
|
246
|
+
return e || (e = new et(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 ??=
|
|
266
|
+
return this._asFunction ??= J(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 (
|
|
304
|
+
if (U(t)) throw t;
|
|
305
305
|
return m.isError(t) ? t : new m.Value(t?.message, { cause: t });
|
|
306
306
|
}
|
|
307
307
|
};
|
|
@@ -341,18 +341,18 @@ var Sn = class e {
|
|
|
341
341
|
getTextAt(t, e, n = !1, r, o) {
|
|
342
342
|
const s = "display" === o, l = this._compiled;
|
|
343
343
|
if (l.error && !l.ast) return l.error.input;
|
|
344
|
-
let i = void 0 !== r ?
|
|
345
|
-
i =
|
|
344
|
+
let i = void 0 !== r ? Ue(l.ast, r) : l.getTokens();
|
|
345
|
+
i = Nt(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() :
|
|
351
|
-
return n ?
|
|
350
|
+
const a = s ? this._displayLocale() : Tt;
|
|
351
|
+
return n ? Et(i, this._getEntireCoords?.(), a) : Te(i, this._getEntireCoords?.(), t, e, a);
|
|
352
352
|
}
|
|
353
353
|
_displayLocale() {
|
|
354
354
|
const t = this._context.getRuntime().getLocaleProfile();
|
|
355
|
-
return
|
|
355
|
+
return j(Ut(t.decimal));
|
|
356
356
|
}
|
|
357
357
|
getRecord() {
|
|
358
358
|
const t = this._record;
|
|
@@ -396,19 +396,19 @@ var Sn = class e {
|
|
|
396
396
|
$rowEnd: e.$rowEnd,
|
|
397
397
|
scope: t.scope
|
|
398
398
|
};
|
|
399
|
-
} else n.node.type ===
|
|
399
|
+
} else n.node.type === ut.Cell ? i = { ...o[n.value] } : n.op === ut.Named ? i = { nameId: n.node.value.nameId } : n.op === ut.TableReference && (i = { table: { ...n.node.value } });
|
|
400
400
|
s[t] = i;
|
|
401
401
|
}
|
|
402
402
|
return s;
|
|
403
403
|
}
|
|
404
404
|
getNode() {
|
|
405
405
|
const t = this._compiled;
|
|
406
|
-
return t.ast ?
|
|
406
|
+
return t.ast ? We(t.ast, t.symbols) : null;
|
|
407
407
|
}
|
|
408
408
|
getTokensAt(t, e, n) {
|
|
409
409
|
const r = this._compiled;
|
|
410
|
-
let o = void 0 !== n ?
|
|
411
|
-
return o =
|
|
410
|
+
let o = void 0 !== n ? Ue(r.ast, n) : r.getTokens();
|
|
411
|
+
return o = Nt(o, r.symbols, !1, !0), ae(o, t, e);
|
|
412
412
|
}
|
|
413
413
|
getError() {
|
|
414
414
|
return this._compiled.error ?? null;
|
|
@@ -437,17 +437,17 @@ var Sn = class e {
|
|
|
437
437
|
}
|
|
438
438
|
demandFirstCell() {
|
|
439
439
|
const t = this._compiled;
|
|
440
|
-
t?.ast &&
|
|
440
|
+
t?.ast && Le(t.ast, t.getFunction);
|
|
441
441
|
}
|
|
442
442
|
getPositionVariants() {
|
|
443
443
|
let e = this._positionVariants;
|
|
444
444
|
if (void 0 !== e) return e;
|
|
445
445
|
e = null;
|
|
446
|
-
const n = this._compiled, r = n && !n.error && n.ast ?
|
|
446
|
+
const n = this._compiled, r = n && !n.error && n.ast ? je(n.ast, n.getFunction) : null;
|
|
447
447
|
if (r) {
|
|
448
448
|
const o = void 0 !== n.ast.firstCell;
|
|
449
449
|
e = r.map((e) => {
|
|
450
|
-
const r = new t(
|
|
450
|
+
const r = new t(Pe(n.runtime, n.symbols, e, !1, null, n.getFunction), this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
|
|
451
451
|
return o && r.demandFirstCell(), r;
|
|
452
452
|
});
|
|
453
453
|
}
|
|
@@ -462,12 +462,12 @@ var Sn = class e {
|
|
|
462
462
|
const n = this._compiled.getTokens(), r = e._compiled.getTokens();
|
|
463
463
|
if (n.length !== r.length) return !1;
|
|
464
464
|
const o = this._context.getEntireCoords();
|
|
465
|
-
return
|
|
465
|
+
return Et(n, o) === Et(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 =
|
|
470
|
+
const l = n.referencesExecute, i = n.referencesRelative, a = st(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 ===
|
|
486
|
+
} else if (r.node.type === ut.Cell) {
|
|
487
487
|
const t = i[r.value];
|
|
488
488
|
a[n] = { ...t };
|
|
489
|
-
} else if (r.op ===
|
|
490
|
-
const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(
|
|
489
|
+
} else if (r.op === ut.Named) {
|
|
490
|
+
const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(ue.NamedFormula, t)?.toString() ?? t;
|
|
491
491
|
a[n] = { nameId: e };
|
|
492
|
-
} else if (r.op ===
|
|
492
|
+
} else if (r.op === ut.TableReference) {
|
|
493
493
|
const o = r.node.value;
|
|
494
494
|
let s = this._resolveStructuredRef(o, t, e);
|
|
495
495
|
!s || m.isError(s) ? a[n] = null : a[n] = {
|
|
496
496
|
...s,
|
|
497
497
|
tableId: o.tableId
|
|
498
498
|
};
|
|
499
|
-
} else r.op ===
|
|
499
|
+
} else r.op === ut.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 :
|
|
505
|
+
return 0 === n.length ? r.EmptyArray : at(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 ===
|
|
535
|
+
const d = a[c], h = d.node, u = h.inputs ?? r.EmptyArray, _ = d.op === ut.Named, f = 2 === u.length;
|
|
536
536
|
let g, p, S = !1;
|
|
537
537
|
n && m.isError(n) && (n = null), n && "nameId" in n && !_ && (n = null);
|
|
538
538
|
const w = n && "nameId" in n ? null : n, E = !!w && void 0 !== w.colIndex;
|
|
@@ -562,7 +562,7 @@ var Sn = class e {
|
|
|
562
562
|
let y = -1, v = -1, x = -1, C = -1;
|
|
563
563
|
if (f) y = u[0].evalIndex, v = u[1].evalIndex;
|
|
564
564
|
else if ("cell" === h.type) y = h.evalIndex;
|
|
565
|
-
else if (d.op ===
|
|
565
|
+
else if (d.op === ut.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(
|
|
575
|
+
if (r) return e && !e.resolve(ue.Sheet, r) ? null : r;
|
|
576
576
|
}
|
|
577
577
|
return null;
|
|
578
|
-
},
|
|
578
|
+
}, A = h, R = this._compiled.ast, k = Ee(R, (t) => {
|
|
579
579
|
if (!t || !t.isReference) return;
|
|
580
|
-
if (I && t ===
|
|
580
|
+
if (I && t === A) return xe(g);
|
|
581
581
|
const e = t.type;
|
|
582
|
-
if (-1 !== C && t.evalIndex === C && e ===
|
|
583
|
-
if (!n) return
|
|
582
|
+
if (-1 !== C && t.evalIndex === C && e === ut.Named) {
|
|
583
|
+
if (!n) return ee();
|
|
584
584
|
if (n && "nameId" in n) {
|
|
585
|
-
const e = n, r = this._compiled.symbols?.bind(
|
|
585
|
+
const e = n, r = this._compiled.symbols?.bind(ue.NamedFormula, e.nameId) ?? e.nameId, o = { ...t };
|
|
586
586
|
return o.value = {
|
|
587
587
|
...t.value,
|
|
588
588
|
...e,
|
|
589
589
|
nameId: r
|
|
590
590
|
}, o;
|
|
591
591
|
}
|
|
592
|
-
return S ?
|
|
592
|
+
return S ? me(":", xe(g), xe(p), !0) : xe(g);
|
|
593
593
|
}
|
|
594
|
-
if (-1 !== x && t.evalIndex === x && e ===
|
|
594
|
+
if (-1 !== x && t.evalIndex === x && e === ut.TableReference) return n ? S ? me(":", xe(g), xe(p), !0) : xe(g) : ee();
|
|
595
595
|
if (!n && Ke.includes(t.value)) {
|
|
596
596
|
const e = t.inputs ?? r.EmptyArray, n = e[0], o = e[1];
|
|
597
597
|
let s = n.evalIndex === y, l = o.evalIndex === v;
|
|
598
598
|
if (s || l) {
|
|
599
|
-
const e =
|
|
599
|
+
const e = ee(void 0, void 0, b(n, o));
|
|
600
600
|
return e.evalIndex = t.evalIndex, e;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
@@ -607,20 +607,20 @@ var Sn = class e {
|
|
|
607
607
|
if (n) if (f === S) {
|
|
608
608
|
let e = l ? g : p;
|
|
609
609
|
s = { ...t }, s.value = e, s.image = null;
|
|
610
|
-
} else s =
|
|
611
|
-
else s =
|
|
610
|
+
} else s = me(":", xe(g), xe(p), !0);
|
|
611
|
+
else s = ee(void 0, void 0, b(t)), s.evalIndex = t.evalIndex;
|
|
612
612
|
return s;
|
|
613
613
|
}
|
|
614
614
|
});
|
|
615
|
-
if (k ===
|
|
616
|
-
const N =
|
|
615
|
+
if (k === R) return this;
|
|
616
|
+
const N = Pe(l.runtime, l.symbols, k, !1, l.error, l.getFunction);
|
|
617
617
|
return new t(N, this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
|
|
618
618
|
}
|
|
619
619
|
reanchorReferences(e, n) {
|
|
620
|
-
const r = this._compiled, o = this._gridId, s = this._compiled.symbols.bind(
|
|
620
|
+
const r = this._compiled, o = this._gridId, s = this._compiled.symbols.bind(ue.Sheet, e), l = r.transform((t, e) => {
|
|
621
621
|
if (!t || !t.isReference) return;
|
|
622
|
-
if (t.type !==
|
|
623
|
-
if (
|
|
622
|
+
if (t.type !== ut.Cell) return;
|
|
623
|
+
if (Oe(e) && e.inputs?.[0] !== t) return;
|
|
624
624
|
let r;
|
|
625
625
|
const l = t.value.scope;
|
|
626
626
|
return (!l || n && l === o) && (r = { ...t }, r.value = { ...r.value }, r.value.scope = s), r;
|
|
@@ -631,8 +631,8 @@ 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 !==
|
|
635
|
-
if (
|
|
634
|
+
if (t.type !== ut.Cell) return;
|
|
635
|
+
if (Oe(r) && r.inputs?.[0] !== t) return;
|
|
636
636
|
if (t.value.scope !== e) return;
|
|
637
637
|
const o = { ...t };
|
|
638
638
|
return o.value = { ...o.value }, o.value.scope = n, o;
|
|
@@ -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 !==
|
|
644
|
+
if (t?.type !== ut.TableReference) return;
|
|
645
645
|
const r = t.value;
|
|
646
646
|
if ("object" != typeof r || r?.tableId !== e) return;
|
|
647
647
|
const o = n(r);
|
|
@@ -654,7 +654,7 @@ var Sn = class e {
|
|
|
654
654
|
if (o.activeNames.has(r)) return m.BuiltIn.Ref;
|
|
655
655
|
const s = this._resolvers?.getNamedFormulaBlock?.(r);
|
|
656
656
|
if (!s) {
|
|
657
|
-
const t = this._compiled, e = t.symbols?.resolve(
|
|
657
|
+
const t = this._compiled, e = t.symbols?.resolve(ue.NamedFormula, r), n = e ? e.toString() : r, o = t.getFunction?.(n) ?? null;
|
|
658
658
|
return o ? new vn(o) : m.BuiltIn.Name;
|
|
659
659
|
}
|
|
660
660
|
const l = o.gridId, i = o.rowIndex, a = o.colIndex;
|
|
@@ -694,15 +694,15 @@ var Sn = class e {
|
|
|
694
694
|
f[r.index] = t;
|
|
695
695
|
continue;
|
|
696
696
|
}
|
|
697
|
-
if (o ===
|
|
697
|
+
if (o === ut.Named) {
|
|
698
698
|
f[r.index] = this._resolveNamedPrecedents(r.node.value, t, e);
|
|
699
699
|
continue;
|
|
700
700
|
}
|
|
701
|
-
if (o ===
|
|
702
|
-
f[r.index] =
|
|
701
|
+
if (o === ut.Error) {
|
|
702
|
+
f[r.index] = Bt(r.node.value);
|
|
703
703
|
continue;
|
|
704
704
|
}
|
|
705
|
-
if (o ===
|
|
705
|
+
if (o === ut.TableReference) {
|
|
706
706
|
const n = r.node.value;
|
|
707
707
|
let o;
|
|
708
708
|
n && (o = this._resolveStructuredRef(n, t, e)), o || (o = m.BuiltIn.Ref), f[r.index] = o;
|
|
@@ -729,13 +729,13 @@ var Sn = class e {
|
|
|
729
729
|
else {
|
|
730
730
|
if (" " === o) {
|
|
731
731
|
const t = l.scope ? a.scope ? null : l.scope : a.scope;
|
|
732
|
-
i = t && this._gridId && t !== this._gridId ? m.BuiltIn.Value :
|
|
733
|
-
} else if (":" === o || ".:." === o || ":." === o || ".:" === o) i =
|
|
732
|
+
i = t && this._gridId && t !== this._gridId ? m.BuiltIn.Value : qt(l, a);
|
|
733
|
+
} else if (":" === o || ".:." === o || ":." === o || ".:" === o) i = xt(l, a);
|
|
734
734
|
else if ("," === o) {
|
|
735
735
|
const t = s.length;
|
|
736
736
|
for (let e = 0; e < t; e++) {
|
|
737
737
|
const t = f[s[e]];
|
|
738
|
-
void 0 === t || Array.isArray(t) || m.isError(t) || (i = i ?
|
|
738
|
+
void 0 === t || Array.isArray(t) || m.isError(t) || (i = i ? xt(i, t) : t);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
f[r.index] = i ?? m.BuiltIn.Null;
|
|
@@ -762,7 +762,7 @@ var Sn = class e {
|
|
|
762
762
|
const s = e.op;
|
|
763
763
|
let h, u = null;
|
|
764
764
|
if (s) {
|
|
765
|
-
if (s ===
|
|
765
|
+
if (s === ut.Error) h = Bt(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 (
|
|
794
|
+
if (Ee(s.ast, (t) => {
|
|
795
795
|
t.evalIndex === n && (r = t);
|
|
796
796
|
}), !r) throw new Error(`Invalid evalIndex: ${n}`);
|
|
797
797
|
if (s.bindings.length > 0 && !s.error) {
|
|
@@ -799,7 +799,7 @@ var Sn = class e {
|
|
|
799
799
|
const o = s.evaluations;
|
|
800
800
|
return (() => o[n] ?? (!0 === r.inLazy ? this._valueOfLazy(r, o, null, t, e) : void 0))();
|
|
801
801
|
}
|
|
802
|
-
s =
|
|
802
|
+
s = Pe(o.getRuntime(), s.symbols, Tn(r), !1);
|
|
803
803
|
}
|
|
804
804
|
if (s.error) return s.error.cause;
|
|
805
805
|
s.hasVolatile && r.node && o.markVolatile();
|
|
@@ -808,13 +808,13 @@ var Sn = class e {
|
|
|
808
808
|
const a = s.referencesExecute, c = s.referencesRelative, d = s.referencesAbsolute, h = a.length;
|
|
809
809
|
for (let n = 0; n < h; n++) {
|
|
810
810
|
const r = a[n], s = r.op, i = r.node;
|
|
811
|
-
if (s) if (s ===
|
|
811
|
+
if (s) if (s === ut.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 ===
|
|
817
|
-
else if (s ===
|
|
816
|
+
else if (s === ut.Error) l[i.evalIndex] = Bt(r.node.value);
|
|
817
|
+
else if (s === ut.TableReference) {
|
|
818
818
|
const n = r.node.value;
|
|
819
819
|
let s;
|
|
820
820
|
s = n ? this._resolveStructuredRef(n, t, e) : m.BuiltIn.Ref, m.isError(s) || void 0 === s?.colStart ? l[i.evalIndex] = s ?? m.BuiltIn.Ref : l[i.evalIndex] = o.getReference(s);
|
|
@@ -830,41 +830,41 @@ var Sn = class e {
|
|
|
830
830
|
const o = this._compiled, s = o.ast;
|
|
831
831
|
if (!s || !s.isReference) return this;
|
|
832
832
|
if ("cell" === s.type) return this;
|
|
833
|
-
if (s.type ===
|
|
833
|
+
if (s.type === ut.Error) return this;
|
|
834
834
|
if ("@" === s.value) return this;
|
|
835
835
|
if (!r) return this;
|
|
836
|
-
const l =
|
|
836
|
+
const l = Ie(n) + _t(e);
|
|
837
837
|
if (r.has(l)) return this;
|
|
838
|
-
const i =
|
|
838
|
+
const i = Wt("@", s, !0), a = Pe(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
|
|
845
|
+
case ut.Infix: {
|
|
846
846
|
const n = t.value;
|
|
847
847
|
let r = e[l[0].evalIndex], o = e[l[1].evalIndex];
|
|
848
|
-
if (!0 === t.firstCell && !t.isReference && this._demandsFirstCell() && (r =
|
|
848
|
+
if (!0 === t.firstCell && !t.isReference && this._demandsFirstCell() && (r = Rn(r), o = Rn(o)), ("+" === n || "-" === n) && (r = An(s, r), "number" == typeof r && (o = An(s, o), "number" == typeof o))) {
|
|
849
849
|
const e = "+" === n ? r + o : r - o;
|
|
850
|
-
return
|
|
850
|
+
return Pt(!0 === t.snapsCancellation ? X(e, r) : e, null);
|
|
851
851
|
}
|
|
852
852
|
if (!t.isReference) {
|
|
853
853
|
if (r && m.isError(r)) return r;
|
|
854
854
|
if (o && m.isError(o)) return o;
|
|
855
855
|
}
|
|
856
|
-
const i = t.fn ?? (t.fn = !0 === t.snapsCancellation ?
|
|
857
|
-
return c = i ? i(s, r, o) : m.BuiltIn.Value, c =
|
|
856
|
+
const i = t.fn ?? (t.fn = !0 === t.snapsCancellation ? ze[t.value] : $e[t.value]);
|
|
857
|
+
return c = i ? i(s, r, o) : m.BuiltIn.Value, c = Pt(c, null), c;
|
|
858
858
|
}
|
|
859
|
-
case
|
|
859
|
+
case ut.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 =
|
|
863
|
+
const s = Se.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
|
|
865
|
+
this._fillLazyArgs(l, i, e, o, n, r, s), !0 === t.passOmitted && Dn(l, i), c = this._callFunction(t, Fn, i), c instanceof Se && (c = c._force());
|
|
866
866
|
} finally {
|
|
867
|
-
|
|
867
|
+
Se.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
|
|
876
|
-
case
|
|
875
|
+
case ut.Prefix:
|
|
876
|
+
case ut.Postfix: {
|
|
877
877
|
let n = e[l[0].evalIndex];
|
|
878
|
-
if (!0 === t.firstCell && !t.isReference && "@" !== t.value && this._demandsFirstCell() && (n =
|
|
879
|
-
const r = t.fn ?? (t.fn = a ===
|
|
878
|
+
if (!0 === t.firstCell && !t.isReference && "@" !== t.value && this._demandsFirstCell() && (n = Rn(n)), n && m.isError(n)) return n;
|
|
879
|
+
const r = t.fn ?? (t.fn = a === ut.Prefix ? He[t.value] : qe[t.value]);
|
|
880
880
|
return c = r ? r(s, n) : m.BuiltIn.Value, c;
|
|
881
881
|
}
|
|
882
|
-
case
|
|
883
|
-
case
|
|
882
|
+
case ut.List:
|
|
883
|
+
case ut.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 &&
|
|
887
|
+
if (null !== n && "object" == typeof n && Q(n.scope)) return m.BuiltIn.Name;
|
|
888
888
|
}
|
|
889
889
|
let t = !1;
|
|
890
|
-
for (let n = 0; n < i; n++) if (
|
|
890
|
+
for (let n = 0; n < i; n++) if (q(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
|
-
|
|
898
|
+
q(r) ? t.push(...r) : t.push(r);
|
|
899
899
|
}
|
|
900
|
-
const n =
|
|
900
|
+
const n = st(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 =
|
|
904
|
+
const n = st(i);
|
|
905
905
|
for (let t = 0; t < i; t++) n[t] = e[l[t].evalIndex];
|
|
906
906
|
return n;
|
|
907
907
|
}
|
|
908
|
-
case
|
|
908
|
+
case ut.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
|
|
925
|
-
case
|
|
924
|
+
case ut.TableReference: return e[t.evalIndex] ?? null;
|
|
925
|
+
case ut.Call: {
|
|
926
926
|
const n = e[l[0].evalIndex];
|
|
927
927
|
return n && m.isError(n) ? n : (c = this._applyCallee(n, t, e), c);
|
|
928
928
|
}
|
|
929
|
-
case
|
|
929
|
+
case ut.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 :
|
|
939
|
+
!a && (!0 === o?.isIRange ? o.size > 1 : q(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] :
|
|
950
|
+
Fn[a] = !0 === e?.lazyArg ? i ? i[a] : Se.deferred(l, a, this, e, n, r, o, s) : n[e.evalIndex];
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
_createLambdaValue(t, e, n, r, o) {
|
|
@@ -972,14 +972,14 @@ var Sn = class e {
|
|
|
972
972
|
if (o > e.length || o < s) return m.BuiltIn.Value;
|
|
973
973
|
const l = new Map(t.frame ?? void 0);
|
|
974
974
|
for (let t = 0; t < e.length; t++) {
|
|
975
|
-
const s = e[t], i = t >= o || r[t + 1]?.type ===
|
|
975
|
+
const s = e[t], i = t >= o || r[t + 1]?.type === ut.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 ===
|
|
982
|
+
for (let t = 1; t < r.length; t++) e.push(r[t]?.type === ut.Empty ? void 0 : n[r[t].evalIndex]);
|
|
983
983
|
return this._dispatchFunction(t.fn, e, e.length);
|
|
984
984
|
}
|
|
985
985
|
return t && (t.isIRange || void 0 !== t.colStart) ? m.BuiltIn.Ref : m.BuiltIn.Value;
|
|
@@ -995,7 +995,7 @@ var Sn = class e {
|
|
|
995
995
|
o.set(n[t].slot, void 0 === r ? xn : r);
|
|
996
996
|
}
|
|
997
997
|
const s = this._evaluateBody(t, o);
|
|
998
|
-
return
|
|
998
|
+
return Pt(s, this._context);
|
|
999
999
|
}
|
|
1000
1000
|
_evaluateBody(t, e) {
|
|
1001
1001
|
const n = this._calcScope;
|
|
@@ -1019,7 +1019,7 @@ var Sn = class e {
|
|
|
1019
1019
|
return this._runList(s, e, r, o, n), e[t.evalIndex];
|
|
1020
1020
|
} catch (t) {
|
|
1021
1021
|
if (m.isError(t)) return t;
|
|
1022
|
-
if (
|
|
1022
|
+
if (U(t)) throw t;
|
|
1023
1023
|
return t instanceof RangeError ? m.BuiltIn.Num : new m.Value(t?.message, { cause: t });
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
@@ -1032,7 +1032,7 @@ var Sn = class e {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
_listWithin(t) {
|
|
1034
1034
|
let e;
|
|
1035
|
-
|
|
1035
|
+
Ee(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
|
-
|
|
1044
|
+
Ee(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 (
|
|
1084
|
+
if (U(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 (
|
|
1114
|
+
if (U(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 (
|
|
1126
|
+
if (Ct(t)) return m.BuiltIn.Calc;
|
|
1127
1127
|
if (p(t)) return m.BuiltIn.Calc;
|
|
1128
1128
|
if (t && void 0 !== t.colStart) try {
|
|
1129
1129
|
if (t.scope) {
|
|
@@ -1132,13 +1132,13 @@ var Sn = class e {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
t = e.getValueAt(t.rowStart, t.colStart, t.scope);
|
|
1134
1134
|
} catch (t) {
|
|
1135
|
-
if (
|
|
1135
|
+
if (U(t)) throw t;
|
|
1136
1136
|
return m.isError(t) ? t : new m.Value(t?.message, { cause: t });
|
|
1137
1137
|
}
|
|
1138
1138
|
if (Array.isArray(t) && t.isSheetSpan) return m.BuiltIn.Ref;
|
|
1139
1139
|
if (Array.isArray(t)) {
|
|
1140
|
-
if (
|
|
1141
|
-
const e =
|
|
1140
|
+
if (q(t)) {
|
|
1141
|
+
const e = st(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 =
|
|
1153
|
+
return t?.isIRange ? t.size <= 1 ? (t = 0 === t.size ? null : t.getValueAt(0, 0, Mn), null === (t = Pt(t, e)) && (t = 0)) : (n = t, Cn.has(n) || (t = t.fillEmpty(0))) : null === (t = Pt(t, e)) && (t = 0), t;
|
|
1154
1154
|
}
|
|
1155
1155
|
finalizeValueForCell(t) {
|
|
1156
1156
|
const e = this.finalizeValue(t);
|
|
@@ -1160,12 +1160,12 @@ 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) :
|
|
1163
|
+
return e?.node ? this.getTextAt(e.node.rowIndex, e.node.colIndex) : Et(t.getTokens(), null);
|
|
1164
1164
|
}
|
|
1165
1165
|
get [Symbol.toStringTag]() {
|
|
1166
1166
|
return "[FormulaBlock]";
|
|
1167
1167
|
}
|
|
1168
|
-
},
|
|
1168
|
+
}, An = (t, e) => null !== e && "object" == typeof e && void 0 !== e.colStart && e.rowStart === e.rowEnd && e.colStart === e.colEnd ? t.getValueAt(e.rowStart, e.colStart, e.scope) : e, Rn = (t) => null !== t && "object" == typeof t && !0 === t.isIRange ? t.getValueAt(0, 0) ?? null : t;
|
|
1169
1169
|
function kn(t, e, n, r) {
|
|
1170
1170
|
let o = t.colStart, s = t.rowStart, l = t.colEnd, i = t.rowEnd;
|
|
1171
1171
|
const a = t.$colStart ?? !1, c = t.$rowStart ?? !1, d = t.$colEnd ?? !1, h = t.$rowEnd ?? !1;
|
|
@@ -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 ===
|
|
1206
|
+
for (let n = 0; n < e; n++) t[n]?.type === ut.Empty && (Fn[n] = xn);
|
|
1207
1207
|
}, Tn = (t) => {
|
|
1208
1208
|
const e = { ...t };
|
|
1209
1209
|
return delete e.inLazy, delete e.lazyArg, delete e.hasLazyArgs, delete e.deferred, t.inputs && (e.inputs = t.inputs.map((t) => t ? Tn(t) : t)), e;
|
|
1210
|
-
}, Gn = (t) => m.isError(t) ? t : t instanceof RangeError ? m.BuiltIn.Num : new m.Value(t?.message, { cause: t }), Bn =
|
|
1210
|
+
}, Gn = (t) => m.isError(t) ? t : t instanceof RangeError ? m.BuiltIn.Num : new m.Value(t?.message, { cause: t }), Bn = Ce(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 =
|
|
1214
|
+
const t = Ce(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,
|
|
1229
|
+
}, $n = 32, Hn = 64, jn = 128, Kn = 768, qn = 3072, Un = 12288, Wn = 16384, Xn = 32768, Jn = 65536, Qn = 1 << 17, Yn = 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 =
|
|
1378
|
+
const s = fe.peek();
|
|
1379
1379
|
if (!s) throw new Error("The sdk WebAssembly is not loaded.");
|
|
1380
1380
|
const l = (e ?? n)?.getRowCount() ?? 0;
|
|
1381
1381
|
if ((e?.getColumnCount() ?? 0) > 32 || (n?.getColumnCount() ?? 0) > 32) throw m.BuiltIn.Value;
|
|
@@ -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
|
|
1409
|
+
new gn().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
|
|
1413
|
+
this._cellsByColumn = /* @__PURE__ */ new Map(), this._errors = new fn(), 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 =
|
|
1440
|
+
const o = pn[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 } =
|
|
1461
|
+
}, { ok: l, numeric: i } = un(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 =
|
|
1471
|
+
const r = n.compute(0, !1), o = r.values(0), s = _n(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
|
}
|
|
@@ -1492,7 +1492,7 @@ var Nn = (t, e, n, r, o, s, l) => {
|
|
|
1492
1492
|
rowStart: 0,
|
|
1493
1493
|
colEnd: 0,
|
|
1494
1494
|
rowEnd: 0
|
|
1495
|
-
}, vr = [], xr = [], Cr = [], br = [],
|
|
1495
|
+
}, vr = [], xr = [], Cr = [], br = [], Ar = [], Rr = [], kr = (t, e) => !0 === e || t === Number.MIN_SAFE_INTEGER, Nr = (t, e) => !0 === e || t === Number.MAX_SAFE_INTEGER, Mr = (t, e, n, r, o, s, l) => {
|
|
1496
1496
|
if (n === o) {
|
|
1497
1497
|
if (e > r) {
|
|
1498
1498
|
const t = e;
|
|
@@ -1544,11 +1544,11 @@ function Vr(t, e, n) {
|
|
|
1544
1544
|
if (!Fr(s, E.colStart, E.colEnd, e.colStart, e.colEnd)) continue;
|
|
1545
1545
|
const v = wr, x = Er, C = yr;
|
|
1546
1546
|
if (Dr(o, I, y), C.rowStart = Math.max(wr, E.rowStart), C.rowEnd = Math.min(Er, E.rowEnd), Dr(s, v, x), C.colStart = Math.max(wr, E.colStart), C.colEnd = Math.min(Er, E.colEnd), C.colStart > C.colEnd || C.rowStart > C.rowEnd) continue;
|
|
1547
|
-
const b = (S.getAxis?.() ?? w.Axis.Row) === w.Axis.Column,
|
|
1548
|
-
let
|
|
1549
|
-
for (; !
|
|
1550
|
-
const [t, n, r] =
|
|
1551
|
-
|
|
1547
|
+
const b = (S.getAxis?.() ?? w.Axis.Row) === w.Axis.Column, A = S.getRuns({ bounds: C });
|
|
1548
|
+
let R = A.next();
|
|
1549
|
+
for (; !R.done;) {
|
|
1550
|
+
const [t, n, r] = R.value;
|
|
1551
|
+
R = A.next();
|
|
1552
1552
|
const o = n + r.length - 1;
|
|
1553
1553
|
b ? Tr(t, n, t, o, e) : Tr(n, t, o, t, e);
|
|
1554
1554
|
}
|
|
@@ -1572,7 +1572,7 @@ function Vr(t, e, n) {
|
|
|
1572
1572
|
o.length = s;
|
|
1573
1573
|
const l = [], i = [], a = br;
|
|
1574
1574
|
a.length = 0;
|
|
1575
|
-
let c = 0, d =
|
|
1575
|
+
let c = 0, d = Ar, h = Rr, u = !1, _ = 0, f = 0;
|
|
1576
1576
|
const g = s - 1;
|
|
1577
1577
|
for (let s = 0; s < g; s++) {
|
|
1578
1578
|
const g = o[s], p = o[s + 1] - 1;
|
|
@@ -1614,7 +1614,7 @@ function Vr(t, e, n) {
|
|
|
1614
1614
|
const w = h;
|
|
1615
1615
|
h = d, d = w, u = !0;
|
|
1616
1616
|
}
|
|
1617
|
-
return
|
|
1617
|
+
return Ar = d, Rr = h, {
|
|
1618
1618
|
touched: l,
|
|
1619
1619
|
blank: i
|
|
1620
1620
|
};
|
|
@@ -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
|
-
|
|
1677
|
+
Ze(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
|
-
},
|
|
1696
|
+
}, Ur = {
|
|
1697
1697
|
bounds: qr,
|
|
1698
1698
|
reuseResult: !0
|
|
1699
|
-
},
|
|
1699
|
+
}, Wr = (t, e) => t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex, Xr = (t, e, n) => null === t || 0 === e && 0 === n ? t : {
|
|
1700
1700
|
colStart: t.colStart + n,
|
|
1701
1701
|
rowStart: t.rowStart + e,
|
|
1702
1702
|
colEnd: t.colEnd + n,
|
|
@@ -1707,15 +1707,15 @@ var Kr = {
|
|
|
1707
1707
|
colEnd: 0,
|
|
1708
1708
|
rowEnd: 0,
|
|
1709
1709
|
scope: null
|
|
1710
|
-
},
|
|
1710
|
+
}, Qr = null, Yr = 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 =
|
|
1718
|
-
let n = t ??
|
|
1717
|
+
const e = Qr;
|
|
1718
|
+
let n = t ?? Yr;
|
|
1719
1719
|
if (null === n) return null;
|
|
1720
1720
|
let r = e.getGrid(n);
|
|
1721
1721
|
if (null === r) return null;
|
|
@@ -1727,7 +1727,7 @@ var Kr = {
|
|
|
1727
1727
|
const s = e.getFormulas();
|
|
1728
1728
|
return {
|
|
1729
1729
|
values: r.getValues(),
|
|
1730
|
-
searchFormulas: (t) => (
|
|
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
|
|
1787
|
+
const t = new N({ axis: w.Axis.Column }), e = this._anchor;
|
|
1788
1788
|
return null !== e && t.setValueAt(e.rowIndex, e.colIndex, e), this._nodes = t, t;
|
|
1789
1789
|
}
|
|
1790
1790
|
_mintDense() {
|
|
@@ -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(
|
|
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
|
|
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 L.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 =
|
|
1892
|
+
const d = xt(Kr, Jr, a);
|
|
1893
1893
|
o[n] = d ?? m.BuiltIn.Null;
|
|
1894
1894
|
}
|
|
1895
1895
|
return this._scratchRow = t, this._scratchCol = e, o;
|
|
@@ -1906,11 +1906,11 @@ var Kr = {
|
|
|
1906
1906
|
getTouched(t, e) {
|
|
1907
1907
|
let n = this._touched;
|
|
1908
1908
|
if (null !== n && this._touchedCycleId === t && this._touchedMarkId === e) return n;
|
|
1909
|
-
|
|
1909
|
+
Qr = this._container, Yr = this.gridId;
|
|
1910
1910
|
try {
|
|
1911
1911
|
n = Vr(this._template, this.ref, to);
|
|
1912
1912
|
} finally {
|
|
1913
|
-
|
|
1913
|
+
Qr = null, Yr = 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 =
|
|
1984
|
-
for (let t = 0; t < r; t++) s[t] =
|
|
1983
|
+
const t = this.ref, e = t.rowStart, n = t.colStart, r = t.rowEnd - e + 1, o = t.colEnd - n + 1, s = st(r);
|
|
1984
|
+
for (let t = 0; t < r; t++) s[t] = st(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 =
|
|
2000
|
+
const d = st(n.rowEnd - s + 1), h = n.colEnd - o + 1, u = d.length;
|
|
2001
2001
|
for (let n = 0; n < u; n++) {
|
|
2002
|
-
const l =
|
|
2002
|
+
const l = st(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, _);
|
|
@@ -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 =
|
|
2090
|
+
c = st(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 =
|
|
2105
|
+
const d = this.gridId, h = st(i);
|
|
2106
2106
|
for (let e = 0; e < i; e++) {
|
|
2107
|
-
const n =
|
|
2107
|
+
const n = st(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
|
|
2124
|
+
const c = i.rowStart + l.originRow, d = i.colStart + l.originCol, h = n - c, u = r - d, _ = new L.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(
|
|
2143
|
-
const a = new
|
|
2142
|
+
i.sort(Wr);
|
|
2143
|
+
const a = new L.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 [
|
|
2153
|
+
return [ce(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
|
|
2548
|
+
} : o, l = new N({
|
|
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
|
|
2553
|
+
return new Re(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
|
|
2587
|
-
this._runtime = new
|
|
2586
|
+
const e = await Qt.assertUsable("calcs", 0), n = this._container, r = n.getRuntime();
|
|
2587
|
+
this._runtime = new ne("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 =
|
|
2594
|
-
const { initializeFunctions: o } = await import("./
|
|
2593
|
+
}, e), this._calcScope = n.getScope(), this._coerceToNumber = pe(this._runtime, E.Number, Ge);
|
|
2594
|
+
const { initializeFunctions: o } = await import("./Rpi4k7hMH8wPAIcB.js"), s = this, l = Object.freeze(o(() => s, this._functionProviders)), a = new ge({
|
|
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(
|
|
2603
|
+
const n = this._container, r = n.getSymbols().bind(ue.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 =
|
|
2645
|
+
const e = Fe(t);
|
|
2646
2646
|
if (void 0 !== e) {
|
|
2647
2647
|
const t = this._functions.getByName(e);
|
|
2648
2648
|
if (t && !t.isLambda()) return t;
|
|
@@ -2665,7 +2665,7 @@ var Kr = {
|
|
|
2665
2665
|
getFormulaAt(t, e, n) {
|
|
2666
2666
|
const r = this._container;
|
|
2667
2667
|
let o;
|
|
2668
|
-
if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(
|
|
2668
|
+
if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(ue.Sheet, n) : this._calcScope.gridId, !o) return null;
|
|
2669
2669
|
const s = r.getFormulas();
|
|
2670
2670
|
if (!s) return null;
|
|
2671
2671
|
ho.colStart = e, ho.rowStart = t, ho.colEnd = e, ho.rowEnd = t, ho.scope = o;
|
|
@@ -2681,15 +2681,15 @@ var Kr = {
|
|
|
2681
2681
|
defer(t, e) {
|
|
2682
2682
|
if ("function" != typeof t) throw new m.Value("defer needs an executor function");
|
|
2683
2683
|
const n = this._container.getDeferred?.();
|
|
2684
|
-
if (n) return
|
|
2685
|
-
|
|
2684
|
+
if (n) return R(n.defer(t, e, ft(), be())), n.previous;
|
|
2685
|
+
R(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
|
|
2692
|
+
if (!(t?.isIReferenceRange && t instanceof pt)) 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(
|
|
2703
|
+
return t.scope ? this._container.getSymbols().bind(ue.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(
|
|
2747
|
+
const t = this._container.getSymbols().resolve(ue.Sheet, this._calcScope.gridId);
|
|
2748
2748
|
e = t ? t.getName ? t.getName() ?? void 0 : t.toString() : void 0;
|
|
2749
2749
|
}
|
|
2750
2750
|
}
|
|
@@ -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(
|
|
2797
|
+
const t = null === r ? null : this._container.getSymbols().resolve(ue.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
|
|
2804
|
+
return kt.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 =
|
|
2808
|
+
const o = le(t.bounds, !0), s = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), l = new N({
|
|
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
|
|
2814
|
+
return new Re(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(
|
|
2820
|
+
if (i = s.getSymbols().bind(ue.Sheet, n), Q(i)) return m.BuiltIn.Ref;
|
|
2821
2821
|
} else i = l.gridId;
|
|
2822
2822
|
if (!i) return m.BuiltIn.Ref;
|
|
2823
|
-
const c = l.node, d = c ?
|
|
2823
|
+
const c = l.node, d = c ? en(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 =
|
|
2839
|
+
return void 0 === a && (this._onRead?.(i, t, e, t, e), a = s.getGridValues(i)?.getValueAt(t, e) ?? null, s.getDeferred?.()?.hasHolders() && (a = At(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(
|
|
2844
|
+
s = n ? r.getSymbols().bind(ue.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
|
|
2874
|
+
} : r, s = new N({
|
|
2875
2875
|
axis: this._axis,
|
|
2876
2876
|
maxCoords: o
|
|
2877
2877
|
});
|
|
2878
|
-
let l = new
|
|
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
|
|
2878
|
+
let l = new Re(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 Re(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
|
|
2908
|
+
return new Re(this._runtime, new Sn(t, {
|
|
2909
2909
|
axis: this._axis,
|
|
2910
2910
|
maxCoords: r
|
|
2911
2911
|
}), {
|
|
@@ -2920,13 +2920,13 @@ var Kr = {
|
|
|
2920
2920
|
if (t[0]?.isIRange) throw m.BuiltIn.Value;
|
|
2921
2921
|
r = [t];
|
|
2922
2922
|
}
|
|
2923
|
-
const l = this._axis, i = l === w.Axis.Column, a = this._fromTuples(
|
|
2923
|
+
const l = this._axis, i = l === w.Axis.Column, a = this._fromTuples(O(r, i, De(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
|
|
2925
|
+
const c = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), d = new N({
|
|
2926
2926
|
axis: l,
|
|
2927
2927
|
maxCoords: c
|
|
2928
2928
|
}), h = e ? { type: e } : void 0;
|
|
2929
|
-
return new
|
|
2929
|
+
return new Re(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 =
|
|
2961
|
+
let n = Ot(t, r, y, () => {
|
|
2962
2962
|
throw m.BuiltIn.Ref;
|
|
2963
2963
|
}, e);
|
|
2964
2964
|
if (n.length > 1) throw m.BuiltIn.Ref;
|
|
@@ -2994,7 +2994,7 @@ var Kr = {
|
|
|
2994
2994
|
if (!t) throw m.BuiltIn.Ref;
|
|
2995
2995
|
let a = t.scope;
|
|
2996
2996
|
if (a) {
|
|
2997
|
-
if (a = r.getSymbols().bind(
|
|
2997
|
+
if (a = r.getSymbols().bind(ue.Sheet, t.scope), !a) return m.BuiltIn.Ref;
|
|
2998
2998
|
const e = r.getSheetSpanIds?.(a) ?? null;
|
|
2999
2999
|
if (e) {
|
|
3000
3000
|
if (r.isGridless?.(e[0]) || r.isGridless?.(e[e.length - 1])) return m.BuiltIn.Name;
|
|
@@ -3011,7 +3011,7 @@ var Kr = {
|
|
|
3011
3011
|
scope: a
|
|
3012
3012
|
};
|
|
3013
3013
|
if (r.isGridless?.(a)) {
|
|
3014
|
-
const t = new
|
|
3014
|
+
const t = new N({ 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(
|
|
3028
|
+
if (h && (u = co(en(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
|
|
3035
|
+
const r = new N({
|
|
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 || !
|
|
3057
|
+
if (void 0 === e.colStart || !Q(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
|
|
3079
|
+
const n = new pt(this._runtime, t, e, void 0, r, this._container.resolveScope);
|
|
3080
3080
|
return n._setCoordsReadHook(this._positionRead), null !== l && n._setErrorIndex(null === i ? l : { hasErrorIn: (t) => (i(o, t.rowStart, t.colStart, t.rowEnd, t.colEnd), l.hasErrorIn(t)) }), n;
|
|
3081
3081
|
} catch (t) {
|
|
3082
3082
|
if (t instanceof n) throw m.BuiltIn.Ref;
|
|
@@ -3086,7 +3086,7 @@ var Kr = {
|
|
|
3086
3086
|
getAddress(t, e = !1) {
|
|
3087
3087
|
t || (this._calcScope.positionRead = !0, _o.rowIndex = this._calcScope.rowIndex, _o.colIndex = this._calcScope.colIndex, _o.scope = null, t = _o);
|
|
3088
3088
|
const n = this.getEntireCoords().scope;
|
|
3089
|
-
return void 0 !== t.colIndex ?
|
|
3089
|
+
return void 0 !== t.colIndex ? we(t, n, e) : ye(t, n, e);
|
|
3090
3090
|
}
|
|
3091
3091
|
parseAsSerialDate(t, e) {
|
|
3092
3092
|
if (void 0 === t) return;
|
|
@@ -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
|
|
3146
|
+
if (!(t instanceof pt)) 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
|
|
3153
|
+
if (!s || !n.block.blocked) return mn(n);
|
|
3154
3154
|
const l = e.rowStart <= s.row && e.rowEnd >= s.row && e.colStart <= s.column && e.colEnd >= s.column;
|
|
3155
|
-
return
|
|
3155
|
+
return mn(n, l ? "blocked" : "wanted");
|
|
3156
3156
|
}
|
|
3157
3157
|
return null;
|
|
3158
3158
|
}
|
|
3159
3159
|
parseAsLiteral(t) {
|
|
3160
|
-
return
|
|
3160
|
+
return H(t) ?? tt(t);
|
|
3161
3161
|
}
|
|
3162
3162
|
toText(t) {
|
|
3163
|
-
return
|
|
3163
|
+
return Z(t, this._runtime);
|
|
3164
3164
|
}
|
|
3165
3165
|
getRuntime() {
|
|
3166
3166
|
return this._runtime;
|
|
3167
3167
|
}
|
|
3168
3168
|
createRichData(t, e) {
|
|
3169
|
-
return
|
|
3169
|
+
return P.fromJSON({
|
|
3170
3170
|
type: t,
|
|
3171
3171
|
data: e
|
|
3172
3172
|
}, this._container.getRichDataContext?.());
|
|
@@ -3294,7 +3294,7 @@ function So(t, e, n) {
|
|
|
3294
3294
|
colEnd: a[1]
|
|
3295
3295
|
};
|
|
3296
3296
|
}
|
|
3297
|
-
var wo = class extends
|
|
3297
|
+
var wo = class extends ct {
|
|
3298
3298
|
constructor(t) {
|
|
3299
3299
|
const e = (t = { ...t }).container;
|
|
3300
3300
|
super({
|
|
@@ -3302,15 +3302,15 @@ var wo = class extends Lt {
|
|
|
3302
3302
|
send: (t, n, r) => e.sendRequest(t, n, r),
|
|
3303
3303
|
calculation: t.calculation
|
|
3304
3304
|
}), this._touchedOthers = null, this._iterationId = 0, this._resized = null, this._hiddenRows = null, this._hiddenColumns = null, this._filtered = !1, this._pivots = null, this._demanded = [], this._isProcessingJSON = !1, this._snapshots = null, this._options = t, this._context = t.context, this._container = t.container;
|
|
3305
|
-
const n = { ...
|
|
3305
|
+
const n = { ...A }, o = t.getEntireCoords ?? (() => n);
|
|
3306
3306
|
if (this._getEntireCoords = o, this._unanchored = !0 === t.unanchored, this._shadowOf = t.shadowOf ?? null, this._arrayFirstCell = !0 === t.arrayFirstCell, this._paged = !0 === t.paged, !this._context || !this._container) throw new Error("Invalid Options");
|
|
3307
3307
|
const s = t?.onCalculated;
|
|
3308
3308
|
this._onCalculated = s ? (t) => {
|
|
3309
|
-
s(
|
|
3310
|
-
} : () => {}, this._values = new
|
|
3309
|
+
s(_e(Lt.results(t, "onCalculated"), this._container.getImager(this._gridId)));
|
|
3310
|
+
} : () => {}, this._values = new N({
|
|
3311
3311
|
axis: w.Axis.Column,
|
|
3312
|
-
createRun:
|
|
3313
|
-
}), this._iterationId = 0, this._contentfulSpatial = new
|
|
3312
|
+
createRun: Qe
|
|
3313
|
+
}), this._iterationId = 0, this._contentfulSpatial = new et({ updateEntryOptions: {
|
|
3314
3314
|
isSplitOnExpand: !0,
|
|
3315
3315
|
isMergeOnShift: !0
|
|
3316
3316
|
} });
|
|
@@ -3318,7 +3318,7 @@ var wo = class extends Lt {
|
|
|
3318
3318
|
isSplitOnExpand: !0,
|
|
3319
3319
|
isMergeOnShift: !1
|
|
3320
3320
|
} };
|
|
3321
|
-
this._spillSpatial = new
|
|
3321
|
+
this._spillSpatial = new et(l), this._errorSpatial = new et(l), this._calcStatusSpatial = new et(l), this._circularSpatial = new et(l), this._notifyValues = new et(), this._notifyBlank = null, this._notifySpillsInsert = [], this._notifySpillsRemove = [], this._notifyFormats = new et(), this._notifyCalcStatus = new et(), this._notifyCircular = new et(), this._touchedFormulas = [], this._container.registerGrid(this), this._publishMaps();
|
|
3322
3322
|
}
|
|
3323
3323
|
_land(t, e) {
|
|
3324
3324
|
return this._container.landRequest(t, () => (void 0 !== t && this._versionMaps(t), e()));
|
|
@@ -3444,7 +3444,7 @@ var wo = class extends Lt {
|
|
|
3444
3444
|
cycleId: this._container.getCycleId(),
|
|
3445
3445
|
commitId: t.commitId
|
|
3446
3446
|
};
|
|
3447
|
-
const r =
|
|
3447
|
+
const r = k(t.destination, t.coords, t.fitDestination, t.transpose);
|
|
3448
3448
|
return r.scope = this._gridId, this._land(e, () => {
|
|
3449
3449
|
t.isCut ? this._moveTo(n, t.coords, r) : this._copyTo(n, t.coords, r);
|
|
3450
3450
|
const e = this._mutationResults(t.commitId);
|
|
@@ -3570,8 +3570,8 @@ var wo = class extends Lt {
|
|
|
3570
3570
|
const e = this, n = this.getId(), r = { ...t };
|
|
3571
3571
|
r.range = { ...r.range }, r.range.scope = n, delete r.onShift;
|
|
3572
3572
|
const o = e._values, s = r.range, l = r.direction, i = l === w.Direction.Left || l === w.Direction.Right, a = l === w.Direction.Down || l === w.Direction.Right, c = a ? 1 : -1, d = e._spillSpatial, h = e._contentfulSpatial;
|
|
3573
|
-
|
|
3574
|
-
const u = [], _ = this._container.getPrecedents().search(s), f =
|
|
3573
|
+
lt(d, s, i, a);
|
|
3574
|
+
const u = [], _ = this._container.getPrecedents().search(s), f = Kt(s, d, o, h, void 0, !1, !1, void 0, (t, e, r, o) => {
|
|
3575
3575
|
u.push({
|
|
3576
3576
|
colStart: t,
|
|
3577
3577
|
rowStart: e,
|
|
@@ -3589,7 +3589,7 @@ var wo = class extends Lt {
|
|
|
3589
3589
|
colEnd: i && 1 === c ? S.colEnd : s.colEnd,
|
|
3590
3590
|
rowEnd: i || 1 !== c ? s.rowEnd : S.rowEnd,
|
|
3591
3591
|
scope: n
|
|
3592
|
-
}, I = a ?
|
|
3592
|
+
}, I = a ? St(m, E) : G(m, s);
|
|
3593
3593
|
I && (Po(p, m, I.formulas.inserts, I.formulas.removes), e._touchFormulas(I.formulas.removes), e._touchFormulas(I.formulas.inserts));
|
|
3594
3594
|
const y = i ? s.colEnd - s.colStart + 1 : s.rowEnd - s.rowStart + 1, v = y * c, x = {
|
|
3595
3595
|
colStart: s.colStart,
|
|
@@ -3598,26 +3598,26 @@ var wo = class extends Lt {
|
|
|
3598
3598
|
rowEnd: i ? s.rowEnd : S.rowEnd,
|
|
3599
3599
|
scope: n
|
|
3600
3600
|
};
|
|
3601
|
-
let
|
|
3602
|
-
const
|
|
3601
|
+
let C;
|
|
3602
|
+
const b = Vt(() => m, () => {
|
|
3603
3603
|
const t = g.getDynamics();
|
|
3604
|
-
return
|
|
3604
|
+
return C = new Map(t), C;
|
|
3605
3605
|
}, x, {
|
|
3606
3606
|
colIndex: i ? v : 0,
|
|
3607
3607
|
rowIndex: i ? 0 : v,
|
|
3608
3608
|
scope: n
|
|
3609
3609
|
}, a ? void 0 : s);
|
|
3610
|
-
let A,
|
|
3611
|
-
|
|
3612
|
-
A = t,
|
|
3613
|
-
}, p.shift(r), (A ||
|
|
3614
|
-
const
|
|
3610
|
+
let A, R;
|
|
3611
|
+
b && (Po(p, m, b.formulas.inserts, b.formulas.removes), e._touchFormulas(b.formulas.removes), e._touchFormulas(b.formulas.inserts)), r.onUpdates = (t, e) => {
|
|
3612
|
+
A = t, R = e;
|
|
3613
|
+
}, p.shift(r), (A || R) && (Lo(m, A, R), e._touchFormulas(R), e._touchFormulas(A)), g.setFormulas(p), g.setPrecedents(m), C && g.setDynamics(C), g.bumpCalcEpochs(!0), f?.(a, i ? 0 : v, i ? v : 0);
|
|
3614
|
+
const k = i ? s.colStart : s.rowStart, N = i ? s.colEnd : s.rowEnd, M = (t, e = t.ref) => {
|
|
3615
3615
|
const r = t.gridId;
|
|
3616
3616
|
r && g.getGrid(r) && (t.unanchored ? g.invalidateNamed(r) : ((t, e) => {
|
|
3617
3617
|
let r = i ? t.colStart : t.rowStart, o = i ? t.colEnd : t.rowEnd;
|
|
3618
|
-
if (e === n && o >=
|
|
3619
|
-
if (a) r >=
|
|
3620
|
-
else if (r = r >
|
|
3618
|
+
if (e === n && o >= k) {
|
|
3619
|
+
if (a) r >= k && (r += y), o += y;
|
|
3620
|
+
else if (r = r > N ? r - y : Math.min(r, k), o = o > N ? o - y : k - 1, o < r) return;
|
|
3621
3621
|
}
|
|
3622
3622
|
u.push(i ? {
|
|
3623
3623
|
colStart: r,
|
|
@@ -3636,14 +3636,14 @@ var wo = class extends Lt {
|
|
|
3636
3636
|
};
|
|
3637
3637
|
for (let t = 0; t < _.length; t++) {
|
|
3638
3638
|
const e = _[t].value, n = e.formulaEntry.value, r = e.index < 0 || n.unanchored ? n.ref : So(n, e.index, s);
|
|
3639
|
-
null !== r &&
|
|
3639
|
+
null !== r && M(n, r);
|
|
3640
3640
|
}
|
|
3641
|
-
const
|
|
3642
|
-
for (let t = 0; t < (
|
|
3643
|
-
const
|
|
3644
|
-
for (let t = 0; t < (
|
|
3645
|
-
const e =
|
|
3646
|
-
e.scope !== n &&
|
|
3641
|
+
const F = b?.dynamicDependents;
|
|
3642
|
+
for (let t = 0; t < (F?.length ?? 0); t++) M(F[t].value);
|
|
3643
|
+
const D = b?.formulas.inserts;
|
|
3644
|
+
for (let t = 0; t < (D?.length ?? 0); t++) {
|
|
3645
|
+
const e = D[t];
|
|
3646
|
+
e.scope !== n && M(e.value);
|
|
3647
3647
|
}
|
|
3648
3648
|
for (let t = 0; t < (A?.length ?? 0); t++) {
|
|
3649
3649
|
const e = A[t];
|
|
@@ -3691,9 +3691,9 @@ var wo = class extends Lt {
|
|
|
3691
3691
|
let h = c;
|
|
3692
3692
|
for (let r = 0; r < d.length; r++) {
|
|
3693
3693
|
const o = d[r];
|
|
3694
|
-
if (!
|
|
3694
|
+
if (!ke(o)) continue;
|
|
3695
3695
|
let s = l.get(o);
|
|
3696
|
-
void 0 === s && (s =
|
|
3696
|
+
void 0 === s && (s = M(o, t, e, n) ?? null, l.set(o, s)), null !== s && (h = h.replaceScopeIds(o, s));
|
|
3697
3697
|
}
|
|
3698
3698
|
h !== c && (i.push(o), a.push({
|
|
3699
3699
|
...o,
|
|
@@ -3809,7 +3809,7 @@ var wo = class extends Lt {
|
|
|
3809
3809
|
l || (l = /* @__PURE__ */ new Map(), Eo.set(r, l));
|
|
3810
3810
|
let i = l.get(e);
|
|
3811
3811
|
if (!i) {
|
|
3812
|
-
const t =
|
|
3812
|
+
const t = rt(r);
|
|
3813
3813
|
i = 0 === e ? t : (n, r) => t(n + e, r) - e, l.set(e, i);
|
|
3814
3814
|
}
|
|
3815
3815
|
return i;
|
|
@@ -3840,7 +3840,7 @@ var wo = class extends Lt {
|
|
|
3840
3840
|
columns: e.anchor.column - n.colStart
|
|
3841
3841
|
}, i = {
|
|
3842
3842
|
...n,
|
|
3843
|
-
value: new
|
|
3843
|
+
value: new x(n, l, "pivot", s)
|
|
3844
3844
|
};
|
|
3845
3845
|
o.insert(i), this._notifySpillsInsert.push(i);
|
|
3846
3846
|
}
|
|
@@ -3965,7 +3965,7 @@ var wo = class extends Lt {
|
|
|
3965
3965
|
}
|
|
3966
3966
|
this._pushWithSpills(h, w);
|
|
3967
3967
|
}
|
|
3968
|
-
return h =
|
|
3968
|
+
return h = oe(h, 2, t.Row), h.sort(o.rowFirstRangeComparator), h;
|
|
3969
3969
|
}
|
|
3970
3970
|
_pushWithSpills(t, e) {
|
|
3971
3971
|
t.push(e);
|
|
@@ -4022,7 +4022,7 @@ var wo = class extends Lt {
|
|
|
4022
4022
|
for (let t = 0; t < a.length; t++) {
|
|
4023
4023
|
const e = a[t];
|
|
4024
4024
|
if (void 0 === e?.colStart) continue;
|
|
4025
|
-
const n = e.scope, o = _(n), s =
|
|
4025
|
+
const n = e.scope, o = _(n), s = vt(e, r.rowStart + I, r.colStart + y), l = vt(e, r.rowStart + v, r.colStart + x), i = {
|
|
4026
4026
|
colStart: Math.max(Math.min(s.colStart, l.colStart), o.colStart),
|
|
4027
4027
|
rowStart: Math.max(Math.min(s.rowStart, l.rowStart), o.rowStart),
|
|
4028
4028
|
colEnd: Math.min(Math.max(s.colEnd, l.colEnd), o.colEnd),
|
|
@@ -4033,7 +4033,7 @@ var wo = class extends Lt {
|
|
|
4033
4033
|
}
|
|
4034
4034
|
f.push(...C);
|
|
4035
4035
|
}
|
|
4036
|
-
return f =
|
|
4036
|
+
return f = oe(f, 2, t.Row), f.sort(o.rowFirstRangeComparator), f;
|
|
4037
4037
|
}
|
|
4038
4038
|
_directAcrossGrids(t, e) {
|
|
4039
4039
|
const n = this._gridId, o = t.scope, s = o && o !== n ? this._container.getGrid(o) ?? null : this;
|
|
@@ -4054,11 +4054,11 @@ var wo = class extends Lt {
|
|
|
4054
4054
|
return i;
|
|
4055
4055
|
}
|
|
4056
4056
|
getDependentsAt(t) {
|
|
4057
|
-
const e =
|
|
4057
|
+
const e = It(t, (t) => this._directAcrossGrids(t, !0));
|
|
4058
4058
|
return e.sort(o.rowFirstRangeComparator), e;
|
|
4059
4059
|
}
|
|
4060
4060
|
getPrecedentsAt(t) {
|
|
4061
|
-
const e =
|
|
4061
|
+
const e = It(t, (t) => this._directAcrossGrids(t, !1));
|
|
4062
4062
|
return e.sort(o.rowFirstRangeComparator), e;
|
|
4063
4063
|
}
|
|
4064
4064
|
_graphNeighborsNow(t, e, n) {
|
|
@@ -4169,16 +4169,16 @@ var wo = class extends Lt {
|
|
|
4169
4169
|
if ("scalar" === o) {
|
|
4170
4170
|
let o = t.evaluateAt(e, n, r);
|
|
4171
4171
|
if (o && void 0 !== o.colStart) o = t.finalizeValue(o);
|
|
4172
|
-
else if (
|
|
4173
|
-
const s =
|
|
4172
|
+
else if (q(o)) return t.finalizeValue(o);
|
|
4173
|
+
const s = Pt(o, this._context);
|
|
4174
4174
|
return null === s ? 0 : s;
|
|
4175
4175
|
}
|
|
4176
|
-
return
|
|
4176
|
+
return tn(t.finalizeValue(t.evaluateAt(e, n, r)));
|
|
4177
4177
|
}
|
|
4178
4178
|
_setReferenceNow(t, e, n, r) {
|
|
4179
4179
|
const o = this._formulaAt(t, e);
|
|
4180
4180
|
let s = r;
|
|
4181
|
-
r && void 0 !== r.colStart ? s =
|
|
4181
|
+
r && void 0 !== r.colStart ? s = D(s, t, e) : r && void 0 !== r.colIndex && (s = F(s, t, e));
|
|
4182
4182
|
const l = o.value.formula.setReferenceAt(n, s).getTextAt(t, e);
|
|
4183
4183
|
return this._land(void 0, () => {
|
|
4184
4184
|
l ? this._setInputsNow(null, [{
|
|
@@ -4199,7 +4199,7 @@ var wo = class extends Lt {
|
|
|
4199
4199
|
_setReferenceModeNow(t, e, n, r, o) {
|
|
4200
4200
|
const s = this.getReferencesAt(t, e)[n];
|
|
4201
4201
|
if (!s || "nameId" in s) throw new Error(`Reference at index ${n} is not a cell reference and cannot have its style changed.`);
|
|
4202
|
-
return this._setReferenceNow(t, e, n,
|
|
4202
|
+
return this._setReferenceNow(t, e, n, bt(s, r, o));
|
|
4203
4203
|
}
|
|
4204
4204
|
_isVolatileNow(t, e) {
|
|
4205
4205
|
const n = this._formulaAt(t, e);
|
|
@@ -4210,8 +4210,8 @@ var wo = class extends Lt {
|
|
|
4210
4210
|
return null !== o && 0 !== (o.state & Hn);
|
|
4211
4211
|
}
|
|
4212
4212
|
_formulaAt(t, e) {
|
|
4213
|
-
|
|
4214
|
-
const n = this._container.getFormulas().search(
|
|
4213
|
+
Ro.colStart = e, Ro.rowStart = t, Ro.colEnd = e, Ro.rowEnd = t, Ro.scope = this._gridId, Fo.length = 0;
|
|
4214
|
+
const n = this._container.getFormulas().search(Ro, !1, !1, Fo);
|
|
4215
4215
|
return 0 === n.length ? null : n[0];
|
|
4216
4216
|
}
|
|
4217
4217
|
_createCopySpillEntries(t, e, n, r, o) {
|
|
@@ -4234,7 +4234,7 @@ var wo = class extends Lt {
|
|
|
4234
4234
|
rowStart: u,
|
|
4235
4235
|
colEnd: o,
|
|
4236
4236
|
rowEnd: f,
|
|
4237
|
-
value: new
|
|
4237
|
+
value: new x(g, 0, e.value.getKind())
|
|
4238
4238
|
});
|
|
4239
4239
|
}
|
|
4240
4240
|
return {
|
|
@@ -4247,7 +4247,7 @@ var wo = class extends Lt {
|
|
|
4247
4247
|
if (0 === o) return;
|
|
4248
4248
|
const s = this._container, l = n ?? this._gridId, i = null != n ? l : e ?? l, a = s.getScope();
|
|
4249
4249
|
a.gridId = i;
|
|
4250
|
-
const c = e ? s.getSymbols().resolve(
|
|
4250
|
+
const c = e ? s.getSymbols().resolve(ue.Sheet, e)?.toString() : void 0, d = this._context;
|
|
4251
4251
|
for (let n = 0; n < o; n++) {
|
|
4252
4252
|
const o = t[n], h = o.value, u = h.ref, _ = h.formula.getTextAt(u.rowStart, u.colStart);
|
|
4253
4253
|
a.colIndex = u.colStart, a.rowIndex = u.rowStart;
|
|
@@ -4279,11 +4279,11 @@ var wo = class extends Lt {
|
|
|
4279
4279
|
if ("nameId" in o) continue;
|
|
4280
4280
|
if ("tableId" in o) continue;
|
|
4281
4281
|
const g = o, p = g.colStart, m = g.rowStart, w = g.colEnd, E = g.rowEnd;
|
|
4282
|
-
let I = g.$colStart ? p : p + s,
|
|
4283
|
-
if (p === Number.MIN_SAFE_INTEGER && (I = a,
|
|
4284
|
-
const o = a - I, g = c -
|
|
4282
|
+
let I = g.$colStart ? p : p + s, y = g.$rowStart ? m : m + l, v = g.$colEnd ? w : w + i, x = g.$rowEnd ? E : E + u;
|
|
4283
|
+
if (p === Number.MIN_SAFE_INTEGER && (I = a, v = d), m === Number.MIN_SAFE_INTEGER && (y = c, x = h), I < a || v > d || y < c || x > h) {
|
|
4284
|
+
const o = a - I, g = c - y, p = d - v, m = h - x;
|
|
4285
4285
|
Mo.colStart = Math.max(s, s + o), Mo.rowStart = Math.max(l, l + g), Mo.colEnd = Math.min(i, i + p), Mo.rowEnd = Math.min(u, u + m);
|
|
4286
|
-
const w =
|
|
4286
|
+
const w = wt(t, Mo, Xt);
|
|
4287
4287
|
if (w) {
|
|
4288
4288
|
const e = w.length;
|
|
4289
4289
|
t = w[e - 1], n = t.value, r = n.ref, s = r.colStart, l = r.rowStart, i = r.colEnd, u = r.rowEnd;
|
|
@@ -4307,7 +4307,7 @@ var wo = class extends Lt {
|
|
|
4307
4307
|
this._removeNow(n);
|
|
4308
4308
|
const a = this._container, c = a.getPrecedents().clone(), d = a.getFormulas().clone();
|
|
4309
4309
|
a.setPrecedents(c), a.setFormulas(d);
|
|
4310
|
-
const h =
|
|
4310
|
+
const h = re(c, e, n);
|
|
4311
4311
|
h && (Po(d, c, h.formulas.inserts, h.formulas.removes), this._touchFormulas(h.formulas.removes), this._touchFormulas(h.formulas.inserts));
|
|
4312
4312
|
const u = { cutFrom: e }, _ = i.createCopiedEntries(e, n, u).inserts, f = _.length, g = this._gridId;
|
|
4313
4313
|
if (g !== l) {
|
|
@@ -4355,7 +4355,7 @@ var wo = class extends Lt {
|
|
|
4355
4355
|
}
|
|
4356
4356
|
let p;
|
|
4357
4357
|
Po(d, c, _), this._touchFormulas(_);
|
|
4358
|
-
const S =
|
|
4358
|
+
const S = Ve(c, () => {
|
|
4359
4359
|
const t = a.getDynamics();
|
|
4360
4360
|
return p = new Map(t), p;
|
|
4361
4361
|
}, e, n);
|
|
@@ -4377,7 +4377,7 @@ var wo = class extends Lt {
|
|
|
4377
4377
|
t.values.copyTo(E, {
|
|
4378
4378
|
colIndex: n.colStart,
|
|
4379
4379
|
rowIndex: n.rowStart
|
|
4380
|
-
}, e),
|
|
4380
|
+
}, e), Ae(this._errorSpatial, E, n);
|
|
4381
4381
|
const I = t.spillSpatial;
|
|
4382
4382
|
let y = [], v = [];
|
|
4383
4383
|
for (let t = 0; t < f; t++) {
|
|
@@ -4390,7 +4390,7 @@ var wo = class extends Lt {
|
|
|
4390
4390
|
const t = (t, e) => {
|
|
4391
4391
|
t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
|
|
4392
4392
|
};
|
|
4393
|
-
|
|
4393
|
+
$(a.getCycleId(), v, r.EmptyArray, s._contentfulSpatial, s._spillSpatial, s._values, (t, e, n, r) => {
|
|
4394
4394
|
x.push({
|
|
4395
4395
|
colStart: t,
|
|
4396
4396
|
rowStart: e,
|
|
@@ -4436,7 +4436,7 @@ var wo = class extends Lt {
|
|
|
4436
4436
|
}
|
|
4437
4437
|
}
|
|
4438
4438
|
e && (t = i.concat(e)), t.sort(o.columnFirstRangeComparator);
|
|
4439
|
-
const n = new
|
|
4439
|
+
const n = new L.Builder((t, e) => new V.ArrayList(t.slice(0, e)));
|
|
4440
4440
|
let r;
|
|
4441
4441
|
const s = !0 === this._container.getDeferred?.()?.hasHolders(), a = this._values, c = a.getAxis() === w.Axis.Column, d = t.length;
|
|
4442
4442
|
for (let e = 0; e < d; e++) {
|
|
@@ -4533,9 +4533,9 @@ var wo = class extends Lt {
|
|
|
4533
4533
|
const i = e.search(o), a = i.length;
|
|
4534
4534
|
for (let e = 0; e < a; e++) {
|
|
4535
4535
|
let r = i[e];
|
|
4536
|
-
if (
|
|
4536
|
+
if (Y(o.rowStart, o.colStart, r) && (s || r.value.getCycleId() === t)) {
|
|
4537
4537
|
m || (m = [], n = /* @__PURE__ */ new Set());
|
|
4538
|
-
const t =
|
|
4538
|
+
const t = Ie(r.colStart) + _t(r.rowStart);
|
|
4539
4539
|
if (n.has(t)) continue;
|
|
4540
4540
|
n.add(t);
|
|
4541
4541
|
const e = r.value.getBlockedCoords() ?? o;
|
|
@@ -4570,7 +4570,7 @@ var wo = class extends Lt {
|
|
|
4570
4570
|
if (t && t.tuples) {
|
|
4571
4571
|
I = t.tuples;
|
|
4572
4572
|
let e = t.bounds;
|
|
4573
|
-
if (e ? (y =
|
|
4573
|
+
if (e ? (y = le(e, f), y.scope = l) : y = {
|
|
4574
4574
|
colStart: Number.MIN_SAFE_INTEGER,
|
|
4575
4575
|
rowStart: Number.MIN_SAFE_INTEGER,
|
|
4576
4576
|
colEnd: Number.MAX_SAFE_INTEGER,
|
|
@@ -4593,19 +4593,19 @@ var wo = class extends Lt {
|
|
|
4593
4593
|
t.minorStart = n[0];
|
|
4594
4594
|
const r = n[1];
|
|
4595
4595
|
t.minorEnd = t.minorStart + r.length - 1;
|
|
4596
|
-
const s =
|
|
4596
|
+
const s = le(t, f);
|
|
4597
4597
|
s.scope = l, x && c.search(s).length > 0 && x.push(s);
|
|
4598
4598
|
}
|
|
4599
4599
|
}
|
|
4600
4600
|
}
|
|
4601
|
-
v =
|
|
4601
|
+
v = ie(t.tuples, f, l);
|
|
4602
4602
|
}
|
|
4603
4603
|
const C = (t, e) => {
|
|
4604
4604
|
t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
|
|
4605
4605
|
};
|
|
4606
4606
|
if (n || I) {
|
|
4607
4607
|
let t;
|
|
4608
|
-
n && (t =
|
|
4608
|
+
n && (t = Kt(n, g, _, S, C, !1, !0, this._notifyValues, (t, e, n, r) => {
|
|
4609
4609
|
E.push({
|
|
4610
4610
|
colStart: t,
|
|
4611
4611
|
rowStart: e,
|
|
@@ -4613,7 +4613,7 @@ var wo = class extends Lt {
|
|
|
4613
4613
|
rowEnd: r,
|
|
4614
4614
|
scope: l
|
|
4615
4615
|
});
|
|
4616
|
-
})),
|
|
4616
|
+
})), $(-1, n ? [n] : r.EmptyArray, v, S, g, _, (t, e, n, r) => {
|
|
4617
4617
|
E.push({
|
|
4618
4618
|
colStart: t,
|
|
4619
4619
|
rowStart: e,
|
|
@@ -4621,15 +4621,15 @@ var wo = class extends Lt {
|
|
|
4621
4621
|
rowEnd: r,
|
|
4622
4622
|
scope: l
|
|
4623
4623
|
});
|
|
4624
|
-
}, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n),
|
|
4624
|
+
}, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n), Ht(p, n)), t?.(), I && (_.setValues(I), zt(p, I, f));
|
|
4625
4625
|
}
|
|
4626
4626
|
const b = i.getScope();
|
|
4627
|
-
let R, k, N, M
|
|
4628
|
-
const
|
|
4627
|
+
let A, R, k, N, M;
|
|
4628
|
+
const F = (t, e) => {
|
|
4629
4629
|
const n = t.rowStart, r = t.colStart;
|
|
4630
4630
|
b && (b.rowIndex = n, b.colIndex = r);
|
|
4631
4631
|
const o = i.createFormulaBlock(l, a, e, n, r), c = new no(t, l, o, i, this._unanchored), d = s?.arrayFixed;
|
|
4632
|
-
d && d.colStart === r && d.rowStart === n && (
|
|
4632
|
+
d && d.colStart === r && d.rowStart === n && (Ze(c.getAnchorNode()).fixedRef = {
|
|
4633
4633
|
colStart: d.colStart,
|
|
4634
4634
|
rowStart: d.rowStart,
|
|
4635
4635
|
colEnd: d.colEnd,
|
|
@@ -4640,55 +4640,55 @@ var wo = class extends Lt {
|
|
|
4640
4640
|
scope: l,
|
|
4641
4641
|
value: c
|
|
4642
4642
|
};
|
|
4643
|
-
|
|
4644
|
-
},
|
|
4643
|
+
A || (A = []), A.push(h);
|
|
4644
|
+
}, D = (t) => {
|
|
4645
4645
|
const e = {
|
|
4646
4646
|
...t,
|
|
4647
4647
|
scope: l,
|
|
4648
4648
|
value: null
|
|
4649
4649
|
};
|
|
4650
|
-
|
|
4650
|
+
k.insertNonOverlapping(e, {
|
|
4651
4651
|
noMerge: !0,
|
|
4652
4652
|
onUpdates(t, e, n) {
|
|
4653
|
-
|
|
4653
|
+
R || (R = []);
|
|
4654
4654
|
for (let t = 0; t < e.length; t++) {
|
|
4655
4655
|
const n = e[t];
|
|
4656
|
-
if (
|
|
4656
|
+
if (R.push(n), M) for (let t = M.length - 1; t >= 0; t--) M[t].value === n.value && M.splice(t, 1);
|
|
4657
4657
|
}
|
|
4658
4658
|
const r = t ? t.length : 0;
|
|
4659
4659
|
for (let e = 0; e < r; e++) {
|
|
4660
4660
|
const n = t[e];
|
|
4661
|
-
null !== n.value && (
|
|
4661
|
+
null !== n.value && (M || (M = []), M.push(n));
|
|
4662
4662
|
}
|
|
4663
4663
|
}
|
|
4664
4664
|
});
|
|
4665
|
-
},
|
|
4666
|
-
let
|
|
4665
|
+
}, T = x ? x.length : 0;
|
|
4666
|
+
let G;
|
|
4667
4667
|
if (u > 0) {
|
|
4668
|
-
|
|
4668
|
+
G = st(u);
|
|
4669
4669
|
for (let t = 0; t < u; t++) {
|
|
4670
4670
|
const n = e[t], r = n.value, s = o.sanitizeRange(n);
|
|
4671
|
-
|
|
4671
|
+
G[t] = s, null !== r && F(s, r);
|
|
4672
4672
|
}
|
|
4673
4673
|
}
|
|
4674
|
-
const
|
|
4675
|
-
(
|
|
4676
|
-
for (let t = 0; t <
|
|
4677
|
-
for (let t = 0; t < u; t++) G
|
|
4678
|
-
const
|
|
4679
|
-
if (
|
|
4674
|
+
const B = s?.cloneKey ?? null;
|
|
4675
|
+
(T > 0 || u > 0) && (k = i.getFormulas().clone(B));
|
|
4676
|
+
for (let t = 0; t < T; t++) D(x[t]);
|
|
4677
|
+
for (let t = 0; t < u; t++) D(G[t]);
|
|
4678
|
+
const V = R ? R.length : 0;
|
|
4679
|
+
if (V > 0) {
|
|
4680
4680
|
const t = i.getDynamics();
|
|
4681
4681
|
let e = null;
|
|
4682
|
-
for (let n = 0; n <
|
|
4683
|
-
const r =
|
|
4684
|
-
o && (
|
|
4682
|
+
for (let n = 0; n < V; n++) {
|
|
4683
|
+
const r = R[n].value, o = t.get(r);
|
|
4684
|
+
o && (N || (N = i.getPrecedents().clone(B)), N.removeAll(o, Go), e || (e = new Map(t)), e.delete(r));
|
|
4685
4685
|
}
|
|
4686
4686
|
e && i.setDynamics(e);
|
|
4687
4687
|
}
|
|
4688
|
-
let
|
|
4689
|
-
if (
|
|
4690
|
-
|
|
4691
|
-
const t =
|
|
4688
|
+
let O = [];
|
|
4689
|
+
if (A || R) {
|
|
4690
|
+
N || (N = i.getPrecedents().clone(B)), Po(k, N, A, R), M && Lo(N, M, null);
|
|
4691
|
+
const t = A ? this._joinInserted(k, N, A, (t) => {
|
|
4692
4692
|
E.push({
|
|
4693
4693
|
colStart: t.colStart,
|
|
4694
4694
|
rowStart: t.rowStart,
|
|
@@ -4697,8 +4697,8 @@ var wo = class extends Lt {
|
|
|
4697
4697
|
scope: l
|
|
4698
4698
|
});
|
|
4699
4699
|
}) : null;
|
|
4700
|
-
this._touchFormulas(
|
|
4701
|
-
const e =
|
|
4700
|
+
this._touchFormulas(R), this._touchFormulas(A), this._touchFormulas(M), this._touchFormulas(t);
|
|
4701
|
+
const e = M ? function(t, ...e) {
|
|
4702
4702
|
const n = [];
|
|
4703
4703
|
if (!t) return n;
|
|
4704
4704
|
for (let r = 0; r < t.length; r++) {
|
|
@@ -4715,8 +4715,8 @@ var wo = class extends Lt {
|
|
|
4715
4715
|
}
|
|
4716
4716
|
}
|
|
4717
4717
|
return n;
|
|
4718
|
-
}(
|
|
4719
|
-
|
|
4718
|
+
}(R, x, G) : R;
|
|
4719
|
+
$(-1, e, A, S, g, _, (t, e, n, r) => {
|
|
4720
4720
|
E.push({
|
|
4721
4721
|
colStart: t,
|
|
4722
4722
|
rowStart: e,
|
|
@@ -4726,9 +4726,9 @@ var wo = class extends Lt {
|
|
|
4726
4726
|
});
|
|
4727
4727
|
}, this._notifyValues, C, this._notifyCalcStatus, p, f, !0, this._circularSpatial, this._calcStatusSpatial);
|
|
4728
4728
|
}
|
|
4729
|
-
if (
|
|
4730
|
-
const e =
|
|
4731
|
-
|
|
4729
|
+
if (N && i.setPrecedents(N), k && (A || R || M) && i.setFormulas(k), A) for (let t = 0; t < A.length; t++) {
|
|
4730
|
+
const e = A[t];
|
|
4731
|
+
O.push({
|
|
4732
4732
|
colStart: e.colStart,
|
|
4733
4733
|
rowStart: e.rowStart,
|
|
4734
4734
|
colEnd: e.colEnd,
|
|
@@ -4736,9 +4736,9 @@ var wo = class extends Lt {
|
|
|
4736
4736
|
scope: l
|
|
4737
4737
|
});
|
|
4738
4738
|
}
|
|
4739
|
-
if (
|
|
4740
|
-
const e =
|
|
4741
|
-
|
|
4739
|
+
if (R) for (let t = 0; t < R.length; t++) {
|
|
4740
|
+
const e = R[t];
|
|
4741
|
+
O.push({
|
|
4742
4742
|
colStart: e.colStart,
|
|
4743
4743
|
rowStart: e.rowStart,
|
|
4744
4744
|
colEnd: e.colEnd,
|
|
@@ -4746,7 +4746,7 @@ var wo = class extends Lt {
|
|
|
4746
4746
|
scope: l
|
|
4747
4747
|
});
|
|
4748
4748
|
}
|
|
4749
|
-
return this._notifyCalcStatus.size() !== m && (i.getDeferred?.()?.noteRepaint(l), i.requestCalculateGrid(l)), E.length > 0 && i.markDirty(E),
|
|
4749
|
+
return this._notifyCalcStatus.size() !== m && (i.getDeferred?.()?.noteRepaint(l), i.requestCalculateGrid(l)), E.length > 0 && i.markDirty(E), O;
|
|
4750
4750
|
}
|
|
4751
4751
|
_rederivePrecedentsNow(t) {
|
|
4752
4752
|
const e = this._container, n = e.getPrecedents().clone();
|
|
@@ -4784,7 +4784,7 @@ var wo = class extends Lt {
|
|
|
4784
4784
|
const s = n[o];
|
|
4785
4785
|
if (!a(s) || !d(s)) continue;
|
|
4786
4786
|
h = !1;
|
|
4787
|
-
const l =
|
|
4787
|
+
const l = W(c, s, (t, e, n, r) => {
|
|
4788
4788
|
if (!a(t) || !a(e)) return;
|
|
4789
4789
|
const o = {
|
|
4790
4790
|
colStart: n.colStart,
|
|
@@ -4835,8 +4835,8 @@ var wo = class extends Lt {
|
|
|
4835
4835
|
const e = t.data;
|
|
4836
4836
|
this._values.setValues(e);
|
|
4837
4837
|
const n = this._values.getAxis() === w.Axis.Column;
|
|
4838
|
-
|
|
4839
|
-
const r =
|
|
4838
|
+
zt(this._errorSpatial, e, n);
|
|
4839
|
+
const r = ie(e, n, this._gridId);
|
|
4840
4840
|
this._contentfulSpatial.load(r);
|
|
4841
4841
|
}
|
|
4842
4842
|
const e = this._gridId, n = this._container, r = n.getPrecedents(), o = n.getFormulas(), s = {
|
|
@@ -4848,9 +4848,9 @@ var wo = class extends Lt {
|
|
|
4848
4848
|
if (c) {
|
|
4849
4849
|
const t = c.length;
|
|
4850
4850
|
for (let e = 0; e < t; e++) {
|
|
4851
|
-
const t = c[e], n = t[0], r =
|
|
4851
|
+
const t = c[e], n = t[0], r = Yt(n, s).split(":")[0];
|
|
4852
4852
|
d.add(r);
|
|
4853
|
-
const o =
|
|
4853
|
+
const o = yt(t, s);
|
|
4854
4854
|
o && h.add(`${o.rowStart},${o.colStart}`);
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
@@ -4858,7 +4858,7 @@ var wo = class extends Lt {
|
|
|
4858
4858
|
S.colIndex = 0, S.rowIndex = 0, S.gridId = e;
|
|
4859
4859
|
const w = n.isLegacyIntersect();
|
|
4860
4860
|
for (let t = 0; t < u; t++) {
|
|
4861
|
-
const r =
|
|
4861
|
+
const r = yt(l[t], s);
|
|
4862
4862
|
r.scope = e;
|
|
4863
4863
|
const o = r.value, i = r.rowStart, a = r.colStart;
|
|
4864
4864
|
S.colIndex = a, S.rowIndex = i;
|
|
@@ -4872,7 +4872,7 @@ var wo = class extends Lt {
|
|
|
4872
4872
|
for (let t = 0; t < E; t++) {
|
|
4873
4873
|
const n = g[t];
|
|
4874
4874
|
if (m.isError(n)) continue;
|
|
4875
|
-
const o =
|
|
4875
|
+
const o = ve(b[t], bo[t], Co[t]), s = o.$absColEnd, l = o.$absRowEnd, i = {
|
|
4876
4876
|
colStart: n.colStart,
|
|
4877
4877
|
rowStart: n.rowStart,
|
|
4878
4878
|
colEnd: n.colEnd + (s ? 0 : v),
|
|
@@ -4895,9 +4895,9 @@ var wo = class extends Lt {
|
|
|
4895
4895
|
if (o.load(_), r.load(f), n.bumpCalcEpochs(!0), i.formulaInserts = this._formulaRecords(_), c) {
|
|
4896
4896
|
const t = [], l = [], a = /* @__PURE__ */ new Map(), d = this._values, h = c.length;
|
|
4897
4897
|
for (let n = 0; n < h; n++) {
|
|
4898
|
-
const r =
|
|
4899
|
-
|
|
4900
|
-
const f = o.search(
|
|
4898
|
+
const r = yt(c[n], s), i = r.value ?? "dynamic", h = "error" === i, u = r.colStart, _ = r.rowStart;
|
|
4899
|
+
Ao.colStart = u, Ao.rowStart = _, Ao.colEnd = u, Ao.rowEnd = _, Ao.scope = e;
|
|
4900
|
+
const f = o.search(Ao);
|
|
4901
4901
|
if (1 !== f.length) continue;
|
|
4902
4902
|
const p = f[0].value, S = p.nodeAt(_, u), w = r.colEnd, E = r.rowEnd, I = {
|
|
4903
4903
|
colStart: u,
|
|
@@ -4905,13 +4905,13 @@ var wo = class extends Lt {
|
|
|
4905
4905
|
colEnd: w,
|
|
4906
4906
|
rowEnd: E
|
|
4907
4907
|
};
|
|
4908
|
-
"fixed" === i && (
|
|
4908
|
+
"fixed" === i && (Ze(S).fixedRef = I, p.densify()), S.cachedValue = h ? m.BuiltIn.Spill : new Re(g, d, I);
|
|
4909
4909
|
const y = {
|
|
4910
4910
|
colStart: u,
|
|
4911
4911
|
rowStart: _,
|
|
4912
4912
|
colEnd: w,
|
|
4913
4913
|
rowEnd: E,
|
|
4914
|
-
value: new
|
|
4914
|
+
value: new x(I, 0, i)
|
|
4915
4915
|
};
|
|
4916
4916
|
l.push(y), t.push({
|
|
4917
4917
|
colStart: u,
|
|
@@ -4919,7 +4919,7 @@ var wo = class extends Lt {
|
|
|
4919
4919
|
colEnd: w,
|
|
4920
4920
|
rowEnd: E,
|
|
4921
4921
|
value: i
|
|
4922
|
-
}),
|
|
4922
|
+
}), K(a, S, I, -2);
|
|
4923
4923
|
}
|
|
4924
4924
|
if (this._spillSpatial.load(l), a.size > 0) {
|
|
4925
4925
|
r.load(Array.from(a.values()).flat()), n.bumpCalcEpochs(!1);
|
|
@@ -4936,19 +4936,19 @@ var wo = class extends Lt {
|
|
|
4936
4936
|
t.add(e), e.state |= Hn, e.block.calcOnLoad = !0;
|
|
4937
4937
|
}, r = new Array(y);
|
|
4938
4938
|
for (let t = 0; t < y; t++) {
|
|
4939
|
-
const n = I[t], l =
|
|
4939
|
+
const n = I[t], l = z(n, s);
|
|
4940
4940
|
r[t] = { ...l };
|
|
4941
4941
|
const i = o.search(l), a = i.length;
|
|
4942
4942
|
for (let t = 0; t < a; t++) {
|
|
4943
4943
|
const n = i[t];
|
|
4944
|
-
|
|
4944
|
+
gt(n, l, e);
|
|
4945
4945
|
}
|
|
4946
4946
|
}
|
|
4947
4947
|
this._markDirtyRegionsNow(r), E = !0;
|
|
4948
4948
|
}
|
|
4949
|
-
const v = this._contentfulSpatial,
|
|
4950
|
-
let
|
|
4951
|
-
const
|
|
4949
|
+
const v = this._contentfulSpatial, C = !v.isEmpty();
|
|
4950
|
+
let b = null;
|
|
4951
|
+
const A = {
|
|
4952
4952
|
rowStart: 0,
|
|
4953
4953
|
colStart: 0,
|
|
4954
4954
|
rowEnd: 0,
|
|
@@ -4960,23 +4960,23 @@ var wo = class extends Lt {
|
|
|
4960
4960
|
if (!e) continue;
|
|
4961
4961
|
const n = (e.rowEnd - e.rowStart + 1) * (e.colEnd - e.colStart + 1);
|
|
4962
4962
|
let r = 0;
|
|
4963
|
-
if (
|
|
4964
|
-
|
|
4965
|
-
const t = v.search(
|
|
4963
|
+
if (C) {
|
|
4964
|
+
A.rowStart = e.rowStart, A.colStart = e.colStart, A.rowEnd = e.rowEnd, A.colEnd = e.colEnd;
|
|
4965
|
+
const t = v.search(A);
|
|
4966
4966
|
for (let n = 0; n < t.length; n++) {
|
|
4967
4967
|
const o = t[n];
|
|
4968
4968
|
r += (Math.min(o.rowEnd, e.rowEnd) - Math.max(o.rowStart, e.rowStart) + 1) * (Math.min(o.colEnd, e.colEnd) - Math.max(o.colStart, e.colStart) + 1);
|
|
4969
4969
|
}
|
|
4970
4970
|
}
|
|
4971
4971
|
const o = r < n && !this._isSavedSpill(e);
|
|
4972
|
-
o && (e.value.uncalculated = !0), (o || e.value?.getError()) && (
|
|
4972
|
+
o && (e.value.uncalculated = !0), (o || e.value?.getError()) && (b ??= []).push({
|
|
4973
4973
|
rowStart: e.rowStart,
|
|
4974
4974
|
colStart: e.colStart,
|
|
4975
4975
|
rowEnd: e.rowEnd,
|
|
4976
4976
|
colEnd: e.colEnd
|
|
4977
4977
|
});
|
|
4978
4978
|
}
|
|
4979
|
-
if (
|
|
4979
|
+
if (b && (this._markDirtyRegionsNow(b), E = !0), a && u > 0) {
|
|
4980
4980
|
const t = new Array(u);
|
|
4981
4981
|
for (let e = 0; e < u; e++) {
|
|
4982
4982
|
const n = _[e];
|
|
@@ -5019,7 +5019,7 @@ var wo = class extends Lt {
|
|
|
5019
5019
|
}
|
|
5020
5020
|
_toJSONNow(e) {
|
|
5021
5021
|
let n = this._container.getFormulas().getSpatialAt(this._gridId)?.all(), r = n ? n.length : 0;
|
|
5022
|
-
r > 0 && (n =
|
|
5022
|
+
r > 0 && (n = nt(n, t.Column, 2, Bo), n.sort(o.rowFirstRangeComparator)), r = n ? n.length : 0;
|
|
5023
5023
|
const s = this._hiddenRows, l = this._hiddenColumns, i = this._filtered;
|
|
5024
5024
|
if (0 === r && !s && !l && !i) return null;
|
|
5025
5025
|
const a = {};
|
|
@@ -5036,7 +5036,7 @@ var wo = class extends Lt {
|
|
|
5036
5036
|
if (d > 0) {
|
|
5037
5037
|
const t = this.getEntireCoords(), e = new Array(d);
|
|
5038
5038
|
for (let n = 0; n < d; n++) {
|
|
5039
|
-
const r = c[n], o =
|
|
5039
|
+
const r = c[n], o = ce(r, t);
|
|
5040
5040
|
e[n] = [o, r.value.getKind()];
|
|
5041
5041
|
}
|
|
5042
5042
|
a.formulaArray = e;
|
|
@@ -5046,7 +5046,7 @@ var wo = class extends Lt {
|
|
|
5046
5046
|
if (h.size > 0) {
|
|
5047
5047
|
const t = h.values();
|
|
5048
5048
|
let e = t.next();
|
|
5049
|
-
const n = this._values.getAxis() === w.Axis.Column, r =
|
|
5049
|
+
const n = this._values.getAxis() === w.Axis.Column, r = B(!0);
|
|
5050
5050
|
for (; !e.done;) {
|
|
5051
5051
|
const o = e.value;
|
|
5052
5052
|
if (e = t.next(), o.gridId !== u) continue;
|
|
@@ -5070,14 +5070,14 @@ var wo = class extends Lt {
|
|
|
5070
5070
|
}
|
|
5071
5071
|
};
|
|
5072
5072
|
f.isEmpty() || n(f.all());
|
|
5073
|
-
const r = g.isEmpty() ? [] : g.all().filter((t) => t.value ===
|
|
5074
|
-
r.length > 0 && n(r), p.length > 0 && n(p), _ =
|
|
5073
|
+
const r = g.isEmpty() ? [] : g.all().filter((t) => t.value === se.CalcStatus.Working);
|
|
5074
|
+
r.length > 0 && n(r), p.length > 0 && n(p), _ = nt(e, t.Column, 2);
|
|
5075
5075
|
}
|
|
5076
5076
|
const m = _ ? _.length : 0;
|
|
5077
5077
|
if (m > 0) {
|
|
5078
5078
|
const t = new Array(m);
|
|
5079
5079
|
for (let e = 0; e < m; e++) {
|
|
5080
|
-
const n = _[e], r =
|
|
5080
|
+
const n = _[e], r = ce(n, this.getEntireCoords());
|
|
5081
5081
|
t[e] = r;
|
|
5082
5082
|
}
|
|
5083
5083
|
a.volatile = t;
|
|
@@ -5097,13 +5097,13 @@ var wo = class extends Lt {
|
|
|
5097
5097
|
colStart: 0,
|
|
5098
5098
|
rowEnd: 0,
|
|
5099
5099
|
colEnd: 0
|
|
5100
|
-
}, Co = [], bo = [],
|
|
5100
|
+
}, Co = [], bo = [], Ao = {
|
|
5101
5101
|
colStart: 0,
|
|
5102
5102
|
rowStart: 0,
|
|
5103
5103
|
colEnd: 0,
|
|
5104
5104
|
rowEnd: 0,
|
|
5105
5105
|
scope: null
|
|
5106
|
-
},
|
|
5106
|
+
}, Ro = {
|
|
5107
5107
|
colStart: 0,
|
|
5108
5108
|
rowStart: 0,
|
|
5109
5109
|
colEnd: 0,
|
|
@@ -5191,25 +5191,25 @@ function Lo(t, e, n) {
|
|
|
5191
5191
|
const s = [];
|
|
5192
5192
|
for (let t = 0; t < o; t++) {
|
|
5193
5193
|
const n = e[t], r = [], o = s.length;
|
|
5194
|
-
|
|
5194
|
+
te(n, s, r), s.length > o && (n.value.registeredPrecedents = s.slice(o));
|
|
5195
5195
|
}
|
|
5196
5196
|
t.load(s);
|
|
5197
5197
|
}
|
|
5198
5198
|
To.fill(null, 0, 10);
|
|
5199
5199
|
var $o = (t) => {
|
|
5200
5200
|
let e = !1;
|
|
5201
|
-
if (
|
|
5202
|
-
if (e || t instanceof
|
|
5201
|
+
if (C.forEachLeaf(t, (t, n, r, o) => {
|
|
5202
|
+
if (e || t instanceof ot) return;
|
|
5203
5203
|
let s = n + o - r;
|
|
5204
5204
|
!0 === t.isIRepeatingList && (s = Math.min(s, n + t.getPeriod() - 1));
|
|
5205
|
-
for (let r = n; !e && r <= s; r++) e =
|
|
5205
|
+
for (let r = n; !e && r <= s; r++) e = Rt(t.at(r));
|
|
5206
5206
|
}), !e) return t;
|
|
5207
5207
|
const n = t.length, r = new Array(n);
|
|
5208
|
-
for (let e = 0; e < n; e++) r[e] =
|
|
5209
|
-
return new
|
|
5208
|
+
for (let e = 0; e < n; e++) r[e] = At(t.at(e));
|
|
5209
|
+
return new V.ArrayList(r);
|
|
5210
5210
|
}, Ho = (t, e, n) => {
|
|
5211
5211
|
const r = n?.fetchedFrom;
|
|
5212
|
-
if (!t) return new
|
|
5212
|
+
if (!t) return new b({
|
|
5213
5213
|
source: { buffer: e },
|
|
5214
5214
|
fetchedFrom: r
|
|
5215
5215
|
});
|
|
@@ -5250,18 +5250,18 @@ var $o = (t) => {
|
|
|
5250
5250
|
}
|
|
5251
5251
|
}
|
|
5252
5252
|
_moved() {
|
|
5253
|
-
|
|
5253
|
+
Mt(), this._onMoved?.(this);
|
|
5254
5254
|
}
|
|
5255
5255
|
_final() {
|
|
5256
5256
|
const t = this._onFinal;
|
|
5257
5257
|
this._onFinal = null, t?.(this);
|
|
5258
5258
|
}
|
|
5259
|
-
}, Ko = (t) => t, qo = (t, e) =>
|
|
5259
|
+
}, Ko = (t) => t, qo = (t, e) => P.fromJSON({
|
|
5260
5260
|
type: t,
|
|
5261
5261
|
data: e
|
|
5262
|
-
}),
|
|
5262
|
+
}), Uo = (t, e) => globalThis.fetch(t, e), Wo = () => {
|
|
5263
5263
|
throw new Error("getFormulaContext() needs a workbook being calculated");
|
|
5264
|
-
}, Xo = () => Promise.reject(/* @__PURE__ */ new Error("parseText() needs a workbook being calculated")), Jo = (t, e) => Ho(null, t, e),
|
|
5264
|
+
}, Xo = () => Promise.reject(/* @__PURE__ */ new Error("parseText() needs a workbook being calculated")), Jo = (t, e) => Ho(null, t, e), Qo = class {
|
|
5265
5265
|
constructor(t, e, n, r = null, o = 100, s = Ko, l, i = null) {
|
|
5266
5266
|
this._nextId = 1, this._calls = /* @__PURE__ */ new Map(), this._holders = !1, this._current = [], this._made = [], this._batch = /* @__PURE__ */ new Map(), this._states = /* @__PURE__ */ new Map(), this._moved = /* @__PURE__ */ new Set(), this._settleTimer = null, this._settledAt = 0, this._repaintGrids = /* @__PURE__ */ new Set(), this._settleDirty = [], this._serving = !1, this._external = !1, this.previous = void 0, this._waiters = /* @__PURE__ */ new Set(), this._scope = t, this._onCountsChange = i, this._heldAt = e, this._getRandom = n, this._onSettle = r, this._settleWindow = o, this._normalize = s;
|
|
5267
5267
|
const a = this._moved;
|
|
@@ -5281,8 +5281,8 @@ var $o = (t) => {
|
|
|
5281
5281
|
byPayload: ts,
|
|
5282
5282
|
createRichData: l?.createRichData ?? qo,
|
|
5283
5283
|
addResource: l?.addResource ?? Jo,
|
|
5284
|
-
fetch: l?.fetch ??
|
|
5285
|
-
getFormulaContext: l?.getFormulaContext ??
|
|
5284
|
+
fetch: l?.fetch ?? Uo,
|
|
5285
|
+
getFormulaContext: l?.getFormulaContext ?? Wo,
|
|
5286
5286
|
parseText: l?.parseText ?? Xo
|
|
5287
5287
|
};
|
|
5288
5288
|
const h = this._deferContext.fetch;
|
|
@@ -5372,7 +5372,7 @@ var $o = (t) => {
|
|
|
5372
5372
|
}, t);
|
|
5373
5373
|
}
|
|
5374
5374
|
newHolder(t, e) {
|
|
5375
|
-
return this._holders = !0, new
|
|
5375
|
+
return this._holders = !0, new Dt(t, e.calls, e.direct);
|
|
5376
5376
|
}
|
|
5377
5377
|
defer(t, e, n = null, r = !1) {
|
|
5378
5378
|
const o = this._scope, s = o.deferOrdinal++;
|
|
@@ -5415,12 +5415,12 @@ var $o = (t) => {
|
|
|
5415
5415
|
try {
|
|
5416
5416
|
o = n(e, t);
|
|
5417
5417
|
} catch (t) {
|
|
5418
|
-
|
|
5418
|
+
Yo(e, t);
|
|
5419
5419
|
continue;
|
|
5420
5420
|
} finally {
|
|
5421
5421
|
this._setCurrent(null);
|
|
5422
5422
|
}
|
|
5423
|
-
o && "function" == typeof o.then && o.then(void 0, (t) =>
|
|
5423
|
+
o && "function" == typeof o.then && o.then(void 0, (t) => Yo(e, t));
|
|
5424
5424
|
}
|
|
5425
5425
|
}
|
|
5426
5426
|
}
|
|
@@ -5448,11 +5448,11 @@ var $o = (t) => {
|
|
|
5448
5448
|
const e = this._scope, n = e.node;
|
|
5449
5449
|
if (!n || !this._holders || !e.gridId) return;
|
|
5450
5450
|
let r = this._heldAt(e.gridId, e.rowIndex, e.colIndex);
|
|
5451
|
-
return null === r &&
|
|
5451
|
+
return null === r && Rt(n.cachedValue) && (r = n.cachedValue), null !== r ? r.calls[t] : void 0;
|
|
5452
5452
|
}
|
|
5453
|
-
},
|
|
5453
|
+
}, Yo = (t, e) => {
|
|
5454
5454
|
for (const n of t) n.isOpen() && n.reject(e);
|
|
5455
|
-
},
|
|
5455
|
+
}, Zo = Symbol("-0"), ts = async (t, e) => {
|
|
5456
5456
|
const n = /* @__PURE__ */ new Map(), r = [], o = [];
|
|
5457
5457
|
for (const e of t) {
|
|
5458
5458
|
const t = e.payload;
|
|
@@ -5468,7 +5468,7 @@ var $o = (t) => {
|
|
|
5468
5468
|
}
|
|
5469
5469
|
continue;
|
|
5470
5470
|
}
|
|
5471
|
-
const s = Object.is(t, -0) ?
|
|
5471
|
+
const s = Object.is(t, -0) ? Zo : t, l = n.get(s);
|
|
5472
5472
|
if (l) l.push(e);
|
|
5473
5473
|
else {
|
|
5474
5474
|
const r = {
|
|
@@ -5542,7 +5542,7 @@ var $o = (t) => {
|
|
|
5542
5542
|
}
|
|
5543
5543
|
_grow() {
|
|
5544
5544
|
const t = this._keys, e = this._values, n = this._order, r = this.size, o = Math.max(64, 2 * (this._mask + 1));
|
|
5545
|
-
this._keys = new Float64Array(o).fill(-1), this._values =
|
|
5545
|
+
this._keys = new Float64Array(o).fill(-1), this._values = Ce(o), this._order = new Int32Array(o), this._mask = o - 1;
|
|
5546
5546
|
for (let o = 0; o < r; o++) {
|
|
5547
5547
|
const r = t[n[o]], s = Math.floor(r / ns), l = this._slotOf(s, r - s * ns, r);
|
|
5548
5548
|
this._keys[l] = r, this._values[l] = e[n[o]], this._order[o] = l;
|
|
@@ -5936,7 +5936,7 @@ var is = {
|
|
|
5936
5936
|
const e = this.getRuns(t ? { bounds: t } : void 0);
|
|
5937
5937
|
let n = e.next();
|
|
5938
5938
|
if (n.done) return null;
|
|
5939
|
-
const r = new
|
|
5939
|
+
const r = new L.Builder();
|
|
5940
5940
|
for (; !n.done;) r.pushMultipleAt(n.value[0], n.value[1], n.value[2]), n = e.next();
|
|
5941
5941
|
return r.build();
|
|
5942
5942
|
}
|
|
@@ -6228,8 +6228,8 @@ var Es = class {
|
|
|
6228
6228
|
}, this._passHook = (t, e, n, r, o, s) => this._onPassRead(t, e, n, r, o, !0 === s), this._taintDownstream = (t) => {
|
|
6229
6229
|
if (0 !== (t.state & qn)) return;
|
|
6230
6230
|
t.state = t.state & ~Kn | $n | sr | ir;
|
|
6231
|
-
const e =
|
|
6232
|
-
e.cycleGroup = this._taintGroup, e.demandValue =
|
|
6231
|
+
const e = Ze(t);
|
|
6232
|
+
e.cycleGroup = this._taintGroup, e.demandValue = Ys(t), this._addCircular(t);
|
|
6233
6233
|
};
|
|
6234
6234
|
}
|
|
6235
6235
|
execute(t, e, n) {
|
|
@@ -6284,15 +6284,15 @@ var Es = class {
|
|
|
6284
6284
|
};
|
|
6285
6285
|
const b = /* @__PURE__ */ new Map();
|
|
6286
6286
|
this._addDynamicPrecedent = (t, e, n) => {
|
|
6287
|
-
t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn),
|
|
6287
|
+
t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn), K(b, t, e, n));
|
|
6288
6288
|
};
|
|
6289
|
-
const
|
|
6289
|
+
const A = /* @__PURE__ */ new Map(), R = (t, e) => {
|
|
6290
6290
|
(function(t, e, n, r) {
|
|
6291
6291
|
if (0 === e) return;
|
|
6292
|
-
let o, s, l, i =
|
|
6292
|
+
let o, s, l, i = As, a = [];
|
|
6293
6293
|
const c = /* @__PURE__ */ new Set(), d = () => {
|
|
6294
6294
|
const t = o.build();
|
|
6295
|
-
t && t.tuples && (l.values.setValues(t.tuples),
|
|
6295
|
+
t && t.tuples && (l.values.setValues(t.tuples), zt(l.errorSpatial, t.tuples, r));
|
|
6296
6296
|
const e = s.done(!0);
|
|
6297
6297
|
for (let t = 0; t < e.length; t++) {
|
|
6298
6298
|
const n = e[t];
|
|
@@ -6318,7 +6318,7 @@ var Es = class {
|
|
|
6318
6318
|
t.length = e, t.sort(Ns);
|
|
6319
6319
|
for (let h = 0; h < e; h++) {
|
|
6320
6320
|
const e = t[h], u = e.colIndex, _ = e.rowIndex, f = e.gridId;
|
|
6321
|
-
f || console.log("nodeGridId is null", e), f !== i && (i !==
|
|
6321
|
+
f || console.log("nodeGridId is null", e), f !== i && (i !== As && d(), o = new L.Builder(Is), s = B(r), i = f, l = n(f));
|
|
6322
6322
|
const g = u, p = _, m = e.cachedValue;
|
|
6323
6323
|
m?.isIRange || (o.pushAt(g, p, m), s.append(g, p));
|
|
6324
6324
|
const S = e.block, w = e.numFmt;
|
|
@@ -6339,7 +6339,7 @@ var Es = class {
|
|
|
6339
6339
|
}
|
|
6340
6340
|
});
|
|
6341
6341
|
}
|
|
6342
|
-
} else null !== w && (l.formatsConflating || (l.formatsConflating =
|
|
6342
|
+
} else null !== w && (l.formatsConflating || (l.formatsConflating = B(r)), l.formatsConflating.append(g, p, w));
|
|
6343
6343
|
}
|
|
6344
6344
|
d();
|
|
6345
6345
|
})(t, e, _, !0);
|
|
@@ -6347,16 +6347,16 @@ var Es = class {
|
|
|
6347
6347
|
const e = t[n];
|
|
6348
6348
|
e.state = e.state & ~Kn | sr;
|
|
6349
6349
|
}
|
|
6350
|
-
for (const [t, e] of S)
|
|
6350
|
+
for (const [t, e] of S) A.set(t, e);
|
|
6351
6351
|
S.clear();
|
|
6352
6352
|
};
|
|
6353
|
-
let k = r, N =
|
|
6353
|
+
let k = r, N = Ul;
|
|
6354
6354
|
N.length = 0;
|
|
6355
6355
|
let M = 0, F = !1;
|
|
6356
6356
|
do {
|
|
6357
6357
|
++y, I(), this.doMarkAndPlan(t, y, v, N);
|
|
6358
|
-
const e = this.doEvaluate(t, _,
|
|
6359
|
-
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, _,
|
|
6358
|
+
const e = this.doEvaluate(t, _, R, k, N);
|
|
6359
|
+
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, _, R, !1, N), this._hasCycle() || console.error("Too many iterations, possible cycle or leak"), F = !1)), M++;
|
|
6360
6360
|
} while (F);
|
|
6361
6361
|
for (const t of E) {
|
|
6362
6362
|
if (b.has(t)) continue;
|
|
@@ -6396,7 +6396,7 @@ var Es = class {
|
|
|
6396
6396
|
return this._gridUpdates = null, this._addDynamicPrecedent = null, this._context._setDynamicReadHook(null), this._passActive = !1, u.getDeferred?.()?.flush(), {
|
|
6397
6397
|
precedentSpatial: g,
|
|
6398
6398
|
dynamicByBlock: m,
|
|
6399
|
-
lastUpdates:
|
|
6399
|
+
lastUpdates: A,
|
|
6400
6400
|
skippedTables: this._takeSkippedTables()
|
|
6401
6401
|
};
|
|
6402
6402
|
}
|
|
@@ -6409,7 +6409,7 @@ var Es = class {
|
|
|
6409
6409
|
if (r?.isIRange && r.size > 1) {
|
|
6410
6410
|
if (e.uncalculated) return;
|
|
6411
6411
|
const o = t.rowIndex, s = t.colIndex;
|
|
6412
|
-
return new
|
|
6412
|
+
return new Re(this._container.getRuntime(), n.getValues().clone(), {
|
|
6413
6413
|
rowStart: o,
|
|
6414
6414
|
colStart: s,
|
|
6415
6415
|
rowEnd: o + r.getRowCount() - 1,
|
|
@@ -6427,7 +6427,7 @@ var Es = class {
|
|
|
6427
6427
|
const o = n.endEvaluation(), s = o.calls;
|
|
6428
6428
|
if (0 === s.length) return e;
|
|
6429
6429
|
for (let e = 0; e < s.length; e++) if (s[e].isOpen()) {
|
|
6430
|
-
t.state |=
|
|
6430
|
+
t.state |= Zn | er;
|
|
6431
6431
|
break;
|
|
6432
6432
|
}
|
|
6433
6433
|
const l = n.newHolder(e, o);
|
|
@@ -6453,12 +6453,12 @@ var Es = class {
|
|
|
6453
6453
|
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);
|
|
6454
6454
|
let _ = 0, f = null, g = !1, p = !1;
|
|
6455
6455
|
const m = (t) => {
|
|
6456
|
-
if (t.cycleId !== l || t.markId !== i) return void (d || 0 === (t.state &
|
|
6456
|
+
if (t.cycleId !== l || t.markId !== i) return void (d || 0 === (t.state & Un) || (s ? p = !0 : this._demandActive ? this._markDownstream(t) : f = t));
|
|
6457
6457
|
let e = t.state & Kn;
|
|
6458
6458
|
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);
|
|
6459
6459
|
else if (s) p = !0;
|
|
6460
6460
|
else {
|
|
6461
|
-
if (u || (t.state &= ~Jn), !d || !this._demandActive) throw new
|
|
6461
|
+
if (u || (t.state &= ~Jn), !d || !this._demandActive) throw new Je(t);
|
|
6462
6462
|
0 === (t.state & jn) && (t.state |= jn, _l[this._iterHitsLength++] = t);
|
|
6463
6463
|
}
|
|
6464
6464
|
};
|
|
@@ -6477,13 +6477,13 @@ var Es = class {
|
|
|
6477
6477
|
}
|
|
6478
6478
|
c.forEachNodeIn(d, h, u, _, m);
|
|
6479
6479
|
}
|
|
6480
|
-
if (_ > 0) throw new
|
|
6481
|
-
if (f) throw new
|
|
6480
|
+
if (_ > 0) throw new Ye(cl, _);
|
|
6481
|
+
if (f) throw new nn(f);
|
|
6482
6482
|
return p;
|
|
6483
6483
|
}
|
|
6484
6484
|
_markDownstream(t) {
|
|
6485
6485
|
const e = this._container.getScope().node;
|
|
6486
|
-
e && 0 === (e.state & qn) && (e.state = e.state & ~qn | ir,
|
|
6486
|
+
e && 0 === (e.state & qn) && (e.state = e.state & ~qn | ir, Ze(e).cycleGroup = this._resolveGroup(Qs(t)), this._addCircular(e), this._iterate && (pl[this._iterDownstreamLength++] = e));
|
|
6487
6487
|
}
|
|
6488
6488
|
_onMemberRead(t) {
|
|
6489
6489
|
const e = t.state;
|
|
@@ -6580,7 +6580,7 @@ var Es = class {
|
|
|
6580
6580
|
};
|
|
6581
6581
|
this._whatIf = c;
|
|
6582
6582
|
try {
|
|
6583
|
-
const n =
|
|
6583
|
+
const n = an(e, t), r = sn({
|
|
6584
6584
|
container: e,
|
|
6585
6585
|
evaluate: (t) => this._evaluateWhatIf(t),
|
|
6586
6586
|
layerFor: d
|
|
@@ -6603,12 +6603,12 @@ var Es = class {
|
|
|
6603
6603
|
if (!n) return t.cachedValue ?? null;
|
|
6604
6604
|
const r = this._container.getScope();
|
|
6605
6605
|
let o;
|
|
6606
|
-
Ln(t,
|
|
6606
|
+
Ln(t, hn(t)), r.gridId = t.gridId, r.node = t, r.rowIndex = t.rowIndex, r.colIndex = t.colIndex, r.drawIndex = 0;
|
|
6607
6607
|
try {
|
|
6608
6608
|
const e = r.deferCount;
|
|
6609
6609
|
o = n.finalizeValueForCell(n.evaluateAt(t.rowIndex, t.colIndex)), r.deferCount !== e && (o = this._takeDeferred(t, o));
|
|
6610
6610
|
} catch (e) {
|
|
6611
|
-
if (!(e instanceof
|
|
6611
|
+
if (!(e instanceof Gt)) throw e;
|
|
6612
6612
|
o = t.cachedValue ?? null;
|
|
6613
6613
|
}
|
|
6614
6614
|
return this._fitCell(e, o);
|
|
@@ -6646,11 +6646,11 @@ var Es = class {
|
|
|
6646
6646
|
o.blankValue = e, o.blankCycleId = s, o.blankMarkId = l;
|
|
6647
6647
|
const _ = o.getTouchedCached().blank, f = t.gridId, g = n.values, p = n.errorSpatial, m = this._container.getGrid(f);
|
|
6648
6648
|
if (null !== m && null !== m.getShadowOf()) return void vs(_, n, f);
|
|
6649
|
-
const S = g.getAxis() === w.Axis.Column, E = S ? w.Axis.Column : w.Axis.Row, I = qs, y =
|
|
6649
|
+
const S = g.getAxis() === w.Axis.Column, E = S ? w.Axis.Column : w.Axis.Row, I = qs, y = Us;
|
|
6650
6650
|
for (let t = 0; t < _.length; t++) {
|
|
6651
|
-
const n = _[t], r = S ? n.colStart : n.rowStart, o = S ? n.colEnd : n.rowEnd, s = S ? n.rowStart : n.colStart, l = S ? n.rowEnd - n.rowStart + 1 : n.colEnd - n.colStart + 1, i = new
|
|
6651
|
+
const n = _[t], r = S ? n.colStart : n.rowStart, o = S ? n.colEnd : n.rowEnd, s = S ? n.rowStart : n.colStart, l = S ? n.rowEnd - n.rowStart + 1 : n.colEnd - n.colStart + 1, i = new he([e], l), a = new Array(o - r + 1);
|
|
6652
6652
|
for (let t = r; t <= o; t++) a[t - r] = [t, [[s, i]]];
|
|
6653
|
-
g.setValues(a),
|
|
6653
|
+
g.setValues(a), Ht(p, n), zt(p, a, S);
|
|
6654
6654
|
const c = {
|
|
6655
6655
|
colStart: n.colStart,
|
|
6656
6656
|
rowStart: n.rowStart,
|
|
@@ -6660,7 +6660,7 @@ var Es = class {
|
|
|
6660
6660
|
};
|
|
6661
6661
|
I.push({
|
|
6662
6662
|
...c,
|
|
6663
|
-
value: new
|
|
6663
|
+
value: new Ft(c, E)
|
|
6664
6664
|
}), y.push(c);
|
|
6665
6665
|
}
|
|
6666
6666
|
n.contentfulSpatial.insertAllNonOverlapping(I), n.notifyValues.insertAllNonOverlapping(y), I.length = 0, y.length = 0, o.setBlankShared(_), this._dirtyBlankReaders(f, _, u === e ? h : null);
|
|
@@ -6672,7 +6672,7 @@ var Es = class {
|
|
|
6672
6672
|
for (let t = 0; t < e.length; t++) null === n ? o.push(e[t]) : Hr(e[t], n, o);
|
|
6673
6673
|
for (let e = 0; e < o.length; e++) {
|
|
6674
6674
|
const n = o[e];
|
|
6675
|
-
s.colStart = n.colStart, s.rowStart = n.rowStart, s.colEnd = n.colEnd, s.rowEnd = n.rowEnd, 0 !== r.search(s).length && (this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6675
|
+
s.colStart = n.colStart, s.rowStart = n.rowStart, s.colEnd = n.colEnd, s.rowEnd = n.rowEnd, 0 !== r.search(s).length && (this._fallbackDirty ?? (this._fallbackDirty = new et())).insertNonOverlapping({
|
|
6676
6676
|
colStart: n.colStart,
|
|
6677
6677
|
rowStart: n.rowStart,
|
|
6678
6678
|
colEnd: n.colEnd,
|
|
@@ -6689,7 +6689,7 @@ var Es = class {
|
|
|
6689
6689
|
xs(t, n.blank, e);
|
|
6690
6690
|
const r = t.getDemandedBlank();
|
|
6691
6691
|
if (0 === r.length) return;
|
|
6692
|
-
const o = this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6692
|
+
const o = this._fallbackDirty ?? (this._fallbackDirty = new et()), s = t.gridId, l = Ws;
|
|
6693
6693
|
for (let t = 0; t < r.length; t++) {
|
|
6694
6694
|
const e = r[t];
|
|
6695
6695
|
l.push({
|
|
@@ -6708,7 +6708,7 @@ var Es = class {
|
|
|
6708
6708
|
if (null === n) return;
|
|
6709
6709
|
const r = n.blank;
|
|
6710
6710
|
if (0 === r.length) return;
|
|
6711
|
-
const o = this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6711
|
+
const o = this._fallbackDirty ?? (this._fallbackDirty = new et()), s = t.gridId, l = Ws;
|
|
6712
6712
|
for (let t = 0; t < r.length; t++) {
|
|
6713
6713
|
const e = r[t];
|
|
6714
6714
|
l.push({
|
|
@@ -6756,12 +6756,12 @@ var Es = class {
|
|
|
6756
6756
|
let r;
|
|
6757
6757
|
0 === n && (e.state = -131841 & e.state | or | $n, this._addCircular(e));
|
|
6758
6758
|
let d = null, h = !1;
|
|
6759
|
-
Ln(e,
|
|
6759
|
+
Ln(e, hn(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);
|
|
6760
6760
|
try {
|
|
6761
6761
|
const t = e.block.formula, n = s.deferCount;
|
|
6762
6762
|
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);
|
|
6763
6763
|
} catch (t) {
|
|
6764
|
-
if (!(t instanceof
|
|
6764
|
+
if (!(t instanceof Ye || t instanceof Je || t instanceof nn)) throw t;
|
|
6765
6765
|
d = t;
|
|
6766
6766
|
} finally {
|
|
6767
6767
|
o._setReadHook(null);
|
|
@@ -6782,14 +6782,14 @@ var Es = class {
|
|
|
6782
6782
|
}
|
|
6783
6783
|
this._iterHitsLength = 0;
|
|
6784
6784
|
}
|
|
6785
|
-
if (d instanceof
|
|
6785
|
+
if (d instanceof Ye) {
|
|
6786
6786
|
if (0 !== (e.state & Jn)) {
|
|
6787
6787
|
this._unstartPrefetched(e), a = this._unwindSpeculative(i, a - 1);
|
|
6788
6788
|
continue;
|
|
6789
6789
|
}
|
|
6790
6790
|
l.retries++;
|
|
6791
6791
|
let t = 0;
|
|
6792
|
-
const n =
|
|
6792
|
+
const n = en(e), r = n.length;
|
|
6793
6793
|
for (let o = 0; o < r; o++) {
|
|
6794
6794
|
const r = n[o];
|
|
6795
6795
|
if (m.isError(r)) continue;
|
|
@@ -6798,16 +6798,16 @@ var Es = class {
|
|
|
6798
6798
|
}
|
|
6799
6799
|
for (let e = 0; e < t; e++) {
|
|
6800
6800
|
const t = c[e];
|
|
6801
|
-
0 === (t.state & (Kn |
|
|
6801
|
+
0 === (t.state & (Kn | Qn)) && (t.state |= Jn | Qn, i[a++] = t);
|
|
6802
6802
|
}
|
|
6803
6803
|
const o = d.nodes, s = d.count;
|
|
6804
6804
|
for (let t = 0; t < s; t++) {
|
|
6805
6805
|
const e = o[t];
|
|
6806
|
-
0 === (e.state & Kn) && (e.state = e.state & ~Jn |
|
|
6806
|
+
0 === (e.state & Kn) && (e.state = e.state & ~Jn | Qn, i[a++] = e);
|
|
6807
6807
|
}
|
|
6808
6808
|
continue;
|
|
6809
6809
|
}
|
|
6810
|
-
if (d instanceof
|
|
6810
|
+
if (d instanceof Je) {
|
|
6811
6811
|
if (0 !== (e.state & Jn)) {
|
|
6812
6812
|
this._unstartPrefetched(e), a = this._unwindSpeculative(i, a - 1);
|
|
6813
6813
|
continue;
|
|
@@ -6821,24 +6821,24 @@ var Es = class {
|
|
|
6821
6821
|
continue;
|
|
6822
6822
|
}
|
|
6823
6823
|
t.state = -66305 & t.state | sr;
|
|
6824
|
-
const n =
|
|
6825
|
-
|
|
6824
|
+
const n = Ys(t);
|
|
6825
|
+
Ze(t).demandValue = n, this._pushDemand(t, n);
|
|
6826
6826
|
const r = t.block;
|
|
6827
6827
|
r.representative === t && r.isBlankAware(this._passCycleId) && this._fallbackBlank(r, !1);
|
|
6828
6828
|
}
|
|
6829
6829
|
a = t;
|
|
6830
6830
|
continue;
|
|
6831
6831
|
}
|
|
6832
|
-
if (d instanceof
|
|
6832
|
+
if (d instanceof nn) {
|
|
6833
6833
|
e.state = -69377 & e.state | sr | ir;
|
|
6834
|
-
const t =
|
|
6835
|
-
n.cycleGroup =
|
|
6834
|
+
const t = Ys(e), n = Ze(e);
|
|
6835
|
+
n.cycleGroup = Qs(d.node), n.demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1), a--;
|
|
6836
6836
|
continue;
|
|
6837
6837
|
}
|
|
6838
|
-
if (this._iterate || (e.state & qn) !== ir)
|
|
6838
|
+
if (this._iterate || (e.state & qn) !== ir) Ze(e).demandValue = r, this._pushDemand(e, r), h && this._finalizeRepresentative(e, r, t(e.gridId), !1);
|
|
6839
6839
|
else {
|
|
6840
|
-
const t =
|
|
6841
|
-
|
|
6840
|
+
const t = Ys(e);
|
|
6841
|
+
Ze(e).demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1);
|
|
6842
6842
|
}
|
|
6843
6843
|
if (e.state = -66305 & e.state | sr, a--, this._openGroups.size > 0 && (e.state & qn) === lr) {
|
|
6844
6844
|
const t = this._resolveGroup(e.ext.cycleGroup);
|
|
@@ -6870,7 +6870,7 @@ var Es = class {
|
|
|
6870
6870
|
if ((r & Kn) !== or) continue;
|
|
6871
6871
|
if (0 !== (r & Jn)) continue;
|
|
6872
6872
|
l && (r & qn) !== lr && this._addIterMember(e, this._valueOnGrid(e)), e.state = r & ~qn | lr;
|
|
6873
|
-
const o =
|
|
6873
|
+
const o = Ze(e);
|
|
6874
6874
|
if (l && (r & qn) === lr) {
|
|
6875
6875
|
const t = this._resolveGroup(o.cycleGroup);
|
|
6876
6876
|
if (t !== s) {
|
|
@@ -6878,9 +6878,9 @@ var Es = class {
|
|
|
6878
6878
|
void 0 !== e && (e < i && (i = e), this._openGroups.delete(t)), this._groupAlias.set(t, s);
|
|
6879
6879
|
}
|
|
6880
6880
|
}
|
|
6881
|
-
o.cycleGroup = s, c ?
|
|
6881
|
+
o.cycleGroup = s, c ? Ze(c).cycleNext = e : a = e, c = e;
|
|
6882
6882
|
}
|
|
6883
|
-
return c && (
|
|
6883
|
+
return c && (Ze(c).cycleNext = r ?? a), l && this._openGroups.set(s, i), o;
|
|
6884
6884
|
}
|
|
6885
6885
|
_demandSweep(t) {
|
|
6886
6886
|
const e = this._iterate, n = fl, r = e.maxIteration, o = e.maxChange;
|
|
@@ -6948,7 +6948,7 @@ var Es = class {
|
|
|
6948
6948
|
this._iterHitsLength = 0;
|
|
6949
6949
|
}
|
|
6950
6950
|
_demandEvaluateOne(t, e) {
|
|
6951
|
-
const n = this._context, r = this._container.getScope(), o = e.block.formula, s =
|
|
6951
|
+
const n = this._context, r = this._container.getScope(), o = e.block.formula, s = hn(e);
|
|
6952
6952
|
for (;;) {
|
|
6953
6953
|
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++;
|
|
6954
6954
|
let l, i = null;
|
|
@@ -6957,7 +6957,7 @@ var Es = class {
|
|
|
6957
6957
|
const t = r.deferCount;
|
|
6958
6958
|
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);
|
|
6959
6959
|
} catch (t) {
|
|
6960
|
-
if (!(t instanceof
|
|
6960
|
+
if (!(t instanceof Ye)) throw t;
|
|
6961
6961
|
i = t;
|
|
6962
6962
|
} finally {
|
|
6963
6963
|
n._setReadHook(null);
|
|
@@ -6986,16 +6986,16 @@ var Es = class {
|
|
|
6986
6986
|
return !1;
|
|
6987
6987
|
}
|
|
6988
6988
|
_addCircular(t) {
|
|
6989
|
-
0 === (t.state &
|
|
6989
|
+
0 === (t.state & Wn) && (t.state |= Wn, dl[this._circularNodesLength++] = t);
|
|
6990
6990
|
}
|
|
6991
6991
|
_resetCircular() {
|
|
6992
6992
|
const t = this._circularNodesLength;
|
|
6993
|
-
for (let e = 0; e < t; e++) dl[e].state &= ~
|
|
6993
|
+
for (let e = 0; e < t; e++) dl[e].state &= ~Wn;
|
|
6994
6994
|
this._circularNodesLength = 0;
|
|
6995
6995
|
}
|
|
6996
6996
|
_trackCircular(t, e, n, r, o) {
|
|
6997
|
-
const s =
|
|
6998
|
-
if (s.shownGroup === i && (t.state &
|
|
6997
|
+
const s = Ze(t), l = t.state & qn, i = 0 === l ? 0 : s.cycleGroup;
|
|
6998
|
+
if (s.shownGroup === i && (t.state & Un) === l << 2) return;
|
|
6999
6999
|
if (this._cycleEpoch++, 0 !== s.shownGroup) {
|
|
7000
7000
|
const e = this._cycles.get(s.shownGroup);
|
|
7001
7001
|
e && (e.members.delete(t), e.downstream.delete(t), e.isEmpty() && this._cycles.delete(s.shownGroup));
|
|
@@ -7005,7 +7005,7 @@ var Es = class {
|
|
|
7005
7005
|
const e = this._cycleOf(i), n = l === lr;
|
|
7006
7006
|
(n ? e.members : e.downstream).add(t), a = e.getEntry(n);
|
|
7007
7007
|
}
|
|
7008
|
-
s.shownGroup = i, t.state = t.state & ~
|
|
7008
|
+
s.shownGroup = i, t.state = t.state & ~Un | l << 2, e.circularConflating || (e.circularConflating = B(o)), e.circularConflating.append(n, r, a);
|
|
7009
7009
|
}
|
|
7010
7010
|
_cycleOf(t) {
|
|
7011
7011
|
let e = this._cycles.get(t);
|
|
@@ -7052,30 +7052,30 @@ var Es = class {
|
|
|
7052
7052
|
const n = E.plan, o = E.planLength, s = E.demandStart;
|
|
7053
7053
|
for (let r = 0; r < o; r++) {
|
|
7054
7054
|
const o = n[r];
|
|
7055
|
-
o.markId = e, o.cycleId = t, o.inDegree = 0, o.state &= ~rr, null !== o.ext && (o.ext.cycleGroup = 0), Pn(o,
|
|
7055
|
+
o.markId = e, o.cycleId = t, o.inDegree = 0, o.state &= ~rr, null !== o.ext && (o.ext.cycleGroup = 0), Pn(o, hn(o)), i[r] = o;
|
|
7056
7056
|
}
|
|
7057
7057
|
return r.length = o, s < o && this._flagDemandAppendix(i, s, o), p.closureHits++, p.discoveryMs += Ds() - S, s === o;
|
|
7058
7058
|
}
|
|
7059
|
-
let I = 0, y = 0, v = 0, x = 0, C = 0, b = 0,
|
|
7059
|
+
let I = 0, y = 0, v = 0, x = 0, C = 0, b = 0, A = 0, R = 0;
|
|
7060
7060
|
for (let n = 0; n < l; n++) {
|
|
7061
7061
|
const r = s[n];
|
|
7062
7062
|
if (r.cycleId === t && r.markId === e) continue;
|
|
7063
7063
|
r.markId = e, r.cycleId = t, r.inDegree = 0, r.state &= ~rr;
|
|
7064
7064
|
const o = r.ext;
|
|
7065
|
-
null !== o && (o.cycleGroup = 0), (r.planEpoch !== _ || r.planId !== g || null !== o && 0 !== o.shownGroup) && (w = !1), Pn(r,
|
|
7065
|
+
null !== o && (o.cycleGroup = 0), (r.planEpoch !== _ || r.planId !== g || null !== o && 0 !== o.shownGroup) && (w = !1), Pn(r, hn(r)), nl[I++] = r, ol[R++] = r;
|
|
7066
7066
|
}
|
|
7067
7067
|
const k = (n) => {
|
|
7068
7068
|
if (n.cycleId === t && n.markId === e) return;
|
|
7069
7069
|
n.markId = e, n.cycleId = t, n.inDegree = 0, n.state &= ~rr;
|
|
7070
7070
|
const r = n.ext;
|
|
7071
|
-
null !== r && (r.cycleGroup = 0), (n.planEpoch !== _ || n.planId !== g || null !== r && 0 !== r.shownGroup) && (w = !1), Pn(n,
|
|
7071
|
+
null !== r && (r.cycleGroup = 0), (n.planEpoch !== _ || n.planId !== g || null !== r && 0 !== r.shownGroup) && (w = !1), Pn(n, hn(n)), nl[I++] = n, ol[R++] = n;
|
|
7072
7072
|
}, N = (n, r, o, s, l, i) => {
|
|
7073
7073
|
if (n.unanchored) return;
|
|
7074
7074
|
const a = n.ref;
|
|
7075
7075
|
r <= a.rowStart && o >= a.rowEnd && s <= a.colStart && l >= a.colEnd && n.isBlankAware(t) ? n.forEachTouchedNode(t, e, i) : n.mintNodesIn(r, o, s, l, i);
|
|
7076
7076
|
}, M = /* @__PURE__ */ new Map();
|
|
7077
|
-
for (;
|
|
7078
|
-
const t = ol[
|
|
7077
|
+
for (; A < R;) {
|
|
7078
|
+
const t = ol[A++], e = t.colIndex, n = t.rowIndex, r = t.gridId;
|
|
7079
7079
|
let o;
|
|
7080
7080
|
const s = "off" !== u && t.dependentsEpoch === f;
|
|
7081
7081
|
s && "on" === u ? (p.dependentsCacheHits++, o = t.dependents) : (Ls.colStart = e, Ls.rowStart = n, Ls.colEnd = e, Ls.rowEnd = n, Ls.scope = r, o = d.search(Ls), s ? (p.dependentsCacheHits++, Os(t.dependents, o) || (p.dependentsAssertFailures++, console.error("CalcExecutor: stale dependents cache at", r, n, e))) : (p.dependentsCacheMisses++, "off" !== u && (t.dependentsEpoch = f))), t.dependents = o;
|
|
@@ -7085,15 +7085,15 @@ var Es = class {
|
|
|
7085
7085
|
$s.colStart = s, $s.rowStart = o, $s.colEnd = i, $s.rowEnd = l, $s.scope = r;
|
|
7086
7086
|
const a = d.search($s), c = a.length;
|
|
7087
7087
|
if (c > 0) {
|
|
7088
|
-
const r =
|
|
7088
|
+
const r = Ze(t);
|
|
7089
7089
|
r.spillDependents = a, r.spillRowStart = o, r.spillColStart = s, r.spillRowEnd = l, r.spillColEnd = i, rl[y++] = t;
|
|
7090
|
-
for (let t = 0; t < c; t++)
|
|
7090
|
+
for (let t = 0; t < c; t++) Xe(a[t], n, e, o, s, l, i, k, N);
|
|
7091
7091
|
}
|
|
7092
7092
|
}
|
|
7093
7093
|
const i = o.length;
|
|
7094
7094
|
if (0 !== i) for (let t = 0; t < i; t++) {
|
|
7095
7095
|
const r = o[t];
|
|
7096
|
-
|
|
7096
|
+
dn(r, n, e, k, N, M);
|
|
7097
7097
|
}
|
|
7098
7098
|
}
|
|
7099
7099
|
const F = Ds();
|
|
@@ -7205,11 +7205,11 @@ var Es = class {
|
|
|
7205
7205
|
const D = (t) => {
|
|
7206
7206
|
p.planAssertFailures++, console.error("CalcExecutor: order-stamp fast path would invert a static edge at", t.gridId, t.rowIndex, t.colIndex), w = !1;
|
|
7207
7207
|
}, T = (n) => {
|
|
7208
|
-
n.cycleId === t && n.markId === e ? (bl++, w && n.orderIndex >= Cl.orderIndex && D(Cl)) : this._iterate || 0 === (n.state &
|
|
7208
|
+
n.cycleId === t && n.markId === e ? (bl++, w && n.orderIndex >= Cl.orderIndex && D(Cl)) : this._iterate || 0 === (n.state & Un) || (this._taintGroup = n.ext.shownGroup, this._taintDownstream(Cl));
|
|
7209
7209
|
};
|
|
7210
7210
|
let G = null;
|
|
7211
7211
|
const B = (n) => {
|
|
7212
|
-
n.cycleId === t && n.markId === e ? (Gl++, n.orderIndex > Bl && (Bl = n.orderIndex)) : null !== Vl || this._iterate || 0 === (n.state &
|
|
7212
|
+
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);
|
|
7213
7213
|
}, V = (t, e, n, r, o) => {
|
|
7214
7214
|
null === G && (G = /* @__PURE__ */ new Map());
|
|
7215
7215
|
let s = G.get(t);
|
|
@@ -7223,7 +7223,7 @@ var Es = class {
|
|
|
7223
7223
|
if (s.rowFrom === e && s.rowTo === n && s.colFrom === r && s.colTo === o) return s;
|
|
7224
7224
|
}
|
|
7225
7225
|
let i;
|
|
7226
|
-
return Gl = 0, Bl = -1, Vl = null, t.forEachNodeIn(e, n, r, o, B), l.length <
|
|
7226
|
+
return Gl = 0, Bl = -1, Vl = null, t.forEachNodeIn(e, n, r, o, B), l.length < Rl ? (i = {
|
|
7227
7227
|
rowFrom: e,
|
|
7228
7228
|
rowTo: n,
|
|
7229
7229
|
colFrom: r,
|
|
@@ -7231,10 +7231,10 @@ var Es = class {
|
|
|
7231
7231
|
count: 0,
|
|
7232
7232
|
maxOrder: -1,
|
|
7233
7233
|
shownGroup: null
|
|
7234
|
-
}, l.push(i)) : (i = l[s.next], s.next = (s.next + 1) %
|
|
7234
|
+
}, l.push(i)) : (i = l[s.next], s.next = (s.next + 1) % Rl, i.rowFrom = e, i.rowTo = n, i.colFrom = r, i.colTo = o), i.count = Gl, i.maxOrder = Bl, i.shownGroup = Vl, i;
|
|
7235
7235
|
};
|
|
7236
7236
|
for (let t = 0; t < I; t++) {
|
|
7237
|
-
const e = nl[t], n =
|
|
7237
|
+
const e = nl[t], n = en(e), r = n.length;
|
|
7238
7238
|
let o = 0;
|
|
7239
7239
|
for (let t = 0; t < r; t++) {
|
|
7240
7240
|
const r = n[t];
|
|
@@ -7259,7 +7259,7 @@ var Es = class {
|
|
|
7259
7259
|
const f = d.length;
|
|
7260
7260
|
for (let t = 0; t < f; t++) {
|
|
7261
7261
|
const n = d[t], r = n.colStart, c = n.rowStart, h = n.colEnd, u = n.rowEnd, _ = Math.max(r, s), f = Math.max(c, l), g = Math.min(h, i), p = Math.min(u, a);
|
|
7262
|
-
if ((p - f + 1) * (g - _ + 1) >=
|
|
7262
|
+
if ((p - f + 1) * (g - _ + 1) >= Al) {
|
|
7263
7263
|
const t = V(n.value, f, p, _, g);
|
|
7264
7264
|
o += t.count, w && t.maxOrder >= e.orderIndex && D(e), null !== t.shownGroup && (this._taintGroup = t.shownGroup, this._taintDownstream(e));
|
|
7265
7265
|
continue;
|
|
@@ -7278,7 +7278,7 @@ var Es = class {
|
|
|
7278
7278
|
const e = rl[t];
|
|
7279
7279
|
n = e;
|
|
7280
7280
|
const o = e.ext, s = o.spillDependents, l = s.length;
|
|
7281
|
-
for (let t = 0; t < l; t++)
|
|
7281
|
+
for (let t = 0; t < l; t++) Xe(s[t], e.rowIndex, e.colIndex, o.spillRowStart, o.spillColStart, o.spillRowEnd, o.spillColEnd, r);
|
|
7282
7282
|
}
|
|
7283
7283
|
for (let t = 0; t < I; t++) {
|
|
7284
7284
|
const e = nl[t];
|
|
@@ -7297,14 +7297,14 @@ var Es = class {
|
|
|
7297
7297
|
const e = t.colIndex, n = t.rowIndex, r = t.ext;
|
|
7298
7298
|
if (null !== r) {
|
|
7299
7299
|
const t = r.spillDependents, o = t.length;
|
|
7300
|
-
for (let s = 0; s < o; s++)
|
|
7300
|
+
for (let s = 0; s < o; s++) Xe(t[s], n, e, r.spillRowStart, r.spillColStart, r.spillRowEnd, r.spillColEnd, P);
|
|
7301
7301
|
}
|
|
7302
7302
|
let o;
|
|
7303
7303
|
o = t.dependents;
|
|
7304
7304
|
const s = o.length;
|
|
7305
7305
|
if (0 !== s) for (let t = 0; t < s; t++) {
|
|
7306
7306
|
const r = o[t];
|
|
7307
|
-
|
|
7307
|
+
ln(r, n, e, P);
|
|
7308
7308
|
}
|
|
7309
7309
|
}
|
|
7310
7310
|
if (p.kahnMs += Ds() - O, o || a < I) {
|
|
@@ -7322,7 +7322,7 @@ var Es = class {
|
|
|
7322
7322
|
t.length = 0, o && (a = 0);
|
|
7323
7323
|
for (let e = 0; e < I; e++) {
|
|
7324
7324
|
const n = nl[e];
|
|
7325
|
-
(o || n.inDegree > 0) && (n.state |= $n,
|
|
7325
|
+
(o || n.inDegree > 0) && (n.state |= $n, Ze(n).demandValue = void 0, t.push(n));
|
|
7326
7326
|
}
|
|
7327
7327
|
t.sort(Fs);
|
|
7328
7328
|
const e = t.length, n = a;
|
|
@@ -7348,7 +7348,7 @@ var Es = class {
|
|
|
7348
7348
|
r.length = 0;
|
|
7349
7349
|
for (let o = e; o < n; o++) {
|
|
7350
7350
|
const e = t[o];
|
|
7351
|
-
e.state |= $n,
|
|
7351
|
+
e.state |= $n, Ze(e).demandValue = void 0, r.push(e), this._addCircular(e);
|
|
7352
7352
|
}
|
|
7353
7353
|
}
|
|
7354
7354
|
_invalidatePlans() {
|
|
@@ -7382,12 +7382,12 @@ var Es = class {
|
|
|
7382
7382
|
const l = Ds(), i = this._container, a = this._context, c = i.getScope(), d = a.getRuntime(), h = i.getDeferred?.() ?? null, u = s.values, _ = s.length;
|
|
7383
7383
|
zl = this._passCycleId, Ll = this._passMarkId;
|
|
7384
7384
|
const f = el;
|
|
7385
|
-
let g, p, S, E, I, y,
|
|
7385
|
+
let g, p, S, E, I, y, v, C, b, A, R, k, N, M = 0;
|
|
7386
7386
|
const F = /* @__PURE__ */ new Map();
|
|
7387
7387
|
this._overlays = F;
|
|
7388
|
-
const
|
|
7389
|
-
|
|
7390
|
-
},
|
|
7388
|
+
const D = (t) => this._overlayFor(t), T = (t) => {
|
|
7389
|
+
R = i.getGrid(t), A = R.getEntireCoords.bind(R), p = e(t), S = p.gridId, N = D(t), E = p.values, k = p.errorSpatial, I = p.contentfulSpatial, y = p.spillSpatial, v = p.notifyValues, C = p.notifySpillsInsert, b = p.notifySpillsRemove, p.notifyFormats, p.notifyCalcStatus, c.gridId = S;
|
|
7390
|
+
}, G = w.Axis.Column, V = G === w.Axis.Column, O = () => {
|
|
7391
7391
|
if (M > 0) {
|
|
7392
7392
|
n(f, M), M = 0;
|
|
7393
7393
|
for (const t of F.values()) t.reset();
|
|
@@ -7410,13 +7410,13 @@ var Es = class {
|
|
|
7410
7410
|
}
|
|
7411
7411
|
if (P && n.block.hasDataTable()) continue;
|
|
7412
7412
|
const a = n.gridId;
|
|
7413
|
-
a !== S &&
|
|
7413
|
+
a !== S && T(a);
|
|
7414
7414
|
const _ = n.block, w = _.representative === n && _.isBlankAware(t), F = n.cachedValue;
|
|
7415
7415
|
let L, $, H = !1;
|
|
7416
7416
|
"object" == typeof F && null !== F && (F.isIRange ? L = F : m.isError(F, m.Code.Spill) && ($ = F, H = !0));
|
|
7417
7417
|
const j = 0 !== (n.state & $n);
|
|
7418
7418
|
j && (n.state & Kn) !== sr && (O(), this.doDemandEvaluate(t, e, this._demandBatch, O), c.gridId = a);
|
|
7419
|
-
const K = j ? null :
|
|
7419
|
+
const K = j ? null : en(n), q = n.inputsAt;
|
|
7420
7420
|
if (K && q >= 0) {
|
|
7421
7421
|
const t = On(), e = K.length;
|
|
7422
7422
|
for (let n = 0; n < e; n++) {
|
|
@@ -7427,167 +7427,167 @@ var Es = class {
|
|
|
7427
7427
|
}
|
|
7428
7428
|
const r = e.colStart, o = e.rowStart, s = e.colEnd, l = e.rowEnd;
|
|
7429
7429
|
if (l !== o || r !== s) {
|
|
7430
|
-
let a = e.scope, c = E, h =
|
|
7431
|
-
a && a !== S && (_ = i.getGrid(a), _ && (c = _.getValues(), u =
|
|
7430
|
+
let a = e.scope, c = E, h = A, u = N, _ = R;
|
|
7431
|
+
a && a !== S && (_ = i.getGrid(a), _ && (c = _.getValues(), u = D(a), h = _.getEntireCoords.bind(_)));
|
|
7432
7432
|
let f = _;
|
|
7433
7433
|
u.intersects(o, r, l, s) && (c = u, f = u);
|
|
7434
|
-
const g = new
|
|
7434
|
+
const g = new pt(d, c, { ...e }, null, h, i.resolveScope);
|
|
7435
7435
|
g._setErrorIndex(f), t[q + n] = g;
|
|
7436
7436
|
}
|
|
7437
7437
|
}
|
|
7438
7438
|
}
|
|
7439
|
-
K && null !== h && 0 !== h.getOpenCount() && 0 === (n.state &
|
|
7440
|
-
const U = V ? s : l,
|
|
7439
|
+
K && null !== h && 0 !== h.getOpenCount() && 0 === (n.state & Yn) && jl(K, S, i) && (n.state |= Yn);
|
|
7440
|
+
const U = V ? s : l, W = V ? l : s;
|
|
7441
7441
|
c.node = n, c.colIndex = s, c.rowIndex = l, c.drawIndex = 0;
|
|
7442
|
-
const
|
|
7443
|
-
let
|
|
7444
|
-
const
|
|
7445
|
-
let
|
|
7446
|
-
const
|
|
7447
|
-
if (j && !this._iterate && 0 !== (n.state & qn)) null !==
|
|
7442
|
+
const X = _.formula;
|
|
7443
|
+
let J, Q = null, Y = !1;
|
|
7444
|
+
const Z = 4 & n.state ? 0 !== (n.state & nr) ? se.CalcStatus.Working : se.CalcStatus.Waiting : 0;
|
|
7445
|
+
let tt = Z;
|
|
7446
|
+
const nt = r ? 0 : Z, rt = n.ext;
|
|
7447
|
+
if (j && !this._iterate && 0 !== (n.state & qn)) null !== rt && (rt.demandValue = void 0), J = Ys(n), tt = 0;
|
|
7448
7448
|
else {
|
|
7449
7449
|
if (j) {
|
|
7450
|
-
const t = null !==
|
|
7451
|
-
null !==
|
|
7450
|
+
const t = null !== rt ? rt.demandValue : void 0;
|
|
7451
|
+
null !== rt && (rt.demandValue = void 0), J = void 0 === t ? 0 : t;
|
|
7452
7452
|
} else {
|
|
7453
7453
|
if (n.state = n.state & ~Kn | or, c.perCellRead = !1, c.positionRead = !1, 0 !== (n.state & tr)) {
|
|
7454
7454
|
n.state &= ~tr;
|
|
7455
7455
|
const t = this._settlePass ? bs(E, y, l, s) : null;
|
|
7456
7456
|
if (null !== t && t.direct) {
|
|
7457
7457
|
Y = !0, n.state &= -2621441;
|
|
7458
|
-
const e =
|
|
7459
|
-
e?.isIRange ? (
|
|
7458
|
+
const e = At(t);
|
|
7459
|
+
e?.isIRange ? (J = X.finalizeValueForCell(e), Q = t) : J = t;
|
|
7460
7460
|
}
|
|
7461
7461
|
}
|
|
7462
7462
|
if (!Y) {
|
|
7463
7463
|
this._planStats.evaluated++, n.state &= -2621505;
|
|
7464
7464
|
const t = c.deferCount;
|
|
7465
|
-
|
|
7465
|
+
J = X.evaluateAt(l, s), J = X.finalizeValueForCell(J), (c.perCellRead || c.positionRead) && (n.block.positionRead = !0), c.deferCount !== t && (J = this._takeDeferred(n, J), Q = this._spillHolder, this._spillHolder = null);
|
|
7466
7466
|
}
|
|
7467
7467
|
}
|
|
7468
|
-
|
|
7468
|
+
tt = 0 !== (n.state & er) ? se.CalcStatus.Working : 0 !== (n.state & (Yn | Zn)) ? se.CalcStatus.Waiting : 0, 0 !== tt && (n.state |= Zn);
|
|
7469
7469
|
}
|
|
7470
|
-
let
|
|
7471
|
-
(n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768),
|
|
7472
|
-
const
|
|
7473
|
-
if (L || $ ||
|
|
7474
|
-
|
|
7475
|
-
const t = y.search(
|
|
7476
|
-
for (let e = 0; !
|
|
7470
|
+
let ot;
|
|
7471
|
+
(n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768), tt !== nt && (0 === tt ? n.state &= ~(4 | nr) : tt === se.CalcStatus.Working ? n.state |= 4 | nr : n.state = (4 | n.state) & ~nr, p.calcStatusConflating || (p.calcStatusConflating = B(V)), p.calcStatusConflating.append(U, W, 0 !== tt && tt)), j && N.takeDemand(l, s);
|
|
7472
|
+
const st = n.ext, lt = null !== st ? st.fixedRef : null;
|
|
7473
|
+
if (L || $ || lt) {
|
|
7474
|
+
Zs.colStart = s, Zs.rowStart = l, Zs.colEnd = s, Zs.rowEnd = l;
|
|
7475
|
+
const t = y.search(Zs);
|
|
7476
|
+
for (let e = 0; !ot && e < t.length; e++) {
|
|
7477
7477
|
const n = t[e];
|
|
7478
|
-
n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (
|
|
7478
|
+
n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (ot = n);
|
|
7479
7479
|
}
|
|
7480
|
-
if (
|
|
7480
|
+
if (ot && (y.remove(ot, Go), !ot || !ot.value.getError())) {
|
|
7481
7481
|
const t = {
|
|
7482
|
-
...o.sanitizeRange(
|
|
7483
|
-
scope:
|
|
7482
|
+
...o.sanitizeRange(ot),
|
|
7483
|
+
scope: ot.scope,
|
|
7484
7484
|
value: null
|
|
7485
7485
|
};
|
|
7486
|
-
I.insertNonOverlapping(t), E.delete(t),
|
|
7486
|
+
I.insertNonOverlapping(t), E.delete(t), Ht(k, t);
|
|
7487
7487
|
}
|
|
7488
7488
|
}
|
|
7489
|
-
|
|
7490
|
-
let
|
|
7491
|
-
const
|
|
7492
|
-
let
|
|
7493
|
-
if (
|
|
7494
|
-
|
|
7489
|
+
J = this._fitCell(_, J);
|
|
7490
|
+
let it = 1, at = 1;
|
|
7491
|
+
const ct = J, dt = "object" == typeof J && null !== J, ht = dt && ct.isIRange;
|
|
7492
|
+
let ut, _t = dt && m.isError(J, m.Code.Spill);
|
|
7493
|
+
if (lt) {
|
|
7494
|
+
it = lt.colEnd - lt.colStart + 1, at = lt.rowEnd - lt.rowStart + 1;
|
|
7495
7495
|
const e = {
|
|
7496
|
-
colStart:
|
|
7497
|
-
rowStart:
|
|
7498
|
-
colEnd:
|
|
7499
|
-
rowEnd:
|
|
7496
|
+
colStart: lt.colStart,
|
|
7497
|
+
rowStart: lt.rowStart,
|
|
7498
|
+
colEnd: lt.colEnd,
|
|
7499
|
+
rowEnd: lt.rowEnd,
|
|
7500
7500
|
scope: a
|
|
7501
|
-
}, r =
|
|
7502
|
-
E.delete(e), r && E.setValues(r),
|
|
7501
|
+
}, r = rn(J, e, V)?.tuples;
|
|
7502
|
+
E.delete(e), r && E.setValues(r), Ht(k, e), zt(k, r, V), ut = {
|
|
7503
7503
|
...e,
|
|
7504
|
-
value: new
|
|
7505
|
-
}, y.insert(
|
|
7504
|
+
value: new x(e, t, "fixed", null, Q)
|
|
7505
|
+
}, y.insert(ut), i.addDynamicPrecedent(n, e, -2), I.insertNonOverlapping({
|
|
7506
7506
|
...e,
|
|
7507
|
-
value: new
|
|
7507
|
+
value: new Ft(e, G)
|
|
7508
7508
|
});
|
|
7509
|
-
} else if (
|
|
7510
|
-
|
|
7509
|
+
} else if (ht && ct.size > 1) {
|
|
7510
|
+
it = ct.getColumnCount(), at = ct.getRowCount();
|
|
7511
7511
|
const e = vl(n), r = null !== e ? l - e.rows : l, c = null !== e ? s - e.columns : s, d = {
|
|
7512
7512
|
colStart: c,
|
|
7513
7513
|
rowStart: r,
|
|
7514
|
-
colEnd: c +
|
|
7515
|
-
rowEnd: r +
|
|
7514
|
+
colEnd: c + it - 1,
|
|
7515
|
+
rowEnd: r + at - 1,
|
|
7516
7516
|
scope: a
|
|
7517
|
-
}, h =
|
|
7518
|
-
if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)),
|
|
7517
|
+
}, h = A(), u = !o.isRangeWithinRange(d, h);
|
|
7518
|
+
if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)), _t = u, !_t) {
|
|
7519
7519
|
const t = I.search(d);
|
|
7520
|
-
if (
|
|
7520
|
+
if (_t = t.length > 1, !_t && 1 === t.length) {
|
|
7521
7521
|
const e = t[0], n = o.intersectRanges(d, e, Ps);
|
|
7522
|
-
!n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (
|
|
7522
|
+
!n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (_t = !0);
|
|
7523
7523
|
}
|
|
7524
7524
|
}
|
|
7525
7525
|
let _, f;
|
|
7526
|
-
if (
|
|
7526
|
+
if (_t) J = m.BuiltIn.Spill, it = 1, at = 1, _ = [[U, [[W, [J]]]]], E.setValues(_), zt(k, _, V), f = {
|
|
7527
7527
|
colStart: s,
|
|
7528
7528
|
rowStart: l,
|
|
7529
7529
|
colEnd: s,
|
|
7530
7530
|
rowEnd: l
|
|
7531
7531
|
};
|
|
7532
7532
|
else {
|
|
7533
|
-
const t =
|
|
7534
|
-
t && (_ = t.tuples), E.delete(d), _ && E.setValues(_),
|
|
7533
|
+
const t = on(ct, V ? c : r, V ? r : c);
|
|
7534
|
+
t && (_ = t.tuples), E.delete(d), _ && E.setValues(_), Ht(k, d), zt(k, _, V), f = d;
|
|
7535
7535
|
}
|
|
7536
|
-
const g =
|
|
7536
|
+
const g = _t ? {
|
|
7537
7537
|
colStart: s,
|
|
7538
7538
|
rowStart: l,
|
|
7539
7539
|
colEnd: s,
|
|
7540
7540
|
rowEnd: l,
|
|
7541
7541
|
scope: a
|
|
7542
7542
|
} : d;
|
|
7543
|
-
|
|
7543
|
+
ut = {
|
|
7544
7544
|
...g,
|
|
7545
|
-
value: new
|
|
7546
|
-
}, y.insert(
|
|
7545
|
+
value: new x(g, t, _t ? "error" : "dynamic", _t || null === e ? null : e, Q, _t ? d : null)
|
|
7546
|
+
}, y.insert(ut), i.addDynamicPrecedent(n, d, -2), I.insertNonOverlapping({
|
|
7547
7547
|
...f,
|
|
7548
|
-
value: new
|
|
7548
|
+
value: new Ft(f, G)
|
|
7549
7549
|
});
|
|
7550
7550
|
}
|
|
7551
|
-
!w || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n,
|
|
7552
|
-
let
|
|
7553
|
-
if ((
|
|
7554
|
-
const t =
|
|
7551
|
+
!w || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n, J, p, 0 !== tt || j || !0 === ht || _t || null !== lt || Y);
|
|
7552
|
+
let ft = !1;
|
|
7553
|
+
if ((ot || ut || _t || $) && (ft = o.isEqualRanges(ot, ut), ot && b.push(ot), ut && C.push(ut)), ut || ot) {
|
|
7554
|
+
const t = ot ?? ut, e = ut ?? ot, r = {
|
|
7555
7555
|
colStart: Math.min(s, t.colStart, e.colStart),
|
|
7556
7556
|
rowStart: Math.min(l, t.rowStart, e.rowStart),
|
|
7557
7557
|
colEnd: Math.max(s, t.colEnd, e.colEnd),
|
|
7558
7558
|
rowEnd: Math.max(l, t.rowEnd, e.rowEnd),
|
|
7559
7559
|
scope: a
|
|
7560
7560
|
};
|
|
7561
|
-
|
|
7561
|
+
v.insertNonOverlapping(r), ft && _t === H || (this._invalidatePlans(), i.getPrecedents().search(r).length > 0 && (n.state |= 1, g || (g = new et()), g.insertNonOverlapping(r)));
|
|
7562
7562
|
}
|
|
7563
|
-
n.cachedValue =
|
|
7564
|
-
const
|
|
7565
|
-
|
|
7563
|
+
n.cachedValue = J, f[M++] = n;
|
|
7564
|
+
const gt = null !== h && h.hasHolders() ? At(J) : J;
|
|
7565
|
+
ht || lt || N.push(l, s, gt), M >= (N.observed ? Rs : ks) && O(), (0 !== (n.state & qn) || null !== n.ext && 0 !== n.ext.shownGroup) && this._trackCircular(n, p, U, W, V);
|
|
7566
7566
|
const mt = n.dependents, St = mt.length;
|
|
7567
7567
|
if (St > 0) {
|
|
7568
7568
|
const t = !!(4 & n.state), e = !this._iterate && 0 !== (n.state & qn);
|
|
7569
7569
|
e && (this._taintGroup = n.ext.cycleGroup);
|
|
7570
7570
|
for (let n = 0; n < St; n++) {
|
|
7571
7571
|
const r = mt[n];
|
|
7572
|
-
e &&
|
|
7572
|
+
e && ln(r, l, s, this._taintDownstream);
|
|
7573
7573
|
const o = r.value.index;
|
|
7574
|
-
o < 0 || (
|
|
7574
|
+
o < 0 || (cn(r) && (Ol = o, Pl = gt, ln(r, l, s, $l)), t && ln(r, l, s, Hl));
|
|
7575
7575
|
}
|
|
7576
7576
|
}
|
|
7577
7577
|
}
|
|
7578
7578
|
} catch (n) {
|
|
7579
7579
|
const r = u[z];
|
|
7580
|
-
if (n instanceof
|
|
7580
|
+
if (n instanceof Ye || n instanceof Je && this._iterate) {
|
|
7581
7581
|
const o = Ks;
|
|
7582
|
-
if (o.length = 0, n instanceof
|
|
7582
|
+
if (o.length = 0, n instanceof Ye) for (let t = 0; t < n.count; t++) o.push(n.nodes[t]);
|
|
7583
7583
|
o.push(r), O(), r.state &= ~Kn, this.doDemandEvaluate(t, e, o, O);
|
|
7584
7584
|
} else {
|
|
7585
|
-
if (!(n instanceof
|
|
7585
|
+
if (!(n instanceof Je || n instanceof nn)) throw n;
|
|
7586
7586
|
{
|
|
7587
|
-
const t = n instanceof
|
|
7587
|
+
const t = n instanceof Je;
|
|
7588
7588
|
r.state = -3841 & r.state | $n | sr | (t ? lr : ir);
|
|
7589
|
-
const e =
|
|
7590
|
-
e.demandValue =
|
|
7589
|
+
const e = Ze(r);
|
|
7590
|
+
e.demandValue = Ys(r), e.cycleGroup = t ? ++this._cycleGroupNext : Qs(n.node), t && (e.cycleNext = r), this._addCircular(r);
|
|
7591
7591
|
}
|
|
7592
7592
|
}
|
|
7593
7593
|
c.gridId = r.gridId;
|
|
@@ -7602,7 +7602,7 @@ var Es = class {
|
|
|
7602
7602
|
Vn = 0;
|
|
7603
7603
|
})(), this._planStats.evaluateMs += Ds() - l, g;
|
|
7604
7604
|
}
|
|
7605
|
-
}, Is = (t, e) => new
|
|
7605
|
+
}, Is = (t, e) => new V.ArrayList(t.slice(0, e));
|
|
7606
7606
|
function ys(t, e, n, r, o, s) {
|
|
7607
7607
|
const l = e.rowStart + n, i = e.rowStart + r, a = e.colStart + o, c = e.colStart + s;
|
|
7608
7608
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -7612,10 +7612,10 @@ function ys(t, e, n, r, o, s) {
|
|
|
7612
7612
|
return !1;
|
|
7613
7613
|
}
|
|
7614
7614
|
function vs(t, e, n) {
|
|
7615
|
-
const r = e.values, o = e.errorSpatial, s = qs, l =
|
|
7615
|
+
const r = e.values, o = e.errorSpatial, s = qs, l = Us;
|
|
7616
7616
|
for (let i = 0; i < t.length; i++) {
|
|
7617
7617
|
const a = t[i];
|
|
7618
|
-
r.delete(a),
|
|
7618
|
+
r.delete(a), Ht(o, a);
|
|
7619
7619
|
const c = {
|
|
7620
7620
|
colStart: a.colStart,
|
|
7621
7621
|
rowStart: a.rowStart,
|
|
@@ -7644,8 +7644,8 @@ function Cs(t, e, n) {
|
|
|
7644
7644
|
}
|
|
7645
7645
|
var bs = (t, e, n, r) => {
|
|
7646
7646
|
const o = t.getValueAt(n, r);
|
|
7647
|
-
return
|
|
7648
|
-
},
|
|
7647
|
+
return Rt(o) ? o : Me(e, n, r);
|
|
7648
|
+
}, As = Symbol("unsetGridId"), Rs = 1024, ks = 65536;
|
|
7649
7649
|
function Ns(t, e) {
|
|
7650
7650
|
return t.scope !== e.scope ? null === t.scope ? -1 : null === e.scope ? 1 : t.scope.localeCompare(e.scope) : t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex;
|
|
7651
7651
|
}
|
|
@@ -7711,21 +7711,21 @@ var Ps = {
|
|
|
7711
7711
|
rowEnd: 0,
|
|
7712
7712
|
colEnd: 0,
|
|
7713
7713
|
scope: null
|
|
7714
|
-
}, Ks = [null], qs = [],
|
|
7714
|
+
}, Ks = [null], qs = [], Us = [], Ws = [], Xs = [], Js = {
|
|
7715
7715
|
rowStart: 0,
|
|
7716
7716
|
colStart: 0,
|
|
7717
7717
|
rowEnd: 0,
|
|
7718
7718
|
colEnd: 0,
|
|
7719
7719
|
scope: null
|
|
7720
|
-
},
|
|
7720
|
+
}, Qs = (t) => {
|
|
7721
7721
|
const e = t.ext;
|
|
7722
7722
|
return null === e ? 0 : 0 !== (t.state & qn) ? e.cycleGroup : e.shownGroup;
|
|
7723
|
-
},
|
|
7723
|
+
}, Ys = (t) => At(t.cachedValue) ?? 0, Zs = {
|
|
7724
7724
|
rowStart: 0,
|
|
7725
7725
|
colStart: 0,
|
|
7726
7726
|
rowEnd: 0,
|
|
7727
7727
|
colEnd: 0
|
|
7728
|
-
}, tl = 1e4, el =
|
|
7728
|
+
}, tl = 1e4, el = st(tl), nl = st(tl), rl = st(tl), ol = st(tl), sl = st(tl), ll = st(tl), il = st(tl), al = st(tl), cl = st(tl), dl = st(tl), hl = st(tl), ul = st(tl), _l = st(tl), fl = st(tl), gl = st(tl), pl = st(tl), ml = [null], Sl = [], wl = -1, El = -1, Il = -1, yl = -1;
|
|
7729
7729
|
function vl(t) {
|
|
7730
7730
|
const e = t.block.formula;
|
|
7731
7731
|
return null !== e && void 0 !== e.getSpillOrigin ? e.getSpillOrigin() : null;
|
|
@@ -7738,7 +7738,7 @@ function xl(t) {
|
|
|
7738
7738
|
const o = vl(t);
|
|
7739
7739
|
return Il = null !== o ? t.rowIndex - o.rows : t.rowIndex, yl = null !== o ? t.colIndex - o.columns : t.colIndex, wl = Il + r.getRowCount() - 1, El = yl + r.getColumnCount() - 1, wl > Il || El > yl;
|
|
7740
7740
|
}
|
|
7741
|
-
var Cl = null, bl = 0,
|
|
7741
|
+
var Cl = null, bl = 0, Al = 64, Rl = 4, kl = 1024, Nl = 7, Ml = st(8), Fl = st(8), Dl = st(8), Tl = Array.from({ length: 8 }, () => ({
|
|
7742
7742
|
colStart: 0,
|
|
7743
7743
|
colEnd: 0,
|
|
7744
7744
|
rowStart: 0,
|
|
@@ -7749,7 +7749,7 @@ var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = A(8), Fl = A(8),
|
|
|
7749
7749
|
r < 0 || (Bn[r + e] = n);
|
|
7750
7750
|
})(t, Ol, Pl);
|
|
7751
7751
|
}, Hl = (t) => {
|
|
7752
|
-
t.state |=
|
|
7752
|
+
t.state |= Yn;
|
|
7753
7753
|
}, jl = (t, e, n) => {
|
|
7754
7754
|
for (let r = 0; r < t.length; r++) {
|
|
7755
7755
|
const o = t[r];
|
|
@@ -7770,12 +7770,12 @@ function Kl(t, e) {
|
|
|
7770
7770
|
return n === r ? 0 : 1 / 0;
|
|
7771
7771
|
}
|
|
7772
7772
|
var ql = {
|
|
7773
|
-
values:
|
|
7773
|
+
values: st(tl),
|
|
7774
7774
|
length: 0
|
|
7775
|
-
},
|
|
7776
|
-
values:
|
|
7775
|
+
}, Ul = {
|
|
7776
|
+
values: st(tl),
|
|
7777
7777
|
length: 0
|
|
7778
|
-
},
|
|
7778
|
+
}, Wl = class {
|
|
7779
7779
|
constructor(t) {
|
|
7780
7780
|
this._namesByKey = /* @__PURE__ */ new Map(), this._namesById = /* @__PURE__ */ new Map(), this._hostsById = /* @__PURE__ */ new Map(), this._loadedData = /* @__PURE__ */ new Map(), this._options = t;
|
|
7781
7781
|
}
|
|
@@ -7784,14 +7784,14 @@ var ql = {
|
|
|
7784
7784
|
for (let e = 0; e < a.length; e++) {
|
|
7785
7785
|
const c = a[e], d = c.getId(), h = c.getSheetNames();
|
|
7786
7786
|
for (let t = 0; t < h.length; t++) {
|
|
7787
|
-
const e =
|
|
7787
|
+
const e = ht(d, t);
|
|
7788
7788
|
s.add(e), o && (n(e) ? this._loadedData.get(e) !== (c.getSheetData(t)?.data ?? null) && (r(e), this._registerSheet(c, t, e), i.add(d)) : (this._registerSheet(c, t, e), i.add(d)));
|
|
7789
7789
|
}
|
|
7790
7790
|
const u = c.getDefinedNames();
|
|
7791
7791
|
for (let e = 0; e < u.length; e++) {
|
|
7792
7792
|
const n = u[e];
|
|
7793
7793
|
if (!n.name) continue;
|
|
7794
|
-
const r = n.sheetIndex, o =
|
|
7794
|
+
const r = n.sheetIndex, o = ht(d, void 0 !== r && r >= 0 && r < h.length ? r : -1), s = Xl(o, n.name);
|
|
7795
7795
|
l.add(s);
|
|
7796
7796
|
const a = this._namesByKey.get(s);
|
|
7797
7797
|
if (a) {
|
|
@@ -7803,12 +7803,12 @@ var ql = {
|
|
|
7803
7803
|
} else this._registerName(c, o, n, t), i.add(d);
|
|
7804
7804
|
}
|
|
7805
7805
|
}
|
|
7806
|
-
for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(
|
|
7806
|
+
for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(de(t).bookId));
|
|
7807
7807
|
for (const [t, e] of this._namesByKey) {
|
|
7808
7808
|
if (l.has(t)) continue;
|
|
7809
7809
|
this._namesByKey.delete(t), this._namesById.delete(e.getId());
|
|
7810
7810
|
const n = this._hostsById.get(e.getId());
|
|
7811
|
-
this._hostsById.delete(e.getId()), n?.setPlaceholder(m.BuiltIn.Name.toString()), i.add(
|
|
7811
|
+
this._hostsById.delete(e.getId()), n?.setPlaceholder(m.BuiltIn.Name.toString()), i.add(de(e.getScope()).bookId);
|
|
7812
7812
|
}
|
|
7813
7813
|
return i;
|
|
7814
7814
|
}
|
|
@@ -7821,7 +7821,7 @@ var ql = {
|
|
|
7821
7821
|
_registeredSheetGrids() {
|
|
7822
7822
|
const t = [];
|
|
7823
7823
|
for (const e of this._options.gridIds()) {
|
|
7824
|
-
const n =
|
|
7824
|
+
const n = de(e);
|
|
7825
7825
|
n && n.sheetIndex >= 0 && t.push(e);
|
|
7826
7826
|
}
|
|
7827
7827
|
return t;
|
|
@@ -7837,7 +7837,7 @@ var ql = {
|
|
|
7837
7837
|
for (let t = 0; t < o.length; t++) {
|
|
7838
7838
|
const [n, s] = o[t], l = s.length;
|
|
7839
7839
|
for (let t = 0; t < l; t++) {
|
|
7840
|
-
const o =
|
|
7840
|
+
const o = $t.fromJSONValue(s.at(t));
|
|
7841
7841
|
null != o && e.push({
|
|
7842
7842
|
col: n + t,
|
|
7843
7843
|
row: r,
|
|
@@ -7848,7 +7848,7 @@ var ql = {
|
|
|
7848
7848
|
}
|
|
7849
7849
|
if (0 === e.length) return null;
|
|
7850
7850
|
e.sort((t, e) => t.col - e.col || t.row - e.row);
|
|
7851
|
-
const n = new
|
|
7851
|
+
const n = new L.Builder();
|
|
7852
7852
|
for (let t = 0; t < e.length; t++) n.pushAt(e[t].col, e[t].row, e[t].value);
|
|
7853
7853
|
return n.build()?.tuples ?? null;
|
|
7854
7854
|
}(o);
|
|
@@ -7869,12 +7869,12 @@ var ql = {
|
|
|
7869
7869
|
const { queue: l, recompileNamed: i } = this._options;
|
|
7870
7870
|
let a = o.trim();
|
|
7871
7871
|
a.startsWith("=") && (a = a.substring(1)), a || (a = m.BuiltIn.Ref.toString());
|
|
7872
|
-
const c =
|
|
7872
|
+
const c = de(r), d = c.sheetIndex >= 0 ? c.sheetIndex : n.getSheetNames().length > 0 ? 0 : -1, h = ht(c.bookId, d);
|
|
7873
7873
|
l(async () => {
|
|
7874
7874
|
this._hostsById.get(t) === e && e.setBody({
|
|
7875
7875
|
coords: Jl,
|
|
7876
7876
|
expression: a,
|
|
7877
|
-
authoredAt:
|
|
7877
|
+
authoredAt: Ql,
|
|
7878
7878
|
scopeGridId: h
|
|
7879
7879
|
}) && (s || i(t));
|
|
7880
7880
|
});
|
|
@@ -7884,10 +7884,10 @@ var ql = {
|
|
|
7884
7884
|
rowStart: 0,
|
|
7885
7885
|
colEnd: 0,
|
|
7886
7886
|
rowEnd: 0
|
|
7887
|
-
}),
|
|
7887
|
+
}), Ql = Object.freeze({
|
|
7888
7888
|
rowIndex: 0,
|
|
7889
7889
|
colIndex: 0
|
|
7890
|
-
}),
|
|
7890
|
+
}), Yl = class extends a {
|
|
7891
7891
|
constructor(t) {
|
|
7892
7892
|
super({ transactions: new i({ maxCommits: ri }) }), this._cellFreeContext = null, this._calcScope = {
|
|
7893
7893
|
rowIndex: 0,
|
|
@@ -7905,7 +7905,7 @@ var ql = {
|
|
|
7905
7905
|
deferOrdinal: 0,
|
|
7906
7906
|
deferRoot: !1,
|
|
7907
7907
|
deferServed: null
|
|
7908
|
-
}, this._cycleId = 0, this._staticEpoch = 1, this._precedentEpoch = 1, this._epochSeenFormulas = null, this._epochSeenPrecedents = null, this._epochSeenDynamics = null, this._volatiles = /* @__PURE__ */ new Set(), this._calculatedCommitId = null, this._calculatedEngineId = null, this._holdsGrids = !1, this._engineIds = /* @__PURE__ */ new Map(), this._landingOf = /* @__PURE__ */ new Map(), this._mirroredId = null, this._lastRevert = null, this._symbolIndex = null, this._symbolIndexOf = null, this._sheetsDerived = null, this._tablesDerived = null, this._namesDerived = null, this._collecting = null, this._recompileNamedPending = null, this._recompileLoadedPending = null, this._invalidateNamedPending = null, this.resolveScope = (t) => this._symbols.resolve(
|
|
7908
|
+
}, this._cycleId = 0, this._staticEpoch = 1, this._precedentEpoch = 1, this._epochSeenFormulas = null, this._epochSeenPrecedents = null, this._epochSeenDynamics = null, this._volatiles = /* @__PURE__ */ new Set(), this._calculatedCommitId = null, this._calculatedEngineId = null, this._holdsGrids = !1, this._engineIds = /* @__PURE__ */ new Map(), this._landingOf = /* @__PURE__ */ new Map(), this._mirroredId = null, this._lastRevert = null, this._symbolIndex = null, this._symbolIndexOf = null, this._sheetsDerived = null, this._tablesDerived = null, this._namesDerived = null, this._collecting = null, this._recompileNamedPending = null, this._recompileLoadedPending = null, this._invalidateNamedPending = null, this.resolveScope = (t) => this._symbols.resolve(ue.Sheet, t)?.toString(), this._heldCloneKey = null, this._callbacks = t.callbacks, this._runtime = t.runtime, this._richData = t.richData ?? v.DetachedContext, this._symbols = t.symbols, this._resolvers = t.resolvers, this._getSheetIndex = t.getSheetIndex ?? null, this._legacyIntersect = !0 === t.legacyIntersect, this._gridOptions = t.gridOptions ?? {}, this._calculation = t.calculation;
|
|
7909
7909
|
const e = t.replica;
|
|
7910
7910
|
this._updateState({
|
|
7911
7911
|
gridsAll: /* @__PURE__ */ new Map(),
|
|
@@ -7924,8 +7924,8 @@ var ql = {
|
|
|
7924
7924
|
} }),
|
|
7925
7925
|
dynamicByBlock: /* @__PURE__ */ new Map(),
|
|
7926
7926
|
dirtySpatial: new wn()
|
|
7927
|
-
}), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, w.Axis.Column, t.functions), this._deferred = new
|
|
7928
|
-
createRichData: (t, e) =>
|
|
7927
|
+
}), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, w.Axis.Column, t.functions), this._deferred = new Qo(this._calcScope, (t, e, n) => this._holderAt(t, e, n), () => this._runtime.getRandom(), () => this._settle(), void 0, (t, e) => this._normalizeResult(t, e), {
|
|
7928
|
+
createRichData: (t, e) => P.fromJSON({
|
|
7929
7929
|
type: t,
|
|
7930
7930
|
data: e
|
|
7931
7931
|
}, this._richData),
|
|
@@ -7935,7 +7935,7 @@ var ql = {
|
|
|
7935
7935
|
parseText: t.parseText
|
|
7936
7936
|
}, () => this._callbacks.onPendingChange());
|
|
7937
7937
|
const n = this._callbacks;
|
|
7938
|
-
this._calcExecutor = new Es(this, this._context), t.planCacheMode && (this._calcExecutor.planCacheMode = t.planCacheMode), this._externalBindings = new
|
|
7938
|
+
this._calcExecutor = new Es(this, this._context), t.planCacheMode && (this._calcExecutor.planCacheMode = t.planCacheMode), this._externalBindings = new Wl({
|
|
7939
7939
|
books: t.books,
|
|
7940
7940
|
createGrid: (t) => this.createBackendGrid({ uuid: t }),
|
|
7941
7941
|
unregisterGrid: (t) => {
|
|
@@ -8013,7 +8013,7 @@ var ql = {
|
|
|
8013
8013
|
const r = this.getGrid(t);
|
|
8014
8014
|
if (!r) return null;
|
|
8015
8015
|
const o = r.getValues().getValueAt(e, n);
|
|
8016
|
-
return
|
|
8016
|
+
return Rt(o) ? o : Me(r.getSpills(), e, n);
|
|
8017
8017
|
}
|
|
8018
8018
|
_settleNow() {
|
|
8019
8019
|
const t = this._deferred, e = t.takeMoved();
|
|
@@ -8033,7 +8033,7 @@ var ql = {
|
|
|
8033
8033
|
if (null === _ || !o.isLiveNode(_)) continue;
|
|
8034
8034
|
const f = _.gridId, g = n.gridsAll.get(f);
|
|
8035
8035
|
if (!g) continue;
|
|
8036
|
-
const p = _.rowIndex, S = _.colIndex, w = g.getValues().getValueAt(p, S), E =
|
|
8036
|
+
const p = _.rowIndex, S = _.colIndex, w = g.getValues().getValueAt(p, S), E = Rt(w), I = E ? w : Me(g.getSpills(), p, S);
|
|
8037
8037
|
if (null === I || I.calls.indexOf(u) < 0) continue;
|
|
8038
8038
|
if (!I.direct) {
|
|
8039
8039
|
c.add(_), i(s, f).add(p, S);
|
|
@@ -8059,8 +8059,8 @@ var ql = {
|
|
|
8059
8059
|
}, n = y.errors.get(t);
|
|
8060
8060
|
n ? n.push(e) : y.errors.set(t, [e]);
|
|
8061
8061
|
}
|
|
8062
|
-
_.state &= -6815749,
|
|
8063
|
-
const x = r.search(
|
|
8062
|
+
_.state &= -6815749, Zl.colStart = S, Zl.colEnd = S, Zl.rowStart = p, Zl.rowEnd = p, Zl.scope = f;
|
|
8063
|
+
const x = r.search(Zl);
|
|
8064
8064
|
for (let t = 0; t < x.length; t++) {
|
|
8065
8065
|
const e = x[t], n = e.value;
|
|
8066
8066
|
if (n.index < 0) {
|
|
@@ -8071,7 +8071,7 @@ var ql = {
|
|
|
8071
8071
|
});
|
|
8072
8072
|
continue;
|
|
8073
8073
|
}
|
|
8074
|
-
|
|
8074
|
+
ln(e, p, S, h);
|
|
8075
8075
|
}
|
|
8076
8076
|
}
|
|
8077
8077
|
for (const [e, n] of a) {
|
|
@@ -8086,7 +8086,7 @@ var ql = {
|
|
|
8086
8086
|
}), s[t] = {
|
|
8087
8087
|
...e,
|
|
8088
8088
|
value: !1
|
|
8089
|
-
},
|
|
8089
|
+
}, Ht(r.errorSpatial, e);
|
|
8090
8090
|
}
|
|
8091
8091
|
r.notifyCalcStatus.load(s);
|
|
8092
8092
|
for (const [t, e] of n.errors) r.errorSpatial.load(ni(e).map((e) => ({
|
|
@@ -8112,8 +8112,8 @@ var ql = {
|
|
|
8112
8112
|
createFormulaBlock(t, e, n, r, o, s, l) {
|
|
8113
8113
|
const i = this._callbacks.getCompiler(s);
|
|
8114
8114
|
if (!i) throw new Error("The calculation engine has not started; nothing can compile yet.");
|
|
8115
|
-
const a =
|
|
8116
|
-
return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ?
|
|
8115
|
+
const a = de(t)?.bookId ?? null, c = a ? null : de(this._externalBindings.getNameById(t)?.getScope() ?? "")?.bookId ?? null;
|
|
8116
|
+
return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ? ht(a ?? c, -1) : this.getSheetName(t), l, a ? { book: a } : void 0), e, this._calcScope, t, () => this.getGrid(t)?.getEntireCoords() ?? null, this._resolvers);
|
|
8117
8117
|
}
|
|
8118
8118
|
getSymbols() {
|
|
8119
8119
|
return this._symbols;
|
|
@@ -8130,15 +8130,15 @@ var ql = {
|
|
|
8130
8130
|
return this._sheetsCache().ids;
|
|
8131
8131
|
}
|
|
8132
8132
|
getSheetSpanIds(t) {
|
|
8133
|
-
const e =
|
|
8133
|
+
const e = ke(t);
|
|
8134
8134
|
if (e) {
|
|
8135
8135
|
const t = this.getSheetIds(), n = t.indexOf(e[0]), r = t.indexOf(e[1]);
|
|
8136
8136
|
return -1 === n || -1 === r ? null : t.slice(Math.min(n, r), Math.max(n, r) + 1);
|
|
8137
8137
|
}
|
|
8138
|
-
const n =
|
|
8138
|
+
const n = de(t);
|
|
8139
8139
|
if (!n || n.sheetEnd === n.sheetIndex) return null;
|
|
8140
8140
|
const r = [];
|
|
8141
|
-
for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(
|
|
8141
|
+
for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(ht(n.bookId, t));
|
|
8142
8142
|
return r;
|
|
8143
8143
|
}
|
|
8144
8144
|
getFormulas() {
|
|
@@ -8247,7 +8247,7 @@ var ql = {
|
|
|
8247
8247
|
}
|
|
8248
8248
|
markDirty(t) {
|
|
8249
8249
|
const e = this._getState(), n = e.dirtySpatial.clone(this._heldCloneKey), r = e.precedentSpatial, o = e.formulaSpatial;
|
|
8250
|
-
let s = !1, l =
|
|
8250
|
+
let s = !1, l = nt(t, w.Axis.Column, 2);
|
|
8251
8251
|
for (let t = 0; t < l.length; t++) {
|
|
8252
8252
|
const e = l[t];
|
|
8253
8253
|
(r?.has(e) || o?.has(e)) && (s = !0, n.insertNonOverlapping(e));
|
|
@@ -8449,7 +8449,7 @@ var ql = {
|
|
|
8449
8449
|
}), e;
|
|
8450
8450
|
}
|
|
8451
8451
|
createEngineGrid(t) {
|
|
8452
|
-
const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ??
|
|
8452
|
+
const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ?? A : r ? () => r : void 0, s = this._callbacks;
|
|
8453
8453
|
return this.createBackendGrid({
|
|
8454
8454
|
uuid: e,
|
|
8455
8455
|
shadowOf: t.shadowOf,
|
|
@@ -8497,15 +8497,15 @@ var ql = {
|
|
|
8497
8497
|
switch (n.type) {
|
|
8498
8498
|
case "sheets": return this.applySheets(n.sheets), {
|
|
8499
8499
|
cycleId: this._cycleId,
|
|
8500
|
-
commitId:
|
|
8500
|
+
commitId: T(n)
|
|
8501
8501
|
};
|
|
8502
8502
|
case "tables": return this.applyTables(n.changes), {
|
|
8503
8503
|
cycleId: this._cycleId,
|
|
8504
|
-
commitId:
|
|
8504
|
+
commitId: T(n)
|
|
8505
8505
|
};
|
|
8506
8506
|
case "names": return this.applyNames(n.changes), {
|
|
8507
8507
|
cycleId: this._cycleId,
|
|
8508
|
-
commitId:
|
|
8508
|
+
commitId: T(n)
|
|
8509
8509
|
};
|
|
8510
8510
|
case "nameGraph": return {
|
|
8511
8511
|
cycleId: this._cycleId,
|
|
@@ -8518,7 +8518,7 @@ var ql = {
|
|
|
8518
8518
|
const o = this.getGrid(t);
|
|
8519
8519
|
return o ? r ? o._apply(n, this.getCurrentCommitId(), !0) : o._apply(n, e) : {
|
|
8520
8520
|
cycleId: this._cycleId,
|
|
8521
|
-
commitId:
|
|
8521
|
+
commitId: T(n)
|
|
8522
8522
|
};
|
|
8523
8523
|
}
|
|
8524
8524
|
applyHeld(t, e) {
|
|
@@ -8583,7 +8583,7 @@ var ql = {
|
|
|
8583
8583
|
return l;
|
|
8584
8584
|
}
|
|
8585
8585
|
followRestore(t, e) {
|
|
8586
|
-
return e ===
|
|
8586
|
+
return e === dt.Status.Off || e === dt.Status.Error ? (this.retarget(t), !1) : e !== dt.Status.Running ? (null !== this.restoreTo(t) || this.holdsModelCommit(t) || this.retarget(t), !1) : this.holdsModelCommit(t) ? (this.restoreTo(t), !1) : (this.retarget(t), !0);
|
|
8587
8587
|
}
|
|
8588
8588
|
rebuild(t) {
|
|
8589
8589
|
this.drop(), this.setReplica(t), this.open();
|
|
@@ -8615,13 +8615,13 @@ var ql = {
|
|
|
8615
8615
|
if (u.deferCount !== l) {
|
|
8616
8616
|
const t = this._deferred, e = t.endEvaluation();
|
|
8617
8617
|
o.cachedValue = e.calls.length > 0 ? t.newHolder(a, e) : void 0, t.flush();
|
|
8618
|
-
} else
|
|
8619
|
-
let c =
|
|
8618
|
+
} else Rt(o.cachedValue) && (o.cachedValue = void 0);
|
|
8619
|
+
let c = tn(t.finalizeValue(a));
|
|
8620
8620
|
return null === c && (c = 0), !r || c?.isIRange || Array.isArray(c) ? c : i.createRange(1, 1, c);
|
|
8621
8621
|
},
|
|
8622
8622
|
getCalls: () => {
|
|
8623
8623
|
const t = f.getAnchorNode().cachedValue;
|
|
8624
|
-
return
|
|
8624
|
+
return Rt(t) ? t.calls : r.EmptyArray;
|
|
8625
8625
|
}
|
|
8626
8626
|
};
|
|
8627
8627
|
}
|
|
@@ -8638,7 +8638,7 @@ var ql = {
|
|
|
8638
8638
|
for (let t = 0; t < n.length; t++) {
|
|
8639
8639
|
const r = n[t].value;
|
|
8640
8640
|
if (null == r.gridId) continue;
|
|
8641
|
-
if (
|
|
8641
|
+
if (it(r.gridId) || this._externalBindings.getNameById(r.gridId)) continue;
|
|
8642
8642
|
const o = r.getReferencedSymbolIds();
|
|
8643
8643
|
if (0 === o.length) continue;
|
|
8644
8644
|
const s = r.ref, l = {
|
|
@@ -8701,10 +8701,10 @@ var ql = {
|
|
|
8701
8701
|
e ? e.push(l[t]) : s.set(u, [l[t]]);
|
|
8702
8702
|
continue;
|
|
8703
8703
|
}
|
|
8704
|
-
const _ = null != u && !n.isDefinedName(u) && !
|
|
8704
|
+
const _ = null != u && !n.isDefinedName(u) && !it(u) && !this._externalBindings.getNameById(u);
|
|
8705
8705
|
if (h && _) for (let t = 0; t < o.length; t++) {
|
|
8706
8706
|
const [e, n] = o[t];
|
|
8707
|
-
a.includes(e) && (h = h.replaceTableReferences(e, (t) =>
|
|
8707
|
+
a.includes(e) && (h = h.replaceTableReferences(e, (t) => jt(t, n) ? ee() : null));
|
|
8708
8708
|
}
|
|
8709
8709
|
const f = h && h !== i.formula ? h.getTextAt(d.rowStart, d.colStart) : i.getTextAt(d.rowStart, d.colStart);
|
|
8710
8710
|
this._writeBlockText(i, f);
|
|
@@ -8712,7 +8712,7 @@ var ql = {
|
|
|
8712
8712
|
if (s) for (const [t, e] of s) this.getGrid(t)?._rederivePrecedentsNow(e);
|
|
8713
8713
|
}
|
|
8714
8714
|
refitTableRows(t, e, n, r, s) {
|
|
8715
|
-
const l = this._symbols.bind(
|
|
8715
|
+
const l = this._symbols.bind(ue.Sheet, t);
|
|
8716
8716
|
if (!l) return;
|
|
8717
8717
|
const i = this._getState().precedentSpatial.search({
|
|
8718
8718
|
colStart: e.colStart,
|
|
@@ -8726,7 +8726,7 @@ var ql = {
|
|
|
8726
8726
|
const e = i[t].value;
|
|
8727
8727
|
if (e.index < 0) continue;
|
|
8728
8728
|
const n = e.formulaEntry.value, r = n.gridId;
|
|
8729
|
-
if (null == r ||
|
|
8729
|
+
if (null == r || it(r) || this._externalBindings.getNameById(r)) continue;
|
|
8730
8730
|
const o = (a ??= /* @__PURE__ */ new Map()).get(n);
|
|
8731
8731
|
o ? o.includes(e.index) || o.push(e.index) : a.set(n, [e.index]);
|
|
8732
8732
|
}
|
|
@@ -8792,11 +8792,11 @@ var ql = {
|
|
|
8792
8792
|
}
|
|
8793
8793
|
}
|
|
8794
8794
|
rewriteTableReferences(t, e) {
|
|
8795
|
-
const n = (t) => e ?
|
|
8795
|
+
const n = (t) => e ? Ne(t, e) : ee(), r = this._callbacks, o = this._getState().formulaSpatial.all3D();
|
|
8796
8796
|
for (let e = 0; e < o.length; e++) {
|
|
8797
8797
|
const s = o[e].value, l = s.gridId;
|
|
8798
8798
|
if (null == l || !s.getReferencedSymbolIds().includes(t)) continue;
|
|
8799
|
-
if (r.isDefinedName(l) ||
|
|
8799
|
+
if (r.isDefinedName(l) || it(l) || this._externalBindings.getNameById(l)) continue;
|
|
8800
8800
|
const i = s.formula, a = i?.replaceTableReferences(t, n);
|
|
8801
8801
|
if (!a || a === i) continue;
|
|
8802
8802
|
const c = s.ref;
|
|
@@ -9169,7 +9169,7 @@ var ql = {
|
|
|
9169
9169
|
toString() {
|
|
9170
9170
|
return "CalcBackend";
|
|
9171
9171
|
}
|
|
9172
|
-
},
|
|
9172
|
+
}, Zl = {
|
|
9173
9173
|
colStart: 0,
|
|
9174
9174
|
rowStart: 0,
|
|
9175
9175
|
colEnd: 0,
|
|
@@ -9177,7 +9177,7 @@ var ql = {
|
|
|
9177
9177
|
scope: void 0
|
|
9178
9178
|
}, ti = class {
|
|
9179
9179
|
constructor(t) {
|
|
9180
|
-
this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating =
|
|
9180
|
+
this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating = B(t);
|
|
9181
9181
|
}
|
|
9182
9182
|
add(t, e) {
|
|
9183
9183
|
const n = this._unordered;
|
|
@@ -9206,7 +9206,7 @@ var ql = {
|
|
|
9206
9206
|
colEnd: t.colEnd,
|
|
9207
9207
|
rowEnd: t.rowEnd
|
|
9208
9208
|
}), ni = (t) => {
|
|
9209
|
-
const e =
|
|
9209
|
+
const e = nt(t, w.Axis.Column, 2), n = new Array(e.length);
|
|
9210
9210
|
for (let t = 0; t < e.length; t++) {
|
|
9211
9211
|
const r = e[t];
|
|
9212
9212
|
n[t] = {
|
|
@@ -9222,4 +9222,4 @@ var ql = {
|
|
|
9222
9222
|
for (let n = 0; n < t.length; n++) t[n][2] && (e ??= /* @__PURE__ */ new Set()).add(t[n][0]);
|
|
9223
9223
|
return e ?? ai;
|
|
9224
9224
|
};
|
|
9225
|
-
export {
|
|
9225
|
+
export { Yl as CalcBackend };
|