| 38 | `;r.body.body=[n.types.classProperty(n.types.toExpression(Y),undefined,undefined,undefined,true,true),...a];const s=[];const i=n.types.newExpression(r,[]);if(W.length>0){s.push(...W)}if(z){J=true;s.push(z)}if(s.length>0){s.unshift(n.types.callExpression(n.types.super(),[n.types.cloneNode(_)]));r.body.body.push(createConstructorFromExpressions(s,false))}else{i.arguments.push(n.types.cloneNode(_))}const[o]=e.replaceWith(i);X=o.get(class="st">"callee").get(class="st">"body").get(class="st">"body.0.key")}}if(!J&&z){e.node.body.body.push(n.types.staticBlock([n.types.expressionStatement(z)]))}let{superClass:Z}=Y;if(Z&&(f===class="st">"2023-11"||f===class="st">"2023-05")){const t=e.scope.maybeGenerateMemoised(Z);if(t){Y.superClass=n.types.assignmentExpression(class="st">"=",t,Z);Z=t}}const ee=n.types.staticBlock([]);Y.body.body.unshift(ee);const te=ee.body;if(R.length>0){const e=X.get(class="st">"body.body");let t;for(const r of e){if((r.isClassProperty()||r.isClassMethod())&&r.node.kind!==class="st">"constructor"){t=r;break}}if(t!=null){convertToComputedKey(t);prependExpressionsToComputedKey(R,t)}else{Y.body.body.unshift(n.types.classProperty(n.types.sequenceExpression([...R,n.types.stringLiteral(class="st">"_")]),undefined,undefined,undefined,true,true));te.push(n.types.expressionStatement(n.types.unaryExpression(class="st">"delete",n.types.memberExpression(n.types.thisExpression(),n.types.identifier(class="st">"_")))))}R=[]}te.push(n.types.expressionStatement(createLocalsAssignment(H,G,q,B!=null?B:n.types.arrayExpression(F),n.types.numericLiteral(j),K?U:null,w,n.types.cloneNode(Z),t,f)));if(v){te.push(n.types.expressionStatement(n.types.callExpression(n.types.cloneNode(v),[n.types.thisExpression()])))}if(Q.length>0){te.push(...Q.map((e=>n.types.expressionStatement(e))))}e.insertBefore(x.map((e=>n.types.expressionStatement(e))));if(L){const t=E.getBinding(_.name);if(!t.constantViolations.length){e.insertBefore(n.types.variableDeclaration(class="st">"let",[n.types.variableDeclarator(n.types.cloneNode(_))]))}else{const t=E.generateUidIdentifier(class="st">"t"+_.name);const r=_;e.replaceWithMultiple([n.types.variableDeclaration(class="st">"let",[n.types.variableDeclarator(n.types.cloneNode(r)),n.types.variableDeclarator(t)]),n.types.blockStatement([n.types.variableDeclaration(class="st">"let",[n.types.variableDeclarator(n.types.cloneNode(_))]),e.node,n.types.expressionStatement(n.types.assignmentExpression(class="st">"=",n.types.cloneNode(t),n.types.cloneNode(_)))]),n.types.expressionStatement(n.types.assignmentExpression(class="st">"=",n.types.cloneNode(r),n.types.cloneNode(t)))])}}if(N.size>0){checkPrivateMethodUpdateError(e,N)}e.scope.crawl();return e}function createLocalsAssignment(e,t,r,s,i,a,o,l,c,p){let u,d;const f=[o?createSetFunctionNameCall(c,o):n.types.thisExpression(),s,r];{if(p!==class="st">"2023-11"){f.splice(1,2,r,s)}if(p===class="st">"2021-12"||p===class="st">"2022-03"&&!c.availableHelper(class="st">"applyDecs2203R")){u=n.types.arrayPattern([...e,...t]);d=n.types.callExpression(c.addHelper(p===class="st">"2021-12"?class="st">"applyDecs":class="st">"applyDecs2203"),f);return n.types.assignmentExpression(class="st">"=",u,d)}else if(p===class="st">"2022-03"){d=n.types.callExpression(c.addHelper(class="st">"applyDecs2203R"),f)}else if(p===class="st">"2023-01"){if(a){f.push(createPrivateBrandCheckClosure(a))}d=n.types.callExpression(c.addHelper(class="st">"applyDecs2301"),f)}else if(p===class="st">"2023-05"){if(a||l||i.value!==0){f.push(i)}if(a){f.push(createPrivateBrandCheckClosure(a))}else if(l){f.push(n.types.unaryExpression(class="st">"void",n.types.numericLiteral(0)))}if(l)f.push(l);d=n.types.callExpression(c.addHelper(class="st">"applyDecs2305"),f)}}if(p===class="st">"2023-11"){if(a||l||i.value!==0){f.push(i)}if(a){f.push(createPrivateBrandCheckClosure(a))}else if(l){f.push(n.types.unaryExpression(class="st">"void",n.types.numericLiteral(0)))}if(l)f.push(l);d=n.types.callExpression(c.addHelper(class="st">"applyDecs2311"),f)}if(e.length>0){if(t.length>0){u=n.types.objectPattern([n.types.objectProperty(n.types.identifier(class="st">"e"),n.types.arrayPattern(e)),n.types.objectProperty(n.types.identifier(class="st">"c"),n.types.arrayPattern(t))])}else{u=n.types.arrayPattern(e);d=n.types.memberExpression(d,n.types.identifier(class="st">"e"),false,false)}}else{u=n.types.arrayPattern(t);d=n.types.memberExpression(d,n.types.identifier(class="st">"c"),false,false)}return n.types.assignmentExpression(class="st">"=",u,d)}function isProtoKey(e){return e.type===class="st">"Identifier"?e.name===class="st">"__proto__":e.value===class="st">"__proto__"}function isDecorated(e){return e.decorators&&e.decorators.length>0}function shouldTransformElement(e){switch(e.type){caseclass="st">"ClassAccessorProperty":return true;caseclass="st">"ClassMethod":caseclass="st">"ClassProperty":caseclass="st">"ClassPrivateMethod":caseclass="st">"ClassPrivateProperty":return isDecorated(e);default:return false}}function shouldTransformClass(e){return isDecorated(e)||e.body.body.some(shouldTransformElement)}function NamedEvaluationVisitoryFactory(e,t){function handleComputedProperty(e,t,r){switch(t.type){caseclass="st">"StringLiteral":return n.types.stringLiteral(t.value);caseclass="st">"NumericLiteral":caseclass="st">"BigIntLiteral":{const r=t.value+class="st">"";e.get(class="st">"key").replaceWith(n.types.stringLiteral(r));return n.types.stringLiteral(r)}default:{const s=e.scope.maybeGenerateMemoised(t);e.get(class="st">"key").replaceWith(n.types.assignmentExpression(class="st">"=",s,createToPropertyKeyCall(r,t)));return n.types.cloneNode(s)}}}return{VariableDeclarator(r,n){const s=r.node.id;if(s.type===class="st">"Identifier"){const a=(0,i.skipTransparentExprWrappers)(r.get(class="st">"init"));if(e(a)){const e=s.name;t(a,n,e)}}},AssignmentExpression(r,n){const s=r.node.left;if(s.type===class="st">"Identifier"){const a=(0,i.skipTransparentExprWrappers)(r.get(class="st">"right"));if(e(a)){switch(r.node.operator){caseclass="st">"=":caseclass="st">"&&=":caseclass="st">"||=":caseclass="st">"??=":t(a,n,s.name)}}}},AssignmentPattern(r,n){const s=r.node.left;if(s.type===class="st">"Identifier"){const a=(0,i.skipTransparentExprWrappers)(r.get(class="st">"right"));if(e(a)){const e=s.name;t(a,n,e)}}},ObjectExpression(r,s){for(const a of r.get(class="st">"properties")){if(!a.isObjectProperty())continue;const{node:r}=a;const o=r.key;const l=(0,i.skipTransparentExprWrappers)(a.get(class="st">"value"));if(e(l)){if(!r.computed){if(!isProtoKey(o)){if(o.type===class="st">"Identifier"){t(l,s,o.name)}else{const e=n.types.stringLiteral(o.value+class="st">"");t(l,s,e)}}}else{const e=handleComputedProperty(a,o,s);t(l,s,e)}}}},ClassPrivateProperty(r,s){const{node:a}=r;const o=(0,i.skipTransparentExprWrappers)(r.get(class="st">"value"));if(e(o)){const e=n.types.stringLiteral(class="st">"#"+a.key.id.name);t(o,s,e)}},ClassAccessorProperty(r,s){const{node:a}=r;const o=a.key;const l=(0,i.skipTransparentExprWrappers)(r.get(class="st">"value"));if(e(l)){if(!a.computed){if(o.type===class="st">"Identifier"){t(l,s,o.name)}else if(o.type===class="st">"PrivateName"){const e=n.types.stringLiteral(class="st">"#"+o.id.name);t(l,s,e)}else{const e=n.types.stringLiteral(o.value+class="st">"");t(l,s,e)}}else{const e=handleComputedProperty(r,o,s);t(l,s,e)}}},ClassProperty(r,s){const{node:a}=r;const o=a.key;const l=(0,i.skipTransparentExprWrappers)(r.get(class="st">"value"));if(e(l)){if(!a.computed){if(o.type===class="st">"Identifier"){t(l,s,o.name)}else{const e=n.types.stringLiteral(o.value+class="st">"");t(l,s,e)}}else{const e=handleComputedProperty(r,o,s);t(l,s,e)}}}}}function isDecoratedAnonymousClassExpression(e){return e.isClassExpression({id:null})&&shouldTransformClass(e.node)}function generateLetUidIdentifier(e,t){const r=e.generateUidIdentifier(t);e.push({id:r,kind:class="st">"let"});return n.types.cloneNode(r)}function _default({assertVersion:e,assumption:t},{loose:s},i,a){var o,l;{if(i===class="st">"2023-11"||i===class="st">"2023-05"||i===class="st">"2023-01"){e(class="st">"^7.21.0")}else if(i===class="st">"2021-12"){e(class="st">"^7.16.0")}else{e(class="st">"^7.19.0")}}const c=new WeakSet;const p=(o=t(class="st">"constantSuper"))!=null?o:s;const u=(l=t(class="st">"ignoreFunctionLength"))!=null?l:s;const d=NamedEvaluationVisitoryFactory(isDecoratedAnonymousClassExpression,visitClass);function visitClass(e,t,r){var n;if(c.has(e))return;const{node:s}=e;r!=null?r:r=(n=s.id)==null?void 0:n.name;const a=transformClass(e,t,p,u,r,d,i);if(a){c.add(a);return}c.add(e)}return{name:class="st">"proposal-decorators",inherits:a,visitor:Object.assign({ExportDefaultDeclaration(e,t){const{declaration:s}=e.node;if((s==null?void 0:s.type)===class="st">"ClassDeclaration"&&isDecorated(s)){const a=!s.id;{var i;(i=e.splitExportDeclaration)!=null?i:e.splitExportDeclaration=r(8026).NodePath.prototype.splitExportDeclaration}const o=e.splitExportDeclaration();if(a){visitClass(o,t,n.types.stringLiteral(class="st">"default"))}}},ExportNamedDeclaration(e){const{declaration:t}=e.node;if((t==null?void 0:t.type)===class="st">"ClassDeclaration"&&isDecorated(t)){{var n;(n=e.splitExportDeclaration)!=null?n:e.splitExportDeclaration=r(8026).NodePath.prototype.splitExportDeclaration}e.splitExportDeclaration()}},Class(e,t){visitClass(e,t,undefined)}},d)}}},1409:(e,t,r)=>{class="st">"use strict";Object.defineProperty(t,class="st">"__esModule",{value:true});t.FEATURES=void 0;t.enableFeature=enableFeature;t.isLoose=isLoose;t.shouldTransform=shouldTransform;var n=r(7009);const s=t.FEATURES=Object.freeze({fields:1<<1,privateMethods:1<<2,decorators:1<<3,privateIn:1<<4,staticBlocks:1<<5});const i=new Map([[s.fields,class="st">"@babel/plugin-transform-class-properties"],[s.privateMethods,class="st">"@babel/plugin-transform-private-methods"],[s.privateIn,class="st">"@babel/plugin-transform-private-property-in-object"]]);const a=class="st">"@babel/plugin-class-features/featuresKey";const o=class="st">"@babel/plugin-class-features/looseKey";{var l=class="st">"@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing"}{var canIgnoreLoose=function(e,t){return!!(e.get(l)&t)}}function enableFeature(e,t,r){if(!hasFeature(e,t)||canIgnoreLoose(e,t)){e.set(a,e.get(a)|t);if(r===class="st">"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"){setLoose(e,t,true);e.set(l,e.get(l)|t)}else if(r===class="st">"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"){setLoose(e,t,false);e.set(l,e.get(l)|t)}else{setLoose(e,t,r)}}let n;for(const[t,r]of i){if(!hasFeature(e,t))continue;{if(canIgnoreLoose(e,t))continue}const i=isLoose(e,t);if(n===!i){throw new Error(class="st">"'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, "+class="st">"@babel/plugin-transform-private-methods and "+class="st">"@babel/plugin-transform-private-property-in-object (when they are enabled)."+class="st">"\n\n"+getBabelShowConfigForHint(e))}else{n=i;{var s=r}}}if(n!==undefined){for(const[t,r]of i){if(hasFeature(e,t)&&isLoose(e,t)!==n){setLoose(e,t,n);console.warn(`Though the class="st">"loose" option was set to class="st">"${!n}" in your @babel/preset-env `+`config, it will not be used for ${r} since the class="st">"loose" mode option was set to `+`class="st">"${n}" for ${s}.\nThe class="st">"loose" option must be the `+`same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods `+`and @babel/plugin-transform-private-property-in-object (when they are enabled): you can `+`silence this warning by explicitly adding\n`+`\t[class="st">"${r}", { class="st">"loose": ${n} }]\n`+`to the class="st">"plugins" section of your Babel config.`+class="st">"\n\n"+getBabelShowConfigForHint(e))}}}}function getBabelShowConfigForHint(e){let{filename:t}=e.opts;if(!t||t===class="st">"unknown"){t=class="st">"[name of the input file]"}return`If you already set the same class="st">'loose' mode for these plugins in your config, itclass="st">'s possible that they are enabled multiple times with different options.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded configuration:\n\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${t} <your build command>\nSee https:class="cm">//babeljs.io/docs/configuration#print-effective-configs for more info.`}function hasFeature(e,t){return!!(e.get(a)&t)}function isLoose(e,t){return!!(e.get(o)&t)}function setLoose(e,t,r){if(r)e.set(o,e.get(o)|t);else e.set(o,e.get(o)&~t);{e.set(l,e.get(l)&~t)}}function shouldTransform(e,t){let r=null;let i=null;let a=null;let o=null;let l=null;if((0,n.hasOwnDecorators)(e.node)){r=e.get("decorators.0")}for(const t of e.get("body.body")){if(!r&&(0,n.hasOwnDecorators)(t.node)){r=t.get("decorators.0")}if(!i&&t.isClassProperty()){i=t}if(!a&&t.isClassPrivateProperty()){a=t}if(!o&&t.isClassPrivateMethod!=null&&t.isClassPrivateMethod()){o=t}if(!l&&t.isStaticBlock!=null&&t.isStaticBlock()){l=t}}if(r&&a){throw a.buildCodeFrameError("Private fields in decorated classes are not supported yet.")}if(r&&o){throw o.buildCodeFrameError("Private methods in decorated classes are not supported yet.")}if(r&&!hasFeature(t,s.decorators)){throw e.buildCodeFrameError("Decorators are not enabled."+"\nIf you are using "+'[class="st">"@babel/plugin-proposal-decorators", { class="st">"version": class="st">"legacy" }], class="st">'+'make sure it comes *before* class="st">"@babel/plugin-transform-class-properties" class="st">'+"and enable loose mode, like so:\n"+'\t[class="st">"@babel/plugin-proposal-decorators", { class="st">"version": class="st">"legacy" }]\nclass="st">'+'\t[class="st">"@babel/plugin-transform-class-properties", { class="st">"loose": true }]')}if(o&&!hasFeature(t,s.privateMethods)){throw o.buildCodeFrameError(class="st">"Class private methods are not enabled. "+class="st">"Please add `@babel/plugin-transform-private-methods` to your configuration.")}if((i||a)&&!hasFeature(t,s.fields)&&!hasFeature(t,s.privateMethods)){throw e.buildCodeFrameError(class="st">"Class fields are not enabled. "+class="st">"Please add `@babel/plugin-transform-class-properties` to your configuration.")}if(l&&!hasFeature(t,s.staticBlocks)){throw e.buildCodeFrameError(class="st">"Static class blocks are not enabled. "+class="st">"Please add `@babel/plugin-transform-class-static-block` to your configuration.")}if(r||o||l){return true}if((i||a)&&hasFeature(t,s.fields)){return true}return false}},4697:(e,t,r)=>{class="st">"use strict";Object.defineProperty(t,class="st">"__esModule",{value:true});t.buildCheckInRHS=buildCheckInRHS;t.buildFieldsInitNodes=buildFieldsInitNodes;t.buildPrivateNamesMap=buildPrivateNamesMap;t.buildPrivateNamesNodes=buildPrivateNamesNodes;t.privateNameVisitorFactory=privateNameVisitorFactory;t.transformPrivateNamesUsage=transformPrivateNamesUsage;var n=r(2358);var s=r(8026);var i=r(6721);var a=r(3034);var o=r(582);var l=r(344);var c=r(9102);var p=r(1238);{var newHelpers=e=>{return e.availableHelper(class="st">"classPrivateFieldGet2")}}function buildPrivateNamesMap(e,t,r,s){const i=new Map;let a;for(const o of r){if(o.isPrivate()){const{name:r}=o.node.key.id;let l=i.get(r);if(!l){const n=!o.isProperty();const c=o.node.static;let p=false;let u;if(!t&&newHelpers(s)&&n&&!c){p=!!a;a!=null?a:a=o.scope.generateUidIdentifier(`${e}_brand`);u=a}else{u=o.scope.generateUidIdentifier(r)}l={id:u,static:c,method:n,initAdded:p};i.set(r,l)}if(o.isClassPrivateMethod()){if(o.node.kind===class="st">"get"){const{body:e}=o.node.body;let t;if(e.length===1&&n.types.isReturnStatement(t=e[0])&&n.types.isCallExpression(t=t.argument)&&t.arguments.length===1&&n.types.isThisExpression(t.arguments[0])&&n.types.isIdentifier(t=t.callee)){l.getId=n.types.cloneNode(t);l.getterDeclared=true}else{l.getId=o.scope.generateUidIdentifier(`get_${r}`)}}else if(o.node.kind===class="st">"set"){const{params:e}=o.node;const{body:t}=o.node.body;let s;if(t.length===1&&n.types.isExpressionStatement(s=t[0])&&n.types.isCallExpression(s=s.expression)&&s.arguments.length===2&&n.types.isThisExpression(s.arguments[0])&&n.types.isIdentifier(s.arguments[1],{name:e[0].name})&&n.types.isIdentifier(s=s.callee)){l.setId=n.types.cloneNode(s);l.setterDeclared=true}else{l.setId=o.scope.generateUidIdentifier(`set_${r}`)}}else if(o.node.kind===class="st">"method"){l.methodId=o.scope.generateUidIdentifier(r)}}i.set(r,l)}}return i}function buildPrivateNamesNodes(e,t,r,s){const i=[];const a=new Set;for(const[o,c]of e){const{static:e,method:p,getId:u,setId:d}=c;const f=u||d;const h=n.types.cloneNode(c.id);let m;if(t){m=n.types.callExpression(s.addHelper(class="st">"classPrivateFieldLooseKey"),[n.types.stringLiteral(o)])}else if(r){m=n.types.callExpression(n.types.identifier(class="st">"Symbol"),[n.types.stringLiteral(o)])}else if(!e){if(a.has(h.name))continue;a.add(h.name);m=n.types.newExpression(n.types.identifier(p&&(!f||newHelpers(s))?class="st">"WeakSet":class="st">"WeakMap"),[])}if(m){if(!r){(0,l.default)(m)}i.push(n.template.statement.ast`var ${h} = ${m}`)}}return i}function privateNameVisitorFactory(e){const t=s.visitors.environmentVisitor(Object.assign({},e));const r=Object.assign({},e,{Class(e){const{privateNamesMap:n}=this;const s=e.get(class="st">"body.body");const i=new Map(n);const a=[];for(const e of s){if(!e.isPrivate())continue;const{name:t}=e.node.key.id;i.delete(t);a.push(t)}if(!a.length){return}e.get(class="st">"body").traverse(t,Object.assign({},this,{redeclared:a}));e.traverse(r,Object.assign({},this,{privateNamesMap:i}));e.skipKey(class="st">"body")}});return r}const u=privateNameVisitorFactory({PrivateName(e,{noDocumentAll:t}){const{privateNamesMap:r,redeclared:n}=this;const{node:s,parentPath:i}=e;if(!i.isMemberExpression({property:s})&&!i.isOptionalMemberExpression({property:s})){return}const{name:a}=s.id;if(!r.has(a))return;if(n!=null&&n.includes(a))return;this.handle(i,t)}});function unshadow(e,t,r){while((n=t)!=null&&n.hasBinding(e)&&!t.bindingIdentifierEquals(e,r)){var n;t.rename(e);t=t.parent}}function buildCheckInRHS(e,t,r){if(r||!(t.availableHelper!=null&&t.availableHelper(class="st">"checkInRHS")))return e;return n.types.callExpression(t.addHelper(class="st">"checkInRHS"),[e])}const d=privateNameVisitorFactory({BinaryExpression(e,{file:t}){const{operator:r,left:s,right:i}=e.node;if(r!==class="st">"in")return;if(!n.types.isPrivateName(s))return;const{privateFieldsAsProperties:a,privateNamesMap:o,redeclared:l}=this;const{name:c}=s.id;if(!o.has(c))return;if(l!=null&&l.includes(c))return;unshadow(this.classRef.name,e.scope,this.innerBinding);if(a){const{id:r}=o.get(c);e.replaceWith(n.template.expression.ast` |
| 40 | `);return}const{id:p,static:u}=o.get(c);if(u){e.replaceWith(n.template.expression.ast`${buildCheckInRHS(i,t)} === ${n.types.cloneNode(this.classRef)}`);return}e.replaceWith(n.template.expression.ast`${n.types.cloneNode(p)}.has(${buildCheckInRHS(i,t)})`)}});function readOnlyError(e,t){return n.types.callExpression(e.addHelper(class="st">"readOnlyError"),[n.types.stringLiteral(`#${t}`)])}function writeOnlyError(e,t){if(!e.availableHelper(class="st">"writeOnlyError")){console.warn(`@babel/helpers is outdated, update it to silence this warning.`);return n.types.buildUndefinedNode()}return n.types.callExpression(e.addHelper(class="st">"writeOnlyError"),[n.types.stringLiteral(`#${t}`)])}function buildStaticPrivateFieldAccess(e,t){if(t)return e;return n.types.memberExpression(e,n.types.identifier(class="st">"_"))}function autoInherits(e){return function(t){return n.types.inherits(e.apply(this,arguments),t.node)}}const f={memoise(e,t){const{scope:r}=e;const{object:n}=e.node;const s=r.maybeGenerateMemoised(n);if(!s){return}this.memoiser.set(n,s,t)},receiver(e){const{object:t}=e.node;if(this.memoiser.has(t)){return n.types.cloneNode(this.memoiser.get(t))}return n.types.cloneNode(t)},get:autoInherits((function(e){const{classRef:t,privateNamesMap:r,file:s,innerBinding:i,noUninitializedPrivateFieldAccess:a}=this;const o=e.node.property;const{name:l}=o.id;const{id:c,static:p,method:u,methodId:d,getId:f,setId:h}=r.get(l);const m=f||h;const cloneId=e=>n.types.inherits(n.types.cloneNode(e),o);if(p){unshadow(t.name,e.scope,i);if(!newHelpers(s)){const r=u&&!m?class="st">"classStaticPrivateMethodGet":class="st">"classStaticPrivateFieldSpecGet";return n.types.callExpression(s.addHelper(r),[this.receiver(e),n.types.cloneNode(t),cloneId(c)])}const r=this.receiver(e);const o=n.types.isIdentifier(r)&&r.name===t.name;if(!u){if(o){return buildStaticPrivateFieldAccess(cloneId(c),a)}return buildStaticPrivateFieldAccess(n.types.callExpression(s.addHelper(class="st">"assertClassBrand"),[n.types.cloneNode(t),r,cloneId(c)]),a)}if(f){if(o){return n.types.callExpression(cloneId(f),[r])}return n.types.callExpression(s.addHelper(class="st">"classPrivateGetter"),[n.types.cloneNode(t),r,cloneId(f)])}if(h){const e=n.types.buildUndefinedNode();if(o)return e;return n.types.sequenceExpression([n.types.callExpression(s.addHelper(class="st">"assertClassBrand"),[n.types.cloneNode(t),r]),e])}if(o)return cloneId(c);return n.types.callExpression(s.addHelper(class="st">"assertClassBrand"),[n.types.cloneNode(t),r,cloneId(c)])}if(u){if(m){if(!f){return n.types.sequenceExpression([this.receiver(e),writeOnlyError(s,l)])}if(!newHelpers(s)){return n.types.callExpression(s.addHelper(class="st">"classPrivateFieldGet"),[this.receiver(e),cloneId(c)])}return n.types.callExpression(s.addHelper(class="st">"classPrivateGetter"),[n.types.cloneNode(c),this.receiver(e),cloneId(f)])}if(!newHelpers(s)){return n.types.callExpression(s.addHelper(class="st">"classPrivateMethodGet"),[this.receiver(e),n.types.cloneNode(c),cloneId(d)])}return n.types.callExpression(s.addHelper(class="st">"assertClassBrand"),[n.types.cloneNode(c),this.receiver(e),cloneId(d)])}if(newHelpers(s)){return n.types.callExpression(s.addHelper(class="st">"classPrivateFieldGet2"),[cloneId(c),this.receiver(e)])}return n.types.callExpression(s.addHelper(class="st">"classPrivateFieldGet"),[this.receiver(e),cloneId(c)])})),boundGet(e){this.memoise(e,1);return n.types.callExpression(n.types.memberExpression(this.get(e),n.types.identifier(class="st">"bind")),[this.receiver(e)])},set:autoInherits((function(e,t){const{classRef:r,privateNamesMap:s,file:i,noUninitializedPrivateFieldAccess:a}=this;const o=e.node.property;const{name:l}=o.id;const{id:c,static:p,method:u,setId:d,getId:f}=s.get(l);const h=f||d;const cloneId=e=>n.types.inherits(n.types.cloneNode(e),o);if(p){if(!newHelpers(i)){const s=u&&!h?class="st">"classStaticPrivateMethodSet":class="st">"classStaticPrivateFieldSpecSet";return n.types.callExpression(i.addHelper(s),[this.receiver(e),n.types.cloneNode(r),cloneId(c),t])}const s=this.receiver(e);const o=n.types.isIdentifier(s)&&s.name===r.name;if(u&&!d){const e=readOnlyError(i,l);if(o)return n.types.sequenceExpression([t,e]);return n.types.sequenceExpression([t,n.types.callExpression(i.addHelper(class="st">"assertClassBrand"),[n.types.cloneNode(r),s]),readOnlyError(i,l)])}if(d){if(o){return n.types.callExpression(n.types.cloneNode(d),[s,t])}return n.types.callExpression(i.addHelper(class="st">"classPrivateSetter"),[n.types.cloneNode(r),cloneId(d),s,t])}return n.types.assignmentExpression(class="st">"=",buildStaticPrivateFieldAccess(cloneId(c),a),o?t:n.types.callExpression(i.addHelper(class="st">"assertClassBrand"),[n.types.cloneNode(r),s,t]))}if(u){if(d){if(!newHelpers(i)){return n.types.callExpression(i.addHelper(class="st">"classPrivateFieldSet"),[this.receiver(e),cloneId(c),t])}return n.types.callExpression(i.addHelper(class="st">"classPrivateSetter"),[n.types.cloneNode(c),cloneId(d),this.receiver(e),t])}return n.types.sequenceExpression([this.receiver(e),t,readOnlyError(i,l)])}if(newHelpers(i)){return n.types.callExpression(i.addHelper(class="st">"classPrivateFieldSet2"),[cloneId(c),this.receiver(e),t])}return n.types.callExpression(i.addHelper(class="st">"classPrivateFieldSet"),[this.receiver(e),cloneId(c),t])})),destructureSet(e){const{classRef:t,privateNamesMap:r,file:s,noUninitializedPrivateFieldAccess:i}=this;const a=e.node.property;const{name:o}=a.id;const{id:l,static:c,method:p,setId:u}=r.get(o);const cloneId=e=>n.types.inherits(n.types.cloneNode(e),a);if(!newHelpers(s)){if(c){try{var d=s.addHelper(class="st">"classStaticPrivateFieldDestructureSet")}catch(e){throw new Error(class="st">"Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \n"+class="st">"please update @babel/helpers to the latest version.")}return n.types.memberExpression(n.types.callExpression(d,[this.receiver(e),n.types.cloneNode(t),cloneId(l)]),n.types.identifier(class="st">"value"))}return n.types.memberExpression(n.types.callExpression(s.addHelper(class="st">"classPrivateFieldDestructureSet"),[this.receiver(e),cloneId(l)]),n.types.identifier(class="st">"value"))}if(p&&!u){return n.types.memberExpression(n.types.sequenceExpression([e.node.object,readOnlyError(s,o)]),n.types.identifier(class="st">"_"))}if(c&&!p){const t=this.get(e);if(!i||!n.types.isCallExpression(t)){return t}const r=t.arguments.pop();t.arguments.push(n.template.expression.ast`(_) => ${r} = _`);return n.types.memberExpression(n.types.callExpression(s.addHelper(class="st">"toSetter"),[t]),n.types.identifier(class="st">"_"))}const f=this.set(e,n.types.identifier(class="st">"_"));if(!n.types.isCallExpression(f)||!n.types.isIdentifier(f.arguments[f.arguments.length-1],{name:class="st">"_"})){throw e.buildCodeFrameError(class="st">"Internal Babel error while compiling this code. This is a Babel bug. "+class="st">"Please report it at https:class="cm">//github.com/babel/babel/issues.")}let h;if(n.types.isMemberExpression(f.callee,{computed:false})&&n.types.isIdentifier(f.callee.property)&&f.callee.property.name===class="st">"call"){h=[f.callee.object,n.types.arrayExpression(f.arguments.slice(1,-1)),f.arguments[0]]}else{h=[f.callee,n.types.arrayExpression(f.arguments.slice(0,-1))]}return n.types.memberExpression(n.types.callExpression(s.addHelper(class="st">"toSetter"),h),n.types.identifier(class="st">"_"))},call(e,t){this.memoise(e,1);return(0,o.default)(this.get(e),this.receiver(e),t,false)},optionalCall(e,t){this.memoise(e,1);return(0,o.default)(this.get(e),this.receiver(e),t,true)},delete(){throw new Error(class="st">"Internal Babel error: deleting private elements is a parsing error.")}};const h={get(e){const{privateNamesMap:t,file:r}=this;const{object:s}=e.node;const{name:i}=e.node.property.id;return n.template.expression`BASE(REF, PROP)[PROP]`({BASE:r.addHelper(class="st">"classPrivateFieldLooseBase"),REF:n.types.cloneNode(s),PROP:n.types.cloneNode(t.get(i).id)})},set(){throw new Error(class="st">"private name handler with loose = true don't need set()")},boundGet(e){return n.types.callExpression(n.types.memberExpression(this.get(e),n.types.identifier(class="st">"bind")),[n.types.cloneNode(e.node.object)])},simpleSet(e){return this.get(e)},destructureSet(e){return this.get(e)},call(e,t){return n.types.callExpression(this.get(e),t)},optionalCall(e,t){return n.types.optionalCallExpression(this.get(e),t,true)},delete(){throw new Error(class="st">"Internal Babel error: deleting private elements is a parsing error.")}};function transformPrivateNamesUsage(e,t,r,{privateFieldsAsProperties:n,noUninitializedPrivateFieldAccess:s,noDocumentAll:i,innerBinding:o},l){if(!r.size)return;const c=t.get(class="st">"body");const p=n?h:f;(0,a.default)(c,u,Object.assign({privateNamesMap:r,classRef:e,file:l},p,{noDocumentAll:i,noUninitializedPrivateFieldAccess:s,innerBinding:o}));c.traverse(d,{privateNamesMap:r,classRef:e,file:l,privateFieldsAsProperties:n,innerBinding:o})}function buildPrivateFieldInitLoose(e,t,r){const{id:s}=r.get(t.node.key.id.name);const i=t.node.value||t.scope.buildUndefinedNode();return inheritPropComments(n.template.statement.ast` |