@design.estate/dees-domtools 2.0.62 → 2.0.64

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.
@@ -1896,8 +1896,8 @@ var require_get_intrinsic = __commonJS({
1896
1896
  throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
1897
1897
  }
1898
1898
  var result = [];
1899
- $replace(string3, rePropName, function(match2, number2, quote, subString) {
1900
- result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number2 || match2;
1899
+ $replace(string3, rePropName, function(match, number2, quote, subString) {
1900
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number2 || match;
1901
1901
  });
1902
1902
  return result;
1903
1903
  };
@@ -3570,11 +3570,11 @@ var require_lib = __commonJS({
3570
3570
  "node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/index.js"(exports, module) {
3571
3571
  "use strict";
3572
3572
  var stringify5 = require_stringify();
3573
- var parse5 = require_parse();
3573
+ var parse4 = require_parse();
3574
3574
  var formats = require_formats();
3575
3575
  module.exports = {
3576
3576
  formats,
3577
- parse: parse5,
3577
+ parse: parse4,
3578
3578
  stringify: stringify5
3579
3579
  };
3580
3580
  }
@@ -3887,8 +3887,8 @@ var require_url = __commonJS({
3887
3887
  if (search2 && search2.charAt(0) !== "?") {
3888
3888
  search2 = "?" + search2;
3889
3889
  }
3890
- pathname = pathname.replace(/[?#]/g, function(match2) {
3891
- return encodeURIComponent(match2);
3890
+ pathname = pathname.replace(/[?#]/g, function(match) {
3891
+ return encodeURIComponent(match);
3892
3892
  });
3893
3893
  search2 = search2.replace("#", "%23");
3894
3894
  return protocol + host + pathname + search2 + hash;
@@ -4134,11 +4134,11 @@ var require_min_indent = __commonJS({
4134
4134
  "node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js"(exports, module) {
4135
4135
  "use strict";
4136
4136
  module.exports = (string3) => {
4137
- const match2 = string3.match(/^[ \t]*(?=\S)/gm);
4138
- if (!match2) {
4137
+ const match = string3.match(/^[ \t]*(?=\S)/gm);
4138
+ if (!match) {
4139
4139
  return 0;
4140
4140
  }
4141
- return match2.reduce((r3, a2) => Math.min(r3, a2.length), Infinity);
4141
+ return match.reduce((r3, a2) => Math.min(r3, a2.length), Infinity);
4142
4142
  };
4143
4143
  }
4144
4144
  });
@@ -5788,33 +5788,33 @@ var require_timestamp = __commonJS({
5788
5788
  return false;
5789
5789
  }
5790
5790
  function constructYamlTimestamp(data) {
5791
- var match2, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
5792
- match2 = YAML_DATE_REGEXP.exec(data);
5793
- if (match2 === null)
5794
- match2 = YAML_TIMESTAMP_REGEXP.exec(data);
5795
- if (match2 === null)
5791
+ var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
5792
+ match = YAML_DATE_REGEXP.exec(data);
5793
+ if (match === null)
5794
+ match = YAML_TIMESTAMP_REGEXP.exec(data);
5795
+ if (match === null)
5796
5796
  throw new Error("Date resolve error");
5797
- year = +match2[1];
5798
- month = +match2[2] - 1;
5799
- day = +match2[3];
5800
- if (!match2[4]) {
5797
+ year = +match[1];
5798
+ month = +match[2] - 1;
5799
+ day = +match[3];
5800
+ if (!match[4]) {
5801
5801
  return new Date(Date.UTC(year, month, day));
5802
5802
  }
5803
- hour = +match2[4];
5804
- minute = +match2[5];
5805
- second = +match2[6];
5806
- if (match2[7]) {
5807
- fraction = match2[7].slice(0, 3);
5803
+ hour = +match[4];
5804
+ minute = +match[5];
5805
+ second = +match[6];
5806
+ if (match[7]) {
5807
+ fraction = match[7].slice(0, 3);
5808
5808
  while (fraction.length < 3) {
5809
5809
  fraction += "0";
5810
5810
  }
5811
5811
  fraction = +fraction;
5812
5812
  }
5813
- if (match2[9]) {
5814
- tz_hour = +match2[10];
5815
- tz_minute = +(match2[11] || 0);
5813
+ if (match[9]) {
5814
+ tz_hour = +match[10];
5815
+ tz_minute = +(match[11] || 0);
5816
5816
  delta = (tz_hour * 60 + tz_minute) * 6e4;
5817
- if (match2[9] === "-")
5817
+ if (match[9] === "-")
5818
5818
  delta = -delta;
5819
5819
  }
5820
5820
  date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
@@ -6357,19 +6357,19 @@ var require_loader = __commonJS({
6357
6357
  }
6358
6358
  var directiveHandlers = {
6359
6359
  YAML: function handleYamlDirective(state, name, args) {
6360
- var match2, major, minor;
6360
+ var match, major, minor;
6361
6361
  if (state.version !== null) {
6362
6362
  throwError(state, "duplication of %YAML directive");
6363
6363
  }
6364
6364
  if (args.length !== 1) {
6365
6365
  throwError(state, "YAML directive accepts exactly one argument");
6366
6366
  }
6367
- match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
6368
- if (match2 === null) {
6367
+ match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
6368
+ if (match === null) {
6369
6369
  throwError(state, "ill-formed argument of the YAML directive");
6370
6370
  }
6371
- major = parseInt(match2[1], 10);
6372
- minor = parseInt(match2[2], 10);
6371
+ major = parseInt(match[1], 10);
6372
+ minor = parseInt(match[2], 10);
6373
6373
  if (major !== 1) {
6374
6374
  throwError(state, "unacceptable YAML version of the document");
6375
6375
  }
@@ -7596,7 +7596,7 @@ var require_dumper = __commonJS({
7596
7596
  case STYLE_FOLDED:
7597
7597
  return ">" + blockHeader(string3, state.indent) + dropEndingNewline(indentString(foldString(string3, lineWidth), indent3));
7598
7598
  case STYLE_DOUBLE:
7599
- return '"' + escapeString2(string3, lineWidth) + '"';
7599
+ return '"' + escapeString(string3, lineWidth) + '"';
7600
7600
  default:
7601
7601
  throw new YAMLException("impossible error: invalid scalar style");
7602
7602
  }
@@ -7622,9 +7622,9 @@ var require_dumper = __commonJS({
7622
7622
  }();
7623
7623
  var prevMoreIndented = string3[0] === "\n" || string3[0] === " ";
7624
7624
  var moreIndented;
7625
- var match2;
7626
- while (match2 = lineRe.exec(string3)) {
7627
- var prefix = match2[1], line = match2[2];
7625
+ var match;
7626
+ while (match = lineRe.exec(string3)) {
7627
+ var prefix = match[1], line = match[2];
7628
7628
  moreIndented = line[0] === " ";
7629
7629
  result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
7630
7630
  prevMoreIndented = moreIndented;
@@ -7635,11 +7635,11 @@ var require_dumper = __commonJS({
7635
7635
  if (line === "" || line[0] === " ")
7636
7636
  return line;
7637
7637
  var breakRe = / [^ ]/g;
7638
- var match2;
7638
+ var match;
7639
7639
  var start = 0, end, curr = 0, next2 = 0;
7640
7640
  var result = "";
7641
- while (match2 = breakRe.exec(line)) {
7642
- next2 = match2.index;
7641
+ while (match = breakRe.exec(line)) {
7642
+ next2 = match.index;
7643
7643
  if (next2 - start > width) {
7644
7644
  end = curr > start ? curr : next2;
7645
7645
  result += "\n" + line.slice(start, end);
@@ -7655,7 +7655,7 @@ var require_dumper = __commonJS({
7655
7655
  }
7656
7656
  return result.slice(1);
7657
7657
  }
7658
- function escapeString2(string3) {
7658
+ function escapeString(string3) {
7659
7659
  var result = "";
7660
7660
  var char, nextChar;
7661
7661
  var escapeSeq;
@@ -8225,6 +8225,369 @@ var require_format = __commonJS({
8225
8225
  }
8226
8226
  });
8227
8227
 
8228
+ // node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/dist/index.js
8229
+ var require_dist = __commonJS({
8230
+ "node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/dist/index.js"(exports) {
8231
+ "use strict";
8232
+ Object.defineProperty(exports, "__esModule", { value: true });
8233
+ exports.TokenData = void 0;
8234
+ exports.parse = parse4;
8235
+ exports.compile = compile;
8236
+ exports.match = match;
8237
+ exports.pathToRegexp = pathToRegexp;
8238
+ exports.stringify = stringify5;
8239
+ var DEFAULT_DELIMITER = "/";
8240
+ var NOOP_VALUE = (value2) => value2;
8241
+ var ID_START = /^[$_\p{ID_Start}]$/u;
8242
+ var ID_CONTINUE = /^[$\u200c\u200d\p{ID_Continue}]$/u;
8243
+ var DEBUG_URL = "https://git.new/pathToRegexpError";
8244
+ var SIMPLE_TOKENS = {
8245
+ // Groups.
8246
+ "{": "{",
8247
+ "}": "}",
8248
+ // Reserved.
8249
+ "(": "(",
8250
+ ")": ")",
8251
+ "[": "[",
8252
+ "]": "]",
8253
+ "+": "+",
8254
+ "?": "?",
8255
+ "!": "!"
8256
+ };
8257
+ function escapeText(str) {
8258
+ return str.replace(/[{}()\[\]+?!:*]/g, "\\$&");
8259
+ }
8260
+ function escape2(str) {
8261
+ return str.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
8262
+ }
8263
+ function* lexer(str) {
8264
+ const chars = [...str];
8265
+ let i3 = 0;
8266
+ function name() {
8267
+ let value2 = "";
8268
+ if (ID_START.test(chars[++i3])) {
8269
+ value2 += chars[i3];
8270
+ while (ID_CONTINUE.test(chars[++i3])) {
8271
+ value2 += chars[i3];
8272
+ }
8273
+ } else if (chars[i3] === '"') {
8274
+ let pos = i3;
8275
+ while (i3 < chars.length) {
8276
+ if (chars[++i3] === '"') {
8277
+ i3++;
8278
+ pos = 0;
8279
+ break;
8280
+ }
8281
+ if (chars[i3] === "\\") {
8282
+ value2 += chars[++i3];
8283
+ } else {
8284
+ value2 += chars[i3];
8285
+ }
8286
+ }
8287
+ if (pos) {
8288
+ throw new TypeError(`Unterminated quote at ${pos}: ${DEBUG_URL}`);
8289
+ }
8290
+ }
8291
+ if (!value2) {
8292
+ throw new TypeError(`Missing parameter name at ${i3}: ${DEBUG_URL}`);
8293
+ }
8294
+ return value2;
8295
+ }
8296
+ while (i3 < chars.length) {
8297
+ const value2 = chars[i3];
8298
+ const type5 = SIMPLE_TOKENS[value2];
8299
+ if (type5) {
8300
+ yield { type: type5, index: i3++, value: value2 };
8301
+ } else if (value2 === "\\") {
8302
+ yield { type: "ESCAPED", index: i3++, value: chars[i3++] };
8303
+ } else if (value2 === ":") {
8304
+ const value3 = name();
8305
+ yield { type: "PARAM", index: i3, value: value3 };
8306
+ } else if (value2 === "*") {
8307
+ const value3 = name();
8308
+ yield { type: "WILDCARD", index: i3, value: value3 };
8309
+ } else {
8310
+ yield { type: "CHAR", index: i3, value: chars[i3++] };
8311
+ }
8312
+ }
8313
+ return { type: "END", index: i3, value: "" };
8314
+ }
8315
+ var Iter = class {
8316
+ constructor(tokens) {
8317
+ this.tokens = tokens;
8318
+ }
8319
+ peek() {
8320
+ if (!this._peek) {
8321
+ const next2 = this.tokens.next();
8322
+ this._peek = next2.value;
8323
+ }
8324
+ return this._peek;
8325
+ }
8326
+ tryConsume(type5) {
8327
+ const token = this.peek();
8328
+ if (token.type !== type5)
8329
+ return;
8330
+ this._peek = void 0;
8331
+ return token.value;
8332
+ }
8333
+ consume(type5) {
8334
+ const value2 = this.tryConsume(type5);
8335
+ if (value2 !== void 0)
8336
+ return value2;
8337
+ const { type: nextType, index: index2 } = this.peek();
8338
+ throw new TypeError(`Unexpected ${nextType} at ${index2}, expected ${type5}: ${DEBUG_URL}`);
8339
+ }
8340
+ text() {
8341
+ let result = "";
8342
+ let value2;
8343
+ while (value2 = this.tryConsume("CHAR") || this.tryConsume("ESCAPED")) {
8344
+ result += value2;
8345
+ }
8346
+ return result;
8347
+ }
8348
+ };
8349
+ var TokenData = class {
8350
+ constructor(tokens) {
8351
+ this.tokens = tokens;
8352
+ }
8353
+ };
8354
+ exports.TokenData = TokenData;
8355
+ function parse4(str, options = {}) {
8356
+ const { encodePath = NOOP_VALUE } = options;
8357
+ const it = new Iter(lexer(str));
8358
+ function consume(endType) {
8359
+ const tokens2 = [];
8360
+ while (true) {
8361
+ const path3 = it.text();
8362
+ if (path3)
8363
+ tokens2.push({ type: "text", value: encodePath(path3) });
8364
+ const param = it.tryConsume("PARAM");
8365
+ if (param) {
8366
+ tokens2.push({
8367
+ type: "param",
8368
+ name: param
8369
+ });
8370
+ continue;
8371
+ }
8372
+ const wildcard = it.tryConsume("WILDCARD");
8373
+ if (wildcard) {
8374
+ tokens2.push({
8375
+ type: "wildcard",
8376
+ name: wildcard
8377
+ });
8378
+ continue;
8379
+ }
8380
+ const open = it.tryConsume("{");
8381
+ if (open) {
8382
+ tokens2.push({
8383
+ type: "group",
8384
+ tokens: consume("}")
8385
+ });
8386
+ continue;
8387
+ }
8388
+ it.consume(endType);
8389
+ return tokens2;
8390
+ }
8391
+ }
8392
+ const tokens = consume("END");
8393
+ return new TokenData(tokens);
8394
+ }
8395
+ function compile(path3, options = {}) {
8396
+ const { encode: encode2 = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
8397
+ const data = path3 instanceof TokenData ? path3 : parse4(path3, options);
8398
+ const fn = tokensToFunction(data.tokens, delimiter, encode2);
8399
+ return function path4(data2 = {}) {
8400
+ const [path5, ...missing] = fn(data2);
8401
+ if (missing.length) {
8402
+ throw new TypeError(`Missing parameters: ${missing.join(", ")}`);
8403
+ }
8404
+ return path5;
8405
+ };
8406
+ }
8407
+ function tokensToFunction(tokens, delimiter, encode2) {
8408
+ const encoders = tokens.map((token) => tokenToFunction(token, delimiter, encode2));
8409
+ return (data) => {
8410
+ const result = [""];
8411
+ for (const encoder of encoders) {
8412
+ const [value2, ...extras] = encoder(data);
8413
+ result[0] += value2;
8414
+ result.push(...extras);
8415
+ }
8416
+ return result;
8417
+ };
8418
+ }
8419
+ function tokenToFunction(token, delimiter, encode2) {
8420
+ if (token.type === "text")
8421
+ return () => [token.value];
8422
+ if (token.type === "group") {
8423
+ const fn = tokensToFunction(token.tokens, delimiter, encode2);
8424
+ return (data) => {
8425
+ const [value2, ...missing] = fn(data);
8426
+ if (!missing.length)
8427
+ return [value2];
8428
+ return [""];
8429
+ };
8430
+ }
8431
+ const encodeValue = encode2 || NOOP_VALUE;
8432
+ if (token.type === "wildcard" && encode2 !== false) {
8433
+ return (data) => {
8434
+ const value2 = data[token.name];
8435
+ if (value2 == null)
8436
+ return ["", token.name];
8437
+ if (!Array.isArray(value2) || value2.length === 0) {
8438
+ throw new TypeError(`Expected "${token.name}" to be a non-empty array`);
8439
+ }
8440
+ return [
8441
+ value2.map((value3, index2) => {
8442
+ if (typeof value3 !== "string") {
8443
+ throw new TypeError(`Expected "${token.name}/${index2}" to be a string`);
8444
+ }
8445
+ return encodeValue(value3);
8446
+ }).join(delimiter)
8447
+ ];
8448
+ };
8449
+ }
8450
+ return (data) => {
8451
+ const value2 = data[token.name];
8452
+ if (value2 == null)
8453
+ return ["", token.name];
8454
+ if (typeof value2 !== "string") {
8455
+ throw new TypeError(`Expected "${token.name}" to be a string`);
8456
+ }
8457
+ return [encodeValue(value2)];
8458
+ };
8459
+ }
8460
+ function match(path3, options = {}) {
8461
+ const { decode: decode3 = decodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
8462
+ const { regexp, keys: keys2 } = pathToRegexp(path3, options);
8463
+ const decoders = keys2.map((key2) => {
8464
+ if (decode3 === false)
8465
+ return NOOP_VALUE;
8466
+ if (key2.type === "param")
8467
+ return decode3;
8468
+ return (value2) => value2.split(delimiter).map(decode3);
8469
+ });
8470
+ return function match2(input) {
8471
+ const m2 = regexp.exec(input);
8472
+ if (!m2)
8473
+ return false;
8474
+ const path4 = m2[0];
8475
+ const params = /* @__PURE__ */ Object.create(null);
8476
+ for (let i3 = 1; i3 < m2.length; i3++) {
8477
+ if (m2[i3] === void 0)
8478
+ continue;
8479
+ const key2 = keys2[i3 - 1];
8480
+ const decoder = decoders[i3 - 1];
8481
+ params[key2.name] = decoder(m2[i3]);
8482
+ }
8483
+ return { path: path4, params };
8484
+ };
8485
+ }
8486
+ function pathToRegexp(path3, options = {}) {
8487
+ const { delimiter = DEFAULT_DELIMITER, end = true, sensitive = false, trailing = true } = options;
8488
+ const keys2 = [];
8489
+ const sources = [];
8490
+ const flags = sensitive ? "" : "i";
8491
+ const paths = Array.isArray(path3) ? path3 : [path3];
8492
+ const items = paths.map((path4) => path4 instanceof TokenData ? path4 : parse4(path4, options));
8493
+ for (const { tokens } of items) {
8494
+ for (const seq of flatten(tokens, 0, [])) {
8495
+ const regexp2 = sequenceToRegExp(seq, delimiter, keys2);
8496
+ sources.push(regexp2);
8497
+ }
8498
+ }
8499
+ let pattern = `^(?:${sources.join("|")})`;
8500
+ if (trailing)
8501
+ pattern += `(?:${escape2(delimiter)}$)?`;
8502
+ pattern += end ? "$" : `(?=${escape2(delimiter)}|$)`;
8503
+ const regexp = new RegExp(pattern, flags);
8504
+ return { regexp, keys: keys2 };
8505
+ }
8506
+ function* flatten(tokens, index2, init) {
8507
+ if (index2 === tokens.length) {
8508
+ return yield init;
8509
+ }
8510
+ const token = tokens[index2];
8511
+ if (token.type === "group") {
8512
+ const fork = init.slice();
8513
+ for (const seq of flatten(token.tokens, 0, fork)) {
8514
+ yield* flatten(tokens, index2 + 1, seq);
8515
+ }
8516
+ } else {
8517
+ init.push(token);
8518
+ }
8519
+ yield* flatten(tokens, index2 + 1, init);
8520
+ }
8521
+ function sequenceToRegExp(tokens, delimiter, keys2) {
8522
+ let result = "";
8523
+ let backtrack = "";
8524
+ let isSafeSegmentParam = true;
8525
+ for (let i3 = 0; i3 < tokens.length; i3++) {
8526
+ const token = tokens[i3];
8527
+ if (token.type === "text") {
8528
+ result += escape2(token.value);
8529
+ backtrack += token.value;
8530
+ isSafeSegmentParam || (isSafeSegmentParam = token.value.includes(delimiter));
8531
+ continue;
8532
+ }
8533
+ if (token.type === "param" || token.type === "wildcard") {
8534
+ if (!isSafeSegmentParam && !backtrack) {
8535
+ throw new TypeError(`Missing text after "${token.name}": ${DEBUG_URL}`);
8536
+ }
8537
+ if (token.type === "param") {
8538
+ result += `(${negate(delimiter, isSafeSegmentParam ? "" : backtrack)}+)`;
8539
+ } else {
8540
+ result += `([\\s\\S]+)`;
8541
+ }
8542
+ keys2.push(token);
8543
+ backtrack = "";
8544
+ isSafeSegmentParam = false;
8545
+ continue;
8546
+ }
8547
+ }
8548
+ return result;
8549
+ }
8550
+ function negate(delimiter, backtrack) {
8551
+ if (backtrack.length < 2) {
8552
+ if (delimiter.length < 2)
8553
+ return `[^${escape2(delimiter + backtrack)}]`;
8554
+ return `(?:(?!${escape2(delimiter)})[^${escape2(backtrack)}])`;
8555
+ }
8556
+ if (delimiter.length < 2) {
8557
+ return `(?:(?!${escape2(backtrack)})[^${escape2(delimiter)}])`;
8558
+ }
8559
+ return `(?:(?!${escape2(backtrack)}|${escape2(delimiter)})[\\s\\S])`;
8560
+ }
8561
+ function stringify5(data) {
8562
+ return data.tokens.map(function stringifyToken(token, index2, tokens) {
8563
+ if (token.type === "text")
8564
+ return escapeText(token.value);
8565
+ if (token.type === "group") {
8566
+ return `{${token.tokens.map(stringifyToken).join("")}}`;
8567
+ }
8568
+ const isSafe = isNameSafe(token.name) && isNextNameSafe(tokens[index2 + 1]);
8569
+ const key2 = isSafe ? token.name : JSON.stringify(token.name);
8570
+ if (token.type === "param")
8571
+ return `:${key2}`;
8572
+ if (token.type === "wildcard")
8573
+ return `*${key2}`;
8574
+ throw new TypeError(`Unexpected token: ${token}`);
8575
+ }).join("");
8576
+ }
8577
+ function isNameSafe(name) {
8578
+ const [first, ...rest] = name;
8579
+ if (!ID_START.test(first))
8580
+ return false;
8581
+ return rest.every((char) => ID_CONTINUE.test(char));
8582
+ }
8583
+ function isNextNameSafe(token) {
8584
+ if ((token === null || token === void 0 ? void 0 : token.type) !== "text")
8585
+ return true;
8586
+ return !ID_CONTINUE.test(token.value[0]);
8587
+ }
8588
+ }
8589
+ });
8590
+
8228
8591
  // node_modules/.pnpm/@pushrocks+smartpromise@3.1.10/node_modules/@pushrocks/smartpromise/dist_ts/index.js
8229
8592
  var require_dist_ts3 = __commonJS({
8230
8593
  "node_modules/.pnpm/@pushrocks+smartpromise@3.1.10/node_modules/@pushrocks/smartpromise/dist_ts/index.js"(exports) {
@@ -11955,9 +12318,9 @@ CronDate.prototype.findNext = function(options, target, pattern, offset) {
11955
12318
  }
11956
12319
  const fDomWeekDay = !pattern.starDOW && target == "day" ? new Date(Date.UTC(this.year, this.month, 1, 0, 0, 0, 0)).getUTCDay() : void 0;
11957
12320
  for (let i3 = this[target] + offset; i3 < pattern[target].length; i3++) {
11958
- let match2 = pattern[target][i3];
12321
+ let match = pattern[target][i3];
11959
12322
  if (target === "day" && pattern.lastDayOfMonth && i3 - offset == lastDayOfMonth) {
11960
- match2 = true;
12323
+ match = true;
11961
12324
  }
11962
12325
  if (target === "day" && !pattern.starDOW) {
11963
12326
  let dowMatch = pattern.dayOfWeek[(fDomWeekDay + (i3 - offset - 1)) % 7];
@@ -11967,12 +12330,12 @@ CronDate.prototype.findNext = function(options, target, pattern, offset) {
11967
12330
  throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${dowMatch}`);
11968
12331
  }
11969
12332
  if (options.legacyMode && !pattern.starDOM) {
11970
- match2 = match2 || dowMatch;
12333
+ match = match || dowMatch;
11971
12334
  } else {
11972
- match2 = match2 && dowMatch;
12335
+ match = match && dowMatch;
11973
12336
  }
11974
12337
  }
11975
- if (match2) {
12338
+ if (match) {
11976
12339
  this[target] = i3 - offset;
11977
12340
  return originalTarget !== this[target] ? 2 : 1;
11978
12341
  }
@@ -18806,15 +19169,15 @@ function findAndReplace(tree, list5, options) {
18806
19169
  let change = false;
18807
19170
  let nodes = [];
18808
19171
  find2.lastIndex = 0;
18809
- let match2 = find2.exec(node2.value);
18810
- while (match2) {
18811
- const position3 = match2.index;
19172
+ let match = find2.exec(node2.value);
19173
+ while (match) {
19174
+ const position3 = match.index;
18812
19175
  const matchObject = {
18813
- index: match2.index,
18814
- input: match2.input,
19176
+ index: match.index,
19177
+ input: match.input,
18815
19178
  stack: [...parents, node2]
18816
19179
  };
18817
- let value2 = replace2(...match2, matchObject);
19180
+ let value2 = replace2(...match, matchObject);
18818
19181
  if (typeof value2 === "string") {
18819
19182
  value2 = value2.length > 0 ? { type: "text", value: value2 } : void 0;
18820
19183
  }
@@ -18832,13 +19195,13 @@ function findAndReplace(tree, list5, options) {
18832
19195
  } else if (value2) {
18833
19196
  nodes.push(value2);
18834
19197
  }
18835
- start = position3 + match2[0].length;
19198
+ start = position3 + match[0].length;
18836
19199
  change = true;
18837
19200
  }
18838
19201
  if (!find2.global) {
18839
19202
  break;
18840
19203
  }
18841
- match2 = find2.exec(node2.value);
19204
+ match = find2.exec(node2.value);
18842
19205
  }
18843
19206
  if (change) {
18844
19207
  if (start < node2.value.length) {
@@ -18951,9 +19314,9 @@ function transformGfmAutolinkLiterals(tree) {
18951
19314
  { ignore: ["link", "linkReference"] }
18952
19315
  );
18953
19316
  }
18954
- function findUrl(_2, protocol, domain2, path3, match2) {
19317
+ function findUrl(_2, protocol, domain2, path3, match) {
18955
19318
  let prefix = "";
18956
- if (!previous(match2)) {
19319
+ if (!previous(match)) {
18957
19320
  return false;
18958
19321
  }
18959
19322
  if (/^w/i.test(protocol)) {
@@ -18978,10 +19341,10 @@ function findUrl(_2, protocol, domain2, path3, match2) {
18978
19341
  }
18979
19342
  return result;
18980
19343
  }
18981
- function findEmail(_2, atext, label, match2) {
19344
+ function findEmail(_2, atext, label, match) {
18982
19345
  if (
18983
19346
  // Not an expected previous character.
18984
- !previous(match2, true) || // Label ends in not allowed character.
19347
+ !previous(match, true) || // Label ends in not allowed character.
18985
19348
  /[-\d_]$/.test(label)
18986
19349
  ) {
18987
19350
  return false;
@@ -19018,9 +19381,9 @@ function splitUrl(url2) {
19018
19381
  }
19019
19382
  return [url2, trail2];
19020
19383
  }
19021
- function previous(match2, email) {
19022
- const code4 = match2.input.charCodeAt(match2.index - 1);
19023
- return (match2.index === 0 || unicodeWhitespace(code4) || unicodePunctuation(code4)) && (!email || code4 !== 47);
19384
+ function previous(match, email) {
19385
+ const code4 = match.input.charCodeAt(match.index - 1);
19386
+ return (match.index === 0 || unicodeWhitespace(code4) || unicodePunctuation(code4)) && (!email || code4 !== 47);
19024
19387
  }
19025
19388
 
19026
19389
  // node_modules/.pnpm/micromark-util-normalize-identifier@2.0.0/node_modules/micromark-util-normalize-identifier/index.js
@@ -19882,15 +20245,15 @@ function inlineCode(node2, _2, state) {
19882
20245
  while (++index2 < state.unsafe.length) {
19883
20246
  const pattern = state.unsafe[index2];
19884
20247
  const expression = state.compilePattern(pattern);
19885
- let match2;
20248
+ let match;
19886
20249
  if (!pattern.atBreak)
19887
20250
  continue;
19888
- while (match2 = expression.exec(value2)) {
19889
- let position3 = match2.index;
20251
+ while (match = expression.exec(value2)) {
20252
+ let position3 = match.index;
19890
20253
  if (value2.charCodeAt(position3) === 10 && value2.charCodeAt(position3 - 1) === 13) {
19891
20254
  position3--;
19892
20255
  }
19893
- value2 = value2.slice(0, position3) + " " + value2.slice(match2.index + 1);
20256
+ value2 = value2.slice(0, position3) + " " + value2.slice(match.index + 1);
19894
20257
  }
19895
20258
  }
19896
20259
  return sequence + value2 + sequence;
@@ -20614,11 +20977,11 @@ function indentLines(value2, map8) {
20614
20977
  const result = [];
20615
20978
  let start = 0;
20616
20979
  let line = 0;
20617
- let match2;
20618
- while (match2 = eol.exec(value2)) {
20619
- one3(value2.slice(start, match2.index));
20620
- result.push(match2[0]);
20621
- start = match2.index + match2[0].length;
20980
+ let match;
20981
+ while (match = eol.exec(value2)) {
20982
+ one3(value2.slice(start, match.index));
20983
+ result.push(match[0]);
20984
+ start = match.index + match[0].length;
20622
20985
  line++;
20623
20986
  }
20624
20987
  one3(value2.slice(start));
@@ -20641,11 +21004,11 @@ function safe(state, input, config2) {
20641
21004
  continue;
20642
21005
  }
20643
21006
  const expression = state.compilePattern(pattern);
20644
- let match2;
20645
- while (match2 = expression.exec(value2)) {
21007
+ let match;
21008
+ while (match = expression.exec(value2)) {
20646
21009
  const before = "before" in pattern || Boolean(pattern.atBreak);
20647
21010
  const after = "after" in pattern;
20648
- const position3 = match2.index + (before ? match2[1].length : 0);
21011
+ const position3 = match.index + (before ? match[1].length : 0);
20649
21012
  if (positions.includes(position3)) {
20650
21013
  if (infos[position3].before && !before) {
20651
21014
  infos[position3].before = false;
@@ -20697,9 +21060,9 @@ function escapeBackslashes(value2, after) {
20697
21060
  const whole = value2 + after;
20698
21061
  let index2 = -1;
20699
21062
  let start = 0;
20700
- let match2;
20701
- while (match2 = expression.exec(whole)) {
20702
- positions.push(match2.index);
21063
+ let match;
21064
+ while (match = expression.exec(whole)) {
21065
+ positions.push(match.index);
20703
21066
  }
20704
21067
  while (++index2 < positions.length) {
20705
21068
  if (start !== positions[index2]) {
@@ -26351,7 +26714,7 @@ function preprocess() {
26351
26714
  return preprocessor;
26352
26715
  function preprocessor(value2, encoding, end) {
26353
26716
  const chunks = [];
26354
- let match2;
26717
+ let match;
26355
26718
  let next2;
26356
26719
  let startPosition;
26357
26720
  let endPosition;
@@ -26367,10 +26730,10 @@ function preprocess() {
26367
26730
  }
26368
26731
  while (startPosition < value2.length) {
26369
26732
  search.lastIndex = startPosition;
26370
- match2 = search.exec(value2);
26371
- endPosition = match2 && match2.index !== void 0 ? match2.index : value2.length;
26733
+ match = search.exec(value2);
26734
+ endPosition = match && match.index !== void 0 ? match.index : value2.length;
26372
26735
  code4 = value2.charCodeAt(endPosition);
26373
- if (!match2) {
26736
+ if (!match) {
26374
26737
  buffer = value2.slice(startPosition);
26375
26738
  break;
26376
26739
  }
@@ -26533,8 +26896,8 @@ function compiler(options) {
26533
26896
  };
26534
26897
  configure2(config2, (options || {}).mdastExtensions || []);
26535
26898
  const data = {};
26536
- return compile2;
26537
- function compile2(events) {
26899
+ return compile;
26900
+ function compile(events) {
26538
26901
  let tree = {
26539
26902
  type: "root",
26540
26903
  children: []
@@ -27521,8 +27884,8 @@ var deserializer = ($2, _2) => {
27521
27884
  case DATE:
27522
27885
  return as(new Date(value2), index2);
27523
27886
  case REGEXP: {
27524
- const { source, flags: flags2 } = value2;
27525
- return as(new RegExp(source, flags2), index2);
27887
+ const { source, flags } = value2;
27888
+ return as(new RegExp(source, flags), index2);
27526
27889
  }
27527
27890
  case MAP: {
27528
27891
  const map8 = as(/* @__PURE__ */ new Map(), index2);
@@ -27643,8 +28006,8 @@ var serializer = (strict, json, $2, _2) => {
27643
28006
  case DATE:
27644
28007
  return as([TYPE, value2.toISOString()], value2);
27645
28008
  case REGEXP: {
27646
- const { source, flags: flags2 } = value2;
27647
- return as([TYPE, { source, flags: flags2 }], value2);
28009
+ const { source, flags } = value2;
28010
+ return as([TYPE, { source, flags }], value2);
27648
28011
  }
27649
28012
  case MAP: {
27650
28013
  const entries = [];
@@ -28619,16 +28982,16 @@ var space = 32;
28619
28982
  function trimLines(value2) {
28620
28983
  const source = String(value2);
28621
28984
  const search2 = /\r?\n|\r/g;
28622
- let match2 = search2.exec(source);
28985
+ let match = search2.exec(source);
28623
28986
  let last2 = 0;
28624
28987
  const lines = [];
28625
- while (match2) {
28988
+ while (match) {
28626
28989
  lines.push(
28627
- trimLine(source.slice(last2, match2.index), last2 > 0, true),
28628
- match2[0]
28990
+ trimLine(source.slice(last2, match.index), last2 > 0, true),
28991
+ match[0]
28629
28992
  );
28630
- last2 = match2.index + match2[0].length;
28631
- match2 = search2.exec(source);
28993
+ last2 = match.index + match[0].length;
28994
+ match = search2.exec(source);
28632
28995
  }
28633
28996
  lines.push(trimLine(source.slice(last2), last2 > 0, false));
28634
28997
  return lines.join("");
@@ -31377,10 +31740,10 @@ rules.fencedCodeBlock = {
31377
31740
  var fenceChar = options.fence.charAt(0);
31378
31741
  var fenceSize = 3;
31379
31742
  var fenceInCodeRegex = new RegExp("^" + fenceChar + "{3,}", "gm");
31380
- var match2;
31381
- while (match2 = fenceInCodeRegex.exec(code4)) {
31382
- if (match2[0].length >= fenceSize) {
31383
- fenceSize = match2[0].length + 1;
31743
+ var match;
31744
+ while (match = fenceInCodeRegex.exec(code4)) {
31745
+ if (match[0].length >= fenceSize) {
31746
+ fenceSize = match[0].length + 1;
31384
31747
  }
31385
31748
  }
31386
31749
  var fence3 = repeat(fenceChar, fenceSize);
@@ -32105,399 +32468,16 @@ var SmartMarkdown = class _SmartMarkdown {
32105
32468
  }
32106
32469
  };
32107
32470
 
32108
- // node_modules/.pnpm/@push.rocks+smartrouter@1.2.1/node_modules/@push.rocks/smartrouter/dist_ts/index.js
32471
+ // node_modules/.pnpm/@push.rocks+smartrouter@1.3.2/node_modules/@push.rocks/smartrouter/dist_ts/index.js
32109
32472
  var dist_ts_exports18 = {};
32110
32473
  __export(dist_ts_exports18, {
32111
32474
  SmartRouter: () => SmartRouter
32112
32475
  });
32113
32476
 
32114
- // node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist.es2015/index.js
32115
- var dist_exports = {};
32116
- __export(dist_exports, {
32117
- compile: () => compile,
32118
- match: () => match,
32119
- parse: () => parse4,
32120
- pathToRegexp: () => pathToRegexp,
32121
- regexpToFunction: () => regexpToFunction,
32122
- tokensToFunction: () => tokensToFunction,
32123
- tokensToRegexp: () => tokensToRegexp
32124
- });
32125
- function lexer(str) {
32126
- var tokens = [];
32127
- var i3 = 0;
32128
- while (i3 < str.length) {
32129
- var char = str[i3];
32130
- if (char === "*" || char === "+" || char === "?") {
32131
- tokens.push({ type: "MODIFIER", index: i3, value: str[i3++] });
32132
- continue;
32133
- }
32134
- if (char === "\\") {
32135
- tokens.push({ type: "ESCAPED_CHAR", index: i3++, value: str[i3++] });
32136
- continue;
32137
- }
32138
- if (char === "{") {
32139
- tokens.push({ type: "OPEN", index: i3, value: str[i3++] });
32140
- continue;
32141
- }
32142
- if (char === "}") {
32143
- tokens.push({ type: "CLOSE", index: i3, value: str[i3++] });
32144
- continue;
32145
- }
32146
- if (char === ":") {
32147
- var name = "";
32148
- var j2 = i3 + 1;
32149
- while (j2 < str.length) {
32150
- var code4 = str.charCodeAt(j2);
32151
- if (
32152
- // `0-9`
32153
- code4 >= 48 && code4 <= 57 || // `A-Z`
32154
- code4 >= 65 && code4 <= 90 || // `a-z`
32155
- code4 >= 97 && code4 <= 122 || // `_`
32156
- code4 === 95
32157
- ) {
32158
- name += str[j2++];
32159
- continue;
32160
- }
32161
- break;
32162
- }
32163
- if (!name)
32164
- throw new TypeError("Missing parameter name at ".concat(i3));
32165
- tokens.push({ type: "NAME", index: i3, value: name });
32166
- i3 = j2;
32167
- continue;
32168
- }
32169
- if (char === "(") {
32170
- var count = 1;
32171
- var pattern = "";
32172
- var j2 = i3 + 1;
32173
- if (str[j2] === "?") {
32174
- throw new TypeError('Pattern cannot start with "?" at '.concat(j2));
32175
- }
32176
- while (j2 < str.length) {
32177
- if (str[j2] === "\\") {
32178
- pattern += str[j2++] + str[j2++];
32179
- continue;
32180
- }
32181
- if (str[j2] === ")") {
32182
- count--;
32183
- if (count === 0) {
32184
- j2++;
32185
- break;
32186
- }
32187
- } else if (str[j2] === "(") {
32188
- count++;
32189
- if (str[j2 + 1] !== "?") {
32190
- throw new TypeError("Capturing groups are not allowed at ".concat(j2));
32191
- }
32192
- }
32193
- pattern += str[j2++];
32194
- }
32195
- if (count)
32196
- throw new TypeError("Unbalanced pattern at ".concat(i3));
32197
- if (!pattern)
32198
- throw new TypeError("Missing pattern at ".concat(i3));
32199
- tokens.push({ type: "PATTERN", index: i3, value: pattern });
32200
- i3 = j2;
32201
- continue;
32202
- }
32203
- tokens.push({ type: "CHAR", index: i3, value: str[i3++] });
32204
- }
32205
- tokens.push({ type: "END", index: i3, value: "" });
32206
- return tokens;
32207
- }
32208
- function parse4(str, options) {
32209
- if (options === void 0) {
32210
- options = {};
32211
- }
32212
- var tokens = lexer(str);
32213
- var _a = options.prefixes, prefixes = _a === void 0 ? "./" : _a, _b = options.delimiter, delimiter = _b === void 0 ? "/#?" : _b;
32214
- var result = [];
32215
- var key2 = 0;
32216
- var i3 = 0;
32217
- var path3 = "";
32218
- var tryConsume = function(type5) {
32219
- if (i3 < tokens.length && tokens[i3].type === type5)
32220
- return tokens[i3++].value;
32221
- };
32222
- var mustConsume = function(type5) {
32223
- var value3 = tryConsume(type5);
32224
- if (value3 !== void 0)
32225
- return value3;
32226
- var _a2 = tokens[i3], nextType = _a2.type, index2 = _a2.index;
32227
- throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index2, ", expected ").concat(type5));
32228
- };
32229
- var consumeText = function() {
32230
- var result2 = "";
32231
- var value3;
32232
- while (value3 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
32233
- result2 += value3;
32234
- }
32235
- return result2;
32236
- };
32237
- var isSafe = function(value3) {
32238
- for (var _i = 0, delimiter_1 = delimiter; _i < delimiter_1.length; _i++) {
32239
- var char2 = delimiter_1[_i];
32240
- if (value3.indexOf(char2) > -1)
32241
- return true;
32242
- }
32243
- return false;
32244
- };
32245
- var safePattern = function(prefix2) {
32246
- var prev = result[result.length - 1];
32247
- var prevText = prefix2 || (prev && typeof prev === "string" ? prev : "");
32248
- if (prev && !prevText) {
32249
- throw new TypeError('Must have text between two parameters, missing text after "'.concat(prev.name, '"'));
32250
- }
32251
- if (!prevText || isSafe(prevText))
32252
- return "[^".concat(escapeString(delimiter), "]+?");
32253
- return "(?:(?!".concat(escapeString(prevText), ")[^").concat(escapeString(delimiter), "])+?");
32254
- };
32255
- while (i3 < tokens.length) {
32256
- var char = tryConsume("CHAR");
32257
- var name = tryConsume("NAME");
32258
- var pattern = tryConsume("PATTERN");
32259
- if (name || pattern) {
32260
- var prefix = char || "";
32261
- if (prefixes.indexOf(prefix) === -1) {
32262
- path3 += prefix;
32263
- prefix = "";
32264
- }
32265
- if (path3) {
32266
- result.push(path3);
32267
- path3 = "";
32268
- }
32269
- result.push({
32270
- name: name || key2++,
32271
- prefix,
32272
- suffix: "",
32273
- pattern: pattern || safePattern(prefix),
32274
- modifier: tryConsume("MODIFIER") || ""
32275
- });
32276
- continue;
32277
- }
32278
- var value2 = char || tryConsume("ESCAPED_CHAR");
32279
- if (value2) {
32280
- path3 += value2;
32281
- continue;
32282
- }
32283
- if (path3) {
32284
- result.push(path3);
32285
- path3 = "";
32286
- }
32287
- var open = tryConsume("OPEN");
32288
- if (open) {
32289
- var prefix = consumeText();
32290
- var name_1 = tryConsume("NAME") || "";
32291
- var pattern_1 = tryConsume("PATTERN") || "";
32292
- var suffix = consumeText();
32293
- mustConsume("CLOSE");
32294
- result.push({
32295
- name: name_1 || (pattern_1 ? key2++ : ""),
32296
- pattern: name_1 && !pattern_1 ? safePattern(prefix) : pattern_1,
32297
- prefix,
32298
- suffix,
32299
- modifier: tryConsume("MODIFIER") || ""
32300
- });
32301
- continue;
32302
- }
32303
- mustConsume("END");
32304
- }
32305
- return result;
32306
- }
32307
- function compile(str, options) {
32308
- return tokensToFunction(parse4(str, options), options);
32309
- }
32310
- function tokensToFunction(tokens, options) {
32311
- if (options === void 0) {
32312
- options = {};
32313
- }
32314
- var reFlags = flags(options);
32315
- var _a = options.encode, encode2 = _a === void 0 ? function(x2) {
32316
- return x2;
32317
- } : _a, _b = options.validate, validate = _b === void 0 ? true : _b;
32318
- var matches = tokens.map(function(token) {
32319
- if (typeof token === "object") {
32320
- return new RegExp("^(?:".concat(token.pattern, ")$"), reFlags);
32321
- }
32322
- });
32323
- return function(data) {
32324
- var path3 = "";
32325
- for (var i3 = 0; i3 < tokens.length; i3++) {
32326
- var token = tokens[i3];
32327
- if (typeof token === "string") {
32328
- path3 += token;
32329
- continue;
32330
- }
32331
- var value2 = data ? data[token.name] : void 0;
32332
- var optional = token.modifier === "?" || token.modifier === "*";
32333
- var repeat2 = token.modifier === "*" || token.modifier === "+";
32334
- if (Array.isArray(value2)) {
32335
- if (!repeat2) {
32336
- throw new TypeError('Expected "'.concat(token.name, '" to not repeat, but got an array'));
32337
- }
32338
- if (value2.length === 0) {
32339
- if (optional)
32340
- continue;
32341
- throw new TypeError('Expected "'.concat(token.name, '" to not be empty'));
32342
- }
32343
- for (var j2 = 0; j2 < value2.length; j2++) {
32344
- var segment = encode2(value2[j2], token);
32345
- if (validate && !matches[i3].test(segment)) {
32346
- throw new TypeError('Expected all "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
32347
- }
32348
- path3 += token.prefix + segment + token.suffix;
32349
- }
32350
- continue;
32351
- }
32352
- if (typeof value2 === "string" || typeof value2 === "number") {
32353
- var segment = encode2(String(value2), token);
32354
- if (validate && !matches[i3].test(segment)) {
32355
- throw new TypeError('Expected "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
32356
- }
32357
- path3 += token.prefix + segment + token.suffix;
32358
- continue;
32359
- }
32360
- if (optional)
32361
- continue;
32362
- var typeOfMessage = repeat2 ? "an array" : "a string";
32363
- throw new TypeError('Expected "'.concat(token.name, '" to be ').concat(typeOfMessage));
32364
- }
32365
- return path3;
32366
- };
32367
- }
32368
- function match(str, options) {
32369
- var keys2 = [];
32370
- var re2 = pathToRegexp(str, keys2, options);
32371
- return regexpToFunction(re2, keys2, options);
32372
- }
32373
- function regexpToFunction(re2, keys2, options) {
32374
- if (options === void 0) {
32375
- options = {};
32376
- }
32377
- var _a = options.decode, decode3 = _a === void 0 ? function(x2) {
32378
- return x2;
32379
- } : _a;
32380
- return function(pathname) {
32381
- var m2 = re2.exec(pathname);
32382
- if (!m2)
32383
- return false;
32384
- var path3 = m2[0], index2 = m2.index;
32385
- var params = /* @__PURE__ */ Object.create(null);
32386
- var _loop_1 = function(i4) {
32387
- if (m2[i4] === void 0)
32388
- return "continue";
32389
- var key2 = keys2[i4 - 1];
32390
- if (key2.modifier === "*" || key2.modifier === "+") {
32391
- params[key2.name] = m2[i4].split(key2.prefix + key2.suffix).map(function(value2) {
32392
- return decode3(value2, key2);
32393
- });
32394
- } else {
32395
- params[key2.name] = decode3(m2[i4], key2);
32396
- }
32397
- };
32398
- for (var i3 = 1; i3 < m2.length; i3++) {
32399
- _loop_1(i3);
32400
- }
32401
- return { path: path3, index: index2, params };
32402
- };
32403
- }
32404
- function escapeString(str) {
32405
- return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
32406
- }
32407
- function flags(options) {
32408
- return options && options.sensitive ? "" : "i";
32409
- }
32410
- function regexpToRegexp(path3, keys2) {
32411
- if (!keys2)
32412
- return path3;
32413
- var groupsRegex = /\((?:\?<(.*?)>)?(?!\?)/g;
32414
- var index2 = 0;
32415
- var execResult = groupsRegex.exec(path3.source);
32416
- while (execResult) {
32417
- keys2.push({
32418
- // Use parenthesized substring match if available, index otherwise
32419
- name: execResult[1] || index2++,
32420
- prefix: "",
32421
- suffix: "",
32422
- modifier: "",
32423
- pattern: ""
32424
- });
32425
- execResult = groupsRegex.exec(path3.source);
32426
- }
32427
- return path3;
32428
- }
32429
- function arrayToRegexp(paths, keys2, options) {
32430
- var parts = paths.map(function(path3) {
32431
- return pathToRegexp(path3, keys2, options).source;
32432
- });
32433
- return new RegExp("(?:".concat(parts.join("|"), ")"), flags(options));
32434
- }
32435
- function stringToRegexp(path3, keys2, options) {
32436
- return tokensToRegexp(parse4(path3, options), keys2, options);
32437
- }
32438
- function tokensToRegexp(tokens, keys2, options) {
32439
- if (options === void 0) {
32440
- options = {};
32441
- }
32442
- var _a = options.strict, strict = _a === void 0 ? false : _a, _b = options.start, start = _b === void 0 ? true : _b, _c = options.end, end = _c === void 0 ? true : _c, _d = options.encode, encode2 = _d === void 0 ? function(x2) {
32443
- return x2;
32444
- } : _d, _e = options.delimiter, delimiter = _e === void 0 ? "/#?" : _e, _f = options.endsWith, endsWith = _f === void 0 ? "" : _f;
32445
- var endsWithRe = "[".concat(escapeString(endsWith), "]|$");
32446
- var delimiterRe = "[".concat(escapeString(delimiter), "]");
32447
- var route = start ? "^" : "";
32448
- for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
32449
- var token = tokens_1[_i];
32450
- if (typeof token === "string") {
32451
- route += escapeString(encode2(token));
32452
- } else {
32453
- var prefix = escapeString(encode2(token.prefix));
32454
- var suffix = escapeString(encode2(token.suffix));
32455
- if (token.pattern) {
32456
- if (keys2)
32457
- keys2.push(token);
32458
- if (prefix || suffix) {
32459
- if (token.modifier === "+" || token.modifier === "*") {
32460
- var mod = token.modifier === "*" ? "?" : "";
32461
- route += "(?:".concat(prefix, "((?:").concat(token.pattern, ")(?:").concat(suffix).concat(prefix, "(?:").concat(token.pattern, "))*)").concat(suffix, ")").concat(mod);
32462
- } else {
32463
- route += "(?:".concat(prefix, "(").concat(token.pattern, ")").concat(suffix, ")").concat(token.modifier);
32464
- }
32465
- } else {
32466
- if (token.modifier === "+" || token.modifier === "*") {
32467
- throw new TypeError('Can not repeat "'.concat(token.name, '" without a prefix and suffix'));
32468
- }
32469
- route += "(".concat(token.pattern, ")").concat(token.modifier);
32470
- }
32471
- } else {
32472
- route += "(?:".concat(prefix).concat(suffix, ")").concat(token.modifier);
32473
- }
32474
- }
32475
- }
32476
- if (end) {
32477
- if (!strict)
32478
- route += "".concat(delimiterRe, "?");
32479
- route += !options.endsWith ? "$" : "(?=".concat(endsWithRe, ")");
32480
- } else {
32481
- var endToken = tokens[tokens.length - 1];
32482
- var isEndDelimited = typeof endToken === "string" ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1 : endToken === void 0;
32483
- if (!strict) {
32484
- route += "(?:".concat(delimiterRe, "(?=").concat(endsWithRe, "))?");
32485
- }
32486
- if (!isEndDelimited) {
32487
- route += "(?=".concat(delimiterRe, "|").concat(endsWithRe, ")");
32488
- }
32489
- }
32490
- return new RegExp(route, flags(options));
32491
- }
32492
- function pathToRegexp(path3, keys2, options) {
32493
- if (path3 instanceof RegExp)
32494
- return regexpToRegexp(path3, keys2);
32495
- if (Array.isArray(path3))
32496
- return arrayToRegexp(path3, keys2, options);
32497
- return stringToRegexp(path3, keys2, options);
32498
- }
32477
+ // node_modules/.pnpm/@push.rocks+smartrouter@1.3.2/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.plugins.js
32478
+ var pathToRegExp = __toESM(require_dist(), 1);
32499
32479
 
32500
- // node_modules/.pnpm/@push.rocks+smartrouter@1.2.1/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.classes.queryparams.js
32480
+ // node_modules/.pnpm/@push.rocks+smartrouter@1.3.2/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.classes.queryparams.js
32501
32481
  var QueryParams = class {
32502
32482
  constructor() {
32503
32483
  }
@@ -32521,7 +32501,7 @@ var QueryParams = class {
32521
32501
  }
32522
32502
  };
32523
32503
 
32524
- // node_modules/.pnpm/@push.rocks+smartrouter@1.2.1/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.classes.smartrouter.js
32504
+ // node_modules/.pnpm/@push.rocks+smartrouter@1.3.2/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.classes.smartrouter.js
32525
32505
  var SmartRouter = class _SmartRouter {
32526
32506
  /**
32527
32507
  * Creates an instance of Router.
@@ -32537,10 +32517,11 @@ var SmartRouter = class _SmartRouter {
32537
32517
  ...optionsArg
32538
32518
  };
32539
32519
  this.basePath = basePath;
32540
- window.addEventListener("popstate", (popStateEventArg) => {
32520
+ this.popstateListener = (popStateEventArg) => {
32541
32521
  popStateEventArg.preventDefault();
32542
32522
  this._handleRouteState();
32543
- });
32523
+ };
32524
+ window.addEventListener("popstate", this.popstateListener);
32544
32525
  }
32545
32526
  /**
32546
32527
  * Create a sub-router with a specific prefix
@@ -32571,7 +32552,7 @@ var SmartRouter = class _SmartRouter {
32571
32552
  on(routeArg, handlerArg) {
32572
32553
  const fullRoute = `${this.basePath}${routeArg}`;
32573
32554
  const routeObject = {
32574
- matchFunction: dist_exports.match(fullRoute),
32555
+ matchFunction: pathToRegExp.match(fullRoute),
32575
32556
  handler: handlerArg
32576
32557
  };
32577
32558
  this.routes.push(routeObject);
@@ -32597,6 +32578,13 @@ var SmartRouter = class _SmartRouter {
32597
32578
  });
32598
32579
  }
32599
32580
  }
32581
+ /**
32582
+ * Destroy the router instance, removing all external references
32583
+ */
32584
+ destroy() {
32585
+ window.removeEventListener("popstate", this.popstateListener);
32586
+ this.routes = [];
32587
+ }
32600
32588
  };
32601
32589
 
32602
32590
  // node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/index.js
@@ -35014,6 +35002,7 @@ __export(domtools_pluginexports_exports, {
35014
35002
  smartdelay: () => dist_ts_exports2,
35015
35003
  smartmarkdown: () => dist_ts_exports17,
35016
35004
  smartpromise: () => dist_ts_exports,
35005
+ smartrouter: () => dist_ts_exports18,
35017
35006
  smartrx: () => dist_ts_exports4,
35018
35007
  smartstate: () => dist_ts_exports21,
35019
35008
  smartstring: () => dist_ts_exports10,