storybook 9.1.0-alpha.0 → 9.1.0-alpha.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/assets/browser/favicon-wrapper.svg +46 -0
- package/assets/browser/favicon.svg +1 -1
- package/dist/actions/index.cjs +16 -16
- package/dist/actions/index.d.ts +1 -38
- package/dist/actions/index.js +12 -12
- package/dist/bin/index.cjs +62 -69
- package/dist/bin/index.js +43 -50
- package/dist/builder-manager/index.cjs +379 -378
- package/dist/builder-manager/index.d.ts +567 -2
- package/dist/builder-manager/index.js +280 -279
- package/dist/cli/bin/index.cjs +945 -945
- package/dist/cli/bin/index.js +673 -672
- package/dist/cli/index.cjs +14965 -14973
- package/dist/cli/index.d.ts +713 -15
- package/dist/cli/index.js +13488 -13495
- package/dist/common/index.cjs +11211 -11103
- package/dist/common/index.d.ts +351 -72
- package/dist/common/index.js +18491 -18379
- package/dist/components/index.cjs +4606 -4425
- package/dist/components/index.d.ts +11 -12
- package/dist/components/index.js +3020 -2834
- package/dist/controls/index.cjs +16 -16
- package/dist/controls/index.d.ts +1 -36
- package/dist/core-server/index.cjs +6690 -6624
- package/dist/core-server/index.d.ts +14 -2
- package/dist/core-server/index.js +6088 -6023
- package/dist/core-server/presets/common-manager.js +3582 -3475
- package/dist/core-server/presets/common-preset.cjs +85015 -5213
- package/dist/core-server/presets/common-preset.js +85107 -5291
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.cjs +28728 -0
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +28729 -0
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.cjs +29339 -0
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +29340 -0
- package/dist/csf/index.cjs +3019 -104
- package/dist/csf/index.d.ts +301 -18
- package/dist/csf/index.js +3031 -98
- package/dist/csf-tools/index.cjs +489 -488
- package/dist/csf-tools/index.js +311 -309
- package/dist/highlight/index.cjs +15 -15
- package/dist/highlight/index.d.ts +1 -12
- package/dist/highlight/index.js +4 -4
- package/dist/instrumenter/index.cjs +1308 -1239
- package/dist/instrumenter/index.d.ts +25 -3
- package/dist/instrumenter/index.js +1345 -1280
- package/dist/manager/globals-module-info.cjs +1 -1
- package/dist/manager/globals-module-info.js +1 -1
- package/dist/manager/globals-runtime.js +42257 -44665
- package/dist/manager/runtime.js +3715 -3536
- package/dist/manager-api/index.cjs +74 -74
- package/dist/manager-api/index.d.ts +4 -1
- package/dist/manager-api/index.js +142 -142
- package/dist/node-logger/index.cjs +8520 -994
- package/dist/node-logger/index.d.ts +395 -2
- package/dist/node-logger/index.js +8535 -995
- package/dist/preview/runtime.js +13701 -16331
- package/dist/preview-api/index.cjs +1434 -1458
- package/dist/preview-api/index.d.ts +13 -10
- package/dist/preview-api/index.js +950 -976
- package/dist/server-errors.cjs +201 -242
- package/dist/server-errors.d.ts +1 -12
- package/dist/server-errors.js +182 -223
- package/dist/telemetry/index.cjs +1919 -1638
- package/dist/telemetry/index.d.ts +4 -2
- package/dist/telemetry/index.js +1972 -1690
- package/dist/test/index.cjs +9184 -9816
- package/dist/test/index.d.ts +8 -1
- package/dist/test/index.js +8390 -9029
- package/dist/types/index.d.ts +19 -17
- package/dist/viewport/index.cjs +17 -24
- package/dist/viewport/index.d.ts +9 -532
- package/dist/viewport/index.js +9 -16
- package/package.json +18 -187
- package/templates/mocker-runtime.template.js +89 -0
- 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,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var mr = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
4
|
-
|
|
5
|
-
// (disabled):../node_modules/util/util.js
|
|
6
|
-
var _n = mr(() => {
|
|
7
|
-
});
|
|
1
|
+
var lr = Object.defineProperty;
|
|
2
|
+
var i = (e, t) => lr(e, "name", { value: t, configurable: !0 });
|
|
8
3
|
|
|
9
4
|
// src/instrumenter/instrumenter.ts
|
|
10
|
-
import { once as
|
|
5
|
+
import { once as qs } from "storybook/internal/client-logger";
|
|
11
6
|
import {
|
|
12
|
-
FORCE_REMOUNT as
|
|
13
|
-
SET_CURRENT_STORY as
|
|
14
|
-
STORY_RENDER_PHASE_CHANGED as
|
|
7
|
+
FORCE_REMOUNT as ir,
|
|
8
|
+
SET_CURRENT_STORY as Ks,
|
|
9
|
+
STORY_RENDER_PHASE_CHANGED as Gs
|
|
15
10
|
} from "storybook/internal/core-events";
|
|
16
|
-
import { global as
|
|
11
|
+
import { global as Z } from "@storybook/global";
|
|
17
12
|
|
|
18
13
|
// ../node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
|
|
19
|
-
var
|
|
14
|
+
var fr = {
|
|
20
15
|
reset: [0, 0],
|
|
21
16
|
bold: [1, 22, "\x1B[22m\x1B[1m"],
|
|
22
17
|
dim: [2, 22, "\x1B[22m\x1B[2m"],
|
|
@@ -58,57 +53,57 @@ var pr = {
|
|
|
58
53
|
bgMagentaBright: [105, 49],
|
|
59
54
|
bgCyanBright: [106, 49],
|
|
60
55
|
bgWhiteBright: [107, 49]
|
|
61
|
-
},
|
|
56
|
+
}, mr = Object.entries(fr);
|
|
62
57
|
function Ge(e) {
|
|
63
58
|
return String(e);
|
|
64
59
|
}
|
|
65
|
-
|
|
60
|
+
i(Ge, "a");
|
|
66
61
|
Ge.open = "";
|
|
67
62
|
Ge.close = "";
|
|
68
|
-
function
|
|
63
|
+
function Ft(e = !1) {
|
|
69
64
|
let t = typeof process < "u" ? process : void 0, n = t?.env || {}, r = t?.argv || [];
|
|
70
65
|
return !("NO_COLOR" in n || r.includes("--no-color")) && ("FORCE_COLOR" in n || r.includes("--color") || t?.platform === "win32" || e && n.
|
|
71
66
|
TERM !== "dumb" || "CI" in n) || typeof window < "u" && !!window.chrome;
|
|
72
67
|
}
|
|
73
|
-
|
|
74
|
-
function
|
|
75
|
-
let t =
|
|
76
|
-
let p = "",
|
|
68
|
+
i(Ft, "C");
|
|
69
|
+
function jt(e = !1) {
|
|
70
|
+
let t = Ft(e), n = /* @__PURE__ */ i((c, a, u, m) => {
|
|
71
|
+
let p = "", l = 0;
|
|
77
72
|
do
|
|
78
|
-
p += c.substring(
|
|
73
|
+
p += c.substring(l, m) + u, l = m + a.length, m = c.indexOf(a, l);
|
|
79
74
|
while (~m);
|
|
80
|
-
return p + c.substring(
|
|
81
|
-
}, "i"), r = /* @__PURE__ */
|
|
82
|
-
let m = /* @__PURE__ */
|
|
83
|
-
let
|
|
84
|
-
return ~
|
|
75
|
+
return p + c.substring(l);
|
|
76
|
+
}, "i"), r = /* @__PURE__ */ i((c, a, u = c) => {
|
|
77
|
+
let m = /* @__PURE__ */ i((p) => {
|
|
78
|
+
let l = String(p), b = l.indexOf(a, c.length);
|
|
79
|
+
return ~b ? c + n(l, a, u, b) + a : c + l + a;
|
|
85
80
|
}, "o");
|
|
86
|
-
return m.open = c, m.close =
|
|
81
|
+
return m.open = c, m.close = a, m;
|
|
87
82
|
}, "g"), o = {
|
|
88
83
|
isColorSupported: t
|
|
89
|
-
},
|
|
90
|
-
for (let [c,
|
|
84
|
+
}, s = /* @__PURE__ */ i((c) => `\x1B[${c}m`, "d");
|
|
85
|
+
for (let [c, a] of mr)
|
|
91
86
|
o[c] = t ? r(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
s(a[0]),
|
|
88
|
+
s(a[1]),
|
|
89
|
+
a[2]
|
|
95
90
|
) : Ge;
|
|
96
91
|
return o;
|
|
97
92
|
}
|
|
98
|
-
|
|
93
|
+
i(jt, "p");
|
|
99
94
|
|
|
100
95
|
// ../node_modules/tinyrainbow/dist/browser.js
|
|
101
|
-
var v =
|
|
96
|
+
var v = jt();
|
|
102
97
|
|
|
103
98
|
// ../node_modules/@vitest/pretty-format/dist/index.js
|
|
104
|
-
function
|
|
99
|
+
function Xt(e, t) {
|
|
105
100
|
return t.forEach(function(n) {
|
|
106
101
|
n && typeof n != "string" && !Array.isArray(n) && Object.keys(n).forEach(function(r) {
|
|
107
102
|
if (r !== "default" && !(r in e)) {
|
|
108
103
|
var o = Object.getOwnPropertyDescriptor(n, r);
|
|
109
104
|
Object.defineProperty(e, r, o.get ? o : {
|
|
110
105
|
enumerable: !0,
|
|
111
|
-
get: /* @__PURE__ */
|
|
106
|
+
get: /* @__PURE__ */ i(function() {
|
|
112
107
|
return n[r];
|
|
113
108
|
}, "get")
|
|
114
109
|
});
|
|
@@ -116,54 +111,54 @@ function Jt(e, t) {
|
|
|
116
111
|
});
|
|
117
112
|
}), Object.freeze(e);
|
|
118
113
|
}
|
|
119
|
-
|
|
120
|
-
function
|
|
114
|
+
i(Xt, "_mergeNamespaces");
|
|
115
|
+
function pr(e, t) {
|
|
121
116
|
let n = Object.keys(e), r = t === null ? n : n.sort(t);
|
|
122
117
|
if (Object.getOwnPropertySymbols)
|
|
123
118
|
for (let o of Object.getOwnPropertySymbols(e))
|
|
124
119
|
Object.getOwnPropertyDescriptor(e, o).enumerable && r.push(o);
|
|
125
120
|
return r;
|
|
126
121
|
}
|
|
127
|
-
|
|
128
|
-
function
|
|
129
|
-
let
|
|
122
|
+
i(pr, "getKeysOfEnumerableProperties");
|
|
123
|
+
function Ee(e, t, n, r, o, s, c = ": ") {
|
|
124
|
+
let a = "", u = 0, m = e.next();
|
|
130
125
|
if (!m.done) {
|
|
131
|
-
|
|
126
|
+
a += t.spacingOuter;
|
|
132
127
|
let p = n + t.indent;
|
|
133
128
|
for (; !m.done; ) {
|
|
134
|
-
if (
|
|
135
|
-
|
|
129
|
+
if (a += p, u++ === t.maxWidth) {
|
|
130
|
+
a += "\u2026";
|
|
136
131
|
break;
|
|
137
132
|
}
|
|
138
|
-
let
|
|
139
|
-
|
|
133
|
+
let l = s(m.value[0], t, p, r, o), b = s(m.value[1], t, p, r, o);
|
|
134
|
+
a += l + c + b, m = e.next(), m.done ? t.min || (a += ",") : a += `,${t.spacingInner}`;
|
|
140
135
|
}
|
|
141
|
-
|
|
136
|
+
a += t.spacingOuter + n;
|
|
142
137
|
}
|
|
143
|
-
return
|
|
138
|
+
return a;
|
|
144
139
|
}
|
|
145
|
-
|
|
146
|
-
function Qe(e, t, n, r, o,
|
|
147
|
-
let c = "",
|
|
140
|
+
i(Ee, "printIteratorEntries");
|
|
141
|
+
function Qe(e, t, n, r, o, s) {
|
|
142
|
+
let c = "", a = 0, u = e.next();
|
|
148
143
|
if (!u.done) {
|
|
149
144
|
c += t.spacingOuter;
|
|
150
145
|
let m = n + t.indent;
|
|
151
146
|
for (; !u.done; ) {
|
|
152
|
-
if (c += m,
|
|
147
|
+
if (c += m, a++ === t.maxWidth) {
|
|
153
148
|
c += "\u2026";
|
|
154
149
|
break;
|
|
155
150
|
}
|
|
156
|
-
c +=
|
|
151
|
+
c += s(u.value, t, m, r, o), u = e.next(), u.done ? t.min || (c += ",") : c += `,${t.spacingInner}`;
|
|
157
152
|
}
|
|
158
153
|
c += t.spacingOuter + n;
|
|
159
154
|
}
|
|
160
155
|
return c;
|
|
161
156
|
}
|
|
162
|
-
|
|
163
|
-
function
|
|
157
|
+
i(Qe, "printIteratorValues");
|
|
158
|
+
function Ae(e, t, n, r, o, s) {
|
|
164
159
|
let c = "";
|
|
165
160
|
e = e instanceof ArrayBuffer ? new DataView(e) : e;
|
|
166
|
-
let
|
|
161
|
+
let a = /* @__PURE__ */ i((m) => m instanceof DataView, "isDataView"), u = a(e) ? e.byteLength : e.length;
|
|
167
162
|
if (u > 0) {
|
|
168
163
|
c += t.spacingOuter;
|
|
169
164
|
let m = n + t.indent;
|
|
@@ -172,149 +167,149 @@ function Ne(e, t, n, r, o, i) {
|
|
|
172
167
|
c += "\u2026";
|
|
173
168
|
break;
|
|
174
169
|
}
|
|
175
|
-
(
|
|
170
|
+
(a(e) || p in e) && (c += s(a(e) ? e.getInt8(p) : e[p], t, m, r, o)), p < u - 1 ? c += `,${t.spacingInner}` : t.min || (c += ",");
|
|
176
171
|
}
|
|
177
172
|
c += t.spacingOuter + n;
|
|
178
173
|
}
|
|
179
174
|
return c;
|
|
180
175
|
}
|
|
181
|
-
|
|
182
|
-
function ve(e, t, n, r, o,
|
|
183
|
-
let c = "",
|
|
184
|
-
if (
|
|
176
|
+
i(Ae, "printListItems");
|
|
177
|
+
function ve(e, t, n, r, o, s) {
|
|
178
|
+
let c = "", a = pr(e, t.compareKeys);
|
|
179
|
+
if (a.length > 0) {
|
|
185
180
|
c += t.spacingOuter;
|
|
186
181
|
let u = n + t.indent;
|
|
187
|
-
for (let m = 0; m <
|
|
188
|
-
let p =
|
|
189
|
-
c += `${u +
|
|
182
|
+
for (let m = 0; m < a.length; m++) {
|
|
183
|
+
let p = a[m], l = s(p, t, u, r, o), b = s(e[p], t, u, r, o);
|
|
184
|
+
c += `${u + l}: ${b}`, m < a.length - 1 ? c += `,${t.spacingInner}` : t.min || (c += ",");
|
|
190
185
|
}
|
|
191
186
|
c += t.spacingOuter + n;
|
|
192
187
|
}
|
|
193
188
|
return c;
|
|
194
189
|
}
|
|
195
|
-
|
|
196
|
-
var
|
|
190
|
+
i(ve, "printObjectProperties");
|
|
191
|
+
var gr = typeof Symbol == "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621, we = " ", hr = /* @__PURE__ */ i((e, t, n, r, o, s) => {
|
|
197
192
|
let c = e.toString();
|
|
198
193
|
if (c === "ArrayContaining" || c === "ArrayNotContaining")
|
|
199
|
-
return ++r > t.maxDepth ? `[${c}]` : `${c +
|
|
194
|
+
return ++r > t.maxDepth ? `[${c}]` : `${c + we}[${Ae(e.sample, t, n, r, o, s)}]`;
|
|
200
195
|
if (c === "ObjectContaining" || c === "ObjectNotContaining")
|
|
201
|
-
return ++r > t.maxDepth ? `[${c}]` : `${c +
|
|
196
|
+
return ++r > t.maxDepth ? `[${c}]` : `${c + we}{${ve(e.sample, t, n, r, o, s)}}`;
|
|
202
197
|
if (c === "StringMatching" || c === "StringNotMatching" || c === "StringContaining" || c === "StringNotContaining")
|
|
203
|
-
return c +
|
|
198
|
+
return c + we + s(e.sample, t, n, r, o);
|
|
204
199
|
if (typeof e.toAsymmetricMatcher != "function")
|
|
205
200
|
throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);
|
|
206
201
|
return e.toAsymmetricMatcher();
|
|
207
|
-
}, "serialize$5"),
|
|
208
|
-
serialize:
|
|
209
|
-
test:
|
|
210
|
-
},
|
|
202
|
+
}, "serialize$5"), dr = /* @__PURE__ */ i((e) => e && e.$$typeof === gr, "test$5"), yr = {
|
|
203
|
+
serialize: hr,
|
|
204
|
+
test: dr
|
|
205
|
+
}, br = " ", Zt = /* @__PURE__ */ new Set(["DOMStringMap", "NamedNodeMap"]), Sr = /^(?:HTML\w*Collection|NodeList)$/;
|
|
206
|
+
function Er(e) {
|
|
207
|
+
return Zt.has(e) || Sr.test(e);
|
|
208
|
+
}
|
|
209
|
+
i(Er, "testName");
|
|
210
|
+
var _r = /* @__PURE__ */ i((e) => e && e.constructor && !!e.constructor.name && Er(e.constructor.name), "test$4");
|
|
211
211
|
function Tr(e) {
|
|
212
|
-
return Xt.has(e) || _r.test(e);
|
|
213
|
-
}
|
|
214
|
-
s(Tr, "testName");
|
|
215
|
-
var Cr = /* @__PURE__ */ s((e) => e && e.constructor && !!e.constructor.name && Tr(e.constructor.name), "test$4");
|
|
216
|
-
function Or(e) {
|
|
217
212
|
return e.constructor.name === "NamedNodeMap";
|
|
218
213
|
}
|
|
219
|
-
|
|
220
|
-
var
|
|
214
|
+
i(Tr, "isNamedNodeMap");
|
|
215
|
+
var Cr = /* @__PURE__ */ i((e, t, n, r, o, s) => {
|
|
221
216
|
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:
|
|
217
|
+
return ++r > t.maxDepth ? `[${c}]` : (t.min ? "" : c + br) + (Zt.has(c) ? `{${ve(Tr(e) ? [...e].reduce((a, u) => (a[u.name] = u.value, a),
|
|
218
|
+
{}) : { ...e }, t, n, r, o, s)}}` : `[${Ae([...e], t, n, r, o, s)}]`);
|
|
219
|
+
}, "serialize$4"), Or = {
|
|
220
|
+
serialize: Cr,
|
|
221
|
+
test: _r
|
|
227
222
|
};
|
|
228
|
-
function
|
|
223
|
+
function Qt(e) {
|
|
229
224
|
return e.replaceAll("<", "<").replaceAll(">", ">");
|
|
230
225
|
}
|
|
231
|
-
|
|
232
|
-
function et(e, t, n, r, o,
|
|
233
|
-
let
|
|
226
|
+
i(Qt, "escapeHTML");
|
|
227
|
+
function et(e, t, n, r, o, s, c) {
|
|
228
|
+
let a = r + n.indent, u = n.colors;
|
|
234
229
|
return e.map((m) => {
|
|
235
|
-
let p = t[m],
|
|
236
|
-
return typeof p != "string" && (
|
|
237
|
-
`) && (
|
|
230
|
+
let p = t[m], l = c(p, n, a, o, s);
|
|
231
|
+
return typeof p != "string" && (l.includes(`
|
|
232
|
+
`) && (l = n.spacingOuter + a + l + n.spacingOuter + r), l = `{${l}}`), `${n.spacingInner + r + u.prop.open + m + u.prop.close}=${u.value.open}${l}${u.
|
|
238
233
|
value.close}`;
|
|
239
234
|
}).join("");
|
|
240
235
|
}
|
|
241
|
-
|
|
242
|
-
function tt(e, t, n, r, o,
|
|
243
|
-
return e.map((c) => t.spacingOuter + n + (typeof c == "string" ?
|
|
236
|
+
i(et, "printProps");
|
|
237
|
+
function tt(e, t, n, r, o, s) {
|
|
238
|
+
return e.map((c) => t.spacingOuter + n + (typeof c == "string" ? vt(c, t) : s(c, t, n, r, o))).join("");
|
|
244
239
|
}
|
|
245
|
-
|
|
246
|
-
function
|
|
240
|
+
i(tt, "printChildren");
|
|
241
|
+
function vt(e, t) {
|
|
247
242
|
let n = t.colors.content;
|
|
248
|
-
return n.open +
|
|
243
|
+
return n.open + Qt(e) + n.close;
|
|
249
244
|
}
|
|
250
|
-
|
|
251
|
-
function
|
|
245
|
+
i(vt, "printText");
|
|
246
|
+
function $r(e, t) {
|
|
252
247
|
let n = t.colors.comment;
|
|
253
|
-
return `${n.open}<!--${
|
|
248
|
+
return `${n.open}<!--${Qt(e)}-->${n.close}`;
|
|
254
249
|
}
|
|
255
|
-
|
|
250
|
+
i($r, "printComment");
|
|
256
251
|
function nt(e, t, n, r, o) {
|
|
257
|
-
let
|
|
258
|
-
return `${
|
|
259
|
-
!r.min ? "" : " "}/`}>${
|
|
252
|
+
let s = r.colors.tag;
|
|
253
|
+
return `${s.open}<${e}${t && s.close + t + r.spacingOuter + o + s.open}${n ? `>${s.close}${n}${r.spacingOuter}${o}${s.open}</${e}` : `${t &&
|
|
254
|
+
!r.min ? "" : " "}/`}>${s.close}`;
|
|
260
255
|
}
|
|
261
|
-
|
|
256
|
+
i(nt, "printElement");
|
|
262
257
|
function rt(e, t) {
|
|
263
258
|
let n = t.colors.tag;
|
|
264
259
|
return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`;
|
|
265
260
|
}
|
|
266
|
-
|
|
267
|
-
var
|
|
268
|
-
function
|
|
261
|
+
i(rt, "printElementAsLeaf");
|
|
262
|
+
var wr = 1, en = 3, tn = 8, nn = 11, Rr = /^(?:(?:HTML|SVG)\w*)?Element$/;
|
|
263
|
+
function Ar(e) {
|
|
269
264
|
try {
|
|
270
265
|
return typeof e.hasAttribute == "function" && e.hasAttribute("is");
|
|
271
266
|
} catch {
|
|
272
267
|
return !1;
|
|
273
268
|
}
|
|
274
269
|
}
|
|
275
|
-
|
|
270
|
+
i(Ar, "testHasAttribute");
|
|
276
271
|
function Pr(e) {
|
|
277
|
-
let t = e.constructor.name, { nodeType: n, tagName: r } = e, o = typeof r == "string" && r.includes("-") ||
|
|
278
|
-
return n ===
|
|
272
|
+
let t = e.constructor.name, { nodeType: n, tagName: r } = e, o = typeof r == "string" && r.includes("-") || Ar(e);
|
|
273
|
+
return n === wr && (Rr.test(t) || o) || n === en && t === "Text" || n === tn && t === "Comment" || n === nn && t === "DocumentFragment";
|
|
279
274
|
}
|
|
280
|
-
|
|
281
|
-
var
|
|
275
|
+
i(Pr, "testNode");
|
|
276
|
+
var Nr = /* @__PURE__ */ i((e) => {
|
|
282
277
|
var t;
|
|
283
278
|
return (e == null || (t = e.constructor) === null || t === void 0 ? void 0 : t.name) && Pr(e);
|
|
284
279
|
}, "test$3");
|
|
285
|
-
function
|
|
286
|
-
return e.nodeType === vt;
|
|
287
|
-
}
|
|
288
|
-
s(Lr, "nodeIsText");
|
|
289
|
-
function xr(e) {
|
|
280
|
+
function Ir(e) {
|
|
290
281
|
return e.nodeType === en;
|
|
291
282
|
}
|
|
292
|
-
|
|
293
|
-
function
|
|
283
|
+
i(Ir, "nodeIsText");
|
|
284
|
+
function Mr(e) {
|
|
294
285
|
return e.nodeType === tn;
|
|
295
286
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
287
|
+
i(Mr, "nodeIsComment");
|
|
288
|
+
function He(e) {
|
|
289
|
+
return e.nodeType === nn;
|
|
290
|
+
}
|
|
291
|
+
i(He, "nodeIsFragment");
|
|
292
|
+
var Lr = /* @__PURE__ */ i((e, t, n, r, o, s) => {
|
|
293
|
+
if (Ir(e))
|
|
294
|
+
return vt(e.data, t);
|
|
295
|
+
if (Mr(e))
|
|
296
|
+
return $r(e.data, t);
|
|
302
297
|
let c = He(e) ? "DocumentFragment" : e.tagName.toLowerCase();
|
|
303
|
-
return ++r > t.maxDepth ? rt(c, t) : nt(c, et(He(e) ? [] : Array.from(e.attributes, (
|
|
304
|
-
reduce((
|
|
305
|
-
t.indent, r, o,
|
|
306
|
-
}, "serialize$3"),
|
|
307
|
-
serialize:
|
|
308
|
-
test:
|
|
309
|
-
},
|
|
310
|
-
_IMMUTABLE_ORDERED__@@",
|
|
311
|
-
ACK__@@",
|
|
312
|
-
",
|
|
313
|
-
function
|
|
314
|
-
return ++r > t.maxDepth ?
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
function
|
|
298
|
+
return ++r > t.maxDepth ? rt(c, t) : nt(c, et(He(e) ? [] : Array.from(e.attributes, (a) => a.name).sort(), He(e) ? {} : [...e.attributes].
|
|
299
|
+
reduce((a, u) => (a[u.name] = u.value, a), {}), t, n + t.indent, r, o, s), tt(Array.prototype.slice.call(e.childNodes || e.children), t, n +
|
|
300
|
+
t.indent, r, o, s), t, n);
|
|
301
|
+
}, "serialize$3"), xr = {
|
|
302
|
+
serialize: Lr,
|
|
303
|
+
test: Nr
|
|
304
|
+
}, Dr = "@@__IMMUTABLE_ITERABLE__@@", Fr = "@@__IMMUTABLE_LIST__@@", jr = "@@__IMMUTABLE_KEYED__@@", kr = "@@__IMMUTABLE_MAP__@@", kt = "@@_\
|
|
305
|
+
_IMMUTABLE_ORDERED__@@", Br = "@@__IMMUTABLE_RECORD__@@", zr = "@@__IMMUTABLE_SEQ__@@", Yr = "@@__IMMUTABLE_SET__@@", Ur = "@@__IMMUTABLE_ST\
|
|
306
|
+
ACK__@@", de = /* @__PURE__ */ i((e) => `Immutable.${e}`, "getImmutableName"), Ne = /* @__PURE__ */ i((e) => `[${e}]`, "printAsLeaf"), Se = "\
|
|
307
|
+
", Bt = "\u2026";
|
|
308
|
+
function Wr(e, t, n, r, o, s, c) {
|
|
309
|
+
return ++r > t.maxDepth ? Ne(de(c)) : `${de(c) + Se}{${Ee(e.entries(), t, n, r, o, s)}}`;
|
|
310
|
+
}
|
|
311
|
+
i(Wr, "printImmutableEntries");
|
|
312
|
+
function Vr(e) {
|
|
318
313
|
let t = 0;
|
|
319
314
|
return { next() {
|
|
320
315
|
if (t < e._keys.length) {
|
|
@@ -330,45 +325,45 @@ function Kr(e) {
|
|
|
330
325
|
};
|
|
331
326
|
} };
|
|
332
327
|
}
|
|
333
|
-
|
|
334
|
-
function
|
|
335
|
-
let c =
|
|
336
|
-
return ++r > t.maxDepth ?
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
function
|
|
340
|
-
let c =
|
|
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:
|
|
328
|
+
i(Vr, "getRecordEntries");
|
|
329
|
+
function qr(e, t, n, r, o, s) {
|
|
330
|
+
let c = de(e._name || "Record");
|
|
331
|
+
return ++r > t.maxDepth ? Ne(c) : `${c + Se}{${Ee(Vr(e), t, n, r, o, s)}}`;
|
|
332
|
+
}
|
|
333
|
+
i(qr, "printImmutableRecord");
|
|
334
|
+
function Kr(e, t, n, r, o, s) {
|
|
335
|
+
let c = de("Seq");
|
|
336
|
+
return ++r > t.maxDepth ? Ne(c) : e[jr] ? `${c + Se}{${e._iter || e._object ? Ee(e.entries(), t, n, r, o, s) : Bt}}` : `${c + Se}[${e._iter ||
|
|
337
|
+
e._array || e._collection || e._iterable ? Qe(e.values(), t, n, r, o, s) : Bt}]`;
|
|
338
|
+
}
|
|
339
|
+
i(Kr, "printImmutableSeq");
|
|
340
|
+
function Je(e, t, n, r, o, s, c) {
|
|
341
|
+
return ++r > t.maxDepth ? Ne(de(c)) : `${de(c) + Se}[${Qe(e.values(), t, n, r, o, s)}]`;
|
|
342
|
+
}
|
|
343
|
+
i(Je, "printImmutableValues");
|
|
344
|
+
var Gr = /* @__PURE__ */ i((e, t, n, r, o, s) => e[kr] ? Wr(e, t, n, r, o, s, e[kt] ? "OrderedMap" : "Map") : e[Fr] ? Je(e, t, n, r, o, s, "\
|
|
345
|
+
List") : e[Yr] ? Je(e, t, n, r, o, s, e[kt] ? "OrderedSet" : "Set") : e[Ur] ? Je(e, t, n, r, o, s, "Stack") : e[zr] ? Kr(e, t, n, r, o, s) :
|
|
346
|
+
qr(e, t, n, r, o, s), "serialize$2"), Hr = /* @__PURE__ */ i((e) => e && (e[Dr] === !0 || e[Br] === !0), "test$2"), Jr = {
|
|
347
|
+
serialize: Gr,
|
|
348
|
+
test: Hr
|
|
354
349
|
};
|
|
355
|
-
function
|
|
350
|
+
function rn(e) {
|
|
356
351
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
357
352
|
}
|
|
358
|
-
|
|
353
|
+
i(rn, "getDefaultExportFromCjs");
|
|
359
354
|
var Xe = { exports: {} };
|
|
360
|
-
var
|
|
361
|
-
var
|
|
362
|
-
function
|
|
363
|
-
return
|
|
355
|
+
var A = {};
|
|
356
|
+
var zt;
|
|
357
|
+
function Xr() {
|
|
358
|
+
return zt || (zt = 1, function() {
|
|
364
359
|
function e(f) {
|
|
365
360
|
if (typeof f == "object" && f !== null) {
|
|
366
|
-
var
|
|
367
|
-
switch (
|
|
361
|
+
var d = f.$$typeof;
|
|
362
|
+
switch (d) {
|
|
368
363
|
case t:
|
|
369
364
|
switch (f = f.type, f) {
|
|
370
365
|
case r:
|
|
371
|
-
case
|
|
366
|
+
case s:
|
|
372
367
|
case o:
|
|
373
368
|
case m:
|
|
374
369
|
case p:
|
|
@@ -376,111 +371,111 @@ function Qr() {
|
|
|
376
371
|
return f;
|
|
377
372
|
default:
|
|
378
373
|
switch (f = f && f.$$typeof, f) {
|
|
379
|
-
case l:
|
|
380
|
-
case u:
|
|
381
|
-
case S:
|
|
382
374
|
case a:
|
|
375
|
+
case u:
|
|
376
|
+
case b:
|
|
377
|
+
case l:
|
|
383
378
|
return f;
|
|
384
379
|
case c:
|
|
385
380
|
return f;
|
|
386
381
|
default:
|
|
387
|
-
return
|
|
382
|
+
return d;
|
|
388
383
|
}
|
|
389
384
|
}
|
|
390
385
|
case n:
|
|
391
|
-
return
|
|
386
|
+
return d;
|
|
392
387
|
}
|
|
393
388
|
}
|
|
394
389
|
}
|
|
395
|
-
|
|
390
|
+
i(e, "typeOf");
|
|
396
391
|
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"),
|
|
398
|
-
forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"),
|
|
392
|
+
t.strict_mode"), s = Symbol.for("react.profiler"), c = Symbol.for("react.consumer"), a = Symbol.for("react.context"), u = Symbol.for("react.\
|
|
393
|
+
forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), l = Symbol.for("react.memo"), b = Symbol.for("react.\
|
|
399
394
|
lazy"), g = Symbol.for("react.view_transition"), h = Symbol.for("react.client.reference");
|
|
400
|
-
|
|
401
|
-
|
|
395
|
+
A.ContextConsumer = c, A.ContextProvider = a, A.Element = t, A.ForwardRef = u, A.Fragment = r, A.Lazy = b, A.Memo = l, A.Portal = n, A.Profiler =
|
|
396
|
+
s, A.StrictMode = o, A.Suspense = m, A.SuspenseList = p, A.isContextConsumer = function(f) {
|
|
402
397
|
return e(f) === c;
|
|
403
|
-
},
|
|
404
|
-
return e(f) ===
|
|
405
|
-
},
|
|
398
|
+
}, A.isContextProvider = function(f) {
|
|
399
|
+
return e(f) === a;
|
|
400
|
+
}, A.isElement = function(f) {
|
|
406
401
|
return typeof f == "object" && f !== null && f.$$typeof === t;
|
|
407
|
-
},
|
|
402
|
+
}, A.isForwardRef = function(f) {
|
|
408
403
|
return e(f) === u;
|
|
409
|
-
},
|
|
404
|
+
}, A.isFragment = function(f) {
|
|
410
405
|
return e(f) === r;
|
|
411
|
-
},
|
|
412
|
-
return e(f) ===
|
|
413
|
-
},
|
|
414
|
-
return e(f) ===
|
|
415
|
-
},
|
|
406
|
+
}, A.isLazy = function(f) {
|
|
407
|
+
return e(f) === b;
|
|
408
|
+
}, A.isMemo = function(f) {
|
|
409
|
+
return e(f) === l;
|
|
410
|
+
}, A.isPortal = function(f) {
|
|
416
411
|
return e(f) === n;
|
|
417
|
-
},
|
|
418
|
-
return e(f) ===
|
|
419
|
-
},
|
|
412
|
+
}, A.isProfiler = function(f) {
|
|
413
|
+
return e(f) === s;
|
|
414
|
+
}, A.isStrictMode = function(f) {
|
|
420
415
|
return e(f) === o;
|
|
421
|
-
},
|
|
416
|
+
}, A.isSuspense = function(f) {
|
|
422
417
|
return e(f) === m;
|
|
423
|
-
},
|
|
418
|
+
}, A.isSuspenseList = function(f) {
|
|
424
419
|
return e(f) === p;
|
|
425
|
-
},
|
|
426
|
-
return typeof f == "string" || typeof f == "function" || f === r || f ===
|
|
427
|
-
f !== null && (f.$$typeof ===
|
|
420
|
+
}, A.isValidElementType = function(f) {
|
|
421
|
+
return typeof f == "string" || typeof f == "function" || f === r || f === s || f === o || f === m || f === p || typeof f == "object" &&
|
|
422
|
+
f !== null && (f.$$typeof === b || f.$$typeof === l || f.$$typeof === a || f.$$typeof === c || f.$$typeof === u || f.$$typeof === h ||
|
|
428
423
|
f.getModuleId !== void 0);
|
|
429
|
-
},
|
|
430
|
-
}()),
|
|
424
|
+
}, A.typeOf = e;
|
|
425
|
+
}()), A;
|
|
431
426
|
}
|
|
432
|
-
|
|
433
|
-
var
|
|
434
|
-
function
|
|
435
|
-
return
|
|
427
|
+
i(Xr, "requireReactIs_development$1");
|
|
428
|
+
var Yt;
|
|
429
|
+
function Zr() {
|
|
430
|
+
return Yt || (Yt = 1, Xe.exports = Xr()), Xe.exports;
|
|
436
431
|
}
|
|
437
|
-
|
|
438
|
-
var
|
|
432
|
+
i(Zr, "requireReactIs$1");
|
|
433
|
+
var on = Zr(), Qr = /* @__PURE__ */ rn(on), vr = /* @__PURE__ */ Xt({
|
|
439
434
|
__proto__: null,
|
|
440
|
-
default:
|
|
441
|
-
}, [
|
|
435
|
+
default: Qr
|
|
436
|
+
}, [on]), Ze = { exports: {} };
|
|
442
437
|
var w = {};
|
|
443
|
-
var
|
|
444
|
-
function
|
|
445
|
-
return
|
|
438
|
+
var Ut;
|
|
439
|
+
function eo() {
|
|
440
|
+
return Ut || (Ut = 1, function() {
|
|
446
441
|
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"),
|
|
448
|
-
t"), u = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"),
|
|
449
|
-
o"),
|
|
442
|
+
o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), c = Symbol.for("react.context"), a = Symbol.for("react.server_contex\
|
|
443
|
+
t"), u = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), l = Symbol.for("react.mem\
|
|
444
|
+
o"), b = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), h = !1, f = !1, d = !1, S = !1, _ = !1, O;
|
|
450
445
|
O = Symbol.for("react.module.reference");
|
|
451
|
-
function
|
|
452
|
-
return !!(typeof C == "string" || typeof C == "function" || C === n || C === o || _ || C === r || C === m || C === p ||
|
|
453
|
-
h || f ||
|
|
446
|
+
function y(C) {
|
|
447
|
+
return !!(typeof C == "string" || typeof C == "function" || C === n || C === o || _ || C === r || C === m || C === p || S || C === g ||
|
|
448
|
+
h || f || d || typeof C == "object" && C !== null && (C.$$typeof === b || C.$$typeof === l || C.$$typeof === s || C.$$typeof === c || C.
|
|
454
449
|
$$typeof === u || // This needs to include all possible module reference object
|
|
455
450
|
// types supported by any Flight configuration anywhere since
|
|
456
451
|
// we don't know which Flight build this will end up being used
|
|
457
452
|
// with.
|
|
458
453
|
C.$$typeof === O || C.getModuleId !== void 0));
|
|
459
454
|
}
|
|
460
|
-
|
|
455
|
+
i(y, "isValidElementType");
|
|
461
456
|
function E(C) {
|
|
462
457
|
if (typeof C == "object" && C !== null) {
|
|
463
458
|
var Ke = C.$$typeof;
|
|
464
459
|
switch (Ke) {
|
|
465
460
|
case e:
|
|
466
|
-
var
|
|
467
|
-
switch (
|
|
461
|
+
var $e = C.type;
|
|
462
|
+
switch ($e) {
|
|
468
463
|
case n:
|
|
469
464
|
case o:
|
|
470
465
|
case r:
|
|
471
466
|
case m:
|
|
472
467
|
case p:
|
|
473
|
-
return
|
|
468
|
+
return $e;
|
|
474
469
|
default:
|
|
475
|
-
var
|
|
476
|
-
switch (
|
|
477
|
-
case
|
|
470
|
+
var Dt = $e && $e.$$typeof;
|
|
471
|
+
switch (Dt) {
|
|
472
|
+
case a:
|
|
478
473
|
case c:
|
|
479
474
|
case u:
|
|
480
|
-
case
|
|
481
|
-
case
|
|
482
|
-
case
|
|
483
|
-
return
|
|
475
|
+
case b:
|
|
476
|
+
case l:
|
|
477
|
+
case s:
|
|
478
|
+
return Dt;
|
|
484
479
|
default:
|
|
485
480
|
return Ke;
|
|
486
481
|
}
|
|
@@ -490,79 +485,79 @@ o"), S = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), h = !1, f
|
|
|
490
485
|
}
|
|
491
486
|
}
|
|
492
487
|
}
|
|
493
|
-
|
|
494
|
-
var $ = c, T =
|
|
495
|
-
function
|
|
496
|
-
return
|
|
488
|
+
i(E, "typeOf");
|
|
489
|
+
var $ = c, T = s, R = e, K = u, Q = n, I = b, k = l, G = t, Y = o, N = r, L = m, x = p, H = !1, F = !1;
|
|
490
|
+
function W(C) {
|
|
491
|
+
return H || (H = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
497
492
|
}
|
|
498
|
-
|
|
493
|
+
i(W, "isAsyncMode");
|
|
499
494
|
function re(C) {
|
|
500
495
|
return F || (F = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
501
496
|
}
|
|
502
|
-
|
|
503
|
-
function
|
|
497
|
+
i(re, "isConcurrentMode");
|
|
498
|
+
function V(C) {
|
|
504
499
|
return E(C) === c;
|
|
505
500
|
}
|
|
506
|
-
|
|
507
|
-
function
|
|
508
|
-
return E(C) ===
|
|
501
|
+
i(V, "isContextConsumer");
|
|
502
|
+
function q(C) {
|
|
503
|
+
return E(C) === s;
|
|
509
504
|
}
|
|
510
|
-
|
|
511
|
-
function
|
|
505
|
+
i(q, "isContextProvider");
|
|
506
|
+
function se(C) {
|
|
512
507
|
return typeof C == "object" && C !== null && C.$$typeof === e;
|
|
513
508
|
}
|
|
514
|
-
|
|
515
|
-
function
|
|
509
|
+
i(se, "isElement");
|
|
510
|
+
function J(C) {
|
|
516
511
|
return E(C) === u;
|
|
517
512
|
}
|
|
518
|
-
|
|
519
|
-
function
|
|
513
|
+
i(J, "isForwardRef");
|
|
514
|
+
function U(C) {
|
|
520
515
|
return E(C) === n;
|
|
521
516
|
}
|
|
522
|
-
|
|
517
|
+
i(U, "isFragment");
|
|
523
518
|
function oe(C) {
|
|
524
|
-
return E(C) ===
|
|
519
|
+
return E(C) === b;
|
|
525
520
|
}
|
|
526
|
-
|
|
527
|
-
function
|
|
528
|
-
return E(C) ===
|
|
521
|
+
i(oe, "isLazy");
|
|
522
|
+
function he(C) {
|
|
523
|
+
return E(C) === l;
|
|
529
524
|
}
|
|
530
|
-
|
|
525
|
+
i(he, "isMemo");
|
|
531
526
|
function ue(C) {
|
|
532
527
|
return E(C) === t;
|
|
533
528
|
}
|
|
534
|
-
|
|
535
|
-
function
|
|
529
|
+
i(ue, "isPortal");
|
|
530
|
+
function be(C) {
|
|
536
531
|
return E(C) === o;
|
|
537
532
|
}
|
|
538
|
-
|
|
539
|
-
function
|
|
533
|
+
i(be, "isProfiler");
|
|
534
|
+
function Ce(C) {
|
|
540
535
|
return E(C) === r;
|
|
541
536
|
}
|
|
542
|
-
|
|
543
|
-
function
|
|
537
|
+
i(Ce, "isStrictMode");
|
|
538
|
+
function Oe(C) {
|
|
544
539
|
return E(C) === m;
|
|
545
540
|
}
|
|
546
|
-
|
|
541
|
+
i(Oe, "isSuspense");
|
|
547
542
|
function ar(C) {
|
|
548
543
|
return E(C) === p;
|
|
549
544
|
}
|
|
550
|
-
|
|
551
|
-
k, w.Portal =
|
|
552
|
-
|
|
553
|
-
|
|
545
|
+
i(ar, "isSuspenseList"), w.ContextConsumer = $, w.ContextProvider = T, w.Element = R, w.ForwardRef = K, w.Fragment = Q, w.Lazy = I, w.Memo =
|
|
546
|
+
k, w.Portal = G, w.Profiler = Y, w.StrictMode = N, w.Suspense = L, w.SuspenseList = x, w.isAsyncMode = W, w.isConcurrentMode = re, w.isContextConsumer =
|
|
547
|
+
V, w.isContextProvider = q, w.isElement = se, w.isForwardRef = J, w.isFragment = U, w.isLazy = oe, w.isMemo = he, w.isPortal = ue, w.isProfiler =
|
|
548
|
+
be, w.isStrictMode = Ce, w.isSuspense = Oe, w.isSuspenseList = ar, w.isValidElementType = y, w.typeOf = E;
|
|
554
549
|
}()), w;
|
|
555
550
|
}
|
|
556
|
-
|
|
557
|
-
var
|
|
558
|
-
function
|
|
559
|
-
return
|
|
551
|
+
i(eo, "requireReactIs_development");
|
|
552
|
+
var Wt;
|
|
553
|
+
function to() {
|
|
554
|
+
return Wt || (Wt = 1, Ze.exports = eo()), Ze.exports;
|
|
560
555
|
}
|
|
561
|
-
|
|
562
|
-
var
|
|
556
|
+
i(to, "requireReactIs");
|
|
557
|
+
var sn = to(), no = /* @__PURE__ */ rn(sn), ro = /* @__PURE__ */ Xt({
|
|
563
558
|
__proto__: null,
|
|
564
|
-
default:
|
|
565
|
-
}, [
|
|
559
|
+
default: no
|
|
560
|
+
}, [sn]), oo = [
|
|
566
561
|
"isAsyncMode",
|
|
567
562
|
"isConcurrentMode",
|
|
568
563
|
"isContextConsumer",
|
|
@@ -578,108 +573,108 @@ var on = ro(), oo = /* @__PURE__ */ nn(on), io = /* @__PURE__ */ Jt({
|
|
|
578
573
|
"isSuspense",
|
|
579
574
|
"isSuspenseList",
|
|
580
575
|
"isValidElementType"
|
|
581
|
-
],
|
|
582
|
-
function
|
|
576
|
+
], fe = Object.fromEntries(oo.map((e) => [e, (t) => ro[e](t) || vr[e](t)]));
|
|
577
|
+
function cn(e, t = []) {
|
|
583
578
|
if (Array.isArray(e))
|
|
584
579
|
for (let n of e)
|
|
585
|
-
|
|
580
|
+
cn(n, t);
|
|
586
581
|
else e != null && e !== !1 && e !== "" && t.push(e);
|
|
587
582
|
return t;
|
|
588
583
|
}
|
|
589
|
-
|
|
590
|
-
function
|
|
584
|
+
i(cn, "getChildren");
|
|
585
|
+
function Vt(e) {
|
|
591
586
|
let t = e.type;
|
|
592
587
|
if (typeof t == "string")
|
|
593
588
|
return t;
|
|
594
589
|
if (typeof t == "function")
|
|
595
590
|
return t.displayName || t.name || "Unknown";
|
|
596
|
-
if (
|
|
591
|
+
if (fe.isFragment(e))
|
|
597
592
|
return "React.Fragment";
|
|
598
|
-
if (
|
|
593
|
+
if (fe.isSuspense(e))
|
|
599
594
|
return "React.Suspense";
|
|
600
595
|
if (typeof t == "object" && t !== null) {
|
|
601
|
-
if (
|
|
596
|
+
if (fe.isContextProvider(e))
|
|
602
597
|
return "Context.Provider";
|
|
603
|
-
if (
|
|
598
|
+
if (fe.isContextConsumer(e))
|
|
604
599
|
return "Context.Consumer";
|
|
605
|
-
if (
|
|
600
|
+
if (fe.isForwardRef(e)) {
|
|
606
601
|
if (t.displayName)
|
|
607
602
|
return t.displayName;
|
|
608
603
|
let n = t.render.displayName || t.render.name || "";
|
|
609
604
|
return n === "" ? "ForwardRef" : `ForwardRef(${n})`;
|
|
610
605
|
}
|
|
611
|
-
if (
|
|
606
|
+
if (fe.isMemo(e)) {
|
|
612
607
|
let n = t.displayName || t.type.displayName || t.type.name || "";
|
|
613
608
|
return n === "" ? "Memo" : `Memo(${n})`;
|
|
614
609
|
}
|
|
615
610
|
}
|
|
616
611
|
return "UNDEFINED";
|
|
617
612
|
}
|
|
618
|
-
|
|
619
|
-
function
|
|
613
|
+
i(Vt, "getType");
|
|
614
|
+
function so(e) {
|
|
620
615
|
let { props: t } = e;
|
|
621
616
|
return Object.keys(t).filter((n) => n !== "children" && t[n] !== void 0).sort();
|
|
622
617
|
}
|
|
623
|
-
|
|
624
|
-
var
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
serialize:
|
|
628
|
-
test:
|
|
629
|
-
},
|
|
630
|
-
function
|
|
618
|
+
i(so, "getPropKeys$1");
|
|
619
|
+
var io = /* @__PURE__ */ i((e, t, n, r, o, s) => ++r > t.maxDepth ? rt(Vt(e), t) : nt(Vt(e), et(so(e), e.props, t, n + t.indent, r, o, s), tt(
|
|
620
|
+
cn(e.props.children), t, n + t.indent, r, o, s), t, n), "serialize$1"), co = /* @__PURE__ */ i((e) => e != null && fe.isElement(e), "test$1"),
|
|
621
|
+
uo = {
|
|
622
|
+
serialize: io,
|
|
623
|
+
test: co
|
|
624
|
+
}, ao = typeof Symbol == "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
|
|
625
|
+
function lo(e) {
|
|
631
626
|
let { props: t } = e;
|
|
632
627
|
return t ? Object.keys(t).filter((n) => t[n] !== void 0).sort() : [];
|
|
633
628
|
}
|
|
634
|
-
|
|
635
|
-
var
|
|
636
|
-
r, o,
|
|
637
|
-
|
|
638
|
-
serialize:
|
|
639
|
-
test:
|
|
640
|
-
},
|
|
629
|
+
i(lo, "getPropKeys");
|
|
630
|
+
var fo = /* @__PURE__ */ i((e, t, n, r, o, s) => ++r > t.maxDepth ? rt(e.type, t) : nt(e.type, e.props ? et(lo(e), e.props, t, n + t.indent,
|
|
631
|
+
r, o, s) : "", e.children ? tt(e.children, t, n + t.indent, r, o, s) : "", t, n), "serialize"), mo = /* @__PURE__ */ i((e) => e && e.$$typeof ===
|
|
632
|
+
ao, "test"), po = {
|
|
633
|
+
serialize: fo,
|
|
634
|
+
test: mo
|
|
635
|
+
}, un = Object.prototype.toString, go = Date.prototype.toISOString, ho = Error.prototype.toString, qt = RegExp.prototype.toString;
|
|
641
636
|
function Re(e) {
|
|
642
637
|
return typeof e.constructor == "function" && e.constructor.name || "Object";
|
|
643
638
|
}
|
|
644
|
-
|
|
645
|
-
function
|
|
639
|
+
i(Re, "getConstructorName");
|
|
640
|
+
function yo(e) {
|
|
646
641
|
return typeof window < "u" && e === window;
|
|
647
642
|
}
|
|
648
|
-
|
|
649
|
-
var
|
|
643
|
+
i(yo, "isWindow");
|
|
644
|
+
var bo = /^Symbol\((.*)\)(.*)$/, So = /\n/g, st = class st extends Error {
|
|
650
645
|
constructor(t, n) {
|
|
651
646
|
super(t), this.stack = n, this.name = this.constructor.name;
|
|
652
647
|
}
|
|
653
648
|
};
|
|
654
|
-
|
|
655
|
-
var
|
|
656
|
-
function
|
|
649
|
+
i(st, "PrettyFormatPluginError");
|
|
650
|
+
var Pe = st;
|
|
651
|
+
function Eo(e) {
|
|
657
652
|
return e === "[object Array]" || e === "[object ArrayBuffer]" || e === "[object DataView]" || e === "[object Float32Array]" || e === "[obj\
|
|
658
653
|
ect Float64Array]" || e === "[object Int8Array]" || e === "[object Int16Array]" || e === "[object Int32Array]" || e === "[object Uint8Array]" ||
|
|
659
654
|
e === "[object Uint8ClampedArray]" || e === "[object Uint16Array]" || e === "[object Uint32Array]";
|
|
660
655
|
}
|
|
661
|
-
|
|
662
|
-
function
|
|
656
|
+
i(Eo, "isToStringedArrayType");
|
|
657
|
+
function _o(e) {
|
|
663
658
|
return Object.is(e, -0) ? "-0" : String(e);
|
|
664
659
|
}
|
|
665
|
-
|
|
666
|
-
function
|
|
660
|
+
i(_o, "printNumber");
|
|
661
|
+
function To(e) {
|
|
667
662
|
return `${e}n`;
|
|
668
663
|
}
|
|
669
|
-
|
|
670
|
-
function
|
|
664
|
+
i(To, "printBigInt");
|
|
665
|
+
function Kt(e, t) {
|
|
671
666
|
return t ? `[Function ${e.name || "anonymous"}]` : "[Function]";
|
|
672
667
|
}
|
|
673
|
-
|
|
674
|
-
function Kt(e) {
|
|
675
|
-
return String(e).replace(Eo, "Symbol($1)");
|
|
676
|
-
}
|
|
677
|
-
s(Kt, "printSymbol");
|
|
668
|
+
i(Kt, "printFunction");
|
|
678
669
|
function Gt(e) {
|
|
679
|
-
return
|
|
670
|
+
return String(e).replace(bo, "Symbol($1)");
|
|
671
|
+
}
|
|
672
|
+
i(Gt, "printSymbol");
|
|
673
|
+
function Ht(e) {
|
|
674
|
+
return `[${ho.call(e)}]`;
|
|
680
675
|
}
|
|
681
|
-
|
|
682
|
-
function
|
|
676
|
+
i(Ht, "printError");
|
|
677
|
+
function an(e, t, n, r) {
|
|
683
678
|
if (e === !0 || e === !1)
|
|
684
679
|
return `${e}`;
|
|
685
680
|
if (e === void 0)
|
|
@@ -688,102 +683,102 @@ function un(e, t, n, r) {
|
|
|
688
683
|
return "null";
|
|
689
684
|
let o = typeof e;
|
|
690
685
|
if (o === "number")
|
|
691
|
-
return
|
|
686
|
+
return _o(e);
|
|
692
687
|
if (o === "bigint")
|
|
693
|
-
return
|
|
688
|
+
return To(e);
|
|
694
689
|
if (o === "string")
|
|
695
690
|
return r ? `"${e.replaceAll(/"|\\/g, "\\$&")}"` : `"${e}"`;
|
|
696
691
|
if (o === "function")
|
|
697
|
-
return
|
|
692
|
+
return Kt(e, t);
|
|
698
693
|
if (o === "symbol")
|
|
699
|
-
return
|
|
700
|
-
let
|
|
701
|
-
return
|
|
702
|
-
eratorFunction]" ?
|
|
703
|
-
"[object Error]" ?
|
|
704
|
-
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
function ln(e, t, n, r, o,
|
|
694
|
+
return Gt(e);
|
|
695
|
+
let s = un.call(e);
|
|
696
|
+
return s === "[object WeakMap]" ? "WeakMap {}" : s === "[object WeakSet]" ? "WeakSet {}" : s === "[object Function]" || s === "[object Gen\
|
|
697
|
+
eratorFunction]" ? Kt(e, t) : s === "[object Symbol]" ? Gt(e) : s === "[object Date]" ? Number.isNaN(+e) ? "Date { NaN }" : go.call(e) : s ===
|
|
698
|
+
"[object Error]" ? Ht(e) : s === "[object RegExp]" ? n ? qt.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&") : qt.call(e) : e instanceof Error ?
|
|
699
|
+
Ht(e) : null;
|
|
700
|
+
}
|
|
701
|
+
i(an, "printBasicValue");
|
|
702
|
+
function ln(e, t, n, r, o, s) {
|
|
708
703
|
if (o.includes(e))
|
|
709
704
|
return "[Circular]";
|
|
710
705
|
o = [...o], o.push(e);
|
|
711
|
-
let c = ++r > t.maxDepth,
|
|
712
|
-
if (t.callToJSON && !c && e.toJSON && typeof e.toJSON == "function" && !
|
|
713
|
-
return
|
|
714
|
-
let u =
|
|
715
|
-
return u === "[object Arguments]" ? c ? "[Arguments]" : `${
|
|
716
|
-
name}]` : `${
|
|
717
|
-
"[object Map]" ? c ? "[Map]" : `Map {${
|
|
718
|
-
t, n, r, o,
|
|
719
|
-
o,
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
var
|
|
723
|
-
test: /* @__PURE__ */
|
|
724
|
-
serialize(e, t, n, r, o,
|
|
706
|
+
let c = ++r > t.maxDepth, a = t.min;
|
|
707
|
+
if (t.callToJSON && !c && e.toJSON && typeof e.toJSON == "function" && !s)
|
|
708
|
+
return ae(e.toJSON(), t, n, r, o, !0);
|
|
709
|
+
let u = un.call(e);
|
|
710
|
+
return u === "[object Arguments]" ? c ? "[Arguments]" : `${a ? "" : "Arguments "}[${Ae(e, t, n, r, o, ae)}]` : Eo(u) ? c ? `[${e.constructor.
|
|
711
|
+
name}]` : `${a || !t.printBasicPrototype && e.constructor.name === "Array" ? "" : `${e.constructor.name} `}[${Ae(e, t, n, r, o, ae)}]` : u ===
|
|
712
|
+
"[object Map]" ? c ? "[Map]" : `Map {${Ee(e.entries(), t, n, r, o, ae, " => ")}}` : u === "[object Set]" ? c ? "[Set]" : `Set {${Qe(e.values(),
|
|
713
|
+
t, n, r, o, ae)}}` : c || yo(e) ? `[${Re(e)}]` : `${a || !t.printBasicPrototype && Re(e) === "Object" ? "" : `${Re(e)} `}{${ve(e, t, n, r,
|
|
714
|
+
o, ae)}}`;
|
|
715
|
+
}
|
|
716
|
+
i(ln, "printComplexValue");
|
|
717
|
+
var Co = {
|
|
718
|
+
test: /* @__PURE__ */ i((e) => e && e instanceof Error, "test"),
|
|
719
|
+
serialize(e, t, n, r, o, s) {
|
|
725
720
|
if (o.includes(e))
|
|
726
721
|
return "[Circular]";
|
|
727
722
|
o = [...o, e];
|
|
728
|
-
let c = ++r > t.maxDepth, { message:
|
|
729
|
-
message:
|
|
723
|
+
let c = ++r > t.maxDepth, { message: a, cause: u, ...m } = e, p = {
|
|
724
|
+
message: a,
|
|
730
725
|
...typeof u < "u" ? { cause: u } : {},
|
|
731
726
|
...e instanceof AggregateError ? { errors: e.errors } : {},
|
|
732
727
|
...m
|
|
733
|
-
},
|
|
734
|
-
return c ? `[${
|
|
728
|
+
}, l = e.name !== "Error" ? e.name : Re(e);
|
|
729
|
+
return c ? `[${l}]` : `${l} {${Ee(Object.entries(p).values(), t, n, r, o, s)}}`;
|
|
735
730
|
}
|
|
736
731
|
};
|
|
737
|
-
function
|
|
732
|
+
function Oo(e) {
|
|
738
733
|
return e.serialize != null;
|
|
739
734
|
}
|
|
740
|
-
|
|
741
|
-
function
|
|
735
|
+
i(Oo, "isNewPlugin");
|
|
736
|
+
function fn(e, t, n, r, o, s) {
|
|
742
737
|
let c;
|
|
743
738
|
try {
|
|
744
|
-
c =
|
|
739
|
+
c = Oo(e) ? e.serialize(t, n, r, o, s, ae) : e.print(t, (a) => ae(a, n, r, o, s), (a) => {
|
|
745
740
|
let u = r + n.indent;
|
|
746
|
-
return u +
|
|
741
|
+
return u + a.replaceAll(So, `
|
|
747
742
|
${u}`);
|
|
748
743
|
}, {
|
|
749
744
|
edgeSpacing: n.spacingOuter,
|
|
750
745
|
min: n.min,
|
|
751
746
|
spacing: n.spacingInner
|
|
752
747
|
}, n.colors);
|
|
753
|
-
} catch (
|
|
754
|
-
throw new
|
|
748
|
+
} catch (a) {
|
|
749
|
+
throw new Pe(a.message, a.stack);
|
|
755
750
|
}
|
|
756
751
|
if (typeof c != "string")
|
|
757
752
|
throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof c}".`);
|
|
758
753
|
return c;
|
|
759
754
|
}
|
|
760
|
-
|
|
761
|
-
function
|
|
755
|
+
i(fn, "printPlugin");
|
|
756
|
+
function mn(e, t) {
|
|
762
757
|
for (let n of e)
|
|
763
758
|
try {
|
|
764
759
|
if (n.test(t))
|
|
765
760
|
return n;
|
|
766
761
|
} catch (r) {
|
|
767
|
-
throw new
|
|
762
|
+
throw new Pe(r.message, r.stack);
|
|
768
763
|
}
|
|
769
764
|
return null;
|
|
770
765
|
}
|
|
771
|
-
|
|
772
|
-
function
|
|
773
|
-
let c =
|
|
766
|
+
i(mn, "findPlugin");
|
|
767
|
+
function ae(e, t, n, r, o, s) {
|
|
768
|
+
let c = mn(t.plugins, e);
|
|
774
769
|
if (c !== null)
|
|
775
|
-
return
|
|
776
|
-
let
|
|
777
|
-
return
|
|
770
|
+
return fn(c, e, t, n, r, o);
|
|
771
|
+
let a = an(e, t.printFunctionName, t.escapeRegex, t.escapeString);
|
|
772
|
+
return a !== null ? a : ln(e, t, n, r, o, s);
|
|
778
773
|
}
|
|
779
|
-
|
|
774
|
+
i(ae, "printer");
|
|
780
775
|
var ot = {
|
|
781
776
|
comment: "gray",
|
|
782
777
|
content: "reset",
|
|
783
778
|
prop: "yellow",
|
|
784
779
|
tag: "cyan",
|
|
785
780
|
value: "green"
|
|
786
|
-
},
|
|
781
|
+
}, pn = Object.keys(ot), ee = {
|
|
787
782
|
callToJSON: !0,
|
|
788
783
|
compareKeys: void 0,
|
|
789
784
|
escapeRegex: !1,
|
|
@@ -798,16 +793,16 @@ var ot = {
|
|
|
798
793
|
printFunctionName: !0,
|
|
799
794
|
theme: ot
|
|
800
795
|
};
|
|
801
|
-
function
|
|
796
|
+
function $o(e) {
|
|
802
797
|
for (let t of Object.keys(e))
|
|
803
798
|
if (!Object.prototype.hasOwnProperty.call(ee, t))
|
|
804
799
|
throw new Error(`pretty-format: Unknown option "${t}".`);
|
|
805
800
|
if (e.min && e.indent !== void 0 && e.indent !== 0)
|
|
806
801
|
throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');
|
|
807
802
|
}
|
|
808
|
-
|
|
809
|
-
function
|
|
810
|
-
return
|
|
803
|
+
i($o, "validateOptions");
|
|
804
|
+
function wo() {
|
|
805
|
+
return pn.reduce((e, t) => {
|
|
811
806
|
let n = ot[t], r = n && v[n];
|
|
812
807
|
if (r && typeof r.close == "string" && typeof r.open == "string")
|
|
813
808
|
e[t] = r;
|
|
@@ -816,69 +811,69 @@ function Ro() {
|
|
|
816
811
|
return e;
|
|
817
812
|
}, /* @__PURE__ */ Object.create(null));
|
|
818
813
|
}
|
|
819
|
-
|
|
820
|
-
function
|
|
821
|
-
return
|
|
814
|
+
i(wo, "getColorsHighlight");
|
|
815
|
+
function Ro() {
|
|
816
|
+
return pn.reduce((e, t) => (e[t] = {
|
|
822
817
|
close: "",
|
|
823
818
|
open: ""
|
|
824
819
|
}, e), /* @__PURE__ */ Object.create(null));
|
|
825
820
|
}
|
|
826
|
-
|
|
827
|
-
function
|
|
821
|
+
i(Ro, "getColorsEmpty");
|
|
822
|
+
function gn(e) {
|
|
828
823
|
return e?.printFunctionName ?? ee.printFunctionName;
|
|
829
824
|
}
|
|
830
|
-
|
|
831
|
-
function
|
|
825
|
+
i(gn, "getPrintFunctionName");
|
|
826
|
+
function hn(e) {
|
|
832
827
|
return e?.escapeRegex ?? ee.escapeRegex;
|
|
833
828
|
}
|
|
834
|
-
|
|
835
|
-
function
|
|
829
|
+
i(hn, "getEscapeRegex");
|
|
830
|
+
function dn(e) {
|
|
836
831
|
return e?.escapeString ?? ee.escapeString;
|
|
837
832
|
}
|
|
838
|
-
|
|
839
|
-
function
|
|
833
|
+
i(dn, "getEscapeString");
|
|
834
|
+
function Jt(e) {
|
|
840
835
|
return {
|
|
841
836
|
callToJSON: e?.callToJSON ?? ee.callToJSON,
|
|
842
|
-
colors: e?.highlight ?
|
|
837
|
+
colors: e?.highlight ? wo() : Ro(),
|
|
843
838
|
compareKeys: typeof e?.compareKeys == "function" || e?.compareKeys === null ? e.compareKeys : ee.compareKeys,
|
|
844
|
-
escapeRegex:
|
|
845
|
-
escapeString:
|
|
846
|
-
indent: e?.min ? "" :
|
|
839
|
+
escapeRegex: hn(e),
|
|
840
|
+
escapeString: dn(e),
|
|
841
|
+
indent: e?.min ? "" : Ao(e?.indent ?? ee.indent),
|
|
847
842
|
maxDepth: e?.maxDepth ?? ee.maxDepth,
|
|
848
843
|
maxWidth: e?.maxWidth ?? ee.maxWidth,
|
|
849
844
|
min: e?.min ?? ee.min,
|
|
850
845
|
plugins: e?.plugins ?? ee.plugins,
|
|
851
846
|
printBasicPrototype: e?.printBasicPrototype ?? !0,
|
|
852
|
-
printFunctionName:
|
|
847
|
+
printFunctionName: gn(e),
|
|
853
848
|
spacingInner: e?.min ? " " : `
|
|
854
849
|
`,
|
|
855
850
|
spacingOuter: e?.min ? "" : `
|
|
856
851
|
`
|
|
857
852
|
};
|
|
858
853
|
}
|
|
859
|
-
|
|
860
|
-
function
|
|
854
|
+
i(Jt, "getConfig");
|
|
855
|
+
function Ao(e) {
|
|
861
856
|
return Array.from({ length: e + 1 }).join(" ");
|
|
862
857
|
}
|
|
863
|
-
|
|
864
|
-
function
|
|
865
|
-
if (t && (
|
|
866
|
-
let r =
|
|
858
|
+
i(Ao, "createIndent");
|
|
859
|
+
function X(e, t) {
|
|
860
|
+
if (t && ($o(t), t.plugins)) {
|
|
861
|
+
let r = mn(t.plugins, e);
|
|
867
862
|
if (r !== null)
|
|
868
|
-
return
|
|
869
|
-
}
|
|
870
|
-
let n =
|
|
871
|
-
return n !== null ? n : ln(e,
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
var
|
|
875
|
-
AsymmetricMatcher:
|
|
876
|
-
DOMCollection:
|
|
877
|
-
DOMElement:
|
|
878
|
-
Immutable:
|
|
879
|
-
ReactElement:
|
|
880
|
-
ReactTestComponent:
|
|
881
|
-
Error:
|
|
863
|
+
return fn(r, e, Jt(t), "", 0, []);
|
|
864
|
+
}
|
|
865
|
+
let n = an(e, gn(t), hn(t), dn(t));
|
|
866
|
+
return n !== null ? n : ln(e, Jt(t), "", 0, []);
|
|
867
|
+
}
|
|
868
|
+
i(X, "format");
|
|
869
|
+
var _e = {
|
|
870
|
+
AsymmetricMatcher: yr,
|
|
871
|
+
DOMCollection: Or,
|
|
872
|
+
DOMElement: xr,
|
|
873
|
+
Immutable: Jr,
|
|
874
|
+
ReactElement: uo,
|
|
875
|
+
ReactTestComponent: po,
|
|
876
|
+
Error: Co
|
|
882
877
|
};
|
|
883
878
|
|
|
884
879
|
// ../node_modules/loupe/lib/helpers.js
|
|
@@ -921,93 +916,93 @@ var yn = {
|
|
|
921
916
|
symbol: "green",
|
|
922
917
|
date: "magenta",
|
|
923
918
|
regexp: "red"
|
|
924
|
-
},
|
|
925
|
-
function
|
|
919
|
+
}, ie = "\u2026";
|
|
920
|
+
function No(e, t) {
|
|
926
921
|
let n = yn[Po[t]] || yn[t] || "";
|
|
927
922
|
return n ? `\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m` : String(e);
|
|
928
923
|
}
|
|
929
|
-
|
|
930
|
-
function
|
|
924
|
+
i(No, "colorise");
|
|
925
|
+
function bn({
|
|
931
926
|
showHidden: e = !1,
|
|
932
927
|
depth: t = 2,
|
|
933
928
|
colors: n = !1,
|
|
934
929
|
customInspect: r = !0,
|
|
935
930
|
showProxy: o = !1,
|
|
936
|
-
maxArrayLength:
|
|
931
|
+
maxArrayLength: s = 1 / 0,
|
|
937
932
|
breakLength: c = 1 / 0,
|
|
938
|
-
seen:
|
|
933
|
+
seen: a = [],
|
|
939
934
|
// eslint-disable-next-line no-shadow
|
|
940
935
|
truncate: u = 1 / 0,
|
|
941
936
|
stylize: m = String
|
|
942
937
|
} = {}, p) {
|
|
943
|
-
let
|
|
938
|
+
let l = {
|
|
944
939
|
showHidden: !!e,
|
|
945
940
|
depth: Number(t),
|
|
946
941
|
colors: !!n,
|
|
947
942
|
customInspect: !!r,
|
|
948
943
|
showProxy: !!o,
|
|
949
|
-
maxArrayLength: Number(
|
|
944
|
+
maxArrayLength: Number(s),
|
|
950
945
|
breakLength: Number(c),
|
|
951
946
|
truncate: Number(u),
|
|
952
|
-
seen:
|
|
947
|
+
seen: a,
|
|
953
948
|
inspect: p,
|
|
954
949
|
stylize: m
|
|
955
950
|
};
|
|
956
|
-
return
|
|
951
|
+
return l.colors && (l.stylize = No), l;
|
|
957
952
|
}
|
|
958
|
-
|
|
959
|
-
function
|
|
953
|
+
i(bn, "normaliseOptions");
|
|
954
|
+
function Io(e) {
|
|
960
955
|
return e >= "\uD800" && e <= "\uDBFF";
|
|
961
956
|
}
|
|
962
|
-
|
|
963
|
-
function B(e, t, n =
|
|
957
|
+
i(Io, "isHighSurrogate");
|
|
958
|
+
function B(e, t, n = ie) {
|
|
964
959
|
e = String(e);
|
|
965
960
|
let r = n.length, o = e.length;
|
|
966
961
|
if (r > t && o > r)
|
|
967
962
|
return n;
|
|
968
963
|
if (o > t && o > r) {
|
|
969
|
-
let
|
|
970
|
-
return
|
|
964
|
+
let s = t - r;
|
|
965
|
+
return s > 0 && Io(e[s - 1]) && (s = s - 1), `${e.slice(0, s)}${n}`;
|
|
971
966
|
}
|
|
972
967
|
return e;
|
|
973
968
|
}
|
|
974
|
-
|
|
969
|
+
i(B, "truncate");
|
|
975
970
|
function D(e, t, n, r = ", ") {
|
|
976
971
|
n = n || t.inspect;
|
|
977
972
|
let o = e.length;
|
|
978
973
|
if (o === 0)
|
|
979
974
|
return "";
|
|
980
|
-
let
|
|
975
|
+
let s = t.truncate, c = "", a = "", u = "";
|
|
981
976
|
for (let m = 0; m < o; m += 1) {
|
|
982
|
-
let p = m + 1 === e.length,
|
|
983
|
-
u = `${
|
|
984
|
-
let
|
|
985
|
-
t.truncate =
|
|
986
|
-
let g =
|
|
987
|
-
if (p && h >
|
|
988
|
-
length >
|
|
977
|
+
let p = m + 1 === e.length, l = m + 2 === e.length;
|
|
978
|
+
u = `${ie}(${e.length - m})`;
|
|
979
|
+
let b = e[m];
|
|
980
|
+
t.truncate = s - c.length - (p ? 0 : r.length);
|
|
981
|
+
let g = a || n(b, t) + (p ? "" : r), h = c.length + g.length, f = h + u.length;
|
|
982
|
+
if (p && h > s && c.length + u.length <= s || !p && !l && f > s || (a = p ? "" : n(e[m + 1], t) + (l ? "" : r), !p && l && f > s && h + a.
|
|
983
|
+
length > s))
|
|
989
984
|
break;
|
|
990
|
-
if (c += g, !p && !
|
|
991
|
-
u = `${
|
|
985
|
+
if (c += g, !p && !l && h + a.length >= s) {
|
|
986
|
+
u = `${ie}(${e.length - m - 1})`;
|
|
992
987
|
break;
|
|
993
988
|
}
|
|
994
989
|
u = "";
|
|
995
990
|
}
|
|
996
991
|
return `${c}${u}`;
|
|
997
992
|
}
|
|
998
|
-
|
|
999
|
-
function
|
|
993
|
+
i(D, "inspectList");
|
|
994
|
+
function Mo(e) {
|
|
1000
995
|
return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/) ? e : JSON.stringify(e).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
|
|
1001
996
|
}
|
|
1002
|
-
|
|
997
|
+
i(Mo, "quoteComplexKey");
|
|
1003
998
|
function ce([e, t], n) {
|
|
1004
|
-
return n.truncate -= 2, typeof e == "string" ? e =
|
|
999
|
+
return n.truncate -= 2, typeof e == "string" ? e = Mo(e) : typeof e != "number" && (e = `[${n.inspect(e, n)}]`), n.truncate -= e.length, t =
|
|
1005
1000
|
n.inspect(t, n), `${e}: ${t}`;
|
|
1006
1001
|
}
|
|
1007
|
-
|
|
1002
|
+
i(ce, "inspectProperty");
|
|
1008
1003
|
|
|
1009
1004
|
// ../node_modules/loupe/lib/array.js
|
|
1010
|
-
function
|
|
1005
|
+
function it(e, t) {
|
|
1011
1006
|
let n = Object.keys(e).slice(e.length);
|
|
1012
1007
|
if (!e.length && !n.length)
|
|
1013
1008
|
return "[]";
|
|
@@ -1015,32 +1010,32 @@ function st(e, t) {
|
|
|
1015
1010
|
let r = D(e, t);
|
|
1016
1011
|
t.truncate -= r.length;
|
|
1017
1012
|
let o = "";
|
|
1018
|
-
return n.length && (o = D(n.map((
|
|
1013
|
+
return n.length && (o = D(n.map((s) => [s, e[s]]), t, ce)), `[ ${r}${o ? `, ${o}` : ""} ]`;
|
|
1019
1014
|
}
|
|
1020
|
-
|
|
1015
|
+
i(it, "inspectArray");
|
|
1021
1016
|
|
|
1022
1017
|
// ../node_modules/loupe/lib/typedarray.js
|
|
1023
|
-
var
|
|
1018
|
+
var Lo = /* @__PURE__ */ i((e) => typeof Buffer == "function" && e instanceof Buffer ? "Buffer" : e[Symbol.toStringTag] ? e[Symbol.toStringTag] :
|
|
1024
1019
|
e.constructor.name, "getArrayName");
|
|
1025
1020
|
function te(e, t) {
|
|
1026
|
-
let n =
|
|
1021
|
+
let n = Lo(e);
|
|
1027
1022
|
t.truncate -= n.length + 4;
|
|
1028
1023
|
let r = Object.keys(e).slice(e.length);
|
|
1029
1024
|
if (!e.length && !r.length)
|
|
1030
1025
|
return `${n}[]`;
|
|
1031
1026
|
let o = "";
|
|
1032
1027
|
for (let c = 0; c < e.length; c++) {
|
|
1033
|
-
let
|
|
1034
|
-
if (t.truncate -=
|
|
1035
|
-
o += `${
|
|
1028
|
+
let a = `${t.stylize(B(e[c], t.truncate), "number")}${c === e.length - 1 ? "" : ", "}`;
|
|
1029
|
+
if (t.truncate -= a.length, e[c] !== e.length && t.truncate <= 3) {
|
|
1030
|
+
o += `${ie}(${e.length - e[c] + 1})`;
|
|
1036
1031
|
break;
|
|
1037
1032
|
}
|
|
1038
|
-
o +=
|
|
1033
|
+
o += a;
|
|
1039
1034
|
}
|
|
1040
|
-
let
|
|
1041
|
-
return r.length && (
|
|
1035
|
+
let s = "";
|
|
1036
|
+
return r.length && (s = D(r.map((c) => [c, e[c]]), t, ce)), `${n}[ ${o}${s ? `, ${s}` : ""} ]`;
|
|
1042
1037
|
}
|
|
1043
|
-
|
|
1038
|
+
i(te, "inspectTypedArray");
|
|
1044
1039
|
|
|
1045
1040
|
// ../node_modules/loupe/lib/date.js
|
|
1046
1041
|
function ct(e, t) {
|
|
@@ -1050,70 +1045,70 @@ function ct(e, t) {
|
|
|
1050
1045
|
let r = n.split("T"), o = r[0];
|
|
1051
1046
|
return t.stylize(`${o}T${B(r[1], t.truncate - o.length - 1)}`, "date");
|
|
1052
1047
|
}
|
|
1053
|
-
|
|
1048
|
+
i(ct, "inspectDate");
|
|
1054
1049
|
|
|
1055
1050
|
// ../node_modules/loupe/lib/function.js
|
|
1056
|
-
function
|
|
1051
|
+
function Ie(e, t) {
|
|
1057
1052
|
let n = e[Symbol.toStringTag] || "Function", r = e.name;
|
|
1058
1053
|
return r ? t.stylize(`[${n} ${B(r, t.truncate - 11)}]`, "special") : t.stylize(`[${n}]`, "special");
|
|
1059
1054
|
}
|
|
1060
|
-
|
|
1055
|
+
i(Ie, "inspectFunction");
|
|
1061
1056
|
|
|
1062
1057
|
// ../node_modules/loupe/lib/map.js
|
|
1063
|
-
function
|
|
1058
|
+
function xo([e, t], n) {
|
|
1064
1059
|
return n.truncate -= 4, e = n.inspect(e, n), n.truncate -= e.length, t = n.inspect(t, n), `${e} => ${t}`;
|
|
1065
1060
|
}
|
|
1066
|
-
|
|
1067
|
-
function
|
|
1061
|
+
i(xo, "inspectMapEntry");
|
|
1062
|
+
function Do(e) {
|
|
1068
1063
|
let t = [];
|
|
1069
1064
|
return e.forEach((n, r) => {
|
|
1070
1065
|
t.push([r, n]);
|
|
1071
1066
|
}), t;
|
|
1072
1067
|
}
|
|
1073
|
-
|
|
1068
|
+
i(Do, "mapToEntries");
|
|
1074
1069
|
function ut(e, t) {
|
|
1075
|
-
return e.size === 0 ? "Map{}" : (t.truncate -= 7, `Map{ ${D(
|
|
1070
|
+
return e.size === 0 ? "Map{}" : (t.truncate -= 7, `Map{ ${D(Do(e), t, xo)} }`);
|
|
1076
1071
|
}
|
|
1077
|
-
|
|
1072
|
+
i(ut, "inspectMap");
|
|
1078
1073
|
|
|
1079
1074
|
// ../node_modules/loupe/lib/number.js
|
|
1080
|
-
var
|
|
1081
|
-
function
|
|
1082
|
-
return
|
|
1075
|
+
var Fo = Number.isNaN || ((e) => e !== e);
|
|
1076
|
+
function Me(e, t) {
|
|
1077
|
+
return Fo(e) ? t.stylize("NaN", "number") : e === 1 / 0 ? t.stylize("Infinity", "number") : e === -1 / 0 ? t.stylize("-Infinity", "number") :
|
|
1083
1078
|
e === 0 ? t.stylize(1 / e === 1 / 0 ? "+0" : "-0", "number") : t.stylize(B(String(e), t.truncate), "number");
|
|
1084
1079
|
}
|
|
1085
|
-
|
|
1080
|
+
i(Me, "inspectNumber");
|
|
1086
1081
|
|
|
1087
1082
|
// ../node_modules/loupe/lib/bigint.js
|
|
1088
|
-
function
|
|
1083
|
+
function Le(e, t) {
|
|
1089
1084
|
let n = B(e.toString(), t.truncate - 1);
|
|
1090
|
-
return n !==
|
|
1085
|
+
return n !== ie && (n += "n"), t.stylize(n, "bigint");
|
|
1091
1086
|
}
|
|
1092
|
-
|
|
1087
|
+
i(Le, "inspectBigInt");
|
|
1093
1088
|
|
|
1094
1089
|
// ../node_modules/loupe/lib/regexp.js
|
|
1095
|
-
function
|
|
1090
|
+
function at(e, t) {
|
|
1096
1091
|
let n = e.toString().split("/")[2], r = t.truncate - (2 + n.length), o = e.source;
|
|
1097
1092
|
return t.stylize(`/${B(o, r)}/${n}`, "regexp");
|
|
1098
1093
|
}
|
|
1099
|
-
|
|
1094
|
+
i(at, "inspectRegExp");
|
|
1100
1095
|
|
|
1101
1096
|
// ../node_modules/loupe/lib/set.js
|
|
1102
|
-
function
|
|
1097
|
+
function jo(e) {
|
|
1103
1098
|
let t = [];
|
|
1104
1099
|
return e.forEach((n) => {
|
|
1105
1100
|
t.push(n);
|
|
1106
1101
|
}), t;
|
|
1107
1102
|
}
|
|
1108
|
-
|
|
1109
|
-
function
|
|
1110
|
-
return e.size === 0 ? "Set{}" : (t.truncate -= 7, `Set{ ${D(
|
|
1103
|
+
i(jo, "arrayFromSet");
|
|
1104
|
+
function lt(e, t) {
|
|
1105
|
+
return e.size === 0 ? "Set{}" : (t.truncate -= 7, `Set{ ${D(jo(e), t)} }`);
|
|
1111
1106
|
}
|
|
1112
|
-
|
|
1107
|
+
i(lt, "inspectSet");
|
|
1113
1108
|
|
|
1114
1109
|
// ../node_modules/loupe/lib/string.js
|
|
1115
|
-
var
|
|
1116
|
-
ffff]", "g"),
|
|
1110
|
+
var Sn = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\u\
|
|
1111
|
+
ffff]", "g"), ko = {
|
|
1117
1112
|
"\b": "\\b",
|
|
1118
1113
|
" ": "\\t",
|
|
1119
1114
|
"\n": "\\n",
|
|
@@ -1121,66 +1116,66 @@ ffff]", "g"), zo = {
|
|
|
1121
1116
|
"\r": "\\r",
|
|
1122
1117
|
"'": "\\'",
|
|
1123
1118
|
"\\": "\\\\"
|
|
1124
|
-
},
|
|
1125
|
-
function
|
|
1126
|
-
return
|
|
1119
|
+
}, Bo = 16, zo = 4;
|
|
1120
|
+
function Yo(e) {
|
|
1121
|
+
return ko[e] || `\\u${`0000${e.charCodeAt(0).toString(Bo)}`.slice(-zo)}`;
|
|
1127
1122
|
}
|
|
1128
|
-
|
|
1129
|
-
function
|
|
1130
|
-
return
|
|
1123
|
+
i(Yo, "escape");
|
|
1124
|
+
function xe(e, t) {
|
|
1125
|
+
return Sn.test(e) && (e = e.replace(Sn, Yo)), t.stylize(`'${B(e, t.truncate - 2)}'`, "string");
|
|
1131
1126
|
}
|
|
1132
|
-
|
|
1127
|
+
i(xe, "inspectString");
|
|
1133
1128
|
|
|
1134
1129
|
// ../node_modules/loupe/lib/symbol.js
|
|
1135
|
-
function
|
|
1130
|
+
function De(e) {
|
|
1136
1131
|
return "description" in Symbol.prototype ? e.description ? `Symbol(${e.description})` : "Symbol()" : e.toString();
|
|
1137
1132
|
}
|
|
1138
|
-
|
|
1133
|
+
i(De, "inspectSymbol");
|
|
1139
1134
|
|
|
1140
1135
|
// ../node_modules/loupe/lib/promise.js
|
|
1141
|
-
var
|
|
1136
|
+
var En = /* @__PURE__ */ i(() => "Promise{\u2026}", "getPromiseValue");
|
|
1142
1137
|
try {
|
|
1143
1138
|
let { getPromiseDetails: e, kPending: t, kRejected: n } = process.binding("util");
|
|
1144
|
-
Array.isArray(e(Promise.resolve())) && (
|
|
1145
|
-
let [
|
|
1146
|
-
return
|
|
1139
|
+
Array.isArray(e(Promise.resolve())) && (En = /* @__PURE__ */ i((r, o) => {
|
|
1140
|
+
let [s, c] = e(r);
|
|
1141
|
+
return s === t ? "Promise{<pending>}" : `Promise${s === n ? "!" : ""}{${o.inspect(c, o)}}`;
|
|
1147
1142
|
}, "getPromiseValue"));
|
|
1148
1143
|
} catch {
|
|
1149
1144
|
}
|
|
1150
|
-
var
|
|
1145
|
+
var _n = En;
|
|
1151
1146
|
|
|
1152
1147
|
// ../node_modules/loupe/lib/object.js
|
|
1153
|
-
function
|
|
1148
|
+
function me(e, t) {
|
|
1154
1149
|
let n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e) : [];
|
|
1155
1150
|
if (n.length === 0 && r.length === 0)
|
|
1156
1151
|
return "{}";
|
|
1157
1152
|
if (t.truncate -= 4, t.seen = t.seen || [], t.seen.includes(e))
|
|
1158
1153
|
return "[Circular]";
|
|
1159
1154
|
t.seen.push(e);
|
|
1160
|
-
let o = D(n.map((
|
|
1155
|
+
let o = D(n.map((a) => [a, e[a]]), t, ce), s = D(r.map((a) => [a, e[a]]), t, ce);
|
|
1161
1156
|
t.seen.pop();
|
|
1162
1157
|
let c = "";
|
|
1163
|
-
return o &&
|
|
1158
|
+
return o && s && (c = ", "), `{ ${o}${c}${s} }`;
|
|
1164
1159
|
}
|
|
1165
|
-
|
|
1160
|
+
i(me, "inspectObject");
|
|
1166
1161
|
|
|
1167
1162
|
// ../node_modules/loupe/lib/class.js
|
|
1168
1163
|
var ft = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1;
|
|
1169
1164
|
function mt(e, t) {
|
|
1170
1165
|
let n = "";
|
|
1171
1166
|
return ft && ft in e && (n = e[ft]), n = n || e.constructor.name, (!n || n === "_class") && (n = "<Anonymous Class>"), t.truncate -= n.length,
|
|
1172
|
-
`${n}${
|
|
1167
|
+
`${n}${me(e, t)}`;
|
|
1173
1168
|
}
|
|
1174
|
-
|
|
1169
|
+
i(mt, "inspectClass");
|
|
1175
1170
|
|
|
1176
1171
|
// ../node_modules/loupe/lib/arguments.js
|
|
1177
1172
|
function pt(e, t) {
|
|
1178
1173
|
return e.length === 0 ? "Arguments[]" : (t.truncate -= 13, `Arguments[ ${D(e, t)} ]`);
|
|
1179
1174
|
}
|
|
1180
|
-
|
|
1175
|
+
i(pt, "inspectArguments");
|
|
1181
1176
|
|
|
1182
1177
|
// ../node_modules/loupe/lib/error.js
|
|
1183
|
-
var
|
|
1178
|
+
var Uo = [
|
|
1184
1179
|
"stack",
|
|
1185
1180
|
"line",
|
|
1186
1181
|
"column",
|
|
@@ -1194,72 +1189,77 @@ var Vo = [
|
|
|
1194
1189
|
"cause"
|
|
1195
1190
|
];
|
|
1196
1191
|
function gt(e, t) {
|
|
1197
|
-
let n = Object.getOwnPropertyNames(e).filter((c) =>
|
|
1192
|
+
let n = Object.getOwnPropertyNames(e).filter((c) => Uo.indexOf(c) === -1), r = e.name;
|
|
1198
1193
|
t.truncate -= r.length;
|
|
1199
1194
|
let o = "";
|
|
1200
1195
|
if (typeof e.message == "string" ? o = B(e.message, t.truncate) : n.unshift("message"), o = o ? `: ${o}` : "", t.truncate -= o.length + 5,
|
|
1201
1196
|
t.seen = t.seen || [], t.seen.includes(e))
|
|
1202
1197
|
return "[Circular]";
|
|
1203
1198
|
t.seen.push(e);
|
|
1204
|
-
let
|
|
1205
|
-
return `${r}${o}${
|
|
1199
|
+
let s = D(n.map((c) => [c, e[c]]), t, ce);
|
|
1200
|
+
return `${r}${o}${s ? ` { ${s} }` : ""}`;
|
|
1206
1201
|
}
|
|
1207
|
-
|
|
1202
|
+
i(gt, "inspectObject");
|
|
1208
1203
|
|
|
1209
1204
|
// ../node_modules/loupe/lib/html.js
|
|
1210
|
-
function
|
|
1205
|
+
function Wo([e, t], n) {
|
|
1211
1206
|
return n.truncate -= 3, t ? `${n.stylize(String(e), "yellow")}=${n.stylize(`"${t}"`, "string")}` : `${n.stylize(String(e), "yellow")}`;
|
|
1212
1207
|
}
|
|
1213
|
-
|
|
1214
|
-
function
|
|
1215
|
-
return D(e, t,
|
|
1208
|
+
i(Wo, "inspectAttribute");
|
|
1209
|
+
function Fe(e, t) {
|
|
1210
|
+
return D(e, t, Vo, `
|
|
1216
1211
|
`);
|
|
1217
1212
|
}
|
|
1218
|
-
|
|
1219
|
-
function
|
|
1220
|
-
|
|
1213
|
+
i(Fe, "inspectNodeCollection");
|
|
1214
|
+
function Vo(e, t) {
|
|
1215
|
+
switch (e.nodeType) {
|
|
1216
|
+
case 1:
|
|
1217
|
+
return je(e, t);
|
|
1218
|
+
case 3:
|
|
1219
|
+
return t.inspect(e.data, t);
|
|
1220
|
+
default:
|
|
1221
|
+
return t.inspect(e, t);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
i(Vo, "inspectNode");
|
|
1225
|
+
function je(e, t) {
|
|
1226
|
+
let n = e.getAttributeNames(), r = e.tagName.toLowerCase(), o = t.stylize(`<${r}`, "special"), s = t.stylize(">", "special"), c = t.stylize(
|
|
1221
1227
|
`</${r}>`, "special");
|
|
1222
1228
|
t.truncate -= r.length * 2 + 5;
|
|
1223
|
-
let
|
|
1224
|
-
n.length > 0 && (
|
|
1225
|
-
let u = t.truncate, m =
|
|
1226
|
-
return m && m.length > u && (m = `${
|
|
1229
|
+
let a = "";
|
|
1230
|
+
n.length > 0 && (a += " ", a += D(n.map((p) => [p, e.getAttribute(p)]), t, Wo, " ")), t.truncate -= a.length;
|
|
1231
|
+
let u = t.truncate, m = Fe(e.children, t);
|
|
1232
|
+
return m && m.length > u && (m = `${ie}(${e.children.length})`), `${o}${a}${s}${m}${c}`;
|
|
1227
1233
|
}
|
|
1228
|
-
|
|
1234
|
+
i(je, "inspectHTML");
|
|
1229
1235
|
|
|
1230
1236
|
// ../node_modules/loupe/lib/index.js
|
|
1231
|
-
var
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
BigInt: xe,
|
|
1247
|
-
string: De,
|
|
1248
|
-
String: De,
|
|
1249
|
-
function: Me,
|
|
1250
|
-
Function: Me,
|
|
1251
|
-
symbol: Fe,
|
|
1237
|
+
var qo = typeof Symbol == "function" && typeof Symbol.for == "function", ht = qo ? Symbol.for("chai/inspect") : "@@chai/inspect", dt = Symbol.
|
|
1238
|
+
for("nodejs.util.inspect.custom"), Tn = /* @__PURE__ */ new WeakMap(), Cn = {}, On = {
|
|
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
|
+
number: Me,
|
|
1244
|
+
Number: Me,
|
|
1245
|
+
bigint: Le,
|
|
1246
|
+
BigInt: Le,
|
|
1247
|
+
string: xe,
|
|
1248
|
+
String: xe,
|
|
1249
|
+
function: Ie,
|
|
1250
|
+
Function: Ie,
|
|
1251
|
+
symbol: De,
|
|
1252
1252
|
// A Symbol polyfill will return `Symbol` not `symbol` from typedetect
|
|
1253
|
-
Symbol:
|
|
1254
|
-
Array:
|
|
1253
|
+
Symbol: De,
|
|
1254
|
+
Array: it,
|
|
1255
1255
|
Date: ct,
|
|
1256
1256
|
Map: ut,
|
|
1257
|
-
Set:
|
|
1258
|
-
RegExp:
|
|
1259
|
-
Promise:
|
|
1257
|
+
Set: lt,
|
|
1258
|
+
RegExp: at,
|
|
1259
|
+
Promise: _n,
|
|
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
|
-
HTMLCollection:
|
|
1278
|
-
NodeList:
|
|
1279
|
-
},
|
|
1280
|
-
t
|
|
1281
|
-
e
|
|
1282
|
-
function
|
|
1283
|
-
let n =
|
|
1284
|
-
if (o === "object" && (o =
|
|
1277
|
+
HTMLCollection: Fe,
|
|
1278
|
+
NodeList: Fe
|
|
1279
|
+
}, Ko = /* @__PURE__ */ i((e, t, n) => ht in e && typeof e[ht] == "function" ? e[ht](t) : dt in e && typeof e[dt] == "function" ? e[dt](t.depth,
|
|
1280
|
+
t) : "inspect" in e && typeof e.inspect == "function" ? e.inspect(t.depth, t) : "constructor" in e && Tn.has(e.constructor) ? Tn.get(e.constructor)(
|
|
1281
|
+
e, t) : Cn[n] ? Cn[n](e, t) : "", "inspectCustom"), Go = Object.prototype.toString;
|
|
1282
|
+
function ke(e, t = {}) {
|
|
1283
|
+
let n = bn(t, ke), { 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
|
-
return typeof c == "string" ? c :
|
|
1289
|
+
return typeof c == "string" ? c : ke(c, n);
|
|
1290
1290
|
}
|
|
1291
|
-
let
|
|
1292
|
-
return
|
|
1293
|
-
onstructor" in e ? e.constructor !== Object ? mt(e, n) :
|
|
1291
|
+
let s = e ? Object.getPrototypeOf(e) : !1;
|
|
1292
|
+
return s === Object.prototype || s === null ? me(e, n) : e && typeof HTMLElement == "function" && e instanceof HTMLElement ? je(e, n) : "c\
|
|
1293
|
+
onstructor" in e ? e.constructor !== Object ? mt(e, n) : me(e, n) : e === Object(e) ? me(e, n) : n.stylize(String(e), o);
|
|
1294
1294
|
}
|
|
1295
|
-
|
|
1295
|
+
i(ke, "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 } = _e, $n = [
|
|
1299
|
+
es,
|
|
1303
1300
|
vo,
|
|
1304
|
-
|
|
1301
|
+
Zo,
|
|
1302
|
+
Xo,
|
|
1303
|
+
Qo,
|
|
1304
|
+
Jo
|
|
1305
1305
|
];
|
|
1306
|
-
function
|
|
1307
|
-
let o = n ?? 1e4,
|
|
1306
|
+
function pe(e, t = 10, { maxLength: n, ...r } = {}) {
|
|
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,33 +1321,33 @@ function me(e, t = 10, { maxLength: n, ...r } = {}) {
|
|
|
1321
1321
|
...r
|
|
1322
1322
|
});
|
|
1323
1323
|
}
|
|
1324
|
-
return
|
|
1324
|
+
return s.length >= o && t > 1 ? pe(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(pe, "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(Te(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 !==
|
|
1350
|
-
null ? typeof c.toString == "function" && c.toString !== Object.prototype.toString ? c.toString() :
|
|
1350
|
+
null ? typeof c.toString == "function" && c.toString !== Object.prototype.toString ? c.toString() : Te(c, {
|
|
1351
1351
|
depth: 0,
|
|
1352
1352
|
colors: !1
|
|
1353
1353
|
}) : String(c);
|
|
@@ -1363,66 +1363,66 @@ function wn(...e) {
|
|
|
1363
1363
|
case "%f":
|
|
1364
1364
|
return Number.parseFloat(String(e[n++])).toString();
|
|
1365
1365
|
case "%o":
|
|
1366
|
-
return
|
|
1366
|
+
return Te(e[n++], {
|
|
1367
1367
|
showHidden: !0,
|
|
1368
1368
|
showProxy: !0
|
|
1369
1369
|
});
|
|
1370
1370
|
case "%O":
|
|
1371
|
-
return
|
|
1371
|
+
return Te(e[n++]);
|
|
1372
1372
|
case "%c":
|
|
1373
1373
|
return n++, "";
|
|
1374
1374
|
case "%j":
|
|
1375
1375
|
try {
|
|
1376
1376
|
return JSON.stringify(e[n++]);
|
|
1377
1377
|
} catch (c) {
|
|
1378
|
-
let
|
|
1379
|
-
if (
|
|
1378
|
+
let a = c.message;
|
|
1379
|
+
if (a.includes("circular structure") || a.includes("cyclic structures") || a.includes("cyclic object"))
|
|
1380
1380
|
return "[Circular]";
|
|
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 += ` ${Te(s)}`;
|
|
1389
1389
|
return o;
|
|
1390
1390
|
}
|
|
1391
|
-
|
|
1392
|
-
function
|
|
1393
|
-
return t.truncate === 0 && (t.truncate = Number.POSITIVE_INFINITY),
|
|
1391
|
+
i(wn, "format");
|
|
1392
|
+
function Te(e, t = {}) {
|
|
1393
|
+
return t.truncate === 0 && (t.truncate = Number.POSITIVE_INFINITY), ke(e, t);
|
|
1394
1394
|
}
|
|
1395
|
-
|
|
1396
|
-
function
|
|
1395
|
+
i(Te, "inspect");
|
|
1396
|
+
function Rn(e) {
|
|
1397
1397
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1398
1398
|
}
|
|
1399
|
-
|
|
1399
|
+
i(Rn, "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
|
-
|
|
1406
|
-
function
|
|
1405
|
+
i(ns, "isFinalObj");
|
|
1406
|
+
function Be(e) {
|
|
1407
1407
|
return Object.prototype.toString.apply(e).slice(8, -1);
|
|
1408
1408
|
}
|
|
1409
|
-
|
|
1410
|
-
function
|
|
1409
|
+
i(Be, "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 bt(e) {
|
|
1416
1416
|
let t = /* @__PURE__ */ new Set();
|
|
1417
|
-
return
|
|
1417
|
+
return ns(e) ? [] : (rs(e, t), Array.from(t));
|
|
1418
1418
|
}
|
|
1419
|
-
|
|
1420
|
-
var
|
|
1421
|
-
function
|
|
1419
|
+
i(bt, "getOwnProperties");
|
|
1420
|
+
var An = { forceWritable: !1 };
|
|
1421
|
+
function St(e, t = An) {
|
|
1422
1422
|
return yt(e, /* @__PURE__ */ new WeakMap(), t);
|
|
1423
1423
|
}
|
|
1424
|
-
|
|
1425
|
-
function yt(e, t, n =
|
|
1424
|
+
i(St, "deepClone");
|
|
1425
|
+
function yt(e, t, n = An) {
|
|
1426
1426
|
let r, o;
|
|
1427
1427
|
if (t.has(e))
|
|
1428
1428
|
return t.get(e);
|
|
@@ -1433,24 +1433,24 @@ function yt(e, t, n = Rn) {
|
|
|
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
|
|
1438
|
-
let
|
|
1439
|
-
if (!
|
|
1436
|
+
let s = bt(e);
|
|
1437
|
+
for (let c of s) {
|
|
1438
|
+
let a = Object.getOwnPropertyDescriptor(e, c);
|
|
1439
|
+
if (!a)
|
|
1440
1440
|
continue;
|
|
1441
1441
|
let u = yt(e[c], t, n);
|
|
1442
1442
|
n.forceWritable ? Object.defineProperty(o, c, {
|
|
1443
|
-
enumerable:
|
|
1443
|
+
enumerable: a.enumerable,
|
|
1444
1444
|
configurable: !0,
|
|
1445
1445
|
writable: !0,
|
|
1446
1446
|
value: u
|
|
1447
|
-
}) : "get" in
|
|
1448
|
-
...
|
|
1447
|
+
}) : "get" in a ? Object.defineProperty(o, c, {
|
|
1448
|
+
...a,
|
|
1449
1449
|
get() {
|
|
1450
1450
|
return u;
|
|
1451
1451
|
}
|
|
1452
1452
|
}) : Object.defineProperty(o, c, {
|
|
1453
|
-
...
|
|
1453
|
+
...a,
|
|
1454
1454
|
value: u
|
|
1455
1455
|
});
|
|
1456
1456
|
}
|
|
@@ -1458,7 +1458,7 @@ function yt(e, t, n = Rn) {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
return e;
|
|
1460
1460
|
}
|
|
1461
|
-
|
|
1461
|
+
i(yt, "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,265 +1497,265 @@ 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
|
-
let
|
|
1502
|
+
let a = e.substring(o - c), u = t.indexOf(a);
|
|
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,
|
|
1514
|
-
0 ? n[r - 1] : -1, c = 0,
|
|
1515
|
-
for (t && qn(e),
|
|
1516
|
-
if (e[
|
|
1517
|
-
let p = e[
|
|
1518
|
-
|
|
1519
|
-
|
|
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, a = 0, u = 0, m = 0;
|
|
1511
|
+
for (; s < e.length; )
|
|
1512
|
+
e[s][0] === M ? (n[r++] = s, c = u, a = 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, a) && 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, a = 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], l = e[s][1], b = Pn(p, l), g = Pn(l, p);
|
|
1518
|
+
b >= g ? (b >= p.length / 2 || b >= l.length / 2) && (e.splice(s, 0, new P(M, l.substring(0, b))), e[s - 1][1] = p.substring(0, p.length -
|
|
1519
|
+
b), e[s + 1][1] = l.substring(b), s++) : (g >= p.length / 2 || g >= l.length / 2) && (e.splice(s, 0, new P(M, p.substring(0, g))), e[s -
|
|
1520
|
+
1][0] = j, e[s - 1][1] = l.substring(0, l.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
|
-
let c = n,
|
|
1536
|
+
let c = n, a = r, u = o, m = ze(n, r) + ze(r, o);
|
|
1537
1537
|
for (; r.charAt(0) === o.charAt(0); ) {
|
|
1538
1538
|
n += r.charAt(0), r = r.substring(1) + o.charAt(0), o = o.substring(1);
|
|
1539
|
-
let p =
|
|
1540
|
-
p >= m && (m = p, c = n,
|
|
1539
|
+
let p = ze(n, r) + ze(r, o);
|
|
1540
|
+
p >= m && (m = p, c = n, a = r, u = o);
|
|
1541
1541
|
}
|
|
1542
|
-
e[t - 1][1] !== c && (c ? e[t - 1][1] = c : (e.splice(t - 1, 1), t--), e[t][1] =
|
|
1542
|
+
e[t - 1][1] !== c && (c ? e[t - 1][1] = c : (e.splice(t - 1, 1), t--), e[t][1] = a, u ? e[t + 1][1] = u : (e.splice(t + 1, 1), t--));
|
|
1543
1543
|
}
|
|
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();
|
|
1568
|
-
let
|
|
1568
|
+
let a = !1;
|
|
1569
1569
|
for (t = 1; t < e.length - 1; )
|
|
1570
1570
|
e[t - 1][0] === M && e[t + 1][0] === M && (e[t][1].substring(e[t][1].length - e[t - 1][1].length) === e[t - 1][1] ? (e[t][1] = e[t - 1][1] +
|
|
1571
|
-
e[t][1].substring(0, e[t][1].length - e[t - 1][1].length), e[t + 1][1] = e[t - 1][1] + e[t + 1][1], e.splice(t - 1, 1),
|
|
1571
|
+
e[t][1].substring(0, e[t][1].length - e[t - 1][1].length), e[t + 1][1] = e[t - 1][1] + e[t + 1][1], e.splice(t - 1, 1), a = !0) : e[t][1].
|
|
1572
1572
|
substring(0, e[t + 1][1].length) === e[t + 1][1] && (e[t - 1][1] += e[t + 1][1], e[t][1] = e[t][1].substring(e[t + 1][1].length) + e[t +
|
|
1573
|
-
1][1], e.splice(t + 1, 1),
|
|
1574
|
-
|
|
1573
|
+
1][1], e.splice(t + 1, 1), a = !0)), t++;
|
|
1574
|
+
a && qn(e);
|
|
1575
1575
|
}
|
|
1576
|
-
|
|
1577
|
-
function
|
|
1576
|
+
i(qn, "diff_cleanupMerge");
|
|
1577
|
+
function ze(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 =
|
|
1582
|
-
return p ||
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
var Kn = "Compared values have no visual difference.",
|
|
1586
|
-
ture without calling `toJSON` instead.",
|
|
1587
|
-
function
|
|
1588
|
-
if (Ln) return
|
|
1589
|
-
Ln = 1, Object.defineProperty(
|
|
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), a = s && r.match(In), u = c && n.
|
|
1581
|
+
match(Mn), m = a && r.match(Mn), p = u && e.match(is), l = m && t.match(cs);
|
|
1582
|
+
return p || l ? 5 : u || m ? 4 : o && !c && a ? 3 : c || a ? 2 : o || s ? 1 : 0;
|
|
1583
|
+
}
|
|
1584
|
+
i(ze, "diff_cleanupSemanticScore_");
|
|
1585
|
+
var Kn = "Compared values have no visual difference.", as = "Compared values serialize to the same structure.\nPrinting internal object struc\
|
|
1586
|
+
ture without calling `toJSON` instead.", Ye = {}, Ln;
|
|
1587
|
+
function ls() {
|
|
1588
|
+
if (Ln) return Ye;
|
|
1589
|
+
Ln = 1, Object.defineProperty(Ye, "__esModule", {
|
|
1590
1590
|
value: !0
|
|
1591
|
-
}),
|
|
1592
|
-
let e = "diff-sequences", t = 0, n = /* @__PURE__ */
|
|
1591
|
+
}), Ye.default = b;
|
|
1592
|
+
let e = "diff-sequences", t = 0, n = /* @__PURE__ */ i((g, h, f, d, S) => {
|
|
1593
1593
|
let _ = 0;
|
|
1594
|
-
for (; g < h && f <
|
|
1594
|
+
for (; g < h && f < d && S(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, S) => {
|
|
1598
1598
|
let _ = 0;
|
|
1599
|
-
for (; g <= h && f <=
|
|
1600
|
-
h -= 1,
|
|
1599
|
+
for (; g <= h && f <= d && S(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, S, _, 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
|
+
S
|
|
1610
1610
|
);
|
|
1611
|
-
let
|
|
1612
|
-
for (
|
|
1613
|
-
if (
|
|
1614
|
-
$ = _[
|
|
1611
|
+
let R = g < O ? g : O;
|
|
1612
|
+
for (y += 1, E += 2; y <= R; 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, S);
|
|
1618
1618
|
}
|
|
1619
1619
|
return O;
|
|
1620
|
-
}, "extendPathsF"),
|
|
1621
|
-
let
|
|
1622
|
-
_[
|
|
1620
|
+
}, "extendPathsF"), s = /* @__PURE__ */ i((g, h, f, d, S, _, O) => {
|
|
1621
|
+
let y = 0, E = g, $ = _[y], T = $;
|
|
1622
|
+
_[y] -= r(
|
|
1623
1623
|
h,
|
|
1624
1624
|
$ - 1,
|
|
1625
1625
|
f,
|
|
1626
|
-
|
|
1627
|
-
|
|
1626
|
+
d + $ - E - 1,
|
|
1627
|
+
S
|
|
1628
1628
|
);
|
|
1629
|
-
let
|
|
1630
|
-
for (
|
|
1631
|
-
if (
|
|
1632
|
-
$ = _[
|
|
1629
|
+
let R = g < O ? g : O;
|
|
1630
|
+
for (y += 1, E -= 2; y <= R; 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
|
-
|
|
1640
|
-
|
|
1639
|
+
d + $ - E - 1,
|
|
1640
|
+
S
|
|
1641
1641
|
);
|
|
1642
1642
|
}
|
|
1643
1643
|
return O;
|
|
1644
|
-
}, "extendPathsR"), c = /* @__PURE__ */
|
|
1645
|
-
let
|
|
1646
|
-
for (let L = 0, x = -g; L <=
|
|
1647
|
-
let
|
|
1648
|
-
|
|
1644
|
+
}, "extendPathsR"), c = /* @__PURE__ */ i((g, h, f, d, S, _, O, y, E, $, T) => {
|
|
1645
|
+
let R = d - h, K = f - h, I = S - 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 = R + W - x, V = n(
|
|
1648
|
+
W + 1,
|
|
1649
1649
|
f,
|
|
1650
1650
|
re + 1,
|
|
1651
|
-
|
|
1651
|
+
S,
|
|
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 = R + 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 +
|
|
1665
|
-
|
|
1666
|
-
aCommonFollowing =
|
|
1667
|
-
let
|
|
1668
|
-
return T.nChangeFollowing = g - 1, g - 1 === f +
|
|
1669
|
-
|
|
1663
|
+
), oe = F - U, he = J - U, ue = oe + 1, be = he + 1;
|
|
1664
|
+
T.nChangePreceding = g - 1, g - 1 === ue + be - h - d ? (T.aEndPreceding = h, T.bEndPreceding = d) : (T.aEndPreceding = ue, T.bEndPreceding =
|
|
1665
|
+
be), T.nCommonPreceding = U, U !== 0 && (T.aCommonPreceding = ue, T.bCommonPreceding = be), T.nCommonFollowing = V, V !== 0 && (T.
|
|
1666
|
+
aCommonFollowing = W + 1, T.bCommonFollowing = re + 1);
|
|
1667
|
+
let Ce = q + 1, Oe = re + V + 1;
|
|
1668
|
+
return T.nChangeFollowing = g - 1, g - 1 === f + S - Ce - Oe ? (T.aStartFollowing = f, T.bStartFollowing = S) : (T.aStartFollowing =
|
|
1669
|
+
Ce, T.bStartFollowing = Oe), !0;
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
1673
1673
|
return !1;
|
|
1674
|
-
}, "extendOverlappablePathsF"),
|
|
1675
|
-
let
|
|
1676
|
-
for (let L = 0, x = g; L <=
|
|
1677
|
-
let
|
|
1674
|
+
}, "extendOverlappablePathsF"), a = /* @__PURE__ */ i((g, h, f, d, S, _, O, y, E, $, T) => {
|
|
1675
|
+
let R = S - f, K = f - h, I = S - 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 = R + 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
|
-
|
|
1690
|
-
T.nCommonFollowing = 0, T.aStartFollowing = f, T.bStartFollowing =
|
|
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
|
+
T.nCommonFollowing = 0, T.aStartFollowing = f, T.bStartFollowing = S;
|
|
1691
1691
|
else {
|
|
1692
|
-
let
|
|
1692
|
+
let U = R + F - (H ? x - 1 : x + 1), oe = n(
|
|
1693
1693
|
F,
|
|
1694
1694
|
f,
|
|
1695
|
-
|
|
1696
|
-
|
|
1695
|
+
U,
|
|
1696
|
+
S,
|
|
1697
1697
|
_
|
|
1698
1698
|
);
|
|
1699
|
-
T.nCommonFollowing = oe, oe !== 0 && (T.aCommonFollowing = F, T.bCommonFollowing =
|
|
1700
|
-
let
|
|
1701
|
-
g - 1 === f +
|
|
1699
|
+
T.nCommonFollowing = oe, oe !== 0 && (T.aCommonFollowing = F, T.bCommonFollowing = U);
|
|
1700
|
+
let he = F + oe, ue = U + oe;
|
|
1701
|
+
g - 1 === f + S - he - ue ? (T.aStartFollowing = f, T.bStartFollowing = S) : (T.aStartFollowing = he, T.bStartFollowing = ue);
|
|
1702
1702
|
}
|
|
1703
1703
|
return !0;
|
|
1704
1704
|
}
|
|
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, S, _, O, y, E) => {
|
|
1709
|
+
let $ = d - h, T = S - f, R = f - h, K = S - d, Q = K - R, I = R, k = R;
|
|
1710
|
+
if (O[0] = h - 1, y[0] = f, Q % 2 === 0) {
|
|
1711
|
+
let G = (g || Q) / 2, Y = (R + K) / 2;
|
|
1712
|
+
for (let N = 1; N <= Y; N += 1)
|
|
1713
|
+
if (I = o(N, f, S, $, _, 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
|
-
|
|
1719
|
-
|
|
1718
|
+
a(
|
|
1719
|
+
N,
|
|
1720
1720
|
h,
|
|
1721
1721
|
f,
|
|
1722
|
-
|
|
1723
|
-
|
|
1722
|
+
d,
|
|
1723
|
+
S,
|
|
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 = (R + K + 1) / 2, N = 1;
|
|
1735
|
+
for (I = o(N, f, S, $, _, 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, S, $, _, 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
|
-
|
|
1754
|
-
|
|
1753
|
+
d,
|
|
1754
|
+
S,
|
|
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=${S}`
|
|
1767
1767
|
);
|
|
1768
|
-
}, "divide"), m = /* @__PURE__ */
|
|
1769
|
-
if (
|
|
1768
|
+
}, "divide"), m = /* @__PURE__ */ i((g, h, f, d, S, _, O, y, E, $) => {
|
|
1769
|
+
if (S - 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 = S, d = re, S = V;
|
|
1781
1781
|
}
|
|
1782
|
-
let { foundSubsequence: T, isCommon:
|
|
1782
|
+
let { foundSubsequence: T, isCommon: R } = O[_ ? 1 : 0];
|
|
1783
1783
|
u(
|
|
1784
1784
|
g,
|
|
1785
1785
|
h,
|
|
1786
1786
|
f,
|
|
1787
|
-
y,
|
|
1788
|
-
b,
|
|
1789
|
-
A,
|
|
1790
1787
|
d,
|
|
1788
|
+
S,
|
|
1789
|
+
R,
|
|
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 < S && m(
|
|
1820
|
+
H,
|
|
1821
1821
|
F,
|
|
1822
1822
|
f,
|
|
1823
|
-
|
|
1824
|
-
|
|
1823
|
+
W,
|
|
1824
|
+
S,
|
|
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"),
|
|
1838
|
+
}, "validateLength"), l = /* @__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
|
|
1844
|
-
p("aLength", g), p("bLength", h),
|
|
1845
|
-
let
|
|
1846
|
-
if (
|
|
1847
|
-
let _ =
|
|
1843
|
+
function b(g, h, f, d) {
|
|
1844
|
+
p("aLength", g), p("bLength", h), l("isCommon", f), l("foundSubsequence", d);
|
|
1845
|
+
let S = n(0, g, 0, h, f);
|
|
1846
|
+
if (S !== 0 && d(S, 0, 0), g !== S || h !== S) {
|
|
1847
|
+
let _ = S, O = S, 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 = S + 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,124 +1880,124 @@ 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(b, "diffSequence"), Ye;
|
|
1887
1887
|
}
|
|
1888
|
-
|
|
1889
|
-
var
|
|
1890
|
-
function
|
|
1888
|
+
i(ls, "requireBuild");
|
|
1889
|
+
var fs = ls(), Gn = /* @__PURE__ */ Rn(fs);
|
|
1890
|
+
function ms(e, t) {
|
|
1891
1891
|
return e.replace(/\s+$/, (n) => t(n));
|
|
1892
1892
|
}
|
|
1893
|
-
|
|
1894
|
-
function
|
|
1895
|
-
return e.length !== 0 ? n(`${r} ${
|
|
1893
|
+
i(ms, "formatTrailingSpaces");
|
|
1894
|
+
function wt(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
|
|
1897
|
+
i(wt, "printDiffLine");
|
|
1898
|
+
function Hn(e, t, { aColor: n, aIndicator: r, changeLineTrailingSpaceColor: o, emptyFirstOrLastLinePlaceholder: s }) {
|
|
1899
|
+
return wt(e, t, n, r, o, s);
|
|
1900
1900
|
}
|
|
1901
|
-
|
|
1902
|
-
function Jn(e, t, { bColor: n, bIndicator: r, changeLineTrailingSpaceColor: o, emptyFirstOrLastLinePlaceholder:
|
|
1903
|
-
return
|
|
1901
|
+
i(Hn, "printDeleteLine");
|
|
1902
|
+
function Jn(e, t, { bColor: n, bIndicator: r, changeLineTrailingSpaceColor: o, emptyFirstOrLastLinePlaceholder: s }) {
|
|
1903
|
+
return wt(e, t, n, r, o, s);
|
|
1904
1904
|
}
|
|
1905
|
-
|
|
1906
|
-
function Xn(e, t, { commonColor: n, commonIndicator: r, commonLineTrailingSpaceColor: o, emptyFirstOrLastLinePlaceholder:
|
|
1907
|
-
return
|
|
1905
|
+
i(Jn, "printInsertLine");
|
|
1906
|
+
function Xn(e, t, { commonColor: n, commonIndicator: r, commonLineTrailingSpaceColor: o, emptyFirstOrLastLinePlaceholder: s }) {
|
|
1907
|
+
return wt(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, a = 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, a += 1);
|
|
1929
1929
|
}
|
|
1930
1930
|
for (; u !== n && e[u][0] !== M; )
|
|
1931
1931
|
u += 1;
|
|
1932
1932
|
}
|
|
1933
|
-
let m =
|
|
1934
|
-
|
|
1935
|
-
let p =
|
|
1936
|
-
m &&
|
|
1937
|
-
let g = 0, h = 0, f = 0,
|
|
1938
|
-
let E =
|
|
1939
|
-
|
|
1940
|
-
}, "pushCommonLine"), _ = /* @__PURE__ */
|
|
1941
|
-
let E =
|
|
1942
|
-
|
|
1943
|
-
}, "pushDeleteLine"), O = /* @__PURE__ */
|
|
1944
|
-
let E =
|
|
1945
|
-
|
|
1933
|
+
let m = a !== 0 || c;
|
|
1934
|
+
a !== 0 ? s += a + 1 : c && (s += 1);
|
|
1935
|
+
let p = s - 1, l = [], b = 0;
|
|
1936
|
+
m && l.push("");
|
|
1937
|
+
let g = 0, h = 0, f = 0, d = 0, S = /* @__PURE__ */ i((y) => {
|
|
1938
|
+
let E = l.length;
|
|
1939
|
+
l.push(Xn(y, E === 0 || E === p, t)), f += 1, d += 1;
|
|
1940
|
+
}, "pushCommonLine"), _ = /* @__PURE__ */ i((y) => {
|
|
1941
|
+
let E = l.length;
|
|
1942
|
+
l.push(Hn(y, E === 0 || E === p, t)), f += 1;
|
|
1943
|
+
}, "pushDeleteLine"), O = /* @__PURE__ */ i((y) => {
|
|
1944
|
+
let E = l.length;
|
|
1945
|
+
l.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 =
|
|
1955
|
-
|
|
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
|
+
S(e[E][1]);
|
|
1956
1956
|
} else if (u === n) {
|
|
1957
|
-
let E = u -
|
|
1958
|
-
for (let $ =
|
|
1959
|
-
|
|
1957
|
+
let E = u - y > r ? y + r : u;
|
|
1958
|
+
for (let $ = y; $ !== E; $ += 1)
|
|
1959
|
+
S(e[$][1]);
|
|
1960
1960
|
} else {
|
|
1961
|
-
let E = u -
|
|
1961
|
+
let E = u - y;
|
|
1962
1962
|
if (E > o) {
|
|
1963
|
-
let $ =
|
|
1964
|
-
for (let
|
|
1965
|
-
|
|
1966
|
-
|
|
1963
|
+
let $ = y + r;
|
|
1964
|
+
for (let R = y; R !== $; R += 1)
|
|
1965
|
+
S(e[R][1]);
|
|
1966
|
+
l[b] = xn(g, f, h, d, t), b = l.length, l.push("");
|
|
1967
1967
|
let T = E - o;
|
|
1968
|
-
g = f + T, h =
|
|
1969
|
-
for (let
|
|
1970
|
-
|
|
1968
|
+
g = f + T, h = d + T, f = g, d = h;
|
|
1969
|
+
for (let R = u - r; R !== u; R += 1)
|
|
1970
|
+
S(e[R][1]);
|
|
1971
1971
|
} else
|
|
1972
|
-
for (let $ =
|
|
1973
|
-
|
|
1972
|
+
for (let $ = y; $ !== u; $ += 1)
|
|
1973
|
+
S(e[$][1]);
|
|
1974
1974
|
}
|
|
1975
1975
|
for (; u !== n && e[u][0] === z; )
|
|
1976
1976
|
_(e[u][1]), u += 1;
|
|
1977
1977
|
for (; u !== n && e[u][0] === j; )
|
|
1978
1978
|
O(e[u][1]), u += 1;
|
|
1979
1979
|
}
|
|
1980
|
-
return m && (
|
|
1980
|
+
return m && (l[b] = xn(g, f, h, d, t)), l.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
|
|
2000
|
-
function
|
|
1998
|
+
i(gs, "joinAlignedDiffsExpand");
|
|
1999
|
+
var Et = /* @__PURE__ */ i((e) => e, "noColor"), Zn = 5, hs = 0;
|
|
2000
|
+
function ds() {
|
|
2001
2001
|
return {
|
|
2002
2002
|
aAnnotation: "Expected",
|
|
2003
2003
|
aColor: v.green,
|
|
@@ -2006,10 +2006,10 @@ function di() {
|
|
|
2006
2006
|
bColor: v.red,
|
|
2007
2007
|
bIndicator: "+",
|
|
2008
2008
|
changeColor: v.inverse,
|
|
2009
|
-
changeLineTrailingSpaceColor:
|
|
2009
|
+
changeLineTrailingSpaceColor: Et,
|
|
2010
2010
|
commonColor: v.dim,
|
|
2011
2011
|
commonIndicator: " ",
|
|
2012
|
-
commonLineTrailingSpaceColor:
|
|
2012
|
+
commonLineTrailingSpaceColor: Et,
|
|
2013
2013
|
compareKeys: void 0,
|
|
2014
2014
|
contextLines: Zn,
|
|
2015
2015
|
emptyFirstOrLastLinePlaceholder: "",
|
|
@@ -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
|
-
truncateAnnotationColor:
|
|
2023
|
+
truncateAnnotationColor: Et
|
|
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
|
-
|
|
2035
|
-
function
|
|
2034
|
+
i(bs, "getContextLines");
|
|
2035
|
+
function ge(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(ge, "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,69 +2061,69 @@ function Ei(e) {
|
|
|
2061
2061
|
b: n
|
|
2062
2062
|
};
|
|
2063
2063
|
}
|
|
2064
|
-
|
|
2065
|
-
function
|
|
2066
|
-
if (
|
|
2064
|
+
i(Ss, "countChanges");
|
|
2065
|
+
function Es({ aAnnotation: e, aColor: t, aIndicator: n, bAnnotation: r, bColor: o, bIndicator: s, includeChangeCounts: c, omitAnnotationLines: a }, u) {
|
|
2066
|
+
if (a)
|
|
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)), S = " ".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 = `${S} ${s} ${y}${h}`;
|
|
2073
2073
|
}
|
|
2074
|
-
let
|
|
2075
|
-
return `${t(
|
|
2076
|
-
${o(
|
|
2074
|
+
let l = `${n} ${e}${m}`, b = `${s} ${r}${p}`;
|
|
2075
|
+
return `${t(l)}
|
|
2076
|
+
${o(b)}
|
|
2077
2077
|
|
|
2078
2078
|
`;
|
|
2079
2079
|
}
|
|
2080
|
-
|
|
2081
|
-
function
|
|
2082
|
-
return
|
|
2080
|
+
i(Es, "printAnnotation");
|
|
2081
|
+
function Rt(e, t, n) {
|
|
2082
|
+
return Es(n, Ss(e)) + (n.expand ? gs(e, n) : ps(e, n)) + (t ? n.truncateAnnotationColor(`
|
|
2083
2083
|
${n.truncateAnnotation}`) : "");
|
|
2084
2084
|
}
|
|
2085
|
-
|
|
2086
|
-
function
|
|
2087
|
-
let r =
|
|
2088
|
-
return
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
function
|
|
2092
|
-
if (
|
|
2093
|
-
return
|
|
2094
|
-
let [
|
|
2095
|
-
return
|
|
2085
|
+
i(Rt, "printDiffLines");
|
|
2086
|
+
function We(e, t, n) {
|
|
2087
|
+
let r = ge(n), [o, s] = Qn(ye(e) ? [] : e, ye(t) ? [] : t, r);
|
|
2088
|
+
return Rt(o, s, r);
|
|
2089
|
+
}
|
|
2090
|
+
i(We, "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
|
+
return We(e, t, o);
|
|
2094
|
+
let [s, c] = Qn(n, r, o), a = 0, u = 0;
|
|
2095
|
+
return s.forEach((m) => {
|
|
2096
2096
|
switch (m[0]) {
|
|
2097
2097
|
case z:
|
|
2098
|
-
m[1] = e[
|
|
2098
|
+
m[1] = e[a], a += 1;
|
|
2099
2099
|
break;
|
|
2100
2100
|
case j:
|
|
2101
2101
|
m[1] = t[u], u += 1;
|
|
2102
2102
|
break;
|
|
2103
2103
|
default:
|
|
2104
|
-
m[1] = t[u],
|
|
2104
|
+
m[1] = t[u], a += 1, u += 1;
|
|
2105
2105
|
}
|
|
2106
|
-
}),
|
|
2106
|
+
}), Rt(s, c, ge(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,
|
|
2112
|
-
p = 0,
|
|
2113
|
-
for (Gn(
|
|
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, a = s !== e.length || c !== t.length, u = /* @__PURE__ */ i((g, h) => e[g] === t[h], "isCommon"), m = [],
|
|
2112
|
+
p = 0, l = 0;
|
|
2113
|
+
for (Gn(s, c, u, /* @__PURE__ */ i((g, h, f) => {
|
|
2114
2114
|
for (; p !== h; p += 1)
|
|
2115
|
-
m.push(new
|
|
2116
|
-
for (;
|
|
2117
|
-
m.push(new
|
|
2118
|
-
for (; g !== 0; g -= 1, p += 1,
|
|
2119
|
-
m.push(new
|
|
2120
|
-
}, "foundSubsequence")); p !==
|
|
2121
|
-
m.push(new
|
|
2122
|
-
for (;
|
|
2123
|
-
m.push(new
|
|
2124
|
-
return [m,
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2115
|
+
m.push(new P(z, e[p]));
|
|
2116
|
+
for (; l !== f; l += 1)
|
|
2117
|
+
m.push(new P(j, t[l]));
|
|
2118
|
+
for (; g !== 0; g -= 1, p += 1, l += 1)
|
|
2119
|
+
m.push(new P(M, t[l]));
|
|
2120
|
+
}, "foundSubsequence")); p !== s; p += 1)
|
|
2121
|
+
m.push(new P(z, e[p]));
|
|
2122
|
+
for (; l !== c; l += 1)
|
|
2123
|
+
m.push(new P(j, t[l]));
|
|
2124
|
+
return [m, a];
|
|
2125
|
+
}
|
|
2126
|
+
i(Qn, "diffLinesRaw");
|
|
2127
2127
|
function Dn(e) {
|
|
2128
2128
|
if (e === void 0)
|
|
2129
2129
|
return "undefined";
|
|
@@ -2157,36 +2157,36 @@ 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), S = g ? `${e.split(f, o).join(f)}
|
|
2174
|
+
` : e, _ = h ? `${t.split(d, o).join(d)}
|
|
2175
2175
|
` : t;
|
|
2176
|
-
|
|
2176
|
+
s = S.length, c = _.length;
|
|
2177
2177
|
}
|
|
2178
|
-
let
|
|
2179
|
-
return Gn(
|
|
2180
|
-
m !== h &&
|
|
2178
|
+
let a = s !== e.length || c !== t.length, u = /* @__PURE__ */ i((g, h) => e[g] === t[h], "isCommon"), m = 0, p = 0, l = [];
|
|
2179
|
+
return Gn(s, c, u, /* @__PURE__ */ i((g, h, f) => {
|
|
2180
|
+
m !== h && l.push(new P(z, e.slice(m, h))), p !== f && l.push(new P(j, t.slice(p, f))), m = h + g, p = f + g, l.push(new P(M, t.slice(f,
|
|
2181
2181
|
p)));
|
|
2182
|
-
}, "foundSubsequence")), m !==
|
|
2182
|
+
}, "foundSubsequence")), m !== s && l.push(new P(z, e.slice(m))), p !== c && l.push(new P(j, t.slice(p))), [l, a];
|
|
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
|
-
|
|
2189
|
-
var
|
|
2188
|
+
i(Cs, "concatenateRelevantDiffs");
|
|
2189
|
+
var Pt = class Pt {
|
|
2190
2190
|
op;
|
|
2191
2191
|
line;
|
|
2192
2192
|
lines;
|
|
@@ -2195,36 +2195,39 @@ 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;
|
|
2206
2206
|
}
|
|
2207
|
+
// Minor input to buffer.
|
|
2207
2208
|
pushDiff(t) {
|
|
2208
2209
|
this.line.push(t);
|
|
2209
2210
|
}
|
|
2211
|
+
// Main input to buffer.
|
|
2210
2212
|
align(t) {
|
|
2211
2213
|
let n = t[1];
|
|
2212
2214
|
if (n.includes(`
|
|
2213
2215
|
`)) {
|
|
2214
2216
|
let r = n.split(`
|
|
2215
2217
|
`), o = r.length - 1;
|
|
2216
|
-
r.forEach((
|
|
2217
|
-
c < o ? (this.pushSubstring(
|
|
2218
|
+
r.forEach((s, c) => {
|
|
2219
|
+
c < o ? (this.pushSubstring(s), this.pushLine()) : s.length !== 0 && this.pushSubstring(s);
|
|
2218
2220
|
});
|
|
2219
2221
|
} else
|
|
2220
2222
|
this.pushDiff(t);
|
|
2221
2223
|
}
|
|
2224
|
+
// Output from buffer.
|
|
2222
2225
|
moveLinesTo(t) {
|
|
2223
2226
|
this.isLineEmpty() || this.pushLine(), t.push(...this.lines), this.lines.length = 0;
|
|
2224
2227
|
}
|
|
2225
2228
|
};
|
|
2226
|
-
|
|
2227
|
-
var
|
|
2229
|
+
i(Pt, "ChangeBuffer");
|
|
2230
|
+
var Ue = Pt, Nt = class Nt {
|
|
2228
2231
|
deleteBuffer;
|
|
2229
2232
|
insertBuffer;
|
|
2230
2233
|
lines;
|
|
@@ -2242,45 +2245,47 @@ var We = Rt, Nt = class Nt {
|
|
|
2242
2245
|
flushChangeLines() {
|
|
2243
2246
|
this.deleteBuffer.moveLinesTo(this.lines), this.insertBuffer.moveLinesTo(this.lines);
|
|
2244
2247
|
}
|
|
2248
|
+
// Input to buffer.
|
|
2245
2249
|
align(t) {
|
|
2246
2250
|
let n = t[0], r = t[1];
|
|
2247
2251
|
if (r.includes(`
|
|
2248
2252
|
`)) {
|
|
2249
2253
|
let o = r.split(`
|
|
2250
|
-
`),
|
|
2251
|
-
o.forEach((c,
|
|
2252
|
-
if (
|
|
2253
|
-
let u = new
|
|
2254
|
+
`), s = o.length - 1;
|
|
2255
|
+
o.forEach((c, a) => {
|
|
2256
|
+
if (a === 0) {
|
|
2257
|
+
let u = new P(n, c);
|
|
2254
2258
|
this.deleteBuffer.isLineEmpty() && this.insertBuffer.isLineEmpty() ? (this.flushChangeLines(), this.pushDiffCommonLine(u)) : (this.
|
|
2255
2259
|
pushDiffChangeLines(u), this.flushChangeLines());
|
|
2256
|
-
} else
|
|
2260
|
+
} else a < s ? this.pushDiffCommonLine(new P(n, c)) : c.length !== 0 && this.pushDiffChangeLines(new P(n, c));
|
|
2257
2261
|
});
|
|
2258
2262
|
} else
|
|
2259
2263
|
this.pushDiffChangeLines(t);
|
|
2260
2264
|
}
|
|
2265
|
+
// Output from buffer.
|
|
2261
2266
|
getLines() {
|
|
2262
2267
|
return this.flushChangeLines(), this.lines;
|
|
2263
2268
|
}
|
|
2264
2269
|
};
|
|
2265
|
-
|
|
2266
|
-
var
|
|
2267
|
-
function
|
|
2268
|
-
let n = new
|
|
2269
|
-
return e.forEach((
|
|
2270
|
-
switch (
|
|
2270
|
+
i(Nt, "CommonBuffer");
|
|
2271
|
+
var Tt = Nt;
|
|
2272
|
+
function Os(e, t) {
|
|
2273
|
+
let n = new Ue(z, t), r = new Ue(j, t), o = new Tt(n, r);
|
|
2274
|
+
return e.forEach((s) => {
|
|
2275
|
+
switch (s[0]) {
|
|
2271
2276
|
case z:
|
|
2272
|
-
n.align(
|
|
2277
|
+
n.align(s);
|
|
2273
2278
|
break;
|
|
2274
2279
|
case j:
|
|
2275
|
-
r.align(
|
|
2280
|
+
r.align(s);
|
|
2276
2281
|
break;
|
|
2277
2282
|
default:
|
|
2278
|
-
o.align(
|
|
2283
|
+
o.align(s);
|
|
2279
2284
|
}
|
|
2280
2285
|
}), o.getLines();
|
|
2281
2286
|
}
|
|
2282
|
-
|
|
2283
|
-
function
|
|
2287
|
+
i(Os, "getAlignedDiffs");
|
|
2288
|
+
function $s(e, t) {
|
|
2284
2289
|
if (t) {
|
|
2285
2290
|
let n = e.length - 1;
|
|
2286
2291
|
return e.some((r, o) => r[0] === M && (o !== n || r[1] !== `
|
|
@@ -2288,43 +2293,43 @@ function wi(e, t) {
|
|
|
2288
2293
|
}
|
|
2289
2294
|
return e.some((n) => n[0] === M);
|
|
2290
2295
|
}
|
|
2291
|
-
s
|
|
2292
|
-
function
|
|
2296
|
+
i($s, "hasCommonDiff");
|
|
2297
|
+
function ws(e, t, n) {
|
|
2293
2298
|
if (e !== t && e.length !== 0 && t.length !== 0) {
|
|
2294
2299
|
let r = e.includes(`
|
|
2295
2300
|
`) || t.includes(`
|
|
2296
|
-
`), [o,
|
|
2301
|
+
`), [o, s] = vn(r ? `${e}
|
|
2297
2302
|
` : e, r ? `${t}
|
|
2298
2303
|
` : t, !0, n);
|
|
2299
|
-
if (
|
|
2300
|
-
let c =
|
|
2301
|
-
return
|
|
2304
|
+
if ($s(o, r)) {
|
|
2305
|
+
let c = ge(n), a = Os(o, c.changeColor);
|
|
2306
|
+
return Rt(a, s, c);
|
|
2302
2307
|
}
|
|
2303
2308
|
}
|
|
2304
|
-
return
|
|
2309
|
+
return We(e.split(`
|
|
2305
2310
|
`), t.split(`
|
|
2306
2311
|
`), n);
|
|
2307
2312
|
}
|
|
2308
|
-
|
|
2313
|
+
i(ws, "diffStringsUnified");
|
|
2309
2314
|
function vn(e, t, n, r) {
|
|
2310
|
-
let [o,
|
|
2311
|
-
return n &&
|
|
2315
|
+
let [o, s] = Ts(e, t, r);
|
|
2316
|
+
return n && ss(o), [o, s];
|
|
2312
2317
|
}
|
|
2313
|
-
|
|
2314
|
-
function
|
|
2315
|
-
let { commonColor: n } =
|
|
2318
|
+
i(vn, "diffStringsRaw");
|
|
2319
|
+
function Ct(e, t) {
|
|
2320
|
+
let { commonColor: n } = ge(t);
|
|
2316
2321
|
return n(e);
|
|
2317
2322
|
}
|
|
2318
|
-
|
|
2319
|
-
var { AsymmetricMatcher:
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
],
|
|
2323
|
+
i(Ct, "getCommonMessage");
|
|
2324
|
+
var { AsymmetricMatcher: Rs, DOMCollection: As, DOMElement: Ps, Immutable: Ns, ReactElement: Is, ReactTestComponent: Ms } = _e, er = [
|
|
2325
|
+
Ms,
|
|
2326
|
+
Is,
|
|
2327
|
+
Ps,
|
|
2328
|
+
As,
|
|
2329
|
+
Ns,
|
|
2330
|
+
Rs,
|
|
2331
|
+
_e.Error
|
|
2332
|
+
], Ot = {
|
|
2328
2333
|
maxDepth: 20,
|
|
2329
2334
|
plugins: er
|
|
2330
2335
|
}, tr = {
|
|
@@ -2332,83 +2337,83 @@ var { AsymmetricMatcher: Ri, DOMCollection: Ni, DOMElement: Ii, Immutable: Pi, R
|
|
|
2332
2337
|
maxDepth: 8,
|
|
2333
2338
|
plugins: er
|
|
2334
2339
|
};
|
|
2335
|
-
function
|
|
2340
|
+
function Ls(e, t, n) {
|
|
2336
2341
|
if (Object.is(e, t))
|
|
2337
2342
|
return "";
|
|
2338
|
-
let r = Dn(e), o = r,
|
|
2343
|
+
let r = Dn(e), o = r, s = !1;
|
|
2339
2344
|
if (r === "object" && typeof e.asymmetricMatch == "function") {
|
|
2340
2345
|
if (e.$$typeof !== Symbol.for("jest.asymmetricMatcher") || typeof e.getExpectedType != "function")
|
|
2341
2346
|
return;
|
|
2342
|
-
o = e.getExpectedType(),
|
|
2347
|
+
o = e.getExpectedType(), s = o === "string";
|
|
2343
2348
|
}
|
|
2344
2349
|
if (o !== Dn(t)) {
|
|
2345
|
-
let
|
|
2350
|
+
let d = function(O) {
|
|
2346
2351
|
return O.length <= f ? O : `${O.slice(0, f)}...`;
|
|
2347
2352
|
};
|
|
2348
|
-
|
|
2349
|
-
let { aAnnotation: c, aColor:
|
|
2350
|
-
|
|
2351
|
-
g =
|
|
2352
|
-
let
|
|
2353
|
-
${g}`, _ = `${p(`${
|
|
2353
|
+
i(d, "truncate");
|
|
2354
|
+
let { aAnnotation: c, aColor: a, aIndicator: u, bAnnotation: m, bColor: p, bIndicator: l } = ge(n), b = $t(tr, n), g = X(e, b), h = X(t,
|
|
2355
|
+
b), f = 1e5;
|
|
2356
|
+
g = d(g), h = d(h);
|
|
2357
|
+
let S = `${a(`${u} ${c}:`)}
|
|
2358
|
+
${g}`, _ = `${p(`${l} ${m}:`)}
|
|
2354
2359
|
${h}`;
|
|
2355
|
-
return `${
|
|
2360
|
+
return `${S}
|
|
2356
2361
|
|
|
2357
2362
|
${_}`;
|
|
2358
2363
|
}
|
|
2359
|
-
if (!
|
|
2364
|
+
if (!s)
|
|
2360
2365
|
switch (r) {
|
|
2361
2366
|
case "string":
|
|
2362
|
-
return
|
|
2367
|
+
return We(e.split(`
|
|
2363
2368
|
`), t.split(`
|
|
2364
2369
|
`), n);
|
|
2365
2370
|
case "boolean":
|
|
2366
2371
|
case "number":
|
|
2367
|
-
return
|
|
2372
|
+
return xs(e, t, n);
|
|
2368
2373
|
case "map":
|
|
2369
|
-
return
|
|
2374
|
+
return _t(jn(e), jn(t), n);
|
|
2370
2375
|
case "set":
|
|
2371
|
-
return
|
|
2376
|
+
return _t(kn(e), kn(t), n);
|
|
2372
2377
|
default:
|
|
2373
|
-
return
|
|
2378
|
+
return _t(e, t, n);
|
|
2374
2379
|
}
|
|
2375
2380
|
}
|
|
2376
|
-
|
|
2377
|
-
function
|
|
2378
|
-
let r =
|
|
2379
|
-
return r === o ? "" :
|
|
2381
|
+
i(Ls, "diff");
|
|
2382
|
+
function xs(e, t, n) {
|
|
2383
|
+
let r = X(e, Ot), o = X(t, Ot);
|
|
2384
|
+
return r === o ? "" : We(r.split(`
|
|
2380
2385
|
`), o.split(`
|
|
2381
2386
|
`), n);
|
|
2382
2387
|
}
|
|
2383
|
-
|
|
2388
|
+
i(xs, "comparePrimitive");
|
|
2384
2389
|
function jn(e) {
|
|
2385
2390
|
return new Map(Array.from(e.entries()).sort());
|
|
2386
2391
|
}
|
|
2387
|
-
|
|
2392
|
+
i(jn, "sortMap");
|
|
2388
2393
|
function kn(e) {
|
|
2389
2394
|
return new Set(Array.from(e.values()).sort());
|
|
2390
2395
|
}
|
|
2391
|
-
|
|
2392
|
-
function
|
|
2396
|
+
i(kn, "sortSet");
|
|
2397
|
+
function _t(e, t, n) {
|
|
2393
2398
|
let r, o = !1;
|
|
2394
2399
|
try {
|
|
2395
|
-
let c = Ot
|
|
2400
|
+
let c = $t(Ot, n);
|
|
2396
2401
|
r = Bn(e, t, c, n);
|
|
2397
2402
|
} catch {
|
|
2398
2403
|
o = !0;
|
|
2399
2404
|
}
|
|
2400
|
-
let
|
|
2401
|
-
if (r === void 0 || r ===
|
|
2402
|
-
let c =
|
|
2403
|
-
r = Bn(e, t, c, n), r !==
|
|
2405
|
+
let s = Ct(Kn, n);
|
|
2406
|
+
if (r === void 0 || r === s) {
|
|
2407
|
+
let c = $t(tr, n);
|
|
2408
|
+
r = Bn(e, t, c, n), r !== s && !o && (r = `${Ct(as, n)}
|
|
2404
2409
|
|
|
2405
2410
|
${r}`);
|
|
2406
2411
|
}
|
|
2407
2412
|
return r;
|
|
2408
2413
|
}
|
|
2409
|
-
|
|
2410
|
-
function
|
|
2411
|
-
let { compareKeys: n, printBasicPrototype: r, maxDepth: o } =
|
|
2414
|
+
i(_t, "compareObjects");
|
|
2415
|
+
function $t(e, t) {
|
|
2416
|
+
let { compareKeys: n, printBasicPrototype: r, maxDepth: o } = ge(t);
|
|
2412
2417
|
return {
|
|
2413
2418
|
...e,
|
|
2414
2419
|
compareKeys: n,
|
|
@@ -2416,49 +2421,49 @@ function Ot(e, t) {
|
|
|
2416
2421
|
maxDepth: o ?? e.maxDepth
|
|
2417
2422
|
};
|
|
2418
2423
|
}
|
|
2419
|
-
|
|
2424
|
+
i($t, "getFormatOptions");
|
|
2420
2425
|
function Bn(e, t, n, r) {
|
|
2421
2426
|
let o = {
|
|
2422
2427
|
...n,
|
|
2423
2428
|
indent: 0
|
|
2424
|
-
},
|
|
2425
|
-
if (
|
|
2426
|
-
return
|
|
2429
|
+
}, s = X(e, o), c = X(t, o);
|
|
2430
|
+
if (s === c)
|
|
2431
|
+
return Ct(Kn, r);
|
|
2427
2432
|
{
|
|
2428
|
-
let
|
|
2429
|
-
return
|
|
2433
|
+
let a = X(e, n), u = X(t, n);
|
|
2434
|
+
return _s(a.split(`
|
|
2430
2435
|
`), u.split(`
|
|
2431
|
-
`),
|
|
2436
|
+
`), s.split(`
|
|
2432
2437
|
`), c.split(`
|
|
2433
2438
|
`), r);
|
|
2434
2439
|
}
|
|
2435
2440
|
}
|
|
2436
|
-
|
|
2441
|
+
i(Bn, "getObjectsDifference");
|
|
2437
2442
|
var zn = 2e4;
|
|
2438
2443
|
function Yn(e) {
|
|
2439
|
-
return
|
|
2444
|
+
return Be(e) === "Object" && typeof e.asymmetricMatch == "function";
|
|
2440
2445
|
}
|
|
2441
|
-
|
|
2446
|
+
i(Yn, "isAsymmetricMatcher");
|
|
2442
2447
|
function Un(e, t) {
|
|
2443
|
-
let n =
|
|
2448
|
+
let n = Be(e), r = Be(t);
|
|
2444
2449
|
return n === r && (n === "Object" || n === "Array");
|
|
2445
2450
|
}
|
|
2446
|
-
|
|
2451
|
+
i(Un, "isReplaceable");
|
|
2447
2452
|
function nr(e, t, n) {
|
|
2448
|
-
let { aAnnotation: r, bAnnotation: o } =
|
|
2453
|
+
let { aAnnotation: r, bAnnotation: o } = ge(n);
|
|
2449
2454
|
if (typeof t == "string" && typeof e == "string" && t.length > 0 && e.length > 0 && t.length <= zn && e.length <= zn && t !== e) {
|
|
2450
2455
|
if (t.includes(`
|
|
2451
2456
|
`) || e.includes(`
|
|
2452
2457
|
`))
|
|
2453
|
-
return
|
|
2454
|
-
let [p] = vn(t, e, !0),
|
|
2458
|
+
return ws(t, e, n);
|
|
2459
|
+
let [p] = vn(t, e, !0), l = p.some((f) => f[0] === M), b = Ds(r, o), g = b(r) + ks(Wn(p, z, l)), h = b(o) + js(Wn(p, j, l));
|
|
2455
2460
|
return `${g}
|
|
2456
2461
|
${h}`;
|
|
2457
2462
|
}
|
|
2458
|
-
let
|
|
2459
|
-
return
|
|
2463
|
+
let s = St(t, { forceWritable: !0 }), c = St(e, { forceWritable: !0 }), { replacedExpected: a, replacedActual: u } = rr(c, s);
|
|
2464
|
+
return Ls(a, u, n);
|
|
2460
2465
|
}
|
|
2461
|
-
|
|
2466
|
+
i(nr, "printDiffOrStringify");
|
|
2462
2467
|
function rr(e, t, n = /* @__PURE__ */ new WeakSet(), r = /* @__PURE__ */ new WeakSet()) {
|
|
2463
2468
|
return e instanceof Error && t instanceof Error && typeof e.cause < "u" && typeof t.cause > "u" ? (delete e.cause, {
|
|
2464
2469
|
replacedActual: e,
|
|
@@ -2466,15 +2471,15 @@ function rr(e, t, n = /* @__PURE__ */ new WeakSet(), r = /* @__PURE__ */ new Wea
|
|
|
2466
2471
|
}) : Un(e, t) ? n.has(e) || r.has(t) ? {
|
|
2467
2472
|
replacedActual: e,
|
|
2468
2473
|
replacedExpected: t
|
|
2469
|
-
} : (n.add(e), r.add(t),
|
|
2470
|
-
let
|
|
2471
|
-
if (Yn(
|
|
2472
|
-
|
|
2474
|
+
} : (n.add(e), r.add(t), bt(t).forEach((o) => {
|
|
2475
|
+
let s = t[o], c = e[o];
|
|
2476
|
+
if (Yn(s))
|
|
2477
|
+
s.asymmetricMatch(c) && (e[o] = s);
|
|
2473
2478
|
else if (Yn(c))
|
|
2474
|
-
c.asymmetricMatch(
|
|
2475
|
-
else if (Un(c,
|
|
2476
|
-
let
|
|
2477
|
-
e[o] =
|
|
2479
|
+
c.asymmetricMatch(s) && (t[o] = c);
|
|
2480
|
+
else if (Un(c, s)) {
|
|
2481
|
+
let a = rr(c, s, n, r);
|
|
2482
|
+
e[o] = a.replacedActual, t[o] = a.replacedExpected;
|
|
2478
2483
|
}
|
|
2479
2484
|
}), {
|
|
2480
2485
|
replacedActual: e,
|
|
@@ -2484,52 +2489,62 @@ function rr(e, t, n = /* @__PURE__ */ new WeakSet(), r = /* @__PURE__ */ new Wea
|
|
|
2484
2489
|
replacedExpected: t
|
|
2485
2490
|
};
|
|
2486
2491
|
}
|
|
2487
|
-
|
|
2488
|
-
function
|
|
2492
|
+
i(rr, "replaceAsymmetricMatcher");
|
|
2493
|
+
function Ds(...e) {
|
|
2489
2494
|
let t = e.reduce((n, r) => r.length > n ? r.length : n, 0);
|
|
2490
2495
|
return (n) => `${n}: ${" ".repeat(t - n.length)}`;
|
|
2491
2496
|
}
|
|
2492
|
-
|
|
2493
|
-
var
|
|
2497
|
+
i(Ds, "getLabelPrinter");
|
|
2498
|
+
var Fs = "\xB7";
|
|
2494
2499
|
function or(e) {
|
|
2495
|
-
return e.replace(/\s+$/gm, (t) =>
|
|
2500
|
+
return e.replace(/\s+$/gm, (t) => Fs.repeat(t.length));
|
|
2496
2501
|
}
|
|
2497
|
-
|
|
2498
|
-
function
|
|
2499
|
-
return v.red(or(
|
|
2502
|
+
i(or, "replaceTrailingSpaces");
|
|
2503
|
+
function js(e) {
|
|
2504
|
+
return v.red(or(pe(e)));
|
|
2500
2505
|
}
|
|
2501
|
-
|
|
2502
|
-
function
|
|
2503
|
-
return v.green(or(
|
|
2506
|
+
i(js, "printReceived");
|
|
2507
|
+
function ks(e) {
|
|
2508
|
+
return v.green(or(pe(e)));
|
|
2504
2509
|
}
|
|
2505
|
-
|
|
2510
|
+
i(ks, "printExpected");
|
|
2506
2511
|
function Wn(e, t, n) {
|
|
2507
2512
|
return e.reduce((r, o) => r + (o[0] === M ? o[1] : o[0] === t ? n ? v.inverse(o[1]) : o[1] : ""), "");
|
|
2508
2513
|
}
|
|
2509
|
-
|
|
2514
|
+
i(Wn, "getCommonAndChangedSubstrings");
|
|
2510
2515
|
|
|
2511
2516
|
// ../node_modules/@vitest/utils/dist/error.js
|
|
2512
|
-
var
|
|
2513
|
-
function
|
|
2514
|
-
return e && (e[
|
|
2517
|
+
var Bs = "@@__IMMUTABLE_RECORD__@@", zs = "@@__IMMUTABLE_ITERABLE__@@";
|
|
2518
|
+
function Ys(e) {
|
|
2519
|
+
return e && (e[zs] || e[Bs]);
|
|
2515
2520
|
}
|
|
2516
|
-
|
|
2517
|
-
var
|
|
2518
|
-
function
|
|
2521
|
+
i(Ys, "isImmutable");
|
|
2522
|
+
var Us = Object.getPrototypeOf({});
|
|
2523
|
+
function sr(e) {
|
|
2519
2524
|
return e instanceof Error ? `<unserializable>: ${e.message}` : typeof e == "string" ? `<unserializable>: ${e}` : "<unserializable>";
|
|
2520
2525
|
}
|
|
2521
|
-
|
|
2522
|
-
function
|
|
2526
|
+
i(sr, "getUnserializableMessage");
|
|
2527
|
+
function le(e, t = /* @__PURE__ */ new WeakMap()) {
|
|
2523
2528
|
if (!e || typeof e == "string")
|
|
2524
2529
|
return e;
|
|
2530
|
+
if (e instanceof Error && "toJSON" in e && typeof e.toJSON == "function") {
|
|
2531
|
+
let n = e.toJSON();
|
|
2532
|
+
return n && n !== e && typeof n == "object" && (typeof e.message == "string" && Ve(() => n.message ?? (n.message = e.message)), typeof e.
|
|
2533
|
+
stack == "string" && Ve(() => n.stack ?? (n.stack = e.stack)), typeof e.name == "string" && Ve(() => n.name ?? (n.name = e.name)), e.cause !=
|
|
2534
|
+
null && Ve(() => n.cause ?? (n.cause = le(e.cause, t)))), le(n, t);
|
|
2535
|
+
}
|
|
2525
2536
|
if (typeof e == "function")
|
|
2526
2537
|
return `Function<${e.name || "anonymous"}>`;
|
|
2527
2538
|
if (typeof e == "symbol")
|
|
2528
2539
|
return e.toString();
|
|
2529
2540
|
if (typeof e != "object")
|
|
2530
2541
|
return e;
|
|
2531
|
-
if (
|
|
2532
|
-
return
|
|
2542
|
+
if (typeof Buffer < "u" && e instanceof Buffer)
|
|
2543
|
+
return `<Buffer(${e.length}) ...>`;
|
|
2544
|
+
if (typeof Uint8Array < "u" && e instanceof Uint8Array)
|
|
2545
|
+
return `<Uint8Array(${e.length}) ...>`;
|
|
2546
|
+
if (Ys(e))
|
|
2547
|
+
return le(e.toJSON(), t);
|
|
2533
2548
|
if (e instanceof Promise || e.constructor && e.constructor.prototype === "AsyncFunction")
|
|
2534
2549
|
return "Promise";
|
|
2535
2550
|
if (typeof Element < "u" && e instanceof Element)
|
|
@@ -2537,50 +2552,57 @@ function be(e, t = /* @__PURE__ */ new WeakMap()) {
|
|
|
2537
2552
|
if (typeof e.asymmetricMatch == "function")
|
|
2538
2553
|
return `${e.toString()} ${wn(e.sample)}`;
|
|
2539
2554
|
if (typeof e.toJSON == "function")
|
|
2540
|
-
return
|
|
2555
|
+
return le(e.toJSON(), t);
|
|
2541
2556
|
if (t.has(e))
|
|
2542
2557
|
return t.get(e);
|
|
2543
2558
|
if (Array.isArray(e)) {
|
|
2544
2559
|
let n = new Array(e.length);
|
|
2545
2560
|
return t.set(e, n), e.forEach((r, o) => {
|
|
2546
2561
|
try {
|
|
2547
|
-
n[o] =
|
|
2548
|
-
} catch (
|
|
2549
|
-
n[o] =
|
|
2562
|
+
n[o] = le(r, t);
|
|
2563
|
+
} catch (s) {
|
|
2564
|
+
n[o] = sr(s);
|
|
2550
2565
|
}
|
|
2551
2566
|
}), n;
|
|
2552
2567
|
} else {
|
|
2553
2568
|
let n = /* @__PURE__ */ Object.create(null);
|
|
2554
2569
|
t.set(e, n);
|
|
2555
2570
|
let r = e;
|
|
2556
|
-
for (; r && r !==
|
|
2571
|
+
for (; r && r !== Us; )
|
|
2557
2572
|
Object.getOwnPropertyNames(r).forEach((o) => {
|
|
2558
2573
|
if (!(o in n))
|
|
2559
2574
|
try {
|
|
2560
|
-
n[o] =
|
|
2561
|
-
} catch (
|
|
2562
|
-
delete n[o], n[o] =
|
|
2575
|
+
n[o] = le(e[o], t);
|
|
2576
|
+
} catch (s) {
|
|
2577
|
+
delete n[o], n[o] = sr(s);
|
|
2563
2578
|
}
|
|
2564
2579
|
}), r = Object.getPrototypeOf(r);
|
|
2565
2580
|
return n;
|
|
2566
2581
|
}
|
|
2567
2582
|
}
|
|
2568
|
-
|
|
2569
|
-
function
|
|
2583
|
+
i(le, "serializeValue");
|
|
2584
|
+
function Ve(e) {
|
|
2585
|
+
try {
|
|
2586
|
+
return e();
|
|
2587
|
+
} catch {
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
i(Ve, "safe");
|
|
2591
|
+
function Ws(e) {
|
|
2570
2592
|
return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "");
|
|
2571
2593
|
}
|
|
2572
|
-
|
|
2594
|
+
i(Ws, "normalizeErrorMessage");
|
|
2573
2595
|
function It(e, t, n = /* @__PURE__ */ new WeakSet()) {
|
|
2574
2596
|
if (!e || typeof e != "object")
|
|
2575
2597
|
return { message: String(e) };
|
|
2576
2598
|
let r = e;
|
|
2577
|
-
r.
|
|
2578
|
-
r.actual !== void 0) && (r.diff = nr(r.actual, r.expected, {
|
|
2599
|
+
(r.showDiff || r.showDiff === void 0 && r.expected !== void 0 && r.actual !== void 0) && (r.diff = nr(r.actual, r.expected, {
|
|
2579
2600
|
...t,
|
|
2580
2601
|
...r.diffOptions
|
|
2581
|
-
})), typeof r.expected != "string" && (r.expected =
|
|
2602
|
+
})), "expected" in r && typeof r.expected != "string" && (r.expected = pe(r.expected, 10)), "actual" in r && typeof r.actual != "string" &&
|
|
2603
|
+
(r.actual = pe(r.actual, 10));
|
|
2582
2604
|
try {
|
|
2583
|
-
typeof r.message == "string" && (r.message =
|
|
2605
|
+
typeof r.message == "string" && (r.message = Ws(r.message));
|
|
2584
2606
|
} catch {
|
|
2585
2607
|
}
|
|
2586
2608
|
try {
|
|
@@ -2588,13 +2610,13 @@ function It(e, t, n = /* @__PURE__ */ new WeakSet()) {
|
|
|
2588
2610
|
} catch {
|
|
2589
2611
|
}
|
|
2590
2612
|
try {
|
|
2591
|
-
return
|
|
2613
|
+
return le(r);
|
|
2592
2614
|
} catch (o) {
|
|
2593
|
-
return
|
|
2615
|
+
return le(new Error(`Failed to fully serialize error: ${o?.message}
|
|
2594
2616
|
Inner error message: ${r?.message}`));
|
|
2595
2617
|
}
|
|
2596
2618
|
}
|
|
2597
|
-
|
|
2619
|
+
i(It, "processError");
|
|
2598
2620
|
|
|
2599
2621
|
// src/instrumenter/EVENTS.ts
|
|
2600
2622
|
var ne = {
|
|
@@ -2611,33 +2633,27 @@ var ne = {
|
|
|
2611
2633
|
var qe = globalThis.__STORYBOOK_ADDONS_PREVIEW;
|
|
2612
2634
|
|
|
2613
2635
|
// src/instrumenter/types.ts
|
|
2614
|
-
var
|
|
2636
|
+
var Vs = /* @__PURE__ */ ((o) => (o.DONE = "done", o.ERROR = "error", o.ACTIVE = "active", o.WAITING = "waiting", o))(Vs || {});
|
|
2615
2637
|
|
|
2616
2638
|
// 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(
|
|
2639
|
+
var Hs = new Error(
|
|
2624
2640
|
"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 (!
|
|
2641
|
+
), cr = /* @__PURE__ */ i((e) => Object.prototype.toString.call(e) === "[object Object]", "isObject"), Js = /* @__PURE__ */ i((e) => Object.
|
|
2642
|
+
prototype.toString.call(e) === "[object Module]", "isModule"), Xs = /* @__PURE__ */ i((e) => {
|
|
2643
|
+
if (!cr(e) && !Js(e))
|
|
2628
2644
|
return !1;
|
|
2629
2645
|
if (e.constructor === void 0)
|
|
2630
2646
|
return !0;
|
|
2631
2647
|
let t = e.constructor.prototype;
|
|
2632
|
-
return !!
|
|
2633
|
-
}, "isInstrumentable"),
|
|
2648
|
+
return !!cr(t);
|
|
2649
|
+
}, "isInstrumentable"), Zs = /* @__PURE__ */ i((e) => {
|
|
2634
2650
|
try {
|
|
2635
2651
|
return new e.constructor();
|
|
2636
2652
|
} catch {
|
|
2637
2653
|
return {};
|
|
2638
2654
|
}
|
|
2639
|
-
}, "construct"),
|
|
2640
|
-
renderPhase:
|
|
2655
|
+
}, "construct"), Mt = /* @__PURE__ */ i(() => ({
|
|
2656
|
+
renderPhase: "preparing",
|
|
2641
2657
|
isDebugging: !1,
|
|
2642
2658
|
isPlaying: !1,
|
|
2643
2659
|
isLocked: !1,
|
|
@@ -2650,7 +2666,7 @@ prototype.toString.call(e) === "[object Module]", "isModule"), Zi = /* @__PURE__
|
|
|
2650
2666
|
playUntil: void 0,
|
|
2651
2667
|
resolvers: {},
|
|
2652
2668
|
syncTimeout: void 0
|
|
2653
|
-
}), "getInitialState"),
|
|
2669
|
+
}), "getInitialState"), ur = /* @__PURE__ */ i((e, t = !1) => {
|
|
2654
2670
|
let n = (t ? e.shadowCalls : e.calls).filter((o) => o.retain);
|
|
2655
2671
|
if (!n.length)
|
|
2656
2672
|
return;
|
|
@@ -2658,238 +2674,279 @@ prototype.toString.call(e) === "[object Module]", "isModule"), Zi = /* @__PURE__
|
|
|
2658
2674
|
Array.from(e.callRefsByResult.entries()).filter(([, o]) => o.retain)
|
|
2659
2675
|
);
|
|
2660
2676
|
return { cursor: n.length, calls: n, callRefsByResult: r };
|
|
2661
|
-
}, "getRetainedState"),
|
|
2677
|
+
}, "getRetainedState"), xt = class xt {
|
|
2662
2678
|
constructor() {
|
|
2679
|
+
this.detached = !1;
|
|
2663
2680
|
this.initialized = !1;
|
|
2664
|
-
|
|
2665
|
-
|
|
2681
|
+
// State is tracked per story to deal with multiple stories on the same canvas (i.e. docs mode)
|
|
2682
|
+
this.state = {};
|
|
2683
|
+
this.loadParentWindowState = /* @__PURE__ */ i(() => {
|
|
2684
|
+
try {
|
|
2685
|
+
this.state = Z.window?.parent?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ || {};
|
|
2686
|
+
} catch {
|
|
2687
|
+
this.detached = !0;
|
|
2688
|
+
}
|
|
2689
|
+
}, "loadParentWindowState");
|
|
2690
|
+
this.updateParentWindowState = /* @__PURE__ */ i(() => {
|
|
2691
|
+
try {
|
|
2692
|
+
Z.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ = this.state;
|
|
2693
|
+
} catch {
|
|
2694
|
+
this.detached = !0;
|
|
2695
|
+
}
|
|
2696
|
+
}, "updateParentWindowState");
|
|
2697
|
+
this.loadParentWindowState();
|
|
2698
|
+
let t = /* @__PURE__ */ i(({
|
|
2666
2699
|
storyId: u,
|
|
2667
|
-
|
|
2668
|
-
|
|
2700
|
+
renderPhase: m,
|
|
2701
|
+
isPlaying: p = !0,
|
|
2702
|
+
isDebugging: l = !1
|
|
2669
2703
|
}) => {
|
|
2670
|
-
let
|
|
2704
|
+
let b = this.getState(u);
|
|
2671
2705
|
this.setState(u, {
|
|
2672
|
-
...
|
|
2673
|
-
...
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2706
|
+
...Mt(),
|
|
2707
|
+
...ur(b, l),
|
|
2708
|
+
renderPhase: m || b.renderPhase,
|
|
2709
|
+
shadowCalls: l ? b.shadowCalls : [],
|
|
2710
|
+
chainedCallIds: l ? b.chainedCallIds : /* @__PURE__ */ new Set(),
|
|
2711
|
+
playUntil: l ? b.playUntil : void 0,
|
|
2712
|
+
isPlaying: p,
|
|
2713
|
+
isDebugging: l
|
|
2679
2714
|
}), this.sync(u);
|
|
2680
|
-
}, "resetState"), n = /* @__PURE__ */
|
|
2681
|
-
this.getState(m).isDebugging || this.setState(m, ({ calls:
|
|
2715
|
+
}, "resetState"), n = /* @__PURE__ */ i((u) => ({ storyId: m, playUntil: p }) => {
|
|
2716
|
+
this.getState(m).isDebugging || this.setState(m, ({ calls: b }) => ({
|
|
2682
2717
|
calls: [],
|
|
2683
|
-
shadowCalls:
|
|
2718
|
+
shadowCalls: b.map((g) => ({ ...g, status: "waiting" })),
|
|
2684
2719
|
isDebugging: !0
|
|
2685
2720
|
}));
|
|
2686
|
-
let
|
|
2687
|
-
this.setState(m, ({ shadowCalls:
|
|
2688
|
-
if (p || !
|
|
2721
|
+
let l = this.getLog(m);
|
|
2722
|
+
this.setState(m, ({ shadowCalls: b }) => {
|
|
2723
|
+
if (p || !l.length)
|
|
2689
2724
|
return { playUntil: p };
|
|
2690
|
-
let g =
|
|
2725
|
+
let g = b.findIndex((h) => h.id === l[0].callId);
|
|
2691
2726
|
return {
|
|
2692
|
-
playUntil:
|
|
2727
|
+
playUntil: b.slice(0, g).filter((h) => h.interceptable && !h.ancestors?.length).slice(-1)[0]?.id
|
|
2693
2728
|
};
|
|
2694
|
-
}), u.emit(
|
|
2695
|
-
}, "start"), r = /* @__PURE__ */
|
|
2696
|
-
let p = this.getLog(m).filter((
|
|
2697
|
-
n(u)({ storyId: m, playUntil: p[
|
|
2698
|
-
}, "back"), o = /* @__PURE__ */
|
|
2699
|
-
let { calls:
|
|
2729
|
+
}), u.emit(ir, { storyId: m, isDebugging: !0 });
|
|
2730
|
+
}, "start"), r = /* @__PURE__ */ i((u) => ({ storyId: m }) => {
|
|
2731
|
+
let p = this.getLog(m).filter((b) => !b.ancestors?.length), l = p.reduceRight((b, g, h) => b >= 0 || g.status === "waiting" ? b : h, -1);
|
|
2732
|
+
n(u)({ storyId: m, playUntil: p[l - 1]?.callId });
|
|
2733
|
+
}, "back"), o = /* @__PURE__ */ i((u) => ({ storyId: m, callId: p }) => {
|
|
2734
|
+
let { calls: l, shadowCalls: b, resolvers: g } = this.getState(m), h = l.find(({ id: d }) => d === p), f = b.find(({ id: d }) => d ===
|
|
2700
2735
|
p);
|
|
2701
2736
|
if (!h && f && Object.values(g).length > 0) {
|
|
2702
|
-
let
|
|
2703
|
-
f.id !==
|
|
2737
|
+
let d = this.getLog(m).find((S) => S.status === "waiting")?.callId;
|
|
2738
|
+
f.id !== d && this.setState(m, { playUntil: f.id }), Object.values(g).forEach((S) => S());
|
|
2704
2739
|
} else
|
|
2705
2740
|
n(u)({ storyId: m, playUntil: p });
|
|
2706
|
-
}, "goto"),
|
|
2741
|
+
}, "goto"), s = /* @__PURE__ */ i((u) => ({ storyId: m }) => {
|
|
2707
2742
|
let { resolvers: p } = this.getState(m);
|
|
2708
2743
|
if (Object.values(p).length > 0)
|
|
2709
|
-
Object.values(p).forEach((
|
|
2744
|
+
Object.values(p).forEach((l) => l());
|
|
2710
2745
|
else {
|
|
2711
|
-
let
|
|
2712
|
-
|
|
2746
|
+
let l = this.getLog(m).find((b) => b.status === "waiting")?.callId;
|
|
2747
|
+
l ? n(u)({ storyId: m, playUntil: l }) : c({ storyId: m });
|
|
2713
2748
|
}
|
|
2714
|
-
}, "next"), c = /* @__PURE__ */
|
|
2749
|
+
}, "next"), c = /* @__PURE__ */ i(({ storyId: u }) => {
|
|
2715
2750
|
this.setState(u, { playUntil: void 0, isDebugging: !1 }), Object.values(this.getState(u).resolvers).forEach((m) => m());
|
|
2716
|
-
}, "end"),
|
|
2751
|
+
}, "end"), a = /* @__PURE__ */ i(({
|
|
2752
|
+
storyId: u,
|
|
2753
|
+
newPhase: m
|
|
2754
|
+
}) => {
|
|
2717
2755
|
let { isDebugging: p } = this.getState(u);
|
|
2718
|
-
|
|
2719
|
-
|
|
2756
|
+
if (m === "preparing" && p)
|
|
2757
|
+
return t({ storyId: u, renderPhase: m });
|
|
2758
|
+
if (m === "playing")
|
|
2759
|
+
return t({ storyId: u, renderPhase: m, isDebugging: p });
|
|
2760
|
+
m === "played" ? this.setState(u, {
|
|
2761
|
+
renderPhase: m,
|
|
2720
2762
|
isLocked: !1,
|
|
2721
2763
|
isPlaying: !1,
|
|
2722
2764
|
isDebugging: !1
|
|
2723
|
-
})
|
|
2765
|
+
}) : m === "errored" ? this.setState(u, {
|
|
2766
|
+
renderPhase: m,
|
|
2724
2767
|
isLocked: !1,
|
|
2725
2768
|
isPlaying: !1
|
|
2726
|
-
})
|
|
2769
|
+
}) : m === "aborted" ? this.setState(u, {
|
|
2770
|
+
renderPhase: m,
|
|
2771
|
+
isLocked: !0,
|
|
2772
|
+
isPlaying: !1
|
|
2773
|
+
}) : this.setState(u, {
|
|
2774
|
+
renderPhase: m
|
|
2775
|
+
}), this.sync(u);
|
|
2727
2776
|
}, "renderPhaseChanged");
|
|
2728
2777
|
qe && qe.ready().then(() => {
|
|
2729
|
-
this.channel = qe.getChannel(), this.channel.on(
|
|
2778
|
+
this.channel = qe.getChannel(), this.channel.on(ir, t), this.channel.on(Gs, a), this.channel.on(Ks, () => {
|
|
2730
2779
|
this.initialized ? this.cleanup() : this.initialized = !0;
|
|
2731
2780
|
}), 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,
|
|
2781
|
+
channel.on(ne.NEXT, s(this.channel)), this.channel.on(ne.END, c);
|
|
2733
2782
|
});
|
|
2734
2783
|
}
|
|
2735
2784
|
getState(t) {
|
|
2736
|
-
return this.state[t] ||
|
|
2785
|
+
return this.state[t] || Mt();
|
|
2737
2786
|
}
|
|
2738
2787
|
setState(t, n) {
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2788
|
+
if (t) {
|
|
2789
|
+
let r = this.getState(t), o = typeof n == "function" ? n(r) : n;
|
|
2790
|
+
this.state = { ...this.state, [t]: { ...r, ...o } }, this.updateParentWindowState();
|
|
2791
|
+
}
|
|
2742
2792
|
}
|
|
2743
2793
|
cleanup() {
|
|
2744
2794
|
this.state = Object.entries(this.state).reduce(
|
|
2745
|
-
(
|
|
2746
|
-
let
|
|
2747
|
-
return
|
|
2795
|
+
(r, [o, s]) => {
|
|
2796
|
+
let c = ur(s);
|
|
2797
|
+
return c && (r[o] = Object.assign(Mt(), c)), r;
|
|
2748
2798
|
},
|
|
2749
2799
|
{}
|
|
2750
2800
|
);
|
|
2751
|
-
let
|
|
2752
|
-
|
|
2801
|
+
let n = { controlStates: {
|
|
2802
|
+
detached: this.detached,
|
|
2803
|
+
start: !1,
|
|
2804
|
+
back: !1,
|
|
2805
|
+
goto: !1,
|
|
2806
|
+
next: !1,
|
|
2807
|
+
end: !1
|
|
2808
|
+
}, logItems: [] };
|
|
2809
|
+
this.channel?.emit(ne.SYNC, n), this.updateParentWindowState();
|
|
2753
2810
|
}
|
|
2754
2811
|
getLog(t) {
|
|
2755
2812
|
let { calls: n, shadowCalls: r } = this.getState(t), o = [...r];
|
|
2756
|
-
n.forEach((c,
|
|
2757
|
-
o[
|
|
2813
|
+
n.forEach((c, a) => {
|
|
2814
|
+
o[a] = c;
|
|
2758
2815
|
});
|
|
2759
|
-
let
|
|
2760
|
-
return o.reduceRight((c,
|
|
2761
|
-
u?.__callId__ &&
|
|
2762
|
-
}),
|
|
2763
|
-
u.__callId__ &&
|
|
2764
|
-
}), (
|
|
2816
|
+
let s = /* @__PURE__ */ new Set();
|
|
2817
|
+
return o.reduceRight((c, a) => (a.args.forEach((u) => {
|
|
2818
|
+
u?.__callId__ && s.add(u.__callId__);
|
|
2819
|
+
}), a.path.forEach((u) => {
|
|
2820
|
+
u.__callId__ && s.add(u.__callId__);
|
|
2821
|
+
}), (a.interceptable || a.exception) && !s.has(a.id) && (c.unshift({ callId: a.id, status: a.status, ancestors: a.ancestors }), s.add(a.
|
|
2765
2822
|
id)), c), []);
|
|
2766
2823
|
}
|
|
2767
2824
|
// Traverses the object structure to recursively patch all function properties.
|
|
2768
2825
|
// Returns the original object, or a new object with the same constructor,
|
|
2769
2826
|
// depending on whether it should mutate.
|
|
2770
2827
|
instrument(t, n, r = 0) {
|
|
2771
|
-
if (!
|
|
2828
|
+
if (!Xs(t))
|
|
2772
2829
|
return t;
|
|
2773
|
-
let { mutate: o = !1, path:
|
|
2830
|
+
let { mutate: o = !1, path: s = [] } = n, c = n.getKeys ? n.getKeys(t, r) : Object.keys(t);
|
|
2774
2831
|
return r += 1, c.reduce(
|
|
2775
|
-
(
|
|
2776
|
-
let m =
|
|
2832
|
+
(a, u) => {
|
|
2833
|
+
let m = vs(t, u);
|
|
2777
2834
|
if (typeof m?.get == "function") {
|
|
2778
2835
|
if (m.configurable) {
|
|
2779
|
-
let
|
|
2780
|
-
Object.defineProperty(
|
|
2781
|
-
get: /* @__PURE__ */
|
|
2836
|
+
let l = /* @__PURE__ */ i(() => m?.get?.bind(t)?.(), "getter");
|
|
2837
|
+
Object.defineProperty(a, u, {
|
|
2838
|
+
get: /* @__PURE__ */ i(() => this.instrument(l(), { ...n, path: s.concat(u) }, r), "get")
|
|
2782
2839
|
});
|
|
2783
2840
|
}
|
|
2784
|
-
return
|
|
2841
|
+
return a;
|
|
2785
2842
|
}
|
|
2786
2843
|
let p = t[u];
|
|
2787
|
-
return typeof p != "function" ? (
|
|
2788
|
-
"function" ? (
|
|
2844
|
+
return typeof p != "function" ? (a[u] = this.instrument(p, { ...n, path: s.concat(u) }, r), a) : "__originalFn__" in p && typeof p.__originalFn__ ==
|
|
2845
|
+
"function" ? (a[u] = p, a) : (a[u] = (...l) => this.track(u, p, t, l, n), a[u].__originalFn__ = p, Object.defineProperty(a[u], "name",
|
|
2789
2846
|
{ value: u, writable: !1 }), Object.keys(p).length > 0 && Object.assign(
|
|
2790
|
-
|
|
2791
|
-
this.instrument({ ...p }, { ...n, path:
|
|
2792
|
-
),
|
|
2847
|
+
a[u],
|
|
2848
|
+
this.instrument({ ...p }, { ...n, path: s.concat(u) }, r)
|
|
2849
|
+
), a);
|
|
2793
2850
|
},
|
|
2794
|
-
o ? t :
|
|
2851
|
+
o ? t : Zs(t)
|
|
2795
2852
|
);
|
|
2796
2853
|
}
|
|
2797
2854
|
// Monkey patch an object method to record calls.
|
|
2798
2855
|
// Returns a function that invokes the original function, records the invocation ("call") and
|
|
2799
2856
|
// returns the original result.
|
|
2800
|
-
track(t, n, r, o,
|
|
2801
|
-
let c = o?.[0]?.__storyId__ ||
|
|
2857
|
+
track(t, n, r, o, s) {
|
|
2858
|
+
let c = o?.[0]?.__storyId__ || Z.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId, { cursor: a, ancestors: u } = this.getState(
|
|
2802
2859
|
c);
|
|
2803
|
-
this.setState(c, { cursor:
|
|
2804
|
-
let m = `${u.slice(-1)[0] || c} [${
|
|
2805
|
-
p) :
|
|
2806
|
-
this.intercept : this.invoke).call(this, n, r, h,
|
|
2807
|
-
return this.instrument(
|
|
2860
|
+
this.setState(c, { cursor: a + 1 });
|
|
2861
|
+
let m = `${u.slice(-1)[0] || c} [${a}] ${t}`, { path: p = [], intercept: l = !1, retain: b = !1 } = s, g = typeof l == "function" ? l(t,
|
|
2862
|
+
p) : l, h = { id: m, cursor: a, storyId: c, ancestors: u, path: p, method: t, args: o, interceptable: g, retain: b }, d = (g && !u.length ?
|
|
2863
|
+
this.intercept : this.invoke).call(this, n, r, h, s);
|
|
2864
|
+
return this.instrument(d, { ...s, mutate: !0, path: [{ __callId__: h.id }] });
|
|
2808
2865
|
}
|
|
2809
2866
|
intercept(t, n, r, o) {
|
|
2810
|
-
let { chainedCallIds:
|
|
2811
|
-
return !c || u ||
|
|
2867
|
+
let { chainedCallIds: s, isDebugging: c, playUntil: a } = this.getState(r.storyId), u = s.has(r.id);
|
|
2868
|
+
return !c || u || a ? (a === r.id && this.setState(r.storyId, { playUntil: void 0 }), this.invoke(t, n, r, o)) : new Promise((m) => {
|
|
2812
2869
|
this.setState(r.storyId, ({ resolvers: p }) => ({
|
|
2813
2870
|
isLocked: !1,
|
|
2814
2871
|
resolvers: { ...p, [r.id]: m }
|
|
2815
2872
|
}));
|
|
2816
2873
|
}).then(() => (this.setState(r.storyId, (m) => {
|
|
2817
|
-
let { [r.id]: p, ...
|
|
2818
|
-
return { isLocked: !0, resolvers:
|
|
2874
|
+
let { [r.id]: p, ...l } = m.resolvers;
|
|
2875
|
+
return { isLocked: !0, resolvers: l };
|
|
2819
2876
|
}), this.invoke(t, n, r, o)));
|
|
2820
2877
|
}
|
|
2821
2878
|
invoke(t, n, r, o) {
|
|
2822
|
-
let { callRefsByResult:
|
|
2823
|
-
if (g.includes(
|
|
2879
|
+
let { callRefsByResult: s, renderPhase: c } = this.getState(r.storyId), a = 25, u = /* @__PURE__ */ i((l, b, g) => {
|
|
2880
|
+
if (g.includes(l))
|
|
2824
2881
|
return "[Circular]";
|
|
2825
|
-
if (g = [...g,
|
|
2882
|
+
if (g = [...g, l], b > a)
|
|
2826
2883
|
return "...";
|
|
2827
|
-
if (
|
|
2828
|
-
return
|
|
2829
|
-
if (
|
|
2830
|
-
return
|
|
2831
|
-
if (
|
|
2832
|
-
return { __date__: { value:
|
|
2833
|
-
if (
|
|
2834
|
-
let { name: h, message: f, stack:
|
|
2835
|
-
return { __error__: { name: h, message: f, stack:
|
|
2884
|
+
if (s.has(l))
|
|
2885
|
+
return s.get(l);
|
|
2886
|
+
if (l instanceof Array)
|
|
2887
|
+
return l.map((h) => u(h, ++b, g));
|
|
2888
|
+
if (l instanceof Date)
|
|
2889
|
+
return { __date__: { value: l.toISOString() } };
|
|
2890
|
+
if (l instanceof Error) {
|
|
2891
|
+
let { name: h, message: f, stack: d } = l;
|
|
2892
|
+
return { __error__: { name: h, message: f, stack: d } };
|
|
2836
2893
|
}
|
|
2837
|
-
if (
|
|
2838
|
-
let { flags: h, source: f } =
|
|
2894
|
+
if (l instanceof RegExp) {
|
|
2895
|
+
let { flags: h, source: f } = l;
|
|
2839
2896
|
return { __regexp__: { flags: h, source: f } };
|
|
2840
2897
|
}
|
|
2841
|
-
if (
|
|
2842
|
-
let { prefix: h, localName: f, id:
|
|
2843
|
-
return { __element__: { prefix: h, localName: f, id:
|
|
2898
|
+
if (l instanceof Z.window?.HTMLElement) {
|
|
2899
|
+
let { prefix: h, localName: f, id: d, classList: S, innerText: _ } = l, O = Array.from(S);
|
|
2900
|
+
return { __element__: { prefix: h, localName: f, id: d, classNames: O, innerText: _ } };
|
|
2844
2901
|
}
|
|
2845
|
-
return typeof
|
|
2846
|
-
__function__: { name: "getMockName" in
|
|
2847
|
-
} : typeof
|
|
2848
|
-
name !== "Object" ? { __class__: { name:
|
|
2849
|
-
Object.entries(
|
|
2850
|
-
) :
|
|
2902
|
+
return typeof l == "function" ? {
|
|
2903
|
+
__function__: { name: "getMockName" in l ? l.getMockName() : l.name }
|
|
2904
|
+
} : typeof l == "symbol" ? { __symbol__: { description: l.description } } : typeof l == "object" && l?.constructor?.name && l?.constructor?.
|
|
2905
|
+
name !== "Object" ? { __class__: { name: l.constructor.name } } : Object.prototype.toString.call(l) === "[object Object]" ? Object.fromEntries(
|
|
2906
|
+
Object.entries(l).map(([h, f]) => [h, u(f, ++b, g)])
|
|
2907
|
+
) : l;
|
|
2851
2908
|
}, "serializeValues"), m = {
|
|
2852
2909
|
...r,
|
|
2853
|
-
args: r.args.map((
|
|
2910
|
+
args: r.args.map((l) => u(l, 0, []))
|
|
2854
2911
|
};
|
|
2855
|
-
r.path.forEach((
|
|
2856
|
-
|
|
2857
|
-
chainedCallIds: new Set(Array.from(
|
|
2912
|
+
r.path.forEach((l) => {
|
|
2913
|
+
l?.__callId__ && this.setState(r.storyId, ({ chainedCallIds: b }) => ({
|
|
2914
|
+
chainedCallIds: new Set(Array.from(b).concat(l.__callId__))
|
|
2858
2915
|
}));
|
|
2859
2916
|
});
|
|
2860
|
-
let p = /* @__PURE__ */
|
|
2861
|
-
if (
|
|
2862
|
-
let { name:
|
|
2863
|
-
showDiff:
|
|
2864
|
-
diff:
|
|
2917
|
+
let p = /* @__PURE__ */ i((l) => {
|
|
2918
|
+
if (l instanceof Error) {
|
|
2919
|
+
let { name: b, message: g, stack: h, callId: f = r.id } = l, {
|
|
2920
|
+
showDiff: d = void 0,
|
|
2921
|
+
diff: S = void 0,
|
|
2865
2922
|
actual: _ = void 0,
|
|
2866
2923
|
expected: O = void 0
|
|
2867
|
-
} =
|
|
2868
|
-
if (this.update({ ...m, status: "error", exception:
|
|
2924
|
+
} = l.name === "AssertionError" ? It(l) : l, y = { name: b, message: g, stack: h, callId: f, showDiff: d, diff: S, actual: _, expected: O };
|
|
2925
|
+
if (this.update({ ...m, status: "error", exception: y }), this.setState(r.storyId, (E) => ({
|
|
2869
2926
|
callRefsByResult: new Map([
|
|
2870
2927
|
...Array.from(E.callRefsByResult.entries()),
|
|
2871
|
-
[
|
|
2928
|
+
[l, { __callId__: r.id, retain: r.retain }]
|
|
2872
2929
|
])
|
|
2873
2930
|
})), r.ancestors?.length)
|
|
2874
|
-
throw Object.prototype.hasOwnProperty.call(
|
|
2931
|
+
throw Object.prototype.hasOwnProperty.call(l, "callId") || Object.defineProperty(l, "callId", { value: r.id }), l;
|
|
2875
2932
|
}
|
|
2876
|
-
throw
|
|
2933
|
+
throw l;
|
|
2877
2934
|
}, "handleException");
|
|
2878
2935
|
try {
|
|
2879
2936
|
if (c === "played" && !r.retain)
|
|
2880
|
-
throw
|
|
2881
|
-
let
|
|
2937
|
+
throw Hs;
|
|
2938
|
+
let b = (o.getArgs ? o.getArgs(r, this.getState(r.storyId)) : r.args).map((h) => typeof h != "function" || ei(h) || Object.keys(h).length ?
|
|
2882
2939
|
h : (...f) => {
|
|
2883
|
-
let { cursor:
|
|
2884
|
-
this.setState(r.storyId, { cursor: 0, ancestors: [...
|
|
2885
|
-
let _ = /* @__PURE__ */
|
|
2940
|
+
let { cursor: d, ancestors: S } = this.getState(r.storyId);
|
|
2941
|
+
this.setState(r.storyId, { cursor: 0, ancestors: [...S, r.id] });
|
|
2942
|
+
let _ = /* @__PURE__ */ i(() => this.setState(r.storyId, { cursor: d, ancestors: S }), "restore"), O = !1;
|
|
2886
2943
|
try {
|
|
2887
|
-
let
|
|
2888
|
-
return
|
|
2944
|
+
let y = h(...f);
|
|
2945
|
+
return y instanceof Promise ? (O = !0, y.finally(_)) : y;
|
|
2889
2946
|
} finally {
|
|
2890
2947
|
O || _();
|
|
2891
2948
|
}
|
|
2892
|
-
}), g = t.apply(n,
|
|
2949
|
+
}), g = t.apply(n, b);
|
|
2893
2950
|
return g && ["object", "function", "symbol"].includes(typeof g) && this.setState(r.storyId, (h) => ({
|
|
2894
2951
|
callRefsByResult: new Map([
|
|
2895
2952
|
...Array.from(h.callRefsByResult.entries()),
|
|
@@ -2899,18 +2956,18 @@ prototype.toString.call(e) === "[object Module]", "isModule"), Zi = /* @__PURE__
|
|
|
2899
2956
|
...m,
|
|
2900
2957
|
status: g instanceof Promise ? "active" : "done"
|
|
2901
2958
|
}), g instanceof Promise ? g.then((h) => (this.update({ ...m, status: "done" }), h), p) : g;
|
|
2902
|
-
} catch (
|
|
2903
|
-
return p(
|
|
2959
|
+
} catch (l) {
|
|
2960
|
+
return p(l);
|
|
2904
2961
|
}
|
|
2905
2962
|
}
|
|
2906
2963
|
// Sends the call info to the manager and synchronizes the log.
|
|
2907
2964
|
update(t) {
|
|
2908
2965
|
this.channel?.emit(ne.CALL, t), this.setState(t.storyId, ({ calls: n }) => {
|
|
2909
|
-
let r = n.concat(t).reduce((o,
|
|
2966
|
+
let r = n.concat(t).reduce((o, s) => Object.assign(o, { [s.id]: s }), {});
|
|
2910
2967
|
return {
|
|
2911
2968
|
// Calls are sorted to ensure parent calls always come before calls in their callback.
|
|
2912
2969
|
calls: Object.values(r).sort(
|
|
2913
|
-
(o,
|
|
2970
|
+
(o, s) => o.id.localeCompare(s.id, void 0, { numeric: !0 })
|
|
2914
2971
|
)
|
|
2915
2972
|
};
|
|
2916
2973
|
}), this.sync(t.storyId);
|
|
@@ -2918,42 +2975,50 @@ prototype.toString.call(e) === "[object Module]", "isModule"), Zi = /* @__PURE__
|
|
|
2918
2975
|
// Builds a log of interceptable calls and control states and sends it to the manager.
|
|
2919
2976
|
// Uses a 0ms debounce because this might get called many times in one tick.
|
|
2920
2977
|
sync(t) {
|
|
2921
|
-
let n = /* @__PURE__ */
|
|
2922
|
-
let { isLocked: r, isPlaying: o } = this.getState(t),
|
|
2923
|
-
status === "waiting")?.callId,
|
|
2924
|
-
if (r ||
|
|
2925
|
-
let
|
|
2926
|
-
|
|
2978
|
+
let n = /* @__PURE__ */ i(() => {
|
|
2979
|
+
let { isLocked: r, isPlaying: o } = this.getState(t), s = this.getLog(t), c = s.filter(({ ancestors: l }) => !l.length).find((l) => l.
|
|
2980
|
+
status === "waiting")?.callId, a = s.some((l) => l.status === "active");
|
|
2981
|
+
if (this.detached || r || a || s.length === 0) {
|
|
2982
|
+
let b = { controlStates: {
|
|
2983
|
+
detached: this.detached,
|
|
2984
|
+
start: !1,
|
|
2985
|
+
back: !1,
|
|
2986
|
+
goto: !1,
|
|
2987
|
+
next: !1,
|
|
2988
|
+
end: !1
|
|
2989
|
+
}, logItems: s };
|
|
2990
|
+
this.channel?.emit(ne.SYNC, b);
|
|
2927
2991
|
return;
|
|
2928
2992
|
}
|
|
2929
|
-
let u =
|
|
2930
|
-
(
|
|
2993
|
+
let u = s.some(
|
|
2994
|
+
(l) => l.status === "done" || l.status === "error"
|
|
2931
2995
|
), p = { controlStates: {
|
|
2996
|
+
detached: this.detached,
|
|
2932
2997
|
start: u,
|
|
2933
2998
|
back: u,
|
|
2934
2999
|
goto: !0,
|
|
2935
3000
|
next: o,
|
|
2936
3001
|
end: o
|
|
2937
|
-
}, logItems:
|
|
3002
|
+
}, logItems: s, pausedAt: c };
|
|
2938
3003
|
this.channel?.emit(ne.SYNC, p);
|
|
2939
3004
|
}, "synchronize");
|
|
2940
3005
|
this.setState(t, ({ syncTimeout: r }) => (clearTimeout(r), { syncTimeout: setTimeout(n, 0) }));
|
|
2941
3006
|
}
|
|
2942
3007
|
};
|
|
2943
|
-
|
|
2944
|
-
var
|
|
2945
|
-
function
|
|
3008
|
+
i(xt, "Instrumenter");
|
|
3009
|
+
var Lt = xt;
|
|
3010
|
+
function Qs(e, t = {}) {
|
|
2946
3011
|
try {
|
|
2947
3012
|
let n = !1, r = !1;
|
|
2948
|
-
return
|
|
2949
|
-
!0),
|
|
2950
|
-
new
|
|
3013
|
+
return Z.window?.location?.search?.includes("instrument=true") ? n = !0 : Z.window?.location?.search?.includes("instrument=false") && (r =
|
|
3014
|
+
!0), Z.window?.parent === Z.window && !n || r ? e : (Z.window && !Z.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ && (Z.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ =
|
|
3015
|
+
new Lt()), (Z.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).instrument(e, t));
|
|
2951
3016
|
} catch (n) {
|
|
2952
|
-
return
|
|
3017
|
+
return qs.warn(n), e;
|
|
2953
3018
|
}
|
|
2954
3019
|
}
|
|
2955
|
-
|
|
2956
|
-
function
|
|
3020
|
+
i(Qs, "instrument");
|
|
3021
|
+
function vs(e, t) {
|
|
2957
3022
|
let n = e;
|
|
2958
3023
|
for (; n != null; ) {
|
|
2959
3024
|
let r = Object.getOwnPropertyDescriptor(n, t);
|
|
@@ -2962,16 +3027,16 @@ function es(e, t) {
|
|
|
2962
3027
|
n = Object.getPrototypeOf(n);
|
|
2963
3028
|
}
|
|
2964
3029
|
}
|
|
2965
|
-
|
|
2966
|
-
function
|
|
3030
|
+
i(vs, "getPropertyDescriptor");
|
|
3031
|
+
function ei(e) {
|
|
2967
3032
|
if (typeof e != "function")
|
|
2968
3033
|
return !1;
|
|
2969
3034
|
let t = Object.getOwnPropertyDescriptor(e, "prototype");
|
|
2970
3035
|
return t ? !t.writable : !1;
|
|
2971
3036
|
}
|
|
2972
|
-
|
|
3037
|
+
i(ei, "isClass");
|
|
2973
3038
|
export {
|
|
2974
|
-
|
|
3039
|
+
Vs as CallStates,
|
|
2975
3040
|
ne as EVENTS,
|
|
2976
|
-
|
|
3041
|
+
Qs as instrument
|
|
2977
3042
|
};
|