storybook 9.0.0-alpha.3 → 9.0.0-alpha.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 +1 -1
- package/dist/actions/decorator.d.ts +6 -0
- package/dist/actions/decorator.js +139 -0
- package/dist/actions/index.cjs +127 -0
- package/dist/actions/index.d.ts +105 -0
- package/dist/actions/index.js +112 -0
- package/dist/actions/manager.js +1196 -0
- package/dist/actions/preview.cjs +165 -0
- package/dist/actions/preview.d.ts +55 -0
- package/dist/actions/preview.js +156 -0
- package/dist/bin/index.cjs +63 -64
- package/dist/bin/index.js +63 -64
- package/dist/channels/index.cjs +207 -230
- package/dist/channels/index.js +302 -304
- package/dist/cli/bin/index.cjs +405 -405
- package/dist/cli/bin/index.js +410 -410
- package/dist/client-logger/index.cjs +56 -88
- package/dist/client-logger/index.js +41 -47
- package/dist/common/index.cjs +65 -67
- package/dist/common/index.d.ts +1 -4
- package/dist/common/index.js +65 -67
- package/dist/components/index.cjs +9413 -11578
- package/dist/components/index.d.ts +92 -92
- package/dist/components/index.js +6768 -7544
- package/dist/core-events/index.d.ts +138 -25
- package/dist/core-server/index.cjs +5241 -5265
- package/dist/core-server/index.js +5353 -5375
- package/dist/core-server/presets/common-manager.js +11 -19
- package/dist/core-server/presets/common-preset.cjs +243 -242
- package/dist/core-server/presets/common-preset.js +379 -378
- package/dist/csf/index.cjs +76 -120
- package/dist/csf/index.d.ts +1 -3
- package/dist/csf/index.js +69 -113
- package/dist/docs-tools/index.cjs +1 -1
- package/dist/docs-tools/index.d.ts +2 -2
- package/dist/docs-tools/index.js +1 -1
- package/dist/instrumenter/index.cjs +1260 -1289
- package/dist/instrumenter/index.js +1344 -1348
- package/dist/manager/globals-module-info.cjs +272 -135
- package/dist/manager/globals-module-info.d.ts +1 -1
- package/dist/manager/globals-module-info.js +257 -120
- package/dist/manager/globals-runtime.js +59553 -22371
- package/dist/manager/globals.cjs +23 -19
- package/dist/manager/globals.d.ts +8 -5
- package/dist/manager/globals.js +10 -6
- package/dist/manager/runtime.js +129 -129
- package/dist/manager-api/index.cjs +1182 -1205
- package/dist/manager-api/index.d.ts +2 -2
- package/dist/manager-api/index.js +1010 -1008
- package/dist/preview/globals.cjs +21 -17
- package/dist/preview/globals.d.ts +4 -1
- package/dist/preview/globals.js +6 -2
- package/dist/preview/runtime.js +43946 -6546
- package/dist/preview-api/index.cjs +1243 -1239
- package/dist/preview-api/index.d.ts +104 -60
- package/dist/preview-api/index.js +1310 -1270
- package/dist/router/index.cjs +847 -871
- package/dist/router/index.js +193 -199
- package/dist/test/index.cjs +10068 -10205
- package/dist/test/index.d.ts +4 -4
- package/dist/test/index.js +9741 -9623
- package/dist/test/preview.cjs +15870 -0
- package/dist/test/preview.d.ts +54 -0
- package/dist/test/preview.js +14441 -0
- package/dist/test/spy.cjs +258 -0
- package/dist/test/spy.d.ts +66 -0
- package/dist/test/spy.js +240 -0
- package/dist/theming/create.cjs +79 -2269
- package/dist/theming/create.js +67 -841
- package/dist/theming/index.cjs +1065 -3232
- package/dist/theming/index.js +951 -1719
- package/dist/types/index.d.ts +242 -242
- package/package.json +134 -3
|
@@ -1,67 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var gr = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), hr = (t, e) => {
|
|
2
|
+
var Tt = Object.defineProperty;
|
|
3
|
+
var or = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var sr = Object.getOwnPropertyNames;
|
|
5
|
+
var ir = Object.prototype.hasOwnProperty;
|
|
6
|
+
var c = (t, e) => Tt(t, "name", { value: e, configurable: !0 });
|
|
7
|
+
var cr = (t, e) => {
|
|
9
8
|
for (var n in e)
|
|
10
|
-
|
|
11
|
-
},
|
|
9
|
+
Tt(t, n, { get: e[n], enumerable: !0 });
|
|
10
|
+
}, ur = (t, e, n, r) => {
|
|
12
11
|
if (e && typeof e == "object" || typeof e == "function")
|
|
13
|
-
for (let o of
|
|
14
|
-
!
|
|
12
|
+
for (let o of sr(e))
|
|
13
|
+
!ir.call(t, o) && o !== n && Tt(t, o, { get: () => e[o], enumerable: !(r = or(e, o)) || r.enumerable });
|
|
15
14
|
return t;
|
|
16
15
|
};
|
|
17
|
-
var
|
|
18
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
-
e || !t || !t.__esModule ? Et(n, "default", { value: t, enumerable: !0 }) : n,
|
|
23
|
-
t
|
|
24
|
-
)), dr = (t) => Pe(Et({}, "__esModule", { value: !0 }), t);
|
|
25
|
-
|
|
26
|
-
// ../node_modules/@storybook/global/dist/index.js
|
|
27
|
-
var xe = gr((ri, Le) => {
|
|
28
|
-
"use strict";
|
|
29
|
-
var Ht = Object.defineProperty, br = Object.getOwnPropertyDescriptor, Sr = Object.getOwnPropertyNames, _r = Object.prototype.hasOwnProperty,
|
|
30
|
-
Er = /* @__PURE__ */ i((t, e) => {
|
|
31
|
-
for (var n in e)
|
|
32
|
-
Ht(t, n, { get: e[n], enumerable: !0 });
|
|
33
|
-
}, "__export"), Or = /* @__PURE__ */ i((t, e, n, r) => {
|
|
34
|
-
if (e && typeof e == "object" || typeof e == "function")
|
|
35
|
-
for (let o of Sr(e))
|
|
36
|
-
!_r.call(t, o) && o !== n && Ht(t, o, { get: /* @__PURE__ */ i(() => e[o], "get"), enumerable: !(r = br(e, o)) || r.enumerable });
|
|
37
|
-
return t;
|
|
38
|
-
}, "__copyProps"), wr = /* @__PURE__ */ i((t) => Or(Ht({}, "__esModule", { value: !0 }), t), "__toCommonJS"), Me = {};
|
|
39
|
-
Er(Me, {
|
|
40
|
-
global: /* @__PURE__ */ i(() => Cr, "global")
|
|
41
|
-
});
|
|
42
|
-
Le.exports = wr(Me);
|
|
43
|
-
var Cr = (() => {
|
|
44
|
-
let t;
|
|
45
|
-
return typeof window < "u" ? t = window : typeof globalThis < "u" ? t = globalThis : typeof global < "u" ? t = global : typeof self < "u" ?
|
|
46
|
-
t = self : t = {}, t;
|
|
47
|
-
})();
|
|
48
|
-
});
|
|
16
|
+
var lr = (t) => ur(Tt({}, "__esModule", { value: !0 }), t);
|
|
49
17
|
|
|
50
18
|
// src/instrumenter/index.ts
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
CallStates: () =>
|
|
19
|
+
var zs = {};
|
|
20
|
+
cr(zs, {
|
|
21
|
+
CallStates: () => Zn,
|
|
54
22
|
EVENTS: () => nt,
|
|
55
|
-
instrument: () =>
|
|
23
|
+
instrument: () => nr
|
|
56
24
|
});
|
|
57
|
-
module.exports =
|
|
25
|
+
module.exports = lr(zs);
|
|
58
26
|
|
|
59
27
|
// src/instrumenter/instrumenter.ts
|
|
60
|
-
var
|
|
61
|
-
U = yr(xe(), 1);
|
|
28
|
+
var er = require("storybook/internal/client-logger"), gt = require("storybook/internal/core-events"), U = require("@storybook/global");
|
|
62
29
|
|
|
63
30
|
// ../node_modules/@vitest/utils/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
|
|
64
|
-
var
|
|
31
|
+
var ar = {
|
|
65
32
|
reset: [0, 0],
|
|
66
33
|
bold: [1, 22, "\x1B[22m\x1B[1m"],
|
|
67
34
|
dim: [2, 22, "\x1B[22m\x1B[2m"],
|
|
@@ -103,147 +70,147 @@ var $r = {
|
|
|
103
70
|
bgMagentaBright: [105, 49],
|
|
104
71
|
bgCyanBright: [106, 49],
|
|
105
72
|
bgWhiteBright: [107, 49]
|
|
106
|
-
},
|
|
73
|
+
}, fr = Object.entries(ar);
|
|
107
74
|
function Jt(t) {
|
|
108
75
|
return String(t);
|
|
109
76
|
}
|
|
110
|
-
|
|
77
|
+
c(Jt, "a");
|
|
111
78
|
Jt.open = "";
|
|
112
79
|
Jt.close = "";
|
|
113
|
-
function
|
|
80
|
+
function Pe(t = !1) {
|
|
114
81
|
let e = typeof process < "u" ? process : void 0, n = e?.env || {}, r = e?.argv || [];
|
|
115
82
|
return !("NO_COLOR" in n || r.includes("--no-color")) && ("FORCE_COLOR" in n || r.includes("--color") || e?.platform === "win32" || t && n.
|
|
116
83
|
TERM !== "dumb" || "CI" in n) || typeof window < "u" && !!window.chrome;
|
|
117
84
|
}
|
|
118
|
-
|
|
119
|
-
function
|
|
120
|
-
let e =
|
|
121
|
-
let
|
|
85
|
+
c(Pe, "C");
|
|
86
|
+
function Me(t = !1) {
|
|
87
|
+
let e = Pe(t), n = /* @__PURE__ */ c((i, l, u, f) => {
|
|
88
|
+
let m = "", a = 0;
|
|
122
89
|
do
|
|
123
|
-
|
|
90
|
+
m += i.substring(a, f) + u, a = f + l.length, f = i.indexOf(l, a);
|
|
124
91
|
while (~f);
|
|
125
|
-
return
|
|
126
|
-
}, "i"), r = /* @__PURE__ */
|
|
127
|
-
let f = /* @__PURE__ */
|
|
128
|
-
let a = String(
|
|
129
|
-
return ~
|
|
92
|
+
return m + i.substring(a);
|
|
93
|
+
}, "i"), r = /* @__PURE__ */ c((i, l, u = i) => {
|
|
94
|
+
let f = /* @__PURE__ */ c((m) => {
|
|
95
|
+
let a = String(m), S = a.indexOf(l, i.length);
|
|
96
|
+
return ~S ? i + n(a, l, u, S) + l : i + a + l;
|
|
130
97
|
}, "o");
|
|
131
|
-
return f.open =
|
|
98
|
+
return f.open = i, f.close = l, f;
|
|
132
99
|
}, "g"), o = {
|
|
133
100
|
isColorSupported: e
|
|
134
|
-
}, s = /* @__PURE__ */
|
|
135
|
-
for (let [
|
|
136
|
-
o[
|
|
137
|
-
s(
|
|
138
|
-
s(
|
|
139
|
-
|
|
101
|
+
}, s = /* @__PURE__ */ c((i) => `\x1B[${i}m`, "d");
|
|
102
|
+
for (let [i, l] of fr)
|
|
103
|
+
o[i] = e ? r(
|
|
104
|
+
s(l[0]),
|
|
105
|
+
s(l[1]),
|
|
106
|
+
l[2]
|
|
140
107
|
) : Jt;
|
|
141
108
|
return o;
|
|
142
109
|
}
|
|
143
|
-
|
|
110
|
+
c(Me, "p");
|
|
144
111
|
|
|
145
112
|
// ../node_modules/@vitest/utils/node_modules/tinyrainbow/dist/node.js
|
|
146
|
-
var
|
|
113
|
+
var Le = require("tty"), v = Me((0, Le.isatty)(1));
|
|
147
114
|
|
|
148
115
|
// ../node_modules/@vitest/utils/node_modules/@vitest/pretty-format/dist/index.js
|
|
149
|
-
function
|
|
116
|
+
function mr(t, e) {
|
|
150
117
|
let n = Object.keys(t), r = e === null ? n : n.sort(e);
|
|
151
118
|
if (Object.getOwnPropertySymbols)
|
|
152
119
|
for (let o of Object.getOwnPropertySymbols(t))
|
|
153
120
|
Object.getOwnPropertyDescriptor(t, o).enumerable && r.push(o);
|
|
154
121
|
return r;
|
|
155
122
|
}
|
|
156
|
-
|
|
157
|
-
function Pt(t, e, n, r, o, s,
|
|
158
|
-
let
|
|
123
|
+
c(mr, "getKeysOfEnumerableProperties");
|
|
124
|
+
function Pt(t, e, n, r, o, s, i = ": ") {
|
|
125
|
+
let l = "", u = 0, f = t.next();
|
|
159
126
|
if (!f.done) {
|
|
160
|
-
|
|
161
|
-
let
|
|
127
|
+
l += e.spacingOuter;
|
|
128
|
+
let m = n + e.indent;
|
|
162
129
|
for (; !f.done; ) {
|
|
163
|
-
if (
|
|
164
|
-
|
|
130
|
+
if (l += m, u++ === e.maxWidth) {
|
|
131
|
+
l += "\u2026";
|
|
165
132
|
break;
|
|
166
133
|
}
|
|
167
134
|
let a = s(
|
|
168
135
|
f.value[0],
|
|
169
136
|
e,
|
|
170
|
-
|
|
137
|
+
m,
|
|
171
138
|
r,
|
|
172
139
|
o
|
|
173
|
-
),
|
|
140
|
+
), S = s(
|
|
174
141
|
f.value[1],
|
|
175
142
|
e,
|
|
176
|
-
|
|
143
|
+
m,
|
|
177
144
|
r,
|
|
178
145
|
o
|
|
179
146
|
);
|
|
180
|
-
|
|
147
|
+
l += a + i + S, f = t.next(), f.done ? e.min || (l += ",") : l += `,${e.spacingInner}`;
|
|
181
148
|
}
|
|
182
|
-
|
|
149
|
+
l += e.spacingOuter + n;
|
|
183
150
|
}
|
|
184
|
-
return
|
|
151
|
+
return l;
|
|
185
152
|
}
|
|
186
|
-
|
|
153
|
+
c(Pt, "printIteratorEntries");
|
|
187
154
|
function vt(t, e, n, r, o, s) {
|
|
188
|
-
let
|
|
189
|
-
if (!
|
|
190
|
-
|
|
155
|
+
let i = "", l = 0, u = t.next();
|
|
156
|
+
if (!u.done) {
|
|
157
|
+
i += e.spacingOuter;
|
|
191
158
|
let f = n + e.indent;
|
|
192
|
-
for (; !
|
|
193
|
-
if (
|
|
194
|
-
|
|
159
|
+
for (; !u.done; ) {
|
|
160
|
+
if (i += f, l++ === e.maxWidth) {
|
|
161
|
+
i += "\u2026";
|
|
195
162
|
break;
|
|
196
163
|
}
|
|
197
|
-
|
|
164
|
+
i += s(u.value, e, f, r, o), u = t.next(), u.done ? e.min || (i += ",") : i += `,${e.spacingInner}`;
|
|
198
165
|
}
|
|
199
|
-
|
|
166
|
+
i += e.spacingOuter + n;
|
|
200
167
|
}
|
|
201
|
-
return
|
|
168
|
+
return i;
|
|
202
169
|
}
|
|
203
|
-
|
|
170
|
+
c(vt, "printIteratorValues");
|
|
204
171
|
function It(t, e, n, r, o, s) {
|
|
205
|
-
let
|
|
172
|
+
let i = "";
|
|
206
173
|
t = t instanceof ArrayBuffer ? new DataView(t) : t;
|
|
207
|
-
let
|
|
208
|
-
if (
|
|
209
|
-
|
|
174
|
+
let l = /* @__PURE__ */ c((f) => f instanceof DataView, "isDataView"), u = l(t) ? t.byteLength : t.length;
|
|
175
|
+
if (u > 0) {
|
|
176
|
+
i += e.spacingOuter;
|
|
210
177
|
let f = n + e.indent;
|
|
211
|
-
for (let
|
|
212
|
-
if (
|
|
213
|
-
|
|
178
|
+
for (let m = 0; m < u; m++) {
|
|
179
|
+
if (i += f, m === e.maxWidth) {
|
|
180
|
+
i += "\u2026";
|
|
214
181
|
break;
|
|
215
182
|
}
|
|
216
|
-
(
|
|
217
|
-
|
|
183
|
+
(l(t) || m in t) && (i += s(
|
|
184
|
+
l(t) ? t.getInt8(m) : t[m],
|
|
218
185
|
e,
|
|
219
186
|
f,
|
|
220
187
|
r,
|
|
221
188
|
o
|
|
222
|
-
)),
|
|
189
|
+
)), m < u - 1 ? i += `,${e.spacingInner}` : e.min || (i += ",");
|
|
223
190
|
}
|
|
224
|
-
|
|
191
|
+
i += e.spacingOuter + n;
|
|
225
192
|
}
|
|
226
|
-
return
|
|
193
|
+
return i;
|
|
227
194
|
}
|
|
228
|
-
|
|
195
|
+
c(It, "printListItems");
|
|
229
196
|
function te(t, e, n, r, o, s) {
|
|
230
|
-
let
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
let
|
|
234
|
-
for (let f = 0; f <
|
|
235
|
-
let
|
|
236
|
-
|
|
197
|
+
let i = "", l = mr(t, e.compareKeys);
|
|
198
|
+
if (l.length > 0) {
|
|
199
|
+
i += e.spacingOuter;
|
|
200
|
+
let u = n + e.indent;
|
|
201
|
+
for (let f = 0; f < l.length; f++) {
|
|
202
|
+
let m = l[f], a = s(m, e, u, r, o), S = s(t[m], e, u, r, o);
|
|
203
|
+
i += `${u + a}: ${S}`, f < l.length - 1 ? i += `,${e.spacingInner}` : e.min || (i += ",");
|
|
237
204
|
}
|
|
238
|
-
|
|
205
|
+
i += e.spacingOuter + n;
|
|
239
206
|
}
|
|
240
|
-
return
|
|
207
|
+
return i;
|
|
241
208
|
}
|
|
242
|
-
|
|
243
|
-
var
|
|
244
|
-
let
|
|
245
|
-
if (
|
|
246
|
-
return ++r > e.maxDepth ? `[${
|
|
209
|
+
c(te, "printObjectProperties");
|
|
210
|
+
var pr = typeof Symbol == "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621, At = " ", gr = /* @__PURE__ */ c((t, e, n, r, o, s) => {
|
|
211
|
+
let i = t.toString();
|
|
212
|
+
if (i === "ArrayContaining" || i === "ArrayNotContaining")
|
|
213
|
+
return ++r > e.maxDepth ? `[${i}]` : `${i + At}[${It(
|
|
247
214
|
t.sample,
|
|
248
215
|
e,
|
|
249
216
|
n,
|
|
@@ -251,8 +218,8 @@ var Nr = typeof Symbol == "function" && Symbol.for ? Symbol.for("jest.asymmetric
|
|
|
251
218
|
o,
|
|
252
219
|
s
|
|
253
220
|
)}]`;
|
|
254
|
-
if (
|
|
255
|
-
return ++r > e.maxDepth ? `[${
|
|
221
|
+
if (i === "ObjectContaining" || i === "ObjectNotContaining")
|
|
222
|
+
return ++r > e.maxDepth ? `[${i}]` : `${i + At}{${te(
|
|
256
223
|
t.sample,
|
|
257
224
|
e,
|
|
258
225
|
n,
|
|
@@ -260,29 +227,29 @@ var Nr = typeof Symbol == "function" && Symbol.for ? Symbol.for("jest.asymmetric
|
|
|
260
227
|
o,
|
|
261
228
|
s
|
|
262
229
|
)}}`;
|
|
263
|
-
if (
|
|
264
|
-
return
|
|
230
|
+
if (i === "StringMatching" || i === "StringNotMatching" || i === "StringContaining" || i === "StringNotContaining")
|
|
231
|
+
return i + At + s(t.sample, e, n, r, o);
|
|
265
232
|
if (typeof t.toAsymmetricMatcher != "function")
|
|
266
233
|
throw new TypeError(
|
|
267
234
|
`Asymmetric matcher ${t.constructor.name} does not implement toAsymmetricMatcher()`
|
|
268
235
|
);
|
|
269
236
|
return t.toAsymmetricMatcher();
|
|
270
|
-
}, "serialize$5"),
|
|
271
|
-
["DOMStringMap", "NamedNodeMap"]),
|
|
272
|
-
function
|
|
273
|
-
return
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
var
|
|
277
|
-
function
|
|
237
|
+
}, "serialize$5"), hr = /* @__PURE__ */ c((t) => t && t.$$typeof === pr, "test$5"), yr = { serialize: gr, test: hr }, dr = " ", Ke = /* @__PURE__ */ new Set(
|
|
238
|
+
["DOMStringMap", "NamedNodeMap"]), br = /^(?:HTML\w*Collection|NodeList)$/;
|
|
239
|
+
function Sr(t) {
|
|
240
|
+
return Ke.has(t) || br.test(t);
|
|
241
|
+
}
|
|
242
|
+
c(Sr, "testName");
|
|
243
|
+
var _r = /* @__PURE__ */ c((t) => t && t.constructor && !!t.constructor.name && Sr(t.constructor.name), "test$4");
|
|
244
|
+
function Er(t) {
|
|
278
245
|
return t.constructor.name === "NamedNodeMap";
|
|
279
246
|
}
|
|
280
|
-
|
|
281
|
-
var
|
|
282
|
-
let
|
|
283
|
-
return ++r > e.maxDepth ? `[${
|
|
284
|
-
|
|
285
|
-
(
|
|
247
|
+
c(Er, "isNamedNodeMap");
|
|
248
|
+
var Or = /* @__PURE__ */ c((t, e, n, r, o, s) => {
|
|
249
|
+
let i = t.constructor.name;
|
|
250
|
+
return ++r > e.maxDepth ? `[${i}]` : (e.min ? "" : i + dr) + (Ke.has(i) ? `{${te(
|
|
251
|
+
Er(t) ? [...t].reduce(
|
|
252
|
+
(l, u) => (l[u.name] = u.value, l),
|
|
286
253
|
{}
|
|
287
254
|
) : { ...t },
|
|
288
255
|
e,
|
|
@@ -298,90 +265,90 @@ var Fr = /* @__PURE__ */ i((t, e, n, r, o, s) => {
|
|
|
298
265
|
o,
|
|
299
266
|
s
|
|
300
267
|
)}]`);
|
|
301
|
-
}, "serialize$4"),
|
|
302
|
-
function
|
|
268
|
+
}, "serialize$4"), Cr = { serialize: Or, test: _r };
|
|
269
|
+
function qe(t) {
|
|
303
270
|
return t.replaceAll("<", "<").replaceAll(">", ">");
|
|
304
271
|
}
|
|
305
|
-
|
|
306
|
-
function ee(t, e, n, r, o, s,
|
|
307
|
-
let
|
|
272
|
+
c(qe, "escapeHTML");
|
|
273
|
+
function ee(t, e, n, r, o, s, i) {
|
|
274
|
+
let l = r + n.indent, u = n.colors;
|
|
308
275
|
return t.map((f) => {
|
|
309
|
-
let
|
|
310
|
-
return typeof
|
|
311
|
-
`) && (a = n.spacingOuter +
|
|
276
|
+
let m = e[f], a = i(m, n, l, o, s);
|
|
277
|
+
return typeof m != "string" && (a.includes(`
|
|
278
|
+
`) && (a = n.spacingOuter + l + a + n.spacingOuter + r), a = `{${a}}`), `${n.spacingInner + r + u.prop.open + f + u.prop.close}=${u.value.open}${a}${u.
|
|
312
279
|
value.close}`;
|
|
313
280
|
}).join("");
|
|
314
281
|
}
|
|
315
|
-
|
|
282
|
+
c(ee, "printProps");
|
|
316
283
|
function ne(t, e, n, r, o, s) {
|
|
317
284
|
return t.map(
|
|
318
|
-
(
|
|
285
|
+
(i) => e.spacingOuter + n + (typeof i == "string" ? Ge(i, e) : s(i, e, n, r, o))
|
|
319
286
|
).join("");
|
|
320
287
|
}
|
|
321
|
-
|
|
322
|
-
function
|
|
288
|
+
c(ne, "printChildren");
|
|
289
|
+
function Ge(t, e) {
|
|
323
290
|
let n = e.colors.content;
|
|
324
|
-
return n.open +
|
|
291
|
+
return n.open + qe(t) + n.close;
|
|
325
292
|
}
|
|
326
|
-
|
|
327
|
-
function
|
|
293
|
+
c(Ge, "printText");
|
|
294
|
+
function wr(t, e) {
|
|
328
295
|
let n = e.colors.comment;
|
|
329
|
-
return `${n.open}<!--${
|
|
296
|
+
return `${n.open}<!--${qe(t)}-->${n.close}`;
|
|
330
297
|
}
|
|
331
|
-
|
|
298
|
+
c(wr, "printComment");
|
|
332
299
|
function re(t, e, n, r, o) {
|
|
333
300
|
let s = r.colors.tag;
|
|
334
301
|
return `${s.open}<${t}${e && s.close + e + r.spacingOuter + o + s.open}${n ? `>${s.close}${n}${r.spacingOuter}${o}${s.open}</${t}` : `${e &&
|
|
335
302
|
!r.min ? "" : " "}/`}>${s.close}`;
|
|
336
303
|
}
|
|
337
|
-
|
|
304
|
+
c(re, "printElement");
|
|
338
305
|
function oe(t, e) {
|
|
339
306
|
let n = e.colors.tag;
|
|
340
307
|
return `${n.open}<${t}${n.close} \u2026${n.open} />${n.close}`;
|
|
341
308
|
}
|
|
342
|
-
|
|
343
|
-
var
|
|
344
|
-
function
|
|
309
|
+
c(oe, "printElementAsLeaf");
|
|
310
|
+
var $r = 1, He = 3, Je = 8, Xe = 11, Tr = /^(?:(?:HTML|SVG)\w*)?Element$/;
|
|
311
|
+
function Ar(t) {
|
|
345
312
|
try {
|
|
346
313
|
return typeof t.hasAttribute == "function" && t.hasAttribute("is");
|
|
347
314
|
} catch {
|
|
348
315
|
return !1;
|
|
349
316
|
}
|
|
350
317
|
}
|
|
351
|
-
|
|
352
|
-
function
|
|
353
|
-
let e = t.constructor.name, { nodeType: n, tagName: r } = t, o = typeof r == "string" && r.includes("-") ||
|
|
354
|
-
return n ===
|
|
318
|
+
c(Ar, "testHasAttribute");
|
|
319
|
+
function Nr(t) {
|
|
320
|
+
let e = t.constructor.name, { nodeType: n, tagName: r } = t, o = typeof r == "string" && r.includes("-") || Ar(t);
|
|
321
|
+
return n === $r && (Tr.test(e) || o) || n === He && e === "Text" || n === Je && e === "Comment" || n === Xe && e === "DocumentFragment";
|
|
355
322
|
}
|
|
356
|
-
|
|
357
|
-
var
|
|
323
|
+
c(Nr, "testNode");
|
|
324
|
+
var Ir = /* @__PURE__ */ c((t) => {
|
|
358
325
|
var e;
|
|
359
|
-
return ((e = t?.constructor) == null ? void 0 : e.name) &&
|
|
326
|
+
return ((e = t?.constructor) == null ? void 0 : e.name) && Nr(t);
|
|
360
327
|
}, "test$3");
|
|
361
|
-
function
|
|
362
|
-
return t.nodeType ===
|
|
328
|
+
function Rr(t) {
|
|
329
|
+
return t.nodeType === He;
|
|
363
330
|
}
|
|
364
|
-
|
|
365
|
-
function
|
|
366
|
-
return t.nodeType ===
|
|
331
|
+
c(Rr, "nodeIsText");
|
|
332
|
+
function Pr(t) {
|
|
333
|
+
return t.nodeType === Je;
|
|
367
334
|
}
|
|
368
|
-
|
|
335
|
+
c(Pr, "nodeIsComment");
|
|
369
336
|
function Xt(t) {
|
|
370
|
-
return t.nodeType ===
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
var
|
|
374
|
-
if (
|
|
375
|
-
return
|
|
376
|
-
if (
|
|
377
|
-
return
|
|
378
|
-
let
|
|
379
|
-
return ++r > e.maxDepth ? oe(
|
|
380
|
-
|
|
337
|
+
return t.nodeType === Xe;
|
|
338
|
+
}
|
|
339
|
+
c(Xt, "nodeIsFragment");
|
|
340
|
+
var Mr = /* @__PURE__ */ c((t, e, n, r, o, s) => {
|
|
341
|
+
if (Rr(t))
|
|
342
|
+
return Ge(t.data, e);
|
|
343
|
+
if (Pr(t))
|
|
344
|
+
return wr(t.data, e);
|
|
345
|
+
let i = Xt(t) ? "DocumentFragment" : t.tagName.toLowerCase();
|
|
346
|
+
return ++r > e.maxDepth ? oe(i, e) : re(
|
|
347
|
+
i,
|
|
381
348
|
ee(
|
|
382
|
-
Xt(t) ? [] : Array.from(t.attributes, (
|
|
349
|
+
Xt(t) ? [] : Array.from(t.attributes, (l) => l.name).sort(),
|
|
383
350
|
Xt(t) ? {} : [...t.attributes].reduce(
|
|
384
|
-
(
|
|
351
|
+
(l, u) => (l[u.name] = u.value, l),
|
|
385
352
|
{}
|
|
386
353
|
),
|
|
387
354
|
e,
|
|
@@ -401,12 +368,12 @@ var Gr = /* @__PURE__ */ i((t, e, n, r, o, s) => {
|
|
|
401
368
|
e,
|
|
402
369
|
n
|
|
403
370
|
);
|
|
404
|
-
}, "serialize$3"),
|
|
405
|
-
EYED__@@",
|
|
406
|
-
@@__IMMUTABLE_SET__@@",
|
|
407
|
-
(t) => `[${t}]`, "printAsLeaf"),
|
|
408
|
-
function
|
|
409
|
-
return ++r > e.maxDepth ? Mt(yt(
|
|
371
|
+
}, "serialize$3"), Lr = { serialize: Mr, test: Ir }, xr = "@@__IMMUTABLE_ITERABLE__@@", jr = "@@__IMMUTABLE_LIST__@@", Dr = "@@__IMMUTABLE_K\
|
|
372
|
+
EYED__@@", Fr = "@@__IMMUTABLE_MAP__@@", xe = "@@__IMMUTABLE_ORDERED__@@", kr = "@@__IMMUTABLE_RECORD__@@", Br = "@@__IMMUTABLE_SEQ__@@", zr = "\
|
|
373
|
+
@@__IMMUTABLE_SET__@@", Ur = "@@__IMMUTABLE_STACK__@@", yt = /* @__PURE__ */ c((t) => `Immutable.${t}`, "getImmutableName"), Mt = /* @__PURE__ */ c(
|
|
374
|
+
(t) => `[${t}]`, "printAsLeaf"), Et = " ", je = "\u2026";
|
|
375
|
+
function Yr(t, e, n, r, o, s, i) {
|
|
376
|
+
return ++r > e.maxDepth ? Mt(yt(i)) : `${yt(i) + Et}{${Pt(
|
|
410
377
|
t.entries(),
|
|
411
378
|
e,
|
|
412
379
|
n,
|
|
@@ -415,8 +382,8 @@ function ro(t, e, n, r, o, s, c) {
|
|
|
415
382
|
s
|
|
416
383
|
)}}`;
|
|
417
384
|
}
|
|
418
|
-
|
|
419
|
-
function
|
|
385
|
+
c(Yr, "printImmutableEntries");
|
|
386
|
+
function Wr(t) {
|
|
420
387
|
let e = 0;
|
|
421
388
|
return {
|
|
422
389
|
next() {
|
|
@@ -428,11 +395,11 @@ function oo(t) {
|
|
|
428
395
|
}
|
|
429
396
|
};
|
|
430
397
|
}
|
|
431
|
-
|
|
432
|
-
function
|
|
433
|
-
let
|
|
434
|
-
return ++r > e.maxDepth ? Mt(
|
|
435
|
-
|
|
398
|
+
c(Wr, "getRecordEntries");
|
|
399
|
+
function Vr(t, e, n, r, o, s) {
|
|
400
|
+
let i = yt(t._name || "Record");
|
|
401
|
+
return ++r > e.maxDepth ? Mt(i) : `${i + Et}{${Pt(
|
|
402
|
+
Wr(t),
|
|
436
403
|
e,
|
|
437
404
|
n,
|
|
438
405
|
r,
|
|
@@ -440,10 +407,10 @@ function so(t, e, n, r, o, s) {
|
|
|
440
407
|
s
|
|
441
408
|
)}}`;
|
|
442
409
|
}
|
|
443
|
-
|
|
444
|
-
function
|
|
445
|
-
let
|
|
446
|
-
return ++r > e.maxDepth ? Mt(
|
|
410
|
+
c(Vr, "printImmutableRecord");
|
|
411
|
+
function Kr(t, e, n, r, o, s) {
|
|
412
|
+
let i = yt("Seq");
|
|
413
|
+
return ++r > e.maxDepth ? Mt(i) : t[Dr] ? `${i + Et}{${// from Immutable collection of entries or from ECMAScript object
|
|
447
414
|
t._iter || t._object ? Pt(
|
|
448
415
|
t.entries(),
|
|
449
416
|
e,
|
|
@@ -451,18 +418,18 @@ function io(t, e, n, r, o, s) {
|
|
|
451
418
|
r,
|
|
452
419
|
o,
|
|
453
420
|
s
|
|
454
|
-
) :
|
|
421
|
+
) : je}}` : `${i + Et}[${t._iter || t._array || t._collection || t._iterable ? vt(
|
|
455
422
|
t.values(),
|
|
456
423
|
e,
|
|
457
424
|
n,
|
|
458
425
|
r,
|
|
459
426
|
o,
|
|
460
427
|
s
|
|
461
|
-
) :
|
|
428
|
+
) : je}]`;
|
|
462
429
|
}
|
|
463
|
-
|
|
464
|
-
function Zt(t, e, n, r, o, s,
|
|
465
|
-
return ++r > e.maxDepth ? Mt(yt(
|
|
430
|
+
c(Kr, "printImmutableSeq");
|
|
431
|
+
function Zt(t, e, n, r, o, s, i) {
|
|
432
|
+
return ++r > e.maxDepth ? Mt(yt(i)) : `${yt(i) + Et}[${vt(
|
|
466
433
|
t.values(),
|
|
467
434
|
e,
|
|
468
435
|
n,
|
|
@@ -471,16 +438,16 @@ function Zt(t, e, n, r, o, s, c) {
|
|
|
471
438
|
s
|
|
472
439
|
)}]`;
|
|
473
440
|
}
|
|
474
|
-
|
|
475
|
-
var
|
|
441
|
+
c(Zt, "printImmutableValues");
|
|
442
|
+
var qr = /* @__PURE__ */ c((t, e, n, r, o, s) => t[Fr] ? Yr(
|
|
476
443
|
t,
|
|
477
444
|
e,
|
|
478
445
|
n,
|
|
479
446
|
r,
|
|
480
447
|
o,
|
|
481
448
|
s,
|
|
482
|
-
t[
|
|
483
|
-
) : t[
|
|
449
|
+
t[xe] ? "OrderedMap" : "Map"
|
|
450
|
+
) : t[jr] ? Zt(
|
|
484
451
|
t,
|
|
485
452
|
e,
|
|
486
453
|
n,
|
|
@@ -488,15 +455,15 @@ var co = /* @__PURE__ */ i((t, e, n, r, o, s) => t[Qr] ? ro(
|
|
|
488
455
|
o,
|
|
489
456
|
s,
|
|
490
457
|
"List"
|
|
491
|
-
) : t[
|
|
458
|
+
) : t[zr] ? Zt(
|
|
492
459
|
t,
|
|
493
460
|
e,
|
|
494
461
|
n,
|
|
495
462
|
r,
|
|
496
463
|
o,
|
|
497
464
|
s,
|
|
498
|
-
t[
|
|
499
|
-
) : t[
|
|
465
|
+
t[xe] ? "OrderedSet" : "Set"
|
|
466
|
+
) : t[Ur] ? Zt(
|
|
500
467
|
t,
|
|
501
468
|
e,
|
|
502
469
|
n,
|
|
@@ -504,38 +471,38 @@ var co = /* @__PURE__ */ i((t, e, n, r, o, s) => t[Qr] ? ro(
|
|
|
504
471
|
o,
|
|
505
472
|
s,
|
|
506
473
|
"Stack"
|
|
507
|
-
) : t[
|
|
508
|
-
test$2"),
|
|
509
|
-
var
|
|
510
|
-
function
|
|
511
|
-
if (
|
|
512
|
-
|
|
474
|
+
) : t[Br] ? Kr(t, e, n, r, o, s) : Vr(t, e, n, r, o, s), "serialize$2"), Gr = /* @__PURE__ */ c((t) => t && (t[xr] === !0 || t[kr] === !0), "\
|
|
475
|
+
test$2"), Hr = { serialize: qr, test: Gr }, Nt = { exports: {} }, T = {};
|
|
476
|
+
var De;
|
|
477
|
+
function Jr() {
|
|
478
|
+
if (De) return T;
|
|
479
|
+
De = 1;
|
|
513
480
|
var t = Symbol.for("react.element"), e = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"),
|
|
514
|
-
o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"),
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
function y(
|
|
519
|
-
if (typeof
|
|
520
|
-
var b =
|
|
481
|
+
o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.server_context"),
|
|
482
|
+
u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), a = Symbol.for("react.memo"),
|
|
483
|
+
S = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), h;
|
|
484
|
+
h = Symbol.for("react.module.reference");
|
|
485
|
+
function y(p) {
|
|
486
|
+
if (typeof p == "object" && p !== null) {
|
|
487
|
+
var b = p.$$typeof;
|
|
521
488
|
switch (b) {
|
|
522
489
|
case t:
|
|
523
|
-
switch (
|
|
490
|
+
switch (p = p.type, p) {
|
|
524
491
|
case n:
|
|
525
492
|
case o:
|
|
526
493
|
case r:
|
|
527
494
|
case f:
|
|
528
|
-
case
|
|
529
|
-
return
|
|
495
|
+
case m:
|
|
496
|
+
return p;
|
|
530
497
|
default:
|
|
531
|
-
switch (
|
|
532
|
-
case u:
|
|
533
|
-
case c:
|
|
498
|
+
switch (p = p && p.$$typeof, p) {
|
|
534
499
|
case l:
|
|
535
|
-
case
|
|
500
|
+
case i:
|
|
501
|
+
case u:
|
|
502
|
+
case S:
|
|
536
503
|
case a:
|
|
537
504
|
case s:
|
|
538
|
-
return
|
|
505
|
+
return p;
|
|
539
506
|
default:
|
|
540
507
|
return b;
|
|
541
508
|
}
|
|
@@ -545,172 +512,172 @@ function ao() {
|
|
|
545
512
|
}
|
|
546
513
|
}
|
|
547
514
|
}
|
|
548
|
-
return
|
|
549
|
-
Portal = e, T.Profiler = o, T.StrictMode = r, T.Suspense = f, T.SuspenseList =
|
|
515
|
+
return c(y, "v"), T.ContextConsumer = i, T.ContextProvider = s, T.Element = t, T.ForwardRef = u, T.Fragment = n, T.Lazy = S, T.Memo = a, T.
|
|
516
|
+
Portal = e, T.Profiler = o, T.StrictMode = r, T.Suspense = f, T.SuspenseList = m, T.isAsyncMode = function() {
|
|
550
517
|
return !1;
|
|
551
518
|
}, T.isConcurrentMode = function() {
|
|
552
519
|
return !1;
|
|
553
|
-
}, T.isContextConsumer = function(
|
|
554
|
-
return y(
|
|
555
|
-
}, T.isContextProvider = function(
|
|
556
|
-
return y(
|
|
557
|
-
}, T.isElement = function(
|
|
558
|
-
return typeof
|
|
559
|
-
}, T.isForwardRef = function(
|
|
560
|
-
return y(
|
|
561
|
-
}, T.isFragment = function(
|
|
562
|
-
return y(
|
|
563
|
-
}, T.isLazy = function(
|
|
564
|
-
return y(
|
|
565
|
-
}, T.isMemo = function(
|
|
566
|
-
return y(
|
|
567
|
-
}, T.isPortal = function(
|
|
568
|
-
return y(
|
|
569
|
-
}, T.isProfiler = function(
|
|
570
|
-
return y(
|
|
571
|
-
}, T.isStrictMode = function(
|
|
572
|
-
return y(
|
|
573
|
-
}, T.isSuspense = function(
|
|
574
|
-
return y(
|
|
575
|
-
}, T.isSuspenseList = function(
|
|
576
|
-
return y(
|
|
577
|
-
}, T.isValidElementType = function(
|
|
578
|
-
return typeof
|
|
579
|
-
object" &&
|
|
580
|
-
|
|
520
|
+
}, T.isContextConsumer = function(p) {
|
|
521
|
+
return y(p) === i;
|
|
522
|
+
}, T.isContextProvider = function(p) {
|
|
523
|
+
return y(p) === s;
|
|
524
|
+
}, T.isElement = function(p) {
|
|
525
|
+
return typeof p == "object" && p !== null && p.$$typeof === t;
|
|
526
|
+
}, T.isForwardRef = function(p) {
|
|
527
|
+
return y(p) === u;
|
|
528
|
+
}, T.isFragment = function(p) {
|
|
529
|
+
return y(p) === n;
|
|
530
|
+
}, T.isLazy = function(p) {
|
|
531
|
+
return y(p) === S;
|
|
532
|
+
}, T.isMemo = function(p) {
|
|
533
|
+
return y(p) === a;
|
|
534
|
+
}, T.isPortal = function(p) {
|
|
535
|
+
return y(p) === e;
|
|
536
|
+
}, T.isProfiler = function(p) {
|
|
537
|
+
return y(p) === o;
|
|
538
|
+
}, T.isStrictMode = function(p) {
|
|
539
|
+
return y(p) === r;
|
|
540
|
+
}, T.isSuspense = function(p) {
|
|
541
|
+
return y(p) === f;
|
|
542
|
+
}, T.isSuspenseList = function(p) {
|
|
543
|
+
return y(p) === m;
|
|
544
|
+
}, T.isValidElementType = function(p) {
|
|
545
|
+
return typeof p == "string" || typeof p == "function" || p === n || p === o || p === r || p === f || p === m || p === g || typeof p == "\
|
|
546
|
+
object" && p !== null && (p.$$typeof === S || p.$$typeof === a || p.$$typeof === s || p.$$typeof === i || p.$$typeof === u || p.$$typeof ===
|
|
547
|
+
h || p.getModuleId !== void 0);
|
|
581
548
|
}, T.typeOf = y, T;
|
|
582
549
|
}
|
|
583
|
-
|
|
550
|
+
c(Jr, "requireReactIs_production_min");
|
|
584
551
|
var A = {};
|
|
585
|
-
var
|
|
586
|
-
function
|
|
587
|
-
return
|
|
552
|
+
var Fe;
|
|
553
|
+
function Xr() {
|
|
554
|
+
return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
588
555
|
var t = Symbol.for("react.element"), e = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"),
|
|
589
|
-
o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"),
|
|
590
|
-
t"),
|
|
591
|
-
o"),
|
|
556
|
+
o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.server_contex\
|
|
557
|
+
t"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), a = Symbol.for("react.mem\
|
|
558
|
+
o"), S = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), h = !1, y = !1, p = !1, b = !1, E = !1, $;
|
|
592
559
|
$ = Symbol.for("react.module.reference");
|
|
593
|
-
function d(
|
|
594
|
-
return !!(typeof
|
|
595
|
-
|
|
596
|
-
$$typeof ===
|
|
560
|
+
function d(C) {
|
|
561
|
+
return !!(typeof C == "string" || typeof C == "function" || C === n || C === o || E || C === r || C === f || C === m || b || C === g ||
|
|
562
|
+
h || y || p || typeof C == "object" && C !== null && (C.$$typeof === S || C.$$typeof === a || C.$$typeof === s || C.$$typeof === i || C.
|
|
563
|
+
$$typeof === u || // This needs to include all possible module reference object
|
|
597
564
|
// types supported by any Flight configuration anywhere since
|
|
598
565
|
// we don't know which Flight build this will end up being used
|
|
599
566
|
// with.
|
|
600
|
-
|
|
567
|
+
C.$$typeof === $ || C.getModuleId !== void 0));
|
|
601
568
|
}
|
|
602
|
-
|
|
603
|
-
function
|
|
604
|
-
if (typeof
|
|
605
|
-
var
|
|
606
|
-
switch (
|
|
569
|
+
c(d, "isValidElementType");
|
|
570
|
+
function _(C) {
|
|
571
|
+
if (typeof C == "object" && C !== null) {
|
|
572
|
+
var Ht = C.$$typeof;
|
|
573
|
+
switch (Ht) {
|
|
607
574
|
case t:
|
|
608
|
-
var
|
|
609
|
-
switch (
|
|
575
|
+
var $t = C.type;
|
|
576
|
+
switch ($t) {
|
|
610
577
|
case n:
|
|
611
578
|
case o:
|
|
612
579
|
case r:
|
|
613
580
|
case f:
|
|
614
|
-
case
|
|
615
|
-
return
|
|
581
|
+
case m:
|
|
582
|
+
return $t;
|
|
616
583
|
default:
|
|
617
|
-
var Re =
|
|
584
|
+
var Re = $t && $t.$$typeof;
|
|
618
585
|
switch (Re) {
|
|
619
|
-
case u:
|
|
620
|
-
case c:
|
|
621
586
|
case l:
|
|
622
|
-
case
|
|
587
|
+
case i:
|
|
588
|
+
case u:
|
|
589
|
+
case S:
|
|
623
590
|
case a:
|
|
624
591
|
case s:
|
|
625
592
|
return Re;
|
|
626
593
|
default:
|
|
627
|
-
return
|
|
594
|
+
return Ht;
|
|
628
595
|
}
|
|
629
596
|
}
|
|
630
597
|
case e:
|
|
631
|
-
return
|
|
598
|
+
return Ht;
|
|
632
599
|
}
|
|
633
600
|
}
|
|
634
601
|
}
|
|
635
|
-
|
|
636
|
-
var
|
|
637
|
-
function V(
|
|
602
|
+
c(_, "typeOf");
|
|
603
|
+
var w = i, O = s, N = t, G = u, Q = n, P = S, k = a, H = e, Y = o, R = r, L = f, x = m, J = !1, D = !1;
|
|
604
|
+
function V(C) {
|
|
638
605
|
return J || (J = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
639
606
|
}
|
|
640
|
-
|
|
641
|
-
function rt(
|
|
607
|
+
c(V, "isAsyncMode");
|
|
608
|
+
function rt(C) {
|
|
642
609
|
return D || (D = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
643
610
|
}
|
|
644
|
-
|
|
645
|
-
function K(
|
|
646
|
-
return
|
|
611
|
+
c(rt, "isConcurrentMode");
|
|
612
|
+
function K(C) {
|
|
613
|
+
return _(C) === i;
|
|
647
614
|
}
|
|
648
|
-
|
|
649
|
-
function q(
|
|
650
|
-
return
|
|
615
|
+
c(K, "isContextConsumer");
|
|
616
|
+
function q(C) {
|
|
617
|
+
return _(C) === s;
|
|
651
618
|
}
|
|
652
|
-
|
|
653
|
-
function st(
|
|
654
|
-
return typeof
|
|
619
|
+
c(q, "isContextProvider");
|
|
620
|
+
function st(C) {
|
|
621
|
+
return typeof C == "object" && C !== null && C.$$typeof === t;
|
|
655
622
|
}
|
|
656
|
-
|
|
657
|
-
function X(
|
|
658
|
-
return
|
|
623
|
+
c(st, "isElement");
|
|
624
|
+
function X(C) {
|
|
625
|
+
return _(C) === u;
|
|
659
626
|
}
|
|
660
|
-
|
|
661
|
-
function W(
|
|
662
|
-
return
|
|
627
|
+
c(X, "isForwardRef");
|
|
628
|
+
function W(C) {
|
|
629
|
+
return _(C) === n;
|
|
663
630
|
}
|
|
664
|
-
|
|
665
|
-
function ot(
|
|
666
|
-
return
|
|
631
|
+
c(W, "isFragment");
|
|
632
|
+
function ot(C) {
|
|
633
|
+
return _(C) === S;
|
|
667
634
|
}
|
|
668
|
-
|
|
669
|
-
function ht(
|
|
670
|
-
return
|
|
635
|
+
c(ot, "isLazy");
|
|
636
|
+
function ht(C) {
|
|
637
|
+
return _(C) === a;
|
|
671
638
|
}
|
|
672
|
-
|
|
673
|
-
function ut(
|
|
674
|
-
return
|
|
639
|
+
c(ht, "isMemo");
|
|
640
|
+
function ut(C) {
|
|
641
|
+
return _(C) === e;
|
|
675
642
|
}
|
|
676
|
-
|
|
677
|
-
function _t(
|
|
678
|
-
return
|
|
643
|
+
c(ut, "isPortal");
|
|
644
|
+
function _t(C) {
|
|
645
|
+
return _(C) === o;
|
|
679
646
|
}
|
|
680
|
-
|
|
681
|
-
function Ct(
|
|
682
|
-
return
|
|
647
|
+
c(_t, "isProfiler");
|
|
648
|
+
function Ct(C) {
|
|
649
|
+
return _(C) === r;
|
|
683
650
|
}
|
|
684
|
-
|
|
685
|
-
function
|
|
686
|
-
return
|
|
651
|
+
c(Ct, "isStrictMode");
|
|
652
|
+
function wt(C) {
|
|
653
|
+
return _(C) === f;
|
|
687
654
|
}
|
|
688
|
-
|
|
689
|
-
function
|
|
690
|
-
return
|
|
655
|
+
c(wt, "isSuspense");
|
|
656
|
+
function rr(C) {
|
|
657
|
+
return _(C) === m;
|
|
691
658
|
}
|
|
692
|
-
|
|
659
|
+
c(rr, "isSuspenseList"), A.ContextConsumer = w, A.ContextProvider = O, A.Element = N, A.ForwardRef = G, A.Fragment = Q, A.Lazy = P, A.Memo =
|
|
693
660
|
k, A.Portal = H, A.Profiler = Y, A.StrictMode = R, A.Suspense = L, A.SuspenseList = x, A.isAsyncMode = V, A.isConcurrentMode = rt, A.isContextConsumer =
|
|
694
661
|
K, A.isContextProvider = q, A.isElement = st, A.isForwardRef = X, A.isFragment = W, A.isLazy = ot, A.isMemo = ht, A.isPortal = ut, A.isProfiler =
|
|
695
|
-
_t, A.isStrictMode = Ct, A.isSuspense =
|
|
662
|
+
_t, A.isStrictMode = Ct, A.isSuspense = wt, A.isSuspenseList = rr, A.isValidElementType = d, A.typeOf = _;
|
|
696
663
|
}()), A;
|
|
697
664
|
}
|
|
698
|
-
|
|
699
|
-
var
|
|
700
|
-
function
|
|
701
|
-
return
|
|
665
|
+
c(Xr, "requireReactIs_development");
|
|
666
|
+
var ke;
|
|
667
|
+
function Zr() {
|
|
668
|
+
return ke || (ke = 1, process.env.NODE_ENV === "production" ? Nt.exports = Jr() : Nt.exports = Xr()), Nt.exports;
|
|
702
669
|
}
|
|
703
|
-
|
|
704
|
-
var at =
|
|
705
|
-
function
|
|
670
|
+
c(Zr, "requireReactIs");
|
|
671
|
+
var at = Zr();
|
|
672
|
+
function Ze(t, e = []) {
|
|
706
673
|
if (Array.isArray(t))
|
|
707
674
|
for (let n of t)
|
|
708
|
-
|
|
675
|
+
Ze(n, e);
|
|
709
676
|
else t != null && t !== !1 && t !== "" && e.push(t);
|
|
710
677
|
return e;
|
|
711
678
|
}
|
|
712
|
-
|
|
713
|
-
function
|
|
679
|
+
c(Ze, "getChildren");
|
|
680
|
+
function Be(t) {
|
|
714
681
|
let e = t.type;
|
|
715
682
|
if (typeof e == "string")
|
|
716
683
|
return e;
|
|
@@ -738,16 +705,16 @@ function We(t) {
|
|
|
738
705
|
}
|
|
739
706
|
return "UNDEFINED";
|
|
740
707
|
}
|
|
741
|
-
|
|
742
|
-
function
|
|
708
|
+
c(Be, "getType");
|
|
709
|
+
function Qr(t) {
|
|
743
710
|
let { props: e } = t;
|
|
744
711
|
return Object.keys(e).filter((n) => n !== "children" && e[n] !== void 0).sort();
|
|
745
712
|
}
|
|
746
|
-
|
|
747
|
-
var
|
|
748
|
-
|
|
713
|
+
c(Qr, "getPropKeys$1");
|
|
714
|
+
var vr = /* @__PURE__ */ c((t, e, n, r, o, s) => ++r > e.maxDepth ? oe(Be(t), e) : re(
|
|
715
|
+
Be(t),
|
|
749
716
|
ee(
|
|
750
|
-
|
|
717
|
+
Qr(t),
|
|
751
718
|
t.props,
|
|
752
719
|
e,
|
|
753
720
|
n + e.indent,
|
|
@@ -756,7 +723,7 @@ var go = /* @__PURE__ */ i((t, e, n, r, o, s) => ++r > e.maxDepth ? oe(We(t), e)
|
|
|
756
723
|
s
|
|
757
724
|
),
|
|
758
725
|
ne(
|
|
759
|
-
|
|
726
|
+
Ze(t.props.children),
|
|
760
727
|
e,
|
|
761
728
|
n + e.indent,
|
|
762
729
|
r,
|
|
@@ -765,17 +732,17 @@ var go = /* @__PURE__ */ i((t, e, n, r, o, s) => ++r > e.maxDepth ? oe(We(t), e)
|
|
|
765
732
|
),
|
|
766
733
|
e,
|
|
767
734
|
n
|
|
768
|
-
), "serialize$1"),
|
|
735
|
+
), "serialize$1"), to = /* @__PURE__ */ c((t) => t != null && at.isElement(t), "test$1"), eo = { serialize: vr, test: to }, no = typeof Symbol ==
|
|
769
736
|
"function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
|
|
770
|
-
function
|
|
737
|
+
function ro(t) {
|
|
771
738
|
let { props: e } = t;
|
|
772
739
|
return e ? Object.keys(e).filter((n) => e[n] !== void 0).sort() : [];
|
|
773
740
|
}
|
|
774
|
-
|
|
775
|
-
var
|
|
741
|
+
c(ro, "getPropKeys");
|
|
742
|
+
var oo = /* @__PURE__ */ c((t, e, n, r, o, s) => ++r > e.maxDepth ? oe(t.type, e) : re(
|
|
776
743
|
t.type,
|
|
777
744
|
t.props ? ee(
|
|
778
|
-
|
|
745
|
+
ro(t),
|
|
779
746
|
t.props,
|
|
780
747
|
e,
|
|
781
748
|
n + e.indent,
|
|
@@ -793,51 +760,51 @@ var _o = /* @__PURE__ */ i((t, e, n, r, o, s) => ++r > e.maxDepth ? oe(t.type, e
|
|
|
793
760
|
) : "",
|
|
794
761
|
e,
|
|
795
762
|
n
|
|
796
|
-
), "serialize"),
|
|
797
|
-
|
|
763
|
+
), "serialize"), so = /* @__PURE__ */ c((t) => t && t.$$typeof === no, "test"), io = { serialize: oo, test: so }, Qe = Object.prototype.toString,
|
|
764
|
+
co = Date.prototype.toISOString, uo = Error.prototype.toString, ze = RegExp.prototype.toString;
|
|
798
765
|
function Qt(t) {
|
|
799
766
|
return typeof t.constructor == "function" && t.constructor.name || "Object";
|
|
800
767
|
}
|
|
801
|
-
|
|
802
|
-
function
|
|
768
|
+
c(Qt, "getConstructorName");
|
|
769
|
+
function lo(t) {
|
|
803
770
|
return typeof window < "u" && t === window;
|
|
804
771
|
}
|
|
805
|
-
|
|
806
|
-
var
|
|
772
|
+
c(lo, "isWindow");
|
|
773
|
+
var ao = /^Symbol\((.*)\)(.*)$/, fo = /\n/g, Rt = class extends Error {
|
|
807
774
|
static {
|
|
808
|
-
|
|
775
|
+
c(this, "PrettyFormatPluginError");
|
|
809
776
|
}
|
|
810
777
|
constructor(e, n) {
|
|
811
778
|
super(e), this.stack = n, this.name = this.constructor.name;
|
|
812
779
|
}
|
|
813
780
|
};
|
|
814
|
-
function
|
|
781
|
+
function mo(t) {
|
|
815
782
|
return t === "[object Array]" || t === "[object ArrayBuffer]" || t === "[object DataView]" || t === "[object Float32Array]" || t === "[obj\
|
|
816
783
|
ect Float64Array]" || t === "[object Int8Array]" || t === "[object Int16Array]" || t === "[object Int32Array]" || t === "[object Uint8Array]" ||
|
|
817
784
|
t === "[object Uint8ClampedArray]" || t === "[object Uint16Array]" || t === "[object Uint32Array]";
|
|
818
785
|
}
|
|
819
|
-
|
|
820
|
-
function
|
|
786
|
+
c(mo, "isToStringedArrayType");
|
|
787
|
+
function po(t) {
|
|
821
788
|
return Object.is(t, -0) ? "-0" : String(t);
|
|
822
789
|
}
|
|
823
|
-
|
|
824
|
-
function
|
|
790
|
+
c(po, "printNumber");
|
|
791
|
+
function go(t) {
|
|
825
792
|
return `${t}n`;
|
|
826
793
|
}
|
|
827
|
-
|
|
828
|
-
function
|
|
794
|
+
c(go, "printBigInt");
|
|
795
|
+
function Ue(t, e) {
|
|
829
796
|
return e ? `[Function ${t.name || "anonymous"}]` : "[Function]";
|
|
830
797
|
}
|
|
831
|
-
|
|
832
|
-
function
|
|
833
|
-
return String(t).replace(
|
|
798
|
+
c(Ue, "printFunction");
|
|
799
|
+
function Ye(t) {
|
|
800
|
+
return String(t).replace(ao, "Symbol($1)");
|
|
834
801
|
}
|
|
835
|
-
|
|
836
|
-
function
|
|
837
|
-
return `[${
|
|
802
|
+
c(Ye, "printSymbol");
|
|
803
|
+
function We(t) {
|
|
804
|
+
return `[${uo.call(t)}]`;
|
|
838
805
|
}
|
|
839
|
-
|
|
840
|
-
function
|
|
806
|
+
c(We, "printError");
|
|
807
|
+
function ve(t, e, n, r) {
|
|
841
808
|
if (t === !0 || t === !1)
|
|
842
809
|
return `${t}`;
|
|
843
810
|
if (t === void 0)
|
|
@@ -846,39 +813,39 @@ function rn(t, e, n, r) {
|
|
|
846
813
|
return "null";
|
|
847
814
|
let o = typeof t;
|
|
848
815
|
if (o === "number")
|
|
849
|
-
return
|
|
816
|
+
return po(t);
|
|
850
817
|
if (o === "bigint")
|
|
851
|
-
return
|
|
818
|
+
return go(t);
|
|
852
819
|
if (o === "string")
|
|
853
820
|
return r ? `"${t.replaceAll(/"|\\/g, "\\$&")}"` : `"${t}"`;
|
|
854
821
|
if (o === "function")
|
|
855
|
-
return
|
|
822
|
+
return Ue(t, e);
|
|
856
823
|
if (o === "symbol")
|
|
857
|
-
return
|
|
858
|
-
let s =
|
|
824
|
+
return Ye(t);
|
|
825
|
+
let s = Qe.call(t);
|
|
859
826
|
return s === "[object WeakMap]" ? "WeakMap {}" : s === "[object WeakSet]" ? "WeakSet {}" : s === "[object Function]" || s === "[object Gen\
|
|
860
|
-
eratorFunction]" ?
|
|
861
|
-
"[object Error]" ?
|
|
862
|
-
|
|
827
|
+
eratorFunction]" ? Ue(t, e) : s === "[object Symbol]" ? Ye(t) : s === "[object Date]" ? Number.isNaN(+t) ? "Date { NaN }" : co.call(t) : s ===
|
|
828
|
+
"[object Error]" ? We(t) : s === "[object RegExp]" ? n ? ze.call(t).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&") : ze.call(t) : t instanceof Error ?
|
|
829
|
+
We(t) : null;
|
|
863
830
|
}
|
|
864
|
-
|
|
865
|
-
function
|
|
831
|
+
c(ve, "printBasicValue");
|
|
832
|
+
function tn(t, e, n, r, o, s) {
|
|
866
833
|
if (o.includes(t))
|
|
867
834
|
return "[Circular]";
|
|
868
835
|
o = [...o], o.push(t);
|
|
869
|
-
let
|
|
870
|
-
if (e.callToJSON && !
|
|
836
|
+
let i = ++r > e.maxDepth, l = e.min;
|
|
837
|
+
if (e.callToJSON && !i && t.toJSON && typeof t.toJSON == "function" && !s)
|
|
871
838
|
return lt(t.toJSON(), e, n, r, o, !0);
|
|
872
|
-
let
|
|
873
|
-
return
|
|
839
|
+
let u = Qe.call(t);
|
|
840
|
+
return u === "[object Arguments]" ? i ? "[Arguments]" : `${l ? "" : "Arguments "}[${It(
|
|
874
841
|
t,
|
|
875
842
|
e,
|
|
876
843
|
n,
|
|
877
844
|
r,
|
|
878
845
|
o,
|
|
879
846
|
lt
|
|
880
|
-
)}]` :
|
|
881
|
-
`}[${It(t, e, n, r, o, lt)}]` :
|
|
847
|
+
)}]` : mo(u) ? i ? `[${t.constructor.name}]` : `${l || !e.printBasicPrototype && t.constructor.name === "Array" ? "" : `${t.constructor.name}\
|
|
848
|
+
`}[${It(t, e, n, r, o, lt)}]` : u === "[object Map]" ? i ? "[Map]" : `Map {${Pt(
|
|
882
849
|
t.entries(),
|
|
883
850
|
e,
|
|
884
851
|
n,
|
|
@@ -886,14 +853,14 @@ function on(t, e, n, r, o, s) {
|
|
|
886
853
|
o,
|
|
887
854
|
lt,
|
|
888
855
|
" => "
|
|
889
|
-
)}}` :
|
|
856
|
+
)}}` : u === "[object Set]" ? i ? "[Set]" : `Set {${vt(
|
|
890
857
|
t.values(),
|
|
891
858
|
e,
|
|
892
859
|
n,
|
|
893
860
|
r,
|
|
894
861
|
o,
|
|
895
862
|
lt
|
|
896
|
-
)}}` :
|
|
863
|
+
)}}` : i || lo(t) ? `[${Qt(t)}]` : `${l || !e.printBasicPrototype && Qt(t) === "Object" ? "" : `${Qt(t)} `}{${te(
|
|
897
864
|
t,
|
|
898
865
|
e,
|
|
899
866
|
n,
|
|
@@ -902,21 +869,21 @@ function on(t, e, n, r, o, s) {
|
|
|
902
869
|
lt
|
|
903
870
|
)}}`;
|
|
904
871
|
}
|
|
905
|
-
|
|
906
|
-
function
|
|
872
|
+
c(tn, "printComplexValue");
|
|
873
|
+
function ho(t) {
|
|
907
874
|
return t.serialize != null;
|
|
908
875
|
}
|
|
909
|
-
|
|
910
|
-
function
|
|
911
|
-
let
|
|
876
|
+
c(ho, "isNewPlugin");
|
|
877
|
+
function en(t, e, n, r, o, s) {
|
|
878
|
+
let i;
|
|
912
879
|
try {
|
|
913
|
-
|
|
880
|
+
i = ho(t) ? t.serialize(e, n, r, o, s, lt) : t.print(
|
|
914
881
|
e,
|
|
915
|
-
(
|
|
916
|
-
(
|
|
917
|
-
let
|
|
918
|
-
return
|
|
919
|
-
${
|
|
882
|
+
(l) => lt(l, n, r, o, s),
|
|
883
|
+
(l) => {
|
|
884
|
+
let u = r + n.indent;
|
|
885
|
+
return u + l.replaceAll(fo, `
|
|
886
|
+
${u}`);
|
|
920
887
|
},
|
|
921
888
|
{
|
|
922
889
|
edgeSpacing: n.spacingOuter,
|
|
@@ -925,17 +892,17 @@ ${l}`);
|
|
|
925
892
|
},
|
|
926
893
|
n.colors
|
|
927
894
|
);
|
|
928
|
-
} catch (
|
|
929
|
-
throw new Rt(
|
|
895
|
+
} catch (l) {
|
|
896
|
+
throw new Rt(l.message, l.stack);
|
|
930
897
|
}
|
|
931
|
-
if (typeof
|
|
898
|
+
if (typeof i != "string")
|
|
932
899
|
throw new TypeError(
|
|
933
|
-
`pretty-format: Plugin must return type "string" but instead returned "${typeof
|
|
900
|
+
`pretty-format: Plugin must return type "string" but instead returned "${typeof i}".`
|
|
934
901
|
);
|
|
935
|
-
return
|
|
902
|
+
return i;
|
|
936
903
|
}
|
|
937
|
-
|
|
938
|
-
function
|
|
904
|
+
c(en, "printPlugin");
|
|
905
|
+
function nn(t, e) {
|
|
939
906
|
for (let n of t)
|
|
940
907
|
try {
|
|
941
908
|
if (n.test(e))
|
|
@@ -945,18 +912,18 @@ function cn(t, e) {
|
|
|
945
912
|
}
|
|
946
913
|
return null;
|
|
947
914
|
}
|
|
948
|
-
|
|
915
|
+
c(nn, "findPlugin");
|
|
949
916
|
function lt(t, e, n, r, o, s) {
|
|
950
|
-
let
|
|
951
|
-
if (
|
|
952
|
-
return
|
|
953
|
-
let
|
|
917
|
+
let i = nn(e.plugins, t);
|
|
918
|
+
if (i !== null)
|
|
919
|
+
return en(i, t, e, n, r, o);
|
|
920
|
+
let l = ve(
|
|
954
921
|
t,
|
|
955
922
|
e.printFunctionName,
|
|
956
923
|
e.escapeRegex,
|
|
957
924
|
e.escapeString
|
|
958
925
|
);
|
|
959
|
-
return
|
|
926
|
+
return l !== null ? l : tn(
|
|
960
927
|
t,
|
|
961
928
|
e,
|
|
962
929
|
n,
|
|
@@ -965,14 +932,14 @@ function lt(t, e, n, r, o, s) {
|
|
|
965
932
|
s
|
|
966
933
|
);
|
|
967
934
|
}
|
|
968
|
-
|
|
935
|
+
c(lt, "printer");
|
|
969
936
|
var se = {
|
|
970
937
|
comment: "gray",
|
|
971
938
|
content: "reset",
|
|
972
939
|
prop: "yellow",
|
|
973
940
|
tag: "cyan",
|
|
974
941
|
value: "green"
|
|
975
|
-
},
|
|
942
|
+
}, rn = Object.keys(se), tt = {
|
|
976
943
|
callToJSON: !0,
|
|
977
944
|
compareKeys: void 0,
|
|
978
945
|
escapeRegex: !1,
|
|
@@ -987,7 +954,7 @@ var se = {
|
|
|
987
954
|
printFunctionName: !0,
|
|
988
955
|
theme: se
|
|
989
956
|
};
|
|
990
|
-
function
|
|
957
|
+
function yo(t) {
|
|
991
958
|
for (let e of Object.keys(t))
|
|
992
959
|
if (!Object.prototype.hasOwnProperty.call(tt, e))
|
|
993
960
|
throw new Error(`pretty-format: Unknown option "${e}".`);
|
|
@@ -996,9 +963,9 @@ function Mo(t) {
|
|
|
996
963
|
'pretty-format: Options "min" and "indent" cannot be used together.'
|
|
997
964
|
);
|
|
998
965
|
}
|
|
999
|
-
|
|
1000
|
-
function
|
|
1001
|
-
return
|
|
966
|
+
c(yo, "validateOptions");
|
|
967
|
+
function bo() {
|
|
968
|
+
return rn.reduce((t, e) => {
|
|
1002
969
|
let n = se[e], r = n && v[n];
|
|
1003
970
|
if (r && typeof r.close == "string" && typeof r.open == "string")
|
|
1004
971
|
t[e] = r;
|
|
@@ -1009,74 +976,74 @@ function Lo() {
|
|
|
1009
976
|
return t;
|
|
1010
977
|
}, /* @__PURE__ */ Object.create(null));
|
|
1011
978
|
}
|
|
1012
|
-
|
|
1013
|
-
function
|
|
1014
|
-
return
|
|
979
|
+
c(bo, "getColorsHighlight");
|
|
980
|
+
function So() {
|
|
981
|
+
return rn.reduce((t, e) => (t[e] = { close: "", open: "" }, t), /* @__PURE__ */ Object.create(null));
|
|
1015
982
|
}
|
|
1016
|
-
|
|
1017
|
-
function
|
|
983
|
+
c(So, "getColorsEmpty");
|
|
984
|
+
function on(t) {
|
|
1018
985
|
return t?.printFunctionName ?? tt.printFunctionName;
|
|
1019
986
|
}
|
|
1020
|
-
|
|
1021
|
-
function
|
|
987
|
+
c(on, "getPrintFunctionName");
|
|
988
|
+
function sn(t) {
|
|
1022
989
|
return t?.escapeRegex ?? tt.escapeRegex;
|
|
1023
990
|
}
|
|
1024
|
-
|
|
1025
|
-
function
|
|
991
|
+
c(sn, "getEscapeRegex");
|
|
992
|
+
function cn(t) {
|
|
1026
993
|
return t?.escapeString ?? tt.escapeString;
|
|
1027
994
|
}
|
|
1028
|
-
|
|
1029
|
-
function
|
|
995
|
+
c(cn, "getEscapeString");
|
|
996
|
+
function Ve(t) {
|
|
1030
997
|
return {
|
|
1031
998
|
callToJSON: t?.callToJSON ?? tt.callToJSON,
|
|
1032
|
-
colors: t?.highlight ?
|
|
999
|
+
colors: t?.highlight ? bo() : So(),
|
|
1033
1000
|
compareKeys: typeof t?.compareKeys == "function" || t?.compareKeys === null ? t.compareKeys : tt.compareKeys,
|
|
1034
|
-
escapeRegex:
|
|
1035
|
-
escapeString:
|
|
1036
|
-
indent: t?.min ? "" :
|
|
1001
|
+
escapeRegex: sn(t),
|
|
1002
|
+
escapeString: cn(t),
|
|
1003
|
+
indent: t?.min ? "" : _o(t?.indent ?? tt.indent),
|
|
1037
1004
|
maxDepth: t?.maxDepth ?? tt.maxDepth,
|
|
1038
1005
|
maxWidth: t?.maxWidth ?? tt.maxWidth,
|
|
1039
1006
|
min: t?.min ?? tt.min,
|
|
1040
1007
|
plugins: t?.plugins ?? tt.plugins,
|
|
1041
1008
|
printBasicPrototype: t?.printBasicPrototype ?? !0,
|
|
1042
|
-
printFunctionName:
|
|
1009
|
+
printFunctionName: on(t),
|
|
1043
1010
|
spacingInner: t?.min ? " " : `
|
|
1044
1011
|
`,
|
|
1045
1012
|
spacingOuter: t?.min ? "" : `
|
|
1046
1013
|
`
|
|
1047
1014
|
};
|
|
1048
1015
|
}
|
|
1049
|
-
|
|
1050
|
-
function
|
|
1016
|
+
c(Ve, "getConfig");
|
|
1017
|
+
function _o(t) {
|
|
1051
1018
|
return Array.from({ length: t + 1 }).join(" ");
|
|
1052
1019
|
}
|
|
1053
|
-
|
|
1020
|
+
c(_o, "createIndent");
|
|
1054
1021
|
function Z(t, e) {
|
|
1055
|
-
if (e && (
|
|
1056
|
-
let r =
|
|
1022
|
+
if (e && (yo(e), e.plugins)) {
|
|
1023
|
+
let r = nn(e.plugins, t);
|
|
1057
1024
|
if (r !== null)
|
|
1058
|
-
return
|
|
1025
|
+
return en(r, t, Ve(e), "", 0, []);
|
|
1059
1026
|
}
|
|
1060
|
-
let n =
|
|
1027
|
+
let n = ve(
|
|
1061
1028
|
t,
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1029
|
+
on(e),
|
|
1030
|
+
sn(e),
|
|
1031
|
+
cn(e)
|
|
1065
1032
|
);
|
|
1066
|
-
return n !== null ? n :
|
|
1033
|
+
return n !== null ? n : tn(t, Ve(e), "", 0, []);
|
|
1067
1034
|
}
|
|
1068
|
-
|
|
1035
|
+
c(Z, "format");
|
|
1069
1036
|
var Lt = {
|
|
1070
|
-
AsymmetricMatcher:
|
|
1071
|
-
DOMCollection:
|
|
1072
|
-
DOMElement:
|
|
1073
|
-
Immutable:
|
|
1074
|
-
ReactElement:
|
|
1075
|
-
ReactTestComponent:
|
|
1037
|
+
AsymmetricMatcher: yr,
|
|
1038
|
+
DOMCollection: Cr,
|
|
1039
|
+
DOMElement: Lr,
|
|
1040
|
+
Immutable: Hr,
|
|
1041
|
+
ReactElement: eo,
|
|
1042
|
+
ReactTestComponent: io
|
|
1076
1043
|
};
|
|
1077
1044
|
|
|
1078
1045
|
// ../node_modules/loupe/lib/helpers.js
|
|
1079
|
-
var
|
|
1046
|
+
var un = {
|
|
1080
1047
|
bold: ["1", "22"],
|
|
1081
1048
|
dim: ["2", "22"],
|
|
1082
1049
|
italic: ["3", "23"],
|
|
@@ -1104,7 +1071,7 @@ var pn = {
|
|
|
1104
1071
|
brightcyan: ["36;1", "39"],
|
|
1105
1072
|
brightwhite: ["37;1", "39"],
|
|
1106
1073
|
grey: ["90", "39"]
|
|
1107
|
-
},
|
|
1074
|
+
}, Eo = {
|
|
1108
1075
|
special: "cyan",
|
|
1109
1076
|
number: "yellow",
|
|
1110
1077
|
bigint: "yellow",
|
|
@@ -1116,24 +1083,24 @@ var pn = {
|
|
|
1116
1083
|
date: "magenta",
|
|
1117
1084
|
regexp: "red"
|
|
1118
1085
|
}, it = "\u2026";
|
|
1119
|
-
function
|
|
1120
|
-
let n =
|
|
1086
|
+
function Oo(t, e) {
|
|
1087
|
+
let n = un[Eo[e]] || un[e] || "";
|
|
1121
1088
|
return n ? `\x1B[${n[0]}m${String(t)}\x1B[${n[1]}m` : String(t);
|
|
1122
1089
|
}
|
|
1123
|
-
|
|
1124
|
-
function
|
|
1090
|
+
c(Oo, "colorise");
|
|
1091
|
+
function ln({
|
|
1125
1092
|
showHidden: t = !1,
|
|
1126
1093
|
depth: e = 2,
|
|
1127
1094
|
colors: n = !1,
|
|
1128
1095
|
customInspect: r = !0,
|
|
1129
1096
|
showProxy: o = !1,
|
|
1130
1097
|
maxArrayLength: s = 1 / 0,
|
|
1131
|
-
breakLength:
|
|
1132
|
-
seen:
|
|
1098
|
+
breakLength: i = 1 / 0,
|
|
1099
|
+
seen: l = [],
|
|
1133
1100
|
// eslint-disable-next-line no-shadow
|
|
1134
|
-
truncate:
|
|
1101
|
+
truncate: u = 1 / 0,
|
|
1135
1102
|
stylize: f = String
|
|
1136
|
-
} = {},
|
|
1103
|
+
} = {}, m) {
|
|
1137
1104
|
let a = {
|
|
1138
1105
|
showHidden: !!t,
|
|
1139
1106
|
depth: Number(e),
|
|
@@ -1141,19 +1108,19 @@ function mn({
|
|
|
1141
1108
|
customInspect: !!r,
|
|
1142
1109
|
showProxy: !!o,
|
|
1143
1110
|
maxArrayLength: Number(s),
|
|
1144
|
-
breakLength: Number(
|
|
1145
|
-
truncate: Number(
|
|
1146
|
-
seen:
|
|
1147
|
-
inspect:
|
|
1111
|
+
breakLength: Number(i),
|
|
1112
|
+
truncate: Number(u),
|
|
1113
|
+
seen: l,
|
|
1114
|
+
inspect: m,
|
|
1148
1115
|
stylize: f
|
|
1149
1116
|
};
|
|
1150
|
-
return a.colors && (a.stylize =
|
|
1117
|
+
return a.colors && (a.stylize = Oo), a;
|
|
1151
1118
|
}
|
|
1152
|
-
|
|
1153
|
-
function
|
|
1119
|
+
c(ln, "normaliseOptions");
|
|
1120
|
+
function Co(t) {
|
|
1154
1121
|
return t >= "\uD800" && t <= "\uDBFF";
|
|
1155
1122
|
}
|
|
1156
|
-
|
|
1123
|
+
c(Co, "isHighSurrogate");
|
|
1157
1124
|
function B(t, e, n = it) {
|
|
1158
1125
|
t = String(t);
|
|
1159
1126
|
let r = n.length, o = t.length;
|
|
@@ -1161,44 +1128,44 @@ function B(t, e, n = it) {
|
|
|
1161
1128
|
return n;
|
|
1162
1129
|
if (o > e && o > r) {
|
|
1163
1130
|
let s = e - r;
|
|
1164
|
-
return s > 0 &&
|
|
1131
|
+
return s > 0 && Co(t[s - 1]) && (s = s - 1), `${t.slice(0, s)}${n}`;
|
|
1165
1132
|
}
|
|
1166
1133
|
return t;
|
|
1167
1134
|
}
|
|
1168
|
-
|
|
1135
|
+
c(B, "truncate");
|
|
1169
1136
|
function j(t, e, n, r = ", ") {
|
|
1170
1137
|
n = n || e.inspect;
|
|
1171
1138
|
let o = t.length;
|
|
1172
1139
|
if (o === 0)
|
|
1173
1140
|
return "";
|
|
1174
|
-
let s = e.truncate,
|
|
1141
|
+
let s = e.truncate, i = "", l = "", u = "";
|
|
1175
1142
|
for (let f = 0; f < o; f += 1) {
|
|
1176
|
-
let
|
|
1177
|
-
|
|
1178
|
-
let
|
|
1179
|
-
e.truncate = s -
|
|
1180
|
-
let
|
|
1181
|
-
if (
|
|
1143
|
+
let m = f + 1 === t.length, a = f + 2 === t.length;
|
|
1144
|
+
u = `${it}(${t.length - f})`;
|
|
1145
|
+
let S = t[f];
|
|
1146
|
+
e.truncate = s - i.length - (m ? 0 : r.length);
|
|
1147
|
+
let g = l || n(S, e) + (m ? "" : r), h = i.length + g.length, y = h + u.length;
|
|
1148
|
+
if (m && h > s && i.length + u.length <= s || !m && !a && y > s || (l = m ? "" : n(t[f + 1], e) + (a ? "" : r), !m && a && y > s && h + l.
|
|
1182
1149
|
length > s))
|
|
1183
1150
|
break;
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
1151
|
+
if (i += g, !m && !a && h + l.length >= s) {
|
|
1152
|
+
u = `${it}(${t.length - f - 1})`;
|
|
1186
1153
|
break;
|
|
1187
1154
|
}
|
|
1188
|
-
|
|
1155
|
+
u = "";
|
|
1189
1156
|
}
|
|
1190
|
-
return `${
|
|
1157
|
+
return `${i}${u}`;
|
|
1191
1158
|
}
|
|
1192
|
-
|
|
1193
|
-
function
|
|
1159
|
+
c(j, "inspectList");
|
|
1160
|
+
function wo(t) {
|
|
1194
1161
|
return t.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/) ? t : JSON.stringify(t).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
|
|
1195
1162
|
}
|
|
1196
|
-
|
|
1163
|
+
c(wo, "quoteComplexKey");
|
|
1197
1164
|
function ct([t, e], n) {
|
|
1198
|
-
return n.truncate -= 2, typeof t == "string" ? t =
|
|
1165
|
+
return n.truncate -= 2, typeof t == "string" ? t = wo(t) : typeof t != "number" && (t = `[${n.inspect(t, n)}]`), n.truncate -= t.length, e =
|
|
1199
1166
|
n.inspect(e, n), `${t}: ${e}`;
|
|
1200
1167
|
}
|
|
1201
|
-
|
|
1168
|
+
c(ct, "inspectProperty");
|
|
1202
1169
|
|
|
1203
1170
|
// ../node_modules/loupe/lib/array.js
|
|
1204
1171
|
function ie(t, e) {
|
|
@@ -1211,30 +1178,30 @@ function ie(t, e) {
|
|
|
1211
1178
|
let o = "";
|
|
1212
1179
|
return n.length && (o = j(n.map((s) => [s, t[s]]), e, ct)), `[ ${r}${o ? `, ${o}` : ""} ]`;
|
|
1213
1180
|
}
|
|
1214
|
-
|
|
1181
|
+
c(ie, "inspectArray");
|
|
1215
1182
|
|
|
1216
1183
|
// ../node_modules/loupe/lib/typedarray.js
|
|
1217
|
-
var
|
|
1184
|
+
var $o = /* @__PURE__ */ c((t) => typeof Buffer == "function" && t instanceof Buffer ? "Buffer" : t[Symbol.toStringTag] ? t[Symbol.toStringTag] :
|
|
1218
1185
|
t.constructor.name, "getArrayName");
|
|
1219
1186
|
function et(t, e) {
|
|
1220
|
-
let n =
|
|
1187
|
+
let n = $o(t);
|
|
1221
1188
|
e.truncate -= n.length + 4;
|
|
1222
1189
|
let r = Object.keys(t).slice(t.length);
|
|
1223
1190
|
if (!t.length && !r.length)
|
|
1224
1191
|
return `${n}[]`;
|
|
1225
1192
|
let o = "";
|
|
1226
|
-
for (let
|
|
1227
|
-
let
|
|
1228
|
-
if (e.truncate -=
|
|
1229
|
-
o += `${it}(${t.length - t[
|
|
1193
|
+
for (let i = 0; i < t.length; i++) {
|
|
1194
|
+
let l = `${e.stylize(B(t[i], e.truncate), "number")}${i === t.length - 1 ? "" : ", "}`;
|
|
1195
|
+
if (e.truncate -= l.length, t[i] !== t.length && e.truncate <= 3) {
|
|
1196
|
+
o += `${it}(${t.length - t[i] + 1})`;
|
|
1230
1197
|
break;
|
|
1231
1198
|
}
|
|
1232
|
-
o +=
|
|
1199
|
+
o += l;
|
|
1233
1200
|
}
|
|
1234
1201
|
let s = "";
|
|
1235
|
-
return r.length && (s = j(r.map((
|
|
1202
|
+
return r.length && (s = j(r.map((i) => [i, t[i]]), e, ct)), `${n}[ ${o}${s ? `, ${s}` : ""} ]`;
|
|
1236
1203
|
}
|
|
1237
|
-
|
|
1204
|
+
c(et, "inspectTypedArray");
|
|
1238
1205
|
|
|
1239
1206
|
// ../node_modules/loupe/lib/date.js
|
|
1240
1207
|
function ce(t, e) {
|
|
@@ -1244,70 +1211,70 @@ function ce(t, e) {
|
|
|
1244
1211
|
let r = n.split("T"), o = r[0];
|
|
1245
1212
|
return e.stylize(`${o}T${B(r[1], e.truncate - o.length - 1)}`, "date");
|
|
1246
1213
|
}
|
|
1247
|
-
|
|
1214
|
+
c(ce, "inspectDate");
|
|
1248
1215
|
|
|
1249
1216
|
// ../node_modules/loupe/lib/function.js
|
|
1250
1217
|
function xt(t, e) {
|
|
1251
1218
|
let n = t[Symbol.toStringTag] || "Function", r = t.name;
|
|
1252
1219
|
return r ? e.stylize(`[${n} ${B(r, e.truncate - 11)}]`, "special") : e.stylize(`[${n}]`, "special");
|
|
1253
1220
|
}
|
|
1254
|
-
|
|
1221
|
+
c(xt, "inspectFunction");
|
|
1255
1222
|
|
|
1256
1223
|
// ../node_modules/loupe/lib/map.js
|
|
1257
|
-
function
|
|
1224
|
+
function To([t, e], n) {
|
|
1258
1225
|
return n.truncate -= 4, t = n.inspect(t, n), n.truncate -= t.length, e = n.inspect(e, n), `${t} => ${e}`;
|
|
1259
1226
|
}
|
|
1260
|
-
|
|
1261
|
-
function
|
|
1227
|
+
c(To, "inspectMapEntry");
|
|
1228
|
+
function Ao(t) {
|
|
1262
1229
|
let e = [];
|
|
1263
1230
|
return t.forEach((n, r) => {
|
|
1264
1231
|
e.push([r, n]);
|
|
1265
1232
|
}), e;
|
|
1266
1233
|
}
|
|
1267
|
-
|
|
1234
|
+
c(Ao, "mapToEntries");
|
|
1268
1235
|
function ue(t, e) {
|
|
1269
|
-
return t.size - 1 <= 0 ? "Map{}" : (e.truncate -= 7, `Map{ ${j(
|
|
1236
|
+
return t.size - 1 <= 0 ? "Map{}" : (e.truncate -= 7, `Map{ ${j(Ao(t), e, To)} }`);
|
|
1270
1237
|
}
|
|
1271
|
-
|
|
1238
|
+
c(ue, "inspectMap");
|
|
1272
1239
|
|
|
1273
1240
|
// ../node_modules/loupe/lib/number.js
|
|
1274
|
-
var
|
|
1241
|
+
var No = Number.isNaN || ((t) => t !== t);
|
|
1275
1242
|
function jt(t, e) {
|
|
1276
|
-
return
|
|
1243
|
+
return No(t) ? e.stylize("NaN", "number") : t === 1 / 0 ? e.stylize("Infinity", "number") : t === -1 / 0 ? e.stylize("-Infinity", "number") :
|
|
1277
1244
|
t === 0 ? e.stylize(1 / t === 1 / 0 ? "+0" : "-0", "number") : e.stylize(B(String(t), e.truncate), "number");
|
|
1278
1245
|
}
|
|
1279
|
-
|
|
1246
|
+
c(jt, "inspectNumber");
|
|
1280
1247
|
|
|
1281
1248
|
// ../node_modules/loupe/lib/bigint.js
|
|
1282
1249
|
function Dt(t, e) {
|
|
1283
1250
|
let n = B(t.toString(), e.truncate - 1);
|
|
1284
1251
|
return n !== it && (n += "n"), e.stylize(n, "bigint");
|
|
1285
1252
|
}
|
|
1286
|
-
|
|
1253
|
+
c(Dt, "inspectBigInt");
|
|
1287
1254
|
|
|
1288
1255
|
// ../node_modules/loupe/lib/regexp.js
|
|
1289
1256
|
function le(t, e) {
|
|
1290
1257
|
let n = t.toString().split("/")[2], r = e.truncate - (2 + n.length), o = t.source;
|
|
1291
1258
|
return e.stylize(`/${B(o, r)}/${n}`, "regexp");
|
|
1292
1259
|
}
|
|
1293
|
-
|
|
1260
|
+
c(le, "inspectRegExp");
|
|
1294
1261
|
|
|
1295
1262
|
// ../node_modules/loupe/lib/set.js
|
|
1296
|
-
function
|
|
1263
|
+
function Io(t) {
|
|
1297
1264
|
let e = [];
|
|
1298
1265
|
return t.forEach((n) => {
|
|
1299
1266
|
e.push(n);
|
|
1300
1267
|
}), e;
|
|
1301
1268
|
}
|
|
1302
|
-
|
|
1269
|
+
c(Io, "arrayFromSet");
|
|
1303
1270
|
function ae(t, e) {
|
|
1304
|
-
return t.size === 0 ? "Set{}" : (e.truncate -= 7, `Set{ ${j(
|
|
1271
|
+
return t.size === 0 ? "Set{}" : (e.truncate -= 7, `Set{ ${j(Io(t), e)} }`);
|
|
1305
1272
|
}
|
|
1306
|
-
|
|
1273
|
+
c(ae, "inspectSet");
|
|
1307
1274
|
|
|
1308
1275
|
// ../node_modules/loupe/lib/string.js
|
|
1309
|
-
var
|
|
1310
|
-
ffff]", "g"),
|
|
1276
|
+
var an = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\u\
|
|
1277
|
+
ffff]", "g"), Ro = {
|
|
1311
1278
|
"\b": "\\b",
|
|
1312
1279
|
" ": "\\t",
|
|
1313
1280
|
"\n": "\\n",
|
|
@@ -1315,33 +1282,33 @@ ffff]", "g"), Ko = {
|
|
|
1315
1282
|
"\r": "\\r",
|
|
1316
1283
|
"'": "\\'",
|
|
1317
1284
|
"\\": "\\\\"
|
|
1318
|
-
},
|
|
1319
|
-
function
|
|
1320
|
-
return
|
|
1285
|
+
}, Po = 16, Mo = 4;
|
|
1286
|
+
function Lo(t) {
|
|
1287
|
+
return Ro[t] || `\\u${`0000${t.charCodeAt(0).toString(Po)}`.slice(-Mo)}`;
|
|
1321
1288
|
}
|
|
1322
|
-
|
|
1289
|
+
c(Lo, "escape");
|
|
1323
1290
|
function Ft(t, e) {
|
|
1324
|
-
return
|
|
1291
|
+
return an.test(t) && (t = t.replace(an, Lo)), e.stylize(`'${B(t, e.truncate - 2)}'`, "string");
|
|
1325
1292
|
}
|
|
1326
|
-
|
|
1293
|
+
c(Ft, "inspectString");
|
|
1327
1294
|
|
|
1328
1295
|
// ../node_modules/loupe/lib/symbol.js
|
|
1329
1296
|
function kt(t) {
|
|
1330
1297
|
return "description" in Symbol.prototype ? t.description ? `Symbol(${t.description})` : "Symbol()" : t.toString();
|
|
1331
1298
|
}
|
|
1332
|
-
|
|
1299
|
+
c(kt, "inspectSymbol");
|
|
1333
1300
|
|
|
1334
1301
|
// ../node_modules/loupe/lib/promise.js
|
|
1335
|
-
var
|
|
1302
|
+
var fn = /* @__PURE__ */ c(() => "Promise{\u2026}", "getPromiseValue");
|
|
1336
1303
|
try {
|
|
1337
1304
|
let { getPromiseDetails: t, kPending: e, kRejected: n } = process.binding("util");
|
|
1338
|
-
Array.isArray(t(Promise.resolve())) && (
|
|
1339
|
-
let [s,
|
|
1340
|
-
return s === e ? "Promise{<pending>}" : `Promise${s === n ? "!" : ""}{${o.inspect(
|
|
1305
|
+
Array.isArray(t(Promise.resolve())) && (fn = /* @__PURE__ */ c((r, o) => {
|
|
1306
|
+
let [s, i] = t(r);
|
|
1307
|
+
return s === e ? "Promise{<pending>}" : `Promise${s === n ? "!" : ""}{${o.inspect(i, o)}}`;
|
|
1341
1308
|
}, "getPromiseValue"));
|
|
1342
1309
|
} catch {
|
|
1343
1310
|
}
|
|
1344
|
-
var
|
|
1311
|
+
var mn = fn;
|
|
1345
1312
|
|
|
1346
1313
|
// ../node_modules/loupe/lib/object.js
|
|
1347
1314
|
function ft(t, e) {
|
|
@@ -1351,30 +1318,30 @@ function ft(t, e) {
|
|
|
1351
1318
|
if (e.truncate -= 4, e.seen = e.seen || [], e.seen.includes(t))
|
|
1352
1319
|
return "[Circular]";
|
|
1353
1320
|
e.seen.push(t);
|
|
1354
|
-
let o = j(n.map((
|
|
1321
|
+
let o = j(n.map((l) => [l, t[l]]), e, ct), s = j(r.map((l) => [l, t[l]]), e, ct);
|
|
1355
1322
|
e.seen.pop();
|
|
1356
|
-
let
|
|
1357
|
-
return o && s && (
|
|
1323
|
+
let i = "";
|
|
1324
|
+
return o && s && (i = ", "), `{ ${o}${i}${s} }`;
|
|
1358
1325
|
}
|
|
1359
|
-
|
|
1326
|
+
c(ft, "inspectObject");
|
|
1360
1327
|
|
|
1361
1328
|
// ../node_modules/loupe/lib/class.js
|
|
1362
1329
|
var fe = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1;
|
|
1363
|
-
function
|
|
1330
|
+
function me(t, e) {
|
|
1364
1331
|
let n = "";
|
|
1365
1332
|
return fe && fe in t && (n = t[fe]), n = n || t.constructor.name, (!n || n === "_class") && (n = "<Anonymous Class>"), e.truncate -= n.length,
|
|
1366
1333
|
`${n}${ft(t, e)}`;
|
|
1367
1334
|
}
|
|
1368
|
-
|
|
1335
|
+
c(me, "inspectClass");
|
|
1369
1336
|
|
|
1370
1337
|
// ../node_modules/loupe/lib/arguments.js
|
|
1371
|
-
function
|
|
1338
|
+
function pe(t, e) {
|
|
1372
1339
|
return t.length === 0 ? "Arguments[]" : (e.truncate -= 13, `Arguments[ ${j(t, e)} ]`);
|
|
1373
1340
|
}
|
|
1374
|
-
|
|
1341
|
+
c(pe, "inspectArguments");
|
|
1375
1342
|
|
|
1376
1343
|
// ../node_modules/loupe/lib/error.js
|
|
1377
|
-
var
|
|
1344
|
+
var xo = [
|
|
1378
1345
|
"stack",
|
|
1379
1346
|
"line",
|
|
1380
1347
|
"column",
|
|
@@ -1388,52 +1355,52 @@ var Jo = [
|
|
|
1388
1355
|
"cause"
|
|
1389
1356
|
];
|
|
1390
1357
|
function ge(t, e) {
|
|
1391
|
-
let n = Object.getOwnPropertyNames(t).filter((
|
|
1358
|
+
let n = Object.getOwnPropertyNames(t).filter((i) => xo.indexOf(i) === -1), r = t.name;
|
|
1392
1359
|
e.truncate -= r.length;
|
|
1393
1360
|
let o = "";
|
|
1394
1361
|
if (typeof t.message == "string" ? o = B(t.message, e.truncate) : n.unshift("message"), o = o ? `: ${o}` : "", e.truncate -= o.length + 5,
|
|
1395
1362
|
e.seen = e.seen || [], e.seen.includes(t))
|
|
1396
1363
|
return "[Circular]";
|
|
1397
1364
|
e.seen.push(t);
|
|
1398
|
-
let s = j(n.map((
|
|
1365
|
+
let s = j(n.map((i) => [i, t[i]]), e, ct);
|
|
1399
1366
|
return `${r}${o}${s ? ` { ${s} }` : ""}`;
|
|
1400
1367
|
}
|
|
1401
|
-
|
|
1368
|
+
c(ge, "inspectObject");
|
|
1402
1369
|
|
|
1403
1370
|
// ../node_modules/loupe/lib/html.js
|
|
1404
|
-
function
|
|
1371
|
+
function jo([t, e], n) {
|
|
1405
1372
|
return n.truncate -= 3, e ? `${n.stylize(String(t), "yellow")}=${n.stylize(`"${e}"`, "string")}` : `${n.stylize(String(t), "yellow")}`;
|
|
1406
1373
|
}
|
|
1407
|
-
|
|
1374
|
+
c(jo, "inspectAttribute");
|
|
1408
1375
|
function Bt(t, e) {
|
|
1409
1376
|
return j(t, e, zt, `
|
|
1410
1377
|
`);
|
|
1411
1378
|
}
|
|
1412
|
-
|
|
1379
|
+
c(Bt, "inspectHTMLCollection");
|
|
1413
1380
|
function zt(t, e) {
|
|
1414
|
-
let n = t.getAttributeNames(), r = t.tagName.toLowerCase(), o = e.stylize(`<${r}`, "special"), s = e.stylize(">", "special"),
|
|
1381
|
+
let n = t.getAttributeNames(), r = t.tagName.toLowerCase(), o = e.stylize(`<${r}`, "special"), s = e.stylize(">", "special"), i = e.stylize(
|
|
1415
1382
|
`</${r}>`, "special");
|
|
1416
1383
|
e.truncate -= r.length * 2 + 5;
|
|
1417
|
-
let
|
|
1418
|
-
n.length > 0 && (
|
|
1419
|
-
let
|
|
1420
|
-
return f && f.length >
|
|
1384
|
+
let l = "";
|
|
1385
|
+
n.length > 0 && (l += " ", l += j(n.map((m) => [m, t.getAttribute(m)]), e, jo, " ")), e.truncate -= l.length;
|
|
1386
|
+
let u = e.truncate, f = Bt(t.children, e);
|
|
1387
|
+
return f && f.length > u && (f = `${it}(${t.children.length})`), `${o}${l}${s}${f}${i}`;
|
|
1421
1388
|
}
|
|
1422
|
-
|
|
1389
|
+
c(zt, "inspectHTML");
|
|
1423
1390
|
|
|
1424
1391
|
// ../node_modules/loupe/lib/index.js
|
|
1425
|
-
var
|
|
1392
|
+
var Do = typeof Symbol == "function" && typeof Symbol.for == "function", he = Do ? Symbol.for("chai/inspect") : "@@chai/inspect", dt = !1;
|
|
1426
1393
|
try {
|
|
1427
1394
|
let t = require("util");
|
|
1428
1395
|
dt = t.inspect ? t.inspect.custom : !1;
|
|
1429
1396
|
} catch {
|
|
1430
1397
|
dt = !1;
|
|
1431
1398
|
}
|
|
1432
|
-
var
|
|
1433
|
-
undefined: /* @__PURE__ */
|
|
1434
|
-
null: /* @__PURE__ */
|
|
1435
|
-
boolean: /* @__PURE__ */
|
|
1436
|
-
Boolean: /* @__PURE__ */
|
|
1399
|
+
var pn = /* @__PURE__ */ new WeakMap(), gn = {}, hn = {
|
|
1400
|
+
undefined: /* @__PURE__ */ c((t, e) => e.stylize("undefined", "undefined"), "undefined"),
|
|
1401
|
+
null: /* @__PURE__ */ c((t, e) => e.stylize("null", "null"), "null"),
|
|
1402
|
+
boolean: /* @__PURE__ */ c((t, e) => e.stylize(String(t), "boolean"), "boolean"),
|
|
1403
|
+
Boolean: /* @__PURE__ */ c((t, e) => e.stylize(String(t), "boolean"), "Boolean"),
|
|
1437
1404
|
number: jt,
|
|
1438
1405
|
Number: jt,
|
|
1439
1406
|
bigint: Dt,
|
|
@@ -1450,11 +1417,11 @@ var dn = /* @__PURE__ */ new WeakMap(), bn = {}, Sn = {
|
|
|
1450
1417
|
Map: ue,
|
|
1451
1418
|
Set: ae,
|
|
1452
1419
|
RegExp: le,
|
|
1453
|
-
Promise:
|
|
1420
|
+
Promise: mn,
|
|
1454
1421
|
// WeakSet, WeakMap are totally opaque to us
|
|
1455
|
-
WeakSet: /* @__PURE__ */
|
|
1456
|
-
WeakMap: /* @__PURE__ */
|
|
1457
|
-
Arguments:
|
|
1422
|
+
WeakSet: /* @__PURE__ */ c((t, e) => e.stylize("WeakSet{\u2026}", "special"), "WeakSet"),
|
|
1423
|
+
WeakMap: /* @__PURE__ */ c((t, e) => e.stylize("WeakMap{\u2026}", "special"), "WeakMap"),
|
|
1424
|
+
Arguments: pe,
|
|
1458
1425
|
Int8Array: et,
|
|
1459
1426
|
Uint8Array: et,
|
|
1460
1427
|
Uint8ClampedArray: et,
|
|
@@ -1464,54 +1431,54 @@ var dn = /* @__PURE__ */ new WeakMap(), bn = {}, Sn = {
|
|
|
1464
1431
|
Uint32Array: et,
|
|
1465
1432
|
Float32Array: et,
|
|
1466
1433
|
Float64Array: et,
|
|
1467
|
-
Generator: /* @__PURE__ */
|
|
1468
|
-
DataView: /* @__PURE__ */
|
|
1469
|
-
ArrayBuffer: /* @__PURE__ */
|
|
1434
|
+
Generator: /* @__PURE__ */ c(() => "", "Generator"),
|
|
1435
|
+
DataView: /* @__PURE__ */ c(() => "", "DataView"),
|
|
1436
|
+
ArrayBuffer: /* @__PURE__ */ c(() => "", "ArrayBuffer"),
|
|
1470
1437
|
Error: ge,
|
|
1471
1438
|
HTMLCollection: Bt,
|
|
1472
1439
|
NodeList: Bt
|
|
1473
|
-
},
|
|
1474
|
-
e.depth, e) : "inspect" in t && typeof t.inspect == "function" ? t.inspect(e.depth, e) : "constructor" in t &&
|
|
1475
|
-
t.constructor)(t, e) :
|
|
1440
|
+
}, Fo = /* @__PURE__ */ c((t, e, n) => he in t && typeof t[he] == "function" ? t[he](e) : dt && dt in t && typeof t[dt] == "function" ? t[dt](
|
|
1441
|
+
e.depth, e) : "inspect" in t && typeof t.inspect == "function" ? t.inspect(e.depth, e) : "constructor" in t && pn.has(t.constructor) ? pn.get(
|
|
1442
|
+
t.constructor)(t, e) : gn[n] ? gn[n](t, e) : "", "inspectCustom"), ko = Object.prototype.toString;
|
|
1476
1443
|
function Ut(t, e = {}) {
|
|
1477
|
-
let n =
|
|
1478
|
-
if (o === "object" && (o =
|
|
1479
|
-
return
|
|
1444
|
+
let n = ln(e, Ut), { customInspect: r } = n, o = t === null ? "null" : typeof t;
|
|
1445
|
+
if (o === "object" && (o = ko.call(t).slice(8, -1)), o in hn)
|
|
1446
|
+
return hn[o](t, n);
|
|
1480
1447
|
if (r && t) {
|
|
1481
|
-
let
|
|
1482
|
-
if (
|
|
1483
|
-
return typeof
|
|
1448
|
+
let i = Fo(t, n, o);
|
|
1449
|
+
if (i)
|
|
1450
|
+
return typeof i == "string" ? i : Ut(i, n);
|
|
1484
1451
|
}
|
|
1485
1452
|
let s = t ? Object.getPrototypeOf(t) : !1;
|
|
1486
1453
|
return s === Object.prototype || s === null ? ft(t, n) : t && typeof HTMLElement == "function" && t instanceof HTMLElement ? zt(t, n) : "c\
|
|
1487
|
-
onstructor" in t ? t.constructor !== Object ?
|
|
1454
|
+
onstructor" in t ? t.constructor !== Object ? me(t, n) : ft(t, n) : t === Object(t) ? ft(t, n) : n.stylize(String(t), o);
|
|
1488
1455
|
}
|
|
1489
|
-
|
|
1456
|
+
c(Ut, "inspect");
|
|
1490
1457
|
|
|
1491
1458
|
// ../node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
|
|
1492
1459
|
var {
|
|
1493
|
-
AsymmetricMatcher:
|
|
1494
|
-
DOMCollection:
|
|
1495
|
-
DOMElement:
|
|
1496
|
-
Immutable:
|
|
1497
|
-
ReactElement:
|
|
1498
|
-
ReactTestComponent:
|
|
1499
|
-
} = Lt,
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1460
|
+
AsymmetricMatcher: zo,
|
|
1461
|
+
DOMCollection: Uo,
|
|
1462
|
+
DOMElement: Yo,
|
|
1463
|
+
Immutable: Wo,
|
|
1464
|
+
ReactElement: Vo,
|
|
1465
|
+
ReactTestComponent: Ko
|
|
1466
|
+
} = Lt, yn = [
|
|
1467
|
+
Ko,
|
|
1468
|
+
Vo,
|
|
1469
|
+
Yo,
|
|
1470
|
+
Uo,
|
|
1471
|
+
Wo,
|
|
1472
|
+
zo
|
|
1506
1473
|
];
|
|
1507
|
-
function
|
|
1474
|
+
function mt(t, e = 10, { maxLength: n, ...r } = {}) {
|
|
1508
1475
|
let o = n ?? 1e4, s;
|
|
1509
1476
|
try {
|
|
1510
1477
|
s = Z(t, {
|
|
1511
1478
|
maxDepth: e,
|
|
1512
1479
|
escapeString: !1,
|
|
1513
1480
|
// min: true,
|
|
1514
|
-
plugins:
|
|
1481
|
+
plugins: yn,
|
|
1515
1482
|
...r
|
|
1516
1483
|
});
|
|
1517
1484
|
} catch {
|
|
@@ -1520,103 +1487,103 @@ function pt(t, e = 10, { maxLength: n, ...r } = {}) {
|
|
|
1520
1487
|
maxDepth: e,
|
|
1521
1488
|
escapeString: !1,
|
|
1522
1489
|
// min: true,
|
|
1523
|
-
plugins:
|
|
1490
|
+
plugins: yn,
|
|
1524
1491
|
...r
|
|
1525
1492
|
});
|
|
1526
1493
|
}
|
|
1527
|
-
return s.length >= o && e > 1 ?
|
|
1494
|
+
return s.length >= o && e > 1 ? mt(t, Math.floor(e / 2)) : s;
|
|
1528
1495
|
}
|
|
1529
|
-
|
|
1530
|
-
var
|
|
1531
|
-
function
|
|
1496
|
+
c(mt, "stringify");
|
|
1497
|
+
var qo = /%[sdjifoOc%]/g;
|
|
1498
|
+
function dn(...t) {
|
|
1532
1499
|
if (typeof t[0] != "string") {
|
|
1533
1500
|
let s = [];
|
|
1534
|
-
for (let
|
|
1535
|
-
s.push(
|
|
1501
|
+
for (let i = 0; i < t.length; i++)
|
|
1502
|
+
s.push(Ot(t[i], { depth: 0, colors: !1 }));
|
|
1536
1503
|
return s.join(" ");
|
|
1537
1504
|
}
|
|
1538
|
-
let e = t.length, n = 1, r = t[0], o = String(r).replace(
|
|
1505
|
+
let e = t.length, n = 1, r = t[0], o = String(r).replace(qo, (s) => {
|
|
1539
1506
|
if (s === "%%")
|
|
1540
1507
|
return "%";
|
|
1541
1508
|
if (n >= e)
|
|
1542
1509
|
return s;
|
|
1543
1510
|
switch (s) {
|
|
1544
1511
|
case "%s": {
|
|
1545
|
-
let
|
|
1546
|
-
return typeof
|
|
1547
|
-
null ?
|
|
1512
|
+
let i = t[n++];
|
|
1513
|
+
return typeof i == "bigint" ? `${i.toString()}n` : typeof i == "number" && i === 0 && 1 / i < 0 ? "-0" : typeof i == "object" && i !==
|
|
1514
|
+
null ? Ot(i, { depth: 0, colors: !1 }) : String(i);
|
|
1548
1515
|
}
|
|
1549
1516
|
case "%d": {
|
|
1550
|
-
let
|
|
1551
|
-
return typeof
|
|
1517
|
+
let i = t[n++];
|
|
1518
|
+
return typeof i == "bigint" ? `${i.toString()}n` : Number(i).toString();
|
|
1552
1519
|
}
|
|
1553
1520
|
case "%i": {
|
|
1554
|
-
let
|
|
1555
|
-
return typeof
|
|
1521
|
+
let i = t[n++];
|
|
1522
|
+
return typeof i == "bigint" ? `${i.toString()}n` : Number.parseInt(String(i)).toString();
|
|
1556
1523
|
}
|
|
1557
1524
|
case "%f":
|
|
1558
1525
|
return Number.parseFloat(String(t[n++])).toString();
|
|
1559
1526
|
case "%o":
|
|
1560
|
-
return
|
|
1527
|
+
return Ot(t[n++], { showHidden: !0, showProxy: !0 });
|
|
1561
1528
|
case "%O":
|
|
1562
|
-
return
|
|
1529
|
+
return Ot(t[n++]);
|
|
1563
1530
|
case "%c":
|
|
1564
1531
|
return n++, "";
|
|
1565
1532
|
case "%j":
|
|
1566
1533
|
try {
|
|
1567
1534
|
return JSON.stringify(t[n++]);
|
|
1568
|
-
} catch (
|
|
1569
|
-
let
|
|
1535
|
+
} catch (i) {
|
|
1536
|
+
let l = i.message;
|
|
1570
1537
|
if (
|
|
1571
1538
|
// chromium
|
|
1572
|
-
|
|
1539
|
+
l.includes("circular structure") || l.includes("cyclic structures") || l.includes("cyclic object")
|
|
1573
1540
|
)
|
|
1574
1541
|
return "[Circular]";
|
|
1575
|
-
throw
|
|
1542
|
+
throw i;
|
|
1576
1543
|
}
|
|
1577
1544
|
default:
|
|
1578
1545
|
return s;
|
|
1579
1546
|
}
|
|
1580
1547
|
});
|
|
1581
1548
|
for (let s = t[n]; n < e; s = t[++n])
|
|
1582
|
-
s === null || typeof s != "object" ? o += ` ${s}` : o += ` ${
|
|
1549
|
+
s === null || typeof s != "object" ? o += ` ${s}` : o += ` ${Ot(s)}`;
|
|
1583
1550
|
return o;
|
|
1584
1551
|
}
|
|
1585
|
-
|
|
1586
|
-
function
|
|
1552
|
+
c(dn, "format");
|
|
1553
|
+
function Ot(t, e = {}) {
|
|
1587
1554
|
return e.truncate === 0 && (e.truncate = Number.POSITIVE_INFINITY), Ut(t, e);
|
|
1588
1555
|
}
|
|
1589
|
-
|
|
1590
|
-
function
|
|
1556
|
+
c(Ot, "inspect");
|
|
1557
|
+
function bn(t) {
|
|
1591
1558
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1592
1559
|
}
|
|
1593
|
-
|
|
1560
|
+
c(bn, "getDefaultExportFromCjs");
|
|
1594
1561
|
|
|
1595
1562
|
// ../node_modules/@vitest/utils/dist/helpers.js
|
|
1596
|
-
function
|
|
1563
|
+
function Go(t) {
|
|
1597
1564
|
return t === Object.prototype || t === Function.prototype || t === RegExp.prototype;
|
|
1598
1565
|
}
|
|
1599
|
-
|
|
1566
|
+
c(Go, "isFinalObj");
|
|
1600
1567
|
function Yt(t) {
|
|
1601
1568
|
return Object.prototype.toString.apply(t).slice(8, -1);
|
|
1602
1569
|
}
|
|
1603
|
-
|
|
1604
|
-
function
|
|
1570
|
+
c(Yt, "getType");
|
|
1571
|
+
function Ho(t, e) {
|
|
1605
1572
|
let n = typeof e == "function" ? e : (r) => e.add(r);
|
|
1606
1573
|
Object.getOwnPropertyNames(t).forEach(n), Object.getOwnPropertySymbols(t).forEach(n);
|
|
1607
1574
|
}
|
|
1608
|
-
|
|
1575
|
+
c(Ho, "collectOwnProperties");
|
|
1609
1576
|
function de(t) {
|
|
1610
1577
|
let e = /* @__PURE__ */ new Set();
|
|
1611
|
-
return
|
|
1578
|
+
return Go(t) ? [] : (Ho(t, e), Array.from(e));
|
|
1612
1579
|
}
|
|
1613
|
-
|
|
1614
|
-
var
|
|
1615
|
-
function be(t, e =
|
|
1580
|
+
c(de, "getOwnProperties");
|
|
1581
|
+
var Sn = { forceWritable: !1 };
|
|
1582
|
+
function be(t, e = Sn) {
|
|
1616
1583
|
return ye(t, /* @__PURE__ */ new WeakMap(), e);
|
|
1617
1584
|
}
|
|
1618
|
-
|
|
1619
|
-
function ye(t, e, n =
|
|
1585
|
+
c(be, "deepClone");
|
|
1586
|
+
function ye(t, e, n = Sn) {
|
|
1620
1587
|
let r, o;
|
|
1621
1588
|
if (e.has(t))
|
|
1622
1589
|
return e.get(t);
|
|
@@ -1628,34 +1595,34 @@ function ye(t, e, n = wn) {
|
|
|
1628
1595
|
if (Object.prototype.toString.call(t) === "[object Object]") {
|
|
1629
1596
|
o = Object.create(Object.getPrototypeOf(t)), e.set(t, o);
|
|
1630
1597
|
let s = de(t);
|
|
1631
|
-
for (let
|
|
1632
|
-
let
|
|
1633
|
-
if (!
|
|
1598
|
+
for (let i of s) {
|
|
1599
|
+
let l = Object.getOwnPropertyDescriptor(t, i);
|
|
1600
|
+
if (!l)
|
|
1634
1601
|
continue;
|
|
1635
|
-
let
|
|
1636
|
-
n.forceWritable ? Object.defineProperty(o,
|
|
1637
|
-
enumerable:
|
|
1602
|
+
let u = ye(t[i], e, n);
|
|
1603
|
+
n.forceWritable ? Object.defineProperty(o, i, {
|
|
1604
|
+
enumerable: l.enumerable,
|
|
1638
1605
|
configurable: !0,
|
|
1639
1606
|
writable: !0,
|
|
1640
|
-
value:
|
|
1641
|
-
}) : "get" in
|
|
1642
|
-
...
|
|
1607
|
+
value: u
|
|
1608
|
+
}) : "get" in l ? Object.defineProperty(o, i, {
|
|
1609
|
+
...l,
|
|
1643
1610
|
get() {
|
|
1644
|
-
return
|
|
1611
|
+
return u;
|
|
1645
1612
|
}
|
|
1646
|
-
}) : Object.defineProperty(o,
|
|
1647
|
-
...
|
|
1648
|
-
value:
|
|
1613
|
+
}) : Object.defineProperty(o, i, {
|
|
1614
|
+
...l,
|
|
1615
|
+
value: u
|
|
1649
1616
|
});
|
|
1650
1617
|
}
|
|
1651
1618
|
return o;
|
|
1652
1619
|
}
|
|
1653
1620
|
return t;
|
|
1654
1621
|
}
|
|
1655
|
-
|
|
1622
|
+
c(ye, "clone");
|
|
1656
1623
|
|
|
1657
1624
|
// ../node_modules/@vitest/utils/dist/diff.js
|
|
1658
|
-
function
|
|
1625
|
+
function _n(t) {
|
|
1659
1626
|
if (t === void 0)
|
|
1660
1627
|
return "undefined";
|
|
1661
1628
|
if (t === null)
|
|
@@ -1688,24 +1655,24 @@ function Cn(t) {
|
|
|
1688
1655
|
return "symbol";
|
|
1689
1656
|
throw new Error(`value of unknown type: ${t}`);
|
|
1690
1657
|
}
|
|
1691
|
-
|
|
1658
|
+
c(_n, "getType");
|
|
1692
1659
|
var z = -1, F = 1, M = 0, I = class {
|
|
1693
1660
|
static {
|
|
1694
|
-
|
|
1661
|
+
c(this, "Diff");
|
|
1695
1662
|
}
|
|
1696
1663
|
0;
|
|
1697
1664
|
1;
|
|
1698
1665
|
constructor(e, n) {
|
|
1699
1666
|
this[0] = e, this[1] = n;
|
|
1700
1667
|
}
|
|
1701
|
-
},
|
|
1668
|
+
}, Jo = /* @__PURE__ */ c(function(t, e) {
|
|
1702
1669
|
if (!t || !e || t.charAt(0) !== e.charAt(0))
|
|
1703
1670
|
return 0;
|
|
1704
1671
|
let n = 0, r = Math.min(t.length, e.length), o = r, s = 0;
|
|
1705
1672
|
for (; n < o; )
|
|
1706
1673
|
t.substring(s, o) === e.substring(s, o) ? (n = o, s = n) : r = o, o = Math.floor((r - n) / 2 + n);
|
|
1707
1674
|
return o;
|
|
1708
|
-
}, "diff_commonPrefix"),
|
|
1675
|
+
}, "diff_commonPrefix"), jn = /* @__PURE__ */ c(function(t, e) {
|
|
1709
1676
|
if (!t || !e || t.charAt(t.length - 1) !== e.charAt(e.length - 1))
|
|
1710
1677
|
return 0;
|
|
1711
1678
|
let n = 0, r = Math.min(t.length, e.length), o = r, s = 0;
|
|
@@ -1713,7 +1680,7 @@ var z = -1, F = 1, M = 0, I = class {
|
|
|
1713
1680
|
t.substring(t.length - o, t.length - s) === e.substring(e.length - o, e.length - s) ? (n = o, s = n) : r = o, o = Math.floor((r - n) / 2 +
|
|
1714
1681
|
n);
|
|
1715
1682
|
return o;
|
|
1716
|
-
}, "diff_commonSuffix"),
|
|
1683
|
+
}, "diff_commonSuffix"), En = /* @__PURE__ */ c(function(t, e) {
|
|
1717
1684
|
let n = t.length, r = e.length;
|
|
1718
1685
|
if (n === 0 || r === 0)
|
|
1719
1686
|
return 0;
|
|
@@ -1721,68 +1688,68 @@ var z = -1, F = 1, M = 0, I = class {
|
|
|
1721
1688
|
let o = Math.min(n, r);
|
|
1722
1689
|
if (t === e)
|
|
1723
1690
|
return o;
|
|
1724
|
-
let s = 0,
|
|
1691
|
+
let s = 0, i = 1;
|
|
1725
1692
|
for (; ; ) {
|
|
1726
|
-
let
|
|
1727
|
-
if (
|
|
1693
|
+
let l = t.substring(o - i), u = e.indexOf(l);
|
|
1694
|
+
if (u === -1)
|
|
1728
1695
|
return s;
|
|
1729
|
-
|
|
1696
|
+
i += u, (u === 0 || t.substring(o - i) === e.substring(0, i)) && (s = i, i++);
|
|
1730
1697
|
}
|
|
1731
|
-
}, "diff_commonOverlap_"),
|
|
1732
|
-
let e = !1, n = [], r = 0, o = null, s = 0,
|
|
1698
|
+
}, "diff_commonOverlap_"), Xo = /* @__PURE__ */ c(function(t) {
|
|
1699
|
+
let e = !1, n = [], r = 0, o = null, s = 0, i = 0, l = 0, u = 0, f = 0;
|
|
1733
1700
|
for (; s < t.length; )
|
|
1734
|
-
t[s][0] === M ? (n[r++] = s,
|
|
1735
|
-
o.length <= Math.max(
|
|
1701
|
+
t[s][0] === M ? (n[r++] = s, i = u, l = f, u = 0, f = 0, o = t[s][1]) : (t[s][0] === F ? u += t[s][1].length : f += t[s][1].length, o &&
|
|
1702
|
+
o.length <= Math.max(i, l) && o.length <= Math.max(u, f) && (t.splice(
|
|
1736
1703
|
n[r - 1],
|
|
1737
1704
|
0,
|
|
1738
1705
|
new I(z, o)
|
|
1739
|
-
), t[n[r - 1] + 1][0] = F, r--, r--, s = r > 0 ? n[r - 1] : -1,
|
|
1740
|
-
for (e &&
|
|
1706
|
+
), t[n[r - 1] + 1][0] = F, r--, r--, s = r > 0 ? n[r - 1] : -1, i = 0, l = 0, u = 0, f = 0, o = null, e = !0)), s++;
|
|
1707
|
+
for (e && Dn(t), vo(t), s = 1; s < t.length; ) {
|
|
1741
1708
|
if (t[s - 1][0] === z && t[s][0] === F) {
|
|
1742
|
-
let
|
|
1743
|
-
|
|
1709
|
+
let m = t[s - 1][1], a = t[s][1], S = En(m, a), g = En(a, m);
|
|
1710
|
+
S >= g ? (S >= m.length / 2 || S >= a.length / 2) && (t.splice(
|
|
1744
1711
|
s,
|
|
1745
1712
|
0,
|
|
1746
|
-
new I(M, a.substring(0,
|
|
1747
|
-
), t[s - 1][1] =
|
|
1713
|
+
new I(M, a.substring(0, S))
|
|
1714
|
+
), t[s - 1][1] = m.substring(
|
|
1748
1715
|
0,
|
|
1749
|
-
|
|
1750
|
-
), t[s + 1][1] = a.substring(
|
|
1716
|
+
m.length - S
|
|
1717
|
+
), t[s + 1][1] = a.substring(S), s++) : (g >= m.length / 2 || g >= a.length / 2) && (t.splice(
|
|
1751
1718
|
s,
|
|
1752
1719
|
0,
|
|
1753
|
-
new I(M,
|
|
1720
|
+
new I(M, m.substring(0, g))
|
|
1754
1721
|
), t[s - 1][0] = F, t[s - 1][1] = a.substring(
|
|
1755
1722
|
0,
|
|
1756
|
-
a.length -
|
|
1757
|
-
), t[s + 1][0] = z, t[s + 1][1] =
|
|
1723
|
+
a.length - g
|
|
1724
|
+
), t[s + 1][0] = z, t[s + 1][1] = m.substring(g), s++), s++;
|
|
1758
1725
|
}
|
|
1759
1726
|
s++;
|
|
1760
1727
|
}
|
|
1761
|
-
}, "diff_cleanupSemantic"),
|
|
1762
|
-
function
|
|
1728
|
+
}, "diff_cleanupSemantic"), On = /[^a-z0-9]/i, Cn = /\s/, wn = /[\r\n]/, Zo = /\n\r?\n$/, Qo = /^\r?\n\r?\n/;
|
|
1729
|
+
function vo(t) {
|
|
1763
1730
|
let e = 1;
|
|
1764
1731
|
for (; e < t.length - 1; ) {
|
|
1765
1732
|
if (t[e - 1][0] === M && t[e + 1][0] === M) {
|
|
1766
|
-
let n = t[e - 1][1], r = t[e][1], o = t[e + 1][1], s =
|
|
1733
|
+
let n = t[e - 1][1], r = t[e][1], o = t[e + 1][1], s = jn(n, r);
|
|
1767
1734
|
if (s) {
|
|
1768
|
-
let
|
|
1769
|
-
n = n.substring(0, n.length - s), r =
|
|
1735
|
+
let m = r.substring(r.length - s);
|
|
1736
|
+
n = n.substring(0, n.length - s), r = m + r.substring(0, r.length - s), o = m + o;
|
|
1770
1737
|
}
|
|
1771
|
-
let
|
|
1738
|
+
let i = n, l = r, u = o, f = Wt(n, r) + Wt(r, o);
|
|
1772
1739
|
for (; r.charAt(0) === o.charAt(0); ) {
|
|
1773
1740
|
n += r.charAt(0), r = r.substring(1) + o.charAt(0), o = o.substring(1);
|
|
1774
|
-
let
|
|
1775
|
-
|
|
1741
|
+
let m = Wt(n, r) + Wt(r, o);
|
|
1742
|
+
m >= f && (f = m, i = n, l = r, u = o);
|
|
1776
1743
|
}
|
|
1777
|
-
t[e - 1][1] !==
|
|
1744
|
+
t[e - 1][1] !== i && (i ? t[e - 1][1] = i : (t.splice(e - 1, 1), e--), t[e][1] = l, u ? t[e + 1][1] = u : (t.splice(e + 1, 1), e--));
|
|
1778
1745
|
}
|
|
1779
1746
|
e++;
|
|
1780
1747
|
}
|
|
1781
1748
|
}
|
|
1782
|
-
|
|
1783
|
-
function
|
|
1749
|
+
c(vo, "diff_cleanupSemanticLossless");
|
|
1750
|
+
function Dn(t) {
|
|
1784
1751
|
t.push(new I(M, ""));
|
|
1785
|
-
let e = 0, n = 0, r = 0, o = "", s = "",
|
|
1752
|
+
let e = 0, n = 0, r = 0, o = "", s = "", i;
|
|
1786
1753
|
for (; e < t.length; )
|
|
1787
1754
|
switch (t[e][0]) {
|
|
1788
1755
|
case F:
|
|
@@ -1792,105 +1759,105 @@ function zn(t) {
|
|
|
1792
1759
|
n++, o += t[e][1], e++;
|
|
1793
1760
|
break;
|
|
1794
1761
|
case M:
|
|
1795
|
-
n + r > 1 ? (n !== 0 && r !== 0 && (
|
|
1796
|
-
substring(0,
|
|
1762
|
+
n + r > 1 ? (n !== 0 && r !== 0 && (i = Jo(s, o), i !== 0 && (e - n - r > 0 && t[e - n - r - 1][0] === M ? t[e - n - r - 1][1] += s.
|
|
1763
|
+
substring(0, i) : (t.splice(
|
|
1797
1764
|
0,
|
|
1798
1765
|
0,
|
|
1799
|
-
new I(M, s.substring(0,
|
|
1800
|
-
), e++), s = s.substring(
|
|
1766
|
+
new I(M, s.substring(0, i))
|
|
1767
|
+
), e++), s = s.substring(i), o = o.substring(i)), i = jn(s, o), i !== 0 && (t[e][1] = s.substring(s.length - i) + t[e][1], s = s.substring(
|
|
1801
1768
|
0,
|
|
1802
|
-
s.length -
|
|
1769
|
+
s.length - i
|
|
1803
1770
|
), o = o.substring(
|
|
1804
1771
|
0,
|
|
1805
|
-
o.length -
|
|
1772
|
+
o.length - i
|
|
1806
1773
|
))), e -= n + r, t.splice(e, n + r), o.length && (t.splice(e, 0, new I(z, o)), e++), s.length && (t.splice(e, 0, new I(F, s)), e++),
|
|
1807
1774
|
e++) : e !== 0 && t[e - 1][0] === M ? (t[e - 1][1] += t[e][1], t.splice(e, 1)) : e++, r = 0, n = 0, o = "", s = "";
|
|
1808
1775
|
break;
|
|
1809
1776
|
}
|
|
1810
1777
|
t[t.length - 1][1] === "" && t.pop();
|
|
1811
|
-
let
|
|
1778
|
+
let l = !1;
|
|
1812
1779
|
for (e = 1; e < t.length - 1; )
|
|
1813
1780
|
t[e - 1][0] === M && t[e + 1][0] === M && (t[e][1].substring(
|
|
1814
1781
|
t[e][1].length - t[e - 1][1].length
|
|
1815
1782
|
) === t[e - 1][1] ? (t[e][1] = t[e - 1][1] + t[e][1].substring(
|
|
1816
1783
|
0,
|
|
1817
1784
|
t[e][1].length - t[e - 1][1].length
|
|
1818
|
-
), t[e + 1][1] = t[e - 1][1] + t[e + 1][1], t.splice(e - 1, 1),
|
|
1819
|
-
1][1] += t[e + 1][1], t[e][1] = t[e][1].substring(t[e + 1][1].length) + t[e + 1][1], t.splice(e + 1, 1),
|
|
1820
|
-
|
|
1785
|
+
), t[e + 1][1] = t[e - 1][1] + t[e + 1][1], t.splice(e - 1, 1), l = !0) : t[e][1].substring(0, t[e + 1][1].length) === t[e + 1][1] && (t[e -
|
|
1786
|
+
1][1] += t[e + 1][1], t[e][1] = t[e][1].substring(t[e + 1][1].length) + t[e + 1][1], t.splice(e + 1, 1), l = !0)), e++;
|
|
1787
|
+
l && Dn(t);
|
|
1821
1788
|
}
|
|
1822
|
-
|
|
1789
|
+
c(Dn, "diff_cleanupMerge");
|
|
1823
1790
|
function Wt(t, e) {
|
|
1824
1791
|
if (!t || !e)
|
|
1825
1792
|
return 6;
|
|
1826
|
-
let n = t.charAt(t.length - 1), r = e.charAt(0), o = n.match(
|
|
1827
|
-
match(
|
|
1828
|
-
return
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
var
|
|
1832
|
-
ture without calling `toJSON` instead.", Vt = {},
|
|
1833
|
-
function
|
|
1834
|
-
if (
|
|
1835
|
-
|
|
1793
|
+
let n = t.charAt(t.length - 1), r = e.charAt(0), o = n.match(On), s = r.match(On), i = o && n.match(Cn), l = s && r.match(Cn), u = i && n.
|
|
1794
|
+
match(wn), f = l && r.match(wn), m = u && t.match(Zo), a = f && e.match(Qo);
|
|
1795
|
+
return m || a ? 5 : u || f ? 4 : o && !i && l ? 3 : i || l ? 2 : o || s ? 1 : 0;
|
|
1796
|
+
}
|
|
1797
|
+
c(Wt, "diff_cleanupSemanticScore_");
|
|
1798
|
+
var Fn = "Compared values have no visual difference.", ts = "Compared values serialize to the same structure.\nPrinting internal object struc\
|
|
1799
|
+
ture without calling `toJSON` instead.", Vt = {}, $n;
|
|
1800
|
+
function es() {
|
|
1801
|
+
if ($n) return Vt;
|
|
1802
|
+
$n = 1, Object.defineProperty(Vt, "__esModule", {
|
|
1836
1803
|
value: !0
|
|
1837
|
-
}), Vt.default =
|
|
1838
|
-
let t = "diff-sequences", e = 0, n = /* @__PURE__ */
|
|
1804
|
+
}), Vt.default = S;
|
|
1805
|
+
let t = "diff-sequences", e = 0, n = /* @__PURE__ */ c((g, h, y, p, b) => {
|
|
1839
1806
|
let E = 0;
|
|
1840
|
-
for (;
|
|
1841
|
-
|
|
1807
|
+
for (; g < h && y < p && b(g, y); )
|
|
1808
|
+
g += 1, y += 1, E += 1;
|
|
1842
1809
|
return E;
|
|
1843
|
-
}, "countCommonItemsF"), r = /* @__PURE__ */
|
|
1810
|
+
}, "countCommonItemsF"), r = /* @__PURE__ */ c((g, h, y, p, b) => {
|
|
1844
1811
|
let E = 0;
|
|
1845
|
-
for (;
|
|
1846
|
-
|
|
1812
|
+
for (; g <= h && y <= p && b(h, p); )
|
|
1813
|
+
h -= 1, p -= 1, E += 1;
|
|
1847
1814
|
return E;
|
|
1848
|
-
}, "countCommonItemsR"), o = /* @__PURE__ */
|
|
1849
|
-
let d = 0,
|
|
1815
|
+
}, "countCommonItemsR"), o = /* @__PURE__ */ c((g, h, y, p, b, E, $) => {
|
|
1816
|
+
let d = 0, _ = -g, w = E[d], O = w;
|
|
1850
1817
|
E[d] += n(
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1818
|
+
w + 1,
|
|
1819
|
+
h,
|
|
1820
|
+
p + w - _ + 1,
|
|
1854
1821
|
y,
|
|
1855
1822
|
b
|
|
1856
1823
|
);
|
|
1857
|
-
let N =
|
|
1858
|
-
for (d += 1,
|
|
1859
|
-
if (d !==
|
|
1860
|
-
|
|
1861
|
-
else if (
|
|
1824
|
+
let N = g < $ ? g : $;
|
|
1825
|
+
for (d += 1, _ += 2; d <= N; d += 1, _ += 2) {
|
|
1826
|
+
if (d !== g && O < E[d])
|
|
1827
|
+
w = E[d];
|
|
1828
|
+
else if (w = O + 1, h <= w)
|
|
1862
1829
|
return d - 1;
|
|
1863
|
-
O = E[d], E[d] =
|
|
1830
|
+
O = E[d], E[d] = w + n(w + 1, h, p + w - _ + 1, y, b);
|
|
1864
1831
|
}
|
|
1865
1832
|
return $;
|
|
1866
|
-
}, "extendPathsF"), s = /* @__PURE__ */
|
|
1867
|
-
let d = 0,
|
|
1833
|
+
}, "extendPathsF"), s = /* @__PURE__ */ c((g, h, y, p, b, E, $) => {
|
|
1834
|
+
let d = 0, _ = g, w = E[d], O = w;
|
|
1868
1835
|
E[d] -= r(
|
|
1869
|
-
|
|
1870
|
-
|
|
1836
|
+
h,
|
|
1837
|
+
w - 1,
|
|
1871
1838
|
y,
|
|
1872
|
-
|
|
1839
|
+
p + w - _ - 1,
|
|
1873
1840
|
b
|
|
1874
1841
|
);
|
|
1875
|
-
let N =
|
|
1876
|
-
for (d += 1,
|
|
1877
|
-
if (d !==
|
|
1878
|
-
|
|
1879
|
-
else if (
|
|
1842
|
+
let N = g < $ ? g : $;
|
|
1843
|
+
for (d += 1, _ -= 2; d <= N; d += 1, _ -= 2) {
|
|
1844
|
+
if (d !== g && E[d] < O)
|
|
1845
|
+
w = E[d];
|
|
1846
|
+
else if (w = O - 1, w < h)
|
|
1880
1847
|
return d - 1;
|
|
1881
|
-
O = E[d], E[d] =
|
|
1882
|
-
|
|
1883
|
-
|
|
1848
|
+
O = E[d], E[d] = w - r(
|
|
1849
|
+
h,
|
|
1850
|
+
w - 1,
|
|
1884
1851
|
y,
|
|
1885
|
-
|
|
1852
|
+
p + w - _ - 1,
|
|
1886
1853
|
b
|
|
1887
1854
|
);
|
|
1888
1855
|
}
|
|
1889
1856
|
return $;
|
|
1890
|
-
}, "extendPathsR"),
|
|
1891
|
-
let N =
|
|
1892
|
-
for (let L = 0, x = -
|
|
1893
|
-
let J = L === 0 || L !==
|
|
1857
|
+
}, "extendPathsR"), i = /* @__PURE__ */ c((g, h, y, p, b, E, $, d, _, w, O) => {
|
|
1858
|
+
let N = p - h, G = y - h, P = b - p - G, k = -P - (g - 1), H = -P + (g - 1), Y = e, R = g < d ? g : d;
|
|
1859
|
+
for (let L = 0, x = -g; L <= R; L += 1, x += 2) {
|
|
1860
|
+
let J = L === 0 || L !== g && Y < $[L], D = J ? $[L] : Y, V = J ? D : D + 1, rt = N + V - x, K = n(
|
|
1894
1861
|
V + 1,
|
|
1895
1862
|
y,
|
|
1896
1863
|
rt + 1,
|
|
@@ -1898,41 +1865,41 @@ function ys() {
|
|
|
1898
1865
|
E
|
|
1899
1866
|
), q = V + K;
|
|
1900
1867
|
if (Y = $[L], $[L] = q, k <= x && x <= H) {
|
|
1901
|
-
let st = (
|
|
1902
|
-
if (st <=
|
|
1868
|
+
let st = (g - 1 - (x + P)) / 2;
|
|
1869
|
+
if (st <= w && _[st] - 1 <= q) {
|
|
1903
1870
|
let X = N + D - (J ? x + 1 : x - 1), W = r(
|
|
1904
|
-
|
|
1871
|
+
h,
|
|
1905
1872
|
D,
|
|
1906
|
-
|
|
1873
|
+
p,
|
|
1907
1874
|
X,
|
|
1908
1875
|
E
|
|
1909
1876
|
), ot = D - W, ht = X - W, ut = ot + 1, _t = ht + 1;
|
|
1910
|
-
O.nChangePreceding =
|
|
1877
|
+
O.nChangePreceding = g - 1, g - 1 === ut + _t - h - p ? (O.aEndPreceding = h, O.bEndPreceding = p) : (O.aEndPreceding = ut, O.bEndPreceding =
|
|
1911
1878
|
_t), O.nCommonPreceding = W, W !== 0 && (O.aCommonPreceding = ut, O.bCommonPreceding = _t), O.nCommonFollowing = K, K !== 0 && (O.
|
|
1912
1879
|
aCommonFollowing = V + 1, O.bCommonFollowing = rt + 1);
|
|
1913
|
-
let Ct = q + 1,
|
|
1914
|
-
return O.nChangeFollowing =
|
|
1915
|
-
Ct, O.bStartFollowing =
|
|
1880
|
+
let Ct = q + 1, wt = rt + K + 1;
|
|
1881
|
+
return O.nChangeFollowing = g - 1, g - 1 === y + b - Ct - wt ? (O.aStartFollowing = y, O.bStartFollowing = b) : (O.aStartFollowing =
|
|
1882
|
+
Ct, O.bStartFollowing = wt), !0;
|
|
1916
1883
|
}
|
|
1917
1884
|
}
|
|
1918
1885
|
}
|
|
1919
1886
|
return !1;
|
|
1920
|
-
}, "extendOverlappablePathsF"),
|
|
1921
|
-
let N = b - y, G = y -
|
|
1922
|
-
for (let L = 0, x =
|
|
1923
|
-
let J = L === 0 || L !==
|
|
1924
|
-
|
|
1887
|
+
}, "extendOverlappablePathsF"), l = /* @__PURE__ */ c((g, h, y, p, b, E, $, d, _, w, O) => {
|
|
1888
|
+
let N = b - y, G = y - h, P = b - p - G, k = P - g, H = P + g, Y = e, R = g < w ? g : w;
|
|
1889
|
+
for (let L = 0, x = g; L <= R; L += 1, x -= 2) {
|
|
1890
|
+
let J = L === 0 || L !== g && _[L] < Y, D = J ? _[L] : Y, V = J ? D : D - 1, rt = N + V - x, K = r(
|
|
1891
|
+
h,
|
|
1925
1892
|
V - 1,
|
|
1926
|
-
|
|
1893
|
+
p,
|
|
1927
1894
|
rt - 1,
|
|
1928
1895
|
E
|
|
1929
1896
|
), q = V - K;
|
|
1930
|
-
if (Y =
|
|
1931
|
-
let st = (
|
|
1897
|
+
if (Y = _[L], _[L] = q, k <= x && x <= H) {
|
|
1898
|
+
let st = (g + (x - P)) / 2;
|
|
1932
1899
|
if (st <= d && q - 1 <= $[st]) {
|
|
1933
1900
|
let X = rt - K;
|
|
1934
|
-
if (O.nChangePreceding =
|
|
1935
|
-
X), O.nCommonPreceding = K, K !== 0 && (O.aCommonPreceding = q, O.bCommonPreceding = X), O.nChangeFollowing =
|
|
1901
|
+
if (O.nChangePreceding = g, g === q + X - h - p ? (O.aEndPreceding = h, O.bEndPreceding = p) : (O.aEndPreceding = q, O.bEndPreceding =
|
|
1902
|
+
X), O.nCommonPreceding = K, K !== 0 && (O.aCommonPreceding = q, O.bCommonPreceding = X), O.nChangeFollowing = g - 1, g === 1)
|
|
1936
1903
|
O.nCommonFollowing = 0, O.aStartFollowing = y, O.bStartFollowing = b;
|
|
1937
1904
|
else {
|
|
1938
1905
|
let W = N + D - (J ? x - 1 : x + 1), ot = n(
|
|
@@ -1944,98 +1911,98 @@ function ys() {
|
|
|
1944
1911
|
);
|
|
1945
1912
|
O.nCommonFollowing = ot, ot !== 0 && (O.aCommonFollowing = D, O.bCommonFollowing = W);
|
|
1946
1913
|
let ht = D + ot, ut = W + ot;
|
|
1947
|
-
|
|
1914
|
+
g - 1 === y + b - ht - ut ? (O.aStartFollowing = y, O.bStartFollowing = b) : (O.aStartFollowing = ht, O.bStartFollowing = ut);
|
|
1948
1915
|
}
|
|
1949
1916
|
return !0;
|
|
1950
1917
|
}
|
|
1951
1918
|
}
|
|
1952
1919
|
}
|
|
1953
1920
|
return !1;
|
|
1954
|
-
}, "extendOverlappablePathsR"),
|
|
1955
|
-
let
|
|
1956
|
-
if ($[0] =
|
|
1957
|
-
let H = (
|
|
1921
|
+
}, "extendOverlappablePathsR"), u = /* @__PURE__ */ c((g, h, y, p, b, E, $, d, _) => {
|
|
1922
|
+
let w = p - h, O = b - y, N = y - h, G = b - p, Q = G - N, P = N, k = N;
|
|
1923
|
+
if ($[0] = h - 1, d[0] = y, Q % 2 === 0) {
|
|
1924
|
+
let H = (g || Q) / 2, Y = (N + G) / 2;
|
|
1958
1925
|
for (let R = 1; R <= Y; R += 1)
|
|
1959
|
-
if (P = o(R, y, b,
|
|
1960
|
-
k = s(R,
|
|
1926
|
+
if (P = o(R, y, b, w, E, $, P), R < H)
|
|
1927
|
+
k = s(R, h, p, O, E, d, k);
|
|
1961
1928
|
else if (
|
|
1962
1929
|
// If a reverse path overlaps a forward path in the same diagonal,
|
|
1963
1930
|
// return a division of the index intervals at the middle change.
|
|
1964
|
-
|
|
1931
|
+
l(
|
|
1965
1932
|
R,
|
|
1966
|
-
|
|
1933
|
+
h,
|
|
1967
1934
|
y,
|
|
1968
|
-
|
|
1935
|
+
p,
|
|
1969
1936
|
b,
|
|
1970
1937
|
E,
|
|
1971
1938
|
$,
|
|
1972
1939
|
P,
|
|
1973
1940
|
d,
|
|
1974
1941
|
k,
|
|
1975
|
-
|
|
1942
|
+
_
|
|
1976
1943
|
)
|
|
1977
1944
|
)
|
|
1978
1945
|
return;
|
|
1979
1946
|
} else {
|
|
1980
|
-
let H = ((
|
|
1981
|
-
for (P = o(R, y, b,
|
|
1947
|
+
let H = ((g || Q) + 1) / 2, Y = (N + G + 1) / 2, R = 1;
|
|
1948
|
+
for (P = o(R, y, b, w, E, $, P), R += 1; R <= Y; R += 1)
|
|
1982
1949
|
if (k = s(
|
|
1983
1950
|
R - 1,
|
|
1984
|
-
|
|
1985
|
-
|
|
1951
|
+
h,
|
|
1952
|
+
p,
|
|
1986
1953
|
O,
|
|
1987
1954
|
E,
|
|
1988
1955
|
d,
|
|
1989
1956
|
k
|
|
1990
1957
|
), R < H)
|
|
1991
|
-
P = o(R, y, b,
|
|
1958
|
+
P = o(R, y, b, w, E, $, P);
|
|
1992
1959
|
else if (
|
|
1993
1960
|
// If a forward path overlaps a reverse path in the same diagonal,
|
|
1994
1961
|
// return a division of the index intervals at the middle change.
|
|
1995
|
-
|
|
1962
|
+
i(
|
|
1996
1963
|
R,
|
|
1997
|
-
|
|
1964
|
+
h,
|
|
1998
1965
|
y,
|
|
1999
|
-
|
|
1966
|
+
p,
|
|
2000
1967
|
b,
|
|
2001
1968
|
E,
|
|
2002
1969
|
$,
|
|
2003
1970
|
P,
|
|
2004
1971
|
d,
|
|
2005
1972
|
k,
|
|
2006
|
-
|
|
1973
|
+
_
|
|
2007
1974
|
)
|
|
2008
1975
|
)
|
|
2009
1976
|
return;
|
|
2010
1977
|
}
|
|
2011
1978
|
throw new Error(
|
|
2012
|
-
`${t}: no overlap aStart=${
|
|
1979
|
+
`${t}: no overlap aStart=${h} aEnd=${y} bStart=${p} bEnd=${b}`
|
|
2013
1980
|
);
|
|
2014
|
-
}, "divide"), f = /* @__PURE__ */
|
|
2015
|
-
if (b -
|
|
1981
|
+
}, "divide"), f = /* @__PURE__ */ c((g, h, y, p, b, E, $, d, _, w) => {
|
|
1982
|
+
if (b - p < y - h) {
|
|
2016
1983
|
if (E = !E, E && $.length === 1) {
|
|
2017
1984
|
let { foundSubsequence: q, isCommon: st } = $[0];
|
|
2018
1985
|
$[1] = {
|
|
2019
|
-
foundSubsequence: /* @__PURE__ */
|
|
1986
|
+
foundSubsequence: /* @__PURE__ */ c((X, W, ot) => {
|
|
2020
1987
|
q(X, ot, W);
|
|
2021
1988
|
}, "foundSubsequence"),
|
|
2022
|
-
isCommon: /* @__PURE__ */
|
|
1989
|
+
isCommon: /* @__PURE__ */ c((X, W) => st(W, X), "isCommon")
|
|
2023
1990
|
};
|
|
2024
1991
|
}
|
|
2025
|
-
let rt =
|
|
2026
|
-
|
|
1992
|
+
let rt = h, K = y;
|
|
1993
|
+
h = p, y = b, p = rt, b = K;
|
|
2027
1994
|
}
|
|
2028
1995
|
let { foundSubsequence: O, isCommon: N } = $[E ? 1 : 0];
|
|
2029
|
-
|
|
2030
|
-
h,
|
|
1996
|
+
u(
|
|
2031
1997
|
g,
|
|
1998
|
+
h,
|
|
2032
1999
|
y,
|
|
2033
|
-
|
|
2000
|
+
p,
|
|
2034
2001
|
b,
|
|
2035
2002
|
N,
|
|
2036
2003
|
d,
|
|
2037
|
-
|
|
2038
|
-
|
|
2004
|
+
_,
|
|
2005
|
+
w
|
|
2039
2006
|
);
|
|
2040
2007
|
let {
|
|
2041
2008
|
nChangePreceding: G,
|
|
@@ -2050,18 +2017,18 @@ function ys() {
|
|
|
2050
2017
|
nChangeFollowing: J,
|
|
2051
2018
|
aStartFollowing: D,
|
|
2052
2019
|
bStartFollowing: V
|
|
2053
|
-
} =
|
|
2054
|
-
|
|
2020
|
+
} = w;
|
|
2021
|
+
h < Q && p < P && f(
|
|
2055
2022
|
G,
|
|
2056
|
-
|
|
2023
|
+
h,
|
|
2057
2024
|
Q,
|
|
2058
|
-
|
|
2025
|
+
p,
|
|
2059
2026
|
P,
|
|
2060
2027
|
E,
|
|
2061
2028
|
$,
|
|
2062
2029
|
d,
|
|
2063
|
-
|
|
2064
|
-
|
|
2030
|
+
_,
|
|
2031
|
+
w
|
|
2065
2032
|
), k !== 0 && O(k, H, Y), R !== 0 && O(R, L, x), D < y && V < b && f(
|
|
2066
2033
|
J,
|
|
2067
2034
|
D,
|
|
@@ -2071,42 +2038,42 @@ function ys() {
|
|
|
2071
2038
|
E,
|
|
2072
2039
|
$,
|
|
2073
2040
|
d,
|
|
2074
|
-
|
|
2075
|
-
|
|
2041
|
+
_,
|
|
2042
|
+
w
|
|
2076
2043
|
);
|
|
2077
|
-
}, "findSubsequences"),
|
|
2078
|
-
if (typeof
|
|
2079
|
-
throw new TypeError(`${t}: ${
|
|
2080
|
-
if (!Number.isSafeInteger(
|
|
2081
|
-
throw new RangeError(`${t}: ${
|
|
2082
|
-
if (
|
|
2083
|
-
throw new RangeError(`${t}: ${
|
|
2084
|
-
}, "validateLength"), a = /* @__PURE__ */
|
|
2085
|
-
let y = typeof
|
|
2044
|
+
}, "findSubsequences"), m = /* @__PURE__ */ c((g, h) => {
|
|
2045
|
+
if (typeof h != "number")
|
|
2046
|
+
throw new TypeError(`${t}: ${g} typeof ${typeof h} is not a number`);
|
|
2047
|
+
if (!Number.isSafeInteger(h))
|
|
2048
|
+
throw new RangeError(`${t}: ${g} value ${h} is not a safe integer`);
|
|
2049
|
+
if (h < 0)
|
|
2050
|
+
throw new RangeError(`${t}: ${g} value ${h} is a negative integer`);
|
|
2051
|
+
}, "validateLength"), a = /* @__PURE__ */ c((g, h) => {
|
|
2052
|
+
let y = typeof h;
|
|
2086
2053
|
if (y !== "function")
|
|
2087
|
-
throw new TypeError(`${t}: ${
|
|
2054
|
+
throw new TypeError(`${t}: ${g} typeof ${y} is not a function`);
|
|
2088
2055
|
}, "validateCallback");
|
|
2089
|
-
function
|
|
2090
|
-
|
|
2091
|
-
let b = n(0,
|
|
2092
|
-
if (b !== 0 &&
|
|
2056
|
+
function S(g, h, y, p) {
|
|
2057
|
+
m("aLength", g), m("bLength", h), a("isCommon", y), a("foundSubsequence", p);
|
|
2058
|
+
let b = n(0, g, 0, h, y);
|
|
2059
|
+
if (b !== 0 && p(b, 0, 0), g !== b || h !== b) {
|
|
2093
2060
|
let E = b, $ = b, d = r(
|
|
2094
2061
|
E,
|
|
2095
|
-
h - 1,
|
|
2096
|
-
$,
|
|
2097
2062
|
g - 1,
|
|
2063
|
+
$,
|
|
2064
|
+
h - 1,
|
|
2098
2065
|
y
|
|
2099
|
-
),
|
|
2100
|
-
|
|
2066
|
+
), _ = g - d, w = h - d, O = b + d;
|
|
2067
|
+
g !== O && h !== O && f(
|
|
2101
2068
|
0,
|
|
2102
2069
|
E,
|
|
2103
|
-
|
|
2070
|
+
_,
|
|
2104
2071
|
$,
|
|
2105
|
-
|
|
2072
|
+
w,
|
|
2106
2073
|
!1,
|
|
2107
2074
|
[
|
|
2108
2075
|
{
|
|
2109
|
-
foundSubsequence:
|
|
2076
|
+
foundSubsequence: p,
|
|
2110
2077
|
isCommon: y
|
|
2111
2078
|
}
|
|
2112
2079
|
],
|
|
@@ -2126,24 +2093,24 @@ function ys() {
|
|
|
2126
2093
|
nCommonFollowing: e,
|
|
2127
2094
|
nCommonPreceding: e
|
|
2128
2095
|
}
|
|
2129
|
-
), d !== 0 &&
|
|
2096
|
+
), d !== 0 && p(d, _, w);
|
|
2130
2097
|
}
|
|
2131
2098
|
}
|
|
2132
|
-
return
|
|
2099
|
+
return c(S, "diffSequence"), Vt;
|
|
2133
2100
|
}
|
|
2134
|
-
|
|
2135
|
-
var
|
|
2136
|
-
function
|
|
2101
|
+
c(es, "requireBuild");
|
|
2102
|
+
var ns = es(), kn = /* @__PURE__ */ bn(ns);
|
|
2103
|
+
function rs(t, e) {
|
|
2137
2104
|
return t.replace(/\s+$/, (n) => e(n));
|
|
2138
2105
|
}
|
|
2139
|
-
|
|
2106
|
+
c(rs, "formatTrailingSpaces");
|
|
2140
2107
|
function $e(t, e, n, r, o, s) {
|
|
2141
2108
|
return t.length !== 0 ? n(
|
|
2142
|
-
`${r} ${
|
|
2109
|
+
`${r} ${rs(t, o)}`
|
|
2143
2110
|
) : r !== " " ? n(r) : e && s.length !== 0 ? n(`${r} ${s}`) : "";
|
|
2144
2111
|
}
|
|
2145
|
-
|
|
2146
|
-
function
|
|
2112
|
+
c($e, "printDiffLine");
|
|
2113
|
+
function Bn(t, e, {
|
|
2147
2114
|
aColor: n,
|
|
2148
2115
|
aIndicator: r,
|
|
2149
2116
|
changeLineTrailingSpaceColor: o,
|
|
@@ -2158,8 +2125,8 @@ function Wn(t, e, {
|
|
|
2158
2125
|
s
|
|
2159
2126
|
);
|
|
2160
2127
|
}
|
|
2161
|
-
|
|
2162
|
-
function
|
|
2128
|
+
c(Bn, "printDeleteLine");
|
|
2129
|
+
function zn(t, e, {
|
|
2163
2130
|
bColor: n,
|
|
2164
2131
|
bIndicator: r,
|
|
2165
2132
|
changeLineTrailingSpaceColor: o,
|
|
@@ -2174,8 +2141,8 @@ function Vn(t, e, {
|
|
|
2174
2141
|
s
|
|
2175
2142
|
);
|
|
2176
2143
|
}
|
|
2177
|
-
|
|
2178
|
-
function
|
|
2144
|
+
c(zn, "printInsertLine");
|
|
2145
|
+
function Un(t, e, {
|
|
2179
2146
|
commonColor: n,
|
|
2180
2147
|
commonIndicator: r,
|
|
2181
2148
|
commonLineTrailingSpaceColor: o,
|
|
@@ -2190,106 +2157,106 @@ function Kn(t, e, {
|
|
|
2190
2157
|
s
|
|
2191
2158
|
);
|
|
2192
2159
|
}
|
|
2193
|
-
|
|
2194
|
-
function
|
|
2160
|
+
c(Un, "printCommonLine");
|
|
2161
|
+
function Tn(t, e, n, r, { patchColor: o }) {
|
|
2195
2162
|
return o(
|
|
2196
2163
|
`@@ -${t + 1},${e - t} +${n + 1},${r - n} @@`
|
|
2197
2164
|
);
|
|
2198
2165
|
}
|
|
2199
|
-
|
|
2200
|
-
function
|
|
2201
|
-
let n = t.length, r = e.contextLines, o = r + r, s = n,
|
|
2202
|
-
for (;
|
|
2203
|
-
let d =
|
|
2204
|
-
for (;
|
|
2205
|
-
|
|
2206
|
-
if (d !==
|
|
2166
|
+
c(Tn, "createPatchMark");
|
|
2167
|
+
function os(t, e) {
|
|
2168
|
+
let n = t.length, r = e.contextLines, o = r + r, s = n, i = !1, l = 0, u = 0;
|
|
2169
|
+
for (; u !== n; ) {
|
|
2170
|
+
let d = u;
|
|
2171
|
+
for (; u !== n && t[u][0] === M; )
|
|
2172
|
+
u += 1;
|
|
2173
|
+
if (d !== u)
|
|
2207
2174
|
if (d === 0)
|
|
2208
|
-
|
|
2209
|
-
else if (
|
|
2210
|
-
let
|
|
2211
|
-
|
|
2175
|
+
u > r && (s -= u - r, i = !0);
|
|
2176
|
+
else if (u === n) {
|
|
2177
|
+
let _ = u - d;
|
|
2178
|
+
_ > r && (s -= _ - r, i = !0);
|
|
2212
2179
|
} else {
|
|
2213
|
-
let
|
|
2214
|
-
|
|
2180
|
+
let _ = u - d;
|
|
2181
|
+
_ > o && (s -= _ - o, l += 1);
|
|
2215
2182
|
}
|
|
2216
|
-
for (;
|
|
2217
|
-
|
|
2183
|
+
for (; u !== n && t[u][0] !== M; )
|
|
2184
|
+
u += 1;
|
|
2218
2185
|
}
|
|
2219
|
-
let f =
|
|
2220
|
-
|
|
2221
|
-
let
|
|
2186
|
+
let f = l !== 0 || i;
|
|
2187
|
+
l !== 0 ? s += l + 1 : i && (s += 1);
|
|
2188
|
+
let m = s - 1, a = [], S = 0;
|
|
2222
2189
|
f && a.push("");
|
|
2223
|
-
let
|
|
2224
|
-
let
|
|
2225
|
-
a.push(
|
|
2226
|
-
}, "pushCommonLine"), E = /* @__PURE__ */
|
|
2227
|
-
let
|
|
2228
|
-
a.push(
|
|
2229
|
-
}, "pushDeleteLine"), $ = /* @__PURE__ */
|
|
2230
|
-
let
|
|
2231
|
-
a.push(
|
|
2190
|
+
let g = 0, h = 0, y = 0, p = 0, b = /* @__PURE__ */ c((d) => {
|
|
2191
|
+
let _ = a.length;
|
|
2192
|
+
a.push(Un(d, _ === 0 || _ === m, e)), y += 1, p += 1;
|
|
2193
|
+
}, "pushCommonLine"), E = /* @__PURE__ */ c((d) => {
|
|
2194
|
+
let _ = a.length;
|
|
2195
|
+
a.push(Bn(d, _ === 0 || _ === m, e)), y += 1;
|
|
2196
|
+
}, "pushDeleteLine"), $ = /* @__PURE__ */ c((d) => {
|
|
2197
|
+
let _ = a.length;
|
|
2198
|
+
a.push(zn(d, _ === 0 || _ === m, e)), p += 1;
|
|
2232
2199
|
}, "pushInsertLine");
|
|
2233
|
-
for (
|
|
2234
|
-
let d =
|
|
2235
|
-
for (;
|
|
2236
|
-
|
|
2237
|
-
if (d !==
|
|
2200
|
+
for (u = 0; u !== n; ) {
|
|
2201
|
+
let d = u;
|
|
2202
|
+
for (; u !== n && t[u][0] === M; )
|
|
2203
|
+
u += 1;
|
|
2204
|
+
if (d !== u)
|
|
2238
2205
|
if (d === 0) {
|
|
2239
|
-
|
|
2240
|
-
for (let
|
|
2241
|
-
b(t[
|
|
2242
|
-
} else if (
|
|
2243
|
-
let
|
|
2244
|
-
for (let
|
|
2245
|
-
b(t[
|
|
2206
|
+
u > r && (d = u - r, g = d, h = d, y = g, p = h);
|
|
2207
|
+
for (let _ = d; _ !== u; _ += 1)
|
|
2208
|
+
b(t[_][1]);
|
|
2209
|
+
} else if (u === n) {
|
|
2210
|
+
let _ = u - d > r ? d + r : u;
|
|
2211
|
+
for (let w = d; w !== _; w += 1)
|
|
2212
|
+
b(t[w][1]);
|
|
2246
2213
|
} else {
|
|
2247
|
-
let
|
|
2248
|
-
if (
|
|
2249
|
-
let
|
|
2250
|
-
for (let N = d; N !==
|
|
2214
|
+
let _ = u - d;
|
|
2215
|
+
if (_ > o) {
|
|
2216
|
+
let w = d + r;
|
|
2217
|
+
for (let N = d; N !== w; N += 1)
|
|
2251
2218
|
b(t[N][1]);
|
|
2252
|
-
a[
|
|
2253
|
-
h,
|
|
2254
|
-
y,
|
|
2219
|
+
a[S] = Tn(
|
|
2255
2220
|
g,
|
|
2256
|
-
|
|
2221
|
+
y,
|
|
2222
|
+
h,
|
|
2223
|
+
p,
|
|
2257
2224
|
e
|
|
2258
|
-
),
|
|
2259
|
-
let O =
|
|
2260
|
-
|
|
2261
|
-
for (let N =
|
|
2225
|
+
), S = a.length, a.push("");
|
|
2226
|
+
let O = _ - o;
|
|
2227
|
+
g = y + O, h = p + O, y = g, p = h;
|
|
2228
|
+
for (let N = u - r; N !== u; N += 1)
|
|
2262
2229
|
b(t[N][1]);
|
|
2263
2230
|
} else
|
|
2264
|
-
for (let
|
|
2265
|
-
b(t[
|
|
2231
|
+
for (let w = d; w !== u; w += 1)
|
|
2232
|
+
b(t[w][1]);
|
|
2266
2233
|
}
|
|
2267
|
-
for (;
|
|
2268
|
-
E(t[
|
|
2269
|
-
for (;
|
|
2270
|
-
$(t[
|
|
2234
|
+
for (; u !== n && t[u][0] === z; )
|
|
2235
|
+
E(t[u][1]), u += 1;
|
|
2236
|
+
for (; u !== n && t[u][0] === F; )
|
|
2237
|
+
$(t[u][1]), u += 1;
|
|
2271
2238
|
}
|
|
2272
|
-
return f && (a[
|
|
2239
|
+
return f && (a[S] = Tn(g, y, h, p, e)), a.join(`
|
|
2273
2240
|
`);
|
|
2274
2241
|
}
|
|
2275
|
-
|
|
2276
|
-
function
|
|
2242
|
+
c(os, "joinAlignedDiffsNoExpand");
|
|
2243
|
+
function ss(t, e) {
|
|
2277
2244
|
return t.map((n, r, o) => {
|
|
2278
|
-
let s = n[1],
|
|
2245
|
+
let s = n[1], i = r === 0 || r === o.length - 1;
|
|
2279
2246
|
switch (n[0]) {
|
|
2280
2247
|
case z:
|
|
2281
|
-
return
|
|
2248
|
+
return Bn(s, i, e);
|
|
2282
2249
|
case F:
|
|
2283
|
-
return
|
|
2250
|
+
return zn(s, i, e);
|
|
2284
2251
|
default:
|
|
2285
|
-
return
|
|
2252
|
+
return Un(s, i, e);
|
|
2286
2253
|
}
|
|
2287
2254
|
}).join(`
|
|
2288
2255
|
`);
|
|
2289
2256
|
}
|
|
2290
|
-
|
|
2291
|
-
var Se = /* @__PURE__ */
|
|
2292
|
-
function
|
|
2257
|
+
c(ss, "joinAlignedDiffsExpand");
|
|
2258
|
+
var Se = /* @__PURE__ */ c((t) => t, "noColor"), Yn = 5, is = 0;
|
|
2259
|
+
function cs() {
|
|
2293
2260
|
return {
|
|
2294
2261
|
aAnnotation: "Expected",
|
|
2295
2262
|
aColor: v.green,
|
|
@@ -2303,40 +2270,40 @@ function Os() {
|
|
|
2303
2270
|
commonIndicator: " ",
|
|
2304
2271
|
commonLineTrailingSpaceColor: Se,
|
|
2305
2272
|
compareKeys: void 0,
|
|
2306
|
-
contextLines:
|
|
2273
|
+
contextLines: Yn,
|
|
2307
2274
|
emptyFirstOrLastLinePlaceholder: "",
|
|
2308
2275
|
expand: !0,
|
|
2309
2276
|
includeChangeCounts: !1,
|
|
2310
2277
|
omitAnnotationLines: !1,
|
|
2311
2278
|
patchColor: v.yellow,
|
|
2312
|
-
truncateThreshold:
|
|
2279
|
+
truncateThreshold: is,
|
|
2313
2280
|
truncateAnnotation: "... Diff result is truncated",
|
|
2314
2281
|
truncateAnnotationColor: Se
|
|
2315
2282
|
};
|
|
2316
2283
|
}
|
|
2317
|
-
|
|
2318
|
-
function
|
|
2284
|
+
c(cs, "getDefaultOptions");
|
|
2285
|
+
function us(t) {
|
|
2319
2286
|
return t && typeof t == "function" ? t : void 0;
|
|
2320
2287
|
}
|
|
2321
|
-
|
|
2322
|
-
function
|
|
2323
|
-
return typeof t == "number" && Number.isSafeInteger(t) && t >= 0 ? t :
|
|
2288
|
+
c(us, "getCompareKeys");
|
|
2289
|
+
function ls(t) {
|
|
2290
|
+
return typeof t == "number" && Number.isSafeInteger(t) && t >= 0 ? t : Yn;
|
|
2324
2291
|
}
|
|
2325
|
-
|
|
2326
|
-
function
|
|
2292
|
+
c(ls, "getContextLines");
|
|
2293
|
+
function pt(t = {}) {
|
|
2327
2294
|
return {
|
|
2328
|
-
...
|
|
2295
|
+
...cs(),
|
|
2329
2296
|
...t,
|
|
2330
|
-
compareKeys:
|
|
2331
|
-
contextLines:
|
|
2297
|
+
compareKeys: us(t.compareKeys),
|
|
2298
|
+
contextLines: ls(t.contextLines)
|
|
2332
2299
|
};
|
|
2333
2300
|
}
|
|
2334
|
-
|
|
2301
|
+
c(pt, "normalizeDiffOptions");
|
|
2335
2302
|
function bt(t) {
|
|
2336
2303
|
return t.length === 1 && t[0].length === 0;
|
|
2337
2304
|
}
|
|
2338
|
-
|
|
2339
|
-
function
|
|
2305
|
+
c(bt, "isEmptyString");
|
|
2306
|
+
function as(t) {
|
|
2340
2307
|
let e = 0, n = 0;
|
|
2341
2308
|
return t.forEach((r) => {
|
|
2342
2309
|
switch (r[0]) {
|
|
@@ -2349,125 +2316,125 @@ function $s(t) {
|
|
|
2349
2316
|
}
|
|
2350
2317
|
}), { a: e, b: n };
|
|
2351
2318
|
}
|
|
2352
|
-
|
|
2353
|
-
function
|
|
2319
|
+
c(as, "countChanges");
|
|
2320
|
+
function fs({
|
|
2354
2321
|
aAnnotation: t,
|
|
2355
2322
|
aColor: e,
|
|
2356
2323
|
aIndicator: n,
|
|
2357
2324
|
bAnnotation: r,
|
|
2358
2325
|
bColor: o,
|
|
2359
2326
|
bIndicator: s,
|
|
2360
|
-
includeChangeCounts:
|
|
2361
|
-
omitAnnotationLines:
|
|
2362
|
-
},
|
|
2363
|
-
if (
|
|
2327
|
+
includeChangeCounts: i,
|
|
2328
|
+
omitAnnotationLines: l
|
|
2329
|
+
}, u) {
|
|
2330
|
+
if (l)
|
|
2364
2331
|
return "";
|
|
2365
|
-
let f = "",
|
|
2366
|
-
if (
|
|
2367
|
-
let
|
|
2368
|
-
|
|
2369
|
-
f = `${
|
|
2332
|
+
let f = "", m = "";
|
|
2333
|
+
if (i) {
|
|
2334
|
+
let g = String(u.a), h = String(u.b), y = r.length - t.length, p = " ".repeat(Math.max(0, y)), b = " ".repeat(Math.max(0, -y)), E = h.length -
|
|
2335
|
+
g.length, $ = " ".repeat(Math.max(0, E)), d = " ".repeat(Math.max(0, -E));
|
|
2336
|
+
f = `${p} ${n} ${$}${g}`, m = `${b} ${s} ${d}${h}`;
|
|
2370
2337
|
}
|
|
2371
|
-
let a = `${n} ${t}${f}`,
|
|
2338
|
+
let a = `${n} ${t}${f}`, S = `${s} ${r}${m}`;
|
|
2372
2339
|
return `${e(a)}
|
|
2373
|
-
${o(
|
|
2340
|
+
${o(S)}
|
|
2374
2341
|
|
|
2375
2342
|
`;
|
|
2376
2343
|
}
|
|
2377
|
-
|
|
2344
|
+
c(fs, "printAnnotation");
|
|
2378
2345
|
function Te(t, e, n) {
|
|
2379
|
-
return
|
|
2346
|
+
return fs(n, as(t)) + (n.expand ? ss(t, n) : os(t, n)) + (e ? n.truncateAnnotationColor(`
|
|
2380
2347
|
${n.truncateAnnotation}`) : "");
|
|
2381
2348
|
}
|
|
2382
|
-
|
|
2349
|
+
c(Te, "printDiffLines");
|
|
2383
2350
|
function qt(t, e, n) {
|
|
2384
|
-
let r =
|
|
2351
|
+
let r = pt(n), [o, s] = Wn(
|
|
2385
2352
|
bt(t) ? [] : t,
|
|
2386
2353
|
bt(e) ? [] : e,
|
|
2387
2354
|
r
|
|
2388
2355
|
);
|
|
2389
2356
|
return Te(o, s, r);
|
|
2390
2357
|
}
|
|
2391
|
-
|
|
2392
|
-
function
|
|
2358
|
+
c(qt, "diffLinesUnified");
|
|
2359
|
+
function ms(t, e, n, r, o) {
|
|
2393
2360
|
if (bt(t) && bt(n) && (t = [], n = []), bt(e) && bt(r) && (e = [], r = []), t.length !== n.length || e.length !== r.length)
|
|
2394
2361
|
return qt(t, e, o);
|
|
2395
|
-
let [s,
|
|
2362
|
+
let [s, i] = Wn(
|
|
2396
2363
|
n,
|
|
2397
2364
|
r,
|
|
2398
2365
|
o
|
|
2399
|
-
),
|
|
2366
|
+
), l = 0, u = 0;
|
|
2400
2367
|
return s.forEach((f) => {
|
|
2401
2368
|
switch (f[0]) {
|
|
2402
2369
|
case z:
|
|
2403
|
-
f[1] = t[
|
|
2370
|
+
f[1] = t[l], l += 1;
|
|
2404
2371
|
break;
|
|
2405
2372
|
case F:
|
|
2406
|
-
f[1] = e[
|
|
2373
|
+
f[1] = e[u], u += 1;
|
|
2407
2374
|
break;
|
|
2408
2375
|
default:
|
|
2409
|
-
f[1] = e[
|
|
2376
|
+
f[1] = e[u], l += 1, u += 1;
|
|
2410
2377
|
}
|
|
2411
|
-
}), Te(s,
|
|
2378
|
+
}), Te(s, i, pt(o));
|
|
2412
2379
|
}
|
|
2413
|
-
|
|
2414
|
-
function
|
|
2380
|
+
c(ms, "diffLinesUnified2");
|
|
2381
|
+
function Wn(t, e, n) {
|
|
2415
2382
|
let r = n?.truncateThreshold ?? !1, o = Math.max(
|
|
2416
2383
|
Math.floor(n?.truncateThreshold ?? 0),
|
|
2417
2384
|
0
|
|
2418
|
-
), s = r ? Math.min(t.length, o) : t.length,
|
|
2419
|
-
(
|
|
2420
|
-
for (
|
|
2421
|
-
for (;
|
|
2422
|
-
f.push(new I(z, t[
|
|
2385
|
+
), s = r ? Math.min(t.length, o) : t.length, i = r ? Math.min(e.length, o) : e.length, l = s !== t.length || i !== e.length, u = /* @__PURE__ */ c(
|
|
2386
|
+
(g, h) => t[g] === e[h], "isCommon"), f = [], m = 0, a = 0;
|
|
2387
|
+
for (kn(s, i, u, /* @__PURE__ */ c((g, h, y) => {
|
|
2388
|
+
for (; m !== h; m += 1)
|
|
2389
|
+
f.push(new I(z, t[m]));
|
|
2423
2390
|
for (; a !== y; a += 1)
|
|
2424
2391
|
f.push(new I(F, e[a]));
|
|
2425
|
-
for (;
|
|
2392
|
+
for (; g !== 0; g -= 1, m += 1, a += 1)
|
|
2426
2393
|
f.push(new I(M, e[a]));
|
|
2427
|
-
}, "foundSubsequence"));
|
|
2428
|
-
f.push(new I(z, t[
|
|
2429
|
-
for (; a !==
|
|
2394
|
+
}, "foundSubsequence")); m !== s; m += 1)
|
|
2395
|
+
f.push(new I(z, t[m]));
|
|
2396
|
+
for (; a !== i; a += 1)
|
|
2430
2397
|
f.push(new I(F, e[a]));
|
|
2431
|
-
return [f,
|
|
2398
|
+
return [f, l];
|
|
2432
2399
|
}
|
|
2433
|
-
|
|
2434
|
-
function
|
|
2400
|
+
c(Wn, "diffLinesRaw");
|
|
2401
|
+
function An(t) {
|
|
2435
2402
|
return t.includes(`\r
|
|
2436
2403
|
`) ? `\r
|
|
2437
2404
|
` : `
|
|
2438
2405
|
`;
|
|
2439
2406
|
}
|
|
2440
|
-
|
|
2441
|
-
function
|
|
2407
|
+
c(An, "getNewLineSymbol");
|
|
2408
|
+
function ps(t, e, n) {
|
|
2442
2409
|
let r = n?.truncateThreshold ?? !1, o = Math.max(
|
|
2443
2410
|
Math.floor(n?.truncateThreshold ?? 0),
|
|
2444
2411
|
0
|
|
2445
|
-
), s = t.length,
|
|
2412
|
+
), s = t.length, i = e.length;
|
|
2446
2413
|
if (r) {
|
|
2447
|
-
let
|
|
2448
|
-
`),
|
|
2449
|
-
`), y =
|
|
2450
|
-
` : t, E =
|
|
2414
|
+
let g = t.includes(`
|
|
2415
|
+
`), h = e.includes(`
|
|
2416
|
+
`), y = An(t), p = An(e), b = g ? `${t.split(y, o).join(y)}
|
|
2417
|
+
` : t, E = h ? `${e.split(p, o).join(p)}
|
|
2451
2418
|
` : e;
|
|
2452
|
-
s = b.length,
|
|
2419
|
+
s = b.length, i = E.length;
|
|
2453
2420
|
}
|
|
2454
|
-
let
|
|
2455
|
-
return
|
|
2456
|
-
f !==
|
|
2457
|
-
|
|
2458
|
-
}, "foundSubsequence")), f !== s && a.push(new I(z, t.slice(f))),
|
|
2421
|
+
let l = s !== t.length || i !== e.length, u = /* @__PURE__ */ c((g, h) => t[g] === e[h], "isCommon"), f = 0, m = 0, a = [];
|
|
2422
|
+
return kn(s, i, u, /* @__PURE__ */ c((g, h, y) => {
|
|
2423
|
+
f !== h && a.push(new I(z, t.slice(f, h))), m !== y && a.push(new I(F, e.slice(m, y))), f = h + g, m = y + g, a.push(new I(M, e.slice(y,
|
|
2424
|
+
m)));
|
|
2425
|
+
}, "foundSubsequence")), f !== s && a.push(new I(z, t.slice(f))), m !== i && a.push(new I(F, e.slice(m))), [a, l];
|
|
2459
2426
|
}
|
|
2460
|
-
|
|
2461
|
-
function
|
|
2427
|
+
c(ps, "diffStrings");
|
|
2428
|
+
function gs(t, e, n) {
|
|
2462
2429
|
return e.reduce(
|
|
2463
2430
|
(r, o) => r + (o[0] === M ? o[1] : o[0] === t && o[1].length !== 0 ? n(o[1]) : ""),
|
|
2464
2431
|
""
|
|
2465
2432
|
);
|
|
2466
2433
|
}
|
|
2467
|
-
|
|
2434
|
+
c(gs, "concatenateRelevantDiffs");
|
|
2468
2435
|
var Kt = class {
|
|
2469
2436
|
static {
|
|
2470
|
-
|
|
2437
|
+
c(this, "ChangeBuffer");
|
|
2471
2438
|
}
|
|
2472
2439
|
op;
|
|
2473
2440
|
line;
|
|
@@ -2485,7 +2452,7 @@ var Kt = class {
|
|
|
2485
2452
|
this.lines.push(
|
|
2486
2453
|
this.line.length !== 1 ? new I(
|
|
2487
2454
|
this.op,
|
|
2488
|
-
|
|
2455
|
+
gs(this.op, this.line, this.changeColor)
|
|
2489
2456
|
) : this.line[0][0] === this.op ? this.line[0] : new I(this.op, this.line[0][1])
|
|
2490
2457
|
// was common diff
|
|
2491
2458
|
), this.line.length = 0;
|
|
@@ -2504,8 +2471,8 @@ var Kt = class {
|
|
|
2504
2471
|
`)) {
|
|
2505
2472
|
let r = n.split(`
|
|
2506
2473
|
`), o = r.length - 1;
|
|
2507
|
-
r.forEach((s,
|
|
2508
|
-
|
|
2474
|
+
r.forEach((s, i) => {
|
|
2475
|
+
i < o ? (this.pushSubstring(s), this.pushLine()) : s.length !== 0 && this.pushSubstring(s);
|
|
2509
2476
|
});
|
|
2510
2477
|
} else
|
|
2511
2478
|
this.pushDiff(e);
|
|
@@ -2516,7 +2483,7 @@ var Kt = class {
|
|
|
2516
2483
|
}
|
|
2517
2484
|
}, Ee = class {
|
|
2518
2485
|
static {
|
|
2519
|
-
|
|
2486
|
+
c(this, "CommonBuffer");
|
|
2520
2487
|
}
|
|
2521
2488
|
deleteBuffer;
|
|
2522
2489
|
insertBuffer;
|
|
@@ -2542,12 +2509,12 @@ var Kt = class {
|
|
|
2542
2509
|
`)) {
|
|
2543
2510
|
let o = r.split(`
|
|
2544
2511
|
`), s = o.length - 1;
|
|
2545
|
-
o.forEach((
|
|
2546
|
-
if (
|
|
2547
|
-
let
|
|
2548
|
-
this.deleteBuffer.isLineEmpty() && this.insertBuffer.isLineEmpty() ? (this.flushChangeLines(), this.pushDiffCommonLine(
|
|
2549
|
-
pushDiffChangeLines(
|
|
2550
|
-
} else
|
|
2512
|
+
o.forEach((i, l) => {
|
|
2513
|
+
if (l === 0) {
|
|
2514
|
+
let u = new I(n, i);
|
|
2515
|
+
this.deleteBuffer.isLineEmpty() && this.insertBuffer.isLineEmpty() ? (this.flushChangeLines(), this.pushDiffCommonLine(u)) : (this.
|
|
2516
|
+
pushDiffChangeLines(u), this.flushChangeLines());
|
|
2517
|
+
} else l < s ? this.pushDiffCommonLine(new I(n, i)) : i.length !== 0 && this.pushDiffChangeLines(new I(n, i));
|
|
2551
2518
|
});
|
|
2552
2519
|
} else
|
|
2553
2520
|
this.pushDiffChangeLines(e);
|
|
@@ -2557,7 +2524,7 @@ var Kt = class {
|
|
|
2557
2524
|
return this.flushChangeLines(), this.lines;
|
|
2558
2525
|
}
|
|
2559
2526
|
};
|
|
2560
|
-
function
|
|
2527
|
+
function hs(t, e) {
|
|
2561
2528
|
let n = new Kt(z, e), r = new Kt(F, e), o = new Ee(n, r);
|
|
2562
2529
|
return t.forEach((s) => {
|
|
2563
2530
|
switch (s[0]) {
|
|
@@ -2572,8 +2539,8 @@ function Rs(t, e) {
|
|
|
2572
2539
|
}
|
|
2573
2540
|
}), o.getLines();
|
|
2574
2541
|
}
|
|
2575
|
-
|
|
2576
|
-
function
|
|
2542
|
+
c(hs, "getAlignedDiffs");
|
|
2543
|
+
function ys(t, e) {
|
|
2577
2544
|
if (e) {
|
|
2578
2545
|
let n = t.length - 1;
|
|
2579
2546
|
return t.some(
|
|
@@ -2583,12 +2550,12 @@ function Ps(t, e) {
|
|
|
2583
2550
|
}
|
|
2584
2551
|
return t.some((n) => n[0] === M);
|
|
2585
2552
|
}
|
|
2586
|
-
|
|
2587
|
-
function
|
|
2553
|
+
c(ys, "hasCommonDiff");
|
|
2554
|
+
function ds(t, e, n) {
|
|
2588
2555
|
if (t !== e && t.length !== 0 && e.length !== 0) {
|
|
2589
2556
|
let r = t.includes(`
|
|
2590
2557
|
`) || e.includes(`
|
|
2591
|
-
`), [o, s] =
|
|
2558
|
+
`), [o, s] = Vn(
|
|
2592
2559
|
r ? `${t}
|
|
2593
2560
|
` : t,
|
|
2594
2561
|
r ? `${e}
|
|
@@ -2597,64 +2564,64 @@ function Ms(t, e, n) {
|
|
|
2597
2564
|
// cleanupSemantic
|
|
2598
2565
|
n
|
|
2599
2566
|
);
|
|
2600
|
-
if (
|
|
2601
|
-
let
|
|
2602
|
-
return Te(
|
|
2567
|
+
if (ys(o, r)) {
|
|
2568
|
+
let i = pt(n), l = hs(o, i.changeColor);
|
|
2569
|
+
return Te(l, s, i);
|
|
2603
2570
|
}
|
|
2604
2571
|
}
|
|
2605
2572
|
return qt(t.split(`
|
|
2606
2573
|
`), e.split(`
|
|
2607
2574
|
`), n);
|
|
2608
2575
|
}
|
|
2609
|
-
|
|
2610
|
-
function
|
|
2611
|
-
let [o, s] =
|
|
2612
|
-
return n &&
|
|
2576
|
+
c(ds, "diffStringsUnified");
|
|
2577
|
+
function Vn(t, e, n, r) {
|
|
2578
|
+
let [o, s] = ps(t, e, r);
|
|
2579
|
+
return n && Xo(o), [o, s];
|
|
2613
2580
|
}
|
|
2614
|
-
|
|
2581
|
+
c(Vn, "diffStringsRaw");
|
|
2615
2582
|
function Oe(t, e) {
|
|
2616
|
-
let { commonColor: n } =
|
|
2583
|
+
let { commonColor: n } = pt(e);
|
|
2617
2584
|
return n(t);
|
|
2618
2585
|
}
|
|
2619
|
-
|
|
2586
|
+
c(Oe, "getCommonMessage");
|
|
2620
2587
|
var {
|
|
2621
|
-
AsymmetricMatcher:
|
|
2622
|
-
DOMCollection:
|
|
2623
|
-
DOMElement:
|
|
2624
|
-
Immutable:
|
|
2625
|
-
ReactElement:
|
|
2626
|
-
ReactTestComponent:
|
|
2627
|
-
} = Lt,
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
],
|
|
2635
|
-
plugins:
|
|
2636
|
-
},
|
|
2588
|
+
AsymmetricMatcher: bs,
|
|
2589
|
+
DOMCollection: Ss,
|
|
2590
|
+
DOMElement: _s,
|
|
2591
|
+
Immutable: Es,
|
|
2592
|
+
ReactElement: Os,
|
|
2593
|
+
ReactTestComponent: Cs
|
|
2594
|
+
} = Lt, Kn = [
|
|
2595
|
+
Cs,
|
|
2596
|
+
Os,
|
|
2597
|
+
_s,
|
|
2598
|
+
Ss,
|
|
2599
|
+
Es,
|
|
2600
|
+
bs
|
|
2601
|
+
], Ce = {
|
|
2602
|
+
plugins: Kn
|
|
2603
|
+
}, qn = {
|
|
2637
2604
|
callToJSON: !1,
|
|
2638
2605
|
maxDepth: 10,
|
|
2639
|
-
plugins:
|
|
2606
|
+
plugins: Kn
|
|
2640
2607
|
};
|
|
2641
|
-
function
|
|
2608
|
+
function ws(t, e, n) {
|
|
2642
2609
|
if (Object.is(t, e))
|
|
2643
2610
|
return "";
|
|
2644
|
-
let r =
|
|
2611
|
+
let r = _n(t), o = r, s = !1;
|
|
2645
2612
|
if (r === "object" && typeof t.asymmetricMatch == "function") {
|
|
2646
2613
|
if (t.$$typeof !== Symbol.for("jest.asymmetricMatcher") || typeof t.getExpectedType != "function")
|
|
2647
2614
|
return;
|
|
2648
2615
|
o = t.getExpectedType(), s = o === "string";
|
|
2649
2616
|
}
|
|
2650
|
-
if (o !==
|
|
2651
|
-
let { aAnnotation:
|
|
2652
|
-
|
|
2653
|
-
${
|
|
2654
|
-
${
|
|
2617
|
+
if (o !== _n(e)) {
|
|
2618
|
+
let { aAnnotation: i, aColor: l, aIndicator: u, bAnnotation: f, bColor: m, bIndicator: a } = pt(n), S = we(qn, n), g = Z(t, S), h = Z(e,
|
|
2619
|
+
S), y = `${l(`${u} ${i}:`)}
|
|
2620
|
+
${g}`, p = `${m(`${a} ${f}:`)}
|
|
2621
|
+
${h}`;
|
|
2655
2622
|
return `${y}
|
|
2656
2623
|
|
|
2657
|
-
${
|
|
2624
|
+
${p}`;
|
|
2658
2625
|
}
|
|
2659
2626
|
if (!s)
|
|
2660
2627
|
switch (r) {
|
|
@@ -2664,44 +2631,44 @@ ${m}`;
|
|
|
2664
2631
|
`), n);
|
|
2665
2632
|
case "boolean":
|
|
2666
2633
|
case "number":
|
|
2667
|
-
return
|
|
2634
|
+
return $s(t, e, n);
|
|
2668
2635
|
case "map":
|
|
2669
|
-
return _e(
|
|
2636
|
+
return _e(Nn(t), Nn(e), n);
|
|
2670
2637
|
case "set":
|
|
2671
|
-
return _e(
|
|
2638
|
+
return _e(In(t), In(e), n);
|
|
2672
2639
|
default:
|
|
2673
2640
|
return _e(t, e, n);
|
|
2674
2641
|
}
|
|
2675
2642
|
}
|
|
2676
|
-
|
|
2677
|
-
function
|
|
2678
|
-
let r = Z(t,
|
|
2643
|
+
c(ws, "diff");
|
|
2644
|
+
function $s(t, e, n) {
|
|
2645
|
+
let r = Z(t, Ce), o = Z(e, Ce);
|
|
2679
2646
|
return r === o ? "" : qt(r.split(`
|
|
2680
2647
|
`), o.split(`
|
|
2681
2648
|
`), n);
|
|
2682
2649
|
}
|
|
2683
|
-
|
|
2684
|
-
function
|
|
2650
|
+
c($s, "comparePrimitive");
|
|
2651
|
+
function Nn(t) {
|
|
2685
2652
|
return new Map(Array.from(t.entries()).sort());
|
|
2686
2653
|
}
|
|
2687
|
-
|
|
2688
|
-
function
|
|
2654
|
+
c(Nn, "sortMap");
|
|
2655
|
+
function In(t) {
|
|
2689
2656
|
return new Set(Array.from(t.values()).sort());
|
|
2690
2657
|
}
|
|
2691
|
-
|
|
2658
|
+
c(In, "sortSet");
|
|
2692
2659
|
function _e(t, e, n) {
|
|
2693
2660
|
let r, o = !1;
|
|
2694
2661
|
try {
|
|
2695
|
-
let
|
|
2696
|
-
r =
|
|
2662
|
+
let i = we(Ce, n);
|
|
2663
|
+
r = Rn(t, e, i, n);
|
|
2697
2664
|
} catch {
|
|
2698
2665
|
o = !0;
|
|
2699
2666
|
}
|
|
2700
|
-
let s = Oe(
|
|
2667
|
+
let s = Oe(Fn, n);
|
|
2701
2668
|
if (r === void 0 || r === s) {
|
|
2702
|
-
let
|
|
2703
|
-
r =
|
|
2704
|
-
|
|
2669
|
+
let i = we(qn, n);
|
|
2670
|
+
r = Rn(t, e, i, n), r !== s && !o && (r = `${Oe(
|
|
2671
|
+
ts,
|
|
2705
2672
|
n
|
|
2706
2673
|
)}
|
|
2707
2674
|
|
|
@@ -2709,126 +2676,126 @@ ${r}`);
|
|
|
2709
2676
|
}
|
|
2710
2677
|
return r;
|
|
2711
2678
|
}
|
|
2712
|
-
|
|
2713
|
-
function
|
|
2714
|
-
let { compareKeys: n } =
|
|
2679
|
+
c(_e, "compareObjects");
|
|
2680
|
+
function we(t, e) {
|
|
2681
|
+
let { compareKeys: n } = pt(e);
|
|
2715
2682
|
return {
|
|
2716
2683
|
...t,
|
|
2717
2684
|
compareKeys: n
|
|
2718
2685
|
};
|
|
2719
2686
|
}
|
|
2720
|
-
|
|
2721
|
-
function
|
|
2722
|
-
let o = { ...n, indent: 0 }, s = Z(t, o),
|
|
2723
|
-
if (s ===
|
|
2724
|
-
return Oe(
|
|
2687
|
+
c(we, "getFormatOptions");
|
|
2688
|
+
function Rn(t, e, n, r) {
|
|
2689
|
+
let o = { ...n, indent: 0 }, s = Z(t, o), i = Z(e, o);
|
|
2690
|
+
if (s === i)
|
|
2691
|
+
return Oe(Fn, r);
|
|
2725
2692
|
{
|
|
2726
|
-
let
|
|
2727
|
-
return
|
|
2728
|
-
u.split(`
|
|
2729
|
-
`),
|
|
2693
|
+
let l = Z(t, n), u = Z(e, n);
|
|
2694
|
+
return ms(
|
|
2730
2695
|
l.split(`
|
|
2696
|
+
`),
|
|
2697
|
+
u.split(`
|
|
2731
2698
|
`),
|
|
2732
2699
|
s.split(`
|
|
2733
2700
|
`),
|
|
2734
|
-
|
|
2701
|
+
i.split(`
|
|
2735
2702
|
`),
|
|
2736
2703
|
r
|
|
2737
2704
|
);
|
|
2738
2705
|
}
|
|
2739
2706
|
}
|
|
2740
|
-
|
|
2741
|
-
var
|
|
2742
|
-
function
|
|
2707
|
+
c(Rn, "getObjectsDifference");
|
|
2708
|
+
var Pn = 2e4;
|
|
2709
|
+
function Mn(t) {
|
|
2743
2710
|
return Yt(t) === "Object" && typeof t.asymmetricMatch == "function";
|
|
2744
2711
|
}
|
|
2745
|
-
|
|
2746
|
-
function
|
|
2712
|
+
c(Mn, "isAsymmetricMatcher");
|
|
2713
|
+
function Ln(t, e) {
|
|
2747
2714
|
let n = Yt(t), r = Yt(e);
|
|
2748
2715
|
return n === r && (n === "Object" || n === "Array");
|
|
2749
2716
|
}
|
|
2750
|
-
|
|
2751
|
-
function
|
|
2752
|
-
let { aAnnotation: r, bAnnotation: o } =
|
|
2753
|
-
if (typeof t == "string" && typeof e == "string" && t.length > 0 && e.length > 0 && t.length <=
|
|
2717
|
+
c(Ln, "isReplaceable");
|
|
2718
|
+
function Gn(t, e, n) {
|
|
2719
|
+
let { aAnnotation: r, bAnnotation: o } = pt(n);
|
|
2720
|
+
if (typeof t == "string" && typeof e == "string" && t.length > 0 && e.length > 0 && t.length <= Pn && e.length <= Pn && t !== e) {
|
|
2754
2721
|
if (t.includes(`
|
|
2755
2722
|
`) || e.includes(`
|
|
2756
2723
|
`))
|
|
2757
|
-
return
|
|
2758
|
-
let [
|
|
2759
|
-
|
|
2760
|
-
),
|
|
2761
|
-
|
|
2724
|
+
return ds(e, t, n);
|
|
2725
|
+
let [m] = Vn(e, t, !0), a = m.some((y) => y[0] === M), S = Ts(r, o), g = S(r) + Is(
|
|
2726
|
+
xn(m, z, a)
|
|
2727
|
+
), h = S(o) + Ns(
|
|
2728
|
+
xn(m, F, a)
|
|
2762
2729
|
);
|
|
2763
|
-
return `${
|
|
2764
|
-
${
|
|
2765
|
-
}
|
|
2766
|
-
let s = be(t, { forceWritable: !0 }),
|
|
2767
|
-
return
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
|
-
function
|
|
2771
|
-
return
|
|
2772
|
-
let s = e[o],
|
|
2773
|
-
if (
|
|
2774
|
-
s.asymmetricMatch(
|
|
2775
|
-
else if (
|
|
2776
|
-
|
|
2777
|
-
else if (
|
|
2778
|
-
let
|
|
2779
|
-
|
|
2730
|
+
return `${g}
|
|
2731
|
+
${h}`;
|
|
2732
|
+
}
|
|
2733
|
+
let s = be(t, { forceWritable: !0 }), i = be(e, { forceWritable: !0 }), { replacedExpected: l, replacedActual: u } = Hn(s, i);
|
|
2734
|
+
return ws(l, u, n);
|
|
2735
|
+
}
|
|
2736
|
+
c(Gn, "printDiffOrStringify");
|
|
2737
|
+
function Hn(t, e, n = /* @__PURE__ */ new WeakSet(), r = /* @__PURE__ */ new WeakSet()) {
|
|
2738
|
+
return Ln(t, e) ? n.has(t) || r.has(e) ? { replacedActual: t, replacedExpected: e } : (n.add(t), r.add(e), de(e).forEach((o) => {
|
|
2739
|
+
let s = e[o], i = t[o];
|
|
2740
|
+
if (Mn(s))
|
|
2741
|
+
s.asymmetricMatch(i) && (t[o] = s);
|
|
2742
|
+
else if (Mn(i))
|
|
2743
|
+
i.asymmetricMatch(s) && (e[o] = i);
|
|
2744
|
+
else if (Ln(i, s)) {
|
|
2745
|
+
let l = Hn(
|
|
2746
|
+
i,
|
|
2780
2747
|
s,
|
|
2781
2748
|
n,
|
|
2782
2749
|
r
|
|
2783
2750
|
);
|
|
2784
|
-
t[o] =
|
|
2751
|
+
t[o] = l.replacedActual, e[o] = l.replacedExpected;
|
|
2785
2752
|
}
|
|
2786
2753
|
}), {
|
|
2787
2754
|
replacedActual: t,
|
|
2788
2755
|
replacedExpected: e
|
|
2789
2756
|
}) : { replacedActual: t, replacedExpected: e };
|
|
2790
2757
|
}
|
|
2791
|
-
|
|
2792
|
-
function
|
|
2758
|
+
c(Hn, "replaceAsymmetricMatcher");
|
|
2759
|
+
function Ts(...t) {
|
|
2793
2760
|
let e = t.reduce(
|
|
2794
2761
|
(n, r) => r.length > n ? r.length : n,
|
|
2795
2762
|
0
|
|
2796
2763
|
);
|
|
2797
2764
|
return (n) => `${n}: ${" ".repeat(e - n.length)}`;
|
|
2798
2765
|
}
|
|
2799
|
-
|
|
2800
|
-
var
|
|
2801
|
-
function
|
|
2802
|
-
return t.replace(/\s+$/gm, (e) =>
|
|
2766
|
+
c(Ts, "getLabelPrinter");
|
|
2767
|
+
var As = "\xB7";
|
|
2768
|
+
function Jn(t) {
|
|
2769
|
+
return t.replace(/\s+$/gm, (e) => As.repeat(e.length));
|
|
2803
2770
|
}
|
|
2804
|
-
|
|
2805
|
-
function
|
|
2806
|
-
return v.red(
|
|
2771
|
+
c(Jn, "replaceTrailingSpaces");
|
|
2772
|
+
function Ns(t) {
|
|
2773
|
+
return v.red(Jn(mt(t)));
|
|
2807
2774
|
}
|
|
2808
|
-
|
|
2809
|
-
function
|
|
2810
|
-
return v.green(
|
|
2775
|
+
c(Ns, "printReceived");
|
|
2776
|
+
function Is(t) {
|
|
2777
|
+
return v.green(Jn(mt(t)));
|
|
2811
2778
|
}
|
|
2812
|
-
|
|
2813
|
-
function
|
|
2779
|
+
c(Is, "printExpected");
|
|
2780
|
+
function xn(t, e, n) {
|
|
2814
2781
|
return t.reduce(
|
|
2815
2782
|
(r, o) => r + (o[0] === M ? o[1] : o[0] === e ? n ? v.inverse(o[1]) : o[1] : ""),
|
|
2816
2783
|
""
|
|
2817
2784
|
);
|
|
2818
2785
|
}
|
|
2819
|
-
|
|
2786
|
+
c(xn, "getCommonAndChangedSubstrings");
|
|
2820
2787
|
|
|
2821
2788
|
// ../node_modules/@vitest/utils/dist/error.js
|
|
2822
|
-
var
|
|
2823
|
-
function
|
|
2824
|
-
return t && (t[
|
|
2789
|
+
var Rs = "@@__IMMUTABLE_RECORD__@@", Ps = "@@__IMMUTABLE_ITERABLE__@@";
|
|
2790
|
+
function Ms(t) {
|
|
2791
|
+
return t && (t[Ps] || t[Rs]);
|
|
2825
2792
|
}
|
|
2826
|
-
|
|
2827
|
-
var
|
|
2828
|
-
function
|
|
2793
|
+
c(Ms, "isImmutable");
|
|
2794
|
+
var Ls = Object.getPrototypeOf({});
|
|
2795
|
+
function Xn(t) {
|
|
2829
2796
|
return t instanceof Error ? `<unserializable>: ${t.message}` : typeof t == "string" ? `<unserializable>: ${t}` : "<unserializable>";
|
|
2830
2797
|
}
|
|
2831
|
-
|
|
2798
|
+
c(Xn, "getUnserializableMessage");
|
|
2832
2799
|
function St(t, e = /* @__PURE__ */ new WeakMap()) {
|
|
2833
2800
|
if (!t || typeof t == "string")
|
|
2834
2801
|
return t;
|
|
@@ -2838,14 +2805,14 @@ function St(t, e = /* @__PURE__ */ new WeakMap()) {
|
|
|
2838
2805
|
return t.toString();
|
|
2839
2806
|
if (typeof t != "object")
|
|
2840
2807
|
return t;
|
|
2841
|
-
if (
|
|
2808
|
+
if (Ms(t))
|
|
2842
2809
|
return St(t.toJSON(), e);
|
|
2843
2810
|
if (t instanceof Promise || t.constructor && t.constructor.prototype === "AsyncFunction")
|
|
2844
2811
|
return "Promise";
|
|
2845
2812
|
if (typeof Element < "u" && t instanceof Element)
|
|
2846
2813
|
return t.tagName;
|
|
2847
2814
|
if (typeof t.asymmetricMatch == "function")
|
|
2848
|
-
return `${t.toString()} ${
|
|
2815
|
+
return `${t.toString()} ${dn(t.sample)}`;
|
|
2849
2816
|
if (typeof t.toJSON == "function")
|
|
2850
2817
|
return St(t.toJSON(), e);
|
|
2851
2818
|
if (e.has(t))
|
|
@@ -2856,41 +2823,41 @@ function St(t, e = /* @__PURE__ */ new WeakMap()) {
|
|
|
2856
2823
|
try {
|
|
2857
2824
|
n[o] = St(r, e);
|
|
2858
2825
|
} catch (s) {
|
|
2859
|
-
n[o] =
|
|
2826
|
+
n[o] = Xn(s);
|
|
2860
2827
|
}
|
|
2861
2828
|
}), n;
|
|
2862
2829
|
} else {
|
|
2863
2830
|
let n = /* @__PURE__ */ Object.create(null);
|
|
2864
2831
|
e.set(t, n);
|
|
2865
2832
|
let r = t;
|
|
2866
|
-
for (; r && r !==
|
|
2833
|
+
for (; r && r !== Ls; )
|
|
2867
2834
|
Object.getOwnPropertyNames(r).forEach((o) => {
|
|
2868
2835
|
if (!(o in n))
|
|
2869
2836
|
try {
|
|
2870
2837
|
n[o] = St(t[o], e);
|
|
2871
2838
|
} catch (s) {
|
|
2872
|
-
delete n[o], n[o] =
|
|
2839
|
+
delete n[o], n[o] = Xn(s);
|
|
2873
2840
|
}
|
|
2874
2841
|
}), r = Object.getPrototypeOf(r);
|
|
2875
2842
|
return n;
|
|
2876
2843
|
}
|
|
2877
2844
|
}
|
|
2878
|
-
|
|
2879
|
-
function
|
|
2845
|
+
c(St, "serializeValue");
|
|
2846
|
+
function xs(t) {
|
|
2880
2847
|
return t.replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "");
|
|
2881
2848
|
}
|
|
2882
|
-
|
|
2849
|
+
c(xs, "normalizeErrorMessage");
|
|
2883
2850
|
function Ae(t, e, n = /* @__PURE__ */ new WeakSet()) {
|
|
2884
2851
|
if (!t || typeof t != "object")
|
|
2885
2852
|
return { message: String(t) };
|
|
2886
2853
|
let r = t;
|
|
2887
2854
|
r.stack && (r.stackStr = String(r.stack)), r.name && (r.nameStr = String(r.name)), (r.showDiff || r.showDiff === void 0 && r.expected !== void 0 &&
|
|
2888
|
-
r.actual !== void 0) && (r.diff =
|
|
2855
|
+
r.actual !== void 0) && (r.diff = Gn(r.actual, r.expected, {
|
|
2889
2856
|
...e,
|
|
2890
2857
|
...r.diffOptions
|
|
2891
|
-
})), typeof r.expected != "string" && (r.expected =
|
|
2858
|
+
})), typeof r.expected != "string" && (r.expected = mt(r.expected, 10)), typeof r.actual != "string" && (r.actual = mt(r.actual, 10));
|
|
2892
2859
|
try {
|
|
2893
|
-
typeof r.message == "string" && (r.message =
|
|
2860
|
+
typeof r.message == "string" && (r.message = xs(r.message));
|
|
2894
2861
|
} catch {
|
|
2895
2862
|
}
|
|
2896
2863
|
try {
|
|
@@ -2908,10 +2875,13 @@ Inner error message: ${r?.message}`
|
|
|
2908
2875
|
);
|
|
2909
2876
|
}
|
|
2910
2877
|
}
|
|
2911
|
-
|
|
2878
|
+
c(Ae, "processError");
|
|
2879
|
+
|
|
2880
|
+
// src/instrumenter/instrumenter.ts
|
|
2881
|
+
var Gt = require("storybook/preview-api");
|
|
2912
2882
|
|
|
2913
2883
|
// src/instrumenter/types.ts
|
|
2914
|
-
var
|
|
2884
|
+
var Zn = /* @__PURE__ */ ((o) => (o.DONE = "done", o.ERROR = "error", o.ACTIVE = "active", o.WAITING = "waiting", o))(Zn || {});
|
|
2915
2885
|
|
|
2916
2886
|
// src/instrumenter/instrumenter.ts
|
|
2917
2887
|
var nt = {
|
|
@@ -2922,29 +2892,29 @@ var nt = {
|
|
|
2922
2892
|
GOTO: "storybook/instrumenter/goto",
|
|
2923
2893
|
NEXT: "storybook/instrumenter/next",
|
|
2924
2894
|
END: "storybook/instrumenter/end"
|
|
2925
|
-
},
|
|
2895
|
+
}, Qn = {
|
|
2926
2896
|
start: !1,
|
|
2927
2897
|
back: !1,
|
|
2928
2898
|
goto: !1,
|
|
2929
2899
|
next: !1,
|
|
2930
2900
|
end: !1
|
|
2931
|
-
},
|
|
2901
|
+
}, js = new Error(
|
|
2932
2902
|
"This function ran after the play function completed. Did you forget to `await` it?"
|
|
2933
|
-
),
|
|
2934
|
-
prototype.toString.call(t) === "[object Module]", "isModule"),
|
|
2935
|
-
if (!
|
|
2903
|
+
), vn = /* @__PURE__ */ c((t) => Object.prototype.toString.call(t) === "[object Object]", "isObject"), Ds = /* @__PURE__ */ c((t) => Object.
|
|
2904
|
+
prototype.toString.call(t) === "[object Module]", "isModule"), Fs = /* @__PURE__ */ c((t) => {
|
|
2905
|
+
if (!vn(t) && !Ds(t))
|
|
2936
2906
|
return !1;
|
|
2937
2907
|
if (t.constructor === void 0)
|
|
2938
2908
|
return !0;
|
|
2939
2909
|
let e = t.constructor.prototype;
|
|
2940
|
-
return !!
|
|
2941
|
-
}, "isInstrumentable"),
|
|
2910
|
+
return !!vn(e);
|
|
2911
|
+
}, "isInstrumentable"), ks = /* @__PURE__ */ c((t) => {
|
|
2942
2912
|
try {
|
|
2943
2913
|
return new t.constructor();
|
|
2944
2914
|
} catch {
|
|
2945
2915
|
return {};
|
|
2946
2916
|
}
|
|
2947
|
-
}, "construct"), Ne = /* @__PURE__ */
|
|
2917
|
+
}, "construct"), Ne = /* @__PURE__ */ c(() => ({
|
|
2948
2918
|
renderPhase: void 0,
|
|
2949
2919
|
isDebugging: !1,
|
|
2950
2920
|
isPlaying: !1,
|
|
@@ -2958,7 +2928,7 @@ prototype.toString.call(t) === "[object Module]", "isModule"), Qs = /* @__PURE__
|
|
|
2958
2928
|
playUntil: void 0,
|
|
2959
2929
|
resolvers: {},
|
|
2960
2930
|
syncTimeout: void 0
|
|
2961
|
-
}), "getInitialState"),
|
|
2931
|
+
}), "getInitialState"), tr = /* @__PURE__ */ c((t, e = !1) => {
|
|
2962
2932
|
let n = (e ? t.shadowCalls : t.calls).filter((o) => o.retain);
|
|
2963
2933
|
if (!n.length)
|
|
2964
2934
|
return;
|
|
@@ -2969,79 +2939,80 @@ prototype.toString.call(t) === "[object Module]", "isModule"), Qs = /* @__PURE__
|
|
|
2969
2939
|
}, "getRetainedState"), Ie = class {
|
|
2970
2940
|
constructor() {
|
|
2971
2941
|
this.initialized = !1;
|
|
2972
|
-
this.
|
|
2973
|
-
let e = /* @__PURE__ */
|
|
2942
|
+
this.state = U.global.window?.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ || {};
|
|
2943
|
+
let e = /* @__PURE__ */ c(({
|
|
2974
2944
|
storyId: u,
|
|
2975
|
-
isPlaying:
|
|
2976
|
-
isDebugging:
|
|
2945
|
+
isPlaying: f = !0,
|
|
2946
|
+
isDebugging: m = !1
|
|
2977
2947
|
}) => {
|
|
2978
|
-
let
|
|
2948
|
+
let a = this.getState(u);
|
|
2979
2949
|
this.setState(u, {
|
|
2980
2950
|
...Ne(),
|
|
2981
|
-
...
|
|
2982
|
-
shadowCalls:
|
|
2983
|
-
chainedCallIds:
|
|
2984
|
-
playUntil:
|
|
2985
|
-
isPlaying:
|
|
2986
|
-
isDebugging:
|
|
2951
|
+
...tr(a, m),
|
|
2952
|
+
shadowCalls: m ? a.shadowCalls : [],
|
|
2953
|
+
chainedCallIds: m ? a.chainedCallIds : /* @__PURE__ */ new Set(),
|
|
2954
|
+
playUntil: m ? a.playUntil : void 0,
|
|
2955
|
+
isPlaying: f,
|
|
2956
|
+
isDebugging: m
|
|
2987
2957
|
}), this.sync(u);
|
|
2988
|
-
}, "resetState")
|
|
2989
|
-
|
|
2990
|
-
let { isDebugging: f } = this.getState(u);
|
|
2991
|
-
this.setState(u, { renderPhase: l }), l === "preparing" && f && e({ storyId: u }), l === "playing" && e({ storyId: u, isDebugging: f }),
|
|
2992
|
-
l === "played" && this.setState(u, {
|
|
2993
|
-
isLocked: !1,
|
|
2994
|
-
isPlaying: !1,
|
|
2995
|
-
isDebugging: !1
|
|
2996
|
-
}), l === "errored" && this.setState(u, {
|
|
2997
|
-
isLocked: !1,
|
|
2998
|
-
isPlaying: !1
|
|
2999
|
-
});
|
|
3000
|
-
}), this.channel.on(gt.SET_CURRENT_STORY, () => {
|
|
3001
|
-
this.initialized ? this.cleanup() : this.initialized = !0;
|
|
3002
|
-
});
|
|
3003
|
-
let n = /* @__PURE__ */ i(({ storyId: u, playUntil: l }) => {
|
|
3004
|
-
this.getState(u).isDebugging || this.setState(u, ({ calls: p }) => ({
|
|
2958
|
+
}, "resetState"), n = /* @__PURE__ */ c((u) => ({ storyId: f, playUntil: m }) => {
|
|
2959
|
+
this.getState(f).isDebugging || this.setState(f, ({ calls: S }) => ({
|
|
3005
2960
|
calls: [],
|
|
3006
|
-
shadowCalls:
|
|
2961
|
+
shadowCalls: S.map((g) => ({ ...g, status: "waiting" })),
|
|
3007
2962
|
isDebugging: !0
|
|
3008
2963
|
}));
|
|
3009
|
-
let
|
|
3010
|
-
this.setState(
|
|
3011
|
-
if (
|
|
3012
|
-
return { playUntil:
|
|
3013
|
-
let
|
|
2964
|
+
let a = this.getLog(f);
|
|
2965
|
+
this.setState(f, ({ shadowCalls: S }) => {
|
|
2966
|
+
if (m || !a.length)
|
|
2967
|
+
return { playUntil: m };
|
|
2968
|
+
let g = S.findIndex((h) => h.id === a[0].callId);
|
|
3014
2969
|
return {
|
|
3015
|
-
playUntil:
|
|
2970
|
+
playUntil: S.slice(0, g).filter((h) => h.interceptable && !h.ancestors?.length).slice(-1)[0]?.id
|
|
3016
2971
|
};
|
|
3017
|
-
}),
|
|
3018
|
-
}, "start"), r = /* @__PURE__ */
|
|
3019
|
-
let
|
|
3020
|
-
n({ storyId:
|
|
3021
|
-
}, "back"), o = /* @__PURE__ */
|
|
3022
|
-
let { calls:
|
|
3023
|
-
|
|
3024
|
-
if (!
|
|
3025
|
-
let
|
|
3026
|
-
|
|
2972
|
+
}), u.emit(gt.FORCE_REMOUNT, { storyId: f, isDebugging: !0 });
|
|
2973
|
+
}, "start"), r = /* @__PURE__ */ c((u) => ({ storyId: f }) => {
|
|
2974
|
+
let m = this.getLog(f).filter((S) => !S.ancestors?.length), a = m.reduceRight((S, g, h) => S >= 0 || g.status === "waiting" ? S : h, -1);
|
|
2975
|
+
n(u)({ storyId: f, playUntil: m[a - 1]?.callId });
|
|
2976
|
+
}, "back"), o = /* @__PURE__ */ c((u) => ({ storyId: f, callId: m }) => {
|
|
2977
|
+
let { calls: a, shadowCalls: S, resolvers: g } = this.getState(f), h = a.find(({ id: p }) => p === m), y = S.find(({ id: p }) => p ===
|
|
2978
|
+
m);
|
|
2979
|
+
if (!h && y && Object.values(g).length > 0) {
|
|
2980
|
+
let p = this.getLog(f).find((b) => b.status === "waiting")?.callId;
|
|
2981
|
+
y.id !== p && this.setState(f, { playUntil: y.id }), Object.values(g).forEach((b) => b());
|
|
3027
2982
|
} else
|
|
3028
|
-
n({ storyId:
|
|
3029
|
-
}, "goto"), s = /* @__PURE__ */
|
|
3030
|
-
let { resolvers:
|
|
3031
|
-
if (Object.values(
|
|
3032
|
-
Object.values(
|
|
2983
|
+
n(u)({ storyId: f, playUntil: m });
|
|
2984
|
+
}, "goto"), s = /* @__PURE__ */ c((u) => ({ storyId: f }) => {
|
|
2985
|
+
let { resolvers: m } = this.getState(f);
|
|
2986
|
+
if (Object.values(m).length > 0)
|
|
2987
|
+
Object.values(m).forEach((a) => a());
|
|
3033
2988
|
else {
|
|
3034
|
-
let
|
|
3035
|
-
|
|
2989
|
+
let a = this.getLog(f).find((S) => S.status === "waiting")?.callId;
|
|
2990
|
+
a ? n(u)({ storyId: f, playUntil: a }) : i({ storyId: f });
|
|
3036
2991
|
}
|
|
3037
|
-
}, "next"),
|
|
3038
|
-
this.setState(u, { playUntil: void 0, isDebugging: !1 }), Object.values(this.getState(u).resolvers).forEach((
|
|
3039
|
-
}, "end")
|
|
3040
|
-
|
|
3041
|
-
|
|
2992
|
+
}, "next"), i = /* @__PURE__ */ c(({ storyId: u }) => {
|
|
2993
|
+
this.setState(u, { playUntil: void 0, isDebugging: !1 }), Object.values(this.getState(u).resolvers).forEach((f) => f());
|
|
2994
|
+
}, "end"), l = /* @__PURE__ */ c(({ storyId: u, newPhase: f }) => {
|
|
2995
|
+
let { isDebugging: m } = this.getState(u);
|
|
2996
|
+
this.setState(u, { renderPhase: f }), f === "preparing" && m && e({ storyId: u }), f === "playing" && e({ storyId: u, isDebugging: m }),
|
|
2997
|
+
f === "played" && this.setState(u, {
|
|
2998
|
+
isLocked: !1,
|
|
2999
|
+
isPlaying: !1,
|
|
3000
|
+
isDebugging: !1
|
|
3001
|
+
}), f === "errored" && this.setState(u, {
|
|
3002
|
+
isLocked: !1,
|
|
3003
|
+
isPlaying: !1
|
|
3004
|
+
});
|
|
3005
|
+
}, "renderPhaseChanged");
|
|
3006
|
+
(Gt.addons ? Gt.addons.ready() : Promise.resolve()).then(() => {
|
|
3007
|
+
this.channel = Gt.addons.getChannel(), this.channel.on(gt.FORCE_REMOUNT, e), this.channel.on(gt.STORY_RENDER_PHASE_CHANGED, l), this.channel.
|
|
3008
|
+
on(gt.SET_CURRENT_STORY, () => {
|
|
3009
|
+
this.initialized ? this.cleanup() : this.initialized = !0;
|
|
3010
|
+
}), this.channel.on(nt.START, n(this.channel)), this.channel.on(nt.BACK, r(this.channel)), this.channel.on(nt.GOTO, o(this.channel)), this.
|
|
3011
|
+
channel.on(nt.NEXT, s(this.channel)), this.channel.on(nt.END, i);
|
|
3012
|
+
});
|
|
3042
3013
|
}
|
|
3043
3014
|
static {
|
|
3044
|
-
|
|
3015
|
+
c(this, "Instrumenter");
|
|
3045
3016
|
}
|
|
3046
3017
|
getState(e) {
|
|
3047
3018
|
return this.state[e] || Ne();
|
|
@@ -3054,129 +3025,129 @@ prototype.toString.call(t) === "[object Module]", "isModule"), Qs = /* @__PURE__
|
|
|
3054
3025
|
cleanup() {
|
|
3055
3026
|
this.state = Object.entries(this.state).reduce(
|
|
3056
3027
|
(n, [r, o]) => {
|
|
3057
|
-
let s =
|
|
3028
|
+
let s = tr(o);
|
|
3058
3029
|
return s && (n[r] = Object.assign(Ne(), s)), n;
|
|
3059
3030
|
},
|
|
3060
3031
|
{}
|
|
3061
3032
|
);
|
|
3062
|
-
let e = { controlStates:
|
|
3063
|
-
this.channel
|
|
3064
|
-
state);
|
|
3033
|
+
let e = { controlStates: Qn, logItems: [] };
|
|
3034
|
+
this.channel?.emit(nt.SYNC, e), U.global.window?.parent && (U.global.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ =
|
|
3035
|
+
this.state);
|
|
3065
3036
|
}
|
|
3066
3037
|
getLog(e) {
|
|
3067
3038
|
let { calls: n, shadowCalls: r } = this.getState(e), o = [...r];
|
|
3068
|
-
n.forEach((
|
|
3069
|
-
o[
|
|
3039
|
+
n.forEach((i, l) => {
|
|
3040
|
+
o[l] = i;
|
|
3070
3041
|
});
|
|
3071
3042
|
let s = /* @__PURE__ */ new Set();
|
|
3072
|
-
return o.reduceRight((
|
|
3073
|
-
|
|
3074
|
-
}),
|
|
3075
|
-
|
|
3076
|
-
}), (
|
|
3077
|
-
id)),
|
|
3043
|
+
return o.reduceRight((i, l) => (l.args.forEach((u) => {
|
|
3044
|
+
u?.__callId__ && s.add(u.__callId__);
|
|
3045
|
+
}), l.path.forEach((u) => {
|
|
3046
|
+
u.__callId__ && s.add(u.__callId__);
|
|
3047
|
+
}), (l.interceptable || l.exception) && !s.has(l.id) && (i.unshift({ callId: l.id, status: l.status, ancestors: l.ancestors }), s.add(l.
|
|
3048
|
+
id)), i), []);
|
|
3078
3049
|
}
|
|
3079
3050
|
// Traverses the object structure to recursively patch all function properties.
|
|
3080
3051
|
// Returns the original object, or a new object with the same constructor,
|
|
3081
3052
|
// depending on whether it should mutate.
|
|
3082
3053
|
instrument(e, n, r = 0) {
|
|
3083
|
-
if (!
|
|
3054
|
+
if (!Fs(e))
|
|
3084
3055
|
return e;
|
|
3085
|
-
let { mutate: o = !1, path: s = [] } = n,
|
|
3086
|
-
return r += 1,
|
|
3087
|
-
(
|
|
3088
|
-
let f =
|
|
3056
|
+
let { mutate: o = !1, path: s = [] } = n, i = n.getKeys ? n.getKeys(e, r) : Object.keys(e);
|
|
3057
|
+
return r += 1, i.reduce(
|
|
3058
|
+
(l, u) => {
|
|
3059
|
+
let f = Bs(e, u);
|
|
3089
3060
|
if (typeof f?.get == "function") {
|
|
3090
|
-
let a = /* @__PURE__ */
|
|
3091
|
-
return Object.defineProperty(
|
|
3092
|
-
get: /* @__PURE__ */
|
|
3093
|
-
}),
|
|
3061
|
+
let a = /* @__PURE__ */ c(() => f?.get?.bind(e)?.(), "getter");
|
|
3062
|
+
return Object.defineProperty(l, u, {
|
|
3063
|
+
get: /* @__PURE__ */ c(() => this.instrument(a(), { ...n, path: s.concat(u) }, r), "get")
|
|
3064
|
+
}), l;
|
|
3094
3065
|
}
|
|
3095
|
-
let
|
|
3096
|
-
return typeof
|
|
3097
|
-
"function" ? (u
|
|
3098
|
-
{ value:
|
|
3099
|
-
u
|
|
3100
|
-
this.instrument({ ...
|
|
3101
|
-
),
|
|
3066
|
+
let m = e[u];
|
|
3067
|
+
return typeof m != "function" ? (l[u] = this.instrument(m, { ...n, path: s.concat(u) }, r), l) : "__originalFn__" in m && typeof m.__originalFn__ ==
|
|
3068
|
+
"function" ? (l[u] = m, l) : (l[u] = (...a) => this.track(u, m, e, a, n), l[u].__originalFn__ = m, Object.defineProperty(l[u], "name",
|
|
3069
|
+
{ value: u, writable: !1 }), Object.keys(m).length > 0 && Object.assign(
|
|
3070
|
+
l[u],
|
|
3071
|
+
this.instrument({ ...m }, { ...n, path: s.concat(u) }, r)
|
|
3072
|
+
), l);
|
|
3102
3073
|
},
|
|
3103
|
-
o ? e :
|
|
3074
|
+
o ? e : ks(e)
|
|
3104
3075
|
);
|
|
3105
3076
|
}
|
|
3106
3077
|
// Monkey patch an object method to record calls.
|
|
3107
3078
|
// Returns a function that invokes the original function, records the invocation ("call") and
|
|
3108
3079
|
// returns the original result.
|
|
3109
3080
|
track(e, n, r, o, s) {
|
|
3110
|
-
let
|
|
3111
|
-
|
|
3112
|
-
this.setState(
|
|
3113
|
-
let f = `${
|
|
3114
|
-
|
|
3115
|
-
this.intercept : this.invoke).call(this, n, r,
|
|
3116
|
-
return this.instrument(
|
|
3081
|
+
let i = o?.[0]?.__storyId__ || U.global.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId, { cursor: l, ancestors: u } = this.getState(
|
|
3082
|
+
i);
|
|
3083
|
+
this.setState(i, { cursor: l + 1 });
|
|
3084
|
+
let f = `${u.slice(-1)[0] || i} [${l}] ${e}`, { path: m = [], intercept: a = !1, retain: S = !1 } = s, g = typeof a == "function" ? a(e,
|
|
3085
|
+
m) : a, h = { id: f, cursor: l, storyId: i, ancestors: u, path: m, method: e, args: o, interceptable: g, retain: S }, p = (g && !u.length ?
|
|
3086
|
+
this.intercept : this.invoke).call(this, n, r, h, s);
|
|
3087
|
+
return this.instrument(p, { ...s, mutate: !0, path: [{ __callId__: h.id }] });
|
|
3117
3088
|
}
|
|
3118
3089
|
intercept(e, n, r, o) {
|
|
3119
|
-
let { chainedCallIds: s, isDebugging:
|
|
3120
|
-
return !
|
|
3121
|
-
this.setState(r.storyId, ({ resolvers:
|
|
3090
|
+
let { chainedCallIds: s, isDebugging: i, playUntil: l } = this.getState(r.storyId), u = s.has(r.id);
|
|
3091
|
+
return !i || u || l ? (l === r.id && this.setState(r.storyId, { playUntil: void 0 }), this.invoke(e, n, r, o)) : new Promise((f) => {
|
|
3092
|
+
this.setState(r.storyId, ({ resolvers: m }) => ({
|
|
3122
3093
|
isLocked: !1,
|
|
3123
|
-
resolvers: { ...
|
|
3094
|
+
resolvers: { ...m, [r.id]: f }
|
|
3124
3095
|
}));
|
|
3125
3096
|
}).then(() => (this.setState(r.storyId, (f) => {
|
|
3126
|
-
let { [r.id]:
|
|
3097
|
+
let { [r.id]: m, ...a } = f.resolvers;
|
|
3127
3098
|
return { isLocked: !0, resolvers: a };
|
|
3128
3099
|
}), this.invoke(e, n, r, o)));
|
|
3129
3100
|
}
|
|
3130
3101
|
invoke(e, n, r, o) {
|
|
3131
|
-
let { callRefsByResult: s, renderPhase:
|
|
3132
|
-
if (
|
|
3102
|
+
let { callRefsByResult: s, renderPhase: i } = this.getState(r.storyId), l = 25, u = /* @__PURE__ */ c((a, S, g) => {
|
|
3103
|
+
if (g.includes(a))
|
|
3133
3104
|
return "[Circular]";
|
|
3134
|
-
if (
|
|
3105
|
+
if (g = [...g, a], S > l)
|
|
3135
3106
|
return "...";
|
|
3136
3107
|
if (s.has(a))
|
|
3137
3108
|
return s.get(a);
|
|
3138
3109
|
if (a instanceof Array)
|
|
3139
|
-
return a.map((
|
|
3110
|
+
return a.map((h) => u(h, ++S, g));
|
|
3140
3111
|
if (a instanceof Date)
|
|
3141
3112
|
return { __date__: { value: a.toISOString() } };
|
|
3142
3113
|
if (a instanceof Error) {
|
|
3143
|
-
let { name:
|
|
3144
|
-
return { __error__: { name:
|
|
3114
|
+
let { name: h, message: y, stack: p } = a;
|
|
3115
|
+
return { __error__: { name: h, message: y, stack: p } };
|
|
3145
3116
|
}
|
|
3146
3117
|
if (a instanceof RegExp) {
|
|
3147
|
-
let { flags:
|
|
3148
|
-
return { __regexp__: { flags:
|
|
3118
|
+
let { flags: h, source: y } = a;
|
|
3119
|
+
return { __regexp__: { flags: h, source: y } };
|
|
3149
3120
|
}
|
|
3150
3121
|
if (a instanceof U.global.window?.HTMLElement) {
|
|
3151
|
-
let { prefix:
|
|
3152
|
-
return { __element__: { prefix:
|
|
3122
|
+
let { prefix: h, localName: y, id: p, classList: b, innerText: E } = a, $ = Array.from(b);
|
|
3123
|
+
return { __element__: { prefix: h, localName: y, id: p, classNames: $, innerText: E } };
|
|
3153
3124
|
}
|
|
3154
3125
|
return typeof a == "function" ? {
|
|
3155
3126
|
__function__: { name: "getMockName" in a ? a.getMockName() : a.name }
|
|
3156
3127
|
} : typeof a == "symbol" ? { __symbol__: { description: a.description } } : typeof a == "object" && a?.constructor?.name && a?.constructor?.
|
|
3157
3128
|
name !== "Object" ? { __class__: { name: a.constructor.name } } : Object.prototype.toString.call(a) === "[object Object]" ? Object.fromEntries(
|
|
3158
|
-
Object.entries(a).map(([
|
|
3129
|
+
Object.entries(a).map(([h, y]) => [h, u(y, ++S, g)])
|
|
3159
3130
|
) : a;
|
|
3160
3131
|
}, "serializeValues"), f = {
|
|
3161
3132
|
...r,
|
|
3162
|
-
args: r.args.map((a) =>
|
|
3133
|
+
args: r.args.map((a) => u(a, 0, []))
|
|
3163
3134
|
};
|
|
3164
3135
|
r.path.forEach((a) => {
|
|
3165
|
-
a?.__callId__ && this.setState(r.storyId, ({ chainedCallIds:
|
|
3166
|
-
chainedCallIds: new Set(Array.from(
|
|
3136
|
+
a?.__callId__ && this.setState(r.storyId, ({ chainedCallIds: S }) => ({
|
|
3137
|
+
chainedCallIds: new Set(Array.from(S).concat(a.__callId__))
|
|
3167
3138
|
}));
|
|
3168
3139
|
});
|
|
3169
|
-
let
|
|
3140
|
+
let m = /* @__PURE__ */ c((a) => {
|
|
3170
3141
|
if (a instanceof Error) {
|
|
3171
|
-
let { name:
|
|
3172
|
-
showDiff:
|
|
3142
|
+
let { name: S, message: g, stack: h, callId: y = r.id } = a, {
|
|
3143
|
+
showDiff: p = void 0,
|
|
3173
3144
|
diff: b = void 0,
|
|
3174
3145
|
actual: E = void 0,
|
|
3175
3146
|
expected: $ = void 0
|
|
3176
|
-
} = a.name === "AssertionError" ? Ae(a) : a, d = { name:
|
|
3177
|
-
if (this.update({ ...f, status: "error", exception: d }), this.setState(r.storyId, (
|
|
3147
|
+
} = a.name === "AssertionError" ? Ae(a) : a, d = { name: S, message: g, stack: h, callId: y, showDiff: p, diff: b, actual: E, expected: $ };
|
|
3148
|
+
if (this.update({ ...f, status: "error", exception: d }), this.setState(r.storyId, (_) => ({
|
|
3178
3149
|
callRefsByResult: new Map([
|
|
3179
|
-
...Array.from(
|
|
3150
|
+
...Array.from(_.callRefsByResult.entries()),
|
|
3180
3151
|
[a, { __callId__: r.id, retain: r.retain }]
|
|
3181
3152
|
])
|
|
3182
3153
|
})), r.ancestors?.length)
|
|
@@ -3185,36 +3156,36 @@ prototype.toString.call(t) === "[object Module]", "isModule"), Qs = /* @__PURE__
|
|
|
3185
3156
|
throw a;
|
|
3186
3157
|
}, "handleException");
|
|
3187
3158
|
try {
|
|
3188
|
-
if (
|
|
3189
|
-
throw
|
|
3190
|
-
let
|
|
3159
|
+
if (i === "played" && !r.retain)
|
|
3160
|
+
throw js;
|
|
3161
|
+
let S = (o.getArgs ? o.getArgs(r, this.getState(r.storyId)) : r.args).map((h) => typeof h != "function" || Object.keys(h).length ? h :
|
|
3191
3162
|
(...y) => {
|
|
3192
|
-
let { cursor:
|
|
3163
|
+
let { cursor: p, ancestors: b } = this.getState(r.storyId);
|
|
3193
3164
|
this.setState(r.storyId, { cursor: 0, ancestors: [...b, r.id] });
|
|
3194
|
-
let E = /* @__PURE__ */
|
|
3165
|
+
let E = /* @__PURE__ */ c(() => this.setState(r.storyId, { cursor: p, ancestors: b }), "restore"), $ = !1;
|
|
3195
3166
|
try {
|
|
3196
|
-
let d =
|
|
3167
|
+
let d = h(...y);
|
|
3197
3168
|
return d instanceof Promise ? ($ = !0, d.finally(E)) : d;
|
|
3198
3169
|
} finally {
|
|
3199
3170
|
$ || E();
|
|
3200
3171
|
}
|
|
3201
|
-
}),
|
|
3202
|
-
return
|
|
3172
|
+
}), g = e.apply(n, S);
|
|
3173
|
+
return g && ["object", "function", "symbol"].includes(typeof g) && this.setState(r.storyId, (h) => ({
|
|
3203
3174
|
callRefsByResult: new Map([
|
|
3204
|
-
...Array.from(
|
|
3205
|
-
[
|
|
3175
|
+
...Array.from(h.callRefsByResult.entries()),
|
|
3176
|
+
[g, { __callId__: r.id, retain: r.retain }]
|
|
3206
3177
|
])
|
|
3207
3178
|
})), this.update({
|
|
3208
3179
|
...f,
|
|
3209
|
-
status:
|
|
3210
|
-
}),
|
|
3180
|
+
status: g instanceof Promise ? "active" : "done"
|
|
3181
|
+
}), g instanceof Promise ? g.then((h) => (this.update({ ...f, status: "done" }), h), m) : g;
|
|
3211
3182
|
} catch (a) {
|
|
3212
|
-
return
|
|
3183
|
+
return m(a);
|
|
3213
3184
|
}
|
|
3214
3185
|
}
|
|
3215
3186
|
// Sends the call info to the manager and synchronizes the log.
|
|
3216
3187
|
update(e) {
|
|
3217
|
-
this.channel
|
|
3188
|
+
this.channel?.emit(nt.CALL, e), this.setState(e.storyId, ({ calls: n }) => {
|
|
3218
3189
|
let r = n.concat(e).reduce((o, s) => Object.assign(o, { [s.id]: s }), {});
|
|
3219
3190
|
return {
|
|
3220
3191
|
// Calls are sorted to ensure parent calls always come before calls in their callback.
|
|
@@ -3227,29 +3198,29 @@ prototype.toString.call(t) === "[object Module]", "isModule"), Qs = /* @__PURE__
|
|
|
3227
3198
|
// Builds a log of interceptable calls and control states and sends it to the manager.
|
|
3228
3199
|
// Uses a 0ms debounce because this might get called many times in one tick.
|
|
3229
3200
|
sync(e) {
|
|
3230
|
-
let n = /* @__PURE__ */
|
|
3231
|
-
let { isLocked: r, isPlaying: o } = this.getState(e), s = this.getLog(e),
|
|
3232
|
-
status === "waiting")?.callId,
|
|
3233
|
-
if (r ||
|
|
3234
|
-
let a = { controlStates:
|
|
3235
|
-
this.channel
|
|
3201
|
+
let n = /* @__PURE__ */ c(() => {
|
|
3202
|
+
let { isLocked: r, isPlaying: o } = this.getState(e), s = this.getLog(e), i = s.filter(({ ancestors: a }) => !a.length).find((a) => a.
|
|
3203
|
+
status === "waiting")?.callId, l = s.some((a) => a.status === "active");
|
|
3204
|
+
if (r || l || s.length === 0) {
|
|
3205
|
+
let a = { controlStates: Qn, logItems: s };
|
|
3206
|
+
this.channel?.emit(nt.SYNC, a);
|
|
3236
3207
|
return;
|
|
3237
3208
|
}
|
|
3238
|
-
let
|
|
3209
|
+
let u = s.some(
|
|
3239
3210
|
(a) => a.status === "done" || a.status === "error"
|
|
3240
|
-
),
|
|
3241
|
-
start:
|
|
3242
|
-
back:
|
|
3211
|
+
), m = { controlStates: {
|
|
3212
|
+
start: u,
|
|
3213
|
+
back: u,
|
|
3243
3214
|
goto: !0,
|
|
3244
3215
|
next: o,
|
|
3245
3216
|
end: o
|
|
3246
|
-
}, logItems: s, pausedAt:
|
|
3247
|
-
this.channel
|
|
3217
|
+
}, logItems: s, pausedAt: i };
|
|
3218
|
+
this.channel?.emit(nt.SYNC, m);
|
|
3248
3219
|
}, "synchronize");
|
|
3249
3220
|
this.setState(e, ({ syncTimeout: r }) => (clearTimeout(r), { syncTimeout: setTimeout(n, 0) }));
|
|
3250
3221
|
}
|
|
3251
3222
|
};
|
|
3252
|
-
function
|
|
3223
|
+
function nr(t, e = {}) {
|
|
3253
3224
|
try {
|
|
3254
3225
|
let n = !1, r = !1;
|
|
3255
3226
|
return U.global.window?.location?.search?.includes("instrument=true") ? n = !0 : U.global.window?.location?.search?.includes("instrument\
|
|
@@ -3257,11 +3228,11 @@ function cr(t, e = {}) {
|
|
|
3257
3228
|
(U.global.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ = new Ie()), (U.global.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).
|
|
3258
3229
|
instrument(t, e));
|
|
3259
3230
|
} catch (n) {
|
|
3260
|
-
return
|
|
3231
|
+
return er.once.warn(n), t;
|
|
3261
3232
|
}
|
|
3262
3233
|
}
|
|
3263
|
-
|
|
3264
|
-
function
|
|
3234
|
+
c(nr, "instrument");
|
|
3235
|
+
function Bs(t, e) {
|
|
3265
3236
|
let n = t;
|
|
3266
3237
|
for (; n != null; ) {
|
|
3267
3238
|
let r = Object.getOwnPropertyDescriptor(n, e);
|
|
@@ -3270,4 +3241,4 @@ function ti(t, e) {
|
|
|
3270
3241
|
n = Object.getPrototypeOf(n);
|
|
3271
3242
|
}
|
|
3272
3243
|
}
|
|
3273
|
-
|
|
3244
|
+
c(Bs, "getPropertyDescriptor");
|