You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
47 KiB
1 lines
47 KiB
{"version":3,"file":"index.js","sources":["../../babel-compat-data/corejs2-built-ins.js","../src/shouldStoreRHSInTemporaryVariable.ts","../src/index.ts"],"sourcesContent":["module.exports = require(\"./data/corejs2-built-ins.json\");\n","import { types as t } from \"@babel/core\";\n\nconst {\n isObjectProperty,\n isArrayPattern,\n isObjectPattern,\n isAssignmentPattern,\n isRestElement,\n isIdentifier,\n} = t;\n/**\n * This is a helper function to determine if we should create an intermediate variable\n * such that the RHS of an assignment is not duplicated.\n *\n * See https://github.com/babel/babel/pull/13711#issuecomment-914388382 for discussion\n * on further optimizations.\n */\nexport default function shouldStoreRHSInTemporaryVariable(node: t.LVal) {\n if (isArrayPattern(node)) {\n const nonNullElements = node.elements.filter(element => element !== null);\n if (nonNullElements.length > 1) return true;\n else return shouldStoreRHSInTemporaryVariable(nonNullElements[0]);\n } else if (isObjectPattern(node)) {\n const { properties } = node;\n if (properties.length > 1) return true;\n else if (properties.length === 0) return false;\n else {\n const firstProperty = properties[0];\n if (isObjectProperty(firstProperty)) {\n // the value of the property must be an LVal\n return shouldStoreRHSInTemporaryVariable(firstProperty.value as t.LVal);\n } else {\n return shouldStoreRHSInTemporaryVariable(firstProperty);\n }\n }\n } else if (isAssignmentPattern(node)) {\n return shouldStoreRHSInTemporaryVariable(node.left);\n } else if (isRestElement(node)) {\n if (isIdentifier(node.argument)) return true;\n return shouldStoreRHSInTemporaryVariable(node.argument);\n } else {\n // node is Identifier or MemberExpression\n return false;\n }\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxObjectRestSpread from \"@babel/plugin-syntax-object-rest-spread\";\nimport { types as t } from \"@babel/core\";\nimport type { PluginPass } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/traverse\";\nimport { convertFunctionParams } from \"@babel/plugin-transform-parameters\";\nimport { isRequired } from \"@babel/helper-compilation-targets\";\nimport compatData from \"@babel/compat-data/corejs2-built-ins\";\nimport shouldStoreRHSInTemporaryVariable from \"./shouldStoreRHSInTemporaryVariable\";\n\nconst { isAssignmentPattern, isObjectProperty } = t;\n// @babel/types <=7.3.3 counts FOO as referenced in var { x: FOO }.\n// We need to detect this bug to know if \"unused\" means 0 or 1 references.\nif (!process.env.BABEL_8_BREAKING) {\n const node = t.identifier(\"a\");\n const property = t.objectProperty(t.identifier(\"key\"), node);\n const pattern = t.objectPattern([property]);\n\n // eslint-disable-next-line no-var\n var ZERO_REFS = t.isReferenced(node, property, pattern) ? 1 : 0;\n}\n\nexport default declare((api, opts) => {\n api.assertVersion(7);\n\n const targets = api.targets();\n const supportsObjectAssign = !isRequired(\"es6.object.assign\", targets, {\n compatData,\n });\n\n const { useBuiltIns = supportsObjectAssign, loose = false } = opts;\n\n if (typeof loose !== \"boolean\") {\n throw new Error(\".loose must be a boolean, or undefined\");\n }\n\n const ignoreFunctionLength = api.assumption(\"ignoreFunctionLength\") ?? loose;\n const objectRestNoSymbols = api.assumption(\"objectRestNoSymbols\") ?? loose;\n const pureGetters = api.assumption(\"pureGetters\") ?? loose;\n const setSpreadProperties = api.assumption(\"setSpreadProperties\") ?? loose;\n\n function getExtendsHelper(\n file: PluginPass,\n ): t.MemberExpression | t.Identifier {\n return useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : file.addHelper(\"extends\");\n }\n\n function hasRestElement(path) {\n let foundRestElement = false;\n visitRestElements(path, restElement => {\n foundRestElement = true;\n restElement.stop();\n });\n return foundRestElement;\n }\n\n function hasObjectPatternRestElement(path: NodePath): boolean {\n let foundRestElement = false;\n visitRestElements(path, restElement => {\n if (restElement.parentPath.isObjectPattern()) {\n foundRestElement = true;\n restElement.stop();\n }\n });\n return foundRestElement;\n }\n\n function visitRestElements(\n path: NodePath,\n visitor: (path: NodePath<t.RestElement>) => any,\n ) {\n path.traverse({\n Expression(path) {\n const { parent, key } = path;\n if (\n (isAssignmentPattern(parent) && key === \"right\") ||\n (isObjectProperty(parent) && parent.computed && key === \"key\")\n ) {\n path.skip();\n }\n },\n RestElement: visitor,\n });\n }\n\n function hasSpread(node: t.ObjectExpression): boolean {\n for (const prop of node.properties) {\n if (t.isSpreadElement(prop)) {\n return true;\n }\n }\n return false;\n }\n\n // returns an array of all keys of an object, and a status flag indicating if all extracted keys\n // were converted to stringLiterals or not\n // e.g. extracts {keys: [\"a\", \"b\", \"3\", ++x], allLiteral: false }\n // from ast of {a: \"foo\", b, 3: \"bar\", [++x]: \"baz\"}\n function extractNormalizedKeys(node: t.ObjectPattern) {\n // RestElement has been removed in createObjectRest\n const props = node.properties as t.ObjectProperty[];\n const keys: t.Expression[] = [];\n let allLiteral = true;\n let hasTemplateLiteral = false;\n\n for (const prop of props) {\n if (t.isIdentifier(prop.key) && !prop.computed) {\n // since a key {a: 3} is equivalent to {\"a\": 3}, use the latter\n keys.push(t.stringLiteral(prop.key.name));\n } else if (t.isTemplateLiteral(prop.key)) {\n keys.push(t.cloneNode(prop.key));\n hasTemplateLiteral = true;\n } else if (t.isLiteral(prop.key)) {\n keys.push(\n t.stringLiteral(\n String(\n //@ts-ignore prop.key can not be a NullLiteral\n prop.key.value,\n ),\n ),\n );\n } else {\n keys.push(t.cloneNode(prop.key));\n allLiteral = false;\n }\n }\n\n return { keys, allLiteral, hasTemplateLiteral };\n }\n\n // replaces impure computed keys with new identifiers\n // and returns variable declarators of these new identifiers\n function replaceImpureComputedKeys(\n properties: NodePath<t.ObjectProperty>[],\n scope: Scope,\n ) {\n const impureComputedPropertyDeclarators: t.VariableDeclarator[] = [];\n for (const propPath of properties) {\n const key = propPath.get(\"key\");\n if (propPath.node.computed && !key.isPure()) {\n const name = scope.generateUidBasedOnNode(key.node);\n const declarator = t.variableDeclarator(t.identifier(name), key.node);\n impureComputedPropertyDeclarators.push(declarator);\n key.replaceWith(t.identifier(name));\n }\n }\n return impureComputedPropertyDeclarators;\n }\n\n function removeUnusedExcludedKeys(path: NodePath<t.ObjectPattern>): void {\n const bindings = path.getOuterBindingIdentifierPaths();\n\n Object.keys(bindings).forEach(bindingName => {\n const bindingParentPath = bindings[bindingName].parentPath;\n if (\n path.scope.getBinding(bindingName).references >\n (process.env.BABEL_8_BREAKING ? 0 : ZERO_REFS) ||\n !bindingParentPath.isObjectProperty()\n ) {\n return;\n }\n bindingParentPath.remove();\n });\n }\n\n //expects path to an object pattern\n function createObjectRest(\n path: NodePath<t.ObjectPattern>,\n file: PluginPass,\n objRef: t.Identifier | t.MemberExpression,\n ): [t.VariableDeclarator[], t.LVal, t.CallExpression] {\n const props = path.get(\"properties\");\n const last = props[props.length - 1];\n t.assertRestElement(last.node);\n const restElement = t.cloneNode(last.node);\n last.remove();\n\n const impureComputedPropertyDeclarators = replaceImpureComputedKeys(\n path.get(\"properties\") as NodePath<t.ObjectProperty>[],\n path.scope,\n );\n const { keys, allLiteral, hasTemplateLiteral } = extractNormalizedKeys(\n path.node,\n );\n\n if (keys.length === 0) {\n return [\n impureComputedPropertyDeclarators,\n restElement.argument,\n t.callExpression(getExtendsHelper(file), [\n t.objectExpression([]),\n t.cloneNode(objRef),\n ]),\n ];\n }\n\n let keyExpression;\n if (!allLiteral) {\n // map to toPropertyKey to handle the possible non-string values\n keyExpression = t.callExpression(\n t.memberExpression(t.arrayExpression(keys), t.identifier(\"map\")),\n [file.addHelper(\"toPropertyKey\")],\n );\n } else {\n keyExpression = t.arrayExpression(keys);\n\n if (!hasTemplateLiteral && !t.isProgram(path.scope.block)) {\n // Hoist definition of excluded keys, so that it's not created each time.\n const program = path.findParent(path => path.isProgram());\n const id = path.scope.generateUidIdentifier(\"excluded\");\n\n program.scope.push({\n id,\n init: keyExpression,\n kind: \"const\",\n });\n\n keyExpression = t.cloneNode(id);\n }\n }\n\n return [\n impureComputedPropertyDeclarators,\n restElement.argument,\n t.callExpression(\n file.addHelper(\n `objectWithoutProperties${objectRestNoSymbols ? \"Loose\" : \"\"}`,\n ),\n [t.cloneNode(objRef), keyExpression],\n ),\n ];\n }\n\n function replaceRestElement(\n parentPath: NodePath<t.Function | t.CatchClause>,\n paramPath: NodePath,\n container?: t.VariableDeclaration[],\n ): void {\n if (paramPath.isAssignmentPattern()) {\n replaceRestElement(parentPath, paramPath.get(\"left\"), container);\n return;\n }\n\n if (paramPath.isArrayPattern() && hasRestElement(paramPath)) {\n const elements = paramPath.get(\"elements\");\n\n for (let i = 0; i < elements.length; i++) {\n replaceRestElement(parentPath, elements[i], container);\n }\n }\n\n if (paramPath.isObjectPattern() && hasRestElement(paramPath)) {\n const uid = parentPath.scope.generateUidIdentifier(\"ref\");\n\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(paramPath.node, uid),\n ]);\n\n if (container) {\n container.push(declar);\n } else {\n parentPath.ensureBlock();\n parentPath.get(\"body\").unshiftContainer(\"body\", declar);\n }\n paramPath.replaceWith(t.cloneNode(uid));\n }\n }\n\n return {\n name: \"proposal-object-rest-spread\",\n inherits: syntaxObjectRestSpread.default,\n\n visitor: {\n // function a({ b, ...c }) {}\n Function(path) {\n const params = path.get(\"params\");\n const paramsWithRestElement = new Set();\n const idsInRestParams = new Set();\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n if (hasRestElement(param)) {\n paramsWithRestElement.add(i);\n for (const name of Object.keys(param.getBindingIdentifiers())) {\n idsInRestParams.add(name);\n }\n }\n }\n\n // if true, a parameter exists that has an id in its initializer\n // that is also an id bound in a rest parameter\n // example: f({...R}, a = R)\n let idInRest = false;\n\n const IdentifierHandler = function (path, functionScope) {\n const name = path.node.name;\n if (\n path.scope.getBinding(name) === functionScope.getBinding(name) &&\n idsInRestParams.has(name)\n ) {\n idInRest = true;\n path.stop();\n }\n };\n\n let i;\n for (i = 0; i < params.length && !idInRest; ++i) {\n const param = params[i];\n if (!paramsWithRestElement.has(i)) {\n if (param.isReferencedIdentifier() || param.isBindingIdentifier()) {\n IdentifierHandler(path, path.scope);\n } else {\n param.traverse(\n {\n \"Scope|TypeAnnotation|TSTypeAnnotation\": path => path.skip(),\n \"ReferencedIdentifier|BindingIdentifier\": IdentifierHandler,\n },\n path.scope,\n );\n }\n }\n }\n\n if (!idInRest) {\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n if (paramsWithRestElement.has(i)) {\n replaceRestElement(path, param);\n }\n }\n } else {\n const shouldTransformParam = idx =>\n idx >= i - 1 || paramsWithRestElement.has(idx);\n convertFunctionParams(\n path,\n ignoreFunctionLength,\n shouldTransformParam,\n replaceRestElement,\n );\n }\n },\n\n // adapted from transform-destructuring/src/index.js#pushObjectRest\n // const { a, ...b } = c;\n VariableDeclarator(path, file) {\n if (!path.get(\"id\").isObjectPattern()) {\n return;\n }\n\n let insertionPath = path;\n const originalPath = path;\n\n visitRestElements(path.get(\"id\"), path => {\n if (!path.parentPath.isObjectPattern()) {\n // Return early if the parent is not an ObjectPattern, but\n // (for example) an ArrayPattern or Function, because that\n // means this RestElement is an not an object property.\n return;\n }\n\n if (\n // skip single-property case, e.g.\n // const { ...x } = foo();\n // since the RHS will not be duplicated\n shouldStoreRHSInTemporaryVariable(originalPath.node.id) &&\n !t.isIdentifier(originalPath.node.init)\n ) {\n // const { a, ...b } = foo();\n // to avoid calling foo() twice, as a first step convert it to:\n // const _foo = foo(),\n // { a, ...b } = _foo;\n const initRef = path.scope.generateUidIdentifierBasedOnNode(\n originalPath.node.init,\n \"ref\",\n );\n // insert _foo = foo()\n originalPath.insertBefore(\n t.variableDeclarator(initRef, originalPath.node.init),\n );\n // replace foo() with _foo\n originalPath.replaceWith(\n t.variableDeclarator(originalPath.node.id, t.cloneNode(initRef)),\n );\n\n return;\n }\n\n let ref = originalPath.node.init;\n const refPropertyPath: NodePath<t.ObjectProperty>[] = [];\n let kind;\n\n path.findParent((path: NodePath): boolean => {\n if (path.isObjectProperty()) {\n refPropertyPath.unshift(path);\n } else if (path.isVariableDeclarator()) {\n kind = (path.parentPath as NodePath<t.VariableDeclaration>).node\n .kind;\n return true;\n }\n });\n\n const impureObjRefComputedDeclarators = replaceImpureComputedKeys(\n refPropertyPath,\n path.scope,\n );\n refPropertyPath.forEach(prop => {\n const { node } = prop;\n ref = t.memberExpression(\n ref,\n t.cloneNode(node.key),\n node.computed || t.isLiteral(node.key),\n );\n });\n\n //@ts-expect-error: findParent can not apply assertions on result shape\n const objectPatternPath: NodePath<t.ObjectPattern> = path.findParent(\n path => path.isObjectPattern(),\n );\n\n const [impureComputedPropertyDeclarators, argument, callExpression] =\n createObjectRest(\n objectPatternPath,\n file,\n ref as t.MemberExpression,\n );\n\n if (pureGetters) {\n removeUnusedExcludedKeys(objectPatternPath);\n }\n\n t.assertIdentifier(argument);\n\n insertionPath.insertBefore(impureComputedPropertyDeclarators);\n\n insertionPath.insertBefore(impureObjRefComputedDeclarators);\n\n insertionPath = insertionPath.insertAfter(\n t.variableDeclarator(argument, callExpression),\n )[0] as NodePath<t.VariableDeclarator>;\n\n path.scope.registerBinding(kind, insertionPath);\n\n if (objectPatternPath.node.properties.length === 0) {\n objectPatternPath\n .findParent(\n path => path.isObjectProperty() || path.isVariableDeclarator(),\n )\n .remove();\n }\n });\n },\n\n // taken from transform-destructuring/src/index.js#visitor\n // export var { a, ...b } = c;\n ExportNamedDeclaration(path) {\n const declaration = path.get(\"declaration\");\n if (!declaration.isVariableDeclaration()) return;\n\n const hasRest = declaration\n .get(\"declarations\")\n .some(path => hasObjectPatternRestElement(path.get(\"id\")));\n if (!hasRest) return;\n\n const specifiers = [];\n\n for (const name of Object.keys(path.getOuterBindingIdentifiers(true))) {\n specifiers.push(\n t.exportSpecifier(t.identifier(name), t.identifier(name)),\n );\n }\n\n // Split the declaration and export list into two declarations so that the variable\n // declaration can be split up later without needing to worry about not being a\n // top-level statement.\n path.replaceWith(declaration.node);\n path.insertAfter(t.exportNamedDeclaration(null, specifiers));\n },\n\n // try {} catch ({a, ...b}) {}\n CatchClause(path) {\n const paramPath = path.get(\"param\");\n replaceRestElement(path, paramPath);\n },\n\n // ({a, ...b} = c);\n AssignmentExpression(path, file) {\n const leftPath = path.get(\"left\");\n if (leftPath.isObjectPattern() && hasRestElement(leftPath)) {\n const nodes = [];\n\n const refName = path.scope.generateUidBasedOnNode(\n path.node.right,\n \"ref\",\n );\n\n nodes.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(refName), path.node.right),\n ]),\n );\n\n const [impureComputedPropertyDeclarators, argument, callExpression] =\n createObjectRest(leftPath, file, t.identifier(refName));\n\n if (impureComputedPropertyDeclarators.length > 0) {\n nodes.push(\n t.variableDeclaration(\"var\", impureComputedPropertyDeclarators),\n );\n }\n\n const nodeWithoutSpread = t.cloneNode(path.node);\n nodeWithoutSpread.right = t.identifier(refName);\n nodes.push(t.expressionStatement(nodeWithoutSpread));\n nodes.push(\n t.toStatement(\n t.assignmentExpression(\"=\", argument, callExpression),\n ),\n );\n nodes.push(t.expressionStatement(t.identifier(refName)));\n\n path.replaceWithMultiple(nodes);\n }\n },\n\n // taken from transform-destructuring/src/index.js#visitor\n ForXStatement(path) {\n const { node, scope } = path;\n const leftPath = path.get(\"left\");\n const left = node.left;\n\n if (!hasObjectPatternRestElement(leftPath)) {\n return;\n }\n\n if (!t.isVariableDeclaration(left)) {\n // for ({a, ...b} of []) {}\n const temp = scope.generateUidIdentifier(\"ref\");\n\n node.left = t.variableDeclaration(\"var\", [\n t.variableDeclarator(temp),\n ]);\n\n path.ensureBlock();\n const body = node.body as t.BlockStatement;\n\n if (body.body.length === 0 && path.isCompletionRecord()) {\n body.body.unshift(\n t.expressionStatement(scope.buildUndefinedNode()),\n );\n }\n\n body.body.unshift(\n t.expressionStatement(\n t.assignmentExpression(\"=\", left, t.cloneNode(temp)),\n ),\n );\n } else {\n // for (var {a, ...b} of []) {}\n const pattern = left.declarations[0].id;\n\n const key = scope.generateUidIdentifier(\"ref\");\n node.left = t.variableDeclaration(left.kind, [\n t.variableDeclarator(key, null),\n ]);\n\n path.ensureBlock();\n const body = node.body as t.BlockStatement;\n\n body.body.unshift(\n t.variableDeclaration(node.left.kind, [\n t.variableDeclarator(pattern, t.cloneNode(key)),\n ]),\n );\n }\n },\n\n // [{a, ...b}] = c;\n ArrayPattern(path) {\n const objectPatterns = [];\n\n visitRestElements(path, path => {\n if (!path.parentPath.isObjectPattern()) {\n // Return early if the parent is not an ObjectPattern, but\n // (for example) an ArrayPattern or Function, because that\n // means this RestElement is an not an object property.\n return;\n }\n\n const objectPattern = path.parentPath;\n\n const uid = path.scope.generateUidIdentifier(\"ref\");\n objectPatterns.push(t.variableDeclarator(objectPattern.node, uid));\n\n objectPattern.replaceWith(t.cloneNode(uid));\n path.skip();\n });\n\n if (objectPatterns.length > 0) {\n const statementPath = path.getStatementParent();\n const statementNode = statementPath.node;\n const kind =\n statementNode.type === \"VariableDeclaration\"\n ? statementNode.kind\n : \"var\";\n statementPath.insertAfter(\n t.variableDeclaration(kind, objectPatterns),\n );\n }\n },\n\n // var a = { ...b, ...c }\n ObjectExpression(path, file) {\n if (!hasSpread(path.node)) return;\n\n let helper;\n if (setSpreadProperties) {\n helper = getExtendsHelper(file);\n } else {\n try {\n helper = file.addHelper(\"objectSpread2\");\n } catch {\n // TODO: This is needed to workaround https://github.com/babel/babel/issues/10187\n // and https://github.com/babel/babel/issues/10179 for older @babel/core versions\n // where #10187 isn't fixed.\n this.file.declarations[\"objectSpread2\"] = null;\n\n // objectSpread2 has been introduced in v7.5.0\n // We have to maintain backward compatibility.\n helper = file.addHelper(\"objectSpread\");\n }\n }\n\n let exp = null;\n let props = [];\n\n function make() {\n const hadProps = props.length > 0;\n const obj = t.objectExpression(props);\n props = [];\n\n if (!exp) {\n exp = t.callExpression(helper, [obj]);\n return;\n }\n\n // When we can assume that getters are pure and don't depend on\n // the order of evaluation, we can avoid making multiple calls.\n if (pureGetters) {\n if (hadProps) {\n exp.arguments.push(obj);\n }\n return;\n }\n\n exp = t.callExpression(t.cloneNode(helper), [\n exp,\n // If we have static props, we need to insert an empty object\n // because the odd arguments are copied with [[Get]], not\n // [[GetOwnProperty]]\n ...(hadProps ? [t.objectExpression([]), obj] : []),\n ]);\n }\n\n for (const prop of path.node.properties) {\n if (t.isSpreadElement(prop)) {\n make();\n exp.arguments.push(prop.argument);\n } else {\n props.push(prop);\n }\n }\n\n if (props.length) make();\n\n path.replaceWith(exp);\n },\n } as Visitor<PluginPass>,\n };\n});\n"],"names":["require$$0","isObjectProperty","isArrayPattern","isObjectPattern","isAssignmentPattern","isRestElement","isIdentifier","t","shouldStoreRHSInTemporaryVariable","node","nonNullElements","elements","filter","element","length","properties","firstProperty","value","left","argument","identifier","property","objectProperty","pattern","objectPattern","ZERO_REFS","isReferenced","declare","api","opts","assertVersion","targets","supportsObjectAssign","isRequired","compatData","useBuiltIns","loose","Error","ignoreFunctionLength","assumption","objectRestNoSymbols","pureGetters","setSpreadProperties","getExtendsHelper","file","memberExpression","addHelper","hasRestElement","path","foundRestElement","visitRestElements","restElement","stop","hasObjectPatternRestElement","parentPath","visitor","traverse","Expression","parent","key","computed","skip","RestElement","hasSpread","prop","isSpreadElement","extractNormalizedKeys","props","keys","allLiteral","hasTemplateLiteral","push","stringLiteral","name","isTemplateLiteral","cloneNode","isLiteral","String","replaceImpureComputedKeys","scope","impureComputedPropertyDeclarators","propPath","get","isPure","generateUidBasedOnNode","declarator","variableDeclarator","replaceWith","removeUnusedExcludedKeys","bindings","getOuterBindingIdentifierPaths","Object","forEach","bindingName","bindingParentPath","getBinding","references","remove","createObjectRest","objRef","last","assertRestElement","callExpression","objectExpression","keyExpression","arrayExpression","isProgram","block","program","findParent","id","generateUidIdentifier","init","kind","replaceRestElement","paramPath","container","i","uid","declar","variableDeclaration","ensureBlock","unshiftContainer","inherits","syntaxObjectRestSpread","default","Function","params","paramsWithRestElement","Set","idsInRestParams","param","add","getBindingIdentifiers","idInRest","IdentifierHandler","functionScope","has","isReferencedIdentifier","isBindingIdentifier","shouldTransformParam","idx","convertFunctionParams","VariableDeclarator","insertionPath","originalPath","initRef","generateUidIdentifierBasedOnNode","insertBefore","ref","refPropertyPath","unshift","isVariableDeclarator","impureObjRefComputedDeclarators","objectPatternPath","assertIdentifier","insertAfter","registerBinding","ExportNamedDeclaration","declaration","isVariableDeclaration","hasRest","some","specifiers","getOuterBindingIdentifiers","exportSpecifier","exportNamedDeclaration","CatchClause","AssignmentExpression","leftPath","nodes","refName","right","nodeWithoutSpread","expressionStatement","toStatement","assignmentExpression","replaceWithMultiple","ForXStatement","temp","body","isCompletionRecord","buildUndefinedNode","declarations","ArrayPattern","objectPatterns","statementPath","getStatementParent","statementNode","type","ObjectExpression","helper","exp","make","hadProps","obj","arguments"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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