@sheetxl/sdk 0.8.0-beta.11 → 0.8.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (349) hide show
  1. package/THIRD-PARTY-NOTICES.md +172 -0
  2. package/browser/esm/{BMyDRQ716j79h_bH.mjs → -GEhXGMfNcWmHPby.mjs} +6 -6
  3. package/browser/esm/{B7aUIvgUjncMMD_i.mjs → 9WXf_BTKjW1cQisZ.mjs} +95 -94
  4. package/browser/esm/{PcHFjNzQsE54POri.mjs → B2SgIPPBX0wjzuq8.mjs} +1 -1
  5. package/browser/esm/{DEiPS3Dr-s4fPbVZ.mjs → BC2RwlNwCdRywkoD.mjs} +1 -1
  6. package/browser/esm/{BpgskG1Er_lGQ_yS.mjs → BEqhm9xAUPiHUCFv.mjs} +1 -1
  7. package/browser/esm/BHgqi7KNrl7Vjr0W.mjs +348 -0
  8. package/browser/esm/{BkBhLS0l6z8sxI6D.mjs → BJKH0tDRx2FeSWvt.mjs} +2 -2
  9. package/browser/esm/{CU3DmJ-YnVVrC1_k.mjs → BTgWtqdQoh2cB6DL.mjs} +1 -1
  10. package/browser/esm/{Dyq_ivuHvlXLwPCl.mjs → BVshV1iY3bcUH9_E.mjs} +1135 -1129
  11. package/browser/esm/{BFagR2JeWs74iAG3.mjs → BYQ63XU7JzB4_itX.mjs} +1 -1
  12. package/browser/esm/{DvAaxH6z_tGvrRzl.mjs → Bax5aOzQkbHKXW_X.mjs} +239 -230
  13. package/browser/esm/{DLLE0FZNsKxbBzRn.mjs → BiDGKhtzV6yIy66o.mjs} +45 -45
  14. package/browser/esm/BmYrWK5OmHRtgyqM.mjs +367 -0
  15. package/browser/esm/{ClPfI4lODvCece29.mjs → BoAlHgjPQ6mxb_oO.mjs} +74 -74
  16. package/browser/esm/{BoV6zPBnfqCBCqZ7.mjs → C0mjTq8lhrX3HiPa.mjs} +4328 -3166
  17. package/browser/esm/{nvU0ClAbf0g94YBK.mjs → C5j0IdwtYkWlOftv.mjs} +604 -596
  18. package/browser/esm/{DWNzqw7DUKwoxjri.mjs → CL84-iL2QeKlLzo5.mjs} +2 -2
  19. package/browser/esm/{Ctjb0SsxV4K4MMqG.mjs → CLkBe-6n-pStQhnz.mjs} +2 -2
  20. package/{node/esm/CZICGK_ss0HoGHCP.mjs → browser/esm/CPzfhTPX2Y4dHX2p.mjs} +2 -2
  21. package/browser/esm/{Dlmig06rIo7cInRk.mjs → CSJuIjYUOE387FIP.mjs} +1 -1
  22. package/browser/esm/{BjkCiv5Jz6WYKZeu.mjs → Cdw0mGuoV3IU2LhR.mjs} +2 -2
  23. package/browser/esm/Ced5uyofOWHuL_Jy.mjs +114 -0
  24. package/browser/esm/{CkxWugaJFjDGZNZ-.mjs → Ci_LJ4S_GvYX0STI.mjs} +1 -1
  25. package/browser/esm/{zlLuW405RSguy4Kn.mjs → CwygVKP_RXmne5Ot.mjs} +47 -47
  26. package/browser/esm/{C4MqfLn9Dm-l3OIk.mjs → D-mfK0noQrM2jZLT.mjs} +1 -1
  27. package/browser/esm/{BnG31I6Oj_HEtSPS.mjs → D9SH_8v3FYCnxOFK.mjs} +1 -1
  28. package/browser/esm/{BVDiOXGMc5_FMGfy.mjs → DPD8fop6az9HZNiK.mjs} +2 -2
  29. package/browser/esm/DW-MmlgMH87l-_cw.mjs +302 -0
  30. package/browser/esm/{CaB7J-xgfKO2uAkG.mjs → DctIlUsO78-OU2ht.mjs} +2 -2
  31. package/browser/esm/DdcKkVb4jM6Y_epY.mjs +184 -0
  32. package/browser/esm/{CHU6iu_WGlm7fLET.mjs → DfKzE0IY0TjaEIxG.mjs} +1 -1
  33. package/browser/esm/{C2VbEI_XVAoseAwa.mjs → DkloMquaR1pbZCER.mjs} +44 -43
  34. package/browser/esm/{C16ycKja6zG0crV_.mjs → Dz86-De57bv2VYIi.mjs} +19447 -16481
  35. package/browser/esm/{BtvLTTfSBdAKplVG.mjs → HApSgmV2FXRRwQac.mjs} +1 -1
  36. package/browser/esm/{CQYjO777cmAznUzK.mjs → IbVAQU4YqtFqLwYk.mjs} +1 -1
  37. package/browser/esm/index.mjs +823 -644
  38. package/browser/esm/mHQ95RAfxHzcUN2r.mjs +18 -0
  39. package/browser/esm/pm00uZZu_H3gxHFx.mjs +117 -0
  40. package/browser/esm/{CV5EGEjG5_-CPpP0.mjs → quEvwgrEuOb0h3q-.mjs} +1926 -1298
  41. package/browser/esm/{ClbvFbFzFzXLBKNN.mjs → zZngLMg6mg6nnNGX.mjs} +66 -66
  42. package/licenses/dependencies.txt +71 -1
  43. package/node/esm/{BqiexuA89caYnAPz.mjs → -K4Cek-bTUItkB_8.mjs} +1 -1
  44. package/node/esm/-b8yNV4v9qiq8EMY.mjs +117 -0
  45. package/node/esm/{D8zEN-6ZdDqDvTxM.mjs → 1V-m67YHbxmg3xk2.mjs} +74 -74
  46. package/node/esm/{D_t5AUxSm7_icjzq.mjs → 4ROAfJC1mokmqubv.mjs} +1 -1
  47. package/node/esm/B89et7t3uRmtxk4v.mjs +115 -0
  48. package/node/esm/BKBkCBNGhMU0nQdY.mjs +372 -0
  49. package/node/esm/{OVfaSb506tNSIvbv.mjs → BQ2XqExomMceAjfe.mjs} +20822 -18373
  50. package/node/esm/{2Kihw_-5lVTEnwMa.mjs → Bfg7qjCXCwXbzW3K.mjs} +1 -1
  51. package/node/esm/{D1TKBVmoKGAXf37B.mjs → BtMeAB_dqJnOfzJM.mjs} +2 -2
  52. package/node/esm/{D6e2z7eZpxOJXHc7.mjs → Byc_bxU_MdjYtt0x.mjs} +1 -1
  53. package/node/esm/{CNCNJNg890KdgkWh.mjs → Bzrl292TNCK3Cpid.mjs} +1 -1
  54. package/node/esm/{De2IONBxQhz-Qbyh.mjs → C0P9zspoypRAj7yv.mjs} +1 -1
  55. package/node/esm/{CzXT00vrQa1_gvW9.mjs → C9gpMN3galHGZyoK.mjs} +1 -1
  56. package/node/esm/CKCG2peOkTq0gIIW.mjs +310 -0
  57. package/node/esm/{DUTskXCXref-IJnI.mjs → CWBS90g3Hz-kQDkY.mjs} +46 -46
  58. package/node/esm/{BIwObuhTJYf0jpUa.mjs → CoGSVnn-hNMtTEus.mjs} +2 -2
  59. package/node/esm/{CwePQwTILHHjGDkZ.mjs → CzrLqStvrcPE2-hb.mjs} +194 -185
  60. package/node/esm/{CCN5vD410obwdz38.mjs → D16EdlZG1hX5WUUK.mjs} +96 -95
  61. package/node/esm/{CDHdgJXH2vS71WMc.mjs → D1mDga2K5sjs8y07.mjs} +1 -1
  62. package/node/esm/{cGwrLA1RCE-WhJ7w.mjs → D2jtztjE6c23RKvZ.mjs} +1 -1
  63. package/node/esm/{Bbf1Pm9Gk7YpLTvg.mjs → D9nRcWsYk3M82iD8.mjs} +1 -1
  64. package/node/esm/{yavzZOiZW_EjG9lE.mjs → DALYzTxZ9Ur9C69Q.mjs} +1 -1
  65. package/node/esm/{DkwIPzKc3UwdUIfM.mjs → DF0nL7s01dp7n0Bx.mjs} +10 -10
  66. package/node/esm/{DNRhGK-8Tr9xcRyc.mjs → DO5ldLqhTvIfPXLW.mjs} +3348 -2610
  67. package/node/esm/DQz8J8ci7EJdqbuB.mjs +351 -0
  68. package/node/esm/{BIRq1kT7lLRzns9t.mjs → DR2OQTKqqyIkZnse.mjs} +2 -2
  69. package/node/esm/{857CIBgQgGpnqrXk.mjs → DSTLPBgpsGW6qP9e.mjs} +73 -73
  70. package/node/esm/{CGp6VZL-gZa9Uezx.mjs → DiXp7KSOZUSWXaZ5.mjs} +1 -1
  71. package/node/esm/{CZiqiay42tFTrLI4.mjs → DwvXHsycOQR219c7.mjs} +1 -1
  72. package/node/esm/{B21JjOLghRoDOrkx.mjs → Hc6B04OyVzHx2F5I.mjs} +38 -37
  73. package/node/esm/{Ct3h15sCus4Tgt6M.mjs → NkPNHsq2T3DXg76x.mjs} +561 -553
  74. package/node/esm/{B084DssTcdBheTp_.mjs → Nl_IIkO1jbk0s9i-.mjs} +4552 -3373
  75. package/node/esm/{D2KBymQJd1XhpeQD.mjs → OQT5lGqq8a4r5xNa.mjs} +1 -1
  76. package/node/esm/OTaaFGhF-k_iwobp.mjs +18 -0
  77. package/node/esm/{CdJHUJSBRHZoryPe.mjs → Z1elC_roIu7LhceZ.mjs} +53 -53
  78. package/{browser/esm/D5np__Jb1euAyaLw.mjs → node/esm/e3F3OVXCxLJrSukW.mjs} +2 -2
  79. package/node/esm/index.mjs +806 -625
  80. package/node/esm/{mFiBSM7XgBHV9AY7.mjs → suOBVUz-pca6ilJH.mjs} +1607 -1601
  81. package/package.json +8 -6
  82. package/resources/contents.json +108 -0
  83. package/resources/fonts/aptos-bold-italic.hinted.json +125 -0
  84. package/resources/fonts/aptos-bold-italic.metrics.json +221 -0
  85. package/resources/fonts/aptos-bold-italic.rows.json +8 -0
  86. package/resources/fonts/aptos-bold.hinted.json +125 -0
  87. package/resources/fonts/aptos-bold.metrics.json +221 -0
  88. package/resources/fonts/aptos-bold.rows.json +8 -0
  89. package/resources/fonts/aptos-display-bold-italic.hinted.json +125 -0
  90. package/resources/fonts/aptos-display-bold-italic.metrics.json +221 -0
  91. package/resources/fonts/aptos-display-bold-italic.rows.json +8 -0
  92. package/resources/fonts/aptos-display-bold.hinted.json +125 -0
  93. package/resources/fonts/aptos-display-bold.metrics.json +221 -0
  94. package/resources/fonts/aptos-display-bold.rows.json +8 -0
  95. package/resources/fonts/aptos-display-italic.hinted.json +124 -0
  96. package/resources/fonts/aptos-display-italic.metrics.json +221 -0
  97. package/resources/fonts/aptos-display-italic.rows.json +8 -0
  98. package/resources/fonts/aptos-display-regular.hinted.json +125 -0
  99. package/resources/fonts/aptos-display-regular.metrics.json +221 -0
  100. package/resources/fonts/aptos-display-regular.rows.json +8 -0
  101. package/resources/fonts/aptos-italic.hinted.json +125 -0
  102. package/resources/fonts/aptos-italic.metrics.json +221 -0
  103. package/resources/fonts/aptos-italic.rows.json +8 -0
  104. package/resources/fonts/aptos-narrow-bold-italic.hinted.json +125 -0
  105. package/resources/fonts/aptos-narrow-bold-italic.metrics.json +221 -0
  106. package/resources/fonts/aptos-narrow-bold-italic.rows.json +8 -0
  107. package/resources/fonts/aptos-narrow-bold.hinted.json +125 -0
  108. package/resources/fonts/aptos-narrow-bold.metrics.json +221 -0
  109. package/resources/fonts/aptos-narrow-bold.rows.json +8 -0
  110. package/resources/fonts/aptos-narrow-italic.hinted.json +125 -0
  111. package/resources/fonts/aptos-narrow-italic.metrics.json +221 -0
  112. package/resources/fonts/aptos-narrow-italic.rows.json +8 -0
  113. package/resources/fonts/aptos-narrow-regular.hinted.json +125 -0
  114. package/resources/fonts/aptos-narrow-regular.metrics.json +221 -0
  115. package/resources/fonts/aptos-narrow-regular.rows.json +8 -0
  116. package/resources/fonts/aptos-regular.hinted.json +125 -0
  117. package/resources/fonts/aptos-regular.metrics.json +221 -0
  118. package/resources/fonts/aptos-regular.rows.json +8 -0
  119. package/resources/fonts/arial-bold-italic.rows.json +0 -1
  120. package/resources/fonts/arial-bold.rows.json +0 -1
  121. package/resources/fonts/arial-italic.rows.json +0 -1
  122. package/resources/fonts/arial-regular.rows.json +0 -1
  123. package/resources/fonts/calibri-bold-italic.rows.json +0 -1
  124. package/resources/fonts/calibri-bold.rows.json +0 -1
  125. package/resources/fonts/calibri-italic.rows.json +0 -1
  126. package/resources/fonts/calibri-regular.rows.json +0 -1
  127. package/resources/fonts/cambria-bold-italic.rows.json +0 -1
  128. package/resources/fonts/cambria-bold.rows.json +0 -1
  129. package/resources/fonts/cambria-italic.rows.json +0 -1
  130. package/resources/fonts/cambria-regular.rows.json +0 -1
  131. package/resources/fonts/contents.json +240 -0
  132. package/resources/fonts/courier-new-bold-italic.rows.json +0 -1
  133. package/resources/fonts/courier-new-bold.rows.json +0 -1
  134. package/resources/fonts/courier-new-italic.rows.json +0 -1
  135. package/resources/fonts/courier-new-regular.rows.json +0 -1
  136. package/resources/fonts/times-new-roman-bold-italic.rows.json +0 -1
  137. package/resources/fonts/times-new-roman-bold.rows.json +0 -1
  138. package/resources/fonts/times-new-roman-italic.rows.json +0 -1
  139. package/resources/fonts/times-new-roman-regular.rows.json +0 -1
  140. package/resources/locales/de/model.msg.json +12 -2
  141. package/resources/locales/en/model.msg.json +13 -2
  142. package/types/scripting-api.json +10638 -10446
  143. package/types/scripting-enums.json +20 -1
  144. package/types/scripting.d.ts +1536 -477
  145. package/types/src/.generated/wasm/sdk.d.ts +5 -27
  146. package/types/src/address/AddressUtils.d.ts +8 -0
  147. package/types/src/address/_SheetNameQuoteChars.d.ts +3 -0
  148. package/types/src/{sheet → anomalies}/_Anomalies.d.ts +3 -3
  149. package/types/src/anomalies/_FocusTable.d.ts +5 -0
  150. package/types/src/{sheet/_AnomalyFormulaChecks.d.ts → anomalies/_FormulaChecks.d.ts} +10 -2
  151. package/types/src/{sheet/_AnomalyLabelChecks.d.ts → anomalies/_LabelChecks.d.ts} +1 -1
  152. package/types/src/anomalies/_LiteralChecks.d.ts +35 -0
  153. package/types/src/anomalies/_SeriesChecks.d.ts +13 -0
  154. package/types/src/calculation/Calculation.d.ts +61 -98
  155. package/types/src/calculation/ExternalBookBindings.d.ts +2 -29
  156. package/types/src/calculation/ICalculation.d.ts +96 -9
  157. package/types/src/calculation/NamedFormulaCollection.d.ts +110 -10
  158. package/types/src/calculation/TokenType.d.ts +0 -10
  159. package/types/src/calculation/_CloneBoundary.d.ts +0 -24
  160. package/types/src/calculation/_FormulaToolkit.d.ts +0 -5
  161. package/types/src/calculation/compiler/ASTTypes.d.ts +6 -15
  162. package/types/src/calculation/compiler/CompilerUtils.d.ts +0 -227
  163. package/types/src/calculation/compiler/FormulaLexer.d.ts +0 -8
  164. package/types/src/calculation/compiler/FormulaParser.d.ts +0 -61
  165. package/types/src/calculation/compiler/ParserUtils.d.ts +0 -24
  166. package/types/src/calculation/compiler/Types.d.ts +1 -45
  167. package/types/src/calculation/engine/CalcBackend.d.ts +83 -127
  168. package/types/src/calculation/engine/index.d.ts +0 -8
  169. package/types/src/calculation/executor/CalcExecutor.d.ts +50 -116
  170. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +47 -12
  171. package/types/src/calculation/executor/CircularReference.d.ts +0 -17
  172. package/types/src/calculation/executor/_BlockOrder.d.ts +29 -0
  173. package/types/src/calculation/executor/_WhatIf.d.ts +31 -0
  174. package/types/src/calculation/formula/FormulaBlock.d.ts +4 -31
  175. package/types/src/calculation/formula/FormulaRecordView.d.ts +0 -15
  176. package/types/src/calculation/formula/IFormulaBlock.d.ts +5 -12
  177. package/types/src/calculation/formula/LambdaValue.d.ts +0 -15
  178. package/types/src/calculation/formula/TokenUtils.d.ts +1 -8
  179. package/types/src/calculation/functions/_DataTableFunction.d.ts +14 -0
  180. package/types/src/calculation/grid/CalcGrid.d.ts +8 -64
  181. package/types/src/calculation/grid/CalcGridBackend.d.ts +12 -35
  182. package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -15
  183. package/types/src/calculation/grid/CalcGridUtils.d.ts +21 -23
  184. package/types/src/calculation/grid/ICalcGrid.d.ts +28 -109
  185. package/types/src/calculation/grid/_CalcRequest.d.ts +17 -33
  186. package/types/src/calculation/spatial/CircularEntry.d.ts +0 -10
  187. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +54 -82
  188. package/types/src/calculation/spatial/SpillEntry.d.ts +20 -3
  189. package/types/src/calculation/state/CalcNode.d.ts +0 -1
  190. package/types/src/calculation/state/CalcScope.d.ts +29 -9
  191. package/types/src/calculation/state/CalcState.d.ts +19 -9
  192. package/types/src/calculation/state/CalculationContext.d.ts +32 -38
  193. package/types/src/calculation/state/DeferredCalls.d.ts +207 -0
  194. package/types/src/calculation/state/IContextContainer.d.ts +19 -55
  195. package/types/src/calculation/state/_KeepBlanks.d.ts +5 -0
  196. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +52 -33
  197. package/types/src/calculation/state/_WhatIfLayer.d.ts +77 -0
  198. package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +0 -42
  199. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +0 -6
  200. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +0 -12
  201. package/types/src/calculation/symbol/SymbolRegistry.d.ts +0 -9
  202. package/types/src/calculation/toolkit/index.d.ts +0 -8
  203. package/types/src/cell/ICell.d.ts +59 -54
  204. package/types/src/cellControl/CellControl.d.ts +67 -0
  205. package/types/src/cellControl/CellControlCollection.d.ts +29 -0
  206. package/types/src/cellControl/CellControlRegistry.d.ts +47 -0
  207. package/types/src/cellControl/ICellControl.d.ts +99 -0
  208. package/types/src/cellControl/ICellControlCollection.d.ts +67 -0
  209. package/types/src/cellControl/index.d.ts +4 -0
  210. package/types/src/cellRange/ICellRange.d.ts +226 -67
  211. package/types/src/cellRange/ICellRanges.d.ts +4 -3
  212. package/types/src/chart/Chart.d.ts +0 -16
  213. package/types/src/chart/_ChartParts.d.ts +0 -39
  214. package/types/src/chart/_ChartSource.d.ts +0 -14
  215. package/types/src/chart/createChart.d.ts +1 -1
  216. package/types/src/chart/kinds/ChartKind.d.ts +4 -4
  217. package/types/src/chart/kinds/_Placeholder.d.ts +0 -1
  218. package/types/src/chart/layout/ChartLayout.d.ts +5 -1
  219. package/types/src/chart/layout/TextMeasurer.d.ts +0 -20
  220. package/types/src/chart/layout/_LayoutUtils.d.ts +0 -16
  221. package/types/src/chart/math/BoxStats.d.ts +0 -8
  222. package/types/src/chart/math/DateUnitCalcs.d.ts +0 -10
  223. package/types/src/chart/math/Histogram.d.ts +0 -17
  224. package/types/src/chart/math/OrdUnitCalcs.d.ts +0 -53
  225. package/types/src/chart/math/Treemap.d.ts +0 -15
  226. package/types/src/chart/math/Trendlines.d.ts +0 -8
  227. package/types/src/chart/math/UnitCalcs.d.ts +0 -22
  228. package/types/src/chart/model/_Edits.d.ts +0 -33
  229. package/types/src/chart/model/_Grouping.d.ts +0 -25
  230. package/types/src/chart/model/_Inference.d.ts +0 -18
  231. package/types/src/chart/model/_NewChart.d.ts +0 -41
  232. package/types/src/chart/model/_OfPie.d.ts +0 -7
  233. package/types/src/chart/resolve/_LegacyStyles.d.ts +0 -20
  234. package/types/src/chart/resolve/_Resolve.d.ts +3 -12
  235. package/types/src/chart/resolve/_ResolvedChart.d.ts +5 -8
  236. package/types/src/collections/ISparseGrid.d.ts +11 -2
  237. package/types/src/collections/MixedTypedArrayList.d.ts +8 -2
  238. package/types/src/collections/SparseGrid.d.ts +3 -8
  239. package/types/src/collections/_GridUtils.d.ts +0 -10
  240. package/types/src/comment/_NoteBox.d.ts +0 -15
  241. package/types/src/condition/AnchoredConditional.d.ts +3 -25
  242. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +0 -49
  243. package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +0 -10
  244. package/types/src/condition/ICondition.d.ts +2 -2
  245. package/types/src/condition/_ConditionUtils.d.ts +0 -38
  246. package/types/src/externalBook/ExternalBookCollection.d.ts +0 -15
  247. package/types/src/externalBook/ExternalBookName.d.ts +2 -3
  248. package/types/src/externalBook/IExternalBook.d.ts +16 -18
  249. package/types/src/fetch/Fetcher.d.ts +15 -0
  250. package/types/src/fetch/IFetcher.d.ts +48 -0
  251. package/types/src/fetch/_WorkbookFetch.d.ts +43 -0
  252. package/types/src/fetch/index.d.ts +3 -0
  253. package/types/src/fill/PaintUtils.d.ts +3 -1
  254. package/types/src/font/AdvanceTable.d.ts +16 -42
  255. package/types/src/font/IFont.d.ts +32 -9
  256. package/types/src/font/TableFileAdvanceBuilder.d.ts +6 -3
  257. package/types/src/font/_FontUtils.d.ts +0 -8
  258. package/types/src/font/_StandIns.d.ts +33 -0
  259. package/types/src/hyperlink/IHyperlink.d.ts +10 -0
  260. package/types/src/hyperlink/_Hyperlink.d.ts +4 -1
  261. package/types/src/index.d.ts +2 -1
  262. package/types/src/io/IWorkbookIO.d.ts +3 -3
  263. package/types/src/io/WorkbookOrigin.d.ts +2 -2
  264. package/types/src/license/LicenseManager.d.ts +2 -1
  265. package/types/src/license/_Utils.d.ts +4 -3
  266. package/types/src/license/details.d.ts +3 -1
  267. package/types/src/license/keys.d.ts +6 -0
  268. package/types/src/license/license-key.d.ts +15 -33
  269. package/types/src/license/token.d.ts +55 -0
  270. package/types/src/named/INamedCollection.d.ts +36 -0
  271. package/types/src/named/NamedCollection.d.ts +18 -0
  272. package/types/src/picture/IPicture.d.ts +45 -0
  273. package/types/src/picture/Picture.d.ts +12 -0
  274. package/types/src/pivot/PivotTable.d.ts +0 -7
  275. package/types/src/primitives/AsyncValue.d.ts +46 -0
  276. package/types/src/primitives/PrimitiveUtils.d.ts +1 -110
  277. package/types/src/primitives/Range.d.ts +0 -60
  278. package/types/src/primitives/ScalarCollation.d.ts +0 -106
  279. package/types/src/primitives/stats/AggregateStats.d.ts +0 -19
  280. package/types/src/print/PageLayout.d.ts +0 -6
  281. package/types/src/reference/ReferenceUtils.d.ts +4 -2
  282. package/types/src/resource/IResource.d.ts +9 -0
  283. package/types/src/resource/IResourceCollection.d.ts +4 -0
  284. package/types/src/resource/Resource.d.ts +2 -0
  285. package/types/src/resource/_AddResource.d.ts +13 -0
  286. package/types/src/richData/CellImage.d.ts +95 -0
  287. package/types/src/richData/Hyperlink.d.ts +49 -0
  288. package/types/src/richData/IRichDataCollection.d.ts +76 -0
  289. package/types/src/richData/IRichDataKind.d.ts +55 -11
  290. package/types/src/richData/RichArray.d.ts +42 -0
  291. package/types/src/richData/RichDataCollection.d.ts +23 -0
  292. package/types/src/richData/RichDataRegistry.d.ts +52 -14
  293. package/types/src/richData/RichDataValues.d.ts +20 -0
  294. package/types/src/richData/RichRecord.d.ts +68 -0
  295. package/types/src/richData/RichText.d.ts +5 -5
  296. package/types/src/richData/index.d.ts +6 -0
  297. package/types/src/scripting/FunctionArguments.d.ts +17 -1
  298. package/types/src/scripting/FunctionCollection.d.ts +8 -0
  299. package/types/src/scripting/Scripts.d.ts +10 -0
  300. package/types/src/scripting/TypedFunction.d.ts +2 -109
  301. package/types/src/sheet/ICellContainerOptions.d.ts +6 -0
  302. package/types/src/sheet/IWorksheet.d.ts +26 -22
  303. package/types/src/sheet/NamedCellRange.d.ts +0 -21
  304. package/types/src/sheet/SheetCell.d.ts +25 -3
  305. package/types/src/sheet/SheetRange.d.ts +8 -2
  306. package/types/src/sheet/SheetRanges.d.ts +2 -2
  307. package/types/src/sheet/Worksheet.d.ts +117 -104
  308. package/types/src/sheet/_DelimitedText.d.ts +13 -0
  309. package/types/src/sheet/_IgnoredErrors.d.ts +0 -12
  310. package/types/src/sheet/_ListenerAnchor.d.ts +7 -1
  311. package/types/src/sheet/_ScalarListFactory.d.ts +46 -17
  312. package/types/src/sheet/_SheetCoords.d.ts +0 -7
  313. package/types/src/sheet/_SheetFilterUtils.d.ts +0 -8
  314. package/types/src/sheet/_SheetMutations.d.ts +4 -1
  315. package/types/src/sheet/_SheetStateReader.d.ts +0 -10
  316. package/types/src/sheet/_SheetStateTypes.d.ts +23 -14
  317. package/types/src/sheet/_SheetUtils.d.ts +1 -1
  318. package/types/src/sheet/style/_RowLine.d.ts +32 -0
  319. package/types/src/sheet/style/_StyleUtils.d.ts +6 -14
  320. package/types/src/sheetView/_SheetViewUtils.d.ts +0 -1
  321. package/types/src/slicer/_BuiltInSlicerStyles.d.ts +0 -5
  322. package/types/src/style/ICellStyle.d.ts +4 -0
  323. package/types/src/table/AnchoredTable.d.ts +0 -147
  324. package/types/src/text/TextFrame.d.ts +4 -1
  325. package/types/src/text/TextStacked.d.ts +0 -24
  326. package/types/src/text/TextWrapper.d.ts +3 -5
  327. package/types/src/text/_LineBox.d.ts +24 -0
  328. package/types/src/text/_TextUtils.d.ts +5 -2
  329. package/types/src/text/_TextWrapperFallback.d.ts +2 -1
  330. package/types/src/wasm/sdkWasm.d.ts +1 -1
  331. package/types/src/workbook/IWorkbook.d.ts +40 -1
  332. package/types/src/workbook/Workbook.d.ts +25 -13
  333. package/types/src/workbook/WorkbookRanges.d.ts +1 -1
  334. package/browser/esm/BGOFfpxr2jPIdqmV.mjs +0 -40
  335. package/browser/esm/BLoUBId2xZpXAK_H.mjs +0 -698
  336. package/browser/esm/C5E6zSGAALWf61n4.mjs +0 -199
  337. package/browser/esm/S2dNNx1a5ydRnARM.mjs +0 -367
  338. package/browser/esm/f1IoRb7tEb0QmCSt.mjs +0 -110
  339. package/browser/esm/gssVX_FH1XFN-twD.mjs +0 -210
  340. package/node/esm/BrCKGFRsX_ezFJ4B.mjs +0 -811
  341. package/node/esm/DOU54VsOjG-m-NyQ.mjs +0 -210
  342. package/node/esm/Db0v7zXNnyjBIjjI.mjs +0 -372
  343. package/node/esm/Df1bL6VFvrqIdSLB.mjs +0 -40
  344. package/node/esm/DrTZbfemSLq2mseG.mjs +0 -111
  345. package/types/src/dataTable/DataTable.d.ts +0 -67
  346. package/types/src/dataTable/DataTableCollection.d.ts +0 -19
  347. package/types/src/dataTable/IDataTable.d.ts +0 -99
  348. package/types/src/dataTable/IDataTableCollection.d.ts +0 -18
  349. package/types/src/dataTable/index.d.ts +0 -6
@@ -1,19 +1,19 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.11
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.13
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { a as e, l as t, o as n, t as r, u as i } from "./CU3DmJ-YnVVrC1_k.mjs";
8
- import { A as a, Ar as o, Bi as s, Bt as c, C as l, Cn as u, Cr as d, D as f, Dr as p, E as m, Er as h, Fr as g, Ft as _, Gi as v, Gt as y, Hi as b, It as x, Ji as S, Jt as C, Ki as ee, Kt as te, Lt as ne, Mr as re, N as ie, Ni as ae, Nr as oe, O as se, Or as ce, Pr as le, Qr as ue, Ri as de, Rt as fe, S as pe, Sn as me, Sr as he, T as ge, Tr as _e, Ui as ve, Ur as ye, Vi as be, Vr as xe, Vt as Se, Wi as Ce, Wt as we, Xi as Te, Xr as Ee, Xt as De, Yi as Oe, Yt as w, Zi as ke, Zr as Ae, _i as je, _r as Me, a as Ne, ai as Pe, an as Fe, at as Ie, b as T, br as Le, bt as Re, ci as ze, ct as Be, di as Ve, dt as He, en as Ue, fi as We, fr as E, ft as Ge, gi as Ke, gn as qe, gr as Je, gt as Ye, hi as Xe, hn as Ze, hr as Qe, ht as $e, i as et, ii as tt, in as nt, it as rt, jr as it, k as at, kr as ot, lt as st, mi as ct, mr as lt, mt as ut, nn as D, oi as dt, on as ft, pi as pt, pr as mt, pt as ht, qi as O, qr as gt, qt as _t, r as vt, ri as k, rt as yt, si as bt, sn as xt, tn as St, ui as Ct, ut as wt, v as Tt, vr as Et, vt as Dt, w as A, wn as Ot, wr as kt, x as At, xr as jt, xt as Mt, y as j, yr as Nt, yt as Pt, zt as Ft } from "./C16ycKja6zG0crV_.mjs";
9
- import { $t as It, B as Lt, Ct as Rt, E as zt, Gt as Bt, H as Vt, I as Ht, Kt as Ut, L as Wt, O as Gt, Qt as Kt, R as qt, St as Jt, V as Yt, W as Xt, Yt as M, at as Zt, ct as Qt, dt as $t, en as N, ft as P, lt as en, ot as tn, qt as F, rt as nn, st as rn, ut as an, z as on } from "./CV5EGEjG5_-CPpP0.mjs";
10
- import { n as sn, t as cn } from "./BMyDRQ716j79h_bH.mjs";
11
- import { t as ln } from "./gssVX_FH1XFN-twD.mjs";
7
+ import { r as e } from "./CSJuIjYUOE387FIP.mjs";
8
+ import { a as t, l as n, o as r, t as i, u as a } from "./BTgWtqdQoh2cB6DL.mjs";
9
+ import { $t as o, A as s, Ai as c, Ar as l, At as u, Bi as d, Br as f, Bt as p, C as m, Ci as h, Cr as g, D as _, Di as v, Dt as y, E as b, Ei as x, En as S, Et as C, F as w, Fi as ee, Fr as te, Ft as ne, Gr as re, Gt as ie, Hr as ae, Ht as oe, I as se, Ii as ce, Ir as le, It as ue, Jr as de, Jt as fe, Kr as pe, L as me, Li as he, Lr as ge, Lt as _e, M as ve, Mn as ye, Mr as be, Ni as xe, Nn as Se, Nr as Ce, O as we, Oi as Te, Ot as Ee, Pi as De, Pn as Oe, Pr as ke, Pt as Ae, Qt as je, R as Me, Ri as Ne, Rr as Pe, S as Fe, Si as Ie, Sr as Le, T, Ti as Re, Tn as ze, Tt as Be, Ur as Ve, Ut as He, Vr as Ue, Vt as We, Wr as Ge, Wt as Ke, Xt as qe, Yr as Je, Yt as Ye, Zt as Xe, _a as E, a as Ze, ai as Qe, b as D, ba as $e, bi as et, ci as tt, cn as nt, da as rt, di as it, dn as at, en as ot, fa as st, fi as ct, fn as lt, ga as ut, ha as dt, i as ft, j as pt, ji as mt, jr as ht, k as gt, ki as _t, kr as vt, kt as yt, la as bt, ln as O, ma as xt, mn as St, na as Ct, nn as k, pa as wt, pi as Tt, pn as Et, qr as Dt, qt as Ot, r as kt, ri as At, rn as jt, sa as Mt, sn as Nt, ti as Pt, tn as Ft, ua as It, v as Lt, va as Rt, vi as A, w as zt, wi as Bt, wr as Vt, wt as Ht, x as j, xi as Ut, y as Wt, ya as Gt, yi as Kt, zi as qt, zr as Jt, zt as Yt } from "./Dz86-De57bv2VYIi.mjs";
10
+ import { A as Xt, B as Zt, H as Qt, Jt as $t, K as en, O as tn, R as nn, Tt as rn, U as an, V as on, W as sn, Yt as M, Zt as N, at as cn, ct as ln, dt as un, ft as dn, in as P, k as fn, lt as pn, mt as F, nn as mn, pt as hn, qt as gn, rn as _n, st as vn, ut as yn, wt as bn, z as xn } from "./quEvwgrEuOb0h3q-.mjs";
11
+ import { n as Sn, t as Cn } from "./-GEhXGMfNcWmHPby.mjs";
12
12
  import { FormulaError as I, ScalarType as L } from "@sheetxl/primitives";
13
- import { BufferUtils as un, CommonUtils as R, CoordUtils as z, DOMUtils as dn, DefaultLanguagePackService as fn, ExpectedError as B, InvalidPasswordError as pn, MimeType as mn, Notifier as V, NullNotAllowedError as hn, OutOfBoundsError as H, PasswordRequiredError as gn, ProtectedError as U, UndoManager as _n, messageKey as W, t as G } from "@sheetxl/utils";
13
+ import { BufferUtils as wn, CommonUtils as R, CoordUtils as z, DOMUtils as Tn, DefaultLanguagePackService as En, ExpectedError as B, ImageUtils as Dn, InvalidPasswordError as On, MimeType as kn, Notifier as An, NullNotAllowedError as jn, OutOfBoundsError as V, PasswordRequiredError as Mn, ProtectedError as H, UndoManager as Nn, messageKey as U, t as W } from "@sheetxl/utils";
14
14
  export * from "@sheetxl/primitives";
15
15
  export * from "@sheetxl/utils";
16
- var vn, yn = class extends _n {
16
+ var Pn, Fn = class extends Nn {
17
17
  constructor(e, t = 50) {
18
18
  super(t), this._transactions = e, this._floorId = e ? e.getCurrentCommit(!1).getId() : null, this._removeListener = e?.addListener({ onCommitChange: () => this._notifyOnStackChange() });
19
19
  }
@@ -98,14 +98,14 @@ var vn, yn = class extends _n {
98
98
  return e.length === 0 && this._repeatOperation !== null && e.push(this._repeatOperation.description), Object.freeze(e);
99
99
  }
100
100
  getUndoEntries() {
101
- return this._undoCommits().map(xn);
101
+ return this._undoCommits().map(Ln);
102
102
  }
103
103
  getRedoEntries() {
104
- let e = this._redoCommits().map(xn);
104
+ let e = this._redoCommits().map(Ln);
105
105
  return e.length === 0 && this._repeatOperation !== null && e.push({
106
106
  description: this._repeatOperation.description,
107
107
  author: null,
108
- meta: bn
108
+ meta: In
109
109
  }), Object.freeze(e);
110
110
  }
111
111
  addUndoOperation() {
@@ -117,15 +117,15 @@ var vn, yn = class extends _n {
117
117
  close() {
118
118
  this._removeListener?.();
119
119
  }
120
- }, bn = Object.freeze({}), xn = (e) => ({
120
+ }, In = Object.freeze({}), Ln = (e) => ({
121
121
  description: e.getDescription(),
122
122
  author: e.getAuthor(),
123
- meta: e.getMeta() ?? bn
124
- }), Sn = class {
125
- constructor(t, n) {
126
- this._dirty = !1, this._store = t, this._savedCommitId = t.getCurrentCommit()?.getId() ?? null, this._emitter = new e(this);
123
+ meta: e.getMeta() ?? In
124
+ }), Rn = class {
125
+ constructor(e, n) {
126
+ this._dirty = !1, this._store = e, this._savedCommitId = e.getCurrentCommit()?.getId() ?? null, this._emitter = new t(this);
127
127
  let r = this;
128
- this._removeStoreListener = t.addListener({
128
+ this._removeStoreListener = e.addListener({
129
129
  onCommitEnd() {
130
130
  r._recompute();
131
131
  },
@@ -159,10 +159,10 @@ var vn, yn = class extends _n {
159
159
  this._removeStoreListener?.(), this._removeCommitListener?.(), this._emitter.close();
160
160
  }
161
161
  };
162
- vn ||= {};
163
- var Cn, K = class t {
162
+ Pn ||= {};
163
+ var zn, G = class e {
164
164
  constructor(n, r = {}) {
165
- this._password = null, this._emitter = new e(this), this._path = n ?? null, this._name = r.name ?? null, this._format = r.format ?? null, this._size = r.size ?? null, this._lastModified = r.lastModified ?? null, this._canWrite = r.canWrite ?? t._defaultCanWrite(this._path), this._encryption = r.encryption ?? null;
165
+ this._password = null, this._emitter = new t(this), this._path = n ?? null, this._name = r.name ?? null, this._format = r.format ?? null, this._size = r.size ?? null, this._lastModified = r.lastModified ?? null, this._canWrite = r.canWrite ?? e._defaultCanWrite(this._path), this._encryption = r.encryption ?? null;
166
166
  }
167
167
  static _defaultCanWrite(e) {
168
168
  return !!e && !/^(https?:|data:|blob:)/i.test(e);
@@ -173,7 +173,7 @@ var Cn, K = class t {
173
173
  getName() {
174
174
  if (this._name !== null && this._name !== void 0) return this._name;
175
175
  let e = this._cleanPath();
176
- return e && O(e) || null;
176
+ return e && ut(e) || null;
177
177
  }
178
178
  getPath() {
179
179
  return this._path;
@@ -184,7 +184,7 @@ var Cn, K = class t {
184
184
  getExtension() {
185
185
  let e = this._cleanPath();
186
186
  if (!e) return null;
187
- let t = S(e);
187
+ let t = E(e);
188
188
  return t ? t.toLowerCase() : null;
189
189
  }
190
190
  getEncryption() {
@@ -234,26 +234,26 @@ var Cn, K = class t {
234
234
  ];
235
235
  return `${t} ${(n / 1024 ** r).toFixed(2)}${i[Math.min(r, i.length - 1)]}`;
236
236
  }
237
- }, q = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new Set(), Tn = (e) => q.get(e) ?? null, En = () => Array.from(wn, (e) => e.getOrigin()), Dn = class t {
237
+ }, K = /* @__PURE__ */ new WeakMap(), Bn = /* @__PURE__ */ new Set(), Vn = (e) => K.get(e) ?? null, Hn = () => Array.from(Bn, (e) => e.getOrigin()), Un = class e {
238
238
  constructor(n) {
239
- this._released = !1, t._assertFree(n), this._emitter = new e(this), this._origin = n, q.set(n, this), wn.add(this);
239
+ this._released = !1, e._assertFree(n), this._emitter = new t(this), this._origin = n, K.set(n, this), Bn.add(this);
240
240
  }
241
241
  getOrigin() {
242
242
  return this._origin;
243
243
  }
244
- setOrigin(e) {
245
- e !== this._origin && (t._assertFree(e), this._released || (q.delete(this._origin), q.set(e, this)), this._origin = e, this._emitter.notify("onOriginChange"));
244
+ setOrigin(t) {
245
+ t !== this._origin && (e._assertFree(t), this._released || (K.delete(this._origin), K.set(t, this)), this._origin = t, this._emitter.notify("onOriginChange"));
246
246
  }
247
247
  release() {
248
- this._released || (this._released = !0, q.get(this._origin) === this && q.delete(this._origin), wn.delete(this));
248
+ this._released || (this._released = !0, K.get(this._origin) === this && K.delete(this._origin), Bn.delete(this));
249
249
  }
250
250
  addListeners(e, t) {
251
251
  return this._emitter.addListeners(e, t);
252
252
  }
253
253
  static _assertFree(e) {
254
- if (q.has(e)) throw Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
254
+ if (K.has(e)) throw Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
255
255
  }
256
- }, On = class {
256
+ }, Wn = class {
257
257
  constructor() {
258
258
  this._defaultStringSourceType = "filepath";
259
259
  }
@@ -271,10 +271,10 @@ var Cn, K = class t {
271
271
  }
272
272
  switch (o) {
273
273
  case "file": {
274
- let e = n, r = e?.name, o = r ? `${O(r)}` : "";
274
+ let e = n, r = e?.name, o = r ? `${ut(r)}` : "";
275
275
  s = await e.arrayBuffer(), c = {
276
276
  format: a,
277
- ext: S(r),
277
+ ext: E(r),
278
278
  name: o,
279
279
  absolutePath: r,
280
280
  size: e.size,
@@ -298,7 +298,7 @@ var Cn, K = class t {
298
298
  let [, t] = n.split(",");
299
299
  e = t;
300
300
  } else e = n;
301
- s = un.base64ToArrayBuffer(e), c = {
301
+ s = wn.base64ToArrayBuffer(e), c = {
302
302
  format: a,
303
303
  size: e.length
304
304
  };
@@ -314,7 +314,7 @@ var Cn, K = class t {
314
314
  e = i.input, t = i.init, r = i.timeout;
315
315
  }
316
316
  }
317
- let i = r || 3e4, o = new AbortController(), l = setTimeout(() => o.abort(), i), u = typeof e == "string" ? e : e.toString(), d = S(u);
317
+ let i = r || 3e4, o = new AbortController(), l = setTimeout(() => o.abort(), i), u = typeof e == "string" ? e : e.toString(), d = E(u);
318
318
  try {
319
319
  let n = await fetch(e, {
320
320
  ...t,
@@ -326,7 +326,7 @@ var Cn, K = class t {
326
326
  s = r, c = {
327
327
  format: a,
328
328
  ext: d,
329
- name: O(u, !0),
329
+ name: ut(u, !0),
330
330
  absolutePath: u
331
331
  };
332
332
  } catch (e) {
@@ -366,7 +366,7 @@ var Cn, K = class t {
366
366
  return t.absolutePath ? this.findOpenPath(t.absolutePath) : null;
367
367
  }
368
368
  findOpenPath(e, t) {
369
- return En().find((n) => {
369
+ return Hn().find((n) => {
370
370
  if (n === t || !n.canWrite()) return !1;
371
371
  let r = n.getPath();
372
372
  return !!r && this.isSamePath(r, e);
@@ -397,21 +397,21 @@ var Cn, K = class t {
397
397
  }
398
398
  if (typeof File < "u" && e instanceof File) return "file";
399
399
  if (typeof Blob < "u" && e instanceof Blob) return "blob";
400
- let t = e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", n = ArrayBuffer.isView(e), r = un.isNodeBuffer(e);
400
+ let t = e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", n = ArrayBuffer.isView(e), r = wn.isNodeBuffer(e);
401
401
  return t || n || r ? "buffer" : typeof ReadableStream < "u" && e instanceof ReadableStream || Object.prototype.toString.call(e) === "[object ReadableStream]" || e && typeof e.getReader == "function" && e.locked !== void 0 ? "stream" : null;
402
402
  }
403
- }, kn = class extends On {
403
+ }, Gn = class extends Wn {
404
404
  constructor(e, t) {
405
405
  super(), this._getWriteFormats = e, this._getReadFormats = t, this._defaultStringSourceType = "fetch", this._handleCache = /* @__PURE__ */ new WeakMap();
406
406
  }
407
407
  async fileFromHandle(e) {
408
- return jn(e) ? e.getFile() : null;
408
+ return qn(e) ? e.getFile() : null;
409
409
  }
410
410
  async resolveSource() {
411
411
  let e = await this._getReadFormats?.() ?? [];
412
412
  if (typeof globalThis.showOpenFilePicker == "function") try {
413
413
  let t = function(e) {
414
- let t = An(e);
414
+ let t = Kn(e);
415
415
  if (t.length <= 1) return t;
416
416
  let n = /* @__PURE__ */ new Set(), r = {};
417
417
  for (let e of t) for (let [t, i] of Object.entries(e.accept)) for (let e of i) n.has(e) || (n.add(e), (r[t] ??= []).push(e));
@@ -426,13 +426,13 @@ var Cn, K = class t {
426
426
  throw e;
427
427
  }
428
428
  let t = e.flatMap((e) => e.exts.map((e) => "." + e)).join(", ");
429
- return dn.openFileDialog(t);
429
+ return Tn.openFileDialog(t);
430
430
  }
431
431
  async findOpenOrigin(e) {
432
- return jn(e) ? this._findOpenHandle(e) : null;
432
+ return qn(e) ? this._findOpenHandle(e) : null;
433
433
  }
434
434
  async _findOpenHandle(e, t) {
435
- for (let n of En()) {
435
+ for (let n of Hn()) {
436
436
  if (n === t || !n.canWrite()) continue;
437
437
  let r = this._handleCache.get(n);
438
438
  if (r && typeof r.isSameEntry == "function" && await r.isSameEntry(e)) return n;
@@ -440,7 +440,7 @@ var Cn, K = class t {
440
440
  return null;
441
441
  }
442
442
  async onWorkbookRead(e, t) {
443
- if (!jn(t)) return;
443
+ if (!qn(t)) return;
444
444
  let n = e.getOrigin?.();
445
445
  n?.canWrite() && this._handleCache.set(n, t);
446
446
  }
@@ -467,18 +467,18 @@ var Cn, K = class t {
467
467
  if (!a) {
468
468
  c = await globalThis.showSaveFilePicker({
469
469
  suggestedName: n,
470
- types: An(o)
470
+ types: Kn(o)
471
471
  });
472
472
  let t = await this._findOpenHandle(c, e.workbook?.getOrigin?.());
473
- if (t) throw new B(G("error.io.openElsewhere", { name: t.getName() ?? c.name ?? "" }));
473
+ if (t) throw new B(W("error.io.openElsewhere", { name: t.getName() ?? c.name ?? "" }));
474
474
  }
475
- let s = Nn(c.name ?? n), l = o.find((e) => e.exts.some((e) => e.toLowerCase() === s)) ?? r, u = a ? t : new K(c.name ?? n, {
475
+ let s = Yn(c.name ?? n), l = o.find((e) => e.exts.some((e) => e.toLowerCase() === s)) ?? r, u = a ? t : new G(c.name ?? n, {
476
476
  format: l.key,
477
477
  canWrite: !0
478
478
  }), d = await i(l.key, u);
479
479
  if (!d) return null;
480
- let f = new Blob([Mn(d)], { type: l.mimeType || "application/octet-stream" }), p = await c.createWritable();
481
- if (await p.write(f), await p.close(), this._handleCache.set(u, c), u instanceof K) {
480
+ let f = new Blob([Jn(d)], { type: l.mimeType || "application/octet-stream" }), p = await c.createWritable();
481
+ if (await p.write(f), await p.close(), this._handleCache.set(u, c), u instanceof G) {
482
482
  let e = await Promise.resolve(c.getFile?.()).then((e) => e?.lastModified ?? null, () => null);
483
483
  u.update({
484
484
  size: f.size,
@@ -490,19 +490,19 @@ var Cn, K = class t {
490
490
  if (e?.name === "AbortError") return null;
491
491
  if (e instanceof B) throw e;
492
492
  }
493
- let l = t.getPath(), u = l ? l.split(/[/\\]/).pop() : null, d = u && r.exts.some((e) => e.toLowerCase() === Nn(u)) ? u : n, f = l !== d || t.canWrite() ? new K(d, {
493
+ let l = t.getPath(), u = l ? l.split(/[/\\]/).pop() : null, d = u && r.exts.some((e) => e.toLowerCase() === Yn(u)) ? u : n, f = l !== d || t.canWrite() ? new G(d, {
494
494
  format: r.key,
495
495
  canWrite: !1
496
496
  }) : t, p = await i(r.key, f);
497
497
  if (!p) return null;
498
- let m = new Blob([Mn(p)], { type: r.mimeType || "application/octet-stream" });
498
+ let m = new Blob([Jn(p)], { type: r.mimeType || "application/octet-stream" });
499
499
  return function(e, t) {
500
500
  let n = URL.createObjectURL(e), r = document.createElement("a");
501
501
  r.style.display = "none", r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
502
- }(m, d), f instanceof K && f.update({ size: m.size }), f;
502
+ }(m, d), f instanceof G && f.update({ size: m.size }), f;
503
503
  }
504
504
  };
505
- function An(e) {
505
+ function Kn(e) {
506
506
  return e.map((e) => {
507
507
  let t = e.mimeType && e.mimeType.includes("/") ? e.mimeType : "application/octet-stream";
508
508
  return {
@@ -511,27 +511,27 @@ function An(e) {
511
511
  };
512
512
  });
513
513
  }
514
- function jn(e) {
514
+ function qn(e) {
515
515
  return !!e && e.kind === "file" && typeof e.getFile == "function";
516
516
  }
517
- function Mn(e) {
517
+ function Jn(e) {
518
518
  if (typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) {
519
519
  let t = new ArrayBuffer(e.byteLength);
520
520
  return new Uint8Array(t).set(new Uint8Array(e)), t;
521
521
  }
522
522
  return e;
523
523
  }
524
- function Nn(e) {
524
+ function Yn(e) {
525
525
  let t = e.lastIndexOf(".");
526
526
  return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
527
527
  }
528
- (Cn ||= {}).SortOn = {
528
+ (zn ||= {}).SortOn = {
529
529
  Value: "value",
530
530
  FillColor: "fillColor",
531
531
  FontColor: "fontColor",
532
532
  Icon: "icon"
533
533
  };
534
- var Pn = {
534
+ var Xn = {
535
535
  TopLeft: "tl",
536
536
  Top: "t",
537
537
  TopRight: "tr",
@@ -541,53 +541,53 @@ var Pn = {
541
541
  BottomLeft: "bl",
542
542
  Bottom: "b",
543
543
  BottomRight: "br"
544
- }, J = Zt.BuiltInName, Fn = {
545
- [J.Normal]: W("style.builtin.normal"),
546
- [J.Comma]: W("style.builtin.comma"),
547
- [J.Currency]: W("style.builtin.currency"),
548
- [J.Percent]: W("style.builtin.percent"),
549
- [J.Comma0]: W("style.builtin.comma0"),
550
- [J.Currency0]: W("style.builtin.currency0"),
551
- [J.Hyperlink]: W("style.builtin.hyperlink"),
552
- [J.FollowedHyperlink]: W("style.builtin.followedHyperlink"),
553
- [J.Note]: W("style.builtin.note"),
554
- [J.WarningText]: W("style.builtin.warningText"),
555
- [J.Title]: W("style.builtin.title"),
556
- [J.Input]: W("style.builtin.input"),
557
- [J.Output]: W("style.builtin.output"),
558
- [J.Calculation]: W("style.builtin.calculation"),
559
- [J.CheckCell]: W("style.builtin.checkCell"),
560
- [J.LinkedCell]: W("style.builtin.linkedCell"),
561
- [J.Total]: W("style.builtin.total"),
562
- [J.Good]: W("style.builtin.good"),
563
- [J.Bad]: W("style.builtin.bad"),
564
- [J.Neutral]: W("style.builtin.neutral"),
565
- [J.ExplanatoryText]: W("style.builtin.explanatoryText")
566
- }, In = W("style.builtin.heading"), Ln = W("style.builtin.accent"), Rn = W("style.builtin.accentTint"), zn = /^Heading ([1-4])$/, Bn = /^Accent([1-6])$/, Vn = /^(20|40|60)% - Accent([1-6])$/;
567
- function Hn(e) {
568
- let t = Fn[e];
544
+ }, q = vn.BuiltInName, Zn = {
545
+ [q.Normal]: U("style.builtin.normal"),
546
+ [q.Comma]: U("style.builtin.comma"),
547
+ [q.Currency]: U("style.builtin.currency"),
548
+ [q.Percent]: U("style.builtin.percent"),
549
+ [q.Comma0]: U("style.builtin.comma0"),
550
+ [q.Currency0]: U("style.builtin.currency0"),
551
+ [q.Hyperlink]: U("style.builtin.hyperlink"),
552
+ [q.FollowedHyperlink]: U("style.builtin.followedHyperlink"),
553
+ [q.Note]: U("style.builtin.note"),
554
+ [q.WarningText]: U("style.builtin.warningText"),
555
+ [q.Title]: U("style.builtin.title"),
556
+ [q.Input]: U("style.builtin.input"),
557
+ [q.Output]: U("style.builtin.output"),
558
+ [q.Calculation]: U("style.builtin.calculation"),
559
+ [q.CheckCell]: U("style.builtin.checkCell"),
560
+ [q.LinkedCell]: U("style.builtin.linkedCell"),
561
+ [q.Total]: U("style.builtin.total"),
562
+ [q.Good]: U("style.builtin.good"),
563
+ [q.Bad]: U("style.builtin.bad"),
564
+ [q.Neutral]: U("style.builtin.neutral"),
565
+ [q.ExplanatoryText]: U("style.builtin.explanatoryText")
566
+ }, Qn = U("style.builtin.heading"), $n = U("style.builtin.accent"), er = U("style.builtin.accentTint"), tr = /^Heading ([1-4])$/, nr = /^Accent([1-6])$/, rr = /^(20|40|60)% - Accent([1-6])$/;
567
+ function ir(e) {
568
+ let t = Zn[e];
569
569
  if (t) return { key: t };
570
- let n = zn.exec(e);
570
+ let n = tr.exec(e);
571
571
  return n ? {
572
- key: In,
572
+ key: Qn,
573
573
  params: { n: +n[1] }
574
- } : (n = Bn.exec(e), n ? {
575
- key: Ln,
574
+ } : (n = nr.exec(e), n ? {
575
+ key: $n,
576
576
  params: { n: +n[1] }
577
- } : (n = Vn.exec(e), n ? {
578
- key: Rn,
577
+ } : (n = rr.exec(e), n ? {
578
+ key: er,
579
579
  params: {
580
580
  pct: +n[1],
581
581
  n: +n[2]
582
582
  }
583
583
  } : null));
584
584
  }
585
- var Un, Wn, Gn, Kn, qn = (e, t, n, r, i) => {
585
+ var ar, or, sr, cr, lr = (e, t, n, r, i) => {
586
586
  let a = JSON.parse(JSON.stringify(e.definition));
587
587
  a.adjs ||= [];
588
588
  let o = "", s = 0, c = 0;
589
- t > 0 ? (c = t, s = 100 - t, o = G("op.lighterPercent", { percent: t })) : t < 0 && (s = 100 + t, o = G("op.darkerPercent", { percent: -t })), s && a.adjs.push({ [$t.AdjustmentType.LumMod]: s }), c && a.adjs.push({ [$t.AdjustmentType.LumOff]: c });
590
- let l = new en({
589
+ t > 0 ? (c = t, s = 100 - t, o = W("op.lighterPercent", { percent: t })) : t < 0 && (s = 100 + t, o = W("op.darkerPercent", { percent: -t })), s && a.adjs.push({ [hn.AdjustmentType.LumMod]: s }), c && a.adjs.push({ [hn.AdjustmentType.LumOff]: c });
590
+ let l = new un({
591
591
  val: a.val,
592
592
  adjs: a.adjs
593
593
  }, n), u = l.toString();
@@ -598,14 +598,14 @@ var Un, Wn, Gn, Kn, qn = (e, t, n, r, i) => {
598
598
  definition: a
599
599
  };
600
600
  };
601
- function Jn(e, t, n, r) {
601
+ function ur(e, t, n, r) {
602
602
  let i = [];
603
603
  for (let a = 0; a < e.length; a++) {
604
604
  let o = [];
605
605
  i.push(o);
606
606
  let s = (i) => {
607
- for (let s = 0; s < i.length; s++) o.push(qn(e[a], i[s], t, n, r));
608
- }, c = new en({
607
+ for (let s = 0; s < i.length; s++) o.push(lr(e[a], i[s], t, n, r));
608
+ }, c = new un({
609
609
  val: e[a].definition.val,
610
610
  adjs: e[a].definition.adjs
611
611
  }, t).toHSLA().lum;
@@ -643,28 +643,28 @@ function Jn(e, t, n, r) {
643
643
  }
644
644
  return i;
645
645
  }
646
- (Un ||= {}).buildPalette = Jn, Wn ||= {}, Gn ||= {}, Kn ||= {};
647
- var Yn, Y = null;
648
- function Xn() {
649
- if (!Y) {
650
- let e = import("./DLLE0FZNsKxbBzRn.mjs").then(({ initializeFunctions: e }) => {
646
+ (ar ||= {}).buildPalette = ur, or ||= {}, sr ||= {}, cr ||= {};
647
+ var dr, J = null;
648
+ function fr() {
649
+ if (!J) {
650
+ let e = import("./BiDGKhtzV6yIy66o.mjs").then(({ initializeFunctions: e }) => {
651
651
  let t = e(() => null);
652
652
  return Object.freeze(Array.from(t.keys()));
653
653
  });
654
654
  e.catch(() => {
655
- Y = null;
656
- }), Y = e;
655
+ J = null;
656
+ }), J = e;
657
657
  }
658
- return Y;
658
+ return J;
659
659
  }
660
- function Zn(e) {
661
- return Ot.peek()?.readFormulaLiteral(e);
660
+ function pr(e) {
661
+ return Oe.peek()?.readFormulaLiteral(e);
662
662
  }
663
- function Qn(e, t) {
664
- let n = $n(e), r = $n(t);
663
+ function mr(e, t) {
664
+ let n = hr(e), r = hr(t);
665
665
  return n === r ? e === t ? 0 : typeof e == "number" && typeof t == "number" ? e < t ? -1 : 1 : typeof e == "string" && typeof t == "string" ? e < t ? -1 : +(e > t) : typeof e == "boolean" ? e ? 1 : -1 : I.isError(e) && I.isError(t) ? e.getCode() - t.getCode() : 0 : n - r;
666
666
  }
667
- function $n(e) {
667
+ function hr(e) {
668
668
  if (e === null) return 0;
669
669
  switch (typeof e) {
670
670
  case "number": return 1;
@@ -675,13 +675,13 @@ function $n(e) {
675
675
  }
676
676
  (function(e) {
677
677
  function t(e) {
678
- return Ot.peek()?.getFunctionDeclaration(e) ?? null;
678
+ return Oe.peek()?.getFunctionDeclaration(e) ?? null;
679
679
  }
680
680
  e.get = t, e.has = function(e) {
681
681
  return t(e) !== null;
682
682
  };
683
- })(Yn ||= {});
684
- var er = class {
683
+ })(dr ||= {});
684
+ var gr = class {
685
685
  constructor(e) {
686
686
  this._children = e;
687
687
  }
@@ -726,19 +726,19 @@ var er = class {
726
726
  let n = t[e].getSortedNumbers().getValues();
727
727
  n.length > 0 && r.push(n);
728
728
  }
729
- e = new vt(function(e) {
729
+ e = new kt(function(e) {
730
730
  let t = e.length;
731
- if (t === 0) return tr;
731
+ if (t === 0) return _r;
732
732
  if (t === 1) return e[0];
733
733
  let n = e[0];
734
- for (let r = 1; r < t; r++) n = nr(n, e[r]);
734
+ for (let r = 1; r < t; r++) n = vr(n, e[r]);
735
735
  return Object.freeze(n);
736
736
  }(r)), this._sortedNumbers = e;
737
737
  }
738
738
  return e;
739
739
  }
740
740
  getRanked(e) {
741
- return et(this._children, e, Qn)[Symbol.iterator]();
741
+ return ft(this._children, e, mr)[Symbol.iterator]();
742
742
  }
743
743
  getFrequencies(e) {
744
744
  if (e) return this._mergeFrequencies(e);
@@ -746,7 +746,7 @@ var er = class {
746
746
  return t || (t = this._mergeFrequencies(), this._frequencies = t), t;
747
747
  }
748
748
  _mergeFrequencies(e) {
749
- let t = e?.keyFn ?? lt, n = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, a = i.length, o = 0, s = 0, c = !1;
749
+ let t = e?.keyFn ?? Vt, n = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, a = i.length, o = 0, s = 0, c = !1;
750
750
  for (let l = 0; l < a; l++) {
751
751
  let a = i[l].getFrequencies(e);
752
752
  o += a.getVisitedCount(), s += a.getTotalCount(), c ||= a.isTruncated();
@@ -759,7 +759,7 @@ var er = class {
759
759
  }) : c = !0, d = u.next();
760
760
  }
761
761
  }
762
- return mt.fromGroups(r, t, e, Qn, o, s, c);
762
+ return g.fromGroups(r, t, e, mr, o, s, c);
763
763
  }
764
764
  getTypedCounts(e) {
765
765
  let t = this._typedCounts;
@@ -809,24 +809,24 @@ var er = class {
809
809
  let a = n.numericalCount;
810
810
  a <= 0 || (r.numericalCount += a, r.sum += n.sum, r.sumSq += n.varP * a + n.sum * n.sum / a, (r.min === void 0 || n.min < r.min) && (r.min = n.min), (r.max === void 0 || n.max > r.max) && (r.max = n.max));
811
811
  }
812
- return Ne(r);
812
+ return Ze(r);
813
813
  }
814
- }, tr = Object.freeze([]);
815
- function nr(e, t) {
814
+ }, _r = Object.freeze([]);
815
+ function vr(e, t) {
816
816
  let n = e.length, r = t.length, i = Array(n + r), a = 0, o = 0, s = 0;
817
817
  for (; a < n && o < r;) i[s++] = e[a] <= t[o] ? e[a++] : t[o++];
818
818
  for (; a < n;) i[s++] = e[a++];
819
819
  for (; o < r;) i[s++] = t[o++];
820
820
  return i;
821
821
  }
822
- var rr, ir = class {
822
+ var yr, br = class {
823
823
  constructor(e, t) {
824
824
  this._source = null, this.cacheId = e, this.part = t;
825
825
  }
826
826
  _hold(e) {
827
827
  let t = this.part?.xml;
828
828
  if (!t || this._source) return;
829
- let n = te(t, "worksheetSource", "ref"), r = te(t, "worksheetSource", "sheet");
829
+ let n = o(t, "worksheetSource", "ref"), r = o(t, "worksheetSource", "sheet");
830
830
  if (!n || !r || n.includes("#REF!")) return;
831
831
  let i = e(r);
832
832
  if (!i) return;
@@ -835,7 +835,7 @@ var rr, ir = class {
835
835
  wired: null,
836
836
  last: null
837
837
  };
838
- this._source = a, i(`${Ae(r)}!${y(n)}`, (e) => {
838
+ this._source = a, i(`${ct(r)}!${je(n)}`, (e) => {
839
839
  a.formula = e.formula;
840
840
  let t = e.formula.getExpression();
841
841
  a.wired ??= t, e.formula.hasRefError() || (a.last = t);
@@ -846,18 +846,18 @@ var rr, ir = class {
846
846
  if (!e || !t?.formula) return e;
847
847
  let n = t.formula.hasRefError() ? t.last : t.formula.getExpression();
848
848
  if (n === null || n === t.wired) return e;
849
- let r = Mt(n);
850
- return r ? C(C(e, "worksheetSource", "ref", _t(r.reference)), "worksheetSource", "sheet", r.sheet) : C(e, "worksheetSource", "ref", _t(n));
849
+ let r = _(n);
850
+ return r ? Ft(Ft(e, "worksheetSource", "ref", ot(r.reference)), "worksheetSource", "sheet", r.sheet) : Ft(e, "worksheetSource", "ref", ot(n));
851
851
  }
852
852
  toJSON(e) {
853
- let t = { cacheId: this.cacheId }, n = w.toJSON(this.part, e);
853
+ let t = { cacheId: this.cacheId }, n = k.toJSON(this.part, e);
854
854
  if (n) {
855
855
  let e = this.getXML();
856
856
  e !== null && (n.xml = e), t.part = n;
857
857
  }
858
858
  return t;
859
859
  }
860
- }, ar = class {
860
+ }, xr = class {
861
861
  constructor(e, t) {
862
862
  this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
863
863
  }
@@ -891,7 +891,7 @@ var rr, ir = class {
891
891
  get isIPerson() {
892
892
  return !0;
893
893
  }
894
- }, or = class extends ke {
894
+ }, Sr = class extends $e {
895
895
  constructor(e) {
896
896
  super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
897
897
  }
@@ -912,7 +912,7 @@ var rr, ir = class {
912
912
  let e = this._byDisplayName.get(r);
913
913
  if (e) return e;
914
914
  }
915
- let i = new ar({
915
+ let i = new xr({
916
916
  ...t,
917
917
  displayName: r,
918
918
  id: n ?? R.uuidV4().toUpperCase()
@@ -955,7 +955,7 @@ var rr, ir = class {
955
955
  get isIPersonCollection() {
956
956
  return !0;
957
957
  }
958
- }, sr = (e, t) => {
958
+ }, Cr = (e, t) => {
959
959
  let n = [0];
960
960
  for (let t = 0; t < e.length; t++) e[t] === "\n" && n.push(t + 1);
961
961
  let r = t.map((e) => ` ${((e) => {
@@ -967,9 +967,9 @@ var rr, ir = class {
967
967
  return `${t + 1}:${e - n[t] + 1}`;
968
968
  })(e.start)} ${e.code}: ${e.message}`), i = t.length;
969
969
  return `Script has ${i} compile error${i === 1 ? "" : "s"}:\n${r.join("\n")}`;
970
- }, cr = class {
971
- constructor(t) {
972
- this._options = t, this._emitter = new e(this), this._initState();
970
+ }, wr = class {
971
+ constructor(e) {
972
+ this._options = e, this._emitter = new t(this), this._initState();
973
973
  }
974
974
  _initState() {}
975
975
  getModules() {
@@ -992,13 +992,13 @@ var rr, ir = class {
992
992
  minify: !0,
993
993
  ...e
994
994
  });
995
- return t.module ? await D(Fe.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
995
+ return t.module ? await O(lt.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
996
996
  }
997
997
  addModule(e, t, n) {
998
998
  this._modules.add(e, t, n);
999
999
  }
1000
1000
  async addModuleFromJSON(e, t, n) {
1001
- let r = await D(e, t);
1001
+ let r = await O(e, t);
1002
1002
  return this.addModule(e, r, n), r;
1003
1003
  }
1004
1004
  executeMacro(e, t, n) {
@@ -1014,7 +1014,7 @@ var rr, ir = class {
1014
1014
  }
1015
1015
  async run(e, t) {
1016
1016
  try {
1017
- let n = typeof e == "string" ? await this.createModule({ source: e }) : await D(Fe.DEFAULT_MODULE, e), r = typeof e == "string" ? e : e?.source ?? "";
1017
+ let n = typeof e == "string" ? await this.createModule({ source: e }) : await O(lt.DEFAULT_MODULE, e), r = typeof e == "string" ? e : e?.source ?? "";
1018
1018
  return await this._runModule(n, r, t);
1019
1019
  } catch (e) {
1020
1020
  return {
@@ -1031,7 +1031,7 @@ var rr, ir = class {
1031
1031
  };
1032
1032
  let i = e.getDiagnostics(), a = i.filter((e) => e.severity === "error");
1033
1033
  if (a.length > 0) {
1034
- let e = Error(sr(t, a));
1034
+ let e = Error(Cr(t, a));
1035
1035
  return e.diagnostics = a, {
1036
1036
  ok: !1,
1037
1037
  error: e,
@@ -1082,30 +1082,51 @@ var rr, ir = class {
1082
1082
  }
1083
1083
  if (!i || i.length === 0) return R.EmptyArray;
1084
1084
  let o = e?.text ? e.text.trim().toUpperCase() : null;
1085
- return o ? nt(i, o) : i.sort((e, t) => {
1085
+ return o ? at(i, o) : i.sort((e, t) => {
1086
1086
  let n = e.getName().toUpperCase(), r = t.getName().toUpperCase();
1087
1087
  return n < r ? -1 : +(n > r);
1088
1088
  }), n !== void 0 && i.length > n ? i.slice(0, n) : i;
1089
1089
  }
1090
1090
  async start() {
1091
- if (!this._modules) return this._startPromise || (this._startPromise = this._doStart(), this._startPromise.catch(() => {
1091
+ return this._startPromise || (this._startPromise = this._doStart(), this._startPromise.catch(() => {
1092
1092
  this._startPromise = void 0;
1093
1093
  })), this._startPromise;
1094
1094
  }
1095
+ _load() {
1096
+ return this._loadPromise || (this._loadPromise = this._doLoad(), this._loadPromise.catch(() => {
1097
+ this._loadPromise = void 0;
1098
+ })), this._loadPromise;
1099
+ }
1095
1100
  async _doStart() {
1101
+ await this._load();
1102
+ let e = this._options?.workbook, t = this._modules.getItems(), n = t.length;
1103
+ for (let r = 0; r < n; r++) {
1104
+ let n = t[r];
1105
+ try {
1106
+ let t = n.getFunctions().getItems({
1107
+ type: "autoRun",
1108
+ includeHidden: !0
1109
+ }), r = t.length;
1110
+ for (let n = 0; n < r; n++) await t[n].execute(e);
1111
+ } catch (e) {
1112
+ An.error("Error executing autoRun script:", e);
1113
+ }
1114
+ }
1115
+ }
1116
+ async _doLoad() {
1096
1117
  let e = this._options?.workbook, t = this._options?.json, n = {};
1097
1118
  if (t) {
1098
1119
  let r = Object.keys(t);
1099
1120
  for (let i = 0; i < r.length; i++) {
1100
1121
  let a = r[i], o = t[a];
1101
1122
  try {
1102
- n[a] = await D(a, o, !1, [], o?.scope === "workbook" ? e : null);
1123
+ n[a] = await O(a, o, !1, [], o?.scope === "workbook" ? e : null);
1103
1124
  } catch (e) {
1104
- V.error(`Could not load script '${a}'; it will be unavailable.`, e);
1125
+ An.error(`Could not load script '${a}'; it will be unavailable.`, e);
1105
1126
  }
1106
1127
  }
1107
1128
  }
1108
- let r = this, i = new Ze({
1129
+ let r = this, i = new ze({
1109
1130
  transactions: this._options?.transactions,
1110
1131
  initial: n,
1111
1132
  isReadOnly: () => r.isReadOnly(),
@@ -1117,21 +1138,6 @@ var rr, ir = class {
1117
1138
  }
1118
1139
  });
1119
1140
  this._modules = i;
1120
- let a = i.getItems();
1121
- if (a.length === 0) return Promise.resolve(R.EmptyArray);
1122
- let o = a.length;
1123
- for (let t = 0; t < o; t++) {
1124
- let n = a[t];
1125
- try {
1126
- let t = n.getFunctions().getItems({
1127
- type: "autoRun",
1128
- includeHidden: !0
1129
- }), r = t.length;
1130
- for (let n = 0; n < r; n++) await t[n].execute(e);
1131
- } catch (e) {
1132
- V.error("Error executing autoRun script:", e);
1133
- }
1134
- }
1135
1141
  }
1136
1142
  addListeners(e, t) {
1137
1143
  return this._emitter.addListeners(e, t);
@@ -1148,9 +1154,131 @@ var rr, ir = class {
1148
1154
  get isIScript() {
1149
1155
  return !0;
1150
1156
  }
1151
- }, lr = class {
1157
+ }, Tr = /^([a-z][a-z0-9+.-]*):/i, Er = (e) => {
1158
+ let t = e.toLowerCase();
1159
+ return t.endsWith(":") ? t : t + ":";
1160
+ }, Dr = async (e, t) => {
1161
+ try {
1162
+ return await globalThis.fetch(e, t);
1163
+ } catch (n) {
1164
+ throw n instanceof TypeError && await (async (e, t) => {
1165
+ let n = globalThis.location;
1166
+ if (!n || t?.method && t.method.toUpperCase() !== "GET") return !1;
1167
+ let r = new AbortController(), i = setTimeout(() => r.abort(), 5e3);
1168
+ try {
1169
+ return new URL(e, n.href).origin !== n.origin && (await globalThis.fetch(e, {
1170
+ mode: "no-cors",
1171
+ credentials: "omit",
1172
+ signal: r.signal
1173
+ }), !0);
1174
+ } catch {
1175
+ return !1;
1176
+ } finally {
1177
+ clearTimeout(i), r.abort();
1178
+ }
1179
+ })(e, t) ? new I.Blocked("This site is restricted: it doesn't allow web apps to read its data, so the browser blocked the request for security.", { cause: n }) : n;
1180
+ }
1181
+ }, Or = class {
1182
+ constructor() {
1183
+ this._handlers = /* @__PURE__ */ new Map([["http:", Dr], ["https:", Dr]]);
1184
+ }
1185
+ fetch(e, t) {
1186
+ let n = Tr.exec(e)?.[1], r = this._handlers.get(n ? Er(n) : "https:");
1187
+ if (!r) return Promise.reject(/* @__PURE__ */ TypeError(`No fetcher serves '${n}:'.`));
1188
+ try {
1189
+ return r(e, t);
1190
+ } catch (e) {
1191
+ return Promise.reject(e);
1192
+ }
1193
+ }
1194
+ register(e, t) {
1195
+ let n = Er(e), r = this._handlers.get(n);
1196
+ return this._handlers.set(n, t), () => {
1197
+ this._handlers.get(n) === t && (r ? this._handlers.set(n, r) : this._handlers.delete(n));
1198
+ };
1199
+ }
1200
+ get isIFetcher() {
1201
+ return !0;
1202
+ }
1203
+ }, kr = /* @__PURE__ */ new Set([
1204
+ 101,
1205
+ 103,
1206
+ 204,
1207
+ 205,
1208
+ 304
1209
+ ]), Y = (e) => new Response(kr.has(e.status) ? null : e.body, {
1210
+ status: e.status,
1211
+ statusText: e.statusText,
1212
+ headers: e.headers
1213
+ }), Ar = class {
1214
+ constructor(e, t) {
1215
+ this._kept = /* @__PURE__ */ new Map(), this._cached = /* @__PURE__ */ new Map(), this._inFlight = /* @__PURE__ */ new Map(), this._resources = e, this._fetcher = t;
1216
+ }
1217
+ getFetcher() {
1218
+ return this._fetcher;
1219
+ }
1220
+ async fetch(e, t) {
1221
+ if (((e) => !e || (!e.method || e.method.toUpperCase() === "GET") && !e.body)(t) && t?.cache !== "reload") {
1222
+ let n = this._kept.get(e) ?? this._findHeld(e);
1223
+ if (n && !n.isClosed()) return this._fromKept(n);
1224
+ let r = this._cached.get(e);
1225
+ if (r) return Y(r);
1226
+ let i = this._inFlight.get(e);
1227
+ return i || (i = this._request(e, {
1228
+ ...t,
1229
+ signal: void 0
1230
+ }).finally(() => {
1231
+ this._inFlight.delete(e);
1232
+ }), this._inFlight.set(e, i)), Y(await ((e, t) => t ? t.aborted ? Promise.reject(t.reason) : new Promise((n, r) => {
1233
+ let i = () => r(t.reason);
1234
+ t.addEventListener("abort", i, { once: !0 }), e.then(n, r).finally(() => t.removeEventListener("abort", i));
1235
+ }) : e)(i, t?.signal));
1236
+ }
1237
+ return Y(await this._request(e, t));
1238
+ }
1239
+ adopt(e) {
1240
+ for (let t of e) {
1241
+ let e = t.getFetchedFrom();
1242
+ e && !t.isClosed() && this.keep(e, t);
1243
+ }
1244
+ }
1245
+ keep(e, t) {
1246
+ let n = this._kept.get(e);
1247
+ n !== t && (t.addReference(this), this._kept.set(e, t), n && !n.isClosed() && n.deleteReference(this));
1248
+ }
1249
+ _findHeld(e) {
1250
+ for (let t of this._resources.getItems()) if (t.getFetchedFrom() === e && !t.isClosed()) return this.keep(e, t), t;
1251
+ return null;
1252
+ }
1253
+ async _fromKept(e) {
1254
+ let [t, n] = await Promise.all([e.toBuffer(), e.getType()]);
1255
+ return Y({
1256
+ status: 200,
1257
+ statusText: "OK",
1258
+ headers: n ? [["content-type", n.mime]] : [],
1259
+ body: t
1260
+ });
1261
+ }
1262
+ async _request(e, t) {
1263
+ let n = await this._fetcher.fetch(e, t), r = kr.has(n.status) ? null : await n.arrayBuffer(), i = [];
1264
+ n.headers.forEach((e, t) => {
1265
+ i.push([t, e]);
1266
+ });
1267
+ let a = {
1268
+ status: n.status,
1269
+ statusText: n.statusText,
1270
+ headers: i,
1271
+ body: r
1272
+ };
1273
+ if (n.ok && r && r.byteLength > 0) {
1274
+ let t = await new te({ source: { buffer: r } }).getType();
1275
+ t?.mime.startsWith("image/") ? (a.headers = i.filter(([e]) => e.toLowerCase() !== "content-type"), a.headers.push(["content-type", t.mime])) : this._cached.set(e, a);
1276
+ }
1277
+ return a;
1278
+ }
1279
+ }, jr = class {
1152
1280
  constructor(e, t, n, r) {
1153
- this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = n, this._topLeft = t ?? z.EmptyCell, this._sheet = new A({
1281
+ this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = n, this._topLeft = t ?? z.EmptyCell, this._sheet = new T({
1154
1282
  runtime: e,
1155
1283
  styles: this._styles,
1156
1284
  calcOnLoad: "none",
@@ -1171,32 +1299,32 @@ var rr, ir = class {
1171
1299
  e.includes(r) && delete i[r];
1172
1300
  }
1173
1301
  }
1174
- let a = Yt(i.fontFamily);
1302
+ let a = an(i.fontFamily);
1175
1303
  r.font = {}, a && (r.font.family = a.family, r.font.fallbacks = a.fallbacks, r.font.size = a.size), r.font.size = i.fontSize, r.font.weight = i.fontWeight, r.font.style = i.fontStyle, r.font.color = i.color;
1176
- let o = qt(i.textDecoration);
1177
- r.font.underline = o.underline, r.font.strike = o.strike ? M.StrikeStyle.Single : M.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = on(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = Wt(i.textAlign)), i?.textAlign && !r.alignment.horizontal && i?.textAlign !== "general" && (i.textAlign === "center-across" ? r.alignment.horizontal = N.HorizontalAlignment.CenterContinuous : i.textAlign === "fill" ? r.alignment.horizontal = N.HorizontalAlignment.Fill : i.textAlign === "121" || i.textAlign === "010" ? (r.alignment.horizontal = N.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = i.textAlign === "121") : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && (i.verticalAlign.toLowerCase() === "super" ? r.font.baseline = F.Baseline.Superscript : i.verticalAlign.toLowerCase() === "sub" ? r.font.baseline = F.Baseline.Subscript : r.alignment.vertical = Lt(i.verticalAlign), r.alignment.vertical || (i.verticalAlign === "121" ? r.alignment.vertical = N.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = i.whiteSpace === "no-wrap" || i.whiteSpace === "nowrap" ? N.Overflow.Visible : N.Overflow.Wrap), i.msoTextControl === "shrinktofit" && (r.alignment.overflow = N.Overflow.Shrink);
1304
+ let o = Zt(i.textDecoration);
1305
+ r.font.underline = o.underline, r.font.strike = o.strike ? N.StrikeStyle.Single : N.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = on(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = xn(i.textAlign)), i?.textAlign && !r.alignment.horizontal && i?.textAlign !== "general" && (i.textAlign === "center-across" ? r.alignment.horizontal = P.HorizontalAlignment.CenterContinuous : i.textAlign === "fill" ? r.alignment.horizontal = P.HorizontalAlignment.Fill : i.textAlign === "121" || i.textAlign === "010" ? (r.alignment.horizontal = P.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = i.textAlign === "121") : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && (i.verticalAlign.toLowerCase() === "super" ? r.font.baseline = M.Baseline.Superscript : i.verticalAlign.toLowerCase() === "sub" ? r.font.baseline = M.Baseline.Subscript : r.alignment.vertical = Qt(i.verticalAlign), r.alignment.vertical || (i.verticalAlign === "121" ? r.alignment.vertical = P.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = i.whiteSpace === "no-wrap" || i.whiteSpace === "nowrap" ? P.Overflow.Visible : P.Overflow.Wrap), i.msoTextControl === "shrinktofit" && (r.alignment.overflow = P.Overflow.Shrink);
1178
1306
  let s = null;
1179
1307
  if (i.background ? s = i.background : i.backgroundColor && (s = i.backgroundColor), s && (r.fill = { color: s }), i.msoPattern) {
1180
- let e = Xt(i.msoPattern);
1181
- e && (e.patternType === Qt.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== Qt.BuiltInSheetPattern.None && (s && (e.background = s), r.fill = e));
1308
+ let e = en(i.msoPattern);
1309
+ e && (e.patternType === yn.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== yn.BuiltInSheetPattern.None && (s && (e.background = s), r.fill = e));
1182
1310
  }
1183
- i.layoutFlow === "vertical" || i.layoutFlow === "vertical-ideographic" ? r.alignment.stacked = !0 : i.msoRotate !== void 0 && (r.alignment.rotation = Ht(i.msoRotate));
1311
+ i.layoutFlow === "vertical" || i.layoutFlow === "vertical-ideographic" ? r.alignment.stacked = !0 : i.msoRotate !== void 0 && (r.alignment.rotation = nn(i.msoRotate));
1184
1312
  let c = (e, t) => {
1185
1313
  e && (r.borders ||= {}, r.borders[e] = t);
1186
1314
  };
1187
1315
  i.border && i.border !== "none" && (c("top", i.border), c("left", i.border), c("right", i.border), c("bottom", i.border)), i.borderTop && c("top", i.borderTop), i.borderLeft && c("left", i.borderLeft), i.borderRight && c("right", i.borderRight), i.borderBottom && c("bottom", i.borderBottom), i.msoDiagonalUp && c("diagonalUp", i.msoDiagonalUp), i.msoDiagonalDown && c("diagonalDown", i.msoDiagonalDown);
1188
1316
  let l = r.numberFormat;
1189
- i.msoNumberFormat && (l = nn(i.msoNumberFormat), l.includes("\\") ? l = null : l === "Fixed" ? l = P.Styles.lookupStyle(r.numberFormat).formatType === P.Type.Number ? null : P.Type.Number : l === "Percent" && (l = P.Styles.lookupStyle(r.numberFormat).formatType === P.Type.Percentage ? null : P.Type.Percentage)), l && (r.numberFormat = l), e.style = this._styles.normalize(r), n && Object.keys(e.style).length === 0 && delete e.style;
1317
+ i.msoNumberFormat && (l = cn(i.msoNumberFormat), l.includes("\\") ? l = null : l === "Fixed" ? l = F.Styles.lookupStyle(r.numberFormat).formatType === F.Type.Number ? null : F.Type.Number : l === "Percent" && (l = F.Styles.lookupStyle(r.numberFormat).formatType === F.Type.Percentage ? null : F.Type.Percentage)), l && (r.numberFormat = l), e.style = this._styles.normalize(r), n && Object.keys(e.style).length === 0 && delete e.style;
1190
1318
  }
1191
1319
  onCell(e, t, n, r, i) {
1192
1320
  let a = r(i), o = { value: t === void 0 ? n ?? "" : t };
1193
1321
  if (typeof o.value == "string" && o.value.length === 0 && (o.value = void 0), a && this.applyCSSStyle(o, a), typeof o.value == "string" && /^#+$/.test(o.value)) {
1194
1322
  let e = o.style?.numberFormat;
1195
- e && (Jt(e) || Rt(e)) && (o.value = I.BuiltIn.Num);
1323
+ e && (bn(e) || rn(e)) && (o.value = I.BuiltIn.Num);
1196
1324
  }
1197
1325
  if (i?.tagName.toUpperCase() === "TD") {
1198
1326
  let e = o.style, t = e?.font ?? {};
1199
- (i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = M.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = F.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = F.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = M.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = M.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, o.style = e), e.font || (e.font = t));
1327
+ (i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = N.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = M.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = M.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = N.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = N.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, o.style = e), e.font || (e.font = t));
1200
1328
  let n = i.querySelectorAll("a");
1201
1329
  if (n.length > 0) {
1202
1330
  let e = n[0].getAttribute("href");
@@ -1243,8 +1371,8 @@ var rr, ir = class {
1243
1371
  let i = n(r);
1244
1372
  if (i.msoHeightSource !== "userset" || !r) return;
1245
1373
  let a = r.getAttribute("height") ?? i.height, o = null;
1246
- if (a && (o = Vt(a, this._styles.getNormal().getFont().getSize(), "px")), o === null) for (let e = 0; e < r.cells.length; e++) {
1247
- let t = r.cells[e], i = t.getAttribute("height") ?? n(t).height, a = Vt(i, this._styles.getNormal().getFont().getSize(), "px");
1374
+ if (a && (o = sn(a, this._styles.getNormal().getFont().getSize(), "px")), o === null) for (let e = 0; e < r.cells.length; e++) {
1375
+ let t = r.cells[e], i = t.getAttribute("height") ?? n(t).height, a = sn(i, this._styles.getNormal().getFont().getSize(), "px");
1248
1376
  a !== null && (o = Math.max(a, o ?? 0));
1249
1377
  }
1250
1378
  o !== null && this._rowsReading.push({
@@ -1252,19 +1380,19 @@ var rr, ir = class {
1252
1380
  min: this._topLeft.rowIndex + e,
1253
1381
  max: this._topLeft.rowIndex + e + t - 1
1254
1382
  },
1255
- update: { size: o * M.getDeviceScale() }
1383
+ update: { size: o * N.getDeviceScale() }
1256
1384
  });
1257
1385
  }
1258
1386
  onColumn(e, t, n, r) {
1259
1387
  let i = n(r);
1260
1388
  if (i.msoWidthSource !== "userset" || !r) return;
1261
1389
  let a = r.getAttribute("width") ?? i.width, o = null;
1262
- a && (o = Vt(a, this._styles.getNormal().getFont().getSize(), "px")), o !== null && this._colsReading.push({
1390
+ a && (o = sn(a, this._styles.getNormal().getFont().getSize(), "px")), o !== null && this._colsReading.push({
1263
1391
  address: {
1264
1392
  min: this._topLeft.colIndex + e,
1265
1393
  max: this._topLeft.colIndex + e + t - 1
1266
1394
  },
1267
- update: { size: o * M.getDeviceScale() }
1395
+ update: { size: o * N.getDeviceScale() }
1268
1396
  });
1269
1397
  }
1270
1398
  onDone() {
@@ -1275,9 +1403,9 @@ var rr, ir = class {
1275
1403
  sheet() {
1276
1404
  return this._sheet;
1277
1405
  }
1278
- }, ur = class {
1406
+ }, Mr = class {
1279
1407
  constructor(e) {
1280
- if (!e) throw new hn("snapshot is required.");
1408
+ if (!e) throw new jn("snapshot is required.");
1281
1409
  this._snapshot = e;
1282
1410
  }
1283
1411
  getItemType() {
@@ -1307,9 +1435,9 @@ var rr, ir = class {
1307
1435
  get isClipboardItem() {
1308
1436
  return !0;
1309
1437
  }
1310
- }, dr = class {
1438
+ }, Nr = class {
1311
1439
  constructor(e, t, n, r, i) {
1312
- if (this._parsed = void 0, this._runtime = e, !t) throw new hn("nativeItems are required.");
1440
+ if (this._parsed = void 0, this._runtime = e, !t) throw new jn("nativeItems are required.");
1313
1441
  this._topLeft = n ?? z.EmptyCell, this._native = t, this._markOptions = Object.freeze(r ?? {}), this._styles = i;
1314
1442
  }
1315
1443
  getItemType() {
@@ -1355,15 +1483,15 @@ var rr, ir = class {
1355
1483
  async parse() {
1356
1484
  let e, t = this._native?.text, n = this._native.html;
1357
1485
  if (n === null && t && t.includes("<table")) try {
1358
- let e = new DOMParser().parseFromString(t, mn.Html), r = e.querySelector("parsererror");
1486
+ let e = new DOMParser().parseFromString(t, kn.Html), r = e.querySelector("parsererror");
1359
1487
  if (r) throw new B("Unable to parse: " + r);
1360
1488
  n = e, t = null;
1361
1489
  } catch {
1362
1490
  console.warn("Discovered text as html table but could could not parse.");
1363
1491
  }
1364
1492
  try {
1365
- let r = new lr(this._runtime, this._topLeft, this._styles, n ? "HTML" : "Text"), i = await Promise.resolve(t ? rt(t) : [[]]), a;
1366
- if (yt(n, i, r) ? (e = r.sheet(), a = e.getUsedRange()) : n = null, a) {
1493
+ let r = new jr(this._runtime, this._topLeft, this._styles, n ? "HTML" : "Text"), i = await Promise.resolve(t ? me(t) : [[]]), a;
1494
+ if (se(n, i, r) ? (e = r.sheet(), a = e.getUsedRange()) : n = null, a) {
1367
1495
  let t = a.getSnapshot();
1368
1496
  return this._parsed = {
1369
1497
  prepare: (e, n) => t.prepare?.(e, n),
@@ -1377,23 +1505,24 @@ var rr, ir = class {
1377
1505
  throw e;
1378
1506
  }
1379
1507
  if (!t && !n && this._native.image) {
1380
- let e = await this._native.image.arrayBuffer(), t = null;
1508
+ let e = await this._native.image.arrayBuffer(), t = Dn.getPngStatedSize(e), n = null;
1381
1509
  return this._parsed = {
1382
- async prepare(n) {
1383
- let r = n.getWorksheet();
1384
- t = {
1385
- sheet: r,
1386
- options: await r.getMovables()._preparePicture({ source: { buffer: e } }, {
1510
+ async prepare(r) {
1511
+ let i = r.getWorksheet();
1512
+ n = {
1513
+ sheet: i,
1514
+ options: await i.getMovables()._preparePicture({ source: { buffer: e } }, {
1387
1515
  type: "picture",
1388
- description: W("op.copyImageFromClipboard"),
1389
- autoSelect: !0
1516
+ description: U("op.copyImageFromClipboard"),
1517
+ autoSelect: !0,
1518
+ ...t && { bounds: t }
1390
1519
  })
1391
1520
  };
1392
1521
  },
1393
- copyTo(e, n) {
1522
+ copyTo(e, t) {
1394
1523
  let r = e.getWorksheet();
1395
- if (t?.sheet !== r) throw Error("The image was not prepared for this sheet.");
1396
- return r.getMovables()._insertNow(t.options), null;
1524
+ if (n?.sheet !== r) throw Error("The image was not prepared for this sheet.");
1525
+ return r.getMovables()._insertNow(n.options), null;
1397
1526
  },
1398
1527
  getName: () => "Image"
1399
1528
  }, !0;
@@ -1403,9 +1532,9 @@ var rr, ir = class {
1403
1532
  get isClipboardItem() {
1404
1533
  return !0;
1405
1534
  }
1406
- }, fr = class {
1407
- constructor(t) {
1408
- this._closed = !1, this._kind = t.kind, this._id = t.id, this._part = t.part, this._styles = t.styles, this._tabColor = t.tabColor ? this._styles.parseColor(t.tabColor) : null, this._transactions = t.transactions, this._workbook = t.workbook ?? null, this._container = t.container, this._emitter = new e(this, this._transactions);
1535
+ }, Pr = class {
1536
+ constructor(e) {
1537
+ this._closed = !1, this._kind = e.kind, this._id = e.id, this._part = e.part, this._styles = e.styles, this._tabColor = e.tabColor ? this._styles.parseColor(e.tabColor) : null, this._transactions = e.transactions, this._workbook = e.workbook ?? null, this._container = e.container, this._emitter = new t(this, this._transactions);
1409
1538
  }
1410
1539
  getKind() {
1411
1540
  return this._kind;
@@ -1420,11 +1549,11 @@ var rr, ir = class {
1420
1549
  return this._assertOpen(), this._container.setName(e, t), this;
1421
1550
  }
1422
1551
  getVisibility() {
1423
- return this._closed ? k.Visibility.VeryHidden : this._container.getVisibility();
1552
+ return this._closed ? A.Visibility.VeryHidden : this._container.getVisibility();
1424
1553
  }
1425
1554
  setVisibility(e = !0, t) {
1426
1555
  let n;
1427
- return this._assertOpen(), n = !0 === e ? k.Visibility.Visible : !1 === e ? k.Visibility.Hidden : e, this._container.setVisibility(n, t), this;
1556
+ return this._assertOpen(), n = !0 === e ? A.Visibility.Visible : !1 === e ? A.Visibility.Hidden : e, this._container.setVisibility(n, t), this;
1428
1557
  }
1429
1558
  getIndex() {
1430
1559
  return this._container.getIndex();
@@ -1446,12 +1575,12 @@ var rr, ir = class {
1446
1575
  }
1447
1576
  delete() {
1448
1577
  if (this._closed) return;
1449
- let e = this._transactions.beginCommit({ description: G("op.deleteSheet", { name: this.getName() }) });
1578
+ let e = this._transactions.beginCommit({ description: W("op.deleteSheet", { name: this.getName() }) });
1450
1579
  try {
1451
1580
  try {
1452
1581
  this._notify("onBeforeDelete");
1453
1582
  } catch (e) {
1454
- throw e instanceof Error ? e : new B(e?.message ?? G("error.sheet.modelDelete"));
1583
+ throw e instanceof Error ? e : new B(e?.message ?? W("error.sheet.modelDelete"));
1455
1584
  }
1456
1585
  this._notify("onDelete"), e.commit();
1457
1586
  } catch (t) {
@@ -1477,7 +1606,7 @@ var rr, ir = class {
1477
1606
  this._emitter.notify(e);
1478
1607
  }
1479
1608
  _assertOpen() {
1480
- if (this._closed) throw Error(G("error.sheet.modelClosed"));
1609
+ if (this._closed) throw Error(W("error.sheet.modelClosed"));
1481
1610
  }
1482
1611
  get [Symbol.toStringTag]() {
1483
1612
  return "[OpaqueSheet]";
@@ -1492,12 +1621,12 @@ var rr, ir = class {
1492
1621
  return !0;
1493
1622
  }
1494
1623
  };
1495
- (rr ||= {}).Visibility = {
1624
+ (yr ||= {}).Visibility = {
1496
1625
  Visible: "visible",
1497
1626
  Hidden: "hidden",
1498
1627
  VeryHidden: "veryHidden"
1499
1628
  };
1500
- var X, pr = {
1629
+ var X, Fr = {
1501
1630
  showFormulaBar: !0,
1502
1631
  showTabs: !0,
1503
1632
  tabRatio: 600,
@@ -1508,11 +1637,11 @@ var X, pr = {
1508
1637
  firstTab: 0,
1509
1638
  windowBounds: null,
1510
1639
  minimized: !1,
1511
- visibility: rr.Visibility.Visible,
1640
+ visibility: yr.Visibility.Visible,
1512
1641
  autoFilterDateGrouping: !0
1513
- }, mr = class {
1514
- constructor(t) {
1515
- this._id = R.uuidV4(), this._emitter = new e(this), this._state = { ...pr }, t?.json && this._fromJSON(t?.json);
1642
+ }, Ir = class {
1643
+ constructor(e) {
1644
+ this._id = R.uuidV4(), this._emitter = new t(this), this._state = { ...Fr }, e?.json && this._fromJSON(e?.json);
1516
1645
  }
1517
1646
  getId() {
1518
1647
  return this._id;
@@ -1600,7 +1729,7 @@ var X, pr = {
1600
1729
  let e = {}, t = Object.keys(this._state), n = t.length;
1601
1730
  for (let r = 0; r < n; r++) {
1602
1731
  let n = t[r], i = this._state[n];
1603
- i != null && i !== pr[n] && (e[n] = i);
1732
+ i != null && i !== Fr[n] && (e[n] = i);
1604
1733
  }
1605
1734
  return Object.keys(e).length === 0 && (e = null), e;
1606
1735
  }
@@ -1610,7 +1739,7 @@ var X, pr = {
1610
1739
  }
1611
1740
  update(e, t = !0) {
1612
1741
  this._state = {
1613
- ...pr,
1742
+ ...Fr,
1614
1743
  ...this._state,
1615
1744
  ...e
1616
1745
  }, t && this._emitter.notify("onViewChange");
@@ -1625,13 +1754,13 @@ var X, pr = {
1625
1754
  get isIWorkbookView() {
1626
1755
  return !0;
1627
1756
  }
1628
- }, hr = Object.freeze({
1757
+ }, Lr = Object.freeze({
1629
1758
  structure: !1,
1630
1759
  windows: !1,
1631
1760
  revision: !0,
1632
1761
  password: null,
1633
1762
  revisionsPassword: null
1634
- }), gr = class extends kt {
1763
+ }), Rr = class extends Pe {
1635
1764
  isWindowsAllowed() {
1636
1765
  return this._isPropertyAllowed("windows");
1637
1766
  }
@@ -1653,7 +1782,7 @@ var X, pr = {
1653
1782
  let n = Object.keys(t), r = n.length;
1654
1783
  for (let i = 0; i < r; i++) {
1655
1784
  let r = n[i], a = t[r];
1656
- a != null && a !== hr[r] && (e[r] = a);
1785
+ a != null && a !== Lr[r] && (e[r] = a);
1657
1786
  }
1658
1787
  }
1659
1788
  return super._toJSON(e);
@@ -1672,7 +1801,7 @@ var X, pr = {
1672
1801
  String: "string",
1673
1802
  Float: "float"
1674
1803
  };
1675
- var _r = (e) => {
1804
+ var zr = (e) => {
1676
1805
  if (typeof e == "string") return {
1677
1806
  type: X.Type.String,
1678
1807
  value: e
@@ -1696,7 +1825,7 @@ var _r = (e) => {
1696
1825
  };
1697
1826
  }
1698
1827
  throw Error("A custom property value must be a string, number, boolean or Date.");
1699
- }, vr = class {
1828
+ }, Br = class {
1700
1829
  constructor(e, t) {
1701
1830
  this._json = e, this._owner = t;
1702
1831
  }
@@ -1716,7 +1845,7 @@ var _r = (e) => {
1716
1845
  setValue(e) {
1717
1846
  this._owner._assertCustomEditable(this), this._json = {
1718
1847
  ...this._json,
1719
- ..._r(e)
1848
+ ...zr(e)
1720
1849
  };
1721
1850
  }
1722
1851
  delete() {
@@ -1725,7 +1854,7 @@ var _r = (e) => {
1725
1854
  toJSON() {
1726
1855
  return { ...this._json };
1727
1856
  }
1728
- }, yr = class {
1857
+ }, Vr = class {
1729
1858
  constructor(e) {
1730
1859
  this._json = {}, this._custom = [], this._assertOpen = e;
1731
1860
  }
@@ -1815,9 +1944,9 @@ var _r = (e) => {
1815
1944
  if (this._assertOpen(), typeof e != "string" || e === "") throw Error("A custom property needs a name.");
1816
1945
  let n = this.getCustomProperty(e);
1817
1946
  if (n) return n.setValue(t), n;
1818
- let r = new vr({
1947
+ let r = new Br({
1819
1948
  key: e,
1820
- ..._r(t)
1949
+ ...zr(t)
1821
1950
  }, this);
1822
1951
  return this._custom.push(r), r;
1823
1952
  }
@@ -1832,26 +1961,26 @@ var _r = (e) => {
1832
1961
  }
1833
1962
  fromJSON(e) {
1834
1963
  let { custom: t, ...n } = e ?? {};
1835
- this._json = n, this._custom = (t ?? []).map((e) => new vr({ ...e }, this));
1964
+ this._json = n, this._custom = (t ?? []).map((e) => new Br({ ...e }, this));
1836
1965
  }
1837
1966
  toJSON() {
1838
1967
  let e = { ...this._json };
1839
1968
  return this._custom.length > 0 && (e.custom = this._custom.map((e) => e.toJSON())), e;
1840
1969
  }
1841
1970
  };
1842
- function br(e) {
1843
- return G("error.workbook.invalidSheetKey", { key: e });
1971
+ function Hr(e) {
1972
+ return W("error.workbook.invalidSheetKey", { key: e });
1844
1973
  }
1845
- function xr(e) {
1846
- return G("error.workbook.sheetNameNotFound", { sheetName: e });
1974
+ function Ur(e) {
1975
+ return W("error.workbook.sheetNameNotFound", { sheetName: e });
1847
1976
  }
1848
- function Sr(e, t) {
1849
- return G(t === "chart" ? "error.workbook.sheetIsChart" : t === "macro" ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
1977
+ function Wr(e, t) {
1978
+ return W(t === "chart" ? "error.workbook.sheetIsChart" : t === "macro" ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
1850
1979
  }
1851
- function Cr(e, t) {
1852
- return t === "chart" ? G("error.workbook.selectedIsChart", { sheetName: e }) : t === "macro" ? G("error.workbook.selectedIsMacro", { sheetName: e }) : t === "dialog" ? G("error.workbook.selectedIsDialog", { sheetName: e }) : G("error.workbook.noWorksheet");
1980
+ function Gr(e, t) {
1981
+ return t === "chart" ? W("error.workbook.selectedIsChart", { sheetName: e }) : t === "macro" ? W("error.workbook.selectedIsMacro", { sheetName: e }) : t === "dialog" ? W("error.workbook.selectedIsDialog", { sheetName: e }) : W("error.workbook.noWorksheet");
1853
1982
  }
1854
- var wr = class extends ke {
1983
+ var Kr = class extends $e {
1855
1984
  constructor(e, t, n, r) {
1856
1985
  super(), this._add = e, this._get = t, this._addListeners = n, this._getSelected = r;
1857
1986
  }
@@ -1882,39 +2011,39 @@ var wr = class extends ke {
1882
2011
  get isIWorksheetCollection() {
1883
2012
  return !0;
1884
2013
  }
1885
- }, Tr = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), Er = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
1886
- function Dr(e) {
1887
- let t = G(W("workbook.defaultSheetName"), { n: e + 1 });
2014
+ }, qr = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), Jr = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
2015
+ function Yr(e) {
2016
+ let t = W(U("workbook.defaultSheetName"), { n: e + 1 });
1888
2017
  return t === "workbook.defaultSheetName" ? `Sheet${e + 1}` : t;
1889
2018
  }
1890
- function Or(e, t) {
2019
+ function Xr(e, t) {
1891
2020
  return {
1892
- ...At,
2021
+ ...Fe,
1893
2022
  getWorksheet: () => null,
1894
- toString: () => ye(e, t)
2023
+ toString: () => At(e, t)
1895
2024
  };
1896
2025
  }
1897
- function kr(e, t = !1) {
1898
- if (!e) throw Error(G("error.workbook.sheetNameBlank"));
1899
- if (Tr.test(e)) {
2026
+ function Zr(e, t = !1) {
2027
+ if (!e) throw Error(W("error.workbook.sheetNameBlank"));
2028
+ if (qr.test(e)) {
1900
2029
  if (!t) throw Error(function(e) {
1901
- return e ? G("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : G("error.workbook.sheetNameInvalidChars");
2030
+ return e ? W("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : W("error.workbook.sheetNameInvalidChars");
1902
2031
  }(e));
1903
- e = e.replace(Tr, "");
2032
+ e = e.replace(qr, "");
1904
2033
  }
1905
- if (e.length === 0) throw Error(G("error.workbook.sheetNameBlank"));
2034
+ if (e.length === 0) throw Error(W("error.workbook.sheetNameBlank"));
1906
2035
  let n = e.length;
1907
2036
  if (n > 31) {
1908
- if (!t) throw Error(G("error.workbook.sheetNameTooLong"));
2037
+ if (!t) throw Error(W("error.workbook.sheetNameTooLong"));
1909
2038
  e = e.substring(0, 31);
1910
2039
  }
1911
2040
  if (e.charAt(0) === "'" || e.charAt(n - 1) === "'") {
1912
- if (!t) throw Error(G("error.workbook.sheetNameQuotes"));
2041
+ if (!t) throw Error(W("error.workbook.sheetNameQuotes"));
1913
2042
  e = e.replace(/^'|'$/g, "");
1914
2043
  }
1915
2044
  return e;
1916
2045
  }
1917
- var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2046
+ var Qr, $r = "workbook.activeSheet", ei = class e extends zt {
1918
2047
  constructor(e, t, n, r) {
1919
2048
  super(e, t, r), this._workbook = n;
1920
2049
  }
@@ -1925,24 +2054,24 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
1925
2054
  let r = this._options;
1926
2055
  return n && (r = {
1927
2056
  ...this._options,
1928
- getOptions: T(this._options?.getOptions, n)
2057
+ getOptions: j(this._options?.getOptions, n)
1929
2058
  }), new e(t, this._internal, this._workbook, r);
1930
2059
  }
1931
2060
  _createRange(e, t) {
1932
- let n = e ? { ...e } : null, r = this._workbook, i = n ? r._getSheetRef(n.scope, k.Visibility.VeryHidden) : null;
1933
- if (i && !i.sheet.isIWorksheet) throw new B(Sr(i.name, i.sheet.getKind()));
2061
+ let n = e ? { ...e } : null, r = this._workbook, i = n ? r._getSheetRef(n.scope, A.Visibility.VeryHidden) : null;
2062
+ if (i && !i.sheet.isIWorksheet) throw new B(Wr(i.name, i.sheet.getKind()));
1934
2063
  if (!i) {
1935
2064
  let e = r._anchorWorksheet();
1936
- return delete n?.scope, Or(n, n ? {
1937
- scope: g,
2065
+ return delete n?.scope, Xr(n, n ? {
2066
+ scope: Je,
1938
2067
  ...e.getEntireRange().getCoords()
1939
2068
  } : null);
1940
2069
  }
1941
2070
  let a = this._options;
1942
2071
  return t && (a = {
1943
2072
  ...this._options,
1944
- getOptions: T(this._options.getOptions, t)
1945
- }), new Nr(e, j(i.sheet), this._workbook, a);
2073
+ getOptions: j(this._options.getOptions, t)
2074
+ }), new ti(e, D(i.sheet), this._workbook, a);
1946
2075
  }
1947
2076
  async select(e) {
1948
2077
  let t = [], n = null, r = this.getCoords();
@@ -1966,15 +2095,15 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
1966
2095
  }
1967
2096
  getAddress(e) {
1968
2097
  let t = this._internal.getSheet(), n = t.getEntireRange().getCoords();
1969
- return xe(this.getCoords(), {
2098
+ return Pt(this.getCoords(), {
1970
2099
  ...n,
1971
2100
  scope: t.getName()
1972
- }, ye, Ee, e);
2101
+ }, At, it, e);
1973
2102
  }
1974
2103
  toString() {
1975
2104
  return this.getAddress();
1976
2105
  }
1977
- }, Nr = class e extends st {
2106
+ }, ti = class e extends ne {
1978
2107
  constructor(e, t, n, r) {
1979
2108
  super(e, t, r), this._workbook = n;
1980
2109
  }
@@ -1982,17 +2111,17 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
1982
2111
  let n = this._options;
1983
2112
  return t && (n = {
1984
2113
  ...this._options,
1985
- getOptions: T(this._options?.getOptions, t)
1986
- }), new Mr(e, this._internal, this._workbook, n);
2114
+ getOptions: j(this._options?.getOptions, t)
2115
+ }), new ei(e, this._internal, this._workbook, n);
1987
2116
  }
1988
2117
  _createRange(t, n) {
1989
2118
  let r = this._internal;
1990
- if (!t) return Tt(r.getSheet(), r.getSheet().getEntireCoords());
1991
- if (r.validateCoords(t), r.getSheet().isClosed()) return Tt(null, r.getSheet().getEntireCoords(), t);
2119
+ if (!t) return Wt(r.getSheet(), r.getSheet().getEntireCoords());
2120
+ if (r.validateCoords(t), r.getSheet().isClosed()) return Wt(null, r.getSheet().getEntireCoords(), t);
1992
2121
  let i = this._options;
1993
2122
  return n && (i = {
1994
2123
  ...this._options,
1995
- getOptions: T(this._options?.getOptions, n)
2124
+ getOptions: j(this._options?.getOptions, n)
1996
2125
  }), new e(t, this._internal, this._workbook, i);
1997
2126
  }
1998
2127
  addListener(e, t) {
@@ -2005,7 +2134,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2005
2134
  }
2006
2135
  getAddress(e) {
2007
2136
  let t = this._internal.getSheet(), n = t?.getEntireRange().getCoords() ?? null;
2008
- return ye(this.getCoords(), {
2137
+ return At(this.getCoords(), {
2009
2138
  ...n,
2010
2139
  scope: t.getName()
2011
2140
  });
@@ -2013,13 +2142,13 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2013
2142
  toString() {
2014
2143
  return this.getAddress();
2015
2144
  }
2016
- }, Pr = (e) => !!e && typeof e == "object" && typeof e.getOrigin == "function", Fr = class {
2017
- constructor(t) {
2018
- this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new we(() => {
2145
+ }, ni = (e) => !!e && typeof e == "object" && typeof e.getOrigin == "function", ri = class {
2146
+ constructor(n) {
2147
+ this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new Xe(() => {
2019
2148
  let e = [];
2020
2149
  for (let t of this.getWorksheets()) e.push(...t.getPivotTables());
2021
2150
  return e;
2022
- }), this._people = new or(), this._commentCollection = new ht(null, (e, t, n) => {
2151
+ }), this._people = new Sr(), this._commentCollection = new p(null, (e, t, n) => {
2023
2152
  let r = [];
2024
2153
  for (let i of this.getWorksheets()) r.push(...i.getComments().getItems(e ? {
2025
2154
  address: e,
@@ -2032,125 +2161,126 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2032
2161
  return r;
2033
2162
  }, (e, t) => this.addListeners({ onSheetsChange: e.onCollectionChange ? () => {
2034
2163
  e.onCollectionChange(this._commentCollection);
2035
- } : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._documentProperties = new yr(() => {
2036
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2037
- }), this._locale = null, this._localeOverrides = null;
2038
- let n = typeof t == "string" ? { origin: t } : { ...t }, r = n.origin;
2039
- this._ownOriginProvider = !Pr(r), this._originProvider = Pr(r) ? r : new Dn(typeof r == "string" ? new K(null, { name: r }) : r ?? new K(null)), delete n.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
2040
- let a = n.json;
2041
- delete n.json, this._transactions = n.transactions ?? new i(), this._id = this._transactions.create(), this._ownTransactions = !n.transactions, this._emitter = new e(this, this._transactions), this._runtime = n.runtime ?? new s("Workbook Runtime", {
2164
+ } : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._documentProperties = new Vr(() => {
2165
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2166
+ }), this._locale = null, this._localeOverrides = null, this._startModules = /* @__PURE__ */ new WeakSet();
2167
+ let r = typeof n == "string" ? { origin: n } : { ...n }, i = r.origin;
2168
+ this._ownOriginProvider = !ni(i), this._originProvider = ni(i) ? i : new Un(typeof i == "string" ? new G(null, { name: i }) : i ?? new G(null)), delete r.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
2169
+ let o = r.json;
2170
+ delete r.json, this._transactions = r.transactions ?? new a(), this._id = this._transactions.create(), this._ownTransactions = !r.transactions, this._emitter = new t(this, this._transactions), this._runtime = r.runtime ?? new bt("Workbook Runtime", {
2042
2171
  isDate1904: () => this._isDate1904,
2043
2172
  getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
2044
- getLocale: () => this._locale ?? b() ?? be(),
2173
+ getLocale: () => this._locale ?? rt() ?? It(),
2045
2174
  getLocaleOverrides: () => this._localeOverrides
2046
- }), this._listenerLanguage = fn.addChangeListener(() => {
2175
+ }), this._listenerLanguage = En.addChangeListener(() => {
2047
2176
  this._closed || this._notifyAllChange();
2048
2177
  });
2049
- let o = this, c = this._beginCommit({ description: W(a ? "op.openWorkbook" : "op.newWorkbook") });
2178
+ let s = this, c = this._beginCommit({ description: U(o ? "op.openWorkbook" : "op.newWorkbook") });
2050
2179
  try {
2051
- this._strings = n.strings ?? new Nt(), this._ownStrings = !n.strings, this._resources = n.resources ?? new Le(), this._ownResources = !n.resources, this._createSheetName = n.createSheetNameCallback ?? Dr;
2052
- let e = n.createWorksheetCallback;
2053
- e ||= (e) => new A(e), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (t, n, r, i, a, s, c) => {
2180
+ this._strings = r.strings ?? new Ce(), this._ownStrings = !r.strings, this._richValues = r.richData ?? new Ot(), this._resources = r.resources ?? new ke(), this._ownResources = !r.resources, this._fetch = new Ar(this._resources, r.fetcher ?? new Or()), this._createSheetName = r.createSheetNameCallback ?? Yr;
2181
+ let t = r.createWorksheetCallback;
2182
+ t ||= (e) => new T(e), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (e, n, r, i, a, o, c) => {
2054
2183
  let l = null, u = {
2055
- runtime: o._runtime,
2056
- readonly: o._options.readonly ?? !1,
2057
- disableLoadAutoFit: o._options.disableLoadAutoFit ?? !1,
2058
- opener: o._options.opener,
2059
- transactions: o._transactions,
2060
- styles: o._styles,
2061
- strings: o._strings,
2062
- resources: o._resources,
2063
- names: o._names,
2064
- workbook: o,
2065
- calculation: o._calculation,
2066
- resolveRange: (e) => o._options.resolveRange?.(e) ?? o.getRange(e),
2184
+ runtime: s._runtime,
2185
+ readonly: s._options.readonly ?? !1,
2186
+ disableLoadAutoFit: s._options.disableLoadAutoFit ?? !1,
2187
+ opener: s._options.opener,
2188
+ transactions: s._transactions,
2189
+ styles: s._styles,
2190
+ strings: s._strings,
2191
+ richData: s._richValues,
2192
+ resources: s._resources,
2193
+ names: s._names,
2194
+ workbook: s,
2195
+ calculation: s._calculation,
2196
+ resolveRange: (e) => s._options.resolveRange?.(e) ?? s.getRange(e),
2067
2197
  container: {
2068
- beforeFromJSON: (e) => {
2069
- l = e, o._addSheetRef({
2198
+ beforeFromJSON: (t) => {
2199
+ l = t, s._addSheetRef({
2070
2200
  name: n,
2071
- id: t,
2072
- visibility: r ?? k.Visibility.Visible,
2201
+ id: e,
2202
+ visibility: r ?? A.Visibility.Visible,
2073
2203
  sheetId: a,
2074
- sheet: e
2204
+ sheet: t
2075
2205
  }, i);
2076
2206
  },
2077
2207
  getName: () => {
2078
- let e = o._getSheetRef(l);
2208
+ let e = s._getSheetRef(l);
2079
2209
  return e ? e.name : n;
2080
2210
  },
2081
2211
  setName: (e, t) => {
2082
- o._getSheetRef(l) && o._setSheetName(l, e, t);
2212
+ s._getSheetRef(l) && s._setSheetName(l, e, t);
2083
2213
  },
2084
- setNameChangeCallback: (e) => {
2085
- o._sheetOnNameChange.set(t, e);
2214
+ setNameChangeCallback: (t) => {
2215
+ s._sheetOnNameChange.set(e, t);
2086
2216
  },
2087
2217
  getVisibility: () => {
2088
- let e = o._getSheetRef(l);
2089
- return e ? e.visibility : k.Visibility.Visible;
2218
+ let e = s._getSheetRef(l);
2219
+ return e ? e.visibility : A.Visibility.Visible;
2090
2220
  },
2091
2221
  setVisibility: (e, t) => {
2092
- o._setSheetVisibility(l, e, t);
2222
+ s._setSheetVisibility(l, e, t);
2093
2223
  },
2094
- setVisibilityCallback: (e) => {
2095
- o._sheetOnVisibilityChange.set(t, e);
2224
+ setVisibilityCallback: (t) => {
2225
+ s._sheetOnVisibilityChange.set(e, t);
2096
2226
  },
2097
- duplicate: () => o._duplicateSheet(l),
2227
+ duplicate: () => s._duplicateSheet(l),
2098
2228
  getIndex: () => {
2099
- let e = o._getSheetRef(l);
2100
- return e ? o._getOffsetForId(e.id, o._getSheetRefs(k.Visibility.VeryHidden)) : i;
2229
+ let e = s._getSheetRef(l);
2230
+ return e ? s._getOffsetForId(e.id, s._getSheetRefs(A.Visibility.VeryHidden)) : i;
2101
2231
  },
2102
2232
  setIndex: (e, t) => {
2103
- let n = o._getSheetRef(l, k.Visibility.VeryHidden);
2104
- return !!n && (o._moveSheet(n, e, t), !0);
2233
+ let n = s._getSheetRef(l, A.Visibility.VeryHidden);
2234
+ return !!n && (s._moveSheet(n, e, t), !0);
2105
2235
  },
2106
- setIndexCallback: (e) => {
2107
- o._sheetOnIndexChange.set(t, e);
2236
+ setIndexCallback: (t) => {
2237
+ s._sheetOnIndexChange.set(e, t);
2108
2238
  },
2109
- requestSelect: () => o._requestSelect(l)
2239
+ requestSelect: () => s._requestSelect(l)
2110
2240
  }
2111
2241
  };
2112
- return s && (u.json = s), c !== void 0 && (u.uid = () => c), l = e(u, n, i, r), l;
2113
- }, this._namedTableSource = new Me({
2114
- getSheets: () => o._sheets ? o.getWorksheets().getItems() : R.EmptyArray,
2115
- addSheetsListener: (e, t) => o.addListeners({ onSheetsChange: e }, t)
2116
- }), this._names = n.names ?? new De({
2117
- addressToRanges: (e) => o.getRanges(e),
2118
- getCurrentScope: () => o.getSelectedWorksheet()?.getName() ?? null,
2119
- isReadOnly: () => (o._options.readonly ?? !1) || o._isStructureProtected(),
2120
- transactions: o._transactions,
2121
- getSources: () => o._calculation ? [o._calculation.getNamedFormulas(), o._namedTableSource] : R.EmptyArray
2122
- }), this._ownNames = !n.names, this._calculation = n.calculation ?? new m({
2123
- runtime: o._runtime,
2124
- functions: n.functions,
2125
- json: a?.calc,
2126
- isNamesReadOnly: () => o._isStructureProtected(),
2242
+ return o && (u.json = o), c !== void 0 && (u.uid = () => c), l = t(u, n, i, r), l;
2243
+ }, this._namedTableSource = new ht({
2244
+ getSheets: () => s._sheets ? s.getWorksheets().getItems() : R.EmptyArray,
2245
+ addSheetsListener: (e, t) => s.addListeners({ onSheetsChange: e }, t)
2246
+ }), this._names = r.names ?? new jt({
2247
+ addressToRanges: (e) => s.getRanges(e),
2248
+ getCurrentScope: () => s.getSelectedWorksheet()?.getName() ?? null,
2249
+ isReadOnly: () => (s._options.readonly ?? !1) || s._isStructureProtected(),
2250
+ transactions: s._transactions,
2251
+ getSources: () => s._calculation ? [s._calculation.getNamedFormulas(), s._namedTableSource] : R.EmptyArray
2252
+ }), this._ownNames = !r.names, this._calculation = r.calculation ?? new we({
2253
+ runtime: s._runtime,
2254
+ functions: r.functions,
2255
+ json: o?.calc,
2256
+ isNamesReadOnly: () => s._isStructureProtected(),
2127
2257
  getActiveCell: () => {
2128
- let e = o.getSelectedWorksheet(), t = e?.getSelectedRange()?.getCoords();
2258
+ let e = s.getSelectedWorksheet(), t = e?.getSelectedRange()?.getCoords();
2129
2259
  return e && t ? {
2130
2260
  rowIndex: t.rowStart,
2131
2261
  colIndex: t.colStart,
2132
2262
  scope: e.getId()
2133
2263
  } : null;
2134
2264
  },
2135
- getRange: o.getRange.bind(o),
2136
- getRanges: o.getRanges.bind(o),
2137
- createGraphRanges: (e, t) => o._createGraphRanges(e, t),
2265
+ getRange: s.getRange.bind(s),
2266
+ getRanges: s.getRanges.bind(s),
2267
+ createGraphRanges: (e, t) => s._createGraphRanges(e, t),
2138
2268
  getSheetIndex: (e) => {
2139
2269
  if (e === void 0) {
2140
- let e = o.getSelectedSheet();
2141
- return e ? this._getSheetRefs(k.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
2270
+ let e = s.getSelectedSheet();
2271
+ return e ? this._getSheetRefs(A.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
2142
2272
  }
2143
- let t = this._getSheetRefs(k.Visibility.VeryHidden);
2273
+ let t = this._getSheetRefs(A.Visibility.VeryHidden);
2144
2274
  e = e.toLowerCase();
2145
2275
  let n = t.length;
2146
2276
  for (let r = 0; r < n; r++) if (t[r].name.toLowerCase() === e) return r;
2147
2277
  try {
2148
- Ir.address = e;
2149
- let t = this._names.getItems(Ir);
2278
+ ii.address = e;
2279
+ let t = this._names.getItems(ii);
2150
2280
  if (!t || t.length === 0) return -1;
2151
2281
  let n = t[0].getRanges?.()?.getCoords()?.[0]?.scope;
2152
2282
  if (!n) return -1;
2153
- let r = this._getSheetRefs(k.Visibility.VeryHidden);
2283
+ let r = this._getSheetRefs(A.Visibility.VeryHidden);
2154
2284
  n = n.toLowerCase();
2155
2285
  let i = r.length;
2156
2286
  for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === n) return e;
@@ -2159,32 +2289,56 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2159
2289
  }
2160
2290
  return -1;
2161
2291
  },
2162
- getSheetCount: () => o._getSheetRefs(k.Visibility.VeryHidden).length,
2163
- externalBooks: a?.externalBooks,
2164
- externalBookResolver: n.externalBookResolver,
2165
- namedCollection: o._names,
2166
- strings: o._strings,
2167
- transactions: o._transactions,
2168
- names: a?.names
2169
- }), this._ownCalculation = !n.calculation, this._scripts = this._createScripts(a?.modules), this._ownNames = !n.names, this._options = Object.freeze({ ...n });
2170
- let t = a?.sheets?.length ? a.sheets.map((e) => e.name) : [this._createSheetName(0)], r = t.map((e) => e + "-" + R.uuidV4()), i = (e) => {
2171
- let t = a?.sheets?.[e]?.kind;
2172
- return !!t && t !== k.Kind.Worksheet;
2292
+ getSheetCount: () => s._getSheetRefs(A.Visibility.VeryHidden).length,
2293
+ externalBooks: o?.externalBooks,
2294
+ externalBookResolver: r.externalBookResolver,
2295
+ namedCollection: s._names,
2296
+ strings: s._strings,
2297
+ get resources() {
2298
+ return s._resources;
2299
+ },
2300
+ fetch: (e, t) => s._fetch.fetch(e, t),
2301
+ parseText: (t, n) => (async (t, n, r) => {
2302
+ let i = await import("./CLkBe-6n-pStQhnz.mjs").then((t) => e(t.default, 1)), a = (i.default ?? i).parse(n, {
2303
+ delimiter: r?.delimiter ?? ",",
2304
+ skipEmptyLines: !1
2305
+ }).data, o = a.length, s = a[o - 1];
2306
+ s && s.length === 1 && s[0] === "" && o--;
2307
+ let c = 0;
2308
+ for (let e = 0; e < o; e++) a[e].length > c && (c = a[e].length);
2309
+ let l = Array(o);
2310
+ for (let e = 0; e < o; e++) {
2311
+ let n = a[e], r = Array(c);
2312
+ for (let e = 0; e < c; e++) {
2313
+ let i = n[e];
2314
+ r[e] = i === void 0 || i === "" ? null : Lt(t, i).value;
2315
+ }
2316
+ l[e] = r;
2317
+ }
2318
+ return l;
2319
+ })(s._runtime, t, n),
2320
+ startFunctions: () => s._startFunctions(),
2321
+ transactions: s._transactions,
2322
+ names: o?.names
2323
+ }), this._ownCalculation = !r.calculation, this._scripts = this._createScripts(o?.modules), this._ownNames = !r.names, this._options = Object.freeze({ ...r });
2324
+ let n = o?.sheets?.length ? o.sheets.map((e) => e.name) : [this._createSheetName(0)], i = n.map((e) => e + "-" + R.uuidV4()), a = (e) => {
2325
+ let t = o?.sheets?.[e]?.kind;
2326
+ return !!t && t !== A.Kind.Worksheet;
2173
2327
  };
2174
- this._calculation._setSheets(t.map((e, t) => i(t) ? [
2175
- r[t],
2328
+ this._calculation._setSheets(n.map((e, t) => a(t) ? [
2329
+ i[t],
2176
2330
  e,
2177
2331
  !0
2178
- ] : [r[t], e]));
2179
- let s = n.calcOnLoad ?? "auto", l = !1, u = (async () => {
2332
+ ] : [i[t], e]));
2333
+ let l = r.calcOnLoad ?? "auto", u = !1, d = (async () => {
2180
2334
  try {
2181
- if (this._ownCalculation && s !== "none" && (s === "full" || s === "auto" && !0 === a?.calc?.fullCalcOnLoad ? await this._calculation.calculate({ full: !0 }) : await this._calculation.start(), this._closed)) return;
2335
+ if (this._ownCalculation && l !== "none" && (l === "full" || l === "auto" && !0 === o?.calc?.fullCalcOnLoad ? await this._calculation._calculateForLoad() : await this._calculation.start(), this._closed)) return;
2182
2336
  await this._scripts.start();
2183
2337
  } finally {
2184
- l = !0, this._starting = null;
2338
+ u = !0, this._starting = null;
2185
2339
  }
2186
2340
  })();
2187
- l || (this._starting = u), this._starting?.catch(() => {}), a ? this._fromJSON(a, r) : (this._initState(), this._addSheet(!1, t[0], null, r[0])), this._sheets = new wr((e) => o._addSheetOptions(e), (e, t) => {
2341
+ u || (this._starting = d), this._starting?.catch(() => {}), o ? this._fromJSON(o, i) : (this._initState(), this._addSheet(!1, n[0], null, i[0])), this._sheets = new Kr((e) => s._addSheetOptions(e), (e, t) => {
2188
2342
  if (e) {
2189
2343
  let n = this._getSheetRef(e, t);
2190
2344
  return n && Z(n) ? [n.sheet] : R.EmptyArray;
@@ -2192,15 +2346,15 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2192
2346
  return this._getWorksheets(t);
2193
2347
  }, (e, t) => {
2194
2348
  let n = e.onCollectionChange, r = e.onInvalidated;
2195
- return o._emitter.addListeners({
2349
+ return s._emitter.addListeners({
2196
2350
  onSheetsChange: n ? () => {
2197
- n(o._sheets);
2351
+ n(s._sheets);
2198
2352
  } : void 0,
2199
2353
  onInvalidated: r ? () => {
2200
- r(o._sheets);
2354
+ r(s._sheets);
2201
2355
  } : void 0
2202
2356
  }, t);
2203
- }, () => o.getSelectedWorksheet()), this._ownCalculation && (n.calcOnLoad ?? "auto") !== "none" && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ? c.amend() : c.commit();
2357
+ }, () => s.getSelectedWorksheet()), this._ownCalculation && (r.calcOnLoad ?? "auto") !== "none" && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ? c.amend() : c.commit();
2204
2358
  } catch (e) {
2205
2359
  throw c.rollback(), e;
2206
2360
  }
@@ -2210,13 +2364,13 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2210
2364
  let e = this._getSheetRefs();
2211
2365
  for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
2212
2366
  let t = this._options;
2213
- this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new oe().getDefaultTheme(), this._styles = t?.styles ?? new _e(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new mr()), this._listenerProtection?.(), this._protection = new gr(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
2367
+ this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new Dt().getDefaultTheme(), this._styles = t?.styles ?? new Jt(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new Ir()), this._listenerProtection?.(), this._protection = new Rr(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
2214
2368
  n._emitter.notify("onProtectionChange");
2215
2369
  } });
2216
2370
  let n = this;
2217
2371
  this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
2218
2372
  async onAfterStateChange(e, t, r, i, a) {
2219
- let o = n._view, s = a?.[jr], c = r ? s?.before : s?.after, l = s?.viewId === o.getId() && c != null, u = l ? c : o.getActiveSheetId(), d = l && t.getId() === n._lastTransactionUUID ? n._getSheetRef({ id: u }) : null;
2373
+ let o = n._view, s = a?.[$r], c = r ? s?.before : s?.after, l = s?.viewId === o.getId() && c != null, u = l ? c : o.getActiveSheetId(), d = l && t.getId() === n._lastTransactionUUID ? n._getSheetRef({ id: u }) : null;
2220
2374
  d ? await d.sheet.select() : n._resyncActiveSheet(u, e), n._lastTransactionUUID = t.getId(), (r || i) && n._emitter.notify("onSheetsChange"), n._emitter.notify("onSelectedSheetChange"), n._emitter.notify("onViewChange");
2221
2375
  },
2222
2376
  onRestoreOrRevert() {
@@ -2271,8 +2425,8 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2271
2425
  return this._view;
2272
2426
  }
2273
2427
  setView(e) {
2274
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2275
- if (!e) throw new B(G("error.sheet.emptyView"));
2428
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2429
+ if (!e) throw new B(W("error.sheet.emptyView"));
2276
2430
  this._listenerWorkbookView?.();
2277
2431
  let t = this, n = -1;
2278
2432
  return this._listenerWorkbookView = e.addListeners({ onViewChange: (e) => {
@@ -2284,7 +2438,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2284
2438
  return this._runtime;
2285
2439
  }
2286
2440
  setDate1904(e) {
2287
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2441
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2288
2442
  return this._isDate1904 === e || (this._isDate1904 = e, this._emitter.notify("onRegionalChange")), this;
2289
2443
  }
2290
2444
  getLocale() {
@@ -2294,11 +2448,11 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2294
2448
  return this._locale;
2295
2449
  }
2296
2450
  setLocale(e) {
2297
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2451
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2298
2452
  if (e) try {
2299
2453
  new Intl.Locale(e);
2300
2454
  } catch {
2301
- throw Error(G("error.workbook.invalidLocale", { locale: e }));
2455
+ throw Error(W("error.workbook.invalidLocale", { locale: e }));
2302
2456
  }
2303
2457
  return this._locale === e || (this._locale = e, this._emitter.notify("onRegionalChange")), this;
2304
2458
  }
@@ -2306,7 +2460,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2306
2460
  return this._localeOverrides;
2307
2461
  }
2308
2462
  setLocaleOverrides(e) {
2309
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2463
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2310
2464
  let t = e && Object.keys(e).length > 0 ? e : null;
2311
2465
  return this._localeOverrides = t, this._emitter.notify("onRegionalChange"), this;
2312
2466
  }
@@ -2316,14 +2470,20 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2316
2470
  getResources() {
2317
2471
  return this._resources;
2318
2472
  }
2473
+ getFetcher() {
2474
+ return this._fetch.getFetcher();
2475
+ }
2476
+ fetch(e, t) {
2477
+ return this._fetch.fetch(e, t);
2478
+ }
2319
2479
  getTransactions() {
2320
2480
  return this._transactions;
2321
2481
  }
2322
2482
  getChanges(e) {
2323
- let t = this._transactions, [n, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], a = this.getWorksheets().getItems({ visibility: k.Visibility.VeryHidden });
2483
+ let t = this._transactions, [n, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], a = this.getWorksheets().getItems({ visibility: A.Visibility.VeryHidden });
2324
2484
  for (let e = 0; e < a.length; e++) {
2325
2485
  let t = a[e];
2326
- t instanceof A && i.push(...t._changeEventsOf(n, r ?? null));
2486
+ t instanceof T && i.push(...t._changeEventsOf(n, r ?? null));
2327
2487
  }
2328
2488
  return i;
2329
2489
  }
@@ -2337,7 +2497,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2337
2497
  return this._updateLinks;
2338
2498
  }
2339
2499
  setUpdateLinks(e) {
2340
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2500
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2341
2501
  return this._updateLinks = e, this;
2342
2502
  }
2343
2503
  getPivotTables() {
@@ -2353,8 +2513,8 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2353
2513
  return this._theme;
2354
2514
  }
2355
2515
  setTheme(e) {
2356
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2357
- if (!e) throw new B(G("error.workbook.notSetValue"));
2516
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2517
+ if (!e) throw new B(W("error.workbook.notSetValue"));
2358
2518
  let t = this._theme;
2359
2519
  return this._theme = e, this.getStyles().setTheme(e), this._emitter.notify("onThemeChange"), t;
2360
2520
  }
@@ -2376,30 +2536,30 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2376
2536
  return this.getSelectedWorksheet();
2377
2537
  }
2378
2538
  getSheets(e) {
2379
- let t = this._getSheetRefs(e?.visibility ?? k.Visibility.Visible), n = Array(t.length);
2539
+ let t = this._getSheetRefs(e?.visibility ?? A.Visibility.Visible), n = Array(t.length);
2380
2540
  for (let e = 0; e < t.length; e++) n[e] = t[e].sheet;
2381
2541
  return n;
2382
2542
  }
2383
2543
  getSheet(e) {
2384
2544
  if (e === void 0) return this.getSelectedSheet();
2385
- if (!e) throw Error(G("error.workbook.sheetNameNotProvided"));
2545
+ if (!e) throw Error(W("error.workbook.sheetNameNotProvided"));
2386
2546
  let t = this._getSheetRef(e);
2387
- if (!t) throw new H(xr(e));
2547
+ if (!t) throw new V(Ur(e));
2388
2548
  return t.sheet;
2389
2549
  }
2390
- getWorksheet(e, t = k.Visibility.Visible) {
2550
+ getWorksheet(e, t = A.Visibility.Visible) {
2391
2551
  if (typeof e == "number") return this.getWorksheetAt(e, t);
2392
2552
  if (e === void 0) return this._requireSelectedWorksheet();
2393
- if (!e) throw Error(G("error.workbook.sheetNameNotProvided"));
2553
+ if (!e) throw Error(W("error.workbook.sheetNameNotProvided"));
2394
2554
  let n = this._getSheetRef(e, t);
2395
- if (!n) throw new H(xr(e));
2396
- if (!Z(n)) throw new H(Sr(n.name, n.sheet.getKind()));
2555
+ if (!n) throw new V(Ur(e));
2556
+ if (!Z(n)) throw new V(Wr(n.name, n.sheet.getKind()));
2397
2557
  return n.sheet;
2398
2558
  }
2399
- getWorksheetAt(e, t = k.Visibility.Visible) {
2559
+ getWorksheetAt(e, t = A.Visibility.Visible) {
2400
2560
  let n = this._getWorksheets(t)[e];
2401
- if (!n) throw new H(function(e) {
2402
- return G("error.workbook.sheetIndexNotFound", { index: e });
2561
+ if (!n) throw new V(function(e) {
2562
+ return W("error.workbook.sheetIndexNotFound", { index: e });
2403
2563
  }(e));
2404
2564
  return n;
2405
2565
  }
@@ -2407,10 +2567,10 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2407
2567
  let e = this.getSelectedWorksheet();
2408
2568
  if (e) return e;
2409
2569
  let t = this.getSelectedSheet();
2410
- throw new B(Cr(t?.getName() ?? "", t?.getKind() ?? k.Kind.Worksheet));
2570
+ throw new B(Gr(t?.getName() ?? "", t?.getKind() ?? A.Kind.Worksheet));
2411
2571
  }
2412
2572
  _anchorWorksheet() {
2413
- return this.getSelectedWorksheet() || (this._getWorksheets(k.Visibility.VeryHidden)[0] ?? null);
2573
+ return this.getSelectedWorksheet() || (this._getWorksheets(A.Visibility.VeryHidden)[0] ?? null);
2414
2574
  }
2415
2575
  getWorksheets() {
2416
2576
  return this._sheets;
@@ -2418,7 +2578,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2418
2578
  addWorksheet(e) {
2419
2579
  return this.getWorksheets().add(e);
2420
2580
  }
2421
- _getWorksheets(e = k.Visibility.Visible) {
2581
+ _getWorksheets(e = A.Visibility.Visible) {
2422
2582
  let t = this._getSheetRefs(e), n = [], r = t.length;
2423
2583
  for (let e = 0; e < r; e++) {
2424
2584
  let r = t[e];
@@ -2426,27 +2586,27 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2426
2586
  }
2427
2587
  return n;
2428
2588
  }
2429
- _getSheetRefs(e = k.Visibility.Visible) {
2589
+ _getSheetRefs(e = A.Visibility.Visible) {
2430
2590
  let t = this._getState();
2431
- return t ? e === k.Visibility.Visible ? t.sheetRefsVisible : e === k.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === k.Visibility.VeryHidden ? t.sheetRefsAll : R.EmptyArray : [];
2591
+ return t ? e === A.Visibility.Visible ? t.sheetRefsVisible : e === A.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === A.Visibility.VeryHidden ? t.sheetRefsAll : R.EmptyArray : [];
2432
2592
  }
2433
- _getSheetRef(e, t = k.Visibility.Visible) {
2593
+ _getSheetRef(e, t = A.Visibility.Visible) {
2434
2594
  let n = null;
2435
2595
  return typeof e == "number" ? this._getSheetRefs(t)[e] : (typeof e == "string" ? n = this._getState().refsByLowerCaseName.get(e.toLowerCase()) : !0 === e?.isISheet ? n = this._getState().refsByInstance.get(e) : e?.id !== void 0 && (n = this._getState().refsById.get(e.id)), n);
2436
2596
  }
2437
2597
  _validateNewSheetName(e, t = !0) {
2438
2598
  if (e == null) return e;
2439
- if (kr(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new B(G("error.workbook.nameTaken"));
2599
+ if (Zr(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new B(W("error.workbook.nameTaken"));
2440
2600
  return e.substring(0, 31);
2441
2601
  }
2442
2602
  findValidSheetName(e) {
2443
- e &&= kr(e, !0);
2603
+ e &&= Zr(e, !0);
2444
2604
  try {
2445
2605
  return function(e, t) {
2446
2606
  try {
2447
2607
  if (t(e)) return e;
2448
2608
  } catch {}
2449
- let n, r, i = Er.exec(e);
2609
+ let n, r, i = Jr.exec(e);
2450
2610
  for (i === null ? (n = e + " ", r = 1) : (n = e.substring(0, i.index), r = parseFloat(i[1])); r < 256;) {
2451
2611
  r++;
2452
2612
  let e = "(" + r + ")", i = n.substring(0, 31 - e.length) + e;
@@ -2461,25 +2621,25 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2461
2621
  }
2462
2622
  }
2463
2623
  isValidSheetNameCharacter(e) {
2464
- return !Tr.test(e);
2624
+ return !qr.test(e);
2465
2625
  }
2466
2626
  _isStructureProtected() {
2467
2627
  return !this._initializing && !this.getProtection().isStructureAllowed();
2468
2628
  }
2469
2629
  _addSheetOptions(e) {
2470
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2471
- if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
2630
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2631
+ if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
2472
2632
  let t, n = null;
2473
2633
  t = typeof e == "string" ? { name: e } : typeof e == "number" ? { index: e } : e, t = {
2474
2634
  ...t,
2475
- description: t?.description ?? W("op.addSheet")
2635
+ description: t?.description ?? U("op.addSheet")
2476
2636
  };
2477
2637
  let r = this.beginCommit(t);
2478
2638
  try {
2479
2639
  let e = t?.autoSelect ?? !1;
2480
2640
  n = this._addSheet(!0, t.name, t.index ?? null);
2481
2641
  let i = this.getView().getActiveSheetId();
2482
- if (e && this._recordActiveSheet(r, i, this._getSheetRef(n).id), r.commit({ description: G("op.addSheetNamed", { name: n.getName() }) }), !1 !== e) {
2642
+ if (e && this._recordActiveSheet(r, i, this._getSheetRef(n).id), r.commit({ description: W("op.addSheetNamed", { name: n.getName() }) }), !1 !== e) {
2483
2643
  let t = typeof e == "boolean" ? void 0 : e;
2484
2644
  n.select(t);
2485
2645
  }
@@ -2491,7 +2651,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2491
2651
  _nextSheetName(e = null) {
2492
2652
  let t = e ? e.toLowerCase() : null, n = this._getState(), r = n.sheetsByLowerCaseName;
2493
2653
  if (e && r.has(t)) throw new B(function(e) {
2494
- return G("error.workbook.nameDuplicate", { sheetName: e });
2654
+ return W("error.workbook.nameDuplicate", { sheetName: e });
2495
2655
  }(e));
2496
2656
  t = (e = this._validateNewSheetName(e)) ? e.toLowerCase() : null;
2497
2657
  let i = n.lastId + 1;
@@ -2503,13 +2663,13 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2503
2663
  }
2504
2664
  _addSheet(e, t = null, n = null, r) {
2505
2665
  t = this._nextSheetName(t);
2506
- let i = this._getState(), a = this._createSheet(i.lastId, t, k.Visibility.Visible, n, void 0, null, r);
2507
- if (!a) throw new B(G("error.workbook.sheetNameBlank"));
2666
+ let i = this._getState(), a = this._createSheet(i.lastId, t, A.Visibility.Visible, n, void 0, null, r);
2667
+ if (!a) throw new B(W("error.workbook.sheetNameBlank"));
2508
2668
  return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), a;
2509
2669
  }
2510
2670
  _createOpaqueSheet(e, t, n, r, i, a, o, s, c) {
2511
2671
  let l = this, u = null;
2512
- return u = new fr({
2672
+ return u = new Pr({
2513
2673
  kind: a,
2514
2674
  id: c ?? t + "-" + R.uuidV4(),
2515
2675
  part: o,
@@ -2522,25 +2682,25 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2522
2682
  setName: (e, t) => {
2523
2683
  l._setSheetName(u, e, t);
2524
2684
  },
2525
- getVisibility: () => l._getSheetRef(u, k.Visibility.VeryHidden)?.visibility ?? k.Visibility.Visible,
2685
+ getVisibility: () => l._getSheetRef(u, A.Visibility.VeryHidden)?.visibility ?? A.Visibility.Visible,
2526
2686
  setVisibility: (e, t) => {
2527
2687
  l._setSheetVisibility(u, e, t);
2528
2688
  },
2529
2689
  getIndex: () => {
2530
- let e = l._getSheetRef(u, k.Visibility.VeryHidden);
2531
- return e ? l._getOffsetForId(e.id, l._getSheetRefs(k.Visibility.VeryHidden)) : -1;
2690
+ let e = l._getSheetRef(u, A.Visibility.VeryHidden);
2691
+ return e ? l._getOffsetForId(e.id, l._getSheetRefs(A.Visibility.VeryHidden)) : -1;
2532
2692
  },
2533
2693
  setIndex: (e, t) => {
2534
- let n = l._getSheetRef(u, k.Visibility.VeryHidden);
2694
+ let n = l._getSheetRef(u, A.Visibility.VeryHidden);
2535
2695
  n && l._moveSheet(n, e, t);
2536
2696
  },
2537
2697
  requestSelect: () => l._requestSelect(u),
2538
- isAttached: () => !!l._getSheetRef(u, k.Visibility.VeryHidden)
2698
+ isAttached: () => !!l._getSheetRef(u, A.Visibility.VeryHidden)
2539
2699
  }
2540
2700
  }), this._sheetOnNameChange.set(e, () => u._notify("onNameChange")), this._sheetOnVisibilityChange.set(e, () => u._notify("onVisibilityChange")), this._sheetOnIndexChange.set(e, () => u._notify("onIndexChange")), this._addSheetRef({
2541
2701
  name: t,
2542
2702
  id: e,
2543
- visibility: n ?? k.Visibility.Visible,
2703
+ visibility: n ?? A.Visibility.Visible,
2544
2704
  sheetId: i,
2545
2705
  sheet: u
2546
2706
  }, r), u;
@@ -2553,10 +2713,10 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2553
2713
  }), this.getSelectedSheet() === e;
2554
2714
  }
2555
2715
  _updateSheetRefStates(e) {
2556
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2557
- if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
2716
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2717
+ if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
2558
2718
  let t = e, n = [], r = [], i = t.length;
2559
- for (let e = 0; e < i; e++) t[e].visibility === k.Visibility.Visible ? (n.push(t[e]), r.push(t[e])) : t[e].visibility === k.Visibility.Hidden && r.push(t[e]);
2719
+ for (let e = 0; e < i; e++) t[e].visibility === A.Visibility.Visible ? (n.push(t[e]), r.push(t[e])) : t[e].visibility === A.Visibility.Hidden && r.push(t[e]);
2560
2720
  this._updateState({
2561
2721
  sheetRefsAll: t,
2562
2722
  sheetRefsVisible: n,
@@ -2596,9 +2756,9 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2596
2756
  p._validateDeleteSheet(e);
2597
2757
  },
2598
2758
  onDelete(e) {
2599
- let t = p._getSheetRef(e, k.Visibility.VeryHidden);
2759
+ let t = p._getSheetRef(e, A.Visibility.VeryHidden);
2600
2760
  if (!t) return;
2601
- let n = p._beginCommit({ description: G("op.deleteSheet", { name: t.name }) });
2761
+ let n = p._beginCommit({ description: W("op.deleteSheet", { name: t.name }) });
2602
2762
  try {
2603
2763
  let r = p._getState(), i = r.sheetRefsAll, a = p._getOffsetForId(t.id, i), s = [...i];
2604
2764
  s.splice(a, 1), p._updateSheetRefStates(s);
@@ -2652,7 +2812,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2652
2812
  }
2653
2813
  _recordActiveSheet(e, t, n) {
2654
2814
  let r = this.getView().getId();
2655
- e.setIntent(jr, (e) => ({
2815
+ e.setIntent($r, (e) => ({
2656
2816
  viewId: r,
2657
2817
  before: e?.before ?? t,
2658
2818
  after: n
@@ -2682,27 +2842,27 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2682
2842
  let n = this._view.getActiveSheetId();
2683
2843
  n ??= (this._view.setActiveSheetId(t), t);
2684
2844
  let r = e.refsById.get(n);
2685
- r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), n = t), r.visibility === k.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(n, e.sheetRefsVisible));
2845
+ r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), n = t), r.visibility === A.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(n, e.sheetRefsVisible));
2686
2846
  }
2687
2847
  _validateDeleteSheet(e) {
2688
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2689
- if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
2848
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2849
+ if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
2690
2850
  let t = this._getSheetRef(e);
2691
2851
  if (!t) throw new B(function(e) {
2692
- return G("error.workbook.deleteKey", { key: e });
2852
+ return W("error.workbook.deleteKey", { key: e });
2693
2853
  }(e));
2694
2854
  let n = this._getState().sheetRefsVisible;
2695
- if (n.length === 1 && n[0].id === t.id) throw new B(G("error.workbook.sheetOne"));
2855
+ if (n.length === 1 && n[0].id === t.id) throw new B(W("error.workbook.sheetOne"));
2696
2856
  }
2697
2857
  _getOffsetForId(e, t) {
2698
2858
  let n = t.length;
2699
2859
  for (let r = 0; r < n; r++) if (t[r].id === e) return r;
2700
- throw new B(G("error.workbook.noVisibleRefs"));
2860
+ throw new B(W("error.workbook.noVisibleRefs"));
2701
2861
  }
2702
2862
  find(e) {
2703
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2863
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2704
2864
  let t = this._getWorksheets();
2705
- if (t.length === 0) return { next: () => de };
2865
+ if (t.length === 0) return { next: () => Mt };
2706
2866
  if (t.length === 1) return t[0].find(e);
2707
2867
  typeof e == "string" && (e = { text: e });
2708
2868
  let n = !e?.reverse, r = e?.disableWrap ?? !1, i = this._worksheetOffsetFrom(this.getSelectedSheetIndex(), t), a = i, o = t[a], s = !1;
@@ -2728,7 +2888,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2728
2888
  }
2729
2889
  if (!d && s && a === i && (u.done || !c || !u.done && f(u.value.getCoords(), c) >= 0) && (d = !0), d) {
2730
2890
  let e = u;
2731
- return u = de, e;
2891
+ return u = Mt, e;
2732
2892
  }
2733
2893
  let p = u;
2734
2894
  return u = l.next(), p;
@@ -2740,7 +2900,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2740
2900
  } };
2741
2901
  }
2742
2902
  replace(e, t, n) {
2743
- let r = 0, i = null, a = typeof t == "function", o = n?.maxCount ?? 2 ** 53 - 1, s = !n?.maxCount, c = "", l = typeof t == "string" ? ee(t) : null, u = n?.description ?? W("op.replace"), d = this._transactions.beginCommit({ description: u });
2903
+ let r = 0, i = null, a = typeof t == "function", o = n?.maxCount ?? 2 ** 53 - 1, s = !n?.maxCount, c = "", l = typeof t == "string" ? dt(t) : null, u = n?.description ?? U("op.replace"), d = this._transactions.beginCommit({ description: u });
2744
2904
  try {
2745
2905
  let u = null, f = null, p = e.next();
2746
2906
  for (; !p.done && r < o;) {
@@ -2752,10 +2912,10 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2752
2912
  let c = a ? t(o) : t;
2753
2913
  c !== void 0 && c !== o && (f.push(o, c), r++, i = o), p = e.next();
2754
2914
  }
2755
- f?.apply(), r === 1 && o === 1 && i && (c = i.getAddress()), r === 0 ? d.rollback() : d.commit({ description: n?.description ?? (s ? l === null ? W("op.replaceAll") : G("op.replaceAllWith", { value: l }) : c ? l === null ? G("op.replaceAt", { address: c }) : G("op.replaceAtWith", {
2915
+ f?.apply(), r === 1 && o === 1 && i && (c = i.getAddress()), r === 0 ? d.rollback() : d.commit({ description: n?.description ?? (s ? l === null ? U("op.replaceAll") : W("op.replaceAllWith", { value: l }) : c ? l === null ? W("op.replaceAt", { address: c }) : W("op.replaceAtWith", {
2756
2916
  address: c,
2757
2917
  value: l
2758
- }) : l === null ? W("op.replace") : G("op.replaceWith", { value: l })) });
2918
+ }) : l === null ? U("op.replace") : W("op.replaceWith", { value: l })) });
2759
2919
  } catch (e) {
2760
2920
  throw d.rollback(), e;
2761
2921
  }
@@ -2783,105 +2943,106 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2783
2943
  return 0;
2784
2944
  }
2785
2945
  getNextSheet(e) {
2786
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2946
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2787
2947
  let t = this._getSheetRefs();
2788
2948
  return t[this._nextSheetIndex(e, t)]?.sheet ?? null;
2789
2949
  }
2790
2950
  getPreviousSheet(e) {
2791
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2951
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2792
2952
  let t = this._getSheetRefs();
2793
2953
  return t[this._prevSheetIndex(e, t)]?.sheet ?? null;
2794
2954
  }
2795
2955
  async _duplicateSheet(e) {
2796
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2797
- if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
2956
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
2957
+ if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
2798
2958
  let t = this._getSheetRefs(), n = this.getSelectedSheetIndex(), r = null;
2799
2959
  if (e) {
2800
- if (r = this._getSheetRef(e), !r) throw new B(br(r));
2960
+ if (r = this._getSheetRef(e), !r) throw new B(Hr(r));
2801
2961
  } else r = t[n];
2802
2962
  if (!r) return null;
2803
- if (!Z(r)) throw new B((i = r.name, G("error.workbook.sheetNotDuplicable", { sheetName: i })));
2963
+ if (!Z(r)) throw new B((i = r.name, W("error.workbook.sheetNotDuplicable", { sheetName: i })));
2804
2964
  var i;
2805
- let a = r.sheet, o = this._strings.beginPersist(), s = this.getResources().beginPersist(), c = this.getStyles().beginPersist(), l = null, u = this.beginCommit(G("op.duplicateNamed", { name: a.getName() }));
2965
+ let a = r.sheet, o = this._strings.beginPersist(), s = this.getResources().beginPersist(), c = this.getStyles().beginPersist(), l = this._richValues.beginPersist(), u = null, d = this.beginCommit(W("op.duplicateNamed", { name: a.getName() }));
2806
2966
  try {
2807
2967
  let e = this._getState().refsByInstance.get(a), r = await a.toJSON(), i = t.length + 1, o = this.findValidSheetName(e.name), s = this._createSheet(i, o, e.visibility, n, void 0, r);
2808
- this._tellSheets(), this._emitter.notify("onSheetsChange"), l = s, u.commit();
2968
+ this._tellSheets(), this._emitter.notify("onSheetsChange"), u = s, d.commit();
2809
2969
  } catch (e) {
2810
- throw u.rollback(), e;
2970
+ throw d.rollback(), e;
2811
2971
  } finally {
2812
- c.endPersist(), s.endPersist(), o.endPersist();
2972
+ l.endPersist(), c.endPersist(), s.endPersist(), o.endPersist();
2813
2973
  }
2814
- return l;
2974
+ return u;
2815
2975
  }
2816
2976
  _createRange(e, t) {
2817
- let n = e ? { ...e } : null, r = n ? this._getSheetRef(n.scope, k.Visibility.VeryHidden) : null;
2818
- if (r && !Z(r)) throw new B(Sr(r.name, r.sheet.getKind()));
2977
+ let n = e ? { ...e } : null, r = n ? this._getSheetRef(n.scope, A.Visibility.VeryHidden) : null;
2978
+ if (r && !Z(r)) throw new B(Wr(r.name, r.sheet.getKind()));
2819
2979
  if (!r) {
2820
2980
  let e = this._anchorWorksheet();
2821
- return e ? (delete n?.scope, Or(n, n ? {
2822
- scope: g,
2981
+ return e ? (delete n?.scope, Xr(n, n ? {
2982
+ scope: Je,
2823
2983
  ...e.getEntireRange().getCoords()
2824
- } : null)) : void console.warn(G("error.workbook.noVisibleRefs"));
2984
+ } : null)) : void console.warn(W("error.workbook.noVisibleRefs"));
2825
2985
  }
2826
2986
  let i = r.sheet, a = null;
2827
- return t && (a = { getOptions: t }), new Nr(e, j(i), this, a);
2987
+ return t && (a = { getOptions: t }), new ti(e, D(i), this, a);
2828
2988
  }
2829
2989
  _createRanges(e, t) {
2830
2990
  let n = this._anchorWorksheet();
2831
- if (!n) throw new B(Cr("", k.Kind.Worksheet));
2991
+ if (!n) throw new B(Gr("", A.Kind.Worksheet));
2832
2992
  let r = null;
2833
- return t && (r = { getOptions: t }), new Mr(e, j(n), this, r);
2993
+ return t && (r = { getOptions: t }), new ei(e, D(n), this, r);
2834
2994
  }
2835
2995
  getRange(e, t) {
2836
2996
  if (e === void 0) return this.getSelectedRange(t);
2997
+ typeof e == "number" && (e = Qe(arguments), t = void 0);
2837
2998
  try {
2838
2999
  let n = this._rangesAddressToCoords(e);
2839
- if (n.length !== 1) throw new B(G("error.address.singleRangeOnlyAlt"));
3000
+ if (n.length !== 1) throw new B(W("error.address.singleRangeOnlyAlt"));
2840
3001
  return this._createRange(n[0], t);
2841
3002
  } catch (t) {
2842
- throw t instanceof H ? new H(t.message) : new B(t.message ?? d(e));
3003
+ throw t instanceof V ? new V(t.message) : new B(t.message ?? ge(e));
2843
3004
  }
2844
3005
  }
2845
3006
  getCell(e) {
2846
3007
  if (e === void 0) return this.getSelectedCell();
2847
3008
  let t = this.getRange(e);
2848
- if (t.size > 1) throw new B(G("error.address.singleCellOnly"));
3009
+ if (t.size > 1) throw new B(W("error.address.singleCellOnly"));
2849
3010
  return t.getCell();
2850
3011
  }
2851
3012
  getRanges(e, t) {
2852
3013
  let n = this._rangesAddressToCoords(e);
2853
- if (n.length === 0) throw new B(d(e));
3014
+ if (n.length === 0) throw new B(ge(e));
2854
3015
  return this._createRanges(n, t);
2855
3016
  }
2856
3017
  _createGraphRanges(e, t) {
2857
3018
  let n = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
2858
3019
  for (let e = 0; e < t.length; e++) {
2859
- let i = t[e], a = i.sheetName ? this._getSheetRef(i.sheetName, k.Visibility.VeryHidden) : null, o = a && Z(a) ? a.sheet : this._anchorWorksheet();
2860
- o && n.push(new Be(i, r, j(o), null));
3020
+ let i = t[e], a = i.sheetName ? this._getSheetRef(i.sheetName, A.Visibility.VeryHidden) : null, o = a && Z(a) ? a.sheet : this._anchorWorksheet();
3021
+ o && n.push(new Ae(i, r, D(o), null));
2861
3022
  }
2862
3023
  for (let t = 0; t < e.length; t++) n.push(e[t]);
2863
3024
  let i = this._anchorWorksheet();
2864
- return n.length !== 0 && i ? new Mr(n, j(i), this, null) : null;
3025
+ return n.length !== 0 && i ? new ei(n, D(i), this, null) : null;
2865
3026
  }
2866
3027
  getAnomalies(e) {
2867
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2868
- let t = He(e), n = this._getWorksheets(k.Visibility.VeryHidden).map((e) => {
2869
- let t = j(e);
3028
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
3029
+ let t = _e(e), n = this._getWorksheets(A.Visibility.VeryHidden).map((e) => {
3030
+ let t = D(e);
2870
3031
  return {
2871
3032
  bounds: t.getSheet().getEntireCoords(),
2872
3033
  internal: t,
2873
3034
  qualified: !0
2874
3035
  };
2875
3036
  });
2876
- return new wt(n, () => (this.getSelectedWorksheet() ?? this._getWorksheets(k.Visibility.VeryHidden)[0]).getEntireRange(), t);
3037
+ return new ue(n, () => (this.getSelectedWorksheet() ?? this._getWorksheets(A.Visibility.VeryHidden)[0]).getEntireRange(), t);
2877
3038
  }
2878
3039
  getStats(e) {
2879
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2880
- let t = this._getWorksheets(k.Visibility.VeryHidden), n = t.length;
3040
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
3041
+ let t = this._getWorksheets(A.Visibility.VeryHidden), n = t.length;
2881
3042
  if (n === 1) return t[0].getStats(e);
2882
3043
  let r = Array(n);
2883
3044
  for (let i = 0; i < n; i++) r[i] = t[i].getStats(e);
2884
- return new er(r);
3045
+ return new gr(r);
2885
3046
  }
2886
3047
  _activeRangeCoords() {
2887
3048
  let e = this._requireSelectedWorksheet(), t = e.getSelection().getRanges().getCoords(), n = e.getName(), r = t.length, i = Array(r);
@@ -2906,40 +3067,40 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2906
3067
  getSelectedCell() {
2907
3068
  return this._requireSelectedWorksheet().getSelectedCell();
2908
3069
  }
2909
- _rangesAddressToCoords(e, t = !0, n = k.Visibility.Hidden) {
2910
- if (!e) throw new B(G("error.address.noAddress"));
2911
- let r = this.getSelectedWorksheet(), i = { ...(r ?? this._anchorWorksheet())?.getEntireRange().getCoords() }, o = r?.getName();
2912
- if (o && (i.scope = o), typeof e == "string") {
3070
+ _rangesAddressToCoords(e, t = !0, n = A.Visibility.Hidden) {
3071
+ if (!e) throw new B(W("error.address.noAddress"));
3072
+ let r = this.getSelectedWorksheet(), i = { ...(r ?? this._anchorWorksheet())?.getEntireRange().getCoords() }, a = r?.getName();
3073
+ if (a && (i.scope = a), typeof e == "string") {
2913
3074
  let t = e.trim().toLowerCase();
2914
3075
  if (t === "r" || t === "c") {
2915
3076
  let n = this.getSelectedCell().getCoords(), r = {};
2916
3077
  t === "r" ? r.rowStart = r.rowEnd = n.rowIndex : r.colStart = r.colEnd = n.colIndex, e = r;
2917
3078
  }
2918
3079
  }
2919
- let s = this, c = gt(e, i, ue, (e) => {
3080
+ let o = this, s = tt(e, i, Tt, (e) => {
2920
3081
  if (!t) return null;
2921
3082
  if (typeof e == "string") {
2922
- let t = a(e, {
2923
- getTable: (e) => at(s.getNames().getByName(e)),
3083
+ let t = ve(e, {
3084
+ getTable: (e) => pt(o.getNames().getByName(e)),
2924
3085
  getAnchor: () => r ? {
2925
3086
  sheet: r,
2926
3087
  coords: r.getSelectedCell().getCoords()
2927
3088
  } : null
2928
3089
  });
2929
3090
  if (t) return [t];
2930
- let n = s.getNames().getByName(e)?.getRanges?.();
3091
+ let n = o.getNames().getByName(e)?.getRanges?.();
2931
3092
  if (n) return n.getCoords();
2932
3093
  }
2933
3094
  throw new B(`Invalid sheet reference '${e}'.`);
2934
- }), l = c.length;
2935
- for (let e = 0; e < l; e++) this._validateCoords(c[e], n);
2936
- return c;
3095
+ }), c = s.length;
3096
+ for (let e = 0; e < c; e++) this._validateCoords(s[e], n);
3097
+ return s;
2937
3098
  }
2938
- _validateCoords(e, t = k.Visibility.Visible, n = G("error.sheet.oobRange")) {
3099
+ _validateCoords(e, t = A.Visibility.Visible, n = W("error.sheet.oobRange")) {
2939
3100
  if (e === null) return;
2940
3101
  let r = this.getWorksheet(e.scope ?? void 0, t).getEntireRange().getCoords();
2941
- if (!z.isRangeWithinRange(e, r)) throw new H(n);
2942
- if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new B(G("error.address.invalidRangeInverted"));
3102
+ if (!z.isRangeWithinRange(e, r)) throw new V(n);
3103
+ if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new B(W("error.address.invalidRangeInverted"));
2943
3104
  }
2944
3105
  _updateSheetRef(e, t) {
2945
3106
  let n = this._getState(), r = [...n.sheetRefsAll];
@@ -2959,16 +3120,16 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2959
3120
  }), this._tellSheets(), t;
2960
3121
  }
2961
3122
  _setSheetName(e, t, n) {
2962
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2963
- if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
3123
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
3124
+ if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
2964
3125
  let r = this._getSheetRef(e);
2965
- if (!r) throw new B(br(e));
3126
+ if (!r) throw new B(Hr(e));
2966
3127
  if (t === r.name) return r.sheet;
2967
- if ((t = this._validateNewSheetName(t)) == null) throw new B(G("error.workbook.sheetNameNotProvided"));
3128
+ if ((t = this._validateNewSheetName(t)) == null) throw new B(W("error.workbook.sheetNameNotProvided"));
2968
3129
  let i = Object.freeze({
2969
3130
  ...r,
2970
3131
  name: t
2971
- }), a = null, o = this.beginCommit(W("op.renameSheet"));
3132
+ }), a = null, o = this.beginCommit(U("op.renameSheet"));
2972
3133
  try {
2973
3134
  let e = this._updateSheetRef(r, i);
2974
3135
  this._adjustSheetNamesIfRequired(), this._sheetOnNameChange.forEach((e, t) => {
@@ -2979,23 +3140,23 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
2979
3140
  }
2980
3141
  return a;
2981
3142
  }
2982
- _setSheetVisibility(e, t = k.Visibility.Visible, n) {
2983
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
2984
- if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
2985
- let r = this._getSheetRef(e, k.Visibility.VeryHidden);
3143
+ _setSheetVisibility(e, t = A.Visibility.Visible, n) {
3144
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
3145
+ if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
3146
+ let r = this._getSheetRef(e, A.Visibility.VeryHidden);
2986
3147
  if (!r) return null;
2987
3148
  if (t === r.visibility) return;
2988
3149
  let i = null, a = "";
2989
- t === k.Visibility.Visible ? a = W("op.unhideSheet") : t === k.Visibility.Hidden ? a = W("op.hideSheet") : t === k.Visibility.VeryHidden && (a = W("op.veryHideSheet"));
3150
+ t === A.Visibility.Visible ? a = U("op.unhideSheet") : t === A.Visibility.Hidden ? a = U("op.hideSheet") : t === A.Visibility.VeryHidden && (a = U("op.veryHideSheet"));
2990
3151
  let o = this.beginCommit(a);
2991
3152
  try {
2992
3153
  let e = this._getState().sheetRefsVisible;
2993
- if (t !== k.Visibility.Visible && e.length === 1 && e[0].id === r.id) throw new B(G("error.workbook.sheetOne"));
3154
+ if (t !== A.Visibility.Visible && e.length === 1 && e[0].id === r.id) throw new B(W("error.workbook.sheetOne"));
2994
3155
  let a = {
2995
3156
  ...r,
2996
3157
  visibility: t
2997
3158
  }, s = -1;
2998
- t !== k.Visibility.Visible && (s = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, a).sheet, t !== k.Visibility.Visible && this._adjustRemoveSelectionIfRequired(s, r.id), this._adjustSheetNamesIfRequired(), o.commit(n);
3159
+ t !== A.Visibility.Visible && (s = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, a).sheet, t !== A.Visibility.Visible && this._adjustRemoveSelectionIfRequired(s, r.id), this._adjustSheetNamesIfRequired(), o.commit(n);
2999
3160
  } catch (e) {
3000
3161
  throw o.rollback(), e;
3001
3162
  }
@@ -3004,9 +3165,9 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3004
3165
  }), this._emitter.notify("onSheetsChange"), i;
3005
3166
  }
3006
3167
  _moveSheet(e, t, n) {
3007
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
3008
- if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
3009
- let r = null, i = this.beginCommit(G("op.moveSheetNamed", { name: e.name }));
3168
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
3169
+ if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
3170
+ let r = null, i = this.beginCommit(W("op.moveSheetNamed", { name: e.name }));
3010
3171
  try {
3011
3172
  let a = this._getState(), o = a.sheetRefsVisible;
3012
3173
  if (t < 0 || t > o.length - 1) throw new B(`Invalid to index: ${t}`);
@@ -3022,11 +3183,11 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3022
3183
  return r;
3023
3184
  }
3024
3185
  _setSelectedSheet(e) {
3025
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
3186
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
3026
3187
  let t = this._getSheetRef(e);
3027
- if (!t) throw new B(br(e));
3188
+ if (!t) throw new B(Hr(e));
3028
3189
  let n = null;
3029
- return t.visibility !== k.Visibility.Visible && this._setSheetVisibility(t, k.Visibility.Visible), this._view.setActiveSheetId(t.id), n = t.sheet, n;
3190
+ return t.visibility !== A.Visibility.Visible && this._setSheetVisibility(t, A.Visibility.Visible), this._view.setActiveSheetId(t.id), n = t.sheet, n;
3030
3191
  }
3031
3192
  getProtection() {
3032
3193
  return this._protection;
@@ -3044,7 +3205,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3044
3205
  return this._calculation;
3045
3206
  }
3046
3207
  getFonts() {
3047
- return Ct.getShared();
3208
+ return xe.getShared();
3048
3209
  }
3049
3210
  createFormula(e, t, n) {
3050
3211
  return this.getCalculation().createFormula(e, t, n);
@@ -3075,39 +3236,35 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3075
3236
  return this._emitter.addListeners(e, t);
3076
3237
  }
3077
3238
  _sheetToWBEvent(e) {
3078
- let t = this;
3079
- return (n) => {
3080
- let r = () => {
3081
- let e = n.getSource();
3082
- if (e.isInvalid()) return e;
3083
- if (e.isICellRanges) {
3084
- let n = [...e.getCoords()], r = n.length;
3085
- for (let t = 0; t < r; t++) {
3086
- let r = n[t];
3087
- !r.scope && e.getWorksheet().getName() && (n[t] = {
3088
- ...r,
3089
- scope: e.getWorksheet().getName()
3090
- });
3091
- }
3092
- return t.getRanges(n);
3093
- }
3094
- if (e.isICellRange) {
3095
- let n = e.getCoords(), r = e.getWorksheet().getName();
3096
- return t.getRange({
3097
- ...n,
3098
- scope: r
3099
- });
3100
- }
3101
- };
3239
+ let t = this, n = (e) => {
3240
+ if (e.isInvalid()) return e;
3241
+ let n = e.getWorksheet().getName();
3242
+ if (e.isICellRanges) {
3243
+ let r = e.getCoords().map((e) => e.scope ? e : {
3244
+ ...e,
3245
+ scope: n
3246
+ });
3247
+ return t.getRanges(r);
3248
+ }
3249
+ let r = e.getCoords();
3250
+ return t.getRange(r.scope ? r : {
3251
+ ...r,
3252
+ scope: n
3253
+ });
3254
+ };
3255
+ return (t) => {
3102
3256
  e({
3103
- getSource: r,
3104
- trigger: n.trigger,
3105
- getFrom: () => t.getRanges(n.getFrom()),
3106
- isDataChange: n.isDataChange,
3107
- getTransactionId: n.getTransactionId,
3108
- isUndo: n.isUndo,
3109
- toString: () => `WorkbookRangeEvent: ('${n.trigger}', ${r().toString()})`,
3110
- timeStamp: Date.now()
3257
+ getSource: () => n(t.getSource()),
3258
+ getRanges: () => {
3259
+ let e = t.getRanges();
3260
+ return e ? n(e) : null;
3261
+ },
3262
+ getPreviousAddress: () => t.getPreviousAddress(),
3263
+ getTrigger: () => t.getTrigger(),
3264
+ isUndo: () => t.isUndo(),
3265
+ getCommit: () => t.getCommit(),
3266
+ toString: () => `WorkbookRangeEvent: ('${t.getTrigger()}', ${n(t.getSource()).toString()})`,
3267
+ getTimeStamp: () => t.getTimeStamp()
3111
3268
  });
3112
3269
  };
3113
3270
  }
@@ -3121,67 +3278,83 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3121
3278
  for (let n = 0; n < e.length; n++) e[n]._hold(t);
3122
3279
  }
3123
3280
  _fromJSON(e, t) {
3124
- if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || e.sheets.length === 0) throw new B(G("error.workbook.sheetOne"));
3125
- e.theme && (this._theme = new re(e.theme), this._styles.setTheme(this._theme));
3126
- let n = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist();
3281
+ if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || e.sheets.length === 0) throw new B(W("error.workbook.sheetOne"));
3282
+ e.theme && (this._theme = new pe(e.theme), this._styles.setTheme(this._theme));
3283
+ let n = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist(), a = this._richValues.beginPersist();
3127
3284
  try {
3128
- n.fromJSON(e.strings), r.fromJSON(e.resources), i.fromJSON(e.styles), e.date1904 && (this._isDate1904 = !0), this._codeName = e.codeName ?? null, this._updateLinks = e.updateLinks ?? null, this._documentProperties.fromJSON(e.properties), e.locale && (this._locale = e.locale), e.localeOverrides && (this._localeOverrides = e.localeOverrides), e.view ||= {};
3129
- let a = [], o = e.pivotCaches;
3130
- if (o) {
3285
+ n.fromJSON(e.strings), r.fromJSON(e.resources), this._fetch.adopt(this._resources.getItems()), i.fromJSON(e.styles), a.fromJSON(e.richData, {
3286
+ resources: this._resources,
3287
+ strings: this._strings,
3288
+ fromResourceId: (e) => r.fromResourceId(e) ?? null
3289
+ }, e.richTypes), e.date1904 && (this._isDate1904 = !0), this._codeName = e.codeName ?? null, this._updateLinks = e.updateLinks ?? null, this._documentProperties.fromJSON(e.properties), e.locale && (this._locale = e.locale), e.localeOverrides && (this._localeOverrides = e.localeOverrides), e.view ||= {};
3290
+ let o = [], s = e.pivotCaches;
3291
+ if (s) {
3131
3292
  let e = r.fromResourceId.bind(r);
3132
- for (let t = 0; t < o.length; t++) {
3133
- let n = o[t];
3134
- n && typeof n.cacheId == "number" && a.push(new ir(n.cacheId, w.fromJSON(n.part, e)));
3293
+ for (let t = 0; t < s.length; t++) {
3294
+ let n = s[t];
3295
+ n && typeof n.cacheId == "number" && o.push(new br(n.cacheId, k.fromJSON(n.part, e)));
3135
3296
  }
3136
3297
  }
3137
- this._pivotCaches = a, this._people.fromJSON(e.people);
3138
- let s = e.sheets, c = s.length, l = e.view.activeSheetId ?? null;
3139
- l !== null && (l = Math.min(Math.max(0, l), c - 1));
3140
- let u = null, d = null;
3298
+ this._pivotCaches = o, this._people.fromJSON(e.people);
3299
+ let c = e.sheets, l = c.length, u = e.view.activeSheetId ?? null;
3300
+ u !== null && (u = Math.min(Math.max(0, u), l - 1));
3301
+ let d = null, f = null;
3141
3302
  this._isLoadingSheets = !0;
3142
- for (let e = 0; e < c; e++) {
3143
- let n = s[e], i = n.visibility || k.Visibility.Visible, a = e;
3144
- d = a, i === k.Visibility.Visible ? u === null && (u = a) : l !== null && l === a && (l = null);
3303
+ for (let e = 0; e < l; e++) {
3304
+ let n = c[e], i = n.visibility || A.Visibility.Visible, a = e;
3305
+ f = a, i === A.Visibility.Visible ? d === null && (d = a) : u !== null && u === a && (u = null);
3145
3306
  try {
3146
- let o = n.kind ?? k.Kind.Worksheet;
3147
- if (o !== k.Kind.Worksheet) {
3148
- let s = n.sheet, c = w.fromJSON(s?.part, r.fromResourceId.bind(r));
3149
- if (!c) throw new B(G("error.workbook.sheetPartMissing", { sheetName: n.name }));
3307
+ let o = n.kind ?? A.Kind.Worksheet;
3308
+ if (o !== A.Kind.Worksheet) {
3309
+ let s = n.sheet, c = k.fromJSON(s?.part, r.fromResourceId.bind(r));
3310
+ if (!c) throw new B(W("error.workbook.sheetPartMissing", { sheetName: n.name }));
3150
3311
  this._createOpaqueSheet(a, n.name, i, e, n.sheetId, o, c, s?.tabColor ?? null, t?.[e]);
3151
3312
  } else this._createSheet(a, n.name, i, e, n.sheetId, n.sheet, t?.[e]);
3152
3313
  } catch (e) {
3153
3314
  throw this._isLoadingSheets = !1, e;
3154
3315
  }
3155
3316
  }
3156
- this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: d }), e.view.activeSheetId = l ?? u, this.setView(new mr({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
3157
- let f = this;
3158
- this._protection = new gr(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
3159
- f._emitter.notify("onProtectionChange", { source: e });
3317
+ this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: f }), e.view.activeSheetId = u ?? d, this.setView(new Ir({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
3318
+ let p = this;
3319
+ this._protection = new Rr(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
3320
+ p._emitter.notify("onProtectionChange", { source: e });
3160
3321
  } }), this._emitter.notify("onLoad");
3161
3322
  } finally {
3162
- i.endPersist(), r.endPersist(), n.endPersist();
3323
+ a.endPersist(), i.endPersist(), r.endPersist(), n.endPersist();
3163
3324
  }
3164
3325
  }
3326
+ async _startFunctions() {
3327
+ let e = this._scripts;
3328
+ if (!e) return R.EmptyArray;
3329
+ await e._load();
3330
+ let t = [];
3331
+ for (let n of e.getModules().getItems()) this._startModules.add(n), t.push(...n.getFunctions().getItems({
3332
+ type: "formula",
3333
+ includeHidden: !0
3334
+ }));
3335
+ return t;
3336
+ }
3165
3337
  _createScripts(e) {
3166
3338
  let t = this;
3167
- return new cr({
3339
+ return new wr({
3168
3340
  transactions: this._transactions,
3169
3341
  json: e,
3170
3342
  workbook: t,
3171
3343
  getBuiltInFunctions: () => t._calculation?.getFunctions(),
3172
3344
  onAdd: (e, n) => {
3173
3345
  let r = t._calculation;
3174
- r.getStatus() !== E.Status.Off && r.start().then(async () => {
3346
+ r.getStatus() !== Le.Status.Off && r.start().then(async () => {
3347
+ if (t._startModules.has(n)) return;
3175
3348
  let e = n.getFunctions().getItems({
3176
3349
  type: "formula",
3177
3350
  includeHidden: !0
3178
- }), t = e.length;
3179
- for (let n = 0; n < t; n++) {
3180
- let t = e[n];
3351
+ }), r = e.length;
3352
+ for (let t = 0; t < r; t++) {
3353
+ let n = e[t];
3181
3354
  try {
3182
- await this._calculation.getFunctions().add(t);
3355
+ await this._calculation.getFunctions().add(n);
3183
3356
  } catch (e) {
3184
- V.error(e?.message ?? String(e), e);
3357
+ An.error(e?.message ?? String(e), e);
3185
3358
  }
3186
3359
  }
3187
3360
  }).catch(() => {});
@@ -3190,10 +3363,10 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3190
3363
  });
3191
3364
  }
3192
3365
  async toJSON(e) {
3193
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
3366
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
3194
3367
  await Promise.resolve(this._starting);
3195
3368
  let t = this.getCalculation();
3196
- t.getStatus() !== E.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
3369
+ t.getStatus() !== Le.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
3197
3370
  let n = { sheets: [] }, r = e?.ignoreStyles ?? !1;
3198
3371
  if (!r) {
3199
3372
  let e = this._theme.toJSON();
@@ -3206,56 +3379,62 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3206
3379
  this._isDate1904 && (n.date1904 = !0), this._codeName && (n.codeName = this._codeName), this._updateLinks && (n.updateLinks = this._updateLinks);
3207
3380
  let i = this._documentProperties.toJSON();
3208
3381
  Object.keys(i).length > 0 && (n.properties = i), this._locale && (n.locale = this._locale), this._localeOverrides && (n.localeOverrides = this._localeOverrides);
3209
- let a = e?.resources ?? "embed", o = a === "ignore", s = this._strings.beginPersist(), c = o ? null : this._resources.beginPersist(), l = this._styles.beginPersist();
3382
+ let a = e?.resources ?? "embed", o = a === "ignore", s = this._strings.beginPersist(), c = o ? null : this._resources.beginPersist(), l = this._styles.beginPersist(), u = this._richValues.beginPersist();
3210
3383
  try {
3211
- let t = this._getSheetRef(this.getSelectedSheetIndex()).id, i = t, u = null, d = this._getState(), f = d.sheetRefsAll, p = d.sheetsById, m = f.length;
3212
- for (let r = 0; r < m; r++) {
3213
- let a = f[r], o = r + 1, s, l = p.get(a.id);
3384
+ let t = this._getSheetRef(this.getSelectedSheetIndex()).id, i = t, d = null, f = this._getState(), p = f.sheetRefsAll, m = f.sheetsById, h = p.length;
3385
+ for (let r = 0; r < h; r++) {
3386
+ let a = p[r], o = r + 1, s, l = m.get(a.id);
3214
3387
  if (Z(a)) s = {
3215
3388
  name: a.name,
3216
3389
  sheet: await a.sheet.toJSON(e)
3217
3390
  };
3218
3391
  else {
3219
- let e = l, t = c ? c.toResourceId.bind(c) : () => null, n = { part: w.toJSON(e._getPart(), t) }, r = e.getTabColor();
3392
+ let e = l, t = c ? c.toResourceId.bind(c) : () => null, n = { part: k.toJSON(e._getPart(), t) }, r = e.getTabColor();
3220
3393
  r && (n.tabColor = r.toString()), s = {
3221
3394
  name: a.name,
3222
3395
  kind: e.getKind(),
3223
3396
  sheet: n
3224
3397
  };
3225
3398
  }
3226
- a.sheetId !== void 0 && (s.sheetId = a.sheetId), a.visibility === k.Visibility.Visible ? u === null && (u = o) : s.visibility = a.visibility, a.id === t && (i = o), n.sheets.push(s);
3399
+ a.sheetId !== void 0 && (s.sheetId = a.sheetId), a.visibility === A.Visibility.Visible ? d === null && (d = o) : s.visibility = a.visibility, a.id === t && (i = o), n.sheets.push(s);
3227
3400
  }
3228
3401
  if (!r) {
3229
3402
  let e = l.toJSON();
3230
3403
  e && Object.keys(e).length > 0 && (n.styles = e);
3231
3404
  }
3232
- let h = this.getProtection().toJSON();
3233
- h && (n.protection = h);
3234
- let g = this._calculation.toJSON();
3235
- Object.keys(g).length > 0 && (n.calc = g);
3236
- let _ = await s.toJSONAsync();
3237
- _ && _.length > 0 && (n.strings = _);
3238
- let v = this._calculation.getExternalBooks().toJSON();
3239
- v && (n.externalBooks = v);
3240
- let y = this._pivotCaches;
3405
+ let g = this.getProtection().toJSON();
3406
+ g && (n.protection = g);
3407
+ let _ = this._calculation.toJSON();
3408
+ Object.keys(_).length > 0 && (n.calc = _);
3409
+ let v = await s.toJSONAsync();
3410
+ v && v.length > 0 && (n.strings = v);
3411
+ let y = await u.toJSONAsync(c ? c.toResourceId.bind(c) : void 0);
3241
3412
  if (y.length > 0) {
3413
+ n.richData = y;
3414
+ let e = u.toKindsJSON();
3415
+ e.length > 0 && (n.richTypes = e);
3416
+ }
3417
+ let b = this._calculation.getExternalBooks().toJSON();
3418
+ b && (n.externalBooks = b);
3419
+ let x = this._pivotCaches;
3420
+ if (x.length > 0) {
3242
3421
  let e = c ? c.toResourceId.bind(c) : () => null, t = /* @__PURE__ */ new Set();
3243
3422
  for (let e of this.getPivotTables()) t.add(e.getCacheId());
3244
3423
  let r = [];
3245
- for (let n = 0; n < y.length; n++) t.has(y[n].cacheId) && r.push(y[n].toJSON(e));
3424
+ for (let n = 0; n < x.length; n++) t.has(x[n].cacheId) && r.push(x[n].toJSON(e));
3246
3425
  r.length > 0 && (n.pivotCaches = r);
3247
3426
  }
3248
- let b = this._people.toJSON();
3249
- if (b && (n.people = b), !o) {
3427
+ let S = this._people.toJSON();
3428
+ if (S && (n.people = S), !o) {
3250
3429
  let e = await c.toJSONAsync(typeof a == "function" ? a : void 0);
3251
3430
  e && e.length > 0 && (n.resources = e);
3252
3431
  }
3253
- let x = this._calculation.getNamedFormulas().toJSON();
3254
- x && x.length > 0 && (n.names = x);
3255
- let S = this._view.toJSON();
3256
- S && (i === u ? delete S.activeSheetId : S.activeSheetId = i, Object.keys(S).length > 0 && (n.view = S));
3432
+ let C = this._calculation.getNamedFormulas().toJSON();
3433
+ C && C.length > 0 && (n.names = C);
3434
+ let w = this._view.toJSON();
3435
+ w && (i === d ? delete w.activeSheetId : w.activeSheetId = i, Object.keys(w).length > 0 && (n.view = w));
3257
3436
  } finally {
3258
- l.endPersist(), o || c.endPersist(), s.endPersist();
3437
+ u.endPersist(), l.endPersist(), o || c.endPersist(), s.endPersist();
3259
3438
  }
3260
3439
  return this._emitter.notify("onSave", { params: n }), n;
3261
3440
  }
@@ -3275,24 +3454,24 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3275
3454
  } catch (e) {
3276
3455
  console.warn("error on close", e);
3277
3456
  }
3278
- this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof Dn && this._originProvider.release(), this._closed = !0;
3457
+ this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof Un && this._originProvider.release(), this._closed = !0;
3279
3458
  }
3280
3459
  beginCommit(e) {
3281
- if (this._closed) throw Error(G("error.workbook.modelClosed"));
3460
+ if (this._closed) throw Error(W("error.workbook.modelClosed"));
3282
3461
  return this._beginCommit(typeof e == "string" ? { description: e } : e);
3283
3462
  }
3284
3463
  doBatch(e, t) {
3285
- let r = this;
3464
+ let n = this;
3286
3465
  t = typeof t == "string" ? { description: t } : {
3287
- description: W("op.updateWorkbook"),
3466
+ description: U("op.updateWorkbook"),
3288
3467
  ...t
3289
3468
  };
3290
- let i = n.bind(this._transactions, this, e);
3469
+ let i = r.bind(this._transactions, this, e);
3291
3470
  return this._transactions.doBatch(i.callback, {
3292
3471
  ...t,
3293
3472
  onChildCommit: i.onChildCommit
3294
3473
  }, (e, t) => {
3295
- i.close(), e.getDepth() === 0 && (r._lastTransactionUUID = e.getId());
3474
+ i.close(), e.getDepth() === 0 && (n._lastTransactionUUID = e.getId());
3296
3475
  });
3297
3476
  }
3298
3477
  _beginCommit(e) {
@@ -3304,7 +3483,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3304
3483
  _getState() {
3305
3484
  return this._transactions.getState(this._id);
3306
3485
  }
3307
- _updateState(e, t = W("op.updateWorkbook"), n) {
3486
+ _updateState(e, t = U("op.updateWorkbook"), n) {
3308
3487
  if (!e) return;
3309
3488
  let r = this._beginCommit(t);
3310
3489
  try {
@@ -3325,7 +3504,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3325
3504
  get isIWorkbook() {
3326
3505
  return !0;
3327
3506
  }
3328
- }, Ir = { address: null }, Z = (e) => e.sheet.getKind() === k.Kind.Worksheet, Lr = class {
3507
+ }, ii = { address: null }, Z = (e) => e.sheet.getKind() === A.Kind.Worksheet, ai = class {
3329
3508
  constructor() {
3330
3509
  this._readFormats = [], this._writeFormats = [], this._encryptions = [];
3331
3510
  }
@@ -3399,9 +3578,9 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3399
3578
  return !0;
3400
3579
  });
3401
3580
  }
3402
- }, Rr = /* @__PURE__ */ new WeakMap(), zr = (e) => !!e && typeof e == "object" && typeof e.getPath == "function" && typeof e.canWrite == "function", Br = class {
3581
+ }, oi = /* @__PURE__ */ new WeakMap(), si = (e) => !!e && typeof e == "object" && typeof e.getPath == "function" && typeof e.canWrite == "function", ci = class {
3403
3582
  constructor() {
3404
- this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new e(this), this._registry = new Lr(), this._defaultStore = new kn(() => this.getWriteFormats(), () => this.getReadFormats());
3583
+ this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new t(this), this._registry = new ai(), this._defaultStore = new Gn(() => this.getWriteFormats(), () => this.getReadFormats());
3405
3584
  }
3406
3585
  getBackingStore() {
3407
3586
  return this._backingStore ?? this._defaultStore;
@@ -3436,15 +3615,15 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3436
3615
  return this._registry.getWriteFormats(e);
3437
3616
  }
3438
3617
  getOrigin(e) {
3439
- return new K(e);
3618
+ return new G(e);
3440
3619
  }
3441
3620
  async read(e) {
3442
3621
  let t = null;
3443
3622
  if (typeof e == "string") e = { source: e };
3444
- else if (zr(e)) {
3623
+ else if (si(e)) {
3445
3624
  let n = e.getPath();
3446
3625
  if (!n) throw Error("Cannot read from an unbound origin (no path).");
3447
- Tn(e) ? e = {
3626
+ Vn(e) ? e = {
3448
3627
  source: n,
3449
3628
  asCopy: !0
3450
3629
  } : (t = e, e = { source: n });
@@ -3463,20 +3642,20 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3463
3642
  search: i,
3464
3643
  ext: a
3465
3644
  }))[0];
3466
- if (!o) throw new B(G("error.io.readFormatUnavailable", { format: i ?? a }));
3645
+ if (!o) throw new B(W("error.io.readFormatUnavailable", { format: i ?? a }));
3467
3646
  let s = n?.typedCreateWorkbookOptions, c = s ? Object.keys(s).find((e) => e.toLowerCase() === o.key.toLowerCase()) : void 0, l = {
3468
3647
  ...n,
3469
3648
  ...c === void 0 ? void 0 : s[c]
3470
3649
  };
3471
3650
  delete l.typedCreateWorkbookOptions, delete l.source, delete l.asCopy;
3472
- let u = r ?? new K(t.absolutePath ?? null, {
3651
+ let u = r ?? new G(t.absolutePath ?? null, {
3473
3652
  name: t.name ?? null,
3474
3653
  format: o.key,
3475
3654
  size: t.size ?? null,
3476
3655
  lastModified: t.lastModified ?? null,
3477
3656
  canWrite: t.canWrite ?? !1
3478
3657
  });
3479
- r instanceof K && r.update({
3658
+ r instanceof G && r.update({
3480
3659
  format: o.key,
3481
3660
  size: t.size ?? null,
3482
3661
  lastModified: t.lastModified ?? null
@@ -3510,7 +3689,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3510
3689
  }
3511
3690
  async _decrypt(e, t, n) {
3512
3691
  let r = await this._registry.detectEncryption(e);
3513
- if (t instanceof K && t.update({ encryption: r ? r.key : null }), !r) return {
3692
+ if (t instanceof G && t.update({ encryption: r ? r.key : null }), !r) return {
3514
3693
  bytes: e,
3515
3694
  password: null
3516
3695
  };
@@ -3518,7 +3697,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3518
3697
  try {
3519
3698
  return i = await r.decode(e, t), !0;
3520
3699
  } catch (e) {
3521
- if (!(e instanceof pn)) throw e;
3700
+ if (!(e instanceof On)) throw e;
3522
3701
  return !1;
3523
3702
  }
3524
3703
  };
@@ -3528,7 +3707,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3528
3707
  };
3529
3708
  if (!n?.onPassword) {
3530
3709
  let e = t.getName();
3531
- throw new gn(e ? G("error.io.passwordRequired", { name: e }) : G("error.io.passwordRequiredUnnamed"));
3710
+ throw new Mn(e ? W("error.io.passwordRequired", { name: e }) : W("error.io.passwordRequiredUnnamed"));
3532
3711
  }
3533
3712
  let o = await Promise.resolve(n.onPassword({
3534
3713
  origin: t,
@@ -3540,16 +3719,16 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3540
3719
  bytes: i,
3541
3720
  password: o
3542
3721
  };
3543
- throw new pn(G("error.io.passwordIncorrect"));
3722
+ throw new On(W("error.io.passwordIncorrect"));
3544
3723
  }
3545
3724
  async writeArrayBuffer(e, t) {
3546
3725
  if (!t?.format) throw Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
3547
3726
  let n = (await this._registry.getWriteFormats({ search: t.format }))[0];
3548
- if (!n) throw new B(G("error.io.writeFormatUnavailable", { format: t.format }));
3727
+ if (!n) throw new B(W("error.io.writeFormatUnavailable", { format: t.format }));
3549
3728
  return this._writeArrayBuffer(e, n, t);
3550
3729
  }
3551
3730
  async write(e, t, n) {
3552
- return typeof t == "string" || zr(t) ? this._write(e, t, !1, n) : this._write(e, e?.getOrigin?.(), !0, t ?? n);
3731
+ return typeof t == "string" || si(t) ? this._write(e, t, !1, n) : this._write(e, e?.getOrigin?.(), !0, t ?? n);
3553
3732
  }
3554
3733
  async writeAs(e, t, n) {
3555
3734
  if (!t) throw Error("A target must be provided for writeAs (use write(workbook) for a plain save).");
@@ -3559,13 +3738,13 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3559
3738
  if (!e) throw Error("Workbook must be provided.");
3560
3739
  if (!e.isIWorkbook) throw Error("Invalid workbook model provided. Must be an instance of IWorkbook.");
3561
3740
  let i = typeof t == "string" ? this.getOrigin(t) : t, a = i.getFormat(), o;
3562
- if ((r?.format || a) && (o = (await this._registry.getWriteFormats({ search: r?.format ?? a ?? void 0 }))[0]), o || i.getPath() && i.canWrite() && i.getExtension() || (o = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !o) throw new B(G("error.io.writeFormatUnresolved"));
3741
+ if ((r?.format || a) && (o = (await this._registry.getWriteFormats({ search: r?.format ?? a ?? void 0 }))[0]), o || i.getPath() && i.canWrite() && i.getExtension() || (o = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !o) throw new B(W("error.io.writeFormatUnresolved"));
3563
3742
  let s = i.getExtension();
3564
3743
  if (r?.format && s && i.getPath() && i.canWrite() && !o.exts.includes(s)) {
3565
3744
  let e = (await this._registry.getWriteFormats({ ext: s }))[0];
3566
3745
  if (e && e.key !== o.key) {
3567
3746
  let e = i.getPath().split(/[/\\]/).pop();
3568
- throw new B(G("error.io.writeFormatMismatch", {
3747
+ throw new B(W("error.io.writeFormatMismatch", {
3569
3748
  format: r.format,
3570
3749
  file: e
3571
3750
  }));
@@ -3573,16 +3752,16 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3573
3752
  }
3574
3753
  if (typeof t == "string") {
3575
3754
  let e = i.getPath();
3576
- i = new K(S(e) ? e : `${e}.${o.exts[0]}`, { format: o.key });
3755
+ i = new G(E(e) ? e : `${e}.${o.exts[0]}`, { format: o.key });
3577
3756
  }
3578
- let c = i.getEncryption(), l = e.getOrigin?.(), u = (i instanceof K ? i.getPassword() : null) ?? (l instanceof K ? l.getPassword() : null), d = i.isEncrypted() || (l?.isEncrypted() ?? !1), f = r?.password === void 0 ? u ?? (d ? void 0 : null) : r.password, p = null;
3757
+ let c = i.getEncryption(), l = e.getOrigin?.(), u = (i instanceof G ? i.getPassword() : null) ?? (l instanceof G ? l.getPassword() : null), d = i.isEncrypted() || (l?.isEncrypted() ?? !1), f = r?.password === void 0 ? u ?? (d ? void 0 : null) : r.password, p = null;
3579
3758
  if (f === void 0) {
3580
3759
  if (d) {
3581
3760
  let e = i.getName();
3582
- throw new gn(e ? G("error.io.passwordRequiredSave", { name: e }) : G("error.io.passwordRequiredSaveUnnamed"));
3761
+ throw new Mn(e ? W("error.io.passwordRequiredSave", { name: e }) : W("error.io.passwordRequiredSaveUnnamed"));
3583
3762
  }
3584
- } else if (f !== null && (p = await this._registry.getEncryption(c), !p)) throw new B(G("error.io.encryptionUnavailable"));
3585
- let m = `${i.getName() ?? G("workbook.defaultName")}.${o.exts[0]}`, h = r?.progress, g = !i.getPath() || !i.canWrite() || !!r?.prompt, _ = !1, v = this, y = null, b = [], x = {
3763
+ } else if (f !== null && (p = await this._registry.getEncryption(c), !p)) throw new B(W("error.io.encryptionUnavailable"));
3764
+ let m = `${i.getName() ?? W("workbook.defaultName")}.${o.exts[0]}`, h = r?.progress, g = !i.getPath() || !i.canWrite() || !!r?.prompt, _ = !1, v = this, y = null, b = [], x = {
3586
3765
  workbook: e,
3587
3766
  format: o,
3588
3767
  origin: i,
@@ -3607,7 +3786,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3607
3786
  }))(h, l), d = await v._writeArrayBuffer(e, c, {
3608
3787
  ...r,
3609
3788
  progress: u
3610
- }), m = Rr.get(s);
3789
+ }), m = oi.get(s);
3611
3790
  if (l.some((e) => !m?.has(e.message)) && r?.onWarnings) {
3612
3791
  let t = await Promise.resolve(r.onWarnings({
3613
3792
  workbook: e,
@@ -3620,37 +3799,37 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3620
3799
  }
3621
3800
  return b = l, p ? p.encode(d, f) : d;
3622
3801
  }
3623
- }, C = null;
3802
+ }, S = null;
3624
3803
  try {
3625
3804
  let t = this.getBackingStore();
3626
3805
  if (!t.write) throw Error("The active backing store is read-only (no write implementation).");
3627
- if (C = await t.write(x), C) {
3628
- if (f !== void 0 && C instanceof K && (C.setPassword(f), C.update({ encryption: p ? p.key : null })), b.length) {
3629
- let e = Rr.get(C) ?? /* @__PURE__ */ new Set();
3806
+ if (S = await t.write(x), S) {
3807
+ if (f !== void 0 && S instanceof G && (S.setPassword(f), S.update({ encryption: p ? p.key : null })), b.length) {
3808
+ let e = oi.get(S) ?? /* @__PURE__ */ new Set();
3630
3809
  for (let t of b) e.add(t.message);
3631
- Rr.set(C, e);
3810
+ oi.set(S, e);
3632
3811
  }
3633
- n && C !== e.getOrigin() && Tn(e.getOrigin())?.setOrigin(C);
3812
+ n && S !== e.getOrigin() && Vn(e.getOrigin())?.setOrigin(S);
3634
3813
  let t = y ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
3635
3814
  this._emitter.notify("onWrite", {
3636
3815
  params: {
3637
3816
  workbook: e,
3638
- origin: C,
3817
+ origin: S,
3639
3818
  commitId: t?.getId() ?? null,
3640
3819
  save: n
3641
3820
  },
3642
3821
  transactional: !1
3643
3822
  });
3644
3823
  }
3645
- h?.onComplete && await Promise.resolve(h.onComplete(C));
3824
+ h?.onComplete && await Promise.resolve(h.onComplete(S));
3646
3825
  } catch (e) {
3647
3826
  let t = e instanceof Error ? e : Error(String(e));
3648
- throw h?.onError && await Promise.resolve(h.onError(t)), h?.onComplete && await Promise.resolve(h.onComplete(null)), t instanceof B ? t : Error(G("error.io.writeFailed", { reason: t.message }), { cause: e });
3827
+ throw h?.onError && await Promise.resolve(h.onError(t)), h?.onComplete && await Promise.resolve(h.onComplete(null)), t instanceof B ? t : Error(W("error.io.writeFailed", { reason: t.message }), { cause: e });
3649
3828
  }
3650
- return C;
3829
+ return S;
3651
3830
  }
3652
3831
  _stripExtension(e) {
3653
- let t = S(e);
3832
+ let t = E(e);
3654
3833
  return t ? e.slice(0, e.length - t.length - 1) : e;
3655
3834
  }
3656
3835
  _baseName(e) {
@@ -3670,24 +3849,24 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3670
3849
  async _readArrayBuffer(e, t, n) {
3671
3850
  if (!e) throw Error("ArrayBuffer must be specified.");
3672
3851
  if (!t) throw Error("format must be specified.");
3673
- if (e.byteLength === 0) return new Fr(n?.createWorkbookOptions);
3852
+ if (e.byteLength === 0) return new ri(n?.createWorkbookOptions);
3674
3853
  let r = t.handler;
3675
3854
  if (!r) throw Error(`Unable to resolve a read handler for '${t.key}'.`);
3676
3855
  let i;
3677
3856
  try {
3678
3857
  i = await r(e, n);
3679
3858
  } catch (e) {
3680
- throw e instanceof B ? e : new B(G("error.io.readFailed", {
3859
+ throw e instanceof B ? e : new B(W("error.io.readFailed", {
3681
3860
  format: t.description ?? t.key,
3682
3861
  reason: e?.message ?? String(e)
3683
3862
  }), { cause: e });
3684
3863
  }
3685
- return await Ue(), i;
3864
+ return await Nt(), i;
3686
3865
  }
3687
3866
  get isIWorkbookIO() {
3688
3867
  return !0;
3689
3868
  }
3690
- }, Vr = new Br(), Hr = class {
3869
+ }, li = new ci(), ui = class {
3691
3870
  constructor() {
3692
3871
  this._buffer = null, this._formatKey = null;
3693
3872
  }
@@ -3701,7 +3880,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3701
3880
  async read(e) {
3702
3881
  return this._buffer ? e.decode(this._buffer, { format: this._formatKey ?? void 0 }) : null;
3703
3882
  }
3704
- }, Ur = "locales", Wr = "fonts", Gr = {
3883
+ }, di = "locales", fi = "fonts", pi = {
3705
3884
  suffix: ".msg.json",
3706
3885
  async extract(e) {
3707
3886
  let t = e.relPath.split("/");
@@ -3711,7 +3890,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3711
3890
  } : null;
3712
3891
  },
3713
3892
  place: (e, t) => t ? `${t}/${e}` : null
3714
- }, Kr = [
3893
+ }, mi = [
3715
3894
  ".woff2",
3716
3895
  ".woff",
3717
3896
  ".ttf",
@@ -3721,7 +3900,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3721
3900
  ].map((e) => ({
3722
3901
  suffix: e,
3723
3902
  place: (e, t) => t ? `${t}/${e}` : e
3724
- })), qr = {
3903
+ })), hi = {
3725
3904
  suffix: ".metrics.json",
3726
3905
  async extract(e) {
3727
3906
  let t = await e.readJson();
@@ -3732,13 +3911,13 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3732
3911
  } : null;
3733
3912
  },
3734
3913
  place: (e, t) => t ? `${t}/${e}` : e
3735
- }, Jr = [{
3736
- kind: Ur,
3737
- files: [Gr]
3914
+ }, gi = [{
3915
+ kind: di,
3916
+ files: [pi]
3738
3917
  }, {
3739
- kind: Wr,
3918
+ kind: fi,
3740
3919
  files: [
3741
- qr,
3920
+ hi,
3742
3921
  {
3743
3922
  suffix: ".hinted.json",
3744
3923
  async extract(e) {
@@ -3750,7 +3929,7 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3750
3929
  hinted: !0
3751
3930
  } : null;
3752
3931
  },
3753
- place: qr.place
3932
+ place: hi.place
3754
3933
  },
3755
3934
  {
3756
3935
  suffix: ".rows.json",
@@ -3763,40 +3942,40 @@ var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
3763
3942
  rows: !0
3764
3943
  } : null;
3765
3944
  },
3766
- place: qr.place
3945
+ place: hi.place
3767
3946
  },
3768
- ...Kr
3947
+ ...mi
3769
3948
  ]
3770
3949
  }];
3771
- async function Yr(e, t) {
3772
- let { Chart: n } = await import("./Dyq_ivuHvlXLwPCl.mjs");
3950
+ async function _i(e, t) {
3951
+ let { Chart: n } = await import("./BVshV1iY3bcUH9_E.mjs");
3773
3952
  return new n({
3774
3953
  json: e,
3775
3954
  getStyles: t?.getStyles
3776
3955
  });
3777
3956
  }
3778
- Ar ||= {};
3957
+ Qr ||= {};
3779
3958
  var Q = null;
3780
- function Xr() {
3959
+ function vi() {
3781
3960
  if (!Q) {
3782
- let e = import("./DWNzqw7DUKwoxjri.mjs").then((e) => e.loadScriptingDeclarations());
3961
+ let e = import("./CL84-iL2QeKlLzo5.mjs").then((e) => e.loadScriptingDeclarations());
3783
3962
  e.catch(() => {
3784
3963
  Q = null;
3785
3964
  }), Q = e;
3786
3965
  }
3787
3966
  return Q;
3788
3967
  }
3789
- var Zr, Qr, $r, $ = null;
3790
- function ei() {
3968
+ var yi, bi, xi, $ = null;
3969
+ function Si() {
3791
3970
  if (!$) {
3792
- let e = import("./DWNzqw7DUKwoxjri.mjs").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
3971
+ let e = import("./CL84-iL2QeKlLzo5.mjs").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
3793
3972
  e.catch(() => {
3794
3973
  $ = null;
3795
3974
  }), $ = e;
3796
3975
  }
3797
3976
  return $;
3798
3977
  }
3799
- Zr ||= {}, (Qr ||= {}).Type = {
3978
+ yi ||= {}, (bi ||= {}).Type = {
3800
3979
  Button: "button",
3801
3980
  CheckBox: "checkBox",
3802
3981
  OptionButton: "optionButton",
@@ -3809,12 +3988,12 @@ Zr ||= {}, (Qr ||= {}).Type = {
3809
3988
  EditBox: "editBox",
3810
3989
  Dialog: "dialog",
3811
3990
  Unknown: "formControl"
3812
- }, ($r ||= {}).DropStyle = {
3991
+ }, (xi ||= {}).DropStyle = {
3813
3992
  Combo: "combo",
3814
3993
  ComboEdit: "comboEdit",
3815
3994
  Simple: "simple"
3816
3995
  };
3817
- var ti = class extends qe {
3996
+ var Ci = class extends S {
3818
3997
  constructor(e) {
3819
3998
  super(e);
3820
3999
  }
@@ -3827,8 +4006,8 @@ var ti = class extends qe {
3827
4006
  colEnd: (e?.size?.width ?? 5) - 1,
3828
4007
  rowEnd: (e?.size?.height ?? 5) - 1
3829
4008
  },
3830
- getRanges: (e) => new pe(null)
4009
+ getRanges: (e) => new m(null)
3831
4010
  }, super._initializeOptions(e);
3832
4011
  }
3833
- }, ni = "0.8.0-beta.11", ri = "2026-10-23T19:00:05.446Z";
3834
- export { ke as AbstractCollection, r as AbstractMovableContent, Ye as AddressUtils, Hr as ArrayBackingStore, ie as AutoFill, ri as BUILD_DATE, se as ChartElementSelection, cn as ChartKinds, en as Color, me as Condition, tt as DateUtils, Br as DefaultWorkbookIO, _ as EXTERNAL_LINK_PATH_REL_TYPE, dr as ExternalRangeClipboardItem, Wr as FONTS_KIND, Ut as FontUtils, u as FormulaText, Yn as FunctionDeclarations, Ie as GeomUtils, Et as IAnchored, Bt as IBorders, E as ICalculation, Re as ICell, Kn as ICellHeaderRange, Je as ICellRange, Gn as ICellRanges, Zt as ICellStyle, $t as IColor, Qe as ICondition, $e as IConditionalFormat, X as ICustomProperty, ut as IDataValidation, $r as IDropDown, tn as IEffect, Qt as IFill, M as IFont, Ct as IFontCollection, F as IFontStyle, Qr as IFormControl, ln as IGeometry, Zr as IMovable, f as IPageLayout, Ar as IPicture, Wn as IResource, Fe as IScript, Gt as IShape, k as ISheet, h as ISlicerStyle, Cn as ISort, rn as IStroke, it as ITable, o as ITableStyle, Oe as IText, N as ITextFrame, Un as ITheme, le as IThemeCollection, vn as IWorkbookIO, rr as IWorkbookView, Ge as IWorksheetView, Ur as LOCALES_KIND, he as LicenseManager, St as MovableContentRegistry, ot as NamedStyleCollection, P as NumberFormat, sn as PaintUtils, or as PersonCollection, ur as RangeClipboardItem, Pn as RectAlignment, Te as Registry, jt as Resource, Le as ResourceCollection, dt as RichDataRegistry, bt as RichText, ze as RichTextKind, Jr as SHEETXL_RESOURCE_KINDS, an as SYSTEM_COLOR_CSS_PREFIX, zt as ShapeStyleUtils, Ve as SimpleFontFace, p as SlicerStyleCollection, Pe as Sort, Nt as StringCollection, _e as StyleCollection, ti as Table, ce as TableStyleCollection, Ce as TextRotation, ve as TextStacked, v as TextUtils, re as Theme, oe as ThemeCollection, t as TransactionConflictError, Sn as TransactionSaveStateManager, i as TransactionStore, yn as TransactionUndoManager, ae as Tuple, ni as VERSION, Fr as Workbook, Vr as WorkbookIO, K as WorkbookOrigin, mr as WorkbookView, A as Worksheet, Hn as builtInStyleNameDisplay, ge as createCellRangeCounts, Yr as createChart, x as externalBookClosedName, ne as externalBookFileName, fe as externalBookLocation, Ft as externalBookOpenName, Dt as findLabel, Xn as getBuiltInFunctionNames, pt as getLanguagePack, Kt as getLocaleProfile, ft as getScriptRuntime, ei as getScriptingApi, Xr as getScriptingDeclarations, ct as localizeBoolean, Xe as localizeErrorLabel, It as makeLocaleProfile, Pt as normalizeLabel, Ke as parseBooleanLocal, je as parseErrorLocal, c as parseExternalScope, Zn as parseFormulaLiteral, We as registerSdkLocales, Se as sourceEntryFromPath, xt as withScriptRuntime };
4012
+ }, wi = "0.8.0-beta.13", Ti = "2026-11-04T00:27:03.860Z";
4013
+ export { $e as AbstractCollection, i as AbstractMovableContent, ie as AddressUtils, ui as ArrayBackingStore, w as AutoFill, Ti as BUILD_DATE, We as CellControlRegistry, Re as CellImage, x as CellImageKind, s as ChartElementSelection, Cn as ChartKinds, oe as CheckboxKind, un as Color, ye as Condition, Kt as DateUtils, ci as DefaultWorkbookIO, Ht as EXTERNAL_LINK_PATH_REL_TYPE, Nr as ExternalRangeClipboardItem, fi as FONTS_KIND, Or as Fetcher, $t as FontUtils, Se as FormulaText, dr as FunctionDeclarations, Me as GeomUtils, v as Hyperlink, Te as HyperlinkKind, be as IAnchored, gn as IBorders, Le as ICalculation, qe as ICell, cr as ICellHeaderRange, l as ICellRange, sr as ICellRanges, vn as ICellStyle, hn as IColor, vt as ICondition, Ke as IConditionalFormat, X as ICustomProperty, He as IDataValidation, xi as IDropDown, ln as IEffect, yn as IFill, N as IFont, xe as IFontCollection, M as IFontStyle, bi as IFormControl, Xt as IGeometry, yi as IMovable, gt as IPageLayout, Qr as IPicture, or as IResource, mt as IRichDataKind, lt as IScript, fn as IShape, A as ISheet, f as ISlicerStyle, zn as ISort, pn as IStroke, re as ITable, Ge as ITableStyle, Rt as IText, P as ITextFrame, ar as ITheme, de as IThemeCollection, Pn as IWorkbookIO, yr as IWorkbookView, Yt as IWorksheetView, di as LOCALES_KIND, le as LicenseManager, nt as MovableContentRegistry, Ve as NamedStyleCollection, F as NumberFormat, Sn as PaintUtils, Sr as PersonCollection, Mr as RangeClipboardItem, Xn as RectAlignment, Gt as Registry, te as Resource, ke as ResourceCollection, h as RichArray, Bt as RichArrayKind, Ot as RichDataCollection, Ut as RichDataRegistry, Ie as RichRecord, _t as RichText, c as RichTextKind, gi as SHEETXL_RESOURCE_KINDS, dn as SYSTEM_COLOR_CSS_PREFIX, tn as ShapeStyleUtils, De as SimpleFontFace, Ue as SlicerStyleCollection, et as Sort, Ce as StringCollection, Jt as StyleCollection, Ci as Table, ae as TableStyleCollection, wt as TextRotation, st as TextStacked, xt as TextUtils, pe as Theme, Dt as ThemeCollection, n as TransactionConflictError, Rn as TransactionSaveStateManager, a as TransactionStore, Fn as TransactionUndoManager, Ct as Tuple, wi as VERSION, ri as Workbook, li as WorkbookIO, G as WorkbookOrigin, Ir as WorkbookView, T as Worksheet, ir as builtInStyleNameDisplay, b as createCellRangeCounts, _i as createChart, Be as externalBookClosedName, C as externalBookFileName, y as externalBookLocation, Ee as externalBookOpenName, fe as findLabel, fr as getBuiltInFunctionNames, ce as getLanguagePack, mn as getLocaleProfile, Et as getScriptRuntime, Si as getScriptingApi, vi as getScriptingDeclarations, he as localizeBoolean, Ne as localizeErrorLabel, _n as makeLocaleProfile, Ye as normalizeLabel, qt as parseBooleanLocal, d as parseErrorLocal, yt as parseExternalScope, pr as parseFormulaLiteral, ee as registerSdkLocales, u as sourceEntryFromPath, St as withScriptRuntime };