Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/@babel/plugin-transform-block-scoping/lib/ drwxrwxr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.visitor = void 0;
var _core = require("@babel/core");
function getTDZStatus(refPath, bindingPath) {
const executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath);
if (executionStatus === "before") {
return "outside";
} else if (executionStatus === "after") {
return "inside";
} else {
return "maybe";
}
}
function buildTDZAssert(node, state) {
return _core.types.callExpression(state.addHelper("temporalRef"), [node, _core.types.stringLiteral(node.name)]);
}
function isReference(node, scope, state) {
const declared = state.letReferences.get(node.name);
if (!declared) return false;
return scope.getBindingIdentifier(node.name) === declared;
}
const visitedMaybeTDZNodes = new WeakSet();
const visitor = {
ReferencedIdentifier(path, state) {
if (!state.tdzEnabled) return;
const {
node,
parent,
scope
} = path;
if (path.parentPath.isFor({
left: node
})) return;
if (!isReference(node, scope, state)) return;
const bindingPath = scope.getBinding(node.name).path;
if (bindingPath.isFunctionDeclaration()) return;
const status = getTDZStatus(path, bindingPath);
if (status === "outside") return;
if (status === "maybe") {
if (visitedMaybeTDZNodes.has(node)) {
return;
}
visitedMaybeTDZNodes.add(node);
const assert = buildTDZAssert(node, state);
bindingPath.parent._tdzThis = true;
if (path.parentPath.isUpdateExpression()) {
if (parent._ignoreBlockScopingTDZ) return;
path.parentPath.replaceWith(_core.types.sequenceExpression([assert, parent]));
} else {
path.replaceWith(assert);
}
} else if (status === "inside") {
path.replaceWith(_core.template.ast`${state.addHelper("tdz")}("${node.name}")`);
}
},
AssignmentExpression: {
exit(path, state) {
if (!state.tdzEnabled) return;
const {
node
} = path;
if (node._ignoreBlockScopingTDZ) return;
const nodes = [];
const ids = path.getBindingIdentifiers();
for (const name of Object.keys(ids)) {
const id = ids[name];
if (isReference(id, path.scope, state)) {
nodes.push(id);
}
}
if (nodes.length) {
node._ignoreBlockScopingTDZ = true;
nodes.push(node);
path.replaceWithMultiple(nodes.map(n => _core.types.expressionStatement(n)));
}
}
}
};
exports.visitor = visitor; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0225 ]-- |