@sheetxl/sdk 0.4.10 → 0.4.12

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 (167) hide show
  1. package/browser/cjs/39ybckEYrSwofEL8.cjs +7 -0
  2. package/browser/cjs/7F9Y23ZviM83MrLB.cjs +7 -0
  3. package/browser/cjs/9OWmR6t6tmtR3HKs.cjs +7 -0
  4. package/browser/cjs/AoftwE84s7sGV4YJ.cjs +7 -0
  5. package/browser/cjs/BJZM9I81r8nRPehZ.cjs +7 -0
  6. package/browser/cjs/BLHJddfDq44WHNs6.cjs +7 -0
  7. package/browser/cjs/BdbcopQNFs0VAYoZ.cjs +7 -0
  8. package/browser/cjs/C2McR1ZSNpfPMaI1.cjs +7 -0
  9. package/browser/cjs/CAC1euA3bA1IpMhZ.cjs +7 -0
  10. package/browser/cjs/CDwPpmyZAYF_aBaX.cjs +7 -0
  11. package/browser/cjs/CP2yuwDM2Fzm2bQy.cjs +7 -0
  12. package/browser/cjs/CSn-hMrEUwFcYpBT.cjs +13 -0
  13. package/browser/cjs/CeuXJMoeKjSnby5j.cjs +7 -0
  14. package/browser/cjs/Ch5W6IQIqcVy3CUV.cjs +10 -0
  15. package/browser/cjs/CtaH9jllSQmzD2AZ.cjs +7 -0
  16. package/browser/cjs/Ctw9E_2VE0l2P6Yk.cjs +7 -0
  17. package/browser/cjs/Czl-z-_3jRiufzFq.cjs +7 -0
  18. package/browser/cjs/D-HLMUqMDuHV5fFD.cjs +7 -0
  19. package/browser/cjs/D5pK8FbUHJmgHMVR.cjs +7 -0
  20. package/browser/cjs/DA7BmT8kgTnFcBps.cjs +7 -0
  21. package/browser/cjs/DBBaD9qGTCHmDZzt.cjs +7 -0
  22. package/browser/cjs/DD24B_zQQtT3iqLe.cjs +7 -0
  23. package/browser/cjs/DKwnqzohEhfP9-D8.cjs +7 -0
  24. package/browser/cjs/DO-igV-beWuURc9q.cjs +7 -0
  25. package/browser/cjs/DR2yNdWmKOx4XEn_.cjs +7 -0
  26. package/browser/cjs/D_PNelhiuhC_pYQe.cjs +7 -0
  27. package/{node/esm/Dk3ABmYKlVup4l-u.mjs → browser/cjs/Dg4inQb_qTGcwKWj.cjs} +2 -5
  28. package/browser/cjs/KlMBkdsOI1TbINZi.cjs +7 -0
  29. package/browser/cjs/Me1cXPMFZnMqu9Ni.cjs +10 -0
  30. package/browser/cjs/P1V-5yUNwU9r5yLw.cjs +7 -0
  31. package/browser/cjs/Vkjfeba56sx1eWi0.cjs +7 -0
  32. package/browser/cjs/dwUVhGNDSgZfRm3P.cjs +7 -0
  33. package/browser/cjs/index.cjs +4 -3
  34. package/browser/cjs/txLIAZHRWIU9kf0I.cjs +7 -0
  35. package/browser/esm/30SRICLt1PAxlGS8.mjs +7 -0
  36. package/browser/esm/{CsPZhcz5eLf-CbkJ.mjs → 9jeiH8SVL_ZJYLxo.mjs} +2 -7
  37. package/browser/esm/B-xoX7KIAUytU1_U.mjs +7 -0
  38. package/browser/esm/B_bzVKesE_JRp6EW.mjs +7 -0
  39. package/browser/esm/BbO1W_XgpJnqTSty.mjs +7 -0
  40. package/browser/esm/BngRU84kl6oeKeYG.mjs +7 -0
  41. package/browser/esm/BuJVzVii6s-ETLFo.mjs +7 -0
  42. package/browser/esm/ByHA0yF73W3Lubv1.mjs +13 -0
  43. package/browser/esm/C9XmeyBj3CidGuuQ.mjs +7 -0
  44. package/browser/esm/CGlSMtRCaIAn2kcK.mjs +7 -0
  45. package/browser/esm/CNZEHpuUipSLJnir.mjs +7 -0
  46. package/browser/esm/CUDgLpRqpHPjfaCi.mjs +7 -0
  47. package/browser/esm/ChB6ZgoNr49oUuh9.mjs +7 -0
  48. package/browser/esm/D0HYMuygnYvY7Atx.mjs +7 -0
  49. package/browser/esm/D1PWaFTHEZfGGXTb.mjs +7 -0
  50. package/browser/esm/D2zmZcBdOoyixeUA.mjs +7 -0
  51. package/browser/esm/D525g_2eyexUf3Zf.mjs +7 -0
  52. package/browser/esm/DMJw8DmfeX6u2glN.mjs +7 -0
  53. package/browser/esm/DfHQEyIlLlv5P49Q.mjs +7 -0
  54. package/browser/esm/Dhvtq8jHg8BxOR0C.mjs +7 -0
  55. package/browser/esm/DkPPc6PpShDjAHJV.mjs +7 -0
  56. package/browser/esm/DqEqprkW8poZvfjh.mjs +7 -0
  57. package/browser/esm/DtSj65a0yyYL8HUw.mjs +7 -0
  58. package/browser/esm/Dw0Okzcg5hIcHUcc.mjs +7 -0
  59. package/browser/esm/Dzo7yK5H2NRkocTa.mjs +7 -0
  60. package/browser/esm/G_2bOLOa20d7iobX.mjs +7 -0
  61. package/browser/esm/MRXgg6FvbB08Ze4M.mjs +7 -0
  62. package/browser/esm/SePiM6uWrcY09dym.mjs +7 -0
  63. package/browser/esm/eCZnrKI7SxPgdErZ.mjs +7 -0
  64. package/browser/esm/index.mjs +2 -84
  65. package/browser/esm/nE8H93zlwoi3F8Ii.mjs +10 -0
  66. package/browser/esm/ui3SG2ZyuCKIR0An.mjs +7 -0
  67. package/browser/esm/vk7TdrD0zPqtT8_n.mjs +7 -0
  68. package/browser/esm/yM_d2jrPPN_EupI0.mjs +10 -0
  69. package/licenses/dependencies.txt +3 -3
  70. package/{browser/esm/70MScShy9oEFZGC-.mjs → node/esm/BJvhZja9zXr81ch6.mjs} +1 -1
  71. package/node/esm/{YqgO5dqnNDu6tJAq.mjs → BK_7sJa3fTDIKVsK.mjs} +2 -2
  72. package/node/esm/{CdbncxwuP2LcomiC.mjs → BPhIhbwKpbuhJ5n5.mjs} +1 -1
  73. package/node/esm/{BYw54CVi5Zykf7P_.mjs → BQb_TIMVKb4ap8qn.mjs} +1 -1
  74. package/node/esm/{B2GPpiwGDiHZ4Mnx.mjs → BW1-l-HQdvRTQ7Bm.mjs} +4 -4
  75. package/{browser/esm/Dk3ABmYKlVup4l-u.mjs → node/esm/Bkj8joA7ej1p4iQv.mjs} +1 -1
  76. package/node/esm/{BD4U7piuPUWGdmvF.mjs → BnQS3_N8ZEyMLfgn.mjs} +1 -1
  77. package/node/esm/{CYs7VtVLEbhMy_iG.mjs → Bs1vmYEblngyWvkW.mjs} +1 -1
  78. package/node/esm/{BWm5puKy7haAGpHu.mjs → BtDgmaUXSuZwZauR.mjs} +2 -2
  79. package/node/esm/{Blozz9cX9jUqOnkK.mjs → C2nQBB-2yJ1qfKsG.mjs} +1 -1
  80. package/node/esm/{mkuXwkQcdkBHUMsY.mjs → CEBBIejO4nn_eoLE.mjs} +1 -1
  81. package/{browser/esm/3AEwlfYXdvg1zUXm.mjs → node/esm/CEBaRGnJ6Pau61Z3.mjs} +1 -1
  82. package/node/esm/{CxkMMFqIme5dCX9o.mjs → CSr4e1I9DtTv2w79.mjs} +1 -1
  83. package/node/esm/CWUmgm7_b5VypIPN.mjs +80 -0
  84. package/node/esm/{BW04nsyJWeVHBcFW.mjs → Cb2A-sSxQbrq7_st.mjs} +1 -1
  85. package/node/esm/{DQwOIKwLzYjUwPmT.mjs → CfSD4cLmkg0FqnhQ.mjs} +1 -1
  86. package/node/esm/{C8OHYChkHQk2jVzy.mjs → ChgW0mo5gCgLQ4qn.mjs} +1 -1
  87. package/node/esm/{Br_wraXbAu-VOj0p.mjs → Cl6j-EVdzk8MvmYu.mjs} +1 -1
  88. package/node/esm/{CXhWG2Dg31l6Mo8r.mjs → Cvzp8bwJnKvjvZSp.mjs} +1 -1
  89. package/node/esm/{BJgxNxKnNgVBP4Hp.mjs → D-7D30G3TPv5yZHW.mjs} +1 -1
  90. package/node/esm/{0OTV9xpta6cm7Yx6.mjs → DPWAK-dKa7BGHzhV.mjs} +1 -1
  91. package/{browser/esm/DbezlvRyCGtHZgSZ.mjs → node/esm/DaA9EfLaa4eAL5v5.mjs} +1 -1
  92. package/{browser/esm/sUZorY3sws86BcMb.mjs → node/esm/DdQQdRO6WRU-o7fW.mjs} +1 -1
  93. package/{browser/esm/BLET1HFCb5u0-_Eo.mjs → node/esm/DqzaLjnlgJ73P6fj.mjs} +1 -1
  94. package/node/esm/{DXj8p7NZndUJBRAj.mjs → KTvP9pq_hIePsIcs.mjs} +1 -1
  95. package/node/esm/{Dq32tysuLIKWEFO_.mjs → R6sbyZ3F8U46a2pT.mjs} +1 -1
  96. package/node/esm/{DrU-yP_Fb9i7w1lb.mjs → RjYTditNvvkkhvec.mjs} +1 -1
  97. package/{browser/esm/CCcaxwoCKpK91TYc.mjs → node/esm/Ru2U-PXJ-wtFJVIi.mjs} +1 -1
  98. package/{browser/esm/CA504N_MgS6GSFmG.mjs → node/esm/_50UNzbNjsJJ5JeA.mjs} +1 -1
  99. package/node/esm/{Cyb9hq0LVkNm7yoj.mjs → ebMdiumtVWrujqaH.mjs} +1 -1
  100. package/node/esm/index.mjs +8 -8
  101. package/node/esm/{BelMCqHHX_Ln7ik4.mjs → wYdBXNtyuqNnNqw7.mjs} +2 -2
  102. package/package.json +4 -4
  103. package/browser/cjs/-4uKwgMCs2uA4zYY.cjs +0 -6
  104. package/browser/cjs/23Opade9fWTWmOw5.cjs +0 -6
  105. package/browser/cjs/6SNZR9WEya-Mi0Ec.cjs +0 -1501
  106. package/browser/cjs/7lk46bEggXm0Adux.cjs +0 -6
  107. package/browser/cjs/B0U3u9iqqnQvnw_Z.cjs +0 -6
  108. package/browser/cjs/BEQPlpKfeBPKELfa.cjs +0 -6
  109. package/browser/cjs/BKdxsyIZAckH_1Rs.cjs +0 -6
  110. package/browser/cjs/BKu_2G3LBpnvF7WK.cjs +0 -6
  111. package/browser/cjs/BTWYrYyq7P04Hhgy.cjs +0 -6
  112. package/browser/cjs/BVgdgozKIof0HqZa.cjs +0 -6
  113. package/browser/cjs/BXi-7ztAEss53BNW.cjs +0 -6
  114. package/browser/cjs/BzzSS21ndAnpHnTK.cjs +0 -6
  115. package/browser/cjs/C-JX44FribP4xuCm.cjs +0 -6
  116. package/browser/cjs/C12NQkp7rKKeLgpL.cjs +0 -60
  117. package/browser/cjs/CIisU9Fr1gqlOapx.cjs +0 -13
  118. package/browser/cjs/CRjnB0UGZizopxIy.cjs +0 -7
  119. package/browser/cjs/CfmxldeTiQsDhe4k.cjs +0 -6
  120. package/browser/cjs/CrkVZFNUXb_YVEfl.cjs +0 -6
  121. package/browser/cjs/Csmvu-Gg7GIET2fx.cjs +0 -124
  122. package/browser/cjs/D5kea7N3qYrpyi6Z.cjs +0 -6
  123. package/browser/cjs/DDPVADUPfi4JqKY9.cjs +0 -15
  124. package/browser/cjs/DJSDSOdIMakiUL9U.cjs +0 -6
  125. package/browser/cjs/DgJG2zU2CpBE2JKD.cjs +0 -6
  126. package/browser/cjs/DqHT7AmlwwAApU0v.cjs +0 -32
  127. package/browser/cjs/DqdKJmCBZ3tiiTyS.cjs +0 -6
  128. package/browser/cjs/Dy_w3ejsXCUjhwLi.cjs +0 -6
  129. package/browser/cjs/EAjldglgyKcpKzX6.cjs +0 -6
  130. package/browser/cjs/QraWsiDLYuP865Pt.cjs +0 -6
  131. package/browser/cjs/TMXcSm2F77kJ6GbS.cjs +0 -6
  132. package/browser/cjs/g9Un0PdQLp8LcMP-.cjs +0 -6
  133. package/browser/cjs/hNHT5yLsXAZ-mS5K.cjs +0 -6
  134. package/browser/cjs/o_FLjAWENTjXcsuZ.cjs +0 -6
  135. package/browser/cjs/rBPqKMZ7T6poaL7T.cjs +0 -6
  136. package/browser/esm/3-pvLx1jF0RJ56jT.mjs +0 -472
  137. package/browser/esm/3kB3KaOgV-3ox4C3.mjs +0 -426
  138. package/browser/esm/BJgxNxKnNgVBP4Hp.mjs +0 -10
  139. package/browser/esm/BO-YRuEp35GIVL4O.mjs +0 -10
  140. package/browser/esm/BOL-jxmJyje4-Hxe.mjs +0 -10
  141. package/browser/esm/BSFibAPQFeBovPl3.mjs +0 -10
  142. package/browser/esm/BW04nsyJWeVHBcFW.mjs +0 -10
  143. package/browser/esm/BaGFns-M8bCUjgnc.mjs +0 -3974
  144. package/browser/esm/BifIJRmeTJJLYCr-.mjs +0 -24
  145. package/browser/esm/Br_wraXbAu-VOj0p.mjs +0 -10
  146. package/browser/esm/BvE9cJg2esqHIr98.mjs +0 -10
  147. package/browser/esm/CMO8yX7mxIaFV5GC.mjs +0 -820
  148. package/browser/esm/Cqf8ZomeNI_0U-UD.mjs +0 -29
  149. package/browser/esm/DQwOIKwLzYjUwPmT.mjs +0 -10
  150. package/browser/esm/DXj8p7NZndUJBRAj.mjs +0 -10
  151. package/browser/esm/DcPcMjMOmfyIGaSN.mjs +0 -1575
  152. package/browser/esm/DhqkybSwX2wqkqcf.mjs +0 -24009
  153. package/browser/esm/DpJLw2aGOg6yuBjH.mjs +0 -10
  154. package/browser/esm/Dq32tysuLIKWEFO_.mjs +0 -10
  155. package/browser/esm/DrU-yP_Fb9i7w1lb.mjs +0 -10
  156. package/browser/esm/WY6tkuqX7I-Tw85_.mjs +0 -5651
  157. package/browser/esm/mkuXwkQcdkBHUMsY.mjs +0 -10
  158. package/browser/esm/skZ-cAv6270PFv3k.mjs +0 -10
  159. package/browser/esm/xUdz3zy_nz-hMfhq.mjs +0 -21
  160. package/node/esm/3AEwlfYXdvg1zUXm.mjs +0 -10
  161. package/node/esm/70MScShy9oEFZGC-.mjs +0 -10
  162. package/node/esm/BLET1HFCb5u0-_Eo.mjs +0 -10
  163. package/node/esm/CA504N_MgS6GSFmG.mjs +0 -10
  164. package/node/esm/CCcaxwoCKpK91TYc.mjs +0 -10
  165. package/node/esm/CSgS-BWwvF8YA6gv.mjs +0 -80
  166. package/node/esm/DbezlvRyCGtHZgSZ.mjs +0 -10
  167. package/node/esm/sUZorY3sws86BcMb.mjs +0 -10
@@ -1,472 +0,0 @@
1
- import { $ as he } from "./CMO8yX7mxIaFV5GC.mjs";
2
- /**
3
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.10
4
- *
5
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
- * License: The license can be found at https://www.sheetxl.com/license.
7
- */
8
- var se, q, r;
9
- (q = se || (se = {})).Orientation = { Column: "column", Row: "row" }, q.Orientations = { ...q.Orientation, Both: "both" }, q.Direction = { Up: "up", Down: "down", Left: "left", Right: "right" }, ((e) => {
10
- e.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 }, e.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!" };
11
- class a extends Error {
12
- constructor(n, i, S, J) {
13
- super(S, J), this._label = i, this._code = n, this.details = J;
14
- }
15
- static {
16
- this.code = e.Code.Unknown;
17
- }
18
- get isFormulaError() {
19
- return !0;
20
- }
21
- getLabel() {
22
- return this._label;
23
- }
24
- getCode() {
25
- return this._code;
26
- }
27
- equals(n) {
28
- return !!n && (this._code === n._code || this._code === n.code);
29
- }
30
- get [Symbol.toStringTag]() {
31
- return "[FormulaError]";
32
- }
33
- toString() {
34
- return this.message || this._label;
35
- }
36
- }
37
- e.Known = a;
38
- class T extends a {
39
- constructor(n, i) {
40
- super(e.Code.Parse, e.Label.Parse, n, i);
41
- }
42
- static {
43
- this.code = e.Code.Parse;
44
- }
45
- getDetails() {
46
- const n = this.details;
47
- return { line: n?.line ?? 1, column: n?.column ?? 1, offset: n?.offset ?? 0, length: n?.length ?? 0 };
48
- }
49
- }
50
- e.Parse = T;
51
- class x extends a {
52
- constructor(n, i) {
53
- super(e.Code.Null, e.Label.Null, n, i);
54
- }
55
- static {
56
- this.code = e.Code.Null;
57
- }
58
- }
59
- e.Null = x;
60
- class j extends a {
61
- constructor(n, i) {
62
- super(e.Code.Div0, e.Label.Div0, n, i);
63
- }
64
- static {
65
- this.code = e.Code.Div0;
66
- }
67
- }
68
- e.Div0 = j;
69
- class X extends a {
70
- constructor(n, i) {
71
- super(e.Code.Value, e.Label.Value, n, i);
72
- }
73
- static {
74
- this.code = e.Code.Value;
75
- }
76
- }
77
- e.Value = X;
78
- class s extends a {
79
- constructor(n, i) {
80
- super(e.Code.Ref, e.Label.Ref, n, i);
81
- }
82
- static {
83
- this.code = e.Code.Ref;
84
- }
85
- }
86
- e.Ref = s;
87
- class K extends a {
88
- constructor(n, i) {
89
- super(e.Code.Name, e.Label.Name, n, i);
90
- }
91
- static {
92
- this.code = e.Code.Name;
93
- }
94
- }
95
- e.Name = K;
96
- class U extends a {
97
- constructor(n, i) {
98
- super(e.Code.Num, e.Label.Num, n, i);
99
- }
100
- static {
101
- this.code = e.Code.Num;
102
- }
103
- }
104
- e.Num = U;
105
- class z extends a {
106
- constructor(n, i) {
107
- super(e.Code.NA, e.Label.NA, n, i);
108
- }
109
- static {
110
- this.code = e.Code.NA;
111
- }
112
- }
113
- e.NA = z;
114
- class Y extends a {
115
- constructor(n, i) {
116
- super(e.Code.GettingData, e.Label.GettingData, n, i);
117
- }
118
- static {
119
- this.code = e.Code.GettingData;
120
- }
121
- }
122
- e.GettingData = Y;
123
- class M extends a {
124
- constructor(n, i) {
125
- super(e.Code.Spill, e.Label.Spill, n, i);
126
- }
127
- static {
128
- this.code = e.Code.Spill;
129
- }
130
- }
131
- e.Spill = M;
132
- class I extends a {
133
- constructor(n, i) {
134
- super(e.Code.Connect, e.Label.Connect, n, i);
135
- }
136
- static {
137
- this.code = e.Code.Connect;
138
- }
139
- }
140
- e.Connect = I;
141
- class G extends a {
142
- constructor(n, i) {
143
- super(e.Code.Blocked, e.Label.Blocked, n, i);
144
- }
145
- static {
146
- this.code = e.Code.Blocked;
147
- }
148
- }
149
- e.Blocked = G;
150
- class _ extends a {
151
- constructor(n, i) {
152
- super(e.Code.Unknown, e.Label.Unknown, n, i);
153
- }
154
- static {
155
- this.code = e.Code.Unknown;
156
- }
157
- }
158
- e.Unknown = _;
159
- class F extends a {
160
- constructor(n, i) {
161
- super(e.Code.Field, e.Label.Field, n, i);
162
- }
163
- static {
164
- this.code = e.Code.Field;
165
- }
166
- }
167
- e.Field = F;
168
- class Q extends a {
169
- constructor(n, i) {
170
- super(e.Code.Calc, e.Label.Calc, n, i);
171
- }
172
- static {
173
- this.code = e.Code.Calc;
174
- }
175
- }
176
- e.Calc = Q;
177
- class O extends a {
178
- constructor(n, i) {
179
- super(e.Code.Busy, e.Label.Busy, n, i);
180
- }
181
- static {
182
- this.code = e.Code.Busy;
183
- }
184
- }
185
- e.Busy = O;
186
- class P extends a {
187
- constructor(n, i) {
188
- super(e.Code.Python, e.Label.Python, n, i);
189
- }
190
- static {
191
- this.code = e.Code.Python;
192
- }
193
- }
194
- e.Python = P;
195
- class Z extends a {
196
- constructor(n, i) {
197
- super(e.Code.Timeout, e.Label.Timeout, n, i);
198
- }
199
- static {
200
- this.code = e.Code.Timeout;
201
- }
202
- }
203
- e.Timeout = Z;
204
- })(r || (r = {}));
205
- const f = {};
206
- f[r.Code.Parse] = r.Parse, f[r.Code.Null] = r.Null, f[r.Code.Div0] = r.Div0, f[r.Code.Value] = r.Value, f[r.Code.Ref] = r.Ref, f[r.Code.Name] = r.Name, f[r.Code.Num] = r.Num, f[r.Code.NA] = r.NA, f[r.Code.GettingData] = r.GettingData, f[r.Code.Spill] = r.Spill, f[r.Code.Connect] = r.Connect, f[r.Code.Blocked] = r.Blocked, f[r.Code.Unknown] = r.Unknown, f[r.Code.Field] = r.Field, f[r.Code.Calc] = r.Calc, f[r.Code.Busy] = r.Busy, f[r.Code.Python] = r.Python, f[r.Code.Timeout] = r.Timeout;
207
- const ce = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), de = /* @__PURE__ */ new Map(), ue = /* @__PURE__ */ new Map(), le = Object.keys(f);
208
- for (let e = 0; e < le.length; e++) {
209
- const a = le[e], T = f[a];
210
- de.set(r.Label[a], T), ue.set(r.Code[a], T);
211
- const x = new T();
212
- ce.set(x.getLabel(), x), ie.set(x.getCode(), x);
213
- }
214
- const ge = ie.get(r.Code.Unknown);
215
- var p;
216
- (p = r || (r = {})).BuiltIn = { Parse: new p.Parse(), Null: new p.Null(), Div0: new p.Div0(), Value: new p.Value(), Ref: new p.Ref(), Name: new p.Name(), Num: new p.Num(), NA: new p.NA(), GettingData: new p.GettingData(), Spill: new p.Spill(), Connect: new p.Connect(), Blocked: new p.Blocked(), Unknown: new p.Unknown(), Field: new p.Field(), Calc: new p.Calc(), Busy: new p.Busy(), Python: new p.Python(), Timeout: new p.Timeout() }, p.getBuiltInByLabel = (e) => ce.get(e), p.newTypedError = (e, a, T) => {
217
- let x;
218
- return x = typeof e == "string" ? de.get(e) : ue.get(e), x || (x = p.Unknown), new x(a, T);
219
- }, p.getBuiltInById = (e) => ie.get(e) || ge;
220
- let A = null, H = null;
221
- const we = { compilerOptions: { target: "esnext" } }, Ce = async () => `
222
- interface FirstTest {
223
- isTrue?: boolean;
224
- }
225
- `, pe = /* @__PURE__ */ new Map([["IReferenceRange", "r"], ["IRange", "l"]]), me = /* @__PURE__ */ new Map([["IWorkbook", "workbook"], ["ISheet", "sheet"], ["ICellRanges", "ranges"], ["ICellRange", "range"], ["IFormulaContext", "context"]]), ne = (e, a) => {
226
- Array.from(a.keys()).forEach((T) => {
227
- const x = a.get(T);
228
- a.set(`${e}.${T}`, x);
229
- });
230
- }, xe = /* @__PURE__ */ new Map([["Scalar", "*"], ["FormulaError.Known", "e"], ["Date", "Date"], ["JSON", "JSON"]]), be = /* @__PURE__ */ new Map([]), oe = "SheetXL";
231
- ne(oe, pe), ne(oe, me), ne(oe, be);
232
- const ke = /* @__PURE__ */ new Map([["Promise", () => ({ async: !0 })], ["Observable", () => ({ stream: !0 })]]);
233
- let W = null;
234
- async function Te() {
235
- if (W) return W;
236
- try {
237
- return await (await import("./xUdz3zy_nz-hMfhq.mjs")).initialize();
238
- } catch (e) {
239
- throw W = null, e;
240
- } finally {
241
- W = null;
242
- }
243
- }
244
- async function Se(e) {
245
- const a = e?.source ?? null;
246
- if (!a) return null;
247
- const T = (e.disableBundle || e.declarationsOnly) ?? !1, x = [Ce(), Te()], j = await Promise.all(x), X = j[0], s = j[1];
248
- let K = "", U = null;
249
- const z = [], Y = { allowJs: !0, declaration: !1, sourceMap: !1, inlineSourceMap: !1, inlineSources: !1, isolatedModules: !0, preserveConstEnums: !1, module: 99, noResolve: !0, emitDeclarationOnly: !1, target: s.ScriptTarget.ES2020 }, M = "script", I = `${M}.ts`, G = "lib.d.ts", _ = "global.d.ts", F = { [I]: a, [G]: `
250
- /**
251
- * Represents the completion of an asynchronous operation
252
- */
253
- interface Promise<T> {
254
- /**
255
- * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
256
- * resolved value cannot be modified from the callback.
257
- * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
258
- * @returns A Promise for the completion of the callback.
259
- */
260
- finally(onfinally?: (() => void) | undefined | null): Promise<T>;
261
- }
262
- `, [_]: X }, Q = { getSourceFile: (t, d, E, l) => s.createSourceFile(t, F[t], s.ScriptTarget.Latest, !0), fileExists: (t) => F[t] !== void 0, readFile: (t) => F[t], writeFile: (t, d) => {
263
- F[t] = d;
264
- }, getCurrentDirectory: () => "./", getCanonicalFileName: (t) => t, useCaseSensitiveFileNames: () => !0, getDefaultLibFileName: (t) => G, getNewLine: () => `
265
- ` }, O = s.createProgram([I, _], Y, Q), P = O.getTypeChecker(), Z = O.getSourceFile(I), y = O.emit();
266
- y.diagnostics.length > 0 && console.warn(y.diagnostics), K = F[`${M}.js`];
267
- const n = (t, d, E, l) => {
268
- if (t) {
269
- if (t.kind === s.SyntaxKind.NumberKeyword) d.scalar = "n";
270
- else if (t.kind === s.SyntaxKind.StringKeyword) d.scalar = "s";
271
- else if (t.kind === s.SyntaxKind.BooleanKeyword) d.scalar = "b";
272
- else if (t.kind === s.SyntaxKind.UndefinedKeyword || t.kind === s.SyntaxKind.NullKeyword || t.kind === s.SyntaxKind.VoidKeyword) {
273
- if (l) return void S(t, new Error(`'undefined' is not a valid type for input: '${t?.parent?.name?.escapedText}'.`));
274
- d.scalar = "z";
275
- } else if (t.kind === s.SyntaxKind.BigIntKeyword) d.scalar = "n";
276
- else if (t.kind === s.SyntaxKind.AnyKeyword) d.scalar = "z";
277
- else if (t.kind === s.SyntaxKind.ArrayType) {
278
- const c = t.elementType;
279
- if (!c) return void S(t, new Error(`'Array' must be typed: '${t?.parent?.name?.escapedText}'.`));
280
- d.arrayDepth = (d.arrayDepth ?? 0) + 1, n(c, d, E, l);
281
- } else if (t.kind !== s.SyntaxKind.TupleType && t.kind === s.SyntaxKind.TypeReference) {
282
- const c = t.typeName?.getText?.() ?? null, N = pe.get(c);
283
- let k = !1;
284
- N && (d.range = N, k = !0);
285
- const D = xe.get(c);
286
- if (D && (d.scalar = D), D !== void 0 && (k = !0), l) {
287
- const g = me.get(c);
288
- if (g) return g;
289
- } else {
290
- const g = ke.get(c);
291
- if (g) {
292
- const m = { ...d, ...g() };
293
- let o = 0;
294
- if (m.async && o++, m.stream && o++, o > 1) return void S(t, new Error(`'${c}' cannot have multiple modifiers: '${t?.parent?.name?.escapedText}'.`));
295
- d = m, k = !0;
296
- }
297
- }
298
- if (!k) return void S("node", new Error(`'${c}' is not a valid type: '${t?.parent?.name?.escapedText}'.`));
299
- const b = t.typeArguments;
300
- if (b) {
301
- if (b.length !== 1) return void S(t, new Error(`'${c}' must be typed with exactly 1 type: '${t?.parent?.name?.escapedText}'.`));
302
- n(b[0], d, E, l);
303
- }
304
- }
305
- } else S(t, new Error(`Type is not defined for '${d?.name ?? "return"}'.`));
306
- }, i = [], S = (t, d) => {
307
- i.push(d);
308
- };
309
- if (s.forEachChild(Z, (t) => {
310
- if (E = t, (s.getCombinedModifierFlags(E) & s.ModifierFlags.Export) !== 0 && s.isFunctionDeclaration(t)) {
311
- const l = {}, c = { parameters: {} }, N = t?.name?.getText();
312
- try {
313
- l.name = N;
314
- const k = P.getSymbolAtLocation(t.name).getDocumentationComment(P);
315
- if (k && k.length > 0 && k[0].text) {
316
- let m = k[0].text;
317
- m = m.replace(/[\r\n]+/g, "\\n").trim(), c.summary = m;
318
- }
319
- const D = {};
320
- n(t.type, D, l, !1), l.returnType = D;
321
- const b = {};
322
- d = t, (s.getCombinedModifierFlags(d) & s.ModifierFlags.Default) !== 0 && (b.default = !0, U = N), Object.keys(b).length > 0 && (l.behavior = b), l.parameters = [];
323
- const g = /* @__PURE__ */ new Map();
324
- for (let m = 0; m < t.parameters.length; m++) {
325
- const o = t.parameters[m], h = {};
326
- h.name = o.name?.getText();
327
- const $ = n(o.type, h, l, !0);
328
- if ($) {
329
- if (l.parameters.length !== 0) {
330
- const B = t?.parent, C = B?.name?.getText();
331
- return void S(t, new Error(`'${l.name}' contexts must be the first parameter: '${C}'.`));
332
- }
333
- l.context = $;
334
- continue;
335
- }
336
- let L;
337
- if ((o.initializer !== void 0 && o.initializer !== null || o.questionToken !== void 0 && o.questionToken !== null) && (h.optional = !0, o.initializer)) try {
338
- L = o.initializer.kind === s.SyntaxKind.StringLiteral ? o.initializer.text : o.initializer.kind === s.SyntaxKind.NumericLiteral ? parseFloat(o.initializer.text) : o.initializer.kind === s.SyntaxKind.TrueKeyword || o.initializer.kind === s.SyntaxKind.FalseKeyword ? o.initializer.kind === s.SyntaxKind.TrueKeyword : o.initializer.kind === s.SyntaxKind.NullKeyword ? null : o.initializer.kind === s.SyntaxKind.ObjectLiteralExpression || o.initializer.kind === s.SyntaxKind.ArrayLiteralExpression ? o.initializer.getText() : o.initializer.getText?.();
339
- } catch (B) {
340
- console.warn(`Couldn't extract default value for parameter '${h.name}'`, B);
341
- }
342
- o.dotDotDotToken && (h.rest = !0), l.parameters.push(h);
343
- const w = { description: "" };
344
- c.parameters[h.name] = w;
345
- const u = P.getSymbolAtLocation(o.name).getDocumentationComment(P);
346
- u && u.length > 0 && u[0].text && (w.description = u[0].text), L !== void 0 && (w.defaultValue = L), g.set(h.name, h);
347
- }
348
- if (t.jsDoc && t.jsDoc.length > 0) {
349
- const m = t.jsDoc;
350
- for (let o = 0; o < m.length; o++) {
351
- const h = m[o]?.tags;
352
- if (h) for (let $ = 0; $ < h.length; $++) {
353
- const L = h[$];
354
- let w = L?.tagName?.text;
355
- if (!w) continue;
356
- w = w.toLowerCase();
357
- let u = L.comment;
358
- const B = w === "hidden";
359
- if ((typeof u == "string" || B) && (typeof u == "string" && (u = u.replace(/[\r\n]+/g, "\\n").trim()), B || !u || (u = u.split(/\\n/)[0], u && u.length !== 0))) {
360
- if (u && typeof u == "string") {
361
- const C = /\{@link(code|plain)?\s+([^}|]+)(?:\s*\|\s*([^}]+))?\}/g;
362
- let v, R = u, V = [];
363
- for (; (v = C.exec(u)) !== null; ) {
364
- const [ee, te, ye, ae] = v, fe = [ye.trim()];
365
- ae && fe.push(ae.trim());
366
- }
367
- u = R, V.length > 0 && w === "see" && (c.links || (c.links = []), c.links.push(...V));
368
- }
369
- if (w === "name") {
370
- const C = u;
371
- C !== N && (c.name = C);
372
- } else if (w !== "description") {
373
- if (w === "summary") {
374
- const C = u;
375
- C && (c.summary = C);
376
- } else if (w === "param") {
377
- const C = L.name?.text, v = g.get(C);
378
- if (!v) {
379
- i.push(new Error(`Parameter '${C}' not found in function '${N}'.`));
380
- continue;
381
- }
382
- if (L.typeExpression && L.typeExpression.type) try {
383
- const R = L.typeExpression.type;
384
- if (R.kind === s.SyntaxKind.UnionType) {
385
- const V = [];
386
- v.enums = V, R.types.forEach((ee) => {
387
- if (ee.kind === s.SyntaxKind.LiteralType) {
388
- const te = ee.literal.text;
389
- te && V.push(te);
390
- }
391
- });
392
- }
393
- } catch (R) {
394
- console.warn("Error parsing JSDoc type expression:", R);
395
- }
396
- } else if (w === "returns" || w === "return") l.returnType.description = u;
397
- else if (w === "category") c.category = u;
398
- else if (w === "hidden") {
399
- let C = !0;
400
- const v = u?.toLowerCase();
401
- v === "false" ? C = !1 : v !== "true" && (C = u), C !== !1 && (c.hidden = C ?? !0);
402
- }
403
- }
404
- }
405
- }
406
- }
407
- }
408
- Object.keys(l.returnType).length === 0 && delete l.returnType, z.push([l, c]);
409
- } catch (k) {
410
- S(t, new Error(`'${N}': ${k.message}`));
411
- }
412
- }
413
- var d, E;
414
- }), i.length > 0) throw console.warn(i), new Error("There were compilation errors.", { cause: i });
415
- if (z.length === 0) throw new Error("No exported functions.");
416
- const J = `${he.uuidV4()}-script`;
417
- try {
418
- T || i.length !== 0 || (K = await async function(t, d, E = "/script.js", l = "__SHEETXL") {
419
- try {
420
- const c = await async function() {
421
- if (A) return A;
422
- if (H) {
423
- if (await H, !A) throw new Error("ESBuild initialization promise resolved, but instance is not available.");
424
- return A;
425
- }
426
- let g, m;
427
- H = new Promise((o, h) => {
428
- g = o, m = h;
429
- });
430
- try {
431
- const { initialize: o } = await import("./BifIJRmeTJJLYCr-.mjs");
432
- return A = await o(), g(), A;
433
- } catch (o) {
434
- throw console.error("Failed to import or initialize esbuild:", o), H = null, m(o), o;
435
- }
436
- }(), N = "@sheetxl/primitives", k = `
437
- export const FormulaContext = globalThis.${l}?.FormulaContext;
438
- export const ScalarType = globalThis.${l}?.ScalarType;
439
- export const Observable = globalThis.${l}?.Observable;
440
- export const IRange = globalThis.${l}?.IRange;
441
- export const FormulaError = globalThis.${l}?.FormulaError;
442
- // Add more exports as needed
443
- `, D = { name: "sheetxl-esbuild-in-memory", setup(g) {
444
- const m = "sheetxl-" + (/* @__PURE__ */ new Date()).getTime();
445
- g.onResolve({ filter: new RegExp(`^(${E.replace("/", "\\/")}|${N})$`) }, (o) => ({ path: o.path, namespace: m })), g.onResolve({ filter: /.*/ }, (o) => {
446
- if (o.namespace !== m) return console.warn(`esbuild: Treating import "${o.path}" as external.`), { path: o.path, external: !0 };
447
- }), g.onLoad({ filter: /.*/, namespace: m }, (o) => {
448
- let h;
449
- if (o.path === E) h = d;
450
- else {
451
- if (o.path !== N) return { errors: [{ text: `Cannot load unknown path in ${m}: ${o.path}` }] };
452
- h = k;
453
- }
454
- return { contents: h, loader: "ts" };
455
- });
456
- } }, b = await c.build({ entryPoints: [E], bundle: !0, write: !1, format: "esm", plugins: [D], sourcemap: "inline", tsconfigRaw: we, minify: !0, platform: "neutral" });
457
- if (b.outputFiles && b.outputFiles.length > 0) return b.outputFiles[0].text;
458
- throw b.errors && b.errors.length > 0 ? new Error(`esbuild bundling failed: ${b.errors.map((g) => g.text).join(`
459
- `)}`) : new Error("esbuild did not produce an output file.");
460
- } catch (c) {
461
- throw console.error("esbuild bundling process failed:", c), c;
462
- }
463
- }(0, K, M));
464
- } catch {
465
- console.warn("Error bundling script");
466
- }
467
- const re = { functions: z, commitId: J, source: a, name: "Script", language: "typescript", compiled: K };
468
- return U && (re.autoRun = U), re;
469
- }
470
- export {
471
- Se as compileModule
472
- };