@sheetxl/studio-mui 0.1.98

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 (178) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +24 -0
  3. package/build/browser/cjs/4XrhSt2xtUIXkiCt.cjs +1516 -0
  4. package/build/browser/cjs/B3EvhaQf456RMc1Q.cjs +6 -0
  5. package/build/browser/cjs/B3kl467PN2cpvrfz.cjs +12 -0
  6. package/build/browser/cjs/B5LCoenQbQmzic16.cjs +314 -0
  7. package/build/browser/cjs/BBuyHZwFlDRvHzBH.cjs +7 -0
  8. package/build/browser/cjs/BGoG_ROASNB2owBR.cjs +28 -0
  9. package/build/browser/cjs/BJ6Da8vZLjAl44pz.cjs +6 -0
  10. package/build/browser/cjs/BL_UVvG75SFsFaT3.cjs +6 -0
  11. package/build/browser/cjs/BNDoTytIOGtVh5l9.cjs +6 -0
  12. package/build/browser/cjs/BQOyVCuOdwDja_VV.cjs +42 -0
  13. package/build/browser/cjs/BRiPktKUmeJipjaa.cjs +6 -0
  14. package/build/browser/cjs/BabbNVs5iKg49rfk.cjs +6 -0
  15. package/build/browser/cjs/BcOX5vODdThWbKrR.cjs +6 -0
  16. package/build/browser/cjs/BchlMljYmXDs0Ol2.cjs +6 -0
  17. package/build/browser/cjs/BmYZvm13acvbFhOu.cjs +6 -0
  18. package/build/browser/cjs/BmbsW1n0-CkF3ITF.cjs +6 -0
  19. package/build/browser/cjs/BnCUyGP_ERKmL3ZR.cjs +6 -0
  20. package/build/browser/cjs/BtP4E1_yhMjpfbr5.cjs +6 -0
  21. package/build/browser/cjs/C3E9wmSfmgYmXfJN.cjs +205 -0
  22. package/build/browser/cjs/C3Hl78e9qfEHxJYc.cjs +6 -0
  23. package/build/browser/cjs/CEvRH8aOx3etutK_.cjs +17 -0
  24. package/build/browser/cjs/CLZSdaBnKDfb142R.cjs +6 -0
  25. package/build/browser/cjs/CN1cS39WcNrcPVqS.cjs +129 -0
  26. package/build/browser/cjs/CSH1hUnHovjo8Lb8.cjs +6 -0
  27. package/build/browser/cjs/CTNt3asYQRA-MROc.cjs +47 -0
  28. package/build/browser/cjs/C_JZEtvgcli6T7Wg.cjs +11 -0
  29. package/build/browser/cjs/CbaYZmvS8u-p_Z8Z.cjs +6 -0
  30. package/build/browser/cjs/Cc-4c3DRm96wq5rj.cjs +12 -0
  31. package/build/browser/cjs/CnY6DbatGmPyylfU.cjs +20 -0
  32. package/build/browser/cjs/CqkQGfzNax6GmZFo.cjs +6 -0
  33. package/build/browser/cjs/D2AF0a4vbNKzFxzA.cjs +21 -0
  34. package/build/browser/cjs/D4y1iYdx8sdwQ50T.cjs +6 -0
  35. package/build/browser/cjs/D5cF1EnyvnPY2IxS.cjs +150 -0
  36. package/build/browser/cjs/DA1-OPTYQTepGKEg.cjs +11 -0
  37. package/build/browser/cjs/DJDMVDpUqlEKYLjt.cjs +6 -0
  38. package/build/browser/cjs/DLXLJ8SNNjwM5C-P.cjs +6 -0
  39. package/build/browser/cjs/DV8lOsZBgyx7MTBW.cjs +6 -0
  40. package/build/browser/cjs/DZAPn_d9mpvfRzsb.cjs +6 -0
  41. package/build/browser/cjs/DaicqO_9d1hYzyB_.cjs +11 -0
  42. package/build/browser/cjs/Dfh6eMCbAjW14fdh.cjs +6 -0
  43. package/build/browser/cjs/DhI2lgDZL8GqBejN.cjs +6 -0
  44. package/build/browser/cjs/Ds6s8fpzOZsd2m1r.cjs +6 -0
  45. package/build/browser/cjs/DvIWGmDT5uBVQ5zH.cjs +16 -0
  46. package/build/browser/cjs/DvLgu20RiaayrJcW.cjs +7 -0
  47. package/build/browser/cjs/Dvhwt25gyHzxQLrp.cjs +6 -0
  48. package/build/browser/cjs/DvwApJM_CVrlpLxn.cjs +6 -0
  49. package/build/browser/cjs/DwVYzo4a05DMfta_.cjs +28 -0
  50. package/build/browser/cjs/NYdqUauA5i2q33UZ.cjs +6 -0
  51. package/build/browser/cjs/S2Xfq-KDgoT7ipPC.cjs +25 -0
  52. package/build/browser/cjs/TOZQZr9ZZ_Q-jdQZ.cjs +6 -0
  53. package/build/browser/cjs/bJuLOalXTwrshZL3.cjs +16 -0
  54. package/build/browser/cjs/eh9refYW4Gm25cmW.cjs +6 -0
  55. package/build/browser/cjs/hKqcVeb_8_4M79xj.cjs +6 -0
  56. package/build/browser/cjs/index.cjs +7 -0
  57. package/build/browser/cjs/is17hbP-kpOIBRP3.cjs +6 -0
  58. package/build/browser/cjs/pNY789kHWwRQXqse.cjs +17 -0
  59. package/build/browser/cjs/qJcc3ALtLWml32LU.cjs +18 -0
  60. package/build/browser/cjs/vWgVoELLfZ2ff1xL.cjs +6 -0
  61. package/build/browser/esm/2kwF7RVUWBY1zsgG.mjs +16 -0
  62. package/build/browser/esm/7Imk0owJj7oNHR7v.mjs +48 -0
  63. package/build/browser/esm/AuNwPf0DXe0twn35.mjs +1592 -0
  64. package/build/browser/esm/B1Kw9U_AxCk0Aq9f.mjs +59 -0
  65. package/build/browser/esm/B9l1_Tfw_tMhKCNB.mjs +437 -0
  66. package/build/browser/esm/B9winT3ff8rc4sbn.mjs +490 -0
  67. package/build/browser/esm/BEo9XX1sHmVjScSm.mjs +16 -0
  68. package/build/browser/esm/BGTcOBCyrTTlov_i.mjs +13399 -0
  69. package/build/browser/esm/BMGddfMXtKQ9AXQS.mjs +16 -0
  70. package/build/browser/esm/BQSa7N7QMGysdZdU.mjs +3932 -0
  71. package/build/browser/esm/BVEuc_3fLG2GN34k.mjs +16 -0
  72. package/build/browser/esm/BVh9YUwiSov8wcyY.mjs +1708 -0
  73. package/build/browser/esm/BZt5yM_TvoPXqdeA.mjs +3867 -0
  74. package/build/browser/esm/BfU8KdaB9wrEPWM-.mjs +16 -0
  75. package/build/browser/esm/BjUaiSvRZnas-HJW.mjs +16 -0
  76. package/build/browser/esm/BqiVaoAYJJqPrCUZ.mjs +16 -0
  77. package/build/browser/esm/BtMqJ5CRpKuAC4UQ.mjs +1486 -0
  78. package/build/browser/esm/BwvMR2cgGwFn8hAL.mjs +36 -0
  79. package/build/browser/esm/BxU3eVA-Adrnq7ZJ.mjs +1372 -0
  80. package/build/browser/esm/C00coampLNiXjWJJ.mjs +436 -0
  81. package/build/browser/esm/C6nh1rvYnAg2w2V2.mjs +838 -0
  82. package/build/browser/esm/C8gc149K34Zi2lP2.mjs +16 -0
  83. package/build/browser/esm/CGSkuCZY1EmTUNlQ.mjs +52 -0
  84. package/build/browser/esm/CKXzosgZX8Xe3l59.mjs +16 -0
  85. package/build/browser/esm/CNYANG0Z7mhGYo00.mjs +859 -0
  86. package/build/browser/esm/CV_FNw2i_aEc5nwA.mjs +16 -0
  87. package/build/browser/esm/CYSj0-zys2FKWgnb.mjs +18 -0
  88. package/build/browser/esm/CbTs5cvVaP1vPCYD.mjs +2248 -0
  89. package/build/browser/esm/CfAob8gGydmX1xQu.mjs +16 -0
  90. package/build/browser/esm/ChGigf2OPu7d44Km.mjs +16 -0
  91. package/build/browser/esm/CnzGN0S6zOfL_3SS.mjs +1358 -0
  92. package/build/browser/esm/CpyeUtXgDmrcMESB.mjs +52 -0
  93. package/build/browser/esm/CrEGjvQKhAcdw5sY.mjs +16 -0
  94. package/build/browser/esm/CtrrmHx9YbrOithw.mjs +152 -0
  95. package/build/browser/esm/CzAM0pDdZ7sjGgn9.mjs +86 -0
  96. package/build/browser/esm/D0oVDcgRUMZ9MHzu.mjs +41 -0
  97. package/build/browser/esm/D54Fpmnd9MzCzp-Z.mjs +16 -0
  98. package/build/browser/esm/D78-3ghInxscHLVq.mjs +23 -0
  99. package/build/browser/esm/DEpR6b4DMs-va6RS.mjs +43734 -0
  100. package/build/browser/esm/DEsqE49cIQZ8AqCe.mjs +398 -0
  101. package/build/browser/esm/DGe70xvBhc62ZVZz.mjs +2410 -0
  102. package/build/browser/esm/DXapJ5_yR4E8vDaK.mjs +1685 -0
  103. package/build/browser/esm/DjAZeDxBIBZsRTm3.mjs +24 -0
  104. package/build/browser/esm/DttdPwwDTcRX4uwL.mjs +44 -0
  105. package/build/browser/esm/FXcO0MVElhw9cc3v.mjs +49 -0
  106. package/build/browser/esm/GpycqJcrwTRtjEqA.mjs +16 -0
  107. package/build/browser/esm/HCE-tMxyVd0m-PgN.mjs +16 -0
  108. package/build/browser/esm/OCdyQRicV8KxUwMt.mjs +16 -0
  109. package/build/browser/esm/UukTgmLv7or2mhlB.mjs +16 -0
  110. package/build/browser/esm/_cuE13TWr3oEoKGP.mjs +34 -0
  111. package/build/browser/esm/aIlK3Ybu-1T4WHPv.mjs +640 -0
  112. package/build/browser/esm/bFSkTthAEOn7gv5x.mjs +16 -0
  113. package/build/browser/esm/bOhN6up-rdLRp82s.mjs +5588 -0
  114. package/build/browser/esm/index.mjs +85 -0
  115. package/build/browser/esm/ng3JdG4_hi9SgtHk.mjs +16 -0
  116. package/build/browser/esm/o6U2z4gZ7GE4QKZD.mjs +16 -0
  117. package/build/browser/esm/psav3cvsBQQczhPL.mjs +16 -0
  118. package/build/browser/esm/vn0iS301yg2hAbYd.mjs +51 -0
  119. package/build/licenses/dependencies.txt +1341 -0
  120. package/build/node/assets/style.css +1 -0
  121. package/build/node/esm/2kwF7RVUWBY1zsgG.mjs +16 -0
  122. package/build/node/esm/B-Xlyl81h27-bnvO.mjs +16 -0
  123. package/build/node/esm/B1_NYsn5D8x9QedP.mjs +307 -0
  124. package/build/node/esm/BCA5bxOeDA8k1Bm1.mjs +16 -0
  125. package/build/node/esm/BEo9XX1sHmVjScSm.mjs +16 -0
  126. package/build/node/esm/BIfdVpnJR1TZwCPR.mjs +1378 -0
  127. package/build/node/esm/BIqDzNJtkm-dyH0v.mjs +154 -0
  128. package/build/node/esm/BMGddfMXtKQ9AXQS.mjs +16 -0
  129. package/build/node/esm/BUOdfqhtCh8lhOhm.mjs +4000 -0
  130. package/build/node/esm/BYbE15S73xgn7S5E.mjs +88 -0
  131. package/build/node/esm/BfU8KdaB9wrEPWM-.mjs +16 -0
  132. package/build/node/esm/BkyivirgeiDKFSjk.mjs +16 -0
  133. package/build/node/esm/Bm1RqNJ-XvHpJW9z.mjs +831 -0
  134. package/build/node/esm/BqiVaoAYJJqPrCUZ.mjs +16 -0
  135. package/build/node/esm/Bx-30HInllXS7M_J.mjs +41 -0
  136. package/build/node/esm/Bx3lQBEvcqhxffT-.mjs +1726 -0
  137. package/build/node/esm/BxsKlaBFnb5wNq6R.mjs +53 -0
  138. package/build/node/esm/C4PMhNAV0KpPsKFj.mjs +24 -0
  139. package/build/node/esm/C7x3L6HtPhZjSrrZ.mjs +471 -0
  140. package/build/node/esm/C8gc149K34Zi2lP2.mjs +16 -0
  141. package/build/node/esm/CK-kn1p9NGRVM_h7.mjs +16 -0
  142. package/build/node/esm/CKR6snAwSONs7kfL.mjs +19 -0
  143. package/build/node/esm/CKXzosgZX8Xe3l59.mjs +16 -0
  144. package/build/node/esm/CLE_RHHvsDeoZ9Zd.mjs +561 -0
  145. package/build/node/esm/CMKci_5THkcJ-w9a.mjs +80 -0
  146. package/build/node/esm/CVU9bu6AnxcgkEwq.mjs +13466 -0
  147. package/build/node/esm/CfAob8gGydmX1xQu.mjs +16 -0
  148. package/build/node/esm/ChGigf2OPu7d44Km.mjs +16 -0
  149. package/build/node/esm/CkvkuPSf4R_DqArg.mjs +5648 -0
  150. package/build/node/esm/CnBMj0oJAyr9ZbjP.mjs +23 -0
  151. package/build/node/esm/CrEGjvQKhAcdw5sY.mjs +16 -0
  152. package/build/node/esm/Crx9i_8dm3OQsk_T.mjs +28 -0
  153. package/build/node/esm/CwUulbiMQH11aF4x.mjs +16 -0
  154. package/build/node/esm/D0Lh0V1tkdJPxZnI.mjs +392 -0
  155. package/build/node/esm/D54Fpmnd9MzCzp-Z.mjs +16 -0
  156. package/build/node/esm/D5bg3v_W8K9MVp0j.mjs +1711 -0
  157. package/build/node/esm/D8F08tiG98tM_voL.mjs +16 -0
  158. package/build/node/esm/DR7o1DOIK9zdiBgS.mjs +50 -0
  159. package/build/node/esm/DYEgm2kd3haV-Ml8.mjs +1246 -0
  160. package/build/node/esm/DfzhmhZ4I0Zurcqn.mjs +44 -0
  161. package/build/node/esm/Dg_ERnlsy5hwbzMA.mjs +1498 -0
  162. package/build/node/esm/Dt4cj_0sWgvt4FGj.mjs +92 -0
  163. package/build/node/esm/GpycqJcrwTRtjEqA.mjs +16 -0
  164. package/build/node/esm/LlkIFFfAjLiQ5Or6.mjs +3840 -0
  165. package/build/node/esm/OCdyQRicV8KxUwMt.mjs +16 -0
  166. package/build/node/esm/QATDL2FGAYcVnd33.mjs +49 -0
  167. package/build/node/esm/SvgA2TyqJYOzheuf.mjs +26 -0
  168. package/build/node/esm/VZ150KIUh5JVRqpk.mjs +52 -0
  169. package/build/node/esm/XRLHatWlgABiuBDS.mjs +52 -0
  170. package/build/node/esm/bFSkTthAEOn7gv5x.mjs +16 -0
  171. package/build/node/esm/index.mjs +44754 -0
  172. package/build/node/esm/lgtVRbg712G5Ba-x.mjs +60 -0
  173. package/build/node/esm/ng3JdG4_hi9SgtHk.mjs +16 -0
  174. package/build/node/esm/psav3cvsBQQczhPL.mjs +16 -0
  175. package/build/node/esm/zWnN2OzbhzCc6T7u.mjs +86 -0
  176. package/build/package.json +84 -0
  177. package/build/types/index.d.ts +1848 -0
  178. package/package.json +100 -0
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
8
+ import { memo as o, useState as a, useCallback as n, useEffect as i, useMemo as r } from "react";
9
+ import { alpha as l, getOverlayAlpha as s } from "@mui/material/styles/index.js";
10
+ import { Box as p, FormControl as c, InputLabel as d, Select as u, TextField as m, Typography as g, MenuItem as y } from "@mui/material";
11
+ import { P as f, ai as x, a8 as h, a7 as C } from "./index.mjs";
12
+ const v = ["Ok", "Cancel"], b = o((o2) => {
13
+ const { initialValue: b2, context: T, onOption: k, onValidateOption: O, onInputOption: w, onDone: F, options: P = v, defaultOption: S = P?.[0], cancelOption: $ = "Cancel", sx: D, ...I } = o2, [j, V] = a(b2), [N, z] = a(false), B = n(async (e2, t2) => true, []), L = f(async (e2) => {
14
+ w?.(j, e2), k?.(e2, e2 === $, e2 === S), F?.();
15
+ }, [j, w, F, k, $, S]), M = f(async (e2) => {
16
+ if (e2.keyCode === x.Enter) {
17
+ false !== await B?.(j, null) && L(S);
18
+ }
19
+ }, [j, L]), R = f((e2) => {
20
+ V(e2.target.value), B?.(e2.target.value, null);
21
+ }, [O]), W = f(async (e2) => {
22
+ let t2 = await Promise.resolve(O?.(e2));
23
+ try {
24
+ false !== t2 && (t2 = await Promise.resolve(B?.(j, e2)) ?? true);
25
+ } catch (e3) {
26
+ }
27
+ return t2 ?? true;
28
+ }, [O]), [E, G] = a(h.Styles.lookupStyle(j).formatType ?? h.Type.Custom);
29
+ i(() => {
30
+ G(h.Styles.lookupStyle(j).formatType ?? h.Type.Custom);
31
+ }, [j]);
32
+ const H = r(() => {
33
+ const t2 = h.Styles.lookupPrimary(), o3 = (t3) => e(y, { value: t3, children: t3 }, t3), a2 = Object.keys(t2).map((e2) => o3(t2[e2].formatType));
34
+ return a2.push(o3(h.Type.Custom)), a2;
35
+ }, []), K = n((e2) => {
36
+ const t2 = e2.target.value;
37
+ G(t2);
38
+ const o3 = h.Styles.lookupDefault(t2);
39
+ o3 && V(o3);
40
+ }, []), q = r(() => {
41
+ const e2 = T();
42
+ return e2.createTemporaryCell({ value: e2.getValue() ?? 12345, style: { numberFormat: j } });
43
+ }, [E, j, T]);
44
+ return e(C, { title: "Number Format", options: P, onDone: F, onOption: (e2) => L(e2), onValidateOption: W, defaultOption: S, cancelOption: $, autoFocusSel: ".autoFocus", sx: { width: "580px", ...D }, ...I, children: t(p, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(0), rowGap: (e2) => e2.spacing(1), display: "flex", flexDirection: "column" }, children: [t(c, { sx: { minWidth: 135 }, size: "small", children: [e(d, { children: "Category" }), e(u, { value: E, label: "Category", onChange: K, sx: { backgroundImage: `linear-gradient(${l("#fff", s(5))}, ${l("#fff", s(5))})` }, children: H })] }), e(c, { sx: { paddingTop: (e2) => e2.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: e(m, { label: "Code", onFocus: (e2) => {
45
+ N || e2.target?.select(), z(true);
46
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (e2) => e2.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { className: "autoFocus", spellCheck: false, autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1.25), paddingBottom: (e2) => e2.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", s(5))}, ${l("#fff", s(5))})` } } }, value: j, onChange: R, onKeyDown: M, onContextMenu: (e2) => {
47
+ e2.stopPropagation();
48
+ } }) }), t(p, { children: [e(g, { variant: "caption", component: "div", sx: { paddingLeft: (e2) => e2.spacing(2) }, children: "Preview" }), e(g, { variant: "body2", component: "div", sx: { borderRadius: (e2) => `${e2.shape.borderRadius}px`, padding: (e2) => e2.spacing(1), border: (e2) => `1px solid ${e2.palette.grey[400]}` }, children: q.getNumberFormat().displayText || "(empty)" })] })] }) });
49
+ });
50
+ export {
51
+ b as NumberFormatDialog,
52
+ b as default
53
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
8
+ import { useState as t } from "react";
9
+ import { Box as i, FormControlLabel as o, Checkbox as a } from "@mui/material";
10
+ import { ah as l, P as r, a7 as s, a as c } from "./index.mjs";
11
+ const d = ({ range: d2, options: m, cell: p, onDone: h, ...u }) => {
12
+ const [v, C] = t(m ?? l.DefaultRangeOptions), O = r((e2) => {
13
+ let n2 = null;
14
+ "Sort" === e2 && (n2 = { ...m, options: v }), h?.(n2);
15
+ }, [v, h, m]);
16
+ return e(s, { title: "Sort", options: ["Sort", "Cancel"], onDone: O, ...u, children: n(i, { sx: { display: "flex", flexDirection: "column" }, children: [e(o, { control: e(a, { checked: !v.reverse, onChange: () => C((e2) => ({ ...e2, reverse: !e2.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), e(o, { control: e(a, { checked: v.hasHeader, onChange: () => C((e2) => ({ ...e2, hasHeader: !e2.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), e(o, { control: e(a, { checked: v.collatorOptions?.sensitivity === l.CaseSensitiveOptions.sensitivity, onChange: () => C((e2) => ({ ...e2, collatorOptions: v.collatorOptions?.sensitivity === l.CaseSensitiveOptions.sensitivity ? l.CaseInsensitiveOptions : l.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), e(o, { control: e(a, { checked: v.orientation === c.Orientation.Row, onChange: () => C((e2) => {
17
+ const n2 = e2.orientation === c.Orientation.Row ? c.Orientation.Column : c.Orientation.Row;
18
+ return { ...d2.getDefaultSortCriteria(n2, p).options, includeHidden: e2.includeHidden, reverse: e2.reverse, orientation: n2 };
19
+ }) }), label: "Row Sort", labelPlacement: "end" }), e(o, { control: e(a, { checked: v.includeHidden, onChange: () => C((e2) => ({ ...e2, includeHidden: !e2.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
20
+ };
21
+ export {
22
+ d as SortDialog,
23
+ d as default
24
+ };
@@ -0,0 +1,471 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { e } from "./Bm1RqNJ-XvHpJW9z.mjs";
8
+ /**
9
+ * @license @sheetxl/sdk - A high-performance, embeddable spreadsheet engine. - v0.0.0
10
+ *
11
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
12
+ * License: The license can be found at https://www.sheetxl.com/license.
13
+ */
14
+ /**
15
+ * @license @sheetxl/scripting - SheetXL scripting utilities including TypeScript compilation. - v0.0.0
16
+ *
17
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
18
+ * License: The license can be found at https://www.sheetxl.com/license.
19
+ */
20
+ /**
21
+ * @license @sheetxl/primitives - Primitive - Base types for SheetXL functions. - v0.0.0
22
+ *
23
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
24
+ * License: The license can be found at https://www.sheetxl.com/license.
25
+ */
26
+ var t, n, o;
27
+ (n = t || (t = {})).Orientation = { Column: "column", Row: "row" }, n.Orientations = { ...n.Orientation, Both: "both" }, n.Direction = { Up: "up", Down: "down", Left: "left", Right: "right" }, ((e2) => {
28
+ e2.Code = { Parse: 0, Null: 1, Div0: 2, Value: 3, Ref: 4, Name: 5, Num: 6, NA: 7, GettingData: 8, Spill: 9, Connect: 10, Blocked: 11, Unknown: 12, Field: 13, Calc: 14, Busy: 16, Python: 19, Timeout: 20 }, e2.Label = { Parse: "#PARSE!", Null: "#NULL!", Div0: "#DIV/0!", Value: "#VALUE!", Ref: "#REF!", Name: "#NAME?", Num: "#NUM!", NA: "#N/A", GettingData: "#GETTING_DATA", Spill: "#SPILL!", Connect: "#CONNECT!", Blocked: "#BLOCKED!", Unknown: "#UNKNOWN!", Field: "#FIELD!", Calc: "#CALC!", Busy: "#BUSY!", Python: "#PYTHON!", Timeout: "#TIMEOUT!" };
29
+ class t2 extends Error {
30
+ constructor(e3, t3, n3, o3) {
31
+ super(n3, o3), this._label = t3, this._code = e3, this.details = o3;
32
+ }
33
+ static {
34
+ this.code = e2.Code.Unknown;
35
+ }
36
+ get isFormulaError() {
37
+ return true;
38
+ }
39
+ getLabel() {
40
+ return this._label;
41
+ }
42
+ getCode() {
43
+ return this._code;
44
+ }
45
+ equals(e3) {
46
+ return !!e3 && (this._code === e3._code || this._code === e3.code);
47
+ }
48
+ get [Symbol.toStringTag]() {
49
+ return "[FormulaError]";
50
+ }
51
+ toString() {
52
+ return this.message || this._label;
53
+ }
54
+ }
55
+ e2.Known = t2;
56
+ class n2 extends t2 {
57
+ constructor(t3, n3) {
58
+ super(e2.Code.Parse, e2.Label.Parse, t3, n3);
59
+ }
60
+ static {
61
+ this.code = e2.Code.Parse;
62
+ }
63
+ getDetails() {
64
+ const e3 = this.details;
65
+ return { line: e3?.line ?? 1, column: e3?.column ?? 1, offset: e3?.offset ?? 0, length: e3?.length ?? 0 };
66
+ }
67
+ }
68
+ e2.Parse = n2;
69
+ class o2 extends t2 {
70
+ constructor(t3, n3) {
71
+ super(e2.Code.Null, e2.Label.Null, t3, n3);
72
+ }
73
+ static {
74
+ this.code = e2.Code.Null;
75
+ }
76
+ }
77
+ e2.Null = o2;
78
+ class i2 extends t2 {
79
+ constructor(t3, n3) {
80
+ super(e2.Code.Div0, e2.Label.Div0, t3, n3);
81
+ }
82
+ static {
83
+ this.code = e2.Code.Div0;
84
+ }
85
+ }
86
+ e2.Div0 = i2;
87
+ class r2 extends t2 {
88
+ constructor(t3, n3) {
89
+ super(e2.Code.Value, e2.Label.Value, t3, n3);
90
+ }
91
+ static {
92
+ this.code = e2.Code.Value;
93
+ }
94
+ }
95
+ e2.Value = r2;
96
+ class a2 extends t2 {
97
+ constructor(t3, n3) {
98
+ super(e2.Code.Ref, e2.Label.Ref, t3, n3);
99
+ }
100
+ static {
101
+ this.code = e2.Code.Ref;
102
+ }
103
+ }
104
+ e2.Ref = a2;
105
+ class s2 extends t2 {
106
+ constructor(t3, n3) {
107
+ super(e2.Code.Name, e2.Label.Name, t3, n3);
108
+ }
109
+ static {
110
+ this.code = e2.Code.Name;
111
+ }
112
+ }
113
+ e2.Name = s2;
114
+ class l2 extends t2 {
115
+ constructor(t3, n3) {
116
+ super(e2.Code.Num, e2.Label.Num, t3, n3);
117
+ }
118
+ static {
119
+ this.code = e2.Code.Num;
120
+ }
121
+ }
122
+ e2.Num = l2;
123
+ class c2 extends t2 {
124
+ constructor(t3, n3) {
125
+ super(e2.Code.NA, e2.Label.NA, t3, n3);
126
+ }
127
+ static {
128
+ this.code = e2.Code.NA;
129
+ }
130
+ }
131
+ e2.NA = c2;
132
+ class d2 extends t2 {
133
+ constructor(t3, n3) {
134
+ super(e2.Code.GettingData, e2.Label.GettingData, t3, n3);
135
+ }
136
+ static {
137
+ this.code = e2.Code.GettingData;
138
+ }
139
+ }
140
+ e2.GettingData = d2;
141
+ class u2 extends t2 {
142
+ constructor(t3, n3) {
143
+ super(e2.Code.Spill, e2.Label.Spill, t3, n3);
144
+ }
145
+ static {
146
+ this.code = e2.Code.Spill;
147
+ }
148
+ }
149
+ e2.Spill = u2;
150
+ class p2 extends t2 {
151
+ constructor(t3, n3) {
152
+ super(e2.Code.Connect, e2.Label.Connect, t3, n3);
153
+ }
154
+ static {
155
+ this.code = e2.Code.Connect;
156
+ }
157
+ }
158
+ e2.Connect = p2;
159
+ class m2 extends t2 {
160
+ constructor(t3, n3) {
161
+ super(e2.Code.Blocked, e2.Label.Blocked, t3, n3);
162
+ }
163
+ static {
164
+ this.code = e2.Code.Blocked;
165
+ }
166
+ }
167
+ e2.Blocked = m2;
168
+ class y2 extends t2 {
169
+ constructor(t3, n3) {
170
+ super(e2.Code.Unknown, e2.Label.Unknown, t3, n3);
171
+ }
172
+ static {
173
+ this.code = e2.Code.Unknown;
174
+ }
175
+ }
176
+ e2.Unknown = y2;
177
+ class f2 extends t2 {
178
+ constructor(t3, n3) {
179
+ super(e2.Code.Field, e2.Label.Field, t3, n3);
180
+ }
181
+ static {
182
+ this.code = e2.Code.Field;
183
+ }
184
+ }
185
+ e2.Field = f2;
186
+ class h2 extends t2 {
187
+ constructor(t3, n3) {
188
+ super(e2.Code.Calc, e2.Label.Calc, t3, n3);
189
+ }
190
+ static {
191
+ this.code = e2.Code.Calc;
192
+ }
193
+ }
194
+ e2.Calc = h2;
195
+ class g2 extends t2 {
196
+ constructor(t3, n3) {
197
+ super(e2.Code.Busy, e2.Label.Busy, t3, n3);
198
+ }
199
+ static {
200
+ this.code = e2.Code.Busy;
201
+ }
202
+ }
203
+ e2.Busy = g2;
204
+ class w2 extends t2 {
205
+ constructor(t3, n3) {
206
+ super(e2.Code.Python, e2.Label.Python, t3, n3);
207
+ }
208
+ static {
209
+ this.code = e2.Code.Python;
210
+ }
211
+ }
212
+ e2.Python = w2;
213
+ class C2 extends t2 {
214
+ constructor(t3, n3) {
215
+ super(e2.Code.Timeout, e2.Label.Timeout, t3, n3);
216
+ }
217
+ static {
218
+ this.code = e2.Code.Timeout;
219
+ }
220
+ }
221
+ e2.Timeout = C2;
222
+ })(o || (o = {}));
223
+ const i = {};
224
+ i[o.Code.Parse] = o.Parse, i[o.Code.Null] = o.Null, i[o.Code.Div0] = o.Div0, i[o.Code.Value] = o.Value, i[o.Code.Ref] = o.Ref, i[o.Code.Name] = o.Name, i[o.Code.Num] = o.Num, i[o.Code.NA] = o.NA, i[o.Code.GettingData] = o.GettingData, i[o.Code.Spill] = o.Spill, i[o.Code.Connect] = o.Connect, i[o.Code.Blocked] = o.Blocked, i[o.Code.Unknown] = o.Unknown, i[o.Code.Field] = o.Field, i[o.Code.Calc] = o.Calc, i[o.Code.Busy] = o.Busy, i[o.Code.Python] = o.Python, i[o.Code.Timeout] = o.Timeout;
225
+ const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), c = Object.keys(i);
226
+ for (let e2 = 0; e2 < c.length; e2++) {
227
+ const t2 = c[e2], n2 = i[t2];
228
+ s.set(o.Label[t2], n2), l.set(o.Code[t2], n2);
229
+ const d2 = new n2();
230
+ r.set(d2.getLabel(), d2), a.set(d2.getCode(), d2);
231
+ }
232
+ const d = a.get(o.Code.Unknown);
233
+ var u;
234
+ (u = o || (o = {})).BuiltIn = { Parse: new u.Parse(), Null: new u.Null(), Div0: new u.Div0(), Value: new u.Value(), Ref: new u.Ref(), Name: new u.Name(), Num: new u.Num(), NA: new u.NA(), GettingData: new u.GettingData(), Spill: new u.Spill(), Connect: new u.Connect(), Blocked: new u.Blocked(), Unknown: new u.Unknown(), Field: new u.Field(), Calc: new u.Calc(), Busy: new u.Busy(), Python: new u.Python(), Timeout: new u.Timeout() }, u.getBuiltInByLabel = (e2) => r.get(e2), u.newTypedError = (e2, t2, n2) => {
235
+ let o2;
236
+ return o2 = "string" == typeof e2 ? s.get(e2) : l.get(e2), o2 || (o2 = u.Unknown), new o2(t2, n2);
237
+ }, u.getBuiltInById = (e2) => a.get(e2) || d;
238
+ let p = null, m = null;
239
+ const y = { compilerOptions: { target: "esnext" } }, f = async () => "\n interface FirstTest {\n isTrue?: boolean;\n }\n", h = /* @__PURE__ */ new Map([["IReferenceRange", "r"], ["IRange", "l"]]), g = /* @__PURE__ */ new Map([["IWorkbook", "workbook"], ["ISheet", "sheet"], ["ICellRanges", "ranges"], ["ICellRange", "range"], ["IFormulaContext", "context"]]), w = (e2, t2) => {
240
+ Array.from(t2.keys()).forEach((n2) => {
241
+ const o2 = t2.get(n2);
242
+ t2.set(`${e2}.${n2}`, o2);
243
+ });
244
+ }, C = /* @__PURE__ */ new Map([["Scalar", "*"], ["FormulaError.Known", "e"], ["Date", "Date"], ["JSON", "JSON"]]), x = /* @__PURE__ */ new Map([]), b = "SheetXL";
245
+ w(b, h), w(b, g), w(b, x);
246
+ const T = /* @__PURE__ */ new Map([["Promise", () => ({ async: true })], ["Observable", () => ({ stream: true })]]);
247
+ let k = null;
248
+ async function N() {
249
+ if (k) return k;
250
+ try {
251
+ return await (await import("./Crx9i_8dm3OQsk_T.mjs")).initialize();
252
+ } catch (e2) {
253
+ throw k = null, e2;
254
+ } finally {
255
+ k = null;
256
+ }
257
+ }
258
+ async function S(t2) {
259
+ const n2 = t2?.source ?? null;
260
+ if (!n2) return null;
261
+ const o2 = (t2.disableBundle || t2.declarationsOnly) ?? false, i2 = [f(), N()], r2 = await Promise.all(i2), a2 = r2[0], s2 = r2[1];
262
+ let l2 = "", c2 = null;
263
+ const d2 = [], u2 = { allowJs: true, declaration: false, sourceMap: false, inlineSourceMap: false, inlineSources: false, isolatedModules: true, preserveConstEnums: false, module: 99, noResolve: true, emitDeclarationOnly: false, target: s2.ScriptTarget.ES2020 }, w2 = "script", x2 = `${w2}.ts`, b2 = "lib.d.ts", k2 = "global.d.ts", S2 = { [x2]: n2, [b2]: "\n/**\n * Represents the completion of an asynchronous operation\n */\ninterface Promise<T> {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise<T>;\n}\n", [k2]: a2 }, E = { getSourceFile: (e2, t3, n3, o3) => s2.createSourceFile(e2, S2[e2], s2.ScriptTarget.Latest, true), fileExists: (e2) => void 0 !== S2[e2], readFile: (e2) => S2[e2], writeFile: (e2, t3) => {
264
+ S2[e2] = t3;
265
+ }, getCurrentDirectory: () => "./", getCanonicalFileName: (e2) => e2, useCaseSensitiveFileNames: () => true, getDefaultLibFileName: (e2) => b2, getNewLine: () => "\n" }, L = s2.createProgram([x2, k2], u2, E), D = L.getTypeChecker(), v = L.getSourceFile(x2), F = L.emit();
266
+ F.diagnostics.length > 0 && console.warn(F.diagnostics), l2 = S2[`${w2}.js`];
267
+ const K = (e2, t3, n3, o3) => {
268
+ if (e2) {
269
+ if (e2.kind === s2.SyntaxKind.NumberKeyword) t3.scalar = "n";
270
+ else if (e2.kind === s2.SyntaxKind.StringKeyword) t3.scalar = "s";
271
+ else if (e2.kind === s2.SyntaxKind.BooleanKeyword) t3.scalar = "b";
272
+ else if (e2.kind === s2.SyntaxKind.UndefinedKeyword || e2.kind === s2.SyntaxKind.NullKeyword || e2.kind === s2.SyntaxKind.VoidKeyword) {
273
+ if (o3) return void $(e2, new Error(`'undefined' is not a valid type for input: '${e2?.parent?.name?.escapedText}'.`));
274
+ t3.scalar = "z";
275
+ } else if (e2.kind === s2.SyntaxKind.BigIntKeyword) t3.scalar = "n";
276
+ else if (e2.kind === s2.SyntaxKind.AnyKeyword) t3.scalar = "z";
277
+ else if (e2.kind === s2.SyntaxKind.ArrayType) {
278
+ const i3 = e2.elementType;
279
+ if (!i3) return void $(e2, new Error(`'Array' must be typed: '${e2?.parent?.name?.escapedText}'.`));
280
+ t3.arrayDepth = (t3.arrayDepth ?? 0) + 1, K(i3, t3, n3, o3);
281
+ } else if (e2.kind !== s2.SyntaxKind.TupleType && e2.kind === s2.SyntaxKind.TypeReference) {
282
+ const i3 = e2.typeName?.getText?.() ?? null, r3 = h.get(i3);
283
+ let a3 = false;
284
+ r3 && (t3.range = r3, a3 = true);
285
+ const s3 = C.get(i3);
286
+ if (s3 && (t3.scalar = s3), void 0 !== s3 && (a3 = true), o3) {
287
+ const e3 = g.get(i3);
288
+ if (e3) return e3;
289
+ } else {
290
+ const n4 = T.get(i3);
291
+ if (n4) {
292
+ const o4 = { ...t3, ...n4() };
293
+ let r4 = 0;
294
+ if (o4.async && r4++, o4.stream && r4++, r4 > 1) return void $(e2, new Error(`'${i3}' cannot have multiple modifiers: '${e2?.parent?.name?.escapedText}'.`));
295
+ t3 = o4, a3 = true;
296
+ }
297
+ }
298
+ if (!a3) return void $("node", new Error(`'${i3}' is not a valid type: '${e2?.parent?.name?.escapedText}'.`));
299
+ const l3 = e2.typeArguments;
300
+ if (l3) {
301
+ if (1 !== l3.length) return void $(e2, new Error(`'${i3}' must be typed with exactly 1 type: '${e2?.parent?.name?.escapedText}'.`));
302
+ K(l3[0], t3, n3, o3);
303
+ }
304
+ }
305
+ } else $(e2, new Error(`Type is not defined for '${t3?.name ?? "return"}'.`));
306
+ }, P = [], $ = (e2, t3) => {
307
+ P.push(t3);
308
+ };
309
+ if (s2.forEachChild(v, (e2) => {
310
+ if (n3 = e2, 0 !== (s2.getCombinedModifierFlags(n3) & s2.ModifierFlags.Export) && s2.isFunctionDeclaration(e2)) {
311
+ const n4 = {}, o3 = { parameters: {} }, i3 = e2?.name?.getText();
312
+ try {
313
+ n4.name = i3;
314
+ const r3 = D.getSymbolAtLocation(e2.name).getDocumentationComment(D);
315
+ if (r3 && r3.length > 0 && r3[0].text) {
316
+ let e3 = r3[0].text;
317
+ e3 = e3.replace(/[\r\n]+/g, "\\n").trim(), o3.summary = e3;
318
+ }
319
+ const a3 = {};
320
+ K(e2.type, a3, n4, false), n4.returnType = a3;
321
+ const l3 = {};
322
+ t3 = e2, 0 !== (s2.getCombinedModifierFlags(t3) & s2.ModifierFlags.Default) && (l3.default = true, c2 = i3), Object.keys(l3).length > 0 && (n4.behavior = l3), n4.parameters = [];
323
+ const u3 = /* @__PURE__ */ new Map();
324
+ for (let t4 = 0; t4 < e2.parameters.length; t4++) {
325
+ const i4 = e2.parameters[t4], r4 = {};
326
+ r4.name = i4.name?.getText();
327
+ const a4 = K(i4.type, r4, n4, true);
328
+ if (a4) {
329
+ if (0 !== n4.parameters.length) {
330
+ const t5 = e2?.parent, o4 = t5?.name?.getText();
331
+ return void $(e2, new Error(`'${n4.name}' contexts must be the first parameter: '${o4}'.`));
332
+ }
333
+ n4.context = a4;
334
+ continue;
335
+ }
336
+ let l4;
337
+ if ((void 0 !== i4.initializer && null !== i4.initializer || void 0 !== i4.questionToken && null !== i4.questionToken) && (r4.optional = true, i4.initializer)) try {
338
+ l4 = i4.initializer.kind === s2.SyntaxKind.StringLiteral ? i4.initializer.text : i4.initializer.kind === s2.SyntaxKind.NumericLiteral ? parseFloat(i4.initializer.text) : i4.initializer.kind === s2.SyntaxKind.TrueKeyword || i4.initializer.kind === s2.SyntaxKind.FalseKeyword ? i4.initializer.kind === s2.SyntaxKind.TrueKeyword : i4.initializer.kind === s2.SyntaxKind.NullKeyword ? null : i4.initializer.kind === s2.SyntaxKind.ObjectLiteralExpression || i4.initializer.kind === s2.SyntaxKind.ArrayLiteralExpression ? i4.initializer.getText() : i4.initializer.getText?.();
339
+ } catch (e3) {
340
+ console.warn(`Couldn't extract default value for parameter '${r4.name}'`, e3);
341
+ }
342
+ i4.dotDotDotToken && (r4.rest = true), n4.parameters.push(r4);
343
+ const c3 = { description: "" };
344
+ o3.parameters[r4.name] = c3;
345
+ const d3 = D.getSymbolAtLocation(i4.name).getDocumentationComment(D);
346
+ d3 && d3.length > 0 && d3[0].text && (c3.description = d3[0].text), void 0 !== l4 && (c3.defaultValue = l4), u3.set(r4.name, r4);
347
+ }
348
+ if (e2.jsDoc && e2.jsDoc.length > 0) {
349
+ const t4 = e2.jsDoc;
350
+ for (let e3 = 0; e3 < t4.length; e3++) {
351
+ const r4 = t4[e3]?.tags;
352
+ if (r4) for (let e4 = 0; e4 < r4.length; e4++) {
353
+ const t5 = r4[e4];
354
+ let a4 = t5?.tagName?.text;
355
+ if (!a4) continue;
356
+ a4 = a4.toLowerCase();
357
+ let l4 = t5.comment;
358
+ const c3 = "hidden" === a4;
359
+ if (("string" == typeof l4 || c3) && ("string" == typeof l4 && (l4 = l4.replace(/[\r\n]+/g, "\\n").trim()), c3 || !l4 || (l4 = l4.split(/\\n/)[0], l4 && 0 !== l4.length))) {
360
+ if (l4 && "string" == typeof l4) {
361
+ const e5 = /\{@link(code|plain)?\s+([^}|]+)(?:\s*\|\s*([^}]+))?\}/g;
362
+ let t6, n5 = l4, i4 = [];
363
+ for (; null !== (t6 = e5.exec(l4)); ) {
364
+ const [e6, n6, o4, i5] = t6, r5 = [o4.trim()];
365
+ i5 && r5.push(i5.trim());
366
+ }
367
+ l4 = n5, i4.length > 0 && "see" === a4 && (o3.links || (o3.links = []), o3.links.push(...i4));
368
+ }
369
+ if ("name" === a4) {
370
+ const e5 = l4;
371
+ e5 !== i3 && (o3.name = e5);
372
+ } else if ("description" !== a4) {
373
+ if ("summary" === a4) {
374
+ const e5 = l4;
375
+ e5 && (o3.summary = e5);
376
+ } else if ("param" === a4) {
377
+ const e5 = t5.name?.text, n5 = u3.get(e5);
378
+ if (!n5) {
379
+ P.push(new Error(`Parameter '${e5}' not found in function '${i3}'.`));
380
+ continue;
381
+ }
382
+ if (t5.typeExpression && t5.typeExpression.type) try {
383
+ const e6 = t5.typeExpression.type;
384
+ if (e6.kind === s2.SyntaxKind.UnionType) {
385
+ const t6 = [];
386
+ n5.enums = t6, e6.types.forEach((e7) => {
387
+ if (e7.kind === s2.SyntaxKind.LiteralType) {
388
+ const n6 = e7.literal.text;
389
+ n6 && t6.push(n6);
390
+ }
391
+ });
392
+ }
393
+ } catch (e6) {
394
+ console.warn("Error parsing JSDoc type expression:", e6);
395
+ }
396
+ } else if ("returns" === a4 || "return" === a4) n4.returnType.description = l4;
397
+ else if ("category" === a4) o3.category = l4;
398
+ else if ("hidden" === a4) {
399
+ let e5 = true;
400
+ const t6 = l4?.toLowerCase();
401
+ "false" === t6 ? e5 = false : "true" !== t6 && (e5 = l4), false !== e5 && (o3.hidden = e5 ?? true);
402
+ }
403
+ }
404
+ }
405
+ }
406
+ }
407
+ }
408
+ 0 === Object.keys(n4.returnType).length && delete n4.returnType, d2.push([n4, o3]);
409
+ } catch (t4) {
410
+ $(e2, new Error(`'${i3}': ${t4.message}`));
411
+ }
412
+ }
413
+ var t3, n3;
414
+ }), P.length > 0) throw console.warn(P), new Error("There were compilation errors.", { cause: P });
415
+ if (0 === d2.length) throw new Error("No exported functions.");
416
+ const B = `${e.uuidV4()}-script`;
417
+ try {
418
+ o2 || 0 !== P.length || (l2 = await async function(e2, t3, n3 = "/script.js", o3 = "__SHEETXL") {
419
+ try {
420
+ const e3 = await async function() {
421
+ if (p) return p;
422
+ if (m) {
423
+ if (await m, !p) throw new Error("ESBuild initialization promise resolved, but instance is not available.");
424
+ return p;
425
+ }
426
+ let e4, t4;
427
+ m = new Promise((n4, o4) => {
428
+ e4 = n4, t4 = o4;
429
+ });
430
+ try {
431
+ const { initialize: t5 } = await import("./SvgA2TyqJYOzheuf.mjs");
432
+ return p = await t5(), e4(), p;
433
+ } catch (e5) {
434
+ throw console.error("Failed to import or initialize esbuild:", e5), m = null, t4(e5), e5;
435
+ }
436
+ }(), i3 = "@sheetxl/primitives", r3 = `
437
+ export const FormulaContext = globalThis.${o3}?.FormulaContext;
438
+ export const ScalarType = globalThis.${o3}?.ScalarType;
439
+ export const Observable = globalThis.${o3}?.Observable;
440
+ export const IRange = globalThis.${o3}?.IRange;
441
+ export const FormulaError = globalThis.${o3}?.FormulaError;
442
+ // Add more exports as needed
443
+ `, a3 = { name: "sheetxl-esbuild-in-memory", setup(e4) {
444
+ const o4 = "sheetxl-" + (/* @__PURE__ */ new Date()).getTime();
445
+ e4.onResolve({ filter: new RegExp(`^(${n3.replace("/", "\\/")}|${i3})$`) }, (e5) => ({ path: e5.path, namespace: o4 })), e4.onResolve({ filter: /.*/ }, (e5) => {
446
+ if (e5.namespace !== o4) return console.warn(`esbuild: Treating import "${e5.path}" as external.`), { path: e5.path, external: true };
447
+ }), e4.onLoad({ filter: /.*/, namespace: o4 }, (e5) => {
448
+ let a4;
449
+ if (e5.path === n3) a4 = t3;
450
+ else {
451
+ if (e5.path !== i3) return { errors: [{ text: `Cannot load unknown path in ${o4}: ${e5.path}` }] };
452
+ a4 = r3;
453
+ }
454
+ return { contents: a4, loader: "ts" };
455
+ });
456
+ } }, s3 = await e3.build({ entryPoints: [n3], bundle: true, write: false, format: "esm", plugins: [a3], sourcemap: "inline", tsconfigRaw: y, minify: true, platform: "neutral" });
457
+ if (s3.outputFiles && s3.outputFiles.length > 0) return s3.outputFiles[0].text;
458
+ throw s3.errors && s3.errors.length > 0 ? new Error(`esbuild bundling failed: ${s3.errors.map((e4) => e4.text).join("\n")}`) : new Error("esbuild did not produce an output file.");
459
+ } catch (e3) {
460
+ throw console.error("esbuild bundling process failed:", e3), e3;
461
+ }
462
+ }(0, l2, w2));
463
+ } catch {
464
+ console.warn("Error bundling script");
465
+ }
466
+ const R = { functions: d2, commitId: B, source: n2, name: "Script", language: "typescript", compiled: l2 };
467
+ return c2 && (R.autoRun = c2), R;
468
+ }
469
+ export {
470
+ S as compileModule
471
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ /**
8
+ * @license @sheetxl/sdk - A high-performance, embeddable spreadsheet engine. - v0.0.0
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ const e = { CELL: { s: "Returns information about the cell.", p: { infoType: { d: "The type of information to return." }, reference: {} } }, "ERROR.TYPE": { s: "Returns a number matching an error value", p: { errorVal: { d: "is the error value for which you want the identifying number, and can be an actual error value or a reference to a cell containing an error value." } } }, INFO: { s: "Returns information about the current operating system.", p: { typeText: { d: "The type of information to return" } } }, ISBLANK: { s: "Checks whether a reference is to an empty cell, and returns TRUE or FALSE", p: { value: { d: "is the cell or a name that refers to the cell you want to test" } } }, ISERR: { s: "Checks whether a value is an error other than #N/A, and returns TRUE or FALSE", p: { value: { d: "is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value" } } }, ISERROR: { s: "Checks whether a value is an error, and returns TRUE or FALSE", p: { value: { d: "is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value" } } }, ISEVEN: { s: "Returns TRUE if the number is even", p: { number: { d: "is the value to test" } } }, ISFORMULA: { s: "Checks whether a reference is to a cell containing a formula, and returns TRUE or FALSE", p: { reference: { d: "is a reference to the cell you want to test. Reference can be a cell reference, a formula, or name that refers to a cell" } } }, ISLOGICAL: { s: "Checks whether a value is a logical value (TRUE or FALSE), and returns TRUE or FALSE", p: { value: { d: "is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value" } } }, ISNA: { s: "Checks whether a value is #N/A, and returns TRUE or FALSE", p: { value: { d: "is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value" } } }, ISNONTEXT: { s: "Checks whether a value is not text (blank cells are not text), and returns TRUE or FALSE", p: { value: { d: "is the value you want tested: a cell; a formula; or a name referring to a cell, formula, or value" } } }, ISNUMBER: { s: "Checks whether a value is not text (blank cells are not text), and returns TRUE or FALSE", p: { value: { d: "is the value you want tested: a cell; a formula; or a name referring to a cell, formula, or value" } } }, ISODD: { s: "Returns TRUE if the number is odd", p: { number: { d: "is the value to test" } } }, ISOMITTED: { s: "Checks whether the value is omitted, and returns TRUE or FALSE", p: { argument: { d: "is the value you want to test, such as a LAMBDA parameter" } } }, ISREF: { s: "Checks whether a value is a reference, and returns TRUE or FALSE", p: { value: { d: "is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value" } } }, ISTEXT: { s: "Converts a value to text in a specific number format", p: { value: { d: "is a number, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value" } } }, N: { s: "Converts non-number value to a number, dates to serial numbers, TRUE to 1, anything else to 0 (zero)", p: { value: { d: "is the value to convert" } } }, NA: { s: "Returns the #N/A error value", p: {} }, SHEET: { s: "Returns the sheet number of the referenced sheet", p: { value: { d: "is the name of a sheet or a reference that you want the sheet number of. If omitted the number of the sheet containing the function is returned" } } }, SHEETS: { s: "Returns the number of sheets in a reference", p: { reference: { d: "is a reference for which you want to know the number of sheets it contains. If omitted the number of sheets in the workbook containing the function is returned" } } }, TYPE: { s: "Returns an integer representing the data type of a value: number = 1; text = 2; logical value = 4; error value = 16; array = 64; compound data = 128", p: { value: { d: "is the value to check" } } } };
14
+ export {
15
+ e as default
16
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ /**
8
+ * @license @sheetxl/sdk - A high-performance, embeddable spreadsheet engine. - v0.0.0
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ const e = { ABS: { s: "Returns the absolute value of a number, a number without its sign", p: { number: { d: "is the real number for which you want the absolute value" } } }, AGGREGATE: { s: "Returns information about the cell.", p: { functionNum: { d: "Is the number 1 to 19 that specifies the summary function for the aggregate." }, options: { d: "Is the number 0 to 78 that specified the values to ignore for the aggregate." }, array: { d: "Is the array or range of numerical data on which to calculate the aggregate." }, K: { d: "indicates the position of the array; it is k-th largest, k-th smallest, k-th percentile, or k-th quartile." } }, h: "Unimplemented" }, ARABIC: { s: "Converts a Roman numeral to Arabic", p: { text: { d: "is the Roman numeral you want to convert" } } }, BASE: { s: "Converts a number into a text representation with the given radix (base)", p: { number: { d: "is the number that you want to convert" }, radix: { d: "is the base Radix that you want to convert the number into" }, minLength: { d: "is the minimum length of the returned string", v: 0 } } }, CEILING: { s: "Rounds a number up, to the nearest multiple of significance", p: { number: { d: "is the value you want to round" }, significance: { d: "is the multiple to which you want to round", v: "undefined" } }, c: "Compatible" }, "CEILING.MATH": { s: "Rounds a number up, to the nearest integer or to the nearest multiple of significance", p: { number: { d: "is the real number you want to round" }, significance: { d: "when given and nonzero this function will round away from zero", v: "undefined" }, mode: { v: 0 } } }, "CEILING.PRECISE": { s: "Rounds a number up to the nearest integer or to the nearest multiple of significance", p: { number: { d: "is the real number you want to round" }, significance: { d: "is the multiple to which you want to round", v: 1 } }, c: "Compatible" }, COMBIN: { s: "Returns the number of combinations for a given number of items", p: { number: { d: "is the total number of items" }, numberChosen: { d: "is the number of items in each combination" } } }, COMBINA: { s: "Returns the number of combinations with repetitions for a given number of items", p: { number: { d: "is the total number of items" }, numberChosen: { d: "is the number of items in each combination" } } }, DECIMAL: { s: "Converts a text representation of a number in a given base into a decimal number", p: { number: { d: "is the number that you want to convert" }, radix: { d: "is the base Radix of the number you are converting" } } }, DEGREES: { s: "Converts radians to degrees", p: { angle: { d: "is the angle in radians that you want to convert" } } }, EVEN: { s: "Rounds a positive number up and negative number down to the nearest even integer", p: { number: { d: "is the value to round" } } }, EXP: { s: "Returns e raised to the power of a given number", p: { number: { d: "is the exponent applied to the base e. The constant e equals 2.71828182845904, the base of the natural logarithm" } } }, FACT: { s: "Returns the factorial of a number, equal to 1*2*3*...* Number", p: { number: { d: "is the nonnegative number you want the factorial of" } } }, FACTDOUBLE: { s: "Returns the double factorial of a number", p: { number: { d: "is the value for which to return the double factorial" } } }, FLOOR: { s: "Rounds a number down to the nearest multiple of significance", p: { number: { d: "is the real number you want to round" }, significance: { d: "is the multiple to which you want to round. Number and Significance must either both be positive or both be negative", v: "undefined" } }, c: "Compatible" }, "FLOOR.MATH": { s: "Rounds a number down, to the nearest integer or to the nearest multiple of significance", p: { number: { d: "is the real number you want to round" }, significance: { d: "is the multiple to which you want to round", v: "undefined" }, mode: { d: "when given and nonzero this function will round towards zero", v: 0 } } }, "FLOOR.PRECISE": { s: "Rounds a number down to the nearest integer or to the nearest multiple of significance", p: { number: { d: "is the real number you want to round" }, significance: { d: "is the multiple to which you want to round", v: 1 } } }, GCD: { s: "Returns the greatest common divisor", p: { number: { d: "number1,number2,... are 1 to 255 values" } } }, INT: { s: "Rounds a number down to the nearest integer", p: { number: { d: "is the real number you want to round down to an integer" } } }, "ISO.CEILING": { s: "Rounds a number up to the nearest integer", p: { number: { d: "is the real number you want to round up to an integer" }, significance: { d: "is the multiple to which you want to round number", v: "undefined" } }, c: "Compatible" }, LCM: { s: "Returns the least common multiple", p: { number: { d: "number1,number2,... are 1 to 255 values for which you want the least common multiple" } } }, LN: { s: "Returns the natural logarithm of a number", p: { number: { d: "is the positive real number for which you want the natural logarithm" } } }, LOG: { s: "Returns the logarithm of a number to the base you specify", p: { number: { d: "is the positive real number for which you want the logarithm" }, base: { d: "is the base of the logarithm", v: 10 } } }, LOG10: { s: "Returns the base-10 logarithm of a number", p: { number: { d: "is the positive real number for which you want the base-10 logarithm" } } }, MDETERM: { s: "Returns the matrix determinant of an array", p: { array: { d: "is a numeric array with an equal number of rows and columns, either a cell range or an array constant" } } }, MINVERSE: { s: "Returns the inverse matrix for the matrix stored in an array", p: { array: { d: "is a numeric array with an equal number of rows and columns, either a cell range or an array constant" } } }, MMULT: { s: "Returns the matrix product of two arrays, an array with the same number of rows as array1 and columns as array2", p: { array1: { d: "is the first array of numbers to multiply and must have the same number of columns as Array2 has rows" }, array2: { d: "is the second array of numbers to multiply and must have the same number of columns as Array1 has rows" } } }, MOD: { s: "Returns the remainder after a number is divided by a divisor", p: { number: { d: "is the number for which you want to find the remainder after the division is performed" }, divisor: { d: "is the number by which you want to divide Number" } } }, MROUND: { s: "Returns a number rounded to the desired multiple", p: { number: { d: "is the value to round" }, multiple: { d: "is the multiple to which you want to round number" } } }, MULTINOMIAL: { s: "Returns the multinomial of a set of numbers", p: { number: { d: "number1,number2,... are 1 to 255 values for which you want the multinomial" } } }, MUNIT: { s: "Returns the unit matrix for the specified dimension", p: { dimension: { d: "is an integer specifying the dimension of the unit matrix that you want to return" } } }, ODD: { s: "Rounds a positive number up and negative number down to the nearest odd integer", p: { number: { d: "is the value to round" } } }, PI: { s: "Returns the value of Pi, 3.14159265358979, accurate to 15 digits", p: {} }, POWER: { s: "Returns the result of a number raised to a power", p: { number: { d: "is the base number, any real number" }, power: { d: "is the exponent, to which the base number is raised" } } }, PRODUCT: { s: "Multiplies all the numbers given as arguments", p: { number: { d: "number1,number2,... are 1 to 255 numbers, logical values, or text representations of numbers that you want to multiply" } } }, QUOTIENT: { s: "Returns the integer portion of a division", p: { numerator: { d: "is the dividend" }, denominator: { d: "is the divisor" } } }, RADIANS: { s: "Converts degrees to radians", p: { angle: { d: "is an angle in degrees that you want to convert" } } }, RAND: { s: "Returns a random number greater than or equal to 0 and less than 1, evenly distributed (changes on recalculation)", p: {} }, RANDARRAY: { s: "Returns an array of random numbers", p: { rows: { d: "the number of rows in the returned array", v: 1 }, columns: { d: "the number of columns in the returned array", v: 1 }, min: { d: "the minimum number you would like returned", v: 0 }, max: { d: "the maximum number you would like returned", v: 1 }, integer: { d: "return an integer or a decimal value. TRUE for an integer, FALSE for a decimal number", v: false } } }, RANDBETWEEN: { s: "Returns a random number between the numbers you specify", p: { bottom: { d: "is the smallest integer RANDBETWEEN will return" }, top: { d: "is the largest integer RANDBETWEEN will return" } } }, ROMAN: { s: "Converts an Arabic numeral to Roman, as text", p: { number: { d: "is the Arabic numeral you want to convert" }, form: { d: "is the number specifying the type of Roman numeral you want.", v: 0 } } }, ROUND: { s: "Rounds a number to a specified number of digits", p: { number: { d: "is the number you want to round" }, numDigits: { d: "is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer" } } }, ROUNDDOWN: { s: "Rounds a number down, toward zero", p: { number: { d: "is any real number that you want rounded down" }, numDigits: { d: "is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer" } } }, ROUNDUP: { s: "Rounds a number up, away from zero", p: { number: { d: "is any real number that you want rounded up" }, numDigits: { d: "is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer" } } }, SEQUENCE: { s: "Returns a sequence of numbers", p: { rows: { d: "the number of rows to return" }, columns: { d: "the number of columns to return", v: 1 }, start: { d: "the first number in the sequence", v: 1 }, step: { d: "the amount to increment each subsequent value in the sequence", v: 1 } } }, SERIESSUM: { s: "Returns the sum of a power series based on the formula", p: { x: { d: "is the input value to the power series" }, n: { d: "is the initial power to which you want to raise x" }, m: { d: "is the step by which to increase n for each term in the series" }, coefficients: { d: "is a set of coefficients by which each successive power of x is multiplied" } } }, SIGN: { s: "Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative", p: { number: { d: "is any real number" } } }, SQRT: { s: "Returns the square root of a number", p: { number: { d: "is the number for which you want the square root" } } }, SQRTPI: { s: "Returns the square root of (number * Pi)", p: { number: { d: "is the number by which p is multiplied" } } }, SUBTOTAL: { s: "Returns a subtotal in a list or database", p: { functionNum: { d: "is the number 1 to 11 that specifies the summary function for the subtotal." }, ref: { d: "ref1,ref2,... are 1 to 254 ranges or references for which you want the subtotal" } }, h: "Unimplemented" }, SUM: { s: "Adds all the numbers in a range of cells", p: { number: { d: "number1,number2,... are 1 to 255 numbers to sum. Logical values and text are ignored in cells, included if typed as arguments" } } }, SUMIF: { s: "Adds the cells specified by a given condition or criteria", p: { range: { d: "is the range of cells you want evaluated" }, criteria: { d: "is the condition or criteria in the form of a number, expression, or text that defines which cells will be added" }, sumRange: { d: "are the actual cells to sum. If omitted, the cells in range are used" } }, h: "Unimplemented" }, SUMIFS: { s: "Adds the cells specified by a given set of conditions or criteria", p: { sumRange: { d: "are the actual cells to sum." }, criteriaRange: { d: "criteria_range1,criteria_range2,... is the range of cells you want evaluated for the particular condition" }, criteria: { d: "criteria1,criteria2,... is the condition or criteria in the form of a number, expression, or text that defines which cells will be added" } }, h: "Unimplemented" }, SUMPRODUCT: { s: "Returns the sum of the products of corresponding ranges or arrays", p: { array1: { d: "array1,array2,... are 2 to 255 arrays for which you want to multiply and then add components. All arrays must have the same dimensions" }, rest: {} } }, SUMSQ: { s: "Returns the sum of the squares of the arguments. The arguments can be numbers, arrays, names, or references to cells that contain numbers", p: { number: { d: "number1,number2,... are 1 to 255 numbers, arrays, names, or references to arrays for which you want the sum of the squares" } } }, SUMX2MY2: { s: "Sums the differences between the squares of two corresponding ranges or arrays", p: { arrayX: { d: "is the first range or array of numbers and can be a number or name, array, or reference that contains numbers" }, arrayY: { d: "is the second range or array of numbers and can be a number or name, array, or reference that contains numbers" } } }, SUMX2PY2: { s: "Returns the sum total of the sums of squares of numbers in two corresponding ranges or arrays", p: { arrayX: { d: "is the first range or array of numbers and can be a number or name, array, or reference that contains numbers" }, arrayY: { d: "is the second range or array of numbers and can be a number or name, array, or reference that contains numbers" } } }, SUMXMY2: { s: "Sums the squares of the differences in two corresponding ranges or arrays", p: { arrayX: { d: "is the first range or array of numbers and can be a number or name, array, or reference that contains numbers" }, arrayY: { d: "is the second range or array of numbers and can be a number or name, array, or reference that contains numbers" } } }, TRUNC: { s: "Truncates a number to an integer by removing the decimal, or fractional, part of the number", p: { number: { d: "is the number you want to truncate" }, numDigits: { d: "is a number specifying the precision of the truncation", v: 0 } } } };
14
+ export {
15
+ e as default
16
+ };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ /**
8
+ * @license @sheetxl/sdk - A high-performance, embeddable spreadsheet engine. - v0.0.0
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ async function t() {
14
+ const { webcrypto: t2 } = await import("crypto");
15
+ return t2;
16
+ }
17
+ export {
18
+ t as getCrypto
19
+ };