@blackglory/match 0.3.2 → 0.3.5

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 (94) hide show
  1. package/dist/es2015/index.min.mjs +1 -1
  2. package/dist/es2015/index.min.mjs.map +1 -1
  3. package/dist/es2015/index.mjs +1543 -586
  4. package/dist/es2015/index.mjs.map +1 -1
  5. package/dist/es2015/index.umd.js +1545 -588
  6. package/dist/es2015/index.umd.js.map +1 -1
  7. package/dist/es2015/index.umd.min.js +1 -1
  8. package/dist/es2015/index.umd.min.js.map +1 -1
  9. package/dist/es2018/index.min.mjs +1 -1
  10. package/dist/es2018/index.min.mjs.map +1 -1
  11. package/dist/es2018/index.mjs +1543 -586
  12. package/dist/es2018/index.mjs.map +1 -1
  13. package/dist/es2018/index.umd.js +1545 -588
  14. package/dist/es2018/index.umd.js.map +1 -1
  15. package/dist/es2018/index.umd.min.js +1 -1
  16. package/dist/es2018/index.umd.min.js.map +1 -1
  17. package/lib/es2015/match-element.js +2 -2
  18. package/lib/es2015/match-element.js.map +1 -1
  19. package/lib/es2015/match.js +2 -2
  20. package/lib/es2015/match.js.map +1 -1
  21. package/lib/es2015/matchers/child-nodes.js +3 -3
  22. package/lib/es2015/matchers/child-nodes.js.map +1 -1
  23. package/lib/es2015/matchers/children.js +3 -3
  24. package/lib/es2015/matchers/children.js.map +1 -1
  25. package/lib/es2015/matchers/css.js +2 -2
  26. package/lib/es2015/matchers/css.js.map +1 -1
  27. package/lib/es2015/matchers/element.js +6 -6
  28. package/lib/es2015/matchers/element.js.map +1 -1
  29. package/lib/es2015/matchers/multiple.js +5 -5
  30. package/lib/es2015/matchers/multiple.js.map +1 -1
  31. package/lib/es2015/matchers/node.js +5 -5
  32. package/lib/es2015/matchers/node.js.map +1 -1
  33. package/lib/es2015/matchers/optional.js +1 -1
  34. package/lib/es2015/matchers/optional.js.map +1 -1
  35. package/lib/es2015/matchers/repeat.js +2 -2
  36. package/lib/es2015/matchers/repeat.js.map +1 -1
  37. package/lib/es2015/matchers/text-content-equals.js +1 -1
  38. package/lib/es2015/matchers/text-content-equals.js.map +1 -1
  39. package/lib/es2015/matchers/text-content-includes.js +1 -1
  40. package/lib/es2015/matchers/text-content-includes.js.map +1 -1
  41. package/lib/es2015/matchers/text-content-matches.js +1 -1
  42. package/lib/es2015/matchers/text-content-matches.js.map +1 -1
  43. package/lib/es2015/matchers/text-node.js +6 -6
  44. package/lib/es2015/matchers/text-node.js.map +1 -1
  45. package/lib/es2015/matchers/xpath.js +3 -3
  46. package/lib/es2015/matchers/xpath.js.map +1 -1
  47. package/lib/es2015/utils/match-multiple.js +1 -1
  48. package/lib/es2015/utils/match-multiple.js.map +1 -1
  49. package/lib/es2015/utils/match-one-by-one.js +3 -3
  50. package/lib/es2015/utils/match-one-by-one.js.map +1 -1
  51. package/lib/{es2018/utils/merge.d.ts → es2015/utils/merge-in-place.d.ts} +1 -1
  52. package/lib/{es2018/utils/merge.js → es2015/utils/merge-in-place.js} +8 -7
  53. package/lib/es2015/utils/merge-in-place.js.map +1 -0
  54. package/lib/es2018/match-element.js +2 -2
  55. package/lib/es2018/match-element.js.map +1 -1
  56. package/lib/es2018/match.js +2 -2
  57. package/lib/es2018/match.js.map +1 -1
  58. package/lib/es2018/matchers/child-nodes.js +3 -3
  59. package/lib/es2018/matchers/child-nodes.js.map +1 -1
  60. package/lib/es2018/matchers/children.js +3 -3
  61. package/lib/es2018/matchers/children.js.map +1 -1
  62. package/lib/es2018/matchers/css.js +2 -2
  63. package/lib/es2018/matchers/css.js.map +1 -1
  64. package/lib/es2018/matchers/element.js +6 -6
  65. package/lib/es2018/matchers/element.js.map +1 -1
  66. package/lib/es2018/matchers/multiple.js +5 -5
  67. package/lib/es2018/matchers/multiple.js.map +1 -1
  68. package/lib/es2018/matchers/node.js +5 -5
  69. package/lib/es2018/matchers/node.js.map +1 -1
  70. package/lib/es2018/matchers/optional.js +1 -1
  71. package/lib/es2018/matchers/optional.js.map +1 -1
  72. package/lib/es2018/matchers/repeat.js +2 -2
  73. package/lib/es2018/matchers/repeat.js.map +1 -1
  74. package/lib/es2018/matchers/text-content-equals.js +1 -1
  75. package/lib/es2018/matchers/text-content-equals.js.map +1 -1
  76. package/lib/es2018/matchers/text-content-includes.js +1 -1
  77. package/lib/es2018/matchers/text-content-includes.js.map +1 -1
  78. package/lib/es2018/matchers/text-content-matches.js +1 -1
  79. package/lib/es2018/matchers/text-content-matches.js.map +1 -1
  80. package/lib/es2018/matchers/text-node.js +6 -6
  81. package/lib/es2018/matchers/text-node.js.map +1 -1
  82. package/lib/es2018/matchers/xpath.js +3 -3
  83. package/lib/es2018/matchers/xpath.js.map +1 -1
  84. package/lib/es2018/utils/match-multiple.js +1 -1
  85. package/lib/es2018/utils/match-multiple.js.map +1 -1
  86. package/lib/es2018/utils/match-one-by-one.js +3 -3
  87. package/lib/es2018/utils/match-one-by-one.js.map +1 -1
  88. package/lib/{es2015/utils/merge.d.ts → es2018/utils/merge-in-place.d.ts} +1 -1
  89. package/lib/{es2015/utils/merge.js → es2018/utils/merge-in-place.js} +8 -7
  90. package/lib/es2018/utils/merge-in-place.js.map +1 -0
  91. package/package.json +24 -24
  92. package/CHANGELOG.md +0 -60
  93. package/lib/es2015/utils/merge.js.map +0 -1
  94. package/lib/es2018/utils/merge.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
2
 
3
- var es2018$5 = {};
3
+ var es2018$7 = {};
4
4
 
5
5
  var flatMap$1 = {};
6
6
 
@@ -34,14 +34,14 @@ flatMap$1.flatMap = void 0;
34
34
  const utils_1$5 = utils$1;
35
35
  const remove_all_children_1 = removeAllChildren$1;
36
36
  function flatMap(node, fn) {
37
- const newNodes = utils_1$5.cloneNodes(fn(utils_1$5.clone(node)));
37
+ const newNodes = (0, utils_1$5.cloneNodes)(fn((0, utils_1$5.clone)(node)));
38
38
  return newNodes.map(node => {
39
39
  const newChildNodes = [];
40
40
  for (const childNode of node.childNodes) {
41
- newChildNodes.push(...utils_1$5.cloneNodes(flatMap(childNode, fn)));
41
+ newChildNodes.push(...(0, utils_1$5.cloneNodes)(flatMap(childNode, fn)));
42
42
  }
43
- remove_all_children_1.removeAllChildren(node);
44
- utils_1$5.copyNodesToChildNodes(newChildNodes, node);
43
+ (0, remove_all_children_1.removeAllChildren)(node);
44
+ (0, utils_1$5.copyNodesToChildNodes)(newChildNodes, node);
45
45
  return node;
46
46
  });
47
47
  }
@@ -52,7 +52,7 @@ var map$3 = {};
52
52
  map$3.map = void 0;
53
53
  const utils_1$4 = utils$1;
54
54
  function map$2(node, fn) {
55
- const newNode = utils_1$4.clone(fn(utils_1$4.clone(node)));
55
+ const newNode = (0, utils_1$4.clone)(fn((0, utils_1$4.clone)(node)));
56
56
  for (const node of newNode.childNodes) {
57
57
  newNode.replaceChild(map$2(node, fn), node);
58
58
  }
@@ -65,7 +65,7 @@ var filter$3 = {};
65
65
  filter$3.filter = void 0;
66
66
  const flat_map_1$1 = flatMap$1;
67
67
  function filter$2(node, predicate) {
68
- const results = flat_map_1$1.flatMap(node, node => {
68
+ const results = (0, flat_map_1$1.flatMap)(node, node => {
69
69
  if (predicate(node)) {
70
70
  return [node];
71
71
  }
@@ -81,13 +81,13 @@ filter$3.filter = filter$2;
81
81
 
82
82
  var unwrap$1 = {};
83
83
 
84
- var es2018$4 = {};
84
+ var es2018$6 = {};
85
85
 
86
86
  var middleware = {};
87
87
 
88
88
  var chunkAsync$1 = {};
89
89
 
90
- var es2018$3 = {};
90
+ var es2018$5 = {};
91
91
 
92
92
  var go$1 = {};
93
93
 
@@ -109,9 +109,9 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
109
109
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
110
110
  };__exportStar(go$1, exports);
111
111
 
112
- }(es2018$3));
112
+ }(es2018$5));
113
113
 
114
- var es2018$2 = {};
114
+ var es2018$4 = {};
115
115
 
116
116
  var customError = {};
117
117
 
@@ -189,15 +189,15 @@ __exportStar(normalize$3, exports);
189
189
  __exportStar(refute$1, exports);
190
190
  __exportStar(assert$1, exports);
191
191
 
192
- }(es2018$2));
192
+ }(es2018$4));
193
193
 
194
194
  chunkAsync$1.chunkAsync = void 0;
195
- const go_1$f = es2018$3;
196
- const errors_1$m = es2018$2;
195
+ const go_1$g = es2018$5;
196
+ const errors_1$m = es2018$4;
197
197
  function chunkAsync(iterable, size) {
198
- errors_1$m.assert(Number.isInteger(size), 'The parameter size must be an integer');
199
- errors_1$m.assert(size > 0, 'The parameter size must be greater than 0');
200
- return go_1$f.go(async function* () {
198
+ (0, errors_1$m.assert)(Number.isInteger(size), 'The parameter size must be an integer');
199
+ (0, errors_1$m.assert)(size > 0, 'The parameter size must be greater than 0');
200
+ return (0, go_1$g.go)(async function* () {
201
201
  let buffer = [];
202
202
  for await (const element of iterable) {
203
203
  buffer.push(element);
@@ -214,319 +214,297 @@ chunkAsync$1.chunkAsync = chunkAsync;
214
214
 
215
215
  var chunkByAsync$1 = {};
216
216
 
217
- var es2018$1 = {};
217
+ var es2018$3 = {};
218
218
 
219
- var array = {};
219
+ var array$1 = {};
220
220
 
221
- array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
222
- function isArray(val) {
221
+ array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
222
+ function isArray$1(val) {
223
223
  return Array.isArray(val);
224
224
  }
225
- array.isArray = isArray;
226
- function isntArray(val) {
227
- return !isArray(val);
225
+ array$1.isArray = isArray$1;
226
+ function isntArray$1(val) {
227
+ return !isArray$1(val);
228
228
  }
229
- array.isntArray = isntArray;
230
- function isEmptyArray(val) {
229
+ array$1.isntArray = isntArray$1;
230
+ function isEmptyArray$1(val) {
231
231
  return val.length === 0;
232
232
  }
233
- array.isEmptyArray = isEmptyArray;
234
- function isntEmptyArray(val) {
233
+ array$1.isEmptyArray = isEmptyArray$1;
234
+ function isntEmptyArray$1(val) {
235
235
  return val.length !== 0;
236
236
  }
237
- array.isntEmptyArray = isntEmptyArray;
237
+ array$1.isntEmptyArray = isntEmptyArray$1;
238
238
 
239
- var asyncIterable = {};
239
+ var asyncIterable$1 = {};
240
240
 
241
- var _null = {};
241
+ var _null$1 = {};
242
242
 
243
- _null.isntNull = _null.isNull = void 0;
244
- function isNull(val) {
243
+ _null$1.isntNull = _null$1.isNull = void 0;
244
+ function isNull$1(val) {
245
245
  return val === null;
246
246
  }
247
- _null.isNull = isNull;
248
- function isntNull(val) {
249
- return !isNull(val);
247
+ _null$1.isNull = isNull$1;
248
+ function isntNull$1(val) {
249
+ return !isNull$1(val);
250
250
  }
251
- _null.isntNull = isntNull;
251
+ _null$1.isntNull = isntNull$1;
252
252
 
253
- var _undefined = {};
253
+ var _undefined$1 = {};
254
254
 
255
- _undefined.isntUndefined = _undefined.isUndefined = void 0;
256
- function isUndefined(val) {
255
+ _undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
256
+ function isUndefined$1(val) {
257
257
  return val === undefined;
258
258
  }
259
- _undefined.isUndefined = isUndefined;
260
- function isntUndefined(val) {
261
- return !isUndefined(val);
259
+ _undefined$1.isUndefined = isUndefined$1;
260
+ function isntUndefined$1(val) {
261
+ return !isUndefined$1(val);
262
262
  }
263
- _undefined.isntUndefined = isntUndefined;
263
+ _undefined$1.isntUndefined = isntUndefined$1;
264
264
 
265
- asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
266
- const null_1$1 = _null;
267
- const undefined_1$2 = _undefined;
268
- function isAsyncIterable(val) {
269
- return null_1$1.isntNull(val)
270
- && undefined_1$2.isntUndefined(val)
265
+ asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
266
+ const null_1$3 = _null$1;
267
+ const undefined_1$5 = _undefined$1;
268
+ function isAsyncIterable$1(val) {
269
+ return (0, null_1$3.isntNull)(val)
270
+ && (0, undefined_1$5.isntUndefined)(val)
271
271
  && typeof val[Symbol.asyncIterator] === 'function';
272
272
  }
273
- asyncIterable.isAsyncIterable = isAsyncIterable;
274
- function isntAsyncIterable(val) {
275
- return !isAsyncIterable(val);
273
+ asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
274
+ function isntAsyncIterable$1(val) {
275
+ return !isAsyncIterable$1(val);
276
276
  }
277
- asyncIterable.isntAsyncIterable = isntAsyncIterable;
277
+ asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
278
278
 
279
- var bigint = {};
279
+ var bigint$1 = {};
280
280
 
281
- bigint.isntBigInt = bigint.isBigInt = void 0;
282
- function isBigInt(val) {
281
+ bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
282
+ function isBigInt$1(val) {
283
283
  return typeof val === 'bigint';
284
284
  }
285
- bigint.isBigInt = isBigInt;
286
- function isntBigInt(val) {
287
- return !isBigInt(val);
285
+ bigint$1.isBigInt = isBigInt$1;
286
+ function isntBigInt$1(val) {
287
+ return !isBigInt$1(val);
288
288
  }
289
- bigint.isntBigInt = isntBigInt;
289
+ bigint$1.isntBigInt = isntBigInt$1;
290
290
 
291
- var boolean = {};
291
+ var boolean$1 = {};
292
292
 
293
- boolean.isntBoolean = boolean.isBoolean = void 0;
294
- function isBoolean(val) {
293
+ boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
294
+ function isBoolean$1(val) {
295
295
  return typeof val === 'boolean';
296
296
  }
297
- boolean.isBoolean = isBoolean;
298
- function isntBoolean(val) {
299
- return !isBoolean(val);
297
+ boolean$1.isBoolean = isBoolean$1;
298
+ function isntBoolean$1(val) {
299
+ return !isBoolean$1(val);
300
300
  }
301
- boolean.isntBoolean = isntBoolean;
301
+ boolean$1.isntBoolean = isntBoolean$1;
302
302
 
303
- var char = {};
303
+ var char$1 = {};
304
304
 
305
- var string = {};
305
+ var string$1 = {};
306
306
 
307
- string.isntStringObject = string.isStringObject = string.isntStringPrimitive = string.isStringPrimitive = string.isntString = string.isString = void 0;
308
- function isString(val) {
309
- return isStringPrimitive(val) || isStringObject(val);
310
- }
311
- string.isString = isString;
312
- function isntString(val) {
313
- return !isString(val);
314
- }
315
- string.isntString = isntString;
316
- function isStringPrimitive(val) {
307
+ string$1.isntString = string$1.isString = void 0;
308
+ function isString$1(val) {
317
309
  return typeof val === 'string';
318
310
  }
319
- string.isStringPrimitive = isStringPrimitive;
320
- function isntStringPrimitive(val) {
321
- return !isStringPrimitive(val);
322
- }
323
- string.isntStringPrimitive = isntStringPrimitive;
324
- function isStringObject(val) {
325
- return typeof val === 'object' && val instanceof String;
311
+ string$1.isString = isString$1;
312
+ function isntString$1(val) {
313
+ return !isString$1(val);
326
314
  }
327
- string.isStringObject = isStringObject;
328
- function isntStringObject(val) {
329
- return !isStringObject(val);
330
- }
331
- string.isntStringObject = isntStringObject;
315
+ string$1.isntString = isntString$1;
332
316
 
333
- char.isntCharObject = char.isCharObject = char.isntCharPrimitive = char.isCharPrimitive = char.isntChar = char.isChar = void 0;
334
- const string_1$1 = string;
335
- function isChar(val) {
336
- return (string_1$1.isString(val) || string_1$1.isStringObject(val))
337
- && val.length === 1;
338
- }
339
- char.isChar = isChar;
340
- function isntChar(val) {
341
- return !isChar(val);
342
- }
343
- char.isntChar = isntChar;
344
- function isCharPrimitive(val) {
345
- return string_1$1.isString(val)
317
+ char$1.isntChar = char$1.isChar = void 0;
318
+ const string_1$3 = string$1;
319
+ function isChar$1(val) {
320
+ return (0, string_1$3.isString)(val)
346
321
  && val.length === 1;
347
322
  }
348
- char.isCharPrimitive = isCharPrimitive;
349
- function isntCharPrimitive(val) {
350
- return !isCharPrimitive(val);
323
+ char$1.isChar = isChar$1;
324
+ function isntChar$1(val) {
325
+ return !isChar$1(val);
351
326
  }
352
- char.isntCharPrimitive = isntCharPrimitive;
353
- function isCharObject(val) {
354
- return string_1$1.isStringObject(val)
355
- && val.length === 1;
356
- }
357
- char.isCharObject = isCharObject;
358
- function isntCharObject(val) {
359
- return !isCharObject(val);
360
- }
361
- char.isntCharObject = isntCharObject;
327
+ char$1.isntChar = isntChar$1;
362
328
 
363
- var date = {};
329
+ var date$1 = {};
364
330
 
365
- date.isntDate = date.isDate = void 0;
366
- function isDate(val) {
331
+ date$1.isntDate = date$1.isDate = void 0;
332
+ function isDate$1(val) {
367
333
  return val instanceof Date;
368
334
  }
369
- date.isDate = isDate;
370
- function isntDate(val) {
371
- return !isDate(val);
335
+ date$1.isDate = isDate$1;
336
+ function isntDate$1(val) {
337
+ return !isDate$1(val);
372
338
  }
373
- date.isntDate = isntDate;
339
+ date$1.isntDate = isntDate$1;
374
340
 
375
- var _enum = {};
341
+ var _enum$1 = {};
376
342
 
377
- _enum.inEnum = void 0;
378
- function inEnum(val, _enum) {
343
+ _enum$1.inEnum = void 0;
344
+ function inEnum$1(val, _enum) {
379
345
  return Object.values(_enum).includes(val);
380
346
  }
381
- _enum.inEnum = inEnum;
347
+ _enum$1.inEnum = inEnum$1;
382
348
 
383
- var falsy = {};
349
+ var error$1 = {};
384
350
 
385
- falsy.isntFalsy = falsy.isFalsy = void 0;
386
- function isFalsy(val) {
351
+ error$1.isntError = error$1.isError = void 0;
352
+ function isError$1(val) {
353
+ return val instanceof Error;
354
+ }
355
+ error$1.isError = isError$1;
356
+ function isntError$1(val) {
357
+ return !isError$1(val);
358
+ }
359
+ error$1.isntError = isntError$1;
360
+
361
+ var falsy$1 = {};
362
+
363
+ falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
364
+ function isFalsy$1(val) {
387
365
  return !val;
388
366
  }
389
- falsy.isFalsy = isFalsy;
390
- function isntFalsy(val) {
391
- return !isFalsy(val);
367
+ falsy$1.isFalsy = isFalsy$1;
368
+ function isntFalsy$1(val) {
369
+ return !isFalsy$1(val);
392
370
  }
393
- falsy.isntFalsy = isntFalsy;
371
+ falsy$1.isntFalsy = isntFalsy$1;
394
372
 
395
- var _function = {};
373
+ var _function$1 = {};
396
374
 
397
- _function.isntFunction = _function.isFunction = void 0;
398
- function isFunction(val) {
375
+ _function$1.isntFunction = _function$1.isFunction = void 0;
376
+ function isFunction$1(val) {
399
377
  return typeof val === 'function';
400
378
  }
401
- _function.isFunction = isFunction;
402
- function isntFunction(val) {
403
- return !isFunction(val);
379
+ _function$1.isFunction = isFunction$1;
380
+ function isntFunction$1(val) {
381
+ return !isFunction$1(val);
404
382
  }
405
- _function.isntFunction = isntFunction;
383
+ _function$1.isntFunction = isntFunction$1;
406
384
 
407
- var iterable = {};
385
+ var iterable$1 = {};
408
386
 
409
- iterable.isntIterable = iterable.isIterable = void 0;
410
- const null_1 = _null;
411
- const undefined_1$1 = _undefined;
412
- function isIterable(val) {
413
- return null_1.isntNull(val)
414
- && undefined_1$1.isntUndefined(val)
387
+ iterable$1.isntIterable = iterable$1.isIterable = void 0;
388
+ const null_1$2 = _null$1;
389
+ const undefined_1$4 = _undefined$1;
390
+ function isIterable$1(val) {
391
+ return (0, null_1$2.isntNull)(val)
392
+ && (0, undefined_1$4.isntUndefined)(val)
415
393
  && typeof val[Symbol.iterator] === 'function';
416
394
  }
417
- iterable.isIterable = isIterable;
418
- function isntIterable(val) {
419
- return !isIterable(val);
395
+ iterable$1.isIterable = isIterable$1;
396
+ function isntIterable$1(val) {
397
+ return !isIterable$1(val);
420
398
  }
421
- iterable.isntIterable = isntIterable;
399
+ iterable$1.isntIterable = isntIterable$1;
422
400
 
423
- var jsonRpc = {};
401
+ var jsonRpc$1 = {};
424
402
 
425
- var object = {};
403
+ var object$1 = {};
426
404
 
427
- object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
428
- function isObject(val) {
405
+ object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isRecord = object$1.isntObject = object$1.isObject = void 0;
406
+ function isObject$2(val) {
429
407
  return val !== null && typeof val === 'object';
430
408
  }
431
- object.isObject = isObject;
432
- function isntObject(val) {
433
- return !isObject(val);
409
+ object$1.isObject = isObject$2;
410
+ function isntObject$1(val) {
411
+ return !isObject$2(val);
434
412
  }
435
- object.isntObject = isntObject;
413
+ object$1.isntObject = isntObject$1;
436
414
  function isRecord(val) {
437
- return isObject(val);
415
+ return isObject$2(val);
438
416
  }
439
- object.isRecord = isRecord;
440
- function isEmptyObject(val) {
417
+ object$1.isRecord = isRecord;
418
+ function isEmptyObject$1(val) {
441
419
  return Object.keys(val).length === 0;
442
420
  }
443
- object.isEmptyObject = isEmptyObject;
444
- function isntEmptyObject(val) {
421
+ object$1.isEmptyObject = isEmptyObject$1;
422
+ function isntEmptyObject$1(val) {
445
423
  return Object.keys(val).length !== 0;
446
424
  }
447
- object.isntEmptyObject = isntEmptyObject;
425
+ object$1.isntEmptyObject = isntEmptyObject$1;
448
426
 
449
- var number = {};
427
+ var number$1 = {};
450
428
 
451
- number.isntNumber = number.isNumber = void 0;
452
- function isNumber(val) {
429
+ number$1.isntNumber = number$1.isNumber = void 0;
430
+ function isNumber$1(val) {
453
431
  return typeof val === 'number';
454
432
  }
455
- number.isNumber = isNumber;
456
- function isntNumber(val) {
457
- return !isNumber(val);
458
- }
459
- number.isntNumber = isntNumber;
460
-
461
- jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
462
- const array_1 = array;
463
- const object_1 = object;
464
- const string_1 = string;
465
- const number_1 = number;
466
- const undefined_1 = _undefined;
467
- function isJsonRpcId(val) {
468
- return string_1.isString(val) || number_1.isNumber(val);
469
- }
470
- function isJsonRpcParams(val) {
471
- return array_1.isArray(val) || object_1.isObject(val);
472
- }
473
- function isJsonRpcNotification(val) {
474
- return object_1.isRecord(val)
475
- && string_1.isString(val.jsonrpc)
476
- && string_1.isString(val.method)
477
- && undefined_1.isUndefined(val.id)
478
- && isJsonRpcParams(val.params);
479
- }
480
- jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
481
- function isntJsonRpcNotification(val) {
482
- return !isJsonRpcNotification(val);
483
- }
484
- jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
485
- function isJsonRpcRequest(val) {
486
- return object_1.isRecord(val)
487
- && string_1.isString(val.jsonrpc)
488
- && string_1.isString(val.method)
489
- && isJsonRpcId(val.id)
490
- && isJsonRpcParams(val.params);
491
- }
492
- jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
493
- function isntJsonRpcRequest(val) {
494
- return !isJsonRpcRequest(val);
495
- }
496
- jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
497
- function isJsonRpcSuccess(val) {
498
- return object_1.isRecord(val)
499
- && string_1.isString(val.jsonrpc)
500
- && string_1.isString(val.id)
501
- && undefined_1.isntUndefined(val.result);
502
- }
503
- jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
504
- function isntJsonRpcSuccess(val) {
505
- return !isJsonRpcSuccess(val);
506
- }
507
- jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
508
- function isJsonRpcError(val) {
509
- return object_1.isRecord(val)
510
- && string_1.isString(val.jsonrpc)
511
- && isJsonRpcId(val.id)
512
- && isJsonRpcErrorObject(val.error);
513
- }
514
- jsonRpc.isJsonRpcError = isJsonRpcError;
515
- function isntJsonRpcError(val) {
516
- return !isJsonRpcError(val);
517
- }
518
- jsonRpc.isntJsonRpcError = isntJsonRpcError;
519
- function isJsonRpcErrorObject(val) {
520
- return object_1.isRecord(val)
521
- && number_1.isNumber(val.code)
522
- && string_1.isString(val.message)
523
- && (undefined_1.isUndefined(val.data) || object_1.isObject(val.data));
524
- }
525
-
526
- var json = {};
527
-
528
- json.isntJson = json.isJson = void 0;
529
- function isJson(val) {
433
+ number$1.isNumber = isNumber$1;
434
+ function isntNumber$1(val) {
435
+ return !isNumber$1(val);
436
+ }
437
+ number$1.isntNumber = isntNumber$1;
438
+
439
+ jsonRpc$1.isntJsonRpcError = jsonRpc$1.isJsonRpcError = jsonRpc$1.isntJsonRpcSuccess = jsonRpc$1.isJsonRpcSuccess = jsonRpc$1.isntJsonRpcRequest = jsonRpc$1.isJsonRpcRequest = jsonRpc$1.isntJsonRpcNotification = jsonRpc$1.isJsonRpcNotification = void 0;
440
+ const array_1$1 = array$1;
441
+ const object_1$1 = object$1;
442
+ const string_1$2 = string$1;
443
+ const number_1$1 = number$1;
444
+ const undefined_1$3 = _undefined$1;
445
+ function isJsonRpcId$1(val) {
446
+ return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
447
+ }
448
+ function isJsonRpcParams$1(val) {
449
+ return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
450
+ }
451
+ function isJsonRpcNotification$1(val) {
452
+ return (0, object_1$1.isRecord)(val)
453
+ && (0, string_1$2.isString)(val.jsonrpc)
454
+ && (0, string_1$2.isString)(val.method)
455
+ && (0, undefined_1$3.isUndefined)(val.id)
456
+ && isJsonRpcParams$1(val.params);
457
+ }
458
+ jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
459
+ function isntJsonRpcNotification$1(val) {
460
+ return !isJsonRpcNotification$1(val);
461
+ }
462
+ jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
463
+ function isJsonRpcRequest$1(val) {
464
+ return (0, object_1$1.isRecord)(val)
465
+ && (0, string_1$2.isString)(val.jsonrpc)
466
+ && (0, string_1$2.isString)(val.method)
467
+ && isJsonRpcId$1(val.id)
468
+ && isJsonRpcParams$1(val.params);
469
+ }
470
+ jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
471
+ function isntJsonRpcRequest$1(val) {
472
+ return !isJsonRpcRequest$1(val);
473
+ }
474
+ jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
475
+ function isJsonRpcSuccess$1(val) {
476
+ return (0, object_1$1.isRecord)(val)
477
+ && (0, string_1$2.isString)(val.jsonrpc)
478
+ && (0, string_1$2.isString)(val.id)
479
+ && 'result' in val;
480
+ }
481
+ jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
482
+ function isntJsonRpcSuccess$1(val) {
483
+ return !isJsonRpcSuccess$1(val);
484
+ }
485
+ jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
486
+ function isJsonRpcError$1(val) {
487
+ return (0, object_1$1.isRecord)(val)
488
+ && (0, string_1$2.isString)(val.jsonrpc)
489
+ && isJsonRpcId$1(val.id)
490
+ && isJsonRpcErrorObject$1(val.error);
491
+ }
492
+ jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
493
+ function isntJsonRpcError$1(val) {
494
+ return !isJsonRpcError$1(val);
495
+ }
496
+ jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
497
+ function isJsonRpcErrorObject$1(val) {
498
+ return (0, object_1$1.isRecord)(val)
499
+ && (0, number_1$1.isNumber)(val.code)
500
+ && (0, string_1$2.isString)(val.message)
501
+ && ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
502
+ }
503
+
504
+ var json$1 = {};
505
+
506
+ json$1.isntJson = json$1.isJson = void 0;
507
+ function isJson$1(val) {
530
508
  try {
531
509
  JSON.stringify(val);
532
510
  return true;
@@ -535,16 +513,16 @@ function isJson(val) {
535
513
  return false;
536
514
  }
537
515
  }
538
- json.isJson = isJson;
539
- function isntJson(val) {
540
- return !isntJson();
516
+ json$1.isJson = isJson$1;
517
+ function isntJson$1(val) {
518
+ return !isntJson$1();
541
519
  }
542
- json.isntJson = isntJson;
520
+ json$1.isntJson = isntJson$1;
543
521
 
544
- var url = {};
522
+ var url$1 = {};
545
523
 
546
- url.isAbsoluteURL = void 0;
547
- function isAbsoluteURL(str) {
524
+ url$1.isAbsoluteURL = void 0;
525
+ function isAbsoluteURL$1(str) {
548
526
  try {
549
527
  new URL(str);
550
528
  return true;
@@ -553,7 +531,7 @@ function isAbsoluteURL(str) {
553
531
  return false;
554
532
  }
555
533
  }
556
- url.isAbsoluteURL = isAbsoluteURL;
534
+ url$1.isAbsoluteURL = isAbsoluteURL$1;
557
535
 
558
536
  (function (exports) {
559
537
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -565,31 +543,32 @@ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Obj
565
543
  }));
566
544
  var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
567
545
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
568
- };__exportStar(array, exports);
569
- __exportStar(asyncIterable, exports);
570
- __exportStar(bigint, exports);
571
- __exportStar(boolean, exports);
572
- __exportStar(char, exports);
573
- __exportStar(date, exports);
574
- __exportStar(_enum, exports);
575
- __exportStar(falsy, exports);
576
- __exportStar(_function, exports);
577
- __exportStar(iterable, exports);
578
- __exportStar(jsonRpc, exports);
579
- __exportStar(json, exports);
580
- __exportStar(_null, exports);
581
- __exportStar(number, exports);
582
- __exportStar(object, exports);
583
- __exportStar(string, exports);
584
- __exportStar(_undefined, exports);
585
- __exportStar(url, exports);
546
+ };__exportStar(array$1, exports);
547
+ __exportStar(asyncIterable$1, exports);
548
+ __exportStar(bigint$1, exports);
549
+ __exportStar(boolean$1, exports);
550
+ __exportStar(char$1, exports);
551
+ __exportStar(date$1, exports);
552
+ __exportStar(_enum$1, exports);
553
+ __exportStar(error$1, exports);
554
+ __exportStar(falsy$1, exports);
555
+ __exportStar(_function$1, exports);
556
+ __exportStar(iterable$1, exports);
557
+ __exportStar(jsonRpc$1, exports);
558
+ __exportStar(json$1, exports);
559
+ __exportStar(_null$1, exports);
560
+ __exportStar(number$1, exports);
561
+ __exportStar(object$1, exports);
562
+ __exportStar(string$1, exports);
563
+ __exportStar(_undefined$1, exports);
564
+ __exportStar(url$1, exports);
586
565
 
587
- }(es2018$1));
566
+ }(es2018$3));
588
567
 
589
568
  chunkByAsync$1.chunkByAsync = void 0;
590
- const types_1$l = es2018$1;
569
+ const types_1$l = es2018$3;
591
570
  function chunkByAsync(iterable, predicate) {
592
- if (types_1$l.isAsyncIterable(iterable)) {
571
+ if ((0, types_1$l.isAsyncIterable)(iterable)) {
593
572
  return chunkByAsyncIterable(iterable);
594
573
  }
595
574
  else {
@@ -648,12 +627,12 @@ chunkBy$1.chunkBy = chunkBy;
648
627
  var chunk$1 = {};
649
628
 
650
629
  chunk$1.chunk = void 0;
651
- const go_1$e = es2018$3;
652
- const errors_1$l = es2018$2;
630
+ const go_1$f = es2018$5;
631
+ const errors_1$l = es2018$4;
653
632
  function chunk(iterable, size) {
654
- errors_1$l.assert(Number.isInteger(size), 'The parameter size must be an integer');
655
- errors_1$l.assert(size > 0, 'The parameter size must be greater than 0');
656
- return go_1$e.go(function* () {
633
+ (0, errors_1$l.assert)(Number.isInteger(size), 'The parameter size must be an integer');
634
+ (0, errors_1$l.assert)(size > 0, 'The parameter size must be greater than 0');
635
+ return (0, go_1$f.go)(function* () {
657
636
  let buffer = [];
658
637
  for (const element of iterable) {
659
638
  buffer.push(element);
@@ -671,12 +650,12 @@ chunk$1.chunk = chunk;
671
650
  var concatAsync$1 = {};
672
651
 
673
652
  concatAsync$1.concatAsync = void 0;
674
- const types_1$k = es2018$1;
675
- const go_1$d = es2018$3;
653
+ const types_1$k = es2018$3;
654
+ const go_1$e = es2018$5;
676
655
  function concatAsync(iterable, ...otherIterables) {
677
- return go_1$d.go(async function* () {
656
+ return (0, go_1$e.go)(async function* () {
678
657
  for (const iter of [iterable, ...otherIterables]) {
679
- if (types_1$k.isAsyncIterable(iter)) {
658
+ if ((0, types_1$k.isAsyncIterable)(iter)) {
680
659
  for await (const element of iter) {
681
660
  yield element;
682
661
  }
@@ -694,9 +673,9 @@ concatAsync$1.concatAsync = concatAsync;
694
673
  var concat$2 = {};
695
674
 
696
675
  concat$2.concat = void 0;
697
- const go_1$c = es2018$3;
676
+ const go_1$d = es2018$5;
698
677
  function concat$1(iterable, ...otherIterables) {
699
- return go_1$c.go(function* () {
678
+ return (0, go_1$d.go)(function* () {
700
679
  for (const iter of [iterable, ...otherIterables]) {
701
680
  yield* iter;
702
681
  }
@@ -723,15 +702,15 @@ function* copyIterable(iterable) {
723
702
  utils.copyIterable = copyIterable;
724
703
 
725
704
  dropAsync$1.dropAsync = void 0;
726
- const go_1$b = es2018$3;
705
+ const go_1$c = es2018$5;
727
706
  const utils_1$3 = utils;
728
- const errors_1$k = es2018$2;
707
+ const errors_1$k = es2018$4;
729
708
  function dropAsync(iterable, count) {
730
- errors_1$k.assert(Number.isInteger(count), 'The parameter count must be an integer');
731
- errors_1$k.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
709
+ (0, errors_1$k.assert)(Number.isInteger(count), 'The parameter count must be an integer');
710
+ (0, errors_1$k.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
732
711
  if (count === 0)
733
- return utils_1$3.copyAsyncIterable(iterable);
734
- return go_1$b.go(async function* () {
712
+ return (0, utils_1$3.copyAsyncIterable)(iterable);
713
+ return (0, go_1$c.go)(async function* () {
735
714
  var _a;
736
715
  const iterator = iterable[Symbol.asyncIterator]();
737
716
  let done;
@@ -758,15 +737,15 @@ dropAsync$1.dropAsync = dropAsync;
758
737
  var dropRightAsync$1 = {};
759
738
 
760
739
  dropRightAsync$1.dropRightAsync = void 0;
761
- const go_1$a = es2018$3;
740
+ const go_1$b = es2018$5;
762
741
  const utils_1$2 = utils;
763
- const errors_1$j = es2018$2;
742
+ const errors_1$j = es2018$4;
764
743
  function dropRightAsync(iterable, count) {
765
- errors_1$j.assert(Number.isInteger(count), 'The parameter count must be an integer');
766
- errors_1$j.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
744
+ (0, errors_1$j.assert)(Number.isInteger(count), 'The parameter count must be an integer');
745
+ (0, errors_1$j.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
767
746
  if (count === 0)
768
- return utils_1$2.copyAsyncIterable(iterable);
769
- return go_1$a.go(async function* () {
747
+ return (0, utils_1$2.copyAsyncIterable)(iterable);
748
+ return (0, go_1$b.go)(async function* () {
770
749
  const arr = await toArrayAsync$2(iterable);
771
750
  const result = arr.slice(0, -count);
772
751
  for (const value of result) {
@@ -786,15 +765,15 @@ async function toArrayAsync$2(iterable) {
786
765
  var dropRight$1 = {};
787
766
 
788
767
  dropRight$1.dropRight = void 0;
789
- const go_1$9 = es2018$3;
768
+ const go_1$a = es2018$5;
790
769
  const utils_1$1 = utils;
791
- const errors_1$i = es2018$2;
770
+ const errors_1$i = es2018$4;
792
771
  function dropRight(iterable, count) {
793
- errors_1$i.assert(Number.isInteger(count), 'The parameter count must be an integer');
794
- errors_1$i.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
772
+ (0, errors_1$i.assert)(Number.isInteger(count), 'The parameter count must be an integer');
773
+ (0, errors_1$i.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
795
774
  if (count === 0)
796
- return utils_1$1.copyIterable(iterable);
797
- return go_1$9.go(function* () {
775
+ return (0, utils_1$1.copyIterable)(iterable);
776
+ return (0, go_1$a.go)(function* () {
798
777
  const arr = Array.from(iterable);
799
778
  yield* arr.slice(0, -count);
800
779
  });
@@ -804,9 +783,9 @@ dropRight$1.dropRight = dropRight;
804
783
  var dropUntilAsync$1 = {};
805
784
 
806
785
  dropUntilAsync$1.dropUntilAsync = void 0;
807
- const types_1$j = es2018$1;
786
+ const types_1$j = es2018$3;
808
787
  function dropUntilAsync(iterable, predicate) {
809
- if (types_1$j.isAsyncIterable(iterable)) {
788
+ if ((0, types_1$j.isAsyncIterable)(iterable)) {
810
789
  return dropUntilAsyncIterable(iterable);
811
790
  }
812
791
  else {
@@ -886,15 +865,15 @@ dropUntil$1.dropUntil = dropUntil;
886
865
  var drop$1 = {};
887
866
 
888
867
  drop$1.drop = void 0;
889
- const go_1$8 = es2018$3;
868
+ const go_1$9 = es2018$5;
890
869
  const utils_1 = utils;
891
- const errors_1$h = es2018$2;
870
+ const errors_1$h = es2018$4;
892
871
  function drop(iterable, count) {
893
- errors_1$h.assert(Number.isInteger(count), 'The parameter count must be an integer');
894
- errors_1$h.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
872
+ (0, errors_1$h.assert)(Number.isInteger(count), 'The parameter count must be an integer');
873
+ (0, errors_1$h.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
895
874
  if (count === 0)
896
- return utils_1.copyIterable(iterable);
897
- return go_1$8.go(function* () {
875
+ return (0, utils_1.copyIterable)(iterable);
876
+ return (0, go_1$9.go)(function* () {
898
877
  var _a;
899
878
  const iterator = iterable[Symbol.iterator]();
900
879
  let done;
@@ -921,9 +900,9 @@ drop$1.drop = drop;
921
900
  var filterAsync$1 = {};
922
901
 
923
902
  filterAsync$1.filterAsync = void 0;
924
- const types_1$i = es2018$1;
903
+ const types_1$i = es2018$3;
925
904
  function filterAsync(iterable, predicate) {
926
- if (types_1$i.isAsyncIterable(iterable)) {
905
+ if ((0, types_1$i.isAsyncIterable)(iterable)) {
927
906
  return filterAsyncIterable(iterable);
928
907
  }
929
908
  else {
@@ -968,9 +947,9 @@ var flattenDeepAsync$1 = {};
968
947
  var flattenByAsync$1 = {};
969
948
 
970
949
  flattenByAsync$1.flattenByAsync = void 0;
971
- const types_1$h = es2018$1;
950
+ const types_1$h = es2018$3;
972
951
  function flattenByAsync(iterable, predicate) {
973
- if (types_1$h.isAsyncIterable(iterable)) {
952
+ if ((0, types_1$h.isAsyncIterable)(iterable)) {
974
953
  return flattenByAsyncIterable(iterable);
975
954
  }
976
955
  else {
@@ -1003,30 +982,30 @@ function flattenByAsync(iterable, predicate) {
1003
982
  }
1004
983
  flattenByAsync$1.flattenByAsync = flattenByAsync;
1005
984
  function isFiniteIterable$1(val) {
1006
- return types_1$h.isIterable(val) && types_1$h.isntChar(val);
985
+ return (0, types_1$h.isIterable)(val) && (0, types_1$h.isntChar)(val);
1007
986
  }
1008
987
 
1009
988
  flattenDeepAsync$1.flattenDeepAsync = void 0;
1010
989
  const flatten_by_async_1 = flattenByAsync$1;
1011
- const errors_1$g = es2018$2;
990
+ const errors_1$g = es2018$4;
1012
991
  function flattenDeepAsync(iterable, depth = Infinity) {
1013
- errors_1$g.assert(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1014
- errors_1$g.assert(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1015
- return flatten_by_async_1.flattenByAsync(iterable, (_, level) => level <= depth);
992
+ (0, errors_1$g.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
993
+ (0, errors_1$g.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
994
+ return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
1016
995
  }
1017
996
  flattenDeepAsync$1.flattenDeepAsync = flattenDeepAsync;
1018
997
 
1019
998
  flattenAsync$1.flattenAsync = void 0;
1020
999
  const flatten_deep_async_1 = flattenDeepAsync$1;
1021
1000
  function flattenAsync(iterable) {
1022
- return flatten_deep_async_1.flattenDeepAsync(iterable, 1);
1001
+ return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
1023
1002
  }
1024
1003
  flattenAsync$1.flattenAsync = flattenAsync;
1025
1004
 
1026
1005
  var flattenBy$1 = {};
1027
1006
 
1028
1007
  flattenBy$1.flattenBy = void 0;
1029
- const types_1$g = es2018$1;
1008
+ const types_1$g = es2018$3;
1030
1009
  function flattenBy(iterable, predicate) {
1031
1010
  return flatten(iterable, 1);
1032
1011
  function* flatten(iterable, level) {
@@ -1042,18 +1021,18 @@ function flattenBy(iterable, predicate) {
1042
1021
  }
1043
1022
  flattenBy$1.flattenBy = flattenBy;
1044
1023
  function isFiniteIterable(val) {
1045
- return types_1$g.isIterable(val) && types_1$g.isntChar(val);
1024
+ return (0, types_1$g.isIterable)(val) && (0, types_1$g.isntChar)(val);
1046
1025
  }
1047
1026
 
1048
1027
  var flattenDeep$1 = {};
1049
1028
 
1050
1029
  flattenDeep$1.flattenDeep = void 0;
1051
1030
  const flatten_by_1 = flattenBy$1;
1052
- const errors_1$f = es2018$2;
1031
+ const errors_1$f = es2018$4;
1053
1032
  function flattenDeep(iterable, depth = Infinity) {
1054
- errors_1$f.assert(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1055
- errors_1$f.assert(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1056
- return flatten_by_1.flattenBy(iterable, (_, level) => level <= depth);
1033
+ (0, errors_1$f.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1034
+ (0, errors_1$f.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1035
+ return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
1057
1036
  }
1058
1037
  flattenDeep$1.flattenDeep = flattenDeep;
1059
1038
 
@@ -1062,16 +1041,16 @@ var flatten$1 = {};
1062
1041
  flatten$1.flatten = void 0;
1063
1042
  const flatten_deep_1 = flattenDeep$1;
1064
1043
  function flatten(iterable) {
1065
- return flatten_deep_1.flattenDeep(iterable, 1);
1044
+ return (0, flatten_deep_1.flattenDeep)(iterable, 1);
1066
1045
  }
1067
1046
  flatten$1.flatten = flatten;
1068
1047
 
1069
1048
  var mapAsync$1 = {};
1070
1049
 
1071
1050
  mapAsync$1.mapAsync = void 0;
1072
- const types_1$f = es2018$1;
1051
+ const types_1$f = es2018$3;
1073
1052
  function mapAsync(iterable, fn) {
1074
- if (types_1$f.isAsyncIterable(iterable)) {
1053
+ if ((0, types_1$f.isAsyncIterable)(iterable)) {
1075
1054
  return mapAsyncIterable(iterable);
1076
1055
  }
1077
1056
  else {
@@ -1109,14 +1088,14 @@ map$1.map = map;
1109
1088
  var repeatAsync$1 = {};
1110
1089
 
1111
1090
  repeatAsync$1.repeatAsync = void 0;
1112
- const go_1$7 = es2018$3;
1113
- const errors_1$e = es2018$2;
1091
+ const go_1$8 = es2018$5;
1092
+ const errors_1$e = es2018$4;
1114
1093
  function repeatAsync(iterable, times) {
1115
- errors_1$e.assert(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1116
- errors_1$e.assert(times >= 0, 'The parameter times must be greater than or equal to 0');
1094
+ (0, errors_1$e.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1095
+ (0, errors_1$e.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1117
1096
  if (times === Infinity)
1118
1097
  warnInfiniteLoop$1();
1119
- return go_1$7.go(async function* () {
1098
+ return (0, go_1$8.go)(async function* () {
1120
1099
  const cache = [];
1121
1100
  if (times > 0) {
1122
1101
  for await (const element of iterable) {
@@ -1144,14 +1123,14 @@ function isProduction$1() {
1144
1123
  var repeat$4 = {};
1145
1124
 
1146
1125
  repeat$4.repeat = void 0;
1147
- const go_1$6 = es2018$3;
1148
- const errors_1$d = es2018$2;
1126
+ const go_1$7 = es2018$5;
1127
+ const errors_1$d = es2018$4;
1149
1128
  function repeat$3(iterable, times) {
1150
- errors_1$d.assert(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1151
- errors_1$d.assert(times >= 0, 'The parameter times must be greater than or equal to 0');
1129
+ (0, errors_1$d.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1130
+ (0, errors_1$d.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1152
1131
  if (times === Infinity)
1153
1132
  warnInfiniteLoop();
1154
- return go_1$6.go(function* () {
1133
+ return (0, go_1$7.go)(function* () {
1155
1134
  const cache = [];
1156
1135
  if (times > 0) {
1157
1136
  for (const element of iterable) {
@@ -1179,14 +1158,14 @@ function isProduction() {
1179
1158
  var sliceAsync$1 = {};
1180
1159
 
1181
1160
  sliceAsync$1.sliceAsync = void 0;
1182
- const go_1$5 = es2018$3;
1183
- const errors_1$c = es2018$2;
1161
+ const go_1$6 = es2018$5;
1162
+ const errors_1$c = es2018$4;
1184
1163
  function sliceAsync(iterable, start, end = Infinity) {
1185
- errors_1$c.assert(Number.isInteger(start), 'The parameter start must be an integer');
1186
- errors_1$c.assert(start >= 0, 'The parameter start must be greater than or equal to 0');
1187
- errors_1$c.assert(Number.isInteger(end), 'The parameter end must be an integer');
1188
- errors_1$c.assert(end >= start, 'The parameter end must be greater than or equal to start');
1189
- return go_1$5.go(async function* () {
1164
+ (0, errors_1$c.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1165
+ (0, errors_1$c.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1166
+ (0, errors_1$c.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1167
+ (0, errors_1$c.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1168
+ return (0, go_1$6.go)(async function* () {
1190
1169
  let index = 0;
1191
1170
  for await (const element of iterable) {
1192
1171
  if (index >= end)
@@ -1202,14 +1181,14 @@ sliceAsync$1.sliceAsync = sliceAsync;
1202
1181
  var slice$1 = {};
1203
1182
 
1204
1183
  slice$1.slice = void 0;
1205
- const go_1$4 = es2018$3;
1206
- const errors_1$b = es2018$2;
1184
+ const go_1$5 = es2018$5;
1185
+ const errors_1$b = es2018$4;
1207
1186
  function slice(iterable, start, end = Infinity) {
1208
- errors_1$b.assert(Number.isInteger(start), 'The parameter start must be an integer');
1209
- errors_1$b.assert(start >= 0, 'The parameter start must be greater than or equal to 0');
1210
- errors_1$b.assert(Number.isInteger(end), 'The parameter end must be an integer');
1211
- errors_1$b.assert(end >= start, 'The parameter end must be greater than or equal to start');
1212
- return go_1$4.go(function* () {
1187
+ (0, errors_1$b.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1188
+ (0, errors_1$b.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1189
+ (0, errors_1$b.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1190
+ (0, errors_1$b.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1191
+ return (0, go_1$5.go)(function* () {
1213
1192
  let index = 0;
1214
1193
  for (const element of iterable) {
1215
1194
  if (index >= end)
@@ -1243,9 +1222,9 @@ splitAsync$1.splitAsync = splitAsync;
1243
1222
  var splitByAsync$1 = {};
1244
1223
 
1245
1224
  splitByAsync$1.splitByAsync = void 0;
1246
- const types_1$e = es2018$1;
1225
+ const types_1$e = es2018$3;
1247
1226
  function splitByAsync(iterable, predicate) {
1248
- if (types_1$e.isAsyncIterable(iterable)) {
1227
+ if ((0, types_1$e.isAsyncIterable)(iterable)) {
1249
1228
  return splitByAsyncIterable(iterable);
1250
1229
  }
1251
1230
  else {
@@ -1325,12 +1304,12 @@ split$1.split = split;
1325
1304
  var takeAsync$1 = {};
1326
1305
 
1327
1306
  takeAsync$1.takeAsync = void 0;
1328
- const go_1$3 = es2018$3;
1329
- const errors_1$a = es2018$2;
1307
+ const go_1$4 = es2018$5;
1308
+ const errors_1$a = es2018$4;
1330
1309
  function takeAsync(iterable, count) {
1331
- errors_1$a.assert(Number.isInteger(count), 'The parameter count must be an integer');
1332
- errors_1$a.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
1333
- return go_1$3.go(async function* () {
1310
+ (0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1311
+ (0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1312
+ return (0, go_1$4.go)(async function* () {
1334
1313
  if (count === 0)
1335
1314
  return;
1336
1315
  for await (const element of iterable) {
@@ -1346,12 +1325,12 @@ takeAsync$1.takeAsync = takeAsync;
1346
1325
  var takeRightAsync$1 = {};
1347
1326
 
1348
1327
  takeRightAsync$1.takeRightAsync = void 0;
1349
- const go_1$2 = es2018$3;
1350
- const errors_1$9 = es2018$2;
1328
+ const go_1$3 = es2018$5;
1329
+ const errors_1$9 = es2018$4;
1351
1330
  function takeRightAsync(iterable, count) {
1352
- errors_1$9.assert(Number.isInteger(count), 'The parameter count must be an integer');
1353
- errors_1$9.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
1354
- return go_1$2.go(async function* () {
1331
+ (0, errors_1$9.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1332
+ (0, errors_1$9.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1333
+ return (0, go_1$3.go)(async function* () {
1355
1334
  var _a;
1356
1335
  const iterator = iterable[Symbol.asyncIterator]();
1357
1336
  let done;
@@ -1376,12 +1355,12 @@ takeRightAsync$1.takeRightAsync = takeRightAsync;
1376
1355
  var takeRight$1 = {};
1377
1356
 
1378
1357
  takeRight$1.takeRight = void 0;
1379
- const go_1$1 = es2018$3;
1380
- const errors_1$8 = es2018$2;
1358
+ const go_1$2 = es2018$5;
1359
+ const errors_1$8 = es2018$4;
1381
1360
  function takeRight(iterable, count) {
1382
- errors_1$8.assert(Number.isInteger(count), 'The parameter count must be an integer');
1383
- errors_1$8.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
1384
- return go_1$1.go(function* () {
1361
+ (0, errors_1$8.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1362
+ (0, errors_1$8.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1363
+ return (0, go_1$2.go)(function* () {
1385
1364
  var _a;
1386
1365
  const iterator = iterable[Symbol.iterator]();
1387
1366
  let done;
@@ -1406,9 +1385,9 @@ takeRight$1.takeRight = takeRight;
1406
1385
  var takeUntilAsync$1 = {};
1407
1386
 
1408
1387
  takeUntilAsync$1.takeUntilAsync = void 0;
1409
- const types_1$d = es2018$1;
1388
+ const types_1$d = es2018$3;
1410
1389
  function takeUntilAsync(iterable, predicate) {
1411
- if (types_1$d.isAsyncIterable(iterable)) {
1390
+ if ((0, types_1$d.isAsyncIterable)(iterable)) {
1412
1391
  return takeUntilAsyncIterable(iterable);
1413
1392
  }
1414
1393
  else {
@@ -1452,12 +1431,12 @@ takeUntil$1.takeUntil = takeUntil;
1452
1431
  var take$1 = {};
1453
1432
 
1454
1433
  take$1.take = void 0;
1455
- const go_1 = es2018$3;
1456
- const errors_1$7 = es2018$2;
1434
+ const go_1$1 = es2018$5;
1435
+ const errors_1$7 = es2018$4;
1457
1436
  function take(iterable, count) {
1458
- errors_1$7.assert(Number.isInteger(count), 'The parameter count must be an integer');
1459
- errors_1$7.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
1460
- return go_1.go(function* () {
1437
+ (0, errors_1$7.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1438
+ (0, errors_1$7.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1439
+ return (0, go_1$1.go)(function* () {
1461
1440
  if (count === 0)
1462
1441
  return;
1463
1442
  for (const element of iterable) {
@@ -1473,9 +1452,9 @@ take$1.take = take;
1473
1452
  var tapAsync$1 = {};
1474
1453
 
1475
1454
  tapAsync$1.tapAsync = void 0;
1476
- const types_1$c = es2018$1;
1455
+ const types_1$c = es2018$3;
1477
1456
  function tapAsync(iterable, fn) {
1478
- if (types_1$c.isAsyncIterable(iterable)) {
1457
+ if ((0, types_1$c.isAsyncIterable)(iterable)) {
1479
1458
  return tapAsyncIterable(iterable);
1480
1459
  }
1481
1460
  else {
@@ -1556,9 +1535,9 @@ uniqAsync$1.uniqAsync = uniqAsync;
1556
1535
  var uniqByAsync$1 = {};
1557
1536
 
1558
1537
  uniqByAsync$1.uniqByAsync = void 0;
1559
- const types_1$b = es2018$1;
1538
+ const types_1$b = es2018$3;
1560
1539
  function uniqByAsync(iterable, fn) {
1561
- if (types_1$b.isAsyncIterable(iterable)) {
1540
+ if ((0, types_1$b.isAsyncIterable)(iterable)) {
1562
1541
  return uniqByAsyncIterable(iterable);
1563
1542
  }
1564
1543
  else {
@@ -1625,7 +1604,7 @@ uniq$1.uniq = uniq;
1625
1604
  var zipAsync$1 = {};
1626
1605
 
1627
1606
  zipAsync$1.zipAsync = void 0;
1628
- const types_1$a = es2018$1;
1607
+ const types_1$a = es2018$3;
1629
1608
  var Kind;
1630
1609
  (function (Kind) {
1631
1610
  Kind[Kind["Sync"] = 0] = "Sync";
@@ -1639,7 +1618,7 @@ async function* zipWithSize$1(...iterables) {
1639
1618
  var _a, _b, _c, _d;
1640
1619
  const length = iterables.length;
1641
1620
  const iterators = iterables.map(iterable => {
1642
- if (types_1$a.isAsyncIterable(iterable)) {
1621
+ if ((0, types_1$a.isAsyncIterable)(iterable)) {
1643
1622
  return [Kind.Async, iterable[Symbol.asyncIterator]()];
1644
1623
  }
1645
1624
  else {
@@ -1785,9 +1764,9 @@ consume$1.consume = consume;
1785
1764
  var eachAsync$1 = {};
1786
1765
 
1787
1766
  eachAsync$1.eachAsync = void 0;
1788
- const types_1$9 = es2018$1;
1767
+ const types_1$9 = es2018$3;
1789
1768
  function eachAsync(iterable, fn) {
1790
- if (types_1$9.isAsyncIterable(iterable)) {
1769
+ if ((0, types_1$9.isAsyncIterable)(iterable)) {
1791
1770
  return eachAsyncIterable(iterable);
1792
1771
  }
1793
1772
  else {
@@ -1825,9 +1804,9 @@ each$1.each = each;
1825
1804
  var everyAsync$1 = {};
1826
1805
 
1827
1806
  everyAsync$1.everyAsync = void 0;
1828
- const types_1$8 = es2018$1;
1807
+ const types_1$8 = es2018$3;
1829
1808
  function everyAsync(iterable, predicate) {
1830
- if (types_1$8.isAsyncIterable(iterable)) {
1809
+ if ((0, types_1$8.isAsyncIterable)(iterable)) {
1831
1810
  return everyAsyncIterable(iterable);
1832
1811
  }
1833
1812
  else {
@@ -1871,9 +1850,9 @@ every$1.every = every;
1871
1850
  var findAsync$1 = {};
1872
1851
 
1873
1852
  findAsync$1.findAsync = void 0;
1874
- const types_1$7 = es2018$1;
1853
+ const types_1$7 = es2018$3;
1875
1854
  function findAsync(iterable, predicate) {
1876
- if (types_1$7.isAsyncIterable(iterable)) {
1855
+ if ((0, types_1$7.isAsyncIterable)(iterable)) {
1877
1856
  return findAsyncIterable(iterable);
1878
1857
  }
1879
1858
  else {
@@ -1995,9 +1974,9 @@ match$2.match = match$1;
1995
1974
  var reduceAsync$1 = {};
1996
1975
 
1997
1976
  reduceAsync$1.reduceAsync = void 0;
1998
- const types_1$6 = es2018$1;
1977
+ const types_1$6 = es2018$3;
1999
1978
  function reduceAsync(iterable, fn, initialValue) {
2000
- if (types_1$6.isUndefined(initialValue)) {
1979
+ if ((0, types_1$6.isUndefined)(initialValue)) {
2001
1980
  return reduceAsyncWithoutInitialValue(iterable, fn);
2002
1981
  }
2003
1982
  else {
@@ -2006,7 +1985,7 @@ function reduceAsync(iterable, fn, initialValue) {
2006
1985
  }
2007
1986
  reduceAsync$1.reduceAsync = reduceAsync;
2008
1987
  function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2009
- if (types_1$6.isAsyncIterable(iterable)) {
1988
+ if ((0, types_1$6.isAsyncIterable)(iterable)) {
2010
1989
  return reduceAsyncIterable(iterable);
2011
1990
  }
2012
1991
  else {
@@ -2028,7 +2007,7 @@ function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2028
2007
  }
2029
2008
  }
2030
2009
  function reduceAsyncWithoutInitialValue(iterable, fn) {
2031
- if (types_1$6.isAsyncIterable(iterable)) {
2010
+ if ((0, types_1$6.isAsyncIterable)(iterable)) {
2032
2011
  return reduceAsyncIterable(iterable);
2033
2012
  }
2034
2013
  else {
@@ -2091,9 +2070,9 @@ function reduceAsyncWithoutInitialValue(iterable, fn) {
2091
2070
  var reduce$1 = {};
2092
2071
 
2093
2072
  reduce$1.reduce = void 0;
2094
- const types_1$5 = es2018$1;
2073
+ const types_1$5 = es2018$3;
2095
2074
  function reduce(iterable, fn, initialValue) {
2096
- if (types_1$5.isUndefined(initialValue)) {
2075
+ if ((0, types_1$5.isUndefined)(initialValue)) {
2097
2076
  return reduceWithoutInitialValue(iterable, fn);
2098
2077
  }
2099
2078
  else {
@@ -2138,9 +2117,9 @@ function reduceWithoutInitialValue(iterable, fn) {
2138
2117
  var someAsync$1 = {};
2139
2118
 
2140
2119
  someAsync$1.someAsync = void 0;
2141
- const types_1$4 = es2018$1;
2120
+ const types_1$4 = es2018$3;
2142
2121
  function someAsync(iterable, predicate) {
2143
- if (types_1$4.isAsyncIterable(iterable)) {
2122
+ if ((0, types_1$4.isAsyncIterable)(iterable)) {
2144
2123
  return someAsyncIterable(iterable);
2145
2124
  }
2146
2125
  else {
@@ -2230,7 +2209,7 @@ var toArrayAsync$1 = {};
2230
2209
  toArrayAsync$1.toArrayAsync = void 0;
2231
2210
  const consume_1$3 = consume$1;
2232
2211
  function toArrayAsync(iterable) {
2233
- return consume_1$3.consume(iterable, async (iterable) => {
2212
+ return (0, consume_1$3.consume)(iterable, async (iterable) => {
2234
2213
  const result = [];
2235
2214
  for await (const element of iterable) {
2236
2215
  result.push(element);
@@ -2245,7 +2224,7 @@ var toArray$1 = {};
2245
2224
  toArray$1.toArray = void 0;
2246
2225
  const consume_1$2 = consume$1;
2247
2226
  function toArray(iterable) {
2248
- return consume_1$2.consume(iterable, iterable => Array.from(iterable));
2227
+ return (0, consume_1$2.consume)(iterable, iterable => Array.from(iterable));
2249
2228
  }
2250
2229
  toArray$1.toArray = toArray;
2251
2230
 
@@ -2254,7 +2233,7 @@ var toSetAsync$1 = {};
2254
2233
  toSetAsync$1.toSetAsync = void 0;
2255
2234
  const consume_1$1 = consume$1;
2256
2235
  function toSetAsync(iterable) {
2257
- return consume_1$1.consume(iterable, async (iterable) => {
2236
+ return (0, consume_1$1.consume)(iterable, async (iterable) => {
2258
2237
  const result = new Set();
2259
2238
  for await (const element of iterable) {
2260
2239
  result.add(element);
@@ -2269,7 +2248,7 @@ var toSet$1 = {};
2269
2248
  toSet$1.toSet = void 0;
2270
2249
  const consume_1 = consume$1;
2271
2250
  function toSet(iterable) {
2272
- return consume_1.consume(iterable, iterable => new Set(iterable));
2251
+ return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
2273
2252
  }
2274
2253
  toSet$1.toSet = toSet;
2275
2254
 
@@ -2322,15 +2301,15 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
2322
2301
  };__exportStar(middleware, exports);
2323
2302
  __exportStar(output, exports);
2324
2303
 
2325
- }(es2018$4));
2304
+ }(es2018$6));
2326
2305
 
2327
2306
  unwrap$1.unwrap = void 0;
2328
2307
  const flat_map_1 = flatMap$1;
2329
- const iterable_operator_1$2 = es2018$4;
2308
+ const iterable_operator_1$2 = es2018$6;
2330
2309
  function unwrap(node, predicate) {
2331
- return flat_map_1.flatMap(node, node => {
2310
+ return (0, flat_map_1.flatMap)(node, node => {
2332
2311
  if (predicate(node)) {
2333
- return iterable_operator_1$2.toArray(iterable_operator_1$2.flatten(iterable_operator_1$2.map(node.childNodes, node => unwrap(node, predicate))));
2312
+ return (0, iterable_operator_1$2.toArray)((0, iterable_operator_1$2.flatten)((0, iterable_operator_1$2.map)(node.childNodes, node => unwrap(node, predicate))));
2334
2313
  }
2335
2314
  else {
2336
2315
  return [node];
@@ -2356,9 +2335,9 @@ traverseDescendantNodes$1.traverseDescendantNodes = traverseDescendantNodes;
2356
2335
 
2357
2336
  findInDescendantNodes$1.findInDescendantNodes = void 0;
2358
2337
  const traverse_descendant_nodes_1 = traverseDescendantNodes$1;
2359
- const iterable_operator_1$1 = es2018$4;
2338
+ const iterable_operator_1$1 = es2018$6;
2360
2339
  function findInDescendantNodes(node, predicate) {
2361
- return iterable_operator_1$1.find(traverse_descendant_nodes_1.traverseDescendantNodes(node), node => predicate(node));
2340
+ return (0, iterable_operator_1$1.find)((0, traverse_descendant_nodes_1.traverseDescendantNodes)(node), node => predicate(node));
2362
2341
  }
2363
2342
  findInDescendantNodes$1.findInDescendantNodes = findInDescendantNodes;
2364
2343
 
@@ -2367,7 +2346,7 @@ const find_in_descendant_nodes_1 = findInDescendantNodes$1;
2367
2346
  function find(node, predicate) {
2368
2347
  if (predicate(node))
2369
2348
  return node;
2370
- return find_in_descendant_nodes_1.findInDescendantNodes(node, predicate);
2349
+ return (0, find_in_descendant_nodes_1.findInDescendantNodes)(node, predicate);
2371
2350
  }
2372
2351
  find$1.find = find;
2373
2352
 
@@ -2397,7 +2376,7 @@ normalize$1.normalize = void 0;
2397
2376
  const parse_1 = parse$1;
2398
2377
  const stringify_1 = stringify$1;
2399
2378
  function normalize(html) {
2400
- return stringify_1.stringify(parse_1.parse(html));
2379
+ return (0, stringify_1.stringify)((0, parse_1.parse)(html));
2401
2380
  }
2402
2381
  normalize$1.normalize = normalize;
2403
2382
 
@@ -2466,52 +2445,553 @@ const nodeExists = 'Node' in globalThis;
2466
2445
 
2467
2446
  }(nodeType));
2468
2447
 
2469
- isDocument$1.isDocument = void 0;
2470
- const node_type_1$2 = nodeType;
2471
- const types_1$3 = es2018$1;
2472
- function isDocument(val) {
2473
- if ('HTMLDocument' in globalThis && val instanceof HTMLDocument)
2474
- return true;
2475
- return types_1$3.isRecord(val) && val.nodeType === node_type_1$2.NodeType.DOCUMENT_NODE;
2476
- }
2477
- isDocument$1.isDocument = isDocument;
2448
+ var es2018$2 = {};
2478
2449
 
2479
- var isElement$1 = {};
2450
+ var array = {};
2480
2451
 
2481
- isElement$1.isElement = void 0;
2482
- const node_type_1$1 = nodeType;
2483
- const types_1$2 = es2018$1;
2484
- function isElement(val) {
2485
- if ('HTMLElement' in globalThis && val instanceof HTMLElement)
2486
- return true;
2487
- return types_1$2.isRecord(val) && val.nodeType === node_type_1$1.NodeType.ELEMENT_NODE;
2452
+ array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
2453
+ function isArray(val) {
2454
+ return Array.isArray(val);
2488
2455
  }
2489
- isElement$1.isElement = isElement;
2490
-
2491
- getBySelector$1.getBySelector = void 0;
2492
- const is_document_1$2 = isDocument$1;
2493
- const is_element_1$4 = isElement$1;
2494
- function getBySelector(selectors) {
2495
- const root = (is_element_1$4.isElement(this) || is_document_1$2.isDocument(this)
2496
- ? this
2497
- : document);
2498
- const result = root.querySelector(selectors);
2499
- if (result) {
2500
- return result;
2501
- }
2502
- else {
2503
- throw new Error(`Could not find any elements matching ${selectors}`);
2504
- }
2456
+ array.isArray = isArray;
2457
+ function isntArray(val) {
2458
+ return !isArray(val);
2505
2459
  }
2506
- getBySelector$1.getBySelector = getBySelector;
2507
-
2508
- var getAllBySelector$1 = {};
2460
+ array.isntArray = isntArray;
2461
+ function isEmptyArray(val) {
2462
+ return val.length === 0;
2463
+ }
2464
+ array.isEmptyArray = isEmptyArray;
2465
+ function isntEmptyArray(val) {
2466
+ return val.length !== 0;
2467
+ }
2468
+ array.isntEmptyArray = isntEmptyArray;
2469
+
2470
+ var asyncIterable = {};
2471
+
2472
+ var _null = {};
2473
+
2474
+ _null.isntNull = _null.isNull = void 0;
2475
+ function isNull(val) {
2476
+ return val === null;
2477
+ }
2478
+ _null.isNull = isNull;
2479
+ function isntNull(val) {
2480
+ return !isNull(val);
2481
+ }
2482
+ _null.isntNull = isntNull;
2483
+
2484
+ var _undefined = {};
2485
+
2486
+ _undefined.isntUndefined = _undefined.isUndefined = void 0;
2487
+ function isUndefined(val) {
2488
+ return val === undefined;
2489
+ }
2490
+ _undefined.isUndefined = isUndefined;
2491
+ function isntUndefined(val) {
2492
+ return !isUndefined(val);
2493
+ }
2494
+ _undefined.isntUndefined = isntUndefined;
2495
+
2496
+ asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
2497
+ const null_1$1 = _null;
2498
+ const undefined_1$2 = _undefined;
2499
+ function isAsyncIterable(val) {
2500
+ return (0, null_1$1.isntNull)(val)
2501
+ && (0, undefined_1$2.isntUndefined)(val)
2502
+ && typeof val[Symbol.asyncIterator] === 'function';
2503
+ }
2504
+ asyncIterable.isAsyncIterable = isAsyncIterable;
2505
+ function isntAsyncIterable(val) {
2506
+ return !isAsyncIterable(val);
2507
+ }
2508
+ asyncIterable.isntAsyncIterable = isntAsyncIterable;
2509
+
2510
+ var bigint = {};
2511
+
2512
+ bigint.isntBigInt = bigint.isBigInt = void 0;
2513
+ function isBigInt(val) {
2514
+ return typeof val === 'bigint';
2515
+ }
2516
+ bigint.isBigInt = isBigInt;
2517
+ function isntBigInt(val) {
2518
+ return !isBigInt(val);
2519
+ }
2520
+ bigint.isntBigInt = isntBigInt;
2521
+
2522
+ var boolean = {};
2523
+
2524
+ boolean.isntBoolean = boolean.isBoolean = void 0;
2525
+ function isBoolean(val) {
2526
+ return typeof val === 'boolean';
2527
+ }
2528
+ boolean.isBoolean = isBoolean;
2529
+ function isntBoolean(val) {
2530
+ return !isBoolean(val);
2531
+ }
2532
+ boolean.isntBoolean = isntBoolean;
2533
+
2534
+ var char = {};
2535
+
2536
+ var string = {};
2537
+
2538
+ string.isntString = string.isString = void 0;
2539
+ function isString(val) {
2540
+ return typeof val === 'string';
2541
+ }
2542
+ string.isString = isString;
2543
+ function isntString(val) {
2544
+ return !isString(val);
2545
+ }
2546
+ string.isntString = isntString;
2547
+
2548
+ char.isntChar = char.isChar = void 0;
2549
+ const string_1$1 = string;
2550
+ function isChar(val) {
2551
+ return (0, string_1$1.isString)(val)
2552
+ && val.length === 1;
2553
+ }
2554
+ char.isChar = isChar;
2555
+ function isntChar(val) {
2556
+ return !isChar(val);
2557
+ }
2558
+ char.isntChar = isntChar;
2559
+
2560
+ var date = {};
2561
+
2562
+ date.isntDate = date.isDate = void 0;
2563
+ function isDate(val) {
2564
+ return val instanceof Date;
2565
+ }
2566
+ date.isDate = isDate;
2567
+ function isntDate(val) {
2568
+ return !isDate(val);
2569
+ }
2570
+ date.isntDate = isntDate;
2571
+
2572
+ var _enum = {};
2573
+
2574
+ _enum.inEnum = void 0;
2575
+ function inEnum(val, _enum) {
2576
+ return Object.values(_enum).includes(val);
2577
+ }
2578
+ _enum.inEnum = inEnum;
2579
+
2580
+ var error = {};
2581
+
2582
+ error.isntError = error.isError = void 0;
2583
+ function isError(val) {
2584
+ return val instanceof Error;
2585
+ }
2586
+ error.isError = isError;
2587
+ function isntError(val) {
2588
+ return !isError(val);
2589
+ }
2590
+ error.isntError = isntError;
2591
+
2592
+ var falsy = {};
2593
+
2594
+ falsy.isntFalsy = falsy.isFalsy = void 0;
2595
+ function isFalsy(val) {
2596
+ return !val;
2597
+ }
2598
+ falsy.isFalsy = isFalsy;
2599
+ function isntFalsy(val) {
2600
+ return !isFalsy(val);
2601
+ }
2602
+ falsy.isntFalsy = isntFalsy;
2603
+
2604
+ var _function = {};
2605
+
2606
+ _function.isntFunction = _function.isFunction = void 0;
2607
+ function isFunction(val) {
2608
+ return typeof val === 'function';
2609
+ }
2610
+ _function.isFunction = isFunction;
2611
+ function isntFunction(val) {
2612
+ return !isFunction(val);
2613
+ }
2614
+ _function.isntFunction = isntFunction;
2615
+
2616
+ var iterable = {};
2617
+
2618
+ iterable.isntIterable = iterable.isIterable = void 0;
2619
+ const null_1 = _null;
2620
+ const undefined_1$1 = _undefined;
2621
+ function isIterable(val) {
2622
+ return (0, null_1.isntNull)(val)
2623
+ && (0, undefined_1$1.isntUndefined)(val)
2624
+ && typeof val[Symbol.iterator] === 'function';
2625
+ }
2626
+ iterable.isIterable = isIterable;
2627
+ function isntIterable(val) {
2628
+ return !isIterable(val);
2629
+ }
2630
+ iterable.isntIterable = isntIterable;
2631
+
2632
+ var jsonRpc = {};
2633
+
2634
+ var object = {};
2635
+
2636
+ /**
2637
+ * lodash (Custom Build) <https://lodash.com/>
2638
+ * Build: `lodash modularize exports="npm" -o ./`
2639
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
2640
+ * Released under MIT license <https://lodash.com/license>
2641
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
2642
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2643
+ */
2644
+
2645
+ /** `Object#toString` result references. */
2646
+ var objectTag = '[object Object]';
2647
+
2648
+ /**
2649
+ * Checks if `value` is a host object in IE < 9.
2650
+ *
2651
+ * @private
2652
+ * @param {*} value The value to check.
2653
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
2654
+ */
2655
+ function isHostObject(value) {
2656
+ // Many host objects are `Object` objects that can coerce to strings
2657
+ // despite having improperly defined `toString` methods.
2658
+ var result = false;
2659
+ if (value != null && typeof value.toString != 'function') {
2660
+ try {
2661
+ result = !!(value + '');
2662
+ } catch (e) {}
2663
+ }
2664
+ return result;
2665
+ }
2666
+
2667
+ /**
2668
+ * Creates a unary function that invokes `func` with its argument transformed.
2669
+ *
2670
+ * @private
2671
+ * @param {Function} func The function to wrap.
2672
+ * @param {Function} transform The argument transform.
2673
+ * @returns {Function} Returns the new function.
2674
+ */
2675
+ function overArg(func, transform) {
2676
+ return function(arg) {
2677
+ return func(transform(arg));
2678
+ };
2679
+ }
2680
+
2681
+ /** Used for built-in method references. */
2682
+ var funcProto = Function.prototype,
2683
+ objectProto$1 = Object.prototype;
2684
+
2685
+ /** Used to resolve the decompiled source of functions. */
2686
+ var funcToString = funcProto.toString;
2687
+
2688
+ /** Used to check objects for own properties. */
2689
+ var hasOwnProperty = objectProto$1.hasOwnProperty;
2690
+
2691
+ /** Used to infer the `Object` constructor. */
2692
+ var objectCtorString = funcToString.call(Object);
2693
+
2694
+ /**
2695
+ * Used to resolve the
2696
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2697
+ * of values.
2698
+ */
2699
+ var objectToString$1 = objectProto$1.toString;
2700
+
2701
+ /** Built-in value references. */
2702
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
2703
+
2704
+ /**
2705
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
2706
+ * and has a `typeof` result of "object".
2707
+ *
2708
+ * @static
2709
+ * @memberOf _
2710
+ * @since 4.0.0
2711
+ * @category Lang
2712
+ * @param {*} value The value to check.
2713
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
2714
+ * @example
2715
+ *
2716
+ * _.isObjectLike({});
2717
+ * // => true
2718
+ *
2719
+ * _.isObjectLike([1, 2, 3]);
2720
+ * // => true
2721
+ *
2722
+ * _.isObjectLike(_.noop);
2723
+ * // => false
2724
+ *
2725
+ * _.isObjectLike(null);
2726
+ * // => false
2727
+ */
2728
+ function isObjectLike$1(value) {
2729
+ return !!value && typeof value == 'object';
2730
+ }
2731
+
2732
+ /**
2733
+ * Checks if `value` is a plain object, that is, an object created by the
2734
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
2735
+ *
2736
+ * @static
2737
+ * @memberOf _
2738
+ * @since 0.8.0
2739
+ * @category Lang
2740
+ * @param {*} value The value to check.
2741
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
2742
+ * @example
2743
+ *
2744
+ * function Foo() {
2745
+ * this.a = 1;
2746
+ * }
2747
+ *
2748
+ * _.isPlainObject(new Foo);
2749
+ * // => false
2750
+ *
2751
+ * _.isPlainObject([1, 2, 3]);
2752
+ * // => false
2753
+ *
2754
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
2755
+ * // => true
2756
+ *
2757
+ * _.isPlainObject(Object.create(null));
2758
+ * // => true
2759
+ */
2760
+ function isPlainObject$1(value) {
2761
+ if (!isObjectLike$1(value) ||
2762
+ objectToString$1.call(value) != objectTag || isHostObject(value)) {
2763
+ return false;
2764
+ }
2765
+ var proto = getPrototype(value);
2766
+ if (proto === null) {
2767
+ return true;
2768
+ }
2769
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
2770
+ return (typeof Ctor == 'function' &&
2771
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
2772
+ }
2773
+
2774
+ var lodash_isplainobject = isPlainObject$1;
2775
+
2776
+ var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
2777
+ return (mod && mod.__esModule) ? mod : { "default": mod };
2778
+ };object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
2779
+ const lodash_isplainobject_1 = __importDefault$1(lodash_isplainobject);
2780
+ function isObject$1(val) {
2781
+ return val !== null
2782
+ && typeof val === 'object';
2783
+ }
2784
+ object.isObject = isObject$1;
2785
+ function isntObject(val) {
2786
+ return !isObject$1(val);
2787
+ }
2788
+ object.isntObject = isntObject;
2789
+ function isPlainObject(val) {
2790
+ return (0, lodash_isplainobject_1.default)(val);
2791
+ }
2792
+ object.isPlainObject = isPlainObject;
2793
+ function isntPlainObject(val) {
2794
+ return !isPlainObject(val);
2795
+ }
2796
+ object.isntPlainObject = isntPlainObject;
2797
+ function isEmptyObject(val) {
2798
+ return Object.keys(val).length === 0;
2799
+ }
2800
+ object.isEmptyObject = isEmptyObject;
2801
+ function isntEmptyObject(val) {
2802
+ return Object.keys(val).length !== 0;
2803
+ }
2804
+ object.isntEmptyObject = isntEmptyObject;
2805
+
2806
+ var number = {};
2807
+
2808
+ number.isntNumber = number.isNumber = void 0;
2809
+ function isNumber(val) {
2810
+ return typeof val === 'number';
2811
+ }
2812
+ number.isNumber = isNumber;
2813
+ function isntNumber(val) {
2814
+ return !isNumber(val);
2815
+ }
2816
+ number.isntNumber = isntNumber;
2817
+
2818
+ jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
2819
+ const array_1 = array;
2820
+ const object_1 = object;
2821
+ const string_1 = string;
2822
+ const number_1 = number;
2823
+ const undefined_1 = _undefined;
2824
+ function isJsonRpcId(val) {
2825
+ return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
2826
+ }
2827
+ function isJsonRpcParams(val) {
2828
+ return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
2829
+ }
2830
+ function isJsonRpcNotification(val) {
2831
+ return (0, object_1.isPlainObject)(val)
2832
+ && (0, string_1.isString)(val.jsonrpc)
2833
+ && (0, string_1.isString)(val.method)
2834
+ && (0, undefined_1.isUndefined)(val.id)
2835
+ && isJsonRpcParams(val.params);
2836
+ }
2837
+ jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
2838
+ function isntJsonRpcNotification(val) {
2839
+ return !isJsonRpcNotification(val);
2840
+ }
2841
+ jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
2842
+ function isJsonRpcRequest(val) {
2843
+ return (0, object_1.isPlainObject)(val)
2844
+ && (0, string_1.isString)(val.jsonrpc)
2845
+ && (0, string_1.isString)(val.method)
2846
+ && isJsonRpcId(val.id)
2847
+ && isJsonRpcParams(val.params);
2848
+ }
2849
+ jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
2850
+ function isntJsonRpcRequest(val) {
2851
+ return !isJsonRpcRequest(val);
2852
+ }
2853
+ jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
2854
+ function isJsonRpcSuccess(val) {
2855
+ return (0, object_1.isPlainObject)(val)
2856
+ && (0, string_1.isString)(val.jsonrpc)
2857
+ && (0, string_1.isString)(val.id)
2858
+ && 'result' in val;
2859
+ }
2860
+ jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
2861
+ function isntJsonRpcSuccess(val) {
2862
+ return !isJsonRpcSuccess(val);
2863
+ }
2864
+ jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
2865
+ function isJsonRpcError(val) {
2866
+ return (0, object_1.isPlainObject)(val)
2867
+ && (0, string_1.isString)(val.jsonrpc)
2868
+ && isJsonRpcId(val.id)
2869
+ && isJsonRpcErrorObject(val.error);
2870
+ }
2871
+ jsonRpc.isJsonRpcError = isJsonRpcError;
2872
+ function isntJsonRpcError(val) {
2873
+ return !isJsonRpcError(val);
2874
+ }
2875
+ jsonRpc.isntJsonRpcError = isntJsonRpcError;
2876
+ function isJsonRpcErrorObject(val) {
2877
+ return (0, object_1.isPlainObject)(val)
2878
+ && (0, number_1.isNumber)(val.code)
2879
+ && (0, string_1.isString)(val.message)
2880
+ && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
2881
+ }
2882
+
2883
+ var json = {};
2884
+
2885
+ json.isntJson = json.isJson = void 0;
2886
+ function isJson(val) {
2887
+ try {
2888
+ JSON.stringify(val);
2889
+ return true;
2890
+ }
2891
+ catch (_a) {
2892
+ return false;
2893
+ }
2894
+ }
2895
+ json.isJson = isJson;
2896
+ function isntJson(val) {
2897
+ return !isntJson();
2898
+ }
2899
+ json.isntJson = isntJson;
2900
+
2901
+ var url = {};
2902
+
2903
+ url.isAbsoluteURL = void 0;
2904
+ function isAbsoluteURL(str) {
2905
+ try {
2906
+ new URL(str);
2907
+ return true;
2908
+ }
2909
+ catch (_a) {
2910
+ return false;
2911
+ }
2912
+ }
2913
+ url.isAbsoluteURL = isAbsoluteURL;
2914
+
2915
+ (function (exports) {
2916
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2917
+ if (k2 === undefined) k2 = k;
2918
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2919
+ }) : (function(o, m, k, k2) {
2920
+ if (k2 === undefined) k2 = k;
2921
+ o[k2] = m[k];
2922
+ }));
2923
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2924
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2925
+ };__exportStar(array, exports);
2926
+ __exportStar(asyncIterable, exports);
2927
+ __exportStar(bigint, exports);
2928
+ __exportStar(boolean, exports);
2929
+ __exportStar(char, exports);
2930
+ __exportStar(date, exports);
2931
+ __exportStar(_enum, exports);
2932
+ __exportStar(error, exports);
2933
+ __exportStar(falsy, exports);
2934
+ __exportStar(_function, exports);
2935
+ __exportStar(iterable, exports);
2936
+ __exportStar(jsonRpc, exports);
2937
+ __exportStar(json, exports);
2938
+ __exportStar(_null, exports);
2939
+ __exportStar(number, exports);
2940
+ __exportStar(object, exports);
2941
+ __exportStar(string, exports);
2942
+ __exportStar(_undefined, exports);
2943
+ __exportStar(url, exports);
2944
+
2945
+ }(es2018$2));
2946
+
2947
+ isDocument$1.isDocument = void 0;
2948
+ const node_type_1$2 = nodeType;
2949
+ const types_1$3 = es2018$2;
2950
+ function isDocument(val) {
2951
+ if ('HTMLDocument' in globalThis && val instanceof HTMLDocument)
2952
+ return true;
2953
+ return (0, types_1$3.isObject)(val)
2954
+ && val.nodeType === node_type_1$2.NodeType.DOCUMENT_NODE;
2955
+ }
2956
+ isDocument$1.isDocument = isDocument;
2957
+
2958
+ var isElement$1 = {};
2959
+
2960
+ isElement$1.isElement = void 0;
2961
+ const node_type_1$1 = nodeType;
2962
+ const types_1$2 = es2018$2;
2963
+ function isElement(val) {
2964
+ if ('HTMLElement' in globalThis && val instanceof HTMLElement)
2965
+ return true;
2966
+ return (0, types_1$2.isObject)(val)
2967
+ && val.nodeType === node_type_1$1.NodeType.ELEMENT_NODE;
2968
+ }
2969
+ isElement$1.isElement = isElement;
2970
+
2971
+ getBySelector$1.getBySelector = void 0;
2972
+ const is_document_1$2 = isDocument$1;
2973
+ const is_element_1$4 = isElement$1;
2974
+ function getBySelector(selectors) {
2975
+ const root = ((0, is_element_1$4.isElement)(this) || (0, is_document_1$2.isDocument)(this)
2976
+ ? this
2977
+ : document);
2978
+ const result = root.querySelector(selectors);
2979
+ if (result) {
2980
+ return result;
2981
+ }
2982
+ else {
2983
+ throw new Error(`Could not find any elements matching ${selectors}`);
2984
+ }
2985
+ }
2986
+ getBySelector$1.getBySelector = getBySelector;
2987
+
2988
+ var getAllBySelector$1 = {};
2509
2989
 
2510
2990
  getAllBySelector$1.getAllBySelector = void 0;
2511
2991
  const is_document_1$1 = isDocument$1;
2512
2992
  const is_element_1$3 = isElement$1;
2513
2993
  function getAllBySelector(selectors) {
2514
- const root = (is_element_1$3.isElement(this) || is_document_1$1.isDocument(this)
2994
+ const root = ((0, is_element_1$3.isElement)(this) || (0, is_document_1$1.isDocument)(this)
2515
2995
  ? this
2516
2996
  : document);
2517
2997
  const results = root.querySelectorAll(selectors);
@@ -2540,9 +3020,9 @@ var findInAncestorNodes$1 = {};
2540
3020
 
2541
3021
  findInAncestorNodes$1.findInAncestorNodes = void 0;
2542
3022
  const traverse_ancestor_nodes_1 = traverseAncestorNodes$1;
2543
- const iterable_operator_1 = es2018$4;
3023
+ const iterable_operator_1 = es2018$6;
2544
3024
  function findInAncestorNodes(node, predicate) {
2545
- return iterable_operator_1.find(traverse_ancestor_nodes_1.traverseAncestorNodes(node), node => predicate(node));
3025
+ return (0, iterable_operator_1.find)((0, traverse_ancestor_nodes_1.traverseAncestorNodes)(node), node => predicate(node));
2546
3026
  }
2547
3027
  findInAncestorNodes$1.findInAncestorNodes = findInAncestorNodes;
2548
3028
 
@@ -2581,10 +3061,10 @@ findInPrecedingSiblingNodes$1.findInPrecedingSiblingNodes = findInPrecedingSibli
2581
3061
  var parentNode$1 = {};
2582
3062
 
2583
3063
  parentNode$1.parentNode = void 0;
2584
- const errors_1$6 = es2018$2;
3064
+ const errors_1$6 = es2018$4;
2585
3065
  function parentNode(node, distance = 1) {
2586
- errors_1$6.assert(Number.isInteger(distance), 'parameter distance must be an integer');
2587
- errors_1$6.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
3066
+ (0, errors_1$6.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
3067
+ (0, errors_1$6.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
2588
3068
  return _parentNode(node, distance);
2589
3069
  }
2590
3070
  parentNode$1.parentNode = parentNode;
@@ -2603,10 +3083,10 @@ function _parentNode(node, distance) {
2603
3083
  var nextSibling$2 = {};
2604
3084
 
2605
3085
  nextSibling$2.nextSibling = void 0;
2606
- const errors_1$5 = es2018$2;
3086
+ const errors_1$5 = es2018$4;
2607
3087
  function nextSibling$1(node, distance = 1) {
2608
- errors_1$5.assert(Number.isInteger(distance), 'parameter distance must be an integer');
2609
- errors_1$5.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
3088
+ (0, errors_1$5.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
3089
+ (0, errors_1$5.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
2610
3090
  return _nextSibling(node, distance);
2611
3091
  }
2612
3092
  nextSibling$2.nextSibling = nextSibling$1;
@@ -2625,33 +3105,33 @@ function _nextSibling(node, distance) {
2625
3105
  var previousSibling$1 = {};
2626
3106
 
2627
3107
  previousSibling$1.previousSibling = void 0;
2628
- const errors_1$4 = es2018$2;
3108
+ const errors_1$4 = es2018$4;
2629
3109
  function previousSibling(node, distance = 1) {
2630
- errors_1$4.assert(Number.isInteger(distance), 'parameter distance must be an integer');
2631
- errors_1$4.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
2632
- return _previousSibling(node, distance);
2633
- }
2634
- previousSibling$1.previousSibling = previousSibling;
2635
- function _previousSibling(node, distance = 1) {
2636
- const currentNode = node.previousSibling;
2637
- if (!currentNode)
2638
- return undefined;
2639
- if (distance === 1) {
2640
- return currentNode;
2641
- }
2642
- else {
2643
- return _previousSibling(currentNode, distance - 1);
3110
+ (0, errors_1$4.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
3111
+ (0, errors_1$4.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
3112
+ return previousSibling(node, distance);
3113
+ function previousSibling(node, distance = 1) {
3114
+ const currentNode = node.previousSibling;
3115
+ if (!currentNode)
3116
+ return undefined;
3117
+ if (distance === 1) {
3118
+ return currentNode;
3119
+ }
3120
+ else {
3121
+ return previousSibling(currentNode, distance - 1);
3122
+ }
2644
3123
  }
2645
3124
  }
3125
+ previousSibling$1.previousSibling = previousSibling;
2646
3126
 
2647
3127
  var nextElementSibling$2 = {};
2648
3128
 
2649
3129
  nextElementSibling$2.nextElementSibling = void 0;
2650
3130
  const is_element_1$2 = isElement$1;
2651
- const errors_1$3 = es2018$2;
3131
+ const errors_1$3 = es2018$4;
2652
3132
  function nextElementSibling$1(node, distance = 1) {
2653
- errors_1$3.assert(Number.isInteger(distance), 'parameter distance must be an integer');
2654
- errors_1$3.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
3133
+ (0, errors_1$3.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
3134
+ (0, errors_1$3.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
2655
3135
  return _nextElementSibling(node, distance);
2656
3136
  }
2657
3137
  nextElementSibling$2.nextElementSibling = nextElementSibling$1;
@@ -2659,7 +3139,7 @@ function _nextElementSibling(node, distance) {
2659
3139
  const currentNode = node.nextSibling;
2660
3140
  if (!currentNode)
2661
3141
  return undefined;
2662
- if (is_element_1$2.isElement(currentNode)) {
3142
+ if ((0, is_element_1$2.isElement)(currentNode)) {
2663
3143
  if (distance === 1) {
2664
3144
  return currentNode;
2665
3145
  }
@@ -2676,36 +3156,36 @@ var previousElementSibling$1 = {};
2676
3156
 
2677
3157
  previousElementSibling$1.previousElementSibling = void 0;
2678
3158
  const is_element_1$1 = isElement$1;
2679
- const errors_1$2 = es2018$2;
3159
+ const errors_1$2 = es2018$4;
2680
3160
  function previousElementSibling(node, distance = 1) {
2681
- errors_1$2.assert(Number.isInteger(distance), 'parameter distance must be an integer');
2682
- errors_1$2.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
2683
- return _previousElementSibling(node, distance);
2684
- }
2685
- previousElementSibling$1.previousElementSibling = previousElementSibling;
2686
- function _previousElementSibling(node, distance = 1) {
2687
- const currentNode = node.previousSibling;
2688
- if (!currentNode)
2689
- return undefined;
2690
- if (is_element_1$1.isElement(currentNode)) {
2691
- if (distance === 1) {
2692
- return currentNode;
3161
+ (0, errors_1$2.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
3162
+ (0, errors_1$2.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
3163
+ return previousElementSibling(node, distance);
3164
+ function previousElementSibling(node, distance = 1) {
3165
+ const currentNode = node.previousSibling;
3166
+ if (!currentNode)
3167
+ return undefined;
3168
+ if ((0, is_element_1$1.isElement)(currentNode)) {
3169
+ if (distance === 1) {
3170
+ return currentNode;
3171
+ }
3172
+ else {
3173
+ return previousElementSibling(currentNode, distance - 1);
3174
+ }
2693
3175
  }
2694
3176
  else {
2695
- return _previousElementSibling(currentNode, distance - 1);
3177
+ return previousElementSibling(currentNode, distance);
2696
3178
  }
2697
3179
  }
2698
- else {
2699
- return _previousElementSibling(currentNode, distance);
2700
- }
2701
3180
  }
3181
+ previousElementSibling$1.previousElementSibling = previousElementSibling;
2702
3182
 
2703
3183
  var isntDocument$1 = {};
2704
3184
 
2705
3185
  isntDocument$1.isntDocument = void 0;
2706
3186
  const is_document_1 = isDocument$1;
2707
3187
  function isntDocument(val) {
2708
- return !is_document_1.isDocument(val);
3188
+ return !(0, is_document_1.isDocument)(val);
2709
3189
  }
2710
3190
  isntDocument$1.isntDocument = isntDocument;
2711
3191
 
@@ -2714,18 +3194,18 @@ var isntElement$1 = {};
2714
3194
  isntElement$1.isntElement = void 0;
2715
3195
  const is_element_1 = isElement$1;
2716
3196
  function isntElement(val) {
2717
- return !is_element_1.isElement(val);
3197
+ return !(0, is_element_1.isElement)(val);
2718
3198
  }
2719
3199
  isntElement$1.isntElement = isntElement;
2720
3200
 
2721
3201
  var isNode$1 = {};
2722
3202
 
2723
3203
  isNode$1.isNode = void 0;
2724
- const types_1$1 = es2018$1;
3204
+ const types_1$1 = es2018$2;
2725
3205
  function isNode(val) {
2726
3206
  if ('Node' in globalThis && val instanceof Node)
2727
3207
  return true;
2728
- return types_1$1.isObject(val) && 'nodeType' in val;
3208
+ return (0, types_1$1.isObject)(val) && 'nodeType' in val;
2729
3209
  }
2730
3210
  isNode$1.isNode = isNode;
2731
3211
 
@@ -2734,7 +3214,7 @@ var isntNode$1 = {};
2734
3214
  isntNode$1.isntNode = void 0;
2735
3215
  const is_node_1$1 = isNode$1;
2736
3216
  function isntNode(val) {
2737
- return !is_node_1$1.isNode(val);
3217
+ return !(0, is_node_1$1.isNode)(val);
2738
3218
  }
2739
3219
  isntNode$1.isntNode = isntNode;
2740
3220
 
@@ -2742,11 +3222,12 @@ var isTextNode$1 = {};
2742
3222
 
2743
3223
  isTextNode$1.isTextNode = void 0;
2744
3224
  const node_type_1 = nodeType;
2745
- const types_1 = es2018$1;
3225
+ const types_1 = es2018$2;
2746
3226
  function isTextNode(val) {
2747
3227
  if ('Text' in globalThis && val instanceof Text)
2748
3228
  return true;
2749
- return types_1.isRecord(val) && val.nodeType === node_type_1.NodeType.TEXT_NODE;
3229
+ return (0, types_1.isObject)(val)
3230
+ && val.nodeType === node_type_1.NodeType.TEXT_NODE;
2750
3231
  }
2751
3232
  isTextNode$1.isTextNode = isTextNode;
2752
3233
 
@@ -2755,7 +3236,7 @@ var isntTextNode$1 = {};
2755
3236
  isntTextNode$1.isntTextNode = void 0;
2756
3237
  const is_text_node_1 = isTextNode$1;
2757
3238
  function isntTextNode(val) {
2758
- return !is_text_node_1.isTextNode(val);
3239
+ return !(0, is_text_node_1.isTextNode)(val);
2759
3240
  }
2760
3241
  isntTextNode$1.isntTextNode = isntTextNode;
2761
3242
 
@@ -2764,7 +3245,7 @@ var isParentNode$1 = {};
2764
3245
  isParentNode$1.isParentNode = void 0;
2765
3246
  const is_node_1 = isNode$1;
2766
3247
  function isParentNode(val) {
2767
- return is_node_1.isNode(val) && 'children' in val;
3248
+ return (0, is_node_1.isNode)(val) && 'children' in val;
2768
3249
  }
2769
3250
  isParentNode$1.isParentNode = isParentNode;
2770
3251
 
@@ -2773,7 +3254,7 @@ var isntParentNode$1 = {};
2773
3254
  isntParentNode$1.isntParentNode = void 0;
2774
3255
  const is_parent_node_1 = isParentNode$1;
2775
3256
  function isntParentNode(val) {
2776
- return !is_parent_node_1.isParentNode(val);
3257
+ return !(0, is_parent_node_1.isParentNode)(val);
2777
3258
  }
2778
3259
  isntParentNode$1.isntParentNode = isntParentNode;
2779
3260
 
@@ -2822,7 +3303,7 @@ var replaceBrWithNewline$1 = {};
2822
3303
  replaceBrWithNewline$1.replaceBrWithNewline = void 0;
2823
3304
  const map_1 = map$3;
2824
3305
  function replaceBrWithNewline(node) {
2825
- return map_1.map(node, node => {
3306
+ return (0, map_1.map)(node, node => {
2826
3307
  if (node.nodeName === 'BR') {
2827
3308
  return document.createTextNode('\n');
2828
3309
  }
@@ -2908,7 +3389,7 @@ __exportStar(replaceBrWithNewline$1, exports);
2908
3389
  __exportStar(isBefore$1, exports);
2909
3390
  __exportStar(isAfter$1, exports);
2910
3391
 
2911
- }(es2018$5));
3392
+ }(es2018$7));
2912
3393
 
2913
3394
  function matchOneByOne(context, source, ...matchers) {
2914
3395
  if (matchers.length === 0)
@@ -2918,7 +3399,7 @@ function matchOneByOne(context, source, ...matchers) {
2918
3399
  const [matcher, ...otherMatchers] = matchers;
2919
3400
  const result = Reflect.apply(matcher, context, [source]);
2920
3401
  // TerminalMatcher
2921
- if (es2018$1.isBoolean(result)) {
3402
+ if (es2018$3.isBoolean(result)) {
2922
3403
  if (result) {
2923
3404
  const nextNode = context.next(source);
2924
3405
  return matchOneByOne(context, nextNode, ...otherMatchers);
@@ -2928,13 +3409,13 @@ function matchOneByOne(context, source, ...matchers) {
2928
3409
  }
2929
3410
  }
2930
3411
  // 此处一定是成功匹配, 因为SkipMatcher在失败时会返回false.
2931
- if (es2018$1.isNumber(result)) {
3412
+ if (es2018$3.isNumber(result)) {
2932
3413
  const distance = result;
2933
3414
  const nextNode = context.next(source, distance);
2934
3415
  return matchOneByOne(context, nextNode, ...otherMatchers);
2935
3416
  }
2936
3417
  // SkipMatcher返回Iterable意味着存在多种可能性, 可能出现失败回溯.
2937
- if (es2018$1.isIterable(result)) {
3418
+ if (es2018$3.isIterable(result)) {
2938
3419
  for (const distance of result) {
2939
3420
  const nextNode = context.next(source, distance);
2940
3421
  if (matchOneByOne(context, nextNode, ...otherMatchers)) {
@@ -2950,11 +3431,11 @@ function matchOneByOne(context, source, ...matchers) {
2950
3431
  function nextSibling(node, distance = 1) {
2951
3432
  if (distance === 0)
2952
3433
  return node;
2953
- return es2018$5.nextSibling(node, distance);
3434
+ return es2018$7.nextSibling(node, distance);
2954
3435
  }
2955
3436
 
2956
3437
  function match(node, ...matchers) {
2957
- const document = es2018$5.isDocument(this) ? this : globalThis.document;
3438
+ const document = es2018$7.isDocument(this) ? this : globalThis.document;
2958
3439
  const context = {
2959
3440
  document,
2960
3441
  collection: {},
@@ -2971,11 +3452,11 @@ function match(node, ...matchers) {
2971
3452
  function nextElementSibling(node, distance = 1) {
2972
3453
  if (distance === 0)
2973
3454
  return node;
2974
- return es2018$5.nextElementSibling(node, distance);
3455
+ return es2018$7.nextElementSibling(node, distance);
2975
3456
  }
2976
3457
 
2977
3458
  function matchElement(element, ...matchers) {
2978
- const document = es2018$5.isDocument(this) ? this : globalThis.document;
3459
+ const document = es2018$7.isDocument(this) ? this : globalThis.document;
2979
3460
  const context = {
2980
3461
  document,
2981
3462
  collection: {},
@@ -2995,11 +3476,11 @@ function anyOf(...matchers) {
2995
3476
  };
2996
3477
  }
2997
3478
 
2998
- function merge(target, source) {
3479
+ function mergeInPlace(target, source) {
2999
3480
  for (const [key, value] of Object.entries(source)) {
3000
3481
  if (target[key]) {
3001
- if (Array.isArray(target[key])) {
3002
- if (Array.isArray(value)) {
3482
+ if (es2018$3.isArray(target[key])) {
3483
+ if (es2018$3.isArray(value)) {
3003
3484
  target[key] = [...target[key], ...value];
3004
3485
  }
3005
3486
  else {
@@ -3007,7 +3488,7 @@ function merge(target, source) {
3007
3488
  }
3008
3489
  }
3009
3490
  else {
3010
- if (Array.isArray(value)) {
3491
+ if (es2018$3.isArray(value)) {
3011
3492
  target[key] = [target[key], ...value];
3012
3493
  }
3013
3494
  else {
@@ -3032,7 +3513,7 @@ function childNodes(...matchers) {
3032
3513
  const context = Object.assign(Object.assign({}, this), { collection: {}, next: nextSibling });
3033
3514
  const result = matchOneByOne(context, node.childNodes[0], ...matchers);
3034
3515
  if (result) {
3035
- merge(this.collection, context.collection);
3516
+ mergeInPlace(this.collection, context.collection);
3036
3517
  }
3037
3518
  return result;
3038
3519
  };
@@ -3049,7 +3530,7 @@ function children(...matchers) {
3049
3530
  const context = Object.assign(Object.assign({}, this), { collection: {}, next: nextElementSibling });
3050
3531
  const result = matchOneByOne(context, element.children[0], ...matchers);
3051
3532
  if (result) {
3052
- merge(this.collection, context.collection);
3533
+ mergeInPlace(this.collection, context.collection);
3053
3534
  }
3054
3535
  return result;
3055
3536
  };
@@ -3066,7 +3547,7 @@ function concat(strings, values) {
3066
3547
  }
3067
3548
 
3068
3549
  function css(...args) {
3069
- if (es2018$1.isString(args[0])) {
3550
+ if (es2018$3.isString(args[0])) {
3070
3551
  const [selector] = args;
3071
3552
  return (element) => element.matches(selector);
3072
3553
  }
@@ -3078,24 +3559,24 @@ function css(...args) {
3078
3559
  }
3079
3560
 
3080
3561
  function element(...args) {
3081
- if (Array.isArray(args[0])) {
3562
+ if (es2018$3.isArray(args[0])) {
3082
3563
  const [strings, ...values] = args;
3083
3564
  const name = concat(strings, values).join('');
3084
3565
  return (...matchers) => element(name, ...matchers);
3085
3566
  }
3086
- if (es2018$1.isString(args[0])) {
3567
+ if (es2018$3.isString(args[0])) {
3087
3568
  const [name, ...matchers] = args;
3088
3569
  return function (_element) {
3089
3570
  const result = element(...matchers).call(this, _element);
3090
3571
  if (result) {
3091
- merge(this.collection, { [name]: _element });
3572
+ mergeInPlace(this.collection, { [name]: _element });
3092
3573
  }
3093
3574
  return result;
3094
3575
  };
3095
3576
  }
3096
3577
  const [...matchers] = args;
3097
3578
  return function (element) {
3098
- if (es2018$5.isntElement(element))
3579
+ if (es2018$7.isntElement(element))
3099
3580
  return false;
3100
3581
  if (matchers.length === 0)
3101
3582
  return true;
@@ -3103,7 +3584,7 @@ function element(...args) {
3103
3584
  };
3104
3585
  }
3105
3586
 
3106
- var es2018 = {};
3587
+ var es2018$1 = {};
3107
3588
 
3108
3589
  var of$1 = {};
3109
3590
 
@@ -3116,14 +3597,15 @@ of$1.of = of;
3116
3597
  var repeat$2 = {};
3117
3598
 
3118
3599
  repeat$2.repeat = void 0;
3119
- const errors_1$1 = es2018$2;
3600
+ const errors_1$1 = es2018$4;
3601
+ const go_1 = es2018$5;
3120
3602
  function repeat$1(val, times = Infinity) {
3121
- errors_1$1.assert(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
3122
- return (function* () {
3603
+ (0, errors_1$1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
3604
+ return (0, go_1.go)(function* () {
3123
3605
  while (times-- > 0) {
3124
3606
  yield val;
3125
3607
  }
3126
- })();
3608
+ });
3127
3609
  }
3128
3610
  repeat$2.repeat = repeat$1;
3129
3611
 
@@ -3154,9 +3636,9 @@ countup$1.countup = countup;
3154
3636
  var range$1 = {};
3155
3637
 
3156
3638
  range$1.range = void 0;
3157
- const errors_1 = es2018$2;
3639
+ const errors_1 = es2018$4;
3158
3640
  function range(start, end, step = 1) {
3159
- errors_1.assert(step > 0, 'step parameter must be greater than 0');
3641
+ (0, errors_1.assert)(step > 0, 'step parameter must be greater than 0');
3160
3642
  return rangeByUnsignedStep(start, end, step);
3161
3643
  }
3162
3644
  range$1.range = range;
@@ -3177,18 +3659,24 @@ var stringifyJsonStream = {};
3177
3659
 
3178
3660
  stringifyJsonStream.stringifyJSONStream = void 0;
3179
3661
  function* stringifyJSONStream(iterable) {
3662
+ var _a;
3180
3663
  const iter = iterable[Symbol.iterator]();
3181
- const firstResult = iter.next();
3182
- yield '[';
3183
- if (!firstResult.done)
3184
- yield JSON.stringify(firstResult.value);
3185
- while (true) {
3186
- const result = iter.next();
3187
- if (result.done)
3188
- break;
3189
- yield ',' + JSON.stringify(result.value);
3664
+ let done;
3665
+ try {
3666
+ let value;
3667
+ ({ value, done } = iter.next());
3668
+ yield '[';
3669
+ if (!done)
3670
+ yield JSON.stringify(value);
3671
+ while ({ value, done } = iter.next(), !done) {
3672
+ yield ',' + JSON.stringify(value);
3673
+ }
3674
+ yield ']';
3675
+ }
3676
+ finally {
3677
+ if (!done)
3678
+ (_a = iter.return) === null || _a === void 0 ? void 0 : _a.call(iter);
3190
3679
  }
3191
- yield ']';
3192
3680
  }
3193
3681
  stringifyJsonStream.stringifyJSONStream = stringifyJSONStream;
3194
3682
 
@@ -3196,18 +3684,24 @@ var stringifyJsonStreamAsync = {};
3196
3684
 
3197
3685
  stringifyJsonStreamAsync.stringifyJSONStreamAsync = void 0;
3198
3686
  async function* stringifyJSONStreamAsync(asyncIterable) {
3687
+ var _a;
3199
3688
  const iter = asyncIterable[Symbol.asyncIterator]();
3200
- const firstResult = await iter.next();
3201
- yield '[';
3202
- if (!firstResult.done)
3203
- yield JSON.stringify(firstResult.value);
3204
- while (true) {
3205
- const result = await iter.next();
3206
- if (result.done)
3207
- break;
3208
- yield ',' + JSON.stringify(result.value);
3689
+ let done;
3690
+ try {
3691
+ let value;
3692
+ ({ value, done } = await iter.next());
3693
+ yield '[';
3694
+ if (!done)
3695
+ yield JSON.stringify(value);
3696
+ while ({ value, done } = await iter.next(), !done) {
3697
+ yield ',' + JSON.stringify(value);
3698
+ }
3699
+ yield ']';
3700
+ }
3701
+ finally {
3702
+ if (!done)
3703
+ await ((_a = iter.return) === null || _a === void 0 ? void 0 : _a.call(iter));
3209
3704
  }
3210
- yield ']';
3211
3705
  }
3212
3706
  stringifyJsonStreamAsync.stringifyJSONStreamAsync = stringifyJSONStreamAsync;
3213
3707
 
@@ -3215,15 +3709,21 @@ var stringifyNdjsonStream = {};
3215
3709
 
3216
3710
  stringifyNdjsonStream.stringifyNDJSONStream = void 0;
3217
3711
  function* stringifyNDJSONStream(iterable) {
3712
+ var _a;
3218
3713
  const iter = iterable[Symbol.iterator]();
3219
- const firstResult = iter.next();
3220
- if (!firstResult.done)
3221
- yield JSON.stringify(firstResult.value);
3222
- while (true) {
3223
- const result = iter.next();
3224
- if (result.done)
3225
- break;
3226
- yield '\n' + JSON.stringify(result.value);
3714
+ let done;
3715
+ try {
3716
+ let value;
3717
+ ({ value, done } = iter.next());
3718
+ if (!done)
3719
+ yield JSON.stringify(value);
3720
+ while ({ value, done } = iter.next(), !done) {
3721
+ yield '\n' + JSON.stringify(value);
3722
+ }
3723
+ }
3724
+ finally {
3725
+ if (!done)
3726
+ (_a = iter.return) === null || _a === void 0 ? void 0 : _a.call(iter);
3227
3727
  }
3228
3728
  }
3229
3729
  stringifyNdjsonStream.stringifyNDJSONStream = stringifyNDJSONStream;
@@ -3232,15 +3732,21 @@ var stringifyNdjsonStreamAsync = {};
3232
3732
 
3233
3733
  stringifyNdjsonStreamAsync.stringifyNDJSONStreamAsync = void 0;
3234
3734
  async function* stringifyNDJSONStreamAsync(asyncIterable) {
3735
+ var _a;
3235
3736
  const iter = asyncIterable[Symbol.asyncIterator]();
3236
- const firstResult = await iter.next();
3237
- if (!firstResult.done)
3238
- yield JSON.stringify(firstResult.value);
3239
- while (true) {
3240
- const result = await iter.next();
3241
- if (result.done)
3242
- break;
3243
- yield '\n' + JSON.stringify(result.value);
3737
+ let done;
3738
+ try {
3739
+ let value;
3740
+ ({ value, done } = await iter.next());
3741
+ if (!done)
3742
+ yield JSON.stringify(value);
3743
+ while ({ value, done } = await iter.next(), !done) {
3744
+ yield '\n' + JSON.stringify(value);
3745
+ }
3746
+ }
3747
+ finally {
3748
+ if (!done)
3749
+ await ((_a = iter.return) === null || _a === void 0 ? void 0 : _a.call(iter));
3244
3750
  }
3245
3751
  }
3246
3752
  stringifyNdjsonStreamAsync.stringifyNDJSONStreamAsync = stringifyNDJSONStreamAsync;
@@ -3262,6 +3768,454 @@ function* sse(message) {
3262
3768
  }
3263
3769
  sse$1.sse = sse;
3264
3770
 
3771
+ var reusableIterable = {};
3772
+
3773
+ var es2018 = {};
3774
+
3775
+ var lazy$1 = {};
3776
+
3777
+ /**
3778
+ * lodash (Custom Build) <https://lodash.com/>
3779
+ * Build: `lodash modularize exports="npm" -o ./`
3780
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
3781
+ * Released under MIT license <https://lodash.com/license>
3782
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
3783
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3784
+ */
3785
+
3786
+ /** Used as the `TypeError` message for "Functions" methods. */
3787
+ var FUNC_ERROR_TEXT = 'Expected a function';
3788
+
3789
+ /** Used as references for various `Number` constants. */
3790
+ var INFINITY = 1 / 0,
3791
+ MAX_INTEGER = 1.7976931348623157e+308,
3792
+ NAN = 0 / 0;
3793
+
3794
+ /** `Object#toString` result references. */
3795
+ var symbolTag = '[object Symbol]';
3796
+
3797
+ /** Used to match leading and trailing whitespace. */
3798
+ var reTrim = /^\s+|\s+$/g;
3799
+
3800
+ /** Used to detect bad signed hexadecimal string values. */
3801
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
3802
+
3803
+ /** Used to detect binary string values. */
3804
+ var reIsBinary = /^0b[01]+$/i;
3805
+
3806
+ /** Used to detect octal string values. */
3807
+ var reIsOctal = /^0o[0-7]+$/i;
3808
+
3809
+ /** Built-in method references without a dependency on `root`. */
3810
+ var freeParseInt = parseInt;
3811
+
3812
+ /** Used for built-in method references. */
3813
+ var objectProto = Object.prototype;
3814
+
3815
+ /**
3816
+ * Used to resolve the
3817
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3818
+ * of values.
3819
+ */
3820
+ var objectToString = objectProto.toString;
3821
+
3822
+ /**
3823
+ * Creates a function that invokes `func`, with the `this` binding and arguments
3824
+ * of the created function, while it's called less than `n` times. Subsequent
3825
+ * calls to the created function return the result of the last `func` invocation.
3826
+ *
3827
+ * @static
3828
+ * @memberOf _
3829
+ * @since 3.0.0
3830
+ * @category Function
3831
+ * @param {number} n The number of calls at which `func` is no longer invoked.
3832
+ * @param {Function} func The function to restrict.
3833
+ * @returns {Function} Returns the new restricted function.
3834
+ * @example
3835
+ *
3836
+ * jQuery(element).on('click', _.before(5, addContactToList));
3837
+ * // => Allows adding up to 4 contacts to the list.
3838
+ */
3839
+ function before(n, func) {
3840
+ var result;
3841
+ if (typeof func != 'function') {
3842
+ throw new TypeError(FUNC_ERROR_TEXT);
3843
+ }
3844
+ n = toInteger(n);
3845
+ return function() {
3846
+ if (--n > 0) {
3847
+ result = func.apply(this, arguments);
3848
+ }
3849
+ if (n <= 1) {
3850
+ func = undefined;
3851
+ }
3852
+ return result;
3853
+ };
3854
+ }
3855
+
3856
+ /**
3857
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
3858
+ * to the function return the value of the first invocation. The `func` is
3859
+ * invoked with the `this` binding and arguments of the created function.
3860
+ *
3861
+ * @static
3862
+ * @memberOf _
3863
+ * @since 0.1.0
3864
+ * @category Function
3865
+ * @param {Function} func The function to restrict.
3866
+ * @returns {Function} Returns the new restricted function.
3867
+ * @example
3868
+ *
3869
+ * var initialize = _.once(createApplication);
3870
+ * initialize();
3871
+ * initialize();
3872
+ * // => `createApplication` is invoked once
3873
+ */
3874
+ function once(func) {
3875
+ return before(2, func);
3876
+ }
3877
+
3878
+ /**
3879
+ * Checks if `value` is the
3880
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
3881
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
3882
+ *
3883
+ * @static
3884
+ * @memberOf _
3885
+ * @since 0.1.0
3886
+ * @category Lang
3887
+ * @param {*} value The value to check.
3888
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
3889
+ * @example
3890
+ *
3891
+ * _.isObject({});
3892
+ * // => true
3893
+ *
3894
+ * _.isObject([1, 2, 3]);
3895
+ * // => true
3896
+ *
3897
+ * _.isObject(_.noop);
3898
+ * // => true
3899
+ *
3900
+ * _.isObject(null);
3901
+ * // => false
3902
+ */
3903
+ function isObject(value) {
3904
+ var type = typeof value;
3905
+ return !!value && (type == 'object' || type == 'function');
3906
+ }
3907
+
3908
+ /**
3909
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3910
+ * and has a `typeof` result of "object".
3911
+ *
3912
+ * @static
3913
+ * @memberOf _
3914
+ * @since 4.0.0
3915
+ * @category Lang
3916
+ * @param {*} value The value to check.
3917
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
3918
+ * @example
3919
+ *
3920
+ * _.isObjectLike({});
3921
+ * // => true
3922
+ *
3923
+ * _.isObjectLike([1, 2, 3]);
3924
+ * // => true
3925
+ *
3926
+ * _.isObjectLike(_.noop);
3927
+ * // => false
3928
+ *
3929
+ * _.isObjectLike(null);
3930
+ * // => false
3931
+ */
3932
+ function isObjectLike(value) {
3933
+ return !!value && typeof value == 'object';
3934
+ }
3935
+
3936
+ /**
3937
+ * Checks if `value` is classified as a `Symbol` primitive or object.
3938
+ *
3939
+ * @static
3940
+ * @memberOf _
3941
+ * @since 4.0.0
3942
+ * @category Lang
3943
+ * @param {*} value The value to check.
3944
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
3945
+ * @example
3946
+ *
3947
+ * _.isSymbol(Symbol.iterator);
3948
+ * // => true
3949
+ *
3950
+ * _.isSymbol('abc');
3951
+ * // => false
3952
+ */
3953
+ function isSymbol(value) {
3954
+ return typeof value == 'symbol' ||
3955
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
3956
+ }
3957
+
3958
+ /**
3959
+ * Converts `value` to a finite number.
3960
+ *
3961
+ * @static
3962
+ * @memberOf _
3963
+ * @since 4.12.0
3964
+ * @category Lang
3965
+ * @param {*} value The value to convert.
3966
+ * @returns {number} Returns the converted number.
3967
+ * @example
3968
+ *
3969
+ * _.toFinite(3.2);
3970
+ * // => 3.2
3971
+ *
3972
+ * _.toFinite(Number.MIN_VALUE);
3973
+ * // => 5e-324
3974
+ *
3975
+ * _.toFinite(Infinity);
3976
+ * // => 1.7976931348623157e+308
3977
+ *
3978
+ * _.toFinite('3.2');
3979
+ * // => 3.2
3980
+ */
3981
+ function toFinite(value) {
3982
+ if (!value) {
3983
+ return value === 0 ? value : 0;
3984
+ }
3985
+ value = toNumber(value);
3986
+ if (value === INFINITY || value === -INFINITY) {
3987
+ var sign = (value < 0 ? -1 : 1);
3988
+ return sign * MAX_INTEGER;
3989
+ }
3990
+ return value === value ? value : 0;
3991
+ }
3992
+
3993
+ /**
3994
+ * Converts `value` to an integer.
3995
+ *
3996
+ * **Note:** This method is loosely based on
3997
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
3998
+ *
3999
+ * @static
4000
+ * @memberOf _
4001
+ * @since 4.0.0
4002
+ * @category Lang
4003
+ * @param {*} value The value to convert.
4004
+ * @returns {number} Returns the converted integer.
4005
+ * @example
4006
+ *
4007
+ * _.toInteger(3.2);
4008
+ * // => 3
4009
+ *
4010
+ * _.toInteger(Number.MIN_VALUE);
4011
+ * // => 0
4012
+ *
4013
+ * _.toInteger(Infinity);
4014
+ * // => 1.7976931348623157e+308
4015
+ *
4016
+ * _.toInteger('3.2');
4017
+ * // => 3
4018
+ */
4019
+ function toInteger(value) {
4020
+ var result = toFinite(value),
4021
+ remainder = result % 1;
4022
+
4023
+ return result === result ? (remainder ? result - remainder : result) : 0;
4024
+ }
4025
+
4026
+ /**
4027
+ * Converts `value` to a number.
4028
+ *
4029
+ * @static
4030
+ * @memberOf _
4031
+ * @since 4.0.0
4032
+ * @category Lang
4033
+ * @param {*} value The value to process.
4034
+ * @returns {number} Returns the number.
4035
+ * @example
4036
+ *
4037
+ * _.toNumber(3.2);
4038
+ * // => 3.2
4039
+ *
4040
+ * _.toNumber(Number.MIN_VALUE);
4041
+ * // => 5e-324
4042
+ *
4043
+ * _.toNumber(Infinity);
4044
+ * // => Infinity
4045
+ *
4046
+ * _.toNumber('3.2');
4047
+ * // => 3.2
4048
+ */
4049
+ function toNumber(value) {
4050
+ if (typeof value == 'number') {
4051
+ return value;
4052
+ }
4053
+ if (isSymbol(value)) {
4054
+ return NAN;
4055
+ }
4056
+ if (isObject(value)) {
4057
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4058
+ value = isObject(other) ? (other + '') : other;
4059
+ }
4060
+ if (typeof value != 'string') {
4061
+ return value === 0 ? value : +value;
4062
+ }
4063
+ value = value.replace(reTrim, '');
4064
+ var isBinary = reIsBinary.test(value);
4065
+ return (isBinary || reIsOctal.test(value))
4066
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4067
+ : (reIsBadHex.test(value) ? NAN : +value);
4068
+ }
4069
+
4070
+ var lodash_once = once;
4071
+
4072
+ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
4073
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4074
+ };lazy$1.lazy = void 0;
4075
+ const lodash_once_1 = __importDefault(lodash_once);
4076
+ function lazy(getter) {
4077
+ return (0, lodash_once_1.default)(getter);
4078
+ }
4079
+ lazy$1.lazy = lazy;
4080
+
4081
+ var lazyFunction$1 = {};
4082
+
4083
+ lazyFunction$1.lazyFunction = void 0;
4084
+ const lazy_1 = lazy$1;
4085
+ function lazyFunction(getter) {
4086
+ const getFn = (0, lazy_1.lazy)(getter);
4087
+ return (...args) => getFn()(...args);
4088
+ }
4089
+ lazyFunction$1.lazyFunction = lazyFunction;
4090
+
4091
+ (function (exports) {
4092
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4093
+ if (k2 === undefined) k2 = k;
4094
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4095
+ }) : (function(o, m, k, k2) {
4096
+ if (k2 === undefined) k2 = k;
4097
+ o[k2] = m[k];
4098
+ }));
4099
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
4100
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
4101
+ };__exportStar(lazy$1, exports);
4102
+ __exportStar(lazyFunction$1, exports);
4103
+
4104
+ }(es2018));
4105
+
4106
+ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
4107
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4108
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4109
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
4110
+ };
4111
+ var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
4112
+ if (kind === "m") throw new TypeError("Private method is not writable");
4113
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4114
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
4115
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
4116
+ };
4117
+ var _ReusableIterable_done;reusableIterable.ReusableIterable = void 0;
4118
+ const extra_lazy_1$1 = es2018;
4119
+ class ReusableIterable {
4120
+ constructor(iterable) {
4121
+ _ReusableIterable_done.set(this, void 0);
4122
+ this.getIterator = (0, extra_lazy_1$1.lazy)(() => iterable[Symbol.iterator]());
4123
+ }
4124
+ get done() {
4125
+ return __classPrivateFieldGet$1(this, _ReusableIterable_done, "f");
4126
+ }
4127
+ close() {
4128
+ var _a, _b;
4129
+ if (!this.done) {
4130
+ __classPrivateFieldSet$1(this, _ReusableIterable_done, true, "f");
4131
+ (_b = (_a = this.getIterator()).return) === null || _b === void 0 ? void 0 : _b.call(_a);
4132
+ }
4133
+ }
4134
+ [(_ReusableIterable_done = new WeakMap(), Symbol.iterator)]() {
4135
+ return {
4136
+ next: () => {
4137
+ if (__classPrivateFieldGet$1(this, _ReusableIterable_done, "f"))
4138
+ return { done: true, value: undefined };
4139
+ const { value, done } = this.getIterator().next();
4140
+ if (done) {
4141
+ __classPrivateFieldSet$1(this, _ReusableIterable_done, true, "f");
4142
+ }
4143
+ return { value, done };
4144
+ }
4145
+ };
4146
+ }
4147
+ }
4148
+ reusableIterable.ReusableIterable = ReusableIterable;
4149
+
4150
+ var reusableAsyncIterable = {};
4151
+
4152
+ var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
4153
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4154
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4155
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
4156
+ };
4157
+ var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
4158
+ if (kind === "m") throw new TypeError("Private method is not writable");
4159
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4160
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
4161
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
4162
+ };
4163
+ var _ReusableAsyncIterable_done;reusableAsyncIterable.ReusableAsyncIterable = void 0;
4164
+ const extra_lazy_1 = es2018;
4165
+ class ReusableAsyncIterable {
4166
+ constructor(iterable) {
4167
+ _ReusableAsyncIterable_done.set(this, void 0);
4168
+ this.getIterator = (0, extra_lazy_1.lazy)(() => iterable[Symbol.asyncIterator]());
4169
+ }
4170
+ get done() {
4171
+ return __classPrivateFieldGet(this, _ReusableAsyncIterable_done, "f");
4172
+ }
4173
+ async close() {
4174
+ var _a, _b;
4175
+ if (!this.done) {
4176
+ __classPrivateFieldSet(this, _ReusableAsyncIterable_done, true, "f");
4177
+ await ((_b = (_a = this.getIterator()).return) === null || _b === void 0 ? void 0 : _b.call(_a));
4178
+ }
4179
+ }
4180
+ [(_ReusableAsyncIterable_done = new WeakMap(), Symbol.asyncIterator)]() {
4181
+ return {
4182
+ next: async () => {
4183
+ if (__classPrivateFieldGet(this, _ReusableAsyncIterable_done, "f"))
4184
+ return { done: true, value: undefined };
4185
+ const { value, done } = await this.getIterator().next();
4186
+ if (done) {
4187
+ __classPrivateFieldSet(this, _ReusableAsyncIterable_done, true, "f");
4188
+ }
4189
+ return { value, done };
4190
+ }
4191
+ };
4192
+ }
4193
+ }
4194
+ reusableAsyncIterable.ReusableAsyncIterable = ReusableAsyncIterable;
4195
+
4196
+ var timestampBasedId$1 = {};
4197
+
4198
+ timestampBasedId$1.timestampBasedId = void 0;
4199
+ function* timestampBasedId() {
4200
+ const num = 0;
4201
+ const timestamp = Date.now();
4202
+ yield [timestamp, num];
4203
+ let lastTimestamp = timestamp;
4204
+ let lastNum = num;
4205
+ while (true) {
4206
+ const timestamp = Date.now();
4207
+ if (timestamp === lastTimestamp) {
4208
+ yield [lastTimestamp, ++lastNum];
4209
+ }
4210
+ else {
4211
+ lastNum = 0;
4212
+ lastTimestamp = timestamp;
4213
+ yield [lastTimestamp, lastNum];
4214
+ }
4215
+ }
4216
+ }
4217
+ timestampBasedId$1.timestampBasedId = timestampBasedId;
4218
+
3265
4219
  (function (exports) {
3266
4220
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3267
4221
  if (k2 === undefined) k2 = k;
@@ -3282,15 +4236,18 @@ __exportStar(stringifyJsonStreamAsync, exports);
3282
4236
  __exportStar(stringifyNdjsonStream, exports);
3283
4237
  __exportStar(stringifyNdjsonStreamAsync, exports);
3284
4238
  __exportStar(sse$1, exports);
4239
+ __exportStar(reusableIterable, exports);
4240
+ __exportStar(reusableAsyncIterable, exports);
4241
+ __exportStar(timestampBasedId$1, exports);
3285
4242
 
3286
- }(es2018));
4243
+ }(es2018$1));
3287
4244
 
3288
4245
  /**
3289
4246
  * @returns {number} 返回值为成功匹配的元素个数, 当此值等于ubound时, 代表匹配成功.
3290
4247
  */
3291
4248
  function matchMultiple(node, ubound, matcher) {
3292
4249
  let currentNode = node;
3293
- for (const round of es2018.countup(1, ubound)) {
4250
+ for (const round of es2018$1.countup(1, ubound)) {
3294
4251
  if (!currentNode)
3295
4252
  return round - 1;
3296
4253
  const result = matcher.call(this, currentNode);
@@ -3310,10 +4267,10 @@ var Range;
3310
4267
  Range[Range["Max"] = 1] = "Max";
3311
4268
  })(Range || (Range = {}));
3312
4269
  function multiple([min, max], matcher, options = { greedy: true }) {
3313
- es2018$2.assert(Number.isInteger(min), 'parameter min must be an integer');
3314
- es2018$2.assert(Number.isInteger(max) || max === Infinity, 'parameter max must be an integer or Infinity');
3315
- es2018$2.assert(min >= 0, 'parameter min must be greater than or equal to 0');
3316
- es2018$2.assert(min <= max, 'parameter max must be greater than or equal to min');
4270
+ es2018$4.assert(Number.isInteger(min), 'parameter min must be an integer');
4271
+ es2018$4.assert(Number.isInteger(max) || max === Infinity, 'parameter max must be an integer or Infinity');
4272
+ es2018$4.assert(min >= 0, 'parameter min must be greater than or equal to 0');
4273
+ es2018$4.assert(min <= max, 'parameter max must be greater than or equal to min');
3317
4274
  return function* (node) {
3318
4275
  if (options.greedy) {
3319
4276
  let ubound = max;
@@ -3328,7 +4285,7 @@ function multiple([min, max], matcher, options = { greedy: true }) {
3328
4285
  }
3329
4286
  }
3330
4287
  else {
3331
- for (const ubound of es2018.countup(min, max)) {
4288
+ for (const ubound of es2018$1.countup(min, max)) {
3332
4289
  const result = matchMultiple.call(this, node, ubound, matcher);
3333
4290
  // 如果匹配的节点数量少于ubound, 说明匹配失败, 即使尝试更长的匹配也不会成功.
3334
4291
  if (result < ubound)
@@ -3341,17 +4298,17 @@ function multiple([min, max], matcher, options = { greedy: true }) {
3341
4298
  }
3342
4299
 
3343
4300
  function node(...args) {
3344
- if (Array.isArray(args[0])) {
4301
+ if (es2018$3.isArray(args[0])) {
3345
4302
  const [strings, ...values] = args;
3346
4303
  const name = concat(strings, values).join('');
3347
4304
  return (...matchers) => node(name, ...matchers);
3348
4305
  }
3349
- if (es2018$1.isString(args[0])) {
4306
+ if (es2018$3.isString(args[0])) {
3350
4307
  const [name, ...matchers] = args;
3351
4308
  return function (_node) {
3352
4309
  const result = node(...matchers).call(this, _node);
3353
4310
  if (result) {
3354
- merge(this.collection, { [name]: _node });
4311
+ mergeInPlace(this.collection, { [name]: _node });
3355
4312
  }
3356
4313
  return result;
3357
4314
  };
@@ -3369,8 +4326,8 @@ function optional(matcher) {
3369
4326
  }
3370
4327
 
3371
4328
  function repeat(times, matcher) {
3372
- es2018$2.assert(Number.isInteger(times), 'parameter times must be an integer');
3373
- es2018$2.assert(times >= 0, 'parameter number must be greater than or equal to 0');
4329
+ es2018$4.assert(Number.isInteger(times), 'parameter times must be an integer');
4330
+ es2018$4.assert(times >= 0, 'parameter number must be greater than or equal to 0');
3374
4331
  return function (node) {
3375
4332
  const result = matchMultiple.call(this, node, times, matcher);
3376
4333
  if (result === times) {
@@ -3392,7 +4349,7 @@ function tap(matcher, callback) {
3392
4349
 
3393
4350
  function textContentEquals(text, { caseSensitive = true, trim = false } = {}) {
3394
4351
  return (node) => {
3395
- if (es2018$1.isNull(node.textContent))
4352
+ if (es2018$3.isNull(node.textContent))
3396
4353
  return false;
3397
4354
  let textContent = node.textContent;
3398
4355
  if (!caseSensitive) {
@@ -3407,7 +4364,7 @@ function textContentEquals(text, { caseSensitive = true, trim = false } = {}) {
3407
4364
 
3408
4365
  function textContentIncludes(searchString, { caseSensitive = true, trim = false } = {}) {
3409
4366
  return (node) => {
3410
- if (es2018$1.isNull(node.textContent))
4367
+ if (es2018$3.isNull(node.textContent))
3411
4368
  return false;
3412
4369
  let textContent = node.textContent;
3413
4370
  if (!caseSensitive) {
@@ -3422,7 +4379,7 @@ function textContentIncludes(searchString, { caseSensitive = true, trim = false
3422
4379
 
3423
4380
  function textContentMatches(pattern, { trim = false } = {}) {
3424
4381
  return (node) => {
3425
- if (es2018$1.isNull(node.textContent))
4382
+ if (es2018$3.isNull(node.textContent))
3426
4383
  return false;
3427
4384
  let textContent = node.textContent;
3428
4385
  if (trim)
@@ -3432,24 +4389,24 @@ function textContentMatches(pattern, { trim = false } = {}) {
3432
4389
  }
3433
4390
 
3434
4391
  function textNode(...args) {
3435
- if (Array.isArray(args[0])) {
4392
+ if (es2018$3.isArray(args[0])) {
3436
4393
  const [strings, ...values] = args;
3437
4394
  const name = concat(strings, values).join('');
3438
4395
  return (...matchers) => textNode(name, ...matchers);
3439
4396
  }
3440
- if (es2018$1.isString(args[0])) {
4397
+ if (es2018$3.isString(args[0])) {
3441
4398
  const [name, ...matchers] = args;
3442
4399
  return function (node) {
3443
4400
  const result = textNode(...matchers).call(this, node);
3444
4401
  if (result) {
3445
- merge(this.collection, { [name]: node });
4402
+ mergeInPlace(this.collection, { [name]: node });
3446
4403
  }
3447
4404
  return result;
3448
4405
  };
3449
4406
  }
3450
4407
  const [...matchers] = args;
3451
4408
  return function (node) {
3452
- if (es2018$5.isntTextNode(node))
4409
+ if (es2018$7.isntTextNode(node))
3453
4410
  return false;
3454
4411
  if (matchers.length === 0)
3455
4412
  return true;
@@ -3461,9 +4418,9 @@ const UNORDERED_NODE_ITERATOR_TYPE = 'XPathResult' in globalThis
3461
4418
  ? XPathResult.UNORDERED_NODE_ITERATOR_TYPE
3462
4419
  : 4;
3463
4420
  function xpath(...args) {
3464
- if (es2018$1.isString(args[0])) {
4421
+ if (es2018$3.isString(args[0])) {
3465
4422
  const [expression] = args;
3466
- es2018$2.assert(expression.startsWith('//*'), 'XPath expressions must start with "//*"');
4423
+ es2018$4.assert(expression.startsWith('//*'), 'XPath expressions must start with "//*"');
3467
4424
  return function (node) {
3468
4425
  return xpathMatches(this.document, expression, node);
3469
4426
  };