decord/source/__polyfill/04xxx/module_4123.js
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

66 lines
1.6 KiB
JavaScript

// Module ID: 4123
// Function ID: 4124
// Dependencies: [3726, 3727]
// Exports: default
// Module 4123
import _typeof_mod from "module_3726" /* 3726 */;
import requiredArgs_mod from "requiredArgs" /* 3727 */;
let _typeof = _typeof_mod;
if (!_typeof) {
const obj = { default: _typeof };
let tmp3 = obj;
} else {
tmp3 = _typeof;
}
_typeof = tmp3;
let requiredArgs = requiredArgs_mod;
if (!requiredArgs) {
const obj2 = { default: requiredArgs };
let tmp5 = obj2;
} else {
tmp5 = requiredArgs;
}
requiredArgs = tmp5;
export default function parseJSON(str) {
requiredArgs.default(1, arguments);
if (typeof str === "string") {
const match = str.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);
const _Date = Date;
if (match) {
const _Date2 = Date;
let num2 = +match[9];
if (!num2) {
num2 = 0;
}
let num3 = 1;
if ("-" == match[8]) {
num3 = -1;
}
let num4 = +match[10];
if (!num4) {
num4 = 0;
}
let num5 = 1;
if ("-" == match[8]) {
num5 = -1;
}
const diff = +match[2] - 1;
const text = `${tmp13}00`;
const diff1 = +match[4] - num2 * num3;
const diff2 = +match[5] - num4 * num5;
let _Date1 = new _Date(Date.UTC(tmp7, diff, tmp9, diff1, diff2, tmp12, +`${tmp13}00`.substring(0, 3)));
const tmp10 = +match[4];
const tmp11 = +match[5];
const tmp8 = +match[2];
} else {
_Date1 = new _Date(NaN);
}
return _Date1;
} else {
return _typeof.default(str);
}
};
export default exports.default;