hyperframes 0.8.66 → 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 +1322 -667
- package/dist/fontLocalizeCli.js +407 -133
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/renderSetupWorker.js +10625 -41829
- package/dist/skills/media-use/SKILL.md +10 -10
- package/dist/skills/media-use/references/meta.md +1 -1
- package/dist/skills/media-use/references/resolve.md +1 -1
- package/dist/skills/media-use/references/setup-providers.md +1 -1
- package/dist/skills/media-use/scripts/lib/coverage.test.mjs +5 -1
- package/dist/skills/media-use/scripts/lib/freeze.mjs +34 -24
- package/dist/skills/media-use/scripts/lib/freeze.test.mjs +93 -1
- package/dist/skills/media-use/scripts/lib/logo-provider.mjs +110 -89
- package/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +204 -60
- package/dist/skills/media-use/scripts/lib/media-fetch.mjs +14 -0
- package/dist/skills/media-use/scripts/lib/media-fetch.test.mjs +29 -1
- package/dist/skills/media-use/scripts/lib/registry.mjs +6 -12
- package/dist/skills/media-use/scripts/lib/registry.test.mjs +1 -1
- package/dist/skills/media-use/scripts/lib/svg-sanitize.mjs +21 -0
- package/dist/studio/assets/{hyperframes-player-BRlwG-p9.js → hyperframes-player-RYzFlKye.js} +1 -1
- package/dist/studio/assets/index-BBOktYKC.css +1 -0
- package/dist/studio/assets/{index-D6Jy-2Zs.js → index-C8-wAsq3.js} +1 -1
- package/dist/studio/assets/{index-DJl2JKQj.js → index-CsnhFJIv.js} +1 -1
- package/dist/studio/assets/{index-BzGcmMBS.js → index-P0Rwat37.js} +200 -200
- package/dist/studio/index.css +147 -16
- package/dist/studio/index.css.map +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +4436 -4193
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/styles.css +1 -1
- package/package.json +1 -1
- package/dist/studio/assets/index-BnsYeuxA.css +0 -1
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.
|
|
53
|
+
VERSION = true ? "0.8.68" : "0.0.0-dev";
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
@@ -369,10 +369,10 @@ function findSubCommandIndex(rawArgs, argsDef) {
|
|
|
369
369
|
}
|
|
370
370
|
function _isValueFlag(flag, argsDef) {
|
|
371
371
|
const name = flag.replace(/^-{1,2}/, "");
|
|
372
|
-
const
|
|
372
|
+
const normalized3 = camelCase(name);
|
|
373
373
|
for (const [key2, def] of Object.entries(argsDef)) {
|
|
374
374
|
if (def.type !== "string" && def.type !== "enum") continue;
|
|
375
|
-
if (
|
|
375
|
+
if (normalized3 === camelCase(key2)) return true;
|
|
376
376
|
if ((Array.isArray(def.alias) ? def.alias : def.alias ? [def.alias] : []).includes(name)) return true;
|
|
377
377
|
}
|
|
378
378
|
return false;
|
|
@@ -628,10 +628,10 @@ function resolveSlideshow(manifest, scenes) {
|
|
|
628
628
|
return { resolved: { slides, sequences }, errors };
|
|
629
629
|
}
|
|
630
630
|
function isSceneLikeCompositionId(compositionId) {
|
|
631
|
-
const
|
|
632
|
-
if (!
|
|
633
|
-
if (
|
|
634
|
-
if (
|
|
631
|
+
const normalized3 = compositionId.trim().toLowerCase();
|
|
632
|
+
if (!normalized3 || normalized3 === "main") return false;
|
|
633
|
+
if (normalized3.includes("caption")) return false;
|
|
634
|
+
if (normalized3.includes("ambient")) return false;
|
|
635
635
|
return true;
|
|
636
636
|
}
|
|
637
637
|
var SLIDESHOW_MANIFEST_VERSION, SLIDESHOW_ISLAND_TYPE;
|
|
@@ -4923,7 +4923,7 @@ var require_util = __commonJS({
|
|
|
4923
4923
|
exports.isAbsolute = function(aPath) {
|
|
4924
4924
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
4925
4925
|
};
|
|
4926
|
-
function
|
|
4926
|
+
function relative39(aRoot, aPath) {
|
|
4927
4927
|
if (aRoot === "") {
|
|
4928
4928
|
aRoot = ".";
|
|
4929
4929
|
}
|
|
@@ -4942,7 +4942,7 @@ var require_util = __commonJS({
|
|
|
4942
4942
|
}
|
|
4943
4943
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
4944
4944
|
}
|
|
4945
|
-
exports.relative =
|
|
4945
|
+
exports.relative = relative39;
|
|
4946
4946
|
var supportsNullProto = (function() {
|
|
4947
4947
|
var obj = /* @__PURE__ */ Object.create(null);
|
|
4948
4948
|
return !("__proto__" in obj);
|
|
@@ -15818,9 +15818,9 @@ var require_printer = __commonJS({
|
|
|
15818
15818
|
}
|
|
15819
15819
|
case "ForStatement": {
|
|
15820
15820
|
var init = path.call(print2, "init");
|
|
15821
|
-
var
|
|
15821
|
+
var sep19 = init.length > 1 ? ";\n" : "; ";
|
|
15822
15822
|
var forParen = "for (";
|
|
15823
|
-
var indented = (0, lines_1.fromString)(
|
|
15823
|
+
var indented = (0, lines_1.fromString)(sep19).join([init, path.call(print2, "test"), path.call(print2, "update")]).indentTail(forParen.length);
|
|
15824
15824
|
var head = (0, lines_1.concat)([forParen, indented, ")"]);
|
|
15825
15825
|
var clause = adjustClause(path.call(print2, "body"), options);
|
|
15826
15826
|
parts.push(head);
|
|
@@ -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 { '${
|
|
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 '${
|
|
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:
|
|
19095
|
+
memberName: memberName3,
|
|
19096
19096
|
enumName
|
|
19097
|
-
}) => `Boolean enum members need to be initialized. Use either \`${
|
|
19097
|
+
}) => `Boolean enum members need to be initialized. Use either \`${memberName3} = true,\` or \`${memberName3} = false,\` in enum \`${enumName}\`.`,
|
|
19098
19098
|
EnumDuplicateMemberName: ({
|
|
19099
|
-
memberName:
|
|
19099
|
+
memberName: memberName3,
|
|
19100
19100
|
enumName
|
|
19101
|
-
}) => `Enum member names need to be unique, but the name \`${
|
|
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:
|
|
19114
|
+
memberName: memberName3,
|
|
19115
19115
|
explicitType
|
|
19116
|
-
}) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${
|
|
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:
|
|
19120
|
-
}) => `Symbol enum members cannot be initialized. Use \`${
|
|
19119
|
+
memberName: memberName3
|
|
19120
|
+
}) => `Symbol enum members cannot be initialized. Use \`${memberName3},\` in enum \`${enumName}\`.`,
|
|
19121
19121
|
EnumInvalidMemberInitializerUnknownType: ({
|
|
19122
19122
|
enumName,
|
|
19123
|
-
memberName:
|
|
19124
|
-
}) => `The enum member initializer for \`${
|
|
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:
|
|
19127
|
+
memberName: memberName3,
|
|
19128
19128
|
suggestion
|
|
19129
|
-
}) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${
|
|
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:
|
|
19133
|
-
}) => `Number enum members need to be initialized, e.g. \`${
|
|
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:
|
|
21130
|
+
memberName: memberName3
|
|
21131
21131
|
}) {
|
|
21132
21132
|
this.raise(FlowErrors.EnumBooleanMemberNotInitialized, loc, {
|
|
21133
|
-
memberName:
|
|
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
|
|
21246
|
-
if (
|
|
21245
|
+
const memberName3 = id.name;
|
|
21246
|
+
if (memberName3 === "") {
|
|
21247
21247
|
continue;
|
|
21248
21248
|
}
|
|
21249
|
-
if (/^[a-z]/.test(
|
|
21249
|
+
if (/^[a-z]/.test(memberName3)) {
|
|
21250
21250
|
this.raise(FlowErrors.EnumInvalidMemberName, id, {
|
|
21251
|
-
memberName:
|
|
21252
|
-
suggestion:
|
|
21251
|
+
memberName: memberName3,
|
|
21252
|
+
suggestion: memberName3[0].toUpperCase() + memberName3.slice(1),
|
|
21253
21253
|
enumName
|
|
21254
21254
|
});
|
|
21255
21255
|
}
|
|
21256
|
-
if (seenNames.has(
|
|
21256
|
+
if (seenNames.has(memberName3)) {
|
|
21257
21257
|
this.raise(FlowErrors.EnumDuplicateMemberName, id, {
|
|
21258
|
-
memberName:
|
|
21258
|
+
memberName: memberName3,
|
|
21259
21259
|
enumName
|
|
21260
21260
|
});
|
|
21261
21261
|
}
|
|
21262
|
-
seenNames.add(
|
|
21262
|
+
seenNames.add(memberName3);
|
|
21263
21263
|
const context = {
|
|
21264
21264
|
enumName,
|
|
21265
21265
|
explicitType,
|
|
21266
|
-
memberName:
|
|
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 [
|
|
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
|
}
|
|
@@ -41407,10 +41407,10 @@ function compareDocumentPosition(nodeA, nodeB) {
|
|
|
41407
41407
|
function uniqueSort(nodes) {
|
|
41408
41408
|
nodes = nodes.filter((node, i, arr) => !arr.includes(node, i + 1));
|
|
41409
41409
|
nodes.sort((a, b2) => {
|
|
41410
|
-
const
|
|
41411
|
-
if (
|
|
41410
|
+
const relative39 = compareDocumentPosition(a, b2);
|
|
41411
|
+
if (relative39 & DocumentPosition.PRECEDING) {
|
|
41412
41412
|
return -1;
|
|
41413
|
-
} else if (
|
|
41413
|
+
} else if (relative39 & DocumentPosition.FOLLOWING) {
|
|
41414
41414
|
return 1;
|
|
41415
41415
|
}
|
|
41416
41416
|
return 0;
|
|
@@ -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 ?
|
|
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(
|
|
41857
|
+
define(localName2, Class, options = {}) {
|
|
41858
41858
|
const { ownerDocument, registry, waiting } = this;
|
|
41859
|
-
if (registry.has(
|
|
41860
|
-
throw new Error("unable to redefine " +
|
|
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 ?
|
|
41868
|
-
localName: extend2 ||
|
|
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") ===
|
|
41872
|
-
} : (element) => element.localName ===
|
|
41873
|
-
registry.set(
|
|
41874
|
-
if (waiting.has(
|
|
41875
|
-
for (const resolve84 of waiting.get(
|
|
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(
|
|
41877
|
+
waiting.delete(localName2);
|
|
41878
41878
|
}
|
|
41879
41879
|
ownerDocument.querySelectorAll(
|
|
41880
|
-
extend2 ? `${extend2}[is="${
|
|
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(
|
|
41914
|
+
whenDefined(localName2) {
|
|
41915
41915
|
const { registry, waiting } = this;
|
|
41916
41916
|
return new Promise((resolve84) => {
|
|
41917
|
-
if (registry.has(
|
|
41918
|
-
resolve84(registry.get(
|
|
41917
|
+
if (registry.has(localName2))
|
|
41918
|
+
resolve84(registry.get(localName2).Class);
|
|
41919
41919
|
else {
|
|
41920
|
-
if (!waiting.has(
|
|
41921
|
-
waiting.set(
|
|
41922
|
-
waiting.get(
|
|
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(
|
|
41931
|
-
const info = this.registry.get(
|
|
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
|
|
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,
|
|
42520
|
+
constructor(ownerDocument, localName2, nodeType) {
|
|
42521
42521
|
super();
|
|
42522
42522
|
this.ownerDocument = ownerDocument;
|
|
42523
|
-
this.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,
|
|
42941
|
-
super(ownerDocument,
|
|
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) ?
|
|
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,
|
|
44678
|
-
super(ownerDocument,
|
|
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 `<${
|
|
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,
|
|
45455
|
+
create2 = (ownerDocument, element, localName2) => {
|
|
45456
45456
|
if ("ownerSVGElement" in element) {
|
|
45457
|
-
const svg = ownerDocument.createElementNS(SVG_NAMESPACE,
|
|
45457
|
+
const svg = ownerDocument.createElementNS(SVG_NAMESPACE, localName2);
|
|
45458
45458
|
svg.ownerSVGElement = element.ownerSVGElement;
|
|
45459
45459
|
return svg;
|
|
45460
45460
|
}
|
|
45461
|
-
return ownerDocument.createElement(
|
|
45461
|
+
return ownerDocument.createElement(localName2);
|
|
45462
45462
|
};
|
|
45463
|
-
isVoid = ({ localName, ownerDocument }) => {
|
|
45464
|
-
return ownerDocument[MIME].voidElements.test(
|
|
45463
|
+
isVoid = ({ localName: localName2, ownerDocument }) => {
|
|
45464
|
+
return ownerDocument[MIME].voidElements.test(localName2);
|
|
45465
45465
|
};
|
|
45466
45466
|
Element3 = class extends ParentNode {
|
|
45467
|
-
constructor(ownerDocument,
|
|
45468
|
-
super(ownerDocument,
|
|
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,
|
|
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,
|
|
45931
|
-
super(ownerDocument,
|
|
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,
|
|
46087
|
-
super(ownerDocument,
|
|
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 =
|
|
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,
|
|
46646
|
-
super(ownerDocument,
|
|
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,
|
|
46685
|
-
super(ownerDocument,
|
|
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,
|
|
46754
|
-
super(ownerDocument,
|
|
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,
|
|
46771
|
-
super(ownerDocument,
|
|
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,
|
|
46830
|
-
super(ownerDocument,
|
|
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,
|
|
46844
|
-
super(ownerDocument,
|
|
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,
|
|
46858
|
-
super(ownerDocument,
|
|
46857
|
+
constructor(ownerDocument, localName2 = "body") {
|
|
46858
|
+
super(ownerDocument, localName2);
|
|
46859
46859
|
}
|
|
46860
46860
|
};
|
|
46861
46861
|
}
|
|
@@ -47625,12 +47625,12 @@ var require_CSSValueExpression = __commonJS({
|
|
|
47625
47625
|
return false;
|
|
47626
47626
|
}
|
|
47627
47627
|
};
|
|
47628
|
-
CSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx,
|
|
47629
|
-
var endIdx = this._findMatchedIdx(token, idx,
|
|
47628
|
+
CSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep19) {
|
|
47629
|
+
var endIdx = this._findMatchedIdx(token, idx, sep19), text2;
|
|
47630
47630
|
if (endIdx === -1) {
|
|
47631
47631
|
return false;
|
|
47632
47632
|
} else {
|
|
47633
|
-
text2 = token.substring(idx, endIdx +
|
|
47633
|
+
text2 = token.substring(idx, endIdx + sep19.length);
|
|
47634
47634
|
return {
|
|
47635
47635
|
idx: endIdx,
|
|
47636
47636
|
text: text2
|
|
@@ -47670,15 +47670,15 @@ var require_CSSValueExpression = __commonJS({
|
|
|
47670
47670
|
if (!isLegal) {
|
|
47671
47671
|
return false;
|
|
47672
47672
|
} else {
|
|
47673
|
-
var
|
|
47674
|
-
return this._parseJSString(token, idx,
|
|
47673
|
+
var sep19 = "/";
|
|
47674
|
+
return this._parseJSString(token, idx, sep19);
|
|
47675
47675
|
}
|
|
47676
47676
|
};
|
|
47677
|
-
CSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx,
|
|
47677
|
+
CSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx, sep19) {
|
|
47678
47678
|
var startIdx = idx, endIdx;
|
|
47679
47679
|
var NOT_FOUND = -1;
|
|
47680
47680
|
while (true) {
|
|
47681
|
-
endIdx = token.indexOf(
|
|
47681
|
+
endIdx = token.indexOf(sep19, startIdx + 1);
|
|
47682
47682
|
if (endIdx === -1) {
|
|
47683
47683
|
endIdx = NOT_FOUND;
|
|
47684
47684
|
break;
|
|
@@ -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,
|
|
48393
|
-
super(ownerDocument,
|
|
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,
|
|
48439
|
-
super(ownerDocument,
|
|
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,
|
|
48463
|
-
super(ownerDocument,
|
|
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,
|
|
48477
|
-
super(ownerDocument,
|
|
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,
|
|
48491
|
-
super(ownerDocument,
|
|
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,
|
|
48505
|
-
super(ownerDocument,
|
|
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,
|
|
48519
|
-
super(ownerDocument,
|
|
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,
|
|
48533
|
-
super(ownerDocument,
|
|
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,
|
|
48547
|
-
super(ownerDocument,
|
|
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,
|
|
48561
|
-
super(ownerDocument,
|
|
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,
|
|
48575
|
-
super(ownerDocument,
|
|
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,
|
|
48589
|
-
super(ownerDocument,
|
|
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,
|
|
48606
|
-
super(ownerDocument,
|
|
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,
|
|
48659
|
-
super(ownerDocument,
|
|
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,
|
|
48673
|
-
super(ownerDocument,
|
|
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,
|
|
48687
|
-
super(ownerDocument,
|
|
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,
|
|
48703
|
-
super(ownerDocument,
|
|
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,
|
|
48718
|
-
super(ownerDocument,
|
|
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,
|
|
48732
|
-
super(ownerDocument,
|
|
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,
|
|
48786
|
-
super(ownerDocument,
|
|
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,
|
|
48822
|
-
super(ownerDocument,
|
|
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,
|
|
48839
|
-
super(ownerDocument,
|
|
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,
|
|
48871
|
-
super(ownerDocument,
|
|
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,
|
|
48885
|
-
super(ownerDocument,
|
|
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,
|
|
48899
|
-
super(ownerDocument,
|
|
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,
|
|
48913
|
-
super(ownerDocument,
|
|
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,
|
|
48929
|
-
super(ownerDocument,
|
|
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,
|
|
48944
|
-
super(ownerDocument,
|
|
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,
|
|
48958
|
-
super(ownerDocument,
|
|
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,
|
|
48972
|
-
super(ownerDocument,
|
|
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,
|
|
48986
|
-
super(ownerDocument,
|
|
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,
|
|
49004
|
-
super(ownerDocument,
|
|
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,
|
|
49048
|
-
super(ownerDocument,
|
|
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,
|
|
49065
|
-
super(ownerDocument,
|
|
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,
|
|
49100
|
-
super(ownerDocument,
|
|
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,
|
|
49114
|
-
super(ownerDocument,
|
|
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,
|
|
49128
|
-
super(ownerDocument,
|
|
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,
|
|
49145
|
-
super(ownerDocument,
|
|
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,
|
|
49192
|
-
super(ownerDocument,
|
|
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,
|
|
49206
|
-
super(ownerDocument,
|
|
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,
|
|
49223
|
-
super(ownerDocument,
|
|
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,
|
|
49279
|
-
super(ownerDocument,
|
|
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,
|
|
49330
|
-
super(ownerDocument,
|
|
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,
|
|
49347
|
-
super(ownerDocument,
|
|
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,
|
|
49406
|
-
super(ownerDocument,
|
|
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,
|
|
49420
|
-
super(ownerDocument,
|
|
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,
|
|
49437
|
-
super(ownerDocument,
|
|
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,
|
|
49484
|
-
super(ownerDocument,
|
|
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,
|
|
49498
|
-
super(ownerDocument,
|
|
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,
|
|
49512
|
-
super(ownerDocument,
|
|
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,
|
|
49526
|
-
super(ownerDocument,
|
|
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,
|
|
49543
|
-
super(ownerDocument,
|
|
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,
|
|
49591
|
-
super(ownerDocument,
|
|
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,
|
|
49605
|
-
super(ownerDocument,
|
|
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,
|
|
49619
|
-
super(ownerDocument,
|
|
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,
|
|
49633
|
-
super(ownerDocument,
|
|
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,
|
|
49650
|
-
super(ownerDocument,
|
|
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,
|
|
49691
|
-
super(ownerDocument,
|
|
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,
|
|
49705
|
-
super(ownerDocument,
|
|
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(
|
|
50284
|
-
return new Element3(this,
|
|
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,
|
|
50376
|
-
return nsp === SVG_NAMESPACE ? new SVGElement(this,
|
|
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,
|
|
50402
|
-
if (!builtin && htmlClasses.has(
|
|
50403
|
-
const Class = htmlClasses.get(
|
|
50404
|
-
return new Class(ownerDocument,
|
|
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 :
|
|
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,
|
|
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,
|
|
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(
|
|
50478
|
+
createElement(localName2, options) {
|
|
50479
50479
|
const builtin = !!(options && options.is);
|
|
50480
|
-
const element = createHTMLElement(this, builtin,
|
|
50480
|
+
const element = createHTMLElement(this, builtin, localName2, options);
|
|
50481
50481
|
if (builtin)
|
|
50482
50482
|
element.setAttribute("is", options.is);
|
|
50483
50483
|
return element;
|
|
@@ -50620,8 +50620,8 @@ var init_esm10 = __esm({
|
|
|
50620
50620
|
});
|
|
50621
50621
|
|
|
50622
50622
|
// ../../node_modules/.bun/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
50623
|
-
function encodeInteger(builder, num3,
|
|
50624
|
-
let delta = num3 -
|
|
50623
|
+
function encodeInteger(builder, num3, relative39) {
|
|
50624
|
+
let delta = num3 - relative39;
|
|
50625
50625
|
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
50626
50626
|
do {
|
|
50627
50627
|
let clamped = delta & 31;
|
|
@@ -53850,14 +53850,14 @@ function parseReferenceOffset(value) {
|
|
|
53850
53850
|
return { refId, operator, magnitude };
|
|
53851
53851
|
}
|
|
53852
53852
|
function parseStartExpression(raw) {
|
|
53853
|
-
const
|
|
53854
|
-
if (!
|
|
53855
|
-
const absolute = parseNumeric(
|
|
53853
|
+
const normalized3 = (raw ?? "").trim();
|
|
53854
|
+
if (!normalized3) return null;
|
|
53855
|
+
const absolute = parseNumeric(normalized3);
|
|
53856
53856
|
if (absolute != null) return { kind: "absolute", value: absolute };
|
|
53857
|
-
if (REFERENCE_ID_PATTERN.test(
|
|
53858
|
-
return { kind: "reference", refId:
|
|
53857
|
+
if (REFERENCE_ID_PATTERN.test(normalized3)) {
|
|
53858
|
+
return { kind: "reference", refId: normalized3, offset: 0 };
|
|
53859
53859
|
}
|
|
53860
|
-
const reference = parseReferenceOffset(
|
|
53860
|
+
const reference = parseReferenceOffset(normalized3);
|
|
53861
53861
|
if (!reference) return null;
|
|
53862
53862
|
return {
|
|
53863
53863
|
kind: "reference",
|
|
@@ -55840,14 +55840,14 @@ function parseReferenceOffset2(value) {
|
|
|
55840
55840
|
return { refId, operator, magnitude };
|
|
55841
55841
|
}
|
|
55842
55842
|
function parseStartExpression2(raw) {
|
|
55843
|
-
const
|
|
55844
|
-
if (!
|
|
55845
|
-
const absolute = parseNumeric2(
|
|
55843
|
+
const normalized3 = (raw ?? "").trim();
|
|
55844
|
+
if (!normalized3) return null;
|
|
55845
|
+
const absolute = parseNumeric2(normalized3);
|
|
55846
55846
|
if (absolute != null) return { kind: "absolute", value: absolute };
|
|
55847
|
-
if (REFERENCE_ID_PATTERN2.test(
|
|
55848
|
-
return { kind: "reference", refId:
|
|
55847
|
+
if (REFERENCE_ID_PATTERN2.test(normalized3)) {
|
|
55848
|
+
return { kind: "reference", refId: normalized3, offset: 0 };
|
|
55849
55849
|
}
|
|
55850
|
-
const reference = parseReferenceOffset2(
|
|
55850
|
+
const reference = parseReferenceOffset2(normalized3);
|
|
55851
55851
|
if (!reference) return null;
|
|
55852
55852
|
return {
|
|
55853
55853
|
kind: "reference",
|
|
@@ -56108,8 +56108,8 @@ function cssString(value) {
|
|
|
56108
56108
|
return value.replace(/[\\'\r\n\f]/g, (char) => `\\${char.codePointAt(0)?.toString(16)} `);
|
|
56109
56109
|
}
|
|
56110
56110
|
function sourceAttribute(src, composition = false) {
|
|
56111
|
-
const
|
|
56112
|
-
if (!isSafeAttributeValue("src",
|
|
56111
|
+
const normalized3 = Array.from(src).filter((char) => char.charCodeAt(0) > 32).join("");
|
|
56112
|
+
if (!isSafeAttributeValue("src", normalized3) || composition && /^data:/i.test(normalized3)) {
|
|
56113
56113
|
throw new Error("Unsafe media or composition source URL");
|
|
56114
56114
|
}
|
|
56115
56115
|
return escapeHtmlAttributeValue(src);
|
|
@@ -58443,8 +58443,8 @@ function rewriteAssetPath(compSrcPath, relativePath, assetExists) {
|
|
|
58443
58443
|
return assetExists(sibling2) ? sibling2 + suffix : relativePath;
|
|
58444
58444
|
}
|
|
58445
58445
|
const resolved2 = join(compDir, relativePath);
|
|
58446
|
-
const
|
|
58447
|
-
return
|
|
58446
|
+
const normalized3 = resolve2("/", resolved2).slice(1);
|
|
58447
|
+
return normalized3;
|
|
58448
58448
|
}
|
|
58449
58449
|
function rewriteAssetPaths(elements, compSrcPath, getAttr2, setAttr2, assetExists) {
|
|
58450
58450
|
for (const el of elements) {
|
|
@@ -60068,10 +60068,10 @@ function hasHfColorGradingSecondaryValues(secondaries) {
|
|
|
60068
60068
|
return secondaries.some((secondary) => secondary.enabled && Object.values(secondary.correction).some((value) => Math.abs(value) > 1e-4));
|
|
60069
60069
|
}
|
|
60070
60070
|
function serializeHfColorGrading(grading) {
|
|
60071
|
-
const
|
|
60072
|
-
if (!
|
|
60071
|
+
const normalized3 = normalizeHfColorGrading(grading);
|
|
60072
|
+
if (!normalized3)
|
|
60073
60073
|
return "";
|
|
60074
|
-
const { enabled: _enabled, wheels, curves, hueCurves, secondaries, palette, ...serializable } =
|
|
60074
|
+
const { enabled: _enabled, wheels, curves, hueCurves, secondaries, palette, ...serializable } = normalized3;
|
|
60075
60075
|
return JSON.stringify({
|
|
60076
60076
|
...serializable,
|
|
60077
60077
|
...hasWheelGrade(wheels) ? { wheels } : {},
|
|
@@ -62158,8 +62158,8 @@ function computeBidiLevels(str) {
|
|
|
62158
62158
|
}
|
|
62159
62159
|
return levels;
|
|
62160
62160
|
}
|
|
62161
|
-
function computeSegmentLevels(
|
|
62162
|
-
const bidiLevels = computeBidiLevels(
|
|
62161
|
+
function computeSegmentLevels(normalized3, segStarts) {
|
|
62162
|
+
const bidiLevels = computeBidiLevels(normalized3);
|
|
62163
62163
|
if (bidiLevels === null)
|
|
62164
62164
|
return null;
|
|
62165
62165
|
const segLevels = new Int8Array(segStarts.length);
|
|
@@ -62183,14 +62183,14 @@ function getWhiteSpaceProfile(whiteSpace) {
|
|
|
62183
62183
|
function normalizeWhitespaceNormal(text2) {
|
|
62184
62184
|
if (!needsWhitespaceNormalizationRe.test(text2))
|
|
62185
62185
|
return text2;
|
|
62186
|
-
let
|
|
62187
|
-
if (
|
|
62188
|
-
|
|
62186
|
+
let normalized3 = text2.replace(collapsibleWhitespaceRunRe, " ");
|
|
62187
|
+
if (normalized3.charCodeAt(0) === 32) {
|
|
62188
|
+
normalized3 = normalized3.slice(1);
|
|
62189
62189
|
}
|
|
62190
|
-
if (
|
|
62191
|
-
|
|
62190
|
+
if (normalized3.length > 0 && normalized3.charCodeAt(normalized3.length - 1) === 32) {
|
|
62191
|
+
normalized3 = normalized3.slice(0, -1);
|
|
62192
62192
|
}
|
|
62193
|
-
return
|
|
62193
|
+
return normalized3;
|
|
62194
62194
|
}
|
|
62195
62195
|
function normalizeWhitespacePreWrap(text2) {
|
|
62196
62196
|
if (!/[\r\f]/.test(text2))
|
|
@@ -62772,7 +62772,7 @@ function carryTrailingForwardStickyAcrossCJKBoundary(segmentation) {
|
|
|
62772
62772
|
starts
|
|
62773
62773
|
};
|
|
62774
62774
|
}
|
|
62775
|
-
function buildMergedSegmentation(
|
|
62775
|
+
function buildMergedSegmentation(normalized3, profile, whiteSpaceProfile) {
|
|
62776
62776
|
const wordSegmenter = getSharedWordSegmenter();
|
|
62777
62777
|
let mergedLen = 0;
|
|
62778
62778
|
const mergedTexts = [];
|
|
@@ -62787,7 +62787,7 @@ function buildMergedSegmentation(normalized2, profile, whiteSpaceProfile) {
|
|
|
62787
62787
|
const mergedEndsWithClosingQuote = [];
|
|
62788
62788
|
const mergedEndsWithMyanmarMedialGlue = [];
|
|
62789
62789
|
const mergedHasArabicNoSpacePunctuation = [];
|
|
62790
|
-
for (const s of wordSegmenter.segment(
|
|
62790
|
+
for (const s of wordSegmenter.segment(normalized3)) {
|
|
62791
62791
|
for (const piece of splitSegmentByBreakKind(s.segment, s.isWordLike ?? false, s.index, whiteSpaceProfile)) {
|
|
62792
62792
|
let appendPieceToPrevious2 = function() {
|
|
62793
62793
|
if (mergedSingleCharRunChars[prevIndex] !== null) {
|
|
@@ -63011,10 +63011,10 @@ function mergeKeepAllTextSegments(segmentation) {
|
|
|
63011
63011
|
}
|
|
63012
63012
|
function analyzeText(text2, profile, whiteSpace = "normal", wordBreak = "normal") {
|
|
63013
63013
|
const whiteSpaceProfile = getWhiteSpaceProfile(whiteSpace);
|
|
63014
|
-
const
|
|
63015
|
-
if (
|
|
63014
|
+
const normalized3 = whiteSpaceProfile.mode === "pre-wrap" ? normalizeWhitespacePreWrap(text2) : normalizeWhitespaceNormal(text2);
|
|
63015
|
+
if (normalized3.length === 0) {
|
|
63016
63016
|
return {
|
|
63017
|
-
normalized:
|
|
63017
|
+
normalized: normalized3,
|
|
63018
63018
|
chunks: [],
|
|
63019
63019
|
len: 0,
|
|
63020
63020
|
texts: [],
|
|
@@ -63023,9 +63023,9 @@ function analyzeText(text2, profile, whiteSpace = "normal", wordBreak = "normal"
|
|
|
63023
63023
|
starts: []
|
|
63024
63024
|
};
|
|
63025
63025
|
}
|
|
63026
|
-
const segmentation = wordBreak === "keep-all" ? mergeKeepAllTextSegments(buildMergedSegmentation(
|
|
63026
|
+
const segmentation = wordBreak === "keep-all" ? mergeKeepAllTextSegments(buildMergedSegmentation(normalized3, profile, whiteSpaceProfile)) : buildMergedSegmentation(normalized3, profile, whiteSpaceProfile);
|
|
63027
63027
|
return {
|
|
63028
|
-
normalized:
|
|
63028
|
+
normalized: normalized3,
|
|
63029
63029
|
chunks: compileAnalysisChunks(segmentation, whiteSpaceProfile),
|
|
63030
63030
|
...segmentation
|
|
63031
63031
|
};
|
|
@@ -66418,8 +66418,8 @@ function resolveExtractCacheDir(env = process.env) {
|
|
|
66418
66418
|
if (raw === void 0) {
|
|
66419
66419
|
return { dir: defaultExtractCacheDir(), disabled: false, source: "default" };
|
|
66420
66420
|
}
|
|
66421
|
-
const
|
|
66422
|
-
if (EXTRACT_CACHE_DIR_DISABLED_ALIASES.includes(
|
|
66421
|
+
const normalized3 = raw.trim().toLowerCase();
|
|
66422
|
+
if (EXTRACT_CACHE_DIR_DISABLED_ALIASES.includes(normalized3)) {
|
|
66423
66423
|
return { dir: void 0, disabled: true, source: "env", rawValue: raw };
|
|
66424
66424
|
}
|
|
66425
66425
|
return { dir: raw, disabled: false, source: "env", rawValue: raw };
|
|
@@ -70406,8 +70406,8 @@ function candidateFileName(candidate) {
|
|
|
70406
70406
|
return candidate.split(/[\\/]/).at(-1)?.toLowerCase() ?? candidate.toLowerCase();
|
|
70407
70407
|
}
|
|
70408
70408
|
function chooseBestPathCandidate(name, candidates) {
|
|
70409
|
-
const
|
|
70410
|
-
return
|
|
70409
|
+
const normalized3 = candidates.map((candidate) => candidate.trim()).filter(Boolean);
|
|
70410
|
+
return normalized3.find((candidate) => candidateFileName(candidate) === `${name}.exe`) ?? normalized3.find((candidate) => candidateFileName(candidate) === name) ?? normalized3.find((candidate) => !candidateFileName(candidate).match(/\.(cmd|bat)$/i)) ?? normalized3[0];
|
|
70411
70411
|
}
|
|
70412
70412
|
function isExecutablePathCandidate(candidate) {
|
|
70413
70413
|
if (process.platform === "win32") return existsSync4(candidate);
|
|
@@ -70759,8 +70759,8 @@ function matchesAny(message, patterns) {
|
|
|
70759
70759
|
return patterns.some((pattern) => pattern.test(message));
|
|
70760
70760
|
}
|
|
70761
70761
|
function hasIoOperationFailure(message) {
|
|
70762
|
-
const
|
|
70763
|
-
return
|
|
70762
|
+
const normalized3 = message.toLowerCase();
|
|
70763
|
+
return normalized3.split(/[\r\n]/).some(
|
|
70764
70764
|
(line3) => IO_OPERATION_TOKENS.some((operation) => {
|
|
70765
70765
|
const operationIndex = line3.indexOf(operation);
|
|
70766
70766
|
if (operationIndex < 0) return false;
|
|
@@ -75853,8 +75853,8 @@ function resolveLocalAssetCandidates(projectDir, url) {
|
|
|
75853
75853
|
addCandidate(candidates, resolved2);
|
|
75854
75854
|
continue;
|
|
75855
75855
|
}
|
|
75856
|
-
const
|
|
75857
|
-
const clamped =
|
|
75856
|
+
const normalized3 = posix2.normalize(projectRelative.replace(/\\/g, "/"));
|
|
75857
|
+
const clamped = normalized3.replace(/^(\.\.\/)+/, "");
|
|
75858
75858
|
if (clamped && !clamped.startsWith("..")) {
|
|
75859
75859
|
addCandidate(candidates, resolve6(projectRoot, clamped));
|
|
75860
75860
|
}
|
|
@@ -76430,15 +76430,15 @@ function looksLikeRemoteErrorDocument(prefix) {
|
|
|
76430
76430
|
}
|
|
76431
76431
|
function normalizeCallerSha256(value) {
|
|
76432
76432
|
if (value === void 0) return void 0;
|
|
76433
|
-
const
|
|
76434
|
-
if (!/^[a-f0-9]{64}$/.test(
|
|
76433
|
+
const normalized3 = value.trim().toLowerCase();
|
|
76434
|
+
if (!/^[a-f0-9]{64}$/.test(normalized3)) {
|
|
76435
76435
|
throw new UrlDownloadError(
|
|
76436
76436
|
"hash_mismatch",
|
|
76437
76437
|
false,
|
|
76438
76438
|
"Caller-provided SHA-256 checksum is malformed"
|
|
76439
76439
|
);
|
|
76440
76440
|
}
|
|
76441
|
-
return
|
|
76441
|
+
return normalized3;
|
|
76442
76442
|
}
|
|
76443
76443
|
function expectedResponseSha256(response, callerSha256) {
|
|
76444
76444
|
if (callerSha256) return { value: callerSha256, encoding: "hex", source: "caller" };
|
|
@@ -77164,21 +77164,93 @@ function isCompositionVariable2(v2) {
|
|
|
77164
77164
|
return true;
|
|
77165
77165
|
}
|
|
77166
77166
|
function isSafeMediaUrl(url) {
|
|
77167
|
-
const
|
|
77168
|
-
const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
77167
|
+
const normalized3 = url.replace(/[\u0000-\u0020]/g, "");
|
|
77168
|
+
const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(normalized3);
|
|
77169
77169
|
if (!scheme) return true;
|
|
77170
77170
|
const proto = scheme[1]?.toLowerCase();
|
|
77171
77171
|
if (!proto) return false;
|
|
77172
77172
|
if (proto === "https" || proto === "http" || proto === "blob") return true;
|
|
77173
|
-
if (proto === "data") return /^data:image\//i.test(
|
|
77173
|
+
if (proto === "data") return /^data:image\//i.test(normalized3);
|
|
77174
77174
|
return false;
|
|
77175
77175
|
}
|
|
77176
|
-
|
|
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
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
83808
|
+
parse3(source, {
|
|
83809
|
+
ecmaVersion: "latest",
|
|
83810
|
+
sourceType: "script",
|
|
83811
|
+
allowReturnOutsideFunction: true
|
|
83812
|
+
});
|
|
83732
83813
|
return null;
|
|
83733
83814
|
} catch (error) {
|
|
83734
|
-
|
|
83735
|
-
|
|
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
|
-
|
|
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
|
}
|
|
@@ -84036,17 +84122,97 @@ function hasCaptionStyles(styles) {
|
|
|
84036
84122
|
return styles.some((s) => /\.caption[-_]?(?:group|word)/i.test(s.content));
|
|
84037
84123
|
}
|
|
84038
84124
|
function truncateSnippet(value, maxLength = 220) {
|
|
84039
|
-
const
|
|
84040
|
-
if (!
|
|
84041
|
-
if (
|
|
84042
|
-
return `${
|
|
84125
|
+
const normalized22 = value.replace(/\s+/g, " ").trim();
|
|
84126
|
+
if (!normalized22) return void 0;
|
|
84127
|
+
if (normalized22.length <= maxLength) return normalized22;
|
|
84128
|
+
return `${normalized22.slice(0, maxLength - 3)}...`;
|
|
84043
84129
|
}
|
|
84044
84130
|
function mediaSrcTagRe(tagAlternation) {
|
|
84045
84131
|
return new RegExp(`<(${tagAlternation})\\b[^>]*\\ssrc\\s*=\\s*["']([^"']+)["'][^>]*>`, "gi");
|
|
84046
84132
|
}
|
|
84133
|
+
function normalized(source) {
|
|
84134
|
+
let text2 = "";
|
|
84135
|
+
const offsets = [];
|
|
84136
|
+
for (let i = 0; i < source.length; i++) {
|
|
84137
|
+
const char = source[i];
|
|
84138
|
+
if (/\s/.test(char)) {
|
|
84139
|
+
if (text2.endsWith(" ")) continue;
|
|
84140
|
+
text2 += " ";
|
|
84141
|
+
} else text2 += char;
|
|
84142
|
+
offsets.push(i);
|
|
84143
|
+
}
|
|
84144
|
+
return { text: text2, offsets };
|
|
84145
|
+
}
|
|
84146
|
+
function createSourceLocator(source) {
|
|
84147
|
+
const tags = parseHtmlStructure(source).tags;
|
|
84148
|
+
const searchable = source.split("");
|
|
84149
|
+
const parser = new Parser3({
|
|
84150
|
+
oncomment() {
|
|
84151
|
+
searchable.fill("\0", parser.startIndex, parser.endIndex + 1);
|
|
84152
|
+
}
|
|
84153
|
+
});
|
|
84154
|
+
parser.write(source);
|
|
84155
|
+
parser.end();
|
|
84156
|
+
const normalizedSource = normalized(searchable.join(""));
|
|
84157
|
+
const at4 = (offset3) => {
|
|
84158
|
+
const before3 = source.slice(0, offset3);
|
|
84159
|
+
return {
|
|
84160
|
+
line: before3.split(/\r\n|\r|\n/).length,
|
|
84161
|
+
column: offset3 - Math.max(before3.lastIndexOf("\n"), before3.lastIndexOf("\r"))
|
|
84162
|
+
};
|
|
84163
|
+
};
|
|
84164
|
+
return (finding) => {
|
|
84165
|
+
if (finding.line !== void 0) return { line: finding.line, column: finding.column };
|
|
84166
|
+
if (finding.snippet) {
|
|
84167
|
+
const offset3 = snippetOffset(normalizedSource, finding.snippet);
|
|
84168
|
+
return offset3 === void 0 ? {} : at4(offset3);
|
|
84169
|
+
}
|
|
84170
|
+
const id = finding.elementId ?? /^#([\w-]+)$/.exec(finding.selector ?? "")?.[1];
|
|
84171
|
+
if (!id) return {};
|
|
84172
|
+
const matches2 = tags.filter((tag) => readDecodedAttr(tag.raw, "id") === id);
|
|
84173
|
+
return matches2.length === 1 ? at4(matches2[0].index) : {};
|
|
84174
|
+
};
|
|
84175
|
+
}
|
|
84176
|
+
function snippetOffset(source, snippet) {
|
|
84177
|
+
const needle = snippet.replace(/\s+/g, " ").trim().replace(/\.\.\.$/, "");
|
|
84178
|
+
if (!needle) return void 0;
|
|
84179
|
+
const index = source.text.indexOf(needle);
|
|
84180
|
+
if (index < 0 || source.text.indexOf(needle, index + 1) >= 0) return void 0;
|
|
84181
|
+
return source.offsets[index];
|
|
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
|
+
}
|
|
84047
84211
|
function buildLintContext(html, options = {}) {
|
|
84048
84212
|
const rawSource = html || "";
|
|
84049
|
-
|
|
84213
|
+
const mapped = mappedHtmlSource(rawSource);
|
|
84214
|
+
let source = mapped.source;
|
|
84215
|
+
let sourceStart = 0;
|
|
84050
84216
|
const initialStructure = parseHtmlStructure(source);
|
|
84051
84217
|
const templateTags = initialStructure.tags.filter(
|
|
84052
84218
|
(tag) => tag.name === "template" && tag.closeIndex != null
|
|
@@ -84059,7 +84225,8 @@ function buildLintContext(html, options = {}) {
|
|
|
84059
84225
|
const template = templateTags[0];
|
|
84060
84226
|
let structure = initialStructure;
|
|
84061
84227
|
if (template && !findRootTag(sourceWithoutTemplates)) {
|
|
84062
|
-
|
|
84228
|
+
sourceStart = template.index + template.raw.length;
|
|
84229
|
+
source = source.slice(sourceStart, template.closeIndex);
|
|
84063
84230
|
structure = parseHtmlStructure(source);
|
|
84064
84231
|
}
|
|
84065
84232
|
const tags = structure.tags;
|
|
@@ -84069,14 +84236,23 @@ function buildLintContext(html, options = {}) {
|
|
|
84069
84236
|
attrs: `href="${style.href}"`,
|
|
84070
84237
|
content: style.content,
|
|
84071
84238
|
raw: style.content,
|
|
84072
|
-
index: -1
|
|
84239
|
+
index: -1,
|
|
84240
|
+
file: style.file ?? style.href
|
|
84073
84241
|
}))
|
|
84074
84242
|
];
|
|
84075
84243
|
const scripts = structure.scripts;
|
|
84076
84244
|
const compositionIds = collectCompositionIds(tags);
|
|
84077
84245
|
const rootTag = findRootTag(source, tags);
|
|
84078
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
|
+
};
|
|
84079
84254
|
return {
|
|
84255
|
+
locate,
|
|
84080
84256
|
source,
|
|
84081
84257
|
rawSource,
|
|
84082
84258
|
tags,
|
|
@@ -84259,12 +84435,12 @@ function findVisibleMarkupCommentLeak(source) {
|
|
|
84259
84435
|
return null;
|
|
84260
84436
|
}
|
|
84261
84437
|
function readHtmlBodyCssSize(source) {
|
|
84262
|
-
const widthFirst = source.match(
|
|
84438
|
+
const widthFirst = source.match(HTML_BODY_CSS_WIDTH_FIRST_RE2);
|
|
84263
84439
|
if (widthFirst) {
|
|
84264
84440
|
const [, , width = "", , height = ""] = widthFirst;
|
|
84265
84441
|
return { width, height };
|
|
84266
84442
|
}
|
|
84267
|
-
const heightFirst = source.match(
|
|
84443
|
+
const heightFirst = source.match(HTML_BODY_CSS_HEIGHT_FIRST_RE2);
|
|
84268
84444
|
if (heightFirst) {
|
|
84269
84445
|
const [, , height = "", , width = ""] = heightFirst;
|
|
84270
84446
|
return { width, height };
|
|
@@ -84272,7 +84448,7 @@ function readHtmlBodyCssSize(source) {
|
|
|
84272
84448
|
return null;
|
|
84273
84449
|
}
|
|
84274
84450
|
function readViewportMetaSize(source) {
|
|
84275
|
-
const match = source.match(
|
|
84451
|
+
const match = source.match(VIEWPORT_META_SIZE_RE2);
|
|
84276
84452
|
if (!match) return null;
|
|
84277
84453
|
const [, , width = "", , height = ""] = match;
|
|
84278
84454
|
return { width, height };
|
|
@@ -84308,6 +84484,20 @@ function describeRootDimensionsDrift(source, dataWidth, dataHeight) {
|
|
|
84308
84484
|
fixHint: "update html/body CSS and the meta viewport to match, or scaffold with `hyperframes init --resolution portrait`"
|
|
84309
84485
|
};
|
|
84310
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
|
+
}
|
|
84311
84501
|
function tweensVolumeInSameCall(script, id) {
|
|
84312
84502
|
const selector = new RegExp(`#${escapeRegExp4(id)}(?![\\w-])`, "g");
|
|
84313
84503
|
for (let hit = selector.exec(script); hit; hit = selector.exec(script)) {
|
|
@@ -84422,18 +84612,18 @@ function classNamesFromAttr(classAttr) {
|
|
|
84422
84612
|
return classAttr.split(/\s+/).filter(Boolean);
|
|
84423
84613
|
}
|
|
84424
84614
|
function selectorTargetsManagedMedia(selector, mediaIndex) {
|
|
84425
|
-
const
|
|
84426
|
-
if (!
|
|
84427
|
-
if (mediaIndex.hasVideo && /\bvideo\b/i.test(
|
|
84428
|
-
if (mediaIndex.hasAudio && /\baudio\b/i.test(
|
|
84615
|
+
const normalized22 = selector.trim();
|
|
84616
|
+
if (!normalized22) return false;
|
|
84617
|
+
if (mediaIndex.hasVideo && /\bvideo\b/i.test(normalized22)) return true;
|
|
84618
|
+
if (mediaIndex.hasAudio && /\baudio\b/i.test(normalized22)) return true;
|
|
84429
84619
|
for (const mediaId of mediaIndex.ids) {
|
|
84430
84620
|
const escapedId = escapeRegExp4(mediaId);
|
|
84431
|
-
if (new RegExp(`#${escapedId}(?![\\w-])`).test(
|
|
84621
|
+
if (new RegExp(`#${escapedId}(?![\\w-])`).test(normalized22) || normalized22.includes(`[id="${mediaId}"]`) || normalized22.includes(`[id='${mediaId}']`)) {
|
|
84432
84622
|
return true;
|
|
84433
84623
|
}
|
|
84434
84624
|
}
|
|
84435
84625
|
for (const className of mediaIndex.classes) {
|
|
84436
|
-
if (new RegExp(`\\.${escapeRegExp4(className)}(?![\\w-])`).test(
|
|
84626
|
+
if (new RegExp(`\\.${escapeRegExp4(className)}(?![\\w-])`).test(normalized22)) {
|
|
84437
84627
|
return true;
|
|
84438
84628
|
}
|
|
84439
84629
|
}
|
|
@@ -84567,7 +84757,7 @@ function findRuntimeMediaSrcMutationFindings(ctx) {
|
|
|
84567
84757
|
const { document: document2 } = parseHTML(ctx.source);
|
|
84568
84758
|
const findings = [];
|
|
84569
84759
|
for (const script of ctx.scripts) {
|
|
84570
|
-
for (const mutation of
|
|
84760
|
+
for (const mutation of extractMediaSrcMutations2(script.content)) {
|
|
84571
84761
|
let targets;
|
|
84572
84762
|
try {
|
|
84573
84763
|
const id = /^#[A-Za-z_][\w-]*$/.test(mutation.selector) ? mutation.selector.slice(1) : null;
|
|
@@ -84746,13 +84936,47 @@ function findAudioGroupCarveAttrFindings(ctx) {
|
|
|
84746
84936
|
}
|
|
84747
84937
|
return findings;
|
|
84748
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
|
+
}
|
|
84749
84973
|
function readTagTiming(rawTag) {
|
|
84750
84974
|
return readClipTiming2({ getAttribute: (name) => readAttr(rawTag, name) });
|
|
84751
84975
|
}
|
|
84752
84976
|
function countPhysicalLines(source) {
|
|
84753
84977
|
if (source.length === 0) return 0;
|
|
84754
|
-
const
|
|
84755
|
-
const withoutFinalNewline =
|
|
84978
|
+
const normalized22 = source.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
84979
|
+
const withoutFinalNewline = normalized22.endsWith("\n") ? normalized22.slice(0, -1) : normalized22;
|
|
84756
84980
|
return withoutFinalNewline.split("\n").length;
|
|
84757
84981
|
}
|
|
84758
84982
|
function countStructuralLines(source) {
|
|
@@ -84765,8 +84989,8 @@ function isCaptionCue(tag) {
|
|
|
84765
84989
|
}
|
|
84766
84990
|
function isRegistrySourceFile(filePath) {
|
|
84767
84991
|
if (!filePath) return false;
|
|
84768
|
-
const
|
|
84769
|
-
return /(?:^|\/)registry\/blocks\/([^/]+)\/\1\.html$/i.test(
|
|
84992
|
+
const normalized22 = filePath.replace(/\\/g, "/");
|
|
84993
|
+
return /(?:^|\/)registry\/blocks\/([^/]+)\/\1\.html$/i.test(normalized22);
|
|
84770
84994
|
}
|
|
84771
84995
|
function isRegistryInstalledFile(rawSource) {
|
|
84772
84996
|
return /^\s*<!--\s*hyperframes-registry-item:[^>]*-->/i.test(rawSource.slice(0, 512));
|
|
@@ -84999,8 +85223,8 @@ function zeroValue(value) {
|
|
|
84999
85223
|
return Number(value.trim()) === 0;
|
|
85000
85224
|
}
|
|
85001
85225
|
function isGsapColorProperty(property) {
|
|
85002
|
-
const
|
|
85003
|
-
return !
|
|
85226
|
+
const normalized22 = property.toLowerCase();
|
|
85227
|
+
return !normalized22.startsWith("--") && (normalized22.endsWith("color") || normalized22 === "fill" || normalized22 === "stroke");
|
|
85004
85228
|
}
|
|
85005
85229
|
function collectStaticCssVariableDefinitions(tags, styles) {
|
|
85006
85230
|
const definitions = /* @__PURE__ */ new Set();
|
|
@@ -85127,10 +85351,10 @@ function styleHasHiddenInitialState(style) {
|
|
|
85127
85351
|
function styleHasOpaqueBackground(style) {
|
|
85128
85352
|
const background = readStyleProperty(style, "background") || readStyleProperty(style, "background-color");
|
|
85129
85353
|
if (!background) return false;
|
|
85130
|
-
const
|
|
85131
|
-
if (
|
|
85132
|
-
if (/rgba?\([^)]*,0(?:\.0+)?\)$/.test(
|
|
85133
|
-
if (/hsla?\([^)]*,0(?:\.0+)?\)$/.test(
|
|
85354
|
+
const normalized22 = background.toLowerCase().replace(/\s+/g, "");
|
|
85355
|
+
if (normalized22 === "transparent" || normalized22 === "none") return false;
|
|
85356
|
+
if (/rgba?\([^)]*,0(?:\.0+)?\)$/.test(normalized22)) return false;
|
|
85357
|
+
if (/hsla?\([^)]*,0(?:\.0+)?\)$/.test(normalized22)) return false;
|
|
85134
85358
|
return true;
|
|
85135
85359
|
}
|
|
85136
85360
|
function styleLooksFullFrameOverlay(style) {
|
|
@@ -85243,7 +85467,7 @@ function scanScriptsForRegexMatches(scripts, pattern, options) {
|
|
|
85243
85467
|
content.length,
|
|
85244
85468
|
match.index + match[0].length + options.contextAfter
|
|
85245
85469
|
);
|
|
85246
|
-
hits.push({ match, snippet: content.slice(contextStart, contextEnd) });
|
|
85470
|
+
hits.push({ match, snippet: content.slice(contextStart, contextEnd), script });
|
|
85247
85471
|
}
|
|
85248
85472
|
}
|
|
85249
85473
|
return hits;
|
|
@@ -85498,9 +85722,9 @@ function elementLevelTokens(tokens, tagsByToken) {
|
|
|
85498
85722
|
return expanded;
|
|
85499
85723
|
}
|
|
85500
85724
|
function isMultiComponentDasharray(value) {
|
|
85501
|
-
const
|
|
85502
|
-
if (!
|
|
85503
|
-
return
|
|
85725
|
+
const normalized22 = value.replace(/!important\s*$/i, "").trim();
|
|
85726
|
+
if (!normalized22 || /^none$/i.test(normalized22)) return false;
|
|
85727
|
+
return normalized22.split(/[\s,]+/).filter(Boolean).length >= 2;
|
|
85504
85728
|
}
|
|
85505
85729
|
function gsapDasharrayValueLooksMultiComponent(valueSource) {
|
|
85506
85730
|
const literal2 = valueSource.trim().match(/^(["'`])([\s\S]*)\1$/)?.[2];
|
|
@@ -85750,6 +85974,26 @@ function collectGoogleFontFamilies(source, styles) {
|
|
|
85750
85974
|
}
|
|
85751
85975
|
return families;
|
|
85752
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
|
+
}
|
|
85753
85997
|
function parseTiming(raw) {
|
|
85754
85998
|
const startStr = readAttr(raw, "data-start");
|
|
85755
85999
|
if (startStr === null) return null;
|
|
@@ -85903,13 +86147,27 @@ function collectFindings(produced, seen, filePath, into) {
|
|
|
85903
86147
|
const dedupeKey = dedupeKeyFor(finding);
|
|
85904
86148
|
if (seen.has(dedupeKey)) continue;
|
|
85905
86149
|
seen.add(dedupeKey);
|
|
85906
|
-
into.push(filePath ? { ...finding, file: filePath } : finding);
|
|
86150
|
+
into.push(filePath ? { ...finding, file: finding.file ?? filePath } : finding);
|
|
85907
86151
|
}
|
|
85908
86152
|
}
|
|
85909
86153
|
async function lintHyperframeHtml(html, options = {}) {
|
|
85910
86154
|
const startedAt = performance.now();
|
|
85911
86155
|
const ctx = buildLintContext(html, options);
|
|
85912
|
-
const { findings, timings } = await runRules(ctx, options.filePath);
|
|
86156
|
+
const { findings: rawFindings, timings } = await runRules(ctx, options.filePath);
|
|
86157
|
+
const locate = createSourceLocator(html);
|
|
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;
|
|
86165
|
+
if (finding.snippet && options.externalStyles?.some(
|
|
86166
|
+
(style) => style.content.replace(/\s+/g, " ").includes(finding.snippet.replace(/\.\.\.$/, ""))
|
|
86167
|
+
))
|
|
86168
|
+
return finding;
|
|
86169
|
+
return { ...finding, ...locate(finding) };
|
|
86170
|
+
});
|
|
85913
86171
|
const errorCount = findings.filter((f) => f.severity === "error").length;
|
|
85914
86172
|
const warningCount = findings.filter((f) => f.severity === "warning").length;
|
|
85915
86173
|
const infoCount = findings.filter((f) => f.severity === "info").length;
|
|
@@ -86244,8 +86502,12 @@ function collectLocalStylesheets(projectDir, document2, compSrcPath) {
|
|
|
86244
86502
|
function collectExternalStyles(projectDir, html, compSrcPath) {
|
|
86245
86503
|
const styles = [];
|
|
86246
86504
|
const { document: document2 } = parseHTML(html);
|
|
86247
|
-
for (const { href, content } of collectLocalStylesheets(
|
|
86248
|
-
|
|
86505
|
+
for (const { href, content, rootRelativePath } of collectLocalStylesheets(
|
|
86506
|
+
projectDir,
|
|
86507
|
+
document2,
|
|
86508
|
+
compSrcPath
|
|
86509
|
+
)) {
|
|
86510
|
+
styles.push({ href, content, file: join22(projectDir, rootRelativePath) });
|
|
86249
86511
|
}
|
|
86250
86512
|
return styles;
|
|
86251
86513
|
}
|
|
@@ -86638,16 +86900,20 @@ function isSnippetFragment(html) {
|
|
|
86638
86900
|
if (!firstTag) return false;
|
|
86639
86901
|
return /\bdata-hf-snippet\b/.test(firstTag[0]);
|
|
86640
86902
|
}
|
|
86641
|
-
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;
|
|
86642
86904
|
var init_dist4 = __esm({
|
|
86643
86905
|
"../lint/dist/index.js"() {
|
|
86644
86906
|
"use strict";
|
|
86645
86907
|
init_esm6();
|
|
86908
|
+
init_esm6();
|
|
86909
|
+
init_acorn();
|
|
86646
86910
|
import_postcss_selector_parser = __toESM(require_dist(), 1);
|
|
86647
|
-
|
|
86911
|
+
init_composition();
|
|
86648
86912
|
init_colorGradingContract();
|
|
86649
|
-
|
|
86913
|
+
init_composition();
|
|
86650
86914
|
init_esm10();
|
|
86915
|
+
init_acorn();
|
|
86916
|
+
init_walk();
|
|
86651
86917
|
init_composition();
|
|
86652
86918
|
init_compositionContract();
|
|
86653
86919
|
init_compositionDuration();
|
|
@@ -86877,7 +87143,7 @@ var init_dist4 = __esm({
|
|
|
86877
87143
|
return findings;
|
|
86878
87144
|
},
|
|
86879
87145
|
// CSS selector safety
|
|
86880
|
-
({ styles }) => {
|
|
87146
|
+
({ styles, locate }) => {
|
|
86881
87147
|
const findings = [];
|
|
86882
87148
|
const reportedRepeatedIds = /* @__PURE__ */ new Set();
|
|
86883
87149
|
const reportedHiddenStyleSelectors = /* @__PURE__ */ new Set();
|
|
@@ -86887,6 +87153,10 @@ var init_dist4 = __esm({
|
|
|
86887
87153
|
root = postcss2.parse(style.content);
|
|
86888
87154
|
} catch (error) {
|
|
86889
87155
|
findings.push({
|
|
87156
|
+
...locate(
|
|
87157
|
+
style,
|
|
87158
|
+
error instanceof postcss2.CssSyntaxError ? cssErrorOffset(style.content, error) : void 0
|
|
87159
|
+
),
|
|
86890
87160
|
code: "css_parse_error",
|
|
86891
87161
|
severity: "error",
|
|
86892
87162
|
message: `CSS parse error: ${error instanceof Error ? error.message : "unknown"}`
|
|
@@ -86952,7 +87222,7 @@ var init_dist4 = __esm({
|
|
|
86952
87222
|
];
|
|
86953
87223
|
},
|
|
86954
87224
|
// invalid_inline_script_syntax (JS parse error)
|
|
86955
|
-
({ scripts }) => {
|
|
87225
|
+
({ scripts, locate }) => {
|
|
86956
87226
|
const findings = [];
|
|
86957
87227
|
for (const script of scripts) {
|
|
86958
87228
|
const attrs2 = script.attrs || "";
|
|
@@ -86963,9 +87233,10 @@ var init_dist4 = __esm({
|
|
|
86963
87233
|
const syntaxError = getInlineScriptSyntaxError(script.content);
|
|
86964
87234
|
if (!syntaxError) continue;
|
|
86965
87235
|
findings.push({
|
|
87236
|
+
...locate(script, syntaxError.offset),
|
|
86966
87237
|
code: "invalid_inline_script_syntax",
|
|
86967
87238
|
severity: "error",
|
|
86968
|
-
message: `Inline script has invalid syntax: ${syntaxError}`,
|
|
87239
|
+
message: `Inline script has invalid syntax: ${syntaxError.message}`,
|
|
86969
87240
|
fixHint: "Fix the inline script syntax before render verification.",
|
|
86970
87241
|
snippet: truncateSnippet(script.content)
|
|
86971
87242
|
});
|
|
@@ -87031,7 +87302,7 @@ var init_dist4 = __esm({
|
|
|
87031
87302
|
return findings;
|
|
87032
87303
|
},
|
|
87033
87304
|
// non_deterministic_code
|
|
87034
|
-
({ scripts }) => {
|
|
87305
|
+
({ scripts, locate }) => {
|
|
87035
87306
|
const findings = [];
|
|
87036
87307
|
const patterns = [
|
|
87037
87308
|
{
|
|
@@ -87082,8 +87353,10 @@ var init_dist4 = __esm({
|
|
|
87082
87353
|
const withoutComments = stripJsComments(script.content);
|
|
87083
87354
|
const executable = stripStringLiterals(withoutComments);
|
|
87084
87355
|
for (const { pattern, label: label2, hint: hint2, scansStrings } of patterns) {
|
|
87085
|
-
|
|
87356
|
+
const match = pattern.exec(scansStrings ? withoutComments : executable);
|
|
87357
|
+
if (match) {
|
|
87086
87358
|
findings.push({
|
|
87359
|
+
...locate(script, match.index),
|
|
87087
87360
|
code: "non_deterministic_code",
|
|
87088
87361
|
severity: "error",
|
|
87089
87362
|
message: `Script contains \`${label2}\` which produces non-deterministic output. Renders may differ between frames or runs.`,
|
|
@@ -87514,6 +87787,7 @@ var init_dist4 = __esm({
|
|
|
87514
87787
|
findAudioGroupCarveAttrFindings
|
|
87515
87788
|
];
|
|
87516
87789
|
AUDIO_GROUP_TIMING_ATTRS = ["data-start", "data-duration", "data-track-index"];
|
|
87790
|
+
callIndexes = /* @__PURE__ */ new WeakMap();
|
|
87517
87791
|
MAX_COMPOSITION_LINES = 300;
|
|
87518
87792
|
MAX_TIMED_ELEMENTS_PER_TRACK = 3;
|
|
87519
87793
|
TRACK_DENSITY_EXEMPT_TAGS = /* @__PURE__ */ new Set(["audio", "script", "style", "video"]);
|
|
@@ -88646,19 +88920,20 @@ ${right.raw}`)
|
|
|
88646
88920
|
return findings;
|
|
88647
88921
|
},
|
|
88648
88922
|
// gsap_infinite_repeat
|
|
88649
|
-
({ scripts, rootTag }) => {
|
|
88923
|
+
({ scripts, rootTag, locate }) => {
|
|
88650
88924
|
const findings = [];
|
|
88651
88925
|
const declaredDuration = Number.parseFloat(
|
|
88652
88926
|
rootTag ? readAttr(rootTag.raw, "data-duration") ?? "" : ""
|
|
88653
88927
|
);
|
|
88654
88928
|
const hasFiniteCompositionWindow = Number.isFinite(declaredDuration) && declaredDuration > 0;
|
|
88655
88929
|
const pattern = /repeat\s*:\s*-1(?!\d)/g;
|
|
88656
|
-
for (const { snippet } of scanScriptsForRegexMatches(scripts, pattern, {
|
|
88930
|
+
for (const { snippet, match, script } of scanScriptsForRegexMatches(scripts, pattern, {
|
|
88657
88931
|
stripComments: true,
|
|
88658
88932
|
contextBefore: 60,
|
|
88659
88933
|
contextAfter: 60
|
|
88660
88934
|
})) {
|
|
88661
88935
|
findings.push({
|
|
88936
|
+
...locate(script, containingCallOffset(script, match.index)),
|
|
88662
88937
|
code: "gsap_infinite_repeat",
|
|
88663
88938
|
severity: hasFiniteCompositionWindow ? "warning" : "error",
|
|
88664
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.",
|
|
@@ -88669,15 +88944,16 @@ ${right.raw}`)
|
|
|
88669
88944
|
return findings;
|
|
88670
88945
|
},
|
|
88671
88946
|
// gsap_repeat_ceil_overshoot
|
|
88672
|
-
({ scripts }) => {
|
|
88947
|
+
({ scripts, locate }) => {
|
|
88673
88948
|
const findings = [];
|
|
88674
88949
|
const pattern = /repeat\s*:\s*Math\.ceil\s*\([^)]+\)\s*-\s*1/g;
|
|
88675
|
-
for (const { snippet } of scanScriptsForRegexMatches(scripts, pattern, {
|
|
88950
|
+
for (const { snippet, match, script } of scanScriptsForRegexMatches(scripts, pattern, {
|
|
88676
88951
|
stripComments: false,
|
|
88677
88952
|
contextBefore: 40,
|
|
88678
88953
|
contextAfter: 40
|
|
88679
88954
|
})) {
|
|
88680
88955
|
findings.push({
|
|
88956
|
+
...locate(script, containingCallOffset(script, match.index)),
|
|
88681
88957
|
code: "gsap_repeat_ceil_overshoot",
|
|
88682
88958
|
severity: "warning",
|
|
88683
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.",
|
|
@@ -88688,15 +88964,16 @@ ${right.raw}`)
|
|
|
88688
88964
|
return findings;
|
|
88689
88965
|
},
|
|
88690
88966
|
// gsap_repeat_floor_unclamped
|
|
88691
|
-
({ scripts }) => {
|
|
88967
|
+
({ scripts, locate }) => {
|
|
88692
88968
|
const findings = [];
|
|
88693
88969
|
const pattern = /repeat\s*:\s*Math\.floor\s*\([^)]+\)\s*-\s*1/g;
|
|
88694
|
-
for (const { snippet } of scanScriptsForRegexMatches(scripts, pattern, {
|
|
88970
|
+
for (const { snippet, match, script } of scanScriptsForRegexMatches(scripts, pattern, {
|
|
88695
88971
|
stripComments: false,
|
|
88696
88972
|
contextBefore: 40,
|
|
88697
88973
|
contextAfter: 40
|
|
88698
88974
|
})) {
|
|
88699
88975
|
findings.push({
|
|
88976
|
+
...locate(script, containingCallOffset(script, match.index)),
|
|
88700
88977
|
code: "gsap_repeat_floor_unclamped",
|
|
88701
88978
|
severity: "warning",
|
|
88702
88979
|
message: "GSAP repeat calculation can evaluate to -1 when the composition is shorter than one cycle, which GSAP interprets as an infinite repeat.",
|
|
@@ -88707,7 +88984,7 @@ ${right.raw}`)
|
|
|
88707
88984
|
return findings;
|
|
88708
88985
|
},
|
|
88709
88986
|
// gsap_timeline_not_registered
|
|
88710
|
-
({ scripts, rawSource, options }) => {
|
|
88987
|
+
({ scripts, rawSource, options, locate }) => {
|
|
88711
88988
|
const findings = [];
|
|
88712
88989
|
const canInheritFromHost = options.isSubComposition || rawSource.trimStart().toLowerCase().startsWith("<template");
|
|
88713
88990
|
for (const script of scripts) {
|
|
@@ -88716,6 +88993,7 @@ ${right.raw}`)
|
|
|
88716
88993
|
const hasRegistration = WINDOW_TIMELINE_ASSIGN_PATTERN.test(content) || TIMELINE_REGISTRY_OBJECT_LITERAL_PATTERN.test(content);
|
|
88717
88994
|
if (hasRegistration || canInheritFromHost) continue;
|
|
88718
88995
|
findings.push({
|
|
88996
|
+
...locate(script, gsapCallOffset(script, "timeline")),
|
|
88719
88997
|
code: "gsap_timeline_not_registered",
|
|
88720
88998
|
severity: "error",
|
|
88721
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.",
|
|
@@ -89703,7 +89981,7 @@ ${other.raw}`)
|
|
|
89703
89981
|
];
|
|
89704
89982
|
},
|
|
89705
89983
|
// font_family_without_font_face
|
|
89706
|
-
({ styles, source, rawSource, options }) => {
|
|
89984
|
+
({ styles, source, rawSource, options, locate }) => {
|
|
89707
89985
|
if (isRegistrySourceFile(options.filePath) || isRegistryInstalledFile(rawSource)) return [];
|
|
89708
89986
|
const findings = [];
|
|
89709
89987
|
const declared = extractFontFaceFamilies(styles);
|
|
@@ -89714,6 +89992,7 @@ ${other.raw}`)
|
|
|
89714
89992
|
);
|
|
89715
89993
|
if (undeclared.length === 0) return findings;
|
|
89716
89994
|
findings.push({
|
|
89995
|
+
...uniqueFontLocation(styles, undeclared, locate),
|
|
89717
89996
|
code: "font_family_without_font_face",
|
|
89718
89997
|
severity: "error",
|
|
89719
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.`,
|
|
@@ -91222,9 +91501,9 @@ function parityFontFamilies(html) {
|
|
|
91222
91501
|
const families = /* @__PURE__ */ new Set();
|
|
91223
91502
|
for (const match of html.matchAll(/font-family\s*:\s*([^;}]+)/gi)) {
|
|
91224
91503
|
for (const family of match[1].split(",")) {
|
|
91225
|
-
const
|
|
91226
|
-
if (
|
|
91227
|
-
families.add(
|
|
91504
|
+
const normalized3 = family.trim().replace(/^['"]|['"]$/g, "");
|
|
91505
|
+
if (normalized3.startsWith("Parity"))
|
|
91506
|
+
families.add(normalized3);
|
|
91228
91507
|
}
|
|
91229
91508
|
}
|
|
91230
91509
|
return [...families].sort();
|
|
@@ -105058,49 +105337,49 @@ var require_fast_uri = __commonJS({
|
|
|
105058
105337
|
schemelessOptions.skipEscape = true;
|
|
105059
105338
|
return serialize(resolved2, schemelessOptions);
|
|
105060
105339
|
}
|
|
105061
|
-
function resolveComponent(base2,
|
|
105340
|
+
function resolveComponent(base2, relative39, options, skipNormalization) {
|
|
105062
105341
|
const target = {};
|
|
105063
105342
|
if (!skipNormalization) {
|
|
105064
105343
|
base2 = parse10(serialize(base2, options), options);
|
|
105065
|
-
|
|
105344
|
+
relative39 = parse10(serialize(relative39, options), options);
|
|
105066
105345
|
}
|
|
105067
105346
|
options = options || {};
|
|
105068
|
-
if (!options.tolerant &&
|
|
105069
|
-
target.scheme =
|
|
105070
|
-
target.userinfo =
|
|
105071
|
-
target.host =
|
|
105072
|
-
target.port =
|
|
105073
|
-
target.path = removeDotSegments(
|
|
105074
|
-
target.query =
|
|
105347
|
+
if (!options.tolerant && relative39.scheme) {
|
|
105348
|
+
target.scheme = relative39.scheme;
|
|
105349
|
+
target.userinfo = relative39.userinfo;
|
|
105350
|
+
target.host = relative39.host;
|
|
105351
|
+
target.port = relative39.port;
|
|
105352
|
+
target.path = removeDotSegments(relative39.path || "");
|
|
105353
|
+
target.query = relative39.query;
|
|
105075
105354
|
} else {
|
|
105076
|
-
if (
|
|
105077
|
-
target.userinfo =
|
|
105078
|
-
target.host =
|
|
105079
|
-
target.port =
|
|
105080
|
-
target.path = removeDotSegments(
|
|
105081
|
-
target.query =
|
|
105355
|
+
if (relative39.userinfo !== void 0 || relative39.host !== void 0 || relative39.port !== void 0) {
|
|
105356
|
+
target.userinfo = relative39.userinfo;
|
|
105357
|
+
target.host = relative39.host;
|
|
105358
|
+
target.port = relative39.port;
|
|
105359
|
+
target.path = removeDotSegments(relative39.path || "");
|
|
105360
|
+
target.query = relative39.query;
|
|
105082
105361
|
} else {
|
|
105083
|
-
if (!
|
|
105362
|
+
if (!relative39.path) {
|
|
105084
105363
|
target.path = base2.path;
|
|
105085
|
-
if (
|
|
105086
|
-
target.query =
|
|
105364
|
+
if (relative39.query !== void 0) {
|
|
105365
|
+
target.query = relative39.query;
|
|
105087
105366
|
} else {
|
|
105088
105367
|
target.query = base2.query;
|
|
105089
105368
|
}
|
|
105090
105369
|
} else {
|
|
105091
|
-
if (
|
|
105092
|
-
target.path = removeDotSegments(
|
|
105370
|
+
if (relative39.path[0] === "/") {
|
|
105371
|
+
target.path = removeDotSegments(relative39.path);
|
|
105093
105372
|
} else {
|
|
105094
105373
|
if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) {
|
|
105095
|
-
target.path = "/" +
|
|
105374
|
+
target.path = "/" + relative39.path;
|
|
105096
105375
|
} else if (!base2.path) {
|
|
105097
|
-
target.path =
|
|
105376
|
+
target.path = relative39.path;
|
|
105098
105377
|
} else {
|
|
105099
|
-
target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) +
|
|
105378
|
+
target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative39.path;
|
|
105100
105379
|
}
|
|
105101
105380
|
target.path = removeDotSegments(target.path);
|
|
105102
105381
|
}
|
|
105103
|
-
target.query =
|
|
105382
|
+
target.query = relative39.query;
|
|
105104
105383
|
}
|
|
105105
105384
|
target.userinfo = base2.userinfo;
|
|
105106
105385
|
target.host = base2.host;
|
|
@@ -105108,7 +105387,7 @@ var require_fast_uri = __commonJS({
|
|
|
105108
105387
|
}
|
|
105109
105388
|
target.scheme = base2.scheme;
|
|
105110
105389
|
}
|
|
105111
|
-
target.fragment =
|
|
105390
|
+
target.fragment = relative39.fragment;
|
|
105112
105391
|
return target;
|
|
105113
105392
|
}
|
|
105114
105393
|
function equal(uriA, uriB, options) {
|
|
@@ -105300,8 +105579,8 @@ var require_fast_uri = __commonJS({
|
|
|
105300
105579
|
}
|
|
105301
105580
|
function normalizeComparableURI(uri, opts) {
|
|
105302
105581
|
if (typeof uri === "string") {
|
|
105303
|
-
const { normalized:
|
|
105304
|
-
return malformedAuthorityOrPort ? void 0 :
|
|
105582
|
+
const { normalized: normalized3, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
|
|
105583
|
+
return malformedAuthorityOrPort ? void 0 : normalized3;
|
|
105305
105584
|
}
|
|
105306
105585
|
if (typeof uri === "object") {
|
|
105307
105586
|
return serialize(uri, opts);
|
|
@@ -110942,8 +111221,8 @@ function inferPreGrouped(words) {
|
|
|
110942
111221
|
function joinTokens(left, right) {
|
|
110943
111222
|
const a = left.at(-1) ?? "";
|
|
110944
111223
|
const b2 = right[0] ?? "";
|
|
110945
|
-
const
|
|
110946
|
-
return `${left}${
|
|
111224
|
+
const sep19 = CJK_CHAR.test(a) || CJK_CHAR.test(b2) ? "" : " ";
|
|
111225
|
+
return `${left}${sep19}${right}`;
|
|
110947
111226
|
}
|
|
110948
111227
|
function wordsToCues(words, opts = {}) {
|
|
110949
111228
|
const preGrouped = opts.preGrouped ?? inferPreGrouped(words);
|
|
@@ -111267,12 +111546,12 @@ function normalizePath(path) {
|
|
|
111267
111546
|
return path.replaceAll("\\", "/");
|
|
111268
111547
|
}
|
|
111269
111548
|
function isWorkspaceLink(realEntry) {
|
|
111270
|
-
const
|
|
111271
|
-
return
|
|
111549
|
+
const normalized3 = normalizePath(realEntry);
|
|
111550
|
+
return normalized3.includes("/packages/cli/");
|
|
111272
111551
|
}
|
|
111273
111552
|
function isEphemeralExec(realEntry) {
|
|
111274
|
-
const
|
|
111275
|
-
return
|
|
111553
|
+
const normalized3 = normalizePath(realEntry);
|
|
111554
|
+
return normalized3.includes("/_npx/") || normalized3.includes("/.npm/_npx/") || posix3.basename(posix3.dirname(normalized3)).startsWith("bunx-");
|
|
111276
111555
|
}
|
|
111277
111556
|
function isHomebrewInstall(realEntry) {
|
|
111278
111557
|
return normalizePath(realEntry).includes("/Cellar/hyperframes/");
|
|
@@ -112844,7 +113123,7 @@ function formatLintFindings({ results, totalErrors, totalWarnings, totalInfos },
|
|
|
112844
113123
|
const format = (finding) => {
|
|
112845
113124
|
if (!verbose && finding.severity === "info") return;
|
|
112846
113125
|
const prefix = finding.severity === "error" ? c.error("\u2717") : finding.severity === "warning" ? c.warn("\u26A0") : c.dim("\u2139");
|
|
112847
|
-
const fileLabel =
|
|
113126
|
+
const fileLabel = findingFileLabel(file, finding, multiFile);
|
|
112848
113127
|
const loc = showElementId && finding.elementId ? ` ${c.accent(`[${finding.elementId}]`)}` : "";
|
|
112849
113128
|
lines.push(` ${prefix} ${fileLabel}${c.bold(finding.code)}${loc}: ${finding.message}`);
|
|
112850
113129
|
if (finding.fixHint) lines.push(` ${c.dim(`Fix: ${finding.fixHint}`)}`);
|
|
@@ -112877,6 +113156,11 @@ function formatLintStartupMessage(lintResult, mode) {
|
|
|
112877
113156
|
const hint2 = mode.pointer === "studio" ? "see the Lint badge in Studio, or run `hyperframes lint` for full output" : "run with --lint-verbose for full output";
|
|
112878
113157
|
return [` Lint: ${counts} \u2014 ${hint2}.`];
|
|
112879
113158
|
}
|
|
113159
|
+
function findingFileLabel(file, finding, multiFile) {
|
|
113160
|
+
if (finding.line === void 0) return multiFile ? c.dim(`[${file}] `) : "";
|
|
113161
|
+
const column = finding.column === void 0 ? "" : `:${finding.column}`;
|
|
113162
|
+
return c.dim(`[${finding.file ?? file}:${finding.line}${column}] `);
|
|
113163
|
+
}
|
|
112880
113164
|
var init_lintFormat = __esm({
|
|
112881
113165
|
"src/utils/lintFormat.ts"() {
|
|
112882
113166
|
"use strict";
|
|
@@ -113522,7 +113806,7 @@ import { dirname as dirname15, join as join35, resolve as resolve17 } from "path
|
|
|
113522
113806
|
function defaultStateHome() {
|
|
113523
113807
|
return process.env.XDG_STATE_HOME || join35(homedir8(), ".local", "state");
|
|
113524
113808
|
}
|
|
113525
|
-
function
|
|
113809
|
+
function normalized2(path) {
|
|
113526
113810
|
const resolved2 = resolve17(path).replace(/\\/g, "/");
|
|
113527
113811
|
return process.platform === "win32" ? resolved2.toLowerCase() : resolved2;
|
|
113528
113812
|
}
|
|
@@ -113530,7 +113814,7 @@ function sessionDirectory(stateHome = defaultStateHome()) {
|
|
|
113530
113814
|
return join35(stateHome, "hyperframes", "previews");
|
|
113531
113815
|
}
|
|
113532
113816
|
function previewSessionPath(projectDir, stateHome = defaultStateHome()) {
|
|
113533
|
-
const key2 = createHash7("sha256").update(
|
|
113817
|
+
const key2 = createHash7("sha256").update(normalized2(projectDir)).digest("hex").slice(0, 16);
|
|
113534
113818
|
return join35(sessionDirectory(stateHome), `${key2}.json`);
|
|
113535
113819
|
}
|
|
113536
113820
|
function previewLogPath(projectDir, stateHome = defaultStateHome()) {
|
|
@@ -113553,7 +113837,7 @@ function readPreviewSession(projectDir, stateHome = defaultStateHome()) {
|
|
|
113553
113837
|
if (!existsSync32(path)) return null;
|
|
113554
113838
|
try {
|
|
113555
113839
|
const parsed = JSON.parse(readFileSync23(path, "utf8"));
|
|
113556
|
-
if (!Number.isInteger(parsed.pid) || parsed.pid <= 0 ||
|
|
113840
|
+
if (!Number.isInteger(parsed.pid) || parsed.pid <= 0 || normalized2(parsed.projectDir) !== normalized2(projectDir)) {
|
|
113557
113841
|
throw new Error("invalid preview session");
|
|
113558
113842
|
}
|
|
113559
113843
|
return parsed;
|
|
@@ -113588,7 +113872,7 @@ function removePreviewSession(projectDir, stateHome = defaultStateHome()) {
|
|
|
113588
113872
|
}
|
|
113589
113873
|
function matchingServer(servers, projectDir, browserGpuMode) {
|
|
113590
113874
|
return servers.find(
|
|
113591
|
-
(server) =>
|
|
113875
|
+
(server) => normalized2(server.projectDir) === normalized2(projectDir) && (browserGpuMode === void 0 || server.browserGpuMode === browserGpuMode)
|
|
113592
113876
|
) ?? null;
|
|
113593
113877
|
}
|
|
113594
113878
|
function matchingServerAtPort(servers, projectDir, port) {
|
|
@@ -113598,9 +113882,9 @@ function matchingServerAtPort(servers, projectDir, port) {
|
|
|
113598
113882
|
);
|
|
113599
113883
|
}
|
|
113600
113884
|
function sameProjectPorts(servers, projectDir) {
|
|
113601
|
-
const project =
|
|
113885
|
+
const project = normalized2(projectDir);
|
|
113602
113886
|
return new Set(
|
|
113603
|
-
servers.filter((server) =>
|
|
113887
|
+
servers.filter((server) => normalized2(server.projectDir) === project).map((server) => server.port)
|
|
113604
113888
|
);
|
|
113605
113889
|
}
|
|
113606
113890
|
async function stopProcess(pid) {
|
|
@@ -114162,7 +114446,7 @@ var init_hfIds = __esm({
|
|
|
114162
114446
|
});
|
|
114163
114447
|
|
|
114164
114448
|
// ../studio-server/dist/chunk-KFPWE4Q7.js
|
|
114165
|
-
import
|
|
114449
|
+
import postcss4 from "postcss";
|
|
114166
114450
|
function parseStyleDecls(style) {
|
|
114167
114451
|
const props = /* @__PURE__ */ new Map();
|
|
114168
114452
|
const order = [];
|
|
@@ -114232,7 +114516,7 @@ function duplicateCssRulesForId(document2, originalId, newId) {
|
|
|
114232
114516
|
const css = styleEl.textContent ?? "";
|
|
114233
114517
|
let root;
|
|
114234
114518
|
try {
|
|
114235
|
-
root =
|
|
114519
|
+
root = postcss4.parse(css);
|
|
114236
114520
|
} catch {
|
|
114237
114521
|
continue;
|
|
114238
114522
|
}
|
|
@@ -117577,8 +117861,8 @@ function upsertProp(ms, objNode, key2, value) {
|
|
|
117577
117861
|
if (existing) {
|
|
117578
117862
|
ms.overwrite(existing.value.start, existing.value.end, valueToCode(value));
|
|
117579
117863
|
} else {
|
|
117580
|
-
const
|
|
117581
|
-
ms.appendLeft(objNode.end - 1, `${
|
|
117864
|
+
const sep19 = objNode.properties.length > 0 ? ", " : "";
|
|
117865
|
+
ms.appendLeft(objNode.end - 1, `${sep19}${safeKey(key2)}: ${valueToCode(value)}`);
|
|
117582
117866
|
}
|
|
117583
117867
|
}
|
|
117584
117868
|
function isEditableVarKey(key2) {
|
|
@@ -118084,8 +118368,8 @@ function ensureKeyframesNode(script, animationId) {
|
|
|
118084
118368
|
if (!target) return null;
|
|
118085
118369
|
const kfProp = findPropertyNode22(target.call.varsArg, "keyframes");
|
|
118086
118370
|
if (kfProp?.value?.type === "ArrayExpression") {
|
|
118087
|
-
const
|
|
118088
|
-
if (
|
|
118371
|
+
const normalized3 = convertArrayKeyframesToObject(script, target);
|
|
118372
|
+
if (normalized3 !== script) return locateWithKeyframes(normalized3, animationId);
|
|
118089
118373
|
return null;
|
|
118090
118374
|
}
|
|
118091
118375
|
const converted = convertFlatTweenToKeyframes(script, target);
|
|
@@ -118145,8 +118429,8 @@ function insertNewKeyframe(ms, kfNode, percentage, pctKey, valueCode) {
|
|
|
118145
118429
|
if (insertBeforeProp) {
|
|
118146
118430
|
ms.appendLeft(insertBeforeProp.start, `${JSON.stringify(pctKey)}: ${valueCode}, `);
|
|
118147
118431
|
} else {
|
|
118148
|
-
const
|
|
118149
|
-
ms.appendLeft(kfNode.end - 1, `${
|
|
118432
|
+
const sep19 = allProps.length > 0 ? ", " : "";
|
|
118433
|
+
ms.appendLeft(kfNode.end - 1, `${sep19}${JSON.stringify(pctKey)}: ${valueCode}`);
|
|
118150
118434
|
}
|
|
118151
118435
|
}
|
|
118152
118436
|
function collapseKeyframesToFlat(ms, varsNode, source, remainingRecord) {
|
|
@@ -118590,8 +118874,8 @@ function enableArcPath(ms, call, animation, config) {
|
|
|
118590
118874
|
const k2 = propKeyName22(p2);
|
|
118591
118875
|
return k2 !== "x" && k2 !== "y";
|
|
118592
118876
|
});
|
|
118593
|
-
const
|
|
118594
|
-
ms.appendRight(vars.start + 1, ` motionPath: ${motionPathCode}${
|
|
118877
|
+
const sep19 = survivesRemoval ? ", " : "";
|
|
118878
|
+
ms.appendRight(vars.start + 1, ` motionPath: ${motionPathCode}${sep19}`);
|
|
118595
118879
|
stripXYFromKeyframes(ms, findPropertyNode22(call.varsArg, "keyframes"));
|
|
118596
118880
|
removePropsByKey(ms, call.varsArg, /* @__PURE__ */ new Set(["x", "y"]));
|
|
118597
118881
|
return true;
|
|
@@ -119332,17 +119616,17 @@ function getSystemProfilerIndex() {
|
|
|
119332
119616
|
const filePath = typeface.path;
|
|
119333
119617
|
if (typeof filePath !== "string" || !FONT_EXT_RE.test(filePath))
|
|
119334
119618
|
continue;
|
|
119335
|
-
const
|
|
119619
|
+
const normalized3 = normalizeName(family);
|
|
119336
119620
|
const ext = filePath.match(FONT_EXT_RE)?.[1] ?? "ttf";
|
|
119337
119621
|
const entry = {
|
|
119338
|
-
family:
|
|
119622
|
+
family: normalized3,
|
|
119339
119623
|
path: filePath,
|
|
119340
119624
|
format: extensionToFormat(ext),
|
|
119341
119625
|
isRegular: isRegularWeight(filePath)
|
|
119342
119626
|
};
|
|
119343
|
-
const list = profilerCache.get(
|
|
119627
|
+
const list = profilerCache.get(normalized3) ?? [];
|
|
119344
119628
|
list.push(entry);
|
|
119345
|
-
profilerCache.set(
|
|
119629
|
+
profilerCache.set(normalized3, list);
|
|
119346
119630
|
}
|
|
119347
119631
|
}
|
|
119348
119632
|
} catch {
|
|
@@ -119378,25 +119662,25 @@ function locateViaFcMatch(targetFamily) {
|
|
|
119378
119662
|
}
|
|
119379
119663
|
}
|
|
119380
119664
|
function locateSystemFont(family) {
|
|
119381
|
-
const
|
|
119382
|
-
if (!
|
|
119665
|
+
const normalized3 = normalizeName(family);
|
|
119666
|
+
if (!normalized3)
|
|
119383
119667
|
return null;
|
|
119384
|
-
const cached3 = cache2.get(
|
|
119668
|
+
const cached3 = cache2.get(normalized3);
|
|
119385
119669
|
if (cached3 !== void 0)
|
|
119386
119670
|
return cached3;
|
|
119387
119671
|
let result = null;
|
|
119388
|
-
result = locateViaSystemProfiler(
|
|
119672
|
+
result = locateViaSystemProfiler(normalized3);
|
|
119389
119673
|
if (!result) {
|
|
119390
|
-
result = locateViaFcMatch(
|
|
119674
|
+
result = locateViaFcMatch(normalized3);
|
|
119391
119675
|
}
|
|
119392
119676
|
if (!result) {
|
|
119393
119677
|
const allCandidates = [];
|
|
119394
119678
|
for (const dir of fontDirectories()) {
|
|
119395
|
-
allCandidates.push(...collectCandidatesFromDir(dir,
|
|
119679
|
+
allCandidates.push(...collectCandidatesFromDir(dir, normalized3));
|
|
119396
119680
|
}
|
|
119397
119681
|
result = pickBestCandidate(allCandidates);
|
|
119398
119682
|
}
|
|
119399
|
-
cache2.set(
|
|
119683
|
+
cache2.set(normalized3, result);
|
|
119400
119684
|
return result;
|
|
119401
119685
|
}
|
|
119402
119686
|
function inferWeightAndStyle(fileName) {
|
|
@@ -119409,12 +119693,12 @@ function inferWeightAndStyle(fileName) {
|
|
|
119409
119693
|
return { weight: "400", style };
|
|
119410
119694
|
}
|
|
119411
119695
|
function locateSystemFontVariants(family) {
|
|
119412
|
-
const
|
|
119413
|
-
if (!
|
|
119696
|
+
const normalized3 = normalizeName(family);
|
|
119697
|
+
if (!normalized3)
|
|
119414
119698
|
return [];
|
|
119415
119699
|
const variants = [];
|
|
119416
119700
|
const profilerIndex = getSystemProfilerIndex();
|
|
119417
|
-
const profilerEntries = profilerIndex.get(
|
|
119701
|
+
const profilerEntries = profilerIndex.get(normalized3);
|
|
119418
119702
|
if (profilerEntries && profilerEntries.length > 0) {
|
|
119419
119703
|
for (const e2 of profilerEntries) {
|
|
119420
119704
|
if (!isRegularFile(e2.path) || !isPathBounded(e2.path))
|
|
@@ -119427,7 +119711,7 @@ function locateSystemFontVariants(family) {
|
|
|
119427
119711
|
}
|
|
119428
119712
|
const allCandidates = [];
|
|
119429
119713
|
for (const dir of fontDirectories()) {
|
|
119430
|
-
allCandidates.push(...collectCandidatesFromDir(dir,
|
|
119714
|
+
allCandidates.push(...collectCandidatesFromDir(dir, normalized3));
|
|
119431
119715
|
}
|
|
119432
119716
|
for (const c3 of allCandidates) {
|
|
119433
119717
|
const { weight, style } = inferWeightAndStyle(c3.path);
|
|
@@ -125346,20 +125630,20 @@ ${rewrittenContent}
|
|
|
125346
125630
|
</html>`;
|
|
125347
125631
|
}
|
|
125348
125632
|
function persistHfIdsIfNeeded(filePath, html) {
|
|
125349
|
-
const
|
|
125633
|
+
const normalized3 = ensureHfIds(html);
|
|
125350
125634
|
const idsBefore = (html.match(/\bdata-hf-id=/g) ?? []).length;
|
|
125351
|
-
const idsAfter = (
|
|
125635
|
+
const idsAfter = (normalized3.match(/\bdata-hf-id=/g) ?? []).length;
|
|
125352
125636
|
if (idsAfter > idsBefore) {
|
|
125353
125637
|
try {
|
|
125354
125638
|
const current2 = readFileSync72(filePath, "utf-8");
|
|
125355
125639
|
if (current2 === html) {
|
|
125356
|
-
replaceFileAtomically(filePath,
|
|
125640
|
+
replaceFileAtomically(filePath, normalized3, statSync42(filePath).mode);
|
|
125357
125641
|
}
|
|
125358
125642
|
} catch (err) {
|
|
125359
125643
|
console.warn("[hyperframes] persistHfIdsIfNeeded: failed to write ids to disk:", err);
|
|
125360
125644
|
}
|
|
125361
125645
|
}
|
|
125362
|
-
return
|
|
125646
|
+
return normalized3;
|
|
125363
125647
|
}
|
|
125364
125648
|
function openNoFollow(filePath, flags) {
|
|
125365
125649
|
const noFollow = constants4.O_NOFOLLOW ?? 0;
|
|
@@ -125380,16 +125664,16 @@ function stampFileHfIds(filePath) {
|
|
|
125380
125664
|
try {
|
|
125381
125665
|
if (!fstatSync22(fd).isFile()) return null;
|
|
125382
125666
|
const html = readFileSync72(fd, "utf-8");
|
|
125383
|
-
const
|
|
125667
|
+
const normalized3 = ensureHfIds(html);
|
|
125384
125668
|
const idsBefore = (html.match(/\bdata-hf-id=/g) ?? []).length;
|
|
125385
|
-
const idsAfter = (
|
|
125669
|
+
const idsAfter = (normalized3.match(/\bdata-hf-id=/g) ?? []).length;
|
|
125386
125670
|
if (writable && idsAfter > idsBefore) {
|
|
125387
125671
|
const mode = fstatSync22(fd).mode;
|
|
125388
125672
|
closeSync22(fd);
|
|
125389
125673
|
fd = null;
|
|
125390
|
-
replaceFileAtomically(filePath,
|
|
125674
|
+
replaceFileAtomically(filePath, normalized3, mode);
|
|
125391
125675
|
}
|
|
125392
|
-
return
|
|
125676
|
+
return normalized3;
|
|
125393
125677
|
} catch (err) {
|
|
125394
125678
|
console.warn("[hyperframes] stampFileHfIds: failed to stamp ids:", err);
|
|
125395
125679
|
return null;
|
|
@@ -127286,22 +127570,79 @@ var init_dist9 = __esm({
|
|
|
127286
127570
|
});
|
|
127287
127571
|
|
|
127288
127572
|
// src/server/fileWatcher.ts
|
|
127289
|
-
import { watch } from "fs";
|
|
127290
|
-
import { join as join40 } from "path";
|
|
127573
|
+
import { lstatSync as lstatSync8, readdirSync as readdirSync18, watch } from "fs";
|
|
127574
|
+
import { join as join40, relative as relative13, sep as sep10 } from "path";
|
|
127291
127575
|
function shouldWatchProjectFile(filename) {
|
|
127292
127576
|
if (!filename) return false;
|
|
127293
127577
|
const parts = filename.split(/[\\/]+/);
|
|
127294
127578
|
return !parts.some((part) => WATCHER_EXCLUDED_DIRS.has(part));
|
|
127295
127579
|
}
|
|
127580
|
+
function isDirectory(path) {
|
|
127581
|
+
try {
|
|
127582
|
+
return lstatSync8(path).isDirectory();
|
|
127583
|
+
} catch {
|
|
127584
|
+
return false;
|
|
127585
|
+
}
|
|
127586
|
+
}
|
|
127587
|
+
function watchProjectTree(projectDir, onChange) {
|
|
127588
|
+
if (process.platform !== "linux") {
|
|
127589
|
+
const tree = watch(projectDir, { recursive: true }, (_event, filename) => {
|
|
127590
|
+
if (filename) onChange(filename.toString());
|
|
127591
|
+
});
|
|
127592
|
+
tree.on("error", () => tree.close());
|
|
127593
|
+
return () => tree.close();
|
|
127594
|
+
}
|
|
127595
|
+
const directories = /* @__PURE__ */ new Map();
|
|
127596
|
+
const unwatch = (dir) => {
|
|
127597
|
+
for (const [watched, watcher] of directories) {
|
|
127598
|
+
if (watched === dir || watched.startsWith(dir + sep10)) {
|
|
127599
|
+
watcher.close();
|
|
127600
|
+
directories.delete(watched);
|
|
127601
|
+
}
|
|
127602
|
+
}
|
|
127603
|
+
};
|
|
127604
|
+
const watchDirectory = (dir) => {
|
|
127605
|
+
if (directories.has(dir)) return;
|
|
127606
|
+
let watcher;
|
|
127607
|
+
try {
|
|
127608
|
+
watcher = watch(dir, { persistent: true }, (event, name) => {
|
|
127609
|
+
if (!name) return;
|
|
127610
|
+
const path = join40(dir, name.toString());
|
|
127611
|
+
onChange(relative13(projectDir, path));
|
|
127612
|
+
if (event !== "rename") return;
|
|
127613
|
+
if (isDirectory(path)) descend(path);
|
|
127614
|
+
else unwatch(path);
|
|
127615
|
+
});
|
|
127616
|
+
} catch (error) {
|
|
127617
|
+
if (dir === projectDir) throw error;
|
|
127618
|
+
return;
|
|
127619
|
+
}
|
|
127620
|
+
watcher.on("error", () => unwatch(dir));
|
|
127621
|
+
directories.set(dir, watcher);
|
|
127622
|
+
let entries2 = [];
|
|
127623
|
+
try {
|
|
127624
|
+
entries2 = readdirSync18(dir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => join40(dir, entry.name));
|
|
127625
|
+
} catch {
|
|
127626
|
+
}
|
|
127627
|
+
for (const child of entries2) descend(child);
|
|
127628
|
+
};
|
|
127629
|
+
const descend = (dir) => {
|
|
127630
|
+
const rel = relative13(projectDir, dir);
|
|
127631
|
+
if (shouldWatchProjectFile(rel) || rel === ".hyperframes") watchDirectory(dir);
|
|
127632
|
+
};
|
|
127633
|
+
watchDirectory(projectDir);
|
|
127634
|
+
return () => {
|
|
127635
|
+
for (const watcher of directories.values()) watcher.close();
|
|
127636
|
+
directories.clear();
|
|
127637
|
+
};
|
|
127638
|
+
}
|
|
127296
127639
|
function createProjectWatcher(projectDir) {
|
|
127297
127640
|
const listeners = /* @__PURE__ */ new Set();
|
|
127298
127641
|
const pendingPaths = /* @__PURE__ */ new Set();
|
|
127299
127642
|
let debounceTimer = null;
|
|
127300
|
-
let
|
|
127643
|
+
let closeTree = null;
|
|
127301
127644
|
try {
|
|
127302
|
-
|
|
127303
|
-
if (!filename) return;
|
|
127304
|
-
const relativePath = filename.toString();
|
|
127645
|
+
closeTree = watchProjectTree(projectDir, (relativePath) => {
|
|
127305
127646
|
if (!shouldWatchProjectFile(relativePath) && !affectsProjectSignature(projectDir, join40(projectDir, relativePath))) {
|
|
127306
127647
|
return;
|
|
127307
127648
|
}
|
|
@@ -127318,10 +127659,6 @@ function createProjectWatcher(projectDir) {
|
|
|
127318
127659
|
}
|
|
127319
127660
|
}, DEBOUNCE_MS);
|
|
127320
127661
|
});
|
|
127321
|
-
watcher.on("error", () => {
|
|
127322
|
-
watcher?.close();
|
|
127323
|
-
watcher = null;
|
|
127324
|
-
});
|
|
127325
127662
|
} catch {
|
|
127326
127663
|
}
|
|
127327
127664
|
return {
|
|
@@ -127334,7 +127671,7 @@ function createProjectWatcher(projectDir) {
|
|
|
127334
127671
|
close() {
|
|
127335
127672
|
if (debounceTimer) clearTimeout(debounceTimer);
|
|
127336
127673
|
pendingPaths.clear();
|
|
127337
|
-
|
|
127674
|
+
closeTree?.();
|
|
127338
127675
|
listeners.clear();
|
|
127339
127676
|
}
|
|
127340
127677
|
};
|
|
@@ -127784,7 +128121,7 @@ import {
|
|
|
127784
128121
|
existsSync as existsSync40,
|
|
127785
128122
|
mkdirSync as mkdirSync17,
|
|
127786
128123
|
readFileSync as readFileSync27,
|
|
127787
|
-
readdirSync as
|
|
128124
|
+
readdirSync as readdirSync19,
|
|
127788
128125
|
rmSync as rmSync14,
|
|
127789
128126
|
statSync as statSync17,
|
|
127790
128127
|
utimesSync as utimesSync3,
|
|
@@ -128013,7 +128350,7 @@ function findFromPuppeteerCache() {
|
|
|
128013
128350
|
if (!executable) return void 0;
|
|
128014
128351
|
let versions;
|
|
128015
128352
|
try {
|
|
128016
|
-
versions = [...
|
|
128353
|
+
versions = [...readdirSync19(PUPPETEER_CACHE_DIR)].sort(compareVersionDirsDescending);
|
|
128017
128354
|
} catch {
|
|
128018
128355
|
return void 0;
|
|
128019
128356
|
}
|
|
@@ -128791,7 +129128,7 @@ var init_compositionFps = __esm({
|
|
|
128791
129128
|
|
|
128792
129129
|
// src/utils/renderArgs.ts
|
|
128793
129130
|
import { readFileSync as readFileSync29 } from "fs";
|
|
128794
|
-
import { resolve as resolve26, sep as
|
|
129131
|
+
import { resolve as resolve26, sep as sep11 } from "path";
|
|
128795
129132
|
function parseBrowserTimeoutMsArg(raw) {
|
|
128796
129133
|
if (raw == null) return { ok: true, value: void 0 };
|
|
128797
129134
|
const parsed = Number(raw);
|
|
@@ -128861,7 +129198,7 @@ function parseCompositionEntryArg(raw, projectDir, stat) {
|
|
|
128861
129198
|
if (!trimmed) return { ok: true, value: void 0 };
|
|
128862
129199
|
const absProjectDir = resolve26(projectDir);
|
|
128863
129200
|
const entryPath = resolve26(absProjectDir, trimmed);
|
|
128864
|
-
if (entryPath !== absProjectDir && !entryPath.startsWith(absProjectDir +
|
|
129201
|
+
if (entryPath !== absProjectDir && !entryPath.startsWith(absProjectDir + sep11)) {
|
|
128865
129202
|
return { ok: false, error: { kind: "outside-project", entryFile: trimmed } };
|
|
128866
129203
|
}
|
|
128867
129204
|
let entryStat;
|
|
@@ -129442,11 +129779,11 @@ import {
|
|
|
129442
129779
|
} from "fs";
|
|
129443
129780
|
import { promisify as promisify6 } from "util";
|
|
129444
129781
|
import { Readable as Readable3 } from "stream";
|
|
129445
|
-
import { join as join44, extname as extname10, resolve as resolve28, sep as
|
|
129782
|
+
import { join as join44, extname as extname10, resolve as resolve28, sep as sep12 } from "path";
|
|
129446
129783
|
function isPathInside2(child, parent, options = {}) {
|
|
129447
129784
|
const { resolveSymlinks = false, pathModule } = options;
|
|
129448
129785
|
const resolveFn = pathModule?.resolve ?? resolve28;
|
|
129449
|
-
const separator = pathModule?.sep ??
|
|
129786
|
+
const separator = pathModule?.sep ?? sep12;
|
|
129450
129787
|
const resolvedChild = resolveFn(child);
|
|
129451
129788
|
const resolvedParent = resolveFn(parent);
|
|
129452
129789
|
const normalizedChild = resolveSymlinks && existsSync44(resolvedChild) ? realpathSync9.native(resolvedChild) : resolvedChild;
|
|
@@ -130163,7 +130500,7 @@ import {
|
|
|
130163
130500
|
symlinkSync as symlinkSync2,
|
|
130164
130501
|
writeFileSync as writeFileSync16
|
|
130165
130502
|
} from "fs";
|
|
130166
|
-
import { basename as basename11, dirname as dirname20, isAbsolute as isAbsolute11, join as join46, relative as
|
|
130503
|
+
import { basename as basename11, dirname as dirname20, isAbsolute as isAbsolute11, join as join46, relative as relative14, resolve as resolve29 } from "path";
|
|
130167
130504
|
function resolveBrowserMediaEnd(start, end, duration) {
|
|
130168
130505
|
return Number.isFinite(duration) && duration > 0 ? start + duration : end;
|
|
130169
130506
|
}
|
|
@@ -130381,7 +130718,7 @@ var init_shared = __esm({
|
|
|
130381
130718
|
join: join46,
|
|
130382
130719
|
dirname: dirname20,
|
|
130383
130720
|
basename: basename11,
|
|
130384
|
-
relative:
|
|
130721
|
+
relative: relative14,
|
|
130385
130722
|
isAbsolute: isAbsolute11
|
|
130386
130723
|
};
|
|
130387
130724
|
materializeFileSystem = {
|
|
@@ -130607,7 +130944,7 @@ import {
|
|
|
130607
130944
|
mkdtempSync as mkdtempSync9,
|
|
130608
130945
|
openSync as openSync10,
|
|
130609
130946
|
readSync as readSync3,
|
|
130610
|
-
readdirSync as
|
|
130947
|
+
readdirSync as readdirSync20,
|
|
130611
130948
|
renameSync as renameSync10,
|
|
130612
130949
|
rmSync as rmSync16
|
|
130613
130950
|
} from "fs";
|
|
@@ -130655,7 +130992,7 @@ function assertReadableNonEmptyFile(path) {
|
|
|
130655
130992
|
function collectDirectoryFiles(root) {
|
|
130656
130993
|
const files = [];
|
|
130657
130994
|
const visit = (directory) => {
|
|
130658
|
-
for (const entry of
|
|
130995
|
+
for (const entry of readdirSync20(directory, { withFileTypes: true })) {
|
|
130659
130996
|
const path = join47(directory, entry.name);
|
|
130660
130997
|
if (entry.isDirectory()) visit(path);
|
|
130661
130998
|
else if (entry.isFile()) files.push(path);
|
|
@@ -137727,7 +138064,7 @@ import { createHash as createHash15 } from "crypto";
|
|
|
137727
138064
|
import { existsSync as existsSync50, mkdirSync as mkdirSync24, mkdtempSync as mkdtempSync12, readFileSync as readFileSync35, writeFileSync as writeFileSync19 } from "fs";
|
|
137728
138065
|
import { homedir as homedir13, tmpdir as tmpdir8 } from "os";
|
|
137729
138066
|
import { join as join56 } from "path";
|
|
137730
|
-
import
|
|
138067
|
+
import postcss5 from "postcss";
|
|
137731
138068
|
function parseFontFamilyValue(value) {
|
|
137732
138069
|
const pieces = [];
|
|
137733
138070
|
let start = 0;
|
|
@@ -137770,7 +138107,7 @@ function systemPrimaryReplacement(value, deterministicPrimary) {
|
|
|
137770
138107
|
}
|
|
137771
138108
|
function parseCssRoot(css) {
|
|
137772
138109
|
try {
|
|
137773
|
-
return
|
|
138110
|
+
return postcss5.parse(css);
|
|
137774
138111
|
} catch {
|
|
137775
138112
|
return null;
|
|
137776
138113
|
}
|
|
@@ -137957,8 +138294,8 @@ function extractExistingFontFaces(html) {
|
|
|
137957
138294
|
if (semicolon2 < 0) break;
|
|
137958
138295
|
const end = html.indexOf("}", semicolon2 + 1);
|
|
137959
138296
|
if (end < 0) break;
|
|
137960
|
-
const
|
|
137961
|
-
if (
|
|
138297
|
+
const normalized3 = normalizeFamilyName(html.slice(valueStart, semicolon2));
|
|
138298
|
+
if (normalized3) families.add(normalized3);
|
|
137962
138299
|
opening.lastIndex = end + 1;
|
|
137963
138300
|
}
|
|
137964
138301
|
return families;
|
|
@@ -137971,10 +138308,10 @@ function extractRequestedFontFamilies(html) {
|
|
|
137971
138308
|
declaration,
|
|
137972
138309
|
customProperties
|
|
137973
138310
|
)) {
|
|
137974
|
-
const
|
|
137975
|
-
if (!
|
|
137976
|
-
if (
|
|
137977
|
-
if (!requested.has(
|
|
138311
|
+
const normalized3 = originalCase.toLowerCase();
|
|
138312
|
+
if (!normalized3 || GENERIC_FAMILIES2.has(normalized3)) continue;
|
|
138313
|
+
if (normalized3.startsWith("var(")) continue;
|
|
138314
|
+
if (!requested.has(normalized3)) requested.set(normalized3, originalCase);
|
|
137978
138315
|
}
|
|
137979
138316
|
}
|
|
137980
138317
|
return requested;
|
|
@@ -138757,11 +139094,11 @@ function hasGifExtension(src) {
|
|
|
138757
139094
|
function readLoopOverride(el) {
|
|
138758
139095
|
const raw = el.getAttribute("data-loop");
|
|
138759
139096
|
if (raw == null) return null;
|
|
138760
|
-
const
|
|
138761
|
-
if (
|
|
139097
|
+
const normalized3 = raw.trim().toLowerCase();
|
|
139098
|
+
if (normalized3 === "" || normalized3 === "true" || normalized3 === "1" || normalized3 === "yes") {
|
|
138762
139099
|
return true;
|
|
138763
139100
|
}
|
|
138764
|
-
if (
|
|
139101
|
+
if (normalized3 === "false" || normalized3 === "0" || normalized3 === "no") {
|
|
138765
139102
|
return false;
|
|
138766
139103
|
}
|
|
138767
139104
|
return null;
|
|
@@ -139241,7 +139578,7 @@ var init_assetMediaType = __esm({
|
|
|
139241
139578
|
// ../producer/src/services/htmlCompiler.ts
|
|
139242
139579
|
import { createHash as createHash17 } from "crypto";
|
|
139243
139580
|
import { createReadStream as createReadStream5, existsSync as existsSync54, mkdirSync as mkdirSync26, readFileSync as readFileSync37 } from "fs";
|
|
139244
|
-
import { join as join58, dirname as dirname25, resolve as resolve33, basename as basename13, relative as
|
|
139581
|
+
import { join as join58, dirname as dirname25, resolve as resolve33, basename as basename13, relative as relative15 } from "path";
|
|
139245
139582
|
function logRemoteDownloadTelemetry(event) {
|
|
139246
139583
|
defaultLogger.info("[Compiler] Remote asset download integrity", { ...event });
|
|
139247
139584
|
}
|
|
@@ -140227,7 +140564,7 @@ function rewriteUnresolvableGsapToCdn(html, projectDir) {
|
|
|
140227
140564
|
}
|
|
140228
140565
|
function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
|
|
140229
140566
|
if (!isPathInside3(htmlPath, projectDir)) return html;
|
|
140230
|
-
const entryPath =
|
|
140567
|
+
const entryPath = relative15(projectDir, htmlPath).replace(/\\/g, "/");
|
|
140231
140568
|
if (!entryPath.includes("/")) return html;
|
|
140232
140569
|
const { document: document2 } = parseHTML(html);
|
|
140233
140570
|
const assetExists = (path) => existsSync54(resolve33(projectDir, path));
|
|
@@ -142086,7 +142423,7 @@ var init_audioStage = __esm({
|
|
|
142086
142423
|
});
|
|
142087
142424
|
|
|
142088
142425
|
// ../producer/src/services/render/stages/captureStage.ts
|
|
142089
|
-
import { existsSync as existsSync56, readdirSync as
|
|
142426
|
+
import { existsSync as existsSync56, readdirSync as readdirSync21, statfsSync as statfsSync3 } from "fs";
|
|
142090
142427
|
import { join as join64 } from "path";
|
|
142091
142428
|
function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
|
|
142092
142429
|
return workerCount > 1;
|
|
@@ -142138,14 +142475,14 @@ function assertDiskCaptureHeadroom(framesDir, totalFrames, captureOptions, freeD
|
|
|
142138
142475
|
function measureCaptureFrameBytes(workDir, framesDir) {
|
|
142139
142476
|
let total = sampleDirectoryBytes(framesDir);
|
|
142140
142477
|
if (!existsSync56(workDir)) return total;
|
|
142141
|
-
for (const attempt of
|
|
142478
|
+
for (const attempt of readdirSync21(workDir)) {
|
|
142142
142479
|
if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
|
|
142143
142480
|
total += sampleDirectoryBytes(join64(workDir, attempt));
|
|
142144
142481
|
continue;
|
|
142145
142482
|
}
|
|
142146
142483
|
if (!/^capture-attempt-\d+$/.test(attempt)) continue;
|
|
142147
142484
|
const attemptDir = join64(workDir, attempt);
|
|
142148
|
-
for (const name of
|
|
142485
|
+
for (const name of readdirSync21(attemptDir)) {
|
|
142149
142486
|
if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join64(attemptDir, name));
|
|
142150
142487
|
}
|
|
142151
142488
|
}
|
|
@@ -143466,7 +143803,7 @@ var init_gifEncodeArgs = __esm({
|
|
|
143466
143803
|
});
|
|
143467
143804
|
|
|
143468
143805
|
// ../producer/src/services/render/stages/encodeStage.ts
|
|
143469
|
-
import { copyFileSync as copyFileSync5, existsSync as existsSync59, mkdirSync as mkdirSync28, readdirSync as
|
|
143806
|
+
import { copyFileSync as copyFileSync5, existsSync as existsSync59, mkdirSync as mkdirSync28, readdirSync as readdirSync23, rmSync as rmSync21, statSync as statSync24 } from "fs";
|
|
143470
143807
|
import { dirname as dirname27, join as join70 } from "path";
|
|
143471
143808
|
function resolveGifLoop(loop) {
|
|
143472
143809
|
const resolved2 = loop ?? 0;
|
|
@@ -143477,7 +143814,7 @@ function resolveGifLoop(loop) {
|
|
|
143477
143814
|
}
|
|
143478
143815
|
async function encodeGifFromDir(framesDir, framePattern, outputPath, input2) {
|
|
143479
143816
|
const startTime = Date.now();
|
|
143480
|
-
const files =
|
|
143817
|
+
const files = readdirSync23(framesDir).filter((file) => file.match(/\.(jpg|jpeg|png)$/i));
|
|
143481
143818
|
const frameCount = files.length;
|
|
143482
143819
|
if (frameCount === 0) {
|
|
143483
143820
|
return {
|
|
@@ -143568,7 +143905,7 @@ async function runEncodeStage(input2) {
|
|
|
143568
143905
|
if (isPngSequence) {
|
|
143569
143906
|
updateJobStatus(job, "encoding", "Writing PNG sequence", 75, onProgress);
|
|
143570
143907
|
if (!existsSync59(outputPath)) mkdirSync28(outputPath, { recursive: true });
|
|
143571
|
-
const captured =
|
|
143908
|
+
const captured = readdirSync23(framesDir).filter((name) => name.endsWith(".png")).sort();
|
|
143572
143909
|
if (captured.length === 0) {
|
|
143573
143910
|
throw new Error(
|
|
143574
143911
|
`[Render] png-sequence output requested but no PNGs were captured to ${framesDir}`
|
|
@@ -144192,7 +144529,7 @@ import {
|
|
|
144192
144529
|
mkdirSync as mkdirSync29,
|
|
144193
144530
|
mkdtempSync as mkdtempSync14,
|
|
144194
144531
|
readFileSync as readFileSync38,
|
|
144195
|
-
readdirSync as
|
|
144532
|
+
readdirSync as readdirSync24,
|
|
144196
144533
|
rmSync as rmSync24,
|
|
144197
144534
|
statSync as statSync25,
|
|
144198
144535
|
writeFileSync as writeFileSync20,
|
|
@@ -144212,7 +144549,7 @@ function sampleDirectoryBytes(dir) {
|
|
|
144212
144549
|
if (!current2) continue;
|
|
144213
144550
|
let entries2 = [];
|
|
144214
144551
|
try {
|
|
144215
|
-
entries2 =
|
|
144552
|
+
entries2 = readdirSync24(current2);
|
|
144216
144553
|
} catch {
|
|
144217
144554
|
continue;
|
|
144218
144555
|
}
|
|
@@ -147422,7 +147759,7 @@ import {
|
|
|
147422
147759
|
closeSync as closeSync13,
|
|
147423
147760
|
constants as constants7
|
|
147424
147761
|
} from "fs";
|
|
147425
|
-
import { resolve as resolve35, join as join74, relative as
|
|
147762
|
+
import { resolve as resolve35, join as join74, relative as relative16, isAbsolute as isAbsolute13, sep as sep13 } from "path";
|
|
147426
147763
|
function isStringRecord2(value) {
|
|
147427
147764
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
147428
147765
|
return false;
|
|
@@ -147475,8 +147812,8 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
|
|
|
147475
147812
|
);
|
|
147476
147813
|
for (const entryFile of entryCandidates) {
|
|
147477
147814
|
const absoluteEntryPath = resolve35(absProjectDir, entryFile);
|
|
147478
|
-
const entryRelativePath =
|
|
147479
|
-
if (entryRelativePath === ".." || entryRelativePath.startsWith(`..${
|
|
147815
|
+
const entryRelativePath = relative16(absProjectDir, absoluteEntryPath);
|
|
147816
|
+
if (entryRelativePath === ".." || entryRelativePath.startsWith(`..${sep13}`) || isAbsolute13(entryRelativePath)) {
|
|
147480
147817
|
return { error: `Entry file must stay inside project directory: ${entryFile}` };
|
|
147481
147818
|
}
|
|
147482
147819
|
const html = readEntryHtml(absoluteEntryPath);
|
|
@@ -147788,11 +148125,11 @@ function validateOutputResolutionOverride(body) {
|
|
|
147788
148125
|
if (typeof body.outputResolution !== "string") {
|
|
147789
148126
|
return 'outputResolution must be a string preset (e.g. "4k", "landscape-4k")';
|
|
147790
148127
|
}
|
|
147791
|
-
const
|
|
147792
|
-
if (body.outputResolution.trim().length > 0 &&
|
|
148128
|
+
const normalized3 = normalizeResolutionFlag(body.outputResolution);
|
|
148129
|
+
if (body.outputResolution.trim().length > 0 && normalized3 === void 0) {
|
|
147793
148130
|
return `Invalid outputResolution "${body.outputResolution}". Must be one of: landscape, portrait, landscape-4k, portrait-4k, square, square-4k (aliases: 1080p, 4k, \u2026).`;
|
|
147794
148131
|
}
|
|
147795
|
-
if (
|
|
148132
|
+
if (normalized3 !== void 0 && (body.format === "webm" || body.format === "mov")) {
|
|
147796
148133
|
return `outputResolution is not supported with format "${body.format}" \u2014 the alpha (webm/mov) capture path can't supersample. Use format "mp4", or omit outputResolution to render at the composition's native dimensions.`;
|
|
147797
148134
|
}
|
|
147798
148135
|
return void 0;
|
|
@@ -148471,8 +148808,8 @@ var init_planHash = __esm({
|
|
|
148471
148808
|
});
|
|
148472
148809
|
|
|
148473
148810
|
// ../producer/src/services/render/stages/freezePlan.ts
|
|
148474
|
-
import { existsSync as existsSync65, mkdirSync as mkdirSync31, readFileSync as readFileSync40, readdirSync as
|
|
148475
|
-
import { join as join77, relative as
|
|
148811
|
+
import { existsSync as existsSync65, mkdirSync as mkdirSync31, readFileSync as readFileSync40, readdirSync as readdirSync25, writeFileSync as writeFileSync23 } from "fs";
|
|
148812
|
+
import { join as join77, relative as relative17, resolve as resolve37 } from "path";
|
|
148476
148813
|
function stripUndefined(value) {
|
|
148477
148814
|
if (Array.isArray(value)) return value.map(stripUndefined);
|
|
148478
148815
|
if (value !== null && typeof value === "object") {
|
|
@@ -148491,14 +148828,14 @@ function listPlanFiles(planDir) {
|
|
|
148491
148828
|
const results = [];
|
|
148492
148829
|
const rootResolved = resolve37(planDir);
|
|
148493
148830
|
function walk2(dir) {
|
|
148494
|
-
const entries2 =
|
|
148831
|
+
const entries2 = readdirSync25(dir, { withFileTypes: true });
|
|
148495
148832
|
for (const entry of entries2) {
|
|
148496
148833
|
const full2 = join77(dir, entry.name);
|
|
148497
148834
|
if (entry.isDirectory()) {
|
|
148498
148835
|
walk2(full2);
|
|
148499
148836
|
} else if (entry.isFile()) {
|
|
148500
148837
|
results.push({
|
|
148501
|
-
planRelativePath:
|
|
148838
|
+
planRelativePath: relative17(rootResolved, full2).split(/[\\/]+/).join("/"),
|
|
148502
148839
|
absolutePath: full2
|
|
148503
148840
|
});
|
|
148504
148841
|
}
|
|
@@ -148911,8 +149248,8 @@ var init_shared2 = __esm({
|
|
|
148911
149248
|
|
|
148912
149249
|
// ../producer/src/services/distributed/planSize.ts
|
|
148913
149250
|
import { createHash as createHash19 } from "crypto";
|
|
148914
|
-
import { lstatSync as
|
|
148915
|
-
import { extname as extname13, join as join79, relative as
|
|
149251
|
+
import { lstatSync as lstatSync9, readdirSync as readdirSync26 } from "fs";
|
|
149252
|
+
import { extname as extname13, join as join79, relative as relative18 } from "path";
|
|
148916
149253
|
function hashComponent(value) {
|
|
148917
149254
|
return createHash19("sha256").update(value).digest("hex").slice(0, 12);
|
|
148918
149255
|
}
|
|
@@ -148969,13 +149306,13 @@ function addCategoryBytes(result, category, filePath, sizeBytes) {
|
|
|
148969
149306
|
function recordFile(result, components, rootDir, rootKind, filePath) {
|
|
148970
149307
|
let sizeBytes;
|
|
148971
149308
|
try {
|
|
148972
|
-
const stat =
|
|
149309
|
+
const stat = lstatSync9(filePath);
|
|
148973
149310
|
if (!stat.isFile()) return;
|
|
148974
149311
|
sizeBytes = stat.size;
|
|
148975
149312
|
} catch {
|
|
148976
149313
|
return;
|
|
148977
149314
|
}
|
|
148978
|
-
const rel =
|
|
149315
|
+
const rel = relative18(rootDir, filePath);
|
|
148979
149316
|
const segments = rel.split(/[\\/]+/).filter(Boolean);
|
|
148980
149317
|
const classified = classifyFile(segments, rootKind);
|
|
148981
149318
|
result.totalBytes += sizeBytes;
|
|
@@ -148993,7 +149330,7 @@ function recordFile(result, components, rootDir, rootKind, filePath) {
|
|
|
148993
149330
|
function walkRegularFiles(dir, visit) {
|
|
148994
149331
|
let entries2;
|
|
148995
149332
|
try {
|
|
148996
|
-
entries2 =
|
|
149333
|
+
entries2 = readdirSync26(dir, { withFileTypes: true });
|
|
148997
149334
|
} catch {
|
|
148998
149335
|
return;
|
|
148999
149336
|
}
|
|
@@ -149052,7 +149389,7 @@ var init_planSize = __esm({
|
|
|
149052
149389
|
|
|
149053
149390
|
// ../producer/src/services/distributed/plan.ts
|
|
149054
149391
|
import { cpSync as cpSync3, existsSync as existsSync67, mkdirSync as mkdirSync33, renameSync as renameSync15, rmSync as rmSync26, writeFileSync as writeFileSync24 } from "fs";
|
|
149055
|
-
import { join as join80, relative as
|
|
149392
|
+
import { join as join80, relative as relative19, sep as sep14 } from "path";
|
|
149056
149393
|
function applyDistributedAudioWarningPolicy(job, audioError, audioFailures = [], log2 = defaultLogger) {
|
|
149057
149394
|
const failureOwner = audioFailures.length === 0 ? void 0 : audioFailures.some((failure) => failure.owner === "system") ? "system" : "user";
|
|
149058
149395
|
const retryable = audioFailures.length === 0 ? void 0 : audioFailures.every((failure) => failure.retryable);
|
|
@@ -149292,9 +149629,9 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
149292
149629
|
recursive: true,
|
|
149293
149630
|
dereference: true,
|
|
149294
149631
|
filter: (src) => {
|
|
149295
|
-
const rel =
|
|
149632
|
+
const rel = relative19(projectDir, src);
|
|
149296
149633
|
if (rel === "" || rel.startsWith("..")) return true;
|
|
149297
|
-
const firstSegment = rel.split(
|
|
149634
|
+
const firstSegment = rel.split(sep14, 1)[0];
|
|
149298
149635
|
return firstSegment === void 0 || !PLAN_PROJECT_DIR_SKIP_SEGMENTS.has(firstSegment);
|
|
149299
149636
|
}
|
|
149300
149637
|
});
|
|
@@ -149760,13 +150097,13 @@ import {
|
|
|
149760
150097
|
closeSync as closeSync14,
|
|
149761
150098
|
copyFileSync as copyFileSync8,
|
|
149762
150099
|
existsSync as existsSync69,
|
|
149763
|
-
lstatSync as
|
|
150100
|
+
lstatSync as lstatSync10,
|
|
149764
150101
|
mkdirSync as mkdirSync35,
|
|
149765
150102
|
mkdtempSync as mkdtempSync17,
|
|
149766
150103
|
openSync as openSync13,
|
|
149767
150104
|
readFileSync as readFileSync43,
|
|
149768
150105
|
readSync as readSync5,
|
|
149769
|
-
readdirSync as
|
|
150106
|
+
readdirSync as readdirSync27,
|
|
149770
150107
|
renameSync as renameSync17,
|
|
149771
150108
|
rmSync as rmSync28,
|
|
149772
150109
|
statSync as statSync29,
|
|
@@ -149774,7 +150111,7 @@ import {
|
|
|
149774
150111
|
} from "fs";
|
|
149775
150112
|
import { createHash as createHash20 } from "crypto";
|
|
149776
150113
|
import { tmpdir as tmpdir11 } from "os";
|
|
149777
|
-
import { dirname as dirname35, isAbsolute as isAbsolute14, join as join84, relative as
|
|
150114
|
+
import { dirname as dirname35, isAbsolute as isAbsolute14, join as join84, relative as relative20, resolve as resolve38, sep as sep15 } from "path";
|
|
149778
150115
|
function isRecord8(value) {
|
|
149779
150116
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
149780
150117
|
}
|
|
@@ -149795,8 +150132,8 @@ function readJsonFile(path, label2) {
|
|
|
149795
150132
|
}
|
|
149796
150133
|
}
|
|
149797
150134
|
function assertSafeRelativePath(path) {
|
|
149798
|
-
const
|
|
149799
|
-
if (path.length === 0 || isAbsolute14(path) ||
|
|
150135
|
+
const normalized3 = path.split(/[\\/]+/);
|
|
150136
|
+
if (path.length === 0 || isAbsolute14(path) || normalized3.some((part) => part === "" || part === "." || part === "..")) {
|
|
149800
150137
|
throw new PlanV2IntegrityError(`unsafe artifact path: ${JSON.stringify(path)}`);
|
|
149801
150138
|
}
|
|
149802
150139
|
}
|
|
@@ -149804,13 +150141,13 @@ function listFiles(root) {
|
|
|
149804
150141
|
const files = [];
|
|
149805
150142
|
const rootResolved = resolve38(root);
|
|
149806
150143
|
function walk2(dir) {
|
|
149807
|
-
for (const entry of
|
|
150144
|
+
for (const entry of readdirSync27(dir, { withFileTypes: true })) {
|
|
149808
150145
|
const absolutePath = join84(dir, entry.name);
|
|
149809
150146
|
if (entry.isDirectory()) {
|
|
149810
150147
|
walk2(absolutePath);
|
|
149811
150148
|
} else if (entry.isFile()) {
|
|
149812
150149
|
files.push({
|
|
149813
|
-
path:
|
|
150150
|
+
path: relative20(rootResolved, absolutePath).split(sep15).join("/"),
|
|
149814
150151
|
absolutePath
|
|
149815
150152
|
});
|
|
149816
150153
|
} else {
|
|
@@ -149839,7 +150176,7 @@ function sha256File(path) {
|
|
|
149839
150176
|
return hash2.digest("hex");
|
|
149840
150177
|
}
|
|
149841
150178
|
function assertValidExtractionCacheCompleteSentinel(path) {
|
|
149842
|
-
const sentinel =
|
|
150179
|
+
const sentinel = lstatSync10(path);
|
|
149843
150180
|
if (!sentinel.isFile() || sentinel.size !== 0) {
|
|
149844
150181
|
throw new PlanV2IntegrityError(
|
|
149845
150182
|
`${EXTRACTION_CACHE_COMPLETE_SENTINEL} must be a zero-byte regular file`
|
|
@@ -149849,10 +150186,10 @@ function assertValidExtractionCacheCompleteSentinel(path) {
|
|
|
149849
150186
|
function validateExtractionCacheCompleteSentinels(executionPlanDir) {
|
|
149850
150187
|
const videoRoot = join84(executionPlanDir, "video-frames");
|
|
149851
150188
|
if (!existsSync69(videoRoot)) return;
|
|
149852
|
-
for (const videoEntry of
|
|
150189
|
+
for (const videoEntry of readdirSync27(videoRoot, { withFileTypes: true })) {
|
|
149853
150190
|
if (!videoEntry.isDirectory()) continue;
|
|
149854
150191
|
const videoDir = join84(videoRoot, videoEntry.name);
|
|
149855
|
-
if (
|
|
150192
|
+
if (readdirSync27(videoDir).includes(EXTRACTION_CACHE_COMPLETE_SENTINEL)) {
|
|
149856
150193
|
const sentinelPath = join84(videoDir, EXTRACTION_CACHE_COMPLETE_SENTINEL);
|
|
149857
150194
|
assertValidExtractionCacheCompleteSentinel(sentinelPath);
|
|
149858
150195
|
}
|
|
@@ -149865,7 +150202,7 @@ function isExtractionCacheCompleteSentinelPath(path) {
|
|
|
149865
150202
|
function resolveExtractedVideoOutputDir(planDir, videoId) {
|
|
149866
150203
|
const videoRoot = resolve38(planDir, "video-frames");
|
|
149867
150204
|
const outputDir = resolve38(videoRoot, videoId);
|
|
149868
|
-
if (outputDir === videoRoot || !outputDir.startsWith(`${videoRoot}${
|
|
150205
|
+
if (outputDir === videoRoot || !outputDir.startsWith(`${videoRoot}${sep15}`)) {
|
|
149869
150206
|
throw new PlanV2IntegrityError(`unsafe extracted video id: ${JSON.stringify(videoId)}`);
|
|
149870
150207
|
}
|
|
149871
150208
|
return outputDir;
|
|
@@ -149889,7 +150226,7 @@ function artifactTargets(path, videoDependencies) {
|
|
|
149889
150226
|
function listVideoFramePaths(executionPlanDir, videos) {
|
|
149890
150227
|
return videos.extracted.map((video) => {
|
|
149891
150228
|
const outputDir = resolveExtractedVideoOutputDir(executionPlanDir, video.videoId);
|
|
149892
|
-
const frameNames =
|
|
150229
|
+
const frameNames = readdirSync27(outputDir).sort();
|
|
149893
150230
|
const framePaths = /* @__PURE__ */ new Map();
|
|
149894
150231
|
for (const frameName of frameNames) {
|
|
149895
150232
|
if (frameName === EXTRACTION_CACHE_COMPLETE_SENTINEL) {
|
|
@@ -149982,7 +150319,7 @@ function buildVideoChunkDependencies(executionPlanDir, dimensions) {
|
|
|
149982
150319
|
for (let frame = chunk.startFrame; frame < chunk.endFrame; frame++) {
|
|
149983
150320
|
const globalTime = frame * fpsDen / fpsNum;
|
|
149984
150321
|
for (const payload of table.getActiveFramePayloads(globalTime).values()) {
|
|
149985
|
-
const path =
|
|
150322
|
+
const path = relative20(resolve38(executionPlanDir), payload.framePath).split(sep15).join("/");
|
|
149986
150323
|
assertSafeRelativePath(path);
|
|
149987
150324
|
const indexes = mutable.get(path) ?? /* @__PURE__ */ new Set();
|
|
149988
150325
|
indexes.add(chunk.index);
|
|
@@ -150429,7 +150766,7 @@ import {
|
|
|
150429
150766
|
mkdirSync as mkdirSync36,
|
|
150430
150767
|
mkdtempSync as mkdtempSync18,
|
|
150431
150768
|
readFileSync as readFileSync44,
|
|
150432
|
-
readdirSync as
|
|
150769
|
+
readdirSync as readdirSync28,
|
|
150433
150770
|
rmSync as rmSync29,
|
|
150434
150771
|
statSync as statSync30,
|
|
150435
150772
|
writeFileSync as writeFileSync27
|
|
@@ -150639,7 +150976,7 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
|
|
|
150639
150976
|
`[assemble] png-sequence chunk must be a directory: ${chunkDir} (got a file)`
|
|
150640
150977
|
);
|
|
150641
150978
|
}
|
|
150642
|
-
const frames =
|
|
150979
|
+
const frames = readdirSync28(chunkDir).filter((name) => name.endsWith(".png")).sort();
|
|
150643
150980
|
if (frames.length === 0) {
|
|
150644
150981
|
throw new Error(`[assemble] png-sequence chunk has no frames: ${chunkDir}`);
|
|
150645
150982
|
}
|
|
@@ -150659,7 +150996,7 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
|
|
|
150659
150996
|
cpSync4(audioPath, sidecar);
|
|
150660
150997
|
}
|
|
150661
150998
|
let fileSize = 0;
|
|
150662
|
-
for (const name of
|
|
150999
|
+
for (const name of readdirSync28(outputPath)) {
|
|
150663
151000
|
try {
|
|
150664
151001
|
fileSize += statSync30(join85(outputPath, name)).size;
|
|
150665
151002
|
} catch {
|
|
@@ -150688,7 +151025,7 @@ var init_assemble = __esm({
|
|
|
150688
151025
|
|
|
150689
151026
|
// ../producer/src/services/distributed/renderChunk.ts
|
|
150690
151027
|
import { randomBytes } from "crypto";
|
|
150691
|
-
import { existsSync as existsSync71, mkdirSync as mkdirSync37, readFileSync as readFileSync45, readdirSync as
|
|
151028
|
+
import { existsSync as existsSync71, mkdirSync as mkdirSync37, readFileSync as readFileSync45, readdirSync as readdirSync29, rmSync as rmSync30, writeFileSync as writeFileSync28 } from "fs";
|
|
150692
151029
|
import { extname as extname14, join as join86 } from "path";
|
|
150693
151030
|
function validatePlanVideosForChunk(value) {
|
|
150694
151031
|
try {
|
|
@@ -150764,7 +151101,7 @@ function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v
|
|
|
150764
151101
|
);
|
|
150765
151102
|
}
|
|
150766
151103
|
const ext = (extname14(v2.framePattern) || ".jpg").toLowerCase();
|
|
150767
|
-
const frames =
|
|
151104
|
+
const frames = readdirSync29(outputDir).filter((name) => name.toLowerCase().endsWith(ext)).sort((left, right) => {
|
|
150768
151105
|
const leftNumber = frameNumberFromFileName(left);
|
|
150769
151106
|
const rightNumber = frameNumberFromFileName(right);
|
|
150770
151107
|
if (leftNumber === null || rightNumber === null) return left.localeCompare(right);
|
|
@@ -150799,7 +151136,7 @@ function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v
|
|
|
150799
151136
|
}
|
|
150800
151137
|
function hashChunkOutput(outputPath, kind) {
|
|
150801
151138
|
if (kind === "file") return sha256Hex(readFileSync45(outputPath));
|
|
150802
|
-
const entries2 =
|
|
151139
|
+
const entries2 = readdirSync29(outputPath).filter((name) => /\.(png|jpg|jpeg)$/i.test(name)).sort();
|
|
150803
151140
|
const lines = entries2.map(
|
|
150804
151141
|
(name) => `${name}\0${sha256Hex(readFileSync45(join86(outputPath, name)))}`
|
|
150805
151142
|
);
|
|
@@ -151328,9 +151665,9 @@ var init_planV2Execution = __esm({
|
|
|
151328
151665
|
});
|
|
151329
151666
|
|
|
151330
151667
|
// ../producer/src/services/distributed/projectHash.ts
|
|
151331
|
-
import { readdirSync as
|
|
151668
|
+
import { readdirSync as readdirSync30, readFileSync as readFileSync46 } from "fs";
|
|
151332
151669
|
import { createHash as createHash21 } from "crypto";
|
|
151333
|
-
import { join as join88, relative as
|
|
151670
|
+
import { join as join88, relative as relative21 } from "path";
|
|
151334
151671
|
var init_projectHash = __esm({
|
|
151335
151672
|
"../producer/src/services/distributed/projectHash.ts"() {
|
|
151336
151673
|
"use strict";
|
|
@@ -151467,7 +151804,7 @@ import { randomUUID as randomUUID12 } from "crypto";
|
|
|
151467
151804
|
import {
|
|
151468
151805
|
existsSync as existsSync73,
|
|
151469
151806
|
mkdirSync as mkdirSync38,
|
|
151470
|
-
readdirSync as
|
|
151807
|
+
readdirSync as readdirSync31,
|
|
151471
151808
|
readFileSync as readFileSync47,
|
|
151472
151809
|
renameSync as renameSync18,
|
|
151473
151810
|
rmSync as rmSync33,
|
|
@@ -151541,7 +151878,7 @@ function sweepStaleStaging(dir) {
|
|
|
151541
151878
|
const prefix = `${basename14(dir)}.tmp-`;
|
|
151542
151879
|
const parent = dirname37(dir);
|
|
151543
151880
|
if (!existsSync73(parent)) return;
|
|
151544
|
-
for (const entry of
|
|
151881
|
+
for (const entry of readdirSync31(parent)) {
|
|
151545
151882
|
if (!entry.startsWith(prefix)) continue;
|
|
151546
151883
|
const pid = /^(\d+)(?:-|$)/.exec(entry.slice(prefix.length))?.[1];
|
|
151547
151884
|
if (pid === void 0 || isProcessAlive(Number(pid))) continue;
|
|
@@ -152952,7 +153289,7 @@ __export(preview_exports, {
|
|
|
152952
153289
|
waitForStudioChildClose: () => waitForStudioChildClose
|
|
152953
153290
|
});
|
|
152954
153291
|
import { spawn as spawn16 } from "child_process";
|
|
152955
|
-
import { existsSync as existsSync76, lstatSync as
|
|
153292
|
+
import { existsSync as existsSync76, lstatSync as lstatSync11, mkdirSync as mkdirSync40, readlinkSync, symlinkSync as symlinkSync3, unlinkSync as unlinkSync7 } from "fs";
|
|
152956
153293
|
import { resolve as resolve40, dirname as dirname38, basename as basename16, join as join93 } from "path";
|
|
152957
153294
|
import { fileURLToPath as fileURLToPath9 } from "url";
|
|
152958
153295
|
import { createRequire as createRequire4 } from "module";
|
|
@@ -153468,7 +153805,7 @@ function linkProjectIntoStudioData(dir, projectsDir, projectName) {
|
|
|
153468
153805
|
if (dir !== symlinkPath) {
|
|
153469
153806
|
if (existsSync76(symlinkPath)) {
|
|
153470
153807
|
try {
|
|
153471
|
-
const stat =
|
|
153808
|
+
const stat = lstatSync11(symlinkPath);
|
|
153472
153809
|
if (stat.isSymbolicLink() && resolve40(readlinkSync(symlinkPath)) !== resolve40(dir)) {
|
|
153473
153810
|
unlinkSync7(symlinkPath);
|
|
153474
153811
|
}
|
|
@@ -154247,7 +154584,7 @@ import {
|
|
|
154247
154584
|
cpSync as cpSync5,
|
|
154248
154585
|
writeFileSync as writeFileSync31,
|
|
154249
154586
|
readFileSync as readFileSync49,
|
|
154250
|
-
readdirSync as
|
|
154587
|
+
readdirSync as readdirSync33
|
|
154251
154588
|
} from "fs";
|
|
154252
154589
|
import { resolve as resolve41, basename as basename17, join as join94, dirname as dirname39 } from "path";
|
|
154253
154590
|
import { fileURLToPath as fileURLToPath10 } from "url";
|
|
@@ -154364,8 +154701,8 @@ function getSharedTemplateDir() {
|
|
|
154364
154701
|
return resolveAssetDir(["..", "templates", "_shared"], ["templates", "_shared"]);
|
|
154365
154702
|
}
|
|
154366
154703
|
function toPackageName(projectName) {
|
|
154367
|
-
const
|
|
154368
|
-
return
|
|
154704
|
+
const normalized3 = basename17(projectName).trim().toLowerCase().replace(/^[._]+/, "").replace(/[^a-z0-9._~-]+/g, "-").replace(/-+/g, "-").replace(/^[-.]+|[-.]+$/g, "");
|
|
154705
|
+
return normalized3 || "hyperframes-project";
|
|
154369
154706
|
}
|
|
154370
154707
|
function getHyperframesPackageSpecifier() {
|
|
154371
154708
|
return VERSION === "0.0.0-dev" ? "hyperframes" : `hyperframes@${VERSION}`;
|
|
@@ -154403,7 +154740,7 @@ function listHtmlFiles(dir) {
|
|
|
154403
154740
|
const files = [];
|
|
154404
154741
|
const ignoredDirs = /* @__PURE__ */ new Set([".git", "dist", "node_modules"]);
|
|
154405
154742
|
function walk2(currentDir) {
|
|
154406
|
-
for (const entry of
|
|
154743
|
+
for (const entry of readdirSync33(currentDir, { withFileTypes: true })) {
|
|
154407
154744
|
const entryPath = join94(currentDir, entry.name);
|
|
154408
154745
|
if (entry.isDirectory()) {
|
|
154409
154746
|
if (!ignoredDirs.has(entry.name)) walk2(entryPath);
|
|
@@ -154449,7 +154786,7 @@ function writeTailwindSupport(destDir) {
|
|
|
154449
154786
|
}
|
|
154450
154787
|
}
|
|
154451
154788
|
function patchVideoSrc(dir, videoFilename, durationSeconds) {
|
|
154452
|
-
const htmlFiles =
|
|
154789
|
+
const htmlFiles = readdirSync33(dir, { withFileTypes: true, recursive: true }).filter((e2) => e2.isFile() && e2.name.endsWith(".html")).map((e2) => join94(e2.parentPath, e2.name));
|
|
154453
154790
|
for (const file of htmlFiles) {
|
|
154454
154791
|
let content = readFileSync49(file, "utf-8");
|
|
154455
154792
|
if (videoFilename) {
|
|
@@ -154634,7 +154971,7 @@ async function scaffoldProject(destDir, name, templateId, localVideoName, durati
|
|
|
154634
154971
|
writeDefaultPackageJson(destDir, name);
|
|
154635
154972
|
const sharedDir = getSharedTemplateDir();
|
|
154636
154973
|
if (existsSync77(sharedDir)) {
|
|
154637
|
-
for (const entry of
|
|
154974
|
+
for (const entry of readdirSync33(sharedDir, { withFileTypes: true })) {
|
|
154638
154975
|
const src = join94(sharedDir, entry.name);
|
|
154639
154976
|
const dest = resolve41(destDir, entry.name);
|
|
154640
154977
|
if (entry.isFile() || entry.isSymbolicLink()) {
|
|
@@ -154849,7 +155186,7 @@ var init_init = __esm({
|
|
|
154849
155186
|
const templateId2 = resolveScaffoldTemplateId(exampleFlag, Boolean(videoFlag || audioFlag));
|
|
154850
155187
|
const name2 = args.name ?? "my-video";
|
|
154851
155188
|
const destDir2 = resolve41(name2);
|
|
154852
|
-
if (existsSync77(destDir2) &&
|
|
155189
|
+
if (existsSync77(destDir2) && readdirSync33(destDir2).length > 0) {
|
|
154853
155190
|
console.error(c.error(`Directory already exists and is not empty: ${name2}`));
|
|
154854
155191
|
failCommand();
|
|
154855
155192
|
}
|
|
@@ -154930,7 +155267,7 @@ var init_init = __esm({
|
|
|
154930
155267
|
await patchTranscript(destDir2, transcriptFile2);
|
|
154931
155268
|
}
|
|
154932
155269
|
console.log(c.success(`Created ${c.accent(name2 + "/")}`));
|
|
154933
|
-
for (const f of
|
|
155270
|
+
for (const f of readdirSync33(destDir2).filter((f2) => !f2.startsWith("."))) {
|
|
154934
155271
|
console.log(` ${c.accent(f)}`);
|
|
154935
155272
|
}
|
|
154936
155273
|
if (!skipSkills) {
|
|
@@ -154990,7 +155327,7 @@ var init_init = __esm({
|
|
|
154990
155327
|
name = nameResult;
|
|
154991
155328
|
}
|
|
154992
155329
|
const destDir = resolve41(name);
|
|
154993
|
-
if (existsSync77(destDir) &&
|
|
155330
|
+
if (existsSync77(destDir) && readdirSync33(destDir).length > 0) {
|
|
154994
155331
|
const overwrite = await ue({
|
|
154995
155332
|
message: `Directory ${c.accent(name)} already exists and is not empty. Overwrite?`,
|
|
154996
155333
|
initialValue: false
|
|
@@ -155122,7 +155459,7 @@ ${c.dim("Use --example blank for offline use.")}`
|
|
|
155122
155459
|
if (existsSync77(transcriptFile)) {
|
|
155123
155460
|
await patchTranscript(destDir, transcriptFile);
|
|
155124
155461
|
}
|
|
155125
|
-
const files =
|
|
155462
|
+
const files = readdirSync33(destDir);
|
|
155126
155463
|
Se(files.map((f) => c.accent(f)).join("\n"), c.success(`Created ${name}/`));
|
|
155127
155464
|
if (!skipSkills) {
|
|
155128
155465
|
await keepSkillsCurrent(destDir);
|
|
@@ -155197,7 +155534,7 @@ __export(add_exports, {
|
|
|
155197
155534
|
runAdd: () => runAdd
|
|
155198
155535
|
});
|
|
155199
155536
|
import { existsSync as existsSync78 } from "fs";
|
|
155200
|
-
import { resolve as resolve43, relative as
|
|
155537
|
+
import { resolve as resolve43, relative as relative23 } from "path";
|
|
155201
155538
|
function remapTarget(item, originalTarget, paths) {
|
|
155202
155539
|
if (item.type === "hyperframes:block") {
|
|
155203
155540
|
const blocksDir = paths.blocks.replace(/\/+$/, "");
|
|
@@ -155470,11 +155807,11 @@ var init_add = __esm({
|
|
|
155470
155807
|
console.log(`${c.success("\u2713")} Added ${c.accent(result.name)} (${result.type})`);
|
|
155471
155808
|
for (const file of result.preserved) {
|
|
155472
155809
|
console.log(
|
|
155473
|
-
` ${c.warn("kept")} ${
|
|
155810
|
+
` ${c.warn("kept")} ${relative23(projectDir, file) || file} \u2014 you have edited this; --force to overwrite`
|
|
155474
155811
|
);
|
|
155475
155812
|
}
|
|
155476
155813
|
for (const file of result.written) {
|
|
155477
|
-
console.log(` ${c.dim(
|
|
155814
|
+
console.log(` ${c.dim(relative23(projectDir, file))}`);
|
|
155478
155815
|
}
|
|
155479
155816
|
if (result.variablesApplied.length > 0) {
|
|
155480
155817
|
console.log(` ${c.dim(`variables applied: ${result.variablesApplied.join(", ")}`)}`);
|
|
@@ -155762,9 +156099,9 @@ function normalize(text2) {
|
|
|
155762
156099
|
}
|
|
155763
156100
|
return out.toLowerCase().normalize("NFD").replace(new RegExp("\\p{Mn}", "gu"), "");
|
|
155764
156101
|
}
|
|
155765
|
-
function preTokenize(
|
|
156102
|
+
function preTokenize(normalized3) {
|
|
155766
156103
|
const words = [];
|
|
155767
|
-
for (const chunk of
|
|
156104
|
+
for (const chunk of normalized3.split(/\s+/)) {
|
|
155768
156105
|
if (!chunk) continue;
|
|
155769
156106
|
let current2 = "";
|
|
155770
156107
|
for (const char of chunk) {
|
|
@@ -158677,8 +159014,8 @@ var init_projectLink = __esm({
|
|
|
158677
159014
|
});
|
|
158678
159015
|
|
|
158679
159016
|
// src/utils/publishProject.ts
|
|
158680
|
-
import { basename as basename18, dirname as dirname44, join as join100, posix as posix4, relative as
|
|
158681
|
-
import { existsSync as existsSync87, readdirSync as
|
|
159017
|
+
import { basename as basename18, dirname as dirname44, join as join100, posix as posix4, relative as relative24, resolve as resolve49 } from "path";
|
|
159018
|
+
import { existsSync as existsSync87, readdirSync as readdirSync34, readFileSync as readFileSync57, statSync as statSync33 } from "fs";
|
|
158682
159019
|
import AdmZip from "adm-zip";
|
|
158683
159020
|
import ignore2 from "ignore";
|
|
158684
159021
|
function isRecord9(value) {
|
|
@@ -158847,10 +159184,10 @@ function createProjectIgnore(rootDir) {
|
|
|
158847
159184
|
return matcher;
|
|
158848
159185
|
}
|
|
158849
159186
|
function collectProjectFiles(rootDir, currentDir, paths, matcher) {
|
|
158850
|
-
for (const entry of
|
|
159187
|
+
for (const entry of readdirSync34(currentDir, { withFileTypes: true })) {
|
|
158851
159188
|
if (shouldIgnoreSegment(entry.name)) continue;
|
|
158852
159189
|
const absolutePath = join100(currentDir, entry.name);
|
|
158853
|
-
const relativePath =
|
|
159190
|
+
const relativePath = relative24(rootDir, absolutePath).replaceAll("\\", "/");
|
|
158854
159191
|
if (!relativePath) continue;
|
|
158855
159192
|
if (entry.isDirectory()) {
|
|
158856
159193
|
if (matcher.ignores(`${relativePath}/`)) continue;
|
|
@@ -158865,7 +159202,7 @@ function collectProjectFiles(rootDir, currentDir, paths, matcher) {
|
|
|
158865
159202
|
function addExternalAsset(ctx, absPath) {
|
|
158866
159203
|
const existing = ctx.externalMap.get(absPath);
|
|
158867
159204
|
if (existing) return existing;
|
|
158868
|
-
const rel =
|
|
159205
|
+
const rel = relative24(ctx.absProjectDir, absPath).replaceAll("\\", "/");
|
|
158869
159206
|
const stripped = rel.replace(/^(?:\.\.\/)+/, "");
|
|
158870
159207
|
let archivePath = `${EXT_ASSETS_PREFIX}/${stripped}`;
|
|
158871
159208
|
if (ctx.usedArchivePaths.has(archivePath)) {
|
|
@@ -159277,7 +159614,7 @@ __export(publish_exports, {
|
|
|
159277
159614
|
examples: () => examples8,
|
|
159278
159615
|
parseUpdateTarget: () => parseUpdateTarget
|
|
159279
159616
|
});
|
|
159280
|
-
import { join as join101, posix as posix5, relative as
|
|
159617
|
+
import { join as join101, posix as posix5, relative as relative25, resolve as resolve51 } from "path";
|
|
159281
159618
|
import { existsSync as existsSync89 } from "fs";
|
|
159282
159619
|
function parseUpdateTarget(value) {
|
|
159283
159620
|
const trimmed = value.trim();
|
|
@@ -159494,7 +159831,7 @@ var init_publish = __esm({
|
|
|
159494
159831
|
const file = writeTeamProject(dir, { projectId: published.projectId, spaceId });
|
|
159495
159832
|
console.log();
|
|
159496
159833
|
console.log(
|
|
159497
|
-
` ${c.dim(`Wrote ${
|
|
159834
|
+
` ${c.dim(`Wrote ${relative25(dir, file) || file} \u2014 commit it so your team publishes to this link.`)}`
|
|
159498
159835
|
);
|
|
159499
159836
|
} catch {
|
|
159500
159837
|
}
|
|
@@ -159539,7 +159876,7 @@ var init_publish = __esm({
|
|
|
159539
159876
|
|
|
159540
159877
|
// src/utils/catalogUsage.ts
|
|
159541
159878
|
import { readFileSync as readFileSync58 } from "fs";
|
|
159542
|
-
import { isAbsolute as isAbsolute15, relative as
|
|
159879
|
+
import { isAbsolute as isAbsolute15, relative as relative26, resolve as resolve52 } from "path";
|
|
159543
159880
|
function reachableCompositions(projectDir, entryPath) {
|
|
159544
159881
|
const seen = /* @__PURE__ */ new Set();
|
|
159545
159882
|
const queue = [resolve52(entryPath)];
|
|
@@ -159563,7 +159900,7 @@ function reachableCompositions(projectDir, entryPath) {
|
|
|
159563
159900
|
function isReached(projectDir, target, reachable) {
|
|
159564
159901
|
if (isAbsolute15(target)) return false;
|
|
159565
159902
|
const abs = resolve52(projectDir, target);
|
|
159566
|
-
if (
|
|
159903
|
+
if (relative26(projectDir, abs).startsWith("..")) return false;
|
|
159567
159904
|
return reachable.has(abs);
|
|
159568
159905
|
}
|
|
159569
159906
|
function reportableNames(names) {
|
|
@@ -159768,8 +160105,8 @@ function createRenderPlan(args, now = /* @__PURE__ */ new Date()) {
|
|
|
159768
160105
|
}
|
|
159769
160106
|
if (typeof args["frames-cache-dir"] === "string" && args["frames-cache-dir"].trim() !== "") {
|
|
159770
160107
|
const raw = args["frames-cache-dir"].trim();
|
|
159771
|
-
const
|
|
159772
|
-
const isDisableAlias = EXTRACT_CACHE_DIR_DISABLED_ALIASES.includes(
|
|
160108
|
+
const normalized3 = raw.toLowerCase();
|
|
160109
|
+
const isDisableAlias = EXTRACT_CACHE_DIR_DISABLED_ALIASES.includes(normalized3);
|
|
159773
160110
|
environment.HYPERFRAMES_EXTRACT_CACHE_DIR = isDisableAlias ? raw : resolve53(raw);
|
|
159774
160111
|
}
|
|
159775
160112
|
if (args["max-concurrent-renders"] != null) {
|
|
@@ -160178,7 +160515,7 @@ __export(batchRender_exports, {
|
|
|
160178
160515
|
runBatchRender: () => runBatchRender
|
|
160179
160516
|
});
|
|
160180
160517
|
import { mkdirSync as mkdirSync46, readFileSync as readFileSync61, writeFileSync as writeFileSync35 } from "fs";
|
|
160181
|
-
import { dirname as dirname47, join as join104, resolve as resolve55, sep as
|
|
160518
|
+
import { dirname as dirname47, join as join104, resolve as resolve55, sep as sep16 } from "path";
|
|
160182
160519
|
function isRecord10(value) {
|
|
160183
160520
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
160184
160521
|
}
|
|
@@ -160235,7 +160572,7 @@ function resolveOutputTemplate(template, row, index) {
|
|
|
160235
160572
|
);
|
|
160236
160573
|
}
|
|
160237
160574
|
function isSameOrChildPath(path, parent) {
|
|
160238
|
-
return path === parent || path.startsWith(parent.endsWith(
|
|
160575
|
+
return path === parent || path.startsWith(parent.endsWith(sep16) ? parent : parent + sep16);
|
|
160239
160576
|
}
|
|
160240
160577
|
function commonOutputDirectory(outputPaths) {
|
|
160241
160578
|
const firstPath = outputPaths[0];
|
|
@@ -161284,7 +161621,7 @@ __export(render_exports, {
|
|
|
161284
161621
|
resolveBrowserGpuForCli: () => resolveBrowserGpuForCli,
|
|
161285
161622
|
runRenderLint: () => runRenderLint
|
|
161286
161623
|
});
|
|
161287
|
-
import { mkdtempSync as mkdtempSync20, readdirSync as
|
|
161624
|
+
import { mkdtempSync as mkdtempSync20, readdirSync as readdirSync35, readFileSync as readFileSync64, statSync as statSync35, writeFileSync as writeFileSync36, rmSync as rmSync34 } from "fs";
|
|
161288
161625
|
import { freemem as freemem5, tmpdir as tmpdir13 } from "os";
|
|
161289
161626
|
import { resolve as resolve56, dirname as dirname48, join as join105, basename as basename20 } from "path";
|
|
161290
161627
|
import { execFileSync as execFileSync12, spawn as spawn18 } from "child_process";
|
|
@@ -162125,7 +162462,7 @@ function readOutputFootprint(outputPath) {
|
|
|
162125
162462
|
const stat = statSync35(outputPath);
|
|
162126
162463
|
if (!stat.isDirectory()) return { fileSize: formatBytes(stat.size), isDirectory: false };
|
|
162127
162464
|
let total = 0;
|
|
162128
|
-
for (const entry of
|
|
162465
|
+
for (const entry of readdirSync35(outputPath, { withFileTypes: true })) {
|
|
162129
162466
|
if (!entry.isFile()) continue;
|
|
162130
162467
|
try {
|
|
162131
162468
|
total += statSync35(join105(outputPath, entry.name)).size;
|
|
@@ -162140,11 +162477,11 @@ function readOutputFootprint(outputPath) {
|
|
|
162140
162477
|
function printRenderComplete(input2) {
|
|
162141
162478
|
if (input2.quiet) return;
|
|
162142
162479
|
const { outputPath, elapsedMs, perf } = input2;
|
|
162143
|
-
const { fileSize, isDirectory } = readOutputFootprint(outputPath);
|
|
162480
|
+
const { fileSize, isDirectory: isDirectory2 } = readOutputFootprint(outputPath);
|
|
162144
162481
|
const detail = formatRenderSummaryDetail({
|
|
162145
162482
|
elapsedMs,
|
|
162146
162483
|
outputDurationSeconds: perf?.compositionDurationSeconds,
|
|
162147
|
-
isDirectory,
|
|
162484
|
+
isDirectory: isDirectory2,
|
|
162148
162485
|
frameCount: perf?.totalFrames,
|
|
162149
162486
|
playlistDirectory: input2.format === "hls"
|
|
162150
162487
|
});
|
|
@@ -162788,7 +163125,7 @@ __export(staticProjectServer_exports, {
|
|
|
162788
163125
|
});
|
|
162789
163126
|
import { createServer as createServer2 } from "http";
|
|
162790
163127
|
import { createReadStream as createReadStream8, existsSync as existsSync90, statSync as statSync36 } from "fs";
|
|
162791
|
-
import { isAbsolute as isAbsolute16, relative as
|
|
163128
|
+
import { isAbsolute as isAbsolute16, relative as relative27, resolve as resolve57 } from "path";
|
|
162792
163129
|
function serveFileWithRange(filePath, rangeHeader, res, contentType = getMimeType(filePath)) {
|
|
162793
163130
|
const size = statSync36(filePath).size;
|
|
162794
163131
|
const headers = {
|
|
@@ -162890,7 +163227,7 @@ async function serveStaticProjectHtml(projectDir, html, bindErrorMessage = "Fail
|
|
|
162890
163227
|
const requestPath = decodeURIComponent(pathOnly).replace(/^\//, "");
|
|
162891
163228
|
for (const root of roots) {
|
|
162892
163229
|
const filePath = resolve57(root, requestPath);
|
|
162893
|
-
const rel =
|
|
163230
|
+
const rel = relative27(root, filePath);
|
|
162894
163231
|
if (rel.startsWith("..") || isAbsolute16(rel)) continue;
|
|
162895
163232
|
if (existsSync90(filePath)) {
|
|
162896
163233
|
if (proxyRequest) {
|
|
@@ -163161,8 +163498,8 @@ function formatOverflow(overflow) {
|
|
|
163161
163498
|
}).join(", ");
|
|
163162
163499
|
}
|
|
163163
163500
|
function quoteText(text2) {
|
|
163164
|
-
const
|
|
163165
|
-
const truncated =
|
|
163501
|
+
const normalized3 = text2.replace(/\s+/g, " ").trim();
|
|
163502
|
+
const truncated = normalized3.length > 80 ? `${normalized3.slice(0, 77)}...` : normalized3;
|
|
163166
163503
|
return `"${truncated}"`;
|
|
163167
163504
|
}
|
|
163168
163505
|
function formatNumber(value) {
|
|
@@ -163394,7 +163731,7 @@ var init_motionAudit = __esm({
|
|
|
163394
163731
|
});
|
|
163395
163732
|
|
|
163396
163733
|
// src/utils/motionSpec.ts
|
|
163397
|
-
import { existsSync as existsSync91, readFileSync as readFileSync66, readdirSync as
|
|
163734
|
+
import { existsSync as existsSync91, readFileSync as readFileSync66, readdirSync as readdirSync36 } from "fs";
|
|
163398
163735
|
import { basename as basename21, join as join107 } from "path";
|
|
163399
163736
|
function isObject2(value) {
|
|
163400
163737
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -163438,7 +163775,7 @@ function parseMotionSpec(raw) {
|
|
|
163438
163775
|
}
|
|
163439
163776
|
function findMotionSpec(projectDir) {
|
|
163440
163777
|
if (!existsSync91(projectDir)) return null;
|
|
163441
|
-
const entries2 =
|
|
163778
|
+
const entries2 = readdirSync36(projectDir);
|
|
163442
163779
|
const sidecars = entries2.filter((name) => name.endsWith(".motion.json")).sort();
|
|
163443
163780
|
if (!sidecars[0]) return null;
|
|
163444
163781
|
if (sidecars.length === 1) return join107(projectDir, sidecars[0]);
|
|
@@ -165550,7 +165887,7 @@ var init_checkBrowser = __esm({
|
|
|
165550
165887
|
|
|
165551
165888
|
// src/utils/checkPipeline.ts
|
|
165552
165889
|
import { mkdirSync as mkdirSync50, writeFileSync as writeFileSync39 } from "fs";
|
|
165553
|
-
import { join as join111, relative as
|
|
165890
|
+
import { join as join111, relative as relative28 } from "path";
|
|
165554
165891
|
function selectContrastTimes(grid) {
|
|
165555
165892
|
if (grid.length <= 5) return [...grid];
|
|
165556
165893
|
return Array.from({ length: 5 }, (_, index) => {
|
|
@@ -166234,7 +166571,7 @@ async function runCheckPipeline(project, options, dependencies = DEFAULT_DEPENDE
|
|
|
166234
166571
|
"motion_spec_invalid",
|
|
166235
166572
|
"error",
|
|
166236
166573
|
motion.message,
|
|
166237
|
-
|
|
166574
|
+
relative28(project.dir, motion.path) || "index.motion.json"
|
|
166238
166575
|
)
|
|
166239
166576
|
] : [];
|
|
166240
166577
|
let browser;
|
|
@@ -167366,7 +167703,7 @@ __export(normalize_audio_exports, {
|
|
|
167366
167703
|
});
|
|
167367
167704
|
import { execFile as execFile9 } from "child_process";
|
|
167368
167705
|
import { existsSync as existsSync97, readFileSync as readFileSync71, renameSync as renameSync19, writeFileSync as writeFileSync41 } from "fs";
|
|
167369
|
-
import { isAbsolute as isAbsolute17, relative as
|
|
167706
|
+
import { isAbsolute as isAbsolute17, relative as relative29, resolve as resolve60 } from "path";
|
|
167370
167707
|
import { promisify as promisify8 } from "util";
|
|
167371
167708
|
function authoredNumber(raw, fallback, attribute2, id, strictlyPositive = false) {
|
|
167372
167709
|
if (raw === void 0) return fallback;
|
|
@@ -167534,7 +167871,7 @@ function resolveLocalAudioPath(projectDir, src) {
|
|
|
167534
167871
|
}
|
|
167535
167872
|
const root = resolve60(projectDir);
|
|
167536
167873
|
const file = resolve60(root, decoded);
|
|
167537
|
-
const rel =
|
|
167874
|
+
const rel = relative29(root, file);
|
|
167538
167875
|
if (!rel || rel === ".." || rel.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`)) {
|
|
167539
167876
|
throw new Error(`Audio source must be a local project file: ${src}`);
|
|
167540
167877
|
}
|
|
@@ -167651,7 +167988,7 @@ function requiredFfmpeg() {
|
|
|
167651
167988
|
function existingAudioFile(projectDir, tag) {
|
|
167652
167989
|
const file = resolveLocalAudioPath(projectDir, tag.src);
|
|
167653
167990
|
if (!existsSync97(file)) {
|
|
167654
|
-
throw new Error(`Audio #${tag.id} file was not found: ${
|
|
167991
|
+
throw new Error(`Audio #${tag.id} file was not found: ${relative29(projectDir, file)}`);
|
|
167655
167992
|
}
|
|
167656
167993
|
return file;
|
|
167657
167994
|
}
|
|
@@ -167710,7 +168047,7 @@ function printHumanResult(result) {
|
|
|
167710
168047
|
`Set #${result.targetId} data-volume ${result.previousVolume.toFixed(3)} \u2192 ${result.volume.toFixed(6)} (${result.changeDb >= 0 ? "+" : ""}${result.changeDb.toFixed(1)} dB).`
|
|
167711
168048
|
);
|
|
167712
168049
|
console.log(
|
|
167713
|
-
result.wrote ? c.success(`Updated ${
|
|
168050
|
+
result.wrote ? c.success(`Updated ${relative29(process.cwd(), result.indexPath) || "index.html"}.`) : c.dim("Dry run only. Pass --write to persist this gain.")
|
|
167714
168051
|
);
|
|
167715
168052
|
}
|
|
167716
168053
|
var execFileAsync4, FFMPEG_TIMEOUT_MS, DEFAULT_TOLERANCE_LU, examples14, normalize_audio_default;
|
|
@@ -168370,7 +168707,7 @@ function inlineComputedTimelines3(ast, timelineVar, resolve84) {
|
|
|
168370
168707
|
return expandStatements3([stmt], ctx);
|
|
168371
168708
|
});
|
|
168372
168709
|
}
|
|
168373
|
-
function
|
|
168710
|
+
function parseProgram5(script) {
|
|
168374
168711
|
try {
|
|
168375
168712
|
return parse3(script, {
|
|
168376
168713
|
ecmaVersion: "latest",
|
|
@@ -169496,7 +169833,7 @@ function assignStableIds5(anims) {
|
|
|
169496
169833
|
}
|
|
169497
169834
|
function parseGsapScriptAcorn3(script) {
|
|
169498
169835
|
try {
|
|
169499
|
-
const ast =
|
|
169836
|
+
const ast = parseProgram5(script);
|
|
169500
169837
|
const scope = collectScopeBindings5(ast);
|
|
169501
169838
|
const detection = findTimelineVar5(ast, scope);
|
|
169502
169839
|
const ref2 = detection.ref ?? { kind: "identifier", name: "tl" };
|
|
@@ -170388,7 +170725,7 @@ __export(keyframes_exports, {
|
|
|
170388
170725
|
surfaceComposition: () => surfaceComposition
|
|
170389
170726
|
});
|
|
170390
170727
|
import { existsSync as existsSync98, readFileSync as readFileSync73, statSync as statSync38 } from "fs";
|
|
170391
|
-
import { resolve as resolve62, dirname as dirname54, basename as basename23, join as join115, relative as
|
|
170728
|
+
import { resolve as resolve62, dirname as dirname54, basename as basename23, join as join115, relative as relative30, sep as sep17 } from "path";
|
|
170392
170729
|
function queryIncludingTemplates(html, selector) {
|
|
170393
170730
|
const doc = new DOMParser().parseFromString(html, "text/html");
|
|
170394
170731
|
const roots = [doc];
|
|
@@ -170592,8 +170929,8 @@ function addAnimationShorthandNames(body, knownNames, out) {
|
|
|
170592
170929
|
while (animationMatch = animationRe.exec(body)) {
|
|
170593
170930
|
for (const raw of animationMatch[1].split(",")) {
|
|
170594
170931
|
for (const token of raw.trim().split(/\s+/)) {
|
|
170595
|
-
const
|
|
170596
|
-
if (knownNames.has(
|
|
170932
|
+
const normalized3 = stripQuotes(token);
|
|
170933
|
+
if (knownNames.has(normalized3)) out.add(normalized3);
|
|
170597
170934
|
}
|
|
170598
170935
|
}
|
|
170599
170936
|
}
|
|
@@ -170883,7 +171220,7 @@ function resolveScope(args) {
|
|
|
170883
171220
|
comps = [surfaceComposition(readFileSync73(entryPath, "utf-8"), basename23(entryPath), entryPath)];
|
|
170884
171221
|
projectName = basename23(entryPath);
|
|
170885
171222
|
projectDir = findProjectRoot(entryPath);
|
|
170886
|
-
entryFile =
|
|
171223
|
+
entryFile = relative30(projectDir, entryPath).split(sep17).join("/");
|
|
170887
171224
|
} else {
|
|
170888
171225
|
const project = resolveProject(raw);
|
|
170889
171226
|
comps = collectCompositions(project.indexPath);
|
|
@@ -171047,8 +171384,8 @@ function createKeyframesCommand(options = {}) {
|
|
|
171047
171384
|
}
|
|
171048
171385
|
function normalizeRuntime(runtime, fallback) {
|
|
171049
171386
|
if (typeof runtime !== "string") return fallback;
|
|
171050
|
-
const
|
|
171051
|
-
return
|
|
171387
|
+
const normalized3 = runtime.toLowerCase();
|
|
171388
|
+
return normalized3 === "gsap" || normalized3 === "css" || normalized3 === "anime" || normalized3 === "all" ? normalized3 : fallback;
|
|
171052
171389
|
}
|
|
171053
171390
|
function filterCompositionsByRuntime(comps, runtime) {
|
|
171054
171391
|
return comps.map((cmp) => ({
|
|
@@ -171101,7 +171438,7 @@ __export(info_exports, {
|
|
|
171101
171438
|
examples: () => examples17,
|
|
171102
171439
|
orientation: () => orientation
|
|
171103
171440
|
});
|
|
171104
|
-
import { readFileSync as readFileSync74, readdirSync as
|
|
171441
|
+
import { readFileSync as readFileSync74, readdirSync as readdirSync37, statSync as statSync39 } from "fs";
|
|
171105
171442
|
import { join as join116 } from "path";
|
|
171106
171443
|
function orientation(width, height) {
|
|
171107
171444
|
if (width > height) return "landscape";
|
|
@@ -171115,7 +171452,7 @@ function durationFromHtml(html, fallback) {
|
|
|
171115
171452
|
}
|
|
171116
171453
|
function totalSize(dir) {
|
|
171117
171454
|
let total = 0;
|
|
171118
|
-
for (const entry of
|
|
171455
|
+
for (const entry of readdirSync37(dir, { withFileTypes: true })) {
|
|
171119
171456
|
const path = join116(dir, entry.name);
|
|
171120
171457
|
if (entry.isDirectory()) {
|
|
171121
171458
|
total += totalSize(path);
|
|
@@ -171394,7 +171731,7 @@ var init_clipFacts = __esm({
|
|
|
171394
171731
|
|
|
171395
171732
|
// src/timeline/describeProject.ts
|
|
171396
171733
|
import { readFileSync as readFileSync76, realpathSync as realpathSync10, statSync as statSync40 } from "fs";
|
|
171397
|
-
import { basename as basename24, dirname as dirname56, isAbsolute as isAbsolute18, relative as
|
|
171734
|
+
import { basename as basename24, dirname as dirname56, isAbsolute as isAbsolute18, relative as relative31, resolve as resolve64, sep as sep18 } from "path";
|
|
171398
171735
|
function toNode2(el) {
|
|
171399
171736
|
const attrs2 = {};
|
|
171400
171737
|
for (const { name, value } of Array.from(el.attributes)) attrs2[name] = value;
|
|
@@ -171550,7 +171887,7 @@ async function readSubComposition(src, parent, origin) {
|
|
|
171550
171887
|
const authored = resolve64(parent.dir, src);
|
|
171551
171888
|
const file = realFileInside(parent.projectDir, authored);
|
|
171552
171889
|
if (!file) return [];
|
|
171553
|
-
const relativeFile =
|
|
171890
|
+
const relativeFile = relative31(parent.projectDir, authored).split(sep18).join("/");
|
|
171554
171891
|
const source = parent.sourceOverrides.get(relativeFile) ?? readFileSync76(file, "utf-8");
|
|
171555
171892
|
const doc = new DOMParser().parseFromString(source, "text/html");
|
|
171556
171893
|
const template = doc.querySelector("template");
|
|
@@ -171562,7 +171899,7 @@ async function readSubComposition(src, parent, origin) {
|
|
|
171562
171899
|
startCache: /* @__PURE__ */ new Map(),
|
|
171563
171900
|
projectDir: parent.projectDir,
|
|
171564
171901
|
origin,
|
|
171565
|
-
file:
|
|
171902
|
+
file: relative31(parent.projectDir, authored).split(sep18).join("/"),
|
|
171566
171903
|
withProbeSlot: parent.withProbeSlot,
|
|
171567
171904
|
measure: parent.measure,
|
|
171568
171905
|
sourceOverrides: parent.sourceOverrides
|
|
@@ -171575,8 +171912,8 @@ async function readSubComposition(src, parent, origin) {
|
|
|
171575
171912
|
function realFileInside(projectDir, path) {
|
|
171576
171913
|
try {
|
|
171577
171914
|
const real = realpathSync10(path);
|
|
171578
|
-
const inside =
|
|
171579
|
-
if (inside === ".." || inside.startsWith(`..${
|
|
171915
|
+
const inside = relative31(realpathSync10(projectDir), real);
|
|
171916
|
+
if (inside === ".." || inside.startsWith(`..${sep18}`) || isAbsolute18(inside)) return null;
|
|
171580
171917
|
return statSync40(real).isFile() ? real : null;
|
|
171581
171918
|
} catch {
|
|
171582
171919
|
return null;
|
|
@@ -171781,9 +172118,9 @@ function parseTimeExpression(expression, context) {
|
|
|
171781
172118
|
const frames = /^(-?\d+(?:\.\d+)?)f$/.exec(raw);
|
|
171782
172119
|
if (frames) return { ok: true, seconds: Number(frames[1]) / context.fps };
|
|
171783
172120
|
const absolute = /^\d+(?:\.\d+)?$/.test(raw);
|
|
171784
|
-
const
|
|
172121
|
+
const relative39 = /^[+-]\d+(?:\.\d+)?$/.test(raw);
|
|
171785
172122
|
if (absolute) return { ok: true, seconds: Number(raw) };
|
|
171786
|
-
if (
|
|
172123
|
+
if (relative39) return { ok: true, seconds: context.row.start + Number(raw) };
|
|
171787
172124
|
const anchor = /^(after|before|start-of|end-of):(.+)$/.exec(raw);
|
|
171788
172125
|
if (!anchor) return { ok: false, reason: `invalid time expression: ${expression}` };
|
|
171789
172126
|
const row = context.resolveAnchor(anchor[2]);
|
|
@@ -173423,8 +173760,8 @@ function failWith(message, json) {
|
|
|
173423
173760
|
}
|
|
173424
173761
|
function parseExportFormat(value, json) {
|
|
173425
173762
|
if (!value) return void 0;
|
|
173426
|
-
const
|
|
173427
|
-
if (
|
|
173763
|
+
const normalized3 = value.toLowerCase();
|
|
173764
|
+
if (normalized3 === "srt" || normalized3 === "vtt") return normalized3;
|
|
173428
173765
|
failWith(`Unsupported caption export format: ${value}. Use srt or vtt.`, json);
|
|
173429
173766
|
}
|
|
173430
173767
|
function exitNoWords(json) {
|
|
@@ -173860,7 +174197,7 @@ __export(synthesize_exports, {
|
|
|
173860
174197
|
synthesize: () => synthesize
|
|
173861
174198
|
});
|
|
173862
174199
|
import { execFileSync as execFileSync15 } from "child_process";
|
|
173863
|
-
import { existsSync as existsSync106, mkdirSync as mkdirSync55, readdirSync as
|
|
174200
|
+
import { existsSync as existsSync106, mkdirSync as mkdirSync55, readdirSync as readdirSync38, unlinkSync as unlinkSync9 } from "fs";
|
|
173864
174201
|
import { join as join124, dirname as dirname58, basename as basename26 } from "path";
|
|
173865
174202
|
import { homedir as homedir23 } from "os";
|
|
173866
174203
|
function ensureSynthScript() {
|
|
@@ -173869,7 +174206,7 @@ function ensureSynthScript() {
|
|
|
173869
174206
|
writeNewFileSync(SCRIPT_PATH, SYNTH_SCRIPT);
|
|
173870
174207
|
const currentName = basename26(SCRIPT_PATH);
|
|
173871
174208
|
try {
|
|
173872
|
-
for (const entry of
|
|
174209
|
+
for (const entry of readdirSync38(SCRIPT_DIR)) {
|
|
173873
174210
|
if (entry !== currentName && /^synth(-v\d+)?\.py$/.test(entry)) {
|
|
173874
174211
|
try {
|
|
173875
174212
|
unlinkSync9(join124(SCRIPT_DIR, entry));
|
|
@@ -174766,7 +175103,7 @@ __export(upgrade_exports, {
|
|
|
174766
175103
|
upgradeProjectPins: () => upgradeProjectPins
|
|
174767
175104
|
});
|
|
174768
175105
|
import { execFileSync as execFileSync17 } from "child_process";
|
|
174769
|
-
import { existsSync as existsSync110, readFileSync as readFileSync84, writeFileSync as writeFileSync46, renameSync as renameSync20, readdirSync as
|
|
175106
|
+
import { existsSync as existsSync110, readFileSync as readFileSync84, writeFileSync as writeFileSync46, renameSync as renameSync20, readdirSync as readdirSync39 } from "fs";
|
|
174770
175107
|
import { resolve as resolve70 } from "path";
|
|
174771
175108
|
async function confirmUpgrade() {
|
|
174772
175109
|
const shouldUpgrade = await ue({ message: "Upgrade now?" });
|
|
@@ -174834,7 +175171,7 @@ async function upgradeProjectPins(dir, opts) {
|
|
|
174834
175171
|
const { latest } = await checkForUpdate(true);
|
|
174835
175172
|
if (!isSafeVersion(latest)) return { changed: false, from: [], to: latest, path: pkgPath };
|
|
174836
175173
|
const rewrite = rewriteProjectPinnedScripts(scripts, latest);
|
|
174837
|
-
const wrapperRewrites =
|
|
175174
|
+
const wrapperRewrites = readdirSync39(dir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".sh")).map((entry) => {
|
|
174838
175175
|
const path = resolve70(dir, entry.name);
|
|
174839
175176
|
return { path, rewrite: rewritePinnedHyperframesText(readFileSync84(path, "utf-8"), latest) };
|
|
174840
175177
|
});
|
|
@@ -175582,11 +175919,11 @@ function publishCaptureFileSync(path, data2, options) {
|
|
|
175582
175919
|
}
|
|
175583
175920
|
}
|
|
175584
175921
|
function writeCaptureFileSync(path, data2, options) {
|
|
175585
|
-
const
|
|
175586
|
-
if (
|
|
175587
|
-
return publishCaptureFileSync(path, data2,
|
|
175922
|
+
const normalized3 = typeof options === "string" ? { encoding: options } : options;
|
|
175923
|
+
if (normalized3?.flag === void 0 || normalized3.flag === "w") {
|
|
175924
|
+
return publishCaptureFileSync(path, data2, normalized3);
|
|
175588
175925
|
}
|
|
175589
|
-
writeFileSync47(path, data2, { ...
|
|
175926
|
+
writeFileSync47(path, data2, { ...normalized3, mode: 384 });
|
|
175590
175927
|
}
|
|
175591
175928
|
var init_captureFile = __esm({
|
|
175592
175929
|
"src/capture/captureFile.ts"() {
|
|
@@ -175604,7 +175941,7 @@ __export(contactSheet_exports, {
|
|
|
175604
175941
|
createSvgContactSheet: () => createSvgContactSheet
|
|
175605
175942
|
});
|
|
175606
175943
|
import sharp from "sharp";
|
|
175607
|
-
import { readdirSync as
|
|
175944
|
+
import { readdirSync as readdirSync40, readFileSync as readFileSync85, unlinkSync as unlinkSync10, existsSync as existsSync111 } from "fs";
|
|
175608
175945
|
import { join as join127, extname as extname19, basename as basename28, dirname as dirname62 } from "path";
|
|
175609
175946
|
async function createContactSheet(imagePaths, outputPath, opts = {}) {
|
|
175610
175947
|
const {
|
|
@@ -175689,7 +176026,7 @@ async function createContactSheetPages(imagePaths, outputBasePath, opts = {}, la
|
|
|
175689
176026
|
}
|
|
175690
176027
|
async function createScrollContactSheet(screenshotsDir, outputPath, budget = {}) {
|
|
175691
176028
|
if (!existsSync111(screenshotsDir)) return [];
|
|
175692
|
-
const scrollFiles =
|
|
176029
|
+
const scrollFiles = readdirSync40(screenshotsDir).filter((f) => f.startsWith("scroll-") && f.endsWith(".png")).sort();
|
|
175693
176030
|
if (scrollFiles.length === 0) return [];
|
|
175694
176031
|
const paths = scrollFiles.map((f) => join127(screenshotsDir, f));
|
|
175695
176032
|
const labels = scrollFiles.map((f) => {
|
|
@@ -175706,7 +176043,7 @@ async function createScrollContactSheet(screenshotsDir, outputPath, budget = {})
|
|
|
175706
176043
|
}
|
|
175707
176044
|
async function createSnapshotContactSheet(snapshotsDir, outputPath, budget = {}) {
|
|
175708
176045
|
if (!existsSync111(snapshotsDir)) return [];
|
|
175709
|
-
const snapshotFiles =
|
|
176046
|
+
const snapshotFiles = readdirSync40(snapshotsDir).filter((f) => f.startsWith("frame-") && f.endsWith(".png")).sort();
|
|
175710
176047
|
if (snapshotFiles.length === 0) return [];
|
|
175711
176048
|
const paths = snapshotFiles.map((f) => join127(snapshotsDir, f));
|
|
175712
176049
|
const labels = snapshotFiles.map((f) => {
|
|
@@ -175724,7 +176061,7 @@ async function createSnapshotContactSheet(snapshotsDir, outputPath, budget = {})
|
|
|
175724
176061
|
async function createAssetContactSheet(assetsDir, outputPath, budget = {}) {
|
|
175725
176062
|
if (!existsSync111(assetsDir)) return [];
|
|
175726
176063
|
const imageExts = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".webp"]);
|
|
175727
|
-
const assetFiles =
|
|
176064
|
+
const assetFiles = readdirSync40(assetsDir).filter((f) => imageExts.has(extname19(f).toLowerCase()) && !f.includes("contact-sheet")).sort();
|
|
175728
176065
|
if (assetFiles.length === 0) return [];
|
|
175729
176066
|
const paths = assetFiles.map((f) => join127(assetsDir, f));
|
|
175730
176067
|
return createContactSheetPages(paths, outputPath, {
|
|
@@ -175743,7 +176080,7 @@ async function createSvgContactSheet(svgsDir, outputPath, assetsRootDir, budget
|
|
|
175743
176080
|
const seen = /* @__PURE__ */ new Set();
|
|
175744
176081
|
const svgPaths = [];
|
|
175745
176082
|
for (const dir of dirsToScan) {
|
|
175746
|
-
for (const f of
|
|
176083
|
+
for (const f of readdirSync40(dir).filter((f2) => f2.endsWith(".svg")).sort()) {
|
|
175747
176084
|
if (!seen.has(f)) {
|
|
175748
176085
|
seen.add(f);
|
|
175749
176086
|
svgPaths.push(join127(dir, f));
|
|
@@ -175820,7 +176157,7 @@ __export(snapshot_exports, {
|
|
|
175820
176157
|
});
|
|
175821
176158
|
import { existsSync as existsSync112, mkdtempSync as mkdtempSync25, readFileSync as readFileSync86, mkdirSync as mkdirSync56, rmSync as rmSync38, writeFileSync as writeFileSync48 } from "fs";
|
|
175822
176159
|
import { tmpdir as tmpdir16 } from "os";
|
|
175823
|
-
import { resolve as resolve72, join as join128, relative as
|
|
176160
|
+
import { resolve as resolve72, join as join128, relative as relative33, isAbsolute as isAbsolute19, basename as basename29, posix as posix6 } from "path";
|
|
175824
176161
|
function orbitStageSource() {
|
|
175825
176162
|
return `function(cam) {
|
|
175826
176163
|
var root = document.querySelector("[data-composition-id]")
|
|
@@ -175989,8 +176326,8 @@ async function captureSnapshots(projectDir, opts) {
|
|
|
175989
176326
|
const snapshotDir = opts.outputDir ?? join128(projectDir, "snapshots");
|
|
175990
176327
|
mkdirSync56(snapshotDir, { recursive: true });
|
|
175991
176328
|
try {
|
|
175992
|
-
const { readdirSync:
|
|
175993
|
-
for (const file of
|
|
176329
|
+
const { readdirSync: readdirSync47 } = await import("fs");
|
|
176330
|
+
for (const file of readdirSync47(snapshotDir)) {
|
|
175994
176331
|
if (/\.(png|jpg|jpeg)$/i.test(file)) {
|
|
175995
176332
|
rmSync38(join128(snapshotDir, file), { force: true });
|
|
175996
176333
|
}
|
|
@@ -176081,7 +176418,7 @@ async function captureSnapshots(projectDir, opts) {
|
|
|
176081
176418
|
const url = new URL(v2.src);
|
|
176082
176419
|
const decodedPath = decodeURIComponent(url.pathname).replace(/^\//, "");
|
|
176083
176420
|
const candidate = resolve72(projectDir, decodedPath);
|
|
176084
|
-
const rel2 =
|
|
176421
|
+
const rel2 = relative33(projectDir, candidate);
|
|
176085
176422
|
if (!rel2.startsWith("..") && !isAbsolute19(rel2) && existsSync112(candidate)) {
|
|
176086
176423
|
ffmpegInput = candidate;
|
|
176087
176424
|
inputIsLocal = true;
|
|
@@ -176168,7 +176505,7 @@ async function captureSnapshots(projectDir, opts) {
|
|
|
176168
176505
|
});
|
|
176169
176506
|
}
|
|
176170
176507
|
}
|
|
176171
|
-
const rel =
|
|
176508
|
+
const rel = relative33(projectDir, framePath);
|
|
176172
176509
|
savedPaths.push(rel.startsWith("..") || isAbsolute19(rel) ? framePath : rel);
|
|
176173
176510
|
}
|
|
176174
176511
|
} finally {
|
|
@@ -176464,7 +176801,7 @@ var init_sourceMutation = __esm({
|
|
|
176464
176801
|
});
|
|
176465
176802
|
|
|
176466
176803
|
// src/utils/pathArgs.ts
|
|
176467
|
-
import { isAbsolute as isAbsolute20, relative as
|
|
176804
|
+
import { isAbsolute as isAbsolute20, relative as relative34, resolve as resolve73 } from "path";
|
|
176468
176805
|
function readOptionalString(value) {
|
|
176469
176806
|
if (typeof value !== "string") return void 0;
|
|
176470
176807
|
const trimmed = value.trim();
|
|
@@ -176474,7 +176811,7 @@ function resolveFromBase(baseDir, input2) {
|
|
|
176474
176811
|
return isAbsolute20(input2) ? input2 : resolve73(baseDir, input2);
|
|
176475
176812
|
}
|
|
176476
176813
|
function displayPathFromBase(baseDir, filePath) {
|
|
176477
|
-
const rel =
|
|
176814
|
+
const rel = relative34(baseDir, filePath);
|
|
176478
176815
|
if (rel && !rel.startsWith("..") && !isAbsolute20(rel)) return rel;
|
|
176479
176816
|
return filePath;
|
|
176480
176817
|
}
|
|
@@ -176769,7 +177106,7 @@ __export(media_treatment_exports, {
|
|
|
176769
177106
|
resolveMediaTreatmentSource: () => resolveMediaTreatmentSource
|
|
176770
177107
|
});
|
|
176771
177108
|
import { existsSync as existsSync113, readFileSync as readFileSync87, writeFileSync as writeFileSync49 } from "fs";
|
|
176772
|
-
import { join as join129, relative as
|
|
177109
|
+
import { join as join129, relative as relative35, resolve as resolve74 } from "path";
|
|
176773
177110
|
function getMediaTreatmentCapabilityOverview() {
|
|
176774
177111
|
const capabilities = getHfColorGradingCapabilities();
|
|
176775
177112
|
const family = (id, label2, description) => ({
|
|
@@ -177069,9 +177406,9 @@ function serializeGradingPatch(before3, patch) {
|
|
|
177069
177406
|
if (containsColorGradingVariableRef(grading)) {
|
|
177070
177407
|
return typeof grading === "string" ? grading.trim() : JSON.stringify(grading);
|
|
177071
177408
|
}
|
|
177072
|
-
const
|
|
177073
|
-
if (!
|
|
177074
|
-
return hasHfColorGradingAuthoredValues(
|
|
177409
|
+
const normalized3 = normalizeHfColorGrading(grading);
|
|
177410
|
+
if (!normalized3) throw new Error("--grading must be valid HyperFrames color-grading JSON");
|
|
177411
|
+
return hasHfColorGradingAuthoredValues(normalized3) ? serializeHfColorGrading(normalized3) : null;
|
|
177075
177412
|
}
|
|
177076
177413
|
function queryIncludingTemplates2(root, selector) {
|
|
177077
177414
|
const matches2 = Array.from(root.querySelectorAll(selector));
|
|
@@ -177217,7 +177554,7 @@ function analyzeTarget(args) {
|
|
|
177217
177554
|
selectorIndex
|
|
177218
177555
|
);
|
|
177219
177556
|
const source = mediaSourceForElement(element);
|
|
177220
|
-
const compositionFile =
|
|
177557
|
+
const compositionFile = relative35(project.dir, filePath).split("\\").join("/");
|
|
177221
177558
|
const mediaPath = resolveMediaTreatmentSource(project.dir, compositionFile, source);
|
|
177222
177559
|
return {
|
|
177223
177560
|
ok: true,
|
|
@@ -177253,7 +177590,7 @@ function prepareMutation2(args) {
|
|
|
177253
177590
|
payload: {
|
|
177254
177591
|
ok: true,
|
|
177255
177592
|
action,
|
|
177256
|
-
file:
|
|
177593
|
+
file: relative35(project.dir, filePath) || "index.html",
|
|
177257
177594
|
selector,
|
|
177258
177595
|
selectorIndex: selectorIndex ?? 0,
|
|
177259
177596
|
tag: result.tag,
|
|
@@ -177460,8 +177797,8 @@ function validateCell(label2, grading) {
|
|
|
177460
177797
|
}
|
|
177461
177798
|
function warnInactiveGradingCells(cells) {
|
|
177462
177799
|
for (const cell of cells) {
|
|
177463
|
-
const
|
|
177464
|
-
if (!isHfColorGradingActive(
|
|
177800
|
+
const normalized3 = normalizeHfColorGrading(cell.grading);
|
|
177801
|
+
if (!isHfColorGradingActive(normalized3)) {
|
|
177465
177802
|
console.error(
|
|
177466
177803
|
c.warn(`Warning: grading for "${cell.label}" is inactive/no-op \u2014 it will render ungraded`)
|
|
177467
177804
|
);
|
|
@@ -177487,11 +177824,11 @@ function buildGradeCompareSuccessPayload(sheet, cells, capResult) {
|
|
|
177487
177824
|
return { ok: true, sheet, cells, truncated: true, total: capResult.total };
|
|
177488
177825
|
}
|
|
177489
177826
|
function serializedGradingForCell(cell) {
|
|
177490
|
-
const
|
|
177491
|
-
if (!
|
|
177827
|
+
const normalized3 = normalizeHfColorGrading(cell.grading);
|
|
177828
|
+
if (!normalized3) {
|
|
177492
177829
|
throw new Error(`Invalid color grading for cell "${cell.label}"`);
|
|
177493
177830
|
}
|
|
177494
|
-
return serializeHfColorGrading(
|
|
177831
|
+
return serializeHfColorGrading(normalized3);
|
|
177495
177832
|
}
|
|
177496
177833
|
function lutSrcFromGrading(grading) {
|
|
177497
177834
|
if (!isRecord15(grading) || !hasOwn2(grading, "lut")) return null;
|
|
@@ -178939,11 +179276,11 @@ async function downloadAssets(tokens, outputDir, catalogedAssets, faviconLinks,
|
|
|
178939
179276
|
}
|
|
178940
179277
|
const toDownload = [];
|
|
178941
179278
|
for (const { url, isPoster } of imageUrls) {
|
|
178942
|
-
const
|
|
178943
|
-
if (downloadedUrls.has(
|
|
178944
|
-
downloadedUrls.add(
|
|
178945
|
-
const catalog = catalogedAssets?.find((a) => normalizeUrl(a.url) ===
|
|
178946
|
-
toDownload.push({ url, isPoster, normalized:
|
|
179279
|
+
const normalized3 = normalizeUrl(url);
|
|
179280
|
+
if (downloadedUrls.has(normalized3)) continue;
|
|
179281
|
+
downloadedUrls.add(normalized3);
|
|
179282
|
+
const catalog = catalogedAssets?.find((a) => normalizeUrl(a.url) === normalized3);
|
|
179283
|
+
toDownload.push({ url, isPoster, normalized: normalized3, catalog });
|
|
178947
179284
|
}
|
|
178948
179285
|
const BATCH_SIZE = 5;
|
|
178949
179286
|
let imgIdx = 0;
|
|
@@ -180150,7 +180487,7 @@ var agentPromptGenerator_exports = {};
|
|
|
180150
180487
|
__export(agentPromptGenerator_exports, {
|
|
180151
180488
|
generateAgentPrompt: () => generateAgentPrompt
|
|
180152
180489
|
});
|
|
180153
|
-
import { readdirSync as
|
|
180490
|
+
import { readdirSync as readdirSync41, existsSync as existsSync117 } from "fs";
|
|
180154
180491
|
import { join as join136 } from "path";
|
|
180155
180492
|
function inferColorRole(hex) {
|
|
180156
180493
|
const r = parseInt(hex.slice(1, 3), 16) / 255;
|
|
@@ -180186,7 +180523,7 @@ function buildPrompt(outputDir, url, tokens, hasScreenshot, hasLottie, hasShader
|
|
|
180186
180523
|
const baseName = baseFile.replace(/\.jpg$/, "");
|
|
180187
180524
|
const escapedBase = baseName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
180188
180525
|
const paginatedRe = new RegExp(`^${escapedBase}(?:-(\\d+))?\\.jpg$`);
|
|
180189
|
-
const all =
|
|
180526
|
+
const all = readdirSync41(fullDir).filter((f) => paginatedRe.test(f)).map((f) => ({ name: f, page: parseInt(f.match(paginatedRe)?.[1] ?? "0", 10) })).sort((a, b2) => a.page - b2.page).map((entry) => entry.name);
|
|
180190
180527
|
if (all.length === 0) return [];
|
|
180191
180528
|
if (all.length === 1) {
|
|
180192
180529
|
return [`| \`${dir}/${all[0]}\` | ${label2} |`];
|
|
@@ -180564,7 +180901,7 @@ var init_navigationPhase = __esm({
|
|
|
180564
180901
|
// src/capture/contentExtractor.ts
|
|
180565
180902
|
import {
|
|
180566
180903
|
existsSync as existsSync119,
|
|
180567
|
-
readdirSync as
|
|
180904
|
+
readdirSync as readdirSync43,
|
|
180568
180905
|
statSync as statSync44,
|
|
180569
180906
|
readFileSync as readFileSync91,
|
|
180570
180907
|
openSync as openSync14,
|
|
@@ -180852,7 +181189,7 @@ async function captionImagesWithGemini(outputDir, progress, warnings, options =
|
|
|
180852
181189
|
return response.text?.trim() || "";
|
|
180853
181190
|
};
|
|
180854
181191
|
}
|
|
180855
|
-
const imageFiles =
|
|
181192
|
+
const imageFiles = readdirSync43(join140(outputDir, "assets")).filter(
|
|
180856
181193
|
(f) => /\.(png|jpg|jpeg|webp|gif)$/i.test(f)
|
|
180857
181194
|
);
|
|
180858
181195
|
const BATCH_SIZE = 20;
|
|
@@ -180920,12 +181257,12 @@ async function captionImagesWithGemini(outputDir, progress, warnings, options =
|
|
|
180920
181257
|
);
|
|
180921
181258
|
const svgFiles = [];
|
|
180922
181259
|
const assetsDir = join140(outputDir, "assets");
|
|
180923
|
-
for (const f of
|
|
181260
|
+
for (const f of readdirSync43(assetsDir)) {
|
|
180924
181261
|
if (/\.svg$/i.test(f)) svgFiles.push({ file: f, relPath: f });
|
|
180925
181262
|
}
|
|
180926
181263
|
const svgsSubdir = join140(assetsDir, "svgs");
|
|
180927
181264
|
if (existsSync119(svgsSubdir)) {
|
|
180928
|
-
for (const f of
|
|
181265
|
+
for (const f of readdirSync43(svgsSubdir)) {
|
|
180929
181266
|
if (/\.svg$/i.test(f)) svgFiles.push({ file: f, relPath: `svgs/${f}` });
|
|
180930
181267
|
}
|
|
180931
181268
|
}
|
|
@@ -181034,7 +181371,7 @@ function generateAssetDescriptions(outputDir, tokens, catalogedAssets, geminiCap
|
|
|
181034
181371
|
const fontLines = [];
|
|
181035
181372
|
const assetsPath = join140(outputDir, "assets");
|
|
181036
181373
|
try {
|
|
181037
|
-
for (const file of
|
|
181374
|
+
for (const file of readdirSync43(assetsPath)) {
|
|
181038
181375
|
if (file === "svgs" || file === "fonts" || file === "lottie" || file === "videos") continue;
|
|
181039
181376
|
const filePath = join140(assetsPath, file);
|
|
181040
181377
|
const stat = statSync44(filePath);
|
|
@@ -181066,7 +181403,7 @@ function generateAssetDescriptions(outputDir, tokens, catalogedAssets, geminiCap
|
|
|
181066
181403
|
}
|
|
181067
181404
|
try {
|
|
181068
181405
|
const svgsPath = join140(assetsPath, "svgs");
|
|
181069
|
-
for (const file of
|
|
181406
|
+
for (const file of readdirSync43(svgsPath)) {
|
|
181070
181407
|
if (!file.endsWith(".svg")) continue;
|
|
181071
181408
|
const svgMatch = tokens.svgs.find(
|
|
181072
181409
|
(s) => s.label && file.includes(
|
|
@@ -181085,7 +181422,7 @@ function generateAssetDescriptions(outputDir, tokens, catalogedAssets, geminiCap
|
|
|
181085
181422
|
}
|
|
181086
181423
|
try {
|
|
181087
181424
|
const fontsPath = join140(assetsPath, "fonts");
|
|
181088
|
-
for (const file of
|
|
181425
|
+
for (const file of readdirSync43(fontsPath)) {
|
|
181089
181426
|
fontLines.push(`fonts/${file} \u2014 font file`);
|
|
181090
181427
|
}
|
|
181091
181428
|
} catch {
|
|
@@ -181284,7 +181621,7 @@ async function extractHtml(page, opts = {}) {
|
|
|
181284
181621
|
(_match, pre, urls, post) => {
|
|
181285
181622
|
const fixed = urls.replace(/&/g, "&").replace(
|
|
181286
181623
|
/(^|,\s*)(\/[^\s,]+)/g,
|
|
181287
|
-
(_m,
|
|
181624
|
+
(_m, sep19, path) => sep19 + pageOrigin + path
|
|
181288
181625
|
);
|
|
181289
181626
|
return pre + fixed + post;
|
|
181290
181627
|
}
|
|
@@ -182368,7 +182705,7 @@ var init_lottiePreviewRequests = __esm({
|
|
|
182368
182705
|
});
|
|
182369
182706
|
|
|
182370
182707
|
// src/capture/mediaCapture.ts
|
|
182371
|
-
import { mkdirSync as mkdirSync63, readdirSync as
|
|
182708
|
+
import { mkdirSync as mkdirSync63, readdirSync as readdirSync44, readFileSync as readFileSync93, statSync as statSync45 } from "fs";
|
|
182372
182709
|
import { join as join141, extname as extname25 } from "path";
|
|
182373
182710
|
function liveRemainingMs(budget, fallbackMs) {
|
|
182374
182711
|
return budget.remainingMs?.() ?? fallbackMs;
|
|
@@ -182419,7 +182756,7 @@ async function renderLottiePreviews(chromeBrowser, lottieDir, outputDir, budget
|
|
|
182419
182756
|
const manifest = [];
|
|
182420
182757
|
const previewDir = join141(lottieDir, "previews");
|
|
182421
182758
|
mkdirSync63(previewDir, { recursive: true });
|
|
182422
|
-
for (const file of
|
|
182759
|
+
for (const file of readdirSync44(lottieDir)) {
|
|
182423
182760
|
if (!file.endsWith(".json")) continue;
|
|
182424
182761
|
if (liveRemainingMs(budget, 1) <= 0) break;
|
|
182425
182762
|
try {
|
|
@@ -183570,7 +183907,7 @@ var init_coreExtractionPhase = __esm({
|
|
|
183570
183907
|
});
|
|
183571
183908
|
|
|
183572
183909
|
// src/capture/fontMetadataExtractor.ts
|
|
183573
|
-
import { readdirSync as
|
|
183910
|
+
import { readdirSync as readdirSync45, readFileSync as readFileSync94, existsSync as existsSync120 } from "fs";
|
|
183574
183911
|
import { join as join145 } from "path";
|
|
183575
183912
|
import * as fontkit from "fontkit";
|
|
183576
183913
|
function isFontCollection(value) {
|
|
@@ -183580,7 +183917,7 @@ function extractFontMetadata(fontsDir, outputPath) {
|
|
|
183580
183917
|
const files = [];
|
|
183581
183918
|
const unidentified = [];
|
|
183582
183919
|
if (existsSync120(fontsDir)) {
|
|
183583
|
-
const fontFiles =
|
|
183920
|
+
const fontFiles = readdirSync45(fontsDir).filter((f) => /\.(woff2?|ttf|otf)$/i.test(f));
|
|
183584
183921
|
for (const filename of fontFiles) {
|
|
183585
183922
|
const fullPath = join145(fontsDir, filename);
|
|
183586
183923
|
const meta = readSingleFont(fullPath, filename);
|
|
@@ -184720,7 +185057,7 @@ __export(state_exports, {
|
|
|
184720
185057
|
stateFilePath: () => stateFilePath,
|
|
184721
185058
|
writeStackOutputs: () => writeStackOutputs
|
|
184722
185059
|
});
|
|
184723
|
-
import { existsSync as existsSync123, mkdirSync as mkdirSync67, readdirSync as
|
|
185060
|
+
import { existsSync as existsSync123, mkdirSync as mkdirSync67, readdirSync as readdirSync46, readFileSync as readFileSync95, rmSync as rmSync41, writeFileSync as writeFileSync51 } from "fs";
|
|
184724
185061
|
import { dirname as dirname65, join as join148 } from "path";
|
|
184725
185062
|
function stateFilePath(stackName = DEFAULT_STACK_NAME, cwd = process.cwd()) {
|
|
184726
185063
|
return join148(cwd, STATE_DIR_NAME, `${STATE_FILE_PREFIX}${stackName}.json`);
|
|
@@ -184747,7 +185084,7 @@ function deleteStackOutputs(stackName = DEFAULT_STACK_NAME, cwd = process.cwd())
|
|
|
184747
185084
|
function listStackNames(cwd = process.cwd()) {
|
|
184748
185085
|
const dir = join148(cwd, STATE_DIR_NAME);
|
|
184749
185086
|
if (!existsSync123(dir)) return [];
|
|
184750
|
-
return
|
|
185087
|
+
return readdirSync46(dir).filter((f) => f.startsWith(STATE_FILE_PREFIX) && f.endsWith(".json")).map((f) => f.slice(STATE_FILE_PREFIX.length, -".json".length));
|
|
184751
185088
|
}
|
|
184752
185089
|
function requireStack(stackName, cwd = process.cwd()) {
|
|
184753
185090
|
const stack = readStackOutputs(stackName, cwd);
|
|
@@ -187164,7 +187501,7 @@ var init_poll = __esm({
|
|
|
187164
187501
|
import {
|
|
187165
187502
|
chmodSync as chmodSync2,
|
|
187166
187503
|
createWriteStream as createWriteStream4,
|
|
187167
|
-
lstatSync as
|
|
187504
|
+
lstatSync as lstatSync12,
|
|
187168
187505
|
mkdirSync as mkdirSync69,
|
|
187169
187506
|
mkdtempSync as mkdtempSync28,
|
|
187170
187507
|
readlinkSync as readlinkSync2,
|
|
@@ -187224,7 +187561,7 @@ async function downloadToFile(url, destPath, options = {}) {
|
|
|
187224
187561
|
function resolveDownloadDestination(destPath) {
|
|
187225
187562
|
let destination = resolve82(destPath);
|
|
187226
187563
|
for (let hops = 0; hops < 40; hops++) {
|
|
187227
|
-
if (!
|
|
187564
|
+
if (!lstatSync12(destination, { throwIfNoEntry: false })?.isSymbolicLink()) return destination;
|
|
187228
187565
|
destination = resolve82(dirname67(destination), readlinkSync2(destination));
|
|
187229
187566
|
}
|
|
187230
187567
|
throw new Error(`Too many symbolic links in download destination: ${destPath}`);
|
|
@@ -187744,7 +188081,7 @@ __export(render_exports3, {
|
|
|
187744
188081
|
validateDryRunSource: () => validateDryRunSource,
|
|
187745
188082
|
validateResolutionFormatCombo: () => validateResolutionFormatCombo
|
|
187746
188083
|
});
|
|
187747
|
-
import { isAbsolute as isAbsolute21, relative as
|
|
188084
|
+
import { isAbsolute as isAbsolute21, relative as relative36, resolve as resolvePath4 } from "path";
|
|
187748
188085
|
import { existsSync as existsSync130 } from "fs";
|
|
187749
188086
|
function parsePollIntervalMs(raw) {
|
|
187750
188087
|
const n3 = parseNumericFlag(raw, { flag: "--poll-interval", min: 1 });
|
|
@@ -187870,7 +188207,7 @@ function prepareLocalArchive(source, composition, asJson) {
|
|
|
187870
188207
|
}
|
|
187871
188208
|
try {
|
|
187872
188209
|
const fileMap = buildPublishFileMap(project.dir);
|
|
187873
|
-
const entryPath =
|
|
188210
|
+
const entryPath = relative36(
|
|
187874
188211
|
project.dir,
|
|
187875
188212
|
resolvePath4(project.dir, composition ?? "index.html")
|
|
187876
188213
|
).replaceAll("\\", "/");
|
|
@@ -190057,37 +190394,355 @@ var init_assetSnippet = __esm({
|
|
|
190057
190394
|
});
|
|
190058
190395
|
|
|
190059
190396
|
// ../core/dist/figma/sanitizeSvg.js
|
|
190060
|
-
function
|
|
190061
|
-
|
|
190062
|
-
|
|
190063
|
-
do {
|
|
190064
|
-
prev = out;
|
|
190065
|
-
out = out.replace(pattern, replacement);
|
|
190066
|
-
} while (out !== prev);
|
|
190067
|
-
return out;
|
|
190397
|
+
function localName(name) {
|
|
190398
|
+
const i = name.lastIndexOf(":");
|
|
190399
|
+
return i === -1 ? name : name.slice(i + 1);
|
|
190068
190400
|
}
|
|
190069
|
-
function
|
|
190070
|
-
|
|
190071
|
-
|
|
190072
|
-
|
|
190073
|
-
|
|
190074
|
-
|
|
190075
|
-
|
|
190076
|
-
|
|
190077
|
-
|
|
190078
|
-
|
|
190079
|
-
|
|
190080
|
-
|
|
190081
|
-
|
|
190082
|
-
|
|
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;
|
|
190083
190432
|
}
|
|
190084
|
-
function
|
|
190085
|
-
const
|
|
190086
|
-
return
|
|
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 : "";
|
|
190087
190486
|
}
|
|
190487
|
+
var SAFE_ELEMENTS, SAFE_ATTRIBUTES, SAFE_CSS_FUNCTIONS;
|
|
190088
190488
|
var init_sanitizeSvg = __esm({
|
|
190089
190489
|
"../core/dist/figma/sanitizeSvg.js"() {
|
|
190090
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
|
+
]);
|
|
190091
190746
|
}
|
|
190092
190747
|
});
|
|
190093
190748
|
|
|
@@ -190696,7 +191351,7 @@ __export(asset_exports, {
|
|
|
190696
191351
|
runAssetImportMany: () => runAssetImportMany
|
|
190697
191352
|
});
|
|
190698
191353
|
import { existsSync as existsSync133 } from "fs";
|
|
190699
|
-
import { join as join159, relative as
|
|
191354
|
+
import { join as join159, relative as relative37 } from "path";
|
|
190700
191355
|
function gatherAssetRefs(positionals) {
|
|
190701
191356
|
return positionals.flatMap((r) => /^https?:/i.test(r.trim()) ? [r] : r.split(",")).map((r) => r.trim()).filter((r) => r.length > 0);
|
|
190702
191357
|
}
|
|
@@ -190738,7 +191393,7 @@ async function freezeAndRecord(fileKey2, nodeId, url, ext, opts, version2, deps,
|
|
|
190738
191393
|
const record2 = {
|
|
190739
191394
|
id,
|
|
190740
191395
|
type: "image",
|
|
190741
|
-
path:
|
|
191396
|
+
path: relative37(deps.projectDir, destAbs),
|
|
190742
191397
|
source: `figma:${fileKey2}/${nodeId}`,
|
|
190743
191398
|
...description !== void 0 && { description },
|
|
190744
191399
|
...entity !== void 0 && { entity },
|
|
@@ -190982,7 +191637,7 @@ __export(component_exports, {
|
|
|
190982
191637
|
runComponentImport: () => runComponentImport
|
|
190983
191638
|
});
|
|
190984
191639
|
import { existsSync as existsSync134, mkdirSync as mkdirSync74, writeFileSync as writeFileSync59 } from "fs";
|
|
190985
|
-
import { join as join161, relative as
|
|
191640
|
+
import { join as join161, relative as relative38 } from "path";
|
|
190986
191641
|
function escapeAttr2(value) {
|
|
190987
191642
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
190988
191643
|
}
|
|
@@ -191032,7 +191687,7 @@ async function runComponentImport(refInput, deps) {
|
|
|
191032
191687
|
);
|
|
191033
191688
|
return {
|
|
191034
191689
|
name,
|
|
191035
|
-
htmlPath:
|
|
191690
|
+
htmlPath: relative38(deps.projectDir, htmlFile),
|
|
191036
191691
|
unresolved: bindings.unresolved,
|
|
191037
191692
|
rasterized: mapped.rasterize,
|
|
191038
191693
|
failedRasterize
|
|
@@ -191052,7 +191707,7 @@ async function rasterizeFallback(mapped, fileKey2, componentDir, deps) {
|
|
|
191052
191707
|
continue;
|
|
191053
191708
|
}
|
|
191054
191709
|
frozenAssets.push(asset.record.path);
|
|
191055
|
-
const srcRel =
|
|
191710
|
+
const srcRel = relative38(componentDir, join161(deps.projectDir, asset.record.path)).replaceAll(
|
|
191056
191711
|
"\\",
|
|
191057
191712
|
"/"
|
|
191058
191713
|
);
|