@remotion/renderer 2.6.15 → 2.6.16
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/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-lint.log +27 -21
- package/.turbo/turbo-test.log +34 -40
- package/dist/convert-mp3-to-pcm.d.ts +7 -0
- package/dist/convert-mp3-to-pcm.d.ts.map +1 -0
- package/dist/convert-mp3-to-pcm.js +41 -0
- package/dist/convert-mp3-to-pcm.js.map +1 -0
- package/dist/delay-render-embedded-stack.d.ts +3 -0
- package/dist/delay-render-embedded-stack.d.ts.map +1 -0
- package/dist/delay-render-embedded-stack.js +18 -0
- package/dist/delay-render-embedded-stack.js.map +1 -0
- package/dist/error-handling/handle-javascript-exception.d.ts +22 -0
- package/dist/error-handling/handle-javascript-exception.d.ts.map +1 -0
- package/dist/error-handling/handle-javascript-exception.js +73 -0
- package/dist/error-handling/handle-javascript-exception.js.map +1 -0
- package/dist/error-handling/symbolicate-error.d.ts +4 -0
- package/dist/error-handling/symbolicate-error.d.ts.map +1 -0
- package/dist/error-handling/symbolicate-error.js +22 -0
- package/dist/error-handling/symbolicate-error.js.map +1 -0
- package/dist/error-handling/symbolicateable-error.d.ts +17 -0
- package/dist/error-handling/symbolicateable-error.d.ts.map +1 -0
- package/dist/error-handling/symbolicateable-error.js +19 -0
- package/dist/error-handling/symbolicateable-error.js.map +1 -0
- package/dist/handle-javascript-exception.d.ts +32 -0
- package/dist/handle-javascript-exception.d.ts.map +1 -0
- package/dist/handle-javascript-exception.js +82 -0
- package/dist/handle-javascript-exception.js.map +1 -0
- package/dist/handle-null-audio.d.ts +1 -0
- package/dist/handle-null-audio.d.ts.map +1 -0
- package/dist/handle-null-audio.js +2 -0
- package/dist/handle-null-audio.js.map +1 -0
- package/dist/is-local-file.d.ts +2 -0
- package/dist/is-local-file.d.ts.map +1 -0
- package/dist/is-local-file.js +13 -0
- package/dist/is-local-file.js.map +1 -0
- package/dist/parse-browser-error-stack.d.ts +8 -0
- package/dist/parse-browser-error-stack.d.ts.map +1 -0
- package/dist/parse-browser-error-stack.js +88 -0
- package/dist/parse-browser-error-stack.js.map +1 -0
- package/dist/puppeteer-evaluate.d.ts +9 -0
- package/dist/puppeteer-evaluate.d.ts.map +1 -0
- package/dist/puppeteer-evaluate.js +157 -0
- package/dist/puppeteer-evaluate.js.map +1 -0
- package/dist/render-video.d.ts +38 -0
- package/dist/render-video.d.ts.map +1 -0
- package/dist/render-video.js +169 -0
- package/dist/render-video.js.map +1 -0
- package/dist/symbolicate-stacktrace.d.ts +17 -0
- package/dist/symbolicate-stacktrace.d.ts.map +1 -0
- package/dist/symbolicate-stacktrace.js +109 -0
- package/dist/symbolicate-stacktrace.js.map +1 -0
- package/dist/validate-frame.d.ts +2 -0
- package/dist/validate-frame.d.ts.map +1 -0
- package/dist/validate-frame.js +25 -0
- package/dist/validate-frame.js.map +1 -0
- package/dist/validate-quality.d.ts +1 -0
- package/dist/validate-quality.d.ts.map +1 -0
- package/dist/validate-quality.js +2 -0
- package/dist/validate-quality.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseStack = void 0;
|
|
4
|
+
const regexValidFrame_Chrome = /^\s*(at|in)\s.+(:\d+)/;
|
|
5
|
+
const regexValidFrame_FireFox = /(^|@)\S+:\d+|.+line\s+\d+\s+>\s+(eval|Function).+/;
|
|
6
|
+
const regexExtractLocation = /\(?(.+?)(?::(\d+))?(?::(\d+))?\)?$/;
|
|
7
|
+
function extractLocation(token) {
|
|
8
|
+
const execed = regexExtractLocation.exec(token);
|
|
9
|
+
if (!execed) {
|
|
10
|
+
throw new Error('Could not match in extractLocation');
|
|
11
|
+
}
|
|
12
|
+
return execed.slice(1).map((v) => {
|
|
13
|
+
const p = Number(v);
|
|
14
|
+
if (!isNaN(p)) {
|
|
15
|
+
return p;
|
|
16
|
+
}
|
|
17
|
+
return v;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const makeStackFrame = ({ functionName, fileName, lineNumber, columnNumber, }) => {
|
|
21
|
+
if (functionName && functionName.indexOf('Object.') === 0) {
|
|
22
|
+
functionName = functionName.slice('Object.'.length);
|
|
23
|
+
}
|
|
24
|
+
if (
|
|
25
|
+
// Chrome has a bug with inferring function.name:
|
|
26
|
+
// https://github.com/facebook/create-react-app/issues/2097
|
|
27
|
+
// Let's ignore a meaningless name we get for top-level modules.
|
|
28
|
+
functionName === 'friendlySyntaxErrorLabel' ||
|
|
29
|
+
functionName === 'exports.__esModule' ||
|
|
30
|
+
functionName === '<anonymous>' ||
|
|
31
|
+
!functionName) {
|
|
32
|
+
functionName = null;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
columnNumber,
|
|
36
|
+
fileName,
|
|
37
|
+
functionName,
|
|
38
|
+
lineNumber,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const parseStack = (stack) => {
|
|
42
|
+
const frames = stack
|
|
43
|
+
.filter((e) => regexValidFrame_Chrome.test(e) || regexValidFrame_FireFox.test(e))
|
|
44
|
+
.map((e) => {
|
|
45
|
+
if (regexValidFrame_FireFox.test(e)) {
|
|
46
|
+
// Strip eval, we don't care about it
|
|
47
|
+
let isEval = false;
|
|
48
|
+
if (/ > (eval|Function)/.test(e)) {
|
|
49
|
+
e = e.replace(/ line (\d+)(?: > eval line \d+)* > (eval|Function):\d+:\d+/g, ':$1');
|
|
50
|
+
isEval = true;
|
|
51
|
+
}
|
|
52
|
+
const _data = e.split(/[@]/g);
|
|
53
|
+
const _last = _data.pop();
|
|
54
|
+
if (!_last) {
|
|
55
|
+
throw new Error('could not get last');
|
|
56
|
+
}
|
|
57
|
+
const [_fileName, _lineNumber, _columnNumber] = extractLocation(_last);
|
|
58
|
+
return makeStackFrame({
|
|
59
|
+
functionName: _data.join('@') || (isEval ? 'eval' : null),
|
|
60
|
+
fileName: _fileName,
|
|
61
|
+
lineNumber: _lineNumber,
|
|
62
|
+
columnNumber: _columnNumber,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// Strip eval, we don't care about it
|
|
66
|
+
if (e.indexOf('(eval ') !== -1) {
|
|
67
|
+
e = e.replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
|
|
68
|
+
}
|
|
69
|
+
if (e.indexOf('(at ') !== -1) {
|
|
70
|
+
e = e.replace(/\(at /, '(');
|
|
71
|
+
}
|
|
72
|
+
const data = e.trim().split(/\s+/g).slice(1);
|
|
73
|
+
const last = data.pop();
|
|
74
|
+
if (!last) {
|
|
75
|
+
throw new Error('could not get last');
|
|
76
|
+
}
|
|
77
|
+
const [fileName, lineNumber, columnNumber] = extractLocation(last);
|
|
78
|
+
return makeStackFrame({
|
|
79
|
+
functionName: data.join(' ') || null,
|
|
80
|
+
fileName,
|
|
81
|
+
lineNumber,
|
|
82
|
+
columnNumber,
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
return frames;
|
|
86
|
+
};
|
|
87
|
+
exports.parseStack = parseStack;
|
|
88
|
+
//# sourceMappingURL=parse-browser-error-stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-browser-error-stack.js","sourceRoot":"","sources":["../src/parse-browser-error-stack.ts"],"names":[],"mappings":";;;AAAA,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AACvD,MAAM,uBAAuB,GAC5B,mDAAmD,CAAC;AASrD,MAAM,oBAAoB,GAAG,oCAAoC,CAAC;AAElE,SAAS,eAAe,CAAC,KAAa;IACrC,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACtD;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC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I,CAAC,CAAC;QACnE,OAAO,cAAc,CAAC;YACrB,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI;YACpC,QAAQ;YACR,UAAU;YACV,YAAY;SACZ,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IACJ,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAxDW,QAAA,UAAU,cAwDrB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Page } from 'puppeteer-core';
|
|
2
|
+
export declare const EVALUATION_SCRIPT_URL = "__puppeteer_evaluation_script__";
|
|
3
|
+
export declare function puppeteerEvaluateWithCatch<ReturnType>({ page, pageFunction, frame, args, }: {
|
|
4
|
+
page: Page;
|
|
5
|
+
pageFunction: Function | string;
|
|
6
|
+
frame: number | null;
|
|
7
|
+
args: unknown[];
|
|
8
|
+
}): Promise<ReturnType>;
|
|
9
|
+
//# sourceMappingURL=puppeteer-evaluate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"puppeteer-evaluate.d.ts","sourceRoot":"","sources":["../src/puppeteer-evaluate.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,IAAI,EAAW,MAAM,gBAAgB,CAAC;AAIpE,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AA+BvE,wBAAsB,0BAA0B,CAAC,UAAU,EAAE,EAC5D,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,IAAI,GACJ,EAAE;IACF,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,QAAQ,GAAG,MAAM,CAAC;IAChC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,OAAO,EAAE,CAAC;CAChB,GAAG,OAAO,CAAC,UAAU,CAAC,CAsGtB"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.puppeteerEvaluateWithCatch = exports.EVALUATION_SCRIPT_URL = void 0;
|
|
4
|
+
/* eslint-disable no-new */
|
|
5
|
+
const puppeteer_core_1 = require("puppeteer-core");
|
|
6
|
+
const symbolicateable_error_1 = require("./error-handling/symbolicateable-error");
|
|
7
|
+
const parse_browser_error_stack_1 = require("./parse-browser-error-stack");
|
|
8
|
+
exports.EVALUATION_SCRIPT_URL = '__puppeteer_evaluation_script__';
|
|
9
|
+
const SOURCE_URL_REGEX = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m;
|
|
10
|
+
function valueFromRemoteObject(remoteObject) {
|
|
11
|
+
if (remoteObject.unserializableValue) {
|
|
12
|
+
if (remoteObject.type === 'bigint' && typeof BigInt !== 'undefined')
|
|
13
|
+
return BigInt(remoteObject.unserializableValue.replace('n', ''));
|
|
14
|
+
switch (remoteObject.unserializableValue) {
|
|
15
|
+
case '-0':
|
|
16
|
+
return -0;
|
|
17
|
+
case 'NaN':
|
|
18
|
+
return NaN;
|
|
19
|
+
case 'Infinity':
|
|
20
|
+
return Infinity;
|
|
21
|
+
case '-Infinity':
|
|
22
|
+
return -Infinity;
|
|
23
|
+
default:
|
|
24
|
+
throw new Error('Unsupported unserializable value: ' +
|
|
25
|
+
remoteObject.unserializableValue);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return remoteObject.value;
|
|
29
|
+
}
|
|
30
|
+
function isString(obj) {
|
|
31
|
+
return typeof obj === 'string' || obj instanceof String;
|
|
32
|
+
}
|
|
33
|
+
async function puppeteerEvaluateWithCatch({ page, pageFunction, frame, args, }) {
|
|
34
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
35
|
+
const contextId = (await page.mainFrame().executionContext())._contextId;
|
|
36
|
+
const client = page._client;
|
|
37
|
+
const suffix = `//# sourceURL=${exports.EVALUATION_SCRIPT_URL}`;
|
|
38
|
+
if (isString(pageFunction)) {
|
|
39
|
+
const expression = pageFunction;
|
|
40
|
+
const expressionWithSourceUrl = SOURCE_URL_REGEX.test(expression)
|
|
41
|
+
? expression
|
|
42
|
+
: expression + '\n' + suffix;
|
|
43
|
+
const { exceptionDetails: exceptDetails, result: remotObject } = (await client.send('Runtime.evaluate', {
|
|
44
|
+
expression: expressionWithSourceUrl,
|
|
45
|
+
contextId,
|
|
46
|
+
returnByValue: true,
|
|
47
|
+
awaitPromise: true,
|
|
48
|
+
userGesture: true,
|
|
49
|
+
}));
|
|
50
|
+
if (exceptDetails === null || exceptDetails === void 0 ? void 0 : exceptDetails.exception) {
|
|
51
|
+
const err = new symbolicateable_error_1.SymbolicateableError({
|
|
52
|
+
stack: exceptDetails.exception.description,
|
|
53
|
+
name: exceptDetails.exception.className,
|
|
54
|
+
message: (_b = (_a = exceptDetails.exception.description) === null || _a === void 0 ? void 0 : _a.split('\n')) === null || _b === void 0 ? void 0 : _b[0],
|
|
55
|
+
frame,
|
|
56
|
+
stackFrame: (0, parse_browser_error_stack_1.parseStack)(exceptDetails.exception.description.split('\n')),
|
|
57
|
+
});
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
60
|
+
return valueFromRemoteObject(remotObject);
|
|
61
|
+
}
|
|
62
|
+
if (typeof pageFunction !== 'function')
|
|
63
|
+
throw new Error(`Expected to get |string| or |function| as the first argument, but got "${pageFunction}" instead.`);
|
|
64
|
+
let functionText = pageFunction.toString();
|
|
65
|
+
try {
|
|
66
|
+
// eslint-disable-next-line no-new-func
|
|
67
|
+
new Function('(' + functionText + ')');
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
// This means we might have a function shorthand. Try another
|
|
71
|
+
// time prefixing 'function '.
|
|
72
|
+
if (functionText.startsWith('async '))
|
|
73
|
+
functionText =
|
|
74
|
+
'async function ' + functionText.substring('async '.length);
|
|
75
|
+
else
|
|
76
|
+
functionText = 'function ' + functionText;
|
|
77
|
+
try {
|
|
78
|
+
// eslint-disable-next-line no-new-func
|
|
79
|
+
new Function('(' + functionText + ')');
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
// We tried hard to serialize, but there's a weird beast here.
|
|
83
|
+
throw new Error('Passed function is not well-serializable!');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
let callFunctionOnPromise;
|
|
87
|
+
try {
|
|
88
|
+
callFunctionOnPromise = client.send('Runtime.callFunctionOn', {
|
|
89
|
+
functionDeclaration: functionText + '\n' + suffix + '\n',
|
|
90
|
+
executionContextId: contextId,
|
|
91
|
+
arguments: args.map((a) => convertArgument(a)),
|
|
92
|
+
returnByValue: true,
|
|
93
|
+
awaitPromise: true,
|
|
94
|
+
userGesture: true,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
if (error instanceof TypeError &&
|
|
99
|
+
error.message.startsWith('Converting circular structure to JSON'))
|
|
100
|
+
error.message += ' Are you passing a nested JSHandle?';
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
const { exceptionDetails, result: remoteObject } = await callFunctionOnPromise;
|
|
104
|
+
if (exceptionDetails) {
|
|
105
|
+
const err = new symbolicateable_error_1.SymbolicateableError({
|
|
106
|
+
stack: (_c = exceptionDetails.exception) === null || _c === void 0 ? void 0 : _c.description,
|
|
107
|
+
name: (_d = exceptionDetails.exception) === null || _d === void 0 ? void 0 : _d.className,
|
|
108
|
+
message: (_f = (_e = exceptionDetails.exception) === null || _e === void 0 ? void 0 : _e.description) === null || _f === void 0 ? void 0 : _f.split('\n')[0],
|
|
109
|
+
frame,
|
|
110
|
+
stackFrame: (0, parse_browser_error_stack_1.parseStack)(((_g = exceptionDetails.exception) === null || _g === void 0 ? void 0 : _g.description).split('\n')),
|
|
111
|
+
});
|
|
112
|
+
throw err;
|
|
113
|
+
}
|
|
114
|
+
return valueFromRemoteObject(remoteObject);
|
|
115
|
+
}
|
|
116
|
+
exports.puppeteerEvaluateWithCatch = puppeteerEvaluateWithCatch;
|
|
117
|
+
/**
|
|
118
|
+
* @param {*} arg
|
|
119
|
+
* @returns {*}
|
|
120
|
+
* @this {ExecutionContext}
|
|
121
|
+
*/
|
|
122
|
+
function convertArgument(arg) {
|
|
123
|
+
if (typeof arg === 'number') {
|
|
124
|
+
return { value: arg };
|
|
125
|
+
}
|
|
126
|
+
if (typeof arg === 'string') {
|
|
127
|
+
return { value: arg };
|
|
128
|
+
}
|
|
129
|
+
if (typeof arg === 'boolean') {
|
|
130
|
+
return { value: arg };
|
|
131
|
+
}
|
|
132
|
+
if (typeof arg === 'bigint')
|
|
133
|
+
// eslint-disable-line valid-typeof
|
|
134
|
+
return { unserializableValue: `${arg.toString()}n` };
|
|
135
|
+
if (Object.is(arg, -0))
|
|
136
|
+
return { unserializableValue: '-0' };
|
|
137
|
+
if (Object.is(arg, Infinity))
|
|
138
|
+
return { unserializableValue: 'Infinity' };
|
|
139
|
+
if (Object.is(arg, -Infinity))
|
|
140
|
+
return { unserializableValue: '-Infinity' };
|
|
141
|
+
if (Object.is(arg, NaN))
|
|
142
|
+
return { unserializableValue: 'NaN' };
|
|
143
|
+
const objectHandle = arg && arg instanceof puppeteer_core_1.JSHandle ? arg : null;
|
|
144
|
+
if (objectHandle) {
|
|
145
|
+
if (objectHandle._disposed)
|
|
146
|
+
throw new Error('JSHandle is disposed!');
|
|
147
|
+
if (objectHandle._remoteObject.unserializableValue)
|
|
148
|
+
return {
|
|
149
|
+
unserializableValue: objectHandle._remoteObject.unserializableValue,
|
|
150
|
+
};
|
|
151
|
+
if (!objectHandle._remoteObject.objectId)
|
|
152
|
+
return { value: objectHandle._remoteObject.value };
|
|
153
|
+
return { objectId: objectHandle._remoteObject.objectId };
|
|
154
|
+
}
|
|
155
|
+
return { value: arg };
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=puppeteer-evaluate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"puppeteer-evaluate.js","sourceRoot":"","sources":["../src/puppeteer-evaluate.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AAC3B,mDAAoE;AACpE,kF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AmB,EAAE,KAAK,EAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,GAAG,IAAI,GAAG,YAAY,yBAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IACjE,IAAI,YAAY,EAAE;QACjB,IAAI,YAAY,CAAC,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACrE,IAAI,YAAY,CAAC,aAAa,CAAC,mBAAmB;YACjD,OAAO;gBACN,mBAAmB,EAAE,YAAY,CAAC,aAAa,CAAC,mBAAmB;aACnE,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,QAAQ;YACvC,OAAO,EAAC,KAAK,EAAE,YAAY,CAAC,aAAa,CAAC,KAAK,EAAC,CAAC;QAClD,OAAO,EAAC,QAAQ,EAAE,YAAY,CAAC,aAAa,CAAC,QAAQ,EAAC,CAAC;KACvD;IAED,OAAO,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Browser as PuppeteerBrowser } from 'puppeteer-core';
|
|
2
|
+
import { Browser, Codec, FfmpegExecutable, FrameRange, PixelFormat, ProResProfile, TCompMetadata } from 'remotion';
|
|
3
|
+
export declare type RenderVideoOnDownload = (src: string) => void;
|
|
4
|
+
export declare type RenderVideoOnProgress = (progress: {
|
|
5
|
+
renderedFrames: number;
|
|
6
|
+
encodedFrames: number;
|
|
7
|
+
encodedDoneIn: number | null;
|
|
8
|
+
renderedDoneIn: number | null;
|
|
9
|
+
stitchStage: 'encoding' | 'muxing';
|
|
10
|
+
}) => void;
|
|
11
|
+
export declare type RenderVideoOptions = {
|
|
12
|
+
proResProfile: ProResProfile | undefined;
|
|
13
|
+
parallelism: number | null;
|
|
14
|
+
parallelEncoding: boolean;
|
|
15
|
+
crf: number | null;
|
|
16
|
+
outputDir: string;
|
|
17
|
+
config: TCompMetadata;
|
|
18
|
+
imageFormat: 'png' | 'jpeg' | 'none';
|
|
19
|
+
ffmpegExecutable: FfmpegExecutable;
|
|
20
|
+
inputProps: object;
|
|
21
|
+
pixelFormat: PixelFormat;
|
|
22
|
+
codec: Codec;
|
|
23
|
+
envVariables: Record<string, string>;
|
|
24
|
+
quality: number | undefined;
|
|
25
|
+
frameRange: FrameRange | null;
|
|
26
|
+
browser: Browser;
|
|
27
|
+
serveUrl: string;
|
|
28
|
+
openedBrowser: PuppeteerBrowser;
|
|
29
|
+
overwrite: boolean;
|
|
30
|
+
absoluteOutputFile: string;
|
|
31
|
+
onProgress: RenderVideoOnProgress;
|
|
32
|
+
shouldOutputImageSequence: boolean;
|
|
33
|
+
fileExtension: string | null;
|
|
34
|
+
bundled: string;
|
|
35
|
+
onDownload: (src: string) => void;
|
|
36
|
+
};
|
|
37
|
+
export declare const renderVideo: ({ parallelism, proResProfile, parallelEncoding, crf, outputDir, config, imageFormat, ffmpegExecutable, inputProps, pixelFormat, codec, envVariables, quality, frameRange, browser, serveUrl, openedBrowser, absoluteOutputFile, onProgress, overwrite, shouldOutputImageSequence, fileExtension, bundled, onDownload, }: RenderVideoOptions) => Promise<void>;
|
|
38
|
+
//# sourceMappingURL=render-video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-video.d.ts","sourceRoot":"","sources":["../src/render-video.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACN,OAAO,EACP,KAAK,EACL,gBAAgB,EAChB,UAAU,EAEV,WAAW,EACX,aAAa,EACb,aAAa,EACb,MAAM,UAAU,CAAC;AAIlB,oBAAY,qBAAqB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;AAE1D,oBAAY,qBAAqB,GAAG,CAAC,QAAQ,EAAE;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa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{
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.renderVideo = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const remotion_1 = require("remotion");
|
|
10
|
+
const stitcher_1 = require("./stitcher");
|
|
11
|
+
const render_1 = require("./render");
|
|
12
|
+
const renderVideo = async ({ parallelism, proResProfile, parallelEncoding, crf, outputDir, config, imageFormat, ffmpegExecutable, inputProps, pixelFormat, codec, envVariables, quality, frameRange, browser, serveUrl, openedBrowser, absoluteOutputFile, onProgress, overwrite, shouldOutputImageSequence, fileExtension, bundled, onDownload, }) => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
let stitcherFfmpeg;
|
|
15
|
+
let preStitcher;
|
|
16
|
+
let encodedFrames = 0;
|
|
17
|
+
let renderedFrames = 0;
|
|
18
|
+
let preEncodedFileLocation;
|
|
19
|
+
let renderedDoneIn = null;
|
|
20
|
+
let encodedDoneIn = null;
|
|
21
|
+
const renderStart = Date.now();
|
|
22
|
+
if (parallelEncoding) {
|
|
23
|
+
if (typeof crf !== 'number') {
|
|
24
|
+
throw new TypeError('CRF is unexpectedly not a number');
|
|
25
|
+
}
|
|
26
|
+
preEncodedFileLocation = path_1.default.join(outputDir, 'pre-encode.' + fileExtension);
|
|
27
|
+
preStitcher = await (0, stitcher_1.spawnFfmpeg)({
|
|
28
|
+
dir: outputDir,
|
|
29
|
+
width: config.width,
|
|
30
|
+
height: config.height,
|
|
31
|
+
fps: config.fps,
|
|
32
|
+
outputLocation: preEncodedFileLocation,
|
|
33
|
+
force: true,
|
|
34
|
+
imageFormat,
|
|
35
|
+
pixelFormat,
|
|
36
|
+
codec,
|
|
37
|
+
proResProfile,
|
|
38
|
+
crf,
|
|
39
|
+
parallelism,
|
|
40
|
+
onProgress: (frame) => {
|
|
41
|
+
encodedFrames = frame;
|
|
42
|
+
onProgress({
|
|
43
|
+
encodedFrames,
|
|
44
|
+
renderedFrames,
|
|
45
|
+
encodedDoneIn: null,
|
|
46
|
+
renderedDoneIn: null,
|
|
47
|
+
stitchStage: 'encoding',
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
verbose: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
51
|
+
parallelEncoding,
|
|
52
|
+
webpackBundle: bundled,
|
|
53
|
+
ffmpegExecutable,
|
|
54
|
+
assetsInfo: { assets: [] },
|
|
55
|
+
});
|
|
56
|
+
stitcherFfmpeg = preStitcher.task;
|
|
57
|
+
}
|
|
58
|
+
const renderer = (0, render_1.renderFrames)({
|
|
59
|
+
config,
|
|
60
|
+
onFrameUpdate: (frame) => {
|
|
61
|
+
renderedFrames = frame;
|
|
62
|
+
onProgress({
|
|
63
|
+
encodedFrames,
|
|
64
|
+
renderedFrames,
|
|
65
|
+
encodedDoneIn,
|
|
66
|
+
renderedDoneIn,
|
|
67
|
+
stitchStage: 'encoding',
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
parallelism,
|
|
71
|
+
parallelEncoding,
|
|
72
|
+
outputDir,
|
|
73
|
+
onStart: () => {
|
|
74
|
+
renderedFrames = 0;
|
|
75
|
+
onProgress({
|
|
76
|
+
encodedDoneIn,
|
|
77
|
+
encodedFrames,
|
|
78
|
+
renderedDoneIn,
|
|
79
|
+
renderedFrames,
|
|
80
|
+
// TODO: Keep a state
|
|
81
|
+
stitchStage: 'encoding',
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
inputProps,
|
|
85
|
+
envVariables,
|
|
86
|
+
imageFormat,
|
|
87
|
+
quality,
|
|
88
|
+
browser,
|
|
89
|
+
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
90
|
+
puppeteerInstance: openedBrowser,
|
|
91
|
+
writeFrame: async (buffer) => {
|
|
92
|
+
var _a;
|
|
93
|
+
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.write(buffer);
|
|
94
|
+
},
|
|
95
|
+
serveUrl,
|
|
96
|
+
});
|
|
97
|
+
const { assetsInfo } = await renderer;
|
|
98
|
+
if (stitcherFfmpeg) {
|
|
99
|
+
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.end();
|
|
100
|
+
await stitcherFfmpeg;
|
|
101
|
+
(_b = preStitcher === null || preStitcher === void 0 ? void 0 : preStitcher.cleanup) === null || _b === void 0 ? void 0 : _b.call(preStitcher);
|
|
102
|
+
}
|
|
103
|
+
const closeBrowserPromise = openedBrowser.close();
|
|
104
|
+
renderedDoneIn = Date.now() - renderStart;
|
|
105
|
+
onProgress({
|
|
106
|
+
encodedFrames,
|
|
107
|
+
renderedFrames,
|
|
108
|
+
renderedDoneIn,
|
|
109
|
+
encodedDoneIn,
|
|
110
|
+
stitchStage: 'encoding',
|
|
111
|
+
});
|
|
112
|
+
if (process.env.DEBUG) {
|
|
113
|
+
remotion_1.Internals.perf.logPerf();
|
|
114
|
+
}
|
|
115
|
+
if (shouldOutputImageSequence) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (typeof crf !== 'number') {
|
|
119
|
+
throw new TypeError('CRF is unexpectedly not a number');
|
|
120
|
+
}
|
|
121
|
+
const dirName = path_1.default.dirname(absoluteOutputFile);
|
|
122
|
+
if (!fs_1.default.existsSync(dirName)) {
|
|
123
|
+
fs_1.default.mkdirSync(dirName, {
|
|
124
|
+
recursive: true,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const stitchStart = Date.now();
|
|
128
|
+
await (0, stitcher_1.stitchFramesToVideo)({
|
|
129
|
+
dir: outputDir,
|
|
130
|
+
width: config.width,
|
|
131
|
+
height: config.height,
|
|
132
|
+
fps: config.fps,
|
|
133
|
+
outputLocation: absoluteOutputFile,
|
|
134
|
+
preEncodedFileLocation,
|
|
135
|
+
force: overwrite,
|
|
136
|
+
imageFormat,
|
|
137
|
+
pixelFormat,
|
|
138
|
+
codec,
|
|
139
|
+
proResProfile,
|
|
140
|
+
crf,
|
|
141
|
+
assetsInfo,
|
|
142
|
+
parallelism,
|
|
143
|
+
ffmpegExecutable,
|
|
144
|
+
onProgress: (frame) => {
|
|
145
|
+
onProgress({
|
|
146
|
+
encodedFrames: frame,
|
|
147
|
+
renderedFrames,
|
|
148
|
+
renderedDoneIn,
|
|
149
|
+
encodedDoneIn,
|
|
150
|
+
stitchStage: 'muxing',
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
// TODO: Optimization, Now can download before!
|
|
154
|
+
onDownload,
|
|
155
|
+
webpackBundle: bundled,
|
|
156
|
+
verbose: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
157
|
+
});
|
|
158
|
+
encodedDoneIn = Date.now() - stitchStart;
|
|
159
|
+
onProgress({
|
|
160
|
+
encodedDoneIn,
|
|
161
|
+
encodedFrames,
|
|
162
|
+
renderedDoneIn,
|
|
163
|
+
renderedFrames,
|
|
164
|
+
stitchStage: 'muxing',
|
|
165
|
+
});
|
|
166
|
+
await closeBrowserPromise;
|
|
167
|
+
};
|
|
168
|
+
exports.renderVideo = renderVideo;
|
|
169
|
+
//# sourceMappingURL=render-video.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-video.js","sourceRoot":"","sources":["../src/render-video.ts"],"names":[],"mappings":";;;;;;AACA,4CAAoB;AACpB,gDAAwB;AAExB,uCASkB;AAClB,yCAA4D;AAC5D,qCAAsC;AAuC/B,MAAM,WAAW,GAAG,KAAK,EAAE,EACjC,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,GAAG,EACH,SAAS,EACT,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,KAAK,EACL,YAAY,EACZ,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AC;QACD,+CAA+C;QAC/C,UAAU;QACV,aAAa,EAAE,OAAO;QACtB,OAAO,EAAE,oBAAS,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,CAAC;KAC5D,CAAC,CAAC;IACH,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC;IACzC,UAAU,CAAC;QACV,aAAa;QACb,aAAa;QACb,cAAc;QACd,cAAc;QACd,WAAW,EAAE,QAAQ;KACrB,CAAC,CAAC;IAEH,MAAM,mBAAmB,CAAC;AAC3B,CAAC,CAAC;AAhMW,QAAA,WAAW,eAgMtB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SourceMapConsumer } from 'source-map';
|
|
2
|
+
import { UnsymbolicatedStackFrame } from './parse-browser-error-stack';
|
|
3
|
+
export declare function getSourceMap(fileUri: string, fileContents: string): Promise<SourceMapConsumer>;
|
|
4
|
+
export declare type ScriptLine = {
|
|
5
|
+
lineNumber: number;
|
|
6
|
+
content: string;
|
|
7
|
+
highlight: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare type SymbolicatedStackFrame = {
|
|
10
|
+
originalFunctionName: string | null;
|
|
11
|
+
originalFileName: string | null;
|
|
12
|
+
originalLineNumber: number | null;
|
|
13
|
+
originalColumnNumber: number | null;
|
|
14
|
+
originalScriptCode: ScriptLine[] | null;
|
|
15
|
+
};
|
|
16
|
+
export declare const symbolicateStackTrace: (frames: UnsymbolicatedStackFrame[]) => Promise<SymbolicatedStackFrame[]>;
|
|
17
|
+
//# sourceMappingURL=symbolicate-stacktrace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbolicate-stacktrace.d.ts","sourceRoot":"","sources":["../src/symbolicate-stacktrace.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AA0BrE,wBAAsB,YAAY,CACjC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GAClB,OAAO,CAAC,iBAAiB,CAAC,CAmB5B;AAiBD,oBAAY,UAAU,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACpC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,kBAAkB,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;CACxC,CAAC;AAmCF,eAAO,MAAM,qBAAqB,WACzB,wBAAwB,EAAE,KAChC,QAAQ,sBAAsB,EAAE,CAmDlC,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.symbolicateStackTrace = exports.getSourceMap = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
|
+
const read_file_1 = require("./assets/read-file");
|
|
6
|
+
const source_map_1 = require("source-map");
|
|
7
|
+
function extractSourceMapUrl(fileUri, fileContents) {
|
|
8
|
+
const regex = /\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/gm;
|
|
9
|
+
let match = null;
|
|
10
|
+
for (;;) {
|
|
11
|
+
const next = regex.exec(fileContents);
|
|
12
|
+
if (next === null || next === undefined) {
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
match = next;
|
|
16
|
+
}
|
|
17
|
+
if (!(match === null || match === void 0 ? void 0 : match[1])) {
|
|
18
|
+
return Promise.reject(new Error(`Cannot find a source map directive for ${fileUri}.`));
|
|
19
|
+
}
|
|
20
|
+
return Promise.resolve(match[1].toString());
|
|
21
|
+
}
|
|
22
|
+
async function getSourceMap(fileUri, fileContents) {
|
|
23
|
+
const sm = await extractSourceMapUrl(fileUri, fileContents);
|
|
24
|
+
if (sm.indexOf('data:') === 0) {
|
|
25
|
+
const base64 = /^data:application\/json;([\w=:"-]+;)*base64,/;
|
|
26
|
+
const match2 = sm.match(base64);
|
|
27
|
+
if (!match2) {
|
|
28
|
+
throw new Error('Sorry, non-base64 inline source-map encoding is not supported.');
|
|
29
|
+
}
|
|
30
|
+
const converted = window.atob(sm.substring(match2[0].length));
|
|
31
|
+
return new source_map_1.SourceMapConsumer(JSON.parse(converted));
|
|
32
|
+
}
|
|
33
|
+
const index = fileUri.lastIndexOf('/');
|
|
34
|
+
const url = fileUri.substring(0, index + 1) + sm;
|
|
35
|
+
const obj = await fetchUrl(url);
|
|
36
|
+
return new source_map_1.SourceMapConsumer(obj);
|
|
37
|
+
}
|
|
38
|
+
exports.getSourceMap = getSourceMap;
|
|
39
|
+
const fetchUrl = async (url) => {
|
|
40
|
+
const res = await (0, read_file_1.readFile)(url);
|
|
41
|
+
return new Promise((resolve, reject) => {
|
|
42
|
+
let downloaded = '';
|
|
43
|
+
res.on('data', (d) => {
|
|
44
|
+
downloaded += d;
|
|
45
|
+
});
|
|
46
|
+
res.on('end', () => {
|
|
47
|
+
resolve(downloaded);
|
|
48
|
+
});
|
|
49
|
+
res.on('error', (err) => reject(err));
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
function getLinesAround(line, count, lines) {
|
|
53
|
+
const result = [];
|
|
54
|
+
for (let index = Math.max(0, line - 1 - count) + 1; index <= Math.min(lines.length - 1, line - 1 + count); ++index) {
|
|
55
|
+
result.push({
|
|
56
|
+
lineNumber: index + 1,
|
|
57
|
+
content: lines[index],
|
|
58
|
+
highlight: index + 1 === line,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
const getOriginalPosition = (source_map, line, column) => {
|
|
64
|
+
const result = source_map.originalPositionFor({
|
|
65
|
+
line,
|
|
66
|
+
column,
|
|
67
|
+
});
|
|
68
|
+
return { line: result.line, column: result.column, source: result.source };
|
|
69
|
+
};
|
|
70
|
+
const symbolicateStackTrace = async (frames) => {
|
|
71
|
+
const uniqueFileNames = [
|
|
72
|
+
...new Set(frames
|
|
73
|
+
.map((f) => f.fileName)
|
|
74
|
+
.filter((f) => f.startsWith('http://') || f.startsWith('https://'))
|
|
75
|
+
.filter(remotion_1.Internals.truthy)),
|
|
76
|
+
];
|
|
77
|
+
const maps = await Promise.all(uniqueFileNames.map(async (fileName) => {
|
|
78
|
+
const fileContents = await fetchUrl(fileName);
|
|
79
|
+
return getSourceMap(fileName, fileContents);
|
|
80
|
+
}));
|
|
81
|
+
const mapValues = {};
|
|
82
|
+
for (let i = 0; i < uniqueFileNames.length; i++) {
|
|
83
|
+
mapValues[uniqueFileNames[i]] = maps[i];
|
|
84
|
+
}
|
|
85
|
+
return frames
|
|
86
|
+
.map((frame) => {
|
|
87
|
+
const map = mapValues[frame.fileName];
|
|
88
|
+
if (!map) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
const pos = getOriginalPosition(map, frame.lineNumber, frame.columnNumber);
|
|
92
|
+
const { functionName } = frame;
|
|
93
|
+
let hasSource = null;
|
|
94
|
+
hasSource = pos.source ? map.sourceContentFor(pos.source, false) : null;
|
|
95
|
+
const scriptCode = hasSource && pos.line
|
|
96
|
+
? getLinesAround(pos.line, 3, hasSource.split('\n'))
|
|
97
|
+
: null;
|
|
98
|
+
return {
|
|
99
|
+
originalColumnNumber: pos.column,
|
|
100
|
+
originalFileName: pos.source,
|
|
101
|
+
originalFunctionName: functionName,
|
|
102
|
+
originalLineNumber: pos.line ? pos.line : null,
|
|
103
|
+
originalScriptCode: scriptCode,
|
|
104
|
+
};
|
|
105
|
+
})
|
|
106
|
+
.filter(remotion_1.Internals.truthy);
|
|
107
|
+
};
|
|
108
|
+
exports.symbolicateStackTrace = symbolicateStackTrace;
|
|
109
|
+
//# sourceMappingURL=symbolicate-stacktrace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbolicate-stacktrace.js","sourceRoot":"","sources":["../src/symbolicate-stacktrace.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,kDAA4C;AAC5C,2CAA2D;AAG3D,SAAS,mBAAmB,CAC3B,OAAe,EACf,YAAoB;IAEpB,MAAM,KAAK,GAAG,6CAA6C,CAAC;IAC5D,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,SAAS;QACR,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;YACxC,MAAM;SACN;QAED,KAAK,GAAG,IAAI,CAAC;KACb;IAED,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,CAAA,EAAE;QAChB,OAAO,OAAO,CAAC,MAAM,CACpB,IAAI,KAAK,CAAC,0CAA0C,OAAO,GAAG,CAAC,CAC/D,CAAC;KACF;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7C,CAAC;AAEM,KAAK,UAAU,YAAY,CACjC,OAAe,EACf,YAAoB;IAEpB,MAAM,EAAE,GAAG,MAAM,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC5D,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC9B,MAAM,MAAM,GAAG,8CAA8C,CAAC;QAC9D,MAAM,MAAM,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM,EAAE;YACZ,MAAM,IAAI,KAAK,CACd,gEAAgE,CAChE,CAAC;SACF;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE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