@sheetxl/studio-mui 0.4.12 → 0.4.14

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 (127) hide show
  1. package/browser/cjs/-zKDSjn55SCvCwk8.cjs +6 -0
  2. package/browser/cjs/AoLA7tfyPshG_mKt.cjs +6 -0
  3. package/browser/cjs/As7uhSEgY8VJ3I6f.cjs +90 -0
  4. package/browser/cjs/B1Eaz6PFZAmrWiyY.cjs +6 -0
  5. package/browser/cjs/B8ZfZXhvW4sSKKZs.cjs +42 -0
  6. package/browser/cjs/BAfNSJo7fktzFVJd.cjs +11 -0
  7. package/browser/cjs/BH0v7IIykugrFxaT.cjs +6 -0
  8. package/browser/cjs/BUwmvmcdC0xBQ97L.cjs +145 -0
  9. package/browser/cjs/BiBEmbWoJHdOB1li.cjs +12 -0
  10. package/browser/cjs/BkVtS9FZxWYNmrbU.cjs +6 -0
  11. package/browser/cjs/Bmifo5y7ZMJolUTY.cjs +15 -0
  12. package/browser/cjs/BpLu9-spCLcAFdwd.cjs +6 -0
  13. package/browser/cjs/BqOg0z4HGrbNaL1k.cjs +6 -0
  14. package/browser/cjs/C6Fk0jGWAOED60yf.cjs +161 -0
  15. package/browser/cjs/CRvxop0QcZL23Akb.cjs +6 -0
  16. package/browser/cjs/CS5USjyVh8DwPSri.cjs +7 -0
  17. package/browser/cjs/Chz3K3Qt8M2FNJwI.cjs +12 -0
  18. package/browser/cjs/D2gy3JDrJyGAMqsl.cjs +7 -0
  19. package/browser/cjs/DD8-ZSDUkRqk7l6y.cjs +11 -0
  20. package/browser/cjs/DNL88d5PGwk92LeD.cjs +6 -0
  21. package/browser/cjs/DTHMIHonHaHeJ0o1.cjs +18 -0
  22. package/browser/cjs/DZ8WTAzF6V2Tw1tW.cjs +6 -0
  23. package/browser/cjs/W7LR70ajtjR9Lmvl.cjs +6 -0
  24. package/browser/cjs/XGmQ2kUHM2qQkG1r.cjs +16 -0
  25. package/browser/cjs/d2jsgbPdf35xArnn.cjs +6 -0
  26. package/browser/cjs/index.cjs +4 -10
  27. package/browser/esm/4fzdzYhVH9eIXv-E.mjs +2410 -0
  28. package/browser/esm/B-rZWEIXFvB2W_mP.mjs +84 -0
  29. package/browser/esm/C4ORm_Up6Zxt92F_.mjs +1672 -0
  30. package/browser/esm/C5OCdRxcYIZViFzN.mjs +13391 -0
  31. package/browser/esm/C8po4rRYJ8127Rgb.mjs +44 -0
  32. package/browser/esm/CB7vnn7AtsGma4R6.mjs +3803 -0
  33. package/browser/esm/CBQZHZlKIiEz186r.mjs +2251 -0
  34. package/browser/esm/CCwOCTrf9Bira1-Y.mjs +424 -0
  35. package/browser/esm/CHovQU_R4AuKULmT.mjs +392 -0
  36. package/browser/esm/CIH3ADFJJmUiyA8p.mjs +864 -0
  37. package/browser/esm/CQiALmsycGGLFj1o.mjs +25 -0
  38. package/browser/esm/CS6uJp7phBvUmos6.mjs +1467 -0
  39. package/browser/esm/CSKgHJSTMvOEe2RH.mjs +19981 -0
  40. package/browser/esm/CYG1vk4AMMwqsul7.mjs +1366 -0
  41. package/browser/esm/ClmlhDf-0RC5GFV3.mjs +52 -0
  42. package/browser/esm/CmAnpd_SOxQuTQRL.mjs +1703 -0
  43. package/browser/esm/DWy4L2usallW0WdU.mjs +153 -0
  44. package/browser/esm/Dc1PmtvbeqsIQHq6.mjs +48 -0
  45. package/browser/esm/DgKsUQMTThBdEQds.mjs +59 -0
  46. package/browser/esm/Dk00kGaRJxiitO5-.mjs +23 -0
  47. package/browser/esm/FdSIHwC_mNRZpcgJ.mjs +43 -0
  48. package/browser/esm/Ks946bL2vmd4m743.mjs +52 -0
  49. package/browser/esm/TlZOl3Gt-d0Nc2a8.mjs +46 -0
  50. package/browser/esm/_FvE2-K7MOW_qWVS.mjs +1352 -0
  51. package/browser/esm/index.mjs +83 -8
  52. package/browser/esm/vgS9ixFRuZrPx6vq.mjs +640 -0
  53. package/licenses/dependencies.txt +134 -134
  54. package/node/esm/{B3M2CzPvK2oKOfg5.mjs → 762kbapO408ejsVC.mjs} +2 -2
  55. package/node/esm/{CryVonGjJnmo2dE_.mjs → B0gJGF9-J3L5yBEW.mjs} +5 -5
  56. package/node/esm/{CBGAl2mih9mHDt5w.mjs → BR9YJuwMP9nTMBE-.mjs} +1 -1
  57. package/node/esm/{D1xD8cOQDGcbjIlG.mjs → BTNBRzW8ZZbJY4GL.mjs} +1 -1
  58. package/node/esm/{C2P_M1JNT_WZZN3H.mjs → Bgtg4I8EL4M776SY.mjs} +8 -8
  59. package/node/esm/{DUfB1ollhqU-JIk5.mjs → Bi5br6yrYZqhLEiY.mjs} +4 -4
  60. package/node/esm/{M3UB6IrhVERZziiJ.mjs → CCygt4zw40-jO57G.mjs} +2 -2
  61. package/node/esm/{m8fyd2BoYkTOJlc1.mjs → CTpkd2r1aBS5d0yl.mjs} +1 -1
  62. package/node/esm/{kHsChOtl8GUkzj5Q.mjs → CY1qC_sXGD6av4yO.mjs} +2 -2
  63. package/node/esm/{Dx2vq1Hdt4pqmOF-.mjs → CZoMFCKJudiTl_Tf.mjs} +2 -2
  64. package/node/esm/{kIQFLB3nmEJdn_OT.mjs → CzWLA_IQgFbENkMq.mjs} +1 -1
  65. package/node/esm/{BJY8yNMmN_yyRtIG.mjs → D1GfRQ1jyFg-wmLD.mjs} +1 -1
  66. package/node/esm/{D1C8ifsmXsypL6pp.mjs → DC2dPUCWVgxEKzaS.mjs} +13 -13
  67. package/node/esm/{Bj8uU2shfkvN4LnE.mjs → DOUP6ynjlQE-UEJs.mjs} +6 -6
  68. package/node/esm/{BIRLX0-9t62Lqats.mjs → DUqIYzvmrCd67Dpx.mjs} +2 -2
  69. package/node/esm/{CVGxETc4rIE1gNAH.mjs → DWCxF-chq5dVi363.mjs} +38 -38
  70. package/node/esm/{Bt5y5wVaVAVjwHBl.mjs → DghPySv_2Ts78czJ.mjs} +1 -1
  71. package/node/esm/{PF5CCBvapZxEzc7k.mjs → DrujinnhlNDCosqb.mjs} +1 -1
  72. package/node/esm/DsD7O5j2cXyaECkB.mjs +313 -0
  73. package/node/esm/{wdtYNTNCynMMS4_P.mjs → VHY56h6xqQcPba6u.mjs} +1 -1
  74. package/node/esm/{h1y2hBFecTqRgUa-.mjs → dlEq3vDkIERtTn7Y.mjs} +25 -25
  75. package/node/esm/index.mjs +4999 -5264
  76. package/node/esm/{CKtVB9hMCfabQMxC.mjs → yB8OTWhDomxUy_SX.mjs} +2 -2
  77. package/node/esm/{bv_GA6NGCT0sJaXy.mjs → yP0whgIwVZApluLw.mjs} +2 -2
  78. package/package.json +8 -8
  79. package/types/index.d.ts +0 -11
  80. package/browser/cjs/B7qLzxylqOaybl3H.cjs +0 -7
  81. package/browser/cjs/BNGixOiIsu8jZlvn.cjs +0 -7
  82. package/browser/cjs/BUYxt7KgFkIIIMyc.cjs +0 -7
  83. package/browser/cjs/Bk6VhhWsnCRyBu2F.cjs +0 -7
  84. package/browser/cjs/BpiMMYip132x0r1O.cjs +0 -7
  85. package/browser/cjs/ByZ_Q-J7jgF7AoWR.cjs +0 -7
  86. package/browser/cjs/BzD7LV8VmFKLAJyW.cjs +0 -7
  87. package/browser/cjs/C6_zcNM0Efa11KEE.cjs +0 -7
  88. package/browser/cjs/C8Azx_ZaQa4WvAtR.cjs +0 -7
  89. package/browser/cjs/CITvaW7L_iZfIyAN.cjs +0 -7
  90. package/browser/cjs/CNDDYOoLCrGsUMYL.cjs +0 -7
  91. package/browser/cjs/CYbeY5OVZDqHGSOm.cjs +0 -7
  92. package/browser/cjs/C_SgucbRn-v9IkNO.cjs +0 -7
  93. package/browser/cjs/CeTd2nFbE5yFzf7T.cjs +0 -7
  94. package/browser/cjs/Cfe7IbPNI8-CgoDI.cjs +0 -7
  95. package/browser/cjs/Ctyk-ajkSsTDJuvY.cjs +0 -7
  96. package/browser/cjs/DBhTQLbjAtU-A1YA.cjs +0 -7
  97. package/browser/cjs/Dc2rbOjtcmSIm8D4.cjs +0 -7
  98. package/browser/cjs/DcsvUmoS8zGG5GB8.cjs +0 -7
  99. package/browser/cjs/DqAlQQIZIyF7HMib.cjs +0 -7
  100. package/browser/cjs/DuwawlAm4aRBNTBm.cjs +0 -7
  101. package/browser/cjs/Dx9UUJj-yeubDjm4.cjs +0 -7
  102. package/browser/cjs/IC19hB4Ntvw1158j.cjs +0 -7
  103. package/browser/cjs/reQ9miE5C5qMfbRJ.cjs +0 -7
  104. package/browser/esm/B1Ey4ZP8BHUzHW7G.mjs +0 -7
  105. package/browser/esm/B8dJHVZJta8QbNKG.mjs +0 -7
  106. package/browser/esm/BThbC01mtb7qq8_A.mjs +0 -7
  107. package/browser/esm/Bnt1M91BRyMvXrc4.mjs +0 -7
  108. package/browser/esm/BqN0SYrEO0RZQtv-.mjs +0 -7
  109. package/browser/esm/CHPXsEre3jry2-jF.mjs +0 -7
  110. package/browser/esm/CMCOU0nDlymDFS9l.mjs +0 -7
  111. package/browser/esm/Cc7y1nMDr5J8jWx-.mjs +0 -7
  112. package/browser/esm/CesL-3BNbMB1f_if.mjs +0 -7
  113. package/browser/esm/CfvNSnuQLa1SPbNL.mjs +0 -7
  114. package/browser/esm/CloqVDbJmTL4oFek.mjs +0 -7
  115. package/browser/esm/Cta0yn5UIrP2UoT4.mjs +0 -7
  116. package/browser/esm/CwRyQHiDoBLx5_1g.mjs +0 -7
  117. package/browser/esm/DI-ZGstUJFwkx4H6.mjs +0 -7
  118. package/browser/esm/DQTfmweCXjuIlITn.mjs +0 -7
  119. package/browser/esm/DUIfOO25d1fqtJzn.mjs +0 -7
  120. package/browser/esm/DhOXsRr8c7bDS1jM.mjs +0 -7
  121. package/browser/esm/JPwh2m5-pXkdPVzF.mjs +0 -7
  122. package/browser/esm/UkNAvQj0NVgeMpUl.mjs +0 -7
  123. package/browser/esm/ZUfck_LDsQb9gpvU.mjs +0 -7
  124. package/browser/esm/gHhqkr52cxXkga0T.mjs +0 -7
  125. package/browser/esm/obM68UOvA5HV7Lt1.mjs +0 -7
  126. package/browser/esm/x9MyDRdLE47dI9dF.mjs +0 -7
  127. package/browser/esm/yW9jxnamUqAhVQkJ.mjs +0 -7
@@ -0,0 +1,392 @@
1
+ import C, { memo as ne, useState as z, useRef as m, useCallback as re, useEffect as S } from "react";
2
+ /**
3
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
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
+ function we(e, t, r) {
9
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
10
+ }
11
+ function ue(e, t) {
12
+ var r = Object.keys(e);
13
+ if (Object.getOwnPropertySymbols) {
14
+ var n = Object.getOwnPropertySymbols(e);
15
+ t && (n = n.filter(function(o) {
16
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
17
+ })), r.push.apply(r, n);
18
+ }
19
+ return r;
20
+ }
21
+ function ae(e) {
22
+ for (var t = 1; t < arguments.length; t++) {
23
+ var r = arguments[t] != null ? arguments[t] : {};
24
+ t % 2 ? ue(Object(r), !0).forEach(function(n) {
25
+ we(e, n, r[n]);
26
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ue(Object(r)).forEach(function(n) {
27
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
28
+ });
29
+ }
30
+ return e;
31
+ }
32
+ function le(e, t) {
33
+ (t == null || t > e.length) && (t = e.length);
34
+ for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
35
+ return n;
36
+ }
37
+ function Oe(e, t, r) {
38
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
39
+ }
40
+ function se(e, t) {
41
+ var r = Object.keys(e);
42
+ if (Object.getOwnPropertySymbols) {
43
+ var n = Object.getOwnPropertySymbols(e);
44
+ t && (n = n.filter(function(o) {
45
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
46
+ })), r.push.apply(r, n);
47
+ }
48
+ return r;
49
+ }
50
+ function de(e) {
51
+ for (var t = 1; t < arguments.length; t++) {
52
+ var r = arguments[t] != null ? arguments[t] : {};
53
+ t % 2 ? se(Object(r), !0).forEach(function(n) {
54
+ Oe(e, n, r[n]);
55
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : se(Object(r)).forEach(function(n) {
56
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
57
+ });
58
+ }
59
+ return e;
60
+ }
61
+ function R(e) {
62
+ return function t() {
63
+ for (var r = this, n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
64
+ return o.length >= e.length ? e.apply(this, o) : function() {
65
+ for (var c = arguments.length, u = new Array(c), f = 0; f < c; f++) u[f] = arguments[f];
66
+ return t.apply(r, [].concat(o, u));
67
+ };
68
+ };
69
+ }
70
+ function Y(e) {
71
+ return {}.toString.call(e).includes("Object");
72
+ }
73
+ function _(e) {
74
+ return typeof e == "function";
75
+ }
76
+ var k = R(function(e, t) {
77
+ throw new Error(e[t] || e.default);
78
+ })({ initialIsRequired: "initial state is required", initialType: "initial state should be an object", initialContent: "initial state shouldn't be an empty object", handlerType: "handler should be an object or a function", handlersType: "all handlers should be a functions", selectorType: "selector should be a function", changeType: "provided value of changes should be an object", changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state', default: "an unknown error accured in `state-local` package" }), je = function(e, t) {
79
+ return Y(t) || k("changeType"), Object.keys(t).some(function(r) {
80
+ return n = e, o = r, !Object.prototype.hasOwnProperty.call(n, o);
81
+ var n, o;
82
+ }) && k("changeField"), t;
83
+ }, Me = function(e) {
84
+ _(e) || k("selectorType");
85
+ }, Ee = function(e) {
86
+ _(e) || Y(e) || k("handlerType"), Y(e) && Object.values(e).some(function(t) {
87
+ return !_(t);
88
+ }) && k("handlersType");
89
+ }, Pe = function(e) {
90
+ var t;
91
+ e || k("initialIsRequired"), Y(e) || k("initialType"), t = e, Object.keys(t).length || k("initialContent");
92
+ };
93
+ function Se(e, t) {
94
+ return _(t) ? t(e.current) : t;
95
+ }
96
+ function ke(e, t) {
97
+ return e.current = de(de({}, e.current), t), t;
98
+ }
99
+ function xe(e, t, r) {
100
+ return _(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
101
+ var o;
102
+ return (o = t[n]) === null || o === void 0 ? void 0 : o.call(t, e.current[n]);
103
+ }), r;
104
+ }
105
+ var X, Ie = function(e) {
106
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
107
+ Pe(e), Ee(t);
108
+ var r = { current: e }, n = R(xe)(r, t), o = R(ke)(r), i = R(je)(e), c = R(Se)(r);
109
+ return [function() {
110
+ var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(f) {
111
+ return f;
112
+ };
113
+ return Me(u), u(r.current);
114
+ }, function(u) {
115
+ (function() {
116
+ for (var f = arguments.length, g = new Array(f), O = 0; O < f; O++) g[O] = arguments[O];
117
+ return function(b) {
118
+ return g.reduceRight(function(E, P) {
119
+ return P(E);
120
+ }, b);
121
+ };
122
+ })(n, o, i, c)(u);
123
+ }];
124
+ }, pe = { configIsRequired: "the configuration object is required", configType: "the configuration object should be an object", default: "an unknown error accured in `@monaco-editor/loader` package", deprecation: `Deprecation warning!
125
+ You are using deprecated way of configuration.
126
+
127
+ Instead of using
128
+ monaco.config({ urls: { monacoBase: '...' } })
129
+ use
130
+ monaco.config({ paths: { vs: '...' } })
131
+
132
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
133
+ ` }, fe = (X = function(e, t) {
134
+ throw new Error(e[t] || e.default);
135
+ }, function e() {
136
+ for (var t = this, r = arguments.length, n = new Array(r), o = 0; o < r; o++) n[o] = arguments[o];
137
+ return n.length >= X.length ? X.apply(this, n) : function() {
138
+ for (var i = arguments.length, c = new Array(i), u = 0; u < i; u++) c[u] = arguments[u];
139
+ return e.apply(t, [].concat(n, c));
140
+ };
141
+ })(pe), Te = function(e) {
142
+ var t;
143
+ return e || fe("configIsRequired"), t = e, {}.toString.call(t).includes("Object") || fe("configType"), e.urls ? (console.warn(pe.deprecation), { paths: { vs: e.urls.monacoBase } }) : e;
144
+ };
145
+ function he(e, t) {
146
+ return Object.keys(t).forEach(function(r) {
147
+ t[r] instanceof Object && e[r] && Object.assign(t[r], he(e[r], t[r]));
148
+ }), ae(ae({}, e), t);
149
+ }
150
+ var Ae = { type: "cancelation", msg: "operation is manually canceled" };
151
+ function Z(e) {
152
+ var t = !1, r = new Promise(function(n, o) {
153
+ e.then(function(i) {
154
+ return t ? o(Ae) : n(i);
155
+ }), e.catch(o);
156
+ });
157
+ return r.cancel = function() {
158
+ return t = !0;
159
+ }, r;
160
+ }
161
+ var ee, me = function(e) {
162
+ if (Array.isArray(e)) return e;
163
+ }(ee = Ie({ config: { paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs" } }, isInitialized: !1, resolve: null, reject: null, monaco: null })) || function(e) {
164
+ if (typeof Symbol < "u" && Symbol.iterator in Object(e)) {
165
+ var t = [], r = !0, n = !1, o = void 0;
166
+ try {
167
+ for (var i, c = e[Symbol.iterator](); !(r = (i = c.next()).done) && (t.push(i.value), t.length !== 2); r = !0) ;
168
+ } catch (u) {
169
+ n = !0, o = u;
170
+ } finally {
171
+ try {
172
+ r || c.return == null || c.return();
173
+ } finally {
174
+ if (n) throw o;
175
+ }
176
+ }
177
+ return t;
178
+ }
179
+ }(ee) || function(e) {
180
+ if (e) {
181
+ if (typeof e == "string") return le(e, 2);
182
+ var t = Object.prototype.toString.call(e).slice(8, -1);
183
+ return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? le(e, 2) : void 0;
184
+ }
185
+ }(ee) || function() {
186
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
187
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
188
+ }(), N = me[0], $ = me[1];
189
+ function Ce(e) {
190
+ return document.body.appendChild(e);
191
+ }
192
+ function De(e) {
193
+ var t, r, n = N(function(i) {
194
+ return { config: i.config, reject: i.reject };
195
+ }), o = (t = "".concat(n.config.paths.vs, "/loader.js"), r = document.createElement("script"), t && (r.src = t), r);
196
+ return o.onload = function() {
197
+ return e();
198
+ }, o.onerror = n.reject, o;
199
+ }
200
+ function Ve() {
201
+ var e = N(function(r) {
202
+ return { config: r.config, resolve: r.resolve, reject: r.reject };
203
+ }), t = window.require;
204
+ t.config(e.config), t(["vs/editor/editor.main"], function(r) {
205
+ ye(r), e.resolve(r);
206
+ }, function(r) {
207
+ e.reject(r);
208
+ });
209
+ }
210
+ function ye(e) {
211
+ N().monaco || $({ monaco: e });
212
+ }
213
+ var te = new Promise(function(e, t) {
214
+ return $({ resolve: e, reject: t });
215
+ }), G = { config: function(e) {
216
+ var t = Te(e), r = t.monaco, n = function(o, i) {
217
+ if (o == null) return {};
218
+ var c, u, f = function(O, b) {
219
+ if (O == null) return {};
220
+ var E, P, x = {}, I = Object.keys(O);
221
+ for (P = 0; P < I.length; P++) E = I[P], b.indexOf(E) >= 0 || (x[E] = O[E]);
222
+ return x;
223
+ }(o, i);
224
+ if (Object.getOwnPropertySymbols) {
225
+ var g = Object.getOwnPropertySymbols(o);
226
+ for (u = 0; u < g.length; u++) c = g[u], i.indexOf(c) >= 0 || Object.prototype.propertyIsEnumerable.call(o, c) && (f[c] = o[c]);
227
+ }
228
+ return f;
229
+ }(t, ["monaco"]);
230
+ $(function(o) {
231
+ return { config: he(o.config, n), monaco: r };
232
+ });
233
+ }, init: function() {
234
+ var e = N(function(t) {
235
+ return { monaco: t.monaco, isInitialized: t.isInitialized, resolve: t.resolve };
236
+ });
237
+ if (!e.isInitialized) {
238
+ if ($({ isInitialized: !0 }), e.monaco) return e.resolve(e.monaco), Z(te);
239
+ if (window.monaco && window.monaco.editor) return ye(window.monaco), e.resolve(window.monaco), Z(te);
240
+ (function() {
241
+ for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
242
+ return function(o) {
243
+ return r.reduceRight(function(i, c) {
244
+ return c(i);
245
+ }, o);
246
+ };
247
+ })(Ce, De)(Ve);
248
+ }
249
+ return Z(te);
250
+ }, __getMonacoInstance: function() {
251
+ return N(function(e) {
252
+ return e.monaco;
253
+ });
254
+ } }, Le = { display: "flex", position: "relative", textAlign: "initial" }, Re = { width: "100%" }, qe = { display: "none" }, ze = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, _e = function({ children: e }) {
255
+ return C.createElement("div", { style: ze.container }, e);
256
+ }, ve = ne(function({ width: e, height: t, isEditorReady: r, loading: n, _ref: o, className: i, wrapperProps: c }) {
257
+ return C.createElement("section", { style: { ...Le, width: e, height: t }, ...c }, !r && C.createElement(_e, null, n), C.createElement("div", { ref: o, style: { ...Re, ...!r && qe }, className: i }));
258
+ }), oe = function(e) {
259
+ S(e, []);
260
+ }, j = function(e, t, r = !0) {
261
+ let n = m(!0);
262
+ S(n.current || !r ? () => {
263
+ n.current = !1;
264
+ } : e, t);
265
+ };
266
+ function q() {
267
+ }
268
+ function A(e, t, r, n) {
269
+ return i = n, (o = e).editor.getModel(ge(o, i)) || function(c, u, f, g) {
270
+ return c.editor.createModel(u, f, g ? ge(c, g) : void 0);
271
+ }(e, t, r, n);
272
+ var o, i;
273
+ }
274
+ function ge(e, t) {
275
+ return e.Uri.parse(t);
276
+ }
277
+ var Ue = ne(function({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: o, originalModelPath: i, modifiedModelPath: c, keepCurrentOriginalModel: u = !1, keepCurrentModifiedModel: f = !1, theme: g = "light", loading: O = "Loading...", options: b = {}, height: E = "100%", width: P = "100%", className: x, wrapperProps: I = {}, beforeMount: H = q, onMount: J = q }) {
278
+ let [w, D] = z(!1), [V, h] = z(!0), y = m(null), s = m(null), L = m(null), v = m(J), a = m(H), T = m(!1);
279
+ oe(() => {
280
+ let l = G.init();
281
+ return l.then((d) => (s.current = d) && h(!1)).catch((d) => d?.type !== "cancelation" && console.error("Monaco initialization: error:", d)), () => y.current ? function() {
282
+ let d = y.current?.getModel();
283
+ u || d?.original?.dispose(), f || d?.modified?.dispose(), y.current?.dispose();
284
+ }() : l.cancel();
285
+ }), j(() => {
286
+ if (y.current && s.current) {
287
+ let l = y.current.getOriginalEditor(), d = A(s.current, e || "", n || r || "text", i || "");
288
+ d !== l.getModel() && l.setModel(d);
289
+ }
290
+ }, [i], w), j(() => {
291
+ if (y.current && s.current) {
292
+ let l = y.current.getModifiedEditor(), d = A(s.current, t || "", o || r || "text", c || "");
293
+ d !== l.getModel() && l.setModel(d);
294
+ }
295
+ }, [c], w), j(() => {
296
+ let l = y.current.getModifiedEditor();
297
+ l.getOption(s.current.editor.EditorOption.readOnly) ? l.setValue(t || "") : t !== l.getValue() && (l.executeEdits("", [{ range: l.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), l.pushUndoStop());
298
+ }, [t], w), j(() => {
299
+ y.current?.getModel()?.original.setValue(e || "");
300
+ }, [e], w), j(() => {
301
+ let { original: l, modified: d } = y.current.getModel();
302
+ s.current.editor.setModelLanguage(l, n || r || "text"), s.current.editor.setModelLanguage(d, o || r || "text");
303
+ }, [r, n, o], w), j(() => {
304
+ s.current?.editor.setTheme(g);
305
+ }, [g], w), j(() => {
306
+ y.current?.updateOptions(b);
307
+ }, [b], w);
308
+ let F = re(() => {
309
+ if (!s.current) return;
310
+ a.current(s.current);
311
+ let l = A(s.current, e || "", n || r || "text", i || ""), d = A(s.current, t || "", o || r || "text", c || "");
312
+ y.current?.setModel({ original: l, modified: d });
313
+ }, [r, t, o, e, n, i, c]), U = re(() => {
314
+ !T.current && L.current && (y.current = s.current.editor.createDiffEditor(L.current, { automaticLayout: !0, ...b }), F(), s.current?.editor.setTheme(g), D(!0), T.current = !0);
315
+ }, [b, g, F]);
316
+ return S(() => {
317
+ w && v.current(y.current, s.current);
318
+ }, [w]), S(() => {
319
+ !V && !w && U();
320
+ }, [V, w, U]), C.createElement(ve, { width: P, height: E, isEditorReady: w, loading: O, _ref: L, className: x, wrapperProps: I });
321
+ }), Be = function() {
322
+ let [e, t] = z(G.__getMonacoInstance());
323
+ return oe(() => {
324
+ let r;
325
+ return e || (r = G.init(), r.then((n) => {
326
+ t(n);
327
+ })), () => r?.cancel();
328
+ }), e;
329
+ }, B = /* @__PURE__ */ new Map(), Ne = ne(function({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: o, path: i, theme: c = "light", line: u, loading: f = "Loading...", options: g = {}, overrideServices: O = {}, saveViewState: b = !0, keepCurrentModel: E = !1, width: P = "100%", height: x = "100%", className: I, wrapperProps: H = {}, beforeMount: J = q, onMount: w = q, onChange: D, onValidate: V = q }) {
330
+ let [h, y] = z(!1), [s, L] = z(!0), v = m(null), a = m(null), T = m(null), F = m(w), U = m(J), l = m(), d = m(n), be = function(p) {
331
+ let M = m();
332
+ return S(() => {
333
+ M.current = p;
334
+ }, [p]), M.current;
335
+ }(i), ie = m(!1), K = m(!1);
336
+ oe(() => {
337
+ let p = G.init();
338
+ return p.then((M) => (v.current = M) && L(!1)).catch((M) => M?.type !== "cancelation" && console.error("Monaco initialization: error:", M)), () => a.current ? (l.current?.dispose(), E ? b && B.set(i, a.current.saveViewState()) : a.current.getModel()?.dispose(), void a.current.dispose()) : p.cancel();
339
+ }), j(() => {
340
+ let p = A(v.current, e || n || "", t || o || "", i || r || "");
341
+ p !== a.current?.getModel() && (b && B.set(be, a.current?.saveViewState()), a.current?.setModel(p), b && a.current?.restoreViewState(B.get(i)));
342
+ }, [i], h), j(() => {
343
+ a.current?.updateOptions(g);
344
+ }, [g], h), j(() => {
345
+ !a.current || n === void 0 || (a.current.getOption(v.current.editor.EditorOption.readOnly) ? a.current.setValue(n) : n !== a.current.getValue() && (K.current = !0, a.current.executeEdits("", [{ range: a.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), a.current.pushUndoStop(), K.current = !1));
346
+ }, [n], h), j(() => {
347
+ let p = a.current?.getModel();
348
+ p && o && v.current?.editor.setModelLanguage(p, o);
349
+ }, [o], h), j(() => {
350
+ u !== void 0 && a.current?.revealLine(u);
351
+ }, [u], h), j(() => {
352
+ v.current?.editor.setTheme(c);
353
+ }, [c], h);
354
+ let ce = re(() => {
355
+ if (T.current && v.current && !ie.current) {
356
+ U.current(v.current);
357
+ let p = i || r, M = A(v.current, n || e || "", t || o || "", p || "");
358
+ a.current = v.current?.editor.create(T.current, { model: M, automaticLayout: !0, ...g }, O), b && a.current.restoreViewState(B.get(p)), v.current.editor.setTheme(c), u !== void 0 && a.current.revealLine(u), y(!0), ie.current = !0;
359
+ }
360
+ }, [e, t, r, n, o, i, g, O, b, c, u]);
361
+ return S(() => {
362
+ h && F.current(a.current, v.current);
363
+ }, [h]), S(() => {
364
+ !s && !h && ce();
365
+ }, [s, h, ce]), d.current = n, S(() => {
366
+ h && D && (l.current?.dispose(), l.current = a.current?.onDidChangeModelContent((p) => {
367
+ K.current || D(a.current.getValue(), p);
368
+ }));
369
+ }, [h, D]), S(() => {
370
+ if (h) {
371
+ let p = v.current.editor.onDidChangeMarkers((M) => {
372
+ let Q = a.current.getModel()?.uri;
373
+ if (Q && M.find((W) => W.path === Q.path)) {
374
+ let W = v.current.editor.getModelMarkers({ resource: Q });
375
+ V?.(W);
376
+ }
377
+ });
378
+ return () => {
379
+ p?.dispose();
380
+ };
381
+ }
382
+ return () => {
383
+ };
384
+ }, [h, V]), C.createElement(ve, { width: P, height: x, isEditorReady: h, loading: f, _ref: T, className: I, wrapperProps: H });
385
+ }), Ye = Ne;
386
+ export {
387
+ Ue as DiffEditor,
388
+ Ne as Editor,
389
+ Ye as default,
390
+ G as loader,
391
+ Be as useMonaco
392
+ };