123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447 |
- /*
- Copyright (C) 2016 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(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId])
- /******/ return installedModules[moduleId].exports;
- /******/
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // identity function for calling harmory imports with the correct context
- /******/ __webpack_require__.i = function(value) { return value; };
- /******/
- /******/ // define getter function for harmory exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ Object.defineProperty(exports, name, {
- /******/ configurable: false,
- /******/ enumerable: true,
- /******/ get: getter
- /******/ });
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 72);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var chance_1 = __webpack_require__(67);
- var JSFuck_1 = __webpack_require__(19);
- var Utils = function () {
- function Utils() {
- _classCallCheck(this, Utils);
- }
- _createClass(Utils, null, [{
- key: 'arrayContains',
- value: function arrayContains(array, searchElement) {
- return array.indexOf(searchElement) >= 0;
- }
- }, {
- key: 'arrayRotate',
- value: function arrayRotate(array, times) {
- if (!array.length) {
- throw new ReferenceError('Cannot rotate empty array.');
- }
- if (times <= 0) {
- return array;
- }
- var newArray = array,
- temp = void 0;
- while (times--) {
- temp = newArray.pop();
- newArray.unshift(temp);
- }
- return newArray;
- }
- }, {
- key: 'btoa',
- value: function btoa(string) {
- var encode = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
- return new Buffer(encode ? encodeURI(string) : string).toString('base64');
- }
- }, {
- key: 'decToHex',
- value: function decToHex(dec) {
- var radix = 16;
- return Number(dec).toString(radix);
- }
- }, {
- key: 'getRandomGenerator',
- value: function getRandomGenerator() {
- return Utils.randomGenerator;
- }
- }, {
- key: 'getRandomVariableName',
- value: function getRandomVariableName() {
- var length = arguments.length <= 0 || arguments[0] === undefined ? 6 : arguments[0];
- var rangeMinInteger = 10000,
- rangeMaxInteger = 99999999,
- prefix = '_0x';
- return '' + prefix + Utils.decToHex(Utils.getRandomGenerator().integer({
- min: rangeMinInteger,
- max: rangeMaxInteger
- })).substr(0, length);
- }
- }, {
- key: 'isInteger',
- value: function isInteger(number) {
- return number % 1 === 0;
- }
- }, {
- key: 'strEnumify',
- value: function strEnumify(obj) {
- return obj;
- }
- }, {
- key: 'stringToJSFuck',
- value: function stringToJSFuck(string) {
- return Array.from(string).map(function (character) {
- return JSFuck_1.JSFuck[character] || character;
- }).join(' + ');
- }
- }, {
- key: 'stringToUnicode',
- value: function stringToUnicode(string) {
- var radix = 16;
- var prefix = void 0,
- regexp = new RegExp('[\x00-\x7F]'),
- template = void 0;
- return '\'' + string.replace(/[\s\S]/g, function (escape) {
- if (regexp.test(escape)) {
- prefix = '\\x';
- template = '0'.repeat(2);
- } else {
- prefix = '\\u';
- template = '0'.repeat(4);
- }
- return '' + prefix + (template + escape.charCodeAt(0).toString(radix)).slice(-template.length);
- }) + '\'';
- }
- }]);
- return Utils;
- }();
- Utils.randomGenerator = new chance_1.Chance();
- exports.Utils = Utils;
- /***/ },
- /* 1 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var escodegen = __webpack_require__(10);
- var esprima = __webpack_require__(22);
- var estraverse = __webpack_require__(6);
- var NodeType_1 = __webpack_require__(5);
- var Nodes_1 = __webpack_require__(2);
- var Utils_1 = __webpack_require__(0);
- var NodeUtils = function () {
- function NodeUtils() {
- _classCallCheck(this, NodeUtils);
- }
- _createClass(NodeUtils, null, [{
- key: 'addXVerbatimPropertyToLiterals',
- value: function addXVerbatimPropertyToLiterals(node) {
- NodeUtils.typedReplace(node, NodeType_1.NodeType.Literal, {
- leave: function leave(node) {
- node['x-verbatim-property'] = {
- content: node.raw,
- precedence: escodegen.Precedence.Primary
- };
- }
- });
- }
- }, {
- key: 'appendNode',
- value: function appendNode(blockScopeBody, node) {
- if (!NodeUtils.validateNode(node)) {
- return;
- }
- blockScopeBody.push(node);
- }
- }, {
- key: 'convertCodeToStructure',
- value: function convertCodeToStructure(code) {
- var structure = esprima.parse(code);
- NodeUtils.addXVerbatimPropertyToLiterals(structure);
- NodeUtils.parentize(structure);
- return NodeUtils.getBlockStatementNodeByIndex(structure);
- }
- }, {
- key: 'getBlockStatementNodeByIndex',
- value: function getBlockStatementNodeByIndex(node) {
- var index = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
- if (Nodes_1.Nodes.isNodeHasBlockStatement(node)) {
- if (node.body[index] === undefined) {
- throw new ReferenceError('Wrong index `' + index + '`. Block-statement body length is `' + node.body.length + '`');
- }
- return node.body[index];
- }
- throw new TypeError('The specified node have no a block-statement');
- }
- }, {
- key: 'getBlockScopeOfNode',
- value: function getBlockScopeOfNode(node) {
- var depth = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
- var parentNode = node.parentNode;
- if (!parentNode) {
- throw new ReferenceError('`parentNode` property of given node is `undefined`');
- }
- if (Nodes_1.Nodes.isBlockStatementNode(parentNode)) {
- if (!parentNode.parentNode) {
- throw new ReferenceError('`parentNode` property of `parentNode` of given node is `undefined`');
- }
- if (!Utils_1.Utils.arrayContains(NodeUtils.nodesWithBlockScope, parentNode.parentNode.type)) {
- return NodeUtils.getBlockScopeOfNode(parentNode, depth);
- } else if (depth > 0) {
- return NodeUtils.getBlockScopeOfNode(parentNode, --depth);
- }
- return parentNode;
- }
- if (Nodes_1.Nodes.isProgramNode(parentNode)) {
- return parentNode;
- }
- return NodeUtils.getBlockScopeOfNode(parentNode);
- }
- }, {
- key: 'insertNodeAtIndex',
- value: function insertNodeAtIndex(blockScopeBody, node, index) {
- if (!NodeUtils.validateNode(node)) {
- return;
- }
- blockScopeBody.splice(index, 0, node);
- }
- }, {
- key: 'parentize',
- value: function parentize(node) {
- var isRootNode = true;
- estraverse.replace(node, {
- enter: function enter(node, parentNode) {
- var value = void 0;
- if (isRootNode) {
- if (node.type === NodeType_1.NodeType.Program) {
- value = node;
- } else {
- value = Nodes_1.Nodes.getProgramNode([node]);
- value['parentNode'] = value;
- }
- isRootNode = false;
- } else {
- value = parentNode || node;
- }
- node['parentNode'] = value;
- }
- });
- }
- }, {
- key: 'prependNode',
- value: function prependNode(blockScopeBody, node) {
- if (!NodeUtils.validateNode(node)) {
- return;
- }
- blockScopeBody.unshift(node);
- }
- }, {
- key: 'typedReplace',
- value: function typedReplace(node, nodeType, visitor) {
- NodeUtils.typedTraverse(node, nodeType, visitor, 'replace');
- }
- }, {
- key: 'typedTraverse',
- value: function typedTraverse(node, nodeType, visitor) {
- var traverseType = arguments.length <= 3 || arguments[3] === undefined ? 'traverse' : arguments[3];
- estraverse[traverseType](node, {
- enter: function enter(node) {
- if (node.type === nodeType && visitor.enter) {
- visitor.enter(node);
- }
- },
- leave: function leave(node) {
- if (node.type === nodeType && visitor.leave) {
- visitor.leave(node);
- }
- }
- });
- }
- }, {
- key: 'validateNode',
- value: function validateNode(node) {
- return !!node && node.hasOwnProperty('type');
- }
- }]);
- return NodeUtils;
- }();
- NodeUtils.nodesWithBlockScope = [NodeType_1.NodeType.ArrowFunctionExpression, NodeType_1.NodeType.FunctionDeclaration, NodeType_1.NodeType.FunctionExpression, NodeType_1.NodeType.MethodDefinition, NodeType_1.NodeType.Program];
- exports.NodeUtils = NodeUtils;
- /***/ },
- /* 2 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var NodeType_1 = __webpack_require__(5);
- var Nodes = function () {
- function Nodes() {
- _classCallCheck(this, Nodes);
- }
- _createClass(Nodes, null, [{
- key: "getProgramNode",
- value: function getProgramNode(bodyNode) {
- return {
- 'type': NodeType_1.NodeType.Program,
- 'body': bodyNode,
- 'sourceType': 'script'
- };
- }
- }, {
- key: "isArrowFunctionExpressionNode",
- value: function isArrowFunctionExpressionNode(node) {
- return node.type === NodeType_1.NodeType.ArrowFunctionExpression;
- }
- }, {
- key: "isBlockStatementNode",
- value: function isBlockStatementNode(node) {
- return node.type === NodeType_1.NodeType.BlockStatement;
- }
- }, {
- key: "isFunctionDeclarationNode",
- value: function isFunctionDeclarationNode(node) {
- return node.type === NodeType_1.NodeType.FunctionDeclaration;
- }
- }, {
- key: "isFunctionExpressionNode",
- value: function isFunctionExpressionNode(node) {
- return node.type === NodeType_1.NodeType.FunctionExpression;
- }
- }, {
- key: "isIdentifierNode",
- value: function isIdentifierNode(node) {
- return node.type === NodeType_1.NodeType.Identifier;
- }
- }, {
- key: "isLiteralNode",
- value: function isLiteralNode(node) {
- return node.type === NodeType_1.NodeType.Literal;
- }
- }, {
- key: "isMemberExpressionNode",
- value: function isMemberExpressionNode(node) {
- return node.type === NodeType_1.NodeType.MemberExpression;
- }
- }, {
- key: "isProgramNode",
- value: function isProgramNode(node) {
- return node.type === NodeType_1.NodeType.Program;
- }
- }, {
- key: "isPropertyNode",
- value: function isPropertyNode(node) {
- return node.type === NodeType_1.NodeType.Property;
- }
- }, {
- key: "isReplaceableIdentifierNode",
- value: function isReplaceableIdentifierNode(node, parentNode) {
- if (!Nodes.isIdentifierNode(node)) {
- return false;
- }
- var parentNodeIsPropertyNode = Nodes.isPropertyNode(parentNode) && parentNode.key === node;
- var parentNodeIsMemberExpressionNode = Nodes.isMemberExpressionNode(parentNode) && parentNode.computed === false && parentNode.property === node;
- return !parentNodeIsPropertyNode && !parentNodeIsMemberExpressionNode;
- }
- }, {
- key: "isVariableDeclarationNode",
- value: function isVariableDeclarationNode(node) {
- return node.type === NodeType_1.NodeType.VariableDeclaration;
- }
- }, {
- key: "isVariableDeclaratorNode",
- value: function isVariableDeclaratorNode(node) {
- return node.type === NodeType_1.NodeType.VariableDeclarator;
- }
- }, {
- key: "isNodeHasBlockStatement",
- value: function isNodeHasBlockStatement(node) {
- return node.hasOwnProperty('body') && Array.isArray(node.body);
- }
- }]);
- return Nodes;
- }();
- exports.Nodes = Nodes;
- /***/ },
- /* 3 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- (function (AppendState) {
- AppendState[AppendState["AfterObfuscation"] = 0] = "AfterObfuscation";
- AppendState[AppendState["BeforeObfuscation"] = 1] = "BeforeObfuscation";
- })(exports.AppendState || (exports.AppendState = {}));
- var AppendState = exports.AppendState;
- /***/ },
- /* 4 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var AbstractCustomNode = function () {
- function AbstractCustomNode(options) {
- _classCallCheck(this, AbstractCustomNode);
- this.options = options;
- }
- _createClass(AbstractCustomNode, [{
- key: "getAppendState",
- value: function getAppendState() {
- return this.appendState;
- }
- }, {
- key: "getNode",
- value: function getNode() {
- return this.getNodeStructure();
- }
- }]);
- return AbstractCustomNode;
- }();
- exports.AbstractCustomNode = AbstractCustomNode;
- /***/ },
- /* 5 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var Utils_1 = __webpack_require__(0);
- exports.NodeType = Utils_1.Utils.strEnumify({
- ArrayExpression: 'ArrayExpression',
- ArrowFunctionExpression: 'ArrowFunctionExpression',
- AssignmentExpression: 'AssignmentExpression',
- BinaryExpression: 'BinaryExpression',
- BlockStatement: 'BlockStatement',
- CallExpression: 'CallExpression',
- CatchClause: 'CatchClause',
- ClassDeclaration: 'ClassDeclaration',
- ExpressionStatement: 'ExpressionStatement',
- FunctionDeclaration: 'FunctionDeclaration',
- FunctionExpression: 'FunctionExpression',
- Identifier: 'Identifier',
- IfStatement: 'IfStatement',
- Literal: 'Literal',
- LogicalExpression: 'LogicalExpression',
- MemberExpression: 'MemberExpression',
- MethodDefinition: 'MethodDefinition',
- ObjectExpression: 'ObjectExpression',
- Program: 'Program',
- Property: 'Property',
- ReturnStatement: 'ReturnStatement',
- TryStatement: 'TryStatement',
- UnaryExpression: 'UnaryExpression',
- UpdateExpression: 'UpdateExpression',
- VariableDeclaration: 'VariableDeclaration',
- VariableDeclarator: 'VariableDeclarator',
- WhileStatement: 'WhileStatement'
- });
- /***/ },
- /* 6 */
- /***/ function(module, exports) {
- module.exports = require("estraverse");
- /***/ },
- /* 7 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var AbstractNodeObfuscator = function AbstractNodeObfuscator(nodes, options) {
- _classCallCheck(this, AbstractNodeObfuscator);
- this.nodes = nodes;
- this.options = options;
- };
- exports.AbstractNodeObfuscator = AbstractNodeObfuscator;
- /***/ },
- /* 8 */
- /***/ function(module, exports) {
- module.exports = require("format-unicorn");
- /***/ },
- /* 9 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var JavaScriptObfuscatorCLI_1 = __webpack_require__(29);
- var JavaScriptObfuscatorInternal_1 = __webpack_require__(17);
- var JavaScriptObfuscator = function () {
- function JavaScriptObfuscator() {
- _classCallCheck(this, JavaScriptObfuscator);
- }
- _createClass(JavaScriptObfuscator, null, [{
- key: "obfuscate",
- value: function obfuscate(sourceCode) {
- var obfuscatorOptions = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var javaScriptObfuscator = new JavaScriptObfuscatorInternal_1.JavaScriptObfuscatorInternal(sourceCode, obfuscatorOptions);
- javaScriptObfuscator.obfuscate();
- return javaScriptObfuscator.getObfuscationResult();
- }
- }, {
- key: "runCLI",
- value: function runCLI(argv) {
- new JavaScriptObfuscatorCLI_1.JavaScriptObfuscatorCLI(argv).run();
- }
- }]);
- return JavaScriptObfuscator;
- }();
- exports.JavaScriptObfuscator = JavaScriptObfuscator;
- /***/ },
- /* 10 */
- /***/ function(module, exports) {
- module.exports = require("escodegen");
- /***/ },
- /* 11 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- exports.SourceMapMode = {
- Inline: 'inline',
- Separate: 'separate'
- };
- /***/ },
- /* 12 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var AbstractNodesGroup = function () {
- function AbstractNodesGroup(options) {
- _classCallCheck(this, AbstractNodesGroup);
- this.nodes = new Map();
- this.options = options;
- }
- _createClass(AbstractNodesGroup, [{
- key: "getNodes",
- value: function getNodes() {
- return this.nodes;
- }
- }]);
- return AbstractNodesGroup;
- }();
- exports.AbstractNodesGroup = AbstractNodesGroup;
- /***/ },
- /* 13 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var AbstractReplacer = function AbstractReplacer(nodes, options) {
- _classCallCheck(this, AbstractReplacer);
- this.nodes = nodes;
- this.options = options;
- };
- exports.AbstractReplacer = AbstractReplacer;
- /***/ },
- /* 14 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var AbstractReplacer_1 = __webpack_require__(13);
- var Utils_1 = __webpack_require__(0);
- var IdentifierReplacer = function (_AbstractReplacer_1$A) {
- _inherits(IdentifierReplacer, _AbstractReplacer_1$A);
- function IdentifierReplacer() {
- var _Object$getPrototypeO;
- _classCallCheck(this, IdentifierReplacer);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(IdentifierReplacer)).call.apply(_Object$getPrototypeO, [this].concat(args)));
- _this.namesMap = new Map();
- return _this;
- }
- _createClass(IdentifierReplacer, [{
- key: "replace",
- value: function replace(nodeValue) {
- var obfuscatedIdentifierName = this.namesMap.get(nodeValue);
- if (!obfuscatedIdentifierName) {
- return nodeValue;
- }
- return obfuscatedIdentifierName;
- }
- }, {
- key: "storeNames",
- value: function storeNames(nodeName) {
- if (!this.isReservedName(nodeName)) {
- this.namesMap.set(nodeName, Utils_1.Utils.getRandomVariableName());
- }
- }
- }, {
- key: "isReservedName",
- value: function isReservedName(name) {
- return this.options.reservedNames.some(function (reservedName) {
- return new RegExp(reservedName, 'g').test(name);
- });
- }
- }]);
- return IdentifierReplacer;
- }(AbstractReplacer_1.AbstractReplacer);
- exports.IdentifierReplacer = IdentifierReplacer;
- /***/ },
- /* 15 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var AbstractReplacer_1 = __webpack_require__(13);
- var NumberLiteralReplacer_1 = __webpack_require__(20);
- var Utils_1 = __webpack_require__(0);
- var StringLiteralReplacer = function (_AbstractReplacer_1$A) {
- _inherits(StringLiteralReplacer, _AbstractReplacer_1$A);
- function StringLiteralReplacer() {
- _classCallCheck(this, StringLiteralReplacer);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(StringLiteralReplacer).apply(this, arguments));
- }
- _createClass(StringLiteralReplacer, [{
- key: "replace",
- value: function replace(nodeValue) {
- var replaceWithUnicodeArrayFlag = Math.random() <= this.options.unicodeArrayThreshold;
- if (this.options.encodeUnicodeLiterals && replaceWithUnicodeArrayFlag) {
- nodeValue = Utils_1.Utils.btoa(nodeValue);
- }
- nodeValue = Utils_1.Utils.stringToUnicode(nodeValue);
- if (this.options.unicodeArray && replaceWithUnicodeArrayFlag) {
- return this.replaceStringLiteralWithUnicodeArrayCall(nodeValue);
- }
- return nodeValue;
- }
- }, {
- key: "replaceStringLiteralWithUnicodeArrayCall",
- value: function replaceStringLiteralWithUnicodeArrayCall(value) {
- var unicodeArrayNode = this.nodes.get('unicodeArrayNode');
- if (!unicodeArrayNode) {
- throw new ReferenceError('`unicodeArrayNode` node is not found in Map with custom nodes.');
- }
- var unicodeArray = unicodeArrayNode.getNodeData(),
- indexOfExistingValue = unicodeArray.getIndexOf(value),
- indexOfValue = void 0,
- hexadecimalIndex = void 0;
- if (indexOfExistingValue >= 0) {
- indexOfValue = indexOfExistingValue;
- } else {
- indexOfValue = unicodeArray.getLength();
- unicodeArrayNode.updateNodeData(value);
- }
- hexadecimalIndex = new NumberLiteralReplacer_1.NumberLiteralReplacer(this.nodes, this.options).replace(indexOfValue);
- if (this.options.wrapUnicodeArrayCalls) {
- var unicodeArrayCallsWrapper = this.nodes.get('unicodeArrayCallsWrapper');
- if (!unicodeArrayCallsWrapper) {
- throw new ReferenceError('`unicodeArrayCallsWrapper` node is not found in Map with custom nodes.');
- }
- return unicodeArrayCallsWrapper.getNodeIdentifier() + "('" + hexadecimalIndex + "')";
- }
- return unicodeArrayNode.getNodeIdentifier() + "[" + hexadecimalIndex + "]";
- }
- }]);
- return StringLiteralReplacer;
- }(AbstractReplacer_1.AbstractReplacer);
- exports.StringLiteralReplacer = StringLiteralReplacer;
- /***/ },
- /* 16 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var SourceMapMode_1 = __webpack_require__(11);
- exports.NO_CUSTOM_NODES_PRESET = Object.freeze({
- compact: true,
- debugProtection: false,
- debugProtectionInterval: false,
- disableConsoleOutput: false,
- encodeUnicodeLiterals: false,
- reservedNames: [],
- rotateUnicodeArray: false,
- selfDefending: false,
- sourceMap: false,
- sourceMapMode: SourceMapMode_1.SourceMapMode.Separate,
- unicodeArray: false,
- unicodeArrayThreshold: 0,
- wrapUnicodeArrayCalls: false
- });
- /***/ },
- /* 17 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var esprima = __webpack_require__(22);
- var escodegen = __webpack_require__(10);
- var ObfuscationResult_1 = __webpack_require__(18);
- var Obfuscator_1 = __webpack_require__(25);
- var Options_1 = __webpack_require__(52);
- var SourceMapCorrector_1 = __webpack_require__(26);
- var JavaScriptObfuscatorInternal = function () {
- function JavaScriptObfuscatorInternal(sourceCode, obfuscatorOptions) {
- _classCallCheck(this, JavaScriptObfuscatorInternal);
- this.sourceMapUrl = '';
- this.sourceCode = sourceCode;
- if (obfuscatorOptions) {
- this.options = new Options_1.Options(obfuscatorOptions);
- }
- }
- _createClass(JavaScriptObfuscatorInternal, [{
- key: 'getObfuscationResult',
- value: function getObfuscationResult() {
- return new SourceMapCorrector_1.SourceMapCorrector(new ObfuscationResult_1.ObfuscationResult(this.generatorOutput.code, this.generatorOutput.map), this.sourceMapUrl, this.options.sourceMapMode).correct();
- }
- }, {
- key: 'obfuscate',
- value: function obfuscate() {
- var astTree = esprima.parse(this.sourceCode, {
- loc: true
- });
- astTree = new Obfuscator_1.Obfuscator(this.options).obfuscateNode(astTree);
- this.generatorOutput = JavaScriptObfuscatorInternal.generateCode(this.sourceCode, astTree, this.options);
- }
- }, {
- key: 'setSourceMapUrl',
- value: function setSourceMapUrl(url) {
- this.sourceMapUrl = url;
- }
- }], [{
- key: 'generateCode',
- value: function generateCode(sourceCode, astTree, options) {
- var escodegenParams = Object.assign({}, JavaScriptObfuscatorInternal.escodegenParams),
- generatorOutput = void 0;
- if (options.sourceMap) {
- escodegenParams.sourceMap = 'sourceMap';
- escodegenParams.sourceContent = sourceCode;
- }
- escodegenParams.format = {
- compact: options.compact
- };
- generatorOutput = escodegen.generate(astTree, escodegenParams);
- generatorOutput.map = generatorOutput.map ? generatorOutput.map.toString() : '';
- return generatorOutput;
- }
- }]);
- return JavaScriptObfuscatorInternal;
- }();
- JavaScriptObfuscatorInternal.escodegenParams = {
- verbatim: 'x-verbatim-property',
- sourceMapWithCode: true
- };
- exports.JavaScriptObfuscatorInternal = JavaScriptObfuscatorInternal;
- /***/ },
- /* 18 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var ObfuscationResult = function () {
- function ObfuscationResult(obfuscatedCode, sourceMap) {
- _classCallCheck(this, ObfuscationResult);
- this.obfuscatedCode = obfuscatedCode;
- this.sourceMap = sourceMap;
- }
- _createClass(ObfuscationResult, [{
- key: "getObfuscatedCode",
- value: function getObfuscatedCode() {
- return this.obfuscatedCode;
- }
- }, {
- key: "getSourceMap",
- value: function getSourceMap() {
- return this.sourceMap;
- }
- }, {
- key: "toString",
- value: function toString() {
- return this.obfuscatedCode;
- }
- }]);
- return ObfuscationResult;
- }();
- exports.ObfuscationResult = ObfuscationResult;
- /***/ },
- /* 19 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- exports.JSFuck = {
- Window: '[]["filter"]["constructor"]("return this")()',
- False: '![]',
- True: '!![]',
- a: '(false+"")[1]',
- b: '([]["entries"]()+"")[2]',
- c: '([]["fill"]+"")[3]',
- d: '(undefined+"")[2]',
- e: '(true+"")[3]',
- f: '(false+"")[0]',
- g: '(false+[0]+String)[20]',
- h: '(+(101))["to"+String["name"]](21)[1]',
- i: '([false]+undefined)[10]',
- j: '([]["entries"]()+"")[3]',
- k: '(+(20))["to"+String["name"]](21)',
- l: '(false+"")[2]',
- m: '(Number+"")[11]',
- n: '(undefined+"")[1]',
- o: '(true+[]["fill"])[10]',
- p: '(+(211))["to"+String["name"]](31)[1]',
- q: '(+(212))["to"+String["name"]](31)[1]',
- r: '(true+"")[1]',
- s: '(false+"")[3]',
- t: '(true+"")[0]',
- u: '(undefined+"")[0]',
- v: '(+(31))["to"+String["name"]](32)',
- w: '(+(32))["to"+String["name"]](33)',
- x: '(+(101))["to"+String["name"]](34)[1]',
- y: '(NaN+[Infinity])[10]',
- z: '(+(35))["to"+String["name"]](36)',
- A: '(+[]+Array)[10]',
- B: '(+[]+Boolean)[10]',
- C: 'Function("return escape")()(("")["italics"]())[2]',
- D: 'Function("return escape")()([]["fill"])["slice"]("-1")',
- E: '(RegExp+"")[12]',
- F: '(+[]+Function)[10]',
- G: '(false+Function("return Date")()())[30]',
- H: '\'H\'',
- I: '(Infinity+"")[0]',
- J: '\'J\'',
- K: '\'K\'',
- L: '\'L\'',
- M: '(true+Function("return Date")()())[30]',
- N: '(NaN+"")[0]',
- O: '(NaN+Function("return{}")())[11]',
- P: '\'P\'',
- Q: '\'Q\'',
- R: '(+[]+RegExp)[10]',
- S: '(+[]+String)[10]',
- T: '(NaN+Function("return Date")()())[30]',
- U: '(NaN+Function("return{}")()["to"+String["name"]]["call"]())[11]',
- V: '\'V\'',
- W: '\'W\'',
- X: '\'X\'',
- Y: '\'Y\'',
- Z: '\'Z\''
- };
- /***/ },
- /* 20 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var AbstractReplacer_1 = __webpack_require__(13);
- var Utils_1 = __webpack_require__(0);
- var NumberLiteralReplacer = function (_AbstractReplacer_1$A) {
- _inherits(NumberLiteralReplacer, _AbstractReplacer_1$A);
- function NumberLiteralReplacer() {
- _classCallCheck(this, NumberLiteralReplacer);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(NumberLiteralReplacer).apply(this, arguments));
- }
- _createClass(NumberLiteralReplacer, [{
- key: "replace",
- value: function replace(nodeValue) {
- var prefix = '0x';
- if (!Utils_1.Utils.isInteger(nodeValue)) {
- return String(nodeValue);
- }
- return "" + prefix + Utils_1.Utils.decToHex(nodeValue);
- }
- }]);
- return NumberLiteralReplacer;
- }(AbstractReplacer_1.AbstractReplacer);
- exports.NumberLiteralReplacer = NumberLiteralReplacer;
- /***/ },
- /* 21 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var SourceMapMode_1 = __webpack_require__(11);
- exports.DEFAULT_PRESET = Object.freeze({
- compact: true,
- debugProtection: false,
- debugProtectionInterval: false,
- disableConsoleOutput: true,
- encodeUnicodeLiterals: false,
- reservedNames: [],
- rotateUnicodeArray: true,
- selfDefending: true,
- sourceMap: false,
- sourceMapMode: SourceMapMode_1.SourceMapMode.Separate,
- unicodeArray: true,
- unicodeArrayThreshold: 0.8,
- wrapUnicodeArrayCalls: true
- });
- /***/ },
- /* 22 */
- /***/ function(module, exports) {
- module.exports = require("esprima");
- /***/ },
- /* 23 */
- /***/ function(module, exports) {
- module.exports = require("path");
- /***/ },
- /* 24 */
- /***/ function(module, exports) {
- module.exports = require("babel-polyfill");
- /***/ },
- /* 25 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var estraverse = __webpack_require__(6);
- var AppendState_1 = __webpack_require__(3);
- var NodeType_1 = __webpack_require__(5);
- var CatchClauseObfuscator_1 = __webpack_require__(43);
- var ConsoleOutputNodesGroup_1 = __webpack_require__(39);
- var DebugProtectionNodesGroup_1 = __webpack_require__(40);
- var FunctionDeclarationObfuscator_1 = __webpack_require__(44);
- var FunctionObfuscator_1 = __webpack_require__(45);
- var LiteralObfuscator_1 = __webpack_require__(46);
- var MemberExpressionObfuscator_1 = __webpack_require__(47);
- var MethodDefinitionObfuscator_1 = __webpack_require__(48);
- var Nodes_1 = __webpack_require__(2);
- var NodeUtils_1 = __webpack_require__(1);
- var ObjectExpressionObfuscator_1 = __webpack_require__(49);
- var SelfDefendingNodesGroup_1 = __webpack_require__(41);
- var UnicodeArrayNodesGroup_1 = __webpack_require__(42);
- var VariableDeclarationObfuscator_1 = __webpack_require__(50);
- var Obfuscator = function () {
- function Obfuscator(options) {
- _classCallCheck(this, Obfuscator);
- this.nodeObfuscators = new Map([[NodeType_1.NodeType.ArrowFunctionExpression, [FunctionObfuscator_1.FunctionObfuscator]], [NodeType_1.NodeType.ClassDeclaration, [FunctionDeclarationObfuscator_1.FunctionDeclarationObfuscator]], [NodeType_1.NodeType.CatchClause, [CatchClauseObfuscator_1.CatchClauseObfuscator]], [NodeType_1.NodeType.FunctionDeclaration, [FunctionDeclarationObfuscator_1.FunctionDeclarationObfuscator, FunctionObfuscator_1.FunctionObfuscator]], [NodeType_1.NodeType.FunctionExpression, [FunctionObfuscator_1.FunctionObfuscator]], [NodeType_1.NodeType.MemberExpression, [MemberExpressionObfuscator_1.MemberExpressionObfuscator]], [NodeType_1.NodeType.MethodDefinition, [MethodDefinitionObfuscator_1.MethodDefinitionObfuscator]], [NodeType_1.NodeType.ObjectExpression, [ObjectExpressionObfuscator_1.ObjectExpressionObfuscator]], [NodeType_1.NodeType.VariableDeclaration, [VariableDeclarationObfuscator_1.VariableDeclarationObfuscator]], [NodeType_1.NodeType.Literal, [LiteralObfuscator_1.LiteralObfuscator]]]);
- this.options = options;
- this.nodes = new Map([].concat(_toConsumableArray(new SelfDefendingNodesGroup_1.SelfDefendingNodesGroup(this.options).getNodes()), _toConsumableArray(new ConsoleOutputNodesGroup_1.ConsoleOutputNodesGroup(this.options).getNodes()), _toConsumableArray(new DebugProtectionNodesGroup_1.DebugProtectionNodesGroup(this.options).getNodes()), _toConsumableArray(new UnicodeArrayNodesGroup_1.UnicodeArrayNodesGroup(this.options).getNodes())));
- }
- _createClass(Obfuscator, [{
- key: 'obfuscateNode',
- value: function obfuscateNode(node) {
- if (Nodes_1.Nodes.isProgramNode(node) && !node.body.length) {
- return node;
- }
- NodeUtils_1.NodeUtils.parentize(node);
- this.beforeObfuscation(node);
- this.obfuscate(node);
- this.afterObfuscation(node);
- return node;
- }
- }, {
- key: 'afterObfuscation',
- value: function afterObfuscation(astTree) {
- this.nodes.forEach(function (node) {
- if (node.getAppendState() === AppendState_1.AppendState.AfterObfuscation) {
- node.appendNode(astTree);
- }
- });
- }
- }, {
- key: 'beforeObfuscation',
- value: function beforeObfuscation(astTree) {
- this.nodes.forEach(function (node) {
- if (node.getAppendState() === AppendState_1.AppendState.BeforeObfuscation) {
- node.appendNode(astTree);
- }
- });
- }
- }, {
- key: 'initializeNodeObfuscators',
- value: function initializeNodeObfuscators(node, parentNode) {
- var _this = this;
- var nodeObfuscators = this.nodeObfuscators.get(node.type);
- if (!nodeObfuscators) {
- return;
- }
- nodeObfuscators.forEach(function (obfuscator) {
- new obfuscator(_this.nodes, _this.options).obfuscateNode(node, parentNode);
- });
- }
- }, {
- key: 'obfuscate',
- value: function obfuscate(node) {
- var _this2 = this;
- estraverse.replace(node, {
- leave: function leave(node, parentNode) {
- _this2.initializeNodeObfuscators(node, parentNode);
- }
- });
- }
- }]);
- return Obfuscator;
- }();
- exports.Obfuscator = Obfuscator;
- /***/ },
- /* 26 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var SourceMapMode_1 = __webpack_require__(11);
- var ObfuscationResult_1 = __webpack_require__(18);
- var Utils_1 = __webpack_require__(0);
- var SourceMapCorrector = function () {
- function SourceMapCorrector(obfuscationResult, sourceMapUrl, sourceMapMode) {
- _classCallCheck(this, SourceMapCorrector);
- this.obfuscatedCode = obfuscationResult.getObfuscatedCode();
- this.sourceMap = obfuscationResult.getSourceMap();
- this.sourceMapUrl = sourceMapUrl;
- this.sourceMapMode = sourceMapMode;
- }
- _createClass(SourceMapCorrector, [{
- key: "correct",
- value: function correct() {
- return new ObfuscationResult_1.ObfuscationResult(this.correctObfuscatedCode(), this.correctSourceMap());
- }
- }, {
- key: "correctObfuscatedCode",
- value: function correctObfuscatedCode() {
- if (!this.sourceMap) {
- return this.obfuscatedCode;
- }
- var sourceMappingUrl = '//# sourceMappingURL=';
- switch (this.sourceMapMode) {
- case SourceMapMode_1.SourceMapMode.Inline:
- sourceMappingUrl += "data:application/json;base64," + Utils_1.Utils.btoa(this.sourceMapUrl || this.sourceMap, false);
- break;
- case SourceMapMode_1.SourceMapMode.Separate:
- default:
- if (this.sourceMapUrl) {
- sourceMappingUrl += this.sourceMapUrl;
- break;
- }
- return this.obfuscatedCode;
- }
- return this.obfuscatedCode + "\n" + sourceMappingUrl;
- }
- }, {
- key: "correctSourceMap",
- value: function correctSourceMap() {
- if (this.sourceMapMode === SourceMapMode_1.SourceMapMode.Inline) {
- return '';
- }
- return this.sourceMap;
- }
- }]);
- return SourceMapCorrector;
- }();
- exports.SourceMapCorrector = SourceMapCorrector;
- /***/ },
- /* 27 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var Utils_1 = __webpack_require__(0);
- var UnicodeArray = function () {
- function UnicodeArray() {
- _classCallCheck(this, UnicodeArray);
- this.array = [];
- }
- _createClass(UnicodeArray, [{
- key: "addToArray",
- value: function addToArray(value) {
- this.array.push(value);
- }
- }, {
- key: "getArray",
- value: function getArray() {
- return this.array;
- }
- }, {
- key: "getIndexOf",
- value: function getIndexOf(value) {
- return this.array.indexOf(value);
- }
- }, {
- key: "getLength",
- value: function getLength() {
- return this.array.length;
- }
- }, {
- key: "rotateArray",
- value: function rotateArray(rotationValue) {
- this.array = Utils_1.Utils.arrayRotate(this.array, rotationValue);
- }
- }, {
- key: "toString",
- value: function toString() {
- return this.array.toString();
- }
- }]);
- return UnicodeArray;
- }();
- exports.UnicodeArray = UnicodeArray;
- /***/ },
- /* 28 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var fs = __webpack_require__(70);
- var mkdirp = __webpack_require__(71);
- var path = __webpack_require__(23);
- var Utils_1 = __webpack_require__(0);
- var CLIUtils = function () {
- function CLIUtils() {
- _classCallCheck(this, CLIUtils);
- }
- _createClass(CLIUtils, null, [{
- key: 'getOutputCodePath',
- value: function getOutputCodePath(outputPath, inputPath) {
- if (outputPath) {
- return outputPath;
- }
- return inputPath.split('.').map(function (value, index) {
- return index === 0 ? value + '-obfuscated' : value;
- }).join('.');
- }
- }, {
- key: 'getOutputSourceMapPath',
- value: function getOutputSourceMapPath(outputCodePath) {
- return outputCodePath.split('.').map(function (value, index, array) {
- return index === array.length - 1 ? value + '.map' : value;
- }).join('.');
- }
- }, {
- key: 'getPackageConfig',
- value: function getPackageConfig() {
- return JSON.parse(fs.readFileSync(path.join(path.dirname(fs.realpathSync(process.argv[1])), '../package.json'), CLIUtils.encoding));
- }
- }, {
- key: 'isFilePath',
- value: function isFilePath(filePath) {
- try {
- return fs.statSync(filePath).isFile();
- } catch (e) {
- return false;
- }
- }
- }, {
- key: 'readFile',
- value: function readFile(inputPath) {
- return fs.readFileSync(inputPath, CLIUtils.encoding);
- }
- }, {
- key: 'validateInputPath',
- value: function validateInputPath(inputPath) {
- if (!CLIUtils.isFilePath(inputPath)) {
- throw new ReferenceError('Given input path must be a valid file path');
- }
- if (!Utils_1.Utils.arrayContains(CLIUtils.availableInputExtensions, path.extname(inputPath))) {
- throw new ReferenceError('Input file must have .js extension');
- }
- }
- }, {
- key: 'writeFile',
- value: function writeFile(outputPath, data) {
- mkdirp.sync(path.dirname(outputPath));
- fs.writeFileSync(outputPath, data, {
- encoding: CLIUtils.encoding
- });
- }
- }]);
- return CLIUtils;
- }();
- CLIUtils.availableInputExtensions = ['.js'];
- CLIUtils.encoding = 'utf8';
- exports.CLIUtils = CLIUtils;
- /***/ },
- /* 29 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var commander = __webpack_require__(69);
- var path = __webpack_require__(23);
- var SourceMapMode_1 = __webpack_require__(11);
- var DefaultPreset_1 = __webpack_require__(21);
- var CLIUtils_1 = __webpack_require__(28);
- var JavaScriptObfuscator_1 = __webpack_require__(9);
- var JavaScriptObfuscatorInternal_1 = __webpack_require__(17);
- var Utils_1 = __webpack_require__(0);
- var JavaScriptObfuscatorCLI = function () {
- function JavaScriptObfuscatorCLI(argv) {
- _classCallCheck(this, JavaScriptObfuscatorCLI);
- this.data = '';
- this.rawArguments = argv;
- this.arguments = this.rawArguments.slice(2);
- }
- _createClass(JavaScriptObfuscatorCLI, [{
- key: 'run',
- value: function run() {
- this.configureCommands();
- if (!this.arguments.length || Utils_1.Utils.arrayContains(this.arguments, '--help')) {
- this.commands.outputHelp();
- return;
- }
- this.inputPath = this.arguments[0];
- CLIUtils_1.CLIUtils.validateInputPath(this.inputPath);
- this.getData();
- this.processData();
- }
- }, {
- key: 'buildOptions',
- value: function buildOptions() {
- var obfuscatorOptions = {},
- availableOptions = Object.keys(DefaultPreset_1.DEFAULT_PRESET);
- for (var option in this.commands) {
- if (!this.commands.hasOwnProperty(option)) {
- continue;
- }
- if (!Utils_1.Utils.arrayContains(availableOptions, option)) {
- continue;
- }
- obfuscatorOptions[option] = this.commands[option];
- }
- return Object.assign({}, DefaultPreset_1.DEFAULT_PRESET, obfuscatorOptions);
- }
- }, {
- key: 'configureCommands',
- value: function configureCommands() {
- this.commands = new commander.Command().version(JavaScriptObfuscatorCLI.getBuildVersion(), '-v, --version').usage('<inputPath> [options]').option('-o, --output <path>', 'Output path for obfuscated code').option('--compact <boolean>', 'Disable one line output code compacting', JavaScriptObfuscatorCLI.parseBoolean).option('--debugProtection <boolean>', 'Disable browser Debug panel (can cause DevTools enabled browser freeze)', JavaScriptObfuscatorCLI.parseBoolean).option('--debugProtectionInterval <boolean>', 'Disable browser Debug panel even after page was loaded (can cause DevTools enabled browser freeze)', JavaScriptObfuscatorCLI.parseBoolean).option('--disableConsoleOutput <boolean>', 'Allow console.log, console.info, console.error and console.warn messages output into browser console', JavaScriptObfuscatorCLI.parseBoolean).option('--encodeUnicodeLiterals <boolean>', 'All literals in Unicode array become encoded in Base64 (this option can slightly slow down your code speed)', JavaScriptObfuscatorCLI.parseBoolean).option('--reservedNames <list>', 'Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp patterns (comma separated)', function (val) {
- return val.split(',');
- }).option('--rotateUnicodeArray <boolean>', 'Disable rotation of unicode array values during obfuscation', JavaScriptObfuscatorCLI.parseBoolean).option('--selfDefending <boolean>', 'Disables self-defending for obfuscated code', JavaScriptObfuscatorCLI.parseBoolean).option('--sourceMap <boolean>', 'Enables source map generation', JavaScriptObfuscatorCLI.parseBoolean).option('--sourceMapMode <string> [inline, separate]', 'Specify source map output mode', JavaScriptObfuscatorCLI.parseSourceMapMode).option('--unicodeArray <boolean>', 'Disables gathering of all literal strings into an array and replacing every literal string with an array call', JavaScriptObfuscatorCLI.parseBoolean).option('--unicodeArrayThreshold <number>', 'The probability that the literal string will be inserted into unicodeArray (Default: 0.8, Min: 0, Max: 1)', parseFloat).option('--wrapUnicodeArrayCalls <boolean>', 'Disables usage of special access function instead of direct array call', JavaScriptObfuscatorCLI.parseBoolean).parse(this.rawArguments);
- this.commands.on('--help', function () {
- console.log(' Examples:\n');
- console.log(' %> javascript-obfuscator in.js --compact true --selfDefending false');
- console.log(' %> javascript-obfuscator in.js --output out.js --compact true --selfDefending false');
- console.log('');
- });
- }
- }, {
- key: 'getData',
- value: function getData() {
- this.data = CLIUtils_1.CLIUtils.readFile(this.inputPath);
- }
- }, {
- key: 'processData',
- value: function processData() {
- var options = this.buildOptions(),
- outputCodePath = CLIUtils_1.CLIUtils.getOutputCodePath(this.commands.output, this.inputPath);
- if (options.sourceMap) {
- this.processDataWithSourceMap(outputCodePath, options);
- } else {
- this.processDataWithoutSourceMap(outputCodePath, options);
- }
- }
- }, {
- key: 'processDataWithoutSourceMap',
- value: function processDataWithoutSourceMap(outputCodePath, options) {
- var obfuscatedCode = JavaScriptObfuscator_1.JavaScriptObfuscator.obfuscate(this.data, options).getObfuscatedCode();
- CLIUtils_1.CLIUtils.writeFile(outputCodePath, obfuscatedCode);
- }
- }, {
- key: 'processDataWithSourceMap',
- value: function processDataWithSourceMap(outputCodePath, options) {
- var javaScriptObfuscator = new JavaScriptObfuscatorInternal_1.JavaScriptObfuscatorInternal(this.data, options),
- obfuscationResult = void 0,
- outputSourceMapPath = CLIUtils_1.CLIUtils.getOutputSourceMapPath(outputCodePath);
- javaScriptObfuscator.obfuscate();
- if (options.sourceMapMode === SourceMapMode_1.SourceMapMode.Separate) {
- javaScriptObfuscator.setSourceMapUrl(path.basename(outputSourceMapPath));
- }
- obfuscationResult = javaScriptObfuscator.getObfuscationResult();
- CLIUtils_1.CLIUtils.writeFile(outputCodePath, obfuscationResult.getObfuscatedCode());
- if (obfuscationResult.getSourceMap()) {
- CLIUtils_1.CLIUtils.writeFile(outputSourceMapPath, obfuscationResult.getSourceMap());
- }
- }
- }], [{
- key: 'getBuildVersion',
- value: function getBuildVersion() {
- return CLIUtils_1.CLIUtils.getPackageConfig().version;
- }
- }, {
- key: 'parseBoolean',
- value: function parseBoolean(value) {
- return value === 'true' || value === '1';
- }
- }, {
- key: 'parseSourceMapMode',
- value: function parseSourceMapMode(value) {
- var availableMode = Object.keys(SourceMapMode_1.SourceMapMode).some(function (key) {
- return SourceMapMode_1.SourceMapMode[key] === value;
- });
- if (!availableMode) {
- throw new ReferenceError('Invalid value of `--sourceMapMode` option');
- }
- return value;
- }
- }]);
- return JavaScriptObfuscatorCLI;
- }();
- exports.JavaScriptObfuscatorCLI = JavaScriptObfuscatorCLI;
- /***/ },
- /* 30 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var AppendState_1 = __webpack_require__(3);
- var ConsoleOutputDisableExpressionTemplate_1 = __webpack_require__(56);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var NodeUtils_1 = __webpack_require__(1);
- var ConsoleOutputDisableExpressionNode = function (_AbstractCustomNode_) {
- _inherits(ConsoleOutputDisableExpressionNode, _AbstractCustomNode_);
- function ConsoleOutputDisableExpressionNode() {
- var _Object$getPrototypeO;
- _classCallCheck(this, ConsoleOutputDisableExpressionNode);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(ConsoleOutputDisableExpressionNode)).call.apply(_Object$getPrototypeO, [this].concat(args)));
- _this.appendState = AppendState_1.AppendState.BeforeObfuscation;
- return _this;
- }
- _createClass(ConsoleOutputDisableExpressionNode, [{
- key: "appendNode",
- value: function appendNode(blockScopeNode) {
- NodeUtils_1.NodeUtils.prependNode(blockScopeNode.body, this.getNode());
- }
- }, {
- key: "getNodeStructure",
- value: function getNodeStructure() {
- return NodeUtils_1.NodeUtils.convertCodeToStructure(ConsoleOutputDisableExpressionTemplate_1.ConsoleOutputDisableExpressionTemplate());
- }
- }]);
- return ConsoleOutputDisableExpressionNode;
- }(AbstractCustomNode_1.AbstractCustomNode);
- exports.ConsoleOutputDisableExpressionNode = ConsoleOutputDisableExpressionNode;
- /***/ },
- /* 31 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- __webpack_require__(8);
- var AppendState_1 = __webpack_require__(3);
- var DebufProtectionFunctionCallTemplate_1 = __webpack_require__(57);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var NodeUtils_1 = __webpack_require__(1);
- var DebugProtectionFunctionCallNode = function (_AbstractCustomNode_) {
- _inherits(DebugProtectionFunctionCallNode, _AbstractCustomNode_);
- function DebugProtectionFunctionCallNode(debugProtectionFunctionName, options) {
- _classCallCheck(this, DebugProtectionFunctionCallNode);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionCallNode).call(this, options));
- _this.appendState = AppendState_1.AppendState.BeforeObfuscation;
- _this.debugProtectionFunctionName = debugProtectionFunctionName;
- return _this;
- }
- _createClass(DebugProtectionFunctionCallNode, [{
- key: "appendNode",
- value: function appendNode(blockScopeNode) {
- NodeUtils_1.NodeUtils.appendNode(blockScopeNode.body, this.getNode());
- }
- }, {
- key: "getNodeStructure",
- value: function getNodeStructure() {
- return NodeUtils_1.NodeUtils.convertCodeToStructure(DebufProtectionFunctionCallTemplate_1.DebugProtectionFunctionCallTemplate().formatUnicorn({
- debugProtectionFunctionName: this.debugProtectionFunctionName
- }));
- }
- }]);
- return DebugProtectionFunctionCallNode;
- }(AbstractCustomNode_1.AbstractCustomNode);
- exports.DebugProtectionFunctionCallNode = DebugProtectionFunctionCallNode;
- /***/ },
- /* 32 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- __webpack_require__(8);
- var AppendState_1 = __webpack_require__(3);
- var DebugProtectionFunctionIntervalTemplate_1 = __webpack_require__(58);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var NodeUtils_1 = __webpack_require__(1);
- var DebugProtectionFunctionIntervalNode = function (_AbstractCustomNode_) {
- _inherits(DebugProtectionFunctionIntervalNode, _AbstractCustomNode_);
- function DebugProtectionFunctionIntervalNode(debugProtectionFunctionName, options) {
- _classCallCheck(this, DebugProtectionFunctionIntervalNode);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionIntervalNode).call(this, options));
- _this.appendState = AppendState_1.AppendState.BeforeObfuscation;
- _this.debugProtectionFunctionName = debugProtectionFunctionName;
- return _this;
- }
- _createClass(DebugProtectionFunctionIntervalNode, [{
- key: "appendNode",
- value: function appendNode(blockScopeNode) {
- NodeUtils_1.NodeUtils.appendNode(blockScopeNode.body, this.getNode());
- }
- }, {
- key: "getNodeStructure",
- value: function getNodeStructure() {
- return NodeUtils_1.NodeUtils.convertCodeToStructure(DebugProtectionFunctionIntervalTemplate_1.DebugProtectionFunctionIntervalTemplate().formatUnicorn({
- debugProtectionFunctionName: this.debugProtectionFunctionName
- }));
- }
- }]);
- return DebugProtectionFunctionIntervalNode;
- }(AbstractCustomNode_1.AbstractCustomNode);
- exports.DebugProtectionFunctionIntervalNode = DebugProtectionFunctionIntervalNode;
- /***/ },
- /* 33 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- __webpack_require__(8);
- var AppendState_1 = __webpack_require__(3);
- var DebugProtectionFunctionTemplate_1 = __webpack_require__(59);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var NodeUtils_1 = __webpack_require__(1);
- var Utils_1 = __webpack_require__(0);
- var DebugProtectionFunctionNode = function (_AbstractCustomNode_) {
- _inherits(DebugProtectionFunctionNode, _AbstractCustomNode_);
- function DebugProtectionFunctionNode(debugProtectionFunctionName, options) {
- _classCallCheck(this, DebugProtectionFunctionNode);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionNode).call(this, options));
- _this.appendState = AppendState_1.AppendState.BeforeObfuscation;
- _this.debugProtectionFunctionName = debugProtectionFunctionName;
- return _this;
- }
- _createClass(DebugProtectionFunctionNode, [{
- key: "appendNode",
- value: function appendNode(blockScopeNode) {
- var programBodyLength = blockScopeNode.body.length,
- randomIndex = Utils_1.Utils.getRandomGenerator().integer({
- min: 0,
- max: programBodyLength
- });
- NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), randomIndex);
- }
- }, {
- key: "getNodeIdentifier",
- value: function getNodeIdentifier() {
- return this.debugProtectionFunctionName;
- }
- }, {
- key: "getNodeStructure",
- value: function getNodeStructure() {
- return NodeUtils_1.NodeUtils.convertCodeToStructure(DebugProtectionFunctionTemplate_1.DebugProtectionFunctionTemplate().formatUnicorn({
- debugProtectionFunctionName: this.debugProtectionFunctionName
- }));
- }
- }]);
- return DebugProtectionFunctionNode;
- }(AbstractCustomNode_1.AbstractCustomNode);
- exports.DebugProtectionFunctionNode = DebugProtectionFunctionNode;
- /***/ },
- /* 34 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var AppendState_1 = __webpack_require__(3);
- var NoCustomNodesPreset_1 = __webpack_require__(16);
- var SelfDefendingTemplate_1 = __webpack_require__(60);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var JavaScriptObfuscator_1 = __webpack_require__(9);
- var NodeUtils_1 = __webpack_require__(1);
- var Utils_1 = __webpack_require__(0);
- var SelfDefendingUnicodeNode = function (_AbstractCustomNode_) {
- _inherits(SelfDefendingUnicodeNode, _AbstractCustomNode_);
- function SelfDefendingUnicodeNode() {
- var _Object$getPrototypeO;
- _classCallCheck(this, SelfDefendingUnicodeNode);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(SelfDefendingUnicodeNode)).call.apply(_Object$getPrototypeO, [this].concat(args)));
- _this.appendState = AppendState_1.AppendState.AfterObfuscation;
- return _this;
- }
- _createClass(SelfDefendingUnicodeNode, [{
- key: "appendNode",
- value: function appendNode(blockScopeNode) {
- var programBodyLength = blockScopeNode.body.length,
- randomIndex = 0;
- if (programBodyLength > 2) {
- randomIndex = Utils_1.Utils.getRandomGenerator().integer({
- min: programBodyLength / 2,
- max: programBodyLength - 1
- });
- }
- NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), randomIndex);
- }
- }, {
- key: "getNodeStructure",
- value: function getNodeStructure() {
- return NodeUtils_1.NodeUtils.convertCodeToStructure(JavaScriptObfuscator_1.JavaScriptObfuscator.obfuscate(SelfDefendingTemplate_1.SelfDefendingTemplate(), NoCustomNodesPreset_1.NO_CUSTOM_NODES_PRESET).getObfuscatedCode());
- }
- }]);
- return SelfDefendingUnicodeNode;
- }(AbstractCustomNode_1.AbstractCustomNode);
- exports.SelfDefendingUnicodeNode = SelfDefendingUnicodeNode;
- /***/ },
- /* 35 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- __webpack_require__(8);
- var AppendState_1 = __webpack_require__(3);
- var UnicodeArrayCallsWrapperTemplate_1 = __webpack_require__(61);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var NodeUtils_1 = __webpack_require__(1);
- var Utils_1 = __webpack_require__(0);
- var UnicodeArrayCallsWrapper = function (_AbstractCustomNode_) {
- _inherits(UnicodeArrayCallsWrapper, _AbstractCustomNode_);
- function UnicodeArrayCallsWrapper(unicodeArrayCallsWrapperName, unicodeArrayName, unicodeArray, options) {
- _classCallCheck(this, UnicodeArrayCallsWrapper);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayCallsWrapper).call(this, options));
- _this.appendState = AppendState_1.AppendState.AfterObfuscation;
- _this.unicodeArrayCallsWrapperName = unicodeArrayCallsWrapperName;
- _this.unicodeArrayName = unicodeArrayName;
- _this.unicodeArray = unicodeArray;
- return _this;
- }
- _createClass(UnicodeArrayCallsWrapper, [{
- key: "appendNode",
- value: function appendNode(blockScopeNode) {
- if (!this.unicodeArray.getLength()) {
- return;
- }
- NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), 1);
- }
- }, {
- key: "getNodeIdentifier",
- value: function getNodeIdentifier() {
- return this.unicodeArrayCallsWrapperName;
- }
- }, {
- key: "getNode",
- value: function getNode() {
- return _get(Object.getPrototypeOf(UnicodeArrayCallsWrapper.prototype), "getNode", this).call(this);
- }
- }, {
- key: "getNodeStructure",
- value: function getNodeStructure() {
- var keyName = Utils_1.Utils.getRandomVariableName();
- return NodeUtils_1.NodeUtils.convertCodeToStructure(UnicodeArrayCallsWrapperTemplate_1.UnicodeArrayCallsWrapperTemplate().formatUnicorn({
- keyName: keyName,
- unicodeArrayCallsWrapperName: this.unicodeArrayCallsWrapperName,
- unicodeArrayName: this.unicodeArrayName
- }));
- }
- }]);
- return UnicodeArrayCallsWrapper;
- }(AbstractCustomNode_1.AbstractCustomNode);
- exports.UnicodeArrayCallsWrapper = UnicodeArrayCallsWrapper;
- /***/ },
- /* 36 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- __webpack_require__(8);
- var AppendState_1 = __webpack_require__(3);
- var NoCustomNodesPreset_1 = __webpack_require__(16);
- var AtobTemplate_1 = __webpack_require__(55);
- var SelfDefendingTemplate_1 = __webpack_require__(62);
- var UnicodeArrayDecodeTemplate_1 = __webpack_require__(63);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var JavaScriptObfuscator_1 = __webpack_require__(9);
- var NodeUtils_1 = __webpack_require__(1);
- var UnicodeArrayDecodeNode = function (_AbstractCustomNode_) {
- _inherits(UnicodeArrayDecodeNode, _AbstractCustomNode_);
- function UnicodeArrayDecodeNode(unicodeArrayName, unicodeArray, options) {
- _classCallCheck(this, UnicodeArrayDecodeNode);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayDecodeNode).call(this, options));
- _this.appendState = AppendState_1.AppendState.AfterObfuscation;
- _this.unicodeArrayName = unicodeArrayName;
- _this.unicodeArray = unicodeArray;
- return _this;
- }
- _createClass(UnicodeArrayDecodeNode, [{
- key: "appendNode",
- value: function appendNode(blockScopeNode) {
- if (!this.unicodeArray.getLength()) {
- return;
- }
- NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), 1);
- }
- }, {
- key: "getNode",
- value: function getNode() {
- return _get(Object.getPrototypeOf(UnicodeArrayDecodeNode.prototype), "getNode", this).call(this);
- }
- }, {
- key: "getNodeStructure",
- value: function getNodeStructure() {
- var forLoopFunctionName = 'forLoopFunc';
- var code = void 0;
- if (this.options.selfDefending) {
- code = SelfDefendingTemplate_1.SelfDefendingTemplate().formatUnicorn({
- forLoopFunctionName: forLoopFunctionName,
- unicodeArrayName: this.unicodeArrayName
- });
- } else {
- code = forLoopFunctionName + "();";
- }
- return NodeUtils_1.NodeUtils.convertCodeToStructure(JavaScriptObfuscator_1.JavaScriptObfuscator.obfuscate(UnicodeArrayDecodeTemplate_1.UnicodeArrayDecodeTemplate().formatUnicorn({
- atobPolyfill: AtobTemplate_1.AtobTemplate(),
- code: code,
- forLoopFunctionName: forLoopFunctionName,
- unicodeArrayName: this.unicodeArrayName
- }), NoCustomNodesPreset_1.NO_CUSTOM_NODES_PRESET).getObfuscatedCode());
- }
- }]);
- return UnicodeArrayDecodeNode;
- }(AbstractCustomNode_1.AbstractCustomNode);
- exports.UnicodeArrayDecodeNode = UnicodeArrayDecodeNode;
- /***/ },
- /* 37 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- __webpack_require__(8);
- var AppendState_1 = __webpack_require__(3);
- var UnicodeArrayTemplate_1 = __webpack_require__(64);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var NodeUtils_1 = __webpack_require__(1);
- var UnicodeArrayNode = function (_AbstractCustomNode_) {
- _inherits(UnicodeArrayNode, _AbstractCustomNode_);
- function UnicodeArrayNode(unicodeArray, unicodeArrayName) {
- var unicodeArrayRotateValue = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2];
- var options = arguments[3];
- _classCallCheck(this, UnicodeArrayNode);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayNode).call(this, options));
- _this.appendState = AppendState_1.AppendState.AfterObfuscation;
- _this.unicodeArray = unicodeArray;
- _this.unicodeArrayName = unicodeArrayName;
- _this.unicodeArrayRotateValue = unicodeArrayRotateValue;
- return _this;
- }
- _createClass(UnicodeArrayNode, [{
- key: 'appendNode',
- value: function appendNode(blockScopeNode) {
- if (!this.unicodeArray.getLength()) {
- return;
- }
- NodeUtils_1.NodeUtils.prependNode(blockScopeNode.body, this.getNode());
- }
- }, {
- key: 'getNodeIdentifier',
- value: function getNodeIdentifier() {
- return this.unicodeArrayName;
- }
- }, {
- key: 'getNodeData',
- value: function getNodeData() {
- return this.unicodeArray;
- }
- }, {
- key: 'getNode',
- value: function getNode() {
- this.unicodeArray.rotateArray(this.unicodeArrayRotateValue);
- return _get(Object.getPrototypeOf(UnicodeArrayNode.prototype), 'getNode', this).call(this);
- }
- }, {
- key: 'updateNodeData',
- value: function updateNodeData(data) {
- this.unicodeArray.addToArray(data);
- }
- }, {
- key: 'getNodeStructure',
- value: function getNodeStructure() {
- return NodeUtils_1.NodeUtils.convertCodeToStructure(UnicodeArrayTemplate_1.UnicodeArrayTemplate().formatUnicorn({
- unicodeArrayName: this.unicodeArrayName,
- unicodeArray: this.unicodeArray.toString()
- }));
- }
- }]);
- return UnicodeArrayNode;
- }(AbstractCustomNode_1.AbstractCustomNode);
- UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH = 4;
- exports.UnicodeArrayNode = UnicodeArrayNode;
- /***/ },
- /* 38 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- __webpack_require__(8);
- var AppendState_1 = __webpack_require__(3);
- var NoCustomNodesPreset_1 = __webpack_require__(16);
- var SelfDefendingTemplate_1 = __webpack_require__(65);
- var UnicodeArrayRotateFunctionTemplate_1 = __webpack_require__(66);
- var AbstractCustomNode_1 = __webpack_require__(4);
- var JavaScriptObfuscator_1 = __webpack_require__(9);
- var NodeUtils_1 = __webpack_require__(1);
- var Utils_1 = __webpack_require__(0);
- var UnicodeArrayRotateFunctionNode = function (_AbstractCustomNode_) {
- _inherits(UnicodeArrayRotateFunctionNode, _AbstractCustomNode_);
- function UnicodeArrayRotateFunctionNode(unicodeArrayName, unicodeArray, unicodeArrayRotateValue, options) {
- _classCallCheck(this, UnicodeArrayRotateFunctionNode);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayRotateFunctionNode).call(this, options));
- _this.appendState = AppendState_1.AppendState.AfterObfuscation;
- _this.unicodeArrayName = unicodeArrayName;
- _this.unicodeArray = unicodeArray;
- _this.unicodeArrayRotateValue = unicodeArrayRotateValue;
- return _this;
- }
- _createClass(UnicodeArrayRotateFunctionNode, [{
- key: "appendNode",
- value: function appendNode(blockScopeNode) {
- if (!this.unicodeArray.getLength()) {
- return;
- }
- NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), 1);
- }
- }, {
- key: "getNode",
- value: function getNode() {
- return _get(Object.getPrototypeOf(UnicodeArrayRotateFunctionNode.prototype), "getNode", this).call(this);
- }
- }, {
- key: "getNodeStructure",
- value: function getNodeStructure() {
- var code = '',
- timesName = Utils_1.Utils.getRandomVariableName(),
- whileFunctionName = Utils_1.Utils.getRandomVariableName();
- if (this.options.selfDefending) {
- code = SelfDefendingTemplate_1.SelfDefendingTemplate().formatUnicorn({
- timesName: timesName,
- whileFunctionName: whileFunctionName
- });
- } else {
- code = whileFunctionName + "(++" + timesName + ")";
- }
- return NodeUtils_1.NodeUtils.convertCodeToStructure(JavaScriptObfuscator_1.JavaScriptObfuscator.obfuscate(UnicodeArrayRotateFunctionTemplate_1.UnicodeArrayRotateFunctionTemplate().formatUnicorn({
- code: code,
- timesName: timesName,
- unicodeArrayName: this.unicodeArrayName,
- unicodeArrayRotateValue: Utils_1.Utils.decToHex(this.unicodeArrayRotateValue),
- whileFunctionName: whileFunctionName
- }), NoCustomNodesPreset_1.NO_CUSTOM_NODES_PRESET).getObfuscatedCode());
- }
- }]);
- return UnicodeArrayRotateFunctionNode;
- }(AbstractCustomNode_1.AbstractCustomNode);
- exports.UnicodeArrayRotateFunctionNode = UnicodeArrayRotateFunctionNode;
- /***/ },
- /* 39 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var AbstractNodesGroup_1 = __webpack_require__(12);
- var ConsoleOutputDisableExpressionNode_1 = __webpack_require__(30);
- var ConsoleOutputNodesGroup = function (_AbstractNodesGroup_) {
- _inherits(ConsoleOutputNodesGroup, _AbstractNodesGroup_);
- function ConsoleOutputNodesGroup(options) {
- _classCallCheck(this, ConsoleOutputNodesGroup);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ConsoleOutputNodesGroup).call(this, options));
- if (!_this.options.disableConsoleOutput) {
- return _possibleConstructorReturn(_this);
- }
- _this.nodes.set('consoleOutputDisableExpressionNode', new ConsoleOutputDisableExpressionNode_1.ConsoleOutputDisableExpressionNode(_this.options));
- var t = {};
- return _this;
- }
- return ConsoleOutputNodesGroup;
- }(AbstractNodesGroup_1.AbstractNodesGroup);
- exports.ConsoleOutputNodesGroup = ConsoleOutputNodesGroup;
- /***/ },
- /* 40 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var DebugProtectionFunctionCallNode_1 = __webpack_require__(31);
- var DebugProtectionFunctionIntervalNode_1 = __webpack_require__(32);
- var DebugProtectionFunctionNode_1 = __webpack_require__(33);
- var AbstractNodesGroup_1 = __webpack_require__(12);
- var Utils_1 = __webpack_require__(0);
- var DebugProtectionNodesGroup = function (_AbstractNodesGroup_) {
- _inherits(DebugProtectionNodesGroup, _AbstractNodesGroup_);
- function DebugProtectionNodesGroup(options) {
- _classCallCheck(this, DebugProtectionNodesGroup);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionNodesGroup).call(this, options));
- _this.debugProtectionFunctionIdentifier = Utils_1.Utils.getRandomVariableName();
- if (!_this.options.debugProtection) {
- return _possibleConstructorReturn(_this);
- }
- _this.nodes.set('debugProtectionFunctionNode', new DebugProtectionFunctionNode_1.DebugProtectionFunctionNode(_this.debugProtectionFunctionIdentifier, _this.options));
- _this.nodes.set('debugProtectionFunctionCallNode', new DebugProtectionFunctionCallNode_1.DebugProtectionFunctionCallNode(_this.debugProtectionFunctionIdentifier, _this.options));
- if (_this.options.debugProtectionInterval) {
- _this.nodes.set('debugProtectionFunctionIntervalNode', new DebugProtectionFunctionIntervalNode_1.DebugProtectionFunctionIntervalNode(_this.debugProtectionFunctionIdentifier, _this.options));
- }
- return _this;
- }
- return DebugProtectionNodesGroup;
- }(AbstractNodesGroup_1.AbstractNodesGroup);
- exports.DebugProtectionNodesGroup = DebugProtectionNodesGroup;
- /***/ },
- /* 41 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var AbstractNodesGroup_1 = __webpack_require__(12);
- var SelfDefendingUnicodeNode_1 = __webpack_require__(34);
- var SelfDefendingNodesGroup = function (_AbstractNodesGroup_) {
- _inherits(SelfDefendingNodesGroup, _AbstractNodesGroup_);
- function SelfDefendingNodesGroup(options) {
- _classCallCheck(this, SelfDefendingNodesGroup);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(SelfDefendingNodesGroup).call(this, options));
- if (!_this.options.selfDefending) {
- return _possibleConstructorReturn(_this);
- }
- _this.nodes.set('selfDefendingUnicodeNode', new SelfDefendingUnicodeNode_1.SelfDefendingUnicodeNode(_this.options));
- return _this;
- }
- return SelfDefendingNodesGroup;
- }(AbstractNodesGroup_1.AbstractNodesGroup);
- exports.SelfDefendingNodesGroup = SelfDefendingNodesGroup;
- /***/ },
- /* 42 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var AbstractNodesGroup_1 = __webpack_require__(12);
- var UnicodeArray_1 = __webpack_require__(27);
- var UnicodeArrayCallsWrapper_1 = __webpack_require__(35);
- var UnicodeArrayDecodeNode_1 = __webpack_require__(36);
- var UnicodeArrayNode_1 = __webpack_require__(37);
- var UnicodeArrayRotateFunctionNode_1 = __webpack_require__(38);
- var Utils_1 = __webpack_require__(0);
- var UnicodeArrayNodesGroup = function (_AbstractNodesGroup_) {
- _inherits(UnicodeArrayNodesGroup, _AbstractNodesGroup_);
- function UnicodeArrayNodesGroup(options) {
- _classCallCheck(this, UnicodeArrayNodesGroup);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayNodesGroup).call(this, options));
- _this.unicodeArrayName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH);
- _this.unicodeArrayTranslatorName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH);
- if (!_this.options.unicodeArray) {
- return _possibleConstructorReturn(_this);
- }
- if (_this.options.rotateUnicodeArray) {
- _this.unicodeArrayRotateValue = Utils_1.Utils.getRandomGenerator().integer({
- min: 100,
- max: 500
- });
- } else {
- _this.unicodeArrayRotateValue = 0;
- }
- var unicodeArray = new UnicodeArray_1.UnicodeArray(),
- unicodeArrayNode = new UnicodeArrayNode_1.UnicodeArrayNode(unicodeArray, _this.unicodeArrayName, _this.unicodeArrayRotateValue, _this.options);
- _this.nodes.set('unicodeArrayNode', unicodeArrayNode);
- if (_this.options.wrapUnicodeArrayCalls) {
- _this.nodes.set('unicodeArrayCallsWrapper', new UnicodeArrayCallsWrapper_1.UnicodeArrayCallsWrapper(_this.unicodeArrayTranslatorName, _this.unicodeArrayName, unicodeArray, _this.options));
- }
- if (_this.options.encodeUnicodeLiterals) {
- _this.nodes.set('unicodeArrayDecodeNode', new UnicodeArrayDecodeNode_1.UnicodeArrayDecodeNode(_this.unicodeArrayName, unicodeArray, _this.options));
- }
- if (_this.options.rotateUnicodeArray) {
- _this.nodes.set('unicodeArrayRotateFunctionNode', new UnicodeArrayRotateFunctionNode_1.UnicodeArrayRotateFunctionNode(_this.unicodeArrayName, unicodeArray, _this.unicodeArrayRotateValue, _this.options));
- }
- return _this;
- }
- return UnicodeArrayNodesGroup;
- }(AbstractNodesGroup_1.AbstractNodesGroup);
- exports.UnicodeArrayNodesGroup = UnicodeArrayNodesGroup;
- /***/ },
- /* 43 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var estraverse = __webpack_require__(6);
- var NodeType_1 = __webpack_require__(5);
- var AbstractNodeObfuscator_1 = __webpack_require__(7);
- var IdentifierReplacer_1 = __webpack_require__(14);
- var Nodes_1 = __webpack_require__(2);
- var NodeUtils_1 = __webpack_require__(1);
- var CatchClauseObfuscator = function (_AbstractNodeObfuscat) {
- _inherits(CatchClauseObfuscator, _AbstractNodeObfuscat);
- function CatchClauseObfuscator(nodes, options) {
- _classCallCheck(this, CatchClauseObfuscator);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(CatchClauseObfuscator).call(this, nodes, options));
- _this.identifierReplacer = new IdentifierReplacer_1.IdentifierReplacer(_this.nodes, _this.options);
- return _this;
- }
- _createClass(CatchClauseObfuscator, [{
- key: "obfuscateNode",
- value: function obfuscateNode(catchClauseNode) {
- this.storeCatchClauseParam(catchClauseNode);
- this.replaceCatchClauseParam(catchClauseNode);
- }
- }, {
- key: "storeCatchClauseParam",
- value: function storeCatchClauseParam(catchClauseNode) {
- var _this2 = this;
- NodeUtils_1.NodeUtils.typedReplace(catchClauseNode.param, NodeType_1.NodeType.Identifier, {
- leave: function leave(node) {
- _this2.identifierReplacer.storeNames(node.name);
- }
- });
- }
- }, {
- key: "replaceCatchClauseParam",
- value: function replaceCatchClauseParam(catchClauseNode) {
- var _this3 = this;
- estraverse.replace(catchClauseNode, {
- leave: function leave(node, parentNode) {
- if (Nodes_1.Nodes.isReplaceableIdentifierNode(node, parentNode)) {
- node.name = _this3.identifierReplacer.replace(node.name);
- }
- }
- });
- }
- }]);
- return CatchClauseObfuscator;
- }(AbstractNodeObfuscator_1.AbstractNodeObfuscator);
- exports.CatchClauseObfuscator = CatchClauseObfuscator;
- /***/ },
- /* 44 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var estraverse = __webpack_require__(6);
- var NodeType_1 = __webpack_require__(5);
- var AbstractNodeObfuscator_1 = __webpack_require__(7);
- var IdentifierReplacer_1 = __webpack_require__(14);
- var Nodes_1 = __webpack_require__(2);
- var NodeUtils_1 = __webpack_require__(1);
- var FunctionDeclarationObfuscator = function (_AbstractNodeObfuscat) {
- _inherits(FunctionDeclarationObfuscator, _AbstractNodeObfuscat);
- function FunctionDeclarationObfuscator(nodes, options) {
- _classCallCheck(this, FunctionDeclarationObfuscator);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(FunctionDeclarationObfuscator).call(this, nodes, options));
- _this.identifierReplacer = new IdentifierReplacer_1.IdentifierReplacer(_this.nodes, _this.options);
- return _this;
- }
- _createClass(FunctionDeclarationObfuscator, [{
- key: "obfuscateNode",
- value: function obfuscateNode(functionDeclarationNode, parentNode) {
- if (parentNode.type === NodeType_1.NodeType.Program) {
- return;
- }
- this.storeFunctionName(functionDeclarationNode);
- this.replaceFunctionName(functionDeclarationNode);
- }
- }, {
- key: "storeFunctionName",
- value: function storeFunctionName(functionDeclarationNode) {
- var _this2 = this;
- NodeUtils_1.NodeUtils.typedReplace(functionDeclarationNode.id, NodeType_1.NodeType.Identifier, {
- leave: function leave(node) {
- _this2.identifierReplacer.storeNames(node.name);
- }
- });
- }
- }, {
- key: "replaceFunctionName",
- value: function replaceFunctionName(functionDeclarationNode) {
- var _this3 = this;
- var scopeNode = NodeUtils_1.NodeUtils.getBlockScopeOfNode(functionDeclarationNode);
- estraverse.replace(scopeNode, {
- enter: function enter(node, parentNode) {
- if (Nodes_1.Nodes.isReplaceableIdentifierNode(node, parentNode)) {
- node.name = _this3.identifierReplacer.replace(node.name);
- }
- }
- });
- }
- }]);
- return FunctionDeclarationObfuscator;
- }(AbstractNodeObfuscator_1.AbstractNodeObfuscator);
- exports.FunctionDeclarationObfuscator = FunctionDeclarationObfuscator;
- /***/ },
- /* 45 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var estraverse = __webpack_require__(6);
- var NodeType_1 = __webpack_require__(5);
- var AbstractNodeObfuscator_1 = __webpack_require__(7);
- var IdentifierReplacer_1 = __webpack_require__(14);
- var Nodes_1 = __webpack_require__(2);
- var NodeUtils_1 = __webpack_require__(1);
- var FunctionObfuscator = function (_AbstractNodeObfuscat) {
- _inherits(FunctionObfuscator, _AbstractNodeObfuscat);
- function FunctionObfuscator(nodes, options) {
- _classCallCheck(this, FunctionObfuscator);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(FunctionObfuscator).call(this, nodes, options));
- _this.identifierReplacer = new IdentifierReplacer_1.IdentifierReplacer(_this.nodes, _this.options);
- return _this;
- }
- _createClass(FunctionObfuscator, [{
- key: "obfuscateNode",
- value: function obfuscateNode(functionNode) {
- this.storeFunctionParams(functionNode);
- this.replaceFunctionParams(functionNode);
- }
- }, {
- key: "storeFunctionParams",
- value: function storeFunctionParams(functionNode) {
- var _this2 = this;
- functionNode.params.forEach(function (paramsNode) {
- NodeUtils_1.NodeUtils.typedReplace(paramsNode, NodeType_1.NodeType.Identifier, {
- leave: function leave(node) {
- _this2.identifierReplacer.storeNames(node.name);
- }
- });
- });
- }
- }, {
- key: "replaceFunctionParams",
- value: function replaceFunctionParams(functionNode) {
- var _this3 = this;
- var replaceVisitor = {
- leave: function leave(node, parentNode) {
- if (Nodes_1.Nodes.isReplaceableIdentifierNode(node, parentNode)) {
- node.name = _this3.identifierReplacer.replace(node.name);
- }
- }
- };
- functionNode.params.forEach(function (paramsNode) {
- estraverse.replace(paramsNode, replaceVisitor);
- });
- estraverse.replace(functionNode.body, replaceVisitor);
- }
- }]);
- return FunctionObfuscator;
- }(AbstractNodeObfuscator_1.AbstractNodeObfuscator);
- exports.FunctionObfuscator = FunctionObfuscator;
- /***/ },
- /* 46 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var escodegen = __webpack_require__(10);
- var AbstractNodeObfuscator_1 = __webpack_require__(7);
- var BooleanLiteralReplacer_1 = __webpack_require__(51);
- var Nodes_1 = __webpack_require__(2);
- var NumberLiteralReplacer_1 = __webpack_require__(20);
- var StringLiteralReplacer_1 = __webpack_require__(15);
- var LiteralObfuscator = function (_AbstractNodeObfuscat) {
- _inherits(LiteralObfuscator, _AbstractNodeObfuscat);
- function LiteralObfuscator() {
- _classCallCheck(this, LiteralObfuscator);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(LiteralObfuscator).apply(this, arguments));
- }
- _createClass(LiteralObfuscator, [{
- key: 'obfuscateNode',
- value: function obfuscateNode(literalNode, parentNode) {
- if (Nodes_1.Nodes.isPropertyNode(parentNode) && parentNode.key === literalNode) {
- return;
- }
- if (literalNode['x-verbatim-property']) {
- return;
- }
- var content = void 0;
- switch (_typeof(literalNode.value)) {
- case 'boolean':
- content = new BooleanLiteralReplacer_1.BooleanLiteralReplacer(this.nodes, this.options).replace(literalNode.value);
- break;
- case 'number':
- content = new NumberLiteralReplacer_1.NumberLiteralReplacer(this.nodes, this.options).replace(literalNode.value);
- break;
- case 'string':
- content = new StringLiteralReplacer_1.StringLiteralReplacer(this.nodes, this.options).replace(literalNode.value);
- break;
- default:
- return;
- }
- literalNode['x-verbatim-property'] = {
- content: content,
- precedence: escodegen.Precedence.Primary
- };
- }
- }]);
- return LiteralObfuscator;
- }(AbstractNodeObfuscator_1.AbstractNodeObfuscator);
- exports.LiteralObfuscator = LiteralObfuscator;
- /***/ },
- /* 47 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var escodegen = __webpack_require__(10);
- var estraverse = __webpack_require__(6);
- var NodeType_1 = __webpack_require__(5);
- var AbstractNodeObfuscator_1 = __webpack_require__(7);
- var Nodes_1 = __webpack_require__(2);
- var StringLiteralReplacer_1 = __webpack_require__(15);
- var MemberExpressionObfuscator = function (_AbstractNodeObfuscat) {
- _inherits(MemberExpressionObfuscator, _AbstractNodeObfuscat);
- function MemberExpressionObfuscator() {
- _classCallCheck(this, MemberExpressionObfuscator);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(MemberExpressionObfuscator).apply(this, arguments));
- }
- _createClass(MemberExpressionObfuscator, [{
- key: 'obfuscateNode',
- value: function obfuscateNode(memberExpressionNode) {
- var _this2 = this;
- estraverse.replace(memberExpressionNode.property, {
- leave: function leave(node, parentNode) {
- if (Nodes_1.Nodes.isLiteralNode(node)) {
- _this2.obfuscateLiteralProperty(node);
- return;
- }
- if (Nodes_1.Nodes.isIdentifierNode(node)) {
- if (memberExpressionNode.computed) {
- return;
- }
- memberExpressionNode.computed = true;
- _this2.obfuscateIdentifierProperty(node);
- }
- }
- });
- }
- }, {
- key: 'obfuscateIdentifierProperty',
- value: function obfuscateIdentifierProperty(node) {
- var nodeValue = node.name,
- literalNode = {
- raw: '\'' + nodeValue + '\'',
- 'x-verbatim-property': {
- content: new StringLiteralReplacer_1.StringLiteralReplacer(this.nodes, this.options).replace(nodeValue),
- precedence: escodegen.Precedence.Primary
- },
- type: NodeType_1.NodeType.Literal,
- value: nodeValue
- };
- delete node.name;
- Object.assign(node, literalNode);
- }
- }, {
- key: 'obfuscateLiteralProperty',
- value: function obfuscateLiteralProperty(node) {
- if (typeof node.value === 'string' && !node['x-verbatim-property']) {
- node['x-verbatim-property'] = {
- content: new StringLiteralReplacer_1.StringLiteralReplacer(this.nodes, this.options).replace(node.value),
- precedence: escodegen.Precedence.Primary
- };
- }
- }
- }]);
- return MemberExpressionObfuscator;
- }(AbstractNodeObfuscator_1.AbstractNodeObfuscator);
- exports.MemberExpressionObfuscator = MemberExpressionObfuscator;
- /***/ },
- /* 48 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var estraverse = __webpack_require__(6);
- var AbstractNodeObfuscator_1 = __webpack_require__(7);
- var Nodes_1 = __webpack_require__(2);
- var Utils_1 = __webpack_require__(0);
- var StringLiteralReplacer_1 = __webpack_require__(15);
- var MethodDefinitionObfuscator = function (_AbstractNodeObfuscat) {
- _inherits(MethodDefinitionObfuscator, _AbstractNodeObfuscat);
- function MethodDefinitionObfuscator() {
- var _Object$getPrototypeO;
- _classCallCheck(this, MethodDefinitionObfuscator);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(MethodDefinitionObfuscator)).call.apply(_Object$getPrototypeO, [this].concat(args)));
- _this.ignoredNames = ['constructor'];
- return _this;
- }
- _createClass(MethodDefinitionObfuscator, [{
- key: 'obfuscateNode',
- value: function obfuscateNode(methodDefinitionNode, parentNode) {
- this.replaceMethodName(methodDefinitionNode);
- }
- }, {
- key: 'replaceMethodName',
- value: function replaceMethodName(methodDefinitionNode) {
- var _this2 = this;
- estraverse.replace(methodDefinitionNode.key, {
- leave: function leave(node) {
- if (Nodes_1.Nodes.isIdentifierNode(node) && !Utils_1.Utils.arrayContains(_this2.ignoredNames, node.name) && methodDefinitionNode.computed === false) {
- methodDefinitionNode.computed = true;
- node.name = new StringLiteralReplacer_1.StringLiteralReplacer(_this2.nodes, _this2.options).replace(node.name);
- return;
- }
- return estraverse.VisitorOption.Skip;
- }
- });
- }
- }]);
- return MethodDefinitionObfuscator;
- }(AbstractNodeObfuscator_1.AbstractNodeObfuscator);
- exports.MethodDefinitionObfuscator = MethodDefinitionObfuscator;
- /***/ },
- /* 49 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var escodegen = __webpack_require__(10);
- var estraverse = __webpack_require__(6);
- var NodeType_1 = __webpack_require__(5);
- var AbstractNodeObfuscator_1 = __webpack_require__(7);
- var Nodes_1 = __webpack_require__(2);
- var Utils_1 = __webpack_require__(0);
- var ObjectExpressionObfuscator = function (_AbstractNodeObfuscat) {
- _inherits(ObjectExpressionObfuscator, _AbstractNodeObfuscat);
- function ObjectExpressionObfuscator() {
- _classCallCheck(this, ObjectExpressionObfuscator);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ObjectExpressionObfuscator).apply(this, arguments));
- }
- _createClass(ObjectExpressionObfuscator, [{
- key: 'obfuscateNode',
- value: function obfuscateNode(objectExpressionNode) {
- var _this2 = this;
- objectExpressionNode.properties.forEach(function (property) {
- estraverse.replace(property.key, {
- leave: function leave(node, parentNode) {
- if (Nodes_1.Nodes.isLiteralNode(node)) {
- _this2.obfuscateLiteralPropertyKey(node);
- return;
- }
- if (Nodes_1.Nodes.isIdentifierNode(node)) {
- _this2.obfuscateIdentifierPropertyKey(node);
- }
- }
- });
- });
- }
- }, {
- key: 'obfuscateLiteralPropertyKey',
- value: function obfuscateLiteralPropertyKey(node) {
- if (typeof node.value === 'string' && !node['x-verbatim-property']) {
- node['x-verbatim-property'] = {
- content: Utils_1.Utils.stringToUnicode(node.value),
- precedence: escodegen.Precedence.Primary
- };
- }
- }
- }, {
- key: 'obfuscateIdentifierPropertyKey',
- value: function obfuscateIdentifierPropertyKey(node) {
- var nodeValue = node.name,
- literalNode = {
- raw: '\'' + nodeValue + '\'',
- 'x-verbatim-property': {
- content: Utils_1.Utils.stringToUnicode(nodeValue),
- precedence: escodegen.Precedence.Primary
- },
- type: NodeType_1.NodeType.Literal,
- value: nodeValue
- };
- delete node.name;
- Object.assign(node, literalNode);
- }
- }]);
- return ObjectExpressionObfuscator;
- }(AbstractNodeObfuscator_1.AbstractNodeObfuscator);
- exports.ObjectExpressionObfuscator = ObjectExpressionObfuscator;
- /***/ },
- /* 50 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var estraverse = __webpack_require__(6);
- var NodeType_1 = __webpack_require__(5);
- var AbstractNodeObfuscator_1 = __webpack_require__(7);
- var IdentifierReplacer_1 = __webpack_require__(14);
- var Nodes_1 = __webpack_require__(2);
- var NodeUtils_1 = __webpack_require__(1);
- var VariableDeclarationObfuscator = function (_AbstractNodeObfuscat) {
- _inherits(VariableDeclarationObfuscator, _AbstractNodeObfuscat);
- function VariableDeclarationObfuscator(nodes, options) {
- _classCallCheck(this, VariableDeclarationObfuscator);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(VariableDeclarationObfuscator).call(this, nodes, options));
- _this.identifierReplacer = new IdentifierReplacer_1.IdentifierReplacer(_this.nodes, _this.options);
- return _this;
- }
- _createClass(VariableDeclarationObfuscator, [{
- key: "obfuscateNode",
- value: function obfuscateNode(variableDeclarationNode, parentNode) {
- if (parentNode.type === NodeType_1.NodeType.Program) {
- return;
- }
- this.storeVariableNames(variableDeclarationNode);
- this.replaceVariableNames(variableDeclarationNode, parentNode);
- }
- }, {
- key: "storeVariableNames",
- value: function storeVariableNames(variableDeclarationNode) {
- var _this2 = this;
- variableDeclarationNode.declarations.forEach(function (declarationNode) {
- NodeUtils_1.NodeUtils.typedReplace(declarationNode.id, NodeType_1.NodeType.Identifier, {
- leave: function leave(node) {
- _this2.identifierReplacer.storeNames(node.name);
- }
- });
- });
- }
- }, {
- key: "replaceVariableNames",
- value: function replaceVariableNames(variableDeclarationNode, variableParentNode) {
- var _this3 = this;
- var scopeNode = variableDeclarationNode.kind === 'var' ? NodeUtils_1.NodeUtils.getBlockScopeOfNode(variableDeclarationNode) : variableParentNode,
- isNodeAfterVariableDeclaratorFlag = false;
- estraverse.replace(scopeNode, {
- enter: function enter(node, parentNode) {
- if (Nodes_1.Nodes.isArrowFunctionExpressionNode(node) || Nodes_1.Nodes.isFunctionDeclarationNode(node) || Nodes_1.Nodes.isFunctionExpressionNode(node)) {
- estraverse.replace(node, {
- enter: function enter(node, parentNode) {
- if (Nodes_1.Nodes.isReplaceableIdentifierNode(node, parentNode)) {
- node.name = _this3.identifierReplacer.replace(node.name);
- }
- }
- });
- }
- if (Nodes_1.Nodes.isVariableDeclarationNode(node) && node === variableDeclarationNode) {
- isNodeAfterVariableDeclaratorFlag = true;
- }
- if (Nodes_1.Nodes.isReplaceableIdentifierNode(node, parentNode) && isNodeAfterVariableDeclaratorFlag) {
- node.name = _this3.identifierReplacer.replace(node.name);
- }
- }
- });
- }
- }]);
- return VariableDeclarationObfuscator;
- }(AbstractNodeObfuscator_1.AbstractNodeObfuscator);
- exports.VariableDeclarationObfuscator = VariableDeclarationObfuscator;
- /***/ },
- /* 51 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var JSFuck_1 = __webpack_require__(19);
- var AbstractReplacer_1 = __webpack_require__(13);
- var BooleanLiteralReplacer = function (_AbstractReplacer_1$A) {
- _inherits(BooleanLiteralReplacer, _AbstractReplacer_1$A);
- function BooleanLiteralReplacer() {
- _classCallCheck(this, BooleanLiteralReplacer);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(BooleanLiteralReplacer).apply(this, arguments));
- }
- _createClass(BooleanLiteralReplacer, [{
- key: "replace",
- value: function replace(nodeValue) {
- return nodeValue ? JSFuck_1.JSFuck.True : JSFuck_1.JSFuck.False;
- }
- }]);
- return BooleanLiteralReplacer;
- }(AbstractReplacer_1.AbstractReplacer);
- exports.BooleanLiteralReplacer = BooleanLiteralReplacer;
- /***/ },
- /* 52 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var __metadata = undefined && undefined.__metadata || function (k, v) {
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
- };
- var class_validator_1 = __webpack_require__(68);
- var DefaultPreset_1 = __webpack_require__(21);
- var OptionsNormalizer_1 = __webpack_require__(53);
- var ValidationErrorsFormatter_1 = __webpack_require__(54);
- var Options = function Options(obfuscatorOptions) {
- _classCallCheck(this, Options);
- Object.assign(this, DefaultPreset_1.DEFAULT_PRESET, obfuscatorOptions);
- var errors = class_validator_1.validateSync(this, Options.validatorOptions);
- if (errors.length) {
- throw new ReferenceError("Validation failed. errors:\n" + ValidationErrorsFormatter_1.ValidationErrorsFormatter.format(errors));
- }
- Object.assign(this, OptionsNormalizer_1.OptionsNormalizer.normalizeOptions(this));
- };
- Options.validatorOptions = {
- validationError: {
- target: false
- }
- };
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "compact", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "debugProtection", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "debugProtectionInterval", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "disableConsoleOutput", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "encodeUnicodeLiterals", void 0);
- __decorate([class_validator_1.IsString({
- each: true
- }), __metadata('design:type', Array)], Options.prototype, "reservedNames", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "rotateUnicodeArray", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "selfDefending", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "sourceMap", void 0);
- __decorate([class_validator_1.IsIn(['inline', 'separate']), __metadata('design:type', String)], Options.prototype, "sourceMapMode", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "unicodeArray", void 0);
- __decorate([class_validator_1.IsNumber(), class_validator_1.Min(0), class_validator_1.Max(1), __metadata('design:type', Number)], Options.prototype, "unicodeArrayThreshold", void 0);
- __decorate([class_validator_1.IsBoolean(), __metadata('design:type', Boolean)], Options.prototype, "wrapUnicodeArrayCalls", void 0);
- exports.Options = Options;
- /***/ },
- /* 53 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var OptionsNormalizer = function () {
- function OptionsNormalizer() {
- _classCallCheck(this, OptionsNormalizer);
- }
- _createClass(OptionsNormalizer, null, [{
- key: "normalizeOptions",
- value: function normalizeOptions(options) {
- var normalizedOptions = Object.assign({}, options);
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
- try {
- for (var _iterator = OptionsNormalizer.normalizerRules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var normalizerRule = _step.value;
- normalizedOptions = normalizerRule(normalizedOptions);
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
- }
- return normalizedOptions;
- }
- }, {
- key: "encodeUnicodeLiteralsRule",
- value: function encodeUnicodeLiteralsRule(options) {
- if (options.unicodeArray && options.encodeUnicodeLiterals) {
- Object.assign(options, OptionsNormalizer.ENCODE_UNICODE_LITERALS_OPTIONS);
- }
- return options;
- }
- }, {
- key: "selfDefendingRule",
- value: function selfDefendingRule(options) {
- if (options.selfDefending) {
- Object.assign(options, OptionsNormalizer.SELF_DEFENDING_OPTIONS);
- }
- return options;
- }
- }, {
- key: "unicodeArrayRule",
- value: function unicodeArrayRule(options) {
- if (!options.unicodeArray) {
- Object.assign(options, OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS);
- }
- return options;
- }
- }, {
- key: "unicodeArrayThresholdRule",
- value: function unicodeArrayThresholdRule(options) {
- if (options.unicodeArrayThreshold === 0) {
- Object.assign(options, OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS);
- }
- return options;
- }
- }]);
- return OptionsNormalizer;
- }();
- OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS = {
- encodeUnicodeLiterals: false,
- rotateUnicodeArray: false,
- unicodeArray: false,
- unicodeArrayThreshold: 0,
- wrapUnicodeArrayCalls: false
- };
- OptionsNormalizer.ENCODE_UNICODE_LITERALS_OPTIONS = {
- encodeUnicodeLiterals: true,
- wrapUnicodeArrayCalls: true
- };
- OptionsNormalizer.SELF_DEFENDING_OPTIONS = {
- compact: true,
- selfDefending: true
- };
- OptionsNormalizer.normalizerRules = [OptionsNormalizer.unicodeArrayRule, OptionsNormalizer.unicodeArrayThresholdRule, OptionsNormalizer.encodeUnicodeLiteralsRule, OptionsNormalizer.selfDefendingRule];
- exports.OptionsNormalizer = OptionsNormalizer;
- /***/ },
- /* 54 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var ValidationErrorsFormatter = function () {
- function ValidationErrorsFormatter() {
- _classCallCheck(this, ValidationErrorsFormatter);
- }
- _createClass(ValidationErrorsFormatter, null, [{
- key: "format",
- value: function format(validationErrors) {
- var errorsArray = [];
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
- try {
- for (var _iterator = validationErrors[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var error = _step.value;
- errorsArray.push(ValidationErrorsFormatter.formatError(error));
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
- }
- return errorsArray.join('\n');
- }
- }, {
- key: "formatError",
- value: function formatError(validationError) {
- var errorString = "`" + validationError.property + "` errors:\n",
- constraints = validationError.constraints;
- for (var constraint in constraints) {
- if (!constraints.hasOwnProperty(constraint)) {
- continue;
- }
- errorString += " - " + constraints[constraint] + "\n";
- }
- return errorString;
- }
- }]);
- return ValidationErrorsFormatter;
- }();
- exports.ValidationErrorsFormatter = ValidationErrorsFormatter;
- /***/ },
- /* 55 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function AtobTemplate() {
- return "\n (function () {\n var object = []['filter']['constructor']('return this')();\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n object.atob || (\n object.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 ";
- }
- exports.AtobTemplate = AtobTemplate;
- /***/ },
- /* 56 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function ConsoleOutputDisableExpressionTemplate() {
- return "\n (function () {\n var _ = '(\u0004\u0006\u0003\u0005[]' + '[\"filter\"][\"\u0007tructor\"]' + '(\"return this\")()' + '.' + '\u0003;\u0006\u0002\u0005\u0004};' + '_\u0003.log\u0001.in' + 'fo\u0001.' + 'war' + 'n\u0001.er' + 'r' + 'or\u0001})();' + '\u0001\u0005_\u0002;' + '_\u0003\u0002function' + '\u0003\u0007ole\u0004\u0002 ()' + '{\u0005 = \u0006var ' + '_\u0007cons', \n Y, \n $;\n \n for (Y in $ = \"\u0007\u0006\u0005\u0004\u0003\u0002\u0001\") {\n var arr = _.split($[Y]);\n _ = arr.join(arr.pop());\n }\n \n [][\"filter\"][\"constructor\"](_)();\n })()\n ";
- }
- exports.ConsoleOutputDisableExpressionTemplate = ConsoleOutputDisableExpressionTemplate;
- /***/ },
- /* 57 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function DebugProtectionFunctionCallTemplate() {
- return "{debugProtectionFunctionName}();";
- }
- exports.DebugProtectionFunctionCallTemplate = DebugProtectionFunctionCallTemplate;
- /***/ },
- /* 58 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function DebugProtectionFunctionIntervalTemplate() {
- return "\n setInterval(function () {\n {debugProtectionFunctionName}();\n }, 4000);\n ";
- }
- exports.DebugProtectionFunctionIntervalTemplate = DebugProtectionFunctionIntervalTemplate;
- /***/ },
- /* 59 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var Utils_1 = __webpack_require__(0);
- function DebugProtectionFunctionTemplate() {
- return "\n var {debugProtectionFunctionName} = function () {\n function debuggerProtection (counter) {\n if (('' + counter / counter)['length'] !== 1 || counter % 20 === 0) {\n (function () {}.constructor('debugger')());\n } else {\n [].filter.constructor(" + Utils_1.Utils.stringToJSFuck('debugger') + ")();\n }\n \n debuggerProtection(++counter);\n }\n \n try {\n debuggerProtection(0);\n } catch (y) {}\n };\n ";
- }
- exports.DebugProtectionFunctionTemplate = DebugProtectionFunctionTemplate;
- /***/ },
- /* 60 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var Utils_1 = __webpack_require__(0);
- function SelfDefendingTemplate() {
- return "\n (function () { \n var func = function(){return 'dev';},\n func2 = function () {\n return 'window';\n };\n \n !Function(" + Utils_1.Utils.stringToUnicode("return/\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}/") + ")().test(func.toString()) ? Function(" + Utils_1.Utils.stringToUnicode("return/(\\\\[x|u](\\w){2,4})+/") + ")().test(func2.toString()) ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(false){}')() : []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(true){}')() : []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(false){}')();\n })();\n ";
- }
- exports.SelfDefendingTemplate = SelfDefendingTemplate;
- /***/ },
- /* 61 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function UnicodeArrayCallsWrapperTemplate() {
- return "\n var {unicodeArrayCallsWrapperName} = function ({keyName}) {\n return {unicodeArrayName}[parseInt({keyName}, 0x010)];\n };\n ";
- }
- exports.UnicodeArrayCallsWrapperTemplate = UnicodeArrayCallsWrapperTemplate;
- /***/ },
- /* 62 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var Utils_1 = __webpack_require__(0);
- function SelfDefendingTemplate() {
- return "\n var func = function(){return 'dev';};\n \n Function(" + Utils_1.Utils.stringToUnicode("return/\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}/") + ")()['test'](func['toString']()) !== true && !{unicodeArrayName}++ ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(true){}')() : Function('a', atob(" + Utils_1.Utils.stringToUnicode(Utils_1.Utils.btoa('a.call()')) + "))({forLoopFunctionName}) ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(false){}')() : []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(false){}')();\n ";
- }
- exports.SelfDefendingTemplate = SelfDefendingTemplate;
- /***/ },
- /* 63 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function UnicodeArrayDecodeTemplate() {
- return "\n (function () {\n {atobPolyfill}\n \n var {forLoopFunctionName} = function () {\n var array = [];\n \n for (var i in {unicodeArrayName}) {\n array['push'](decodeURI(atob({unicodeArrayName}[i])));\n }\n \n {unicodeArrayName} = array;\n };\n \n {code}\n })();\n ";
- }
- exports.UnicodeArrayDecodeTemplate = UnicodeArrayDecodeTemplate;
- /***/ },
- /* 64 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function UnicodeArrayTemplate() {
- return "\n var {unicodeArrayName} = [{unicodeArray}];\n ";
- }
- exports.UnicodeArrayTemplate = UnicodeArrayTemplate;
- /***/ },
- /* 65 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var Utils_1 = __webpack_require__(0);
- function SelfDefendingTemplate() {
- return "(function () {\n var func = function(){return 'dev';};\n \n !Function(" + Utils_1.Utils.stringToUnicode("return/\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}/") + ")().test(func.toString()) ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(true){}')() : Function('a', 'b', 'a(++b)')({whileFunctionName}, {timesName}) ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(false){}')() : []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(false){}')();\n })();";
- }
- exports.SelfDefendingTemplate = SelfDefendingTemplate;
- /***/ },
- /* 66 */
- /***/ function(module, exports) {
- "use strict";
- "use strict";
- function UnicodeArrayRotateFunctionTemplate() {
- return "\n (function (array, {timesName}) {\n var {whileFunctionName} = function (times) {\n while (--times) {\n array['push'](array['shift']());\n }\n };\n \n {code}\n })({unicodeArrayName}, 0x{unicodeArrayRotateValue});\n ";
- }
- exports.UnicodeArrayRotateFunctionTemplate = UnicodeArrayRotateFunctionTemplate;
- /***/ },
- /* 67 */
- /***/ function(module, exports) {
- module.exports = require("chance");
- /***/ },
- /* 68 */
- /***/ function(module, exports) {
- module.exports = require("class-validator");
- /***/ },
- /* 69 */
- /***/ function(module, exports) {
- module.exports = require("commander");
- /***/ },
- /* 70 */
- /***/ function(module, exports) {
- module.exports = require("fs");
- /***/ },
- /* 71 */
- /***/ function(module, exports) {
- module.exports = require("mkdirp");
- /***/ },
- /* 72 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
- "use strict";
- var JavaScriptObfuscator_1 = __webpack_require__(9);
- if (!global._babelPolyfill) {
- __webpack_require__(24);
- }
- module.exports = JavaScriptObfuscator_1.JavaScriptObfuscator;
- /***/ }
- /******/ ]);
- //# sourceMappingURL=index.js.map
|