index.js 279 KB

12345678910111213141516171819202122232425
  1. /*!
  2. Copyright (C) 2016-2020 Timofey Kachalov <[email protected]>
  3. Redistribution and use in source and binary forms, with or without
  4. modification, are permitted provided that the following conditions are met:
  5. * Redistributions of source code must retain the above copyright
  6. notice, this list of conditions and the following disclaimer.
  7. * Redistributions in binary form must reproduce the above copyright
  8. notice, this list of conditions and the following disclaimer in the
  9. documentation and/or other materials provided with the distribution.
  10. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  11. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  12. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  13. ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  14. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  15. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  16. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  17. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  18. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  19. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20. */
  21. require("source-map-support").install(),module.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=240)}([function(e,t){e.exports=require("inversify")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Factory__ICalleeDataExtractor="Factory<ICalleeDataExtractor>",e.Factory__IControlFlowCustomNode="Factory<IControlFlowCustomNode>",e.Factory__IControlFlowReplacer="Factory<IControlFlowReplacer>",e.Factory__ICustomNode="Factory<ICustomNode>",e.Factory__ICustomNodeGroup="Factory<ICustomNodeGroup>",e.Factory__IDeadCodeInjectionCustomNode="Factory<IDeadCodeInjectionCustomNode>",e.Factory__IIdentifierNamesGenerator="Factory<IIdentifierNamesGenerator>",e.Factory__IIdentifierObfuscatingReplacer="Factory<IIdentifierObfuscatingReplacer>",e.Factory__INodeGuard="Factory<INodeGuard>",e.Factory__INodeTransformer="Factory<INodeTransformer[]>",e.Factory__IObfuscatedCode="Factory<IObfuscatedCode>",e.Factory__IObfuscatingReplacer="Factory<IObfuscatingReplacer>",e.Factory__IObjectExpressionKeysTransformerCustomNode="Factory<IObjectExpressionKeysTransformerCustomNode>",e.Factory__IObjectExpressionExtractor="Factory<IObjectExpressionExtractor>",e.Factory__TControlFlowStorage="Factory<TControlFlowStorage>",e.IArrayUtils="IArrayUtils",e.ICalleeDataExtractor="ICalleeDataExtractor",e.ICallsGraphAnalyzer="ICallsGraphAnalyzer",e.ICryptUtils="ICryptUtils",e.ICustomNode="ICustomNode",e.ICustomNodeGroup="ICustomNodeGroup",e.IControlFlowReplacer="IControlFlowReplacer",e.ICustomNodeFormatter="ICustomNodeFormatter",e.IEscapeSequenceEncoder="IEscapeSequenceEncoder",e.IIdentifierNamesGenerator="IIdentifierNamesGenerator",e.IIdentifierObfuscatingReplacer="IIdentifierObfuscatingReplacer",e.IJavaScriptObfuscator="IJavaScriptObfuscator",e.ILevelledTopologicalSorter="ILevelledTopologicalSorter",e.ILogger="ILogger",e.INodeGuard="INodeGuard",e.INodeTransformer="INodeTransformer",e.INodeTransformerNamesGroupsBuilder="INodeTransformerNamesGroupsBuilder",e.IObfuscationEventEmitter="IObfuscationEventEmitter",e.IObfuscatedCode="IObfuscatedCode",e.IOptions="IOptions",e.IOptionsNormalizer="IOptionsNormalizer",e.IObfuscatingReplacer="IObfuscatingReplacer",e.IPrevailingKindOfVariablesAnalyzer="IPrevailingKindOfVariablesAnalyzer",e.IObjectExpressionExtractor="IObjectExpressionExtractor",e.IRandomGenerator="IRandomGenerator",e.ISourceCode="ISourceCode",e.ISourceMapCorrector="ISourceMapCorrector",e.IScopeAnalyzer="IScopeAnalyzer",e.IStringArrayStorageAnalyzer="IStringArrayStorageAnalyzer",e.ITransformersRunner="ITransformersRunner",e.Newable__ICustomNode="Newable<ICustomNode>",e.Newable__TControlFlowStorage="Newable<TControlFlowStorage>",e.TCustomNodeGroupStorage="TCustomNodeGroupStorage",e.TInputOptions="TInputOptions",e.TStringArrayStorage="TStringArrayStorage"}(t.ServiceIdentifiers||(t.ServiceIdentifiers={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(33);class n{static isArrayPatternNode(e){return e.type===o.NodeType.ArrayPattern}static isArrowFunctionExpressionNode(e){return e.type===o.NodeType.ArrowFunctionExpression}static isAssignmentExpressionNode(e){return e.type===o.NodeType.AssignmentExpression}static isAssignmentPatternNode(e){return e.type===o.NodeType.AssignmentPattern}static isAwaitExpressionNode(e){return e.type===o.NodeType.AwaitExpression}static isBlockStatementNode(e){return e.type===o.NodeType.BlockStatement}static isBreakStatementNode(e){return e.type===o.NodeType.BreakStatement}static isCallExpressionNode(e){return e.type===o.NodeType.CallExpression}static isClassDeclarationNode(e){return e.type===o.NodeType.ClassDeclaration&&null!==e.id}static isContinueStatementNode(e){return e.type===o.NodeType.ContinueStatement}static isDirectiveNode(e){return e.type===o.NodeType.ExpressionStatement&&"directive"in e}static isExportNamedDeclarationNode(e){return e.type===o.NodeType.ExportNamedDeclaration}static isExpressionStatementNode(e){return e.type===o.NodeType.ExpressionStatement&&!("directive"in e)}static isFunctionNode(e){return n.isFunctionDeclarationNode(e)||n.isFunctionExpressionNode(e)||n.isArrowFunctionExpressionNode(e)}static isFunctionDeclarationNode(e){return e.type===o.NodeType.FunctionDeclaration&&null!==e.id}static isFunctionExpressionNode(e){return e.type===o.NodeType.FunctionExpression}static isIdentifierNode(e){return e.type===o.NodeType.Identifier}static isImportDeclarationNode(e){return e.type===o.NodeType.ImportDeclaration}static isImportSpecifierNode(e){return e.type===o.NodeType.ImportSpecifier}static isLabelIdentifierNode(e,t){const r=n.isLabeledStatementNode(t)&&t.label===e,o=n.isContinueStatementNode(t)&&t.label===e,i=n.isBreakStatementNode(t)&&t.label===e;return r||o||i}static isLabeledStatementNode(e){return e.type===o.NodeType.LabeledStatement}static isLiteralNode(e){return e.type===o.NodeType.Literal}static isMemberExpressionNode(e){return e.type===o.NodeType.MemberExpression}static isMethodDefinitionNode(e){return e.type===o.NodeType.MethodDefinition}static isNode(e){return e&&void 0!==!e.type}static isNodeWithLexicalScope(e){return n.isProgramNode(e)||n.isFunctionNode(e)}static isNodeWithBlockLexicalScope(e){return n.isNodeWithLexicalScope(e)||n.isBlockStatementNode(e)}static isNodeWithLexicalScopeStatements(e,t){return n.isProgramNode(e)||n.isBlockStatementNode(e)&&n.nodesWithLexicalStatements.includes(t.type)}static isNodeWithStatements(e){return n.isProgramNode(e)||n.isBlockStatementNode(e)||n.isSwitchCaseNode(e)}static isNodeWithComments(e){return Boolean(e.leadingComments)||Boolean(e.trailingComments)}static isObjectPatternNode(e){return e.type===o.NodeType.ObjectPattern}static isObjectExpressionNode(e){return e.type===o.NodeType.ObjectExpression}static isProgramNode(e){return e.type===o.NodeType.Program}static isPropertyNode(e){return e.type===o.NodeType.Property}static parentNodeIsPropertyNode(e,t){return n.isPropertyNode(t)&&!t.computed&&t.key===e}static parentNodeIsMemberExpressionNode(e,t){return n.isMemberExpressionNode(t)&&!t.computed&&t.property===e}static parentNodeIsMethodDefinitionNode(e,t){return n.isMethodDefinitionNode(t)&&!t.computed}static isRestElementNode(e){return e.type===o.NodeType.RestElement}static isReturnStatementNode(e){return e.type===o.NodeType.ReturnStatement}static isSuperNode(e){return e.type===o.NodeType.Super}static isSwitchCaseNode(e){return e.type===o.NodeType.SwitchCase}static isTaggedTemplateExpressionNode(e){return e.type===o.NodeType.TaggedTemplateExpression}static isTemplateLiteralNode(e){return e.type===o.NodeType.TemplateLiteral}static isUnaryExpressionNode(e){return e.type===o.NodeType.UnaryExpression}static isUseStrictOperator(e){return n.isDirectiveNode(e)&&"use strict"===e.directive}static isVariableDeclarationNode(e){return e.type===o.NodeType.VariableDeclaration}static isVariableDeclaratorNode(e){return e.type===o.NodeType.VariableDeclarator}static isWhileStatementNode(e){return e.type===o.NodeType.WhileStatement}}t.NodeGuards=n,n.nodesWithLexicalStatements=[o.NodeType.ArrowFunctionExpression,o.NodeType.FunctionDeclaration,o.NodeType.FunctionExpression,o.NodeType.MethodDefinition]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const n=o(r(46)),i=o(r(13)),a=r(43),s=r(55),c=r(4),d=r(15);class l{static addXVerbatimPropertyTo(e){return e["x-verbatim-property"]={content:e.raw,precedence:n.Precedence.Primary},e}static clone(e){return l.parentizeAst(l.cloneRecursive(e))}static convertCodeToStructure(e){const t=s.ASTParserFacade.parse({sourceCode:e},{ecmaVersion:a.ecmaVersion,sourceType:"script"});return i.replace(t,{enter:(e,t)=>(l.parentizeNode(e,t),c.NodeGuards.isLiteralNode(e)&&l.addXVerbatimPropertyTo(e),d.NodeMetadata.set(e,{ignoredNode:!1}),e)}),t.body}static convertStructureToCode(e){return e.reduce((e,t)=>e+n.generate(t,{sourceMapWithCode:!0}).code,"")}static getUnaryExpressionArgumentNode(e){return c.NodeGuards.isUnaryExpressionNode(e.argument)?l.getUnaryExpressionArgumentNode(e.argument):e.argument}static parentizeAst(e){return i.replace(e,{enter:l.parentizeNode}),e}static parentizeNode(e,t){return e.parentNode=t||e,e}static cloneRecursive(e){if(null===e)return e;const t={};return Object.keys(e).forEach(r=>{if("parentNode"===r)return;const o=e[r];let n;n=null===o||o instanceof RegExp?o:Array.isArray(o)?o.map(l.cloneRecursive):"object"==typeof o?l.cloneRecursive(o):o,t[r]=n}),t}}t.NodeUtils=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={configurable:!0,enumerable:!0};function n(e,t,r){Reflect.hasMetadata(e,r)||Reflect.defineMetadata(e,t,r)}t.initializable=function(e="initialize"){const t=Object.keys(this)[0];return(r,i)=>{const a=r[e];if(!a||"function"!=typeof a)throw new Error(`\`${e}\` method with initialization logic not `+`found. \`@${t}\` decorator requires \`${e}\` method`);return n("_initialized",!1,r),n("_initializablePropertiesSet",new Set,r),n("_wrappedMethodsSet",new Set,r),function(e,t){const r=Object.getOwnPropertyNames(e),n=[t,"constructor"];r.forEach(r=>{const i=Reflect.getMetadata("_initializablePropertiesSet",e),a=Reflect.getMetadata("_wrappedMethodsSet",e);if(n.includes(r)||i.has(r)||a.has(r))return;if("function"!=typeof e[r])return;const s=Object.getOwnPropertyDescriptor(e,r)||o,c=s.value;Object.defineProperty(e,r,Object.assign(Object.assign({},s),{value:function(){if(!Reflect.getMetadata("_initialized",this))throw new Error(`Class should be initialized with \`${t}()\` method`);return c.apply(this,arguments)}})),a.add(r)})}(r,e),function(e,t,r){const n=Object.getOwnPropertyDescriptor(e,t)||o,i=n.value;Object.defineProperty(e,t,Object.assign(Object.assign({},n),{value:function(){Reflect.defineMetadata("_initialized",!0,this);const e=i.apply(this,arguments);return this[r],e}}))}(r,e,i),function(e,t){Reflect.getMetadata("_initializablePropertiesSet",e).add(t);const r=`_${t.toString()}`,n=Object.getOwnPropertyDescriptor(e,r)||o;return Object.defineProperty(e,t,Object.assign(Object.assign({},n),{get:function(){if(void 0===this[r])throw new Error(`Property \`${t.toString()}\` is not initialized! Initialize it first!`);return this[r]},set:function(e){this[r]=e}})),n}(r,i)}}},function(e,t,r){"use strict";var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const n=o(r(46)),i=r(33);class a{static programNode(e=[]){return{type:i.NodeType.Program,body:e,sourceType:"script",metadata:{ignoredNode:!1}}}static arrayExpressionNode(e=[]){return{type:i.NodeType.ArrayExpression,elements:e,metadata:{ignoredNode:!1}}}static assignmentExpressionNode(e,t,r){return{type:i.NodeType.AssignmentExpression,operator:e,left:t,right:r,metadata:{ignoredNode:!1}}}static binaryExpressionNode(e,t,r){return{type:i.NodeType.BinaryExpression,operator:e,left:t,right:r,metadata:{ignoredNode:!1}}}static blockStatementNode(e=[]){return{type:i.NodeType.BlockStatement,body:e,metadata:{ignoredNode:!1}}}static breakStatement(e){return{type:i.NodeType.BreakStatement,label:e,metadata:{ignoredNode:!1}}}static callExpressionNode(e,t=[]){return{type:i.NodeType.CallExpression,callee:e,arguments:t,metadata:{ignoredNode:!1}}}static continueStatement(e){return{type:i.NodeType.ContinueStatement,label:e,metadata:{ignoredNode:!1}}}static directiveNode(e,t){return{type:i.NodeType.ExpressionStatement,expression:e,directive:t,metadata:{ignoredNode:!1}}}static expressionStatementNode(e){return{type:i.NodeType.ExpressionStatement,expression:e,metadata:{ignoredNode:!1}}}static functionDeclarationNode(e,t,r){return{type:i.NodeType.FunctionDeclaration,id:a.identifierNode(e),params:t,body:r,generator:!1,metadata:{ignoredNode:!1}}}static functionExpressionNode(e,t){return{type:i.NodeType.FunctionExpression,params:e,body:t,generator:!1,metadata:{ignoredNode:!1}}}static ifStatementNode(e,t,r){return Object.assign(Object.assign({type:i.NodeType.IfStatement,test:e,consequent:t},r&&{alternate:r}),{metadata:{ignoredNode:!1}})}static identifierNode(e){return{type:i.NodeType.Identifier,name:e,metadata:{ignoredNode:!1}}}static importDeclarationNode(e,t){return{type:i.NodeType.ImportDeclaration,specifiers:e,source:t,metadata:{ignoredNode:!1}}}static literalNode(e,t){return t=void 0!==t?t:`'${e}'`,{type:i.NodeType.Literal,value:e,raw:t,"x-verbatim-property":{content:t,precedence:n.Precedence.Primary},metadata:{ignoredNode:!1}}}static logicalExpressionNode(e,t,r){return{type:i.NodeType.LogicalExpression,operator:e,left:t,right:r,metadata:{ignoredNode:!1}}}static memberExpressionNode(e,t,r=!1){return{type:i.NodeType.MemberExpression,computed:r,object:e,property:t,metadata:{ignoredNode:!1}}}static methodDefinitionNode(e,t,r,o){return{type:i.NodeType.MethodDefinition,key:e,value:t,kind:r,computed:o,static:!1,metadata:{ignoredNode:!1}}}static objectExpressionNode(e){return{type:i.NodeType.ObjectExpression,properties:e,metadata:{ignoredNode:!1}}}static propertyNode(e,t,r=!1){return{type:i.NodeType.Property,key:e,value:t,kind:"init",method:!1,shorthand:!1,computed:r,metadata:{ignoredNode:!1}}}static returnStatementNode(e){return{type:i.NodeType.ReturnStatement,argument:e,metadata:{ignoredNode:!1}}}static switchStatementNode(e,t){return{type:i.NodeType.SwitchStatement,discriminant:e,cases:t,metadata:{ignoredNode:!1}}}static switchCaseNode(e,t){return{type:i.NodeType.SwitchCase,test:e,consequent:t,metadata:{ignoredNode:!1}}}static unaryExpressionNode(e,t,r=!0){return{type:i.NodeType.UnaryExpression,operator:e,argument:t,prefix:r,metadata:{ignoredNode:!1}}}static updateExpressionNode(e,t){return{type:i.NodeType.UpdateExpression,operator:e,argument:t,prefix:!1,metadata:{ignoredNode:!1}}}static variableDeclarationNode(e=[],t="var"){return{type:i.NodeType.VariableDeclaration,declarations:e,kind:t,metadata:{ignoredNode:!1}}}static variableDeclaratorNode(e,t){return{type:i.NodeType.VariableDeclarator,id:e,init:t,metadata:{ignoredNode:!1}}}static whileStatementNode(e,t){return{type:i.NodeType.WhileStatement,test:e,body:t,metadata:{ignoredNode:!1}}}}t.NodeFactory=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(5),m=r(2),g=r(3),y=r(9),N=r(113),h=r(114);let b=o=class{constructor(e,t,r,o){this.cachedNode=null,this.identifierNamesGenerator=e(o),this.customNodeFormatter=t,this.randomGenerator=r,this.options=o}getNode(){if(!this.cachedNode){const e=this.getNodeTemplate();this.cachedNode=this.customNodeFormatter.formatStructure(this.getNodeStructure(e))}return this.cachedNode}getGlobalVariableTemplate(){return this.randomGenerator.getRandomGenerator().pickone(o.globalVariableTemplateFunctions)}getNodeTemplate(){return""}};b.globalVariableTemplateFunctions=[N.GlobalVariableTemplate1(),h.GlobalVariableTemplate2()],b=o=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==p.TIdentifierNamesGeneratorFactory&&p.TIdentifierNamesGeneratorFactory)?n:Object,"function"==typeof(i=void 0!==y.ICustomNodeFormatter&&y.ICustomNodeFormatter)?i:Object,"function"==typeof(a=void 0!==g.IRandomGenerator&&g.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==m.IOptions&&m.IOptions)?s:Object])],b),t.AbstractCustomNode=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Initializing="Initializing",e.Preparing="Preparing",e.DeadCodeInjection="DeadCodeInjection",e.ControlFlowFlattening="ControlFlowFlattening",e.Converting="Converting",e.Obfuscating="Obfuscating",e.Finalizing="Finalizing"}(t.TransformationStage||(t.TransformationStage={}))},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(2),u=r(3);let f=class{constructor(e,t){this.randomGenerator=e,this.options=t}};f=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.IRandomGenerator)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==u.IRandomGenerator&&u.IRandomGenerator)?o:Object,"function"==typeof(n=void 0!==l.IOptions&&l.IOptions)?n:Object])],f),t.AbstractNodeTransformer=f},function(e,t){e.exports=require("estraverse")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4);class n{static getParentNodeWithStatements(e){return n.getParentNodesWithStatementsRecursive(e,1)[0]}static getParentNodesWithStatements(e){return n.getParentNodesWithStatementsRecursive(e)}static getNextSiblingStatement(e){return n.getSiblingStatementByOffset(e,1)}static getPreviousSiblingStatement(e){return n.getSiblingStatementByOffset(e,-1)}static getRootStatementOfNode(e){if(o.NodeGuards.isProgramNode(e))throw new Error("Unable to find root statement for `Program` node");const t=e.parentNode;if(!t)throw new ReferenceError("`parentNode` property of given node is `undefined`");return o.NodeGuards.isNodeWithStatements(t)?e:n.getRootStatementOfNode(t)}static getScopeOfNode(e){const t=e.parentNode;if(!t)throw new ReferenceError("`parentNode` property of given node is `undefined`");return o.NodeGuards.isNodeWithStatements(t)?t:n.getScopeOfNode(t)}static getParentNodesWithStatementsRecursive(e,t=1/0,r=[],i=0){if(r.length>=t)return r;const a=e.parentNode;if(!a)throw new ReferenceError("`parentNode` property of given node is `undefined`");return(o.NodeGuards.isProgramNode(e)||o.NodeGuards.isNodeWithLexicalScopeStatements(e,a)&&i>0)&&r.push(e),e!==a?n.getParentNodesWithStatementsRecursive(a,t,r,++i):r}static getSiblingStatementByOffset(e,t){const r=n.getScopeOfNode(e),i=o.NodeGuards.isSwitchCaseNode(r)?r.consequent:r.body,a=i.indexOf(e);return i[a+t]||null}}t.NodeStatementUtils=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o{static set(e,t){e.metadata=Object.assign(e.metadata||{},t)}static get(e,t){return void 0!==e.metadata?e.metadata[t]:void 0}static isIgnoredNode(e){return!0===o.get(e,"ignoredNode")}static isReplacedLiteral(e){return!0===o.get(e,"replacedLiteral")}}t.NodeMetadata=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(1),i=r(72),a=r(82),s=r(95),c=r(106),d=r(156),l=r(157),u=r(161),f=r(162),p=r(173),m=r(195),g=r(210),y=r(215),N=r(225),h=r(70),b=r(229),I=r(231),v=r(232),S=r(233);t.InversifyContainerFacade=class{constructor(){this.container=new o.Container}static getFactory(e){return t=>r=>t.container.getNamed(e,r)}static getCacheFactory(e){return t=>{const r=new Map;return o=>{if(r.has(o))return r.get(o);const n=t.container.getNamed(e,o);return r.set(o,n),n}}}static getConstructorFactory(e,...t){return r=>{const o=new Map,n=[];return i=>{if(t.forEach((e,t)=>{n[t]||(n[t]=r.container.get(e))}),o.has(i))return new(o.get(i))(...n);const a=r.container.getNamed(e,i);return o.set(i,a),new a(...n)}}}get(e){return this.container.get(e)}getNamed(e,t){return this.container.getNamed(e,t)}load(e,t,r){this.container.bind(n.ServiceIdentifiers.ISourceCode).toDynamicValue(()=>new v.SourceCode(e,t)).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.TInputOptions).toDynamicValue(()=>r).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.ILogger).to(h.Logger).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.IJavaScriptObfuscator).to(N.JavaScriptObfuscator).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.ITransformersRunner).to(S.TransformersRunner).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.IObfuscatedCode).to(I.ObfuscatedCode),this.container.bind(n.ServiceIdentifiers.Factory__IObfuscatedCode).toFactory(e=>(t,r)=>{const o=e.container.get(n.ServiceIdentifiers.IObfuscatedCode);return o.initialize(t,r),o}),this.container.bind(n.ServiceIdentifiers.IObfuscationEventEmitter).to(b.ObfuscationEventEmitter).inSingletonScope(),this.container.load(i.analyzersModule),this.container.load(a.controlFlowTransformersModule),this.container.load(s.convertingTransformersModule),this.container.load(c.customNodesModule),this.container.load(d.finalizingTransformersModule),this.container.load(l.generatorsModule),this.container.load(u.nodeTransformersModule),this.container.load(f.obfuscatingTransformersModule),this.container.load(p.optionsModule),this.container.load(m.preparingTransformersModule),this.container.load(g.storagesModule),this.container.load(y.utilsModule)}unload(){this.container.unbindAll()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BinaryExpressionFunctionNode="BinaryExpressionFunctionNode",e.BlockStatementControlFlowFlatteningNode="BlockStatementControlFlowFlatteningNode",e.CallExpressionControlFlowStorageCallNode="CallExpressionControlFlowStorageCallNode",e.CallExpressionFunctionNode="CallExpressionFunctionNode",e.ControlFlowStorageNode="ControlFlowStorageNode",e.ExpressionWithOperatorControlFlowStorageCallNode="ExpressionWithOperatorControlFlowStorageCallNode",e.LogicalExpressionFunctionNode="LogicalExpressionFunctionNode",e.StringLiteralControlFlowStorageCallNode="StringLiteralControlFlowStorageCallNode",e.StringLiteralNode="StringLiteralNode"}(t.ControlFlowCustomNode||(t.ControlFlowCustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4);class n{static append(e,t){t=n.parentizeScopeStatementsBeforeAppend(e,t),n.setScopeStatements(e,[...n.getScopeStatements(e),...t])}static appendToOptimalBlockScope(e,t,r,o=0){const i=e.length?n.getOptimalBlockScope(e,o):t;n.prepend(i,r)}static getOptimalBlockScope(e,t,r=1/0){const o=e[t];if(r<=0)throw new Error("Invalid `deep` argument value. Value should be bigger then 0.");return r>1&&o.callsGraph.length?n.getOptimalBlockScope(o.callsGraph,0,--r):o.callee}static insertBefore(e,t,r){const o=n.getScopeStatements(e).indexOf(r);n.insertAtIndex(e,t,o)}static insertAfter(e,t,r){const o=n.getScopeStatements(e).indexOf(r);n.insertAtIndex(e,t,o+1)}static insertAtIndex(e,t,r){t=n.parentizeScopeStatementsBeforeAppend(e,t),n.setScopeStatements(e,[...n.getScopeStatements(e).slice(0,r),...t,...n.getScopeStatements(e).slice(r)])}static prepend(e,t){t=n.parentizeScopeStatementsBeforeAppend(e,t),n.setScopeStatements(e,[...t,...n.getScopeStatements(e)])}static getScopeStatements(e){return o.NodeGuards.isSwitchCaseNode(e)?e.consequent:e.body}static parentizeScopeStatementsBeforeAppend(e,t){return t.forEach(t=>{t.parentNode=e}),t}static setScopeStatements(e,t){o.NodeGuards.isSwitchCaseNode(e)?e.consequent=t:e.body=t}}t.NodeAppender=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(28);t.ObfuscationTarget=o.MakeEnum({Browser:"browser",BrowserNoEval:"browser-no-eval",Node:"node"})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BlockStatementControlFlowTransformer="BlockStatementControlFlowTransformer",e.CommentsTransformer="CommentsTransformer",e.CustomNodesTransformer="CustomNodesTransformer",e.DeadCodeInjectionTransformer="DeadCodeInjectionTransformer",e.EvalCallExpressionTransformer="EvalCallExpressionTransformer",e.FunctionControlFlowTransformer="FunctionControlFlowTransformer",e.LabeledStatementTransformer="LabeledStatementTransformer",e.LiteralTransformer="LiteralTransformer",e.MemberExpressionTransformer="MemberExpressionTransformer",e.MetadataTransformer="MetadataTransformer",e.MethodDefinitionTransformer="MethodDefinitionTransformer",e.ObfuscatingGuardsTransformer="ObfuscatingGuardsTransformer",e.ObjectExpressionKeysTransformer="ObjectExpressionKeysTransformer",e.ObjectExpressionTransformer="ObjectExpressionTransformer",e.ParentificationTransformer="ParentificationTransformer",e.ScopeIdentifiersTransformer="ScopeIdentifiersTransformer",e.SplitStringTransformer="SplitStringTransformer",e.TemplateLiteralTransformer="TemplateLiteralTransformer",e.VariablePreserveTransformer="VariablePreserveTransformer"}(t.NodeTransformer||(t.NodeTransformer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.AfterObfuscation="afterObfuscation",e.BeforeObfuscation="beforeObfuscation"}(t.ObfuscationEvent||(t.ObfuscationEvent={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ConsoleOutputDisableExpressionNode="ConsoleOutputDisableExpressionNode",e.DebugProtectionFunctionCallNode="DebugProtectionFunctionCallNode",e.DebugProtectionFunctionIntervalNode="DebugProtectionFunctionIntervalNode",e.DebugProtectionFunctionNode="DebugProtectionFunctionNode",e.DomainLockNode="DomainLockNode",e.NodeCallsControllerFunctionNode="NodeCallsControllerFunctionNode",e.SelfDefendingUnicodeNode="SelfDefendingUnicodeNode",e.StringArrayCallsWrapper="StringArrayCallsWrapper",e.StringArrayNode="StringArrayNode",e.StringArrayRotateFunctionNode="StringArrayRotateFunctionNode"}(t.CustomNode||(t.CustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(28);t.StringArrayEncoding=o.MakeEnum({Base64:"base64",Rc4:"rc4"})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(69);const o=r(1),n=r(16);class i{static obfuscate(e,t={}){const r=new n.InversifyContainerFacade;r.load(e,"",t);const i=r.get(o.ServiceIdentifiers.IJavaScriptObfuscator).obfuscate(e);return r.unload(),i}}t.JavaScriptObfuscator=i,i.version="0.24.2"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=r(5),f=r(2),p=r(3);let m=class{constructor(e,t,r){this.identifierNamesGenerator=e(r),this.randomGenerator=t,this.options=r}getAppendEvent(){return this.appendEvent}getCustomNodes(){return this.customNodes}appendCustomNodeIfExist(e,t){const r=this.customNodes.get(e);r&&t(r)}getRandomCallsGraphIndex(e){return this.randomGenerator.getRandomInteger(0,Math.max(0,Math.round(e-1)))}};m=a([d.injectable(),c(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),c(2,d.inject(l.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(o=void 0!==u.TIdentifierNamesGeneratorFactory&&u.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==p.IRandomGenerator&&p.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==f.IOptions&&f.IOptions)?i:Object])],m),t.AbstractCustomNodeGroup=m},function(e,t){e.exports=require("@gradecam/tsenum")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o{static extractDomainFrom(e){let t;return t=e.indexOf("://")>-1||0===e.indexOf("//")?e.split("/")[2]:e.split("/")[0],t=t.split(":")[0],t}}t.Utils=o,o.hexadecimalPrefix="0x"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(28);t.IdentifierNamesGenerator=o.MakeEnum({DictionaryIdentifierNamesGenerator:"dictionary",HexadecimalIdentifierNamesGenerator:"hexadecimal",MangledIdentifierNamesGenerator:"mangled"})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(28);t.SourceMapMode=o.MakeEnum({Inline:"inline",Separate:"separate"})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.AwaitExpression="AwaitExpression",e.BinaryExpression="BinaryExpression",e.BlockStatement="BlockStatement",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ClassDeclaration="ClassDeclaration",e.ConditionalExpression="ConditionalExpression",e.ContinueStatement="ContinueStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExpressionStatement="ExpressionStatement",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.ForOfStatement="ForOfStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.ImportNamespaceSpecifier="ImportNamespaceSpecifier",e.ImportSpecifier="ImportSpecifier",e.LabeledStatement="LabeledStatement",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MethodDefinition="MethodDefinition",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.Program="Program",e.Property="Property",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TaggedTemplateExpression="TaggedTemplateExpression",e.TemplateLiteral="TemplateLiteral",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement"}(t.NodeType||(t.NodeType={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(31),n=r(20),i=r(32);t.NO_ADDITIONAL_NODES_PRESET=Object.freeze({compact:!0,controlFlowFlattening:!1,controlFlowFlatteningThreshold:0,deadCodeInjection:!1,deadCodeInjectionThreshold:0,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],exclude:[],identifierNamesGenerator:o.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,identifiersPrefix:"",identifiersDictionary:[],inputFileName:"",inputFilePath:"",log:!1,renameGlobals:!1,reservedNames:[],reservedStrings:[],rotateStringArray:!1,seed:0,selfDefending:!1,shuffleStringArray:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:i.SourceMapMode.Separate,splitStrings:!1,splitStringsChunkLength:0,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0,target:n.ObfuscationTarget.Browser,transformObjectKeys:!1,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.NumberUtils=class{static toHex(e){return e.toString(16)}static isCeil(e){return e%1==0}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BaseIdentifierObfuscatingReplacer="BaseIdentifierObfuscatingReplacer"}(t.IdentifierObfuscatingReplacer||(t.IdentifierObfuscatingReplacer={}))},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(0),c=r(1),d=r(2);let l=class{constructor(e){this.options=e}};l=n([s.injectable(),a(0,s.inject(c.ServiceIdentifiers.IOptions)),i("design:paramtypes",["function"==typeof(o=void 0!==d.IOptions&&d.IOptions)?o:Object])],l),t.AbstractObfuscatingReplacer=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(31),n=r(20),i=r(32);t.DEFAULT_PRESET=Object.freeze({compact:!0,config:"",controlFlowFlattening:!1,controlFlowFlatteningThreshold:.75,deadCodeInjection:!1,deadCodeInjectionThreshold:.4,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],exclude:[],identifierNamesGenerator:o.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,identifiersPrefix:"",identifiersDictionary:[],inputFileName:"",inputFilePath:"",log:!1,renameGlobals:!1,reservedNames:[],reservedStrings:[],rotateStringArray:!0,seed:0,selfDefending:!1,shuffleStringArray:!0,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:i.SourceMapMode.Separate,splitStrings:!1,splitStringsChunkLength:10,stringArray:!0,stringArrayEncoding:!1,stringArrayThreshold:.75,target:n.ObfuscationTarget.Browser,transformObjectKeys:!1,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Dot=".",e.Comma=","}(t.StringSeparator||(t.StringSeparator={}))},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0});let n=class{};n=o([r(0).injectable()],n),t.AbstractCalleeDataExtractor=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ecmaVersion=11},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4);t.NodeLiteralUtils=class{static isProhibitedLiteralNode(e,t){return!(!o.NodeGuards.isPropertyNode(t)||t.computed||t.key!==e)||!!o.NodeGuards.isImportDeclarationNode(t)}}},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(17),p=r(2),m=r(3);let g=o=class{constructor(e,t,r){this.replacerDataByControlFlowStorageId=new Map,this.controlFlowCustomNodeFactory=e,this.randomGenerator=t,this.options=r}static getStorageKeysByIdForCurrentStorage(e,t){let r;return r=e.has(t)?e.get(t):new Map,r}insertCustomNodeToControlFlowStorage(e,t,r,n){const i=t.getStorageId(),a=o.getStorageKeysByIdForCurrentStorage(this.replacerDataByControlFlowStorageId,i),s=a.get(r);if(this.randomGenerator.getMathRandom()<n&&s&&s.length)return this.randomGenerator.getRandomGenerator().pickone(s);const c=e=>{const r=this.randomGenerator.getRandomString(e);return t.getStorage().has(r)?c(e):r},d=c(5);return a.set(r,[d]),this.replacerDataByControlFlowStorageId.set(i,a),t.set(d,e),d}};g=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),d(1,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(2,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==f.TControlFlowCustomNodeFactory&&f.TControlFlowCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],g),t.AbstractControlFlowReplacer=g},function(e,t){e.exports=require("escodegen")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableNoEvalTemplate=function(){return"\n const that = (typeof window !== 'undefined'\n ? window\n : (typeof process === 'object' &&\n typeof require === 'function' &&\n typeof global === 'object')\n ? global\n : this);\n "}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(2),u=r(3);let f=class{constructor(e,t){this.preservedNamesSet=new Set,this.randomGenerator=e,this.options=t}preserveName(e){this.preservedNamesSet.add(e)}isValidIdentifierName(e){return this.notReservedName(e)&&!this.preservedNamesSet.has(e)}notReservedName(e){return!this.options.reservedNames.length||!this.options.reservedNames.some(t=>null!==new RegExp(t,"g").exec(e))}};f=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.IRandomGenerator)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==u.IRandomGenerator&&u.IRandomGenerator)?o:Object,"function"==typeof(n=void 0!==l.IOptions&&l.IOptions)?n:Object])],f),t.AbstractIdentifierNamesGenerator=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=r(2),f=r(3),p=r(7);let m=class{constructor(e,t){this.randomGenerator=e,this.options=t}initialize(){this.storage=new Map,this.storageId=this.randomGenerator.getRandomString(6)}get(e){return this.storage.get(e)}getOrThrow(e){const t=this.get(e);if(!t)throw new Error(`No value found in map storage with key \`${e}\``);return t}getKeyOf(e){for(const[t,r]of this.storage)if(e===r)return t;return null}getLength(){return this.storage.size}getStorage(){return this.storage}getStorageId(){return this.storageId}has(e){return this.storage.has(e)}mergeWith(e,t=!1){this.storage=new Map([...this.storage,...e.getStorage()]),t&&(this.storageId=e.getStorageId())}set(e,t){this.storage.set(e,t)}};a([p.initializable(),s("design:type",String)],m.prototype,"storageId",void 0),a([p.initializable(),s("design:type","function"==typeof(o="undefined"!=typeof Map&&Map)?o:Object)],m.prototype,"storage",void 0),a([d.postConstruct(),s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],m.prototype,"initialize",null),m=a([d.injectable(),c(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),c(1,d.inject(l.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(n=void 0!==f.IRandomGenerator&&f.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==u.IOptions&&u.IOptions)?i:Object])],m),t.MapStorage=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.FunctionDeclarationCalleeDataExtractor="FunctionDeclarationCalleeDataExtractor",e.FunctionExpressionCalleeDataExtractor="FunctionExpressionCalleeDataExtractor",e.ObjectExpressionCalleeDataExtractor="ObjectExpressionCalleeDataExtractor"}(t.CalleeDataExtractor||(t.CalleeDataExtractor={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BinaryExpressionControlFlowReplacer="BinaryExpressionControlFlowReplacer",e.CallExpressionControlFlowReplacer="CallExpressionControlFlowReplacer",e.LogicalExpressionControlFlowReplacer="LogicalExpressionControlFlowReplacer",e.StringLiteralControlFlowReplacer="StringLiteralControlFlowReplacer"}(t.ControlFlowReplacer||(t.ControlFlowReplacer={}))},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=r(17),f=r(2),p=r(3),m=r(18),g=r(45),y=r(4);let N=class extends g.AbstractControlFlowReplacer{constructor(e,t,r){super(e,t,r)}getControlFlowStorageCallNode(e,t,r,o){const n=this.controlFlowCustomNodeFactory(m.ControlFlowCustomNode.ExpressionWithOperatorControlFlowStorageCallNode);n.initialize(e,t,r,o);const i=n.getNode()[0];if(!i||!y.NodeGuards.isExpressionStatementNode(i))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return i.expression}};N=a([d.injectable(),c(0,d.inject(l.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),c(2,d.inject(l.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(o=void 0!==u.TControlFlowCustomNodeFactory&&u.TControlFlowCustomNodeFactory)?o:Object,"function"==typeof(n=void 0!==p.IRandomGenerator&&p.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==f.IOptions&&f.IOptions)?i:Object])],N),t.ExpressionWithOperatorControlFlowReplacer=N},function(e,t,r){"use strict";var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(r(85)),a=n(r(86)),s=n(r(56));class c{static parse(e,t){const r=c.sourceTypes.length;for(let o=0;o<r;o++)try{return c.parseType(e,t,c.sourceTypes[o])}catch(t){if(o<r-1)continue;throw new Error(c.processParsingError(e,t.message,t.loc))}throw new Error("Acorn parsing error")}static parseType(e,t,r){const{sourceCode:o}=e,n=[],s=Object.assign(Object.assign({},t),{onComment:n,sourceType:r}),c=i.Parser.extend(a.default).parse(o,s);return n.length&&(c.comments=n),c}static processParsingError(e,t,r){if(!r||!r.line||!r.column)throw new Error(t);const{sourceCode:o,inputFilePath:n}=e,i=o.split(/\r?\n/)[r.line-1];if(!i)throw new Error(t);const a=n?`${n}, `:"",s=Math.max(0,r.column-c.nearestSymbolsCount),d=Math.min(i.length,r.column+c.nearestSymbolsCount),l=c.colorError(">"),u=`...${i.substring(s,d).replace(/^\s+/,"")}...`;throw new Error(`ERROR in ${a}line ${r.line}: ${t}\n${l} ${u}`)}}t.ASTParserFacade=c,c.colorError=s.default.red,c.nearestSymbolsCount=15,c.sourceTypes=["script","module"]},function(e,t){e.exports=require("chalk")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BlockStatementDeadCodeInjectionNode="BlockStatementDeadCodeInjectionNode"}(t.DeadCodeInjectionCustomNode||(t.DeadCodeInjectionCustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BasePropertiesExtractor="BasePropertiesExtractor",e.ObjectExpressionToVariableDeclarationExtractor="ObjectExpressionToVariableDeclarationExtractor"}(t.ObjectExpressionExtractor||(t.ObjectExpressionExtractor={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ObjectExpressionVariableDeclarationHostNode="ObjectExpressionVariableDeclarationHostNode"}(t.ObjectExpressionKeysTransformerCustomNode||(t.ObjectExpressionKeysTransformerCustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ConsoleOutputCustomNodeGroup="ConsoleOutputCustomNodeGroup",e.DebugProtectionCustomNodeGroup="DebugProtectionCustomNodeGroup",e.DomainLockCustomNodeGroup="DomainLockCustomNodeGroup",e.SelfDefendingCustomNodeGroup="SelfDefendingCustomNodeGroup",e.StringArrayCustomNodeGroup="StringArrayCustomNodeGroup"}(t.CustomNodeGroup||(t.CustomNodeGroup={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BooleanLiteralObfuscatingReplacer="BooleanLiteralObfuscatingReplacer",e.NumberLiteralObfuscatingReplacer="NumberLiteralObfuscatingReplacer",e.StringLiteralObfuscatingReplacer="StringLiteralObfuscatingReplacer"}(t.LiteralObfuscatingReplacer||(t.LiteralObfuscatingReplacer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){e.exports=require("class-validator")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BlackListObfuscatingGuard="BlackListObfuscatingGuard",e.ConditionalCommentObfuscatingGuard="ConditionalCommentObfuscatingGuard",e.ReservedStringObfuscatingGuard="ReservedStringObfuscatingGuard"}(t.ObfuscatingGuard||(t.ObfuscatingGuard={}))},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0});const i=r(0),a=r(4);let s=o=class{constructor(){this.obfuscationAllowedForCurrentNode=!0,this.obfuscationAllowedForNextNode=null}static isConditionalComment(e){return o.obfuscationEnableCommentRegExp.test(e.value)||o.obfuscationDisableCommentRegExp.test(e.value)}check(e){if(this.obfuscationAllowedForNextNode&&(this.obfuscationAllowedForCurrentNode=this.obfuscationAllowedForNextNode,this.obfuscationAllowedForNextNode=null),!a.NodeGuards.isNodeWithComments(e))return this.obfuscationAllowedForCurrentNode;const t=e.leadingComments,r=e.trailingComments;return t&&(this.obfuscationAllowedForCurrentNode=this.checkComments(t)),r&&(this.obfuscationAllowedForNextNode=this.checkComments(r)),this.obfuscationAllowedForCurrentNode}checkComments(e){const t=e.length;let r=this.obfuscationAllowedForCurrentNode;for(let n=0;n<t;n++){const t=e[n];o.obfuscationEnableCommentRegExp.test(t.value)?r=!0:o.obfuscationDisableCommentRegExp.test(t.value)&&(r=!1)}return r}};s.obfuscationEnableCommentRegExp=new RegExp("javascript-obfuscator *: *enable"),s.obfuscationDisableCommentRegExp=new RegExp("javascript-obfuscator *: *disable"),s=o=n([i.injectable()],s),t.ConditionalCommentObfuscatingGuard=s},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=l(r(218)),m=r(219),g=r(2),y=r(220),N=r(7);let h=o=class{constructor(e,t){this.sourceCode=e,this.options=t}initialize(){this.randomGenerator=new m.Chance(this.getRawSeed())}getMathRandom(){return this.getRandomInteger(0,99999)/1e5}getRandomGenerator(){return this.randomGenerator}getRandomInteger(e,t){return this.getRandomGenerator().integer({min:e,max:t})}getRandomString(e,t=o.randomGeneratorPool){return this.getRandomGenerator().string({length:e,pool:t})}getInputSeed(){return this.options.seed.toString()}getRawSeed(){const e=this.getInputSeed();return`${e}`.split("|").length>1?e:`${e}|${p.default(this.sourceCode.getSourceCode())}`}};h.randomGeneratorPool="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",s([N.initializable(),c("design:type","function"==typeof(n=void 0!==m.Chance&&m.Chance.Chance)?n:Object)],h.prototype,"randomGenerator",void 0),s([u.postConstruct(),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],h.prototype,"initialize",null),h=o=s([u.injectable(),d(0,u.inject(f.ServiceIdentifiers.ISourceCode)),d(1,u.inject(f.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(i=void 0!==y.ISourceCode&&y.ISourceCode)?i:Object,"function"==typeof(a=void 0!==g.IOptions&&g.IOptions)?a:Object])],h),t.RandomGenerator=h},function(e,t){e.exports=require("reflect-metadata")},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=c(r(56)),f=r(2),p=r(71);let m=o=class{constructor(e){this.options=e}static log(e,t,r,o){const n=e(`\n${t} ${r}`);console.log(n,o||"")}info(e,t){this.options.log&&o.log(o.colorInfo,p.LoggingPrefix.Base,e,t)}success(e,t){this.options.log&&o.log(o.colorSuccess,p.LoggingPrefix.Base,e,t)}warn(e,t){this.options.log&&o.log(o.colorWarn,p.LoggingPrefix.Base,e,t)}};m.colorInfo=u.default.cyan,m.colorSuccess=u.default.green,m.colorWarn=u.default.yellow,m=o=i([d.injectable(),s(0,d.inject(l.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(n=void 0!==f.IOptions&&f.IOptions)?n:Object])],m),t.Logger=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Base="[javascript-obfuscator]",e.CLI="[javascript-obfuscator-cli]"}(t.LoggingPrefix||(t.LoggingPrefix={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(16),n=r(0),i=r(1),a=r(52),s=r(73),c=r(75),d=r(76),l=r(77),u=r(78),f=r(79),p=r(81);t.analyzersModule=new n.ContainerModule(e=>{e(i.ServiceIdentifiers.ICallsGraphAnalyzer).to(s.CallsGraphAnalyzer).inSingletonScope(),e(i.ServiceIdentifiers.IPrevailingKindOfVariablesAnalyzer).to(u.PrevailingKindOfVariablesAnalyzer).inSingletonScope(),e(i.ServiceIdentifiers.IScopeAnalyzer).to(f.ScopeAnalyzer).inSingletonScope(),e(i.ServiceIdentifiers.IStringArrayStorageAnalyzer).to(p.StringArrayStorageAnalyzer).inSingletonScope(),e(i.ServiceIdentifiers.ICalleeDataExtractor).to(c.FunctionDeclarationCalleeDataExtractor).whenTargetNamed(a.CalleeDataExtractor.FunctionDeclarationCalleeDataExtractor),e(i.ServiceIdentifiers.ICalleeDataExtractor).to(d.FunctionExpressionCalleeDataExtractor).whenTargetNamed(a.CalleeDataExtractor.FunctionExpressionCalleeDataExtractor),e(i.ServiceIdentifiers.ICalleeDataExtractor).to(l.ObjectExpressionCalleeDataExtractor).whenTargetNamed(a.CalleeDataExtractor.ObjectExpressionCalleeDataExtractor),e(i.ServiceIdentifiers.Factory__ICalleeDataExtractor).toFactory(o.InversifyContainerFacade.getCacheFactory(i.ServiceIdentifiers.ICalleeDataExtractor))})},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=c(r(13)),f=r(74),p=r(52),m=r(4),g=r(14);let y=o=class{constructor(e){this.calleeDataExtractorFactory=e}static getLimitIndex(e){const t=e-1,r=o.limitThresholdActivationLength-1;let n=t;return t>r&&(n=Math.round(r+t*o.limitThreshold),n>t&&(n=t)),n}analyze(e){return this.analyzeRecursive(e.body)}analyzeRecursive(e){const t=o.getLimitIndex(e.length),r=[],n=e.length;for(let o=0;o<n&&!(o>t);o++){const t=e[o];u.traverse(t,{enter:o=>{if(m.NodeGuards.isCallExpressionNode(o))return t.parentNode!==g.NodeStatementUtils.getParentNodeWithStatements(o)?u.VisitorOption.Skip:void this.analyzeCallExpressionNode(r,e,o)}})}return r}analyzeCallExpressionNode(e,t,r){o.calleeDataExtractorsList.forEach(o=>{const n=this.calleeDataExtractorFactory(o).extract(t,r.callee);n&&e.push(Object.assign(Object.assign({},n),{callsGraph:this.analyzeRecursive(n.callee.body)}))})}};y.calleeDataExtractorsList=[p.CalleeDataExtractor.FunctionDeclarationCalleeDataExtractor,p.CalleeDataExtractor.FunctionExpressionCalleeDataExtractor,p.CalleeDataExtractor.ObjectExpressionCalleeDataExtractor],y.limitThresholdActivationLength=25,y.limitThreshold=.002,y=o=i([d.injectable(),s(0,d.inject(l.ServiceIdentifiers.Factory__ICalleeDataExtractor)),a("design:paramtypes",["function"==typeof(n=void 0!==f.TCalleeDataExtractorFactory&&f.TCalleeDataExtractorFactory)?n:Object])],y),t.CallsGraphAnalyzer=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const i=r(0),a=n(r(13)),s=r(42),c=r(4),d=r(14);let l=class extends s.AbstractCalleeDataExtractor{extract(e,t){if(!c.NodeGuards.isIdentifierNode(t))return null;const r=this.getCalleeBlockStatement(d.NodeStatementUtils.getParentNodeWithStatements(e[0]),t.name);return r?{callee:r,name:t.name}:null}getCalleeBlockStatement(e,t){let r=null;return a.traverse(e,{enter:e=>{if(c.NodeGuards.isFunctionDeclarationNode(e)&&e.id.name===t)return r=e.body,a.VisitorOption.Break}}),r}};l=o([i.injectable()],l),t.FunctionDeclarationCalleeDataExtractor=l},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const i=r(0),a=n(r(13)),s=r(42),c=r(4),d=r(14);let l=class extends s.AbstractCalleeDataExtractor{extract(e,t){let r=null;return c.NodeGuards.isIdentifierNode(t)&&(r=this.getCalleeBlockStatement(d.NodeStatementUtils.getParentNodeWithStatements(e[0]),t.name)),c.NodeGuards.isFunctionExpressionNode(t)&&(r=t.body),r?{callee:r,name:t.name||null}:null}getCalleeBlockStatement(e,t){let r=null;return a.traverse(e,{enter:(e,o)=>{if(c.NodeGuards.isFunctionExpressionNode(e)&&o&&c.NodeGuards.isVariableDeclaratorNode(o)&&c.NodeGuards.isIdentifierNode(o.id)&&o.id.name===t)return r=e.body,a.VisitorOption.Break}}),r}};l=o([i.injectable()],l),t.FunctionExpressionCalleeDataExtractor=l},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const a=r(0),s=i(r(13)),c=r(42),d=r(4),l=r(14);let u=o=class extends c.AbstractCalleeDataExtractor{static isValidTargetPropertyNode(e,t){if(!e.key)return!1;const r=d.NodeGuards.isIdentifierNode(e.key)&&e.key.name===t,o=d.NodeGuards.isLiteralNode(e.key)&&Boolean(e.key.value)&&e.key.value===t;return r||o}extract(e,t){if(!d.NodeGuards.isMemberExpressionNode(t))return null;const r=this.createObjectMembersCallsChain([],t);if(!r.length)return null;const o=r[r.length-1],n=this.getCalleeBlockStatement(l.NodeStatementUtils.getParentNodeWithStatements(e[0]),r);return n?{callee:n,name:o}:null}createObjectMembersCallsChain(e,t){if(d.NodeGuards.isIdentifierNode(t.property)&&!1===t.computed)e.unshift(t.property.name);else{if(!d.NodeGuards.isLiteralNode(t.property)||"string"!=typeof t.property.value&&"number"!=typeof t.property.value)return e;e.unshift(t.property.value)}return d.NodeGuards.isMemberExpressionNode(t.object)?this.createObjectMembersCallsChain(e,t.object):(d.NodeGuards.isIdentifierNode(t.object)&&e.unshift(t.object.name),e)}getCalleeBlockStatement(e,t){const r=t.shift();if(!r)return null;let o=null;return s.traverse(e,{enter:e=>{if(d.NodeGuards.isVariableDeclaratorNode(e)&&d.NodeGuards.isIdentifierNode(e.id)&&e.init&&d.NodeGuards.isObjectExpressionNode(e.init)&&e.id.name===r)return o=this.findCalleeBlockStatement(e.init.properties,t),s.VisitorOption.Break}}),o}findCalleeBlockStatement(e,t){const r=t.shift();if(!r)return null;for(const n of e)if(o.isValidTargetPropertyNode(n,r)){if(d.NodeGuards.isObjectExpressionNode(n.value))return this.findCalleeBlockStatement(n.value.properties,t);if(d.NodeGuards.isFunctionExpressionNode(n.value))return n.value.body}return null}};u=o=n([a.injectable()],u),t.ObjectExpressionCalleeDataExtractor=u},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=c(r(13)),f=r(34),p=r(4);let m=o=class{constructor(e){this.prevailingKindOfVariables=o.defaultKindOfVariables,this.arrayUtils=e}analyze(e){const t=[];u.traverse(e,{enter:e=>{p.NodeGuards.isVariableDeclarationNode(e)&&t.push(e.kind)}}),this.prevailingKindOfVariables=this.arrayUtils.findMostOccurringElement(t)||o.defaultKindOfVariables}getPrevailingKind(){return this.prevailingKindOfVariables}};m.defaultKindOfVariables="var",m=o=i([d.injectable(),s(0,d.inject(l.ServiceIdentifiers.IArrayUtils)),a("design:paramtypes",["function"==typeof(n=void 0!==f.IArrayUtils&&f.IArrayUtils)?n:Object])],m),t.PrevailingKindOfVariablesAnalyzer=m},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const a=r(0),s=i(r(80)),c=i(r(13)),d=r(43),l=r(4);let u=o=class{constructor(){this.scopeManager=null}static attachMissingRanges(e){c.replace(e,{enter:e=>(e.range||(e.range=[o.emptyRangeValue,o.emptyRangeValue]),e)})}static isRootNode(e){return l.NodeGuards.isProgramNode(e)||e.parentNode===e}analyze(e){const t=o.sourceTypes.length;o.attachMissingRanges(e);for(let r=0;r<t;r++)try{return void(this.scopeManager=s.analyze(e,Object.assign(Object.assign({},o.eslintScopeOptions),{sourceType:o.sourceTypes[r]})))}catch(e){if(r<t-1)continue;throw new Error(e)}throw new Error("Scope analyzing error")}acquireScope(e){if(!this.scopeManager)throw new Error("Scope manager is not defined");const t=this.scopeManager.acquire(e,o.isRootNode(e));if(!t)throw new Error("Cannot acquire scope for node");return this.sanitizeScopes(t),t}sanitizeScopes(e){e.childScopes.forEach(e=>{if("class"===e.type&&e.upper){const t=e.upper.variables.find(t=>{const r=e.variables[0];return r.defs.some(e=>"ClassName"===e.type)&&t.name===r.name});null==t||t.references.push(...e.variables[0].references)}});for(const t of e.childScopes)this.sanitizeScopes(t)}};u.eslintScopeOptions={ecmaVersion:d.ecmaVersion,optimistic:!0},u.sourceTypes=["script","module"],u.emptyRangeValue=0,u=o=n([a.injectable()],u),t.ScopeAnalyzer=u},function(e,t){e.exports=require("eslint-scope")},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=l(r(13)),m=r(2),g=r(3),y=r(35),N=r(4),h=r(15),b=r(44);let I=o=class{constructor(e,t,r){this.stringArrayStorageData=new Map,this.stringArrayStorage=e,this.randomGenerator=t,this.options=r}analyze(e){this.options.stringArray&&p.traverse(e,{enter:(e,t)=>{if(t)return h.NodeMetadata.isIgnoredNode(e)?p.VisitorOption.Skip:void(N.NodeGuards.isLiteralNode(e)&&this.analyzeLiteralNode(e,t))}})}getItemDataForLiteralNode(e){return this.stringArrayStorageData.get(e)}analyzeLiteralNode(e,t){"string"==typeof e.value&&(b.NodeLiteralUtils.isProhibitedLiteralNode(e,t)||this.shouldAddValueToStringArray(e.value)&&this.stringArrayStorageData.set(e,this.stringArrayStorage.getOrThrow(e.value)))}shouldAddValueToStringArray(e){return e.length>=o.minimumLengthForStringArray&&this.randomGenerator.getMathRandom()<=this.options.stringArrayThreshold}};I.minimumLengthForStringArray=3,I=o=s([u.injectable(),d(0,u.inject(f.ServiceIdentifiers.TStringArrayStorage)),d(1,u.inject(f.ServiceIdentifiers.IRandomGenerator)),d(2,u.inject(f.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==y.IStringArrayStorage&&y.IStringArrayStorage)?n:Object,"function"==typeof(i=void 0!==g.IRandomGenerator&&g.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==m.IOptions&&m.IOptions)?a:Object])],I),t.StringArrayStorageAnalyzer=I},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(16),n=r(0),i=r(1),a=r(53),s=r(21),c=r(83),d=r(84),l=r(87),u=r(88),f=r(90),p=r(93),m=r(94);t.controlFlowTransformersModule=new n.ContainerModule(e=>{e(i.ServiceIdentifiers.INodeTransformer).to(d.BlockStatementControlFlowTransformer).whenTargetNamed(s.NodeTransformer.BlockStatementControlFlowTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(u.DeadCodeInjectionTransformer).whenTargetNamed(s.NodeTransformer.DeadCodeInjectionTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(f.FunctionControlFlowTransformer).whenTargetNamed(s.NodeTransformer.FunctionControlFlowTransformer),e(i.ServiceIdentifiers.IControlFlowReplacer).to(c.BinaryExpressionControlFlowReplacer).whenTargetNamed(a.ControlFlowReplacer.BinaryExpressionControlFlowReplacer),e(i.ServiceIdentifiers.IControlFlowReplacer).to(l.CallExpressionControlFlowReplacer).whenTargetNamed(a.ControlFlowReplacer.CallExpressionControlFlowReplacer),e(i.ServiceIdentifiers.IControlFlowReplacer).to(p.LogicalExpressionControlFlowReplacer).whenTargetNamed(a.ControlFlowReplacer.LogicalExpressionControlFlowReplacer),e(i.ServiceIdentifiers.IControlFlowReplacer).to(m.StringLiteralControlFlowReplacer).whenTargetNamed(a.ControlFlowReplacer.StringLiteralControlFlowReplacer),e(i.ServiceIdentifiers.Factory__IControlFlowReplacer).toFactory(o.InversifyContainerFacade.getCacheFactory(i.ServiceIdentifiers.IControlFlowReplacer))})},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(17),p=r(2),m=r(3),g=r(18),y=r(54);let N=o=class extends y.ExpressionWithOperatorControlFlowReplacer{constructor(e,t,r){super(e,t,r)}replace(e,t,r){const n=e.operator,i=this.controlFlowCustomNodeFactory(g.ControlFlowCustomNode.BinaryExpressionFunctionNode);i.initialize(n);const a=this.insertCustomNodeToControlFlowStorage(i,r,n,o.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a,e.left,e.right)}};N.usingExistingIdentifierChance=.5,N=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),d(1,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(2,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==f.TControlFlowCustomNodeFactory&&f.TControlFlowCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],N),t.BinaryExpressionControlFlowReplacer=N},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const f=r(0),p=r(1),m=u(r(13)),g=r(17),y=r(34),N=r(2),h=r(3),b=r(18),I=r(11),v=r(12),S=r(4),O=r(6);let j=o=class extends v.AbstractNodeTransformer{constructor(e,t,r,o){super(r,o),this.controlFlowCustomNodeFactory=e,this.arrayUtils=t}static isProhibitedStatementNode(e){const t=S.NodeGuards.isBreakStatementNode(e)||S.NodeGuards.isContinueStatementNode(e),r=S.NodeGuards.isVariableDeclarationNode(e)&&("const"===e.kind||"let"===e.kind),o=S.NodeGuards.isClassDeclarationNode(e);return S.NodeGuards.isFunctionDeclarationNode(e)||t||r||o}static canTransformBlockStatementNode(e){let t=!0;return m.traverse(e,{enter:e=>{if(S.NodeGuards.isWhileStatementNode(e))return m.VisitorOption.Skip;o.isProhibitedStatementNode(e)&&(t=!1)}}),e.body.length<=4&&(t=!1),t}getVisitor(e){switch(e){case I.TransformationStage.ControlFlowFlattening:return{leave:(e,t)=>{if(t&&S.NodeGuards.isBlockStatementNode(e))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){if(this.randomGenerator.getMathRandom()>this.options.controlFlowFlatteningThreshold||!o.canTransformBlockStatementNode(e))return e;const r=e.body,n=this.arrayUtils.createWithRange(r.length),i=this.arrayUtils.shuffle(n),a=n.map(e=>i.indexOf(e)),s=this.controlFlowCustomNodeFactory(b.ControlFlowCustomNode.BlockStatementControlFlowFlatteningNode);s.initialize(r,i,a);const c=s.getNode()[0];return O.NodeUtils.parentizeNode(c,t),c}};j=o=c([f.injectable(),l(0,f.inject(p.ServiceIdentifiers.Factory__IControlFlowCustomNode)),l(1,f.inject(p.ServiceIdentifiers.IArrayUtils)),l(2,f.inject(p.ServiceIdentifiers.IRandomGenerator)),l(3,f.inject(p.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==g.TControlFlowCustomNodeFactory&&g.TControlFlowCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==y.IArrayUtils&&y.IArrayUtils)?i:Object,"function"==typeof(a=void 0!==h.IRandomGenerator&&h.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==N.IOptions&&N.IOptions)?s:Object])],j),t.BlockStatementControlFlowTransformer=j},function(e,t){e.exports=require("acorn")},function(e,t){e.exports=require("acorn-import-meta")},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(17),p=r(2),m=r(3),g=r(18),y=r(45),N=r(4);let h=o=class extends y.AbstractControlFlowReplacer{constructor(e,t,r){super(e,t,r)}replace(e,t,r){const n=e.callee;if(!N.NodeGuards.isIdentifierNode(n))return e;const i=String(e.arguments.length),a=this.controlFlowCustomNodeFactory(g.ControlFlowCustomNode.CallExpressionFunctionNode),s=e.arguments;a.initialize(s);const c=this.insertCustomNodeToControlFlowStorage(a,r,i,o.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),c,n,s)}getControlFlowStorageCallNode(e,t,r,o){const n=this.controlFlowCustomNodeFactory(g.ControlFlowCustomNode.CallExpressionControlFlowStorageCallNode);n.initialize(e,t,r,o);const i=n.getNode()[0];if(!i||!N.NodeGuards.isExpressionStatementNode(i))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return i.expression}};h.usingExistingIdentifierChance=.5,h=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),d(1,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(2,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==f.TControlFlowCustomNodeFactory&&f.TControlFlowCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],h),t.CallExpressionControlFlowReplacer=h},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const f=r(0),p=r(1),m=u(r(13)),g=r(89),y=r(2),N=r(3),h=r(57),b=r(58),I=r(21),v=r(33),S=r(11),O=r(12),j=r(8),_=r(4),C=r(14),R=r(6);let F=o=class extends O.AbstractNodeTransformer{constructor(e,t,r,o){super(r,o),this.deadCodeInjectionRootAstHostNodeSet=new Set,this.collectedBlockStatements=[],this.collectedBlockStatementsTotalLength=0,this.deadCodeInjectionCustomNodeFactory=e,this.transformersRunner=t}static isProhibitedNodeInsideCollectedBlockStatement(e){return _.NodeGuards.isBreakStatementNode(e)||_.NodeGuards.isContinueStatementNode(e)||_.NodeGuards.isAwaitExpressionNode(e)||_.NodeGuards.isSuperNode(e)}static isScopeHoistingFunctionDeclaration(e){if(!_.NodeGuards.isFunctionDeclarationNode(e))return!1;const t=C.NodeStatementUtils.getScopeOfNode(e),r=_.NodeGuards.isSwitchCaseNode(t)?t.consequent:t.body,o=r.indexOf(e);if(0===o)return!1;const n=r.slice(0,o),i=j.NodeFactory.blockStatementNode(n),a=e.id.name;let s=!1;return m.traverse(i,{enter:e=>{if(_.NodeGuards.isIdentifierNode(e)&&e.name===a)return s=!0,m.VisitorOption.Break}}),s}static isValidCollectedBlockStatementNode(e){if(!e.body.length)return!1;let t=0,r=!0;return m.traverse(e,{enter:e=>{if(_.NodeGuards.isBlockStatementNode(e)&&t++,t>o.maxNestedBlockStatementsCount||o.isProhibitedNodeInsideCollectedBlockStatement(e)||o.isScopeHoistingFunctionDeclaration(e))return r=!1,m.VisitorOption.Break}}),r}static isValidWrappedBlockStatementNode(e){if(!e.body.length)return!1;let t=!0;if(m.traverse(e,{enter:e=>{if(o.isScopeHoistingFunctionDeclaration(e))return t=!1,m.VisitorOption.Break}}),!t)return!1;return C.NodeStatementUtils.getParentNodeWithStatements(e).type!==v.NodeType.Program}getVisitor(e){switch(e){case S.TransformationStage.DeadCodeInjection:return{enter:(e,t)=>{if(t&&_.NodeGuards.isProgramNode(e))return this.analyzeNode(e,t),e},leave:(e,t)=>{if(t&&_.NodeGuards.isBlockStatementNode(e))return this.transformNode(e,t)}};case S.TransformationStage.Finalizing:return this.deadCodeInjectionRootAstHostNodeSet.size?{enter:(e,t)=>{if(t&&this.isDeadCodeInjectionRootAstHostNode(e))return this.restoreNode(e,t)}}:null;default:return null}}analyzeNode(e,t){m.traverse(e,{enter:e=>{if(!_.NodeGuards.isBlockStatementNode(e))return;const t=R.NodeUtils.clone(e);if(!o.isValidCollectedBlockStatementNode(t))return;const r=this.makeClonedBlockStatementNodeUnique(t);this.collectedBlockStatements.push(r)}}),this.collectedBlockStatementsTotalLength=this.collectedBlockStatements.length}transformNode(e,t){if(!this.collectedBlockStatements.length||this.collectedBlockStatementsTotalLength<o.minCollectedBlockStatementsCount)return m.VisitorOption.Break;if(this.randomGenerator.getMathRandom()>this.options.deadCodeInjectionThreshold||!o.isValidWrappedBlockStatementNode(e))return e;const r=this.collectedBlockStatements.length-1,n=this.randomGenerator.getRandomInteger(0,r),i=this.collectedBlockStatements.splice(n,1)[0];return i===e?e:this.replaceBlockStatementNode(e,i,t)}restoreNode(e,t){const r=e.body[0];if(!_.NodeGuards.isFunctionDeclarationNode(r))throw new Error("Wrong dead code injection root AST host node. Host node should contain `FunctionDeclaration` node");return r.body}isDeadCodeInjectionRootAstHostNode(e){return _.NodeGuards.isBlockStatementNode(e)&&this.deadCodeInjectionRootAstHostNodeSet.has(e)}makeClonedBlockStatementNodeUnique(e){const t=j.NodeFactory.functionExpressionNode([],e);return R.NodeUtils.parentizeNode(t,t),R.NodeUtils.parentizeNode(e,t),this.transformersRunner.transform(t,o.transformersToRenameBlockScopeIdentifiers,S.TransformationStage.Obfuscating).body}replaceBlockStatementNode(e,t,r){const n=j.NodeFactory.blockStatementNode([j.NodeFactory.functionDeclarationNode(o.deadCodeInjectionRootAstHostNodeName,[],t)]);this.deadCodeInjectionRootAstHostNodeSet.add(n);const i=this.deadCodeInjectionCustomNodeFactory(b.DeadCodeInjectionCustomNode.BlockStatementDeadCodeInjectionNode);i.initialize(e,n);const a=i.getNode()[0];return R.NodeUtils.parentizeNode(a,r),a}};F.deadCodeInjectionRootAstHostNodeName="deadCodeInjectionRootAstHostNode",F.maxNestedBlockStatementsCount=4,F.minCollectedBlockStatementsCount=5,F.transformersToRenameBlockScopeIdentifiers=[I.NodeTransformer.LabeledStatementTransformer,I.NodeTransformer.ScopeIdentifiersTransformer],F=o=c([f.injectable(),l(0,f.inject(p.ServiceIdentifiers.Factory__IDeadCodeInjectionCustomNode)),l(1,f.inject(p.ServiceIdentifiers.ITransformersRunner)),l(2,f.inject(p.ServiceIdentifiers.IRandomGenerator)),l(3,f.inject(p.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==g.TDeadNodeInjectionCustomNodeFactory&&g.TDeadNodeInjectionCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==h.ITransformersRunner&&h.ITransformersRunner)?i:Object,"function"==typeof(a=void 0!==N.IRandomGenerator&&N.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==y.IOptions&&y.IOptions)?s:Object])],F),t.DeadCodeInjectionTransformer=F},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a,s,c,d=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},l=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const p=r(0),m=r(1),g=f(r(13)),y=r(17),N=r(91),h=r(92),b=r(2),I=r(3),v=r(18),S=r(53),O=r(33),j=r(11),_=r(12),C=r(19),R=r(4),F=r(15),T=r(14),x=r(6);let G=o=class extends _.AbstractNodeTransformer{constructor(e,t,r,o,n){super(o,n),this.controlFlowData=new Map,this.visitedFunctionNodes=new Set,this.hostNodesWithControlFlowNode=new Set,this.controlFlowStorageFactory=e,this.controlFlowReplacerFactory=t,this.controlFlowCustomNodeFactory=r}getVisitor(e){switch(e){case j.TransformationStage.ControlFlowFlattening:return{leave:(e,t)=>{if(t&&(R.NodeGuards.isFunctionDeclarationNode(e)||R.NodeGuards.isFunctionExpressionNode(e)||R.NodeGuards.isArrowFunctionExpressionNode(e)))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){if(this.visitedFunctionNodes.add(e),!R.NodeGuards.isBlockStatementNode(e.body))return e;const r=this.getHostNode(e.body),o=this.getControlFlowStorage(r);if(this.controlFlowData.set(r,o),this.transformFunctionBody(e.body,o),!o.getLength())return e;const n=this.controlFlowCustomNodeFactory(v.ControlFlowCustomNode.ControlFlowStorageNode);return n.initialize(o),C.NodeAppender.prepend(r,n.getNode()),this.hostNodesWithControlFlowNode.add(r),x.NodeUtils.parentizeAst(e),e}getControlFlowStorage(e){const t=this.controlFlowStorageFactory();if(this.controlFlowData.has(e)){this.hostNodesWithControlFlowNode.has(e)&&(R.NodeGuards.isSwitchCaseNode(e)?e.consequent.shift():e.body.shift());const r=this.controlFlowData.get(e);t.mergeWith(r,!0)}return t}getHostNode(e){const t=T.NodeStatementUtils.getParentNodesWithStatements(e);return 1===t.length?e:(t.pop(),t.length>o.hostNodeSearchMinDepth&&t.splice(0,o.hostNodeSearchMinDepth),t.length>o.hostNodeSearchMaxDepth&&(t.length=o.hostNodeSearchMaxDepth),this.randomGenerator.getRandomGenerator().pickone(t))}isVisitedFunctionNode(e){return(R.NodeGuards.isFunctionDeclarationNode(e)||R.NodeGuards.isFunctionExpressionNode(e)||R.NodeGuards.isArrowFunctionExpressionNode(e))&&this.visitedFunctionNodes.has(e)}transformFunctionBody(e,t){g.replace(e,{enter:(e,r)=>{if(F.NodeMetadata.isIgnoredNode(e))return g.VisitorOption.Skip;if(this.isVisitedFunctionNode(e)||!r)return g.VisitorOption.Skip;if(!o.controlFlowReplacersMap.has(e.type))return e;if(this.randomGenerator.getMathRandom()>this.options.controlFlowFlatteningThreshold)return e;const n=o.controlFlowReplacersMap.get(e.type);return void 0===n?e:Object.assign(Object.assign({},this.controlFlowReplacerFactory(n).replace(e,r,t)),{parentNode:r})}})}};G.controlFlowReplacersMap=new Map([[O.NodeType.BinaryExpression,S.ControlFlowReplacer.BinaryExpressionControlFlowReplacer],[O.NodeType.CallExpression,S.ControlFlowReplacer.CallExpressionControlFlowReplacer],[O.NodeType.LogicalExpression,S.ControlFlowReplacer.LogicalExpressionControlFlowReplacer],[O.NodeType.Literal,S.ControlFlowReplacer.StringLiteralControlFlowReplacer]]),G.hostNodeSearchMinDepth=0,G.hostNodeSearchMaxDepth=2,G=o=d([p.injectable(),u(0,p.inject(m.ServiceIdentifiers.Factory__TControlFlowStorage)),u(1,p.inject(m.ServiceIdentifiers.Factory__IControlFlowReplacer)),u(2,p.inject(m.ServiceIdentifiers.Factory__IControlFlowCustomNode)),u(3,p.inject(m.ServiceIdentifiers.IRandomGenerator)),u(4,p.inject(m.ServiceIdentifiers.IOptions)),l("design:paramtypes",["function"==typeof(n=void 0!==h.TControlFlowStorageFactory&&h.TControlFlowStorageFactory)?n:Object,"function"==typeof(i=void 0!==N.TControlFlowReplacerFactory&&N.TControlFlowReplacerFactory)?i:Object,"function"==typeof(a=void 0!==y.TControlFlowCustomNodeFactory&&y.TControlFlowCustomNodeFactory)?a:Object,"function"==typeof(s=void 0!==I.IRandomGenerator&&I.IRandomGenerator)?s:Object,"function"==typeof(c=void 0!==b.IOptions&&b.IOptions)?c:Object])],G),t.FunctionControlFlowTransformer=G},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(17),p=r(2),m=r(3),g=r(18),y=r(54),N=r(4),h=r(6);let b=o=class extends y.ExpressionWithOperatorControlFlowReplacer{constructor(e,t,r){super(e,t,r)}replace(e,t,r){if(this.checkForProhibitedExpressions(e.left,e.right))return e;const n=e.operator,i=this.controlFlowCustomNodeFactory(g.ControlFlowCustomNode.LogicalExpressionFunctionNode);i.initialize(n);const a=this.insertCustomNodeToControlFlowStorage(i,r,n,o.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a,e.left,e.right)}checkForProhibitedExpressions(e,t){return[e,t].some(e=>{let t;return t=N.NodeGuards.isUnaryExpressionNode(e)?h.NodeUtils.getUnaryExpressionArgumentNode(e):e,!(N.NodeGuards.isLiteralNode(t)||N.NodeGuards.isIdentifierNode(t)||N.NodeGuards.isObjectExpressionNode(t)||N.NodeGuards.isExpressionStatementNode(t))})}};b.usingExistingIdentifierChance=.5,b=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),d(1,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(2,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==f.TControlFlowCustomNodeFactory&&f.TControlFlowCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],b),t.LogicalExpressionControlFlowReplacer=b},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(17),p=r(2),m=r(3),g=r(18),y=r(45),N=r(4);let h=o=class extends y.AbstractControlFlowReplacer{constructor(e,t,r){super(e,t,r)}replace(e,t,r){if(N.NodeGuards.isPropertyNode(t)&&t.key===e)return e;if("string"!=typeof e.value||e.value.length<3)return e;const n=String(e.value),i=this.controlFlowCustomNodeFactory(g.ControlFlowCustomNode.StringLiteralNode);i.initialize(e.value);const a=this.insertCustomNodeToControlFlowStorage(i,r,n,o.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a)}getControlFlowStorageCallNode(e,t){const r=this.controlFlowCustomNodeFactory(g.ControlFlowCustomNode.StringLiteralControlFlowStorageCallNode);r.initialize(e,t);const o=r.getNode()[0];if(!o||!N.NodeGuards.isExpressionStatementNode(o))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return o.expression}};h.usingExistingIdentifierChance=1,h=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),d(1,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(2,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==f.TControlFlowCustomNodeFactory&&f.TControlFlowCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],h),t.StringLiteralControlFlowReplacer=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(16),i=r(1),a=r(21),s=r(59),c=r(96),d=r(98),l=r(99),u=r(100),f=r(102),p=r(103),m=r(104),g=r(105);t.convertingTransformersModule=new o.ContainerModule(e=>{e(i.ServiceIdentifiers.INodeTransformer).to(d.MemberExpressionTransformer).whenTargetNamed(a.NodeTransformer.MemberExpressionTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(l.MethodDefinitionTransformer).whenTargetNamed(a.NodeTransformer.MethodDefinitionTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(u.ObjectExpressionKeysTransformer).whenTargetNamed(a.NodeTransformer.ObjectExpressionKeysTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(f.ObjectExpressionTransformer).whenTargetNamed(a.NodeTransformer.ObjectExpressionTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(p.SplitStringTransformer).whenTargetNamed(a.NodeTransformer.SplitStringTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(m.TemplateLiteralTransformer).whenTargetNamed(a.NodeTransformer.TemplateLiteralTransformer),e(i.ServiceIdentifiers.IObjectExpressionExtractor).to(c.ObjectExpressionToVariableDeclarationExtractor).whenTargetNamed(s.ObjectExpressionExtractor.ObjectExpressionToVariableDeclarationExtractor),e(i.ServiceIdentifiers.IObjectExpressionExtractor).to(g.BasePropertiesExtractor).whenTargetNamed(s.ObjectExpressionExtractor.BasePropertiesExtractor),e(i.ServiceIdentifiers.Factory__IObjectExpressionExtractor).toFactory(n.InversifyContainerFacade.getCacheFactory(i.ServiceIdentifiers.IObjectExpressionExtractor))})},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(0),c=r(1),d=r(97),l=r(60),u=r(19),f=r(4),p=r(14),m=r(6);let g=class{constructor(e){this.objectExpressionKeysTransformerCustomNodeFactory=e}extract(e,t){return this.transformObjectExpressionToVariableDeclaration(e,t)}transformObjectExpressionToVariableDeclaration(e,t){const r=e.properties,o=this.getObjectExpressionHostNode(r),n=this.getObjectExpressionIdentifierNode(o),i=this.getObjectExpressionNode(o),a=[o],s=p.NodeStatementUtils.getScopeOfNode(t);return u.NodeAppender.insertBefore(s,a,t),m.NodeUtils.parentizeAst(o),m.NodeUtils.parentizeNode(o,s),{nodeToReplace:n,objectExpressionHostStatement:o,objectExpressionNode:i}}getObjectExpressionHostNode(e){const t=this.objectExpressionKeysTransformerCustomNodeFactory(l.ObjectExpressionKeysTransformerCustomNode.ObjectExpressionVariableDeclarationHostNode);t.initialize(e);const r=t.getNode()[0];if(!r||!f.NodeGuards.isVariableDeclarationNode(r))throw new Error("`objectExpressionHostCustomNode.getNode()[0]` should returns array with `VariableDeclaration` node");return r}getObjectExpressionIdentifierNode(e){const t=e.declarations[0].id;if(!f.NodeGuards.isIdentifierNode(t))throw new Error("`objectExpressionHostNode` should contain `VariableDeclarator` node with `Identifier` id property");return t}getObjectExpressionNode(e){var t;const r=null!==(t=e.declarations[0].init)&&void 0!==t?t:null;if(!r||!f.NodeGuards.isObjectExpressionNode(r))throw new Error("`objectExpressionHostNode` should contain `VariableDeclarator` node with `ObjectExpression` init property");return r}};g=n([s.injectable(),a(0,s.inject(c.ServiceIdentifiers.Factory__IObjectExpressionKeysTransformerCustomNode)),i("design:paramtypes",["function"==typeof(o=void 0!==d.TObjectExpressionKeysTransformerCustomNodeFactory&&d.TObjectExpressionKeysTransformerCustomNodeFactory)?o:Object])],g),t.ObjectExpressionToVariableDeclarationExtractor=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(2),u=r(3),f=r(11),p=r(12),m=r(8),g=r(4);let y=class extends p.AbstractNodeTransformer{constructor(e,t){super(e,t)}getVisitor(e){switch(e){case f.TransformationStage.Converting:return{enter:(e,t)=>{if(t&&g.NodeGuards.isMemberExpressionNode(e))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){if(g.NodeGuards.isIdentifierNode(e.property)){if(e.computed)return e;e.computed=!0,e.property=m.NodeFactory.literalNode(e.property.name)}return e}};y=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.IRandomGenerator)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==u.IRandomGenerator&&u.IRandomGenerator)?o:Object,"function"==typeof(n=void 0!==l.IOptions&&l.IOptions)?n:Object])],y),t.MemberExpressionTransformer=y},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=r(2),f=r(3),p=r(11),m=r(12),g=r(8),y=r(4);let N=o=class extends m.AbstractNodeTransformer{constructor(e,t){super(e,t)}getVisitor(e){switch(e){case p.TransformationStage.Converting:return{enter:(e,t)=>{if(t&&y.NodeGuards.isMethodDefinitionNode(e))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){return y.NodeGuards.isIdentifierNode(e.key)?this.replaceIdentifierKey(e,e.key):y.NodeGuards.isLiteralNode(e.key)?this.replaceLiteralKey(e,e.key):e}replaceIdentifierKey(e,t){return o.ignoredNames.includes(t.name)||e.computed||(e.computed=!0,e.key=g.NodeFactory.literalNode(t.name)),e}replaceLiteralKey(e,t){return"string"!=typeof t.value||o.ignoredNames.includes(t.value)||e.computed||(e.computed=!0),e}};N.ignoredNames=["constructor"],N=o=a([d.injectable(),c(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),c(1,d.inject(l.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(n=void 0!==f.IRandomGenerator&&f.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==u.IOptions&&u.IOptions)?i:Object])],N),t.MethodDefinitionTransformer=N},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=l(r(13)),m=r(101),g=r(2),y=r(3),N=r(11),h=r(12),b=r(4),I=r(14),v=r(59);let S=o=class extends h.AbstractNodeTransformer{constructor(e,t,r){super(t,r),this.objectExpressionExtractorFactory=e}static isProhibitedHostStatement(e,t){return o.isReferencedIdentifierName(e,t)}static isReferencedIdentifierName(e,t){const r=[];let o=!1,n=!1;return p.traverse(t,{enter:t=>{t===e&&(n=!0),b.NodeGuards.isIdentifierNode(t)&&(n?r.includes(t.name)&&(o=!0):r.push(t.name))},leave:t=>{if(t===e)return n=!1,p.VisitorOption.Break}}),o}getVisitor(e){if(!this.options.transformObjectKeys)return null;switch(e){case N.TransformationStage.Converting:return{leave:(e,t)=>{if(t&&b.NodeGuards.isObjectExpressionNode(e))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){if(!e.properties.length)return e;const r=I.NodeStatementUtils.getRootStatementOfNode(e);return o.isProhibitedHostStatement(e,r)?e:this.applyObjectExpressionKeysExtractorsRecursive(o.objectExpressionExtractorNames,e,r)}applyObjectExpressionKeysExtractorsRecursive(e,t,r){const o=[...e],n=o.shift();if(!n)return t;const{nodeToReplace:i,objectExpressionHostStatement:a,objectExpressionNode:s}=this.objectExpressionExtractorFactory(n).extract(t,r);return this.applyObjectExpressionKeysExtractorsRecursive(o,s,a),i}};S.objectExpressionExtractorNames=[v.ObjectExpressionExtractor.ObjectExpressionToVariableDeclarationExtractor,v.ObjectExpressionExtractor.BasePropertiesExtractor],S=o=s([u.injectable(),d(0,u.inject(f.ServiceIdentifiers.Factory__IObjectExpressionExtractor)),d(1,u.inject(f.ServiceIdentifiers.IRandomGenerator)),d(2,u.inject(f.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==m.TObjectExpressionExtractorFactory&&m.TObjectExpressionExtractorFactory)?n:Object,"function"==typeof(i=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==g.IOptions&&g.IOptions)?a:Object])],S),t.ObjectExpressionKeysTransformer=S},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(2),u=r(3),f=r(11),p=r(12),m=r(8),g=r(4);let y=class extends p.AbstractNodeTransformer{constructor(e,t){super(e,t)}getVisitor(e){switch(e){case f.TransformationStage.Converting:return{enter:(e,t)=>{if(t&&g.NodeGuards.isObjectExpressionNode(e))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){return e.properties.forEach(e=>{e.key&&(e.computed?this.transformComputedProperty(e):this.transformBaseProperty(e))}),e}transformComputedProperty(e){g.NodeGuards.isLiteralNode(e.key)&&"string"==typeof e.key.value&&(e.key=m.NodeFactory.literalNode(e.key.value))}transformBaseProperty(e){e.shorthand&&(e.shorthand=!1),g.NodeGuards.isIdentifierNode(e.key)&&(e.key=m.NodeFactory.literalNode(e.key.name))}};y=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.IRandomGenerator)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==u.IRandomGenerator&&u.IRandomGenerator)?o:Object,"function"==typeof(n=void 0!==l.IOptions&&l.IOptions)?n:Object])],y),t.ObjectExpressionTransformer=y},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=d(r(13)),p=r(2),m=r(3),g=r(21),y=r(11),N=r(12),h=r(8),b=r(4),I=r(44),v=r(6);let S=o=class extends N.AbstractNodeTransformer{constructor(e,t){super(e,t),this.runAfter=[g.NodeTransformer.ObjectExpressionKeysTransformer,g.NodeTransformer.TemplateLiteralTransformer]}static chunkString(e,t){const r=Math.ceil(e.length/t),o=[];let n=0;for(let i=0;i<r;++i,n+=t)o[i]=e.substr(n,t);return o}getVisitor(e){switch(e){case y.TransformationStage.Converting:return{enter:(e,t)=>{if(this.options.splitStrings)return t&&b.NodeGuards.isLiteralNode(e)?this.transformNode(e,t):void 0}};default:return null}}transformNode(e,t){if(I.NodeLiteralUtils.isProhibitedLiteralNode(e,t))return e;const r=this.transformLiteralNodeByChunkLength(e,t,o.firstPassChunkLength);return f.replace(r,{enter:(e,t)=>{if(t&&b.NodeGuards.isLiteralNode(e))return this.transformLiteralNodeByChunkLength(e,t,this.options.splitStringsChunkLength)}})}transformLiteralNodeByChunkLength(e,t,r){if("string"!=typeof e.value)return e;if(r>=e.value.length)return e;const n=o.chunkString(e.value,r),i=this.transformStringChunksToBinaryExpressionNode(n);return v.NodeUtils.parentizeAst(i),v.NodeUtils.parentizeNode(i,t),i}transformStringChunksToBinaryExpressionNode(e){const t=e.shift(),r=e.shift();if(!t||!r)throw new Error("First and second chunks values should not be empty");const o=h.NodeFactory.binaryExpressionNode("+",h.NodeFactory.literalNode(t),h.NodeFactory.literalNode(r));return e.reduce((e,t)=>{const r=h.NodeFactory.literalNode(t);return h.NodeFactory.binaryExpressionNode("+",e,r)},o)}};S.firstPassChunkLength=1e3,S=o=a([l.injectable(),c(0,l.inject(u.ServiceIdentifiers.IRandomGenerator)),c(1,l.inject(u.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(n=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==p.IOptions&&p.IOptions)?i:Object])],S),t.SplitStringTransformer=S},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=r(2),f=r(3),p=r(11),m=r(12),g=r(8),y=r(4),N=r(6);let h=o=class extends m.AbstractNodeTransformer{constructor(e,t){super(e,t)}static isLiteralNodeWithStringValue(e){return e&&y.NodeGuards.isLiteralNode(e)&&"string"==typeof e.value}static isValidTemplateLiteralNode(e,t){return y.NodeGuards.isTemplateLiteralNode(e)&&!y.NodeGuards.isTaggedTemplateExpressionNode(t)}getVisitor(e){switch(e){case p.TransformationStage.Converting:return{enter:(e,t)=>{if(t&&o.isValidTemplateLiteralNode(e,t))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){const r=e.expressions;let n,i=[];if(e.quasis.forEach(e=>{i.push(g.NodeFactory.literalNode(e.value.cooked));const t=r.shift();t&&i.push(t)}),i=i.filter(e=>!(y.NodeGuards.isLiteralNode(e)&&""===e.value)),o.isLiteralNodeWithStringValue(i[0])||o.isLiteralNodeWithStringValue(i[1])||i.unshift(g.NodeFactory.literalNode("")),i.length>1){let e=g.NodeFactory.binaryExpressionNode("+",i.shift(),i.shift());i.forEach(t=>{e=g.NodeFactory.binaryExpressionNode("+",e,t)}),n=e}else n=i[0];return N.NodeUtils.parentizeAst(n),N.NodeUtils.parentizeNode(n,t),n}};h=o=a([d.injectable(),c(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),c(1,d.inject(l.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(n=void 0!==f.IRandomGenerator&&f.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==u.IOptions&&u.IOptions)?i:Object])],h),t.TemplateLiteralTransformer=h},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0});const i=r(0),a=r(19),s=r(8),c=r(4),d=r(14);let l=o=class{static getPropertyNodeKeyName(e){const t=e.key;return!c.NodeGuards.isLiteralNode(t)||"string"!=typeof t.value&&"number"!=typeof t.value?c.NodeGuards.isIdentifierNode(t)?t.name:null:t.value.toString()}static isProhibitedPattern(e){return!e||c.NodeGuards.isObjectPatternNode(e)||c.NodeGuards.isArrayPatternNode(e)||c.NodeGuards.isAssignmentPatternNode(e)||c.NodeGuards.isRestElementNode(e)}extract(e,t){const r=e.parentNode;return r&&c.NodeGuards.isVariableDeclaratorNode(r)&&c.NodeGuards.isIdentifierNode(r.id)?this.transformObjectExpressionNode(e,t,r.id):{nodeToReplace:e,objectExpressionHostStatement:t,objectExpressionNode:e}}transformObjectExpressionNode(e,t,r){const o=e.properties,[n,i]=this.extractPropertiesToExpressionStatements(o,t,r),s=d.NodeStatementUtils.getScopeOfNode(t);return this.filterExtractedObjectExpressionProperties(e,i),a.NodeAppender.insertAfter(s,n,t),{nodeToReplace:e,objectExpressionHostStatement:t,objectExpressionNode:e}}extractPropertiesToExpressionStatements(e,t,r){const n=e.length,i=[],a=[];for(let d=0;d<n;d++){const n=e[d],l=n.value;if(o.isProhibitedPattern(l))continue;const u=o.getPropertyNodeKeyName(n);if(!u)continue;const f=!n.computed||n.computed&&!!n.key&&c.NodeGuards.isLiteralNode(n.key)?s.NodeFactory.literalNode(u):s.NodeFactory.identifierNode(u),p=s.NodeFactory.memberExpressionNode(r,f,!0),m=s.NodeFactory.expressionStatementNode(s.NodeFactory.assignmentExpressionNode("=",p,l));c.NodeGuards.isObjectExpressionNode(n.value)&&this.transformObjectExpressionNode(n.value,t,p),i.push(m),a.push(d)}return[i,a]}filterExtractedObjectExpressionProperties(e,t){e.properties=e.properties.filter((e,r)=>!t.includes(r))}};l=o=n([i.injectable()],l),t.BasePropertiesExtractor=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(16),n=r(0),i=r(1),a=r(18),s=r(23),c=r(61),d=r(58),l=r(60),u=r(107),f=r(108),p=r(109),m=r(110),g=r(111),y=r(112),N=r(115),h=r(116),b=r(117),I=r(118),v=r(119),S=r(120),O=r(122),j=r(124),_=r(126),C=r(128),R=r(130),F=r(134),T=r(136),x=r(137),G=r(138),E=r(140),w=r(142),P=r(149),A=r(151),M=r(154),D=r(155);t.customNodesModule=new n.ContainerModule(e=>{e(i.ServiceIdentifiers.ICustomNode).to(O.ConsoleOutputDisableExpressionNode).whenTargetNamed(s.CustomNode.ConsoleOutputDisableExpressionNode),e(i.ServiceIdentifiers.ICustomNode).to(_.DebugProtectionFunctionCallNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionCallNode),e(i.ServiceIdentifiers.ICustomNode).to(C.DebugProtectionFunctionIntervalNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionIntervalNode),e(i.ServiceIdentifiers.ICustomNode).to(R.DebugProtectionFunctionNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionNode),e(i.ServiceIdentifiers.ICustomNode).to(F.DomainLockNode).whenTargetNamed(s.CustomNode.DomainLockNode),e(i.ServiceIdentifiers.ICustomNode).to(G.NodeCallsControllerFunctionNode).whenTargetNamed(s.CustomNode.NodeCallsControllerFunctionNode),e(i.ServiceIdentifiers.ICustomNode).to(E.SelfDefendingUnicodeNode).whenTargetNamed(s.CustomNode.SelfDefendingUnicodeNode),e(i.ServiceIdentifiers.ICustomNode).to(w.StringArrayCallsWrapper).whenTargetNamed(s.CustomNode.StringArrayCallsWrapper),e(i.ServiceIdentifiers.ICustomNode).to(P.StringArrayNode).whenTargetNamed(s.CustomNode.StringArrayNode),e(i.ServiceIdentifiers.ICustomNode).to(A.StringArrayRotateFunctionNode).whenTargetNamed(s.CustomNode.StringArrayRotateFunctionNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(N.BinaryExpressionFunctionNode).whenTargetNamed(a.ControlFlowCustomNode.BinaryExpressionFunctionNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(h.BlockStatementControlFlowFlatteningNode).whenTargetNamed(a.ControlFlowCustomNode.BlockStatementControlFlowFlatteningNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(I.CallExpressionControlFlowStorageCallNode).whenTargetNamed(a.ControlFlowCustomNode.CallExpressionControlFlowStorageCallNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(v.CallExpressionFunctionNode).whenTargetNamed(a.ControlFlowCustomNode.CallExpressionFunctionNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(S.ControlFlowStorageNode).whenTargetNamed(a.ControlFlowCustomNode.ControlFlowStorageNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(T.ExpressionWithOperatorControlFlowStorageCallNode).whenTargetNamed(a.ControlFlowCustomNode.ExpressionWithOperatorControlFlowStorageCallNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(x.LogicalExpressionFunctionNode).whenTargetNamed(a.ControlFlowCustomNode.LogicalExpressionFunctionNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(D.StringLiteralNode).whenTargetNamed(a.ControlFlowCustomNode.StringLiteralNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(M.StringLiteralControlFlowStorageCallNode).whenTargetNamed(a.ControlFlowCustomNode.StringLiteralControlFlowStorageCallNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(b.BlockStatementDeadCodeInjectionNode).whenTargetNamed(d.DeadCodeInjectionCustomNode.BlockStatementDeadCodeInjectionNode),e(i.ServiceIdentifiers.Newable__ICustomNode).toConstructor(y.ObjectExpressionVariableDeclarationHostNode).whenTargetNamed(l.ObjectExpressionKeysTransformerCustomNode.ObjectExpressionVariableDeclarationHostNode),e(i.ServiceIdentifiers.ICustomNodeGroup).to(u.ConsoleOutputCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.ConsoleOutputCustomNodeGroup),e(i.ServiceIdentifiers.ICustomNodeGroup).to(f.DebugProtectionCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.DebugProtectionCustomNodeGroup),e(i.ServiceIdentifiers.ICustomNodeGroup).to(p.DomainLockCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.DomainLockCustomNodeGroup),e(i.ServiceIdentifiers.ICustomNodeGroup).to(m.SelfDefendingCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.SelfDefendingCustomNodeGroup),e(i.ServiceIdentifiers.ICustomNodeGroup).to(g.StringArrayCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.StringArrayCustomNodeGroup),e(i.ServiceIdentifiers.Factory__ICustomNode).toFactory(o.InversifyContainerFacade.getFactory(i.ServiceIdentifiers.ICustomNode)),e(i.ServiceIdentifiers.Factory__IControlFlowCustomNode).toFactory(o.InversifyContainerFacade.getConstructorFactory(i.ServiceIdentifiers.Newable__ICustomNode,i.ServiceIdentifiers.Factory__IIdentifierNamesGenerator,i.ServiceIdentifiers.ICustomNodeFormatter,i.ServiceIdentifiers.IRandomGenerator,i.ServiceIdentifiers.IOptions,i.ServiceIdentifiers.IPrevailingKindOfVariablesAnalyzer)),e(i.ServiceIdentifiers.Factory__IDeadCodeInjectionCustomNode).toFactory(o.InversifyContainerFacade.getConstructorFactory(i.ServiceIdentifiers.Newable__ICustomNode,i.ServiceIdentifiers.Factory__IIdentifierNamesGenerator,i.ServiceIdentifiers.ICustomNodeFormatter,i.ServiceIdentifiers.IRandomGenerator,i.ServiceIdentifiers.IOptions)),e(i.ServiceIdentifiers.Factory__IObjectExpressionKeysTransformerCustomNode).toFactory(o.InversifyContainerFacade.getConstructorFactory(i.ServiceIdentifiers.Newable__ICustomNode,i.ServiceIdentifiers.Factory__IIdentifierNamesGenerator,i.ServiceIdentifiers.ICustomNodeFormatter,i.ServiceIdentifiers.IRandomGenerator,i.ServiceIdentifiers.IOptions,i.ServiceIdentifiers.IPrevailingKindOfVariablesAnalyzer)),e(i.ServiceIdentifiers.Factory__ICustomNodeGroup).toFactory(o.InversifyContainerFacade.getFactory(i.ServiceIdentifiers.ICustomNodeGroup)),e(i.ServiceIdentifiers.ICustomNodeFormatter).to(j.CustomNodeFormatter).inSingletonScope()})},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(26),m=r(5),g=r(2),y=r(3),N=r(7),h=r(23),b=r(22),I=r(27),v=r(19);let S=class extends I.AbstractCustomNodeGroup{constructor(e,t,r,o){super(t,r,o),this.appendEvent=b.ObfuscationEvent.BeforeObfuscation,this.customNodeFactory=e}appendCustomNodes(e,t){const r=this.getRandomCallsGraphIndex(t.length);this.appendCustomNodeIfExist(h.CustomNode.ConsoleOutputDisableExpressionNode,o=>{v.NodeAppender.appendToOptimalBlockScope(t,e,o.getNode(),r)}),this.appendCustomNodeIfExist(h.CustomNode.NodeCallsControllerFunctionNode,o=>{const n=t.length?v.NodeAppender.getOptimalBlockScope(t,r,1):e;v.NodeAppender.prepend(n,o.getNode())})}initialize(){if(this.customNodes=new Map,!this.options.disableConsoleOutput)return;const e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(h.CustomNode.ConsoleOutputDisableExpressionNode),r=this.customNodeFactory(h.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(h.CustomNode.ConsoleOutputDisableExpressionNode,t),this.customNodes.set(h.CustomNode.NodeCallsControllerFunctionNode,r)}};c([N.initializable(),d("design:type","function"==typeof(o="undefined"!=typeof Map&&Map)?o:Object)],S.prototype,"customNodes",void 0),S=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__ICustomNode)),l(1,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==p.TCustomNodeFactory&&p.TCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.TIdentifierNamesGeneratorFactory&&m.TIdentifierNamesGeneratorFactory)?i:Object,"function"==typeof(a=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==g.IOptions&&g.IOptions)?s:Object])],S),t.ConsoleOutputCustomNodeGroup=S},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(26),m=r(5),g=r(2),y=r(3),N=r(7),h=r(23),b=r(22),I=r(27),v=r(19),S=r(4);let O=class extends I.AbstractCustomNodeGroup{constructor(e,t,r,o){super(t,r,o),this.appendEvent=b.ObfuscationEvent.BeforeObfuscation,this.customNodeFactory=e}appendCustomNodes(e,t){const r=this.getRandomCallsGraphIndex(t.length);this.appendCustomNodeIfExist(h.CustomNode.DebugProtectionFunctionCallNode,o=>{v.NodeAppender.appendToOptimalBlockScope(t,e,o.getNode(),r)}),this.appendCustomNodeIfExist(h.CustomNode.DebugProtectionFunctionNode,t=>{v.NodeAppender.append(e,t.getNode())}),this.appendCustomNodeIfExist(h.CustomNode.DebugProtectionFunctionIntervalNode,t=>{const r=S.NodeGuards.isSwitchCaseNode(e)?e.consequent.length:e.body.length,o=this.randomGenerator.getRandomInteger(0,r);v.NodeAppender.insertAtIndex(e,t.getNode(),o)}),this.appendCustomNodeIfExist(h.CustomNode.NodeCallsControllerFunctionNode,o=>{const n=t.length?v.NodeAppender.getOptimalBlockScope(t,r,1):e;v.NodeAppender.prepend(n,o.getNode())})}initialize(){if(this.customNodes=new Map,!this.options.debugProtection)return;const e=this.identifierNamesGenerator.generate(),t=this.identifierNamesGenerator.generate(),r=this.customNodeFactory(h.CustomNode.DebugProtectionFunctionNode),o=this.customNodeFactory(h.CustomNode.DebugProtectionFunctionCallNode),n=this.customNodeFactory(h.CustomNode.DebugProtectionFunctionIntervalNode),i=this.customNodeFactory(h.CustomNode.NodeCallsControllerFunctionNode);r.initialize(e),o.initialize(e,t),n.initialize(e),i.initialize(this.appendEvent,t),this.customNodes.set(h.CustomNode.DebugProtectionFunctionNode,r),this.customNodes.set(h.CustomNode.DebugProtectionFunctionCallNode,o),this.options.debugProtectionInterval&&this.customNodes.set(h.CustomNode.DebugProtectionFunctionIntervalNode,n),this.customNodes.set(h.CustomNode.NodeCallsControllerFunctionNode,i)}};c([N.initializable(),d("design:type","function"==typeof(o="undefined"!=typeof Map&&Map)?o:Object)],O.prototype,"customNodes",void 0),O=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__ICustomNode)),l(1,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==p.TCustomNodeFactory&&p.TCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.TIdentifierNamesGeneratorFactory&&m.TIdentifierNamesGeneratorFactory)?i:Object,"function"==typeof(a=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==g.IOptions&&g.IOptions)?s:Object])],O),t.DebugProtectionCustomNodeGroup=O},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(26),m=r(5),g=r(2),y=r(3),N=r(7),h=r(23),b=r(22),I=r(27),v=r(19);let S=class extends I.AbstractCustomNodeGroup{constructor(e,t,r,o){super(t,r,o),this.appendEvent=b.ObfuscationEvent.BeforeObfuscation,this.customNodeFactory=e}appendCustomNodes(e,t){const r=this.getRandomCallsGraphIndex(t.length);this.appendCustomNodeIfExist(h.CustomNode.DomainLockNode,o=>{v.NodeAppender.appendToOptimalBlockScope(t,e,o.getNode(),r)}),this.appendCustomNodeIfExist(h.CustomNode.NodeCallsControllerFunctionNode,o=>{const n=t.length?v.NodeAppender.getOptimalBlockScope(t,r,1):e;v.NodeAppender.prepend(n,o.getNode())})}initialize(){if(this.customNodes=new Map,!this.options.domainLock.length)return;const e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(h.CustomNode.DomainLockNode),r=this.customNodeFactory(h.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(h.CustomNode.DomainLockNode,t),this.customNodes.set(h.CustomNode.NodeCallsControllerFunctionNode,r)}};c([N.initializable(),d("design:type","function"==typeof(o="undefined"!=typeof Map&&Map)?o:Object)],S.prototype,"customNodes",void 0),S=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__ICustomNode)),l(1,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==p.TCustomNodeFactory&&p.TCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.TIdentifierNamesGeneratorFactory&&m.TIdentifierNamesGeneratorFactory)?i:Object,"function"==typeof(a=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==g.IOptions&&g.IOptions)?s:Object])],S),t.DomainLockCustomNodeGroup=S},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(26),m=r(5),g=r(2),y=r(3),N=r(7),h=r(23),b=r(22),I=r(27),v=r(19);let S=class extends I.AbstractCustomNodeGroup{constructor(e,t,r,o){super(t,r,o),this.appendEvent=b.ObfuscationEvent.AfterObfuscation,this.customNodeFactory=e}appendCustomNodes(e,t){const r=this.getRandomCallsGraphIndex(t.length);this.appendCustomNodeIfExist(h.CustomNode.SelfDefendingUnicodeNode,o=>{v.NodeAppender.appendToOptimalBlockScope(t,e,o.getNode(),r)}),this.appendCustomNodeIfExist(h.CustomNode.NodeCallsControllerFunctionNode,o=>{const n=t.length?v.NodeAppender.getOptimalBlockScope(t,r,1):e;v.NodeAppender.prepend(n,o.getNode())})}initialize(){if(this.customNodes=new Map,!this.options.selfDefending)return;const e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(h.CustomNode.SelfDefendingUnicodeNode),r=this.customNodeFactory(h.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(h.CustomNode.SelfDefendingUnicodeNode,t),this.customNodes.set(h.CustomNode.NodeCallsControllerFunctionNode,r)}};c([N.initializable(),d("design:type","function"==typeof(o="undefined"!=typeof Map&&Map)?o:Object)],S.prototype,"customNodes",void 0),S=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__ICustomNode)),l(1,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==p.TCustomNodeFactory&&p.TCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==m.TIdentifierNamesGeneratorFactory&&m.TIdentifierNamesGeneratorFactory)?i:Object,"function"==typeof(a=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==g.IOptions&&g.IOptions)?s:Object])],S),t.SelfDefendingCustomNodeGroup=S},function(e,t,r){"use strict";var o,n,i,a,s,c,d=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},l=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const f=r(0),p=r(1),m=r(26),g=r(5),y=r(2),N=r(3),h=r(35),b=r(7),I=r(23),v=r(22),S=r(27),O=r(19);let j=class extends S.AbstractCustomNodeGroup{constructor(e,t,r,o,n){super(r,o,n),this.appendEvent=v.ObfuscationEvent.AfterObfuscation,this.customNodeFactory=e,this.stringArrayStorage=t}appendCustomNodes(e,t){this.stringArrayStorage.getLength()&&(this.appendCustomNodeIfExist(I.CustomNode.StringArrayNode,t=>{O.NodeAppender.prepend(e,t.getNode())}),this.appendCustomNodeIfExist(I.CustomNode.StringArrayCallsWrapper,t=>{O.NodeAppender.insertAtIndex(e,t.getNode(),1)}),this.appendCustomNodeIfExist(I.CustomNode.StringArrayRotateFunctionNode,t=>{O.NodeAppender.insertAtIndex(e,t.getNode(),1)}))}initialize(){if(this.customNodes=new Map,!this.options.stringArray)return;const e=this.customNodeFactory(I.CustomNode.StringArrayNode),t=this.customNodeFactory(I.CustomNode.StringArrayCallsWrapper),r=this.customNodeFactory(I.CustomNode.StringArrayRotateFunctionNode),o=this.stringArrayStorage.getStorageName(),n=this.stringArrayStorage.getStorageCallsWrapperName(),i=this.stringArrayStorage.getRotationAmount();e.initialize(this.stringArrayStorage,o),t.initialize(o,n),r.initialize(o,i),this.customNodes.set(I.CustomNode.StringArrayNode,e),this.customNodes.set(I.CustomNode.StringArrayCallsWrapper,t),this.options.rotateStringArray&&this.customNodes.set(I.CustomNode.StringArrayRotateFunctionNode,r)}};d([b.initializable(),l("design:type","function"==typeof(o="undefined"!=typeof Map&&Map)?o:Object)],j.prototype,"customNodes",void 0),j=d([f.injectable(),u(0,f.inject(p.ServiceIdentifiers.Factory__ICustomNode)),u(1,f.inject(p.ServiceIdentifiers.TStringArrayStorage)),u(2,f.inject(p.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u(3,f.inject(p.ServiceIdentifiers.IRandomGenerator)),u(4,f.inject(p.ServiceIdentifiers.IOptions)),l("design:paramtypes",["function"==typeof(n=void 0!==m.TCustomNodeFactory&&m.TCustomNodeFactory)?n:Object,"function"==typeof(i=void 0!==h.IStringArrayStorage&&h.IStringArrayStorage)?i:Object,"function"==typeof(a=void 0!==g.TIdentifierNamesGeneratorFactory&&g.TIdentifierNamesGeneratorFactory)?a:Object,"function"==typeof(s=void 0!==N.IRandomGenerator&&N.IRandomGenerator)?s:Object,"function"==typeof(c=void 0!==y.IOptions&&y.IOptions)?c:Object])],j),t.StringArrayCustomNodeGroup=j},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(10),N=r(8);let h=class extends y.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.properties=e}getNodeStructure(e){return[N.NodeFactory.variableDeclarationNode([N.NodeFactory.variableDeclaratorNode(N.NodeFactory.identifierNode(this.identifierNamesGenerator.generate()),N.NodeFactory.objectExpressionNode(this.properties))],"const")]}};h=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],h),t.ObjectExpressionVariableDeclarationHostNode=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableTemplate1=function(){return"\n let that;\n \n try {\n const getGlobal = Function('return (function() ' + '{}.constructor(\"return this\")( )' + ');');\n \n that = getGlobal();\n } catch (e) {\n that = window;\n }\n "}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableTemplate2=function(){return"\n const getGlobal = function () {\n let globalObject;\n \n try {\n globalObject = Function('return (function() ' + '{}.constructor(\"return this\")( )' + ');')();\n } catch (e) {\n globalObject = window;\n }\n \n return globalObject;\n };\n const that = getGlobal();\n "}},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(10),N=r(8),h=r(6);let b=class extends y.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.operator=e}getNodeStructure(e){const t=N.NodeFactory.expressionStatementNode(N.NodeFactory.functionExpressionNode([N.NodeFactory.identifierNode("x"),N.NodeFactory.identifierNode("y")],N.NodeFactory.blockStatementNode([N.NodeFactory.returnStatementNode(N.NodeFactory.binaryExpressionNode(this.operator,N.NodeFactory.identifierNode("x"),N.NodeFactory.identifierNode("y")))])));return h.NodeUtils.parentizeAst(t),[t]}};b=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],b),t.BinaryExpressionFunctionNode=b},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(7),N=r(10),h=r(8),b=r(4),I=r(6);let v=class extends N.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e,t,r){this.blockStatementBody=e,this.shuffledKeys=t,this.originalKeysIndexesInShuffledArray=r}getNodeStructure(e){const t=this.randomGenerator.getRandomString(6),r=this.randomGenerator.getRandomString(6),o=h.NodeFactory.blockStatementNode([h.NodeFactory.variableDeclarationNode([h.NodeFactory.variableDeclaratorNode(h.NodeFactory.identifierNode(t),h.NodeFactory.callExpressionNode(h.NodeFactory.memberExpressionNode(h.NodeFactory.literalNode(this.originalKeysIndexesInShuffledArray.join("|")),h.NodeFactory.identifierNode("split")),[h.NodeFactory.literalNode("|")]))],"const"),h.NodeFactory.variableDeclarationNode([h.NodeFactory.variableDeclaratorNode(h.NodeFactory.identifierNode(r),h.NodeFactory.literalNode(0))],"let"),h.NodeFactory.whileStatementNode(h.NodeFactory.literalNode(!0),h.NodeFactory.blockStatementNode([h.NodeFactory.switchStatementNode(h.NodeFactory.memberExpressionNode(h.NodeFactory.identifierNode(t),h.NodeFactory.updateExpressionNode("++",h.NodeFactory.identifierNode(r)),!0),this.shuffledKeys.map((e,t)=>{const r=this.blockStatementBody[e],o=[r];return b.NodeGuards.isReturnStatementNode(r)||o.push(h.NodeFactory.continueStatement()),h.NodeFactory.switchCaseNode(h.NodeFactory.literalNode(String(t)),o)})),h.NodeFactory.breakStatement()]))]);return I.NodeUtils.parentizeAst(o),[o]}};s([y.initializable(),c("design:type",Array)],v.prototype,"blockStatementBody",void 0),s([y.initializable(),c("design:type",Array)],v.prototype,"originalKeysIndexesInShuffledArray",void 0),s([y.initializable(),c("design:type",Array)],v.prototype,"shuffledKeys",void 0),v=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],v),t.BlockStatementControlFlowFlatteningNode=v},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(10),N=r(8),h=r(6);let b=class extends y.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e,t){this.blockStatementNode=e,this.deadCodeInjectionRootAstHostNode=t}getNodeStructure(e){const t=this.randomGenerator.getMathRandom()>.5,r=this.randomGenerator.getMathRandom()>.5,o=t?"===":"!==",n=this.randomGenerator.getRandomString(5),i=r?n:this.randomGenerator.getRandomString(5),[a,s]=t===r?[this.blockStatementNode,this.deadCodeInjectionRootAstHostNode]:[this.deadCodeInjectionRootAstHostNode,this.blockStatementNode],c=N.NodeFactory.blockStatementNode([N.NodeFactory.ifStatementNode(N.NodeFactory.binaryExpressionNode(o,N.NodeFactory.literalNode(n),N.NodeFactory.literalNode(i)),a,s)]);return h.NodeUtils.parentizeAst(c),[c]}};b=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],b),t.BlockStatementDeadCodeInjectionNode=b},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(5),m=r(2),g=r(3),y=r(9),N=r(7),h=r(10),b=r(8),I=r(6);let v=class extends h.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e,t,r,o){this.controlFlowStorageName=e,this.controlFlowStorageKey=t,this.callee=r,this.expressionArguments=o}getNodeStructure(){const e=b.NodeFactory.expressionStatementNode(b.NodeFactory.callExpressionNode(b.NodeFactory.memberExpressionNode(b.NodeFactory.identifierNode(this.controlFlowStorageName),b.NodeFactory.identifierNode(this.controlFlowStorageKey)),[this.callee,...this.expressionArguments]));return I.NodeUtils.parentizeAst(e),[e]}};c([N.initializable(),d("design:type","function"==typeof(o="undefined"!=typeof ESTree&&ESTree.Expression)?o:Object)],v.prototype,"callee",void 0),c([N.initializable(),d("design:type",String)],v.prototype,"controlFlowStorageKey",void 0),c([N.initializable(),d("design:type",String)],v.prototype,"controlFlowStorageName",void 0),c([N.initializable(),d("design:type",Array)],v.prototype,"expressionArguments",void 0),v=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==p.TIdentifierNamesGeneratorFactory&&p.TIdentifierNamesGeneratorFactory)?n:Object,"function"==typeof(i=void 0!==y.ICustomNodeFormatter&&y.ICustomNodeFormatter)?i:Object,"function"==typeof(a=void 0!==g.IRandomGenerator&&g.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==m.IOptions&&m.IOptions)?s:Object])],v),t.CallExpressionControlFlowStorageCallNode=v},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(7),N=r(10),h=r(8),b=r(6);let I=class extends N.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.expressionArguments=e}getNodeStructure(e){const t=h.NodeFactory.identifierNode("callee"),r=[],o=this.expressionArguments.length;for(let e=0;e<o;e++)r.push(h.NodeFactory.identifierNode(`param${e+1}`));const n=h.NodeFactory.expressionStatementNode(h.NodeFactory.functionExpressionNode([t,...r],h.NodeFactory.blockStatementNode([h.NodeFactory.returnStatementNode(h.NodeFactory.callExpressionNode(t,r))])));return b.NodeUtils.parentizeAst(n),[n]}};s([y.initializable(),c("design:type",Array)],I.prototype,"expressionArguments",void 0),I=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],I),t.CallExpressionFunctionNode=I},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(121),m=r(5),g=r(2),y=r(3),N=r(9),h=r(7),b=r(10),I=r(8),v=r(4),S=r(6);let O=class extends b.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.controlFlowStorage=e}getNodeStructure(e){const t=Array.from(this.controlFlowStorage.getStorage()).map(([e,t])=>{const r=t.getNode()[0];if(!v.NodeGuards.isExpressionStatementNode(r))throw new Error("Function node for control flow storage object should be passed inside the `ExpressionStatement` node!");return I.NodeFactory.propertyNode(I.NodeFactory.identifierNode(e),r.expression)});let r=I.NodeFactory.variableDeclarationNode([I.NodeFactory.variableDeclaratorNode(I.NodeFactory.identifierNode(this.controlFlowStorage.getStorageId()),I.NodeFactory.objectExpressionNode(t))],"const");return r=S.NodeUtils.parentizeAst(r),[r]}};c([h.initializable(),d("design:type","function"==typeof(o=void 0!==p.TControlFlowStorage&&p.TControlFlowStorage)?o:Object)],O.prototype,"controlFlowStorage",void 0),O=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==m.TIdentifierNamesGeneratorFactory&&m.TIdentifierNamesGeneratorFactory)?n:Object,"function"==typeof(i=void 0!==N.ICustomNodeFormatter&&N.ICustomNodeFormatter)?i:Object,"function"==typeof(a=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==g.IOptions&&g.IOptions)?s:Object])],O),t.ControlFlowStorageNode=O},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(20),N=r(123),h=r(47),b=r(7),I=r(10),v=r(6);let S=class extends I.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.callsControllerFunctionName=e}getNodeStructure(e){return v.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){const e=this.options.target!==y.ObfuscationTarget.BrowserNoEval?this.getGlobalVariableTemplate():h.GlobalVariableNoEvalTemplate();return this.customNodeFormatter.formatTemplate(N.ConsoleOutputDisableExpressionTemplate(),{consoleLogDisableFunctionName:this.identifierNamesGenerator.generate(),globalVariableTemplate:e,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}};s([b.initializable(),c("design:type",String)],S.prototype,"callsControllerFunctionName",void 0),S=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],S),t.ConsoleOutputDisableExpressionNode=S},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleOutputDisableExpressionTemplate=function(){return"\n const {consoleLogDisableFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n const func = function () {};\n \n {globalVariableTemplate}\n \n if (!that.console) {\n that.console = (function (func){\n const c = {};\n \n c.log = func;\n c.warn = func;\n c.debug = func;\n c.info = func;\n c.error = func;\n c.exception = func;\n c.table = func;\n c.trace = func;\n \n return c;\n })(func);\n } else {\n that.console.log = func;\n that.console.warn = func;\n that.console.debug = func;\n that.console.info = func;\n that.console.error = func;\n that.console.exception = func;\n that.console.table = func;\n that.console.trace = func;\n }\n });\n \n {consoleLogDisableFunctionName}();\n "}},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=s(r(13)),f=c(r(125)),p=r(62),m=r(4);let g=class{constructor(e){this.prevailingKindOfVariables=e.getPrevailingKind()}formatTemplate(e,t){return f.default(e,t)}formatStructure(e){for(const t of e)u.replace(t,{enter:e=>{if(m.NodeGuards.isVariableDeclarationNode(e))return"var"===this.prevailingKindOfVariables&&(e.kind="var"),e}});return e}};g=n([d.injectable(),a(0,d.inject(l.ServiceIdentifiers.IPrevailingKindOfVariablesAnalyzer)),i("design:paramtypes",["function"==typeof(o=void 0!==p.IPrevailingKindOfVariablesAnalyzer&&p.IPrevailingKindOfVariablesAnalyzer)?o:Object])],g),t.CustomNodeFormatter=g},function(e,t){e.exports=require("string-template")},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(7),N=r(127),h=r(10),b=r(6);let I=class extends h.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e,t){this.debugProtectionFunctionName=e,this.callsControllerFunctionName=t}getNodeStructure(e){return b.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){return this.customNodeFormatter.formatTemplate(N.DebugProtectionFunctionCallTemplate(),{debugProtectionFunctionName:this.debugProtectionFunctionName,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}};s([y.initializable(),c("design:type",String)],I.prototype,"callsControllerFunctionName",void 0),s([y.initializable(),c("design:type",String)],I.prototype,"debugProtectionFunctionName",void 0),I=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],I),t.DebugProtectionFunctionCallNode=I},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionCallTemplate=function(){return"\n (function () {\n {singleNodeCallControllerFunctionName}(\n this,\n function () {\n const regExp1 = new RegExp('function *\\\\( *\\\\)');\n const regExp2 = new RegExp('\\\\+\\\\+ *\\(?:[a-zA-Z_$][0-9a-zA-Z_$]*\\)', 'i');\n \n const result = {debugProtectionFunctionName}('init');\n \n if (!regExp1.test(result + 'chain') || !regExp2.test(result + 'input')) {\n result('0');\n } else {\n {debugProtectionFunctionName}();\n }\n }\n )();\n })();\n "}},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(7),N=r(129),h=r(10),b=r(6);let I=class extends h.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.debugProtectionFunctionName=e}getNodeStructure(e){return b.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){return this.customNodeFormatter.formatTemplate(N.DebugProtectionFunctionIntervalTemplate(),{debugProtectionFunctionName:this.debugProtectionFunctionName})}};s([y.initializable(),c("design:type",String)],I.prototype,"debugProtectionFunctionName",void 0),I=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],I),t.DebugProtectionFunctionIntervalNode=I},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionIntervalTemplate=function(){return"\n setInterval(function () {\n {debugProtectionFunctionName}();\n }, 4000);\n "}},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(20),N=r(7),h=r(131),b=r(132),I=r(133),v=r(10),S=r(6);let O=class extends v.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.debugProtectionFunctionName=e}getNodeStructure(e){return S.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){const e=this.options.target!==y.ObfuscationTarget.BrowserNoEval?h.DebuggerTemplate():b.DebuggerTemplateNoEval();return this.customNodeFormatter.formatTemplate(I.DebugProtectionFunctionTemplate(),{debuggerTemplate:e,debugProtectionFunctionName:this.debugProtectionFunctionName})}};s([N.initializable(),c("design:type",String)],O.prototype,"debugProtectionFunctionName",void 0),O=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],O),t.DebugProtectionFunctionNode=O},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggerTemplate=function(){return"\n if (typeof counter === 'string') {\n return (function (arg) {}.constructor('while (true) {}').apply('counter'));\n } else {\n if (('' + counter / counter)['length'] !== 1 || counter % 20 === 0) {\n (function () {return true;}.constructor('debu' + 'gger').call('action'));\n } else {\n (function () {return false;}.constructor('debu' + 'gger').apply('stateObject'));\n }\n \n }\n "}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggerTemplateNoEval=function(){return"\n if (typeof counter === 'string') {\n const func = function () {\n while (true) {}\n };\n \n return func();\n } else {\n if (('' + counter / counter)['length'] !== 1 || counter % 20 === 0) {\n debugger;\n } else {\n debugger;\n }\n \n }\n "}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionTemplate=function(){return"\n function {debugProtectionFunctionName} (ret) {\n function debuggerProtection (counter) {\n \n {debuggerTemplate}\n \n debuggerProtection(++counter);\n }\n \n try {\n if (ret) {\n return debuggerProtection;\n } else {\n debuggerProtection(0);\n }\n } catch (y) {}\n }\n "}},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(5),m=r(48),g=r(2),y=r(3),N=r(9),h=r(20),b=r(7),I=r(135),v=r(47),S=r(10),O=r(6);let j=class extends S.AbstractCustomNode{constructor(e,t,r,o,n){super(e,t,r,o),this.cryptUtils=n}initialize(e){this.callsControllerFunctionName=e}getNodeStructure(e){return O.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){const e=this.options.domainLock.join(";"),[t,r]=this.cryptUtils.hideString(e,3*e.length),o=this.options.target!==h.ObfuscationTarget.BrowserNoEval?this.getGlobalVariableTemplate():v.GlobalVariableNoEvalTemplate();return this.customNodeFormatter.formatTemplate(I.DomainLockNodeTemplate(),{domainLockFunctionName:this.identifierNamesGenerator.generate(),diff:r,domains:t,globalVariableTemplate:o,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}};c([b.initializable(),d("design:type",String)],j.prototype,"callsControllerFunctionName",void 0),j=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),l(4,u.inject(f.ServiceIdentifiers.ICryptUtils)),d("design:paramtypes",["function"==typeof(o=void 0!==p.TIdentifierNamesGeneratorFactory&&p.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==N.ICustomNodeFormatter&&N.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==g.IOptions&&g.IOptions)?a:Object,"function"==typeof(s=void 0!==m.ICryptUtils&&m.ICryptUtils)?s:Object])],j),t.DomainLockNode=j},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomainLockNodeTemplate=function(){return'\n const {domainLockFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n \n {globalVariableTemplate}\n \n const func = function () {\n return {\n key: \'item\',\n value: \'attribute\',\n getAttribute: function () {\n for (let i = 0; i < 1000; i--) {\n const isPositive = i > 0;\n \n switch (isPositive) {\n case true:\n return this.item + \'_\' + this.value + \'_\' + i;\n default:\n this.item + \'_\' + this.value;\n }\n }\n }()\n };\n };\n \n const regExp = new RegExp("[{diff}]", "g");\n const domains = "{domains}".replace(regExp, "").split(";");\n let document;\n let domain;\n let location;\n let hostname;\n\n for (let d in that) {\n if (d.length == 8 && d.charCodeAt(7) == 116 && d.charCodeAt(5) == 101 && d.charCodeAt(3) == 117 && d.charCodeAt(0) == 100) {\n document = d;\n \n break;\n }\n }\n\n for (let d1 in that[document]) {\n if (d1.length == 6 && d1.charCodeAt(5) == 110 && d1.charCodeAt(0) == 100) {\n domain = d1;\n \n break;\n }\n }\n\n if (!("~" > domain)) {\n for (let d2 in that[document]) {\n if (d2.length == 8 && d2.charCodeAt(7) == 110 && d2.charCodeAt(0) == 108) {\n location = d2;\n \n break;\n }\n }\n\n for (let d3 in that[document][location]) {\n if (d3.length == 8 && d3.charCodeAt(7) == 101 && d3.charCodeAt(0) == 104) {\n hostname = d3;\n \n break;\n }\n }\n }\n \n if (!document || !that[document]) {\n return;\n }\n \n const documentDomain = that[document][domain];\n const documentLocationHostName = !!that[document][location] && that[document][location][hostname];\n const currentDomain = documentDomain || documentLocationHostName;\n \n if (!currentDomain) {\n return;\n }\n \n let ok = false;\n \n for (let i = 0; i < domains.length; i++) {\n const domain = domains[i];\n const position = currentDomain.length - domain.length;\n const lastIndex = currentDomain.indexOf(domain, position);\n const endsWith = lastIndex !== -1 && lastIndex === position;\n \n if (endsWith) {\n if (currentDomain.length == domain.length || domain.indexOf(".") === 0) {\n ok = true;\n }\n }\n }\n \n if (!ok) {\n data;\n } else {\n return;\n }\n \n func();\n });\n\n {domainLockFunctionName}();\n '}},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(7),N=r(10),h=r(8),b=r(6);let I=class extends N.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e,t,r,o){this.controlFlowStorageName=e,this.controlFlowStorageKey=t,this.leftValue=r,this.rightValue=o}getNodeStructure(){const e=h.NodeFactory.expressionStatementNode(h.NodeFactory.callExpressionNode(h.NodeFactory.memberExpressionNode(h.NodeFactory.identifierNode(this.controlFlowStorageName),h.NodeFactory.identifierNode(this.controlFlowStorageKey)),[this.leftValue,this.rightValue]));return b.NodeUtils.parentizeAst(e),[e]}};s([y.initializable(),c("design:type",String)],I.prototype,"controlFlowStorageKey",void 0),s([y.initializable(),c("design:type",String)],I.prototype,"controlFlowStorageName",void 0),I=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],I),t.ExpressionWithOperatorControlFlowStorageCallNode=I},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(10),N=r(8),h=r(6);let b=class extends y.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.operator=e}getNodeStructure(e){const t=N.NodeFactory.expressionStatementNode(N.NodeFactory.functionExpressionNode([N.NodeFactory.identifierNode("x"),N.NodeFactory.identifierNode("y")],N.NodeFactory.blockStatementNode([N.NodeFactory.returnStatementNode(N.NodeFactory.logicalExpressionNode(this.operator,N.NodeFactory.identifierNode("x"),N.NodeFactory.identifierNode("y")))])));return h.NodeUtils.parentizeAst(t),[t]}};b=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],b),t.LogicalExpressionFunctionNode=b},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(5),m=r(2),g=r(3),y=r(22),N=r(7),h=r(139),b=r(36),I=r(10),v=r(25),S=r(6),O=r(9);let j=class extends I.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e,t){this.appendEvent=e,this.callsControllerFunctionName=t}getNodeStructure(e){return S.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){return this.appendEvent===y.ObfuscationEvent.AfterObfuscation?v.JavaScriptObfuscator.obfuscate(this.customNodeFormatter.formatTemplate(h.SingleNodeCallControllerTemplate(),{singleNodeCallControllerFunctionName:this.callsControllerFunctionName}),Object.assign(Object.assign({},b.NO_ADDITIONAL_NODES_PRESET),{identifierNamesGenerator:this.options.identifierNamesGenerator,identifiersDictionary:this.options.identifiersDictionary,seed:this.options.seed})).getObfuscatedCode():this.customNodeFormatter.formatTemplate(h.SingleNodeCallControllerTemplate(),{singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}};c([N.initializable(),d("design:type",String)],j.prototype,"callsControllerFunctionName",void 0),c([N.initializable(),d("design:type","function"==typeof(o=void 0!==y.ObfuscationEvent&&y.ObfuscationEvent)?o:Object)],j.prototype,"appendEvent",void 0),j=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==p.TIdentifierNamesGeneratorFactory&&p.TIdentifierNamesGeneratorFactory)?n:Object,"function"==typeof(i=void 0!==O.ICustomNodeFormatter&&O.ICustomNodeFormatter)?i:Object,"function"==typeof(a=void 0!==g.IRandomGenerator&&g.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==m.IOptions&&m.IOptions)?s:Object])],j),t.NodeCallsControllerFunctionNode=j},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SingleNodeCallControllerTemplate=function(){return"\n const {singleNodeCallControllerFunctionName} = (function(){\n let firstCall = true;\n \n return function (context, fn){\n const rfn = firstCall ? function(){\n if(fn){\n const res = fn.apply(context, arguments);\n fn = null;\n return res;\n }\n } : function(){}\n \n firstCall = false;\n \n return rfn;\n }\n })();\n "}},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(5),m=r(29),g=r(2),y=r(3),N=r(9),h=r(7),b=r(36),I=r(141),v=r(10),S=r(25),O=r(6);let j=class extends v.AbstractCustomNode{constructor(e,t,r,o,n){super(e,t,r,o),this.escapeSequenceEncoder=n}initialize(e){this.callsControllerFunctionName=e}getNodeStructure(e){return O.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){return S.JavaScriptObfuscator.obfuscate(this.customNodeFormatter.formatTemplate(I.SelfDefendingTemplate(this.escapeSequenceEncoder),{selfDefendingFunctionName:this.identifierNamesGenerator.generate(),singleNodeCallControllerFunctionName:this.callsControllerFunctionName}),Object.assign(Object.assign({},b.NO_ADDITIONAL_NODES_PRESET),{identifierNamesGenerator:this.options.identifierNamesGenerator,identifiersDictionary:this.options.identifiersDictionary,seed:this.options.seed,unicodeEscapeSequence:!0})).getObfuscatedCode()}};c([h.initializable(),d("design:type",String)],j.prototype,"callsControllerFunctionName",void 0),j=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),l(4,u.inject(f.ServiceIdentifiers.IEscapeSequenceEncoder)),d("design:paramtypes",["function"==typeof(o=void 0!==p.TIdentifierNamesGeneratorFactory&&p.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==N.ICustomNodeFormatter&&N.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==g.IOptions&&g.IOptions)?a:Object,"function"==typeof(s=void 0!==m.IEscapeSequenceEncoder&&m.IEscapeSequenceEncoder)?s:Object])],j),t.SelfDefendingUnicodeNode=j},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=function(e){return`\n const {selfDefendingFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n const func1 = function(){return 'dev';},\n func2 = function () {\n return 'window';\n };\n \n const test1 = function () {\n const regExp = new RegExp('${e.encode("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}",!0)}');\n \n return !regExp.test(func1.toString());\n };\n \n const test2 = function () {\n const regExp = new RegExp('${e.encode("(\\\\[x|u](\\w){2,4})+",!0)}');\n \n return regExp.test(func2.toString());\n };\n \n const recursiveFunc1 = function (string) {\n const i = ~-1 >> 1 + 255 % 0;\n \n if (string.indexOf('i' === i)) {\n recursiveFunc2(string)\n }\n };\n \n const recursiveFunc2 = function (string) {\n const i = ~-4 >> 1 + 255 % 0;\n \n if (string.indexOf((true+"")[3]) !== i) {\n recursiveFunc1(string)\n }\n };\n \n if (!test1()) {\n if (!test2()) {\n recursiveFunc1('indеxOf');\n } else {\n recursiveFunc1('indexOf');\n }\n } else {\n recursiveFunc1('indеxOf');\n }\n })\n \n {selfDefendingFunctionName}();\n `}},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(5),m=r(29),g=r(2),y=r(3),N=r(9),h=r(20),b=r(24),I=r(7),v=r(36),S=r(143),O=r(47),j=r(144),_=r(145),C=r(146),R=r(147),F=r(148),T=r(10),x=r(25),G=r(6);let E=class extends T.AbstractCustomNode{constructor(e,t,r,o,n){super(e,t,r,o),this.escapeSequenceEncoder=n}initialize(e,t){this.stringArrayName=e,this.stringArrayCallsWrapperName=t}getNodeStructure(e){return G.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){const e=this.getDecodeStringArrayTemplate();return x.JavaScriptObfuscator.obfuscate(this.customNodeFormatter.formatTemplate(R.StringArrayCallsWrapperTemplate(),{decodeNodeTemplate:e,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName,stringArrayName:this.stringArrayName}),Object.assign(Object.assign({},v.NO_ADDITIONAL_NODES_PRESET),{identifierNamesGenerator:this.options.identifierNamesGenerator,identifiersDictionary:this.options.identifiersDictionary,seed:this.randomGenerator.getRawSeed()})).getObfuscatedCode()}getDecodeStringArrayTemplate(){const e=this.options.target!==h.ObfuscationTarget.BrowserNoEval?this.getGlobalVariableTemplate():O.GlobalVariableNoEvalTemplate(),t=this.customNodeFormatter.formatTemplate(S.AtobTemplate(),{globalVariableTemplate:e});let r="",o="";switch(this.options.selfDefending&&(o=this.customNodeFormatter.formatTemplate(_.SelfDefendingTemplate(this.randomGenerator,this.escapeSequenceEncoder),{stringArrayCallsWrapperName:this.stringArrayCallsWrapperName,stringArrayName:this.stringArrayName})),this.options.stringArrayEncoding){case b.StringArrayEncoding.Rc4:r=this.customNodeFormatter.formatTemplate(F.StringArrayRc4DecodeNodeTemplate(this.randomGenerator),{atobPolyfill:t,rc4Polyfill:j.Rc4Template(),selfDefendingCode:o,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName});break;case b.StringArrayEncoding.Base64:r=this.customNodeFormatter.formatTemplate(C.StringArrayBase64DecodeNodeTemplate(this.randomGenerator),{atobPolyfill:t,selfDefendingCode:o,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName})}return r}};c([I.initializable(),d("design:type",String)],E.prototype,"stringArrayName",void 0),c([I.initializable(),d("design:type",String)],E.prototype,"stringArrayCallsWrapperName",void 0),E=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),l(4,u.inject(f.ServiceIdentifiers.IEscapeSequenceEncoder)),d("design:paramtypes",["function"==typeof(o=void 0!==p.TIdentifierNamesGeneratorFactory&&p.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==N.ICustomNodeFormatter&&N.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==g.IOptions&&g.IOptions)?a:Object,"function"==typeof(s=void 0!==m.IEscapeSequenceEncoder&&m.IEscapeSequenceEncoder)?s:Object])],E),t.StringArrayCallsWrapper=E},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AtobTemplate=function(){return"\n (function () {\n {globalVariableTemplate}\n \n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n that.atob || (\n that.atob = function(input) {\n const str = String(input).replace(/=+$/, '');\n let output = '';\n for (\n let bc = 0, bs, buffer, idx = 0;\n buffer = str.charAt(idx++);\n ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,\n bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0\n ) {\n buffer = chars.indexOf(buffer);\n }\n return output;\n }\n );\n })();\n "}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rc4Template=function(){return"\n const rc4 = function (str, key) {\n let s = [], j = 0, x, res = '', newStr = '';\n \n str = atob(str);\n \n for (let k = 0, length = str.length; k < length; k++) {\n newStr += '%' + ('00' + str.charCodeAt(k).toString(16)).slice(-2);\n }\n \n str = decodeURIComponent(newStr);\n \t \n let i;\n \t \n\t for (i = 0; i < 256; i++) {\n s[i] = i;\n }\n \n for (i = 0; i < 256; i++) {\n j = (j + s[i] + key.charCodeAt(i % key.length)) % 256;\n x = s[i];\n s[i] = s[j];\n s[j] = x;\n }\n \n i = 0;\n j = 0;\n \n for (let y = 0; y < str.length; y++) {\n i = (i + 1) % 256;\n j = (j + s[i]) % 256;\n x = s[i];\n s[i] = s[j];\n s[j] = x;\n res += String.fromCharCode(str.charCodeAt(y) ^ s[(s[i] + s[j]) % 256]);\n }\n \n return res;\n }\n "}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=function(e,t){const r=e.getRandomString(6),o=e.getRandomString(6),n=e.getRandomString(6),i=e.getRandomString(6),a=e.getRandomString(6),s=e.getRandomString(6),c=e.getRandomString(6),d=e.getRandomString(6),l=e.getRandomString(6);return`\n const StatesClass = function (${r}) {\n this.${r} = ${r};\n this.${o} = [1, 0, 0];\n this.${n} = function(){return 'newState';};\n this.${i} = '${t.encode("\\w+ *\\(\\) *{\\w+ *",!0)}';\n this.${a} = '${t.encode("['|\"].+['|\"];? *}",!0)}';\n };\n \n StatesClass.prototype.${s} = function () {\n const regExp = new RegExp(this.${i} + this.${a});\n const expression = regExp.test(this.${n}.toString())\n ? --this.${o}[1]\n : --this.${o}[0];\n \n return this.${c}(expression);\n };\n \n StatesClass.prototype.${c} = function (${l}) {\n if (!Boolean(~${l})) {\n return ${l};\n }\n \n return this.${d}(this.${r});\n };\n\n StatesClass.prototype.${d} = function (${r}) {\n for (let i = 0, len = this.${o}.length; i < len; i++) {\n this.${o}.push(Math.round(Math.random()));\n len = this.${o}.length;\n }\n \n return ${r}(this.${o}[0]);\n };\n\n new StatesClass({stringArrayCallsWrapperName}).${s}();\n `}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayBase64DecodeNodeTemplate=function(e){const t=e.getRandomString(6),r=e.getRandomString(6),o=e.getRandomString(6);return`\n if ({stringArrayCallsWrapperName}.${t} === undefined) {\n {atobPolyfill}\n \n {stringArrayCallsWrapperName}.${r} = function (str) {\n const string = atob(str);\n let newStringChars = [];\n \n for (let i = 0, length = string.length; i < length; i++) {\n newStringChars += '%' + ('00' + string.charCodeAt(i).toString(16)).slice(-2);\n }\n \n return decodeURIComponent(newStringChars);\n };\n \n {stringArrayCallsWrapperName}.${o} = {};\n \n {stringArrayCallsWrapperName}.${t} = true;\n }\n \n const cachedValue = {stringArrayCallsWrapperName}.${o}[index];\n \n if (cachedValue === undefined) {\n {selfDefendingCode}\n \n value = {stringArrayCallsWrapperName}.${r}(value);\n {stringArrayCallsWrapperName}.${o}[index] = value;\n } else {\n value = cachedValue;\n }\n `}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayCallsWrapperTemplate=function(){return"\n const {stringArrayCallsWrapperName} = function (index, key) {\n index = index - 0;\n \n let value = {stringArrayName}[index];\n \n {decodeNodeTemplate}\n \n return value;\n };\n "}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRc4DecodeNodeTemplate=function(e){const t=e.getRandomString(6),r=e.getRandomString(6),o=e.getRandomString(6),n=e.getRandomString(6);return`\n if ({stringArrayCallsWrapperName}.${t} === undefined) {\n {atobPolyfill}\n \n {rc4Polyfill}\n {stringArrayCallsWrapperName}.${r} = rc4;\n \n {stringArrayCallsWrapperName}.${o} = {};\n \n {stringArrayCallsWrapperName}.${t} = true;\n }\n \n const cachedValue = {stringArrayCallsWrapperName}.${o}[index];\n\n if (cachedValue === undefined) {\n if ({stringArrayCallsWrapperName}.${n} === undefined) {\n {selfDefendingCode}\n \n {stringArrayCallsWrapperName}.${n} = true;\n }\n \n value = {stringArrayCallsWrapperName}.${r}(value, key);\n {stringArrayCallsWrapperName}.${o}[index] = value;\n } else {\n value = cachedValue;\n }\n `}},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(5),m=r(2),g=r(3),y=r(9),N=r(35),h=r(7),b=r(150),I=r(10),v=r(6);let S=class extends I.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e,t){this.stringArrayStorage=e,this.stringArrayName=t}getNodeStructure(e){return v.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){return this.customNodeFormatter.formatTemplate(b.StringArrayTemplate(),{stringArrayName:this.stringArrayName,stringArray:this.stringArrayStorage.toString()})}};c([h.initializable(),d("design:type","function"==typeof(o=void 0!==N.IStringArrayStorage&&N.IStringArrayStorage)?o:Object)],S.prototype,"stringArrayStorage",void 0),c([h.initializable(),d("design:type",String)],S.prototype,"stringArrayName",void 0),S=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),d("design:paramtypes",["function"==typeof(n=void 0!==p.TIdentifierNamesGeneratorFactory&&p.TIdentifierNamesGeneratorFactory)?n:Object,"function"==typeof(i=void 0!==y.ICustomNodeFormatter&&y.ICustomNodeFormatter)?i:Object,"function"==typeof(a=void 0!==g.IRandomGenerator&&g.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==m.IOptions&&m.IOptions)?s:Object])],S),t.StringArrayNode=S},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayTemplate=function(){return"\n const {stringArrayName} = [{stringArray}];\n "}},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(5),m=r(29),g=r(2),y=r(3),N=r(9),h=r(7),b=r(36),I=r(152),v=r(153),S=r(10),O=r(25),j=r(6),_=r(37);let C=class extends S.AbstractCustomNode{constructor(e,t,r,o,n){super(e,t,r,o),this.escapeSequenceEncoder=n}initialize(e,t){this.stringArrayName=e,this.stringArrayRotationAmount=t}getNodeStructure(e){return j.NodeUtils.convertCodeToStructure(e)}getNodeTemplate(){const e=this.identifierNamesGenerator.generate(),t=this.identifierNamesGenerator.generate();let r="";return r=this.options.selfDefending?this.customNodeFormatter.formatTemplate(I.SelfDefendingTemplate(this.escapeSequenceEncoder),{timesName:e,whileFunctionName:t}):`${t}(++${e})`,O.JavaScriptObfuscator.obfuscate(this.customNodeFormatter.formatTemplate(v.StringArrayRotateFunctionTemplate(),{code:r,timesName:e,stringArrayName:this.stringArrayName,stringArrayRotationAmount:_.NumberUtils.toHex(this.stringArrayRotationAmount),whileFunctionName:t}),Object.assign(Object.assign({},b.NO_ADDITIONAL_NODES_PRESET),{identifierNamesGenerator:this.options.identifierNamesGenerator,identifiersDictionary:this.options.identifiersDictionary,seed:this.randomGenerator.getRawSeed()})).getObfuscatedCode()}};c([h.initializable(),d("design:type",String)],C.prototype,"stringArrayName",void 0),c([h.initializable(),d("design:type",Number)],C.prototype,"stringArrayRotationAmount",void 0),C=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,u.inject(f.ServiceIdentifiers.ICustomNodeFormatter)),l(2,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(3,u.inject(f.ServiceIdentifiers.IOptions)),l(4,u.inject(f.ServiceIdentifiers.IEscapeSequenceEncoder)),d("design:paramtypes",["function"==typeof(o=void 0!==p.TIdentifierNamesGeneratorFactory&&p.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==N.ICustomNodeFormatter&&N.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==g.IOptions&&g.IOptions)?a:Object,"function"==typeof(s=void 0!==m.IEscapeSequenceEncoder&&m.IEscapeSequenceEncoder)?s:Object])],C),t.StringArrayRotateFunctionNode=C},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=function(e){return`\n const selfDefendingFunc = function () {\n const object = {\n data: {\n key: 'cookie',\n value: 'timeout'\n },\n setCookie: function (options, name, value, document) {\n document = document || {};\n \n let updatedCookie = name + "=" + value;\n let i = 0;\n \n for (let i = 0, len = options.length; i < len; i++) {\n const propName = options[i];\n \n updatedCookie += "; " + propName;\n \n const propValue = options[propName];\n \n options.push(propValue);\n len = options.length;\n \n if (propValue !== true) {\n updatedCookie += "=" + propValue;\n }\n }\n\n document['cookie'] = updatedCookie;\n },\n removeCookie: function(){return 'dev';},\n getCookie: function (document, name) {\n document = document || function (value) { return value };\n const matches = document(new RegExp(\n "(?:^|; )" + name.replace(/([.$?*|{}()[]\\/+^])/g, '\\$1') + "=([^;]*)"\n ));\n \n const func = function (param1, param2) {\n param1(++param2);\n };\n \n func({whileFunctionName}, {timesName});\n \n return matches ? decodeURIComponent(matches[1]) : undefined;\n }\n };\n \n const test1 = function () {\n const regExp = new RegExp('${e.encode("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}",!0)}');\n \n return regExp.test(object.removeCookie.toString());\n };\n \n object['updateCookie'] = test1;\n \n let cookie = '';\n const result = object['updateCookie']();\n \n if (!result) {\n object['setCookie'](['*'], 'counter', 1);\n } else if (result) {\n cookie = object['getCookie'](null, 'counter');\n } else {\n object['removeCookie']();\n }\n };\n \n selfDefendingFunc();\n `}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRotateFunctionTemplate=function(){return"\n (function (array, {timesName}) {\n const {whileFunctionName} = function (times) {\n while (--times) {\n array['push'](array['shift']());\n }\n };\n \n {code}\n })({stringArrayName}, 0x{stringArrayRotationAmount});\n "}},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(7),N=r(10),h=r(8),b=r(6);let I=class extends N.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e,t){this.controlFlowStorageName=e,this.controlFlowStorageKey=t}getNodeStructure(){const e=h.NodeFactory.expressionStatementNode(h.NodeFactory.memberExpressionNode(h.NodeFactory.identifierNode(this.controlFlowStorageName),h.NodeFactory.identifierNode(this.controlFlowStorageKey)));return b.NodeUtils.parentizeAst(e),[e]}};s([y.initializable(),c("design:type",String)],I.prototype,"controlFlowStorageKey",void 0),s([y.initializable(),c("design:type",String)],I.prototype,"controlFlowStorageName",void 0),I=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],I),t.StringLiteralControlFlowStorageCallNode=I},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(5),p=r(2),m=r(3),g=r(9),y=r(7),N=r(10),h=r(8);let b=class extends N.AbstractCustomNode{constructor(e,t,r,o){super(e,t,r,o)}initialize(e){this.literalValue=e}getNodeStructure(e){return[h.NodeFactory.expressionStatementNode(h.NodeFactory.literalNode(this.literalValue))]}};s([y.initializable(),c("design:type",String)],b.prototype,"literalValue",void 0),b=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d(1,l.inject(u.ServiceIdentifiers.ICustomNodeFormatter)),d(2,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(3,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(o=void 0!==f.TIdentifierNamesGeneratorFactory&&f.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==g.ICustomNodeFormatter&&g.ICustomNodeFormatter)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],b),t.StringLiteralNode=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0);t.finalizingTransformersModule=new o.ContainerModule(e=>{})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(1),i=r(31),a=r(158),s=r(159),c=r(160);t.generatorsModule=new o.ContainerModule(e=>{e(n.ServiceIdentifiers.IIdentifierNamesGenerator).to(a.DictionaryIdentifierNamesGenerator).inSingletonScope().whenTargetNamed(i.IdentifierNamesGenerator.DictionaryIdentifierNamesGenerator),e(n.ServiceIdentifiers.IIdentifierNamesGenerator).to(s.HexadecimalIdentifierNamesGenerator).inSingletonScope().whenTargetNamed(i.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator),e(n.ServiceIdentifiers.IIdentifierNamesGenerator).to(c.MangledIdentifierNamesGenerator).inSingletonScope().whenTargetNamed(i.IdentifierNamesGenerator.MangledIdentifierNamesGenerator),e(n.ServiceIdentifiers.Factory__IIdentifierNamesGenerator).toFactory(function(){let e=null;return t=>r=>{if(e)return e;let o;switch(r.identifierNamesGenerator){case i.IdentifierNamesGenerator.DictionaryIdentifierNamesGenerator:o=t.container.getNamed(n.ServiceIdentifiers.IIdentifierNamesGenerator,i.IdentifierNamesGenerator.DictionaryIdentifierNamesGenerator);break;case i.IdentifierNamesGenerator.MangledIdentifierNamesGenerator:o=t.container.getNamed(n.ServiceIdentifiers.IIdentifierNamesGenerator,i.IdentifierNamesGenerator.MangledIdentifierNamesGenerator);break;case i.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator:default:o=t.container.getNamed(n.ServiceIdentifiers.IIdentifierNamesGenerator,i.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator)}return e=o,o}}())})},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(34),p=r(2),m=r(3),g=r(49);let y=o=class extends g.AbstractIdentifierNamesGenerator{constructor(e,t,r){super(e,t),this.arrayUtils=r,this.identifierNamesSet=new Set(this.getInitialIdentifierNames(this.options.identifiersDictionary)),this.identifiersIterator=this.identifierNamesSet.values()}static incrementIdentifierName(e){let t="",r=!1;for(const o of e)r||o!==o.toUpperCase()?r||o!==o.toLowerCase()?t+=o:(t+=o.toUpperCase(),r=!0):t+=o.toLowerCase();return r?t:null}generate(){if(!this.identifierNamesSet.size)throw new Error("Too many identifiers in the code, add more words to identifiers dictionary");const e=this.identifiersIterator.next();return e.done?(this.identifierNamesSet=new Set(this.getIncrementedIdentifierNames([...this.identifierNamesSet])),this.identifiersIterator=this.identifierNamesSet.values(),this.generate()):e.value}generateWithPrefix(){return`${this.options.identifiersPrefix?`${this.options.identifiersPrefix}_`:""}${this.generate()}`.replace("__","_")}getInitialIdentifierNames(e){const t=e.filter(Boolean).map(e=>e.toLowerCase());return this.arrayUtils.shuffle(t)}getIncrementedIdentifierNames(e){const t=[];for(const r of e){const e=o.incrementIdentifierName(r);e&&t.push(e)}return this.arrayUtils.shuffle(t)}};y=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(1,l.inject(u.ServiceIdentifiers.IOptions)),d(2,l.inject(u.ServiceIdentifiers.IArrayUtils)),c("design:paramtypes",["function"==typeof(n=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==p.IOptions&&p.IOptions)?i:Object,"function"==typeof(a=void 0!==f.IArrayUtils&&f.IArrayUtils)?a:Object])],y),t.DictionaryIdentifierNamesGenerator=y},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=r(2),f=r(3),p=r(49),m=r(37),g=r(30);let y=o=class extends p.AbstractIdentifierNamesGenerator{constructor(e,t){super(e,t),this.randomVariableNameSet=new Set}generate(e){const t=this.randomGenerator.getRandomInteger(1e4,99999999),r=m.NumberUtils.toHex(t),n=g.Utils.hexadecimalPrefix.length+1,i=e?e-n:o.baseIdentifierNameLength,a=r.substr(0,i),s=`_${g.Utils.hexadecimalPrefix}${a}`;return this.randomVariableNameSet.has(s)?this.generate(e):(this.randomVariableNameSet.add(s),s)}generateWithPrefix(e){const t=this.generate(e);return`${this.options.identifiersPrefix}${t}`.replace("__","_")}};y.baseIdentifierNameLength=6,y=o=a([d.injectable(),c(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),c(1,d.inject(l.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(n=void 0!==f.IRandomGenerator&&f.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==u.IOptions&&u.IOptions)?i:Object])],y),t.HexadecimalIdentifierNamesGenerator=y},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=r(2),f=r(3),p=r(49);let m=o=class extends p.AbstractIdentifierNamesGenerator{constructor(e,t){super(e,t),this.previousMangledName=o.initMangledNameCharacter}generate(e){const t=this.generateNewMangledName(this.previousMangledName);return this.previousMangledName=t,t}generateWithPrefix(e){return`${this.options.identifiersPrefix?`${this.options.identifiersPrefix}_`:""}${this.generate(e)}`}isValidIdentifierName(e){return super.isValidIdentifierName(e)&&!o.reservedNamesSet.has(e)}generateNewMangledName(e){let t=(e=>{const t=o.nameSequence,r=t.length,n=e.length,i=e=>"0".repeat(e);let a=n-1;do{const o=e[a],s=t.indexOf(o);if(s!==r-1){return e.substring(0,a)+t[s+1]+i(n-(a+1))}--a}while(a>=0);return`a${i(n)}`})(e);return this.isValidIdentifierName(t)||(t=this.generateNewMangledName(t)),t}};m.initMangledNameCharacter="9",m.nameSequence="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),m.reservedNamesSet=new Set(["byte","case","char","do","else","enum","eval","for","goto","if","in","int","let","long","new","null","this","true","try","var","void","with"]),m=o=a([d.injectable(),c(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),c(1,d.inject(l.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(n=void 0!==f.IRandomGenerator&&f.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==u.IOptions&&u.IOptions)?i:Object])],m),t.MangledIdentifierNamesGenerator=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(16),n=r(0),i=r(1);t.nodeTransformersModule=new n.ContainerModule(e=>{e(i.ServiceIdentifiers.Factory__INodeTransformer).toFactory(o.InversifyContainerFacade.getCacheFactory(i.ServiceIdentifiers.INodeTransformer))})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(16),n=r(0),i=r(1),a=r(38),s=r(63),c=r(21),d=r(163),l=r(164),u=r(165),f=r(167),p=r(169),m=r(170),g=r(171);t.obfuscatingTransformersModule=new n.ContainerModule(e=>{e(i.ServiceIdentifiers.INodeTransformer).to(u.LabeledStatementTransformer).whenTargetNamed(c.NodeTransformer.LabeledStatementTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(f.LiteralTransformer).whenTargetNamed(c.NodeTransformer.LiteralTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(g.ScopeIdentifiersTransformer).whenTargetNamed(c.NodeTransformer.ScopeIdentifiersTransformer),e(i.ServiceIdentifiers.IObfuscatingReplacer).to(l.BooleanLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.BooleanLiteralObfuscatingReplacer),e(i.ServiceIdentifiers.IObfuscatingReplacer).to(p.NumberLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.NumberLiteralObfuscatingReplacer),e(i.ServiceIdentifiers.IObfuscatingReplacer).to(m.StringLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.StringLiteralObfuscatingReplacer),e(i.ServiceIdentifiers.IIdentifierObfuscatingReplacer).to(d.BaseIdentifierObfuscatingReplacer).whenTargetNamed(a.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),e(i.ServiceIdentifiers.Factory__IObfuscatingReplacer).toFactory(o.InversifyContainerFacade.getCacheFactory(i.ServiceIdentifiers.IObfuscatingReplacer)),e(i.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer).toFactory(o.InversifyContainerFacade.getCacheFactory(i.ServiceIdentifiers.IIdentifierObfuscatingReplacer))})},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(5),u=r(2),f=r(39),p=r(8);let m=class extends f.AbstractObfuscatingReplacer{constructor(e,t){super(t),this.blockScopesMap=new Map,this.identifierNamesGenerator=e(t)}replace(e,t){let r=e.name;if(this.blockScopesMap.has(t)){const e=this.blockScopesMap.get(t);e.has(r)&&(r=e.get(r))}return p.NodeFactory.identifierNode(r)}storeGlobalName(e,t){const r=e.name;if(this.isReservedName(r))return;const o=this.identifierNamesGenerator.generateWithPrefix();this.blockScopesMap.has(t)||this.blockScopesMap.set(t,new Map),this.blockScopesMap.get(t).set(r,o)}storeLocalName(e,t){const r=e.name;if(this.isReservedName(r))return;const o=this.identifierNamesGenerator.generate();this.blockScopesMap.has(t)||this.blockScopesMap.set(t,new Map),this.blockScopesMap.get(t).set(r,o)}preserveName(e){this.identifierNamesGenerator.preserveName(e)}isReservedName(e){return!!this.options.reservedNames.length&&this.options.reservedNames.some(t=>null!==new RegExp(t,"g").exec(e))}};m=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==l.TIdentifierNamesGeneratorFactory&&l.TIdentifierNamesGeneratorFactory)?o:Object,"function"==typeof(n=void 0!==u.IOptions&&u.IOptions)?n:Object])],m),t.BaseIdentifierObfuscatingReplacer=m},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(2),u=r(39),f=r(8);let p=o=class extends u.AbstractObfuscatingReplacer{constructor(e){super(e)}static getTrueUnaryExpressionNode(){return f.NodeFactory.unaryExpressionNode("!",o.getFalseUnaryExpressionNode())}static getFalseUnaryExpressionNode(){return f.NodeFactory.unaryExpressionNode("!",f.NodeFactory.arrayExpressionNode())}replace(e){const t=e.value;if("boolean"!=typeof t)throw new Error("`BooleanLiteralObfuscatingReplacer` should accept only literals with `boolean` value");return t?o.getTrueUnaryExpressionNode():o.getFalseUnaryExpressionNode()}};p=o=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(n=void 0!==l.IOptions&&l.IOptions)?n:Object])],p),t.BooleanLiteralObfuscatingReplacer=p},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=d(r(13)),p=r(50),m=r(2),g=r(3),y=r(38),N=r(11),h=r(12),b=r(4),I=r(166);let v=class extends h.AbstractNodeTransformer{constructor(e,t,r){super(t,r),this.identifierObfuscatingReplacer=e(y.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer)}getVisitor(e){switch(e){case N.TransformationStage.Obfuscating:return{enter:(e,t)=>{if(t&&b.NodeGuards.isLabeledStatementNode(e))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){const r=I.NodeLexicalScopeUtils.getLexicalScope(e);return r?(this.storeLabeledStatementName(e,r),this.replaceLabeledStatementName(e,r),e):e}storeLabeledStatementName(e,t){this.identifierObfuscatingReplacer.storeLocalName(e.label,t)}replaceLabeledStatementName(e,t){f.replace(e,{enter:(e,r)=>{if(r&&b.NodeGuards.isLabelIdentifierNode(e,r)){const r=this.identifierObfuscatingReplacer.replace(e,t);e.name=r.name}}})}};v=a([l.injectable(),c(0,l.inject(u.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),c(1,l.inject(u.ServiceIdentifiers.IRandomGenerator)),c(2,l.inject(u.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(o=void 0!==p.TIdentifierObfuscatingReplacerFactory&&p.TIdentifierObfuscatingReplacerFactory)?o:Object,"function"==typeof(n=void 0!==g.IRandomGenerator&&g.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==m.IOptions&&m.IOptions)?i:Object])],v),t.LabeledStatementTransformer=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4);class n{static getLexicalScope(e){return n.getLexicalScopesRecursive(e,1)[0]}static getLexicalScopes(e){return n.getLexicalScopesRecursive(e)}static getLexicalScopesRecursive(e,t=1/0,r=[],i=0){if(r.length>=t)return r;const a=e.parentNode;if(!a)throw new ReferenceError("`parentNode` property of given node is `undefined`");return o.NodeGuards.isNodeWithLexicalScope(e)&&r.push(e),e!==a?n.getLexicalScopesRecursive(a,t,r,++i):r}}t.NodeLexicalScopeUtils=n},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const u=r(0),f=r(1),p=r(168),m=r(29),g=r(2),y=r(3),N=r(64),h=r(63),b=r(11),I=r(12),v=r(8),S=r(4),O=r(44),j=r(15),_=r(6);let C=class extends I.AbstractNodeTransformer{constructor(e,t,r,o,n){super(t,r),this.literalObfuscatingReplacerFactory=e,this.stringArrayStorageAnalyzer=o,this.escapeSequenceEncoder=n}getVisitor(e){switch(e){case b.TransformationStage.Obfuscating:return{enter:(e,t)=>{if(S.NodeGuards.isProgramNode(e)&&this.analyzeNode(e),t&&S.NodeGuards.isLiteralNode(e)&&!j.NodeMetadata.isReplacedLiteral(e))return this.transformNode(e,t)}};case b.TransformationStage.Finalizing:return{enter:(e,t)=>{if(t&&S.NodeGuards.isLiteralNode(e))return this.encodeLiteralNodeToEscapeSequence(e,t)}};default:return null}}analyzeNode(e){this.stringArrayStorageAnalyzer.analyze(e)}transformNode(e,t){if(O.NodeLiteralUtils.isProhibitedLiteralNode(e,t))return e;let r;switch(typeof e.value){case"boolean":r=this.literalObfuscatingReplacerFactory(h.LiteralObfuscatingReplacer.BooleanLiteralObfuscatingReplacer).replace(e);break;case"number":r=this.literalObfuscatingReplacerFactory(h.LiteralObfuscatingReplacer.NumberLiteralObfuscatingReplacer).replace(e);break;case"string":r=this.literalObfuscatingReplacerFactory(h.LiteralObfuscatingReplacer.StringLiteralObfuscatingReplacer).replace(e);break;default:r=e}return _.NodeUtils.parentizeNode(r,t),r}encodeLiteralNodeToEscapeSequence(e,t){return"string"!=typeof e.value?e:v.NodeFactory.literalNode(this.escapeSequenceEncoder.encode(e.value,this.options.unicodeEscapeSequence))}};C=c([u.injectable(),l(0,u.inject(f.ServiceIdentifiers.Factory__IObfuscatingReplacer)),l(1,u.inject(f.ServiceIdentifiers.IRandomGenerator)),l(2,u.inject(f.ServiceIdentifiers.IOptions)),l(3,u.inject(f.ServiceIdentifiers.IStringArrayStorageAnalyzer)),l(4,u.inject(f.ServiceIdentifiers.IEscapeSequenceEncoder)),d("design:paramtypes",["function"==typeof(o=void 0!==p.TLiteralObfuscatingReplacerFactory&&p.TLiteralObfuscatingReplacerFactory)?o:Object,"function"==typeof(n=void 0!==y.IRandomGenerator&&y.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==g.IOptions&&g.IOptions)?i:Object,"function"==typeof(a=void 0!==N.IStringArrayStorageAnalyzer&&N.IStringArrayStorageAnalyzer)?a:Object,"function"==typeof(s=void 0!==m.IEscapeSequenceEncoder&&m.IEscapeSequenceEncoder)?s:Object])],C),t.LiteralTransformer=C},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(0),c=r(1),d=r(2),l=r(39),u=r(8),f=r(37),p=r(30);let m=class extends l.AbstractObfuscatingReplacer{constructor(e){super(e),this.numberLiteralCache=new Map}replace(e){const t=e.value;if("number"!=typeof t)throw new Error("`NumberLiteralObfuscatingReplacer` should accept only literals with `number` value");let r;return this.numberLiteralCache.has(t)?r=this.numberLiteralCache.get(t):(r=f.NumberUtils.isCeil(t)?`${p.Utils.hexadecimalPrefix}${f.NumberUtils.toHex(t)}`:String(t),this.numberLiteralCache.set(t,r)),u.NodeFactory.literalNode(t,r)}};m=n([s.injectable(),a(0,s.inject(c.ServiceIdentifiers.IOptions)),i("design:paramtypes",["function"==typeof(o=void 0!==d.IOptions&&d.IOptions)?o:Object])],m),t.NumberLiteralObfuscatingReplacer=m},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(2),p=r(35),m=r(64),g=r(7),y=r(24),N=r(39),h=r(15),b=r(8),I=r(37),v=r(30);let S=o=class extends N.AbstractObfuscatingReplacer{constructor(e,t,r){super(r),this.nodesCache=new Map,this.stringArrayStorage=e,this.stringArrayStorageAnalyzer=t}static getHexadecimalLiteralNode(e){const t=b.NodeFactory.literalNode(e);return h.NodeMetadata.set(t,{replacedLiteral:!0}),t}static getRc4KeyLiteralNode(e){const t=b.NodeFactory.literalNode(e);return h.NodeMetadata.set(t,{replacedLiteral:!0}),t}initialize(){this.stringArrayStorageCallsWrapperName=this.stringArrayStorage.getStorageCallsWrapperName(),this.options.shuffleStringArray&&this.stringArrayStorage.shuffleStorage(),this.options.rotateStringArray&&this.stringArrayStorage.rotateStorage()}replace(e){const t=e.value;if("string"!=typeof t)throw new Error("`StringLiteralObfuscatingReplacer` should accept only literals with `string` value");const r=this.stringArrayStorageAnalyzer.getItemDataForLiteralNode(e),o=`${t}-${Boolean(r)}`;if(this.nodesCache.has(o)&&this.options.stringArrayEncoding!==y.StringArrayEncoding.Rc4)return this.nodesCache.get(o);const n=r?this.replaceWithStringArrayCallNode(r):this.replaceWithLiteralNode(t);return this.nodesCache.set(o,n),n}replaceWithLiteralNode(e){return b.NodeFactory.literalNode(e)}replaceWithStringArrayCallNode(e){const{index:t,decodeKey:r}=e,n=`${v.Utils.hexadecimalPrefix}${I.NumberUtils.toHex(t)}`,i=[o.getHexadecimalLiteralNode(n)];r&&i.push(o.getRc4KeyLiteralNode(r));const a=b.NodeFactory.identifierNode(this.stringArrayStorageCallsWrapperName);return b.NodeFactory.callExpressionNode(a,i)}};s([g.initializable(),c("design:type",String)],S.prototype,"stringArrayStorageCallsWrapperName",void 0),s([l.postConstruct(),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],S.prototype,"initialize",null),S=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.TStringArrayStorage)),d(1,l.inject(u.ServiceIdentifiers.IStringArrayStorageAnalyzer)),d(2,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==p.IStringArrayStorage&&p.IStringArrayStorage)?n:Object,"function"==typeof(i=void 0!==m.IStringArrayStorageAnalyzer&&m.IStringArrayStorageAnalyzer)?i:Object,"function"==typeof(a=void 0!==f.IOptions&&f.IOptions)?a:Object])],S),t.StringLiteralObfuscatingReplacer=S},function(e,t,r){"use strict";var o,n,i,a,s,c=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const f=r(0),p=r(1),m=u(r(13)),g=r(50),y=r(2),N=r(3),h=r(172),b=r(38),I=r(11),v=r(12),S=r(4),O=r(15);let j=o=class extends v.AbstractNodeTransformer{constructor(e,t,r,o){super(t,r),this.lexicalScopesWithObjectPatternWithoutDeclarationMap=new Map,this.identifierObfuscatingReplacer=e(b.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),this.scopeAnalyzer=o}getVisitor(e){switch(e){case I.TransformationStage.Obfuscating:return{enter:(e,t)=>{if(t&&S.NodeGuards.isProgramNode(e))return this.analyzeNode(e,t),this.transformNode(e,t)}};default:return null}}analyzeNode(e,t){this.scopeAnalyzer.analyze(e)}transformNode(e,t){const r=this.scopeAnalyzer.acquireScope(e);return this.traverseScopeVariables(r),e}traverseScopeVariables(e){const t=e.variableScope,r=S.NodeGuards.isNodeWithBlockLexicalScope(t.block)?t.block:null,n=o.globalScopeNames.includes(t.type);if(r){for(const t of e.variables)if(t.name!==o.argumentsVariableName){if(!this.options.renameGlobals&&n){if(!t.defs.every(e=>"ImportBinding"===e.type||"CatchClause"===e.type))continue}this.transformScopeVariableIdentifiers(t,r,n)}for(const t of e.childScopes)this.traverseScopeVariables(t)}}transformScopeVariableIdentifiers(e,t,r){for(const o of e.identifiers)this.isReplaceableIdentifierNode(o,t,e)&&(this.storeIdentifierName(o,t,r),this.replaceIdentifierName(o,t,e))}storeIdentifierName(e,t,r){r?this.identifierObfuscatingReplacer.storeGlobalName(e,t):this.identifierObfuscatingReplacer.storeLocalName(e,t)}replaceIdentifierName(e,t,r){const o=this.identifierObfuscatingReplacer.replace(e,t);e.name=o.name,r.references.forEach(t=>{t.identifier.name=e.name})}isReplaceableIdentifierNode(e,t,r){const o=e.parentNode;return!(!o||O.NodeMetadata.isIgnoredNode(e)||this.isProhibitedPropertyNode(e,o)||this.isProhibitedClassDeclarationNameIdentifierNode(r,e,o)||this.isProhibitedExportNamedClassDeclarationIdentifierNode(e,o)||this.isProhibitedExportNamedFunctionDeclarationIdentifierNode(e,o)||this.isProhibitedExportNamedVariableDeclarationIdentifierNode(e,o)||this.isProhibitedImportSpecifierNode(e,o)||this.isProhibitedVariableNameUsedInObjectPatternNode(r,e,t)||S.NodeGuards.isLabelIdentifierNode(e,o))}isProhibitedClassDeclarationNameIdentifierNode(e,t,r){return S.NodeGuards.isClassDeclarationNode(e.scope.block)&&S.NodeGuards.isClassDeclarationNode(r)&&r.id===t}isProhibitedExportNamedClassDeclarationIdentifierNode(e,t){return S.NodeGuards.isClassDeclarationNode(t)&&t.id===e&&!!t.parentNode&&S.NodeGuards.isExportNamedDeclarationNode(t.parentNode)}isProhibitedExportNamedFunctionDeclarationIdentifierNode(e,t){return S.NodeGuards.isFunctionDeclarationNode(t)&&t.id===e&&!!t.parentNode&&S.NodeGuards.isExportNamedDeclarationNode(t.parentNode)}isProhibitedExportNamedVariableDeclarationIdentifierNode(e,t){return S.NodeGuards.isVariableDeclaratorNode(t)&&t.id===e&&!!t.parentNode&&S.NodeGuards.isVariableDeclarationNode(t.parentNode)&&!!t.parentNode.parentNode&&S.NodeGuards.isExportNamedDeclarationNode(t.parentNode.parentNode)}isProhibitedImportSpecifierNode(e,t){return S.NodeGuards.isImportSpecifierNode(t)&&t.imported.name===t.local.name}isProhibitedPropertyNode(e,t){return S.NodeGuards.isPropertyNode(t)&&!t.computed&&t.key===e}isProhibitedVariableNameUsedInObjectPatternNode(e,t,r){let o=this.lexicalScopesWithObjectPatternWithoutDeclarationMap.get(r);if(!1===o)return!1;if(!e.defs.some(e=>"var"===e.kind))return!1;let n=!1;return m.traverse(r,{enter:(e,r)=>{if(S.NodeGuards.isObjectPatternNode(e)&&r&&S.NodeGuards.isAssignmentExpressionNode(r)){o=!0;const r=e.properties;for(const e of r)if(!e.computed&&e.shorthand&&S.NodeGuards.isIdentifierNode(e.key)&&t.name===e.key.name)return n=!0,m.VisitorOption.Break}}}),this.lexicalScopesWithObjectPatternWithoutDeclarationMap.set(r,null!=o&&o),n}};j.argumentsVariableName="arguments",j.globalScopeNames=["global","module"],j=o=c([f.injectable(),l(0,f.inject(p.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),l(1,f.inject(p.ServiceIdentifiers.IRandomGenerator)),l(2,f.inject(p.ServiceIdentifiers.IOptions)),l(3,f.inject(p.ServiceIdentifiers.IScopeAnalyzer)),d("design:paramtypes",["function"==typeof(n=void 0!==g.TIdentifierObfuscatingReplacerFactory&&g.TIdentifierObfuscatingReplacerFactory)?n:Object,"function"==typeof(i=void 0!==N.IRandomGenerator&&N.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==y.IOptions&&y.IOptions)?a:Object,"function"==typeof(s=void 0!==h.IScopeAnalyzer&&h.IScopeAnalyzer)?s:Object])],j),t.ScopeIdentifiersTransformer=j},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(1),i=r(174),a=r(181);t.optionsModule=new o.ContainerModule(e=>{e(n.ServiceIdentifiers.IOptions).to(i.Options).inSingletonScope(),e(n.ServiceIdentifiers.IOptionsNormalizer).to(a.OptionsNormalizer).inSingletonScope()})},function(e,t,r){"use strict";var o,n,i,a,s,c,d,l=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},u=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},f=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const p=r(28),m=r(0),g=r(1),y=r(65),N=r(175),h=r(176),b=r(177),I=r(31),v=r(20),S=r(32),O=r(24),j=r(40),_=r(178),C=r(179);let R=o=class{constructor(e,t){Object.assign(this,j.DEFAULT_PRESET,e);const r=y.validateSync(this,o.validatorOptions);if(r.length)throw new ReferenceError(`Validation failed. errors:\n${_.ValidationErrorsFormatter.format(r)}`);Object.assign(this,t.normalize(this))}};R.validatorOptions={validationError:{target:!1}},l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"compact",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"controlFlowFlattening",void 0),l([y.IsNumber(),y.Min(0),y.Max(1),u("design:type",Number)],R.prototype,"controlFlowFlatteningThreshold",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"deadCodeInjection",void 0),l([y.IsNumber(),u("design:type",Number)],R.prototype,"deadCodeInjectionThreshold",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"debugProtection",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"debugProtectionInterval",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"disableConsoleOutput",void 0),l([y.IsArray(),y.ArrayUnique(),y.IsString({each:!0}),C.IsAllowedForObfuscationTargets([v.ObfuscationTarget.Browser,v.ObfuscationTarget.BrowserNoEval]),u("design:type",Array)],R.prototype,"domainLock",void 0),l([y.IsIn([I.IdentifierNamesGenerator.DictionaryIdentifierNamesGenerator,I.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,I.IdentifierNamesGenerator.MangledIdentifierNamesGenerator]),u("design:type","function"==typeof(n=void 0!==p.TypeFromEnum&&p.TypeFromEnum)?n:Object)],R.prototype,"identifierNamesGenerator",void 0),l([y.IsString(),u("design:type",String)],R.prototype,"identifiersPrefix",void 0),l([y.IsArray(),y.ArrayUnique(),y.IsString({each:!0}),y.ValidateIf(e=>e.identifierNamesGenerator===I.IdentifierNamesGenerator.DictionaryIdentifierNamesGenerator),y.ArrayNotEmpty(),u("design:type",Array)],R.prototype,"identifiersDictionary",void 0),l([y.IsString(),u("design:type",String)],R.prototype,"inputFileName",void 0),l([y.IsString(),u("design:type",String)],R.prototype,"inputFilePath",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"log",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"renameGlobals",void 0),l([y.IsArray(),y.ArrayUnique(),y.IsString({each:!0}),u("design:type",Array)],R.prototype,"reservedNames",void 0),l([y.IsArray(),y.ArrayUnique(),y.IsString({each:!0}),u("design:type",Array)],R.prototype,"reservedStrings",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"rotateStringArray",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"selfDefending",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"shuffleStringArray",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"sourceMap",void 0),l([y.IsString(),y.ValidateIf(e=>Boolean(e.sourceMapBaseUrl)),y.IsUrl({require_protocol:!0,require_tld:!1,require_valid_protocol:!0}),u("design:type",String)],R.prototype,"sourceMapBaseUrl",void 0),l([y.IsString(),u("design:type",String)],R.prototype,"sourceMapFileName",void 0),l([y.IsIn([S.SourceMapMode.Inline,S.SourceMapMode.Separate]),u("design:type","function"==typeof(i=void 0!==p.TypeFromEnum&&p.TypeFromEnum)?i:Object)],R.prototype,"sourceMapMode",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"splitStrings",void 0),l([y.IsNumber(),y.ValidateIf(e=>Boolean(e.splitStrings)),y.Min(1),u("design:type",Number)],R.prototype,"splitStringsChunkLength",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"stringArray",void 0),l([y.IsIn([!0,!1,O.StringArrayEncoding.Base64,O.StringArrayEncoding.Rc4]),u("design:type","function"==typeof(a=void 0!==h.TStringArrayEncoding&&h.TStringArrayEncoding)?a:Object)],R.prototype,"stringArrayEncoding",void 0),l([y.IsNumber(),y.Min(0),y.Max(1),u("design:type",Number)],R.prototype,"stringArrayThreshold",void 0),l([y.IsIn([v.ObfuscationTarget.Browser,v.ObfuscationTarget.BrowserNoEval,v.ObfuscationTarget.Node]),u("design:type","function"==typeof(s=void 0!==p.TypeFromEnum&&p.TypeFromEnum)?s:Object)],R.prototype,"target",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"transformObjectKeys",void 0),l([y.IsBoolean(),u("design:type",Boolean)],R.prototype,"unicodeEscapeSequence",void 0),R=o=l([m.injectable(),f(0,m.inject(g.ServiceIdentifiers.TInputOptions)),f(1,m.inject(g.ServiceIdentifiers.IOptionsNormalizer)),u("design:paramtypes",["function"==typeof(c=void 0!==N.TInputOptions&&N.TInputOptions)?c:Object,"function"==typeof(d=void 0!==b.IOptionsNormalizer&&b.IOptionsNormalizer)?d:Object])],R),t.Options=R},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o{static format(e){return e.reduce((e,t)=>[...e,o.formatWithNestedConstraints(t)],[]).join("\n")}static formatWithNestedConstraints(e){const t=e.constraints;return`${`\`${e.property}\` errors:\n`}${Object.keys(t).map(e=>` - ${t[e]}\n`).join()}`}}t.ValidationErrorsFormatter=o},function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(65),i=o(r(180)),a=r(41),s=r(40);t.IsAllowedForObfuscationTargets=function(e,t){return(r,o)=>{n.registerDecorator({propertyName:o,constraints:[e],name:"IsAllowedForObfuscationTargets",options:t,target:r.constructor,validator:{validate(t,r){const n=r.object,a=s.DEFAULT_PRESET[o];return i.default(t,a)||e.includes(n.target)},defaultMessage:t=>`This option allowed only for obfuscation targets: ${e.join(`${a.StringSeparator.Comma} `)}`}})}}},function(e,t){e.exports=require("fast-deep-equal")},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0});const i=r(0),a=r(182),s=r(183),c=r(184),d=r(185),l=r(186),u=r(187),f=r(188),p=r(189),m=r(190),g=r(191),y=r(192),N=r(193),h=r(194);let b=o=class{normalize(e){let t=Object.assign({},e);for(const e of o.normalizerRules)t=e(t);return t}};b.normalizerRules=[a.ControlFlowFlatteningThresholdRule,s.DeadCodeInjectionRule,c.DeadCodeInjectionThresholdRule,d.DomainLockRule,l.InputFileNameRule,u.SeedRule,f.SelfDefendingRule,p.SourceMapBaseUrlRule,m.SourceMapFileNameRule,g.SplitStringsChunkLengthRule,y.StringArrayRule,N.StringArrayEncodingRule,h.StringArrayThresholdRule],b=o=n([i.injectable()],b),t.OptionsNormalizer=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ControlFlowFlatteningThresholdRule=e=>(0===e.controlFlowFlatteningThreshold&&(e=Object.assign(Object.assign({},e),{controlFlowFlattening:!1,controlFlowFlatteningThreshold:0})),e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(40);t.DeadCodeInjectionRule=e=>(e.deadCodeInjection&&((e=Object.assign(Object.assign({},e),{deadCodeInjection:!0,stringArray:!0})).stringArrayThreshold||(e=Object.assign(Object.assign({},e),{stringArray:!0,stringArrayThreshold:o.DEFAULT_PRESET.stringArrayThreshold}))),e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeadCodeInjectionThresholdRule=e=>(0===e.deadCodeInjectionThreshold&&(e=Object.assign(Object.assign({},e),{deadCodeInjection:!1,deadCodeInjectionThreshold:0})),e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(30);t.DomainLockRule=e=>{if(e.domainLock.length){const t=[];for(const r of e.domainLock)t.push(o.Utils.extractDomainFrom(r));e=Object.assign(Object.assign({},e),{domainLock:t})}return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(41);t.InputFileNameRule=e=>{let{inputFileName:t}=e;return t&&(t=t.replace(/^\/+/,"").split(o.StringSeparator.Dot).slice(0,-1).join(o.StringSeparator.Dot)||t,e=Object.assign(Object.assign({},e),{inputFileName:`${t}.js`})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeedRule=e=>{if(e.seed)return Object.assign(Object.assign({},e),{seed:e.seed});return Object.assign(Object.assign({},e),{seed:(t=0,r=999999999,Math.floor(Math.random()*(r-t+1)+t))});var t,r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingRule=e=>(e.selfDefending&&(e=Object.assign(Object.assign({},e),{compact:!0,selfDefending:!0})),e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceMapBaseUrlRule=e=>{const{sourceMapBaseUrl:t}=e;return e.sourceMapFileName?(t&&!t.endsWith("/")&&(e=Object.assign(Object.assign({},e),{sourceMapBaseUrl:`${t}/`})),e):e=Object.assign(Object.assign({},e),{sourceMapBaseUrl:""})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(41);t.SourceMapFileNameRule=e=>{let{sourceMapFileName:t}=e;if(t){t=t.replace(/^\/+/,"").replace(/(?:\.js)?(?:\.map)?$/,"");let r=t.split(o.StringSeparator.Dot);const n=r.length,i=r[n-1];n>1&&i.length<=3&&(r=r.slice(0,-1)),t=r.join(o.StringSeparator.Dot),e=Object.assign(Object.assign({},e),{sourceMapFileName:`${t}.js.map`})}return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitStringsChunkLengthRule=e=>e=0===e.splitStringsChunkLength?Object.assign(Object.assign({},e),{splitStrings:!1,splitStringsChunkLength:0}):Object.assign(Object.assign({},e),{splitStringsChunkLength:Math.floor(e.splitStringsChunkLength)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRule=e=>(e.stringArray||(e=Object.assign(Object.assign({},e),{rotateStringArray:!1,shuffleStringArray:!1,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0})),e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(24);t.StringArrayEncodingRule=e=>(!0===e.stringArrayEncoding&&(e=Object.assign(Object.assign({},e),{stringArrayEncoding:o.StringArrayEncoding.Base64})),e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayThresholdRule=e=>(0===e.stringArrayThreshold&&(e=Object.assign(Object.assign({},e),{rotateStringArray:!1,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0})),e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(16),n=r(0),i=r(1),a=r(21),s=r(66),c=r(196),d=r(197),l=r(67),u=r(198),f=r(202),p=r(204),m=r(205),g=r(207),y=r(208),N=r(209);t.preparingTransformersModule=new n.ContainerModule(e=>{e(i.ServiceIdentifiers.INodeTransformer).to(d.CommentsTransformer).whenTargetNamed(a.NodeTransformer.CommentsTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(u.CustomNodesTransformer).whenTargetNamed(a.NodeTransformer.CustomNodesTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(f.EvalCallExpressionTransformer).whenTargetNamed(a.NodeTransformer.EvalCallExpressionTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(p.MetadataTransformer).whenTargetNamed(a.NodeTransformer.MetadataTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(m.ObfuscatingGuardsTransformer).whenTargetNamed(a.NodeTransformer.ObfuscatingGuardsTransformer),e(i.ServiceIdentifiers.INodeTransformer).to(g.ParentificationTransformer).whenTargetNamed(a.NodeTransformer.ParentificationTransformer),e(i.ServiceIdentifiers.INodeGuard).to(c.BlackListObfuscatingGuard).inSingletonScope().whenTargetNamed(s.ObfuscatingGuard.BlackListObfuscatingGuard),e(i.ServiceIdentifiers.INodeGuard).to(l.ConditionalCommentObfuscatingGuard).inSingletonScope().whenTargetNamed(s.ObfuscatingGuard.ConditionalCommentObfuscatingGuard),e(i.ServiceIdentifiers.INodeGuard).to(y.ReservedStringObfuscatingGuard).inSingletonScope().whenTargetNamed(s.ObfuscatingGuard.ReservedStringObfuscatingGuard),e(i.ServiceIdentifiers.Factory__INodeGuard).toFactory(o.InversifyContainerFacade.getCacheFactory(i.ServiceIdentifiers.INodeGuard)),e(i.ServiceIdentifiers.INodeTransformer).to(N.VariablePreserveTransformer).whenTargetNamed(a.NodeTransformer.VariablePreserveTransformer)})},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});const a=r(0),s=r(4);let c=o=class{constructor(){this.blackListGuardsLength=o.blackListGuards.length}check(e){for(let t=0;t<this.blackListGuardsLength;t++)if(o.blackListGuards[t](e))return!1;return!0}};c.blackListGuards=[s.NodeGuards.isUseStrictOperator],c=o=n([a.injectable(),i("design:paramtypes",[])],c),t.BlackListObfuscatingGuard=c},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=d(r(13)),p=r(2),m=r(3),g=r(11),y=r(12),N=r(4),h=r(67);let b=o=class extends y.AbstractNodeTransformer{constructor(e,t){super(e,t)}getVisitor(e){switch(e){case g.TransformationStage.Initializing:return{leave:e=>{if(N.NodeGuards.isProgramNode(e))return this.transformNode(e)}};default:return null}}transformNode(e){if(!e.comments||!e.comments.length)return e;const t=this.transformComments(e.comments);return 0===t.length?e:e.body.length?(f.traverse(e,{enter:r=>{if(r===e)return;const o=t.findIndex(e=>e.range&&r.range&&e.range[0]<r.range[0]);-1!==o&&(r.leadingComments=t.splice(o,t.length-o).reverse())}}),t.length>0&&(e.trailingComments=t.reverse()),e):(e.leadingComments=t,e)}transformComments(e){return e.filter(e=>o.preservedWords.some(t=>e.value.includes(t))||h.ConditionalCommentObfuscatingGuard.isConditionalComment(e)).reverse()}};b.preservedWords=["@license","@preserve"],b=o=a([l.injectable(),c(0,l.inject(u.ServiceIdentifiers.IRandomGenerator)),c(1,l.inject(u.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(n=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==p.IOptions&&p.IOptions)?i:Object])],b),t.CommentsTransformer=b},function(e,t,r){"use strict";var o,n,i,a,s,c,d=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},l=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const f=r(0),p=r(1),m=r(199),g=r(200),y=r(2),N=r(3),h=r(201),b=r(62),I=r(22),v=r(11),S=r(12),O=r(4);let j=class extends S.AbstractNodeTransformer{constructor(e,t,r,o,n,i){super(n,i),this.callsGraphData=[],this.callsGraphAnalyzer=e,this.prevailingKindOfVariablesAnalyzer=t,this.obfuscationEventEmitter=r,this.customNodeGroupStorage=o}getVisitor(e){switch(e){case v.TransformationStage.Preparing:return{leave:(e,t)=>{if(O.NodeGuards.isProgramNode(e))return this.analyzeNode(e,t),this.appendCustomNodesBeforeObfuscation(e,t),this.transformNode(e,t)}};case v.TransformationStage.Finalizing:return{leave:(e,t)=>{O.NodeGuards.isProgramNode(e)&&this.appendCustomNodesAfterObfuscation(e,t)}};default:return null}}analyzeNode(e,t){this.callsGraphData=this.callsGraphAnalyzer.analyze(e),this.prevailingKindOfVariablesAnalyzer.analyze(e)}transformNode(e,t){return e}appendCustomNodesBeforeObfuscation(e,t){this.customNodeGroupStorage.getStorage().forEach(e=>{e.initialize(),this.obfuscationEventEmitter.once(e.getAppendEvent(),e.appendCustomNodes.bind(e))}),this.obfuscationEventEmitter.emit(I.ObfuscationEvent.BeforeObfuscation,e,this.callsGraphData)}appendCustomNodesAfterObfuscation(e,t){this.obfuscationEventEmitter.emit(I.ObfuscationEvent.AfterObfuscation,e,this.callsGraphData)}};j=d([f.injectable(),u(0,f.inject(p.ServiceIdentifiers.ICallsGraphAnalyzer)),u(1,f.inject(p.ServiceIdentifiers.IPrevailingKindOfVariablesAnalyzer)),u(2,f.inject(p.ServiceIdentifiers.IObfuscationEventEmitter)),u(3,f.inject(p.ServiceIdentifiers.TCustomNodeGroupStorage)),u(4,f.inject(p.ServiceIdentifiers.IRandomGenerator)),u(5,f.inject(p.ServiceIdentifiers.IOptions)),l("design:paramtypes",["function"==typeof(o=void 0!==h.ICallsGraphAnalyzer&&h.ICallsGraphAnalyzer)?o:Object,"function"==typeof(n=void 0!==b.IPrevailingKindOfVariablesAnalyzer&&b.IPrevailingKindOfVariablesAnalyzer)?n:Object,"function"==typeof(i=void 0!==g.IObfuscationEventEmitter&&g.IObfuscationEventEmitter)?i:Object,"function"==typeof(a=void 0!==m.TCustomNodeGroupStorage&&m.TCustomNodeGroupStorage)?a:Object,"function"==typeof(s=void 0!==N.IRandomGenerator&&N.IRandomGenerator)?s:Object,"function"==typeof(c=void 0!==y.IOptions&&y.IOptions)?c:Object])],j),t.CustomNodesTransformer=j},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=d(r(203)),p=r(2),m=r(3),g=r(11),y=r(12),N=r(8),h=r(4),b=r(6);let I=o=class extends y.AbstractNodeTransformer{constructor(e,t){super(e,t),this.evalRootAstHostNodeSet=new Set}static extractEvalStringFromCallExpressionArgument(e){return h.NodeGuards.isLiteralNode(e)?o.extractEvalStringFromLiteralNode(e):h.NodeGuards.isTemplateLiteralNode(e)?o.extractEvalStringFromTemplateLiteralNode(e):null}static extractEvalStringFromLiteralNode(e){return"string"==typeof e.value?e.value:null}static extractEvalStringFromTemplateLiteralNode(e){const t=e.quasis;return 1!==t.length||e.expressions.length?null:t[0].value.cooked}getVisitor(e){switch(e){case g.TransformationStage.Preparing:return{enter:(e,t)=>{if(t&&h.NodeGuards.isCallExpressionNode(e)&&h.NodeGuards.isIdentifierNode(e.callee)&&"eval"===e.callee.name)return this.transformNode(e,t)}};case g.TransformationStage.Finalizing:return this.evalRootAstHostNodeSet.size?{leave:(e,t)=>{if(t&&this.isEvalRootAstHostNode(e))return this.restoreNode(e,t)}}:null;default:return null}}transformNode(e,t){const r=e.arguments[0];if(!r)return e;const n=o.extractEvalStringFromCallExpressionArgument(r);if(!n)return e;let i;try{i=b.NodeUtils.convertCodeToStructure(n)}catch(t){return e}const a=N.NodeFactory.functionExpressionNode([],N.NodeFactory.blockStatementNode(i));return this.evalRootAstHostNodeSet.add(a),a}restoreNode(e,t){const r=e.body.body,o=b.NodeUtils.convertStructureToCode(r);return N.NodeFactory.callExpressionNode(N.NodeFactory.identifierNode("eval"),[N.NodeFactory.literalNode(f.default(o))])}isEvalRootAstHostNode(e){return h.NodeGuards.isFunctionExpressionNode(e)&&this.evalRootAstHostNodeSet.has(e)}};I=o=a([l.injectable(),c(0,l.inject(u.ServiceIdentifiers.IRandomGenerator)),c(1,l.inject(u.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(n=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==p.IOptions&&p.IOptions)?i:Object])],I),t.EvalCallExpressionTransformer=I},function(e,t){e.exports=require("js-string-escape")},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(2),u=r(3),f=r(11),p=r(12),m=r(4),g=r(15);let y=class extends p.AbstractNodeTransformer{constructor(e,t){super(e,t)}getVisitor(e){switch(e){case f.TransformationStage.Preparing:return{enter:(e,t)=>this.transformNode(e,t)};default:return null}}transformNode(e,t){return g.NodeMetadata.set(e,{ignoredNode:!1}),m.NodeGuards.isLiteralNode(e)&&g.NodeMetadata.set(e,{replacedLiteral:!1}),e}};y=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.IRandomGenerator)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==u.IRandomGenerator&&u.IRandomGenerator)?o:Object,"function"==typeof(n=void 0!==l.IOptions&&l.IOptions)?n:Object])],y),t.MetadataTransformer=y},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(206),p=r(2),m=r(3),g=r(66),y=r(11),N=r(12),h=r(15);let b=o=class extends N.AbstractNodeTransformer{constructor(e,t,r){super(t,r),this.obfuscatingGuards=o.obfuscatingGuardsList.map(e)}getVisitor(e){switch(e){case y.TransformationStage.Preparing:return{enter:(e,t)=>this.transformNode(e,t)};default:return null}}transformNode(e,t){const r=this.obfuscatingGuards.every(t=>t.check(e));return h.NodeMetadata.set(e,{ignoredNode:!r}),e}};b.obfuscatingGuardsList=[g.ObfuscatingGuard.BlackListObfuscatingGuard,g.ObfuscatingGuard.ConditionalCommentObfuscatingGuard,g.ObfuscatingGuard.ReservedStringObfuscatingGuard],b=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__INodeGuard)),d(1,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(2,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==f.TObfuscatingGuardFactory&&f.TObfuscatingGuardFactory)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],b),t.ObfuscatingGuardsTransformer=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(2),u=r(3),f=r(11),p=r(12),m=r(6);let g=class extends p.AbstractNodeTransformer{constructor(e,t){super(e,t)}getVisitor(e){switch(e){case f.TransformationStage.Preparing:return{enter:(e,t)=>this.transformNode(e,t)};default:return null}}transformNode(e,t){return m.NodeUtils.parentizeNode(e,t)}};g=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.IRandomGenerator)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==u.IRandomGenerator&&u.IRandomGenerator)?o:Object,"function"==typeof(n=void 0!==l.IOptions&&l.IOptions)?n:Object])],g),t.ParentificationTransformer=g},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(0),c=r(2),d=r(1),l=r(4);let u=class{constructor(e){this.options=e}check(e){return!this.options.reservedStrings.length||!l.NodeGuards.isLiteralNode(e)||"string"!=typeof e.value||!this.isReservedString(e.value)}isReservedString(e){return this.options.reservedStrings.some(t=>null!==new RegExp(t,"g").exec(e))}};u=n([s.injectable(),a(0,s.inject(d.ServiceIdentifiers.IOptions)),i("design:paramtypes",["function"==typeof(o=void 0!==c.IOptions&&c.IOptions)?o:Object])],u),t.ReservedStringObfuscatingGuard=u},function(e,t,r){"use strict";var o,n,i,a=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(50),u=r(2),f=r(3),p=r(38),m=r(1),g=r(11),y=r(12),N=r(4);let h=class extends y.AbstractNodeTransformer{constructor(e,t,r){super(t,r),this.identifierObfuscatingReplacer=e(p.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer)}getVisitor(e){switch(e){case g.TransformationStage.Preparing:return{enter:(e,t)=>{if(N.NodeGuards.isIdentifierNode(e)&&t&&(N.NodeGuards.parentNodeIsPropertyNode(e,t)||N.NodeGuards.parentNodeIsMemberExpressionNode(e,t)||N.NodeGuards.parentNodeIsMethodDefinitionNode(e,t)||N.NodeGuards.isLabelIdentifierNode(e,t)))return this.transformNode(e,t)}};default:return null}}transformNode(e,t){return this.identifierObfuscatingReplacer.preserveName(e.name),e}};h=a([d.injectable(),c(0,d.inject(m.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),c(1,d.inject(m.ServiceIdentifiers.IRandomGenerator)),c(2,d.inject(m.ServiceIdentifiers.IOptions)),s("design:paramtypes",["function"==typeof(o=void 0!==l.TIdentifierObfuscatingReplacerFactory&&l.TIdentifierObfuscatingReplacerFactory)?o:Object,"function"==typeof(n=void 0!==f.IRandomGenerator&&f.IRandomGenerator)?n:Object,"function"==typeof(i=void 0!==u.IOptions&&u.IOptions)?i:Object])],h),t.VariablePreserveTransformer=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(1),i=r(211),a=r(212),s=r(214);t.storagesModule=new o.ContainerModule(e=>{e(n.ServiceIdentifiers.TCustomNodeGroupStorage).to(a.CustomNodeGroupStorage).inSingletonScope(),e(n.ServiceIdentifiers.TStringArrayStorage).to(s.StringArrayStorage).inSingletonScope(),e(n.ServiceIdentifiers.Newable__TControlFlowStorage).toConstructor(i.ControlFlowStorage),e(n.ServiceIdentifiers.Factory__TControlFlowStorage).toFactory(e=>()=>{const t=new(e.container.get(n.ServiceIdentifiers.Newable__TControlFlowStorage))(e.container.get(n.ServiceIdentifiers.IRandomGenerator),e.container.get(n.ServiceIdentifiers.IOptions));return t.initialize(),t})})},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(2),u=r(3),f=r(51);let p=class extends f.MapStorage{constructor(e,t){super(e,t)}};p=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.IRandomGenerator)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==u.IRandomGenerator&&u.IRandomGenerator)?o:Object,"function"==typeof(n=void 0!==l.IOptions&&l.IOptions)?n:Object])],p),t.ControlFlowStorage=p},function(e,t,r){"use strict";var o,n,i,a,s=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(0),u=r(1),f=r(213),p=r(2),m=r(3),g=r(61),y=r(51);let N=o=class extends y.MapStorage{constructor(e,t,r){super(t,r),this.customNodeGroupFactory=e}initialize(){super.initialize(),o.customNodeGroupsList.forEach(e=>{const t=this.customNodeGroupFactory(e);t&&this.storage.set(e,t)})}};N.customNodeGroupsList=[g.CustomNodeGroup.ConsoleOutputCustomNodeGroup,g.CustomNodeGroup.DebugProtectionCustomNodeGroup,g.CustomNodeGroup.DomainLockCustomNodeGroup,g.CustomNodeGroup.SelfDefendingCustomNodeGroup,g.CustomNodeGroup.StringArrayCustomNodeGroup],s([l.postConstruct(),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],N.prototype,"initialize",null),N=o=s([l.injectable(),d(0,l.inject(u.ServiceIdentifiers.Factory__ICustomNodeGroup)),d(1,l.inject(u.ServiceIdentifiers.IRandomGenerator)),d(2,l.inject(u.ServiceIdentifiers.IOptions)),c("design:paramtypes",["function"==typeof(n=void 0!==f.TCustomNodeGroupFactory&&f.TCustomNodeGroupFactory)?n:Object,"function"==typeof(i=void 0!==m.IRandomGenerator&&m.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==p.IOptions&&p.IOptions)?a:Object])],N),t.CustomNodeGroupStorage=N},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a,s,c,d,l=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},u=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},f=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const p=r(0),m=r(1),g=r(5),y=r(34),N=r(48),h=r(29),b=r(2),I=r(3),v=r(7),S=r(24),O=r(51);let j=o=class extends O.MapStorage{constructor(e,t,r,n,i,a){super(r,n),this.rotationAmount=0,this.identifierNamesGenerator=e(n),this.arrayUtils=t,this.cryptUtils=i,this.escapeSequenceEncoder=a,this.rc4Keys=this.randomGenerator.getRandomGenerator().n(()=>this.randomGenerator.getRandomGenerator().string({length:o.rc4KeyLength}),o.rc4KeysCount)}initialize(){super.initialize();const e=this.identifierNamesGenerator.generate(o.stringArrayNameLength),t=this.identifierNamesGenerator.generate(o.stringArrayNameLength);this.stringArrayStorageName=`${this.options.identifiersPrefix}${e}`,this.stringArrayStorageCallsWrapperName=`${this.options.identifiersPrefix}${t}`,this.rotationAmount=this.options.rotateStringArray?this.randomGenerator.getRandomInteger(o.minimumRotationAmount,o.maximumRotationAmount):0}get(e){return this.getOrSetIfDoesNotExist(e)}getRotationAmount(){return this.rotationAmount}getStorageId(){return this.stringArrayStorageName}getStorageName(){return this.getStorageId()}getStorageCallsWrapperName(){return this.stringArrayStorageCallsWrapperName}rotateStorage(){this.getLength()&&(this.storage=new Map(this.arrayUtils.rotate(Array.from(this.storage.entries()),this.rotationAmount)))}shuffleStorage(){this.storage=new Map(this.arrayUtils.shuffle(Array.from(this.storage.entries())).map(([e,t],r)=>(t.index=r,[e,t])).sort(([,e],[,t])=>e.index-t.index))}toString(){return Array.from(this.storage.values()).map(e=>`'${this.escapeSequenceEncoder.encode(e.encodedValue,this.options.unicodeEscapeSequence)}'`).toString()}getOrSetIfDoesNotExist(e){const{encodedValue:t,decodeKey:r}=this.getEncodedValue(e),o=this.storage.get(t);if(o)return o;const n={encodedValue:t,decodeKey:r,value:e,index:this.getLength()};return this.storage.set(t,n),n}getEncodedValue(e){switch(this.options.stringArrayEncoding){case S.StringArrayEncoding.Rc4:{const t=this.randomGenerator.getRandomGenerator().pickone(this.rc4Keys);return{encodedValue:this.cryptUtils.btoa(this.cryptUtils.rc4(e,t)),decodeKey:t}}case S.StringArrayEncoding.Base64:{const t=null;return{encodedValue:this.cryptUtils.btoa(e),decodeKey:t}}default:return{encodedValue:e,decodeKey:null}}}};j.minimumRotationAmount=100,j.maximumRotationAmount=500,j.rc4KeyLength=4,j.rc4KeysCount=50,j.stringArrayNameLength=7,l([v.initializable(),u("design:type",String)],j.prototype,"stringArrayStorageName",void 0),l([v.initializable(),u("design:type",String)],j.prototype,"stringArrayStorageCallsWrapperName",void 0),l([p.postConstruct(),u("design:type",Function),u("design:paramtypes",[]),u("design:returntype",void 0)],j.prototype,"initialize",null),j=o=l([p.injectable(),f(0,p.inject(m.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),f(1,p.inject(m.ServiceIdentifiers.IArrayUtils)),f(2,p.inject(m.ServiceIdentifiers.IRandomGenerator)),f(3,p.inject(m.ServiceIdentifiers.IOptions)),f(4,p.inject(m.ServiceIdentifiers.ICryptUtils)),f(5,p.inject(m.ServiceIdentifiers.IEscapeSequenceEncoder)),u("design:paramtypes",["function"==typeof(n=void 0!==g.TIdentifierNamesGeneratorFactory&&g.TIdentifierNamesGeneratorFactory)?n:Object,"function"==typeof(i=void 0!==y.IArrayUtils&&y.IArrayUtils)?i:Object,"function"==typeof(a=void 0!==I.IRandomGenerator&&I.IRandomGenerator)?a:Object,"function"==typeof(s=void 0!==b.IOptions&&b.IOptions)?s:Object,"function"==typeof(c=void 0!==N.ICryptUtils&&N.ICryptUtils)?c:Object,"function"==typeof(d=void 0!==h.IEscapeSequenceEncoder&&h.IEscapeSequenceEncoder)?d:Object])],j),t.StringArrayStorage=j},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(1),i=r(216),a=r(217),s=r(221),c=r(222),d=r(223),l=r(68);t.utilsModule=new o.ContainerModule(e=>{e(n.ServiceIdentifiers.IArrayUtils).to(i.ArrayUtils).inSingletonScope(),e(n.ServiceIdentifiers.IRandomGenerator).to(l.RandomGenerator).inSingletonScope(),e(n.ServiceIdentifiers.ICryptUtils).to(a.CryptUtils).inSingletonScope(),e(n.ServiceIdentifiers.IEscapeSequenceEncoder).to(s.EscapeSequenceEncoder).inSingletonScope(),e(n.ServiceIdentifiers.ILevelledTopologicalSorter).to(c.LevelledTopologicalSorter),e(n.ServiceIdentifiers.INodeTransformerNamesGroupsBuilder).to(d.NodeTransformerNamesGroupsBuilder).inSingletonScope()})},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(0),c=r(1),d=r(3);let l=class{constructor(e){this.randomGenerator=e}createWithRange(e){const t=[];for(let r=0;r<e;r++)t.push(r);return t}findMostOccurringElement(e){var t;if(!e.length)return null;const r={};let o=e[0],n=1;for(const i of e){const e=(null!==(t=r[i])&&void 0!==t?t:0)+1;e>n&&(o=i,n=e),r[i]=e}return o}rotate(e,t){if(!e.length)throw new ReferenceError("Cannot rotate empty array.");if(t<=0)return e;const r=e;let o;for(;t--;)o=r.pop(),o&&r.unshift(o);return r}shuffle(e){const t=[...e];for(let e=t.length;e;e--){const r=Math.floor(this.randomGenerator.getMathRandom()*e);[t[e-1],t[r]]=[t[r],t[e-1]]}return t}};l=n([s.injectable(),a(0,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i("design:paramtypes",["function"==typeof(o=void 0!==d.IRandomGenerator&&d.IRandomGenerator)?o:Object])],l),t.ArrayUtils=l},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(0),c=r(1),d=r(3),l=r(68),u=r(30);let f=class{constructor(e){this.randomGenerator=e}btoa(e){let t="";e=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(`${u.Utils.hexadecimalPrefix}${t}`)));for(let r,o,n=0,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.charAt(0|n)||(i="=",n%1);t+=i.charAt(63&r>>8-n%1*8)){if(o=e.charCodeAt(n+=.75),o>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|o}return t}hideString(e,t){let r=this.randomGenerator.getRandomGenerator().string({length:t,pool:l.RandomGenerator.randomGeneratorPool}).replace(new RegExp(`[${o=e,o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}]`,"g"),"");var o;const n=r.split("");return this.randomGenerator.getRandomGenerator().shuffle(n),r=n.join(""),[((e,t)=>{let r=-1,o=-1,n="";for(;r<e.length||o<t.length;)this.randomGenerator.getMathRandom()<.5&&o<t.length?n+=t.charAt(++o):n+=e.charAt(++r);return n})(e,r),r]}rc4(e,t){let r,o=[],n=0,i="";for(var a=0;a<256;a++)o[a]=a;for(a=0;a<256;a++)n=(n+o[a]+t.charCodeAt(a%t.length))%256,r=o[a],o[a]=o[n],o[n]=r;a=0,n=0;for(let t=0;t<e.length;t++)n=(n+o[a=(a+1)%256])%256,r=o[a],o[a]=o[n],o[n]=r,i+=String.fromCharCode(e.charCodeAt(t)^o[(o[a]+o[n])%256]);return i}};f=n([s.injectable(),a(0,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i("design:paramtypes",["function"==typeof(o=void 0!==d.IRandomGenerator&&d.IRandomGenerator)?o:Object])],f),t.CryptUtils=f},function(e,t){e.exports=require("md5")},function(e,t){e.exports=require("chance")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0});let n=class{constructor(){this.stringsCache=new Map}encode(e,t){const r=`${e}-${String(t)}`;if(this.stringsCache.has(r))return this.stringsCache.get(r);const o=new RegExp("[\\s\\S]","g"),n=new RegExp("['\"\\\\\\s]"),i=new RegExp("[\\x00-\\x7F]");let a,s;const c=e.replace(o,e=>t||n.exec(e)?(i.exec(e)?(a="\\x",s="00"):(a="\\u",s="0000"),`${a}${(s+e.charCodeAt(0).toString(16)).slice(-s.length)}`):e);return this.stringsCache.set(r,c),this.stringsCache.set(`${c}-${String(t)}`,c),c}};n=o([r(0).injectable()],n),t.EscapeSequenceEncoder=n},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0});let n=class{constructor(){this.graph=new Map}add(e,t=null){return null!==t?this.link(e,t):this.register(e)}sort(){const e=Array.from(this.graph.keys()),t=[],r={};for(const o of e)void 0===r[o]&&this.visit(t,r,o);return t}sortByGroups(){this.sort();const e=[];for(;this.hasNodes();){const t=this.findRootNodes();e.push(t);for(const e of t)this.delete(e)}return e}delete(e){if(this.getPrecedents(e).length)throw new Error(`Unable to remove non-root node: ${e}`);this.graph.delete(e);const t=Array.from(this.graph.values());for(const r of t){for(let t=r.length-1;t>=0;t-=1)r[t]===e&&r.splice(t,1)}}findRootNodes(){const e=Array.from(this.graph.keys()),t=[];for(const r of e)this.hasPrecedents(r)||t.push(r);return t}getPrecedents(e){const t=this.graph.get(e);if(!t)throw new Error(`Unknown node: ${e}`);return t}hasNodes(){return this.graph.size>0}hasPrecedents(e){return this.getPrecedents(e).length>0}link(e,t){this.register(e),this.register(t);const r=this.graph.get(t);return r&&!r.includes(e)&&r.push(e),this}register(e){return this.graph.has(e)||this.graph.set(e,[]),this}visit(e,t,r){const o=t[r];if("visiting"===o)throw new Error(`Detected cycle involving node: ${r}`);if(o)return;t[r]="visiting";const n=this.getPrecedents(r);for(const r of n)this.visit(e,t,r);t[r]="ok",e.push(r)}};n=o([r(0).injectable()],n),t.LevelledTopologicalSorter=n},function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(0),c=r(1),d=r(224);let l=class{constructor(e){this.levelledTopologicalSorter=e}build(e){const t=Object.keys(e),r=this.buildNodeTransformersRelationEdges(t,e);for(const[e,t]of r)this.levelledTopologicalSorter.add(e,t);return this.levelledTopologicalSorter.sortByGroups()}buildNodeTransformersRelationEdges(e,t){const r=[];for(const o of e){const e=t[o].runAfter;if(e&&e.length)for(const n of e){!t[n]?r.push([o,null]):r.push([n,o])}else r.push([o,null])}return r}};l=n([s.injectable(),a(0,s.inject(c.ServiceIdentifiers.ILevelledTopologicalSorter)),i("design:paramtypes",["function"==typeof(o=void 0!==d.ILevelledTopologicalSorter&&d.ILevelledTopologicalSorter)?o:Object])],l),t.NodeTransformerNamesGroupsBuilder=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var o,n,i,a,s,c,d=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},l=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const p=r(0),m=r(1),g=f(r(46)),y=r(226),N=r(227),h=r(2),b=r(3),I=r(57),v=r(228),S=r(21),O=r(11),j=r(43),_=r(55),C=r(4);let R=o=class{constructor(e,t,r,o,n){this.transformersRunner=e,this.randomGenerator=t,this.obfuscatedCodeFactory=r,this.logger=o,this.options=n}obfuscate(e){const t=Date.now();this.logger.info(v.LoggingMessage.Version,"0.24.2"),this.logger.info(v.LoggingMessage.ObfuscationStarted),this.logger.info(v.LoggingMessage.RandomGeneratorSeed,this.randomGenerator.getInputSeed());const r=this.parseCode(e),o=this.transformAstTree(r),n=this.generateCode(e,o),i=(Date.now()-t)/1e3;return this.logger.success(v.LoggingMessage.ObfuscationCompleted,i),this.getObfuscatedCode(n)}parseCode(e){const t={sourceCode:e,inputFilePath:this.options.inputFilePath};return _.ASTParserFacade.parse(t,o.parseOptions)}transformAstTree(e){return e=this.runTransformationStage(e,O.TransformationStage.Initializing),!C.NodeGuards.isProgramNode(e)||e.body.length||e.leadingComments||e.trailingComments?(e=this.runTransformationStage(e,O.TransformationStage.Preparing),this.options.deadCodeInjection&&(e=this.runTransformationStage(e,O.TransformationStage.DeadCodeInjection)),this.options.controlFlowFlattening&&(e=this.runTransformationStage(e,O.TransformationStage.ControlFlowFlattening)),e=this.runTransformationStage(e,O.TransformationStage.Converting),e=this.runTransformationStage(e,O.TransformationStage.Obfuscating),e=this.runTransformationStage(e,O.TransformationStage.Finalizing)):(this.logger.warn(v.LoggingMessage.EmptySourceCode),e)}generateCode(e,t){const r=Object.assign({},o.escodegenParams);this.options.sourceMap&&(r.sourceMap=this.options.inputFileName||"sourceMap",r.sourceContent=e);const n=g.generate(t,Object.assign(Object.assign({},r),{format:{compact:this.options.compact}}));return n.map=n.map?n.map.toString():"",n}getObfuscatedCode(e){return this.obfuscatedCodeFactory(e.code,e.map)}runTransformationStage(e,t){return this.logger.info(v.LoggingMessage.TransformationStage,t),this.transformersRunner.transform(e,o.transformersList,t)}};R.parseOptions={ecmaVersion:j.ecmaVersion,allowHashBang:!0,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,locations:!0,ranges:!0},R.escodegenParams={comment:!0,verbatim:"x-verbatim-property",sourceMapWithCode:!0},R.transformersList=[S.NodeTransformer.BlockStatementControlFlowTransformer,S.NodeTransformer.CommentsTransformer,S.NodeTransformer.CustomNodesTransformer,S.NodeTransformer.DeadCodeInjectionTransformer,S.NodeTransformer.EvalCallExpressionTransformer,S.NodeTransformer.FunctionControlFlowTransformer,S.NodeTransformer.LabeledStatementTransformer,S.NodeTransformer.LiteralTransformer,S.NodeTransformer.MemberExpressionTransformer,S.NodeTransformer.MetadataTransformer,S.NodeTransformer.MethodDefinitionTransformer,S.NodeTransformer.ObfuscatingGuardsTransformer,S.NodeTransformer.ObjectExpressionKeysTransformer,S.NodeTransformer.ObjectExpressionTransformer,S.NodeTransformer.ParentificationTransformer,S.NodeTransformer.ScopeIdentifiersTransformer,S.NodeTransformer.SplitStringTransformer,S.NodeTransformer.TemplateLiteralTransformer,S.NodeTransformer.VariablePreserveTransformer],R=o=d([p.injectable(),u(0,p.inject(m.ServiceIdentifiers.ITransformersRunner)),u(1,p.inject(m.ServiceIdentifiers.IRandomGenerator)),u(2,p.inject(m.ServiceIdentifiers.Factory__IObfuscatedCode)),u(3,p.inject(m.ServiceIdentifiers.ILogger)),u(4,p.inject(m.ServiceIdentifiers.IOptions)),l("design:paramtypes",["function"==typeof(n=void 0!==I.ITransformersRunner&&I.ITransformersRunner)?n:Object,"function"==typeof(i=void 0!==b.IRandomGenerator&&b.IRandomGenerator)?i:Object,"function"==typeof(a=void 0!==y.TObfuscatedCodeFactory&&y.TObfuscatedCodeFactory)?a:Object,"function"==typeof(s=void 0!==N.ILogger&&N.ILogger)?s:Object,"function"==typeof(c=void 0!==h.IOptions&&h.IOptions)?c:Object])],R),t.JavaScriptObfuscator=R},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.EmptySourceCode="Empty source code. Obfuscation canceled...",e.ObfuscationCompleted="Obfuscation completed. Total time: %s sec.",e.ObfuscationStarted="Obfuscation started...",e.RandomGeneratorSeed="Random generator seed: %s...",e.TransformationStage="Transformation stage: %s...",e.Version="Version: %s"}(t.LoggingMessage||(t.LoggingMessage={}))},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(0),a=n(r(230));i.decorate(i.injectable(),a.default);let s=class extends a.default{};s=o([i.injectable()],s),t.ObfuscationEventEmitter=s},function(e,t){e.exports=require("eventemitter3")},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(0),d=r(1),l=r(48),u=r(7),f=r(32),p=r(2);let m=class{constructor(e,t){this.cryptUtils=e,this.options=t}initialize(e,t){this.obfuscatedCode=e,this.sourceMap=t}getObfuscatedCode(){return this.correctObfuscatedCode()}getSourceMap(){return this.sourceMap}toString(){return this.obfuscatedCode}correctObfuscatedCode(){if(!this.sourceMap)return this.obfuscatedCode;const e=this.options.sourceMapBaseUrl+this.options.sourceMapFileName;let t="//# sourceMappingURL=";switch(this.options.sourceMapMode){case f.SourceMapMode.Inline:t+=`data:application/json;base64,${this.cryptUtils.btoa(this.sourceMap)}`;break;case f.SourceMapMode.Separate:default:if(!e)return this.obfuscatedCode;t+=e}return`${this.obfuscatedCode}\n${t}`}};i([u.initializable(),a("design:type",String)],m.prototype,"obfuscatedCode",void 0),i([u.initializable(),a("design:type",String)],m.prototype,"sourceMap",void 0),m=i([c.injectable(),s(0,c.inject(d.ServiceIdentifiers.ICryptUtils)),s(1,c.inject(d.ServiceIdentifiers.IOptions)),a("design:paramtypes",["function"==typeof(o=void 0!==l.ICryptUtils&&l.ICryptUtils)?o:Object,"function"==typeof(n=void 0!==p.IOptions&&p.IOptions)?n:Object])],m),t.ObfuscatedCode=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.SourceCode=class{constructor(e,t){this.sourceCode=e,this.sourceMap=t}getSourceCode(){return this.sourceCode}getSourceMap(){return this.sourceMap}toString(){return this.sourceCode}}},function(e,t,r){"use strict";var o,n,i=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const d=r(0),l=r(1),u=c(r(13)),f=r(234),p=r(235),m=r(236),g=r(4),y=r(15);let N=class{constructor(e,t){this.cachedNodeTransformersData=new Map,this.nodeTransformerFactory=e,this.nodeTransformerNamesGroupsBuilder=t}transform(e,t,r){if(!t.length)return e;let o,n;this.cachedNodeTransformersData.has(t)?[o,n]=this.cachedNodeTransformersData.get(t):(o=this.buildNormalizedNodeTransformers(t),n=this.nodeTransformerNamesGroupsBuilder.build(o),this.cachedNodeTransformersData.set(t,[o,n]));for(const t of n){const n=[],i=[];for(const e of t){const t=o[e].getVisitor(r);t&&(t.enter&&n.push({enter:t.enter}),t.leave&&i.push({leave:t.leave}))}(n.length||i.length)&&u.replace(e,{enter:this.mergeVisitorsForDirection(n,m.VisitorDirection.Enter),leave:this.mergeVisitorsForDirection(i,m.VisitorDirection.Leave)})}return e}buildNormalizedNodeTransformers(e){return e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:this.nodeTransformerFactory(t)}),{})}mergeVisitorsForDirection(e,t){const r=e.length;return r?(o,n)=>{if(y.NodeMetadata.isIgnoredNode(o))return u.VisitorOption.Skip;for(let i=0;i<r;i++){const r=e[i][t];if(!r)continue;const a=r(o,n);a&&g.NodeGuards.isNode(a)&&(o=a)}return o}:(e,t)=>e}};N=i([d.injectable(),s(0,d.inject(l.ServiceIdentifiers.Factory__INodeTransformer)),s(1,d.inject(l.ServiceIdentifiers.INodeTransformerNamesGroupsBuilder)),a("design:paramtypes",["function"==typeof(o=void 0!==f.TNodeTransformerFactory&&f.TNodeTransformerFactory)?o:Object,"function"==typeof(n=void 0!==p.INodeTransformerNamesGroupsBuilder&&p.INodeTransformerNamesGroupsBuilder)?n:Object])],N),t.TransformersRunner=N},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Enter="enter",e.Leave="leave"}(t.VisitorDirection||(t.VisitorDirection={}))},,,,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(25);e.exports=o.JavaScriptObfuscator}]);
  22. //# sourceMappingURL=index.js.map