12345678910111213141516171819202122232425 |
- /*!
- Copyright (C) 2016-2018 Timofey Kachalov <[email protected]>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- require("source-map-support").install(),module.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=68)}([function(e,t){e.exports=require("@babel/runtime/helpers/classCallCheck")},function(e,t){e.exports=require("inversify")},function(e,t){e.exports=require("@babel/runtime/helpers/createClass")},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__IObfuscationResult="Factory<IObfuscationResult>",e.Factory__IObfuscatingReplacer="Factory<IObfuscatingReplacer>",e.Factory__TControlFlowStorage="Factory<TControlFlowStorage>",e.IArrayUtils="IArrayUtils",e.ICalleeDataExtractor="ICalleeDataExtractor",e.ICryptUtils="ICryptUtils",e.ICustomNode="ICustomNode",e.ICustomNodeGroup="ICustomNodeGroup",e.IControlFlowReplacer="IControlFlowReplacer",e.IEscapeSequenceEncoder="IEscapeSequenceEncoder",e.IIdentifierNamesGenerator="IIdentifierNamesGenerator",e.IIdentifierObfuscatingReplacer="IIdentifierObfuscatingReplacer",e.IJavaScriptObfuscator="IJavaScriptObfuscator",e.ILogger="ILogger",e.INodeGuard="INodeGuard",e.INodeTransformer="INodeTransformer",e.IObfuscationEventEmitter="IObfuscationEventEmitter",e.IObfuscationResult="IObfuscationResult",e.IOptions="IOptions",e.IOptionsNormalizer="IOptionsNormalizer",e.IObfuscatingReplacer="IObfuscatingReplacer",e.IRandomGenerator="IRandomGenerator",e.ISourceCode="ISourceCode",e.ISourceMapCorrector="ISourceMapCorrector",e.IStackTraceAnalyzer="IStackTraceAnalyzer",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){e.exports=require("tslib")},function(e,t){e.exports=require("@babel/runtime/core-js/object/get-prototype-of")},function(e,t){e.exports=require("@babel/runtime/helpers/possibleConstructorReturn")},function(e,t){e.exports=require("@babel/runtime/helpers/inherits")},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(18),i=function(){function e(){n(this,e)}return o(e,null,[{key:"isArrayPatternNode",value:function(e){return e.type===a.NodeType.ArrayPattern}},{key:"isArrowFunctionExpressionNode",value:function(e){return e.type===a.NodeType.ArrowFunctionExpression}},{key:"isAssignmentPatternNode",value:function(e){return e.type===a.NodeType.AssignmentPattern}},{key:"isAwaitExpressionNode",value:function(e){return e.type===a.NodeType.AwaitExpression}},{key:"isBlockStatementNode",value:function(e){return e.type===a.NodeType.BlockStatement}},{key:"isBreakStatementNode",value:function(e){return e.type===a.NodeType.BreakStatement}},{key:"isCallExpressionNode",value:function(e){return e.type===a.NodeType.CallExpression}},{key:"isCatchClauseNode",value:function(e){return e.type===a.NodeType.CatchClause}},{key:"isClassDeclarationNode",value:function(e){return e.type===a.NodeType.ClassDeclaration}},{key:"isContinueStatementNode",value:function(e){return e.type===a.NodeType.ContinueStatement}},{key:"isExpressionStatementNode",value:function(e){return e.type===a.NodeType.ExpressionStatement}},{key:"isFunctionDeclarationNode",value:function(e){return e.type===a.NodeType.FunctionDeclaration}},{key:"isFunctionExpressionNode",value:function(e){return e.type===a.NodeType.FunctionExpression}},{key:"isIdentifierNode",value:function(e){return e.type===a.NodeType.Identifier}},{key:"isIfStatementNode",value:function(e){return e.type===a.NodeType.IfStatement}},{key:"isLabelIdentifierNode",value:function(t,r){var n=e.isLabeledStatementNode(r)&&r.label===t,o=e.isContinueStatementNode(r)&&r.label===t,a=e.isBreakStatementNode(r)&&r.label===t;return n||o||a}},{key:"isLabeledStatementNode",value:function(e){return e.type===a.NodeType.LabeledStatement}},{key:"isLiteralNode",value:function(e){return e.type===a.NodeType.Literal}},{key:"isMemberExpressionNode",value:function(e){return e.type===a.NodeType.MemberExpression}},{key:"isMethodDefinitionNode",value:function(e){return e.type===a.NodeType.MethodDefinition}},{key:"isNode",value:function(e){return e&&void 0!==!e.type}},{key:"isNodeHasBlockScope",value:function(t,r){return e.isProgramNode(t)||e.isBlockStatementNode(t)&&e.nodesWithBlockScope.includes(r.type)}},{key:"isNodeHasScope",value:function(t){return e.isProgramNode(t)||e.isBlockStatementNode(t)||e.isSwitchCaseNode(t)}},{key:"isNodeWithComments",value:function(e){return Boolean(e.leadingComments)||Boolean(e.trailingComments)}},{key:"isObjectPatternNode",value:function(e){return e.type===a.NodeType.ObjectPattern}},{key:"isObjectExpressionNode",value:function(e){return e.type===a.NodeType.ObjectExpression}},{key:"isProgramNode",value:function(e){return e.type===a.NodeType.Program}},{key:"isPropertyNode",value:function(e){return e.type===a.NodeType.Property}},{key:"isReplaceableIdentifierNode",value:function(t,r){if(!e.isIdentifierNode(t))return!1;var n=e.isPropertyNode(r)&&!r.computed&&r.key===t,o=e.isMemberExpressionNode(r)&&!r.computed&&r.property===t,a=e.isMethodDefinitionNode(r)&&!r.computed,i=e.isLabelIdentifierNode(t,r);return!(n||o||a||i)}},{key:"isRestElementNode",value:function(e){return e.type===a.NodeType.RestElement}},{key:"isReturnStatementNode",value:function(e){return e.type===a.NodeType.ReturnStatement}},{key:"isSuperNode",value:function(e){return e.type===a.NodeType.Super}},{key:"isSwitchCaseNode",value:function(e){return e.type===a.NodeType.SwitchCase}},{key:"isTemplateLiteralNode",value:function(e){return e.type===a.NodeType.TemplateLiteral}},{key:"isUnaryExpressionNode",value:function(e){return e.type===a.NodeType.UnaryExpression}},{key:"isUseStrictOperator",value:function(e){return e.type===a.NodeType.ExpressionStatement&&"use strict"===e.directive}},{key:"isVariableDeclarationNode",value:function(e){return e.type===a.NodeType.VariableDeclaration}},{key:"isVariableDeclaratorNode",value:function(e){return e.type===a.NodeType.VariableDeclarator}},{key:"isWhileStatementNode",value:function(e){return e.type===a.NodeType.WhileStatement}}]),e}();i.nodesWithBlockScope=[a.NodeType.ArrowFunctionExpression,a.NodeType.FunctionDeclaration,a.NodeType.FunctionExpression,a.NodeType.MethodDefinition],t.NodeGuards=i},function(e,t,r){"use strict";var n=r(50),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=__importStar(r(42)),s=__importStar(r(51)),c=__importStar(r(17)),u=r(8),d=function(){function e(){o(this,e)}return a(e,null,[{key:"addXVerbatimPropertyToLiterals",value:function(e){return c.replace(e,{leave:function(e){u.NodeGuards.isLiteralNode(e)&&(e["x-verbatim-property"]={content:e.raw,precedence:i.Precedence.Primary})}}),e}},{key:"clone",value:function(t){return e.parentize(e.cloneRecursive(t))}},{key:"convertCodeToStructure",value:function(t){var r=s.parseScript(t);return r=e.addXVerbatimPropertyToLiterals(r),r=e.parentize(r),r.body}},{key:"convertStructureToCode",value:function(e){return e.reduce(function(e,t){return e+i.generate(t,{sourceMapWithCode:!0}).code},"")}},{key:"getBlockScopesOfNode",value:function(t){return e.getBlockScopesOfNodeRecursive(t)}},{key:"getNextSiblingStatementNode",value:function(t){return e.getSiblingStatementNodeByOffset(t,1)}},{key:"getPreviousSiblingStatementNode",value:function(t){return e.getSiblingStatementNodeByOffset(t,-1)}},{key:"getScopeOfNode",value:function(t){var r=t.parentNode;if(!r)throw new ReferenceError("`parentNode` property of given node is `undefined`");return u.NodeGuards.isNodeHasScope(r)?r:e.getScopeOfNode(r)}},{key:"getUnaryExpressionArgumentNode",value:function(t){return u.NodeGuards.isUnaryExpressionNode(t.argument)?e.getUnaryExpressionArgumentNode(t.argument):t.argument}},{key:"parentize",value:function(t){return c.replace(t,{enter:e.parentizeNode}),t}},{key:"parentizeNode",value:function(e,t){return e.parentNode=t||e,e.obfuscatedNode=!1,e}},{key:"cloneRecursive",value:function(t){if(null===t)return t;var r={};for(var o in t)if(t.hasOwnProperty(o)&&"parentNode"!==o){var a=t[o],i=void 0;i=null===a||a instanceof RegExp?a:Array.isArray(a)?a.map(e.cloneRecursive):"object"===n(a)?e.cloneRecursive(a):a,r[o]=i}return r}},{key:"getBlockScopesOfNodeRecursive",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=t.parentNode;if(!o)throw new ReferenceError("`parentNode` property of given node is `undefined`");return u.NodeGuards.isBlockStatementNode(t)&&o===t&&r.push(t),(u.NodeGuards.isProgramNode(t)||n&&u.NodeGuards.isNodeHasBlockScope(t,o))&&r.push(t),t!==o?e.getBlockScopesOfNodeRecursive(o,r,++n):r}},{key:"getSiblingStatementNodeByOffset",value:function(t,r){var n=e.getScopeOfNode(t),o=u.NodeGuards.isSwitchCaseNode(n)?n.consequent:n.body;return o[o.indexOf(t)+r]||null}}]),e}();t.NodeUtils=d},function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initialize",t=_(this)[0];return function(r,n){var c=r[e];if(!c||"function"!=typeof c)throw new Error("`".concat(e,"` method with initialization logic not ")+"found. `@".concat(t,"` decorator requires `").concat(e,"` method"));return o(v,!1,r),o(y,new g,r),o(h,new g,r),a(r,e),i(r,e,n),s(r,n)}}function o(e,t,r){m(e,r)||p(e,t,r)}function a(e,t){var r=[t,b];f(e).forEach(function(n){var o=l(y,e),a=l(h,e);if(!(r.includes(n)||o.has(n)||a.has(n))&&"function"==typeof e[n]){var i=d(e,n)||N,s=i.value;u(e,n,c({},i,{value:function(){if(!l(v,this))throw new Error("Class should be initialized with `".concat(t,"()` method"));return s.apply(this,arguments)}})),a.add(n)}})}function i(e,t,r){var n=d(e,t)||N,o=n.value;u(e,t,c({},n,{value:function(){p(v,!0,this);var e=o.apply(this,arguments);return this[r],e}}))}function s(e,t){l(y,e).add(t);var r="_".concat(t),n=d(e,r)||N;return u(e,t,c({},n,{get:function(){if(void 0===this[r])throw new Error("Property `".concat(t,"` is not initialized! Initialize it first!"));return this[r]},set:function(e){this[r]=e}})),n}var c=r(11),u=r(78),d=r(79),l=r(80),f=r(81),p=r(82),m=r(83),g=r(29),_=r(38);Object.defineProperty(t,"__esModule",{value:!0});var N={configurable:!0,enumerable:!0},v="_initialized",y="_initializablePropertiesSet",h="_wrappedMethodsSet",b="constructor";t.initializable=n},function(e,t){e.exports=require("@babel/runtime/core-js/object/assign")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){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 n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=r(10),u=function(){function e(t,r){n(this,e),this.randomGenerator=t,this.options=r}return o(e,[{key:"initialize",value:function(){this.nodeIdentifier=this.randomGenerator.getRandomInteger(0,1e4)}}]),e}();a.__decorate([c.initializable(),a.__metadata("design:type",Number)],u.prototype,"nodeIdentifier",void 0),a.__decorate([i.postConstruct(),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],u.prototype,"initialize",null),u=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__param(1,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object,Object])],u),t.AbstractNodeTransformer=u},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=r(101),u=r(102),d=l=function(){function e(t,r,o){n(this,e),this.cachedNode=null,this.identifierNamesGenerator=t(o),this.randomGenerator=r,this.options=o}return o(e,[{key:"getNode",value:function(){return this.cachedNode||(this.cachedNode=this.getNodeStructure()),this.cachedNode}},{key:"getGlobalVariableTemplate",value:function(){return this.randomGenerator.getRandomGenerator().pickone(l.globalVariableTemplateFunctions)}}]),e}();d.globalVariableTemplateFunctions=[c.GlobalVariableTemplate1(),u.GlobalVariableTemplate2()],d=l=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),a.__param(1,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__param(2,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Function,Object,Object])],d),t.AbstractCustomNode=d;var l},function(e,t,r){"use strict";var n=r(11),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=__importStar(r(42)),s=r(18),c=function(){function e(){o(this,e)}return a(e,null,[{key:"getProgramNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:s.NodeType.Program,body:e,sourceType:"script",obfuscatedNode:!1}}},{key:"getArrayExpressionNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:s.NodeType.ArrayExpression,elements:e}}},{key:"getAssignmentExpressionNode",value:function(e,t,r){return{type:s.NodeType.AssignmentExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getBinaryExpressionNode",value:function(e,t,r){return{type:s.NodeType.BinaryExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getBlockStatementNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:s.NodeType.BlockStatement,body:e,obfuscatedNode:!1}}},{key:"getBreakStatement",value:function(e){var t={type:s.NodeType.BreakStatement,obfuscatedNode:!1};return e&&(t.label=e),t}},{key:"getCallExpressionNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{type:s.NodeType.CallExpression,callee:e,arguments:t,obfuscatedNode:!1}}},{key:"getContinueStatement",value:function(e){var t={type:s.NodeType.ContinueStatement,obfuscatedNode:!1};return e&&(t.label=e),t}},{key:"getExpressionStatementNode",value:function(e){return{type:s.NodeType.ExpressionStatement,expression:e,obfuscatedNode:!1}}},{key:"getFunctionDeclarationNode",value:function(t,r,n){return{type:s.NodeType.FunctionDeclaration,id:e.getIdentifierNode(t),params:r,body:n,generator:!1,obfuscatedNode:!1}}},{key:"getFunctionExpressionNode",value:function(e,t){return{type:s.NodeType.FunctionExpression,params:e,body:t,generator:!1,obfuscatedNode:!1}}},{key:"getIfStatementNode",value:function(e,t,r){return n({type:s.NodeType.IfStatement,test:e,consequent:t},r&&{alternate:r},{obfuscatedNode:!1})}},{key:"getIdentifierNode",value:function(e){return{type:s.NodeType.Identifier,name:e,obfuscatedNode:!1}}},{key:"getLiteralNode",value:function(e,t){return t=void 0!==t?t:"'".concat(e,"'"),{type:s.NodeType.Literal,value:e,raw:t,"x-verbatim-property":{content:t,precedence:i.Precedence.Primary},obfuscatedNode:!1}}},{key:"getLogicalExpressionNode",value:function(e,t,r){return{type:s.NodeType.LogicalExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getMemberExpressionNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:s.NodeType.MemberExpression,computed:r,object:e,property:t,obfuscatedNode:!1}}},{key:"getMethodDefinitionNode",value:function(e,t,r,n){return{type:s.NodeType.MethodDefinition,key:e,value:t,kind:r,computed:n,static:!1,obfuscatedNode:!1}}},{key:"getObjectExpressionNode",value:function(e){return{type:s.NodeType.ObjectExpression,properties:e,obfuscatedNode:!1}}},{key:"getPropertyNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:s.NodeType.Property,key:e,value:t,kind:"init",method:!1,shorthand:!1,computed:r,obfuscatedNode:!1}}},{key:"getUnaryExpressionNode",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:s.NodeType.UnaryExpression,operator:e,argument:t,prefix:r,obfuscatedNode:!1}}},{key:"getReturnStatementNode",value:function(e){return{type:s.NodeType.ReturnStatement,argument:e,obfuscatedNode:!1}}},{key:"getSwitchStatementNode",value:function(e,t){return{type:s.NodeType.SwitchStatement,discriminant:e,cases:t,obfuscatedNode:!1}}},{key:"getSwitchCaseNode",value:function(e,t){return{type:s.NodeType.SwitchCase,test:e,consequent:t,obfuscatedNode:!1}}},{key:"getUpdateExpressionNode",value:function(e,t){return{type:s.NodeType.UpdateExpression,operator:e,argument:t,prefix:!1,obfuscatedNode:!1}}},{key:"getVariableDeclarationNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"var";return{type:s.NodeType.VariableDeclaration,declarations:e,kind:t,obfuscatedNode:!1}}},{key:"getVariableDeclaratorNode",value:function(e,t){return{type:s.NodeType.VariableDeclarator,id:e,init:t,obfuscatedNode:!1}}},{key:"getWhileStatementNode",value:function(e,t){return{type:s.NodeType.WhileStatement,test:e,body:t,obfuscatedNode:!1}}}]),e}();t.Nodes=c},function(e,t){e.exports=require("@babel/runtime/core-js/map")},function(e,t){e.exports=require("estraverse")},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.ContinueStatement="ContinueStatement",e.ExpressionStatement="ExpressionStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",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.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",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){e.exports=require("string-template")},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});!function(e){e.Browser="browser",e.Extension="extension",e.Node="node"}(t.ObfuscationTarget||(t.ObfuscationTarget={}))},function(e,t,r){"use strict";var n=r(16),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),s=r(3),c=r(70),u=r(75),d=r(89),l=r(94),f=r(141),p=r(142),m=r(145),g=r(146),_=r(159),N=r(174),v=r(183),y=r(188),h=r(194),b=r(65),S=r(197),I=r(199),C=r(200),O=r(201),j=r(202),F=function(){function e(){o(this,e),this.container=new i.Container}return a(e,[{key:"get",value:function(e){return this.container.get(e)}},{key:"getNamed",value:function(e,t){return this.container.getNamed(e,t)}},{key:"load",value:function(e,t){this.container.bind(s.ServiceIdentifiers.ISourceCode).toDynamicValue(function(){return new C.SourceCode(e)}).inSingletonScope(),this.container.bind(s.ServiceIdentifiers.TInputOptions).toDynamicValue(function(){return t}).inSingletonScope(),this.container.bind(s.ServiceIdentifiers.ILogger).to(b.Logger).inSingletonScope(),this.container.bind(s.ServiceIdentifiers.IJavaScriptObfuscator).to(h.JavaScriptObfuscator).inSingletonScope(),this.container.bind(s.ServiceIdentifiers.ITransformersRunner).to(j.TransformersRunner).inSingletonScope(),this.container.bind(s.ServiceIdentifiers.IObfuscationResult).to(I.ObfuscationResult).inSingletonScope(),this.container.bind(s.ServiceIdentifiers.Factory__IObfuscationResult).toFactory(function(e){return function(t,r){var n=e.container.get(s.ServiceIdentifiers.IObfuscationResult);return n.initialize(t,r),n}}),this.container.bind(s.ServiceIdentifiers.ISourceMapCorrector).to(O.SourceMapCorrector).inSingletonScope(),this.container.bind(s.ServiceIdentifiers.IObfuscationEventEmitter).to(S.ObfuscationEventEmitter).inSingletonScope(),this.container.load(c.analyzersModule),this.container.load(u.controlFlowTransformersModule),this.container.load(d.convertingTransformersModule),this.container.load(l.customNodesModule),this.container.load(f.finalizingTransformersModule),this.container.load(p.generatorsModule),this.container.load(m.nodeTransformersModule),this.container.load(g.obfuscatingTransformersModule),this.container.load(_.optionsModule),this.container.load(N.preparingTransformersModule),this.container.load(v.storagesModule),this.container.load(y.utilsModule)}},{key:"unload",value:function(){this.container.unbindAll()}}],[{key:"getFactory",value:function(e){return function(t){return function(r){return t.container.getNamed(e,r)}}}},{key:"getCacheFactory",value:function(e){return function(t){var r=new n;return function(n){if(r.has(n))return r.get(n);var o=t.container.getNamed(e,n);return r.set(n,o),o}}}},{key:"getConstructorFactory",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return function(t){var o=new n,a=[];return function(n){if(r.forEach(function(e,r){a[r]||(a[r]=t.container.get(e))}),o.has(n))return new(Function.prototype.bind.apply(o.get(n),[null].concat(a)));var i=t.container.getNamed(e,n);return o.set(n,i),new(Function.prototype.bind.apply(i,[null].concat(a)))}}}}]),e}();t.InversifyContainerFacade=F},function(e,t,r){"use strict";var n=r(24),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(8),s=function(){function e(){o(this,e)}return a(e,null,[{key:"appendNode",value:function(t,r){r=e.parentizeScopeStatementsBeforeAppend(t,r),e.setScopeNodeStatements(t,n(e.getScopeNodeStatements(t)).concat(n(r)))}},{key:"appendNodeToOptimalBlockScope",value:function(t,r,n){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;o=t.length?e.getOptimalBlockScope(t,a):r,e.prependNode(o,n)}},{key:"getOptimalBlockScope",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,o=t[r];if(n<=0)throw new Error("Invalid `deep` argument value. Value should be bigger then 0.");return n>1&&o.stackTrace.length?e.getOptimalBlockScope(o.stackTrace,0,--n):o.callee}},{key:"insertNodeAfter",value:function(t,r,n){var o=e.getScopeNodeStatements(t).indexOf(n);e.insertNodeAtIndex(t,r,o+1)}},{key:"insertNodeAtIndex",value:function(t,r,o){r=e.parentizeScopeStatementsBeforeAppend(t,r),e.setScopeNodeStatements(t,n(e.getScopeNodeStatements(t).slice(0,o)).concat(n(r),n(e.getScopeNodeStatements(t).slice(o))))}},{key:"prependNode",value:function(t,r){r=e.parentizeScopeStatementsBeforeAppend(t,r),e.setScopeNodeStatements(t,n(r).concat(n(e.getScopeNodeStatements(t))))}},{key:"getScopeNodeStatements",value:function(e){return i.NodeGuards.isSwitchCaseNode(e)?e.consequent:e.body}},{key:"parentizeScopeStatementsBeforeAppend",value:function(e,t){return t.forEach(function(t){t.parentNode=e}),t}},{key:"setScopeNodeStatements",value:function(e,t){if(i.NodeGuards.isSwitchCaseNode(e))return void(e.consequent=t);e.body=t}}]),e}();t.NodeAppender=s},function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")},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.BaseIdentifierObfuscatingReplacer="BaseIdentifierObfuscatingReplacer"}(t.IdentifierObfuscatingReplacer||(t.IdentifierObfuscatingReplacer={}))},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0}),r(69);var a=r(3),i=r(22),s=r(47),c=function(){function e(){n(this,e)}return o(e,null,[{key:"obfuscate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new i.InversifyContainerFacade;r.load(e,t);var n=r.get(a.ServiceIdentifiers.IJavaScriptObfuscator),o=n.obfuscate(e);return r.unload(),o}},{key:"runCLI",value:function(e){var t=new s.JavaScriptObfuscatorCLI(e);t.initialize(),t.run()}}]),e}();t.JavaScriptObfuscator=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.BlockStatementControlFlowTransformer="BlockStatementControlFlowTransformer",e.ClassDeclarationTransformer="ClassDeclarationTransformer",e.CommentsTransformer="CommentsTransformer",e.CustomNodesTransformer="CustomNodesTransformer",e.DeadCodeInjectionTransformer="DeadCodeInjectionTransformer",e.EvalCallExpressionTransformer="EvalCallExpressionTransformer",e.FunctionControlFlowTransformer="FunctionControlFlowTransformer",e.CatchClauseTransformer="CatchClauseTransformer",e.FunctionDeclarationTransformer="FunctionDeclarationTransformer",e.FunctionTransformer="FunctionTransformer",e.LabeledStatementTransformer="LabeledStatementTransformer",e.LiteralTransformer="LiteralTransformer",e.MemberExpressionTransformer="MemberExpressionTransformer",e.MethodDefinitionTransformer="MethodDefinitionTransformer",e.ObfuscatingGuardsTransformer="ObfuscatingGuardsTransformer",e.ObjectExpressionKeysTransformer="ObjectExpressionKeysTransformer",e.ObjectExpressionTransformer="ObjectExpressionTransformer",e.ParentificationTransformer="ParentificationTransformer",e.TemplateLiteralTransformer="TemplateLiteralTransformer",e.VariableDeclarationTransformer="VariableDeclarationTransformer"}(t.NodeTransformer||(t.NodeTransformer={}))},function(e,t){e.exports=require("@babel/runtime/core-js/set")},function(e,t){e.exports=require("@babel/runtime/helpers/slicedToArray")},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";var n=r(56),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(138),s=function(){function e(){o(this,e)}return a(e,null,[{key:"decToHex",value:function(e){return e.toString(16)}},{key:"extractDomainFromUrl",value:function(e){var t;return t=e.indexOf("://")>-1||0===e.indexOf("//")?e.split("/")[2]:e.split("/")[0],t=t.split(":")[0]}},{key:"isCeilNumber",value:function(e){return e%1==0}},{key:"stringRotate",value:function(e,t){if(!e)throw new ReferenceError("Cannot rotate empty string.");for(var r=0;r<t;r++)e=e[e.length-1]+e.substring(0,e.length-1);return e}},{key:"stringToJSFuck",value:function(e){return n(e).map(function(e){return i.JSFuck[e]||e}).join(" + ")}}]),e}();s.hexadecimalPrefix="0x",t.Utils=s},function(e,t){e.exports=require("@babel/runtime/core-js/get-iterator")},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=function(){function e(t,r,o){n(this,e),this.identifierNamesGenerator=t(o),this.randomGenerator=r,this.options=o}return o(e,[{key:"getAppendEvent",value:function(){return this.appendEvent}},{key:"getCustomNodes",value:function(){return this.customNodes}},{key:"appendCustomNodeIfExist",value:function(e,t){var r=this.customNodes.get(e);r&&t(r)}},{key:"getRandomStackTraceIndex",value:function(e){return this.randomGenerator.getRandomInteger(0,Math.max(0,Math.round(e-1)))}}]),e}();c=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),a.__param(1,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__param(2,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Function,Object,Object])],c),t.AbstractCustomNodeGroup=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.HexadecimalIdentifierNamesGenerator="hexadecimal",e.MangledIdentifierNamesGenerator="mangled"}(t.IdentifierNamesGenerator||(t.IdentifierNamesGenerator={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Inline="inline",e.Separate="separate"}(t.SourceMapMode||(t.SourceMapMode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Base64="base64",e.Rc4="rc4"}(t.StringArrayEncoding||(t.StringArrayEncoding={}))},function(e,t){e.exports=require("@babel/runtime/core-js/object/keys")},function(e,t,r){"use strict";var n=r(57);Object.defineProperty(t,"__esModule",{value:!0});var o=r(35),a=r(21),i=r(36);t.NO_ADDITIONAL_NODES_PRESET=n({compact:!0,controlFlowFlattening:!1,controlFlowFlatteningThreshold:0,deadCodeInjection:!1,deadCodeInjectionThreshold:0,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],exclude:[],identifierNamesGenerator:o.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,identifiersPrefix:"",log:!1,renameGlobals:!1,reservedNames:[],rotateStringArray:!1,seed:0,selfDefending:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:i.SourceMapMode.Separate,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0,target:a.ObfuscationTarget.Browser,transformObjectKeys:!1,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0});var o=r(4),a=r(1),i=r(3),s=function e(t){n(this,e),this.options=t};s=o.__decorate([a.injectable(),o.__param(0,a.inject(i.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object])],s),t.AbstractObfuscatingReplacer=s},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0});var o=r(4),a=r(1),i=function e(){n(this,e)};i=o.__decorate([a.injectable()],i),t.AbstractCalleeDataExtractor=i},function(e,t){e.exports=require("escodegen-wallaby")},function(e,t,r){"use strict";var n=r(16),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(1),c=r(3),u=d=function(){function e(t,r,a){o(this,e),this.replacerDataByControlFlowStorageId=new n,this.controlFlowCustomNodeFactory=t,this.randomGenerator=r,this.options=a}return a(e,[{key:"insertCustomNodeToControlFlowStorage",value:function(e,t,r,n){var o=this,a=t.getStorageId(),i=d.getStorageKeysByIdForCurrentStorage(this.replacerDataByControlFlowStorageId,a),s=i.get(r);if(this.randomGenerator.getMathRandom()<n&&s&&s.length)return this.randomGenerator.getRandomGenerator().pickone(s);var c=function e(r){var n=o.randomGenerator.getRandomString(r);return t.getStorage().has(n)?e(r):n}(5);return i.set(r,[c]),this.replacerDataByControlFlowStorageId.set(a,i),t.set(c,e),c}}],[{key:"getStorageKeysByIdForCurrentStorage",value:function(e,t){return e.has(t)?e.get(t):new n}}]),e}();u=d=i.__decorate([s.injectable(),i.__param(0,s.inject(c.ServiceIdentifiers.Factory__IControlFlowCustomNode)),i.__param(1,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i.__param(2,s.inject(c.ServiceIdentifiers.IOptions)),i.__metadata("design:paramtypes",[Function,Object,Object])],u),t.AbstractControlFlowReplacer=u;var d},function(e,t,r){"use strict";function n(){return"\n var that = (typeof window !== 'undefined'\n ? window\n : (typeof process === 'object' &&\n typeof require === 'function' &&\n typeof global === 'object')\n ? global\n : this);\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableNoEvalTemplate=n},function(e,t){e.exports=require("@babel/runtime/helpers/get")},function(e,t,r){"use strict";var n=r(57);Object.defineProperty(t,"__esModule",{value:!0});var o=r(35),a=r(21),i=r(36);t.DEFAULT_PRESET=n({compact:!0,config:"",controlFlowFlattening:!1,controlFlowFlatteningThreshold:.75,deadCodeInjection:!1,deadCodeInjectionThreshold:.4,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],exclude:[],identifierNamesGenerator:o.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,identifiersPrefix:"",log:!1,renameGlobals:!1,reservedNames:[],rotateStringArray:!0,seed:0,selfDefending:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:i.SourceMapMode.Separate,stringArray:!0,stringArrayEncoding:!1,stringArrayThreshold:.75,target:a.ObfuscationTarget.Browser,transformObjectKeys:!1,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";var n=r(11),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=i.__importStar(r(204)),c=i.__importStar(r(63)),u=i.__importStar(r(48)),d=r(10),l=r(46),f=r(205),p=r(206),m=r(207),g=r(208),_=r(209),N=r(210),v=r(211),y=r(27),h=r(214),b=function(){function e(t){o(this,e),this.rawArguments=t,this.arguments=t.slice(2)}return a(e,[{key:"initialize",value:function(){this.inputPath=u.normalize(this.arguments[0]||""),this.commands=new s.Command,this.configureCommands(),this.configureHelp(),this.inputCLIOptions=this.commands.opts()}},{key:"run",value:function(){if(!this.arguments.length||this.arguments.includes("--help"))return this.commands.outputHelp();var e=new h.SourceCodeReader(this.inputCLIOptions).readSourceCode(this.inputPath);this.processSourceCodeData(e)}},{key:"buildOptions",value:function(){var t=e.filterOptions(this.inputCLIOptions),r=this.inputCLIOptions.config,o=r?u.resolve(r,"."):"",a=o?v.CLIUtils.getUserConfig(o):{};return n({},l.DEFAULT_PRESET,a,t)}},{key:"configureCommands",value:function(){this.commands.usage("<inputPath> [options]").version(c.version,"-v, --version").option("-o, --output <path>","Output path for obfuscated code").option("--compact <boolean>","Disable one line output code compacting",p.BooleanSanitizer).option("--config <boolean>","Name of js / json config file").option("--control-flow-flattening <boolean>","Enables control flow flattening",p.BooleanSanitizer).option("--control-flow-flattening-threshold <number>","The probability that the control flow flattening transformation will be applied to the node",parseFloat).option("--dead-code-injection <boolean>","Enables dead code injection",p.BooleanSanitizer).option("--dead-code-injection-threshold <number>","The probability that the dead code injection transformation will be applied to the node",parseFloat).option("--debug-protection <boolean>","Disable browser Debug panel (can cause DevTools enabled browser freeze)",p.BooleanSanitizer).option("--debug-protection-interval <boolean>","Disable browser Debug panel even after page was loaded (can cause DevTools enabled browser freeze)",p.BooleanSanitizer).option("--disable-console-output <boolean>","Allow console.log, console.info, console.error and console.warn messages output into browser console",p.BooleanSanitizer).option("--domain-lock <list> (comma separated, without whitespaces)","Blocks the execution of the code in domains that do not match the passed RegExp patterns (comma separated)",f.ArraySanitizer).option("--exclude <list> (comma separated, without whitespaces)","A filename or glob which indicates files to exclude from obfuscation",f.ArraySanitizer).option("--identifier-names-generator <string> [hexadecimal, mangled]","Sets identifier names generator (Default: hexadecimal)",m.IdentifierNamesGeneratorSanitizer).option("--identifiers-prefix <string>","Sets prefix for all global identifiers.").option("--log <boolean>","Enables logging of the information to the console",p.BooleanSanitizer).option("--reserved-names <list> (comma separated, without whitespaces)","Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp patterns (comma separated)",f.ArraySanitizer).option("--rename-globals <boolean>","Allows to enable obfuscation of global variable and function names with declaration.",p.BooleanSanitizer).option("--rotate-string-array <boolean>","Disable rotation of unicode array values during obfuscation",p.BooleanSanitizer).option("--seed <number>","Sets seed for random generator. This is useful for creating repeatable results.",parseFloat).option("--self-defending <boolean>","Disables self-defending for obfuscated code",p.BooleanSanitizer).option("--source-map <boolean>","Enables source map generation",p.BooleanSanitizer).option("--source-map-base-url <string>","Sets base url to the source map import url when `--source-map-mode=separate`").option("--source-map-file-name <string>","Sets file name for output source map when `--source-map-mode=separate`").option("--source-map-mode <string> [inline, separate]","Specify source map output mode",_.SourceMapModeSanitizer).option("--string-array <boolean>","Disables gathering of all literal strings into an array and replacing every literal string with an array call",p.BooleanSanitizer).option("--string-array-encoding <string|boolean> [true, false, base64, rc4]","Encodes all strings in strings array using base64 or rc4 (this option can slow down your code speed",N.StringArrayEncodingSanitizer).option("--string-array-threshold <number>","The probability that the literal string will be inserted into stringArray (Default: 0.8, Min: 0, Max: 1)",parseFloat).option("--target <string>","Allows to set target environment for obfuscated code.",g.ObfuscationTargetSanitizer).option("--transform-object-keys <boolean>","Enables transformation of object keys",p.BooleanSanitizer).option("--unicode-escape-sequence <boolean>","Allows to enable/disable string conversion to unicode escape sequence",p.BooleanSanitizer).parse(this.rawArguments)}},{key:"configureHelp",value:function(){this.commands.on("--help",function(){console.log(" Examples:\n"),console.log(" %> javascript-obfuscator input_file_name.js --compact true --self-defending false"),console.log(" %> javascript-obfuscator input_file_name.js --output output_file_name.js --compact true --self-defending false"),console.log(" %> javascript-obfuscator input_directory_name --compact true --self-defending false"),console.log("")})}},{key:"processSourceCodeData",value:function(e){var t=this,r=this.inputCLIOptions.output?u.normalize(this.inputCLIOptions.output):"";if(Array.isArray(e))e.forEach(function(e,n){var o=e.filePath,a=e.content,i=r?u.join(r,o):v.CLIUtils.getOutputCodePath(o);t.processSourceCode(a,i,n)});else{var n=r||v.CLIUtils.getOutputCodePath(this.inputPath);this.processSourceCode(e,n,null)}}},{key:"processSourceCode",value:function(t,r,o){var a=this.buildOptions();if(null!==o){var i=this.inputCLIOptions.identifiersPrefix||e.baseIdentifiersPrefix,s="".concat(i).concat(o);a=n({},a,{identifiersPrefix:s})}a.sourceMap?e.processSourceCodeWithSourceMap(t,r,a):e.processSourceCodeWithoutSourceMap(t,r,a)}}],[{key:"filterOptions",value:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&(t[r]=e[r]);return t}},{key:"processSourceCodeWithoutSourceMap",value:function(e,t,r){var n=y.JavaScriptObfuscator.obfuscate(e,r).getObfuscatedCode();v.CLIUtils.writeFile(t,n)}},{key:"processSourceCodeWithSourceMap",value:function(e,t,r){var o=v.CLIUtils.getOutputSourceMapPath(t,r.sourceMapFileName||"");r=n({},r,{sourceMapFileName:u.basename(o)});var a=y.JavaScriptObfuscator.obfuscate(e,r);v.CLIUtils.writeFile(t,a.getObfuscatedCode()),"separate"===r.sourceMapMode&&a.getSourceMap()&&v.CLIUtils.writeFile(o,a.getSourceMap())}}]),e}();b.encoding="utf8",b.obfuscatedFilePrefix="-obfuscated",b.baseIdentifiersPrefix="a",i.__decorate([d.initializable(),i.__metadata("design:type",Object)],b.prototype,"commands",void 0),i.__decorate([d.initializable(),i.__metadata("design:type",Object)],b.prototype,"inputCLIOptions",void 0),i.__decorate([d.initializable(),i.__metadata("design:type",String)],b.prototype,"inputPath",void 0),t.JavaScriptObfuscatorCLI=b},function(e,t){e.exports=require("path")},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){e.exports=require("@babel/runtime/helpers/typeof")},function(e,t){e.exports=require("esprima")},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 n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(20),f=r(43),p=r(8),m=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"getControlFlowStorageCallNode",value:function(e,t,r,n){var o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.ExpressionWithOperatorControlFlowStorageCallNode);o.initialize(e,t,r,n);var a=o.getNode()[0];if(!a||!p.NodeGuards.isExpressionStatementNode(a))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return a.expression}}]),t}(f.AbstractControlFlowReplacer);m=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],m),t.ExpressionWithOperatorControlFlowReplacer=m},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.ConsoleOutputCustomNodeGroup="ConsoleOutputCustomNodeGroup",e.DebugProtectionCustomNodeGroup="DebugProtectionCustomNodeGroup",e.DomainLockCustomNodeGroup="DomainLockCustomNodeGroup",e.SelfDefendingCustomNodeGroup="SelfDefendingCustomNodeGroup",e.StringArrayCustomNodeGroup="StringArrayCustomNodeGroup"}(t.CustomNodeGroup||(t.CustomNodeGroup={}))},function(e,t){e.exports=require("@babel/runtime/core-js/array/from")},function(e,t){e.exports=require("@babel/runtime/core-js/object/freeze")},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0});var o=r(4),a=r(1),i=r(3),s=function e(t,r){n(this,e),this.randomGenerator=t,this.options=r};s=o.__decorate([a.injectable(),o.__param(0,a.inject(i.ServiceIdentifiers.IRandomGenerator)),o.__param(1,a.inject(i.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object,Object])],s),t.AbstractIdentifierNamesGenerator=s},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){e.BlackListNodeGuard="BlackListNodeGuard",e.ConditionalCommentNodeGuard="ConditionalCommentNodeGuard"}(t.ObfuscatingGuard||(t.ObfuscatingGuard={}))},function(e,t,r){"use strict";var n=r(24),o=r(33),a=r(30),i=r(16),s=r(0),c=r(2);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(10),p=function(){function e(t,r){s(this,e),this.randomGenerator=t,this.options=r}return c(e,[{key:"initialize",value:function(){this.storage=new i,this.storageId=this.randomGenerator.getRandomString(6)}},{key:"get",value:function(e){var t=this.storage.get(e);if(!t)throw new Error("No value found in map storage with key `".concat(e,"`"));return t}},{key:"getKeyOf",value:function(e){var t=!0,r=!1,n=void 0;try{for(var i,s=o(this.storage);!(t=(i=s.next()).done);t=!0){var c=i.value,u=a(c,2),d=u[0];if(e===u[1])return d}}catch(e){r=!0,n=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw n}}return null}},{key:"getLength",value:function(){return this.storage.size}},{key:"getStorage",value:function(){return this.storage}},{key:"getStorageId",value:function(){return this.storageId}},{key:"mergeWith",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.storage=new i(n(this.storage).concat(n(e.getStorage()))),t&&(this.storageId=e.getStorageId())}},{key:"set",value:function(e,t){this.storage.set(e,t)}}]),e}();u.__decorate([f.initializable(),u.__metadata("design:type",String)],p.prototype,"storageId",void 0),u.__decorate([f.initializable(),u.__metadata("design:type",i)],p.prototype,"storage",void 0),u.__decorate([d.postConstruct(),u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],p.prototype,"initialize",null),p=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Object,Object])],p),t.MapStorage=p},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=a.__importDefault(r(191)),u=r(192),d=r(10),l=f=function(){function e(t,r){n(this,e),this.sourceCode=t,this.options=r}return o(e,[{key:"initialize",value:function(){var e=this;this.seed=0!==this.options.seed?this.options.seed:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)}(0,999999999),this.randomGenerator=new u.Chance(function(){var t=c.default(e.sourceCode.getSourceCode());return e.seed+Number(t.replace(/\D/g,""))}())}},{key:"getMathRandom",value:function(){return this.getRandomInteger(0,99999)/1e5}},{key:"getRandomFloat",value:function(e,t){return this.getRandomGenerator().floating({min:e,max:t,fixed:7})}},{key:"getRandomGenerator",value:function(){return this.randomGenerator}},{key:"getRandomInteger",value:function(e,t){return this.getRandomGenerator().integer({min:e,max:t})}},{key:"getRandomString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.randomGeneratorPool;return this.getRandomGenerator().string({length:e,pool:t})}},{key:"getSeed",value:function(){return this.seed}}]),e}();l.randomGeneratorPool="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",a.__decorate([d.initializable(),a.__metadata("design:type",Object)],l.prototype,"randomGenerator",void 0),a.__decorate([d.initializable(),a.__metadata("design:type",Number)],l.prototype,"seed",void 0),a.__decorate([i.postConstruct(),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],l.prototype,"initialize",null),l=f=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.ISourceCode)),a.__param(1,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object,Object])],l),t.RandomGenerator=l;var f},function(e,t){e.exports=require("pjson")},function(e,t){e.exports=require("chalk")},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=a.__importDefault(r(64)),u=r(66),d=l=function(){function e(t){n(this,e),this.options=t}return o(e,[{key:"info",value:function(e,t){this.options.log&&l.log(l.colorInfo,u.LoggingPrefix.Base,e,t)}},{key:"success",value:function(e,t){this.options.log&&l.log(l.colorSuccess,u.LoggingPrefix.Base,e,t)}},{key:"warn",value:function(e,t){this.options.log&&l.log(l.colorWarn,u.LoggingPrefix.Base,e,t)}}],[{key:"log",value:function(e,t,r,n){var o=e("\n".concat(t," ").concat(r));n?console.log(o,n):console.log(o)}}]),e}();d.colorInfo=c.default.cyan,d.colorSuccess=c.default.green,d.colorWarn=c.default.yellow,d=l=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object])],d),t.Logger=d;var l},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){e.exports=require("fs")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(27);e.exports=n.JavaScriptObfuscator},function(e,t){e.exports=require("reflect-metadata")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22),o=r(1),a=r(3),i=r(49),s=r(71),c=r(72),u=r(73),d=r(74);t.analyzersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.IStackTraceAnalyzer).to(d.StackTraceAnalyzer).inSingletonScope(),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(s.FunctionDeclarationCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.FunctionDeclarationCalleeDataExtractor),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(c.FunctionExpressionCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.FunctionExpressionCalleeDataExtractor),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(u.ObjectExpressionCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.ObjectExpressionCalleeDataExtractor),e(a.ServiceIdentifiers.Factory__ICalleeDataExtractor).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.ICalleeDataExtractor))})},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=c.__importStar(r(17)),l=r(41),f=r(8),p=r(9),m=function(e){function t(){return o(this,t),i(this,(t.__proto__||n(t)).apply(this,arguments))}return s(t,e),a(t,[{key:"extract",value:function(e,t){if(!f.NodeGuards.isIdentifierNode(t))return null;var r=this.getCalleeBlockStatement(p.NodeUtils.getBlockScopesOfNode(e[0])[0],t.name);return r?{callee:r,name:t.name}:null}},{key:"getCalleeBlockStatement",value:function(e,t){var r=null;return d.traverse(e,{enter:function(e){if(f.NodeGuards.isFunctionDeclarationNode(e)&&e.id.name===t)return r=e.body,d.VisitorOption.Break}}),r}}]),t}(l.AbstractCalleeDataExtractor);m=c.__decorate([u.injectable()],m),t.FunctionDeclarationCalleeDataExtractor=m},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=c.__importStar(r(17)),l=r(41),f=r(8),p=r(9),m=function(e){function t(){return o(this,t),i(this,(t.__proto__||n(t)).apply(this,arguments))}return s(t,e),a(t,[{key:"extract",value:function(e,t){var r=null;return f.NodeGuards.isIdentifierNode(t)&&(r=this.getCalleeBlockStatement(p.NodeUtils.getBlockScopesOfNode(e[0])[0],t.name)),f.NodeGuards.isFunctionExpressionNode(t)&&(r=t.body),r?{callee:r,name:t.name||null}:null}},{key:"getCalleeBlockStatement",value:function(e,t){var r=null;return d.traverse(e,{enter:function(e,n){if(f.NodeGuards.isFunctionExpressionNode(e)&&n&&f.NodeGuards.isVariableDeclaratorNode(n)&&f.NodeGuards.isIdentifierNode(n.id)&&n.id.name===t)return r=e.body,d.VisitorOption.Break}}),r}}]),t}(l.AbstractCalleeDataExtractor);m=c.__decorate([u.injectable()],m),t.FunctionExpressionCalleeDataExtractor=m},function(e,t,r){"use strict";var n=r(33),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=u.__importStar(r(17)),f=r(41),p=r(8),m=r(9),g=function(e){function t(){return a(this,t),s(this,(t.__proto__||o(t)).apply(this,arguments))}return c(t,e),i(t,[{key:"extract",value:function(e,t){if(!p.NodeGuards.isMemberExpressionNode(t))return null;var r=this.createObjectMembersCallsChain([],t);if(!r.length)return null;var n=r[r.length-1],o=this.getCalleeBlockStatement(m.NodeUtils.getBlockScopesOfNode(e[0])[0],r);return o?{callee:o,name:n}:null}},{key:"createObjectMembersCallsChain",value:function(e,t){if(p.NodeGuards.isIdentifierNode(t.property)&&!1===t.computed)e.unshift(t.property.name);else{if(!p.NodeGuards.isLiteralNode(t.property)||"string"!=typeof t.property.value&&"number"!=typeof t.property.value)return e;e.unshift(t.property.value)}return p.NodeGuards.isMemberExpressionNode(t.object)?this.createObjectMembersCallsChain(e,t.object):(p.NodeGuards.isIdentifierNode(t.object)&&e.unshift(t.object.name),e)}},{key:"getCalleeBlockStatement",value:function(e,t){var r=this,n=t.shift();if(!n)return null;var o=null;return l.traverse(e,{enter:function(e){if(p.NodeGuards.isVariableDeclaratorNode(e)&&p.NodeGuards.isIdentifierNode(e.id)&&e.init&&p.NodeGuards.isObjectExpressionNode(e.init)&&e.id.name===n)return o=r.findCalleeBlockStatement(e.init.properties,t),l.VisitorOption.Break}}),o}},{key:"findCalleeBlockStatement",value:function(e,t){var r=t.shift();if(!r)return null;var o=!0,a=!1,i=void 0;try{for(var s,c=n(e);!(o=(s=c.next()).done);o=!0){var u=s.value,d=p.NodeGuards.isIdentifierNode(u.key)&&u.key.name===r,l=p.NodeGuards.isLiteralNode(u.key)&&Boolean(u.key.value)&&u.key.value===r;if(d||l){if(p.NodeGuards.isObjectExpressionNode(u.value))return this.findCalleeBlockStatement(u.value.properties,t);if(p.NodeGuards.isFunctionExpressionNode(u.value))return u.value.body}}}catch(e){a=!0,i=e}finally{try{o||null==c.return||c.return()}finally{if(a)throw i}}return null}}]),t}(f.AbstractCalleeDataExtractor);g=u.__decorate([d.injectable()],g),t.ObjectExpressionCalleeDataExtractor=g},function(e,t,r){"use strict";var n=r(11),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(1),c=r(3),u=i.__importStar(r(17)),d=r(49),l=r(8),f=r(9),p=m=function(){function e(t){o(this,e),this.calleeDataExtractorFactory=t}return a(e,[{key:"analyze",value:function(e){return this.analyzeRecursive(e.body)}},{key:"analyzeRecursive",value:function(e){for(var t=this,r=m.getLimitIndex(e.length),n=[],o=e.length,a=0;a<o;a++){if("break"===function(o){if(o>r)return"break";var a=e[o];u.traverse(a,{enter:function(r){if(l.NodeGuards.isCallExpressionNode(r))return a.parentNode!==f.NodeUtils.getBlockScopesOfNode(r)[0]?u.VisitorOption.Skip:void t.analyzeCallExpressionNode(n,e,r)}})}(a))break}return n}},{key:"analyzeCallExpressionNode",value:function(e,t,r){var o=this;m.calleeDataExtractorsList.forEach(function(a){var i=o.calleeDataExtractorFactory(a).extract(t,r.callee);i&&e.push(n({},i,{stackTrace:o.analyzeRecursive(i.callee.body)}))})}}],[{key:"getLimitIndex",value:function(e){var t=e-1,r=m.limitThresholdActivationLength-1,n=t;return t>r&&(n=Math.round(r+t*m.limitThreshold))>t&&(n=t),n}}]),e}();p.calleeDataExtractorsList=[d.CalleeDataExtractor.FunctionDeclarationCalleeDataExtractor,d.CalleeDataExtractor.FunctionExpressionCalleeDataExtractor,d.CalleeDataExtractor.ObjectExpressionCalleeDataExtractor],p.limitThresholdActivationLength=25,p.limitThreshold=.002,p=m=i.__decorate([s.injectable(),i.__param(0,s.inject(c.ServiceIdentifiers.Factory__ICalleeDataExtractor)),i.__metadata("design:paramtypes",[Function])],p),t.StackTraceAnalyzer=p;var m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22),o=r(1),a=r(3),i=r(52),s=r(28),c=r(76),u=r(77),d=r(84),l=r(85),f=r(86),p=r(87),m=r(88);t.controlFlowTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.INodeTransformer).to(u.BlockStatementControlFlowTransformer).whenTargetNamed(s.NodeTransformer.BlockStatementControlFlowTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(l.DeadCodeInjectionTransformer).whenTargetNamed(s.NodeTransformer.DeadCodeInjectionTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(f.FunctionControlFlowTransformer).whenTargetNamed(s.NodeTransformer.FunctionControlFlowTransformer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(c.BinaryExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.BinaryExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(d.CallExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.CallExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(p.LogicalExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.LogicalExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(m.StringLiteralControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.StringLiteralControlFlowReplacer),e(a.ServiceIdentifiers.Factory__IControlFlowReplacer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.IControlFlowReplacer))})},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(20),f=r(53),p=m=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"replace",value:function(e,t,r){var n=e.operator,o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.BinaryExpressionFunctionNode);o.initialize(n);var a=this.insertCustomNodeToControlFlowStorage(o,r,n,m.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a,e.left,e.right)}}]),t}(f.ExpressionWithOperatorControlFlowReplacer);p.usingExistingIdentifierChance=.5,p=m=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],p),t.BinaryExpressionControlFlowReplacer=p;var m},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=c.__importStar(r(17)),f=r(20),p=r(12),m=r(13),g=r(8),_=r(9),N=v=function(e){function t(e,r,a,s){var c;return o(this,t),c=i(this,(t.__proto__||n(t)).call(this,a,s)),c.controlFlowCustomNodeFactory=e,c.arrayUtils=r,c}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.ControlFlowFlattening:return{leave:function(e,r){if(r&&g.NodeGuards.isBlockStatementNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(this.randomGenerator.getMathRandom()>this.options.controlFlowFlatteningThreshold||!v.canTransformBlockStatementNode(e))return e;var r=e.body,n=this.arrayUtils.arrayRange(r.length),o=this.arrayUtils.arrayShuffle(n),a=n.map(function(e){return o.indexOf(e)}),i=this.controlFlowCustomNodeFactory(f.ControlFlowCustomNode.BlockStatementControlFlowFlatteningNode);i.initialize(r,o,a);var s=i.getNode()[0];return _.NodeUtils.parentizeNode(s,t),s}}],[{key:"blockStatementHasProhibitedStatements",value:function(e){return e.body.some(function(e){var t=g.NodeGuards.isBreakStatementNode(e)||g.NodeGuards.isContinueStatementNode(e),r=g.NodeGuards.isVariableDeclarationNode(e)&&("const"===e.kind||"let"===e.kind),n=g.NodeGuards.isClassDeclarationNode(e);return g.NodeGuards.isFunctionDeclarationNode(e)||t||r||n})}},{key:"canTransformBlockStatementNode",value:function(e){var t=!0;return l.traverse(e,{enter:function(e){if(g.NodeGuards.isWhileStatementNode(e))return l.VisitorOption.Skip;g.NodeGuards.isBlockStatementNode(e)&&v.blockStatementHasProhibitedStatements(e)&&(t=!1)}}),e.body.length<=4&&(t=!1),t}}]),t}(m.AbstractNodeTransformer);N=v=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,u.inject(d.ServiceIdentifiers.IArrayUtils)),c.__param(2,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(3,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object,Object])],N),t.BlockStatementControlFlowTransformer=N;var v},function(e,t){e.exports=require("@babel/runtime/core-js/object/define-property")},function(e,t){e.exports=require("@babel/runtime/core-js/object/get-own-property-descriptor")},function(e,t){e.exports=require("@babel/runtime/core-js/reflect/get-metadata")},function(e,t){e.exports=require("@babel/runtime/core-js/object/get-own-property-names")},function(e,t){e.exports=require("@babel/runtime/core-js/reflect/define-metadata")},function(e,t){e.exports=require("@babel/runtime/core-js/reflect/has-metadata")},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(20),f=r(43),p=r(8),m=g=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"replace",value:function(e,t,r){var n=e.callee;if(!p.NodeGuards.isIdentifierNode(n))return e;var o=String(e.arguments.length),a=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.CallExpressionFunctionNode),i=e.arguments;a.initialize(i);var s=this.insertCustomNodeToControlFlowStorage(a,r,o,g.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),s,n,i)}},{key:"getControlFlowStorageCallNode",value:function(e,t,r,n){var o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.CallExpressionControlFlowStorageCallNode);o.initialize(e,t,r,n);var a=o.getNode()[0];if(!a||!p.NodeGuards.isExpressionStatementNode(a))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return a.expression}}]),t}(f.AbstractControlFlowReplacer);m.usingExistingIdentifierChance=.5,m=g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],m),t.CallExpressionControlFlowReplacer=m;var g},function(e,t,r){"use strict";var n=r(29),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importStar(r(17)),p=r(54),m=r(28),g=r(18),_=r(12),N=r(13),v=r(8),y=r(15),h=r(9),b=S=function(e){function t(e,r,i,c){var u;return a(this,t),u=s(this,(t.__proto__||o(t)).call(this,i,c)),u.deadCodeInjectionRootAstHostNodeSet=new n,u.collectedBlockStatements=[],u.collectedBlockStatementsTotalLength=0,u.deadCodeInjectionCustomNodeFactory=e,u.transformersRunner=r,u}return c(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case _.TransformationStage.DeadCodeInjection:return{enter:function(e,r){if(r&&v.NodeGuards.isProgramNode(e))return t.analyzeNode(e,r),e},leave:function(e,r){if(r&&v.NodeGuards.isBlockStatementNode(e))return t.transformNode(e,r)}};case _.TransformationStage.Finalizing:return this.deadCodeInjectionRootAstHostNodeSet.size?{enter:function(e,r){if(r&&t.isDeadCodeInjectionRootAstHostNode(e))return t.restoreNode(e,r)}}:null;default:return null}}},{key:"analyzeNode",value:function(e,t){var r=this;f.traverse(e,{enter:function(e){if(v.NodeGuards.isBlockStatementNode(e)){var t=h.NodeUtils.clone(e);S.isValidCollectedBlockStatementNode(t)&&(h.NodeUtils.parentizeNode(t,t),t=r.transformersRunner.transform(t,S.transformersToRenameBlockScopeIdentifiers,_.TransformationStage.Obfuscating),r.collectedBlockStatements.push(t))}}}),this.collectedBlockStatementsTotalLength=this.collectedBlockStatements.length}},{key:"transformNode",value:function(e,t){if(!this.collectedBlockStatements.length||this.collectedBlockStatementsTotalLength<S.minCollectedBlockStatementsCount)return f.VisitorOption.Break;if(this.randomGenerator.getMathRandom()>this.options.deadCodeInjectionThreshold||!S.isValidWrappedBlockStatementNode(e))return e;var r=this.collectedBlockStatements.length-1,n=this.randomGenerator.getRandomInteger(0,r),o=this.collectedBlockStatements.splice(n,1)[0];return o===e?e:this.replaceBlockStatementNode(e,o,t)}},{key:"restoreNode",value:function(e,t){var r=e.body[0];if(!v.NodeGuards.isFunctionDeclarationNode(r))throw new Error("Wrong dead code injection root AST host node. Host node should contain `FunctionDeclaration` node");return r.body}},{key:"isDeadCodeInjectionRootAstHostNode",value:function(e){return v.NodeGuards.isBlockStatementNode(e)&&this.deadCodeInjectionRootAstHostNodeSet.has(e)}},{key:"replaceBlockStatementNode",value:function(e,t,r){var n=y.Nodes.getBlockStatementNode([y.Nodes.getFunctionDeclarationNode(S.deadCodeInjectionRootAstHostNodeName,[],t)]);this.deadCodeInjectionRootAstHostNodeSet.add(n);var o=this.deadCodeInjectionCustomNodeFactory(p.DeadCodeInjectionCustomNode.BlockStatementDeadCodeInjectionNode);o.initialize(e,n);var a=o.getNode()[0];return h.NodeUtils.parentizeNode(a,r),a}}],[{key:"isProhibitedNodeInsideCollectedBlockStatement",value:function(e){return v.NodeGuards.isBreakStatementNode(e)||v.NodeGuards.isContinueStatementNode(e)||v.NodeGuards.isAwaitExpressionNode(e)||v.NodeGuards.isSuperNode(e)}},{key:"isScopeHoistingFunctionDeclaration",value:function(e){if(!v.NodeGuards.isFunctionDeclarationNode(e))return!1;var t=h.NodeUtils.getScopeOfNode(e),r=v.NodeGuards.isSwitchCaseNode(t)?t.consequent:t.body,n=r.indexOf(e);if(0===n)return!1;var o=r.slice(0,n),a=y.Nodes.getBlockStatementNode(o),i=e.id.name,s=!1;return f.traverse(a,{enter:function(e){if(v.NodeGuards.isIdentifierNode(e)&&e.name===i)return s=!0,f.VisitorOption.Break}}),s}},{key:"isValidCollectedBlockStatementNode",value:function(e){if(!e.body.length)return!1;var t=0,r=!0;return f.traverse(e,{enter:function(e){if(v.NodeGuards.isBlockStatementNode(e)&&t++,t>S.maxNestedBlockStatementsCount||S.isProhibitedNodeInsideCollectedBlockStatement(e)||S.isScopeHoistingFunctionDeclaration(e))return r=!1,f.VisitorOption.Break}}),r}},{key:"isValidWrappedBlockStatementNode",value:function(e){if(!e.body.length)return!1;var t=!0;return f.traverse(e,{enter:function(e){if(S.isScopeHoistingFunctionDeclaration(e))return t=!1,f.VisitorOption.Break}}),!!t&&h.NodeUtils.getBlockScopesOfNode(e)[0].type!==g.NodeType.Program}}]),t}(N.AbstractNodeTransformer);b.deadCodeInjectionRootAstHostNodeName="deadCodeInjectionRootAstHostNode",b.maxNestedBlockStatementsCount=4,b.minCollectedBlockStatementsCount=5,b.transformersToRenameBlockScopeIdentifiers=[m.NodeTransformer.CatchClauseTransformer,m.NodeTransformer.ClassDeclarationTransformer,m.NodeTransformer.FunctionDeclarationTransformer,m.NodeTransformer.FunctionTransformer,m.NodeTransformer.LabeledStatementTransformer,m.NodeTransformer.VariableDeclarationTransformer],b=S=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IDeadCodeInjectionCustomNode)),u.__param(1,d.inject(l.ServiceIdentifiers.ITransformersRunner)),u.__param(2,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object,Object])],b),t.DeadCodeInjectionTransformer=b;var S},function(e,t,r){"use strict";var n=r(11),o=r(29),a=r(16),i=r(5),s=r(0),c=r(2),u=r(6),d=r(7);Object.defineProperty(t,"__esModule",{value:!0});var l=r(4),f=r(1),p=r(3),m=l.__importStar(r(17)),g=r(20),_=r(52),N=r(18),v=r(12),y=r(13),h=r(8),b=r(23),S=r(9),I=C=function(e){function t(e,r,n,c,d){var l;return s(this,t),l=u(this,(t.__proto__||i(t)).call(this,c,d)),l.controlFlowData=new a,l.visitedFunctionNodes=new o,l.hostNodesWithControlFlowNode=new o,l.controlFlowStorageFactory=e,l.controlFlowReplacerFactory=r,l.controlFlowCustomNodeFactory=n,l}return d(t,e),c(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case v.TransformationStage.ControlFlowFlattening:return{leave:function(e,r){if(r&&(h.NodeGuards.isFunctionDeclarationNode(e)||h.NodeGuards.isFunctionExpressionNode(e)||h.NodeGuards.isArrowFunctionExpressionNode(e)))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(this.visitedFunctionNodes.add(e),!h.NodeGuards.isBlockStatementNode(e.body))return e;var r=this.getHostNode(e.body),n=this.getControlFlowStorage(r);if(this.controlFlowData.set(r,n),this.transformFunctionBody(e.body,n),!n.getLength())return e;var o=this.controlFlowCustomNodeFactory(g.ControlFlowCustomNode.ControlFlowStorageNode);return o.initialize(n),b.NodeAppender.prependNode(r,o.getNode()),this.hostNodesWithControlFlowNode.add(r),e}},{key:"getControlFlowStorage",value:function(e){var t=this.controlFlowStorageFactory();if(this.controlFlowData.has(e)){this.hostNodesWithControlFlowNode.has(e)&&e.body.shift();var r=this.controlFlowData.get(e);t.mergeWith(r,!0)}return t}},{key:"getHostNode",value:function(e){var t=S.NodeUtils.getBlockScopesOfNode(e);return 1===t.length?e:(t.pop(),t.length>C.hostNodeSearchMinDepth&&t.splice(0,C.hostNodeSearchMinDepth),t.length>C.hostNodeSearchMaxDepth&&(t.length=C.hostNodeSearchMaxDepth),this.randomGenerator.getRandomGenerator().pickone(t))}},{key:"isVisitedFunctionNode",value:function(e){return(h.NodeGuards.isFunctionDeclarationNode(e)||h.NodeGuards.isFunctionExpressionNode(e)||h.NodeGuards.isArrowFunctionExpressionNode(e))&&this.visitedFunctionNodes.has(e)}},{key:"transformFunctionBody",value:function(e,t){var r=this;m.replace(e,{enter:function(e,o){if(e.ignoredNode)return m.VisitorOption.Skip;if(r.isVisitedFunctionNode(e)||!o)return m.VisitorOption.Skip;if(!C.controlFlowReplacersMap.has(e.type))return e;if(r.randomGenerator.getMathRandom()>r.options.controlFlowFlatteningThreshold)return e;var a=C.controlFlowReplacersMap.get(e.type);return void 0===a?e:n({},r.controlFlowReplacerFactory(a).replace(e,o,t),{parentNode:o})}})}}]),t}(y.AbstractNodeTransformer);I.controlFlowReplacersMap=new a([[N.NodeType.BinaryExpression,_.ControlFlowReplacer.BinaryExpressionControlFlowReplacer],[N.NodeType.CallExpression,_.ControlFlowReplacer.CallExpressionControlFlowReplacer],[N.NodeType.LogicalExpression,_.ControlFlowReplacer.LogicalExpressionControlFlowReplacer],[N.NodeType.Literal,_.ControlFlowReplacer.StringLiteralControlFlowReplacer]]),I.hostNodeSearchMinDepth=0,I.hostNodeSearchMaxDepth=2,I=C=l.__decorate([f.injectable(),l.__param(0,f.inject(p.ServiceIdentifiers.Factory__TControlFlowStorage)),l.__param(1,f.inject(p.ServiceIdentifiers.Factory__IControlFlowReplacer)),l.__param(2,f.inject(p.ServiceIdentifiers.Factory__IControlFlowCustomNode)),l.__param(3,f.inject(p.ServiceIdentifiers.IRandomGenerator)),l.__param(4,f.inject(p.ServiceIdentifiers.IOptions)),l.__metadata("design:paramtypes",[Function,Function,Function,Object,Object])],I),t.FunctionControlFlowTransformer=I;var C},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(20),f=r(53),p=r(8),m=r(9),g=_=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"replace",value:function(e,t,r){if(this.checkForProhibitedExpressions(e.left,e.right))return e;var n=e.operator,o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.LogicalExpressionFunctionNode);o.initialize(n);var a=this.insertCustomNodeToControlFlowStorage(o,r,n,_.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a,e.left,e.right)}},{key:"checkForProhibitedExpressions",value:function(e,t){return[e,t].some(function(e){var t;return t=p.NodeGuards.isUnaryExpressionNode(e)?m.NodeUtils.getUnaryExpressionArgumentNode(e):e,!(p.NodeGuards.isLiteralNode(t)||p.NodeGuards.isIdentifierNode(t)||p.NodeGuards.isObjectExpressionNode(t)||p.NodeGuards.isExpressionStatementNode(t))})}}]),t}(f.ExpressionWithOperatorControlFlowReplacer);g.usingExistingIdentifierChance=.5,g=_=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],g),t.LogicalExpressionControlFlowReplacer=g;var _},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(20),f=r(43),p=r(8),m=g=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"replace",value:function(e,t,r){if(p.NodeGuards.isPropertyNode(t)&&t.key===e)return e;if("string"!=typeof e.value||e.value.length<3)return e;var n=String(e.value),o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.StringLiteralNode);o.initialize(e.value);var a=this.insertCustomNodeToControlFlowStorage(o,r,n,g.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a)}},{key:"getControlFlowStorageCallNode",value:function(e,t){var r=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.StringLiteralControlFlowStorageCallNode);r.initialize(e,t);var n=r.getNode()[0];if(!n||!p.NodeGuards.isExpressionStatementNode(n))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return n.expression}}]),t}(f.AbstractControlFlowReplacer);m.usingExistingIdentifierChance=1,m=g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],m),t.StringLiteralControlFlowReplacer=m;var g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),a=r(28),i=r(90),s=r(91),c=r(92),u=r(93);t.convertingTransformersModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.INodeTransformer).to(i.MemberExpressionTransformer).whenTargetNamed(a.NodeTransformer.MemberExpressionTransformer),e(o.ServiceIdentifiers.INodeTransformer).to(s.MethodDefinitionTransformer).whenTargetNamed(a.NodeTransformer.MethodDefinitionTransformer),e(o.ServiceIdentifiers.INodeTransformer).to(c.ObjectExpressionKeysTransformer).whenTargetNamed(a.NodeTransformer.ObjectExpressionKeysTransformer),e(o.ServiceIdentifiers.INodeTransformer).to(u.TemplateLiteralTransformer).whenTargetNamed(a.NodeTransformer.TemplateLiteralTransformer)})},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(18),f=r(12),p=r(13),m=r(8),g=function(e){function t(e,r){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r))}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Converting:return{enter:function(e,r){if(r&&m.NodeGuards.isMemberExpressionNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(m.NodeGuards.isIdentifierNode(e.property)){if(e.computed)return e;e.computed=!0,e.property={type:l.NodeType.Literal,value:e.property.name,raw:"'".concat(e.property.name,"'")}}return e}}]),t}(p.AbstractNodeTransformer);g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object,Object])],g),t.MemberExpressionTransformer=g},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(18),f=r(12),p=r(13),m=r(8),g=_=function(e){function t(e,r){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r))}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Converting:return{enter:function(e,r){if(r&&m.NodeGuards.isMethodDefinitionNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){return m.NodeGuards.isIdentifierNode(e.key)&&!_.ignoredNames.includes(e.key.name)&&!1===e.computed&&(e.computed=!0,e.key={type:l.NodeType.Literal,value:e.key.name,raw:"'".concat(e.key.name,"'")}),e}}]),t}(p.AbstractNodeTransformer);g.ignoredNames=["constructor"],g=_=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object,Object])],g),t.MethodDefinitionTransformer=g;var _},function(e,t,r){"use strict";var n=r(30),o=r(16),a=r(5),i=r(0),s=r(2),c=r(6),u=r(7);Object.defineProperty(t,"__esModule",{value:!0});var d=r(4),l=r(1),f=r(3),p=r(12),m=r(13),g=r(23),_=r(8),N=r(15),v=r(9),y=h=function(e){function t(e,r){var n;return i(this,t),n=c(this,(t.__proto__||a(t)).call(this,e,r)),n.cachedScopeNodesMap=new o,n}return u(t,e),s(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Converting:return{enter:function(e,r){if(t.options.transformObjectKeys&&r&&_.NodeGuards.isObjectExpressionNode(e)&&_.NodeGuards.isVariableDeclaratorNode(r))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(!_.NodeGuards.isIdentifierNode(t.id))return e;var r=v.NodeUtils.getScopeOfNode(t);return r&&_.NodeGuards.isNodeHasScope(r)?(this.cachedScopeNodesMap.set(t,r),this.transformObjectExpressionNode(e,t.id,t)):e}},{key:"extractPropertiesToExpressionStatements",value:function(e,t,r){for(var n=e.length,o=[],a=[],i=0;i<n;i++){var s=e[i],c=s.value;if(h.isValidPropertyValueNode(c)){var u=h.getPropertyNodeKeyName(s);if(u){var d=!s.computed||s.computed&&_.NodeGuards.isLiteralNode(s.key),l=d?N.Nodes.getLiteralNode(u):N.Nodes.getIdentifierNode(u),f=N.Nodes.getMemberExpressionNode(t,l,!0),p=N.Nodes.getExpressionStatementNode(N.Nodes.getAssignmentExpressionNode("=",f,c));_.NodeGuards.isObjectExpressionNode(s.value)&&this.transformObjectExpressionNode(s.value,f,r),o.push(p),a.push(i)}}}return[o,a]}},{key:"transformObjectExpressionNode",value:function(e,t,r){var o=e.properties;if(!o.length)return e;var a=this.cachedScopeNodesMap.get(r);if(!a)return e;var i=this.extractPropertiesToExpressionStatements(o,t,r),s=n(i,2),c=s[0],u=s[1];return e.properties=h.filterObjectExpressionProperties(o,u),h.appendExpressionStatements(a,c,r),e}}],[{key:"appendExpressionStatements",value:function(e,t,r){var n=r.parentNode;if(!n||!_.NodeGuards.isVariableDeclarationNode(n))throw new Error("Cannot find variable declaration for variable declarator");g.NodeAppender.insertNodeAfter(e,t,n)}},{key:"filterObjectExpressionProperties",value:function(e,t){return e.filter(function(e,r){return!t.includes(r)})}},{key:"getPropertyNodeKeyName",value:function(e){var t=e.key;return _.NodeGuards.isLiteralNode(t)&&"string"==typeof t.value?t.value:_.NodeGuards.isIdentifierNode(t)?t.name:null}},{key:"isValidPropertyValueNode",value:function(e){return!(_.NodeGuards.isObjectPatternNode(e)||_.NodeGuards.isArrayPatternNode(e)||_.NodeGuards.isAssignmentPatternNode(e)||_.NodeGuards.isRestElementNode(e))}}]),t}(m.AbstractNodeTransformer);y=h=d.__decorate([l.injectable(),d.__param(0,l.inject(f.ServiceIdentifiers.IRandomGenerator)),d.__param(1,l.inject(f.ServiceIdentifiers.IOptions)),d.__metadata("design:paramtypes",[Object,Object])],y),t.ObjectExpressionKeysTransformer=y;var h},function(e,t,r){"use strict";var n=r(24),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importStar(r(17)),p=r(12),m=r(13),g=r(8),_=r(15),N=r(9),v=y=function(e){function t(e,r){return a(this,t),s(this,(t.__proto__||o(t)).call(this,e,r))}return c(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Converting:return{enter:function(e,r){if(r&&g.NodeGuards.isReturnStatementNode(e)&&null===e.argument)return t.fixEsprimaReturnStatementTemplateLiteralNode(e)},leave:function(e,r){if(r&&g.NodeGuards.isTemplateLiteralNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=e.expressions,n=[];if(e.quasis.forEach(function(e){n.push(_.Nodes.getLiteralNode(e.value.cooked));var t=r.shift();t&&n.push(t)}),n=n.filter(function(e){return!(g.NodeGuards.isLiteralNode(e)&&""===e.value)}),y.isLiteralNodeWithStringValue(n[0])||y.isLiteralNodeWithStringValue(n[1])||n.unshift(_.Nodes.getLiteralNode("")),n.length>1){var o=_.Nodes.getBinaryExpressionNode("+",n.shift(),n.shift());return n.forEach(function(e){o=_.Nodes.getBinaryExpressionNode("+",o,e)}),o}return n[0]}},{key:"fixEsprimaReturnStatementTemplateLiteralNode",value:function(e){var t=N.NodeUtils.getScopeOfNode(e),r=g.NodeGuards.isSwitchCaseNode(t)?t.consequent:t.body,o=r.indexOf(e);if(o===r.length-2){var a=r[o+1];if(a&&g.NodeGuards.isExpressionStatementNode(a)){var i=!1;if(f.traverse(a,{enter:function(e,t){if(g.NodeGuards.isTemplateLiteralNode(e))return i=!0,f.VisitorOption.Break}}),i)return e.argument=a.expression,r.pop(),g.NodeGuards.isSwitchCaseNode(t)?t.consequent=n(r):t.body=n(r),e}}}}],[{key:"isLiteralNodeWithStringValue",value:function(e){return e&&g.NodeGuards.isLiteralNode(e)&&"string"==typeof e.value}}]),t}(m.AbstractNodeTransformer);v=y=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Object,Object])],v),t.TemplateLiteralTransformer=v;var y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22),o=r(1),a=r(3),i=r(20),s=r(31),c=r(55),u=r(54),d=r(95),l=r(96),f=r(97),p=r(98),m=r(99),g=r(100),_=r(103),N=r(104),v=r(105),y=r(106),h=r(107),b=r(108),S=r(110),I=r(112),C=r(114),O=r(118),j=r(120),F=r(121),k=r(122),T=r(124),x=r(126),w=r(133),E=r(135),G=r(139),R=r(140);t.customNodesModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.ICustomNode).to(b.ConsoleOutputDisableExpressionNode).whenTargetNamed(s.CustomNode.ConsoleOutputDisableExpressionNode),e(a.ServiceIdentifiers.ICustomNode).to(S.DebugProtectionFunctionCallNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionCallNode),e(a.ServiceIdentifiers.ICustomNode).to(I.DebugProtectionFunctionIntervalNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionIntervalNode),e(a.ServiceIdentifiers.ICustomNode).to(C.DebugProtectionFunctionNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionNode),e(a.ServiceIdentifiers.ICustomNode).to(O.DomainLockNode).whenTargetNamed(s.CustomNode.DomainLockNode),e(a.ServiceIdentifiers.ICustomNode).to(k.NodeCallsControllerFunctionNode).whenTargetNamed(s.CustomNode.NodeCallsControllerFunctionNode),e(a.ServiceIdentifiers.ICustomNode).to(T.SelfDefendingUnicodeNode).whenTargetNamed(s.CustomNode.SelfDefendingUnicodeNode),e(a.ServiceIdentifiers.ICustomNode).to(x.StringArrayCallsWrapper).whenTargetNamed(s.CustomNode.StringArrayCallsWrapper),e(a.ServiceIdentifiers.ICustomNode).to(w.StringArrayNode).whenTargetNamed(s.CustomNode.StringArrayNode),e(a.ServiceIdentifiers.ICustomNode).to(E.StringArrayRotateFunctionNode).whenTargetNamed(s.CustomNode.StringArrayRotateFunctionNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(g.BinaryExpressionFunctionNode).whenTargetNamed(i.ControlFlowCustomNode.BinaryExpressionFunctionNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(_.BlockStatementControlFlowFlatteningNode).whenTargetNamed(i.ControlFlowCustomNode.BlockStatementControlFlowFlatteningNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(v.CallExpressionControlFlowStorageCallNode).whenTargetNamed(i.ControlFlowCustomNode.CallExpressionControlFlowStorageCallNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(y.CallExpressionFunctionNode).whenTargetNamed(i.ControlFlowCustomNode.CallExpressionFunctionNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(h.ControlFlowStorageNode).whenTargetNamed(i.ControlFlowCustomNode.ControlFlowStorageNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(j.ExpressionWithOperatorControlFlowStorageCallNode).whenTargetNamed(i.ControlFlowCustomNode.ExpressionWithOperatorControlFlowStorageCallNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(F.LogicalExpressionFunctionNode).whenTargetNamed(i.ControlFlowCustomNode.LogicalExpressionFunctionNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(R.StringLiteralNode).whenTargetNamed(i.ControlFlowCustomNode.StringLiteralNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(G.StringLiteralControlFlowStorageCallNode).whenTargetNamed(i.ControlFlowCustomNode.StringLiteralControlFlowStorageCallNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(N.BlockStatementDeadCodeInjectionNode).whenTargetNamed(u.DeadCodeInjectionCustomNode.BlockStatementDeadCodeInjectionNode),e(a.ServiceIdentifiers.ICustomNodeGroup).to(d.ConsoleOutputCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.ConsoleOutputCustomNodeGroup),e(a.ServiceIdentifiers.ICustomNodeGroup).to(l.DebugProtectionCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.DebugProtectionCustomNodeGroup),e(a.ServiceIdentifiers.ICustomNodeGroup).to(f.DomainLockCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.DomainLockCustomNodeGroup),e(a.ServiceIdentifiers.ICustomNodeGroup).to(p.SelfDefendingCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.SelfDefendingCustomNodeGroup),e(a.ServiceIdentifiers.ICustomNodeGroup).to(m.StringArrayCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.StringArrayCustomNodeGroup),e(a.ServiceIdentifiers.Factory__ICustomNode).toFactory(n.InversifyContainerFacade.getFactory(a.ServiceIdentifiers.ICustomNode)),e(a.ServiceIdentifiers.Factory__IControlFlowCustomNode).toFactory(n.InversifyContainerFacade.getConstructorFactory(a.ServiceIdentifiers.Newable__ICustomNode,a.ServiceIdentifiers.Factory__IIdentifierNamesGenerator,a.ServiceIdentifiers.IRandomGenerator,a.ServiceIdentifiers.IOptions)),e(a.ServiceIdentifiers.Factory__IDeadCodeInjectionCustomNode).toFactory(n.InversifyContainerFacade.getConstructorFactory(a.ServiceIdentifiers.Newable__ICustomNode,a.ServiceIdentifiers.Factory__IIdentifierNamesGenerator,a.ServiceIdentifiers.IRandomGenerator,a.ServiceIdentifiers.IOptions)),e(a.ServiceIdentifiers.Factory__ICustomNodeGroup).toFactory(n.InversifyContainerFacade.getFactory(a.ServiceIdentifiers.ICustomNodeGroup))})},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(10),p=r(31),m=r(25),g=r(34),_=r(23),N=function(e){function t(e,r,n,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,r,n,i)),c.appendEvent=m.ObfuscationEvent.BeforeObfuscation,c.customNodeFactory=e,c}return c(t,e),i(t,[{key:"appendCustomNodes",value:function(e,t){var r=this.getRandomStackTraceIndex(t.length);this.appendCustomNodeIfExist(p.CustomNode.ConsoleOutputDisableExpressionNode,function(n){_.NodeAppender.appendNodeToOptimalBlockScope(t,e,n.getNode(),r)}),this.appendCustomNodeIfExist(p.CustomNode.NodeCallsControllerFunctionNode,function(n){var o;o=t.length?_.NodeAppender.getOptimalBlockScope(t,r,1):e,_.NodeAppender.prependNode(o,n.getNode())})}},{key:"initialize",value:function(){if(this.customNodes=new n,this.options.disableConsoleOutput){var e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(p.CustomNode.ConsoleOutputDisableExpressionNode),r=this.customNodeFactory(p.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(p.CustomNode.ConsoleOutputDisableExpressionNode,t),this.customNodes.set(p.CustomNode.NodeCallsControllerFunctionNode,r)}}}]),t}(g.AbstractCustomNodeGroup);u.__decorate([f.initializable(),u.__metadata("design:type",n)],N.prototype,"customNodes",void 0),N=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__ICustomNode)),u.__param(1,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Function,Object,Object])],N),t.ConsoleOutputCustomNodeGroup=N},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(10),p=r(31),m=r(25),g=r(34),_=r(23),N=function(e){function t(e,r,n,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,r,n,i)),c.appendEvent=m.ObfuscationEvent.BeforeObfuscation,c.customNodeFactory=e,c}return c(t,e),i(t,[{key:"appendCustomNodes",value:function(e,t){var r=this,n=this.getRandomStackTraceIndex(t.length);this.appendCustomNodeIfExist(p.CustomNode.DebugProtectionFunctionCallNode,function(r){_.NodeAppender.appendNodeToOptimalBlockScope(t,e,r.getNode(),n)}),this.appendCustomNodeIfExist(p.CustomNode.DebugProtectionFunctionNode,function(t){_.NodeAppender.appendNode(e,t.getNode())}),this.appendCustomNodeIfExist(p.CustomNode.DebugProtectionFunctionIntervalNode,function(t){var n=e.body.length,o=r.randomGenerator.getRandomInteger(0,n);_.NodeAppender.insertNodeAtIndex(e,t.getNode(),o)}),this.appendCustomNodeIfExist(p.CustomNode.NodeCallsControllerFunctionNode,function(r){var o;o=t.length?_.NodeAppender.getOptimalBlockScope(t,n,1):e,_.NodeAppender.prependNode(o,r.getNode())})}},{key:"initialize",value:function(){if(this.customNodes=new n,this.options.debugProtection){var e=this.identifierNamesGenerator.generate(),t=this.identifierNamesGenerator.generate(),r=this.customNodeFactory(p.CustomNode.DebugProtectionFunctionNode),o=this.customNodeFactory(p.CustomNode.DebugProtectionFunctionCallNode),a=this.customNodeFactory(p.CustomNode.DebugProtectionFunctionIntervalNode),i=this.customNodeFactory(p.CustomNode.NodeCallsControllerFunctionNode);r.initialize(e),o.initialize(e,t),a.initialize(e),i.initialize(this.appendEvent,t),this.customNodes.set(p.CustomNode.DebugProtectionFunctionNode,r),this.customNodes.set(p.CustomNode.DebugProtectionFunctionCallNode,o),this.options.debugProtectionInterval&&this.customNodes.set(p.CustomNode.DebugProtectionFunctionIntervalNode,a),this.customNodes.set(p.CustomNode.NodeCallsControllerFunctionNode,i)}}}]),t}(g.AbstractCustomNodeGroup);u.__decorate([f.initializable(),u.__metadata("design:type",n)],N.prototype,"customNodes",void 0),N=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__ICustomNode)),u.__param(1,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Function,Object,Object])],N),t.DebugProtectionCustomNodeGroup=N},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(10),p=r(31),m=r(25),g=r(34),_=r(23),N=function(e){function t(e,r,n,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,r,n,i)),c.appendEvent=m.ObfuscationEvent.BeforeObfuscation,c.customNodeFactory=e,c}return c(t,e),i(t,[{key:"appendCustomNodes",value:function(e,t){var r=this.getRandomStackTraceIndex(t.length);this.appendCustomNodeIfExist(p.CustomNode.DomainLockNode,function(n){_.NodeAppender.appendNodeToOptimalBlockScope(t,e,n.getNode(),r)}),this.appendCustomNodeIfExist(p.CustomNode.NodeCallsControllerFunctionNode,function(n){var o;o=t.length?_.NodeAppender.getOptimalBlockScope(t,r,1):e,_.NodeAppender.prependNode(o,n.getNode())})}},{key:"initialize",value:function(){if(this.customNodes=new n,this.options.domainLock.length){var e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(p.CustomNode.DomainLockNode),r=this.customNodeFactory(p.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(p.CustomNode.DomainLockNode,t),this.customNodes.set(p.CustomNode.NodeCallsControllerFunctionNode,r)}}}]),t}(g.AbstractCustomNodeGroup);u.__decorate([f.initializable(),u.__metadata("design:type",n)],N.prototype,"customNodes",void 0),N=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__ICustomNode)),u.__param(1,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Function,Object,Object])],N),t.DomainLockCustomNodeGroup=N},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(10),p=r(31),m=r(25),g=r(34),_=r(23),N=function(e){function t(e,r,n,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,r,n,i)),c.appendEvent=m.ObfuscationEvent.AfterObfuscation,c.customNodeFactory=e,c}return c(t,e),i(t,[{key:"appendCustomNodes",value:function(e,t){var r=this.getRandomStackTraceIndex(t.length);this.appendCustomNodeIfExist(p.CustomNode.SelfDefendingUnicodeNode,function(n){_.NodeAppender.appendNodeToOptimalBlockScope(t,e,n.getNode(),r)}),this.appendCustomNodeIfExist(p.CustomNode.NodeCallsControllerFunctionNode,function(n){var o;o=t.length?_.NodeAppender.getOptimalBlockScope(t,r,1):e,_.NodeAppender.prependNode(o,n.getNode())})}},{key:"initialize",value:function(){if(this.customNodes=new n,this.options.selfDefending){var e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(p.CustomNode.SelfDefendingUnicodeNode),r=this.customNodeFactory(p.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(p.CustomNode.SelfDefendingUnicodeNode,t),this.customNodes.set(p.CustomNode.NodeCallsControllerFunctionNode,r)}}}]),t}(g.AbstractCustomNodeGroup);u.__decorate([f.initializable(),u.__metadata("design:type",n)],N.prototype,"customNodes",void 0),N=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__ICustomNode)),u.__param(1,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Function,Object,Object])],N),t.SelfDefendingCustomNodeGroup=N},function(e,t,r){"use strict";var n=r(30),o=r(16),a=r(5),i=r(0),s=r(2),c=r(6),u=r(7);Object.defineProperty(t,"__esModule",{value:!0});var d=r(4),l=r(1),f=r(3),p=r(10),m=r(31),g=r(25),_=r(34),N=r(23),v=function(e){function t(e,r,n,o,s){var u;return i(this,t),u=c(this,(t.__proto__||a(t)).call(this,n,o,s)),u.appendEvent=g.ObfuscationEvent.AfterObfuscation,u.customNodeFactory=e,u.stringArrayStorage=r,u}return u(t,e),s(t,[{key:"appendCustomNodes",value:function(e,t){this.stringArrayStorage.getLength()&&(this.appendCustomNodeIfExist(m.CustomNode.StringArrayNode,function(t){N.NodeAppender.prependNode(e,t.getNode())}),this.appendCustomNodeIfExist(m.CustomNode.StringArrayCallsWrapper,function(t){N.NodeAppender.insertNodeAtIndex(e,t.getNode(),1)}),this.appendCustomNodeIfExist(m.CustomNode.StringArrayRotateFunctionNode,function(t){N.NodeAppender.insertNodeAtIndex(e,t.getNode(),1)}))}},{key:"initialize",value:function(){if(this.customNodes=new o,this.options.stringArray){var e,t=this.customNodeFactory(m.CustomNode.StringArrayNode),r=this.customNodeFactory(m.CustomNode.StringArrayCallsWrapper),a=this.customNodeFactory(m.CustomNode.StringArrayRotateFunctionNode),i=this.stringArrayStorage.getStorageId(),s=i.split("|"),c=n(s,2),u=c[0],d=c[1];e=this.options.rotateStringArray?this.randomGenerator.getRandomInteger(100,500):0,t.initialize(this.stringArrayStorage,u,e),r.initialize(u,d),a.initialize(u,e),this.customNodes.set(m.CustomNode.StringArrayNode,t),this.customNodes.set(m.CustomNode.StringArrayCallsWrapper,r),this.options.rotateStringArray&&this.customNodes.set(m.CustomNode.StringArrayRotateFunctionNode,a)}}}]),t}(_.AbstractCustomNodeGroup);d.__decorate([p.initializable(),d.__metadata("design:type",o)],v.prototype,"customNodes",void 0),v=d.__decorate([l.injectable(),d.__param(0,l.inject(f.ServiceIdentifiers.Factory__ICustomNode)),d.__param(1,l.inject(f.ServiceIdentifiers.TStringArrayStorage)),d.__param(2,l.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d.__param(3,l.inject(f.ServiceIdentifiers.IRandomGenerator)),d.__param(4,l.inject(f.ServiceIdentifiers.IOptions)),d.__metadata("design:paramtypes",[Function,Object,Function,Object,Object])],v),t.StringArrayCustomNodeGroup=v},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(10),f=r(14),p=r(15),m=r(9),g=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e){this.operator=e}},{key:"getNodeStructure",value:function(){var e=p.Nodes.getExpressionStatementNode(p.Nodes.getFunctionExpressionNode([p.Nodes.getIdentifierNode("x"),p.Nodes.getIdentifierNode("y")],p.Nodes.getBlockStatementNode([p.Nodes.getReturnStatementNode(p.Nodes.getBinaryExpressionNode(this.operator,p.Nodes.getIdentifierNode("x"),p.Nodes.getIdentifierNode("y")))])));return m.NodeUtils.parentize(e),[e]}}]),t}(f.AbstractCustomNode);c.__decorate([l.initializable(),c.__metadata("design:type",String)],g.prototype,"operator",void 0),g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],g),t.BinaryExpressionFunctionNode=g},function(e,t,r){"use strict";function n(){return"\n var that;\n \n try {\n var getGlobal = Function('return (function() ' + '{}.constructor(\"return this\")( )' + ');');\n \n that = getGlobal();\n } catch (e) {\n that = window;\n }\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableTemplate1=n},function(e,t,r){"use strict";function n(){return"\n var getGlobal = function () {\n var 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 var that = getGlobal();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableTemplate2=n},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(10),f=r(14),p=r(8),m=r(15),g=r(9),_=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e,t,r){this.blockStatementBody=e,this.shuffledKeys=t,this.originalKeysIndexesInShuffledArray=r}},{key:"getNodeStructure",value:function(){var e=this,t=this.randomGenerator.getRandomString(6),r=this.randomGenerator.getRandomString(6),n=m.Nodes.getBlockStatementNode([m.Nodes.getVariableDeclarationNode([m.Nodes.getVariableDeclaratorNode(m.Nodes.getIdentifierNode(t),m.Nodes.getCallExpressionNode(m.Nodes.getMemberExpressionNode(m.Nodes.getLiteralNode(this.originalKeysIndexesInShuffledArray.join("|")),m.Nodes.getIdentifierNode("split")),[m.Nodes.getLiteralNode("|")])),m.Nodes.getVariableDeclaratorNode(m.Nodes.getIdentifierNode(r),m.Nodes.getLiteralNode(0))]),m.Nodes.getWhileStatementNode(m.Nodes.getLiteralNode(!0),m.Nodes.getBlockStatementNode([m.Nodes.getSwitchStatementNode(m.Nodes.getMemberExpressionNode(m.Nodes.getIdentifierNode(t),m.Nodes.getUpdateExpressionNode("++",m.Nodes.getIdentifierNode(r)),!0),this.shuffledKeys.map(function(t,r){var n=e.blockStatementBody[t],o=[n];return p.NodeGuards.isReturnStatementNode(n)||o.push(m.Nodes.getContinueStatement()),m.Nodes.getSwitchCaseNode(m.Nodes.getLiteralNode(String(r)),o)})),m.Nodes.getBreakStatement()]))]);return g.NodeUtils.parentize(n),[n]}}]),t}(f.AbstractCustomNode);c.__decorate([l.initializable(),c.__metadata("design:type",Array)],_.prototype,"blockStatementBody",void 0),c.__decorate([l.initializable(),c.__metadata("design:type",Array)],_.prototype,"originalKeysIndexesInShuffledArray",void 0),c.__decorate([l.initializable(),c.__metadata("design:type",Array)],_.prototype,"shuffledKeys",void 0),_=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],_),t.BlockStatementControlFlowFlatteningNode=_},function(e,t,r){"use strict";var n=r(30),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(10),p=r(14),m=r(15),g=r(9),_=function(e){function t(e,r,n){return a(this,t),s(this,(t.__proto__||o(t)).call(this,e,r,n))}return c(t,e),i(t,[{key:"initialize",value:function(e,t){this.blockStatementNode=e,this.deadCodeInjectionRootAstHostNode=t}},{key:"getNodeStructure",value:function(){var e=this.randomGenerator.getMathRandom()>.5,t=this.randomGenerator.getMathRandom()>.5,r=e?"===":"!==",o=this.randomGenerator.getRandomString(5),a=t?o:this.randomGenerator.getRandomString(5),i=e===t?[this.blockStatementNode,this.deadCodeInjectionRootAstHostNode]:[this.deadCodeInjectionRootAstHostNode,this.blockStatementNode],s=n(i,2),c=s[0],u=s[1],d=m.Nodes.getBlockStatementNode([m.Nodes.getIfStatementNode(m.Nodes.getBinaryExpressionNode(r,m.Nodes.getLiteralNode(o),m.Nodes.getLiteralNode(a)),c,u)]);return g.NodeUtils.parentize(d),[d]}}]),t}(p.AbstractCustomNode);u.__decorate([f.initializable(),u.__metadata("design:type",Object)],_.prototype,"blockStatementNode",void 0),u.__decorate([f.initializable(),u.__metadata("design:type",Object)],_.prototype,"deadCodeInjectionRootAstHostNode",void 0),_=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],_),t.BlockStatementDeadCodeInjectionNode=_},function(e,t,r){"use strict";var n=r(24),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(10),p=r(14),m=r(15),g=r(9),_=function(e){function t(e,r,n){return a(this,t),s(this,(t.__proto__||o(t)).call(this,e,r,n))}return c(t,e),i(t,[{key:"initialize",value:function(e,t,r,n){this.controlFlowStorageName=e,this.controlFlowStorageKey=t,this.callee=r,this.expressionArguments=n}},{key:"getNodeStructure",value:function(){var e=m.Nodes.getExpressionStatementNode(m.Nodes.getCallExpressionNode(m.Nodes.getMemberExpressionNode(m.Nodes.getIdentifierNode(this.controlFlowStorageName),m.Nodes.getIdentifierNode(this.controlFlowStorageKey)),[this.callee].concat(n(this.expressionArguments))));return g.NodeUtils.parentize(e),[e]}}]),t}(p.AbstractCustomNode);u.__decorate([f.initializable(),u.__metadata("design:type",Object)],_.prototype,"callee",void 0),u.__decorate([f.initializable(),u.__metadata("design:type",String)],_.prototype,"controlFlowStorageKey",void 0),u.__decorate([f.initializable(),u.__metadata("design:type",String)],_.prototype,"controlFlowStorageName",void 0),u.__decorate([f.initializable(),u.__metadata("design:type",Array)],_.prototype,"expressionArguments",void 0),_=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],_),t.CallExpressionControlFlowStorageCallNode=_},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(10),f=r(14),p=r(15),m=r(9),g=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e){this.expressionArguments=e}},{key:"getNodeStructure",value:function(){for(var e=p.Nodes.getIdentifierNode("callee"),t=[],r=this.expressionArguments.length,n=0;n<r;n++)t.push(p.Nodes.getIdentifierNode("param".concat(n+1)));var o=p.Nodes.getExpressionStatementNode(p.Nodes.getFunctionExpressionNode([e].concat(t),p.Nodes.getBlockStatementNode([p.Nodes.getReturnStatementNode(p.Nodes.getCallExpressionNode(e,t))])));return m.NodeUtils.parentize(o),[o]}}]),t}(f.AbstractCustomNode);c.__decorate([l.initializable(),c.__metadata("design:type",Array)],g.prototype,"expressionArguments",void 0),g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],g),t.CallExpressionFunctionNode=g},function(e,t,r){"use strict";var n=r(30),o=r(56),a=r(5),i=r(0),s=r(2),c=r(6),u=r(7);Object.defineProperty(t,"__esModule",{value:!0});var d=r(4),l=r(1),f=r(3),p=r(10),m=r(14),g=r(8),_=r(15),N=r(9),v=function(e){function t(e,r,n){return i(this,t),c(this,(t.__proto__||a(t)).call(this,e,r,n))}return u(t,e),s(t,[{key:"initialize",value:function(e){this.controlFlowStorage=e}},{key:"getNodeStructure",value:function(){var e=o(this.controlFlowStorage.getStorage()).map(function(e){var t=n(e,2),r=t[0],o=t[1],a=o.getNode()[0];if(!g.NodeGuards.isExpressionStatementNode(a))throw new Error("Function node for control flow storage object should be passed inside the `ExpressionStatement` node!");return _.Nodes.getPropertyNode(_.Nodes.getIdentifierNode(r),a.expression)}),t=_.Nodes.getVariableDeclarationNode([_.Nodes.getVariableDeclaratorNode(_.Nodes.getIdentifierNode(this.controlFlowStorage.getStorageId()),_.Nodes.getObjectExpressionNode(e))]);return t=N.NodeUtils.parentize(t),[t]}}]),t}(m.AbstractCustomNode);d.__decorate([p.initializable(),d.__metadata("design:type",Object)],v.prototype,"controlFlowStorage",void 0),v=d.__decorate([l.injectable(),d.__param(0,l.inject(f.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),d.__param(1,l.inject(f.ServiceIdentifiers.IRandomGenerator)),d.__param(2,l.inject(f.ServiceIdentifiers.IOptions)),d.__metadata("design:paramtypes",[Function,Object,Object])],v),t.ControlFlowStorageNode=v},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=c.__importDefault(r(19)),f=r(21),p=r(109),m=r(44),g=r(10),_=r(14),N=r(9),v=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e){this.callsControllerFunctionName=e}},{key:"getNodeStructure",value:function(){return N.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.options.target!==f.ObfuscationTarget.Extension?this.getGlobalVariableTemplate():m.GlobalVariableNoEvalTemplate();return l.default(p.ConsoleOutputDisableExpressionTemplate(),{consoleLogDisableFunctionName:this.identifierNamesGenerator.generate(),globalVariableTemplate:e,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}}]),t}(_.AbstractCustomNode);c.__decorate([g.initializable(),c.__metadata("design:type",String)],v.prototype,"callsControllerFunctionName",void 0),v=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],v),t.ConsoleOutputDisableExpressionNode=v},function(e,t,r){"use strict";function n(){return"\n var {consoleLogDisableFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n var func = function () {};\n \n {globalVariableTemplate}\n \n if (!that.console) {\n that.console = (function (func){\n var 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.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.trace = func;\n }\n });\n \n {consoleLogDisableFunctionName}();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleOutputDisableExpressionTemplate=n},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=c.__importDefault(r(19)),f=r(10),p=r(111),m=r(14),g=r(9),_=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e,t){this.debugProtectionFunctionName=e,this.callsControllerFunctionName=t}},{key:"getNodeStructure",value:function(){return g.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return l.default(p.DebugProtectionFunctionCallTemplate(),{debugProtectionFunctionName:this.debugProtectionFunctionName,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}}]),t}(m.AbstractCustomNode);c.__decorate([f.initializable(),c.__metadata("design:type",String)],_.prototype,"callsControllerFunctionName",void 0),c.__decorate([f.initializable(),c.__metadata("design:type",String)],_.prototype,"debugProtectionFunctionName",void 0),_=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],_),t.DebugProtectionFunctionCallNode=_},function(e,t,r){"use strict";function n(){return"\n (function () {\n {singleNodeCallControllerFunctionName}(this, function () {\n var regExp1 = new RegExp('function *\\\\( *\\\\)');\n var regExp2 = new RegExp('\\\\+\\\\+ *\\(?:_0x(?:[a-f0-9]){4,6}|(?:\\\\b|\\\\d)[a-z0-9]{1,4}(?:\\\\b|\\\\d)\\)', 'i');\n \n var 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 "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionCallTemplate=n},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=c.__importDefault(r(19)),f=r(10),p=r(113),m=r(14),g=r(9),_=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e){this.debugProtectionFunctionName=e}},{key:"getNodeStructure",value:function(){return g.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return l.default(p.DebugProtectionFunctionIntervalTemplate(),{debugProtectionFunctionName:this.debugProtectionFunctionName})}}]),t}(m.AbstractCustomNode);c.__decorate([f.initializable(),c.__metadata("design:type",String)],_.prototype,"debugProtectionFunctionName",void 0),_=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],_),t.DebugProtectionFunctionIntervalNode=_},function(e,t,r){"use strict";function n(){return"\n setInterval(function () {\n {debugProtectionFunctionName}();\n }, 4000);\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionIntervalTemplate=n},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=c.__importDefault(r(19)),f=r(21),p=r(10),m=r(115),g=r(116),_=r(117),N=r(14),v=r(9),y=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e){this.debugProtectionFunctionName=e}},{key:"getNodeStructure",value:function(){return v.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.options.target!==f.ObfuscationTarget.Extension?m.DebuggerTemplate():g.DebuggerTemplateNoEval();return l.default(_.DebugProtectionFunctionTemplate(),{debuggerTemplate:e,debugProtectionFunctionName:this.debugProtectionFunctionName})}}]),t}(N.AbstractCustomNode);c.__decorate([p.initializable(),c.__metadata("design:type",String)],y.prototype,"debugProtectionFunctionName",void 0),y=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],y),t.DebugProtectionFunctionNode=y},function(e,t,r){"use strict";function n(){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 "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggerTemplate=n},function(e,t,r){"use strict";function n(){return"\n if (typeof counter === 'string') {\n var 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 "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggerTemplateNoEval=n},function(e,t,r){"use strict";function n(){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 "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionTemplate=n},function(e,t,r){"use strict";var n=r(30),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importDefault(r(19)),p=r(21),m=r(10),g=r(119),_=r(44),N=r(14),v=r(9),y=function(e){function t(e,r,n,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,e,r,i)),c.cryptUtils=n,c}return c(t,e),i(t,[{key:"initialize",value:function(e){this.callsControllerFunctionName=e}},{key:"getNodeStructure",value:function(){return v.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.options.domainLock.join(";"),t=this.cryptUtils.hideString(e,3*e.length),r=n(t,2),o=r[0],a=r[1],i=this.options.target!==p.ObfuscationTarget.Extension?this.getGlobalVariableTemplate():_.GlobalVariableNoEvalTemplate();return f.default(g.DomainLockNodeTemplate(),{domainLockFunctionName:this.identifierNamesGenerator.generate(),diff:a,domains:o,globalVariableTemplate:i,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}}]),t}(N.AbstractCustomNode);u.__decorate([m.initializable(),u.__metadata("design:type",String)],y.prototype,"callsControllerFunctionName",void 0),y=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.ICryptUtils)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object,Object])],y),t.DomainLockNode=y},function(e,t,r){"use strict";function n(){return'\n var {domainLockFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n \n {globalVariableTemplate}\n \n var func = function () {\n return {\n key: \'item\',\n value: \'attribute\',\n getAttribute: function () {\n for (var i = 0; i < 1000; i--) {\n var 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 var regExp = new RegExp("[{diff}]", "g");\n var domains = "{domains}".replace(regExp, "").split(";");\n var document;\n var domain;\n \n for (var 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 (var 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 ((!document && !domain) || (!that[document] && !that[document][domain])) {\n return;\n }\n \n var currentDomain = that[document][domain];\n\n var ok = false;\n \n for (var i = 0; i < domains.length; i++) {\n var domain = domains[i];\n var position = currentDomain.length - domain.length;\n var lastIndex = currentDomain.indexOf(domain, position);\n var endsWith = lastIndex !== -1 && lastIndex === position;\n \n if (endsWith) {\n if (currentDomain.length == domain.length || domain.indexOf(".") === 0) {\n ok = true;\n }\n \n break;\n }\n }\n \n if (!ok) {\n data;\n } else {\n return;\n }\n \n func();\n });\n\n {domainLockFunctionName}();\n '}Object.defineProperty(t,"__esModule",{value:!0}),t.DomainLockNodeTemplate=n},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(10),f=r(14),p=r(15),m=r(9),g=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e,t,r,n){this.controlFlowStorageName=e,this.controlFlowStorageKey=t,this.leftValue=r,this.rightValue=n}},{key:"getNodeStructure",value:function(){var e=p.Nodes.getExpressionStatementNode(p.Nodes.getCallExpressionNode(p.Nodes.getMemberExpressionNode(p.Nodes.getIdentifierNode(this.controlFlowStorageName),p.Nodes.getIdentifierNode(this.controlFlowStorageKey)),[this.leftValue,this.rightValue]));return m.NodeUtils.parentize(e),[e]}}]),t}(f.AbstractCustomNode);c.__decorate([l.initializable(),c.__metadata("design:type",String)],g.prototype,"controlFlowStorageKey",void 0),c.__decorate([l.initializable(),c.__metadata("design:type",String)],g.prototype,"controlFlowStorageName",void 0),c.__decorate([l.initializable(),c.__metadata("design:type",Object)],g.prototype,"leftValue",void 0),c.__decorate([l.initializable(),c.__metadata("design:type",Object)],g.prototype,"rightValue",void 0),g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],g),t.ExpressionWithOperatorControlFlowStorageCallNode=g},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(10),f=r(14),p=r(15),m=r(9),g=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e){this.operator=e}},{key:"getNodeStructure",value:function(){var e=p.Nodes.getExpressionStatementNode(p.Nodes.getFunctionExpressionNode([p.Nodes.getIdentifierNode("x"),p.Nodes.getIdentifierNode("y")],p.Nodes.getBlockStatementNode([p.Nodes.getReturnStatementNode(p.Nodes.getLogicalExpressionNode(this.operator,p.Nodes.getIdentifierNode("x"),p.Nodes.getIdentifierNode("y")))])));return m.NodeUtils.parentize(e),[e]}}]),t}(f.AbstractCustomNode);c.__decorate([l.initializable(),c.__metadata("design:type",String)],g.prototype,"operator",void 0),g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],g),t.LogicalExpressionFunctionNode=g},function(e,t,r){"use strict";var n=r(11),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importDefault(r(19)),p=r(25),m=r(10),g=r(123),_=r(39),N=r(14),v=r(27),y=r(9),h=function(e){function t(e,r,n){return a(this,t),s(this,(t.__proto__||o(t)).call(this,e,r,n))}return c(t,e),i(t,[{key:"initialize",value:function(e,t){this.appendEvent=e,this.callsControllerFunctionName=t}},{key:"getNodeStructure",value:function(){return y.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return this.appendEvent===p.ObfuscationEvent.AfterObfuscation?v.JavaScriptObfuscator.obfuscate(f.default(g.SingleNodeCallControllerTemplate(),{singleNodeCallControllerFunctionName:this.callsControllerFunctionName}),n({},_.NO_ADDITIONAL_NODES_PRESET,{identifierNamesGenerator:this.options.identifierNamesGenerator,seed:this.options.seed})).getObfuscatedCode():f.default(g.SingleNodeCallControllerTemplate(),{singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}}]),t}(N.AbstractCustomNode);u.__decorate([m.initializable(),u.__metadata("design:type",String)],h.prototype,"callsControllerFunctionName",void 0),u.__decorate([m.initializable(),u.__metadata("design:type",String)],h.prototype,"appendEvent",void 0),h=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],h),t.NodeCallsControllerFunctionNode=h},function(e,t,r){"use strict";function n(){return"\n var {singleNodeCallControllerFunctionName} = (function(){\n var firstCall = true;\n \n return function (context, fn){\n var rfn = firstCall ? function(){\n if(fn){\n var 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 "}Object.defineProperty(t,"__esModule",{value:!0}),t.SingleNodeCallControllerTemplate=n},function(e,t,r){"use strict";var n=r(11),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importDefault(r(19)),p=r(10),m=r(39),g=r(125),_=r(14),N=r(27),v=r(9),y=function(e){function t(e,r,n,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,e,r,i)),c.escapeSequenceEncoder=n,c}return c(t,e),i(t,[{key:"initialize",value:function(e){this.callsControllerFunctionName=e}},{key:"getNodeStructure",value:function(){return v.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return N.JavaScriptObfuscator.obfuscate(f.default(g.SelfDefendingTemplate(this.escapeSequenceEncoder),{selfDefendingFunctionName:this.identifierNamesGenerator.generate(),singleNodeCallControllerFunctionName:this.callsControllerFunctionName}),n({},m.NO_ADDITIONAL_NODES_PRESET,{identifierNamesGenerator:this.options.identifierNamesGenerator,seed:this.options.seed,unicodeEscapeSequence:!0})).getObfuscatedCode()}}]),t}(_.AbstractCustomNode);u.__decorate([p.initializable(),u.__metadata("design:type",String)],y.prototype,"callsControllerFunctionName",void 0),y=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IEscapeSequenceEncoder)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object,Object])],y),t.SelfDefendingUnicodeNode=y},function(e,t,r){"use strict";function n(e){return"\n var {selfDefendingFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n var func1 = function(){return 'dev';},\n func2 = function () {\n return 'window';\n };\n \n var test1 = function () {\n var regExp = new RegExp('".concat(e.encode("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}",!0),"');\n \n return !regExp.test(func1.toString());\n };\n \n var test2 = function () {\n var regExp = new RegExp('").concat(e.encode("(\\\\[x|u](\\w){2,4})+",!0),"');\n \n return regExp.test(func2.toString());\n };\n \n var recursiveFunc1 = function (string) {\n var i = ~-1 >> 1 + 255 % 0;\n \n if (string.indexOf('i' === i)) {\n recursiveFunc2(string)\n }\n };\n \n var recursiveFunc2 = function (string) {\n var 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 ")}Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=n},function(e,t,r){"use strict";var n=r(11),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importDefault(r(19)),p=r(21),m=r(37),g=r(10),_=r(39),N=r(127),v=r(44),y=r(128),h=r(129),b=r(130),S=r(131),I=r(132),C=r(14),O=r(27),j=r(9),F=function(e){function t(e,r,n,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,e,r,i)),c.escapeSequenceEncoder=n,c}return c(t,e),i(t,[{key:"initialize",value:function(e,t){this.stringArrayName=e,this.stringArrayCallsWrapperName=t}},{key:"getNodeStructure",value:function(){return j.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.getDecodeStringArrayTemplate();return O.JavaScriptObfuscator.obfuscate(f.default(S.StringArrayCallsWrapperTemplate(),{decodeNodeTemplate:e,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName,stringArrayName:this.stringArrayName}),n({},_.NO_ADDITIONAL_NODES_PRESET,{identifierNamesGenerator:this.options.identifierNamesGenerator,seed:this.options.seed})).getObfuscatedCode()}},{key:"getDecodeStringArrayTemplate",value:function(){var e=this.options.target!==p.ObfuscationTarget.Extension?this.getGlobalVariableTemplate():v.GlobalVariableNoEvalTemplate(),t=f.default(N.AtobTemplate(),{globalVariableTemplate:e}),r="",n="";switch(this.options.selfDefending&&(n=f.default(h.SelfDefendingTemplate(this.randomGenerator,this.escapeSequenceEncoder),{stringArrayCallsWrapperName:this.stringArrayCallsWrapperName,stringArrayName:this.stringArrayName})),this.options.stringArrayEncoding){case m.StringArrayEncoding.Rc4:r=f.default(I.StringArrayRc4DecodeNodeTemplate(this.randomGenerator),{atobPolyfill:t,rc4Polyfill:y.Rc4Template(),selfDefendingCode:n,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName});break;case m.StringArrayEncoding.Base64:r=f.default(b.StringArrayBase64DecodeNodeTemplate(this.randomGenerator),{atobPolyfill:t,selfDefendingCode:n,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName})}return r}}]),t}(C.AbstractCustomNode);u.__decorate([g.initializable(),u.__metadata("design:type",String)],F.prototype,"stringArrayName",void 0),u.__decorate([g.initializable(),u.__metadata("design:type",String)],F.prototype,"stringArrayCallsWrapperName",void 0),F=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IEscapeSequenceEncoder)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object,Object])],F),t.StringArrayCallsWrapper=F},function(e,t,r){"use strict";function n(){return"\n (function () {\n {globalVariableTemplate}\n \n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n that.atob || (\n that.atob = function(input) {\n var str = String(input).replace(/=+$/, '');\n for (\n var bc = 0, bs, buffer, idx = 0, output = '';\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 "}Object.defineProperty(t,"__esModule",{value:!0}),t.AtobTemplate=n},function(e,t,r){"use strict";function n(){return"\n var rc4 = function (str, key) {\n var s = [], j = 0, x, res = '', newStr = '';\n \n str = atob(str);\n \n for (var 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\t for (var 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 (var 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 "}Object.defineProperty(t,"__esModule",{value:!0}),t.Rc4Template=n},function(e,t,r){"use strict";function n(e,t){var r=e.getRandomString(6),n=e.getRandomString(6),o=e.getRandomString(6),a=e.getRandomString(6),i=e.getRandomString(6),s=e.getRandomString(6),c=e.getRandomString(6),u=e.getRandomString(6),d=e.getRandomString(6);return"\n var StatesClass = function (".concat(r,") {\n this.").concat(r," = ").concat(r,";\n this.").concat(n," = [1, 0, 0];\n this.").concat(o," = function(){return 'newState';};\n this.").concat(a," = '").concat(t.encode("\\w+ *\\(\\) *{\\w+ *",!0),"';\n this.").concat(i," = '").concat(t.encode("['|\"].+['|\"];? *}",!0),"';\n };\n \n StatesClass.prototype.").concat(s," = function () {\n var regExp = new RegExp(this.").concat(a," + this.").concat(i,");\n var expression = regExp.test(this.").concat(o,".toString())\n ? --this.").concat(n,"[1]\n : --this.").concat(n,"[0];\n \n return this.").concat(c,"(expression);\n };\n \n StatesClass.prototype.").concat(c," = function (").concat(d,") {\n if (!Boolean(~").concat(d,")) {\n return ").concat(d,";\n }\n \n return this.").concat(u,"(this.").concat(r,");\n };\n\n StatesClass.prototype.").concat(u," = function (").concat(r,") {\n for (var i = 0, len = this.").concat(n,".length; i < len; i++) {\n this.").concat(n,".push(Math.round(Math.random()));\n len = this.").concat(n,".length;\n }\n \n return ").concat(r,"(this.").concat(n,"[0]);\n };\n\n new StatesClass({stringArrayCallsWrapperName}).").concat(s,"();\n ")}Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=n},function(e,t,r){"use strict";function n(e){var t=e.getRandomString(6),r=e.getRandomString(6),n=e.getRandomString(6);return"\n if ({stringArrayCallsWrapperName}.".concat(t," === undefined) {\n {atobPolyfill}\n \n {stringArrayCallsWrapperName}.").concat(r," = function (str) {\n var string = atob(str);\n var newStringChars = [];\n \n for (var 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}.").concat(n," = {};\n \n {stringArrayCallsWrapperName}.").concat(t," = true;\n }\n \n var cachedValue = {stringArrayCallsWrapperName}.").concat(n,"[index];\n \n if (cachedValue === undefined) {\n {selfDefendingCode}\n \n value = {stringArrayCallsWrapperName}.").concat(r,"(value);\n {stringArrayCallsWrapperName}.").concat(n,"[index] = value;\n } else {\n value = cachedValue;\n }\n ")}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayBase64DecodeNodeTemplate=n},function(e,t,r){"use strict";function n(){return"\n var {stringArrayCallsWrapperName} = function (index, key) {\n index = index - 0;\n \n var value = {stringArrayName}[index];\n \n {decodeNodeTemplate}\n \n return value;\n };\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayCallsWrapperTemplate=n},function(e,t,r){"use strict";function n(e){var t=e.getRandomString(6),r=e.getRandomString(6),n=e.getRandomString(6),o=e.getRandomString(6);return"\n if ({stringArrayCallsWrapperName}.".concat(t," === undefined) {\n {atobPolyfill}\n \n {rc4Polyfill}\n {stringArrayCallsWrapperName}.").concat(r," = rc4;\n \n {stringArrayCallsWrapperName}.").concat(n," = {};\n \n {stringArrayCallsWrapperName}.").concat(t," = true;\n }\n \n var cachedValue = {stringArrayCallsWrapperName}.").concat(n,"[index];\n\n if (cachedValue === undefined) {\n if ({stringArrayCallsWrapperName}.").concat(o," === undefined) {\n {selfDefendingCode}\n \n {stringArrayCallsWrapperName}.").concat(o," = true;\n }\n \n value = {stringArrayCallsWrapperName}.").concat(r,"(value, key);\n {stringArrayCallsWrapperName}.").concat(n,"[index] = value;\n } else {\n value = cachedValue;\n }\n ")}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRc4DecodeNodeTemplate=n},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(45),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importDefault(r(19)),p=r(10),m=r(134),g=r(14),_=r(9),N=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return c(t,e),a(t,[{key:"initialize",value:function(e,t,r){this.stringArrayStorage=e,this.stringArrayName=t,this.stringArrayRotateValue=r}},{key:"getNode",value:function(){return this.stringArrayStorage.rotateArray(this.stringArrayRotateValue),s(t.prototype.__proto__||n(t.prototype),"getNode",this).call(this)}},{key:"getNodeStructure",value:function(){return _.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return f.default(m.StringArrayTemplate(),{stringArrayName:this.stringArrayName,stringArray:this.stringArrayStorage.toString()})}}]),t}(g.AbstractCustomNode);u.__decorate([p.initializable(),u.__metadata("design:type",Object)],N.prototype,"stringArrayStorage",void 0),u.__decorate([p.initializable(),u.__metadata("design:type",String)],N.prototype,"stringArrayName",void 0),u.__decorate([p.initializable(),u.__metadata("design:type",Number)],N.prototype,"stringArrayRotateValue",void 0),N=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],N),t.StringArrayNode=N},function(e,t,r){"use strict";function n(){return"\n var {stringArrayName} = [{stringArray}];\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayTemplate=n},function(e,t,r){"use strict";var n=r(11),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importDefault(r(19)),p=r(10),m=r(39),g=r(136),_=r(137),N=r(14),v=r(27),y=r(9),h=r(32),b=function(e){function t(e,r,n,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,e,r,i)),c.escapeSequenceEncoder=n,c}return c(t,e),i(t,[{key:"initialize",value:function(e,t){this.stringArrayName=e,this.stringArrayRotateValue=t}},{key:"getNodeStructure",value:function(){return y.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.identifierNamesGenerator.generate(),t=this.identifierNamesGenerator.generate(),r="";return r=this.options.selfDefending?f.default(g.SelfDefendingTemplate(this.escapeSequenceEncoder),{timesName:e,whileFunctionName:t}):"".concat(t,"(++").concat(e,")"),v.JavaScriptObfuscator.obfuscate(f.default(_.StringArrayRotateFunctionTemplate(),{code:r,timesName:e,stringArrayName:this.stringArrayName,stringArrayRotateValue:h.Utils.decToHex(this.stringArrayRotateValue),whileFunctionName:t}),n({},m.NO_ADDITIONAL_NODES_PRESET,{identifierNamesGenerator:this.options.identifierNamesGenerator,seed:this.options.seed})).getObfuscatedCode()}}]),t}(N.AbstractCustomNode);u.__decorate([p.initializable(),u.__metadata("design:type",String)],b.prototype,"stringArrayName",void 0),u.__decorate([p.initializable(),u.__metadata("design:type",Number)],b.prototype,"stringArrayRotateValue",void 0),b=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IEscapeSequenceEncoder)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object,Object])],b),t.StringArrayRotateFunctionNode=b},function(e,t,r){"use strict";function n(e){return"\n var selfDefendingFunc = function () {\n var object = {\n data: {\n key: 'cookie',\n value: 'timeout'\n },\n setCookie: function (options, name, value, document) {\n document = document || {};\n \n var updatedCookie = name + \"=\" + value;\n\n var i = 0;\n \n for (var i = 0, len = options.length; i < len; i++) {\n var propName = options[i];\n \n updatedCookie += \"; \" + propName;\n \n var 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 var matches = document(new RegExp(\n \"(?:^|; )\" + name.replace(/([.$?*|{}()[]\\/+^])/g, '\\$1') + \"=([^;]*)\"\n ));\n \n var 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 var test1 = function () {\n var regExp = new RegExp('".concat(e.encode("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}",!0),"');\n \n return regExp.test(object.removeCookie.toString());\n };\n \n object['updateCookie'] = test1;\n \n var cookie = '';\n var 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 ")}Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=n},function(e,t,r){"use strict";function n(){return"\n (function (array, {timesName}) {\n var {whileFunctionName} = function (times) {\n while (--times) {\n array['push'](array['shift']());\n }\n };\n \n {code}\n })({stringArrayName}, 0x{stringArrayRotateValue});\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRotateFunctionTemplate=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.False="![]",e.True="!![]",e.a='(false+"")[1]',e.b='([]["entries"]()+"")[2]',e.c='([]["fill"]+"")[3]',e.d='(undefined+"")[2]',e.e='(true+"")[3]',e.f='(false+"")[0]',e.g="(false+[0]+String)[20]",e.h='(+(101))["toString"](21)[1]',e.i="([false]+undefined)[10]",e.j='([]["entries"]()+"")[3]',e.k='(+(20))["toString"](21)',e.l='(false+"")[2]',e.m='(Number+"")[11]',e.n='(undefined+"")[1]',e.o='(true+[]["fill"])[10]',e.p='(+(211))["toString"](31)[1]',e.q='(+(212))["toString"](31)[1]',e.r='(true+"")[1]',e.s='(false+"")[3]',e.t='(true+"")[0]',e.u='(undefined+"")[0]',e.v='(+(31))["toString"](32)',e.w='(+(32))["toString"](33)',e.x='(+(101))["toString"](34)[1]',e.y="(NaN+[Infinity])[10]",e.z='(+(35))["toString"](36)',e.A="(+[]+Array)[10]",e.B="(+[]+Boolean)[10]",e.C='Function("return escape")()(("")["italics"]())[2]',e.D='Function("return escape")()([]["fill"])["slice"]("-1")',e.E='(RegExp+"")[12]',e.F="(+[]+Function)[10]",e.G='(false+Function("return Date")()())[30]',e.H="'H'",e.I='(Infinity+"")[0]',e.J="'J'",e.K="'K'",e.L="'L'",e.M='(true+Function("return Date")()())[30]',e.N='(NaN+"")[0]',e.O='(NaN+Function("return{}")())[11]',e.P="'P'",e.Q="'Q'",e.R="(+[]+RegExp)[10]",e.S="(+[]+String)[10]",e.T='(NaN+Function("return Date")()())[30]',e.U='(NaN+Function("return{}")()["toString"]["call"]())[11]',e.V="'V'",e.W="'W'",e.X="'X'",e.Y="'Y'",e.Z="'Z'"}(t.JSFuck||(t.JSFuck={}))},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(10),f=r(14),p=r(15),m=r(9),g=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e,t){this.controlFlowStorageName=e,this.controlFlowStorageKey=t}},{key:"getNodeStructure",value:function(){var e=p.Nodes.getExpressionStatementNode(p.Nodes.getMemberExpressionNode(p.Nodes.getIdentifierNode(this.controlFlowStorageName),p.Nodes.getIdentifierNode(this.controlFlowStorageKey)));return m.NodeUtils.parentize(e),[e]}}]),t}(f.AbstractCustomNode);c.__decorate([l.initializable(),c.__metadata("design:type",String)],g.prototype,"controlFlowStorageKey",void 0),c.__decorate([l.initializable(),c.__metadata("design:type",String)],g.prototype,"controlFlowStorageName",void 0),g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],g),t.StringLiteralControlFlowStorageCallNode=g},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(10),f=r(14),p=r(15),m=function(e){function t(e,r,a){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r,a))}return s(t,e),a(t,[{key:"initialize",value:function(e){this.literalValue=e}},{key:"getNodeStructure",value:function(){return[p.Nodes.getExpressionStatementNode(p.Nodes.getLiteralNode(this.literalValue))]}}]),t}(f.AbstractCustomNode);c.__decorate([l.initializable(),c.__metadata("design:type",String)],m.prototype,"literalValue",void 0),m=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],m),t.StringLiteralNode=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);t.finalizingTransformersModule=new n.ContainerModule(function(e){})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),a=r(35),i=r(143),s=r(144);t.generatorsModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.IIdentifierNamesGenerator).to(i.HexadecimalIdentifierNamesGenerator).inSingletonScope().whenTargetNamed(a.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator),e(o.ServiceIdentifiers.IIdentifierNamesGenerator).to(s.MangledIdentifierNamesGenerator).inSingletonScope().whenTargetNamed(a.IdentifierNamesGenerator.MangledIdentifierNamesGenerator),e(o.ServiceIdentifiers.Factory__IIdentifierNamesGenerator).toFactory(function(e){var t=null;return function(r){if(t)return t;var n;switch(r.identifierNamesGenerator){case a.IdentifierNamesGenerator.MangledIdentifierNamesGenerator:n=e.container.getNamed(o.ServiceIdentifiers.IIdentifierNamesGenerator,a.IdentifierNamesGenerator.MangledIdentifierNamesGenerator);break;case a.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator:default:n=e.container.getNamed(o.ServiceIdentifiers.IIdentifierNamesGenerator,a.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator)}return t=n,n}})})},function(e,t,r){"use strict";var n=r(29),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(58),p=r(32),m=g=function(e){function t(e,r){var i;return a(this,t),i=s(this,(t.__proto__||o(t)).call(this,e,r)),i.randomVariableNameSet=new n,i}return c(t,e),i(t,[{key:"generate",value:function(){var e=this.randomGenerator.getRandomInteger(1e4,99999999),t=p.Utils.decToHex(e),r=t.substr(0,g.baseIdentifierNameLength),n="_".concat(p.Utils.hexadecimalPrefix).concat(r);return this.randomVariableNameSet.has(n)?this.generate():(this.randomVariableNameSet.add(n),n)}},{key:"generateWithPrefix",value:function(){var e=this.generate();return"".concat(this.options.identifiersPrefix).concat(e).replace("__","_")}}]),t}(f.AbstractIdentifierNamesGenerator);m.baseIdentifierNameLength=6,m=g=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Object,Object])],m),t.HexadecimalIdentifierNamesGenerator=m;var g},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(58),f=p=function(e){function t(e,r){var a;return o(this,t),a=i(this,(t.__proto__||n(t)).call(this,e,r)),a.previousMangledName=p.initMangledNameCharacter,a}return s(t,e),a(t,[{key:"generate",value:function(){var e=p.generateNewMangledName(this.previousMangledName);return this.previousMangledName=e,e}},{key:"generateWithPrefix",value:function(){var e=this.options.identifiersPrefix?"".concat(this.options.identifiersPrefix,"_"):"",t=this.generate();return"".concat(e).concat(t)}}],[{key:"generateNewMangledName",value:function(e){var t=function(e){var t=p.nameSequence,r=e.length,n=function(e){return"0".repeat(e)},o=r-1;do{var a=e.charAt(o),i=t.indexOf(a);if(i!==t.length-1){return e.substring(0,o)+t[i+1]+n(r-(o+1))}--o}while(o>=0);return"a".concat(n(r))}(e);return p.validateMangledName(t)||(t=p.generateNewMangledName(t)),t}},{key:"validateMangledName",value:function(e){return!p.reservedNames.includes(e)}}]),t}(l.AbstractIdentifierNamesGenerator);f.initMangledNameCharacter="9",f.nameSequence="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),f.reservedNames=["byte","case","char","do","else","enum","eval","for","goto","if","in","int","let","long","new","null","this","true","try","var","void","with"],f=p=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object,Object])],f),t.MangledIdentifierNamesGenerator=f;var p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22),o=r(1),a=r(3);t.nodeTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.Factory__INodeTransformer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.INodeTransformer))})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22),o=r(1),a=r(3),i=r(26),s=r(59),c=r(28),u=r(147),d=r(148),l=r(149),f=r(150),p=r(151),m=r(152),g=r(153),_=r(154),N=r(155),v=r(156),y=r(157),h=r(158);t.obfuscatingTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.INodeTransformer).to(l.CatchClauseTransformer).whenTargetNamed(c.NodeTransformer.CatchClauseTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(f.ClassDeclarationTransformer).whenTargetNamed(c.NodeTransformer.ClassDeclarationTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(p.FunctionDeclarationTransformer).whenTargetNamed(c.NodeTransformer.FunctionDeclarationTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(m.FunctionTransformer).whenTargetNamed(c.NodeTransformer.FunctionTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(g.LabeledStatementTransformer).whenTargetNamed(c.NodeTransformer.LabeledStatementTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(_.LiteralTransformer).whenTargetNamed(c.NodeTransformer.LiteralTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(v.ObjectExpressionTransformer).whenTargetNamed(c.NodeTransformer.ObjectExpressionTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(h.VariableDeclarationTransformer).whenTargetNamed(c.NodeTransformer.VariableDeclarationTransformer),e(a.ServiceIdentifiers.IObfuscatingReplacer).to(d.BooleanLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.BooleanLiteralObfuscatingReplacer),e(a.ServiceIdentifiers.IObfuscatingReplacer).to(N.NumberLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.NumberLiteralObfuscatingReplacer),e(a.ServiceIdentifiers.IObfuscatingReplacer).to(y.StringLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.StringLiteralObfuscatingReplacer),e(a.ServiceIdentifiers.IIdentifierObfuscatingReplacer).to(u.BaseIdentifierObfuscatingReplacer).whenTargetNamed(i.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),e(a.ServiceIdentifiers.Factory__IObfuscatingReplacer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.IObfuscatingReplacer)),e(a.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.IIdentifierObfuscatingReplacer))})},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(40),p=r(15),m=function(e){function t(e,r){var i;return a(this,t),i=s(this,(t.__proto__||o(t)).call(this,r)),i.namesMap=new n,i.identifierNamesGenerator=e(r),i}return c(t,e),i(t,[{key:"replace",value:function(e,t){var r="".concat(e,"-").concat(String(t));return this.namesMap.has(r)&&(e=this.namesMap.get(r)),p.Nodes.getIdentifierNode(e)}},{key:"storeGlobalName",value:function(e,t){if(!this.isReservedName(e)){var r=this.identifierNamesGenerator.generateWithPrefix();this.namesMap.set("".concat(e,"-").concat(String(t)),r)}}},{key:"storeLocalName",value:function(e,t){if(!this.isReservedName(e)){var r=this.identifierNamesGenerator.generate();this.namesMap.set("".concat(e,"-").concat(String(t)),r)}}},{key:"isReservedName",value:function(e){return this.options.reservedNames.some(function(t){return null!==new RegExp(t,"g").exec(e)})}}]),t}(f.AbstractObfuscatingReplacer);m=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object])],m),t.BaseIdentifierObfuscatingReplacer=m},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(40),f=r(15),p=m=function(e){function t(e){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e))}return s(t,e),a(t,[{key:"replace",value:function(e){return e?m.getTrueUnaryExpressionNode():m.getFalseUnaryExpressionNode()}}],[{key:"getTrueUnaryExpressionNode",value:function(){return f.Nodes.getUnaryExpressionNode("!",m.getFalseUnaryExpressionNode())}},{key:"getFalseUnaryExpressionNode",value:function(){return f.Nodes.getUnaryExpressionNode("!",f.Nodes.getArrayExpressionNode())}}]),t}(l.AbstractObfuscatingReplacer);p=m=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object])],p),t.BooleanLiteralObfuscatingReplacer=p;var m},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=c.__importStar(r(17)),f=r(26),p=r(12),m=r(13),g=r(8),_=function(e){function t(e,r,a){var s;return o(this,t),s=i(this,(t.__proto__||n(t)).call(this,r,a)),s.identifierObfuscatingReplacer=e(f.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),s}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&g.NodeGuards.isCatchClauseNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++;return this.storeCatchClauseParam(e,r),this.replaceCatchClauseParam(e,r),e}},{key:"storeCatchClauseParam",value:function(e,t){g.NodeGuards.isIdentifierNode(e.param)&&this.identifierObfuscatingReplacer.storeLocalName(e.param.name,t)}},{key:"replaceCatchClauseParam",value:function(e,t){var r=this;l.replace(e,{enter:function(e,n){if(n&&g.NodeGuards.isReplaceableIdentifierNode(e,n)){var o=r.identifierObfuscatingReplacer.replace(e.name,t),a=o.name;e.name!==a&&(e.name=a,e.obfuscatedNode=!0)}}})}}]),t}(m.AbstractNodeTransformer);_=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],_),t.CatchClauseTransformer=_},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importStar(r(17)),p=r(26),m=r(18),g=r(12),_=r(13),N=r(8),v=r(9),y=function(e){function t(e,r,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,r,i)),c.replaceableIdentifiers=new n,c.identifierObfuscatingReplacer=e(p.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),c}return c(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case g.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&N.NodeGuards.isClassDeclarationNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++,n=v.NodeUtils.getBlockScopesOfNode(e)[0],o=n.type===m.NodeType.Program;return!this.options.renameGlobals&&o?e:(this.storeClassName(e,o,r),this.replaceableIdentifiers.has(n)?this.replaceScopeCachedIdentifiers(n,r):this.replaceScopeIdentifiers(n,r),e)}},{key:"storeClassName",value:function(e,t,r){t?this.identifierObfuscatingReplacer.storeGlobalName(e.id.name,r):this.identifierObfuscatingReplacer.storeLocalName(e.id.name,r)}},{key:"replaceScopeCachedIdentifiers",value:function(e,t){var r=this;this.replaceableIdentifiers.get(e).forEach(function(e){var n=r.identifierObfuscatingReplacer.replace(e.name,t);e.name=n.name})}},{key:"replaceScopeIdentifiers",value:function(e,t){var r=this,n=[];f.replace(e,{enter:function(e,o){if(o&&N.NodeGuards.isReplaceableIdentifierNode(e,o)){var a=r.identifierObfuscatingReplacer.replace(e.name,t),i=a.name;e.name!==i?e.name=i:n.push(e)}}}),this.replaceableIdentifiers.set(e,n)}}]),t}(_.AbstractNodeTransformer);y=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],y),t.ClassDeclarationTransformer=y},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importStar(r(17)),p=r(26),m=r(18),g=r(12),_=r(13),N=r(8),v=r(9),y=function(e){function t(e,r,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,r,i)),c.replaceableIdentifiers=new n,c.identifierObfuscatingReplacer=e(p.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),c}return c(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case g.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&N.NodeGuards.isFunctionDeclarationNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++,n=v.NodeUtils.getBlockScopesOfNode(e)[0],o=n.type===m.NodeType.Program;return!this.options.renameGlobals&&o?e:(this.storeFunctionName(e,o,r),this.replaceableIdentifiers.has(n)?this.replaceScopeCachedIdentifiers(e,n,r):this.replaceScopeIdentifiers(n,r),e)}},{key:"storeFunctionName",value:function(e,t,r){t?this.identifierObfuscatingReplacer.storeGlobalName(e.id.name,r):this.identifierObfuscatingReplacer.storeLocalName(e.id.name,r)}},{key:"replaceScopeCachedIdentifiers",value:function(e,t,r){var n=this.replaceableIdentifiers.get(t);if(n){var o=n.get(e.id.name);if(o)for(var a=o.length,i=0;i<a;i++){var s=o[i],c=this.identifierObfuscatingReplacer.replace(s.name,r);s.name=c.name}}}},{key:"replaceScopeIdentifiers",value:function(e,t){var r=this,o=new n;f.replace(e,{enter:function(e,n){if(n&&N.NodeGuards.isReplaceableIdentifierNode(e,n)){var a=r.identifierObfuscatingReplacer.replace(e.name,t),i=a.name;if(e.name!==i)e.name=i;else{var s=o.get(e.name)||[];s.push(e),o.set(e.name,s)}}}}),this.replaceableIdentifiers.set(e,o)}}]),t}(_.AbstractNodeTransformer);y=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],y),t.FunctionDeclarationTransformer=y},function(e,t,r){"use strict";var n=r(29),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importStar(r(17)),p=r(26),m=r(12),g=r(13),_=r(8),N=function(e){function t(e,r,n){var i;return a(this,t),i=s(this,(t.__proto__||o(t)).call(this,r,n)),i.identifierObfuscatingReplacer=e(p.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),i}return c(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case m.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&(_.NodeGuards.isFunctionDeclarationNode(e)||_.NodeGuards.isFunctionExpressionNode(e)||_.NodeGuards.isArrowFunctionExpressionNode(e)))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++;return this.storeFunctionParams(e,r),this.replaceFunctionParams(e,r),e}},{key:"storeFunctionParams",value:function(e,t){var r=this;e.params.forEach(function(e){if(_.NodeGuards.isObjectPatternNode(e))return f.VisitorOption.Skip;f.traverse(e,{enter:function(e){if(_.NodeGuards.isAssignmentPatternNode(e)&&_.NodeGuards.isIdentifierNode(e.left))return r.identifierObfuscatingReplacer.storeLocalName(e.left.name,t),f.VisitorOption.Skip;_.NodeGuards.isIdentifierNode(e)&&r.identifierObfuscatingReplacer.storeLocalName(e.name,t)}})})}},{key:"addIdentifiersToIgnoredIdentifierNamesSet",value:function(e,t){e.forEach(function(e){_.NodeGuards.isIdentifierNode(e.key)&&t.add(e.key.name)})}},{key:"replaceFunctionParams",value:function(e,t){var r=this,o=new n,a={enter:function(e,n){if(_.NodeGuards.isObjectPatternNode(e)&&r.addIdentifiersToIgnoredIdentifierNamesSet(e.properties,o),n&&_.NodeGuards.isReplaceableIdentifierNode(e,n)&&!o.has(e.name)){var a=r.identifierObfuscatingReplacer.replace(e.name,t),i=a.name;e.name!==i&&(e.name=i,e.obfuscatedNode=!0)}}};e.params.forEach(function(e){return f.replace(e,a)}),f.replace(e.body,a)}}]),t}(g.AbstractNodeTransformer);N=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],N),t.FunctionTransformer=N},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=c.__importStar(r(17)),f=r(26),p=r(12),m=r(13),g=r(8),_=function(e){function t(e,r,a){var s;return o(this,t),s=i(this,(t.__proto__||n(t)).call(this,r,a)),s.identifierObfuscatingReplacer=e(f.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),s}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&g.NodeGuards.isLabeledStatementNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++;return this.storeLabeledStatementName(e,r),this.replaceLabeledStatementName(e,r),e}},{key:"storeLabeledStatementName",value:function(e,t){this.identifierObfuscatingReplacer.storeLocalName(e.label.name,t)}},{key:"replaceLabeledStatementName",value:function(e,t){var r=this;l.replace(e,{enter:function(e,n){if(n&&g.NodeGuards.isLabelIdentifierNode(e,n)){var o=r.identifierObfuscatingReplacer.replace(e.name,t);e.name=o.name}}})}}]),t}(m.AbstractNodeTransformer);_=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],_),t.LabeledStatementTransformer=_},function(e,t,r){"use strict";var n=r(50),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(59),p=r(12),m=r(13),g=r(8),_=function(e){function t(e,r,n){var i;return a(this,t),i=s(this,(t.__proto__||o(t)).call(this,r,n)),i.literalObfuscatingReplacerFactory=e,i}return c(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&g.NodeGuards.isLiteralNode(e)&&!e.obfuscatedNode)return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(t&&g.NodeGuards.isPropertyNode(t)&&t.key===e)return e;switch(n(e.value)){case"boolean":return this.literalObfuscatingReplacerFactory(f.LiteralObfuscatingReplacer.BooleanLiteralObfuscatingReplacer).replace(e.value);case"number":return this.literalObfuscatingReplacerFactory(f.LiteralObfuscatingReplacer.NumberLiteralObfuscatingReplacer).replace(e.value);case"string":return this.literalObfuscatingReplacerFactory(f.LiteralObfuscatingReplacer.StringLiteralObfuscatingReplacer).replace(e.value);default:return e}}}]),t}(m.AbstractNodeTransformer);_=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IObfuscatingReplacer)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],_),t.LiteralTransformer=_},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(40),p=r(15),m=r(32),g=function(e){function t(e){var r;return a(this,t),r=s(this,(t.__proto__||o(t)).call(this,e)),r.numberLiteralCache=new n,r}return c(t,e),i(t,[{key:"replace",value:function(e){var t;return this.numberLiteralCache.has(e)?t=this.numberLiteralCache.get(e):(t=m.Utils.isCeilNumber(e)?"".concat(m.Utils.hexadecimalPrefix).concat(m.Utils.decToHex(e)):String(e),this.numberLiteralCache.set(e,t)),p.Nodes.getLiteralNode(e,t)}}]),t}(f.AbstractObfuscatingReplacer);g=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Object])],g),t.NumberLiteralObfuscatingReplacer=g},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(18),f=r(12),p=r(13),m=r(8),g=_=function(e){function t(e,r){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r))}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&m.NodeGuards.isObjectExpressionNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){return e.properties.forEach(function(e){e.computed||(e.shorthand&&(e.shorthand=!1),m.NodeGuards.isIdentifierNode(e.key)&&(e.key=_.transformIdentifierPropertyKey(e.key)))}),e}}],[{key:"transformIdentifierPropertyKey",value:function(e){return{type:l.NodeType.Literal,value:e.name,raw:"'".concat(e.name,"'")}}}]),t}(p.AbstractNodeTransformer);g=_=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object,Object])],g),t.ObjectExpressionTransformer=g;var _},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(37),p=r(40),m=r(15),g=r(32),_=N=function(e){function t(e,r,i,c,u){var d;return a(this,t),d=s(this,(t.__proto__||o(t)).call(this,u)),d.nodesCache=new n,d.stringLiteralHexadecimalIndexCache=new n,d.stringArrayStorage=e,d.escapeSequenceEncoder=r,d.randomGenerator=i,d.cryptUtils=c,d.rc4Keys=d.randomGenerator.getRandomGenerator().n(function(){return d.randomGenerator.getRandomGenerator().string({length:N.rc4KeyLength})},N.rc4KeysCount),d}return c(t,e),i(t,[{key:"replace",value:function(e){var t=this.canUseStringArray(e),r="".concat(e,"-").concat(String(t));if(this.nodesCache.has(r)&&this.options.stringArrayEncoding!==f.StringArrayEncoding.Rc4)return this.nodesCache.get(r);var n=t?this.replaceWithStringArrayCallNode(e):this.replaceWithLiteralNode(e);return this.nodesCache.set(r,n),n}},{key:"canUseStringArray",value:function(e){return this.options.stringArray&&e.length>=N.minimumLengthForStringArray&&this.randomGenerator.getMathRandom()<=this.options.stringArrayThreshold}},{key:"getStringArrayHexadecimalIndex",value:function(e,t){if(this.stringLiteralHexadecimalIndexCache.has(e))return{fromCache:!0,index:this.stringLiteralHexadecimalIndexCache.get(e)};var r=g.Utils.decToHex(t),n="".concat(g.Utils.hexadecimalPrefix).concat(r);return this.stringLiteralHexadecimalIndexCache.set(e,n),{fromCache:!1,index:n}}},{key:"getEncodedValue",value:function(e){var t,r=null;switch(this.options.stringArrayEncoding){case f.StringArrayEncoding.Rc4:r=this.randomGenerator.getRandomGenerator().pickone(this.rc4Keys),t=this.cryptUtils.btoa(this.cryptUtils.rc4(e,r));break;case f.StringArrayEncoding.Base64:t=this.cryptUtils.btoa(e);break;default:t=e}return{encodedValue:t,key:r}}},{key:"replaceWithLiteralNode",value:function(e){return m.Nodes.getLiteralNode(this.escapeSequenceEncoder.encode(e,this.options.unicodeEscapeSequence))}},{key:"replaceWithStringArrayCallNode",value:function(e){var t=this.getEncodedValue(e),r=t.encodedValue,n=t.key,o=this.escapeSequenceEncoder.encode(r,this.options.unicodeEscapeSequence),a=this.stringArrayStorage.getLength(),i=this.stringArrayStorage.getStorageId().split("|")[1],s=this.getStringArrayHexadecimalIndex(o,a),c=s.fromCache,u=s.index;c||this.stringArrayStorage.set(a,o);var d=[N.getHexadecimalLiteralNode(u)];n&&d.push(N.getRc4KeyLiteralNode(this.escapeSequenceEncoder.encode(n,this.options.unicodeEscapeSequence)));var l=m.Nodes.getIdentifierNode(i);return l.obfuscatedNode=!0,m.Nodes.getCallExpressionNode(l,d)}}],[{key:"getHexadecimalLiteralNode",value:function(e){var t=m.Nodes.getLiteralNode(e);return t.obfuscatedNode=!0,t}},{key:"getRc4KeyLiteralNode",value:function(e){var t=m.Nodes.getLiteralNode(e);return t.obfuscatedNode=!0,t}}]),t}(p.AbstractObfuscatingReplacer);_.minimumLengthForStringArray=3,_.rc4KeyLength=4,_.rc4KeysCount=50,_=N=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.TStringArrayStorage)),u.__param(1,d.inject(l.ServiceIdentifiers.IEscapeSequenceEncoder)),u.__param(2,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(3,d.inject(l.ServiceIdentifiers.ICryptUtils)),u.__param(4,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Object,Object,Object,Object,Object])],_),t.StringLiteralObfuscatingReplacer=_;var N},function(e,t,r){"use strict";var n=r(16),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importStar(r(17)),p=r(26),m=r(18),g=r(12),_=r(13),N=r(8),v=r(9),y=function(e){function t(e,r,i){var c;return a(this,t),c=s(this,(t.__proto__||o(t)).call(this,r,i)),c.replaceableIdentifiers=new n,c.identifierObfuscatingReplacer=e(p.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),c}return c(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case g.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&N.NodeGuards.isVariableDeclarationNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=v.NodeUtils.getBlockScopesOfNode(e)[0],n=r.type===m.NodeType.Program;if(!this.options.renameGlobals&&n)return e;var o=this.nodeIdentifier++,a="var"===e.kind?r:t;return this.storeVariableNames(e,n,o),this.replaceableIdentifiers.has(a)?this.replaceScopeCachedIdentifiers(e,a,o):this.replaceScopeIdentifiers(a,o),e}},{key:"storeVariableNames",value:function(e,t,r){var n=this;this.traverseDeclarationIdentifiers(e,function(e){t?n.identifierObfuscatingReplacer.storeGlobalName(e.name,r):n.identifierObfuscatingReplacer.storeLocalName(e.name,r)})}},{key:"replaceScopeCachedIdentifiers",value:function(e,t,r){var n=this,o=this.replaceableIdentifiers.get(t);if(o){var a=[];this.traverseDeclarationIdentifiers(e,function(e){a.push(e.name)}),a.forEach(function(e){var t=o.get(e);if(t)for(var a=t.length,i=0;i<a;i++){var s=t[i];if(e===s.name){var c=n.identifierObfuscatingReplacer.replace(s.name,r);s.name=c.name}}})}}},{key:"replaceScopeIdentifiers",value:function(e,t){var r=this,o=new n;f.replace(e,{enter:function(e,n){if(n&&!e.obfuscatedNode&&N.NodeGuards.isReplaceableIdentifierNode(e,n)){var a=r.identifierObfuscatingReplacer.replace(e.name,t),i=a.name;if(e.name!==i)e.name=i;else{var s=o.get(e.name)||[];s.push(e),o.set(e.name,s)}}}}),this.replaceableIdentifiers.set(e,o)}},{key:"traverseDeclarationIdentifiers",value:function(e,t){e.declarations.forEach(function(e){if(N.NodeGuards.isObjectPatternNode(e.id))return f.VisitorOption.Skip;f.traverse(e.id,{enter:function(e){N.NodeGuards.isIdentifierNode(e)&&t(e)}})})}}]),t}(_.AbstractNodeTransformer);y=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],y),t.VariableDeclarationTransformer=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),a=r(160),i=r(163);t.optionsModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.IOptions).to(a.Options).inSingletonScope(),e(o.ServiceIdentifiers.IOptionsNormalizer).to(i.OptionsNormalizer).inSingletonScope()})},function(e,t,r){"use strict";var n=r(11),o=r(0);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=r(161),u=r(35),d=r(21),l=r(36),f=r(37),p=r(46),m=r(162),g=_=function e(t,r){o(this,e),n(this,p.DEFAULT_PRESET,t);var a=c.validateSync(this,_.validatorOptions);if(a.length)throw new ReferenceError("Validation failed. errors:\n".concat(m.ValidationErrorsFormatter.format(a)));n(this,r.normalize(this))};g.validatorOptions={validationError:{target:!1}},a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"compact",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"controlFlowFlattening",void 0),a.__decorate([c.IsNumber(),c.Min(0),c.Max(1),a.__metadata("design:type",Number)],g.prototype,"controlFlowFlatteningThreshold",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"deadCodeInjection",void 0),a.__decorate([c.IsNumber(),a.__metadata("design:type",Number)],g.prototype,"deadCodeInjectionThreshold",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"debugProtection",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"debugProtectionInterval",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"disableConsoleOutput",void 0),a.__decorate([c.IsArray(),c.ArrayUnique(),c.IsString({each:!0}),a.__metadata("design:type",Array)],g.prototype,"domainLock",void 0),a.__decorate([c.IsIn([u.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,u.IdentifierNamesGenerator.MangledIdentifierNamesGenerator]),a.__metadata("design:type",String)],g.prototype,"identifierNamesGenerator",void 0),a.__decorate([c.IsString(),a.__metadata("design:type",String)],g.prototype,"identifiersPrefix",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"log",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"renameGlobals",void 0),a.__decorate([c.IsArray(),c.ArrayUnique(),c.IsString({each:!0}),a.__metadata("design:type",Array)],g.prototype,"reservedNames",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"rotateStringArray",void 0),a.__decorate([c.IsNumber(),a.__metadata("design:type",Number)],g.prototype,"seed",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"selfDefending",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"sourceMap",void 0),a.__decorate([c.IsString(),c.ValidateIf(function(e){return Boolean(e.sourceMapBaseUrl)}),c.IsUrl({require_protocol:!0,require_tld:!1,require_valid_protocol:!0}),a.__metadata("design:type",String)],g.prototype,"sourceMapBaseUrl",void 0),a.__decorate([c.IsString(),a.__metadata("design:type",String)],g.prototype,"sourceMapFileName",void 0),a.__decorate([c.IsIn([l.SourceMapMode.Inline,l.SourceMapMode.Separate]),a.__metadata("design:type",String)],g.prototype,"sourceMapMode",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"stringArray",void 0),a.__decorate([c.IsIn([!0,!1,f.StringArrayEncoding.Base64,f.StringArrayEncoding.Rc4]),a.__metadata("design:type",Object)],g.prototype,"stringArrayEncoding",void 0),a.__decorate([c.IsNumber(),c.Min(0),c.Max(1),a.__metadata("design:type",Number)],g.prototype,"stringArrayThreshold",void 0),a.__decorate([c.IsIn([d.ObfuscationTarget.Browser,d.ObfuscationTarget.Extension,d.ObfuscationTarget.Node]),a.__metadata("design:type",String)],g.prototype,"target",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"transformObjectKeys",void 0),a.__decorate([c.IsBoolean(),a.__metadata("design:type",Boolean)],g.prototype,"unicodeEscapeSequence",void 0),g=_=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.TInputOptions)),a.__param(1,i.inject(s.ServiceIdentifiers.IOptionsNormalizer)),a.__metadata("design:paramtypes",[Object,Object])],g),t.Options=g;var _},function(e,t){e.exports=require("class-validator")},function(e,t,r){"use strict";var n=r(33),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){o(this,e)}return a(e,null,[{key:"format",value:function(t){var r=[],o=!0,a=!1,i=void 0;try{for(var s,c=n(t);!(o=(s=c.next()).done);o=!0){var u=s.value;r.push(e.formatError(u))}}catch(e){a=!0,i=e}finally{try{o||null==c.return||c.return()}finally{if(a)throw i}}return r.join("\n")}},{key:"formatError",value:function(e){var t=e.constraints,r="`".concat(e.property,"` errors:\n");for(var n in t)t.hasOwnProperty(n)&&(r+=" - ".concat(t[n],"\n"));return r}}]),e}();t.ValidationErrorsFormatter=i},function(e,t,r){"use strict";var n=r(33),o=r(11),a=r(0),i=r(2);Object.defineProperty(t,"__esModule",{value:!0});var s=r(4),c=r(1),u=r(164),d=r(165),l=r(166),f=r(167),p=r(168),m=r(169),g=r(170),_=r(171),N=r(172),v=r(173),y=h=function(){function e(){a(this,e)}return i(e,[{key:"normalize",value:function(e){var t=o({},e),r=!0,a=!1,i=void 0;try{for(var s,c=n(h.normalizerRules);!(r=(s=c.next()).done);r=!0){t=(0,s.value)(t)}}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return t}}]),e}();y.normalizerRules=[u.ControlFlowFlatteningThresholdRule,d.DeadCodeInjectionRule,l.DeadCodeInjectionThresholdRule,f.DomainLockRule,p.SelfDefendingRule,m.SourceMapBaseUrlRule,g.SourceMapFileNameRule,_.StringArrayRule,N.StringArrayEncodingRule,v.StringArrayThresholdRule],y=h=s.__decorate([c.injectable()],y),t.OptionsNormalizer=y;var h},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0}),t.ControlFlowFlatteningThresholdRule=function(e){return 0===e.controlFlowFlatteningThreshold&&(e=n({},e,{controlFlowFlattening:!1,controlFlowFlatteningThreshold:0})),e}},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0});var o=r(46);t.DeadCodeInjectionRule=function(e){return e.deadCodeInjection&&(e=n({},e,{deadCodeInjection:!0,stringArray:!0}),e.stringArrayThreshold||(e=n({},e,{stringArray:!0,stringArrayThreshold:o.DEFAULT_PRESET.stringArrayThreshold}))),e}},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0}),t.DeadCodeInjectionThresholdRule=function(e){return 0===e.deadCodeInjectionThreshold&&(e=n({},e,{deadCodeInjection:!1,deadCodeInjectionThreshold:0})),e}},function(e,t,r){"use strict";var n=r(33),o=r(11);Object.defineProperty(t,"__esModule",{value:!0});var a=r(32);t.DomainLockRule=function(e){if(e.domainLock.length){var t=[],r=!0,i=!1,s=void 0;try{for(var c,u=n(e.domainLock);!(r=(c=u.next()).done);r=!0){var d=c.value;t.push(a.Utils.extractDomainFromUrl(d))}}catch(e){i=!0,s=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw s}}e=o({},e,{domainLock:t})}return e}},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingRule=function(e){return e.selfDefending&&(e=n({},e,{compact:!0,selfDefending:!0})),e}},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0}),t.SourceMapBaseUrlRule=function(e){var t=e,r=t.sourceMapBaseUrl;return e.sourceMapFileName?(r&&!r.endsWith("/")&&(e=n({},e,{sourceMapBaseUrl:"".concat(r,"/")})),e):e=n({},e,{sourceMapBaseUrl:""})}},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0}),t.SourceMapFileNameRule=function(e){var t=e,r=t.sourceMapFileName;return r&&(r=r.replace(/^\/+/,"").split(".")[0],e=n({},e,{sourceMapFileName:"".concat(r,".js.map")})),e}},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRule=function(e){return e.stringArray||(e=n({},e,{rotateStringArray:!1,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0})),e}},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0});var o=r(37);t.StringArrayEncodingRule=function(e){return!0===e.stringArrayEncoding&&(e=n({},e,{stringArrayEncoding:o.StringArrayEncoding.Base64})),e}},function(e,t,r){"use strict";var n=r(11);Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayThresholdRule=function(e){return 0===e.stringArrayThreshold&&(e=n({},e,{rotateStringArray:!1,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22),o=r(1),a=r(3),i=r(28),s=r(60),c=r(175),u=r(176),d=r(177),l=r(178),f=r(179),p=r(181),m=r(182);t.preparingTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.INodeTransformer).to(u.CommentsTransformer).whenTargetNamed(i.NodeTransformer.CommentsTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(l.CustomNodesTransformer).whenTargetNamed(i.NodeTransformer.CustomNodesTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(f.EvalCallExpressionTransformer).whenTargetNamed(i.NodeTransformer.EvalCallExpressionTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(p.ObfuscatingGuardsTransformer).whenTargetNamed(i.NodeTransformer.ObfuscatingGuardsTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(m.ParentificationTransformer).whenTargetNamed(i.NodeTransformer.ParentificationTransformer),e(a.ServiceIdentifiers.INodeGuard).to(c.BlackListObfuscatingGuard).inSingletonScope().whenTargetNamed(s.ObfuscatingGuard.BlackListNodeGuard),e(a.ServiceIdentifiers.INodeGuard).to(d.ConditionalCommentObfuscatingGuard).inSingletonScope().whenTargetNamed(s.ObfuscatingGuard.ConditionalCommentNodeGuard),e(a.ServiceIdentifiers.Factory__INodeGuard).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.INodeGuard))})},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(8),c=u=function(){function e(){n(this,e),this.blackListGuardsLength=u.blackListGuards.length}return o(e,[{key:"check",value:function(e){for(var t=0;t<this.blackListGuardsLength;t++)if(u.blackListGuards[t](e))return!1;return!0}}]),e}();c.blackListGuards=[s.NodeGuards.isUseStrictOperator],c=u=a.__decorate([i.injectable(),a.__metadata("design:paramtypes",[])],c),t.BlackListObfuscatingGuard=c;var u},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(12),f=r(13),p=r(8),m=g=function(e){function t(e,r){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r))}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case l.TransformationStage.Preparing:return{leave:function(e,r){if(r&&p.NodeGuards.isNodeWithComments(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){return e.leadingComments&&(e.leadingComments=this.transformComments(e.leadingComments)),e.trailingComments&&(e.trailingComments=this.transformComments(e.trailingComments)),e}},{key:"transformComments",value:function(e){return e.filter(function(e){return g.preservedWords.some(function(t){return e.value.includes(t)})})}}]),t}(f.AbstractNodeTransformer);m.preservedWords=["@license","@preserve"],m=g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object,Object])],m),t.CommentsTransformer=m;var g},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(8),c=u=function(){function e(){n(this,e),this.obfuscationAllowedForCurrentNode=!0,this.obfuscationAllowedForNextNode=null}return o(e,[{key:"check",value:function(e){if(this.obfuscationAllowedForNextNode&&(this.obfuscationAllowedForCurrentNode=this.obfuscationAllowedForNextNode,this.obfuscationAllowedForNextNode=null),!s.NodeGuards.isNodeWithComments(e))return this.obfuscationAllowedForCurrentNode;var t=e.leadingComments,r=e.trailingComments;return t&&(this.obfuscationAllowedForCurrentNode=this.checkComments(t)),r&&(this.obfuscationAllowedForNextNode=this.checkComments(r)),this.obfuscationAllowedForCurrentNode}},{key:"checkComments",value:function(e){for(var t=e.length,r=this.obfuscationAllowedForCurrentNode,n=0;n<t;n++){var o=e[n];u.obfuscationEnableCommentRegExp.test(o.value)?r=!0:u.obfuscationDisableCommentRegExp.test(o.value)&&(r=!1)}return r}}]),e}();c.obfuscationEnableCommentRegExp=new RegExp("javascript-obfuscator *: *enable"),c.obfuscationDisableCommentRegExp=new RegExp("javascript-obfuscator *: *disable"),c=u=a.__decorate([i.injectable()],c),t.ConditionalCommentObfuscatingGuard=c;var u},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(25),f=r(12),p=r(13),m=r(8),g=function(e){function t(e,r,a,s,c){var u;return o(this,t),u=i(this,(t.__proto__||n(t)).call(this,s,c)),u.stackTraceData=[],u.stackTraceAnalyzer=e,u.obfuscationEventEmitter=r,u.customNodeGroupStorage=a,u}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Preparing:return{leave:function(e,r){if(m.NodeGuards.isProgramNode(e))return t.analyzeNode(e,r),t.appendCustomNodesBeforeObfuscation(e,r),t.transformNode(e,r)}};case f.TransformationStage.Finalizing:return{leave:function(e,r){m.NodeGuards.isProgramNode(e)&&t.appendCustomNodesAfterObfuscation(e,r)}};default:return null}}},{key:"analyzeNode",value:function(e,t){this.stackTraceData=this.stackTraceAnalyzer.analyze(e)}},{key:"transformNode",value:function(e,t){return e}},{key:"appendCustomNodesBeforeObfuscation",value:function(e,t){var r=this;this.customNodeGroupStorage.getStorage().forEach(function(e){e.initialize(),r.obfuscationEventEmitter.once(e.getAppendEvent(),e.appendCustomNodes.bind(e))}),this.obfuscationEventEmitter.emit(l.ObfuscationEvent.BeforeObfuscation,e,this.stackTraceData)}},{key:"appendCustomNodesAfterObfuscation",value:function(e,t){this.obfuscationEventEmitter.emit(l.ObfuscationEvent.AfterObfuscation,e,this.stackTraceData)}}]),t}(p.AbstractNodeTransformer);g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.IStackTraceAnalyzer)),c.__param(1,u.inject(d.ServiceIdentifiers.IObfuscationEventEmitter)),c.__param(2,u.inject(d.ServiceIdentifiers.TCustomNodeGroupStorage)),c.__param(3,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(4,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object,Object,Object,Object,Object])],g),t.CustomNodesTransformer=g},function(e,t,r){"use strict";var n=r(29),o=r(5),a=r(0),i=r(2),s=r(6),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=u.__importDefault(r(180)),p=r(12),m=r(13),g=r(8),_=r(15),N=r(9),v=y=function(e){function t(e,r){var i;return a(this,t),i=s(this,(t.__proto__||o(t)).call(this,e,r)),i.evalRootAstHostNodeSet=new n,i}return c(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Preparing:return{enter:function(e,r){if(r&&g.NodeGuards.isCallExpressionNode(e)&&g.NodeGuards.isIdentifierNode(e.callee)&&"eval"===e.callee.name)return t.transformNode(e,r)}};case p.TransformationStage.Finalizing:return this.evalRootAstHostNodeSet.size?{leave:function(e,r){if(r&&t.isEvalRootAstHostNode(e))return t.restoreNode(e,r)}}:null;default:return null}}},{key:"transformNode",value:function(e,t){var r=e.arguments[0];if(!r)return e;var n=y.extractEvalStringFromCallExpressionArgument(r);if(!n)return e;var o;try{o=N.NodeUtils.convertCodeToStructure(n)}catch(t){return e}var a=_.Nodes.getFunctionExpressionNode([],_.Nodes.getBlockStatementNode(o));return this.evalRootAstHostNodeSet.add(a),a}},{key:"restoreNode",value:function(e,t){var r=e.body.body,n=N.NodeUtils.convertStructureToCode(r);return _.Nodes.getCallExpressionNode(_.Nodes.getIdentifierNode("eval"),[_.Nodes.getLiteralNode(f.default(n))])}},{key:"isEvalRootAstHostNode",value:function(e){return g.NodeGuards.isFunctionExpressionNode(e)&&this.evalRootAstHostNodeSet.has(e)}}],[{key:"extractEvalStringFromCallExpressionArgument",value:function(e){return g.NodeGuards.isLiteralNode(e)?y.extractEvalStringFromLiteralNode(e):g.NodeGuards.isTemplateLiteralNode(e)?y.extractEvalStringFromTemplateLiteralNode(e):null}},{key:"extractEvalStringFromLiteralNode",value:function(e){return"string"==typeof e.value?e.value:null}},{key:"extractEvalStringFromTemplateLiteralNode",value:function(e){var t=e.quasis;return 1!==t.length||e.expressions.length?null:t[0].value.cooked}}]),t}(m.AbstractNodeTransformer);v=y=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Object,Object])],v),t.EvalCallExpressionTransformer=v;var y},function(e,t){e.exports=require("js-string-escape")},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(60),f=r(12),p=r(13),m=g=function(e){function t(e,r,a){var s;return o(this,t),s=i(this,(t.__proto__||n(t)).call(this,r,a)),s.obfuscatingGuards=g.obfuscatingGuardsList.map(e),s}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Preparing:return{enter:function(e,r){return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.obfuscatingGuards.every(function(t){return t.check(e)});return e.ignoredNode=!r,e}}]),t}(p.AbstractNodeTransformer);m.obfuscatingGuardsList=[l.ObfuscatingGuard.BlackListNodeGuard,l.ObfuscatingGuard.ConditionalCommentNodeGuard],m=g=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.Factory__INodeGuard)),c.__param(1,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],m),t.ObfuscatingGuardsTransformer=m;var g},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(7);Object.defineProperty(t,"__esModule",{value:!0});var c=r(4),u=r(1),d=r(3),l=r(12),f=r(13),p=r(9),m=function(e){function t(e,r){return o(this,t),i(this,(t.__proto__||n(t)).call(this,e,r))}return s(t,e),a(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case l.TransformationStage.Preparing:return{enter:function(e,r){return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){return p.NodeUtils.parentizeNode(e,t)}}]),t}(f.AbstractNodeTransformer);m=c.__decorate([u.injectable(),c.__param(0,u.inject(d.ServiceIdentifiers.IRandomGenerator)),c.__param(1,u.inject(d.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object,Object])],m),t.ParentificationTransformer=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),a=r(184),i=r(185),s=r(186);t.storagesModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.TCustomNodeGroupStorage).to(i.CustomNodeGroupStorage).inSingletonScope(),e(o.ServiceIdentifiers.TStringArrayStorage).to(s.StringArrayStorage).inSingletonScope(),e(o.ServiceIdentifiers.Newable__TControlFlowStorage).toConstructor(a.ControlFlowStorage),e(o.ServiceIdentifiers.Factory__TControlFlowStorage).toFactory(function(e){return function(){var t=e.container.get(o.ServiceIdentifiers.Newable__TControlFlowStorage),r=e.container.get(o.ServiceIdentifiers.IRandomGenerator),n=e.container.get(o.ServiceIdentifiers.IOptions),a=new t(r,n);return a.initialize(),a}})})},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(6),i=r(7);Object.defineProperty(t,"__esModule",{value:!0});var s=r(4),c=r(1),u=r(3),d=r(61),l=function(e){function t(e,r){return o(this,t),a(this,(t.__proto__||n(t)).call(this,e,r))}return i(t,e),t}(d.MapStorage);l=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],l),t.ControlFlowStorage=l},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(45),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(55),p=r(61),m=g=function(e){function t(e,r,a){var s;return o(this,t),s=i(this,(t.__proto__||n(t)).call(this,r,a)),s.customNodeGroupFactory=e,s}return c(t,e),a(t,[{key:"initialize",value:function(){var e=this;s(t.prototype.__proto__||n(t.prototype),"initialize",this).call(this),g.customNodeGroupsList.forEach(function(t){var r=e.customNodeGroupFactory(t);r&&e.storage.set(t,r)})}}]),t}(p.MapStorage);m.customNodeGroupsList=[f.CustomNodeGroup.ConsoleOutputCustomNodeGroup,f.CustomNodeGroup.DebugProtectionCustomNodeGroup,f.CustomNodeGroup.DomainLockCustomNodeGroup,f.CustomNodeGroup.SelfDefendingCustomNodeGroup,f.CustomNodeGroup.StringArrayCustomNodeGroup],u.__decorate([d.postConstruct(),u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],m.prototype,"initialize",null),m=g=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__ICustomNodeGroup)),u.__param(1,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(2,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object])],m),t.CustomNodeGroupStorage=m;var g},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(2),i=r(6),s=r(45),c=r(7);Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),d=r(1),l=r(3),f=r(187),p=m=function(e){function t(e,r,a,s){var c;return o(this,t),c=i(this,(t.__proto__||n(t)).call(this,a,s)),c.identifierNamesGenerator=e(s),c.arrayUtils=r,c}return c(t,e),a(t,[{key:"initialize",value:function(){s(t.prototype.__proto__||n(t.prototype),"initialize",this).call(this);var e=this.identifierNamesGenerator.generate().slice(0,m.stringArrayNameLength),r=this.identifierNamesGenerator.generate().slice(0,m.stringArrayNameLength),o="".concat(this.options.identifiersPrefix).concat(e),a="".concat(this.options.identifiersPrefix).concat(r);this.storageId="".concat(o,"|").concat(a)}},{key:"rotateArray",value:function(e){this.storage=this.arrayUtils.arrayRotate(this.storage,e)}},{key:"toString",value:function(){return this.storage.map(function(e){return"'".concat(e,"'")}).toString()}}]),t}(f.ArrayStorage);p.stringArrayNameLength=7,u.__decorate([d.postConstruct(),u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],p.prototype,"initialize",null),p=m=u.__decorate([d.injectable(),u.__param(0,d.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),u.__param(1,d.inject(l.ServiceIdentifiers.IArrayUtils)),u.__param(2,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u.__param(3,d.inject(l.ServiceIdentifiers.IOptions)),u.__metadata("design:paramtypes",[Function,Object,Object,Object])],p),t.StringArrayStorage=p;var m},function(e,t,r){"use strict";var n=r(24),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(1),c=r(3),u=r(10),d=function(){function e(t,r){o(this,e),this.storageLength=0,this.randomGenerator=t,this.options=r}return a(e,[{key:"initialize",value:function(){this.storage=[],this.storageId=this.randomGenerator.getRandomString(6)}},{key:"get",value:function(e){var t=this.storage[e];if(!t)throw new Error("No value found in array storage with key `".concat(e,"`"));return t}},{key:"getKeyOf",value:function(e){var t=this.storage.indexOf(e);return t>=0?t:null}},{key:"getLength",value:function(){return this.storageLength}},{key:"getStorage",value:function(){return this.storage}},{key:"getStorageId",value:function(){return this.storageId}},{key:"mergeWith",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.storage=n(this.storage).concat(n(e.getStorage())),t&&(this.storageId=e.getStorageId())}},{key:"set",value:function(e,t){e===this.storageLength?this.storage.push(t):this.storage.splice(e,0,t),this.storageLength++}}]),e}();i.__decorate([u.initializable(),i.__metadata("design:type",Array)],d.prototype,"storage",void 0),i.__decorate([u.initializable(),i.__metadata("design:type",String)],d.prototype,"storageId",void 0),i.__decorate([s.postConstruct(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],d.prototype,"initialize",null),d=i.__decorate([s.injectable(),i.__param(0,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i.__param(1,s.inject(c.ServiceIdentifiers.IOptions)),i.__metadata("design:paramtypes",[Object,Object])],d),t.ArrayStorage=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),a=r(189),i=r(190),s=r(193),c=r(62);t.utilsModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.IArrayUtils).to(a.ArrayUtils).inSingletonScope(),e(o.ServiceIdentifiers.IRandomGenerator).to(c.RandomGenerator).inSingletonScope(),e(o.ServiceIdentifiers.ICryptUtils).to(i.CryptUtils).inSingletonScope(),e(o.ServiceIdentifiers.IEscapeSequenceEncoder).to(s.EscapeSequenceEncoder).inSingletonScope()})},function(e,t,r){"use strict";var n=r(24),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(1),c=r(3),u=function(){function e(t){o(this,e),this.randomGenerator=t}return a(e,[{key:"arrayRange",value:function(e){for(var t=[],r=0;r<e;r++)t.push(r);return t}},{key:"arrayRotate",value:function(e,t){if(!e.length)throw new ReferenceError("Cannot rotate empty array.");if(t<=0)return e;for(var r,n=e;t--;)r=n.pop(),n.unshift(r);return n}},{key:"arrayShuffle",value:function(e){for(var t=n(e),r=t.length;r;r--){var o=Math.floor(this.randomGenerator.getMathRandom()*r),a=[t[o],t[r-1]];t[r-1]=a[0],t[o]=a[1]}return t}}]),e}();u=i.__decorate([s.injectable(),i.__param(0,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i.__metadata("design:paramtypes",[Object])],u),t.ArrayUtils=u},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=r(62),u=r(32),d=function(){function e(t){n(this,e),this.randomGenerator=t}return o(e,[{key:"btoa",value:function(e){var t="";e=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode(parseInt("".concat(u.Utils.hexadecimalPrefix).concat(t)))});for(var r,n,o=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.charAt(0|o)||(a="=",o%1);t+=a.charAt(63&r>>8-o%1*8)){if((n=e.charCodeAt(o+=.75))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|n}return t}},{key:"hideString",value:function(e,t){var r=this,n=this.randomGenerator.getRandomGenerator().string({length:t,pool:c.RandomGenerator.randomGeneratorPool}),o=n.replace(new RegExp("[".concat(function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e),"]"),"g"),""),a=o.split("");return this.randomGenerator.getRandomGenerator().shuffle(a),o=a.join(""),[function(e,t){for(var n=-1,o=-1,a="";n<e.length||o<t.length;)r.randomGenerator.getMathRandom()<.5&&o<t.length?a+=t.charAt(++o):a+=e.charAt(++n);return a}(e,o),o]}},{key:"rc4",value:function(e,t){for(var r,n=[],o=0,a="",i=0;i<256;i++)n[i]=i;for(i=0;i<256;i++)o=(o+n[i]+t.charCodeAt(i%t.length))%256,r=n[i],n[i]=n[o],n[o]=r;i=0,o=0;for(var s=0;s<e.length;s++)i=(i+1)%256,o=(o+n[i])%256,r=n[i],n[i]=n[o],n[o]=r,a+=String.fromCharCode(e.charCodeAt(s)^n[(n[i]+n[o])%256]);return a}}]),e}();d=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__metadata("design:paramtypes",[Object])],d),t.CryptUtils=d},function(e,t){e.exports=require("md5")},function(e,t){e.exports=require("chance")},function(e,t,r){"use strict";var n=r(16),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(1),c=function(){function e(){o(this,e),this.stringsCache=new n}return a(e,[{key:"encode",value:function(e,t){var r="".concat(e,"-").concat(String(t));if(this.stringsCache.has(r))return this.stringsCache.get(r);var n,o,a=new RegExp("[\\s\\S]","g"),i=new RegExp("['\"\\\\\\s]"),s=new RegExp("[\\x00-\\x7F]"),c=e.replace(a,function(e){return t||i.exec(e)?(s.exec(e)?(n="\\x",o="00"):(n="\\u",o="0000"),"".concat(n).concat((o+e.charCodeAt(0).toString(16)).slice(-o.length))):e});return this.stringsCache.set(r,c),c}}]),e}();c=i.__decorate([s.injectable()],c),t.EscapeSequenceEncoder=c},function(e,t,r){"use strict";var n=r(11),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(1),c=r(3),u=i.__importStar(r(42)),d=i.__importStar(r(63)),l=r(195),f=r(28),p=r(12),m=r(196),g=r(8),_=N=function(){function e(t,r,n,a,i){o(this,e),this.transformersRunner=t,this.sourceMapCorrector=r,this.randomGenerator=n,this.logger=a,this.options=i}return a(e,[{key:"obfuscate",value:function(e){var t=Date.now();this.logger.info(l.LoggingMessage.Version,d.version),this.logger.info(l.LoggingMessage.ObfuscationStarted),this.logger.info(l.LoggingMessage.RandomGeneratorSeed,this.randomGenerator.getSeed());var r=this.parseCode(e),n=this.transformAstTree(r),o=this.generateCode(e,n),a=(Date.now()-t)/1e3;return this.logger.success(l.LoggingMessage.ObfuscationCompleted,a),this.getObfuscationResult(o)}},{key:"parseCode",value:function(e){return m.EsprimaFacade.parse(e,{attachComment:!0,loc:this.options.sourceMap})}},{key:"transformAstTree",value:function(e){return!g.NodeGuards.isProgramNode(e)||e.body.length||e.leadingComments?(e=this.runTransformationStage(e,p.TransformationStage.Preparing),this.options.deadCodeInjection&&(e=this.runTransformationStage(e,p.TransformationStage.DeadCodeInjection)),this.options.controlFlowFlattening&&(e=this.runTransformationStage(e,p.TransformationStage.ControlFlowFlattening)),e=this.runTransformationStage(e,p.TransformationStage.Converting),e=this.runTransformationStage(e,p.TransformationStage.Obfuscating),e=this.runTransformationStage(e,p.TransformationStage.Finalizing)):(this.logger.warn(l.LoggingMessage.EmptySourceCode),e)}},{key:"generateCode",value:function(e,t){var r=n({},N.escodegenParams);this.options.sourceMap&&(r.sourceMap="sourceMap",r.sourceContent=e);var o=u.generate(t,n({},r,{format:{compact:this.options.compact}}));return o.map=o.map?o.map.toString():"",o}},{key:"getObfuscationResult",value:function(e){return this.sourceMapCorrector.correct(e.code,e.map)}},{key:"runTransformationStage",value:function(e,t){return this.logger.info(l.LoggingMessage.TransformationStage,t),this.transformersRunner.transform(e,N.transformersList,t)}}]),e}();_.escodegenParams={comment:!0,verbatim:"x-verbatim-property",sourceMapWithCode:!0},_.transformersList=[f.NodeTransformer.BlockStatementControlFlowTransformer,f.NodeTransformer.ClassDeclarationTransformer,f.NodeTransformer.CommentsTransformer,f.NodeTransformer.CustomNodesTransformer,f.NodeTransformer.DeadCodeInjectionTransformer,f.NodeTransformer.EvalCallExpressionTransformer,f.NodeTransformer.FunctionControlFlowTransformer,f.NodeTransformer.CatchClauseTransformer,f.NodeTransformer.FunctionDeclarationTransformer,f.NodeTransformer.FunctionTransformer,f.NodeTransformer.LabeledStatementTransformer,f.NodeTransformer.LiteralTransformer,f.NodeTransformer.MemberExpressionTransformer,f.NodeTransformer.MethodDefinitionTransformer,f.NodeTransformer.ObfuscatingGuardsTransformer,f.NodeTransformer.ObjectExpressionKeysTransformer,f.NodeTransformer.ObjectExpressionTransformer,f.NodeTransformer.ParentificationTransformer,f.NodeTransformer.TemplateLiteralTransformer,f.NodeTransformer.VariableDeclarationTransformer],_=N=i.__decorate([s.injectable(),i.__param(0,s.inject(c.ServiceIdentifiers.ITransformersRunner)),i.__param(1,s.inject(c.ServiceIdentifiers.ISourceMapCorrector)),i.__param(2,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i.__param(3,s.inject(c.ServiceIdentifiers.ILogger)),i.__param(4,s.inject(c.ServiceIdentifiers.IOptions)),i.__metadata("design:paramtypes",[Object,Object,Object,Object,Object])],_),t.JavaScriptObfuscator=_;var N},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 n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=a.__importStar(r(51)),s=a.__importDefault(r(64)),c=function(){function e(){n(this,e)}return o(e,null,[{key:"parse",value:function(t,r){var n=null;try{return i.parseScript(t,r,function(e,t){return n=t})}catch(e){}try{return i.parseModule(t,r,function(e,t){return n=t})}catch(r){return e.processParsingError(t,r.message,n)}}},{key:"processParsingError",value:function(t,r,n){if(!(n&&n.start&&n.end&&n.start.column&&n.end.column))throw new Error(r);var o=r.match(/Line *(\d*)/);if(!o)throw new Error(r);var a=parseInt(o[1],10),i=t.split(/\r?\n/),s=i[a-1];if(!s)throw new Error(r);var c=Math.max(0,n.start.column-e.nearestSymbolsCount),u=Math.min(s.length,n.end.column+e.nearestSymbolsCount),d=e.colorError(">"),l="...".concat(s.substring(c,u).replace(/^\s+/,""),"...");throw new Error("".concat(r,"\n").concat(d," ").concat(l))}}]),e}();c.colorError=s.default.red,c.nearestSymbolsCount=10,t.EsprimaFacade=c},function(e,t,r){"use strict";var n=r(5),o=r(0),a=r(6),i=r(7);Object.defineProperty(t,"__esModule",{value:!0});var s=r(4),c=r(1),u=r(198);c.decorate(c.injectable(),u.EventEmitter);var d=function(e){function t(){return o(this,t),a(this,(t.__proto__||n(t)).apply(this,arguments))}return i(t,e),t}(u.EventEmitter);d=s.__decorate([c.injectable()],d),t.ObfuscationEventEmitter=d},function(e,t){e.exports=require("events")},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(10),c=function(){function e(){n(this,e)}return o(e,[{key:"initialize",value:function(e,t){this.obfuscatedCode=e,this.sourceMap=t}},{key:"getObfuscatedCode",value:function(){return this.obfuscatedCode}},{key:"getSourceMap",value:function(){return this.sourceMap}},{key:"toString",value:function(){return this.obfuscatedCode}}]),e}();a.__decorate([s.initializable(),a.__metadata("design:type",String)],c.prototype,"obfuscatedCode",void 0),a.__decorate([s.initializable(),a.__metadata("design:type",String)],c.prototype,"sourceMap",void 0),c=a.__decorate([i.injectable()],c),t.ObfuscationResult=c},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(t){n(this,e),this.sourceCode=t}return o(e,[{key:"getSourceCode",value:function(){return this.sourceCode}}]),e}();t.SourceCode=a},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=r(36),u=function(){function e(t,r,o){n(this,e),this.obfuscationResultFactory=t,this.cryptUtils=r,this.options=o}return o(e,[{key:"correct",value:function(e,t){return this.obfuscationResultFactory(this.correctObfuscatedCode(e,t),t)}},{key:"correctObfuscatedCode",value:function(e,t){if(!t)return e;var r=this.options.sourceMapBaseUrl+this.options.sourceMapFileName,n="//# sourceMappingURL=";switch(this.options.sourceMapMode){case c.SourceMapMode.Inline:n+="data:application/json;base64,".concat(this.cryptUtils.btoa(t));break;case c.SourceMapMode.Separate:default:if(!r)return e;n+=r}return"".concat(e,"\n").concat(n)}}]),e}();u=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__IObfuscationResult)),a.__param(1,i.inject(s.ServiceIdentifiers.ICryptUtils)),a.__param(2,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Function,Object,Object])],u),t.SourceMapCorrector=u},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(1),s=r(3),c=a.__importStar(r(17)),u=r(203),d=r(8),l=function(){function e(t){n(this,e),this.nodeTransformerFactory=t}return o(e,[{key:"transform",value:function(e,t,r){if(!t.length)return e;for(var n,o=[],a=[],i=t.length,s=0;s<i;s++)(n=this.nodeTransformerFactory(t[s]).getVisitor(r))&&(n.enter&&o.push({enter:n.enter}),n.leave&&a.push({leave:n.leave}));return o.length||a.length?(c.replace(e,{enter:this.mergeVisitorsForDirection(o,u.VisitorDirection.Enter),leave:this.mergeVisitorsForDirection(a,u.VisitorDirection.Leave)}),e):e}},{key:"mergeVisitorsForDirection",value:function(e,t){var r=e.length;return r?function(n,o){if(n.ignoredNode)return c.VisitorOption.Skip;for(var a=0;a<r;a++){var i=e[a][t];if(i){var s=i(n,o);s&&d.NodeGuards.isNode(s)&&(n=s)}}return n}:function(e,t){return e}}}]),e}();l=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__INodeTransformer)),a.__metadata("design:paramtypes",[Function])],l),t.TransformersRunner=l},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){e.exports=require("commander")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArraySanitizer=function(e){if(/,$/.test(e))throw new SyntaxError("Multiple <list> values should be wrapped inside quotes: --option-name 'value1, value2'");return e.split(",").map(function(e){return e.trim()})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanSanitizer=function(e){return"true"===e||"1"===e}},function(e,t,r){"use strict";var n=r(38);Object.defineProperty(t,"__esModule",{value:!0});var o=r(35);t.IdentifierNamesGeneratorSanitizer=function(e){if(!n(o.IdentifierNamesGenerator).some(function(t){return o.IdentifierNamesGenerator[t]===e}))throw new ReferenceError("Invalid value of `--identifier-names-generator` option");return e}},function(e,t,r){"use strict";var n=r(38);Object.defineProperty(t,"__esModule",{value:!0});var o=r(21);t.ObfuscationTargetSanitizer=function(e){if(!n(o.ObfuscationTarget).some(function(t){return o.ObfuscationTarget[t]===e}))throw new ReferenceError("Invalid value of `--target` option");return e}},function(e,t,r){"use strict";var n=r(38);Object.defineProperty(t,"__esModule",{value:!0});var o=r(36);t.SourceMapModeSanitizer=function(e){if(!n(o.SourceMapMode).some(function(t){return o.SourceMapMode[t]===e}))throw new ReferenceError("Invalid value of `--source-map-mode` option");return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(37);t.StringArrayEncodingSanitizer=function(e){switch(e){case"true":case"1":case n.StringArrayEncoding.Base64:return!0;case n.StringArrayEncoding.Rc4:return n.StringArrayEncoding.Rc4;default:return!1}}},function(e,t,r){"use strict";var n=r(0),o=r(2);Object.defineProperty(t,"__esModule",{value:!0});var a=__importStar(r(67)),i=__importStar(r(212)),s=__importStar(r(48)),c=r(47),u=function(){function e(){n(this,e)}return o(e,null,[{key:"getOutputCodePath",value:function(e){return s.normalize(e).split(".").map(function(e,t){return 0===t?"".concat(e).concat(c.JavaScriptObfuscatorCLI.obfuscatedFilePrefix):e}).join(".")}},{key:"getOutputSourceMapPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t&&(e="".concat(e.substring(0,e.lastIndexOf("/")),"/").concat(t)),/\.js\.map$/.test(e)?/\.js$/.test(e)&&(e+=".map"):e="".concat(e.split(".")[0],".js.map"),e}},{key:"getUserConfig",value:function(e){var t;try{t=!function(){var e=new Error('Cannot find module "."');throw e.code="MODULE_NOT_FOUND",e}()}catch(r){try{t=require(e)}catch(e){throw new ReferenceError("Given config path must be a valid `.js` or `.json` file path")}}return t}},{key:"writeFile",value:function(e,t){i.sync(s.dirname(e)),a.writeFileSync(e,t,{encoding:c.JavaScriptObfuscatorCLI.encoding})}}]),e}();t.CLIUtils=u},function(e,t){e.exports=require("mkdirp")},function(e,t){function r(e){throw new Error("Cannot find module '"+e+"'.")}r.keys=function(){return[]},r.resolve=r,e.exports=r,r.id=213},function(e,t,r){"use strict";var n=r(24),o=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0});var i=__importStar(r(67)),s=__importStar(r(48)),c=__importDefault(r(215)),u=r(66),d=r(47),l=r(65),f=function(){function e(t){o(this,e),this.options=t}return a(e,[{key:"readSourceCode",value:function(t){if(e.isFilePath(t)&&this.isValidFile(t))return this.readFile(t);if(e.isDirectoryPath(t)&&this.isValidDirectory(t))return this.readDirectoryRecursive(t);var r=e.availableInputExtensions.map(function(e){return"`".concat(e,"`")}).join(", ");throw new ReferenceError("Given input path must be a valid ".concat(r," file or directory path"))}},{key:"readDirectoryRecursive",value:function(t){var r=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return i.readdirSync(t,d.JavaScriptObfuscatorCLI.encoding).forEach(function(a){var i="".concat(t,"/").concat(a);if(e.isDirectoryPath(i)&&r.isValidDirectory(i))o.push.apply(o,n(r.readDirectoryRecursive(i)));else if(e.isFilePath(i)&&r.isValidFile(i)){var s=r.readFile(i);o.push({filePath:i,content:s})}}),o}},{key:"readFile",value:function(t){return e.logFilePath(t),i.readFileSync(t,d.JavaScriptObfuscatorCLI.encoding)}},{key:"isValidDirectory",value:function(t){return!e.isExcludedPath(t,this.options.exclude)}},{key:"isValidFile",value:function(t){return e.availableInputExtensions.includes(s.extname(t))&&!t.includes(d.JavaScriptObfuscatorCLI.obfuscatedFilePrefix)&&!e.isExcludedPath(t,this.options.exclude)}}],[{key:"isExcludedPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;var r=s.basename(e),n=!!c.default([e],t).length;return t.some(function(t){return e.includes(t)||r.includes(t)})||n}},{key:"isDirectoryPath",value:function(e){try{return i.statSync(e).isDirectory()}catch(e){return!1}}},{key:"isFilePath",value:function(e){try{return i.statSync(e).isFile()}catch(e){return!1}}},{key:"logFilePath",value:function(e){var t=s.normalize(e);l.Logger.log(l.Logger.colorInfo,u.LoggingPrefix.CLI,"Obfuscating file: ".concat(t,"..."))}}]),e}();f.availableInputExtensions=[".js"],t.SourceCodeReader=f},function(e,t){e.exports=require("multimatch")}]);
- //# sourceMappingURL=index.js.map
|