@jxsuite/parser 4.3.4 → 5.0.2

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.
package/dist/serialize.js CHANGED
@@ -348,7 +348,7 @@ var init_lib = __esm(() => {
348
348
  options.ruleId = origin.slice(index + 1);
349
349
  }
350
350
  }
351
- if (!options.place && options.ancestors && options.ancestors) {
351
+ if (!options.place && options.ancestors) {
352
352
  const parent = options.ancestors[options.ancestors.length - 1];
353
353
  if (parent) {
354
354
  options.place = parent.position;
@@ -374,19 +374,21 @@ var init_lib = __esm(() => {
374
374
  this.url = undefined;
375
375
  }
376
376
  };
377
- VFileMessage.prototype.file = "";
378
- VFileMessage.prototype.name = "";
379
- VFileMessage.prototype.reason = "";
380
- VFileMessage.prototype.message = "";
381
- VFileMessage.prototype.stack = "";
382
- VFileMessage.prototype.column = undefined;
383
- VFileMessage.prototype.line = undefined;
384
- VFileMessage.prototype.ancestors = undefined;
385
- VFileMessage.prototype.cause = undefined;
386
- VFileMessage.prototype.fatal = undefined;
387
- VFileMessage.prototype.place = undefined;
388
- VFileMessage.prototype.ruleId = undefined;
389
- VFileMessage.prototype.source = undefined;
377
+ Object.defineProperties(VFileMessage.prototype, {
378
+ file: { configurable: true, enumerable: true, value: "", writable: true },
379
+ name: { configurable: true, enumerable: true, value: "", writable: true },
380
+ reason: { configurable: true, enumerable: true, value: "", writable: true },
381
+ message: { configurable: true, enumerable: true, value: "", writable: true },
382
+ stack: { configurable: true, enumerable: true, value: "", writable: true },
383
+ column: { configurable: true, enumerable: true, writable: true },
384
+ line: { configurable: true, enumerable: true, writable: true },
385
+ ancestors: { configurable: true, enumerable: true, writable: true },
386
+ cause: { configurable: true, enumerable: true, writable: true },
387
+ fatal: { configurable: true, enumerable: true, writable: true },
388
+ place: { configurable: true, enumerable: true, writable: true },
389
+ ruleId: { configurable: true, enumerable: true, writable: true },
390
+ source: { configurable: true, enumerable: true, writable: true }
391
+ });
390
392
  });
391
393
 
392
394
  // ../../node_modules/vfile-message/index.js
@@ -924,7 +926,7 @@ function tagNameCandidates(tagName) {
924
926
  }
925
927
  return [...new Set([...Object.values(expression.cases), expression.default])];
926
928
  }
927
- var SCHEMA_KEYWORDS, masked;
929
+ var SCHEMA_KEYWORDS, masked, scanned, BEFORE_OPERAND;
928
930
  var init_guards = __esm(() => {
929
931
  SCHEMA_KEYWORDS = new Set([
930
932
  "type",
@@ -943,6 +945,8 @@ var init_guards = __esm(() => {
943
945
  "$comment"
944
946
  ]);
945
947
  masked = new Map;
948
+ scanned = new Map;
949
+ BEFORE_OPERAND = new Set("(,=:[!&|?{;+-*%<>~^");
946
950
  });
947
951
 
948
952
  // ../../node_modules/mdast-util-to-string/lib/index.js
@@ -9965,6 +9969,8 @@ function phrasing2(parent, state, info) {
9965
9969
  const handle = state.handle.handlers[child.type];
9966
9970
  if (handle && handle.attention) {
9967
9971
  const item = attentionItem(child, handle.attention, state, tracker);
9972
+ if (!item)
9973
+ continue;
9968
9974
  results.push(item);
9969
9975
  before = lastCharacter(item.sequences[0]);
9970
9976
  } else {
@@ -9988,17 +9994,54 @@ function attentionItem(node, attention, state, tracker) {
9988
9994
  const sequences = attentionSequences(node.type, markers, sizes);
9989
9995
  const sequence = sequences[0];
9990
9996
  const exit = state.enter(construct);
9991
- tracker.move(sequence);
9997
+ const inside = state.createTracker(tracker.current());
9998
+ inside.move(sequence);
9992
9999
  const children = phrasing2(node, state, {
9993
- ...tracker.current(),
10000
+ ...inside.current(),
9994
10001
  before: sequence,
9995
10002
  after: sequence
9996
10003
  });
10004
+ exit();
10005
+ if (children.length === 0)
10006
+ return;
10007
+ tracker.move(sequence);
9997
10008
  tracker.move(serialize(children, sequence, sequence));
9998
10009
  tracker.move(sequence);
9999
- exit();
10000
10010
  return { children, sequences };
10001
10011
  }
10012
+ function fix(items, chosen, before, after) {
10013
+ let tokens = render(items, chosen, before, after);
10014
+ let mistake = check(tokens, before, after);
10015
+ while (mistake) {
10016
+ const next = improve(items, chosen, mistake, before, after);
10017
+ if (!next)
10018
+ return;
10019
+ chosen = next.chosen;
10020
+ tokens = next.tokens;
10021
+ mistake = next.mistake;
10022
+ }
10023
+ return tokens;
10024
+ }
10025
+ function guess(items, chosen, before, after) {
10026
+ let previous = before;
10027
+ let index = -1;
10028
+ while (++index < items.length) {
10029
+ const item = items[index];
10030
+ if (typeof item === "string") {
10031
+ previous = "";
10032
+ continue;
10033
+ }
10034
+ const next = index === items.length - 1 ? after : "";
10035
+ const sequence = item.sequences.find(function(value) {
10036
+ const marker = value.charAt(0);
10037
+ return marker !== previous.charAt(0) && marker !== next.charAt(0) || items.length === 1 && builtins.has(marker) && value.length > before.length;
10038
+ }) || item.sequences[0];
10039
+ if (sequence !== item.sequences[0])
10040
+ chosen.set(item, sequence);
10041
+ guess(item.children, chosen, sequence, sequence);
10042
+ previous = sequence;
10043
+ }
10044
+ }
10002
10045
  function render(items, chosen, before, after) {
10003
10046
  const tokens = [];
10004
10047
  let encodeAfter;
@@ -10023,11 +10066,11 @@ function render(items, chosen, before, after) {
10023
10066
  const outsideBefore = previous;
10024
10067
  const outsideAfter = firstCharacter(next === undefined ? after : typeof next === "string" ? next : chosen.get(next) || next.sequences[0]);
10025
10068
  const inside = render(item.children, chosen, sequence, sequence);
10026
- const head = inside.length > 0 ? inside[0].value : "";
10069
+ const head = inside[0].value;
10027
10070
  const open = encodeInfo(outsideBefore.charCodeAt(outsideBefore.length - 1), head.charCodeAt(0), marker);
10028
10071
  if (open.inside)
10029
10072
  encode(inside, true);
10030
- const tail = inside.length > 0 ? lastCharacter(inside[inside.length - 1].value) : "";
10073
+ const tail = lastCharacter(inside[inside.length - 1].value);
10031
10074
  const close = encodeInfo(outsideAfter.charCodeAt(0), tail.charCodeAt(tail.length - 1), marker);
10032
10075
  if (close.inside)
10033
10076
  encode(inside, false);
@@ -10046,20 +10089,9 @@ function render(items, chosen, before, after) {
10046
10089
  return tokens;
10047
10090
  }
10048
10091
  function serialize(items, before, after) {
10049
- let chosen = new Map;
10050
- const initial = render(items, chosen, before, after);
10051
- let tokens = initial;
10052
- let mistake = check(tokens, before, after);
10053
- while (mistake) {
10054
- const next = improve(items, chosen, mistake, before, after);
10055
- if (!next) {
10056
- tokens = initial;
10057
- break;
10058
- }
10059
- chosen = next.chosen;
10060
- tokens = next.tokens;
10061
- mistake = next.mistake;
10062
- }
10092
+ const guessed = new Map;
10093
+ guess(items, guessed, before, after);
10094
+ const tokens = (guessed.size > 0 ? fix(items, guessed, before, after) : undefined) || fix(items, new Map, before, after) || render(items, new Map, before, after);
10063
10095
  let result = "";
10064
10096
  for (const token of tokens)
10065
10097
  result += token.value;
@@ -10081,7 +10113,7 @@ var init_container_phrasing = __esm(() => {
10081
10113
  function emphasis(node, _, state, info) {
10082
10114
  const exit = state.enter("phrasing");
10083
10115
  const item = attentionItem(node, attention2, state, state.createTracker(info));
10084
- const value = serialize([item], info.before, info.after);
10116
+ const value = item ? serialize([item], info.before, info.after) : "";
10085
10117
  exit();
10086
10118
  return value;
10087
10119
  }
@@ -10742,7 +10774,7 @@ function checkStrong(state) {
10742
10774
  function strong(node, _, state, info) {
10743
10775
  const exit = state.enter("phrasing");
10744
10776
  const item = attentionItem(node, attention3, state, state.createTracker(info));
10745
- const value = serialize([item], info.before, info.after);
10777
+ const value = item ? serialize([item], info.before, info.after) : "";
10746
10778
  exit();
10747
10779
  return value;
10748
10780
  }
@@ -11126,8 +11158,8 @@ function safe(state, input, config) {
11126
11158
  const subject = value.slice(from, pattern.afterNode ? end : undefined);
11127
11159
  let match;
11128
11160
  while (match = expression.exec(subject)) {
11129
- const before = "before" in pattern || Boolean(pattern.atBreak);
11130
- const after = "after" in pattern;
11161
+ const before = Boolean(pattern.before || pattern.atBreak);
11162
+ const after = Boolean(pattern.after);
11131
11163
  const position = from + match.index + (before ? match[1].length : 0);
11132
11164
  if (own6.call(infos, position)) {
11133
11165
  if (infos[position].before && !before) {
@@ -13482,7 +13514,7 @@ function gfmAutolinkLiteralToMarkdown() {
13482
13514
  };
13483
13515
  }
13484
13516
  function enterLiteralAutolink(token) {
13485
- this.enter({ type: "link", title: null, url: "", children: [] }, token);
13517
+ this.enter({ type: "link", title: null, url: "", children: [], position: undefined }, token);
13486
13518
  }
13487
13519
  function enterLiteralAutolinkValue(token) {
13488
13520
  this.config.enter.autolinkProtocol.call(this, token);
@@ -13504,62 +13536,107 @@ function exitLiteralAutolink(token) {
13504
13536
  }
13505
13537
  function transformGfmAutolinkLiterals(tree) {
13506
13538
  findAndReplace(tree, [
13507
- [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
13508
- [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail]
13539
+ [
13540
+ /(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,
13541
+ findUrl
13542
+ ],
13543
+ [
13544
+ /(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,
13545
+ findXmpp
13546
+ ],
13547
+ [/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g, findMailto],
13548
+ [
13549
+ /(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,
13550
+ findEmail
13551
+ ]
13509
13552
  ], { ignore: ["link", "linkReference"] });
13510
13553
  }
13511
13554
  function findUrl(_, protocol, domain, path, match) {
13512
- let prefix = "";
13513
13555
  if (!previous3(match)) {
13514
13556
  return false;
13515
13557
  }
13558
+ let prefix = "";
13516
13559
  if (/^w/i.test(protocol)) {
13517
13560
  domain = protocol + domain;
13518
13561
  protocol = "";
13519
13562
  prefix = "http://";
13520
13563
  }
13521
- if (!isCorrectDomain(domain)) {
13564
+ if (unicodePunctuation(domain.charCodeAt(0)) || !isCorrectDomain(domain)) {
13522
13565
  return false;
13523
13566
  }
13524
13567
  const parts = splitUrl(domain + path);
13525
- if (!parts[0])
13526
- return false;
13527
13568
  const result = {
13528
13569
  type: "link",
13529
13570
  title: null,
13530
13571
  url: prefix + protocol + parts[0],
13531
- children: [{ type: "text", value: protocol + parts[0] }]
13572
+ children: [{ type: "text", value: protocol + parts[0], position: undefined }],
13573
+ position: undefined
13532
13574
  };
13533
13575
  if (parts[1]) {
13534
- return [result, { type: "text", value: parts[1] }];
13576
+ return [result, { type: "text", value: parts[1], position: undefined }];
13535
13577
  }
13536
13578
  return result;
13537
13579
  }
13538
- function findEmail(_, atext, label, match) {
13539
- if (!previous3(match, true) || /[-\d_]$/.test(label)) {
13580
+ function findEmail(_, atext, label) {
13581
+ if (/[\d\-_]$/.test(label)) {
13540
13582
  return false;
13541
13583
  }
13542
13584
  return {
13543
13585
  type: "link",
13544
13586
  title: null,
13545
13587
  url: "mailto:" + atext + "@" + label,
13546
- children: [{ type: "text", value: atext + "@" + label }]
13588
+ children: [{ type: "text", value: atext + "@" + label, position: undefined }],
13589
+ position: undefined
13590
+ };
13591
+ }
13592
+ function findMailto(_, atext, label) {
13593
+ if (/[\d\-_]$/.test(label)) {
13594
+ return false;
13595
+ }
13596
+ const value = "mailto:" + atext + "@" + label;
13597
+ return {
13598
+ type: "link",
13599
+ title: null,
13600
+ url: value,
13601
+ children: [{ type: "text", value, position: undefined }],
13602
+ position: undefined
13603
+ };
13604
+ }
13605
+ function findXmpp(matchValue, atext, label, resource, match) {
13606
+ if (/[\d\-_]$/.test(label) || resource && (!/[A-Za-z]$/.test(resource) || match.input.charAt(match.index + matchValue.length) === "@")) {
13607
+ return false;
13608
+ }
13609
+ const value = "xmpp:" + atext + "@" + label + (resource || "");
13610
+ return {
13611
+ type: "link",
13612
+ title: null,
13613
+ url: value,
13614
+ children: [{ type: "text", value, position: undefined }],
13615
+ position: undefined
13547
13616
  };
13548
13617
  }
13549
13618
  function isCorrectDomain(domain) {
13550
13619
  const parts = domain.split(".");
13551
- if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[a-zA-Z\d]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[a-zA-Z\d]/.test(parts[parts.length - 2]))) {
13620
+ if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[\dA-Za-z]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[\dA-Za-z]/.test(parts[parts.length - 2]))) {
13552
13621
  return false;
13553
13622
  }
13554
13623
  return true;
13555
13624
  }
13556
13625
  function splitUrl(url) {
13557
- const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url);
13558
- if (!trailExec) {
13626
+ let index = url.length;
13627
+ while (index > 0) {
13628
+ const code = url.charCodeAt(index - 1);
13629
+ if (code === 33 || code === 34 || code === 38 || code === 39 || code === 41 || code === 44 || code === 46 || code === 58 || code === 59 || code === 60 || code === 62 || code === 63 || code === 93 || code === 125) {
13630
+ index--;
13631
+ } else {
13632
+ break;
13633
+ }
13634
+ }
13635
+ if (index === url.length) {
13559
13636
  return [url, undefined];
13560
13637
  }
13561
- url = url.slice(0, trailExec.index);
13562
- let trail = trailExec[0];
13638
+ let trail = url.slice(index);
13639
+ url = url.slice(0, index);
13563
13640
  let closingParenIndex = trail.indexOf(")");
13564
13641
  const openingParens = ccount(url, "(");
13565
13642
  let closingParens = ccount(url, ")");
@@ -13571,9 +13648,9 @@ function splitUrl(url) {
13571
13648
  }
13572
13649
  return [url, trail];
13573
13650
  }
13574
- function previous3(match, email) {
13651
+ function previous3(match) {
13575
13652
  const code = match.input.charCodeAt(match.index - 1);
13576
- return (match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code)) && (!email || code !== 47);
13653
+ return match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code);
13577
13654
  }
13578
13655
  var inConstruct = "phrasing", notInConstruct;
13579
13656
  var init_lib18 = __esm(() => {
@@ -13838,9 +13915,10 @@ function markdownTable(table, options) {
13838
13915
  while (++rowIndex < cellMatrix.length) {
13839
13916
  const row = cellMatrix[rowIndex];
13840
13917
  const sizes = sizeMatrix[rowIndex];
13918
+ const cellsInRow = settings.fillRows === false ? Math.max(1, cellMatrix[rowIndex === 1 ? 0 : rowIndex].length) : mostCellsPerRow;
13841
13919
  columnIndex = -1;
13842
13920
  const line = [];
13843
- while (++columnIndex < mostCellsPerRow) {
13921
+ while (++columnIndex < cellsInRow) {
13844
13922
  const cell = row[columnIndex] || "";
13845
13923
  let before = "";
13846
13924
  let after = "";
@@ -13850,11 +13928,12 @@ function markdownTable(table, options) {
13850
13928
  if (code === 114) {
13851
13929
  before = " ".repeat(size);
13852
13930
  } else if (code === 99) {
13931
+ const half = size / 2;
13853
13932
  if (size % 2) {
13854
- before = " ".repeat(size / 2 + 0.5);
13855
- after = " ".repeat(size / 2 - 0.5);
13933
+ before = " ".repeat(half + 0.5);
13934
+ after = " ".repeat(half - 0.5);
13856
13935
  } else {
13857
- before = " ".repeat(size / 2);
13936
+ before = " ".repeat(half);
13858
13937
  after = before;
13859
13938
  }
13860
13939
  } else {
@@ -13877,7 +13956,7 @@ function markdownTable(table, options) {
13877
13956
  if (settings.padding !== false) {
13878
13957
  line.push(" ");
13879
13958
  }
13880
- if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
13959
+ if (settings.delimiterEnd !== false || columnIndex !== cellsInRow - 1) {
13881
13960
  line.push("|");
13882
13961
  }
13883
13962
  }
@@ -13920,7 +13999,8 @@ function enterTable(token) {
13920
13999
  align: align.map(function(d) {
13921
14000
  return d === "none" ? null : d;
13922
14001
  }),
13923
- children: []
14002
+ children: [],
14003
+ position: undefined
13924
14004
  }, token);
13925
14005
  this.data.inTable = true;
13926
14006
  }
@@ -13929,13 +14009,13 @@ function exitTable(token) {
13929
14009
  this.data.inTable = undefined;
13930
14010
  }
13931
14011
  function enterRow(token) {
13932
- this.enter({ type: "tableRow", children: [] }, token);
14012
+ this.enter({ type: "tableRow", children: [], position: undefined }, token);
13933
14013
  }
13934
14014
  function exit3(token) {
13935
14015
  this.exit(token);
13936
14016
  }
13937
14017
  function enterCell(token) {
13938
- this.enter({ type: "tableCell", children: [] }, token);
14018
+ this.enter({ type: "tableCell", children: [], position: undefined }, token);
13939
14019
  }
13940
14020
  function exitCodeText(token) {
13941
14021
  let value = this.resume();
@@ -13952,11 +14032,20 @@ function replace($0, $1) {
13952
14032
  }
13953
14033
  function gfmTableToMarkdown(options) {
13954
14034
  const settings = options || {};
13955
- const padding = settings.tableCellPadding;
13956
- const alignDelimiters = settings.tablePipeAlign;
13957
- const stringLength = settings.stringLength;
14035
+ const {
14036
+ tableCellPadding: padding,
14037
+ tablePipeAlign: alignDelimiters,
14038
+ stringLength
14039
+ } = settings;
13958
14040
  const around = padding ? " " : "|";
13959
14041
  return {
14042
+ handlers: {
14043
+ inlineCode: inlineCodeWithTable,
14044
+ table: handleTable,
14045
+ tableCell: handleTableCell,
14046
+ tableRow: handleTableRow
14047
+ },
14048
+ join: [joinTable],
13960
14049
  unsafe: [
13961
14050
  { character: "\r", inConstruct: "tableCell" },
13962
14051
  { character: `
@@ -13965,16 +14054,24 @@ function gfmTableToMarkdown(options) {
13965
14054
  { character: "|", inConstruct: "tableCell" },
13966
14055
  { atBreak: true, character: ":", after: "-" },
13967
14056
  { atBreak: true, character: "-", after: "[:|-]" }
13968
- ],
13969
- handlers: {
13970
- inlineCode: inlineCodeWithTable,
13971
- table: handleTable,
13972
- tableCell: handleTableCell,
13973
- tableRow: handleTableRow
13974
- }
14057
+ ]
13975
14058
  };
13976
14059
  function handleTable(node, _, state, info) {
13977
- return serializeData(handleTableAsData(node, state, info), node.align);
14060
+ const matrix = handleTableAsData(node, state, info);
14061
+ const head = matrix[0];
14062
+ if (head) {
14063
+ let columns = node.align ? node.align.length : 0;
14064
+ let index = -1;
14065
+ if (!columns) {
14066
+ while (++index < matrix.length) {
14067
+ if (matrix[index].length > columns)
14068
+ columns = matrix[index].length;
14069
+ }
14070
+ }
14071
+ while (head.length < columns)
14072
+ head.push("");
14073
+ }
14074
+ return serializeData(matrix, node.align);
13978
14075
  }
13979
14076
  function handleTableRow(node, _, state, info) {
13980
14077
  const row = handleTableRowAsData(node, state, info);
@@ -13998,12 +14095,13 @@ function gfmTableToMarkdown(options) {
13998
14095
  return markdownTable(matrix, {
13999
14096
  align,
14000
14097
  alignDelimiters,
14098
+ fillRows: false,
14001
14099
  padding,
14002
14100
  stringLength
14003
14101
  });
14004
14102
  }
14005
14103
  function handleTableAsData(node, state, info) {
14006
- const children = node.children;
14104
+ const { children } = node;
14007
14105
  let index = -1;
14008
14106
  const result = [];
14009
14107
  const subexit = state.enter("table");
@@ -14014,7 +14112,7 @@ function gfmTableToMarkdown(options) {
14014
14112
  return result;
14015
14113
  }
14016
14114
  function handleTableRowAsData(node, state, info) {
14017
- const children = node.children;
14115
+ const { children } = node;
14018
14116
  let index = -1;
14019
14117
  const result = [];
14020
14118
  const subexit = state.enter("tableRow");
@@ -14025,16 +14123,47 @@ function gfmTableToMarkdown(options) {
14025
14123
  return result;
14026
14124
  }
14027
14125
  function inlineCodeWithTable(node, parent, state) {
14028
- let value = handle.inlineCode(node, parent, state);
14029
- if (state.stack.includes("tableCell")) {
14030
- value = value.replace(/\|/g, "\\$&");
14126
+ const value = handle.inlineCode(node, parent, state);
14127
+ if (!state.stack.includes("tableCell"))
14128
+ return value;
14129
+ const result = [];
14130
+ let start = 0;
14131
+ let index = value.indexOf("|");
14132
+ while (index !== -1) {
14133
+ let before = index;
14134
+ while (before > start && value.charCodeAt(before - 1) === 92) {
14135
+ before--;
14136
+ }
14137
+ result.push(value.slice(start, index));
14138
+ if ((index - before) % 2 === 0)
14139
+ result.push("\\");
14140
+ start = index;
14141
+ index = value.indexOf("|", index + 1);
14031
14142
  }
14032
- return value;
14143
+ result.push(value.slice(start));
14144
+ return result.join("");
14033
14145
  }
14034
14146
  }
14147
+ function joinTable(left, right, parent, state) {
14148
+ if (left.type === "table" && parent.type === "listItem" && parent.spread === false && (right.type === "definition" || right.type === "heading" && formatHeadingAsSetext2(right, state) || right.type === "paragraph" || right.type === "table")) {
14149
+ return 1;
14150
+ }
14151
+ }
14152
+ function formatHeadingAsSetext2(node, state) {
14153
+ let literalWithBreak = false;
14154
+ visit(node, function(node) {
14155
+ if (node.type === "break" || "value" in node && /\r?\n|\r/.test(node.value)) {
14156
+ literalWithBreak = true;
14157
+ return EXIT;
14158
+ }
14159
+ });
14160
+ return Boolean((!node.depth || node.depth < 3) && toString(node) && (state.options.setext || literalWithBreak));
14161
+ }
14035
14162
  var init_lib21 = __esm(() => {
14036
14163
  init_development();
14037
14164
  init_mdast_util_to_markdown();
14165
+ init_mdast_util_to_string();
14166
+ init_unist_util_visit();
14038
14167
  });
14039
14168
 
14040
14169
  // ../../node_modules/mdast-util-gfm-table/index.js
@@ -14054,8 +14183,8 @@ function gfmTaskListItemFromMarkdown() {
14054
14183
  }
14055
14184
  function gfmTaskListItemToMarkdown() {
14056
14185
  return {
14057
- unsafe: [{ atBreak: true, character: "-", after: "[:|-]" }],
14058
- handlers: { listItem: listItemWithTaskListItem }
14186
+ handlers: { paragraph: paragraphWithTaskListItem },
14187
+ join: [joinDefinitionsBeforeTaskListItemParagraph]
14059
14188
  };
14060
14189
  }
14061
14190
  function exitCheck(token) {
@@ -14072,46 +14201,58 @@ function exitParagraphWithTaskListItem(token) {
14072
14201
  if (head && head.type === "text") {
14073
14202
  const siblings = parent.children;
14074
14203
  let index = -1;
14075
- let firstParaghraph;
14204
+ let firstParagraph;
14076
14205
  while (++index < siblings.length) {
14077
14206
  const sibling = siblings[index];
14078
14207
  if (sibling.type === "paragraph") {
14079
- firstParaghraph = sibling;
14208
+ firstParagraph = sibling;
14080
14209
  break;
14081
14210
  }
14082
14211
  }
14083
- if (firstParaghraph === node) {
14212
+ if (firstParagraph === node) {
14084
14213
  head.value = head.value.slice(1);
14085
14214
  if (head.value.length === 0) {
14086
14215
  node.children.shift();
14087
14216
  } else if (node.position && head.position && typeof head.position.start.offset === "number") {
14088
14217
  head.position.start.column++;
14089
14218
  head.position.start.offset++;
14090
- node.position.start = Object.assign({}, head.position.start);
14219
+ node.position.start = { ...head.position.start };
14091
14220
  }
14092
14221
  }
14093
14222
  }
14094
14223
  }
14095
14224
  this.exit(token);
14096
14225
  }
14097
- function listItemWithTaskListItem(node, parent, state, info) {
14098
- const head = node.children[0];
14099
- const checkable = typeof node.checked === "boolean" && head && head.type === "paragraph";
14100
- const checkbox = "[" + (node.checked ? "x" : " ") + "] ";
14226
+ function paragraphWithTaskListItem(node, parent, state, info) {
14227
+ if (!parent || parent.type !== "listItem" || taskListItemParagraph(parent) !== node) {
14228
+ return handle.paragraph(node, parent, state, info);
14229
+ }
14230
+ const checkbox = "[" + (parent.checked ? "x" : " ") + "] ";
14101
14231
  const tracker = state.createTracker(info);
14102
- if (checkable) {
14103
- tracker.move(checkbox);
14232
+ tracker.move(checkbox);
14233
+ const value = handle.paragraph(node.children.length > 0 ? node : { type: "paragraph", children: [{ type: "text", value: " " }] }, parent, state, { ...info, ...tracker.current() });
14234
+ return checkbox + value;
14235
+ }
14236
+ function joinDefinitionsBeforeTaskListItemParagraph(left, _, parent) {
14237
+ if (!(left.type === "definition" && parent.type === "listItem")) {
14238
+ return;
14104
14239
  }
14105
- let value = handle.listItem(node, parent, state, {
14106
- ...info,
14107
- ...tracker.current()
14108
- });
14109
- if (checkable) {
14110
- value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check);
14240
+ const paragraph = taskListItemParagraph(parent);
14241
+ if (paragraph && parent.children.indexOf(left) < parent.children.indexOf(paragraph)) {
14242
+ return 0;
14111
14243
  }
14112
- return value;
14113
- function check($0) {
14114
- return $0 + checkbox;
14244
+ }
14245
+ function taskListItemParagraph(node) {
14246
+ if (typeof node.checked !== "boolean") {
14247
+ return;
14248
+ }
14249
+ for (const child of node.children) {
14250
+ if (child.type === "paragraph") {
14251
+ return child;
14252
+ }
14253
+ if (child.type !== "definition") {
14254
+ return;
14255
+ }
14115
14256
  }
14116
14257
  }
14117
14258
  var init_lib22 = __esm(() => {
@@ -23948,37 +24089,50 @@ var init_hastscript = __esm(() => {
23948
24089
  function location(file) {
23949
24090
  const value = String(file);
23950
24091
  const indices = [];
24092
+ let cr = -1;
24093
+ let lf = -1;
23951
24094
  return { toOffset, toPoint };
24095
+ function grow() {
24096
+ const from = indices.at(-1) ?? 0;
24097
+ if (cr < from) {
24098
+ cr = value.indexOf("\r", from);
24099
+ if (cr === -1)
24100
+ cr = Infinity;
24101
+ }
24102
+ if (lf < from) {
24103
+ lf = value.indexOf(`
24104
+ `, from);
24105
+ if (lf === -1)
24106
+ lf = Infinity;
24107
+ }
24108
+ const eol = cr + 1 === lf ? lf : Math.min(cr, lf);
24109
+ indices.push((eol === Infinity ? value.length : eol) + 1);
24110
+ }
23952
24111
  function toPoint(offset) {
23953
24112
  if (typeof offset === "number" && offset > -1 && offset <= value.length) {
23954
- let index = 0;
23955
- while (true) {
23956
- let end = indices[index];
23957
- if (end === undefined) {
23958
- const eol = next(value, indices[index - 1]);
23959
- end = eol === -1 ? value.length + 1 : eol + 1;
23960
- indices[index] = end;
23961
- }
23962
- if (end > offset) {
23963
- return {
23964
- line: index + 1,
23965
- column: offset - (index > 0 ? indices[index - 1] : 0) + 1,
23966
- offset
23967
- };
24113
+ while ((indices.at(-1) ?? 0) <= offset)
24114
+ grow();
24115
+ let low = 0;
24116
+ let high = indices.length - 1;
24117
+ while (low < high) {
24118
+ const middle = Math.floor((low + high) / 2);
24119
+ if (indices[middle] > offset) {
24120
+ high = middle;
24121
+ } else {
24122
+ low = middle + 1;
23968
24123
  }
23969
- index++;
23970
24124
  }
24125
+ return {
24126
+ line: low + 1,
24127
+ column: offset - (low > 0 ? indices[low - 1] : 0) + 1,
24128
+ offset
24129
+ };
23971
24130
  }
23972
24131
  }
23973
24132
  function toOffset(point) {
23974
- if (point && typeof point.line === "number" && typeof point.column === "number" && !Number.isNaN(point.line) && !Number.isNaN(point.column)) {
23975
- while (indices.length < point.line) {
23976
- const from = indices[indices.length - 1];
23977
- const eol = next(value, from);
23978
- const end = eol === -1 ? value.length + 1 : eol + 1;
23979
- if (from === end)
23980
- break;
23981
- indices.push(end);
24133
+ if (point && typeof point.line === "number" && typeof point.column === "number" && !Number.isNaN(point.line) && point.column > 0) {
24134
+ while (indices.length < point.line && (indices.at(-1) ?? 0) <= value.length) {
24135
+ grow();
23982
24136
  }
23983
24137
  const offset = (point.line > 1 ? indices[point.line - 2] : 0) + point.column - 1;
23984
24138
  if (offset < indices[point.line - 1])
@@ -23986,16 +24140,6 @@ function location(file) {
23986
24140
  }
23987
24141
  }
23988
24142
  }
23989
- function next(value, from) {
23990
- const cr = value.indexOf("\r", from);
23991
- const lf = value.indexOf(`
23992
- `, from);
23993
- if (lf === -1)
23994
- return cr;
23995
- if (cr === -1 || cr + 1 === lf)
23996
- return lf;
23997
- return cr < lf ? cr : lf;
23998
- }
23999
24143
 
24000
24144
  // ../../node_modules/vfile-location/index.js
24001
24145
  var init_vfile_location = () => {};
@@ -24364,8 +24508,11 @@ class Preprocessor {
24364
24508
  get col() {
24365
24509
  return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);
24366
24510
  }
24511
+ get codePointStart() {
24512
+ return this.pos - Number(this.lastGapPos === this.pos);
24513
+ }
24367
24514
  get offset() {
24368
- return this.droppedBufferSize + this.pos;
24515
+ return this.droppedBufferSize + this.codePointStart;
24369
24516
  }
24370
24517
  getError(code, cpOffset) {
24371
24518
  const { line, col, offset } = this;
@@ -24394,7 +24541,7 @@ class Preprocessor {
24394
24541
  _processSurrogate(cp) {
24395
24542
  if (this.pos !== this.html.length - 1) {
24396
24543
  const nextCp = this.html.charCodeAt(this.pos + 1);
24397
- if (isSurrogatePair(nextCp)) {
24544
+ if (!isSurrogatePair(cp) && isSurrogatePair(nextCp)) {
24398
24545
  this.pos++;
24399
24546
  this._addGap();
24400
24547
  return getSurrogatePairCodePoint(cp, nextCp);
@@ -24409,14 +24556,17 @@ class Preprocessor {
24409
24556
  willDropParsedChunk() {
24410
24557
  return this.pos > this.bufferWaterline;
24411
24558
  }
24412
- dropParsedChunk() {
24559
+ dropParsedChunk(keep = 0) {
24413
24560
  if (this.willDropParsedChunk()) {
24414
- this.html = this.html.substring(this.pos);
24415
- this.lineStartPos -= this.pos;
24416
- this.droppedBufferSize += this.pos;
24417
- this.pos = 0;
24561
+ const droppedSize = this.offset - this.droppedBufferSize - keep;
24562
+ this.html = this.html.substring(droppedSize);
24563
+ this.lineStartPos -= droppedSize;
24564
+ this.droppedBufferSize += droppedSize;
24565
+ this.pos -= droppedSize;
24418
24566
  this.lastGapPos = -2;
24419
24567
  this.gapStack.length = 0;
24568
+ if (this.pos > keep)
24569
+ this._addGap();
24420
24570
  }
24421
24571
  }
24422
24572
  write(chunk, isLastChunk) {
@@ -24540,313 +24690,550 @@ var init_token = __esm(() => {
24540
24690
  })(TokenType || (TokenType = {}));
24541
24691
  });
24542
24692
 
24543
- // ../../node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js
24544
- var htmlDecodeTree;
24545
- var init_decode_data_html = __esm(() => {
24546
- htmlDecodeTree = /* @__PURE__ */ new Uint16Array(/* @__PURE__ */ "ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\x00\x00\x00\x00\x00\x00ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀\uD835\uDD04rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀\uD835\uDD38plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀\uD835\uDC9Cign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\uD835\uDD05pf;쀀\uD835\uDD39eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\uD835\uDC9EpĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\uD835\uDD07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\x00\x00\x00͔͂\x00Ѕf;쀀\uD835\uDD3Bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\x00\x00ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\x00\x00ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\x00ц\x00ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\x00ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\uD835\uDC9Frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀\uD835\uDD08rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\x00\x00ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\uD835\uDD3Csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀\uD835\uDD09lledɓ֗\x00\x00֣mallSquare;旼erySmallSquare;斪Ͱֺ\x00ֿ\x00\x00ׄf;쀀\uD835\uDD3DAll;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\uD835\uDD0A;拙pf;쀀\uD835\uDD3Eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\uD835\uDCA2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\x00ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\x00ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\uD835\uDD40a;䎙cr;愐ilde;䄨ǫޚ\x00ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀\uD835\uDD0Dpf;쀀\uD835\uDD41ǣ߇\x00ߌr;쀀\uD835\uDCA5rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀\uD835\uDD0Epf;쀀\uD835\uDD42cr;쀀\uD835\uDCA6րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\x00ࣃbleBracket;柦nǔࣈ\x00࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\uD835\uDD0FĀ;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀\uD835\uDD43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀\uD835\uDD10nusPlus;戓pf;쀀\uD835\uDD44cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀\uD835\uDD11ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\uD835\uDCA9ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀\uD835\uDD12rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀\uD835\uDD46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\uD835\uDCAAash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀\uD835\uDD13i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀\uD835\uDCAB;䎨ȀUfos༑༖༛༟OT耻\"䀢r;쀀\uD835\uDD14pf;愚cr;쀀\uD835\uDCAC؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\x00စbleBracket;柧nǔည\x00နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\uD835\uDD16ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀\uD835\uDD4Aɲᅭ\x00\x00ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\uD835\uDCAEar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\uD835\uDD17Āeiቻ኉Dzኀ\x00ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\uD835\uDD4BipleDot;惛Āctዖዛr;쀀\uD835\uDCAFrok;䅦ૡዷጎጚጦ\x00ጬጱ\x00\x00\x00\x00\x00ጸጽ፷ᎅ\x00᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\x00጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀\uD835\uDD18rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀\uD835\uDD4CЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\uD835\uDCB0ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\uD835\uDD19pf;쀀\uD835\uDD4Dcr;쀀\uD835\uDCB1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\uD835\uDD1Apf;쀀\uD835\uDD4Ecr;쀀\uD835\uDCB2Ȁfiosᓋᓐᓒᓘr;쀀\uD835\uDD1B;䎞pf;쀀\uD835\uDD4Fcr;쀀\uD835\uDCB3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀\uD835\uDD1Cpf;쀀\uD835\uDD50cr;쀀\uD835\uDCB4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\x00ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀\uD835\uDCB5௡ᖃᖊᖐ\x00ᖰᖶᖿ\x00\x00\x00\x00ᗆᗛᗫᙟ᙭\x00ᚕ᚛ᚲᚹ\x00ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀\uD835\uDD1Erave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\x00\x00ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀\uD835\uDD52΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀\uD835\uDCB6;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀\uD835\uDD1Fg΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\x00\x00ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\x00ᠳƲᠯ\x00ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\uD835\uDD53Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀\uD835\uDCB7mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\x00᧨ᨑᨕᨲ\x00ᨷᩐ\x00\x00᪴\x00\x00᫁\x00\x00ᬡᬮ᭍᭒\x00᯽\x00ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\x00᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀\uD835\uDD20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\x00\x00᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\x00ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\x00\x00᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\x00ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀\uD835\uDD54oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\uD835\uDCB8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\x00\x00᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\x00\x00ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\uD835\uDD21arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\x00\x00ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\uD835\uDD55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\x00\x00ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\uD835\uDCB9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\uD835\uDD22ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\uD835\uDD56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\x00\x00ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\x00ᾞ\x00ᾡᾧ\x00\x00ῆῌ\x00ΐ\x00ῦῪ \x00 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\x00\x00᾽g;耀ffig;耀ffl;쀀\uD835\uDD23lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\x00ῳf;쀀\uD835\uDD57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\x00⁐β•‥‧‪‬\x00‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\x00‶;慔;慖ʴ‾⁁\x00\x00⁃耻¾䂾;慗;慜5;慘ƶ⁌\x00⁎;慚;慝8;慞l;恄wn;挢cr;쀀\uD835\uDCBBࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\uD835\uDD24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\uD835\uDD58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\x00↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀\uD835\uDD25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\uD835\uDD59bar;怕ƀclt≯≴≸r;쀀\uD835\uDCBDasè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\x00⊪\x00⊸⋅⋎\x00⋕⋳\x00\x00⋸⌢⍧⍢⍿\x00⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀\uD835\uDD26rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\uD835\uDD5Aa;䎹uest耻¿䂿Āci⎊⎏r;쀀\uD835\uDCBEnʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\x00⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\uD835\uDD27ath;䈷pf;쀀\uD835\uDD5Bǣ⏬\x00⏱r;쀀\uD835\uDCBFrcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\uD835\uDD28reen;䄸cy;䑅cy;䑜pf;쀀\uD835\uDD5Ccr;쀀\uD835\uDCC0஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\x00⒪\x00⒱\x00\x00\x00\x00\x00⒵Ⓔ\x00ⓆⓈⓍ\x00⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀\uD835\uDD29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀\uD835\uDD5Dus;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\uD835\uDCC1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀\uD835\uDD2Ao;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀\uD835\uDD5EĀct⣸⣽r;쀀\uD835\uDCC2pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\x00⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\x00⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀\uD835\uDD2BȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀\uD835\uDD5F膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀\uD835\uDCC3ortɭ⬅\x00\x00⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ⴭ\x00ⴸⵈⵠⵥ⵲ⶄᬇ\x00\x00ⶍⶫ\x00ⷈⷎ\x00ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀\uD835\uDD2Cͯ⵹\x00\x00⵼\x00ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\uD835\uDD60ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\x00⹽\x00⺀⺝\x00⺢⺹\x00\x00⻋ຜ\x00⼓\x00\x00⼫⾼\x00⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\x00\x00⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\uD835\uDD2Dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\uD835\uDD61nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀\uD835\uDCC5;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀\uD835\uDD2Epf;쀀\uD835\uDD62rime;恗cr;쀀\uD835\uDCC6ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀\uD835\uDD2FĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀\uD835\uDD63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\uD835\uDCC7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\x00㍺㎤\x00\x00㏬㏰\x00㐨㑈㑚㒭㒱㓊㓱\x00㘖\x00\x00㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\x00㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀\uD835\uDD30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\x00\x00㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\uD835\uDD64aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀\uD835\uDCC8tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\x00㙾㛂\x00\x00\x00\x00\x00㛛㜃\x00㜉㝬\x00\x00\x00㞇ɲ㙖\x00\x00㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\uD835\uDD31Ȁeiko㚆㚝㚵㚼Dz㚋\x00㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\uD835\uDD65rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\uD835\uDCC9;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\x00㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀\uD835\uDD32rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\x00\x00㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀\uD835\uDD66̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\x00\x00㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀\uD835\uDCCAƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀\uD835\uDD33tré㦮suĀbp㧯㧱»ജ»൙pf;쀀\uD835\uDD67roð໻tré㦴Ācu㨆㨋r;쀀\uD835\uDCCBĀbp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\uD835\uDD34pf;쀀\uD835\uDD68Ā;eᑹ㩦atèᑹcr;쀀\uD835\uDCCCૣណ㪇\x00㪋\x00㪐㪛\x00\x00㪝㪨㪫㪯\x00\x00㫃㫎\x00㫘ៜ៟tré៑r;쀀\uD835\uDD35ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\uD835\uDD69imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀\uD835\uDCCDĀpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀\uD835\uDD36cy;䑗pf;쀀\uD835\uDD6Acr;쀀\uD835\uDCCEĀcm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀\uD835\uDD37cy;䐶grarr;懝pf;쀀\uD835\uDD6Bcr;쀀\uD835\uDCCFĀjn㮅㮇;怍j;怌".split("").map((c) => c.charCodeAt(0)));
24547
- });
24548
-
24549
- // ../../node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js
24693
+ // ../../node_modules/parse5/node_modules/entities/dist/decode-codepoint.js
24694
+ function isInvalidCodePoint(codePoint) {
24695
+ return codePoint === 0 || codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111;
24696
+ }
24550
24697
  function replaceCodePoint(codePoint) {
24551
- var _a;
24552
- if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
24698
+ if (isInvalidCodePoint(codePoint)) {
24553
24699
  return 65533;
24554
24700
  }
24555
- return (_a = decodeMap.get(codePoint)) !== null && _a !== undefined ? _a : codePoint;
24701
+ if (codePoint >= 128 && codePoint <= 159) {
24702
+ return c1[codePoint - 128] || codePoint;
24703
+ }
24704
+ return codePoint;
24556
24705
  }
24557
- var _a, decodeMap, fromCodePoint;
24706
+ var c1;
24558
24707
  var init_decode_codepoint = __esm(() => {
24559
- decodeMap = new Map([
24560
- [0, 65533],
24561
- [128, 8364],
24562
- [130, 8218],
24563
- [131, 402],
24564
- [132, 8222],
24565
- [133, 8230],
24566
- [134, 8224],
24567
- [135, 8225],
24568
- [136, 710],
24569
- [137, 8240],
24570
- [138, 352],
24571
- [139, 8249],
24572
- [140, 338],
24573
- [142, 381],
24574
- [145, 8216],
24575
- [146, 8217],
24576
- [147, 8220],
24577
- [148, 8221],
24578
- [149, 8226],
24579
- [150, 8211],
24580
- [151, 8212],
24581
- [152, 732],
24582
- [153, 8482],
24583
- [154, 353],
24584
- [155, 8250],
24585
- [156, 339],
24586
- [158, 382],
24587
- [159, 376]
24588
- ]);
24589
- fromCodePoint = (_a = String.fromCodePoint) !== null && _a !== undefined ? _a : function(codePoint) {
24590
- let output = "";
24591
- if (codePoint > 65535) {
24592
- codePoint -= 65536;
24593
- output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
24594
- codePoint = 56320 | codePoint & 1023;
24595
- }
24596
- output += String.fromCharCode(codePoint);
24597
- return output;
24708
+ c1 = [
24709
+ 8364,
24710
+ 0,
24711
+ 8218,
24712
+ 402,
24713
+ 8222,
24714
+ 8230,
24715
+ 8224,
24716
+ 8225,
24717
+ 710,
24718
+ 8240,
24719
+ 352,
24720
+ 8249,
24721
+ 338,
24722
+ 0,
24723
+ 381,
24724
+ 0,
24725
+ 0,
24726
+ 8216,
24727
+ 8217,
24728
+ 8220,
24729
+ 8221,
24730
+ 8226,
24731
+ 8211,
24732
+ 8212,
24733
+ 732,
24734
+ 8482,
24735
+ 353,
24736
+ 8250,
24737
+ 339,
24738
+ 0,
24739
+ 382,
24740
+ 376
24741
+ ];
24742
+ });
24743
+
24744
+ // ../../node_modules/parse5/node_modules/entities/dist/generated/decode-data-html.js
24745
+ var htmlDecodeData;
24746
+ var init_decode_data_html = __esm(() => {
24747
+ htmlDecodeData = ["Q=¨`p0AEligMPacutebrevecircyfrgravelphamacrndogonpfpplyFunctionringscrsigntildeumlBackslashrvwedcyecausernoullistafropfrevescrumpeqCHcyOPYacutepitalDifferentialDyleyscaronedilirconintdotedillanterDotfrhiircleDotMinusPlusTimeslockwiseContourIntegralseCurlyDoubleQuoteQuoteolonengruentinttourIntegralpfroductunterClockwiseContourIntegralrossscrupCapDDotrahdJcyScyZcyaggerrrshvcaronyeltafriacriticalAcuteDotubleAcuteGraveTildemondfferentialDopftDotEqualubleContourIntegralDotwnArrowLeftArrowRightArrowTeeongLeftArrowRightArrowRightArrowRightArrowTeeUpArrowDownArrowVerticalBarwnArrowBarUpArrowBreveLeftRightVectorTeeVectorVectorBarRightTeeVectorVectorBarTeeArrowarrowscrtrokENGTHacutecaronircydotfrgravelementmacrptySmallSquareVerySmallSquareogonpfpsilonqualTildeilibriumscrimtaumlxistsponentialEFcyfrilledSmallSquareVerySmallSquareopfrAlluriertrfscrGJcyTammadbrevecedilircydotfrgopfreaterEqualLessFullEqualGreaterLessSlantEqualTildescrtHARDcyacektcircfrilbertSpaceopfrizontalLinescrtrokumpDownHumpEqualIEcyJligOcyacutecircydotfrgravemacrginaryIpliesntegralrsectionvisibleCommaTimesogonpftascrtildeukcymlJcircyfropfscrercyukcyKHcyJcyappacedilyfropfscrLJcyTacutembdangplacetrfrrcaronedilyeftAngleBracketrrowBarRightArrowCeilingDoubleBracketwnTeeVectorVectorBarFloorRightArrowVectorTeeArrowVectorriangleBarEqualUpDownVectorTeeVectorVectorBarVectorBararrowrightarrowssEqualGreaterFullEqualGreaterLessSlantEqualTildefrleftarrowmidotongLeftArrowRightArrowRightArrowleftarrowrightarrowrightarrowpfwerLeftArrowRightArrowscrhtroktMapcyediumSpacellintrffrinusPlusopfscruNJcyacutecaronedilyegativeMediumSpaceThickSpacenSpaceVeryThinSpacestedGreaterGreaterLessLesswLinefroBreaknBreakingSpacepftCongruentupCapDoubleVerticalBarElementqualTildexistsGreaterEqualFullEqualGreaterLessSlantEqualTildeHumpDownHumpEqualLeftTriangleBarEqualssEqualGreaterLessSlantEqualTildeNestedGreaterGreaterLessLessPrecedesEqualSlantEqualReverseElementightTriangleBarEqualSquareSubsetEqualpersetEqualubsetEqualcceedsEqualSlantEqualTildepersetEqualTildeEqualFullEqualTildeVerticalBarscrtildeuOEligacutecircydblacfrgravemacregaicronopfpenCurlyDoubleQuoteQuoterscrlashtildemesumlverBarraceketParenthesisPartialDcyfrhiilusMinusoincareplanepfrecedesEqualSlantEqualTildeimeoductportionalscriQUOTfropfscrRBarrEGacutengrrtlcaronedilyeverseElementquilibriumUpEquilibriumfrhoightAngleBracketrrowBarLeftArrowCeilingDoubleBracketwnTeeVectorVectorBarFloorTeeArrowVectorriangleBarEqualUpDownVectorTeeVectorVectorBarVectorBararrowopfundImpliesrightarrowscrhuleDelayedSHCHcycyOFTcyacutecaronedilircyfrhortDownArrowLeftArrowRightArrowUpArrowigmamallCircleopfqrtuareIntersectionSubsetEqualpersetEqualUnionscrtarubsetEqualcceedsEqualSlantEqualTildehThatmpersetEqualsetTHORNRADESHcycyabucaronedilyfrhereforetaickSpacenSpaceildeEqualFullEqualTildeopfripleDotscrtrokUacuterrocirbrcyevecircydblacfrgravemacrnderBarraceketParenthesisionPlusogonpfpArrowBarDownArrowDownArrowEquilibriumTeeArrowarrowdownarrowperLeftArrowRightArrowsilonringscrtildeumlVDashbarcydashleerbarticalBarLineSeparatorTildeyThinSpacefropfscrvdashWcircedgefropfscrXfriopfscrYAcyIcyUcyacutecircyfropfscrumlZHcyacutecaronydoteroWidthSpacetafropfscraacutebrevecEdircuteyeligfrgravelefsymphphamacrlgpndanddslopevgelemsdaabcdefghrtvbdsphtzarrogonpfpEacireidosproxeqringscrtympeqtildeumlwconintintbNotackcongepsilonprimesimeqrveewedgebrktbrkcongydquoecausemptyvpsirnoutahweenfrigcapircupodotplustimessqcuptartriangledownupuplusveewedgekarowlacklozengesquaretriangledownleftrightnkk12434ocknequivotopfttomwtiexDLRlrHDUduULRlrVHLRhlrboxdLRlrhDUduminusplustimesuLRlrvHLRhlrprimerevevbarscremiimeolbhsubulletmpEeqcacutepandbrcupcapupdotsretoncapsronedilircupssmdotedilmptyvnterdotfrhcyeckmarkiirEceqlearrowleftrightdRSastcircdashefnintmidscirlubsuitoloneqmmatpfnlementxesngdotintpfrodysrrarrossscrubepetdotudarrlreprsclarrppbrcapcapupdotorsrarrmlyeqprecsuccveewedgerenvearrowleftrightveewedwconintintylctydArrHaraggerlethrrshvbkarowlaccaronydaggerrrotseqegltamptyvfishtrharlriamondsuitsegammasinvideontimesonxjcylcornropollarpfteqdotminusplussquareublebarwedgewnarrowdownarrowsharpoonleftrightrbkarowcornropscryoltroktdotrifuarrharwanglezcyigrarreDDototacutestercaronircolonydotefDotrgravesdotlinterslsdotmacrptysetvsp134ngspogonpfparsllussilonvqcircolonsimlantgtrlessualsestivDDvparslrDotarrscrdotimtahumlroxclistpectationonentialefallingdotseqcyemalefiligligligriligjliglatligtnsnofopfrallkvpartintrac123456823534584556878slownscrgElacutemmadpbrevecircydotelqqslantsccdotollesfrggimeljcylEajnEapproxeqqsimopfravescrimeltccirdotlParquestrapproxrrdoteqlessqlesslesssimvertneqqnEhArrairsplfmiltrdcyrcirwbarcirceartsuitlliprconfrksearowwarowoarrmthtokleftarrowrightarrowpfrbarscrlashtrokybullpheniacutecircyecyxclffrgraveiiintntnfinotajligmacrgelinepartthofpedncarefintieodottcalegersrcallarhkprodocygonpftaprodquestscrinEdotsvvtildeukcymljcircyfrmathopfscrercyukcykappavcedilyfrgreenhcyjcyopfscrlAarrrrtailBarrEgHaracuteemptyvgranmbdangdlepquorrbfsfshklpplsimtltailesbarrbrkracekkeslducaronedililubydcaquorrdharusharsheftarrowtailharpoondownupleftarrowsrightarrowsharpoonssquigarrowthreetimesgqqslantsccdotorgessapproxdoteqgtrqgtrgtrsimfishtloorrgEhardulblkjcylarrcornerhardtrimidotoustachenEapproxeqqsimoangrrbrkngleftarrowrightarrowmapstorightarrowoparrowleftrightparflustimeswastbarzengefparltrarrcornerhardmtrisaquocrhimegqbuortroktccirdothreeimeslarrquestrPariefurdsharuharvertneqqnEmDDotacrletesepstodownleftuprkercommaydasheasuredanglefrhoicrodastcirdotnusbdulcpdrnplusodelspfpscrtposultimapmapnGgtvLeftarrowrightarrowltvRightarrowVDashdashablacutengpEidosproxturalsbspumpecapronedilongdotupydasheArrarhkrowdotquivsearimxistsfrgEeqqslantssimtrhArrarrparisdvjcylArrEarrdreftarrowrightarrowqqslantsssimtriemidopftinEdotvabcnivabcparallelsltolintrcueeceqrArrarrcwightarrowtriesccueerhortmidparallelimeqmidparqsubepeubEeseteqqcceqpEeseteqqtglildelgrianglelefteqrightequmerospvDashHarrapdashgetinfinlArretrierArrtriesimwArrarhkrownearoSacutestcircydashblacivotsoldeligfcirrgonravethbarmintlarrcirrossinetmacregaicrondnusopfparerplusrarrderoffmigoforslopevscrlasholtildemesasumlvbarparallelsimltcyercntiodmilptenkfrhivmmatoneitchforkvlanckhkvusacirbcirdouemnsimtwomointintpfundrEapcueecapproxcurlyeqeqnapproxeqqsimsimimesnEapsimodfalarlinesurfptosimurelscriuncspqfrintopfprimescruaternionsintesteqotrAarrrrtailBarrHaraceutedicemptyvngdelequorrapbfscfshklpplsimtlwtailionalsbarrbrkracekkeslducaronedililubydcaldharquorshealinepartsctgfishtloorrhardulovightarrowtailharpoondownupleftarrowsharpoonsrightarrowssquigarrowthreetimesngsingdotseqlarrharmmoustachenmidoangrrbrkparflustimespargtpolintrarrsaquocrhqbuorthreeimesriefltriuluharxsacutebquocEaproncueedilircnEapsimpolintsimydotbeeArrarhkrowctmiswartminusnxtfrownharpchcyyortmidparallelyigmafvmdoteqgElEneplusrarrlarrmallsetminusshpeparslidletesoftcylbarpfpadesuitrqcapsupssubeseteqpesetequareffrarrscretmnmiletarftarfraightepsilonphinsubEdotedotmultnEeplusrarrseteqqneqqimubpccapproxcurlyeqeqnapproxeqqsimsimmngp123EdotsubedothsolublarrmultnEeplusseteqqneqqimubpwArrarhkrownwarzligtargetubrkcaronedilydotelrecfrhere4foretasymvickapproxsimnspkapsimornildemesbardntoeapbotcirforksaprimeradeiangledownlefteqqrighteqdoteminusplussbtimepeziumscryhcytrokwixtoheadleftarrowrightarrowuArrHaracuterrbrcyevecircydarrblacharfishtrgraveharlrblklcornerroptrimacrlogonpfparrowdownarrowharpoonleftrightlussihlonuparrowsrcornerropingtriscrtdotilderifuarrmlwanglevArrBarvDashangrtrepsilonkappanothingphiiroptorhosigmaubsetneqqpsetneqqthetariangleleftrightcydasheebareqlliprbartfrltrinsubpopfproprtriscrubnEepnEezigzagwcircedbargeqierpfropfpreathscrxcapircupdtrifrhArrarrilArrarrmapnisodotpflustimerArrarrscrqcupuplustriveewedgeyacuteycircyenfricyopfscrucymlzacutecaronydoteetrftafrhcyigrarropfscrwjnjC(D%D($(D'%$$ED($'$'$%$'%E$/D'$F%'D(D&#,%%&&$%$)%+%%$E$F$'$&$(#'D&$(%$&4%($(E'%&%($&$)%*$%$%$+)()')($:&5-($'($%*&&&/%%&)%@$'$F$%&&#%%)$&$&$&$(%%%&$(%$$%&%$E$2.&0,.(.(&'%.$F%$&&&(%6)&+*),---&*/1---)-.&)*+,).%*,&,*'('2+,+)1&'1,)2&'&*('($F%'#&D%D($(E&%$$&$ED($)$'%1(2$'%E$)$'((&+$&%%$%D&$(%-#&$E$3)2$F%'%+$&#'D$$'($$($(%&%$$&$E$$$F$./'*,***'*-*($F$$#)$'%$$'$%$.$&%/$&%'$.'(#'$'$&D(D'%$$&$%D($$%&&*%($%&('+%/,($'%E%%$&$($'E%#(%$$E$F$F%'$'#'$&$'$(%$$E$F$F#'D$$(%'%%%+%%$(%'%$$2(',&,-'*'0).+)1&'('-,)'&*(*)(*/&/('/),))/&')-&'('-%1','*'''-'($E$$%+$($/+-'-',+-'-%E%/(-$&%$%'$$#&$%$-%*$E$+$F$&$$#'$($(%'%$$5+-.)+0%5)+%($E$)%1%%%$&,'(&4&*''+H'(&*-(-L-J-'-M-(&O*H&/2F2((%*(***G*M*(&W,K&+.H.-&1'/3F3(&O2(.I4('H,(().H.-.H(I.(&(+(+,+(&.$FD($$#(D(D'%$$($ED($'%&%($F$6,($$$FE'D(&&D&$)('+&'.#+$%$E$%$$$+$/%%$$%)+(+-+(%&%(&*-%$F%$C'$E$&$F#(D%$(%%%%'%$(%'%$$$%/+-*0$%$%$3)'-&-,(*(0*.,)2&(((&+(+))*0&0((/*,*)0&().&(($&%-$-$&%$$-#)%%$($($$%'%'%&%$$E$0(,(-(*$'$-$F$&%')/))/(+)1()($F$&$%&&)(%)+(+-+(&(%$%$&(+(&&C($'$'%%$%%$$(%'%$$E$+&%%K&)$'(((,(($F$+$F%'C)%%''$'&&D'%$$($ED($'$*)',&(.%&('$'%E$)*&*,%,%.%&((%(%,%/(-%%'&$'$F$(D&#($&$%$'($$%%'&$'*+'+,+(&-$E$F$F$(#($'$E$F$F#F$$$F$F#'$&$&D($'%$$E$F$F$&#'$($(%$$&$0%%$%$&$FC)$($$%D%$E&E&%$D'$$%DD($)&%%&$'&%E$$%&&&$&(&$%$&$&%&&)%*$*$*$*$*$*$*$&%(%*$&&'$&'$'%E$$%$%'%$%%%%%')%D'$F%$%&(%D(D&$*%&#'$*'*'('&*%%'&&)%$&''$'%$$'$()$%(%&%'%%&$&'$E$('&'%&''''(&('&&/.%&(&&&($($.()(+0'0'0(&%%&'$&%%&$E&G%%$F%$&&%'%&'$'$'$&$'$'$'$'$&%'$'$'$&$'$'$'$'$'$'$&&&%'$'$'$&$'$'$'$'$&(&'&(&%'$'$'$&$'$'$'$'$'$'$$($'E'$F%&%%'$%%'$''$&'%%%'$'$($#)%$&&&(&&'%&&&D%&&%$'&&E'%&%&(%$&D'%(E%'($E$&%&('%$$%&$&$'%'..()%*$*&*'*'&$&(&&&'$'(&$'($)$%&($&$'%'))&%%'&&&%E&&F$'%$'%&$F%%'$&$'$$'$))$%&&%%')$%$&(&&'%&&&%&D%')$&+*'(&((F&&.-(%&%&$*%&$(#'$&$(%'%%%%'$$)%&$(%$$$%(&%%(D%%&%($(%D$''$$&'&*''$%$%(%&%$F&)*&&$&$(&&$(%E%$&%(&&(&'&)%/%*'-'..($*%'&&$F&$%%%'$'%%'$$'%&$)$&%)#(%%D(%'$(%%G$%'%$$&$$$'%D$$E'%$&&$$%)%$%$&&$'%&(&($%%'%($$%%%$'%E$&'%%&%%'&'$$(&'%&&**'%'&&&%(%%)$'%&$&%&%%$%E$D&%%$&%&%,&,#0$%$($(%&&&%D$'$G$&%&%&$&$F%'&$'$$*D(($H$($($($'%($G%($($'%'%($'%&%%&$F#%%$$(%&($%$$($'%$$&$$%$%$&$&(%$&%&&)$*$&D'%$E$$%$$'$&$$%$%$%$$%%%''%$&$'$%&$F$'$&%%'$'$D$%%&%%&%'%(%*'%&&&)((&'&&$K%E#'$(%%%'%'&$'&'$$&$'$()&%'%'$E$*&($'%'%.'-%E%'$F%'%'$(%'C)$$E&%$$&E&$%%DD($$%'&%%'%&$'$'&%''''&%%%%&$$%'%&(&%'%$&&&(''&(&'$&%&%E%%$'D($F%%'$'&'$($'$$$%'$'E%#(%$$E$'$F$F%'$'#(($$(%$$E$($&$&$F$F#(%%%'$'$$%$$&$(%)%'%'%%'$'%%$E&%%'$(%'%'%'%'%'&'%%$&&&$'D$'%&%'($&%'&)$$(%'&%%%%$$&%&($%(&(%%$$%*,''..%'-'-1$,+,-'-%$%$&$&(%$&%&&)$*$&D'%&*'&'()''&'&$(%'%D$$%$$''$($%&$&$$%&%)%'%&$(%')'$%%%''%$&$'$%&$'&%%&%.+-')'-%.,(%&&D&&%(%'&&%$&'&$$&'%$'%)%&($%$%&$(%E%$%%'$'$%%&%($%'D$%%&%%&%'%'%'%(%'&$'$'$$*&'$K%E#(D&%%&$'&%$&&)')')%%'$(%$$'$/$E$%D'%$&&&&F&%&($($)$$&%%$($(%E$$$F%'$$%)%&#F%D&D$,(-%D%D&D$-$(%'$'%'%E%$&D&E&%&'%&(%*$D&%F(D$&&&%'%&(F%%%$$'$$%&%''$(%%F%'%'&E%')$$E$E%$&$'D'H&D%&%$&$$'%&%&$$%$&$%$$&$'%D%&%%%$&*(-&$'D'H&D'$%&%$&%($$&$FE$&%(D(F(%)$)$&%(%)$)$$&'('E'D%(%$&&&D'$(E$'%&(D(D%,%&($$%&&&D&D%*)+%%'$($%&%&%((%%%'D'$'F*%,D&%(E&$'D'$'F*%,D$&E'%%%.0%,(1%$$%$&&&%$(%'%E%'%E&D%(%'&D&D'F%'&G%F$'%''$(%%'#%D(%%$&G$%$$'%'%%%%%'$'$'%D$&E'%$$'%$$&$'%&&'%&%$$'%&%(&$&&$F$&%&%&$$%&%$&%(%F$F$%'%%%(%$$&E'%%D(&&)%D&$'#&F$''&&'$&$$%$(&&&&&$&'$E$%&$%'%&$$%*%$$()$'%%%'''$'&'%($'$G%'&'&$$$*%EE&$$%$%%%&%$&$')'*'%'*(&(&'&%&($%%&%&&%%&(''''&$'%%&%'$F%$$(#F$&$F$($F$-'&%&(%E%#(%%%'$'$&$F&&%&%)%%'$'$'%E&%%'%'$(%'$'%'%'%'%'&'%'$%'&%('$'%&%'($&%'&)$$(%'&%%%%$$&%(%&($%%$&'&'''$%%E$$(%'%D$''$($%$&$$,-'(./%(-,+(.(-(-%%%-$'%&%$$()'$'$'&%%&%&&D&&%($&'%%)$'$(%E%$%%&%($$(%'%%'$'$''$)$$#)$'$$%$%%&&%&%$&&%&%%&%&&%)%&%$$&'$'$$'%''$(%E%%%%'%)'$%%$E&&$'%'&$%)(+E$$'($($%$&&&$'$&$'$&$'$&%&'&'$'$/&&%)%%&%%$&$'D$(%$&$'%%E$()&&$$'(D&%(D%&($(&+%'$($(&+%%$&&($&$$'$F%'%'%'$&'$%0+&&%$%&$&&&$'&&'&%'$&'&'&&)%+$)&,$'%'%($%%')'*'%'*(&(&'&%$%%%$F$F$F$&$&&'&&$'&&'(%&'&'&%'$&'&&)%+$)&,$'%'%($$'%''$(%%'D'#)%$$&$(%'%$$&$($E$(('&%(&($%,(&&&%&&&E&$'E&($)%($%%$&%$&&&&&D'&%%$($'%)+'+'/%+$+(0%&&&$&(&'&%&'%)$F&$%&%'$'%1*-#'$&D(%%$'&&D'%$$'%'%&$(%DD($''$%&$()%&&%&$'E$$'%E$)%,%.,(%&%%'$'&%+$()%&&%&%&$F$'%'%%'$$'E%$)#'$&'$$'$(%+&(&*&&'$'(&$'%&('K/D(J/D&('..($%$'$%&&&%%'%'&$$E$'$G'D$F$'$'$F%G(D&F(D$)#($(&%($%'$E$F$$$$%'$F#'%&%%$'$E$'%&$$$'%&$&$&$'%E&&%'$'%&$F%'$(%&$&$(C)&$$'%$D%$E$&$F$F$&E%#)$(%$$&$(%%$E$&$)$F$F$%%%0@0000H8H40H000047P00P@001000@0B0HP@:H9T8P000LB8d@800@I0<110000QQ8400P10030005940@410020000Q02000@0200000@P0101@8000440400000000808000000000@00000000P`0000000040400@0004<000000000008000030000000000P020T400020@0@00000000000000000000000000P0000000400400000400220080000100000000000000000P000000000000P000000@00402000000000@00000000000000000000040000000000000", `Æ&ÁĂÂА\uD835\uDD04ÀΑĀ⩓Ą\uD835\uDD38⁡Å\uD835\uDC9C≔ÃÄ∖⫧⌆Б∵ℬΒ\uD835\uDD05\uD835\uDD39˘ℬ≎Ч©Ć⋒ⅅℭČÇĈ∰Ċ¸·ℭΧ⊙⊖⊕⊗∲”’∷⩴≡∯∮ℂ∐∳⨯\uD835\uDC9E⋓≍ⅅ⤑ЂЅЏ‡↡⫤ĎД∇Δ\uD835\uDD07´˙˝\`˜⋄ⅆ\uD835\uDD3B¨⃜≐∯¨⇓⇐⇔⫤⟸⟺⟹⇒⊨⇑⇕∥↓⤓⇵̑⥐⥞↽⥖⥟⇁⥗⊤↧⇓\uD835\uDC9FĐŊÐÉĚÊЭĖ\uD835\uDD08È∈Ē◻▫Ę\uD835\uDD3CΕ⩵≂⇌ℰ⩳ΗË∃ⅇФ\uD835\uDD09◼▪\uD835\uDD3D∀ℱℱЃ>ΓϜĞĢĜГĠ\uD835\uDD0A⋙\uD835\uDD3E≥⋛≧⪢≷⩾≳\uD835\uDCA2≫Ъˇ^Ĥℌℋℍ─ℋĦ≎≏ЕIJЁÍÎИİℑÌℑĪⅈ⇒∬∫⋂⁣⁢Į\uD835\uDD40ΙℐĨІÏĴЙ\uD835\uDD0D\uD835\uDD41\uD835\uDCA5ЈЄХЌΚĶК\uD835\uDD0E\uD835\uDD42\uD835\uDCA6Љ<ĹΛ⟪ℒ↞ĽĻЛ⟨←⇤⇆⌈⟦⥡⇃⥙⌊↔⥎⊣↤⥚⊲⧏⊴⥑⥠↿⥘↼⥒⇐⇔⋚≦≶⪡⩽≲\uD835\uDD0F⋘⇚Ŀ⟵⟷⟶⟸⟺⟹\uD835\uDD43↙↘ℒ↰Ł≪⤅М ℳ\uD835\uDD10∓\uD835\uDD44ℳΜЊŃŇŅН​​​​≫≪
24748
+ \uD835\uDD11⁠ ℕ⫬≢≭∦∉≠≂̸∄≯≱≧̸≫̸≹⩾̸≵≎̸≏̸⋪⧏̸⋬≮≰≸≪̸⩽̸≴⪢̸⪡̸⊀⪯̸⋠∌⋫⧐̸⋭⊏̸⋢⊐̸⋣⊂⃒⊈⊁⪰̸⋡≿̸⊃⃒⊉≁≄≇≉∤\uD835\uDCA9ÑΝŒÓÔОŐ\uD835\uDD12ÒŌΩΟ\uD835\uDD46“‘⩔\uD835\uDCAAØÕ⨷Ö‾⏞⎴⏜∂П\uD835\uDD13ΦΠ±ℌℙ⪻≺⪯≼≾″∏∷∝\uD835\uDCABΨ"\uD835\uDD14ℚ\uD835\uDCAC⤐®Ŕ⟫↠⤖ŘŖРℜ∋⇋⥯ℜΡ⟩→⇥⇄⌉⟧⥝⇂⥕⌋⊢↦⥛⊳⧐⊵⥏⥜↾⥔⇀⥓⇒ℝ⥰⇛ℛ↱⧴ЩШЬŚ⪼ŠŞŜС\uD835\uDD16↓←→↑Σ∘\uD835\uDD4A√□⊓⊏⊑⊐⊒⊔\uD835\uDCAE⋆⋐⋐⊆≻⪰≽≿∋∑⋑⊃⊇⋑Þ™ЋЦ ΤŤŢТ\uD835\uDD17∴Θ   ∼≃≅≈\uD835\uDD4B⃛\uD835\uDCAFŦÚ↟⥉ЎŬÛУŰ\uD835\uDD18ÙŪ_⏟⎵⏝⋃⊎Ų\uD835\uDD4C↑⤒⇅↕⥮⊥↥⇑⇕↖↗ϒΥŮ\uD835\uDCB0ŨÜ⊫⫫В⊩⫦⋁‖‖∣|❘≀ \uD835\uDD19\uD835\uDD4D\uD835\uDCB1⊪Ŵ⋀\uD835\uDD1A\uD835\uDD4E\uD835\uDCB2\uD835\uDD1BΞ\uD835\uDD4F\uD835\uDCB3ЯЇЮÝŶЫ\uD835\uDD1C\uD835\uDD50\uD835\uDCB4ŸЖŹŽЗŻ​Ζℨℤ\uD835\uDCB5áă∾∾̳∿â´аæ⁡\uD835\uDD1Eàℵℵαā⨿&∧⩕⩜⩘⩚∠⦤∠∡⦨⦩⦪⦫⦬⦭⦮⦯∟⊾⦝∢Å⍼ą\uD835\uDD52≈⩰⩯≊≋'≈≊å\uD835\uDCB6*≈≍ãä∳⨑⫭≌϶‵∽⋍⊽⌅⌅⎵⎶≌б„∵∵⦰϶ℬβℶ≬\uD835\uDD1F⋂◯⋃⨀⨁⨂⨆★▽△⨄⋁⋀⤍⧫▪▴▾◂▸␣▒░▓█=⃥≡⃥⌐\uD835\uDD53⊥⊥⋈╗╔╖╓═╦╩╤╧╝╚╜╙║╬╣╠╫╢╟⧉╕╒┐┌─╥╨┬┴⊟⊞⊠╛╘┘└│╪╡╞┼┤├‵˘¦\uD835\uDCB7⁏∽⋍\\⧅⟈••≎⪮≏≏ć∩⩄⩉⩋⩇⩀∩︀⁁ˇ⩍čçĉ⩌⩐ċ¸⦲¢·\uD835\uDD20ч✓✓χ○⧃ˆ≗↺↻®Ⓢ⊛⊚⊝≗⨐⫯⧂♣♣:≔≔,@∁∘∁ℂ≅⩭∮\uD835\uDD54∐©℗↵✗\uD835\uDCB8⫏⫑⫐⫒⋯⤸⤵⋞⋟↶⤽∪⩈⩆⩊⊍⩅∪︀↷⤼⋞⋟⋎⋏¤↶↷⋎⋏∲∱⌭⇓⥥†ℸ↓‐⊣⤏˝ďдⅆ‡⇊⩷°δ⦱⥿\uD835\uDD21⇃⇂⋄⋄♦♦¨ϝ⋲÷÷⋇⋇ђ⌞⌍$\uD835\uDD55˙≐≑∸∔⊡⌆↓⇊⇃⇂⤐⌟⌌\uD835\uDCB9ѕ⧶đ⋱▿▾⇵⥯⦦џ⟿⩷≑é⩮ě≖ê≕эėⅇ≒\uD835\uDD22⪚è⪖⪘⪙⏧ℓ⪕⪗ē∅∅∅   ŋ ę\uD835\uDD56⋕⧣⩱εεϵ≖≕≂⪖⪕=≟≡⩸⧥≓⥱ℯ≐≂ηðë€!∃ℰⅇ≒ф♀ffiffffl\uD835\uDD23fifj♭fl▱ƒ\uD835\uDD57∀⋔⫙⨍½⅓¼⅕⅙⅛⅔⅖¾⅗⅜⅘⅚⅝⅞⁄⌢\uD835\uDCBB≧⪌ǵγϝ⪆ğĝгġ≥⋛≥≧⩾⩾⪩⪀⪂⪄⋛︀⪔\uD835\uDD24≫⋙ℷѓ≷⪒⪥⪤≩⪊⪊⪈⪈≩⋧\uD835\uDD58\`ℊ≳⪎⪐>⪧⩺⋗⦕⩼⪆⥸⋗⋛⪌≷≳≩︀≩︀⇔ ½ℋъ↔⥈↭ℏĥ♥♥…⊹\uD835\uDD25⤥⤦⇿∻↩↪\uD835\uDD59―\uD835\uDCBDℏħ⁃‐í⁣îие¡⇔\uD835\uDD26ìⅈ⨌∭⧜℩ijīℑℐℑı⊷Ƶ∈℅∞⧝ı∫⊺ℤ⊺⨗⨼ёį\uD835\uDD5Aι⨼¿\uD835\uDCBE∈⋹⋵⋴⋳∈⁢ĩіïĵй\uD835\uDD27ȷ\uD835\uDD5B\uD835\uDCBFјєκϰķк\uD835\uDD28ĸхќ\uD835\uDD5C\uD835\uDCC0⇚⇐⤛⤎≦⪋⥢ĺ⦴ℒλ⟨⦑⟨⪅«←⇤⤟⤝↩↫⤹⥳↢⪫⤙⪭⪭︀⤌❲{[⦋⦏⦍ľļ⌈{л⤶“„⥧⥋↲≤←↢↽↼⇇↔⇆⇋↭⋋⋚≤≦⩽⩽⪨⩿⪁⪃⋚︀⪓⪅⋖⋚⪋≶≲⥼⌊\uD835\uDD29≶⪑↽↼⥪▄љ≪⇇⌞⥫◺ŀ⎰⎰≨⪉⪉⪇⪇≨⋦⟬⇽⟦⟵⟷⟼⟶↫↬⦅\uD835\uDD5D⨭⨴∗_◊◊⧫(⦓⇆⌟⇋⥭‎⊿‹\uD835\uDCC1↰≲⪍⪏[‘‚ł<⪦⩹⋖⋋⋉⥶⩻⦖◃⊴◂⥊⥦≨︀≨︀∺¯♂✠✠↦↦↧↤↥▮⨩м—∡\uD835\uDD2A℧µ∣*⫰·−⊟∸⨪⫛…∓⊧\uD835\uDD5E∓\uD835\uDCC2∾μ⊸⊸⋙̸≫⃒≫̸⇍⇎⋘̸≪⃒≪̸⇏⊯⊮∇ń∠⃒≉⩰̸≋̸ʼn≉♮♮ℕ ≎̸≏̸⩃ňņ≇⩭̸⩂н–≠⇗⤤↗↗≐̸≢⤨≂̸∄∄\uD835\uDD2B≧̸≱≱≧̸⩾̸⩾̸≵≯≯⇎↮⫲∋⋼⋺∋њ⇍≦̸↚‥≰↚↮≰≦̸⩽̸⩽̸≮≴≮⋪⋬∤\uD835\uDD5F¬∉⋹̸⋵̸∉⋷⋶∌∌⋾⋽∦∦⫽⃥∂̸⨔⊀⋠⪯̸⊀⪯̸⇏↛⤳̸↝̸↛⋫⋭⊁⋡⪰̸\uD835\uDCC3∤∦≁≄≄∤∦⋢⋣⊄⫅̸⊈⊂⃒⊈⫅̸⊁⪰̸⊅⫆̸⊉⊃⃒⊉⫆̸≹ñ≸⋪⋬⋫⋭ν#№ ⊭⤄≍⃒⊬≥⃒>⃒⧞⤂≤⃒<⃒⊴⃒⤃⊵⃒∼⃒⇖⤣↖↖⤧Ⓢó⊛⊚ôо⊝ő⨸⊙⦼œ⦿\uD835\uDD2C˛ò⧁⦵Ω∮↺⦾⦻‾⧀ōωο⦶⊖\uD835\uDD60⦷⦹⊕∨↻⩝ℴℴªº⊶⩖⩗⩛ℴø⊘õ⊗⨶ö⌽∥¶∥⫳⫽∂п%.‰⊥‱\uD835\uDD2Dφϕℳ☎π⋔ϖℏℎℏ+⨣⊞⨢∔⨥⩲±⨦⨧±⨕\uD835\uDD61£≺⪳⪷≼⪯≺⪷≼⪯⪹⪵⋨≾′ℙ⪵⪹⋨∏⌮⌒⌓∝∝≾⊰\uD835\uDCC5ψ \uD835\uDD2E⨌\uD835\uDD62⁗\uD835\uDCC6ℍ⨖?≟"⇛⇒⤜⤏⥤∽̱ŕ√⦳⟩⦒⦥⟩»→⥵⇥⤠⤳⤞↪↬⥅⥴↣↝⤚∶ℚ⤍❳}]⦌⦎⦐řŗ⌉}р⤷⥩””↳ℜℛℜℝ▭®⥽⌋\uD835\uDD2F⇁⇀⥬ρϱ→↣⇁⇀⇄⇌⇉↝⋌˚≓⇄⇌‏⎱⎱⫮⟭⇾⟧⦆\uD835\uDD63⨮⨵)⦔⨒⇉›\uD835\uDCC7↱]’’⋌⋊▹⊵▸⧎⥨℞ś‚≻⪴⪸š≽⪰şŝ⪶⪺⋩⨓≿с⋅⊡⩦⇘⤥↘↘§;⤩∖∖✶\uD835\uDD30⌢♯щш∣∥­σςς∼⩪≃≃⪞⪠⪝⪟≆⨤⥲←∖⨳⧤∣⌣⪪⪬⪬︀ь/⧄⌿\uD835\uDD64♠♠∥⊓⊓︀⊔⊔︀⊏⊑⊏⊑⊐⊒⊐⊒□□▪▪→\uD835\uDCC8∖⌣⋆☆★ϵϕ¯⊂⫅⪽⊆⫃⫁⫋⊊⪿⥹⊂⊆⫅⊊⫋⫇⫕⫓≻⪸≽⪰⪺⪶⋩≿∑♪⊃¹²³⫆⪾⫘⊇⫄⟉⫗⥻⫂⫌⊋⫀⊃⊇⫆⊋⫌⫈⫔⫖⇙⤦↙↙⤪ß⌖τ⎴ťţт⃛⌕\uD835\uDD31∴∴θϑϑ≈∼ ≈∼þ˜×⊠⨱⨰∭⤨⊤⌶⫱\uD835\uDD65⫚⤩‴™▵▿◃⊴≜▹⊵◬≜⨺⨹⧍⨻⏢\uD835\uDCC9цћŧ≬↞↠⇑⥣ú↑ўŭûу⇅ű⥮⥾\uD835\uDD32ù↿↾▀⌜⌜⌏◸ū¨ų\uD835\uDD66↑↕↿↾⊎υϒυ⇈⌝⌝⌎ů◹\uD835\uDCCA⋰ũ▵▴⇈ü⦧⇕⫨⫩⊨⦜ϵϰ∅ϕϖ∝↕ϱς⊊︀⫋︀⊋︀⫌︀ϑ⊲⊳в⊢∨⊻≚⋮||\uD835\uDD33⊲⊂⃒⊃⃒\uD835\uDD67∝⊳\uD835\uDCCB⫋︀⊊︀⫌︀⊋︀⦚ŵ⩟∧≙℘\uD835\uDD34\uD835\uDD68℘≀≀\uD835\uDCCC⋂◯⋃▽\uD835\uDD35⟺⟷ξ⟸⟵⟼⋻⨀\uD835\uDD69⨁⨂⟹⟶\uD835\uDCCD⨆⨄△⋁⋀ýяŷы¥\uD835\uDD36ї\uD835\uDD6A\uD835\uDCCEюÿźžзżℨζ\uD835\uDD37ж⇝\uD835\uDD6B\uD835\uDCCF‍‌`];
24749
+ });
24750
+
24751
+ // ../../node_modules/parse5/node_modules/entities/dist/internal/decode-data-format.js
24752
+ function exactKey(text, nameStart, length) {
24753
+ return text.charCodeAt(nameStart) << 25 | text.charCodeAt(nameStart + 1) << 18 | text.charCodeAt(nameStart + length - 2) << 11 | CHAR_REMAP[text.charCodeAt(nameStart + length - 1)] << 5 | length;
24754
+ }
24755
+ function pairIndex(c0, c1) {
24756
+ return (c0 * 3 << 3 ^ c1) & PAIR_TABLE_SIZE - 1;
24757
+ }
24758
+ function bucketOne(key, buckets) {
24759
+ return (Math.imul(key, BUCKET_HASH_1) >>> 16) * buckets >>> 16;
24760
+ }
24761
+ function bucketTwo(key, buckets) {
24762
+ return (Math.imul(key, BUCKET_HASH_2) >>> 16) * buckets >>> 16;
24763
+ }
24764
+ function initDecodeData(packed) {
24765
+ const [data, values] = packed;
24766
+ const nameCount = data.charCodeAt(0) - HEADER_BIAS << 6 | data.charCodeAt(1) - HEADER_BIAS;
24767
+ const suffixesLength = data.charCodeAt(2) - HEADER_BIAS << 6 | data.charCodeAt(3) - HEADER_BIAS;
24768
+ const buckets = data.charCodeAt(4) - HEADER_BIAS << 6 | data.charCodeAt(5) - HEADER_BIAS;
24769
+ const metaStart = HEADER_LENGTH + suffixesLength;
24770
+ const choicesStart = metaStart + 2 * nameCount;
24771
+ const slotCount = 2 * buckets;
24772
+ const keys = new Int32Array(slotCount);
24773
+ const slotMidOff = new Uint16Array(slotCount);
24774
+ const slotValue = new Uint16Array(slotCount);
24775
+ const lengthBits = new Uint32Array(PAIR_TABLE_SIZE);
24776
+ const middleOffsets = new Map;
24777
+ const middles = [];
24778
+ let name = "";
24779
+ let suffixOffset = HEADER_LENGTH;
24780
+ let valueOffset = 0;
24781
+ for (let index = 0;index < nameCount; index++) {
24782
+ const meta0 = data.charCodeAt(metaStart + 2 * index) - META_BIAS;
24783
+ const meta1 = data.charCodeAt(metaStart + 2 * index + 1) - META_BIAS;
24784
+ const prefixLength = meta0 & 31;
24785
+ const length = prefixLength + (meta1 & 31);
24786
+ const valueLength = (meta1 >> 5) + 1;
24787
+ name = name.slice(0, prefixLength) + data.slice(suffixOffset, suffixOffset + length - prefixLength);
24788
+ suffixOffset += length - prefixLength;
24789
+ const key = exactKey(name, 0, length);
24790
+ const choice = data.charCodeAt(choicesStart + Math.floor(index / CHOICE_BITS_PER_CHAR)) - HEADER_BIAS & 1 << index % CHOICE_BITS_PER_CHAR;
24791
+ let slot = 2 * (choice === 0 ? bucketOne : bucketTwo)(key, buckets);
24792
+ if (keys[slot] !== 0)
24793
+ slot += 1;
24794
+ keys[slot] = key;
24795
+ if (length > 4) {
24796
+ const middle = name.slice(2, length - 2);
24797
+ const existing = middleOffsets.get(middle);
24798
+ if (existing === undefined) {
24799
+ middleOffsets.set(middle, middles.length);
24800
+ slotMidOff[slot] = middles.length;
24801
+ for (let middleIndex = 0;middleIndex < middle.length; middleIndex += 2) {
24802
+ middles.push(middle.charCodeAt(middleIndex) | middle.charCodeAt(middleIndex + 1) << 16);
24803
+ }
24804
+ } else {
24805
+ slotMidOff[slot] = existing;
24806
+ }
24807
+ }
24808
+ const pair = pairIndex(name.charCodeAt(0), name.charCodeAt(1));
24809
+ lengthBits[pair] |= length <= 16 ? 1 << length - 2 : 32768;
24810
+ if ((meta0 & 32) !== 0) {
24811
+ lengthBits[pair] |= 1 << length - 2 + 16;
24812
+ }
24813
+ slotValue[slot] = valueOffset << 2 | valueLength - 1 | (meta0 & 32) >> 4;
24814
+ valueOffset += valueLength;
24815
+ }
24816
+ return {
24817
+ keys,
24818
+ buckets,
24819
+ slotMidOff,
24820
+ slotValue,
24821
+ values,
24822
+ lengthBits,
24823
+ middles: new Uint32Array(middles)
24598
24824
  };
24825
+ }
24826
+ var META_BIAS = 35, HEADER_BIAS = 48, HEADER_LENGTH = 6, CHOICE_BITS_PER_CHAR = 6, BUCKET_HASH_1 = 2654435761, BUCKET_HASH_2 = 2246822507, PAIR_TABLE_SIZE = 1024, CHAR_REMAP;
24827
+ var init_decode_data_format = __esm(() => {
24828
+ CHAR_REMAP = (() => {
24829
+ const remap = new Uint8Array(128);
24830
+ for (let code = 48;code <= 57; code++)
24831
+ remap[code] = code - 47;
24832
+ for (let code = 65;code <= 90; code++)
24833
+ remap[code] = code - 54;
24834
+ for (let code = 97;code <= 122; code++)
24835
+ remap[code] = code - 60;
24836
+ return remap;
24837
+ })();
24599
24838
  });
24600
24839
 
24601
- // ../../node_modules/parse5/node_modules/entities/dist/esm/decode.js
24840
+ // ../../node_modules/parse5/node_modules/entities/dist/decode.js
24602
24841
  function isNumber2(code) {
24603
- return code >= CharCodes.ZERO && code <= CharCodes.NINE;
24604
- }
24605
- function isHexadecimalCharacter(code) {
24606
- return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
24842
+ return code - CHAR_ZERO >>> 0 <= 9;
24607
24843
  }
24608
- function isAsciiAlphaNumeric(code) {
24609
- return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber2(code);
24844
+ function isAlphaNumeric(code) {
24845
+ return isNumber2(code) || (code | TO_LOWER_BIT) - CHAR_LOWER_A >>> 0 <= 25;
24610
24846
  }
24611
24847
  function isEntityInAttributeInvalidEnd(code) {
24612
- return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
24848
+ return code === CHAR_EQUALS || isAlphaNumeric(code);
24849
+ }
24850
+ function findSlotHtml(text, start, length) {
24851
+ const c0 = text.charCodeAt(start);
24852
+ const c1 = text.charCodeAt(start + 1);
24853
+ const c2 = text.charCodeAt(start + length - 2);
24854
+ const c3 = text.charCodeAt(start + length - 1);
24855
+ if ((c0 | c1 | c2 | c3) > 127)
24856
+ return -1;
24857
+ const key = c0 << 25 | c1 << 18 | c2 << 11 | CHAR_REMAP[c3] << 5 | length;
24858
+ let slot = 2 * ((Math.imul(key, BUCKET_HASH_1) >>> 16) * htmlBuckets >>> 16);
24859
+ for (let attempt = 0;; attempt++) {
24860
+ if (htmlKeys[slot] === key && (length <= 4 || isMidMatchHtml(slot, text, start, length))) {
24861
+ return slot;
24862
+ }
24863
+ if (htmlKeys[slot + 1] === key && (length <= 4 || isMidMatchHtml(slot + 1, text, start, length))) {
24864
+ return slot + 1;
24865
+ }
24866
+ if (attempt === 1)
24867
+ return -1;
24868
+ slot = 2 * ((Math.imul(key, BUCKET_HASH_2) >>> 16) * htmlBuckets >>> 16);
24869
+ }
24613
24870
  }
24614
-
24615
- class EntityDecoder {
24616
- constructor(decodeTree, emitCodePoint, errors) {
24617
- this.decodeTree = decodeTree;
24618
- this.emitCodePoint = emitCodePoint;
24619
- this.errors = errors;
24620
- this.state = EntityDecoderState.EntityStart;
24621
- this.consumed = 1;
24622
- this.result = 0;
24623
- this.treeIndex = 0;
24624
- this.excess = 1;
24625
- this.decodeMode = DecodingMode.Strict;
24871
+ function isMidMatchHtml(slot, text, start, length) {
24872
+ let wordIndex = htmlSlotMidOff[slot];
24873
+ let index = start + 2;
24874
+ const end = start + length - 2;
24875
+ while (index + 1 < end) {
24876
+ if ((text.charCodeAt(index) | text.charCodeAt(index + 1) << 16) !== htmlMiddles[wordIndex++])
24877
+ return false;
24878
+ index += 2;
24626
24879
  }
24627
- startEntity(decodeMode) {
24628
- this.decodeMode = decodeMode;
24629
- this.state = EntityDecoderState.EntityStart;
24630
- this.result = 0;
24631
- this.treeIndex = 0;
24632
- this.excess = 1;
24633
- this.consumed = 1;
24880
+ return index === end || text.charCodeAt(index) === (htmlMiddles[wordIndex] & 65535);
24881
+ }
24882
+ function findLegacySlot(input, start, maxLength) {
24883
+ let legacy = htmlLengthBits[pairIndex(input.charCodeAt(start), input.charCodeAt(start + 1))] >>> 16 & 31;
24884
+ while (legacy !== 0) {
24885
+ const top = 31 - Math.clz32(legacy);
24886
+ legacy ^= 1 << top;
24887
+ if (top + 2 > maxLength)
24888
+ continue;
24889
+ const slot = findSlotHtml(input, start, top + 2);
24890
+ if (slot >= 0 && (htmlSlotValue[slot] & 2) !== 0) {
24891
+ return slot << 3 | top + 2;
24892
+ }
24634
24893
  }
24635
- write(input, offset) {
24636
- switch (this.state) {
24637
- case EntityDecoderState.EntityStart: {
24638
- if (input.charCodeAt(offset) === CharCodes.NUM) {
24639
- this.state = EntityDecoderState.NumericStart;
24640
- this.consumed += 1;
24641
- return this.stateNumericStart(input, offset + 1);
24642
- }
24643
- this.state = EntityDecoderState.NamedEntity;
24644
- return this.stateNamedEntity(input, offset);
24645
- }
24646
- case EntityDecoderState.NumericStart: {
24647
- return this.stateNumericStart(input, offset);
24648
- }
24649
- case EntityDecoderState.NumericDecimal: {
24650
- return this.stateNumericDecimal(input, offset);
24651
- }
24652
- case EntityDecoderState.NumericHex: {
24653
- return this.stateNumericHex(input, offset);
24654
- }
24655
- case EntityDecoderState.NamedEntity: {
24656
- return this.stateNamedEntity(input, offset);
24657
- }
24894
+ return -1;
24895
+ }
24896
+ function findLongClassMatch(input, start, mode) {
24897
+ const length = input.slice(start, start + 32).indexOf(";");
24898
+ if (length - 2 >>> 0 <= 29) {
24899
+ const slot = findSlotHtml(input, start, length);
24900
+ if (slot >= 0)
24901
+ return slot << 6 | length + 1;
24902
+ }
24903
+ if (mode !== DecodingMode.Strict) {
24904
+ const packed = findLegacySlot(input, start, Math.min(31, input.length - start));
24905
+ if (packed >= 0) {
24906
+ const length = packed & 7;
24907
+ if (mode !== DecodingMode.Attribute || start + length >= input.length || !isEntityInAttributeInvalidEnd(input.charCodeAt(start + length)))
24908
+ return packed >> 3 << 6 | length;
24658
24909
  }
24659
24910
  }
24911
+ return -1;
24912
+ }
24913
+
24914
+ class EntityDecoderBase {
24915
+ emitCodePoint;
24916
+ errors;
24917
+ state = STATE_ENTITY_START;
24918
+ consumed = 1;
24919
+ result = 0;
24920
+ decodeMode = DecodingMode.Strict;
24921
+ replaceNumericCodePoint = replaceCodePoint;
24922
+ constructor(emitCodePoint, errors) {
24923
+ this.emitCodePoint = emitCodePoint;
24924
+ this.errors = errors;
24925
+ }
24660
24926
  stateNumericStart(input, offset) {
24661
24927
  if (offset >= input.length) {
24662
24928
  return -1;
24663
24929
  }
24664
- if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
24665
- this.state = EntityDecoderState.NumericHex;
24930
+ if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CHAR_LOWER_X) {
24931
+ this.state = STATE_NUMERIC_HEX;
24666
24932
  this.consumed += 1;
24667
24933
  return this.stateNumericHex(input, offset + 1);
24668
24934
  }
24669
- this.state = EntityDecoderState.NumericDecimal;
24935
+ this.state = STATE_NUMERIC_DECIMAL;
24670
24936
  return this.stateNumericDecimal(input, offset);
24671
24937
  }
24672
- addToNumericResult(input, start, end, base) {
24673
- if (start !== end) {
24674
- const digitCount = end - start;
24675
- this.result = this.result * Math.pow(base, digitCount) + Number.parseInt(input.substr(start, digitCount), base);
24676
- this.consumed += digitCount;
24677
- }
24678
- }
24679
24938
  stateNumericHex(input, offset) {
24680
- const startIndex = offset;
24681
- while (offset < input.length) {
24682
- const char = input.charCodeAt(offset);
24683
- if (isNumber2(char) || isHexadecimalCharacter(char)) {
24684
- offset += 1;
24939
+ const inputLength = input.length;
24940
+ let { result, consumed } = this;
24941
+ let index = offset;
24942
+ while (index < inputLength) {
24943
+ const char = input.charCodeAt(index);
24944
+ const digit = numericDigits[char];
24945
+ if (digit <= 15) {
24946
+ result = result * 16 + digit;
24685
24947
  } else {
24686
- this.addToNumericResult(input, startIndex, offset, 16);
24948
+ this.result = result;
24949
+ this.consumed = consumed;
24687
24950
  return this.emitNumericEntity(char, 3);
24688
24951
  }
24952
+ consumed += 1;
24953
+ index += 1;
24689
24954
  }
24690
- this.addToNumericResult(input, startIndex, offset, 16);
24955
+ this.result = result;
24956
+ this.consumed = consumed;
24691
24957
  return -1;
24692
24958
  }
24693
24959
  stateNumericDecimal(input, offset) {
24694
- const startIndex = offset;
24695
- while (offset < input.length) {
24696
- const char = input.charCodeAt(offset);
24697
- if (isNumber2(char)) {
24698
- offset += 1;
24699
- } else {
24700
- this.addToNumericResult(input, startIndex, offset, 10);
24701
- return this.emitNumericEntity(char, 2);
24702
- }
24703
- }
24704
- this.addToNumericResult(input, startIndex, offset, 10);
24960
+ const inputLength = input.length;
24961
+ let { result, consumed } = this;
24962
+ let index = offset;
24963
+ while (index < inputLength) {
24964
+ const digit = input.charCodeAt(index) - CHAR_ZERO;
24965
+ if (digit >>> 0 > 9) {
24966
+ this.result = result;
24967
+ this.consumed = consumed;
24968
+ return this.emitNumericEntity(digit + CHAR_ZERO, 2);
24969
+ }
24970
+ result = result * 10 + digit;
24971
+ consumed += 1;
24972
+ index += 1;
24973
+ }
24974
+ this.result = result;
24975
+ this.consumed = consumed;
24705
24976
  return -1;
24706
24977
  }
24707
24978
  emitNumericEntity(lastCp, expectedLength) {
24708
- var _a;
24709
24979
  if (this.consumed <= expectedLength) {
24710
- (_a = this.errors) === null || _a === undefined || _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
24980
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
24711
24981
  return 0;
24712
24982
  }
24713
- if (lastCp === CharCodes.SEMI) {
24983
+ if (lastCp === CHAR_SEMI) {
24714
24984
  this.consumed += 1;
24715
24985
  } else if (this.decodeMode === DecodingMode.Strict) {
24716
24986
  return 0;
24717
24987
  }
24718
- this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
24988
+ this.emitCodePoint(this.replaceNumericCodePoint(this.result), this.consumed);
24719
24989
  if (this.errors) {
24720
- if (lastCp !== CharCodes.SEMI) {
24990
+ if (lastCp !== CHAR_SEMI) {
24721
24991
  this.errors.missingSemicolonAfterCharacterReference();
24722
24992
  }
24723
24993
  this.errors.validateNumericCharacterReference(this.result);
24724
24994
  }
24725
24995
  return this.consumed;
24726
24996
  }
24727
- stateNamedEntity(input, offset) {
24728
- const { decodeTree } = this;
24729
- let current = decodeTree[this.treeIndex];
24730
- let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
24731
- for (;offset < input.length; offset++, this.excess++) {
24732
- const char = input.charCodeAt(offset);
24733
- this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
24734
- if (this.treeIndex < 0) {
24735
- return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
24736
- }
24737
- current = decodeTree[this.treeIndex];
24738
- valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
24739
- if (valueLength !== 0) {
24740
- if (char === CharCodes.SEMI) {
24741
- return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
24742
- }
24743
- if (this.decodeMode !== DecodingMode.Strict) {
24744
- this.result = this.treeIndex;
24745
- this.consumed += this.excess;
24746
- this.excess = 0;
24997
+ startEntity(decodeMode) {
24998
+ this.decodeMode = decodeMode;
24999
+ this.state = STATE_ENTITY_START;
25000
+ this.result = 0;
25001
+ this.consumed = 1;
25002
+ }
25003
+ write(input, offset) {
25004
+ switch (this.state) {
25005
+ case STATE_ENTITY_START: {
25006
+ if (input.charCodeAt(offset) === CHAR_NUM) {
25007
+ this.state = STATE_NUMERIC_START;
25008
+ this.consumed += 1;
25009
+ return this.stateNumericStart(input, offset + 1);
24747
25010
  }
25011
+ this.state = STATE_NAMED_ENTITY;
25012
+ return this.stateNamedEntity(input, offset);
25013
+ }
25014
+ case STATE_NUMERIC_START: {
25015
+ return this.stateNumericStart(input, offset);
25016
+ }
25017
+ case STATE_NUMERIC_DECIMAL: {
25018
+ return this.stateNumericDecimal(input, offset);
25019
+ }
25020
+ case STATE_NUMERIC_HEX: {
25021
+ return this.stateNumericHex(input, offset);
25022
+ }
25023
+ default: {
25024
+ return this.stateNamedEntity(input, offset);
24748
25025
  }
24749
25026
  }
24750
- return -1;
24751
- }
24752
- emitNotTerminatedNamedEntity() {
24753
- var _a;
24754
- const { result, decodeTree } = this;
24755
- const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
24756
- this.emitNamedEntityData(result, valueLength, this.consumed);
24757
- (_a = this.errors) === null || _a === undefined || _a.missingSemicolonAfterCharacterReference();
24758
- return this.consumed;
24759
- }
24760
- emitNamedEntityData(result, valueLength, consumed) {
24761
- const { decodeTree } = this;
24762
- this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
24763
- if (valueLength === 3) {
24764
- this.emitCodePoint(decodeTree[result + 2], consumed);
24765
- }
24766
- return consumed;
24767
25027
  }
24768
25028
  end() {
24769
- var _a;
24770
25029
  switch (this.state) {
24771
- case EntityDecoderState.NamedEntity: {
24772
- return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
25030
+ case STATE_NAMED_ENTITY: {
25031
+ return this.endNamedEntity();
24773
25032
  }
24774
- case EntityDecoderState.NumericDecimal: {
25033
+ case STATE_NUMERIC_DECIMAL: {
24775
25034
  return this.emitNumericEntity(0, 2);
24776
25035
  }
24777
- case EntityDecoderState.NumericHex: {
25036
+ case STATE_NUMERIC_HEX: {
24778
25037
  return this.emitNumericEntity(0, 3);
24779
25038
  }
24780
- case EntityDecoderState.NumericStart: {
24781
- (_a = this.errors) === null || _a === undefined || _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
25039
+ case STATE_NUMERIC_START: {
25040
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
24782
25041
  return 0;
24783
25042
  }
24784
- case EntityDecoderState.EntityStart: {
25043
+ default: {
24785
25044
  return 0;
24786
25045
  }
24787
25046
  }
24788
25047
  }
24789
25048
  }
24790
- function determineBranch(decodeTree, current, nodeIndex, char) {
24791
- const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
24792
- const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
24793
- if (branchCount === 0) {
24794
- return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;
25049
+ function findBufferedHtmlSlot(buffer, length) {
25050
+ const key = buffer[0] << 25 | buffer[1] << 18 | buffer[length - 2] << 11 | CHAR_REMAP[buffer[length - 1]] << 5 | length;
25051
+ let slot = 2 * ((Math.imul(key, BUCKET_HASH_1) >>> 16) * htmlBuckets >>> 16);
25052
+ for (let attempt = 0;; attempt++) {
25053
+ if (htmlKeys[slot] === key && (length <= 4 || isBufferedMiddle(slot, buffer, length)))
25054
+ return slot;
25055
+ if (htmlKeys[slot + 1] === key && (length <= 4 || isBufferedMiddle(slot + 1, buffer, length)))
25056
+ return slot + 1;
25057
+ if (attempt === 1)
25058
+ return -1;
25059
+ slot = 2 * ((Math.imul(key, BUCKET_HASH_2) >>> 16) * htmlBuckets >>> 16);
24795
25060
  }
24796
- if (jumpOffset) {
24797
- const value = char - jumpOffset;
24798
- return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1;
25061
+ }
25062
+ function isBufferedMiddle(slot, buffer, length) {
25063
+ let wordIndex = htmlSlotMidOff[slot];
25064
+ let index = 2;
25065
+ const end = length - 2;
25066
+ while (index + 1 < end) {
25067
+ if ((buffer[index] | buffer[index + 1] << 16) !== htmlMiddles[wordIndex++])
25068
+ return false;
25069
+ index += 2;
24799
25070
  }
24800
- let lo = nodeIndex;
24801
- let hi = lo + branchCount - 1;
24802
- while (lo <= hi) {
24803
- const mid = lo + hi >>> 1;
24804
- const midValue = decodeTree[mid];
24805
- if (midValue < char) {
24806
- lo = mid + 1;
24807
- } else if (midValue > char) {
24808
- hi = mid - 1;
24809
- } else {
24810
- return decodeTree[mid + branchCount];
24811
- }
25071
+ return index === end || buffer[index] === (htmlMiddles[wordIndex] & 65535);
25072
+ }
25073
+ function findBufferedLegacySlot(buffer, length) {
25074
+ let legacy = htmlLengthBits[pairIndex(buffer[0], buffer[1])] >>> 16 & 31;
25075
+ while (legacy !== 0) {
25076
+ const top = 31 - Math.clz32(legacy);
25077
+ legacy ^= 1 << top;
25078
+ if (top + 2 > length)
25079
+ continue;
25080
+ const slot = findBufferedHtmlSlot(buffer, top + 2);
25081
+ if (slot >= 0 && (htmlSlotValue[slot] & 2) !== 0)
25082
+ return slot << 3 | top + 2;
24812
25083
  }
24813
25084
  return -1;
24814
25085
  }
24815
- var CharCodes, TO_LOWER_BIT = 32, BinTrieFlags, EntityDecoderState, DecodingMode;
25086
+ var CHAR_NUM = 35, CHAR_SEMI = 59, CHAR_EQUALS = 61, CHAR_ZERO = 48, CHAR_LOWER_A = 97, CHAR_LOWER_X = 120, CHAR_UPPER_A = 65, TO_LOWER_BIT = 32, DecodingMode, htmlDecode, htmlKeys, htmlBuckets, htmlSlotMidOff, htmlLengthBits, htmlMiddles, htmlSlotValue, htmlValues, numericDigits, STATE_ENTITY_START = 0, STATE_NUMERIC_START = 1, STATE_NUMERIC_DECIMAL = 2, STATE_NUMERIC_HEX = 3, STATE_NAMED_ENTITY = 4, HtmlEntityDecoder;
24816
25087
  var init_decode = __esm(() => {
24817
25088
  init_decode_codepoint();
24818
25089
  init_decode_data_html();
24819
- (function(CharCodes) {
24820
- CharCodes[CharCodes["NUM"] = 35] = "NUM";
24821
- CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
24822
- CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
24823
- CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
24824
- CharCodes[CharCodes["NINE"] = 57] = "NINE";
24825
- CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
24826
- CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
24827
- CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
24828
- CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
24829
- CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
24830
- CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
24831
- CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
24832
- })(CharCodes || (CharCodes = {}));
24833
- (function(BinTrieFlags) {
24834
- BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
24835
- BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
24836
- BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
24837
- })(BinTrieFlags || (BinTrieFlags = {}));
24838
- (function(EntityDecoderState) {
24839
- EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
24840
- EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
24841
- EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
24842
- EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
24843
- EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
24844
- })(EntityDecoderState || (EntityDecoderState = {}));
25090
+ init_decode_data_format();
24845
25091
  (function(DecodingMode) {
24846
25092
  DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
24847
25093
  DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
24848
25094
  DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
24849
25095
  })(DecodingMode || (DecodingMode = {}));
25096
+ htmlDecode = /* @__PURE__ */ initDecodeData(htmlDecodeData);
25097
+ htmlKeys = /* @__PURE__ */ (() => htmlDecode.keys)();
25098
+ htmlBuckets = /* @__PURE__ */ (() => htmlDecode.buckets)();
25099
+ htmlSlotMidOff = /* @__PURE__ */ (() => htmlDecode.slotMidOff)();
25100
+ htmlLengthBits = /* @__PURE__ */ (() => htmlDecode.lengthBits)();
25101
+ htmlMiddles = /* @__PURE__ */ (() => htmlDecode.middles)();
25102
+ htmlSlotValue = /* @__PURE__ */ (() => htmlDecode.slotValue)();
25103
+ htmlValues = /* @__PURE__ */ (() => htmlDecode.values)();
25104
+ numericDigits = /* @__PURE__ */ (() => {
25105
+ const digits = new Uint8Array(128).fill(255);
25106
+ for (let digit = 0;digit < 10; digit++) {
25107
+ digits[CHAR_ZERO + digit] = digit;
25108
+ }
25109
+ for (let digit = 0;digit < 6; digit++) {
25110
+ digits[CHAR_UPPER_A + digit] = digit + 10;
25111
+ digits[CHAR_LOWER_A + digit] = digit + 10;
25112
+ }
25113
+ return digits;
25114
+ })();
25115
+ HtmlEntityDecoder = class HtmlEntityDecoder extends EntityDecoderBase {
25116
+ runLength = 0;
25117
+ nameBuffer = new Uint8Array(32);
25118
+ emitSlot(slot) {
25119
+ const packed = htmlSlotValue[slot];
25120
+ const off = packed >> 2;
25121
+ this.emitCodePoint(htmlValues.charCodeAt(off), this.consumed);
25122
+ if ((packed & 1) !== 0) {
25123
+ this.emitCodePoint(htmlValues.charCodeAt(off + 1), this.consumed);
25124
+ }
25125
+ }
25126
+ startEntity(decodeMode) {
25127
+ super.startEntity(decodeMode);
25128
+ this.runLength = 0;
25129
+ }
25130
+ stateNamedEntity(input, offset) {
25131
+ const inputLength = input.length;
25132
+ if (this.runLength === 0 && offset + 17 <= inputLength) {
25133
+ const c0 = input.charCodeAt(offset);
25134
+ const pair = pairIndex(c0, input.charCodeAt(offset + 1));
25135
+ const bits = htmlLengthBits[pair];
25136
+ if ((bits & 32768) !== 0 && offset + 32 <= inputLength) {
25137
+ const packed = findLongClassMatch(input, offset, this.decodeMode);
25138
+ if (packed >= 0) {
25139
+ const length = packed & 63;
25140
+ this.consumed = length + 1;
25141
+ this.emitSlot(packed >> 6);
25142
+ if (input.charCodeAt(offset + length - 1) !== CHAR_SEMI) {
25143
+ this.errors?.missingSemicolonAfterCharacterReference();
25144
+ }
25145
+ return this.consumed;
25146
+ }
25147
+ return 0;
25148
+ }
25149
+ let probed = bits & 32767;
25150
+ while (probed !== 0) {
25151
+ const low = probed & -probed;
25152
+ probed ^= low;
25153
+ const length = 33 - Math.clz32(low);
25154
+ if (input.charCodeAt(offset + length) === CHAR_SEMI) {
25155
+ const slot = findSlotHtml(input, offset, length);
25156
+ if (slot >= 0) {
25157
+ this.consumed = length + 2;
25158
+ this.emitSlot(slot);
25159
+ return this.consumed;
25160
+ }
25161
+ }
25162
+ }
25163
+ if ((bits & 32768) === 0) {
25164
+ if (this.decodeMode !== DecodingMode.Strict) {
25165
+ const packed = findLegacySlot(input, offset, 31);
25166
+ if (packed >= 0) {
25167
+ const matchLength = packed & 7;
25168
+ const next = input.charCodeAt(offset + matchLength);
25169
+ if (this.decodeMode === DecodingMode.Attribute && isEntityInAttributeInvalidEnd(next)) {
25170
+ return 0;
25171
+ }
25172
+ this.consumed = matchLength + 1;
25173
+ this.emitSlot(packed >> 3);
25174
+ this.errors?.missingSemicolonAfterCharacterReference();
25175
+ return this.consumed;
25176
+ }
25177
+ }
25178
+ return 0;
25179
+ }
25180
+ }
25181
+ let index = offset;
25182
+ let { runLength } = this;
25183
+ let terminator = -1;
25184
+ const scanEnd = Math.min(inputLength, offset + 32 - runLength);
25185
+ while (index < scanEnd) {
25186
+ const char = input.charCodeAt(index);
25187
+ if (!isAlphaNumeric(char)) {
25188
+ terminator = char;
25189
+ break;
25190
+ }
25191
+ this.nameBuffer[runLength++] = char;
25192
+ index++;
25193
+ }
25194
+ if (terminator < 0 && runLength < 32) {
25195
+ this.runLength = runLength;
25196
+ return -1;
25197
+ }
25198
+ if (terminator === CHAR_SEMI && runLength - 2 >>> 0 <= 29) {
25199
+ const slot = findBufferedHtmlSlot(this.nameBuffer, runLength);
25200
+ if (slot >= 0) {
25201
+ this.consumed = runLength + 2;
25202
+ this.emitSlot(slot);
25203
+ return this.consumed;
25204
+ }
25205
+ }
25206
+ if (this.decodeMode !== DecodingMode.Strict && runLength >= 2) {
25207
+ const packed = findBufferedLegacySlot(this.nameBuffer, runLength);
25208
+ if (packed >= 0) {
25209
+ const length = packed & 7;
25210
+ const next = length < runLength ? this.nameBuffer[length] : terminator;
25211
+ if (this.decodeMode === DecodingMode.Attribute && isEntityInAttributeInvalidEnd(next))
25212
+ return 0;
25213
+ this.consumed = length + 1;
25214
+ this.emitSlot(packed >> 3);
25215
+ this.errors?.missingSemicolonAfterCharacterReference();
25216
+ return this.consumed;
25217
+ }
25218
+ }
25219
+ return 0;
25220
+ }
25221
+ endNamedEntity() {
25222
+ if (this.decodeMode === DecodingMode.Strict || this.runLength < 2) {
25223
+ return 0;
25224
+ }
25225
+ const packed = findBufferedLegacySlot(this.nameBuffer, this.runLength);
25226
+ if (packed < 0)
25227
+ return 0;
25228
+ if (this.decodeMode === DecodingMode.Attribute && (packed & 7) < this.runLength) {
25229
+ return 0;
25230
+ }
25231
+ this.consumed = (packed & 7) + 1;
25232
+ this.emitSlot(packed >> 3);
25233
+ this.errors?.missingSemicolonAfterCharacterReference();
25234
+ return this.consumed;
25235
+ }
25236
+ };
24850
25237
  });
24851
25238
 
24852
25239
  // ../../node_modules/parse5/dist/common/html.js
@@ -25371,14 +25758,14 @@ function isAsciiLower(cp) {
25371
25758
  function isAsciiLetter(cp) {
25372
25759
  return isAsciiLower(cp) || isAsciiUpper(cp);
25373
25760
  }
25374
- function isAsciiAlphaNumeric2(cp) {
25761
+ function isAsciiAlphaNumeric(cp) {
25375
25762
  return isAsciiLetter(cp) || isAsciiDigit(cp);
25376
25763
  }
25377
25764
  function toAsciiLower(cp) {
25378
25765
  return cp + 32;
25379
25766
  }
25380
25767
  function isWhitespace(cp) {
25381
- return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED;
25768
+ return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED || cp === CODE_POINTS.CARRIAGE_RETURN;
25382
25769
  }
25383
25770
  function isScriptDataDoubleEscapeSequenceEnd(cp) {
25384
25771
  return isWhitespace(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN;
@@ -25414,11 +25801,19 @@ class Tokenizer {
25414
25801
  this.currentCharacterToken = null;
25415
25802
  this.currentToken = null;
25416
25803
  this.currentAttr = { name: "", value: "" };
25804
+ this.currentAttrLocation = null;
25805
+ this.currentAttrNames = null;
25806
+ this.runStart = 0;
25807
+ this.runEnd = 0;
25417
25808
  this.preprocessor = new Preprocessor(handler);
25418
25809
  this.currentLocation = this.getCurrentLocation(-1);
25419
- this.entityDecoder = new EntityDecoder(htmlDecodeTree, (cp, consumed) => {
25810
+ this.entityDecoder = new HtmlEntityDecoder((cp, consumed) => {
25420
25811
  this.preprocessor.pos = this.entityStartPos + consumed - 1;
25421
- this._flushCodePointConsumedAsCharacterReference(cp);
25812
+ if (!this._isCharacterReferenceInAttribute()) {
25813
+ this._ensureCharacterToken(isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER);
25814
+ }
25815
+ this._extendRunWith(String.fromCodePoint(cp), 0);
25816
+ this.entityStartPos = this.preprocessor.pos - consumed + 1;
25422
25817
  }, handler.onParseError ? {
25423
25818
  missingSemicolonAfterCharacterReference: () => {
25424
25819
  this._err(ERR.missingSemicolonAfterCharacterReference, 1);
@@ -25463,6 +25858,92 @@ class Tokenizer {
25463
25858
  }
25464
25859
  this.inLoop = false;
25465
25860
  }
25861
+ flushCharacters() {
25862
+ var _a;
25863
+ if (this.inLoop) {
25864
+ throw new Error("Cannot flush characters from a tokenizer callback");
25865
+ }
25866
+ const location = (_a = this.currentCharacterToken) === null || _a === undefined ? undefined : _a.location;
25867
+ let nextLocation = null;
25868
+ if (location) {
25869
+ nextLocation = this.getCharacterTokenEndLocation(location);
25870
+ this.currentLocation = nextLocation;
25871
+ }
25872
+ this.inLoop = true;
25873
+ try {
25874
+ this._emitCurrentCharacterToken(nextLocation);
25875
+ } finally {
25876
+ this.inLoop = false;
25877
+ }
25878
+ this._runParsingLoop();
25879
+ }
25880
+ getCharacterTokenEndLocation(location) {
25881
+ const endOffset = this.getCharacterTokenEndOffset();
25882
+ const html = this.preprocessor.html.slice(location.startOffset - this.preprocessor.droppedBufferSize, endOffset - this.preprocessor.droppedBufferSize);
25883
+ let line = location.startLine;
25884
+ let lastLineBreak = -1;
25885
+ for (let i = html.indexOf(`
25886
+ `);i !== -1; i = html.indexOf(`
25887
+ `, i + 1)) {
25888
+ line++;
25889
+ lastLineBreak = i;
25890
+ }
25891
+ for (let i = html.indexOf("\r");i !== -1; i = html.indexOf("\r", i + 1)) {
25892
+ if (html.charCodeAt(i + 1) !== CODE_POINTS.LINE_FEED) {
25893
+ line++;
25894
+ lastLineBreak = Math.max(lastLineBreak, i);
25895
+ }
25896
+ }
25897
+ return {
25898
+ startLine: line,
25899
+ startCol: lastLineBreak === -1 ? location.startCol + html.length : html.length - lastLineBreak,
25900
+ startOffset: endOffset,
25901
+ endLine: -1,
25902
+ endCol: -1,
25903
+ endOffset: -1
25904
+ };
25905
+ }
25906
+ getCharacterTokenEndOffset() {
25907
+ var _a;
25908
+ const end = this.preprocessor.droppedBufferSize + this.preprocessor.pos + 1;
25909
+ const tokenLocation = (_a = this.currentToken) === null || _a === undefined ? undefined : _a.location;
25910
+ switch (this.state) {
25911
+ case State.TAG_OPEN:
25912
+ case State.RCDATA_LESS_THAN_SIGN:
25913
+ case State.RAWTEXT_LESS_THAN_SIGN:
25914
+ case State.SCRIPT_DATA_LESS_THAN_SIGN:
25915
+ case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:
25916
+ case State.CDATA_SECTION_BRACKET: {
25917
+ return end - 1;
25918
+ }
25919
+ case State.END_TAG_OPEN:
25920
+ case State.MARKUP_DECLARATION_OPEN:
25921
+ case State.RCDATA_END_TAG_OPEN:
25922
+ case State.RCDATA_END_TAG_NAME:
25923
+ case State.RAWTEXT_END_TAG_OPEN:
25924
+ case State.RAWTEXT_END_TAG_NAME:
25925
+ case State.SCRIPT_DATA_END_TAG_OPEN:
25926
+ case State.SCRIPT_DATA_END_TAG_NAME:
25927
+ case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:
25928
+ case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME:
25929
+ case State.CDATA_SECTION_END: {
25930
+ return end - 2;
25931
+ }
25932
+ case State.CHARACTER_REFERENCE: {
25933
+ return this._isCharacterReferenceInAttribute() && tokenLocation ? tokenLocation.startOffset : this.preprocessor.droppedBufferSize + this.entityStartPos;
25934
+ }
25935
+ case State.DOCTYPE:
25936
+ case State.BEFORE_DOCTYPE_NAME: {
25937
+ return this.currentLocation.startOffset;
25938
+ }
25939
+ default: {
25940
+ if (tokenLocation && (this.state === State.TAG_NAME || this.state >= State.BEFORE_ATTRIBUTE_NAME && this.state <= State.BOGUS_COMMENT || this.state >= State.COMMENT_START && this.state <= State.BOGUS_DOCTYPE)) {
25941
+ return tokenLocation.startOffset;
25942
+ }
25943
+ return end;
25944
+ }
25945
+ }
25946
+ }
25466
25947
  pause() {
25467
25948
  this.paused = true;
25468
25949
  }
@@ -25491,6 +25972,19 @@ class Tokenizer {
25491
25972
  this.preprocessor.insertHtmlAtCurrentPos(chunk);
25492
25973
  this._runParsingLoop();
25493
25974
  }
25975
+ flushCurrentCharacterToken() {
25976
+ if (this.paused || this.active || !this.currentCharacterToken || this.currentToken || this.state === State.DOCTYPE || this.state === State.BEFORE_DOCTYPE_NAME || !this.preprocessor.willDropParsedChunk()) {
25977
+ return;
25978
+ }
25979
+ const pending = this.preprocessor.droppedBufferSize + this.preprocessor.pos + 1 - this.getCharacterTokenEndOffset();
25980
+ this.preprocessor.advance();
25981
+ this.currentLocation = this.getCurrentLocation(pending);
25982
+ this.preprocessor.retreat(1);
25983
+ this._emitCurrentCharacterToken(this.currentLocation);
25984
+ this._createCharacterToken(TokenType.CHARACTER);
25985
+ this.preprocessor.dropParsedChunk(Math.max(pending - 1, 0));
25986
+ this.entityStartPos = this.preprocessor.pos + 1 - pending;
25987
+ }
25494
25988
  _ensureHibernation() {
25495
25989
  if (this.preprocessor.endOfChunkHit) {
25496
25990
  this.preprocessor.retreat(this.consumedAfterSnapshot);
@@ -25518,6 +26012,7 @@ class Tokenizer {
25518
26012
  return false;
25519
26013
  }
25520
26014
  _createStartTagToken() {
26015
+ this._flushRun("");
25521
26016
  this.currentToken = {
25522
26017
  type: TokenType.START_TAG,
25523
26018
  tagName: "",
@@ -25529,6 +26024,7 @@ class Tokenizer {
25529
26024
  };
25530
26025
  }
25531
26026
  _createEndTagToken() {
26027
+ this._flushRun("");
25532
26028
  this.currentToken = {
25533
26029
  type: TokenType.END_TAG,
25534
26030
  tagName: "",
@@ -25540,6 +26036,7 @@ class Tokenizer {
25540
26036
  };
25541
26037
  }
25542
26038
  _createCommentToken(offset) {
26039
+ this._flushRun("");
25543
26040
  this.currentToken = {
25544
26041
  type: TokenType.COMMENT,
25545
26042
  data: "",
@@ -25547,6 +26044,7 @@ class Tokenizer {
25547
26044
  };
25548
26045
  }
25549
26046
  _createDoctypeToken(initialName) {
26047
+ this._flushRun("");
25550
26048
  this.currentToken = {
25551
26049
  type: TokenType.DOCTYPE,
25552
26050
  name: initialName,
@@ -25556,42 +26054,108 @@ class Tokenizer {
25556
26054
  location: this.currentLocation
25557
26055
  };
25558
26056
  }
25559
- _createCharacterToken(type, chars) {
26057
+ _createCharacterToken(type) {
26058
+ if (this.currentLocation) {
26059
+ const start = this.currentLocation.startOffset - this.preprocessor.droppedBufferSize;
26060
+ if (this.preprocessor.html[start] === `
26061
+ ` && this.preprocessor.html[start - 1] === "\r") {
26062
+ this.currentLocation.startOffset++;
26063
+ }
26064
+ }
25560
26065
  this.currentCharacterToken = {
25561
26066
  type,
25562
- chars,
26067
+ chars: "",
25563
26068
  location: this.currentLocation
25564
26069
  };
25565
26070
  }
25566
26071
  _createAttr(attrNameFirstCh) {
26072
+ this._flushRun("");
25567
26073
  this.currentAttr = {
25568
26074
  name: attrNameFirstCh,
25569
26075
  value: ""
25570
26076
  };
25571
- this.currentLocation = this.getCurrentLocation(0);
26077
+ this.currentAttrLocation = this.getCurrentLocation(0);
25572
26078
  }
25573
26079
  _leaveAttrName() {
25574
26080
  var _a;
25575
26081
  var _b;
25576
26082
  const token = this.currentToken;
25577
- if (getTokenAttr(token, this.currentAttr.name) === null) {
26083
+ const { name } = this.currentAttr;
26084
+ const names = this.currentAttrNames;
26085
+ let duplicate;
26086
+ if (names === null) {
26087
+ duplicate = getTokenAttr(token, name) !== null;
26088
+ if (!duplicate && token.attrs.length === ATTR_NAME_SET_THRESHOLD) {
26089
+ this.currentAttrNames = new Set(token.attrs.map((attr) => attr.name)).add(name);
26090
+ }
26091
+ } else {
26092
+ duplicate = names.has(name);
26093
+ if (!duplicate)
26094
+ names.add(name);
26095
+ }
26096
+ if (duplicate) {
26097
+ this._err(ERR.duplicateAttribute);
26098
+ } else {
25578
26099
  token.attrs.push(this.currentAttr);
25579
- if (token.location && this.currentLocation) {
26100
+ if (token.location && this.currentAttrLocation) {
25580
26101
  const attrLocations = (_a = (_b = token.location).attrs) !== null && _a !== undefined ? _a : _b.attrs = Object.create(null);
25581
- attrLocations[this.currentAttr.name] = this.currentLocation;
26102
+ attrLocations[this.currentAttr.name] = this.currentAttrLocation;
25582
26103
  this._leaveAttrValue();
25583
26104
  }
25584
- } else {
25585
- this._err(ERR.duplicateAttribute);
25586
26105
  }
25587
26106
  }
25588
26107
  _leaveAttrValue() {
25589
- if (this.currentLocation) {
25590
- this.currentLocation.endLine = this.preprocessor.line;
25591
- this.currentLocation.endCol = this.preprocessor.col;
25592
- this.currentLocation.endOffset = this.preprocessor.offset;
26108
+ if (this.currentAttrLocation) {
26109
+ this.currentAttrLocation.endLine = this.preprocessor.line;
26110
+ this.currentAttrLocation.endCol = this.preprocessor.col;
26111
+ this.currentAttrLocation.endOffset = this.preprocessor.offset;
26112
+ }
26113
+ }
26114
+ _flushRun(text) {
26115
+ if (this.runEnd === this.runStart && text.length === 0) {
26116
+ return;
26117
+ }
26118
+ const slice = this.preprocessor.html.slice(this.runStart, this.runEnd);
26119
+ const run = (slice.length < 13 ? slice : ` ${slice}`.slice(1)) + text;
26120
+ const token = this.currentToken;
26121
+ this.runStart = this.runEnd;
26122
+ if (token === null) {
26123
+ this.currentCharacterToken.chars += run;
26124
+ } else if (token.type === TokenType.COMMENT) {
26125
+ token.data += run;
26126
+ } else {
26127
+ this.currentAttr.value += run;
25593
26128
  }
25594
26129
  }
26130
+ _extendRun(cp) {
26131
+ const { preprocessor } = this;
26132
+ if (cp === CODE_POINTS.LINE_FEED && preprocessor.html.charCodeAt(preprocessor.pos) !== CODE_POINTS.LINE_FEED) {
26133
+ this._flushRun(`
26134
+ `);
26135
+ this.runStart = preprocessor.pos + 1;
26136
+ } else {
26137
+ const start = preprocessor.pos - Number(cp > 65535);
26138
+ if (start !== this.runEnd) {
26139
+ this._flushRun("");
26140
+ this.runStart = start;
26141
+ }
26142
+ }
26143
+ this.runEnd = preprocessor.pos + 1;
26144
+ }
26145
+ _extendRunWith(text, cpOffset) {
26146
+ const { preprocessor } = this;
26147
+ const start = preprocessor.codePointStart + 1 + cpOffset - text.length;
26148
+ if (start >= 0 && preprocessor.html.startsWith(text, start)) {
26149
+ if (start !== this.runEnd) {
26150
+ this._flushRun("");
26151
+ this.runStart = start;
26152
+ }
26153
+ } else {
26154
+ this._flushRun(text);
26155
+ this.runStart = start + text.length;
26156
+ }
26157
+ this.runEnd = start + text.length;
26158
+ }
25595
26159
  prepareToken(ct) {
25596
26160
  this._emitCurrentCharacterToken(ct.location);
25597
26161
  this.currentToken = null;
@@ -25604,6 +26168,7 @@ class Tokenizer {
25604
26168
  }
25605
26169
  emitCurrentTagToken() {
25606
26170
  const ct = this.currentToken;
26171
+ this.currentAttrNames = null;
25607
26172
  this.prepareToken(ct);
25608
26173
  ct.tagID = getTagID(ct.tagName);
25609
26174
  if (ct.type === TokenType.START_TAG) {
@@ -25631,6 +26196,7 @@ class Tokenizer {
25631
26196
  this.preprocessor.dropParsedChunk();
25632
26197
  }
25633
26198
  _emitCurrentCharacterToken(nextLocation) {
26199
+ this._flushRun("");
25634
26200
  if (this.currentCharacterToken) {
25635
26201
  if (nextLocation && this.currentCharacterToken.location) {
25636
26202
  this.currentCharacterToken.location.endLine = nextLocation.startLine;
@@ -25655,35 +26221,45 @@ class Tokenizer {
25655
26221
  }
25656
26222
  }
25657
26223
  _emitEOFToken() {
26224
+ var _a, _b;
25658
26225
  const location = this.getCurrentLocation(0);
25659
26226
  if (location) {
25660
26227
  location.endLine = location.startLine;
25661
26228
  location.endCol = location.startCol;
25662
26229
  location.endOffset = location.startOffset;
25663
26230
  }
25664
- this._emitCurrentCharacterToken(location);
26231
+ this._emitCurrentCharacterToken((_b = (_a = this.currentToken) === null || _a === undefined ? undefined : _a.location) !== null && _b !== undefined ? _b : location);
25665
26232
  this.handler.onEof({ type: TokenType.EOF, location });
25666
26233
  this.active = false;
25667
26234
  }
25668
- _appendCharToCurrentCharacterToken(type, ch) {
26235
+ _ensureCharacterToken(type) {
25669
26236
  if (this.currentCharacterToken) {
25670
26237
  if (this.currentCharacterToken.type === type) {
25671
- this.currentCharacterToken.chars += ch;
25672
26238
  return;
25673
- } else {
25674
- this.currentLocation = this.getCurrentLocation(0);
25675
- this._emitCurrentCharacterToken(this.currentLocation);
25676
- this.preprocessor.dropParsedChunk();
25677
26239
  }
26240
+ this.currentLocation = this.getCurrentLocation(0);
26241
+ this._emitCurrentCharacterToken(this.currentLocation);
26242
+ this.preprocessor.dropParsedChunk();
25678
26243
  }
25679
- this._createCharacterToken(type, ch);
26244
+ this._createCharacterToken(type);
25680
26245
  }
25681
26246
  _emitCodePoint(cp) {
25682
26247
  const type = isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER;
25683
- this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));
26248
+ const token = this.currentCharacterToken;
26249
+ if (token === null || token.type !== type) {
26250
+ this._ensureCharacterToken(type);
26251
+ }
26252
+ this._extendRun(cp);
25684
26253
  }
25685
- _emitChars(ch) {
25686
- this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);
26254
+ _emitChars(ch, cpOffset = 0) {
26255
+ if (this.options.sourceCodeLocationInfo && cpOffset !== 0 && this.currentCharacterToken && this.currentCharacterToken.type !== TokenType.CHARACTER) {
26256
+ this.currentLocation = this.getCurrentLocation(ch.length - 1 - cpOffset);
26257
+ this._emitCurrentCharacterToken(this.currentLocation);
26258
+ this._createCharacterToken(TokenType.CHARACTER);
26259
+ } else {
26260
+ this._ensureCharacterToken(TokenType.CHARACTER);
26261
+ }
26262
+ this._extendRunWith(ch, cpOffset);
25687
26263
  }
25688
26264
  _startCharacterReference() {
25689
26265
  this.returnState = this.state;
@@ -25696,7 +26272,7 @@ class Tokenizer {
25696
26272
  }
25697
26273
  _flushCodePointConsumedAsCharacterReference(cp) {
25698
26274
  if (this._isCharacterReferenceInAttribute()) {
25699
- this.currentAttr.value += String.fromCodePoint(cp);
26275
+ this._extendRun(cp);
25700
26276
  } else {
25701
26277
  this._emitCodePoint(cp);
25702
26278
  }
@@ -26128,13 +26704,13 @@ class Tokenizer {
26128
26704
  }
26129
26705
  case CODE_POINTS.EOF: {
26130
26706
  this._err(ERR.eofBeforeTagName);
26131
- this._emitChars("<");
26707
+ this._emitChars("<", -1);
26132
26708
  this._emitEOFToken();
26133
26709
  break;
26134
26710
  }
26135
26711
  default: {
26136
26712
  this._err(ERR.invalidFirstCharacterOfTagName);
26137
- this._emitChars("<");
26713
+ this._emitChars("<", -1);
26138
26714
  this.state = State.DATA;
26139
26715
  this._stateData(cp);
26140
26716
  }
@@ -26154,7 +26730,7 @@ class Tokenizer {
26154
26730
  }
26155
26731
  case CODE_POINTS.EOF: {
26156
26732
  this._err(ERR.eofBeforeTagName);
26157
- this._emitChars("</");
26733
+ this._emitChars("</", -1);
26158
26734
  this._emitEOFToken();
26159
26735
  break;
26160
26736
  }
@@ -26204,7 +26780,7 @@ class Tokenizer {
26204
26780
  if (cp === CODE_POINTS.SOLIDUS) {
26205
26781
  this.state = State.RCDATA_END_TAG_OPEN;
26206
26782
  } else {
26207
- this._emitChars("<");
26783
+ this._emitChars("<", -1);
26208
26784
  this.state = State.RCDATA;
26209
26785
  this._stateRcdata(cp);
26210
26786
  }
@@ -26214,7 +26790,7 @@ class Tokenizer {
26214
26790
  this.state = State.RCDATA_END_TAG_NAME;
26215
26791
  this._stateRcdataEndTagName(cp);
26216
26792
  } else {
26217
- this._emitChars("</");
26793
+ this._emitChars("</", -1);
26218
26794
  this.state = State.RCDATA;
26219
26795
  this._stateRcdata(cp);
26220
26796
  }
@@ -26248,13 +26824,14 @@ class Tokenizer {
26248
26824
  return false;
26249
26825
  }
26250
26826
  default: {
26827
+ this.currentToken = null;
26251
26828
  return !this._ensureHibernation();
26252
26829
  }
26253
26830
  }
26254
26831
  }
26255
26832
  _stateRcdataEndTagName(cp) {
26256
26833
  if (this.handleSpecialEndTag(cp)) {
26257
- this._emitChars("</");
26834
+ this._emitChars("</", -1);
26258
26835
  this.state = State.RCDATA;
26259
26836
  this._stateRcdata(cp);
26260
26837
  }
@@ -26263,7 +26840,7 @@ class Tokenizer {
26263
26840
  if (cp === CODE_POINTS.SOLIDUS) {
26264
26841
  this.state = State.RAWTEXT_END_TAG_OPEN;
26265
26842
  } else {
26266
- this._emitChars("<");
26843
+ this._emitChars("<", -1);
26267
26844
  this.state = State.RAWTEXT;
26268
26845
  this._stateRawtext(cp);
26269
26846
  }
@@ -26273,14 +26850,14 @@ class Tokenizer {
26273
26850
  this.state = State.RAWTEXT_END_TAG_NAME;
26274
26851
  this._stateRawtextEndTagName(cp);
26275
26852
  } else {
26276
- this._emitChars("</");
26853
+ this._emitChars("</", -1);
26277
26854
  this.state = State.RAWTEXT;
26278
26855
  this._stateRawtext(cp);
26279
26856
  }
26280
26857
  }
26281
26858
  _stateRawtextEndTagName(cp) {
26282
26859
  if (this.handleSpecialEndTag(cp)) {
26283
- this._emitChars("</");
26860
+ this._emitChars("</", -1);
26284
26861
  this.state = State.RAWTEXT;
26285
26862
  this._stateRawtext(cp);
26286
26863
  }
@@ -26297,7 +26874,7 @@ class Tokenizer {
26297
26874
  break;
26298
26875
  }
26299
26876
  default: {
26300
- this._emitChars("<");
26877
+ this._emitChars("<", -1);
26301
26878
  this.state = State.SCRIPT_DATA;
26302
26879
  this._stateScriptData(cp);
26303
26880
  }
@@ -26308,14 +26885,14 @@ class Tokenizer {
26308
26885
  this.state = State.SCRIPT_DATA_END_TAG_NAME;
26309
26886
  this._stateScriptDataEndTagName(cp);
26310
26887
  } else {
26311
- this._emitChars("</");
26888
+ this._emitChars("</", -1);
26312
26889
  this.state = State.SCRIPT_DATA;
26313
26890
  this._stateScriptData(cp);
26314
26891
  }
26315
26892
  }
26316
26893
  _stateScriptDataEndTagName(cp) {
26317
26894
  if (this.handleSpecialEndTag(cp)) {
26318
- this._emitChars("</");
26895
+ this._emitChars("</", -1);
26319
26896
  this.state = State.SCRIPT_DATA;
26320
26897
  this._stateScriptData(cp);
26321
26898
  }
@@ -26428,11 +27005,11 @@ class Tokenizer {
26428
27005
  if (cp === CODE_POINTS.SOLIDUS) {
26429
27006
  this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;
26430
27007
  } else if (isAsciiLetter(cp)) {
26431
- this._emitChars("<");
27008
+ this._emitChars("<", -1);
26432
27009
  this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;
26433
27010
  this._stateScriptDataDoubleEscapeStart(cp);
26434
27011
  } else {
26435
- this._emitChars("<");
27012
+ this._emitChars("<", -1);
26436
27013
  this.state = State.SCRIPT_DATA_ESCAPED;
26437
27014
  this._stateScriptDataEscaped(cp);
26438
27015
  }
@@ -26442,14 +27019,14 @@ class Tokenizer {
26442
27019
  this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;
26443
27020
  this._stateScriptDataEscapedEndTagName(cp);
26444
27021
  } else {
26445
- this._emitChars("</");
27022
+ this._emitChars("</", -1);
26446
27023
  this.state = State.SCRIPT_DATA_ESCAPED;
26447
27024
  this._stateScriptDataEscaped(cp);
26448
27025
  }
26449
27026
  }
26450
27027
  _stateScriptDataEscapedEndTagName(cp) {
26451
27028
  if (this.handleSpecialEndTag(cp)) {
26452
- this._emitChars("</");
27029
+ this._emitChars("</", -1);
26453
27030
  this.state = State.SCRIPT_DATA_ESCAPED;
26454
27031
  this._stateScriptDataEscaped(cp);
26455
27032
  }
@@ -26713,7 +27290,7 @@ class Tokenizer {
26713
27290
  }
26714
27291
  case CODE_POINTS.NULL: {
26715
27292
  this._err(ERR.unexpectedNullCharacter);
26716
- this.currentAttr.value += REPLACEMENT_CHARACTER;
27293
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26717
27294
  break;
26718
27295
  }
26719
27296
  case CODE_POINTS.EOF: {
@@ -26722,7 +27299,7 @@ class Tokenizer {
26722
27299
  break;
26723
27300
  }
26724
27301
  default: {
26725
- this.currentAttr.value += String.fromCodePoint(cp);
27302
+ this._extendRun(cp);
26726
27303
  }
26727
27304
  }
26728
27305
  }
@@ -26738,7 +27315,7 @@ class Tokenizer {
26738
27315
  }
26739
27316
  case CODE_POINTS.NULL: {
26740
27317
  this._err(ERR.unexpectedNullCharacter);
26741
- this.currentAttr.value += REPLACEMENT_CHARACTER;
27318
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26742
27319
  break;
26743
27320
  }
26744
27321
  case CODE_POINTS.EOF: {
@@ -26747,7 +27324,7 @@ class Tokenizer {
26747
27324
  break;
26748
27325
  }
26749
27326
  default: {
26750
- this.currentAttr.value += String.fromCodePoint(cp);
27327
+ this._extendRun(cp);
26751
27328
  }
26752
27329
  }
26753
27330
  }
@@ -26773,7 +27350,7 @@ class Tokenizer {
26773
27350
  }
26774
27351
  case CODE_POINTS.NULL: {
26775
27352
  this._err(ERR.unexpectedNullCharacter);
26776
- this.currentAttr.value += REPLACEMENT_CHARACTER;
27353
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26777
27354
  break;
26778
27355
  }
26779
27356
  case CODE_POINTS.QUOTATION_MARK:
@@ -26782,7 +27359,7 @@ class Tokenizer {
26782
27359
  case CODE_POINTS.EQUALS_SIGN:
26783
27360
  case CODE_POINTS.GRAVE_ACCENT: {
26784
27361
  this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);
26785
- this.currentAttr.value += String.fromCodePoint(cp);
27362
+ this._extendRun(cp);
26786
27363
  break;
26787
27364
  }
26788
27365
  case CODE_POINTS.EOF: {
@@ -26791,7 +27368,7 @@ class Tokenizer {
26791
27368
  break;
26792
27369
  }
26793
27370
  default: {
26794
- this.currentAttr.value += String.fromCodePoint(cp);
27371
+ this._extendRun(cp);
26795
27372
  }
26796
27373
  }
26797
27374
  }
@@ -26823,6 +27400,7 @@ class Tokenizer {
26823
27400
  }
26824
27401
  default: {
26825
27402
  this._err(ERR.missingWhitespaceBetweenAttributes);
27403
+ this._leaveAttrValue();
26826
27404
  this.state = State.BEFORE_ATTRIBUTE_NAME;
26827
27405
  this._stateBeforeAttributeName(cp);
26828
27406
  }
@@ -26864,11 +27442,11 @@ class Tokenizer {
26864
27442
  }
26865
27443
  case CODE_POINTS.NULL: {
26866
27444
  this._err(ERR.unexpectedNullCharacter);
26867
- token.data += REPLACEMENT_CHARACTER;
27445
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26868
27446
  break;
26869
27447
  }
26870
27448
  default: {
26871
- token.data += String.fromCodePoint(cp);
27449
+ this._extendRun(cp);
26872
27450
  }
26873
27451
  }
26874
27452
  }
@@ -26934,7 +27512,7 @@ class Tokenizer {
26934
27512
  break;
26935
27513
  }
26936
27514
  default: {
26937
- token.data += "-";
27515
+ this._extendRunWith("-", -1);
26938
27516
  this.state = State.COMMENT;
26939
27517
  this._stateComment(cp);
26940
27518
  }
@@ -26948,13 +27526,13 @@ class Tokenizer {
26948
27526
  break;
26949
27527
  }
26950
27528
  case CODE_POINTS.LESS_THAN_SIGN: {
26951
- token.data += "<";
27529
+ this._extendRunWith("<", 0);
26952
27530
  this.state = State.COMMENT_LESS_THAN_SIGN;
26953
27531
  break;
26954
27532
  }
26955
27533
  case CODE_POINTS.NULL: {
26956
27534
  this._err(ERR.unexpectedNullCharacter);
26957
- token.data += REPLACEMENT_CHARACTER;
27535
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26958
27536
  break;
26959
27537
  }
26960
27538
  case CODE_POINTS.EOF: {
@@ -26964,20 +27542,19 @@ class Tokenizer {
26964
27542
  break;
26965
27543
  }
26966
27544
  default: {
26967
- token.data += String.fromCodePoint(cp);
27545
+ this._extendRun(cp);
26968
27546
  }
26969
27547
  }
26970
27548
  }
26971
27549
  _stateCommentLessThanSign(cp) {
26972
- const token = this.currentToken;
26973
27550
  switch (cp) {
26974
27551
  case CODE_POINTS.EXCLAMATION_MARK: {
26975
- token.data += "!";
27552
+ this._extendRunWith("!", 0);
26976
27553
  this.state = State.COMMENT_LESS_THAN_SIGN_BANG;
26977
27554
  break;
26978
27555
  }
26979
27556
  case CODE_POINTS.LESS_THAN_SIGN: {
26980
- token.data += "<";
27557
+ this._extendRunWith("<", 0);
26981
27558
  break;
26982
27559
  }
26983
27560
  default: {
@@ -27023,7 +27600,7 @@ class Tokenizer {
27023
27600
  break;
27024
27601
  }
27025
27602
  default: {
27026
- token.data += "-";
27603
+ this._extendRunWith("-", -1);
27027
27604
  this.state = State.COMMENT;
27028
27605
  this._stateComment(cp);
27029
27606
  }
@@ -27042,7 +27619,7 @@ class Tokenizer {
27042
27619
  break;
27043
27620
  }
27044
27621
  case CODE_POINTS.HYPHEN_MINUS: {
27045
- token.data += "-";
27622
+ this._extendRunWith("-", -2);
27046
27623
  break;
27047
27624
  }
27048
27625
  case CODE_POINTS.EOF: {
@@ -27052,7 +27629,7 @@ class Tokenizer {
27052
27629
  break;
27053
27630
  }
27054
27631
  default: {
27055
- token.data += "--";
27632
+ this._extendRunWith("--", -1);
27056
27633
  this.state = State.COMMENT;
27057
27634
  this._stateComment(cp);
27058
27635
  }
@@ -27062,7 +27639,7 @@ class Tokenizer {
27062
27639
  const token = this.currentToken;
27063
27640
  switch (cp) {
27064
27641
  case CODE_POINTS.HYPHEN_MINUS: {
27065
- token.data += "--!";
27642
+ this._extendRunWith("--!", -1);
27066
27643
  this.state = State.COMMENT_END_DASH;
27067
27644
  break;
27068
27645
  }
@@ -27079,7 +27656,7 @@ class Tokenizer {
27079
27656
  break;
27080
27657
  }
27081
27658
  default: {
27082
- token.data += "--!";
27659
+ this._extendRunWith("--!", -1);
27083
27660
  this.state = State.COMMENT;
27084
27661
  this._stateComment(cp);
27085
27662
  }
@@ -27667,7 +28244,7 @@ class Tokenizer {
27667
28244
  if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) {
27668
28245
  this.state = State.CDATA_SECTION_END;
27669
28246
  } else {
27670
- this._emitChars("]");
28247
+ this._emitChars("]", -1);
27671
28248
  this.state = State.CDATA_SECTION;
27672
28249
  this._stateCdataSection(cp);
27673
28250
  }
@@ -27679,11 +28256,11 @@ class Tokenizer {
27679
28256
  break;
27680
28257
  }
27681
28258
  case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
27682
- this._emitChars("]");
28259
+ this._emitChars("]", -2);
27683
28260
  break;
27684
28261
  }
27685
28262
  default: {
27686
- this._emitChars("]]");
28263
+ this._emitChars("]]", -1);
27687
28264
  this.state = State.CDATA_SECTION;
27688
28265
  this._stateCdataSection(cp);
27689
28266
  }
@@ -27705,13 +28282,13 @@ class Tokenizer {
27705
28282
  if (length === 0) {
27706
28283
  this.preprocessor.pos = this.entityStartPos;
27707
28284
  this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
27708
- this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric2(this.preprocessor.peek(1)) ? State.AMBIGUOUS_AMPERSAND : this.returnState;
28285
+ this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric(this.preprocessor.peek(1)) ? State.AMBIGUOUS_AMPERSAND : this.returnState;
27709
28286
  } else {
27710
28287
  this.state = this.returnState;
27711
28288
  }
27712
28289
  }
27713
28290
  _stateAmbiguousAmpersand(cp) {
27714
- if (isAsciiAlphaNumeric2(cp)) {
28291
+ if (isAsciiAlphaNumeric(cp)) {
27715
28292
  this._flushCodePointConsumedAsCharacterReference(cp);
27716
28293
  } else {
27717
28294
  if (cp === CODE_POINTS.SEMICOLON) {
@@ -27722,7 +28299,7 @@ class Tokenizer {
27722
28299
  }
27723
28300
  }
27724
28301
  }
27725
- var State, TokenizerMode;
28302
+ var ATTR_NAME_SET_THRESHOLD = 64, State, TokenizerMode;
27726
28303
  var init_tokenizer = __esm(() => {
27727
28304
  init_preprocessor();
27728
28305
  init_unicode();
@@ -27816,6 +28393,25 @@ var init_tokenizer = __esm(() => {
27816
28393
  });
27817
28394
 
27818
28395
  // ../../node_modules/parse5/dist/parser/open-element-stack.js
28396
+ function tagKey(ns, tagID) {
28397
+ if (tagID === TAG_ID.UNKNOWN)
28398
+ return -1;
28399
+ switch (ns) {
28400
+ case NS.HTML: {
28401
+ return tagID;
28402
+ }
28403
+ case NS.SVG: {
28404
+ return SVG_KEYS + tagID;
28405
+ }
28406
+ case NS.MATHML: {
28407
+ return MATHML_KEYS + tagID;
28408
+ }
28409
+ default: {
28410
+ return -1;
28411
+ }
28412
+ }
28413
+ }
28414
+
27819
28415
  class OpenElementStack {
27820
28416
  get currentTmplContentOrNode() {
27821
28417
  return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
@@ -27826,13 +28422,41 @@ class OpenElementStack {
27826
28422
  this.items = [];
27827
28423
  this.tagIDs = [];
27828
28424
  this.stackTop = -1;
28425
+ this.depth = 0;
27829
28426
  this.tmplCount = 0;
27830
28427
  this.currentTagId = TAG_ID.UNKNOWN;
28428
+ this.indexed = false;
28429
+ this.below = [];
28430
+ this.above = [];
28431
+ this.keys = [];
28432
+ this.keyPrev = [];
28433
+ this.keyNext = [];
28434
+ this.keyTops = new Int32Array(0);
28435
+ this.specials = [];
28436
+ this.listItemBoundaries = [];
28437
+ this.scopeBoundaries = [];
28438
+ this.htmlSlots = [];
28439
+ this.formattingSlots = new Map;
27831
28440
  this.current = document2;
27832
28441
  }
27833
28442
  _indexOf(element) {
28443
+ if (this.indexed) {
28444
+ const idx = this.formattingSlots.get(element);
28445
+ if (idx !== undefined)
28446
+ return idx;
28447
+ if (FORMATTING_TAGS[getTagID(this.treeAdapter.getTagName(element))])
28448
+ return -1;
28449
+ }
27834
28450
  return this.items.lastIndexOf(element, this.stackTop);
27835
28451
  }
28452
+ slotBelow(idx) {
28453
+ return this.indexed ? this.below[idx] : idx - 1;
28454
+ }
28455
+ slotAbove(idx) {
28456
+ if (this.indexed)
28457
+ return this.above[idx];
28458
+ return idx === this.stackTop ? -1 : idx + 1;
28459
+ }
27836
28460
  _isInTemplate() {
27837
28461
  return this.currentTagId === TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;
27838
28462
  }
@@ -27840,60 +28464,274 @@ class OpenElementStack {
27840
28464
  this.current = this.items[this.stackTop];
27841
28465
  this.currentTagId = this.tagIDs[this.stackTop];
27842
28466
  }
28467
+ _nameKey(ns, tagName, create) {
28468
+ var _a, _b;
28469
+ const name = `${ns} ${tagName}`;
28470
+ let key = (_a = this.nameKeys) === null || _a === undefined ? undefined : _a.get(name);
28471
+ if (key === undefined && create) {
28472
+ (_b = this.nameKeys) !== null && _b !== undefined || (this.nameKeys = new Map);
28473
+ key = NAME_KEYS + this.nameKeys.size;
28474
+ this.nameKeys.set(name, key);
28475
+ if (key === this.keyTops.length) {
28476
+ const keyTops = new Int32Array(2 * key).fill(-1);
28477
+ keyTops.set(this.keyTops);
28478
+ this.keyTops = keyTops;
28479
+ }
28480
+ }
28481
+ return key !== null && key !== undefined ? key : -1;
28482
+ }
28483
+ _indexAll() {
28484
+ this.indexed = true;
28485
+ this.keyTops = new Int32Array(NAME_KEYS).fill(-1);
28486
+ for (let i = 0;i <= this.stackTop; i++)
28487
+ this._index(i, i - 1);
28488
+ }
28489
+ _index(slot, belowIdx) {
28490
+ const element = this.items[slot];
28491
+ const tagID = this.tagIDs[slot];
28492
+ const ns = this.treeAdapter.getNamespaceURI(element);
28493
+ let key = tagKey(ns, tagID);
28494
+ if (key === -1)
28495
+ key = this._nameKey(ns, this.treeAdapter.getTagName(element), true);
28496
+ const keyPrev = this.keyTops[key];
28497
+ this.keys[slot] = key;
28498
+ this.keyPrev[slot] = keyPrev;
28499
+ this.keyNext[slot] = -1;
28500
+ if (keyPrev !== -1)
28501
+ this.keyNext[keyPrev] = slot;
28502
+ this.keyTops[key] = slot;
28503
+ this.above[slot] = -1;
28504
+ this._link(slot, belowIdx, ns === NS.HTML);
28505
+ if (FORMATTING_TAGS[tagID])
28506
+ this.formattingSlots.set(element, slot);
28507
+ }
28508
+ _link(slot, belowIdx, isHtml) {
28509
+ const key = this.keys[slot];
28510
+ const classes = key < NAME_KEYS ? KEY_CLASSES[key] : 0;
28511
+ this.below[slot] = belowIdx;
28512
+ if (belowIdx === -1) {
28513
+ this.specials[slot] = classes & SPECIAL;
28514
+ this.listItemBoundaries[slot] = (classes & LIST_ITEM_BOUNDARY) >> 1;
28515
+ this.scopeBoundaries[slot] = (classes & SCOPE) >> 2;
28516
+ this.htmlSlots[slot] = isHtml ? slot : -1;
28517
+ } else {
28518
+ this.above[belowIdx] = slot;
28519
+ this.specials[slot] = this.specials[belowIdx] + (classes & SPECIAL);
28520
+ this.listItemBoundaries[slot] = this.listItemBoundaries[belowIdx] + ((classes & LIST_ITEM_BOUNDARY) >> 1);
28521
+ this.scopeBoundaries[slot] = this.scopeBoundaries[belowIdx] + ((classes & SCOPE) >> 2);
28522
+ this.htmlSlots[slot] = isHtml ? slot : this.htmlSlots[belowIdx];
28523
+ }
28524
+ }
28525
+ _unindex(slot) {
28526
+ const key = this.keys[slot];
28527
+ const keyPrev = this.keyPrev[slot];
28528
+ const keyNext = this.keyNext[slot];
28529
+ if (keyPrev !== -1)
28530
+ this.keyNext[keyPrev] = keyNext;
28531
+ if (keyNext === -1)
28532
+ this.keyTops[key] = keyPrev;
28533
+ else
28534
+ this.keyPrev[keyNext] = keyPrev;
28535
+ if (FORMATTING_TAGS[this.tagIDs[slot]])
28536
+ this.formattingSlots.delete(this.items[slot]);
28537
+ }
28538
+ _move(from, to) {
28539
+ const element = this.items[from];
28540
+ const key = this.keys[from];
28541
+ const keyPrev = this.keyPrev[from];
28542
+ const keyNext = this.keyNext[from];
28543
+ this.items[to] = element;
28544
+ this.tagIDs[to] = this.tagIDs[from];
28545
+ this.keys[to] = key;
28546
+ this.keyPrev[to] = keyPrev;
28547
+ this.keyNext[to] = keyNext;
28548
+ if (keyPrev !== -1)
28549
+ this.keyNext[keyPrev] = to;
28550
+ if (keyNext === -1)
28551
+ this.keyTops[key] = to;
28552
+ else
28553
+ this.keyPrev[keyNext] = to;
28554
+ if (FORMATTING_TAGS[this.tagIDs[to]])
28555
+ this.formattingSlots.set(element, to);
28556
+ }
28557
+ indexOfTopmost(tagID) {
28558
+ if (this.indexed)
28559
+ return this.keyTops[tagID];
28560
+ for (let i = this.stackTop;i >= 0; i--) {
28561
+ if (this.tagIDs[i] === tagID && this.treeAdapter.getNamespaceURI(this.items[i]) === NS.HTML)
28562
+ return i;
28563
+ }
28564
+ return -1;
28565
+ }
28566
+ indexOfTopmostOf(tagIDs) {
28567
+ if (this.indexed) {
28568
+ let top = -1;
28569
+ for (const tagID of tagIDs) {
28570
+ if (this.keyTops[tagID] > top)
28571
+ top = this.keyTops[tagID];
28572
+ }
28573
+ return top;
28574
+ }
28575
+ for (let i = this.stackTop;i >= 0; i--) {
28576
+ if (tagIDs.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === NS.HTML)
28577
+ return i;
28578
+ }
28579
+ return -1;
28580
+ }
28581
+ indexOfTopmostByName(ns, tagName) {
28582
+ if (this.indexed) {
28583
+ let key = tagKey(ns, getTagID(tagName));
28584
+ if (key === -1)
28585
+ key = this._nameKey(ns, tagName, false);
28586
+ return key === -1 ? -1 : this.keyTops[key];
28587
+ }
28588
+ for (let i = this.stackTop;i >= 0; i--) {
28589
+ const element = this.items[i];
28590
+ if (this.treeAdapter.getTagName(element) === tagName && this.treeAdapter.getNamespaceURI(element) === ns) {
28591
+ return i;
28592
+ }
28593
+ }
28594
+ return -1;
28595
+ }
28596
+ indexOfTopmostHtmlElement() {
28597
+ if (this.indexed)
28598
+ return this.stackTop === -1 ? -1 : this.htmlSlots[this.stackTop];
28599
+ let i = this.stackTop;
28600
+ while (i >= 0 && this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML)
28601
+ i--;
28602
+ return i;
28603
+ }
28604
+ _hasAbove(idx, classes) {
28605
+ for (let i = this.stackTop;i > idx; i--) {
28606
+ const key = tagKey(this.treeAdapter.getNamespaceURI(this.items[i]), this.tagIDs[i]);
28607
+ if (key !== -1 && KEY_CLASSES[key] & classes)
28608
+ return true;
28609
+ }
28610
+ return false;
28611
+ }
28612
+ hasSpecialElementAbove(idx) {
28613
+ return this.indexed ? this.specials[this.stackTop] !== this.specials[idx] : this._hasAbove(idx, SPECIAL);
28614
+ }
28615
+ hasListItemBoundaryAbove(idx) {
28616
+ return this.indexed ? this.listItemBoundaries[this.stackTop] !== this.listItemBoundaries[idx] : this._hasAbove(idx, LIST_ITEM_BOUNDARY);
28617
+ }
27843
28618
  push(element, tagID) {
28619
+ const belowIdx = this.stackTop;
27844
28620
  this.stackTop++;
28621
+ this.depth++;
27845
28622
  this.items[this.stackTop] = element;
27846
28623
  this.current = element;
27847
28624
  this.tagIDs[this.stackTop] = tagID;
27848
28625
  this.currentTagId = tagID;
28626
+ if (this.indexed)
28627
+ this._index(this.stackTop, belowIdx);
28628
+ else if (this.depth === INDEX_DEPTH)
28629
+ this._indexAll();
27849
28630
  if (this._isInTemplate()) {
27850
28631
  this.tmplCount++;
27851
28632
  }
27852
28633
  this.handler.onItemPush(element, tagID, true);
27853
28634
  }
27854
- pop() {
27855
- const popped = this.current;
28635
+ _popCurrent() {
27856
28636
  if (this.tmplCount > 0 && this._isInTemplate()) {
27857
28637
  this.tmplCount--;
27858
28638
  }
27859
- this.stackTop--;
28639
+ if (this.indexed) {
28640
+ this._unindex(this.stackTop);
28641
+ this.stackTop = this.below[this.stackTop];
28642
+ if (this.stackTop !== -1)
28643
+ this.above[this.stackTop] = -1;
28644
+ } else {
28645
+ this.stackTop--;
28646
+ }
28647
+ this.depth--;
27860
28648
  this._updateCurrentElement();
28649
+ }
28650
+ pop() {
28651
+ const popped = this.current;
28652
+ this._popCurrent();
27861
28653
  this.handler.onItemPop(popped, true);
27862
28654
  }
27863
28655
  replace(oldElement, newElement) {
27864
28656
  const idx = this._indexOf(oldElement);
27865
28657
  this.items[idx] = newElement;
28658
+ if (this.indexed && FORMATTING_TAGS[this.tagIDs[idx]]) {
28659
+ this.formattingSlots.delete(oldElement);
28660
+ this.formattingSlots.set(newElement, idx);
28661
+ }
27866
28662
  if (idx === this.stackTop) {
27867
28663
  this.current = newElement;
27868
28664
  }
27869
28665
  }
27870
- insertAfter(referenceElement, newElement, newElementID) {
27871
- const insertionIdx = this._indexOf(referenceElement) + 1;
27872
- this.items.splice(insertionIdx, 0, newElement);
27873
- this.tagIDs.splice(insertionIdx, 0, newElementID);
27874
- this.stackTop++;
27875
- if (insertionIdx === this.stackTop) {
27876
- this._updateCurrentElement();
28666
+ replaceFormattingElement(formattingIdx, furthestBlockIdx, element, tagID) {
28667
+ const formattingElement = this.items[formattingIdx];
28668
+ if (!this.indexed) {
28669
+ this.items.splice(formattingIdx, 1);
28670
+ this.tagIDs.splice(formattingIdx, 1);
28671
+ this.handler.onItemPop(formattingElement, false);
28672
+ this.items.splice(furthestBlockIdx, 0, element);
28673
+ this.tagIDs.splice(furthestBlockIdx, 0, tagID);
28674
+ if (furthestBlockIdx === this.stackTop)
28675
+ this._updateCurrentElement();
28676
+ if (this.current && this.currentTagId !== undefined) {
28677
+ this.handler.onItemPush(this.current, this.currentTagId, furthestBlockIdx === this.stackTop);
28678
+ }
28679
+ return;
27877
28680
  }
28681
+ const key = this.keys[formattingIdx];
28682
+ const belowIdx = this.below[formattingIdx];
28683
+ const aboveIdx = this.above[furthestBlockIdx];
28684
+ const kept = [];
28685
+ for (let i = this.above[formattingIdx];i !== furthestBlockIdx; i = this.above[i])
28686
+ kept.push(i);
28687
+ const keyNext = this.keyNext[formattingIdx];
28688
+ this._unindex(formattingIdx);
28689
+ this.items[formattingIdx] = undefined;
28690
+ this.handler.onItemPop(formattingElement, false);
28691
+ let free = furthestBlockIdx - 1;
28692
+ while (kept.length > 0 && kept[kept.length - 1] === free) {
28693
+ kept.pop();
28694
+ free--;
28695
+ }
28696
+ for (let i = free + 1;i <= furthestBlockIdx; i++)
28697
+ this._move(i, i - 1);
28698
+ const keyPrev = keyNext === -1 ? this.keyTops[key] : this.keyPrev[keyNext];
28699
+ this.items[furthestBlockIdx] = element;
28700
+ this.tagIDs[furthestBlockIdx] = tagID;
28701
+ this.keys[furthestBlockIdx] = key;
28702
+ this.keyPrev[furthestBlockIdx] = keyPrev;
28703
+ this.keyNext[furthestBlockIdx] = keyNext;
28704
+ if (keyPrev !== -1)
28705
+ this.keyNext[keyPrev] = furthestBlockIdx;
28706
+ if (keyNext === -1)
28707
+ this.keyTops[key] = furthestBlockIdx;
28708
+ else
28709
+ this.keyPrev[keyNext] = furthestBlockIdx;
28710
+ if (FORMATTING_TAGS[tagID])
28711
+ this.formattingSlots.set(element, furthestBlockIdx);
28712
+ let prev = belowIdx;
28713
+ for (const i of kept) {
28714
+ this._link(i, prev, true);
28715
+ prev = i;
28716
+ }
28717
+ for (let i = free;i < furthestBlockIdx; i++) {
28718
+ this._link(i, prev, true);
28719
+ prev = i;
28720
+ }
28721
+ this._link(furthestBlockIdx, prev, true);
28722
+ if (aboveIdx === -1)
28723
+ this._updateCurrentElement();
27878
28724
  if (this.current && this.currentTagId !== undefined) {
27879
- this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);
28725
+ this.handler.onItemPush(this.current, this.currentTagId, aboveIdx === -1);
27880
28726
  }
27881
28727
  }
27882
28728
  popUntilTagNamePopped(tagName) {
27883
- let targetIdx = this.stackTop + 1;
27884
- do {
27885
- targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);
27886
- } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);
27887
- this.shortenToLength(Math.max(targetIdx, 0));
28729
+ this.shortenToLength(Math.max(this.indexOfTopmost(tagName), 0));
27888
28730
  }
27889
28731
  shortenToLength(idx) {
27890
28732
  while (this.stackTop >= idx) {
27891
28733
  const popped = this.current;
27892
- if (this.tmplCount > 0 && this._isInTemplate()) {
27893
- this.tmplCount -= 1;
27894
- }
27895
- this.stackTop--;
27896
- this._updateCurrentElement();
28734
+ this._popCurrent();
27897
28735
  this.handler.onItemPop(popped, this.stackTop < idx);
27898
28736
  }
27899
28737
  }
@@ -27901,54 +28739,64 @@ class OpenElementStack {
27901
28739
  const idx = this._indexOf(element);
27902
28740
  this.shortenToLength(Math.max(idx, 0));
27903
28741
  }
27904
- popUntilPopped(tagNames, targetNS) {
27905
- const idx = this._indexOfTagNames(tagNames, targetNS);
27906
- this.shortenToLength(Math.max(idx, 0));
27907
- }
27908
28742
  popUntilNumberedHeaderPopped() {
27909
- this.popUntilPopped(NUMBERED_HEADERS, NS.HTML);
28743
+ this.shortenToLength(Math.max(this.indexOfTopmostOf(NUMBERED_HEADERS2), 0));
27910
28744
  }
27911
28745
  popUntilTableCellPopped() {
27912
- this.popUntilPopped(TABLE_CELLS, NS.HTML);
28746
+ this.shortenToLength(Math.max(this.indexOfTopmostOf(TABLE_CELLS), 0));
27913
28747
  }
27914
28748
  popAllUpToHtmlElement() {
27915
28749
  this.tmplCount = 0;
27916
28750
  this.shortenToLength(1);
27917
28751
  }
27918
- _indexOfTagNames(tagNames, namespace) {
27919
- for (let i = this.stackTop;i >= 0; i--) {
27920
- if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {
27921
- return i;
27922
- }
27923
- }
27924
- return -1;
27925
- }
27926
- clearBackTo(tagNames, targetNS) {
27927
- const idx = this._indexOfTagNames(tagNames, targetNS);
27928
- this.shortenToLength(idx + 1);
27929
- }
27930
28752
  clearBackToTableContext() {
27931
- this.clearBackTo(TABLE_CONTEXT, NS.HTML);
28753
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_CONTEXT) + 1);
27932
28754
  }
27933
28755
  clearBackToTableBodyContext() {
27934
- this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);
28756
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_BODY_CONTEXT) + 1);
27935
28757
  }
27936
28758
  clearBackToTableRowContext() {
27937
- this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);
28759
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_ROW_CONTEXT) + 1);
27938
28760
  }
27939
28761
  remove(element) {
27940
28762
  const idx = this._indexOf(element);
27941
- if (idx >= 0) {
27942
- if (idx === this.stackTop) {
27943
- this.pop();
27944
- } else {
27945
- this.items.splice(idx, 1);
27946
- this.tagIDs.splice(idx, 1);
27947
- this.stackTop--;
27948
- this._updateCurrentElement();
27949
- this.handler.onItemPop(element, false);
28763
+ if (idx !== -1)
28764
+ this.removeAt(idx);
28765
+ }
28766
+ removeAt(idx) {
28767
+ if (idx === this.stackTop) {
28768
+ this.pop();
28769
+ return;
28770
+ }
28771
+ const element = this.items[idx];
28772
+ this.depth--;
28773
+ if (this.indexed) {
28774
+ const classes = this.keys[idx] < NAME_KEYS ? KEY_CLASSES[this.keys[idx]] : 0;
28775
+ const belowIdx = this.below[idx];
28776
+ const aboveIdx = this.above[idx];
28777
+ this._unindex(idx);
28778
+ this.items[idx] = undefined;
28779
+ this.below[aboveIdx] = belowIdx;
28780
+ if (belowIdx !== -1)
28781
+ this.above[belowIdx] = aboveIdx;
28782
+ if (classes !== 0) {
28783
+ for (let i = aboveIdx;i !== -1; i = this.above[i]) {
28784
+ this.specials[i] -= classes & SPECIAL;
28785
+ this.listItemBoundaries[i] -= (classes & LIST_ITEM_BOUNDARY) >> 1;
28786
+ this.scopeBoundaries[i] -= (classes & SCOPE) >> 2;
28787
+ }
28788
+ }
28789
+ const html = belowIdx === -1 ? -1 : this.htmlSlots[belowIdx];
28790
+ for (let i = aboveIdx;i !== -1 && this.htmlSlots[i] === idx; i = this.above[i]) {
28791
+ this.htmlSlots[i] = html;
27950
28792
  }
28793
+ } else {
28794
+ this.items.splice(idx, 1);
28795
+ this.tagIDs.splice(idx, 1);
28796
+ this.stackTop--;
28797
+ this._updateCurrentElement();
27951
28798
  }
28799
+ this.handler.onItemPop(element, false);
27952
28800
  }
27953
28801
  tryPeekProperlyNestedBodyElement() {
27954
28802
  return this.stackTop >= 1 && this.tagIDs[1] === TAG_ID.BODY ? this.items[1] : null;
@@ -27957,109 +28805,66 @@ class OpenElementStack {
27957
28805
  return this._indexOf(element) > -1;
27958
28806
  }
27959
28807
  getCommonAncestor(element) {
27960
- const elementIdx = this._indexOf(element) - 1;
27961
- return elementIdx >= 0 ? this.items[elementIdx] : null;
28808
+ const idx = this._indexOf(element);
28809
+ const belowIdx = idx === -1 ? -1 : this.slotBelow(idx);
28810
+ return belowIdx === -1 ? null : this.items[belowIdx];
27962
28811
  }
27963
28812
  isRootHtmlElementCurrent() {
27964
28813
  return this.stackTop === 0 && this.tagIDs[0] === TAG_ID.HTML;
27965
28814
  }
27966
- hasInDynamicScope(tagName, htmlScope) {
27967
- for (let i = this.stackTop;i >= 0; i--) {
27968
- const tn = this.tagIDs[i];
27969
- switch (this.treeAdapter.getNamespaceURI(this.items[i])) {
27970
- case NS.HTML: {
27971
- if (tn === tagName)
27972
- return true;
27973
- if (htmlScope.has(tn))
27974
- return false;
27975
- break;
27976
- }
27977
- case NS.SVG: {
27978
- if (SCOPING_ELEMENTS_SVG.has(tn))
27979
- return false;
27980
- break;
27981
- }
27982
- case NS.MATHML: {
27983
- if (SCOPING_ELEMENTS_MATHML.has(tn))
27984
- return false;
27985
- break;
27986
- }
28815
+ _isInScope(target, scope) {
28816
+ let boundary = -1;
28817
+ switch (scope) {
28818
+ case LIST_ITEM_SCOPE: {
28819
+ boundary = Math.max(this.keyTops[TAG_ID.OL], this.keyTops[TAG_ID.UL]);
28820
+ break;
28821
+ }
28822
+ case BUTTON_SCOPE: {
28823
+ boundary = this.keyTops[TAG_ID.BUTTON];
28824
+ break;
28825
+ }
28826
+ case TABLE_SCOPE: {
28827
+ boundary = Math.max(this.keyTops[TAG_ID.TABLE], this.keyTops[TAG_ID.HTML]);
28828
+ return target === -1 ? boundary === -1 : target >= boundary;
27987
28829
  }
28830
+ default:
28831
+ }
28832
+ return target === -1 ? boundary === -1 && (this.stackTop === -1 || this.scopeBoundaries[this.stackTop] === 0) : target >= boundary && this.scopeBoundaries[this.stackTop] === this.scopeBoundaries[target];
28833
+ }
28834
+ _scanScope(tagID, tagIDs, scope, element) {
28835
+ for (let i = this.stackTop;i >= 0; i--) {
28836
+ const key = tagKey(this.treeAdapter.getNamespaceURI(this.items[i]), this.tagIDs[i]);
28837
+ if (key === -1)
28838
+ continue;
28839
+ if ((tagIDs ? tagIDs.includes(key) : key === tagID) && (!element || this.items[i] === element))
28840
+ return true;
28841
+ if (KEY_CLASSES[key] & scope)
28842
+ return false;
27988
28843
  }
27989
28844
  return true;
27990
28845
  }
27991
- hasInScope(tagName) {
27992
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML);
28846
+ hasInScope(tagName, element) {
28847
+ if (!this.indexed)
28848
+ return this._scanScope(tagName, null, SCOPE, element);
28849
+ return this._isInScope(element ? this._indexOf(element) : this.keyTops[tagName], SCOPE);
27993
28850
  }
27994
28851
  hasInListItemScope(tagName) {
27995
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_LIST);
28852
+ return this.indexed ? this._isInScope(this.keyTops[tagName], LIST_ITEM_SCOPE) : this._scanScope(tagName, null, LIST_ITEM_SCOPE);
27996
28853
  }
27997
28854
  hasInButtonScope(tagName) {
27998
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_BUTTON);
28855
+ return this.indexed ? this._isInScope(this.keyTops[tagName], BUTTON_SCOPE) : this._scanScope(tagName, null, BUTTON_SCOPE);
27999
28856
  }
28000
28857
  hasNumberedHeaderInScope() {
28001
- for (let i = this.stackTop;i >= 0; i--) {
28002
- const tn = this.tagIDs[i];
28003
- switch (this.treeAdapter.getNamespaceURI(this.items[i])) {
28004
- case NS.HTML: {
28005
- if (NUMBERED_HEADERS.has(tn))
28006
- return true;
28007
- if (SCOPING_ELEMENTS_HTML.has(tn))
28008
- return false;
28009
- break;
28010
- }
28011
- case NS.SVG: {
28012
- if (SCOPING_ELEMENTS_SVG.has(tn))
28013
- return false;
28014
- break;
28015
- }
28016
- case NS.MATHML: {
28017
- if (SCOPING_ELEMENTS_MATHML.has(tn))
28018
- return false;
28019
- break;
28020
- }
28021
- }
28022
- }
28023
- return true;
28858
+ return this.indexed ? this._isInScope(this.indexOfTopmostOf(NUMBERED_HEADERS2), SCOPE) : this._scanScope(TAG_ID.UNKNOWN, NUMBERED_HEADERS2, SCOPE);
28024
28859
  }
28025
28860
  hasInTableScope(tagName) {
28026
- for (let i = this.stackTop;i >= 0; i--) {
28027
- if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
28028
- continue;
28029
- }
28030
- switch (this.tagIDs[i]) {
28031
- case tagName: {
28032
- return true;
28033
- }
28034
- case TAG_ID.TABLE:
28035
- case TAG_ID.HTML: {
28036
- return false;
28037
- }
28038
- }
28039
- }
28040
- return true;
28861
+ return this.indexed ? this._isInScope(this.keyTops[tagName], TABLE_SCOPE) : this._scanScope(tagName, null, TABLE_SCOPE);
28041
28862
  }
28042
28863
  hasTableBodyContextInTableScope() {
28043
- for (let i = this.stackTop;i >= 0; i--) {
28044
- if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
28045
- continue;
28046
- }
28047
- switch (this.tagIDs[i]) {
28048
- case TAG_ID.TBODY:
28049
- case TAG_ID.THEAD:
28050
- case TAG_ID.TFOOT: {
28051
- return true;
28052
- }
28053
- case TAG_ID.TABLE:
28054
- case TAG_ID.HTML: {
28055
- return false;
28056
- }
28057
- }
28058
- }
28059
- return true;
28864
+ return this.indexed ? this._isInScope(this.indexOfTopmostOf(TABLE_BODIES), TABLE_SCOPE) : this._scanScope(TAG_ID.UNKNOWN, TABLE_BODIES, TABLE_SCOPE);
28060
28865
  }
28061
28866
  hasInSelectScope(tagName) {
28062
- for (let i = this.stackTop;i >= 0; i--) {
28867
+ for (let i = this.stackTop;i >= 0; i = this.slotBelow(i)) {
28063
28868
  if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
28064
28869
  continue;
28065
28870
  }
@@ -28079,22 +28884,22 @@ class OpenElementStack {
28079
28884
  return true;
28080
28885
  }
28081
28886
  generateImpliedEndTags() {
28082
- while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {
28887
+ while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
28083
28888
  this.pop();
28084
28889
  }
28085
28890
  }
28086
28891
  generateImpliedEndTagsThoroughly() {
28087
- while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
28892
+ while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
28088
28893
  this.pop();
28089
28894
  }
28090
28895
  }
28091
28896
  generateImpliedEndTagsWithExclusion(exclusionId) {
28092
- while (this.currentTagId !== undefined && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
28897
+ while (this.currentTagId !== undefined && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
28093
28898
  this.pop();
28094
28899
  }
28095
28900
  }
28096
28901
  }
28097
- var IMPLICIT_END_TAG_REQUIRED, IMPLICIT_END_TAG_REQUIRED_THOROUGHLY, SCOPING_ELEMENTS_HTML, SCOPING_ELEMENTS_HTML_LIST, SCOPING_ELEMENTS_HTML_BUTTON, SCOPING_ELEMENTS_MATHML, SCOPING_ELEMENTS_SVG, TABLE_ROW_CONTEXT, TABLE_BODY_CONTEXT, TABLE_CONTEXT, TABLE_CELLS;
28902
+ var IMPLICIT_END_TAG_REQUIRED, IMPLICIT_END_TAG_REQUIRED_THOROUGHLY, INDEX_DEPTH = 64, SVG_KEYS = 256, MATHML_KEYS = 512, NAME_KEYS = 768, NUMBERED_HEADERS2, TABLE_BODIES, TABLE_ROW_CONTEXT, TABLE_BODY_CONTEXT, TABLE_CONTEXT, TABLE_CELLS, SPECIAL = 1, LIST_ITEM_BOUNDARY = 2, SCOPE = 4, LIST_ITEM_SCOPE = 8, BUTTON_SCOPE = 16, TABLE_SCOPE = 32, KEY_CLASSES, FORMATTING_TAGS;
28098
28903
  var init_open_element_stack = __esm(() => {
28099
28904
  init_html3();
28100
28905
  IMPLICIT_END_TAG_REQUIRED = new Set([TAG_ID.DD, TAG_ID.DT, TAG_ID.LI, TAG_ID.OPTGROUP, TAG_ID.OPTION, TAG_ID.P, TAG_ID.RB, TAG_ID.RP, TAG_ID.RT, TAG_ID.RTC]);
@@ -28109,7 +28914,23 @@ var init_open_element_stack = __esm(() => {
28109
28914
  TAG_ID.THEAD,
28110
28915
  TAG_ID.TR
28111
28916
  ]);
28112
- SCOPING_ELEMENTS_HTML = new Set([
28917
+ NUMBERED_HEADERS2 = [TAG_ID.H1, TAG_ID.H2, TAG_ID.H3, TAG_ID.H4, TAG_ID.H5, TAG_ID.H6];
28918
+ TABLE_BODIES = [TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD];
28919
+ TABLE_ROW_CONTEXT = [TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML];
28920
+ TABLE_BODY_CONTEXT = [...TABLE_BODIES, TAG_ID.TEMPLATE, TAG_ID.HTML];
28921
+ TABLE_CONTEXT = [TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML];
28922
+ TABLE_CELLS = [TAG_ID.TD, TAG_ID.TH];
28923
+ KEY_CLASSES = new Uint8Array(NAME_KEYS);
28924
+ for (const [ns, offset] of [
28925
+ [NS.HTML, 0],
28926
+ [NS.SVG, SVG_KEYS],
28927
+ [NS.MATHML, MATHML_KEYS]
28928
+ ]) {
28929
+ for (const tn of SPECIAL_ELEMENTS[ns]) {
28930
+ KEY_CLASSES[offset + tn] = ns === NS.HTML && (tn === TAG_ID.ADDRESS || tn === TAG_ID.DIV || tn === TAG_ID.P) ? SPECIAL : SPECIAL | LIST_ITEM_BOUNDARY;
28931
+ }
28932
+ }
28933
+ for (const key of [
28113
28934
  TAG_ID.APPLET,
28114
28935
  TAG_ID.CAPTION,
28115
28936
  TAG_ID.HTML,
@@ -28118,118 +28939,207 @@ var init_open_element_stack = __esm(() => {
28118
28939
  TAG_ID.TABLE,
28119
28940
  TAG_ID.TD,
28120
28941
  TAG_ID.TEMPLATE,
28121
- TAG_ID.TH
28122
- ]);
28123
- SCOPING_ELEMENTS_HTML_LIST = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.OL, TAG_ID.UL]);
28124
- SCOPING_ELEMENTS_HTML_BUTTON = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.BUTTON]);
28125
- SCOPING_ELEMENTS_MATHML = new Set([TAG_ID.ANNOTATION_XML, TAG_ID.MI, TAG_ID.MN, TAG_ID.MO, TAG_ID.MS, TAG_ID.MTEXT]);
28126
- SCOPING_ELEMENTS_SVG = new Set([TAG_ID.DESC, TAG_ID.FOREIGN_OBJECT, TAG_ID.TITLE]);
28127
- TABLE_ROW_CONTEXT = new Set([TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML]);
28128
- TABLE_BODY_CONTEXT = new Set([TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TEMPLATE, TAG_ID.HTML]);
28129
- TABLE_CONTEXT = new Set([TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML]);
28130
- TABLE_CELLS = new Set([TAG_ID.TD, TAG_ID.TH]);
28942
+ TAG_ID.TH,
28943
+ SVG_KEYS + TAG_ID.DESC,
28944
+ SVG_KEYS + TAG_ID.FOREIGN_OBJECT,
28945
+ SVG_KEYS + TAG_ID.TITLE,
28946
+ MATHML_KEYS + TAG_ID.ANNOTATION_XML,
28947
+ MATHML_KEYS + TAG_ID.MI,
28948
+ MATHML_KEYS + TAG_ID.MN,
28949
+ MATHML_KEYS + TAG_ID.MO,
28950
+ MATHML_KEYS + TAG_ID.MS,
28951
+ MATHML_KEYS + TAG_ID.MTEXT
28952
+ ]) {
28953
+ KEY_CLASSES[key] |= SCOPE | LIST_ITEM_SCOPE | BUTTON_SCOPE;
28954
+ }
28955
+ KEY_CLASSES[TAG_ID.OL] |= LIST_ITEM_SCOPE;
28956
+ KEY_CLASSES[TAG_ID.UL] |= LIST_ITEM_SCOPE;
28957
+ KEY_CLASSES[TAG_ID.BUTTON] |= BUTTON_SCOPE;
28958
+ KEY_CLASSES[TAG_ID.TABLE] |= TABLE_SCOPE;
28959
+ KEY_CLASSES[TAG_ID.HTML] |= TABLE_SCOPE;
28960
+ FORMATTING_TAGS = new Uint8Array(NAME_KEYS);
28961
+ for (const tn of [TAG_ID.A, TAG_ID.B, TAG_ID.BIG, TAG_ID.CODE, TAG_ID.EM, TAG_ID.FONT, TAG_ID.I, TAG_ID.NOBR, TAG_ID.S, TAG_ID.SMALL, TAG_ID.STRIKE, TAG_ID.STRONG, TAG_ID.TT, TAG_ID.U]) {
28962
+ FORMATTING_TAGS[tn] = 1;
28963
+ }
28131
28964
  });
28132
28965
 
28133
28966
  // ../../node_modules/parse5/dist/parser/formatting-element-list.js
28134
28967
  class FormattingElementList {
28135
- constructor(treeAdapter) {
28136
- this.treeAdapter = treeAdapter;
28137
- this.entries = [];
28968
+ constructor() {
28969
+ this.newest = null;
28138
28970
  this.bookmark = null;
28971
+ this.index = null;
28972
+ this.elementEntries = new Map;
28139
28973
  }
28140
- _getNoahArkConditionCandidates(newElement, neAttrs) {
28141
- const candidates = [];
28142
- const neAttrsLength = neAttrs.length;
28143
- const neTagName = this.treeAdapter.getTagName(newElement);
28144
- const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);
28145
- for (let i = 0;i < this.entries.length; i++) {
28146
- const entry = this.entries[i];
28147
- if (entry.type === EntryType.Marker) {
28148
- break;
28149
- }
28150
- const { element } = entry;
28151
- if (this.treeAdapter.getTagName(element) === neTagName && this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) {
28152
- const elementAttrs = this.treeAdapter.getAttrList(element);
28153
- if (elementAttrs.length === neAttrsLength) {
28154
- candidates.push({ idx: i, attrs: elementAttrs });
28155
- }
28156
- }
28974
+ _insertElementEntry(element, token, older) {
28975
+ const newer = older === null ? null : older.newer;
28976
+ const entry = {
28977
+ type: EntryType.Element,
28978
+ element,
28979
+ token,
28980
+ older,
28981
+ newer,
28982
+ ark: null,
28983
+ olderSameTag: null,
28984
+ newerSameTag: null
28985
+ };
28986
+ if (newer === null) {
28987
+ this.newest = entry;
28988
+ } else {
28989
+ newer.older = entry;
28990
+ }
28991
+ if (older !== null) {
28992
+ older.newer = entry;
28157
28993
  }
28158
- return candidates;
28994
+ return this.index === null ? null : this._addToIndex(this.index, entry);
28159
28995
  }
28160
- _ensureNoahArkCondition(newElement) {
28161
- if (this.entries.length < NOAH_ARK_CAPACITY)
28162
- return;
28163
- const neAttrs = this.treeAdapter.getAttrList(newElement);
28164
- const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);
28165
- if (candidates.length < NOAH_ARK_CAPACITY)
28166
- return;
28167
- const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));
28168
- let validCandidates = 0;
28169
- for (let i = 0;i < candidates.length; i++) {
28170
- const candidate = candidates[i];
28171
- if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {
28172
- validCandidates += 1;
28173
- if (validCandidates >= NOAH_ARK_CAPACITY) {
28174
- this.entries.splice(candidate.idx, 1);
28175
- }
28176
- }
28996
+ _addToIndex(index, entry) {
28997
+ const { tagName, attrs } = entry.token;
28998
+ const key = tagName + attrs.map(({ name, value }) => `\x00${name}\x00${value}`).sort().join("");
28999
+ let ark = index.arks.get(key);
29000
+ if (ark === undefined) {
29001
+ ark = { entries: [], key };
29002
+ index.arks.set(key, ark);
28177
29003
  }
29004
+ ark.entries.push(entry);
29005
+ entry.ark = ark;
29006
+ this.elementEntries.set(entry.element, entry);
29007
+ let head = index.tagNames.get(tagName);
29008
+ if (head === undefined) {
29009
+ head = { olderSameTag: null };
29010
+ index.tagNames.set(tagName, head);
29011
+ }
29012
+ entry.olderSameTag = head.olderSameTag;
29013
+ entry.newerSameTag = head;
29014
+ if (head.olderSameTag !== null) {
29015
+ head.olderSameTag.newerSameTag = entry;
29016
+ }
29017
+ head.olderSameTag = entry;
29018
+ return ark;
28178
29019
  }
28179
29020
  insertMarker() {
28180
- this.entries.unshift(MARKER);
29021
+ if (this.index === null) {
29022
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
29023
+ this.elementEntries.set(entry.element, entry);
29024
+ }
29025
+ }
29026
+ const marker = {
29027
+ type: EntryType.Marker,
29028
+ older: this.newest,
29029
+ newer: null,
29030
+ outerIndex: this.index
29031
+ };
29032
+ if (this.newest !== null) {
29033
+ this.newest.newer = marker;
29034
+ }
29035
+ this.newest = marker;
29036
+ this.index = null;
28181
29037
  }
28182
29038
  pushElement(element, token) {
28183
- this._ensureNoahArkCondition(element);
28184
- this.entries.unshift({
28185
- type: EntryType.Element,
28186
- element,
28187
- token
28188
- });
29039
+ if (this.index === null) {
29040
+ let oldest = null;
29041
+ let count = 0;
29042
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
29043
+ oldest = entry;
29044
+ count++;
29045
+ }
29046
+ if (count >= NOAH_ARK_CAPACITY) {
29047
+ this.index = { arks: new Map, tagNames: new Map };
29048
+ for (let entry = oldest;entry !== null && entry.type === EntryType.Element; entry = entry.newer) {
29049
+ this._addToIndex(this.index, entry);
29050
+ }
29051
+ }
29052
+ }
29053
+ const ark = this._insertElementEntry(element, token, this.newest);
29054
+ if (ark !== null && ark.entries.length > NOAH_ARK_CAPACITY) {
29055
+ this.removeEntry(ark.entries[0]);
29056
+ }
28189
29057
  }
28190
29058
  insertElementAfterBookmark(element, token) {
28191
- const bookmarkIdx = this.entries.indexOf(this.bookmark);
28192
- this.entries.splice(bookmarkIdx, 0, {
28193
- type: EntryType.Element,
28194
- element,
28195
- token
28196
- });
29059
+ const { bookmark } = this;
29060
+ this.bookmark = null;
29061
+ this._insertElementEntry(element, token, bookmark);
28197
29062
  }
28198
29063
  removeEntry(entry) {
28199
- const entryIndex = this.entries.indexOf(entry);
28200
- if (entryIndex !== -1) {
28201
- this.entries.splice(entryIndex, 1);
29064
+ var _a;
29065
+ if (entry.newer === null ? this.newest !== entry : entry.newer.older !== entry) {
29066
+ return;
29067
+ }
29068
+ this.elementEntries.delete(entry.element);
29069
+ if (entry.newer === null) {
29070
+ this.newest = entry.older;
29071
+ } else {
29072
+ entry.newer.older = entry.older;
29073
+ }
29074
+ if (entry.older !== null) {
29075
+ entry.older.newer = entry.newer;
29076
+ }
29077
+ if (entry.ark !== null) {
29078
+ const { entries, key } = entry.ark;
29079
+ entries.splice(entries.indexOf(entry), 1);
29080
+ if (entries.length === 0)
29081
+ (_a = this.index) === null || _a === undefined || _a.arks.delete(key);
29082
+ }
29083
+ if (entry.newerSameTag !== null) {
29084
+ entry.newerSameTag.olderSameTag = entry.olderSameTag;
29085
+ if (entry.olderSameTag !== null) {
29086
+ entry.olderSameTag.newerSameTag = entry.newerSameTag;
29087
+ }
28202
29088
  }
28203
29089
  }
29090
+ replaceElement(entry, element) {
29091
+ if (this.elementEntries.delete(entry.element)) {
29092
+ this.elementEntries.set(element, entry);
29093
+ }
29094
+ entry.element = element;
29095
+ }
28204
29096
  clearToLastMarker() {
28205
- const markerIdx = this.entries.indexOf(MARKER);
28206
- if (markerIdx === -1) {
28207
- this.entries.length = 0;
28208
- } else {
28209
- this.entries.splice(0, markerIdx + 1);
29097
+ let marker = this.newest;
29098
+ for (;marker !== null && marker.type === EntryType.Element; marker = marker.older) {
29099
+ this.elementEntries.delete(marker.element);
29100
+ }
29101
+ this.newest = marker === null ? null : marker.older;
29102
+ this.index = marker === null ? null : marker.outerIndex;
29103
+ if (this.newest !== null) {
29104
+ this.newest.newer = null;
28210
29105
  }
28211
29106
  }
28212
29107
  getElementEntryInScopeWithTagName(tagName) {
28213
- const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName);
28214
- return entry && entry.type === EntryType.Element ? entry : null;
29108
+ var _a, _b;
29109
+ if (this.index !== null) {
29110
+ return (_b = (_a = this.index.tagNames.get(tagName)) === null || _a === undefined ? undefined : _a.olderSameTag) !== null && _b !== undefined ? _b : null;
29111
+ }
29112
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
29113
+ if (entry.token.tagName === tagName) {
29114
+ return entry;
29115
+ }
29116
+ }
29117
+ return null;
28215
29118
  }
28216
29119
  getElementEntry(element) {
28217
- return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element);
29120
+ if (this.index === null) {
29121
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
29122
+ if (entry.element === element) {
29123
+ return entry;
29124
+ }
29125
+ }
29126
+ }
29127
+ return this.elementEntries.get(element);
28218
29128
  }
28219
29129
  }
28220
- var NOAH_ARK_CAPACITY = 3, EntryType, MARKER;
29130
+ var NOAH_ARK_CAPACITY = 3, EntryType;
28221
29131
  var init_formatting_element_list = __esm(() => {
28222
29132
  (function(EntryType) {
28223
29133
  EntryType[EntryType["Marker"] = 0] = "Marker";
28224
29134
  EntryType[EntryType["Element"] = 1] = "Element";
28225
29135
  })(EntryType || (EntryType = {}));
28226
- MARKER = { type: EntryType.Marker };
28227
29136
  });
28228
29137
 
28229
29138
  // ../../node_modules/parse5/dist/tree-adapters/default.js
28230
- var defaultTreeAdapter;
29139
+ var attrListIndexes, defaultTreeAdapter;
28231
29140
  var init_default2 = __esm(() => {
28232
29141
  init_html3();
29142
+ attrListIndexes = new WeakMap;
28233
29143
  defaultTreeAdapter = {
28234
29144
  createDocument() {
28235
29145
  return {
@@ -28273,8 +29183,9 @@ var init_default2 = __esm(() => {
28273
29183
  newNode.parentNode = parentNode;
28274
29184
  },
28275
29185
  insertBefore(parentNode, newNode, referenceNode) {
28276
- const insertionIdx = parentNode.childNodes.indexOf(referenceNode);
28277
- parentNode.childNodes.splice(insertionIdx, 0, newNode);
29186
+ const { childNodes } = parentNode;
29187
+ const insertionIdx = childNodes[childNodes.length - 1] === referenceNode ? childNodes.length - 1 : childNodes.indexOf(referenceNode);
29188
+ childNodes.splice(insertionIdx, 0, newNode);
28278
29189
  newNode.parentNode = parentNode;
28279
29190
  },
28280
29191
  setTemplateContent(templateElement, contentElement) {
@@ -28308,8 +29219,9 @@ var init_default2 = __esm(() => {
28308
29219
  },
28309
29220
  detachNode(node) {
28310
29221
  if (node.parentNode) {
28311
- const idx = node.parentNode.childNodes.indexOf(node);
28312
- node.parentNode.childNodes.splice(idx, 1);
29222
+ const { childNodes } = node.parentNode;
29223
+ const idx = childNodes[childNodes.length - 1] === node ? childNodes.length - 1 : childNodes.indexOf(node);
29224
+ childNodes.splice(idx, 1);
28313
29225
  node.parentNode = null;
28314
29226
  }
28315
29227
  },
@@ -28324,7 +29236,9 @@ var init_default2 = __esm(() => {
28324
29236
  defaultTreeAdapter.appendChild(parentNode, defaultTreeAdapter.createTextNode(text));
28325
29237
  },
28326
29238
  insertTextBefore(parentNode, text, referenceNode) {
28327
- const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
29239
+ const { childNodes } = parentNode;
29240
+ const referenceIdx = childNodes[childNodes.length - 1] === referenceNode ? childNodes.length - 1 : childNodes.indexOf(referenceNode);
29241
+ const prevNode = childNodes[referenceIdx - 1];
28328
29242
  if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {
28329
29243
  prevNode.value += text;
28330
29244
  } else {
@@ -28332,12 +29246,35 @@ var init_default2 = __esm(() => {
28332
29246
  }
28333
29247
  },
28334
29248
  adoptAttributes(recipient, attrs) {
28335
- const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));
29249
+ if (attrs.length === 0 || attrs === recipient.attrs)
29250
+ return;
29251
+ const cached = attrListIndexes.get(recipient.attrs);
29252
+ const isIndexed = (cached === null || cached === undefined ? undefined : cached.size) === recipient.attrs.length && attrs.every(({ name }) => {
29253
+ var _a;
29254
+ const index = cached.get(name);
29255
+ return index === undefined || ((_a = recipient.attrs[index]) === null || _a === undefined ? undefined : _a.name) === name;
29256
+ });
29257
+ const recipientAttrsMap = isIndexed ? cached : new Map;
29258
+ if (!isIndexed) {
29259
+ for (let i = 0;i < recipient.attrs.length; i++) {
29260
+ const attr = recipient.attrs[i];
29261
+ if (attr !== undefined)
29262
+ recipientAttrsMap.set(attr.name, i);
29263
+ }
29264
+ attrListIndexes.set(recipient.attrs, recipientAttrsMap);
29265
+ }
29266
+ const adoptedFrom = recipient.attrs.length;
28336
29267
  for (let j = 0;j < attrs.length; j++) {
28337
29268
  if (!recipientAttrsMap.has(attrs[j].name)) {
28338
29269
  recipient.attrs.push(attrs[j]);
28339
29270
  }
28340
29271
  }
29272
+ for (let j = adoptedFrom;j < recipient.attrs.length; j++) {
29273
+ recipientAttrsMap.set(recipient.attrs[j].name, j);
29274
+ }
29275
+ if (recipientAttrsMap.size !== recipient.attrs.length) {
29276
+ attrListIndexes.delete(recipient.attrs);
29277
+ }
28341
29278
  },
28342
29279
  getFirstChild(node) {
28343
29280
  return node.childNodes[0];
@@ -28757,7 +29694,7 @@ class Parser {
28757
29694
  }
28758
29695
  this.document = document2 !== null && document2 !== undefined ? document2 : this.treeAdapter.createDocument();
28759
29696
  this.tokenizer = new Tokenizer(this.options, this);
28760
- this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
29697
+ this.activeFormattingElements = new FormattingElementList;
28761
29698
  this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;
28762
29699
  this._setContextModes(fragmentContext !== null && fragmentContext !== undefined ? fragmentContext : this.document, this.fragmentContextID);
28763
29700
  this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);
@@ -28776,7 +29713,7 @@ class Parser {
28776
29713
  const documentMock = opts.treeAdapter.createElement("documentmock", NS.HTML, []);
28777
29714
  const parser = new this(opts, documentMock, fragmentContext);
28778
29715
  if (parser.fragmentContextID === TAG_ID.TEMPLATE) {
28779
- parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
29716
+ parser.tmplInsertionModeStack.push(InsertionMode.IN_TEMPLATE);
28780
29717
  }
28781
29718
  parser._initTokenizerForFragmentParsing();
28782
29719
  parser._insertFakeRootElement();
@@ -28813,11 +29750,12 @@ class Parser {
28813
29750
  this._setContextModes(node, tid);
28814
29751
  }
28815
29752
  onItemPop(node, isTop) {
28816
- var _a, _b;
29753
+ var _a, _b, _c;
28817
29754
  if (this.options.sourceCodeLocationInfo) {
28818
29755
  this._setEndLocation(node, this.currentToken);
28819
29756
  }
28820
29757
  (_b = (_a = this.treeAdapter).onItemPop) === null || _b === undefined || _b.call(_a, node, this.openElements.current);
29758
+ (_c = this.annotationXmlIntegrationPoints) === null || _c === undefined || _c.delete(node);
28821
29759
  if (isTop) {
28822
29760
  let current;
28823
29761
  let currentTagId;
@@ -28852,7 +29790,7 @@ class Parser {
28852
29790
  _findFormInFragmentContext() {
28853
29791
  let node = this.fragmentContext;
28854
29792
  while (node) {
28855
- if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM) {
29793
+ if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM && this.treeAdapter.getNamespaceURI(node) === NS.HTML) {
28856
29794
  this.formElement = node;
28857
29795
  break;
28858
29796
  }
@@ -28902,7 +29840,7 @@ class Parser {
28902
29840
  }
28903
29841
  }
28904
29842
  }
28905
- _attachElementToTree(element, location) {
29843
+ _attachElementToTree(element, location, insertionLocation) {
28906
29844
  if (this.options.sourceCodeLocationInfo) {
28907
29845
  const loc = location && {
28908
29846
  ...location,
@@ -28910,41 +29848,64 @@ class Parser {
28910
29848
  };
28911
29849
  this.treeAdapter.setNodeSourceCodeLocation(element, loc);
28912
29850
  }
28913
- if (this._shouldFosterParentOnInsertion()) {
28914
- this._fosterParentElement(element);
29851
+ if (insertionLocation.beforeElement) {
29852
+ this.treeAdapter.insertBefore(insertionLocation.parent, element, insertionLocation.beforeElement);
28915
29853
  } else {
28916
- const parent = this.openElements.currentTmplContentOrNode;
28917
- this.treeAdapter.appendChild(parent !== null && parent !== undefined ? parent : this.document, element);
29854
+ this.treeAdapter.appendChild(insertionLocation.parent, element);
28918
29855
  }
28919
29856
  }
29857
+ _getInsertionLocation() {
29858
+ var _a;
29859
+ if (this._shouldFosterParentOnInsertion()) {
29860
+ return this._findFosterParentingLocation();
29861
+ }
29862
+ return {
29863
+ parent: (_a = this.openElements.currentTmplContentOrNode) !== null && _a !== undefined ? _a : this.document,
29864
+ beforeElement: null
29865
+ };
29866
+ }
29867
+ _createElement(tagName, namespaceURI, attrs, intendedParent) {
29868
+ var _a, _b;
29869
+ const element = this.treeAdapter.createElement(tagName, namespaceURI, attrs);
29870
+ (_b = (_a = this.treeAdapter).onElementCreated) === null || _b === undefined || _b.call(_a, element, {
29871
+ intendedParent,
29872
+ formElement: this.formElement,
29873
+ isInTemplate: this.openElements.tmplCount > 0
29874
+ });
29875
+ return element;
29876
+ }
28920
29877
  _appendElement(token, namespaceURI) {
28921
- const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
28922
- this._attachElementToTree(element, token.location);
29878
+ const insertionLocation = this._getInsertionLocation();
29879
+ const element = this._createElement(token.tagName, namespaceURI, token.attrs, insertionLocation.parent);
29880
+ this._attachElementToTree(element, token.location, insertionLocation);
28923
29881
  }
28924
29882
  _insertElement(token, namespaceURI) {
28925
- const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
28926
- this._attachElementToTree(element, token.location);
29883
+ const insertionLocation = this._getInsertionLocation();
29884
+ const element = this._createElement(token.tagName, namespaceURI, token.attrs, insertionLocation.parent);
29885
+ this._attachElementToTree(element, token.location, insertionLocation);
28927
29886
  this.openElements.push(element, token.tagID);
28928
29887
  }
28929
29888
  _insertFakeElement(tagName, tagID) {
28930
- const element = this.treeAdapter.createElement(tagName, NS.HTML, []);
28931
- this._attachElementToTree(element, null);
29889
+ const insertionLocation = this._getInsertionLocation();
29890
+ const element = this._createElement(tagName, NS.HTML, [], insertionLocation.parent);
29891
+ this._attachElementToTree(element, null, insertionLocation);
28932
29892
  this.openElements.push(element, tagID);
28933
29893
  }
28934
29894
  _insertTemplate(token) {
28935
- const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);
29895
+ const insertionLocation = this._getInsertionLocation();
29896
+ const tmpl = this._createElement(token.tagName, NS.HTML, token.attrs, insertionLocation.parent);
28936
29897
  const content = this.treeAdapter.createDocumentFragment();
28937
29898
  this.treeAdapter.setTemplateContent(tmpl, content);
28938
- this._attachElementToTree(tmpl, token.location);
29899
+ this._attachElementToTree(tmpl, token.location, insertionLocation);
28939
29900
  this.openElements.push(tmpl, token.tagID);
28940
29901
  if (this.options.sourceCodeLocationInfo)
28941
29902
  this.treeAdapter.setNodeSourceCodeLocation(content, null);
28942
29903
  }
28943
29904
  _insertFakeRootElement() {
28944
- const element = this.treeAdapter.createElement(TAG_NAMES.HTML, NS.HTML, []);
29905
+ const element = this._createElement(TAG_NAMES.HTML, NS.HTML, [], this.document);
28945
29906
  if (this.options.sourceCodeLocationInfo)
28946
29907
  this.treeAdapter.setNodeSourceCodeLocation(element, null);
28947
- this.treeAdapter.appendChild(this.openElements.current, element);
29908
+ this.treeAdapter.appendChild(this.document, element);
28948
29909
  this.openElements.push(element, TAG_ID.HTML);
28949
29910
  }
28950
29911
  _appendCommentNode(token, parent) {
@@ -28982,8 +29943,11 @@ class Parser {
28982
29943
  }
28983
29944
  }
28984
29945
  _adoptNodes(donor, recipient) {
28985
- for (let child = this.treeAdapter.getFirstChild(donor);child; child = this.treeAdapter.getFirstChild(donor)) {
28986
- this.treeAdapter.detachNode(child);
29946
+ const children = [...this.treeAdapter.getChildNodes(donor)];
29947
+ for (let i = children.length - 1;i >= 0; i--) {
29948
+ this.treeAdapter.detachNode(children[i]);
29949
+ }
29950
+ for (const child of children) {
28987
29951
  this.treeAdapter.appendChild(recipient, child);
28988
29952
  }
28989
29953
  }
@@ -29057,20 +30021,27 @@ class Parser {
29057
30021
  }
29058
30022
  }
29059
30023
  _isIntegrationPoint(tid, element, foreignNS) {
30024
+ var _a;
29060
30025
  const ns = this.treeAdapter.getNamespaceURI(element);
29061
- const attrs = this.treeAdapter.getAttrList(element);
29062
- return isIntegrationPoint(tid, ns, attrs, foreignNS);
30026
+ if (tid === TAG_ID.ANNOTATION_XML && ns === NS.MATHML && foreignNS !== NS.MATHML) {
30027
+ const verdicts = (_a = this.annotationXmlIntegrationPoints) !== null && _a !== undefined ? _a : this.annotationXmlIntegrationPoints = new Map;
30028
+ let isIntegrationPoint2 = verdicts.get(element);
30029
+ if (isIntegrationPoint2 === undefined) {
30030
+ isIntegrationPoint2 = isIntegrationPoint(tid, ns, this.treeAdapter.getAttrList(element));
30031
+ verdicts.set(element, isIntegrationPoint2);
30032
+ }
30033
+ return isIntegrationPoint2;
30034
+ }
30035
+ return isIntegrationPoint(tid, ns, EMPTY_ATTRS, foreignNS);
29063
30036
  }
29064
30037
  _reconstructActiveFormattingElements() {
29065
- const listLength = this.activeFormattingElements.entries.length;
29066
- if (listLength) {
29067
- const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element));
29068
- const unopenIdx = endIndex === -1 ? listLength - 1 : endIndex - 1;
29069
- for (let i = unopenIdx;i >= 0; i--) {
29070
- const entry = this.activeFormattingElements.entries[i];
29071
- this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
29072
- entry.element = this.openElements.current;
29073
- }
30038
+ let oldest = null;
30039
+ for (let entry = this.activeFormattingElements.newest;entry !== null && entry.type === EntryType.Element && !this.openElements.contains(entry.element); entry = entry.older) {
30040
+ oldest = entry;
30041
+ }
30042
+ for (let entry = oldest;entry !== null && entry.type === EntryType.Element; entry = entry.newer) {
30043
+ this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
30044
+ this.activeFormattingElements.replaceElement(entry, this.openElements.current);
29074
30045
  }
29075
30046
  }
29076
30047
  _closeTableCell() {
@@ -29084,8 +30055,11 @@ class Parser {
29084
30055
  this.openElements.popUntilTagNamePopped(TAG_ID.P);
29085
30056
  }
29086
30057
  _resetInsertionMode() {
29087
- for (let i = this.openElements.stackTop;i >= 0; i--) {
29088
- switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {
30058
+ const i = this.openElements.indexOfTopmostOf(INSERTION_MODE_TAGS);
30059
+ const tn = i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i];
30060
+ const node = i === 0 && this.fragmentContext ? this.fragmentContext : this.openElements.items[i];
30061
+ if (node !== undefined && this.treeAdapter.getNamespaceURI(node) === NS.HTML) {
30062
+ switch (tn) {
29089
30063
  case TAG_ID.TR: {
29090
30064
  this.insertionMode = InsertionMode.IN_ROW;
29091
30065
  return;
@@ -29121,7 +30095,7 @@ class Parser {
29121
30095
  return;
29122
30096
  }
29123
30097
  case TAG_ID.TEMPLATE: {
29124
- this.insertionMode = this.tmplInsertionModeStack[0];
30098
+ this.insertionMode = this.tmplInsertionModeStack[this.tmplInsertionModeStack.length - 1];
29125
30099
  return;
29126
30100
  }
29127
30101
  case TAG_ID.HTML: {
@@ -29149,14 +30123,10 @@ class Parser {
29149
30123
  }
29150
30124
  _resetInsertionModeForSelect(selectIdx) {
29151
30125
  if (selectIdx > 0) {
29152
- for (let i = selectIdx - 1;i > 0; i--) {
29153
- const tn = this.openElements.tagIDs[i];
29154
- if (tn === TAG_ID.TEMPLATE) {
29155
- break;
29156
- } else if (tn === TAG_ID.TABLE) {
29157
- this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
29158
- return;
29159
- }
30126
+ const tableIdx = this.openElements.indexOfTopmost(TAG_ID.TABLE);
30127
+ if (tableIdx > 0 && tableIdx > this.openElements.indexOfTopmost(TAG_ID.TEMPLATE)) {
30128
+ this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
30129
+ return;
29160
30130
  }
29161
30131
  }
29162
30132
  this.insertionMode = InsertionMode.IN_SELECT;
@@ -29168,26 +30138,24 @@ class Parser {
29168
30138
  return this.fosterParentingEnabled && this.openElements.currentTagId !== undefined && this._isElementCausesFosterParenting(this.openElements.currentTagId);
29169
30139
  }
29170
30140
  _findFosterParentingLocation() {
29171
- for (let i = this.openElements.stackTop;i >= 0; i--) {
29172
- const openElement = this.openElements.items[i];
29173
- switch (this.openElements.tagIDs[i]) {
29174
- case TAG_ID.TEMPLATE: {
29175
- if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) {
29176
- return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null };
29177
- }
29178
- break;
29179
- }
29180
- case TAG_ID.TABLE: {
29181
- const parent = this.treeAdapter.getParentNode(openElement);
29182
- if (parent) {
29183
- return { parent, beforeElement: openElement };
29184
- }
29185
- return { parent: this.openElements.items[i - 1], beforeElement: null };
29186
- }
29187
- default:
30141
+ const { openElements } = this;
30142
+ const tableIdx = openElements.indexOfTopmost(TAG_ID.TABLE);
30143
+ const templateIdx = openElements.indexOfTopmost(TAG_ID.TEMPLATE);
30144
+ if (templateIdx > tableIdx) {
30145
+ return {
30146
+ parent: this.treeAdapter.getTemplateContent(openElements.items[templateIdx]),
30147
+ beforeElement: null
30148
+ };
30149
+ }
30150
+ if (tableIdx !== -1) {
30151
+ const table = openElements.items[tableIdx];
30152
+ const parent = this.treeAdapter.getParentNode(table);
30153
+ if (parent) {
30154
+ return { parent, beforeElement: table };
29188
30155
  }
30156
+ return { parent: openElements.items[openElements.slotBelow(tableIdx)], beforeElement: null };
29189
30157
  }
29190
- return { parent: this.openElements.items[0], beforeElement: null };
30158
+ return { parent: openElements.items[0], beforeElement: null };
29191
30159
  }
29192
30160
  _fosterParentElement(element) {
29193
30161
  const location = this._findFosterParentingLocation();
@@ -29719,7 +30687,7 @@ function aaObtainFormattingElementEntry(p, token) {
29719
30687
  if (!p.openElements.contains(formattingElementEntry.element)) {
29720
30688
  p.activeFormattingElements.removeEntry(formattingElementEntry);
29721
30689
  formattingElementEntry = null;
29722
- } else if (!p.openElements.hasInScope(token.tagID)) {
30690
+ } else if (!p.openElements.hasInScope(token.tagID, formattingElementEntry.element)) {
29723
30691
  formattingElementEntry = null;
29724
30692
  }
29725
30693
  } else {
@@ -29728,28 +30696,25 @@ function aaObtainFormattingElementEntry(p, token) {
29728
30696
  return formattingElementEntry;
29729
30697
  }
29730
30698
  function aaObtainFurthestBlock(p, formattingElementEntry) {
29731
- let furthestBlock = null;
29732
- let idx = p.openElements.stackTop;
29733
- for (;idx >= 0; idx--) {
29734
- const element = p.openElements.items[idx];
29735
- if (element === formattingElementEntry.element) {
29736
- break;
30699
+ const { openElements } = p;
30700
+ const formattingIdx = openElements._indexOf(formattingElementEntry.element);
30701
+ for (let idx = openElements.slotAbove(formattingIdx);idx !== -1; idx = openElements.slotAbove(idx)) {
30702
+ if (p._isSpecialElement(openElements.items[idx], openElements.tagIDs[idx])) {
30703
+ return idx;
29737
30704
  }
29738
- if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) {
29739
- furthestBlock = element;
29740
- }
29741
- }
29742
- if (!furthestBlock) {
29743
- p.openElements.shortenToLength(Math.max(idx, 0));
29744
- p.activeFormattingElements.removeEntry(formattingElementEntry);
29745
30705
  }
29746
- return furthestBlock;
30706
+ openElements.shortenToLength(formattingIdx);
30707
+ p.activeFormattingElements.removeEntry(formattingElementEntry);
30708
+ return -1;
29747
30709
  }
29748
- function aaInnerLoop(p, furthestBlock, formattingElement) {
30710
+ function aaInnerLoop(p, furthestBlockIdx, formattingElement) {
30711
+ const furthestBlock = p.openElements.items[furthestBlockIdx];
29749
30712
  let lastElement = furthestBlock;
29750
- let nextElement = p.openElements.getCommonAncestor(furthestBlock);
29751
- for (let i = 0, element = nextElement;element !== formattingElement; i++, element = nextElement) {
29752
- nextElement = p.openElements.getCommonAncestor(element);
30713
+ let nextIdx = p.openElements.slotBelow(furthestBlockIdx);
30714
+ const intendedParent = p.openElements.getCommonAncestor(formattingElement);
30715
+ for (let i = 0, idx = nextIdx;p.openElements.items[idx] !== formattingElement; i++, idx = nextIdx) {
30716
+ let element = p.openElements.items[idx];
30717
+ nextIdx = p.openElements.slotBelow(idx);
29753
30718
  const elementEntry = p.activeFormattingElements.getElementEntry(element);
29754
30719
  const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;
29755
30720
  const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;
@@ -29757,9 +30722,9 @@ function aaInnerLoop(p, furthestBlock, formattingElement) {
29757
30722
  if (counterOverflow) {
29758
30723
  p.activeFormattingElements.removeEntry(elementEntry);
29759
30724
  }
29760
- p.openElements.remove(element);
30725
+ p.openElements.removeAt(idx);
29761
30726
  } else {
29762
- element = aaRecreateElementFromEntry(p, elementEntry);
30727
+ element = aaRecreateElementFromEntry(p, elementEntry, intendedParent);
29763
30728
  if (lastElement === furthestBlock) {
29764
30729
  p.activeFormattingElements.bookmark = elementEntry;
29765
30730
  }
@@ -29770,11 +30735,11 @@ function aaInnerLoop(p, furthestBlock, formattingElement) {
29770
30735
  }
29771
30736
  return lastElement;
29772
30737
  }
29773
- function aaRecreateElementFromEntry(p, elementEntry) {
30738
+ function aaRecreateElementFromEntry(p, elementEntry, intendedParent) {
29774
30739
  const ns = p.treeAdapter.getNamespaceURI(elementEntry.element);
29775
- const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);
30740
+ const newElement = p._createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs, intendedParent);
29776
30741
  p.openElements.replace(elementEntry.element, newElement);
29777
- elementEntry.element = newElement;
30742
+ p.activeFormattingElements.replaceElement(elementEntry, newElement);
29778
30743
  return newElement;
29779
30744
  }
29780
30745
  function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
@@ -29793,26 +30758,36 @@ function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
29793
30758
  function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {
29794
30759
  const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);
29795
30760
  const { token } = formattingElementEntry;
29796
- const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);
30761
+ const newElement = p._createElement(token.tagName, ns, token.attrs, furthestBlock);
29797
30762
  p._adoptNodes(furthestBlock, newElement);
29798
30763
  p.treeAdapter.appendChild(furthestBlock, newElement);
29799
30764
  p.activeFormattingElements.insertElementAfterBookmark(newElement, token);
29800
30765
  p.activeFormattingElements.removeEntry(formattingElementEntry);
29801
- p.openElements.remove(formattingElementEntry.element);
29802
- p.openElements.insertAfter(furthestBlock, newElement, token.tagID);
30766
+ const formattingIdx = p.openElements._indexOf(formattingElementEntry.element);
30767
+ let furthestBlockIdx = p.openElements.slotAbove(formattingIdx);
30768
+ while (p.openElements.items[furthestBlockIdx] !== furthestBlock) {
30769
+ furthestBlockIdx = p.openElements.slotAbove(furthestBlockIdx);
30770
+ }
30771
+ p.openElements.replaceFormattingElement(formattingIdx, furthestBlockIdx, newElement, token.tagID);
29803
30772
  }
29804
30773
  function callAdoptionAgency(p, token) {
30774
+ const { current, currentTagId } = p.openElements;
30775
+ if (currentTagId === token.tagID && p.treeAdapter.getNamespaceURI(current) === NS.HTML && !p.activeFormattingElements.getElementEntry(current)) {
30776
+ p.openElements.pop();
30777
+ return;
30778
+ }
29805
30779
  for (let i = 0;i < AA_OUTER_LOOP_ITER; i++) {
29806
30780
  const formattingElementEntry = aaObtainFormattingElementEntry(p, token);
29807
30781
  if (!formattingElementEntry) {
29808
30782
  break;
29809
30783
  }
29810
- const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);
29811
- if (!furthestBlock) {
30784
+ const furthestBlockIdx = aaObtainFurthestBlock(p, formattingElementEntry);
30785
+ if (furthestBlockIdx === -1) {
29812
30786
  break;
29813
30787
  }
30788
+ const furthestBlock = p.openElements.items[furthestBlockIdx];
29814
30789
  p.activeFormattingElements.bookmark = formattingElementEntry;
29815
- const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element);
30790
+ const lastElement = aaInnerLoop(p, furthestBlockIdx, formattingElementEntry.element);
29816
30791
  const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);
29817
30792
  p.treeAdapter.detachNode(lastElement);
29818
30793
  if (commonAncestor)
@@ -29833,7 +30808,7 @@ function stopParsing(p, token) {
29833
30808
  p.stopped = true;
29834
30809
  if (token.location) {
29835
30810
  const target = p.fragmentContext ? 0 : 2;
29836
- for (let i = p.openElements.stackTop;i >= target; i--) {
30811
+ for (let i = p.openElements.stackTop;i >= target; i = p.openElements.slotBelow(i)) {
29837
30812
  p._setEndLocation(p.openElements.items[i], token);
29838
30813
  }
29839
30814
  if (!p.fragmentContext && p.openElements.stackTop >= 0) {
@@ -29959,7 +30934,7 @@ function startTagInHead(p, token) {
29959
30934
  p.activeFormattingElements.insertMarker();
29960
30935
  p.framesetOk = false;
29961
30936
  p.insertionMode = InsertionMode.IN_TEMPLATE;
29962
- p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
30937
+ p.tmplInsertionModeStack.push(InsertionMode.IN_TEMPLATE);
29963
30938
  break;
29964
30939
  }
29965
30940
  case TAG_ID.HEAD: {
@@ -30001,7 +30976,7 @@ function templateEndTagInHead(p, token) {
30001
30976
  }
30002
30977
  p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
30003
30978
  p.activeFormattingElements.clearToLastMarker();
30004
- p.tmplInsertionModeStack.shift();
30979
+ p.tmplInsertionModeStack.pop();
30005
30980
  p._resetInsertionMode();
30006
30981
  } else {
30007
30982
  p._err(token, ERR.endTagWithoutMatchingOpenElement);
@@ -30220,17 +31195,11 @@ function formStartTagInBody(p, token) {
30220
31195
  }
30221
31196
  function listItemStartTagInBody(p, token) {
30222
31197
  p.framesetOk = false;
30223
- const tn = token.tagID;
30224
- for (let i = p.openElements.stackTop;i >= 0; i--) {
30225
- const elementId = p.openElements.tagIDs[i];
30226
- if (tn === TAG_ID.LI && elementId === TAG_ID.LI || (tn === TAG_ID.DD || tn === TAG_ID.DT) && (elementId === TAG_ID.DD || elementId === TAG_ID.DT)) {
30227
- p.openElements.generateImpliedEndTagsWithExclusion(elementId);
30228
- p.openElements.popUntilTagNamePopped(elementId);
30229
- break;
30230
- }
30231
- if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p._isSpecialElement(p.openElements.items[i], elementId)) {
30232
- break;
30233
- }
31198
+ const idx = token.tagID === TAG_ID.LI ? p.openElements.indexOfTopmost(TAG_ID.LI) : Math.max(p.openElements.indexOfTopmost(TAG_ID.DD), p.openElements.indexOfTopmost(TAG_ID.DT));
31199
+ if (idx !== -1 && !p.openElements.hasListItemBoundaryAbove(idx)) {
31200
+ const elementId = p.openElements.tagIDs[idx];
31201
+ p.openElements.generateImpliedEndTagsWithExclusion(elementId);
31202
+ p.openElements.popUntilTagNamePopped(elementId);
30234
31203
  }
30235
31204
  if (p.openElements.hasInButtonScope(TAG_ID.P)) {
30236
31205
  p._closePElement();
@@ -30696,20 +31665,12 @@ function brEndTagInBody(p) {
30696
31665
  p.framesetOk = false;
30697
31666
  }
30698
31667
  function genericEndTagInBody(p, token) {
30699
- const tn = token.tagName;
30700
31668
  const tid = token.tagID;
30701
- for (let i = p.openElements.stackTop;i > 0; i--) {
30702
- const element = p.openElements.items[i];
30703
- const elementId = p.openElements.tagIDs[i];
30704
- if (tid === elementId && (tid !== TAG_ID.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) {
30705
- p.openElements.generateImpliedEndTagsWithExclusion(tid);
30706
- if (p.openElements.stackTop >= i)
30707
- p.openElements.shortenToLength(i);
30708
- break;
30709
- }
30710
- if (p._isSpecialElement(element, elementId)) {
30711
- break;
30712
- }
31669
+ const i = tid === TAG_ID.UNKNOWN ? p.openElements.indexOfTopmostByName(NS.HTML, token.tagName) : p.openElements.indexOfTopmost(tid);
31670
+ if (i > 0 && !p.openElements.hasSpecialElementAbove(i)) {
31671
+ p.openElements.generateImpliedEndTagsWithExclusion(tid);
31672
+ if (p.openElements.stackTop >= i)
31673
+ p.openElements.shortenToLength(i);
30713
31674
  }
30714
31675
  }
30715
31676
  function endTagInBody(p, token) {
@@ -31358,7 +32319,7 @@ function startTagInSelect(p, token) {
31358
32319
  function endTagInSelect(p, token) {
31359
32320
  switch (token.tagID) {
31360
32321
  case TAG_ID.OPTGROUP: {
31361
- if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.stackTop - 1] === TAG_ID.OPTGROUP) {
32322
+ if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.slotBelow(p.openElements.stackTop)] === TAG_ID.OPTGROUP) {
31362
32323
  p.openElements.pop();
31363
32324
  }
31364
32325
  if (p.openElements.currentTagId === TAG_ID.OPTGROUP) {
@@ -31428,32 +32389,32 @@ function startTagInTemplate(p, token) {
31428
32389
  case TAG_ID.TBODY:
31429
32390
  case TAG_ID.TFOOT:
31430
32391
  case TAG_ID.THEAD: {
31431
- p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;
32392
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_TABLE;
31432
32393
  p.insertionMode = InsertionMode.IN_TABLE;
31433
32394
  startTagInTable(p, token);
31434
32395
  break;
31435
32396
  }
31436
32397
  case TAG_ID.COL: {
31437
- p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;
32398
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_COLUMN_GROUP;
31438
32399
  p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
31439
32400
  startTagInColumnGroup(p, token);
31440
32401
  break;
31441
32402
  }
31442
32403
  case TAG_ID.TR: {
31443
- p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;
32404
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_TABLE_BODY;
31444
32405
  p.insertionMode = InsertionMode.IN_TABLE_BODY;
31445
32406
  startTagInTableBody(p, token);
31446
32407
  break;
31447
32408
  }
31448
32409
  case TAG_ID.TD:
31449
32410
  case TAG_ID.TH: {
31450
- p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;
32411
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_ROW;
31451
32412
  p.insertionMode = InsertionMode.IN_ROW;
31452
32413
  startTagInRow(p, token);
31453
32414
  break;
31454
32415
  }
31455
32416
  default: {
31456
- p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;
32417
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_BODY;
31457
32418
  p.insertionMode = InsertionMode.IN_BODY;
31458
32419
  startTagInBody(p, token);
31459
32420
  }
@@ -31466,9 +32427,11 @@ function endTagInTemplate(p, token) {
31466
32427
  }
31467
32428
  function eofInTemplate(p, token) {
31468
32429
  if (p.openElements.tmplCount > 0) {
31469
- p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
31470
- p.activeFormattingElements.clearToLastMarker();
31471
- p.tmplInsertionModeStack.shift();
32430
+ do {
32431
+ p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
32432
+ p.activeFormattingElements.clearToLastMarker();
32433
+ p.tmplInsertionModeStack.pop();
32434
+ } while (p.openElements.tmplCount > 0);
31472
32435
  p._resetInsertionMode();
31473
32436
  p.onEof(token);
31474
32437
  } else {
@@ -31616,21 +32579,20 @@ function endTagInForeignContent(p, token) {
31616
32579
  p._endTagOutsideForeignContent(token);
31617
32580
  return;
31618
32581
  }
31619
- for (let i = p.openElements.stackTop;i > 0; i--) {
31620
- const element = p.openElements.items[i];
31621
- if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) {
31622
- p._endTagOutsideForeignContent(token);
31623
- break;
31624
- }
31625
- const tagName = p.treeAdapter.getTagName(element);
31626
- if (tagName.toLowerCase() === token.tagName) {
31627
- token.tagName = tagName;
31628
- p.openElements.shortenToLength(i);
31629
- break;
31630
- }
32582
+ if (p.openElements.stackTop === 0)
32583
+ return;
32584
+ const { tagName } = token;
32585
+ const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(tagName);
32586
+ const contextNs = p.fragmentContext ? p.treeAdapter.getNamespaceURI(p.fragmentContext) : NS.HTML;
32587
+ const i = Math.max(p.openElements.indexOfTopmostByName(NS.SVG, tagName), p.openElements.indexOfTopmostByName(NS.MATHML, tagName), adjustedTagName === undefined ? -1 : p.openElements.indexOfTopmostByName(NS.SVG, adjustedTagName), contextNs === NS.HTML || contextNs === NS.SVG || contextNs === NS.MATHML ? -1 : p.openElements.indexOfTopmostByName(contextNs, tagName));
32588
+ if (i > p.openElements.indexOfTopmostHtmlElement()) {
32589
+ token.tagName = p.treeAdapter.getTagName(p.openElements.items[i]);
32590
+ p.openElements.shortenToLength(i);
32591
+ } else {
32592
+ p._endTagOutsideForeignContent(token);
31631
32593
  }
31632
32594
  }
31633
- var HIDDEN_INPUT_TYPE = "hidden", AA_OUTER_LOOP_ITER = 8, AA_INNER_LOOP_ITER = 3, InsertionMode, BASE_LOC, TABLE_STRUCTURE_TAGS, defaultParserOptions, TABLE_VOID_ELEMENTS;
32595
+ var INSERTION_MODE_TAGS, HIDDEN_INPUT_TYPE = "hidden", EMPTY_ATTRS, AA_OUTER_LOOP_ITER = 8, AA_INNER_LOOP_ITER = 3, InsertionMode, BASE_LOC, TABLE_STRUCTURE_TAGS, defaultParserOptions, TABLE_VOID_ELEMENTS;
31634
32596
  var init_parser = __esm(() => {
31635
32597
  init_tokenizer();
31636
32598
  init_open_element_stack();
@@ -31642,6 +32604,24 @@ var init_parser = __esm(() => {
31642
32604
  init_unicode();
31643
32605
  init_html3();
31644
32606
  init_token();
32607
+ INSERTION_MODE_TAGS = [
32608
+ TAG_ID.TR,
32609
+ TAG_ID.TBODY,
32610
+ TAG_ID.THEAD,
32611
+ TAG_ID.TFOOT,
32612
+ TAG_ID.CAPTION,
32613
+ TAG_ID.COLGROUP,
32614
+ TAG_ID.TABLE,
32615
+ TAG_ID.FRAMESET,
32616
+ TAG_ID.SELECT,
32617
+ TAG_ID.TEMPLATE,
32618
+ TAG_ID.TD,
32619
+ TAG_ID.TH,
32620
+ TAG_ID.HEAD,
32621
+ TAG_ID.BODY,
32622
+ TAG_ID.HTML
32623
+ ];
32624
+ EMPTY_ATTRS = [];
31645
32625
  (function(InsertionMode) {
31646
32626
  InsertionMode[InsertionMode["INITIAL"] = 0] = "INITIAL";
31647
32627
  InsertionMode[InsertionMode["BEFORE_HTML"] = 1] = "BEFORE_HTML";
@@ -31999,7 +32979,7 @@ var init_errors = __esm(() => {
31999
32979
  // ../../node_modules/hast-util-from-html/lib/index.js
32000
32980
  function fromHtml(value, options) {
32001
32981
  const settings = options || emptyOptions4;
32002
- const onerror = settings.onerror;
32982
+ const { onerror } = settings;
32003
32983
  const file = value instanceof VFile ? value : new VFile(value);
32004
32984
  const parseFunction = settings.fragment ? parseFragment : parse4;
32005
32985
  const document2 = String(file);
@@ -32014,10 +32994,10 @@ function fromHtml(value, options) {
32014
32994
  verbose: settings.verbose
32015
32995
  });
32016
32996
  function internalOnerror(error) {
32017
- const code = error.code;
32997
+ const { code } = error;
32018
32998
  const name = camelcase2(code);
32019
32999
  const setting = settings[name];
32020
- const config = setting === null || setting === undefined ? true : setting;
33000
+ const config = setting ?? true;
32021
33001
  const level = typeof config === "number" ? config : config ? 1 : 0;
32022
33002
  if (level) {
32023
33003
  const info = errors2[name];
@@ -32051,7 +33031,7 @@ function fromHtml(value, options) {
32051
33031
  function format(value) {
32052
33032
  return value.replace(formatCRe, formatC).replace(formatXRe, formatX);
32053
33033
  function formatC(_, $1, $2) {
32054
- const offset = ($2 ? Number.parseInt($2, 10) : 0) * ($1 === "-" ? -1 : 1);
33034
+ const offset = ($2 ? Number($2) : 0) * ($1 === "-" ? -1 : 1);
32055
33035
  const char = document2.charAt(error.startOffset + offset);
32056
33036
  return visualizeCharacter(char);
32057
33037
  }
@@ -32082,7 +33062,7 @@ var init_lib28 = __esm(() => {
32082
33062
  init_vfile_message();
32083
33063
  init_errors();
32084
33064
  dashToCamelRe = /-[a-z]/g;
32085
- formatCRe = /%c(?:([-+])(\d+))?/g;
33065
+ formatCRe = /%c(?:([+-])(\d+))?/g;
32086
33066
  formatXRe = /%x/g;
32087
33067
  fatalities = { 2: true, 1: false, 0: null };
32088
33068
  emptyOptions4 = {};
@@ -40044,7 +41024,7 @@ function markerOf(paragraph) {
40044
41024
  if (first?.type !== "text" || first.value === undefined) {
40045
41025
  return null;
40046
41026
  }
40047
- const match = MARKER2.exec(first.value);
41027
+ const match = MARKER.exec(first.value);
40048
41028
  if (!match) {
40049
41029
  return null;
40050
41030
  }
@@ -40122,7 +41102,7 @@ function transformAlerts(tree, settings, onUnknown) {
40122
41102
  transformAlerts(child, settings, onUnknown);
40123
41103
  }
40124
41104
  }
40125
- var DEFAULT_ALERT_TITLES, ALERT_NODE = "jxAlert", TAG_NAME, MARKER2, LINE_END;
41105
+ var DEFAULT_ALERT_TITLES, ALERT_NODE = "jxAlert", TAG_NAME, MARKER, LINE_END;
40126
41106
  var init_alerts = __esm(() => {
40127
41107
  init_guards();
40128
41108
  DEFAULT_ALERT_TITLES = {
@@ -40133,7 +41113,7 @@ var init_alerts = __esm(() => {
40133
41113
  warning: "Warning"
40134
41114
  };
40135
41115
  TAG_NAME = /^[A-Za-z][\w.-]*$/;
40136
- MARKER2 = /^\[!([A-Za-z][\w-]*)\][+-]?/;
41116
+ MARKER = /^\[!([A-Za-z][\w-]*)\][+-]?/;
40137
41117
  LINE_END = /\r?\n/;
40138
41118
  });
40139
41119