hyperframes 0.8.67 → 0.8.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -50,7 +50,7 @@ var VERSION;
50
50
  var init_version = __esm({
51
51
  "src/version.ts"() {
52
52
  "use strict";
53
- VERSION = true ? "0.8.67" : "0.0.0-dev";
53
+ VERSION = true ? "0.8.68" : "0.0.0-dev";
54
54
  }
55
55
  });
56
56
 
@@ -17495,10 +17495,10 @@ var require_lib = __commonJS({
17495
17495
  ElementAfterRest: "Rest element must be last element.",
17496
17496
  EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
17497
17497
  ExportBindingIsString: ({
17498
- localName,
17498
+ localName: localName2,
17499
17499
  exportName
17500
17500
  }) => `A string literal cannot be used as an exported binding without \`from\`.
17501
- - Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`,
17501
+ - Did you mean \`export { '${localName2}' as '${exportName}' } from 'some-module'\`?`,
17502
17502
  ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
17503
17503
  ForInOfLoopInitializer: ({
17504
17504
  type
@@ -17587,8 +17587,8 @@ var require_lib = __commonJS({
17587
17587
  surrogateCharCode
17588
17588
  }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`,
17589
17589
  ModuleExportUndefined: ({
17590
- localName
17591
- }) => `Export '${localName}' is not defined.`,
17590
+ localName: localName2
17591
+ }) => `Export '${localName2}' is not defined.`,
17592
17592
  MultipleDefaultsInSwitch: "Multiple default clauses.",
17593
17593
  NewlineAfterThrow: "Illegal newline after throw.",
17594
17594
  NoCatchOrFinally: "Missing catch or finally clause.",
@@ -19092,13 +19092,13 @@ var require_lib = __commonJS({
19092
19092
  DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
19093
19093
  DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
19094
19094
  EnumBooleanMemberNotInitialized: ({
19095
- memberName: memberName2,
19095
+ memberName: memberName3,
19096
19096
  enumName
19097
- }) => `Boolean enum members need to be initialized. Use either \`${memberName2} = true,\` or \`${memberName2} = false,\` in enum \`${enumName}\`.`,
19097
+ }) => `Boolean enum members need to be initialized. Use either \`${memberName3} = true,\` or \`${memberName3} = false,\` in enum \`${enumName}\`.`,
19098
19098
  EnumDuplicateMemberName: ({
19099
- memberName: memberName2,
19099
+ memberName: memberName3,
19100
19100
  enumName
19101
- }) => `Enum member names need to be unique, but the name \`${memberName2}\` has already been used before in enum \`${enumName}\`.`,
19101
+ }) => `Enum member names need to be unique, but the name \`${memberName3}\` has already been used before in enum \`${enumName}\`.`,
19102
19102
  EnumInconsistentMemberValues: ({
19103
19103
  enumName
19104
19104
  }) => `Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,
@@ -19111,26 +19111,26 @@ var require_lib = __commonJS({
19111
19111
  }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`,
19112
19112
  EnumInvalidMemberInitializerPrimaryType: ({
19113
19113
  enumName,
19114
- memberName: memberName2,
19114
+ memberName: memberName3,
19115
19115
  explicitType
19116
- }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName2}\` needs to be a ${explicitType} literal.`,
19116
+ }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName3}\` needs to be a ${explicitType} literal.`,
19117
19117
  EnumInvalidMemberInitializerSymbolType: ({
19118
19118
  enumName,
19119
- memberName: memberName2
19120
- }) => `Symbol enum members cannot be initialized. Use \`${memberName2},\` in enum \`${enumName}\`.`,
19119
+ memberName: memberName3
19120
+ }) => `Symbol enum members cannot be initialized. Use \`${memberName3},\` in enum \`${enumName}\`.`,
19121
19121
  EnumInvalidMemberInitializerUnknownType: ({
19122
19122
  enumName,
19123
- memberName: memberName2
19124
- }) => `The enum member initializer for \`${memberName2}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`,
19123
+ memberName: memberName3
19124
+ }) => `The enum member initializer for \`${memberName3}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`,
19125
19125
  EnumInvalidMemberName: ({
19126
19126
  enumName,
19127
- memberName: memberName2,
19127
+ memberName: memberName3,
19128
19128
  suggestion
19129
- }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName2}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`,
19129
+ }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName3}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`,
19130
19130
  EnumNumberMemberNotInitialized: ({
19131
19131
  enumName,
19132
- memberName: memberName2
19133
- }) => `Number enum members need to be initialized, e.g. \`${memberName2} = 1\` in enum \`${enumName}\`.`,
19132
+ memberName: memberName3
19133
+ }) => `Number enum members need to be initialized, e.g. \`${memberName3} = 1\` in enum \`${enumName}\`.`,
19134
19134
  EnumStringMemberInconsistentlyInitialized: ({
19135
19135
  enumName
19136
19136
  }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`,
@@ -21127,10 +21127,10 @@ var require_lib = __commonJS({
21127
21127
  }
21128
21128
  flowEnumErrorBooleanMemberNotInitialized(loc, {
21129
21129
  enumName,
21130
- memberName: memberName2
21130
+ memberName: memberName3
21131
21131
  }) {
21132
21132
  this.raise(FlowErrors.EnumBooleanMemberNotInitialized, loc, {
21133
- memberName: memberName2,
21133
+ memberName: memberName3,
21134
21134
  enumName
21135
21135
  });
21136
21136
  }
@@ -21242,28 +21242,28 @@ var require_lib = __commonJS({
21242
21242
  id,
21243
21243
  init
21244
21244
  } = this.flowEnumMemberRaw();
21245
- const memberName2 = id.name;
21246
- if (memberName2 === "") {
21245
+ const memberName3 = id.name;
21246
+ if (memberName3 === "") {
21247
21247
  continue;
21248
21248
  }
21249
- if (/^[a-z]/.test(memberName2)) {
21249
+ if (/^[a-z]/.test(memberName3)) {
21250
21250
  this.raise(FlowErrors.EnumInvalidMemberName, id, {
21251
- memberName: memberName2,
21252
- suggestion: memberName2[0].toUpperCase() + memberName2.slice(1),
21251
+ memberName: memberName3,
21252
+ suggestion: memberName3[0].toUpperCase() + memberName3.slice(1),
21253
21253
  enumName
21254
21254
  });
21255
21255
  }
21256
- if (seenNames.has(memberName2)) {
21256
+ if (seenNames.has(memberName3)) {
21257
21257
  this.raise(FlowErrors.EnumDuplicateMemberName, id, {
21258
- memberName: memberName2,
21258
+ memberName: memberName3,
21259
21259
  enumName
21260
21260
  });
21261
21261
  }
21262
- seenNames.add(memberName2);
21262
+ seenNames.add(memberName3);
21263
21263
  const context = {
21264
21264
  enumName,
21265
21265
  explicitType,
21266
- memberName: memberName2
21266
+ memberName: memberName3
21267
21267
  };
21268
21268
  memberNode.id = id;
21269
21269
  switch (init.type) {
@@ -30007,9 +30007,9 @@ var require_lib = __commonJS({
30007
30007
  this.parseBlockBody(program, true, true, end);
30008
30008
  if (this.inModule) {
30009
30009
  if (!(this.optionFlags & 64) && this.scope.undefinedExports.size > 0) {
30010
- for (const [localName, at4] of Array.from(this.scope.undefinedExports)) {
30010
+ for (const [localName2, at4] of Array.from(this.scope.undefinedExports)) {
30011
30011
  this.raise(Errors.ModuleExportUndefined, at4, {
30012
- localName
30012
+ localName: localName2
30013
30013
  });
30014
30014
  }
30015
30015
  }
@@ -41749,8 +41749,8 @@ var init_utils = __esm({
41749
41749
  knownAdjacent(prev, current2);
41750
41750
  knownAdjacent(current2, next);
41751
41751
  };
41752
- localCase = ({ localName, ownerDocument }) => {
41753
- return ownerDocument[MIME].ignoreCase ? localName.toUpperCase() : localName;
41752
+ localCase = ({ localName: localName2, ownerDocument }) => {
41753
+ return ownerDocument[MIME].ignoreCase ? localName2.toUpperCase() : localName2;
41754
41754
  };
41755
41755
  setAdjacent = (prev, next) => {
41756
41756
  if (prev)
@@ -41854,30 +41854,30 @@ var init_custom_element_registry = __esm({
41854
41854
  * @param {Function} Class the custom element **Class** definition
41855
41855
  * @param {object?} options the optional object with an `extends` property
41856
41856
  */
41857
- define(localName, Class, options = {}) {
41857
+ define(localName2, Class, options = {}) {
41858
41858
  const { ownerDocument, registry, waiting } = this;
41859
- if (registry.has(localName))
41860
- throw new Error("unable to redefine " + localName);
41859
+ if (registry.has(localName2))
41860
+ throw new Error("unable to redefine " + localName2);
41861
41861
  if (Classes.has(Class))
41862
41862
  throw new Error("unable to redefine the same class: " + Class);
41863
41863
  this.active = reactive = true;
41864
41864
  const { extends: extend2 } = options;
41865
41865
  Classes.set(Class, {
41866
41866
  ownerDocument,
41867
- options: { is: extend2 ? localName : "" },
41868
- localName: extend2 || localName
41867
+ options: { is: extend2 ? localName2 : "" },
41868
+ localName: extend2 || localName2
41869
41869
  });
41870
41870
  const check = extend2 ? (element) => {
41871
- return element.localName === extend2 && element.getAttribute("is") === localName;
41872
- } : (element) => element.localName === localName;
41873
- registry.set(localName, { Class, check });
41874
- if (waiting.has(localName)) {
41875
- for (const resolve84 of waiting.get(localName))
41871
+ return element.localName === extend2 && element.getAttribute("is") === localName2;
41872
+ } : (element) => element.localName === localName2;
41873
+ registry.set(localName2, { Class, check });
41874
+ if (waiting.has(localName2)) {
41875
+ for (const resolve84 of waiting.get(localName2))
41876
41876
  resolve84(Class);
41877
- waiting.delete(localName);
41877
+ waiting.delete(localName2);
41878
41878
  }
41879
41879
  ownerDocument.querySelectorAll(
41880
- extend2 ? `${extend2}[is="${localName}"]` : localName
41880
+ extend2 ? `${extend2}[is="${localName2}"]` : localName2
41881
41881
  ).forEach(this.upgrade, this);
41882
41882
  }
41883
41883
  /**
@@ -41911,15 +41911,15 @@ var init_custom_element_registry = __esm({
41911
41911
  /**
41912
41912
  * @param {string} localName the custom element definition name
41913
41913
  */
41914
- whenDefined(localName) {
41914
+ whenDefined(localName2) {
41915
41915
  const { registry, waiting } = this;
41916
41916
  return new Promise((resolve84) => {
41917
- if (registry.has(localName))
41918
- resolve84(registry.get(localName).Class);
41917
+ if (registry.has(localName2))
41918
+ resolve84(registry.get(localName2).Class);
41919
41919
  else {
41920
- if (!waiting.has(localName))
41921
- waiting.set(localName, []);
41922
- waiting.get(localName).push(resolve84);
41920
+ if (!waiting.has(localName2))
41921
+ waiting.set(localName2, []);
41922
+ waiting.get(localName2).push(resolve84);
41923
41923
  }
41924
41924
  });
41925
41925
  }
@@ -41927,8 +41927,8 @@ var init_custom_element_registry = __esm({
41927
41927
  * @param {string} localName the custom element definition name
41928
41928
  * @returns {Function?} the custom element **Class**, if any
41929
41929
  */
41930
- get(localName) {
41931
- const info = this.registry.get(localName);
41930
+ get(localName2) {
41931
+ const info = this.registry.get(localName2);
41932
41932
  return info && info.Class;
41933
41933
  }
41934
41934
  /**
@@ -41937,8 +41937,8 @@ var init_custom_element_registry = __esm({
41937
41937
  */
41938
41938
  getName(Class) {
41939
41939
  if (Classes.has(Class)) {
41940
- const { localName } = Classes.get(Class);
41941
- return localName;
41940
+ const { localName: localName2 } = Classes.get(Class);
41941
+ return localName2;
41942
41942
  }
41943
41943
  return null;
41944
41944
  }
@@ -42517,10 +42517,10 @@ var init_node2 = __esm({
42517
42517
  static get DOCUMENT_TYPE_NODE() {
42518
42518
  return DOCUMENT_TYPE_NODE;
42519
42519
  }
42520
- constructor(ownerDocument, localName, nodeType) {
42520
+ constructor(ownerDocument, localName2, nodeType) {
42521
42521
  super();
42522
42522
  this.ownerDocument = ownerDocument;
42523
- this.localName = localName;
42523
+ this.localName = localName2;
42524
42524
  this.nodeType = nodeType;
42525
42525
  this.parentNode = null;
42526
42526
  this[NEXT] = null;
@@ -42937,8 +42937,8 @@ var init_character_data = __esm({
42937
42937
  init_node2();
42938
42938
  init_mutation_observer();
42939
42939
  CharacterData = class extends Node5 {
42940
- constructor(ownerDocument, localName, nodeType, data2) {
42941
- super(ownerDocument, localName, nodeType);
42940
+ constructor(ownerDocument, localName2, nodeType, data2) {
42941
+ super(ownerDocument, localName2, nodeType);
42942
42942
  this[VALUE] = $String(data2);
42943
42943
  }
42944
42944
  // <Mixins>
@@ -44517,8 +44517,8 @@ var init_matches = __esm({
44517
44517
  getAttributeValue2 = (element, name) => name === "class" ? element.classList.value : element.getAttribute(name);
44518
44518
  getChildren2 = ({ childNodes }) => childNodes;
44519
44519
  getName2 = (element) => {
44520
- const { localName } = element;
44521
- return ignoreCase(element) ? localName.toLowerCase() : localName;
44520
+ const { localName: localName2 } = element;
44521
+ return ignoreCase(element) ? localName2.toLowerCase() : localName2;
44522
44522
  };
44523
44523
  getParent2 = ({ parentNode }) => parentNode;
44524
44524
  getSiblings2 = (element) => {
@@ -44674,8 +44674,8 @@ var init_parent_node = __esm({
44674
44674
  );
44675
44675
  };
44676
44676
  ParentNode = class extends Node5 {
44677
- constructor(ownerDocument, localName, nodeType) {
44678
- super(ownerDocument, localName, nodeType);
44677
+ constructor(ownerDocument, localName2, nodeType) {
44678
+ super(ownerDocument, localName2, nodeType);
44679
44679
  this[PRIVATE] = null;
44680
44680
  this[NEXT] = this[END] = {
44681
44681
  [NEXT]: null,
@@ -44920,8 +44920,8 @@ var init_non_element_parent_node = __esm({
44920
44920
  return nonEPN;
44921
44921
  }
44922
44922
  toString() {
44923
- const { childNodes, localName } = this;
44924
- return `<${localName}>${childNodes.join("")}</${localName}>`;
44923
+ const { childNodes, localName: localName2 } = this;
44924
+ return `<${localName2}>${childNodes.join("")}</${localName2}>`;
44925
44925
  }
44926
44926
  toJSON() {
44927
44927
  const json = [];
@@ -45452,20 +45452,20 @@ var init_element = __esm({
45452
45452
  return key2 in target ? target[key2] : target.find(({ name }) => name === key2);
45453
45453
  }
45454
45454
  };
45455
- create2 = (ownerDocument, element, localName) => {
45455
+ create2 = (ownerDocument, element, localName2) => {
45456
45456
  if ("ownerSVGElement" in element) {
45457
- const svg = ownerDocument.createElementNS(SVG_NAMESPACE, localName);
45457
+ const svg = ownerDocument.createElementNS(SVG_NAMESPACE, localName2);
45458
45458
  svg.ownerSVGElement = element.ownerSVGElement;
45459
45459
  return svg;
45460
45460
  }
45461
- return ownerDocument.createElement(localName);
45461
+ return ownerDocument.createElement(localName2);
45462
45462
  };
45463
- isVoid = ({ localName, ownerDocument }) => {
45464
- return ownerDocument[MIME].voidElements.test(localName);
45463
+ isVoid = ({ localName: localName2, ownerDocument }) => {
45464
+ return ownerDocument[MIME].voidElements.test(localName2);
45465
45465
  };
45466
45466
  Element3 = class extends ParentNode {
45467
- constructor(ownerDocument, localName) {
45468
- super(ownerDocument, localName, ELEMENT_NODE);
45467
+ constructor(ownerDocument, localName2) {
45468
+ super(ownerDocument, localName2, ELEMENT_NODE);
45469
45469
  this[CLASS_LIST] = null;
45470
45470
  this[DATASET] = null;
45471
45471
  this[STYLE] = null;
@@ -45783,13 +45783,13 @@ var init_element = __esm({
45783
45783
  }
45784
45784
  // </insertAdjacent>
45785
45785
  cloneNode(deep = false) {
45786
- const { ownerDocument, localName } = this;
45786
+ const { ownerDocument, localName: localName2 } = this;
45787
45787
  const addNext = (next2) => {
45788
45788
  next2.parentNode = parentNode;
45789
45789
  knownAdjacent($next, next2);
45790
45790
  $next = next2;
45791
45791
  };
45792
- const clone = create2(ownerDocument, this, localName);
45792
+ const clone = create2(ownerDocument, this, localName2);
45793
45793
  let parentNode = clone, $next = clone;
45794
45794
  let { [NEXT]: next, [END]: prev } = this;
45795
45795
  while (next !== prev && (deep || next.nodeType === ATTRIBUTE_NODE)) {
@@ -45927,8 +45927,8 @@ var init_element2 = __esm({
45927
45927
  }
45928
45928
  };
45929
45929
  SVGElement = class extends Element3 {
45930
- constructor(ownerDocument, localName, ownerSVGElement = null) {
45931
- super(ownerDocument, localName);
45930
+ constructor(ownerDocument, localName2, ownerSVGElement = null) {
45931
+ super(ownerDocument, localName2);
45932
45932
  this.ownerSVGElement = ownerSVGElement;
45933
45933
  }
45934
45934
  get className() {
@@ -46083,15 +46083,15 @@ var init_element3 = __esm({
46083
46083
  static get observedAttributes() {
46084
46084
  return [];
46085
46085
  }
46086
- constructor(ownerDocument = null, localName = "") {
46087
- super(ownerDocument, localName);
46086
+ constructor(ownerDocument = null, localName2 = "") {
46087
+ super(ownerDocument, localName2);
46088
46088
  const ownerLess = !ownerDocument;
46089
46089
  let options;
46090
46090
  if (ownerLess) {
46091
46091
  const { constructor: Class } = this;
46092
46092
  if (!Classes.has(Class))
46093
46093
  throw new Error("unable to initialize this Custom Element");
46094
- ({ ownerDocument, localName, options } = Classes.get(Class));
46094
+ ({ ownerDocument, localName: localName2, options } = Classes.get(Class));
46095
46095
  }
46096
46096
  if (ownerDocument[UPGRADE]) {
46097
46097
  const { element, values } = ownerDocument[UPGRADE];
@@ -46102,7 +46102,7 @@ var init_element3 = __esm({
46102
46102
  }
46103
46103
  if (ownerLess) {
46104
46104
  this.ownerDocument = this[END].ownerDocument = ownerDocument;
46105
- this.localName = localName;
46105
+ this.localName = localName2;
46106
46106
  customElements.set(this, { connected: false });
46107
46107
  if (options.is)
46108
46108
  this.setAttribute("is", options.is);
@@ -46642,8 +46642,8 @@ var init_html_element = __esm({
46642
46642
  "use strict";
46643
46643
  init_element3();
46644
46644
  HTMLHtmlElement = class extends HTMLElement2 {
46645
- constructor(ownerDocument, localName = "html") {
46646
- super(ownerDocument, localName);
46645
+ constructor(ownerDocument, localName2 = "html") {
46646
+ super(ownerDocument, localName2);
46647
46647
  }
46648
46648
  };
46649
46649
  }
@@ -46681,8 +46681,8 @@ var init_script_element = __esm({
46681
46681
  init_text_element();
46682
46682
  tagName2 = "script";
46683
46683
  HTMLScriptElement = class extends TextElement {
46684
- constructor(ownerDocument, localName = tagName2) {
46685
- super(ownerDocument, localName);
46684
+ constructor(ownerDocument, localName2 = tagName2) {
46685
+ super(ownerDocument, localName2);
46686
46686
  }
46687
46687
  get type() {
46688
46688
  return stringAttribute.get(this, "type");
@@ -46750,8 +46750,8 @@ var init_frame_element = __esm({
46750
46750
  "use strict";
46751
46751
  init_element3();
46752
46752
  HTMLFrameElement = class extends HTMLElement2 {
46753
- constructor(ownerDocument, localName = "frame") {
46754
- super(ownerDocument, localName);
46753
+ constructor(ownerDocument, localName2 = "frame") {
46754
+ super(ownerDocument, localName2);
46755
46755
  }
46756
46756
  };
46757
46757
  }
@@ -46767,8 +46767,8 @@ var init_i_frame_element = __esm({
46767
46767
  init_element3();
46768
46768
  tagName3 = "iframe";
46769
46769
  HTMLIFrameElement = class extends HTMLElement2 {
46770
- constructor(ownerDocument, localName = tagName3) {
46771
- super(ownerDocument, localName);
46770
+ constructor(ownerDocument, localName2 = tagName3) {
46771
+ super(ownerDocument, localName2);
46772
46772
  }
46773
46773
  /* c8 ignore start */
46774
46774
  get src() {
@@ -46826,8 +46826,8 @@ var init_object_element = __esm({
46826
46826
  "use strict";
46827
46827
  init_element3();
46828
46828
  HTMLObjectElement = class extends HTMLElement2 {
46829
- constructor(ownerDocument, localName = "object") {
46830
- super(ownerDocument, localName);
46829
+ constructor(ownerDocument, localName2 = "object") {
46830
+ super(ownerDocument, localName2);
46831
46831
  }
46832
46832
  };
46833
46833
  }
@@ -46840,8 +46840,8 @@ var init_head_element = __esm({
46840
46840
  "use strict";
46841
46841
  init_element3();
46842
46842
  HTMLHeadElement = class extends HTMLElement2 {
46843
- constructor(ownerDocument, localName = "head") {
46844
- super(ownerDocument, localName);
46843
+ constructor(ownerDocument, localName2 = "head") {
46844
+ super(ownerDocument, localName2);
46845
46845
  }
46846
46846
  };
46847
46847
  }
@@ -46854,8 +46854,8 @@ var init_body_element = __esm({
46854
46854
  "use strict";
46855
46855
  init_element3();
46856
46856
  HTMLBodyElement = class extends HTMLElement2 {
46857
- constructor(ownerDocument, localName = "body") {
46858
- super(ownerDocument, localName);
46857
+ constructor(ownerDocument, localName2 = "body") {
46858
+ super(ownerDocument, localName2);
46859
46859
  }
46860
46860
  };
46861
46861
  }
@@ -48389,8 +48389,8 @@ var init_style_element = __esm({
48389
48389
  init_text_element();
48390
48390
  tagName4 = "style";
48391
48391
  HTMLStyleElement = class extends TextElement {
48392
- constructor(ownerDocument, localName = tagName4) {
48393
- super(ownerDocument, localName);
48392
+ constructor(ownerDocument, localName2 = tagName4) {
48393
+ super(ownerDocument, localName2);
48394
48394
  this[SHEET] = null;
48395
48395
  }
48396
48396
  get sheet() {
@@ -48435,8 +48435,8 @@ var init_time_element = __esm({
48435
48435
  init_register_html_class();
48436
48436
  init_element3();
48437
48437
  HTMLTimeElement = class extends HTMLElement2 {
48438
- constructor(ownerDocument, localName = "time") {
48439
- super(ownerDocument, localName);
48438
+ constructor(ownerDocument, localName2 = "time") {
48439
+ super(ownerDocument, localName2);
48440
48440
  }
48441
48441
  /**
48442
48442
  * @type {string}
@@ -48459,8 +48459,8 @@ var init_field_set_element = __esm({
48459
48459
  "use strict";
48460
48460
  init_element3();
48461
48461
  HTMLFieldSetElement = class extends HTMLElement2 {
48462
- constructor(ownerDocument, localName = "fieldset") {
48463
- super(ownerDocument, localName);
48462
+ constructor(ownerDocument, localName2 = "fieldset") {
48463
+ super(ownerDocument, localName2);
48464
48464
  }
48465
48465
  };
48466
48466
  }
@@ -48473,8 +48473,8 @@ var init_embed_element = __esm({
48473
48473
  "use strict";
48474
48474
  init_element3();
48475
48475
  HTMLEmbedElement = class extends HTMLElement2 {
48476
- constructor(ownerDocument, localName = "embed") {
48477
- super(ownerDocument, localName);
48476
+ constructor(ownerDocument, localName2 = "embed") {
48477
+ super(ownerDocument, localName2);
48478
48478
  }
48479
48479
  };
48480
48480
  }
@@ -48487,8 +48487,8 @@ var init_hr_element = __esm({
48487
48487
  "use strict";
48488
48488
  init_element3();
48489
48489
  HTMLHRElement = class extends HTMLElement2 {
48490
- constructor(ownerDocument, localName = "hr") {
48491
- super(ownerDocument, localName);
48490
+ constructor(ownerDocument, localName2 = "hr") {
48491
+ super(ownerDocument, localName2);
48492
48492
  }
48493
48493
  };
48494
48494
  }
@@ -48501,8 +48501,8 @@ var init_progress_element = __esm({
48501
48501
  "use strict";
48502
48502
  init_element3();
48503
48503
  HTMLProgressElement = class extends HTMLElement2 {
48504
- constructor(ownerDocument, localName = "progress") {
48505
- super(ownerDocument, localName);
48504
+ constructor(ownerDocument, localName2 = "progress") {
48505
+ super(ownerDocument, localName2);
48506
48506
  }
48507
48507
  };
48508
48508
  }
@@ -48515,8 +48515,8 @@ var init_paragraph_element = __esm({
48515
48515
  "use strict";
48516
48516
  init_element3();
48517
48517
  HTMLParagraphElement = class extends HTMLElement2 {
48518
- constructor(ownerDocument, localName = "p") {
48519
- super(ownerDocument, localName);
48518
+ constructor(ownerDocument, localName2 = "p") {
48519
+ super(ownerDocument, localName2);
48520
48520
  }
48521
48521
  };
48522
48522
  }
@@ -48529,8 +48529,8 @@ var init_table_element = __esm({
48529
48529
  "use strict";
48530
48530
  init_element3();
48531
48531
  HTMLTableElement = class extends HTMLElement2 {
48532
- constructor(ownerDocument, localName = "table") {
48533
- super(ownerDocument, localName);
48532
+ constructor(ownerDocument, localName2 = "table") {
48533
+ super(ownerDocument, localName2);
48534
48534
  }
48535
48535
  };
48536
48536
  }
@@ -48543,8 +48543,8 @@ var init_frame_set_element = __esm({
48543
48543
  "use strict";
48544
48544
  init_element3();
48545
48545
  HTMLFrameSetElement = class extends HTMLElement2 {
48546
- constructor(ownerDocument, localName = "frameset") {
48547
- super(ownerDocument, localName);
48546
+ constructor(ownerDocument, localName2 = "frameset") {
48547
+ super(ownerDocument, localName2);
48548
48548
  }
48549
48549
  };
48550
48550
  }
@@ -48557,8 +48557,8 @@ var init_li_element = __esm({
48557
48557
  "use strict";
48558
48558
  init_element3();
48559
48559
  HTMLLIElement = class extends HTMLElement2 {
48560
- constructor(ownerDocument, localName = "li") {
48561
- super(ownerDocument, localName);
48560
+ constructor(ownerDocument, localName2 = "li") {
48561
+ super(ownerDocument, localName2);
48562
48562
  }
48563
48563
  };
48564
48564
  }
@@ -48571,8 +48571,8 @@ var init_base_element = __esm({
48571
48571
  "use strict";
48572
48572
  init_element3();
48573
48573
  HTMLBaseElement = class extends HTMLElement2 {
48574
- constructor(ownerDocument, localName = "base") {
48575
- super(ownerDocument, localName);
48574
+ constructor(ownerDocument, localName2 = "base") {
48575
+ super(ownerDocument, localName2);
48576
48576
  }
48577
48577
  };
48578
48578
  }
@@ -48585,8 +48585,8 @@ var init_data_list_element = __esm({
48585
48585
  "use strict";
48586
48586
  init_element3();
48587
48587
  HTMLDataListElement = class extends HTMLElement2 {
48588
- constructor(ownerDocument, localName = "datalist") {
48589
- super(ownerDocument, localName);
48588
+ constructor(ownerDocument, localName2 = "datalist") {
48589
+ super(ownerDocument, localName2);
48590
48590
  }
48591
48591
  };
48592
48592
  }
@@ -48602,8 +48602,8 @@ var init_input_element = __esm({
48602
48602
  init_element3();
48603
48603
  tagName5 = "input";
48604
48604
  HTMLInputElement = class extends HTMLElement2 {
48605
- constructor(ownerDocument, localName = tagName5) {
48606
- super(ownerDocument, localName);
48605
+ constructor(ownerDocument, localName2 = tagName5) {
48606
+ super(ownerDocument, localName2);
48607
48607
  }
48608
48608
  /* c8 ignore start */
48609
48609
  get autofocus() {
@@ -48655,8 +48655,8 @@ var init_param_element = __esm({
48655
48655
  "use strict";
48656
48656
  init_element3();
48657
48657
  HTMLParamElement = class extends HTMLElement2 {
48658
- constructor(ownerDocument, localName = "param") {
48659
- super(ownerDocument, localName);
48658
+ constructor(ownerDocument, localName2 = "param") {
48659
+ super(ownerDocument, localName2);
48660
48660
  }
48661
48661
  };
48662
48662
  }
@@ -48669,8 +48669,8 @@ var init_media_element = __esm({
48669
48669
  "use strict";
48670
48670
  init_element3();
48671
48671
  HTMLMediaElement2 = class extends HTMLElement2 {
48672
- constructor(ownerDocument, localName = "media") {
48673
- super(ownerDocument, localName);
48672
+ constructor(ownerDocument, localName2 = "media") {
48673
+ super(ownerDocument, localName2);
48674
48674
  }
48675
48675
  };
48676
48676
  }
@@ -48683,8 +48683,8 @@ var init_audio_element = __esm({
48683
48683
  "use strict";
48684
48684
  init_element3();
48685
48685
  HTMLAudioElement2 = class extends HTMLElement2 {
48686
- constructor(ownerDocument, localName = "audio") {
48687
- super(ownerDocument, localName);
48686
+ constructor(ownerDocument, localName2 = "audio") {
48687
+ super(ownerDocument, localName2);
48688
48688
  }
48689
48689
  };
48690
48690
  }
@@ -48699,8 +48699,8 @@ var init_heading_element = __esm({
48699
48699
  init_element3();
48700
48700
  tagName6 = "h1";
48701
48701
  HTMLHeadingElement = class extends HTMLElement2 {
48702
- constructor(ownerDocument, localName = tagName6) {
48703
- super(ownerDocument, localName);
48702
+ constructor(ownerDocument, localName2 = tagName6) {
48703
+ super(ownerDocument, localName2);
48704
48704
  }
48705
48705
  };
48706
48706
  registerHTMLClass([tagName6, "h2", "h3", "h4", "h5", "h6"], HTMLHeadingElement);
@@ -48714,8 +48714,8 @@ var init_directory_element = __esm({
48714
48714
  "use strict";
48715
48715
  init_element3();
48716
48716
  HTMLDirectoryElement = class extends HTMLElement2 {
48717
- constructor(ownerDocument, localName = "dir") {
48718
- super(ownerDocument, localName);
48717
+ constructor(ownerDocument, localName2 = "dir") {
48718
+ super(ownerDocument, localName2);
48719
48719
  }
48720
48720
  };
48721
48721
  }
@@ -48728,8 +48728,8 @@ var init_quote_element = __esm({
48728
48728
  "use strict";
48729
48729
  init_element3();
48730
48730
  HTMLQuoteElement = class extends HTMLElement2 {
48731
- constructor(ownerDocument, localName = "quote") {
48732
- super(ownerDocument, localName);
48731
+ constructor(ownerDocument, localName2 = "quote") {
48732
+ super(ownerDocument, localName2);
48733
48733
  }
48734
48734
  };
48735
48735
  }
@@ -48782,8 +48782,8 @@ var init_canvas_element = __esm({
48782
48782
  ({ createCanvas } = import_canvas.default);
48783
48783
  tagName7 = "canvas";
48784
48784
  HTMLCanvasElement2 = class extends HTMLElement2 {
48785
- constructor(ownerDocument, localName = tagName7) {
48786
- super(ownerDocument, localName);
48785
+ constructor(ownerDocument, localName2 = tagName7) {
48786
+ super(ownerDocument, localName2);
48787
48787
  this[IMAGE] = createCanvas(300, 150);
48788
48788
  }
48789
48789
  get width() {
@@ -48818,8 +48818,8 @@ var init_legend_element = __esm({
48818
48818
  "use strict";
48819
48819
  init_element3();
48820
48820
  HTMLLegendElement = class extends HTMLElement2 {
48821
- constructor(ownerDocument, localName = "legend") {
48822
- super(ownerDocument, localName);
48821
+ constructor(ownerDocument, localName2 = "legend") {
48822
+ super(ownerDocument, localName2);
48823
48823
  }
48824
48824
  };
48825
48825
  }
@@ -48835,8 +48835,8 @@ var init_option_element = __esm({
48835
48835
  init_register_html_class();
48836
48836
  tagName8 = "option";
48837
48837
  HTMLOptionElement = class extends HTMLElement2 {
48838
- constructor(ownerDocument, localName = tagName8) {
48839
- super(ownerDocument, localName);
48838
+ constructor(ownerDocument, localName2 = tagName8) {
48839
+ super(ownerDocument, localName2);
48840
48840
  }
48841
48841
  /* c8 ignore start */
48842
48842
  get value() {
@@ -48867,8 +48867,8 @@ var init_span_element = __esm({
48867
48867
  "use strict";
48868
48868
  init_element3();
48869
48869
  HTMLSpanElement = class extends HTMLElement2 {
48870
- constructor(ownerDocument, localName = "span") {
48871
- super(ownerDocument, localName);
48870
+ constructor(ownerDocument, localName2 = "span") {
48871
+ super(ownerDocument, localName2);
48872
48872
  }
48873
48873
  };
48874
48874
  }
@@ -48881,8 +48881,8 @@ var init_meter_element = __esm({
48881
48881
  "use strict";
48882
48882
  init_element3();
48883
48883
  HTMLMeterElement = class extends HTMLElement2 {
48884
- constructor(ownerDocument, localName = "meter") {
48885
- super(ownerDocument, localName);
48884
+ constructor(ownerDocument, localName2 = "meter") {
48885
+ super(ownerDocument, localName2);
48886
48886
  }
48887
48887
  };
48888
48888
  }
@@ -48895,8 +48895,8 @@ var init_video_element = __esm({
48895
48895
  "use strict";
48896
48896
  init_element3();
48897
48897
  HTMLVideoElement2 = class extends HTMLElement2 {
48898
- constructor(ownerDocument, localName = "video") {
48899
- super(ownerDocument, localName);
48898
+ constructor(ownerDocument, localName2 = "video") {
48899
+ super(ownerDocument, localName2);
48900
48900
  }
48901
48901
  };
48902
48902
  }
@@ -48909,8 +48909,8 @@ var init_table_cell_element = __esm({
48909
48909
  "use strict";
48910
48910
  init_element3();
48911
48911
  HTMLTableCellElement = class extends HTMLElement2 {
48912
- constructor(ownerDocument, localName = "td") {
48913
- super(ownerDocument, localName);
48912
+ constructor(ownerDocument, localName2 = "td") {
48913
+ super(ownerDocument, localName2);
48914
48914
  }
48915
48915
  };
48916
48916
  }
@@ -48925,8 +48925,8 @@ var init_title_element = __esm({
48925
48925
  init_text_element();
48926
48926
  tagName9 = "title";
48927
48927
  HTMLTitleElement = class extends TextElement {
48928
- constructor(ownerDocument, localName = tagName9) {
48929
- super(ownerDocument, localName);
48928
+ constructor(ownerDocument, localName2 = tagName9) {
48929
+ super(ownerDocument, localName2);
48930
48930
  }
48931
48931
  };
48932
48932
  registerHTMLClass(tagName9, HTMLTitleElement);
@@ -48940,8 +48940,8 @@ var init_output_element = __esm({
48940
48940
  "use strict";
48941
48941
  init_element3();
48942
48942
  HTMLOutputElement = class extends HTMLElement2 {
48943
- constructor(ownerDocument, localName = "output") {
48944
- super(ownerDocument, localName);
48943
+ constructor(ownerDocument, localName2 = "output") {
48944
+ super(ownerDocument, localName2);
48945
48945
  }
48946
48946
  };
48947
48947
  }
@@ -48954,8 +48954,8 @@ var init_table_row_element = __esm({
48954
48954
  "use strict";
48955
48955
  init_element3();
48956
48956
  HTMLTableRowElement = class extends HTMLElement2 {
48957
- constructor(ownerDocument, localName = "tr") {
48958
- super(ownerDocument, localName);
48957
+ constructor(ownerDocument, localName2 = "tr") {
48958
+ super(ownerDocument, localName2);
48959
48959
  }
48960
48960
  };
48961
48961
  }
@@ -48968,8 +48968,8 @@ var init_data_element = __esm({
48968
48968
  "use strict";
48969
48969
  init_element3();
48970
48970
  HTMLDataElement = class extends HTMLElement2 {
48971
- constructor(ownerDocument, localName = "data") {
48972
- super(ownerDocument, localName);
48971
+ constructor(ownerDocument, localName2 = "data") {
48972
+ super(ownerDocument, localName2);
48973
48973
  }
48974
48974
  };
48975
48975
  }
@@ -48982,8 +48982,8 @@ var init_menu_element = __esm({
48982
48982
  "use strict";
48983
48983
  init_element3();
48984
48984
  HTMLMenuElement = class extends HTMLElement2 {
48985
- constructor(ownerDocument, localName = "menu") {
48986
- super(ownerDocument, localName);
48985
+ constructor(ownerDocument, localName2 = "menu") {
48986
+ super(ownerDocument, localName2);
48987
48987
  }
48988
48988
  };
48989
48989
  }
@@ -49000,8 +49000,8 @@ var init_select_element = __esm({
49000
49000
  init_node_list();
49001
49001
  tagName10 = "select";
49002
49002
  HTMLSelectElement = class extends HTMLElement2 {
49003
- constructor(ownerDocument, localName = tagName10) {
49004
- super(ownerDocument, localName);
49003
+ constructor(ownerDocument, localName2 = tagName10) {
49004
+ super(ownerDocument, localName2);
49005
49005
  }
49006
49006
  get options() {
49007
49007
  let children = new NodeList();
@@ -49044,8 +49044,8 @@ var init_br_element = __esm({
49044
49044
  "use strict";
49045
49045
  init_element3();
49046
49046
  HTMLBRElement = class extends HTMLElement2 {
49047
- constructor(ownerDocument, localName = "br") {
49048
- super(ownerDocument, localName);
49047
+ constructor(ownerDocument, localName2 = "br") {
49048
+ super(ownerDocument, localName2);
49049
49049
  }
49050
49050
  };
49051
49051
  }
@@ -49061,8 +49061,8 @@ var init_button_element = __esm({
49061
49061
  init_element3();
49062
49062
  tagName11 = "button";
49063
49063
  HTMLButtonElement = class extends HTMLElement2 {
49064
- constructor(ownerDocument, localName = tagName11) {
49065
- super(ownerDocument, localName);
49064
+ constructor(ownerDocument, localName2 = tagName11) {
49065
+ super(ownerDocument, localName2);
49066
49066
  }
49067
49067
  /* c8 ignore start */
49068
49068
  get disabled() {
@@ -49096,8 +49096,8 @@ var init_map_element = __esm({
49096
49096
  "use strict";
49097
49097
  init_element3();
49098
49098
  HTMLMapElement = class extends HTMLElement2 {
49099
- constructor(ownerDocument, localName = "map") {
49100
- super(ownerDocument, localName);
49099
+ constructor(ownerDocument, localName2 = "map") {
49100
+ super(ownerDocument, localName2);
49101
49101
  }
49102
49102
  };
49103
49103
  }
@@ -49110,8 +49110,8 @@ var init_opt_group_element = __esm({
49110
49110
  "use strict";
49111
49111
  init_element3();
49112
49112
  HTMLOptGroupElement = class extends HTMLElement2 {
49113
- constructor(ownerDocument, localName = "optgroup") {
49114
- super(ownerDocument, localName);
49113
+ constructor(ownerDocument, localName2 = "optgroup") {
49114
+ super(ownerDocument, localName2);
49115
49115
  }
49116
49116
  };
49117
49117
  }
@@ -49124,8 +49124,8 @@ var init_d_list_element = __esm({
49124
49124
  "use strict";
49125
49125
  init_element3();
49126
49126
  HTMLDListElement = class extends HTMLElement2 {
49127
- constructor(ownerDocument, localName = "dl") {
49128
- super(ownerDocument, localName);
49127
+ constructor(ownerDocument, localName2 = "dl") {
49128
+ super(ownerDocument, localName2);
49129
49129
  }
49130
49130
  };
49131
49131
  }
@@ -49141,8 +49141,8 @@ var init_text_area_element = __esm({
49141
49141
  init_text_element();
49142
49142
  tagName12 = "textarea";
49143
49143
  HTMLTextAreaElement = class extends TextElement {
49144
- constructor(ownerDocument, localName = tagName12) {
49145
- super(ownerDocument, localName);
49144
+ constructor(ownerDocument, localName2 = tagName12) {
49145
+ super(ownerDocument, localName2);
49146
49146
  }
49147
49147
  /* c8 ignore start */
49148
49148
  get disabled() {
@@ -49188,8 +49188,8 @@ var init_font_element = __esm({
49188
49188
  "use strict";
49189
49189
  init_element3();
49190
49190
  HTMLFontElement = class extends HTMLElement2 {
49191
- constructor(ownerDocument, localName = "font") {
49192
- super(ownerDocument, localName);
49191
+ constructor(ownerDocument, localName2 = "font") {
49192
+ super(ownerDocument, localName2);
49193
49193
  }
49194
49194
  };
49195
49195
  }
@@ -49202,8 +49202,8 @@ var init_div_element = __esm({
49202
49202
  "use strict";
49203
49203
  init_element3();
49204
49204
  HTMLDivElement = class extends HTMLElement2 {
49205
- constructor(ownerDocument, localName = "div") {
49206
- super(ownerDocument, localName);
49205
+ constructor(ownerDocument, localName2 = "div") {
49206
+ super(ownerDocument, localName2);
49207
49207
  }
49208
49208
  };
49209
49209
  }
@@ -49219,8 +49219,8 @@ var init_link_element = __esm({
49219
49219
  init_element3();
49220
49220
  tagName13 = "link";
49221
49221
  HTMLLinkElement = class extends HTMLElement2 {
49222
- constructor(ownerDocument, localName = tagName13) {
49223
- super(ownerDocument, localName);
49222
+ constructor(ownerDocument, localName2 = tagName13) {
49223
+ super(ownerDocument, localName2);
49224
49224
  }
49225
49225
  /* c8 ignore start */
49226
49226
  // copy paste from img.src, already covered
@@ -49275,8 +49275,8 @@ var init_slot_element = __esm({
49275
49275
  init_register_html_class();
49276
49276
  tagName14 = "slot";
49277
49277
  HTMLSlotElement = class extends HTMLElement2 {
49278
- constructor(ownerDocument, localName = tagName14) {
49279
- super(ownerDocument, localName);
49278
+ constructor(ownerDocument, localName2 = tagName14) {
49279
+ super(ownerDocument, localName2);
49280
49280
  }
49281
49281
  /* c8 ignore start */
49282
49282
  get name() {
@@ -49326,8 +49326,8 @@ var init_form_element = __esm({
49326
49326
  "use strict";
49327
49327
  init_element3();
49328
49328
  HTMLFormElement = class extends HTMLElement2 {
49329
- constructor(ownerDocument, localName = "form") {
49330
- super(ownerDocument, localName);
49329
+ constructor(ownerDocument, localName2 = "form") {
49330
+ super(ownerDocument, localName2);
49331
49331
  }
49332
49332
  };
49333
49333
  }
@@ -49343,8 +49343,8 @@ var init_image_element = __esm({
49343
49343
  init_element3();
49344
49344
  tagName15 = "img";
49345
49345
  HTMLImageElement = class extends HTMLElement2 {
49346
- constructor(ownerDocument, localName = tagName15) {
49347
- super(ownerDocument, localName);
49346
+ constructor(ownerDocument, localName2 = tagName15) {
49347
+ super(ownerDocument, localName2);
49348
49348
  }
49349
49349
  /* c8 ignore start */
49350
49350
  get alt() {
@@ -49402,8 +49402,8 @@ var init_pre_element = __esm({
49402
49402
  "use strict";
49403
49403
  init_element3();
49404
49404
  HTMLPreElement = class extends HTMLElement2 {
49405
- constructor(ownerDocument, localName = "pre") {
49406
- super(ownerDocument, localName);
49405
+ constructor(ownerDocument, localName2 = "pre") {
49406
+ super(ownerDocument, localName2);
49407
49407
  }
49408
49408
  };
49409
49409
  }
@@ -49416,8 +49416,8 @@ var init_u_list_element = __esm({
49416
49416
  "use strict";
49417
49417
  init_element3();
49418
49418
  HTMLUListElement = class extends HTMLElement2 {
49419
- constructor(ownerDocument, localName = "ul") {
49420
- super(ownerDocument, localName);
49419
+ constructor(ownerDocument, localName2 = "ul") {
49420
+ super(ownerDocument, localName2);
49421
49421
  }
49422
49422
  };
49423
49423
  }
@@ -49433,8 +49433,8 @@ var init_meta_element = __esm({
49433
49433
  init_attributes();
49434
49434
  tagName16 = "meta";
49435
49435
  HTMLMetaElement = class extends HTMLElement2 {
49436
- constructor(ownerDocument, localName = tagName16) {
49437
- super(ownerDocument, localName);
49436
+ constructor(ownerDocument, localName2 = tagName16) {
49437
+ super(ownerDocument, localName2);
49438
49438
  }
49439
49439
  /* c8 ignore start */
49440
49440
  get name() {
@@ -49480,8 +49480,8 @@ var init_picture_element = __esm({
49480
49480
  "use strict";
49481
49481
  init_element3();
49482
49482
  HTMLPictureElement = class extends HTMLElement2 {
49483
- constructor(ownerDocument, localName = "picture") {
49484
- super(ownerDocument, localName);
49483
+ constructor(ownerDocument, localName2 = "picture") {
49484
+ super(ownerDocument, localName2);
49485
49485
  }
49486
49486
  };
49487
49487
  }
@@ -49494,8 +49494,8 @@ var init_area_element = __esm({
49494
49494
  "use strict";
49495
49495
  init_element3();
49496
49496
  HTMLAreaElement = class extends HTMLElement2 {
49497
- constructor(ownerDocument, localName = "area") {
49498
- super(ownerDocument, localName);
49497
+ constructor(ownerDocument, localName2 = "area") {
49498
+ super(ownerDocument, localName2);
49499
49499
  }
49500
49500
  };
49501
49501
  }
@@ -49508,8 +49508,8 @@ var init_o_list_element = __esm({
49508
49508
  "use strict";
49509
49509
  init_element3();
49510
49510
  HTMLOListElement = class extends HTMLElement2 {
49511
- constructor(ownerDocument, localName = "ol") {
49512
- super(ownerDocument, localName);
49511
+ constructor(ownerDocument, localName2 = "ol") {
49512
+ super(ownerDocument, localName2);
49513
49513
  }
49514
49514
  };
49515
49515
  }
@@ -49522,8 +49522,8 @@ var init_table_caption_element = __esm({
49522
49522
  "use strict";
49523
49523
  init_element3();
49524
49524
  HTMLTableCaptionElement = class extends HTMLElement2 {
49525
- constructor(ownerDocument, localName = "caption") {
49526
- super(ownerDocument, localName);
49525
+ constructor(ownerDocument, localName2 = "caption") {
49526
+ super(ownerDocument, localName2);
49527
49527
  }
49528
49528
  };
49529
49529
  }
@@ -49539,8 +49539,8 @@ var init_anchor_element = __esm({
49539
49539
  init_element3();
49540
49540
  tagName17 = "a";
49541
49541
  HTMLAnchorElement = class extends HTMLElement2 {
49542
- constructor(ownerDocument, localName = tagName17) {
49543
- super(ownerDocument, localName);
49542
+ constructor(ownerDocument, localName2 = tagName17) {
49543
+ super(ownerDocument, localName2);
49544
49544
  }
49545
49545
  /* c8 ignore start */
49546
49546
  // copy paste from img.src, already covered
@@ -49587,8 +49587,8 @@ var init_label_element = __esm({
49587
49587
  "use strict";
49588
49588
  init_element3();
49589
49589
  HTMLLabelElement = class extends HTMLElement2 {
49590
- constructor(ownerDocument, localName = "label") {
49591
- super(ownerDocument, localName);
49590
+ constructor(ownerDocument, localName2 = "label") {
49591
+ super(ownerDocument, localName2);
49592
49592
  }
49593
49593
  };
49594
49594
  }
@@ -49601,8 +49601,8 @@ var init_unknown_element = __esm({
49601
49601
  "use strict";
49602
49602
  init_element3();
49603
49603
  HTMLUnknownElement = class extends HTMLElement2 {
49604
- constructor(ownerDocument, localName = "unknown") {
49605
- super(ownerDocument, localName);
49604
+ constructor(ownerDocument, localName2 = "unknown") {
49605
+ super(ownerDocument, localName2);
49606
49606
  }
49607
49607
  };
49608
49608
  }
@@ -49615,8 +49615,8 @@ var init_mod_element = __esm({
49615
49615
  "use strict";
49616
49616
  init_element3();
49617
49617
  HTMLModElement = class extends HTMLElement2 {
49618
- constructor(ownerDocument, localName = "mod") {
49619
- super(ownerDocument, localName);
49618
+ constructor(ownerDocument, localName2 = "mod") {
49619
+ super(ownerDocument, localName2);
49620
49620
  }
49621
49621
  };
49622
49622
  }
@@ -49629,8 +49629,8 @@ var init_details_element = __esm({
49629
49629
  "use strict";
49630
49630
  init_element3();
49631
49631
  HTMLDetailsElement = class extends HTMLElement2 {
49632
- constructor(ownerDocument, localName = "details") {
49633
- super(ownerDocument, localName);
49632
+ constructor(ownerDocument, localName2 = "details") {
49633
+ super(ownerDocument, localName2);
49634
49634
  }
49635
49635
  };
49636
49636
  }
@@ -49646,8 +49646,8 @@ var init_source_element = __esm({
49646
49646
  init_element3();
49647
49647
  tagName18 = "source";
49648
49648
  HTMLSourceElement = class extends HTMLElement2 {
49649
- constructor(ownerDocument, localName = tagName18) {
49650
- super(ownerDocument, localName);
49649
+ constructor(ownerDocument, localName2 = tagName18) {
49650
+ super(ownerDocument, localName2);
49651
49651
  }
49652
49652
  /* c8 ignore start */
49653
49653
  get src() {
@@ -49687,8 +49687,8 @@ var init_track_element = __esm({
49687
49687
  "use strict";
49688
49688
  init_element3();
49689
49689
  HTMLTrackElement = class extends HTMLElement2 {
49690
- constructor(ownerDocument, localName = "track") {
49691
- super(ownerDocument, localName);
49690
+ constructor(ownerDocument, localName2 = "track") {
49691
+ super(ownerDocument, localName2);
49692
49692
  }
49693
49693
  };
49694
49694
  }
@@ -49701,8 +49701,8 @@ var init_marquee_element = __esm({
49701
49701
  "use strict";
49702
49702
  init_element3();
49703
49703
  HTMLMarqueeElement = class extends HTMLElement2 {
49704
- constructor(ownerDocument, localName = "marquee") {
49705
- super(ownerDocument, localName);
49704
+ constructor(ownerDocument, localName2 = "marquee") {
49705
+ super(ownerDocument, localName2);
49706
49706
  }
49707
49707
  };
49708
49708
  }
@@ -50280,8 +50280,8 @@ var init_document = __esm({
50280
50280
  createDocumentType(name, publicId, systemId) {
50281
50281
  return new DocumentType(this, name, publicId, systemId);
50282
50282
  }
50283
- createElement(localName) {
50284
- return new Element3(this, localName);
50283
+ createElement(localName2) {
50284
+ return new Element3(this, localName2);
50285
50285
  }
50286
50286
  createRange() {
50287
50287
  const range = new Range();
@@ -50372,8 +50372,8 @@ var init_document = __esm({
50372
50372
  createAttributeNS(_, name) {
50373
50373
  return this.createAttribute(name);
50374
50374
  }
50375
- createElementNS(nsp, localName, options) {
50376
- return nsp === SVG_NAMESPACE ? new SVGElement(this, localName, null) : this.createElement(localName, options);
50375
+ createElementNS(nsp, localName2, options) {
50376
+ return nsp === SVG_NAMESPACE ? new SVGElement(this, localName2, null) : this.createElement(localName2, options);
50377
50377
  }
50378
50378
  /* c8 ignore stop */
50379
50379
  };
@@ -50398,22 +50398,22 @@ var init_document2 = __esm({
50398
50398
  init_node_list();
50399
50399
  init_custom_element_registry();
50400
50400
  init_element3();
50401
- createHTMLElement = (ownerDocument, builtin, localName, options) => {
50402
- if (!builtin && htmlClasses.has(localName)) {
50403
- const Class = htmlClasses.get(localName);
50404
- return new Class(ownerDocument, localName);
50401
+ createHTMLElement = (ownerDocument, builtin, localName2, options) => {
50402
+ if (!builtin && htmlClasses.has(localName2)) {
50403
+ const Class = htmlClasses.get(localName2);
50404
+ return new Class(ownerDocument, localName2);
50405
50405
  }
50406
50406
  const { [CUSTOM_ELEMENTS]: { active, registry } } = ownerDocument;
50407
50407
  if (active) {
50408
- const ce2 = builtin ? options.is : localName;
50408
+ const ce2 = builtin ? options.is : localName2;
50409
50409
  if (registry.has(ce2)) {
50410
50410
  const { Class } = registry.get(ce2);
50411
- const element = new Class(ownerDocument, localName);
50411
+ const element = new Class(ownerDocument, localName2);
50412
50412
  customElements.set(element, { connected: false });
50413
50413
  return element;
50414
50414
  }
50415
50415
  }
50416
- return new HTMLElement2(ownerDocument, localName);
50416
+ return new HTMLElement2(ownerDocument, localName2);
50417
50417
  };
50418
50418
  HTMLDocument = class extends Document2 {
50419
50419
  constructor() {
@@ -50475,9 +50475,9 @@ var init_document2 = __esm({
50475
50475
  ).textContent = textContent2;
50476
50476
  }
50477
50477
  }
50478
- createElement(localName, options) {
50478
+ createElement(localName2, options) {
50479
50479
  const builtin = !!(options && options.is);
50480
- const element = createHTMLElement(this, builtin, localName, options);
50480
+ const element = createHTMLElement(this, builtin, localName2, options);
50481
50481
  if (builtin)
50482
50482
  element.setAttribute("is", options.is);
50483
50483
  return element;
@@ -77173,12 +77173,84 @@ function isSafeMediaUrl(url) {
77173
77173
  if (proto === "data") return /^data:image\//i.test(normalized3);
77174
77174
  return false;
77175
77175
  }
77176
- var CANVAS_DIMENSIONS2, VALID_CANVAS_RESOLUTIONS2, COMPOSITION_VARIABLE_TYPES2, FONT_ALIAS_MAP2, FONT_ALIAS_KEYS2, CANONICAL_FONT_DISPLAY_NAMES2, DEFAULT_TYPEOF2, COMPOSITION_ATTRIBUTES4, CANONICAL_AUTHORED_TIMING_ATTRIBUTES4, DERIVED_TIMING_ATTRIBUTES4, LEGACY_TIMING_ATTRIBUTES4;
77176
+ function parseProgram3(script) {
77177
+ try {
77178
+ return parse3(script, { ecmaVersion: "latest", sourceType: "script" });
77179
+ } catch {
77180
+ return parse3(script, { ecmaVersion: "latest", sourceType: "module" });
77181
+ }
77182
+ }
77183
+ function literalString2(node) {
77184
+ if (node?.type === "Literal" && typeof node.value === "string") return node.value;
77185
+ if (node?.type === "TemplateLiteral" && node.expressions?.length === 0) {
77186
+ return node.quasis?.[0]?.value?.cooked;
77187
+ }
77188
+ return void 0;
77189
+ }
77190
+ function memberName2(node) {
77191
+ if (node?.type !== "MemberExpression") return void 0;
77192
+ if (!node.computed && node.property?.type === "Identifier") return node.property.name;
77193
+ return literalString2(node.property);
77194
+ }
77195
+ function lookupSelector2(node, bindings) {
77196
+ if (node?.type === "Identifier") return bindings.get(node.name);
77197
+ if (node?.type !== "CallExpression" || node.callee?.type !== "MemberExpression") {
77198
+ return void 0;
77199
+ }
77200
+ const method = memberName2(node.callee);
77201
+ if (method !== "getElementById" && method !== "querySelector") return void 0;
77202
+ const value = literalString2(node.arguments?.[0]);
77203
+ if (!value) return void 0;
77204
+ return method === "getElementById" ? `#${value}` : value;
77205
+ }
77206
+ function extractMediaSrcMutations2(script) {
77207
+ try {
77208
+ const ast = parseProgram3(script);
77209
+ const bindings = /* @__PURE__ */ new Map();
77210
+ simple(ast, {
77211
+ VariableDeclarator(node) {
77212
+ if (node.id?.type !== "Identifier") return;
77213
+ const selector = lookupSelector2(node.init, bindings);
77214
+ if (selector) bindings.set(node.id.name, selector);
77215
+ }
77216
+ });
77217
+ const mutations = [];
77218
+ simple(ast, {
77219
+ AssignmentExpression(node) {
77220
+ if (node.operator !== "=" || memberName2(node.left) !== "src") return;
77221
+ const selector = lookupSelector2(node.left.object, bindings);
77222
+ if (!selector) return;
77223
+ mutations.push({
77224
+ selector,
77225
+ operation: "src_assignment",
77226
+ raw: script.slice(node.start, node.end)
77227
+ });
77228
+ },
77229
+ CallExpression(node) {
77230
+ if (memberName2(node.callee) !== "setAttribute") return;
77231
+ if (literalString2(node.arguments?.[0])?.toLowerCase() !== "src") return;
77232
+ const selector = lookupSelector2(node.callee.object, bindings);
77233
+ if (!selector) return;
77234
+ mutations.push({
77235
+ selector,
77236
+ operation: "set_attribute",
77237
+ raw: script.slice(node.start, node.end)
77238
+ });
77239
+ }
77240
+ });
77241
+ return mutations;
77242
+ } catch {
77243
+ return [];
77244
+ }
77245
+ }
77246
+ var CANVAS_DIMENSIONS2, VALID_CANVAS_RESOLUTIONS2, COMPOSITION_VARIABLE_TYPES2, FONT_ALIAS_MAP2, FONT_ALIAS_KEYS2, CANONICAL_FONT_DISPLAY_NAMES2, DEFAULT_TYPEOF2, COMPOSITION_ATTRIBUTES4, CANONICAL_AUTHORED_TIMING_ATTRIBUTES4, DERIVED_TIMING_ATTRIBUTES4, LEGACY_TIMING_ATTRIBUTES4, HTML_BODY_CSS_WIDTH_FIRST_RE2, HTML_BODY_CSS_HEIGHT_FIRST_RE2, VIEWPORT_META_SIZE_RE2;
77177
77247
  var init_composition = __esm({
77178
77248
  "../parsers/dist/composition.js"() {
77179
77249
  "use strict";
77180
77250
  init_acorn();
77181
77251
  init_walk();
77252
+ init_acorn();
77253
+ init_walk();
77182
77254
  CANVAS_DIMENSIONS2 = {
77183
77255
  landscape: { width: 1920, height: 1080 },
77184
77256
  portrait: { width: 1080, height: 1920 },
@@ -77326,6 +77398,9 @@ var init_composition = __esm({
77326
77398
  COMPOSITION_ATTRIBUTES4.derivedEnd,
77327
77399
  COMPOSITION_ATTRIBUTES4.legacyTrack
77328
77400
  ]);
77401
+ HTML_BODY_CSS_WIDTH_FIRST_RE2 = /(html\s*,\s*body\s*\{[^}]*?width:\s*)(\d+)px([^}]*?height:\s*)(\d+)px/i;
77402
+ HTML_BODY_CSS_HEIGHT_FIRST_RE2 = /(html\s*,\s*body\s*\{[^}]*?height:\s*)(\d+)px([^}]*?width:\s*)(\d+)px/i;
77403
+ VIEWPORT_META_SIZE_RE2 = /(<meta[^>]*name=["']viewport["'][^>]*content=["']width=)(\d+)(,\s*height=)(\d+)/i;
77329
77404
  }
77330
77405
  });
77331
77406
 
@@ -82131,7 +82206,7 @@ function getObjectArrayKeyframeTiming2(durations) {
82131
82206
  )
82132
82207
  };
82133
82208
  }
82134
- function parseProgram3(script) {
82209
+ function parseProgram4(script) {
82135
82210
  try {
82136
82211
  return parse3(script, {
82137
82212
  ecmaVersion: "latest",
@@ -83288,7 +83363,7 @@ function parseGsapScriptAcornForWrite2(script) {
83288
83363
  }
83289
83364
  function parseGsapScriptAcorn2(script) {
83290
83365
  try {
83291
- const ast = parseProgram3(script);
83366
+ const ast = parseProgram4(script);
83292
83367
  const scope = collectScopeBindings2(ast);
83293
83368
  const detection = findTimelineVar2(ast, scope);
83294
83369
  const ref2 = detection.ref ?? { kind: "identifier", name: "tl" };
@@ -83336,7 +83411,7 @@ function parseGsapScriptAcorn2(script) {
83336
83411
  }
83337
83412
  function gsapScriptMotionPathFirstUseIndex(script) {
83338
83413
  try {
83339
- const ast = parseProgram3(script);
83414
+ const ast = parseProgram4(script);
83340
83415
  const scope = collectScopeBindings2(ast);
83341
83416
  const identifierBindings = collectIdentifierBindingIndex2(ast);
83342
83417
  const timelineRef = findTimelineVar2(ast, scope).ref;
@@ -83529,6 +83604,7 @@ __export(dist_exports2, {
83529
83604
  });
83530
83605
  import postcss2 from "postcss";
83531
83606
  import postcss22 from "postcss";
83607
+ import postcss3 from "postcss";
83532
83608
  import { createHash as createHash2 } from "crypto";
83533
83609
  import { existsSync as existsSync22, readFileSync as readFileSync5, readdirSync as readdirSync4 } from "fs";
83534
83610
  import { dirname as dirname7, extname as extname3, join as join22, relative as relative3, resolve as resolve8 } from "path";
@@ -83579,6 +83655,7 @@ function parseHtmlStructure(source) {
83579
83655
  blocks[name].push({
83580
83656
  attrs: block.attrs,
83581
83657
  content: source.slice(block.contentStart, parser.startIndex),
83658
+ contentStart: block.contentStart,
83582
83659
  raw: source.slice(block.index, parser.endIndex + 1),
83583
83660
  index: block.index
83584
83661
  });
@@ -83728,11 +83805,17 @@ function readTimelineRegistryTopLevelKeys(source) {
83728
83805
  function getInlineScriptSyntaxError(source) {
83729
83806
  if (!source.trim()) return null;
83730
83807
  try {
83731
- new Function(source);
83808
+ parse3(source, {
83809
+ ecmaVersion: "latest",
83810
+ sourceType: "script",
83811
+ allowReturnOutsideFunction: true
83812
+ });
83732
83813
  return null;
83733
83814
  } catch (error) {
83734
- if (error instanceof Error) return error.message;
83735
- return String(error);
83815
+ return {
83816
+ message: error instanceof Error ? error.message : String(error),
83817
+ offset: error instanceof SyntaxError && "pos" in error && typeof error.pos === "number" ? error.pos : void 0
83818
+ };
83736
83819
  }
83737
83820
  }
83738
83821
  function stripStringLiterals(source) {
@@ -84004,7 +84087,7 @@ function stripCssComments(source) {
84004
84087
  }
84005
84088
  return out;
84006
84089
  }
84007
- function stripHtmlCommentsOnce(source) {
84090
+ function stripHtmlCommentsOnce(source, removed) {
84008
84091
  let out = "";
84009
84092
  let i = 0;
84010
84093
  for (; ; ) {
@@ -84013,14 +84096,17 @@ function stripHtmlCommentsOnce(source) {
84013
84096
  const end = source.indexOf("-->", start + 4);
84014
84097
  if (end < 0) return out + source.slice(i);
84015
84098
  out += source.slice(i, start);
84099
+ removed?.(start, end + 3);
84016
84100
  i = end + 3;
84017
84101
  }
84018
84102
  }
84019
- function stripHtmlComments(source) {
84103
+ function stripHtmlComments(source, pass) {
84020
84104
  let out = source;
84021
84105
  for (let prev = ""; prev !== out; ) {
84022
84106
  prev = out;
84023
- out = stripHtmlCommentsOnce(out);
84107
+ const ranges = [];
84108
+ out = stripHtmlCommentsOnce(out, pass ? (start, end) => ranges.push([start, end]) : void 0);
84109
+ if (ranges.length) pass?.(ranges);
84024
84110
  }
84025
84111
  return out;
84026
84112
  }
@@ -84094,9 +84180,39 @@ function snippetOffset(source, snippet) {
84094
84180
  if (index < 0 || source.text.indexOf(needle, index + 1) >= 0) return void 0;
84095
84181
  return source.offsets[index];
84096
84182
  }
84183
+ function mappedHtmlSource(original) {
84184
+ let offsets;
84185
+ const source = stripHtmlComments(original, (ranges) => {
84186
+ const previous = offsets;
84187
+ const length = (previous?.length ?? original.length + 1) - ranges.reduce((n3, [a, b2]) => n3 + b2 - a, 0);
84188
+ offsets = new Uint32Array(length);
84189
+ let target = 0;
84190
+ let start = 0;
84191
+ const spans = [
84192
+ ...ranges,
84193
+ [previous ? previous.length : original.length + 1, 0]
84194
+ ];
84195
+ for (const [a, b2] of spans) {
84196
+ for (let i = start; i < a; i++) offsets[target++] = previous ? previous[i] : i;
84197
+ start = b2;
84198
+ }
84199
+ });
84200
+ return { source, originalOffset: (index) => offsets ? offsets[index] : index };
84201
+ }
84202
+ function sourcePosition(source, offset3, file) {
84203
+ if (!Number.isInteger(offset3) || offset3 < 0 || offset3 > source.length) return {};
84204
+ const before3 = source.slice(0, offset3);
84205
+ return {
84206
+ ...file ? { file } : {},
84207
+ line: before3.split(/\r\n|\r|\n/).length,
84208
+ column: offset3 - Math.max(before3.lastIndexOf("\n"), before3.lastIndexOf("\r"))
84209
+ };
84210
+ }
84097
84211
  function buildLintContext(html, options = {}) {
84098
84212
  const rawSource = html || "";
84099
- let source = stripHtmlComments(rawSource);
84213
+ const mapped = mappedHtmlSource(rawSource);
84214
+ let source = mapped.source;
84215
+ let sourceStart = 0;
84100
84216
  const initialStructure = parseHtmlStructure(source);
84101
84217
  const templateTags = initialStructure.tags.filter(
84102
84218
  (tag) => tag.name === "template" && tag.closeIndex != null
@@ -84109,7 +84225,8 @@ function buildLintContext(html, options = {}) {
84109
84225
  const template = templateTags[0];
84110
84226
  let structure = initialStructure;
84111
84227
  if (template && !findRootTag(sourceWithoutTemplates)) {
84112
- source = source.slice(template.index + template.raw.length, template.closeIndex);
84228
+ sourceStart = template.index + template.raw.length;
84229
+ source = source.slice(sourceStart, template.closeIndex);
84113
84230
  structure = parseHtmlStructure(source);
84114
84231
  }
84115
84232
  const tags = structure.tags;
@@ -84119,14 +84236,23 @@ function buildLintContext(html, options = {}) {
84119
84236
  attrs: `href="${style.href}"`,
84120
84237
  content: style.content,
84121
84238
  raw: style.content,
84122
- index: -1
84239
+ index: -1,
84240
+ file: style.file ?? style.href
84123
84241
  }))
84124
84242
  ];
84125
84243
  const scripts = structure.scripts;
84126
84244
  const compositionIds = collectCompositionIds(tags);
84127
84245
  const rootTag = findRootTag(source, tags);
84128
84246
  const rootCompositionId = readDecodedAttr(rootTag?.raw || "", "data-composition-id");
84247
+ const locate = (block, offset3) => {
84248
+ if (offset3 === void 0 || offset3 < 0 || offset3 > block.content.length) return {};
84249
+ if (block.index === -1) return sourcePosition(block.content, offset3, block.file);
84250
+ if (block.contentStart === void 0) return {};
84251
+ const originalOffset = mapped.originalOffset(sourceStart + block.contentStart + offset3);
84252
+ return originalOffset === void 0 ? {} : sourcePosition(rawSource, originalOffset, options.filePath);
84253
+ };
84129
84254
  return {
84255
+ locate,
84130
84256
  source,
84131
84257
  rawSource,
84132
84258
  tags,
@@ -84309,12 +84435,12 @@ function findVisibleMarkupCommentLeak(source) {
84309
84435
  return null;
84310
84436
  }
84311
84437
  function readHtmlBodyCssSize(source) {
84312
- const widthFirst = source.match(HTML_BODY_CSS_WIDTH_FIRST_RE);
84438
+ const widthFirst = source.match(HTML_BODY_CSS_WIDTH_FIRST_RE2);
84313
84439
  if (widthFirst) {
84314
84440
  const [, , width = "", , height = ""] = widthFirst;
84315
84441
  return { width, height };
84316
84442
  }
84317
- const heightFirst = source.match(HTML_BODY_CSS_HEIGHT_FIRST_RE);
84443
+ const heightFirst = source.match(HTML_BODY_CSS_HEIGHT_FIRST_RE2);
84318
84444
  if (heightFirst) {
84319
84445
  const [, , height = "", , width = ""] = heightFirst;
84320
84446
  return { width, height };
@@ -84322,7 +84448,7 @@ function readHtmlBodyCssSize(source) {
84322
84448
  return null;
84323
84449
  }
84324
84450
  function readViewportMetaSize(source) {
84325
- const match = source.match(VIEWPORT_META_SIZE_RE);
84451
+ const match = source.match(VIEWPORT_META_SIZE_RE2);
84326
84452
  if (!match) return null;
84327
84453
  const [, , width = "", , height = ""] = match;
84328
84454
  return { width, height };
@@ -84358,6 +84484,20 @@ function describeRootDimensionsDrift(source, dataWidth, dataHeight) {
84358
84484
  fixHint: "update html/body CSS and the meta viewport to match, or scaffold with `hyperframes init --resolution portrait`"
84359
84485
  };
84360
84486
  }
84487
+ function cssErrorOffset(source, error) {
84488
+ if (error.input && "offset" in error.input && typeof error.input.offset === "number")
84489
+ return error.input.offset;
84490
+ const { line: line3, column } = error;
84491
+ if (line3 === void 0 || column === void 0) return void 0;
84492
+ let offset3 = 0;
84493
+ let currentLine = 1;
84494
+ for (const match of source.matchAll(/\n/g)) {
84495
+ if (currentLine >= line3) break;
84496
+ offset3 = match.index + 1;
84497
+ currentLine++;
84498
+ }
84499
+ return currentLine === line3 ? offset3 + column - 1 : void 0;
84500
+ }
84361
84501
  function tweensVolumeInSameCall(script, id) {
84362
84502
  const selector = new RegExp(`#${escapeRegExp4(id)}(?![\\w-])`, "g");
84363
84503
  for (let hit = selector.exec(script); hit; hit = selector.exec(script)) {
@@ -84617,7 +84757,7 @@ function findRuntimeMediaSrcMutationFindings(ctx) {
84617
84757
  const { document: document2 } = parseHTML(ctx.source);
84618
84758
  const findings = [];
84619
84759
  for (const script of ctx.scripts) {
84620
- for (const mutation of extractMediaSrcMutations(script.content)) {
84760
+ for (const mutation of extractMediaSrcMutations2(script.content)) {
84621
84761
  let targets;
84622
84762
  try {
84623
84763
  const id = /^#[A-Za-z_][\w-]*$/.test(mutation.selector) ? mutation.selector.slice(1) : null;
@@ -84796,6 +84936,40 @@ function findAudioGroupCarveAttrFindings(ctx) {
84796
84936
  }
84797
84937
  return findings;
84798
84938
  }
84939
+ function callsFor(script) {
84940
+ const cached3 = callIndexes.get(script);
84941
+ if (cached3) return cached3;
84942
+ const calls = [];
84943
+ try {
84944
+ const ast = parse3(script.content, {
84945
+ ecmaVersion: "latest",
84946
+ sourceType: "script",
84947
+ allowReturnOutsideFunction: true
84948
+ });
84949
+ simple(ast, {
84950
+ CallExpression: (node) => {
84951
+ calls.push(node);
84952
+ }
84953
+ });
84954
+ } catch {
84955
+ }
84956
+ calls.sort((a, b2) => a.start - b2.start);
84957
+ callIndexes.set(script, calls);
84958
+ return calls;
84959
+ }
84960
+ function gsapCallOffset(script, method) {
84961
+ return callsFor(script).find(
84962
+ ({ callee }) => callee.type === "MemberExpression" && !callee.computed && callee.object.type === "Identifier" && callee.object.name === "gsap" && callee.property.type === "Identifier" && callee.property.name === method
84963
+ )?.start;
84964
+ }
84965
+ function containingCallOffset(script, tokenOffset) {
84966
+ let start;
84967
+ for (const call of callsFor(script)) {
84968
+ if (call.start > tokenOffset) break;
84969
+ if (call.end > tokenOffset) start = call.start;
84970
+ }
84971
+ return start;
84972
+ }
84799
84973
  function readTagTiming(rawTag) {
84800
84974
  return readClipTiming2({ getAttribute: (name) => readAttr(rawTag, name) });
84801
84975
  }
@@ -85293,7 +85467,7 @@ function scanScriptsForRegexMatches(scripts, pattern, options) {
85293
85467
  content.length,
85294
85468
  match.index + match[0].length + options.contextAfter
85295
85469
  );
85296
- hits.push({ match, snippet: content.slice(contextStart, contextEnd) });
85470
+ hits.push({ match, snippet: content.slice(contextStart, contextEnd), script });
85297
85471
  }
85298
85472
  }
85299
85473
  return hits;
@@ -85800,6 +85974,26 @@ function collectGoogleFontFamilies(source, styles) {
85800
85974
  }
85801
85975
  return families;
85802
85976
  }
85977
+ function uniqueFontLocation(styles, families, locate) {
85978
+ const locations = [];
85979
+ for (const style of styles) {
85980
+ try {
85981
+ postcss3.parse(style.content).walkDecls(/^font-family$/i, (decl) => {
85982
+ let parent = decl.parent;
85983
+ while (parent) {
85984
+ if (parent.type === "atrule" && parent.name.toLowerCase() === "font-face") return;
85985
+ parent = parent.parent;
85986
+ }
85987
+ if (!decl.value.split(",").some((part) => families.includes(normalizeUsedFontName(part) ?? "")))
85988
+ return;
85989
+ locations.push(locate(style, decl.source?.start?.offset));
85990
+ });
85991
+ } catch {
85992
+ return {};
85993
+ }
85994
+ }
85995
+ return locations.length === 1 ? locations[0] : {};
85996
+ }
85803
85997
  function parseTiming(raw) {
85804
85998
  const startStr = readAttr(raw, "data-start");
85805
85999
  if (startStr === null) return null;
@@ -85953,7 +86147,7 @@ function collectFindings(produced, seen, filePath, into) {
85953
86147
  const dedupeKey = dedupeKeyFor(finding);
85954
86148
  if (seen.has(dedupeKey)) continue;
85955
86149
  seen.add(dedupeKey);
85956
- into.push(filePath ? { ...finding, file: filePath } : finding);
86150
+ into.push(filePath ? { ...finding, file: finding.file ?? filePath } : finding);
85957
86151
  }
85958
86152
  }
85959
86153
  async function lintHyperframeHtml(html, options = {}) {
@@ -85962,6 +86156,12 @@ async function lintHyperframeHtml(html, options = {}) {
85962
86156
  const { findings: rawFindings, timings } = await runRules(ctx, options.filePath);
85963
86157
  const locate = createSourceLocator(html);
85964
86158
  const findings = rawFindings.map((finding) => {
86159
+ if (finding.line !== void 0 || finding.code === "invalid_inline_script_syntax" || finding.code === "non_deterministic_code" || [
86160
+ "gsap_infinite_repeat",
86161
+ "gsap_repeat_ceil_overshoot",
86162
+ "gsap_repeat_floor_unclamped"
86163
+ ].includes(finding.code))
86164
+ return finding;
85965
86165
  if (finding.snippet && options.externalStyles?.some(
85966
86166
  (style) => style.content.replace(/\s+/g, " ").includes(finding.snippet.replace(/\.\.\.$/, ""))
85967
86167
  ))
@@ -86302,8 +86502,12 @@ function collectLocalStylesheets(projectDir, document2, compSrcPath) {
86302
86502
  function collectExternalStyles(projectDir, html, compSrcPath) {
86303
86503
  const styles = [];
86304
86504
  const { document: document2 } = parseHTML(html);
86305
- for (const { href, content } of collectLocalStylesheets(projectDir, document2, compSrcPath)) {
86306
- styles.push({ href, content });
86505
+ for (const { href, content, rootRelativePath } of collectLocalStylesheets(
86506
+ projectDir,
86507
+ document2,
86508
+ compSrcPath
86509
+ )) {
86510
+ styles.push({ href, content, file: join22(projectDir, rootRelativePath) });
86307
86511
  }
86308
86512
  return styles;
86309
86513
  }
@@ -86696,17 +86900,20 @@ function isSnippetFragment(html) {
86696
86900
  if (!firstTag) return false;
86697
86901
  return /\bdata-hf-snippet\b/.test(firstTag[0]);
86698
86902
  }
86699
- var import_postcss_selector_parser, COMPOSITION_ID_IN_CSS_PATTERN, TIMELINE_REGISTRY_INIT_PATTERN, TIMELINE_REGISTRY_OBJECT_LITERAL_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, WINDOW_TIMELINE_ASSIGN_PATTERN, INVALID_SCRIPT_CLOSE_PATTERN, TIMELINE_REGISTRY_KEY_PATTERN, TIMELINE_REGISTRY_OBJECT_OPEN_PATTERN, TIMELINE_REGISTRY_OBJECT_ENTRY_PATTERN, REGEX_ALLOWED_BEFORE, REGEX_ALLOWED_KEYWORDS, WORD_CHAR, CodeContext, VISIBLE_MARKUP_COMMENT_PATTERN, VISIBLE_MARKUP_COMMENT_PROTECTED_BLOCK_PATTERN, coreRules, IMAGE_SRC_EXT, VIDEO_SRC_EXT, AUDIO_SRC_EXT, SRC_KIND_NOUN, mediaRules, AUDIO_GROUP_TIMING_ATTRS, MAX_COMPOSITION_LINES, MAX_TIMED_ELEMENTS_PER_TRACK, TRACK_DENSITY_EXEMPT_TAGS, CAPTION_CUE_TOKEN, HEAVY_OVERLAY_ELEMENT_COUNT_WARN, HEAVY_OVERLAY_EXEMPT_TAGS, HEAVY_OVERLAY_CSS_PATTERN, INLINE_STYLE_DISPLAY_NONE_PATTERN, compositionRules, CLIP_MEDIA_TAGS, SCENE_BOUNDARY_EPSILON_SECONDS, UNRESOLVED_TARGET, gsapWindowsCache, CONFLICTING_TRANSLATE_PROPS, CONFLICTING_SCALE_PROPS, RELATIVE_TWEEN_VALUE, TRANSFORM_SENSITIVE_READ, TRANSFORM_INVARIANT_READ, CALLBACK_MEASUREMENT_PATTERN, NUMBER_METHODS, gsapRules, captionRules, adapterRules, TEXTURE_BASE_CLASS, TEXTURE_CLASS_PREFIX, textureRules, GENERIC_FAMILIES, fontRules, slideshowRules, INLINE_TEXT_TAGS, OPAQUE_TAGS2, NON_LAYOUT_TAGS, MEDIA_TAGS3, NODE_ATTRS, describe, structureRules, RULE_GROUPS, LINT_RULE_COUNT, LINT_RULE_GROUP_COUNTS, PROBE_TIMEOUT_MS, PROBE_CONCURRENCY, AUDIO_EXTENSIONS, MASK_IMAGE_URL_RE;
86903
+ var import_postcss_selector_parser, COMPOSITION_ID_IN_CSS_PATTERN, TIMELINE_REGISTRY_INIT_PATTERN, TIMELINE_REGISTRY_OBJECT_LITERAL_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, WINDOW_TIMELINE_ASSIGN_PATTERN, INVALID_SCRIPT_CLOSE_PATTERN, TIMELINE_REGISTRY_KEY_PATTERN, TIMELINE_REGISTRY_OBJECT_OPEN_PATTERN, TIMELINE_REGISTRY_OBJECT_ENTRY_PATTERN, REGEX_ALLOWED_BEFORE, REGEX_ALLOWED_KEYWORDS, WORD_CHAR, CodeContext, VISIBLE_MARKUP_COMMENT_PATTERN, VISIBLE_MARKUP_COMMENT_PROTECTED_BLOCK_PATTERN, coreRules, IMAGE_SRC_EXT, VIDEO_SRC_EXT, AUDIO_SRC_EXT, SRC_KIND_NOUN, mediaRules, AUDIO_GROUP_TIMING_ATTRS, callIndexes, MAX_COMPOSITION_LINES, MAX_TIMED_ELEMENTS_PER_TRACK, TRACK_DENSITY_EXEMPT_TAGS, CAPTION_CUE_TOKEN, HEAVY_OVERLAY_ELEMENT_COUNT_WARN, HEAVY_OVERLAY_EXEMPT_TAGS, HEAVY_OVERLAY_CSS_PATTERN, INLINE_STYLE_DISPLAY_NONE_PATTERN, compositionRules, CLIP_MEDIA_TAGS, SCENE_BOUNDARY_EPSILON_SECONDS, UNRESOLVED_TARGET, gsapWindowsCache, CONFLICTING_TRANSLATE_PROPS, CONFLICTING_SCALE_PROPS, RELATIVE_TWEEN_VALUE, TRANSFORM_SENSITIVE_READ, TRANSFORM_INVARIANT_READ, CALLBACK_MEASUREMENT_PATTERN, NUMBER_METHODS, gsapRules, captionRules, adapterRules, TEXTURE_BASE_CLASS, TEXTURE_CLASS_PREFIX, textureRules, GENERIC_FAMILIES, fontRules, slideshowRules, INLINE_TEXT_TAGS, OPAQUE_TAGS2, NON_LAYOUT_TAGS, MEDIA_TAGS3, NODE_ATTRS, describe, structureRules, RULE_GROUPS, LINT_RULE_COUNT, LINT_RULE_GROUP_COUNTS, PROBE_TIMEOUT_MS, PROBE_CONCURRENCY, AUDIO_EXTENSIONS, MASK_IMAGE_URL_RE;
86700
86904
  var init_dist4 = __esm({
86701
86905
  "../lint/dist/index.js"() {
86702
86906
  "use strict";
86703
86907
  init_esm6();
86704
86908
  init_esm6();
86909
+ init_acorn();
86705
86910
  import_postcss_selector_parser = __toESM(require_dist(), 1);
86706
- init_dist2();
86911
+ init_composition();
86707
86912
  init_colorGradingContract();
86708
- init_dist2();
86913
+ init_composition();
86709
86914
  init_esm10();
86915
+ init_acorn();
86916
+ init_walk();
86710
86917
  init_composition();
86711
86918
  init_compositionContract();
86712
86919
  init_compositionDuration();
@@ -86936,7 +87143,7 @@ var init_dist4 = __esm({
86936
87143
  return findings;
86937
87144
  },
86938
87145
  // CSS selector safety
86939
- ({ styles }) => {
87146
+ ({ styles, locate }) => {
86940
87147
  const findings = [];
86941
87148
  const reportedRepeatedIds = /* @__PURE__ */ new Set();
86942
87149
  const reportedHiddenStyleSelectors = /* @__PURE__ */ new Set();
@@ -86946,6 +87153,10 @@ var init_dist4 = __esm({
86946
87153
  root = postcss2.parse(style.content);
86947
87154
  } catch (error) {
86948
87155
  findings.push({
87156
+ ...locate(
87157
+ style,
87158
+ error instanceof postcss2.CssSyntaxError ? cssErrorOffset(style.content, error) : void 0
87159
+ ),
86949
87160
  code: "css_parse_error",
86950
87161
  severity: "error",
86951
87162
  message: `CSS parse error: ${error instanceof Error ? error.message : "unknown"}`
@@ -87011,7 +87222,7 @@ var init_dist4 = __esm({
87011
87222
  ];
87012
87223
  },
87013
87224
  // invalid_inline_script_syntax (JS parse error)
87014
- ({ scripts }) => {
87225
+ ({ scripts, locate }) => {
87015
87226
  const findings = [];
87016
87227
  for (const script of scripts) {
87017
87228
  const attrs2 = script.attrs || "";
@@ -87022,9 +87233,10 @@ var init_dist4 = __esm({
87022
87233
  const syntaxError = getInlineScriptSyntaxError(script.content);
87023
87234
  if (!syntaxError) continue;
87024
87235
  findings.push({
87236
+ ...locate(script, syntaxError.offset),
87025
87237
  code: "invalid_inline_script_syntax",
87026
87238
  severity: "error",
87027
- message: `Inline script has invalid syntax: ${syntaxError}`,
87239
+ message: `Inline script has invalid syntax: ${syntaxError.message}`,
87028
87240
  fixHint: "Fix the inline script syntax before render verification.",
87029
87241
  snippet: truncateSnippet(script.content)
87030
87242
  });
@@ -87090,7 +87302,7 @@ var init_dist4 = __esm({
87090
87302
  return findings;
87091
87303
  },
87092
87304
  // non_deterministic_code
87093
- ({ scripts }) => {
87305
+ ({ scripts, locate }) => {
87094
87306
  const findings = [];
87095
87307
  const patterns = [
87096
87308
  {
@@ -87141,8 +87353,10 @@ var init_dist4 = __esm({
87141
87353
  const withoutComments = stripJsComments(script.content);
87142
87354
  const executable = stripStringLiterals(withoutComments);
87143
87355
  for (const { pattern, label: label2, hint: hint2, scansStrings } of patterns) {
87144
- if (pattern.test(scansStrings ? withoutComments : executable)) {
87356
+ const match = pattern.exec(scansStrings ? withoutComments : executable);
87357
+ if (match) {
87145
87358
  findings.push({
87359
+ ...locate(script, match.index),
87146
87360
  code: "non_deterministic_code",
87147
87361
  severity: "error",
87148
87362
  message: `Script contains \`${label2}\` which produces non-deterministic output. Renders may differ between frames or runs.`,
@@ -87573,6 +87787,7 @@ var init_dist4 = __esm({
87573
87787
  findAudioGroupCarveAttrFindings
87574
87788
  ];
87575
87789
  AUDIO_GROUP_TIMING_ATTRS = ["data-start", "data-duration", "data-track-index"];
87790
+ callIndexes = /* @__PURE__ */ new WeakMap();
87576
87791
  MAX_COMPOSITION_LINES = 300;
87577
87792
  MAX_TIMED_ELEMENTS_PER_TRACK = 3;
87578
87793
  TRACK_DENSITY_EXEMPT_TAGS = /* @__PURE__ */ new Set(["audio", "script", "style", "video"]);
@@ -88705,19 +88920,20 @@ ${right.raw}`)
88705
88920
  return findings;
88706
88921
  },
88707
88922
  // gsap_infinite_repeat
88708
- ({ scripts, rootTag }) => {
88923
+ ({ scripts, rootTag, locate }) => {
88709
88924
  const findings = [];
88710
88925
  const declaredDuration = Number.parseFloat(
88711
88926
  rootTag ? readAttr(rootTag.raw, "data-duration") ?? "" : ""
88712
88927
  );
88713
88928
  const hasFiniteCompositionWindow = Number.isFinite(declaredDuration) && declaredDuration > 0;
88714
88929
  const pattern = /repeat\s*:\s*-1(?!\d)/g;
88715
- for (const { snippet } of scanScriptsForRegexMatches(scripts, pattern, {
88930
+ for (const { snippet, match, script } of scanScriptsForRegexMatches(scripts, pattern, {
88716
88931
  stripComments: true,
88717
88932
  contextBefore: 60,
88718
88933
  contextAfter: 60
88719
88934
  })) {
88720
88935
  findings.push({
88936
+ ...locate(script, containingCallOffset(script, match.index)),
88721
88937
  code: "gsap_infinite_repeat",
88722
88938
  severity: hasFiniteCompositionWindow ? "warning" : "error",
88723
88939
  message: hasFiniteCompositionWindow ? `GSAP tween uses \`repeat: -1\` (infinite), but the composition declares a finite ${declaredDuration}s window. HyperFrames clips deterministic seeking and export to that explicit duration.` : "GSAP tween uses `repeat: -1` (infinite) without a finite composition `data-duration`. The timeline can report an unbounded duration and make render planning fail.",
@@ -88728,15 +88944,16 @@ ${right.raw}`)
88728
88944
  return findings;
88729
88945
  },
88730
88946
  // gsap_repeat_ceil_overshoot
88731
- ({ scripts }) => {
88947
+ ({ scripts, locate }) => {
88732
88948
  const findings = [];
88733
88949
  const pattern = /repeat\s*:\s*Math\.ceil\s*\([^)]+\)\s*-\s*1/g;
88734
- for (const { snippet } of scanScriptsForRegexMatches(scripts, pattern, {
88950
+ for (const { snippet, match, script } of scanScriptsForRegexMatches(scripts, pattern, {
88735
88951
  stripComments: false,
88736
88952
  contextBefore: 40,
88737
88953
  contextAfter: 40
88738
88954
  })) {
88739
88955
  findings.push({
88956
+ ...locate(script, containingCallOffset(script, match.index)),
88740
88957
  code: "gsap_repeat_ceil_overshoot",
88741
88958
  severity: "warning",
88742
88959
  message: "GSAP repeat calculation uses `Math.ceil` which can overshoot the composition duration. For example, Math.ceil(10.5 / 2) - 1 = 5 repeats \u2192 6 cycles \xD7 2s = 12s, exceeding 10.5s.",
@@ -88747,15 +88964,16 @@ ${right.raw}`)
88747
88964
  return findings;
88748
88965
  },
88749
88966
  // gsap_repeat_floor_unclamped
88750
- ({ scripts }) => {
88967
+ ({ scripts, locate }) => {
88751
88968
  const findings = [];
88752
88969
  const pattern = /repeat\s*:\s*Math\.floor\s*\([^)]+\)\s*-\s*1/g;
88753
- for (const { snippet } of scanScriptsForRegexMatches(scripts, pattern, {
88970
+ for (const { snippet, match, script } of scanScriptsForRegexMatches(scripts, pattern, {
88754
88971
  stripComments: false,
88755
88972
  contextBefore: 40,
88756
88973
  contextAfter: 40
88757
88974
  })) {
88758
88975
  findings.push({
88976
+ ...locate(script, containingCallOffset(script, match.index)),
88759
88977
  code: "gsap_repeat_floor_unclamped",
88760
88978
  severity: "warning",
88761
88979
  message: "GSAP repeat calculation can evaluate to -1 when the composition is shorter than one cycle, which GSAP interprets as an infinite repeat.",
@@ -88766,7 +88984,7 @@ ${right.raw}`)
88766
88984
  return findings;
88767
88985
  },
88768
88986
  // gsap_timeline_not_registered
88769
- ({ scripts, rawSource, options }) => {
88987
+ ({ scripts, rawSource, options, locate }) => {
88770
88988
  const findings = [];
88771
88989
  const canInheritFromHost = options.isSubComposition || rawSource.trimStart().toLowerCase().startsWith("<template");
88772
88990
  for (const script of scripts) {
@@ -88775,6 +88993,7 @@ ${right.raw}`)
88775
88993
  const hasRegistration = WINDOW_TIMELINE_ASSIGN_PATTERN.test(content) || TIMELINE_REGISTRY_OBJECT_LITERAL_PATTERN.test(content);
88776
88994
  if (hasRegistration || canInheritFromHost) continue;
88777
88995
  findings.push({
88996
+ ...locate(script, gsapCallOffset(script, "timeline")),
88778
88997
  code: "gsap_timeline_not_registered",
88779
88998
  severity: "error",
88780
88999
  message: "GSAP timeline is created but never registered in window.__timelines. The runtime discovers timelines from this registry \u2014 without registration, animations will not play during preview or render.",
@@ -89762,7 +89981,7 @@ ${other.raw}`)
89762
89981
  ];
89763
89982
  },
89764
89983
  // font_family_without_font_face
89765
- ({ styles, source, rawSource, options }) => {
89984
+ ({ styles, source, rawSource, options, locate }) => {
89766
89985
  if (isRegistrySourceFile(options.filePath) || isRegistryInstalledFile(rawSource)) return [];
89767
89986
  const findings = [];
89768
89987
  const declared = extractFontFaceFamilies(styles);
@@ -89773,6 +89992,7 @@ ${other.raw}`)
89773
89992
  );
89774
89993
  if (undeclared.length === 0) return findings;
89775
89994
  findings.push({
89995
+ ...uniqueFontLocation(styles, undeclared, locate),
89776
89996
  code: "font_family_without_font_face",
89777
89997
  severity: "error",
89778
89998
  message: `Font ${undeclared.length === 1 ? "family" : "families"} used without @font-face declaration: ${undeclared.join(", ")}. These are not in the auto-resolved font list, so the renderer cannot supply them automatically. Text will fall back to a generic font, producing incorrect typography in the video.`,
@@ -114226,7 +114446,7 @@ var init_hfIds = __esm({
114226
114446
  });
114227
114447
 
114228
114448
  // ../studio-server/dist/chunk-KFPWE4Q7.js
114229
- import postcss3 from "postcss";
114449
+ import postcss4 from "postcss";
114230
114450
  function parseStyleDecls(style) {
114231
114451
  const props = /* @__PURE__ */ new Map();
114232
114452
  const order = [];
@@ -114296,7 +114516,7 @@ function duplicateCssRulesForId(document2, originalId, newId) {
114296
114516
  const css = styleEl.textContent ?? "";
114297
114517
  let root;
114298
114518
  try {
114299
- root = postcss3.parse(css);
114519
+ root = postcss4.parse(css);
114300
114520
  } catch {
114301
114521
  continue;
114302
114522
  }
@@ -137844,7 +138064,7 @@ import { createHash as createHash15 } from "crypto";
137844
138064
  import { existsSync as existsSync50, mkdirSync as mkdirSync24, mkdtempSync as mkdtempSync12, readFileSync as readFileSync35, writeFileSync as writeFileSync19 } from "fs";
137845
138065
  import { homedir as homedir13, tmpdir as tmpdir8 } from "os";
137846
138066
  import { join as join56 } from "path";
137847
- import postcss4 from "postcss";
138067
+ import postcss5 from "postcss";
137848
138068
  function parseFontFamilyValue(value) {
137849
138069
  const pieces = [];
137850
138070
  let start = 0;
@@ -137887,7 +138107,7 @@ function systemPrimaryReplacement(value, deterministicPrimary) {
137887
138107
  }
137888
138108
  function parseCssRoot(css) {
137889
138109
  try {
137890
- return postcss4.parse(css);
138110
+ return postcss5.parse(css);
137891
138111
  } catch {
137892
138112
  return null;
137893
138113
  }
@@ -168487,7 +168707,7 @@ function inlineComputedTimelines3(ast, timelineVar, resolve84) {
168487
168707
  return expandStatements3([stmt], ctx);
168488
168708
  });
168489
168709
  }
168490
- function parseProgram4(script) {
168710
+ function parseProgram5(script) {
168491
168711
  try {
168492
168712
  return parse3(script, {
168493
168713
  ecmaVersion: "latest",
@@ -169613,7 +169833,7 @@ function assignStableIds5(anims) {
169613
169833
  }
169614
169834
  function parseGsapScriptAcorn3(script) {
169615
169835
  try {
169616
- const ast = parseProgram4(script);
169836
+ const ast = parseProgram5(script);
169617
169837
  const scope = collectScopeBindings5(ast);
169618
169838
  const detection = findTimelineVar5(ast, scope);
169619
169839
  const ref2 = detection.ref ?? { kind: "identifier", name: "tl" };
@@ -190174,37 +190394,355 @@ var init_assetSnippet = __esm({
190174
190394
  });
190175
190395
 
190176
190396
  // ../core/dist/figma/sanitizeSvg.js
190177
- function replaceStable(input2, pattern, replacement) {
190178
- let out = input2;
190179
- let prev;
190180
- do {
190181
- prev = out;
190182
- out = out.replace(pattern, replacement);
190183
- } while (out !== prev);
190184
- return out;
190397
+ function localName(name) {
190398
+ const i = name.lastIndexOf(":");
190399
+ return i === -1 ? name : name.slice(i + 1);
190185
190400
  }
190186
- function sanitizeSvg(svg) {
190187
- let out = svg;
190188
- out = replaceStable(out, /<script\b[\s\S]*?<\/script\b[^>]*>/gi, "");
190189
- out = replaceStable(out, /<script\b[^>]*\/>/gi, "");
190190
- out = replaceStable(out, /<style\b[\s\S]*?<\/style\b[^>]*>/gi, "");
190191
- out = replaceStable(out, /<foreignObject\b[\s\S]*?<\/foreignObject\b[^>]*>/gi, "");
190192
- out = replaceStable(out, /<foreignObject\b[^>]*\/>/gi, "");
190193
- out = out.replace(/<\/(?:script|style|foreignObject)\b[^>]*>/gi, "");
190194
- out = replaceStable(out, /\son[a-z]+\s*=\s*"[^"]*"/gi, "");
190195
- out = replaceStable(out, /\son[a-z]+\s*=\s*'[^']*'/gi, "");
190196
- out = replaceStable(out, /\son[a-z]+\s*=\s*[^\s>'"]+/gi, "");
190197
- out = out.replace(/\s(href|xlink:href)\s*=\s*"([^"]*)"/gi, (m, attr2, value) => isAllowedHref(value) ? m : "");
190198
- out = out.replace(/\s(href|xlink:href)\s*=\s*'([^']*)'/gi, (m, attr2, value) => isAllowedHref(value) ? m : "");
190199
- return out;
190401
+ function isAllowedHref(value, tagLocalName) {
190402
+ const v2 = value.trim();
190403
+ if (v2.startsWith("#"))
190404
+ return true;
190405
+ return /^data:image\//i.test(v2) && tagLocalName.toLowerCase() !== "a";
190406
+ }
190407
+ function decodeCssEscape(hex, char) {
190408
+ if (hex === void 0)
190409
+ return char ?? "";
190410
+ const cp = parseInt(hex, 16);
190411
+ const invalid = cp === 0 || cp > 1114111 || cp >= 55296 && cp <= 57343;
190412
+ return invalid ? "\uFFFD" : String.fromCodePoint(cp);
190413
+ }
190414
+ function canonicalCss(text2) {
190415
+ return text2.replace(/\\([0-9a-f]{1,6})[ \t\n\r\f]?|\\([\s\S])/gi, (_, hex, char) => decodeCssEscape(hex, char)).toLowerCase();
190416
+ }
190417
+ function isCssNameChar(c3) {
190418
+ return c3 !== void 0 && /[-\w]/.test(c3);
190419
+ }
190420
+ function functionNameBefore(css, paren) {
190421
+ let start = paren;
190422
+ while (isCssNameChar(css[start - 1]))
190423
+ start--;
190424
+ return css.slice(start, paren);
190425
+ }
190426
+ function everyFunctionIsSafe(css) {
190427
+ for (let at4 = css.indexOf("("); at4 !== -1; at4 = css.indexOf("(", at4 + 1)) {
190428
+ if (!SAFE_CSS_FUNCTIONS.has(functionNameBefore(css, at4)))
190429
+ return false;
190430
+ }
190431
+ return true;
190200
190432
  }
190201
- function isAllowedHref(value) {
190202
- const v2 = value.trim().toLowerCase();
190203
- return v2.startsWith("#") || v2.startsWith("data:image/");
190433
+ function isLocalUrlValue(raw) {
190434
+ const value = raw.trim().replace(/^['"]/, "");
190435
+ return value.startsWith("#") && !value.includes("(");
190436
+ }
190437
+ function everyUrlIsLocalFragment(css) {
190438
+ for (let at4 = css.indexOf("url("); at4 !== -1; ) {
190439
+ const close = css.indexOf(")", at4 + 4);
190440
+ if (close === -1 || !isLocalUrlValue(css.slice(at4 + 4, close)))
190441
+ return false;
190442
+ at4 = css.indexOf("url(", close + 1);
190443
+ }
190444
+ return true;
190445
+ }
190446
+ function isSafeCss(text2) {
190447
+ const css = canonicalCss(text2);
190448
+ return !css.includes("@import") && everyFunctionIsSafe(css) && everyUrlIsLocalFragment(css);
190449
+ }
190450
+ function isXmlnsAttribute(name) {
190451
+ return name === "xmlns" || name.startsWith("xmlns:");
190452
+ }
190453
+ function isKnownAttribute(local) {
190454
+ return SAFE_ATTRIBUTES.has(local) || local.startsWith("aria-") || local.startsWith("data-");
190455
+ }
190456
+ function isSafeAttribute(tagLocalName, name, value) {
190457
+ if (isXmlnsAttribute(name))
190458
+ return true;
190459
+ const local = localName(name);
190460
+ if (local === "href")
190461
+ return isAllowedHref(value, tagLocalName);
190462
+ return isKnownAttribute(local) && isSafeCss(value);
190463
+ }
190464
+ function sanitizeSvg(svg) {
190465
+ const doc = new DOMParser2().parseFromString(svg, "image/svg+xml");
190466
+ const root = doc.documentElement;
190467
+ if (!root)
190468
+ return "";
190469
+ for (const el of [...doc.querySelectorAll("*")]) {
190470
+ if (!el.isConnected)
190471
+ continue;
190472
+ if (!SAFE_ELEMENTS.has(el.tagName)) {
190473
+ el.remove();
190474
+ continue;
190475
+ }
190476
+ if (el.tagName === "style" && !isSafeCss(el.textContent)) {
190477
+ el.remove();
190478
+ continue;
190479
+ }
190480
+ for (const attr2 of [...el.attributes]) {
190481
+ if (!isSafeAttribute(el.tagName, attr2.name, attr2.value))
190482
+ el.removeAttribute(attr2.name);
190483
+ }
190484
+ }
190485
+ return root.isConnected ? root.outerHTML : "";
190204
190486
  }
190487
+ var SAFE_ELEMENTS, SAFE_ATTRIBUTES, SAFE_CSS_FUNCTIONS;
190205
190488
  var init_sanitizeSvg = __esm({
190206
190489
  "../core/dist/figma/sanitizeSvg.js"() {
190207
190490
  "use strict";
190491
+ init_esm10();
190492
+ SAFE_ELEMENTS = /* @__PURE__ */ new Set([
190493
+ "svg",
190494
+ "g",
190495
+ "defs",
190496
+ "symbol",
190497
+ "use",
190498
+ "image",
190499
+ "a",
190500
+ "switch",
190501
+ "rect",
190502
+ "circle",
190503
+ "ellipse",
190504
+ "line",
190505
+ "polyline",
190506
+ "polygon",
190507
+ "path",
190508
+ "text",
190509
+ "tspan",
190510
+ "textPath",
190511
+ "linearGradient",
190512
+ "radialGradient",
190513
+ "stop",
190514
+ "pattern",
190515
+ "mask",
190516
+ "clipPath",
190517
+ "marker",
190518
+ "filter",
190519
+ "feBlend",
190520
+ "feColorMatrix",
190521
+ "feComponentTransfer",
190522
+ "feComposite",
190523
+ "feConvolveMatrix",
190524
+ "feDiffuseLighting",
190525
+ "feDisplacementMap",
190526
+ "feDistantLight",
190527
+ "feDropShadow",
190528
+ "feFlood",
190529
+ "feFuncA",
190530
+ "feFuncB",
190531
+ "feFuncG",
190532
+ "feFuncR",
190533
+ "feGaussianBlur",
190534
+ "feImage",
190535
+ "feMerge",
190536
+ "feMergeNode",
190537
+ "feMorphology",
190538
+ "feOffset",
190539
+ "fePointLight",
190540
+ "feSpecularLighting",
190541
+ "feSpotLight",
190542
+ "feTile",
190543
+ "feTurbulence",
190544
+ "title",
190545
+ "desc",
190546
+ "metadata",
190547
+ "style"
190548
+ ]);
190549
+ SAFE_ATTRIBUTES = /* @__PURE__ */ new Set([
190550
+ "id",
190551
+ "class",
190552
+ "style",
190553
+ "transform",
190554
+ "viewBox",
190555
+ "width",
190556
+ "height",
190557
+ "x",
190558
+ "y",
190559
+ "x1",
190560
+ "y1",
190561
+ "x2",
190562
+ "y2",
190563
+ "cx",
190564
+ "cy",
190565
+ "r",
190566
+ "rx",
190567
+ "ry",
190568
+ "fx",
190569
+ "fy",
190570
+ "points",
190571
+ "d",
190572
+ "offset",
190573
+ "enable-background",
190574
+ "gradientUnits",
190575
+ "gradientTransform",
190576
+ "spreadMethod",
190577
+ "patternUnits",
190578
+ "patternContentUnits",
190579
+ "patternTransform",
190580
+ "maskUnits",
190581
+ "maskContentUnits",
190582
+ "clipPathUnits",
190583
+ "clip-rule",
190584
+ "filterUnits",
190585
+ "primitiveUnits",
190586
+ "preserveAspectRatio",
190587
+ "space",
190588
+ "lang",
190589
+ "role",
190590
+ "focusable",
190591
+ "tabindex",
190592
+ "version",
190593
+ "baseProfile",
190594
+ "fill",
190595
+ "fill-opacity",
190596
+ "fill-rule",
190597
+ "stroke",
190598
+ "stroke-width",
190599
+ "stroke-opacity",
190600
+ "stroke-linecap",
190601
+ "stroke-linejoin",
190602
+ "stroke-miterlimit",
190603
+ "stroke-dasharray",
190604
+ "stroke-dashoffset",
190605
+ "opacity",
190606
+ "color",
190607
+ "stop-color",
190608
+ "stop-opacity",
190609
+ "font-family",
190610
+ "font-size",
190611
+ "font-weight",
190612
+ "font-style",
190613
+ "text-anchor",
190614
+ "dominant-baseline",
190615
+ "alignment-baseline",
190616
+ "letter-spacing",
190617
+ "word-spacing",
190618
+ "text-decoration",
190619
+ "clip-path",
190620
+ "mask",
190621
+ "filter",
190622
+ "marker-start",
190623
+ "marker-mid",
190624
+ "marker-end",
190625
+ "marker",
190626
+ "cursor",
190627
+ "pointer-events",
190628
+ "visibility",
190629
+ "display",
190630
+ "overflow",
190631
+ "vector-effect",
190632
+ "paint-order",
190633
+ "color-interpolation",
190634
+ "color-interpolation-filters",
190635
+ "isolation",
190636
+ "mix-blend-mode",
190637
+ "startOffset",
190638
+ "method",
190639
+ "spacing",
190640
+ "side",
190641
+ "textLength",
190642
+ "lengthAdjust",
190643
+ "in",
190644
+ "in2",
190645
+ "result",
190646
+ "mode",
190647
+ "type",
190648
+ "values",
190649
+ "dx",
190650
+ "dy",
190651
+ "stdDeviation",
190652
+ "edgeMode",
190653
+ "k1",
190654
+ "k2",
190655
+ "k3",
190656
+ "k4",
190657
+ "operator",
190658
+ "radius",
190659
+ "scale",
190660
+ "xChannelSelector",
190661
+ "yChannelSelector",
190662
+ "baseFrequency",
190663
+ "numOctaves",
190664
+ "seed",
190665
+ "stitchTiles",
190666
+ "tableValues",
190667
+ "slope",
190668
+ "intercept",
190669
+ "amplitude",
190670
+ "exponent",
190671
+ "order",
190672
+ "divisor",
190673
+ "bias",
190674
+ "targetX",
190675
+ "targetY",
190676
+ "kernelMatrix",
190677
+ "preserveAlpha",
190678
+ "kernelUnitLength",
190679
+ "surfaceScale",
190680
+ "diffuseConstant",
190681
+ "specularConstant",
190682
+ "specularExponent",
190683
+ "lighting-color",
190684
+ "flood-color",
190685
+ "flood-opacity",
190686
+ "azimuth",
190687
+ "elevation",
190688
+ "pointsAtX",
190689
+ "pointsAtY",
190690
+ "pointsAtZ",
190691
+ "limitingConeAngle"
190692
+ ]);
190693
+ SAFE_CSS_FUNCTIONS = /* @__PURE__ */ new Set([
190694
+ "",
190695
+ "url",
190696
+ "rgb",
190697
+ "rgba",
190698
+ "hsl",
190699
+ "hsla",
190700
+ "hwb",
190701
+ "lab",
190702
+ "lch",
190703
+ "oklab",
190704
+ "oklch",
190705
+ "color",
190706
+ "color-mix",
190707
+ "var",
190708
+ "calc",
190709
+ "min",
190710
+ "max",
190711
+ "clamp",
190712
+ "matrix",
190713
+ "matrix3d",
190714
+ "translate",
190715
+ "translatex",
190716
+ "translatey",
190717
+ "translatez",
190718
+ "translate3d",
190719
+ "scale",
190720
+ "scalex",
190721
+ "scaley",
190722
+ "scalez",
190723
+ "scale3d",
190724
+ "rotate",
190725
+ "rotatex",
190726
+ "rotatey",
190727
+ "rotatez",
190728
+ "rotate3d",
190729
+ "skew",
190730
+ "skewx",
190731
+ "skewy",
190732
+ "perspective",
190733
+ "cubic-bezier",
190734
+ "steps",
190735
+ "blur",
190736
+ "brightness",
190737
+ "contrast",
190738
+ "drop-shadow",
190739
+ "grayscale",
190740
+ "hue-rotate",
190741
+ "invert",
190742
+ "opacity",
190743
+ "saturate",
190744
+ "sepia"
190745
+ ]);
190208
190746
  }
190209
190747
  });
190210
190748