@sheetxl/mcp 0.8.0-beta.23 → 0.8.0-beta.24
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/{CSisGJ4hiDhTi19U.js → 2YT_wstXIH6UIigi.js} +1 -1
- package/assets/{E-KM5RFByUxjlkId.js → 3VycPrqi6qgLOgGY.js} +6 -6
- package/assets/{B2zUUqxAJ1RiM7YI.js → 6CBUVbF01Bedq0e2.js} +43 -43
- package/assets/{BVUfaOAGhdMim8yB.js → 76dPHG5RYA7MUV_g.js} +3 -3
- package/assets/{CtlrxXVgZDIOcuc1.js → 7IzItpr7MkdnaAwh.js} +169 -169
- package/assets/{BBuB6ffvyg2Cd7V5.js → 7vPlH3_rhJxmmBvG.js} +1 -1
- package/assets/{aTxgpOOxLenli4af.js → 9GnbVPKozgrJpeLW.js} +1 -1
- package/assets/{DuQU8JjPLBIK804w.js → B-5mBXpY9i6-eCrZ.js} +29 -29
- package/assets/{CH8DNTUgM79xk8Tt.js → B-t1q2NS61c2B8E4.js} +1 -1
- package/assets/{BomatnedZsGMF7MW.js → B16G2473LTkZP6Mq.js} +150 -131
- package/assets/{DoP6myQHGI-X1gNy.js → B4uS01J0mrSJSftQ.js} +84 -84
- package/assets/{CC7EfXPwp7_nSBIz.js → B6caaQsfOpFEgYQ4.js} +1 -1
- package/assets/{2xkoVdiI70Gpaxoc.js → B7lATTNffVTrDsKE.js} +2 -2
- package/assets/{DgLQfXTWavoBetna.js → B8bEJ65vQRqsfBlS.js} +5 -5
- package/assets/{BGxwDpW8DkO8W0Ig.js → BAVltO4Xf7lC0Xr6.js} +1 -1
- package/assets/{CgYef9dYxY8YyUTE.js → BH7ctzMzOYVTGxzA.js} +1 -1
- package/assets/{CBMMHYgUAhgiJhJE.js → BJqo8c5bFKjnq69G.js} +11 -11
- package/assets/{CQCPJBQD0qv9y8qE.js → BJwiwzwx4Bl5L4Vq.js} +1 -1
- package/assets/{BJMeWtr7TiLNpt17.js → BPNLZ07Bu_B8Yhf1.js} +1 -1
- package/assets/{BWeaY19OpTJK5v0n.js → BWLavTnANLUerdS0.js} +2 -2
- package/assets/{gver5Sz7ZO6ZyrOi.js → BXWGS09xFG81nnIT.js} +1 -1
- package/assets/{DvkBNkPyR5kuS0Uo.js → BaYk1vO2hP2S3_1w.js} +2 -2
- package/assets/{PVGDjdR9C4stMNpM.js → BifwlrCmEVtjh_1U.js} +1 -1
- package/assets/{BPtf3_nlovO4r9Bm.js → BjyXkr-CzV8mVx0t.js} +1 -1
- package/assets/{DACd4ZjYwzNE7Koc.js → BkHeIMSE7-LehRCs.js} +1 -1
- package/assets/{DLuQ_rdu0XjYF7Jq.js → BkekCZ17YTtd07_C.js} +2 -2
- package/assets/{BDSNdgf_hbhX1DhN.js → BnNB_ejvNaLu6B3o.js} +1 -1
- package/assets/{f_dBJuakO_BJ7Tvm.js → BrJd9jVVv9SQzZol.js} +335 -335
- package/assets/{1J1R3dclFOh322Yr.js → BrYc6PLonux_gI6b.js} +209 -209
- package/assets/{CrTLWpsRNBSyTLor.js → BxwB3iTNSE1TgHkb.js} +1 -1
- package/assets/{Cx1bc-Dsja7W3GlB.js → By1QPrSxtnRiJu0R.js} +2 -2
- package/assets/{jKIDENA_QP4bEX49.js → ByYJTTTUuu67hDF-.js} +4 -4
- package/assets/{DXmebUOAhtW4V6BO.js → C-nA4SXN5hWHaxV6.js} +556 -556
- package/assets/{BNEBXKAh-N4Tygk7.js → C0uu0vLKQh0S508B.js} +23 -23
- package/assets/{Bjk1Twm0RFO_3fS8.js → C6PNMev7cs5JLgwy.js} +1 -1
- package/assets/{Cl04_aSpBHTwfsQR.js → C9iFJ52KwQTePQ81.js} +10248 -10246
- package/assets/{dep8oZGwBmUpxjHl.js → CCF6CwJ6cbeLRl23.js} +1 -1
- package/assets/{Cg1tSmK_AGJa2VeI.js → CEk658HeLJk2cAjM.js} +3 -3
- package/assets/{DiJexWBIzdGj1H0H.js → CFNtPYPfDPH-3BXK.js} +1 -1
- package/assets/CFT_tDogP98gTbh7.js +304 -0
- package/assets/{BKpicdc9H5WnZPb-.js → CFWwwr74qRKOBrg9.js} +1 -1
- package/assets/{5MnsnJcajdtAujE2.js → CIY_RiLu1_FmRLAA.js} +1 -1
- package/assets/{DcO0gub7cRKVw4xB.js → CIw6ZC3K9x-ccacl.js} +1 -1
- package/assets/{KhdF512BKcJXZMvq.js → CJ2hV-9ipqOEkLSG.js} +1 -1
- package/assets/{wKkW4LO-iUp92LVC.js → CKD460cQOgwF6uSV.js} +1 -1
- package/assets/{NDe-uS1n_Q7u1H3m.js → CM-q_J5aF6YXmjeu.js} +3 -3
- package/assets/{a9lvcAd7rWsWSWAo.js → CR1aLf7CWEfPTO9a.js} +1 -1
- package/assets/{BlhJHu9ni2T9IaM1.js → CSXmTA6w6Pnbtqvb.js} +1 -1
- package/assets/{DfBERTJjS9LP0RSp.js → CT4czEKWIj1GeQN8.js} +1 -1
- package/assets/{Dg5QmWm0uBTEjZy4.js → CUYQlZz5zWsUdmRy.js} +1 -1
- package/assets/{ChbkkN_JqbAGrUwB.js → CbJWbjmv4bz4ppIZ.js} +303 -303
- package/assets/{C8G_px4dGuR2KjJh.js → Cf0zmfQYfJ7zM0Ya.js} +1 -1
- package/assets/{2XwVsSfo5wF5K-HA.js → Ch9w7xFxVMrvGuC_.js} +1 -1
- package/assets/{BZaXHnsJ6RkCZsnz.js → CmkgQ5-IG0BSCM3R.js} +3 -3
- package/assets/{DZt1ONN8CTTfmHGn.js → CmwNIrRssYuLN2fn.js} +606 -606
- package/assets/{t4qTfgdlstczTs2z.js → CnI4Nli8vtWdFKvf.js} +21 -21
- package/assets/{BdUFL3lVdwifHrf0.js → CnKX5SPVE2iuSK42.js} +1 -1
- package/assets/{DPjWOMoJ-elAAOmS.js → CpvJUGg9ckuCIpIS.js} +1 -1
- package/assets/{DN1RRp4qQfCq3JAO.js → Cxzowsi6ASdZtzeI.js} +1 -1
- package/assets/{BYbzf-TVwbKQPCyK.js → CzRvg04_TIbwBH5C.js} +3 -3
- package/assets/{D7oYfHgO0kEqAnPV.js → D-vo2bQyAmStQmD9.js} +1 -1
- package/assets/{Cl8_HMhRgzPzqFc7.js → D6d1DKL15m52ZCuC.js} +1 -1
- package/assets/{DUytcsu0MV3GnsrM.js → D8k9de_hen-KqBWe.js} +1 -1
- package/assets/{B3YRTBFhX61z6rJv.js → DE7G34oYbvrfXbJ7.js} +385 -380
- package/assets/{YtxPcFPURJF6CxWu.js → DFVQIZ2zZyAphhCF.js} +1 -1
- package/assets/{BynbAjhJnLjyP7HH.js → DGI_8HyNF0eAv0P5.js} +1 -1
- package/assets/{DtETpSxSR8C1voac.js → DGOgx3-IyO8bjF_t.js} +94 -94
- package/assets/{CyhngJo16o7G18lq.js → DIgPlkEabQdKNUQn.js} +1 -1
- package/assets/{KMTTqSwDthnXnD4F.js → DJGYlGr2Zj7SkYqc.js} +1 -1
- package/assets/{BazhmjGvrL7pqVQP.js → DJfpKncnYnrr28G0.js} +1 -1
- package/assets/{DV3PnM9lo0AW-YOA.js → DL8pez0eKo8arYPj.js} +3 -3
- package/assets/{BcWSfKJ9Atkc0X_p.js → DM-yGHahbfA_uarn.js} +1 -1
- package/assets/{DIAQ_WlBCWhgHt-z.js → DMDTS0LH9Ke9t-3z.js} +1 -1
- package/assets/{D5O3m16KeyU_oXqH.js → DNSWaXblwhTtI3w7.js} +1 -1
- package/assets/{D-PYDPXobSWiPh1D.js → DOSWSyKkK4eSi4PD.js} +2 -2
- package/assets/{Bbmh8_bdk_HrQ5Y6.js → DPLTGglaPovTg9e5.js} +1 -1
- package/assets/{WuKVkvMPAOmRaCDY.js → DPYFRLJbHGlrcrJq.js} +2 -2
- package/assets/{CqP4H_-kRRjcxO91.js → DRq6lQLndj73WT35.js} +1 -1
- package/assets/{BI8kb-rd9dW85XJs.js → DRzZ4bEyLRGVOLzV.js} +1 -1
- package/assets/{CnUYevzhUJYNqLad.js → DUbIxDAzW1dzrtdI.js} +1 -1
- package/assets/{Dawi8y7JWn6A9gAx.js → DXCTHw-ZutNIuo_2.js} +1 -1
- package/assets/{CEsRqYMd5IjnAzzX.js → D_tdoUtUe7cApQJn.js} +4 -4
- package/assets/{WH1Vl-MDWX3vSMn1.js → DaF9L7No8h8a-cqb.js} +2 -2
- package/assets/{BULbMlvQuB2WFBFE.js → DaHD9SY75O8wDy3p.js} +2 -2
- package/assets/{C6_KHS3-ROddeSbS.js → Daaro0HbHkKXkBP-.js} +2 -2
- package/assets/{CE-9VKh5-Xwxnxmu.js → DczQhB3mRSUw6GCf.js} +1 -1
- package/assets/Dfv_T_PQVL0O3lu5.js +14 -0
- package/assets/{Cidwv57sKqhIrpHP.js → Dhy6iU_09lrQnOAV.js} +28 -28
- package/assets/{DL8wUEe2Kx7bjDYP.js → Dk9zYXO3VoBhTdex.js} +1 -1
- package/assets/{DrKr8dXQEQ3Aukmt.js → DkQ4kxEKhKYQgfjK.js} +1 -1
- package/assets/{BLr8y5StL65VZQxG.js → Dlqk7XqKnAZ8Pcj3.js} +89 -89
- package/assets/{CwrOCbcS4IHLsERQ.js → DqSBb1HmgeU7eg_i.js} +84 -84
- package/assets/{D60N4r1a2YsNEwqj.js → Ds4TB1hn56-RK6_f.js} +1 -1
- package/assets/{L9RIicOHtZd2Rx8g.js → DtVSjxL6N_7WyM8Z.js} +1 -1
- package/assets/{CGLapmkNccH1g_ZJ.js → DuEtCJEnG_GnJzTX.js} +1 -1
- package/assets/{DJ2jlogB1DWlGM-J.js → DwNcvKM47ZHfvQM6.js} +1 -1
- package/assets/{DbbNJyL67KdOK7nc.js → DyiH3LlinD-38bG7.js} +1 -1
- package/assets/{DSyZaCML62gSnudE.js → Jy-_0a72nn5Iv1NK.js} +1 -1
- package/assets/{CPZgEZ2jKoo7hS6g.js → KMzONx2Ps841nJHj.js} +8 -8
- package/assets/{CndRpNCcV89ncnqz.js → LM2rVDHdB0jVUFcT.js} +1 -1
- package/assets/{D5PpcRuJYSv0i2y9.js → MosMza0-rXD8uHX_.js} +2 -2
- package/assets/{sIWsnPhnHm_MeeM9.js → NAWWzA_hk4wYtsPP.js} +2 -2
- package/assets/{BbU6aT_c6-4tkcCw.js → P6V3JAiRpC3BWceC.js} +1 -1
- package/assets/{CzoRlNMlpFz4iax3.js → TZnuVwhVjkOBax9F.js} +2 -2
- package/assets/{BEsnJS5jYwkHNcZd.js → TdDTOcC1TYhk6UuR.js} +1 -1
- package/assets/{CE5DhB5As59VJ-Ig.js → Xccc6oxtlSvJUDsC.js} +1 -1
- package/assets/{BPorbjbkH-VoV1M0.js → a2e_g9YI3J-lUD7-.js} +1 -1
- package/assets/{MzfM7zDcnyOFK1lK.js → b8yACuWy67eIj_j2.js} +1 -1
- package/assets/{CpyybSV2kR6b-SIB.js → bv3fZLUPzd14I58C.js} +263 -263
- package/assets/{DAliB9N1z6qnw4NO.js → doqBmhonQlHp-1Ud.js} +1 -1
- package/assets/{CCBQDcCHI47PZ0YQ.js → fEfisM0E2fUYKIyU.js} +5 -5
- package/assets/{q1rCdlJA6Z7tA6om.js → flby0g5gyZ9P2Wu2.js} +1 -1
- package/assets/{DKKLWACR9GsidnkS.js → g2Nu44uuSJFMzxEV.js} +2 -2
- package/assets/{Bz08KxFupjbdsoFx.js → mZt9BTEejCJZ4YK4.js} +1 -1
- package/assets/{Dol52NFQzLCbObuC.js → qc7rA-Z3a4rkVQPx.js} +225 -225
- package/assets/{DL7_uGw6KiZhlvR8.js → sJVPCrgeh0U6LbAK.js} +1 -1
- package/assets/{CHG4ZuzhyjGRuKBg.js → suLYEZBtGUhSYeB7.js} +1 -1
- package/assets/{qjyVXZeVSr_qZfX5.js → tWO-mE87mAuj1qih.js} +2 -2
- package/assets/{PiFW6uPRJABzK3V1.js → xD41vsQY6h60lCqz.js} +14 -14
- package/assets/{CeVCLRwjkH3_OXJu.js → yz2PTfYm_8EGJPM5.js} +1 -1
- package/index.js +191 -191
- package/lib.js +1 -1
- package/licenses/dependencies.txt +114 -114
- package/package.json +2 -2
- package/screenshot-page/assets/{Ce8b0lOBuWKlfLzJ.js → B-0-chiwq4MIUQy9.js} +1 -1
- package/screenshot-page/assets/{C9a-cNha8mBw5q-l.js → B7pXfEVkcbaMBMhc.js} +1 -1
- package/screenshot-page/assets/{CAQ7QWes7j7Fq8o5.js → BDRMUi2BsnBqytIq.js} +1 -1
- package/screenshot-page/assets/{DrnzLCa7NIirMxno.js → BEjJHVSbtlsNtoq7.js} +3 -3
- package/screenshot-page/assets/{JM0_BaBZ3yF6lnHC.js → BIuMiduMHSsTGacU.js} +2 -2
- package/screenshot-page/assets/{DvRXbyteeo_8sy8T.js → BKwDvElKinpn1IK0.js} +1 -1
- package/screenshot-page/assets/{Cbbl3H042tb0krfe.js → BTJ1NNUzHotNDiDe.js} +2 -2
- package/screenshot-page/assets/BbT5KRhoeAKLzy54.js +2 -0
- package/screenshot-page/assets/{BAxPBeFudRJ3OqIC.js → BcZPWw18bdj_ZvA9.js} +1 -1
- package/screenshot-page/assets/{B2PWru6Ty7ODc2Ie.js → Bfq6-treWd_rRiWl.js} +1 -1
- package/screenshot-page/assets/{Bml69dFBVggmVWda.js → Bg9UyX4yrB2mSdJt.js} +23 -23
- package/screenshot-page/assets/Bxq4FCQhyPbVhhaR.js +2 -0
- package/screenshot-page/assets/{DEAD_MduPNVoT_T6.js → CNB6WmYfGVZjlCKV.js} +1 -1
- package/screenshot-page/assets/{DtQFcMvZesaQ4xRf.js → CSFFMEKyxEFaykqL.js} +1 -1
- package/screenshot-page/assets/{DXbOBAxx4_2rt5KM.js → CXeJV1BW2CVemhPE.js} +1 -1
- package/screenshot-page/assets/{DMbFr7oWja7Qpsm6.js → C_YKEkTsGB_5gFNg.js} +2 -2
- package/screenshot-page/assets/{D7Y0npF3FMsGUjgO.js → CkxmJxdtjBIxYoMq.js} +1 -1
- package/screenshot-page/assets/CtiTwHzd_ZSzd3W2.js +1 -0
- package/screenshot-page/assets/{ONNSfQ8RDOqBDsvw.js → CwCu_r0BW41uLt3P.js} +2 -2
- package/screenshot-page/assets/{CEL5lzj2NDYwJ-HC.js → Cx9eq2x1gIXGki3Q.js} +1 -1
- package/screenshot-page/assets/D43IayseD2Cy8OZo.js +4 -0
- package/screenshot-page/assets/{CaOsWPeN_FXseSNg.js → D6Ciix7JAZtdKqmj.js} +1 -1
- package/screenshot-page/assets/{D4hvW_TF7vwc-Xlq.js → D6EXAYU-ZH8hjx_7.js} +2 -2
- package/screenshot-page/assets/D7Yt7xmUlA6-Lq0Q.js +48 -0
- package/screenshot-page/assets/{B3yyoGGGl8ICyeoC.js → D8KyhLvfyjLZW92H.js} +6 -6
- package/screenshot-page/assets/DBxAatsD6aWk7Zb6.js +586 -0
- package/screenshot-page/assets/{BjJ_nnNDZEPLpapa.js → DGkaCFHx4PsOJkFu.js} +1 -1
- package/screenshot-page/assets/{CGx-ZSMV9cPOzbu4.js → DM6hr-bvWV50-Oex.js} +2 -2
- package/screenshot-page/assets/{C5-sm7wuk62Nzm_p.js → DOVt9zHz7FQ2KUQM.js} +1 -1
- package/screenshot-page/assets/{Cengqc8q8BTmNfb_.js → DR-og7vslxlOZd8j.js} +1 -1
- package/screenshot-page/assets/{CaP_vH0sJFjNrSkW.js → DSTlKGmqncM7XHeW.js} +1 -1
- package/screenshot-page/assets/Dh14XQinAphjZOKC.js +1 -0
- package/screenshot-page/assets/{CiFaOHqsDQTE4RRi.js → DmDFKv_3APEWI-IY.js} +2 -2
- package/screenshot-page/assets/{DgLZb-StwCd9ftop.js → Dt8JxbBBr2TeDflQ.js} +1 -1
- package/screenshot-page/assets/Dxi-bXNjS-CpC5Qr.js +1 -0
- package/screenshot-page/assets/{BT2nkqpteSR9booH.js → DynKB5GH-vfFMJEy.js} +1 -1
- package/screenshot-page/assets/{C-n8BDiksNjX6Orz.js → FqdZRM336KMEcsbU.js} +1 -1
- package/screenshot-page/assets/Oay0yGsGYgJDzy8r.js +1 -0
- package/screenshot-page/assets/{Cv0zGWEBpmC07Jps.js → Pt9ne0xkE2icD3Ih.js} +1 -1
- package/screenshot-page/assets/{EOw6vVvEfYNga9b4.js → QZg76Jflu3Q808W3.js} +1 -1
- package/screenshot-page/assets/{BJct69niPZc8L_gZ.js → WTrYzPnMQhYDILMR.js} +1 -1
- package/screenshot-page/assets/{BTKdl-XR9TlWaFe7.js → a3fvt1Klg1uGE7p6.js} +5 -5
- package/screenshot-page/assets/{Be1S5czBx0lxhYLW.js → clrFU8i-0wNkmbs7.js} +1 -1
- package/screenshot-page/assets/r2HZG9_SMzF3__ID.js +13 -0
- package/screenshot-page/index.html +7 -7
- package/types/scripting-api.json +5745 -5743
- package/types/scripting.d.ts +22 -3
- package/assets/DU2Dzzu0oY_eDN6i.js +0 -14
- package/assets/bsnhRuD-K-qhW-y5.js +0 -304
- package/screenshot-page/assets/37LAUhU1_yKtsBlH.js +0 -2
- package/screenshot-page/assets/B3c6NBI22E5SZWG-.js +0 -1
- package/screenshot-page/assets/B56KxTxcAXDom0g4.js +0 -13
- package/screenshot-page/assets/Bh2DVAOWvWfylt77.js +0 -1
- package/screenshot-page/assets/BoiQQ-37KQn6NcLT.js +0 -1
- package/screenshot-page/assets/CcVllJMjVF6SvVVq.js +0 -2
- package/screenshot-page/assets/CyfTQE0Z76Rp4Fbt.js +0 -586
- package/screenshot-page/assets/D2CxEHjkPQMAxzWl.js +0 -1
- package/screenshot-page/assets/DVQnEWIisXaOXb_G.js +0 -4
- package/screenshot-page/assets/_zzVe2R8R4vwuc5q.js +0 -48
|
@@ -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.24
|
|
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 {
|
|
10
|
-
import { a as p, f as m, l as S, m as w, p as E, u as I } from "./
|
|
11
|
-
import { $
|
|
12
|
-
import {
|
|
13
|
-
import { n as
|
|
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 "./DMDTS0LH9Ke9t-3z.js";
|
|
8
|
+
import { a as i, r as a } from "./TZnuVwhVjkOBax9F.js";
|
|
9
|
+
import { A as c, at as d, mt as h, p as u, sn as _, v as f, z as g } from "./B16G2473LTkZP6Mq.js";
|
|
10
|
+
import { a as p, f as m, l as S, m as w, p as E, u as I } from "./DRzZ4bEyLRGVOLzV.js";
|
|
11
|
+
import { $t as y, A as v, Aa as x, An as C, Ba as b, Bi as R, C as A, Ci as k, Ct as N, D as M, Da as F, Dr as D, E as T, Ea as G, En as B, Et as V, F as O, Fa as P, Fn as z, Ft as L, G as $, Ga as H, Gt as j, H as K, Ha as q, Ir as W, Ja as U, Jn as X, Jr as J, Ka as Z, Ki as Q, Li as Y, Ln as tt, Mn as et, Mr as nt, Ni as rt, Nr as ot, Or as st, P as lt, Pn as it, Pr as at, Pt as ct, Q as dt, Qi as ht, R as ut, Ri as _t, T as ft, Ta as gt, V as pt, Vn as mt, Wi as St, Wr as wt, X as Et, Y as It, Yr as yt, Z as vt, Zi as xt, Zn as Ct, Zr as bt, _n as Rt, _t as At, a as kt, ao as Nt, bt as Mt, ci as Ft, cn as Dt, cr as Tt, ct as Gt, da as Bt, di as Vt, dt as Ot, ea as Pt, eo as zt, f as Lt, fn as $t, gn as Ht, gr as jt, h as Kt, ha as qt, hi as Wt, hn as Ut, hr as Xt, ht as Jt, i as Zt, in as Qt, it as Yt, j as te, ja as ee, ka as ne, ki as re, kr as oe, lo as se, m as le, mi as ie, mr as ae, nt as ce, o as de, oo as he, pr as ue, qn as _e, r as fe, ra as ge, ri as pe, ro as me, rr as Se, s as we, sa as Ee, sr as Ie, t as ye, tn as ve, to as xe, tr as Ce, ut as be, va as Re, vr as Ae, w as ke, wi as Ne, wn as Me, wt as Fe, xi as De, xr as Te, y as Ge, yi as Be, yn as Ve } from "./C9iFJ52KwQTePQ81.js";
|
|
12
|
+
import { _ as Oe, a as Pe, c as ze, d as Le, f as $e, g as He, h as je, i as Ke, l as qe, m as We, n as Ue, o as Xe, p as Je, r as Ze, s as Qe, u as Ye } from "./B-5mBXpY9i6-eCrZ.js";
|
|
13
|
+
import { c as tn, i as en, n as nn, o as rn, s as on, t as sn } from "./CnI4Nli8vtWdFKvf.js";
|
|
14
|
+
import { C as ln, E as an, O as cn, _ as dn, a as hn, b as un, d as _n, m as fn, r as gn, u as pn } from "./BrJd9jVVv9SQzZol.js";
|
|
15
|
+
import { n as mn } from "./6CBUVbF01Bedq0e2.js";
|
|
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 be({
|
|
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 N;
|
|
80
80
|
const o = e?.bounds;
|
|
81
|
-
if (o && ((o.colStart ?? 0) > 0 || (o.rowStart ?? 0) > 0 || (o.colEnd ?? 0) < 0 || (o.rowEnd ?? 0) < 0)) return
|
|
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 N;
|
|
82
|
+
const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ? x(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 ? it : (a = !0, Xt(0, 0, r, s, l)),
|
|
86
86
|
[Symbol.iterator]() {
|
|
87
87
|
return this;
|
|
88
88
|
},
|
|
89
|
-
return: (t) =>
|
|
90
|
-
throw: (t) =>
|
|
89
|
+
return: (t) => it,
|
|
90
|
+
throw: (t) => it
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
keys(t) {
|
|
@@ -243,7 +243,7 @@ var Sn = class e {
|
|
|
243
243
|
_getOrCreate2D(t) {
|
|
244
244
|
if (!t) throw new Error(In);
|
|
245
245
|
let e = this._mapScopeTo2Ds.get(t);
|
|
246
|
-
return e || (e = new
|
|
246
|
+
return e || (e = new me(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 ??= Wt(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 (yt(t)) throw t;
|
|
305
305
|
return I.isError(t) ? t : new I.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 ? un(l.ast, r) : l.getTokens();
|
|
345
|
+
i = Kt(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() : q;
|
|
351
|
+
return n ? oe(i, this._getEntireCoords?.(), a) : Ht(i, this._getEntireCoords?.(), t, e, a);
|
|
352
352
|
}
|
|
353
353
|
_displayLocale() {
|
|
354
354
|
const t = this._context.getRuntime().getLocaleProfile();
|
|
355
|
-
return
|
|
355
|
+
return v(he(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 === le.Cell ? i = { ...o[n.value] } : n.op === le.Named ? i = { nameId: n.node.value.nameId } : n.op === le.TableReference && (i = { table: { ...n.node.value } });
|
|
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 ? mn(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 ? un(r.ast, n) : r.getTokens();
|
|
411
|
+
return o = Kt(o, r.symbols, !1, !0), te(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 && pn(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 ? gn(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(hn(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 oe(n, o) === oe(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 = Zt(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 === le.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 === le.Named) {
|
|
490
|
+
const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(Fe.NamedFormula, t)?.toString() ?? t;
|
|
491
491
|
a[n] = { nameId: e };
|
|
492
|
-
} else if (r.op ===
|
|
492
|
+
} else if (r.op === le.TableReference) {
|
|
493
493
|
const o = r.node.value;
|
|
494
494
|
let s = this._resolveStructuredRef(o, t, e);
|
|
495
495
|
!s || I.isError(s) ? a[n] = null : a[n] = {
|
|
496
496
|
...s,
|
|
497
497
|
tableId: o.tableId
|
|
498
498
|
};
|
|
499
|
-
} else r.op ===
|
|
499
|
+
} else r.op === le.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 : Ve(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 === le.Named, f = 2 === u.length;
|
|
536
536
|
let g, p, m = !1;
|
|
537
537
|
n && I.isError(n) && (n = null), n && "nameId" in n && !_ && (n = null);
|
|
538
538
|
const S = n && "nameId" in n ? null : n, w = !!S && void 0 !== S.colIndex;
|
|
@@ -562,7 +562,7 @@ var Sn = class e {
|
|
|
562
562
|
let y = -1, v = -1, x = -1, C = -1;
|
|
563
563
|
if (f) y = u[0].evalIndex, v = u[1].evalIndex;
|
|
564
564
|
else if ("cell" === h.type) y = h.evalIndex;
|
|
565
|
-
else if (d.op ===
|
|
565
|
+
else if (d.op === le.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(Fe.Sheet, r) ? null : r;
|
|
576
576
|
}
|
|
577
577
|
return null;
|
|
578
|
-
}, R = h, A = this._compiled.ast, k =
|
|
578
|
+
}, R = h, A = this._compiled.ast, k = ft(A, (t) => {
|
|
579
579
|
if (!t || !t.isReference) return;
|
|
580
|
-
if (E && t === R) return
|
|
580
|
+
if (E && t === R) return pt(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 === le.Named) {
|
|
583
|
+
if (!n) return we();
|
|
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(Fe.NamedFormula, e.nameId) ?? e.nameId, o = { ...t };
|
|
586
586
|
return o.value = {
|
|
587
587
|
...t.value,
|
|
588
588
|
...e,
|
|
589
589
|
nameId: r
|
|
590
590
|
}, o;
|
|
591
591
|
}
|
|
592
|
-
return m ?
|
|
592
|
+
return m ? ye(":", pt(g), pt(p), !0) : pt(g);
|
|
593
593
|
}
|
|
594
|
-
if (-1 !== x && t.evalIndex === x && e ===
|
|
595
|
-
if (!n &&
|
|
594
|
+
if (-1 !== x && t.evalIndex === x && e === le.TableReference) return n ? m ? ye(":", pt(g), pt(p), !0) : pt(g) : we();
|
|
595
|
+
if (!n && an.includes(t.value)) {
|
|
596
596
|
const e = t.inputs ?? r.EmptyArray, n = e[0], o = e[1];
|
|
597
597
|
let s = n.evalIndex === y, l = o.evalIndex === v;
|
|
598
598
|
if (s || l) {
|
|
599
|
-
const e =
|
|
599
|
+
const e = we(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 === m) {
|
|
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 = ye(":", pt(g), pt(p), !0);
|
|
611
|
+
else s = we(void 0, void 0, b(t)), s.evalIndex = t.evalIndex;
|
|
612
612
|
return s;
|
|
613
613
|
}
|
|
614
614
|
});
|
|
615
615
|
if (k === A) return this;
|
|
616
|
-
const N =
|
|
616
|
+
const N = hn(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(Fe.Sheet, e), l = r.transform((t, e) => {
|
|
621
621
|
if (!t || !t.isReference) return;
|
|
622
|
-
if (t.type !==
|
|
623
|
-
if (
|
|
622
|
+
if (t.type !== le.Cell) return;
|
|
623
|
+
if (ln(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 !== le.Cell) return;
|
|
635
|
+
if (ln(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 !== le.TableReference) return;
|
|
645
645
|
const r = t.value;
|
|
646
646
|
if ("object" != typeof r || r?.tableId !== e) return;
|
|
647
647
|
const o = n(r);
|
|
@@ -654,7 +654,7 @@ var Sn = class e {
|
|
|
654
654
|
if (o.activeNames.has(r)) return I.BuiltIn.Ref;
|
|
655
655
|
const s = this._resolvers?.getNamedFormulaBlock?.(r);
|
|
656
656
|
if (!s) {
|
|
657
|
-
const t = this._compiled, e = t.symbols?.resolve(
|
|
657
|
+
const t = this._compiled, e = t.symbols?.resolve(Fe.NamedFormula, r), n = e ? e.toString() : r, o = t.getFunction?.(n) ?? null;
|
|
658
658
|
return o ? new vn(o) : I.BuiltIn.Name;
|
|
659
659
|
}
|
|
660
660
|
const l = o.gridId, i = o.rowIndex, a = o.colIndex;
|
|
@@ -694,15 +694,15 @@ var Sn = class e {
|
|
|
694
694
|
f[r.index] = t;
|
|
695
695
|
continue;
|
|
696
696
|
}
|
|
697
|
-
if (o ===
|
|
697
|
+
if (o === le.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 === le.Error) {
|
|
702
|
+
f[r.index] = W(r.node.value);
|
|
703
703
|
continue;
|
|
704
704
|
}
|
|
705
|
-
if (o ===
|
|
705
|
+
if (o === le.TableReference) {
|
|
706
706
|
const n = r.node.value;
|
|
707
707
|
let o;
|
|
708
708
|
n && (o = this._resolveStructuredRef(n, t, e)), o || (o = I.BuiltIn.Ref), f[r.index] = o;
|
|
@@ -729,13 +729,13 @@ var Sn = class e {
|
|
|
729
729
|
else {
|
|
730
730
|
if (" " === o) {
|
|
731
731
|
const t = l.scope ? a.scope ? null : l.scope : a.scope;
|
|
732
|
-
i = t && this._gridId && t !== this._gridId ? I.BuiltIn.Value :
|
|
733
|
-
} else if (":" === o || ".:." === o || ":." === o || ".:" === o) i =
|
|
732
|
+
i = t && this._gridId && t !== this._gridId ? I.BuiltIn.Value : mt(l, a);
|
|
733
|
+
} else if (":" === o || ".:." === o || ":." === o || ".:" === o) i = Ie(l, a);
|
|
734
734
|
else if ("," === o) {
|
|
735
735
|
const t = s.length;
|
|
736
736
|
for (let e = 0; e < t; e++) {
|
|
737
737
|
const t = f[s[e]];
|
|
738
|
-
void 0 === t || Array.isArray(t) || I.isError(t) || (i = i ?
|
|
738
|
+
void 0 === t || Array.isArray(t) || I.isError(t) || (i = i ? Ie(i, t) : t);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
f[r.index] = i ?? I.BuiltIn.Null;
|
|
@@ -762,7 +762,7 @@ var Sn = class e {
|
|
|
762
762
|
const s = e.op;
|
|
763
763
|
let h, u = null;
|
|
764
764
|
if (s) {
|
|
765
|
-
if (s ===
|
|
765
|
+
if (s === le.Error) h = W(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 (ft(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 = hn(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 === le.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 === le.Error) l[i.evalIndex] = W(r.node.value);
|
|
817
|
+
else if (s === le.TableReference) {
|
|
818
818
|
const n = r.node.value;
|
|
819
819
|
let s;
|
|
820
820
|
s = n ? this._resolveStructuredRef(n, t, e) : I.BuiltIn.Ref, I.isError(s) || void 0 === s?.colStart ? l[i.evalIndex] = s ?? I.BuiltIn.Ref : l[i.evalIndex] = o.getReference(s);
|
|
@@ -830,41 +830,41 @@ var Sn = class e {
|
|
|
830
830
|
const o = this._compiled, s = o.ast;
|
|
831
831
|
if (!s || !s.isReference) return this;
|
|
832
832
|
if ("cell" === s.type) return this;
|
|
833
|
-
if (s.type ===
|
|
833
|
+
if (s.type === le.Error) return this;
|
|
834
834
|
if ("@" === s.value) return this;
|
|
835
835
|
if (!r) return this;
|
|
836
|
-
const l =
|
|
836
|
+
const l = K(n) + zt(e);
|
|
837
837
|
if (r.has(l)) return this;
|
|
838
|
-
const i =
|
|
838
|
+
const i = G("@", s, !0), a = hn(o.runtime, o.symbols, i, !1, o.error, o.getFunction);
|
|
839
839
|
return new t(a, this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
|
|
840
840
|
}
|
|
841
841
|
_executeNode(t, e, n, r, o = null) {
|
|
842
842
|
const s = this._context, l = t.inputs, i = l ? l.length : 0, a = t.type;
|
|
843
843
|
let c;
|
|
844
844
|
switch (a) {
|
|
845
|
-
case
|
|
845
|
+
case le.Infix: {
|
|
846
846
|
const n = t.value;
|
|
847
847
|
let r = e[l[0].evalIndex], o = e[l[1].evalIndex];
|
|
848
848
|
if (!0 === t.firstCell && !t.isReference && this._demandsFirstCell() && (r = An(r), o = An(o)), ("+" === n || "-" === n) && (r = Rn(s, r), "number" == typeof r && (o = Rn(s, o), "number" == typeof o))) {
|
|
849
849
|
const e = "+" === n ? r + o : r - o;
|
|
850
|
-
return
|
|
850
|
+
return k(!0 === t.snapsCancellation ? Me(e, r) : e, null);
|
|
851
851
|
}
|
|
852
852
|
if (!t.isReference) {
|
|
853
853
|
if (r && I.isError(r)) return r;
|
|
854
854
|
if (o && I.isError(o)) return o;
|
|
855
855
|
}
|
|
856
|
-
const i = t.fn ?? (t.fn = !0 === t.snapsCancellation ?
|
|
857
|
-
return c = i ? i(s, r, o) : I.BuiltIn.Value, c =
|
|
856
|
+
const i = t.fn ?? (t.fn = !0 === t.snapsCancellation ? cn[t.value] : _n[t.value]);
|
|
857
|
+
return c = i ? i(s, r, o) : I.BuiltIn.Value, c = k(c, null), c;
|
|
858
858
|
}
|
|
859
|
-
case
|
|
859
|
+
case le.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 = xt.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 xt && (c = c._force());
|
|
866
866
|
} finally {
|
|
867
|
-
|
|
867
|
+
xt.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 le.Prefix:
|
|
876
|
+
case le.Postfix: {
|
|
877
877
|
let n = e[l[0].evalIndex];
|
|
878
878
|
if (!0 === t.firstCell && !t.isReference && "@" !== t.value && this._demandsFirstCell() && (n = An(n)), n && I.isError(n)) return n;
|
|
879
|
-
const r = t.fn ?? (t.fn = a ===
|
|
879
|
+
const r = t.fn ?? (t.fn = a === le.Prefix ? fn[t.value] : dn[t.value]);
|
|
880
880
|
return c = r ? r(s, n) : I.BuiltIn.Value, c;
|
|
881
881
|
}
|
|
882
|
-
case
|
|
883
|
-
case
|
|
882
|
+
case le.List:
|
|
883
|
+
case le.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 && P(n.scope)) return I.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 (Qt(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
|
+
Qt(r) ? t.push(...r) : t.push(r);
|
|
899
899
|
}
|
|
900
|
-
const n =
|
|
900
|
+
const n = Zt(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 = Zt(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 le.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 le.TableReference: return e[t.evalIndex] ?? null;
|
|
925
|
+
case le.Call: {
|
|
926
926
|
const n = e[l[0].evalIndex];
|
|
927
927
|
return n && I.isError(n) ? n : (c = this._applyCallee(n, t, e), c);
|
|
928
928
|
}
|
|
929
|
-
case
|
|
929
|
+
case le.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 : Qt(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] : xt.deferred(l, a, this, e, n, r, o, s) : n[e.evalIndex];
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
_createLambdaValue(t, e, n, r, o) {
|
|
@@ -972,14 +972,14 @@ var Sn = class e {
|
|
|
972
972
|
if (o > e.length || o < s) return I.BuiltIn.Value;
|
|
973
973
|
const l = new Map(t.frame ?? void 0);
|
|
974
974
|
for (let t = 0; t < e.length; t++) {
|
|
975
|
-
const s = e[t], i = t >= o || r[t + 1]?.type ===
|
|
975
|
+
const s = e[t], i = t >= o || r[t + 1]?.type === le.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 === le.Empty ? void 0 : n[r[t].evalIndex]);
|
|
983
983
|
return this._dispatchFunction(t.fn, e, e.length);
|
|
984
984
|
}
|
|
985
985
|
return t && (t.isIRange || void 0 !== t.colStart) || "boolean" == typeof t ? I.BuiltIn.Ref : I.BuiltIn.Value;
|
|
@@ -995,7 +995,7 @@ var Sn = class e {
|
|
|
995
995
|
o.set(n[t].slot, void 0 === r ? xn : r);
|
|
996
996
|
}
|
|
997
997
|
const s = this._evaluateBody(t, o);
|
|
998
|
-
return
|
|
998
|
+
return k(s, this._context);
|
|
999
999
|
}
|
|
1000
1000
|
_evaluateBody(t, e) {
|
|
1001
1001
|
const n = this._calcScope;
|
|
@@ -1019,7 +1019,7 @@ var Sn = class e {
|
|
|
1019
1019
|
return this._runList(s, e, r, o, n), e[t.evalIndex];
|
|
1020
1020
|
} catch (t) {
|
|
1021
1021
|
if (I.isError(t)) return t;
|
|
1022
|
-
if (
|
|
1022
|
+
if (yt(t)) throw t;
|
|
1023
1023
|
return t instanceof RangeError ? I.BuiltIn.Num : new I.Value(t?.message, { cause: t });
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
@@ -1032,7 +1032,7 @@ var Sn = class e {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
_listWithin(t) {
|
|
1034
1034
|
let e;
|
|
1035
|
-
|
|
1035
|
+
ft(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
|
+
ft(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 (yt(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 (yt(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 (Q(t)) return I.BuiltIn.Calc;
|
|
1127
1127
|
if (p(t)) return I.BuiltIn.Calc;
|
|
1128
1128
|
if (t && void 0 !== t.colStart) try {
|
|
1129
1129
|
if (t.scope) {
|
|
@@ -1132,13 +1132,13 @@ var Sn = class e {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
t = e.getValueAt(t.rowStart, t.colStart, t.scope);
|
|
1134
1134
|
} catch (t) {
|
|
1135
|
-
if (
|
|
1135
|
+
if (yt(t)) throw t;
|
|
1136
1136
|
return I.isError(t) ? t : new I.Value(t?.message, { cause: t });
|
|
1137
1137
|
}
|
|
1138
1138
|
if (Array.isArray(t) && t.isSheetSpan) return I.BuiltIn.Ref;
|
|
1139
1139
|
if (Array.isArray(t)) {
|
|
1140
|
-
if (
|
|
1141
|
-
const e =
|
|
1140
|
+
if (Qt(t)) {
|
|
1141
|
+
const e = Zt(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 = k(t, e)) && (t = 0)) : (n = t, Cn.has(n) || (t = t.fillEmpty(0))) : null === (t = k(t, e)) && (t = 0), t;
|
|
1154
1154
|
}
|
|
1155
1155
|
finalizeValueForCell(t) {
|
|
1156
1156
|
const e = this.finalizeValue(t);
|
|
@@ -1160,7 +1160,7 @@ var Sn = class e {
|
|
|
1160
1160
|
const t = this._compiled;
|
|
1161
1161
|
if (t.error) return t.error.toString();
|
|
1162
1162
|
const e = this._calcScope;
|
|
1163
|
-
return e?.node ? this.getTextAt(e.node.rowIndex, e.node.colIndex) :
|
|
1163
|
+
return e?.node ? this.getTextAt(e.node.rowIndex, e.node.colIndex) : oe(t.getTokens(), null);
|
|
1164
1164
|
}
|
|
1165
1165
|
get [Symbol.toStringTag]() {
|
|
1166
1166
|
return "[FormulaBlock]";
|
|
@@ -1203,15 +1203,15 @@ var Nn = (t, e, n, r, o, s, l) => {
|
|
|
1203
1203
|
} else r[o] = c;
|
|
1204
1204
|
return s && (s[o] = d), l && (l[o] = h), o + 1;
|
|
1205
1205
|
}, Mn = Object.freeze({ type: null }), Fn = new Array(255), Dn = (t, e) => {
|
|
1206
|
-
for (let n = 0; n < e; n++) t[n]?.type ===
|
|
1206
|
+
for (let n = 0; n < e; n++) t[n]?.type === le.Empty && (Fn[n] = xn);
|
|
1207
1207
|
}, Tn = (t) => {
|
|
1208
1208
|
const e = { ...t };
|
|
1209
1209
|
return delete e.inLazy, delete e.lazyArg, delete e.hasLazyArgs, delete e.deferred, t.inputs && (e.inputs = t.inputs.map((t) => t ? Tn(t) : t)), e;
|
|
1210
|
-
}, Gn = (t) => I.isError(t) ? t : t instanceof RangeError ? I.BuiltIn.Num : new I.Value(t?.message, { cause: t }), Bn =
|
|
1210
|
+
}, Gn = (t) => I.isError(t) ? t : t instanceof RangeError ? I.BuiltIn.Num : new I.Value(t?.message, { cause: t }), Bn = ue(4096), Vn = 0, On = () => Bn, Pn = (t, e) => {
|
|
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 = ue(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, Wn = 12288, Un = 16384, Xn = 32768, Jn = 65536, Zn = 1 << 17, Qn = 1 << 18, Yn = 1 << 19, tr = 1 << 20, er = 1 << 21, nr = 1 << 22, rr = 495520, or = 256, sr = 512, lr = 1024, ir = 2048, ar = (t, e, n) => {
|
|
1230
1230
|
if (void 0 === e) return () => !1;
|
|
1231
1231
|
const r = dr(e);
|
|
1232
1232
|
return (o) => r(o) && n(t.compare(o, e));
|
|
@@ -1375,7 +1375,7 @@ var Nn = (t, e, n, r, o, s, l) => {
|
|
|
1375
1375
|
return new ur(t, r, o, s, l);
|
|
1376
1376
|
}, pr = class t {
|
|
1377
1377
|
static create(e, n, r, o) {
|
|
1378
|
-
const s =
|
|
1378
|
+
const s = et.peek();
|
|
1379
1379
|
if (!s) throw new Error("The sdk WebAssembly is not loaded.");
|
|
1380
1380
|
const l = (e ?? n)?.getRowCount() ?? 0;
|
|
1381
1381
|
if ((e?.getColumnCount() ?? 0) > 32 || (n?.getColumnCount() ?? 0) > 32) throw I.BuiltIn.Value;
|
|
@@ -1406,11 +1406,11 @@ var Nn = (t, e, n, r, o, s, l) => {
|
|
|
1406
1406
|
colStart: o,
|
|
1407
1407
|
colEnd: o
|
|
1408
1408
|
});
|
|
1409
|
-
new
|
|
1409
|
+
new rn().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 nn(), this._values = /* @__PURE__ */ new Map(), this._leafCount = 0, this._withRecords = null, this._wasm = t, this._request = e, this._result = n, this._n = r, this._createColumn = l;
|
|
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 = on[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 } = tn(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 = en(this._buffer(), o, this._errors), l = r.cell_count(), i = new Array(l);
|
|
1472
1472
|
for (let t = 0; t < l; t++) i[t] = s(t);
|
|
1473
1473
|
return o.free(), r.free(), i;
|
|
1474
1474
|
}
|
|
@@ -1674,7 +1674,7 @@ function jr(t, e, n = 0, r = 0) {
|
|
|
1674
1674
|
const i = t.rowIndex + r, a = t.colIndex + n;
|
|
1675
1675
|
if (i < o.rowStart || i > o.rowEnd || a < o.colStart || a > o.colEnd) return;
|
|
1676
1676
|
const c = e.nodeAt(i, a);
|
|
1677
|
-
|
|
1677
|
+
$e(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
|
+
}, Wr = {
|
|
1697
1697
|
bounds: qr,
|
|
1698
1698
|
reuseResult: !0
|
|
1699
|
-
},
|
|
1699
|
+
}, Ur = (t, e) => t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex, Xr = (t, e, n) => null === t || 0 === e && 0 === n ? t : {
|
|
1700
1700
|
colStart: t.colStart + n,
|
|
1701
1701
|
rowStart: t.rowStart + e,
|
|
1702
1702
|
colEnd: t.colEnd + n,
|
|
@@ -1707,15 +1707,15 @@ var Kr = {
|
|
|
1707
1707
|
colEnd: 0,
|
|
1708
1708
|
rowEnd: 0,
|
|
1709
1709
|
scope: null
|
|
1710
|
-
},
|
|
1710
|
+
}, Zr = null, Qr = null, Yr = {
|
|
1711
1711
|
colStart: 0,
|
|
1712
1712
|
rowStart: 0,
|
|
1713
1713
|
colEnd: 0,
|
|
1714
1714
|
rowEnd: 0,
|
|
1715
1715
|
scope: null
|
|
1716
1716
|
}, to = (t) => {
|
|
1717
|
-
const e =
|
|
1718
|
-
let n = t ??
|
|
1717
|
+
const e = Zr;
|
|
1718
|
+
let n = t ?? Qr;
|
|
1719
1719
|
if (null === n) return null;
|
|
1720
1720
|
let r = e.getGrid(n);
|
|
1721
1721
|
if (null === r) return null;
|
|
@@ -1727,7 +1727,7 @@ var Kr = {
|
|
|
1727
1727
|
const s = e.getFormulas();
|
|
1728
1728
|
return {
|
|
1729
1729
|
values: r.getValues(),
|
|
1730
|
-
searchFormulas: (t) => (
|
|
1730
|
+
searchFormulas: (t) => (Yr.colStart = t.colStart, Yr.rowStart = t.rowStart, Yr.colEnd = t.colEnd, Yr.rowEnd = t.rowEnd, Yr.scope = n, s.search(Yr))
|
|
1731
1731
|
};
|
|
1732
1732
|
}, eo = Object.freeze({
|
|
1733
1733
|
tokens: Object.freeze([]),
|
|
@@ -1784,7 +1784,7 @@ var Kr = {
|
|
|
1784
1784
|
return void 0 === o && (o = this._newNode(t, e, this.gridId, null), r.setValueAt(t, e, o)), o;
|
|
1785
1785
|
}
|
|
1786
1786
|
_newSparseStore() {
|
|
1787
|
-
const t = new
|
|
1787
|
+
const t = new be({ axis: E.Axis.Column }), e = this._anchor;
|
|
1788
1788
|
return null !== e && t.setValueAt(e.rowIndex, e.colIndex, e), this._nodes = t, t;
|
|
1789
1789
|
}
|
|
1790
1790
|
_mintDense() {
|
|
@@ -1833,7 +1833,7 @@ var Kr = {
|
|
|
1833
1833
|
return;
|
|
1834
1834
|
}
|
|
1835
1835
|
qr.rowStart = l, qr.rowEnd = i, qr.colStart = a, qr.colEnd = c;
|
|
1836
|
-
const h = d.entries(
|
|
1836
|
+
const h = d.entries(Wr);
|
|
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 ht.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 = Ie(Kr, Jr, a);
|
|
1893
1893
|
o[n] = d ?? I.BuiltIn.Null;
|
|
1894
1894
|
}
|
|
1895
1895
|
return this._scratchRow = t, this._scratchCol = e, o;
|
|
@@ -1906,11 +1906,11 @@ var Kr = {
|
|
|
1906
1906
|
getTouched(t, e) {
|
|
1907
1907
|
let n = this._touched;
|
|
1908
1908
|
if (null !== n && this._touchedCycleId === t && this._touchedMarkId === e) return n;
|
|
1909
|
-
|
|
1909
|
+
Zr = this._container, Qr = this.gridId;
|
|
1910
1910
|
try {
|
|
1911
1911
|
n = Vr(this._template, this.ref, to);
|
|
1912
1912
|
} finally {
|
|
1913
|
-
|
|
1913
|
+
Zr = null, Qr = null;
|
|
1914
1914
|
}
|
|
1915
1915
|
this._touched = n, this._touchedCycleId = t, this._touchedMarkId = e;
|
|
1916
1916
|
const r = this.blankShared;
|
|
@@ -1980,8 +1980,8 @@ var Kr = {
|
|
|
1980
1980
|
densify() {
|
|
1981
1981
|
if (!this._sparse) return;
|
|
1982
1982
|
if (this._sparse = !1, null === this._nodes) return;
|
|
1983
|
-
const t = this.ref, e = t.rowStart, n = t.colStart, r = t.rowEnd - e + 1, o = t.colEnd - n + 1, s =
|
|
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 = Zt(r);
|
|
1984
|
+
for (let t = 0; t < r; t++) s[t] = Zt(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 = Zt(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 = Zt(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 = Zt(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 = Zt(i);
|
|
2106
2106
|
for (let e = 0; e < i; e++) {
|
|
2107
|
-
const n =
|
|
2107
|
+
const n = Zt(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 ht.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(Ur);
|
|
2143
|
+
const a = new ht.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 [Ne(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 be({
|
|
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 De(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 wt.assertUsable("calcs", 0), n = this._container, r = n.getRuntime();
|
|
2587
|
+
this._runtime = new _t("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 = Mt(this._runtime, m.Number, qt);
|
|
2594
|
+
const { initializeFunctions: o } = await import("./xD41vsQY6h60lCqz.js"), s = this, l = Object.freeze(o(() => s, this._functionProviders)), a = new ke({
|
|
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(Fe.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 = Z(t);
|
|
2646
2646
|
if (void 0 !== e) {
|
|
2647
2647
|
const t = this._functions.getByName(e);
|
|
2648
2648
|
if (t && !t.isLambda()) return t;
|
|
@@ -2654,7 +2654,7 @@ var Kr = {
|
|
|
2654
2654
|
return this._functions._getStamp();
|
|
2655
2655
|
}
|
|
2656
2656
|
getNumberFormat(t, e) {
|
|
2657
|
-
return
|
|
2657
|
+
return h.getEngine().format(t, e, {
|
|
2658
2658
|
date1904: this.getRuntime().isDate1904(),
|
|
2659
2659
|
locale: this.getRuntime().getLocale()
|
|
2660
2660
|
}).text;
|
|
@@ -2665,7 +2665,7 @@ var Kr = {
|
|
|
2665
2665
|
getFormulaAt(t, e, n) {
|
|
2666
2666
|
const r = this._container;
|
|
2667
2667
|
let o;
|
|
2668
|
-
if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(
|
|
2668
|
+
if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(Fe.Sheet, n) : this._calcScope.gridId, !o) return null;
|
|
2669
2669
|
const s = r.getFormulas();
|
|
2670
2670
|
if (!s) return null;
|
|
2671
2671
|
ho.colStart = e, ho.rowStart = t, ho.colEnd = e, ho.rowEnd = t, ho.scope = o;
|
|
@@ -2681,15 +2681,15 @@ var Kr = {
|
|
|
2681
2681
|
defer(t, e) {
|
|
2682
2682
|
if ("function" != typeof t) throw new I.Value("defer needs an executor function");
|
|
2683
2683
|
const n = this._container.getDeferred?.();
|
|
2684
|
-
if (n) return
|
|
2685
|
-
|
|
2684
|
+
if (n) return Ot(n.defer(t, e, Vt(), M())), n.previous;
|
|
2685
|
+
Ot(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 U)) 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(Fe.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(Fe.Sheet, this._calcScope.gridId);
|
|
2748
2748
|
e = t ? t.getName ? t.getName() ?? void 0 : t.toString() : void 0;
|
|
2749
2749
|
}
|
|
2750
2750
|
}
|
|
@@ -2754,22 +2754,22 @@ var Kr = {
|
|
|
2754
2754
|
return this._container.getSheetCount?.() ?? 1;
|
|
2755
2755
|
}
|
|
2756
2756
|
isValidDate(t, e = !1) {
|
|
2757
|
-
return
|
|
2757
|
+
return g(t, e);
|
|
2758
2758
|
}
|
|
2759
2759
|
fromSerialDate(t, e = !1) {
|
|
2760
|
-
return
|
|
2760
|
+
return c(e ? Math.floor(t) : t, this.getRuntime().isDate1904());
|
|
2761
2761
|
}
|
|
2762
2762
|
toSerialDate(t, e = !1) {
|
|
2763
|
-
const n =
|
|
2763
|
+
const n = _(t, this.getRuntime().isDate1904());
|
|
2764
2764
|
return e ? Math.floor(n) : n;
|
|
2765
2765
|
}
|
|
2766
2766
|
getDateParts(t, e) {
|
|
2767
|
-
const n =
|
|
2767
|
+
const n = f(t, this.getRuntime().isDate1904(), e);
|
|
2768
2768
|
if (null === n) throw I.BuiltIn.Num;
|
|
2769
2769
|
return n;
|
|
2770
2770
|
}
|
|
2771
2771
|
getSerialDate(t, e, n, r = 0, o = 0, s = 0, l = 0) {
|
|
2772
|
-
return
|
|
2772
|
+
return u({
|
|
2773
2773
|
year: t,
|
|
2774
2774
|
month: e,
|
|
2775
2775
|
day: n,
|
|
@@ -2782,7 +2782,7 @@ var Kr = {
|
|
|
2782
2782
|
}, this.getRuntime().isDate1904());
|
|
2783
2783
|
}
|
|
2784
2784
|
getNow() {
|
|
2785
|
-
return
|
|
2785
|
+
return _(new Date(this.getRuntime().getNow()), this.getRuntime().isDate1904());
|
|
2786
2786
|
}
|
|
2787
2787
|
getRandom() {
|
|
2788
2788
|
const t = this._calcScope;
|
|
@@ -2794,33 +2794,33 @@ var Kr = {
|
|
|
2794
2794
|
const r = t.gridId;
|
|
2795
2795
|
if (r !== this._gridKeyId) {
|
|
2796
2796
|
this._gridKeyId = r;
|
|
2797
|
-
const t = null === r ? null : this._container.getSymbols().resolve(
|
|
2797
|
+
const t = null === r ? null : this._container.getSymbols().resolve(Fe.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 ot.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 = de(t.bounds, !0), s = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), l = new be({
|
|
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 De(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(Fe.Sheet, n), P(i)) return I.BuiltIn.Ref;
|
|
2821
2821
|
} else i = l.gridId;
|
|
2822
2822
|
if (!i) return I.BuiltIn.Ref;
|
|
2823
|
-
const c = l.node, d = c ?
|
|
2823
|
+
const c = l.node, d = c ? je(c) : r.EmptyArray, h = d.length;
|
|
2824
2824
|
for (let n = 0; n < h; n++) {
|
|
2825
2825
|
const r = d[n];
|
|
2826
2826
|
if (!r) continue;
|
|
@@ -2836,12 +2836,12 @@ var Kr = {
|
|
|
2836
2836
|
} else a = l;
|
|
2837
2837
|
break;
|
|
2838
2838
|
}
|
|
2839
|
-
return void 0 === a && (this._onRead?.(i, t, e, t, e), a = s.getGridValues(i)?.getValueAt(t, e) ?? null, s.getDeferred?.()?.hasHolders() && (a =
|
|
2839
|
+
return void 0 === a && (this._onRead?.(i, t, e, t, e), a = s.getGridValues(i)?.getValueAt(t, e) ?? null, s.getDeferred?.()?.hasHolders() && (a = Pt(a))), o && o.type, a;
|
|
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(Fe.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 be({
|
|
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 De(this._runtime, s, null, void 0, !1);
|
|
2879
|
+
return t > 0 && e > 0 && ("function" == typeof n ? (l = l.resize(t, e), l = l.map(n, fo)) : Array.isArray(n) ? (l = l.replace(n), l = l.resize(t, e)) : l = null != n ? new De(this._runtime, s, {
|
|
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 De(this._runtime, new Sn(t, {
|
|
2909
2909
|
axis: this._axis,
|
|
2910
2910
|
maxCoords: r
|
|
2911
2911
|
}), {
|
|
@@ -2920,13 +2920,13 @@ var Kr = {
|
|
|
2920
2920
|
if (t[0]?.isIRange) throw I.BuiltIn.Value;
|
|
2921
2921
|
r = [t];
|
|
2922
2922
|
}
|
|
2923
|
-
const l = this._axis, i = l === E.Axis.Column, a = this._fromTuples(
|
|
2923
|
+
const l = this._axis, i = l === E.Axis.Column, a = this._fromTuples(st(r, i, Ce(0, 0, void 0, void 0, i), !0), e, n, !s);
|
|
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 be({
|
|
2926
2926
|
axis: l,
|
|
2927
2927
|
maxCoords: c
|
|
2928
2928
|
}), h = e ? { type: e } : void 0;
|
|
2929
|
-
return new
|
|
2929
|
+
return new De(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 = T(t, r, ie, () => {
|
|
2962
2962
|
throw I.BuiltIn.Ref;
|
|
2963
2963
|
}, e);
|
|
2964
2964
|
if (n.length > 1) throw I.BuiltIn.Ref;
|
|
@@ -2994,7 +2994,7 @@ var Kr = {
|
|
|
2994
2994
|
if (!t) throw I.BuiltIn.Ref;
|
|
2995
2995
|
let a = t.scope;
|
|
2996
2996
|
if (a) {
|
|
2997
|
-
if (a = r.getSymbols().bind(
|
|
2997
|
+
if (a = r.getSymbols().bind(Fe.Sheet, t.scope), !a) return I.BuiltIn.Ref;
|
|
2998
2998
|
const e = r.getSheetSpanIds?.(a) ?? null;
|
|
2999
2999
|
if (e) {
|
|
3000
3000
|
if (r.isGridless?.(e[0]) || r.isGridless?.(e[e.length - 1])) return I.BuiltIn.Name;
|
|
@@ -3011,7 +3011,7 @@ var Kr = {
|
|
|
3011
3011
|
scope: a
|
|
3012
3012
|
};
|
|
3013
3013
|
if (r.isGridless?.(a)) {
|
|
3014
|
-
const t = new
|
|
3014
|
+
const t = new be({ 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(je(h), t)), -1 !== u) {
|
|
3029
3029
|
const e = zn(h, u);
|
|
3030
3030
|
if (null != e && e.isIReferenceRange) d = e;
|
|
3031
3031
|
else if (void 0 === e || c.isPendingOverlay) d = this._toReference(c, t, i, o, !1, lo(c, s));
|
|
3032
3032
|
else {
|
|
3033
3033
|
let n = e;
|
|
3034
3034
|
null !== n && n.isIRange && (n = n.getValueAt(0, 0));
|
|
3035
|
-
const r = new
|
|
3035
|
+
const r = new be({
|
|
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 || !P(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 U(this._runtime, t, e, void 0, r, this._container.resolveScope);
|
|
3080
3080
|
return n._setCoordsReadHook(this._positionRead), null !== l && n._setErrorIndex(null === i ? l : { hasErrorIn: (t) => (i(o, t.rowStart, t.colStart, t.rowEnd, t.colEnd), l.hasErrorIn(t)) }), n;
|
|
3081
3081
|
} catch (t) {
|
|
3082
3082
|
if (t instanceof n) throw I.BuiltIn.Ref;
|
|
@@ -3086,14 +3086,14 @@ var Kr = {
|
|
|
3086
3086
|
getAddress(t, e = !1) {
|
|
3087
3087
|
t || (this._calcScope.positionRead = !0, _o.rowIndex = this._calcScope.rowIndex, _o.colIndex = this._calcScope.colIndex, _o.scope = null, t = _o);
|
|
3088
3088
|
const n = this.getEntireCoords().scope;
|
|
3089
|
-
return void 0 !== t.colIndex ?
|
|
3089
|
+
return void 0 !== t.colIndex ? ae(t, n, e) : kt(t, n, e);
|
|
3090
3090
|
}
|
|
3091
3091
|
parseAsSerialDate(t, e) {
|
|
3092
3092
|
if (void 0 === t) return;
|
|
3093
3093
|
if ("number" == typeof t) return t;
|
|
3094
3094
|
if (I.isError(t)) throw t;
|
|
3095
3095
|
if ("string" != typeof t) throw I.BuiltIn.Value;
|
|
3096
|
-
const n =
|
|
3096
|
+
const n = d(this._runtime, t, e);
|
|
3097
3097
|
if (null === n) throw I.BuiltIn.Value;
|
|
3098
3098
|
return n;
|
|
3099
3099
|
}
|
|
@@ -3143,30 +3143,30 @@ var Kr = {
|
|
|
3143
3143
|
return pr.create(t, e, this._createSparseColumn, n);
|
|
3144
3144
|
}
|
|
3145
3145
|
getPivotAt(t) {
|
|
3146
|
-
if (!(t instanceof
|
|
3146
|
+
if (!(t instanceof U)) 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 sn(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 sn(n, l ? "blocked" : "wanted");
|
|
3156
3156
|
}
|
|
3157
3157
|
return null;
|
|
3158
3158
|
}
|
|
3159
3159
|
parseAsLiteral(t) {
|
|
3160
|
-
return
|
|
3160
|
+
return B(t) ?? ct(t);
|
|
3161
3161
|
}
|
|
3162
3162
|
toText(t) {
|
|
3163
|
-
return
|
|
3163
|
+
return It(t, this._runtime);
|
|
3164
3164
|
}
|
|
3165
3165
|
getRuntime() {
|
|
3166
3166
|
return this._runtime;
|
|
3167
3167
|
}
|
|
3168
3168
|
createRichData(t, e) {
|
|
3169
|
-
return
|
|
3169
|
+
return Jt.fromJSON({
|
|
3170
3170
|
type: t,
|
|
3171
3171
|
data: e
|
|
3172
3172
|
}, this._container.getRichDataContext?.());
|
|
@@ -3291,7 +3291,7 @@ function So(t, e, n) {
|
|
|
3291
3291
|
colEnd: a[1]
|
|
3292
3292
|
};
|
|
3293
3293
|
}
|
|
3294
|
-
var wo = class extends
|
|
3294
|
+
var wo = class extends At {
|
|
3295
3295
|
constructor(t) {
|
|
3296
3296
|
const e = (t = { ...t }).container;
|
|
3297
3297
|
super({
|
|
@@ -3299,15 +3299,15 @@ var wo = class extends me {
|
|
|
3299
3299
|
send: (t, n, r) => e.sendRequest(t, n, r),
|
|
3300
3300
|
calculation: t.calculation
|
|
3301
3301
|
}), this._touchedOthers = null, this._iterationId = 0, this._resized = null, this._hiddenRows = null, this._hiddenColumns = null, this._filtered = !1, this._pivots = null, this._demanded = [], this._isProcessingJSON = !1, this._snapshots = null, this._options = t, this._context = t.context, this._container = t.container;
|
|
3302
|
-
const n = { ...
|
|
3302
|
+
const n = { ...Ae }, o = t.getEntireCoords ?? (() => n);
|
|
3303
3303
|
if (this._getEntireCoords = o, this._unanchored = !0 === t.unanchored, this._shadowOf = t.shadowOf ?? null, this._arrayFirstCell = !0 === t.arrayFirstCell, this._paged = !0 === t.paged, !this._context || !this._container) throw new Error("Invalid Options");
|
|
3304
3304
|
const s = t?.onCalculated;
|
|
3305
3305
|
this._onCalculated = s ? (t) => {
|
|
3306
|
-
s(
|
|
3307
|
-
} : () => {}, this._values = new
|
|
3306
|
+
s($(V.results(t, "onCalculated"), this._container.getImager(this._gridId)));
|
|
3307
|
+
} : () => {}, this._values = new be({
|
|
3308
3308
|
axis: E.Axis.Column,
|
|
3309
|
-
createRun:
|
|
3310
|
-
}), this._iterationId = 0, this._contentfulSpatial = new
|
|
3309
|
+
createRun: ze
|
|
3310
|
+
}), this._iterationId = 0, this._contentfulSpatial = new me({ updateEntryOptions: {
|
|
3311
3311
|
isSplitOnExpand: !0,
|
|
3312
3312
|
isMergeOnShift: !0
|
|
3313
3313
|
} });
|
|
@@ -3315,7 +3315,7 @@ var wo = class extends me {
|
|
|
3315
3315
|
isSplitOnExpand: !0,
|
|
3316
3316
|
isMergeOnShift: !1
|
|
3317
3317
|
} };
|
|
3318
|
-
this._spillSpatial = new
|
|
3318
|
+
this._spillSpatial = new me(l), this._errorSpatial = new me(l), this._calcStatusSpatial = new me(l), this._circularSpatial = new me(l), this._notifyValues = new me(), this._notifyBlank = null, this._notifySpillsInsert = [], this._notifySpillsRemove = [], this._notifyFormats = new me(), this._notifyCalcStatus = new me(), this._notifyCircular = new me(), this._touchedFormulas = [], this._container.registerGrid(this), this._publishMaps();
|
|
3319
3319
|
}
|
|
3320
3320
|
_land(t, e) {
|
|
3321
3321
|
return this._container.landRequest(t, () => (void 0 !== t && this._versionMaps(t), e()));
|
|
@@ -3441,7 +3441,7 @@ var wo = class extends me {
|
|
|
3441
3441
|
cycleId: this._container.getCycleId(),
|
|
3442
3442
|
commitId: t.commitId
|
|
3443
3443
|
};
|
|
3444
|
-
const r =
|
|
3444
|
+
const r = Ut(t.destination, t.coords, t.fitDestination, t.transpose);
|
|
3445
3445
|
return r.scope = this._gridId, this._land(e, () => {
|
|
3446
3446
|
t.isCut ? this._moveTo(n, t.coords, r) : this._copyTo(n, t.coords, r);
|
|
3447
3447
|
const e = this._mutationResults(t.commitId);
|
|
@@ -3567,8 +3567,8 @@ var wo = class extends me {
|
|
|
3567
3567
|
const e = this, n = this.getId(), r = { ...t };
|
|
3568
3568
|
r.range = { ...r.range }, r.range.scope = n, delete r.onShift;
|
|
3569
3569
|
const o = e._values, s = r.range, l = r.direction, i = l === E.Direction.Left || l === E.Direction.Right, a = l === E.Direction.Down || l === E.Direction.Right, c = a ? 1 : -1, d = e._spillSpatial, h = e._contentfulSpatial;
|
|
3570
|
-
|
|
3571
|
-
const u = [], _ = this._container.getPrecedents().search(s), f =
|
|
3570
|
+
nt(d, s, i, a);
|
|
3571
|
+
const u = [], _ = this._container.getPrecedents().search(s), f = O(s, d, o, h, void 0, !1, !1, void 0, (t, e, r, o) => {
|
|
3572
3572
|
u.push({
|
|
3573
3573
|
colStart: t,
|
|
3574
3574
|
rowStart: e,
|
|
@@ -3586,7 +3586,7 @@ var wo = class extends me {
|
|
|
3586
3586
|
colEnd: i && 1 === c ? S.colEnd : s.colEnd,
|
|
3587
3587
|
rowEnd: i || 1 !== c ? s.rowEnd : S.rowEnd,
|
|
3588
3588
|
scope: n
|
|
3589
|
-
}, I = a ?
|
|
3589
|
+
}, I = a ? ge(m, w) : Y(m, s);
|
|
3590
3590
|
I && (Po(p, m, I.formulas.inserts, I.formulas.removes), e._touchFormulas(I.formulas.removes), e._touchFormulas(I.formulas.inserts));
|
|
3591
3591
|
const y = i ? s.colEnd - s.colStart + 1 : s.rowEnd - s.rowStart + 1, v = y * c, x = {
|
|
3592
3592
|
colStart: s.colStart,
|
|
@@ -3596,7 +3596,7 @@ var wo = class extends me {
|
|
|
3596
3596
|
scope: n
|
|
3597
3597
|
};
|
|
3598
3598
|
let C;
|
|
3599
|
-
const b =
|
|
3599
|
+
const b = Ge(() => m, () => {
|
|
3600
3600
|
const t = g.getDynamics();
|
|
3601
3601
|
return C = new Map(t), C;
|
|
3602
3602
|
}, x, {
|
|
@@ -3688,9 +3688,9 @@ var wo = class extends me {
|
|
|
3688
3688
|
let h = c;
|
|
3689
3689
|
for (let r = 0; r < d.length; r++) {
|
|
3690
3690
|
const o = d[r];
|
|
3691
|
-
if (!
|
|
3691
|
+
if (!at(o)) continue;
|
|
3692
3692
|
let s = l.get(o);
|
|
3693
|
-
void 0 === s && (s =
|
|
3693
|
+
void 0 === s && (s = pe(o, t, e, n) ?? null, l.set(o, s)), null !== s && (h = h.replaceScopeIds(o, s));
|
|
3694
3694
|
}
|
|
3695
3695
|
h !== c && (i.push(o), a.push({
|
|
3696
3696
|
...o,
|
|
@@ -3806,7 +3806,7 @@ var wo = class extends me {
|
|
|
3806
3806
|
l || (l = /* @__PURE__ */ new Map(), Eo.set(r, l));
|
|
3807
3807
|
let i = l.get(e);
|
|
3808
3808
|
if (!i) {
|
|
3809
|
-
const t =
|
|
3809
|
+
const t = L(r);
|
|
3810
3810
|
i = 0 === e ? t : (n, r) => t(n + e, r) - e, l.set(e, i);
|
|
3811
3811
|
}
|
|
3812
3812
|
return i;
|
|
@@ -3837,7 +3837,7 @@ var wo = class extends me {
|
|
|
3837
3837
|
columns: e.anchor.column - n.colStart
|
|
3838
3838
|
}, i = {
|
|
3839
3839
|
...n,
|
|
3840
|
-
value: new
|
|
3840
|
+
value: new ce(n, l, "pivot", s)
|
|
3841
3841
|
};
|
|
3842
3842
|
o.insert(i), this._notifySpillsInsert.push(i);
|
|
3843
3843
|
}
|
|
@@ -3962,7 +3962,7 @@ var wo = class extends me {
|
|
|
3962
3962
|
}
|
|
3963
3963
|
this._pushWithSpills(h, w);
|
|
3964
3964
|
}
|
|
3965
|
-
return h =
|
|
3965
|
+
return h = Yt(h, 2, t.Row), h.sort(o.rowFirstRangeComparator), h;
|
|
3966
3966
|
}
|
|
3967
3967
|
_pushWithSpills(t, e) {
|
|
3968
3968
|
t.push(e);
|
|
@@ -4019,7 +4019,7 @@ var wo = class extends me {
|
|
|
4019
4019
|
for (let t = 0; t < a.length; t++) {
|
|
4020
4020
|
const e = a[t];
|
|
4021
4021
|
if (void 0 === e?.colStart) continue;
|
|
4022
|
-
const n = e.scope, o = _(n), s =
|
|
4022
|
+
const n = e.scope, o = _(n), s = lt(e, r.rowStart + I, r.colStart + y), l = lt(e, r.rowStart + v, r.colStart + x), i = {
|
|
4023
4023
|
colStart: Math.max(Math.min(s.colStart, l.colStart), o.colStart),
|
|
4024
4024
|
rowStart: Math.max(Math.min(s.rowStart, l.rowStart), o.rowStart),
|
|
4025
4025
|
colEnd: Math.min(Math.max(s.colEnd, l.colEnd), o.colEnd),
|
|
@@ -4030,7 +4030,7 @@ var wo = class extends me {
|
|
|
4030
4030
|
}
|
|
4031
4031
|
f.push(...C);
|
|
4032
4032
|
}
|
|
4033
|
-
return f =
|
|
4033
|
+
return f = Yt(f, 2, t.Row), f.sort(o.rowFirstRangeComparator), f;
|
|
4034
4034
|
}
|
|
4035
4035
|
_directAcrossGrids(t, e) {
|
|
4036
4036
|
const n = this._gridId, o = t.scope, s = o && o !== n ? this._container.getGrid(o) ?? null : this;
|
|
@@ -4051,11 +4051,11 @@ var wo = class extends me {
|
|
|
4051
4051
|
return i;
|
|
4052
4052
|
}
|
|
4053
4053
|
getDependentsAt(t) {
|
|
4054
|
-
const e =
|
|
4054
|
+
const e = Tt(t, (t) => this._directAcrossGrids(t, !0));
|
|
4055
4055
|
return e.sort(o.rowFirstRangeComparator), e;
|
|
4056
4056
|
}
|
|
4057
4057
|
getPrecedentsAt(t) {
|
|
4058
|
-
const e =
|
|
4058
|
+
const e = Tt(t, (t) => this._directAcrossGrids(t, !1));
|
|
4059
4059
|
return e.sort(o.rowFirstRangeComparator), e;
|
|
4060
4060
|
}
|
|
4061
4061
|
_graphNeighborsNow(t, e, n) {
|
|
@@ -4166,16 +4166,16 @@ var wo = class extends me {
|
|
|
4166
4166
|
if ("scalar" === o) {
|
|
4167
4167
|
let o = t.evaluateAt(e, n, r);
|
|
4168
4168
|
if (o && void 0 !== o.colStart) o = t.finalizeValue(o);
|
|
4169
|
-
else if (
|
|
4170
|
-
const s =
|
|
4169
|
+
else if (Qt(o)) return t.finalizeValue(o);
|
|
4170
|
+
const s = k(o, this._context);
|
|
4171
4171
|
return null === s ? 0 : s;
|
|
4172
4172
|
}
|
|
4173
|
-
return
|
|
4173
|
+
return He(t.finalizeValue(t.evaluateAt(e, n, r)));
|
|
4174
4174
|
}
|
|
4175
4175
|
_setReferenceNow(t, e, n, r) {
|
|
4176
4176
|
const o = this._formulaAt(t, e);
|
|
4177
4177
|
let s = r;
|
|
4178
|
-
r && void 0 !== r.colStart ? s =
|
|
4178
|
+
r && void 0 !== r.colStart ? s = re(s, t, e) : r && void 0 !== r.colIndex && (s = xe(s, t, e));
|
|
4179
4179
|
const l = o.value.formula.setReferenceAt(n, s).getTextAt(t, e);
|
|
4180
4180
|
return this._land(void 0, () => {
|
|
4181
4181
|
l ? this._setInputsNow(null, [{
|
|
@@ -4196,7 +4196,7 @@ var wo = class extends me {
|
|
|
4196
4196
|
_setReferenceModeNow(t, e, n, r, o) {
|
|
4197
4197
|
const s = this.getReferencesAt(t, e)[n];
|
|
4198
4198
|
if (!s || "nameId" in s) throw new Error(`Reference at index ${n} is not a cell reference and cannot have its style changed.`);
|
|
4199
|
-
return this._setReferenceNow(t, e, n,
|
|
4199
|
+
return this._setReferenceNow(t, e, n, z(s, r, o));
|
|
4200
4200
|
}
|
|
4201
4201
|
_isVolatileNow(t, e) {
|
|
4202
4202
|
const n = this._formulaAt(t, e);
|
|
@@ -4231,7 +4231,7 @@ var wo = class extends me {
|
|
|
4231
4231
|
rowStart: u,
|
|
4232
4232
|
colEnd: o,
|
|
4233
4233
|
rowEnd: f,
|
|
4234
|
-
value: new
|
|
4234
|
+
value: new ce(g, 0, e.value.getKind())
|
|
4235
4235
|
});
|
|
4236
4236
|
}
|
|
4237
4237
|
return {
|
|
@@ -4244,7 +4244,7 @@ var wo = class extends me {
|
|
|
4244
4244
|
if (0 === o) return;
|
|
4245
4245
|
const s = this._container, l = n ?? this._gridId, i = null != n ? l : e ?? l, a = s.getScope();
|
|
4246
4246
|
a.gridId = i;
|
|
4247
|
-
const c = e ? s.getSymbols().resolve(
|
|
4247
|
+
const c = e ? s.getSymbols().resolve(Fe.Sheet, e)?.toString() : void 0, d = this._context;
|
|
4248
4248
|
for (let n = 0; n < o; n++) {
|
|
4249
4249
|
const o = t[n], h = o.value, u = h.ref, _ = h.formula.getTextAt(u.rowStart, u.colStart);
|
|
4250
4250
|
a.colIndex = u.colStart, a.rowIndex = u.rowStart;
|
|
@@ -4280,7 +4280,7 @@ var wo = class extends me {
|
|
|
4280
4280
|
if (p === Number.MIN_SAFE_INTEGER && (I = a, v = d), m === Number.MIN_SAFE_INTEGER && (y = c, x = h), I < a || v > d || y < c || x > h) {
|
|
4281
4281
|
const o = a - I, g = c - y, p = d - v, m = h - x;
|
|
4282
4282
|
Mo.colStart = Math.max(s, s + o), Mo.rowStart = Math.max(l, l + g), Mo.colEnd = Math.min(i, i + p), Mo.rowEnd = Math.min(u, u + m);
|
|
4283
|
-
const w =
|
|
4283
|
+
const w = vt(t, Mo, Dt);
|
|
4284
4284
|
if (w) {
|
|
4285
4285
|
const e = w.length;
|
|
4286
4286
|
t = w[e - 1], n = t.value, r = n.ref, s = r.colStart, l = r.rowStart, i = r.colEnd, u = r.rowEnd;
|
|
@@ -4304,7 +4304,7 @@ var wo = class extends me {
|
|
|
4304
4304
|
this._removeNow(n);
|
|
4305
4305
|
const a = this._container, c = a.getPrecedents().clone(), d = a.getFormulas().clone();
|
|
4306
4306
|
a.setPrecedents(c), a.setFormulas(d);
|
|
4307
|
-
const h =
|
|
4307
|
+
const h = ut(c, e, n);
|
|
4308
4308
|
h && (Po(d, c, h.formulas.inserts, h.formulas.removes), this._touchFormulas(h.formulas.removes), this._touchFormulas(h.formulas.inserts));
|
|
4309
4309
|
const u = { cutFrom: e }, _ = i.createCopiedEntries(e, n, u).inserts, f = _.length, g = this._gridId;
|
|
4310
4310
|
if (g !== l) {
|
|
@@ -4352,7 +4352,7 @@ var wo = class extends me {
|
|
|
4352
4352
|
}
|
|
4353
4353
|
let p;
|
|
4354
4354
|
Po(d, c, _), this._touchFormulas(_);
|
|
4355
|
-
const m =
|
|
4355
|
+
const m = $t(c, () => {
|
|
4356
4356
|
const t = a.getDynamics();
|
|
4357
4357
|
return p = new Map(t), p;
|
|
4358
4358
|
}, e, n);
|
|
@@ -4374,7 +4374,7 @@ var wo = class extends me {
|
|
|
4374
4374
|
t.values.copyTo(S, {
|
|
4375
4375
|
colIndex: n.colStart,
|
|
4376
4376
|
rowIndex: n.rowStart
|
|
4377
|
-
}, e),
|
|
4377
|
+
}, e), ne(this._errorSpatial, S, n);
|
|
4378
4378
|
const w = t.spillSpatial;
|
|
4379
4379
|
let y = [], v = [];
|
|
4380
4380
|
for (let t = 0; t < f; t++) {
|
|
@@ -4387,7 +4387,7 @@ var wo = class extends me {
|
|
|
4387
4387
|
const t = (t, e) => {
|
|
4388
4388
|
t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
|
|
4389
4389
|
};
|
|
4390
|
-
|
|
4390
|
+
rt(a.getCycleId(), v, r.EmptyArray, s._contentfulSpatial, s._spillSpatial, s._values, (t, e, n, r) => {
|
|
4391
4391
|
x.push({
|
|
4392
4392
|
colStart: t,
|
|
4393
4393
|
rowStart: e,
|
|
@@ -4433,7 +4433,7 @@ var wo = class extends me {
|
|
|
4433
4433
|
}
|
|
4434
4434
|
}
|
|
4435
4435
|
e && (t = i.concat(e)), t.sort(o.columnFirstRangeComparator);
|
|
4436
|
-
const n = new
|
|
4436
|
+
const n = new ht.Builder((t, e) => new dt.ArrayList(t.slice(0, e)));
|
|
4437
4437
|
let r;
|
|
4438
4438
|
const s = !0 === this._container.getDeferred?.()?.hasHolders(), a = this._values, c = a.getAxis() === E.Axis.Column, d = t.length;
|
|
4439
4439
|
for (let e = 0; e < d; e++) {
|
|
@@ -4530,9 +4530,9 @@ var wo = class extends me {
|
|
|
4530
4530
|
const i = e.search(o), a = i.length;
|
|
4531
4531
|
for (let e = 0; e < a; e++) {
|
|
4532
4532
|
let r = i[e];
|
|
4533
|
-
if (
|
|
4533
|
+
if (Be(o.rowStart, o.colStart, r) && (s || r.value.getCycleId() === t)) {
|
|
4534
4534
|
m || (m = [], n = /* @__PURE__ */ new Set());
|
|
4535
|
-
const t =
|
|
4535
|
+
const t = K(r.colStart) + zt(r.rowStart);
|
|
4536
4536
|
if (n.has(t)) continue;
|
|
4537
4537
|
n.add(t);
|
|
4538
4538
|
const e = r.value.getBlockedCoords() ?? o;
|
|
@@ -4567,7 +4567,7 @@ var wo = class extends me {
|
|
|
4567
4567
|
if (t && t.tuples) {
|
|
4568
4568
|
I = t.tuples;
|
|
4569
4569
|
let e = t.bounds;
|
|
4570
|
-
if (e ? (y =
|
|
4570
|
+
if (e ? (y = de(e, f), y.scope = l) : y = {
|
|
4571
4571
|
colStart: Number.MIN_SAFE_INTEGER,
|
|
4572
4572
|
rowStart: Number.MIN_SAFE_INTEGER,
|
|
4573
4573
|
colEnd: Number.MAX_SAFE_INTEGER,
|
|
@@ -4590,19 +4590,19 @@ var wo = class extends me {
|
|
|
4590
4590
|
t.minorStart = n[0];
|
|
4591
4591
|
const r = n[1];
|
|
4592
4592
|
t.minorEnd = t.minorStart + r.length - 1;
|
|
4593
|
-
const s =
|
|
4593
|
+
const s = de(t, f);
|
|
4594
4594
|
s.scope = l, x && c.search(s).length > 0 && x.push(s);
|
|
4595
4595
|
}
|
|
4596
4596
|
}
|
|
4597
4597
|
}
|
|
4598
|
-
v =
|
|
4598
|
+
v = Se(t.tuples, f, l);
|
|
4599
4599
|
}
|
|
4600
4600
|
const C = (t, e) => {
|
|
4601
4601
|
t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
|
|
4602
4602
|
};
|
|
4603
4603
|
if (n || I) {
|
|
4604
4604
|
let t;
|
|
4605
|
-
n && (t =
|
|
4605
|
+
n && (t = O(n, g, _, S, C, !1, !0, this._notifyValues, (t, e, n, r) => {
|
|
4606
4606
|
w.push({
|
|
4607
4607
|
colStart: t,
|
|
4608
4608
|
rowStart: e,
|
|
@@ -4610,7 +4610,7 @@ var wo = class extends me {
|
|
|
4610
4610
|
rowEnd: r,
|
|
4611
4611
|
scope: l
|
|
4612
4612
|
});
|
|
4613
|
-
})),
|
|
4613
|
+
})), rt(-1, n ? [n] : r.EmptyArray, v, S, g, _, (t, e, n, r) => {
|
|
4614
4614
|
w.push({
|
|
4615
4615
|
colStart: t,
|
|
4616
4616
|
rowStart: e,
|
|
@@ -4618,7 +4618,7 @@ var wo = class extends me {
|
|
|
4618
4618
|
rowEnd: r,
|
|
4619
4619
|
scope: l
|
|
4620
4620
|
});
|
|
4621
|
-
}, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n),
|
|
4621
|
+
}, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n), J(p, n)), t?.(), I && (_.setValues(I), Ct(p, I, f));
|
|
4622
4622
|
}
|
|
4623
4623
|
const b = i.getScope();
|
|
4624
4624
|
let R, A, k, N, M;
|
|
@@ -4626,7 +4626,7 @@ var wo = class extends me {
|
|
|
4626
4626
|
const n = t.rowStart, r = t.colStart;
|
|
4627
4627
|
b && (b.rowIndex = n, b.colIndex = r);
|
|
4628
4628
|
const o = i.createFormulaBlock(l, a, e, n, r), c = new no(t, l, o, i, this._unanchored), d = s?.arrayFixed;
|
|
4629
|
-
d && d.colStart === r && d.rowStart === n && (
|
|
4629
|
+
d && d.colStart === r && d.rowStart === n && ($e(c.getAnchorNode()).fixedRef = {
|
|
4630
4630
|
colStart: d.colStart,
|
|
4631
4631
|
rowStart: d.rowStart,
|
|
4632
4632
|
colEnd: d.colEnd,
|
|
@@ -4662,7 +4662,7 @@ var wo = class extends me {
|
|
|
4662
4662
|
}, T = x ? x.length : 0;
|
|
4663
4663
|
let G;
|
|
4664
4664
|
if (u > 0) {
|
|
4665
|
-
G =
|
|
4665
|
+
G = Zt(u);
|
|
4666
4666
|
for (let t = 0; t < u; t++) {
|
|
4667
4667
|
const n = e[t], r = n.value, s = o.sanitizeRange(n);
|
|
4668
4668
|
G[t] = s, null !== r && F(s, r);
|
|
@@ -4682,7 +4682,7 @@ var wo = class extends me {
|
|
|
4682
4682
|
}
|
|
4683
4683
|
e && i.setDynamics(e);
|
|
4684
4684
|
}
|
|
4685
|
-
let
|
|
4685
|
+
let P = [];
|
|
4686
4686
|
if (R || A) {
|
|
4687
4687
|
N || (N = i.getPrecedents().clone(B)), Po(k, N, R, A), M && Lo(N, M, null);
|
|
4688
4688
|
const t = R ? this._joinInserted(k, N, R, (t) => {
|
|
@@ -4713,7 +4713,7 @@ var wo = class extends me {
|
|
|
4713
4713
|
}
|
|
4714
4714
|
return n;
|
|
4715
4715
|
}(A, x, G) : A;
|
|
4716
|
-
|
|
4716
|
+
rt(-1, e, R, S, g, _, (t, e, n, r) => {
|
|
4717
4717
|
w.push({
|
|
4718
4718
|
colStart: t,
|
|
4719
4719
|
rowStart: e,
|
|
@@ -4725,7 +4725,7 @@ var wo = class extends me {
|
|
|
4725
4725
|
}
|
|
4726
4726
|
if (N && i.setPrecedents(N), k && (R || A || M) && i.setFormulas(k), R) for (let t = 0; t < R.length; t++) {
|
|
4727
4727
|
const e = R[t];
|
|
4728
|
-
|
|
4728
|
+
P.push({
|
|
4729
4729
|
colStart: e.colStart,
|
|
4730
4730
|
rowStart: e.rowStart,
|
|
4731
4731
|
colEnd: e.colEnd,
|
|
@@ -4735,7 +4735,7 @@ var wo = class extends me {
|
|
|
4735
4735
|
}
|
|
4736
4736
|
if (A) for (let t = 0; t < A.length; t++) {
|
|
4737
4737
|
const e = A[t];
|
|
4738
|
-
|
|
4738
|
+
P.push({
|
|
4739
4739
|
colStart: e.colStart,
|
|
4740
4740
|
rowStart: e.rowStart,
|
|
4741
4741
|
colEnd: e.colEnd,
|
|
@@ -4743,7 +4743,7 @@ var wo = class extends me {
|
|
|
4743
4743
|
scope: l
|
|
4744
4744
|
});
|
|
4745
4745
|
}
|
|
4746
|
-
return this._notifyCalcStatus.size() !== m && (i.getDeferred?.()?.noteRepaint(l), i.requestCalculateGrid(l)), w.length > 0 && i.markDirty(w),
|
|
4746
|
+
return this._notifyCalcStatus.size() !== m && (i.getDeferred?.()?.noteRepaint(l), i.requestCalculateGrid(l)), w.length > 0 && i.markDirty(w), P;
|
|
4747
4747
|
}
|
|
4748
4748
|
_rederivePrecedentsNow(t) {
|
|
4749
4749
|
const e = this._container, n = e.getPrecedents().clone();
|
|
@@ -4781,7 +4781,7 @@ var wo = class extends me {
|
|
|
4781
4781
|
const s = n[o];
|
|
4782
4782
|
if (!a(s) || !d(s)) continue;
|
|
4783
4783
|
h = !1;
|
|
4784
|
-
const l =
|
|
4784
|
+
const l = X(c, s, (t, e, n, r) => {
|
|
4785
4785
|
if (!a(t) || !a(e)) return;
|
|
4786
4786
|
const o = {
|
|
4787
4787
|
colStart: n.colStart,
|
|
@@ -4832,8 +4832,8 @@ var wo = class extends me {
|
|
|
4832
4832
|
const e = t.data;
|
|
4833
4833
|
this._values.setValues(e);
|
|
4834
4834
|
const n = this._values.getAxis() === E.Axis.Column;
|
|
4835
|
-
|
|
4836
|
-
const r =
|
|
4835
|
+
Ct(this._errorSpatial, e, n);
|
|
4836
|
+
const r = Se(e, n, this._gridId);
|
|
4837
4837
|
this._contentfulSpatial.load(r);
|
|
4838
4838
|
}
|
|
4839
4839
|
const e = this._gridId, n = this._container, r = n.getPrecedents(), o = n.getFormulas(), s = {
|
|
@@ -4845,9 +4845,9 @@ var wo = class extends me {
|
|
|
4845
4845
|
if (c) {
|
|
4846
4846
|
const t = c.length;
|
|
4847
4847
|
for (let e = 0; e < t; e++) {
|
|
4848
|
-
const t = c[e], n = t[0], r =
|
|
4848
|
+
const t = c[e], n = t[0], r = Bt(n, s).split(":")[0];
|
|
4849
4849
|
d.add(r);
|
|
4850
|
-
const o =
|
|
4850
|
+
const o = j(t, s);
|
|
4851
4851
|
o && h.add(`${o.rowStart},${o.colStart}`);
|
|
4852
4852
|
}
|
|
4853
4853
|
}
|
|
@@ -4855,7 +4855,7 @@ var wo = class extends me {
|
|
|
4855
4855
|
m.colIndex = 0, m.rowIndex = 0, m.gridId = e;
|
|
4856
4856
|
const S = n.isLegacyIntersect();
|
|
4857
4857
|
for (let t = 0; t < u; t++) {
|
|
4858
|
-
const r =
|
|
4858
|
+
const r = j(l[t], s);
|
|
4859
4859
|
r.scope = e;
|
|
4860
4860
|
const o = r.value, i = r.rowStart, a = r.colStart;
|
|
4861
4861
|
m.colIndex = a, m.rowIndex = i;
|
|
@@ -4869,7 +4869,7 @@ var wo = class extends me {
|
|
|
4869
4869
|
for (let t = 0; t < w; t++) {
|
|
4870
4870
|
const n = g[t];
|
|
4871
4871
|
if (I.isError(n)) continue;
|
|
4872
|
-
const o =
|
|
4872
|
+
const o = Lt(b[t], bo[t], Co[t]), s = o.$absColEnd, l = o.$absRowEnd, i = {
|
|
4873
4873
|
colStart: n.colStart,
|
|
4874
4874
|
rowStart: n.rowStart,
|
|
4875
4875
|
colEnd: n.colEnd + (s ? 0 : v),
|
|
@@ -4892,7 +4892,7 @@ var wo = class extends me {
|
|
|
4892
4892
|
if (o.load(_), r.load(f), n.bumpCalcEpochs(!0), i.formulaInserts = this._formulaRecords(_), c) {
|
|
4893
4893
|
const t = [], l = [], a = /* @__PURE__ */ new Map(), d = this._values, h = c.length;
|
|
4894
4894
|
for (let n = 0; n < h; n++) {
|
|
4895
|
-
const r =
|
|
4895
|
+
const r = j(c[n], s), i = r.value ?? "dynamic", h = "error" === i, u = r.colStart, _ = r.rowStart;
|
|
4896
4896
|
Ro.colStart = u, Ro.rowStart = _, Ro.colEnd = u, Ro.rowEnd = _, Ro.scope = e;
|
|
4897
4897
|
const f = o.search(Ro);
|
|
4898
4898
|
if (1 !== f.length) continue;
|
|
@@ -4902,13 +4902,13 @@ var wo = class extends me {
|
|
|
4902
4902
|
colEnd: S,
|
|
4903
4903
|
rowEnd: w
|
|
4904
4904
|
};
|
|
4905
|
-
"fixed" === i && (
|
|
4905
|
+
"fixed" === i && ($e(m).fixedRef = E, p.densify()), m.cachedValue = h ? I.BuiltIn.Spill : new De(g, d, E);
|
|
4906
4906
|
const y = {
|
|
4907
4907
|
colStart: u,
|
|
4908
4908
|
rowStart: _,
|
|
4909
4909
|
colEnd: S,
|
|
4910
4910
|
rowEnd: w,
|
|
4911
|
-
value: new
|
|
4911
|
+
value: new ce(E, 0, i)
|
|
4912
4912
|
};
|
|
4913
4913
|
l.push(y), t.push({
|
|
4914
4914
|
colStart: u,
|
|
@@ -4916,7 +4916,7 @@ var wo = class extends me {
|
|
|
4916
4916
|
colEnd: S,
|
|
4917
4917
|
rowEnd: w,
|
|
4918
4918
|
value: i
|
|
4919
|
-
}),
|
|
4919
|
+
}), D(a, m, E, -2);
|
|
4920
4920
|
}
|
|
4921
4921
|
if (this._spillSpatial.load(l), a.size > 0) {
|
|
4922
4922
|
r.load(Array.from(a.values()).flat()), n.bumpCalcEpochs(!1);
|
|
@@ -4933,19 +4933,19 @@ var wo = class extends me {
|
|
|
4933
4933
|
t.add(e), e.state |= Hn, e.block.calcOnLoad = !0;
|
|
4934
4934
|
}, r = new Array(y);
|
|
4935
4935
|
for (let t = 0; t < y; t++) {
|
|
4936
|
-
const n = E[t], l =
|
|
4936
|
+
const n = E[t], l = _e(n, s);
|
|
4937
4937
|
r[t] = { ...l };
|
|
4938
4938
|
const i = o.search(l), a = i.length;
|
|
4939
4939
|
for (let t = 0; t < a; t++) {
|
|
4940
4940
|
const n = i[t];
|
|
4941
|
-
|
|
4941
|
+
se(n, l, e);
|
|
4942
4942
|
}
|
|
4943
4943
|
}
|
|
4944
4944
|
this._markDirtyRegionsNow(r), w = !0;
|
|
4945
4945
|
}
|
|
4946
|
-
const v = this._contentfulSpatial,
|
|
4947
|
-
let
|
|
4948
|
-
const
|
|
4946
|
+
const v = this._contentfulSpatial, x = !v.isEmpty();
|
|
4947
|
+
let C = null;
|
|
4948
|
+
const b = {
|
|
4949
4949
|
rowStart: 0,
|
|
4950
4950
|
colStart: 0,
|
|
4951
4951
|
rowEnd: 0,
|
|
@@ -4957,23 +4957,23 @@ var wo = class extends me {
|
|
|
4957
4957
|
if (!e) continue;
|
|
4958
4958
|
const n = (e.rowEnd - e.rowStart + 1) * (e.colEnd - e.colStart + 1);
|
|
4959
4959
|
let r = 0;
|
|
4960
|
-
if (
|
|
4961
|
-
|
|
4962
|
-
const t = v.search(
|
|
4960
|
+
if (x) {
|
|
4961
|
+
b.rowStart = e.rowStart, b.colStart = e.colStart, b.rowEnd = e.rowEnd, b.colEnd = e.colEnd;
|
|
4962
|
+
const t = v.search(b);
|
|
4963
4963
|
for (let n = 0; n < t.length; n++) {
|
|
4964
4964
|
const o = t[n];
|
|
4965
4965
|
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);
|
|
4966
4966
|
}
|
|
4967
4967
|
}
|
|
4968
4968
|
const o = r < n && !this._isSavedSpill(e);
|
|
4969
|
-
o && (e.value.uncalculated = !0), (o || e.value?.getError()) && (
|
|
4969
|
+
o && (e.value.uncalculated = !0), (o || e.value?.getError()) && (C ??= []).push({
|
|
4970
4970
|
rowStart: e.rowStart,
|
|
4971
4971
|
colStart: e.colStart,
|
|
4972
4972
|
rowEnd: e.rowEnd,
|
|
4973
4973
|
colEnd: e.colEnd
|
|
4974
4974
|
});
|
|
4975
4975
|
}
|
|
4976
|
-
if (
|
|
4976
|
+
if (C && (this._markDirtyRegionsNow(C), w = !0), a && u > 0) {
|
|
4977
4977
|
const t = new Array(u);
|
|
4978
4978
|
for (let e = 0; e < u; e++) {
|
|
4979
4979
|
const n = _[e];
|
|
@@ -5016,7 +5016,7 @@ var wo = class extends me {
|
|
|
5016
5016
|
}
|
|
5017
5017
|
_toJSONNow(e) {
|
|
5018
5018
|
let n = this._container.getFormulas().getSpatialAt(this._gridId)?.all(), r = n ? n.length : 0;
|
|
5019
|
-
r > 0 && (n =
|
|
5019
|
+
r > 0 && (n = y(n, t.Column, 2, Bo), n.sort(o.rowFirstRangeComparator)), r = n ? n.length : 0;
|
|
5020
5020
|
const s = this._hiddenRows, l = this._hiddenColumns, i = this._filtered;
|
|
5021
5021
|
if (0 === r && !s && !l && !i) return null;
|
|
5022
5022
|
const a = {};
|
|
@@ -5033,7 +5033,7 @@ var wo = class extends me {
|
|
|
5033
5033
|
if (d > 0) {
|
|
5034
5034
|
const t = this.getEntireCoords(), e = new Array(d);
|
|
5035
5035
|
for (let n = 0; n < d; n++) {
|
|
5036
|
-
const r = c[n], o =
|
|
5036
|
+
const r = c[n], o = Ne(r, t);
|
|
5037
5037
|
e[n] = [o, r.value.getKind()];
|
|
5038
5038
|
}
|
|
5039
5039
|
a.formulaArray = e;
|
|
@@ -5043,7 +5043,7 @@ var wo = class extends me {
|
|
|
5043
5043
|
if (h.size > 0) {
|
|
5044
5044
|
const t = h.values();
|
|
5045
5045
|
let e = t.next();
|
|
5046
|
-
const n = this._values.getAxis() === E.Axis.Column, r =
|
|
5046
|
+
const n = this._values.getAxis() === E.Axis.Column, r = b(!0);
|
|
5047
5047
|
for (; !e.done;) {
|
|
5048
5048
|
const o = e.value;
|
|
5049
5049
|
if (e = t.next(), o.gridId !== u) continue;
|
|
@@ -5067,14 +5067,14 @@ var wo = class extends me {
|
|
|
5067
5067
|
}
|
|
5068
5068
|
};
|
|
5069
5069
|
f.isEmpty() || n(f.all());
|
|
5070
|
-
const r = g.isEmpty() ? [] : g.all().filter((t) => t.value ===
|
|
5071
|
-
r.length > 0 && n(r), p.length > 0 && n(p), _ =
|
|
5070
|
+
const r = g.isEmpty() ? [] : g.all().filter((t) => t.value === Nt.CalcStatus.Working);
|
|
5071
|
+
r.length > 0 && n(r), p.length > 0 && n(p), _ = y(e, t.Column, 2);
|
|
5072
5072
|
}
|
|
5073
5073
|
const m = _ ? _.length : 0;
|
|
5074
5074
|
if (m > 0) {
|
|
5075
5075
|
const t = new Array(m);
|
|
5076
5076
|
for (let e = 0; e < m; e++) {
|
|
5077
|
-
const n = _[e], r =
|
|
5077
|
+
const n = _[e], r = Ne(n, this.getEntireCoords());
|
|
5078
5078
|
t[e] = r;
|
|
5079
5079
|
}
|
|
5080
5080
|
a.volatile = t;
|
|
@@ -5188,25 +5188,25 @@ function Lo(t, e, n) {
|
|
|
5188
5188
|
const s = [];
|
|
5189
5189
|
for (let t = 0; t < o; t++) {
|
|
5190
5190
|
const n = e[t], r = [], o = s.length;
|
|
5191
|
-
|
|
5191
|
+
Ft(n, s, r), s.length > o && (n.value.registeredPrecedents = s.slice(o));
|
|
5192
5192
|
}
|
|
5193
5193
|
t.load(s);
|
|
5194
5194
|
}
|
|
5195
5195
|
To.fill(null, 0, 10);
|
|
5196
5196
|
var $o = (t) => {
|
|
5197
5197
|
let e = !1;
|
|
5198
|
-
if (
|
|
5199
|
-
if (e || t instanceof
|
|
5198
|
+
if (ve.forEachLeaf(t, (t, n, r, o) => {
|
|
5199
|
+
if (e || t instanceof Rt) return;
|
|
5200
5200
|
let s = n + o - r;
|
|
5201
5201
|
!0 === t.isIRepeatingList && (s = Math.min(s, n + t.getPeriod() - 1));
|
|
5202
|
-
for (let r = n; !e && r <= s; r++) e =
|
|
5202
|
+
for (let r = n; !e && r <= s; r++) e = bt(t.at(r));
|
|
5203
5203
|
}), !e) return t;
|
|
5204
5204
|
const n = t.length, r = new Array(n);
|
|
5205
|
-
for (let e = 0; e < n; e++) r[e] =
|
|
5206
|
-
return new
|
|
5205
|
+
for (let e = 0; e < n; e++) r[e] = Pt(t.at(e));
|
|
5206
|
+
return new dt.ArrayList(r);
|
|
5207
5207
|
}, Ho = (t, e, n) => {
|
|
5208
5208
|
const r = n?.fetchedFrom;
|
|
5209
|
-
if (!t) return new
|
|
5209
|
+
if (!t) return new Et({
|
|
5210
5210
|
source: { buffer: e },
|
|
5211
5211
|
fetchedFrom: r
|
|
5212
5212
|
});
|
|
@@ -5247,18 +5247,18 @@ var $o = (t) => {
|
|
|
5247
5247
|
}
|
|
5248
5248
|
}
|
|
5249
5249
|
_moved() {
|
|
5250
|
-
|
|
5250
|
+
A(), this._onMoved?.(this);
|
|
5251
5251
|
}
|
|
5252
5252
|
_final() {
|
|
5253
5253
|
const t = this._onFinal;
|
|
5254
5254
|
this._onFinal = null, t?.(this);
|
|
5255
5255
|
}
|
|
5256
|
-
}, Ko = (t) => t, qo = (t, e) =>
|
|
5256
|
+
}, Ko = (t) => t, qo = (t, e) => Jt.fromJSON({
|
|
5257
5257
|
type: t,
|
|
5258
5258
|
data: e
|
|
5259
|
-
}),
|
|
5259
|
+
}), Wo = (t, e) => globalThis.fetch(t, e), Uo = () => {
|
|
5260
5260
|
throw new Error("getFormulaContext() needs a workbook being calculated");
|
|
5261
|
-
}, Xo = () => Promise.reject(/* @__PURE__ */ new Error("parseText() needs a workbook being calculated")), Jo = (t, e) => Ho(null, t, e),
|
|
5261
|
+
}, Xo = () => Promise.reject(/* @__PURE__ */ new Error("parseText() needs a workbook being calculated")), Jo = (t, e) => Ho(null, t, e), Zo = class {
|
|
5262
5262
|
constructor(t, e, n, r = null, o = 100, s = Ko, l, i = null) {
|
|
5263
5263
|
this._nextId = 1, this._calls = /* @__PURE__ */ new Map(), this._holders = !1, this._current = [], this._made = [], this._batch = /* @__PURE__ */ new Map(), this._states = /* @__PURE__ */ new Map(), this._moved = /* @__PURE__ */ new Set(), this._settleTimer = null, this._settledAt = 0, this._repaintGrids = /* @__PURE__ */ new Set(), this._settleDirty = [], this._serving = !1, this._external = !1, this.previous = void 0, this._waiters = /* @__PURE__ */ new Set(), this._scope = t, this._onCountsChange = i, this._heldAt = e, this._getRandom = n, this._onSettle = r, this._settleWindow = o, this._normalize = s;
|
|
5264
5264
|
const a = this._moved;
|
|
@@ -5278,8 +5278,8 @@ var $o = (t) => {
|
|
|
5278
5278
|
byPayload: ts,
|
|
5279
5279
|
createRichData: l?.createRichData ?? qo,
|
|
5280
5280
|
addResource: l?.addResource ?? Jo,
|
|
5281
|
-
fetch: l?.fetch ??
|
|
5282
|
-
getFormulaContext: l?.getFormulaContext ??
|
|
5281
|
+
fetch: l?.fetch ?? Wo,
|
|
5282
|
+
getFormulaContext: l?.getFormulaContext ?? Uo,
|
|
5283
5283
|
parseText: l?.parseText ?? Xo
|
|
5284
5284
|
};
|
|
5285
5285
|
const h = this._deferContext.fetch;
|
|
@@ -5369,7 +5369,7 @@ var $o = (t) => {
|
|
|
5369
5369
|
}, t);
|
|
5370
5370
|
}
|
|
5371
5371
|
newHolder(t, e) {
|
|
5372
|
-
return this._holders = !0, new
|
|
5372
|
+
return this._holders = !0, new Gt(t, e.calls, e.direct);
|
|
5373
5373
|
}
|
|
5374
5374
|
defer(t, e, n = null, r = !1) {
|
|
5375
5375
|
const o = this._scope, s = o.deferOrdinal++;
|
|
@@ -5412,12 +5412,12 @@ var $o = (t) => {
|
|
|
5412
5412
|
try {
|
|
5413
5413
|
o = n(e, t);
|
|
5414
5414
|
} catch (t) {
|
|
5415
|
-
|
|
5415
|
+
Qo(e, t);
|
|
5416
5416
|
continue;
|
|
5417
5417
|
} finally {
|
|
5418
5418
|
this._setCurrent(null);
|
|
5419
5419
|
}
|
|
5420
|
-
o && "function" == typeof o.then && o.then(void 0, (t) =>
|
|
5420
|
+
o && "function" == typeof o.then && o.then(void 0, (t) => Qo(e, t));
|
|
5421
5421
|
}
|
|
5422
5422
|
}
|
|
5423
5423
|
}
|
|
@@ -5445,11 +5445,11 @@ var $o = (t) => {
|
|
|
5445
5445
|
const e = this._scope, n = e.node;
|
|
5446
5446
|
if (!n || !this._holders || !e.gridId) return;
|
|
5447
5447
|
let r = this._heldAt(e.gridId, e.rowIndex, e.colIndex);
|
|
5448
|
-
return null === r &&
|
|
5448
|
+
return null === r && bt(n.cachedValue) && (r = n.cachedValue), null !== r ? r.calls[t] : void 0;
|
|
5449
5449
|
}
|
|
5450
|
-
},
|
|
5450
|
+
}, Qo = (t, e) => {
|
|
5451
5451
|
for (const n of t) n.isOpen() && n.reject(e);
|
|
5452
|
-
},
|
|
5452
|
+
}, Yo = Symbol("-0"), ts = async (t, e) => {
|
|
5453
5453
|
const n = /* @__PURE__ */ new Map(), r = [], o = [];
|
|
5454
5454
|
for (const e of t) {
|
|
5455
5455
|
const t = e.payload;
|
|
@@ -5465,7 +5465,7 @@ var $o = (t) => {
|
|
|
5465
5465
|
}
|
|
5466
5466
|
continue;
|
|
5467
5467
|
}
|
|
5468
|
-
const s = Object.is(t, -0) ?
|
|
5468
|
+
const s = Object.is(t, -0) ? Yo : t, l = n.get(s);
|
|
5469
5469
|
if (l) l.push(e);
|
|
5470
5470
|
else {
|
|
5471
5471
|
const r = {
|
|
@@ -5539,7 +5539,7 @@ var $o = (t) => {
|
|
|
5539
5539
|
}
|
|
5540
5540
|
_grow() {
|
|
5541
5541
|
const t = this._keys, e = this._values, n = this._order, r = this.size, o = Math.max(64, 2 * (this._mask + 1));
|
|
5542
|
-
this._keys = new Float64Array(o).fill(-1), this._values =
|
|
5542
|
+
this._keys = new Float64Array(o).fill(-1), this._values = ue(o), this._order = new Int32Array(o), this._mask = o - 1;
|
|
5543
5543
|
for (let o = 0; o < r; o++) {
|
|
5544
5544
|
const r = t[n[o]], s = Math.floor(r / ns), l = this._slotOf(s, r - s * ns, r);
|
|
5545
5545
|
this._keys[l] = r, this._values[l] = e[n[o]], this._order[o] = l;
|
|
@@ -5933,7 +5933,7 @@ var is = {
|
|
|
5933
5933
|
const e = this.getRuns(t ? { bounds: t } : void 0);
|
|
5934
5934
|
let n = e.next();
|
|
5935
5935
|
if (n.done) return null;
|
|
5936
|
-
const r = new
|
|
5936
|
+
const r = new ht.Builder();
|
|
5937
5937
|
for (; !n.done;) r.pushMultipleAt(n.value[0], n.value[1], n.value[2]), n = e.next();
|
|
5938
5938
|
return r.build();
|
|
5939
5939
|
}
|
|
@@ -6225,8 +6225,8 @@ var Es = class {
|
|
|
6225
6225
|
}, this._passHook = (t, e, n, r, o, s) => this._onPassRead(t, e, n, r, o, !0 === s), this._taintDownstream = (t) => {
|
|
6226
6226
|
if (0 !== (t.state & qn)) return;
|
|
6227
6227
|
t.state = t.state & ~Kn | $n | sr | ir;
|
|
6228
|
-
const e =
|
|
6229
|
-
e.cycleGroup = this._taintGroup, e.demandValue =
|
|
6228
|
+
const e = $e(t);
|
|
6229
|
+
e.cycleGroup = this._taintGroup, e.demandValue = Qs(t), this._addCircular(t);
|
|
6230
6230
|
};
|
|
6231
6231
|
}
|
|
6232
6232
|
execute(t, e, n) {
|
|
@@ -6279,17 +6279,17 @@ var Es = class {
|
|
|
6279
6279
|
dynamicByBlock: m,
|
|
6280
6280
|
lastUpdates: new Map(S)
|
|
6281
6281
|
};
|
|
6282
|
-
const
|
|
6282
|
+
const R = /* @__PURE__ */ new Map();
|
|
6283
6283
|
this._addDynamicPrecedent = (t, e, n) => {
|
|
6284
|
-
t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn),
|
|
6284
|
+
t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn), D(R, t, e, n));
|
|
6285
6285
|
};
|
|
6286
|
-
const
|
|
6286
|
+
const A = /* @__PURE__ */ new Map(), k = (t, e) => {
|
|
6287
6287
|
(function(t, e, n, r) {
|
|
6288
6288
|
if (0 === e) return;
|
|
6289
6289
|
let o, s, l, i = Rs, a = [];
|
|
6290
6290
|
const c = /* @__PURE__ */ new Set(), d = () => {
|
|
6291
6291
|
const t = o.build();
|
|
6292
|
-
t && t.tuples && (l.values.setValues(t.tuples),
|
|
6292
|
+
t && t.tuples && (l.values.setValues(t.tuples), Ct(l.errorSpatial, t.tuples, r));
|
|
6293
6293
|
const e = s.done(!0);
|
|
6294
6294
|
for (let t = 0; t < e.length; t++) {
|
|
6295
6295
|
const n = e[t];
|
|
@@ -6315,7 +6315,7 @@ var Es = class {
|
|
|
6315
6315
|
t.length = e, t.sort(Ns);
|
|
6316
6316
|
for (let h = 0; h < e; h++) {
|
|
6317
6317
|
const e = t[h], u = e.colIndex, _ = e.rowIndex, f = e.gridId;
|
|
6318
|
-
f || console.log("nodeGridId is null", e), f !== i && (i !== Rs && d(), o = new
|
|
6318
|
+
f || console.log("nodeGridId is null", e), f !== i && (i !== Rs && d(), o = new ht.Builder(Is), s = b(r), i = f, l = n(f));
|
|
6319
6319
|
const g = u, p = _, m = e.cachedValue;
|
|
6320
6320
|
m?.isIRange || (o.pushAt(g, p, m), s.append(g, p));
|
|
6321
6321
|
const S = e.block, w = e.numFmt;
|
|
@@ -6336,7 +6336,7 @@ var Es = class {
|
|
|
6336
6336
|
}
|
|
6337
6337
|
});
|
|
6338
6338
|
}
|
|
6339
|
-
} else null !== w && (l.formatsConflating || (l.formatsConflating =
|
|
6339
|
+
} else null !== w && (l.formatsConflating || (l.formatsConflating = b(r)), l.formatsConflating.append(g, p, w));
|
|
6340
6340
|
}
|
|
6341
6341
|
d();
|
|
6342
6342
|
})(t, e, _, !0);
|
|
@@ -6344,23 +6344,23 @@ var Es = class {
|
|
|
6344
6344
|
const e = t[n];
|
|
6345
6345
|
e.state = e.state & ~Kn | sr;
|
|
6346
6346
|
}
|
|
6347
|
-
for (const [t, e] of S)
|
|
6347
|
+
for (const [t, e] of S) A.set(t, e);
|
|
6348
6348
|
S.clear();
|
|
6349
6349
|
};
|
|
6350
|
-
let
|
|
6351
|
-
|
|
6352
|
-
let
|
|
6350
|
+
let N = r, M = Wl;
|
|
6351
|
+
M.length = 0;
|
|
6352
|
+
let F = 0, T = !1;
|
|
6353
6353
|
do {
|
|
6354
|
-
++y, I(), this.doMarkAndPlan(t, y, v,
|
|
6355
|
-
const e = this.doEvaluate(t, _,
|
|
6356
|
-
|
|
6357
|
-
} while (
|
|
6354
|
+
++y, I(), this.doMarkAndPlan(t, y, v, M);
|
|
6355
|
+
const e = this.doEvaluate(t, _, k, N, M);
|
|
6356
|
+
T = void 0 !== e, T && (N = !1, ++y, v.length = 0, this.doCollectDirtyCalcs(t, y, e.all(), v, c, g, w), F > 200 && (++y, I(), this.doMarkAndPlan(t, y, v, M, !0), this.doEvaluate(t, _, k, !1, M), this._hasCycle() || console.error("Too many iterations, possible cycle or leak"), T = !1)), F++;
|
|
6357
|
+
} while (T);
|
|
6358
6358
|
for (const t of E) {
|
|
6359
|
-
if (
|
|
6359
|
+
if (R.has(t)) continue;
|
|
6360
6360
|
const e = m.get(t);
|
|
6361
6361
|
e && (g.removeAll(e, Go), m === p && (m = new Map(m)), m.delete(t));
|
|
6362
6362
|
}
|
|
6363
|
-
if (
|
|
6363
|
+
if (R.size > 0) if (function(t, e, n) {
|
|
6364
6364
|
for (const e of n) if (!t.has(e)) return !1;
|
|
6365
6365
|
for (const [n, r] of t) {
|
|
6366
6366
|
const t = e.get(n);
|
|
@@ -6379,21 +6379,21 @@ var Es = class {
|
|
|
6379
6379
|
}
|
|
6380
6380
|
}
|
|
6381
6381
|
return !0;
|
|
6382
|
-
}(
|
|
6382
|
+
}(R, p, E)) g = f, m = p, R.clear();
|
|
6383
6383
|
else {
|
|
6384
6384
|
g === f && (g = g.clone()), m === p && (m = new Map(m));
|
|
6385
|
-
for (const t of
|
|
6385
|
+
for (const t of R.keys()) {
|
|
6386
6386
|
const e = m.get(t);
|
|
6387
6387
|
e && g.removeAll(e, Go);
|
|
6388
6388
|
}
|
|
6389
|
-
g.load(Array.from(
|
|
6390
|
-
for (const [t, e] of
|
|
6391
|
-
|
|
6389
|
+
g.load(Array.from(R.values()).flat());
|
|
6390
|
+
for (const [t, e] of R) m.set(t, e);
|
|
6391
|
+
R.clear();
|
|
6392
6392
|
}
|
|
6393
6393
|
return this._gridUpdates = null, this._addDynamicPrecedent = null, this._context._setDynamicReadHook(null), this._passActive = !1, u.getDeferred?.()?.flush(), {
|
|
6394
6394
|
precedentSpatial: g,
|
|
6395
6395
|
dynamicByBlock: m,
|
|
6396
|
-
lastUpdates:
|
|
6396
|
+
lastUpdates: A,
|
|
6397
6397
|
skippedTables: this._takeSkippedTables()
|
|
6398
6398
|
};
|
|
6399
6399
|
}
|
|
@@ -6406,7 +6406,7 @@ var Es = class {
|
|
|
6406
6406
|
if (r?.isIRange && r.size > 1) {
|
|
6407
6407
|
if (e.uncalculated) return;
|
|
6408
6408
|
const o = t.rowIndex, s = t.colIndex;
|
|
6409
|
-
return new
|
|
6409
|
+
return new De(this._container.getRuntime(), n.getValues().clone(), {
|
|
6410
6410
|
rowStart: o,
|
|
6411
6411
|
colStart: s,
|
|
6412
6412
|
rowEnd: o + r.getRowCount() - 1,
|
|
@@ -6424,7 +6424,7 @@ var Es = class {
|
|
|
6424
6424
|
const o = n.endEvaluation(), s = o.calls;
|
|
6425
6425
|
if (0 === s.length) return e;
|
|
6426
6426
|
for (let e = 0; e < s.length; e++) if (s[e].isOpen()) {
|
|
6427
|
-
t.state |=
|
|
6427
|
+
t.state |= Yn | er;
|
|
6428
6428
|
break;
|
|
6429
6429
|
}
|
|
6430
6430
|
const l = n.newHolder(e, o);
|
|
@@ -6450,12 +6450,12 @@ var Es = class {
|
|
|
6450
6450
|
const a = this._container.getFormulas().search(js), c = a.length, d = null !== this._iterate, h = this._container.getScope().node, u = null !== h && 0 !== (h.state & Jn);
|
|
6451
6451
|
let _ = 0, f = null, g = !1, p = !1;
|
|
6452
6452
|
const m = (t) => {
|
|
6453
|
-
if (t.cycleId !== l || t.markId !== i) return void (d || 0 === (t.state &
|
|
6453
|
+
if (t.cycleId !== l || t.markId !== i) return void (d || 0 === (t.state & Wn) || (s ? p = !0 : this._demandActive ? this._markDownstream(t) : f = t));
|
|
6454
6454
|
let e = t.state & Kn;
|
|
6455
6455
|
if (768 !== e || g || (this._flush?.(), g = !0, e = t.state & Kn), e !== or) 0 === e || 768 === e ? cl[_++] = t : 0 !== (t.state & qn) && (s ? p = !0 : d && this._demandActive ? this._onMemberRead(t) : d || this._demandActive ? this._markDownstream(t) : f = t);
|
|
6456
6456
|
else if (s) p = !0;
|
|
6457
6457
|
else {
|
|
6458
|
-
if (u || (t.state &= ~Jn), !d || !this._demandActive) throw new
|
|
6458
|
+
if (u || (t.state &= ~Jn), !d || !this._demandActive) throw new Pe(t);
|
|
6459
6459
|
0 === (t.state & jn) && (t.state |= jn, _l[this._iterHitsLength++] = t);
|
|
6460
6460
|
}
|
|
6461
6461
|
};
|
|
@@ -6474,13 +6474,13 @@ var Es = class {
|
|
|
6474
6474
|
}
|
|
6475
6475
|
c.forEachNodeIn(d, h, u, _, m);
|
|
6476
6476
|
}
|
|
6477
|
-
if (_ > 0) throw new
|
|
6478
|
-
if (f) throw new
|
|
6477
|
+
if (_ > 0) throw new Le(cl, _);
|
|
6478
|
+
if (f) throw new Ke(f);
|
|
6479
6479
|
return p;
|
|
6480
6480
|
}
|
|
6481
6481
|
_markDownstream(t) {
|
|
6482
6482
|
const e = this._container.getScope().node;
|
|
6483
|
-
e && 0 === (e.state & qn) && (e.state = e.state & ~qn | ir,
|
|
6483
|
+
e && 0 === (e.state & qn) && (e.state = e.state & ~qn | ir, $e(e).cycleGroup = this._resolveGroup(Zs(t)), this._addCircular(e), this._iterate && (pl[this._iterDownstreamLength++] = e));
|
|
6484
6484
|
}
|
|
6485
6485
|
_onMemberRead(t) {
|
|
6486
6486
|
const e = t.state;
|
|
@@ -6577,7 +6577,7 @@ var Es = class {
|
|
|
6577
6577
|
};
|
|
6578
6578
|
this._whatIf = c;
|
|
6579
6579
|
try {
|
|
6580
|
-
const n =
|
|
6580
|
+
const n = Je(e, t), r = Ue({
|
|
6581
6581
|
container: e,
|
|
6582
6582
|
evaluate: (t) => this._evaluateWhatIf(t),
|
|
6583
6583
|
layerFor: d
|
|
@@ -6600,12 +6600,12 @@ var Es = class {
|
|
|
6600
6600
|
if (!n) return t.cachedValue ?? null;
|
|
6601
6601
|
const r = this._container.getScope();
|
|
6602
6602
|
let o;
|
|
6603
|
-
Ln(t,
|
|
6603
|
+
Ln(t, Ye(t)), r.gridId = t.gridId, r.node = t, r.rowIndex = t.rowIndex, r.colIndex = t.colIndex, r.drawIndex = 0;
|
|
6604
6604
|
try {
|
|
6605
6605
|
const e = r.deferCount;
|
|
6606
6606
|
o = n.finalizeValueForCell(n.evaluateAt(t.rowIndex, t.colIndex)), r.deferCount !== e && (o = this._takeDeferred(t, o));
|
|
6607
6607
|
} catch (e) {
|
|
6608
|
-
if (!(e instanceof
|
|
6608
|
+
if (!(e instanceof ee)) throw e;
|
|
6609
6609
|
o = t.cachedValue ?? null;
|
|
6610
6610
|
}
|
|
6611
6611
|
return this._fitCell(e, o);
|
|
@@ -6643,11 +6643,11 @@ var Es = class {
|
|
|
6643
6643
|
o.blankValue = e, o.blankCycleId = s, o.blankMarkId = l;
|
|
6644
6644
|
const _ = o.getTouchedCached().blank, f = t.gridId, g = n.values, p = n.errorSpatial, m = this._container.getGrid(f);
|
|
6645
6645
|
if (null !== m && null !== m.getShadowOf()) return void vs(_, n, f);
|
|
6646
|
-
const S = g.getAxis() === E.Axis.Column, w = S ? E.Axis.Column : E.Axis.Row, I = qs, y =
|
|
6646
|
+
const S = g.getAxis() === E.Axis.Column, w = S ? E.Axis.Column : E.Axis.Row, I = qs, y = Ws;
|
|
6647
6647
|
for (let t = 0; t < _.length; t++) {
|
|
6648
|
-
const n = _[t], r = S ? n.colStart : n.rowStart, o = S ? n.colEnd : n.rowEnd, s = S ? n.rowStart : n.colStart, l = S ? n.rowEnd - n.rowStart + 1 : n.colEnd - n.colStart + 1, i = new
|
|
6648
|
+
const n = _[t], r = S ? n.colStart : n.rowStart, o = S ? n.colEnd : n.rowEnd, s = S ? n.rowStart : n.colStart, l = S ? n.rowEnd - n.rowStart + 1 : n.colEnd - n.colStart + 1, i = new Re([e], l), a = new Array(o - r + 1);
|
|
6649
6649
|
for (let t = r; t <= o; t++) a[t - r] = [t, [[s, i]]];
|
|
6650
|
-
g.setValues(a),
|
|
6650
|
+
g.setValues(a), J(p, n), Ct(p, a, S);
|
|
6651
6651
|
const c = {
|
|
6652
6652
|
colStart: n.colStart,
|
|
6653
6653
|
rowStart: n.rowStart,
|
|
@@ -6657,7 +6657,7 @@ var Es = class {
|
|
|
6657
6657
|
};
|
|
6658
6658
|
I.push({
|
|
6659
6659
|
...c,
|
|
6660
|
-
value: new
|
|
6660
|
+
value: new tt(c, w)
|
|
6661
6661
|
}), y.push(c);
|
|
6662
6662
|
}
|
|
6663
6663
|
n.contentfulSpatial.insertAllNonOverlapping(I), n.notifyValues.insertAllNonOverlapping(y), I.length = 0, y.length = 0, o.setBlankShared(_), this._dirtyBlankReaders(f, _, u === e ? h : null);
|
|
@@ -6669,7 +6669,7 @@ var Es = class {
|
|
|
6669
6669
|
for (let t = 0; t < e.length; t++) null === n ? o.push(e[t]) : Hr(e[t], n, o);
|
|
6670
6670
|
for (let e = 0; e < o.length; e++) {
|
|
6671
6671
|
const n = o[e];
|
|
6672
|
-
s.colStart = n.colStart, s.rowStart = n.rowStart, s.colEnd = n.colEnd, s.rowEnd = n.rowEnd, 0 !== r.search(s).length && (this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6672
|
+
s.colStart = n.colStart, s.rowStart = n.rowStart, s.colEnd = n.colEnd, s.rowEnd = n.rowEnd, 0 !== r.search(s).length && (this._fallbackDirty ?? (this._fallbackDirty = new me())).insertNonOverlapping({
|
|
6673
6673
|
colStart: n.colStart,
|
|
6674
6674
|
rowStart: n.rowStart,
|
|
6675
6675
|
colEnd: n.colEnd,
|
|
@@ -6686,7 +6686,7 @@ var Es = class {
|
|
|
6686
6686
|
xs(t, n.blank, e);
|
|
6687
6687
|
const r = t.getDemandedBlank();
|
|
6688
6688
|
if (0 === r.length) return;
|
|
6689
|
-
const o = this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6689
|
+
const o = this._fallbackDirty ?? (this._fallbackDirty = new me()), s = t.gridId, l = Us;
|
|
6690
6690
|
for (let t = 0; t < r.length; t++) {
|
|
6691
6691
|
const e = r[t];
|
|
6692
6692
|
l.push({
|
|
@@ -6705,7 +6705,7 @@ var Es = class {
|
|
|
6705
6705
|
if (null === n) return;
|
|
6706
6706
|
const r = n.blank;
|
|
6707
6707
|
if (0 === r.length) return;
|
|
6708
|
-
const o = this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6708
|
+
const o = this._fallbackDirty ?? (this._fallbackDirty = new me()), s = t.gridId, l = Us;
|
|
6709
6709
|
for (let t = 0; t < r.length; t++) {
|
|
6710
6710
|
const e = r[t];
|
|
6711
6711
|
l.push({
|
|
@@ -6753,12 +6753,12 @@ var Es = class {
|
|
|
6753
6753
|
let r;
|
|
6754
6754
|
0 === n && (e.state = -131841 & e.state | or | $n, this._addCircular(e));
|
|
6755
6755
|
let d = null, h = !1;
|
|
6756
|
-
Ln(e,
|
|
6756
|
+
Ln(e, Ye(e)), e.state &= -65, s.node = e, s.gridId = e.gridId, s.rowIndex = e.rowIndex, s.colIndex = e.colIndex, s.drawIndex = 0, l.evaluations++, h = e.block.representative === e && e.block.isBlankAware(this._passCycleId), s.perCellRead = !1, s.positionRead = !1, o._setReadHook(this._passHook);
|
|
6757
6757
|
try {
|
|
6758
6758
|
const t = e.block.formula, n = s.deferCount;
|
|
6759
6759
|
r = t.evaluateAt(e.rowIndex, e.colIndex), r = this._fitCell(e.block, t.finalizeValueForCell(r)), s.deferCount !== n && (r = this._takeDeferred(e, r)), r?.isIRange && r.getValueAt(0, 0);
|
|
6760
6760
|
} catch (t) {
|
|
6761
|
-
if (!(t instanceof
|
|
6761
|
+
if (!(t instanceof Le || t instanceof Pe || t instanceof Ke)) throw t;
|
|
6762
6762
|
d = t;
|
|
6763
6763
|
} finally {
|
|
6764
6764
|
o._setReadHook(null);
|
|
@@ -6779,14 +6779,14 @@ var Es = class {
|
|
|
6779
6779
|
}
|
|
6780
6780
|
this._iterHitsLength = 0;
|
|
6781
6781
|
}
|
|
6782
|
-
if (d instanceof
|
|
6782
|
+
if (d instanceof Le) {
|
|
6783
6783
|
if (0 !== (e.state & Jn)) {
|
|
6784
6784
|
this._unstartPrefetched(e), a = this._unwindSpeculative(i, a - 1);
|
|
6785
6785
|
continue;
|
|
6786
6786
|
}
|
|
6787
6787
|
l.retries++;
|
|
6788
6788
|
let t = 0;
|
|
6789
|
-
const n =
|
|
6789
|
+
const n = je(e), r = n.length;
|
|
6790
6790
|
for (let o = 0; o < r; o++) {
|
|
6791
6791
|
const r = n[o];
|
|
6792
6792
|
if (I.isError(r)) continue;
|
|
@@ -6795,16 +6795,16 @@ var Es = class {
|
|
|
6795
6795
|
}
|
|
6796
6796
|
for (let e = 0; e < t; e++) {
|
|
6797
6797
|
const t = c[e];
|
|
6798
|
-
0 === (t.state & (Kn |
|
|
6798
|
+
0 === (t.state & (Kn | Zn)) && (t.state |= Jn | Zn, i[a++] = t);
|
|
6799
6799
|
}
|
|
6800
6800
|
const o = d.nodes, s = d.count;
|
|
6801
6801
|
for (let t = 0; t < s; t++) {
|
|
6802
6802
|
const e = o[t];
|
|
6803
|
-
0 === (e.state & Kn) && (e.state = e.state & ~Jn |
|
|
6803
|
+
0 === (e.state & Kn) && (e.state = e.state & ~Jn | Zn, i[a++] = e);
|
|
6804
6804
|
}
|
|
6805
6805
|
continue;
|
|
6806
6806
|
}
|
|
6807
|
-
if (d instanceof
|
|
6807
|
+
if (d instanceof Pe) {
|
|
6808
6808
|
if (0 !== (e.state & Jn)) {
|
|
6809
6809
|
this._unstartPrefetched(e), a = this._unwindSpeculative(i, a - 1);
|
|
6810
6810
|
continue;
|
|
@@ -6818,24 +6818,24 @@ var Es = class {
|
|
|
6818
6818
|
continue;
|
|
6819
6819
|
}
|
|
6820
6820
|
t.state = -66305 & t.state | sr;
|
|
6821
|
-
const n =
|
|
6822
|
-
|
|
6821
|
+
const n = Qs(t);
|
|
6822
|
+
$e(t).demandValue = n, this._pushDemand(t, n);
|
|
6823
6823
|
const r = t.block;
|
|
6824
6824
|
r.representative === t && r.isBlankAware(this._passCycleId) && this._fallbackBlank(r, !1);
|
|
6825
6825
|
}
|
|
6826
6826
|
a = t;
|
|
6827
6827
|
continue;
|
|
6828
6828
|
}
|
|
6829
|
-
if (d instanceof
|
|
6829
|
+
if (d instanceof Ke) {
|
|
6830
6830
|
e.state = -69377 & e.state | sr | ir;
|
|
6831
|
-
const t =
|
|
6832
|
-
n.cycleGroup =
|
|
6831
|
+
const t = Qs(e), n = $e(e);
|
|
6832
|
+
n.cycleGroup = Zs(d.node), n.demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1), a--;
|
|
6833
6833
|
continue;
|
|
6834
6834
|
}
|
|
6835
|
-
if (this._iterate || (e.state & qn) !== ir)
|
|
6835
|
+
if (this._iterate || (e.state & qn) !== ir) $e(e).demandValue = r, this._pushDemand(e, r), h && this._finalizeRepresentative(e, r, t(e.gridId), !1);
|
|
6836
6836
|
else {
|
|
6837
|
-
const t =
|
|
6838
|
-
|
|
6837
|
+
const t = Qs(e);
|
|
6838
|
+
$e(e).demandValue = t, this._pushDemand(e, t), h && this._fallbackBlank(e.block, !1);
|
|
6839
6839
|
}
|
|
6840
6840
|
if (e.state = -66305 & e.state | sr, a--, this._openGroups.size > 0 && (e.state & qn) === lr) {
|
|
6841
6841
|
const t = this._resolveGroup(e.ext.cycleGroup);
|
|
@@ -6867,7 +6867,7 @@ var Es = class {
|
|
|
6867
6867
|
if ((r & Kn) !== or) continue;
|
|
6868
6868
|
if (0 !== (r & Jn)) continue;
|
|
6869
6869
|
l && (r & qn) !== lr && this._addIterMember(e, this._valueOnGrid(e)), e.state = r & ~qn | lr;
|
|
6870
|
-
const o =
|
|
6870
|
+
const o = $e(e);
|
|
6871
6871
|
if (l && (r & qn) === lr) {
|
|
6872
6872
|
const t = this._resolveGroup(o.cycleGroup);
|
|
6873
6873
|
if (t !== s) {
|
|
@@ -6875,9 +6875,9 @@ var Es = class {
|
|
|
6875
6875
|
void 0 !== e && (e < i && (i = e), this._openGroups.delete(t)), this._groupAlias.set(t, s);
|
|
6876
6876
|
}
|
|
6877
6877
|
}
|
|
6878
|
-
o.cycleGroup = s, c ?
|
|
6878
|
+
o.cycleGroup = s, c ? $e(c).cycleNext = e : a = e, c = e;
|
|
6879
6879
|
}
|
|
6880
|
-
return c && (
|
|
6880
|
+
return c && ($e(c).cycleNext = r ?? a), l && this._openGroups.set(s, i), o;
|
|
6881
6881
|
}
|
|
6882
6882
|
_demandSweep(t) {
|
|
6883
6883
|
const e = this._iterate, n = fl, r = e.maxIteration, o = e.maxChange;
|
|
@@ -6945,7 +6945,7 @@ var Es = class {
|
|
|
6945
6945
|
this._iterHitsLength = 0;
|
|
6946
6946
|
}
|
|
6947
6947
|
_demandEvaluateOne(t, e) {
|
|
6948
|
-
const n = this._context, r = this._container.getScope(), o = e.block.formula, s =
|
|
6948
|
+
const n = this._context, r = this._container.getScope(), o = e.block.formula, s = Ye(e);
|
|
6949
6949
|
for (;;) {
|
|
6950
6950
|
Ln(e, s), e.state &= -65, r.node = e, r.gridId = e.gridId, r.rowIndex = e.rowIndex, r.colIndex = e.colIndex, r.drawIndex = 0, this._demandStats.evaluations++;
|
|
6951
6951
|
let l, i = null;
|
|
@@ -6954,7 +6954,7 @@ var Es = class {
|
|
|
6954
6954
|
const t = r.deferCount;
|
|
6955
6955
|
l = this._fitCell(e.block, o.finalizeValueForCell(o.evaluateAt(e.rowIndex, e.colIndex))), r.deferCount !== t && (l = this._takeDeferred(e, l)), l?.isIRange && l.getValueAt(0, 0);
|
|
6956
6956
|
} catch (t) {
|
|
6957
|
-
if (!(t instanceof
|
|
6957
|
+
if (!(t instanceof Le)) throw t;
|
|
6958
6958
|
i = t;
|
|
6959
6959
|
} finally {
|
|
6960
6960
|
n._setReadHook(null);
|
|
@@ -6983,16 +6983,16 @@ var Es = class {
|
|
|
6983
6983
|
return !1;
|
|
6984
6984
|
}
|
|
6985
6985
|
_addCircular(t) {
|
|
6986
|
-
0 === (t.state &
|
|
6986
|
+
0 === (t.state & Un) && (t.state |= Un, dl[this._circularNodesLength++] = t);
|
|
6987
6987
|
}
|
|
6988
6988
|
_resetCircular() {
|
|
6989
6989
|
const t = this._circularNodesLength;
|
|
6990
|
-
for (let e = 0; e < t; e++) dl[e].state &= ~
|
|
6990
|
+
for (let e = 0; e < t; e++) dl[e].state &= ~Un;
|
|
6991
6991
|
this._circularNodesLength = 0;
|
|
6992
6992
|
}
|
|
6993
6993
|
_trackCircular(t, e, n, r, o) {
|
|
6994
|
-
const s =
|
|
6995
|
-
if (s.shownGroup === i && (t.state &
|
|
6994
|
+
const s = $e(t), l = t.state & qn, i = 0 === l ? 0 : s.cycleGroup;
|
|
6995
|
+
if (s.shownGroup === i && (t.state & Wn) === l << 2) return;
|
|
6996
6996
|
if (this._cycleEpoch++, 0 !== s.shownGroup) {
|
|
6997
6997
|
const e = this._cycles.get(s.shownGroup);
|
|
6998
6998
|
e && (e.members.delete(t), e.downstream.delete(t), e.isEmpty() && this._cycles.delete(s.shownGroup));
|
|
@@ -7002,7 +7002,7 @@ var Es = class {
|
|
|
7002
7002
|
const e = this._cycleOf(i), n = l === lr;
|
|
7003
7003
|
(n ? e.members : e.downstream).add(t), a = e.getEntry(n);
|
|
7004
7004
|
}
|
|
7005
|
-
s.shownGroup = i, t.state = t.state & ~
|
|
7005
|
+
s.shownGroup = i, t.state = t.state & ~Wn | l << 2, e.circularConflating || (e.circularConflating = b(o)), e.circularConflating.append(n, r, a);
|
|
7006
7006
|
}
|
|
7007
7007
|
_cycleOf(t) {
|
|
7008
7008
|
let e = this._cycles.get(t);
|
|
@@ -7049,7 +7049,7 @@ var Es = class {
|
|
|
7049
7049
|
const n = w.plan, o = w.planLength, s = w.demandStart;
|
|
7050
7050
|
for (let r = 0; r < o; r++) {
|
|
7051
7051
|
const o = n[r];
|
|
7052
|
-
o.markId = e, o.cycleId = t, o.inDegree = 0, o.state &= ~rr, null !== o.ext && (o.ext.cycleGroup = 0), Pn(o,
|
|
7052
|
+
o.markId = e, o.cycleId = t, o.inDegree = 0, o.state &= ~rr, null !== o.ext && (o.ext.cycleGroup = 0), Pn(o, Ye(o)), i[r] = o;
|
|
7053
7053
|
}
|
|
7054
7054
|
return r.length = o, s < o && this._flagDemandAppendix(i, s, o), p.closureHits++, p.discoveryMs += Ds() - m, s === o;
|
|
7055
7055
|
}
|
|
@@ -7059,13 +7059,13 @@ var Es = class {
|
|
|
7059
7059
|
if (r.cycleId === t && r.markId === e) continue;
|
|
7060
7060
|
r.markId = e, r.cycleId = t, r.inDegree = 0, r.state &= ~rr;
|
|
7061
7061
|
const o = r.ext;
|
|
7062
|
-
null !== o && (o.cycleGroup = 0), (r.planEpoch !== _ || r.planId !== g || null !== o && 0 !== o.shownGroup) && (S = !1), Pn(r,
|
|
7062
|
+
null !== o && (o.cycleGroup = 0), (r.planEpoch !== _ || r.planId !== g || null !== o && 0 !== o.shownGroup) && (S = !1), Pn(r, Ye(r)), nl[E++] = r, ol[A++] = r;
|
|
7063
7063
|
}
|
|
7064
7064
|
const k = (n) => {
|
|
7065
7065
|
if (n.cycleId === t && n.markId === e) return;
|
|
7066
7066
|
n.markId = e, n.cycleId = t, n.inDegree = 0, n.state &= ~rr;
|
|
7067
7067
|
const r = n.ext;
|
|
7068
|
-
null !== r && (r.cycleGroup = 0), (n.planEpoch !== _ || n.planId !== g || null !== r && 0 !== r.shownGroup) && (S = !1), Pn(n,
|
|
7068
|
+
null !== r && (r.cycleGroup = 0), (n.planEpoch !== _ || n.planId !== g || null !== r && 0 !== r.shownGroup) && (S = !1), Pn(n, Ye(n)), nl[E++] = n, ol[A++] = n;
|
|
7069
7069
|
}, N = (n, r, o, s, l, i) => {
|
|
7070
7070
|
if (n.unanchored) return;
|
|
7071
7071
|
const a = n.ref;
|
|
@@ -7082,15 +7082,15 @@ var Es = class {
|
|
|
7082
7082
|
$s.colStart = s, $s.rowStart = o, $s.colEnd = i, $s.rowEnd = l, $s.scope = r;
|
|
7083
7083
|
const a = d.search($s), c = a.length;
|
|
7084
7084
|
if (c > 0) {
|
|
7085
|
-
const r =
|
|
7085
|
+
const r = $e(t);
|
|
7086
7086
|
r.spillDependents = a, r.spillRowStart = o, r.spillColStart = s, r.spillRowEnd = l, r.spillColEnd = i, rl[y++] = t;
|
|
7087
|
-
for (let t = 0; t < c; t++)
|
|
7087
|
+
for (let t = 0; t < c; t++) Oe(a[t], n, e, o, s, l, i, k, N);
|
|
7088
7088
|
}
|
|
7089
7089
|
}
|
|
7090
7090
|
const i = o.length;
|
|
7091
7091
|
if (0 !== i) for (let t = 0; t < i; t++) {
|
|
7092
7092
|
const r = o[t];
|
|
7093
|
-
|
|
7093
|
+
Qe(r, n, e, k, N, M);
|
|
7094
7094
|
}
|
|
7095
7095
|
}
|
|
7096
7096
|
const F = Ds();
|
|
@@ -7202,11 +7202,11 @@ var Es = class {
|
|
|
7202
7202
|
const D = (t) => {
|
|
7203
7203
|
p.planAssertFailures++, console.error("CalcExecutor: order-stamp fast path would invert a static edge at", t.gridId, t.rowIndex, t.colIndex), S = !1;
|
|
7204
7204
|
}, T = (n) => {
|
|
7205
|
-
n.cycleId === t && n.markId === e ? (bl++, S && n.orderIndex >= Cl.orderIndex && D(Cl)) : this._iterate || 0 === (n.state &
|
|
7205
|
+
n.cycleId === t && n.markId === e ? (bl++, S && n.orderIndex >= Cl.orderIndex && D(Cl)) : this._iterate || 0 === (n.state & Wn) || (this._taintGroup = n.ext.shownGroup, this._taintDownstream(Cl));
|
|
7206
7206
|
};
|
|
7207
7207
|
let G = null;
|
|
7208
7208
|
const B = (n) => {
|
|
7209
|
-
n.cycleId === t && n.markId === e ? (Gl++, n.orderIndex > Bl && (Bl = n.orderIndex)) : null !== Vl || this._iterate || 0 === (n.state &
|
|
7209
|
+
n.cycleId === t && n.markId === e ? (Gl++, n.orderIndex > Bl && (Bl = n.orderIndex)) : null !== Vl || this._iterate || 0 === (n.state & Wn) || (Vl = n.ext.shownGroup);
|
|
7210
7210
|
}, V = (t, e, n, r, o) => {
|
|
7211
7211
|
null === G && (G = /* @__PURE__ */ new Map());
|
|
7212
7212
|
let s = G.get(t);
|
|
@@ -7231,7 +7231,7 @@ var Es = class {
|
|
|
7231
7231
|
}, l.push(i)) : (i = l[s.next], s.next = (s.next + 1) % Al, i.rowFrom = e, i.rowTo = n, i.colFrom = r, i.colTo = o), i.count = Gl, i.maxOrder = Bl, i.shownGroup = Vl, i;
|
|
7232
7232
|
};
|
|
7233
7233
|
for (let t = 0; t < E; t++) {
|
|
7234
|
-
const e = nl[t], n =
|
|
7234
|
+
const e = nl[t], n = je(e), r = n.length;
|
|
7235
7235
|
let o = 0;
|
|
7236
7236
|
for (let t = 0; t < r; t++) {
|
|
7237
7237
|
const r = n[t];
|
|
@@ -7275,7 +7275,7 @@ var Es = class {
|
|
|
7275
7275
|
const e = rl[t];
|
|
7276
7276
|
n = e;
|
|
7277
7277
|
const o = e.ext, s = o.spillDependents, l = s.length;
|
|
7278
|
-
for (let t = 0; t < l; t++)
|
|
7278
|
+
for (let t = 0; t < l; t++) Oe(s[t], e.rowIndex, e.colIndex, o.spillRowStart, o.spillColStart, o.spillRowEnd, o.spillColEnd, r);
|
|
7279
7279
|
}
|
|
7280
7280
|
for (let t = 0; t < E; t++) {
|
|
7281
7281
|
const e = nl[t];
|
|
@@ -7294,14 +7294,14 @@ var Es = class {
|
|
|
7294
7294
|
const e = t.colIndex, n = t.rowIndex, r = t.ext;
|
|
7295
7295
|
if (null !== r) {
|
|
7296
7296
|
const t = r.spillDependents, o = t.length;
|
|
7297
|
-
for (let s = 0; s < o; s++)
|
|
7297
|
+
for (let s = 0; s < o; s++) Oe(t[s], n, e, r.spillRowStart, r.spillColStart, r.spillRowEnd, r.spillColEnd, P);
|
|
7298
7298
|
}
|
|
7299
7299
|
let o;
|
|
7300
7300
|
o = t.dependents;
|
|
7301
7301
|
const s = o.length;
|
|
7302
7302
|
if (0 !== s) for (let t = 0; t < s; t++) {
|
|
7303
7303
|
const r = o[t];
|
|
7304
|
-
|
|
7304
|
+
Xe(r, n, e, P);
|
|
7305
7305
|
}
|
|
7306
7306
|
}
|
|
7307
7307
|
if (p.kahnMs += Ds() - O, o || a < E) {
|
|
@@ -7319,7 +7319,7 @@ var Es = class {
|
|
|
7319
7319
|
t.length = 0, o && (a = 0);
|
|
7320
7320
|
for (let e = 0; e < E; e++) {
|
|
7321
7321
|
const n = nl[e];
|
|
7322
|
-
(o || n.inDegree > 0) && (n.state |= $n,
|
|
7322
|
+
(o || n.inDegree > 0) && (n.state |= $n, $e(n).demandValue = void 0, t.push(n));
|
|
7323
7323
|
}
|
|
7324
7324
|
t.sort(Fs);
|
|
7325
7325
|
const e = t.length, n = a;
|
|
@@ -7345,7 +7345,7 @@ var Es = class {
|
|
|
7345
7345
|
r.length = 0;
|
|
7346
7346
|
for (let o = e; o < n; o++) {
|
|
7347
7347
|
const e = t[o];
|
|
7348
|
-
e.state |= $n,
|
|
7348
|
+
e.state |= $n, $e(e).demandValue = void 0, r.push(e), this._addCircular(e);
|
|
7349
7349
|
}
|
|
7350
7350
|
}
|
|
7351
7351
|
_invalidatePlans() {
|
|
@@ -7379,227 +7379,227 @@ var Es = class {
|
|
|
7379
7379
|
const l = Ds(), i = this._container, a = this._context, c = i.getScope(), d = a.getRuntime(), h = i.getDeferred?.() ?? null, u = s.values, _ = s.length;
|
|
7380
7380
|
zl = this._passCycleId, Ll = this._passMarkId;
|
|
7381
7381
|
const f = el;
|
|
7382
|
-
let g, p, m, S, w, y, v, x, C,
|
|
7383
|
-
const
|
|
7384
|
-
this._overlays =
|
|
7385
|
-
const
|
|
7386
|
-
|
|
7387
|
-
},
|
|
7388
|
-
if (
|
|
7389
|
-
n(f,
|
|
7390
|
-
for (const t of
|
|
7382
|
+
let g, p, m, S, w, y, v, x, C, R, A, k, N, M = 0;
|
|
7383
|
+
const F = /* @__PURE__ */ new Map();
|
|
7384
|
+
this._overlays = F;
|
|
7385
|
+
const D = (t) => this._overlayFor(t), T = (t) => {
|
|
7386
|
+
A = i.getGrid(t), R = A.getEntireCoords.bind(A), p = e(t), m = p.gridId, N = D(t), S = p.values, k = p.errorSpatial, w = p.contentfulSpatial, y = p.spillSpatial, v = p.notifyValues, x = p.notifySpillsInsert, C = p.notifySpillsRemove, p.notifyFormats, p.notifyCalcStatus, c.gridId = m;
|
|
7387
|
+
}, G = E.Axis.Column, B = G === E.Axis.Column, V = () => {
|
|
7388
|
+
if (M > 0) {
|
|
7389
|
+
n(f, M), M = 0;
|
|
7390
|
+
for (const t of F.values()) t.reset();
|
|
7391
7391
|
void 0 !== m && (p = e(m));
|
|
7392
7392
|
}
|
|
7393
7393
|
};
|
|
7394
|
-
this._flush =
|
|
7395
|
-
const
|
|
7396
|
-
if (
|
|
7394
|
+
this._flush = V;
|
|
7395
|
+
const O = this._exceptTables;
|
|
7396
|
+
if (O) for (let t = 0; t < _; t++) {
|
|
7397
7397
|
const e = u[t];
|
|
7398
7398
|
e.block.hasDataTable() && (e.state = e.state & ~Kn | sr, this._skippedTables.add(e));
|
|
7399
7399
|
}
|
|
7400
|
-
let
|
|
7401
|
-
for (;
|
|
7402
|
-
for (;
|
|
7403
|
-
const n = u[
|
|
7400
|
+
let P = 0;
|
|
7401
|
+
for (; P < _;) try {
|
|
7402
|
+
for (; P < _; P++) {
|
|
7403
|
+
const n = u[P], s = n.colIndex, l = n.rowIndex;
|
|
7404
7404
|
if (1 & n.state && t === n.cycleId) {
|
|
7405
7405
|
n.state &= -2;
|
|
7406
7406
|
continue;
|
|
7407
7407
|
}
|
|
7408
|
-
if (
|
|
7408
|
+
if (O && n.block.hasDataTable()) continue;
|
|
7409
7409
|
const a = n.gridId;
|
|
7410
|
-
a !== m &&
|
|
7411
|
-
const _ = n.block, E = _.representative === n && _.isBlankAware(t),
|
|
7412
|
-
let
|
|
7413
|
-
"object" == typeof
|
|
7414
|
-
const
|
|
7415
|
-
|
|
7416
|
-
const
|
|
7417
|
-
if (
|
|
7418
|
-
const t = On(), e =
|
|
7410
|
+
a !== m && T(a);
|
|
7411
|
+
const _ = n.block, E = _.representative === n && _.isBlankAware(t), F = n.cachedValue;
|
|
7412
|
+
let z, L, $ = !1;
|
|
7413
|
+
"object" == typeof F && null !== F && (F.isIRange ? z = F : I.isError(F, I.Code.Spill) && (L = F, $ = !0));
|
|
7414
|
+
const H = 0 !== (n.state & $n);
|
|
7415
|
+
H && (n.state & Kn) !== sr && (V(), this.doDemandEvaluate(t, e, this._demandBatch, V), c.gridId = a);
|
|
7416
|
+
const j = H ? null : je(n), K = n.inputsAt;
|
|
7417
|
+
if (j && K >= 0) {
|
|
7418
|
+
const t = On(), e = j.length;
|
|
7419
7419
|
for (let n = 0; n < e; n++) {
|
|
7420
|
-
const e =
|
|
7420
|
+
const e = j[n];
|
|
7421
7421
|
if (I.isError(e)) {
|
|
7422
|
-
t[
|
|
7422
|
+
t[K + n] = e;
|
|
7423
7423
|
continue;
|
|
7424
7424
|
}
|
|
7425
7425
|
const r = e.colStart, o = e.rowStart, s = e.colEnd, l = e.rowEnd;
|
|
7426
7426
|
if (l !== o || r !== s) {
|
|
7427
|
-
let a = e.scope, c = S, h =
|
|
7428
|
-
a && a !== m && (_ = i.getGrid(a), _ && (c = _.getValues(), u =
|
|
7427
|
+
let a = e.scope, c = S, h = R, u = N, _ = A;
|
|
7428
|
+
a && a !== m && (_ = i.getGrid(a), _ && (c = _.getValues(), u = D(a), h = _.getEntireCoords.bind(_)));
|
|
7429
7429
|
let f = _;
|
|
7430
7430
|
u.intersects(o, r, l, s) && (c = u, f = u);
|
|
7431
|
-
const g = new
|
|
7432
|
-
g._setErrorIndex(f), t[
|
|
7431
|
+
const g = new U(d, c, { ...e }, null, h, i.resolveScope);
|
|
7432
|
+
g._setErrorIndex(f), t[K + n] = g;
|
|
7433
7433
|
}
|
|
7434
7434
|
}
|
|
7435
7435
|
}
|
|
7436
|
-
|
|
7437
|
-
const
|
|
7436
|
+
j && null !== h && 0 !== h.getOpenCount() && 0 === (n.state & Qn) && jl(j, m, i) && (n.state |= Qn);
|
|
7437
|
+
const q = B ? s : l, W = B ? l : s;
|
|
7438
7438
|
c.node = n, c.colIndex = s, c.rowIndex = l, c.drawIndex = 0;
|
|
7439
|
-
const
|
|
7440
|
-
let
|
|
7441
|
-
const
|
|
7442
|
-
let
|
|
7443
|
-
const
|
|
7444
|
-
if (
|
|
7439
|
+
const X = _.formula;
|
|
7440
|
+
let Z, Q = null, Y = !1;
|
|
7441
|
+
const et = 4 & n.state ? 0 !== (n.state & nr) ? Nt.CalcStatus.Working : Nt.CalcStatus.Waiting : 0;
|
|
7442
|
+
let nt = et;
|
|
7443
|
+
const rt = r ? 0 : et, ot = n.ext;
|
|
7444
|
+
if (H && !this._iterate && 0 !== (n.state & qn)) null !== ot && (ot.demandValue = void 0), Z = Qs(n), nt = 0;
|
|
7445
7445
|
else {
|
|
7446
|
-
if (
|
|
7447
|
-
const t = null !==
|
|
7448
|
-
null !==
|
|
7446
|
+
if (H) {
|
|
7447
|
+
const t = null !== ot ? ot.demandValue : void 0;
|
|
7448
|
+
null !== ot && (ot.demandValue = void 0), Z = void 0 === t ? 0 : t;
|
|
7449
7449
|
} else {
|
|
7450
7450
|
if (n.state = n.state & ~Kn | or, c.perCellRead = !1, c.positionRead = !1, 0 !== (n.state & tr)) {
|
|
7451
7451
|
n.state &= ~tr;
|
|
7452
7452
|
const t = this._settlePass ? bs(S, y, l, s) : null;
|
|
7453
7453
|
if (null !== t && t.direct) {
|
|
7454
7454
|
Y = !0, n.state &= -2621441;
|
|
7455
|
-
const e =
|
|
7456
|
-
e?.isIRange ? (
|
|
7455
|
+
const e = Pt(t);
|
|
7456
|
+
e?.isIRange ? (Z = X.finalizeValueForCell(e), Q = t) : Z = t;
|
|
7457
7457
|
}
|
|
7458
7458
|
}
|
|
7459
7459
|
if (!Y) {
|
|
7460
7460
|
this._planStats.evaluated++, n.state &= -2621505;
|
|
7461
7461
|
const t = c.deferCount;
|
|
7462
|
-
|
|
7462
|
+
Z = X.evaluateAt(l, s), Z = X.finalizeValueForCell(Z), (c.perCellRead || c.positionRead) && (n.block.positionRead = !0), c.deferCount !== t && (Z = this._takeDeferred(n, Z), Q = this._spillHolder, this._spillHolder = null);
|
|
7463
7463
|
}
|
|
7464
7464
|
}
|
|
7465
|
-
|
|
7465
|
+
nt = 0 !== (n.state & er) ? Nt.CalcStatus.Working : 0 !== (n.state & (Qn | Yn)) ? Nt.CalcStatus.Waiting : 0, 0 !== nt && (n.state |= Yn);
|
|
7466
7466
|
}
|
|
7467
|
-
let
|
|
7468
|
-
(n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768),
|
|
7469
|
-
const
|
|
7470
|
-
if (
|
|
7471
|
-
|
|
7472
|
-
const t = y.search(
|
|
7473
|
-
for (let e = 0; !
|
|
7467
|
+
let st;
|
|
7468
|
+
(n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768), nt !== rt && (0 === nt ? n.state &= ~(4 | nr) : nt === Nt.CalcStatus.Working ? n.state |= 4 | nr : n.state = (4 | n.state) & ~nr, p.calcStatusConflating || (p.calcStatusConflating = b(B)), p.calcStatusConflating.append(q, W, 0 !== nt && nt)), H && N.takeDemand(l, s);
|
|
7469
|
+
const lt = n.ext, it = null !== lt ? lt.fixedRef : null;
|
|
7470
|
+
if (z || L || it) {
|
|
7471
|
+
Ys.colStart = s, Ys.rowStart = l, Ys.colEnd = s, Ys.rowEnd = l;
|
|
7472
|
+
const t = y.search(Ys);
|
|
7473
|
+
for (let e = 0; !st && e < t.length; e++) {
|
|
7474
7474
|
const n = t[e];
|
|
7475
|
-
n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (
|
|
7475
|
+
n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (st = n);
|
|
7476
7476
|
}
|
|
7477
|
-
if (
|
|
7477
|
+
if (st && (y.remove(st, Go), !st || !st.value.getError())) {
|
|
7478
7478
|
const t = {
|
|
7479
|
-
...o.sanitizeRange(
|
|
7480
|
-
scope:
|
|
7479
|
+
...o.sanitizeRange(st),
|
|
7480
|
+
scope: st.scope,
|
|
7481
7481
|
value: null
|
|
7482
7482
|
};
|
|
7483
|
-
w.insertNonOverlapping(t), S.delete(t),
|
|
7483
|
+
w.insertNonOverlapping(t), S.delete(t), J(k, t);
|
|
7484
7484
|
}
|
|
7485
7485
|
}
|
|
7486
|
-
|
|
7487
|
-
let
|
|
7488
|
-
const
|
|
7489
|
-
let
|
|
7490
|
-
if (
|
|
7491
|
-
|
|
7486
|
+
Z = this._fitCell(_, Z);
|
|
7487
|
+
let at = 1, ct = 1;
|
|
7488
|
+
const dt = Z, ht = "object" == typeof Z && null !== Z, ut = ht && dt.isIRange;
|
|
7489
|
+
let _t, ft = ht && I.isError(Z, I.Code.Spill);
|
|
7490
|
+
if (it) {
|
|
7491
|
+
at = it.colEnd - it.colStart + 1, ct = it.rowEnd - it.rowStart + 1;
|
|
7492
7492
|
const e = {
|
|
7493
|
-
colStart:
|
|
7494
|
-
rowStart:
|
|
7495
|
-
colEnd:
|
|
7496
|
-
rowEnd:
|
|
7493
|
+
colStart: it.colStart,
|
|
7494
|
+
rowStart: it.rowStart,
|
|
7495
|
+
colEnd: it.colEnd,
|
|
7496
|
+
rowEnd: it.rowEnd,
|
|
7497
7497
|
scope: a
|
|
7498
|
-
}, r =
|
|
7499
|
-
S.delete(e), r && S.setValues(r),
|
|
7498
|
+
}, r = qe(Z, e, B)?.tuples;
|
|
7499
|
+
S.delete(e), r && S.setValues(r), J(k, e), Ct(k, r, B), _t = {
|
|
7500
7500
|
...e,
|
|
7501
|
-
value: new
|
|
7502
|
-
}, y.insert(
|
|
7501
|
+
value: new ce(e, t, "fixed", null, Q)
|
|
7502
|
+
}, y.insert(_t), i.addDynamicPrecedent(n, e, -2), w.insertNonOverlapping({
|
|
7503
7503
|
...e,
|
|
7504
|
-
value: new
|
|
7504
|
+
value: new tt(e, G)
|
|
7505
7505
|
});
|
|
7506
|
-
} else if (
|
|
7507
|
-
|
|
7506
|
+
} else if (ut && dt.size > 1) {
|
|
7507
|
+
at = dt.getColumnCount(), ct = dt.getRowCount();
|
|
7508
7508
|
const e = vl(n), r = null !== e ? l - e.rows : l, c = null !== e ? s - e.columns : s, d = {
|
|
7509
7509
|
colStart: c,
|
|
7510
7510
|
rowStart: r,
|
|
7511
|
-
colEnd: c +
|
|
7512
|
-
rowEnd: r +
|
|
7511
|
+
colEnd: c + at - 1,
|
|
7512
|
+
rowEnd: r + ct - 1,
|
|
7513
7513
|
scope: a
|
|
7514
|
-
}, h =
|
|
7515
|
-
if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)),
|
|
7514
|
+
}, h = R(), u = !o.isRangeWithinRange(d, h);
|
|
7515
|
+
if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)), ft = u, !ft) {
|
|
7516
7516
|
const t = w.search(d);
|
|
7517
|
-
if (
|
|
7517
|
+
if (ft = t.length > 1, !ft && 1 === t.length) {
|
|
7518
7518
|
const e = t[0], n = o.intersectRanges(d, e, Ps);
|
|
7519
|
-
!n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (
|
|
7519
|
+
!n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (ft = !0);
|
|
7520
7520
|
}
|
|
7521
7521
|
}
|
|
7522
7522
|
let _, f;
|
|
7523
|
-
if (
|
|
7523
|
+
if (ft) Z = I.BuiltIn.Spill, at = 1, ct = 1, _ = [[q, [[W, [Z]]]]], S.setValues(_), Ct(k, _, B), f = {
|
|
7524
7524
|
colStart: s,
|
|
7525
7525
|
rowStart: l,
|
|
7526
7526
|
colEnd: s,
|
|
7527
7527
|
rowEnd: l
|
|
7528
7528
|
};
|
|
7529
7529
|
else {
|
|
7530
|
-
const t =
|
|
7531
|
-
t && (_ = t.tuples), S.delete(d), _ && S.setValues(_),
|
|
7530
|
+
const t = We(dt, B ? c : r, B ? r : c);
|
|
7531
|
+
t && (_ = t.tuples), S.delete(d), _ && S.setValues(_), J(k, d), Ct(k, _, B), f = d;
|
|
7532
7532
|
}
|
|
7533
|
-
const g =
|
|
7533
|
+
const g = ft ? {
|
|
7534
7534
|
colStart: s,
|
|
7535
7535
|
rowStart: l,
|
|
7536
7536
|
colEnd: s,
|
|
7537
7537
|
rowEnd: l,
|
|
7538
7538
|
scope: a
|
|
7539
7539
|
} : d;
|
|
7540
|
-
|
|
7540
|
+
_t = {
|
|
7541
7541
|
...g,
|
|
7542
|
-
value: new
|
|
7543
|
-
}, y.insert(
|
|
7542
|
+
value: new ce(g, t, ft ? "error" : "dynamic", ft || null === e ? null : e, Q, ft ? d : null)
|
|
7543
|
+
}, y.insert(_t), i.addDynamicPrecedent(n, d, -2), w.insertNonOverlapping({
|
|
7544
7544
|
...f,
|
|
7545
|
-
value: new
|
|
7545
|
+
value: new tt(f, G)
|
|
7546
7546
|
});
|
|
7547
7547
|
}
|
|
7548
|
-
!E || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n,
|
|
7549
|
-
let
|
|
7550
|
-
if ((
|
|
7551
|
-
const t =
|
|
7548
|
+
!E || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n, Z, p, 0 !== nt || H || !0 === ut || ft || null !== it || Y);
|
|
7549
|
+
let gt = !1;
|
|
7550
|
+
if ((st || _t || ft || L) && (gt = o.isEqualRanges(st, _t), st && C.push(st), _t && x.push(_t)), _t || st) {
|
|
7551
|
+
const t = st ?? _t, e = _t ?? st, r = {
|
|
7552
7552
|
colStart: Math.min(s, t.colStart, e.colStart),
|
|
7553
7553
|
rowStart: Math.min(l, t.rowStart, e.rowStart),
|
|
7554
7554
|
colEnd: Math.max(s, t.colEnd, e.colEnd),
|
|
7555
7555
|
rowEnd: Math.max(l, t.rowEnd, e.rowEnd),
|
|
7556
7556
|
scope: a
|
|
7557
7557
|
};
|
|
7558
|
-
v.insertNonOverlapping(r),
|
|
7558
|
+
v.insertNonOverlapping(r), gt && ft === $ || (this._invalidatePlans(), i.getPrecedents().search(r).length > 0 && (n.state |= 1, g || (g = new me()), g.insertNonOverlapping(r)));
|
|
7559
7559
|
}
|
|
7560
|
-
n.cachedValue =
|
|
7561
|
-
const
|
|
7562
|
-
|
|
7563
|
-
const
|
|
7564
|
-
if (
|
|
7560
|
+
n.cachedValue = Z, f[M++] = n;
|
|
7561
|
+
const pt = null !== h && h.hasHolders() ? Pt(Z) : Z;
|
|
7562
|
+
ut || it || N.push(l, s, pt), M >= (N.observed ? As : ks) && V(), (0 !== (n.state & qn) || null !== n.ext && 0 !== n.ext.shownGroup) && this._trackCircular(n, p, q, W, B);
|
|
7563
|
+
const mt = n.dependents, St = mt.length;
|
|
7564
|
+
if (St > 0) {
|
|
7565
7565
|
const t = !!(4 & n.state), e = !this._iterate && 0 !== (n.state & qn);
|
|
7566
7566
|
e && (this._taintGroup = n.ext.cycleGroup);
|
|
7567
|
-
for (let n = 0; n <
|
|
7568
|
-
const r =
|
|
7569
|
-
e &&
|
|
7567
|
+
for (let n = 0; n < St; n++) {
|
|
7568
|
+
const r = mt[n];
|
|
7569
|
+
e && Xe(r, l, s, this._taintDownstream);
|
|
7570
7570
|
const o = r.value.index;
|
|
7571
|
-
o < 0 || (
|
|
7571
|
+
o < 0 || (Ze(r) && (Ol = o, Pl = pt, Xe(r, l, s, $l)), t && Xe(r, l, s, Hl));
|
|
7572
7572
|
}
|
|
7573
7573
|
}
|
|
7574
7574
|
}
|
|
7575
7575
|
} catch (n) {
|
|
7576
|
-
const r = u[
|
|
7577
|
-
if (n instanceof
|
|
7576
|
+
const r = u[P];
|
|
7577
|
+
if (n instanceof Le || n instanceof Pe && this._iterate) {
|
|
7578
7578
|
const o = Ks;
|
|
7579
|
-
if (o.length = 0, n instanceof
|
|
7580
|
-
o.push(r),
|
|
7579
|
+
if (o.length = 0, n instanceof Le) for (let t = 0; t < n.count; t++) o.push(n.nodes[t]);
|
|
7580
|
+
o.push(r), V(), r.state &= ~Kn, this.doDemandEvaluate(t, e, o, V);
|
|
7581
7581
|
} else {
|
|
7582
|
-
if (!(n instanceof
|
|
7582
|
+
if (!(n instanceof Pe || n instanceof Ke)) throw n;
|
|
7583
7583
|
{
|
|
7584
|
-
const t = n instanceof
|
|
7584
|
+
const t = n instanceof Pe;
|
|
7585
7585
|
r.state = -3841 & r.state | $n | sr | (t ? lr : ir);
|
|
7586
|
-
const e =
|
|
7587
|
-
e.demandValue =
|
|
7586
|
+
const e = $e(r);
|
|
7587
|
+
e.demandValue = Qs(r), e.cycleGroup = t ? ++this._cycleGroupNext : Zs(n.node), t && (e.cycleNext = r), this._addCircular(r);
|
|
7588
7588
|
}
|
|
7589
7589
|
}
|
|
7590
7590
|
c.gridId = r.gridId;
|
|
7591
7591
|
}
|
|
7592
|
-
c.node = null, c.colIndex = Number.MAX_SAFE_INTEGER, c.rowIndex = Number.MAX_SAFE_INTEGER,
|
|
7593
|
-
for (const t of
|
|
7592
|
+
c.node = null, c.colIndex = Number.MAX_SAFE_INTEGER, c.rowIndex = Number.MAX_SAFE_INTEGER, V();
|
|
7593
|
+
for (const t of F.values()) t.commitDemand();
|
|
7594
7594
|
this._flush = null, this._overlays = null;
|
|
7595
|
-
const
|
|
7596
|
-
return null !==
|
|
7595
|
+
const z = this._fallbackDirty;
|
|
7596
|
+
return null !== z && (this._fallbackDirty = null, g ? g.insertAllNonOverlapping(z.all()) : g = z), (() => {
|
|
7597
7597
|
const t = Bn, e = Vn;
|
|
7598
7598
|
for (let n = 0; n < e; n++) t[n] = void 0;
|
|
7599
7599
|
Vn = 0;
|
|
7600
7600
|
})(), this._planStats.evaluateMs += Ds() - l, g;
|
|
7601
7601
|
}
|
|
7602
|
-
}, Is = (t, e) => new
|
|
7602
|
+
}, Is = (t, e) => new dt.ArrayList(t.slice(0, e));
|
|
7603
7603
|
function ys(t, e, n, r, o, s) {
|
|
7604
7604
|
const l = e.rowStart + n, i = e.rowStart + r, a = e.colStart + o, c = e.colStart + s;
|
|
7605
7605
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -7609,10 +7609,10 @@ function ys(t, e, n, r, o, s) {
|
|
|
7609
7609
|
return !1;
|
|
7610
7610
|
}
|
|
7611
7611
|
function vs(t, e, n) {
|
|
7612
|
-
const r = e.values, o = e.errorSpatial, s = qs, l =
|
|
7612
|
+
const r = e.values, o = e.errorSpatial, s = qs, l = Ws;
|
|
7613
7613
|
for (let i = 0; i < t.length; i++) {
|
|
7614
7614
|
const a = t[i];
|
|
7615
|
-
r.delete(a),
|
|
7615
|
+
r.delete(a), J(o, a);
|
|
7616
7616
|
const c = {
|
|
7617
7617
|
colStart: a.colStart,
|
|
7618
7618
|
rowStart: a.rowStart,
|
|
@@ -7641,7 +7641,7 @@ function Cs(t, e, n) {
|
|
|
7641
7641
|
}
|
|
7642
7642
|
var bs = (t, e, n, r) => {
|
|
7643
7643
|
const o = t.getValueAt(n, r);
|
|
7644
|
-
return
|
|
7644
|
+
return bt(o) ? o : Ee(e, n, r);
|
|
7645
7645
|
}, Rs = Symbol("unsetGridId"), As = 1024, ks = 65536;
|
|
7646
7646
|
function Ns(t, e) {
|
|
7647
7647
|
return t.scope !== e.scope ? null === t.scope ? -1 : null === e.scope ? 1 : t.scope.localeCompare(e.scope) : t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex;
|
|
@@ -7708,21 +7708,21 @@ var Ps = {
|
|
|
7708
7708
|
rowEnd: 0,
|
|
7709
7709
|
colEnd: 0,
|
|
7710
7710
|
scope: null
|
|
7711
|
-
}, Ks = [null], qs = [],
|
|
7711
|
+
}, Ks = [null], qs = [], Ws = [], Us = [], Xs = [], Js = {
|
|
7712
7712
|
rowStart: 0,
|
|
7713
7713
|
colStart: 0,
|
|
7714
7714
|
rowEnd: 0,
|
|
7715
7715
|
colEnd: 0,
|
|
7716
7716
|
scope: null
|
|
7717
|
-
},
|
|
7717
|
+
}, Zs = (t) => {
|
|
7718
7718
|
const e = t.ext;
|
|
7719
7719
|
return null === e ? 0 : 0 !== (t.state & qn) ? e.cycleGroup : e.shownGroup;
|
|
7720
|
-
},
|
|
7720
|
+
}, Qs = (t) => Pt(t.cachedValue) ?? 0, Ys = {
|
|
7721
7721
|
rowStart: 0,
|
|
7722
7722
|
colStart: 0,
|
|
7723
7723
|
rowEnd: 0,
|
|
7724
7724
|
colEnd: 0
|
|
7725
|
-
}, tl = 1e4, el =
|
|
7725
|
+
}, tl = 1e4, el = Zt(tl), nl = Zt(tl), rl = Zt(tl), ol = Zt(tl), sl = Zt(tl), ll = Zt(tl), il = Zt(tl), al = Zt(tl), cl = Zt(tl), dl = Zt(tl), hl = Zt(tl), ul = Zt(tl), _l = Zt(tl), fl = Zt(tl), gl = Zt(tl), pl = Zt(tl), ml = [null], Sl = [], wl = -1, El = -1, Il = -1, yl = -1;
|
|
7726
7726
|
function vl(t) {
|
|
7727
7727
|
const e = t.block.formula;
|
|
7728
7728
|
return null !== e && void 0 !== e.getSpillOrigin ? e.getSpillOrigin() : null;
|
|
@@ -7735,7 +7735,7 @@ function xl(t) {
|
|
|
7735
7735
|
const o = vl(t);
|
|
7736
7736
|
return Il = null !== o ? t.rowIndex - o.rows : t.rowIndex, yl = null !== o ? t.colIndex - o.columns : t.colIndex, wl = Il + r.getRowCount() - 1, El = yl + r.getColumnCount() - 1, wl > Il || El > yl;
|
|
7737
7737
|
}
|
|
7738
|
-
var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml =
|
|
7738
|
+
var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = Zt(8), Fl = Zt(8), Dl = Zt(8), Tl = Array.from({ length: 8 }, () => ({
|
|
7739
7739
|
colStart: 0,
|
|
7740
7740
|
colEnd: 0,
|
|
7741
7741
|
rowStart: 0,
|
|
@@ -7746,7 +7746,7 @@ var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = ge(8), Fl = ge(8
|
|
|
7746
7746
|
r < 0 || (Bn[r + e] = n);
|
|
7747
7747
|
})(t, Ol, Pl);
|
|
7748
7748
|
}, Hl = (t) => {
|
|
7749
|
-
t.state |=
|
|
7749
|
+
t.state |= Qn;
|
|
7750
7750
|
}, jl = (t, e, n) => {
|
|
7751
7751
|
for (let r = 0; r < t.length; r++) {
|
|
7752
7752
|
const o = t[r];
|
|
@@ -7767,12 +7767,12 @@ function Kl(t, e) {
|
|
|
7767
7767
|
return n === r ? 0 : 1 / 0;
|
|
7768
7768
|
}
|
|
7769
7769
|
var ql = {
|
|
7770
|
-
values:
|
|
7770
|
+
values: Zt(tl),
|
|
7771
7771
|
length: 0
|
|
7772
|
-
},
|
|
7773
|
-
values:
|
|
7772
|
+
}, Wl = {
|
|
7773
|
+
values: Zt(tl),
|
|
7774
7774
|
length: 0
|
|
7775
|
-
},
|
|
7775
|
+
}, Ul = class {
|
|
7776
7776
|
constructor(t) {
|
|
7777
7777
|
this._namesByKey = /* @__PURE__ */ new Map(), this._namesById = /* @__PURE__ */ new Map(), this._hostsById = /* @__PURE__ */ new Map(), this._loadedData = /* @__PURE__ */ new Map(), this._options = t;
|
|
7778
7778
|
}
|
|
@@ -7781,14 +7781,14 @@ var ql = {
|
|
|
7781
7781
|
for (let e = 0; e < a.length; e++) {
|
|
7782
7782
|
const c = a[e], d = c.getId(), h = c.getSheetNames();
|
|
7783
7783
|
for (let t = 0; t < h.length; t++) {
|
|
7784
|
-
const e =
|
|
7784
|
+
const e = R(d, t);
|
|
7785
7785
|
s.add(e), o && (n(e) ? this._loadedData.get(e) !== (c.getSheetData(t)?.data ?? null) && (r(e), this._registerSheet(c, t, e), i.add(d)) : (this._registerSheet(c, t, e), i.add(d)));
|
|
7786
7786
|
}
|
|
7787
7787
|
const u = c.getDefinedNames();
|
|
7788
7788
|
for (let e = 0; e < u.length; e++) {
|
|
7789
7789
|
const n = u[e];
|
|
7790
7790
|
if (!n.name) continue;
|
|
7791
|
-
const r = n.sheetIndex, o =
|
|
7791
|
+
const r = n.sheetIndex, o = R(d, void 0 !== r && r >= 0 && r < h.length ? r : -1), s = Xl(o, n.name);
|
|
7792
7792
|
l.add(s);
|
|
7793
7793
|
const a = this._namesByKey.get(s);
|
|
7794
7794
|
if (a) {
|
|
@@ -7800,12 +7800,12 @@ var ql = {
|
|
|
7800
7800
|
} else this._registerName(c, o, n, t), i.add(d);
|
|
7801
7801
|
}
|
|
7802
7802
|
}
|
|
7803
|
-
for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(
|
|
7803
|
+
for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(gt(t).bookId));
|
|
7804
7804
|
for (const [t, e] of this._namesByKey) {
|
|
7805
7805
|
if (l.has(t)) continue;
|
|
7806
7806
|
this._namesByKey.delete(t), this._namesById.delete(e.getId());
|
|
7807
7807
|
const n = this._hostsById.get(e.getId());
|
|
7808
|
-
this._hostsById.delete(e.getId()), n?.setPlaceholder(I.BuiltIn.Name.toString()), i.add(
|
|
7808
|
+
this._hostsById.delete(e.getId()), n?.setPlaceholder(I.BuiltIn.Name.toString()), i.add(gt(e.getScope()).bookId);
|
|
7809
7809
|
}
|
|
7810
7810
|
return i;
|
|
7811
7811
|
}
|
|
@@ -7818,7 +7818,7 @@ var ql = {
|
|
|
7818
7818
|
_registeredSheetGrids() {
|
|
7819
7819
|
const t = [];
|
|
7820
7820
|
for (const e of this._options.gridIds()) {
|
|
7821
|
-
const n =
|
|
7821
|
+
const n = gt(e);
|
|
7822
7822
|
n && n.sheetIndex >= 0 && t.push(e);
|
|
7823
7823
|
}
|
|
7824
7824
|
return t;
|
|
@@ -7834,7 +7834,7 @@ var ql = {
|
|
|
7834
7834
|
for (let t = 0; t < o.length; t++) {
|
|
7835
7835
|
const [n, s] = o[t], l = s.length;
|
|
7836
7836
|
for (let t = 0; t < l; t++) {
|
|
7837
|
-
const o =
|
|
7837
|
+
const o = fe.fromJSONValue(s.at(t));
|
|
7838
7838
|
null != o && e.push({
|
|
7839
7839
|
col: n + t,
|
|
7840
7840
|
row: r,
|
|
@@ -7845,7 +7845,7 @@ var ql = {
|
|
|
7845
7845
|
}
|
|
7846
7846
|
if (0 === e.length) return null;
|
|
7847
7847
|
e.sort((t, e) => t.col - e.col || t.row - e.row);
|
|
7848
|
-
const n = new
|
|
7848
|
+
const n = new ht.Builder();
|
|
7849
7849
|
for (let t = 0; t < e.length; t++) n.pushAt(e[t].col, e[t].row, e[t].value);
|
|
7850
7850
|
return n.build()?.tuples ?? null;
|
|
7851
7851
|
}(o);
|
|
@@ -7866,12 +7866,12 @@ var ql = {
|
|
|
7866
7866
|
const { queue: l, recompileNamed: i } = this._options;
|
|
7867
7867
|
let a = o.trim();
|
|
7868
7868
|
a.startsWith("=") && (a = a.substring(1)), a || (a = I.BuiltIn.Ref.toString());
|
|
7869
|
-
const c =
|
|
7869
|
+
const c = gt(r), d = c.sheetIndex >= 0 ? c.sheetIndex : n.getSheetNames().length > 0 ? 0 : -1, h = R(c.bookId, d);
|
|
7870
7870
|
l(async () => {
|
|
7871
7871
|
this._hostsById.get(t) === e && e.setBody({
|
|
7872
7872
|
coords: Jl,
|
|
7873
7873
|
expression: a,
|
|
7874
|
-
authoredAt:
|
|
7874
|
+
authoredAt: Zl,
|
|
7875
7875
|
scopeGridId: h
|
|
7876
7876
|
}) && (s || i(t));
|
|
7877
7877
|
});
|
|
@@ -7881,10 +7881,10 @@ var ql = {
|
|
|
7881
7881
|
rowStart: 0,
|
|
7882
7882
|
colEnd: 0,
|
|
7883
7883
|
rowEnd: 0
|
|
7884
|
-
}),
|
|
7884
|
+
}), Zl = Object.freeze({
|
|
7885
7885
|
rowIndex: 0,
|
|
7886
7886
|
colIndex: 0
|
|
7887
|
-
}),
|
|
7887
|
+
}), Ql = class extends a {
|
|
7888
7888
|
constructor(t) {
|
|
7889
7889
|
super({ transactions: new i({ maxCommits: ri }) }), this._cellFreeContext = null, this._calcScope = {
|
|
7890
7890
|
rowIndex: 0,
|
|
@@ -7902,7 +7902,7 @@ var ql = {
|
|
|
7902
7902
|
deferOrdinal: 0,
|
|
7903
7903
|
deferRoot: !1,
|
|
7904
7904
|
deferServed: null
|
|
7905
|
-
}, this._cycleId = 0, this._staticEpoch = 1, this._precedentEpoch = 1, this._epochSeenFormulas = null, this._epochSeenPrecedents = null, this._epochSeenDynamics = null, this._volatiles = /* @__PURE__ */ new Set(), this._calculatedCommitId = null, this._calculatedEngineId = null, this._holdsGrids = !1, this._engineIds = /* @__PURE__ */ new Map(), this._landingOf = /* @__PURE__ */ new Map(), this._mirroredId = null, this._lastRevert = null, this._symbolIndex = null, this._symbolIndexOf = null, this._sheetsDerived = null, this._tablesDerived = null, this._namesDerived = null, this._collecting = null, this._recompileNamedPending = null, this._recompileLoadedPending = null, this._invalidateNamedPending = null, this.resolveScope = (t) => this._symbols.resolve(
|
|
7905
|
+
}, this._cycleId = 0, this._staticEpoch = 1, this._precedentEpoch = 1, this._epochSeenFormulas = null, this._epochSeenPrecedents = null, this._epochSeenDynamics = null, this._volatiles = /* @__PURE__ */ new Set(), this._calculatedCommitId = null, this._calculatedEngineId = null, this._holdsGrids = !1, this._engineIds = /* @__PURE__ */ new Map(), this._landingOf = /* @__PURE__ */ new Map(), this._mirroredId = null, this._lastRevert = null, this._symbolIndex = null, this._symbolIndexOf = null, this._sheetsDerived = null, this._tablesDerived = null, this._namesDerived = null, this._collecting = null, this._recompileNamedPending = null, this._recompileLoadedPending = null, this._invalidateNamedPending = null, this.resolveScope = (t) => this._symbols.resolve(Fe.Sheet, t)?.toString(), this._heldCloneKey = null, this._callbacks = t.callbacks, this._runtime = t.runtime, this._richData = t.richData ?? Te.DetachedContext, this._symbols = t.symbols, this._resolvers = t.resolvers, this._getSheetIndex = t.getSheetIndex ?? null, this._legacyIntersect = !0 === t.legacyIntersect, this._gridOptions = t.gridOptions ?? {}, this._calculation = t.calculation;
|
|
7906
7906
|
const e = t.replica;
|
|
7907
7907
|
this._updateState({
|
|
7908
7908
|
gridsAll: /* @__PURE__ */ new Map(),
|
|
@@ -7921,8 +7921,8 @@ var ql = {
|
|
|
7921
7921
|
} }),
|
|
7922
7922
|
dynamicByBlock: /* @__PURE__ */ new Map(),
|
|
7923
7923
|
dirtySpatial: new wn()
|
|
7924
|
-
}), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, E.Axis.Column, t.functions), this._deferred = new
|
|
7925
|
-
createRichData: (t, e) =>
|
|
7924
|
+
}), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, E.Axis.Column, t.functions), this._deferred = new Zo(this._calcScope, (t, e, n) => this._holderAt(t, e, n), () => this._runtime.getRandom(), () => this._settle(), void 0, (t, e) => this._normalizeResult(t, e), {
|
|
7925
|
+
createRichData: (t, e) => Jt.fromJSON({
|
|
7926
7926
|
type: t,
|
|
7927
7927
|
data: e
|
|
7928
7928
|
}, this._richData),
|
|
@@ -7932,7 +7932,7 @@ var ql = {
|
|
|
7932
7932
|
parseText: t.parseText
|
|
7933
7933
|
}, () => this._callbacks.onPendingChange());
|
|
7934
7934
|
const n = this._callbacks;
|
|
7935
|
-
this._calcExecutor = new Es(this, this._context), t.planCacheMode && (this._calcExecutor.planCacheMode = t.planCacheMode), this._externalBindings = new
|
|
7935
|
+
this._calcExecutor = new Es(this, this._context), t.planCacheMode && (this._calcExecutor.planCacheMode = t.planCacheMode), this._externalBindings = new Ul({
|
|
7936
7936
|
books: t.books,
|
|
7937
7937
|
createGrid: (t) => this.createBackendGrid({ uuid: t }),
|
|
7938
7938
|
unregisterGrid: (t) => {
|
|
@@ -8010,7 +8010,7 @@ var ql = {
|
|
|
8010
8010
|
const r = this.getGrid(t);
|
|
8011
8011
|
if (!r) return null;
|
|
8012
8012
|
const o = r.getValues().getValueAt(e, n);
|
|
8013
|
-
return
|
|
8013
|
+
return bt(o) ? o : Ee(r.getSpills(), e, n);
|
|
8014
8014
|
}
|
|
8015
8015
|
_settleNow() {
|
|
8016
8016
|
const t = this._deferred, e = t.takeMoved();
|
|
@@ -8030,7 +8030,7 @@ var ql = {
|
|
|
8030
8030
|
if (null === _ || !o.isLiveNode(_)) continue;
|
|
8031
8031
|
const f = _.gridId, g = n.gridsAll.get(f);
|
|
8032
8032
|
if (!g) continue;
|
|
8033
|
-
const p = _.rowIndex, m = _.colIndex, S = g.getValues().getValueAt(p, m), w =
|
|
8033
|
+
const p = _.rowIndex, m = _.colIndex, S = g.getValues().getValueAt(p, m), w = bt(S), E = w ? S : Ee(g.getSpills(), p, m);
|
|
8034
8034
|
if (null === E || E.calls.indexOf(u) < 0) continue;
|
|
8035
8035
|
if (!E.direct) {
|
|
8036
8036
|
c.add(_), i(s, f).add(p, m);
|
|
@@ -8056,8 +8056,8 @@ var ql = {
|
|
|
8056
8056
|
}, n = y.errors.get(t);
|
|
8057
8057
|
n ? n.push(e) : y.errors.set(t, [e]);
|
|
8058
8058
|
}
|
|
8059
|
-
_.state &= -6815749,
|
|
8060
|
-
const x = r.search(
|
|
8059
|
+
_.state &= -6815749, Yl.colStart = m, Yl.colEnd = m, Yl.rowStart = p, Yl.rowEnd = p, Yl.scope = f;
|
|
8060
|
+
const x = r.search(Yl);
|
|
8061
8061
|
for (let t = 0; t < x.length; t++) {
|
|
8062
8062
|
const e = x[t], n = e.value;
|
|
8063
8063
|
if (n.index < 0) {
|
|
@@ -8068,7 +8068,7 @@ var ql = {
|
|
|
8068
8068
|
});
|
|
8069
8069
|
continue;
|
|
8070
8070
|
}
|
|
8071
|
-
|
|
8071
|
+
Xe(e, p, m, h);
|
|
8072
8072
|
}
|
|
8073
8073
|
}
|
|
8074
8074
|
for (const [e, n] of a) {
|
|
@@ -8083,7 +8083,7 @@ var ql = {
|
|
|
8083
8083
|
}), s[t] = {
|
|
8084
8084
|
...e,
|
|
8085
8085
|
value: !1
|
|
8086
|
-
},
|
|
8086
|
+
}, J(r.errorSpatial, e);
|
|
8087
8087
|
}
|
|
8088
8088
|
r.notifyCalcStatus.load(s);
|
|
8089
8089
|
for (const [t, e] of n.errors) r.errorSpatial.load(ni(e).map((e) => ({
|
|
@@ -8109,8 +8109,8 @@ var ql = {
|
|
|
8109
8109
|
createFormulaBlock(t, e, n, r, o, s, l) {
|
|
8110
8110
|
const i = this._callbacks.getCompiler(s);
|
|
8111
8111
|
if (!i) throw new Error("The calculation engine has not started; nothing can compile yet.");
|
|
8112
|
-
const a =
|
|
8113
|
-
return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ?
|
|
8112
|
+
const a = gt(t)?.bookId ?? null, c = a ? null : gt(this._externalBindings.getNameById(t)?.getScope() ?? "")?.bookId ?? null;
|
|
8113
|
+
return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ? R(a ?? c, -1) : this.getSheetName(t), l, a ? { book: a } : void 0), e, this._calcScope, t, () => this.getGrid(t)?.getEntireCoords() ?? null, this._resolvers);
|
|
8114
8114
|
}
|
|
8115
8115
|
getSymbols() {
|
|
8116
8116
|
return this._symbols;
|
|
@@ -8127,15 +8127,15 @@ var ql = {
|
|
|
8127
8127
|
return this._sheetsCache().ids;
|
|
8128
8128
|
}
|
|
8129
8129
|
getSheetSpanIds(t) {
|
|
8130
|
-
const e =
|
|
8130
|
+
const e = at(t);
|
|
8131
8131
|
if (e) {
|
|
8132
8132
|
const t = this.getSheetIds(), n = t.indexOf(e[0]), r = t.indexOf(e[1]);
|
|
8133
8133
|
return -1 === n || -1 === r ? null : t.slice(Math.min(n, r), Math.max(n, r) + 1);
|
|
8134
8134
|
}
|
|
8135
|
-
const n =
|
|
8135
|
+
const n = gt(t);
|
|
8136
8136
|
if (!n || n.sheetEnd === n.sheetIndex) return null;
|
|
8137
8137
|
const r = [];
|
|
8138
|
-
for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(
|
|
8138
|
+
for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(R(n.bookId, t));
|
|
8139
8139
|
return r;
|
|
8140
8140
|
}
|
|
8141
8141
|
getFormulas() {
|
|
@@ -8244,7 +8244,7 @@ var ql = {
|
|
|
8244
8244
|
}
|
|
8245
8245
|
markDirty(t) {
|
|
8246
8246
|
const e = this._getState(), n = e.dirtySpatial.clone(this._heldCloneKey), r = e.precedentSpatial, o = e.formulaSpatial;
|
|
8247
|
-
let s = !1, l =
|
|
8247
|
+
let s = !1, l = y(t, E.Axis.Column, 2);
|
|
8248
8248
|
for (let t = 0; t < l.length; t++) {
|
|
8249
8249
|
const e = l[t];
|
|
8250
8250
|
(r?.has(e) || o?.has(e)) && (s = !0, n.insertNonOverlapping(e));
|
|
@@ -8446,7 +8446,7 @@ var ql = {
|
|
|
8446
8446
|
}), e;
|
|
8447
8447
|
}
|
|
8448
8448
|
createEngineGrid(t) {
|
|
8449
|
-
const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ??
|
|
8449
|
+
const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ?? Ae : r ? () => r : void 0, s = this._callbacks;
|
|
8450
8450
|
return this.createBackendGrid({
|
|
8451
8451
|
uuid: e,
|
|
8452
8452
|
shadowOf: t.shadowOf,
|
|
@@ -8494,15 +8494,15 @@ var ql = {
|
|
|
8494
8494
|
switch (n.type) {
|
|
8495
8495
|
case "sheets": return this.applySheets(n.sheets), {
|
|
8496
8496
|
cycleId: this._cycleId,
|
|
8497
|
-
commitId:
|
|
8497
|
+
commitId: C(n)
|
|
8498
8498
|
};
|
|
8499
8499
|
case "tables": return this.applyTables(n.changes), {
|
|
8500
8500
|
cycleId: this._cycleId,
|
|
8501
|
-
commitId:
|
|
8501
|
+
commitId: C(n)
|
|
8502
8502
|
};
|
|
8503
8503
|
case "names": return this.applyNames(n.changes), {
|
|
8504
8504
|
cycleId: this._cycleId,
|
|
8505
|
-
commitId:
|
|
8505
|
+
commitId: C(n)
|
|
8506
8506
|
};
|
|
8507
8507
|
case "nameGraph": return {
|
|
8508
8508
|
cycleId: this._cycleId,
|
|
@@ -8515,7 +8515,7 @@ var ql = {
|
|
|
8515
8515
|
const o = this.getGrid(t);
|
|
8516
8516
|
return o ? r ? o._apply(n, this.getCurrentCommitId(), !0) : o._apply(n, e) : {
|
|
8517
8517
|
cycleId: this._cycleId,
|
|
8518
|
-
commitId:
|
|
8518
|
+
commitId: C(n)
|
|
8519
8519
|
};
|
|
8520
8520
|
}
|
|
8521
8521
|
applyHeld(t, e) {
|
|
@@ -8580,7 +8580,7 @@ var ql = {
|
|
|
8580
8580
|
return l;
|
|
8581
8581
|
}
|
|
8582
8582
|
followRestore(t, e) {
|
|
8583
|
-
return e ===
|
|
8583
|
+
return e === H.Status.Off || e === H.Status.Error ? (this.retarget(t), !1) : e !== H.Status.Running ? (null !== this.restoreTo(t) || this.holdsModelCommit(t) || this.retarget(t), !1) : this.holdsModelCommit(t) ? (this.restoreTo(t), !1) : (this.retarget(t), !0);
|
|
8584
8584
|
}
|
|
8585
8585
|
rebuild(t) {
|
|
8586
8586
|
this.drop(), this.setReplica(t), this.open();
|
|
@@ -8612,13 +8612,13 @@ var ql = {
|
|
|
8612
8612
|
if (u.deferCount !== l) {
|
|
8613
8613
|
const t = this._deferred, e = t.endEvaluation();
|
|
8614
8614
|
o.cachedValue = e.calls.length > 0 ? t.newHolder(a, e) : void 0, t.flush();
|
|
8615
|
-
} else
|
|
8616
|
-
let c =
|
|
8615
|
+
} else bt(o.cachedValue) && (o.cachedValue = void 0);
|
|
8616
|
+
let c = He(t.finalizeValue(a));
|
|
8617
8617
|
return null === c && (c = 0), !r || c?.isIRange || Array.isArray(c) ? c : i.createRange(1, 1, c);
|
|
8618
8618
|
},
|
|
8619
8619
|
getCalls: () => {
|
|
8620
8620
|
const t = f.getAnchorNode().cachedValue;
|
|
8621
|
-
return
|
|
8621
|
+
return bt(t) ? t.calls : r.EmptyArray;
|
|
8622
8622
|
}
|
|
8623
8623
|
};
|
|
8624
8624
|
}
|
|
@@ -8635,7 +8635,7 @@ var ql = {
|
|
|
8635
8635
|
for (let t = 0; t < n.length; t++) {
|
|
8636
8636
|
const r = n[t].value;
|
|
8637
8637
|
if (null == r.gridId) continue;
|
|
8638
|
-
if (
|
|
8638
|
+
if (jt(r.gridId) || this._externalBindings.getNameById(r.gridId)) continue;
|
|
8639
8639
|
const o = r.getReferencedSymbolIds();
|
|
8640
8640
|
if (0 === o.length) continue;
|
|
8641
8641
|
const s = r.ref, l = {
|
|
@@ -8698,10 +8698,10 @@ var ql = {
|
|
|
8698
8698
|
e ? e.push(l[t]) : s.set(u, [l[t]]);
|
|
8699
8699
|
continue;
|
|
8700
8700
|
}
|
|
8701
|
-
const _ = null != u && !n.isDefinedName(u) && !
|
|
8701
|
+
const _ = null != u && !n.isDefinedName(u) && !jt(u) && !this._externalBindings.getNameById(u);
|
|
8702
8702
|
if (h && _) for (let t = 0; t < o.length; t++) {
|
|
8703
8703
|
const [e, n] = o[t];
|
|
8704
|
-
a.includes(e) && (h = h.replaceTableReferences(e, (t) =>
|
|
8704
|
+
a.includes(e) && (h = h.replaceTableReferences(e, (t) => F(t, n) ? we() : null));
|
|
8705
8705
|
}
|
|
8706
8706
|
const f = h && h !== i.formula ? h.getTextAt(d.rowStart, d.colStart) : i.getTextAt(d.rowStart, d.colStart);
|
|
8707
8707
|
this._writeBlockText(i, f);
|
|
@@ -8709,7 +8709,7 @@ var ql = {
|
|
|
8709
8709
|
if (s) for (const [t, e] of s) this.getGrid(t)?._rederivePrecedentsNow(e);
|
|
8710
8710
|
}
|
|
8711
8711
|
refitTableRows(t, e, n, r, s) {
|
|
8712
|
-
const l = this._symbols.bind(
|
|
8712
|
+
const l = this._symbols.bind(Fe.Sheet, t);
|
|
8713
8713
|
if (!l) return;
|
|
8714
8714
|
const i = this._getState().precedentSpatial.search({
|
|
8715
8715
|
colStart: e.colStart,
|
|
@@ -8723,7 +8723,7 @@ var ql = {
|
|
|
8723
8723
|
const e = i[t].value;
|
|
8724
8724
|
if (e.index < 0) continue;
|
|
8725
8725
|
const n = e.formulaEntry.value, r = n.gridId;
|
|
8726
|
-
if (null == r ||
|
|
8726
|
+
if (null == r || jt(r) || this._externalBindings.getNameById(r)) continue;
|
|
8727
8727
|
const o = (a ??= /* @__PURE__ */ new Map()).get(n);
|
|
8728
8728
|
o ? o.includes(e.index) || o.push(e.index) : a.set(n, [e.index]);
|
|
8729
8729
|
}
|
|
@@ -8789,11 +8789,11 @@ var ql = {
|
|
|
8789
8789
|
}
|
|
8790
8790
|
}
|
|
8791
8791
|
rewriteTableReferences(t, e) {
|
|
8792
|
-
const n = (t) => e ?
|
|
8792
|
+
const n = (t) => e ? St(t, e) : we(), r = this._callbacks, o = this._getState().formulaSpatial.all3D();
|
|
8793
8793
|
for (let e = 0; e < o.length; e++) {
|
|
8794
8794
|
const s = o[e].value, l = s.gridId;
|
|
8795
8795
|
if (null == l || !s.getReferencedSymbolIds().includes(t)) continue;
|
|
8796
|
-
if (r.isDefinedName(l) ||
|
|
8796
|
+
if (r.isDefinedName(l) || jt(l) || this._externalBindings.getNameById(l)) continue;
|
|
8797
8797
|
const i = s.formula, a = i?.replaceTableReferences(t, n);
|
|
8798
8798
|
if (!a || a === i) continue;
|
|
8799
8799
|
const c = s.ref;
|
|
@@ -9166,7 +9166,7 @@ var ql = {
|
|
|
9166
9166
|
toString() {
|
|
9167
9167
|
return "CalcBackend";
|
|
9168
9168
|
}
|
|
9169
|
-
},
|
|
9169
|
+
}, Yl = {
|
|
9170
9170
|
colStart: 0,
|
|
9171
9171
|
rowStart: 0,
|
|
9172
9172
|
colEnd: 0,
|
|
@@ -9174,7 +9174,7 @@ var ql = {
|
|
|
9174
9174
|
scope: void 0
|
|
9175
9175
|
}, ti = class {
|
|
9176
9176
|
constructor(t) {
|
|
9177
|
-
this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating =
|
|
9177
|
+
this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating = b(t);
|
|
9178
9178
|
}
|
|
9179
9179
|
add(t, e) {
|
|
9180
9180
|
const n = this._unordered;
|
|
@@ -9203,7 +9203,7 @@ var ql = {
|
|
|
9203
9203
|
colEnd: t.colEnd,
|
|
9204
9204
|
rowEnd: t.rowEnd
|
|
9205
9205
|
}), ni = (t) => {
|
|
9206
|
-
const e =
|
|
9206
|
+
const e = y(t, E.Axis.Column, 2), n = new Array(e.length);
|
|
9207
9207
|
for (let t = 0; t < e.length; t++) {
|
|
9208
9208
|
const r = e[t];
|
|
9209
9209
|
n[t] = {
|
|
@@ -9219,4 +9219,4 @@ var ql = {
|
|
|
9219
9219
|
for (let n = 0; n < t.length; n++) t[n][2] && (e ??= /* @__PURE__ */ new Set()).add(t[n][0]);
|
|
9220
9220
|
return e ?? ai;
|
|
9221
9221
|
};
|
|
9222
|
-
export {
|
|
9222
|
+
export { Ql as CalcBackend };
|