@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.
@@ -112,7 +112,7 @@ function tagNameCandidates(tagName) {
112
112
  }
113
113
  return [...new Set([...Object.values(expression.cases), expression.default])];
114
114
  }
115
- var SCHEMA_KEYWORDS, masked;
115
+ var SCHEMA_KEYWORDS, masked, scanned, BEFORE_OPERAND;
116
116
  var init_guards = __esm(() => {
117
117
  SCHEMA_KEYWORDS = new Set([
118
118
  "type",
@@ -131,6 +131,8 @@ var init_guards = __esm(() => {
131
131
  "$comment"
132
132
  ]);
133
133
  masked = new Map;
134
+ scanned = new Map;
135
+ BEFORE_OPERAND = new Set("(,=:[!&|?{;+-*%<>~^");
134
136
  });
135
137
 
136
138
  // src/alerts.ts
@@ -927,7 +929,7 @@ var init_lib = __esm(() => {
927
929
  options.ruleId = origin.slice(index + 1);
928
930
  }
929
931
  }
930
- if (!options.place && options.ancestors && options.ancestors) {
932
+ if (!options.place && options.ancestors) {
931
933
  const parent = options.ancestors[options.ancestors.length - 1];
932
934
  if (parent) {
933
935
  options.place = parent.position;
@@ -953,19 +955,21 @@ var init_lib = __esm(() => {
953
955
  this.url = undefined;
954
956
  }
955
957
  };
956
- VFileMessage.prototype.file = "";
957
- VFileMessage.prototype.name = "";
958
- VFileMessage.prototype.reason = "";
959
- VFileMessage.prototype.message = "";
960
- VFileMessage.prototype.stack = "";
961
- VFileMessage.prototype.column = undefined;
962
- VFileMessage.prototype.line = undefined;
963
- VFileMessage.prototype.ancestors = undefined;
964
- VFileMessage.prototype.cause = undefined;
965
- VFileMessage.prototype.fatal = undefined;
966
- VFileMessage.prototype.place = undefined;
967
- VFileMessage.prototype.ruleId = undefined;
968
- VFileMessage.prototype.source = undefined;
958
+ Object.defineProperties(VFileMessage.prototype, {
959
+ file: { configurable: true, enumerable: true, value: "", writable: true },
960
+ name: { configurable: true, enumerable: true, value: "", writable: true },
961
+ reason: { configurable: true, enumerable: true, value: "", writable: true },
962
+ message: { configurable: true, enumerable: true, value: "", writable: true },
963
+ stack: { configurable: true, enumerable: true, value: "", writable: true },
964
+ column: { configurable: true, enumerable: true, writable: true },
965
+ line: { configurable: true, enumerable: true, writable: true },
966
+ ancestors: { configurable: true, enumerable: true, writable: true },
967
+ cause: { configurable: true, enumerable: true, writable: true },
968
+ fatal: { configurable: true, enumerable: true, writable: true },
969
+ place: { configurable: true, enumerable: true, writable: true },
970
+ ruleId: { configurable: true, enumerable: true, writable: true },
971
+ source: { configurable: true, enumerable: true, writable: true }
972
+ });
969
973
  });
970
974
 
971
975
  // ../../node_modules/vfile-message/index.js
@@ -17968,7 +17972,7 @@ function gfmAutolinkLiteralToMarkdown() {
17968
17972
  };
17969
17973
  }
17970
17974
  function enterLiteralAutolink(token) {
17971
- this.enter({ type: "link", title: null, url: "", children: [] }, token);
17975
+ this.enter({ type: "link", title: null, url: "", children: [], position: undefined }, token);
17972
17976
  }
17973
17977
  function enterLiteralAutolinkValue(token) {
17974
17978
  this.config.enter.autolinkProtocol.call(this, token);
@@ -17990,62 +17994,107 @@ function exitLiteralAutolink(token) {
17990
17994
  }
17991
17995
  function transformGfmAutolinkLiterals(tree) {
17992
17996
  findAndReplace(tree, [
17993
- [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
17994
- [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail]
17997
+ [
17998
+ /(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,
17999
+ findUrl
18000
+ ],
18001
+ [
18002
+ /(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,
18003
+ findXmpp
18004
+ ],
18005
+ [/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g, findMailto],
18006
+ [
18007
+ /(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,
18008
+ findEmail
18009
+ ]
17995
18010
  ], { ignore: ["link", "linkReference"] });
17996
18011
  }
17997
18012
  function findUrl(_, protocol, domain, path, match) {
17998
- let prefix = "";
17999
18013
  if (!previous2(match)) {
18000
18014
  return false;
18001
18015
  }
18016
+ let prefix = "";
18002
18017
  if (/^w/i.test(protocol)) {
18003
18018
  domain = protocol + domain;
18004
18019
  protocol = "";
18005
18020
  prefix = "http://";
18006
18021
  }
18007
- if (!isCorrectDomain(domain)) {
18022
+ if (unicodePunctuation(domain.charCodeAt(0)) || !isCorrectDomain(domain)) {
18008
18023
  return false;
18009
18024
  }
18010
18025
  const parts = splitUrl(domain + path);
18011
- if (!parts[0])
18012
- return false;
18013
18026
  const result = {
18014
18027
  type: "link",
18015
18028
  title: null,
18016
18029
  url: prefix + protocol + parts[0],
18017
- children: [{ type: "text", value: protocol + parts[0] }]
18030
+ children: [{ type: "text", value: protocol + parts[0], position: undefined }],
18031
+ position: undefined
18018
18032
  };
18019
18033
  if (parts[1]) {
18020
- return [result, { type: "text", value: parts[1] }];
18034
+ return [result, { type: "text", value: parts[1], position: undefined }];
18021
18035
  }
18022
18036
  return result;
18023
18037
  }
18024
- function findEmail(_, atext, label, match) {
18025
- if (!previous2(match, true) || /[-\d_]$/.test(label)) {
18038
+ function findEmail(_, atext, label) {
18039
+ if (/[\d\-_]$/.test(label)) {
18026
18040
  return false;
18027
18041
  }
18028
18042
  return {
18029
18043
  type: "link",
18030
18044
  title: null,
18031
18045
  url: "mailto:" + atext + "@" + label,
18032
- children: [{ type: "text", value: atext + "@" + label }]
18046
+ children: [{ type: "text", value: atext + "@" + label, position: undefined }],
18047
+ position: undefined
18048
+ };
18049
+ }
18050
+ function findMailto(_, atext, label) {
18051
+ if (/[\d\-_]$/.test(label)) {
18052
+ return false;
18053
+ }
18054
+ const value = "mailto:" + atext + "@" + label;
18055
+ return {
18056
+ type: "link",
18057
+ title: null,
18058
+ url: value,
18059
+ children: [{ type: "text", value, position: undefined }],
18060
+ position: undefined
18061
+ };
18062
+ }
18063
+ function findXmpp(matchValue, atext, label, resource, match) {
18064
+ if (/[\d\-_]$/.test(label) || resource && (!/[A-Za-z]$/.test(resource) || match.input.charAt(match.index + matchValue.length) === "@")) {
18065
+ return false;
18066
+ }
18067
+ const value = "xmpp:" + atext + "@" + label + (resource || "");
18068
+ return {
18069
+ type: "link",
18070
+ title: null,
18071
+ url: value,
18072
+ children: [{ type: "text", value, position: undefined }],
18073
+ position: undefined
18033
18074
  };
18034
18075
  }
18035
18076
  function isCorrectDomain(domain) {
18036
18077
  const parts = domain.split(".");
18037
- 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]))) {
18078
+ 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]))) {
18038
18079
  return false;
18039
18080
  }
18040
18081
  return true;
18041
18082
  }
18042
18083
  function splitUrl(url) {
18043
- const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url);
18044
- if (!trailExec) {
18084
+ let index = url.length;
18085
+ while (index > 0) {
18086
+ const code = url.charCodeAt(index - 1);
18087
+ 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) {
18088
+ index--;
18089
+ } else {
18090
+ break;
18091
+ }
18092
+ }
18093
+ if (index === url.length) {
18045
18094
  return [url, undefined];
18046
18095
  }
18047
- url = url.slice(0, trailExec.index);
18048
- let trail = trailExec[0];
18096
+ let trail = url.slice(index);
18097
+ url = url.slice(0, index);
18049
18098
  let closingParenIndex = trail.indexOf(")");
18050
18099
  const openingParens = ccount(url, "(");
18051
18100
  let closingParens = ccount(url, ")");
@@ -18057,9 +18106,9 @@ function splitUrl(url) {
18057
18106
  }
18058
18107
  return [url, trail];
18059
18108
  }
18060
- function previous2(match, email) {
18109
+ function previous2(match) {
18061
18110
  const code = match.input.charCodeAt(match.index - 1);
18062
- return (match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code)) && (!email || code !== 47);
18111
+ return match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code);
18063
18112
  }
18064
18113
  var inConstruct = "phrasing", notInConstruct;
18065
18114
  var init_lib11 = __esm(() => {
@@ -18324,9 +18373,10 @@ function markdownTable(table, options) {
18324
18373
  while (++rowIndex < cellMatrix.length) {
18325
18374
  const row = cellMatrix[rowIndex];
18326
18375
  const sizes = sizeMatrix[rowIndex];
18376
+ const cellsInRow = settings.fillRows === false ? Math.max(1, cellMatrix[rowIndex === 1 ? 0 : rowIndex].length) : mostCellsPerRow;
18327
18377
  columnIndex = -1;
18328
18378
  const line = [];
18329
- while (++columnIndex < mostCellsPerRow) {
18379
+ while (++columnIndex < cellsInRow) {
18330
18380
  const cell = row[columnIndex] || "";
18331
18381
  let before = "";
18332
18382
  let after = "";
@@ -18336,11 +18386,12 @@ function markdownTable(table, options) {
18336
18386
  if (code === 114) {
18337
18387
  before = " ".repeat(size);
18338
18388
  } else if (code === 99) {
18389
+ const half = size / 2;
18339
18390
  if (size % 2) {
18340
- before = " ".repeat(size / 2 + 0.5);
18341
- after = " ".repeat(size / 2 - 0.5);
18391
+ before = " ".repeat(half + 0.5);
18392
+ after = " ".repeat(half - 0.5);
18342
18393
  } else {
18343
- before = " ".repeat(size / 2);
18394
+ before = " ".repeat(half);
18344
18395
  after = before;
18345
18396
  }
18346
18397
  } else {
@@ -18363,7 +18414,7 @@ function markdownTable(table, options) {
18363
18414
  if (settings.padding !== false) {
18364
18415
  line.push(" ");
18365
18416
  }
18366
- if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
18417
+ if (settings.delimiterEnd !== false || columnIndex !== cellsInRow - 1) {
18367
18418
  line.push("|");
18368
18419
  }
18369
18420
  }
@@ -18964,6 +19015,8 @@ function phrasing2(parent, state, info) {
18964
19015
  const handle = state.handle.handlers[child.type];
18965
19016
  if (handle && handle.attention) {
18966
19017
  const item = attentionItem(child, handle.attention, state, tracker);
19018
+ if (!item)
19019
+ continue;
18967
19020
  results.push(item);
18968
19021
  before = lastCharacter(item.sequences[0]);
18969
19022
  } else {
@@ -18987,17 +19040,54 @@ function attentionItem(node, attention, state, tracker) {
18987
19040
  const sequences = attentionSequences(node.type, markers, sizes);
18988
19041
  const sequence = sequences[0];
18989
19042
  const exit = state.enter(construct);
18990
- tracker.move(sequence);
19043
+ const inside = state.createTracker(tracker.current());
19044
+ inside.move(sequence);
18991
19045
  const children = phrasing2(node, state, {
18992
- ...tracker.current(),
19046
+ ...inside.current(),
18993
19047
  before: sequence,
18994
19048
  after: sequence
18995
19049
  });
19050
+ exit();
19051
+ if (children.length === 0)
19052
+ return;
19053
+ tracker.move(sequence);
18996
19054
  tracker.move(serialize2(children, sequence, sequence));
18997
19055
  tracker.move(sequence);
18998
- exit();
18999
19056
  return { children, sequences };
19000
19057
  }
19058
+ function fix(items, chosen, before, after) {
19059
+ let tokens = render(items, chosen, before, after);
19060
+ let mistake = check(tokens, before, after);
19061
+ while (mistake) {
19062
+ const next = improve(items, chosen, mistake, before, after);
19063
+ if (!next)
19064
+ return;
19065
+ chosen = next.chosen;
19066
+ tokens = next.tokens;
19067
+ mistake = next.mistake;
19068
+ }
19069
+ return tokens;
19070
+ }
19071
+ function guess(items, chosen, before, after) {
19072
+ let previous = before;
19073
+ let index = -1;
19074
+ while (++index < items.length) {
19075
+ const item = items[index];
19076
+ if (typeof item === "string") {
19077
+ previous = "";
19078
+ continue;
19079
+ }
19080
+ const next = index === items.length - 1 ? after : "";
19081
+ const sequence = item.sequences.find(function(value) {
19082
+ const marker = value.charAt(0);
19083
+ return marker !== previous.charAt(0) && marker !== next.charAt(0) || items.length === 1 && builtins.has(marker) && value.length > before.length;
19084
+ }) || item.sequences[0];
19085
+ if (sequence !== item.sequences[0])
19086
+ chosen.set(item, sequence);
19087
+ guess(item.children, chosen, sequence, sequence);
19088
+ previous = sequence;
19089
+ }
19090
+ }
19001
19091
  function render(items, chosen, before, after) {
19002
19092
  const tokens = [];
19003
19093
  let encodeAfter;
@@ -19022,11 +19112,11 @@ function render(items, chosen, before, after) {
19022
19112
  const outsideBefore = previous;
19023
19113
  const outsideAfter = firstCharacter(next === undefined ? after : typeof next === "string" ? next : chosen.get(next) || next.sequences[0]);
19024
19114
  const inside = render(item.children, chosen, sequence, sequence);
19025
- const head = inside.length > 0 ? inside[0].value : "";
19115
+ const head = inside[0].value;
19026
19116
  const open = encodeInfo(outsideBefore.charCodeAt(outsideBefore.length - 1), head.charCodeAt(0), marker);
19027
19117
  if (open.inside)
19028
19118
  encode(inside, true);
19029
- const tail = inside.length > 0 ? lastCharacter(inside[inside.length - 1].value) : "";
19119
+ const tail = lastCharacter(inside[inside.length - 1].value);
19030
19120
  const close = encodeInfo(outsideAfter.charCodeAt(0), tail.charCodeAt(tail.length - 1), marker);
19031
19121
  if (close.inside)
19032
19122
  encode(inside, false);
@@ -19045,20 +19135,9 @@ function render(items, chosen, before, after) {
19045
19135
  return tokens;
19046
19136
  }
19047
19137
  function serialize2(items, before, after) {
19048
- let chosen = new Map;
19049
- const initial = render(items, chosen, before, after);
19050
- let tokens = initial;
19051
- let mistake = check(tokens, before, after);
19052
- while (mistake) {
19053
- const next = improve(items, chosen, mistake, before, after);
19054
- if (!next) {
19055
- tokens = initial;
19056
- break;
19057
- }
19058
- chosen = next.chosen;
19059
- tokens = next.tokens;
19060
- mistake = next.mistake;
19061
- }
19138
+ const guessed = new Map;
19139
+ guess(items, guessed, before, after);
19140
+ const tokens = (guessed.size > 0 ? fix(items, guessed, before, after) : undefined) || fix(items, new Map, before, after) || render(items, new Map, before, after);
19062
19141
  let result = "";
19063
19142
  for (const token of tokens)
19064
19143
  result += token.value;
@@ -19080,7 +19159,7 @@ var init_container_phrasing = __esm(() => {
19080
19159
  function emphasis(node, _, state, info) {
19081
19160
  const exit = state.enter("phrasing");
19082
19161
  const item = attentionItem(node, attention2, state, state.createTracker(info));
19083
- const value = serialize2([item], info.before, info.after);
19162
+ const value = item ? serialize2([item], info.before, info.after) : "";
19084
19163
  exit();
19085
19164
  return value;
19086
19165
  }
@@ -19741,7 +19820,7 @@ function checkStrong(state) {
19741
19820
  function strong(node, _, state, info) {
19742
19821
  const exit = state.enter("phrasing");
19743
19822
  const item = attentionItem(node, attention3, state, state.createTracker(info));
19744
- const value = serialize2([item], info.before, info.after);
19823
+ const value = item ? serialize2([item], info.before, info.after) : "";
19745
19824
  exit();
19746
19825
  return value;
19747
19826
  }
@@ -20125,8 +20204,8 @@ function safe(state, input, config) {
20125
20204
  const subject = value.slice(from, pattern.afterNode ? end : undefined);
20126
20205
  let match;
20127
20206
  while (match = expression.exec(subject)) {
20128
- const before = "before" in pattern || Boolean(pattern.atBreak);
20129
- const after = "after" in pattern;
20207
+ const before = Boolean(pattern.before || pattern.atBreak);
20208
+ const after = Boolean(pattern.after);
20130
20209
  const position = from + match.index + (before ? match[1].length : 0);
20131
20210
  if (own7.call(infos, position)) {
20132
20211
  if (infos[position].before && !before) {
@@ -20354,7 +20433,8 @@ function enterTable(token) {
20354
20433
  align: align.map(function(d) {
20355
20434
  return d === "none" ? null : d;
20356
20435
  }),
20357
- children: []
20436
+ children: [],
20437
+ position: undefined
20358
20438
  }, token);
20359
20439
  this.data.inTable = true;
20360
20440
  }
@@ -20363,13 +20443,13 @@ function exitTable(token) {
20363
20443
  this.data.inTable = undefined;
20364
20444
  }
20365
20445
  function enterRow(token) {
20366
- this.enter({ type: "tableRow", children: [] }, token);
20446
+ this.enter({ type: "tableRow", children: [], position: undefined }, token);
20367
20447
  }
20368
20448
  function exit2(token) {
20369
20449
  this.exit(token);
20370
20450
  }
20371
20451
  function enterCell(token) {
20372
- this.enter({ type: "tableCell", children: [] }, token);
20452
+ this.enter({ type: "tableCell", children: [], position: undefined }, token);
20373
20453
  }
20374
20454
  function exitCodeText(token) {
20375
20455
  let value = this.resume();
@@ -20386,11 +20466,20 @@ function replace($0, $1) {
20386
20466
  }
20387
20467
  function gfmTableToMarkdown(options) {
20388
20468
  const settings = options || {};
20389
- const padding = settings.tableCellPadding;
20390
- const alignDelimiters = settings.tablePipeAlign;
20391
- const stringLength = settings.stringLength;
20469
+ const {
20470
+ tableCellPadding: padding,
20471
+ tablePipeAlign: alignDelimiters,
20472
+ stringLength
20473
+ } = settings;
20392
20474
  const around = padding ? " " : "|";
20393
20475
  return {
20476
+ handlers: {
20477
+ inlineCode: inlineCodeWithTable,
20478
+ table: handleTable,
20479
+ tableCell: handleTableCell,
20480
+ tableRow: handleTableRow
20481
+ },
20482
+ join: [joinTable],
20394
20483
  unsafe: [
20395
20484
  { character: "\r", inConstruct: "tableCell" },
20396
20485
  { character: `
@@ -20399,16 +20488,24 @@ function gfmTableToMarkdown(options) {
20399
20488
  { character: "|", inConstruct: "tableCell" },
20400
20489
  { atBreak: true, character: ":", after: "-" },
20401
20490
  { atBreak: true, character: "-", after: "[:|-]" }
20402
- ],
20403
- handlers: {
20404
- inlineCode: inlineCodeWithTable,
20405
- table: handleTable,
20406
- tableCell: handleTableCell,
20407
- tableRow: handleTableRow
20408
- }
20491
+ ]
20409
20492
  };
20410
20493
  function handleTable(node, _, state, info) {
20411
- return serializeData(handleTableAsData(node, state, info), node.align);
20494
+ const matrix = handleTableAsData(node, state, info);
20495
+ const head = matrix[0];
20496
+ if (head) {
20497
+ let columns = node.align ? node.align.length : 0;
20498
+ let index = -1;
20499
+ if (!columns) {
20500
+ while (++index < matrix.length) {
20501
+ if (matrix[index].length > columns)
20502
+ columns = matrix[index].length;
20503
+ }
20504
+ }
20505
+ while (head.length < columns)
20506
+ head.push("");
20507
+ }
20508
+ return serializeData(matrix, node.align);
20412
20509
  }
20413
20510
  function handleTableRow(node, _, state, info) {
20414
20511
  const row = handleTableRowAsData(node, state, info);
@@ -20432,12 +20529,13 @@ function gfmTableToMarkdown(options) {
20432
20529
  return markdownTable(matrix, {
20433
20530
  align,
20434
20531
  alignDelimiters,
20532
+ fillRows: false,
20435
20533
  padding,
20436
20534
  stringLength
20437
20535
  });
20438
20536
  }
20439
20537
  function handleTableAsData(node, state, info) {
20440
- const children = node.children;
20538
+ const { children } = node;
20441
20539
  let index = -1;
20442
20540
  const result = [];
20443
20541
  const subexit = state.enter("table");
@@ -20448,7 +20546,7 @@ function gfmTableToMarkdown(options) {
20448
20546
  return result;
20449
20547
  }
20450
20548
  function handleTableRowAsData(node, state, info) {
20451
- const children = node.children;
20549
+ const { children } = node;
20452
20550
  let index = -1;
20453
20551
  const result = [];
20454
20552
  const subexit = state.enter("tableRow");
@@ -20459,16 +20557,47 @@ function gfmTableToMarkdown(options) {
20459
20557
  return result;
20460
20558
  }
20461
20559
  function inlineCodeWithTable(node, parent, state) {
20462
- let value = handle.inlineCode(node, parent, state);
20463
- if (state.stack.includes("tableCell")) {
20464
- value = value.replace(/\|/g, "\\$&");
20560
+ const value = handle.inlineCode(node, parent, state);
20561
+ if (!state.stack.includes("tableCell"))
20562
+ return value;
20563
+ const result = [];
20564
+ let start = 0;
20565
+ let index = value.indexOf("|");
20566
+ while (index !== -1) {
20567
+ let before = index;
20568
+ while (before > start && value.charCodeAt(before - 1) === 92) {
20569
+ before--;
20570
+ }
20571
+ result.push(value.slice(start, index));
20572
+ if ((index - before) % 2 === 0)
20573
+ result.push("\\");
20574
+ start = index;
20575
+ index = value.indexOf("|", index + 1);
20465
20576
  }
20466
- return value;
20577
+ result.push(value.slice(start));
20578
+ return result.join("");
20467
20579
  }
20468
20580
  }
20581
+ function joinTable(left, right, parent, state) {
20582
+ 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")) {
20583
+ return 1;
20584
+ }
20585
+ }
20586
+ function formatHeadingAsSetext2(node, state) {
20587
+ let literalWithBreak = false;
20588
+ visit(node, function(node) {
20589
+ if (node.type === "break" || "value" in node && /\r?\n|\r/.test(node.value)) {
20590
+ literalWithBreak = true;
20591
+ return EXIT2;
20592
+ }
20593
+ });
20594
+ return Boolean((!node.depth || node.depth < 3) && toString(node) && (state.options.setext || literalWithBreak));
20595
+ }
20469
20596
  var init_lib18 = __esm(() => {
20470
20597
  init_development();
20471
20598
  init_mdast_util_to_markdown();
20599
+ init_mdast_util_to_string();
20600
+ init_unist_util_visit();
20472
20601
  });
20473
20602
 
20474
20603
  // ../../node_modules/mdast-util-gfm-table/index.js
@@ -20488,8 +20617,8 @@ function gfmTaskListItemFromMarkdown() {
20488
20617
  }
20489
20618
  function gfmTaskListItemToMarkdown() {
20490
20619
  return {
20491
- unsafe: [{ atBreak: true, character: "-", after: "[:|-]" }],
20492
- handlers: { listItem: listItemWithTaskListItem }
20620
+ handlers: { paragraph: paragraphWithTaskListItem },
20621
+ join: [joinDefinitionsBeforeTaskListItemParagraph]
20493
20622
  };
20494
20623
  }
20495
20624
  function exitCheck(token) {
@@ -20506,46 +20635,58 @@ function exitParagraphWithTaskListItem(token) {
20506
20635
  if (head && head.type === "text") {
20507
20636
  const siblings = parent.children;
20508
20637
  let index = -1;
20509
- let firstParaghraph;
20638
+ let firstParagraph;
20510
20639
  while (++index < siblings.length) {
20511
20640
  const sibling = siblings[index];
20512
20641
  if (sibling.type === "paragraph") {
20513
- firstParaghraph = sibling;
20642
+ firstParagraph = sibling;
20514
20643
  break;
20515
20644
  }
20516
20645
  }
20517
- if (firstParaghraph === node) {
20646
+ if (firstParagraph === node) {
20518
20647
  head.value = head.value.slice(1);
20519
20648
  if (head.value.length === 0) {
20520
20649
  node.children.shift();
20521
20650
  } else if (node.position && head.position && typeof head.position.start.offset === "number") {
20522
20651
  head.position.start.column++;
20523
20652
  head.position.start.offset++;
20524
- node.position.start = Object.assign({}, head.position.start);
20653
+ node.position.start = { ...head.position.start };
20525
20654
  }
20526
20655
  }
20527
20656
  }
20528
20657
  }
20529
20658
  this.exit(token);
20530
20659
  }
20531
- function listItemWithTaskListItem(node, parent, state, info) {
20532
- const head = node.children[0];
20533
- const checkable = typeof node.checked === "boolean" && head && head.type === "paragraph";
20534
- const checkbox = "[" + (node.checked ? "x" : " ") + "] ";
20660
+ function paragraphWithTaskListItem(node, parent, state, info) {
20661
+ if (!parent || parent.type !== "listItem" || taskListItemParagraph(parent) !== node) {
20662
+ return handle.paragraph(node, parent, state, info);
20663
+ }
20664
+ const checkbox = "[" + (parent.checked ? "x" : " ") + "] ";
20535
20665
  const tracker = state.createTracker(info);
20536
- if (checkable) {
20537
- tracker.move(checkbox);
20666
+ tracker.move(checkbox);
20667
+ const value = handle.paragraph(node.children.length > 0 ? node : { type: "paragraph", children: [{ type: "text", value: " " }] }, parent, state, { ...info, ...tracker.current() });
20668
+ return checkbox + value;
20669
+ }
20670
+ function joinDefinitionsBeforeTaskListItemParagraph(left, _, parent) {
20671
+ if (!(left.type === "definition" && parent.type === "listItem")) {
20672
+ return;
20538
20673
  }
20539
- let value = handle.listItem(node, parent, state, {
20540
- ...info,
20541
- ...tracker.current()
20542
- });
20543
- if (checkable) {
20544
- value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check);
20674
+ const paragraph = taskListItemParagraph(parent);
20675
+ if (paragraph && parent.children.indexOf(left) < parent.children.indexOf(paragraph)) {
20676
+ return 0;
20545
20677
  }
20546
- return value;
20547
- function check($0) {
20548
- return $0 + checkbox;
20678
+ }
20679
+ function taskListItemParagraph(node) {
20680
+ if (typeof node.checked !== "boolean") {
20681
+ return;
20682
+ }
20683
+ for (const child of node.children) {
20684
+ if (child.type === "paragraph") {
20685
+ return child;
20686
+ }
20687
+ if (child.type !== "definition") {
20688
+ return;
20689
+ }
20549
20690
  }
20550
20691
  }
20551
20692
  var init_lib19 = __esm(() => {
@@ -25238,37 +25379,50 @@ var init_hastscript = __esm(() => {
25238
25379
  function location(file) {
25239
25380
  const value = String(file);
25240
25381
  const indices = [];
25382
+ let cr = -1;
25383
+ let lf = -1;
25241
25384
  return { toOffset, toPoint };
25385
+ function grow() {
25386
+ const from = indices.at(-1) ?? 0;
25387
+ if (cr < from) {
25388
+ cr = value.indexOf("\r", from);
25389
+ if (cr === -1)
25390
+ cr = Infinity;
25391
+ }
25392
+ if (lf < from) {
25393
+ lf = value.indexOf(`
25394
+ `, from);
25395
+ if (lf === -1)
25396
+ lf = Infinity;
25397
+ }
25398
+ const eol = cr + 1 === lf ? lf : Math.min(cr, lf);
25399
+ indices.push((eol === Infinity ? value.length : eol) + 1);
25400
+ }
25242
25401
  function toPoint(offset) {
25243
25402
  if (typeof offset === "number" && offset > -1 && offset <= value.length) {
25244
- let index = 0;
25245
- while (true) {
25246
- let end = indices[index];
25247
- if (end === undefined) {
25248
- const eol = next(value, indices[index - 1]);
25249
- end = eol === -1 ? value.length + 1 : eol + 1;
25250
- indices[index] = end;
25251
- }
25252
- if (end > offset) {
25253
- return {
25254
- line: index + 1,
25255
- column: offset - (index > 0 ? indices[index - 1] : 0) + 1,
25256
- offset
25257
- };
25403
+ while ((indices.at(-1) ?? 0) <= offset)
25404
+ grow();
25405
+ let low = 0;
25406
+ let high = indices.length - 1;
25407
+ while (low < high) {
25408
+ const middle = Math.floor((low + high) / 2);
25409
+ if (indices[middle] > offset) {
25410
+ high = middle;
25411
+ } else {
25412
+ low = middle + 1;
25258
25413
  }
25259
- index++;
25260
25414
  }
25415
+ return {
25416
+ line: low + 1,
25417
+ column: offset - (low > 0 ? indices[low - 1] : 0) + 1,
25418
+ offset
25419
+ };
25261
25420
  }
25262
25421
  }
25263
25422
  function toOffset(point) {
25264
- if (point && typeof point.line === "number" && typeof point.column === "number" && !Number.isNaN(point.line) && !Number.isNaN(point.column)) {
25265
- while (indices.length < point.line) {
25266
- const from = indices[indices.length - 1];
25267
- const eol = next(value, from);
25268
- const end = eol === -1 ? value.length + 1 : eol + 1;
25269
- if (from === end)
25270
- break;
25271
- indices.push(end);
25423
+ if (point && typeof point.line === "number" && typeof point.column === "number" && !Number.isNaN(point.line) && point.column > 0) {
25424
+ while (indices.length < point.line && (indices.at(-1) ?? 0) <= value.length) {
25425
+ grow();
25272
25426
  }
25273
25427
  const offset = (point.line > 1 ? indices[point.line - 2] : 0) + point.column - 1;
25274
25428
  if (offset < indices[point.line - 1])
@@ -25276,16 +25430,6 @@ function location(file) {
25276
25430
  }
25277
25431
  }
25278
25432
  }
25279
- function next(value, from) {
25280
- const cr = value.indexOf("\r", from);
25281
- const lf = value.indexOf(`
25282
- `, from);
25283
- if (lf === -1)
25284
- return cr;
25285
- if (cr === -1 || cr + 1 === lf)
25286
- return lf;
25287
- return cr < lf ? cr : lf;
25288
- }
25289
25433
 
25290
25434
  // ../../node_modules/vfile-location/index.js
25291
25435
  var init_vfile_location = () => {};
@@ -25654,8 +25798,11 @@ class Preprocessor {
25654
25798
  get col() {
25655
25799
  return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);
25656
25800
  }
25801
+ get codePointStart() {
25802
+ return this.pos - Number(this.lastGapPos === this.pos);
25803
+ }
25657
25804
  get offset() {
25658
- return this.droppedBufferSize + this.pos;
25805
+ return this.droppedBufferSize + this.codePointStart;
25659
25806
  }
25660
25807
  getError(code, cpOffset) {
25661
25808
  const { line, col, offset } = this;
@@ -25684,7 +25831,7 @@ class Preprocessor {
25684
25831
  _processSurrogate(cp) {
25685
25832
  if (this.pos !== this.html.length - 1) {
25686
25833
  const nextCp = this.html.charCodeAt(this.pos + 1);
25687
- if (isSurrogatePair(nextCp)) {
25834
+ if (!isSurrogatePair(cp) && isSurrogatePair(nextCp)) {
25688
25835
  this.pos++;
25689
25836
  this._addGap();
25690
25837
  return getSurrogatePairCodePoint(cp, nextCp);
@@ -25699,14 +25846,17 @@ class Preprocessor {
25699
25846
  willDropParsedChunk() {
25700
25847
  return this.pos > this.bufferWaterline;
25701
25848
  }
25702
- dropParsedChunk() {
25849
+ dropParsedChunk(keep = 0) {
25703
25850
  if (this.willDropParsedChunk()) {
25704
- this.html = this.html.substring(this.pos);
25705
- this.lineStartPos -= this.pos;
25706
- this.droppedBufferSize += this.pos;
25707
- this.pos = 0;
25851
+ const droppedSize = this.offset - this.droppedBufferSize - keep;
25852
+ this.html = this.html.substring(droppedSize);
25853
+ this.lineStartPos -= droppedSize;
25854
+ this.droppedBufferSize += droppedSize;
25855
+ this.pos -= droppedSize;
25708
25856
  this.lastGapPos = -2;
25709
25857
  this.gapStack.length = 0;
25858
+ if (this.pos > keep)
25859
+ this._addGap();
25710
25860
  }
25711
25861
  }
25712
25862
  write(chunk, isLastChunk) {
@@ -25830,313 +25980,550 @@ var init_token = __esm(() => {
25830
25980
  })(TokenType || (TokenType = {}));
25831
25981
  });
25832
25982
 
25833
- // ../../node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js
25834
- var htmlDecodeTree;
25835
- var init_decode_data_html = __esm(() => {
25836
- 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)));
25837
- });
25838
-
25839
- // ../../node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js
25983
+ // ../../node_modules/parse5/node_modules/entities/dist/decode-codepoint.js
25984
+ function isInvalidCodePoint(codePoint) {
25985
+ return codePoint === 0 || codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111;
25986
+ }
25840
25987
  function replaceCodePoint(codePoint) {
25841
- var _a;
25842
- if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
25988
+ if (isInvalidCodePoint(codePoint)) {
25843
25989
  return 65533;
25844
25990
  }
25845
- return (_a = decodeMap.get(codePoint)) !== null && _a !== undefined ? _a : codePoint;
25991
+ if (codePoint >= 128 && codePoint <= 159) {
25992
+ return c1[codePoint - 128] || codePoint;
25993
+ }
25994
+ return codePoint;
25846
25995
  }
25847
- var _a, decodeMap, fromCodePoint;
25996
+ var c1;
25848
25997
  var init_decode_codepoint = __esm(() => {
25849
- decodeMap = new Map([
25850
- [0, 65533],
25851
- [128, 8364],
25852
- [130, 8218],
25853
- [131, 402],
25854
- [132, 8222],
25855
- [133, 8230],
25856
- [134, 8224],
25857
- [135, 8225],
25858
- [136, 710],
25859
- [137, 8240],
25860
- [138, 352],
25861
- [139, 8249],
25862
- [140, 338],
25863
- [142, 381],
25864
- [145, 8216],
25865
- [146, 8217],
25866
- [147, 8220],
25867
- [148, 8221],
25868
- [149, 8226],
25869
- [150, 8211],
25870
- [151, 8212],
25871
- [152, 732],
25872
- [153, 8482],
25873
- [154, 353],
25874
- [155, 8250],
25875
- [156, 339],
25876
- [158, 382],
25877
- [159, 376]
25878
- ]);
25879
- fromCodePoint = (_a = String.fromCodePoint) !== null && _a !== undefined ? _a : function(codePoint) {
25880
- let output = "";
25881
- if (codePoint > 65535) {
25882
- codePoint -= 65536;
25883
- output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
25884
- codePoint = 56320 | codePoint & 1023;
25885
- }
25886
- output += String.fromCharCode(codePoint);
25887
- return output;
25998
+ c1 = [
25999
+ 8364,
26000
+ 0,
26001
+ 8218,
26002
+ 402,
26003
+ 8222,
26004
+ 8230,
26005
+ 8224,
26006
+ 8225,
26007
+ 710,
26008
+ 8240,
26009
+ 352,
26010
+ 8249,
26011
+ 338,
26012
+ 0,
26013
+ 381,
26014
+ 0,
26015
+ 0,
26016
+ 8216,
26017
+ 8217,
26018
+ 8220,
26019
+ 8221,
26020
+ 8226,
26021
+ 8211,
26022
+ 8212,
26023
+ 732,
26024
+ 8482,
26025
+ 353,
26026
+ 8250,
26027
+ 339,
26028
+ 0,
26029
+ 382,
26030
+ 376
26031
+ ];
26032
+ });
26033
+
26034
+ // ../../node_modules/parse5/node_modules/entities/dist/generated/decode-data-html.js
26035
+ var htmlDecodeData;
26036
+ var init_decode_data_html = __esm(() => {
26037
+ 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ℳΜЊŃŇŅН​​​​≫≪
26038
+ \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‍‌`];
26039
+ });
26040
+
26041
+ // ../../node_modules/parse5/node_modules/entities/dist/internal/decode-data-format.js
26042
+ function exactKey(text, nameStart, length) {
26043
+ 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;
26044
+ }
26045
+ function pairIndex(c0, c1) {
26046
+ return (c0 * 3 << 3 ^ c1) & PAIR_TABLE_SIZE - 1;
26047
+ }
26048
+ function bucketOne(key, buckets) {
26049
+ return (Math.imul(key, BUCKET_HASH_1) >>> 16) * buckets >>> 16;
26050
+ }
26051
+ function bucketTwo(key, buckets) {
26052
+ return (Math.imul(key, BUCKET_HASH_2) >>> 16) * buckets >>> 16;
26053
+ }
26054
+ function initDecodeData(packed) {
26055
+ const [data, values] = packed;
26056
+ const nameCount = data.charCodeAt(0) - HEADER_BIAS << 6 | data.charCodeAt(1) - HEADER_BIAS;
26057
+ const suffixesLength = data.charCodeAt(2) - HEADER_BIAS << 6 | data.charCodeAt(3) - HEADER_BIAS;
26058
+ const buckets = data.charCodeAt(4) - HEADER_BIAS << 6 | data.charCodeAt(5) - HEADER_BIAS;
26059
+ const metaStart = HEADER_LENGTH + suffixesLength;
26060
+ const choicesStart = metaStart + 2 * nameCount;
26061
+ const slotCount = 2 * buckets;
26062
+ const keys = new Int32Array(slotCount);
26063
+ const slotMidOff = new Uint16Array(slotCount);
26064
+ const slotValue = new Uint16Array(slotCount);
26065
+ const lengthBits = new Uint32Array(PAIR_TABLE_SIZE);
26066
+ const middleOffsets = new Map;
26067
+ const middles = [];
26068
+ let name = "";
26069
+ let suffixOffset = HEADER_LENGTH;
26070
+ let valueOffset = 0;
26071
+ for (let index = 0;index < nameCount; index++) {
26072
+ const meta0 = data.charCodeAt(metaStart + 2 * index) - META_BIAS;
26073
+ const meta1 = data.charCodeAt(metaStart + 2 * index + 1) - META_BIAS;
26074
+ const prefixLength = meta0 & 31;
26075
+ const length = prefixLength + (meta1 & 31);
26076
+ const valueLength = (meta1 >> 5) + 1;
26077
+ name = name.slice(0, prefixLength) + data.slice(suffixOffset, suffixOffset + length - prefixLength);
26078
+ suffixOffset += length - prefixLength;
26079
+ const key = exactKey(name, 0, length);
26080
+ const choice = data.charCodeAt(choicesStart + Math.floor(index / CHOICE_BITS_PER_CHAR)) - HEADER_BIAS & 1 << index % CHOICE_BITS_PER_CHAR;
26081
+ let slot = 2 * (choice === 0 ? bucketOne : bucketTwo)(key, buckets);
26082
+ if (keys[slot] !== 0)
26083
+ slot += 1;
26084
+ keys[slot] = key;
26085
+ if (length > 4) {
26086
+ const middle = name.slice(2, length - 2);
26087
+ const existing = middleOffsets.get(middle);
26088
+ if (existing === undefined) {
26089
+ middleOffsets.set(middle, middles.length);
26090
+ slotMidOff[slot] = middles.length;
26091
+ for (let middleIndex = 0;middleIndex < middle.length; middleIndex += 2) {
26092
+ middles.push(middle.charCodeAt(middleIndex) | middle.charCodeAt(middleIndex + 1) << 16);
26093
+ }
26094
+ } else {
26095
+ slotMidOff[slot] = existing;
26096
+ }
26097
+ }
26098
+ const pair = pairIndex(name.charCodeAt(0), name.charCodeAt(1));
26099
+ lengthBits[pair] |= length <= 16 ? 1 << length - 2 : 32768;
26100
+ if ((meta0 & 32) !== 0) {
26101
+ lengthBits[pair] |= 1 << length - 2 + 16;
26102
+ }
26103
+ slotValue[slot] = valueOffset << 2 | valueLength - 1 | (meta0 & 32) >> 4;
26104
+ valueOffset += valueLength;
26105
+ }
26106
+ return {
26107
+ keys,
26108
+ buckets,
26109
+ slotMidOff,
26110
+ slotValue,
26111
+ values,
26112
+ lengthBits,
26113
+ middles: new Uint32Array(middles)
25888
26114
  };
26115
+ }
26116
+ 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;
26117
+ var init_decode_data_format = __esm(() => {
26118
+ CHAR_REMAP = (() => {
26119
+ const remap = new Uint8Array(128);
26120
+ for (let code = 48;code <= 57; code++)
26121
+ remap[code] = code - 47;
26122
+ for (let code = 65;code <= 90; code++)
26123
+ remap[code] = code - 54;
26124
+ for (let code = 97;code <= 122; code++)
26125
+ remap[code] = code - 60;
26126
+ return remap;
26127
+ })();
25889
26128
  });
25890
26129
 
25891
- // ../../node_modules/parse5/node_modules/entities/dist/esm/decode.js
26130
+ // ../../node_modules/parse5/node_modules/entities/dist/decode.js
25892
26131
  function isNumber2(code) {
25893
- return code >= CharCodes.ZERO && code <= CharCodes.NINE;
26132
+ return code - CHAR_ZERO >>> 0 <= 9;
25894
26133
  }
25895
- function isHexadecimalCharacter(code) {
25896
- return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
25897
- }
25898
- function isAsciiAlphaNumeric(code) {
25899
- return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber2(code);
26134
+ function isAlphaNumeric(code) {
26135
+ return isNumber2(code) || (code | TO_LOWER_BIT) - CHAR_LOWER_A >>> 0 <= 25;
25900
26136
  }
25901
26137
  function isEntityInAttributeInvalidEnd(code) {
25902
- return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
26138
+ return code === CHAR_EQUALS || isAlphaNumeric(code);
26139
+ }
26140
+ function findSlotHtml(text, start, length) {
26141
+ const c0 = text.charCodeAt(start);
26142
+ const c1 = text.charCodeAt(start + 1);
26143
+ const c2 = text.charCodeAt(start + length - 2);
26144
+ const c3 = text.charCodeAt(start + length - 1);
26145
+ if ((c0 | c1 | c2 | c3) > 127)
26146
+ return -1;
26147
+ const key = c0 << 25 | c1 << 18 | c2 << 11 | CHAR_REMAP[c3] << 5 | length;
26148
+ let slot = 2 * ((Math.imul(key, BUCKET_HASH_1) >>> 16) * htmlBuckets >>> 16);
26149
+ for (let attempt = 0;; attempt++) {
26150
+ if (htmlKeys[slot] === key && (length <= 4 || isMidMatchHtml(slot, text, start, length))) {
26151
+ return slot;
26152
+ }
26153
+ if (htmlKeys[slot + 1] === key && (length <= 4 || isMidMatchHtml(slot + 1, text, start, length))) {
26154
+ return slot + 1;
26155
+ }
26156
+ if (attempt === 1)
26157
+ return -1;
26158
+ slot = 2 * ((Math.imul(key, BUCKET_HASH_2) >>> 16) * htmlBuckets >>> 16);
26159
+ }
25903
26160
  }
25904
-
25905
- class EntityDecoder {
25906
- constructor(decodeTree, emitCodePoint, errors) {
25907
- this.decodeTree = decodeTree;
25908
- this.emitCodePoint = emitCodePoint;
25909
- this.errors = errors;
25910
- this.state = EntityDecoderState.EntityStart;
25911
- this.consumed = 1;
25912
- this.result = 0;
25913
- this.treeIndex = 0;
25914
- this.excess = 1;
25915
- this.decodeMode = DecodingMode.Strict;
26161
+ function isMidMatchHtml(slot, text, start, length) {
26162
+ let wordIndex = htmlSlotMidOff[slot];
26163
+ let index = start + 2;
26164
+ const end = start + length - 2;
26165
+ while (index + 1 < end) {
26166
+ if ((text.charCodeAt(index) | text.charCodeAt(index + 1) << 16) !== htmlMiddles[wordIndex++])
26167
+ return false;
26168
+ index += 2;
25916
26169
  }
25917
- startEntity(decodeMode) {
25918
- this.decodeMode = decodeMode;
25919
- this.state = EntityDecoderState.EntityStart;
25920
- this.result = 0;
25921
- this.treeIndex = 0;
25922
- this.excess = 1;
25923
- this.consumed = 1;
26170
+ return index === end || text.charCodeAt(index) === (htmlMiddles[wordIndex] & 65535);
26171
+ }
26172
+ function findLegacySlot(input, start, maxLength) {
26173
+ let legacy = htmlLengthBits[pairIndex(input.charCodeAt(start), input.charCodeAt(start + 1))] >>> 16 & 31;
26174
+ while (legacy !== 0) {
26175
+ const top = 31 - Math.clz32(legacy);
26176
+ legacy ^= 1 << top;
26177
+ if (top + 2 > maxLength)
26178
+ continue;
26179
+ const slot = findSlotHtml(input, start, top + 2);
26180
+ if (slot >= 0 && (htmlSlotValue[slot] & 2) !== 0) {
26181
+ return slot << 3 | top + 2;
26182
+ }
25924
26183
  }
25925
- write(input, offset) {
25926
- switch (this.state) {
25927
- case EntityDecoderState.EntityStart: {
25928
- if (input.charCodeAt(offset) === CharCodes.NUM) {
25929
- this.state = EntityDecoderState.NumericStart;
25930
- this.consumed += 1;
25931
- return this.stateNumericStart(input, offset + 1);
25932
- }
25933
- this.state = EntityDecoderState.NamedEntity;
25934
- return this.stateNamedEntity(input, offset);
25935
- }
25936
- case EntityDecoderState.NumericStart: {
25937
- return this.stateNumericStart(input, offset);
25938
- }
25939
- case EntityDecoderState.NumericDecimal: {
25940
- return this.stateNumericDecimal(input, offset);
25941
- }
25942
- case EntityDecoderState.NumericHex: {
25943
- return this.stateNumericHex(input, offset);
25944
- }
25945
- case EntityDecoderState.NamedEntity: {
25946
- return this.stateNamedEntity(input, offset);
25947
- }
26184
+ return -1;
26185
+ }
26186
+ function findLongClassMatch(input, start, mode) {
26187
+ const length = input.slice(start, start + 32).indexOf(";");
26188
+ if (length - 2 >>> 0 <= 29) {
26189
+ const slot = findSlotHtml(input, start, length);
26190
+ if (slot >= 0)
26191
+ return slot << 6 | length + 1;
26192
+ }
26193
+ if (mode !== DecodingMode.Strict) {
26194
+ const packed = findLegacySlot(input, start, Math.min(31, input.length - start));
26195
+ if (packed >= 0) {
26196
+ const length = packed & 7;
26197
+ if (mode !== DecodingMode.Attribute || start + length >= input.length || !isEntityInAttributeInvalidEnd(input.charCodeAt(start + length)))
26198
+ return packed >> 3 << 6 | length;
25948
26199
  }
25949
26200
  }
26201
+ return -1;
26202
+ }
26203
+
26204
+ class EntityDecoderBase {
26205
+ emitCodePoint;
26206
+ errors;
26207
+ state = STATE_ENTITY_START;
26208
+ consumed = 1;
26209
+ result = 0;
26210
+ decodeMode = DecodingMode.Strict;
26211
+ replaceNumericCodePoint = replaceCodePoint;
26212
+ constructor(emitCodePoint, errors) {
26213
+ this.emitCodePoint = emitCodePoint;
26214
+ this.errors = errors;
26215
+ }
25950
26216
  stateNumericStart(input, offset) {
25951
26217
  if (offset >= input.length) {
25952
26218
  return -1;
25953
26219
  }
25954
- if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
25955
- this.state = EntityDecoderState.NumericHex;
26220
+ if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CHAR_LOWER_X) {
26221
+ this.state = STATE_NUMERIC_HEX;
25956
26222
  this.consumed += 1;
25957
26223
  return this.stateNumericHex(input, offset + 1);
25958
26224
  }
25959
- this.state = EntityDecoderState.NumericDecimal;
26225
+ this.state = STATE_NUMERIC_DECIMAL;
25960
26226
  return this.stateNumericDecimal(input, offset);
25961
26227
  }
25962
- addToNumericResult(input, start, end, base) {
25963
- if (start !== end) {
25964
- const digitCount = end - start;
25965
- this.result = this.result * Math.pow(base, digitCount) + Number.parseInt(input.substr(start, digitCount), base);
25966
- this.consumed += digitCount;
25967
- }
25968
- }
25969
26228
  stateNumericHex(input, offset) {
25970
- const startIndex = offset;
25971
- while (offset < input.length) {
25972
- const char = input.charCodeAt(offset);
25973
- if (isNumber2(char) || isHexadecimalCharacter(char)) {
25974
- offset += 1;
26229
+ const inputLength = input.length;
26230
+ let { result, consumed } = this;
26231
+ let index = offset;
26232
+ while (index < inputLength) {
26233
+ const char = input.charCodeAt(index);
26234
+ const digit = numericDigits[char];
26235
+ if (digit <= 15) {
26236
+ result = result * 16 + digit;
25975
26237
  } else {
25976
- this.addToNumericResult(input, startIndex, offset, 16);
26238
+ this.result = result;
26239
+ this.consumed = consumed;
25977
26240
  return this.emitNumericEntity(char, 3);
25978
26241
  }
26242
+ consumed += 1;
26243
+ index += 1;
25979
26244
  }
25980
- this.addToNumericResult(input, startIndex, offset, 16);
26245
+ this.result = result;
26246
+ this.consumed = consumed;
25981
26247
  return -1;
25982
26248
  }
25983
26249
  stateNumericDecimal(input, offset) {
25984
- const startIndex = offset;
25985
- while (offset < input.length) {
25986
- const char = input.charCodeAt(offset);
25987
- if (isNumber2(char)) {
25988
- offset += 1;
25989
- } else {
25990
- this.addToNumericResult(input, startIndex, offset, 10);
25991
- return this.emitNumericEntity(char, 2);
25992
- }
25993
- }
25994
- this.addToNumericResult(input, startIndex, offset, 10);
26250
+ const inputLength = input.length;
26251
+ let { result, consumed } = this;
26252
+ let index = offset;
26253
+ while (index < inputLength) {
26254
+ const digit = input.charCodeAt(index) - CHAR_ZERO;
26255
+ if (digit >>> 0 > 9) {
26256
+ this.result = result;
26257
+ this.consumed = consumed;
26258
+ return this.emitNumericEntity(digit + CHAR_ZERO, 2);
26259
+ }
26260
+ result = result * 10 + digit;
26261
+ consumed += 1;
26262
+ index += 1;
26263
+ }
26264
+ this.result = result;
26265
+ this.consumed = consumed;
25995
26266
  return -1;
25996
26267
  }
25997
26268
  emitNumericEntity(lastCp, expectedLength) {
25998
- var _a;
25999
26269
  if (this.consumed <= expectedLength) {
26000
- (_a = this.errors) === null || _a === undefined || _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
26270
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
26001
26271
  return 0;
26002
26272
  }
26003
- if (lastCp === CharCodes.SEMI) {
26273
+ if (lastCp === CHAR_SEMI) {
26004
26274
  this.consumed += 1;
26005
26275
  } else if (this.decodeMode === DecodingMode.Strict) {
26006
26276
  return 0;
26007
26277
  }
26008
- this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
26278
+ this.emitCodePoint(this.replaceNumericCodePoint(this.result), this.consumed);
26009
26279
  if (this.errors) {
26010
- if (lastCp !== CharCodes.SEMI) {
26280
+ if (lastCp !== CHAR_SEMI) {
26011
26281
  this.errors.missingSemicolonAfterCharacterReference();
26012
26282
  }
26013
26283
  this.errors.validateNumericCharacterReference(this.result);
26014
26284
  }
26015
26285
  return this.consumed;
26016
26286
  }
26017
- stateNamedEntity(input, offset) {
26018
- const { decodeTree } = this;
26019
- let current = decodeTree[this.treeIndex];
26020
- let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
26021
- for (;offset < input.length; offset++, this.excess++) {
26022
- const char = input.charCodeAt(offset);
26023
- this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
26024
- if (this.treeIndex < 0) {
26025
- return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
26026
- }
26027
- current = decodeTree[this.treeIndex];
26028
- valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
26029
- if (valueLength !== 0) {
26030
- if (char === CharCodes.SEMI) {
26031
- return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
26032
- }
26033
- if (this.decodeMode !== DecodingMode.Strict) {
26034
- this.result = this.treeIndex;
26035
- this.consumed += this.excess;
26036
- this.excess = 0;
26287
+ startEntity(decodeMode) {
26288
+ this.decodeMode = decodeMode;
26289
+ this.state = STATE_ENTITY_START;
26290
+ this.result = 0;
26291
+ this.consumed = 1;
26292
+ }
26293
+ write(input, offset) {
26294
+ switch (this.state) {
26295
+ case STATE_ENTITY_START: {
26296
+ if (input.charCodeAt(offset) === CHAR_NUM) {
26297
+ this.state = STATE_NUMERIC_START;
26298
+ this.consumed += 1;
26299
+ return this.stateNumericStart(input, offset + 1);
26037
26300
  }
26301
+ this.state = STATE_NAMED_ENTITY;
26302
+ return this.stateNamedEntity(input, offset);
26303
+ }
26304
+ case STATE_NUMERIC_START: {
26305
+ return this.stateNumericStart(input, offset);
26306
+ }
26307
+ case STATE_NUMERIC_DECIMAL: {
26308
+ return this.stateNumericDecimal(input, offset);
26309
+ }
26310
+ case STATE_NUMERIC_HEX: {
26311
+ return this.stateNumericHex(input, offset);
26312
+ }
26313
+ default: {
26314
+ return this.stateNamedEntity(input, offset);
26038
26315
  }
26039
26316
  }
26040
- return -1;
26041
- }
26042
- emitNotTerminatedNamedEntity() {
26043
- var _a;
26044
- const { result, decodeTree } = this;
26045
- const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
26046
- this.emitNamedEntityData(result, valueLength, this.consumed);
26047
- (_a = this.errors) === null || _a === undefined || _a.missingSemicolonAfterCharacterReference();
26048
- return this.consumed;
26049
- }
26050
- emitNamedEntityData(result, valueLength, consumed) {
26051
- const { decodeTree } = this;
26052
- this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
26053
- if (valueLength === 3) {
26054
- this.emitCodePoint(decodeTree[result + 2], consumed);
26055
- }
26056
- return consumed;
26057
26317
  }
26058
26318
  end() {
26059
- var _a;
26060
26319
  switch (this.state) {
26061
- case EntityDecoderState.NamedEntity: {
26062
- return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
26320
+ case STATE_NAMED_ENTITY: {
26321
+ return this.endNamedEntity();
26063
26322
  }
26064
- case EntityDecoderState.NumericDecimal: {
26323
+ case STATE_NUMERIC_DECIMAL: {
26065
26324
  return this.emitNumericEntity(0, 2);
26066
26325
  }
26067
- case EntityDecoderState.NumericHex: {
26326
+ case STATE_NUMERIC_HEX: {
26068
26327
  return this.emitNumericEntity(0, 3);
26069
26328
  }
26070
- case EntityDecoderState.NumericStart: {
26071
- (_a = this.errors) === null || _a === undefined || _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
26329
+ case STATE_NUMERIC_START: {
26330
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
26072
26331
  return 0;
26073
26332
  }
26074
- case EntityDecoderState.EntityStart: {
26333
+ default: {
26075
26334
  return 0;
26076
26335
  }
26077
26336
  }
26078
26337
  }
26079
26338
  }
26080
- function determineBranch(decodeTree, current, nodeIndex, char) {
26081
- const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
26082
- const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
26083
- if (branchCount === 0) {
26084
- return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;
26339
+ function findBufferedHtmlSlot(buffer, length) {
26340
+ const key = buffer[0] << 25 | buffer[1] << 18 | buffer[length - 2] << 11 | CHAR_REMAP[buffer[length - 1]] << 5 | length;
26341
+ let slot = 2 * ((Math.imul(key, BUCKET_HASH_1) >>> 16) * htmlBuckets >>> 16);
26342
+ for (let attempt = 0;; attempt++) {
26343
+ if (htmlKeys[slot] === key && (length <= 4 || isBufferedMiddle(slot, buffer, length)))
26344
+ return slot;
26345
+ if (htmlKeys[slot + 1] === key && (length <= 4 || isBufferedMiddle(slot + 1, buffer, length)))
26346
+ return slot + 1;
26347
+ if (attempt === 1)
26348
+ return -1;
26349
+ slot = 2 * ((Math.imul(key, BUCKET_HASH_2) >>> 16) * htmlBuckets >>> 16);
26085
26350
  }
26086
- if (jumpOffset) {
26087
- const value = char - jumpOffset;
26088
- return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1;
26351
+ }
26352
+ function isBufferedMiddle(slot, buffer, length) {
26353
+ let wordIndex = htmlSlotMidOff[slot];
26354
+ let index = 2;
26355
+ const end = length - 2;
26356
+ while (index + 1 < end) {
26357
+ if ((buffer[index] | buffer[index + 1] << 16) !== htmlMiddles[wordIndex++])
26358
+ return false;
26359
+ index += 2;
26089
26360
  }
26090
- let lo = nodeIndex;
26091
- let hi = lo + branchCount - 1;
26092
- while (lo <= hi) {
26093
- const mid = lo + hi >>> 1;
26094
- const midValue = decodeTree[mid];
26095
- if (midValue < char) {
26096
- lo = mid + 1;
26097
- } else if (midValue > char) {
26098
- hi = mid - 1;
26099
- } else {
26100
- return decodeTree[mid + branchCount];
26101
- }
26361
+ return index === end || buffer[index] === (htmlMiddles[wordIndex] & 65535);
26362
+ }
26363
+ function findBufferedLegacySlot(buffer, length) {
26364
+ let legacy = htmlLengthBits[pairIndex(buffer[0], buffer[1])] >>> 16 & 31;
26365
+ while (legacy !== 0) {
26366
+ const top = 31 - Math.clz32(legacy);
26367
+ legacy ^= 1 << top;
26368
+ if (top + 2 > length)
26369
+ continue;
26370
+ const slot = findBufferedHtmlSlot(buffer, top + 2);
26371
+ if (slot >= 0 && (htmlSlotValue[slot] & 2) !== 0)
26372
+ return slot << 3 | top + 2;
26102
26373
  }
26103
26374
  return -1;
26104
26375
  }
26105
- var CharCodes, TO_LOWER_BIT = 32, BinTrieFlags, EntityDecoderState, DecodingMode;
26376
+ 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;
26106
26377
  var init_decode = __esm(() => {
26107
26378
  init_decode_codepoint();
26108
26379
  init_decode_data_html();
26109
- (function(CharCodes) {
26110
- CharCodes[CharCodes["NUM"] = 35] = "NUM";
26111
- CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
26112
- CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
26113
- CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
26114
- CharCodes[CharCodes["NINE"] = 57] = "NINE";
26115
- CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
26116
- CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
26117
- CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
26118
- CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
26119
- CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
26120
- CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
26121
- CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
26122
- })(CharCodes || (CharCodes = {}));
26123
- (function(BinTrieFlags) {
26124
- BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
26125
- BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
26126
- BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
26127
- })(BinTrieFlags || (BinTrieFlags = {}));
26128
- (function(EntityDecoderState) {
26129
- EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
26130
- EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
26131
- EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
26132
- EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
26133
- EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
26134
- })(EntityDecoderState || (EntityDecoderState = {}));
26380
+ init_decode_data_format();
26135
26381
  (function(DecodingMode) {
26136
26382
  DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
26137
26383
  DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
26138
26384
  DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
26139
26385
  })(DecodingMode || (DecodingMode = {}));
26386
+ htmlDecode = /* @__PURE__ */ initDecodeData(htmlDecodeData);
26387
+ htmlKeys = /* @__PURE__ */ (() => htmlDecode.keys)();
26388
+ htmlBuckets = /* @__PURE__ */ (() => htmlDecode.buckets)();
26389
+ htmlSlotMidOff = /* @__PURE__ */ (() => htmlDecode.slotMidOff)();
26390
+ htmlLengthBits = /* @__PURE__ */ (() => htmlDecode.lengthBits)();
26391
+ htmlMiddles = /* @__PURE__ */ (() => htmlDecode.middles)();
26392
+ htmlSlotValue = /* @__PURE__ */ (() => htmlDecode.slotValue)();
26393
+ htmlValues = /* @__PURE__ */ (() => htmlDecode.values)();
26394
+ numericDigits = /* @__PURE__ */ (() => {
26395
+ const digits = new Uint8Array(128).fill(255);
26396
+ for (let digit = 0;digit < 10; digit++) {
26397
+ digits[CHAR_ZERO + digit] = digit;
26398
+ }
26399
+ for (let digit = 0;digit < 6; digit++) {
26400
+ digits[CHAR_UPPER_A + digit] = digit + 10;
26401
+ digits[CHAR_LOWER_A + digit] = digit + 10;
26402
+ }
26403
+ return digits;
26404
+ })();
26405
+ HtmlEntityDecoder = class HtmlEntityDecoder extends EntityDecoderBase {
26406
+ runLength = 0;
26407
+ nameBuffer = new Uint8Array(32);
26408
+ emitSlot(slot) {
26409
+ const packed = htmlSlotValue[slot];
26410
+ const off = packed >> 2;
26411
+ this.emitCodePoint(htmlValues.charCodeAt(off), this.consumed);
26412
+ if ((packed & 1) !== 0) {
26413
+ this.emitCodePoint(htmlValues.charCodeAt(off + 1), this.consumed);
26414
+ }
26415
+ }
26416
+ startEntity(decodeMode) {
26417
+ super.startEntity(decodeMode);
26418
+ this.runLength = 0;
26419
+ }
26420
+ stateNamedEntity(input, offset) {
26421
+ const inputLength = input.length;
26422
+ if (this.runLength === 0 && offset + 17 <= inputLength) {
26423
+ const c0 = input.charCodeAt(offset);
26424
+ const pair = pairIndex(c0, input.charCodeAt(offset + 1));
26425
+ const bits = htmlLengthBits[pair];
26426
+ if ((bits & 32768) !== 0 && offset + 32 <= inputLength) {
26427
+ const packed = findLongClassMatch(input, offset, this.decodeMode);
26428
+ if (packed >= 0) {
26429
+ const length = packed & 63;
26430
+ this.consumed = length + 1;
26431
+ this.emitSlot(packed >> 6);
26432
+ if (input.charCodeAt(offset + length - 1) !== CHAR_SEMI) {
26433
+ this.errors?.missingSemicolonAfterCharacterReference();
26434
+ }
26435
+ return this.consumed;
26436
+ }
26437
+ return 0;
26438
+ }
26439
+ let probed = bits & 32767;
26440
+ while (probed !== 0) {
26441
+ const low = probed & -probed;
26442
+ probed ^= low;
26443
+ const length = 33 - Math.clz32(low);
26444
+ if (input.charCodeAt(offset + length) === CHAR_SEMI) {
26445
+ const slot = findSlotHtml(input, offset, length);
26446
+ if (slot >= 0) {
26447
+ this.consumed = length + 2;
26448
+ this.emitSlot(slot);
26449
+ return this.consumed;
26450
+ }
26451
+ }
26452
+ }
26453
+ if ((bits & 32768) === 0) {
26454
+ if (this.decodeMode !== DecodingMode.Strict) {
26455
+ const packed = findLegacySlot(input, offset, 31);
26456
+ if (packed >= 0) {
26457
+ const matchLength = packed & 7;
26458
+ const next = input.charCodeAt(offset + matchLength);
26459
+ if (this.decodeMode === DecodingMode.Attribute && isEntityInAttributeInvalidEnd(next)) {
26460
+ return 0;
26461
+ }
26462
+ this.consumed = matchLength + 1;
26463
+ this.emitSlot(packed >> 3);
26464
+ this.errors?.missingSemicolonAfterCharacterReference();
26465
+ return this.consumed;
26466
+ }
26467
+ }
26468
+ return 0;
26469
+ }
26470
+ }
26471
+ let index = offset;
26472
+ let { runLength } = this;
26473
+ let terminator = -1;
26474
+ const scanEnd = Math.min(inputLength, offset + 32 - runLength);
26475
+ while (index < scanEnd) {
26476
+ const char = input.charCodeAt(index);
26477
+ if (!isAlphaNumeric(char)) {
26478
+ terminator = char;
26479
+ break;
26480
+ }
26481
+ this.nameBuffer[runLength++] = char;
26482
+ index++;
26483
+ }
26484
+ if (terminator < 0 && runLength < 32) {
26485
+ this.runLength = runLength;
26486
+ return -1;
26487
+ }
26488
+ if (terminator === CHAR_SEMI && runLength - 2 >>> 0 <= 29) {
26489
+ const slot = findBufferedHtmlSlot(this.nameBuffer, runLength);
26490
+ if (slot >= 0) {
26491
+ this.consumed = runLength + 2;
26492
+ this.emitSlot(slot);
26493
+ return this.consumed;
26494
+ }
26495
+ }
26496
+ if (this.decodeMode !== DecodingMode.Strict && runLength >= 2) {
26497
+ const packed = findBufferedLegacySlot(this.nameBuffer, runLength);
26498
+ if (packed >= 0) {
26499
+ const length = packed & 7;
26500
+ const next = length < runLength ? this.nameBuffer[length] : terminator;
26501
+ if (this.decodeMode === DecodingMode.Attribute && isEntityInAttributeInvalidEnd(next))
26502
+ return 0;
26503
+ this.consumed = length + 1;
26504
+ this.emitSlot(packed >> 3);
26505
+ this.errors?.missingSemicolonAfterCharacterReference();
26506
+ return this.consumed;
26507
+ }
26508
+ }
26509
+ return 0;
26510
+ }
26511
+ endNamedEntity() {
26512
+ if (this.decodeMode === DecodingMode.Strict || this.runLength < 2) {
26513
+ return 0;
26514
+ }
26515
+ const packed = findBufferedLegacySlot(this.nameBuffer, this.runLength);
26516
+ if (packed < 0)
26517
+ return 0;
26518
+ if (this.decodeMode === DecodingMode.Attribute && (packed & 7) < this.runLength) {
26519
+ return 0;
26520
+ }
26521
+ this.consumed = (packed & 7) + 1;
26522
+ this.emitSlot(packed >> 3);
26523
+ this.errors?.missingSemicolonAfterCharacterReference();
26524
+ return this.consumed;
26525
+ }
26526
+ };
26140
26527
  });
26141
26528
 
26142
26529
  // ../../node_modules/parse5/dist/common/html.js
@@ -26661,14 +27048,14 @@ function isAsciiLower(cp) {
26661
27048
  function isAsciiLetter(cp) {
26662
27049
  return isAsciiLower(cp) || isAsciiUpper(cp);
26663
27050
  }
26664
- function isAsciiAlphaNumeric2(cp) {
27051
+ function isAsciiAlphaNumeric(cp) {
26665
27052
  return isAsciiLetter(cp) || isAsciiDigit(cp);
26666
27053
  }
26667
27054
  function toAsciiLower(cp) {
26668
27055
  return cp + 32;
26669
27056
  }
26670
27057
  function isWhitespace(cp) {
26671
- return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED;
27058
+ return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED || cp === CODE_POINTS.CARRIAGE_RETURN;
26672
27059
  }
26673
27060
  function isScriptDataDoubleEscapeSequenceEnd(cp) {
26674
27061
  return isWhitespace(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN;
@@ -26704,11 +27091,19 @@ class Tokenizer {
26704
27091
  this.currentCharacterToken = null;
26705
27092
  this.currentToken = null;
26706
27093
  this.currentAttr = { name: "", value: "" };
27094
+ this.currentAttrLocation = null;
27095
+ this.currentAttrNames = null;
27096
+ this.runStart = 0;
27097
+ this.runEnd = 0;
26707
27098
  this.preprocessor = new Preprocessor(handler);
26708
27099
  this.currentLocation = this.getCurrentLocation(-1);
26709
- this.entityDecoder = new EntityDecoder(htmlDecodeTree, (cp, consumed) => {
27100
+ this.entityDecoder = new HtmlEntityDecoder((cp, consumed) => {
26710
27101
  this.preprocessor.pos = this.entityStartPos + consumed - 1;
26711
- this._flushCodePointConsumedAsCharacterReference(cp);
27102
+ if (!this._isCharacterReferenceInAttribute()) {
27103
+ this._ensureCharacterToken(isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER);
27104
+ }
27105
+ this._extendRunWith(String.fromCodePoint(cp), 0);
27106
+ this.entityStartPos = this.preprocessor.pos - consumed + 1;
26712
27107
  }, handler.onParseError ? {
26713
27108
  missingSemicolonAfterCharacterReference: () => {
26714
27109
  this._err(ERR.missingSemicolonAfterCharacterReference, 1);
@@ -26753,6 +27148,92 @@ class Tokenizer {
26753
27148
  }
26754
27149
  this.inLoop = false;
26755
27150
  }
27151
+ flushCharacters() {
27152
+ var _a;
27153
+ if (this.inLoop) {
27154
+ throw new Error("Cannot flush characters from a tokenizer callback");
27155
+ }
27156
+ const location = (_a = this.currentCharacterToken) === null || _a === undefined ? undefined : _a.location;
27157
+ let nextLocation = null;
27158
+ if (location) {
27159
+ nextLocation = this.getCharacterTokenEndLocation(location);
27160
+ this.currentLocation = nextLocation;
27161
+ }
27162
+ this.inLoop = true;
27163
+ try {
27164
+ this._emitCurrentCharacterToken(nextLocation);
27165
+ } finally {
27166
+ this.inLoop = false;
27167
+ }
27168
+ this._runParsingLoop();
27169
+ }
27170
+ getCharacterTokenEndLocation(location) {
27171
+ const endOffset = this.getCharacterTokenEndOffset();
27172
+ const html = this.preprocessor.html.slice(location.startOffset - this.preprocessor.droppedBufferSize, endOffset - this.preprocessor.droppedBufferSize);
27173
+ let line = location.startLine;
27174
+ let lastLineBreak = -1;
27175
+ for (let i = html.indexOf(`
27176
+ `);i !== -1; i = html.indexOf(`
27177
+ `, i + 1)) {
27178
+ line++;
27179
+ lastLineBreak = i;
27180
+ }
27181
+ for (let i = html.indexOf("\r");i !== -1; i = html.indexOf("\r", i + 1)) {
27182
+ if (html.charCodeAt(i + 1) !== CODE_POINTS.LINE_FEED) {
27183
+ line++;
27184
+ lastLineBreak = Math.max(lastLineBreak, i);
27185
+ }
27186
+ }
27187
+ return {
27188
+ startLine: line,
27189
+ startCol: lastLineBreak === -1 ? location.startCol + html.length : html.length - lastLineBreak,
27190
+ startOffset: endOffset,
27191
+ endLine: -1,
27192
+ endCol: -1,
27193
+ endOffset: -1
27194
+ };
27195
+ }
27196
+ getCharacterTokenEndOffset() {
27197
+ var _a;
27198
+ const end = this.preprocessor.droppedBufferSize + this.preprocessor.pos + 1;
27199
+ const tokenLocation = (_a = this.currentToken) === null || _a === undefined ? undefined : _a.location;
27200
+ switch (this.state) {
27201
+ case State.TAG_OPEN:
27202
+ case State.RCDATA_LESS_THAN_SIGN:
27203
+ case State.RAWTEXT_LESS_THAN_SIGN:
27204
+ case State.SCRIPT_DATA_LESS_THAN_SIGN:
27205
+ case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:
27206
+ case State.CDATA_SECTION_BRACKET: {
27207
+ return end - 1;
27208
+ }
27209
+ case State.END_TAG_OPEN:
27210
+ case State.MARKUP_DECLARATION_OPEN:
27211
+ case State.RCDATA_END_TAG_OPEN:
27212
+ case State.RCDATA_END_TAG_NAME:
27213
+ case State.RAWTEXT_END_TAG_OPEN:
27214
+ case State.RAWTEXT_END_TAG_NAME:
27215
+ case State.SCRIPT_DATA_END_TAG_OPEN:
27216
+ case State.SCRIPT_DATA_END_TAG_NAME:
27217
+ case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:
27218
+ case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME:
27219
+ case State.CDATA_SECTION_END: {
27220
+ return end - 2;
27221
+ }
27222
+ case State.CHARACTER_REFERENCE: {
27223
+ return this._isCharacterReferenceInAttribute() && tokenLocation ? tokenLocation.startOffset : this.preprocessor.droppedBufferSize + this.entityStartPos;
27224
+ }
27225
+ case State.DOCTYPE:
27226
+ case State.BEFORE_DOCTYPE_NAME: {
27227
+ return this.currentLocation.startOffset;
27228
+ }
27229
+ default: {
27230
+ 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)) {
27231
+ return tokenLocation.startOffset;
27232
+ }
27233
+ return end;
27234
+ }
27235
+ }
27236
+ }
26756
27237
  pause() {
26757
27238
  this.paused = true;
26758
27239
  }
@@ -26781,6 +27262,19 @@ class Tokenizer {
26781
27262
  this.preprocessor.insertHtmlAtCurrentPos(chunk);
26782
27263
  this._runParsingLoop();
26783
27264
  }
27265
+ flushCurrentCharacterToken() {
27266
+ if (this.paused || this.active || !this.currentCharacterToken || this.currentToken || this.state === State.DOCTYPE || this.state === State.BEFORE_DOCTYPE_NAME || !this.preprocessor.willDropParsedChunk()) {
27267
+ return;
27268
+ }
27269
+ const pending = this.preprocessor.droppedBufferSize + this.preprocessor.pos + 1 - this.getCharacterTokenEndOffset();
27270
+ this.preprocessor.advance();
27271
+ this.currentLocation = this.getCurrentLocation(pending);
27272
+ this.preprocessor.retreat(1);
27273
+ this._emitCurrentCharacterToken(this.currentLocation);
27274
+ this._createCharacterToken(TokenType.CHARACTER);
27275
+ this.preprocessor.dropParsedChunk(Math.max(pending - 1, 0));
27276
+ this.entityStartPos = this.preprocessor.pos + 1 - pending;
27277
+ }
26784
27278
  _ensureHibernation() {
26785
27279
  if (this.preprocessor.endOfChunkHit) {
26786
27280
  this.preprocessor.retreat(this.consumedAfterSnapshot);
@@ -26808,6 +27302,7 @@ class Tokenizer {
26808
27302
  return false;
26809
27303
  }
26810
27304
  _createStartTagToken() {
27305
+ this._flushRun("");
26811
27306
  this.currentToken = {
26812
27307
  type: TokenType.START_TAG,
26813
27308
  tagName: "",
@@ -26819,6 +27314,7 @@ class Tokenizer {
26819
27314
  };
26820
27315
  }
26821
27316
  _createEndTagToken() {
27317
+ this._flushRun("");
26822
27318
  this.currentToken = {
26823
27319
  type: TokenType.END_TAG,
26824
27320
  tagName: "",
@@ -26830,6 +27326,7 @@ class Tokenizer {
26830
27326
  };
26831
27327
  }
26832
27328
  _createCommentToken(offset) {
27329
+ this._flushRun("");
26833
27330
  this.currentToken = {
26834
27331
  type: TokenType.COMMENT,
26835
27332
  data: "",
@@ -26837,6 +27334,7 @@ class Tokenizer {
26837
27334
  };
26838
27335
  }
26839
27336
  _createDoctypeToken(initialName) {
27337
+ this._flushRun("");
26840
27338
  this.currentToken = {
26841
27339
  type: TokenType.DOCTYPE,
26842
27340
  name: initialName,
@@ -26846,42 +27344,108 @@ class Tokenizer {
26846
27344
  location: this.currentLocation
26847
27345
  };
26848
27346
  }
26849
- _createCharacterToken(type, chars) {
27347
+ _createCharacterToken(type) {
27348
+ if (this.currentLocation) {
27349
+ const start = this.currentLocation.startOffset - this.preprocessor.droppedBufferSize;
27350
+ if (this.preprocessor.html[start] === `
27351
+ ` && this.preprocessor.html[start - 1] === "\r") {
27352
+ this.currentLocation.startOffset++;
27353
+ }
27354
+ }
26850
27355
  this.currentCharacterToken = {
26851
27356
  type,
26852
- chars,
27357
+ chars: "",
26853
27358
  location: this.currentLocation
26854
27359
  };
26855
27360
  }
26856
27361
  _createAttr(attrNameFirstCh) {
27362
+ this._flushRun("");
26857
27363
  this.currentAttr = {
26858
27364
  name: attrNameFirstCh,
26859
27365
  value: ""
26860
27366
  };
26861
- this.currentLocation = this.getCurrentLocation(0);
27367
+ this.currentAttrLocation = this.getCurrentLocation(0);
26862
27368
  }
26863
27369
  _leaveAttrName() {
26864
27370
  var _a;
26865
27371
  var _b;
26866
27372
  const token = this.currentToken;
26867
- if (getTokenAttr(token, this.currentAttr.name) === null) {
27373
+ const { name } = this.currentAttr;
27374
+ const names = this.currentAttrNames;
27375
+ let duplicate;
27376
+ if (names === null) {
27377
+ duplicate = getTokenAttr(token, name) !== null;
27378
+ if (!duplicate && token.attrs.length === ATTR_NAME_SET_THRESHOLD) {
27379
+ this.currentAttrNames = new Set(token.attrs.map((attr) => attr.name)).add(name);
27380
+ }
27381
+ } else {
27382
+ duplicate = names.has(name);
27383
+ if (!duplicate)
27384
+ names.add(name);
27385
+ }
27386
+ if (duplicate) {
27387
+ this._err(ERR.duplicateAttribute);
27388
+ } else {
26868
27389
  token.attrs.push(this.currentAttr);
26869
- if (token.location && this.currentLocation) {
27390
+ if (token.location && this.currentAttrLocation) {
26870
27391
  const attrLocations = (_a = (_b = token.location).attrs) !== null && _a !== undefined ? _a : _b.attrs = Object.create(null);
26871
- attrLocations[this.currentAttr.name] = this.currentLocation;
27392
+ attrLocations[this.currentAttr.name] = this.currentAttrLocation;
26872
27393
  this._leaveAttrValue();
26873
27394
  }
26874
- } else {
26875
- this._err(ERR.duplicateAttribute);
26876
27395
  }
26877
27396
  }
26878
27397
  _leaveAttrValue() {
26879
- if (this.currentLocation) {
26880
- this.currentLocation.endLine = this.preprocessor.line;
26881
- this.currentLocation.endCol = this.preprocessor.col;
26882
- this.currentLocation.endOffset = this.preprocessor.offset;
27398
+ if (this.currentAttrLocation) {
27399
+ this.currentAttrLocation.endLine = this.preprocessor.line;
27400
+ this.currentAttrLocation.endCol = this.preprocessor.col;
27401
+ this.currentAttrLocation.endOffset = this.preprocessor.offset;
27402
+ }
27403
+ }
27404
+ _flushRun(text) {
27405
+ if (this.runEnd === this.runStart && text.length === 0) {
27406
+ return;
27407
+ }
27408
+ const slice = this.preprocessor.html.slice(this.runStart, this.runEnd);
27409
+ const run = (slice.length < 13 ? slice : ` ${slice}`.slice(1)) + text;
27410
+ const token = this.currentToken;
27411
+ this.runStart = this.runEnd;
27412
+ if (token === null) {
27413
+ this.currentCharacterToken.chars += run;
27414
+ } else if (token.type === TokenType.COMMENT) {
27415
+ token.data += run;
27416
+ } else {
27417
+ this.currentAttr.value += run;
26883
27418
  }
26884
27419
  }
27420
+ _extendRun(cp) {
27421
+ const { preprocessor } = this;
27422
+ if (cp === CODE_POINTS.LINE_FEED && preprocessor.html.charCodeAt(preprocessor.pos) !== CODE_POINTS.LINE_FEED) {
27423
+ this._flushRun(`
27424
+ `);
27425
+ this.runStart = preprocessor.pos + 1;
27426
+ } else {
27427
+ const start = preprocessor.pos - Number(cp > 65535);
27428
+ if (start !== this.runEnd) {
27429
+ this._flushRun("");
27430
+ this.runStart = start;
27431
+ }
27432
+ }
27433
+ this.runEnd = preprocessor.pos + 1;
27434
+ }
27435
+ _extendRunWith(text, cpOffset) {
27436
+ const { preprocessor } = this;
27437
+ const start = preprocessor.codePointStart + 1 + cpOffset - text.length;
27438
+ if (start >= 0 && preprocessor.html.startsWith(text, start)) {
27439
+ if (start !== this.runEnd) {
27440
+ this._flushRun("");
27441
+ this.runStart = start;
27442
+ }
27443
+ } else {
27444
+ this._flushRun(text);
27445
+ this.runStart = start + text.length;
27446
+ }
27447
+ this.runEnd = start + text.length;
27448
+ }
26885
27449
  prepareToken(ct) {
26886
27450
  this._emitCurrentCharacterToken(ct.location);
26887
27451
  this.currentToken = null;
@@ -26894,6 +27458,7 @@ class Tokenizer {
26894
27458
  }
26895
27459
  emitCurrentTagToken() {
26896
27460
  const ct = this.currentToken;
27461
+ this.currentAttrNames = null;
26897
27462
  this.prepareToken(ct);
26898
27463
  ct.tagID = getTagID(ct.tagName);
26899
27464
  if (ct.type === TokenType.START_TAG) {
@@ -26921,6 +27486,7 @@ class Tokenizer {
26921
27486
  this.preprocessor.dropParsedChunk();
26922
27487
  }
26923
27488
  _emitCurrentCharacterToken(nextLocation) {
27489
+ this._flushRun("");
26924
27490
  if (this.currentCharacterToken) {
26925
27491
  if (nextLocation && this.currentCharacterToken.location) {
26926
27492
  this.currentCharacterToken.location.endLine = nextLocation.startLine;
@@ -26945,35 +27511,45 @@ class Tokenizer {
26945
27511
  }
26946
27512
  }
26947
27513
  _emitEOFToken() {
27514
+ var _a, _b;
26948
27515
  const location = this.getCurrentLocation(0);
26949
27516
  if (location) {
26950
27517
  location.endLine = location.startLine;
26951
27518
  location.endCol = location.startCol;
26952
27519
  location.endOffset = location.startOffset;
26953
27520
  }
26954
- this._emitCurrentCharacterToken(location);
27521
+ this._emitCurrentCharacterToken((_b = (_a = this.currentToken) === null || _a === undefined ? undefined : _a.location) !== null && _b !== undefined ? _b : location);
26955
27522
  this.handler.onEof({ type: TokenType.EOF, location });
26956
27523
  this.active = false;
26957
27524
  }
26958
- _appendCharToCurrentCharacterToken(type, ch) {
27525
+ _ensureCharacterToken(type) {
26959
27526
  if (this.currentCharacterToken) {
26960
27527
  if (this.currentCharacterToken.type === type) {
26961
- this.currentCharacterToken.chars += ch;
26962
27528
  return;
26963
- } else {
26964
- this.currentLocation = this.getCurrentLocation(0);
26965
- this._emitCurrentCharacterToken(this.currentLocation);
26966
- this.preprocessor.dropParsedChunk();
26967
27529
  }
27530
+ this.currentLocation = this.getCurrentLocation(0);
27531
+ this._emitCurrentCharacterToken(this.currentLocation);
27532
+ this.preprocessor.dropParsedChunk();
26968
27533
  }
26969
- this._createCharacterToken(type, ch);
27534
+ this._createCharacterToken(type);
26970
27535
  }
26971
27536
  _emitCodePoint(cp) {
26972
27537
  const type = isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER;
26973
- this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));
27538
+ const token = this.currentCharacterToken;
27539
+ if (token === null || token.type !== type) {
27540
+ this._ensureCharacterToken(type);
27541
+ }
27542
+ this._extendRun(cp);
26974
27543
  }
26975
- _emitChars(ch) {
26976
- this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);
27544
+ _emitChars(ch, cpOffset = 0) {
27545
+ if (this.options.sourceCodeLocationInfo && cpOffset !== 0 && this.currentCharacterToken && this.currentCharacterToken.type !== TokenType.CHARACTER) {
27546
+ this.currentLocation = this.getCurrentLocation(ch.length - 1 - cpOffset);
27547
+ this._emitCurrentCharacterToken(this.currentLocation);
27548
+ this._createCharacterToken(TokenType.CHARACTER);
27549
+ } else {
27550
+ this._ensureCharacterToken(TokenType.CHARACTER);
27551
+ }
27552
+ this._extendRunWith(ch, cpOffset);
26977
27553
  }
26978
27554
  _startCharacterReference() {
26979
27555
  this.returnState = this.state;
@@ -26986,7 +27562,7 @@ class Tokenizer {
26986
27562
  }
26987
27563
  _flushCodePointConsumedAsCharacterReference(cp) {
26988
27564
  if (this._isCharacterReferenceInAttribute()) {
26989
- this.currentAttr.value += String.fromCodePoint(cp);
27565
+ this._extendRun(cp);
26990
27566
  } else {
26991
27567
  this._emitCodePoint(cp);
26992
27568
  }
@@ -27418,13 +27994,13 @@ class Tokenizer {
27418
27994
  }
27419
27995
  case CODE_POINTS.EOF: {
27420
27996
  this._err(ERR.eofBeforeTagName);
27421
- this._emitChars("<");
27997
+ this._emitChars("<", -1);
27422
27998
  this._emitEOFToken();
27423
27999
  break;
27424
28000
  }
27425
28001
  default: {
27426
28002
  this._err(ERR.invalidFirstCharacterOfTagName);
27427
- this._emitChars("<");
28003
+ this._emitChars("<", -1);
27428
28004
  this.state = State.DATA;
27429
28005
  this._stateData(cp);
27430
28006
  }
@@ -27444,7 +28020,7 @@ class Tokenizer {
27444
28020
  }
27445
28021
  case CODE_POINTS.EOF: {
27446
28022
  this._err(ERR.eofBeforeTagName);
27447
- this._emitChars("</");
28023
+ this._emitChars("</", -1);
27448
28024
  this._emitEOFToken();
27449
28025
  break;
27450
28026
  }
@@ -27494,7 +28070,7 @@ class Tokenizer {
27494
28070
  if (cp === CODE_POINTS.SOLIDUS) {
27495
28071
  this.state = State.RCDATA_END_TAG_OPEN;
27496
28072
  } else {
27497
- this._emitChars("<");
28073
+ this._emitChars("<", -1);
27498
28074
  this.state = State.RCDATA;
27499
28075
  this._stateRcdata(cp);
27500
28076
  }
@@ -27504,7 +28080,7 @@ class Tokenizer {
27504
28080
  this.state = State.RCDATA_END_TAG_NAME;
27505
28081
  this._stateRcdataEndTagName(cp);
27506
28082
  } else {
27507
- this._emitChars("</");
28083
+ this._emitChars("</", -1);
27508
28084
  this.state = State.RCDATA;
27509
28085
  this._stateRcdata(cp);
27510
28086
  }
@@ -27538,13 +28114,14 @@ class Tokenizer {
27538
28114
  return false;
27539
28115
  }
27540
28116
  default: {
28117
+ this.currentToken = null;
27541
28118
  return !this._ensureHibernation();
27542
28119
  }
27543
28120
  }
27544
28121
  }
27545
28122
  _stateRcdataEndTagName(cp) {
27546
28123
  if (this.handleSpecialEndTag(cp)) {
27547
- this._emitChars("</");
28124
+ this._emitChars("</", -1);
27548
28125
  this.state = State.RCDATA;
27549
28126
  this._stateRcdata(cp);
27550
28127
  }
@@ -27553,7 +28130,7 @@ class Tokenizer {
27553
28130
  if (cp === CODE_POINTS.SOLIDUS) {
27554
28131
  this.state = State.RAWTEXT_END_TAG_OPEN;
27555
28132
  } else {
27556
- this._emitChars("<");
28133
+ this._emitChars("<", -1);
27557
28134
  this.state = State.RAWTEXT;
27558
28135
  this._stateRawtext(cp);
27559
28136
  }
@@ -27563,14 +28140,14 @@ class Tokenizer {
27563
28140
  this.state = State.RAWTEXT_END_TAG_NAME;
27564
28141
  this._stateRawtextEndTagName(cp);
27565
28142
  } else {
27566
- this._emitChars("</");
28143
+ this._emitChars("</", -1);
27567
28144
  this.state = State.RAWTEXT;
27568
28145
  this._stateRawtext(cp);
27569
28146
  }
27570
28147
  }
27571
28148
  _stateRawtextEndTagName(cp) {
27572
28149
  if (this.handleSpecialEndTag(cp)) {
27573
- this._emitChars("</");
28150
+ this._emitChars("</", -1);
27574
28151
  this.state = State.RAWTEXT;
27575
28152
  this._stateRawtext(cp);
27576
28153
  }
@@ -27587,7 +28164,7 @@ class Tokenizer {
27587
28164
  break;
27588
28165
  }
27589
28166
  default: {
27590
- this._emitChars("<");
28167
+ this._emitChars("<", -1);
27591
28168
  this.state = State.SCRIPT_DATA;
27592
28169
  this._stateScriptData(cp);
27593
28170
  }
@@ -27598,14 +28175,14 @@ class Tokenizer {
27598
28175
  this.state = State.SCRIPT_DATA_END_TAG_NAME;
27599
28176
  this._stateScriptDataEndTagName(cp);
27600
28177
  } else {
27601
- this._emitChars("</");
28178
+ this._emitChars("</", -1);
27602
28179
  this.state = State.SCRIPT_DATA;
27603
28180
  this._stateScriptData(cp);
27604
28181
  }
27605
28182
  }
27606
28183
  _stateScriptDataEndTagName(cp) {
27607
28184
  if (this.handleSpecialEndTag(cp)) {
27608
- this._emitChars("</");
28185
+ this._emitChars("</", -1);
27609
28186
  this.state = State.SCRIPT_DATA;
27610
28187
  this._stateScriptData(cp);
27611
28188
  }
@@ -27718,11 +28295,11 @@ class Tokenizer {
27718
28295
  if (cp === CODE_POINTS.SOLIDUS) {
27719
28296
  this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;
27720
28297
  } else if (isAsciiLetter(cp)) {
27721
- this._emitChars("<");
28298
+ this._emitChars("<", -1);
27722
28299
  this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;
27723
28300
  this._stateScriptDataDoubleEscapeStart(cp);
27724
28301
  } else {
27725
- this._emitChars("<");
28302
+ this._emitChars("<", -1);
27726
28303
  this.state = State.SCRIPT_DATA_ESCAPED;
27727
28304
  this._stateScriptDataEscaped(cp);
27728
28305
  }
@@ -27732,14 +28309,14 @@ class Tokenizer {
27732
28309
  this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;
27733
28310
  this._stateScriptDataEscapedEndTagName(cp);
27734
28311
  } else {
27735
- this._emitChars("</");
28312
+ this._emitChars("</", -1);
27736
28313
  this.state = State.SCRIPT_DATA_ESCAPED;
27737
28314
  this._stateScriptDataEscaped(cp);
27738
28315
  }
27739
28316
  }
27740
28317
  _stateScriptDataEscapedEndTagName(cp) {
27741
28318
  if (this.handleSpecialEndTag(cp)) {
27742
- this._emitChars("</");
28319
+ this._emitChars("</", -1);
27743
28320
  this.state = State.SCRIPT_DATA_ESCAPED;
27744
28321
  this._stateScriptDataEscaped(cp);
27745
28322
  }
@@ -28003,7 +28580,7 @@ class Tokenizer {
28003
28580
  }
28004
28581
  case CODE_POINTS.NULL: {
28005
28582
  this._err(ERR.unexpectedNullCharacter);
28006
- this.currentAttr.value += REPLACEMENT_CHARACTER;
28583
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
28007
28584
  break;
28008
28585
  }
28009
28586
  case CODE_POINTS.EOF: {
@@ -28012,7 +28589,7 @@ class Tokenizer {
28012
28589
  break;
28013
28590
  }
28014
28591
  default: {
28015
- this.currentAttr.value += String.fromCodePoint(cp);
28592
+ this._extendRun(cp);
28016
28593
  }
28017
28594
  }
28018
28595
  }
@@ -28028,7 +28605,7 @@ class Tokenizer {
28028
28605
  }
28029
28606
  case CODE_POINTS.NULL: {
28030
28607
  this._err(ERR.unexpectedNullCharacter);
28031
- this.currentAttr.value += REPLACEMENT_CHARACTER;
28608
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
28032
28609
  break;
28033
28610
  }
28034
28611
  case CODE_POINTS.EOF: {
@@ -28037,7 +28614,7 @@ class Tokenizer {
28037
28614
  break;
28038
28615
  }
28039
28616
  default: {
28040
- this.currentAttr.value += String.fromCodePoint(cp);
28617
+ this._extendRun(cp);
28041
28618
  }
28042
28619
  }
28043
28620
  }
@@ -28063,7 +28640,7 @@ class Tokenizer {
28063
28640
  }
28064
28641
  case CODE_POINTS.NULL: {
28065
28642
  this._err(ERR.unexpectedNullCharacter);
28066
- this.currentAttr.value += REPLACEMENT_CHARACTER;
28643
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
28067
28644
  break;
28068
28645
  }
28069
28646
  case CODE_POINTS.QUOTATION_MARK:
@@ -28072,7 +28649,7 @@ class Tokenizer {
28072
28649
  case CODE_POINTS.EQUALS_SIGN:
28073
28650
  case CODE_POINTS.GRAVE_ACCENT: {
28074
28651
  this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);
28075
- this.currentAttr.value += String.fromCodePoint(cp);
28652
+ this._extendRun(cp);
28076
28653
  break;
28077
28654
  }
28078
28655
  case CODE_POINTS.EOF: {
@@ -28081,7 +28658,7 @@ class Tokenizer {
28081
28658
  break;
28082
28659
  }
28083
28660
  default: {
28084
- this.currentAttr.value += String.fromCodePoint(cp);
28661
+ this._extendRun(cp);
28085
28662
  }
28086
28663
  }
28087
28664
  }
@@ -28113,6 +28690,7 @@ class Tokenizer {
28113
28690
  }
28114
28691
  default: {
28115
28692
  this._err(ERR.missingWhitespaceBetweenAttributes);
28693
+ this._leaveAttrValue();
28116
28694
  this.state = State.BEFORE_ATTRIBUTE_NAME;
28117
28695
  this._stateBeforeAttributeName(cp);
28118
28696
  }
@@ -28154,11 +28732,11 @@ class Tokenizer {
28154
28732
  }
28155
28733
  case CODE_POINTS.NULL: {
28156
28734
  this._err(ERR.unexpectedNullCharacter);
28157
- token.data += REPLACEMENT_CHARACTER;
28735
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
28158
28736
  break;
28159
28737
  }
28160
28738
  default: {
28161
- token.data += String.fromCodePoint(cp);
28739
+ this._extendRun(cp);
28162
28740
  }
28163
28741
  }
28164
28742
  }
@@ -28224,7 +28802,7 @@ class Tokenizer {
28224
28802
  break;
28225
28803
  }
28226
28804
  default: {
28227
- token.data += "-";
28805
+ this._extendRunWith("-", -1);
28228
28806
  this.state = State.COMMENT;
28229
28807
  this._stateComment(cp);
28230
28808
  }
@@ -28238,13 +28816,13 @@ class Tokenizer {
28238
28816
  break;
28239
28817
  }
28240
28818
  case CODE_POINTS.LESS_THAN_SIGN: {
28241
- token.data += "<";
28819
+ this._extendRunWith("<", 0);
28242
28820
  this.state = State.COMMENT_LESS_THAN_SIGN;
28243
28821
  break;
28244
28822
  }
28245
28823
  case CODE_POINTS.NULL: {
28246
28824
  this._err(ERR.unexpectedNullCharacter);
28247
- token.data += REPLACEMENT_CHARACTER;
28825
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
28248
28826
  break;
28249
28827
  }
28250
28828
  case CODE_POINTS.EOF: {
@@ -28254,20 +28832,19 @@ class Tokenizer {
28254
28832
  break;
28255
28833
  }
28256
28834
  default: {
28257
- token.data += String.fromCodePoint(cp);
28835
+ this._extendRun(cp);
28258
28836
  }
28259
28837
  }
28260
28838
  }
28261
28839
  _stateCommentLessThanSign(cp) {
28262
- const token = this.currentToken;
28263
28840
  switch (cp) {
28264
28841
  case CODE_POINTS.EXCLAMATION_MARK: {
28265
- token.data += "!";
28842
+ this._extendRunWith("!", 0);
28266
28843
  this.state = State.COMMENT_LESS_THAN_SIGN_BANG;
28267
28844
  break;
28268
28845
  }
28269
28846
  case CODE_POINTS.LESS_THAN_SIGN: {
28270
- token.data += "<";
28847
+ this._extendRunWith("<", 0);
28271
28848
  break;
28272
28849
  }
28273
28850
  default: {
@@ -28313,7 +28890,7 @@ class Tokenizer {
28313
28890
  break;
28314
28891
  }
28315
28892
  default: {
28316
- token.data += "-";
28893
+ this._extendRunWith("-", -1);
28317
28894
  this.state = State.COMMENT;
28318
28895
  this._stateComment(cp);
28319
28896
  }
@@ -28332,7 +28909,7 @@ class Tokenizer {
28332
28909
  break;
28333
28910
  }
28334
28911
  case CODE_POINTS.HYPHEN_MINUS: {
28335
- token.data += "-";
28912
+ this._extendRunWith("-", -2);
28336
28913
  break;
28337
28914
  }
28338
28915
  case CODE_POINTS.EOF: {
@@ -28342,7 +28919,7 @@ class Tokenizer {
28342
28919
  break;
28343
28920
  }
28344
28921
  default: {
28345
- token.data += "--";
28922
+ this._extendRunWith("--", -1);
28346
28923
  this.state = State.COMMENT;
28347
28924
  this._stateComment(cp);
28348
28925
  }
@@ -28352,7 +28929,7 @@ class Tokenizer {
28352
28929
  const token = this.currentToken;
28353
28930
  switch (cp) {
28354
28931
  case CODE_POINTS.HYPHEN_MINUS: {
28355
- token.data += "--!";
28932
+ this._extendRunWith("--!", -1);
28356
28933
  this.state = State.COMMENT_END_DASH;
28357
28934
  break;
28358
28935
  }
@@ -28369,7 +28946,7 @@ class Tokenizer {
28369
28946
  break;
28370
28947
  }
28371
28948
  default: {
28372
- token.data += "--!";
28949
+ this._extendRunWith("--!", -1);
28373
28950
  this.state = State.COMMENT;
28374
28951
  this._stateComment(cp);
28375
28952
  }
@@ -28957,7 +29534,7 @@ class Tokenizer {
28957
29534
  if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) {
28958
29535
  this.state = State.CDATA_SECTION_END;
28959
29536
  } else {
28960
- this._emitChars("]");
29537
+ this._emitChars("]", -1);
28961
29538
  this.state = State.CDATA_SECTION;
28962
29539
  this._stateCdataSection(cp);
28963
29540
  }
@@ -28969,11 +29546,11 @@ class Tokenizer {
28969
29546
  break;
28970
29547
  }
28971
29548
  case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
28972
- this._emitChars("]");
29549
+ this._emitChars("]", -2);
28973
29550
  break;
28974
29551
  }
28975
29552
  default: {
28976
- this._emitChars("]]");
29553
+ this._emitChars("]]", -1);
28977
29554
  this.state = State.CDATA_SECTION;
28978
29555
  this._stateCdataSection(cp);
28979
29556
  }
@@ -28995,13 +29572,13 @@ class Tokenizer {
28995
29572
  if (length === 0) {
28996
29573
  this.preprocessor.pos = this.entityStartPos;
28997
29574
  this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
28998
- this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric2(this.preprocessor.peek(1)) ? State.AMBIGUOUS_AMPERSAND : this.returnState;
29575
+ this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric(this.preprocessor.peek(1)) ? State.AMBIGUOUS_AMPERSAND : this.returnState;
28999
29576
  } else {
29000
29577
  this.state = this.returnState;
29001
29578
  }
29002
29579
  }
29003
29580
  _stateAmbiguousAmpersand(cp) {
29004
- if (isAsciiAlphaNumeric2(cp)) {
29581
+ if (isAsciiAlphaNumeric(cp)) {
29005
29582
  this._flushCodePointConsumedAsCharacterReference(cp);
29006
29583
  } else {
29007
29584
  if (cp === CODE_POINTS.SEMICOLON) {
@@ -29012,7 +29589,7 @@ class Tokenizer {
29012
29589
  }
29013
29590
  }
29014
29591
  }
29015
- var State, TokenizerMode;
29592
+ var ATTR_NAME_SET_THRESHOLD = 64, State, TokenizerMode;
29016
29593
  var init_tokenizer = __esm(() => {
29017
29594
  init_preprocessor();
29018
29595
  init_unicode();
@@ -29106,6 +29683,25 @@ var init_tokenizer = __esm(() => {
29106
29683
  });
29107
29684
 
29108
29685
  // ../../node_modules/parse5/dist/parser/open-element-stack.js
29686
+ function tagKey(ns, tagID) {
29687
+ if (tagID === TAG_ID.UNKNOWN)
29688
+ return -1;
29689
+ switch (ns) {
29690
+ case NS.HTML: {
29691
+ return tagID;
29692
+ }
29693
+ case NS.SVG: {
29694
+ return SVG_KEYS + tagID;
29695
+ }
29696
+ case NS.MATHML: {
29697
+ return MATHML_KEYS + tagID;
29698
+ }
29699
+ default: {
29700
+ return -1;
29701
+ }
29702
+ }
29703
+ }
29704
+
29109
29705
  class OpenElementStack {
29110
29706
  get currentTmplContentOrNode() {
29111
29707
  return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
@@ -29116,13 +29712,41 @@ class OpenElementStack {
29116
29712
  this.items = [];
29117
29713
  this.tagIDs = [];
29118
29714
  this.stackTop = -1;
29715
+ this.depth = 0;
29119
29716
  this.tmplCount = 0;
29120
29717
  this.currentTagId = TAG_ID.UNKNOWN;
29718
+ this.indexed = false;
29719
+ this.below = [];
29720
+ this.above = [];
29721
+ this.keys = [];
29722
+ this.keyPrev = [];
29723
+ this.keyNext = [];
29724
+ this.keyTops = new Int32Array(0);
29725
+ this.specials = [];
29726
+ this.listItemBoundaries = [];
29727
+ this.scopeBoundaries = [];
29728
+ this.htmlSlots = [];
29729
+ this.formattingSlots = new Map;
29121
29730
  this.current = document2;
29122
29731
  }
29123
29732
  _indexOf(element) {
29733
+ if (this.indexed) {
29734
+ const idx = this.formattingSlots.get(element);
29735
+ if (idx !== undefined)
29736
+ return idx;
29737
+ if (FORMATTING_TAGS[getTagID(this.treeAdapter.getTagName(element))])
29738
+ return -1;
29739
+ }
29124
29740
  return this.items.lastIndexOf(element, this.stackTop);
29125
29741
  }
29742
+ slotBelow(idx) {
29743
+ return this.indexed ? this.below[idx] : idx - 1;
29744
+ }
29745
+ slotAbove(idx) {
29746
+ if (this.indexed)
29747
+ return this.above[idx];
29748
+ return idx === this.stackTop ? -1 : idx + 1;
29749
+ }
29126
29750
  _isInTemplate() {
29127
29751
  return this.currentTagId === TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;
29128
29752
  }
@@ -29130,60 +29754,274 @@ class OpenElementStack {
29130
29754
  this.current = this.items[this.stackTop];
29131
29755
  this.currentTagId = this.tagIDs[this.stackTop];
29132
29756
  }
29757
+ _nameKey(ns, tagName, create) {
29758
+ var _a, _b;
29759
+ const name = `${ns} ${tagName}`;
29760
+ let key = (_a = this.nameKeys) === null || _a === undefined ? undefined : _a.get(name);
29761
+ if (key === undefined && create) {
29762
+ (_b = this.nameKeys) !== null && _b !== undefined || (this.nameKeys = new Map);
29763
+ key = NAME_KEYS + this.nameKeys.size;
29764
+ this.nameKeys.set(name, key);
29765
+ if (key === this.keyTops.length) {
29766
+ const keyTops = new Int32Array(2 * key).fill(-1);
29767
+ keyTops.set(this.keyTops);
29768
+ this.keyTops = keyTops;
29769
+ }
29770
+ }
29771
+ return key !== null && key !== undefined ? key : -1;
29772
+ }
29773
+ _indexAll() {
29774
+ this.indexed = true;
29775
+ this.keyTops = new Int32Array(NAME_KEYS).fill(-1);
29776
+ for (let i = 0;i <= this.stackTop; i++)
29777
+ this._index(i, i - 1);
29778
+ }
29779
+ _index(slot, belowIdx) {
29780
+ const element = this.items[slot];
29781
+ const tagID = this.tagIDs[slot];
29782
+ const ns = this.treeAdapter.getNamespaceURI(element);
29783
+ let key = tagKey(ns, tagID);
29784
+ if (key === -1)
29785
+ key = this._nameKey(ns, this.treeAdapter.getTagName(element), true);
29786
+ const keyPrev = this.keyTops[key];
29787
+ this.keys[slot] = key;
29788
+ this.keyPrev[slot] = keyPrev;
29789
+ this.keyNext[slot] = -1;
29790
+ if (keyPrev !== -1)
29791
+ this.keyNext[keyPrev] = slot;
29792
+ this.keyTops[key] = slot;
29793
+ this.above[slot] = -1;
29794
+ this._link(slot, belowIdx, ns === NS.HTML);
29795
+ if (FORMATTING_TAGS[tagID])
29796
+ this.formattingSlots.set(element, slot);
29797
+ }
29798
+ _link(slot, belowIdx, isHtml) {
29799
+ const key = this.keys[slot];
29800
+ const classes = key < NAME_KEYS ? KEY_CLASSES[key] : 0;
29801
+ this.below[slot] = belowIdx;
29802
+ if (belowIdx === -1) {
29803
+ this.specials[slot] = classes & SPECIAL;
29804
+ this.listItemBoundaries[slot] = (classes & LIST_ITEM_BOUNDARY) >> 1;
29805
+ this.scopeBoundaries[slot] = (classes & SCOPE) >> 2;
29806
+ this.htmlSlots[slot] = isHtml ? slot : -1;
29807
+ } else {
29808
+ this.above[belowIdx] = slot;
29809
+ this.specials[slot] = this.specials[belowIdx] + (classes & SPECIAL);
29810
+ this.listItemBoundaries[slot] = this.listItemBoundaries[belowIdx] + ((classes & LIST_ITEM_BOUNDARY) >> 1);
29811
+ this.scopeBoundaries[slot] = this.scopeBoundaries[belowIdx] + ((classes & SCOPE) >> 2);
29812
+ this.htmlSlots[slot] = isHtml ? slot : this.htmlSlots[belowIdx];
29813
+ }
29814
+ }
29815
+ _unindex(slot) {
29816
+ const key = this.keys[slot];
29817
+ const keyPrev = this.keyPrev[slot];
29818
+ const keyNext = this.keyNext[slot];
29819
+ if (keyPrev !== -1)
29820
+ this.keyNext[keyPrev] = keyNext;
29821
+ if (keyNext === -1)
29822
+ this.keyTops[key] = keyPrev;
29823
+ else
29824
+ this.keyPrev[keyNext] = keyPrev;
29825
+ if (FORMATTING_TAGS[this.tagIDs[slot]])
29826
+ this.formattingSlots.delete(this.items[slot]);
29827
+ }
29828
+ _move(from, to) {
29829
+ const element = this.items[from];
29830
+ const key = this.keys[from];
29831
+ const keyPrev = this.keyPrev[from];
29832
+ const keyNext = this.keyNext[from];
29833
+ this.items[to] = element;
29834
+ this.tagIDs[to] = this.tagIDs[from];
29835
+ this.keys[to] = key;
29836
+ this.keyPrev[to] = keyPrev;
29837
+ this.keyNext[to] = keyNext;
29838
+ if (keyPrev !== -1)
29839
+ this.keyNext[keyPrev] = to;
29840
+ if (keyNext === -1)
29841
+ this.keyTops[key] = to;
29842
+ else
29843
+ this.keyPrev[keyNext] = to;
29844
+ if (FORMATTING_TAGS[this.tagIDs[to]])
29845
+ this.formattingSlots.set(element, to);
29846
+ }
29847
+ indexOfTopmost(tagID) {
29848
+ if (this.indexed)
29849
+ return this.keyTops[tagID];
29850
+ for (let i = this.stackTop;i >= 0; i--) {
29851
+ if (this.tagIDs[i] === tagID && this.treeAdapter.getNamespaceURI(this.items[i]) === NS.HTML)
29852
+ return i;
29853
+ }
29854
+ return -1;
29855
+ }
29856
+ indexOfTopmostOf(tagIDs) {
29857
+ if (this.indexed) {
29858
+ let top = -1;
29859
+ for (const tagID of tagIDs) {
29860
+ if (this.keyTops[tagID] > top)
29861
+ top = this.keyTops[tagID];
29862
+ }
29863
+ return top;
29864
+ }
29865
+ for (let i = this.stackTop;i >= 0; i--) {
29866
+ if (tagIDs.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === NS.HTML)
29867
+ return i;
29868
+ }
29869
+ return -1;
29870
+ }
29871
+ indexOfTopmostByName(ns, tagName) {
29872
+ if (this.indexed) {
29873
+ let key = tagKey(ns, getTagID(tagName));
29874
+ if (key === -1)
29875
+ key = this._nameKey(ns, tagName, false);
29876
+ return key === -1 ? -1 : this.keyTops[key];
29877
+ }
29878
+ for (let i = this.stackTop;i >= 0; i--) {
29879
+ const element = this.items[i];
29880
+ if (this.treeAdapter.getTagName(element) === tagName && this.treeAdapter.getNamespaceURI(element) === ns) {
29881
+ return i;
29882
+ }
29883
+ }
29884
+ return -1;
29885
+ }
29886
+ indexOfTopmostHtmlElement() {
29887
+ if (this.indexed)
29888
+ return this.stackTop === -1 ? -1 : this.htmlSlots[this.stackTop];
29889
+ let i = this.stackTop;
29890
+ while (i >= 0 && this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML)
29891
+ i--;
29892
+ return i;
29893
+ }
29894
+ _hasAbove(idx, classes) {
29895
+ for (let i = this.stackTop;i > idx; i--) {
29896
+ const key = tagKey(this.treeAdapter.getNamespaceURI(this.items[i]), this.tagIDs[i]);
29897
+ if (key !== -1 && KEY_CLASSES[key] & classes)
29898
+ return true;
29899
+ }
29900
+ return false;
29901
+ }
29902
+ hasSpecialElementAbove(idx) {
29903
+ return this.indexed ? this.specials[this.stackTop] !== this.specials[idx] : this._hasAbove(idx, SPECIAL);
29904
+ }
29905
+ hasListItemBoundaryAbove(idx) {
29906
+ return this.indexed ? this.listItemBoundaries[this.stackTop] !== this.listItemBoundaries[idx] : this._hasAbove(idx, LIST_ITEM_BOUNDARY);
29907
+ }
29133
29908
  push(element, tagID) {
29909
+ const belowIdx = this.stackTop;
29134
29910
  this.stackTop++;
29911
+ this.depth++;
29135
29912
  this.items[this.stackTop] = element;
29136
29913
  this.current = element;
29137
29914
  this.tagIDs[this.stackTop] = tagID;
29138
29915
  this.currentTagId = tagID;
29916
+ if (this.indexed)
29917
+ this._index(this.stackTop, belowIdx);
29918
+ else if (this.depth === INDEX_DEPTH)
29919
+ this._indexAll();
29139
29920
  if (this._isInTemplate()) {
29140
29921
  this.tmplCount++;
29141
29922
  }
29142
29923
  this.handler.onItemPush(element, tagID, true);
29143
29924
  }
29144
- pop() {
29145
- const popped = this.current;
29925
+ _popCurrent() {
29146
29926
  if (this.tmplCount > 0 && this._isInTemplate()) {
29147
29927
  this.tmplCount--;
29148
29928
  }
29149
- this.stackTop--;
29929
+ if (this.indexed) {
29930
+ this._unindex(this.stackTop);
29931
+ this.stackTop = this.below[this.stackTop];
29932
+ if (this.stackTop !== -1)
29933
+ this.above[this.stackTop] = -1;
29934
+ } else {
29935
+ this.stackTop--;
29936
+ }
29937
+ this.depth--;
29150
29938
  this._updateCurrentElement();
29939
+ }
29940
+ pop() {
29941
+ const popped = this.current;
29942
+ this._popCurrent();
29151
29943
  this.handler.onItemPop(popped, true);
29152
29944
  }
29153
29945
  replace(oldElement, newElement) {
29154
29946
  const idx = this._indexOf(oldElement);
29155
29947
  this.items[idx] = newElement;
29948
+ if (this.indexed && FORMATTING_TAGS[this.tagIDs[idx]]) {
29949
+ this.formattingSlots.delete(oldElement);
29950
+ this.formattingSlots.set(newElement, idx);
29951
+ }
29156
29952
  if (idx === this.stackTop) {
29157
29953
  this.current = newElement;
29158
29954
  }
29159
29955
  }
29160
- insertAfter(referenceElement, newElement, newElementID) {
29161
- const insertionIdx = this._indexOf(referenceElement) + 1;
29162
- this.items.splice(insertionIdx, 0, newElement);
29163
- this.tagIDs.splice(insertionIdx, 0, newElementID);
29164
- this.stackTop++;
29165
- if (insertionIdx === this.stackTop) {
29166
- this._updateCurrentElement();
29956
+ replaceFormattingElement(formattingIdx, furthestBlockIdx, element, tagID) {
29957
+ const formattingElement = this.items[formattingIdx];
29958
+ if (!this.indexed) {
29959
+ this.items.splice(formattingIdx, 1);
29960
+ this.tagIDs.splice(formattingIdx, 1);
29961
+ this.handler.onItemPop(formattingElement, false);
29962
+ this.items.splice(furthestBlockIdx, 0, element);
29963
+ this.tagIDs.splice(furthestBlockIdx, 0, tagID);
29964
+ if (furthestBlockIdx === this.stackTop)
29965
+ this._updateCurrentElement();
29966
+ if (this.current && this.currentTagId !== undefined) {
29967
+ this.handler.onItemPush(this.current, this.currentTagId, furthestBlockIdx === this.stackTop);
29968
+ }
29969
+ return;
29167
29970
  }
29971
+ const key = this.keys[formattingIdx];
29972
+ const belowIdx = this.below[formattingIdx];
29973
+ const aboveIdx = this.above[furthestBlockIdx];
29974
+ const kept = [];
29975
+ for (let i = this.above[formattingIdx];i !== furthestBlockIdx; i = this.above[i])
29976
+ kept.push(i);
29977
+ const keyNext = this.keyNext[formattingIdx];
29978
+ this._unindex(formattingIdx);
29979
+ this.items[formattingIdx] = undefined;
29980
+ this.handler.onItemPop(formattingElement, false);
29981
+ let free = furthestBlockIdx - 1;
29982
+ while (kept.length > 0 && kept[kept.length - 1] === free) {
29983
+ kept.pop();
29984
+ free--;
29985
+ }
29986
+ for (let i = free + 1;i <= furthestBlockIdx; i++)
29987
+ this._move(i, i - 1);
29988
+ const keyPrev = keyNext === -1 ? this.keyTops[key] : this.keyPrev[keyNext];
29989
+ this.items[furthestBlockIdx] = element;
29990
+ this.tagIDs[furthestBlockIdx] = tagID;
29991
+ this.keys[furthestBlockIdx] = key;
29992
+ this.keyPrev[furthestBlockIdx] = keyPrev;
29993
+ this.keyNext[furthestBlockIdx] = keyNext;
29994
+ if (keyPrev !== -1)
29995
+ this.keyNext[keyPrev] = furthestBlockIdx;
29996
+ if (keyNext === -1)
29997
+ this.keyTops[key] = furthestBlockIdx;
29998
+ else
29999
+ this.keyPrev[keyNext] = furthestBlockIdx;
30000
+ if (FORMATTING_TAGS[tagID])
30001
+ this.formattingSlots.set(element, furthestBlockIdx);
30002
+ let prev = belowIdx;
30003
+ for (const i of kept) {
30004
+ this._link(i, prev, true);
30005
+ prev = i;
30006
+ }
30007
+ for (let i = free;i < furthestBlockIdx; i++) {
30008
+ this._link(i, prev, true);
30009
+ prev = i;
30010
+ }
30011
+ this._link(furthestBlockIdx, prev, true);
30012
+ if (aboveIdx === -1)
30013
+ this._updateCurrentElement();
29168
30014
  if (this.current && this.currentTagId !== undefined) {
29169
- this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);
30015
+ this.handler.onItemPush(this.current, this.currentTagId, aboveIdx === -1);
29170
30016
  }
29171
30017
  }
29172
30018
  popUntilTagNamePopped(tagName) {
29173
- let targetIdx = this.stackTop + 1;
29174
- do {
29175
- targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);
29176
- } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);
29177
- this.shortenToLength(Math.max(targetIdx, 0));
30019
+ this.shortenToLength(Math.max(this.indexOfTopmost(tagName), 0));
29178
30020
  }
29179
30021
  shortenToLength(idx) {
29180
30022
  while (this.stackTop >= idx) {
29181
30023
  const popped = this.current;
29182
- if (this.tmplCount > 0 && this._isInTemplate()) {
29183
- this.tmplCount -= 1;
29184
- }
29185
- this.stackTop--;
29186
- this._updateCurrentElement();
30024
+ this._popCurrent();
29187
30025
  this.handler.onItemPop(popped, this.stackTop < idx);
29188
30026
  }
29189
30027
  }
@@ -29191,54 +30029,64 @@ class OpenElementStack {
29191
30029
  const idx = this._indexOf(element);
29192
30030
  this.shortenToLength(Math.max(idx, 0));
29193
30031
  }
29194
- popUntilPopped(tagNames, targetNS) {
29195
- const idx = this._indexOfTagNames(tagNames, targetNS);
29196
- this.shortenToLength(Math.max(idx, 0));
29197
- }
29198
30032
  popUntilNumberedHeaderPopped() {
29199
- this.popUntilPopped(NUMBERED_HEADERS, NS.HTML);
30033
+ this.shortenToLength(Math.max(this.indexOfTopmostOf(NUMBERED_HEADERS2), 0));
29200
30034
  }
29201
30035
  popUntilTableCellPopped() {
29202
- this.popUntilPopped(TABLE_CELLS, NS.HTML);
30036
+ this.shortenToLength(Math.max(this.indexOfTopmostOf(TABLE_CELLS), 0));
29203
30037
  }
29204
30038
  popAllUpToHtmlElement() {
29205
30039
  this.tmplCount = 0;
29206
30040
  this.shortenToLength(1);
29207
30041
  }
29208
- _indexOfTagNames(tagNames, namespace) {
29209
- for (let i = this.stackTop;i >= 0; i--) {
29210
- if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {
29211
- return i;
29212
- }
29213
- }
29214
- return -1;
29215
- }
29216
- clearBackTo(tagNames, targetNS) {
29217
- const idx = this._indexOfTagNames(tagNames, targetNS);
29218
- this.shortenToLength(idx + 1);
29219
- }
29220
30042
  clearBackToTableContext() {
29221
- this.clearBackTo(TABLE_CONTEXT, NS.HTML);
30043
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_CONTEXT) + 1);
29222
30044
  }
29223
30045
  clearBackToTableBodyContext() {
29224
- this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);
30046
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_BODY_CONTEXT) + 1);
29225
30047
  }
29226
30048
  clearBackToTableRowContext() {
29227
- this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);
30049
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_ROW_CONTEXT) + 1);
29228
30050
  }
29229
30051
  remove(element) {
29230
30052
  const idx = this._indexOf(element);
29231
- if (idx >= 0) {
29232
- if (idx === this.stackTop) {
29233
- this.pop();
29234
- } else {
29235
- this.items.splice(idx, 1);
29236
- this.tagIDs.splice(idx, 1);
29237
- this.stackTop--;
29238
- this._updateCurrentElement();
29239
- this.handler.onItemPop(element, false);
30053
+ if (idx !== -1)
30054
+ this.removeAt(idx);
30055
+ }
30056
+ removeAt(idx) {
30057
+ if (idx === this.stackTop) {
30058
+ this.pop();
30059
+ return;
30060
+ }
30061
+ const element = this.items[idx];
30062
+ this.depth--;
30063
+ if (this.indexed) {
30064
+ const classes = this.keys[idx] < NAME_KEYS ? KEY_CLASSES[this.keys[idx]] : 0;
30065
+ const belowIdx = this.below[idx];
30066
+ const aboveIdx = this.above[idx];
30067
+ this._unindex(idx);
30068
+ this.items[idx] = undefined;
30069
+ this.below[aboveIdx] = belowIdx;
30070
+ if (belowIdx !== -1)
30071
+ this.above[belowIdx] = aboveIdx;
30072
+ if (classes !== 0) {
30073
+ for (let i = aboveIdx;i !== -1; i = this.above[i]) {
30074
+ this.specials[i] -= classes & SPECIAL;
30075
+ this.listItemBoundaries[i] -= (classes & LIST_ITEM_BOUNDARY) >> 1;
30076
+ this.scopeBoundaries[i] -= (classes & SCOPE) >> 2;
30077
+ }
30078
+ }
30079
+ const html = belowIdx === -1 ? -1 : this.htmlSlots[belowIdx];
30080
+ for (let i = aboveIdx;i !== -1 && this.htmlSlots[i] === idx; i = this.above[i]) {
30081
+ this.htmlSlots[i] = html;
29240
30082
  }
30083
+ } else {
30084
+ this.items.splice(idx, 1);
30085
+ this.tagIDs.splice(idx, 1);
30086
+ this.stackTop--;
30087
+ this._updateCurrentElement();
29241
30088
  }
30089
+ this.handler.onItemPop(element, false);
29242
30090
  }
29243
30091
  tryPeekProperlyNestedBodyElement() {
29244
30092
  return this.stackTop >= 1 && this.tagIDs[1] === TAG_ID.BODY ? this.items[1] : null;
@@ -29247,109 +30095,66 @@ class OpenElementStack {
29247
30095
  return this._indexOf(element) > -1;
29248
30096
  }
29249
30097
  getCommonAncestor(element) {
29250
- const elementIdx = this._indexOf(element) - 1;
29251
- return elementIdx >= 0 ? this.items[elementIdx] : null;
30098
+ const idx = this._indexOf(element);
30099
+ const belowIdx = idx === -1 ? -1 : this.slotBelow(idx);
30100
+ return belowIdx === -1 ? null : this.items[belowIdx];
29252
30101
  }
29253
30102
  isRootHtmlElementCurrent() {
29254
30103
  return this.stackTop === 0 && this.tagIDs[0] === TAG_ID.HTML;
29255
30104
  }
29256
- hasInDynamicScope(tagName, htmlScope) {
29257
- for (let i = this.stackTop;i >= 0; i--) {
29258
- const tn = this.tagIDs[i];
29259
- switch (this.treeAdapter.getNamespaceURI(this.items[i])) {
29260
- case NS.HTML: {
29261
- if (tn === tagName)
29262
- return true;
29263
- if (htmlScope.has(tn))
29264
- return false;
29265
- break;
29266
- }
29267
- case NS.SVG: {
29268
- if (SCOPING_ELEMENTS_SVG.has(tn))
29269
- return false;
29270
- break;
29271
- }
29272
- case NS.MATHML: {
29273
- if (SCOPING_ELEMENTS_MATHML.has(tn))
29274
- return false;
29275
- break;
29276
- }
30105
+ _isInScope(target, scope) {
30106
+ let boundary = -1;
30107
+ switch (scope) {
30108
+ case LIST_ITEM_SCOPE: {
30109
+ boundary = Math.max(this.keyTops[TAG_ID.OL], this.keyTops[TAG_ID.UL]);
30110
+ break;
30111
+ }
30112
+ case BUTTON_SCOPE: {
30113
+ boundary = this.keyTops[TAG_ID.BUTTON];
30114
+ break;
30115
+ }
30116
+ case TABLE_SCOPE: {
30117
+ boundary = Math.max(this.keyTops[TAG_ID.TABLE], this.keyTops[TAG_ID.HTML]);
30118
+ return target === -1 ? boundary === -1 : target >= boundary;
29277
30119
  }
30120
+ default:
30121
+ }
30122
+ return target === -1 ? boundary === -1 && (this.stackTop === -1 || this.scopeBoundaries[this.stackTop] === 0) : target >= boundary && this.scopeBoundaries[this.stackTop] === this.scopeBoundaries[target];
30123
+ }
30124
+ _scanScope(tagID, tagIDs, scope, element) {
30125
+ for (let i = this.stackTop;i >= 0; i--) {
30126
+ const key = tagKey(this.treeAdapter.getNamespaceURI(this.items[i]), this.tagIDs[i]);
30127
+ if (key === -1)
30128
+ continue;
30129
+ if ((tagIDs ? tagIDs.includes(key) : key === tagID) && (!element || this.items[i] === element))
30130
+ return true;
30131
+ if (KEY_CLASSES[key] & scope)
30132
+ return false;
29278
30133
  }
29279
30134
  return true;
29280
30135
  }
29281
- hasInScope(tagName) {
29282
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML);
30136
+ hasInScope(tagName, element) {
30137
+ if (!this.indexed)
30138
+ return this._scanScope(tagName, null, SCOPE, element);
30139
+ return this._isInScope(element ? this._indexOf(element) : this.keyTops[tagName], SCOPE);
29283
30140
  }
29284
30141
  hasInListItemScope(tagName) {
29285
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_LIST);
30142
+ return this.indexed ? this._isInScope(this.keyTops[tagName], LIST_ITEM_SCOPE) : this._scanScope(tagName, null, LIST_ITEM_SCOPE);
29286
30143
  }
29287
30144
  hasInButtonScope(tagName) {
29288
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_BUTTON);
30145
+ return this.indexed ? this._isInScope(this.keyTops[tagName], BUTTON_SCOPE) : this._scanScope(tagName, null, BUTTON_SCOPE);
29289
30146
  }
29290
30147
  hasNumberedHeaderInScope() {
29291
- for (let i = this.stackTop;i >= 0; i--) {
29292
- const tn = this.tagIDs[i];
29293
- switch (this.treeAdapter.getNamespaceURI(this.items[i])) {
29294
- case NS.HTML: {
29295
- if (NUMBERED_HEADERS.has(tn))
29296
- return true;
29297
- if (SCOPING_ELEMENTS_HTML.has(tn))
29298
- return false;
29299
- break;
29300
- }
29301
- case NS.SVG: {
29302
- if (SCOPING_ELEMENTS_SVG.has(tn))
29303
- return false;
29304
- break;
29305
- }
29306
- case NS.MATHML: {
29307
- if (SCOPING_ELEMENTS_MATHML.has(tn))
29308
- return false;
29309
- break;
29310
- }
29311
- }
29312
- }
29313
- return true;
30148
+ return this.indexed ? this._isInScope(this.indexOfTopmostOf(NUMBERED_HEADERS2), SCOPE) : this._scanScope(TAG_ID.UNKNOWN, NUMBERED_HEADERS2, SCOPE);
29314
30149
  }
29315
30150
  hasInTableScope(tagName) {
29316
- for (let i = this.stackTop;i >= 0; i--) {
29317
- if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
29318
- continue;
29319
- }
29320
- switch (this.tagIDs[i]) {
29321
- case tagName: {
29322
- return true;
29323
- }
29324
- case TAG_ID.TABLE:
29325
- case TAG_ID.HTML: {
29326
- return false;
29327
- }
29328
- }
29329
- }
29330
- return true;
30151
+ return this.indexed ? this._isInScope(this.keyTops[tagName], TABLE_SCOPE) : this._scanScope(tagName, null, TABLE_SCOPE);
29331
30152
  }
29332
30153
  hasTableBodyContextInTableScope() {
29333
- for (let i = this.stackTop;i >= 0; i--) {
29334
- if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
29335
- continue;
29336
- }
29337
- switch (this.tagIDs[i]) {
29338
- case TAG_ID.TBODY:
29339
- case TAG_ID.THEAD:
29340
- case TAG_ID.TFOOT: {
29341
- return true;
29342
- }
29343
- case TAG_ID.TABLE:
29344
- case TAG_ID.HTML: {
29345
- return false;
29346
- }
29347
- }
29348
- }
29349
- return true;
30154
+ return this.indexed ? this._isInScope(this.indexOfTopmostOf(TABLE_BODIES), TABLE_SCOPE) : this._scanScope(TAG_ID.UNKNOWN, TABLE_BODIES, TABLE_SCOPE);
29350
30155
  }
29351
30156
  hasInSelectScope(tagName) {
29352
- for (let i = this.stackTop;i >= 0; i--) {
30157
+ for (let i = this.stackTop;i >= 0; i = this.slotBelow(i)) {
29353
30158
  if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
29354
30159
  continue;
29355
30160
  }
@@ -29369,22 +30174,22 @@ class OpenElementStack {
29369
30174
  return true;
29370
30175
  }
29371
30176
  generateImpliedEndTags() {
29372
- while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {
30177
+ while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
29373
30178
  this.pop();
29374
30179
  }
29375
30180
  }
29376
30181
  generateImpliedEndTagsThoroughly() {
29377
- while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
30182
+ while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
29378
30183
  this.pop();
29379
30184
  }
29380
30185
  }
29381
30186
  generateImpliedEndTagsWithExclusion(exclusionId) {
29382
- while (this.currentTagId !== undefined && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
30187
+ while (this.currentTagId !== undefined && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
29383
30188
  this.pop();
29384
30189
  }
29385
30190
  }
29386
30191
  }
29387
- 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;
30192
+ 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;
29388
30193
  var init_open_element_stack = __esm(() => {
29389
30194
  init_html3();
29390
30195
  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]);
@@ -29399,7 +30204,23 @@ var init_open_element_stack = __esm(() => {
29399
30204
  TAG_ID.THEAD,
29400
30205
  TAG_ID.TR
29401
30206
  ]);
29402
- SCOPING_ELEMENTS_HTML = new Set([
30207
+ NUMBERED_HEADERS2 = [TAG_ID.H1, TAG_ID.H2, TAG_ID.H3, TAG_ID.H4, TAG_ID.H5, TAG_ID.H6];
30208
+ TABLE_BODIES = [TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD];
30209
+ TABLE_ROW_CONTEXT = [TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML];
30210
+ TABLE_BODY_CONTEXT = [...TABLE_BODIES, TAG_ID.TEMPLATE, TAG_ID.HTML];
30211
+ TABLE_CONTEXT = [TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML];
30212
+ TABLE_CELLS = [TAG_ID.TD, TAG_ID.TH];
30213
+ KEY_CLASSES = new Uint8Array(NAME_KEYS);
30214
+ for (const [ns, offset] of [
30215
+ [NS.HTML, 0],
30216
+ [NS.SVG, SVG_KEYS],
30217
+ [NS.MATHML, MATHML_KEYS]
30218
+ ]) {
30219
+ for (const tn of SPECIAL_ELEMENTS[ns]) {
30220
+ KEY_CLASSES[offset + tn] = ns === NS.HTML && (tn === TAG_ID.ADDRESS || tn === TAG_ID.DIV || tn === TAG_ID.P) ? SPECIAL : SPECIAL | LIST_ITEM_BOUNDARY;
30221
+ }
30222
+ }
30223
+ for (const key of [
29403
30224
  TAG_ID.APPLET,
29404
30225
  TAG_ID.CAPTION,
29405
30226
  TAG_ID.HTML,
@@ -29408,118 +30229,207 @@ var init_open_element_stack = __esm(() => {
29408
30229
  TAG_ID.TABLE,
29409
30230
  TAG_ID.TD,
29410
30231
  TAG_ID.TEMPLATE,
29411
- TAG_ID.TH
29412
- ]);
29413
- SCOPING_ELEMENTS_HTML_LIST = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.OL, TAG_ID.UL]);
29414
- SCOPING_ELEMENTS_HTML_BUTTON = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.BUTTON]);
29415
- SCOPING_ELEMENTS_MATHML = new Set([TAG_ID.ANNOTATION_XML, TAG_ID.MI, TAG_ID.MN, TAG_ID.MO, TAG_ID.MS, TAG_ID.MTEXT]);
29416
- SCOPING_ELEMENTS_SVG = new Set([TAG_ID.DESC, TAG_ID.FOREIGN_OBJECT, TAG_ID.TITLE]);
29417
- TABLE_ROW_CONTEXT = new Set([TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML]);
29418
- TABLE_BODY_CONTEXT = new Set([TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TEMPLATE, TAG_ID.HTML]);
29419
- TABLE_CONTEXT = new Set([TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML]);
29420
- TABLE_CELLS = new Set([TAG_ID.TD, TAG_ID.TH]);
30232
+ TAG_ID.TH,
30233
+ SVG_KEYS + TAG_ID.DESC,
30234
+ SVG_KEYS + TAG_ID.FOREIGN_OBJECT,
30235
+ SVG_KEYS + TAG_ID.TITLE,
30236
+ MATHML_KEYS + TAG_ID.ANNOTATION_XML,
30237
+ MATHML_KEYS + TAG_ID.MI,
30238
+ MATHML_KEYS + TAG_ID.MN,
30239
+ MATHML_KEYS + TAG_ID.MO,
30240
+ MATHML_KEYS + TAG_ID.MS,
30241
+ MATHML_KEYS + TAG_ID.MTEXT
30242
+ ]) {
30243
+ KEY_CLASSES[key] |= SCOPE | LIST_ITEM_SCOPE | BUTTON_SCOPE;
30244
+ }
30245
+ KEY_CLASSES[TAG_ID.OL] |= LIST_ITEM_SCOPE;
30246
+ KEY_CLASSES[TAG_ID.UL] |= LIST_ITEM_SCOPE;
30247
+ KEY_CLASSES[TAG_ID.BUTTON] |= BUTTON_SCOPE;
30248
+ KEY_CLASSES[TAG_ID.TABLE] |= TABLE_SCOPE;
30249
+ KEY_CLASSES[TAG_ID.HTML] |= TABLE_SCOPE;
30250
+ FORMATTING_TAGS = new Uint8Array(NAME_KEYS);
30251
+ 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]) {
30252
+ FORMATTING_TAGS[tn] = 1;
30253
+ }
29421
30254
  });
29422
30255
 
29423
30256
  // ../../node_modules/parse5/dist/parser/formatting-element-list.js
29424
30257
  class FormattingElementList {
29425
- constructor(treeAdapter) {
29426
- this.treeAdapter = treeAdapter;
29427
- this.entries = [];
30258
+ constructor() {
30259
+ this.newest = null;
29428
30260
  this.bookmark = null;
30261
+ this.index = null;
30262
+ this.elementEntries = new Map;
29429
30263
  }
29430
- _getNoahArkConditionCandidates(newElement, neAttrs) {
29431
- const candidates = [];
29432
- const neAttrsLength = neAttrs.length;
29433
- const neTagName = this.treeAdapter.getTagName(newElement);
29434
- const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);
29435
- for (let i = 0;i < this.entries.length; i++) {
29436
- const entry = this.entries[i];
29437
- if (entry.type === EntryType.Marker) {
29438
- break;
29439
- }
29440
- const { element } = entry;
29441
- if (this.treeAdapter.getTagName(element) === neTagName && this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) {
29442
- const elementAttrs = this.treeAdapter.getAttrList(element);
29443
- if (elementAttrs.length === neAttrsLength) {
29444
- candidates.push({ idx: i, attrs: elementAttrs });
29445
- }
29446
- }
30264
+ _insertElementEntry(element, token, older) {
30265
+ const newer = older === null ? null : older.newer;
30266
+ const entry = {
30267
+ type: EntryType.Element,
30268
+ element,
30269
+ token,
30270
+ older,
30271
+ newer,
30272
+ ark: null,
30273
+ olderSameTag: null,
30274
+ newerSameTag: null
30275
+ };
30276
+ if (newer === null) {
30277
+ this.newest = entry;
30278
+ } else {
30279
+ newer.older = entry;
29447
30280
  }
29448
- return candidates;
30281
+ if (older !== null) {
30282
+ older.newer = entry;
30283
+ }
30284
+ return this.index === null ? null : this._addToIndex(this.index, entry);
29449
30285
  }
29450
- _ensureNoahArkCondition(newElement) {
29451
- if (this.entries.length < NOAH_ARK_CAPACITY)
29452
- return;
29453
- const neAttrs = this.treeAdapter.getAttrList(newElement);
29454
- const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);
29455
- if (candidates.length < NOAH_ARK_CAPACITY)
29456
- return;
29457
- const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));
29458
- let validCandidates = 0;
29459
- for (let i = 0;i < candidates.length; i++) {
29460
- const candidate = candidates[i];
29461
- if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {
29462
- validCandidates += 1;
29463
- if (validCandidates >= NOAH_ARK_CAPACITY) {
29464
- this.entries.splice(candidate.idx, 1);
29465
- }
29466
- }
30286
+ _addToIndex(index, entry) {
30287
+ const { tagName, attrs } = entry.token;
30288
+ const key = tagName + attrs.map(({ name, value }) => `\x00${name}\x00${value}`).sort().join("");
30289
+ let ark = index.arks.get(key);
30290
+ if (ark === undefined) {
30291
+ ark = { entries: [], key };
30292
+ index.arks.set(key, ark);
30293
+ }
30294
+ ark.entries.push(entry);
30295
+ entry.ark = ark;
30296
+ this.elementEntries.set(entry.element, entry);
30297
+ let head = index.tagNames.get(tagName);
30298
+ if (head === undefined) {
30299
+ head = { olderSameTag: null };
30300
+ index.tagNames.set(tagName, head);
29467
30301
  }
30302
+ entry.olderSameTag = head.olderSameTag;
30303
+ entry.newerSameTag = head;
30304
+ if (head.olderSameTag !== null) {
30305
+ head.olderSameTag.newerSameTag = entry;
30306
+ }
30307
+ head.olderSameTag = entry;
30308
+ return ark;
29468
30309
  }
29469
30310
  insertMarker() {
29470
- this.entries.unshift(MARKER2);
30311
+ if (this.index === null) {
30312
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
30313
+ this.elementEntries.set(entry.element, entry);
30314
+ }
30315
+ }
30316
+ const marker = {
30317
+ type: EntryType.Marker,
30318
+ older: this.newest,
30319
+ newer: null,
30320
+ outerIndex: this.index
30321
+ };
30322
+ if (this.newest !== null) {
30323
+ this.newest.newer = marker;
30324
+ }
30325
+ this.newest = marker;
30326
+ this.index = null;
29471
30327
  }
29472
30328
  pushElement(element, token) {
29473
- this._ensureNoahArkCondition(element);
29474
- this.entries.unshift({
29475
- type: EntryType.Element,
29476
- element,
29477
- token
29478
- });
30329
+ if (this.index === null) {
30330
+ let oldest = null;
30331
+ let count = 0;
30332
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
30333
+ oldest = entry;
30334
+ count++;
30335
+ }
30336
+ if (count >= NOAH_ARK_CAPACITY) {
30337
+ this.index = { arks: new Map, tagNames: new Map };
30338
+ for (let entry = oldest;entry !== null && entry.type === EntryType.Element; entry = entry.newer) {
30339
+ this._addToIndex(this.index, entry);
30340
+ }
30341
+ }
30342
+ }
30343
+ const ark = this._insertElementEntry(element, token, this.newest);
30344
+ if (ark !== null && ark.entries.length > NOAH_ARK_CAPACITY) {
30345
+ this.removeEntry(ark.entries[0]);
30346
+ }
29479
30347
  }
29480
30348
  insertElementAfterBookmark(element, token) {
29481
- const bookmarkIdx = this.entries.indexOf(this.bookmark);
29482
- this.entries.splice(bookmarkIdx, 0, {
29483
- type: EntryType.Element,
29484
- element,
29485
- token
29486
- });
30349
+ const { bookmark } = this;
30350
+ this.bookmark = null;
30351
+ this._insertElementEntry(element, token, bookmark);
29487
30352
  }
29488
30353
  removeEntry(entry) {
29489
- const entryIndex = this.entries.indexOf(entry);
29490
- if (entryIndex !== -1) {
29491
- this.entries.splice(entryIndex, 1);
30354
+ var _a;
30355
+ if (entry.newer === null ? this.newest !== entry : entry.newer.older !== entry) {
30356
+ return;
30357
+ }
30358
+ this.elementEntries.delete(entry.element);
30359
+ if (entry.newer === null) {
30360
+ this.newest = entry.older;
30361
+ } else {
30362
+ entry.newer.older = entry.older;
29492
30363
  }
30364
+ if (entry.older !== null) {
30365
+ entry.older.newer = entry.newer;
30366
+ }
30367
+ if (entry.ark !== null) {
30368
+ const { entries, key } = entry.ark;
30369
+ entries.splice(entries.indexOf(entry), 1);
30370
+ if (entries.length === 0)
30371
+ (_a = this.index) === null || _a === undefined || _a.arks.delete(key);
30372
+ }
30373
+ if (entry.newerSameTag !== null) {
30374
+ entry.newerSameTag.olderSameTag = entry.olderSameTag;
30375
+ if (entry.olderSameTag !== null) {
30376
+ entry.olderSameTag.newerSameTag = entry.newerSameTag;
30377
+ }
30378
+ }
30379
+ }
30380
+ replaceElement(entry, element) {
30381
+ if (this.elementEntries.delete(entry.element)) {
30382
+ this.elementEntries.set(element, entry);
30383
+ }
30384
+ entry.element = element;
29493
30385
  }
29494
30386
  clearToLastMarker() {
29495
- const markerIdx = this.entries.indexOf(MARKER2);
29496
- if (markerIdx === -1) {
29497
- this.entries.length = 0;
29498
- } else {
29499
- this.entries.splice(0, markerIdx + 1);
30387
+ let marker = this.newest;
30388
+ for (;marker !== null && marker.type === EntryType.Element; marker = marker.older) {
30389
+ this.elementEntries.delete(marker.element);
30390
+ }
30391
+ this.newest = marker === null ? null : marker.older;
30392
+ this.index = marker === null ? null : marker.outerIndex;
30393
+ if (this.newest !== null) {
30394
+ this.newest.newer = null;
29500
30395
  }
29501
30396
  }
29502
30397
  getElementEntryInScopeWithTagName(tagName) {
29503
- const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName);
29504
- return entry && entry.type === EntryType.Element ? entry : null;
30398
+ var _a, _b;
30399
+ if (this.index !== null) {
30400
+ return (_b = (_a = this.index.tagNames.get(tagName)) === null || _a === undefined ? undefined : _a.olderSameTag) !== null && _b !== undefined ? _b : null;
30401
+ }
30402
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
30403
+ if (entry.token.tagName === tagName) {
30404
+ return entry;
30405
+ }
30406
+ }
30407
+ return null;
29505
30408
  }
29506
30409
  getElementEntry(element) {
29507
- return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element);
30410
+ if (this.index === null) {
30411
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
30412
+ if (entry.element === element) {
30413
+ return entry;
30414
+ }
30415
+ }
30416
+ }
30417
+ return this.elementEntries.get(element);
29508
30418
  }
29509
30419
  }
29510
- var NOAH_ARK_CAPACITY = 3, EntryType, MARKER2;
30420
+ var NOAH_ARK_CAPACITY = 3, EntryType;
29511
30421
  var init_formatting_element_list = __esm(() => {
29512
30422
  (function(EntryType) {
29513
30423
  EntryType[EntryType["Marker"] = 0] = "Marker";
29514
30424
  EntryType[EntryType["Element"] = 1] = "Element";
29515
30425
  })(EntryType || (EntryType = {}));
29516
- MARKER2 = { type: EntryType.Marker };
29517
30426
  });
29518
30427
 
29519
30428
  // ../../node_modules/parse5/dist/tree-adapters/default.js
29520
- var defaultTreeAdapter;
30429
+ var attrListIndexes, defaultTreeAdapter;
29521
30430
  var init_default2 = __esm(() => {
29522
30431
  init_html3();
30432
+ attrListIndexes = new WeakMap;
29523
30433
  defaultTreeAdapter = {
29524
30434
  createDocument() {
29525
30435
  return {
@@ -29563,8 +30473,9 @@ var init_default2 = __esm(() => {
29563
30473
  newNode.parentNode = parentNode;
29564
30474
  },
29565
30475
  insertBefore(parentNode, newNode, referenceNode) {
29566
- const insertionIdx = parentNode.childNodes.indexOf(referenceNode);
29567
- parentNode.childNodes.splice(insertionIdx, 0, newNode);
30476
+ const { childNodes } = parentNode;
30477
+ const insertionIdx = childNodes[childNodes.length - 1] === referenceNode ? childNodes.length - 1 : childNodes.indexOf(referenceNode);
30478
+ childNodes.splice(insertionIdx, 0, newNode);
29568
30479
  newNode.parentNode = parentNode;
29569
30480
  },
29570
30481
  setTemplateContent(templateElement, contentElement) {
@@ -29598,8 +30509,9 @@ var init_default2 = __esm(() => {
29598
30509
  },
29599
30510
  detachNode(node) {
29600
30511
  if (node.parentNode) {
29601
- const idx = node.parentNode.childNodes.indexOf(node);
29602
- node.parentNode.childNodes.splice(idx, 1);
30512
+ const { childNodes } = node.parentNode;
30513
+ const idx = childNodes[childNodes.length - 1] === node ? childNodes.length - 1 : childNodes.indexOf(node);
30514
+ childNodes.splice(idx, 1);
29603
30515
  node.parentNode = null;
29604
30516
  }
29605
30517
  },
@@ -29614,7 +30526,9 @@ var init_default2 = __esm(() => {
29614
30526
  defaultTreeAdapter.appendChild(parentNode, defaultTreeAdapter.createTextNode(text));
29615
30527
  },
29616
30528
  insertTextBefore(parentNode, text, referenceNode) {
29617
- const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
30529
+ const { childNodes } = parentNode;
30530
+ const referenceIdx = childNodes[childNodes.length - 1] === referenceNode ? childNodes.length - 1 : childNodes.indexOf(referenceNode);
30531
+ const prevNode = childNodes[referenceIdx - 1];
29618
30532
  if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {
29619
30533
  prevNode.value += text;
29620
30534
  } else {
@@ -29622,12 +30536,35 @@ var init_default2 = __esm(() => {
29622
30536
  }
29623
30537
  },
29624
30538
  adoptAttributes(recipient, attrs) {
29625
- const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));
30539
+ if (attrs.length === 0 || attrs === recipient.attrs)
30540
+ return;
30541
+ const cached = attrListIndexes.get(recipient.attrs);
30542
+ const isIndexed = (cached === null || cached === undefined ? undefined : cached.size) === recipient.attrs.length && attrs.every(({ name }) => {
30543
+ var _a;
30544
+ const index = cached.get(name);
30545
+ return index === undefined || ((_a = recipient.attrs[index]) === null || _a === undefined ? undefined : _a.name) === name;
30546
+ });
30547
+ const recipientAttrsMap = isIndexed ? cached : new Map;
30548
+ if (!isIndexed) {
30549
+ for (let i = 0;i < recipient.attrs.length; i++) {
30550
+ const attr = recipient.attrs[i];
30551
+ if (attr !== undefined)
30552
+ recipientAttrsMap.set(attr.name, i);
30553
+ }
30554
+ attrListIndexes.set(recipient.attrs, recipientAttrsMap);
30555
+ }
30556
+ const adoptedFrom = recipient.attrs.length;
29626
30557
  for (let j = 0;j < attrs.length; j++) {
29627
30558
  if (!recipientAttrsMap.has(attrs[j].name)) {
29628
30559
  recipient.attrs.push(attrs[j]);
29629
30560
  }
29630
30561
  }
30562
+ for (let j = adoptedFrom;j < recipient.attrs.length; j++) {
30563
+ recipientAttrsMap.set(recipient.attrs[j].name, j);
30564
+ }
30565
+ if (recipientAttrsMap.size !== recipient.attrs.length) {
30566
+ attrListIndexes.delete(recipient.attrs);
30567
+ }
29631
30568
  },
29632
30569
  getFirstChild(node) {
29633
30570
  return node.childNodes[0];
@@ -30047,7 +30984,7 @@ class Parser {
30047
30984
  }
30048
30985
  this.document = document2 !== null && document2 !== undefined ? document2 : this.treeAdapter.createDocument();
30049
30986
  this.tokenizer = new Tokenizer(this.options, this);
30050
- this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
30987
+ this.activeFormattingElements = new FormattingElementList;
30051
30988
  this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;
30052
30989
  this._setContextModes(fragmentContext !== null && fragmentContext !== undefined ? fragmentContext : this.document, this.fragmentContextID);
30053
30990
  this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);
@@ -30066,7 +31003,7 @@ class Parser {
30066
31003
  const documentMock = opts.treeAdapter.createElement("documentmock", NS.HTML, []);
30067
31004
  const parser = new this(opts, documentMock, fragmentContext);
30068
31005
  if (parser.fragmentContextID === TAG_ID.TEMPLATE) {
30069
- parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
31006
+ parser.tmplInsertionModeStack.push(InsertionMode.IN_TEMPLATE);
30070
31007
  }
30071
31008
  parser._initTokenizerForFragmentParsing();
30072
31009
  parser._insertFakeRootElement();
@@ -30103,11 +31040,12 @@ class Parser {
30103
31040
  this._setContextModes(node, tid);
30104
31041
  }
30105
31042
  onItemPop(node, isTop) {
30106
- var _a, _b;
31043
+ var _a, _b, _c;
30107
31044
  if (this.options.sourceCodeLocationInfo) {
30108
31045
  this._setEndLocation(node, this.currentToken);
30109
31046
  }
30110
31047
  (_b = (_a = this.treeAdapter).onItemPop) === null || _b === undefined || _b.call(_a, node, this.openElements.current);
31048
+ (_c = this.annotationXmlIntegrationPoints) === null || _c === undefined || _c.delete(node);
30111
31049
  if (isTop) {
30112
31050
  let current;
30113
31051
  let currentTagId;
@@ -30142,7 +31080,7 @@ class Parser {
30142
31080
  _findFormInFragmentContext() {
30143
31081
  let node = this.fragmentContext;
30144
31082
  while (node) {
30145
- if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM) {
31083
+ if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM && this.treeAdapter.getNamespaceURI(node) === NS.HTML) {
30146
31084
  this.formElement = node;
30147
31085
  break;
30148
31086
  }
@@ -30192,7 +31130,7 @@ class Parser {
30192
31130
  }
30193
31131
  }
30194
31132
  }
30195
- _attachElementToTree(element, location) {
31133
+ _attachElementToTree(element, location, insertionLocation) {
30196
31134
  if (this.options.sourceCodeLocationInfo) {
30197
31135
  const loc = location && {
30198
31136
  ...location,
@@ -30200,41 +31138,64 @@ class Parser {
30200
31138
  };
30201
31139
  this.treeAdapter.setNodeSourceCodeLocation(element, loc);
30202
31140
  }
30203
- if (this._shouldFosterParentOnInsertion()) {
30204
- this._fosterParentElement(element);
31141
+ if (insertionLocation.beforeElement) {
31142
+ this.treeAdapter.insertBefore(insertionLocation.parent, element, insertionLocation.beforeElement);
30205
31143
  } else {
30206
- const parent = this.openElements.currentTmplContentOrNode;
30207
- this.treeAdapter.appendChild(parent !== null && parent !== undefined ? parent : this.document, element);
31144
+ this.treeAdapter.appendChild(insertionLocation.parent, element);
30208
31145
  }
30209
31146
  }
31147
+ _getInsertionLocation() {
31148
+ var _a;
31149
+ if (this._shouldFosterParentOnInsertion()) {
31150
+ return this._findFosterParentingLocation();
31151
+ }
31152
+ return {
31153
+ parent: (_a = this.openElements.currentTmplContentOrNode) !== null && _a !== undefined ? _a : this.document,
31154
+ beforeElement: null
31155
+ };
31156
+ }
31157
+ _createElement(tagName, namespaceURI, attrs, intendedParent) {
31158
+ var _a, _b;
31159
+ const element = this.treeAdapter.createElement(tagName, namespaceURI, attrs);
31160
+ (_b = (_a = this.treeAdapter).onElementCreated) === null || _b === undefined || _b.call(_a, element, {
31161
+ intendedParent,
31162
+ formElement: this.formElement,
31163
+ isInTemplate: this.openElements.tmplCount > 0
31164
+ });
31165
+ return element;
31166
+ }
30210
31167
  _appendElement(token, namespaceURI) {
30211
- const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
30212
- this._attachElementToTree(element, token.location);
31168
+ const insertionLocation = this._getInsertionLocation();
31169
+ const element = this._createElement(token.tagName, namespaceURI, token.attrs, insertionLocation.parent);
31170
+ this._attachElementToTree(element, token.location, insertionLocation);
30213
31171
  }
30214
31172
  _insertElement(token, namespaceURI) {
30215
- const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
30216
- this._attachElementToTree(element, token.location);
31173
+ const insertionLocation = this._getInsertionLocation();
31174
+ const element = this._createElement(token.tagName, namespaceURI, token.attrs, insertionLocation.parent);
31175
+ this._attachElementToTree(element, token.location, insertionLocation);
30217
31176
  this.openElements.push(element, token.tagID);
30218
31177
  }
30219
31178
  _insertFakeElement(tagName, tagID) {
30220
- const element = this.treeAdapter.createElement(tagName, NS.HTML, []);
30221
- this._attachElementToTree(element, null);
31179
+ const insertionLocation = this._getInsertionLocation();
31180
+ const element = this._createElement(tagName, NS.HTML, [], insertionLocation.parent);
31181
+ this._attachElementToTree(element, null, insertionLocation);
30222
31182
  this.openElements.push(element, tagID);
30223
31183
  }
30224
31184
  _insertTemplate(token) {
30225
- const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);
31185
+ const insertionLocation = this._getInsertionLocation();
31186
+ const tmpl = this._createElement(token.tagName, NS.HTML, token.attrs, insertionLocation.parent);
30226
31187
  const content = this.treeAdapter.createDocumentFragment();
30227
31188
  this.treeAdapter.setTemplateContent(tmpl, content);
30228
- this._attachElementToTree(tmpl, token.location);
31189
+ this._attachElementToTree(tmpl, token.location, insertionLocation);
30229
31190
  this.openElements.push(tmpl, token.tagID);
30230
31191
  if (this.options.sourceCodeLocationInfo)
30231
31192
  this.treeAdapter.setNodeSourceCodeLocation(content, null);
30232
31193
  }
30233
31194
  _insertFakeRootElement() {
30234
- const element = this.treeAdapter.createElement(TAG_NAMES.HTML, NS.HTML, []);
31195
+ const element = this._createElement(TAG_NAMES.HTML, NS.HTML, [], this.document);
30235
31196
  if (this.options.sourceCodeLocationInfo)
30236
31197
  this.treeAdapter.setNodeSourceCodeLocation(element, null);
30237
- this.treeAdapter.appendChild(this.openElements.current, element);
31198
+ this.treeAdapter.appendChild(this.document, element);
30238
31199
  this.openElements.push(element, TAG_ID.HTML);
30239
31200
  }
30240
31201
  _appendCommentNode(token, parent) {
@@ -30272,8 +31233,11 @@ class Parser {
30272
31233
  }
30273
31234
  }
30274
31235
  _adoptNodes(donor, recipient) {
30275
- for (let child = this.treeAdapter.getFirstChild(donor);child; child = this.treeAdapter.getFirstChild(donor)) {
30276
- this.treeAdapter.detachNode(child);
31236
+ const children = [...this.treeAdapter.getChildNodes(donor)];
31237
+ for (let i = children.length - 1;i >= 0; i--) {
31238
+ this.treeAdapter.detachNode(children[i]);
31239
+ }
31240
+ for (const child of children) {
30277
31241
  this.treeAdapter.appendChild(recipient, child);
30278
31242
  }
30279
31243
  }
@@ -30347,20 +31311,27 @@ class Parser {
30347
31311
  }
30348
31312
  }
30349
31313
  _isIntegrationPoint(tid, element, foreignNS) {
31314
+ var _a;
30350
31315
  const ns = this.treeAdapter.getNamespaceURI(element);
30351
- const attrs = this.treeAdapter.getAttrList(element);
30352
- return isIntegrationPoint(tid, ns, attrs, foreignNS);
31316
+ if (tid === TAG_ID.ANNOTATION_XML && ns === NS.MATHML && foreignNS !== NS.MATHML) {
31317
+ const verdicts = (_a = this.annotationXmlIntegrationPoints) !== null && _a !== undefined ? _a : this.annotationXmlIntegrationPoints = new Map;
31318
+ let isIntegrationPoint2 = verdicts.get(element);
31319
+ if (isIntegrationPoint2 === undefined) {
31320
+ isIntegrationPoint2 = isIntegrationPoint(tid, ns, this.treeAdapter.getAttrList(element));
31321
+ verdicts.set(element, isIntegrationPoint2);
31322
+ }
31323
+ return isIntegrationPoint2;
31324
+ }
31325
+ return isIntegrationPoint(tid, ns, EMPTY_ATTRS, foreignNS);
30353
31326
  }
30354
31327
  _reconstructActiveFormattingElements() {
30355
- const listLength = this.activeFormattingElements.entries.length;
30356
- if (listLength) {
30357
- const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element));
30358
- const unopenIdx = endIndex === -1 ? listLength - 1 : endIndex - 1;
30359
- for (let i = unopenIdx;i >= 0; i--) {
30360
- const entry = this.activeFormattingElements.entries[i];
30361
- this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
30362
- entry.element = this.openElements.current;
30363
- }
31328
+ let oldest = null;
31329
+ for (let entry = this.activeFormattingElements.newest;entry !== null && entry.type === EntryType.Element && !this.openElements.contains(entry.element); entry = entry.older) {
31330
+ oldest = entry;
31331
+ }
31332
+ for (let entry = oldest;entry !== null && entry.type === EntryType.Element; entry = entry.newer) {
31333
+ this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
31334
+ this.activeFormattingElements.replaceElement(entry, this.openElements.current);
30364
31335
  }
30365
31336
  }
30366
31337
  _closeTableCell() {
@@ -30374,8 +31345,11 @@ class Parser {
30374
31345
  this.openElements.popUntilTagNamePopped(TAG_ID.P);
30375
31346
  }
30376
31347
  _resetInsertionMode() {
30377
- for (let i = this.openElements.stackTop;i >= 0; i--) {
30378
- switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {
31348
+ const i = this.openElements.indexOfTopmostOf(INSERTION_MODE_TAGS);
31349
+ const tn = i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i];
31350
+ const node = i === 0 && this.fragmentContext ? this.fragmentContext : this.openElements.items[i];
31351
+ if (node !== undefined && this.treeAdapter.getNamespaceURI(node) === NS.HTML) {
31352
+ switch (tn) {
30379
31353
  case TAG_ID.TR: {
30380
31354
  this.insertionMode = InsertionMode.IN_ROW;
30381
31355
  return;
@@ -30411,7 +31385,7 @@ class Parser {
30411
31385
  return;
30412
31386
  }
30413
31387
  case TAG_ID.TEMPLATE: {
30414
- this.insertionMode = this.tmplInsertionModeStack[0];
31388
+ this.insertionMode = this.tmplInsertionModeStack[this.tmplInsertionModeStack.length - 1];
30415
31389
  return;
30416
31390
  }
30417
31391
  case TAG_ID.HTML: {
@@ -30439,14 +31413,10 @@ class Parser {
30439
31413
  }
30440
31414
  _resetInsertionModeForSelect(selectIdx) {
30441
31415
  if (selectIdx > 0) {
30442
- for (let i = selectIdx - 1;i > 0; i--) {
30443
- const tn = this.openElements.tagIDs[i];
30444
- if (tn === TAG_ID.TEMPLATE) {
30445
- break;
30446
- } else if (tn === TAG_ID.TABLE) {
30447
- this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
30448
- return;
30449
- }
31416
+ const tableIdx = this.openElements.indexOfTopmost(TAG_ID.TABLE);
31417
+ if (tableIdx > 0 && tableIdx > this.openElements.indexOfTopmost(TAG_ID.TEMPLATE)) {
31418
+ this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
31419
+ return;
30450
31420
  }
30451
31421
  }
30452
31422
  this.insertionMode = InsertionMode.IN_SELECT;
@@ -30458,26 +31428,24 @@ class Parser {
30458
31428
  return this.fosterParentingEnabled && this.openElements.currentTagId !== undefined && this._isElementCausesFosterParenting(this.openElements.currentTagId);
30459
31429
  }
30460
31430
  _findFosterParentingLocation() {
30461
- for (let i = this.openElements.stackTop;i >= 0; i--) {
30462
- const openElement = this.openElements.items[i];
30463
- switch (this.openElements.tagIDs[i]) {
30464
- case TAG_ID.TEMPLATE: {
30465
- if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) {
30466
- return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null };
30467
- }
30468
- break;
30469
- }
30470
- case TAG_ID.TABLE: {
30471
- const parent = this.treeAdapter.getParentNode(openElement);
30472
- if (parent) {
30473
- return { parent, beforeElement: openElement };
30474
- }
30475
- return { parent: this.openElements.items[i - 1], beforeElement: null };
30476
- }
30477
- default:
31431
+ const { openElements } = this;
31432
+ const tableIdx = openElements.indexOfTopmost(TAG_ID.TABLE);
31433
+ const templateIdx = openElements.indexOfTopmost(TAG_ID.TEMPLATE);
31434
+ if (templateIdx > tableIdx) {
31435
+ return {
31436
+ parent: this.treeAdapter.getTemplateContent(openElements.items[templateIdx]),
31437
+ beforeElement: null
31438
+ };
31439
+ }
31440
+ if (tableIdx !== -1) {
31441
+ const table = openElements.items[tableIdx];
31442
+ const parent = this.treeAdapter.getParentNode(table);
31443
+ if (parent) {
31444
+ return { parent, beforeElement: table };
30478
31445
  }
31446
+ return { parent: openElements.items[openElements.slotBelow(tableIdx)], beforeElement: null };
30479
31447
  }
30480
- return { parent: this.openElements.items[0], beforeElement: null };
31448
+ return { parent: openElements.items[0], beforeElement: null };
30481
31449
  }
30482
31450
  _fosterParentElement(element) {
30483
31451
  const location = this._findFosterParentingLocation();
@@ -31009,7 +31977,7 @@ function aaObtainFormattingElementEntry(p, token) {
31009
31977
  if (!p.openElements.contains(formattingElementEntry.element)) {
31010
31978
  p.activeFormattingElements.removeEntry(formattingElementEntry);
31011
31979
  formattingElementEntry = null;
31012
- } else if (!p.openElements.hasInScope(token.tagID)) {
31980
+ } else if (!p.openElements.hasInScope(token.tagID, formattingElementEntry.element)) {
31013
31981
  formattingElementEntry = null;
31014
31982
  }
31015
31983
  } else {
@@ -31018,28 +31986,25 @@ function aaObtainFormattingElementEntry(p, token) {
31018
31986
  return formattingElementEntry;
31019
31987
  }
31020
31988
  function aaObtainFurthestBlock(p, formattingElementEntry) {
31021
- let furthestBlock = null;
31022
- let idx = p.openElements.stackTop;
31023
- for (;idx >= 0; idx--) {
31024
- const element = p.openElements.items[idx];
31025
- if (element === formattingElementEntry.element) {
31026
- break;
31989
+ const { openElements } = p;
31990
+ const formattingIdx = openElements._indexOf(formattingElementEntry.element);
31991
+ for (let idx = openElements.slotAbove(formattingIdx);idx !== -1; idx = openElements.slotAbove(idx)) {
31992
+ if (p._isSpecialElement(openElements.items[idx], openElements.tagIDs[idx])) {
31993
+ return idx;
31027
31994
  }
31028
- if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) {
31029
- furthestBlock = element;
31030
- }
31031
- }
31032
- if (!furthestBlock) {
31033
- p.openElements.shortenToLength(Math.max(idx, 0));
31034
- p.activeFormattingElements.removeEntry(formattingElementEntry);
31035
31995
  }
31036
- return furthestBlock;
31996
+ openElements.shortenToLength(formattingIdx);
31997
+ p.activeFormattingElements.removeEntry(formattingElementEntry);
31998
+ return -1;
31037
31999
  }
31038
- function aaInnerLoop(p, furthestBlock, formattingElement) {
32000
+ function aaInnerLoop(p, furthestBlockIdx, formattingElement) {
32001
+ const furthestBlock = p.openElements.items[furthestBlockIdx];
31039
32002
  let lastElement = furthestBlock;
31040
- let nextElement = p.openElements.getCommonAncestor(furthestBlock);
31041
- for (let i = 0, element = nextElement;element !== formattingElement; i++, element = nextElement) {
31042
- nextElement = p.openElements.getCommonAncestor(element);
32003
+ let nextIdx = p.openElements.slotBelow(furthestBlockIdx);
32004
+ const intendedParent = p.openElements.getCommonAncestor(formattingElement);
32005
+ for (let i = 0, idx = nextIdx;p.openElements.items[idx] !== formattingElement; i++, idx = nextIdx) {
32006
+ let element = p.openElements.items[idx];
32007
+ nextIdx = p.openElements.slotBelow(idx);
31043
32008
  const elementEntry = p.activeFormattingElements.getElementEntry(element);
31044
32009
  const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;
31045
32010
  const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;
@@ -31047,9 +32012,9 @@ function aaInnerLoop(p, furthestBlock, formattingElement) {
31047
32012
  if (counterOverflow) {
31048
32013
  p.activeFormattingElements.removeEntry(elementEntry);
31049
32014
  }
31050
- p.openElements.remove(element);
32015
+ p.openElements.removeAt(idx);
31051
32016
  } else {
31052
- element = aaRecreateElementFromEntry(p, elementEntry);
32017
+ element = aaRecreateElementFromEntry(p, elementEntry, intendedParent);
31053
32018
  if (lastElement === furthestBlock) {
31054
32019
  p.activeFormattingElements.bookmark = elementEntry;
31055
32020
  }
@@ -31060,11 +32025,11 @@ function aaInnerLoop(p, furthestBlock, formattingElement) {
31060
32025
  }
31061
32026
  return lastElement;
31062
32027
  }
31063
- function aaRecreateElementFromEntry(p, elementEntry) {
32028
+ function aaRecreateElementFromEntry(p, elementEntry, intendedParent) {
31064
32029
  const ns = p.treeAdapter.getNamespaceURI(elementEntry.element);
31065
- const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);
32030
+ const newElement = p._createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs, intendedParent);
31066
32031
  p.openElements.replace(elementEntry.element, newElement);
31067
- elementEntry.element = newElement;
32032
+ p.activeFormattingElements.replaceElement(elementEntry, newElement);
31068
32033
  return newElement;
31069
32034
  }
31070
32035
  function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
@@ -31083,26 +32048,36 @@ function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
31083
32048
  function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {
31084
32049
  const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);
31085
32050
  const { token } = formattingElementEntry;
31086
- const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);
32051
+ const newElement = p._createElement(token.tagName, ns, token.attrs, furthestBlock);
31087
32052
  p._adoptNodes(furthestBlock, newElement);
31088
32053
  p.treeAdapter.appendChild(furthestBlock, newElement);
31089
32054
  p.activeFormattingElements.insertElementAfterBookmark(newElement, token);
31090
32055
  p.activeFormattingElements.removeEntry(formattingElementEntry);
31091
- p.openElements.remove(formattingElementEntry.element);
31092
- p.openElements.insertAfter(furthestBlock, newElement, token.tagID);
32056
+ const formattingIdx = p.openElements._indexOf(formattingElementEntry.element);
32057
+ let furthestBlockIdx = p.openElements.slotAbove(formattingIdx);
32058
+ while (p.openElements.items[furthestBlockIdx] !== furthestBlock) {
32059
+ furthestBlockIdx = p.openElements.slotAbove(furthestBlockIdx);
32060
+ }
32061
+ p.openElements.replaceFormattingElement(formattingIdx, furthestBlockIdx, newElement, token.tagID);
31093
32062
  }
31094
32063
  function callAdoptionAgency(p, token) {
32064
+ const { current, currentTagId } = p.openElements;
32065
+ if (currentTagId === token.tagID && p.treeAdapter.getNamespaceURI(current) === NS.HTML && !p.activeFormattingElements.getElementEntry(current)) {
32066
+ p.openElements.pop();
32067
+ return;
32068
+ }
31095
32069
  for (let i = 0;i < AA_OUTER_LOOP_ITER; i++) {
31096
32070
  const formattingElementEntry = aaObtainFormattingElementEntry(p, token);
31097
32071
  if (!formattingElementEntry) {
31098
32072
  break;
31099
32073
  }
31100
- const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);
31101
- if (!furthestBlock) {
32074
+ const furthestBlockIdx = aaObtainFurthestBlock(p, formattingElementEntry);
32075
+ if (furthestBlockIdx === -1) {
31102
32076
  break;
31103
32077
  }
32078
+ const furthestBlock = p.openElements.items[furthestBlockIdx];
31104
32079
  p.activeFormattingElements.bookmark = formattingElementEntry;
31105
- const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element);
32080
+ const lastElement = aaInnerLoop(p, furthestBlockIdx, formattingElementEntry.element);
31106
32081
  const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);
31107
32082
  p.treeAdapter.detachNode(lastElement);
31108
32083
  if (commonAncestor)
@@ -31123,7 +32098,7 @@ function stopParsing(p, token) {
31123
32098
  p.stopped = true;
31124
32099
  if (token.location) {
31125
32100
  const target = p.fragmentContext ? 0 : 2;
31126
- for (let i = p.openElements.stackTop;i >= target; i--) {
32101
+ for (let i = p.openElements.stackTop;i >= target; i = p.openElements.slotBelow(i)) {
31127
32102
  p._setEndLocation(p.openElements.items[i], token);
31128
32103
  }
31129
32104
  if (!p.fragmentContext && p.openElements.stackTop >= 0) {
@@ -31249,7 +32224,7 @@ function startTagInHead(p, token) {
31249
32224
  p.activeFormattingElements.insertMarker();
31250
32225
  p.framesetOk = false;
31251
32226
  p.insertionMode = InsertionMode.IN_TEMPLATE;
31252
- p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
32227
+ p.tmplInsertionModeStack.push(InsertionMode.IN_TEMPLATE);
31253
32228
  break;
31254
32229
  }
31255
32230
  case TAG_ID.HEAD: {
@@ -31291,7 +32266,7 @@ function templateEndTagInHead(p, token) {
31291
32266
  }
31292
32267
  p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
31293
32268
  p.activeFormattingElements.clearToLastMarker();
31294
- p.tmplInsertionModeStack.shift();
32269
+ p.tmplInsertionModeStack.pop();
31295
32270
  p._resetInsertionMode();
31296
32271
  } else {
31297
32272
  p._err(token, ERR.endTagWithoutMatchingOpenElement);
@@ -31510,17 +32485,11 @@ function formStartTagInBody(p, token) {
31510
32485
  }
31511
32486
  function listItemStartTagInBody(p, token) {
31512
32487
  p.framesetOk = false;
31513
- const tn = token.tagID;
31514
- for (let i = p.openElements.stackTop;i >= 0; i--) {
31515
- const elementId = p.openElements.tagIDs[i];
31516
- 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)) {
31517
- p.openElements.generateImpliedEndTagsWithExclusion(elementId);
31518
- p.openElements.popUntilTagNamePopped(elementId);
31519
- break;
31520
- }
31521
- if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p._isSpecialElement(p.openElements.items[i], elementId)) {
31522
- break;
31523
- }
32488
+ 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));
32489
+ if (idx !== -1 && !p.openElements.hasListItemBoundaryAbove(idx)) {
32490
+ const elementId = p.openElements.tagIDs[idx];
32491
+ p.openElements.generateImpliedEndTagsWithExclusion(elementId);
32492
+ p.openElements.popUntilTagNamePopped(elementId);
31524
32493
  }
31525
32494
  if (p.openElements.hasInButtonScope(TAG_ID.P)) {
31526
32495
  p._closePElement();
@@ -31986,20 +32955,12 @@ function brEndTagInBody(p) {
31986
32955
  p.framesetOk = false;
31987
32956
  }
31988
32957
  function genericEndTagInBody(p, token) {
31989
- const tn = token.tagName;
31990
32958
  const tid = token.tagID;
31991
- for (let i = p.openElements.stackTop;i > 0; i--) {
31992
- const element = p.openElements.items[i];
31993
- const elementId = p.openElements.tagIDs[i];
31994
- if (tid === elementId && (tid !== TAG_ID.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) {
31995
- p.openElements.generateImpliedEndTagsWithExclusion(tid);
31996
- if (p.openElements.stackTop >= i)
31997
- p.openElements.shortenToLength(i);
31998
- break;
31999
- }
32000
- if (p._isSpecialElement(element, elementId)) {
32001
- break;
32002
- }
32959
+ const i = tid === TAG_ID.UNKNOWN ? p.openElements.indexOfTopmostByName(NS.HTML, token.tagName) : p.openElements.indexOfTopmost(tid);
32960
+ if (i > 0 && !p.openElements.hasSpecialElementAbove(i)) {
32961
+ p.openElements.generateImpliedEndTagsWithExclusion(tid);
32962
+ if (p.openElements.stackTop >= i)
32963
+ p.openElements.shortenToLength(i);
32003
32964
  }
32004
32965
  }
32005
32966
  function endTagInBody(p, token) {
@@ -32648,7 +33609,7 @@ function startTagInSelect(p, token) {
32648
33609
  function endTagInSelect(p, token) {
32649
33610
  switch (token.tagID) {
32650
33611
  case TAG_ID.OPTGROUP: {
32651
- if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.stackTop - 1] === TAG_ID.OPTGROUP) {
33612
+ if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.slotBelow(p.openElements.stackTop)] === TAG_ID.OPTGROUP) {
32652
33613
  p.openElements.pop();
32653
33614
  }
32654
33615
  if (p.openElements.currentTagId === TAG_ID.OPTGROUP) {
@@ -32718,32 +33679,32 @@ function startTagInTemplate(p, token) {
32718
33679
  case TAG_ID.TBODY:
32719
33680
  case TAG_ID.TFOOT:
32720
33681
  case TAG_ID.THEAD: {
32721
- p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;
33682
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_TABLE;
32722
33683
  p.insertionMode = InsertionMode.IN_TABLE;
32723
33684
  startTagInTable(p, token);
32724
33685
  break;
32725
33686
  }
32726
33687
  case TAG_ID.COL: {
32727
- p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;
33688
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_COLUMN_GROUP;
32728
33689
  p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
32729
33690
  startTagInColumnGroup(p, token);
32730
33691
  break;
32731
33692
  }
32732
33693
  case TAG_ID.TR: {
32733
- p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;
33694
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_TABLE_BODY;
32734
33695
  p.insertionMode = InsertionMode.IN_TABLE_BODY;
32735
33696
  startTagInTableBody(p, token);
32736
33697
  break;
32737
33698
  }
32738
33699
  case TAG_ID.TD:
32739
33700
  case TAG_ID.TH: {
32740
- p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;
33701
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_ROW;
32741
33702
  p.insertionMode = InsertionMode.IN_ROW;
32742
33703
  startTagInRow(p, token);
32743
33704
  break;
32744
33705
  }
32745
33706
  default: {
32746
- p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;
33707
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_BODY;
32747
33708
  p.insertionMode = InsertionMode.IN_BODY;
32748
33709
  startTagInBody(p, token);
32749
33710
  }
@@ -32756,9 +33717,11 @@ function endTagInTemplate(p, token) {
32756
33717
  }
32757
33718
  function eofInTemplate(p, token) {
32758
33719
  if (p.openElements.tmplCount > 0) {
32759
- p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
32760
- p.activeFormattingElements.clearToLastMarker();
32761
- p.tmplInsertionModeStack.shift();
33720
+ do {
33721
+ p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
33722
+ p.activeFormattingElements.clearToLastMarker();
33723
+ p.tmplInsertionModeStack.pop();
33724
+ } while (p.openElements.tmplCount > 0);
32762
33725
  p._resetInsertionMode();
32763
33726
  p.onEof(token);
32764
33727
  } else {
@@ -32906,21 +33869,20 @@ function endTagInForeignContent(p, token) {
32906
33869
  p._endTagOutsideForeignContent(token);
32907
33870
  return;
32908
33871
  }
32909
- for (let i = p.openElements.stackTop;i > 0; i--) {
32910
- const element = p.openElements.items[i];
32911
- if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) {
32912
- p._endTagOutsideForeignContent(token);
32913
- break;
32914
- }
32915
- const tagName = p.treeAdapter.getTagName(element);
32916
- if (tagName.toLowerCase() === token.tagName) {
32917
- token.tagName = tagName;
32918
- p.openElements.shortenToLength(i);
32919
- break;
32920
- }
33872
+ if (p.openElements.stackTop === 0)
33873
+ return;
33874
+ const { tagName } = token;
33875
+ const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(tagName);
33876
+ const contextNs = p.fragmentContext ? p.treeAdapter.getNamespaceURI(p.fragmentContext) : NS.HTML;
33877
+ 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));
33878
+ if (i > p.openElements.indexOfTopmostHtmlElement()) {
33879
+ token.tagName = p.treeAdapter.getTagName(p.openElements.items[i]);
33880
+ p.openElements.shortenToLength(i);
33881
+ } else {
33882
+ p._endTagOutsideForeignContent(token);
32921
33883
  }
32922
33884
  }
32923
- 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;
33885
+ 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;
32924
33886
  var init_parser = __esm(() => {
32925
33887
  init_tokenizer();
32926
33888
  init_open_element_stack();
@@ -32932,6 +33894,24 @@ var init_parser = __esm(() => {
32932
33894
  init_unicode();
32933
33895
  init_html3();
32934
33896
  init_token();
33897
+ INSERTION_MODE_TAGS = [
33898
+ TAG_ID.TR,
33899
+ TAG_ID.TBODY,
33900
+ TAG_ID.THEAD,
33901
+ TAG_ID.TFOOT,
33902
+ TAG_ID.CAPTION,
33903
+ TAG_ID.COLGROUP,
33904
+ TAG_ID.TABLE,
33905
+ TAG_ID.FRAMESET,
33906
+ TAG_ID.SELECT,
33907
+ TAG_ID.TEMPLATE,
33908
+ TAG_ID.TD,
33909
+ TAG_ID.TH,
33910
+ TAG_ID.HEAD,
33911
+ TAG_ID.BODY,
33912
+ TAG_ID.HTML
33913
+ ];
33914
+ EMPTY_ATTRS = [];
32935
33915
  (function(InsertionMode) {
32936
33916
  InsertionMode[InsertionMode["INITIAL"] = 0] = "INITIAL";
32937
33917
  InsertionMode[InsertionMode["BEFORE_HTML"] = 1] = "BEFORE_HTML";
@@ -33289,7 +34269,7 @@ var init_errors = __esm(() => {
33289
34269
  // ../../node_modules/hast-util-from-html/lib/index.js
33290
34270
  function fromHtml(value, options) {
33291
34271
  const settings = options || emptyOptions5;
33292
- const onerror = settings.onerror;
34272
+ const { onerror } = settings;
33293
34273
  const file = value instanceof VFile ? value : new VFile(value);
33294
34274
  const parseFunction = settings.fragment ? parseFragment : parse4;
33295
34275
  const document2 = String(file);
@@ -33304,10 +34284,10 @@ function fromHtml(value, options) {
33304
34284
  verbose: settings.verbose
33305
34285
  });
33306
34286
  function internalOnerror(error) {
33307
- const code = error.code;
34287
+ const { code } = error;
33308
34288
  const name = camelcase2(code);
33309
34289
  const setting = settings[name];
33310
- const config = setting === null || setting === undefined ? true : setting;
34290
+ const config = setting ?? true;
33311
34291
  const level = typeof config === "number" ? config : config ? 1 : 0;
33312
34292
  if (level) {
33313
34293
  const info = errors[name];
@@ -33341,7 +34321,7 @@ function fromHtml(value, options) {
33341
34321
  function format(value) {
33342
34322
  return value.replace(formatCRe, formatC).replace(formatXRe, formatX);
33343
34323
  function formatC(_, $1, $2) {
33344
- const offset = ($2 ? Number.parseInt($2, 10) : 0) * ($1 === "-" ? -1 : 1);
34324
+ const offset = ($2 ? Number($2) : 0) * ($1 === "-" ? -1 : 1);
33345
34325
  const char = document2.charAt(error.startOffset + offset);
33346
34326
  return visualizeCharacter(char);
33347
34327
  }
@@ -33372,7 +34352,7 @@ var init_lib29 = __esm(() => {
33372
34352
  init_vfile_message();
33373
34353
  init_errors();
33374
34354
  dashToCamelRe = /-[a-z]/g;
33375
- formatCRe = /%c(?:([-+])(\d+))?/g;
34355
+ formatCRe = /%c(?:([+-])(\d+))?/g;
33376
34356
  formatXRe = /%x/g;
33377
34357
  fatalities = { 2: true, 1: false, 0: null };
33378
34358
  emptyOptions5 = {};