@sheetxl/sdk 0.4.9 → 0.4.11

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/1aBi7EjSv7rlHImN.cjs +7 -0
  2. package/browser/cjs/2U_vaFrfcRohWzeU.cjs +7 -0
  3. package/browser/cjs/2nOrVMTAGGx_9TGL.cjs +7 -0
  4. package/browser/cjs/36TOhwWf_rpUol3H.cjs +7 -0
  5. package/browser/cjs/5zykq8Nm9_DGD2DJ.cjs +7 -0
  6. package/browser/cjs/7sNFPxy75NuqCDQh.cjs +7 -0
  7. package/browser/cjs/B73Zu8_s9vFWOh_O.cjs +7 -0
  8. package/browser/cjs/BAsFktGxZpUGmZLe.cjs +7 -0
  9. package/browser/cjs/BEsz-1T9Bb9AaMYL.cjs +7 -0
  10. package/browser/cjs/B_NhkERIkAJotIbp.cjs +7 -0
  11. package/browser/cjs/BdTk8Nhw8G_OzMbe.cjs +7 -0
  12. package/browser/cjs/Bo-zjba28_CWMlTu.cjs +7 -0
  13. package/browser/cjs/C06jNASkAfV7kAJt.cjs +7 -0
  14. package/browser/cjs/C9wOzvC_v6DonctC.cjs +7 -0
  15. package/browser/cjs/CMCnH7IuCm_auikF.cjs +7 -0
  16. package/browser/cjs/CVXGzVLWLx2CJQm9.cjs +13 -0
  17. package/browser/cjs/CaFJIY4BbuoM7WDD.cjs +7 -0
  18. package/{node/esm/CT933Kus8lsY5BJ2.mjs → browser/cjs/CcEyzUYgzJ50PUJe.cjs} +2 -5
  19. package/browser/cjs/Ch3tbUYQx16tKF7k.cjs +7 -0
  20. package/browser/cjs/Cv7d06asyk54h4qg.cjs +7 -0
  21. package/browser/cjs/DDRgvBqROJxESdD7.cjs +7 -0
  22. package/browser/cjs/DHpCAbHLYqvLP0Z6.cjs +7 -0
  23. package/browser/cjs/DNv6ybWP5Fldgc2s.cjs +7 -0
  24. package/browser/cjs/Dl3IO1DS4B5jgpKI.cjs +7 -0
  25. package/browser/cjs/DtBxSbHruNTMTsh-.cjs +10 -0
  26. package/browser/cjs/EU56rWjRMrkea9af.cjs +7 -0
  27. package/browser/cjs/Yi2_Rw5GDVzd_VxU.cjs +7 -0
  28. package/browser/cjs/ZJKVquWhB5WR-iPJ.cjs +7 -0
  29. package/browser/cjs/ZcKbNkAX98aqbRl3.cjs +7 -0
  30. package/browser/cjs/index.cjs +4 -3
  31. package/browser/cjs/kyw6u7fpNVXpqgsI.cjs +7 -0
  32. package/browser/cjs/nQY-7MdNrbTu3EmK.cjs +7 -0
  33. package/browser/cjs/trblZTDJ1nAz0rWR.cjs +7 -0
  34. package/browser/cjs/uyHKBD07R0GGZXep.cjs +10 -0
  35. package/browser/esm/1RkwhM87R80gyTMd.mjs +7 -0
  36. package/browser/esm/5w39mZuW-sWnmmdV.mjs +7 -0
  37. package/browser/esm/A8C5de6v1CBMgJZq.mjs +7 -0
  38. package/browser/esm/B9JgD2n0XcFJj3bo.mjs +7 -0
  39. package/browser/esm/BEs22-ynP5XGO3w2.mjs +7 -0
  40. package/browser/esm/BHc7eG4nZizeMBb5.mjs +7 -0
  41. package/browser/esm/BO0ncqgpx-62w_oX.mjs +7 -0
  42. package/browser/esm/BQCIUvZDEabV77HK.mjs +7 -0
  43. package/browser/esm/BVi-ZLSVMKE-zvx4.mjs +7 -0
  44. package/browser/esm/BsDRByzxyMQ1n9k6.mjs +7 -0
  45. package/browser/esm/BuUARF4geX1QlFaV.mjs +7 -0
  46. package/browser/esm/Bv47rNz3qnYylQjD.mjs +7 -0
  47. package/browser/esm/C-CL0OoNkb1zC70z.mjs +7 -0
  48. package/browser/esm/CK55N2ZgYHqyYvC2.mjs +7 -0
  49. package/browser/esm/{leTtDbQ6871lFfJe.mjs → CM_TdYA35a4ZBdwx.mjs} +2 -7
  50. package/browser/esm/COIpRrbH0PIAxGAv.mjs +7 -0
  51. package/browser/esm/CV82qaLuZfxcBBSy.mjs +10 -0
  52. package/browser/esm/CW0tmrVd5h3U4RZa.mjs +7 -0
  53. package/browser/esm/ChEVz9V1woVRX6WL.mjs +7 -0
  54. package/browser/esm/CuVRE_tWXcHiZiqD.mjs +7 -0
  55. package/browser/esm/DCgtfzoZVReua9he.mjs +7 -0
  56. package/browser/esm/DS7nkzMuzXOAIPF2.mjs +7 -0
  57. package/browser/esm/DTfK5ukJi2A2cG4a.mjs +13 -0
  58. package/browser/esm/Dk8xANVVmSj4hMfy.mjs +7 -0
  59. package/browser/esm/DkBcYI5GMfGWjMpw.mjs +7 -0
  60. package/browser/esm/DoolQNF8KdKfxJym.mjs +7 -0
  61. package/browser/esm/Du5u3LhdTaqIps_D.mjs +7 -0
  62. package/browser/esm/DyvAZkeumXN8GHi4.mjs +7 -0
  63. package/browser/esm/PVTl6mvmxvLJIzh9.mjs +7 -0
  64. package/browser/esm/Y5czqevaHtgUcl4L.mjs +7 -0
  65. package/browser/esm/iKCrpPPbOnKlkUDb.mjs +7 -0
  66. package/browser/esm/index.mjs +2 -84
  67. package/browser/esm/lfu13YaazVLqtmeU.mjs +10 -0
  68. package/browser/esm/s7QvhDE2kJkgBcZ8.mjs +7 -0
  69. package/licenses/dependencies.txt +3 -3
  70. package/node/esm/3LAM4nbl-SF93GnL.mjs +80 -0
  71. package/{browser/esm/6U_gCZNSSMBtVpQI.mjs → node/esm/BMXFtr-jXZGBZS1-.mjs} +1 -1
  72. package/node/esm/{CYI5_V7h9SYP9uuu.mjs → BmYqJNOwK3UJW3Xe.mjs} +1 -1
  73. package/node/esm/{DxQdDzIhBW98FzK0.mjs → C9U5rfU-8XoDc_V8.mjs} +4 -4
  74. package/node/esm/{BMwuCJEUqdaa7U-p.mjs → CFWQqFvDJMGXn8Qq.mjs} +1 -1
  75. package/node/esm/{De2OxC60SZUNAEyp.mjs → CFsZ2V-cxUHf5_Sy.mjs} +1 -1
  76. package/node/esm/{BIsxN-sskhnDr5fG.mjs → COCgGLfPgG-NG4Ei.mjs} +1 -1
  77. package/node/esm/{Dfr8q3AEbG7QZ6Xr.mjs → CW0oFlrKt5Uj6nuK.mjs} +1 -1
  78. package/node/esm/{CswjcUAc3OQ1SAwa.mjs → CXrQQnxTwsX0wNvN.mjs} +2 -2
  79. package/node/esm/{-vEyF-b1iAJfL3xp.mjs → CfeR1dXEw7Hep352.mjs} +1 -1
  80. package/node/esm/{Cu9r1uru0-RQmPlz.mjs → Ck1Jwm7rnsCLVeO1.mjs} +1 -1
  81. package/node/esm/{V08nP8uFHLrde5Md.mjs → Cn1RL1hYSYnF25uZ.mjs} +1 -1
  82. package/{browser/esm/P_0pzZ_mRTUIQOo8.mjs → node/esm/CnhQwEj214g59Jgw.mjs} +1 -1
  83. package/{browser/esm/CatWZ5LT2Nm4rT4U.mjs → node/esm/Cuk6l5jbAp5qG99L.mjs} +1 -1
  84. package/node/esm/{DYiuMNxXQxzsyogd.mjs → D8Hpg5A5WcmsFCPu.mjs} +1 -1
  85. package/node/esm/{bLL4P-mQqtHnzf3p.mjs → D90o-RTQ6VATF0Rk.mjs} +1 -1
  86. package/{browser/esm/CT933Kus8lsY5BJ2.mjs → node/esm/DLdBwr1RlyAhJCV0.mjs} +1 -1
  87. package/{browser/esm/225JOcHgUUs1EIBP.mjs → node/esm/DRM7eoEZII5c6Rbr.mjs} +1 -1
  88. package/{browser/esm/SwZDnMDw8b9gb6VD.mjs → node/esm/DSPiPnJGbhnNKLaY.mjs} +1 -1
  89. package/node/esm/{LpwVK3fzNuCZJlGb.mjs → DUlT61b-CgdPCdu7.mjs} +1 -1
  90. package/{browser/esm/BEWDCb-GzXXALTyM.mjs → node/esm/DWlgrg4IlFnKTR6y.mjs} +1 -1
  91. package/node/esm/{CydkHy4FDohjJzxv.mjs → DbLo1yZBy3dKaDrf.mjs} +1 -1
  92. package/node/esm/{Br12zSs0kOLavLkw.mjs → DpmEPBmhU3gneOpb.mjs} +1 -1
  93. package/{browser/esm/_N05nCCXsyDthwPS.mjs → node/esm/JIc401vM9srbtF9d.mjs} +1 -1
  94. package/node/esm/{Dtn71I8yWx6At8T4.mjs → KATYAmh0NIiQ-uaD.mjs} +1 -1
  95. package/node/esm/{DU-md5cmoqIFoIRF.mjs → QvMgUimFvzdL6-mo.mjs} +2 -2
  96. package/node/esm/{DRFDJvGYzZ2y7MNr.mjs → VINTYbFQolKKX9Cn.mjs} +1 -1
  97. package/node/esm/index.mjs +21 -16
  98. package/node/esm/{DtJRjSTG45Z8JwZ-.mjs → jqWzWUQAPXE6S4pP.mjs} +1 -1
  99. package/node/esm/{D8eFLYgEWXBVLJzP.mjs → p6tOM2g4fibuTbKy.mjs} +1 -1
  100. package/node/esm/{bz-ja27axdBXn18A.mjs → sroYp2c6WrIr_3vO.mjs} +2 -2
  101. package/node/esm/{BRW_h-uc47yzfnF7.mjs → uUNVoKRRBhW28hYx.mjs} +1 -1
  102. package/package.json +4 -4
  103. package/browser/cjs/B-re3P7cjOaJW97v.cjs +0 -6
  104. package/browser/cjs/B4xf1YLqOOQ2BAAw.cjs +0 -6
  105. package/browser/cjs/BQX47jn1fcYJXavn.cjs +0 -6
  106. package/browser/cjs/BZSt5E8X7SYSVhPs.cjs +0 -6
  107. package/browser/cjs/B_RNceQBZ8p6fj3Q.cjs +0 -6
  108. package/browser/cjs/BbwQg7G0IFkXlUYY.cjs +0 -6
  109. package/browser/cjs/BjwfHgXl1fEZAU3g.cjs +0 -60
  110. package/browser/cjs/Bm5UJ5gS-Q06VEPK.cjs +0 -7
  111. package/browser/cjs/C3td5E8SlcrJ5Mv-.cjs +0 -15
  112. package/browser/cjs/CGHOtBonLRy9pyo4.cjs +0 -6
  113. package/browser/cjs/CS2JAHasZYfPuOEI.cjs +0 -6
  114. package/browser/cjs/CSkIIY8fgAYcsfJ0.cjs +0 -6
  115. package/browser/cjs/CTM9G6roqBNmXvvV.cjs +0 -6
  116. package/browser/cjs/Cje8OteEkSLIh4eg.cjs +0 -6
  117. package/browser/cjs/CnRawGcFEjRg8E7W.cjs +0 -6
  118. package/browser/cjs/Cq-KGEktCK47S1ii.cjs +0 -6
  119. package/browser/cjs/CqczY8H5IIx8Ki4Z.cjs +0 -6
  120. package/browser/cjs/DLVyZuPozs2kGRVY.cjs +0 -6
  121. package/browser/cjs/DQtLMWxJks5D1_ut.cjs +0 -6
  122. package/browser/cjs/DSeBxJODV2wiVBFh.cjs +0 -6
  123. package/browser/cjs/DSx2MKFyVvU32PBX.cjs +0 -6
  124. package/browser/cjs/DlgBYRYQwJb2Cmz0.cjs +0 -124
  125. package/browser/cjs/DmMxyZPbvj8EvAvA.cjs +0 -6
  126. package/browser/cjs/DxXvv5mYl4GyI4oU.cjs +0 -13
  127. package/browser/cjs/K35RWj2GxR0lKfCY.cjs +0 -32
  128. package/browser/cjs/L5ui83i8s4hwRnmo.cjs +0 -6
  129. package/browser/cjs/Ntd4n6__drNXyV8Q.cjs +0 -6
  130. package/browser/cjs/OpVs8OmX1WcXQ1RU.cjs +0 -6
  131. package/browser/cjs/WZhB_pgRZi4U_oXo.cjs +0 -6
  132. package/browser/cjs/eL9bgEPz6WhChraJ.cjs +0 -6
  133. package/browser/cjs/nRRE57j_GGf6KVD8.cjs +0 -6
  134. package/browser/cjs/pPmY7gcYQCH96lE4.cjs +0 -6
  135. package/browser/cjs/xjh_alRipVqo8cZy.cjs +0 -1501
  136. package/browser/esm/-vEyF-b1iAJfL3xp.mjs +0 -10
  137. package/browser/esm/9sdhSM-1zkdTJ6pD.mjs +0 -5651
  138. package/browser/esm/B5GEE2P8-Fc2ApiM.mjs +0 -426
  139. package/browser/esm/BMWawWgFuxMRf1cM.mjs +0 -10
  140. package/browser/esm/BRW_h-uc47yzfnF7.mjs +0 -10
  141. package/browser/esm/BhPXhyivX9t4qJ2l.mjs +0 -820
  142. package/browser/esm/Br12zSs0kOLavLkw.mjs +0 -10
  143. package/browser/esm/BsN1Iav913PM0DTb.mjs +0 -21
  144. package/browser/esm/C8aGSiCyYUCLobsp.mjs +0 -10
  145. package/browser/esm/CYI5_V7h9SYP9uuu.mjs +0 -10
  146. package/browser/esm/Cu1bjUPEdAVn7e23.mjs +0 -10
  147. package/browser/esm/CydkHy4FDohjJzxv.mjs +0 -10
  148. package/browser/esm/CzRlLyr7iG0quh7r.mjs +0 -472
  149. package/browser/esm/DStq39R2rKQKUU7b.mjs +0 -24
  150. package/browser/esm/DbT42LuoRjjQ7Rtu.mjs +0 -3974
  151. package/browser/esm/DdU01D1n6S9BZnIr.mjs +0 -10
  152. package/browser/esm/De2OxC60SZUNAEyp.mjs +0 -10
  153. package/browser/esm/DtJRjSTG45Z8JwZ-.mjs +0 -10
  154. package/browser/esm/DwOgeqVyZwdrw1FB.mjs +0 -24004
  155. package/browser/esm/HTu8yzgCTwbf9HU4.mjs +0 -29
  156. package/browser/esm/LpwVK3fzNuCZJlGb.mjs +0 -10
  157. package/browser/esm/PC3F5BEQCLQN_a3x.mjs +0 -10
  158. package/browser/esm/cthDTk2_8Syhe1Uh.mjs +0 -10
  159. package/browser/esm/eYXmF3L6pehVXEBJ.mjs +0 -1575
  160. package/node/esm/225JOcHgUUs1EIBP.mjs +0 -10
  161. package/node/esm/6U_gCZNSSMBtVpQI.mjs +0 -10
  162. package/node/esm/BEWDCb-GzXXALTyM.mjs +0 -10
  163. package/node/esm/CatWZ5LT2Nm4rT4U.mjs +0 -10
  164. package/node/esm/D6NZZinV6uCFvvPK.mjs +0 -80
  165. package/node/esm/P_0pzZ_mRTUIQOo8.mjs +0 -10
  166. package/node/esm/SwZDnMDw8b9gb6VD.mjs +0 -10
  167. package/node/esm/_N05nCCXsyDthwPS.mjs +0 -10
@@ -1,1575 +0,0 @@
1
- /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.9
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
- let c = class {
8
- constructor(e) {
9
- this._worker = null, this._nextId = 1, this._pendingRequests = /* @__PURE__ */ new Map(), this._workerFactory = e;
10
- }
11
- start() {
12
- if (typeof Worker > "u") throw new Error("Web Workers are not supported in this environment.");
13
- return this._worker || (this._worker = this._workerFactory(), this._worker.onmessage = (e) => {
14
- const { id: n, result: t, error: r } = e.data, o = this._pendingRequests.get(n);
15
- if (o) if (this._pendingRequests.delete(n), r) {
16
- const i = new Error(r.message);
17
- i.stack = r.stack, r.cause && (i.cause = r.cause), o.reject(i);
18
- } else o.resolve(t);
19
- }, this._worker.onerror = (e) => {
20
- console.error("Worker error:", e), this._pendingRequests.forEach((n) => {
21
- n.reject(new Error(`Worker failed: ${e.message}`));
22
- }), this._pendingRequests.clear(), this._worker = null;
23
- }), Promise.resolve();
24
- }
25
- execute(e) {
26
- if (!this._worker) throw new Error("Worker is not initialized. Call start() first.");
27
- const n = this._nextId++;
28
- return new Promise((t, r) => {
29
- this._pendingRequests.set(n, { resolve: t, reject: r }), this._worker.postMessage({ id: n, params: e });
30
- });
31
- }
32
- terminate() {
33
- this._worker && (this._worker.terminate(), this._worker = null);
34
- }
35
- };
36
- class u {
37
- constructor(n) {
38
- this._onExecute = n;
39
- }
40
- execute(n) {
41
- return this._onExecute(n);
42
- }
43
- start() {
44
- return Promise.resolve();
45
- }
46
- terminate() {
47
- }
48
- }
49
- const s = `/**
50
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.4.9
51
- *
52
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
53
- * License: The license can be found at https://www.sheetxl.com/license.
54
- */
55
- const W = { Number: "n", String: "s", Boolean: "b", Error: "e", Null: "z" };
56
- var Re, ae, d;
57
- (ae = Re || (Re = {})).Orientation = { Column: "column", Row: "row" }, ae.Orientations = { ...ae.Orientation, Both: "both" }, ae.Direction = { Up: "up", Down: "down", Left: "left", Right: "right" }, ((e) => {
58
- 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!" };
59
- class t extends Error {
60
- constructor(c, m, fe, B) {
61
- super(fe, B), this._label = m, this._code = c, this.details = B;
62
- }
63
- static {
64
- this.code = e.Code.Unknown;
65
- }
66
- get isFormulaError() {
67
- return !0;
68
- }
69
- getLabel() {
70
- return this._label;
71
- }
72
- getCode() {
73
- return this._code;
74
- }
75
- equals(c) {
76
- return !!c && (this._code === c._code || this._code === c.code);
77
- }
78
- get [Symbol.toStringTag]() {
79
- return "[FormulaError]";
80
- }
81
- toString() {
82
- return this.message || this._label;
83
- }
84
- }
85
- e.Known = t;
86
- class r extends t {
87
- constructor(c, m) {
88
- super(e.Code.Parse, e.Label.Parse, c, m);
89
- }
90
- static {
91
- this.code = e.Code.Parse;
92
- }
93
- getDetails() {
94
- const c = this.details;
95
- return { line: c?.line ?? 1, column: c?.column ?? 1, offset: c?.offset ?? 0, length: c?.length ?? 0 };
96
- }
97
- }
98
- e.Parse = r;
99
- class n extends t {
100
- constructor(c, m) {
101
- super(e.Code.Null, e.Label.Null, c, m);
102
- }
103
- static {
104
- this.code = e.Code.Null;
105
- }
106
- }
107
- e.Null = n;
108
- class o extends t {
109
- constructor(c, m) {
110
- super(e.Code.Div0, e.Label.Div0, c, m);
111
- }
112
- static {
113
- this.code = e.Code.Div0;
114
- }
115
- }
116
- e.Div0 = o;
117
- class i extends t {
118
- constructor(c, m) {
119
- super(e.Code.Value, e.Label.Value, c, m);
120
- }
121
- static {
122
- this.code = e.Code.Value;
123
- }
124
- }
125
- e.Value = i;
126
- class a extends t {
127
- constructor(c, m) {
128
- super(e.Code.Ref, e.Label.Ref, c, m);
129
- }
130
- static {
131
- this.code = e.Code.Ref;
132
- }
133
- }
134
- e.Ref = a;
135
- class l extends t {
136
- constructor(c, m) {
137
- super(e.Code.Name, e.Label.Name, c, m);
138
- }
139
- static {
140
- this.code = e.Code.Name;
141
- }
142
- }
143
- e.Name = l;
144
- class u extends t {
145
- constructor(c, m) {
146
- super(e.Code.Num, e.Label.Num, c, m);
147
- }
148
- static {
149
- this.code = e.Code.Num;
150
- }
151
- }
152
- e.Num = u;
153
- class f extends t {
154
- constructor(c, m) {
155
- super(e.Code.NA, e.Label.NA, c, m);
156
- }
157
- static {
158
- this.code = e.Code.NA;
159
- }
160
- }
161
- e.NA = f;
162
- class h extends t {
163
- constructor(c, m) {
164
- super(e.Code.GettingData, e.Label.GettingData, c, m);
165
- }
166
- static {
167
- this.code = e.Code.GettingData;
168
- }
169
- }
170
- e.GettingData = h;
171
- class g extends t {
172
- constructor(c, m) {
173
- super(e.Code.Spill, e.Label.Spill, c, m);
174
- }
175
- static {
176
- this.code = e.Code.Spill;
177
- }
178
- }
179
- e.Spill = g;
180
- class p extends t {
181
- constructor(c, m) {
182
- super(e.Code.Connect, e.Label.Connect, c, m);
183
- }
184
- static {
185
- this.code = e.Code.Connect;
186
- }
187
- }
188
- e.Connect = p;
189
- class y extends t {
190
- constructor(c, m) {
191
- super(e.Code.Blocked, e.Label.Blocked, c, m);
192
- }
193
- static {
194
- this.code = e.Code.Blocked;
195
- }
196
- }
197
- e.Blocked = y;
198
- class T extends t {
199
- constructor(c, m) {
200
- super(e.Code.Unknown, e.Label.Unknown, c, m);
201
- }
202
- static {
203
- this.code = e.Code.Unknown;
204
- }
205
- }
206
- e.Unknown = T;
207
- class A extends t {
208
- constructor(c, m) {
209
- super(e.Code.Field, e.Label.Field, c, m);
210
- }
211
- static {
212
- this.code = e.Code.Field;
213
- }
214
- }
215
- e.Field = A;
216
- class D extends t {
217
- constructor(c, m) {
218
- super(e.Code.Calc, e.Label.Calc, c, m);
219
- }
220
- static {
221
- this.code = e.Code.Calc;
222
- }
223
- }
224
- e.Calc = D;
225
- class U extends t {
226
- constructor(c, m) {
227
- super(e.Code.Busy, e.Label.Busy, c, m);
228
- }
229
- static {
230
- this.code = e.Code.Busy;
231
- }
232
- }
233
- e.Busy = U;
234
- class I extends t {
235
- constructor(c, m) {
236
- super(e.Code.Python, e.Label.Python, c, m);
237
- }
238
- static {
239
- this.code = e.Code.Python;
240
- }
241
- }
242
- e.Python = I;
243
- class J extends t {
244
- constructor(c, m) {
245
- super(e.Code.Timeout, e.Label.Timeout, c, m);
246
- }
247
- static {
248
- this.code = e.Code.Timeout;
249
- }
250
- }
251
- e.Timeout = J;
252
- })(d || (d = {}));
253
- const _ = {};
254
- _[d.Code.Parse] = d.Parse, _[d.Code.Null] = d.Null, _[d.Code.Div0] = d.Div0, _[d.Code.Value] = d.Value, _[d.Code.Ref] = d.Ref, _[d.Code.Name] = d.Name, _[d.Code.Num] = d.Num, _[d.Code.NA] = d.NA, _[d.Code.GettingData] = d.GettingData, _[d.Code.Spill] = d.Spill, _[d.Code.Connect] = d.Connect, _[d.Code.Blocked] = d.Blocked, _[d.Code.Unknown] = d.Unknown, _[d.Code.Field] = d.Field, _[d.Code.Calc] = d.Calc, _[d.Code.Busy] = d.Busy, _[d.Code.Python] = d.Python, _[d.Code.Timeout] = d.Timeout;
255
- const et = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Map(), ke = Object.keys(_);
256
- for (let e = 0; e < ke.length; e++) {
257
- const t = ke[e], r = _[t];
258
- tt.set(d.Label[t], r), rt.set(d.Code[t], r);
259
- const n = new r();
260
- et.set(n.getLabel(), n), Te.set(n.getCode(), n);
261
- }
262
- const Et = Te.get(d.Code.Unknown);
263
- var v;
264
- (v = d || (d = {})).BuiltIn = { Parse: new v.Parse(), Null: new v.Null(), Div0: new v.Div0(), Value: new v.Value(), Ref: new v.Ref(), Name: new v.Name(), Num: new v.Num(), NA: new v.NA(), GettingData: new v.GettingData(), Spill: new v.Spill(), Connect: new v.Connect(), Blocked: new v.Blocked(), Unknown: new v.Unknown(), Field: new v.Field(), Calc: new v.Calc(), Busy: new v.Busy(), Python: new v.Python(), Timeout: new v.Timeout() }, v.getBuiltInByLabel = (e) => et.get(e), v.newTypedError = (e, t, r) => {
265
- let n;
266
- return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);
267
- }, v.getBuiltInById = (e) => Te.get(e) || Et;
268
- /**
269
- * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.4.9
270
- *
271
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
272
- * License: The license can be found at https://www.sheetxl.com/license.
273
- */
274
- const S = { html: "text/html", plain: "text/plain", png: "image/png" }, St = Object.freeze({ left: 0, top: 0 }), xt = Object.freeze({ left: 0, top: 0, bottom: 0, right: 0 }), Ct = Object.freeze({ x: 0, y: 0, width: 0, height: 0 });
275
- Object.freeze(Object.defineProperty({ __proto__: null, EmptyBounds: Ct, EmptyRect: xt, EmptyTopLeft: St }, Symbol.toStringTag, { value: "Module" }));
276
- const j = { Column: "column", Row: "row" }, vt = Object.freeze({ colIndex: 0, rowIndex: 0 }), Tt = Object.freeze({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }), nt = (e, t) => e.colStart === t.colStart ? e.rowStart - t.rowStart : e.colStart - t.colStart, ot = (e, t) => e.rowStart === t.rowStart ? e.colStart - t.colStart : e.rowStart - t.rowStart, _t = (e, t) => e.rowEnd === t.rowEnd ? t.colEnd - e.colEnd : t.rowEnd - e.rowEnd, Ot = (e, t) => e.colEnd === t.colEnd ? t.rowEnd - e.rowEnd : t.colEnd - e.colEnd, Le = (e, t) => e.colIndex === t.colIndex ? e.rowIndex - t.rowIndex : e.colIndex - t.colIndex, Ae = (e, t) => e.rowIndex === t.rowIndex ? e.colIndex - t.colIndex : e.rowIndex - t.rowIndex, it = (e = j.Row, t = !1) => t ? e !== j.Column ? _t : Ot : e !== j.Column ? ot : nt, Me = (e, t) => e === t || !(!e || !t) && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex, Se = (e, t) => e === t || !(!e || !t) && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd && e.colStart === t.colStart && e.colEnd === t.colEnd, xe = (e, t) => !(!e || !t) && !(e.colStart > t.colEnd || t.colStart > e.colEnd) && !(e.rowStart > t.rowEnd || t.rowStart > e.rowEnd), je = (e, t) => {
277
- if (e === t) return !0;
278
- if (!e || !t || e.length !== t.length) return !1;
279
- for (let r = 0; r < e.length; r++) if (!Se(e[r], t[r])) return !1;
280
- return !0;
281
- }, he = (e, t, r) => {
282
- if (!e && !t) return null;
283
- if (!e) return r ? t : { ...t };
284
- if (!t) return r ? e : { ...e };
285
- const n = Math.min(e.colStart, t.colStart), o = Math.min(e.rowStart, t.rowStart), i = Math.max(e.colEnd, t.colEnd), a = Math.max(e.rowEnd, t.rowEnd);
286
- let l = r;
287
- return l ? (l.colStart = n, l.rowStart = o, l.colEnd = i, l.rowEnd = a) : l = { colStart: n, rowStart: o, colEnd: i, rowEnd: a }, l;
288
- }, Pe = (e, t) => {
289
- if (!t || t.length === 0) return e;
290
- const r = { ...e };
291
- for (let n = 0; n < t.length; n++) {
292
- const o = t[n];
293
- xe(r, o) && (r.rowStart = Math.min(r.rowStart, o.rowStart), r.colStart = Math.min(r.colStart, o.colStart), r.rowEnd = Math.max(r.rowEnd, o.rowEnd), r.colEnd = Math.max(r.colEnd, o.colEnd));
294
- }
295
- return r;
296
- }, It = [null, null], Nt = (e, t, r) => {
297
- if (e[0].value === e[1].value) return t;
298
- };
299
- function Fe(e, t = 2, r, n = j.Row, o) {
300
- let i = [...e];
301
- if (t <= 0 || e.length <= 1) return i;
302
- let a = n === j.Column, l = 0, u = !1;
303
- do {
304
- const f = i.sort(it(a ? j.Row : j.Column));
305
- i = [], i.push(f[0]);
306
- const h = f.length;
307
- let g = 0, p = f[0], y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;
308
- for (let U = 1; U < h; U++) {
309
- const I = f[U];
310
- let J = !1;
311
- if (J = a ? p && T === I.rowStart && D === I.rowEnd && A + 1 === I.colStart : p && y === I.colStart && A === I.colEnd && D + 1 === I.rowStart, J) {
312
- let E = { colStart: y, rowStart: T, colEnd: a ? I.colEnd : A, rowEnd: a ? D : I.rowEnd };
313
- if (p.value !== void 0 && (E.value = p.value), r) {
314
- const c = o ?? [null, null];
315
- c[0] = p, c[1] = I, E = r(c, E, n);
316
- }
317
- if (E) {
318
- i[g] = E, u = !0, p = E, y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;
319
- continue;
320
- }
321
- }
322
- i[++g] = I, p = I, y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;
323
- }
324
- l++, a = !a, l === 1 && (u = !0);
325
- } while (l < t && u && i.length > 1);
326
- return i;
327
- }
328
- Object.freeze(Object.defineProperty({ __proto__: null, EmptyCell: vt, EmptyRange: Tt, cellToRange: (e, t) => {
329
- if (!e) return null;
330
- let r = t;
331
- return r || (r = { ...e }, delete r.colIndex, delete r.rowIndex), r.colStart = e.colIndex ?? 0, r.rowStart = e.rowIndex ?? 0, r.colEnd = e.colIndex ?? 0, r.rowEnd = e.rowIndex ?? 0, r;
332
- }, columnFirstCellComparator: Le, columnFirstRangeComparator: nt, createCellComparator: (e = j.Row, t = !1) => t ? e !== j.Column ? (r, n) => r.rowIndex === n.rowIndex ? n.colIndex - r.colIndex : n.rowIndex - r.rowIndex : (r, n) => r.colIndex === n.colIndex ? n.rowIndex - r.rowIndex : n.colIndex - r.colIndex : e !== j.Column ? Ae : Le, createConflatingRanges: (e, t = !1) => {
333
- const r = [];
334
- let n, o, i = Number.MIN_SAFE_INTEGER, a = Number.MIN_SAFE_INTEGER;
335
- return { append: (l, u, f) => {
336
- let h = !0;
337
- const g = f !== void 0;
338
- if (g) {
339
- const T = e ? e(o, f, t) : o === f ? f : void 0;
340
- T === void 0 ? h = !1 : f = T;
341
- }
342
- if (h && u === a + 1 && l === i) return t ? n.rowEnd = u : n.colEnd = u, a = u, void (o = f);
343
- n && r.push(n);
344
- const p = t ? l : u, y = t ? u : l;
345
- n = { colStart: p, rowStart: y, colEnd: p, rowEnd: y }, g && (n.value = f), i = l, a = u, o = f;
346
- }, done: (l) => (n && (r.push(n), n = null), l ? Fe(r, 3, l === !0 ? Nt : l, t ? j.Column : j.Row, It) : r) };
347
- }, createRangeComparator: it, defaultRange: (e, t, r) => e ? r ? (r.colStart = e.colStart ?? t.colStart, r.rowStart = e.rowStart ?? t.rowStart, r.colEnd = e.colEnd ?? t.colEnd, r.rowEnd = e.rowEnd ?? t.rowEnd, r) : { colStart: e.colStart ?? t.colStart, rowStart: e.rowStart ?? t.rowStart, colEnd: e.colEnd ?? t.colEnd, rowEnd: e.rowEnd ?? t.rowEnd } : t, extendRangeToIntersectingRanges: Pe, extendRangeToUnionRanges: (e, t) => {
348
- if (!t || t.length === 0) return e;
349
- let r = e, n = null;
350
- for (; !Se(r, n); ) n = r, r = Pe(n, t);
351
- return r;
352
- }, indexOfCoords: (e, t) => {
353
- const r = { colStart: e.colIndex, rowStart: e.rowIndex, colEnd: e.colIndex, rowEnd: e.rowIndex };
354
- for (let n = t.length - 1; n >= 0; n--) if (xe(r, t[n])) return n;
355
- return -1;
356
- }, intersectRanges: (e, t, r) => {
357
- if (!e) return r ? t : { ...t };
358
- if (!t) return r ? e : { ...e };
359
- if (!e && !t || e.rowStart > t.rowEnd || e.rowEnd < t.rowStart || e.colStart > t.colEnd || e.colEnd < t.colStart) return null;
360
- const n = Math.max(e.colStart, t.colStart), o = Math.max(e.rowStart, t.rowStart), i = Math.min(e.colEnd, t.colEnd), a = Math.min(e.rowEnd, t.rowEnd);
361
- let l = r;
362
- return l ? (l.colStart = n, l.rowStart = o, l.colEnd = i, l.rowEnd = a) : l = { colStart: n, rowStart: o, colEnd: i, rowEnd: a }, l;
363
- }, isCellWithinRange: (e, t) => !(!e || !t) && !(e.rowIndex < t.rowStart || e.rowIndex > t.rowEnd) && !(e.colIndex < t.colStart || e.colIndex > t.colEnd), isEqualCells: Me, isEqualRanges: Se, isEqualRangesArrays: je, isEqualSelectionCoords: (e, t) => e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!Me(e.cell, t.cell) && je(e.ranges, t.ranges), isRangeWithinRange: (e, t) => !(e.rowStart < t.rowStart || e.rowEnd > t.rowEnd) && !(e.colStart < t.colStart || e.colEnd > t.colEnd), isRangesIntersect: xe, isSingleCell: (e) => !!e && e.rowEnd === e.rowStart && e.colStart === e.colEnd, isValidRange: (e) => !!e && !(typeof e.colStart != "number" || e.colStart < 0) && !(typeof e.colEnd != "number" || e.colEnd < e.colStart) && !(typeof e.rowStart != "number" || e.rowStart < 0) && !(typeof e.rowEnd != "number" || e.rowEnd < e.rowStart), mergeRangedValues: Fe, rowFirstCellComparator: Ae, rowFirstRangeComparator: ot, sanitizeRange: (e) => e ? { colStart: e.colIndex ?? e.colStart ?? 0, rowStart: e.rowIndex ?? e.rowStart ?? 0, colEnd: e.colIndex ?? e.colEnd ?? 0, rowEnd: e.rowIndex ?? e.rowEnd ?? 0 } : null, translateRange: (e, t = -e.rowStart, r = -e.colStart, n) => n ? (n.colStart = e.colStart + r, n.rowStart = e.rowStart + t, n.colEnd = e.colEnd + r, n.rowEnd = e.rowEnd + t, n) : { colStart: e.colStart + r, rowStart: e.rowStart + t, colEnd: e.colEnd + r, rowEnd: e.rowEnd + t }, unionRanges: he, unionRangesArrays: (e, t, r) => {
364
- if (!e || e.length === 0) return null;
365
- if (e.length === 1 && !t) return e[0];
366
- let n = e[0];
367
- for (let o = 1; o < e.length; o++) n = he(n, e[o], r);
368
- return t && (n = he(n, t, r)), n;
369
- } }, Symbol.toStringTag, { value: "Module" }));
370
- function Rt(e) {
371
- const t = Object.prototype.toString.call(e);
372
- return t === "[object RegExp]" || t === "[object Date]" || function(r) {
373
- return r.$$typeof === kt;
374
- }(e);
375
- }
376
- const kt = typeof Symbol == "function" && Symbol.for ? Symbol.for("react.element") : 60103;
377
- function Lt(e) {
378
- return /* @__PURE__ */ function(t) {
379
- return !!t && typeof t == "object";
380
- }(e) && !Rt(e);
381
- }
382
- function ne(e, t) {
383
- return t.clone !== !1 && t.isMergeableObject(e) ? Y((r = e, Array.isArray(r) ? [] : {}), e, t) : e;
384
- var r;
385
- }
386
- function At(e, t, r) {
387
- return e.concat(t).map(function(n) {
388
- return ne(n, r);
389
- });
390
- }
391
- function De(e) {
392
- return Object.keys(e).concat(function(t) {
393
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
394
- return Object.propertyIsEnumerable.call(t, r);
395
- }) : [];
396
- }(e));
397
- }
398
- function Ue(e, t) {
399
- try {
400
- return t in e;
401
- } catch {
402
- return !1;
403
- }
404
- }
405
- function Mt(e, t, r) {
406
- const n = {};
407
- return r.isMergeableObject(e) && De(e).forEach(function(o) {
408
- n[o] = ne(e[o], r);
409
- }), De(t).forEach(function(o) {
410
- (function(i, a) {
411
- return Ue(i, a) && !(Object.hasOwnProperty.call(i, a) && Object.propertyIsEnumerable.call(i, a));
412
- })(e, o) || (Ue(e, o) && r.isMergeableObject(t[o]) ? n[o] = function(i, a) {
413
- if (!a.customMerge) return Y;
414
- const l = a.customMerge(i);
415
- return typeof l == "function" ? l : Y;
416
- }(o, r)(e[o], t[o], r) : n[o] = ne(t[o], r));
417
- }), n;
418
- }
419
- function Y(e, t, r) {
420
- (r = r || {}).arrayMerge = r.arrayMerge || At, r.isMergeableObject = r.isMergeableObject || Lt, r.cloneUnlessOtherwiseSpecified = ne;
421
- const n = Array.isArray(t);
422
- return n === Array.isArray(e) ? n ? r.arrayMerge(e, t, r) : Mt(e, t, r) : ne(t, r);
423
- }
424
- Y.all = function(e, t) {
425
- if (!Array.isArray(e)) throw new Error("first argument should be an array");
426
- return e.reduce(function(r, n) {
427
- return Y(r, n, t);
428
- }, {});
429
- };
430
- const jt = Object.freeze([]), Pt = Object.freeze({}), Be = (e) => e, de = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
431
- let t = 16 * Math.random() | 0;
432
- return (e === "x" ? t : 3 & t | 8).toString(16);
433
- }), Ft = (e) => 1 * e, at = (e, t) => e === t || !(!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length) && e.every((r, n) => r === t[n]), re = (e) => typeof e == "object" && !Array.isArray(e) && e !== null, lt = (e) => typeof e != "object" || Array.isArray(e) || e === null ? e : (Object.keys(e).forEach(function(t) {
434
- e[t] && typeof e[t] == "object" ? lt(e[t]) : e[t] !== null && e[t] !== void 0 || delete e[t], typeof e[t] == "object" && Object.keys(e[t]).length === 0 && delete e[t];
435
- }), Object.keys(e).length === 0 ? null : e), Dt = (e, t) => !(e !== t && !at(e, t)) || !!e.isEqual?.(t), st = (e, t, r = Dt) => {
436
- if (e == null || e === t) return null;
437
- if (!e || typeof e != "object" || Array.isArray(e) || e.isImmutable?.()) return r(e, t) ? null : e;
438
- const n = Object.keys(e);
439
- if (n.length === 0) return null;
440
- let o = !1;
441
- for (let i = 0; i < n.length; i++) {
442
- const a = n[i];
443
- st(e[a], t?.[a], r) === null && (o = !0, delete e[a]);
444
- }
445
- return o && Object.keys(e).length === 0 ? null : void 0;
446
- }, $e = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now(), ze = (e) => e == null, Ke = (e, t) => !(t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top), Ve = !(typeof window > "u" || !window.document || !window.document.createElement), k = { Windows: "windows", MacOS: "macos", IOS: "ios", Linux: "linux", Android: "android", Safari: "safari", Firefox: "firefox", Node: "node", Unknown: "unknown" }, oe = () => {
447
- if (ct()) return k.Node;
448
- const e = globalThis.navigator !== void 0 && globalThis.navigator.userAgent ? globalThis.navigator.userAgent.toLowerCase() : "";
449
- return e ? /(win32|win64|windows|wince)/i.test(e) ? k.Windows : /(macintosh|macintel|macppc|mac68k|macos)/i.test(e) ? k.MacOS : /(iphone|ipad|ipod)/i.test(e) ? k.IOS : /android/.test(e) ? k.Android : /linux/.test(e) ? k.Linux : /^((?!chrome|android|).)*safari/i.test(e) ? k.Safari : /^((?!chrome|android|Seamonkey).)*firefox/i.test(e) ? k.Firefox : k.Unknown : k.Unknown;
450
- };
451
- function ct() {
452
- return typeof process < "u" && process.release?.name === "node" || (typeof process < "u" && process.browser, !1);
453
- }
454
- const qe = (e, t = !1) => (document.hasFocus() || t) && (e === document.activeElement || e?.contains(document.activeElement)), Ut = Object.freeze(Object.defineProperty({ __proto__: null, EmptyArray: jt, EmptyObject: Pt, OSType: k, arrayMove: function(e, t, r) {
455
- const n = e.slice();
456
- return n.splice(r < 0 ? n.length + r : r, 0, n.splice(t, 1)[0]), n;
457
- }, asNumber: (e) => {
458
- const t = Ft(e);
459
- return Number.isFinite(t) ? t : 0;
460
- }, camelToPrettyCase: (e) => e.length === 1 ? e.toUpperCase() : e.replace(/([A-Z])/g, " $1").replace(/^./, function(t) {
461
- return t.toUpperCase();
462
- }).trim(), canUseDOM: Ve, cancelTimeout: (e) => {
463
- cancelAnimationFrame(e.id);
464
- }, castToString: (e) => e == null || e === void 0 ? "" : typeof e != "string" ? "" + e : e, cloneObject: (e) => ze(e) ? e : JSON.parse(JSON.stringify(e)), consoleWithNoSource: (...e) => new Promise((t) => {
465
- setTimeout(() => {
466
- Function("console.log.apply(console, arguments)").apply(null, e), t();
467
- });
468
- }), debounce: function(e, t = 300, r = !1) {
469
- let n, o, i, a, l = 0;
470
- function u() {
471
- let h = Date.now() - l;
472
- h < t && h >= 0 ? n = setTimeout(u, t - h) : (n = null, r || (a = e.apply(i, o), i = o = null));
473
- }
474
- t == null && (t = 100);
475
- const f = function() {
476
- i = globalThis, o = arguments, l = Date.now();
477
- var h = r && !n;
478
- return n || (n = setTimeout(u, t)), h && (a = e.apply(i, o), i = o = null), a;
479
- };
480
- return f.clear = function() {
481
- n && (clearTimeout(n), n = null);
482
- }, f.flush = function() {
483
- n && (a = e.apply(i, o), i = o = null, clearTimeout(n), n = null);
484
- }, f;
485
- }, deepEqual: function e(t, r) {
486
- if (t === r) return !0;
487
- if (t && r && typeof t == "object" && typeof r == "object") {
488
- if (t.constructor !== r.constructor) return !1;
489
- let n, o, i;
490
- if (Array.isArray(t)) {
491
- if (n = t.length, n != r.length) return !1;
492
- for (o = n; o-- !== 0; ) if (!e(t[o], r[o])) return !1;
493
- return !0;
494
- }
495
- if (t instanceof Map && r instanceof Map) {
496
- if (t.size !== r.size) return !1;
497
- for (o of t.entries()) if (!r.has(o[0])) return !1;
498
- for (o of t.entries()) if (!e(o[1], r.get(o[0]))) return !1;
499
- return !0;
500
- }
501
- if (t instanceof Set && r instanceof Set) {
502
- if (t.size !== r.size) return !1;
503
- for (o of t.entries()) if (!r.has(o[0])) return !1;
504
- return !0;
505
- }
506
- if (ArrayBuffer.isView(t) && ArrayBuffer.isView(r)) {
507
- if (n = t.length, n != r.length) return !1;
508
- for (o = n; o-- !== 0; ) if (t[o] !== r[o]) return !1;
509
- return !0;
510
- }
511
- if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags;
512
- if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === r.valueOf();
513
- if (t.toString !== Object.prototype.toString) return t.toString() === r.toString();
514
- if (i = Object.keys(t), n = i.length, n !== Object.keys(r).length) return !1;
515
- for (o = n; o-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(r, i[o])) return !1;
516
- for (o = n; o-- !== 0; ) {
517
- let a = i[o];
518
- if ((a !== "_owner" || !t.$$typeof) && !e(t[a], r[a])) return !1;
519
- }
520
- return !0;
521
- }
522
- return t != t && r != r;
523
- }, deepFreeze: function e(t) {
524
- return Object.freeze(t), Object.keys(t).forEach((r) => {
525
- typeof t[r] != "object" || t[r] === null || Object.isFrozen(t[r]) || e(t[r]);
526
- }), t;
527
- }, deepMerge: Y, diffValues: (e, t) => {
528
- const r = {}, n = Object.keys(t), o = n.length;
529
- for (let i = 0; i < o; i++) {
530
- const a = n[i];
531
- e[a] !== t[a] && (e[a] === void 0 ? r[a] = t[a] : r[a] = e[a]);
532
- }
533
- return Object.keys(r).length === 0 ? null : r;
534
- }, findEqualOrGreater: function(e, t, r = Be) {
535
- let n = 0, o = e.length - 1;
536
- for (; n <= o; ) {
537
- let i = Math.floor((n + o) / 2), a = r(e[i]);
538
- if (a === t) return i;
539
- a < t ? n = i + 1 : o = i - 1;
540
- }
541
- return n;
542
- }, findEqualOrLesser: function(e, t, r = Be) {
543
- let n = e.length - 1, o = 0;
544
- for (; n >= o; ) {
545
- let i = Math.floor((n + o) / 2), a = r(e[i]);
546
- if (a === t) return i;
547
- a > t ? n = i - 1 : o = i + 1;
548
- }
549
- return n;
550
- }, findNextStep: (e, t = !0, r = 15, n = 10, o = 400) => {
551
- const i = Math.max(e - n, 0) + (t ? 1 : -1);
552
- return Math.min(o, Math[t ? "ceil" : "floor"](i / r) * r + n);
553
- }, getDPI: () => {
554
- let e = 1;
555
- return typeof window == "object" && (e = window.devicePixelRatio || 1), e;
556
- }, getFromPath: (e, t) => {
557
- const r = t.split(".");
558
- let n = e;
559
- for (let o = 0; o < r.length; o++) {
560
- const i = r[o];
561
- if (!n) return null;
562
- let a = n[i];
563
- if (typeof a == "function" && (a = a.bind(n)()), !a || !re(a)) return a;
564
- n = a;
565
- }
566
- return n ?? null;
567
- }, getOS: oe, hasFocus: qe, isDefined: (e) => e != null, isEmpty: (e) => e == null || e === "", isEqualArrays: at, isEqualBounds: (e, t) => e === t || !(e && !t || t && !e) && e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, isEqualObjectKeys: (e, t) => {
568
- if (e === t) return !0;
569
- if (e && !t || t && !e) return !1;
570
- const r = Object.keys(e);
571
- if (r.length !== Object.keys(t).length) return !1;
572
- for (let n = 0; n < r.length; n++) if (e[r[n]] !== t[r[n]]) return !1;
573
- return !0;
574
- }, isNode: ct, isNullOrUndefined: ze, isNumeric: (e) => {
575
- const t = 1 * e;
576
- return Number.isFinite(t) && typeof t == "number";
577
- }, isObject: re, isPromiseLike: (e) => !!e && typeof e.then == "function", isRectInsideRect: (e, t) => e.top >= t.top && e.bottom <= t.bottom && e.left >= t.left && e.right <= t.right, isRectIntersect: Ke, mergeContentful: (...e) => {
578
- const t = e.length;
579
- if (t > 0 && e[t - 1] !== void 0 && !re(e[t - 1])) return e[t - 1];
580
- let r = e[0] || {};
581
- for (let n = 1; n < t; n++) r = Y(r, e[n] || {}, { arrayMerge: (o, i) => [...i] });
582
- return r;
583
- }, nextTick: (e) => {
584
- typeof window < "u" && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(() => {
585
- e();
586
- }) : (typeof setImmediate == "function" ? setImmediate : setTimeout)(() => {
587
- e();
588
- });
589
- }, openFileDialog: (e = "*.*") => new Promise((t, r) => {
590
- if (!Ve) return void r("Unable to open dialog with no dom.");
591
- const n = document.createElement("input");
592
- n.type = "file", n.accept = e;
593
- let o = null, i = !1;
594
- globalThis.addEventListener?.("focus", () => {
595
- setTimeout(() => {
596
- o || i || (i = !0, t(null));
597
- }, 1e3);
598
- }, { once: !0, passive: !0 }), n.onchange = () => {
599
- if (o = n.files[0], o) {
600
- if (i) return void console.warn("File open detected after faux cancel.", o);
601
- t(o);
602
- }
603
- }, n.autofocus = !0, n.click();
604
- }), rafThrottle: (e) => {
605
- let t, r = !1, n = function() {
606
- r = !1, e(t);
607
- };
608
- return function(o) {
609
- t = o, t && t.persist && t.persist(), r || (r = !0, requestAnimationFrame(n));
610
- };
611
- }, removeEmptyProperties: lt, removeEqualValues: st, removeListenerAll: (e) => {
612
- if (!e) return [];
613
- for (let t = 0; t < e.length; t++) e[t] && e[t]();
614
- return [];
615
- }, requestTimeout: (e, t) => {
616
- const r = $e(), n = { id: requestAnimationFrame(function o() {
617
- $e() - r >= t ? e.call(null) : n.id = requestAnimationFrame(o);
618
- }) };
619
- return n;
620
- }, roundAccurately: (e, t = 0) => {
621
- if (e == null || !isFinite(e)) return null;
622
- const r = 10 ** t;
623
- return Number(Math.round(e * r) / r);
624
- }, setToPath: (e, t, r) => {
625
- const n = t.split(".");
626
- let o = e;
627
- if (!o) throw new Error("Can not set path to a null path.");
628
- for (let i = 0; o && i < n.length - 1; i++) {
629
- const a = n[i];
630
- let l = o[a];
631
- if (l == null && (l = {}, o[a] = l), !re(l)) throw new Error("Can not set path to a non object path.");
632
- o = l;
633
- }
634
- if (typeof r != "number" && typeof r != "boolean" && typeof r != "string" && !re(r)) throw new Error(\`Can not set path to \${r} that is not a a supported primitive.\`);
635
- return o[n[n.length - 1]] = r, e;
636
- }, splitNumber: (e) => {
637
- let t = Math.abs(e);
638
- if (isNaN(t) || !isFinite(e)) return null;
639
- let r = 0 | t, n = t - r, o = 0, i = 0, a = 1;
640
- if (n > 5e-8) for (; i < 8 && Math.abs(o / a - n) > 5e-8; ) i++, a *= 10, o = Math.round(n * a);
641
- return { ip: Math.trunc(e), fp: o, ipLength: Math.ceil(Math.log10(r + 1)), fpLength: i };
642
- }, subtractRect: (e, t, r = !1) => {
643
- if (!t) return [e];
644
- if (!Ke(e, t)) return [];
645
- const n = [];
646
- let o = e;
647
- const i = () => {
648
- t.top > o.top && t.top < o.bottom && (n.push({ ...o, bottom: t.top }), o = { ...o, top: t.top });
649
- }, a = () => {
650
- t.bottom > o.top && t.bottom < o.bottom && (n.push({ ...o, top: t.bottom }), o = { ...o, bottom: t.bottom });
651
- }, l = () => {
652
- t.right > o.left && t.right < o.right && (n.push({ ...o, left: t.right }), o = { ...o, right: t.right });
653
- }, u = () => {
654
- t.left > o.left && t.left < o.right && (n.push({ ...o, right: t.left }), o = { ...o, left: t.left });
655
- };
656
- return r ? (u(), l(), i(), a()) : (i(), a(), l(), u()), n;
657
- }, textToKey: (e) => e.replace(/[^a-zA-Z0-9]/g, "").toLowerCase(), throttle: function(e, t) {
658
- let r = null;
659
- return (...n) => {
660
- const o = Date.now();
661
- (!r || o - r >= t) && (r = o, e(...n));
662
- };
663
- }, toSafeJSON: function e(t) {
664
- if (t === null || typeof t != "object") return t;
665
- if (typeof t.toJSON == "function") return t.toJSON();
666
- if (Array.isArray(t)) return t.map((n) => e(n));
667
- if (typeof t.toString == "function" && t.toString !== Object.prototype.toString) return t.toString();
668
- const r = {};
669
- for (const n in t) t.hasOwnProperty(n) && (r[n] = e(t[n]));
670
- return r;
671
- }, transpose: (e) => {
672
- if (!e) return e;
673
- const t = e.length, r = e[0].length, n = [];
674
- for (let o = 0; o < r; o++) n[o] = Array(t);
675
- for (let o = 0; o < t; o++) for (let i = 0; i < r; i++) n[i][o] = e[o][i];
676
- return n;
677
- }, uuidV4: de, validEnumValue: (e, t) => {
678
- if (!Object.values(e).includes(t)) throw new Error(\`Invalid type: \${t ?? "null"}. Must be one of: \${Object.values(t).join(", ")}.\`);
679
- }, whenFocus: async (e, t = !1) => new Promise((r) => {
680
- qe(e, t) ? r(!0) : e.addEventListener("focusin", () => {
681
- r(!0);
682
- }, { once: !0 }), e.focus();
683
- }) }, Symbol.toStringTag, { value: "Module" }));
684
- Object.freeze(Object.defineProperty({ __proto__: null, MESSAGE_ERROR_INVALID_ARG: (e) => \`Invalid argument: '\${e}'.\` }, Symbol.toStringTag, { value: "Module" }));
685
- const ut = (e) => {
686
- const t = new Uint8Array(e), r = t.byteLength;
687
- let n = "";
688
- for (let o = 0; o < r; o++) n += String.fromCharCode(t[o]);
689
- if (typeof window < "u" && typeof globalThis.btoa == "function") return globalThis.btoa(n);
690
- if (typeof Buffer < "u") return Buffer.from(n, "binary").toString("base64");
691
- throw new Error("Unsupported environment");
692
- }, Ce = (e) => new Promise((t, r) => {
693
- if (e) if (typeof FileReader < "u") {
694
- const n = new FileReader();
695
- n.onload = () => {
696
- t(n.result);
697
- }, n.onerror = () => {
698
- r(n.error);
699
- }, n.readAsText(e);
700
- } else if (typeof Buffer < "u") {
701
- const n = (o) => Buffer.from(o).toString("utf-8");
702
- e.arrayBuffer().then((o) => {
703
- t(n(o));
704
- }).catch((o) => {
705
- r(o);
706
- });
707
- } else r(new Error("Unsupported environment"));
708
- else t("");
709
- });
710
- Object.freeze(Object.defineProperty({ __proto__: null, DEFAULT_MIME_TYPE: "*/*", arrayBufferToBase64: ut, base64ToArrayBuffer: (e) => {
711
- const t = typeof window < "u" && typeof globalThis.atob == "function" ? globalThis.atob(e) : Buffer.from(e, "base64").toString("binary"), r = t.length, n = new Uint8Array(r);
712
- for (let o = 0; o < r; o++) n[o] = t.charCodeAt(o);
713
- return n.buffer;
714
- }, blobToString: Ce }, Symbol.toStringTag, { value: "Module" }));
715
- const dt = "data:image/png;base64,", ft = "Unable to resolve image.", Ge = (e) => new Promise(async (t, r) => {
716
- let n = null;
717
- try {
718
- n = new Image(), n.src = e, n.addEventListener("load", function() {
719
- t({ width: n.naturalWidth, height: n.naturalHeight });
720
- }, { once: !0 }), n.addEventListener("error", function() {
721
- URL.revokeObjectURL(e), r("Invalid Image");
722
- }, { once: !0 }), await n.decode("sync");
723
- } catch {
724
- n?.src && URL.revokeObjectURL(n.src);
725
- }
726
- n || r(ft);
727
- }), we = "image/svg+xml";
728
- Object.freeze(Object.defineProperty({ __proto__: null, DATA_URL_PNG_PREFIX: dt, getImageDataUrl: (e, t = 1) => new Promise(async (r, n) => {
729
- let o = null;
730
- try {
731
- o = new Image(), o.src = e, o.addEventListener("load", function() {
732
- try {
733
- const i = document.createElement("canvas");
734
- i.width = o.naturalWidth, i.height = o.naturalHeight, i.getContext("2d").drawImage(o, 0, 0);
735
- const a = i.toDataURL("image/png", t);
736
- r({ elemImg: o, dataUrl: a });
737
- } catch (i) {
738
- URL.revokeObjectURL(e), n(i);
739
- }
740
- }, { once: !0 }), o.addEventListener("error", function() {
741
- URL.revokeObjectURL(e), n("Invalid Image");
742
- }, { once: !0 }), await o.decode("sync");
743
- } catch {
744
- o?.src && URL.revokeObjectURL(o.src);
745
- }
746
- o || n(ft);
747
- }), loadImageDetails: async (e, t = null) => {
748
- let r = null;
749
- const n = async () => {
750
- try {
751
- const i = t ?? "image/*", a = URL.createObjectURL(new Blob([e], { type: i })), l = await Ge(a);
752
- r = { mimeType: i, naturalDimensions: l, asUrl: a };
753
- } catch {
754
- }
755
- }, o = async () => {
756
- try {
757
- const i = new TextDecoder().decode(e), a = URL.createObjectURL(new Blob([i], { type: we })), l = await Ge(a);
758
- r = { mimeType: t ?? we, naturalDimensions: l, asUrl: a, asSVGText: i };
759
- } catch {
760
- }
761
- };
762
- if (t === we ? await o() : t.startsWith("image/") ? await n() : (await n(), r || await o()), !r) throw new Error("Failed to load image");
763
- return r;
764
- } }, Symbol.toStringTag, { value: "Module" }));
765
- var We, Ye;
766
- (Ye = We || (We = {})).resolveTypedUpdates = (e, t, r, n) => {
767
- if (e === null) return e;
768
- if (e === void 0) return n;
769
- let o = e;
770
- if (t?.shorthand) {
771
- const u = t?.shorthand(e, r);
772
- u !== void 0 && (o = u);
773
- }
774
- if (o !== null && t?.getSubType) {
775
- const u = t.getSubType(o);
776
- u && (t = u);
777
- }
778
- const i = t?.properties, a = t?.arrayType ?? !1;
779
- let l = o;
780
- if (t && t.merge && l && n) l = t.merge(l, n, r);
781
- else if (!a && i) {
782
- const u = Object.keys({ ...o, ...n });
783
- l = null;
784
- for (let f = 0; f < u.length; f++) {
785
- const h = u[f];
786
- let g, p = o[h];
787
- if (p !== void 0) {
788
- const y = i[h];
789
- g = y ? (0, Ye.resolveTypedUpdates)(p, y, r, n?.[h]) : p;
790
- } else g = n?.[h];
791
- g != null && (l = l ?? {}, l[h] = g);
792
- }
793
- }
794
- return l;
795
- };
796
- const Je = \`The Safari browser does not support advanced copy and paste.
797
- Copy and paste will be limited to within the browser tab.
798
-
799
- Please use Chrome or Edge if external copy and paste is required.\`, ye = \`You do not have permissions to access the clipboard.
800
- All copy and paste operations will be limited to the browser tab.\`, pt = { Safari: \`The Safari browser does not support advanced copy and paste.
801
- Copy and paste will be limited to within the browser tab.
802
-
803
- Please use Chrome or Edge if external copy and paste is required.\`, Perms: ye, PermsWrite: oe() === k.Safari ? Je : ye, PermsRead: oe() === k.Safari ? Je : ye }, ge = async () => new Promise((e) => {
804
- document.hasFocus() ? e() : globalThis.addEventListener?.("focus", () => {
805
- e();
806
- }, { once: !0 }), document.activeElement.focus?.();
807
- }), be = async (e, t, r) => {
808
- if (oe() === k.Safari) return await r(new Error(pt.Safari));
809
- try {
810
- const n = async (a) => {
811
- try {
812
- return await a();
813
- } catch (l) {
814
- if (l.message?.includes("Document is not focused")) return !1;
815
- throw l;
816
- }
817
- }, o = await globalThis?.navigator?.permissions?.query({ name: e, allowWithoutGesture: !0, allowWithoutSanitization: !0 });
818
- let i = !1;
819
- if (o.state === "prompt" && (i = await n(t)), i || o.state !== "granted" || (i = await t()), !i) return await r(new Error(o.state));
820
- } catch (n) {
821
- return n.message === "No valid data on clipboard" || n.name === "DataError" ? void 0 : await r(n);
822
- }
823
- }, mt = async (e) => {
824
- try {
825
- return await e.read({ unsanitized: [S.html] });
826
- } catch {
827
- }
828
- return await e.read();
829
- }, Bt = async (e, t) => {
830
- if (!e) return null;
831
- const r = await mt(e);
832
- let n = !1;
833
- for (let o = 0; !n && r && o < r.length; o++) if (n = r[o].types.includes(t), n)
834
- return await r[o].getType(t);
835
- return n ? void 0 : null;
836
- };
837
- if (!globalThis.ClipboardItem) {
838
- const e = (r, n) => new Blob([n], { type: r });
839
- class t {
840
- constructor(n, o) {
841
- this._items = {}, this._types = Object.keys(n);
842
- const i = {}, a = Object.keys(n);
843
- for (let l = 0; l < a.length; l++) {
844
- const u = a[l];
845
- let f = n[u];
846
- i[u] = typeof f == "string" ? e(u, f) : f;
847
- }
848
- this._items = i, this._presentationStyle = o?.presentationStyle ?? "unspecified";
849
- }
850
- get types() {
851
- return this._types;
852
- }
853
- getType(n) {
854
- return Promise.resolve(this._items[n]);
855
- }
856
- supports(n) {
857
- return !0;
858
- }
859
- }
860
- globalThis.ClipboardItem = t;
861
- }
862
- const ve = async (e, t = S.html) => new Promise(async (r, n) => {
863
- try {
864
- const o = await Bt(e, t);
865
- if (o) {
866
- const i = new FileReader();
867
- i.onload = () => {
868
- r(i.result);
869
- }, i.onerror = () => {
870
- r("");
871
- }, i.readAsText(o);
872
- } else r("");
873
- } catch (o) {
874
- n(o);
875
- }
876
- }), He = async (e, t = S.html) => {
877
- const r = await ve(e, t);
878
- if (!r) return null;
879
- let n = null;
880
- try {
881
- n = new DOMParser().parseFromString(r, S.html);
882
- } catch {
883
- console.warn("Can't parse html from clipboard.");
884
- }
885
- return n;
886
- }, $t = async (e) => {
887
- e && await e.writeText("");
888
- }, ie = "clipboard-uuid", Q = "web text/uuid", Xe = (e) => \`<div style="display:none" \${ie}="\${e}"/>\`, zt = (e, t) => {
889
- let r = null;
890
- try {
891
- const n = new DOMParser().parseFromString(t, S.html);
892
- n.body.firstElementChild.setAttribute(ie, e), r = n.getElementsByTagName("body")[0].innerHTML;
893
- } catch (n) {
894
- console.warn("Can't embed uuid.", n);
895
- }
896
- return r;
897
- }, Ze = (e, t) => {
898
- if (!t || !e) return !1;
899
- try {
900
- const r = t.querySelectorAll(\`[\${ie}="\${e}"]\`);
901
- if (r && r.length === 1) return !0;
902
- if (t.querySelector("parsererror")) throw new Error("We are unable to parse node");
903
- return !1;
904
- } catch {
905
- return !1;
906
- }
907
- };
908
- class Qe {
909
- constructor(t) {
910
- if (t?.nativeClipboard === void 0 || t?.nativeClipboard === !0) try {
911
- this._nativeClipboard = globalThis?.navigator.clipboard;
912
- } catch {
913
- t?.nativeClipboard === !0 && console.warn("NativeClipboard option set to true but no native clipboard available.");
914
- }
915
- else this._nativeClipboard = t?.nativeClipboard === !1 ? null : t?.nativeClipboard;
916
- this._disableCheckOnFocus = t?.disableCheckOnFocus ?? !1, this._init();
917
- }
918
- async _checkForChanges() {
919
- this._nativeClipboard && this._state && !this._disableCheckOnFocus && await be("clipboard-read", async () => {
920
- await ge();
921
- const t = await ve(this._nativeClipboard, Q);
922
- if (!this._state || t && t === this._state.uuid) return !0;
923
- const r = await He(this._nativeClipboard, S.html);
924
- return !this._state || (Ze(this._state.uuid, r) || this.clear(), !0);
925
- }, async (t) => {
926
- t?.message === "denied" || t.message?.includes("Document is not focused") || oe() === k.Safari || console.warn("Unable to detect clipboard changes: ", t);
927
- });
928
- }
929
- _init() {
930
- const t = this;
931
- this._listeners = /* @__PURE__ */ new Map(), this._listenersCapture = /* @__PURE__ */ new Map(), this._state = null, this._nativeClipboard && (this._onFocus = () => {
932
- t._checkForChanges();
933
- }, this._onBlur = () => {
934
- globalThis.addEventListener?.("focus", t._onFocus, { once: !0 });
935
- }, globalThis.addEventListener?.("blur", this._onBlur), this._nativeClipboard.addEventListener("clipboardchange", (r) => {
936
- t._checkForChanges();
937
- }));
938
- }
939
- async read() {
940
- if (!this._nativeClipboard) return this._state?.items ?? null;
941
- const t = this;
942
- return await be("clipboard-read", async () => {
943
- if (await ge(), this._state?.uuid) {
944
- const r = await ve(this._nativeClipboard, Q);
945
- if (r && r === t._state.uuid) return !0;
946
- const n = await He(this._nativeClipboard, S.html);
947
- if (Ze(t._state?.uuid, n)) return !0;
948
- }
949
- return t._state = { items: await mt(this._nativeClipboard), uuid: null, ref: null }, this.dispatchEvent(new Event("clipboardread")), !0;
950
- }, async (r) => {
951
- this.dispatchEvent(new Event("clipboarderrorread"));
952
- }), this._state?.items ?? [];
953
- }
954
- async write(t) {
955
- return this._write({ uuid: de(), items: t, ref: null });
956
- }
957
- async _write(t) {
958
- if (!this._nativeClipboard) return this._state = t, this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")), null;
959
- const r = this, n = [], o = t.uuid;
960
- let i = t.items ?? [];
961
- const a = () => {
962
- r._state = { uuid: o, ref: t.ref, items: n }, r.dispatchEvent(new Event("clipboardwrite")), r.dispatchEvent(new Event("clipboardchange"));
963
- };
964
- await be("clipboard-write", async () => {
965
- await ge(), o && i.length === 0 && (i.push(new ClipboardItem({ [Q]: new Blob([o], { type: Q }) })), i.push(new ClipboardItem({ [S.html]: new Blob([Xe(o)], { type: S.html }) })));
966
- for (let l = 0; l < Math.min(1, i.length); l++) {
967
- const u = i[l];
968
- let f = u.types.indexOf(S.html), h = null;
969
- if (f !== -1) {
970
- const y = await u.getType(S.html);
971
- h = await Ce(y), h && (h = zt(o, h));
972
- }
973
- if (!h && u.types.includes(S.plain)) {
974
- const y = await u.getType(S.plain);
975
- if (y) {
976
- let T = null;
977
- typeof y == "string" ? (console.warn("text as string", y), T = y) : T = await Ce(y), T && (h = \`<div \${ie}="\${o}">\${T}</div>\`);
978
- }
979
- }
980
- if (!h && u.types.includes(S.png)) {
981
- const y = await u.getType(S.png), T = ut(await y.arrayBuffer());
982
- h = \`<div \${ie}="\${o}"><img src="\${dt + T}"/></div>\`;
983
- }
984
- !h && o && (h = Xe(o));
985
- const g = new Blob([h ?? ""], { type: S.html }), p = {};
986
- for (let y = 0; y < u.types.length; y++) {
987
- const T = u.types[y];
988
- p[T] = y === f ? g : u.getType(T);
989
- }
990
- h && f === -1 && (p[S.html] = g), o && (p[Q] = new Blob([o], { type: Q })), n.push(new ClipboardItem(p));
991
- }
992
- try {
993
- n && n.length !== 0 ? await this._nativeClipboard.write(n) : await $t(this._nativeClipboard);
994
- } catch (l) {
995
- l.message?.includes("Document is not focused") || console.warn("Unable to write to native clipboard: ", l);
996
- }
997
- return a(), !0;
998
- }, async (l) => {
999
- this.dispatchEvent(new Event("clipboarderrorwrite")), a();
1000
- });
1001
- }
1002
- async writeReference(t) {
1003
- if (!t) return void this.clear();
1004
- let r = null;
1005
- const n = {};
1006
- try {
1007
- const i = await t.toText?.() ?? null;
1008
- i && (n[S.plain] = new Blob([i ?? ""], { type: S.plain }));
1009
- } catch (i) {
1010
- r = i;
1011
- }
1012
- try {
1013
- const i = await t.toHtml?.() ?? null;
1014
- i && (n[S.html] = new Blob([i], { type: S.html }));
1015
- } catch (i) {
1016
- r = i, console.warn("export to html", i);
1017
- }
1018
- try {
1019
- const i = await t.toImage?.() ?? null;
1020
- i && (n[S.png] = i);
1021
- } catch (i) {
1022
- r = i, console.warn("export to png", i);
1023
- }
1024
- const o = this._write({ uuid: de(), ref: t, items: Object.keys(n).length > 0 ? [new ClipboardItem(n)] : null });
1025
- if (r) throw r;
1026
- return o;
1027
- }
1028
- clear(t = !1) {
1029
- this._state && (this._state = null, t && this._write({ uuid: null, ref: null, items: null }), this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")));
1030
- }
1031
- async readReference() {
1032
- return await this.read(), this._state?.ref ?? null;
1033
- }
1034
- readText() {
1035
- return new Promise(async (t, r) => {
1036
- const n = await this.read();
1037
- let o = null;
1038
- for (let a = 0; !o && n && a < n.length; a++) n[a].types.includes(S.plain) && (o = await n[a].getType(S.plain));
1039
- if (!o) return void t("");
1040
- const i = new FileReader();
1041
- i.onload = () => {
1042
- t(i.result);
1043
- }, i.readAsText(o), i.onerror = (a) => {
1044
- r(a);
1045
- };
1046
- });
1047
- }
1048
- async writeText(t) {
1049
- const r = [new ClipboardItem({ [S.plain]: new Blob([t], { type: S.plain }) })];
1050
- return this._write({ uuid: de(), items: r, ref: null });
1051
- }
1052
- addEventListener(t, r, n = {}) {
1053
- const o = n?.capture ? this._listenersCapture : this._listeners;
1054
- let i = o.get(t);
1055
- i || (i = /* @__PURE__ */ new Map(), o.set(t, i)), i.set(r, typeof n == "boolean" ? {} : n);
1056
- }
1057
- dispatchEvent(t) {
1058
- if (!t) return;
1059
- const r = (n) => {
1060
- const o = n.get(t.type);
1061
- o && o.forEach((i, a) => {
1062
- try {
1063
- typeof a == "function" ? a(t) : a.handleEvent && a.handleEvent(t), i.once && o.delete(a);
1064
- } catch (l) {
1065
- console.warn(l);
1066
- }
1067
- });
1068
- };
1069
- return r(this._listenersCapture), r(this._listeners), !0;
1070
- }
1071
- removeEventListener(t, r, n) {
1072
- const o = n?.capture ? this._listenersCapture : this._listeners, i = o.get(t);
1073
- i && (i.delete(r), i.size === 0 && o.delete(t));
1074
- }
1075
- close() {
1076
- globalThis.removeEventListener?.("focus", this._onFocus), globalThis.removeEventListener?.("blur", this._onBlur);
1077
- }
1078
- }
1079
- var Ee;
1080
- (Ee = Qe || (Qe = {})).ErrorMessages = pt, Ee.Global = new Ee();
1081
- const Kt = "__SHEETXL";
1082
- let ee = null, le = null;
1083
- async function Vt() {
1084
- if (ee)
1085
- return ee;
1086
- if (le) {
1087
- if (await le, !ee)
1088
- throw new Error("ESBuild initialization promise resolved, but instance is not available.");
1089
- return ee;
1090
- }
1091
- let e, t;
1092
- le = new Promise((r, n) => {
1093
- e = r, t = n;
1094
- });
1095
- try {
1096
- const { initialize: r } = await Promise.resolve().then(function() {
1097
- return rr;
1098
- });
1099
- return ee = await r(), e(), ee;
1100
- } catch (r) {
1101
- throw console.error("Failed to import or initialize esbuild:", r), le = null, t(r), r;
1102
- }
1103
- }
1104
- const qt = {
1105
- // ESBuild.TsconfigRaw =
1106
- compilerOptions: {
1107
- target: "esnext"
1108
- }
1109
- };
1110
- async function Gt(e, t, r = "/script.js", n = Kt) {
1111
- try {
1112
- const o = await Vt(), i = "@sheetxl/primitives", a = \`
1113
- export const FormulaContext = globalThis.\${n}?.FormulaContext;
1114
- export const ScalarType = globalThis.\${n}?.ScalarType;
1115
- export const Observable = globalThis.\${n}?.Observable;
1116
- export const IRange = globalThis.\${n}?.IRange;
1117
- export const FormulaError = globalThis.\${n}?.FormulaError;
1118
- // Add more exports as needed
1119
- \`, l = {
1120
- // ESBuild.Plugin = {
1121
- name: "sheetxl-esbuild-in-memory",
1122
- setup(f) {
1123
- const h = "sheetxl-" + (/* @__PURE__ */ new Date()).getTime();
1124
- f.onResolve({ filter: new RegExp(\`^(\${r.replace("/", "\\\\/")}|\${i})$\`) }, (g) => ({
1125
- path: g.path,
1126
- namespace: h
1127
- })), f.onResolve({ filter: /.*/ }, (g) => {
1128
- if (g.namespace !== h)
1129
- return console.warn(\`esbuild: Treating import "\${g.path}" as external.\`), { path: g.path, external: !0 };
1130
- }), f.onLoad({ filter: /.*/, namespace: h }, (g) => {
1131
- let p;
1132
- if (g.path === r)
1133
- p = t;
1134
- else if (g.path === i)
1135
- p = a;
1136
- else
1137
- return {
1138
- errors: [{ text: \`Cannot load unknown path in \${h}: \${g.path}\` }]
1139
- };
1140
- return {
1141
- contents: p,
1142
- loader: "ts"
1143
- // leave this as 'ts' so esbuild generates proper sourcemaps
1144
- };
1145
- });
1146
- }
1147
- }, u = await o.build({
1148
- entryPoints: [r],
1149
- // Use the virtual entry point
1150
- bundle: !0,
1151
- // IMPORTANT: Enable bundling
1152
- write: !1,
1153
- // IMPORTANT: Return result in memory
1154
- format: "esm",
1155
- // Output format
1156
- plugins: [l],
1157
- // TODO - later change to external and prepend when executing from ui
1158
- sourcemap: "inline",
1159
- // Generate separate source map string
1160
- tsconfigRaw: qt,
1161
- // Pass the mapped options
1162
- minify: !0,
1163
- // sourcemap: 'external', // Generate separate source map string
1164
- // Or use 'inline' if you prefer data URLs embedded in the code
1165
- // To suppress warnings about dynamic import() if esbuild complains:
1166
- // supported: { 'dynamic-import': true },
1167
- platform: "neutral"
1168
- // not really needed
1169
- });
1170
- if (u.outputFiles && u.outputFiles.length > 0)
1171
- return u.outputFiles[0].text;
1172
- throw u.errors && u.errors.length > 0 ? new Error(\`esbuild bundling failed: \${u.errors.map((f) => f.text).join(\`
1173
- \`)}\`) : new Error("esbuild did not produce an output file.");
1174
- } catch (o) {
1175
- throw console.error("esbuild bundling process failed:", o), o;
1176
- }
1177
- }
1178
- const Wt = \`
1179
- /**
1180
- * Represents the completion of an asynchronous operation
1181
- */
1182
- interface Promise<T> {
1183
- /**
1184
- * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
1185
- * resolved value cannot be modified from the callback.
1186
- * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
1187
- * @returns A Promise for the completion of the callback.
1188
- */
1189
- finally(onfinally?: (() => void) | undefined | null): Promise<T>;
1190
- }
1191
- \`, Yt = \`
1192
- interface FirstTest {
1193
- isTrue?: boolean;
1194
- }
1195
- \`, Jt = async () => Yt, ht = /* @__PURE__ */ new Map([
1196
- ["IReferenceRange", "r"],
1197
- ["IRange", "l"]
1198
- ]), wt = /* @__PURE__ */ new Map([
1199
- ["IWorkbook", "workbook"],
1200
- ["ISheet", "sheet"],
1201
- ["ICellRanges", "ranges"],
1202
- ["ICellRange", "range"],
1203
- ["IFormulaContext", "context"]
1204
- ]), _e = (e, t) => {
1205
- Array.from(t.keys()).forEach((n) => {
1206
- const o = t.get(n);
1207
- t.set(\`\${e}.\${n}\`, o);
1208
- });
1209
- }, Ht = /* @__PURE__ */ new Map([
1210
- ["Scalar", "*"],
1211
- ["FormulaError.Known", W.Error],
1212
- ["Date", "Date"],
1213
- ["JSON", "JSON"]
1214
- ]), Xt = /* @__PURE__ */ new Map([
1215
- // Repeating
1216
- ]), Oe = "SheetXL";
1217
- _e(Oe, ht);
1218
- _e(Oe, wt);
1219
- _e(Oe, Xt);
1220
- const Zt = /* @__PURE__ */ new Map([
1221
- ["Promise", () => ({ async: !0 })],
1222
- // ['PromiseLike', (): Partial<IFunction.ReturnTypeJSON> => {
1223
- // return { async: true };
1224
- // }],
1225
- ["Observable", () => ({ stream: !0 })]
1226
- ]);
1227
- let se = null;
1228
- async function Qt() {
1229
- if (se)
1230
- return se;
1231
- try {
1232
- return await (await Promise.resolve().then(function() {
1233
- return or;
1234
- })).initialize();
1235
- } catch (e) {
1236
- throw se = null, e;
1237
- } finally {
1238
- se = null;
1239
- }
1240
- }
1241
- async function er(e) {
1242
- const t = e?.source ?? null;
1243
- if (!t) return null;
1244
- const r = (e.disableBundle || e.declarationsOnly) ?? !1, n = [
1245
- Jt(),
1246
- //import('typescript'), // when bundled, but node check causes issues. We could bundle replace isNode but felt hacky
1247
- Qt()
1248
- ], o = await Promise.all(n), i = o[0], a = o[1];
1249
- let l = "", u = null;
1250
- const f = [], h = {
1251
- allowJs: !0,
1252
- declaration: !1,
1253
- sourceMap: !1,
1254
- // was true but now bundler will do this
1255
- inlineSourceMap: !1,
1256
- inlineSources: !1,
1257
- isolatedModules: !0,
1258
- preserveConstEnums: !1,
1259
- // types: ['WebWorker'],
1260
- module: 99,
1261
- //"esNext",
1262
- noResolve: !0,
1263
- emitDeclarationOnly: !1,
1264
- target: a.ScriptTarget.ES2020
1265
- // lib: ['webworker', 'es2020', 'esnext.asynciterable'], // Use the webworker lib instead of dom
1266
- }, g = "script", p = \`\${g}.ts\`, y = "lib.d.ts", T = "global.d.ts", A = {
1267
- [p]: t,
1268
- [y]: Wt,
1269
- [T]: i
1270
- }, D = {
1271
- getSourceFile: (s, w, L, P) => a.createSourceFile(s, A[s], a.ScriptTarget.Latest, !0),
1272
- fileExists: (s) => A[s] !== void 0,
1273
- readFile: (s) => A[s],
1274
- writeFile: (s, w) => {
1275
- A[s] = w;
1276
- },
1277
- // not used
1278
- getCurrentDirectory: () => "./",
1279
- getCanonicalFileName: (s) => s,
1280
- useCaseSensitiveFileNames: () => !0,
1281
- getDefaultLibFileName: (s) => y,
1282
- getNewLine: () => \`
1283
- \`
1284
- }, U = a.createProgram([p, T], h, D), I = U.getTypeChecker(), J = U.getSourceFile(p), E = U.emit();
1285
- E.diagnostics.length > 0 && console.warn(E.diagnostics), l = A[\`\${g}.js\`];
1286
- const c = (s, w, L, P) => {
1287
- if (!s) {
1288
- $(s, new Error(\`Type is not defined for '\${w?.name ?? "return"}'.\`));
1289
- return;
1290
- }
1291
- if (s.kind === a.SyntaxKind.NumberKeyword)
1292
- w.scalar = W.Number;
1293
- else if (s.kind === a.SyntaxKind.StringKeyword)
1294
- w.scalar = W.String;
1295
- else if (s.kind === a.SyntaxKind.BooleanKeyword)
1296
- w.scalar = W.Boolean;
1297
- else if (s.kind === a.SyntaxKind.UndefinedKeyword || s.kind === a.SyntaxKind.NullKeyword || s.kind === a.SyntaxKind.VoidKeyword) {
1298
- if (P) {
1299
- $(s, new Error(\`'undefined' is not a valid type for input: '\${s?.parent?.name?.escapedText}'.\`));
1300
- return;
1301
- }
1302
- w.scalar = W.Null;
1303
- } else if (s.kind === a.SyntaxKind.BigIntKeyword)
1304
- w.scalar = W.Number;
1305
- else if (s.kind === a.SyntaxKind.AnyKeyword)
1306
- w.scalar = W.Null;
1307
- else if (s.kind === a.SyntaxKind.ArrayType) {
1308
- const M = s.elementType;
1309
- if (!M) {
1310
- $(s, new Error(\`'Array' must be typed: '\${s?.parent?.name?.escapedText}'.\`));
1311
- return;
1312
- }
1313
- w.arrayDepth = (w.arrayDepth ?? 0) + 1, c(M, w, L, P);
1314
- } else if (s.kind !== a.SyntaxKind.TupleType) {
1315
- if (s.kind === a.SyntaxKind.TypeReference) {
1316
- const M = s.typeName?.getText?.() ?? null, K = ht.get(M);
1317
- let V = !1;
1318
- K && (w.range = K, V = !0);
1319
- const q = Ht.get(M);
1320
- if (q && (w.scalar = q), q !== void 0 && (V = !0), P) {
1321
- const R = wt.get(M);
1322
- if (R)
1323
- return R;
1324
- } else {
1325
- const R = Zt.get(M);
1326
- if (R) {
1327
- const b = { ...w, ...R() };
1328
- let N = 0;
1329
- if (b.async && N++, b.stream && N++, N > 1) {
1330
- $(s, new Error(\`'\${M}' cannot have multiple modifiers: '\${s?.parent?.name?.escapedText}'.\`));
1331
- return;
1332
- }
1333
- w = b, V = !0;
1334
- }
1335
- }
1336
- if (!V) {
1337
- $("node", new Error(\`'\${M}' is not a valid type: '\${s?.parent?.name?.escapedText}'.\`));
1338
- return;
1339
- }
1340
- const H = s.typeArguments;
1341
- if (H) {
1342
- if (H.length !== 1) {
1343
- $(s, new Error(\`'\${M}' must be typed with exactly 1 type: '\${s?.parent?.name?.escapedText}'.\`));
1344
- return;
1345
- }
1346
- c(H[0], w, L, P);
1347
- }
1348
- }
1349
- }
1350
- }, m = (s) => (a.getCombinedModifierFlags(s) & a.ModifierFlags.Export) !== 0, fe = (s) => (a.getCombinedModifierFlags(s) & a.ModifierFlags.Default) !== 0, B = [], $ = (s, w) => {
1351
- B.push(w);
1352
- };
1353
- if (a.forEachChild(J, (s) => {
1354
- if (m(s) && a.isFunctionDeclaration(s)) {
1355
- const w = {}, L = {
1356
- parameters: {}
1357
- }, P = s?.name?.getText();
1358
- try {
1359
- w.name = P;
1360
- const K = I.getSymbolAtLocation(s.name).getDocumentationComment(I);
1361
- if (K && K.length > 0 && K[0].text) {
1362
- let R = K[0].text;
1363
- R = R.replace(/[\\r\\n]+/g, "\\\\n").trim(), L.summary = R;
1364
- }
1365
- const V = {};
1366
- c(s.type, V, w, !1), w.returnType = V;
1367
- const q = {};
1368
- fe(s) && (q.default = !0, u = P), Object.keys(q).length > 0 && (w.behavior = q), w.parameters = [];
1369
- const H = /* @__PURE__ */ new Map();
1370
- for (let R = 0; R < s.parameters.length; R++) {
1371
- const b = s.parameters[R], N = {};
1372
- N.name = b.name?.getText();
1373
- const X = c(b.type, N, w, !0);
1374
- if (X) {
1375
- if (w.parameters.length !== 0) {
1376
- const F = s?.parent?.name?.getText();
1377
- $(s, new Error(\`'\${w.name}' contexts must be the first parameter: '\${F}'.\`));
1378
- return;
1379
- }
1380
- w.context = X;
1381
- continue;
1382
- }
1383
- const z = !((b.initializer === void 0 || b.initializer === null) && (b.questionToken === void 0 || b.questionToken === null));
1384
- let C;
1385
- if (z && (N.optional = !0, b.initializer))
1386
- try {
1387
- b.initializer.kind === a.SyntaxKind.StringLiteral ? C = b.initializer.text : b.initializer.kind === a.SyntaxKind.NumericLiteral ? C = parseFloat(b.initializer.text) : b.initializer.kind === a.SyntaxKind.TrueKeyword || b.initializer.kind === a.SyntaxKind.FalseKeyword ? C = b.initializer.kind === a.SyntaxKind.TrueKeyword : b.initializer.kind === a.SyntaxKind.NullKeyword ? C = null : b.initializer.kind === a.SyntaxKind.ObjectLiteralExpression || b.initializer.kind === a.SyntaxKind.ArrayLiteralExpression ? C = b.initializer.getText() : C = b.initializer.getText?.();
1388
- } catch (O) {
1389
- console.warn(\`Couldn't extract default value for parameter '\${N.name}'\`, O);
1390
- }
1391
- b.dotDotDotToken && (N.rest = !0), w.parameters.push(N);
1392
- const x = { description: "" };
1393
- L.parameters[N.name] = x;
1394
- const G = I.getSymbolAtLocation(b.name).getDocumentationComment(I);
1395
- G && G.length > 0 && G[0].text && (x.description = G[0].text), C !== void 0 && (x.defaultValue = C), H.set(N.name, N);
1396
- }
1397
- if (s.jsDoc && s.jsDoc.length > 0) {
1398
- const R = s.jsDoc;
1399
- for (let b = 0; b < R.length; b++) {
1400
- const N = R[b]?.tags;
1401
- if (N)
1402
- for (let X = 0; X < N.length; X++) {
1403
- const z = N[X];
1404
- let C = z?.tagName?.text;
1405
- if (!C) continue;
1406
- C = C.toLowerCase();
1407
- let x = z.comment;
1408
- const G = C === "hidden";
1409
- if (!(typeof x != "string" && !G) && (typeof x == "string" && (x = x.replace(/[\\r\\n]+/g, "\\\\n").trim()), !(!G && x && (x = x.split(/\\\\n/)[0], !x || x.length === 0)))) {
1410
- if (x && typeof x == "string") {
1411
- const O = /\\{@link(code|plain)?\\s+([^}|]+)(?:\\s*\\|\\s*([^}]+))?\\}/g;
1412
- let F, Z = x, te = [];
1413
- for (; (F = O.exec(x)) !== null; ) {
1414
- const [pe, me, gt, Ne] = F, bt = [gt.trim()];
1415
- Ne && bt.push(Ne.trim());
1416
- }
1417
- x = Z, te.length > 0 && C === "see" && (L.links || (L.links = []), L.links.push(...te));
1418
- }
1419
- if (C === "name") {
1420
- const O = x;
1421
- O !== P && (L.name = O);
1422
- } else if (C === "description") {
1423
- const O = x;
1424
- } else if (C === "summary") {
1425
- const O = x;
1426
- O && (L.summary = O);
1427
- } else if (C === "param") {
1428
- const O = z.name?.text, F = H.get(O);
1429
- if (!F) {
1430
- B.push(new Error(\`Parameter '\${O}' not found in function '\${P}'.\`));
1431
- continue;
1432
- }
1433
- if (z.typeExpression && z.typeExpression.type)
1434
- try {
1435
- const Z = z.typeExpression.type;
1436
- if (Z.kind === a.SyntaxKind.UnionType) {
1437
- const te = [];
1438
- F.enums = te, Z.types.forEach((pe) => {
1439
- if (pe.kind === a.SyntaxKind.LiteralType) {
1440
- const me = pe.literal.text;
1441
- me && te.push(me);
1442
- }
1443
- });
1444
- }
1445
- } catch (Z) {
1446
- console.warn("Error parsing JSDoc type expression:", Z);
1447
- }
1448
- } else if (C === "returns" || C === "return")
1449
- w.returnType.description = x;
1450
- else if (C === "category")
1451
- L.category = x;
1452
- else if (C === "hidden") {
1453
- let O = !0;
1454
- const F = x?.toLowerCase();
1455
- F === "false" ? O = !1 : F !== "true" && (O = x), O !== !1 && (L.hidden = O ?? !0);
1456
- }
1457
- }
1458
- }
1459
- }
1460
- }
1461
- Object.keys(w.returnType).length === 0 && delete w.returnType, f.push([w, L]);
1462
- } catch (M) {
1463
- $(s, new Error(\`'\${P}': \${M.message}\`));
1464
- }
1465
- }
1466
- }), B.length > 0)
1467
- throw console.warn(B), new Error("There were compilation errors.", { cause: B });
1468
- if (f.length === 0)
1469
- throw new Error("No exported functions.");
1470
- const yt = \`\${Ut.uuidV4()}-script\`;
1471
- try {
1472
- !r && B.length === 0 && (l = await Gt(a, l, g));
1473
- } catch {
1474
- console.warn("Error bundling script");
1475
- }
1476
- const Ie = {
1477
- functions: f,
1478
- commitId: yt,
1479
- source: t,
1480
- name: "Script",
1481
- language: "typescript",
1482
- // default
1483
- compiled: l
1484
- };
1485
- return u && (Ie.autoRun = u), Ie;
1486
- }
1487
- self.addEventListener("message", async (e) => {
1488
- const { id: t, params: r } = e.data;
1489
- try {
1490
- const n = await er(r);
1491
- self.postMessage({ id: t, result: n, error: null });
1492
- } catch (n) {
1493
- self.postMessage({
1494
- id: t,
1495
- result: null,
1496
- error: {
1497
- message: n.message,
1498
- stack: n.stack,
1499
- cause: n.cause
1500
- }
1501
- });
1502
- }
1503
- });
1504
- let ce = null;
1505
- async function tr() {
1506
- return ce || (ce = new Promise(async (e, t) => {
1507
- try {
1508
- const r = "0.20.2", n = \`https://esm.sh/esbuild-wasm@\${r}\`, o = \`https://esm.sh/esbuild-wasm@\${r}/esbuild.wasm\`, a = (await import(
1509
- /* webpackIgnore: true */
1510
- /* @vite-ignore */
1511
- n
1512
- )).default;
1513
- await a.initialize({
1514
- wasmURL: o,
1515
- // Provide the specific WASM URL
1516
- worker: !1
1517
- // Keep processing on the current thread
1518
- }), e(a);
1519
- } catch (r) {
1520
- console.error("Error initializing esbuild:", r), t(r);
1521
- }
1522
- }), ce);
1523
- }
1524
- var rr = /* @__PURE__ */ Object.freeze({
1525
- __proto__: null,
1526
- initialize: tr
1527
- });
1528
- let ue = null;
1529
- async function nr() {
1530
- return ue || (ue = new Promise(async (e, t) => {
1531
- let r = null;
1532
- try {
1533
- r = await import("https://esm.sh/typescript@5.7.2");
1534
- } catch (n) {
1535
- console.error("Error initializing Browser TypeScript module:", n);
1536
- }
1537
- r || console.log("use script fallback"), e(r);
1538
- }), ue);
1539
- }
1540
- var or = /* @__PURE__ */ Object.freeze({
1541
- __proto__: null,
1542
- initialize: nr
1543
- });
1544
- `, a = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", s], { type: "text/javascript;charset=utf-8" });
1545
- function d(e) {
1546
- let n;
1547
- try {
1548
- if (n = a && (self.URL || self.webkitURL).createObjectURL(a), !n) throw "";
1549
- const t = new Worker(n, { type: "module", name: e?.name });
1550
- return t.addEventListener("error", () => {
1551
- (self.URL || self.webkitURL).revokeObjectURL(n);
1552
- }), t;
1553
- } catch {
1554
- return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(s), { type: "module", name: e?.name });
1555
- }
1556
- }
1557
- async function p() {
1558
- if (typeof process < "u" && process.versions?.node && typeof Worker > "u") return await l();
1559
- if (typeof Worker < "u") {
1560
- const e = new c(() => new d());
1561
- try {
1562
- return await e.start(), e;
1563
- } catch (n) {
1564
- console.error("Failed to start TypescriptCompiler worker reverting to fallback:", n);
1565
- }
1566
- }
1567
- return await l();
1568
- }
1569
- const l = async () => {
1570
- const { compileModule: e } = await import("./CzRlLyr7iG0quh7r.mjs"), n = new u((t) => e(t));
1571
- return await n.start(), n;
1572
- };
1573
- export {
1574
- p as createCompilerWorker
1575
- };