hexo/node_modules/@babel/helper-create-class-feature.../lib/fields.js.map

1 line
71 KiB
Plaintext

{"version":3,"names":["_core","require","_helperReplaceSupers","_helperEnvironmentVisitor","_helperMemberExpressionToFunctions","_helperOptimiseCallExpression","_helperAnnotateAsPure","_helperSkipTransparentExpressionWrappers","ts","buildPrivateNamesMap","props","privateNamesMap","Map","prop","isPrivate","name","node","key","id","update","has","get","scope","generateUidIdentifier","static","method","isProperty","isClassPrivateMethod","kind","getId","setId","methodId","set","buildPrivateNamesNodes","privateFieldsAsProperties","privateFieldsAsSymbols","state","initNodes","value","isStatic","isMethod","isAccessor","t","cloneNode","init","callExpression","addHelper","stringLiteral","identifier","newExpression","annotateAsPure","push","template","statement","ast","privateNameVisitorFactory","visitor","nestedVisitor","traverse","visitors","merge","Object","assign","environmentVisitor","privateNameVisitor","Class","path","body","visiblePrivateNames","redeclared","delete","length","skipKey","PrivateName","noDocumentAll","parentPath","isMemberExpression","property","isOptionalMemberExpression","includes","handle","unshadow","innerBinding","_scope","hasBinding","bindingIdentifierEquals","rename","parent","buildCheckInRHS","rhs","file","inRHSIsObject","availableHelper","privateInVisitor","BinaryExpression","operator","left","right","isPrivateName","classRef","replaceWith","expression","privateNameHandlerSpec","memoise","member","count","object","memo","maybeGenerateMemoised","memoiser","receiver","helperName","sequenceExpression","console","warn","boundGet","memberExpression","destructureSet","helper","_unused","Error","call","args","optimiseCall","optionalCall","privateNameHandlerLoose","BASE","REF","PROP","simpleSet","optionalCallExpression","transformPrivateNamesUsage","ref","size","handler","memberExpressionToFunctions","buildPrivateFieldInitLoose","buildUndefinedNode","inheritPropComments","buildPrivateInstanceFieldInitSpec","thisExpression","buildPrivateStaticFieldInitSpec","privateName","initAdded","buildPrivateMethodInitLoose","buildPrivateInstanceMethodInitSpec","buildPrivateAccessorInitialization","buildPrivateInstanceMethodInitialization","buildPublicFieldInitLoose","computed","expressionStatement","assignmentExpression","isLiteral","buildPublicFieldInitSpec","buildPrivateStaticMethodInitLoose","buildPrivateMethodDeclaration","getterDeclared","setterDeclared","params","generator","async","isGetter","isSetter","declId","functionDeclaration","thisContextVisitor","ThisExpression","findParent","isTransparentExprWrapper","isUnaryExpression","booleanLiteral","needsClassRef","MetaProperty","meta","isIdentifier","innerReferencesVisitor","ReferencedIdentifier","replaceThisContext","getSuperRef","isStaticBlock","constantSuper","innerBindingRef","_state$classRef","replacer","ReplaceSupers","methodPath","refToPreserve","getObjectRef","replace","isNameOrLength","type","inheritLeadingComments","inheritInnerComments","buildFieldsInitNodes","superRef","setPublicClassFields","injectSuperRef","staticNodes","instanceNodes","pureStaticNodes","_injectSuperRef","generateUidIdentifierBasedOnNode","isClassProperty","assertFieldTransformed","isInstance","isPublic","isField","replaced","blockBody","isExpressionStatement","inheritsComments","unshift","filter","Boolean","wrapClass","leadingComments","remove","superClass","isClassExpression"],"sources":["../src/fields.ts"],"sourcesContent":["import { template, traverse, types as t } from \"@babel/core\";\nimport type { File } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/traverse\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport environmentVisitor from \"@babel/helper-environment-visitor\";\nimport memberExpressionToFunctions from \"@babel/helper-member-expression-to-functions\";\nimport type {\n Handler,\n HandlerState,\n} from \"@babel/helper-member-expression-to-functions\";\nimport optimiseCall from \"@babel/helper-optimise-call-expression\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { isTransparentExprWrapper } from \"@babel/helper-skip-transparent-expression-wrappers\";\n\nimport * as ts from \"./typescript\";\n\ninterface PrivateNameMetadata {\n id: t.Identifier;\n static: boolean;\n method: boolean;\n getId?: t.Identifier;\n setId?: t.Identifier;\n methodId?: t.Identifier;\n initAdded?: boolean;\n getterDeclared?: boolean;\n setterDeclared?: boolean;\n}\n\ntype PrivateNamesMap = Map<string, PrivateNameMetadata>;\n\nexport function buildPrivateNamesMap(props: PropPath[]) {\n const privateNamesMap: PrivateNamesMap = new Map();\n for (const prop of props) {\n if (prop.isPrivate()) {\n const { name } = prop.node.key.id;\n const update: PrivateNameMetadata = privateNamesMap.has(name)\n ? privateNamesMap.get(name)\n : {\n id: prop.scope.generateUidIdentifier(name),\n static: prop.node.static,\n method: !prop.isProperty(),\n };\n if (prop.isClassPrivateMethod()) {\n if (prop.node.kind === \"get\") {\n update.getId = prop.scope.generateUidIdentifier(`get_${name}`);\n } else if (prop.node.kind === \"set\") {\n update.setId = prop.scope.generateUidIdentifier(`set_${name}`);\n } else if (prop.node.kind === \"method\") {\n update.methodId = prop.scope.generateUidIdentifier(name);\n }\n }\n privateNamesMap.set(name, update);\n }\n }\n return privateNamesMap;\n}\n\nexport function buildPrivateNamesNodes(\n privateNamesMap: PrivateNamesMap,\n privateFieldsAsProperties: boolean,\n privateFieldsAsSymbols: boolean,\n state: File,\n) {\n const initNodes: t.Statement[] = [];\n\n for (const [name, value] of privateNamesMap) {\n // - When the privateFieldsAsProperties assumption is enabled,\n // both static and instance fields are transpiled using a\n // secret non-enumerable property. Hence, we also need to generate that\n // key (using the classPrivateFieldLooseKey helper).\n // - When the privateFieldsAsSymbols assumption is enabled,\n // both static and instance fields are transpiled using a\n // unique Symbol to define a non-enumerable property.\n // - In spec mode, only instance fields need a \"private name\" initializer\n // because static fields are directly assigned to a variable in the\n // buildPrivateStaticFieldInitSpec function.\n const { static: isStatic, method: isMethod, getId, setId } = value;\n const isAccessor = getId || setId;\n const id = t.cloneNode(value.id);\n\n let init: t.Expression;\n\n if (privateFieldsAsProperties) {\n init = t.callExpression(state.addHelper(\"classPrivateFieldLooseKey\"), [\n t.stringLiteral(name),\n ]);\n } else if (privateFieldsAsSymbols) {\n init = t.callExpression(t.identifier(\"Symbol\"), [t.stringLiteral(name)]);\n } else if (!isStatic) {\n init = t.newExpression(\n t.identifier(!isMethod || isAccessor ? \"WeakMap\" : \"WeakSet\"),\n [],\n );\n }\n\n if (init) {\n annotateAsPure(init);\n initNodes.push(template.statement.ast`var ${id} = ${init}`);\n }\n }\n\n return initNodes;\n}\n\ninterface PrivateNameVisitorState {\n privateNamesMap: PrivateNamesMap;\n privateFieldsAsProperties: boolean;\n redeclared?: string[];\n}\n\n// Traverses the class scope, handling private name references. If an inner\n// class redeclares the same private name, it will hand off traversal to the\n// restricted visitor (which doesn't traverse the inner class's inner scope).\nfunction privateNameVisitorFactory<S>(\n visitor: Visitor<PrivateNameVisitorState & S>,\n) {\n // Traverses the outer portion of a class, without touching the class's inner\n // scope, for private names.\n const nestedVisitor = traverse.visitors.merge([\n {\n ...visitor,\n },\n environmentVisitor,\n ]);\n\n const privateNameVisitor: Visitor<PrivateNameVisitorState & S> = {\n ...visitor,\n\n Class(path) {\n const { privateNamesMap } = this;\n const body = path.get(\"body.body\");\n\n const visiblePrivateNames = new Map(privateNamesMap);\n const redeclared = [];\n for (const prop of body) {\n if (!prop.isPrivate()) continue;\n const { name } = prop.node.key.id;\n visiblePrivateNames.delete(name);\n redeclared.push(name);\n }\n\n // If the class doesn't redeclare any private fields, we can continue with\n // our overall traversal.\n if (!redeclared.length) {\n return;\n }\n\n // This class redeclares some private field. We need to process the outer\n // environment with access to all the outer privates, then we can process\n // the inner environment with only the still-visible outer privates.\n path.get(\"body\").traverse(nestedVisitor, {\n ...this,\n redeclared,\n });\n path.traverse(privateNameVisitor, {\n ...this,\n privateNamesMap: visiblePrivateNames,\n });\n\n // We'll eventually hit this class node again with the overall Class\n // Features visitor, which'll process the redeclared privates.\n path.skipKey(\"body\");\n },\n };\n\n return privateNameVisitor;\n}\n\ninterface PrivateNameState {\n privateNamesMap: PrivateNamesMap;\n classRef: t.Identifier;\n file: File;\n noDocumentAll: boolean;\n innerBinding?: t.Identifier;\n}\n\nconst privateNameVisitor = privateNameVisitorFactory<\n HandlerState<PrivateNameState> & PrivateNameState\n>({\n PrivateName(path, { noDocumentAll }) {\n const { privateNamesMap, redeclared } = this;\n const { node, parentPath } = path;\n\n if (\n !parentPath.isMemberExpression({ property: node }) &&\n !parentPath.isOptionalMemberExpression({ property: node })\n ) {\n return;\n }\n const { name } = node.id;\n if (!privateNamesMap.has(name)) return;\n if (redeclared && redeclared.includes(name)) return;\n\n this.handle(parentPath, noDocumentAll);\n },\n});\n\n// rename all bindings that shadows innerBinding\nfunction unshadow(\n name: string,\n scope: Scope,\n innerBinding: t.Identifier | undefined,\n) {\n // in some cases, scope.getBinding(name) === undefined\n // so we check hasBinding to avoid keeping looping\n // see: https://github.com/babel/babel/pull/13656#discussion_r686030715\n while (\n scope?.hasBinding(name) &&\n !scope.bindingIdentifierEquals(name, innerBinding)\n ) {\n scope.rename(name);\n scope = scope.parent;\n }\n}\n\nexport function buildCheckInRHS(\n rhs: t.Expression,\n file: File,\n inRHSIsObject?: boolean,\n) {\n if (inRHSIsObject || !file.availableHelper?.(\"checkInRHS\")) return rhs;\n return t.callExpression(file.addHelper(\"checkInRHS\"), [rhs]);\n}\n\nconst privateInVisitor = privateNameVisitorFactory<{\n classRef: t.Identifier;\n file: File;\n innerBinding?: t.Identifier;\n}>({\n BinaryExpression(path, { file }) {\n const { operator, left, right } = path.node;\n if (operator !== \"in\") return;\n if (!t.isPrivateName(left)) return;\n\n const { privateFieldsAsProperties, privateNamesMap, redeclared } = this;\n\n const { name } = left.id;\n\n if (!privateNamesMap.has(name)) return;\n if (redeclared && redeclared.includes(name)) return;\n\n // if there are any local variable shadowing classRef, unshadow it\n // see #12960\n unshadow(this.classRef.name, path.scope, this.innerBinding);\n\n if (privateFieldsAsProperties) {\n const { id } = privateNamesMap.get(name);\n path.replaceWith(template.expression.ast`\n Object.prototype.hasOwnProperty.call(${buildCheckInRHS(\n right,\n file,\n )}, ${t.cloneNode(id)})\n `);\n return;\n }\n\n const { id, static: isStatic } = privateNamesMap.get(name);\n\n if (isStatic) {\n path.replaceWith(\n template.expression.ast`${buildCheckInRHS(\n right,\n file,\n )} === ${t.cloneNode(this.classRef)}`,\n );\n return;\n }\n\n path.replaceWith(\n template.expression.ast`${t.cloneNode(id)}.has(${buildCheckInRHS(\n right,\n file,\n )})`,\n );\n },\n});\n\ninterface Receiver {\n receiver(\n this: HandlerState<PrivateNameState> & PrivateNameState,\n member: NodePath<t.MemberExpression | t.OptionalMemberExpression>,\n ): t.Expression;\n}\n\nconst privateNameHandlerSpec: Handler<PrivateNameState & Receiver> & Receiver =\n {\n memoise(member, count) {\n const { scope } = member;\n const { object } = member.node as { object: t.Expression };\n\n const memo = scope.maybeGenerateMemoised(object);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(object, memo, count);\n },\n\n receiver(member) {\n const { object } = member.node as { object: t.Expression };\n\n if (this.memoiser.has(object)) {\n return t.cloneNode(this.memoiser.get(object));\n }\n\n return t.cloneNode(object);\n },\n\n get(member) {\n const { classRef, privateNamesMap, file, innerBinding } = this;\n const { name } = (member.node.property as t.PrivateName).id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n methodId,\n getId,\n setId,\n } = privateNamesMap.get(name);\n const isAccessor = getId || setId;\n\n if (isStatic) {\n const helperName =\n isMethod && !isAccessor\n ? \"classStaticPrivateMethodGet\"\n : \"classStaticPrivateFieldSpecGet\";\n\n // if there are any local variable shadowing classRef, unshadow it\n // see #12960\n unshadow(classRef.name, member.scope, innerBinding);\n\n return t.callExpression(file.addHelper(helperName), [\n this.receiver(member),\n t.cloneNode(classRef),\n t.cloneNode(id),\n ]);\n }\n\n if (isMethod) {\n if (isAccessor) {\n if (!getId && setId) {\n if (file.availableHelper(\"writeOnlyError\")) {\n return t.sequenceExpression([\n this.receiver(member),\n t.callExpression(file.addHelper(\"writeOnlyError\"), [\n t.stringLiteral(`#${name}`),\n ]),\n ]);\n }\n console.warn(\n `@babel/helpers is outdated, update it to silence this warning.`,\n );\n }\n return t.callExpression(file.addHelper(\"classPrivateFieldGet\"), [\n this.receiver(member),\n t.cloneNode(id),\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateMethodGet\"), [\n this.receiver(member),\n t.cloneNode(id),\n t.cloneNode(methodId),\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateFieldGet\"), [\n this.receiver(member),\n t.cloneNode(id),\n ]);\n },\n\n boundGet(member) {\n this.memoise(member, 1);\n\n return t.callExpression(\n t.memberExpression(this.get(member), t.identifier(\"bind\")),\n [this.receiver(member)],\n );\n },\n\n set(member, value) {\n const { classRef, privateNamesMap, file } = this;\n const { name } = (member.node.property as t.PrivateName).id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n setId,\n getId,\n } = privateNamesMap.get(name);\n const isAccessor = getId || setId;\n\n if (isStatic) {\n const helperName =\n isMethod && !isAccessor\n ? \"classStaticPrivateMethodSet\"\n : \"classStaticPrivateFieldSpecSet\";\n\n return t.callExpression(file.addHelper(helperName), [\n this.receiver(member),\n t.cloneNode(classRef),\n t.cloneNode(id),\n value,\n ]);\n }\n if (isMethod) {\n if (setId) {\n return t.callExpression(file.addHelper(\"classPrivateFieldSet\"), [\n this.receiver(member),\n t.cloneNode(id),\n value,\n ]);\n }\n return t.sequenceExpression([\n this.receiver(member),\n value,\n t.callExpression(file.addHelper(\"readOnlyError\"), [\n t.stringLiteral(`#${name}`),\n ]),\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateFieldSet\"), [\n this.receiver(member),\n t.cloneNode(id),\n value,\n ]);\n },\n\n destructureSet(member) {\n const { classRef, privateNamesMap, file } = this;\n const { name } = (member.node.property as t.PrivateName).id;\n const { id, static: isStatic } = privateNamesMap.get(name);\n if (isStatic) {\n try {\n // classStaticPrivateFieldDestructureSet was introduced in 7.13.10\n // eslint-disable-next-line no-var\n var helper = file.addHelper(\"classStaticPrivateFieldDestructureSet\");\n } catch {\n throw new Error(\n \"Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \\n\" +\n \"please update @babel/helpers to the latest version.\",\n );\n }\n return t.memberExpression(\n t.callExpression(helper, [\n this.receiver(member),\n t.cloneNode(classRef),\n t.cloneNode(id),\n ]),\n t.identifier(\"value\"),\n );\n }\n\n return t.memberExpression(\n t.callExpression(file.addHelper(\"classPrivateFieldDestructureSet\"), [\n this.receiver(member),\n t.cloneNode(id),\n ]),\n t.identifier(\"value\"),\n );\n },\n\n call(member, args: (t.Expression | t.SpreadElement)[]) {\n // The first access (the get) should do the memo assignment.\n this.memoise(member, 1);\n\n return optimiseCall(this.get(member), this.receiver(member), args, false);\n },\n\n optionalCall(member, args: (t.Expression | t.SpreadElement)[]) {\n this.memoise(member, 1);\n\n return optimiseCall(this.get(member), this.receiver(member), args, true);\n },\n };\n\nconst privateNameHandlerLoose: Handler<PrivateNameState> = {\n get(member) {\n const { privateNamesMap, file } = this;\n const { object } = member.node;\n const { name } = (member.node.property as t.PrivateName).id;\n\n return template.expression`BASE(REF, PROP)[PROP]`({\n BASE: file.addHelper(\"classPrivateFieldLooseBase\"),\n REF: t.cloneNode(object),\n PROP: t.cloneNode(privateNamesMap.get(name).id),\n });\n },\n\n set() {\n // noop\n throw new Error(\"private name handler with loose = true don't need set()\");\n },\n\n boundGet(member) {\n return t.callExpression(\n t.memberExpression(this.get(member), t.identifier(\"bind\")),\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n [t.cloneNode(member.node.object as t.Expression)],\n );\n },\n\n simpleSet(member) {\n return this.get(member);\n },\n\n destructureSet(member) {\n return this.get(member);\n },\n\n call(member, args) {\n return t.callExpression(this.get(member), args);\n },\n\n optionalCall(member, args) {\n return t.optionalCallExpression(this.get(member), args, true);\n },\n};\n\nexport function transformPrivateNamesUsage(\n ref: t.Identifier,\n path: NodePath<t.Class>,\n privateNamesMap: PrivateNamesMap,\n {\n privateFieldsAsProperties,\n noDocumentAll,\n innerBinding,\n }: {\n privateFieldsAsProperties: boolean;\n noDocumentAll: boolean;\n innerBinding: t.Identifier;\n },\n state: File,\n) {\n if (!privateNamesMap.size) return;\n\n const body = path.get(\"body\");\n const handler = privateFieldsAsProperties\n ? privateNameHandlerLoose\n : privateNameHandlerSpec;\n\n memberExpressionToFunctions<PrivateNameState>(body, privateNameVisitor, {\n privateNamesMap,\n classRef: ref,\n file: state,\n ...handler,\n noDocumentAll,\n innerBinding,\n });\n body.traverse(privateInVisitor, {\n privateNamesMap,\n classRef: ref,\n file: state,\n privateFieldsAsProperties,\n innerBinding,\n });\n}\n\nfunction buildPrivateFieldInitLoose(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateProperty>,\n privateNamesMap: PrivateNamesMap,\n) {\n const { id } = privateNamesMap.get(prop.node.key.id.name);\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${t.cloneNode(id)}, {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ${value}\n });\n `,\n prop,\n );\n}\n\nfunction buildPrivateInstanceFieldInitSpec(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateProperty>,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const { id } = privateNamesMap.get(prop.node.key.id.name);\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateFieldInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`${t.cloneNode(id)}.set(${ref}, {\n // configurable is always false for private elements\n // enumerable is always false for private elements\n writable: true,\n value: ${value},\n })`,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateFieldInitSpec\");\n return inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)},\n {\n writable: true,\n value: ${value}\n },\n )`,\n prop,\n );\n}\n\nfunction buildPrivateStaticFieldInitSpec(\n prop: NodePath<t.ClassPrivateProperty>,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, getId, setId, initAdded } = privateName;\n const isAccessor = getId || setId;\n\n if (!prop.isProperty() && (initAdded || !isAccessor)) return;\n\n if (isAccessor) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n var ${t.cloneNode(id)} = {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n }\n `,\n prop,\n );\n }\n\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n return inheritPropComments(\n template.statement.ast`\n var ${t.cloneNode(id)} = {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ${value}\n };\n `,\n prop,\n );\n}\n\nfunction buildPrivateMethodInitLoose(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { methodId, id, getId, setId, initAdded } = privateName;\n if (initAdded) return;\n\n if (methodId) {\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ${methodId.name}\n });\n `,\n prop,\n );\n }\n const isAccessor = getId || setId;\n if (isAccessor) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n });\n `,\n prop,\n );\n }\n}\n\nfunction buildPrivateInstanceMethodInitSpec(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { getId, setId, initAdded } = privateName;\n\n if (initAdded) return;\n\n const isAccessor = getId || setId;\n if (isAccessor) {\n return buildPrivateAccessorInitialization(\n ref,\n prop,\n privateNamesMap,\n state,\n );\n }\n\n return buildPrivateInstanceMethodInitialization(\n ref,\n prop,\n privateNamesMap,\n state,\n );\n}\n\nfunction buildPrivateAccessorInitialization(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, getId, setId } = privateName;\n\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateFieldInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`\n ${id}.set(${ref}, {\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n });\n `,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateFieldInitSpec\");\n return inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)},\n {\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n },\n )`,\n prop,\n );\n}\n\nfunction buildPrivateInstanceMethodInitialization(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id } = privateName;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateMethodInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`${id}.add(${ref})`,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateMethodInitSpec\");\n return inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)}\n )`,\n prop,\n );\n}\n\nfunction buildPublicFieldInitLoose(\n ref: t.Expression,\n prop: NodePath<t.ClassProperty>,\n) {\n const { key, computed } = prop.node;\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(ref, key, computed || t.isLiteral(key)),\n value,\n ),\n ),\n prop,\n );\n}\n\nfunction buildPublicFieldInitSpec(\n ref: t.Expression,\n prop: NodePath<t.ClassProperty>,\n state: File,\n) {\n const { key, computed } = prop.node;\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n t.expressionStatement(\n t.callExpression(state.addHelper(\"defineProperty\"), [\n ref,\n computed || t.isLiteral(key)\n ? key\n : t.stringLiteral((key as t.Identifier).name),\n value,\n ]),\n ),\n prop,\n );\n}\n\nfunction buildPrivateStaticMethodInitLoose(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n state: File,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, methodId, getId, setId, initAdded } = privateName;\n\n if (initAdded) return;\n\n const isAccessor = getId || setId;\n if (isAccessor) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n })\n `,\n prop,\n );\n }\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ${methodId.name}\n });\n `,\n prop,\n );\n}\n\nfunction buildPrivateMethodDeclaration(\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n privateFieldsAsProperties = false,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const {\n id,\n methodId,\n getId,\n setId,\n getterDeclared,\n setterDeclared,\n static: isStatic,\n } = privateName;\n const { params, body, generator, async } = prop.node;\n const isGetter = getId && !getterDeclared && params.length === 0;\n const isSetter = setId && !setterDeclared && params.length > 0;\n\n let declId = methodId;\n\n if (isGetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n getterDeclared: true,\n });\n declId = getId;\n } else if (isSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n setterDeclared: true,\n });\n declId = setId;\n } else if (isStatic && !privateFieldsAsProperties) {\n declId = id;\n }\n\n return inheritPropComments(\n t.functionDeclaration(\n t.cloneNode(declId),\n // @ts-expect-error params for ClassMethod has TSParameterProperty\n params,\n body,\n generator,\n async,\n ),\n prop,\n );\n}\n\ntype ReplaceThisState = {\n classRef: t.Identifier;\n needsClassRef: boolean;\n innerBinding: t.Identifier | null;\n};\n\nconst thisContextVisitor = traverse.visitors.merge<ReplaceThisState>([\n {\n ThisExpression(path, state) {\n // Replace `delete this` with `true`\n const parent = path.findParent(\n path => !isTransparentExprWrapper(path.node),\n );\n if (t.isUnaryExpression(parent.node, { operator: \"delete\" })) {\n path.parentPath.replaceWith(t.booleanLiteral(true));\n return;\n }\n\n state.needsClassRef = true;\n path.replaceWith(t.cloneNode(state.classRef));\n },\n MetaProperty(path) {\n const meta = path.get(\"meta\");\n const property = path.get(\"property\");\n const { scope } = path;\n // if there are `new.target` in static field\n // we should replace it with `undefined`\n if (\n meta.isIdentifier({ name: \"new\" }) &&\n property.isIdentifier({ name: \"target\" })\n ) {\n path.replaceWith(scope.buildUndefinedNode());\n }\n },\n },\n environmentVisitor,\n]);\n\nconst innerReferencesVisitor: Visitor<ReplaceThisState> = {\n ReferencedIdentifier(path, state) {\n if (\n path.scope.bindingIdentifierEquals(path.node.name, state.innerBinding)\n ) {\n state.needsClassRef = true;\n path.node.name = state.classRef.name;\n }\n },\n};\n\nfunction replaceThisContext(\n path: PropPath,\n ref: t.Identifier,\n getSuperRef: () => t.Identifier,\n file: File,\n isStaticBlock: boolean,\n constantSuper: boolean,\n innerBindingRef: t.Identifier | null,\n) {\n const state: ReplaceThisState = {\n classRef: ref,\n needsClassRef: false,\n innerBinding: innerBindingRef,\n };\n\n const replacer = new ReplaceSupers({\n methodPath: path,\n constantSuper,\n file,\n refToPreserve: ref,\n getSuperRef,\n getObjectRef() {\n state.needsClassRef = true;\n // @ts-expect-error: TS doesn't infer that path.node is not a StaticBlock\n return t.isStaticBlock?.(path.node) || path.node.static\n ? ref\n : t.memberExpression(ref, t.identifier(\"prototype\"));\n },\n });\n replacer.replace();\n if (isStaticBlock || path.isProperty()) {\n path.traverse(thisContextVisitor, state);\n }\n\n // todo: use innerBinding.referencePaths to avoid full traversal\n if (\n innerBindingRef != null &&\n state.classRef?.name &&\n state.classRef.name !== innerBindingRef?.name\n ) {\n path.traverse(innerReferencesVisitor, state);\n }\n\n return state.needsClassRef;\n}\n\nexport type PropNode =\n | t.ClassProperty\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.StaticBlock;\nexport type PropPath = NodePath<PropNode>;\n\nfunction isNameOrLength({ key, computed }: t.ClassProperty) {\n if (key.type === \"Identifier\") {\n return !computed && (key.name === \"name\" || key.name === \"length\");\n }\n if (key.type === \"StringLiteral\") {\n return key.value === \"name\" || key.value === \"length\";\n }\n return false;\n}\n\n/**\n * Inherit comments from class members. This is a reduced version of\n * t.inheritsComments: the trailing comments are not inherited because\n * for most class members except the last one, their trailing comments are\n * the next sibling's leading comments.\n *\n * @template T transformed class member type\n * @param {T} node transformed class member\n * @param {PropPath} prop class member\n * @returns transformed class member type with comments inherited\n */\nfunction inheritPropComments<T extends t.Node>(node: T, prop: PropPath) {\n t.inheritLeadingComments(node, prop.node);\n t.inheritInnerComments(node, prop.node);\n return node;\n}\n\nexport function buildFieldsInitNodes(\n ref: t.Identifier,\n superRef: t.Expression | undefined,\n props: PropPath[],\n privateNamesMap: PrivateNamesMap,\n state: File,\n setPublicClassFields: boolean,\n privateFieldsAsProperties: boolean,\n constantSuper: boolean,\n innerBindingRef: t.Identifier,\n) {\n let needsClassRef = false;\n let injectSuperRef: t.Identifier;\n const staticNodes: t.Statement[] = [];\n const instanceNodes: t.Statement[] = [];\n // These nodes are pure and can be moved to the closest statement position\n const pureStaticNodes: t.FunctionDeclaration[] = [];\n\n const getSuperRef = t.isIdentifier(superRef)\n ? () => superRef\n : () => {\n injectSuperRef ??=\n props[0].scope.generateUidIdentifierBasedOnNode(superRef);\n return injectSuperRef;\n };\n\n for (const prop of props) {\n prop.isClassProperty() && ts.assertFieldTransformed(prop);\n\n // @ts-expect-error: TS doesn't infer that prop.node is not a StaticBlock\n const isStatic = !t.isStaticBlock?.(prop.node) && prop.node.static;\n const isInstance = !isStatic;\n const isPrivate = prop.isPrivate();\n const isPublic = !isPrivate;\n const isField = prop.isProperty();\n const isMethod = !isField;\n const isStaticBlock = prop.isStaticBlock?.();\n\n if (isStatic || (isMethod && isPrivate) || isStaticBlock) {\n const replaced = replaceThisContext(\n prop,\n ref,\n getSuperRef,\n state,\n isStaticBlock,\n constantSuper,\n innerBindingRef,\n );\n needsClassRef = needsClassRef || replaced;\n }\n\n // TODO(ts): there are so many `ts-expect-error` inside cases since\n // ts can not infer type from pre-computed values (or a case test)\n // even change `isStaticBlock` to `t.isStaticBlock(prop)` will not make prop\n // a `NodePath<t.StaticBlock>`\n // this maybe a bug for ts\n switch (true) {\n case isStaticBlock: {\n const blockBody = (prop.node as t.StaticBlock).body;\n // We special-case the single expression case to avoid the iife, since\n // it's common.\n if (blockBody.length === 1 && t.isExpressionStatement(blockBody[0])) {\n staticNodes.push(inheritPropComments(blockBody[0], prop));\n } else {\n staticNodes.push(\n t.inheritsComments(\n template.statement.ast`(() => { ${blockBody} })()`,\n prop.node,\n ),\n );\n }\n break;\n }\n case isStatic && isPrivate && isField && privateFieldsAsProperties:\n needsClassRef = true;\n staticNodes.push(\n // @ts-expect-error checked in switch\n buildPrivateFieldInitLoose(t.cloneNode(ref), prop, privateNamesMap),\n );\n break;\n case isStatic && isPrivate && isField && !privateFieldsAsProperties:\n needsClassRef = true;\n staticNodes.push(\n // @ts-expect-error checked in switch\n buildPrivateStaticFieldInitSpec(prop, privateNamesMap),\n );\n break;\n case isStatic && isPublic && isField && setPublicClassFields:\n // Functions always have non-writable .name and .length properties,\n // so we must always use [[Define]] for them.\n // It might still be possible to a computed static fields whose resulting\n // key is \"name\" or \"length\", but the assumption is telling us that it's\n // not going to happen.\n // @ts-expect-error checked in switch\n if (!isNameOrLength(prop.node)) {\n needsClassRef = true;\n // @ts-expect-error checked in switch\n staticNodes.push(buildPublicFieldInitLoose(t.cloneNode(ref), prop));\n break;\n }\n // falls through\n case isStatic && isPublic && isField && !setPublicClassFields:\n needsClassRef = true;\n staticNodes.push(\n // @ts-expect-error checked in switch\n buildPublicFieldInitSpec(t.cloneNode(ref), prop, state),\n );\n break;\n case isInstance && isPrivate && isField && privateFieldsAsProperties:\n instanceNodes.push(\n // @ts-expect-error checked in switch\n buildPrivateFieldInitLoose(t.thisExpression(), prop, privateNamesMap),\n );\n break;\n case isInstance && isPrivate && isField && !privateFieldsAsProperties:\n instanceNodes.push(\n buildPrivateInstanceFieldInitSpec(\n t.thisExpression(),\n // @ts-expect-error checked in switch\n prop,\n privateNamesMap,\n state,\n ),\n );\n break;\n case isInstance && isPrivate && isMethod && privateFieldsAsProperties:\n instanceNodes.unshift(\n buildPrivateMethodInitLoose(\n t.thisExpression(),\n // @ts-expect-error checked in switch\n prop,\n privateNamesMap,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n // @ts-expect-error checked in switch\n prop,\n privateNamesMap,\n privateFieldsAsProperties,\n ),\n );\n break;\n case isInstance && isPrivate && isMethod && !privateFieldsAsProperties:\n instanceNodes.unshift(\n buildPrivateInstanceMethodInitSpec(\n t.thisExpression(),\n // @ts-expect-error checked in switch\n prop,\n privateNamesMap,\n state,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n // @ts-expect-error checked in switch\n prop,\n privateNamesMap,\n privateFieldsAsProperties,\n ),\n );\n break;\n case isStatic && isPrivate && isMethod && !privateFieldsAsProperties:\n needsClassRef = true;\n staticNodes.unshift(\n // @ts-expect-error checked in switch\n buildPrivateStaticFieldInitSpec(prop, privateNamesMap),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n // @ts-expect-error checked in switch\n prop,\n privateNamesMap,\n privateFieldsAsProperties,\n ),\n );\n break;\n case isStatic && isPrivate && isMethod && privateFieldsAsProperties:\n needsClassRef = true;\n staticNodes.unshift(\n buildPrivateStaticMethodInitLoose(\n t.cloneNode(ref),\n // @ts-expect-error checked in switch\n prop,\n state,\n privateNamesMap,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n // @ts-expect-error checked in switch\n prop,\n privateNamesMap,\n privateFieldsAsProperties,\n ),\n );\n break;\n case isInstance && isPublic && isField && setPublicClassFields:\n // @ts-expect-error checked in switch\n instanceNodes.push(buildPublicFieldInitLoose(t.thisExpression(), prop));\n break;\n case isInstance && isPublic && isField && !setPublicClassFields:\n instanceNodes.push(\n // @ts-expect-error checked in switch\n buildPublicFieldInitSpec(t.thisExpression(), prop, state),\n );\n break;\n default:\n throw new Error(\"Unreachable.\");\n }\n }\n\n return {\n staticNodes: staticNodes.filter(Boolean),\n instanceNodes: instanceNodes.filter(Boolean),\n pureStaticNodes: pureStaticNodes.filter(Boolean),\n wrapClass(path: NodePath<t.Class>) {\n for (const prop of props) {\n // Delete leading comments so that they don't get attached as\n // trailing comments of the previous sibling.\n // When transforming props, we explicitly attach their leading\n // comments to the transformed node with `inheritPropComments`\n // above.\n prop.node.leadingComments = null;\n prop.remove();\n }\n\n if (injectSuperRef) {\n path.scope.push({ id: t.cloneNode(injectSuperRef) });\n path.set(\n \"superClass\",\n t.assignmentExpression(\"=\", injectSuperRef, path.node.superClass),\n );\n }\n\n if (!needsClassRef) return path;\n\n if (path.isClassExpression()) {\n path.scope.push({ id: ref });\n path.replaceWith(\n t.assignmentExpression(\"=\", t.cloneNode(ref), path.node),\n );\n } else if (!path.node.id) {\n // Anonymous class declaration\n path.node.id = ref;\n }\n\n return path;\n },\n };\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,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