@sheetxl/mcp 0.8.0-beta.15 → 0.8.0-beta.16
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/LICENSE.md +8 -7
- package/assets/{OVRdpPUzR0-ueTxE.js → -PtBguqpLi7Nr4Df.js} +2 -2
- package/assets/{BOPsJmq7v7HOKUkO.js → 2GLqCzpAJP6jbaRx.js} +12 -12
- package/assets/{BPwmBu_aouERJjiW.js → 3_NofB4A4Qhl-4YY.js} +2 -2
- package/assets/{CGBGyaCGdlZFQYK0.js → 3t-I20nDzFHBd5UJ.js} +2 -2
- package/assets/{hulrR0PldUxMJm_F.js → 4vS8pASPZSU7QcRZ.js} +4 -4
- package/assets/{Bh0PNKlrR4VAqnP8.js → 5B_tapYOcjOv1wGO.js} +35528 -30074
- package/assets/{FS9NbEKgQvz5wqvZ.js → 8NrxfSWBHDaEJvhz.js} +2 -2
- package/assets/{oxjm7Yr7u7MeaO5P.js → 9MXt8KXdWlbEJNc2.js} +2 -2
- package/assets/{CduNzsdbTigxH-ZK.js → AjWB-QdIkr07kToW.js} +189 -189
- package/assets/{DvUUArnZwoYOKOuk.js → B16N6VSLY5HPgVkD.js} +2 -2
- package/assets/{C0CiMKC3lWK1z9p5.js → B2YEEPHIkNcezk9T.js} +3 -3
- package/assets/{CNz3LdmvsOEJoLO9.js → B3MqN3t5naY3moOk.js} +2 -2
- package/assets/BBPjYcS8XKQREith.js +199 -0
- package/assets/{B4VnJacrzr1x4PHR.js → BCSRsSAEPlwR59H5.js} +5 -5
- package/assets/{CMK6tIDVqYYvK4GZ.js → BIUUGUhypimIDg2a.js} +2 -2
- package/assets/{iujMYIEPx_v3sdPf.js → BNrpvJZtIL0Ex_wE.js} +996 -995
- package/assets/{DA_ar3QKLKtJ9fJD.js → BR66nPIzyzlOcP10.js} +2 -2
- package/assets/{CvngwB17_ve4W49b.js → BRLA4pJWiYdpW-69.js} +73 -73
- package/assets/{Crt2kLdGIlBHANgg.js → BUAq-ENCmL0XGLIu.js} +2 -2
- package/assets/{Bn8D2bebQ2tFfwQt.js → BYqyNLuwXl7GKuzh.js} +43 -41
- package/assets/{ZuYfVKlp41IJnrOS.js → BZbxPclVVopktv3l.js} +2 -2
- package/assets/{Cf9LpgZz-W5blzy_.js → B_nQLUWaxp-Q1IfV.js} +3 -3
- package/assets/{BbcUxIZe3YXywsQR.js → BbDKWV_FQAICqZjP.js} +2 -2
- package/assets/{B2udpZ-uIaql3AUh.js → BbXlmp8W_cbr75FN.js} +6 -6
- package/assets/{CxjchwpiqxPM1XKd.js → BdMebk9YSA0oxQ_d.js} +70 -70
- package/assets/{JO3zH9hupFSV6vj2.js → Bdt9nQs8gDIzu_IG.js} +2 -2
- package/assets/{Cf2dcwmmmf13Rywg.js → BiE9M6RctwQ339_7.js} +2 -2
- package/assets/{BJxfinOazQqqByc-.js → BiGm1tKvxUh8oWbD.js} +2 -2
- package/assets/{DH7sGHzxUqIQkDnd.js → BjDsx_FHl0mShqHX.js} +2 -2
- package/assets/{DB-tkqI6wFXDKEfB.js → BlIrJwQGEASCgJdZ.js} +2 -2
- package/assets/{DD8HNAUFroTCuD-b.js → BlWfQ5HPEehB_lPz.js} +3288 -2130
- package/assets/BpgPKKZwxXklRyo7.js +7 -0
- package/assets/{D7oUtYjetuykGhQ5.js → BrtLeTsrulaU6osB.js} +2 -2
- package/assets/{LyLlBk--VJD2V-f8.js → BsFWmVYPrLyh5Dre.js} +34 -34
- package/assets/{DJiLWtmPR2OQNjzi.js → BtNRIFE92ka4hATo.js} +2 -2
- package/assets/{DKLm4nWzynGw1Kr9.js → BuhHuKVWppW4L8AV.js} +2 -2
- package/assets/{C4z2IilWTuu2TWXw.js → C-AIgWmHugqMcl9J.js} +3 -3
- package/assets/{U1XXGEPuuqIAzYl1.js → C-gN7uBg-MWHRo4g.js} +2 -2
- package/assets/{vZZi_iKYHm05gAye.js → C0JSC9gVwR1QxopD.js} +2 -2
- package/assets/{Cfhv_Yw_LT8VzAMt.js → C2dG4GHThf9O-IJy.js} +2 -2
- package/assets/{Cg51xaLRUkVOMdCZ.js → C3Wibs7QGFZ1FI7W.js} +2 -2
- package/assets/{BuUEsifnQALe49uk.js → C75i_5ip7OhGkuiF.js} +2 -2
- package/assets/{DDnwKPJSznyfYDZS.js → C95HXhZkkhnUx_aE.js} +3 -3
- package/assets/{CWl6oHiJxkNKRixk.js → CAEhAL7-0FG7jdzN.js} +2 -2
- package/assets/{D-ffk16w8c5w0mxI.js → CAMrW5ypKhgn105y.js} +2 -2
- package/assets/{B-MqXm_7luDLwazY.js → CBPkPTmeaEokFPSI.js} +2 -2
- package/assets/{xnhBSX6lAcmBM65y.js → CDqG64rXHp9-2tXr.js} +2 -2
- package/assets/{ClNQN3vEg5b5qUDp.js → CFdJvXLSbUrvNera.js} +2435 -2447
- package/assets/{PpFbmF0DFeUdpb9I.js → CG8zvnxueimOY7wm.js} +2 -2
- package/assets/{BsQZI1vXTRE63Zy-.js → CIqJdIUKSLZkNwHy.js} +345 -235
- package/assets/{_fUXIv6nKvgZkhxn.js → CJa8JVvKGVBz8Q7q.js} +3 -3
- package/assets/{CwPBmcY6xSP8dNlh.js → CK9h6iDOreaI8GEt.js} +12 -12
- package/assets/CL1-ziDI0aAaVbhJ.js +7 -0
- package/assets/{C7ONfuYIWRmDu_vs.js → CVRc6jQcH155Z89u.js} +2 -2
- package/assets/{B9US2ZrF93KOjmAx.js → CVbRpT7QPHOMgwTx.js} +2 -2
- package/assets/CW-ivE6pl3V7vKuT.js +2563 -0
- package/assets/{F_f0jJqM5MrXGbwC.js → CX-6eYkcr5y0VmQm.js} +4 -4
- package/assets/{BlPubAFi7DY7VrAo.js → CZepo1lDTQp1myg6.js} +2 -2
- package/assets/{D8J14MLlN2HRXdXB.js → C_0RM0w6Pw70Bx_Y.js} +2 -2
- package/assets/{C2OrZ8LZ-TI6eYG0.js → Ci7-PIIhZwb2mVv5.js} +2 -2
- package/assets/{BleMG0hAQgjE8fTa.js → Cl98sBOj9GM2XnFe.js} +3 -3
- package/assets/{DwWngYJTgC0KLbih.js → CoIjAX2gECGb3Wxl.js} +2 -2
- package/assets/{DcWTBOi_iBFc6U4J.js → Co_y6GfwJTYtOmlt.js} +8 -8
- package/assets/{BQMDOjNBMjAx9WiW.js → CrwtgrD7BbXyCkx0.js} +2 -2
- package/assets/{CJ5WQnaoCsdr5gf4.js → CsjjeeOHE2624pGt.js} +2 -2
- package/assets/Ct5VTtdW77k-WcP_.js +529 -0
- package/assets/{DwLZpYUp85UHBE3H.js → CvJkwRgwm80S2bcd.js} +2 -2
- package/assets/{fDMpDhXp36CatF-G.js → D-irgQZ2WmkP9dnK.js} +2 -2
- package/assets/{BFdeov2e_xUQPEY_.js → D1g6IOzdvInVLV-x.js} +7 -7
- package/assets/{Btys7KwtvV3hz2F6.js → D2YdqNWXwSHJMPbA.js} +109 -109
- package/assets/{BQbF1RkUH8WyXqSD.js → D3bxrF1Ys2GSVfQH.js} +25 -19
- package/assets/{wfVh0olISLRWdv9Q.js → D7iU4kaxzl_PojNt.js} +2 -2
- package/assets/{DTfl-4Iboi6TQU5m.js → D7ibkNIu_Pn4TeBD.js} +4 -4
- package/assets/DBANZf_eAzaCFdIj.js +4676 -0
- package/assets/{DoILAmhKUOlKWRVw.js → DBMZF6PRHCko9K9R.js} +2 -2
- package/assets/{BFXeoFUbuc4IKTz9.js → DEIkGoOZ_WeuY0Lj.js} +2 -2
- package/assets/{xmTQJJVyCrcq77WR.js → DFAqI-o57Kd_Azlt.js} +2 -2
- package/assets/{BtjqpAKczftx91BQ.js → DFn_thWGK0_EZI5k.js} +2 -2
- package/assets/{DlBdhv6NHgrNp5Yo.js → DFvs1LVzXKm1N5M2.js} +3 -3
- package/assets/{DVchxwp6w6lu2Ihu.js → DJdRl2yX9DP_D8kh.js} +3 -3
- package/assets/{BG5kgbDRXMc0re6W.js → DKRa_Oc4XqB3DABB.js} +9 -9
- package/assets/{BZPTaa0WjpoUAbgZ.js → DLhlBqwsDnmscAuL.js} +2 -2
- package/assets/{BRzp6DEIYUgM3NkN.js → DMhtIFfkX-DZT_e3.js} +4 -4
- package/assets/{DpdHDTFOeuzDVNEe.js → DNhfziNrJGdL8BYs.js} +78 -77
- package/assets/{jadLBUNBVR9mbZ35.js → DOZ40EyxD3m0gCos.js} +809 -494
- package/assets/{SHZe9VOU1prGs1F9.js → DQcus4X_kTKIIyX6.js} +2 -2
- package/assets/{C7Z1li2XjWi6bkrp.js → DR9xHYH6v5G0lOqf.js} +4 -4
- package/assets/{DsCI_ZYm_jDjXF3J.js → DTLbKr_XIJMwQJmk.js} +52 -52
- package/assets/{_d5XJ7dn1CKKYrep.js → DaILIYfy-jPVTXjz.js} +3 -3
- package/assets/{S16s2h9qoYVBlVEa.js → Dd8CHUZz7xuYTfp-.js} +1444 -1356
- package/assets/{B5lHOOQ_rkP4Mi2r.js → DdrsYdX3bLixdb_9.js} +2 -2
- package/assets/DfWWAHOjmhqvN3m_.js +7166 -0
- package/assets/{9U9XCqqdn-q3i2fj.js → DfzLOnWTNL_2J90y.js} +2 -2
- package/assets/{BTQhJQ3e0hsiousD.js → Dg4JXbd1yPGNZOtL.js} +2 -2
- package/assets/Di4ehJD7muvtcrN3.js +169 -0
- package/assets/{BbAmA46MhQSu3ZF_.js → DmLbqbAez7Dzwyl7.js} +2 -2
- package/assets/{CudNpUD78SrtJIiy.js → Dp-dLoOaBndV2N5i.js} +3 -3
- package/assets/DsTi7zHk_Xl37bAD.js +14 -0
- package/assets/{Diee6f_qAmcZBd2_.js → DvFwVzuc5YfagNnH.js} +2 -2
- package/assets/{D0CHDsemn0S31ltt.js → Dy67BUF2yd8VRPwL.js} +2 -2
- package/assets/{LEJp05fjmflKgyqF.js → DzkccbbE6iXMqQDO.js} +451 -447
- package/assets/{B7gUyrfLln3TiyKM.js → Gqh12ggLm5KlvN3v.js} +2 -2
- package/assets/{BjqQjxBuoXza8oqg.js → JC8UUcu6m23qqrr3.js} +3 -4
- package/assets/{ChWpsFGl-BYOnX_A.js → LwFDS0HxPZKiiEnN.js} +2 -2
- package/assets/{BeLr36oL3jmeXFFi.js → POdlv6cpSx6ftJxx.js} +2 -2
- package/assets/{CMWAsUQ66V8fYrME.js → QVWayvB03YMyTKt3.js} +3 -3
- package/assets/{Dz8UUJ7Xc2oN5PBG.js → SB2aKOIVln0EkgXR.js} +2 -2
- package/assets/SaCo3me4_hw2b1L4.js +2039 -0
- package/assets/{CecTe22WURiXbVdY.js → TNQaiw20sEAEUiK5.js} +386 -372
- package/assets/{jPUOH4FHF4b-rapv.js → W2FU69Pfo4chpqtk.js} +2 -2
- package/assets/{CXHslDxkWCuEcCSQ.js → YXC__Myl-BuIFW6s.js} +2 -2
- package/assets/{DPCKMM7sgWbrtB8z.js → Z01wJImjl6lBMpf4.js} +2 -2
- package/assets/{C97xDe_wBbLZh_uW.js → h6EQSu5n2vTsu2yd.js} +2 -2
- package/assets/{FzNG48GE_wso6RII.js → iULnLPcNKVpz00r7.js} +2 -2
- package/assets/{DEW2GxfGYqVFvrfg.js → iqQWGoJaPha0_8lU.js} +2 -2
- package/assets/{BrcQmHcE7Hcr1erJ.js → nDmE2I07HvkpRdR0.js} +2 -2
- package/assets/{Bg95xYj5siqhHVEz.js → nmB0nnkFQf5NWo0i.js} +3 -3
- package/assets/{BCy1zP97fsiIcvj6.js → pQUJKbHGetb7dcOr.js} +2 -2
- package/assets/{B2Ek-DWpZMGJ0V1Z.js → rfwqMukKbJBeJBuC.js} +3 -3
- package/assets/{By-7OWXShMlFFejV.js → soSlr334Fv1j5t2m.js} +2 -2
- package/index.js +2010 -1944
- package/lib.js +2 -2
- package/licenses/dependencies.txt +259 -194
- package/package.json +4 -9
- package/resources/locales/@sheetxl/sdk/de/model.msg.json +82 -1
- package/resources/locales/@sheetxl/sdk/en/model.msg.json +80 -1
- package/screenshot-page/assets/{CSUd8n1H0VBfREnk.js → -N4OYIMgf6f5vgNy.js} +1 -1
- package/screenshot-page/assets/{B4PbXdzBe9BsoZ0e.js → B7eQ3rE-7Vayb_4O.js} +1 -1
- package/screenshot-page/assets/B8i4Sr2kMQAXp0rb.js +4 -0
- package/screenshot-page/assets/{DQWHkaQeNXft9j8b.js → B8qybUclSjEYP5FJ.js} +2 -2
- package/screenshot-page/assets/BIHbD4jMsk3NetOd.js +1 -0
- package/screenshot-page/assets/BIrVK5hdDCUYmxGO.js +1 -0
- package/screenshot-page/assets/{l32n8O_A78Qqduv3.js → BJ2r2WfEL3SgkBAX.js} +1 -1
- package/screenshot-page/assets/BJviQwDXR5L6l1DA.js +1 -0
- package/screenshot-page/assets/BM78thqEW6HwXFAK.js +13 -0
- package/screenshot-page/assets/{BcOdl17EeFSxnAiq.js → BMf827t1Ul65MHd5.js} +1 -1
- package/screenshot-page/assets/BMwQInar0xVS5FRu.js +1 -0
- package/screenshot-page/assets/{BUjI304IvdJnFXH3.js → BU5S8KEzPmIA_Flm.js} +1 -1
- package/screenshot-page/assets/{D6Jpaz2YkhOfzxDB.js → BYQZ8o8k3-MDoNat.js} +1 -1
- package/screenshot-page/assets/{CZf9s6otzzoaBlSs.js → BftXEPOuf5Uwxpud.js} +1 -1
- package/screenshot-page/assets/Bir0SSOHX0w2yo8h.js +1 -0
- package/screenshot-page/assets/{CykecBozGGFl26KA.js → Btgo0VFTT0JxuaP3.js} +74 -68
- package/screenshot-page/assets/C2H2lX8eyKpxpP6M.js +2 -0
- package/screenshot-page/assets/{B-KIwD5F_5S-NsPg.js → C71ZZMVLfHdPl441.js} +1 -1
- package/screenshot-page/assets/CFfgJlXaIS8QMx5O.js +1 -0
- package/screenshot-page/assets/{DGXDfjkGZjMRAXPg.js → CN8u05DjKwNHbUHN.js} +1 -1
- package/screenshot-page/assets/CQFj5AGXfIA9z9zI.js +1 -0
- package/screenshot-page/assets/{gG0AFZ45VxS_moMw.js → CRsTnamLrPN5-Dsi.js} +1 -1
- package/screenshot-page/assets/CYfkL98Zu43S8-50.js +42 -0
- package/screenshot-page/assets/{DXQLzGmxoyN3kfQi.js → CZa1rha3RnQUWyOk.js} +7 -7
- package/screenshot-page/assets/{CpbohdgEaEsVDi9J.js → C_vPl50T1L5HWnhv.js} +1 -1
- package/screenshot-page/assets/{CbUDukmvDZmVfhJH.js → CfkssmHURDicfYvR.js} +1 -1
- package/screenshot-page/assets/{Bj-vfAT28PK-tWWa.js → CguXw0IcKNPbmAbj.js} +2 -2
- package/screenshot-page/assets/{DmbuCapSSCYIa3yk.js → ClzJdxlUDDtBYjH8.js} +1 -1
- package/screenshot-page/assets/{BTboCICZ-951XWsi.js → CqyMYduWKFvmMs_Z.js} +1 -1
- package/screenshot-page/assets/CzsoLbEIUVK5ia1C.js +1 -0
- package/screenshot-page/assets/D2IHCJ1QWDKwmhge.js +1 -0
- package/screenshot-page/assets/D6CzedWHXTesD55R.js +1 -0
- package/screenshot-page/assets/D7biuwkvm3zAwsBa.js +39 -0
- package/screenshot-page/assets/D8s3sJnhFxbI3Dqn.js +1 -0
- package/screenshot-page/assets/{hp_-JA1DMK4Yoztn.js → DDkL9PZPXAggW2Yr.js} +19 -19
- package/screenshot-page/assets/DEpn6VGd30cHEJOS.js +1 -0
- package/screenshot-page/assets/{CIged53b3hHKxa-o.js → DLFFFQjTi5Ji1940.js} +1 -1
- package/screenshot-page/assets/DMxrNtfw275en7pm.js +1 -0
- package/screenshot-page/assets/{CqR3hGrC956TkCMj.js → DRncpwDkZZX8rL9S.js} +1 -1
- package/screenshot-page/assets/DTrnAtpccj55fGg5.js +1 -0
- package/screenshot-page/assets/D_kJ3WunvjIINcHC.js +1 -0
- package/screenshot-page/assets/{BFaiQZKle44Rhyou.js → D_rtIYQ7FDC2CoEn.js} +1 -1
- package/screenshot-page/assets/{Bf7xq8PyF4ohjMzP.js → Db6bZVJ-184DJIoe.js} +2 -2
- package/screenshot-page/assets/{DyLWQxXXTw5uwPVy.js → DeyRZ5rprDbRbuf4.js} +1 -1
- package/screenshot-page/assets/{D47ePD4x1lVazNdl.js → DgtqX4DiBgkepVZZ.js} +1 -1
- package/screenshot-page/assets/DhB6GjSJIeTmIODk.js +1 -0
- package/screenshot-page/assets/Dn5PwRw7rrTKNnql.js +586 -0
- package/screenshot-page/assets/{TfhknTx8vxQkw4zV.js → Dq7wGcTrNIshovlT.js} +2 -2
- package/screenshot-page/assets/{BUGXf2DEBog16Slb.js → DqXO_Zw1Cp7rAQ04.js} +2 -2
- package/screenshot-page/assets/{21oAESJyBGXeHegm.js → DtihumgXQ7ETaN0A.js} +2 -2
- package/screenshot-page/assets/DuYb_otrRZZDq6-f.js +2 -0
- package/screenshot-page/assets/DyiVrm8mEnEaoZHa.js +3 -0
- package/screenshot-page/assets/{BHqg55S-4_OoAu3P.js → LYyM_ig973jLdOU0.js} +2 -2
- package/screenshot-page/assets/TilS2JSBGVkd1za3.js +3 -0
- package/screenshot-page/assets/Tph2vYqw17-NBCtd.js +1 -0
- package/screenshot-page/assets/UKFgEuwI1UMhPqKF.js +2 -0
- package/screenshot-page/assets/XgsioU5Px1T5gKAY.js +1 -0
- package/screenshot-page/assets/cTMKPkmZF8FWQaMn.js +1 -0
- package/screenshot-page/assets/hlxJ87-H830aSZBQ.js +1 -0
- package/screenshot-page/assets/{DDQWM8rNYCYzKa9R.js → lgeNUp9cU20IAotv.js} +1 -1
- package/screenshot-page/assets/nM1r2xslndIMKlI2.js +2 -0
- package/screenshot-page/assets/{BSdFVGZNhU6YHbMI.js → rOzyaU7hqchMbhRL.js} +1 -1
- package/screenshot-page/index.html +12 -12
- package/screenshot-page/resources/locales/@sheetxl/sdk/de/model.msg.json +82 -1
- package/screenshot-page/resources/locales/@sheetxl/sdk/en/model.msg.json +80 -1
- package/types/scripting-api.json +9967 -9497
- package/types/scripting-enums.json +27 -0
- package/types/scripting.d.ts +2282 -166
- package/assets/BBb_3gEGzmEzbTIk.js +0 -359
- package/assets/BSxTn2BhkEEeF9x_.js +0 -2346
- package/assets/CWVWdbY1B1-WLl9k.js +0 -199
- package/assets/CZTSZL3T_f-vSXqM.js +0 -7
- package/assets/DaoSWy3EFlqpZaLr.js +0 -4437
- package/assets/Dht2mcOSyYlPY32b.js +0 -14
- package/assets/DkibD_CEVePaoj_y.js +0 -7
- package/assets/jiEe5eKV3BFPBWfi.js +0 -6294
- package/screenshot-page/assets/0MTaPYjKud2Q9QG9.js +0 -1
- package/screenshot-page/assets/B2MJPcMcsuv6FekC.js +0 -1
- package/screenshot-page/assets/BQfe-XTIOGeUnD9B.js +0 -1
- package/screenshot-page/assets/BTMW3ukmc44U2fy7.js +0 -1
- package/screenshot-page/assets/B_W2QroTKADz3ABp.js +0 -2
- package/screenshot-page/assets/BksaQEoZr5OWq-_d.js +0 -3
- package/screenshot-page/assets/BnoVwUBEor8NgQNs.js +0 -4
- package/screenshot-page/assets/BzQ5GyiXq8gTz-H-.js +0 -1
- package/screenshot-page/assets/C2Wh2h27c7FUb8Yk.js +0 -1
- package/screenshot-page/assets/C81mK8aZKZAAS-AB.js +0 -1
- package/screenshot-page/assets/Ca6nxdhEuLLty3d7.js +0 -2
- package/screenshot-page/assets/CwqNb7JYzC03lCj0.js +0 -1
- package/screenshot-page/assets/CzhH7lTYQrYGHct6.js +0 -1
- package/screenshot-page/assets/D66vSE1ConAuENmB.js +0 -586
- package/screenshot-page/assets/DCVUZ_ayOXFwV2d_.js +0 -3
- package/screenshot-page/assets/DFE-fKq5NV7_O8V6.js +0 -1
- package/screenshot-page/assets/DK_QSosKV62NDcuT.js +0 -42
- package/screenshot-page/assets/DTFRGj188QuLKEXw.js +0 -1
- package/screenshot-page/assets/DXWWyJlMSWgDFxs1.js +0 -10
- package/screenshot-page/assets/DZDRRw-62D6Zw7qs.js +0 -1
- package/screenshot-page/assets/DeAKjatTVaZ0u_FY.js +0 -1
- package/screenshot-page/assets/Dsx0NUmGIxS7SvZ8.js +0 -1
- package/screenshot-page/assets/IRtoU5oVgBWu9rnK.js +0 -2
- package/screenshot-page/assets/Q5EKmzoJZCE81Om-.js +0 -2
- package/screenshot-page/assets/VvqAh6BWzaD5OUPF.js +0 -1
- package/screenshot-page/assets/fGlPAximvsxzPzGA.js +0 -1
- package/screenshot-page/assets/rPOkVKdPbFpTG6AY.js +0 -1
- package/screenshot-page/assets/sHBomL5R4-_px8rD.js +0 -1
- package/screenshot-page/assets/skRJ2qjA7kcmnOsh.js +0 -39
|
@@ -1,36 +1,36 @@
|
|
|
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.16
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { ht as e } from "./
|
|
8
|
-
import {
|
|
9
|
-
import { a as n, c as r, d as i, o as s, p as l } from "./
|
|
10
|
-
import {
|
|
11
|
-
var
|
|
7
|
+
import { ht as e } from "./CrwtgrD7BbXyCkx0.js";
|
|
8
|
+
import { i as t } from "./BNrpvJZtIL0Ex_wE.js";
|
|
9
|
+
import { a as n, c as r, d as i, o as s, p as l } from "./D3bxrF1Ys2GSVfQH.js";
|
|
10
|
+
import { Dn as o, Ea as a, En as u, F as c, Ii as f, Lt as p, Mt as d, Nn as g, Oa as v, Pa as h, Pt as m, Xr as y, Za as I, aa as b, d as x, eo as R, gt as E, ht as T, in as A, l as S, on as w, pn as C, ri as N, rn as F, sr as P, t as L, u as k, un as $, vr as O, xi as B, ya as V } from "./5B_tapYOcjOv1wGO.js";
|
|
11
|
+
var D = (e, t) => e + t, z = (e, t) => e - t, M = (e, t) => f(e + t, e), W = (e, t) => f(e - t, e), U = (e, t) => B(e * t), _ = (e, t) => 0 === t ? i.BuiltIn.Div0 : B(e / t), j = (e, t) => {
|
|
12
12
|
if (0 === e) {
|
|
13
13
|
if (t < 0) return i.BuiltIn.Div0;
|
|
14
14
|
if (0 === t) return NaN;
|
|
15
15
|
}
|
|
16
16
|
if (e < 0) {
|
|
17
|
-
if (Number.isInteger(t) && Math.abs(t) <= 4294967294) return
|
|
17
|
+
if (Number.isInteger(t) && Math.abs(t) <= 4294967294) return B(e ** t);
|
|
18
18
|
const n = Number((1 / t).toPrecision(15));
|
|
19
|
-
return Number.isInteger(n) && 1 === Math.abs(n % 2) ?
|
|
19
|
+
return Number.isInteger(n) && 1 === Math.abs(n % 2) ? B(-((-e) ** t)) : NaN;
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return B(e ** t);
|
|
22
22
|
}, G = (e = "", t = "") => {
|
|
23
23
|
null === e && (e = ""), null === t && (t = "");
|
|
24
24
|
const n = typeof t;
|
|
25
|
-
"boolean" == typeof e && (e =
|
|
25
|
+
"boolean" == typeof e && (e = m(e)), "boolean" === n && (t = m(t));
|
|
26
26
|
const r = "" + e + t;
|
|
27
27
|
return r.length > s.MAX_TEXT_LENGTH ? r.slice(0, s.MAX_TEXT_LENGTH) : r;
|
|
28
|
-
}, H = (e, t = null, n = null) => 0 === e.compare(t, n), X = (e, t = null, n = null) => 0 !== e.compare(t, n),
|
|
28
|
+
}, H = (e, t = null, n = null) => 0 === e.compare(t, n), X = (e, t = null, n = null) => 0 !== e.compare(t, n), Z = (e, t = null, n = null) => e.compare(t, n) > 0, K = (e, t = null, n = null) => e.compare(t, n) >= 0, q = (e, t = null, n = null) => e.compare(t, n) < 0, J = (e, t = null, n = null) => e.compare(t, n) <= 0, Q = {
|
|
29
29
|
type: l.Number,
|
|
30
30
|
coerce: [l.Boolean, l.String],
|
|
31
31
|
onError: "value",
|
|
32
32
|
misalignValue: i.BuiltIn.NA
|
|
33
|
-
},
|
|
33
|
+
}, Y = {
|
|
34
34
|
type: l.String,
|
|
35
35
|
coerce: [l.Boolean, l.Number],
|
|
36
36
|
onError: "value",
|
|
@@ -45,12 +45,12 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e,
|
|
|
45
45
|
let s, o;
|
|
46
46
|
if (t?.isIRange ? s = t : n?.isIRange && (o = n), !s && !o) {
|
|
47
47
|
const s = e.getRuntime();
|
|
48
|
-
return t =
|
|
48
|
+
return t = A(s, t, S(t, !0), l.Number, !0), n = A(s, n, S(n, !0), l.Number, !0), t && i.isError(t) ? t : n && i.isError(n) ? n : r(t, n);
|
|
49
49
|
}
|
|
50
50
|
const a = !s, u = a ? t : n;
|
|
51
|
-
return (s ?? o).broadcast(u, (t, n) => t && i.isError(t) ? t : n && i.isError(n) ? n :
|
|
51
|
+
return (s ?? o).broadcast(u, (t, n) => t && i.isError(t) ? t : n && i.isError(n) ? n : I(a ? r(n, t) : r(t, n), e), Q).fillEmpty(0);
|
|
52
52
|
}, re = (e, t, r, s) => {
|
|
53
|
-
if (
|
|
53
|
+
if (v(t) || v(r)) return i.BuiltIn.Value;
|
|
54
54
|
if (n(t) || n(r)) return i.BuiltIn.Value;
|
|
55
55
|
if (null !== t && void 0 !== t.colStart && (t = e.getValueAt(t.rowStart, t.colStart, t.scope)) && i.isError(t)) return t;
|
|
56
56
|
if (null !== r && void 0 !== r.colStart && (r = e.getValueAt(r.rowStart, r.colStart, r.scope)) && i.isError(r)) return r;
|
|
@@ -70,9 +70,9 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e,
|
|
|
70
70
|
if ("-" !== t) throw new i.Value(`Unrecognized prefix: ${t}`);
|
|
71
71
|
if (s = -s, n?.isIRange && (r = n), !r) {
|
|
72
72
|
const t = e.getRuntime();
|
|
73
|
-
return "number" != typeof (n =
|
|
73
|
+
return "number" != typeof (n = A(t, n, S(n, !0), l.Number, !0)) ? i.BuiltIn.Value : n * s;
|
|
74
74
|
}
|
|
75
|
-
return r.broadcast(s, (e, t) => e && i.isError(e) ? e : t && i.isError(t) ? t : U(e, t),
|
|
75
|
+
return r.broadcast(s, (e, t) => e && i.isError(e) ? e : t && i.isError(t) ? t : U(e, t), Q);
|
|
76
76
|
}, le = (e) => e.getCode() <= i.Code.NA ? e : i.BuiltIn.Value, oe = (e, t, n, r, s) => {
|
|
77
77
|
if (i.isError(t)) return le(t);
|
|
78
78
|
if (n && i.isError(n)) return le(n);
|
|
@@ -88,23 +88,23 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e,
|
|
|
88
88
|
const o = r(t, n);
|
|
89
89
|
return i.isError(o) ? o : o ? e.getReference(o) : i.BuiltIn.Null;
|
|
90
90
|
}, ae = {
|
|
91
|
-
"+": (e, t, n) => ne(e, t, n,
|
|
92
|
-
"-": (e, t, n) => ne(e, t, n,
|
|
91
|
+
"+": (e, t, n) => ne(e, t, n, D),
|
|
92
|
+
"-": (e, t, n) => ne(e, t, n, z),
|
|
93
93
|
"*": (e, t, n) => ne(e, t, n, U),
|
|
94
94
|
"/": (e, t, n) => ne(e, t, n, _),
|
|
95
95
|
"^": (e, t, n) => ne(e, t, n, j),
|
|
96
|
-
" ": (e, t, n, r) => oe(e, t, n,
|
|
97
|
-
":": (e, t, n, r) => oe(e, t, n,
|
|
96
|
+
" ": (e, t, n, r) => oe(e, t, n, g, "either"),
|
|
97
|
+
":": (e, t, n, r) => oe(e, t, n, b, "start"),
|
|
98
98
|
".:.": (e, t, n, r) => {
|
|
99
|
-
const i = oe(e, t, n,
|
|
99
|
+
const i = oe(e, t, n, b, "start");
|
|
100
100
|
return e.getFunction("TRIMRANGE").execute(i, 3, 3);
|
|
101
101
|
},
|
|
102
102
|
".:": (e, t, n, r) => {
|
|
103
|
-
const i = oe(e, t, n,
|
|
103
|
+
const i = oe(e, t, n, b, "start");
|
|
104
104
|
return e.getFunction("TRIMRANGE").execute(i, 1, 1);
|
|
105
105
|
},
|
|
106
106
|
":.": (e, t, n, r) => {
|
|
107
|
-
const i = oe(e, t, n,
|
|
107
|
+
const i = oe(e, t, n, b, "start");
|
|
108
108
|
return e.getFunction("TRIMRANGE").execute(i, 2, 2);
|
|
109
109
|
},
|
|
110
110
|
"&": (e, t, n) => ((e, t, n, r) => {
|
|
@@ -114,17 +114,17 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e,
|
|
|
114
114
|
let s, o;
|
|
115
115
|
if (t?.isIRange ? s = t : n?.isIRange && (o = n), !s && !o) {
|
|
116
116
|
const s = e.getRuntime();
|
|
117
|
-
return t =
|
|
117
|
+
return t = A(s, t, S(t, !0), l.String, !1), n = A(s, n, S(n, !0), l.String, !1), i.isError(t) ? t : i.isError(n) ? n : r(t, n);
|
|
118
118
|
}
|
|
119
119
|
const a = !s, u = a ? t : n;
|
|
120
|
-
return (s ?? o).broadcast(u, (e, t) => e && i.isError(e) ? e : t && i.isError(t) ? t : a ? r(t, e) : r(e, t),
|
|
120
|
+
return (s ?? o).broadcast(u, (e, t) => e && i.isError(e) ? e : t && i.isError(t) ? t : a ? r(t, e) : r(e, t), Y);
|
|
121
121
|
})(e, t, n, G),
|
|
122
122
|
"=": (e, t, n) => re(e, t, n, H),
|
|
123
123
|
"<>": (e, t, n) => re(e, t, n, X),
|
|
124
|
-
">": (e, t, n) => re(e, t, n,
|
|
124
|
+
">": (e, t, n) => re(e, t, n, Z),
|
|
125
125
|
"<": (e, t, n) => re(e, t, n, q),
|
|
126
|
-
">=": (e, t, n) => re(e, t, n,
|
|
127
|
-
"<=": (e, t, n) => re(e, t, n,
|
|
126
|
+
">=": (e, t, n) => re(e, t, n, K),
|
|
127
|
+
"<=": (e, t, n) => re(e, t, n, J)
|
|
128
128
|
}, ue = {
|
|
129
129
|
"+": (e, t, n) => ne(e, t, n, M),
|
|
130
130
|
"-": (e, t, n) => ne(e, t, n, W)
|
|
@@ -159,38 +159,38 @@ var de = class {
|
|
|
159
159
|
value: null,
|
|
160
160
|
inputs: null
|
|
161
161
|
};
|
|
162
|
-
if (this.references.set(e, t), n ===
|
|
162
|
+
if (this.references.set(e, t), n === P.Cell) {
|
|
163
163
|
const n = e.value;
|
|
164
164
|
n.$colIndex && (t.hasHorizontalAbs = !0), n.$rowIndex && (t.hasVerticalAbs = !0), t.value = this.cells.size, this.cells.set(e, this.cells.size), this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, this.referenceIndices.push(t.index);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
if (n ===
|
|
167
|
+
if (n === P.Infix || n === P.Prefix || n === P.Postfix || n === P.List) {
|
|
168
168
|
const n = e.inputs || [], r = n.length, i = e.value;
|
|
169
169
|
t.op = i;
|
|
170
|
-
const s =
|
|
170
|
+
const s = d(r);
|
|
171
171
|
t.inputs = s;
|
|
172
172
|
for (let e = 0; e < r; e++) {
|
|
173
173
|
const r = n[e], i = this.references.get(r);
|
|
174
174
|
i ? (i.hasHorizontalAbs && (t.hasHorizontalAbs = !0), i.hasVerticalAbs && (t.hasVerticalAbs = !0), s[e] = i.index) : s[e] = -1, i && this.rootReferences.delete(i);
|
|
175
175
|
}
|
|
176
|
-
if (this.rootReferences.add(t),
|
|
177
|
-
const r = n[0], i = !!r && r.type ===
|
|
176
|
+
if (this.rootReferences.add(t), qe.includes(i)) {
|
|
177
|
+
const r = n[0], i = !!r && r.type === P.Cell, s = n[1], l = !!s && s.type === P.Cell;
|
|
178
178
|
i && l && void 0 !== s.referenceIndex && void 0 !== r.referenceIndex && (this.referenceIndices.splice(s.referenceIndex, 1), s.referenceIndex = r.referenceIndex, e.referenceIndex = r.referenceIndex, this.referenceIndices[r.referenceIndex] = t.index);
|
|
179
179
|
} else "#" === i && n[0] && (e.referenceIndex = n[0].referenceIndex);
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
if (n ===
|
|
183
|
-
const r = n ===
|
|
182
|
+
if (n === P.Error || n === P.Named) {
|
|
183
|
+
const r = n === P.Named ? e.value.nameId : O(e.value);
|
|
184
184
|
let i = this.names.get(r);
|
|
185
185
|
t.op = n, void 0 === i && (i = this.names.size, this.names.set(r, i)), t.value = i, this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, this.referenceIndices.push(t.index);
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
|
-
if (n ===
|
|
188
|
+
if (n === P.TableReference) return t.op = n, this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, void this.referenceIndices.push(t.index);
|
|
189
189
|
} else if (t && t.isReference) {
|
|
190
190
|
const t = {
|
|
191
191
|
node: e,
|
|
192
192
|
index: this.references.size,
|
|
193
|
-
op:
|
|
193
|
+
op: P.Function,
|
|
194
194
|
value: e.value,
|
|
195
195
|
inputs: null
|
|
196
196
|
};
|
|
@@ -198,11 +198,11 @@ var de = class {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
function ge(e, t = !1, n =
|
|
201
|
+
function ge(e, t = !1, n = F) {
|
|
202
202
|
const r = [], i = /* @__PURE__ */ new Set(), s = (e, n, s) => {
|
|
203
203
|
const l = {
|
|
204
204
|
type: e.type,
|
|
205
|
-
value: e.type ===
|
|
205
|
+
value: e.type === P.Error ? k(e.value) : e.value
|
|
206
206
|
};
|
|
207
207
|
void 0 !== e.image && (l.text = ((e) => {
|
|
208
208
|
const n = t ? e.value?.scopeImage : void 0;
|
|
@@ -212,7 +212,7 @@ function ge(e, t = !1, n = T) {
|
|
|
212
212
|
return void 0 !== o && (l.evalIndex = o), n && (l.context = n), void 0 !== e.referenceIndex && (l.referenceIndex = e.referenceIndex), e.isReference && i.add(l), r.push(l), l;
|
|
213
213
|
}, l = (e, t, n, i, s) => {
|
|
214
214
|
if (null == t) return;
|
|
215
|
-
if (r.length > 1 && e ===
|
|
215
|
+
if (r.length > 1 && e === P.Whitespace && r[r.length - 1].type === P.Whitespace) return;
|
|
216
216
|
const l = {
|
|
217
217
|
type: e,
|
|
218
218
|
value: t,
|
|
@@ -220,62 +220,62 @@ function ge(e, t = !1, n = T) {
|
|
|
220
220
|
};
|
|
221
221
|
void 0 !== i && (l.evalIndex = i), n && (l.context = n), r.push(l);
|
|
222
222
|
};
|
|
223
|
-
(function e(o,
|
|
224
|
-
const
|
|
223
|
+
(function e(o, a, u) {
|
|
224
|
+
const c = o.evalIndex ?? u ?? 0, f = o.type, p = (t, r, i) => {
|
|
225
225
|
if (!t) return;
|
|
226
226
|
const s = t.length;
|
|
227
|
-
for (let o = 0; o < s; o++) e(t[o], r, i), o < s - 1 && l(
|
|
227
|
+
for (let o = 0; o < s; o++) e(t[o], r, i), o < s - 1 && l(P.Separator, ",", r, i, n.separatorFunction);
|
|
228
228
|
};
|
|
229
229
|
if (o.isLiteral) {
|
|
230
|
-
if (l(
|
|
231
|
-
l(
|
|
230
|
+
if (l(P.Whitespace, o.wsBefore, a, c), f === P.Array) {
|
|
231
|
+
l(P.Type, "{", a, c);
|
|
232
232
|
const t = o.value, r = t.length;
|
|
233
233
|
for (let i = 0; i < r; i++) {
|
|
234
|
-
const s = t[i], o = s.value,
|
|
235
|
-
for (let t = 0; t <
|
|
234
|
+
const s = t[i], o = s.value, u = o.length;
|
|
235
|
+
for (let t = 0; t < u; t++) {
|
|
236
236
|
const r = o[t];
|
|
237
|
-
l(
|
|
237
|
+
l(P.Whitespace, r.wsBefore, a, c), e(r, a, c), l(P.Whitespace, r.wsAfter, a, c), t < u - 1 && l(P.Separator, ",", a, c, n.separatorColumn);
|
|
238
238
|
}
|
|
239
|
-
i < r - 1 && (l(
|
|
239
|
+
i < r - 1 && (l(P.Whitespace, s.wsBefore, a, c), l(P.Separator, ";", a, c, n.separatorRow), l(P.Whitespace, s.wsAfter, a, c));
|
|
240
240
|
}
|
|
241
|
-
o.error || l(
|
|
242
|
-
} else
|
|
243
|
-
type:
|
|
241
|
+
o.error || l(P.Type, "}", a, c);
|
|
242
|
+
} else f === P.String ? (o = {
|
|
243
|
+
type: f,
|
|
244
244
|
value: "\"" + `${o.value}`.replace(/"/g, "\"\"") + "\"",
|
|
245
245
|
image: o.image
|
|
246
|
-
}, s(o,
|
|
247
|
-
l(
|
|
248
|
-
} else if (
|
|
249
|
-
else if (
|
|
250
|
-
else if (
|
|
251
|
-
o.inputs?.[0] && e(o.inputs[0],
|
|
252
|
-
const t = s(o,
|
|
253
|
-
"#" === o.value && void 0 !== t.text && !o.wsBefore && i.has(n) && (n.text = (n.text ?? "") + t.text, t.text = ""), l(
|
|
246
|
+
}, s(o, a, c)) : s(o, a, c);
|
|
247
|
+
l(P.Whitespace, o.wsAfter, a, c);
|
|
248
|
+
} else if (f === P.Infix) e(o.inputs[0], a, c), l(P.Whitespace, o.wsBefore, a, c), s(o, a, c), l(P.Whitespace, o.wsAfter, a, c), e(o.inputs[1], a, c);
|
|
249
|
+
else if (f === P.Prefix) l(P.Whitespace, o.wsBefore, a, c), s(o, a, c), l(P.Whitespace, o.wsAfter, a, c), o.inputs && e(o.inputs[0], a, c);
|
|
250
|
+
else if (f === P.Postfix) {
|
|
251
|
+
o.inputs?.[0] && e(o.inputs[0], a, c), l(P.Whitespace, o.wsBefore, a, c);
|
|
252
|
+
const t = s(o, a, c), n = r[r.length - 2];
|
|
253
|
+
"#" === o.value && void 0 !== t.text && !o.wsBefore && i.has(n) && (n.text = (n.text ?? "") + t.text, t.text = ""), l(P.Whitespace, o.wsAfter, a, c);
|
|
254
254
|
} else {
|
|
255
|
-
l(
|
|
256
|
-
const
|
|
257
|
-
switch (
|
|
258
|
-
case
|
|
255
|
+
l(P.Whitespace, o.wsBefore, a, c);
|
|
256
|
+
const u = o.inputs;
|
|
257
|
+
switch (f) {
|
|
258
|
+
case P.Function: {
|
|
259
259
|
const t = String(o.value), i = {
|
|
260
|
-
type:
|
|
260
|
+
type: P.Function,
|
|
261
261
|
value: t,
|
|
262
262
|
text: o.image ?? t,
|
|
263
263
|
evalIndex: o.evalIndex
|
|
264
264
|
};
|
|
265
|
-
|
|
265
|
+
a && (i.context = a), r.push(i);
|
|
266
266
|
const s = {
|
|
267
267
|
name: t,
|
|
268
268
|
argIndex: -1,
|
|
269
269
|
type: o.binder?.kind ?? "function"
|
|
270
270
|
};
|
|
271
|
-
if (
|
|
272
|
-
const t =
|
|
271
|
+
if (a?.bound && (s.bound = a.bound), l(P.Paren, "(", s, o.evalIndex), u) {
|
|
272
|
+
const t = u.length, r = o.binder?.kind, i = "lambda" === r ? 1 : "let" === r ? 2 : 0;
|
|
273
273
|
let a = s.bound;
|
|
274
274
|
for (let o = 0; o < t; o++) {
|
|
275
|
-
const
|
|
276
|
-
if (
|
|
277
|
-
const e =
|
|
278
|
-
a =
|
|
275
|
+
const f = i && o >= i ? u[o - i] : void 0;
|
|
276
|
+
if (f?.binding?.declaration) {
|
|
277
|
+
const e = f.value.nameId, t = "let" === r ? Rt(u[o - 1]) : void 0;
|
|
278
|
+
a = xt(a, t ? {
|
|
279
279
|
name: e,
|
|
280
280
|
params: t
|
|
281
281
|
} : { name: e });
|
|
@@ -284,47 +284,47 @@ function ge(e, t = !1, n = T) {
|
|
|
284
284
|
...s,
|
|
285
285
|
argIndex: o
|
|
286
286
|
};
|
|
287
|
-
a && (p.bound = a), e(
|
|
287
|
+
a && (p.bound = a), e(u[o], p, c), o < t - 1 && l(P.Separator, ",", p, c, n.separatorFunction);
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
o.error || l(
|
|
290
|
+
o.error || l(P.Paren, ")", s, o.evalIndex);
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
293
|
-
case
|
|
294
|
-
const t =
|
|
295
|
-
if (t && e(t,
|
|
293
|
+
case P.Call: {
|
|
294
|
+
const t = $(o), i = r.length;
|
|
295
|
+
if (t && e(t, a, c), t?.type === P.Named) for (let e = i; e < r.length; e++) {
|
|
296
296
|
const t = r[e];
|
|
297
|
-
t.type !==
|
|
297
|
+
t.type !== P.Whitespace && (t.evalIndex = o.evalIndex, t.type === P.Named && (t.type = P.Function, t.value = t.value.name));
|
|
298
298
|
}
|
|
299
299
|
const s = {
|
|
300
|
-
name: t?.type ===
|
|
300
|
+
name: t?.type === P.Named ? t.value.nameId : "",
|
|
301
301
|
argIndex: -1,
|
|
302
302
|
type: "function"
|
|
303
303
|
};
|
|
304
|
-
|
|
305
|
-
const
|
|
306
|
-
for (let t = 0; t <
|
|
304
|
+
a?.bound && (s.bound = a.bound), l(P.Paren, "(", s, o.evalIndex);
|
|
305
|
+
const u = T(o), f = u.length;
|
|
306
|
+
for (let t = 0; t < f; t++) {
|
|
307
307
|
const r = {
|
|
308
308
|
...s,
|
|
309
309
|
argIndex: t
|
|
310
310
|
};
|
|
311
|
-
e(
|
|
311
|
+
e(u[t], r, c), t < f - 1 && l(P.Separator, ",", r, c, n.separatorFunction);
|
|
312
312
|
}
|
|
313
|
-
o.error || l(
|
|
313
|
+
o.error || l(P.Paren, ")", s, o.evalIndex);
|
|
314
314
|
break;
|
|
315
315
|
}
|
|
316
|
-
case
|
|
317
|
-
s(o,
|
|
316
|
+
case P.Cell:
|
|
317
|
+
s(o, a, c);
|
|
318
318
|
break;
|
|
319
|
-
case
|
|
320
|
-
l(
|
|
319
|
+
case P.Paren:
|
|
320
|
+
l(f, "(", a, c), p(u, a, c), o.error || l(f, ")", a, c);
|
|
321
321
|
break;
|
|
322
|
-
case
|
|
322
|
+
case P.TableReference: {
|
|
323
323
|
const n = o.value?.tableId ?? "", s = {
|
|
324
324
|
name: n,
|
|
325
325
|
argIndex: -1,
|
|
326
326
|
type: "table"
|
|
327
|
-
},
|
|
327
|
+
}, f = r.length, p = o.image;
|
|
328
328
|
let d, g = !1;
|
|
329
329
|
if (n && p) {
|
|
330
330
|
let e = 0;
|
|
@@ -333,72 +333,72 @@ function ge(e, t = !1, n = T) {
|
|
|
333
333
|
-1 !== t && 33 === p.charCodeAt(t + 1) && (e = t + 2);
|
|
334
334
|
}
|
|
335
335
|
const n = p.indexOf("[", e);
|
|
336
|
-
if (g = 0 === n && null !=
|
|
337
|
-
else if (!
|
|
336
|
+
if (g = 0 === n && null != u, n > 0) d = p.slice(0, n);
|
|
337
|
+
else if (!u) {
|
|
338
338
|
const e = p.lastIndexOf("!");
|
|
339
339
|
d = t || -1 === e ? p : p.slice(e + 1);
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
if (!n || g && t || l(
|
|
343
|
-
const t =
|
|
342
|
+
if (!n || g && t || l(P.TableReference, n, a, c, d), u && l(P.Paren, "[", s, c), u) {
|
|
343
|
+
const t = u.length;
|
|
344
344
|
for (let n = 0; n < t; n++) {
|
|
345
345
|
const r = {
|
|
346
346
|
...s,
|
|
347
347
|
argIndex: n
|
|
348
348
|
};
|
|
349
|
-
e(
|
|
349
|
+
e(u[n], r, c), n < t - 1 && l(P.Separator, ",", r, c);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
|
|
352
|
+
u && !o.error && l(P.Paren, "]", s, c);
|
|
353
353
|
const v = o.referenceIndex;
|
|
354
|
-
for (let e =
|
|
354
|
+
for (let e = f; e < r.length; e++) void 0 !== v && (r[e].referenceIndex = v), i.add(r[e]);
|
|
355
355
|
break;
|
|
356
356
|
}
|
|
357
|
-
case
|
|
358
|
-
case
|
|
357
|
+
case P.TableSpecifier:
|
|
358
|
+
case P.TableColumn: {
|
|
359
359
|
const e = o.image, t = null != e && e.startsWith("[") && e.endsWith("]");
|
|
360
|
-
t && l(
|
|
360
|
+
t && l(P.Paren, "[", a, c);
|
|
361
361
|
const n = {
|
|
362
|
-
table: "table" ===
|
|
362
|
+
table: "table" === a?.type ? a.name : "",
|
|
363
363
|
name: o.value
|
|
364
364
|
}, i = {
|
|
365
|
-
type:
|
|
365
|
+
type: f,
|
|
366
366
|
value: n,
|
|
367
367
|
text: t ? e.slice(1, -1) : e ?? n.name
|
|
368
368
|
};
|
|
369
|
-
void 0 !==
|
|
369
|
+
void 0 !== c && (i.evalIndex = c), a && (i.context = a), r.push(i), t && l(P.Paren, "]", a, c);
|
|
370
370
|
break;
|
|
371
371
|
}
|
|
372
|
-
case
|
|
373
|
-
|
|
372
|
+
case P.List:
|
|
373
|
+
p(u, a, c);
|
|
374
374
|
break;
|
|
375
|
-
case
|
|
376
|
-
const e = s(o,
|
|
375
|
+
case P.Named: {
|
|
376
|
+
const e = s(o, a, c), t = o.value;
|
|
377
377
|
e.value = t.scope ? {
|
|
378
378
|
name: t.nameId,
|
|
379
379
|
scope: t.scope
|
|
380
|
-
} : { name: t.nameId }, o.binding?.declaration && o.binding.optional && (e.value.optional = !0), o.binding && (e.type =
|
|
380
|
+
} : { name: t.nameId }, o.binding?.declaration && o.binding.optional && (e.value.optional = !0), o.binding && (e.type = P.Parameter, o.binding.declaration && (e.value.declaration = !0)), delete e.referenceIndex;
|
|
381
381
|
break;
|
|
382
382
|
}
|
|
383
|
-
default: void 0 !== o.value && s(o,
|
|
383
|
+
default: void 0 !== o.value && s(o, a, c), u && u.forEach((t) => e(t, a, c));
|
|
384
384
|
}
|
|
385
|
-
l(
|
|
385
|
+
l(P.Whitespace, o.wsAfter, a, c);
|
|
386
386
|
}
|
|
387
387
|
})(e);
|
|
388
388
|
const o = /* @__PURE__ */ new Map();
|
|
389
|
-
for (const e of r) if (e.type ===
|
|
389
|
+
for (const e of r) if (e.type === P.Cell && void 0 !== e.referenceIndex) {
|
|
390
390
|
const t = o.get(e.referenceIndex);
|
|
391
391
|
t ? t.push(e) : o.set(e.referenceIndex, [e]);
|
|
392
392
|
}
|
|
393
393
|
for (const e of o.values()) 1 === e.length ? e[0].refSide = "self" : (e[0].refSide = "left", e[e.length - 1].refSide = "right");
|
|
394
|
-
const
|
|
394
|
+
const a = /* @__PURE__ */ new Map();
|
|
395
395
|
for (const e of r) if (void 0 !== e.referenceIndex && void 0 !== e.evalIndex) {
|
|
396
|
-
const t =
|
|
397
|
-
(void 0 === t || e.evalIndex < t) &&
|
|
396
|
+
const t = a.get(e.referenceIndex);
|
|
397
|
+
(void 0 === t || e.evalIndex < t) && a.set(e.referenceIndex, e.evalIndex);
|
|
398
398
|
}
|
|
399
|
-
if (
|
|
399
|
+
if (a.size > 0) {
|
|
400
400
|
for (const e of r) if (void 0 !== e.referenceIndex) {
|
|
401
|
-
const t =
|
|
401
|
+
const t = a.get(e.referenceIndex);
|
|
402
402
|
void 0 !== t && (e.evalIndex = t);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
@@ -408,19 +408,19 @@ function ve(e, t) {
|
|
|
408
408
|
let n = "";
|
|
409
409
|
for (let r = 0; r < e.length; r++) {
|
|
410
410
|
const i = e[r], s = i.type;
|
|
411
|
-
if (s ===
|
|
412
|
-
const e = s ===
|
|
411
|
+
if (s === P.Cell || s === P.Named || s === P.Error) {
|
|
412
|
+
const e = s === P.Cell ? i.value?.scope : (P.Named, i.value?.scope ?? void 0), r = s === P.Error ? void 0 !== i.text && y(i.text) : i.text?.includes("!") ?? !1;
|
|
413
413
|
if (e && void 0 !== i.text && !r) {
|
|
414
|
-
const r = t?.resolve(
|
|
415
|
-
n +=
|
|
414
|
+
const r = t?.resolve(w.Sheet, e)?.toString() ?? e;
|
|
415
|
+
n += o(r) + "!" + i.text;
|
|
416
416
|
continue;
|
|
417
417
|
}
|
|
418
|
-
if (s ===
|
|
418
|
+
if (s === P.Named) {
|
|
419
419
|
n += i.text ?? i.value?.name ?? "";
|
|
420
420
|
continue;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
if (s ===
|
|
423
|
+
if (s === P.Parameter) {
|
|
424
424
|
n += i.text ?? i.value?.name ?? "";
|
|
425
425
|
continue;
|
|
426
426
|
}
|
|
@@ -431,40 +431,40 @@ function ve(e, t) {
|
|
|
431
431
|
}
|
|
432
432
|
function he(e, t) {
|
|
433
433
|
let n;
|
|
434
|
-
if (
|
|
434
|
+
if (h(e, (e) => {
|
|
435
435
|
e.evalIndex === t && (n = e);
|
|
436
436
|
}), !n) return [];
|
|
437
437
|
const r = ge(n);
|
|
438
|
-
return r.length > 1 && r[0].type ===
|
|
438
|
+
return r.length > 1 && r[0].type === P.Whitespace && r.shift(), r.length > 1 && r[r.length - 1].type === P.Whitespace && r.pop(), r;
|
|
439
439
|
}
|
|
440
440
|
function me(e) {
|
|
441
|
-
return
|
|
442
|
-
if (e.type !==
|
|
441
|
+
return h(e, (e) => {
|
|
442
|
+
if (e.type !== P.TableReference) return;
|
|
443
443
|
const t = function(e) {
|
|
444
444
|
if (null !== e.value && "object" == typeof e.value) return e.value;
|
|
445
445
|
const t = e.value, n = e.inputs;
|
|
446
446
|
let r = !1, i = !1, s = !1, l = !1, o = null, a = null, u = !1;
|
|
447
|
-
const
|
|
448
|
-
e?.type ===
|
|
447
|
+
const c = (e) => {
|
|
448
|
+
e?.type === P.TableColumn && (o = e.value, a = e.value);
|
|
449
449
|
};
|
|
450
450
|
if (n) for (const e of n) {
|
|
451
451
|
const t = e.type;
|
|
452
|
-
if (t ===
|
|
452
|
+
if (t === P.TableSpecifier) {
|
|
453
453
|
const t = e.value.toUpperCase().trim();
|
|
454
454
|
"#ALL" === t ? i = !0 : "#HEADERS" === t ? s = !0 : "#TOTALS" === t ? l = !0 : "#DATA" === t ? r = !0 : "@" !== t && "#THIS ROW" !== t || (u = !0);
|
|
455
|
-
} else if (t ===
|
|
456
|
-
else if (t ===
|
|
455
|
+
} else if (t === P.TableColumn) c(e);
|
|
456
|
+
else if (t === P.Infix && ":" === e.value) {
|
|
457
457
|
const t = e.inputs?.[0], n = e.inputs?.[1];
|
|
458
|
-
t?.type ===
|
|
459
|
-
} else if (t ===
|
|
458
|
+
t?.type === P.TableColumn && (o = t.value), n?.type === P.TableColumn && (a = n.value);
|
|
459
|
+
} else if (t === P.Prefix && "@" === e.value) {
|
|
460
460
|
u = !0;
|
|
461
461
|
const t = e.inputs?.[0];
|
|
462
|
-
t?.type ===
|
|
462
|
+
t?.type === P.Infix && ":" === t.value ? (t.inputs?.[0]?.type === P.TableColumn && (o = t.inputs[0].value), t.inputs?.[1]?.type === P.TableColumn && (a = t.inputs[1].value)) : c(t);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
return {
|
|
466
466
|
tableId: t,
|
|
467
|
-
spec:
|
|
467
|
+
spec: p(i, s, r, l),
|
|
468
468
|
columnFromId: o,
|
|
469
469
|
columnToId: a,
|
|
470
470
|
isThisRow: u
|
|
@@ -477,16 +477,16 @@ function me(e) {
|
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
479
|
function ye(e) {
|
|
480
|
-
return
|
|
481
|
-
if (e.type !==
|
|
480
|
+
return h(e, (e) => {
|
|
481
|
+
if (e.type !== P.TableReference) return;
|
|
482
482
|
const t = e.inputs;
|
|
483
483
|
if (!t) return;
|
|
484
|
-
if (-1 === t.findIndex((e) => e.type ===
|
|
484
|
+
if (-1 === t.findIndex((e) => e.type === P.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim())) return;
|
|
485
485
|
const n = [];
|
|
486
486
|
let r;
|
|
487
|
-
for (const e of t) e.type ===
|
|
487
|
+
for (const e of t) e.type === P.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim() || (e.type !== P.TableColumn && (e.type !== P.Infix || ":" !== e.value) || r ? n.push(e) : r = e);
|
|
488
488
|
if (!r) return n.push({
|
|
489
|
-
type:
|
|
489
|
+
type: P.Prefix,
|
|
490
490
|
value: "@",
|
|
491
491
|
inputs: null,
|
|
492
492
|
isReference: !0
|
|
@@ -498,15 +498,15 @@ function ye(e) {
|
|
|
498
498
|
...r,
|
|
499
499
|
image: i.slice(1, -1)
|
|
500
500
|
} : r;
|
|
501
|
-
return n.push(
|
|
501
|
+
return n.push(L("@", s, !0)), {
|
|
502
502
|
...e,
|
|
503
503
|
inputs: n
|
|
504
504
|
};
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
507
|
function Ie(e) {
|
|
508
|
-
return
|
|
509
|
-
if (e.type !==
|
|
508
|
+
return h(e, (e) => {
|
|
509
|
+
if (e.type !== P.TableReference) return;
|
|
510
510
|
if (0 !== e.inputs?.length || e.error) return;
|
|
511
511
|
const t = e.value;
|
|
512
512
|
return ("string" == typeof t ? t : t?.tableId) ? {
|
|
@@ -516,8 +516,8 @@ function Ie(e) {
|
|
|
516
516
|
});
|
|
517
517
|
}
|
|
518
518
|
function be(e) {
|
|
519
|
-
return
|
|
520
|
-
if (e.type !==
|
|
519
|
+
return h(e, (e) => {
|
|
520
|
+
if (e.type !== P.TableReference || !e.inputs) return;
|
|
521
521
|
const t = e.value, n = "string" == typeof t ? t : t?.tableId, r = e.image;
|
|
522
522
|
if (!n || 91 !== r?.charCodeAt(0)) return;
|
|
523
523
|
const i = r.indexOf("]");
|
|
@@ -527,7 +527,7 @@ function be(e) {
|
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
529
|
var xe = (e) => {
|
|
530
|
-
if (e?.type !==
|
|
530
|
+
if (e?.type !== P.TableSpecifier) return 4;
|
|
531
531
|
switch (e.value.toUpperCase().trim()) {
|
|
532
532
|
case "#ALL": return 0;
|
|
533
533
|
case "#HEADERS": return 1;
|
|
@@ -537,8 +537,8 @@ var xe = (e) => {
|
|
|
537
537
|
}
|
|
538
538
|
};
|
|
539
539
|
function Re(e) {
|
|
540
|
-
return
|
|
541
|
-
if (e.type !==
|
|
540
|
+
return h(e, (e) => {
|
|
541
|
+
if (e.type !== P.TableReference) return;
|
|
542
542
|
const t = e.inputs;
|
|
543
543
|
if (!t || t.length < 2) return;
|
|
544
544
|
const n = t.map((e, t) => ({
|
|
@@ -555,8 +555,8 @@ function Re(e) {
|
|
|
555
555
|
function Ee(t) {
|
|
556
556
|
if (!t) return e.EmptyArray;
|
|
557
557
|
let n = e.EmptyArray;
|
|
558
|
-
return
|
|
559
|
-
if (t.type !==
|
|
558
|
+
return h(t, (t) => {
|
|
559
|
+
if (t.type !== P.Named || t.binding) return;
|
|
560
560
|
const r = t.value.nameId;
|
|
561
561
|
r && (n === e.EmptyArray && (n = []), n.includes(r) || n.push(r));
|
|
562
562
|
}), n;
|
|
@@ -564,12 +564,12 @@ function Ee(t) {
|
|
|
564
564
|
function Te(t, n) {
|
|
565
565
|
if (!t) return e.EmptyArray;
|
|
566
566
|
let r = e.EmptyArray;
|
|
567
|
-
return
|
|
567
|
+
return h(t, (t, i, s) => {
|
|
568
568
|
if (!t.isReference) return;
|
|
569
569
|
if (i?.isReference) return;
|
|
570
570
|
const l = t.type;
|
|
571
|
-
if (l ===
|
|
572
|
-
if (pe(s,
|
|
571
|
+
if (l === P.Named || l === P.Error || l === P.TableReference) return;
|
|
572
|
+
if (pe(s, P.TableReference)) return;
|
|
573
573
|
const o = function(e) {
|
|
574
574
|
let t = e;
|
|
575
575
|
for (; t;) {
|
|
@@ -582,66 +582,69 @@ function Te(t, n) {
|
|
|
582
582
|
let r = e;
|
|
583
583
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
584
584
|
const i = t[e];
|
|
585
|
-
if (i.type ===
|
|
585
|
+
if (i.type === P.Paren || i.isReference) {
|
|
586
586
|
r = i;
|
|
587
587
|
continue;
|
|
588
588
|
}
|
|
589
|
-
if (i.type !==
|
|
589
|
+
if (i.type !== P.Function) return !0;
|
|
590
590
|
const s = n?.(String(i.value));
|
|
591
591
|
if (!s) return !0;
|
|
592
592
|
const l = i.inputs ? i.inputs.indexOf(r) : -1;
|
|
593
|
-
return "p" !== (l >= 0 ?
|
|
593
|
+
return "p" !== (l >= 0 ? Ve(s.getDeclaration().getParameters(), l) : null)?.getRangeType();
|
|
594
594
|
}
|
|
595
595
|
return !0;
|
|
596
596
|
}(t, s, n) && (r === e.EmptyArray && (r = []), r.includes(o) || r.push(o));
|
|
597
597
|
}), r.length > 1 && r.sort((e, t) => e - t), r;
|
|
598
598
|
}
|
|
599
|
-
var Ae = /* @__PURE__ */ new Set(["SUBTOTAL", "AGGREGATE"]);
|
|
600
|
-
function
|
|
599
|
+
var Ae = /* @__PURE__ */ new Set(["SUBTOTAL", "AGGREGATE"]), Se = /* @__PURE__ */ new Set(["GETPIVOTDATA"]);
|
|
600
|
+
function we(e, t) {
|
|
601
|
+
return Ce(e, t, Ae);
|
|
602
|
+
}
|
|
603
|
+
function Ce(e, t, n) {
|
|
601
604
|
if (!e || !t) return !1;
|
|
602
|
-
let
|
|
603
|
-
return
|
|
604
|
-
if (
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
}),
|
|
605
|
+
let r = !1;
|
|
606
|
+
return h(e, (e) => {
|
|
607
|
+
if (r || e.type !== P.Function) return;
|
|
608
|
+
const i = t(e.value)?.getName();
|
|
609
|
+
i && n.has(i.toUpperCase()) && (r = !0);
|
|
610
|
+
}), r;
|
|
608
611
|
}
|
|
609
|
-
function
|
|
612
|
+
function Ne(e, t) {
|
|
610
613
|
if (!e || !t) return !1;
|
|
611
614
|
let n = !1;
|
|
612
|
-
return
|
|
613
|
-
n || e.type !==
|
|
615
|
+
return h(e, (e) => {
|
|
616
|
+
n || e.type !== P.Function || "TABLE" === t(e.value)?.getName().toUpperCase() && (n = !0);
|
|
614
617
|
}), n;
|
|
615
618
|
}
|
|
616
|
-
function
|
|
619
|
+
function Fe(e, t) {
|
|
617
620
|
if (!e || !t) return !1;
|
|
618
621
|
let n = !1;
|
|
619
|
-
return
|
|
620
|
-
n || e.type !==
|
|
622
|
+
return h(e, (e) => {
|
|
623
|
+
n || e.type !== P.Function || !0 === t(e.value)?.getDeclaration().getReturnType()?.isVolatile() && (n = !0);
|
|
621
624
|
}), n;
|
|
622
625
|
}
|
|
623
|
-
var
|
|
626
|
+
var Pe = Object.freeze({
|
|
624
627
|
value: !1,
|
|
625
628
|
array: !1
|
|
626
|
-
}),
|
|
629
|
+
}), Le = (e, t) => {
|
|
627
630
|
const n = function(e, t) {
|
|
628
|
-
if (!e || !t) return
|
|
631
|
+
if (!e || !t) return Pe;
|
|
629
632
|
let n = !1, r = !1;
|
|
630
|
-
return
|
|
633
|
+
return h(e, (e) => {
|
|
631
634
|
if (n) return;
|
|
632
635
|
const i = e.type;
|
|
633
|
-
if (i ===
|
|
634
|
-
if (i ===
|
|
635
|
-
if (i ===
|
|
636
|
-
if (i !==
|
|
636
|
+
if (i === P.Named) return void (void 0 === e.binding && (n = !0));
|
|
637
|
+
if (i === P.Prefix) return void ("@" === e.value && (n = !0));
|
|
638
|
+
if (i === P.Call) return void (n = !0);
|
|
639
|
+
if (i !== P.Function) return;
|
|
637
640
|
if (void 0 !== e.binder) return;
|
|
638
641
|
const s = t(e.value);
|
|
639
642
|
if (!s) return void (n = !0);
|
|
640
643
|
if (r || !0 !== e.implicitIntersect) return;
|
|
641
644
|
const l = s.getDeclaration().getParameters(), o = e.inputs;
|
|
642
645
|
if (o) for (let e = 0; e < o.length; e++) {
|
|
643
|
-
const n =
|
|
644
|
-
if (null !== n && n.isValueOrRange() &&
|
|
646
|
+
const n = Ve(l, e);
|
|
647
|
+
if (null !== n && n.isValueOrRange() && Ue(o[e], t)) return void (r = !0);
|
|
645
648
|
}
|
|
646
649
|
}), {
|
|
647
650
|
value: !n && !r,
|
|
@@ -652,48 +655,48 @@ var Ne = Object.freeze({
|
|
|
652
655
|
isBlankCacheable: n.value,
|
|
653
656
|
isBlankCacheableArray: n.array
|
|
654
657
|
};
|
|
655
|
-
},
|
|
658
|
+
}, ke = (e, t) => {
|
|
656
659
|
const n = e.length;
|
|
657
660
|
if (0 === n) return null;
|
|
658
661
|
if (t < n - 1) return e[t];
|
|
659
662
|
const r = e[n - 1], i = r.getRepeatingTypes();
|
|
660
663
|
return i && 0 !== i.length ? i[(t - (n - 1)) % i.length] : t < n ? e[t] : r.isRest() ? r : null;
|
|
661
664
|
};
|
|
662
|
-
function
|
|
665
|
+
function $e(t) {
|
|
663
666
|
if (!t) return e.EmptyArray;
|
|
664
667
|
let n = e.EmptyArray;
|
|
665
668
|
const r = (t) => {
|
|
666
669
|
t && (n === e.EmptyArray && (n = []), n.includes(t) || n.push(t));
|
|
667
670
|
}, i = (e) => {
|
|
668
|
-
"string" == typeof e && r(
|
|
671
|
+
"string" == typeof e && r(E(e)?.bookId);
|
|
669
672
|
};
|
|
670
|
-
return
|
|
671
|
-
if (e.type ===
|
|
673
|
+
return h(t, (e) => {
|
|
674
|
+
if (e.type === P.Named) {
|
|
672
675
|
if (e.binding) return;
|
|
673
676
|
const t = e.value;
|
|
674
677
|
r(t.nameId), i(t.scope);
|
|
675
|
-
} else if (e.type ===
|
|
678
|
+
} else if (e.type === P.TableReference) {
|
|
676
679
|
const t = e.value;
|
|
677
680
|
r("string" == typeof t ? t : t?.tableId);
|
|
678
|
-
} else if (e.type ===
|
|
681
|
+
} else if (e.type === P.Cell) {
|
|
679
682
|
const t = e.value?.scope;
|
|
680
|
-
i(t),
|
|
681
|
-
} else e.type ===
|
|
683
|
+
i(t), u(t) && r(t);
|
|
684
|
+
} else e.type === P.Error && i(e.value?.scope);
|
|
682
685
|
}), n;
|
|
683
686
|
}
|
|
684
|
-
var
|
|
687
|
+
var Oe = (e, t) => {
|
|
685
688
|
if (!0 === e.lazyArg) return !0;
|
|
686
689
|
if ("lambda" !== t?.binder?.kind) return !1;
|
|
687
690
|
const n = t.inputs;
|
|
688
691
|
return n[n.length - 1] === e;
|
|
689
|
-
},
|
|
692
|
+
}, Be = /* @__PURE__ */ new Set([
|
|
690
693
|
"IF",
|
|
691
694
|
"IFS",
|
|
692
695
|
"SWITCH",
|
|
693
696
|
"CHOOSE",
|
|
694
697
|
"IFERROR",
|
|
695
698
|
"IFNA"
|
|
696
|
-
]),
|
|
699
|
+
]), Ve = (e, t) => {
|
|
697
700
|
const n = e.length;
|
|
698
701
|
if (0 === n) return null;
|
|
699
702
|
if (t < n) return e[t];
|
|
@@ -701,24 +704,24 @@ var ke = (e, t) => {
|
|
|
701
704
|
if (!r.isRest()) return null;
|
|
702
705
|
const i = r.getRepeatingTypes();
|
|
703
706
|
return i && 0 !== i.length ? i[(t - (n - 1)) % i.length] : r;
|
|
704
|
-
},
|
|
707
|
+
}, De = (e) => null !== e.getScalarType() && null === e.getRangeType() && null === e.getLambda() && !e.isValueOrRange(), ze = (e, t, n) => !(e.isRest() || !De(e) || !Ue(t, n) || e.isNoLift() && Me(t, n)), Me = (e, t) => {
|
|
705
708
|
if (!e) return !1;
|
|
706
709
|
const n = e.inputs;
|
|
707
710
|
switch (e.type) {
|
|
708
|
-
case
|
|
709
|
-
case
|
|
710
|
-
case
|
|
711
|
-
case
|
|
712
|
-
case
|
|
713
|
-
case
|
|
714
|
-
case
|
|
715
|
-
case
|
|
716
|
-
case
|
|
711
|
+
case P.Cell:
|
|
712
|
+
case P.Named:
|
|
713
|
+
case P.TableReference: return !0;
|
|
714
|
+
case P.Infix:
|
|
715
|
+
case P.Prefix:
|
|
716
|
+
case P.Postfix: return !0 === e.isReference && "@" !== e.value;
|
|
717
|
+
case P.Paren:
|
|
718
|
+
case P.List: return !!n && 1 === n.length && Me(n[0], t);
|
|
719
|
+
case P.Function: {
|
|
717
720
|
if (void 0 !== e.binder) return !1;
|
|
718
721
|
const i = String(e.value).toUpperCase();
|
|
719
|
-
if (
|
|
722
|
+
if (Be.has(i)) {
|
|
720
723
|
if (!n) return !1;
|
|
721
|
-
for (let e = 0; e < n.length; e++) if (
|
|
724
|
+
for (let e = 0; e < n.length; e++) if (Me(n[e], t)) return !0;
|
|
722
725
|
return !1;
|
|
723
726
|
}
|
|
724
727
|
const s = t?.(e.value);
|
|
@@ -726,54 +729,54 @@ var ke = (e, t) => {
|
|
|
726
729
|
}
|
|
727
730
|
default: return !1;
|
|
728
731
|
}
|
|
729
|
-
},
|
|
732
|
+
}, We = (e, t) => {
|
|
730
733
|
if (!e) return !1;
|
|
731
|
-
for (let n = 0; n < e.length; n++) if (
|
|
734
|
+
for (let n = 0; n < e.length; n++) if (Ue(e[n], t)) return !0;
|
|
732
735
|
return !1;
|
|
733
736
|
};
|
|
734
|
-
function
|
|
737
|
+
function Ue(e, t) {
|
|
735
738
|
if (!e) return !1;
|
|
736
739
|
if (void 0 !== e.arrayValued) return e.arrayValued;
|
|
737
740
|
let n;
|
|
738
741
|
const i = e.type, s = e.inputs;
|
|
739
742
|
switch (i) {
|
|
740
|
-
case
|
|
743
|
+
case P.Array:
|
|
741
744
|
n = !0;
|
|
742
745
|
break;
|
|
743
|
-
case
|
|
746
|
+
case P.Cell: {
|
|
744
747
|
const t = e.value;
|
|
745
748
|
n = t.rowIndex === Number.MIN_SAFE_INTEGER || t.colIndex === Number.MIN_SAFE_INTEGER;
|
|
746
749
|
break;
|
|
747
750
|
}
|
|
748
|
-
case
|
|
749
|
-
case
|
|
750
|
-
case
|
|
751
|
+
case P.Named:
|
|
752
|
+
case P.Call:
|
|
753
|
+
case P.TableReference:
|
|
751
754
|
n = !0;
|
|
752
755
|
break;
|
|
753
|
-
case
|
|
754
|
-
case
|
|
755
|
-
case
|
|
756
|
-
n = e.isReference ? "@" !== e.value :
|
|
756
|
+
case P.Infix:
|
|
757
|
+
case P.Prefix:
|
|
758
|
+
case P.Postfix:
|
|
759
|
+
n = e.isReference ? "@" !== e.value : We(s, t);
|
|
757
760
|
break;
|
|
758
|
-
case
|
|
759
|
-
case
|
|
760
|
-
n = !s || 1 !== s.length ||
|
|
761
|
+
case P.Paren:
|
|
762
|
+
case P.List:
|
|
763
|
+
n = !s || 1 !== s.length || Ue(s[0], t);
|
|
761
764
|
break;
|
|
762
|
-
case
|
|
765
|
+
case P.Function: {
|
|
763
766
|
const i = e.binder;
|
|
764
767
|
if (void 0 !== i) {
|
|
765
|
-
n = "lambda" === i.kind || !!s &&
|
|
768
|
+
n = "lambda" === i.kind || !!s && Ue(s[s.length - 1], t);
|
|
766
769
|
break;
|
|
767
770
|
}
|
|
768
771
|
const l = String(e.value).toUpperCase();
|
|
769
|
-
if (
|
|
770
|
-
n =
|
|
772
|
+
if (Be.has(l)) {
|
|
773
|
+
n = We(s, t);
|
|
771
774
|
break;
|
|
772
775
|
}
|
|
773
776
|
if ("INDEX" === l) {
|
|
774
777
|
if (n = !1, s) for (let e = 1; e < s.length; e++) {
|
|
775
778
|
const r = s[e];
|
|
776
|
-
if (!r || r.type ===
|
|
779
|
+
if (!r || r.type === P.Empty || r.isLiteral && 0 === r.value || Ue(r, t)) {
|
|
777
780
|
n = !0;
|
|
778
781
|
break;
|
|
779
782
|
}
|
|
@@ -793,7 +796,7 @@ function Me(e, t) {
|
|
|
793
796
|
}
|
|
794
797
|
return e.arrayValued = n, n;
|
|
795
798
|
}
|
|
796
|
-
function
|
|
799
|
+
function _e(e, t) {
|
|
797
800
|
if (void 0 !== e.firstCell) return;
|
|
798
801
|
const n = (e, r) => {
|
|
799
802
|
if (!e) return;
|
|
@@ -801,17 +804,17 @@ function We(e, t) {
|
|
|
801
804
|
const i = e.inputs;
|
|
802
805
|
if (!i) return;
|
|
803
806
|
const s = e.type;
|
|
804
|
-
if (s ===
|
|
807
|
+
if (s === P.Infix || s === P.Prefix || s === P.Postfix) {
|
|
805
808
|
const t = r && !e.isReference;
|
|
806
809
|
for (let e = 0; e < i.length; e++) n(i[e], t);
|
|
807
810
|
return;
|
|
808
811
|
}
|
|
809
|
-
if (s ===
|
|
812
|
+
if (s === P.Paren || s === P.List) {
|
|
810
813
|
const e = r && 1 === i.length;
|
|
811
814
|
for (let t = 0; t < i.length; t++) n(i[t], e);
|
|
812
815
|
return;
|
|
813
816
|
}
|
|
814
|
-
if (s ===
|
|
817
|
+
if (s === P.Function) {
|
|
815
818
|
const s = e.binder;
|
|
816
819
|
if (void 0 !== s) {
|
|
817
820
|
const e = i.length - 1;
|
|
@@ -820,8 +823,8 @@ function We(e, t) {
|
|
|
820
823
|
}
|
|
821
824
|
const l = r ? t?.(e.value)?.getDeclaration().getParameters() : null;
|
|
822
825
|
for (let e = 0; e < i.length; e++) {
|
|
823
|
-
const t = l ?
|
|
824
|
-
n(i[e], null !== t && (
|
|
826
|
+
const t = l ? Ve(l, e) : null;
|
|
827
|
+
n(i[e], null !== t && (De(t) || Xe(t)));
|
|
825
828
|
}
|
|
826
829
|
return;
|
|
827
830
|
}
|
|
@@ -829,35 +832,35 @@ function We(e, t) {
|
|
|
829
832
|
};
|
|
830
833
|
n(e, !0);
|
|
831
834
|
}
|
|
832
|
-
var
|
|
835
|
+
var je = /* @__PURE__ */ new Set([
|
|
833
836
|
"=",
|
|
834
837
|
"<>",
|
|
835
838
|
"<",
|
|
836
839
|
">",
|
|
837
840
|
"<=",
|
|
838
841
|
">="
|
|
839
|
-
]),
|
|
840
|
-
function
|
|
842
|
+
]), Ge = /* @__PURE__ */ new Set(["ROW", "COLUMN"]);
|
|
843
|
+
function He(e, t) {
|
|
841
844
|
if (!e || !t) return null;
|
|
842
845
|
const n = (e) => t(e.value)?.getName().toUpperCase() ?? null;
|
|
843
846
|
let r = !1;
|
|
844
|
-
if (
|
|
845
|
-
(e.hasLazyArgs || e.type ===
|
|
847
|
+
if (h(e, (e) => {
|
|
848
|
+
(e.hasLazyArgs || e.type === P.Call || void 0 !== e.binder) && (r = !0);
|
|
846
849
|
}), r) return null;
|
|
847
|
-
const i = (e) => e.type ===
|
|
850
|
+
const i = (e) => e.type === P.Number, s = (e) => e.type === P.Number || e.type === P.String || e.type === P.Boolean, l = (e) => {
|
|
848
851
|
if (!e) return !1;
|
|
849
852
|
const t = e.inputs;
|
|
850
853
|
switch (e.type) {
|
|
851
|
-
case
|
|
852
|
-
case
|
|
853
|
-
case
|
|
854
|
+
case P.Paren: return 1 === t?.length && l(t[0]);
|
|
855
|
+
case P.Prefix: return ("-" === e.value || "+" === e.value) && l(t?.[0]);
|
|
856
|
+
case P.Infix: {
|
|
854
857
|
if ("+" !== e.value && "-" !== e.value && "*" !== e.value) return !1;
|
|
855
858
|
const [n, r] = t ?? [];
|
|
856
859
|
return !(!n || !r) && (l(n) && (l(r) || i(r)) || i(n) && l(r));
|
|
857
860
|
}
|
|
858
|
-
case
|
|
861
|
+
case P.Function: {
|
|
859
862
|
const r = n(e);
|
|
860
|
-
if (null !== r &&
|
|
863
|
+
if (null !== r && Ge.has(r)) return !t || 0 === t.length || 1 === t.length && t[0]?.type === P.Cell;
|
|
861
864
|
if ("MOD" === r && 2 === t?.length) {
|
|
862
865
|
const e = t[1];
|
|
863
866
|
return l(t[0]) && i(e) && 0 !== e.value;
|
|
@@ -870,13 +873,13 @@ function je(e, t) {
|
|
|
870
873
|
if (!e) return !1;
|
|
871
874
|
const t = e.inputs;
|
|
872
875
|
switch (e.type) {
|
|
873
|
-
case
|
|
874
|
-
case
|
|
875
|
-
if (!
|
|
876
|
+
case P.Paren: return 1 === t?.length && o(t[0]);
|
|
877
|
+
case P.Infix: {
|
|
878
|
+
if (!je.has(e.value)) return !1;
|
|
876
879
|
const [n, r] = t ?? [];
|
|
877
880
|
return !(!n || !r) && (l(n) && (l(r) || s(r)) || s(n) && l(r));
|
|
878
881
|
}
|
|
879
|
-
case
|
|
882
|
+
case P.Function: {
|
|
880
883
|
const r = n(e);
|
|
881
884
|
if (!t || 0 === t.length) return !1;
|
|
882
885
|
if ("ISODD" === r || "ISEVEN" === r) return 1 === t.length && l(t[0]);
|
|
@@ -886,7 +889,7 @@ function je(e, t) {
|
|
|
886
889
|
for (let n = 0; n < t.length; n++) {
|
|
887
890
|
const r = t[n];
|
|
888
891
|
if (!r) return !1;
|
|
889
|
-
if (r.type !==
|
|
892
|
+
if (r.type !== P.Boolean) {
|
|
890
893
|
if (!o(r)) return !1;
|
|
891
894
|
e = !0;
|
|
892
895
|
}
|
|
@@ -910,7 +913,7 @@ function je(e, t) {
|
|
|
910
913
|
for (let t = 0; t < 1 << c; t++) {
|
|
911
914
|
const n = (e) => {
|
|
912
915
|
const r = a.indexOf(e);
|
|
913
|
-
if (-1 !== r) return
|
|
916
|
+
if (-1 !== r) return V(t & 1 << r ? "TRUE" : "FALSE");
|
|
914
917
|
const i = { ...e };
|
|
915
918
|
return delete i.evalIndex, delete i.firstCell, delete i.inLazy, delete i.lazyArg, delete i.hasLazyArgs, delete i.deferred, e.inputs && (i.inputs = e.inputs.map((e) => e ? n(e) : e)), i;
|
|
916
919
|
};
|
|
@@ -918,8 +921,8 @@ function je(e, t) {
|
|
|
918
921
|
}
|
|
919
922
|
return f;
|
|
920
923
|
}
|
|
921
|
-
var
|
|
922
|
-
function
|
|
924
|
+
var Xe = (e) => "*" === e.getRangeType() && null === e.getLambda() && e.getArrayDepth() <= (e.isRest() ? 1 : 0);
|
|
925
|
+
function Ze(e, n, r, i = !1, s = null, l = null) {
|
|
923
926
|
let o, a, u = r;
|
|
924
927
|
u = me(u), i || (u = ye(u), u = Re(u), u = Ie(u), u = be(u)), [o, a] = function(e) {
|
|
925
928
|
const t = /* @__PURE__ */ new Map();
|
|
@@ -936,66 +939,66 @@ function He(e, n, r, i = !1, s = null, l = null) {
|
|
|
936
939
|
n && n.inputs && (e.inputs = n.inputs.map((e) => t.get(e) ?? e));
|
|
937
940
|
}), [t.get(e), n];
|
|
938
941
|
}(u);
|
|
939
|
-
const
|
|
940
|
-
let
|
|
942
|
+
const f = d(a), p = [], g = [], v = new de();
|
|
943
|
+
let m, y = !1;
|
|
941
944
|
(function(e, t) {
|
|
942
945
|
if (!e || !t) return;
|
|
943
946
|
const n = (e) => {
|
|
944
947
|
if (!e) return;
|
|
945
|
-
e.inLazy = !0, e.type ===
|
|
948
|
+
e.inLazy = !0, e.type === P.Named && (e.deferredResolve = !0);
|
|
946
949
|
const t = e.inputs;
|
|
947
950
|
if (t) for (let e = 0; e < t.length; e++) n(t[e]);
|
|
948
951
|
};
|
|
949
|
-
|
|
950
|
-
if (e.type !==
|
|
952
|
+
h(e, (e) => {
|
|
953
|
+
if (e.type !== P.Function) return;
|
|
951
954
|
if (void 0 !== e.binder) return;
|
|
952
955
|
const r = e.inputs;
|
|
953
956
|
if (!r || 0 === r.length) return;
|
|
954
957
|
const i = t(e.value)?.getDeclaration().getParameters();
|
|
955
958
|
if (i) for (let t = 0; t < r.length; t++) {
|
|
956
959
|
const s = r[t];
|
|
957
|
-
s && s.type !==
|
|
960
|
+
s && s.type !== P.Empty && ke(i, t)?.isLazy() && (s.lazyArg = !0, e.hasLazyArgs = !0, n(s));
|
|
958
961
|
}
|
|
959
962
|
});
|
|
960
963
|
})(o, l);
|
|
961
|
-
const
|
|
962
|
-
void 0 ===
|
|
963
|
-
let t =
|
|
964
|
-
return void 0 === t &&
|
|
965
|
-
},
|
|
966
|
-
void 0 === e ?
|
|
967
|
-
},
|
|
968
|
-
e?.type !==
|
|
964
|
+
const I = (e) => {
|
|
965
|
+
void 0 === m && (m = /* @__PURE__ */ new Map());
|
|
966
|
+
let t = m.get(e);
|
|
967
|
+
return void 0 === t && m.set(e, t = []), t;
|
|
968
|
+
}, b = (e, t) => {
|
|
969
|
+
void 0 === e ? p.push(t) : I(e).push(t);
|
|
970
|
+
}, E = (e) => {
|
|
971
|
+
e?.type !== P.Infix || "+" !== e.value && "-" !== e.value || (e.snapsCancellation = !0);
|
|
969
972
|
};
|
|
970
|
-
o =
|
|
973
|
+
o = h(o, (t, n, r) => {
|
|
971
974
|
const i = t.type, s = t.evalIndex;
|
|
972
|
-
if (
|
|
973
|
-
if (
|
|
975
|
+
if (f[s] = null, i === P.TableColumn || i === P.TableSpecifier || t.isReference && pe(r, P.TableReference)) return;
|
|
976
|
+
if (y = y || !tt(t), t.binding?.declaration) return g[t.binding.slot] = -1, void (f[s] = void 0);
|
|
974
977
|
const l = ((e, t, n) => {
|
|
975
|
-
if (
|
|
976
|
-
for (let e = n.length - 1; e >= 0; e--) if (
|
|
978
|
+
if (Oe(e, t)) return e;
|
|
979
|
+
for (let e = n.length - 1; e >= 0; e--) if (Oe(n[e], n[e - 1])) return n[e];
|
|
977
980
|
})(t, n, r);
|
|
978
|
-
l === t &&
|
|
981
|
+
l === t && I(t), void 0 !== l && i === P.Named && (t.deferredResolve = !0);
|
|
979
982
|
const o = t.binder;
|
|
980
983
|
if (o && "let" === o.kind) {
|
|
981
984
|
const e = t.inputs, n = e?.length ?? 0;
|
|
982
985
|
let r = 0;
|
|
983
|
-
for (let t = 0; t + 1 < n && r < o.slots.length; t += 2) e[t]?.binding?.declaration && (
|
|
986
|
+
for (let t = 0; t + 1 < n && r < o.slots.length; t += 2) e[t]?.binding?.declaration && (g[o.slots[r++]] = e[t + 1]?.evalIndex ?? -1);
|
|
984
987
|
}
|
|
985
|
-
if ((t.isReference || n && n.isReference) && (
|
|
986
|
-
if (i ===
|
|
987
|
-
if (i ===
|
|
988
|
-
if (i ===
|
|
988
|
+
if ((t.isReference || n && n.isReference) && (v.processNode(t, n), t.isReference)) {
|
|
989
|
+
if (i === P.Named) return void (void 0 !== l && b(l, t));
|
|
990
|
+
if (i === P.Cell || i === P.TableReference || i === P.Error) return;
|
|
991
|
+
if (i === P.Infix || i === P.Prefix || i === P.Postfix || i === P.List) return void b(l, t);
|
|
989
992
|
}
|
|
990
|
-
if (t.isLiteral) if (i !==
|
|
993
|
+
if (t.isLiteral) if (i !== P.Array) f[s] = t.value;
|
|
991
994
|
else {
|
|
992
|
-
const n = t.value, r = n.length, i =
|
|
995
|
+
const n = t.value, r = n.length, i = d(r);
|
|
993
996
|
for (let e = 0; e < r; e++) {
|
|
994
|
-
const t = n[e].value, r = t.length, s =
|
|
997
|
+
const t = n[e].value, r = t.length, s = d(r);
|
|
995
998
|
for (let e = 0; e < r; e++) {
|
|
996
999
|
const n = t[e];
|
|
997
1000
|
let r = null;
|
|
998
|
-
if (n && (r = n.type ===
|
|
1001
|
+
if (n && (r = n.type === P.Error ? O(n.value) : n.value, n.type === P.Prefix)) {
|
|
999
1002
|
const e = n.value;
|
|
1000
1003
|
r = n.inputs[0].value, "-" === e && (r = -r);
|
|
1001
1004
|
}
|
|
@@ -1003,18 +1006,18 @@ function He(e, n, r, i = !1, s = null, l = null) {
|
|
|
1003
1006
|
}
|
|
1004
1007
|
i[e] = s;
|
|
1005
1008
|
}
|
|
1006
|
-
const l =
|
|
1007
|
-
|
|
1009
|
+
const l = c(i);
|
|
1010
|
+
f[s] = new R(e, l.values, l.coords, void 0, l.isLiteral);
|
|
1008
1011
|
}
|
|
1009
1012
|
else {
|
|
1010
|
-
if (i !==
|
|
1011
|
-
|
|
1013
|
+
if (i !== P.Empty) return "lambda" === t.binder?.kind && E(t.inputs[t.inputs.length - 1]), b(l, t), t;
|
|
1014
|
+
f[s] = void 0;
|
|
1012
1015
|
}
|
|
1013
|
-
}),
|
|
1016
|
+
}), E(o), m?.forEach((e, t) => {
|
|
1014
1017
|
t.deferred = e;
|
|
1015
1018
|
});
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1019
|
+
const T = d(v.cells.size);
|
|
1020
|
+
v.cells.forEach((e, t) => {
|
|
1018
1021
|
const n = t.value, r = n.colIndex, i = n.rowIndex, s = n.$colIndex, l = n.$rowIndex, o = {
|
|
1019
1022
|
colStart: r,
|
|
1020
1023
|
rowStart: i,
|
|
@@ -1025,47 +1028,47 @@ function He(e, n, r, i = !1, s = null, l = null) {
|
|
|
1025
1028
|
$colEnd: s,
|
|
1026
1029
|
$rowEnd: l
|
|
1027
1030
|
};
|
|
1028
|
-
r === Number.MIN_SAFE_INTEGER && (o.colEnd = Number.MAX_SAFE_INTEGER), i === Number.MIN_SAFE_INTEGER && (o.rowEnd = Number.MAX_SAFE_INTEGER), n.scope && (o.scope = n.scope),
|
|
1031
|
+
r === Number.MIN_SAFE_INTEGER && (o.colEnd = Number.MAX_SAFE_INTEGER), i === Number.MIN_SAFE_INTEGER && (o.rowEnd = Number.MAX_SAFE_INTEGER), n.scope && (o.scope = n.scope), T[e] = o;
|
|
1029
1032
|
});
|
|
1030
|
-
const
|
|
1031
|
-
for (let e = 0; e <
|
|
1033
|
+
const A = T.length, S = d(A);
|
|
1034
|
+
for (let e = 0; e < A; e++) S[e] = {
|
|
1032
1035
|
colStart: 0,
|
|
1033
1036
|
rowStart: 0,
|
|
1034
1037
|
colEnd: 0,
|
|
1035
1038
|
rowEnd: 0,
|
|
1036
1039
|
scope: null
|
|
1037
1040
|
};
|
|
1038
|
-
const w =
|
|
1039
|
-
|
|
1041
|
+
const w = d(v.references.size);
|
|
1042
|
+
v.references.forEach((e) => {
|
|
1040
1043
|
w[e.index] = e;
|
|
1041
1044
|
});
|
|
1042
1045
|
const C = [];
|
|
1043
|
-
|
|
1046
|
+
v.rootReferences.forEach((e) => {
|
|
1044
1047
|
C.push(e.index);
|
|
1045
1048
|
}), function(e, t, n = !1) {
|
|
1046
1049
|
if (n) {
|
|
1047
1050
|
const t = (e) => {
|
|
1048
1051
|
if (!e) return;
|
|
1049
1052
|
const n = e.type;
|
|
1050
|
-
n !==
|
|
1053
|
+
n !== P.Function && n !== P.Call || (e.implicitIntersect = !0);
|
|
1051
1054
|
const r = e.inputs;
|
|
1052
1055
|
if (r) for (let e = 0; e < r.length; e++) t(r[e]);
|
|
1053
1056
|
};
|
|
1054
1057
|
t(e);
|
|
1055
1058
|
return;
|
|
1056
1059
|
}
|
|
1057
|
-
const r = (e) =>
|
|
1060
|
+
const r = (e) => Ue(e, t), i = (e, n) => {
|
|
1058
1061
|
if (!e) return;
|
|
1059
1062
|
const s = e.type;
|
|
1060
|
-
s !==
|
|
1063
|
+
s !== P.Function && s !== P.Call || (e.implicitIntersect = n);
|
|
1061
1064
|
const l = e.inputs;
|
|
1062
1065
|
if (l) {
|
|
1063
|
-
if (s ===
|
|
1066
|
+
if (s === P.Infix || s === P.Prefix || s === P.Postfix) {
|
|
1064
1067
|
const t = !e.isReference;
|
|
1065
1068
|
for (let e = 0; e < l.length; e++) i(l[e], (!t || !r(l[e])) && n);
|
|
1066
1069
|
return;
|
|
1067
1070
|
}
|
|
1068
|
-
if (s ===
|
|
1071
|
+
if (s === P.Function) {
|
|
1069
1072
|
const r = e.binder;
|
|
1070
1073
|
if (void 0 !== r) {
|
|
1071
1074
|
const e = "lambda" !== r.kind && n;
|
|
@@ -1077,8 +1080,8 @@ function He(e, n, r, i = !1, s = null, l = null) {
|
|
|
1077
1080
|
if (s) for (let e = 0; e < l.length && !o; e++) {
|
|
1078
1081
|
const n = l[e];
|
|
1079
1082
|
if (!n) continue;
|
|
1080
|
-
const r =
|
|
1081
|
-
r &&
|
|
1083
|
+
const r = Ve(s, e);
|
|
1084
|
+
r && ze(r, n, t) && (o = !0);
|
|
1082
1085
|
}
|
|
1083
1086
|
o && (e.implicitIntersect = !1);
|
|
1084
1087
|
for (let e = 0; e < l.length; e++) i(l[e], !o && n);
|
|
@@ -1093,48 +1096,49 @@ function He(e, n, r, i = !1, s = null, l = null) {
|
|
|
1093
1096
|
const t = e.length;
|
|
1094
1097
|
for (let n = 0; n < t; n++) {
|
|
1095
1098
|
const t = e[n], r = t.type;
|
|
1096
|
-
if (r ===
|
|
1099
|
+
if (r === P.Infix) {
|
|
1097
1100
|
if (!0 === t.snapsCancellation) {
|
|
1098
1101
|
t.fn = ue[t.value];
|
|
1099
1102
|
continue;
|
|
1100
1103
|
}
|
|
1101
1104
|
t.fn = ae[t.value];
|
|
1102
|
-
} else r ===
|
|
1105
|
+
} else r === P.Prefix ? t.fn = ce[t.value] : r === P.Postfix && (t.fn = fe[t.value]);
|
|
1103
1106
|
}
|
|
1104
1107
|
};
|
|
1105
|
-
let
|
|
1106
|
-
N(
|
|
1107
|
-
const
|
|
1108
|
+
let L;
|
|
1109
|
+
N(p), m?.forEach(N);
|
|
1110
|
+
const k = i ? x(t(e.getLocale()).decimal) : F, $ = {
|
|
1108
1111
|
runtime: e,
|
|
1109
1112
|
symbols: n,
|
|
1110
1113
|
getFunction: l,
|
|
1111
1114
|
ast: o,
|
|
1112
|
-
evaluations:
|
|
1113
|
-
executions:
|
|
1114
|
-
bindings:
|
|
1115
|
-
referencesAbsolute:
|
|
1115
|
+
evaluations: f,
|
|
1116
|
+
executions: p,
|
|
1117
|
+
bindings: g,
|
|
1118
|
+
referencesAbsolute: S,
|
|
1116
1119
|
referencesExecute: w,
|
|
1117
|
-
referencesRelative:
|
|
1120
|
+
referencesRelative: T,
|
|
1118
1121
|
referencesRoot: C,
|
|
1119
|
-
referenceIndices:
|
|
1122
|
+
referenceIndices: v.referenceIndices,
|
|
1120
1123
|
formatReferenceIndices: Te(o, l),
|
|
1121
|
-
getTokens: () =>
|
|
1124
|
+
getTokens: () => L ??= ge(o, i, k),
|
|
1122
1125
|
namedIds: Ee(o),
|
|
1123
|
-
symbolIds:
|
|
1124
|
-
hasTotals:
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1126
|
+
symbolIds: $e(o),
|
|
1127
|
+
hasTotals: we(o, l),
|
|
1128
|
+
hasPivotData: Ce(o, l, Se),
|
|
1129
|
+
hasDataTable: Ne(o, l),
|
|
1130
|
+
hasVolatile: Fe(o, l),
|
|
1131
|
+
...Le(o, l),
|
|
1132
|
+
isReferenceOnly: !y,
|
|
1129
1133
|
error: s,
|
|
1130
1134
|
transform: (t) => {
|
|
1131
|
-
let r =
|
|
1132
|
-
return r === o ?
|
|
1135
|
+
let r = h(o, t);
|
|
1136
|
+
return r === o ? $ : Ze(e, n, r, i, s, l);
|
|
1133
1137
|
}
|
|
1134
1138
|
};
|
|
1135
|
-
return
|
|
1139
|
+
return $;
|
|
1136
1140
|
}
|
|
1137
|
-
function
|
|
1141
|
+
function Ke(e) {
|
|
1138
1142
|
let t = -1, n = -1;
|
|
1139
1143
|
return Number.isSafeInteger(e.previousToken?.startLine) ? (t = e.previousToken.startLine, n = e.previousToken.endColumn + 1) : Number.isSafeInteger(e.token?.startLine) && (t = e.token.startLine, n = e.token.startColumn), -1 !== t ? (e.errorLocation = {
|
|
1140
1144
|
line: t,
|
|
@@ -1165,29 +1169,29 @@ Object.freeze([
|
|
|
1165
1169
|
">="
|
|
1166
1170
|
]
|
|
1167
1171
|
]);
|
|
1168
|
-
var
|
|
1172
|
+
var qe = Object.freeze([
|
|
1169
1173
|
":",
|
|
1170
1174
|
".:.",
|
|
1171
1175
|
".:",
|
|
1172
1176
|
":."
|
|
1173
|
-
]),
|
|
1177
|
+
]), Je = Object.freeze([
|
|
1174
1178
|
":",
|
|
1175
1179
|
" ",
|
|
1176
1180
|
".:.",
|
|
1177
1181
|
".:",
|
|
1178
1182
|
":."
|
|
1179
|
-
]),
|
|
1183
|
+
]), Qe = Object.freeze(["@"]), Ye = Object.freeze(["#"]), et = Object.freeze(Je.concat(Ye)), tt = (Object.freeze(Je.concat(Qe).concat(Ye)), (e) => {
|
|
1180
1184
|
if (!e) return !1;
|
|
1181
1185
|
const t = e.type;
|
|
1182
|
-
if (t ===
|
|
1183
|
-
if (t ===
|
|
1184
|
-
if (t ===
|
|
1185
|
-
if (!
|
|
1186
|
+
if (t === P.Cell) return !0;
|
|
1187
|
+
if (t === P.TableReference) return !0;
|
|
1188
|
+
if (t === P.Infix) {
|
|
1189
|
+
if (!Je.includes(e.value)) return !1;
|
|
1186
1190
|
const t = e.inputs, n = t[0], r = t[1];
|
|
1187
|
-
return
|
|
1191
|
+
return tt(n) && tt(r);
|
|
1188
1192
|
}
|
|
1189
|
-
return t ===
|
|
1190
|
-
}),
|
|
1193
|
+
return t === P.List && (e.inputs?.every(tt) ?? !1);
|
|
1194
|
+
}), nt = (e) => !!(e && (e.type === P.Infix && et.includes(e.value) || e.type === P.Postfix && Ye.includes(e.value) || e.type === P.Array || e.type === P.TableReference)), rt = Object.freeze([
|
|
1191
1195
|
"+",
|
|
1192
1196
|
"-",
|
|
1193
1197
|
"*",
|
|
@@ -1200,18 +1204,18 @@ var Ke = Object.freeze([
|
|
|
1200
1204
|
"<",
|
|
1201
1205
|
">=",
|
|
1202
1206
|
"<="
|
|
1203
|
-
]),
|
|
1207
|
+
]), it = Object.freeze(["-", "+"]), st = (e, t) => {
|
|
1204
1208
|
if (!e) return !1;
|
|
1205
1209
|
const n = e.type;
|
|
1206
|
-
if (e.isLiteral) return n !==
|
|
1207
|
-
if (n ===
|
|
1210
|
+
if (e.isLiteral) return n !== P.Error;
|
|
1211
|
+
if (n === P.Paren || n === P.List) {
|
|
1208
1212
|
const n = e.inputs;
|
|
1209
|
-
return !(!n || 0 === n.length) && n.every((e) =>
|
|
1213
|
+
return !(!n || 0 === n.length) && n.every((e) => st(e, t));
|
|
1210
1214
|
}
|
|
1211
|
-
if (n ===
|
|
1212
|
-
if (n ===
|
|
1213
|
-
if (n ===
|
|
1214
|
-
if (n ===
|
|
1215
|
+
if (n === P.Infix) return rt.includes(e.value);
|
|
1216
|
+
if (n === P.Prefix) return it.includes(e.value);
|
|
1217
|
+
if (n === P.Postfix) return "%" === e.value;
|
|
1218
|
+
if (n === P.Function) {
|
|
1215
1219
|
if (!t) return !1;
|
|
1216
1220
|
const n = t(e.value);
|
|
1217
1221
|
if (!n) return !1;
|
|
@@ -1219,37 +1223,37 @@ var Ke = Object.freeze([
|
|
|
1219
1223
|
return "p" !== i && (null !== i || null === r.getLambda() && null != r.getScalarType());
|
|
1220
1224
|
}
|
|
1221
1225
|
return !1;
|
|
1222
|
-
},
|
|
1226
|
+
}, lt = (e, t) => {
|
|
1223
1227
|
if (!e) return null;
|
|
1224
1228
|
let n = null;
|
|
1225
1229
|
const r = (e) => {
|
|
1226
1230
|
if (n || !e) return;
|
|
1227
|
-
if (e.type ===
|
|
1231
|
+
if (e.type === P.Infix && " " === e.value) {
|
|
1228
1232
|
const r = e.inputs, i = r?.[0], s = r?.[1];
|
|
1229
|
-
if (
|
|
1230
|
-
if (
|
|
1233
|
+
if (st(i, t)) return void (n = i);
|
|
1234
|
+
if (st(s, t)) return void (n = s);
|
|
1231
1235
|
}
|
|
1232
1236
|
const i = e.inputs;
|
|
1233
1237
|
if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
|
|
1234
1238
|
};
|
|
1235
1239
|
return r(e), n;
|
|
1236
|
-
},
|
|
1240
|
+
}, ot = (e, t) => {
|
|
1237
1241
|
if (!e) return null;
|
|
1238
1242
|
let n = null;
|
|
1239
1243
|
const r = (e) => {
|
|
1240
1244
|
if (n || !e) return;
|
|
1241
|
-
if (e.type ===
|
|
1245
|
+
if (e.type === P.Postfix && "#" === e.value) {
|
|
1242
1246
|
const r = e.inputs?.[0];
|
|
1243
|
-
if (r &&
|
|
1247
|
+
if (r && st(r, t)) return void (n = r);
|
|
1244
1248
|
}
|
|
1245
1249
|
const i = e.inputs;
|
|
1246
1250
|
if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
|
|
1247
1251
|
};
|
|
1248
1252
|
return r(e), n;
|
|
1249
|
-
},
|
|
1253
|
+
}, at = (e) => {
|
|
1250
1254
|
for (let t = 0; t < e.length; t++) if (e[t].getRepeatingTypes()) return t;
|
|
1251
1255
|
return -1;
|
|
1252
|
-
},
|
|
1256
|
+
}, ut = (e, t, n) => {
|
|
1253
1257
|
const r = e[t].getRepeatingTypes(), i = r.length, s = t, l = e.length - t - 1;
|
|
1254
1258
|
let o = l;
|
|
1255
1259
|
for (; o > 0 && e[t + o].isOptional();) o--;
|
|
@@ -1274,12 +1278,12 @@ var Ke = Object.freeze([
|
|
|
1274
1278
|
};
|
|
1275
1279
|
}
|
|
1276
1280
|
return null;
|
|
1277
|
-
},
|
|
1281
|
+
}, ct = (e) => {
|
|
1278
1282
|
if (!e) return null;
|
|
1279
1283
|
let t = null;
|
|
1280
1284
|
const n = (e) => {
|
|
1281
1285
|
if (t || !e) return;
|
|
1282
|
-
if (e.type ===
|
|
1286
|
+
if (e.type === P.Array && Array.isArray(e.value)) {
|
|
1283
1287
|
const n = e.value, r = (n[0]?.value)?.length ?? 0;
|
|
1284
1288
|
for (let e = 1; e < n.length && !t; e++) {
|
|
1285
1289
|
const i = (n[e]?.value)?.length ?? 0;
|
|
@@ -1290,19 +1294,19 @@ var Ke = Object.freeze([
|
|
|
1290
1294
|
if (r) for (let e = 0; e < r.length && !t; e++) n(r[e]);
|
|
1291
1295
|
};
|
|
1292
1296
|
return n(e), t;
|
|
1293
|
-
},
|
|
1297
|
+
}, ft = (e, t) => {
|
|
1294
1298
|
if (!e || !t) return null;
|
|
1295
1299
|
let n = null;
|
|
1296
1300
|
const r = (e) => {
|
|
1297
1301
|
if (n || !e) return;
|
|
1298
|
-
if (e.type ===
|
|
1302
|
+
if (e.type === P.Function) {
|
|
1299
1303
|
const r = e.value, i = t(r);
|
|
1300
1304
|
if (i) {
|
|
1301
1305
|
const t = i.getDeclaration(), s = t.getParameters(), l = e.inputs?.length ?? 0, o = t.getMaxArguments();
|
|
1302
1306
|
if (l > o) return void (n = `Too many arguments for ${r}. The most it accepts is ${o}, but got ${l}.`);
|
|
1303
|
-
const a = s.length > 0 ?
|
|
1307
|
+
const a = s.length > 0 ? at(s) : -1, u = s.length > 0 && s[s.length - 1].isRest();
|
|
1304
1308
|
if (a >= 0) {
|
|
1305
|
-
if (!
|
|
1309
|
+
if (!ut(s, a, l)) {
|
|
1306
1310
|
const e = s[a].getRepeatingTypes().length, t = s.length - 1;
|
|
1307
1311
|
n = 1 === e ? `Too few arguments for ${r}. Expected at least ${t + 1}, but got ${l}.` : `Wrong number of arguments for ${r}. Expected ${t} plus a multiple of ${e}, but got ${l}.`;
|
|
1308
1312
|
}
|
|
@@ -1317,24 +1321,24 @@ var Ke = Object.freeze([
|
|
|
1317
1321
|
if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
|
|
1318
1322
|
};
|
|
1319
1323
|
return r(e), n;
|
|
1320
|
-
},
|
|
1324
|
+
}, pt = (e, t) => {
|
|
1321
1325
|
if (!e || !t) return null;
|
|
1322
1326
|
let n = null;
|
|
1323
1327
|
const r = (e) => {
|
|
1324
1328
|
if (n || !e) return;
|
|
1325
|
-
if (e.type ===
|
|
1329
|
+
if (e.type === P.Function) {
|
|
1326
1330
|
const r = t(e.value);
|
|
1327
1331
|
if (r) {
|
|
1328
1332
|
const i = r.getDeclaration().getParameters(), s = e.inputs;
|
|
1329
1333
|
if (i.length > 0 && s) {
|
|
1330
1334
|
const e = ((e, t) => {
|
|
1331
|
-
const n = new Array(t), r = e.length, i = r > 0 ?
|
|
1335
|
+
const n = new Array(t), r = e.length, i = r > 0 ? at(e) : -1;
|
|
1332
1336
|
if (i < 0) {
|
|
1333
1337
|
const i = r > 0 ? e[r - 1] : null, s = !!i && i.isRest();
|
|
1334
1338
|
for (let l = 0; l < t; l++) n[l] = l < r ? e[l] : s ? i : null;
|
|
1335
1339
|
return n;
|
|
1336
1340
|
}
|
|
1337
|
-
const s = e[i].getRepeatingTypes(), l = s.length, o = i, a =
|
|
1341
|
+
const s = e[i].getRepeatingTypes(), l = s.length, o = i, a = ut(e, i, t), u = a ? a.suffix : r - i - 1, c = Math.max(0, t - o - u);
|
|
1338
1342
|
for (let a = 0; a < t; a++) if (a < o) n[a] = e[a];
|
|
1339
1343
|
else if (a < o + c) n[a] = s[(a - o) % l];
|
|
1340
1344
|
else {
|
|
@@ -1345,7 +1349,7 @@ var Ke = Object.freeze([
|
|
|
1345
1349
|
})(i, s.length);
|
|
1346
1350
|
for (let r = 0; r < s.length && !n; r++) {
|
|
1347
1351
|
const i = e[r];
|
|
1348
|
-
i && "p" === i.getRangeType() &&
|
|
1352
|
+
i && "p" === i.getRangeType() && st(s[r], t) && (n = s[r]);
|
|
1349
1353
|
}
|
|
1350
1354
|
}
|
|
1351
1355
|
}
|
|
@@ -1354,42 +1358,42 @@ var Ke = Object.freeze([
|
|
|
1354
1358
|
if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
|
|
1355
1359
|
};
|
|
1356
1360
|
return r(e), n;
|
|
1357
|
-
},
|
|
1361
|
+
}, dt = (e, t) => {
|
|
1358
1362
|
if (!e) return null;
|
|
1359
1363
|
let n = null;
|
|
1360
1364
|
const r = (e) => {
|
|
1361
1365
|
if (n || !e) return;
|
|
1362
|
-
if (e.type ===
|
|
1366
|
+
if (e.type === P.Call) {
|
|
1363
1367
|
const r = e.inputs?.[0];
|
|
1364
|
-
if (r &&
|
|
1368
|
+
if (r && st(r, t)) return void (n = "This expression always produces a value, so it cannot be called as a function.");
|
|
1365
1369
|
}
|
|
1366
1370
|
const i = e.inputs;
|
|
1367
1371
|
if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
|
|
1368
1372
|
};
|
|
1369
1373
|
return r(e), n;
|
|
1370
|
-
},
|
|
1371
|
-
if (e.type !==
|
|
1374
|
+
}, gt = (e, t) => {
|
|
1375
|
+
if (e.type !== P.Function) return;
|
|
1372
1376
|
const n = e.value;
|
|
1373
1377
|
if ("string" != typeof n) return;
|
|
1374
1378
|
const r = (t?.(n)?.getName() ?? n).toUpperCase();
|
|
1375
1379
|
return "LET" === r ? "let" : "LAMBDA" === r ? "lambda" : void 0;
|
|
1376
|
-
},
|
|
1377
|
-
if (e?.type !==
|
|
1380
|
+
}, vt = (e) => {
|
|
1381
|
+
if (e?.type !== P.Named) return;
|
|
1378
1382
|
const t = e.value;
|
|
1379
1383
|
return t?.nameId && !t.scope && !0 !== t.optional ? t.nameId : void 0;
|
|
1380
|
-
},
|
|
1381
|
-
if (e?.type ===
|
|
1384
|
+
}, ht = /^[A-Za-z_\\][A-Za-z0-9_\\]*$/, mt = /* @__PURE__ */ new Set(["TRUE", "FALSE"]), yt = (e) => {
|
|
1385
|
+
if (e?.type === P.Named) {
|
|
1382
1386
|
const t = e.value;
|
|
1383
1387
|
if (!0 !== t?.optional || !t.nameId || t.scope) return;
|
|
1384
1388
|
return t.nameId;
|
|
1385
1389
|
}
|
|
1386
|
-
if (e?.type !==
|
|
1390
|
+
if (e?.type !== P.TableReference) return;
|
|
1387
1391
|
const t = e.value;
|
|
1388
1392
|
let n;
|
|
1389
1393
|
if (null === t || "string" == typeof t) {
|
|
1390
1394
|
if (t) return;
|
|
1391
1395
|
const r = e.inputs;
|
|
1392
|
-
if (!r || 1 !== r.length || r[0]?.type !==
|
|
1396
|
+
if (!r || 1 !== r.length || r[0]?.type !== P.TableColumn) return;
|
|
1393
1397
|
const i = r[0].value;
|
|
1394
1398
|
if ("string" != typeof i) return;
|
|
1395
1399
|
n = i;
|
|
@@ -1399,29 +1403,29 @@ var Ke = Object.freeze([
|
|
|
1399
1403
|
if (!e.columnFromId || e.columnFromId !== e.columnToId) return;
|
|
1400
1404
|
n = e.columnFromId;
|
|
1401
1405
|
}
|
|
1402
|
-
return
|
|
1403
|
-
},
|
|
1404
|
-
const t =
|
|
1406
|
+
return ht.test(n) && !mt.has(n.toUpperCase()) && e.image === `[${n}]` ? n : void 0;
|
|
1407
|
+
}, It = (e) => {
|
|
1408
|
+
const t = a(e.image ?? e.value);
|
|
1405
1409
|
t.image = e.image ?? e.value, t.wsBefore = e.wsBefore;
|
|
1406
1410
|
const n = {
|
|
1407
|
-
type:
|
|
1411
|
+
type: P.Call,
|
|
1408
1412
|
value: null,
|
|
1409
1413
|
inputs: [t, ...e.inputs ?? []],
|
|
1410
1414
|
wsAfter: e.wsAfter
|
|
1411
1415
|
};
|
|
1412
1416
|
return e.error && (n.error = e.error), n;
|
|
1413
1417
|
};
|
|
1414
|
-
function
|
|
1415
|
-
return e && t ?
|
|
1416
|
-
if (e.type ===
|
|
1418
|
+
function bt(e, t) {
|
|
1419
|
+
return e && t ? h(e, (e) => {
|
|
1420
|
+
if (e.type === P.Function && "string" == typeof e.value && !t(e.value)) return It(e);
|
|
1417
1421
|
}) : e;
|
|
1418
1422
|
}
|
|
1419
|
-
function
|
|
1423
|
+
function xt(e, t) {
|
|
1420
1424
|
const n = t.name.toUpperCase(), r = e ? e.filter((e) => e.name.toUpperCase() !== n) : [];
|
|
1421
1425
|
return r.push(t), r;
|
|
1422
1426
|
}
|
|
1423
|
-
function
|
|
1424
|
-
if (e?.type !==
|
|
1427
|
+
function Rt(e) {
|
|
1428
|
+
if (e?.type !== P.Function || "lambda" !== e.binder?.kind) return;
|
|
1425
1429
|
const t = e.inputs ?? [], n = [];
|
|
1426
1430
|
for (let e = 0; e < t.length - 1; e++) {
|
|
1427
1431
|
const r = t[e];
|
|
@@ -1434,19 +1438,19 @@ function bt(e) {
|
|
|
1434
1438
|
}
|
|
1435
1439
|
return n;
|
|
1436
1440
|
}
|
|
1437
|
-
var
|
|
1441
|
+
var Et = /* @__PURE__ */ new Set([
|
|
1438
1442
|
"IF",
|
|
1439
1443
|
"IFERROR",
|
|
1440
1444
|
"IFNA"
|
|
1441
1445
|
]);
|
|
1442
|
-
function
|
|
1443
|
-
if (!e || e.type !==
|
|
1446
|
+
function Tt(e, t) {
|
|
1447
|
+
if (!e || e.type !== P.Function || "string" != typeof e.value) return e;
|
|
1444
1448
|
const n = (t?.(e.value)?.getName() ?? e.value).toUpperCase();
|
|
1445
|
-
if (!
|
|
1449
|
+
if (!Et.has(n)) return e;
|
|
1446
1450
|
const r = e.inputs;
|
|
1447
1451
|
let i;
|
|
1448
1452
|
if (r) for (let e = 0; e < r.length; e++) {
|
|
1449
|
-
const n =
|
|
1453
|
+
const n = Tt(r[e], t);
|
|
1450
1454
|
n !== r[e] && ((i ??= [...r])[e] = n);
|
|
1451
1455
|
}
|
|
1452
1456
|
return {
|
|
@@ -1455,7 +1459,7 @@ function Rt(e, t) {
|
|
|
1455
1459
|
passOmitted: !0
|
|
1456
1460
|
};
|
|
1457
1461
|
}
|
|
1458
|
-
function
|
|
1462
|
+
function At(e, t = null) {
|
|
1459
1463
|
if (!e) return e;
|
|
1460
1464
|
const n = [];
|
|
1461
1465
|
let r = 0;
|
|
@@ -1475,15 +1479,15 @@ function Et(e, t = null) {
|
|
|
1475
1479
|
} : e;
|
|
1476
1480
|
}, s = (e) => {
|
|
1477
1481
|
if (!e) return e;
|
|
1478
|
-
const l =
|
|
1482
|
+
const l = gt(e, t);
|
|
1479
1483
|
if (l) return ((e, l) => {
|
|
1480
1484
|
const o = e.inputs, a = o?.length ?? 0;
|
|
1481
1485
|
if (!o || a < 1) return i(e);
|
|
1482
1486
|
const u = n.length, c = [], f = [...o], p = (e, t = !1) => {
|
|
1483
1487
|
const i = f[e];
|
|
1484
|
-
let s =
|
|
1488
|
+
let s = vt(i), l = !1;
|
|
1485
1489
|
if (void 0 === s && t) {
|
|
1486
|
-
if (s =
|
|
1490
|
+
if (s = yt(i), void 0 === s) return;
|
|
1487
1491
|
l = !0;
|
|
1488
1492
|
} else if (void 0 === s) return;
|
|
1489
1493
|
const o = r++;
|
|
@@ -1493,7 +1497,7 @@ function Et(e, t = null) {
|
|
|
1493
1497
|
name: s
|
|
1494
1498
|
}), c.push(o), f[e] = l ? {
|
|
1495
1499
|
...i,
|
|
1496
|
-
type:
|
|
1500
|
+
type: P.Named,
|
|
1497
1501
|
value: {
|
|
1498
1502
|
nameId: s,
|
|
1499
1503
|
scope: null
|
|
@@ -1518,7 +1522,7 @@ function Et(e, t = null) {
|
|
|
1518
1522
|
for (let e = 0; e < a - 1; e++) p(e, !0);
|
|
1519
1523
|
f[a - 1] && (f[a - 1] = s(f[a - 1]));
|
|
1520
1524
|
} else {
|
|
1521
|
-
for (let e = 0; e + 1 < a; e += 2) f[e + 1] && (f[e + 1] =
|
|
1525
|
+
for (let e = 0; e + 1 < a; e += 2) f[e + 1] && (f[e + 1] = Tt(s(f[e + 1]), t)), p(e);
|
|
1522
1526
|
a % 2 == 1 && f[a - 1] && (f[a - 1] = s(f[a - 1]));
|
|
1523
1527
|
}
|
|
1524
1528
|
for (; n.length > u;) n.pop();
|
|
@@ -1531,22 +1535,22 @@ function Et(e, t = null) {
|
|
|
1531
1535
|
}
|
|
1532
1536
|
};
|
|
1533
1537
|
})(e, l);
|
|
1534
|
-
if (e.type ===
|
|
1538
|
+
if (e.type === P.Function && "string" == typeof e.value) {
|
|
1535
1539
|
const r = e.value.toUpperCase();
|
|
1536
|
-
if (n.some((e) => e.key === r) && !t?.(e.value)) return i(
|
|
1540
|
+
if (n.some((e) => e.key === r) && !t?.(e.value)) return i(It(e));
|
|
1537
1541
|
}
|
|
1538
1542
|
if (n.length > 0 && e.isReference && ":" === e.value && 2 === e.inputs?.length) {
|
|
1539
1543
|
const [t, r] = e.inputs;
|
|
1540
|
-
if (
|
|
1544
|
+
if (St(t) && St(r)) {
|
|
1541
1545
|
const s = t.image.toUpperCase(), l = r.image.toUpperCase();
|
|
1542
1546
|
if (n.some((e) => e.key === s || e.key === l)) return i({
|
|
1543
1547
|
...e,
|
|
1544
|
-
inputs: [
|
|
1548
|
+
inputs: [wt(t), wt(r)]
|
|
1545
1549
|
});
|
|
1546
1550
|
}
|
|
1547
1551
|
}
|
|
1548
|
-
if (e.type ===
|
|
1549
|
-
const t =
|
|
1552
|
+
if (e.type === P.Named) {
|
|
1553
|
+
const t = vt(e);
|
|
1550
1554
|
if (void 0 !== t) {
|
|
1551
1555
|
const r = t.toUpperCase();
|
|
1552
1556
|
for (let i = n.length - 1; i >= 0; i--) {
|
|
@@ -1565,7 +1569,7 @@ function Et(e, t = null) {
|
|
|
1565
1569
|
return e;
|
|
1566
1570
|
}
|
|
1567
1571
|
const o = i(e);
|
|
1568
|
-
if (o.type ===
|
|
1572
|
+
if (o.type === P.Function && "string" == typeof o.value && "ISOMITTED" === (t?.(o.value)?.getName() ?? o.value).toUpperCase()) {
|
|
1569
1573
|
const e = o.inputs;
|
|
1570
1574
|
if (e) {
|
|
1571
1575
|
let n;
|
|
@@ -1578,7 +1582,7 @@ function Et(e, t = null) {
|
|
|
1578
1582
|
};
|
|
1579
1583
|
continue;
|
|
1580
1584
|
}
|
|
1581
|
-
const s =
|
|
1585
|
+
const s = Tt(i, t);
|
|
1582
1586
|
s !== i && ((n ??= [...e])[r] = s);
|
|
1583
1587
|
}
|
|
1584
1588
|
if (n) return {
|
|
@@ -1591,54 +1595,54 @@ function Et(e, t = null) {
|
|
|
1591
1595
|
};
|
|
1592
1596
|
return s(e);
|
|
1593
1597
|
}
|
|
1594
|
-
var
|
|
1595
|
-
if (e?.type !==
|
|
1598
|
+
var St = (e) => {
|
|
1599
|
+
if (e?.type !== P.Cell || void 0 === e.image) return !1;
|
|
1596
1600
|
const t = e.value;
|
|
1597
1601
|
return t.rowIndex === Number.MIN_SAFE_INTEGER && !0 !== t.$colIndex && !t.scope;
|
|
1598
|
-
},
|
|
1599
|
-
const t =
|
|
1600
|
-
return
|
|
1601
|
-
},
|
|
1602
|
+
}, wt = (e) => {
|
|
1603
|
+
const t = a(e.image);
|
|
1604
|
+
return N(t, e), t;
|
|
1605
|
+
}, Ct = (e) => e?.type === P.Cell, Nt = (e, t = null) => {
|
|
1602
1606
|
if (!e) return e;
|
|
1603
1607
|
let n = !1;
|
|
1604
1608
|
const r = (e) => {
|
|
1605
1609
|
if (n || !e) return;
|
|
1606
|
-
const i =
|
|
1610
|
+
const i = gt(e, t), s = e.inputs;
|
|
1607
1611
|
if (i && s) {
|
|
1608
1612
|
const e = "let" === i ? 2 : 1;
|
|
1609
|
-
for (let t = 0; t < s.length - 1; t += e) if (
|
|
1613
|
+
for (let t = 0; t < s.length - 1; t += e) if (Ct(s[t])) return void (n = !0);
|
|
1610
1614
|
}
|
|
1611
1615
|
if (s) for (let e = 0; e < s.length && !n; e++) r(s[e]);
|
|
1612
1616
|
};
|
|
1613
1617
|
if (r(e), !n) return e;
|
|
1614
1618
|
let i = null;
|
|
1615
|
-
const s =
|
|
1616
|
-
if (e?.type !==
|
|
1619
|
+
const s = h(e, (e) => {
|
|
1620
|
+
if (e?.type !== P.Cell) return;
|
|
1617
1621
|
const t = e.value, n = e.image;
|
|
1618
1622
|
if (!0 === t?.$colIndex || !0 === t?.$rowIndex) return void (i ??= `'${n ?? "a reference"}' cannot be absolute here. A LET/LAMBDA name that is a cell reference makes every reference in the formula a name, and a name cannot contain '$'.`);
|
|
1619
1623
|
if (void 0 === n) return;
|
|
1620
|
-
const r =
|
|
1621
|
-
|
|
1624
|
+
const r = a(n);
|
|
1625
|
+
N(r, e);
|
|
1622
1626
|
const s = t?.scope;
|
|
1623
1627
|
return s && (r.value.scope = s, r.value.scopeImage = t.scopeImage), r;
|
|
1624
1628
|
});
|
|
1625
1629
|
return i ?? s;
|
|
1626
|
-
},
|
|
1630
|
+
}, Ft = (e, t) => {
|
|
1627
1631
|
if (!e) return null;
|
|
1628
1632
|
let n = null;
|
|
1629
1633
|
const r = (e) => {
|
|
1630
1634
|
if (n || !e) return;
|
|
1631
|
-
const i =
|
|
1635
|
+
const i = gt(e, t);
|
|
1632
1636
|
i && ((e, t) => {
|
|
1633
1637
|
const r = "let" === t ? "LET" : "LAMBDA", i = e.inputs, s = i?.length ?? 0;
|
|
1634
1638
|
if (!i || s < 2) return;
|
|
1635
1639
|
if ("let" === t && s % 2 == 0) return void (n = `Wrong number of arguments for LET. Expected name/value pairs followed by a calculation, but got ${s}.`);
|
|
1636
|
-
if ("lambda" === t && i[s - 1]?.type ===
|
|
1640
|
+
if ("lambda" === t && i[s - 1]?.type === P.Empty) return void (n = "LAMBDA has no calculation: the last argument is empty.");
|
|
1637
1641
|
const l = /* @__PURE__ */ new Set(), o = "let" === t ? 2 : 1;
|
|
1638
1642
|
let a = !1;
|
|
1639
1643
|
for (let e = 0; e < s - 1; e += o) {
|
|
1640
|
-
let s =
|
|
1641
|
-
if (void 0 === s && "lambda" === t) s =
|
|
1644
|
+
let s = vt(i[e]);
|
|
1645
|
+
if (void 0 === s && "lambda" === t) s = yt(i[e]), void 0 !== s && (a = !0);
|
|
1642
1646
|
else if (void 0 !== s && a) return void (n = `Required name '${s}' cannot follow an optional name in ${r}.`);
|
|
1643
1647
|
if (void 0 === s) return void (n = `Expected a name in ${r} argument ${e + 1}; a name cannot be the output of a formula.`);
|
|
1644
1648
|
if (s.includes(".")) return void (n = `Expected a name in ${r} argument ${e + 1}; a name cannot contain '.'.`);
|
|
@@ -1652,109 +1656,109 @@ var Tt = (e) => {
|
|
|
1652
1656
|
};
|
|
1653
1657
|
return r(e), n;
|
|
1654
1658
|
};
|
|
1655
|
-
function
|
|
1659
|
+
function Pt(e, t, n, r, i) {
|
|
1656
1660
|
const s = r;
|
|
1657
1661
|
let l;
|
|
1658
|
-
const o = () => (void 0 === l && (l = i && n ? t.bind(
|
|
1662
|
+
const o = () => (void 0 === l && (l = i && n ? t.bind(w.Table, "", { at: {
|
|
1659
1663
|
scope: n,
|
|
1660
1664
|
rowIndex: i.rowIndex,
|
|
1661
1665
|
colIndex: i.colIndex
|
|
1662
1666
|
} }) : null), l);
|
|
1663
|
-
return
|
|
1667
|
+
return h(e, (e, r, i = []) => {
|
|
1664
1668
|
let l;
|
|
1665
1669
|
const a = e.type;
|
|
1666
|
-
if (a ===
|
|
1670
|
+
if (a === P.Cell) {
|
|
1667
1671
|
const n = e.value;
|
|
1668
1672
|
if (n?.scope) {
|
|
1669
|
-
const r = t.bind(
|
|
1673
|
+
const r = t.bind(w.Sheet, n.scope, s);
|
|
1670
1674
|
null !== r && (l || (l = { ...e }), l.value = {
|
|
1671
1675
|
...n,
|
|
1672
1676
|
scope: r
|
|
1673
1677
|
});
|
|
1674
1678
|
}
|
|
1675
|
-
} else if (a ===
|
|
1679
|
+
} else if (a === P.Named) {
|
|
1676
1680
|
const r = e.value;
|
|
1677
1681
|
if (r && !e.binding) {
|
|
1678
1682
|
const i = function(e, t, n, r) {
|
|
1679
1683
|
if (t.scope) {
|
|
1680
|
-
const e = n.bind(
|
|
1681
|
-
if (null === e ||
|
|
1684
|
+
const e = n.bind(w.Sheet, t.scope, r);
|
|
1685
|
+
if (null === e || C(e)) return;
|
|
1682
1686
|
}
|
|
1683
|
-
const i = n.bind(
|
|
1687
|
+
const i = n.bind(w.Table, t.nameId, { existing: !0 });
|
|
1684
1688
|
if (null === i) return;
|
|
1685
1689
|
const s = {
|
|
1686
|
-
type:
|
|
1690
|
+
type: P.TableReference,
|
|
1687
1691
|
value: i,
|
|
1688
1692
|
inputs: null,
|
|
1689
1693
|
isReference: !0
|
|
1690
1694
|
};
|
|
1691
|
-
|
|
1695
|
+
N(s, e);
|
|
1692
1696
|
const l = t.scopeImage;
|
|
1693
1697
|
return "string" == typeof l && void 0 !== e.image && (s.image = l + e.image), s;
|
|
1694
1698
|
}(e, r, t, s);
|
|
1695
1699
|
if (i) return i;
|
|
1696
|
-
const o = r.scope ? t.bind(
|
|
1700
|
+
const o = r.scope ? t.bind(w.Sheet, r.scope, s) : null, a = (null !== o ? C(o) ? o : t.resolve(w.Sheet, o)?.toString() ?? r.scope : r.scope) ?? n, u = t.bind(w.NamedFormula, r.nameId, a ? { scope: a } : void 0);
|
|
1697
1701
|
null === u && null === o || (l || (l = { ...e }), l.value = {
|
|
1698
1702
|
...r,
|
|
1699
1703
|
nameId: u ?? r.nameId,
|
|
1700
1704
|
...null !== o ? { scope: o } : void 0
|
|
1701
1705
|
});
|
|
1702
1706
|
}
|
|
1703
|
-
} else if (a ===
|
|
1707
|
+
} else if (a === P.Error) {
|
|
1704
1708
|
const n = e.value;
|
|
1705
1709
|
if (n?.scope) {
|
|
1706
|
-
const r = t.bind(
|
|
1710
|
+
const r = t.bind(w.Sheet, n.scope, s);
|
|
1707
1711
|
null !== r && (l || (l = { ...e }), l.value = {
|
|
1708
1712
|
...n,
|
|
1709
1713
|
scope: r
|
|
1710
1714
|
});
|
|
1711
1715
|
}
|
|
1712
|
-
} else if (a ===
|
|
1716
|
+
} else if (a === P.TableReference) {
|
|
1713
1717
|
const n = e.value;
|
|
1714
1718
|
if (n) {
|
|
1715
|
-
const r = t.bind(
|
|
1719
|
+
const r = t.bind(w.Table, n);
|
|
1716
1720
|
l || (l = { ...e }), null !== r && (l.value = r);
|
|
1717
1721
|
} else if ("string" == typeof n) {
|
|
1718
1722
|
const n = o();
|
|
1719
|
-
if (null !== n &&
|
|
1723
|
+
if (null !== n && Lt(e, t)) return {
|
|
1720
1724
|
...e,
|
|
1721
1725
|
value: n
|
|
1722
1726
|
};
|
|
1723
1727
|
}
|
|
1724
|
-
} else if (a ===
|
|
1728
|
+
} else if (a === P.TableColumn) {
|
|
1725
1729
|
const n = e.value;
|
|
1726
1730
|
if (n) {
|
|
1727
|
-
const r = pe(i,
|
|
1731
|
+
const r = pe(i, P.TableReference), s = r?.value || (r ? o() ?? void 0 : void 0), a = t.bind(w.TableColumn, n, s ? { tableName: s } : void 0);
|
|
1728
1732
|
l || (l = { ...e }), null !== a && (l.value = a);
|
|
1729
1733
|
}
|
|
1730
|
-
} else if (a ===
|
|
1734
|
+
} else if (a === P.Function) {
|
|
1731
1735
|
const n = e.value;
|
|
1732
1736
|
if (n) {
|
|
1733
|
-
const r = t.bind(
|
|
1737
|
+
const r = t.bind(w.Function, n);
|
|
1734
1738
|
l || (l = { ...e }), null !== r && (l.value = r);
|
|
1735
1739
|
}
|
|
1736
1740
|
}
|
|
1737
1741
|
return l;
|
|
1738
1742
|
});
|
|
1739
1743
|
}
|
|
1740
|
-
function
|
|
1744
|
+
function Lt(e, t) {
|
|
1741
1745
|
let n = !0;
|
|
1742
1746
|
const r = e.inputs;
|
|
1743
1747
|
if (!r) return !0;
|
|
1744
|
-
for (let e = 0; e < r.length && n; e++)
|
|
1745
|
-
e.type ===
|
|
1748
|
+
for (let e = 0; e < r.length && n; e++) h(r[e], (e) => {
|
|
1749
|
+
e.type === P.TableColumn && null === t.resolve(w.TableColumn, e.value) && (n = !1);
|
|
1746
1750
|
});
|
|
1747
1751
|
return n;
|
|
1748
1752
|
}
|
|
1749
|
-
function
|
|
1753
|
+
function kt(e, t) {
|
|
1750
1754
|
let n = null;
|
|
1751
|
-
return
|
|
1752
|
-
if (n || e.type !==
|
|
1755
|
+
return h(e, (e) => {
|
|
1756
|
+
if (n || e.type !== P.TableReference) return;
|
|
1753
1757
|
if ("" === e.value) return void (n = "A structured reference without a table name must be in a table that has its columns.");
|
|
1754
1758
|
const r = e.value;
|
|
1755
1759
|
if (!t || "string" != typeof r) return;
|
|
1756
|
-
const i = t.resolve(
|
|
1757
|
-
null === t.bind(
|
|
1760
|
+
const i = t.resolve(w.Table, r)?.toString() ?? r;
|
|
1761
|
+
null === t.bind(w.Table, i, { existing: !0 }) ? n = `There is no table named '${i}'.` : Lt(e, t) || (n = "The table has no such column.");
|
|
1758
1762
|
}), n;
|
|
1759
1763
|
}
|
|
1760
|
-
export {
|
|
1764
|
+
export { xt as A, nt as C, lt as D, qe as E, ue as O, me as S, pt as T, fe as _, Ze as a, he as b, Re as c, ae as d, be as f, dt as g, ct as h, Ie as i, ye as j, ve as k, Ke as l, ce as m, Ft as n, Nt as o, bt as p, He as r, Pt as s, At as t, _e as u, ft as v, ot as w, kt as x, ge as y };
|