@flemist/simple-utils 2.1.5 → 2.1.7

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.
Files changed (49) hide show
  1. package/build/browser/index.cjs +1 -1
  2. package/build/browser/index.mjs +178 -146
  3. package/build/common/async/Locker.d.ts +28 -0
  4. package/build/common/async/index.d.ts +2 -0
  5. package/build/common/async/promise.d.ts +7 -0
  6. package/build/common/cache/Cache.d.ts +46 -0
  7. package/build/common/cache/CacheStats.d.ts +20 -0
  8. package/build/common/cache/MemoryStorage.d.ts +11 -0
  9. package/build/common/cache/getHashKey.d.ts +1 -0
  10. package/build/common/cache/getJsonKey.d.ts +1 -0
  11. package/build/common/cache/index.d.ts +6 -0
  12. package/build/common/cache/types.d.ts +28 -0
  13. package/build/common/converter/converterBufferToGzip.d.ts +4 -0
  14. package/build/common/converter/converterErrorToBuffer.d.ts +2 -0
  15. package/build/common/converter/converterErrorToGzip.d.ts +4 -0
  16. package/build/common/converter/converterJson.d.ts +2 -0
  17. package/build/common/converter/converterJsonBuffer.d.ts +2 -0
  18. package/build/common/converter/converterJsonGzip.d.ts +4 -0
  19. package/build/common/converter/converterStringToBuffer.d.ts +2 -0
  20. package/build/common/converter/helpers.d.ts +13 -0
  21. package/build/common/converter/index.d.ts +11 -0
  22. package/build/common/converter/mapObjectConverter.d.ts +2 -0
  23. package/build/common/converter/setArrayConverter.d.ts +2 -0
  24. package/build/common/converter/types.d.ts +41 -0
  25. package/build/common/gzip/compressGzip.d.ts +35 -0
  26. package/build/common/gzip/decompressGzip.d.ts +2 -0
  27. package/build/common/gzip/index.d.ts +2 -0
  28. package/build/common/index.cjs +1 -1
  29. package/build/common/index.d.ts +3 -0
  30. package/build/common/index.mjs +178 -146
  31. package/build/common/string/index.d.ts +1 -1
  32. package/build/node/cache/FileStatStorage.d.ts +23 -0
  33. package/build/node/cache/FileStorage.d.ts +29 -0
  34. package/build/node/cache/createConverterSubPath.d.ts +12 -0
  35. package/build/node/cache/createFileCacheOptions.d.ts +17 -0
  36. package/build/node/cache/generateTempFileName.d.ts +1 -0
  37. package/build/node/cache/index.d.ts +6 -0
  38. package/build/node/cache/writeFileThroughTmp.d.ts +2 -0
  39. package/build/node/fs/index.d.ts +1 -0
  40. package/build/node/fs/readDirRecursive.d.ts +6 -0
  41. package/build/node/index.cjs +8 -8
  42. package/build/node/index.d.ts +1 -0
  43. package/build/node/index.mjs +1000 -701
  44. package/build/urlGet-BtyqjC2r.mjs +2452 -0
  45. package/build/urlGet-BukRa7Gq.js +17 -0
  46. package/package.json +37 -38
  47. package/build/common/time/dateToString.d.ts +0 -2
  48. package/build/urlGet-CerQ1cKh.js +0 -17
  49. package/build/urlGet-DZEwtNXt.mjs +0 -2000
@@ -1,56 +1,75 @@
1
- import { V as bt, S as gt, F as Et } from "../urlGet-DZEwtNXt.mjs";
2
- import { ac as Se, M as xe, W as ke, X as Oe, P as Te, aj as Pe, a2 as Ce, a3 as Ae, b5 as je, b6 as De, b7 as Le, b8 as Me, b9 as Ie, ba as Fe, bb as Re, bk as _e, bc as $e, bd as Ne, be as We, bf as ve, bg as Be, bh as ze, bi as Je, bj as Ue, R as Ge, $ as He, a0 as Ve, U as Ke, L as qe, H as Ye, a6 as Xe, ad as Qe, ae as Ze, K as tr, I as er, N as rr, q as nr, aa as sr, a9 as ar, a8 as or, Z as ir, l as cr, o as lr, B as ur, C as fr, D as hr, E as dr, z as mr, A as wr, a5 as yr, ag as pr, af as br, Q as gr, u as Er, v as Sr, w as xr, J as kr, p as Or, x as Tr, d as Pr, g as Cr, a4 as Ar, _ as jr, ab as Dr, aH as Lr, aJ as Mr, am as Ir, ak as Fr, b4 as Rr, al as _r, ap as $r, aL as Nr, aO as Wr, aD as vr, aC as Br, aq as zr, aZ as Jr, ax as Ur, aY as Gr, av as Hr, aX as Vr, aA as Kr, au as qr, a_ as Yr, as as Xr, ar as Qr, ao as Zr, b1 as tn, aF as en, aE as rn, at as nn, aw as sn, aR as an, aS as on, aT as cn, aV as ln, aP as un, aW as fn, ay as hn, aU as dn, aQ as mn, aN as wn, aK as yn, aG as pn, aI as bn, a$ as gn, b0 as En, an as Sn, ah as xn, ai as kn, az as On, aM as Tn, aB as Pn, b2 as Cn, b3 as An, b as jn, m as Dn, c as Ln, n as Mn, f as In, k as Fn, r as Rn, h as _n, e as $n, i as Nn, j as Wn, G as vn, a as Bn, s as zn, T as Jn, t as Un, y as Gn, bq as Hn, bs as Vn, br as Kn, bl as qn, bp as Yn, bm as Xn, bo as Qn, bn as Zn, a7 as ts, a1 as es, O as rs, Y as ns } from "../urlGet-DZEwtNXt.mjs";
3
- import { Locker as St, useAbortController as xt, combineAbortSignals as tt, delay as it } from "@flemist/async-utils";
4
- import { Pool as kt, poolRunWait as $ } from "@flemist/time-limits";
5
- import Ot from "node:os";
6
- import * as M from "path";
7
- import ct from "path";
8
- import { priorityCreate as B } from "@flemist/priority-queue";
9
- import * as I from "fs";
10
- import Tt from "picomatch";
11
- import { spawn as U } from "child_process";
12
- import { AbortControllerFast as lt, AbortError as nt } from "@flemist/abort-controller-fast";
13
- import { createTestVariants as Pt } from "@flemist/test-variants";
14
- const et = new kt(Ot.cpus().length);
15
- function N(t) {
16
- return t.replace(/\\/g, "/");
1
+ import { at as ut, aq as St, v as xt, s as Ot, a as Tt, am as Ct, ak as _t, a8 as kt } from "../urlGet-BtyqjC2r.mjs";
2
+ import { C as Le, b as Fe, aI as Ie, af as Re, an as Ne, ao as $e, ap as We, ai as ze, aP as Be, ay as Je, az as Ue, bB as Ge, bC as Ke, bD as He, bE as Ve, bF as Ye, bG as qe, bH as Xe, bQ as Qe, bI as Ze, bJ as tr, bK as er, bL as rr, bM as sr, bN as nr, bO as ar, bP as or, M as ir, R as cr, av as lr, aw as ur, U as fr, ae as hr, aa as dr, aC as mr, aJ as pr, aK as wr, B as yr, ad as br, ab as gr, ag as Er, Y as Sr, u as xr, o as Or, q as Tr, p as Cr, r as _r, aG as kr, aF as vr, aE as Pr, as as Dr, V as Ar, W as Mr, E as jr, a4 as Lr, a5 as Fr, a6 as Ir, a7 as Rr, Z as Nr, _ as $r, aB as Wr, aM as zr, aL as Br, aj as Jr, $ as Ur, a0 as Gr, a1 as Kr, ac as Hr, X as Vr, g as Yr, a2 as qr, K as Xr, J as Qr, D as Zr, aA as ts, au as es, w as rs, aH as ss, bb as ns, bd as as, aS as os, aQ as is, bA as cs, aR as ls, aV as us, bf as fs, bi as hs, b7 as ds, b6 as ms, aW as ps, bt as ws, b1 as ys, bs, a$ as gs, br as Es, b4 as Ss, a_ as xs, bu as Os, aY as Ts, aX as Cs, aU as _s, bx as ks, b9 as vs, b8 as Ps, aZ as Ds, b0 as As, bl as Ms, bm as js, bn as Ls, bp as Fs, bj as Is, bq as Rs, b2 as Ns, bo as $s, bk as Ws, bh as zs, be as Bs, ba as Js, bc as Us, bv as Gs, bw as Ks, aT as Hs, aN as Vs, aO as Ys, b3 as qs, bg as Xs, b5 as Qs, by as Zs, bz as tn, G as en, F as rn, H as sn, I as nn, O as an, T as on, L as cn, P as ln, N as un, Q as fn, S as hn, x as dn, a9 as mn, z as pn, y as wn, al as yn, k as bn, j as gn, e as En, d as Sn, n as xn, m as On, l as Tn, i as Cn, h as _n, f as kn, c as vn, t as Pn, A as Dn, a3 as An, bW as Mn, bY as jn, bX as Ln, bR as Fn, bV as In, bS as Rn, bU as Nn, bT as $n, aD as Wn, ax as zn, ah as Bn, ar as Jn } from "../urlGet-BtyqjC2r.mjs";
3
+ import * as v from "path";
4
+ import I from "path";
5
+ import { Pool as vt, poolRunWait as A } from "@flemist/time-limits";
6
+ import Pt from "node:os";
7
+ import * as D from "fs";
8
+ import $ from "fs";
9
+ import { priorityCreate as U } from "@flemist/priority-queue";
10
+ import { useAbortController as Dt, combineAbortSignals as rt, delay as ft } from "@flemist/async-utils";
11
+ import At from "picomatch";
12
+ import { spawn as K } from "child_process";
13
+ import { AbortControllerFast as ht, AbortError as nt } from "@flemist/abort-controller-fast";
14
+ import { createTestVariants as Mt } from "@flemist/test-variants";
15
+ const R = new vt(Pt.cpus().length);
16
+ async function jt(t, e, s, n) {
17
+ t = I.resolve(t), e = I.resolve(e), await A({
18
+ pool: n ?? R,
19
+ count: 1,
20
+ func: async () => {
21
+ let r = !1;
22
+ try {
23
+ await ut([
24
+ $.promises.mkdir(I.dirname(t), { recursive: !0 }),
25
+ (async () => {
26
+ await $.promises.mkdir(I.dirname(e), { recursive: !0 }), await $.promises.writeFile(e, s), r = !0;
27
+ })()
28
+ ]), await $.promises.rename(e, t);
29
+ } catch (a) {
30
+ throw r && await $.promises.unlink(e).catch(() => {
31
+ }), a;
32
+ }
33
+ }
34
+ });
35
+ }
36
+ function Lt() {
37
+ return `${Date.now().toString(36)}${Math.random().toString(36).substring(2)}.tmp`;
17
38
  }
18
- let J = null;
19
- function Ct(t) {
20
- J == null && (J = /* @__PURE__ */ new Map());
21
- const e = N(t);
22
- let n = J.get(e);
23
- return n == null && (n = new St(), J.set(e, n)), n;
39
+ function F(t) {
40
+ return t.replace(/[\\/]+/g, "/");
24
41
  }
25
- function oe(t) {
26
- const { filePath: e, func: n } = t;
27
- return Ct(e).lock(
28
- () => $({
29
- pool: et,
42
+ const Ft = new St();
43
+ function be(t) {
44
+ const { filePath: e, func: s } = t;
45
+ return Ft.lock(
46
+ F(e),
47
+ () => A({
48
+ pool: R,
30
49
  count: 1,
31
- func: n
50
+ func: s
32
51
  })
33
52
  );
34
53
  }
35
- function At(t) {
54
+ function It(t) {
36
55
  return t.match(/^[/\\]?[^/\\]+/)[0];
37
56
  }
38
- function jt(t, e) {
39
- return At(t) + "|" + e.ino;
57
+ function Rt(t, e) {
58
+ return It(t) + "|" + e.ino;
40
59
  }
41
- function Dt(t) {
42
- return t.endsWith(":") && (t += "/"), M.resolve(t);
60
+ function Nt(t) {
61
+ return t.endsWith(":") && (t += "/"), v.resolve(t);
43
62
  }
44
- function st(t, e) {
63
+ function at(t, e) {
45
64
  t.totalSize += e.totalSize, t.maxFileDateModified = Math.max(
46
65
  t.maxFileDateModified,
47
66
  e.maxFileDateModified
48
67
  ), t.countFiles += e.countFiles, t.countDirs += e.countDirs, t.countLinks += e.countLinks;
49
68
  }
50
- const Lt = function(e) {
69
+ const $t = function(e) {
51
70
  return e.code === "ENOENT";
52
71
  };
53
- function ut(t) {
72
+ function dt(t) {
54
73
  const e = t.paths;
55
74
  if (!e || e.length === 0)
56
75
  return Promise.resolve({
@@ -60,148 +79,148 @@ function ut(t) {
60
79
  countDirs: 0,
61
80
  countLinks: 0
62
81
  });
63
- const n = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), r = t.abortSignal, a = t.pool ?? et, o = t.handleError, i = t.priority ?? B(0), h = t.walkLinks ?? !1, l = t.log, g = t.handlePath, d = t.matchPath;
64
- async function f(u) {
65
- if (!(o && await o(u)) && !Lt(u))
66
- throw u;
82
+ const s = t.level ?? 0, n = t.walkedIds ?? /* @__PURE__ */ new Set(), r = t.abortSignal, a = t.pool ?? R, o = t.handleError, i = t.priority ?? U(0), c = t.walkLinks ?? !1, l = t.log, g = t.handlePath, d = t.matchPath;
83
+ async function h(f) {
84
+ if (!(o && await o(f)) && !$t(f))
85
+ throw f;
67
86
  }
68
- function x(u) {
69
- return !(!l || l.minTotalContentSize != null && u < l.minTotalContentSize || l.maxNestedLevel != null && n > l.maxNestedLevel);
87
+ function x(f) {
88
+ return !(!l || l.minTotalContentSize != null && f < l.minTotalContentSize || l.maxNestedLevel != null && s > l.maxNestedLevel);
70
89
  }
71
- return xt(async (u) => {
72
- const m = tt(r, u), w = {
90
+ return Dt(async (f) => {
91
+ const m = rt(r, f), p = {
73
92
  totalSize: 0,
74
93
  maxFileDateModified: 0,
75
94
  countFiles: 0,
76
95
  countDirs: 0,
77
96
  countLinks: 0
78
97
  };
79
- function P(y, T) {
80
- if (x(T.totalSize)) {
81
- const k = `${T.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${y}`;
82
- l?.handleLog ? l.handleLog(k) : console.log(k);
98
+ function _(w, C) {
99
+ if (x(C.totalSize)) {
100
+ const O = `${C.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${w}`;
101
+ l?.handleLog ? l.handleLog(O) : console.log(O);
83
102
  }
84
103
  }
85
- async function c(y, T, S, k) {
86
- return g ? await $({
104
+ async function u(w, C, S, O) {
105
+ return g ? await A({
87
106
  pool: a,
88
107
  func: async () => {
89
108
  try {
90
109
  return await g({
91
- level: n,
92
- path: y,
93
- stat: T,
110
+ level: s,
111
+ path: w,
112
+ stat: C,
94
113
  itemStat: S,
95
- totalStat: w,
114
+ totalStat: p,
96
115
  abortSignal: m
97
116
  });
98
- } catch (O) {
99
- return await f(O), !1;
117
+ } catch (T) {
118
+ return await h(T), !1;
100
119
  }
101
120
  },
102
121
  count: 1,
103
- priority: k,
122
+ priority: O,
104
123
  abortSignal: m
105
124
  }) : !0;
106
125
  }
107
- async function p(y, T, S, k) {
108
- k || (k = y);
109
- const O = await $({
126
+ async function y(w, C, S, O) {
127
+ O || (O = w);
128
+ const T = await A({
110
129
  pool: a,
111
- func: () => I.promises.lstat(y).catch(f),
130
+ func: () => D.promises.lstat(w).catch(h),
112
131
  count: 1,
113
- priority: B(T, B(1, i)),
132
+ priority: U(C, U(1, i)),
114
133
  abortSignal: m
115
134
  });
116
- if (!O || !S && O.isFile())
135
+ if (!T || !S && T.isFile())
117
136
  return null;
118
- const A = jt(y, O);
119
- if (s.has(A))
137
+ const P = Rt(w, T);
138
+ if (n.has(P))
120
139
  return null;
121
- s.add(A);
140
+ n.add(P);
122
141
  let b = {
123
- totalSize: O.size,
124
- maxFileDateModified: O.isDirectory() ? 0 : O.mtimeMs,
142
+ totalSize: T.size,
143
+ maxFileDateModified: T.isDirectory() ? 0 : T.mtimeMs,
125
144
  countFiles: 0,
126
145
  countDirs: 0,
127
146
  countLinks: 0
128
147
  };
129
- const j = B(
130
- T,
131
- B(O.isDirectory() ? 2 : 3, i)
148
+ const M = U(
149
+ C,
150
+ U(T.isDirectory() ? 2 : 3, i)
132
151
  );
133
- if (O.isSymbolicLink()) {
134
- if (h) {
135
- const C = await $({
152
+ if (T.isSymbolicLink()) {
153
+ if (c) {
154
+ const k = await A({
136
155
  pool: a,
137
- func: () => I.promises.readlink(y).catch(f).then((L) => L ?? null),
156
+ func: () => D.promises.readlink(w).catch(h).then((L) => L ?? null),
138
157
  count: 1,
139
- priority: j,
158
+ priority: M,
140
159
  abortSignal: m
141
160
  });
142
- if (C) {
143
- const L = M.isAbsolute(C) ? C : M.resolve(M.dirname(k), C), F = await p(
161
+ if (k) {
162
+ const L = v.isAbsolute(k) ? k : v.resolve(v.dirname(O), k), N = await y(
144
163
  L,
145
- T,
164
+ C,
146
165
  S,
147
- k
166
+ O
148
167
  );
149
- F && (b = F);
168
+ N && (b = N);
150
169
  }
151
170
  }
152
- return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (b.countLinks += 1, await c(
153
- k,
171
+ return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (b.countLinks += 1, await u(
154
172
  O,
173
+ T,
155
174
  b,
156
- j
157
- ) && (st(w, b), P(k, b))), b;
158
- } else if (O.isDirectory()) {
159
- const C = await $({
175
+ M
176
+ ) && (at(p, b), _(O, b))), b;
177
+ } else if (T.isDirectory()) {
178
+ const k = await A({
160
179
  pool: a,
161
- func: () => I.promises.readdir(y).catch(f),
180
+ func: () => D.promises.readdir(w).catch(h),
162
181
  count: 1,
163
182
  priority: i,
164
183
  abortSignal: m
165
184
  });
166
- if (C) {
167
- for (let L = 0, F = C.length; L < F; L++)
168
- C[L] = M.join(k, C[L]);
169
- b = await ut({
185
+ if (k) {
186
+ for (let L = 0, N = k.length; L < N; L++)
187
+ k[L] = v.join(O, k[L]);
188
+ b = await dt({
170
189
  ...t,
171
- paths: C,
190
+ paths: k,
172
191
  abortSignal: m,
173
- priority: j,
174
- level: n + 1,
175
- walkedIds: s
192
+ priority: M,
193
+ level: s + 1,
194
+ walkedIds: n
176
195
  });
177
196
  }
178
197
  }
179
- return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (O.isDirectory() ? b.countDirs += 1 : O.isFile() && (b.countFiles += 1), await c(
180
- k,
198
+ return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (T.isDirectory() ? b.countDirs += 1 : T.isFile() && (b.countFiles += 1), await u(
181
199
  O,
200
+ T,
182
201
  b,
183
- j
184
- ) && (st(w, b), P(k, b))), b;
202
+ M
203
+ ) && (at(p, b), _(O, b))), b;
185
204
  }
186
205
  const E = [];
187
- for (let y = 0, T = e.length; y < T; y++) {
188
- const S = Dt(e[y]), k = d ? d(S) : !0;
189
- k !== !1 && E.push(p(S, y, k));
206
+ for (let w = 0, C = e.length; w < C; w++) {
207
+ const S = Nt(e[w]), O = d ? d(S) : !0;
208
+ O !== !1 && E.push(y(S, w, O));
190
209
  }
191
- return await Promise.all(E), w;
210
+ return await Promise.all(E), p;
192
211
  });
193
212
  }
194
- function ie(t) {
195
- return ut(t);
213
+ function ge(t) {
214
+ return dt(t);
196
215
  }
197
- function ce({
216
+ function Ee({
198
217
  globs: t,
199
218
  rootDir: e,
200
- noCase: n
219
+ noCase: s
201
220
  }) {
202
- const s = [];
221
+ const n = [];
203
222
  return t.forEach((r) => {
204
- r = N(r).trim();
223
+ r = F(r).trim();
205
224
  const a = r.startsWith("^");
206
225
  a && (r = r.substring(1).trim());
207
226
  const o = r.startsWith("!");
@@ -210,13 +229,13 @@ function ce({
210
229
  `Invalid glob pattern: "${r}". The syntax '${r.substring(0, 2)}' is not supported. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class), ! (negate pattern), ^ (exclude if included). Examples of valid patterns: "*.js", "src/**/*.ts", "!node_modules", "^dist". Avoid starting with '!' after '^' or multiple special prefixes.`
211
230
  );
212
231
  r.startsWith("/") && (r = "." + r);
213
- const i = N(e ? M.resolve(e, r) : r);
232
+ const i = F(e ? v.resolve(e, r) : r);
214
233
  if (!i)
215
234
  return;
216
- let h;
235
+ let c;
217
236
  try {
218
- h = Tt(i, {
219
- nocase: n ?? !1,
237
+ c = At(i, {
238
+ nocase: s ?? !1,
220
239
  dot: !0,
221
240
  strictBrackets: !0
222
241
  // Validate bracket balance for patterns like "["
@@ -226,99 +245,340 @@ function ce({
226
245
  `Invalid glob pattern: "${r}". ${l instanceof Error ? l.message : "Unknown error"}. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class with balanced brackets), ! (negate pattern), ^ (exclude if included). Examples: "*.js", "src/**/*.ts", "!node_modules", "[abc]def.txt". Ensure all brackets [ ] are properly closed and balanced.`
227
246
  );
228
247
  }
229
- s.push({
248
+ n.push({
230
249
  exclude: a,
231
250
  negative: o,
232
251
  debugInfo: i,
233
- match: h
252
+ match: c
234
253
  });
235
254
  }), function(a) {
236
- a = N(a);
255
+ a = F(a);
237
256
  let o = null, i = !1;
238
- for (let h = 0, l = s.length; h < l; h++) {
239
- const g = s[h];
257
+ for (let c = 0, l = n.length; c < l; c++) {
258
+ const g = n[c];
240
259
  g.match(a) && (g.exclude ? i = !g.negative : (o = !g.negative, i = !1));
241
260
  }
242
261
  return i ? !1 : o;
243
262
  };
244
263
  }
245
- function Mt(t) {
264
+ function Wt(t) {
246
265
  const e = t.startsWith("!");
247
266
  return e && (t = t.substring(1)), t.startsWith("/") ? t = t.substring(1) : !t.startsWith("**") && !t.startsWith("../") && (t = `**/${t}`), e && (t = "!" + t), t;
248
267
  }
249
- function It(t, e) {
268
+ function zt(t, e) {
250
269
  if (!e || e === ".")
251
270
  return t;
252
- const n = t.startsWith("^");
253
- n && (t = t.substring(1));
254
- const s = t.startsWith("!");
255
- return s && (t = t.substring(1)), t.startsWith("/") ? (e.endsWith("/") && (e = e.substring(0, e.length - 1)), t = e + t) : (e.endsWith("/") || (e += "/"), t.startsWith("./") ? t = e + t.substring(2) : t.startsWith("../") ? t = e + t : (e.startsWith("..") && (e = ""), t.startsWith("**") ? t = e + t : t = e + "**/" + t)), t = N(M.normalize(t)), s && (t = "!" + t), n && (t = "^" + t), t;
271
+ const s = t.startsWith("^");
272
+ s && (t = t.substring(1));
273
+ const n = t.startsWith("!");
274
+ return n && (t = t.substring(1)), t.startsWith("/") ? (e.endsWith("/") && (e = e.substring(0, e.length - 1)), t = e + t) : (e.endsWith("/") || (e += "/"), t.startsWith("./") ? t = e + t.substring(2) : t.startsWith("../") ? t = e + t : (e.startsWith("..") && (e = ""), t.startsWith("**") ? t = e + t : t = e + "**/" + t)), t = F(v.normalize(t)), n && (t = "!" + t), s && (t = "^" + t), t;
256
275
  }
257
- function at(t) {
276
+ function ot(t) {
258
277
  return "^" + t;
259
278
  }
260
- async function Ft(t) {
261
- const n = (await I.promises.readFile(t, "utf-8")).split(`
262
- `), s = [];
263
- return n.forEach((r) => {
264
- r = r.trim(), !(!r || r.startsWith("#")) && s.push(r);
265
- }), s;
279
+ async function Bt(t) {
280
+ const s = (await D.promises.readFile(t, "utf-8")).split(`
281
+ `), n = [];
282
+ return s.forEach((r) => {
283
+ r = r.trim(), !(!r || r.startsWith("#")) && n.push(r);
284
+ }), n;
266
285
  }
267
- async function le(t) {
268
- const e = t.rootDir ?? ".", n = [];
286
+ async function Se(t) {
287
+ const e = t.rootDir ?? ".", s = [];
269
288
  if (!t.globs?.length)
270
- return n;
271
- const s = [];
289
+ return s;
290
+ const n = [];
272
291
  return t.globs.forEach((r) => {
273
- r.value && (r.valueType === "file-contains-patterns" ? s.push(r) : r.valueType === "pattern" && n.push(r.exclude ? at(r.value) : r.value));
274
- }), s.length && await Promise.all(
275
- s.map(async (r) => {
276
- await $({
277
- pool: et,
292
+ r.value && (r.valueType === "file-contains-patterns" ? n.push(r) : r.valueType === "pattern" && s.push(r.exclude ? ot(r.value) : r.value));
293
+ }), n.length && await Promise.all(
294
+ n.map(async (r) => {
295
+ await A({
296
+ pool: R,
278
297
  count: 1,
279
298
  func: async () => {
280
- const a = M.resolve(e, r.value), o = await Ft(a), i = M.relative(e, M.dirname(a));
281
- o.forEach((h) => {
282
- h = Mt(h), h = It(h, i), n.push(r.exclude ? at(h) : h);
299
+ const a = v.resolve(e, r.value), o = await Bt(a), i = v.relative(e, v.dirname(a));
300
+ o.forEach((c) => {
301
+ c = Wt(c), c = zt(c, i), s.push(r.exclude ? ot(c) : c);
283
302
  });
284
303
  }
285
304
  });
286
305
  })
287
- ), n;
306
+ ), s;
307
+ }
308
+ function Jt(t, e) {
309
+ return A({
310
+ pool: e ?? R,
311
+ count: 1,
312
+ func: () => D.promises.readdir(t, { withFileTypes: !0 })
313
+ });
314
+ }
315
+ async function Ut(t, e) {
316
+ const s = [];
317
+ async function n(r, a) {
318
+ let o;
319
+ try {
320
+ o = await Jt(r, e);
321
+ } catch (c) {
322
+ if (a !== "" && c.code === "ENOENT")
323
+ return;
324
+ throw c;
325
+ }
326
+ let i = null;
327
+ o.forEach((c) => {
328
+ const l = v.join(a, c.name);
329
+ s.push([F(l), c]), c.isDirectory() && (i == null && (i = []), i.push(
330
+ n(v.join(r, c.name), l)
331
+ ));
332
+ }), i != null && await Promise.all(i);
333
+ }
334
+ return await n(t, ""), s;
335
+ }
336
+ class it {
337
+ _options;
338
+ constructor(e) {
339
+ this._options = e;
340
+ }
341
+ get options() {
342
+ return this._options;
343
+ }
344
+ async set(e, s) {
345
+ const n = this._options.converterSubPath.to(e), r = v.join(this._options.dir, n), a = this._options.getTempFileName ? this._options.getTempFileName(e) : Lt(), o = v.join(this._options.tmpDir, a);
346
+ await jt(r, o, s, this._options.pool);
347
+ }
348
+ async get(e) {
349
+ const s = this._options.converterSubPath.to(e), n = v.join(this._options.dir, s);
350
+ try {
351
+ const r = await A({
352
+ pool: this._options.pool ?? R,
353
+ count: 1,
354
+ func: () => D.promises.readFile(n)
355
+ });
356
+ return new Uint8Array(r);
357
+ } catch (r) {
358
+ if (r.code === "ENOENT")
359
+ return;
360
+ throw r;
361
+ }
362
+ }
363
+ async delete(e) {
364
+ const s = this._options.converterSubPath.to(e), n = v.join(this._options.dir, s);
365
+ try {
366
+ await A({
367
+ pool: this._options.pool ?? R,
368
+ count: 1,
369
+ func: () => D.promises.unlink(n)
370
+ });
371
+ } catch (r) {
372
+ if (r.code === "ENOENT")
373
+ return;
374
+ throw r;
375
+ }
376
+ }
377
+ async clear() {
378
+ const e = await this.getKeys();
379
+ await ut(e.map((s) => this.delete(s)));
380
+ }
381
+ async getKeys() {
382
+ try {
383
+ const e = await Ut(
384
+ this._options.dir,
385
+ this._options.pool
386
+ ), s = [];
387
+ return e.forEach(([n, r]) => {
388
+ if (!r.isFile())
389
+ return;
390
+ const a = this._options.converterSubPath.from(n);
391
+ a != null && s.push(a);
392
+ }), s;
393
+ } catch (e) {
394
+ if (e.code === "ENOENT")
395
+ return [];
396
+ throw e;
397
+ }
398
+ }
288
399
  }
289
- function Rt(t, e = {}) {
290
- return new Promise((n, s) => {
291
- const r = U(t, {
400
+ function ct(t) {
401
+ const e = t.prefix ? F(t.prefix) : "", s = t.suffix ? F(t.suffix) : "", n = t.splitKeyLetters ?? 0;
402
+ return {
403
+ to(r) {
404
+ if (n <= 0)
405
+ return F(e + r + s);
406
+ const a = Math.min(n, r.length);
407
+ let o = e;
408
+ for (let i = 0; i < a; i++)
409
+ o += (i === 0 ? "" : "/") + r[i];
410
+ return a < r.length && (o += (a === 0 ? "" : "/") + r.slice(a)), F(o + s);
411
+ },
412
+ from(r) {
413
+ return n <= 0 ? !r.startsWith(e) || !r.endsWith(s) ? null : r.slice(e.length, r.length - s.length) : !r.startsWith(e) || !r.endsWith(s) ? null : r.slice(e.length, r.length - s.length).replace(/\//g, "");
414
+ }
415
+ };
416
+ }
417
+ class Gt {
418
+ _options;
419
+ _entries = /* @__PURE__ */ new Map();
420
+ _entriesLoaded = !1;
421
+ constructor(e) {
422
+ this._options = e;
423
+ }
424
+ async set(e, s) {
425
+ const n = s.hasError ? this._options.storages.error : this._options.storages.value, r = n.options.converterSubPath.to(e), a = I.resolve(n.options.dir, r);
426
+ await A({
427
+ pool: this._options.pool ?? R,
428
+ count: 1,
429
+ func: async () => {
430
+ await $.promises.utimes(
431
+ a,
432
+ s.dateUsed / 1e3,
433
+ s.dateModified / 1e3
434
+ ), this._entries.set(e, s);
435
+ }
436
+ });
437
+ }
438
+ async get(e) {
439
+ const s = this._options.storages.value.options.converterSubPath.to(e), n = this._options.storages.error.options.converterSubPath.to(e), r = I.resolve(
440
+ this._options.storages.value.options.dir,
441
+ s
442
+ ), a = I.resolve(
443
+ this._options.storages.error.options.dir,
444
+ n
445
+ );
446
+ return await A({
447
+ pool: this._options.pool ?? R,
448
+ count: 1,
449
+ func: async () => {
450
+ const [o, i] = await Promise.all([
451
+ $.promises.stat(r).catch((c) => {
452
+ if (c.code === "ENOENT")
453
+ return null;
454
+ throw c;
455
+ }),
456
+ $.promises.stat(a).catch((c) => {
457
+ if (c.code === "ENOENT")
458
+ return null;
459
+ throw c;
460
+ })
461
+ ]);
462
+ if (o != null && i != null) {
463
+ const c = i.mtimeMs >= o.mtimeMs, l = c ? i : o;
464
+ return {
465
+ dateModified: l.mtimeMs,
466
+ dateUsed: l.atimeMs,
467
+ size: l.size,
468
+ hasError: c
469
+ };
470
+ } else return o != null ? {
471
+ dateModified: o.mtimeMs,
472
+ dateUsed: o.atimeMs,
473
+ size: o.size,
474
+ hasError: !1
475
+ } : i != null ? {
476
+ dateModified: i.mtimeMs,
477
+ dateUsed: i.atimeMs,
478
+ size: i.size,
479
+ hasError: !0
480
+ } : void 0;
481
+ }
482
+ });
483
+ }
484
+ async delete(e) {
485
+ this._entries.delete(e);
486
+ }
487
+ async clear() {
488
+ this._entries.clear();
489
+ }
490
+ async _getKeys() {
491
+ const [e, s] = await Promise.all([
492
+ this._options.storages.value.getKeys(),
493
+ this._options.storages.error.getKeys()
494
+ ]);
495
+ return [...e, ...s];
496
+ }
497
+ async getEntries() {
498
+ if (!this._entriesLoaded) {
499
+ const e = await this._getKeys();
500
+ await Promise.all(
501
+ e.map(async (s) => {
502
+ if (this._entries.has(s))
503
+ return;
504
+ const n = await this.get(s);
505
+ n != null && this._entries.set(s, n);
506
+ })
507
+ ), this._entriesLoaded = !0;
508
+ }
509
+ return this._entries;
510
+ }
511
+ async getKeys() {
512
+ const e = await this.getEntries();
513
+ return Array.from(e.keys());
514
+ }
515
+ }
516
+ function xe(t) {
517
+ const e = new it({
518
+ dir: t.dir,
519
+ tmpDir: t.tmpDir,
520
+ converterSubPath: ct({ suffix: ".value" })
521
+ }), s = new it({
522
+ dir: t.dir,
523
+ tmpDir: t.tmpDir,
524
+ converterSubPath: ct({ suffix: ".error" })
525
+ }), n = t.compressOptions;
526
+ return {
527
+ converterInput: t.converterInput ?? Tt,
528
+ converterValue: t.converterValue ?? Ot(n),
529
+ converterError: xt(n),
530
+ totalSize: t.totalSize,
531
+ getSize: {
532
+ value: (r) => r.byteLength,
533
+ error: (r) => r.byteLength,
534
+ stat: () => 0
535
+ },
536
+ isExpired: t.isExpired,
537
+ storages: {
538
+ value: e,
539
+ error: s,
540
+ stat: new Gt({
541
+ storages: {
542
+ value: e,
543
+ error: s
544
+ }
545
+ })
546
+ }
547
+ };
548
+ }
549
+ function Kt(t, e = {}) {
550
+ return new Promise((s, n) => {
551
+ const r = K(t, {
292
552
  shell: !0,
293
553
  ...e
294
554
  }), a = [];
295
555
  r.stdout.on("data", (o) => {
296
556
  a.push(o);
297
557
  }), r.on("error", (o) => {
298
- s(o);
558
+ n(o);
299
559
  }), r.on("exit", (o) => {
300
560
  const i = Buffer.concat(a).toString("utf8");
301
561
  if (o !== 0) {
302
- s(new Error(`[exec][exit] code: ${o}`));
562
+ n(new Error(`[exec][exit] code: ${o}`));
303
563
  return;
304
564
  }
305
- n(i);
565
+ s(i);
306
566
  });
307
567
  });
308
568
  }
309
- async function ue() {
569
+ async function Oe() {
310
570
  let t;
311
571
  switch (process.platform) {
312
572
  case "darwin":
313
- t = U("afplay", ["/System/Library/Sounds/Ping.aiff"], {
573
+ t = K("afplay", ["/System/Library/Sounds/Ping.aiff"], {
314
574
  stdio: "ignore"
315
575
  });
316
576
  break;
317
577
  case "linux":
318
- t = U("beep", [], { stdio: "ignore", shell: !0 });
578
+ t = K("beep", [], { stdio: "ignore", shell: !0 });
319
579
  break;
320
580
  case "win32":
321
- t = U("powershell", ["-c", "[console]::beep(1000,300)"], {
581
+ t = K("powershell", ["-c", "[console]::beep(1000,300)"], {
322
582
  stdio: "ignore"
323
583
  });
324
584
  break;
@@ -327,18 +587,18 @@ async function ue() {
327
587
  `[nodeBeep] Beep not supported on platform: ${process.platform}`
328
588
  );
329
589
  }
330
- await new Promise((e, n) => {
331
- t.on("error", n), t.on("close", (s) => {
332
- s !== 0 ? n(new Error(`[nodeBeep] Beep process exited with code ${s}`)) : e();
590
+ await new Promise((e, s) => {
591
+ t.on("error", s), t.on("close", (n) => {
592
+ n !== 0 ? s(new Error(`[nodeBeep] Beep process exited with code ${n}`)) : e();
333
593
  });
334
594
  });
335
595
  }
336
- async function _t({
596
+ async function Ht({
337
597
  page: t,
338
598
  urlFilters: e,
339
- timeouts: n
599
+ timeouts: s
340
600
  }) {
341
- return n || (n = {}), n.downloadInternal || (n.downloadInternal = 10 * 1e3), n.downloadExternal || (n.downloadExternal = 60 * 1e3), n.total || (n.total = 300 * 1e3), await bt(
601
+ return s || (s = {}), s.downloadInternal || (s.downloadInternal = 10 * 1e3), s.downloadExternal || (s.downloadExternal = 60 * 1e3), s.total || (s.total = 300 * 1e3), await Ct(
342
602
  () => t.evaluate(
343
603
  ({
344
604
  urlFilters: r,
@@ -346,20 +606,20 @@ async function _t({
346
606
  }) => {
347
607
  function o(l) {
348
608
  return function(d) {
349
- let f = !1;
350
- for (let x = 0, u = l.length; x < u; x++) {
609
+ let h = !1;
610
+ for (let x = 0, f = l.length; x < f; x++) {
351
611
  const m = l[x];
352
- m.pattern.test(d) && (f = m.value);
612
+ m.pattern.test(d) && (h = m.value);
353
613
  }
354
- return f;
614
+ return h;
355
615
  };
356
616
  }
357
617
  const i = r && o(r);
358
- let h = performance.getEntries && performance.getEntries();
359
- return h || (h = []), h.push({
618
+ let c = performance.getEntries && performance.getEntries();
619
+ return c || (c = []), c.push({
360
620
  name: location.href
361
621
  }), Promise.all(
362
- h.map(
622
+ c.map(
363
623
  (l) => {
364
624
  if (l.entryType != null && l.entryType !== "resource" || i && !i(l.name))
365
625
  return null;
@@ -370,35 +630,35 @@ async function _t({
370
630
  }) : null;
371
631
  if (navigator.userAgent.indexOf("Chrome") === -1)
372
632
  return null;
373
- const g = typeof AbortController < "u" ? new AbortController() : null, d = new URL(l.name).origin === location.origin, f = d ? a.downloadInternal : a.downloadExternal;
633
+ const g = typeof AbortController < "u" ? new AbortController() : null, d = new URL(l.name).origin === location.origin, h = d ? a.downloadInternal : a.downloadExternal;
374
634
  let x;
375
- const u = new Promise((c, p) => {
376
- x = p;
377
- }), m = f && setTimeout(() => {
635
+ const f = new Promise((u, y) => {
636
+ x = y;
637
+ }), m = h && setTimeout(() => {
378
638
  g?.abort(), x(
379
639
  new Error("[test][getPageHttpErrors] fetch timeout")
380
640
  );
381
- }, f);
382
- let w = fetch(l.name, {
641
+ }, h);
642
+ let p = fetch(l.name, {
383
643
  mode: d ? "same-origin" : "no-cors",
384
644
  signal: g?.signal,
385
645
  cache: d ? "force-cache" : void 0,
386
646
  method: "HEAD"
387
- }).then((c) => c.ok ? null : {
647
+ }).then((u) => u.ok ? null : {
388
648
  url: l.name,
389
- error: c.status + " " + c.statusText
390
- }).catch((c) => ({
649
+ error: u.status + " " + u.statusText
650
+ }).catch((u) => ({
391
651
  url: l.name,
392
- error: c.message
652
+ error: u.message
393
653
  }));
394
- g || (w = Promise.race([w, u]));
395
- function P() {
654
+ g || (p = Promise.race([p, f]));
655
+ function _() {
396
656
  m && clearTimeout(m);
397
657
  }
398
- return w.then(
399
- (c) => (P(), c),
400
- (c) => {
401
- throw P(), c;
658
+ return p.then(
659
+ (u) => (_(), u),
660
+ (u) => {
661
+ throw _(), u;
402
662
  }
403
663
  );
404
664
  }
@@ -415,32 +675,32 @@ async function _t({
415
675
  },
416
676
  {
417
677
  urlFilters: e,
418
- timeouts: n
678
+ timeouts: s
419
679
  }
420
680
  ),
421
- { timeout: n.total }
681
+ { timeout: s.total }
422
682
  );
423
683
  }
424
- async function $t({
684
+ async function Vt({
425
685
  page: t,
426
686
  urlFilters: e,
427
- errorFilter: n
687
+ errorFilter: s
428
688
  }) {
429
- let s = await _t({
689
+ let n = await Ht({
430
690
  page: t,
431
691
  urlFilters: e
432
692
  });
433
- if (s && (n && (s = s.filter(n)), s.length > 0))
693
+ if (n && (s && (n = n.filter(s)), n.length > 0))
434
694
  throw new Error(
435
- `[test][checkPageHttpErrors] Page has http errors: ${JSON.stringify(s, null, 2)}`
695
+ `[test][checkPageHttpErrors] Page has http errors: ${JSON.stringify(n, null, 2)}`
436
696
  );
437
697
  }
438
- async function Nt({
698
+ async function Yt({
439
699
  page: t,
440
700
  filter: e,
441
- onError: n
701
+ onError: s
442
702
  }) {
443
- const s = "callback_191b355ea6f64499a6607ad571da5d4d", r = t.context().browser()?.browserType().name(), a = gt();
703
+ const n = "callback_191b355ea6f64499a6607ad571da5d4d", r = t.context().browser()?.browserType().name(), a = _t();
444
704
  function o(i) {
445
705
  try {
446
706
  if (e && !e({
@@ -448,38 +708,38 @@ async function Nt({
448
708
  error: i
449
709
  }))
450
710
  return;
451
- } catch (h) {
452
- i = String(h);
711
+ } catch (c) {
712
+ i = String(c);
453
713
  }
454
714
  try {
455
715
  console.error(
456
716
  `[test][subscribeJsErrors] BROWSER JS ERROR (${r}): ${i}`
457
717
  );
458
- const h = new Error(i);
459
- h.stack = a, n(h);
460
- } catch (h) {
461
- console.error("[test][subscribeJsErrors] error", h);
718
+ const c = new Error(i);
719
+ c.stack = a, s(c);
720
+ } catch (c) {
721
+ console.error("[test][subscribeJsErrors] error", c);
462
722
  }
463
723
  }
464
- await t.exposeFunction(s, o), await t.addInitScript((i) => {
465
- function h(d) {
724
+ await t.exposeFunction(n, o), await t.addInitScript((i) => {
725
+ function c(d) {
466
726
  if (Array.isArray(d))
467
- return d.map(h).join(`\r
727
+ return d.map(c).join(`\r
468
728
  \r
469
729
  `);
470
730
  if (d instanceof Error)
471
731
  return d.stack || d.toString();
472
732
  if (typeof d == "object" && d != null) {
473
- const f = /* @__PURE__ */ new Set();
733
+ const h = /* @__PURE__ */ new Set();
474
734
  return JSON.stringify(
475
735
  d,
476
- (x, u) => {
477
- if (typeof u == "object" && u != null) {
478
- if (f.has(u))
736
+ (x, f) => {
737
+ if (typeof f == "object" && f != null) {
738
+ if (h.has(f))
479
739
  return "[Circular]";
480
- f.add(u);
740
+ h.add(f);
481
741
  }
482
- return u;
742
+ return f;
483
743
  },
484
744
  2
485
745
  );
@@ -493,10 +753,10 @@ async function Nt({
493
753
  warn: console.warn.bind(console),
494
754
  error: console.error.bind(console)
495
755
  };
496
- console.warn = function(...f) {
497
- return l("console.warn: " + h(f)), g.warn.apply(this, f);
498
- }, console.error = function(...f) {
499
- return l("console.error: " + h(f)), g.error.apply(this, f);
756
+ console.warn = function(...h) {
757
+ return l("console.warn: " + c(h)), g.warn.apply(this, h);
758
+ }, console.error = function(...h) {
759
+ return l("console.error: " + c(h)), g.error.apply(this, h);
500
760
  }, window.addEventListener(
501
761
  "error",
502
762
  function(d) {
@@ -506,15 +766,15 @@ async function Nt({
506
766
  ), window.addEventListener(
507
767
  "unhandledrejection",
508
768
  function(d) {
509
- l("window unhandledrejection: " + h(d.reason));
769
+ l("window unhandledrejection: " + c(d.reason));
510
770
  },
511
771
  !0
512
772
  );
513
- }, s);
773
+ }, n);
514
774
  }
515
- async function ft() {
775
+ async function mt() {
516
776
  try {
517
- process.platform === "win32" && await Rt(
777
+ process.platform === "win32" && await Kt(
518
778
  `wmic process where "commandline like '%ms-playwright%' and not commandline like '%wmic.exe%' and priority != 4" CALL setpriority "idle"`
519
779
  );
520
780
  } catch (t) {
@@ -524,38 +784,38 @@ async function ft() {
524
784
  console.warn("[test][setPlaywrightPriorityLow] error: " + e);
525
785
  }
526
786
  }
527
- let G = null, X = null;
528
- function fe(t) {
529
- X = t;
787
+ let H = null, Z = null;
788
+ function Te(t) {
789
+ Z = t;
530
790
  }
531
- function Wt() {
532
- if (G)
791
+ function qt() {
792
+ if (H)
533
793
  return;
534
- const t = X || (process.env.DELAY_ON_ERROR ? parseInt(process.env.DELAY_ON_ERROR, 10) : 0);
535
- if (X)
536
- return console.log(`[test][delayOnError] Delay on error: ${t} ms`), G = it(t), G;
794
+ const t = Z || (process.env.DELAY_ON_ERROR ? parseInt(process.env.DELAY_ON_ERROR, 10) : 0);
795
+ if (Z)
796
+ return console.log(`[test][delayOnError] Delay on error: ${t} ms`), H = ft(t), H;
537
797
  }
538
- function he() {
539
- return G;
798
+ function Ce() {
799
+ return H;
540
800
  }
541
- async function vt(t) {
542
- const { page: e } = t, n = e.context().browser()?.browserType().name(), s = new lt(), r = tt(
543
- s.signal,
801
+ async function Xt(t) {
802
+ const { page: e } = t, s = e.context().browser()?.browserType().name(), n = new ht(), r = rt(
803
+ n.signal,
544
804
  t.abortSignal
545
805
  ), a = (i) => {
546
- let h = `Error in (${n}) ${e.url()}
806
+ let c = `Error in (${s}) ${e.url()}
547
807
  `;
548
- t.pageFilePath && (h += ` at _ (${ct.resolve(t.pageFilePath)}:0:0)
549
- `), i.stack = h + (i.stack || i.message), i.message = h + i.message, console.error("[test][initPage] error", i), s.abort(i);
808
+ t.pageFilePath && (c += ` at _ (${I.resolve(t.pageFilePath)}:0:0)
809
+ `), i.stack = c + (i.stack || i.message), i.message = c + i.message, console.error("[test][initPage] error", i), n.abort(i);
550
810
  };
551
- return await Nt({
811
+ return await Yt({
552
812
  page: e,
553
813
  filter: t.filters?.js?.filter,
554
814
  onError: a
555
815
  }), {
556
816
  abortSignal: r,
557
817
  checkErrors: async () => {
558
- await $t({
818
+ await Vt({
559
819
  page: e,
560
820
  urlFilters: t.filters?.http?.urlFilters,
561
821
  errorFilter: t.filters?.http?.errorFilter
@@ -563,22 +823,22 @@ async function vt(t) {
563
823
  }
564
824
  };
565
825
  }
566
- async function Bt({
826
+ async function Qt({
567
827
  page: t,
568
828
  abortSignal: e,
569
- filters: n,
570
- func: s,
829
+ filters: s,
830
+ func: n,
571
831
  pageFilePath: r
572
832
  }) {
573
833
  const a = t.context().browser()?.browserType().name();
574
834
  try {
575
- const { abortSignal: o, checkErrors: i } = await vt({
835
+ const { abortSignal: o, checkErrors: i } = await Xt({
576
836
  page: t,
577
837
  abortSignal: e,
578
- filters: n,
838
+ filters: s,
579
839
  pageFilePath: r
580
840
  });
581
- await s({
841
+ await n({
582
842
  page: t,
583
843
  abortSignal: o,
584
844
  checkErrors: i
@@ -586,123 +846,123 @@ async function Bt({
586
846
  } catch (o) {
587
847
  let i = `Error in (${a}) ${t.url()}
588
848
  `;
589
- throw r && (i += ` at _ (${ct.resolve(r)}:0:0)
849
+ throw r && (i += ` at _ (${I.resolve(r)}:0:0)
590
850
  `), o.stack = i + (o.stack || o.message), o.message = i + o.message, o;
591
851
  }
592
852
  }
593
- function de({
853
+ function _e({
594
854
  browserType: t,
595
855
  options: e
596
856
  }) {
597
- return async function(s) {
857
+ return async function(n) {
598
858
  const r = await t.launch(e ?? void 0);
599
859
  try {
600
- return await s(r);
860
+ return await n(r);
601
861
  } finally {
602
862
  await r.close();
603
863
  }
604
864
  };
605
865
  }
606
- function zt({
866
+ function Zt({
607
867
  browser: t,
608
868
  options: e
609
869
  }) {
610
- return async function(s) {
870
+ return async function(n) {
611
871
  const r = await t.newContext(e ?? void 0);
612
- await ft();
872
+ await mt();
613
873
  try {
614
- const a = await s(r);
874
+ const a = await n(r);
615
875
  return await r.close(), a;
616
876
  } catch (a) {
617
- const o = Wt?.();
877
+ const o = qt?.();
618
878
  throw o ? (console.error("[test][useBrowserContext] error", a), o.finally(() => r.close())) : await r.close(), a;
619
879
  }
620
880
  };
621
881
  }
622
- async function me(t, e) {
623
- const n = await t.$$(e);
624
- for (const s of n)
625
- await s.click();
882
+ async function ke(t, e) {
883
+ const s = await t.$$(e);
884
+ for (const n of s)
885
+ await n.click();
626
886
  }
627
- const q = new lt();
628
- let Jt = 0;
629
- function Ut(t) {
887
+ const X = new ht();
888
+ let te = 0;
889
+ function ee(t) {
630
890
  return async function({
631
- browser: n,
632
- contextOptions: s,
891
+ browser: s,
892
+ contextOptions: n,
633
893
  name: r,
634
894
  url: a,
635
895
  pool: o,
636
896
  priority: i,
637
- filters: h,
897
+ filters: c,
638
898
  ...l
639
899
  }, g) {
640
- const d = tt(
641
- q.signal,
900
+ const d = rt(
901
+ X.signal,
642
902
  g
643
903
  );
644
904
  try {
645
- await $({
905
+ await A({
646
906
  pool: o,
647
907
  count: 1,
648
908
  priority: i,
649
909
  abortSignal: d,
650
- func: async (f, x) => {
651
- x.throwIfAborted(), await zt({
652
- browser: n,
653
- options: s
654
- })(async (u) => {
910
+ func: async (h, x) => {
911
+ x.throwIfAborted(), await Zt({
912
+ browser: s,
913
+ options: n
914
+ })(async (f) => {
655
915
  x.throwIfAborted();
656
- const m = await u.newPage();
657
- await ft();
658
- const w = n.browserType().name(), P = x.subscribe(() => {
916
+ const m = await f.newPage();
917
+ await mt();
918
+ const p = s.browserType().name(), _ = x.subscribe(() => {
659
919
  m.isClosed() || (m.close({
660
920
  // reason: reason?.message,
661
921
  runBeforeUnload: !1
662
- }), u.close({
922
+ }), f.close({
663
923
  // reason: reason?.message,
664
924
  }));
665
925
  });
666
926
  try {
667
- console.log(`START ${r} (${w}): ${a}`), await Bt({
927
+ console.log(`START ${r} (${p}): ${a}`), await Qt({
668
928
  page: m,
669
929
  abortSignal: x,
670
- filters: h,
671
- func: async ({ page: c, checkErrors: p, abortSignal: E }) => {
930
+ filters: c,
931
+ func: async ({ page: u, checkErrors: y, abortSignal: E }) => {
672
932
  await t({
673
- page: c,
933
+ page: u,
674
934
  url: a,
675
- checkErrors: p,
935
+ checkErrors: y,
676
936
  abortSignal: E,
677
937
  args: l
678
938
  });
679
939
  }
680
940
  }), console.log(
681
- `END [${Jt++}] ${r} (${w}): ${a}`
941
+ `END [${te++}] ${r} (${p}): ${a}`
682
942
  );
683
- } catch (c) {
684
- if (x.aborted || c instanceof nt) {
685
- console.log(`ABORTED ${r} (${w}): ${a}`);
943
+ } catch (u) {
944
+ if (x.aborted || u instanceof nt) {
945
+ console.log(`ABORTED ${r} (${p}): ${a}`);
686
946
  return;
687
947
  }
688
- throw console.log(`ERROR ${r} (${w}): ${a}`), q.signal.aborted || (console.log("unsubscribe on first error"), P()), q.abort(), c;
948
+ throw console.log(`ERROR ${r} (${p}): ${a}`), X.signal.aborted || (console.log("unsubscribe on first error"), _()), X.abort(), u;
689
949
  }
690
950
  });
691
951
  }
692
952
  });
693
- } catch (f) {
694
- if (f instanceof nt)
953
+ } catch (h) {
954
+ if (h instanceof nt)
695
955
  return;
696
- throw f;
956
+ throw h;
697
957
  }
698
958
  };
699
959
  }
700
- function we(t) {
701
- const e = Ut(t);
702
- return Pt(async (n) => await e(n));
960
+ function ve(t) {
961
+ const e = ee(t);
962
+ return Mt(async (s) => await e(s));
703
963
  }
704
- function ye(t, e) {
705
- const n = e.stableTime, s = e.timeout, r = e.mutation ? {
964
+ function Pe(t, e) {
965
+ const s = e.stableTime, n = e.timeout, r = e.mutation ? {
706
966
  childList: !!e.mutation.childList,
707
967
  attributes: !!e.mutation.attributes,
708
968
  characterData: !!e.mutation.characterData,
@@ -715,636 +975,675 @@ function ye(t, e) {
715
975
  longTask: !!e.resource.longTask
716
976
  } : null;
717
977
  return t.evaluate(
718
- ({ stableTime: o, timeout: i, mutation: h, resource: l }) => {
719
- return new Promise((f, x) => {
720
- let u = Date.now(), m = null, w = null;
721
- const P = [];
722
- function c() {
723
- u = Date.now();
978
+ ({ stableTime: o, timeout: i, mutation: c, resource: l }) => {
979
+ return new Promise((h, x) => {
980
+ let f = Date.now(), m = null, p = null;
981
+ const _ = [];
982
+ function u() {
983
+ f = Date.now();
724
984
  }
725
- function p() {
726
- m != null && (clearTimeout(m), m = null), w != null && (clearTimeout(w), w = null);
727
- for (let y = 0, T = P.length; y < T; y++)
728
- P[y]();
985
+ function y() {
986
+ m != null && (clearTimeout(m), m = null), p != null && (clearTimeout(p), p = null);
987
+ for (let w = 0, C = _.length; w < C; w++)
988
+ _[w]();
729
989
  }
730
990
  function E() {
731
- const y = o - (Date.now() - u);
732
- y <= 0 ? (p(), f()) : m = setTimeout(E, y);
991
+ const w = o - (Date.now() - f);
992
+ w <= 0 ? (y(), h()) : m = setTimeout(E, w);
733
993
  }
734
- if (h) {
735
- const y = g(h, c);
736
- P.push(y);
994
+ if (c) {
995
+ const w = g(c, u);
996
+ _.push(w);
737
997
  }
738
998
  if (l) {
739
- const y = d(l, c);
740
- P.push(y);
999
+ const w = d(l, u);
1000
+ _.push(w);
741
1001
  }
742
- m = setTimeout(E, o), w = setTimeout(() => {
743
- p(), x(
1002
+ m = setTimeout(E, o), p = setTimeout(() => {
1003
+ y(), x(
744
1004
  new Error(
745
1005
  `[waitPageStable] timed out after ${i}ms waiting for page to stabilize`
746
1006
  )
747
1007
  );
748
1008
  }, i);
749
1009
  });
750
- function g(f, x) {
751
- const u = f.selector ? document.querySelector(f.selector) : document.documentElement;
752
- if (!u)
1010
+ function g(h, x) {
1011
+ const f = h.selector ? document.querySelector(h.selector) : document.documentElement;
1012
+ if (!f)
753
1013
  throw new Error(
754
- `[waitPageStable] element not found: ${f.selector}`
1014
+ `[waitPageStable] element not found: ${h.selector}`
755
1015
  );
756
1016
  const m = new MutationObserver(x);
757
- return m.observe(u, {
758
- childList: f.childList,
759
- attributes: f.attributes,
760
- characterData: f.characterData,
761
- subtree: f.subtree
1017
+ return m.observe(f, {
1018
+ childList: h.childList,
1019
+ attributes: h.attributes,
1020
+ characterData: h.characterData,
1021
+ subtree: h.subtree
762
1022
  }), () => {
763
1023
  m.disconnect();
764
1024
  };
765
1025
  }
766
- function d(f, x) {
767
- const u = [];
768
- f.resource && u.push("resource"), f.navigation && u.push("navigation"), f.paint && u.push("paint"), f.longTask && u.push("longtask");
1026
+ function d(h, x) {
1027
+ const f = [];
1028
+ h.resource && f.push("resource"), h.navigation && f.push("navigation"), h.paint && f.push("paint"), h.longTask && f.push("longtask");
769
1029
  const m = new PerformanceObserver(x);
770
- return m.observe({ entryTypes: u }), () => {
1030
+ return m.observe({ entryTypes: f }), () => {
771
1031
  m.disconnect();
772
1032
  };
773
1033
  }
774
1034
  },
775
- { stableTime: n, timeout: s, mutation: r, resource: a }
1035
+ { stableTime: s, timeout: n, mutation: r, resource: a }
776
1036
  );
777
1037
  }
778
- async function Y(t, e) {
779
- const n = M.dirname(t);
780
- await I.promises.stat(n).catch(() => null) || await I.promises.mkdir(n, { recursive: !0 }), await I.promises.writeFile(t, JSON.stringify(e, null, 4), {
1038
+ async function Q(t, e) {
1039
+ const s = v.dirname(t);
1040
+ await D.promises.stat(s).catch(() => null) || await D.promises.mkdir(s, { recursive: !0 }), await D.promises.writeFile(t, JSON.stringify(e, null, 4), {
781
1041
  encoding: "utf-8"
782
1042
  });
783
1043
  }
784
- async function Gt(t) {
785
- if (!await I.promises.stat(t).catch(() => null))
1044
+ async function re(t) {
1045
+ if (!await D.promises.stat(t).catch(() => null))
786
1046
  return null;
787
- const e = await I.promises.readFile(t, { encoding: "utf-8" });
1047
+ const e = await D.promises.readFile(t, { encoding: "utf-8" });
788
1048
  return JSON.parse(e);
789
1049
  }
790
- const Q = "-", Z = "+";
791
- function H(t, e, n) {
1050
+ const tt = "-", et = "+";
1051
+ function V(t, e, s) {
792
1052
  if (t === e)
793
1053
  return null;
794
1054
  if (Array.isArray(t)) {
795
1055
  if (Array.isArray(e)) {
796
1056
  let r = null;
797
1057
  for (let a = 0, o = Math.max(e.length, e.length); a < o; a++) {
798
- const i = H(t[a], e[a], n);
1058
+ const i = V(t[a], e[a], s);
799
1059
  i != null && (r || (r = []), r.push(i));
800
1060
  }
801
- return r != null && n && (r = n(t, e, r)), r;
1061
+ return r != null && s && (r = s(t, e, r)), r;
802
1062
  }
803
1063
  } else if (t instanceof Object && e instanceof Object) {
804
1064
  let r = null;
805
1065
  for (const a in t)
806
1066
  if (Object.prototype.hasOwnProperty.call(t, a)) {
807
- const o = H(t[a], e[a], n);
1067
+ const o = V(t[a], e[a], s);
808
1068
  o != null && (r || (r = {}), r[a] = o);
809
1069
  }
810
1070
  for (const a in e)
811
1071
  if (Object.prototype.hasOwnProperty.call(e, a) && !Object.prototype.hasOwnProperty.call(t, a)) {
812
- const o = H(t[a], e[a], n);
1072
+ const o = V(t[a], e[a], s);
813
1073
  o != null && (r || (r = {}), r[a] = o);
814
1074
  }
815
- return r != null && n && (r = n(t, e, r)), r;
1075
+ return r != null && s && (r = s(t, e, r)), r;
816
1076
  }
817
- let s = {
818
- [Q]: t,
819
- [Z]: e
1077
+ let n = {
1078
+ [tt]: t,
1079
+ [et]: e
820
1080
  };
821
- return n && (s = n(t, e, s)), s;
1081
+ return s && (n = s(t, e, n)), n;
822
1082
  }
823
- function ot(t) {
824
- function e(c) {
825
- return c.sort((p, E) => p[0] > E[0] ? 1 : -1).reduce((p, E) => (p[E[0]] = E[1], p), {});
1083
+ function lt(t) {
1084
+ function e(u) {
1085
+ return u.sort((y, E) => y[0] > E[0] ? 1 : -1).reduce((y, E) => (y[E[0]] = E[1], y), {});
826
1086
  }
827
- function n(c) {
828
- return c.reduce((p, E) => (p[E] = !0, p), {});
1087
+ function s(u) {
1088
+ return u.reduce((y, E) => (y[E] = !0, y), {});
829
1089
  }
830
- const s = t.filters && t.filters.excludeAttrs && n(t.filters.excludeAttrs), r = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && n(t.filters.excludeStyles), i = t.filters && t.filters.fixTags, h = t.filters && t.filters.excludeClasses, l = t.filters && t.filters.excludeIds, g = t.filters && t.filters.excludeSelectorClasses, d = t.filters && t.filters.excludeSelectorIds;
831
- let f;
1090
+ const n = t.filters && t.filters.excludeAttrs && s(t.filters.excludeAttrs), r = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && s(t.filters.excludeStyles), i = t.filters && t.filters.fixTags, c = t.filters && t.filters.excludeClasses, l = t.filters && t.filters.excludeIds, g = t.filters && t.filters.excludeSelectorClasses, d = t.filters && t.filters.excludeSelectorIds;
1091
+ let h;
832
1092
  if (t.filters && t.filters.excludeSelectors && t.filters.excludeSelectors.length > 0) {
833
- const c = Array.from(
1093
+ const u = Array.from(
834
1094
  document.querySelectorAll(t.filters.excludeSelectors.join(","))
835
1095
  );
836
- c.length > 0 && (f = new Set(c));
1096
+ u.length > 0 && (h = new Set(u));
837
1097
  }
838
- function x(c, p, E, y) {
839
- const T = getComputedStyle(c, p), S = [];
840
- for (let k = 0, O = T.length; k < O; k++) {
841
- const A = T[k];
842
- if (o && o[A])
1098
+ function x(u, y, E, w) {
1099
+ const C = getComputedStyle(u, y), S = [];
1100
+ for (let O = 0, T = C.length; O < T; O++) {
1101
+ const P = C[O];
1102
+ if (o && o[P])
843
1103
  continue;
844
- let b = T[A];
1104
+ let b = C[P];
845
1105
  if (b && a)
846
- for (let j = 0, C = a.length; j < C; j++)
847
- a[j].name.test(A) && (b = b.replace(a[j].search, a[j].replace));
848
- (!E || E[A] !== b) && (!y || y[A] === b) && S.push([A, b]);
1106
+ for (let M = 0, k = a.length; M < k; M++)
1107
+ a[M].name.test(P) && (b = b.replace(a[M].search, a[M].replace));
1108
+ (!E || E[P] !== b) && (!w || w[P] === b) && S.push([P, b]);
849
1109
  }
850
1110
  return e(S);
851
1111
  }
852
- function u(c, p, E) {
1112
+ function f(u, y, E) {
853
1113
  return {
854
1114
  _: x(
855
- c,
1115
+ u,
856
1116
  void 0,
857
- p && p._,
1117
+ y && y._,
858
1118
  E && E._
859
1119
  ),
860
1120
  before: x(
861
- c,
1121
+ u,
862
1122
  "before",
863
- p && p.before,
1123
+ y && y.before,
864
1124
  E && E.before
865
1125
  ),
866
1126
  after: x(
867
- c,
1127
+ u,
868
1128
  "after",
869
- p && p.after,
1129
+ y && y.after,
870
1130
  E && E.after
871
1131
  )
872
1132
  };
873
1133
  }
874
- function m(c, p, E, y, T) {
875
- for (let S = 0, k = c.childNodes.length; S < k; S++) {
876
- const O = c.childNodes[S];
877
- if (!O)
1134
+ function m(u, y, E, w, C) {
1135
+ for (let S = 0, O = u.childNodes.length; S < O; S++) {
1136
+ const T = u.childNodes[S];
1137
+ if (!T)
878
1138
  throw new Error(
879
- `child is null; index=${S}; ${y}, ${c.className}\r
1139
+ `child is null; index=${S}; ${w}, ${u.className}\r
880
1140
  You should wait js executions before test`
881
1141
  );
882
- O instanceof Element && w(
883
- O,
884
- p,
885
- E,
1142
+ T instanceof Element && p(
1143
+ T,
886
1144
  y,
887
- T
1145
+ E,
1146
+ w,
1147
+ C
888
1148
  );
889
1149
  }
890
1150
  }
891
- function w(c, p, E, y, T) {
892
- const S = T && T[p.length];
893
- if (T && !S || f && f.has(c))
1151
+ function p(u, y, E, w, C) {
1152
+ const S = C && C[y.length];
1153
+ if (C && !S || h && h.has(u))
894
1154
  return;
895
- let k = c.tagName && c.tagName.toLowerCase();
896
- if (k === "head" && (E = !1), i)
897
- for (let D = 0, W = i.length; D < W; D++)
898
- k = k.replace(i[D].search, i[D].replace);
899
- if (S && S.tag !== k)
1155
+ let O = u.tagName && u.tagName.toLowerCase();
1156
+ if (O === "head" && (E = !1), i)
1157
+ for (let j = 0, B = i.length; j < B; j++)
1158
+ O = O.replace(i[j].search, i[j].replace);
1159
+ if (S && S.tag !== O)
900
1160
  return;
901
- const O = [];
902
- for (let D = 0, W = c.attributes.length; D < W; D++) {
903
- const R = c.attributes.item(D);
904
- let _ = R.name, z = R.value;
905
- if (_ = _.toLowerCase(), _ !== "class" && !(s && s[_])) {
1161
+ const T = [];
1162
+ for (let j = 0, B = u.attributes.length; j < B; j++) {
1163
+ const W = u.attributes.item(j);
1164
+ let z = W.name, G = W.value;
1165
+ if (z = z.toLowerCase(), z !== "class" && !(n && n[z])) {
906
1166
  if (r)
907
- for (let v = 0, pt = r.length; v < pt; v++)
908
- r[v].name.test(_) && (z = z.replace(r[v].search, r[v].replace));
909
- (!S || S.attrs && S.attrs[_] === z) && O.push([_, z]);
1167
+ for (let J = 0, Et = r.length; J < Et; J++)
1168
+ r[J].name.test(z) && (G = G.replace(r[J].search, r[J].replace));
1169
+ (!S || S.attrs && S.attrs[z] === G) && T.push([z, G]);
910
1170
  }
911
1171
  }
912
- const A = [], b = [];
913
- for (let D = 0, W = c.classList.length; D < W; D++) {
914
- const R = c.classList.item(D);
915
- (!h || !h.test(R)) && A.push(R), (!g || !g.test(R)) && b.push(R);
1172
+ const P = [], b = [];
1173
+ for (let j = 0, B = u.classList.length; j < B; j++) {
1174
+ const W = u.classList.item(j);
1175
+ (!c || !c.test(W)) && P.push(W), (!g || !g.test(W)) && b.push(W);
916
1176
  }
917
- const j = E ? u(c, t.defaultStyle, S && S.style) : null, C = c.childElementCount ? [] : null;
918
- c.id && (!l || !l.test(c.id)) && c.id;
919
- const L = c.id && (!d || !d.test(c.id)) ? c.id : "", F = (k || "") + (L ? "#" + L : "") + (b.length > 0 ? "." + b.join(".") : ""), rt = F ? y ? y + " > " + F : F : y, yt = {
920
- tag: k,
921
- selector: rt,
922
- classes: A,
923
- attrs: O.length > 0 ? e(O) : null,
924
- style: j,
925
- childs: C
1177
+ const M = E ? f(u, t.defaultStyle, S && S.style) : null, k = u.childElementCount ? [] : null;
1178
+ u.id && (!l || !l.test(u.id)) && u.id;
1179
+ const L = u.id && (!d || !d.test(u.id)) ? u.id : "", N = (O || "") + (L ? "#" + L : "") + (b.length > 0 ? "." + b.join(".") : ""), st = N ? w ? w + " > " + N : N : w, gt = {
1180
+ tag: O,
1181
+ selector: st,
1182
+ classes: P,
1183
+ attrs: T.length > 0 ? e(T) : null,
1184
+ style: M,
1185
+ childs: k
926
1186
  };
927
- p.push(yt), C && m(
928
- c,
929
- C,
1187
+ y.push(gt), k && m(
1188
+ u,
1189
+ k,
930
1190
  E,
931
- rt,
1191
+ st,
932
1192
  S && S.childs
933
1193
  );
934
1194
  }
935
- const P = [];
936
- return w(
1195
+ const _ = [];
1196
+ return p(
937
1197
  document.documentElement,
938
- P,
1198
+ _,
939
1199
  !0,
940
1200
  "",
941
1201
  t.shouldEqualResult && [t.shouldEqualResult]
942
- ), P[0];
1202
+ ), _[0];
943
1203
  }
944
- async function ht(t) {
1204
+ async function pt(t) {
945
1205
  const e = await t.context().newCDPSession(t);
946
1206
  return await e.send("DOM.enable"), await e.send("CSS.enable"), e;
947
1207
  }
948
- async function dt(t) {
1208
+ async function wt(t) {
949
1209
  await t.send("CSS.disable"), await t.send("DOM.disable"), await t.detach();
950
1210
  }
951
- async function pe(t, e) {
952
- const n = await ht(t);
1211
+ async function De(t, e) {
1212
+ const s = await pt(t);
953
1213
  try {
954
- return await e(n);
1214
+ return await e(s);
955
1215
  } finally {
956
- await dt(n);
1216
+ await wt(s);
957
1217
  }
958
1218
  }
959
- async function Ht(t, e) {
960
- const { nodes: n } = await t.send("DOM.getFlattenedDocument", {
1219
+ async function se(t, e) {
1220
+ const { nodes: s } = await t.send("DOM.getFlattenedDocument", {
961
1221
  depth: -1,
962
1222
  pierce: !0
963
- }), s = n.filter((r) => r.nodeType === 1).map((r) => r.nodeId);
964
- for (const r of s)
1223
+ }), n = s.filter((r) => r.nodeType === 1).map((r) => r.nodeId);
1224
+ for (const r of n)
965
1225
  await t.send("CSS.forcePseudoState", {
966
1226
  nodeId: r,
967
1227
  forcedPseudoClasses: e
968
1228
  });
969
1229
  }
970
- function V(t, e) {
1230
+ function Y(t, e) {
971
1231
  if (!t || !e)
972
1232
  return e || null;
973
- let n = null;
974
- for (const s in e)
975
- Object.prototype.hasOwnProperty.call(e, s) && e[s] !== t[s] && (n || (n = {}), n[s] = e[s]);
976
- for (const s in t)
977
- Object.prototype.hasOwnProperty.call(t, s) && !Object.prototype.hasOwnProperty.call(e, s) && (n || (n = {}), n[s] = "");
978
- return n;
1233
+ let s = null;
1234
+ for (const n in e)
1235
+ Object.prototype.hasOwnProperty.call(e, n) && e[n] !== t[n] && (s || (s = {}), s[n] = e[n]);
1236
+ for (const n in t)
1237
+ Object.prototype.hasOwnProperty.call(t, n) && !Object.prototype.hasOwnProperty.call(e, n) && (s || (s = {}), s[n] = "");
1238
+ return s;
979
1239
  }
980
- function Vt(t, e) {
1240
+ function ne(t, e) {
981
1241
  if (!t || !e)
982
1242
  return e || null;
983
- const n = V(t._, e._), s = V(t.before, e.before), r = V(t.after, e.after);
984
- return !n && !s && !r ? null : {
985
- _: n || {},
986
- before: s || {},
1243
+ const s = Y(t._, e._), n = Y(t.before, e.before), r = Y(t.after, e.after);
1244
+ return !s && !n && !r ? null : {
1245
+ _: s || {},
1246
+ before: n || {},
987
1247
  after: r || {}
988
1248
  };
989
1249
  }
990
- function Kt(t, e) {
1250
+ function ae(t, e) {
991
1251
  if (!t || !e)
992
1252
  return e || null;
993
1253
  if (t.length !== e.length)
994
1254
  return e;
995
- for (let n = 0, s = t.length; n < s; n++)
996
- if (t[n] !== e[n])
1255
+ for (let s = 0, n = t.length; s < n; s++)
1256
+ if (t[s] !== e[s])
997
1257
  return e;
998
1258
  return null;
999
1259
  }
1000
- function mt(t, e) {
1001
- const n = Kt(t.classes, e.classes), s = V(t.attrs, e.attrs), r = Vt(t.style, e.style);
1260
+ function yt(t, e) {
1261
+ const s = ae(t.classes, e.classes), n = Y(t.attrs, e.attrs), r = ne(t.style, e.style);
1002
1262
  let a = null;
1003
1263
  if (t.childs && e.childs) {
1004
1264
  const o = Math.min(t.childs.length, e.childs.length);
1005
1265
  for (let i = 0; i < o; i++) {
1006
- const h = mt(t.childs[i], e.childs[i]);
1007
- if (h) {
1266
+ const c = yt(t.childs[i], e.childs[i]);
1267
+ if (c) {
1008
1268
  if (!a) {
1009
1269
  a = [];
1010
1270
  for (let l = 0; l < o; l++)
1011
1271
  a.push({});
1012
1272
  }
1013
- a[i] = h;
1273
+ a[i] = c;
1014
1274
  }
1015
1275
  }
1016
1276
  }
1017
- return !n && !s && !r && !a ? null : {
1277
+ return !s && !n && !r && !a ? null : {
1018
1278
  tag: e.tag,
1019
1279
  selector: e.selector,
1020
- classes: n,
1021
- attrs: s,
1280
+ classes: s,
1281
+ attrs: n,
1022
1282
  style: r,
1023
1283
  childs: a
1024
1284
  };
1025
1285
  }
1026
- const K = (t, e, n, s) => {
1027
- const r = s(t, e, n, s);
1286
+ const q = (t, e, s, n) => {
1287
+ const r = n(t, e, s, n);
1028
1288
  if (r == null)
1029
1289
  return r;
1030
1290
  if (Array.isArray(r))
1031
1291
  return r.map(
1032
- (a, o, i) => K(a, o, i, s)
1292
+ (a, o, i) => q(a, o, i, n)
1033
1293
  );
1034
1294
  if (typeof r == "object") {
1035
1295
  const a = {};
1036
1296
  for (const o in r)
1037
- Object.prototype.hasOwnProperty.call(r, o) && (a[o] = K(r[o], o, r, s));
1297
+ Object.prototype.hasOwnProperty.call(r, o) && (a[o] = q(r[o], o, r, n));
1038
1298
  return a;
1039
1299
  }
1040
1300
  return r;
1041
1301
  };
1042
- function wt(t, e) {
1302
+ function bt(t, e) {
1043
1303
  if (t.attrs && e.excludeAttrs) {
1044
- for (let n = 0, s = e.excludeAttrs.length; n < s; n++)
1045
- delete t.attrs[e.excludeAttrs[n]];
1304
+ for (let s = 0, n = e.excludeAttrs.length; s < n; s++)
1305
+ delete t.attrs[e.excludeAttrs[s]];
1046
1306
  Object.keys(t.attrs).length === 0 && (t.attrs = null);
1047
1307
  }
1048
1308
  if (t.classes && e.excludeClasses && (t.classes = t.classes.filter(
1049
- (n) => !e.excludeClasses.test(n)
1309
+ (s) => !e.excludeClasses.test(s)
1050
1310
  )), t.style && e.excludeStyles)
1051
- for (const n of ["_", "before", "after"]) {
1052
- const s = t.style[n];
1053
- if (s)
1311
+ for (const s of ["_", "before", "after"]) {
1312
+ const n = t.style[s];
1313
+ if (n)
1054
1314
  for (let r = 0, a = e.excludeStyles.length; r < a; r++)
1055
- delete s[e.excludeStyles[r]];
1315
+ delete n[e.excludeStyles[r]];
1056
1316
  }
1057
1317
  if (t.childs)
1058
- for (let n = 0, s = t.childs.length; n < s; n++)
1059
- wt(t.childs[n], e);
1318
+ for (let s = 0, n = t.childs.length; s < n; s++)
1319
+ bt(t.childs[s], e);
1060
1320
  }
1061
- function qt(t, e) {
1062
- for (const n in t) {
1063
- if (!Object.prototype.hasOwnProperty.call(t, n)) continue;
1064
- const s = t[n];
1065
- for (const r in s) {
1066
- if (!Object.prototype.hasOwnProperty.call(s, r)) continue;
1067
- const a = s[r];
1321
+ function oe(t, e) {
1322
+ for (const s in t) {
1323
+ if (!Object.prototype.hasOwnProperty.call(t, s)) continue;
1324
+ const n = t[s];
1325
+ for (const r in n) {
1326
+ if (!Object.prototype.hasOwnProperty.call(n, r)) continue;
1327
+ const a = n[r];
1068
1328
  for (const o in a)
1069
- Object.prototype.hasOwnProperty.call(a, o) && wt(a[o], e);
1329
+ Object.prototype.hasOwnProperty.call(a, o) && bt(a[o], e);
1070
1330
  }
1071
1331
  }
1072
1332
  }
1073
- function be({
1333
+ function Ae({
1074
1334
  actualResultFile: t,
1075
1335
  expectedResultFile: e,
1076
- diffResultFile: n,
1077
- filters: s,
1336
+ diffResultFile: s,
1337
+ filters: n,
1078
1338
  transform: r,
1079
1339
  pseudoStates: a
1080
1340
  }) {
1081
- let o, i, h, l = {};
1341
+ let o, i, c, l = {};
1082
1342
  return {
1083
1343
  async init(g) {
1084
- o = await Gt(e), r && (o = K(o, null, null, r)), o && s && qt(o, s), await g.goto("about:blank"), i = await g.evaluate(ot, { filters: s }), h = i.style;
1344
+ o = await re(e), r && (o = q(o, null, null, r)), o && n && oe(o, n), await g.goto("about:blank"), i = await g.evaluate(lt, { filters: n }), c = i.style;
1085
1345
  },
1086
1346
  async handlePage({
1087
1347
  page: g,
1088
1348
  testId: d,
1089
- url: f,
1349
+ url: h,
1090
1350
  stateId: x,
1091
- _filters: u
1351
+ _filters: f
1092
1352
  }) {
1093
1353
  let m = l[d];
1094
1354
  m || (m = {}, l[d] = m);
1095
- let w = m[f.href];
1096
- w || (w = {}, m[f.href] = w), await g.addStyleTag({
1355
+ let p = m[h.href];
1356
+ p || (p = {}, m[h.href] = p), await g.addStyleTag({
1097
1357
  content: "*, *::before, *::after { animation-name: none!important; transition-duration: 0s !important; }"
1098
1358
  });
1099
- const P = a ?? [{ states: [] }];
1100
- let c = null, p;
1359
+ const _ = a ?? [{ states: [] }];
1360
+ let u = null, y;
1101
1361
  try {
1102
- for (let E = 0; E < P.length; E++) {
1103
- const y = P[E], T = y.states.length > 0 ? x + ":" + y.states.join(":") : x;
1362
+ for (let E = 0; E < _.length; E++) {
1363
+ const w = _[E], C = w.states.length > 0 ? x + ":" + w.states.join(":") : x;
1104
1364
  let S = null;
1105
- if (y.states.length > 0) {
1106
- c || (c = await ht(g));
1365
+ if (w.states.length > 0) {
1366
+ u || (u = await pt(g));
1107
1367
  const b = performance.now();
1108
- await Ht(c, y.states), S = performance.now() - b;
1368
+ await se(u, w.states), S = performance.now() - b;
1109
1369
  }
1110
- y.delay && await it(y.delay);
1111
- const k = performance.now(), O = await g.evaluate(ot, {
1112
- filters: u || s,
1113
- defaultStyle: h,
1114
- shouldEqualResult: w[T]
1115
- }), A = performance.now() - k;
1370
+ w.delay && await ft(w.delay);
1371
+ const O = performance.now(), T = await g.evaluate(lt, {
1372
+ filters: f || n,
1373
+ defaultStyle: c,
1374
+ shouldEqualResult: p[C]
1375
+ }), P = performance.now() - O;
1116
1376
  if (console.log(
1117
- `SNAPSHOT ${T}:` + (S != null ? ` forcePseudoClasses ${S.toFixed(0)}ms,` : "") + ` getAllElements ${A.toFixed(0)}ms`
1118
- ), !p)
1119
- p = O, w[T] = O;
1377
+ `SNAPSHOT ${C}:` + (S != null ? ` forcePseudoClasses ${S.toFixed(0)}ms,` : "") + ` getAllElements ${P.toFixed(0)}ms`
1378
+ ), !y)
1379
+ y = T, p[C] = T;
1120
1380
  else {
1121
- const b = mt(p, O);
1122
- b && (w[T] = b);
1381
+ const b = yt(y, T);
1382
+ b && (p[C] = b);
1123
1383
  }
1124
1384
  }
1125
1385
  } finally {
1126
- c && await dt(c);
1386
+ u && await wt(u);
1127
1387
  }
1128
1388
  },
1129
1389
  async end({ checkExistUrlsOnly: g }) {
1130
- if (l = Et(l), r && (l = K(l, null, null, r)), o) {
1131
- let d, f;
1390
+ if (l = kt(l), r && (l = q(l, null, null, r)), o) {
1391
+ let d, h;
1132
1392
  if (!g)
1133
- d = o, f = l;
1393
+ d = o, h = l;
1134
1394
  else {
1135
- d = {}, f = {};
1136
- for (const u in o)
1137
- if (Object.prototype.hasOwnProperty.call(o, u) && Object.prototype.hasOwnProperty.call(l, u)) {
1138
- d[u] = {}, f[u] = {};
1139
- for (const m in o[u])
1140
- Object.prototype.hasOwnProperty.call(o[u], m) && Object.prototype.hasOwnProperty.call(l[u], m) && (d[u][m] = o[u][m], f[u][m] = l[u][m]);
1395
+ d = {}, h = {};
1396
+ for (const f in o)
1397
+ if (Object.prototype.hasOwnProperty.call(o, f) && Object.prototype.hasOwnProperty.call(l, f)) {
1398
+ d[f] = {}, h[f] = {};
1399
+ for (const m in o[f])
1400
+ Object.prototype.hasOwnProperty.call(o[f], m) && Object.prototype.hasOwnProperty.call(l[f], m) && (d[f][m] = o[f][m], h[f][m] = l[f][m]);
1141
1401
  }
1142
1402
  }
1143
- const x = H(
1403
+ const x = V(
1144
1404
  d,
1145
- f,
1146
- (u, m, w) => w.selector && (delete w.selector, Object.keys(w).length === 0) ? null : w.childs && w.childs.length === 1 ? w.childs[0] : (m && m.selector ? w[Z] ? w[Z] = m.selector : w = { selector: m.selector, ...w } : u && u.selector && (w[Q] ? w[Q] = u.selector : w = { selector: u.selector, ...w }), w)
1405
+ h,
1406
+ (f, m, p) => p.selector && (delete p.selector, Object.keys(p).length === 0) ? null : p.childs && p.childs.length === 1 ? p.childs[0] : (m && m.selector ? p[et] ? p[et] = m.selector : p = { selector: m.selector, ...p } : f && f.selector && (p[tt] ? p[tt] = f.selector : p = { selector: f.selector, ...p }), p)
1147
1407
  );
1148
- if (n && await Y(n, x || {}), x)
1149
- throw await Y(t, l), console.error(
1408
+ if (s && await Q(s, x || {}), x)
1409
+ throw await Q(t, l), console.error(
1150
1410
  "Pages elements changes: " + JSON.stringify(x, null, 4).substring(0, 5e3)
1151
1411
  ), new Error("Pages elements changes detected");
1152
- await I.promises.stat(t).catch(() => null) && await I.promises.unlink(t);
1412
+ await D.promises.stat(t).catch(() => null) && await D.promises.unlink(t);
1153
1413
  } else
1154
- await Y(e, l);
1414
+ await Q(e, l);
1155
1415
  return l;
1156
1416
  }
1157
1417
  };
1158
1418
  }
1159
1419
  export {
1160
- Se as CheckError,
1161
- xe as ConsoleMessageLevel,
1162
- Z as DIFF_NEW,
1163
- Q as DIFF_OLD,
1164
- ke as Lazy,
1165
- Oe as LazyWithId,
1166
- Te as LogLevel,
1167
- Pe as MAX_REPORT_ITEMS_DEFAULT,
1168
- Ce as MatchInternalError,
1169
- Ae as Matcher,
1170
- je as MatcherAny,
1171
- De as MatcherArray,
1172
- Le as MatcherArrayItem,
1173
- Me as MatcherConvert,
1174
- Ie as MatcherCustom,
1175
- Fe as MatcherFew,
1176
- Re as MatcherIn,
1177
- _e as MatcherInstanceOf,
1178
- $e as MatcherIs,
1179
- Ne as MatcherNever,
1180
- We as MatcherNot,
1181
- ve as MatcherNumber,
1182
- Be as MatcherObject,
1183
- ze as MatcherObjectEntry,
1184
- Je as MatcherRef,
1185
- Ue as MatcherString,
1186
- Ge as Random,
1187
- He as Subject,
1188
- Ve as SubjectWithId,
1189
- Ke as UNIQUE_PSEUDO_RANDOM_MAX_COUNT,
1190
- qe as alertConsole,
1191
- Ye as alertReplace,
1192
- Xe as argsToString,
1193
- Qe as check,
1194
- Ze as checkFunc,
1195
- $t as checkPageHttpErrors,
1196
- me as clickAll,
1197
- tr as consoleIntercept,
1198
- er as consoleMessageToString,
1199
- rr as consoleReplace,
1200
- nr as convertTimeZone,
1201
- ht as createCDPSession,
1202
- ce as createMatchPath,
1203
- sr as createMatchResult,
1204
- ar as createMatchResultBoolean,
1205
- or as createMatchResultError,
1206
- be as createPagesElementsChangesTest,
1207
- ir as createTaskDelayRetry,
1208
- Ut as createTestE2e,
1209
- we as createTestE2eVariants,
1210
- cr as createUniquePseudoRandom,
1211
- lr as dateNowUnique,
1212
- ur as deepCloneJsonLike,
1213
- fr as deepEqualJsonLike,
1214
- hr as deepEqualJsonLikeMap,
1215
- Wt as delayOnErrorCall,
1216
- fe as delayOnErrorSet,
1217
- he as delayOnErrorWait,
1218
- dt as destroyCDPSession,
1219
- dr as equalArray,
1220
- mr as escapeHtml,
1221
- wr as escapeRegExp,
1222
- Rt as exec,
1223
- yr as expectedToString,
1224
- oe as fileLock,
1225
- pr as filterMatchResult,
1226
- br as filterMatchResultNested,
1227
- gr as fixStackTrace,
1228
- Ht as forcePseudoClasses,
1229
- Er as formatAny,
1230
- Sr as formatDate,
1231
- xr as formatDateFileName,
1232
- ot as getAllElements,
1233
- kr as getConsoleMessages,
1234
- Or as getDateInet,
1235
- At as getDrive,
1236
- mt as getElementsStyleDiff,
1237
- jt as getFileId,
1238
- Et as getNormalizedObject,
1239
- Tr as getObjectId,
1240
- H as getObjectsDiff,
1241
- _t as getPageHttpErrors,
1242
- Pr as getRandomFunc,
1243
- Cr as getRandomSeed,
1244
- gt as getStackTrace,
1245
- Mt as globGitIgnoreToPicomatch,
1246
- It as globToRelative,
1247
- vt as initPage,
1248
- Ar as isMatcher,
1249
- jr as isObservable,
1250
- le as loadGlobs,
1251
- Ft as loadGlobsFromFile,
1252
- Gt as loadJson,
1253
- Dr as match,
1254
- Lr as matchAnd,
1255
- Mr as matchAndPipe,
1256
- Ir as matchAny,
1257
- Fr as matchArray,
1258
- Rr as matchArrayBuffer,
1259
- _r as matchArrayIncludes,
1260
- $r as matchArrayItem,
1261
- Nr as matchArrayLength,
1262
- Wr as matchArrayWith,
1263
- vr as matchBoolean,
1264
- Br as matchConstructor,
1265
- zr as matchConvert,
1266
- Jr as matchCustom,
1267
- Ur as matchDeep,
1268
- Gr as matchEnum,
1269
- Hr as matchFloat,
1270
- Vr as matchIn,
1271
- Kr as matchInstanceOf,
1272
- qr as matchInt,
1273
- Yr as matchIntDate,
1274
- Xr as matchIs,
1275
- Qr as matchIsNonStrict,
1276
- Zr as matchNever,
1277
- tn as matchNot,
1278
- en as matchNotNullish,
1279
- rn as matchNullish,
1280
- nn as matchNumber,
1281
- sn as matchObject,
1282
- an as matchObjectEntries,
1283
- on as matchObjectEntry,
1284
- cn as matchObjectKey,
1285
- ln as matchObjectKeyValue,
1286
- un as matchObjectKeys,
1287
- fn as matchObjectKeysNotNull,
1288
- hn as matchObjectPartial,
1289
- dn as matchObjectValue,
1290
- mn as matchObjectValues,
1291
- wn as matchObjectWith,
1292
- yn as matchOptional,
1293
- pn as matchOr,
1294
- bn as matchOrPipe,
1295
- gn as matchRange,
1296
- En as matchRangeDate,
1297
- Sn as matchRef,
1298
- xn as matchResultNestedToString,
1299
- kn as matchResultToString,
1300
- On as matchString,
1301
- Tn as matchStringLength,
1302
- Pn as matchTypeOf,
1303
- Cn as matchUuid,
1304
- An as matchValueState,
1305
- jn as max,
1306
- Dn as min,
1307
- Ln as minMax,
1308
- ue as nodeBeep,
1309
- Mn as numberMod,
1310
- K as objectTransform,
1311
- N as pathNormalize,
1312
- Dt as pathResolve,
1313
- et as poolFs,
1314
- In as randomBoolean,
1315
- Fn as randomEnum,
1316
- Rn as randomFloat,
1317
- _n as randomIndexWeighted,
1318
- $n as randomInt,
1319
- Nn as randomItem,
1320
- Wn as randomItems,
1321
- Y as saveJson,
1322
- vn as setFuncName,
1323
- ft as setPlaywrightPriorityLow,
1324
- Bn as sha256,
1325
- zn as sha256Buffer,
1326
- Nt as subscribeJsErrors,
1327
- Bt as testPage,
1328
- Jn as timeoutAbortController,
1329
- Un as toHex,
1330
- Gn as truncateString,
1331
- Hn as urlGetBoolean,
1332
- Vn as urlGetFloat,
1333
- Kn as urlGetInt,
1334
- qn as urlGetParams,
1335
- Yn as urlGetString,
1336
- Xn as urlParamToBoolean,
1337
- Qn as urlParamToFloat,
1338
- Zn as urlParamToInt,
1339
- de as useBrowser,
1340
- zt as useBrowserContext,
1341
- pe as usingCDPSession,
1342
- ts as validateMatchResult,
1343
- es as waitObservable,
1344
- ye as waitPageStable,
1345
- Lt as walkPathHandleErrorDefault,
1346
- ie as walkPaths,
1347
- rs as withConsoleReplace,
1348
- ns as withRetry,
1349
- bt as withTimeout
1420
+ Le as Cache,
1421
+ Fe as CacheStats,
1422
+ Ie as CheckError,
1423
+ Re as ConsoleMessageLevel,
1424
+ et as DIFF_NEW,
1425
+ tt as DIFF_OLD,
1426
+ Gt as FileStatStorage,
1427
+ it as FileStorage,
1428
+ Ne as Lazy,
1429
+ $e as LazyWithId,
1430
+ We as Locker,
1431
+ St as LockerWithId,
1432
+ ze as LogLevel,
1433
+ Be as MAX_REPORT_ITEMS_DEFAULT,
1434
+ Je as MatchInternalError,
1435
+ Ue as Matcher,
1436
+ Ge as MatcherAny,
1437
+ Ke as MatcherArray,
1438
+ He as MatcherArrayItem,
1439
+ Ve as MatcherConvert,
1440
+ Ye as MatcherCustom,
1441
+ qe as MatcherFew,
1442
+ Xe as MatcherIn,
1443
+ Qe as MatcherInstanceOf,
1444
+ Ze as MatcherIs,
1445
+ tr as MatcherNever,
1446
+ er as MatcherNot,
1447
+ rr as MatcherNumber,
1448
+ sr as MatcherObject,
1449
+ nr as MatcherObjectEntry,
1450
+ ar as MatcherRef,
1451
+ or as MatcherString,
1452
+ ir as MemoryStorage,
1453
+ cr as Random,
1454
+ lr as Subject,
1455
+ ur as SubjectWithId,
1456
+ fr as UNIQUE_PSEUDO_RANDOM_MAX_COUNT,
1457
+ hr as alertConsole,
1458
+ dr as alertReplace,
1459
+ mr as argsToString,
1460
+ pr as check,
1461
+ wr as checkFunc,
1462
+ Vt as checkPageHttpErrors,
1463
+ ke as clickAll,
1464
+ yr as compressGzip,
1465
+ br as consoleIntercept,
1466
+ gr as consoleMessageToString,
1467
+ Er as consoleReplace,
1468
+ Sr as convertTimeZone,
1469
+ xr as converterErrorToBuffer,
1470
+ Or as converterJson,
1471
+ Tr as converterJsonBuffer,
1472
+ Cr as converterStringToBuffer,
1473
+ pt as createCDPSession,
1474
+ _r as createConverterBufferToGzip,
1475
+ xt as createConverterErrorToGzip,
1476
+ Ot as createConverterJsonGzip,
1477
+ ct as createConverterSubPath,
1478
+ xe as createFileCacheOptions,
1479
+ Ee as createMatchPath,
1480
+ kr as createMatchResult,
1481
+ vr as createMatchResultBoolean,
1482
+ Pr as createMatchResultError,
1483
+ Ae as createPagesElementsChangesTest,
1484
+ Dr as createTaskDelayRetry,
1485
+ ee as createTestE2e,
1486
+ ve as createTestE2eVariants,
1487
+ Ar as createUniquePseudoRandom,
1488
+ Mr as dateNowUnique,
1489
+ jr as decompressGzip,
1490
+ Lr as deepCloneJsonLike,
1491
+ Fr as deepEqualJsonLike,
1492
+ Ir as deepEqualJsonLikeMap,
1493
+ qt as delayOnErrorCall,
1494
+ Te as delayOnErrorSet,
1495
+ Ce as delayOnErrorWait,
1496
+ wt as destroyCDPSession,
1497
+ Rr as equalArray,
1498
+ Nr as escapeHtml,
1499
+ $r as escapeRegExp,
1500
+ Kt as exec,
1501
+ Wr as expectedToString,
1502
+ be as fileLock,
1503
+ zr as filterMatchResult,
1504
+ Br as filterMatchResultNested,
1505
+ Jr as fixStackTrace,
1506
+ se as forcePseudoClasses,
1507
+ Ur as formatAny,
1508
+ Gr as formatDate,
1509
+ Kr as formatDateFileName,
1510
+ Lt as generateTempFileName,
1511
+ lt as getAllElements,
1512
+ Hr as getConsoleMessages,
1513
+ Vr as getDateInet,
1514
+ It as getDrive,
1515
+ yt as getElementsStyleDiff,
1516
+ Rt as getFileId,
1517
+ Tt as getHashKey,
1518
+ Yr as getJsonKey,
1519
+ kt as getNormalizedObject,
1520
+ qr as getObjectId,
1521
+ V as getObjectsDiff,
1522
+ Ht as getPageHttpErrors,
1523
+ Xr as getRandomFunc,
1524
+ Qr as getRandomSeed,
1525
+ _t as getStackTrace,
1526
+ Wt as globGitIgnoreToPicomatch,
1527
+ zt as globToRelative,
1528
+ Xt as initPage,
1529
+ Zr as isGzipCompressed,
1530
+ ts as isMatcher,
1531
+ es as isObservable,
1532
+ Se as loadGlobs,
1533
+ Bt as loadGlobsFromFile,
1534
+ re as loadJson,
1535
+ rs as mapObjectConverter,
1536
+ ss as match,
1537
+ ns as matchAnd,
1538
+ as as matchAndPipe,
1539
+ os as matchAny,
1540
+ is as matchArray,
1541
+ cs as matchArrayBuffer,
1542
+ ls as matchArrayIncludes,
1543
+ us as matchArrayItem,
1544
+ fs as matchArrayLength,
1545
+ hs as matchArrayWith,
1546
+ ds as matchBoolean,
1547
+ ms as matchConstructor,
1548
+ ps as matchConvert,
1549
+ ws as matchCustom,
1550
+ ys as matchDeep,
1551
+ bs as matchEnum,
1552
+ gs as matchFloat,
1553
+ Es as matchIn,
1554
+ Ss as matchInstanceOf,
1555
+ xs as matchInt,
1556
+ Os as matchIntDate,
1557
+ Ts as matchIs,
1558
+ Cs as matchIsNonStrict,
1559
+ _s as matchNever,
1560
+ ks as matchNot,
1561
+ vs as matchNotNullish,
1562
+ Ps as matchNullish,
1563
+ Ds as matchNumber,
1564
+ As as matchObject,
1565
+ Ms as matchObjectEntries,
1566
+ js as matchObjectEntry,
1567
+ Ls as matchObjectKey,
1568
+ Fs as matchObjectKeyValue,
1569
+ Is as matchObjectKeys,
1570
+ Rs as matchObjectKeysNotNull,
1571
+ Ns as matchObjectPartial,
1572
+ $s as matchObjectValue,
1573
+ Ws as matchObjectValues,
1574
+ zs as matchObjectWith,
1575
+ Bs as matchOptional,
1576
+ Js as matchOr,
1577
+ Us as matchOrPipe,
1578
+ Gs as matchRange,
1579
+ Ks as matchRangeDate,
1580
+ Hs as matchRef,
1581
+ Vs as matchResultNestedToString,
1582
+ Ys as matchResultToString,
1583
+ qs as matchString,
1584
+ Xs as matchStringLength,
1585
+ Qs as matchTypeOf,
1586
+ Zs as matchUuid,
1587
+ tn as matchValueState,
1588
+ en as max,
1589
+ rn as min,
1590
+ sn as minMax,
1591
+ Oe as nodeBeep,
1592
+ nn as numberMod,
1593
+ q as objectTransform,
1594
+ F as pathNormalize,
1595
+ Nt as pathResolve,
1596
+ R as poolFs,
1597
+ ut as promiseAllWait,
1598
+ an as randomBoolean,
1599
+ on as randomEnum,
1600
+ cn as randomFloat,
1601
+ ln as randomIndexWeighted,
1602
+ un as randomInt,
1603
+ fn as randomItem,
1604
+ hn as randomItems,
1605
+ Ut as readDirRecursive,
1606
+ Q as saveJson,
1607
+ dn as setArrayConverter,
1608
+ mn as setFuncName,
1609
+ mt as setPlaywrightPriorityLow,
1610
+ pn as sha256,
1611
+ wn as sha256Buffer,
1612
+ Yt as subscribeJsErrors,
1613
+ Qt as testPage,
1614
+ yn as timeoutAbortController,
1615
+ bn as toConvertFrom,
1616
+ gn as toConvertTo,
1617
+ En as toConvertWithDefaultFrom,
1618
+ Sn as toConvertWithDefaultTo,
1619
+ xn as toConverter,
1620
+ On as toConverterFrom,
1621
+ Tn as toConverterTo,
1622
+ Cn as toConverterWithDefault,
1623
+ _n as toConverterWithDefaultFrom,
1624
+ kn as toConverterWithDefaultTo,
1625
+ vn as toCorrect,
1626
+ Pn as toCorrectWithDefault,
1627
+ Dn as toHex,
1628
+ An as truncateString,
1629
+ Mn as urlGetBoolean,
1630
+ jn as urlGetFloat,
1631
+ Ln as urlGetInt,
1632
+ Fn as urlGetParams,
1633
+ In as urlGetString,
1634
+ Rn as urlParamToBoolean,
1635
+ Nn as urlParamToFloat,
1636
+ $n as urlParamToInt,
1637
+ _e as useBrowser,
1638
+ Zt as useBrowserContext,
1639
+ De as usingCDPSession,
1640
+ Wn as validateMatchResult,
1641
+ zn as waitObservable,
1642
+ Pe as waitPageStable,
1643
+ $t as walkPathHandleErrorDefault,
1644
+ ge as walkPaths,
1645
+ Bn as withConsoleReplace,
1646
+ Jn as withRetry,
1647
+ Ct as withTimeout,
1648
+ jt as writeFileThroughTmp
1350
1649
  };