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