@forsakringskassan/docs-generator 3.6.1 → 3.6.3

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.
@@ -2772,7 +2772,7 @@ const punycode = {
2772
2772
  'toUnicode': toUnicode
2773
2773
  };
2774
2774
 
2775
- /*! markdown-it 15.0.0 https://github.com/markdown-it/markdown-it @license MIT */
2775
+ /*! markdown-it 15.0.1 https://github.com/markdown-it/markdown-it @license MIT */
2776
2776
  //#region \0rolldown/runtime.js
2777
2777
  var __defProp$2 = Object.defineProperty;
2778
2778
  var __exportAll = (all, no_symbols) => {
@@ -3356,13 +3356,25 @@ var Token = class {
3356
3356
  */
3357
3357
  var Ruler = class {
3358
3358
  constructor() {
3359
- _defineProperty$1(this, "__rules__", []);
3360
- _defineProperty$1(this, "__cache__", null);
3359
+ _defineProperty$1(
3360
+ this,
3361
+ /** @internal */
3362
+ "__rules__",
3363
+ []
3364
+ );
3365
+ _defineProperty$1(
3366
+ this,
3367
+ /** @internal */
3368
+ "__cache__",
3369
+ null
3370
+ );
3361
3371
  }
3372
+ /** @internal */
3362
3373
  __find__(name) {
3363
3374
  for (let i = 0; i < this.__rules__.length; i++) if (this.__rules__[i].name === name) return i;
3364
3375
  return -1;
3365
3376
  }
3377
+ /** @internal */
3366
3378
  __compile__() {
3367
3379
  const chains = /* @__PURE__ */ new Set();
3368
3380
  this.__rules__.forEach((rule) => {
@@ -3387,11 +3399,6 @@ var Ruler = class {
3387
3399
  * Replace rule by name with new function & options. Throws error if name not
3388
3400
  * found.
3389
3401
  *
3390
- * @param name Rule name to replace.
3391
- * @param fn New rule function.
3392
- * @param options Rule options. `alt` is an array with names of "alternate"
3393
- * chains.
3394
- *
3395
3402
  * @example Replace existing typographer replacement rule with new one
3396
3403
  * ```javascript
3397
3404
  * import MarkdownIt from 'markdown-it'
@@ -3413,12 +3420,6 @@ var Ruler = class {
3413
3420
  * Add new rule to chain before one with given name. See also
3414
3421
  * {@link Ruler.after}, {@link Ruler.push}.
3415
3422
  *
3416
- * @param beforeName New rule will be added before this one.
3417
- * @param ruleName Name of added rule.
3418
- * @param fn Rule function.
3419
- * @param options Rule options. `alt` is an array with names of "alternate"
3420
- * chains.
3421
- *
3422
3423
  * @example
3423
3424
  * ```javascript
3424
3425
  * import MarkdownIt from 'markdown-it'
@@ -3444,12 +3445,6 @@ var Ruler = class {
3444
3445
  * Add new rule to chain after one with given name. See also
3445
3446
  * {@link Ruler.before}, {@link Ruler.push}.
3446
3447
  *
3447
- * @param afterName New rule will be added after this one.
3448
- * @param ruleName Name of added rule.
3449
- * @param fn Rule function.
3450
- * @param options Rule options. `alt` is an array with names of "alternate"
3451
- * chains.
3452
- *
3453
3448
  * @example
3454
3449
  * ```javascript
3455
3450
  * import MarkdownIt from 'markdown-it'
@@ -3475,11 +3470,6 @@ var Ruler = class {
3475
3470
  * Push new rule to the end of chain. See also
3476
3471
  * {@link Ruler.before}, {@link Ruler.after}.
3477
3472
  *
3478
- * @param ruleName Name of added rule.
3479
- * @param fn Rule function.
3480
- * @param options Rule options. `alt` is an array with names of "alternate"
3481
- * chains.
3482
- *
3483
3473
  * @example
3484
3474
  * ```javascript
3485
3475
  * import MarkdownIt from 'markdown-it'
@@ -3505,9 +3495,7 @@ var Ruler = class {
3505
3495
  *
3506
3496
  * See also {@link Ruler.disable}, {@link Ruler.enableOnly}.
3507
3497
  *
3508
- * @param list List of rule names to enable.
3509
- * @param ignoreInvalid Set `true` to ignore errors when rule not found.
3510
- * @returns List of found rule names (if no exception happened).
3498
+ * Returns list of found rule names (if no exception happened).
3511
3499
  */
3512
3500
  enable(list, ignoreInvalid = false) {
3513
3501
  if (!Array.isArray(list)) list = [list];
@@ -3529,9 +3517,6 @@ var Ruler = class {
3529
3517
  * not found - throw Error. Errors can be disabled by second param.
3530
3518
  *
3531
3519
  * See also {@link Ruler.disable}, {@link Ruler.enable}.
3532
- *
3533
- * @param list List of rule names to enable (whitelist).
3534
- * @param ignoreInvalid Set `true` to ignore errors when rule not found.
3535
3520
  */
3536
3521
  enableOnly(list, ignoreInvalid = false) {
3537
3522
  if (!Array.isArray(list)) list = [list];
@@ -3546,9 +3531,7 @@ var Ruler = class {
3546
3531
  *
3547
3532
  * See also {@link Ruler.enable}, {@link Ruler.enableOnly}.
3548
3533
  *
3549
- * @param list List of rule names to disable.
3550
- * @param ignoreInvalid Set `true` to ignore errors when rule not found.
3551
- * @returns List of found rule names (if no exception happened).
3534
+ * Returns list of found rule names (if no exception happened).
3552
3535
  */
3553
3536
  disable(list, ignoreInvalid = false) {
3554
3537
  if (!Array.isArray(list)) list = [list];
@@ -3688,10 +3671,6 @@ var Renderer = class {
3688
3671
  /**
3689
3672
  * Default token renderer. Can be overriden by custom function
3690
3673
  * in {@link Renderer.rules}.
3691
- *
3692
- * @param tokens List of tokens.
3693
- * @param idx Token index to render.
3694
- * @param options Params of parser instance.
3695
3674
  */
3696
3675
  renderToken(tokens, idx, options) {
3697
3676
  const token = tokens[idx];
@@ -3721,10 +3700,6 @@ var Renderer = class {
3721
3700
  }
3722
3701
  /**
3723
3702
  * The same as {@link Renderer.render}, but for single token of `inline` type.
3724
- *
3725
- * @param tokens List on block tokens to render.
3726
- * @param options Params of parser instance.
3727
- * @param env Additional data from parsed input (references, for example).
3728
3703
  */
3729
3704
  renderInline(tokens, options, env) {
3730
3705
  let result = "";
@@ -3740,10 +3715,6 @@ var Renderer = class {
3740
3715
  * Special kludge for image `alt` attributes to conform CommonMark spec.
3741
3716
  * Don't try to use it! Spec requires to show `alt` content with stripped markup,
3742
3717
  * instead of simple escaping.
3743
- *
3744
- * @param tokens List on block tokens to render.
3745
- * @param options Params of parser instance.
3746
- * @param env Additional data from parsed input (references, for example).
3747
3718
  */
3748
3719
  renderInlineAsText(tokens, options, env) {
3749
3720
  let result = "";
@@ -3767,10 +3738,6 @@ var Renderer = class {
3767
3738
  /**
3768
3739
  * Takes token stream and generates HTML. Probably, you will never need to call
3769
3740
  * this method directly.
3770
- *
3771
- * @param tokens List on block tokens to render.
3772
- * @param options Params of parser instance.
3773
- * @param env Additional data from parsed input (references, for example).
3774
3741
  */
3775
3742
  render(tokens, options, env) {
3776
3743
  let result = "";
@@ -3799,11 +3766,11 @@ var StateCore = class {
3799
3766
  };
3800
3767
  //#endregion
3801
3768
  //#region src/rules_core/normalize.ts
3802
- var NEWLINES_RE = /\r\n?|\n/g;
3769
+ var UNNORMALIZED_NEWLINE_RE = /\r\n?/g;
3803
3770
  var NULL_RE = /\0/g;
3804
3771
  function normalize(state) {
3805
3772
  let str;
3806
- str = state.src.replace(NEWLINES_RE, "\n");
3773
+ str = state.src.replace(UNNORMALIZED_NEWLINE_RE, "\n");
3807
3774
  str = str.replace(NULL_RE, "�");
3808
3775
  state.src = str;
3809
3776
  }
@@ -3853,7 +3820,8 @@ function linkify$1(state) {
3853
3820
  if (!state.md.options.linkify) return;
3854
3821
  for (let j = 0, l = blockTokens.length; j < l; j++) {
3855
3822
  if (blockTokens[j].type !== "inline" || !state.md.linkify.test(blockTokens[j].content)) continue;
3856
- let tokens = blockTokens[j].children;
3823
+ const tokens = blockTokens[j].children;
3824
+ const replacements = [];
3857
3825
  let htmlLinkLevel = 0;
3858
3826
  for (let i = tokens.length - 1; i >= 0; i--) {
3859
3827
  const currentToken = tokens[i];
@@ -3912,8 +3880,27 @@ function linkify$1(state) {
3912
3880
  token.level = level;
3913
3881
  nodes.push(token);
3914
3882
  }
3915
- blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
3883
+ replacements.push({
3884
+ index: i,
3885
+ nodes
3886
+ });
3887
+ }
3888
+ }
3889
+ if (replacements.length > 0) {
3890
+ let newTokensLength = tokens.length;
3891
+ for (const replacement of replacements) newTokensLength += replacement.nodes.length - 1;
3892
+ const newTokens = new Array(newTokensLength);
3893
+ let replacementIndex = 0;
3894
+ let newTokenIndex = 0;
3895
+ replacements.reverse();
3896
+ for (let i = 0; i < tokens.length; i++) {
3897
+ const replacement = replacements[replacementIndex];
3898
+ if ((replacement === null || replacement === void 0 ? void 0 : replacement.index) === i) {
3899
+ for (const node of replacement.nodes) newTokens[newTokenIndex++] = node;
3900
+ replacementIndex++;
3901
+ } else newTokens[newTokenIndex++] = tokens[i];
3916
3902
  }
3903
+ blockTokens[j].children = newTokens;
3917
3904
  }
3918
3905
  }
3919
3906
  }
@@ -5397,7 +5384,12 @@ function text(state, silent) {
5397
5384
  }
5398
5385
  //#endregion
5399
5386
  //#region src/rules_inline/linkify.ts
5400
- var SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
5387
+ function isAsciiAlpha(code) {
5388
+ return code >= 65 && code <= 90 || code >= 97 && code <= 122;
5389
+ }
5390
+ function isSchemeChar(code) {
5391
+ return code >= 65 && code <= 90 || code >= 97 && code <= 122 || code >= 48 && code <= 57 || code === 43 || code === 45 || code === 46;
5392
+ }
5401
5393
  function linkify(state, silent) {
5402
5394
  if (!state.md.options.linkify) return false;
5403
5395
  if (state.linkLevel > 0) return false;
@@ -5407,20 +5399,22 @@ function linkify(state, silent) {
5407
5399
  if (state.src.charCodeAt(pos) !== 58) return false;
5408
5400
  if (state.src.charCodeAt(pos + 1) !== 47) return false;
5409
5401
  if (state.src.charCodeAt(pos + 2) !== 47) return false;
5410
- const match = state.pending.match(SCHEME_RE);
5411
- if (!match) return false;
5412
- const proto = match[1];
5413
- const link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length));
5402
+ const protoMin = pos - Math.min(10, state.pending.length, pos);
5403
+ let protoStart = pos;
5404
+ while (protoStart > protoMin && isSchemeChar(state.src.charCodeAt(protoStart - 1))) protoStart--;
5405
+ if (protoStart === pos || !isAsciiAlpha(state.src.charCodeAt(protoStart))) return false;
5406
+ const protoLength = pos - protoStart;
5407
+ const link = state.md.linkify.matchAtStart(state.src.slice(protoStart));
5414
5408
  if (!link) return false;
5415
5409
  let url = link.url;
5416
- if (url.length <= proto.length) return false;
5410
+ if (url.length <= protoLength) return false;
5417
5411
  let urlEnd = url.length;
5418
5412
  while (urlEnd > 0 && url.charCodeAt(urlEnd - 1) === 42) urlEnd--;
5419
5413
  if (urlEnd !== url.length) url = url.slice(0, urlEnd);
5420
5414
  const fullUrl = state.md.normalizeLink(url);
5421
5415
  if (!state.md.validateLink(fullUrl)) return false;
5422
5416
  if (!silent) {
5423
- state.pending = state.pending.slice(0, -proto.length);
5417
+ state.pending = state.pending.slice(0, -protoLength);
5424
5418
  const token_o = state.push("link_open", "a", 1);
5425
5419
  token_o.attrs = [["href", fullUrl]];
5426
5420
  token_o.markup = "linkify";
@@ -5431,7 +5425,7 @@ function linkify(state, silent) {
5431
5425
  token_c.markup = "linkify";
5432
5426
  token_c.info = "auto";
5433
5427
  }
5434
- state.pos += url.length - proto.length;
5428
+ state.pos += url.length - protoLength;
5435
5429
  return true;
5436
5430
  }
5437
5431
  //#endregion
@@ -5512,40 +5506,51 @@ function escape$3(state, silent) {
5512
5506
  }
5513
5507
  //#endregion
5514
5508
  //#region src/rules_inline/backticks.ts
5509
+ function buildLastRuns(src) {
5510
+ const lastRuns = {};
5511
+ let pos = 0;
5512
+ while ((pos = src.indexOf("`", pos)) !== -1) {
5513
+ const start = pos;
5514
+ while (src.charCodeAt(++pos) === 96);
5515
+ lastRuns[pos - start] = start;
5516
+ }
5517
+ return lastRuns;
5518
+ }
5515
5519
  function backtick(state, silent) {
5516
- let pos = state.pos;
5517
- if (state.src.charCodeAt(pos) !== 96) return false;
5518
- const start = pos;
5519
- pos++;
5520
+ var _state$backticks$open;
5521
+ const start = state.pos;
5522
+ if (state.src.charCodeAt(start) !== 96) return false;
5520
5523
  const max = state.posMax;
5524
+ let pos = start + 1;
5521
5525
  while (pos < max && state.src.charCodeAt(pos) === 96) pos++;
5522
5526
  const marker = state.src.slice(start, pos);
5523
5527
  const openerLength = marker.length;
5524
- if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {
5525
- if (!silent) state.pending += marker;
5526
- state.pos += openerLength;
5527
- return true;
5528
- }
5529
- let matchEnd = pos;
5530
- let matchStart;
5531
- while ((matchStart = state.src.indexOf("`", matchEnd)) !== -1) {
5532
- matchEnd = matchStart + 1;
5533
- while (matchEnd < max && state.src.charCodeAt(matchEnd) === 96) matchEnd++;
5534
- const closerLength = matchEnd - matchStart;
5535
- if (closerLength === openerLength) {
5536
- if (!silent) {
5537
- const token = state.push("code_inline", "code", 0);
5538
- token.markup = marker;
5539
- token.content = state.src.slice(pos, matchStart).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
5528
+ if (!state.backticksScanned) {
5529
+ state.backticks = buildLastRuns(state.src);
5530
+ state.backticksScanned = true;
5531
+ }
5532
+ if (((_state$backticks$open = state.backticks[openerLength]) !== null && _state$backticks$open !== void 0 ? _state$backticks$open : -1) >= pos) {
5533
+ let matchEnd = pos;
5534
+ let matchStart;
5535
+ while ((matchStart = state.src.indexOf("`", matchEnd)) !== -1 && matchStart < max) {
5536
+ matchEnd = matchStart + 1;
5537
+ while (state.src.charCodeAt(matchEnd) === 96) matchEnd++;
5538
+ if (matchEnd > max) break;
5539
+ if (matchEnd - matchStart === openerLength) {
5540
+ if (!silent) {
5541
+ const token = state.push("code_inline", "code", 0);
5542
+ token.markup = marker;
5543
+ let content = state.src.slice(pos, matchStart).replace(/\n/g, " ");
5544
+ if (content.startsWith(" ") && content.endsWith(" ") && /[^ ]/.test(content)) content = content.slice(1, -1);
5545
+ token.content = content;
5546
+ }
5547
+ state.pos = matchEnd;
5548
+ return true;
5540
5549
  }
5541
- state.pos = matchEnd;
5542
- return true;
5543
5550
  }
5544
- state.backticks[closerLength] = matchStart;
5545
5551
  }
5546
- state.backticksScanned = true;
5547
5552
  if (!silent) state.pending += marker;
5548
- state.pos += openerLength;
5553
+ state.pos = pos;
5549
5554
  return true;
5550
5555
  }
5551
5556
  //#endregion
@@ -6320,7 +6325,12 @@ var MarkdownIt = class {
6320
6325
  parsed.hostname = punycode.toASCII(parsed.hostname);
6321
6326
  } catch (er) {}
6322
6327
  }
6323
- return encode$1(format(parsed));
6328
+ if (parsed.auth) parsed.auth = encode$1(parsed.auth);
6329
+ if (parsed.hostname) parsed.hostname = encode$1(parsed.hostname);
6330
+ if (parsed.pathname) parsed.pathname = encode$1(parsed.pathname);
6331
+ if (parsed.search) parsed.search = encode$1(parsed.search);
6332
+ if (parsed.hash) parsed.hash = encode$1(parsed.hash);
6333
+ return format(parsed);
6324
6334
  }
6325
6335
  /**
6326
6336
  * Function used to decode link url to a human-readable format`
@@ -6488,9 +6498,6 @@ var MarkdownIt = class {
6488
6498
  * containing rules with given names. If rule not found, and `ignoreInvalid`
6489
6499
  * not set - throws exception.
6490
6500
  *
6491
- * @param list Rule name or list of rule names to enable.
6492
- * @param ignoreInvalid Set `true` to ignore errors when rule not found.
6493
- *
6494
6501
  * @example
6495
6502
  * ```javascript
6496
6503
  * import MarkdownIt from 'markdown-it'
@@ -6517,9 +6524,6 @@ var MarkdownIt = class {
6517
6524
  }
6518
6525
  /**
6519
6526
  * The same as {@link MarkdownIt.enable}, but turn specified rules off.
6520
- *
6521
- * @param list Rule name or list of rule names to disable.
6522
- * @param ignoreInvalid Set `true` to ignore errors when rule not found.
6523
6527
  */
6524
6528
  disable(list, ignoreInvalid = false) {
6525
6529
  let result = [];
@@ -6565,9 +6569,6 @@ var MarkdownIt = class {
6565
6569
  * metadata like reference info, needed for the renderer. It also can be used to
6566
6570
  * inject data in specific cases. Usually, you will be ok to pass `{}`,
6567
6571
  * and then pass updated object to renderer.
6568
- *
6569
- * @param src Source string.
6570
- * @param env Environment sandbox.
6571
6572
  */
6572
6573
  parse(src, env) {
6573
6574
  if (typeof src !== "string") throw new Error("Input data should be a String");
@@ -6581,9 +6582,6 @@ var MarkdownIt = class {
6581
6582
  * `env` can be used to inject additional metadata (`{}` by default).
6582
6583
  * But you will not need it with high probability. See also comment
6583
6584
  * in {@link MarkdownIt.parse}.
6584
- *
6585
- * @param src Source string.
6586
- * @param env Environment sandbox.
6587
6585
  */
6588
6586
  render(src, env = {}) {
6589
6587
  return this.renderer.render(this.parse(src, env), this.options, env);
@@ -6592,9 +6590,6 @@ var MarkdownIt = class {
6592
6590
  * The same as {@link MarkdownIt.parse} but skip all block rules. It returns
6593
6591
  * the block tokens list with the single `inline` element, containing parsed
6594
6592
  * inline tokens in `children` property. Also updates `env` object.
6595
- *
6596
- * @param src Source string.
6597
- * @param env Environment sandbox.
6598
6593
  */
6599
6594
  parseInline(src, env) {
6600
6595
  const state = new this.core.State(src, this, env);
@@ -6605,9 +6600,6 @@ var MarkdownIt = class {
6605
6600
  /**
6606
6601
  * Similar to {@link MarkdownIt.render} but for single paragraph content.
6607
6602
  * Result will NOT be wrapped into `<p>` tags.
6608
- *
6609
- * @param src Source string.
6610
- * @param env Environment sandbox.
6611
6603
  */
6612
6604
  renderInline(src, env = {}) {
6613
6605
  return this.renderer.render(this.parseInline(src, env), this.options, env);
@@ -9208,6 +9200,14 @@ function requireLoader () {
9208
9200
  }
9209
9201
  }
9210
9202
 
9203
+ function chargeMergeWork(state) {
9204
+ state.totalMergeKeys += 1;
9205
+
9206
+ if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
9207
+ throwError(state, 'merge keys exceeded maxTotalMergeKeys (' + state.maxTotalMergeKeys + ')');
9208
+ }
9209
+ }
9210
+
9211
9211
  function mergeMappings(state, destination, source, overridableKeys) {
9212
9212
  var sourceKeys, key, index, quantity;
9213
9213
 
@@ -9215,14 +9215,15 @@ function requireLoader () {
9215
9215
  throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
9216
9216
  }
9217
9217
 
9218
+ // Count the source mapping itself to bound sequences of empty mappings.
9219
+ chargeMergeWork(state);
9220
+
9218
9221
  sourceKeys = Object.keys(source);
9219
9222
 
9220
9223
  for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
9221
9224
  key = sourceKeys[index];
9222
9225
 
9223
- if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) {
9224
- throwError(state, 'merge keys exceeded maxTotalMergeKeys (' + state.maxTotalMergeKeys + ')');
9225
- }
9226
+ chargeMergeWork(state);
9226
9227
 
9227
9228
  if (!_hasOwnProperty.call(destination, key)) {
9228
9229
  setProperty(destination, key, source[key]);
@@ -9267,6 +9268,10 @@ function requireLoader () {
9267
9268
 
9268
9269
  if (keyTag === 'tag:yaml.org,2002:merge') {
9269
9270
  if (Array.isArray(valueNode)) {
9271
+ if (valueNode.length > 100) {
9272
+ throwError(state, 'abnormal merge sequence size');
9273
+ }
9274
+
9270
9275
  for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
9271
9276
  mergeMappings(state, _result, valueNode[index], overridableKeys);
9272
9277
  }
@@ -16030,6 +16035,10 @@ class LanguageUtil {
16030
16035
  this.options = options;
16031
16036
  this.supportedLngs = this.options.supportedLngs || false;
16032
16037
  this.logger = baseLogger.create('languageUtils');
16038
+ this.resolveHierarchyCache = {};
16039
+ }
16040
+ clearCache() {
16041
+ this.resolveHierarchyCache = {};
16033
16042
  }
16034
16043
  getScriptPartFromCode(code) {
16035
16044
  code = getCleanedCode(code);
@@ -16110,6 +16119,25 @@ class LanguageUtil {
16110
16119
  return found || [];
16111
16120
  }
16112
16121
  toResolveHierarchy(code, fallbackCode) {
16122
+ const fallbackLng = this.options.fallbackLng;
16123
+ const fallbackLngKey = Array.isArray(fallbackLng) ? fallbackLng.join('|') : fallbackLng;
16124
+ if (fallbackLngKey !== this._cachedFallbackLng) {
16125
+ this.resolveHierarchyCache = {};
16126
+ this._cachedFallbackLng = fallbackLngKey;
16127
+ }
16128
+ const hasCacheableFallback = fallbackCode === undefined || fallbackCode === false || isString(fallbackCode);
16129
+ const usesUncacheableOptionsFallback = fallbackCode === undefined && typeof this.options.fallbackLng === 'function';
16130
+ const cacheable = isString(code) && hasCacheableFallback && !usesUncacheableOptionsFallback;
16131
+ let cacheKey = null;
16132
+ if (cacheable) {
16133
+ let fallbackCacheKey;
16134
+ if (fallbackCode === undefined) fallbackCacheKey = 'undefined';else if (fallbackCode === false) fallbackCacheKey = 'boolean:false';else fallbackCacheKey = `string:${fallbackCode}`;
16135
+ cacheKey = `${code.length}:${code}|${fallbackCacheKey}`;
16136
+ }
16137
+ if (cacheKey !== null) {
16138
+ const cached = this.resolveHierarchyCache[cacheKey];
16139
+ if (cached !== undefined) return cached.slice();
16140
+ }
16113
16141
  const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);
16114
16142
  const codes = [];
16115
16143
  const addCode = c => {
@@ -16130,6 +16158,10 @@ class LanguageUtil {
16130
16158
  fallbackCodes.forEach(fc => {
16131
16159
  if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));
16132
16160
  });
16161
+ if (cacheKey !== null) {
16162
+ this.resolveHierarchyCache[cacheKey] = codes;
16163
+ return codes.slice();
16164
+ }
16133
16165
  return codes;
16134
16166
  }
16135
16167
  }
@@ -46710,7 +46742,7 @@ function requireUtils () {
46710
46742
  return false;
46711
46743
  }
46712
46744
 
46713
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
46745
+ return !!(obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj));
46714
46746
  };
46715
46747
 
46716
46748
  var combine = function combine(a, b, arrayLimit, plainObjects, throwOnLimitExceeded) {
@@ -46719,8 +46751,15 @@ function requireUtils () {
46719
46751
  if (throwOnLimitExceeded) {
46720
46752
  throw new RangeError('Array limit exceeded. Only ' + arrayLimit + ' element' + (arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
46721
46753
  }
46722
- var newIndex = getMaxIndex(a) + 1;
46723
- a[newIndex] = b;
46754
+ // spread `b` one level, matching the `[].concat(a, b)` used below, so a
46755
+ // collection appended to an already-overflowed object is flattened
46756
+ // rather than nested under a single index
46757
+ var bValues = isArray(b) ? b : [b];
46758
+ var newIndex = getMaxIndex(a);
46759
+ for (var i = 0; i < bValues.length; ++i) {
46760
+ newIndex += 1;
46761
+ a[newIndex] = bValues[i];
46762
+ }
46724
46763
  setMaxIndex(a, newIndex);
46725
46764
  return a;
46726
46765
  }
@@ -46806,6 +46845,7 @@ function requireStringify () {
46806
46845
  charsetSentinel: false,
46807
46846
  commaRoundTrip: false,
46808
46847
  delimiter: '&',
46848
+ depth: Infinity,
46809
46849
  encode: true,
46810
46850
  encodeDotInKeys: false,
46811
46851
  encoder: utils.encode,
@@ -46850,10 +46890,16 @@ function requireStringify () {
46850
46890
  formatter,
46851
46891
  encodeValuesOnly,
46852
46892
  charset,
46853
- sideChannel
46893
+ sideChannel,
46894
+ depth,
46895
+ currentDepth
46854
46896
  ) {
46855
46897
  var obj = object;
46856
46898
 
46899
+ if (currentDepth > depth) {
46900
+ throw new RangeError('Input depth exceeded depth option of ' + depth);
46901
+ }
46902
+
46857
46903
  var tmpSc = sideChannel;
46858
46904
  var step = 0;
46859
46905
  var findFlag = false;
@@ -46873,9 +46919,9 @@ function requireStringify () {
46873
46919
  }
46874
46920
  }
46875
46921
 
46876
- if (typeof filter === 'function') {
46877
- obj = filter(prefix, obj);
46878
- } else if (obj instanceof Date) {
46922
+ obj = typeof filter === 'function' ? filter(prefix, obj) : obj;
46923
+
46924
+ if (obj instanceof Date) {
46879
46925
  obj = serializeDate(obj);
46880
46926
  } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
46881
46927
  obj = utils.maybeMap(obj, function (value) {
@@ -46928,7 +46974,7 @@ function requireStringify () {
46928
46974
 
46929
46975
  var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
46930
46976
 
46931
- if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
46977
+ if (allowEmptyArrays && isArray(obj) && obj.length === 0 && Object.keys(obj).length === 0) {
46932
46978
  return adjustedPrefix + '[]';
46933
46979
  }
46934
46980
 
@@ -46968,7 +47014,9 @@ function requireStringify () {
46968
47014
  formatter,
46969
47015
  encodeValuesOnly,
46970
47016
  charset,
46971
- valueSideChannel
47017
+ valueSideChannel,
47018
+ depth,
47019
+ currentDepth + 1
46972
47020
  ));
46973
47021
  }
46974
47022
 
@@ -47035,6 +47083,7 @@ function requireStringify () {
47035
47083
  charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
47036
47084
  commaRoundTrip: !!opts.commaRoundTrip,
47037
47085
  delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
47086
+ depth: typeof opts.depth === 'number' ? opts.depth : defaults.depth,
47038
47087
  encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
47039
47088
  encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
47040
47089
  encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
@@ -47094,9 +47143,12 @@ function requireStringify () {
47094
47143
  if (options.skipNulls && value === null) {
47095
47144
  continue;
47096
47145
  }
47146
+
47147
+ var encodedKey = options.encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key);
47148
+
47097
47149
  pushToArray(keys, stringify(
47098
47150
  value,
47099
- key,
47151
+ encodedKey,
47100
47152
  generateArrayPrefix,
47101
47153
  commaRoundTrip,
47102
47154
  options.allowEmptyArrays,
@@ -47112,7 +47164,9 @@ function requireStringify () {
47112
47164
  options.formatter,
47113
47165
  options.encodeValuesOnly,
47114
47166
  options.charset,
47115
- sideChannel
47167
+ sideChannel,
47168
+ options.depth,
47169
+ 0
47116
47170
  ));
47117
47171
  }
47118
47172
 
@@ -47177,9 +47231,9 @@ function requireParse () {
47177
47231
  });
47178
47232
  };
47179
47233
 
47180
- var parseArrayValue = function (val, options, currentArrayLength, isFlatArrayValue) {
47234
+ var parseArrayValue = function (val, options, currentArrayLength) {
47181
47235
  if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
47182
- if (isFlatArrayValue && options.throwOnLimitExceeded) {
47236
+ if (options.throwOnLimitExceeded) {
47183
47237
  var commaCount = 0;
47184
47238
  var commaIndex = val.indexOf(',');
47185
47239
  while (commaIndex > -1) {
@@ -47266,8 +47320,7 @@ function requireParse () {
47266
47320
  parseArrayValue(
47267
47321
  part.slice(pos + 1),
47268
47322
  options,
47269
- isArray(obj[key]) ? obj[key].length : 0,
47270
- part.indexOf('[]=') === -1
47323
+ isArray(obj[key]) ? obj[key].length : 0
47271
47324
  ),
47272
47325
  function (encodedVal) {
47273
47326
  return options.decoder(encodedVal, defaults.decoder, charset, 'value');
@@ -68949,4 +69002,4 @@ var yaml = /*#__PURE__*/Object.freeze({
68949
69002
  });
68950
69003
 
68951
69004
  export { HighlightJS as H, MarkdownItCallable as M, Ze$b as Z, resolveConfig as a, createTwoFilesPatch$1 as b, createSyncFn as c, dedent$1 as d, deflist_plugin as e, format2 as f, strFromU8 as g, closest as h, distance as i, fm$3 as j, isCI as k, cliProgress as l, moduleImporter as m, tinylr as n, createInstance as o, fse as p, inter as q, runAsWorker as r, strToU8 as s, ts$9 as t, watch$1 as w, zlibSync as z };
68952
- //# sourceMappingURL=vendor-D7FIOE5G.mjs.map
69005
+ //# sourceMappingURL=vendor-O--Ker5M.mjs.map