@senyao-design-system/editor 0.0.2 → 0.0.3

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.
package/dist/index.mjs CHANGED
@@ -1,14 +1,15 @@
1
- import * as se from "react";
2
- import et, { forwardRef as Yt, useContext as Wt, useRef as de, useEffect as ie, useMemo as vr, useState as Nr, useCallback as re } from "react";
3
- import { sql as rt } from "@codemirror/lang-sql";
4
- import { json as tt } from "@codemirror/lang-json";
5
- import { keymap as Be, EditorView as te, Decoration as cr, placeholder as jr } from "@codemirror/view";
6
- import { indentWithTab as fr } from "@codemirror/commands";
7
- import { autocompletion as Vt } from "@codemirror/autocomplete";
8
- import { lintGutter as nt, linter as ot } from "@codemirror/lint";
9
- import { StateEffect as Ut, StateField as Gt, EditorState as le } from "@codemirror/state";
10
- import { syntaxHighlighting as Lr, defaultHighlightStyle as Dr } from "@codemirror/language";
11
- var ur = { exports: {} }, Oe = {};
1
+ import * as ce from "react";
2
+ import tt, { forwardRef as Yt, useContext as Vt, useRef as fe, useEffect as se, useMemo as Be, useState as jr, useCallback as Q } from "react";
3
+ import { sql as nt } from "@codemirror/lang-sql";
4
+ import { json as ot } from "@codemirror/lang-json";
5
+ import { keymap as Me, EditorView as te, Decoration as lr, placeholder as Lr, lineNumbers as Wr } from "@codemirror/view";
6
+ import { indentWithTab as dr } from "@codemirror/commands";
7
+ import { autocompletion as Ut } from "@codemirror/autocomplete";
8
+ import { lintGutter as zt, linter as Gt } from "@codemirror/lint";
9
+ import { HighlightStyle as at, syntaxHighlighting as Ke, defaultHighlightStyle as Yr } from "@codemirror/language";
10
+ import { tags as W } from "@lezer/highlight";
11
+ import { StateEffect as qt, StateField as Jt, EditorState as he, Prec as Bt } from "@codemirror/state";
12
+ var hr = { exports: {} }, ke = {};
12
13
  /**
13
14
  * @license React
14
15
  * react-jsx-runtime.production.min.js
@@ -18,21 +19,21 @@ var ur = { exports: {} }, Oe = {};
18
19
  * This source code is licensed under the MIT license found in the
19
20
  * LICENSE file in the root directory of this source tree.
20
21
  */
21
- var Yr;
22
- function qt() {
23
- if (Yr) return Oe;
24
- Yr = 1;
25
- var e = et, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
26
- function c(s, d, p) {
27
- var u, g = {}, _ = null, S = null;
28
- p !== void 0 && (_ = "" + p), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (S = d.ref);
29
- for (u in d) o.call(d, u) && !i.hasOwnProperty(u) && (g[u] = d[u]);
30
- if (s && s.defaultProps) for (u in d = s.defaultProps, d) g[u] === void 0 && (g[u] = d[u]);
31
- return { $$typeof: r, type: s, key: _, ref: S, props: g, _owner: a.current };
22
+ var Vr;
23
+ function Kt() {
24
+ if (Vr) return ke;
25
+ Vr = 1;
26
+ var e = tt, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
27
+ function u(s, f, m) {
28
+ var p, d = {}, P = null, C = null;
29
+ m !== void 0 && (P = "" + m), f.key !== void 0 && (P = "" + f.key), f.ref !== void 0 && (C = f.ref);
30
+ for (p in f) o.call(f, p) && !i.hasOwnProperty(p) && (d[p] = f[p]);
31
+ if (s && s.defaultProps) for (p in f = s.defaultProps, f) d[p] === void 0 && (d[p] = f[p]);
32
+ return { $$typeof: r, type: s, key: P, ref: C, props: d, _owner: a.current };
32
33
  }
33
- return Oe.Fragment = n, Oe.jsx = c, Oe.jsxs = c, Oe;
34
+ return ke.Fragment = n, ke.jsx = u, ke.jsxs = u, ke;
34
35
  }
35
- var Pe = {};
36
+ var $e = {};
36
37
  /**
37
38
  * @license React
38
39
  * react-jsx-runtime.development.js
@@ -42,57 +43,57 @@ var Pe = {};
42
43
  * This source code is licensed under the MIT license found in the
43
44
  * LICENSE file in the root directory of this source tree.
44
45
  */
45
- var Wr;
46
- function Bt() {
47
- return Wr || (Wr = 1, process.env.NODE_ENV !== "production" && function() {
48
- var e = et, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), b = Symbol.iterator, x = "@@iterator";
49
- function D(t) {
46
+ var Ur;
47
+ function Ht() {
48
+ return Ur || (Ur = 1, process.env.NODE_ENV !== "production" && function() {
49
+ var e = tt, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), s = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), x = Symbol.iterator, R = "@@iterator";
50
+ function y(t) {
50
51
  if (t === null || typeof t != "object")
51
52
  return null;
52
- var f = b && t[b] || t[x];
53
- return typeof f == "function" ? f : null;
53
+ var c = x && t[x] || t[R];
54
+ return typeof c == "function" ? c : null;
54
55
  }
55
- var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
56
- function E(t) {
56
+ var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
57
+ function b(t) {
57
58
  {
58
- for (var f = arguments.length, h = new Array(f > 1 ? f - 1 : 0), y = 1; y < f; y++)
59
- h[y - 1] = arguments[y];
60
- k("error", t, h);
59
+ for (var c = arguments.length, h = new Array(c > 1 ? c - 1 : 0), E = 1; E < c; E++)
60
+ h[E - 1] = arguments[E];
61
+ _("error", t, h);
61
62
  }
62
63
  }
63
- function k(t, f, h) {
64
+ function _(t, c, h) {
64
65
  {
65
- var y = w.ReactDebugCurrentFrame, I = y.getStackAddendum();
66
- I !== "" && (f += "%s", h = h.concat([I]));
67
- var L = h.map(function(T) {
68
- return String(T);
66
+ var E = S.ReactDebugCurrentFrame, I = E.getStackAddendum();
67
+ I !== "" && (c += "%s", h = h.concat([I]));
68
+ var Y = h.map(function(O) {
69
+ return String(O);
69
70
  });
70
- L.unshift("Warning: " + f), Function.prototype.apply.call(console[t], console, L);
71
+ Y.unshift("Warning: " + c), Function.prototype.apply.call(console[t], console, Y);
71
72
  }
72
73
  }
73
- var j = !1, l = !1, U = !1, $ = !1, v = !1, R;
74
- R = Symbol.for("react.module.reference");
75
- function O(t) {
76
- return !!(typeof t == "string" || typeof t == "function" || t === o || t === i || v || t === a || t === p || t === u || $ || t === S || j || l || U || typeof t == "object" && t !== null && (t.$$typeof === _ || t.$$typeof === g || t.$$typeof === c || t.$$typeof === s || t.$$typeof === d || // This needs to include all possible module reference object
74
+ var j = !1, l = !1, U = !1, A = !1, Re = !1, g;
75
+ g = Symbol.for("react.module.reference");
76
+ function w(t) {
77
+ return !!(typeof t == "string" || typeof t == "function" || t === o || t === i || Re || t === a || t === m || t === p || A || t === C || j || l || U || typeof t == "object" && t !== null && (t.$$typeof === P || t.$$typeof === d || t.$$typeof === u || t.$$typeof === s || t.$$typeof === f || // This needs to include all possible module reference object
77
78
  // types supported by any Flight configuration anywhere since
78
79
  // we don't know which Flight build this will end up being used
79
80
  // with.
80
- t.$$typeof === R || t.getModuleId !== void 0));
81
+ t.$$typeof === g || t.getModuleId !== void 0));
81
82
  }
82
- function P(t, f, h) {
83
- var y = t.displayName;
84
- if (y)
85
- return y;
86
- var I = f.displayName || f.name || "";
83
+ function $(t, c, h) {
84
+ var E = t.displayName;
85
+ if (E)
86
+ return E;
87
+ var I = c.displayName || c.name || "";
87
88
  return I !== "" ? h + "(" + I + ")" : h;
88
89
  }
89
- function W(t) {
90
+ function k(t) {
90
91
  return t.displayName || "Context";
91
92
  }
92
- function Y(t) {
93
+ function L(t) {
93
94
  if (t == null)
94
95
  return null;
95
- if (typeof t.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
96
+ if (typeof t.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
96
97
  return t.displayName || t.name || null;
97
98
  if (typeof t == "string")
98
99
  return t;
@@ -105,28 +106,28 @@ function Bt() {
105
106
  return "Profiler";
106
107
  case a:
107
108
  return "StrictMode";
108
- case p:
109
+ case m:
109
110
  return "Suspense";
110
- case u:
111
+ case p:
111
112
  return "SuspenseList";
112
113
  }
113
114
  if (typeof t == "object")
114
115
  switch (t.$$typeof) {
115
116
  case s:
116
- var f = t;
117
- return W(f) + ".Consumer";
118
- case c:
117
+ var c = t;
118
+ return k(c) + ".Consumer";
119
+ case u:
119
120
  var h = t;
120
- return W(h._context) + ".Provider";
121
+ return k(h._context) + ".Provider";
122
+ case f:
123
+ return $(t, t.render, "ForwardRef");
121
124
  case d:
122
- return P(t, t.render, "ForwardRef");
123
- case g:
124
- var y = t.displayName || null;
125
- return y !== null ? y : Y(t.type) || "Memo";
126
- case _: {
127
- var I = t, L = I._payload, T = I._init;
125
+ var E = t.displayName || null;
126
+ return E !== null ? E : L(t.type) || "Memo";
127
+ case P: {
128
+ var I = t, Y = I._payload, O = I._init;
128
129
  try {
129
- return Y(T(L));
130
+ return L(O(Y));
130
131
  } catch {
131
132
  return null;
132
133
  }
@@ -134,18 +135,18 @@ function Bt() {
134
135
  }
135
136
  return null;
136
137
  }
137
- var B = Object.assign, Q = 0, Fe, Ne, Se, je, Re, Le, De;
138
- function Ye() {
138
+ var V = Object.assign, K = 0, ie, je, xe, Le, Ce, We, Ye;
139
+ function Ve() {
139
140
  }
140
- Ye.__reactDisabledLog = !0;
141
- function Qe() {
141
+ Ve.__reactDisabledLog = !0;
142
+ function tr() {
142
143
  {
143
- if (Q === 0) {
144
- Fe = console.log, Ne = console.info, Se = console.warn, je = console.error, Re = console.group, Le = console.groupCollapsed, De = console.groupEnd;
144
+ if (K === 0) {
145
+ ie = console.log, je = console.info, xe = console.warn, Le = console.error, Ce = console.group, We = console.groupCollapsed, Ye = console.groupEnd;
145
146
  var t = {
146
147
  configurable: !0,
147
148
  enumerable: !0,
148
- value: Ye,
149
+ value: Ve,
149
150
  writable: !0
150
151
  };
151
152
  Object.defineProperties(console, {
@@ -158,250 +159,250 @@ function Bt() {
158
159
  groupEnd: t
159
160
  });
160
161
  }
161
- Q++;
162
+ K++;
162
163
  }
163
164
  }
164
- function er() {
165
+ function nr() {
165
166
  {
166
- if (Q--, Q === 0) {
167
+ if (K--, K === 0) {
167
168
  var t = {
168
169
  configurable: !0,
169
170
  enumerable: !0,
170
171
  writable: !0
171
172
  };
172
173
  Object.defineProperties(console, {
173
- log: B({}, t, {
174
- value: Fe
175
- }),
176
- info: B({}, t, {
177
- value: Ne
174
+ log: V({}, t, {
175
+ value: ie
178
176
  }),
179
- warn: B({}, t, {
180
- value: Se
181
- }),
182
- error: B({}, t, {
177
+ info: V({}, t, {
183
178
  value: je
184
179
  }),
185
- group: B({}, t, {
186
- value: Re
180
+ warn: V({}, t, {
181
+ value: xe
187
182
  }),
188
- groupCollapsed: B({}, t, {
183
+ error: V({}, t, {
189
184
  value: Le
190
185
  }),
191
- groupEnd: B({}, t, {
192
- value: De
186
+ group: V({}, t, {
187
+ value: Ce
188
+ }),
189
+ groupCollapsed: V({}, t, {
190
+ value: We
191
+ }),
192
+ groupEnd: V({}, t, {
193
+ value: Ye
193
194
  })
194
195
  });
195
196
  }
196
- Q < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
197
+ K < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
197
198
  }
198
199
  }
199
- var Ce = w.ReactCurrentDispatcher, _e;
200
- function he(t, f, h) {
200
+ var _e = S.ReactCurrentDispatcher, we;
201
+ function pe(t, c, h) {
201
202
  {
202
- if (_e === void 0)
203
+ if (we === void 0)
203
204
  try {
204
205
  throw Error();
205
206
  } catch (I) {
206
- var y = I.stack.trim().match(/\n( *(at )?)/);
207
- _e = y && y[1] || "";
207
+ var E = I.stack.trim().match(/\n( *(at )?)/);
208
+ we = E && E[1] || "";
208
209
  }
209
210
  return `
210
- ` + _e + t;
211
+ ` + we + t;
211
212
  }
212
213
  }
213
- var xe = !1, pe;
214
+ var Te = !1, me;
214
215
  {
215
- var rr = typeof WeakMap == "function" ? WeakMap : Map;
216
- pe = new rr();
216
+ var or = typeof WeakMap == "function" ? WeakMap : Map;
217
+ me = new or();
217
218
  }
218
- function m(t, f) {
219
- if (!t || xe)
219
+ function v(t, c) {
220
+ if (!t || Te)
220
221
  return "";
221
222
  {
222
- var h = pe.get(t);
223
+ var h = me.get(t);
223
224
  if (h !== void 0)
224
225
  return h;
225
226
  }
226
- var y;
227
- xe = !0;
227
+ var E;
228
+ Te = !0;
228
229
  var I = Error.prepareStackTrace;
229
230
  Error.prepareStackTrace = void 0;
230
- var L;
231
- L = Ce.current, Ce.current = null, Qe();
231
+ var Y;
232
+ Y = _e.current, _e.current = null, tr();
232
233
  try {
233
- if (f) {
234
- var T = function() {
234
+ if (c) {
235
+ var O = function() {
235
236
  throw Error();
236
237
  };
237
- if (Object.defineProperty(T.prototype, "props", {
238
+ if (Object.defineProperty(O.prototype, "props", {
238
239
  set: function() {
239
240
  throw Error();
240
241
  }
241
242
  }), typeof Reflect == "object" && Reflect.construct) {
242
243
  try {
243
- Reflect.construct(T, []);
244
- } catch (H) {
245
- y = H;
244
+ Reflect.construct(O, []);
245
+ } catch (X) {
246
+ E = X;
246
247
  }
247
- Reflect.construct(t, [], T);
248
+ Reflect.construct(t, [], O);
248
249
  } else {
249
250
  try {
250
- T.call();
251
- } catch (H) {
252
- y = H;
251
+ O.call();
252
+ } catch (X) {
253
+ E = X;
253
254
  }
254
- t.call(T.prototype);
255
+ t.call(O.prototype);
255
256
  }
256
257
  } else {
257
258
  try {
258
259
  throw Error();
259
- } catch (H) {
260
- y = H;
260
+ } catch (X) {
261
+ E = X;
261
262
  }
262
263
  t();
263
264
  }
264
- } catch (H) {
265
- if (H && y && typeof H.stack == "string") {
266
- for (var C = H.stack.split(`
267
- `), K = y.stack.split(`
268
- `), V = C.length - 1, G = K.length - 1; V >= 1 && G >= 0 && C[V] !== K[G]; )
265
+ } catch (X) {
266
+ if (X && E && typeof X.stack == "string") {
267
+ for (var T = X.stack.split(`
268
+ `), H = E.stack.split(`
269
+ `), z = T.length - 1, G = H.length - 1; z >= 1 && G >= 0 && T[z] !== H[G]; )
269
270
  G--;
270
- for (; V >= 1 && G >= 0; V--, G--)
271
- if (C[V] !== K[G]) {
272
- if (V !== 1 || G !== 1)
271
+ for (; z >= 1 && G >= 0; z--, G--)
272
+ if (T[z] !== H[G]) {
273
+ if (z !== 1 || G !== 1)
273
274
  do
274
- if (V--, G--, G < 0 || C[V] !== K[G]) {
275
- var ee = `
276
- ` + C[V].replace(" at new ", " at ");
277
- return t.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", t.displayName)), typeof t == "function" && pe.set(t, ee), ee;
275
+ if (z--, G--, G < 0 || T[z] !== H[G]) {
276
+ var re = `
277
+ ` + T[z].replace(" at new ", " at ");
278
+ return t.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", t.displayName)), typeof t == "function" && me.set(t, re), re;
278
279
  }
279
- while (V >= 1 && G >= 0);
280
+ while (z >= 1 && G >= 0);
280
281
  break;
281
282
  }
282
283
  }
283
284
  } finally {
284
- xe = !1, Ce.current = L, er(), Error.prepareStackTrace = I;
285
+ Te = !1, _e.current = Y, nr(), Error.prepareStackTrace = I;
285
286
  }
286
- var ge = t ? t.displayName || t.name : "", ue = ge ? he(ge) : "";
287
- return typeof t == "function" && pe.set(t, ue), ue;
287
+ var ye = t ? t.displayName || t.name : "", de = ye ? pe(ye) : "";
288
+ return typeof t == "function" && me.set(t, de), de;
288
289
  }
289
- function we(t, f, h) {
290
- return m(t, !1);
290
+ function Pe(t, c, h) {
291
+ return v(t, !1);
291
292
  }
292
- function ve(t) {
293
- var f = t.prototype;
294
- return !!(f && f.isReactComponent);
293
+ function ge(t) {
294
+ var c = t.prototype;
295
+ return !!(c && c.isReactComponent);
295
296
  }
296
- function fe(t, f, h) {
297
+ function le(t, c, h) {
297
298
  if (t == null)
298
299
  return "";
299
300
  if (typeof t == "function")
300
- return m(t, ve(t));
301
+ return v(t, ge(t));
301
302
  if (typeof t == "string")
302
- return he(t);
303
+ return pe(t);
303
304
  switch (t) {
305
+ case m:
306
+ return pe("Suspense");
304
307
  case p:
305
- return he("Suspense");
306
- case u:
307
- return he("SuspenseList");
308
+ return pe("SuspenseList");
308
309
  }
309
310
  if (typeof t == "object")
310
311
  switch (t.$$typeof) {
312
+ case f:
313
+ return Pe(t.render);
311
314
  case d:
312
- return we(t.render);
313
- case g:
314
- return fe(t.type, f, h);
315
- case _: {
316
- var y = t, I = y._payload, L = y._init;
315
+ return le(t.type, c, h);
316
+ case P: {
317
+ var E = t, I = E._payload, Y = E._init;
317
318
  try {
318
- return fe(L(I), f, h);
319
+ return le(Y(I), c, h);
319
320
  } catch {
320
321
  }
321
322
  }
322
323
  }
323
324
  return "";
324
325
  }
325
- var Te = Object.prototype.hasOwnProperty, Rr = {}, Cr = w.ReactDebugCurrentFrame;
326
- function We(t) {
326
+ var Oe = Object.prototype.hasOwnProperty, Cr = {}, _r = S.ReactDebugCurrentFrame;
327
+ function Ue(t) {
327
328
  if (t) {
328
- var f = t._owner, h = fe(t.type, t._source, f ? f.type : null);
329
- Cr.setExtraStackFrame(h);
329
+ var c = t._owner, h = le(t.type, t._source, c ? c.type : null);
330
+ _r.setExtraStackFrame(h);
330
331
  } else
331
- Cr.setExtraStackFrame(null);
332
+ _r.setExtraStackFrame(null);
332
333
  }
333
- function yt(t, f, h, y, I) {
334
+ function bt(t, c, h, E, I) {
334
335
  {
335
- var L = Function.call.bind(Te);
336
- for (var T in t)
337
- if (L(t, T)) {
338
- var C = void 0;
336
+ var Y = Function.call.bind(Oe);
337
+ for (var O in t)
338
+ if (Y(t, O)) {
339
+ var T = void 0;
339
340
  try {
340
- if (typeof t[T] != "function") {
341
- var K = Error((y || "React class") + ": " + h + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
342
- throw K.name = "Invariant Violation", K;
341
+ if (typeof t[O] != "function") {
342
+ var H = Error((E || "React class") + ": " + h + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
343
+ throw H.name = "Invariant Violation", H;
343
344
  }
344
- C = t[T](f, T, y, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
345
- } catch (V) {
346
- C = V;
345
+ T = t[O](c, O, E, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
346
+ } catch (z) {
347
+ T = z;
347
348
  }
348
- C && !(C instanceof Error) && (We(I), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", y || "React class", h, T, typeof C), We(null)), C instanceof Error && !(C.message in Rr) && (Rr[C.message] = !0, We(I), E("Failed %s type: %s", h, C.message), We(null));
349
+ T && !(T instanceof Error) && (Ue(I), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", h, O, typeof T), Ue(null)), T instanceof Error && !(T.message in Cr) && (Cr[T.message] = !0, Ue(I), b("Failed %s type: %s", h, T.message), Ue(null));
349
350
  }
350
351
  }
351
352
  }
352
- var bt = Array.isArray;
353
- function tr(t) {
354
- return bt(t);
353
+ var Et = Array.isArray;
354
+ function ar(t) {
355
+ return Et(t);
355
356
  }
356
- function Et(t) {
357
+ function St(t) {
357
358
  {
358
- var f = typeof Symbol == "function" && Symbol.toStringTag, h = f && t[Symbol.toStringTag] || t.constructor.name || "Object";
359
+ var c = typeof Symbol == "function" && Symbol.toStringTag, h = c && t[Symbol.toStringTag] || t.constructor.name || "Object";
359
360
  return h;
360
361
  }
361
362
  }
362
- function St(t) {
363
+ function Rt(t) {
363
364
  try {
364
- return _r(t), !1;
365
+ return wr(t), !1;
365
366
  } catch {
366
367
  return !0;
367
368
  }
368
369
  }
369
- function _r(t) {
370
+ function wr(t) {
370
371
  return "" + t;
371
372
  }
372
- function xr(t) {
373
- if (St(t))
374
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Et(t)), _r(t);
373
+ function Tr(t) {
374
+ if (Rt(t))
375
+ return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", St(t)), wr(t);
375
376
  }
376
- var wr = w.ReactCurrentOwner, Rt = {
377
+ var Pr = S.ReactCurrentOwner, xt = {
377
378
  key: !0,
378
379
  ref: !0,
379
380
  __self: !0,
380
381
  __source: !0
381
- }, Tr, Or;
382
+ }, Or, kr;
382
383
  function Ct(t) {
383
- if (Te.call(t, "ref")) {
384
- var f = Object.getOwnPropertyDescriptor(t, "ref").get;
385
- if (f && f.isReactWarning)
384
+ if (Oe.call(t, "ref")) {
385
+ var c = Object.getOwnPropertyDescriptor(t, "ref").get;
386
+ if (c && c.isReactWarning)
386
387
  return !1;
387
388
  }
388
389
  return t.ref !== void 0;
389
390
  }
390
391
  function _t(t) {
391
- if (Te.call(t, "key")) {
392
- var f = Object.getOwnPropertyDescriptor(t, "key").get;
393
- if (f && f.isReactWarning)
392
+ if (Oe.call(t, "key")) {
393
+ var c = Object.getOwnPropertyDescriptor(t, "key").get;
394
+ if (c && c.isReactWarning)
394
395
  return !1;
395
396
  }
396
397
  return t.key !== void 0;
397
398
  }
398
- function xt(t, f) {
399
- typeof t.ref == "string" && wr.current;
399
+ function wt(t, c) {
400
+ typeof t.ref == "string" && Pr.current;
400
401
  }
401
- function wt(t, f) {
402
+ function Tt(t, c) {
402
403
  {
403
404
  var h = function() {
404
- Tr || (Tr = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
405
+ Or || (Or = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
405
406
  };
406
407
  h.isReactWarning = !0, Object.defineProperty(t, "key", {
407
408
  get: h,
@@ -409,10 +410,10 @@ function Bt() {
409
410
  });
410
411
  }
411
412
  }
412
- function Tt(t, f) {
413
+ function Pt(t, c) {
413
414
  {
414
415
  var h = function() {
415
- Or || (Or = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
416
+ kr || (kr = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
416
417
  };
417
418
  h.isReactWarning = !0, Object.defineProperty(t, "ref", {
418
419
  get: h,
@@ -420,70 +421,70 @@ function Bt() {
420
421
  });
421
422
  }
422
423
  }
423
- var Ot = function(t, f, h, y, I, L, T) {
424
- var C = {
424
+ var Ot = function(t, c, h, E, I, Y, O) {
425
+ var T = {
425
426
  // This tag allows us to uniquely identify this as a React Element
426
427
  $$typeof: r,
427
428
  // Built-in properties that belong on the element
428
429
  type: t,
429
- key: f,
430
+ key: c,
430
431
  ref: h,
431
- props: T,
432
+ props: O,
432
433
  // Record the component responsible for creating this element.
433
- _owner: L
434
+ _owner: Y
434
435
  };
435
- return C._store = {}, Object.defineProperty(C._store, "validated", {
436
+ return T._store = {}, Object.defineProperty(T._store, "validated", {
436
437
  configurable: !1,
437
438
  enumerable: !1,
438
439
  writable: !0,
439
440
  value: !1
440
- }), Object.defineProperty(C, "_self", {
441
+ }), Object.defineProperty(T, "_self", {
441
442
  configurable: !1,
442
443
  enumerable: !1,
443
444
  writable: !1,
444
- value: y
445
- }), Object.defineProperty(C, "_source", {
445
+ value: E
446
+ }), Object.defineProperty(T, "_source", {
446
447
  configurable: !1,
447
448
  enumerable: !1,
448
449
  writable: !1,
449
450
  value: I
450
- }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
451
+ }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
451
452
  };
452
- function Pt(t, f, h, y, I) {
453
+ function kt(t, c, h, E, I) {
453
454
  {
454
- var L, T = {}, C = null, K = null;
455
- h !== void 0 && (xr(h), C = "" + h), _t(f) && (xr(f.key), C = "" + f.key), Ct(f) && (K = f.ref, xt(f, I));
456
- for (L in f)
457
- Te.call(f, L) && !Rt.hasOwnProperty(L) && (T[L] = f[L]);
455
+ var Y, O = {}, T = null, H = null;
456
+ h !== void 0 && (Tr(h), T = "" + h), _t(c) && (Tr(c.key), T = "" + c.key), Ct(c) && (H = c.ref, wt(c, I));
457
+ for (Y in c)
458
+ Oe.call(c, Y) && !xt.hasOwnProperty(Y) && (O[Y] = c[Y]);
458
459
  if (t && t.defaultProps) {
459
- var V = t.defaultProps;
460
- for (L in V)
461
- T[L] === void 0 && (T[L] = V[L]);
460
+ var z = t.defaultProps;
461
+ for (Y in z)
462
+ O[Y] === void 0 && (O[Y] = z[Y]);
462
463
  }
463
- if (C || K) {
464
+ if (T || H) {
464
465
  var G = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
465
- C && wt(T, G), K && Tt(T, G);
466
+ T && Tt(O, G), H && Pt(O, G);
466
467
  }
467
- return Ot(t, C, K, I, y, wr.current, T);
468
+ return Ot(t, T, H, I, E, Pr.current, O);
468
469
  }
469
470
  }
470
- var nr = w.ReactCurrentOwner, Pr = w.ReactDebugCurrentFrame;
471
- function me(t) {
471
+ var ir = S.ReactCurrentOwner, $r = S.ReactDebugCurrentFrame;
472
+ function ve(t) {
472
473
  if (t) {
473
- var f = t._owner, h = fe(t.type, t._source, f ? f.type : null);
474
- Pr.setExtraStackFrame(h);
474
+ var c = t._owner, h = le(t.type, t._source, c ? c.type : null);
475
+ $r.setExtraStackFrame(h);
475
476
  } else
476
- Pr.setExtraStackFrame(null);
477
+ $r.setExtraStackFrame(null);
477
478
  }
478
- var or;
479
- or = !1;
480
- function ar(t) {
479
+ var sr;
480
+ sr = !1;
481
+ function cr(t) {
481
482
  return typeof t == "object" && t !== null && t.$$typeof === r;
482
483
  }
483
- function kr() {
484
+ function Ar() {
484
485
  {
485
- if (nr.current) {
486
- var t = Y(nr.current.type);
486
+ if (ir.current) {
487
+ var t = L(ir.current.type);
487
488
  if (t)
488
489
  return `
489
490
 
@@ -492,160 +493,160 @@ Check the render method of \`` + t + "`.";
492
493
  return "";
493
494
  }
494
495
  }
495
- function kt(t) {
496
+ function $t(t) {
496
497
  return "";
497
498
  }
498
- var $r = {};
499
- function $t(t) {
499
+ var Mr = {};
500
+ function At(t) {
500
501
  {
501
- var f = kr();
502
- if (!f) {
502
+ var c = Ar();
503
+ if (!c) {
503
504
  var h = typeof t == "string" ? t : t.displayName || t.name;
504
- h && (f = `
505
+ h && (c = `
505
506
 
506
507
  Check the top-level render call using <` + h + ">.");
507
508
  }
508
- return f;
509
+ return c;
509
510
  }
510
511
  }
511
- function Ar(t, f) {
512
+ function Nr(t, c) {
512
513
  {
513
514
  if (!t._store || t._store.validated || t.key != null)
514
515
  return;
515
516
  t._store.validated = !0;
516
- var h = $t(f);
517
- if ($r[h])
517
+ var h = At(c);
518
+ if (Mr[h])
518
519
  return;
519
- $r[h] = !0;
520
- var y = "";
521
- t && t._owner && t._owner !== nr.current && (y = " It was passed a child from " + Y(t._owner.type) + "."), me(t), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, y), me(null);
520
+ Mr[h] = !0;
521
+ var E = "";
522
+ t && t._owner && t._owner !== ir.current && (E = " It was passed a child from " + L(t._owner.type) + "."), ve(t), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, E), ve(null);
522
523
  }
523
524
  }
524
- function Mr(t, f) {
525
+ function Ir(t, c) {
525
526
  {
526
527
  if (typeof t != "object")
527
528
  return;
528
- if (tr(t))
529
+ if (ar(t))
529
530
  for (var h = 0; h < t.length; h++) {
530
- var y = t[h];
531
- ar(y) && Ar(y, f);
531
+ var E = t[h];
532
+ cr(E) && Nr(E, c);
532
533
  }
533
- else if (ar(t))
534
+ else if (cr(t))
534
535
  t._store && (t._store.validated = !0);
535
536
  else if (t) {
536
- var I = D(t);
537
+ var I = y(t);
537
538
  if (typeof I == "function" && I !== t.entries)
538
- for (var L = I.call(t), T; !(T = L.next()).done; )
539
- ar(T.value) && Ar(T.value, f);
539
+ for (var Y = I.call(t), O; !(O = Y.next()).done; )
540
+ cr(O.value) && Nr(O.value, c);
540
541
  }
541
542
  }
542
543
  }
543
- function At(t) {
544
+ function Mt(t) {
544
545
  {
545
- var f = t.type;
546
- if (f == null || typeof f == "string")
546
+ var c = t.type;
547
+ if (c == null || typeof c == "string")
547
548
  return;
548
549
  var h;
549
- if (typeof f == "function")
550
- h = f.propTypes;
551
- else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
550
+ if (typeof c == "function")
551
+ h = c.propTypes;
552
+ else if (typeof c == "object" && (c.$$typeof === f || // Note: Memo only checks outer props here.
552
553
  // Inner props are checked in the reconciler.
553
- f.$$typeof === g))
554
- h = f.propTypes;
554
+ c.$$typeof === d))
555
+ h = c.propTypes;
555
556
  else
556
557
  return;
557
558
  if (h) {
558
- var y = Y(f);
559
- yt(h, t.props, "prop", y, t);
560
- } else if (f.PropTypes !== void 0 && !or) {
561
- or = !0;
562
- var I = Y(f);
563
- E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
559
+ var E = L(c);
560
+ bt(h, t.props, "prop", E, t);
561
+ } else if (c.PropTypes !== void 0 && !sr) {
562
+ sr = !0;
563
+ var I = L(c);
564
+ b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
564
565
  }
565
- typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
566
+ typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
566
567
  }
567
568
  }
568
- function Mt(t) {
569
+ function Nt(t) {
569
570
  {
570
- for (var f = Object.keys(t.props), h = 0; h < f.length; h++) {
571
- var y = f[h];
572
- if (y !== "children" && y !== "key") {
573
- me(t), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), me(null);
571
+ for (var c = Object.keys(t.props), h = 0; h < c.length; h++) {
572
+ var E = c[h];
573
+ if (E !== "children" && E !== "key") {
574
+ ve(t), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), ve(null);
574
575
  break;
575
576
  }
576
577
  }
577
- t.ref !== null && (me(t), E("Invalid attribute `ref` supplied to `React.Fragment`."), me(null));
578
+ t.ref !== null && (ve(t), b("Invalid attribute `ref` supplied to `React.Fragment`."), ve(null));
578
579
  }
579
580
  }
580
- var Ir = {};
581
- function Fr(t, f, h, y, I, L) {
581
+ var Fr = {};
582
+ function Dr(t, c, h, E, I, Y) {
582
583
  {
583
- var T = O(t);
584
- if (!T) {
585
- var C = "";
586
- (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
587
- var K = kt();
588
- K ? C += K : C += kr();
589
- var V;
590
- t === null ? V = "null" : tr(t) ? V = "array" : t !== void 0 && t.$$typeof === r ? (V = "<" + (Y(t.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : V = typeof t, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, C);
584
+ var O = w(t);
585
+ if (!O) {
586
+ var T = "";
587
+ (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
588
+ var H = $t();
589
+ H ? T += H : T += Ar();
590
+ var z;
591
+ t === null ? z = "null" : ar(t) ? z = "array" : t !== void 0 && t.$$typeof === r ? (z = "<" + (L(t.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : z = typeof t, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", z, T);
591
592
  }
592
- var G = Pt(t, f, h, I, L);
593
+ var G = kt(t, c, h, I, Y);
593
594
  if (G == null)
594
595
  return G;
595
- if (T) {
596
- var ee = f.children;
597
- if (ee !== void 0)
598
- if (y)
599
- if (tr(ee)) {
600
- for (var ge = 0; ge < ee.length; ge++)
601
- Mr(ee[ge], t);
602
- Object.freeze && Object.freeze(ee);
596
+ if (O) {
597
+ var re = c.children;
598
+ if (re !== void 0)
599
+ if (E)
600
+ if (ar(re)) {
601
+ for (var ye = 0; ye < re.length; ye++)
602
+ Ir(re[ye], t);
603
+ Object.freeze && Object.freeze(re);
603
604
  } else
604
- E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
605
+ b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
605
606
  else
606
- Mr(ee, t);
607
+ Ir(re, t);
607
608
  }
608
- if (Te.call(f, "key")) {
609
- var ue = Y(t), H = Object.keys(f).filter(function(Dt) {
610
- return Dt !== "key";
611
- }), ir = H.length > 0 ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}";
612
- if (!Ir[ue + ir]) {
613
- var Lt = H.length > 0 ? "{" + H.join(": ..., ") + ": ...}" : "{}";
614
- E(`A props object containing a "key" prop is being spread into JSX:
609
+ if (Oe.call(c, "key")) {
610
+ var de = L(t), X = Object.keys(c).filter(function(Wt) {
611
+ return Wt !== "key";
612
+ }), fr = X.length > 0 ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}";
613
+ if (!Fr[de + fr]) {
614
+ var Lt = X.length > 0 ? "{" + X.join(": ..., ") + ": ...}" : "{}";
615
+ b(`A props object containing a "key" prop is being spread into JSX:
615
616
  let props = %s;
616
617
  <%s {...props} />
617
618
  React keys must be passed directly to JSX without using spread:
618
619
  let props = %s;
619
- <%s key={someKey} {...props} />`, ir, ue, Lt, ue), Ir[ue + ir] = !0;
620
+ <%s key={someKey} {...props} />`, fr, de, Lt, de), Fr[de + fr] = !0;
620
621
  }
621
622
  }
622
- return t === o ? Mt(G) : At(G), G;
623
+ return t === o ? Nt(G) : Mt(G), G;
623
624
  }
624
625
  }
625
- function It(t, f, h) {
626
- return Fr(t, f, h, !0);
626
+ function It(t, c, h) {
627
+ return Dr(t, c, h, !0);
627
628
  }
628
- function Ft(t, f, h) {
629
- return Fr(t, f, h, !1);
629
+ function Ft(t, c, h) {
630
+ return Dr(t, c, h, !1);
630
631
  }
631
- var Nt = Ft, jt = It;
632
- Pe.Fragment = o, Pe.jsx = Nt, Pe.jsxs = jt;
633
- }()), Pe;
632
+ var Dt = Ft, jt = It;
633
+ $e.Fragment = o, $e.jsx = Dt, $e.jsxs = jt;
634
+ }()), $e;
634
635
  }
635
- process.env.NODE_ENV === "production" ? ur.exports = qt() : ur.exports = Bt();
636
- var Vr = ur.exports;
637
- function Jt(e) {
636
+ process.env.NODE_ENV === "production" ? hr.exports = Kt() : hr.exports = Ht();
637
+ var zr = hr.exports;
638
+ function Xt(e) {
638
639
  if (e.sheet)
639
640
  return e.sheet;
640
641
  for (var r = 0; r < document.styleSheets.length; r++)
641
642
  if (document.styleSheets[r].ownerNode === e)
642
643
  return document.styleSheets[r];
643
644
  }
644
- function zt(e) {
645
+ function Zt(e) {
645
646
  var r = document.createElement("style");
646
647
  return r.setAttribute("data-emotion", e.key), e.nonce !== void 0 && r.setAttribute("nonce", e.nonce), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r;
647
648
  }
648
- var Kt = /* @__PURE__ */ function() {
649
+ var Qt = /* @__PURE__ */ function() {
649
650
  function e(n) {
650
651
  var o = this;
651
652
  this._insertTag = function(a) {
@@ -657,10 +658,10 @@ var Kt = /* @__PURE__ */ function() {
657
658
  return r.hydrate = function(o) {
658
659
  o.forEach(this._insertTag);
659
660
  }, r.insert = function(o) {
660
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(zt(this));
661
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Zt(this));
661
662
  var a = this.tags[this.tags.length - 1];
662
663
  if (this.isSpeedy) {
663
- var i = Jt(a);
664
+ var i = Xt(a);
664
665
  try {
665
666
  i.insertRule(o, i.cssRules.length);
666
667
  } catch {
@@ -674,66 +675,66 @@ var Kt = /* @__PURE__ */ function() {
674
675
  return (a = o.parentNode) == null ? void 0 : a.removeChild(o);
675
676
  }), this.tags = [], this.ctr = 0;
676
677
  }, e;
677
- }(), z = "-ms-", Je = "-moz-", A = "-webkit-", at = "comm", mr = "rule", gr = "decl", Ht = "@import", it = "@keyframes", Xt = "@layer", Zt = Math.abs, Ke = String.fromCharCode, Qt = Object.assign;
678
- function en(e, r) {
678
+ }(), B = "-ms-", He = "-moz-", M = "-webkit-", it = "comm", yr = "rule", br = "decl", en = "@import", st = "@keyframes", rn = "@layer", tn = Math.abs, Ze = String.fromCharCode, nn = Object.assign;
679
+ function on(e, r) {
679
680
  return J(e, 0) ^ 45 ? (((r << 2 ^ J(e, 0)) << 2 ^ J(e, 1)) << 2 ^ J(e, 2)) << 2 ^ J(e, 3) : 0;
680
681
  }
681
- function st(e) {
682
+ function ct(e) {
682
683
  return e.trim();
683
684
  }
684
- function rn(e, r) {
685
+ function an(e, r) {
685
686
  return (e = r.exec(e)) ? e[0] : e;
686
687
  }
687
- function M(e, r, n) {
688
+ function N(e, r, n) {
688
689
  return e.replace(r, n);
689
690
  }
690
- function lr(e, r) {
691
+ function pr(e, r) {
691
692
  return e.indexOf(r);
692
693
  }
693
694
  function J(e, r) {
694
695
  return e.charCodeAt(r) | 0;
695
696
  }
696
- function $e(e, r, n) {
697
+ function Ne(e, r, n) {
697
698
  return e.slice(r, n);
698
699
  }
699
700
  function ne(e) {
700
701
  return e.length;
701
702
  }
702
- function yr(e) {
703
+ function Er(e) {
703
704
  return e.length;
704
705
  }
705
- function Ve(e, r) {
706
+ function ze(e, r) {
706
707
  return r.push(e), e;
707
708
  }
708
- function tn(e, r) {
709
+ function sn(e, r) {
709
710
  return e.map(r).join("");
710
711
  }
711
- var He = 1, be = 1, ct = 0, X = 0, q = 0, Ee = "";
712
- function Xe(e, r, n, o, a, i, c) {
713
- return { value: e, root: r, parent: n, type: o, props: a, children: i, line: He, column: be, length: c, return: "" };
712
+ var Qe = 1, Ee = 1, ft = 0, Z = 0, q = 0, Se = "";
713
+ function er(e, r, n, o, a, i, u) {
714
+ return { value: e, root: r, parent: n, type: o, props: a, children: i, line: Qe, column: Ee, length: u, return: "" };
714
715
  }
715
- function ke(e, r) {
716
- return Qt(Xe("", null, null, "", null, null, 0), e, { length: -e.length }, r);
716
+ function Ae(e, r) {
717
+ return nn(er("", null, null, "", null, null, 0), e, { length: -e.length }, r);
717
718
  }
718
- function nn() {
719
+ function cn() {
719
720
  return q;
720
721
  }
721
- function on() {
722
- return q = X > 0 ? J(Ee, --X) : 0, be--, q === 10 && (be = 1, He--), q;
722
+ function fn() {
723
+ return q = Z > 0 ? J(Se, --Z) : 0, Ee--, q === 10 && (Ee = 1, Qe--), q;
723
724
  }
724
- function Z() {
725
- return q = X < ct ? J(Ee, X++) : 0, be++, q === 10 && (be = 1, He++), q;
725
+ function ee() {
726
+ return q = Z < ft ? J(Se, Z++) : 0, Ee++, q === 10 && (Ee = 1, Qe++), q;
726
727
  }
727
728
  function ae() {
728
- return J(Ee, X);
729
+ return J(Se, Z);
729
730
  }
730
- function Ue() {
731
- return X;
731
+ function Ge() {
732
+ return Z;
732
733
  }
733
- function Ie(e, r) {
734
- return $e(Ee, e, r);
734
+ function De(e, r) {
735
+ return Ne(Se, e, r);
735
736
  }
736
- function Ae(e) {
737
+ function Ie(e) {
737
738
  switch (e) {
738
739
  case 0:
739
740
  case 9:
@@ -765,211 +766,211 @@ function Ae(e) {
765
766
  }
766
767
  return 0;
767
768
  }
768
- function ft(e) {
769
- return He = be = 1, ct = ne(Ee = e), X = 0, [];
770
- }
771
769
  function ut(e) {
772
- return Ee = "", e;
770
+ return Qe = Ee = 1, ft = ne(Se = e), Z = 0, [];
771
+ }
772
+ function lt(e) {
773
+ return Se = "", e;
773
774
  }
774
- function Ge(e) {
775
- return st(Ie(X - 1, dr(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
775
+ function qe(e) {
776
+ return ct(De(Z - 1, mr(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
776
777
  }
777
- function an(e) {
778
+ function un(e) {
778
779
  for (; (q = ae()) && q < 33; )
779
- Z();
780
- return Ae(e) > 2 || Ae(q) > 3 ? "" : " ";
780
+ ee();
781
+ return Ie(e) > 2 || Ie(q) > 3 ? "" : " ";
781
782
  }
782
- function sn(e, r) {
783
- for (; --r && Z() && !(q < 48 || q > 102 || q > 57 && q < 65 || q > 70 && q < 97); )
783
+ function ln(e, r) {
784
+ for (; --r && ee() && !(q < 48 || q > 102 || q > 57 && q < 65 || q > 70 && q < 97); )
784
785
  ;
785
- return Ie(e, Ue() + (r < 6 && ae() == 32 && Z() == 32));
786
+ return De(e, Ge() + (r < 6 && ae() == 32 && ee() == 32));
786
787
  }
787
- function dr(e) {
788
- for (; Z(); )
788
+ function mr(e) {
789
+ for (; ee(); )
789
790
  switch (q) {
790
791
  case e:
791
- return X;
792
+ return Z;
792
793
  case 34:
793
794
  case 39:
794
- e !== 34 && e !== 39 && dr(q);
795
+ e !== 34 && e !== 39 && mr(q);
795
796
  break;
796
797
  case 40:
797
- e === 41 && dr(e);
798
+ e === 41 && mr(e);
798
799
  break;
799
800
  case 92:
800
- Z();
801
+ ee();
801
802
  break;
802
803
  }
803
- return X;
804
+ return Z;
804
805
  }
805
- function cn(e, r) {
806
- for (; Z() && e + q !== 57; )
806
+ function dn(e, r) {
807
+ for (; ee() && e + q !== 57; )
807
808
  if (e + q === 84 && ae() === 47)
808
809
  break;
809
- return "/*" + Ie(r, X - 1) + "*" + Ke(e === 47 ? e : Z());
810
+ return "/*" + De(r, Z - 1) + "*" + Ze(e === 47 ? e : ee());
810
811
  }
811
- function fn(e) {
812
- for (; !Ae(ae()); )
813
- Z();
814
- return Ie(e, X);
812
+ function hn(e) {
813
+ for (; !Ie(ae()); )
814
+ ee();
815
+ return De(e, Z);
815
816
  }
816
- function un(e) {
817
- return ut(qe("", null, null, null, [""], e = ft(e), 0, [0], e));
817
+ function pn(e) {
818
+ return lt(Je("", null, null, null, [""], e = ut(e), 0, [0], e));
818
819
  }
819
- function qe(e, r, n, o, a, i, c, s, d) {
820
- for (var p = 0, u = 0, g = c, _ = 0, S = 0, b = 0, x = 1, D = 1, w = 1, E = 0, k = "", j = a, l = i, U = o, $ = k; D; )
821
- switch (b = E, E = Z()) {
820
+ function Je(e, r, n, o, a, i, u, s, f) {
821
+ for (var m = 0, p = 0, d = u, P = 0, C = 0, x = 0, R = 1, y = 1, S = 1, b = 0, _ = "", j = a, l = i, U = o, A = _; y; )
822
+ switch (x = b, b = ee()) {
822
823
  case 40:
823
- if (b != 108 && J($, g - 1) == 58) {
824
- lr($ += M(Ge(E), "&", "&\f"), "&\f") != -1 && (w = -1);
824
+ if (x != 108 && J(A, d - 1) == 58) {
825
+ pr(A += N(qe(b), "&", "&\f"), "&\f") != -1 && (S = -1);
825
826
  break;
826
827
  }
827
828
  case 34:
828
829
  case 39:
829
830
  case 91:
830
- $ += Ge(E);
831
+ A += qe(b);
831
832
  break;
832
833
  case 9:
833
834
  case 10:
834
835
  case 13:
835
836
  case 32:
836
- $ += an(b);
837
+ A += un(x);
837
838
  break;
838
839
  case 92:
839
- $ += sn(Ue() - 1, 7);
840
+ A += ln(Ge() - 1, 7);
840
841
  continue;
841
842
  case 47:
842
843
  switch (ae()) {
843
844
  case 42:
844
845
  case 47:
845
- Ve(ln(cn(Z(), Ue()), r, n), d);
846
+ ze(mn(dn(ee(), Ge()), r, n), f);
846
847
  break;
847
848
  default:
848
- $ += "/";
849
+ A += "/";
849
850
  }
850
851
  break;
851
- case 123 * x:
852
- s[p++] = ne($) * w;
853
- case 125 * x:
852
+ case 123 * R:
853
+ s[m++] = ne(A) * S;
854
+ case 125 * R:
854
855
  case 59:
855
856
  case 0:
856
- switch (E) {
857
+ switch (b) {
857
858
  case 0:
858
859
  case 125:
859
- D = 0;
860
- case 59 + u:
861
- w == -1 && ($ = M($, /\f/g, "")), S > 0 && ne($) - g && Ve(S > 32 ? Gr($ + ";", o, n, g - 1) : Gr(M($, " ", "") + ";", o, n, g - 2), d);
860
+ y = 0;
861
+ case 59 + p:
862
+ S == -1 && (A = N(A, /\f/g, "")), C > 0 && ne(A) - d && ze(C > 32 ? qr(A + ";", o, n, d - 1) : qr(N(A, " ", "") + ";", o, n, d - 2), f);
862
863
  break;
863
864
  case 59:
864
- $ += ";";
865
+ A += ";";
865
866
  default:
866
- if (Ve(U = Ur($, r, n, p, u, a, s, k, j = [], l = [], g), i), E === 123)
867
- if (u === 0)
868
- qe($, r, U, U, j, i, g, s, l);
867
+ if (ze(U = Gr(A, r, n, m, p, a, s, _, j = [], l = [], d), i), b === 123)
868
+ if (p === 0)
869
+ Je(A, r, U, U, j, i, d, s, l);
869
870
  else
870
- switch (_ === 99 && J($, 3) === 110 ? 100 : _) {
871
+ switch (P === 99 && J(A, 3) === 110 ? 100 : P) {
871
872
  case 100:
872
873
  case 108:
873
874
  case 109:
874
875
  case 115:
875
- qe(e, U, U, o && Ve(Ur(e, U, U, 0, 0, a, s, k, a, j = [], g), l), a, l, g, s, o ? j : l);
876
+ Je(e, U, U, o && ze(Gr(e, U, U, 0, 0, a, s, _, a, j = [], d), l), a, l, d, s, o ? j : l);
876
877
  break;
877
878
  default:
878
- qe($, U, U, U, [""], l, 0, s, l);
879
+ Je(A, U, U, U, [""], l, 0, s, l);
879
880
  }
880
881
  }
881
- p = u = S = 0, x = w = 1, k = $ = "", g = c;
882
+ m = p = C = 0, R = S = 1, _ = A = "", d = u;
882
883
  break;
883
884
  case 58:
884
- g = 1 + ne($), S = b;
885
+ d = 1 + ne(A), C = x;
885
886
  default:
886
- if (x < 1) {
887
- if (E == 123)
888
- --x;
889
- else if (E == 125 && x++ == 0 && on() == 125)
887
+ if (R < 1) {
888
+ if (b == 123)
889
+ --R;
890
+ else if (b == 125 && R++ == 0 && fn() == 125)
890
891
  continue;
891
892
  }
892
- switch ($ += Ke(E), E * x) {
893
+ switch (A += Ze(b), b * R) {
893
894
  case 38:
894
- w = u > 0 ? 1 : ($ += "\f", -1);
895
+ S = p > 0 ? 1 : (A += "\f", -1);
895
896
  break;
896
897
  case 44:
897
- s[p++] = (ne($) - 1) * w, w = 1;
898
+ s[m++] = (ne(A) - 1) * S, S = 1;
898
899
  break;
899
900
  case 64:
900
- ae() === 45 && ($ += Ge(Z())), _ = ae(), u = g = ne(k = $ += fn(Ue())), E++;
901
+ ae() === 45 && (A += qe(ee())), P = ae(), p = d = ne(_ = A += hn(Ge())), b++;
901
902
  break;
902
903
  case 45:
903
- b === 45 && ne($) == 2 && (x = 0);
904
+ x === 45 && ne(A) == 2 && (R = 0);
904
905
  }
905
906
  }
906
907
  return i;
907
908
  }
908
- function Ur(e, r, n, o, a, i, c, s, d, p, u) {
909
- for (var g = a - 1, _ = a === 0 ? i : [""], S = yr(_), b = 0, x = 0, D = 0; b < o; ++b)
910
- for (var w = 0, E = $e(e, g + 1, g = Zt(x = c[b])), k = e; w < S; ++w)
911
- (k = st(x > 0 ? _[w] + " " + E : M(E, /&\f/g, _[w]))) && (d[D++] = k);
912
- return Xe(e, r, n, a === 0 ? mr : s, d, p, u);
909
+ function Gr(e, r, n, o, a, i, u, s, f, m, p) {
910
+ for (var d = a - 1, P = a === 0 ? i : [""], C = Er(P), x = 0, R = 0, y = 0; x < o; ++x)
911
+ for (var S = 0, b = Ne(e, d + 1, d = tn(R = u[x])), _ = e; S < C; ++S)
912
+ (_ = ct(R > 0 ? P[S] + " " + b : N(b, /&\f/g, P[S]))) && (f[y++] = _);
913
+ return er(e, r, n, a === 0 ? yr : s, f, m, p);
913
914
  }
914
- function ln(e, r, n) {
915
- return Xe(e, r, n, at, Ke(nn()), $e(e, 2, -2), 0);
915
+ function mn(e, r, n) {
916
+ return er(e, r, n, it, Ze(cn()), Ne(e, 2, -2), 0);
916
917
  }
917
- function Gr(e, r, n, o) {
918
- return Xe(e, r, n, gr, $e(e, 0, o), $e(e, o + 1, -1), o);
918
+ function qr(e, r, n, o) {
919
+ return er(e, r, n, br, Ne(e, 0, o), Ne(e, o + 1, -1), o);
919
920
  }
920
- function ye(e, r) {
921
- for (var n = "", o = yr(e), a = 0; a < o; a++)
921
+ function be(e, r) {
922
+ for (var n = "", o = Er(e), a = 0; a < o; a++)
922
923
  n += r(e[a], a, e, r) || "";
923
924
  return n;
924
925
  }
925
- function dn(e, r, n, o) {
926
+ function gn(e, r, n, o) {
926
927
  switch (e.type) {
927
- case Xt:
928
+ case rn:
928
929
  if (e.children.length) break;
929
- case Ht:
930
- case gr:
930
+ case en:
931
+ case br:
931
932
  return e.return = e.return || e.value;
932
- case at:
933
- return "";
934
933
  case it:
935
- return e.return = e.value + "{" + ye(e.children, o) + "}";
936
- case mr:
934
+ return "";
935
+ case st:
936
+ return e.return = e.value + "{" + be(e.children, o) + "}";
937
+ case yr:
937
938
  e.value = e.props.join(",");
938
939
  }
939
- return ne(n = ye(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
940
+ return ne(n = be(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
940
941
  }
941
- function hn(e) {
942
- var r = yr(e);
942
+ function vn(e) {
943
+ var r = Er(e);
943
944
  return function(n, o, a, i) {
944
- for (var c = "", s = 0; s < r; s++)
945
- c += e[s](n, o, a, i) || "";
946
- return c;
945
+ for (var u = "", s = 0; s < r; s++)
946
+ u += e[s](n, o, a, i) || "";
947
+ return u;
947
948
  };
948
949
  }
949
- function pn(e) {
950
+ function yn(e) {
950
951
  return function(r) {
951
952
  r.root || (r = r.return) && e(r);
952
953
  };
953
954
  }
954
- function vn(e) {
955
+ function bn(e) {
955
956
  var r = /* @__PURE__ */ Object.create(null);
956
957
  return function(n) {
957
958
  return r[n] === void 0 && (r[n] = e(n)), r[n];
958
959
  };
959
960
  }
960
- var mn = function(r, n, o) {
961
- for (var a = 0, i = 0; a = i, i = ae(), a === 38 && i === 12 && (n[o] = 1), !Ae(i); )
962
- Z();
963
- return Ie(r, X);
964
- }, gn = function(r, n) {
961
+ var En = function(r, n, o) {
962
+ for (var a = 0, i = 0; a = i, i = ae(), a === 38 && i === 12 && (n[o] = 1), !Ie(i); )
963
+ ee();
964
+ return De(r, Z);
965
+ }, Sn = function(r, n) {
965
966
  var o = -1, a = 44;
966
967
  do
967
- switch (Ae(a)) {
968
+ switch (Ie(a)) {
968
969
  case 0:
969
- a === 38 && ae() === 12 && (n[o] = 1), r[o] += mn(X - 1, n, o);
970
+ a === 38 && ae() === 12 && (n[o] = 1), r[o] += En(Z - 1, n, o);
970
971
  break;
971
972
  case 2:
972
- r[o] += Ge(a);
973
+ r[o] += qe(a);
973
974
  break;
974
975
  case 4:
975
976
  if (a === 44) {
@@ -977,26 +978,26 @@ var mn = function(r, n, o) {
977
978
  break;
978
979
  }
979
980
  default:
980
- r[o] += Ke(a);
981
+ r[o] += Ze(a);
981
982
  }
982
- while (a = Z());
983
+ while (a = ee());
983
984
  return r;
984
- }, yn = function(r, n) {
985
- return ut(gn(ft(r), n));
986
- }, qr = /* @__PURE__ */ new WeakMap(), bn = function(r) {
985
+ }, Rn = function(r, n) {
986
+ return lt(Sn(ut(r), n));
987
+ }, Jr = /* @__PURE__ */ new WeakMap(), xn = function(r) {
987
988
  if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo
988
989
  // negative .length indicates that this rule has been already prefixed
989
990
  r.length < 1)) {
990
991
  for (var n = r.value, o = r.parent, a = r.column === o.column && r.line === o.line; o.type !== "rule"; )
991
992
  if (o = o.parent, !o) return;
992
- if (!(r.props.length === 1 && n.charCodeAt(0) !== 58 && !qr.get(o)) && !a) {
993
- qr.set(r, !0);
994
- for (var i = [], c = yn(n, i), s = o.props, d = 0, p = 0; d < c.length; d++)
995
- for (var u = 0; u < s.length; u++, p++)
996
- r.props[p] = i[d] ? c[d].replace(/&\f/g, s[u]) : s[u] + " " + c[d];
993
+ if (!(r.props.length === 1 && n.charCodeAt(0) !== 58 && !Jr.get(o)) && !a) {
994
+ Jr.set(r, !0);
995
+ for (var i = [], u = Rn(n, i), s = o.props, f = 0, m = 0; f < u.length; f++)
996
+ for (var p = 0; p < s.length; p++, m++)
997
+ r.props[m] = i[f] ? u[f].replace(/&\f/g, s[p]) : s[p] + " " + u[f];
997
998
  }
998
999
  }
999
- }, En = function(r) {
1000
+ }, Cn = function(r) {
1000
1001
  if (r.type === "decl") {
1001
1002
  var n = r.value;
1002
1003
  // charcode for l
@@ -1004,10 +1005,10 @@ var mn = function(r, n, o) {
1004
1005
  n.charCodeAt(2) === 98 && (r.return = "", r.value = "");
1005
1006
  }
1006
1007
  };
1007
- function lt(e, r) {
1008
- switch (en(e, r)) {
1008
+ function dt(e, r) {
1009
+ switch (on(e, r)) {
1009
1010
  case 5103:
1010
- return A + "print-" + e + e;
1011
+ return M + "print-" + e + e;
1011
1012
  case 5737:
1012
1013
  case 4201:
1013
1014
  case 3177:
@@ -1033,44 +1034,44 @@ function lt(e, r) {
1033
1034
  case 5365:
1034
1035
  case 5621:
1035
1036
  case 3829:
1036
- return A + e + e;
1037
+ return M + e + e;
1037
1038
  case 5349:
1038
1039
  case 4246:
1039
1040
  case 4810:
1040
1041
  case 6968:
1041
1042
  case 2756:
1042
- return A + e + Je + e + z + e + e;
1043
+ return M + e + He + e + B + e + e;
1043
1044
  case 6828:
1044
1045
  case 4268:
1045
- return A + e + z + e + e;
1046
+ return M + e + B + e + e;
1046
1047
  case 6165:
1047
- return A + e + z + "flex-" + e + e;
1048
+ return M + e + B + "flex-" + e + e;
1048
1049
  case 5187:
1049
- return A + e + M(e, /(\w+).+(:[^]+)/, A + "box-$1$2" + z + "flex-$1$2") + e;
1050
+ return M + e + N(e, /(\w+).+(:[^]+)/, M + "box-$1$2" + B + "flex-$1$2") + e;
1050
1051
  case 5443:
1051
- return A + e + z + "flex-item-" + M(e, /flex-|-self/, "") + e;
1052
+ return M + e + B + "flex-item-" + N(e, /flex-|-self/, "") + e;
1052
1053
  case 4675:
1053
- return A + e + z + "flex-line-pack" + M(e, /align-content|flex-|-self/, "") + e;
1054
+ return M + e + B + "flex-line-pack" + N(e, /align-content|flex-|-self/, "") + e;
1054
1055
  case 5548:
1055
- return A + e + z + M(e, "shrink", "negative") + e;
1056
+ return M + e + B + N(e, "shrink", "negative") + e;
1056
1057
  case 5292:
1057
- return A + e + z + M(e, "basis", "preferred-size") + e;
1058
+ return M + e + B + N(e, "basis", "preferred-size") + e;
1058
1059
  case 6060:
1059
- return A + "box-" + M(e, "-grow", "") + A + e + z + M(e, "grow", "positive") + e;
1060
+ return M + "box-" + N(e, "-grow", "") + M + e + B + N(e, "grow", "positive") + e;
1060
1061
  case 4554:
1061
- return A + M(e, /([^-])(transform)/g, "$1" + A + "$2") + e;
1062
+ return M + N(e, /([^-])(transform)/g, "$1" + M + "$2") + e;
1062
1063
  case 6187:
1063
- return M(M(M(e, /(zoom-|grab)/, A + "$1"), /(image-set)/, A + "$1"), e, "") + e;
1064
+ return N(N(N(e, /(zoom-|grab)/, M + "$1"), /(image-set)/, M + "$1"), e, "") + e;
1064
1065
  case 5495:
1065
1066
  case 3959:
1066
- return M(e, /(image-set\([^]*)/, A + "$1$`$1");
1067
+ return N(e, /(image-set\([^]*)/, M + "$1$`$1");
1067
1068
  case 4968:
1068
- return M(M(e, /(.+:)(flex-)?(.*)/, A + "box-pack:$3" + z + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + A + e + e;
1069
+ return N(N(e, /(.+:)(flex-)?(.*)/, M + "box-pack:$3" + B + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + M + e + e;
1069
1070
  case 4095:
1070
1071
  case 3583:
1071
1072
  case 4068:
1072
1073
  case 2532:
1073
- return M(e, /(.+)-inline(.+)/, A + "$1$2") + e;
1074
+ return N(e, /(.+)-inline(.+)/, M + "$1$2") + e;
1074
1075
  case 8116:
1075
1076
  case 7059:
1076
1077
  case 5753:
@@ -1087,99 +1088,99 @@ function lt(e, r) {
1087
1088
  case 109:
1088
1089
  if (J(e, r + 4) !== 45) break;
1089
1090
  case 102:
1090
- return M(e, /(.+:)(.+)-([^]+)/, "$1" + A + "$2-$3$1" + Je + (J(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
1091
+ return N(e, /(.+:)(.+)-([^]+)/, "$1" + M + "$2-$3$1" + He + (J(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
1091
1092
  case 115:
1092
- return ~lr(e, "stretch") ? lt(M(e, "stretch", "fill-available"), r) + e : e;
1093
+ return ~pr(e, "stretch") ? dt(N(e, "stretch", "fill-available"), r) + e : e;
1093
1094
  }
1094
1095
  break;
1095
1096
  case 4949:
1096
1097
  if (J(e, r + 1) !== 115) break;
1097
1098
  case 6444:
1098
- switch (J(e, ne(e) - 3 - (~lr(e, "!important") && 10))) {
1099
+ switch (J(e, ne(e) - 3 - (~pr(e, "!important") && 10))) {
1099
1100
  case 107:
1100
- return M(e, ":", ":" + A) + e;
1101
+ return N(e, ":", ":" + M) + e;
1101
1102
  case 101:
1102
- return M(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + A + (J(e, 14) === 45 ? "inline-" : "") + "box$3$1" + A + "$2$3$1" + z + "$2box$3") + e;
1103
+ return N(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + M + (J(e, 14) === 45 ? "inline-" : "") + "box$3$1" + M + "$2$3$1" + B + "$2box$3") + e;
1103
1104
  }
1104
1105
  break;
1105
1106
  case 5936:
1106
1107
  switch (J(e, r + 11)) {
1107
1108
  case 114:
1108
- return A + e + z + M(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
1109
+ return M + e + B + N(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
1109
1110
  case 108:
1110
- return A + e + z + M(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
1111
+ return M + e + B + N(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
1111
1112
  case 45:
1112
- return A + e + z + M(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
1113
+ return M + e + B + N(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
1113
1114
  }
1114
- return A + e + z + e + e;
1115
+ return M + e + B + e + e;
1115
1116
  }
1116
1117
  return e;
1117
1118
  }
1118
- var Sn = function(r, n, o, a) {
1119
+ var _n = function(r, n, o, a) {
1119
1120
  if (r.length > -1 && !r.return) switch (r.type) {
1120
- case gr:
1121
- r.return = lt(r.value, r.length);
1121
+ case br:
1122
+ r.return = dt(r.value, r.length);
1122
1123
  break;
1123
- case it:
1124
- return ye([ke(r, {
1125
- value: M(r.value, "@", "@" + A)
1124
+ case st:
1125
+ return be([Ae(r, {
1126
+ value: N(r.value, "@", "@" + M)
1126
1127
  })], a);
1127
- case mr:
1128
- if (r.length) return tn(r.props, function(i) {
1129
- switch (rn(i, /(::plac\w+|:read-\w+)/)) {
1128
+ case yr:
1129
+ if (r.length) return sn(r.props, function(i) {
1130
+ switch (an(i, /(::plac\w+|:read-\w+)/)) {
1130
1131
  case ":read-only":
1131
1132
  case ":read-write":
1132
- return ye([ke(r, {
1133
- props: [M(i, /:(read-\w+)/, ":" + Je + "$1")]
1133
+ return be([Ae(r, {
1134
+ props: [N(i, /:(read-\w+)/, ":" + He + "$1")]
1134
1135
  })], a);
1135
1136
  case "::placeholder":
1136
- return ye([ke(r, {
1137
- props: [M(i, /:(plac\w+)/, ":" + A + "input-$1")]
1138
- }), ke(r, {
1139
- props: [M(i, /:(plac\w+)/, ":" + Je + "$1")]
1140
- }), ke(r, {
1141
- props: [M(i, /:(plac\w+)/, z + "input-$1")]
1137
+ return be([Ae(r, {
1138
+ props: [N(i, /:(plac\w+)/, ":" + M + "input-$1")]
1139
+ }), Ae(r, {
1140
+ props: [N(i, /:(plac\w+)/, ":" + He + "$1")]
1141
+ }), Ae(r, {
1142
+ props: [N(i, /:(plac\w+)/, B + "input-$1")]
1142
1143
  })], a);
1143
1144
  }
1144
1145
  return "";
1145
1146
  });
1146
1147
  }
1147
- }, Rn = [Sn], Cn = function(r) {
1148
+ }, wn = [_n], Tn = function(r) {
1148
1149
  var n = r.key;
1149
1150
  if (n === "css") {
1150
1151
  var o = document.querySelectorAll("style[data-emotion]:not([data-s])");
1151
- Array.prototype.forEach.call(o, function(x) {
1152
- var D = x.getAttribute("data-emotion");
1153
- D.indexOf(" ") !== -1 && (document.head.appendChild(x), x.setAttribute("data-s", ""));
1152
+ Array.prototype.forEach.call(o, function(R) {
1153
+ var y = R.getAttribute("data-emotion");
1154
+ y.indexOf(" ") !== -1 && (document.head.appendChild(R), R.setAttribute("data-s", ""));
1154
1155
  });
1155
1156
  }
1156
- var a = r.stylisPlugins || Rn, i = {}, c, s = [];
1157
- c = r.container || document.head, Array.prototype.forEach.call(
1157
+ var a = r.stylisPlugins || wn, i = {}, u, s = [];
1158
+ u = r.container || document.head, Array.prototype.forEach.call(
1158
1159
  // this means we will ignore elements which don't have a space in them which
1159
1160
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
1160
1161
  document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
1161
- function(x) {
1162
- for (var D = x.getAttribute("data-emotion").split(" "), w = 1; w < D.length; w++)
1163
- i[D[w]] = !0;
1164
- s.push(x);
1162
+ function(R) {
1163
+ for (var y = R.getAttribute("data-emotion").split(" "), S = 1; S < y.length; S++)
1164
+ i[y[S]] = !0;
1165
+ s.push(R);
1165
1166
  }
1166
1167
  );
1167
- var d, p = [bn, En];
1168
+ var f, m = [xn, Cn];
1168
1169
  {
1169
- var u, g = [dn, pn(function(x) {
1170
- u.insert(x);
1171
- })], _ = hn(p.concat(a, g)), S = function(D) {
1172
- return ye(un(D), _);
1170
+ var p, d = [gn, yn(function(R) {
1171
+ p.insert(R);
1172
+ })], P = vn(m.concat(a, d)), C = function(y) {
1173
+ return be(pn(y), P);
1173
1174
  };
1174
- d = function(D, w, E, k) {
1175
- u = E, S(D ? D + "{" + w.styles + "}" : w.styles), k && (b.inserted[w.name] = !0);
1175
+ f = function(y, S, b, _) {
1176
+ p = b, C(y ? y + "{" + S.styles + "}" : S.styles), _ && (x.inserted[S.name] = !0);
1176
1177
  };
1177
1178
  }
1178
- var b = {
1179
+ var x = {
1179
1180
  key: n,
1180
- sheet: new Kt({
1181
+ sheet: new Qt({
1181
1182
  key: n,
1182
- container: c,
1183
+ container: u,
1183
1184
  nonce: r.nonce,
1184
1185
  speedy: r.speedy,
1185
1186
  prepend: r.prepend,
@@ -1188,10 +1189,10 @@ var Sn = function(r, n, o, a) {
1188
1189
  nonce: r.nonce,
1189
1190
  inserted: i,
1190
1191
  registered: {},
1191
- insert: d
1192
+ insert: f
1192
1193
  };
1193
- return b.sheet.hydrate(s), b;
1194
- }, hr = { exports: {} }, F = {};
1194
+ return x.sheet.hydrate(s), x;
1195
+ }, gr = { exports: {} }, F = {};
1195
1196
  /** @license React v16.13.1
1196
1197
  * react-is.production.min.js
1197
1198
  *
@@ -1201,30 +1202,30 @@ var Sn = function(r, n, o, a) {
1201
1202
  * LICENSE file in the root directory of this source tree.
1202
1203
  */
1203
1204
  var Br;
1204
- function _n() {
1205
+ function Pn() {
1205
1206
  if (Br) return F;
1206
1207
  Br = 1;
1207
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, _ = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, b = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
1208
- function k(l) {
1208
+ var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, u = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, P = e ? Symbol.for("react.suspense_list") : 60120, C = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, R = e ? Symbol.for("react.block") : 60121, y = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119;
1209
+ function _(l) {
1209
1210
  if (typeof l == "object" && l !== null) {
1210
1211
  var U = l.$$typeof;
1211
1212
  switch (U) {
1212
1213
  case r:
1213
1214
  switch (l = l.type, l) {
1214
- case d:
1215
- case p:
1215
+ case f:
1216
+ case m:
1216
1217
  case o:
1217
1218
  case i:
1218
1219
  case a:
1219
- case g:
1220
+ case d:
1220
1221
  return l;
1221
1222
  default:
1222
1223
  switch (l = l && l.$$typeof, l) {
1223
1224
  case s:
1225
+ case p:
1226
+ case x:
1227
+ case C:
1224
1228
  case u:
1225
- case b:
1226
- case S:
1227
- case c:
1228
1229
  return l;
1229
1230
  default:
1230
1231
  return U;
@@ -1236,37 +1237,37 @@ function _n() {
1236
1237
  }
1237
1238
  }
1238
1239
  function j(l) {
1239
- return k(l) === p;
1240
+ return _(l) === m;
1240
1241
  }
1241
- return F.AsyncMode = d, F.ConcurrentMode = p, F.ContextConsumer = s, F.ContextProvider = c, F.Element = r, F.ForwardRef = u, F.Fragment = o, F.Lazy = b, F.Memo = S, F.Portal = n, F.Profiler = i, F.StrictMode = a, F.Suspense = g, F.isAsyncMode = function(l) {
1242
- return j(l) || k(l) === d;
1242
+ return F.AsyncMode = f, F.ConcurrentMode = m, F.ContextConsumer = s, F.ContextProvider = u, F.Element = r, F.ForwardRef = p, F.Fragment = o, F.Lazy = x, F.Memo = C, F.Portal = n, F.Profiler = i, F.StrictMode = a, F.Suspense = d, F.isAsyncMode = function(l) {
1243
+ return j(l) || _(l) === f;
1243
1244
  }, F.isConcurrentMode = j, F.isContextConsumer = function(l) {
1244
- return k(l) === s;
1245
+ return _(l) === s;
1245
1246
  }, F.isContextProvider = function(l) {
1246
- return k(l) === c;
1247
+ return _(l) === u;
1247
1248
  }, F.isElement = function(l) {
1248
1249
  return typeof l == "object" && l !== null && l.$$typeof === r;
1249
1250
  }, F.isForwardRef = function(l) {
1250
- return k(l) === u;
1251
+ return _(l) === p;
1251
1252
  }, F.isFragment = function(l) {
1252
- return k(l) === o;
1253
+ return _(l) === o;
1253
1254
  }, F.isLazy = function(l) {
1254
- return k(l) === b;
1255
+ return _(l) === x;
1255
1256
  }, F.isMemo = function(l) {
1256
- return k(l) === S;
1257
+ return _(l) === C;
1257
1258
  }, F.isPortal = function(l) {
1258
- return k(l) === n;
1259
+ return _(l) === n;
1259
1260
  }, F.isProfiler = function(l) {
1260
- return k(l) === i;
1261
+ return _(l) === i;
1261
1262
  }, F.isStrictMode = function(l) {
1262
- return k(l) === a;
1263
+ return _(l) === a;
1263
1264
  }, F.isSuspense = function(l) {
1264
- return k(l) === g;
1265
+ return _(l) === d;
1265
1266
  }, F.isValidElementType = function(l) {
1266
- return typeof l == "string" || typeof l == "function" || l === o || l === p || l === i || l === a || l === g || l === _ || typeof l == "object" && l !== null && (l.$$typeof === b || l.$$typeof === S || l.$$typeof === c || l.$$typeof === s || l.$$typeof === u || l.$$typeof === D || l.$$typeof === w || l.$$typeof === E || l.$$typeof === x);
1267
- }, F.typeOf = k, F;
1267
+ return typeof l == "string" || typeof l == "function" || l === o || l === m || l === i || l === a || l === d || l === P || typeof l == "object" && l !== null && (l.$$typeof === x || l.$$typeof === C || l.$$typeof === u || l.$$typeof === s || l.$$typeof === p || l.$$typeof === y || l.$$typeof === S || l.$$typeof === b || l.$$typeof === R);
1268
+ }, F.typeOf = _, F;
1268
1269
  }
1269
- var N = {};
1270
+ var D = {};
1270
1271
  /** @license React v16.13.1
1271
1272
  * react-is.development.js
1272
1273
  *
@@ -1275,114 +1276,114 @@ var N = {};
1275
1276
  * This source code is licensed under the MIT license found in the
1276
1277
  * LICENSE file in the root directory of this source tree.
1277
1278
  */
1278
- var Jr;
1279
- function xn() {
1280
- return Jr || (Jr = 1, process.env.NODE_ENV !== "production" && function() {
1281
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, _ = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, b = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
1282
- function k(m) {
1283
- return typeof m == "string" || typeof m == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1284
- m === o || m === p || m === i || m === a || m === g || m === _ || typeof m == "object" && m !== null && (m.$$typeof === b || m.$$typeof === S || m.$$typeof === c || m.$$typeof === s || m.$$typeof === u || m.$$typeof === D || m.$$typeof === w || m.$$typeof === E || m.$$typeof === x);
1285
- }
1286
- function j(m) {
1287
- if (typeof m == "object" && m !== null) {
1288
- var we = m.$$typeof;
1289
- switch (we) {
1279
+ var Kr;
1280
+ function On() {
1281
+ return Kr || (Kr = 1, process.env.NODE_ENV !== "production" && function() {
1282
+ var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, u = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, P = e ? Symbol.for("react.suspense_list") : 60120, C = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, R = e ? Symbol.for("react.block") : 60121, y = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119;
1283
+ function _(v) {
1284
+ return typeof v == "string" || typeof v == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1285
+ v === o || v === m || v === i || v === a || v === d || v === P || typeof v == "object" && v !== null && (v.$$typeof === x || v.$$typeof === C || v.$$typeof === u || v.$$typeof === s || v.$$typeof === p || v.$$typeof === y || v.$$typeof === S || v.$$typeof === b || v.$$typeof === R);
1286
+ }
1287
+ function j(v) {
1288
+ if (typeof v == "object" && v !== null) {
1289
+ var Pe = v.$$typeof;
1290
+ switch (Pe) {
1290
1291
  case r:
1291
- var ve = m.type;
1292
- switch (ve) {
1293
- case d:
1294
- case p:
1292
+ var ge = v.type;
1293
+ switch (ge) {
1294
+ case f:
1295
+ case m:
1295
1296
  case o:
1296
1297
  case i:
1297
1298
  case a:
1298
- case g:
1299
- return ve;
1299
+ case d:
1300
+ return ge;
1300
1301
  default:
1301
- var fe = ve && ve.$$typeof;
1302
- switch (fe) {
1302
+ var le = ge && ge.$$typeof;
1303
+ switch (le) {
1303
1304
  case s:
1305
+ case p:
1306
+ case x:
1307
+ case C:
1304
1308
  case u:
1305
- case b:
1306
- case S:
1307
- case c:
1308
- return fe;
1309
+ return le;
1309
1310
  default:
1310
- return we;
1311
+ return Pe;
1311
1312
  }
1312
1313
  }
1313
1314
  case n:
1314
- return we;
1315
+ return Pe;
1315
1316
  }
1316
1317
  }
1317
1318
  }
1318
- var l = d, U = p, $ = s, v = c, R = r, O = u, P = o, W = b, Y = S, B = n, Q = i, Fe = a, Ne = g, Se = !1;
1319
- function je(m) {
1320
- return Se || (Se = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Re(m) || j(m) === d;
1319
+ var l = f, U = m, A = s, Re = u, g = r, w = p, $ = o, k = x, L = C, V = n, K = i, ie = a, je = d, xe = !1;
1320
+ function Le(v) {
1321
+ return xe || (xe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Ce(v) || j(v) === f;
1321
1322
  }
1322
- function Re(m) {
1323
- return j(m) === p;
1323
+ function Ce(v) {
1324
+ return j(v) === m;
1324
1325
  }
1325
- function Le(m) {
1326
- return j(m) === s;
1326
+ function We(v) {
1327
+ return j(v) === s;
1327
1328
  }
1328
- function De(m) {
1329
- return j(m) === c;
1329
+ function Ye(v) {
1330
+ return j(v) === u;
1330
1331
  }
1331
- function Ye(m) {
1332
- return typeof m == "object" && m !== null && m.$$typeof === r;
1332
+ function Ve(v) {
1333
+ return typeof v == "object" && v !== null && v.$$typeof === r;
1333
1334
  }
1334
- function Qe(m) {
1335
- return j(m) === u;
1335
+ function tr(v) {
1336
+ return j(v) === p;
1336
1337
  }
1337
- function er(m) {
1338
- return j(m) === o;
1338
+ function nr(v) {
1339
+ return j(v) === o;
1339
1340
  }
1340
- function Ce(m) {
1341
- return j(m) === b;
1341
+ function _e(v) {
1342
+ return j(v) === x;
1342
1343
  }
1343
- function _e(m) {
1344
- return j(m) === S;
1344
+ function we(v) {
1345
+ return j(v) === C;
1345
1346
  }
1346
- function he(m) {
1347
- return j(m) === n;
1347
+ function pe(v) {
1348
+ return j(v) === n;
1348
1349
  }
1349
- function xe(m) {
1350
- return j(m) === i;
1350
+ function Te(v) {
1351
+ return j(v) === i;
1351
1352
  }
1352
- function pe(m) {
1353
- return j(m) === a;
1353
+ function me(v) {
1354
+ return j(v) === a;
1354
1355
  }
1355
- function rr(m) {
1356
- return j(m) === g;
1356
+ function or(v) {
1357
+ return j(v) === d;
1357
1358
  }
1358
- N.AsyncMode = l, N.ConcurrentMode = U, N.ContextConsumer = $, N.ContextProvider = v, N.Element = R, N.ForwardRef = O, N.Fragment = P, N.Lazy = W, N.Memo = Y, N.Portal = B, N.Profiler = Q, N.StrictMode = Fe, N.Suspense = Ne, N.isAsyncMode = je, N.isConcurrentMode = Re, N.isContextConsumer = Le, N.isContextProvider = De, N.isElement = Ye, N.isForwardRef = Qe, N.isFragment = er, N.isLazy = Ce, N.isMemo = _e, N.isPortal = he, N.isProfiler = xe, N.isStrictMode = pe, N.isSuspense = rr, N.isValidElementType = k, N.typeOf = j;
1359
- }()), N;
1359
+ D.AsyncMode = l, D.ConcurrentMode = U, D.ContextConsumer = A, D.ContextProvider = Re, D.Element = g, D.ForwardRef = w, D.Fragment = $, D.Lazy = k, D.Memo = L, D.Portal = V, D.Profiler = K, D.StrictMode = ie, D.Suspense = je, D.isAsyncMode = Le, D.isConcurrentMode = Ce, D.isContextConsumer = We, D.isContextProvider = Ye, D.isElement = Ve, D.isForwardRef = tr, D.isFragment = nr, D.isLazy = _e, D.isMemo = we, D.isPortal = pe, D.isProfiler = Te, D.isStrictMode = me, D.isSuspense = or, D.isValidElementType = _, D.typeOf = j;
1360
+ }()), D;
1360
1361
  }
1361
- process.env.NODE_ENV === "production" ? hr.exports = _n() : hr.exports = xn();
1362
- var wn = hr.exports, dt = wn, Tn = {
1362
+ process.env.NODE_ENV === "production" ? gr.exports = Pn() : gr.exports = On();
1363
+ var kn = gr.exports, ht = kn, $n = {
1363
1364
  $$typeof: !0,
1364
1365
  render: !0,
1365
1366
  defaultProps: !0,
1366
1367
  displayName: !0,
1367
1368
  propTypes: !0
1368
- }, On = {
1369
+ }, An = {
1369
1370
  $$typeof: !0,
1370
1371
  compare: !0,
1371
1372
  defaultProps: !0,
1372
1373
  displayName: !0,
1373
1374
  propTypes: !0,
1374
1375
  type: !0
1375
- }, ht = {};
1376
- ht[dt.ForwardRef] = Tn;
1377
- ht[dt.Memo] = On;
1378
- var Pn = !0;
1379
- function kn(e, r, n) {
1376
+ }, pt = {};
1377
+ pt[ht.ForwardRef] = $n;
1378
+ pt[ht.Memo] = An;
1379
+ var Mn = !0;
1380
+ function Nn(e, r, n) {
1380
1381
  var o = "";
1381
1382
  return n.split(" ").forEach(function(a) {
1382
1383
  e[a] !== void 0 ? r.push(e[a] + ";") : a && (o += a + " ");
1383
1384
  }), o;
1384
1385
  }
1385
- var pt = function(r, n, o) {
1386
+ var mt = function(r, n, o) {
1386
1387
  var a = r.key + "-" + n.name;
1387
1388
  // we only need to add the styles to the registered cache if the
1388
1389
  // class name could be used further down
@@ -1393,9 +1394,9 @@ var pt = function(r, n, o) {
1393
1394
  // in node since emotion-server relies on whether a style is in
1394
1395
  // the registered cache to know whether a style is global or not
1395
1396
  // also, note that this check will be dead code eliminated in the browser
1396
- Pn === !1) && r.registered[a] === void 0 && (r.registered[a] = n.styles);
1397
- }, $n = function(r, n, o) {
1398
- pt(r, n, o);
1397
+ Mn === !1) && r.registered[a] === void 0 && (r.registered[a] = n.styles);
1398
+ }, In = function(r, n, o) {
1399
+ mt(r, n, o);
1399
1400
  var a = r.key + "-" + n.name;
1400
1401
  if (r.inserted[n.name] === void 0) {
1401
1402
  var i = n;
@@ -1404,7 +1405,7 @@ var pt = function(r, n, o) {
1404
1405
  while (i !== void 0);
1405
1406
  }
1406
1407
  };
1407
- function An(e) {
1408
+ function Fn(e) {
1408
1409
  for (var r = 0, n, o = 0, a = e.length; a >= 4; ++o, a -= 4)
1409
1410
  n = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, n = /* Math.imul(k, m): */
1410
1411
  (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
@@ -1423,7 +1424,7 @@ function An(e) {
1423
1424
  return r ^= r >>> 13, r = /* Math.imul(h, m): */
1424
1425
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36);
1425
1426
  }
1426
- var Mn = {
1427
+ var Dn = {
1427
1428
  animationIterationCount: 1,
1428
1429
  aspectRatio: 1,
1429
1430
  borderImageOutset: 1,
@@ -1472,18 +1473,18 @@ var Mn = {
1472
1473
  strokeMiterlimit: 1,
1473
1474
  strokeOpacity: 1,
1474
1475
  strokeWidth: 1
1475
- }, In = /[A-Z]|^ms/g, Fn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, vt = function(r) {
1476
+ }, jn = /[A-Z]|^ms/g, Ln = /_EMO_([^_]+?)_([^]*?)_EMO_/g, gt = function(r) {
1476
1477
  return r.charCodeAt(1) === 45;
1477
- }, zr = function(r) {
1478
+ }, Hr = function(r) {
1478
1479
  return r != null && typeof r != "boolean";
1479
- }, sr = /* @__PURE__ */ vn(function(e) {
1480
- return vt(e) ? e : e.replace(In, "-$&").toLowerCase();
1481
- }), Kr = function(r, n) {
1480
+ }, ur = /* @__PURE__ */ bn(function(e) {
1481
+ return gt(e) ? e : e.replace(jn, "-$&").toLowerCase();
1482
+ }), Xr = function(r, n) {
1482
1483
  switch (r) {
1483
1484
  case "animation":
1484
1485
  case "animationName":
1485
1486
  if (typeof n == "string")
1486
- return n.replace(Fn, function(o, a, i) {
1487
+ return n.replace(Ln, function(o, a, i) {
1487
1488
  return oe = {
1488
1489
  name: a,
1489
1490
  styles: i,
@@ -1491,9 +1492,9 @@ var Mn = {
1491
1492
  }, a;
1492
1493
  });
1493
1494
  }
1494
- return Mn[r] !== 1 && !vt(r) && typeof n == "number" && n !== 0 ? n + "px" : n;
1495
+ return Dn[r] !== 1 && !gt(r) && typeof n == "number" && n !== 0 ? n + "px" : n;
1495
1496
  };
1496
- function Me(e, r, n) {
1497
+ function Fe(e, r, n) {
1497
1498
  if (n == null)
1498
1499
  return "";
1499
1500
  var o = n;
@@ -1512,190 +1513,312 @@ function Me(e, r, n) {
1512
1513
  }, a.name;
1513
1514
  var i = n;
1514
1515
  if (i.styles !== void 0) {
1515
- var c = i.next;
1516
- if (c !== void 0)
1517
- for (; c !== void 0; )
1516
+ var u = i.next;
1517
+ if (u !== void 0)
1518
+ for (; u !== void 0; )
1518
1519
  oe = {
1519
- name: c.name,
1520
- styles: c.styles,
1520
+ name: u.name,
1521
+ styles: u.styles,
1521
1522
  next: oe
1522
- }, c = c.next;
1523
+ }, u = u.next;
1523
1524
  var s = i.styles + ";";
1524
1525
  return s;
1525
1526
  }
1526
- return Nn(e, r, n);
1527
+ return Wn(e, r, n);
1527
1528
  }
1528
1529
  case "function": {
1529
1530
  if (e !== void 0) {
1530
- var d = oe, p = n(e);
1531
- return oe = d, Me(e, r, p);
1531
+ var f = oe, m = n(e);
1532
+ return oe = f, Fe(e, r, m);
1532
1533
  }
1533
1534
  break;
1534
1535
  }
1535
1536
  }
1536
- var u = n;
1537
- return u;
1537
+ var p = n;
1538
+ return p;
1538
1539
  }
1539
- function Nn(e, r, n) {
1540
+ function Wn(e, r, n) {
1540
1541
  var o = "";
1541
1542
  if (Array.isArray(n))
1542
1543
  for (var a = 0; a < n.length; a++)
1543
- o += Me(e, r, n[a]) + ";";
1544
+ o += Fe(e, r, n[a]) + ";";
1544
1545
  else
1545
1546
  for (var i in n) {
1546
- var c = n[i];
1547
- if (typeof c != "object") {
1548
- var s = c;
1549
- zr(s) && (o += sr(i) + ":" + Kr(i, s) + ";");
1550
- } else if (Array.isArray(c) && typeof c[0] == "string" && r == null)
1551
- for (var d = 0; d < c.length; d++)
1552
- zr(c[d]) && (o += sr(i) + ":" + Kr(i, c[d]) + ";");
1547
+ var u = n[i];
1548
+ if (typeof u != "object") {
1549
+ var s = u;
1550
+ Hr(s) && (o += ur(i) + ":" + Xr(i, s) + ";");
1551
+ } else if (Array.isArray(u) && typeof u[0] == "string" && r == null)
1552
+ for (var f = 0; f < u.length; f++)
1553
+ Hr(u[f]) && (o += ur(i) + ":" + Xr(i, u[f]) + ";");
1553
1554
  else {
1554
- var p = Me(e, r, c);
1555
+ var m = Fe(e, r, u);
1555
1556
  switch (i) {
1556
1557
  case "animation":
1557
1558
  case "animationName": {
1558
- o += sr(i) + ":" + p + ";";
1559
+ o += ur(i) + ":" + m + ";";
1559
1560
  break;
1560
1561
  }
1561
1562
  default:
1562
- o += i + "{" + p + "}";
1563
+ o += i + "{" + m + "}";
1563
1564
  }
1564
1565
  }
1565
1566
  }
1566
1567
  return o;
1567
1568
  }
1568
- var Hr = /label:\s*([^\s;{]+)\s*(;|$)/g, oe;
1569
- function jn(e, r, n) {
1569
+ var Zr = /label:\s*([^\s;{]+)\s*(;|$)/g, oe;
1570
+ function Yn(e, r, n) {
1570
1571
  if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
1571
1572
  return e[0];
1572
1573
  var o = !0, a = "";
1573
1574
  oe = void 0;
1574
1575
  var i = e[0];
1575
1576
  if (i == null || i.raw === void 0)
1576
- o = !1, a += Me(n, r, i);
1577
+ o = !1, a += Fe(n, r, i);
1577
1578
  else {
1578
- var c = i;
1579
- a += c[0];
1579
+ var u = i;
1580
+ a += u[0];
1580
1581
  }
1581
1582
  for (var s = 1; s < e.length; s++)
1582
- if (a += Me(n, r, e[s]), o) {
1583
- var d = i;
1584
- a += d[s];
1585
- }
1586
- Hr.lastIndex = 0;
1587
- for (var p = "", u; (u = Hr.exec(a)) !== null; )
1588
- p += "-" + u[1];
1589
- var g = An(a) + p;
1583
+ if (a += Fe(n, r, e[s]), o) {
1584
+ var f = i;
1585
+ a += f[s];
1586
+ }
1587
+ Zr.lastIndex = 0;
1588
+ for (var m = "", p; (p = Zr.exec(a)) !== null; )
1589
+ m += "-" + p[1];
1590
+ var d = Fn(a) + m;
1590
1591
  return {
1591
- name: g,
1592
+ name: d,
1592
1593
  styles: a,
1593
1594
  next: oe
1594
1595
  };
1595
1596
  }
1596
- var Ln = function(r) {
1597
+ var Vn = function(r) {
1597
1598
  return r();
1598
- }, Dn = se.useInsertionEffect ? se.useInsertionEffect : !1, Yn = Dn || Ln, mt = /* @__PURE__ */ se.createContext(
1599
+ }, Un = ce.useInsertionEffect ? ce.useInsertionEffect : !1, zn = Un || Vn, vt = /* @__PURE__ */ ce.createContext(
1599
1600
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1600
1601
  // because this module is primarily intended for the browser and node
1601
1602
  // but it's also required in react native and similar environments sometimes
1602
1603
  // and we could have a special build just for that
1603
1604
  // but this is much easier and the native packages
1604
1605
  // might use a different theme context in the future anyway
1605
- typeof HTMLElement < "u" ? /* @__PURE__ */ Cn({
1606
+ typeof HTMLElement < "u" ? /* @__PURE__ */ Tn({
1606
1607
  key: "css"
1607
1608
  }) : null
1608
1609
  );
1609
- mt.Provider;
1610
- var Wn = function(r) {
1610
+ vt.Provider;
1611
+ var Gn = function(r) {
1611
1612
  return /* @__PURE__ */ Yt(function(n, o) {
1612
- var a = Wt(mt);
1613
+ var a = Vt(vt);
1613
1614
  return r(n, a, o);
1614
1615
  });
1615
- }, Vn = /* @__PURE__ */ se.createContext({}), br = {}.hasOwnProperty, pr = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Un = function(r, n) {
1616
+ }, qn = /* @__PURE__ */ ce.createContext({}), Sr = {}.hasOwnProperty, vr = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Jn = function(r, n) {
1616
1617
  var o = {};
1617
1618
  for (var a in n)
1618
- br.call(n, a) && (o[a] = n[a]);
1619
- return o[pr] = r, o;
1620
- }, Gn = function(r) {
1619
+ Sr.call(n, a) && (o[a] = n[a]);
1620
+ return o[vr] = r, o;
1621
+ }, Bn = function(r) {
1621
1622
  var n = r.cache, o = r.serialized, a = r.isStringTag;
1622
- return pt(n, o, a), Yn(function() {
1623
- return $n(n, o, a);
1623
+ return mt(n, o, a), zn(function() {
1624
+ return In(n, o, a);
1624
1625
  }), null;
1625
- }, qn = /* @__PURE__ */ Wn(function(e, r, n) {
1626
+ }, Kn = /* @__PURE__ */ Gn(function(e, r, n) {
1626
1627
  var o = e.css;
1627
1628
  typeof o == "string" && r.registered[o] !== void 0 && (o = r.registered[o]);
1628
- var a = e[pr], i = [o], c = "";
1629
- typeof e.className == "string" ? c = kn(r.registered, i, e.className) : e.className != null && (c = e.className + " ");
1630
- var s = jn(i, void 0, se.useContext(Vn));
1631
- c += r.key + "-" + s.name;
1632
- var d = {};
1633
- for (var p in e)
1634
- br.call(e, p) && p !== "css" && p !== pr && (d[p] = e[p]);
1635
- return d.className = c, n && (d.ref = n), /* @__PURE__ */ se.createElement(se.Fragment, null, /* @__PURE__ */ se.createElement(Gn, {
1629
+ var a = e[vr], i = [o], u = "";
1630
+ typeof e.className == "string" ? u = Nn(r.registered, i, e.className) : e.className != null && (u = e.className + " ");
1631
+ var s = Yn(i, void 0, ce.useContext(qn));
1632
+ u += r.key + "-" + s.name;
1633
+ var f = {};
1634
+ for (var m in e)
1635
+ Sr.call(e, m) && m !== "css" && m !== vr && (f[m] = e[m]);
1636
+ return f.className = u, n && (f.ref = n), /* @__PURE__ */ ce.createElement(ce.Fragment, null, /* @__PURE__ */ ce.createElement(Bn, {
1636
1637
  cache: r,
1637
1638
  serialized: s,
1638
1639
  isStringTag: typeof a == "string"
1639
- }), /* @__PURE__ */ se.createElement(a, d));
1640
- }), Bn = qn, Ze = function(r, n, o) {
1641
- return br.call(n, "css") ? Vr.jsx(Bn, Un(r, n), o) : Vr.jsx(r, n, o);
1640
+ }), /* @__PURE__ */ ce.createElement(a, f));
1641
+ }), Hn = Kn, rr = function(r, n, o) {
1642
+ return Sr.call(n, "css") ? zr.jsx(Hn, Jn(r, n), o) : zr.jsx(r, n, o);
1642
1643
  };
1643
- function Jn(e) {
1644
+ function Xn(e) {
1644
1645
  switch (e.toLowerCase()) {
1645
1646
  case "sql":
1646
- return rt();
1647
+ return nt();
1647
1648
  case "json":
1648
- return tt();
1649
+ return ot();
1649
1650
  default:
1650
1651
  return [];
1651
1652
  }
1652
1653
  }
1653
- function zn(e) {
1654
+ function Zn(e) {
1654
1655
  return ["sql", "json"].includes(e.toLowerCase());
1655
1656
  }
1656
- function Kn(e = {}) {
1657
- return Vt(e);
1657
+ function Qn(e = {}) {
1658
+ return Ut(e);
1658
1659
  }
1659
- function ho(e) {
1660
- return [nt(), ot(e)];
1660
+ function Eo(e) {
1661
+ return [zt(), Gt(e)];
1661
1662
  }
1662
- function Hn() {
1663
- return Be.of([fr]);
1663
+ function eo() {
1664
+ return Me.of([dr]);
1664
1665
  }
1665
- const po = [Hn(), Kn()], Xr = te.theme({
1666
+ const So = [eo(), Qn()], ro = at.define([{
1667
+ tag: W.keyword,
1668
+ color: "#1a1aa6",
1669
+ fontWeight: "bold"
1670
+ }, {
1671
+ tag: W.comment,
1672
+ color: "#008000",
1673
+ fontStyle: "italic"
1674
+ }, {
1675
+ tag: W.string,
1676
+ color: "#a31515"
1677
+ }, {
1678
+ tag: W.number,
1679
+ color: "#098658"
1680
+ }, {
1681
+ tag: W.operator,
1682
+ color: "#777777"
1683
+ }, {
1684
+ tag: W.propertyName,
1685
+ color: "#0451a5"
1686
+ }, {
1687
+ tag: W.variableName,
1688
+ color: "#001080"
1689
+ }, {
1690
+ tag: W.definition(W.variableName),
1691
+ color: "#1a1aa6"
1692
+ }, {
1693
+ tag: W.typeName,
1694
+ color: "#267f99"
1695
+ }, {
1696
+ tag: W.className,
1697
+ color: "#267f99"
1698
+ }, {
1699
+ tag: W.meta,
1700
+ color: "#5c5c5c"
1701
+ }, {
1702
+ tag: W.regexp,
1703
+ color: "#811f3f"
1704
+ }, {
1705
+ tag: W.link,
1706
+ color: "#0563c1",
1707
+ textDecoration: "underline"
1708
+ }]), Qr = [te.theme({
1666
1709
  "&": {
1667
1710
  backgroundColor: "#ffffff",
1668
- color: "#333333"
1711
+ color: "#333333",
1712
+ fontSize: "14px",
1713
+ height: "100%"
1714
+ },
1715
+ ".cm-scroller": {
1716
+ fontFamily: '"Menlo", "Monaco", "Courier New", monospace',
1717
+ overflow: "auto"
1718
+ },
1719
+ ".cm-content": {
1720
+ padding: "8px 0",
1721
+ caretColor: "#333",
1722
+ textAlign: "left"
1669
1723
  },
1670
1724
  ".cm-gutters": {
1671
- backgroundColor: "#f5f5f5",
1672
- color: "#999999",
1673
- border: "none"
1725
+ backgroundColor: "#f8f9fa",
1726
+ color: "#6e7781",
1727
+ borderRight: "1px solid #ddd"
1728
+ },
1729
+ ".cm-lineNumbers": {
1730
+ minWidth: "40px"
1731
+ },
1732
+ ".cm-lineNumbers .cm-gutterElement": {
1733
+ padding: "0 8px 0 4px",
1734
+ textAlign: "right",
1735
+ fontSize: "12px"
1674
1736
  },
1675
1737
  ".cm-activeLine": {
1676
- backgroundColor: "rgba(0, 0, 0, 0.05)"
1738
+ backgroundColor: "rgba(0, 0, 0, 0.04)"
1677
1739
  },
1678
1740
  ".cm-activeLineGutter": {
1679
- backgroundColor: "rgba(0, 0, 0, 0.05)"
1741
+ backgroundColor: "rgba(0, 0, 0, 0.04)"
1680
1742
  },
1681
1743
  ".cm-selectionMatch": {
1682
- backgroundColor: "rgba(0, 0, 0, 0.05)"
1744
+ backgroundColor: "rgba(181, 213, 255, 0.3)"
1683
1745
  },
1684
1746
  "&.cm-focused .cm-cursor": {
1685
1747
  borderLeftColor: "#333333"
1686
1748
  },
1687
1749
  "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
1688
- backgroundColor: "rgba(0, 0, 255, 0.1)"
1750
+ backgroundColor: "rgba(181, 213, 255, 0.5)"
1689
1751
  }
1690
- }), Xn = te.theme({
1752
+ }), Ke(ro)], to = at.define([{
1753
+ tag: W.keyword,
1754
+ color: "#569cd6",
1755
+ fontWeight: "bold"
1756
+ }, {
1757
+ tag: W.comment,
1758
+ color: "#6A9955",
1759
+ fontStyle: "italic"
1760
+ }, {
1761
+ tag: W.string,
1762
+ color: "#ce9178"
1763
+ }, {
1764
+ tag: W.number,
1765
+ color: "#b5cea8"
1766
+ }, {
1767
+ tag: W.operator,
1768
+ color: "#d4d4d4"
1769
+ }, {
1770
+ tag: W.propertyName,
1771
+ color: "#9cdcfe"
1772
+ }, {
1773
+ tag: W.variableName,
1774
+ color: "#9cdcfe"
1775
+ }, {
1776
+ tag: W.definition(W.variableName),
1777
+ color: "#4fc1ff"
1778
+ }, {
1779
+ tag: W.typeName,
1780
+ color: "#4ec9b0"
1781
+ }, {
1782
+ tag: W.className,
1783
+ color: "#4ec9b0"
1784
+ }, {
1785
+ tag: W.meta,
1786
+ color: "#d4d4d4"
1787
+ }, {
1788
+ tag: W.regexp,
1789
+ color: "#d16969"
1790
+ }, {
1791
+ tag: W.link,
1792
+ color: "#4e94ce",
1793
+ textDecoration: "underline"
1794
+ }]), no = [te.theme({
1691
1795
  "&": {
1692
1796
  backgroundColor: "#1e1e1e",
1693
- color: "#d4d4d4"
1797
+ color: "#d4d4d4",
1798
+ fontSize: "14px",
1799
+ height: "100%"
1800
+ },
1801
+ ".cm-scroller": {
1802
+ fontFamily: '"Menlo", "Monaco", "Courier New", monospace',
1803
+ overflow: "auto"
1804
+ },
1805
+ ".cm-content": {
1806
+ padding: "8px 0",
1807
+ caretColor: "#d4d4d4",
1808
+ textAlign: "left"
1694
1809
  },
1695
1810
  ".cm-gutters": {
1696
- backgroundColor: "#1e1e1e",
1697
- color: "#8a8a8a",
1698
- border: "none"
1811
+ backgroundColor: "#252526",
1812
+ color: "#858585",
1813
+ borderRight: "1px solid #404040"
1814
+ },
1815
+ ".cm-lineNumbers": {
1816
+ minWidth: "40px"
1817
+ },
1818
+ ".cm-lineNumbers .cm-gutterElement": {
1819
+ padding: "0 8px 0 4px",
1820
+ textAlign: "right",
1821
+ fontSize: "12px"
1699
1822
  },
1700
1823
  ".cm-activeLine": {
1701
1824
  backgroundColor: "rgba(255, 255, 255, 0.07)"
@@ -1704,7 +1827,7 @@ const po = [Hn(), Kn()], Xr = te.theme({
1704
1827
  backgroundColor: "rgba(255, 255, 255, 0.07)"
1705
1828
  },
1706
1829
  ".cm-selectionMatch": {
1707
- backgroundColor: "rgba(255, 255, 255, 0.07)"
1830
+ backgroundColor: "rgba(255, 255, 255, 0.1)"
1708
1831
  },
1709
1832
  "&.cm-focused .cm-cursor": {
1710
1833
  borderLeftColor: "#d4d4d4"
@@ -1712,18 +1835,18 @@ const po = [Hn(), Kn()], Xr = te.theme({
1712
1835
  "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
1713
1836
  backgroundColor: "rgba(255, 255, 255, 0.1)"
1714
1837
  }
1715
- });
1716
- function Zn(e) {
1838
+ }), Ke(to)];
1839
+ function oo(e) {
1717
1840
  switch (e) {
1718
1841
  case "light":
1719
- return Xr;
1842
+ return Qr;
1720
1843
  case "dark":
1721
- return Xn;
1844
+ return no;
1722
1845
  default:
1723
- return Xr;
1846
+ return Qr;
1724
1847
  }
1725
1848
  }
1726
- const Zr = (e) => {
1849
+ const et = (e) => {
1727
1850
  const r = {
1728
1851
  value: "",
1729
1852
  readOnlyRanges: []
@@ -1733,32 +1856,32 @@ const Zr = (e) => {
1733
1856
  const {
1734
1857
  content: a,
1735
1858
  editable: i
1736
- } = o, c = a.replace(/\r\n/g, `
1737
- `), s = n, d = s + c.length;
1859
+ } = o, u = a.replace(/\r\n/g, `
1860
+ `), s = n, f = s + u.length;
1738
1861
  r.value += a, i || r.readOnlyRanges.push({
1739
1862
  start: s,
1740
- end: d
1741
- }), n = d;
1863
+ end: f
1864
+ }), n = f;
1742
1865
  }), r;
1743
- }, ze = Ut.define(), Qr = Gt.define({
1866
+ }, Xe = qt.define(), rt = Jt.define({
1744
1867
  create() {
1745
- return cr.none;
1868
+ return lr.none;
1746
1869
  },
1747
1870
  update(e, r) {
1748
1871
  e = e.map(r.changes);
1749
1872
  for (const n of r.effects)
1750
- if (n.is(ze))
1751
- return console.log(2939), gt(n.value);
1873
+ if (n.is(Xe))
1874
+ return console.log(2939), yt(n.value);
1752
1875
  return r.docChanged, e;
1753
1876
  },
1754
1877
  provide(e) {
1755
1878
  return te.decorations.from(e);
1756
1879
  }
1757
1880
  });
1758
- function gt(e) {
1881
+ function yt(e) {
1759
1882
  const r = [];
1760
1883
  return console.log(e, 9999299), e.forEach((n) => {
1761
- n.start < n.end && r.push(cr.mark({
1884
+ n.start < n.end && r.push(lr.mark({
1762
1885
  inclusive: !0,
1763
1886
  attributes: {
1764
1887
  class: "cm-readOnly",
@@ -1767,18 +1890,18 @@ function gt(e) {
1767
1890
  // 设置较低的优先级,确保语法高亮装饰可以覆盖
1768
1891
  priority: -100
1769
1892
  }).range(n.start, n.end));
1770
- }), cr.set(r);
1893
+ }), lr.set(r);
1771
1894
  }
1772
- const Er = /* @__PURE__ */ new WeakMap();
1773
- function Qn(e) {
1895
+ const Rr = /* @__PURE__ */ new WeakMap();
1896
+ function ao(e) {
1774
1897
  let r = e.map((n) => ({
1775
1898
  ...n
1776
1899
  }));
1777
1900
  return [
1778
1901
  // 添加状态字段
1779
- Qr.init(() => gt(r)),
1902
+ rt.init(() => yt(r)),
1780
1903
  // 添加按键映射,专门处理回车键
1781
- Be.of([{
1904
+ Me.of([{
1782
1905
  key: "Enter",
1783
1906
  run: (n) => {
1784
1907
  const o = n.state.selection.main, {
@@ -1790,13 +1913,13 @@ function Qn(e) {
1790
1913
  if (a < s.end && i > s.start)
1791
1914
  return !1;
1792
1915
  }
1793
- let c = !1;
1916
+ let u = !1;
1794
1917
  for (const s of r)
1795
1918
  if (a > s.start && a < s.end) {
1796
- c = !0;
1919
+ u = !0;
1797
1920
  break;
1798
1921
  }
1799
- return c ? !1 : (n.dispatch({
1922
+ return u ? !1 : (n.dispatch({
1800
1923
  changes: {
1801
1924
  from: a,
1802
1925
  to: i,
@@ -1810,23 +1933,23 @@ function Qn(e) {
1810
1933
  }
1811
1934
  }]),
1812
1935
  // 添加事务过滤器,阻止只读区域的编辑
1813
- le.transactionFilter.of((n) => {
1936
+ he.transactionFilter.of((n) => {
1814
1937
  if (!n.docChanged || n.isUserEvent("input.type.Enter") || n.isUserEvent("input.enter"))
1815
1938
  return n;
1816
1939
  let o = !1;
1817
- return n.changes.iterChanges((a, i, c, s) => {
1818
- if (!(n.newDoc.sliceString(c, s) === `
1940
+ return n.changes.iterChanges((a, i, u, s) => {
1941
+ if (!(n.newDoc.sliceString(u, s) === `
1819
1942
  ` && a === i)) {
1820
- for (const u of r)
1943
+ for (const p of r)
1821
1944
  if (a === i) {
1822
- if (a > u.start && a < u.end) {
1945
+ if (a > p.start && a < p.end) {
1823
1946
  o = !0;
1824
1947
  break;
1825
1948
  }
1826
1949
  } else if (
1827
1950
  // 删除或替换操作
1828
- a < u.end && i > u.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
1829
- a === u.start && i > a || i === u.end && a < i
1951
+ a < p.end && i > p.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
1952
+ a === p.start && i > a || i === p.end && a < i
1830
1953
  ) {
1831
1954
  o = !0;
1832
1955
  break;
@@ -1837,23 +1960,23 @@ function Qn(e) {
1837
1960
  // 动态更新只读区域的装饰
1838
1961
  te.updateListener.of((n) => {
1839
1962
  if (n.docChanged) {
1840
- const o = ro(r, n);
1841
- !eo(r, o) ? (r = o, Er.set(n.view, o), n.view.dispatch({
1842
- effects: ze.of(o)
1963
+ const o = so(r, n);
1964
+ !io(r, o) ? (r = o, Rr.set(n.view, o), n.view.dispatch({
1965
+ effects: Xe.of(o)
1843
1966
  })) : n.view.dispatch({
1844
- effects: ze.of(o)
1967
+ effects: Xe.of(o)
1845
1968
  });
1846
1969
  }
1847
1970
  }),
1848
1971
  // 添加一个延迟执行的额外更新,以确保在文档变化后能重新计算语法高亮
1849
1972
  te.updateListener.of((n) => {
1850
1973
  n.docChanged && setTimeout(() => {
1851
- n.view.state.field(Qr, !1) && n.view.dispatch({});
1974
+ n.view.state.field(rt, !1) && n.view.dispatch({});
1852
1975
  }, 10);
1853
1976
  })
1854
1977
  ];
1855
1978
  }
1856
- function eo(e, r) {
1979
+ function io(e, r) {
1857
1980
  if (e.length !== r.length)
1858
1981
  return !1;
1859
1982
  for (let n = 0; n < e.length; n++)
@@ -1861,356 +1984,407 @@ function eo(e, r) {
1861
1984
  return !1;
1862
1985
  return !0;
1863
1986
  }
1864
- function ro(e, r) {
1987
+ function so(e, r) {
1865
1988
  var a;
1866
1989
  if (!r.docChanged)
1867
1990
  return e;
1868
1991
  let n = !1;
1869
1992
  const o = e.map((i) => {
1870
- const c = {
1993
+ const u = {
1871
1994
  ...i
1872
1995
  };
1873
- return r.changes.iterChanges((s, d, p, u) => {
1874
- const g = u - p, _ = d - s, S = g - _;
1875
- if (s === 0 && (n = !0), s === 0 && g > 0 && i.start === 0) {
1876
- c.start = g, c.end += S;
1996
+ return r.changes.iterChanges((s, f, m, p) => {
1997
+ const d = p - m, P = f - s, C = d - P;
1998
+ if (s === 0 && (n = !0), s === 0 && d > 0 && i.start === 0) {
1999
+ u.start = d, u.end += C;
1877
2000
  return;
1878
2001
  }
1879
- if (d <= i.start)
1880
- c.start += S, c.end += S;
1881
- else if (s >= i.start && s < i.end && d >= i.end)
1882
- c.end = s;
1883
- else if (!(s >= i.start && d <= i.end)) {
1884
- if (s < i.end && d > i.end) {
1885
- const b = i.end - s;
1886
- c.end = s + Math.min(b, g);
2002
+ if (f <= i.start)
2003
+ u.start += C, u.end += C;
2004
+ else if (s >= i.start && s < i.end && f >= i.end)
2005
+ u.end = s;
2006
+ else if (!(s >= i.start && f <= i.end)) {
2007
+ if (s < i.end && f > i.end) {
2008
+ const x = i.end - s;
2009
+ u.end = s + Math.min(x, d);
1887
2010
  }
1888
2011
  }
1889
- }), c;
2012
+ }), u;
1890
2013
  });
1891
2014
  if (n && o.length > 0) {
1892
2015
  const i = ((a = r.changes.newDoc) == null ? void 0 : a.toString()) || "";
1893
- let c = 0;
2016
+ let u = 0;
1894
2017
  for (let s = 0; s < i.length && /\s/.test(i[s]); s++)
1895
- c++;
1896
- o[0].start === 0 && c > 0 && (o[0].start = c);
2018
+ u++;
2019
+ o[0].start === 0 && u > 0 && (o[0].start = u);
1897
2020
  }
1898
2021
  return o.filter((i) => i.start < i.end);
1899
2022
  }
1900
- function to(e) {
1901
- return Er.get(e) || [];
2023
+ function co(e) {
2024
+ return Rr.get(e) || [];
1902
2025
  }
1903
- function ce(e, r) {
2026
+ function ue(e, r) {
1904
2027
  const n = r.map((o) => ({
1905
2028
  ...o
1906
2029
  }));
1907
- Er.set(e, n), e.dispatch({
1908
- effects: ze.of(n)
2030
+ Rr.set(e, n), e.dispatch({
2031
+ effects: Xe.of(n)
1909
2032
  }), setTimeout(() => {
1910
2033
  e.dom && document.contains(e.dom) && e.dispatch({});
1911
2034
  }, 10);
1912
2035
  }
1913
- const Sr = ({
2036
+ const xr = ({
1914
2037
  value: e,
1915
2038
  onChange: r,
1916
2039
  extensions: n = [],
1917
2040
  height: o = "300px",
1918
2041
  disabled: a = !1,
1919
2042
  className: i = "",
1920
- style: c = {},
2043
+ style: u = {},
1921
2044
  placeholder: s = "",
1922
- onEditorViewCreated: d
2045
+ showLineNumbers: f = !0,
2046
+ onEditorViewCreated: m
1923
2047
  }) => {
1924
- const p = de(null), u = de();
1925
- return ie(() => {
2048
+ const p = fe(null), d = fe();
2049
+ return se(() => {
1926
2050
  if (!p.current) return;
1927
- const g = [Be.of([fr]), te.lineWrapping, Lr(Dr), le.allowMultipleSelections.of(!0), s ? jr(s) : [], te.updateListener.of((b) => {
1928
- if (b.docChanged && r) {
1929
- const x = {
1930
- value: b.state.doc.toString(),
1931
- readOnlyRanges: []
1932
- // 基础编辑器没有只读区域逻辑,由特定编辑器实现
1933
- };
1934
- r(x);
1935
- }
1936
- })];
1937
- a && g.push(le.readOnly.of(!0));
1938
- const _ = le.create({
2051
+ const P = [
2052
+ Me.of([dr]),
2053
+ te.lineWrapping,
2054
+ Ke(Yr),
2055
+ he.allowMultipleSelections.of(!0),
2056
+ s ? Lr(s) : [],
2057
+ // 行号功能,根据配置决定是否启用
2058
+ f ? Wr() : [],
2059
+ te.updateListener.of((R) => {
2060
+ if (R.docChanged && r) {
2061
+ const y = {
2062
+ value: R.state.doc.toString(),
2063
+ readOnlyRanges: []
2064
+ // 基础编辑器没有只读区域逻辑,由特定编辑器实现
2065
+ };
2066
+ r(y);
2067
+ }
2068
+ })
2069
+ ];
2070
+ a && P.push(he.readOnly.of(!0));
2071
+ const C = he.create({
1939
2072
  doc: e,
1940
- extensions: [...g, ...n]
1941
- }), S = new te({
1942
- state: _,
2073
+ extensions: [...P, ...n]
2074
+ }), x = new te({
2075
+ state: C,
1943
2076
  parent: p.current
1944
2077
  });
1945
- return u.current = S, d && d(S), () => {
1946
- var b;
1947
- (b = u.current) == null || b.destroy();
2078
+ return d.current = x, m && m(x), () => {
2079
+ var R;
2080
+ (R = d.current) == null || R.destroy();
1948
2081
  };
1949
- }, []), ie(() => {
1950
- u.current && e !== u.current.state.doc.toString() && u.current.dispatch({
2082
+ }, []), se(() => {
2083
+ d.current && e !== d.current.state.doc.toString() && d.current.dispatch({
1951
2084
  changes: {
1952
2085
  from: 0,
1953
- to: u.current.state.doc.length,
2086
+ to: d.current.state.doc.length,
1954
2087
  insert: e
1955
2088
  }
1956
2089
  });
1957
- }, [e]), ie(() => {
1958
- if (!u.current || !p.current) return;
1959
- const g = u.current.state.doc.toString();
1960
- u.current.destroy();
1961
- const _ = [Be.of([fr]), te.lineWrapping, Lr(Dr), le.allowMultipleSelections.of(!0), s ? jr(s) : [], te.updateListener.of((x) => {
1962
- if (x.docChanged && r) {
1963
- const D = {
1964
- value: x.state.doc.toString(),
1965
- readOnlyRanges: []
1966
- // 基础编辑器没有只读区域逻辑,由特定编辑器实现
1967
- };
1968
- r(D);
1969
- }
1970
- })];
1971
- a && _.push(le.readOnly.of(!0));
1972
- const S = le.create({
1973
- doc: g,
1974
- extensions: [..._, ...n]
1975
- }), b = new te({
1976
- state: S,
2090
+ }, [e]), se(() => {
2091
+ if (!d.current || !p.current) return;
2092
+ const P = d.current.state.doc.toString();
2093
+ d.current.destroy();
2094
+ const C = [
2095
+ Me.of([dr]),
2096
+ te.lineWrapping,
2097
+ Ke(Yr),
2098
+ he.allowMultipleSelections.of(!0),
2099
+ s ? Lr(s) : [],
2100
+ // 行号功能,根据配置决定是否启用
2101
+ f ? Wr() : [],
2102
+ te.updateListener.of((y) => {
2103
+ if (y.docChanged && r) {
2104
+ const S = {
2105
+ value: y.state.doc.toString(),
2106
+ readOnlyRanges: []
2107
+ // 基础编辑器没有只读区域逻辑,由特定编辑器实现
2108
+ };
2109
+ r(S);
2110
+ }
2111
+ })
2112
+ ];
2113
+ a && C.push(he.readOnly.of(!0));
2114
+ const x = he.create({
2115
+ doc: P,
2116
+ extensions: [...C, ...n]
2117
+ }), R = new te({
2118
+ state: x,
1977
2119
  parent: p.current
1978
2120
  });
1979
- u.current = b, d && d(b);
1980
- }, [a]), /* @__PURE__ */ Ze("div", { ref: p, className: `senyao-editor ${a ? "disabled" : ""} ${i}`, style: {
2121
+ d.current = R, m && m(R);
2122
+ }, [a, f]), /* @__PURE__ */ rr("div", { ref: p, className: `senyao-editor ${a ? "disabled" : ""} ${i}`, style: {
1981
2123
  height: o,
1982
- ...c
2124
+ ...u
1983
2125
  } });
1984
- }, vo = ({
2126
+ }, Ro = ({
1985
2127
  value: e,
1986
2128
  onChange: r,
1987
2129
  language: n = "json",
1988
2130
  extensions: o = [],
1989
2131
  theme: a = "light",
1990
- ...i
2132
+ showLineNumbers: i = !0,
2133
+ ...u
1991
2134
  }) => {
1992
- const c = vr(() => {
1993
- const s = zn(n) ? Jn(n) : [], d = Zn(a);
1994
- return [s, d, ...o];
2135
+ const s = Be(() => {
2136
+ const f = Zn(n) ? Xn(n) : [], m = oo(a);
2137
+ return [f, m, ...o];
1995
2138
  }, [n, o, a]);
1996
- return /* @__PURE__ */ Ze(Sr, { value: e, onChange: r, extensions: c, ...i });
1997
- }, mo = ({
2139
+ return /* @__PURE__ */ rr(xr, { value: e, onChange: r, extensions: s, showLineNumbers: i, ...u });
2140
+ }, xo = ({
1998
2141
  value: e,
1999
2142
  onChange: r,
2000
2143
  extensions: n = [],
2001
2144
  readOnlyRanges: o = [],
2002
2145
  manageReadOnlyRanges: a = !0,
2003
- ...i
2146
+ showLineNumbers: i = !0,
2147
+ ...u
2004
2148
  }) => {
2005
- const c = de(null), [s, d] = Nr(o), p = de(e), [u, g] = Nr(null), _ = de(!1), S = de(/* @__PURE__ */ new Map()), b = de(!1);
2006
- ie(() => {
2007
- if (a && o.length > 0 && !u) {
2008
- const v = [];
2009
- let R = 0;
2010
- for (let O = 0; O < o.length; O++) {
2011
- const P = o[O];
2012
- P.start > R && v.push({
2013
- content: e.substring(R, P.start),
2149
+ const s = fe(null), [f, m] = jr(o), p = fe(e), [d, P] = jr(null), C = fe(!1), x = fe(/* @__PURE__ */ new Map()), R = fe(!1);
2150
+ se(() => {
2151
+ if (a && o.length > 0 && !d) {
2152
+ const g = [];
2153
+ let w = 0;
2154
+ for (let $ = 0; $ < o.length; $++) {
2155
+ const k = o[$];
2156
+ k.start > w && g.push({
2157
+ content: e.substring(w, k.start),
2014
2158
  editable: !0
2015
- }), v.push({
2016
- content: e.substring(P.start, P.end),
2159
+ }), g.push({
2160
+ content: e.substring(k.start, k.end),
2017
2161
  editable: !1
2018
- }), R = P.end;
2162
+ }), w = k.end;
2019
2163
  }
2020
- R < e.length && v.push({
2021
- content: e.substring(R),
2164
+ w < e.length && g.push({
2165
+ content: e.substring(w),
2022
2166
  editable: !0
2023
- }), g(v);
2167
+ }), P(g);
2024
2168
  }
2025
- }, [a, o, e, u]), ie(() => {
2169
+ }, [a, o, e, d]), se(() => {
2026
2170
  if (e) {
2027
- const v = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], R = /* @__PURE__ */ new Map();
2028
- v.forEach((O) => {
2029
- const P = e.indexOf(O);
2030
- P >= 0 && R.set(O, P);
2031
- }), S.current = R;
2171
+ const g = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], w = /* @__PURE__ */ new Map();
2172
+ g.forEach(($) => {
2173
+ const k = e.indexOf($);
2174
+ k >= 0 && w.set($, k);
2175
+ }), x.current = w;
2032
2176
  }
2033
2177
  }, []);
2034
- const x = vr(() => {
2035
- const v = [rt()];
2036
- return s.length > 0 && v.push(Qn(s)), [...v, ...n];
2037
- }, [n, s]), D = re((v, R, O = 0) => {
2038
- const P = v.indexOf(R, O);
2039
- return P >= 0 ? P : null;
2040
- }, []), w = re((v, R) => {
2041
- if (!a || !v || v.length === 0) return v;
2042
- const O = [...v];
2043
- let P = 0;
2044
- for (let Y = 0; Y < v.length; Y++) {
2045
- const B = v[Y];
2046
- if (!B.editable) {
2047
- const Q = D(R, B.content, P);
2048
- Q !== null && (Y > 0 && v[Y - 1].editable && Q > P && (O[Y - 1] = {
2049
- ...O[Y - 1],
2050
- content: R.substring(P, Q)
2051
- }), P = Q + B.content.length);
2178
+ const y = Be(() => {
2179
+ const g = [nt()];
2180
+ return f.length > 0 && g.push(ao(f)), [...g, ...n];
2181
+ }, [n, f]), S = Q((g, w, $ = 0) => {
2182
+ const k = g.indexOf(w, $);
2183
+ return k >= 0 ? k : null;
2184
+ }, []), b = Q((g, w) => {
2185
+ if (!a || !g || g.length === 0) return g;
2186
+ const $ = [...g];
2187
+ let k = 0;
2188
+ for (let V = 0; V < g.length; V++) {
2189
+ const K = g[V];
2190
+ if (!K.editable) {
2191
+ const ie = S(w, K.content, k);
2192
+ ie !== null && (V > 0 && g[V - 1].editable && ie > k && ($[V - 1] = {
2193
+ ...$[V - 1],
2194
+ content: w.substring(k, ie)
2195
+ }), k = ie + K.content.length);
2052
2196
  }
2053
2197
  }
2054
- const W = v[v.length - 1];
2055
- return W.editable && P < R.length && (O[v.length - 1] = {
2056
- ...W,
2057
- content: R.substring(P)
2058
- }), O;
2059
- }, [a, D]), E = re((v) => {
2060
- let R = !1;
2061
- return S.current.forEach((O, P) => {
2062
- const W = v.indexOf(P);
2063
- W >= 0 && Math.abs(W - O) > 0 && (S.current.set(P, W), W > O && (O === 0 || O < 15) && (R = !0));
2064
- }), R;
2065
- }, []), k = re(() => {
2066
- if (!c.current) return;
2067
- const v = c.current, R = v.state.doc.toString(), O = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], P = v.state.selection;
2068
- let W = !1;
2069
- for (const Y of O) {
2070
- const B = R.indexOf(Y);
2071
- if (B >= 0) {
2072
- v.dispatch({
2198
+ const L = g[g.length - 1];
2199
+ return L.editable && k < w.length && ($[g.length - 1] = {
2200
+ ...L,
2201
+ content: w.substring(k)
2202
+ }), $;
2203
+ }, [a, S]), _ = Q((g) => {
2204
+ let w = !1;
2205
+ return x.current.forEach(($, k) => {
2206
+ const L = g.indexOf(k);
2207
+ L >= 0 && Math.abs(L - $) > 0 && (x.current.set(k, L), L > $ && ($ === 0 || $ < 15) && (w = !0));
2208
+ }), w;
2209
+ }, []), j = Q(() => {
2210
+ if (!s.current) return;
2211
+ const g = s.current, w = g.state.doc.toString(), $ = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], k = g.state.selection;
2212
+ let L = !1;
2213
+ for (const V of $) {
2214
+ const K = w.indexOf(V);
2215
+ if (K >= 0) {
2216
+ g.dispatch({
2073
2217
  selection: {
2074
- anchor: B,
2075
- head: B + Y.length
2218
+ anchor: K,
2219
+ head: K + V.length
2076
2220
  },
2077
2221
  scrollIntoView: !1
2078
- }), W = !0;
2222
+ }), L = !0;
2079
2223
  break;
2080
2224
  }
2081
2225
  }
2082
- W && setTimeout(() => {
2083
- v.dom && document.contains(v.dom) && v.dispatch({
2084
- selection: P,
2226
+ L && setTimeout(() => {
2227
+ g.dom && document.contains(g.dom) && g.dispatch({
2228
+ selection: k,
2085
2229
  scrollIntoView: !1
2086
2230
  });
2087
2231
  }, 10);
2088
- }, []), j = re(() => {
2089
- if (!c.current) return;
2090
- const v = c.current;
2091
- s.length > 0 && (ce(v, []), setTimeout(() => {
2092
- v.dom && document.contains(v.dom) && (ce(v, s), setTimeout(() => {
2093
- v.dom && document.contains(v.dom) && v.dispatch({});
2232
+ }, []), l = Q(() => {
2233
+ if (!s.current) return;
2234
+ const g = s.current;
2235
+ f.length > 0 && (ue(g, []), setTimeout(() => {
2236
+ g.dom && document.contains(g.dom) && (ue(g, f), setTimeout(() => {
2237
+ g.dom && document.contains(g.dom) && g.dispatch({});
2094
2238
  }, 10));
2095
2239
  }, 10));
2096
- }, [s]), l = re((v) => {
2097
- const R = v.value, O = p.current;
2098
- O !== R && R.length > O.length && !O.startsWith(R.substring(0, 5)) && R.includes(O.substring(0, 10)) && (_.current = !0, E(R) && setTimeout(() => {
2099
- k();
2100
- }, 10)), p.current = R;
2101
- const P = c.current ? to(c.current) : s;
2102
- if (a && u) {
2103
- const W = w(u, R);
2104
- g(W);
2240
+ }, [f]), U = Q((g) => {
2241
+ const w = g.value, $ = p.current;
2242
+ $ !== w && w.length > $.length && !$.startsWith(w.substring(0, 5)) && w.includes($.substring(0, 10)) && (C.current = !0, _(w) && setTimeout(() => {
2243
+ j();
2244
+ }, 10)), p.current = w;
2245
+ const k = s.current ? co(s.current) : f;
2246
+ if (a && d) {
2247
+ const L = b(d, w);
2248
+ P(L);
2105
2249
  const {
2106
- readOnlyRanges: Y
2107
- } = Zr(W);
2108
- d(Y), c.current && ce(c.current, Y), r && r({
2109
- value: R,
2110
- readOnlyRanges: Y
2250
+ readOnlyRanges: V
2251
+ } = et(L);
2252
+ m(V), s.current && ue(s.current, V), r && r({
2253
+ value: w,
2254
+ readOnlyRanges: V
2111
2255
  });
2112
2256
  } else
2113
2257
  r && r({
2114
- value: R,
2115
- readOnlyRanges: P
2258
+ value: w,
2259
+ readOnlyRanges: k
2116
2260
  });
2117
- }, [r, a, u, s, w, E, k]);
2118
- ie(() => {
2119
- !a && JSON.stringify(o) !== JSON.stringify(s) && (d(o), c.current && ce(c.current, o));
2120
- }, [o, s, a]), ie(() => {
2121
- if (a && u) {
2261
+ }, [r, a, d, f, b, _, j]);
2262
+ se(() => {
2263
+ !a && JSON.stringify(o) !== JSON.stringify(f) && (m(o), s.current && ue(s.current, o));
2264
+ }, [o, f, a]), se(() => {
2265
+ if (a && d) {
2122
2266
  const {
2123
- readOnlyRanges: v
2124
- } = Zr(u);
2125
- JSON.stringify(v) !== JSON.stringify(s) && (d(v), c.current && ce(c.current, v));
2126
- }
2127
- }, [u, s, a]), ie(() => {
2128
- c.current && _.current && (_.current = !1, c.current.dispatch({}));
2129
- }, [e]), ie(() => {
2130
- c.current && s.length > 0 && !b.current && (b.current = !0, setTimeout(() => {
2131
- j();
2267
+ readOnlyRanges: g
2268
+ } = et(d);
2269
+ JSON.stringify(g) !== JSON.stringify(f) && (m(g), s.current && ue(s.current, g));
2270
+ }
2271
+ }, [d, f, a]), se(() => {
2272
+ s.current && C.current && (C.current = !1, s.current.dispatch({}));
2273
+ }, [e]), se(() => {
2274
+ s.current && f.length > 0 && !R.current && (R.current = !0, setTimeout(() => {
2275
+ l();
2132
2276
  }, 50), setTimeout(() => {
2133
- j();
2277
+ l();
2134
2278
  }, 200));
2135
- }, [j, s]);
2136
- const U = re((v) => {
2137
- if (c.current = v, s.length > 0 && (ce(v, s), setTimeout(() => {
2138
- ce(v, []), setTimeout(() => {
2139
- ce(v, s);
2279
+ }, [l, f]);
2280
+ const A = Q((g) => {
2281
+ if (s.current = g, f.length > 0 && (ue(g, f), setTimeout(() => {
2282
+ ue(g, []), setTimeout(() => {
2283
+ ue(g, f);
2140
2284
  }, 10);
2141
2285
  }, 50)), e) {
2142
- const R = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], O = /* @__PURE__ */ new Map();
2143
- R.forEach((P) => {
2144
- const W = e.indexOf(P);
2145
- W >= 0 && O.set(P, W);
2146
- }), S.current = O;
2147
- }
2148
- }, [s, e]), $ = re((v) => {
2149
- l(v), c.current && setTimeout(() => {
2150
- c.current && c.current.dispatch({});
2286
+ const w = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], $ = /* @__PURE__ */ new Map();
2287
+ w.forEach((k) => {
2288
+ const L = e.indexOf(k);
2289
+ L >= 0 && $.set(k, L);
2290
+ }), x.current = $;
2291
+ }
2292
+ }, [f, e]), Re = Q((g) => {
2293
+ U(g), s.current && setTimeout(() => {
2294
+ s.current && s.current.dispatch({});
2151
2295
  }, 0);
2152
- }, [l]);
2153
- return /* @__PURE__ */ Ze(Sr, { value: e, onChange: $, extensions: x, onEditorViewCreated: U, ...i });
2154
- }, go = ({
2155
- value: e,
2156
- onChange: r,
2157
- extensions: n = [],
2158
- enableFormatting: o = !0,
2159
- ...a
2160
- }) => {
2161
- const i = re((p) => {
2162
- const u = p.state.doc.toString(), g = [];
2296
+ }, [U]);
2297
+ return /* @__PURE__ */ rr(xr, { value: e, onChange: Re, extensions: y, onEditorViewCreated: A, showLineNumbers: i, ...u });
2298
+ };
2299
+ function Co(e) {
2300
+ const {
2301
+ value: r,
2302
+ onChange: n,
2303
+ extensions: o = [],
2304
+ showLineNumbers: a = !0,
2305
+ enableFormatting: i = !1,
2306
+ ...u
2307
+ } = e, s = fe(!0), f = fe(null), m = Q((y) => {
2163
2308
  try {
2164
- JSON.parse(u);
2165
- } catch (_) {
2166
- _ instanceof Error && g.push({
2167
- from: 0,
2168
- to: u.length,
2169
- message: _.message,
2170
- severity: "error"
2171
- });
2309
+ return y === "" || JSON.parse(y), !0;
2310
+ } catch {
2311
+ return !1;
2172
2312
  }
2173
- return g;
2174
- }, []), c = re((p) => {
2313
+ }, []), p = Q((y) => {
2175
2314
  try {
2176
- const u = JSON.parse(p);
2177
- return JSON.stringify(u, null, 2);
2315
+ if (!y.trim()) return "";
2316
+ const S = JSON.parse(y);
2317
+ return JSON.stringify(S, null, 2);
2178
2318
  } catch {
2179
- return p;
2180
- }
2181
- }, []), s = re((p) => {
2182
- if (r) {
2183
- if (o) {
2184
- const u = c(p.value);
2185
- if (u !== p.value) {
2186
- r({
2187
- value: u,
2188
- readOnlyRanges: p.readOnlyRanges
2189
- });
2190
- return;
2191
- }
2319
+ return y;
2320
+ }
2321
+ }, []), d = Q(() => {
2322
+ if (!f.current) return !1;
2323
+ const y = f.current, S = y.state.doc.toString(), b = p(S);
2324
+ if (b === S) return !1;
2325
+ const _ = y.state.update({
2326
+ changes: {
2327
+ from: 0,
2328
+ to: y.state.doc.length,
2329
+ insert: b
2192
2330
  }
2193
- r(p);
2331
+ });
2332
+ return y.dispatch(_), !0;
2333
+ }, [p]), P = Be(() => Me.of([{
2334
+ key: "Enter",
2335
+ run: (y) => {
2336
+ const S = y.state.selection.main, {
2337
+ from: b,
2338
+ to: _
2339
+ } = S, j = y.state.doc.lineAt(b);
2340
+ if (b === _ && b === j.to) {
2341
+ const l = y.state.update({
2342
+ changes: {
2343
+ from: b,
2344
+ to: _,
2345
+ insert: `
2346
+ `
2347
+ },
2348
+ selection: {
2349
+ anchor: b + 1
2350
+ }
2351
+ });
2352
+ return y.dispatch(l), !0;
2353
+ }
2354
+ return !1;
2194
2355
  }
2195
- }, [o, c, r]), d = vr(() => [tt(), nt(), ot(i), ...n], [i, n]);
2196
- return /* @__PURE__ */ Ze(Sr, { value: e, onChange: s, extensions: d, ...a });
2197
- };
2356
+ }, {
2357
+ key: "Alt-f",
2358
+ mac: "Mod-Alt-f",
2359
+ run: () => d()
2360
+ }]), [d]), C = Q((y) => {
2361
+ if (n) {
2362
+ const S = m(y.value);
2363
+ s.current = S, n(y);
2364
+ }
2365
+ }, [n, m]), x = Be(() => [ot(), Bt.highest(P), ...o], [P, o]), R = Q((y) => {
2366
+ f.current = y, i && r && setTimeout(() => {
2367
+ d();
2368
+ }, 0);
2369
+ }, [i, r, d]);
2370
+ return /* @__PURE__ */ rr(xr, { value: r, showLineNumbers: a, onChange: C, extensions: x, onEditorViewCreated: R, ...u });
2371
+ }
2198
2372
  export {
2199
- vo as Editor,
2200
- Sr as GenericEditor,
2201
- go as JSONEditor,
2202
- mo as SQLEditor,
2203
- Zr as blocksToEditorData,
2204
- po as commonExtensions,
2205
- Kn as createAutocompletionExtension,
2206
- Hn as createKeymapExtension,
2207
- ho as createLintExtension,
2208
- Xn as darkTheme,
2209
- to as getCurrentReadOnlyRanges,
2210
- Jn as getLanguageExtension,
2211
- Zn as getThemeExtension,
2212
- zn as isSupportedLanguage,
2213
- Xr as lightTheme,
2214
- Qn as readOnlyRanges,
2215
- ce as updateReadOnlyRanges
2373
+ Ro as Editor,
2374
+ xr as GenericEditor,
2375
+ Co as JSONEditor,
2376
+ xo as SQLEditor,
2377
+ et as blocksToEditorData,
2378
+ So as commonExtensions,
2379
+ Qn as createAutocompletionExtension,
2380
+ eo as createKeymapExtension,
2381
+ Eo as createLintExtension,
2382
+ no as darkTheme,
2383
+ co as getCurrentReadOnlyRanges,
2384
+ Xn as getLanguageExtension,
2385
+ oo as getThemeExtension,
2386
+ Zn as isSupportedLanguage,
2387
+ Qr as lightTheme,
2388
+ ao as readOnlyRanges,
2389
+ ue as updateReadOnlyRanges
2216
2390
  };