@design.estate/dees-domtools 2.0.61 → 2.0.63

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,383 +32468,16 @@ var SmartMarkdown = class _SmartMarkdown {
32105
32468
  }
32106
32469
  };
32107
32470
 
32108
- // node_modules/.pnpm/@push.rocks+smartrouter@1.0.16/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.2.2/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;
32214
- var defaultPattern = "[^".concat(escapeString(options.delimiter || "/#?"), "]+?");
32215
- var result = [];
32216
- var key2 = 0;
32217
- var i3 = 0;
32218
- var path3 = "";
32219
- var tryConsume = function(type5) {
32220
- if (i3 < tokens.length && tokens[i3].type === type5)
32221
- return tokens[i3++].value;
32222
- };
32223
- var mustConsume = function(type5) {
32224
- var value3 = tryConsume(type5);
32225
- if (value3 !== void 0)
32226
- return value3;
32227
- var _a2 = tokens[i3], nextType = _a2.type, index2 = _a2.index;
32228
- throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index2, ", expected ").concat(type5));
32229
- };
32230
- var consumeText = function() {
32231
- var result2 = "";
32232
- var value3;
32233
- while (value3 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
32234
- result2 += value3;
32235
- }
32236
- return result2;
32237
- };
32238
- while (i3 < tokens.length) {
32239
- var char = tryConsume("CHAR");
32240
- var name = tryConsume("NAME");
32241
- var pattern = tryConsume("PATTERN");
32242
- if (name || pattern) {
32243
- var prefix = char || "";
32244
- if (prefixes.indexOf(prefix) === -1) {
32245
- path3 += prefix;
32246
- prefix = "";
32247
- }
32248
- if (path3) {
32249
- result.push(path3);
32250
- path3 = "";
32251
- }
32252
- result.push({
32253
- name: name || key2++,
32254
- prefix,
32255
- suffix: "",
32256
- pattern: pattern || defaultPattern,
32257
- modifier: tryConsume("MODIFIER") || ""
32258
- });
32259
- continue;
32260
- }
32261
- var value2 = char || tryConsume("ESCAPED_CHAR");
32262
- if (value2) {
32263
- path3 += value2;
32264
- continue;
32265
- }
32266
- if (path3) {
32267
- result.push(path3);
32268
- path3 = "";
32269
- }
32270
- var open = tryConsume("OPEN");
32271
- if (open) {
32272
- var prefix = consumeText();
32273
- var name_1 = tryConsume("NAME") || "";
32274
- var pattern_1 = tryConsume("PATTERN") || "";
32275
- var suffix = consumeText();
32276
- mustConsume("CLOSE");
32277
- result.push({
32278
- name: name_1 || (pattern_1 ? key2++ : ""),
32279
- pattern: name_1 && !pattern_1 ? defaultPattern : pattern_1,
32280
- prefix,
32281
- suffix,
32282
- modifier: tryConsume("MODIFIER") || ""
32283
- });
32284
- continue;
32285
- }
32286
- mustConsume("END");
32287
- }
32288
- return result;
32289
- }
32290
- function compile(str, options) {
32291
- return tokensToFunction(parse4(str, options), options);
32292
- }
32293
- function tokensToFunction(tokens, options) {
32294
- if (options === void 0) {
32295
- options = {};
32296
- }
32297
- var reFlags = flags(options);
32298
- var _a = options.encode, encode2 = _a === void 0 ? function(x2) {
32299
- return x2;
32300
- } : _a, _b = options.validate, validate = _b === void 0 ? true : _b;
32301
- var matches = tokens.map(function(token) {
32302
- if (typeof token === "object") {
32303
- return new RegExp("^(?:".concat(token.pattern, ")$"), reFlags);
32304
- }
32305
- });
32306
- return function(data) {
32307
- var path3 = "";
32308
- for (var i3 = 0; i3 < tokens.length; i3++) {
32309
- var token = tokens[i3];
32310
- if (typeof token === "string") {
32311
- path3 += token;
32312
- continue;
32313
- }
32314
- var value2 = data ? data[token.name] : void 0;
32315
- var optional = token.modifier === "?" || token.modifier === "*";
32316
- var repeat2 = token.modifier === "*" || token.modifier === "+";
32317
- if (Array.isArray(value2)) {
32318
- if (!repeat2) {
32319
- throw new TypeError('Expected "'.concat(token.name, '" to not repeat, but got an array'));
32320
- }
32321
- if (value2.length === 0) {
32322
- if (optional)
32323
- continue;
32324
- throw new TypeError('Expected "'.concat(token.name, '" to not be empty'));
32325
- }
32326
- for (var j2 = 0; j2 < value2.length; j2++) {
32327
- var segment = encode2(value2[j2], token);
32328
- if (validate && !matches[i3].test(segment)) {
32329
- throw new TypeError('Expected all "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
32330
- }
32331
- path3 += token.prefix + segment + token.suffix;
32332
- }
32333
- continue;
32334
- }
32335
- if (typeof value2 === "string" || typeof value2 === "number") {
32336
- var segment = encode2(String(value2), token);
32337
- if (validate && !matches[i3].test(segment)) {
32338
- throw new TypeError('Expected "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
32339
- }
32340
- path3 += token.prefix + segment + token.suffix;
32341
- continue;
32342
- }
32343
- if (optional)
32344
- continue;
32345
- var typeOfMessage = repeat2 ? "an array" : "a string";
32346
- throw new TypeError('Expected "'.concat(token.name, '" to be ').concat(typeOfMessage));
32347
- }
32348
- return path3;
32349
- };
32350
- }
32351
- function match(str, options) {
32352
- var keys2 = [];
32353
- var re2 = pathToRegexp(str, keys2, options);
32354
- return regexpToFunction(re2, keys2, options);
32355
- }
32356
- function regexpToFunction(re2, keys2, options) {
32357
- if (options === void 0) {
32358
- options = {};
32359
- }
32360
- var _a = options.decode, decode3 = _a === void 0 ? function(x2) {
32361
- return x2;
32362
- } : _a;
32363
- return function(pathname) {
32364
- var m2 = re2.exec(pathname);
32365
- if (!m2)
32366
- return false;
32367
- var path3 = m2[0], index2 = m2.index;
32368
- var params = /* @__PURE__ */ Object.create(null);
32369
- var _loop_1 = function(i4) {
32370
- if (m2[i4] === void 0)
32371
- return "continue";
32372
- var key2 = keys2[i4 - 1];
32373
- if (key2.modifier === "*" || key2.modifier === "+") {
32374
- params[key2.name] = m2[i4].split(key2.prefix + key2.suffix).map(function(value2) {
32375
- return decode3(value2, key2);
32376
- });
32377
- } else {
32378
- params[key2.name] = decode3(m2[i4], key2);
32379
- }
32380
- };
32381
- for (var i3 = 1; i3 < m2.length; i3++) {
32382
- _loop_1(i3);
32383
- }
32384
- return { path: path3, index: index2, params };
32385
- };
32386
- }
32387
- function escapeString(str) {
32388
- return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
32389
- }
32390
- function flags(options) {
32391
- return options && options.sensitive ? "" : "i";
32392
- }
32393
- function regexpToRegexp(path3, keys2) {
32394
- if (!keys2)
32395
- return path3;
32396
- var groupsRegex = /\((?:\?<(.*?)>)?(?!\?)/g;
32397
- var index2 = 0;
32398
- var execResult = groupsRegex.exec(path3.source);
32399
- while (execResult) {
32400
- keys2.push({
32401
- // Use parenthesized substring match if available, index otherwise
32402
- name: execResult[1] || index2++,
32403
- prefix: "",
32404
- suffix: "",
32405
- modifier: "",
32406
- pattern: ""
32407
- });
32408
- execResult = groupsRegex.exec(path3.source);
32409
- }
32410
- return path3;
32411
- }
32412
- function arrayToRegexp(paths, keys2, options) {
32413
- var parts = paths.map(function(path3) {
32414
- return pathToRegexp(path3, keys2, options).source;
32415
- });
32416
- return new RegExp("(?:".concat(parts.join("|"), ")"), flags(options));
32417
- }
32418
- function stringToRegexp(path3, keys2, options) {
32419
- return tokensToRegexp(parse4(path3, options), keys2, options);
32420
- }
32421
- function tokensToRegexp(tokens, keys2, options) {
32422
- if (options === void 0) {
32423
- options = {};
32424
- }
32425
- 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) {
32426
- return x2;
32427
- } : _d, _e = options.delimiter, delimiter = _e === void 0 ? "/#?" : _e, _f = options.endsWith, endsWith = _f === void 0 ? "" : _f;
32428
- var endsWithRe = "[".concat(escapeString(endsWith), "]|$");
32429
- var delimiterRe = "[".concat(escapeString(delimiter), "]");
32430
- var route = start ? "^" : "";
32431
- for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
32432
- var token = tokens_1[_i];
32433
- if (typeof token === "string") {
32434
- route += escapeString(encode2(token));
32435
- } else {
32436
- var prefix = escapeString(encode2(token.prefix));
32437
- var suffix = escapeString(encode2(token.suffix));
32438
- if (token.pattern) {
32439
- if (keys2)
32440
- keys2.push(token);
32441
- if (prefix || suffix) {
32442
- if (token.modifier === "+" || token.modifier === "*") {
32443
- var mod = token.modifier === "*" ? "?" : "";
32444
- route += "(?:".concat(prefix, "((?:").concat(token.pattern, ")(?:").concat(suffix).concat(prefix, "(?:").concat(token.pattern, "))*)").concat(suffix, ")").concat(mod);
32445
- } else {
32446
- route += "(?:".concat(prefix, "(").concat(token.pattern, ")").concat(suffix, ")").concat(token.modifier);
32447
- }
32448
- } else {
32449
- if (token.modifier === "+" || token.modifier === "*") {
32450
- route += "((?:".concat(token.pattern, ")").concat(token.modifier, ")");
32451
- } else {
32452
- route += "(".concat(token.pattern, ")").concat(token.modifier);
32453
- }
32454
- }
32455
- } else {
32456
- route += "(?:".concat(prefix).concat(suffix, ")").concat(token.modifier);
32457
- }
32458
- }
32459
- }
32460
- if (end) {
32461
- if (!strict)
32462
- route += "".concat(delimiterRe, "?");
32463
- route += !options.endsWith ? "$" : "(?=".concat(endsWithRe, ")");
32464
- } else {
32465
- var endToken = tokens[tokens.length - 1];
32466
- var isEndDelimited = typeof endToken === "string" ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1 : endToken === void 0;
32467
- if (!strict) {
32468
- route += "(?:".concat(delimiterRe, "(?=").concat(endsWithRe, "))?");
32469
- }
32470
- if (!isEndDelimited) {
32471
- route += "(?=".concat(delimiterRe, "|").concat(endsWithRe, ")");
32472
- }
32473
- }
32474
- return new RegExp(route, flags(options));
32475
- }
32476
- function pathToRegexp(path3, keys2, options) {
32477
- if (path3 instanceof RegExp)
32478
- return regexpToRegexp(path3, keys2);
32479
- if (Array.isArray(path3))
32480
- return arrayToRegexp(path3, keys2, options);
32481
- return stringToRegexp(path3, keys2, options);
32482
- }
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);
32483
32479
 
32484
- // node_modules/.pnpm/@push.rocks+smartrouter@1.0.16/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
32485
32481
  var QueryParams = class {
32486
32482
  constructor() {
32487
32483
  }
@@ -32505,12 +32501,12 @@ var QueryParams = class {
32505
32501
  }
32506
32502
  };
32507
32503
 
32508
- // node_modules/.pnpm/@push.rocks+smartrouter@1.0.16/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.classes.smartrouter.js
32509
- var SmartRouter = class {
32504
+ // node_modules/.pnpm/@push.rocks+smartrouter@1.3.2/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.classes.smartrouter.js
32505
+ var SmartRouter = class _SmartRouter {
32510
32506
  /**
32511
32507
  * Creates an instance of Router.
32512
32508
  */
32513
- constructor(optionsArg) {
32509
+ constructor(optionsArg, basePath = "") {
32514
32510
  this.options = {
32515
32511
  debug: false
32516
32512
  };
@@ -32520,19 +32516,31 @@ var SmartRouter = class {
32520
32516
  ...this.options,
32521
32517
  ...optionsArg
32522
32518
  };
32523
- window.addEventListener("popstate", (popStateEventArg) => {
32519
+ this.basePath = basePath;
32520
+ this.popstateListener = (popStateEventArg) => {
32524
32521
  popStateEventArg.preventDefault();
32525
32522
  this._handleRouteState();
32526
- });
32523
+ };
32524
+ window.addEventListener("popstate", this.popstateListener);
32525
+ }
32526
+ /**
32527
+ * Create a sub-router with a specific prefix
32528
+ * @param {string} subPath
32529
+ * @param {IRouterOptions} [options]
32530
+ */
32531
+ createSubRouter(subPath, options) {
32532
+ const newBasePath = `${this.basePath}${subPath}`;
32533
+ return new _SmartRouter({ ...this.options, ...options }, newBasePath);
32527
32534
  }
32528
32535
  /**
32529
32536
  * Push route state to history stack
32530
32537
  */
32531
32538
  async pushUrl(url2 = "/", state = {}) {
32532
- if (url2 !== window.location.pathname) {
32533
- window.history.pushState(state, window.document.title, url2);
32539
+ const fullUrl = `${this.basePath}${url2}`;
32540
+ if (fullUrl !== window.location.pathname) {
32541
+ window.history.pushState(state, window.document.title, fullUrl);
32534
32542
  } else {
32535
- window.history.replaceState(state, window.document.title, url2);
32543
+ window.history.replaceState(state, window.document.title, fullUrl);
32536
32544
  }
32537
32545
  await this._handleRouteState();
32538
32546
  }
@@ -32542,10 +32550,16 @@ var SmartRouter = class {
32542
32550
  * @param {function} handlerArg
32543
32551
  */
32544
32552
  on(routeArg, handlerArg) {
32545
- this.routes.push({
32546
- matchFunction: dist_exports.match(routeArg),
32553
+ const fullRoute = `${this.basePath}${routeArg}`;
32554
+ const routeObject = {
32555
+ matchFunction: pathToRegExp.match(fullRoute),
32547
32556
  handler: handlerArg
32548
- });
32557
+ };
32558
+ this.routes.push(routeObject);
32559
+ const removeFunction = () => {
32560
+ this.routes.splice(this.routes.indexOf(routeObject), 1);
32561
+ };
32562
+ return removeFunction;
32549
32563
  }
32550
32564
  /**
32551
32565
  * Apply routes handler to current route
@@ -32564,9 +32578,16 @@ var SmartRouter = class {
32564
32578
  });
32565
32579
  }
32566
32580
  }
32581
+ /**
32582
+ * Destroy the router instance, removing all external references
32583
+ */
32584
+ destroy() {
32585
+ window.removeEventListener("popstate", this.popstateListener);
32586
+ this.routes = [];
32587
+ }
32567
32588
  };
32568
32589
 
32569
- // node_modules/.pnpm/@push.rocks+smartstate@2.0.18/node_modules/@push.rocks/smartstate/dist_ts/index.js
32590
+ // node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/index.js
32570
32591
  var dist_ts_exports21 = {};
32571
32592
  __export(dist_ts_exports21, {
32572
32593
  Smartstate: () => Smartstate,
@@ -32736,7 +32757,7 @@ var sha256FromString = async (stringArg) => {
32736
32757
  }
32737
32758
  };
32738
32759
 
32739
- // node_modules/.pnpm/@push.rocks+smartstate@2.0.18/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.stateaction.js
32760
+ // node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.stateaction.js
32740
32761
  var StateAction = class {
32741
32762
  constructor(statePartRef, actionDef) {
32742
32763
  this.statePartRef = statePartRef;
@@ -32747,7 +32768,7 @@ var StateAction = class {
32747
32768
  }
32748
32769
  };
32749
32770
 
32750
- // node_modules/.pnpm/@push.rocks+smartstate@2.0.18/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.statepart.js
32771
+ // node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.statepart.js
32751
32772
  var StatePart = class {
32752
32773
  constructor(nameArg, webStoreOptionsArg) {
32753
32774
  this.state = new dist_ts_exports4.rxjs.Subject();
@@ -32866,7 +32887,7 @@ var StatePart = class {
32866
32887
  }
32867
32888
  };
32868
32889
 
32869
- // node_modules/.pnpm/@push.rocks+smartstate@2.0.18/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.smartstate.js
32890
+ // node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.smartstate.js
32870
32891
  var Smartstate = class {
32871
32892
  constructor() {
32872
32893
  this.statePartMap = {};
@@ -32914,14 +32935,15 @@ var Smartstate = class {
32914
32935
  }
32915
32936
  };
32916
32937
 
32917
- // node_modules/.pnpm/@push.rocks+smarturl@3.0.7/node_modules/@push.rocks/smarturl/dist_ts/index.js
32938
+ // node_modules/.pnpm/@push.rocks+smarturl@3.1.0/node_modules/@push.rocks/smarturl/dist_ts/index.js
32918
32939
  var dist_ts_exports22 = {};
32919
32940
  __export(dist_ts_exports22, {
32920
32941
  Smarturl: () => Smarturl
32921
32942
  });
32922
32943
 
32923
- // node_modules/.pnpm/@push.rocks+smarturl@3.0.7/node_modules/@push.rocks/smarturl/dist_ts/smarturl.classes.smarturl.js
32944
+ // node_modules/.pnpm/@push.rocks+smarturl@3.1.0/node_modules/@push.rocks/smarturl/dist_ts/smarturl.classes.smarturl.js
32924
32945
  var Smarturl = class _Smarturl {
32946
+ // Static method to create a Smarturl instance from a URL string
32925
32947
  static createFromUrl(urlArg, optionsArg) {
32926
32948
  const parsedUrlInstance = new URL(urlArg);
32927
32949
  const searchParams = {};
@@ -32981,14 +33003,34 @@ var Smarturl = class _Smarturl {
32981
33003
  Object.assign(returnSmarturl, parsedUrl);
32982
33004
  return returnSmarturl;
32983
33005
  }
33006
+ // Static method to create a Smarturl instance from an existing IUrlObject
32984
33007
  static createFromParsedUrl(parsedUrlArg) {
32985
33008
  const returnSmarturl = new _Smarturl();
32986
33009
  Object.assign(returnSmarturl, parsedUrlArg);
32987
33010
  return returnSmarturl;
32988
33011
  }
33012
+ // Constructor initializes searchParams as an empty object
32989
33013
  constructor() {
32990
33014
  this.searchParams = {};
32991
33015
  }
33016
+ // Method to create an independent clone of the current Smarturl instance
33017
+ clone() {
33018
+ const clonedInstance = new _Smarturl();
33019
+ Object.assign(clonedInstance, this);
33020
+ clonedInstance.searchParams = { ...this.searchParams };
33021
+ return clonedInstance;
33022
+ }
33023
+ /**
33024
+ * Typed method to set a property and return the instance for chaining.
33025
+ * @param prop - The property name to set (must be a key of Smarturl)
33026
+ * @param value - The value to assign to the property
33027
+ * @returns The Smarturl instance for method chaining
33028
+ */
33029
+ set(prop, value2) {
33030
+ this[prop] = value2;
33031
+ return this;
33032
+ }
33033
+ // Method to convert the Smarturl instance back into a URL string
32992
33034
  toString() {
32993
33035
  let userpart = ``;
32994
33036
  if (this.username && !this.password) {