decord/source/__polyfill/10xxx/module_10647.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

100 lines
3.4 KiB
JavaScript

// Module ID: 10647
// Function ID: 10648
// Dependencies: [41, 42, 93, 95, 98, 10565, 10566, 10567]
// Module 10647
import AbstractParserWithWordBoundaryChecking from "AbstractParserWithWordBoundaryChecking" /* 10567 */;
import _classCallCheck from "_classCallCheck" /* 41 */;
import _createClass from "_createClass" /* 42 */;
import c3 from "_possibleConstructorReturn" /* 93 */;
import _getPrototypeOf from "_getPrototypeOf" /* 95 */;
import _inherits from "_inherits" /* 98 */;
const PTCasualTimeParser = require;
function _isNativeReflectConstruct() {
try {
const _Boolean = Boolean;
const call = valueOf.call;
const _Reflect = Reflect;
const _Boolean2 = Boolean;
if (typeof call === "unknown") {
let callResult = valueOf();
} else {
callResult = call(constructResult);
}
closure_0 = !callResult;
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
return closure_0;
};
return _isNativeReflectConstruct();
} catch (err) {
}
}
class PTCasualTimeParser {
constructor() {
self = this;
tmp = c2(this, PTCasualTimeParser);
tmp2 = closure_4;
obj = closure_4(PTCasualTimeParser);
tmp3 = closure_3;
if (hasOwnProperty()) {
tmp7 = globalThis;
_Reflect = Reflect;
tmp8 = arguments;
constructResult = Reflect.construct(obj, arguments, tmp2(self).constructor);
} else {
tmp4 = arguments;
tmp5 = arguments;
constructResult = obj(...arguments);
}
return tmp3(self, constructResult);
}
}
_inherits(PTCasualTimeParser, AbstractParserWithWordBoundaryChecking.AbstractParserWithWordBoundaryChecking);
const entry = {
key: "innerPattern",
value: function innerPattern() {
return /(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i;
}
};
const items = [
entry,
{
key: "innerExtract",
value: function innerExtract(refDate, arg1) {
refDate = refDate.refDate;
const parsingComponents = refDate.createParsingComponents();
const formatted = arg1[1].toLowerCase();
if ("tarde" === formatted) {
parsingComponents.imply("meridiem", PTCasualTimeParser(10565).Meridiem.PM);
parsingComponents.imply("hour", 15);
} else if ("noite" === formatted) {
parsingComponents.imply("meridiem", PTCasualTimeParser(10565).Meridiem.PM);
parsingComponents.imply("hour", 22);
} else {
if ("manha" !== formatted) {
if ("manh\u00E3" !== formatted) {
if ("meia-noite" === formatted) {
const _Date = Date;
const date = new Date(refDate.getTime());
date.setDate(date.getDate() + 1);
PTCasualTimeParser(10566).assignSimilarDate(parsingComponents, date);
PTCasualTimeParser(10566).implySimilarTime(parsingComponents, date);
parsingComponents.imply("hour", 0);
parsingComponents.imply("minute", 0);
parsingComponents.imply("second", 0);
} else if ("meio-dia" === formatted) {
parsingComponents.imply("meridiem", PTCasualTimeParser(10565).Meridiem.AM);
parsingComponents.imply("hour", 12);
}
}
}
parsingComponents.imply("meridiem", PTCasualTimeParser(10565).Meridiem.AM);
parsingComponents.imply("hour", 6);
}
return parsingComponents;
}
}
];
export default _createClass(PTCasualTimeParser, items);