@senyao-design-system/editor 0.0.3 → 0.0.4

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,15 +1,15 @@
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";
1
+ import * as ve from "react";
2
+ import Vr, { forwardRef as rt, useContext as Jn, useRef as ue, useEffect as ge, useImperativeHandle as Kn, useMemo as ht, useState as Ft, useCallback as se } from "react";
3
+ import { sql as zr } from "@codemirror/lang-sql";
4
+ import { json as Ur } from "@codemirror/lang-json";
5
+ import { keymap as we, EditorView as V, Decoration as Q, ViewPlugin as Br, getPanel as dt, showPanel as Gr, runScopeHandlers as Qn, placeholder as br, lineNumbers as xr } from "@codemirror/view";
6
+ import { indentWithTab as Dt, insertNewlineAndIndent as Er } from "@codemirror/commands";
7
+ import { autocompletion as Hr, closeBrackets as Xn } from "@codemirror/autocomplete";
8
+ import { lintGutter as Zn, linter as eo } from "@codemirror/lint";
9
+ import { HighlightStyle as Jr, syntaxHighlighting as pt, defaultHighlightStyle as Sr, bracketMatching as to } from "@codemirror/language";
10
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 = {};
11
+ import { StateEffect as je, StateField as Gt, EditorState as be, Facet as Kr, Prec as Qr, EditorSelection as le, combineConfig as Xr, codePointAt as ro, fromCodePoint as no, codePointSize as oo, RangeSetBuilder as io, CharCategory as ae, findClusterBreak as Zr } from "@codemirror/state";
12
+ var Wt = { exports: {} }, He = {};
13
13
  /**
14
14
  * @license React
15
15
  * react-jsx-runtime.production.min.js
@@ -19,21 +19,21 @@ var hr = { exports: {} }, ke = {};
19
19
  * This source code is licensed under the MIT license found in the
20
20
  * LICENSE file in the root directory of this source tree.
21
21
  */
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 };
33
- }
34
- return ke.Fragment = n, ke.jsx = u, ke.jsxs = u, ke;
35
- }
36
- var $e = {};
22
+ var Cr;
23
+ function so() {
24
+ if (Cr) return He;
25
+ Cr = 1;
26
+ var e = Vr, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
27
+ function a(c, l, h) {
28
+ var f, y = {}, C = null, v = null;
29
+ h !== void 0 && (C = "" + h), l.key !== void 0 && (C = "" + l.key), l.ref !== void 0 && (v = l.ref);
30
+ for (f in l) n.call(l, f) && !i.hasOwnProperty(f) && (y[f] = l[f]);
31
+ if (c && c.defaultProps) for (f in l = c.defaultProps, l) y[f] === void 0 && (y[f] = l[f]);
32
+ return { $$typeof: t, type: c, key: C, ref: v, props: y, _owner: o.current };
33
+ }
34
+ return He.Fragment = r, He.jsx = a, He.jsxs = a, He;
35
+ }
36
+ var Je = {};
37
37
  /**
38
38
  * @license React
39
39
  * react-jsx-runtime.development.js
@@ -43,91 +43,91 @@ var $e = {};
43
43
  * This source code is licensed under the MIT license found in the
44
44
  * LICENSE file in the root directory of this source tree.
45
45
  */
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) {
51
- if (t === null || typeof t != "object")
46
+ var Rr;
47
+ function ao() {
48
+ return Rr || (Rr = 1, process.env.NODE_ENV !== "production" && function() {
49
+ var e = Vr, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), R = Symbol.iterator, m = "@@iterator";
50
+ function x(s) {
51
+ if (s === null || typeof s != "object")
52
52
  return null;
53
- var c = x && t[x] || t[R];
54
- return typeof c == "function" ? c : null;
53
+ var u = R && s[R] || s[m];
54
+ return typeof u == "function" ? u : null;
55
55
  }
56
- var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
57
- function b(t) {
56
+ var g = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
57
+ function S(s) {
58
58
  {
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);
59
+ for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), w = 1; w < u; w++)
60
+ p[w - 1] = arguments[w];
61
+ _("error", s, p);
62
62
  }
63
63
  }
64
- function _(t, c, h) {
64
+ function _(s, u, p) {
65
65
  {
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);
66
+ var w = g.ReactDebugCurrentFrame, N = w.getStackAddendum();
67
+ N !== "" && (u += "%s", p = p.concat([N]));
68
+ var j = p.map(function(P) {
69
+ return String(P);
70
70
  });
71
- Y.unshift("Warning: " + c), Function.prototype.apply.call(console[t], console, Y);
71
+ j.unshift("Warning: " + u), Function.prototype.apply.call(console[s], console, j);
72
72
  }
73
73
  }
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
74
+ var $ = !1, d = !1, q = !1, A = !1, Ye = !1, Ee;
75
+ Ee = Symbol.for("react.module.reference");
76
+ function Te(s) {
77
+ return !!(typeof s == "string" || typeof s == "function" || s === n || s === i || Ye || s === o || s === h || s === f || A || s === v || $ || d || q || typeof s == "object" && s !== null && (s.$$typeof === C || s.$$typeof === y || s.$$typeof === a || s.$$typeof === c || s.$$typeof === l || // This needs to include all possible module reference object
78
78
  // types supported by any Flight configuration anywhere since
79
79
  // we don't know which Flight build this will end up being used
80
80
  // with.
81
- t.$$typeof === g || t.getModuleId !== void 0));
81
+ s.$$typeof === Ee || s.getModuleId !== void 0));
82
82
  }
83
- function $(t, c, h) {
84
- var E = t.displayName;
85
- if (E)
86
- return E;
87
- var I = c.displayName || c.name || "";
88
- return I !== "" ? h + "(" + I + ")" : h;
83
+ function ke(s, u, p) {
84
+ var w = s.displayName;
85
+ if (w)
86
+ return w;
87
+ var N = u.displayName || u.name || "";
88
+ return N !== "" ? p + "(" + N + ")" : p;
89
89
  }
90
- function k(t) {
91
- return t.displayName || "Context";
90
+ function Se(s) {
91
+ return s.displayName || "Context";
92
92
  }
93
- function L(t) {
94
- if (t == null)
93
+ function Z(s) {
94
+ if (s == null)
95
95
  return null;
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")
97
- return t.displayName || t.name || null;
98
- if (typeof t == "string")
99
- return t;
100
- switch (t) {
101
- case o:
102
- return "Fragment";
96
+ if (typeof s.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
97
+ return s.displayName || s.name || null;
98
+ if (typeof s == "string")
99
+ return s;
100
+ switch (s) {
103
101
  case n:
102
+ return "Fragment";
103
+ case r:
104
104
  return "Portal";
105
105
  case i:
106
106
  return "Profiler";
107
- case a:
107
+ case o:
108
108
  return "StrictMode";
109
- case m:
109
+ case h:
110
110
  return "Suspense";
111
- case p:
111
+ case f:
112
112
  return "SuspenseList";
113
113
  }
114
- if (typeof t == "object")
115
- switch (t.$$typeof) {
116
- case s:
117
- var c = t;
118
- return k(c) + ".Consumer";
119
- case u:
120
- var h = t;
121
- return k(h._context) + ".Provider";
122
- case f:
123
- return $(t, t.render, "ForwardRef");
124
- case d:
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;
114
+ if (typeof s == "object")
115
+ switch (s.$$typeof) {
116
+ case c:
117
+ var u = s;
118
+ return Se(u) + ".Consumer";
119
+ case a:
120
+ var p = s;
121
+ return Se(p._context) + ".Provider";
122
+ case l:
123
+ return ke(s, s.render, "ForwardRef");
124
+ case y:
125
+ var w = s.displayName || null;
126
+ return w !== null ? w : Z(s.type) || "Memo";
127
+ case C: {
128
+ var N = s, j = N._payload, P = N._init;
129
129
  try {
130
- return L(O(Y));
130
+ return Z(P(j));
131
131
  } catch {
132
132
  return null;
133
133
  }
@@ -135,606 +135,606 @@ function Ht() {
135
135
  }
136
136
  return null;
137
137
  }
138
- var V = Object.assign, K = 0, ie, je, xe, Le, Ce, We, Ye;
139
- function Ve() {
138
+ var ce = Object.assign, pe = 0, b, T, k, O, Y, G, oe;
139
+ function me() {
140
140
  }
141
- Ve.__reactDisabledLog = !0;
142
- function tr() {
141
+ me.__reactDisabledLog = !0;
142
+ function _t() {
143
143
  {
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;
146
- var t = {
144
+ if (pe === 0) {
145
+ b = console.log, T = console.info, k = console.warn, O = console.error, Y = console.group, G = console.groupCollapsed, oe = console.groupEnd;
146
+ var s = {
147
147
  configurable: !0,
148
148
  enumerable: !0,
149
- value: Ve,
149
+ value: me,
150
150
  writable: !0
151
151
  };
152
152
  Object.defineProperties(console, {
153
- info: t,
154
- log: t,
155
- warn: t,
156
- error: t,
157
- group: t,
158
- groupCollapsed: t,
159
- groupEnd: t
153
+ info: s,
154
+ log: s,
155
+ warn: s,
156
+ error: s,
157
+ group: s,
158
+ groupCollapsed: s,
159
+ groupEnd: s
160
160
  });
161
161
  }
162
- K++;
162
+ pe++;
163
163
  }
164
164
  }
165
- function nr() {
165
+ function Tt() {
166
166
  {
167
- if (K--, K === 0) {
168
- var t = {
167
+ if (pe--, pe === 0) {
168
+ var s = {
169
169
  configurable: !0,
170
170
  enumerable: !0,
171
171
  writable: !0
172
172
  };
173
173
  Object.defineProperties(console, {
174
- log: V({}, t, {
175
- value: ie
174
+ log: ce({}, s, {
175
+ value: b
176
176
  }),
177
- info: V({}, t, {
178
- value: je
177
+ info: ce({}, s, {
178
+ value: T
179
179
  }),
180
- warn: V({}, t, {
181
- value: xe
180
+ warn: ce({}, s, {
181
+ value: k
182
182
  }),
183
- error: V({}, t, {
184
- value: Le
183
+ error: ce({}, s, {
184
+ value: O
185
185
  }),
186
- group: V({}, t, {
187
- value: Ce
186
+ group: ce({}, s, {
187
+ value: Y
188
188
  }),
189
- groupCollapsed: V({}, t, {
190
- value: We
189
+ groupCollapsed: ce({}, s, {
190
+ value: G
191
191
  }),
192
- groupEnd: V({}, t, {
193
- value: Ye
192
+ groupEnd: ce({}, s, {
193
+ value: oe
194
194
  })
195
195
  });
196
196
  }
197
- K < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
197
+ pe < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
198
198
  }
199
199
  }
200
- var _e = S.ReactCurrentDispatcher, we;
201
- function pe(t, c, h) {
200
+ var Ve = g.ReactCurrentDispatcher, ze;
201
+ function Me(s, u, p) {
202
202
  {
203
- if (we === void 0)
203
+ if (ze === void 0)
204
204
  try {
205
205
  throw Error();
206
- } catch (I) {
207
- var E = I.stack.trim().match(/\n( *(at )?)/);
208
- we = E && E[1] || "";
206
+ } catch (N) {
207
+ var w = N.stack.trim().match(/\n( *(at )?)/);
208
+ ze = w && w[1] || "";
209
209
  }
210
210
  return `
211
- ` + we + t;
211
+ ` + ze + s;
212
212
  }
213
213
  }
214
- var Te = !1, me;
214
+ var Ue = !1, Pe;
215
215
  {
216
- var or = typeof WeakMap == "function" ? WeakMap : Map;
217
- me = new or();
216
+ var kt = typeof WeakMap == "function" ? WeakMap : Map;
217
+ Pe = new kt();
218
218
  }
219
- function v(t, c) {
220
- if (!t || Te)
219
+ function E(s, u) {
220
+ if (!s || Ue)
221
221
  return "";
222
222
  {
223
- var h = me.get(t);
224
- if (h !== void 0)
225
- return h;
223
+ var p = Pe.get(s);
224
+ if (p !== void 0)
225
+ return p;
226
226
  }
227
- var E;
228
- Te = !0;
229
- var I = Error.prepareStackTrace;
227
+ var w;
228
+ Ue = !0;
229
+ var N = Error.prepareStackTrace;
230
230
  Error.prepareStackTrace = void 0;
231
- var Y;
232
- Y = _e.current, _e.current = null, tr();
231
+ var j;
232
+ j = Ve.current, Ve.current = null, _t();
233
233
  try {
234
- if (c) {
235
- var O = function() {
234
+ if (u) {
235
+ var P = function() {
236
236
  throw Error();
237
237
  };
238
- if (Object.defineProperty(O.prototype, "props", {
238
+ if (Object.defineProperty(P.prototype, "props", {
239
239
  set: function() {
240
240
  throw Error();
241
241
  }
242
242
  }), typeof Reflect == "object" && Reflect.construct) {
243
243
  try {
244
- Reflect.construct(O, []);
245
- } catch (X) {
246
- E = X;
244
+ Reflect.construct(P, []);
245
+ } catch (ee) {
246
+ w = ee;
247
247
  }
248
- Reflect.construct(t, [], O);
248
+ Reflect.construct(s, [], P);
249
249
  } else {
250
250
  try {
251
- O.call();
252
- } catch (X) {
253
- E = X;
251
+ P.call();
252
+ } catch (ee) {
253
+ w = ee;
254
254
  }
255
- t.call(O.prototype);
255
+ s.call(P.prototype);
256
256
  }
257
257
  } else {
258
258
  try {
259
259
  throw Error();
260
- } catch (X) {
261
- E = X;
260
+ } catch (ee) {
261
+ w = ee;
262
262
  }
263
- t();
263
+ s();
264
264
  }
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]; )
270
- G--;
271
- for (; z >= 1 && G >= 0; z--, G--)
272
- if (T[z] !== H[G]) {
273
- if (z !== 1 || G !== 1)
265
+ } catch (ee) {
266
+ if (ee && w && typeof ee.stack == "string") {
267
+ for (var M = ee.stack.split(`
268
+ `), X = w.stack.split(`
269
+ `), z = M.length - 1, U = X.length - 1; z >= 1 && U >= 0 && M[z] !== X[U]; )
270
+ U--;
271
+ for (; z >= 1 && U >= 0; z--, U--)
272
+ if (M[z] !== X[U]) {
273
+ if (z !== 1 || U !== 1)
274
274
  do
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;
275
+ if (z--, U--, U < 0 || M[z] !== X[U]) {
276
+ var ie = `
277
+ ` + M[z].replace(" at new ", " at ");
278
+ return s.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", s.displayName)), typeof s == "function" && Pe.set(s, ie), ie;
279
279
  }
280
- while (z >= 1 && G >= 0);
280
+ while (z >= 1 && U >= 0);
281
281
  break;
282
282
  }
283
283
  }
284
284
  } finally {
285
- Te = !1, _e.current = Y, nr(), Error.prepareStackTrace = I;
285
+ Ue = !1, Ve.current = j, Tt(), Error.prepareStackTrace = N;
286
286
  }
287
- var ye = t ? t.displayName || t.name : "", de = ye ? pe(ye) : "";
288
- return typeof t == "function" && me.set(t, de), de;
287
+ var $e = s ? s.displayName || s.name : "", Re = $e ? Me($e) : "";
288
+ return typeof s == "function" && Pe.set(s, Re), Re;
289
289
  }
290
- function Pe(t, c, h) {
291
- return v(t, !1);
290
+ function Be(s, u, p) {
291
+ return E(s, !1);
292
292
  }
293
- function ge(t) {
294
- var c = t.prototype;
295
- return !!(c && c.isReactComponent);
293
+ function Oe(s) {
294
+ var u = s.prototype;
295
+ return !!(u && u.isReactComponent);
296
296
  }
297
- function le(t, c, h) {
298
- if (t == null)
297
+ function Ce(s, u, p) {
298
+ if (s == null)
299
299
  return "";
300
- if (typeof t == "function")
301
- return v(t, ge(t));
302
- if (typeof t == "string")
303
- return pe(t);
304
- switch (t) {
305
- case m:
306
- return pe("Suspense");
307
- case p:
308
- return pe("SuspenseList");
300
+ if (typeof s == "function")
301
+ return E(s, Oe(s));
302
+ if (typeof s == "string")
303
+ return Me(s);
304
+ switch (s) {
305
+ case h:
306
+ return Me("Suspense");
307
+ case f:
308
+ return Me("SuspenseList");
309
309
  }
310
- if (typeof t == "object")
311
- switch (t.$$typeof) {
312
- case f:
313
- return Pe(t.render);
314
- case d:
315
- return le(t.type, c, h);
316
- case P: {
317
- var E = t, I = E._payload, Y = E._init;
310
+ if (typeof s == "object")
311
+ switch (s.$$typeof) {
312
+ case l:
313
+ return Be(s.render);
314
+ case y:
315
+ return Ce(s.type, u, p);
316
+ case C: {
317
+ var w = s, N = w._payload, j = w._init;
318
318
  try {
319
- return le(Y(I), c, h);
319
+ return Ce(j(N), u, p);
320
320
  } catch {
321
321
  }
322
322
  }
323
323
  }
324
324
  return "";
325
325
  }
326
- var Oe = Object.prototype.hasOwnProperty, Cr = {}, _r = S.ReactDebugCurrentFrame;
327
- function Ue(t) {
328
- if (t) {
329
- var c = t._owner, h = le(t.type, t._source, c ? c.type : null);
330
- _r.setExtraStackFrame(h);
326
+ var Ge = Object.prototype.hasOwnProperty, ir = {}, sr = g.ReactDebugCurrentFrame;
327
+ function it(s) {
328
+ if (s) {
329
+ var u = s._owner, p = Ce(s.type, s._source, u ? u.type : null);
330
+ sr.setExtraStackFrame(p);
331
331
  } else
332
- _r.setExtraStackFrame(null);
332
+ sr.setExtraStackFrame(null);
333
333
  }
334
- function bt(t, c, h, E, I) {
334
+ function Tn(s, u, p, w, N) {
335
335
  {
336
- var Y = Function.call.bind(Oe);
337
- for (var O in t)
338
- if (Y(t, O)) {
339
- var T = void 0;
336
+ var j = Function.call.bind(Ge);
337
+ for (var P in s)
338
+ if (j(s, P)) {
339
+ var M = void 0;
340
340
  try {
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;
341
+ if (typeof s[P] != "function") {
342
+ var X = Error((w || "React class") + ": " + p + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
343
+ throw X.name = "Invariant Violation", X;
344
344
  }
345
- T = t[O](c, O, E, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
345
+ M = s[P](u, P, w, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
346
346
  } catch (z) {
347
- T = z;
347
+ M = z;
348
348
  }
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
+ M && !(M instanceof Error) && (it(N), S("%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).", w || "React class", p, P, typeof M), it(null)), M instanceof Error && !(M.message in ir) && (ir[M.message] = !0, it(N), S("Failed %s type: %s", p, M.message), it(null));
350
350
  }
351
351
  }
352
352
  }
353
- var Et = Array.isArray;
354
- function ar(t) {
355
- return Et(t);
353
+ var kn = Array.isArray;
354
+ function Mt(s) {
355
+ return kn(s);
356
356
  }
357
- function St(t) {
357
+ function Mn(s) {
358
358
  {
359
- var c = typeof Symbol == "function" && Symbol.toStringTag, h = c && t[Symbol.toStringTag] || t.constructor.name || "Object";
360
- return h;
359
+ var u = typeof Symbol == "function" && Symbol.toStringTag, p = u && s[Symbol.toStringTag] || s.constructor.name || "Object";
360
+ return p;
361
361
  }
362
362
  }
363
- function Rt(t) {
363
+ function Pn(s) {
364
364
  try {
365
- return wr(t), !1;
365
+ return ar(s), !1;
366
366
  } catch {
367
367
  return !0;
368
368
  }
369
369
  }
370
- function wr(t) {
371
- return "" + t;
370
+ function ar(s) {
371
+ return "" + s;
372
372
  }
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);
373
+ function cr(s) {
374
+ if (Pn(s))
375
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Mn(s)), ar(s);
376
376
  }
377
- var Pr = S.ReactCurrentOwner, xt = {
377
+ var lr = g.ReactCurrentOwner, On = {
378
378
  key: !0,
379
379
  ref: !0,
380
380
  __self: !0,
381
381
  __source: !0
382
- }, Or, kr;
383
- function Ct(t) {
384
- if (Oe.call(t, "ref")) {
385
- var c = Object.getOwnPropertyDescriptor(t, "ref").get;
386
- if (c && c.isReactWarning)
382
+ }, ur, fr;
383
+ function An(s) {
384
+ if (Ge.call(s, "ref")) {
385
+ var u = Object.getOwnPropertyDescriptor(s, "ref").get;
386
+ if (u && u.isReactWarning)
387
387
  return !1;
388
388
  }
389
- return t.ref !== void 0;
389
+ return s.ref !== void 0;
390
390
  }
391
- function _t(t) {
392
- if (Oe.call(t, "key")) {
393
- var c = Object.getOwnPropertyDescriptor(t, "key").get;
394
- if (c && c.isReactWarning)
391
+ function $n(s) {
392
+ if (Ge.call(s, "key")) {
393
+ var u = Object.getOwnPropertyDescriptor(s, "key").get;
394
+ if (u && u.isReactWarning)
395
395
  return !1;
396
396
  }
397
- return t.key !== void 0;
397
+ return s.key !== void 0;
398
398
  }
399
- function wt(t, c) {
400
- typeof t.ref == "string" && Pr.current;
399
+ function Fn(s, u) {
400
+ typeof s.ref == "string" && lr.current;
401
401
  }
402
- function Tt(t, c) {
402
+ function Ln(s, u) {
403
403
  {
404
- var h = function() {
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));
404
+ var p = function() {
405
+ ur || (ur = !0, S("%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)", u));
406
406
  };
407
- h.isReactWarning = !0, Object.defineProperty(t, "key", {
408
- get: h,
407
+ p.isReactWarning = !0, Object.defineProperty(s, "key", {
408
+ get: p,
409
409
  configurable: !0
410
410
  });
411
411
  }
412
412
  }
413
- function Pt(t, c) {
413
+ function Nn(s, u) {
414
414
  {
415
- var h = function() {
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));
415
+ var p = function() {
416
+ fr || (fr = !0, S("%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)", u));
417
417
  };
418
- h.isReactWarning = !0, Object.defineProperty(t, "ref", {
419
- get: h,
418
+ p.isReactWarning = !0, Object.defineProperty(s, "ref", {
419
+ get: p,
420
420
  configurable: !0
421
421
  });
422
422
  }
423
423
  }
424
- var Ot = function(t, c, h, E, I, Y, O) {
425
- var T = {
424
+ var In = function(s, u, p, w, N, j, P) {
425
+ var M = {
426
426
  // This tag allows us to uniquely identify this as a React Element
427
- $$typeof: r,
427
+ $$typeof: t,
428
428
  // Built-in properties that belong on the element
429
- type: t,
430
- key: c,
431
- ref: h,
432
- props: O,
429
+ type: s,
430
+ key: u,
431
+ ref: p,
432
+ props: P,
433
433
  // Record the component responsible for creating this element.
434
- _owner: Y
434
+ _owner: j
435
435
  };
436
- return T._store = {}, Object.defineProperty(T._store, "validated", {
436
+ return M._store = {}, Object.defineProperty(M._store, "validated", {
437
437
  configurable: !1,
438
438
  enumerable: !1,
439
439
  writable: !0,
440
440
  value: !1
441
- }), Object.defineProperty(T, "_self", {
441
+ }), Object.defineProperty(M, "_self", {
442
442
  configurable: !1,
443
443
  enumerable: !1,
444
444
  writable: !1,
445
- value: E
446
- }), Object.defineProperty(T, "_source", {
445
+ value: w
446
+ }), Object.defineProperty(M, "_source", {
447
447
  configurable: !1,
448
448
  enumerable: !1,
449
449
  writable: !1,
450
- value: I
451
- }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
450
+ value: N
451
+ }), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
452
452
  };
453
- function kt(t, c, h, E, I) {
453
+ function Dn(s, u, p, w, N) {
454
454
  {
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]);
459
- if (t && t.defaultProps) {
460
- var z = t.defaultProps;
461
- for (Y in z)
462
- O[Y] === void 0 && (O[Y] = z[Y]);
455
+ var j, P = {}, M = null, X = null;
456
+ p !== void 0 && (cr(p), M = "" + p), $n(u) && (cr(u.key), M = "" + u.key), An(u) && (X = u.ref, Fn(u, N));
457
+ for (j in u)
458
+ Ge.call(u, j) && !On.hasOwnProperty(j) && (P[j] = u[j]);
459
+ if (s && s.defaultProps) {
460
+ var z = s.defaultProps;
461
+ for (j in z)
462
+ P[j] === void 0 && (P[j] = z[j]);
463
463
  }
464
- if (T || H) {
465
- var G = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
466
- T && Tt(O, G), H && Pt(O, G);
464
+ if (M || X) {
465
+ var U = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
466
+ M && Ln(P, U), X && Nn(P, U);
467
467
  }
468
- return Ot(t, T, H, I, E, Pr.current, O);
468
+ return In(s, M, X, N, w, lr.current, P);
469
469
  }
470
470
  }
471
- var ir = S.ReactCurrentOwner, $r = S.ReactDebugCurrentFrame;
472
- function ve(t) {
473
- if (t) {
474
- var c = t._owner, h = le(t.type, t._source, c ? c.type : null);
475
- $r.setExtraStackFrame(h);
471
+ var Pt = g.ReactCurrentOwner, hr = g.ReactDebugCurrentFrame;
472
+ function Ae(s) {
473
+ if (s) {
474
+ var u = s._owner, p = Ce(s.type, s._source, u ? u.type : null);
475
+ hr.setExtraStackFrame(p);
476
476
  } else
477
- $r.setExtraStackFrame(null);
477
+ hr.setExtraStackFrame(null);
478
478
  }
479
- var sr;
480
- sr = !1;
481
- function cr(t) {
482
- return typeof t == "object" && t !== null && t.$$typeof === r;
479
+ var Ot;
480
+ Ot = !1;
481
+ function At(s) {
482
+ return typeof s == "object" && s !== null && s.$$typeof === t;
483
483
  }
484
- function Ar() {
484
+ function dr() {
485
485
  {
486
- if (ir.current) {
487
- var t = L(ir.current.type);
488
- if (t)
486
+ if (Pt.current) {
487
+ var s = Z(Pt.current.type);
488
+ if (s)
489
489
  return `
490
490
 
491
- Check the render method of \`` + t + "`.";
491
+ Check the render method of \`` + s + "`.";
492
492
  }
493
493
  return "";
494
494
  }
495
495
  }
496
- function $t(t) {
496
+ function Wn(s) {
497
497
  return "";
498
498
  }
499
- var Mr = {};
500
- function At(t) {
499
+ var pr = {};
500
+ function jn(s) {
501
501
  {
502
- var c = Ar();
503
- if (!c) {
504
- var h = typeof t == "string" ? t : t.displayName || t.name;
505
- h && (c = `
502
+ var u = dr();
503
+ if (!u) {
504
+ var p = typeof s == "string" ? s : s.displayName || s.name;
505
+ p && (u = `
506
506
 
507
- Check the top-level render call using <` + h + ">.");
507
+ Check the top-level render call using <` + p + ">.");
508
508
  }
509
- return c;
509
+ return u;
510
510
  }
511
511
  }
512
- function Nr(t, c) {
512
+ function mr(s, u) {
513
513
  {
514
- if (!t._store || t._store.validated || t.key != null)
514
+ if (!s._store || s._store.validated || s.key != null)
515
515
  return;
516
- t._store.validated = !0;
517
- var h = At(c);
518
- if (Mr[h])
516
+ s._store.validated = !0;
517
+ var p = jn(u);
518
+ if (pr[p])
519
519
  return;
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);
520
+ pr[p] = !0;
521
+ var w = "";
522
+ s && s._owner && s._owner !== Pt.current && (w = " It was passed a child from " + Z(s._owner.type) + "."), Ae(s), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, w), Ae(null);
523
523
  }
524
524
  }
525
- function Ir(t, c) {
525
+ function gr(s, u) {
526
526
  {
527
- if (typeof t != "object")
527
+ if (typeof s != "object")
528
528
  return;
529
- if (ar(t))
530
- for (var h = 0; h < t.length; h++) {
531
- var E = t[h];
532
- cr(E) && Nr(E, c);
529
+ if (Mt(s))
530
+ for (var p = 0; p < s.length; p++) {
531
+ var w = s[p];
532
+ At(w) && mr(w, u);
533
533
  }
534
- else if (cr(t))
535
- t._store && (t._store.validated = !0);
536
- else if (t) {
537
- var I = y(t);
538
- if (typeof I == "function" && I !== t.entries)
539
- for (var Y = I.call(t), O; !(O = Y.next()).done; )
540
- cr(O.value) && Nr(O.value, c);
534
+ else if (At(s))
535
+ s._store && (s._store.validated = !0);
536
+ else if (s) {
537
+ var N = x(s);
538
+ if (typeof N == "function" && N !== s.entries)
539
+ for (var j = N.call(s), P; !(P = j.next()).done; )
540
+ At(P.value) && mr(P.value, u);
541
541
  }
542
542
  }
543
543
  }
544
- function Mt(t) {
544
+ function qn(s) {
545
545
  {
546
- var c = t.type;
547
- if (c == null || typeof c == "string")
546
+ var u = s.type;
547
+ if (u == null || typeof u == "string")
548
548
  return;
549
- var h;
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.
549
+ var p;
550
+ if (typeof u == "function")
551
+ p = u.propTypes;
552
+ else if (typeof u == "object" && (u.$$typeof === l || // Note: Memo only checks outer props here.
553
553
  // Inner props are checked in the reconciler.
554
- c.$$typeof === d))
555
- h = c.propTypes;
554
+ u.$$typeof === y))
555
+ p = u.propTypes;
556
556
  else
557
557
  return;
558
- if (h) {
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");
558
+ if (p) {
559
+ var w = Z(u);
560
+ Tn(p, s.props, "prop", w, s);
561
+ } else if (u.PropTypes !== void 0 && !Ot) {
562
+ Ot = !0;
563
+ var N = Z(u);
564
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
565
565
  }
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
+ typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
567
567
  }
568
568
  }
569
- function Nt(t) {
569
+ function Yn(s) {
570
570
  {
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);
571
+ for (var u = Object.keys(s.props), p = 0; p < u.length; p++) {
572
+ var w = u[p];
573
+ if (w !== "children" && w !== "key") {
574
+ Ae(s), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), Ae(null);
575
575
  break;
576
576
  }
577
577
  }
578
- t.ref !== null && (ve(t), b("Invalid attribute `ref` supplied to `React.Fragment`."), ve(null));
578
+ s.ref !== null && (Ae(s), S("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
579
579
  }
580
580
  }
581
- var Fr = {};
582
- function Dr(t, c, h, E, I, Y) {
581
+ var vr = {};
582
+ function yr(s, u, p, w, N, j) {
583
583
  {
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();
584
+ var P = Te(s);
585
+ if (!P) {
586
+ var M = "";
587
+ (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (M += " 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 X = Wn();
589
+ X ? M += X : M += dr();
590
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
+ s === null ? z = "null" : Mt(s) ? z = "array" : s !== void 0 && s.$$typeof === t ? (z = "<" + (Z(s.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : z = typeof s, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", z, M);
592
592
  }
593
- var G = kt(t, c, h, I, Y);
594
- if (G == null)
595
- return G;
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);
593
+ var U = Dn(s, u, p, N, j);
594
+ if (U == null)
595
+ return U;
596
+ if (P) {
597
+ var ie = u.children;
598
+ if (ie !== void 0)
599
+ if (w)
600
+ if (Mt(ie)) {
601
+ for (var $e = 0; $e < ie.length; $e++)
602
+ gr(ie[$e], s);
603
+ Object.freeze && Object.freeze(ie);
604
604
  } else
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
+ S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
606
606
  else
607
- Ir(re, t);
607
+ gr(ie, s);
608
608
  }
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:
609
+ if (Ge.call(u, "key")) {
610
+ var Re = Z(s), ee = Object.keys(u).filter(function(Hn) {
611
+ return Hn !== "key";
612
+ }), $t = ee.length > 0 ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}";
613
+ if (!vr[Re + $t]) {
614
+ var Gn = ee.length > 0 ? "{" + ee.join(": ..., ") + ": ...}" : "{}";
615
+ S(`A props object containing a "key" prop is being spread into JSX:
616
616
  let props = %s;
617
617
  <%s {...props} />
618
618
  React keys must be passed directly to JSX without using spread:
619
619
  let props = %s;
620
- <%s key={someKey} {...props} />`, fr, de, Lt, de), Fr[de + fr] = !0;
620
+ <%s key={someKey} {...props} />`, $t, Re, Gn, Re), vr[Re + $t] = !0;
621
621
  }
622
622
  }
623
- return t === o ? Nt(G) : Mt(G), G;
623
+ return s === n ? Yn(U) : qn(U), U;
624
624
  }
625
625
  }
626
- function It(t, c, h) {
627
- return Dr(t, c, h, !0);
626
+ function Vn(s, u, p) {
627
+ return yr(s, u, p, !0);
628
628
  }
629
- function Ft(t, c, h) {
630
- return Dr(t, c, h, !1);
629
+ function zn(s, u, p) {
630
+ return yr(s, u, p, !1);
631
631
  }
632
- var Dt = Ft, jt = It;
633
- $e.Fragment = o, $e.jsx = Dt, $e.jsxs = jt;
634
- }()), $e;
632
+ var Un = zn, Bn = Vn;
633
+ Je.Fragment = n, Je.jsx = Un, Je.jsxs = Bn;
634
+ }()), Je;
635
635
  }
636
- process.env.NODE_ENV === "production" ? hr.exports = Kt() : hr.exports = Ht();
637
- var zr = hr.exports;
638
- function Xt(e) {
636
+ process.env.NODE_ENV === "production" ? Wt.exports = so() : Wt.exports = ao();
637
+ var wr = Wt.exports;
638
+ function co(e) {
639
639
  if (e.sheet)
640
640
  return e.sheet;
641
- for (var r = 0; r < document.styleSheets.length; r++)
642
- if (document.styleSheets[r].ownerNode === e)
643
- return document.styleSheets[r];
644
- }
645
- function Zt(e) {
646
- var r = document.createElement("style");
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;
648
- }
649
- var Qt = /* @__PURE__ */ function() {
650
- function e(n) {
651
- var o = this;
652
- this._insertTag = function(a) {
641
+ for (var t = 0; t < document.styleSheets.length; t++)
642
+ if (document.styleSheets[t].ownerNode === e)
643
+ return document.styleSheets[t];
644
+ }
645
+ function lo(e) {
646
+ var t = document.createElement("style");
647
+ return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
648
+ }
649
+ var uo = /* @__PURE__ */ function() {
650
+ function e(r) {
651
+ var n = this;
652
+ this._insertTag = function(o) {
653
653
  var i;
654
- o.tags.length === 0 ? o.insertionPoint ? i = o.insertionPoint.nextSibling : o.prepend ? i = o.container.firstChild : i = o.before : i = o.tags[o.tags.length - 1].nextSibling, o.container.insertBefore(a, i), o.tags.push(a);
655
- }, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null;
656
- }
657
- var r = e.prototype;
658
- return r.hydrate = function(o) {
659
- o.forEach(this._insertTag);
660
- }, r.insert = function(o) {
661
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Zt(this));
662
- var a = this.tags[this.tags.length - 1];
654
+ n.tags.length === 0 ? n.insertionPoint ? i = n.insertionPoint.nextSibling : n.prepend ? i = n.container.firstChild : i = n.before : i = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(o, i), n.tags.push(o);
655
+ }, this.isSpeedy = r.speedy === void 0 ? !0 : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
656
+ }
657
+ var t = e.prototype;
658
+ return t.hydrate = function(n) {
659
+ n.forEach(this._insertTag);
660
+ }, t.insert = function(n) {
661
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(lo(this));
662
+ var o = this.tags[this.tags.length - 1];
663
663
  if (this.isSpeedy) {
664
- var i = Xt(a);
664
+ var i = co(o);
665
665
  try {
666
- i.insertRule(o, i.cssRules.length);
666
+ i.insertRule(n, i.cssRules.length);
667
667
  } catch {
668
668
  }
669
669
  } else
670
- a.appendChild(document.createTextNode(o));
670
+ o.appendChild(document.createTextNode(n));
671
671
  this.ctr++;
672
- }, r.flush = function() {
673
- this.tags.forEach(function(o) {
674
- var a;
675
- return (a = o.parentNode) == null ? void 0 : a.removeChild(o);
672
+ }, t.flush = function() {
673
+ this.tags.forEach(function(n) {
674
+ var o;
675
+ return (o = n.parentNode) == null ? void 0 : o.removeChild(n);
676
676
  }), this.tags = [], this.ctr = 0;
677
677
  }, e;
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) {
680
- return J(e, 0) ^ 45 ? (((r << 2 ^ J(e, 0)) << 2 ^ J(e, 1)) << 2 ^ J(e, 2)) << 2 ^ J(e, 3) : 0;
678
+ }(), K = "-ms-", mt = "-moz-", F = "-webkit-", en = "comm", Ht = "rule", Jt = "decl", fo = "@import", tn = "@keyframes", ho = "@layer", po = Math.abs, St = String.fromCharCode, mo = Object.assign;
679
+ function go(e, t) {
680
+ return J(e, 0) ^ 45 ? (((t << 2 ^ J(e, 0)) << 2 ^ J(e, 1)) << 2 ^ J(e, 2)) << 2 ^ J(e, 3) : 0;
681
681
  }
682
- function ct(e) {
682
+ function rn(e) {
683
683
  return e.trim();
684
684
  }
685
- function an(e, r) {
686
- return (e = r.exec(e)) ? e[0] : e;
685
+ function vo(e, t) {
686
+ return (e = t.exec(e)) ? e[0] : e;
687
687
  }
688
- function N(e, r, n) {
689
- return e.replace(r, n);
688
+ function L(e, t, r) {
689
+ return e.replace(t, r);
690
690
  }
691
- function pr(e, r) {
692
- return e.indexOf(r);
691
+ function jt(e, t) {
692
+ return e.indexOf(t);
693
693
  }
694
- function J(e, r) {
695
- return e.charCodeAt(r) | 0;
694
+ function J(e, t) {
695
+ return e.charCodeAt(t) | 0;
696
696
  }
697
- function Ne(e, r, n) {
698
- return e.slice(r, n);
697
+ function Xe(e, t, r) {
698
+ return e.slice(t, r);
699
699
  }
700
- function ne(e) {
700
+ function fe(e) {
701
701
  return e.length;
702
702
  }
703
- function Er(e) {
703
+ function Kt(e) {
704
704
  return e.length;
705
705
  }
706
- function ze(e, r) {
707
- return r.push(e), e;
706
+ function st(e, t) {
707
+ return t.push(e), e;
708
708
  }
709
- function sn(e, r) {
710
- return e.map(r).join("");
709
+ function yo(e, t) {
710
+ return e.map(t).join("");
711
711
  }
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: "" };
712
+ var Ct = 1, De = 1, nn = 0, te = 0, B = 0, qe = "";
713
+ function Rt(e, t, r, n, o, i, a) {
714
+ return { value: e, root: t, parent: r, type: n, props: o, children: i, line: Ct, column: De, length: a, return: "" };
715
715
  }
716
- function Ae(e, r) {
717
- return nn(er("", null, null, "", null, null, 0), e, { length: -e.length }, r);
716
+ function Ke(e, t) {
717
+ return mo(Rt("", null, null, "", null, null, 0), e, { length: -e.length }, t);
718
718
  }
719
- function cn() {
720
- return q;
719
+ function bo() {
720
+ return B;
721
721
  }
722
- function fn() {
723
- return q = Z > 0 ? J(Se, --Z) : 0, Ee--, q === 10 && (Ee = 1, Qe--), q;
722
+ function xo() {
723
+ return B = te > 0 ? J(qe, --te) : 0, De--, B === 10 && (De = 1, Ct--), B;
724
724
  }
725
- function ee() {
726
- return q = Z < ft ? J(Se, Z++) : 0, Ee++, q === 10 && (Ee = 1, Qe++), q;
725
+ function ne() {
726
+ return B = te < nn ? J(qe, te++) : 0, De++, B === 10 && (De = 1, Ct++), B;
727
727
  }
728
- function ae() {
729
- return J(Se, Z);
728
+ function de() {
729
+ return J(qe, te);
730
730
  }
731
- function Ge() {
732
- return Z;
731
+ function lt() {
732
+ return te;
733
733
  }
734
- function De(e, r) {
735
- return Ne(Se, e, r);
734
+ function nt(e, t) {
735
+ return Xe(qe, e, t);
736
736
  }
737
- function Ie(e) {
737
+ function Ze(e) {
738
738
  switch (e) {
739
739
  case 0:
740
740
  case 9:
@@ -766,249 +766,249 @@ function Ie(e) {
766
766
  }
767
767
  return 0;
768
768
  }
769
- function ut(e) {
770
- return Qe = Ee = 1, ft = ne(Se = e), Z = 0, [];
769
+ function on(e) {
770
+ return Ct = De = 1, nn = fe(qe = e), te = 0, [];
771
771
  }
772
- function lt(e) {
773
- return Se = "", e;
772
+ function sn(e) {
773
+ return qe = "", e;
774
774
  }
775
- function qe(e) {
776
- return ct(De(Z - 1, mr(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
775
+ function ut(e) {
776
+ return rn(nt(te - 1, qt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
777
777
  }
778
- function un(e) {
779
- for (; (q = ae()) && q < 33; )
780
- ee();
781
- return Ie(e) > 2 || Ie(q) > 3 ? "" : " ";
778
+ function Eo(e) {
779
+ for (; (B = de()) && B < 33; )
780
+ ne();
781
+ return Ze(e) > 2 || Ze(B) > 3 ? "" : " ";
782
782
  }
783
- function ln(e, r) {
784
- for (; --r && ee() && !(q < 48 || q > 102 || q > 57 && q < 65 || q > 70 && q < 97); )
783
+ function So(e, t) {
784
+ for (; --t && ne() && !(B < 48 || B > 102 || B > 57 && B < 65 || B > 70 && B < 97); )
785
785
  ;
786
- return De(e, Ge() + (r < 6 && ae() == 32 && ee() == 32));
786
+ return nt(e, lt() + (t < 6 && de() == 32 && ne() == 32));
787
787
  }
788
- function mr(e) {
789
- for (; ee(); )
790
- switch (q) {
788
+ function qt(e) {
789
+ for (; ne(); )
790
+ switch (B) {
791
791
  case e:
792
- return Z;
792
+ return te;
793
793
  case 34:
794
794
  case 39:
795
- e !== 34 && e !== 39 && mr(q);
795
+ e !== 34 && e !== 39 && qt(B);
796
796
  break;
797
797
  case 40:
798
- e === 41 && mr(e);
798
+ e === 41 && qt(e);
799
799
  break;
800
800
  case 92:
801
- ee();
801
+ ne();
802
802
  break;
803
803
  }
804
- return Z;
804
+ return te;
805
805
  }
806
- function dn(e, r) {
807
- for (; ee() && e + q !== 57; )
808
- if (e + q === 84 && ae() === 47)
806
+ function Co(e, t) {
807
+ for (; ne() && e + B !== 57; )
808
+ if (e + B === 84 && de() === 47)
809
809
  break;
810
- return "/*" + De(r, Z - 1) + "*" + Ze(e === 47 ? e : ee());
810
+ return "/*" + nt(t, te - 1) + "*" + St(e === 47 ? e : ne());
811
811
  }
812
- function hn(e) {
813
- for (; !Ie(ae()); )
814
- ee();
815
- return De(e, Z);
812
+ function Ro(e) {
813
+ for (; !Ze(de()); )
814
+ ne();
815
+ return nt(e, te);
816
816
  }
817
- function pn(e) {
818
- return lt(Je("", null, null, null, [""], e = ut(e), 0, [0], e));
817
+ function wo(e) {
818
+ return sn(ft("", null, null, null, [""], e = on(e), 0, [0], e));
819
819
  }
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()) {
820
+ function ft(e, t, r, n, o, i, a, c, l) {
821
+ for (var h = 0, f = 0, y = a, C = 0, v = 0, R = 0, m = 1, x = 1, g = 1, S = 0, _ = "", $ = o, d = i, q = n, A = _; x; )
822
+ switch (R = S, S = ne()) {
823
823
  case 40:
824
- if (x != 108 && J(A, d - 1) == 58) {
825
- pr(A += N(qe(b), "&", "&\f"), "&\f") != -1 && (S = -1);
824
+ if (R != 108 && J(A, y - 1) == 58) {
825
+ jt(A += L(ut(S), "&", "&\f"), "&\f") != -1 && (g = -1);
826
826
  break;
827
827
  }
828
828
  case 34:
829
829
  case 39:
830
830
  case 91:
831
- A += qe(b);
831
+ A += ut(S);
832
832
  break;
833
833
  case 9:
834
834
  case 10:
835
835
  case 13:
836
836
  case 32:
837
- A += un(x);
837
+ A += Eo(R);
838
838
  break;
839
839
  case 92:
840
- A += ln(Ge() - 1, 7);
840
+ A += So(lt() - 1, 7);
841
841
  continue;
842
842
  case 47:
843
- switch (ae()) {
843
+ switch (de()) {
844
844
  case 42:
845
845
  case 47:
846
- ze(mn(dn(ee(), Ge()), r, n), f);
846
+ st(_o(Co(ne(), lt()), t, r), l);
847
847
  break;
848
848
  default:
849
849
  A += "/";
850
850
  }
851
851
  break;
852
- case 123 * R:
853
- s[m++] = ne(A) * S;
854
- case 125 * R:
852
+ case 123 * m:
853
+ c[h++] = fe(A) * g;
854
+ case 125 * m:
855
855
  case 59:
856
856
  case 0:
857
- switch (b) {
857
+ switch (S) {
858
858
  case 0:
859
859
  case 125:
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);
860
+ x = 0;
861
+ case 59 + f:
862
+ g == -1 && (A = L(A, /\f/g, "")), v > 0 && fe(A) - y && st(v > 32 ? Tr(A + ";", n, r, y - 1) : Tr(L(A, " ", "") + ";", n, r, y - 2), l);
863
863
  break;
864
864
  case 59:
865
865
  A += ";";
866
866
  default:
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);
867
+ if (st(q = _r(A, t, r, h, f, o, c, _, $ = [], d = [], y), i), S === 123)
868
+ if (f === 0)
869
+ ft(A, t, q, q, $, i, y, c, d);
870
870
  else
871
- switch (P === 99 && J(A, 3) === 110 ? 100 : P) {
871
+ switch (C === 99 && J(A, 3) === 110 ? 100 : C) {
872
872
  case 100:
873
873
  case 108:
874
874
  case 109:
875
875
  case 115:
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
+ ft(e, q, q, n && st(_r(e, q, q, 0, 0, o, c, _, o, $ = [], y), d), o, d, y, c, n ? $ : d);
877
877
  break;
878
878
  default:
879
- Je(A, U, U, U, [""], l, 0, s, l);
879
+ ft(A, q, q, q, [""], d, 0, c, d);
880
880
  }
881
881
  }
882
- m = p = C = 0, R = S = 1, _ = A = "", d = u;
882
+ h = f = v = 0, m = g = 1, _ = A = "", y = a;
883
883
  break;
884
884
  case 58:
885
- d = 1 + ne(A), C = x;
885
+ y = 1 + fe(A), v = R;
886
886
  default:
887
- if (R < 1) {
888
- if (b == 123)
889
- --R;
890
- else if (b == 125 && R++ == 0 && fn() == 125)
887
+ if (m < 1) {
888
+ if (S == 123)
889
+ --m;
890
+ else if (S == 125 && m++ == 0 && xo() == 125)
891
891
  continue;
892
892
  }
893
- switch (A += Ze(b), b * R) {
893
+ switch (A += St(S), S * m) {
894
894
  case 38:
895
- S = p > 0 ? 1 : (A += "\f", -1);
895
+ g = f > 0 ? 1 : (A += "\f", -1);
896
896
  break;
897
897
  case 44:
898
- s[m++] = (ne(A) - 1) * S, S = 1;
898
+ c[h++] = (fe(A) - 1) * g, g = 1;
899
899
  break;
900
900
  case 64:
901
- ae() === 45 && (A += qe(ee())), P = ae(), p = d = ne(_ = A += hn(Ge())), b++;
901
+ de() === 45 && (A += ut(ne())), C = de(), f = y = fe(_ = A += Ro(lt())), S++;
902
902
  break;
903
903
  case 45:
904
- x === 45 && ne(A) == 2 && (R = 0);
904
+ R === 45 && fe(A) == 2 && (m = 0);
905
905
  }
906
906
  }
907
907
  return i;
908
908
  }
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);
909
+ function _r(e, t, r, n, o, i, a, c, l, h, f) {
910
+ for (var y = o - 1, C = o === 0 ? i : [""], v = Kt(C), R = 0, m = 0, x = 0; R < n; ++R)
911
+ for (var g = 0, S = Xe(e, y + 1, y = po(m = a[R])), _ = e; g < v; ++g)
912
+ (_ = rn(m > 0 ? C[g] + " " + S : L(S, /&\f/g, C[g]))) && (l[x++] = _);
913
+ return Rt(e, t, r, o === 0 ? Ht : c, l, h, f);
914
914
  }
915
- function mn(e, r, n) {
916
- return er(e, r, n, it, Ze(cn()), Ne(e, 2, -2), 0);
915
+ function _o(e, t, r) {
916
+ return Rt(e, t, r, en, St(bo()), Xe(e, 2, -2), 0);
917
917
  }
918
- function qr(e, r, n, o) {
919
- return er(e, r, n, br, Ne(e, 0, o), Ne(e, o + 1, -1), o);
918
+ function Tr(e, t, r, n) {
919
+ return Rt(e, t, r, Jt, Xe(e, 0, n), Xe(e, n + 1, -1), n);
920
920
  }
921
- function be(e, r) {
922
- for (var n = "", o = Er(e), a = 0; a < o; a++)
923
- n += r(e[a], a, e, r) || "";
924
- return n;
921
+ function Ne(e, t) {
922
+ for (var r = "", n = Kt(e), o = 0; o < n; o++)
923
+ r += t(e[o], o, e, t) || "";
924
+ return r;
925
925
  }
926
- function gn(e, r, n, o) {
926
+ function To(e, t, r, n) {
927
927
  switch (e.type) {
928
- case rn:
928
+ case ho:
929
929
  if (e.children.length) break;
930
- case en:
931
- case br:
930
+ case fo:
931
+ case Jt:
932
932
  return e.return = e.return || e.value;
933
- case it:
933
+ case en:
934
934
  return "";
935
- case st:
936
- return e.return = e.value + "{" + be(e.children, o) + "}";
937
- case yr:
935
+ case tn:
936
+ return e.return = e.value + "{" + Ne(e.children, n) + "}";
937
+ case Ht:
938
938
  e.value = e.props.join(",");
939
939
  }
940
- return ne(n = be(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
940
+ return fe(r = Ne(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
941
941
  }
942
- function vn(e) {
943
- var r = Er(e);
944
- return function(n, o, a, i) {
945
- for (var u = "", s = 0; s < r; s++)
946
- u += e[s](n, o, a, i) || "";
947
- return u;
942
+ function ko(e) {
943
+ var t = Kt(e);
944
+ return function(r, n, o, i) {
945
+ for (var a = "", c = 0; c < t; c++)
946
+ a += e[c](r, n, o, i) || "";
947
+ return a;
948
948
  };
949
949
  }
950
- function yn(e) {
951
- return function(r) {
952
- r.root || (r = r.return) && e(r);
950
+ function Mo(e) {
951
+ return function(t) {
952
+ t.root || (t = t.return) && e(t);
953
953
  };
954
954
  }
955
- function bn(e) {
956
- var r = /* @__PURE__ */ Object.create(null);
957
- return function(n) {
958
- return r[n] === void 0 && (r[n] = e(n)), r[n];
955
+ function Po(e) {
956
+ var t = /* @__PURE__ */ Object.create(null);
957
+ return function(r) {
958
+ return t[r] === void 0 && (t[r] = e(r)), t[r];
959
959
  };
960
960
  }
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) {
966
- var o = -1, a = 44;
961
+ var Oo = function(t, r, n) {
962
+ for (var o = 0, i = 0; o = i, i = de(), o === 38 && i === 12 && (r[n] = 1), !Ze(i); )
963
+ ne();
964
+ return nt(t, te);
965
+ }, Ao = function(t, r) {
966
+ var n = -1, o = 44;
967
967
  do
968
- switch (Ie(a)) {
968
+ switch (Ze(o)) {
969
969
  case 0:
970
- a === 38 && ae() === 12 && (n[o] = 1), r[o] += En(Z - 1, n, o);
970
+ o === 38 && de() === 12 && (r[n] = 1), t[n] += Oo(te - 1, r, n);
971
971
  break;
972
972
  case 2:
973
- r[o] += qe(a);
973
+ t[n] += ut(o);
974
974
  break;
975
975
  case 4:
976
- if (a === 44) {
977
- r[++o] = ae() === 58 ? "&\f" : "", n[o] = r[o].length;
976
+ if (o === 44) {
977
+ t[++n] = de() === 58 ? "&\f" : "", r[n] = t[n].length;
978
978
  break;
979
979
  }
980
980
  default:
981
- r[o] += Ze(a);
982
- }
983
- while (a = ee());
984
- return r;
985
- }, Rn = function(r, n) {
986
- return lt(Sn(ut(r), n));
987
- }, Jr = /* @__PURE__ */ new WeakMap(), xn = function(r) {
988
- if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo
981
+ t[n] += St(o);
982
+ }
983
+ while (o = ne());
984
+ return t;
985
+ }, $o = function(t, r) {
986
+ return sn(Ao(on(t), r));
987
+ }, kr = /* @__PURE__ */ new WeakMap(), Fo = function(t) {
988
+ if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
989
989
  // negative .length indicates that this rule has been already prefixed
990
- r.length < 1)) {
991
- for (var n = r.value, o = r.parent, a = r.column === o.column && r.line === o.line; o.type !== "rule"; )
992
- if (o = o.parent, !o) return;
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];
998
- }
999
- }
1000
- }, Cn = function(r) {
1001
- if (r.type === "decl") {
1002
- var n = r.value;
990
+ t.length < 1)) {
991
+ for (var r = t.value, n = t.parent, o = t.column === n.column && t.line === n.line; n.type !== "rule"; )
992
+ if (n = n.parent, !n) return;
993
+ if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !kr.get(n)) && !o) {
994
+ kr.set(t, !0);
995
+ for (var i = [], a = $o(r, i), c = n.props, l = 0, h = 0; l < a.length; l++)
996
+ for (var f = 0; f < c.length; f++, h++)
997
+ t.props[h] = i[l] ? a[l].replace(/&\f/g, c[f]) : c[f] + " " + a[l];
998
+ }
999
+ }
1000
+ }, Lo = function(t) {
1001
+ if (t.type === "decl") {
1002
+ var r = t.value;
1003
1003
  // charcode for l
1004
- n.charCodeAt(0) === 108 && // charcode for b
1005
- n.charCodeAt(2) === 98 && (r.return = "", r.value = "");
1004
+ r.charCodeAt(0) === 108 && // charcode for b
1005
+ r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
1006
1006
  }
1007
1007
  };
1008
- function dt(e, r) {
1009
- switch (on(e, r)) {
1008
+ function an(e, t) {
1009
+ switch (go(e, t)) {
1010
1010
  case 5103:
1011
- return M + "print-" + e + e;
1011
+ return F + "print-" + e + e;
1012
1012
  case 5737:
1013
1013
  case 4201:
1014
1014
  case 3177:
@@ -1034,44 +1034,44 @@ function dt(e, r) {
1034
1034
  case 5365:
1035
1035
  case 5621:
1036
1036
  case 3829:
1037
- return M + e + e;
1037
+ return F + e + e;
1038
1038
  case 5349:
1039
1039
  case 4246:
1040
1040
  case 4810:
1041
1041
  case 6968:
1042
1042
  case 2756:
1043
- return M + e + He + e + B + e + e;
1043
+ return F + e + mt + e + K + e + e;
1044
1044
  case 6828:
1045
1045
  case 4268:
1046
- return M + e + B + e + e;
1046
+ return F + e + K + e + e;
1047
1047
  case 6165:
1048
- return M + e + B + "flex-" + e + e;
1048
+ return F + e + K + "flex-" + e + e;
1049
1049
  case 5187:
1050
- return M + e + N(e, /(\w+).+(:[^]+)/, M + "box-$1$2" + B + "flex-$1$2") + e;
1050
+ return F + e + L(e, /(\w+).+(:[^]+)/, F + "box-$1$2" + K + "flex-$1$2") + e;
1051
1051
  case 5443:
1052
- return M + e + B + "flex-item-" + N(e, /flex-|-self/, "") + e;
1052
+ return F + e + K + "flex-item-" + L(e, /flex-|-self/, "") + e;
1053
1053
  case 4675:
1054
- return M + e + B + "flex-line-pack" + N(e, /align-content|flex-|-self/, "") + e;
1054
+ return F + e + K + "flex-line-pack" + L(e, /align-content|flex-|-self/, "") + e;
1055
1055
  case 5548:
1056
- return M + e + B + N(e, "shrink", "negative") + e;
1056
+ return F + e + K + L(e, "shrink", "negative") + e;
1057
1057
  case 5292:
1058
- return M + e + B + N(e, "basis", "preferred-size") + e;
1058
+ return F + e + K + L(e, "basis", "preferred-size") + e;
1059
1059
  case 6060:
1060
- return M + "box-" + N(e, "-grow", "") + M + e + B + N(e, "grow", "positive") + e;
1060
+ return F + "box-" + L(e, "-grow", "") + F + e + K + L(e, "grow", "positive") + e;
1061
1061
  case 4554:
1062
- return M + N(e, /([^-])(transform)/g, "$1" + M + "$2") + e;
1062
+ return F + L(e, /([^-])(transform)/g, "$1" + F + "$2") + e;
1063
1063
  case 6187:
1064
- return N(N(N(e, /(zoom-|grab)/, M + "$1"), /(image-set)/, M + "$1"), e, "") + e;
1064
+ return L(L(L(e, /(zoom-|grab)/, F + "$1"), /(image-set)/, F + "$1"), e, "") + e;
1065
1065
  case 5495:
1066
1066
  case 3959:
1067
- return N(e, /(image-set\([^]*)/, M + "$1$`$1");
1067
+ return L(e, /(image-set\([^]*)/, F + "$1$`$1");
1068
1068
  case 4968:
1069
- return N(N(e, /(.+:)(flex-)?(.*)/, M + "box-pack:$3" + B + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + M + e + e;
1069
+ return L(L(e, /(.+:)(flex-)?(.*)/, F + "box-pack:$3" + K + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + F + e + e;
1070
1070
  case 4095:
1071
1071
  case 3583:
1072
1072
  case 4068:
1073
1073
  case 2532:
1074
- return N(e, /(.+)-inline(.+)/, M + "$1$2") + e;
1074
+ return L(e, /(.+)-inline(.+)/, F + "$1$2") + e;
1075
1075
  case 8116:
1076
1076
  case 7059:
1077
1077
  case 5753:
@@ -1084,115 +1084,115 @@ function dt(e, r) {
1084
1084
  case 5789:
1085
1085
  case 5021:
1086
1086
  case 4765:
1087
- if (ne(e) - 1 - r > 6) switch (J(e, r + 1)) {
1087
+ if (fe(e) - 1 - t > 6) switch (J(e, t + 1)) {
1088
1088
  case 109:
1089
- if (J(e, r + 4) !== 45) break;
1089
+ if (J(e, t + 4) !== 45) break;
1090
1090
  case 102:
1091
- return N(e, /(.+:)(.+)-([^]+)/, "$1" + M + "$2-$3$1" + He + (J(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
1091
+ return L(e, /(.+:)(.+)-([^]+)/, "$1" + F + "$2-$3$1" + mt + (J(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
1092
1092
  case 115:
1093
- return ~pr(e, "stretch") ? dt(N(e, "stretch", "fill-available"), r) + e : e;
1093
+ return ~jt(e, "stretch") ? an(L(e, "stretch", "fill-available"), t) + e : e;
1094
1094
  }
1095
1095
  break;
1096
1096
  case 4949:
1097
- if (J(e, r + 1) !== 115) break;
1097
+ if (J(e, t + 1) !== 115) break;
1098
1098
  case 6444:
1099
- switch (J(e, ne(e) - 3 - (~pr(e, "!important") && 10))) {
1099
+ switch (J(e, fe(e) - 3 - (~jt(e, "!important") && 10))) {
1100
1100
  case 107:
1101
- return N(e, ":", ":" + M) + e;
1101
+ return L(e, ":", ":" + F) + e;
1102
1102
  case 101:
1103
- return N(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + M + (J(e, 14) === 45 ? "inline-" : "") + "box$3$1" + M + "$2$3$1" + B + "$2box$3") + e;
1103
+ return L(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + F + (J(e, 14) === 45 ? "inline-" : "") + "box$3$1" + F + "$2$3$1" + K + "$2box$3") + e;
1104
1104
  }
1105
1105
  break;
1106
1106
  case 5936:
1107
- switch (J(e, r + 11)) {
1107
+ switch (J(e, t + 11)) {
1108
1108
  case 114:
1109
- return M + e + B + N(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
1109
+ return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
1110
1110
  case 108:
1111
- return M + e + B + N(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
1111
+ return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
1112
1112
  case 45:
1113
- return M + e + B + N(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
1113
+ return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
1114
1114
  }
1115
- return M + e + B + e + e;
1115
+ return F + e + K + e + e;
1116
1116
  }
1117
1117
  return e;
1118
1118
  }
1119
- var _n = function(r, n, o, a) {
1120
- if (r.length > -1 && !r.return) switch (r.type) {
1121
- case br:
1122
- r.return = dt(r.value, r.length);
1119
+ var No = function(t, r, n, o) {
1120
+ if (t.length > -1 && !t.return) switch (t.type) {
1121
+ case Jt:
1122
+ t.return = an(t.value, t.length);
1123
1123
  break;
1124
- case st:
1125
- return be([Ae(r, {
1126
- value: N(r.value, "@", "@" + M)
1127
- })], a);
1128
- case yr:
1129
- if (r.length) return sn(r.props, function(i) {
1130
- switch (an(i, /(::plac\w+|:read-\w+)/)) {
1124
+ case tn:
1125
+ return Ne([Ke(t, {
1126
+ value: L(t.value, "@", "@" + F)
1127
+ })], o);
1128
+ case Ht:
1129
+ if (t.length) return yo(t.props, function(i) {
1130
+ switch (vo(i, /(::plac\w+|:read-\w+)/)) {
1131
1131
  case ":read-only":
1132
1132
  case ":read-write":
1133
- return be([Ae(r, {
1134
- props: [N(i, /:(read-\w+)/, ":" + He + "$1")]
1135
- })], a);
1133
+ return Ne([Ke(t, {
1134
+ props: [L(i, /:(read-\w+)/, ":" + mt + "$1")]
1135
+ })], o);
1136
1136
  case "::placeholder":
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")]
1143
- })], a);
1137
+ return Ne([Ke(t, {
1138
+ props: [L(i, /:(plac\w+)/, ":" + F + "input-$1")]
1139
+ }), Ke(t, {
1140
+ props: [L(i, /:(plac\w+)/, ":" + mt + "$1")]
1141
+ }), Ke(t, {
1142
+ props: [L(i, /:(plac\w+)/, K + "input-$1")]
1143
+ })], o);
1144
1144
  }
1145
1145
  return "";
1146
1146
  });
1147
1147
  }
1148
- }, wn = [_n], Tn = function(r) {
1149
- var n = r.key;
1150
- if (n === "css") {
1151
- var o = document.querySelectorAll("style[data-emotion]:not([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", ""));
1148
+ }, Io = [No], Do = function(t) {
1149
+ var r = t.key;
1150
+ if (r === "css") {
1151
+ var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
1152
+ Array.prototype.forEach.call(n, function(m) {
1153
+ var x = m.getAttribute("data-emotion");
1154
+ x.indexOf(" ") !== -1 && (document.head.appendChild(m), m.setAttribute("data-s", ""));
1155
1155
  });
1156
1156
  }
1157
- var a = r.stylisPlugins || wn, i = {}, u, s = [];
1158
- u = r.container || document.head, Array.prototype.forEach.call(
1157
+ var o = t.stylisPlugins || Io, i = {}, a, c = [];
1158
+ a = t.container || document.head, Array.prototype.forEach.call(
1159
1159
  // this means we will ignore elements which don't have a space in them which
1160
1160
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
1161
- document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
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);
1161
+ document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
1162
+ function(m) {
1163
+ for (var x = m.getAttribute("data-emotion").split(" "), g = 1; g < x.length; g++)
1164
+ i[x[g]] = !0;
1165
+ c.push(m);
1166
1166
  }
1167
1167
  );
1168
- var f, m = [xn, Cn];
1168
+ var l, h = [Fo, Lo];
1169
1169
  {
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);
1170
+ var f, y = [To, Mo(function(m) {
1171
+ f.insert(m);
1172
+ })], C = ko(h.concat(o, y)), v = function(x) {
1173
+ return Ne(wo(x), C);
1174
1174
  };
1175
- f = function(y, S, b, _) {
1176
- p = b, C(y ? y + "{" + S.styles + "}" : S.styles), _ && (x.inserted[S.name] = !0);
1175
+ l = function(x, g, S, _) {
1176
+ f = S, v(x ? x + "{" + g.styles + "}" : g.styles), _ && (R.inserted[g.name] = !0);
1177
1177
  };
1178
1178
  }
1179
- var x = {
1180
- key: n,
1181
- sheet: new Qt({
1182
- key: n,
1183
- container: u,
1184
- nonce: r.nonce,
1185
- speedy: r.speedy,
1186
- prepend: r.prepend,
1187
- insertionPoint: r.insertionPoint
1179
+ var R = {
1180
+ key: r,
1181
+ sheet: new uo({
1182
+ key: r,
1183
+ container: a,
1184
+ nonce: t.nonce,
1185
+ speedy: t.speedy,
1186
+ prepend: t.prepend,
1187
+ insertionPoint: t.insertionPoint
1188
1188
  }),
1189
- nonce: r.nonce,
1189
+ nonce: t.nonce,
1190
1190
  inserted: i,
1191
1191
  registered: {},
1192
- insert: f
1192
+ insert: l
1193
1193
  };
1194
- return x.sheet.hydrate(s), x;
1195
- }, gr = { exports: {} }, F = {};
1194
+ return R.sheet.hydrate(c), R;
1195
+ }, Yt = { exports: {} }, I = {};
1196
1196
  /** @license React v16.13.1
1197
1197
  * react-is.production.min.js
1198
1198
  *
@@ -1201,71 +1201,71 @@ var _n = function(r, n, o, a) {
1201
1201
  * This source code is licensed under the MIT license found in the
1202
1202
  * LICENSE file in the root directory of this source tree.
1203
1203
  */
1204
- var Br;
1205
- function Pn() {
1206
- if (Br) return F;
1207
- Br = 1;
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) {
1210
- if (typeof l == "object" && l !== null) {
1211
- var U = l.$$typeof;
1212
- switch (U) {
1213
- case r:
1214
- switch (l = l.type, l) {
1215
- case f:
1216
- case m:
1217
- case o:
1204
+ var Mr;
1205
+ function Wo() {
1206
+ if (Mr) return I;
1207
+ Mr = 1;
1208
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, h = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, C = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1209
+ function _(d) {
1210
+ if (typeof d == "object" && d !== null) {
1211
+ var q = d.$$typeof;
1212
+ switch (q) {
1213
+ case t:
1214
+ switch (d = d.type, d) {
1215
+ case l:
1216
+ case h:
1217
+ case n:
1218
1218
  case i:
1219
- case a:
1220
- case d:
1221
- return l;
1219
+ case o:
1220
+ case y:
1221
+ return d;
1222
1222
  default:
1223
- switch (l = l && l.$$typeof, l) {
1224
- case s:
1225
- case p:
1226
- case x:
1227
- case C:
1228
- case u:
1229
- return l;
1223
+ switch (d = d && d.$$typeof, d) {
1224
+ case c:
1225
+ case f:
1226
+ case R:
1227
+ case v:
1228
+ case a:
1229
+ return d;
1230
1230
  default:
1231
- return U;
1231
+ return q;
1232
1232
  }
1233
1233
  }
1234
- case n:
1235
- return U;
1234
+ case r:
1235
+ return q;
1236
1236
  }
1237
1237
  }
1238
1238
  }
1239
- function j(l) {
1240
- return _(l) === m;
1241
- }
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;
1244
- }, F.isConcurrentMode = j, F.isContextConsumer = function(l) {
1245
- return _(l) === s;
1246
- }, F.isContextProvider = function(l) {
1247
- return _(l) === u;
1248
- }, F.isElement = function(l) {
1249
- return typeof l == "object" && l !== null && l.$$typeof === r;
1250
- }, F.isForwardRef = function(l) {
1251
- return _(l) === p;
1252
- }, F.isFragment = function(l) {
1253
- return _(l) === o;
1254
- }, F.isLazy = function(l) {
1255
- return _(l) === x;
1256
- }, F.isMemo = function(l) {
1257
- return _(l) === C;
1258
- }, F.isPortal = function(l) {
1259
- return _(l) === n;
1260
- }, F.isProfiler = function(l) {
1261
- return _(l) === i;
1262
- }, F.isStrictMode = function(l) {
1263
- return _(l) === a;
1264
- }, F.isSuspense = function(l) {
1265
- return _(l) === d;
1266
- }, F.isValidElementType = function(l) {
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;
1239
+ function $(d) {
1240
+ return _(d) === h;
1241
+ }
1242
+ return I.AsyncMode = l, I.ConcurrentMode = h, I.ContextConsumer = c, I.ContextProvider = a, I.Element = t, I.ForwardRef = f, I.Fragment = n, I.Lazy = R, I.Memo = v, I.Portal = r, I.Profiler = i, I.StrictMode = o, I.Suspense = y, I.isAsyncMode = function(d) {
1243
+ return $(d) || _(d) === l;
1244
+ }, I.isConcurrentMode = $, I.isContextConsumer = function(d) {
1245
+ return _(d) === c;
1246
+ }, I.isContextProvider = function(d) {
1247
+ return _(d) === a;
1248
+ }, I.isElement = function(d) {
1249
+ return typeof d == "object" && d !== null && d.$$typeof === t;
1250
+ }, I.isForwardRef = function(d) {
1251
+ return _(d) === f;
1252
+ }, I.isFragment = function(d) {
1253
+ return _(d) === n;
1254
+ }, I.isLazy = function(d) {
1255
+ return _(d) === R;
1256
+ }, I.isMemo = function(d) {
1257
+ return _(d) === v;
1258
+ }, I.isPortal = function(d) {
1259
+ return _(d) === r;
1260
+ }, I.isProfiler = function(d) {
1261
+ return _(d) === i;
1262
+ }, I.isStrictMode = function(d) {
1263
+ return _(d) === o;
1264
+ }, I.isSuspense = function(d) {
1265
+ return _(d) === y;
1266
+ }, I.isValidElementType = function(d) {
1267
+ return typeof d == "string" || typeof d == "function" || d === n || d === h || d === i || d === o || d === y || d === C || typeof d == "object" && d !== null && (d.$$typeof === R || d.$$typeof === v || d.$$typeof === a || d.$$typeof === c || d.$$typeof === f || d.$$typeof === x || d.$$typeof === g || d.$$typeof === S || d.$$typeof === m);
1268
+ }, I.typeOf = _, I;
1269
1269
  }
1270
1270
  var D = {};
1271
1271
  /** @license React v16.13.1
@@ -1276,155 +1276,155 @@ var D = {};
1276
1276
  * This source code is licensed under the MIT license found in the
1277
1277
  * LICENSE file in the root directory of this source tree.
1278
1278
  */
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) {
1291
- case r:
1292
- var ge = v.type;
1293
- switch (ge) {
1294
- case f:
1295
- case m:
1296
- case o:
1279
+ var Pr;
1280
+ function jo() {
1281
+ return Pr || (Pr = 1, process.env.NODE_ENV !== "production" && function() {
1282
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, h = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, C = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1283
+ function _(E) {
1284
+ return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1285
+ E === n || E === h || E === i || E === o || E === y || E === C || typeof E == "object" && E !== null && (E.$$typeof === R || E.$$typeof === v || E.$$typeof === a || E.$$typeof === c || E.$$typeof === f || E.$$typeof === x || E.$$typeof === g || E.$$typeof === S || E.$$typeof === m);
1286
+ }
1287
+ function $(E) {
1288
+ if (typeof E == "object" && E !== null) {
1289
+ var Be = E.$$typeof;
1290
+ switch (Be) {
1291
+ case t:
1292
+ var Oe = E.type;
1293
+ switch (Oe) {
1294
+ case l:
1295
+ case h:
1296
+ case n:
1297
1297
  case i:
1298
- case a:
1299
- case d:
1300
- return ge;
1298
+ case o:
1299
+ case y:
1300
+ return Oe;
1301
1301
  default:
1302
- var le = ge && ge.$$typeof;
1303
- switch (le) {
1304
- case s:
1305
- case p:
1306
- case x:
1307
- case C:
1308
- case u:
1309
- return le;
1302
+ var Ce = Oe && Oe.$$typeof;
1303
+ switch (Ce) {
1304
+ case c:
1305
+ case f:
1306
+ case R:
1307
+ case v:
1308
+ case a:
1309
+ return Ce;
1310
1310
  default:
1311
- return Pe;
1311
+ return Be;
1312
1312
  }
1313
1313
  }
1314
- case n:
1315
- return Pe;
1314
+ case r:
1315
+ return Be;
1316
1316
  }
1317
1317
  }
1318
1318
  }
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;
1319
+ var d = l, q = h, A = c, Ye = a, Ee = t, Te = f, ke = n, Se = R, Z = v, ce = r, pe = i, b = o, T = y, k = !1;
1320
+ function O(E) {
1321
+ return k || (k = !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.")), Y(E) || $(E) === l;
1322
1322
  }
1323
- function Ce(v) {
1324
- return j(v) === m;
1323
+ function Y(E) {
1324
+ return $(E) === h;
1325
1325
  }
1326
- function We(v) {
1327
- return j(v) === s;
1326
+ function G(E) {
1327
+ return $(E) === c;
1328
1328
  }
1329
- function Ye(v) {
1330
- return j(v) === u;
1329
+ function oe(E) {
1330
+ return $(E) === a;
1331
1331
  }
1332
- function Ve(v) {
1333
- return typeof v == "object" && v !== null && v.$$typeof === r;
1332
+ function me(E) {
1333
+ return typeof E == "object" && E !== null && E.$$typeof === t;
1334
1334
  }
1335
- function tr(v) {
1336
- return j(v) === p;
1335
+ function _t(E) {
1336
+ return $(E) === f;
1337
1337
  }
1338
- function nr(v) {
1339
- return j(v) === o;
1338
+ function Tt(E) {
1339
+ return $(E) === n;
1340
1340
  }
1341
- function _e(v) {
1342
- return j(v) === x;
1341
+ function Ve(E) {
1342
+ return $(E) === R;
1343
1343
  }
1344
- function we(v) {
1345
- return j(v) === C;
1344
+ function ze(E) {
1345
+ return $(E) === v;
1346
1346
  }
1347
- function pe(v) {
1348
- return j(v) === n;
1347
+ function Me(E) {
1348
+ return $(E) === r;
1349
1349
  }
1350
- function Te(v) {
1351
- return j(v) === i;
1350
+ function Ue(E) {
1351
+ return $(E) === i;
1352
1352
  }
1353
- function me(v) {
1354
- return j(v) === a;
1353
+ function Pe(E) {
1354
+ return $(E) === o;
1355
1355
  }
1356
- function or(v) {
1357
- return j(v) === d;
1356
+ function kt(E) {
1357
+ return $(E) === y;
1358
1358
  }
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;
1359
+ D.AsyncMode = d, D.ConcurrentMode = q, D.ContextConsumer = A, D.ContextProvider = Ye, D.Element = Ee, D.ForwardRef = Te, D.Fragment = ke, D.Lazy = Se, D.Memo = Z, D.Portal = ce, D.Profiler = pe, D.StrictMode = b, D.Suspense = T, D.isAsyncMode = O, D.isConcurrentMode = Y, D.isContextConsumer = G, D.isContextProvider = oe, D.isElement = me, D.isForwardRef = _t, D.isFragment = Tt, D.isLazy = Ve, D.isMemo = ze, D.isPortal = Me, D.isProfiler = Ue, D.isStrictMode = Pe, D.isSuspense = kt, D.isValidElementType = _, D.typeOf = $;
1360
1360
  }()), D;
1361
1361
  }
1362
- process.env.NODE_ENV === "production" ? gr.exports = Pn() : gr.exports = On();
1363
- var kn = gr.exports, ht = kn, $n = {
1362
+ process.env.NODE_ENV === "production" ? Yt.exports = Wo() : Yt.exports = jo();
1363
+ var qo = Yt.exports, cn = qo, Yo = {
1364
1364
  $$typeof: !0,
1365
1365
  render: !0,
1366
1366
  defaultProps: !0,
1367
1367
  displayName: !0,
1368
1368
  propTypes: !0
1369
- }, An = {
1369
+ }, Vo = {
1370
1370
  $$typeof: !0,
1371
1371
  compare: !0,
1372
1372
  defaultProps: !0,
1373
1373
  displayName: !0,
1374
1374
  propTypes: !0,
1375
1375
  type: !0
1376
- }, pt = {};
1377
- pt[ht.ForwardRef] = $n;
1378
- pt[ht.Memo] = An;
1379
- var Mn = !0;
1380
- function Nn(e, r, n) {
1381
- var o = "";
1382
- return n.split(" ").forEach(function(a) {
1383
- e[a] !== void 0 ? r.push(e[a] + ";") : a && (o += a + " ");
1384
- }), o;
1385
- }
1386
- var mt = function(r, n, o) {
1387
- var a = r.key + "-" + n.name;
1376
+ }, ln = {};
1377
+ ln[cn.ForwardRef] = Yo;
1378
+ ln[cn.Memo] = Vo;
1379
+ var zo = !0;
1380
+ function Uo(e, t, r) {
1381
+ var n = "";
1382
+ return r.split(" ").forEach(function(o) {
1383
+ e[o] !== void 0 ? t.push(e[o] + ";") : o && (n += o + " ");
1384
+ }), n;
1385
+ }
1386
+ var un = function(t, r, n) {
1387
+ var o = t.key + "-" + r.name;
1388
1388
  // we only need to add the styles to the registered cache if the
1389
1389
  // class name could be used further down
1390
1390
  // the tree but if it's a string tag, we know it won't
1391
1391
  // so we don't have to add it to registered cache.
1392
1392
  // this improves memory usage since we can avoid storing the whole style string
1393
- (o === !1 || // we need to always store it if we're in compat mode and
1393
+ (n === !1 || // we need to always store it if we're in compat mode and
1394
1394
  // in node since emotion-server relies on whether a style is in
1395
1395
  // the registered cache to know whether a style is global or not
1396
1396
  // also, note that this check will be dead code eliminated in the browser
1397
- Mn === !1) && r.registered[a] === void 0 && (r.registered[a] = n.styles);
1398
- }, In = function(r, n, o) {
1399
- mt(r, n, o);
1400
- var a = r.key + "-" + n.name;
1401
- if (r.inserted[n.name] === void 0) {
1402
- var i = n;
1397
+ zo === !1) && t.registered[o] === void 0 && (t.registered[o] = r.styles);
1398
+ }, Bo = function(t, r, n) {
1399
+ un(t, r, n);
1400
+ var o = t.key + "-" + r.name;
1401
+ if (t.inserted[r.name] === void 0) {
1402
+ var i = r;
1403
1403
  do
1404
- r.insert(n === i ? "." + a : "", i, r.sheet, !0), i = i.next;
1404
+ t.insert(r === i ? "." + o : "", i, t.sheet, !0), i = i.next;
1405
1405
  while (i !== void 0);
1406
1406
  }
1407
1407
  };
1408
- function Fn(e) {
1409
- for (var r = 0, n, o = 0, a = e.length; a >= 4; ++o, a -= 4)
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): */
1411
- (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
1412
- n >>> 24, r = /* Math.imul(k, m): */
1413
- (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
1414
- (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
1415
- switch (a) {
1408
+ function Go(e) {
1409
+ for (var t = 0, r, n = 0, o = e.length; o >= 4; ++n, o -= 4)
1410
+ r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
1411
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
1412
+ r >>> 24, t = /* Math.imul(k, m): */
1413
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
1414
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
1415
+ switch (o) {
1416
1416
  case 3:
1417
- r ^= (e.charCodeAt(o + 2) & 255) << 16;
1417
+ t ^= (e.charCodeAt(n + 2) & 255) << 16;
1418
1418
  case 2:
1419
- r ^= (e.charCodeAt(o + 1) & 255) << 8;
1419
+ t ^= (e.charCodeAt(n + 1) & 255) << 8;
1420
1420
  case 1:
1421
- r ^= e.charCodeAt(o) & 255, r = /* Math.imul(h, m): */
1422
- (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
1421
+ t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
1422
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
1423
1423
  }
1424
- return r ^= r >>> 13, r = /* Math.imul(h, m): */
1425
- (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36);
1424
+ return t ^= t >>> 13, t = /* Math.imul(h, m): */
1425
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
1426
1426
  }
1427
- var Dn = {
1427
+ var Ho = {
1428
1428
  animationIterationCount: 1,
1429
1429
  aspectRatio: 1,
1430
1430
  borderImageOutset: 1,
@@ -1473,197 +1473,197 @@ var Dn = {
1473
1473
  strokeMiterlimit: 1,
1474
1474
  strokeOpacity: 1,
1475
1475
  strokeWidth: 1
1476
- }, jn = /[A-Z]|^ms/g, Ln = /_EMO_([^_]+?)_([^]*?)_EMO_/g, gt = function(r) {
1477
- return r.charCodeAt(1) === 45;
1478
- }, Hr = function(r) {
1479
- return r != null && typeof r != "boolean";
1480
- }, ur = /* @__PURE__ */ bn(function(e) {
1481
- return gt(e) ? e : e.replace(jn, "-$&").toLowerCase();
1482
- }), Xr = function(r, n) {
1483
- switch (r) {
1476
+ }, Jo = /[A-Z]|^ms/g, Ko = /_EMO_([^_]+?)_([^]*?)_EMO_/g, fn = function(t) {
1477
+ return t.charCodeAt(1) === 45;
1478
+ }, Or = function(t) {
1479
+ return t != null && typeof t != "boolean";
1480
+ }, Lt = /* @__PURE__ */ Po(function(e) {
1481
+ return fn(e) ? e : e.replace(Jo, "-$&").toLowerCase();
1482
+ }), Ar = function(t, r) {
1483
+ switch (t) {
1484
1484
  case "animation":
1485
1485
  case "animationName":
1486
- if (typeof n == "string")
1487
- return n.replace(Ln, function(o, a, i) {
1488
- return oe = {
1489
- name: a,
1486
+ if (typeof r == "string")
1487
+ return r.replace(Ko, function(n, o, i) {
1488
+ return he = {
1489
+ name: o,
1490
1490
  styles: i,
1491
- next: oe
1492
- }, a;
1491
+ next: he
1492
+ }, o;
1493
1493
  });
1494
1494
  }
1495
- return Dn[r] !== 1 && !gt(r) && typeof n == "number" && n !== 0 ? n + "px" : n;
1495
+ return Ho[t] !== 1 && !fn(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
1496
1496
  };
1497
- function Fe(e, r, n) {
1498
- if (n == null)
1497
+ function et(e, t, r) {
1498
+ if (r == null)
1499
1499
  return "";
1500
- var o = n;
1501
- if (o.__emotion_styles !== void 0)
1502
- return o;
1503
- switch (typeof n) {
1500
+ var n = r;
1501
+ if (n.__emotion_styles !== void 0)
1502
+ return n;
1503
+ switch (typeof r) {
1504
1504
  case "boolean":
1505
1505
  return "";
1506
1506
  case "object": {
1507
- var a = n;
1508
- if (a.anim === 1)
1509
- return oe = {
1510
- name: a.name,
1511
- styles: a.styles,
1512
- next: oe
1513
- }, a.name;
1514
- var i = n;
1507
+ var o = r;
1508
+ if (o.anim === 1)
1509
+ return he = {
1510
+ name: o.name,
1511
+ styles: o.styles,
1512
+ next: he
1513
+ }, o.name;
1514
+ var i = r;
1515
1515
  if (i.styles !== void 0) {
1516
- var u = i.next;
1517
- if (u !== void 0)
1518
- for (; u !== void 0; )
1519
- oe = {
1520
- name: u.name,
1521
- styles: u.styles,
1522
- next: oe
1523
- }, u = u.next;
1524
- var s = i.styles + ";";
1525
- return s;
1516
+ var a = i.next;
1517
+ if (a !== void 0)
1518
+ for (; a !== void 0; )
1519
+ he = {
1520
+ name: a.name,
1521
+ styles: a.styles,
1522
+ next: he
1523
+ }, a = a.next;
1524
+ var c = i.styles + ";";
1525
+ return c;
1526
1526
  }
1527
- return Wn(e, r, n);
1527
+ return Qo(e, t, r);
1528
1528
  }
1529
1529
  case "function": {
1530
1530
  if (e !== void 0) {
1531
- var f = oe, m = n(e);
1532
- return oe = f, Fe(e, r, m);
1531
+ var l = he, h = r(e);
1532
+ return he = l, et(e, t, h);
1533
1533
  }
1534
1534
  break;
1535
1535
  }
1536
1536
  }
1537
- var p = n;
1538
- return p;
1537
+ var f = r;
1538
+ return f;
1539
1539
  }
1540
- function Wn(e, r, n) {
1541
- var o = "";
1542
- if (Array.isArray(n))
1543
- for (var a = 0; a < n.length; a++)
1544
- o += Fe(e, r, n[a]) + ";";
1540
+ function Qo(e, t, r) {
1541
+ var n = "";
1542
+ if (Array.isArray(r))
1543
+ for (var o = 0; o < r.length; o++)
1544
+ n += et(e, t, r[o]) + ";";
1545
1545
  else
1546
- for (var i in n) {
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]) + ";");
1546
+ for (var i in r) {
1547
+ var a = r[i];
1548
+ if (typeof a != "object") {
1549
+ var c = a;
1550
+ Or(c) && (n += Lt(i) + ":" + Ar(i, c) + ";");
1551
+ } else if (Array.isArray(a) && typeof a[0] == "string" && t == null)
1552
+ for (var l = 0; l < a.length; l++)
1553
+ Or(a[l]) && (n += Lt(i) + ":" + Ar(i, a[l]) + ";");
1554
1554
  else {
1555
- var m = Fe(e, r, u);
1555
+ var h = et(e, t, a);
1556
1556
  switch (i) {
1557
1557
  case "animation":
1558
1558
  case "animationName": {
1559
- o += ur(i) + ":" + m + ";";
1559
+ n += Lt(i) + ":" + h + ";";
1560
1560
  break;
1561
1561
  }
1562
1562
  default:
1563
- o += i + "{" + m + "}";
1563
+ n += i + "{" + h + "}";
1564
1564
  }
1565
1565
  }
1566
1566
  }
1567
- return o;
1567
+ return n;
1568
1568
  }
1569
- var Zr = /label:\s*([^\s;{]+)\s*(;|$)/g, oe;
1570
- function Yn(e, r, n) {
1569
+ var $r = /label:\s*([^\s;{]+)\s*(;|$)/g, he;
1570
+ function Xo(e, t, r) {
1571
1571
  if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
1572
1572
  return e[0];
1573
- var o = !0, a = "";
1574
- oe = void 0;
1573
+ var n = !0, o = "";
1574
+ he = void 0;
1575
1575
  var i = e[0];
1576
1576
  if (i == null || i.raw === void 0)
1577
- o = !1, a += Fe(n, r, i);
1577
+ n = !1, o += et(r, t, i);
1578
1578
  else {
1579
- var u = i;
1580
- a += u[0];
1581
- }
1582
- for (var s = 1; s < e.length; s++)
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;
1579
+ var a = i;
1580
+ o += a[0];
1581
+ }
1582
+ for (var c = 1; c < e.length; c++)
1583
+ if (o += et(r, t, e[c]), n) {
1584
+ var l = i;
1585
+ o += l[c];
1586
+ }
1587
+ $r.lastIndex = 0;
1588
+ for (var h = "", f; (f = $r.exec(o)) !== null; )
1589
+ h += "-" + f[1];
1590
+ var y = Go(o) + h;
1591
1591
  return {
1592
- name: d,
1593
- styles: a,
1594
- next: oe
1592
+ name: y,
1593
+ styles: o,
1594
+ next: he
1595
1595
  };
1596
1596
  }
1597
- var Vn = function(r) {
1598
- return r();
1599
- }, Un = ce.useInsertionEffect ? ce.useInsertionEffect : !1, zn = Un || Vn, vt = /* @__PURE__ */ ce.createContext(
1597
+ var Zo = function(t) {
1598
+ return t();
1599
+ }, ei = ve.useInsertionEffect ? ve.useInsertionEffect : !1, ti = ei || Zo, hn = /* @__PURE__ */ ve.createContext(
1600
1600
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1601
1601
  // because this module is primarily intended for the browser and node
1602
1602
  // but it's also required in react native and similar environments sometimes
1603
1603
  // and we could have a special build just for that
1604
1604
  // but this is much easier and the native packages
1605
1605
  // might use a different theme context in the future anyway
1606
- typeof HTMLElement < "u" ? /* @__PURE__ */ Tn({
1606
+ typeof HTMLElement < "u" ? /* @__PURE__ */ Do({
1607
1607
  key: "css"
1608
1608
  }) : null
1609
1609
  );
1610
- vt.Provider;
1611
- var Gn = function(r) {
1612
- return /* @__PURE__ */ Yt(function(n, o) {
1613
- var a = Vt(vt);
1614
- return r(n, a, o);
1610
+ hn.Provider;
1611
+ var ri = function(t) {
1612
+ return /* @__PURE__ */ rt(function(r, n) {
1613
+ var o = Jn(hn);
1614
+ return t(r, o, n);
1615
1615
  });
1616
- }, qn = /* @__PURE__ */ ce.createContext({}), Sr = {}.hasOwnProperty, vr = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Jn = function(r, n) {
1617
- var o = {};
1618
- for (var a in n)
1619
- Sr.call(n, a) && (o[a] = n[a]);
1620
- return o[vr] = r, o;
1621
- }, Bn = function(r) {
1622
- var n = r.cache, o = r.serialized, a = r.isStringTag;
1623
- return mt(n, o, a), zn(function() {
1624
- return In(n, o, a);
1616
+ }, ni = /* @__PURE__ */ ve.createContext({}), Qt = {}.hasOwnProperty, Vt = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", oi = function(t, r) {
1617
+ var n = {};
1618
+ for (var o in r)
1619
+ Qt.call(r, o) && (n[o] = r[o]);
1620
+ return n[Vt] = t, n;
1621
+ }, ii = function(t) {
1622
+ var r = t.cache, n = t.serialized, o = t.isStringTag;
1623
+ return un(r, n, o), ti(function() {
1624
+ return Bo(r, n, o);
1625
1625
  }), null;
1626
- }, Kn = /* @__PURE__ */ Gn(function(e, r, n) {
1627
- var o = e.css;
1628
- typeof o == "string" && r.registered[o] !== void 0 && (o = r.registered[o]);
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, {
1637
- cache: r,
1638
- serialized: s,
1639
- isStringTag: typeof a == "string"
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);
1626
+ }, si = /* @__PURE__ */ ri(function(e, t, r) {
1627
+ var n = e.css;
1628
+ typeof n == "string" && t.registered[n] !== void 0 && (n = t.registered[n]);
1629
+ var o = e[Vt], i = [n], a = "";
1630
+ typeof e.className == "string" ? a = Uo(t.registered, i, e.className) : e.className != null && (a = e.className + " ");
1631
+ var c = Xo(i, void 0, ve.useContext(ni));
1632
+ a += t.key + "-" + c.name;
1633
+ var l = {};
1634
+ for (var h in e)
1635
+ Qt.call(e, h) && h !== "css" && h !== Vt && (l[h] = e[h]);
1636
+ return l.className = a, r && (l.ref = r), /* @__PURE__ */ ve.createElement(ve.Fragment, null, /* @__PURE__ */ ve.createElement(ii, {
1637
+ cache: t,
1638
+ serialized: c,
1639
+ isStringTag: typeof o == "string"
1640
+ }), /* @__PURE__ */ ve.createElement(o, l));
1641
+ }), ai = si, wt = function(t, r, n) {
1642
+ return Qt.call(r, "css") ? wr.jsx(ai, oi(t, r), n) : wr.jsx(t, r, n);
1643
1643
  };
1644
- function Xn(e) {
1644
+ function ci(e) {
1645
1645
  switch (e.toLowerCase()) {
1646
1646
  case "sql":
1647
- return nt();
1647
+ return zr();
1648
1648
  case "json":
1649
- return ot();
1649
+ return Ur();
1650
1650
  default:
1651
1651
  return [];
1652
1652
  }
1653
1653
  }
1654
- function Zn(e) {
1654
+ function li(e) {
1655
1655
  return ["sql", "json"].includes(e.toLowerCase());
1656
1656
  }
1657
- function Qn(e = {}) {
1658
- return Ut(e);
1657
+ function ui(e = {}) {
1658
+ return Hr(e);
1659
1659
  }
1660
- function Eo(e) {
1661
- return [zt(), Gt(e)];
1660
+ function ss(e) {
1661
+ return [Zn(), eo(e)];
1662
1662
  }
1663
- function eo() {
1664
- return Me.of([dr]);
1663
+ function fi() {
1664
+ return we.of([Dt]);
1665
1665
  }
1666
- const So = [eo(), Qn()], ro = at.define([{
1666
+ const as = [fi(), ui()], hi = Jr.define([{
1667
1667
  tag: W.keyword,
1668
1668
  color: "#1a1aa6",
1669
1669
  fontWeight: "bold"
@@ -1705,7 +1705,7 @@ const So = [eo(), Qn()], ro = at.define([{
1705
1705
  tag: W.link,
1706
1706
  color: "#0563c1",
1707
1707
  textDecoration: "underline"
1708
- }]), Qr = [te.theme({
1708
+ }]), Fr = [V.theme({
1709
1709
  "&": {
1710
1710
  backgroundColor: "#ffffff",
1711
1711
  color: "#333333",
@@ -1749,7 +1749,7 @@ const So = [eo(), Qn()], ro = at.define([{
1749
1749
  "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
1750
1750
  backgroundColor: "rgba(181, 213, 255, 0.5)"
1751
1751
  }
1752
- }), Ke(ro)], to = at.define([{
1752
+ }), pt(hi)], di = Jr.define([{
1753
1753
  tag: W.keyword,
1754
1754
  color: "#569cd6",
1755
1755
  fontWeight: "bold"
@@ -1791,7 +1791,7 @@ const So = [eo(), Qn()], ro = at.define([{
1791
1791
  tag: W.link,
1792
1792
  color: "#4e94ce",
1793
1793
  textDecoration: "underline"
1794
- }]), no = [te.theme({
1794
+ }]), pi = [V.theme({
1795
1795
  "&": {
1796
1796
  backgroundColor: "#1e1e1e",
1797
1797
  color: "#d4d4d4",
@@ -1835,53 +1835,53 @@ const So = [eo(), Qn()], ro = at.define([{
1835
1835
  "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
1836
1836
  backgroundColor: "rgba(255, 255, 255, 0.1)"
1837
1837
  }
1838
- }), Ke(to)];
1839
- function oo(e) {
1838
+ }), pt(di)];
1839
+ function mi(e) {
1840
1840
  switch (e) {
1841
1841
  case "light":
1842
- return Qr;
1842
+ return Fr;
1843
1843
  case "dark":
1844
- return no;
1844
+ return pi;
1845
1845
  default:
1846
- return Qr;
1846
+ return Fr;
1847
1847
  }
1848
1848
  }
1849
- const et = (e) => {
1850
- const r = {
1849
+ const Lr = (e) => {
1850
+ const t = {
1851
1851
  value: "",
1852
1852
  readOnlyRanges: []
1853
1853
  };
1854
- let n = 0;
1855
- return e.forEach((o) => {
1854
+ let r = 0;
1855
+ return e.forEach((n) => {
1856
1856
  const {
1857
- content: a,
1857
+ content: o,
1858
1858
  editable: i
1859
- } = o, u = a.replace(/\r\n/g, `
1860
- `), s = n, f = s + u.length;
1861
- r.value += a, i || r.readOnlyRanges.push({
1862
- start: s,
1863
- end: f
1864
- }), n = f;
1865
- }), r;
1866
- }, Xe = qt.define(), rt = Jt.define({
1859
+ } = n, a = o.replace(/\r\n/g, `
1860
+ `), c = r, l = c + a.length;
1861
+ t.value += o, i || t.readOnlyRanges.push({
1862
+ start: c,
1863
+ end: l
1864
+ }), r = l;
1865
+ }), t;
1866
+ }, gt = je.define(), Nr = Gt.define({
1867
1867
  create() {
1868
- return lr.none;
1868
+ return Q.none;
1869
1869
  },
1870
- update(e, r) {
1871
- e = e.map(r.changes);
1872
- for (const n of r.effects)
1873
- if (n.is(Xe))
1874
- return console.log(2939), yt(n.value);
1875
- return r.docChanged, e;
1870
+ update(e, t) {
1871
+ e = e.map(t.changes);
1872
+ for (const r of t.effects)
1873
+ if (r.is(gt))
1874
+ return console.log(2939), dn(r.value);
1875
+ return t.docChanged, e;
1876
1876
  },
1877
1877
  provide(e) {
1878
- return te.decorations.from(e);
1878
+ return V.decorations.from(e);
1879
1879
  }
1880
1880
  });
1881
- function yt(e) {
1882
- const r = [];
1883
- return console.log(e, 9999299), e.forEach((n) => {
1884
- n.start < n.end && r.push(lr.mark({
1881
+ function dn(e) {
1882
+ const t = [];
1883
+ return console.log(e, 9999299), e.forEach((r) => {
1884
+ r.start < r.end && t.push(Q.mark({
1885
1885
  inclusive: !0,
1886
1886
  attributes: {
1887
1887
  class: "cm-readOnly",
@@ -1889,502 +1889,1546 @@ function yt(e) {
1889
1889
  },
1890
1890
  // 设置较低的优先级,确保语法高亮装饰可以覆盖
1891
1891
  priority: -100
1892
- }).range(n.start, n.end));
1893
- }), lr.set(r);
1892
+ }).range(r.start, r.end));
1893
+ }), Q.set(t);
1894
1894
  }
1895
- const Rr = /* @__PURE__ */ new WeakMap();
1896
- function ao(e) {
1897
- let r = e.map((n) => ({
1898
- ...n
1895
+ const Xt = /* @__PURE__ */ new WeakMap();
1896
+ function gi(e) {
1897
+ let t = e.map((r) => ({
1898
+ ...r
1899
1899
  }));
1900
1900
  return [
1901
1901
  // 添加状态字段
1902
- rt.init(() => yt(r)),
1902
+ Nr.init(() => dn(t)),
1903
1903
  // 添加按键映射,专门处理回车键
1904
- Me.of([{
1904
+ we.of([{
1905
1905
  key: "Enter",
1906
- run: (n) => {
1907
- const o = n.state.selection.main, {
1908
- from: a,
1906
+ run: (r) => {
1907
+ const n = r.state.selection.main, {
1908
+ from: o,
1909
1909
  to: i
1910
- } = o;
1911
- if (a !== i) {
1912
- for (const s of r)
1913
- if (a < s.end && i > s.start)
1910
+ } = n;
1911
+ if (o !== i) {
1912
+ for (const c of t)
1913
+ if (o < c.end && i > c.start)
1914
1914
  return !1;
1915
1915
  }
1916
- let u = !1;
1917
- for (const s of r)
1918
- if (a > s.start && a < s.end) {
1919
- u = !0;
1916
+ let a = !1;
1917
+ for (const c of t)
1918
+ if (o > c.start && o < c.end) {
1919
+ a = !0;
1920
1920
  break;
1921
1921
  }
1922
- return u ? !1 : (n.dispatch({
1922
+ return a ? !1 : (r.dispatch({
1923
1923
  changes: {
1924
- from: a,
1924
+ from: o,
1925
1925
  to: i,
1926
1926
  insert: `
1927
1927
  `
1928
1928
  },
1929
1929
  selection: {
1930
- anchor: a + 1
1930
+ anchor: o + 1
1931
1931
  }
1932
1932
  }), !0);
1933
1933
  }
1934
1934
  }]),
1935
1935
  // 添加事务过滤器,阻止只读区域的编辑
1936
- he.transactionFilter.of((n) => {
1937
- if (!n.docChanged || n.isUserEvent("input.type.Enter") || n.isUserEvent("input.enter"))
1938
- return n;
1939
- let o = !1;
1940
- return n.changes.iterChanges((a, i, u, s) => {
1941
- if (!(n.newDoc.sliceString(u, s) === `
1942
- ` && a === i)) {
1943
- for (const p of r)
1944
- if (a === i) {
1945
- if (a > p.start && a < p.end) {
1946
- o = !0;
1936
+ be.transactionFilter.of((r) => {
1937
+ if (!r.docChanged || r.isUserEvent("input.type.Enter") || r.isUserEvent("input.enter"))
1938
+ return r;
1939
+ let n = !1;
1940
+ return r.changes.iterChanges((o, i, a, c) => {
1941
+ if (!(r.newDoc.sliceString(a, c) === `
1942
+ ` && o === i)) {
1943
+ for (const f of t)
1944
+ if (o === i) {
1945
+ if (o > f.start && o < f.end) {
1946
+ n = !0;
1947
1947
  break;
1948
1948
  }
1949
1949
  } else if (
1950
1950
  // 删除或替换操作
1951
- a < p.end && i > p.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
1952
- a === p.start && i > a || i === p.end && a < i
1951
+ o < f.end && i > f.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
1952
+ o === f.start && i > o || i === f.end && o < i
1953
1953
  ) {
1954
- o = !0;
1954
+ n = !0;
1955
1955
  break;
1956
1956
  }
1957
1957
  }
1958
- }), o ? [] : n;
1958
+ }), n ? [] : r;
1959
1959
  }),
1960
1960
  // 动态更新只读区域的装饰
1961
- te.updateListener.of((n) => {
1962
- if (n.docChanged) {
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)
1966
- })) : n.view.dispatch({
1967
- effects: Xe.of(o)
1961
+ V.updateListener.of((r) => {
1962
+ if (r.docChanged) {
1963
+ const n = yi(t, r);
1964
+ !vi(t, n) ? (t = n, Xt.set(r.view, n), r.view.dispatch({
1965
+ effects: gt.of(n)
1966
+ })) : r.view.dispatch({
1967
+ effects: gt.of(n)
1968
1968
  });
1969
1969
  }
1970
1970
  }),
1971
1971
  // 添加一个延迟执行的额外更新,以确保在文档变化后能重新计算语法高亮
1972
- te.updateListener.of((n) => {
1973
- n.docChanged && setTimeout(() => {
1974
- n.view.state.field(rt, !1) && n.view.dispatch({});
1972
+ V.updateListener.of((r) => {
1973
+ r.docChanged && setTimeout(() => {
1974
+ r.view.state.field(Nr, !1) && r.view.dispatch({});
1975
1975
  }, 10);
1976
1976
  })
1977
1977
  ];
1978
1978
  }
1979
- function io(e, r) {
1980
- if (e.length !== r.length)
1979
+ function vi(e, t) {
1980
+ if (e.length !== t.length)
1981
1981
  return !1;
1982
- for (let n = 0; n < e.length; n++)
1983
- if (e[n].start !== r[n].start || e[n].end !== r[n].end)
1982
+ for (let r = 0; r < e.length; r++)
1983
+ if (e[r].start !== t[r].start || e[r].end !== t[r].end)
1984
1984
  return !1;
1985
1985
  return !0;
1986
1986
  }
1987
- function so(e, r) {
1988
- var a;
1989
- if (!r.docChanged)
1987
+ function yi(e, t) {
1988
+ var o;
1989
+ if (!t.docChanged)
1990
1990
  return e;
1991
- let n = !1;
1992
- const o = e.map((i) => {
1993
- const u = {
1991
+ let r = !1;
1992
+ const n = e.map((i) => {
1993
+ const a = {
1994
1994
  ...i
1995
1995
  };
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;
1996
+ return t.changes.iterChanges((c, l, h, f) => {
1997
+ const y = f - h, C = l - c, v = y - C;
1998
+ if (c === 0 && (r = !0), c === 0 && y > 0 && i.start === 0) {
1999
+ a.start = y, a.end += v;
2000
2000
  return;
2001
2001
  }
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);
2002
+ if (l <= i.start)
2003
+ a.start += v, a.end += v;
2004
+ else if (c >= i.start && c < i.end && l >= i.end)
2005
+ a.end = c;
2006
+ else if (!(c >= i.start && l <= i.end)) {
2007
+ if (c < i.end && l > i.end) {
2008
+ const R = i.end - c;
2009
+ a.end = c + Math.min(R, y);
2010
2010
  }
2011
2011
  }
2012
- }), u;
2012
+ }), a;
2013
2013
  });
2014
- if (n && o.length > 0) {
2015
- const i = ((a = r.changes.newDoc) == null ? void 0 : a.toString()) || "";
2016
- let u = 0;
2017
- for (let s = 0; s < i.length && /\s/.test(i[s]); s++)
2018
- u++;
2019
- o[0].start === 0 && u > 0 && (o[0].start = u);
2014
+ if (r && n.length > 0) {
2015
+ const i = ((o = t.changes.newDoc) == null ? void 0 : o.toString()) || "";
2016
+ let a = 0;
2017
+ for (let c = 0; c < i.length && /\s/.test(i[c]); c++)
2018
+ a++;
2019
+ n[0].start === 0 && a > 0 && (n[0].start = a);
2020
2020
  }
2021
- return o.filter((i) => i.start < i.end);
2021
+ return n.filter((i) => i.start < i.end);
2022
2022
  }
2023
- function co(e) {
2024
- return Rr.get(e) || [];
2023
+ function bi(e) {
2024
+ return Xt.get(e) || [];
2025
2025
  }
2026
- function ue(e, r) {
2027
- const n = r.map((o) => ({
2028
- ...o
2026
+ function ye(e, t) {
2027
+ const r = t.map((n) => ({
2028
+ ...n
2029
2029
  }));
2030
- Rr.set(e, n), e.dispatch({
2031
- effects: Xe.of(n)
2030
+ Xt.set(e, r), e.dispatch({
2031
+ effects: gt.of(r)
2032
2032
  }), setTimeout(() => {
2033
2033
  e.dom && document.contains(e.dom) && e.dispatch({});
2034
2034
  }, 10);
2035
2035
  }
2036
- const xr = ({
2036
+ function H() {
2037
+ var e = arguments[0];
2038
+ typeof e == "string" && (e = document.createElement(e));
2039
+ var t = 1, r = arguments[1];
2040
+ if (r && typeof r == "object" && r.nodeType == null && !Array.isArray(r)) {
2041
+ for (var n in r) if (Object.prototype.hasOwnProperty.call(r, n)) {
2042
+ var o = r[n];
2043
+ typeof o == "string" ? e.setAttribute(n, o) : o != null && (e[n] = o);
2044
+ }
2045
+ t++;
2046
+ }
2047
+ for (; t < arguments.length; t++) pn(e, arguments[t]);
2048
+ return e;
2049
+ }
2050
+ function pn(e, t) {
2051
+ if (typeof t == "string")
2052
+ e.appendChild(document.createTextNode(t));
2053
+ else if (t != null) if (t.nodeType != null)
2054
+ e.appendChild(t);
2055
+ else if (Array.isArray(t))
2056
+ for (var r = 0; r < t.length; r++) pn(e, t[r]);
2057
+ else
2058
+ throw new RangeError("Unsupported child node: " + t);
2059
+ }
2060
+ const Ir = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFKD") : (e) => e;
2061
+ class We {
2062
+ /**
2063
+ Create a text cursor. The query is the search string, `from` to
2064
+ `to` provides the region to search.
2065
+
2066
+ When `normalize` is given, it will be called, on both the query
2067
+ string and the content it is matched against, before comparing.
2068
+ You can, for example, create a case-insensitive search by
2069
+ passing `s => s.toLowerCase()`.
2070
+
2071
+ Text is always normalized with
2072
+ [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
2073
+ (when supported).
2074
+ */
2075
+ constructor(t, r, n = 0, o = t.length, i, a) {
2076
+ this.test = a, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = t.iterRange(n, o), this.bufferStart = n, this.normalize = i ? (c) => i(Ir(c)) : Ir, this.query = this.normalize(r);
2077
+ }
2078
+ peek() {
2079
+ if (this.bufferPos == this.buffer.length) {
2080
+ if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
2081
+ return -1;
2082
+ this.bufferPos = 0, this.buffer = this.iter.value;
2083
+ }
2084
+ return ro(this.buffer, this.bufferPos);
2085
+ }
2086
+ /**
2087
+ Look for the next match. Updates the iterator's
2088
+ [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
2089
+ [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
2090
+ at least once before using the cursor.
2091
+ */
2092
+ next() {
2093
+ for (; this.matches.length; )
2094
+ this.matches.pop();
2095
+ return this.nextOverlapping();
2096
+ }
2097
+ /**
2098
+ The `next` method will ignore matches that partially overlap a
2099
+ previous match. This method behaves like `next`, but includes
2100
+ such matches.
2101
+ */
2102
+ nextOverlapping() {
2103
+ for (; ; ) {
2104
+ let t = this.peek();
2105
+ if (t < 0)
2106
+ return this.done = !0, this;
2107
+ let r = no(t), n = this.bufferStart + this.bufferPos;
2108
+ this.bufferPos += oo(t);
2109
+ let o = this.normalize(r);
2110
+ if (o.length)
2111
+ for (let i = 0, a = n; ; i++) {
2112
+ let c = o.charCodeAt(i), l = this.match(c, a, this.bufferPos + this.bufferStart);
2113
+ if (i == o.length - 1) {
2114
+ if (l)
2115
+ return this.value = l, this;
2116
+ break;
2117
+ }
2118
+ a == n && i < r.length && r.charCodeAt(i) == c && a++;
2119
+ }
2120
+ }
2121
+ }
2122
+ match(t, r, n) {
2123
+ let o = null;
2124
+ for (let i = 0; i < this.matches.length; i += 2) {
2125
+ let a = this.matches[i], c = !1;
2126
+ this.query.charCodeAt(a) == t && (a == this.query.length - 1 ? o = { from: this.matches[i + 1], to: n } : (this.matches[i]++, c = !0)), c || (this.matches.splice(i, 2), i -= 2);
2127
+ }
2128
+ return this.query.charCodeAt(0) == t && (this.query.length == 1 ? o = { from: r, to: n } : this.matches.push(1, r)), o && this.test && !this.test(o.from, o.to, this.buffer, this.bufferStart) && (o = null), o;
2129
+ }
2130
+ }
2131
+ typeof Symbol < "u" && (We.prototype[Symbol.iterator] = function() {
2132
+ return this;
2133
+ });
2134
+ const mn = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, Zt = "gm" + (/x/.unicode == null ? "" : "u");
2135
+ class gn {
2136
+ /**
2137
+ Create a cursor that will search the given range in the given
2138
+ document. `query` should be the raw pattern (as you'd pass it to
2139
+ `new RegExp`).
2140
+ */
2141
+ constructor(t, r, n, o = 0, i = t.length) {
2142
+ if (this.text = t, this.to = i, this.curLine = "", this.done = !1, this.value = mn, /\\[sWDnr]|\n|\r|\[\^/.test(r))
2143
+ return new vn(t, r, n, o, i);
2144
+ this.re = new RegExp(r, Zt + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.iter = t.iter();
2145
+ let a = t.lineAt(o);
2146
+ this.curLineStart = a.from, this.matchPos = vt(t, o), this.getLine(this.curLineStart);
2147
+ }
2148
+ getLine(t) {
2149
+ this.iter.next(t), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
2150
+ }
2151
+ nextLine() {
2152
+ this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
2153
+ }
2154
+ /**
2155
+ Move to the next match, if there is one.
2156
+ */
2157
+ next() {
2158
+ for (let t = this.matchPos - this.curLineStart; ; ) {
2159
+ this.re.lastIndex = t;
2160
+ let r = this.matchPos <= this.to && this.re.exec(this.curLine);
2161
+ if (r) {
2162
+ let n = this.curLineStart + r.index, o = n + r[0].length;
2163
+ if (this.matchPos = vt(this.text, o + (n == o ? 1 : 0)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < o || n > this.value.to) && (!this.test || this.test(n, o, r)))
2164
+ return this.value = { from: n, to: o, match: r }, this;
2165
+ t = this.matchPos - this.curLineStart;
2166
+ } else if (this.curLineStart + this.curLine.length < this.to)
2167
+ this.nextLine(), t = 0;
2168
+ else
2169
+ return this.done = !0, this;
2170
+ }
2171
+ }
2172
+ }
2173
+ const Nt = /* @__PURE__ */ new WeakMap();
2174
+ class Ie {
2175
+ constructor(t, r) {
2176
+ this.from = t, this.text = r;
2177
+ }
2178
+ get to() {
2179
+ return this.from + this.text.length;
2180
+ }
2181
+ static get(t, r, n) {
2182
+ let o = Nt.get(t);
2183
+ if (!o || o.from >= n || o.to <= r) {
2184
+ let c = new Ie(r, t.sliceString(r, n));
2185
+ return Nt.set(t, c), c;
2186
+ }
2187
+ if (o.from == r && o.to == n)
2188
+ return o;
2189
+ let { text: i, from: a } = o;
2190
+ return a > r && (i = t.sliceString(r, a) + i, a = r), o.to < n && (i += t.sliceString(o.to, n)), Nt.set(t, new Ie(a, i)), new Ie(r, i.slice(r - a, n - a));
2191
+ }
2192
+ }
2193
+ class vn {
2194
+ constructor(t, r, n, o, i) {
2195
+ this.text = t, this.to = i, this.done = !1, this.value = mn, this.matchPos = vt(t, o), this.re = new RegExp(r, Zt + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Ie.get(t, o, this.chunkEnd(
2196
+ o + 5e3
2197
+ /* Chunk.Base */
2198
+ ));
2199
+ }
2200
+ chunkEnd(t) {
2201
+ return t >= this.to ? this.to : this.text.lineAt(t).to;
2202
+ }
2203
+ next() {
2204
+ for (; ; ) {
2205
+ let t = this.re.lastIndex = this.matchPos - this.flat.from, r = this.re.exec(this.flat.text);
2206
+ if (r && !r[0] && r.index == t && (this.re.lastIndex = t + 1, r = this.re.exec(this.flat.text)), r) {
2207
+ let n = this.flat.from + r.index, o = n + r[0].length;
2208
+ if ((this.flat.to >= this.to || r.index + r[0].length <= this.flat.text.length - 10) && (!this.test || this.test(n, o, r)))
2209
+ return this.value = { from: n, to: o, match: r }, this.matchPos = vt(this.text, o + (n == o ? 1 : 0)), this;
2210
+ }
2211
+ if (this.flat.to == this.to)
2212
+ return this.done = !0, this;
2213
+ this.flat = Ie.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
2214
+ }
2215
+ }
2216
+ }
2217
+ typeof Symbol < "u" && (gn.prototype[Symbol.iterator] = vn.prototype[Symbol.iterator] = function() {
2218
+ return this;
2219
+ });
2220
+ function xi(e) {
2221
+ try {
2222
+ return new RegExp(e, Zt), !0;
2223
+ } catch {
2224
+ return !1;
2225
+ }
2226
+ }
2227
+ function vt(e, t) {
2228
+ if (t >= e.length)
2229
+ return t;
2230
+ let r = e.lineAt(t), n;
2231
+ for (; t < r.to && (n = r.text.charCodeAt(t - r.from)) >= 56320 && n < 57344; )
2232
+ t++;
2233
+ return t;
2234
+ }
2235
+ function zt(e) {
2236
+ let t = String(e.state.doc.lineAt(e.state.selection.main.head).number), r = H("input", { class: "cm-textfield", name: "line", value: t }), n = H("form", {
2237
+ class: "cm-gotoLine",
2238
+ onkeydown: (i) => {
2239
+ i.keyCode == 27 ? (i.preventDefault(), e.dispatch({ effects: Qe.of(!1) }), e.focus()) : i.keyCode == 13 && (i.preventDefault(), o());
2240
+ },
2241
+ onsubmit: (i) => {
2242
+ i.preventDefault(), o();
2243
+ }
2244
+ }, H("label", e.state.phrase("Go to line"), ": ", r), " ", H("button", { class: "cm-button", type: "submit" }, e.state.phrase("go")), H("button", {
2245
+ name: "close",
2246
+ onclick: () => {
2247
+ e.dispatch({ effects: Qe.of(!1) }), e.focus();
2248
+ },
2249
+ "aria-label": e.state.phrase("close"),
2250
+ type: "button"
2251
+ }, ["×"]));
2252
+ function o() {
2253
+ let i = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value);
2254
+ if (!i)
2255
+ return;
2256
+ let { state: a } = e, c = a.doc.lineAt(a.selection.main.head), [, l, h, f, y] = i, C = f ? +f.slice(1) : 0, v = h ? +h : c.number;
2257
+ if (h && y) {
2258
+ let x = v / 100;
2259
+ l && (x = x * (l == "-" ? -1 : 1) + c.number / a.doc.lines), v = Math.round(a.doc.lines * x);
2260
+ } else h && l && (v = v * (l == "-" ? -1 : 1) + c.number);
2261
+ let R = a.doc.line(Math.max(1, Math.min(a.doc.lines, v))), m = le.cursor(R.from + Math.max(0, Math.min(C, R.length)));
2262
+ e.dispatch({
2263
+ effects: [Qe.of(!1), V.scrollIntoView(m.from, { y: "center" })],
2264
+ selection: m
2265
+ }), e.focus();
2266
+ }
2267
+ return { dom: n };
2268
+ }
2269
+ const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
2270
+ create() {
2271
+ return !0;
2272
+ },
2273
+ update(e, t) {
2274
+ for (let r of t.effects)
2275
+ r.is(Qe) && (e = r.value);
2276
+ return e;
2277
+ },
2278
+ provide: (e) => Gr.from(e, (t) => t ? zt : null)
2279
+ }), Ei = (e) => {
2280
+ let t = dt(e, zt);
2281
+ if (!t) {
2282
+ let r = [Qe.of(!0)];
2283
+ e.state.field(Dr, !1) == null && r.push(je.appendConfig.of([Dr, Si])), e.dispatch({ effects: r }), t = dt(e, zt);
2284
+ }
2285
+ return t && t.dom.querySelector("input").select(), !0;
2286
+ }, Si = /* @__PURE__ */ V.baseTheme({
2287
+ ".cm-panel.cm-gotoLine": {
2288
+ padding: "2px 6px 4px",
2289
+ position: "relative",
2290
+ "& label": { fontSize: "80%" },
2291
+ "& [name=close]": {
2292
+ position: "absolute",
2293
+ top: "0",
2294
+ bottom: "0",
2295
+ right: "4px",
2296
+ backgroundColor: "inherit",
2297
+ border: "none",
2298
+ font: "inherit",
2299
+ padding: "0"
2300
+ }
2301
+ }
2302
+ }), Ci = {
2303
+ highlightWordAroundCursor: !1,
2304
+ minSelectionLength: 1,
2305
+ maxMatches: 100,
2306
+ wholeWords: !1
2307
+ }, yn = /* @__PURE__ */ Kr.define({
2308
+ combine(e) {
2309
+ return Xr(e, Ci, {
2310
+ highlightWordAroundCursor: (t, r) => t || r,
2311
+ minSelectionLength: Math.min,
2312
+ maxMatches: Math.min
2313
+ });
2314
+ }
2315
+ });
2316
+ function er(e) {
2317
+ let t = [ki, Ti];
2318
+ return e && t.push(yn.of(e)), t;
2319
+ }
2320
+ const Ri = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch" }), wi = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
2321
+ function Wr(e, t, r, n) {
2322
+ return (r == 0 || e(t.sliceDoc(r - 1, r)) != ae.Word) && (n == t.doc.length || e(t.sliceDoc(n, n + 1)) != ae.Word);
2323
+ }
2324
+ function _i(e, t, r, n) {
2325
+ return e(t.sliceDoc(r, r + 1)) == ae.Word && e(t.sliceDoc(n - 1, n)) == ae.Word;
2326
+ }
2327
+ const Ti = /* @__PURE__ */ Br.fromClass(class {
2328
+ constructor(e) {
2329
+ this.decorations = this.getDeco(e);
2330
+ }
2331
+ update(e) {
2332
+ (e.selectionSet || e.docChanged || e.viewportChanged) && (this.decorations = this.getDeco(e.view));
2333
+ }
2334
+ getDeco(e) {
2335
+ let t = e.state.facet(yn), { state: r } = e, n = r.selection;
2336
+ if (n.ranges.length > 1)
2337
+ return Q.none;
2338
+ let o = n.main, i, a = null;
2339
+ if (o.empty) {
2340
+ if (!t.highlightWordAroundCursor)
2341
+ return Q.none;
2342
+ let l = r.wordAt(o.head);
2343
+ if (!l)
2344
+ return Q.none;
2345
+ a = r.charCategorizer(o.head), i = r.sliceDoc(l.from, l.to);
2346
+ } else {
2347
+ let l = o.to - o.from;
2348
+ if (l < t.minSelectionLength || l > 200)
2349
+ return Q.none;
2350
+ if (t.wholeWords) {
2351
+ if (i = r.sliceDoc(o.from, o.to), a = r.charCategorizer(o.head), !(Wr(a, r, o.from, o.to) && _i(a, r, o.from, o.to)))
2352
+ return Q.none;
2353
+ } else if (i = r.sliceDoc(o.from, o.to), !i)
2354
+ return Q.none;
2355
+ }
2356
+ let c = [];
2357
+ for (let l of e.visibleRanges) {
2358
+ let h = new We(r.doc, i, l.from, l.to);
2359
+ for (; !h.next().done; ) {
2360
+ let { from: f, to: y } = h.value;
2361
+ if ((!a || Wr(a, r, f, y)) && (o.empty && f <= o.from && y >= o.to ? c.push(wi.range(f, y)) : (f >= o.to || y <= o.from) && c.push(Ri.range(f, y)), c.length > t.maxMatches))
2362
+ return Q.none;
2363
+ }
2364
+ }
2365
+ return Q.set(c);
2366
+ }
2367
+ }, {
2368
+ decorations: (e) => e.decorations
2369
+ }), ki = /* @__PURE__ */ V.baseTheme({
2370
+ ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
2371
+ ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
2372
+ }), Mi = ({ state: e, dispatch: t }) => {
2373
+ let { selection: r } = e, n = le.create(r.ranges.map((o) => e.wordAt(o.head) || le.cursor(o.head)), r.mainIndex);
2374
+ return n.eq(r) ? !1 : (t(e.update({ selection: n })), !0);
2375
+ };
2376
+ function Pi(e, t) {
2377
+ let { main: r, ranges: n } = e.selection, o = e.wordAt(r.head), i = o && o.from == r.from && o.to == r.to;
2378
+ for (let a = !1, c = new We(e.doc, t, n[n.length - 1].to); ; )
2379
+ if (c.next(), c.done) {
2380
+ if (a)
2381
+ return null;
2382
+ c = new We(e.doc, t, 0, Math.max(0, n[n.length - 1].from - 1)), a = !0;
2383
+ } else {
2384
+ if (a && n.some((l) => l.from == c.value.from))
2385
+ continue;
2386
+ if (i) {
2387
+ let l = e.wordAt(c.value.from);
2388
+ if (!l || l.from != c.value.from || l.to != c.value.to)
2389
+ continue;
2390
+ }
2391
+ return c.value;
2392
+ }
2393
+ }
2394
+ const Oi = ({ state: e, dispatch: t }) => {
2395
+ let { ranges: r } = e.selection;
2396
+ if (r.some((i) => i.from === i.to))
2397
+ return Mi({ state: e, dispatch: t });
2398
+ let n = e.sliceDoc(r[0].from, r[0].to);
2399
+ if (e.selection.ranges.some((i) => e.sliceDoc(i.from, i.to) != n))
2400
+ return !1;
2401
+ let o = Pi(e, n);
2402
+ return o ? (t(e.update({
2403
+ selection: e.selection.addRange(le.range(o.from, o.to), !1),
2404
+ effects: V.scrollIntoView(o.to)
2405
+ })), !0) : !1;
2406
+ }, _e = /* @__PURE__ */ Kr.define({
2407
+ combine(e) {
2408
+ return Xr(e, {
2409
+ top: !1,
2410
+ caseSensitive: !1,
2411
+ literal: !1,
2412
+ regexp: !1,
2413
+ wholeWord: !1,
2414
+ createPanel: (t) => new Yi(t),
2415
+ scrollToMatch: (t) => V.scrollIntoView(t)
2416
+ });
2417
+ }
2418
+ });
2419
+ function bn(e) {
2420
+ return e ? [_e.of(e), Bt] : Bt;
2421
+ }
2422
+ class xn {
2423
+ /**
2424
+ Create a query object.
2425
+ */
2426
+ constructor(t) {
2427
+ this.search = t.search, this.caseSensitive = !!t.caseSensitive, this.literal = !!t.literal, this.regexp = !!t.regexp, this.replace = t.replace || "", this.valid = !!this.search && (!this.regexp || xi(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!t.wholeWord;
2428
+ }
2429
+ /**
2430
+ @internal
2431
+ */
2432
+ unquote(t) {
2433
+ return this.literal ? t : t.replace(/\\([nrt\\])/g, (r, n) => n == "n" ? `
2434
+ ` : n == "r" ? "\r" : n == "t" ? " " : "\\");
2435
+ }
2436
+ /**
2437
+ Compare this query to another query.
2438
+ */
2439
+ eq(t) {
2440
+ return this.search == t.search && this.replace == t.replace && this.caseSensitive == t.caseSensitive && this.regexp == t.regexp && this.wholeWord == t.wholeWord;
2441
+ }
2442
+ /**
2443
+ @internal
2444
+ */
2445
+ create() {
2446
+ return this.regexp ? new Li(this) : new $i(this);
2447
+ }
2448
+ /**
2449
+ Get a search cursor for this query, searching through the given
2450
+ range in the given state.
2451
+ */
2452
+ getCursor(t, r = 0, n) {
2453
+ let o = t.doc ? t : be.create({ doc: t });
2454
+ return n == null && (n = o.doc.length), this.regexp ? Le(this, o, r, n) : Fe(this, o, r, n);
2455
+ }
2456
+ }
2457
+ class En {
2458
+ constructor(t) {
2459
+ this.spec = t;
2460
+ }
2461
+ }
2462
+ function Fe(e, t, r, n) {
2463
+ return new We(t.doc, e.unquoted, r, n, e.caseSensitive ? void 0 : (o) => o.toLowerCase(), e.wholeWord ? Ai(t.doc, t.charCategorizer(t.selection.main.head)) : void 0);
2464
+ }
2465
+ function Ai(e, t) {
2466
+ return (r, n, o, i) => ((i > r || i + o.length < n) && (i = Math.max(0, r - 2), o = e.sliceString(i, Math.min(e.length, n + 2))), (t(yt(o, r - i)) != ae.Word || t(bt(o, r - i)) != ae.Word) && (t(bt(o, n - i)) != ae.Word || t(yt(o, n - i)) != ae.Word));
2467
+ }
2468
+ class $i extends En {
2469
+ constructor(t) {
2470
+ super(t);
2471
+ }
2472
+ nextMatch(t, r, n) {
2473
+ let o = Fe(this.spec, t, n, t.doc.length).nextOverlapping();
2474
+ if (o.done) {
2475
+ let i = Math.min(t.doc.length, r + this.spec.unquoted.length);
2476
+ o = Fe(this.spec, t, 0, i).nextOverlapping();
2477
+ }
2478
+ return o.done || o.value.from == r && o.value.to == n ? null : o.value;
2479
+ }
2480
+ // Searching in reverse is, rather than implementing an inverted search
2481
+ // cursor, done by scanning chunk after chunk forward.
2482
+ prevMatchInRange(t, r, n) {
2483
+ for (let o = n; ; ) {
2484
+ let i = Math.max(r, o - 1e4 - this.spec.unquoted.length), a = Fe(this.spec, t, i, o), c = null;
2485
+ for (; !a.nextOverlapping().done; )
2486
+ c = a.value;
2487
+ if (c)
2488
+ return c;
2489
+ if (i == r)
2490
+ return null;
2491
+ o -= 1e4;
2492
+ }
2493
+ }
2494
+ prevMatch(t, r, n) {
2495
+ let o = this.prevMatchInRange(t, 0, r);
2496
+ return o || (o = this.prevMatchInRange(t, Math.max(0, n - this.spec.unquoted.length), t.doc.length)), o && (o.from != r || o.to != n) ? o : null;
2497
+ }
2498
+ getReplacement(t) {
2499
+ return this.spec.unquote(this.spec.replace);
2500
+ }
2501
+ matchAll(t, r) {
2502
+ let n = Fe(this.spec, t, 0, t.doc.length), o = [];
2503
+ for (; !n.next().done; ) {
2504
+ if (o.length >= r)
2505
+ return null;
2506
+ o.push(n.value);
2507
+ }
2508
+ return o;
2509
+ }
2510
+ highlight(t, r, n, o) {
2511
+ let i = Fe(this.spec, t, Math.max(0, r - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, t.doc.length));
2512
+ for (; !i.next().done; )
2513
+ o(i.value.from, i.value.to);
2514
+ }
2515
+ }
2516
+ function Le(e, t, r, n) {
2517
+ return new gn(t.doc, e.search, {
2518
+ ignoreCase: !e.caseSensitive,
2519
+ test: e.wholeWord ? Fi(t.charCategorizer(t.selection.main.head)) : void 0
2520
+ }, r, n);
2521
+ }
2522
+ function yt(e, t) {
2523
+ return e.slice(Zr(e, t, !1), t);
2524
+ }
2525
+ function bt(e, t) {
2526
+ return e.slice(t, Zr(e, t));
2527
+ }
2528
+ function Fi(e) {
2529
+ return (t, r, n) => !n[0].length || (e(yt(n.input, n.index)) != ae.Word || e(bt(n.input, n.index)) != ae.Word) && (e(bt(n.input, n.index + n[0].length)) != ae.Word || e(yt(n.input, n.index + n[0].length)) != ae.Word);
2530
+ }
2531
+ class Li extends En {
2532
+ nextMatch(t, r, n) {
2533
+ let o = Le(this.spec, t, n, t.doc.length).next();
2534
+ return o.done && (o = Le(this.spec, t, 0, r).next()), o.done ? null : o.value;
2535
+ }
2536
+ prevMatchInRange(t, r, n) {
2537
+ for (let o = 1; ; o++) {
2538
+ let i = Math.max(
2539
+ r,
2540
+ n - o * 1e4
2541
+ /* FindPrev.ChunkSize */
2542
+ ), a = Le(this.spec, t, i, n), c = null;
2543
+ for (; !a.next().done; )
2544
+ c = a.value;
2545
+ if (c && (i == r || c.from > i + 10))
2546
+ return c;
2547
+ if (i == r)
2548
+ return null;
2549
+ }
2550
+ }
2551
+ prevMatch(t, r, n) {
2552
+ return this.prevMatchInRange(t, 0, r) || this.prevMatchInRange(t, n, t.doc.length);
2553
+ }
2554
+ getReplacement(t) {
2555
+ return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (r, n) => {
2556
+ if (n == "&")
2557
+ return t.match[0];
2558
+ if (n == "$")
2559
+ return "$";
2560
+ for (let o = n.length; o > 0; o--) {
2561
+ let i = +n.slice(0, o);
2562
+ if (i > 0 && i < t.match.length)
2563
+ return t.match[i] + n.slice(o);
2564
+ }
2565
+ return r;
2566
+ });
2567
+ }
2568
+ matchAll(t, r) {
2569
+ let n = Le(this.spec, t, 0, t.doc.length), o = [];
2570
+ for (; !n.next().done; ) {
2571
+ if (o.length >= r)
2572
+ return null;
2573
+ o.push(n.value);
2574
+ }
2575
+ return o;
2576
+ }
2577
+ highlight(t, r, n, o) {
2578
+ let i = Le(this.spec, t, Math.max(
2579
+ 0,
2580
+ r - 250
2581
+ /* RegExp.HighlightMargin */
2582
+ ), Math.min(n + 250, t.doc.length));
2583
+ for (; !i.next().done; )
2584
+ o(i.value.from, i.value.to);
2585
+ }
2586
+ }
2587
+ const tt = /* @__PURE__ */ je.define(), tr = /* @__PURE__ */ je.define(), xe = /* @__PURE__ */ Gt.define({
2588
+ create(e) {
2589
+ return new It(Ut(e).create(), null);
2590
+ },
2591
+ update(e, t) {
2592
+ for (let r of t.effects)
2593
+ r.is(tt) ? e = new It(r.value.create(), e.panel) : r.is(tr) && (e = new It(e.query, r.value ? rr : null));
2594
+ return e;
2595
+ },
2596
+ provide: (e) => Gr.from(e, (t) => t.panel)
2597
+ });
2598
+ class It {
2599
+ constructor(t, r) {
2600
+ this.query = t, this.panel = r;
2601
+ }
2602
+ }
2603
+ const Ni = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch" }), Ii = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Di = /* @__PURE__ */ Br.fromClass(class {
2604
+ constructor(e) {
2605
+ this.view = e, this.decorations = this.highlight(e.state.field(xe));
2606
+ }
2607
+ update(e) {
2608
+ let t = e.state.field(xe);
2609
+ (t != e.startState.field(xe) || e.docChanged || e.selectionSet || e.viewportChanged) && (this.decorations = this.highlight(t));
2610
+ }
2611
+ highlight({ query: e, panel: t }) {
2612
+ if (!t || !e.spec.valid)
2613
+ return Q.none;
2614
+ let { view: r } = this, n = new io();
2615
+ for (let o = 0, i = r.visibleRanges, a = i.length; o < a; o++) {
2616
+ let { from: c, to: l } = i[o];
2617
+ for (; o < a - 1 && l > i[o + 1].from - 2 * 250; )
2618
+ l = i[++o].to;
2619
+ e.highlight(r.state, c, l, (h, f) => {
2620
+ let y = r.state.selection.ranges.some((C) => C.from == h && C.to == f);
2621
+ n.add(h, f, y ? Ii : Ni);
2622
+ });
2623
+ }
2624
+ return n.finish();
2625
+ }
2626
+ }, {
2627
+ decorations: (e) => e.decorations
2628
+ });
2629
+ function ot(e) {
2630
+ return (t) => {
2631
+ let r = t.state.field(xe, !1);
2632
+ return r && r.query.spec.valid ? e(t, r) : Rn(t);
2633
+ };
2634
+ }
2635
+ const xt = /* @__PURE__ */ ot((e, { query: t }) => {
2636
+ let { to: r } = e.state.selection.main, n = t.nextMatch(e.state, r, r);
2637
+ if (!n)
2638
+ return !1;
2639
+ let o = le.single(n.from, n.to), i = e.state.facet(_e);
2640
+ return e.dispatch({
2641
+ selection: o,
2642
+ effects: [nr(e, n), i.scrollToMatch(o.main, e)],
2643
+ userEvent: "select.search"
2644
+ }), Cn(e), !0;
2645
+ }), Et = /* @__PURE__ */ ot((e, { query: t }) => {
2646
+ let { state: r } = e, { from: n } = r.selection.main, o = t.prevMatch(r, n, n);
2647
+ if (!o)
2648
+ return !1;
2649
+ let i = le.single(o.from, o.to), a = e.state.facet(_e);
2650
+ return e.dispatch({
2651
+ selection: i,
2652
+ effects: [nr(e, o), a.scrollToMatch(i.main, e)],
2653
+ userEvent: "select.search"
2654
+ }), Cn(e), !0;
2655
+ }), Wi = /* @__PURE__ */ ot((e, { query: t }) => {
2656
+ let r = t.matchAll(e.state, 1e3);
2657
+ return !r || !r.length ? !1 : (e.dispatch({
2658
+ selection: le.create(r.map((n) => le.range(n.from, n.to))),
2659
+ userEvent: "select.search.matches"
2660
+ }), !0);
2661
+ }), ji = ({ state: e, dispatch: t }) => {
2662
+ let r = e.selection;
2663
+ if (r.ranges.length > 1 || r.main.empty)
2664
+ return !1;
2665
+ let { from: n, to: o } = r.main, i = [], a = 0;
2666
+ for (let c = new We(e.doc, e.sliceDoc(n, o)); !c.next().done; ) {
2667
+ if (i.length > 1e3)
2668
+ return !1;
2669
+ c.value.from == n && (a = i.length), i.push(le.range(c.value.from, c.value.to));
2670
+ }
2671
+ return t(e.update({
2672
+ selection: le.create(i, a),
2673
+ userEvent: "select.search.matches"
2674
+ })), !0;
2675
+ }, jr = /* @__PURE__ */ ot((e, { query: t }) => {
2676
+ let { state: r } = e, { from: n, to: o } = r.selection.main;
2677
+ if (r.readOnly)
2678
+ return !1;
2679
+ let i = t.nextMatch(r, n, n);
2680
+ if (!i)
2681
+ return !1;
2682
+ let a = i, c = [], l, h, f = [];
2683
+ a.from == n && a.to == o && (h = r.toText(t.getReplacement(a)), c.push({ from: a.from, to: a.to, insert: h }), a = t.nextMatch(r, a.from, a.to), f.push(V.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + ".")));
2684
+ let y = e.state.changes(c);
2685
+ return a && (l = le.single(a.from, a.to).map(y), f.push(nr(e, a)), f.push(r.facet(_e).scrollToMatch(l.main, e))), e.dispatch({
2686
+ changes: y,
2687
+ selection: l,
2688
+ effects: f,
2689
+ userEvent: "input.replace"
2690
+ }), !0;
2691
+ }), qi = /* @__PURE__ */ ot((e, { query: t }) => {
2692
+ if (e.state.readOnly)
2693
+ return !1;
2694
+ let r = t.matchAll(e.state, 1e9).map((o) => {
2695
+ let { from: i, to: a } = o;
2696
+ return { from: i, to: a, insert: t.getReplacement(o) };
2697
+ });
2698
+ if (!r.length)
2699
+ return !1;
2700
+ let n = e.state.phrase("replaced $ matches", r.length) + ".";
2701
+ return e.dispatch({
2702
+ changes: r,
2703
+ effects: V.announce.of(n),
2704
+ userEvent: "input.replace.all"
2705
+ }), !0;
2706
+ });
2707
+ function rr(e) {
2708
+ return e.state.facet(_e).createPanel(e);
2709
+ }
2710
+ function Ut(e, t) {
2711
+ var r, n, o, i, a;
2712
+ let c = e.selection.main, l = c.empty || c.to > c.from + 100 ? "" : e.sliceDoc(c.from, c.to);
2713
+ if (t && !l)
2714
+ return t;
2715
+ let h = e.facet(_e);
2716
+ return new xn({
2717
+ search: ((r = t == null ? void 0 : t.literal) !== null && r !== void 0 ? r : h.literal) ? l : l.replace(/\n/g, "\\n"),
2718
+ caseSensitive: (n = t == null ? void 0 : t.caseSensitive) !== null && n !== void 0 ? n : h.caseSensitive,
2719
+ literal: (o = t == null ? void 0 : t.literal) !== null && o !== void 0 ? o : h.literal,
2720
+ regexp: (i = t == null ? void 0 : t.regexp) !== null && i !== void 0 ? i : h.regexp,
2721
+ wholeWord: (a = t == null ? void 0 : t.wholeWord) !== null && a !== void 0 ? a : h.wholeWord
2722
+ });
2723
+ }
2724
+ function Sn(e) {
2725
+ let t = dt(e, rr);
2726
+ return t && t.dom.querySelector("[main-field]");
2727
+ }
2728
+ function Cn(e) {
2729
+ let t = Sn(e);
2730
+ t && t == e.root.activeElement && t.select();
2731
+ }
2732
+ const Rn = (e) => {
2733
+ let t = e.state.field(xe, !1);
2734
+ if (t && t.panel) {
2735
+ let r = Sn(e);
2736
+ if (r && r != e.root.activeElement) {
2737
+ let n = Ut(e.state, t.query.spec);
2738
+ n.valid && e.dispatch({ effects: tt.of(n) }), r.focus(), r.select();
2739
+ }
2740
+ } else
2741
+ e.dispatch({ effects: [
2742
+ tr.of(!0),
2743
+ t ? tt.of(Ut(e.state, t.query.spec)) : je.appendConfig.of(Bt)
2744
+ ] });
2745
+ return !0;
2746
+ }, wn = (e) => {
2747
+ let t = e.state.field(xe, !1);
2748
+ if (!t || !t.panel)
2749
+ return !1;
2750
+ let r = dt(e, rr);
2751
+ return r && r.dom.contains(e.root.activeElement) && e.focus(), e.dispatch({ effects: tr.of(!1) }), !0;
2752
+ }, _n = [
2753
+ { key: "Mod-f", run: Rn, scope: "editor search-panel" },
2754
+ { key: "F3", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
2755
+ { key: "Mod-g", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
2756
+ { key: "Escape", run: wn, scope: "editor search-panel" },
2757
+ { key: "Mod-Shift-l", run: ji },
2758
+ { key: "Mod-Alt-g", run: Ei },
2759
+ { key: "Mod-d", run: Oi, preventDefault: !0 }
2760
+ ];
2761
+ class Yi {
2762
+ constructor(t) {
2763
+ this.view = t;
2764
+ let r = this.query = t.state.field(xe).query.spec;
2765
+ this.commit = this.commit.bind(this), this.searchField = H("input", {
2766
+ value: r.search,
2767
+ placeholder: re(t, "Find"),
2768
+ "aria-label": re(t, "Find"),
2769
+ class: "cm-textfield",
2770
+ name: "search",
2771
+ form: "",
2772
+ "main-field": "true",
2773
+ onchange: this.commit,
2774
+ onkeyup: this.commit
2775
+ }), this.replaceField = H("input", {
2776
+ value: r.replace,
2777
+ placeholder: re(t, "Replace"),
2778
+ "aria-label": re(t, "Replace"),
2779
+ class: "cm-textfield",
2780
+ name: "replace",
2781
+ form: "",
2782
+ onchange: this.commit,
2783
+ onkeyup: this.commit
2784
+ }), this.caseField = H("input", {
2785
+ type: "checkbox",
2786
+ name: "case",
2787
+ form: "",
2788
+ checked: r.caseSensitive,
2789
+ onchange: this.commit
2790
+ }), this.reField = H("input", {
2791
+ type: "checkbox",
2792
+ name: "re",
2793
+ form: "",
2794
+ checked: r.regexp,
2795
+ onchange: this.commit
2796
+ }), this.wordField = H("input", {
2797
+ type: "checkbox",
2798
+ name: "word",
2799
+ form: "",
2800
+ checked: r.wholeWord,
2801
+ onchange: this.commit
2802
+ });
2803
+ function n(o, i, a) {
2804
+ return H("button", { class: "cm-button", name: o, onclick: i, type: "button" }, a);
2805
+ }
2806
+ this.dom = H("div", { onkeydown: (o) => this.keydown(o), class: "cm-search" }, [
2807
+ this.searchField,
2808
+ n("next", () => xt(t), [re(t, "next")]),
2809
+ n("prev", () => Et(t), [re(t, "previous")]),
2810
+ n("select", () => Wi(t), [re(t, "all")]),
2811
+ H("label", null, [this.caseField, re(t, "match case")]),
2812
+ H("label", null, [this.reField, re(t, "regexp")]),
2813
+ H("label", null, [this.wordField, re(t, "by word")]),
2814
+ ...t.state.readOnly ? [] : [
2815
+ H("br"),
2816
+ this.replaceField,
2817
+ n("replace", () => jr(t), [re(t, "replace")]),
2818
+ n("replaceAll", () => qi(t), [re(t, "replace all")])
2819
+ ],
2820
+ H("button", {
2821
+ name: "close",
2822
+ onclick: () => wn(t),
2823
+ "aria-label": re(t, "close"),
2824
+ type: "button"
2825
+ }, ["×"])
2826
+ ]);
2827
+ }
2828
+ commit() {
2829
+ let t = new xn({
2830
+ search: this.searchField.value,
2831
+ caseSensitive: this.caseField.checked,
2832
+ regexp: this.reField.checked,
2833
+ wholeWord: this.wordField.checked,
2834
+ replace: this.replaceField.value
2835
+ });
2836
+ t.eq(this.query) || (this.query = t, this.view.dispatch({ effects: tt.of(t) }));
2837
+ }
2838
+ keydown(t) {
2839
+ Qn(this.view, t, "search-panel") ? t.preventDefault() : t.keyCode == 13 && t.target == this.searchField ? (t.preventDefault(), (t.shiftKey ? Et : xt)(this.view)) : t.keyCode == 13 && t.target == this.replaceField && (t.preventDefault(), jr(this.view));
2840
+ }
2841
+ update(t) {
2842
+ for (let r of t.transactions)
2843
+ for (let n of r.effects)
2844
+ n.is(tt) && !n.value.eq(this.query) && this.setQuery(n.value);
2845
+ }
2846
+ setQuery(t) {
2847
+ this.query = t, this.searchField.value = t.search, this.replaceField.value = t.replace, this.caseField.checked = t.caseSensitive, this.reField.checked = t.regexp, this.wordField.checked = t.wholeWord;
2848
+ }
2849
+ mount() {
2850
+ this.searchField.select();
2851
+ }
2852
+ get pos() {
2853
+ return 80;
2854
+ }
2855
+ get top() {
2856
+ return this.view.state.facet(_e).top;
2857
+ }
2858
+ }
2859
+ function re(e, t) {
2860
+ return e.state.phrase(t);
2861
+ }
2862
+ const at = 30, ct = /[\s\.,:;?!]/;
2863
+ function nr(e, { from: t, to: r }) {
2864
+ let n = e.state.doc.lineAt(t), o = e.state.doc.lineAt(r).to, i = Math.max(n.from, t - at), a = Math.min(o, r + at), c = e.state.sliceDoc(i, a);
2865
+ if (i != n.from) {
2866
+ for (let l = 0; l < at; l++)
2867
+ if (!ct.test(c[l + 1]) && ct.test(c[l])) {
2868
+ c = c.slice(l);
2869
+ break;
2870
+ }
2871
+ }
2872
+ if (a != o) {
2873
+ for (let l = c.length - 1; l > c.length - at; l--)
2874
+ if (!ct.test(c[l - 1]) && ct.test(c[l])) {
2875
+ c = c.slice(0, l);
2876
+ break;
2877
+ }
2878
+ }
2879
+ return V.announce.of(`${e.state.phrase("current match")}. ${c} ${e.state.phrase("on line")} ${n.number}.`);
2880
+ }
2881
+ const Vi = /* @__PURE__ */ V.baseTheme({
2882
+ ".cm-panel.cm-search": {
2883
+ padding: "2px 6px 4px",
2884
+ position: "relative",
2885
+ "& [name=close]": {
2886
+ position: "absolute",
2887
+ top: "0",
2888
+ right: "4px",
2889
+ backgroundColor: "inherit",
2890
+ border: "none",
2891
+ font: "inherit",
2892
+ padding: 0,
2893
+ margin: 0
2894
+ },
2895
+ "& input, & button, & label": {
2896
+ margin: ".2em .6em .2em 0"
2897
+ },
2898
+ "& input[type=checkbox]": {
2899
+ marginRight: ".2em"
2900
+ },
2901
+ "& label": {
2902
+ fontSize: "80%",
2903
+ whiteSpace: "pre"
2904
+ }
2905
+ },
2906
+ "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
2907
+ "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
2908
+ "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
2909
+ "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
2910
+ }), Bt = [
2911
+ xe,
2912
+ /* @__PURE__ */ Qr.low(Di),
2913
+ Vi
2914
+ ], cs = {
2915
+ // 搜索面板标题
2916
+ Search: "搜索",
2917
+ Replace: "替换",
2918
+ Find: "查找",
2919
+ // 按钮
2920
+ "Replace all": "全部替换",
2921
+ Next: "下一个",
2922
+ Previous: "上一个",
2923
+ All: "全部",
2924
+ Close: "关闭",
2925
+ done: "完成",
2926
+ // 选项
2927
+ "Match case": "区分大小写",
2928
+ "Match whole word": "全字匹配",
2929
+ "Use regular expression": "使用正则表达式",
2930
+ "by word": "按单词",
2931
+ replace: "替换",
2932
+ // 输入框提示
2933
+ "Search for": "搜索内容",
2934
+ "Replace with": "替换为",
2935
+ // 状态信息
2936
+ "No matches": "无匹配结果",
2937
+ "replaced $ matches": "已替换 $ 个匹配项",
2938
+ "replaced match on line $": "已替换第 $ 行的匹配项",
2939
+ "on line": "在第",
2940
+ line: "行",
2941
+ "$ of $ matches": "第 $ 个,共 $ 个匹配",
2942
+ // 错误信息
2943
+ "Invalid regular expression": "无效的正则表达式",
2944
+ "Query too long": "查询内容过长",
2945
+ "Search string too long": "搜索字符串过长"
2946
+ };
2947
+ function zi() {
2948
+ return V.theme({
2949
+ // 搜索面板样式优化
2950
+ ".cm-panel.cm-search": {
2951
+ fontSize: "14px",
2952
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'
2953
+ },
2954
+ ".cm-search label": {
2955
+ fontSize: "13px"
2956
+ },
2957
+ ".cm-search input": {
2958
+ fontSize: "13px",
2959
+ fontFamily: "inherit"
2960
+ },
2961
+ ".cm-search button": {
2962
+ fontSize: "12px",
2963
+ fontFamily: "inherit"
2964
+ }
2965
+ });
2966
+ }
2967
+ function Ui(e) {
2968
+ setTimeout(() => {
2969
+ const t = e.dom.querySelector(".cm-panel.cm-search");
2970
+ if (!t) return;
2971
+ t.querySelectorAll("label").forEach((i) => {
2972
+ var c;
2973
+ switch ((c = i.textContent) == null ? void 0 : c.trim()) {
2974
+ case "Match case":
2975
+ i.textContent = "区分大小写";
2976
+ break;
2977
+ case "Match whole word":
2978
+ i.textContent = "全字匹配";
2979
+ break;
2980
+ case "Use regular expression":
2981
+ i.textContent = "使用正则表达式";
2982
+ break;
2983
+ }
2984
+ }), t.querySelectorAll("button").forEach((i) => {
2985
+ var c;
2986
+ switch ((c = i.textContent) == null ? void 0 : c.trim()) {
2987
+ case "Next":
2988
+ i.textContent = "下一个";
2989
+ break;
2990
+ case "Previous":
2991
+ i.textContent = "上一个";
2992
+ break;
2993
+ case "All":
2994
+ i.textContent = "全部";
2995
+ break;
2996
+ case "Replace all":
2997
+ i.textContent = "全部替换";
2998
+ break;
2999
+ case "Close":
3000
+ i.textContent = "关闭";
3001
+ break;
3002
+ case "done":
3003
+ i.textContent = "完成";
3004
+ break;
3005
+ }
3006
+ }), t.querySelectorAll('input[type="text"]').forEach((i, a) => {
3007
+ const c = i;
3008
+ a === 0 ? c.placeholder = "搜索内容" : a === 1 && (c.placeholder = "替换为");
3009
+ });
3010
+ }, 100);
3011
+ }
3012
+ function qr() {
3013
+ return [
3014
+ zi(),
3015
+ // 中文样式
3016
+ bn({
3017
+ top: !0
3018
+ // 搜索面板显示在顶部
3019
+ }),
3020
+ er(),
3021
+ // 高亮相同的选中文本
3022
+ we.of(_n),
3023
+ // 搜索相关的键盘快捷键
3024
+ // 监听 DOM 变化以应用中文翻译
3025
+ V.updateListener.of((e) => {
3026
+ e.view.dom.querySelector(".cm-panel.cm-search") && Ui(e.view);
3027
+ })
3028
+ ];
3029
+ }
3030
+ function ls() {
3031
+ return [er()];
3032
+ }
3033
+ function Yr() {
3034
+ return [bn({
3035
+ top: !0
3036
+ }), er(), we.of(_n)];
3037
+ }
3038
+ const us = [
3039
+ {
3040
+ key: "Ctrl-f",
3041
+ mac: "Cmd-f",
3042
+ run: () => !0
3043
+ },
3044
+ // 将被搜索面板接管
3045
+ {
3046
+ key: "F3",
3047
+ run: () => !0
3048
+ },
3049
+ // 查找下一个的替代快捷键
3050
+ {
3051
+ key: "Shift-F3",
3052
+ run: () => !0
3053
+ }
3054
+ // 查找上一个的替代快捷键
3055
+ ], Bi = ({
2037
3056
  value: e,
2038
- onChange: r,
2039
- extensions: n = [],
2040
- height: o = "300px",
2041
- disabled: a = !1,
3057
+ onChange: t,
3058
+ extensions: r = [],
3059
+ height: n = "300px",
3060
+ disabled: o = !1,
2042
3061
  className: i = "",
2043
- style: u = {},
2044
- placeholder: s = "",
2045
- showLineNumbers: f = !0,
2046
- onEditorViewCreated: m
2047
- }) => {
2048
- const p = fe(null), d = fe();
2049
- return se(() => {
2050
- if (!p.current) return;
2051
- const P = [
2052
- Me.of([dr]),
2053
- te.lineWrapping,
2054
- Ke(Yr),
2055
- he.allowMultipleSelections.of(!0),
2056
- s ? Lr(s) : [],
3062
+ style: a = {},
3063
+ placeholder: c = "",
3064
+ showLineNumbers: l = !0,
3065
+ onEditorViewCreated: h,
3066
+ locale: f = "zh-CN"
3067
+ }, y) => {
3068
+ const C = ue(null), v = ue();
3069
+ return ge(() => {
3070
+ if (!C.current) return;
3071
+ const R = [
3072
+ we.of([Dt, {
3073
+ key: "Enter",
3074
+ run: Er
3075
+ }]),
3076
+ V.lineWrapping,
3077
+ pt(Sr),
3078
+ be.allowMultipleSelections.of(!0),
3079
+ f === "zh-CN" ? qr() : Yr(),
3080
+ c ? br(c) : [],
2057
3081
  // 行号功能,根据配置决定是否启用
2058
- f ? Wr() : [],
2059
- te.updateListener.of((R) => {
2060
- if (R.docChanged && r) {
2061
- const y = {
2062
- value: R.state.doc.toString(),
3082
+ l ? xr() : [],
3083
+ V.updateListener.of((g) => {
3084
+ if (g.docChanged && t) {
3085
+ const S = {
3086
+ value: g.state.doc.toString(),
2063
3087
  readOnlyRanges: []
2064
3088
  // 基础编辑器没有只读区域逻辑,由特定编辑器实现
2065
3089
  };
2066
- r(y);
3090
+ t(S);
2067
3091
  }
2068
3092
  })
2069
3093
  ];
2070
- a && P.push(he.readOnly.of(!0));
2071
- const C = he.create({
3094
+ o && R.push(be.readOnly.of(!0));
3095
+ const m = be.create({
2072
3096
  doc: e,
2073
- extensions: [...P, ...n]
2074
- }), x = new te({
2075
- state: C,
2076
- parent: p.current
3097
+ extensions: [...R, ...r]
3098
+ }), x = new V({
3099
+ state: m,
3100
+ parent: C.current
2077
3101
  });
2078
- return d.current = x, m && m(x), () => {
2079
- var R;
2080
- (R = d.current) == null || R.destroy();
3102
+ return v.current = x, h && h(x), () => {
3103
+ var g;
3104
+ (g = v.current) == null || g.destroy();
2081
3105
  };
2082
- }, []), se(() => {
2083
- d.current && e !== d.current.state.doc.toString() && d.current.dispatch({
3106
+ }, []), ge(() => {
3107
+ v.current && e !== v.current.state.doc.toString() && v.current.dispatch({
2084
3108
  changes: {
2085
3109
  from: 0,
2086
- to: d.current.state.doc.length,
3110
+ to: v.current.state.doc.length,
2087
3111
  insert: e
2088
3112
  }
2089
3113
  });
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) : [],
3114
+ }, [e]), ge(() => {
3115
+ if (!v.current || !C.current) return;
3116
+ const R = v.current.state.doc.toString();
3117
+ v.current.destroy();
3118
+ const m = [
3119
+ we.of([Dt, {
3120
+ key: "Enter",
3121
+ run: Er
3122
+ }]),
3123
+ V.lineWrapping,
3124
+ pt(Sr),
3125
+ be.allowMultipleSelections.of(!0),
3126
+ f === "zh-CN" ? qr() : Yr(),
3127
+ c ? br(c) : [],
2100
3128
  // 行号功能,根据配置决定是否启用
2101
- f ? Wr() : [],
2102
- te.updateListener.of((y) => {
2103
- if (y.docChanged && r) {
2104
- const S = {
2105
- value: y.state.doc.toString(),
3129
+ l ? xr() : [],
3130
+ V.updateListener.of((S) => {
3131
+ if (S.docChanged && t) {
3132
+ const _ = {
3133
+ value: S.state.doc.toString(),
2106
3134
  readOnlyRanges: []
2107
3135
  // 基础编辑器没有只读区域逻辑,由特定编辑器实现
2108
3136
  };
2109
- r(S);
3137
+ t(_);
2110
3138
  }
2111
3139
  })
2112
3140
  ];
2113
- a && C.push(he.readOnly.of(!0));
2114
- const x = he.create({
2115
- doc: P,
2116
- extensions: [...C, ...n]
2117
- }), R = new te({
3141
+ o && m.push(be.readOnly.of(!0));
3142
+ const x = be.create({
3143
+ doc: R,
3144
+ extensions: [...m, ...r]
3145
+ }), g = new V({
2118
3146
  state: x,
2119
- parent: p.current
3147
+ parent: C.current
2120
3148
  });
2121
- d.current = R, m && m(R);
2122
- }, [a, f]), /* @__PURE__ */ rr("div", { ref: p, className: `senyao-editor ${a ? "disabled" : ""} ${i}`, style: {
2123
- height: o,
2124
- ...u
3149
+ v.current = g, h && h(g);
3150
+ }, [o, l]), Kn(y, () => ({
3151
+ insertTextAtCursor: (R) => {
3152
+ const m = v.current;
3153
+ m && (m.dispatch(m.state.replaceSelection(R)), m.focus());
3154
+ },
3155
+ goToPosition: (R) => {
3156
+ const m = v.current;
3157
+ if (m) {
3158
+ const x = m.state.doc.length, g = Math.max(0, Math.min(R, x));
3159
+ m.dispatch({
3160
+ selection: {
3161
+ anchor: g,
3162
+ head: g
3163
+ },
3164
+ scrollIntoView: !0
3165
+ }), m.focus();
3166
+ }
3167
+ },
3168
+ goToLine: (R, m = 0) => {
3169
+ const x = v.current;
3170
+ if (x) {
3171
+ const g = x.state.doc, S = Math.max(1, Math.min(R, g.lines)), _ = g.line(S), $ = Math.max(0, Math.min(m, _.length)) + _.from;
3172
+ x.dispatch({
3173
+ selection: {
3174
+ anchor: $,
3175
+ head: $
3176
+ },
3177
+ scrollIntoView: !0
3178
+ }), x.focus();
3179
+ }
3180
+ },
3181
+ getEditorView: () => v.current
3182
+ })), /* @__PURE__ */ wt("div", { ref: C, className: `senyao-editor ${o ? "disabled" : ""} ${i}`, style: {
3183
+ height: n,
3184
+ ...a
2125
3185
  } });
2126
- }, Ro = ({
3186
+ }, or = rt(Bi), Gi = ({
2127
3187
  value: e,
2128
- onChange: r,
2129
- language: n = "json",
2130
- extensions: o = [],
2131
- theme: a = "light",
3188
+ onChange: t,
3189
+ language: r = "json",
3190
+ extensions: n = [],
3191
+ theme: o = "light",
2132
3192
  showLineNumbers: i = !0,
2133
- ...u
2134
- }) => {
2135
- const s = Be(() => {
2136
- const f = Zn(n) ? Xn(n) : [], m = oo(a);
2137
- return [f, m, ...o];
2138
- }, [n, o, a]);
2139
- return /* @__PURE__ */ rr(xr, { value: e, onChange: r, extensions: s, showLineNumbers: i, ...u });
2140
- }, xo = ({
3193
+ ...a
3194
+ }, c) => {
3195
+ const l = ht(() => {
3196
+ const h = li(r) ? ci(r) : [], f = mi(o);
3197
+ return [h, f, ...n];
3198
+ }, [r, n, o]);
3199
+ return /* @__PURE__ */ wt(or, { ref: c, value: e, onChange: t, extensions: l, showLineNumbers: i, ...a });
3200
+ }, fs = rt(Gi), Hi = ({
2141
3201
  value: e,
2142
- onChange: r,
2143
- extensions: n = [],
2144
- readOnlyRanges: o = [],
2145
- manageReadOnlyRanges: a = !0,
3202
+ onChange: t,
3203
+ extensions: r = [],
3204
+ readOnlyRanges: n,
3205
+ manageReadOnlyRanges: o = !0,
2146
3206
  showLineNumbers: i = !0,
2147
- ...u
2148
- }) => {
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),
3207
+ ...a
3208
+ }, c) => {
3209
+ const l = ue(null), f = ((b) => b != null && typeof b == "object" && "value" in b)(e), y = f ? e.value : e, C = (f && "readOnlyRanges" in e ? e.readOnlyRanges : n) ?? [], [v, R] = Ft(y ?? ""), m = ue(null), [x, g] = Ft(C), S = ue(v), [_, $] = Ft(null), d = ue(!1), q = ue(/* @__PURE__ */ new Map()), A = ue(!1);
3210
+ ge(() => {
3211
+ if (o && C.length > 0 && !_) {
3212
+ const b = [];
3213
+ let T = 0;
3214
+ for (let k = 0; k < C.length; k++) {
3215
+ const O = C[k];
3216
+ O.start > T && b.push({
3217
+ content: v.substring(T, O.start),
2158
3218
  editable: !0
2159
- }), g.push({
2160
- content: e.substring(k.start, k.end),
3219
+ }), b.push({
3220
+ content: v.substring(O.start, O.end),
2161
3221
  editable: !1
2162
- }), w = k.end;
3222
+ }), T = O.end;
2163
3223
  }
2164
- w < e.length && g.push({
2165
- content: e.substring(w),
3224
+ T < v.length && b.push({
3225
+ content: v.substring(T),
2166
3226
  editable: !0
2167
- }), P(g);
3227
+ }), $(b);
2168
3228
  }
2169
- }, [a, o, e, d]), se(() => {
2170
- if (e) {
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;
3229
+ }, [o, C, v, _]), ge(() => {
3230
+ if (v) {
3231
+ const b = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], T = /* @__PURE__ */ new Map();
3232
+ b.forEach((k) => {
3233
+ const O = v.indexOf(k);
3234
+ O >= 0 && T.set(k, O);
3235
+ }), q.current = T;
2176
3236
  }
2177
3237
  }, []);
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);
3238
+ const Ye = ht(() => {
3239
+ const b = [zr(), Hr()];
3240
+ return x.length > 0 && b.push(gi(x)), [...b, ...r];
3241
+ }, [r, x]), Ee = se((b, T, k = 0) => {
3242
+ const O = b.indexOf(T, k);
3243
+ return O >= 0 ? O : null;
3244
+ }, []), Te = se((b, T) => {
3245
+ if (!o || !b || b.length === 0) return b;
3246
+ const k = [...b];
3247
+ let O = 0;
3248
+ for (let G = 0; G < b.length; G++) {
3249
+ const oe = b[G];
3250
+ if (!oe.editable) {
3251
+ const me = Ee(T, oe.content, O);
3252
+ me !== null && (G > 0 && b[G - 1].editable && me > O && (k[G - 1] = {
3253
+ ...k[G - 1],
3254
+ content: T.substring(O, me)
3255
+ }), O = me + oe.content.length);
2196
3256
  }
2197
3257
  }
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({
3258
+ const Y = b[b.length - 1];
3259
+ return Y.editable && O < T.length && (k[b.length - 1] = {
3260
+ ...Y,
3261
+ content: T.substring(O)
3262
+ }), k;
3263
+ }, [o, Ee]), ke = se((b) => {
3264
+ let T = !1;
3265
+ return q.current.forEach((k, O) => {
3266
+ const Y = b.indexOf(O);
3267
+ Y >= 0 && Math.abs(Y - k) > 0 && (q.current.set(O, Y), Y > k && (k === 0 || k < 15) && (T = !0));
3268
+ }), T;
3269
+ }, []), Se = se(() => {
3270
+ if (!m.current) return;
3271
+ const b = m.current, T = b.state.doc.toString(), k = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], O = b.state.selection;
3272
+ let Y = !1;
3273
+ for (const G of k) {
3274
+ const oe = T.indexOf(G);
3275
+ if (oe >= 0) {
3276
+ b.dispatch({
2217
3277
  selection: {
2218
- anchor: K,
2219
- head: K + V.length
3278
+ anchor: oe,
3279
+ head: oe + G.length
2220
3280
  },
2221
3281
  scrollIntoView: !1
2222
- }), L = !0;
3282
+ }), Y = !0;
2223
3283
  break;
2224
3284
  }
2225
3285
  }
2226
- L && setTimeout(() => {
2227
- g.dom && document.contains(g.dom) && g.dispatch({
2228
- selection: k,
3286
+ Y && setTimeout(() => {
3287
+ b.dom && document.contains(b.dom) && b.dispatch({
3288
+ selection: O,
2229
3289
  scrollIntoView: !1
2230
3290
  });
2231
3291
  }, 10);
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({});
3292
+ }, []), Z = se(() => {
3293
+ if (!m.current) return;
3294
+ const b = m.current;
3295
+ x.length > 0 && (ye(b, []), setTimeout(() => {
3296
+ b.dom && document.contains(b.dom) && (ye(b, x), setTimeout(() => {
3297
+ b.dom && document.contains(b.dom) && b.dispatch({});
2238
3298
  }, 10));
2239
3299
  }, 10));
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);
3300
+ }, [x]), ce = se((b) => {
3301
+ const T = b.value, k = S.current;
3302
+ R(T), k !== T && (!k || T.length > (k == null ? void 0 : k.length) && !k.startsWith(T.substring(0, 5)) && T.includes(k.substring(0, 10))) && (d.current = !0, ke(T) && setTimeout(() => {
3303
+ Se();
3304
+ }, 10)), S.current = T;
3305
+ const O = m.current ? bi(m.current) : x;
3306
+ if (o && _) {
3307
+ const Y = Te(_, T);
3308
+ $(Y);
2249
3309
  const {
2250
- readOnlyRanges: V
2251
- } = et(L);
2252
- m(V), s.current && ue(s.current, V), r && r({
2253
- value: w,
2254
- readOnlyRanges: V
3310
+ readOnlyRanges: G
3311
+ } = Lr(Y);
3312
+ g(G), m.current && ye(m.current, G), t && t({
3313
+ value: T,
3314
+ readOnlyRanges: G
2255
3315
  });
2256
3316
  } else
2257
- r && r({
2258
- value: w,
2259
- readOnlyRanges: k
3317
+ t && t({
3318
+ value: T,
3319
+ readOnlyRanges: O
2260
3320
  });
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) {
3321
+ }, [t, o, _, x, Te, ke, Se]);
3322
+ ge(() => {
3323
+ !o && JSON.stringify(C) !== JSON.stringify(x) && (g(C), m.current && ye(m.current, C));
3324
+ }, [C, x, o]), ge(() => {
3325
+ if (o && _) {
2266
3326
  const {
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();
3327
+ readOnlyRanges: b
3328
+ } = Lr(_);
3329
+ JSON.stringify(b) !== JSON.stringify(x) && (g(b), m.current && ye(m.current, b));
3330
+ }
3331
+ }, [_, x, o]), ge(() => {
3332
+ m.current && d.current && (d.current = !1, m.current.dispatch({}));
3333
+ }, [v]), ge(() => {
3334
+ m.current && x.length > 0 && !A.current && (A.current = !0, setTimeout(() => {
3335
+ Z();
2276
3336
  }, 50), setTimeout(() => {
2277
- l();
3337
+ Z();
2278
3338
  }, 200));
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);
3339
+ }, [Z, x]);
3340
+ const pe = se((b) => {
3341
+ if (m.current = b, x.length > 0 && (ye(b, x), setTimeout(() => {
3342
+ ye(b, []), setTimeout(() => {
3343
+ ye(b, x);
2284
3344
  }, 10);
2285
- }, 50)), e) {
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({});
2295
- }, 0);
2296
- }, [U]);
2297
- return /* @__PURE__ */ rr(xr, { value: e, onChange: Re, extensions: y, onEditorViewCreated: A, showLineNumbers: i, ...u });
2298
- };
2299
- function Co(e) {
3345
+ }, 50)), v) {
3346
+ const T = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], k = /* @__PURE__ */ new Map();
3347
+ T.forEach((O) => {
3348
+ const Y = v.indexOf(O);
3349
+ Y >= 0 && k.set(O, Y);
3350
+ }), q.current = k;
3351
+ }
3352
+ }, [x, v]);
3353
+ return /* @__PURE__ */ wt(or, { ref: l, value: v, onChange: ce, extensions: Ye, showLineNumbers: i, onEditorViewCreated: pe, ...a });
3354
+ }, hs = rt(Hi), Ji = (e, t) => {
2300
3355
  const {
2301
3356
  value: r,
2302
3357
  onChange: n,
2303
3358
  extensions: o = [],
2304
- showLineNumbers: a = !0,
2305
- enableFormatting: i = !1,
2306
- ...u
2307
- } = e, s = fe(!0), f = fe(null), m = Q((y) => {
3359
+ showLineNumbers: i = !0,
3360
+ enableFormatting: a = !1,
3361
+ ...c
3362
+ } = e, l = ue(!0), h = ue(null), f = se((g) => {
2308
3363
  try {
2309
- return y === "" || JSON.parse(y), !0;
3364
+ return g === "" || JSON.parse(g), !0;
2310
3365
  } catch {
2311
3366
  return !1;
2312
3367
  }
2313
- }, []), p = Q((y) => {
3368
+ }, []), y = se((g) => {
2314
3369
  try {
2315
- if (!y.trim()) return "";
2316
- const S = JSON.parse(y);
3370
+ if (!g.trim()) return "";
3371
+ const S = JSON.parse(g);
2317
3372
  return JSON.stringify(S, null, 2);
2318
3373
  } catch {
2319
- return y;
3374
+ return g;
2320
3375
  }
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({
3376
+ }, []), C = se(() => {
3377
+ if (!h.current) return !1;
3378
+ const g = h.current, S = g.state.doc.toString(), _ = y(S);
3379
+ if (_ === S) return !1;
3380
+ const $ = g.state.update({
2326
3381
  changes: {
2327
3382
  from: 0,
2328
- to: y.state.doc.length,
2329
- insert: b
3383
+ to: g.state.doc.length,
3384
+ insert: _
2330
3385
  }
2331
3386
  });
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;
2355
- }
2356
- }, {
3387
+ return g.dispatch($), !0;
3388
+ }, [y]), v = ht(() => we.of([{
2357
3389
  key: "Alt-f",
2358
3390
  mac: "Mod-Alt-f",
2359
- run: () => d()
2360
- }]), [d]), C = Q((y) => {
3391
+ run: () => C()
3392
+ }]), [C]), R = se((g) => {
2361
3393
  if (n) {
2362
- const S = m(y.value);
2363
- s.current = S, n(y);
3394
+ const S = f(g.value);
3395
+ l.current = S, n(g);
2364
3396
  }
2365
- }, [n, m]), x = Be(() => [ot(), Bt.highest(P), ...o], [P, o]), R = Q((y) => {
2366
- f.current = y, i && r && setTimeout(() => {
2367
- d();
3397
+ }, [n, f]), m = ht(() => [Ur(), to(), Xn(), Qr.highest(v), ...o], [v, o]), x = se((g) => {
3398
+ h.current = g, a && r && setTimeout(() => {
3399
+ C();
2368
3400
  }, 0);
2369
- }, [i, r, d]);
2370
- return /* @__PURE__ */ rr(xr, { value: r, showLineNumbers: a, onChange: C, extensions: x, onEditorViewCreated: R, ...u });
2371
- }
3401
+ }, [a, r, C]);
3402
+ return /* @__PURE__ */ wt(or, { ref: t, value: r, showLineNumbers: i, onChange: R, extensions: m, onEditorViewCreated: x, ...c });
3403
+ }, ds = rt(Ji);
2372
3404
  export {
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
3405
+ fs as Editor,
3406
+ or as GenericEditor,
3407
+ ds as JSONEditor,
3408
+ hs as SQLEditor,
3409
+ Ui as applyChinese,
3410
+ Lr as blocksToEditorData,
3411
+ zi as chineseLanguageExtension,
3412
+ wn as closeSearchPanel,
3413
+ as as commonExtensions,
3414
+ ui as createAutocompletionExtension,
3415
+ Yr as createEnglishSearchExtension,
3416
+ ls as createHighlightOnlyExtension,
3417
+ fi as createKeymapExtension,
3418
+ ss as createLintExtension,
3419
+ qr as createSearchExtension,
3420
+ us as customSearchKeymap,
3421
+ pi as darkTheme,
3422
+ bi as getCurrentReadOnlyRanges,
3423
+ ci as getLanguageExtension,
3424
+ mi as getThemeExtension,
3425
+ er as highlightSelectionMatches,
3426
+ li as isSupportedLanguage,
3427
+ Fr as lightTheme,
3428
+ Rn as openSearchPanel,
3429
+ gi as readOnlyRanges,
3430
+ bn as search,
3431
+ _n as searchKeymap,
3432
+ cs as searchTranslationsZhCN,
3433
+ ye as updateReadOnlyRanges
2390
3434
  };