@senyao-design-system/editor 0.0.2 → 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/README.md +251 -172
- package/dist/assets/style.css +1 -0
- package/dist/components/Editor.d.ts +4 -8
- package/dist/components/GenericEditor.d.ts +4 -3
- package/dist/components/JSONEditor.d.ts +4 -7
- package/dist/components/SQLEditor.d.ts +3 -7
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/search.d.ts +38 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/search-zh-cn-v2.d.ts +13 -0
- package/dist/i18n/search-zh-cn.d.ts +44 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +16 -15
- package/dist/index.mjs +2557 -1339
- package/dist/types.d.ts +90 -0
- package/package.json +45 -42
- package/dist/index.css +0 -1
- package/dist/types/index.d.ts +0 -110
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { sql as
|
|
4
|
-
import { json as
|
|
5
|
-
import { keymap as
|
|
6
|
-
import { indentWithTab as
|
|
7
|
-
import { autocompletion as
|
|
8
|
-
import { lintGutter as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
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
|
+
import { tags as W } from "@lezer/highlight";
|
|
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 = {};
|
|
12
13
|
/**
|
|
13
14
|
* @license React
|
|
14
15
|
* react-jsx-runtime.production.min.js
|
|
@@ -18,21 +19,21 @@ var ur = { exports: {} }, Oe = {};
|
|
|
18
19
|
* This source code is licensed under the MIT license found in the
|
|
19
20
|
* LICENSE file in the root directory of this source tree.
|
|
20
21
|
*/
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
var e =
|
|
26
|
-
function c
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
for (
|
|
30
|
-
if (
|
|
31
|
-
return { $$typeof:
|
|
32
|
-
}
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
var
|
|
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 = {};
|
|
36
37
|
/**
|
|
37
38
|
* @license React
|
|
38
39
|
* react-jsx-runtime.development.js
|
|
@@ -42,91 +43,91 @@ var Pe = {};
|
|
|
42
43
|
* This source code is licensed under the MIT license found in the
|
|
43
44
|
* LICENSE file in the root directory of this source tree.
|
|
44
45
|
*/
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
var e =
|
|
49
|
-
function
|
|
50
|
-
if (
|
|
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")
|
|
51
52
|
return null;
|
|
52
|
-
var
|
|
53
|
-
return typeof
|
|
53
|
+
var u = R && s[R] || s[m];
|
|
54
|
+
return typeof u == "function" ? u : null;
|
|
54
55
|
}
|
|
55
|
-
var
|
|
56
|
-
function
|
|
56
|
+
var g = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
57
|
+
function S(s) {
|
|
57
58
|
{
|
|
58
|
-
for (var
|
|
59
|
-
|
|
60
|
-
|
|
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);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function _(s, u, p) {
|
|
64
65
|
{
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
var
|
|
68
|
-
return String(
|
|
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);
|
|
69
70
|
});
|
|
70
|
-
|
|
71
|
+
j.unshift("Warning: " + u), Function.prototype.apply.call(console[s], console, j);
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
function
|
|
76
|
-
return !!(typeof
|
|
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
|
|
77
78
|
// types supported by any Flight configuration anywhere since
|
|
78
79
|
// we don't know which Flight build this will end up being used
|
|
79
80
|
// with.
|
|
80
|
-
|
|
81
|
+
s.$$typeof === Ee || s.getModuleId !== void 0));
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
var
|
|
84
|
-
if (
|
|
85
|
-
return
|
|
86
|
-
var
|
|
87
|
-
return
|
|
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;
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
90
|
+
function Se(s) {
|
|
91
|
+
return s.displayName || "Context";
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
if (
|
|
93
|
+
function Z(s) {
|
|
94
|
+
if (s == null)
|
|
94
95
|
return null;
|
|
95
|
-
if (typeof
|
|
96
|
-
return
|
|
97
|
-
if (typeof
|
|
98
|
-
return
|
|
99
|
-
switch (
|
|
100
|
-
case o:
|
|
101
|
-
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) {
|
|
102
101
|
case n:
|
|
102
|
+
return "Fragment";
|
|
103
|
+
case r:
|
|
103
104
|
return "Portal";
|
|
104
105
|
case i:
|
|
105
106
|
return "Profiler";
|
|
106
|
-
case
|
|
107
|
+
case o:
|
|
107
108
|
return "StrictMode";
|
|
108
|
-
case
|
|
109
|
+
case h:
|
|
109
110
|
return "Suspense";
|
|
110
|
-
case
|
|
111
|
+
case f:
|
|
111
112
|
return "SuspenseList";
|
|
112
113
|
}
|
|
113
|
-
if (typeof
|
|
114
|
-
switch (
|
|
115
|
-
case s:
|
|
116
|
-
var f = t;
|
|
117
|
-
return W(f) + ".Consumer";
|
|
114
|
+
if (typeof s == "object")
|
|
115
|
+
switch (s.$$typeof) {
|
|
118
116
|
case c:
|
|
119
|
-
var
|
|
120
|
-
return
|
|
121
|
-
case
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return
|
|
126
|
-
case
|
|
127
|
-
var
|
|
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;
|
|
128
129
|
try {
|
|
129
|
-
return
|
|
130
|
+
return Z(P(j));
|
|
130
131
|
} catch {
|
|
131
132
|
return null;
|
|
132
133
|
}
|
|
@@ -134,606 +135,606 @@ function Bt() {
|
|
|
134
135
|
}
|
|
135
136
|
return null;
|
|
136
137
|
}
|
|
137
|
-
var
|
|
138
|
-
function
|
|
138
|
+
var ce = Object.assign, pe = 0, b, T, k, O, Y, G, oe;
|
|
139
|
+
function me() {
|
|
139
140
|
}
|
|
140
|
-
|
|
141
|
-
function
|
|
141
|
+
me.__reactDisabledLog = !0;
|
|
142
|
+
function _t() {
|
|
142
143
|
{
|
|
143
|
-
if (
|
|
144
|
-
|
|
145
|
-
var
|
|
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 = {
|
|
146
147
|
configurable: !0,
|
|
147
148
|
enumerable: !0,
|
|
148
|
-
value:
|
|
149
|
+
value: me,
|
|
149
150
|
writable: !0
|
|
150
151
|
};
|
|
151
152
|
Object.defineProperties(console, {
|
|
152
|
-
info:
|
|
153
|
-
log:
|
|
154
|
-
warn:
|
|
155
|
-
error:
|
|
156
|
-
group:
|
|
157
|
-
groupCollapsed:
|
|
158
|
-
groupEnd:
|
|
153
|
+
info: s,
|
|
154
|
+
log: s,
|
|
155
|
+
warn: s,
|
|
156
|
+
error: s,
|
|
157
|
+
group: s,
|
|
158
|
+
groupCollapsed: s,
|
|
159
|
+
groupEnd: s
|
|
159
160
|
});
|
|
160
161
|
}
|
|
161
|
-
|
|
162
|
+
pe++;
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
|
-
function
|
|
165
|
+
function Tt() {
|
|
165
166
|
{
|
|
166
|
-
if (
|
|
167
|
-
var
|
|
167
|
+
if (pe--, pe === 0) {
|
|
168
|
+
var s = {
|
|
168
169
|
configurable: !0,
|
|
169
170
|
enumerable: !0,
|
|
170
171
|
writable: !0
|
|
171
172
|
};
|
|
172
173
|
Object.defineProperties(console, {
|
|
173
|
-
log:
|
|
174
|
-
value:
|
|
174
|
+
log: ce({}, s, {
|
|
175
|
+
value: b
|
|
175
176
|
}),
|
|
176
|
-
info:
|
|
177
|
-
value:
|
|
177
|
+
info: ce({}, s, {
|
|
178
|
+
value: T
|
|
178
179
|
}),
|
|
179
|
-
warn:
|
|
180
|
-
value:
|
|
180
|
+
warn: ce({}, s, {
|
|
181
|
+
value: k
|
|
181
182
|
}),
|
|
182
|
-
error:
|
|
183
|
-
value:
|
|
183
|
+
error: ce({}, s, {
|
|
184
|
+
value: O
|
|
184
185
|
}),
|
|
185
|
-
group:
|
|
186
|
-
value:
|
|
186
|
+
group: ce({}, s, {
|
|
187
|
+
value: Y
|
|
187
188
|
}),
|
|
188
|
-
groupCollapsed:
|
|
189
|
-
value:
|
|
189
|
+
groupCollapsed: ce({}, s, {
|
|
190
|
+
value: G
|
|
190
191
|
}),
|
|
191
|
-
groupEnd:
|
|
192
|
-
value:
|
|
192
|
+
groupEnd: ce({}, s, {
|
|
193
|
+
value: oe
|
|
193
194
|
})
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
|
-
|
|
197
|
+
pe < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
|
-
var
|
|
200
|
-
function
|
|
200
|
+
var Ve = g.ReactCurrentDispatcher, ze;
|
|
201
|
+
function Me(s, u, p) {
|
|
201
202
|
{
|
|
202
|
-
if (
|
|
203
|
+
if (ze === void 0)
|
|
203
204
|
try {
|
|
204
205
|
throw Error();
|
|
205
|
-
} catch (
|
|
206
|
-
var
|
|
207
|
-
|
|
206
|
+
} catch (N) {
|
|
207
|
+
var w = N.stack.trim().match(/\n( *(at )?)/);
|
|
208
|
+
ze = w && w[1] || "";
|
|
208
209
|
}
|
|
209
210
|
return `
|
|
210
|
-
` +
|
|
211
|
+
` + ze + s;
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
|
-
var
|
|
214
|
+
var Ue = !1, Pe;
|
|
214
215
|
{
|
|
215
|
-
var
|
|
216
|
-
|
|
216
|
+
var kt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
217
|
+
Pe = new kt();
|
|
217
218
|
}
|
|
218
|
-
function
|
|
219
|
-
if (!
|
|
219
|
+
function E(s, u) {
|
|
220
|
+
if (!s || Ue)
|
|
220
221
|
return "";
|
|
221
222
|
{
|
|
222
|
-
var
|
|
223
|
-
if (
|
|
224
|
-
return
|
|
223
|
+
var p = Pe.get(s);
|
|
224
|
+
if (p !== void 0)
|
|
225
|
+
return p;
|
|
225
226
|
}
|
|
226
|
-
var
|
|
227
|
-
|
|
228
|
-
var
|
|
227
|
+
var w;
|
|
228
|
+
Ue = !0;
|
|
229
|
+
var N = Error.prepareStackTrace;
|
|
229
230
|
Error.prepareStackTrace = void 0;
|
|
230
|
-
var
|
|
231
|
-
|
|
231
|
+
var j;
|
|
232
|
+
j = Ve.current, Ve.current = null, _t();
|
|
232
233
|
try {
|
|
233
|
-
if (
|
|
234
|
-
var
|
|
234
|
+
if (u) {
|
|
235
|
+
var P = function() {
|
|
235
236
|
throw Error();
|
|
236
237
|
};
|
|
237
|
-
if (Object.defineProperty(
|
|
238
|
+
if (Object.defineProperty(P.prototype, "props", {
|
|
238
239
|
set: function() {
|
|
239
240
|
throw Error();
|
|
240
241
|
}
|
|
241
242
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
242
243
|
try {
|
|
243
|
-
Reflect.construct(
|
|
244
|
-
} catch (
|
|
245
|
-
|
|
244
|
+
Reflect.construct(P, []);
|
|
245
|
+
} catch (ee) {
|
|
246
|
+
w = ee;
|
|
246
247
|
}
|
|
247
|
-
Reflect.construct(
|
|
248
|
+
Reflect.construct(s, [], P);
|
|
248
249
|
} else {
|
|
249
250
|
try {
|
|
250
|
-
|
|
251
|
-
} catch (
|
|
252
|
-
|
|
251
|
+
P.call();
|
|
252
|
+
} catch (ee) {
|
|
253
|
+
w = ee;
|
|
253
254
|
}
|
|
254
|
-
|
|
255
|
+
s.call(P.prototype);
|
|
255
256
|
}
|
|
256
257
|
} else {
|
|
257
258
|
try {
|
|
258
259
|
throw Error();
|
|
259
|
-
} catch (
|
|
260
|
-
|
|
260
|
+
} catch (ee) {
|
|
261
|
+
w = ee;
|
|
261
262
|
}
|
|
262
|
-
|
|
263
|
+
s();
|
|
263
264
|
}
|
|
264
|
-
} catch (
|
|
265
|
-
if (
|
|
266
|
-
for (var
|
|
267
|
-
`),
|
|
268
|
-
`),
|
|
269
|
-
|
|
270
|
-
for (;
|
|
271
|
-
if (
|
|
272
|
-
if (
|
|
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)
|
|
273
274
|
do
|
|
274
|
-
if (
|
|
275
|
-
var
|
|
276
|
-
` +
|
|
277
|
-
return
|
|
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;
|
|
278
279
|
}
|
|
279
|
-
while (
|
|
280
|
+
while (z >= 1 && U >= 0);
|
|
280
281
|
break;
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
} finally {
|
|
284
|
-
|
|
285
|
+
Ue = !1, Ve.current = j, Tt(), Error.prepareStackTrace = N;
|
|
285
286
|
}
|
|
286
|
-
var
|
|
287
|
-
return typeof
|
|
287
|
+
var $e = s ? s.displayName || s.name : "", Re = $e ? Me($e) : "";
|
|
288
|
+
return typeof s == "function" && Pe.set(s, Re), Re;
|
|
288
289
|
}
|
|
289
|
-
function
|
|
290
|
-
return
|
|
290
|
+
function Be(s, u, p) {
|
|
291
|
+
return E(s, !1);
|
|
291
292
|
}
|
|
292
|
-
function
|
|
293
|
-
var
|
|
294
|
-
return !!(
|
|
293
|
+
function Oe(s) {
|
|
294
|
+
var u = s.prototype;
|
|
295
|
+
return !!(u && u.isReactComponent);
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
-
if (
|
|
297
|
+
function Ce(s, u, p) {
|
|
298
|
+
if (s == null)
|
|
298
299
|
return "";
|
|
299
|
-
if (typeof
|
|
300
|
-
return
|
|
301
|
-
if (typeof
|
|
302
|
-
return
|
|
303
|
-
switch (
|
|
304
|
-
case
|
|
305
|
-
return
|
|
306
|
-
case
|
|
307
|
-
return
|
|
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");
|
|
308
309
|
}
|
|
309
|
-
if (typeof
|
|
310
|
-
switch (
|
|
311
|
-
case
|
|
312
|
-
return
|
|
313
|
-
case
|
|
314
|
-
return
|
|
315
|
-
case
|
|
316
|
-
var
|
|
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;
|
|
317
318
|
try {
|
|
318
|
-
return
|
|
319
|
+
return Ce(j(N), u, p);
|
|
319
320
|
} catch {
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
}
|
|
323
324
|
return "";
|
|
324
325
|
}
|
|
325
|
-
var
|
|
326
|
-
function
|
|
327
|
-
if (
|
|
328
|
-
var
|
|
329
|
-
|
|
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);
|
|
330
331
|
} else
|
|
331
|
-
|
|
332
|
+
sr.setExtraStackFrame(null);
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
+
function Tn(s, u, p, w, N) {
|
|
334
335
|
{
|
|
335
|
-
var
|
|
336
|
-
for (var
|
|
337
|
-
if (
|
|
338
|
-
var
|
|
336
|
+
var j = Function.call.bind(Ge);
|
|
337
|
+
for (var P in s)
|
|
338
|
+
if (j(s, P)) {
|
|
339
|
+
var M = void 0;
|
|
339
340
|
try {
|
|
340
|
-
if (typeof
|
|
341
|
-
var
|
|
342
|
-
throw
|
|
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;
|
|
343
344
|
}
|
|
344
|
-
|
|
345
|
-
} catch (
|
|
346
|
-
|
|
345
|
+
M = s[P](u, P, w, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
346
|
+
} catch (z) {
|
|
347
|
+
M = z;
|
|
347
348
|
}
|
|
348
|
-
|
|
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));
|
|
349
350
|
}
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
|
-
var
|
|
353
|
-
function
|
|
354
|
-
return
|
|
353
|
+
var kn = Array.isArray;
|
|
354
|
+
function Mt(s) {
|
|
355
|
+
return kn(s);
|
|
355
356
|
}
|
|
356
|
-
function
|
|
357
|
+
function Mn(s) {
|
|
357
358
|
{
|
|
358
|
-
var
|
|
359
|
-
return
|
|
359
|
+
var u = typeof Symbol == "function" && Symbol.toStringTag, p = u && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
360
|
+
return p;
|
|
360
361
|
}
|
|
361
362
|
}
|
|
362
|
-
function
|
|
363
|
+
function Pn(s) {
|
|
363
364
|
try {
|
|
364
|
-
return
|
|
365
|
+
return ar(s), !1;
|
|
365
366
|
} catch {
|
|
366
367
|
return !0;
|
|
367
368
|
}
|
|
368
369
|
}
|
|
369
|
-
function
|
|
370
|
-
return "" +
|
|
370
|
+
function ar(s) {
|
|
371
|
+
return "" + s;
|
|
371
372
|
}
|
|
372
|
-
function
|
|
373
|
-
if (
|
|
374
|
-
return
|
|
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);
|
|
375
376
|
}
|
|
376
|
-
var
|
|
377
|
+
var lr = g.ReactCurrentOwner, On = {
|
|
377
378
|
key: !0,
|
|
378
379
|
ref: !0,
|
|
379
380
|
__self: !0,
|
|
380
381
|
__source: !0
|
|
381
|
-
},
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
384
|
-
var
|
|
385
|
-
if (
|
|
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)
|
|
386
387
|
return !1;
|
|
387
388
|
}
|
|
388
|
-
return
|
|
389
|
+
return s.ref !== void 0;
|
|
389
390
|
}
|
|
390
|
-
function
|
|
391
|
-
if (
|
|
392
|
-
var
|
|
393
|
-
if (
|
|
391
|
+
function $n(s) {
|
|
392
|
+
if (Ge.call(s, "key")) {
|
|
393
|
+
var u = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
394
|
+
if (u && u.isReactWarning)
|
|
394
395
|
return !1;
|
|
395
396
|
}
|
|
396
|
-
return
|
|
397
|
+
return s.key !== void 0;
|
|
397
398
|
}
|
|
398
|
-
function
|
|
399
|
-
typeof
|
|
399
|
+
function Fn(s, u) {
|
|
400
|
+
typeof s.ref == "string" && lr.current;
|
|
400
401
|
}
|
|
401
|
-
function
|
|
402
|
+
function Ln(s, u) {
|
|
402
403
|
{
|
|
403
|
-
var
|
|
404
|
-
|
|
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));
|
|
405
406
|
};
|
|
406
|
-
|
|
407
|
-
get:
|
|
407
|
+
p.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
408
|
+
get: p,
|
|
408
409
|
configurable: !0
|
|
409
410
|
});
|
|
410
411
|
}
|
|
411
412
|
}
|
|
412
|
-
function
|
|
413
|
+
function Nn(s, u) {
|
|
413
414
|
{
|
|
414
|
-
var
|
|
415
|
-
|
|
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));
|
|
416
417
|
};
|
|
417
|
-
|
|
418
|
-
get:
|
|
418
|
+
p.isReactWarning = !0, Object.defineProperty(s, "ref", {
|
|
419
|
+
get: p,
|
|
419
420
|
configurable: !0
|
|
420
421
|
});
|
|
421
422
|
}
|
|
422
423
|
}
|
|
423
|
-
var
|
|
424
|
-
var
|
|
424
|
+
var In = function(s, u, p, w, N, j, P) {
|
|
425
|
+
var M = {
|
|
425
426
|
// This tag allows us to uniquely identify this as a React Element
|
|
426
|
-
$$typeof:
|
|
427
|
+
$$typeof: t,
|
|
427
428
|
// Built-in properties that belong on the element
|
|
428
|
-
type:
|
|
429
|
-
key:
|
|
430
|
-
ref:
|
|
431
|
-
props:
|
|
429
|
+
type: s,
|
|
430
|
+
key: u,
|
|
431
|
+
ref: p,
|
|
432
|
+
props: P,
|
|
432
433
|
// Record the component responsible for creating this element.
|
|
433
|
-
_owner:
|
|
434
|
+
_owner: j
|
|
434
435
|
};
|
|
435
|
-
return
|
|
436
|
+
return M._store = {}, Object.defineProperty(M._store, "validated", {
|
|
436
437
|
configurable: !1,
|
|
437
438
|
enumerable: !1,
|
|
438
439
|
writable: !0,
|
|
439
440
|
value: !1
|
|
440
|
-
}), Object.defineProperty(
|
|
441
|
+
}), Object.defineProperty(M, "_self", {
|
|
441
442
|
configurable: !1,
|
|
442
443
|
enumerable: !1,
|
|
443
444
|
writable: !1,
|
|
444
|
-
value:
|
|
445
|
-
}), Object.defineProperty(
|
|
445
|
+
value: w
|
|
446
|
+
}), Object.defineProperty(M, "_source", {
|
|
446
447
|
configurable: !1,
|
|
447
448
|
enumerable: !1,
|
|
448
449
|
writable: !1,
|
|
449
|
-
value:
|
|
450
|
-
}), Object.freeze && (Object.freeze(
|
|
450
|
+
value: N
|
|
451
|
+
}), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
|
|
451
452
|
};
|
|
452
|
-
function
|
|
453
|
+
function Dn(s, u, p, w, N) {
|
|
453
454
|
{
|
|
454
|
-
var
|
|
455
|
-
|
|
456
|
-
for (
|
|
457
|
-
|
|
458
|
-
if (
|
|
459
|
-
var
|
|
460
|
-
for (
|
|
461
|
-
|
|
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]);
|
|
462
463
|
}
|
|
463
|
-
if (
|
|
464
|
-
var
|
|
465
|
-
|
|
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);
|
|
466
467
|
}
|
|
467
|
-
return
|
|
468
|
+
return In(s, M, X, N, w, lr.current, P);
|
|
468
469
|
}
|
|
469
470
|
}
|
|
470
|
-
var
|
|
471
|
-
function
|
|
472
|
-
if (
|
|
473
|
-
var
|
|
474
|
-
|
|
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);
|
|
475
476
|
} else
|
|
476
|
-
|
|
477
|
+
hr.setExtraStackFrame(null);
|
|
477
478
|
}
|
|
478
|
-
var
|
|
479
|
-
|
|
480
|
-
function
|
|
481
|
-
return typeof
|
|
479
|
+
var Ot;
|
|
480
|
+
Ot = !1;
|
|
481
|
+
function At(s) {
|
|
482
|
+
return typeof s == "object" && s !== null && s.$$typeof === t;
|
|
482
483
|
}
|
|
483
|
-
function
|
|
484
|
+
function dr() {
|
|
484
485
|
{
|
|
485
|
-
if (
|
|
486
|
-
var
|
|
487
|
-
if (
|
|
486
|
+
if (Pt.current) {
|
|
487
|
+
var s = Z(Pt.current.type);
|
|
488
|
+
if (s)
|
|
488
489
|
return `
|
|
489
490
|
|
|
490
|
-
Check the render method of \`` +
|
|
491
|
+
Check the render method of \`` + s + "`.";
|
|
491
492
|
}
|
|
492
493
|
return "";
|
|
493
494
|
}
|
|
494
495
|
}
|
|
495
|
-
function
|
|
496
|
+
function Wn(s) {
|
|
496
497
|
return "";
|
|
497
498
|
}
|
|
498
|
-
var
|
|
499
|
-
function
|
|
499
|
+
var pr = {};
|
|
500
|
+
function jn(s) {
|
|
500
501
|
{
|
|
501
|
-
var
|
|
502
|
-
if (!
|
|
503
|
-
var
|
|
504
|
-
|
|
502
|
+
var u = dr();
|
|
503
|
+
if (!u) {
|
|
504
|
+
var p = typeof s == "string" ? s : s.displayName || s.name;
|
|
505
|
+
p && (u = `
|
|
505
506
|
|
|
506
|
-
Check the top-level render call using <` +
|
|
507
|
+
Check the top-level render call using <` + p + ">.");
|
|
507
508
|
}
|
|
508
|
-
return
|
|
509
|
+
return u;
|
|
509
510
|
}
|
|
510
511
|
}
|
|
511
|
-
function
|
|
512
|
+
function mr(s, u) {
|
|
512
513
|
{
|
|
513
|
-
if (!
|
|
514
|
+
if (!s._store || s._store.validated || s.key != null)
|
|
514
515
|
return;
|
|
515
|
-
|
|
516
|
-
var
|
|
517
|
-
if (
|
|
516
|
+
s._store.validated = !0;
|
|
517
|
+
var p = jn(u);
|
|
518
|
+
if (pr[p])
|
|
518
519
|
return;
|
|
519
|
-
|
|
520
|
-
var
|
|
521
|
-
|
|
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);
|
|
522
523
|
}
|
|
523
524
|
}
|
|
524
|
-
function
|
|
525
|
+
function gr(s, u) {
|
|
525
526
|
{
|
|
526
|
-
if (typeof
|
|
527
|
+
if (typeof s != "object")
|
|
527
528
|
return;
|
|
528
|
-
if (
|
|
529
|
-
for (var
|
|
530
|
-
var
|
|
531
|
-
|
|
529
|
+
if (Mt(s))
|
|
530
|
+
for (var p = 0; p < s.length; p++) {
|
|
531
|
+
var w = s[p];
|
|
532
|
+
At(w) && mr(w, u);
|
|
532
533
|
}
|
|
533
|
-
else if (
|
|
534
|
-
|
|
535
|
-
else if (
|
|
536
|
-
var
|
|
537
|
-
if (typeof
|
|
538
|
-
for (var
|
|
539
|
-
|
|
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);
|
|
540
541
|
}
|
|
541
542
|
}
|
|
542
543
|
}
|
|
543
|
-
function
|
|
544
|
+
function qn(s) {
|
|
544
545
|
{
|
|
545
|
-
var
|
|
546
|
-
if (
|
|
546
|
+
var u = s.type;
|
|
547
|
+
if (u == null || typeof u == "string")
|
|
547
548
|
return;
|
|
548
|
-
var
|
|
549
|
-
if (typeof
|
|
550
|
-
|
|
551
|
-
else if (typeof
|
|
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.
|
|
552
553
|
// Inner props are checked in the reconciler.
|
|
553
|
-
|
|
554
|
-
|
|
554
|
+
u.$$typeof === y))
|
|
555
|
+
p = u.propTypes;
|
|
555
556
|
else
|
|
556
557
|
return;
|
|
557
|
-
if (
|
|
558
|
-
var
|
|
559
|
-
|
|
560
|
-
} else if (
|
|
561
|
-
|
|
562
|
-
var
|
|
563
|
-
|
|
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");
|
|
564
565
|
}
|
|
565
|
-
typeof
|
|
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.");
|
|
566
567
|
}
|
|
567
568
|
}
|
|
568
|
-
function
|
|
569
|
+
function Yn(s) {
|
|
569
570
|
{
|
|
570
|
-
for (var
|
|
571
|
-
var
|
|
572
|
-
if (
|
|
573
|
-
|
|
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);
|
|
574
575
|
break;
|
|
575
576
|
}
|
|
576
577
|
}
|
|
577
|
-
|
|
578
|
+
s.ref !== null && (Ae(s), S("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
|
|
578
579
|
}
|
|
579
580
|
}
|
|
580
|
-
var
|
|
581
|
-
function
|
|
581
|
+
var vr = {};
|
|
582
|
+
function yr(s, u, p, w, N, j) {
|
|
582
583
|
{
|
|
583
|
-
var
|
|
584
|
-
if (!
|
|
585
|
-
var
|
|
586
|
-
(
|
|
587
|
-
var
|
|
588
|
-
|
|
589
|
-
var
|
|
590
|
-
|
|
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
|
+
var z;
|
|
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);
|
|
591
592
|
}
|
|
592
|
-
var
|
|
593
|
-
if (
|
|
594
|
-
return
|
|
595
|
-
if (
|
|
596
|
-
var
|
|
597
|
-
if (
|
|
598
|
-
if (
|
|
599
|
-
if (
|
|
600
|
-
for (var
|
|
601
|
-
|
|
602
|
-
Object.freeze && Object.freeze(
|
|
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);
|
|
603
604
|
} else
|
|
604
|
-
|
|
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.");
|
|
605
606
|
else
|
|
606
|
-
|
|
607
|
+
gr(ie, s);
|
|
607
608
|
}
|
|
608
|
-
if (
|
|
609
|
-
var
|
|
610
|
-
return
|
|
611
|
-
}),
|
|
612
|
-
if (!
|
|
613
|
-
var
|
|
614
|
-
|
|
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:
|
|
615
616
|
let props = %s;
|
|
616
617
|
<%s {...props} />
|
|
617
618
|
React keys must be passed directly to JSX without using spread:
|
|
618
619
|
let props = %s;
|
|
619
|
-
<%s key={someKey} {...props} />`,
|
|
620
|
+
<%s key={someKey} {...props} />`, $t, Re, Gn, Re), vr[Re + $t] = !0;
|
|
620
621
|
}
|
|
621
622
|
}
|
|
622
|
-
return
|
|
623
|
+
return s === n ? Yn(U) : qn(U), U;
|
|
623
624
|
}
|
|
624
625
|
}
|
|
625
|
-
function
|
|
626
|
-
return
|
|
626
|
+
function Vn(s, u, p) {
|
|
627
|
+
return yr(s, u, p, !0);
|
|
627
628
|
}
|
|
628
|
-
function
|
|
629
|
-
return
|
|
629
|
+
function zn(s, u, p) {
|
|
630
|
+
return yr(s, u, p, !1);
|
|
630
631
|
}
|
|
631
|
-
var
|
|
632
|
-
|
|
633
|
-
}()),
|
|
632
|
+
var Un = zn, Bn = Vn;
|
|
633
|
+
Je.Fragment = n, Je.jsx = Un, Je.jsxs = Bn;
|
|
634
|
+
}()), Je;
|
|
634
635
|
}
|
|
635
|
-
process.env.NODE_ENV === "production" ?
|
|
636
|
-
var
|
|
637
|
-
function
|
|
636
|
+
process.env.NODE_ENV === "production" ? Wt.exports = so() : Wt.exports = ao();
|
|
637
|
+
var wr = Wt.exports;
|
|
638
|
+
function co(e) {
|
|
638
639
|
if (e.sheet)
|
|
639
640
|
return e.sheet;
|
|
640
|
-
for (var
|
|
641
|
-
if (document.styleSheets[
|
|
642
|
-
return document.styleSheets[
|
|
641
|
+
for (var t = 0; t < document.styleSheets.length; t++)
|
|
642
|
+
if (document.styleSheets[t].ownerNode === e)
|
|
643
|
+
return document.styleSheets[t];
|
|
643
644
|
}
|
|
644
|
-
function
|
|
645
|
-
var
|
|
646
|
-
return
|
|
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;
|
|
647
648
|
}
|
|
648
|
-
var
|
|
649
|
-
function e(
|
|
650
|
-
var
|
|
651
|
-
this._insertTag = function(
|
|
649
|
+
var uo = /* @__PURE__ */ function() {
|
|
650
|
+
function e(r) {
|
|
651
|
+
var n = this;
|
|
652
|
+
this._insertTag = function(o) {
|
|
652
653
|
var i;
|
|
653
|
-
|
|
654
|
-
}, this.isSpeedy =
|
|
655
|
-
}
|
|
656
|
-
var
|
|
657
|
-
return
|
|
658
|
-
|
|
659
|
-
},
|
|
660
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
661
|
-
var
|
|
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];
|
|
662
663
|
if (this.isSpeedy) {
|
|
663
|
-
var i =
|
|
664
|
+
var i = co(o);
|
|
664
665
|
try {
|
|
665
|
-
i.insertRule(
|
|
666
|
+
i.insertRule(n, i.cssRules.length);
|
|
666
667
|
} catch {
|
|
667
668
|
}
|
|
668
669
|
} else
|
|
669
|
-
|
|
670
|
+
o.appendChild(document.createTextNode(n));
|
|
670
671
|
this.ctr++;
|
|
671
|
-
},
|
|
672
|
-
this.tags.forEach(function(
|
|
673
|
-
var
|
|
674
|
-
return (
|
|
672
|
+
}, t.flush = function() {
|
|
673
|
+
this.tags.forEach(function(n) {
|
|
674
|
+
var o;
|
|
675
|
+
return (o = n.parentNode) == null ? void 0 : o.removeChild(n);
|
|
675
676
|
}), this.tags = [], this.ctr = 0;
|
|
676
677
|
}, e;
|
|
677
|
-
}(),
|
|
678
|
-
function
|
|
679
|
-
return J(e, 0) ^ 45 ? (((
|
|
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;
|
|
680
681
|
}
|
|
681
|
-
function
|
|
682
|
+
function rn(e) {
|
|
682
683
|
return e.trim();
|
|
683
684
|
}
|
|
684
|
-
function
|
|
685
|
-
return (e =
|
|
685
|
+
function vo(e, t) {
|
|
686
|
+
return (e = t.exec(e)) ? e[0] : e;
|
|
686
687
|
}
|
|
687
|
-
function
|
|
688
|
-
return e.replace(
|
|
688
|
+
function L(e, t, r) {
|
|
689
|
+
return e.replace(t, r);
|
|
689
690
|
}
|
|
690
|
-
function
|
|
691
|
-
return e.indexOf(
|
|
691
|
+
function jt(e, t) {
|
|
692
|
+
return e.indexOf(t);
|
|
692
693
|
}
|
|
693
|
-
function J(e,
|
|
694
|
-
return e.charCodeAt(
|
|
694
|
+
function J(e, t) {
|
|
695
|
+
return e.charCodeAt(t) | 0;
|
|
695
696
|
}
|
|
696
|
-
function
|
|
697
|
-
return e.slice(
|
|
697
|
+
function Xe(e, t, r) {
|
|
698
|
+
return e.slice(t, r);
|
|
698
699
|
}
|
|
699
|
-
function
|
|
700
|
+
function fe(e) {
|
|
700
701
|
return e.length;
|
|
701
702
|
}
|
|
702
|
-
function
|
|
703
|
+
function Kt(e) {
|
|
703
704
|
return e.length;
|
|
704
705
|
}
|
|
705
|
-
function
|
|
706
|
-
return
|
|
706
|
+
function st(e, t) {
|
|
707
|
+
return t.push(e), e;
|
|
707
708
|
}
|
|
708
|
-
function
|
|
709
|
-
return e.map(
|
|
709
|
+
function yo(e, t) {
|
|
710
|
+
return e.map(t).join("");
|
|
710
711
|
}
|
|
711
|
-
var
|
|
712
|
-
function
|
|
713
|
-
return { value: e, root:
|
|
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: "" };
|
|
714
715
|
}
|
|
715
|
-
function
|
|
716
|
-
return
|
|
716
|
+
function Ke(e, t) {
|
|
717
|
+
return mo(Rt("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
717
718
|
}
|
|
718
|
-
function
|
|
719
|
-
return
|
|
719
|
+
function bo() {
|
|
720
|
+
return B;
|
|
720
721
|
}
|
|
721
|
-
function
|
|
722
|
-
return
|
|
722
|
+
function xo() {
|
|
723
|
+
return B = te > 0 ? J(qe, --te) : 0, De--, B === 10 && (De = 1, Ct--), B;
|
|
723
724
|
}
|
|
724
|
-
function
|
|
725
|
-
return
|
|
725
|
+
function ne() {
|
|
726
|
+
return B = te < nn ? J(qe, te++) : 0, De++, B === 10 && (De = 1, Ct++), B;
|
|
726
727
|
}
|
|
727
|
-
function
|
|
728
|
-
return J(
|
|
728
|
+
function de() {
|
|
729
|
+
return J(qe, te);
|
|
729
730
|
}
|
|
730
|
-
function
|
|
731
|
-
return
|
|
731
|
+
function lt() {
|
|
732
|
+
return te;
|
|
732
733
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
734
|
+
function nt(e, t) {
|
|
735
|
+
return Xe(qe, e, t);
|
|
735
736
|
}
|
|
736
|
-
function
|
|
737
|
+
function Ze(e) {
|
|
737
738
|
switch (e) {
|
|
738
739
|
case 0:
|
|
739
740
|
case 9:
|
|
@@ -765,249 +766,249 @@ function Ae(e) {
|
|
|
765
766
|
}
|
|
766
767
|
return 0;
|
|
767
768
|
}
|
|
768
|
-
function
|
|
769
|
-
return
|
|
769
|
+
function on(e) {
|
|
770
|
+
return Ct = De = 1, nn = fe(qe = e), te = 0, [];
|
|
770
771
|
}
|
|
771
|
-
function
|
|
772
|
-
return
|
|
772
|
+
function sn(e) {
|
|
773
|
+
return qe = "", e;
|
|
773
774
|
}
|
|
774
|
-
function
|
|
775
|
-
return
|
|
775
|
+
function ut(e) {
|
|
776
|
+
return rn(nt(te - 1, qt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
776
777
|
}
|
|
777
|
-
function
|
|
778
|
-
for (; (
|
|
779
|
-
|
|
780
|
-
return
|
|
778
|
+
function Eo(e) {
|
|
779
|
+
for (; (B = de()) && B < 33; )
|
|
780
|
+
ne();
|
|
781
|
+
return Ze(e) > 2 || Ze(B) > 3 ? "" : " ";
|
|
781
782
|
}
|
|
782
|
-
function
|
|
783
|
-
for (; --
|
|
783
|
+
function So(e, t) {
|
|
784
|
+
for (; --t && ne() && !(B < 48 || B > 102 || B > 57 && B < 65 || B > 70 && B < 97); )
|
|
784
785
|
;
|
|
785
|
-
return
|
|
786
|
+
return nt(e, lt() + (t < 6 && de() == 32 && ne() == 32));
|
|
786
787
|
}
|
|
787
|
-
function
|
|
788
|
-
for (;
|
|
789
|
-
switch (
|
|
788
|
+
function qt(e) {
|
|
789
|
+
for (; ne(); )
|
|
790
|
+
switch (B) {
|
|
790
791
|
case e:
|
|
791
|
-
return
|
|
792
|
+
return te;
|
|
792
793
|
case 34:
|
|
793
794
|
case 39:
|
|
794
|
-
e !== 34 && e !== 39 &&
|
|
795
|
+
e !== 34 && e !== 39 && qt(B);
|
|
795
796
|
break;
|
|
796
797
|
case 40:
|
|
797
|
-
e === 41 &&
|
|
798
|
+
e === 41 && qt(e);
|
|
798
799
|
break;
|
|
799
800
|
case 92:
|
|
800
|
-
|
|
801
|
+
ne();
|
|
801
802
|
break;
|
|
802
803
|
}
|
|
803
|
-
return
|
|
804
|
+
return te;
|
|
804
805
|
}
|
|
805
|
-
function
|
|
806
|
-
for (;
|
|
807
|
-
if (e +
|
|
806
|
+
function Co(e, t) {
|
|
807
|
+
for (; ne() && e + B !== 57; )
|
|
808
|
+
if (e + B === 84 && de() === 47)
|
|
808
809
|
break;
|
|
809
|
-
return "/*" +
|
|
810
|
+
return "/*" + nt(t, te - 1) + "*" + St(e === 47 ? e : ne());
|
|
810
811
|
}
|
|
811
|
-
function
|
|
812
|
-
for (; !
|
|
813
|
-
|
|
814
|
-
return
|
|
812
|
+
function Ro(e) {
|
|
813
|
+
for (; !Ze(de()); )
|
|
814
|
+
ne();
|
|
815
|
+
return nt(e, te);
|
|
815
816
|
}
|
|
816
|
-
function
|
|
817
|
-
return
|
|
817
|
+
function wo(e) {
|
|
818
|
+
return sn(ft("", null, null, null, [""], e = on(e), 0, [0], e));
|
|
818
819
|
}
|
|
819
|
-
function
|
|
820
|
-
for (var
|
|
821
|
-
switch (
|
|
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()) {
|
|
822
823
|
case 40:
|
|
823
|
-
if (
|
|
824
|
-
|
|
824
|
+
if (R != 108 && J(A, y - 1) == 58) {
|
|
825
|
+
jt(A += L(ut(S), "&", "&\f"), "&\f") != -1 && (g = -1);
|
|
825
826
|
break;
|
|
826
827
|
}
|
|
827
828
|
case 34:
|
|
828
829
|
case 39:
|
|
829
830
|
case 91:
|
|
830
|
-
|
|
831
|
+
A += ut(S);
|
|
831
832
|
break;
|
|
832
833
|
case 9:
|
|
833
834
|
case 10:
|
|
834
835
|
case 13:
|
|
835
836
|
case 32:
|
|
836
|
-
|
|
837
|
+
A += Eo(R);
|
|
837
838
|
break;
|
|
838
839
|
case 92:
|
|
839
|
-
|
|
840
|
+
A += So(lt() - 1, 7);
|
|
840
841
|
continue;
|
|
841
842
|
case 47:
|
|
842
|
-
switch (
|
|
843
|
+
switch (de()) {
|
|
843
844
|
case 42:
|
|
844
845
|
case 47:
|
|
845
|
-
|
|
846
|
+
st(_o(Co(ne(), lt()), t, r), l);
|
|
846
847
|
break;
|
|
847
848
|
default:
|
|
848
|
-
|
|
849
|
+
A += "/";
|
|
849
850
|
}
|
|
850
851
|
break;
|
|
851
|
-
case 123 *
|
|
852
|
-
|
|
853
|
-
case 125 *
|
|
852
|
+
case 123 * m:
|
|
853
|
+
c[h++] = fe(A) * g;
|
|
854
|
+
case 125 * m:
|
|
854
855
|
case 59:
|
|
855
856
|
case 0:
|
|
856
|
-
switch (
|
|
857
|
+
switch (S) {
|
|
857
858
|
case 0:
|
|
858
859
|
case 125:
|
|
859
|
-
|
|
860
|
-
case 59 +
|
|
861
|
-
|
|
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);
|
|
862
863
|
break;
|
|
863
864
|
case 59:
|
|
864
|
-
|
|
865
|
+
A += ";";
|
|
865
866
|
default:
|
|
866
|
-
if (
|
|
867
|
-
if (
|
|
868
|
-
|
|
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);
|
|
869
870
|
else
|
|
870
|
-
switch (
|
|
871
|
+
switch (C === 99 && J(A, 3) === 110 ? 100 : C) {
|
|
871
872
|
case 100:
|
|
872
873
|
case 108:
|
|
873
874
|
case 109:
|
|
874
875
|
case 115:
|
|
875
|
-
|
|
876
|
+
ft(e, q, q, n && st(_r(e, q, q, 0, 0, o, c, _, o, $ = [], y), d), o, d, y, c, n ? $ : d);
|
|
876
877
|
break;
|
|
877
878
|
default:
|
|
878
|
-
|
|
879
|
+
ft(A, q, q, q, [""], d, 0, c, d);
|
|
879
880
|
}
|
|
880
881
|
}
|
|
881
|
-
|
|
882
|
+
h = f = v = 0, m = g = 1, _ = A = "", y = a;
|
|
882
883
|
break;
|
|
883
884
|
case 58:
|
|
884
|
-
|
|
885
|
+
y = 1 + fe(A), v = R;
|
|
885
886
|
default:
|
|
886
|
-
if (
|
|
887
|
-
if (
|
|
888
|
-
--
|
|
889
|
-
else if (
|
|
887
|
+
if (m < 1) {
|
|
888
|
+
if (S == 123)
|
|
889
|
+
--m;
|
|
890
|
+
else if (S == 125 && m++ == 0 && xo() == 125)
|
|
890
891
|
continue;
|
|
891
892
|
}
|
|
892
|
-
switch (
|
|
893
|
+
switch (A += St(S), S * m) {
|
|
893
894
|
case 38:
|
|
894
|
-
|
|
895
|
+
g = f > 0 ? 1 : (A += "\f", -1);
|
|
895
896
|
break;
|
|
896
897
|
case 44:
|
|
897
|
-
|
|
898
|
+
c[h++] = (fe(A) - 1) * g, g = 1;
|
|
898
899
|
break;
|
|
899
900
|
case 64:
|
|
900
|
-
|
|
901
|
+
de() === 45 && (A += ut(ne())), C = de(), f = y = fe(_ = A += Ro(lt())), S++;
|
|
901
902
|
break;
|
|
902
903
|
case 45:
|
|
903
|
-
|
|
904
|
+
R === 45 && fe(A) == 2 && (m = 0);
|
|
904
905
|
}
|
|
905
906
|
}
|
|
906
907
|
return i;
|
|
907
908
|
}
|
|
908
|
-
function
|
|
909
|
-
for (var
|
|
910
|
-
for (var
|
|
911
|
-
(
|
|
912
|
-
return
|
|
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);
|
|
913
914
|
}
|
|
914
|
-
function
|
|
915
|
-
return
|
|
915
|
+
function _o(e, t, r) {
|
|
916
|
+
return Rt(e, t, r, en, St(bo()), Xe(e, 2, -2), 0);
|
|
916
917
|
}
|
|
917
|
-
function
|
|
918
|
-
return
|
|
918
|
+
function Tr(e, t, r, n) {
|
|
919
|
+
return Rt(e, t, r, Jt, Xe(e, 0, n), Xe(e, n + 1, -1), n);
|
|
919
920
|
}
|
|
920
|
-
function
|
|
921
|
-
for (var
|
|
922
|
-
|
|
923
|
-
return
|
|
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;
|
|
924
925
|
}
|
|
925
|
-
function
|
|
926
|
+
function To(e, t, r, n) {
|
|
926
927
|
switch (e.type) {
|
|
927
|
-
case
|
|
928
|
+
case ho:
|
|
928
929
|
if (e.children.length) break;
|
|
929
|
-
case
|
|
930
|
-
case
|
|
930
|
+
case fo:
|
|
931
|
+
case Jt:
|
|
931
932
|
return e.return = e.return || e.value;
|
|
932
|
-
case
|
|
933
|
+
case en:
|
|
933
934
|
return "";
|
|
934
|
-
case
|
|
935
|
-
return e.return = e.value + "{" +
|
|
936
|
-
case
|
|
935
|
+
case tn:
|
|
936
|
+
return e.return = e.value + "{" + Ne(e.children, n) + "}";
|
|
937
|
+
case Ht:
|
|
937
938
|
e.value = e.props.join(",");
|
|
938
939
|
}
|
|
939
|
-
return
|
|
940
|
+
return fe(r = Ne(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
940
941
|
}
|
|
941
|
-
function
|
|
942
|
-
var
|
|
943
|
-
return function(n, o,
|
|
944
|
-
for (var
|
|
945
|
-
|
|
946
|
-
return
|
|
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;
|
|
947
948
|
};
|
|
948
949
|
}
|
|
949
|
-
function
|
|
950
|
-
return function(
|
|
951
|
-
|
|
950
|
+
function Mo(e) {
|
|
951
|
+
return function(t) {
|
|
952
|
+
t.root || (t = t.return) && e(t);
|
|
952
953
|
};
|
|
953
954
|
}
|
|
954
|
-
function
|
|
955
|
-
var
|
|
956
|
-
return function(
|
|
957
|
-
return r
|
|
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];
|
|
958
959
|
};
|
|
959
960
|
}
|
|
960
|
-
var
|
|
961
|
-
for (var
|
|
962
|
-
|
|
963
|
-
return
|
|
964
|
-
},
|
|
965
|
-
var
|
|
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;
|
|
966
967
|
do
|
|
967
|
-
switch (
|
|
968
|
+
switch (Ze(o)) {
|
|
968
969
|
case 0:
|
|
969
|
-
|
|
970
|
+
o === 38 && de() === 12 && (r[n] = 1), t[n] += Oo(te - 1, r, n);
|
|
970
971
|
break;
|
|
971
972
|
case 2:
|
|
972
|
-
|
|
973
|
+
t[n] += ut(o);
|
|
973
974
|
break;
|
|
974
975
|
case 4:
|
|
975
|
-
if (
|
|
976
|
-
|
|
976
|
+
if (o === 44) {
|
|
977
|
+
t[++n] = de() === 58 ? "&\f" : "", r[n] = t[n].length;
|
|
977
978
|
break;
|
|
978
979
|
}
|
|
979
980
|
default:
|
|
980
|
-
|
|
981
|
-
}
|
|
982
|
-
while (
|
|
983
|
-
return
|
|
984
|
-
},
|
|
985
|
-
return
|
|
986
|
-
},
|
|
987
|
-
if (!(
|
|
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
|
|
988
989
|
// negative .length indicates that this rule has been already prefixed
|
|
989
|
-
|
|
990
|
-
for (var
|
|
991
|
-
if (
|
|
992
|
-
if (!(
|
|
993
|
-
|
|
994
|
-
for (var i = [],
|
|
995
|
-
for (var
|
|
996
|
-
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
},
|
|
1000
|
-
if (
|
|
1001
|
-
var
|
|
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;
|
|
1002
1003
|
// charcode for l
|
|
1003
|
-
|
|
1004
|
-
|
|
1004
|
+
r.charCodeAt(0) === 108 && // charcode for b
|
|
1005
|
+
r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
1005
1006
|
}
|
|
1006
1007
|
};
|
|
1007
|
-
function
|
|
1008
|
-
switch (
|
|
1008
|
+
function an(e, t) {
|
|
1009
|
+
switch (go(e, t)) {
|
|
1009
1010
|
case 5103:
|
|
1010
|
-
return
|
|
1011
|
+
return F + "print-" + e + e;
|
|
1011
1012
|
case 5737:
|
|
1012
1013
|
case 4201:
|
|
1013
1014
|
case 3177:
|
|
@@ -1033,44 +1034,44 @@ function lt(e, r) {
|
|
|
1033
1034
|
case 5365:
|
|
1034
1035
|
case 5621:
|
|
1035
1036
|
case 3829:
|
|
1036
|
-
return
|
|
1037
|
+
return F + e + e;
|
|
1037
1038
|
case 5349:
|
|
1038
1039
|
case 4246:
|
|
1039
1040
|
case 4810:
|
|
1040
1041
|
case 6968:
|
|
1041
1042
|
case 2756:
|
|
1042
|
-
return
|
|
1043
|
+
return F + e + mt + e + K + e + e;
|
|
1043
1044
|
case 6828:
|
|
1044
1045
|
case 4268:
|
|
1045
|
-
return
|
|
1046
|
+
return F + e + K + e + e;
|
|
1046
1047
|
case 6165:
|
|
1047
|
-
return
|
|
1048
|
+
return F + e + K + "flex-" + e + e;
|
|
1048
1049
|
case 5187:
|
|
1049
|
-
return
|
|
1050
|
+
return F + e + L(e, /(\w+).+(:[^]+)/, F + "box-$1$2" + K + "flex-$1$2") + e;
|
|
1050
1051
|
case 5443:
|
|
1051
|
-
return
|
|
1052
|
+
return F + e + K + "flex-item-" + L(e, /flex-|-self/, "") + e;
|
|
1052
1053
|
case 4675:
|
|
1053
|
-
return
|
|
1054
|
+
return F + e + K + "flex-line-pack" + L(e, /align-content|flex-|-self/, "") + e;
|
|
1054
1055
|
case 5548:
|
|
1055
|
-
return
|
|
1056
|
+
return F + e + K + L(e, "shrink", "negative") + e;
|
|
1056
1057
|
case 5292:
|
|
1057
|
-
return
|
|
1058
|
+
return F + e + K + L(e, "basis", "preferred-size") + e;
|
|
1058
1059
|
case 6060:
|
|
1059
|
-
return
|
|
1060
|
+
return F + "box-" + L(e, "-grow", "") + F + e + K + L(e, "grow", "positive") + e;
|
|
1060
1061
|
case 4554:
|
|
1061
|
-
return
|
|
1062
|
+
return F + L(e, /([^-])(transform)/g, "$1" + F + "$2") + e;
|
|
1062
1063
|
case 6187:
|
|
1063
|
-
return
|
|
1064
|
+
return L(L(L(e, /(zoom-|grab)/, F + "$1"), /(image-set)/, F + "$1"), e, "") + e;
|
|
1064
1065
|
case 5495:
|
|
1065
1066
|
case 3959:
|
|
1066
|
-
return
|
|
1067
|
+
return L(e, /(image-set\([^]*)/, F + "$1$`$1");
|
|
1067
1068
|
case 4968:
|
|
1068
|
-
return
|
|
1069
|
+
return L(L(e, /(.+:)(flex-)?(.*)/, F + "box-pack:$3" + K + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + F + e + e;
|
|
1069
1070
|
case 4095:
|
|
1070
1071
|
case 3583:
|
|
1071
1072
|
case 4068:
|
|
1072
1073
|
case 2532:
|
|
1073
|
-
return
|
|
1074
|
+
return L(e, /(.+)-inline(.+)/, F + "$1$2") + e;
|
|
1074
1075
|
case 8116:
|
|
1075
1076
|
case 7059:
|
|
1076
1077
|
case 5753:
|
|
@@ -1083,115 +1084,115 @@ function lt(e, r) {
|
|
|
1083
1084
|
case 5789:
|
|
1084
1085
|
case 5021:
|
|
1085
1086
|
case 4765:
|
|
1086
|
-
if (
|
|
1087
|
+
if (fe(e) - 1 - t > 6) switch (J(e, t + 1)) {
|
|
1087
1088
|
case 109:
|
|
1088
|
-
if (J(e,
|
|
1089
|
+
if (J(e, t + 4) !== 45) break;
|
|
1089
1090
|
case 102:
|
|
1090
|
-
return
|
|
1091
|
+
return L(e, /(.+:)(.+)-([^]+)/, "$1" + F + "$2-$3$1" + mt + (J(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
1091
1092
|
case 115:
|
|
1092
|
-
return ~
|
|
1093
|
+
return ~jt(e, "stretch") ? an(L(e, "stretch", "fill-available"), t) + e : e;
|
|
1093
1094
|
}
|
|
1094
1095
|
break;
|
|
1095
1096
|
case 4949:
|
|
1096
|
-
if (J(e,
|
|
1097
|
+
if (J(e, t + 1) !== 115) break;
|
|
1097
1098
|
case 6444:
|
|
1098
|
-
switch (J(e,
|
|
1099
|
+
switch (J(e, fe(e) - 3 - (~jt(e, "!important") && 10))) {
|
|
1099
1100
|
case 107:
|
|
1100
|
-
return
|
|
1101
|
+
return L(e, ":", ":" + F) + e;
|
|
1101
1102
|
case 101:
|
|
1102
|
-
return
|
|
1103
|
+
return L(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + F + (J(e, 14) === 45 ? "inline-" : "") + "box$3$1" + F + "$2$3$1" + K + "$2box$3") + e;
|
|
1103
1104
|
}
|
|
1104
1105
|
break;
|
|
1105
1106
|
case 5936:
|
|
1106
|
-
switch (J(e,
|
|
1107
|
+
switch (J(e, t + 11)) {
|
|
1107
1108
|
case 114:
|
|
1108
|
-
return
|
|
1109
|
+
return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
1109
1110
|
case 108:
|
|
1110
|
-
return
|
|
1111
|
+
return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
1111
1112
|
case 45:
|
|
1112
|
-
return
|
|
1113
|
+
return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
1113
1114
|
}
|
|
1114
|
-
return
|
|
1115
|
+
return F + e + K + e + e;
|
|
1115
1116
|
}
|
|
1116
1117
|
return e;
|
|
1117
1118
|
}
|
|
1118
|
-
var
|
|
1119
|
-
if (
|
|
1120
|
-
case
|
|
1121
|
-
|
|
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);
|
|
1122
1123
|
break;
|
|
1123
|
-
case
|
|
1124
|
-
return
|
|
1125
|
-
value:
|
|
1126
|
-
})],
|
|
1127
|
-
case
|
|
1128
|
-
if (
|
|
1129
|
-
switch (
|
|
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+)/)) {
|
|
1130
1131
|
case ":read-only":
|
|
1131
1132
|
case ":read-write":
|
|
1132
|
-
return
|
|
1133
|
-
props: [
|
|
1134
|
-
})],
|
|
1133
|
+
return Ne([Ke(t, {
|
|
1134
|
+
props: [L(i, /:(read-\w+)/, ":" + mt + "$1")]
|
|
1135
|
+
})], o);
|
|
1135
1136
|
case "::placeholder":
|
|
1136
|
-
return
|
|
1137
|
-
props: [
|
|
1138
|
-
}),
|
|
1139
|
-
props: [
|
|
1140
|
-
}),
|
|
1141
|
-
props: [
|
|
1142
|
-
})],
|
|
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);
|
|
1143
1144
|
}
|
|
1144
1145
|
return "";
|
|
1145
1146
|
});
|
|
1146
1147
|
}
|
|
1147
|
-
},
|
|
1148
|
-
var
|
|
1149
|
-
if (
|
|
1150
|
-
var
|
|
1151
|
-
Array.prototype.forEach.call(
|
|
1152
|
-
var
|
|
1153
|
-
|
|
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", ""));
|
|
1154
1155
|
});
|
|
1155
1156
|
}
|
|
1156
|
-
var
|
|
1157
|
-
|
|
1157
|
+
var o = t.stylisPlugins || Io, i = {}, a, c = [];
|
|
1158
|
+
a = t.container || document.head, Array.prototype.forEach.call(
|
|
1158
1159
|
// this means we will ignore elements which don't have a space in them which
|
|
1159
1160
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1160
|
-
document.querySelectorAll('style[data-emotion^="' +
|
|
1161
|
-
function(
|
|
1162
|
-
for (var
|
|
1163
|
-
i[
|
|
1164
|
-
|
|
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);
|
|
1165
1166
|
}
|
|
1166
1167
|
);
|
|
1167
|
-
var
|
|
1168
|
+
var l, h = [Fo, Lo];
|
|
1168
1169
|
{
|
|
1169
|
-
var
|
|
1170
|
-
|
|
1171
|
-
})],
|
|
1172
|
-
return
|
|
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);
|
|
1173
1174
|
};
|
|
1174
|
-
|
|
1175
|
-
|
|
1175
|
+
l = function(x, g, S, _) {
|
|
1176
|
+
f = S, v(x ? x + "{" + g.styles + "}" : g.styles), _ && (R.inserted[g.name] = !0);
|
|
1176
1177
|
};
|
|
1177
1178
|
}
|
|
1178
|
-
var
|
|
1179
|
-
key:
|
|
1180
|
-
sheet: new
|
|
1181
|
-
key:
|
|
1182
|
-
container:
|
|
1183
|
-
nonce:
|
|
1184
|
-
speedy:
|
|
1185
|
-
prepend:
|
|
1186
|
-
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
|
|
1187
1188
|
}),
|
|
1188
|
-
nonce:
|
|
1189
|
+
nonce: t.nonce,
|
|
1189
1190
|
inserted: i,
|
|
1190
1191
|
registered: {},
|
|
1191
|
-
insert:
|
|
1192
|
+
insert: l
|
|
1192
1193
|
};
|
|
1193
|
-
return
|
|
1194
|
-
},
|
|
1194
|
+
return R.sheet.hydrate(c), R;
|
|
1195
|
+
}, Yt = { exports: {} }, I = {};
|
|
1195
1196
|
/** @license React v16.13.1
|
|
1196
1197
|
* react-is.production.min.js
|
|
1197
1198
|
*
|
|
@@ -1200,73 +1201,73 @@ var Sn = function(r, n, o, a) {
|
|
|
1200
1201
|
* This source code is licensed under the MIT license found in the
|
|
1201
1202
|
* LICENSE file in the root directory of this source tree.
|
|
1202
1203
|
*/
|
|
1203
|
-
var
|
|
1204
|
-
function
|
|
1205
|
-
if (
|
|
1206
|
-
|
|
1207
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
1208
|
-
function
|
|
1209
|
-
if (typeof
|
|
1210
|
-
var
|
|
1211
|
-
switch (
|
|
1212
|
-
case
|
|
1213
|
-
switch (
|
|
1214
|
-
case
|
|
1215
|
-
case
|
|
1216
|
-
case
|
|
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:
|
|
1217
1218
|
case i:
|
|
1218
|
-
case
|
|
1219
|
-
case
|
|
1220
|
-
return
|
|
1219
|
+
case o:
|
|
1220
|
+
case y:
|
|
1221
|
+
return d;
|
|
1221
1222
|
default:
|
|
1222
|
-
switch (
|
|
1223
|
-
case s:
|
|
1224
|
-
case u:
|
|
1225
|
-
case b:
|
|
1226
|
-
case S:
|
|
1223
|
+
switch (d = d && d.$$typeof, d) {
|
|
1227
1224
|
case c:
|
|
1228
|
-
|
|
1225
|
+
case f:
|
|
1226
|
+
case R:
|
|
1227
|
+
case v:
|
|
1228
|
+
case a:
|
|
1229
|
+
return d;
|
|
1229
1230
|
default:
|
|
1230
|
-
return
|
|
1231
|
+
return q;
|
|
1231
1232
|
}
|
|
1232
1233
|
}
|
|
1233
|
-
case
|
|
1234
|
-
return
|
|
1234
|
+
case r:
|
|
1235
|
+
return q;
|
|
1235
1236
|
}
|
|
1236
1237
|
}
|
|
1237
1238
|
}
|
|
1238
|
-
function
|
|
1239
|
-
return
|
|
1240
|
-
}
|
|
1241
|
-
return
|
|
1242
|
-
return
|
|
1243
|
-
},
|
|
1244
|
-
return
|
|
1245
|
-
},
|
|
1246
|
-
return
|
|
1247
|
-
},
|
|
1248
|
-
return typeof
|
|
1249
|
-
},
|
|
1250
|
-
return
|
|
1251
|
-
},
|
|
1252
|
-
return
|
|
1253
|
-
},
|
|
1254
|
-
return
|
|
1255
|
-
},
|
|
1256
|
-
return
|
|
1257
|
-
},
|
|
1258
|
-
return
|
|
1259
|
-
},
|
|
1260
|
-
return
|
|
1261
|
-
},
|
|
1262
|
-
return
|
|
1263
|
-
},
|
|
1264
|
-
return
|
|
1265
|
-
},
|
|
1266
|
-
return typeof
|
|
1267
|
-
},
|
|
1268
|
-
}
|
|
1269
|
-
var
|
|
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
|
+
}
|
|
1270
|
+
var D = {};
|
|
1270
1271
|
/** @license React v16.13.1
|
|
1271
1272
|
* react-is.development.js
|
|
1272
1273
|
*
|
|
@@ -1275,155 +1276,155 @@ var N = {};
|
|
|
1275
1276
|
* This source code is licensed under the MIT license found in the
|
|
1276
1277
|
* LICENSE file in the root directory of this source tree.
|
|
1277
1278
|
*/
|
|
1278
|
-
var
|
|
1279
|
-
function
|
|
1280
|
-
return
|
|
1281
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
1282
|
-
function
|
|
1283
|
-
return typeof
|
|
1284
|
-
|
|
1285
|
-
}
|
|
1286
|
-
function
|
|
1287
|
-
if (typeof
|
|
1288
|
-
var
|
|
1289
|
-
switch (
|
|
1290
|
-
case
|
|
1291
|
-
var
|
|
1292
|
-
switch (
|
|
1293
|
-
case
|
|
1294
|
-
case
|
|
1295
|
-
case
|
|
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:
|
|
1296
1297
|
case i:
|
|
1297
|
-
case
|
|
1298
|
-
case
|
|
1299
|
-
return
|
|
1298
|
+
case o:
|
|
1299
|
+
case y:
|
|
1300
|
+
return Oe;
|
|
1300
1301
|
default:
|
|
1301
|
-
var
|
|
1302
|
-
switch (
|
|
1303
|
-
case s:
|
|
1304
|
-
case u:
|
|
1305
|
-
case b:
|
|
1306
|
-
case S:
|
|
1302
|
+
var Ce = Oe && Oe.$$typeof;
|
|
1303
|
+
switch (Ce) {
|
|
1307
1304
|
case c:
|
|
1308
|
-
|
|
1305
|
+
case f:
|
|
1306
|
+
case R:
|
|
1307
|
+
case v:
|
|
1308
|
+
case a:
|
|
1309
|
+
return Ce;
|
|
1309
1310
|
default:
|
|
1310
|
-
return
|
|
1311
|
+
return Be;
|
|
1311
1312
|
}
|
|
1312
1313
|
}
|
|
1313
|
-
case
|
|
1314
|
-
return
|
|
1314
|
+
case r:
|
|
1315
|
+
return Be;
|
|
1315
1316
|
}
|
|
1316
1317
|
}
|
|
1317
1318
|
}
|
|
1318
|
-
var
|
|
1319
|
-
function
|
|
1320
|
-
return
|
|
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;
|
|
1321
1322
|
}
|
|
1322
|
-
function
|
|
1323
|
-
return
|
|
1323
|
+
function Y(E) {
|
|
1324
|
+
return $(E) === h;
|
|
1324
1325
|
}
|
|
1325
|
-
function
|
|
1326
|
-
return
|
|
1326
|
+
function G(E) {
|
|
1327
|
+
return $(E) === c;
|
|
1327
1328
|
}
|
|
1328
|
-
function
|
|
1329
|
-
return
|
|
1329
|
+
function oe(E) {
|
|
1330
|
+
return $(E) === a;
|
|
1330
1331
|
}
|
|
1331
|
-
function
|
|
1332
|
-
return typeof
|
|
1332
|
+
function me(E) {
|
|
1333
|
+
return typeof E == "object" && E !== null && E.$$typeof === t;
|
|
1333
1334
|
}
|
|
1334
|
-
function
|
|
1335
|
-
return
|
|
1335
|
+
function _t(E) {
|
|
1336
|
+
return $(E) === f;
|
|
1336
1337
|
}
|
|
1337
|
-
function
|
|
1338
|
-
return
|
|
1338
|
+
function Tt(E) {
|
|
1339
|
+
return $(E) === n;
|
|
1339
1340
|
}
|
|
1340
|
-
function
|
|
1341
|
-
return
|
|
1341
|
+
function Ve(E) {
|
|
1342
|
+
return $(E) === R;
|
|
1342
1343
|
}
|
|
1343
|
-
function
|
|
1344
|
-
return
|
|
1344
|
+
function ze(E) {
|
|
1345
|
+
return $(E) === v;
|
|
1345
1346
|
}
|
|
1346
|
-
function
|
|
1347
|
-
return
|
|
1347
|
+
function Me(E) {
|
|
1348
|
+
return $(E) === r;
|
|
1348
1349
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return
|
|
1350
|
+
function Ue(E) {
|
|
1351
|
+
return $(E) === i;
|
|
1351
1352
|
}
|
|
1352
|
-
function
|
|
1353
|
-
return
|
|
1353
|
+
function Pe(E) {
|
|
1354
|
+
return $(E) === o;
|
|
1354
1355
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return
|
|
1356
|
+
function kt(E) {
|
|
1357
|
+
return $(E) === y;
|
|
1357
1358
|
}
|
|
1358
|
-
|
|
1359
|
-
}()),
|
|
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
|
+
}()), D;
|
|
1360
1361
|
}
|
|
1361
|
-
process.env.NODE_ENV === "production" ?
|
|
1362
|
-
var
|
|
1362
|
+
process.env.NODE_ENV === "production" ? Yt.exports = Wo() : Yt.exports = jo();
|
|
1363
|
+
var qo = Yt.exports, cn = qo, Yo = {
|
|
1363
1364
|
$$typeof: !0,
|
|
1364
1365
|
render: !0,
|
|
1365
1366
|
defaultProps: !0,
|
|
1366
1367
|
displayName: !0,
|
|
1367
1368
|
propTypes: !0
|
|
1368
|
-
},
|
|
1369
|
+
}, Vo = {
|
|
1369
1370
|
$$typeof: !0,
|
|
1370
1371
|
compare: !0,
|
|
1371
1372
|
defaultProps: !0,
|
|
1372
1373
|
displayName: !0,
|
|
1373
1374
|
propTypes: !0,
|
|
1374
1375
|
type: !0
|
|
1375
|
-
},
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
var
|
|
1379
|
-
function
|
|
1380
|
-
var
|
|
1381
|
-
return
|
|
1382
|
-
e[
|
|
1383
|
-
}),
|
|
1384
|
-
}
|
|
1385
|
-
var
|
|
1386
|
-
var
|
|
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;
|
|
1387
1388
|
// we only need to add the styles to the registered cache if the
|
|
1388
1389
|
// class name could be used further down
|
|
1389
1390
|
// the tree but if it's a string tag, we know it won't
|
|
1390
1391
|
// so we don't have to add it to registered cache.
|
|
1391
1392
|
// this improves memory usage since we can avoid storing the whole style string
|
|
1392
|
-
(
|
|
1393
|
+
(n === !1 || // we need to always store it if we're in compat mode and
|
|
1393
1394
|
// in node since emotion-server relies on whether a style is in
|
|
1394
1395
|
// the registered cache to know whether a style is global or not
|
|
1395
1396
|
// also, note that this check will be dead code eliminated in the browser
|
|
1396
|
-
|
|
1397
|
-
},
|
|
1398
|
-
|
|
1399
|
-
var
|
|
1400
|
-
if (
|
|
1401
|
-
var i =
|
|
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;
|
|
1402
1403
|
do
|
|
1403
|
-
|
|
1404
|
+
t.insert(r === i ? "." + o : "", i, t.sheet, !0), i = i.next;
|
|
1404
1405
|
while (i !== void 0);
|
|
1405
1406
|
}
|
|
1406
1407
|
};
|
|
1407
|
-
function
|
|
1408
|
-
for (var
|
|
1409
|
-
|
|
1410
|
-
(
|
|
1411
|
-
|
|
1412
|
-
(
|
|
1413
|
-
(
|
|
1414
|
-
switch (
|
|
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) {
|
|
1415
1416
|
case 3:
|
|
1416
|
-
|
|
1417
|
+
t ^= (e.charCodeAt(n + 2) & 255) << 16;
|
|
1417
1418
|
case 2:
|
|
1418
|
-
|
|
1419
|
+
t ^= (e.charCodeAt(n + 1) & 255) << 8;
|
|
1419
1420
|
case 1:
|
|
1420
|
-
|
|
1421
|
-
(
|
|
1421
|
+
t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
|
|
1422
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
1422
1423
|
}
|
|
1423
|
-
return
|
|
1424
|
-
(
|
|
1424
|
+
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
1425
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
1425
1426
|
}
|
|
1426
|
-
var
|
|
1427
|
+
var Ho = {
|
|
1427
1428
|
animationIterationCount: 1,
|
|
1428
1429
|
aspectRatio: 1,
|
|
1429
1430
|
borderImageOutset: 1,
|
|
@@ -1472,230 +1473,352 @@ var Mn = {
|
|
|
1472
1473
|
strokeMiterlimit: 1,
|
|
1473
1474
|
strokeOpacity: 1,
|
|
1474
1475
|
strokeWidth: 1
|
|
1475
|
-
},
|
|
1476
|
-
return
|
|
1477
|
-
},
|
|
1478
|
-
return
|
|
1479
|
-
},
|
|
1480
|
-
return
|
|
1481
|
-
}),
|
|
1482
|
-
switch (
|
|
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) {
|
|
1483
1484
|
case "animation":
|
|
1484
1485
|
case "animationName":
|
|
1485
|
-
if (typeof
|
|
1486
|
-
return
|
|
1487
|
-
return
|
|
1488
|
-
name:
|
|
1486
|
+
if (typeof r == "string")
|
|
1487
|
+
return r.replace(Ko, function(n, o, i) {
|
|
1488
|
+
return he = {
|
|
1489
|
+
name: o,
|
|
1489
1490
|
styles: i,
|
|
1490
|
-
next:
|
|
1491
|
-
},
|
|
1491
|
+
next: he
|
|
1492
|
+
}, o;
|
|
1492
1493
|
});
|
|
1493
1494
|
}
|
|
1494
|
-
return
|
|
1495
|
+
return Ho[t] !== 1 && !fn(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
|
|
1495
1496
|
};
|
|
1496
|
-
function
|
|
1497
|
-
if (
|
|
1497
|
+
function et(e, t, r) {
|
|
1498
|
+
if (r == null)
|
|
1498
1499
|
return "";
|
|
1499
|
-
var
|
|
1500
|
-
if (
|
|
1501
|
-
return
|
|
1502
|
-
switch (typeof
|
|
1500
|
+
var n = r;
|
|
1501
|
+
if (n.__emotion_styles !== void 0)
|
|
1502
|
+
return n;
|
|
1503
|
+
switch (typeof r) {
|
|
1503
1504
|
case "boolean":
|
|
1504
1505
|
return "";
|
|
1505
1506
|
case "object": {
|
|
1506
|
-
var
|
|
1507
|
-
if (
|
|
1508
|
-
return
|
|
1509
|
-
name:
|
|
1510
|
-
styles:
|
|
1511
|
-
next:
|
|
1512
|
-
},
|
|
1513
|
-
var i =
|
|
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;
|
|
1514
1515
|
if (i.styles !== void 0) {
|
|
1515
|
-
var
|
|
1516
|
-
if (
|
|
1517
|
-
for (;
|
|
1518
|
-
|
|
1519
|
-
name:
|
|
1520
|
-
styles:
|
|
1521
|
-
next:
|
|
1522
|
-
},
|
|
1523
|
-
var
|
|
1524
|
-
return
|
|
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;
|
|
1525
1526
|
}
|
|
1526
|
-
return
|
|
1527
|
+
return Qo(e, t, r);
|
|
1527
1528
|
}
|
|
1528
1529
|
case "function": {
|
|
1529
1530
|
if (e !== void 0) {
|
|
1530
|
-
var
|
|
1531
|
-
return
|
|
1531
|
+
var l = he, h = r(e);
|
|
1532
|
+
return he = l, et(e, t, h);
|
|
1532
1533
|
}
|
|
1533
1534
|
break;
|
|
1534
1535
|
}
|
|
1535
1536
|
}
|
|
1536
|
-
var
|
|
1537
|
-
return
|
|
1537
|
+
var f = r;
|
|
1538
|
+
return f;
|
|
1538
1539
|
}
|
|
1539
|
-
function
|
|
1540
|
-
var
|
|
1541
|
-
if (Array.isArray(
|
|
1542
|
-
for (var
|
|
1543
|
-
|
|
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]) + ";";
|
|
1544
1545
|
else
|
|
1545
|
-
for (var i in
|
|
1546
|
-
var
|
|
1547
|
-
if (typeof
|
|
1548
|
-
var
|
|
1549
|
-
|
|
1550
|
-
} else if (Array.isArray(
|
|
1551
|
-
for (var
|
|
1552
|
-
|
|
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]) + ";");
|
|
1553
1554
|
else {
|
|
1554
|
-
var
|
|
1555
|
+
var h = et(e, t, a);
|
|
1555
1556
|
switch (i) {
|
|
1556
1557
|
case "animation":
|
|
1557
1558
|
case "animationName": {
|
|
1558
|
-
|
|
1559
|
+
n += Lt(i) + ":" + h + ";";
|
|
1559
1560
|
break;
|
|
1560
1561
|
}
|
|
1561
1562
|
default:
|
|
1562
|
-
|
|
1563
|
+
n += i + "{" + h + "}";
|
|
1563
1564
|
}
|
|
1564
1565
|
}
|
|
1565
1566
|
}
|
|
1566
|
-
return
|
|
1567
|
+
return n;
|
|
1567
1568
|
}
|
|
1568
|
-
var
|
|
1569
|
-
function
|
|
1569
|
+
var $r = /label:\s*([^\s;{]+)\s*(;|$)/g, he;
|
|
1570
|
+
function Xo(e, t, r) {
|
|
1570
1571
|
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
1571
1572
|
return e[0];
|
|
1572
|
-
var
|
|
1573
|
-
|
|
1573
|
+
var n = !0, o = "";
|
|
1574
|
+
he = void 0;
|
|
1574
1575
|
var i = e[0];
|
|
1575
1576
|
if (i == null || i.raw === void 0)
|
|
1576
|
-
|
|
1577
|
+
n = !1, o += et(r, t, i);
|
|
1577
1578
|
else {
|
|
1578
|
-
var
|
|
1579
|
-
|
|
1580
|
-
}
|
|
1581
|
-
for (var
|
|
1582
|
-
if (
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
for (var
|
|
1588
|
-
|
|
1589
|
-
var
|
|
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;
|
|
1590
1591
|
return {
|
|
1591
|
-
name:
|
|
1592
|
-
styles:
|
|
1593
|
-
next:
|
|
1592
|
+
name: y,
|
|
1593
|
+
styles: o,
|
|
1594
|
+
next: he
|
|
1594
1595
|
};
|
|
1595
1596
|
}
|
|
1596
|
-
var
|
|
1597
|
-
return
|
|
1598
|
-
},
|
|
1597
|
+
var Zo = function(t) {
|
|
1598
|
+
return t();
|
|
1599
|
+
}, ei = ve.useInsertionEffect ? ve.useInsertionEffect : !1, ti = ei || Zo, hn = /* @__PURE__ */ ve.createContext(
|
|
1599
1600
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1600
1601
|
// because this module is primarily intended for the browser and node
|
|
1601
1602
|
// but it's also required in react native and similar environments sometimes
|
|
1602
1603
|
// and we could have a special build just for that
|
|
1603
1604
|
// but this is much easier and the native packages
|
|
1604
1605
|
// might use a different theme context in the future anyway
|
|
1605
|
-
typeof HTMLElement < "u" ? /* @__PURE__ */
|
|
1606
|
+
typeof HTMLElement < "u" ? /* @__PURE__ */ Do({
|
|
1606
1607
|
key: "css"
|
|
1607
1608
|
}) : null
|
|
1608
1609
|
);
|
|
1609
|
-
|
|
1610
|
-
var
|
|
1611
|
-
return /* @__PURE__ */
|
|
1612
|
-
var
|
|
1613
|
-
return r
|
|
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);
|
|
1614
1615
|
});
|
|
1615
|
-
},
|
|
1616
|
-
var
|
|
1617
|
-
for (var
|
|
1618
|
-
|
|
1619
|
-
return
|
|
1620
|
-
},
|
|
1621
|
-
var
|
|
1622
|
-
return
|
|
1623
|
-
return
|
|
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);
|
|
1624
1625
|
}), null;
|
|
1625
|
-
},
|
|
1626
|
-
var
|
|
1627
|
-
typeof
|
|
1628
|
-
var
|
|
1629
|
-
typeof e.className == "string" ?
|
|
1630
|
-
var
|
|
1631
|
-
|
|
1632
|
-
var
|
|
1633
|
-
for (var
|
|
1634
|
-
|
|
1635
|
-
return
|
|
1636
|
-
cache:
|
|
1637
|
-
serialized:
|
|
1638
|
-
isStringTag: typeof
|
|
1639
|
-
}), /* @__PURE__ */
|
|
1640
|
-
}),
|
|
1641
|
-
return
|
|
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);
|
|
1642
1643
|
};
|
|
1643
|
-
function
|
|
1644
|
+
function ci(e) {
|
|
1644
1645
|
switch (e.toLowerCase()) {
|
|
1645
1646
|
case "sql":
|
|
1646
|
-
return
|
|
1647
|
+
return zr();
|
|
1647
1648
|
case "json":
|
|
1648
|
-
return
|
|
1649
|
+
return Ur();
|
|
1649
1650
|
default:
|
|
1650
1651
|
return [];
|
|
1651
1652
|
}
|
|
1652
1653
|
}
|
|
1653
|
-
function
|
|
1654
|
+
function li(e) {
|
|
1654
1655
|
return ["sql", "json"].includes(e.toLowerCase());
|
|
1655
1656
|
}
|
|
1656
|
-
function
|
|
1657
|
-
return
|
|
1657
|
+
function ui(e = {}) {
|
|
1658
|
+
return Hr(e);
|
|
1658
1659
|
}
|
|
1659
|
-
function
|
|
1660
|
-
return [
|
|
1660
|
+
function ss(e) {
|
|
1661
|
+
return [Zn(), eo(e)];
|
|
1661
1662
|
}
|
|
1662
|
-
function
|
|
1663
|
-
return
|
|
1663
|
+
function fi() {
|
|
1664
|
+
return we.of([Dt]);
|
|
1664
1665
|
}
|
|
1665
|
-
const
|
|
1666
|
+
const as = [fi(), ui()], hi = Jr.define([{
|
|
1667
|
+
tag: W.keyword,
|
|
1668
|
+
color: "#1a1aa6",
|
|
1669
|
+
fontWeight: "bold"
|
|
1670
|
+
}, {
|
|
1671
|
+
tag: W.comment,
|
|
1672
|
+
color: "#008000",
|
|
1673
|
+
fontStyle: "italic"
|
|
1674
|
+
}, {
|
|
1675
|
+
tag: W.string,
|
|
1676
|
+
color: "#a31515"
|
|
1677
|
+
}, {
|
|
1678
|
+
tag: W.number,
|
|
1679
|
+
color: "#098658"
|
|
1680
|
+
}, {
|
|
1681
|
+
tag: W.operator,
|
|
1682
|
+
color: "#777777"
|
|
1683
|
+
}, {
|
|
1684
|
+
tag: W.propertyName,
|
|
1685
|
+
color: "#0451a5"
|
|
1686
|
+
}, {
|
|
1687
|
+
tag: W.variableName,
|
|
1688
|
+
color: "#001080"
|
|
1689
|
+
}, {
|
|
1690
|
+
tag: W.definition(W.variableName),
|
|
1691
|
+
color: "#1a1aa6"
|
|
1692
|
+
}, {
|
|
1693
|
+
tag: W.typeName,
|
|
1694
|
+
color: "#267f99"
|
|
1695
|
+
}, {
|
|
1696
|
+
tag: W.className,
|
|
1697
|
+
color: "#267f99"
|
|
1698
|
+
}, {
|
|
1699
|
+
tag: W.meta,
|
|
1700
|
+
color: "#5c5c5c"
|
|
1701
|
+
}, {
|
|
1702
|
+
tag: W.regexp,
|
|
1703
|
+
color: "#811f3f"
|
|
1704
|
+
}, {
|
|
1705
|
+
tag: W.link,
|
|
1706
|
+
color: "#0563c1",
|
|
1707
|
+
textDecoration: "underline"
|
|
1708
|
+
}]), Fr = [V.theme({
|
|
1666
1709
|
"&": {
|
|
1667
1710
|
backgroundColor: "#ffffff",
|
|
1668
|
-
color: "#333333"
|
|
1711
|
+
color: "#333333",
|
|
1712
|
+
fontSize: "14px",
|
|
1713
|
+
height: "100%"
|
|
1714
|
+
},
|
|
1715
|
+
".cm-scroller": {
|
|
1716
|
+
fontFamily: '"Menlo", "Monaco", "Courier New", monospace',
|
|
1717
|
+
overflow: "auto"
|
|
1718
|
+
},
|
|
1719
|
+
".cm-content": {
|
|
1720
|
+
padding: "8px 0",
|
|
1721
|
+
caretColor: "#333",
|
|
1722
|
+
textAlign: "left"
|
|
1669
1723
|
},
|
|
1670
1724
|
".cm-gutters": {
|
|
1671
|
-
backgroundColor: "#
|
|
1672
|
-
color: "#
|
|
1673
|
-
|
|
1725
|
+
backgroundColor: "#f8f9fa",
|
|
1726
|
+
color: "#6e7781",
|
|
1727
|
+
borderRight: "1px solid #ddd"
|
|
1728
|
+
},
|
|
1729
|
+
".cm-lineNumbers": {
|
|
1730
|
+
minWidth: "40px"
|
|
1731
|
+
},
|
|
1732
|
+
".cm-lineNumbers .cm-gutterElement": {
|
|
1733
|
+
padding: "0 8px 0 4px",
|
|
1734
|
+
textAlign: "right",
|
|
1735
|
+
fontSize: "12px"
|
|
1674
1736
|
},
|
|
1675
1737
|
".cm-activeLine": {
|
|
1676
|
-
backgroundColor: "rgba(0, 0, 0, 0.
|
|
1738
|
+
backgroundColor: "rgba(0, 0, 0, 0.04)"
|
|
1677
1739
|
},
|
|
1678
1740
|
".cm-activeLineGutter": {
|
|
1679
|
-
backgroundColor: "rgba(0, 0, 0, 0.
|
|
1741
|
+
backgroundColor: "rgba(0, 0, 0, 0.04)"
|
|
1680
1742
|
},
|
|
1681
1743
|
".cm-selectionMatch": {
|
|
1682
|
-
backgroundColor: "rgba(
|
|
1744
|
+
backgroundColor: "rgba(181, 213, 255, 0.3)"
|
|
1683
1745
|
},
|
|
1684
1746
|
"&.cm-focused .cm-cursor": {
|
|
1685
1747
|
borderLeftColor: "#333333"
|
|
1686
1748
|
},
|
|
1687
1749
|
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
1688
|
-
backgroundColor: "rgba(
|
|
1750
|
+
backgroundColor: "rgba(181, 213, 255, 0.5)"
|
|
1689
1751
|
}
|
|
1690
|
-
}),
|
|
1752
|
+
}), pt(hi)], di = Jr.define([{
|
|
1753
|
+
tag: W.keyword,
|
|
1754
|
+
color: "#569cd6",
|
|
1755
|
+
fontWeight: "bold"
|
|
1756
|
+
}, {
|
|
1757
|
+
tag: W.comment,
|
|
1758
|
+
color: "#6A9955",
|
|
1759
|
+
fontStyle: "italic"
|
|
1760
|
+
}, {
|
|
1761
|
+
tag: W.string,
|
|
1762
|
+
color: "#ce9178"
|
|
1763
|
+
}, {
|
|
1764
|
+
tag: W.number,
|
|
1765
|
+
color: "#b5cea8"
|
|
1766
|
+
}, {
|
|
1767
|
+
tag: W.operator,
|
|
1768
|
+
color: "#d4d4d4"
|
|
1769
|
+
}, {
|
|
1770
|
+
tag: W.propertyName,
|
|
1771
|
+
color: "#9cdcfe"
|
|
1772
|
+
}, {
|
|
1773
|
+
tag: W.variableName,
|
|
1774
|
+
color: "#9cdcfe"
|
|
1775
|
+
}, {
|
|
1776
|
+
tag: W.definition(W.variableName),
|
|
1777
|
+
color: "#4fc1ff"
|
|
1778
|
+
}, {
|
|
1779
|
+
tag: W.typeName,
|
|
1780
|
+
color: "#4ec9b0"
|
|
1781
|
+
}, {
|
|
1782
|
+
tag: W.className,
|
|
1783
|
+
color: "#4ec9b0"
|
|
1784
|
+
}, {
|
|
1785
|
+
tag: W.meta,
|
|
1786
|
+
color: "#d4d4d4"
|
|
1787
|
+
}, {
|
|
1788
|
+
tag: W.regexp,
|
|
1789
|
+
color: "#d16969"
|
|
1790
|
+
}, {
|
|
1791
|
+
tag: W.link,
|
|
1792
|
+
color: "#4e94ce",
|
|
1793
|
+
textDecoration: "underline"
|
|
1794
|
+
}]), pi = [V.theme({
|
|
1691
1795
|
"&": {
|
|
1692
1796
|
backgroundColor: "#1e1e1e",
|
|
1693
|
-
color: "#d4d4d4"
|
|
1797
|
+
color: "#d4d4d4",
|
|
1798
|
+
fontSize: "14px",
|
|
1799
|
+
height: "100%"
|
|
1800
|
+
},
|
|
1801
|
+
".cm-scroller": {
|
|
1802
|
+
fontFamily: '"Menlo", "Monaco", "Courier New", monospace',
|
|
1803
|
+
overflow: "auto"
|
|
1804
|
+
},
|
|
1805
|
+
".cm-content": {
|
|
1806
|
+
padding: "8px 0",
|
|
1807
|
+
caretColor: "#d4d4d4",
|
|
1808
|
+
textAlign: "left"
|
|
1694
1809
|
},
|
|
1695
1810
|
".cm-gutters": {
|
|
1696
|
-
backgroundColor: "#
|
|
1697
|
-
color: "#
|
|
1698
|
-
|
|
1811
|
+
backgroundColor: "#252526",
|
|
1812
|
+
color: "#858585",
|
|
1813
|
+
borderRight: "1px solid #404040"
|
|
1814
|
+
},
|
|
1815
|
+
".cm-lineNumbers": {
|
|
1816
|
+
minWidth: "40px"
|
|
1817
|
+
},
|
|
1818
|
+
".cm-lineNumbers .cm-gutterElement": {
|
|
1819
|
+
padding: "0 8px 0 4px",
|
|
1820
|
+
textAlign: "right",
|
|
1821
|
+
fontSize: "12px"
|
|
1699
1822
|
},
|
|
1700
1823
|
".cm-activeLine": {
|
|
1701
1824
|
backgroundColor: "rgba(255, 255, 255, 0.07)"
|
|
@@ -1704,7 +1827,7 @@ const po = [Hn(), Kn()], Xr = te.theme({
|
|
|
1704
1827
|
backgroundColor: "rgba(255, 255, 255, 0.07)"
|
|
1705
1828
|
},
|
|
1706
1829
|
".cm-selectionMatch": {
|
|
1707
|
-
backgroundColor: "rgba(255, 255, 255, 0.
|
|
1830
|
+
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
1708
1831
|
},
|
|
1709
1832
|
"&.cm-focused .cm-cursor": {
|
|
1710
1833
|
borderLeftColor: "#d4d4d4"
|
|
@@ -1712,53 +1835,53 @@ const po = [Hn(), Kn()], Xr = te.theme({
|
|
|
1712
1835
|
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
1713
1836
|
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
1714
1837
|
}
|
|
1715
|
-
});
|
|
1716
|
-
function
|
|
1838
|
+
}), pt(di)];
|
|
1839
|
+
function mi(e) {
|
|
1717
1840
|
switch (e) {
|
|
1718
1841
|
case "light":
|
|
1719
|
-
return
|
|
1842
|
+
return Fr;
|
|
1720
1843
|
case "dark":
|
|
1721
|
-
return
|
|
1844
|
+
return pi;
|
|
1722
1845
|
default:
|
|
1723
|
-
return
|
|
1846
|
+
return Fr;
|
|
1724
1847
|
}
|
|
1725
1848
|
}
|
|
1726
|
-
const
|
|
1727
|
-
const
|
|
1849
|
+
const Lr = (e) => {
|
|
1850
|
+
const t = {
|
|
1728
1851
|
value: "",
|
|
1729
1852
|
readOnlyRanges: []
|
|
1730
1853
|
};
|
|
1731
|
-
let
|
|
1732
|
-
return e.forEach((
|
|
1854
|
+
let r = 0;
|
|
1855
|
+
return e.forEach((n) => {
|
|
1733
1856
|
const {
|
|
1734
|
-
content:
|
|
1857
|
+
content: o,
|
|
1735
1858
|
editable: i
|
|
1736
|
-
} =
|
|
1737
|
-
`),
|
|
1738
|
-
|
|
1739
|
-
start:
|
|
1740
|
-
end:
|
|
1741
|
-
}),
|
|
1742
|
-
}),
|
|
1743
|
-
},
|
|
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({
|
|
1744
1867
|
create() {
|
|
1745
|
-
return
|
|
1868
|
+
return Q.none;
|
|
1746
1869
|
},
|
|
1747
|
-
update(e,
|
|
1748
|
-
e = e.map(
|
|
1749
|
-
for (const
|
|
1750
|
-
if (
|
|
1751
|
-
return console.log(2939),
|
|
1752
|
-
return
|
|
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;
|
|
1753
1876
|
},
|
|
1754
1877
|
provide(e) {
|
|
1755
|
-
return
|
|
1878
|
+
return V.decorations.from(e);
|
|
1756
1879
|
}
|
|
1757
1880
|
});
|
|
1758
|
-
function
|
|
1759
|
-
const
|
|
1760
|
-
return console.log(e, 9999299), e.forEach((
|
|
1761
|
-
|
|
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({
|
|
1762
1885
|
inclusive: !0,
|
|
1763
1886
|
attributes: {
|
|
1764
1887
|
class: "cm-readOnly",
|
|
@@ -1766,451 +1889,1546 @@ function gt(e) {
|
|
|
1766
1889
|
},
|
|
1767
1890
|
// 设置较低的优先级,确保语法高亮装饰可以覆盖
|
|
1768
1891
|
priority: -100
|
|
1769
|
-
}).range(
|
|
1770
|
-
}),
|
|
1892
|
+
}).range(r.start, r.end));
|
|
1893
|
+
}), Q.set(t);
|
|
1771
1894
|
}
|
|
1772
|
-
const
|
|
1773
|
-
function
|
|
1774
|
-
let
|
|
1775
|
-
...
|
|
1895
|
+
const Xt = /* @__PURE__ */ new WeakMap();
|
|
1896
|
+
function gi(e) {
|
|
1897
|
+
let t = e.map((r) => ({
|
|
1898
|
+
...r
|
|
1776
1899
|
}));
|
|
1777
1900
|
return [
|
|
1778
1901
|
// 添加状态字段
|
|
1779
|
-
|
|
1902
|
+
Nr.init(() => dn(t)),
|
|
1780
1903
|
// 添加按键映射,专门处理回车键
|
|
1781
|
-
|
|
1904
|
+
we.of([{
|
|
1782
1905
|
key: "Enter",
|
|
1783
|
-
run: (
|
|
1784
|
-
const
|
|
1785
|
-
from:
|
|
1906
|
+
run: (r) => {
|
|
1907
|
+
const n = r.state.selection.main, {
|
|
1908
|
+
from: o,
|
|
1786
1909
|
to: i
|
|
1787
|
-
} =
|
|
1788
|
-
if (
|
|
1789
|
-
for (const
|
|
1790
|
-
if (
|
|
1910
|
+
} = n;
|
|
1911
|
+
if (o !== i) {
|
|
1912
|
+
for (const c of t)
|
|
1913
|
+
if (o < c.end && i > c.start)
|
|
1791
1914
|
return !1;
|
|
1792
1915
|
}
|
|
1793
|
-
let
|
|
1794
|
-
for (const
|
|
1795
|
-
if (
|
|
1796
|
-
|
|
1916
|
+
let a = !1;
|
|
1917
|
+
for (const c of t)
|
|
1918
|
+
if (o > c.start && o < c.end) {
|
|
1919
|
+
a = !0;
|
|
1797
1920
|
break;
|
|
1798
1921
|
}
|
|
1799
|
-
return
|
|
1922
|
+
return a ? !1 : (r.dispatch({
|
|
1800
1923
|
changes: {
|
|
1801
|
-
from:
|
|
1924
|
+
from: o,
|
|
1802
1925
|
to: i,
|
|
1803
1926
|
insert: `
|
|
1804
1927
|
`
|
|
1805
1928
|
},
|
|
1806
1929
|
selection: {
|
|
1807
|
-
anchor:
|
|
1930
|
+
anchor: o + 1
|
|
1808
1931
|
}
|
|
1809
1932
|
}), !0);
|
|
1810
1933
|
}
|
|
1811
1934
|
}]),
|
|
1812
1935
|
// 添加事务过滤器,阻止只读区域的编辑
|
|
1813
|
-
|
|
1814
|
-
if (!
|
|
1815
|
-
return
|
|
1816
|
-
let
|
|
1817
|
-
return
|
|
1818
|
-
if (!(
|
|
1819
|
-
` &&
|
|
1820
|
-
for (const
|
|
1821
|
-
if (
|
|
1822
|
-
if (
|
|
1823
|
-
|
|
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;
|
|
1824
1947
|
break;
|
|
1825
1948
|
}
|
|
1826
1949
|
} else if (
|
|
1827
1950
|
// 删除或替换操作
|
|
1828
|
-
|
|
1829
|
-
|
|
1951
|
+
o < f.end && i > f.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
|
|
1952
|
+
o === f.start && i > o || i === f.end && o < i
|
|
1830
1953
|
) {
|
|
1831
|
-
|
|
1954
|
+
n = !0;
|
|
1832
1955
|
break;
|
|
1833
1956
|
}
|
|
1834
1957
|
}
|
|
1835
|
-
}),
|
|
1958
|
+
}), n ? [] : r;
|
|
1836
1959
|
}),
|
|
1837
1960
|
// 动态更新只读区域的装饰
|
|
1838
|
-
|
|
1839
|
-
if (
|
|
1840
|
-
const
|
|
1841
|
-
!
|
|
1842
|
-
effects:
|
|
1843
|
-
})) :
|
|
1844
|
-
effects:
|
|
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)
|
|
1845
1968
|
});
|
|
1846
1969
|
}
|
|
1847
1970
|
}),
|
|
1848
1971
|
// 添加一个延迟执行的额外更新,以确保在文档变化后能重新计算语法高亮
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1972
|
+
V.updateListener.of((r) => {
|
|
1973
|
+
r.docChanged && setTimeout(() => {
|
|
1974
|
+
r.view.state.field(Nr, !1) && r.view.dispatch({});
|
|
1852
1975
|
}, 10);
|
|
1853
1976
|
})
|
|
1854
1977
|
];
|
|
1855
1978
|
}
|
|
1856
|
-
function
|
|
1857
|
-
if (e.length !==
|
|
1979
|
+
function vi(e, t) {
|
|
1980
|
+
if (e.length !== t.length)
|
|
1858
1981
|
return !1;
|
|
1859
|
-
for (let
|
|
1860
|
-
if (e[
|
|
1982
|
+
for (let r = 0; r < e.length; r++)
|
|
1983
|
+
if (e[r].start !== t[r].start || e[r].end !== t[r].end)
|
|
1861
1984
|
return !1;
|
|
1862
1985
|
return !0;
|
|
1863
1986
|
}
|
|
1864
|
-
function
|
|
1865
|
-
var
|
|
1866
|
-
if (!
|
|
1987
|
+
function yi(e, t) {
|
|
1988
|
+
var o;
|
|
1989
|
+
if (!t.docChanged)
|
|
1867
1990
|
return e;
|
|
1868
|
-
let
|
|
1869
|
-
const
|
|
1870
|
-
const
|
|
1991
|
+
let r = !1;
|
|
1992
|
+
const n = e.map((i) => {
|
|
1993
|
+
const a = {
|
|
1871
1994
|
...i
|
|
1872
1995
|
};
|
|
1873
|
-
return
|
|
1874
|
-
const
|
|
1875
|
-
if (
|
|
1876
|
-
|
|
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;
|
|
1877
2000
|
return;
|
|
1878
2001
|
}
|
|
1879
|
-
if (
|
|
1880
|
-
|
|
1881
|
-
else if (
|
|
1882
|
-
|
|
1883
|
-
else if (!(
|
|
1884
|
-
if (
|
|
1885
|
-
const
|
|
1886
|
-
|
|
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);
|
|
1887
2010
|
}
|
|
1888
2011
|
}
|
|
1889
|
-
}),
|
|
2012
|
+
}), a;
|
|
1890
2013
|
});
|
|
1891
|
-
if (
|
|
1892
|
-
const i = ((
|
|
1893
|
-
let
|
|
1894
|
-
for (let
|
|
1895
|
-
|
|
1896
|
-
|
|
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);
|
|
1897
2020
|
}
|
|
1898
|
-
return
|
|
2021
|
+
return n.filter((i) => i.start < i.end);
|
|
1899
2022
|
}
|
|
1900
|
-
function
|
|
1901
|
-
return
|
|
2023
|
+
function bi(e) {
|
|
2024
|
+
return Xt.get(e) || [];
|
|
1902
2025
|
}
|
|
1903
|
-
function
|
|
1904
|
-
const
|
|
1905
|
-
...
|
|
2026
|
+
function ye(e, t) {
|
|
2027
|
+
const r = t.map((n) => ({
|
|
2028
|
+
...n
|
|
1906
2029
|
}));
|
|
1907
|
-
|
|
1908
|
-
effects:
|
|
2030
|
+
Xt.set(e, r), e.dispatch({
|
|
2031
|
+
effects: gt.of(r)
|
|
1909
2032
|
}), setTimeout(() => {
|
|
1910
2033
|
e.dom && document.contains(e.dom) && e.dispatch({});
|
|
1911
2034
|
}, 10);
|
|
1912
2035
|
}
|
|
1913
|
-
|
|
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 = ({
|
|
1914
3056
|
value: e,
|
|
1915
|
-
onChange:
|
|
1916
|
-
extensions:
|
|
1917
|
-
height:
|
|
1918
|
-
disabled:
|
|
3057
|
+
onChange: t,
|
|
3058
|
+
extensions: r = [],
|
|
3059
|
+
height: n = "300px",
|
|
3060
|
+
disabled: o = !1,
|
|
1919
3061
|
className: i = "",
|
|
1920
|
-
style:
|
|
1921
|
-
placeholder:
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
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) : [],
|
|
3081
|
+
// 行号功能,根据配置决定是否启用
|
|
3082
|
+
l ? xr() : [],
|
|
3083
|
+
V.updateListener.of((g) => {
|
|
3084
|
+
if (g.docChanged && t) {
|
|
3085
|
+
const S = {
|
|
3086
|
+
value: g.state.doc.toString(),
|
|
3087
|
+
readOnlyRanges: []
|
|
3088
|
+
// 基础编辑器没有只读区域逻辑,由特定编辑器实现
|
|
3089
|
+
};
|
|
3090
|
+
t(S);
|
|
3091
|
+
}
|
|
3092
|
+
})
|
|
3093
|
+
];
|
|
3094
|
+
o && R.push(be.readOnly.of(!0));
|
|
3095
|
+
const m = be.create({
|
|
1939
3096
|
doc: e,
|
|
1940
|
-
extensions: [...
|
|
1941
|
-
}),
|
|
1942
|
-
state:
|
|
1943
|
-
parent:
|
|
3097
|
+
extensions: [...R, ...r]
|
|
3098
|
+
}), x = new V({
|
|
3099
|
+
state: m,
|
|
3100
|
+
parent: C.current
|
|
1944
3101
|
});
|
|
1945
|
-
return
|
|
1946
|
-
var
|
|
1947
|
-
(
|
|
3102
|
+
return v.current = x, h && h(x), () => {
|
|
3103
|
+
var g;
|
|
3104
|
+
(g = v.current) == null || g.destroy();
|
|
1948
3105
|
};
|
|
1949
|
-
}, []),
|
|
1950
|
-
|
|
3106
|
+
}, []), ge(() => {
|
|
3107
|
+
v.current && e !== v.current.state.doc.toString() && v.current.dispatch({
|
|
1951
3108
|
changes: {
|
|
1952
3109
|
from: 0,
|
|
1953
|
-
to:
|
|
3110
|
+
to: v.current.state.doc.length,
|
|
1954
3111
|
insert: e
|
|
1955
3112
|
}
|
|
1956
3113
|
});
|
|
1957
|
-
}, [e]),
|
|
1958
|
-
if (!
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
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) : [],
|
|
3128
|
+
// 行号功能,根据配置决定是否启用
|
|
3129
|
+
l ? xr() : [],
|
|
3130
|
+
V.updateListener.of((S) => {
|
|
3131
|
+
if (S.docChanged && t) {
|
|
3132
|
+
const _ = {
|
|
3133
|
+
value: S.state.doc.toString(),
|
|
3134
|
+
readOnlyRanges: []
|
|
3135
|
+
// 基础编辑器没有只读区域逻辑,由特定编辑器实现
|
|
3136
|
+
};
|
|
3137
|
+
t(_);
|
|
3138
|
+
}
|
|
3139
|
+
})
|
|
3140
|
+
];
|
|
3141
|
+
o && m.push(be.readOnly.of(!0));
|
|
3142
|
+
const x = be.create({
|
|
3143
|
+
doc: R,
|
|
3144
|
+
extensions: [...m, ...r]
|
|
3145
|
+
}), g = new V({
|
|
3146
|
+
state: x,
|
|
3147
|
+
parent: C.current
|
|
1978
3148
|
});
|
|
1979
|
-
|
|
1980
|
-
}, [
|
|
1981
|
-
|
|
1982
|
-
|
|
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
|
|
1983
3185
|
} });
|
|
1984
|
-
},
|
|
1985
|
-
value: e,
|
|
1986
|
-
onChange: r,
|
|
1987
|
-
language: n = "json",
|
|
1988
|
-
extensions: o = [],
|
|
1989
|
-
theme: a = "light",
|
|
1990
|
-
...i
|
|
1991
|
-
}) => {
|
|
1992
|
-
const c = vr(() => {
|
|
1993
|
-
const s = zn(n) ? Jn(n) : [], d = Zn(a);
|
|
1994
|
-
return [s, d, ...o];
|
|
1995
|
-
}, [n, o, a]);
|
|
1996
|
-
return /* @__PURE__ */ Ze(Sr, { value: e, onChange: r, extensions: c, ...i });
|
|
1997
|
-
}, mo = ({
|
|
3186
|
+
}, or = rt(Bi), Gi = ({
|
|
1998
3187
|
value: e,
|
|
1999
|
-
onChange:
|
|
3188
|
+
onChange: t,
|
|
3189
|
+
language: r = "json",
|
|
2000
3190
|
extensions: n = [],
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
...
|
|
2004
|
-
}) => {
|
|
2005
|
-
const
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
3191
|
+
theme: o = "light",
|
|
3192
|
+
showLineNumbers: i = !0,
|
|
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 = ({
|
|
3201
|
+
value: e,
|
|
3202
|
+
onChange: t,
|
|
3203
|
+
extensions: r = [],
|
|
3204
|
+
readOnlyRanges: n,
|
|
3205
|
+
manageReadOnlyRanges: o = !0,
|
|
3206
|
+
showLineNumbers: i = !0,
|
|
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),
|
|
2014
3218
|
editable: !0
|
|
2015
|
-
}),
|
|
2016
|
-
content:
|
|
3219
|
+
}), b.push({
|
|
3220
|
+
content: v.substring(O.start, O.end),
|
|
2017
3221
|
editable: !1
|
|
2018
|
-
}),
|
|
3222
|
+
}), T = O.end;
|
|
2019
3223
|
}
|
|
2020
|
-
|
|
2021
|
-
content:
|
|
3224
|
+
T < v.length && b.push({
|
|
3225
|
+
content: v.substring(T),
|
|
2022
3226
|
editable: !0
|
|
2023
|
-
}),
|
|
3227
|
+
}), $(b);
|
|
2024
3228
|
}
|
|
2025
|
-
}, [
|
|
2026
|
-
if (
|
|
2027
|
-
const
|
|
2028
|
-
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2031
|
-
}),
|
|
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;
|
|
2032
3236
|
}
|
|
2033
3237
|
}, []);
|
|
2034
|
-
const
|
|
2035
|
-
const
|
|
2036
|
-
return
|
|
2037
|
-
}, [
|
|
2038
|
-
const
|
|
2039
|
-
return
|
|
2040
|
-
}, []),
|
|
2041
|
-
if (!
|
|
2042
|
-
const
|
|
2043
|
-
let
|
|
2044
|
-
for (let
|
|
2045
|
-
const
|
|
2046
|
-
if (!
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2049
|
-
...
|
|
2050
|
-
content:
|
|
2051
|
-
}),
|
|
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);
|
|
2052
3256
|
}
|
|
2053
3257
|
}
|
|
2054
|
-
const
|
|
2055
|
-
return
|
|
2056
|
-
...
|
|
2057
|
-
content:
|
|
2058
|
-
}),
|
|
2059
|
-
}, [
|
|
2060
|
-
let
|
|
2061
|
-
return
|
|
2062
|
-
const
|
|
2063
|
-
|
|
2064
|
-
}),
|
|
2065
|
-
}, []),
|
|
2066
|
-
if (!
|
|
2067
|
-
const
|
|
2068
|
-
let
|
|
2069
|
-
for (const
|
|
2070
|
-
const
|
|
2071
|
-
if (
|
|
2072
|
-
|
|
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({
|
|
2073
3277
|
selection: {
|
|
2074
|
-
anchor:
|
|
2075
|
-
head:
|
|
3278
|
+
anchor: oe,
|
|
3279
|
+
head: oe + G.length
|
|
2076
3280
|
},
|
|
2077
3281
|
scrollIntoView: !1
|
|
2078
|
-
}),
|
|
3282
|
+
}), Y = !0;
|
|
2079
3283
|
break;
|
|
2080
3284
|
}
|
|
2081
3285
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
selection:
|
|
3286
|
+
Y && setTimeout(() => {
|
|
3287
|
+
b.dom && document.contains(b.dom) && b.dispatch({
|
|
3288
|
+
selection: O,
|
|
2085
3289
|
scrollIntoView: !1
|
|
2086
3290
|
});
|
|
2087
3291
|
}, 10);
|
|
2088
|
-
}, []),
|
|
2089
|
-
if (!
|
|
2090
|
-
const
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
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({});
|
|
2094
3298
|
}, 10));
|
|
2095
3299
|
}, 10));
|
|
2096
|
-
}, [
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
}, 10)),
|
|
2101
|
-
const
|
|
2102
|
-
if (
|
|
2103
|
-
const
|
|
2104
|
-
|
|
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);
|
|
2105
3309
|
const {
|
|
2106
|
-
readOnlyRanges:
|
|
2107
|
-
} =
|
|
2108
|
-
|
|
2109
|
-
value:
|
|
2110
|
-
readOnlyRanges:
|
|
3310
|
+
readOnlyRanges: G
|
|
3311
|
+
} = Lr(Y);
|
|
3312
|
+
g(G), m.current && ye(m.current, G), t && t({
|
|
3313
|
+
value: T,
|
|
3314
|
+
readOnlyRanges: G
|
|
2111
3315
|
});
|
|
2112
3316
|
} else
|
|
2113
|
-
|
|
2114
|
-
value:
|
|
2115
|
-
readOnlyRanges:
|
|
3317
|
+
t && t({
|
|
3318
|
+
value: T,
|
|
3319
|
+
readOnlyRanges: O
|
|
2116
3320
|
});
|
|
2117
|
-
}, [
|
|
2118
|
-
|
|
2119
|
-
!
|
|
2120
|
-
}, [
|
|
2121
|
-
if (
|
|
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 && _) {
|
|
2122
3326
|
const {
|
|
2123
|
-
readOnlyRanges:
|
|
2124
|
-
} =
|
|
2125
|
-
JSON.stringify(
|
|
2126
|
-
}
|
|
2127
|
-
}, [
|
|
2128
|
-
|
|
2129
|
-
}, [
|
|
2130
|
-
|
|
2131
|
-
|
|
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();
|
|
2132
3336
|
}, 50), setTimeout(() => {
|
|
2133
|
-
|
|
3337
|
+
Z();
|
|
2134
3338
|
}, 200));
|
|
2135
|
-
}, [
|
|
2136
|
-
const
|
|
2137
|
-
if (
|
|
2138
|
-
|
|
2139
|
-
|
|
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);
|
|
2140
3344
|
}, 10);
|
|
2141
|
-
}, 50)),
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2144
|
-
const
|
|
2145
|
-
|
|
2146
|
-
}),
|
|
2147
|
-
}
|
|
2148
|
-
}, [
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
...a
|
|
2160
|
-
}) => {
|
|
2161
|
-
const i = re((p) => {
|
|
2162
|
-
const u = p.state.doc.toString(), g = [];
|
|
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) => {
|
|
3355
|
+
const {
|
|
3356
|
+
value: r,
|
|
3357
|
+
onChange: n,
|
|
3358
|
+
extensions: o = [],
|
|
3359
|
+
showLineNumbers: i = !0,
|
|
3360
|
+
enableFormatting: a = !1,
|
|
3361
|
+
...c
|
|
3362
|
+
} = e, l = ue(!0), h = ue(null), f = se((g) => {
|
|
2163
3363
|
try {
|
|
2164
|
-
JSON.parse(
|
|
2165
|
-
} catch
|
|
2166
|
-
|
|
2167
|
-
from: 0,
|
|
2168
|
-
to: u.length,
|
|
2169
|
-
message: _.message,
|
|
2170
|
-
severity: "error"
|
|
2171
|
-
});
|
|
3364
|
+
return g === "" || JSON.parse(g), !0;
|
|
3365
|
+
} catch {
|
|
3366
|
+
return !1;
|
|
2172
3367
|
}
|
|
2173
|
-
|
|
2174
|
-
}, []), c = re((p) => {
|
|
3368
|
+
}, []), y = se((g) => {
|
|
2175
3369
|
try {
|
|
2176
|
-
|
|
2177
|
-
|
|
3370
|
+
if (!g.trim()) return "";
|
|
3371
|
+
const S = JSON.parse(g);
|
|
3372
|
+
return JSON.stringify(S, null, 2);
|
|
2178
3373
|
} catch {
|
|
2179
|
-
return
|
|
2180
|
-
}
|
|
2181
|
-
}, []), s = re((p) => {
|
|
2182
|
-
if (r) {
|
|
2183
|
-
if (o) {
|
|
2184
|
-
const u = c(p.value);
|
|
2185
|
-
if (u !== p.value) {
|
|
2186
|
-
r({
|
|
2187
|
-
value: u,
|
|
2188
|
-
readOnlyRanges: p.readOnlyRanges
|
|
2189
|
-
});
|
|
2190
|
-
return;
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
r(p);
|
|
3374
|
+
return g;
|
|
2194
3375
|
}
|
|
2195
|
-
}, [
|
|
2196
|
-
|
|
2197
|
-
|
|
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({
|
|
3381
|
+
changes: {
|
|
3382
|
+
from: 0,
|
|
3383
|
+
to: g.state.doc.length,
|
|
3384
|
+
insert: _
|
|
3385
|
+
}
|
|
3386
|
+
});
|
|
3387
|
+
return g.dispatch($), !0;
|
|
3388
|
+
}, [y]), v = ht(() => we.of([{
|
|
3389
|
+
key: "Alt-f",
|
|
3390
|
+
mac: "Mod-Alt-f",
|
|
3391
|
+
run: () => C()
|
|
3392
|
+
}]), [C]), R = se((g) => {
|
|
3393
|
+
if (n) {
|
|
3394
|
+
const S = f(g.value);
|
|
3395
|
+
l.current = S, n(g);
|
|
3396
|
+
}
|
|
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();
|
|
3400
|
+
}, 0);
|
|
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);
|
|
2198
3404
|
export {
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
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
|
|
2216
3434
|
};
|