@delance/builder 0.2.12 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2 -2
- package/dist/index.js +286 -364
- package/package.json +24 -22
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {getQuickJS, shouldInterruptAfterDeadline} from "quickjs-emscripten";
|
|
|
15
15
|
// /home/mochaa/ghq/git.sr.ht/~self/delance-builder/node_modules/webcrack/src/deobfuscate/index.ts
|
|
16
16
|
import debug3 from "debug";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
18
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/ast-utils/ast.ts
|
|
19
19
|
import * as t from "@babel/types";
|
|
20
20
|
function getPropName(node) {
|
|
21
21
|
if (t.isIdentifier(node)) {
|
|
@@ -28,7 +28,7 @@ function getPropName(node) {
|
|
|
28
28
|
return node.value.toString();
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
31
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/ast-utils/generator.ts
|
|
32
32
|
import babelGenerate from "@babel/generator";
|
|
33
33
|
function generate(ast, options = defaultOptions) {
|
|
34
34
|
return babelGenerate(ast, options).code;
|
|
@@ -45,14 +45,14 @@ function codePreview(node) {
|
|
|
45
45
|
return code;
|
|
46
46
|
}
|
|
47
47
|
var defaultOptions = { jsescOption: { minimal: true } };
|
|
48
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
48
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/ast-utils/inline.ts
|
|
49
49
|
import traverse4 from "@babel/traverse";
|
|
50
50
|
import * as t13 from "@babel/types";
|
|
51
51
|
|
|
52
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
52
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/anyExpression.ts
|
|
53
53
|
import * as t2 from "@babel/types";
|
|
54
54
|
|
|
55
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
55
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/Matcher.ts
|
|
56
56
|
class Matcher {
|
|
57
57
|
match(value, keys = []) {
|
|
58
58
|
return this.matchValue(value, keys);
|
|
@@ -62,20 +62,17 @@ class Matcher {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
65
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/anyExpression.ts
|
|
66
66
|
function anyExpression() {
|
|
67
67
|
return new AnyExpressionMatcher;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
class AnyExpressionMatcher extends Matcher {
|
|
71
|
-
constructor() {
|
|
72
|
-
super(...arguments);
|
|
73
|
-
}
|
|
74
71
|
matchValue(value) {
|
|
75
72
|
return t2.isNode(value) && t2.isExpression(value);
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
75
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/utils/distributeAcrossSlices.ts
|
|
79
76
|
function* distributeAcrossSlices(slices, available) {
|
|
80
77
|
if (slices.length === 0) {
|
|
81
78
|
yield [];
|
|
@@ -95,21 +92,18 @@ function* distributeAcrossSlices(slices, available) {
|
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
94
|
|
|
98
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
95
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/anything.ts
|
|
99
96
|
function anything() {
|
|
100
97
|
return new AnythingMatcher;
|
|
101
98
|
}
|
|
102
99
|
|
|
103
100
|
class AnythingMatcher extends Matcher {
|
|
104
|
-
constructor() {
|
|
105
|
-
super(...arguments);
|
|
106
|
-
}
|
|
107
101
|
matchValue(value) {
|
|
108
102
|
return true;
|
|
109
103
|
}
|
|
110
104
|
}
|
|
111
105
|
|
|
112
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
106
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/slice.ts
|
|
113
107
|
function zeroOrMore(matcher = anything()) {
|
|
114
108
|
return new SliceMatcher(0, Infinity, matcher);
|
|
115
109
|
}
|
|
@@ -148,7 +142,7 @@ class SliceMatcher extends Matcher {
|
|
|
148
142
|
}
|
|
149
143
|
}
|
|
150
144
|
|
|
151
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
145
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/anyList.ts
|
|
152
146
|
function anyList(...elements) {
|
|
153
147
|
return new AnyListMatcher(elements);
|
|
154
148
|
}
|
|
@@ -206,24 +200,21 @@ class AnyListMatcher extends Matcher {
|
|
|
206
200
|
return false;
|
|
207
201
|
}
|
|
208
202
|
}
|
|
209
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
203
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/anyNode.ts
|
|
210
204
|
import * as t3 from "@babel/types";
|
|
211
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
205
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/anyStatement.ts
|
|
212
206
|
import * as t4 from "@babel/types";
|
|
213
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
207
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/anyString.ts
|
|
214
208
|
function anyString() {
|
|
215
209
|
return new StringMatcher;
|
|
216
210
|
}
|
|
217
211
|
|
|
218
212
|
class StringMatcher extends Matcher {
|
|
219
|
-
constructor() {
|
|
220
|
-
super(...arguments);
|
|
221
|
-
}
|
|
222
213
|
matchValue(value) {
|
|
223
214
|
return typeof value === "string" || value instanceof String;
|
|
224
215
|
}
|
|
225
216
|
}
|
|
226
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
217
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/arrayOf.ts
|
|
227
218
|
function arrayOf(elementMatcher) {
|
|
228
219
|
return new ArrayOfMatcher(elementMatcher);
|
|
229
220
|
}
|
|
@@ -246,7 +237,7 @@ class ArrayOfMatcher extends Matcher {
|
|
|
246
237
|
return true;
|
|
247
238
|
}
|
|
248
239
|
}
|
|
249
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
240
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/capture.ts
|
|
250
241
|
function capture(matcher) {
|
|
251
242
|
return new CapturedMatcher(matcher);
|
|
252
243
|
}
|
|
@@ -278,7 +269,7 @@ class CapturedMatcher extends Matcher {
|
|
|
278
269
|
this._currentKeys = keys;
|
|
279
270
|
}
|
|
280
271
|
}
|
|
281
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
272
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/containerOf.ts
|
|
282
273
|
import * as t5 from "@babel/types";
|
|
283
274
|
function containerOf(containedMatcher) {
|
|
284
275
|
return new ContainerOfMatcher(containedMatcher);
|
|
@@ -317,10 +308,10 @@ class ContainerOfMatcher extends CapturedMatcher {
|
|
|
317
308
|
import * as Babel from "@babel/core";
|
|
318
309
|
import * as t9 from "@babel/types";
|
|
319
310
|
|
|
320
|
-
// node_modules/.pnpm/@codemod+utils@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+utils&
|
|
311
|
+
// node_modules/.pnpm/@codemod+utils@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+utils&co_nwjtgzgerilv5helbn32zsr2ei/node_modules/@codemod/utils/src/NodeTypes.ts
|
|
321
312
|
import * as t6 from "@babel/types";
|
|
322
313
|
var { BUILDER_KEYS, NODE_FIELDS } = t6;
|
|
323
|
-
// node_modules/.pnpm/@codemod+utils@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+utils&
|
|
314
|
+
// node_modules/.pnpm/@codemod+utils@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+utils&co_nwjtgzgerilv5helbn32zsr2ei/node_modules/@codemod/utils/src/builders.ts
|
|
324
315
|
import traverse2 from "@babel/traverse";
|
|
325
316
|
import * as t7 from "@babel/types";
|
|
326
317
|
|
|
@@ -329,7 +320,7 @@ import {
|
|
|
329
320
|
parse as babelParse
|
|
330
321
|
} from "@babel/parser";
|
|
331
322
|
|
|
332
|
-
// node_modules/.pnpm/@codemod+parser@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+parser&
|
|
323
|
+
// node_modules/.pnpm/@codemod+parser@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+parser&_ox3mjiaipayjwtjxtrryvsdtqu/node_modules/@codemod/parser/src/options.ts
|
|
333
324
|
var DefaultParserPlugins = new Set([
|
|
334
325
|
"asyncGenerators",
|
|
335
326
|
"bigInt",
|
|
@@ -359,7 +350,7 @@ var DefaultParserPlugins = new Set([
|
|
|
359
350
|
["pipelineOperator", { proposal: "minimal" }],
|
|
360
351
|
["recordAndTuple", { syntaxType: "hash" }]
|
|
361
352
|
]);
|
|
362
|
-
// node_modules/.pnpm/@codemod+utils@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+utils&
|
|
353
|
+
// node_modules/.pnpm/@codemod+utils@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+utils&co_nwjtgzgerilv5helbn32zsr2ei/node_modules/@codemod/utils/src/nodesEquivalent.ts
|
|
363
354
|
import * as t8 from "@babel/types";
|
|
364
355
|
function nodesEquivalent(a, b) {
|
|
365
356
|
if (a === b) {
|
|
@@ -405,7 +396,7 @@ function nodesEquivalent(a, b) {
|
|
|
405
396
|
}
|
|
406
397
|
return true;
|
|
407
398
|
}
|
|
408
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
399
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/fromCapture.ts
|
|
409
400
|
function fromCapture(capturedMatcher) {
|
|
410
401
|
return new FromCaptureMatcher(capturedMatcher);
|
|
411
402
|
}
|
|
@@ -423,10 +414,10 @@ class FromCaptureMatcher extends Matcher {
|
|
|
423
414
|
return this.capturedMatcher.current === value;
|
|
424
415
|
}
|
|
425
416
|
}
|
|
426
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
417
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/function.ts
|
|
427
418
|
import * as t10 from "@babel/types";
|
|
428
419
|
|
|
429
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
420
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/tupleOf.ts
|
|
430
421
|
function tupleOf(...matchers) {
|
|
431
422
|
return new TupleOfMatcher(...matchers);
|
|
432
423
|
}
|
|
@@ -454,7 +445,7 @@ class TupleOfMatcher extends Matcher {
|
|
|
454
445
|
return true;
|
|
455
446
|
}
|
|
456
447
|
}
|
|
457
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
448
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/generated.ts
|
|
458
449
|
import * as t11 from "@babel/types";
|
|
459
450
|
function arrayExpression(elements) {
|
|
460
451
|
return new ArrayExpressionMatcher(elements);
|
|
@@ -815,8 +806,6 @@ class BreakStatementMatcher extends Matcher {
|
|
|
815
806
|
if (node.label !== null) {
|
|
816
807
|
return false;
|
|
817
808
|
}
|
|
818
|
-
} else if (node.label === null) {
|
|
819
|
-
return false;
|
|
820
809
|
} else if (!this.label.matchValue(node.label, [...keys, "label"])) {
|
|
821
810
|
return false;
|
|
822
811
|
}
|
|
@@ -969,8 +958,6 @@ class ClassPropertyMatcher extends Matcher {
|
|
|
969
958
|
if (node.value !== null) {
|
|
970
959
|
return false;
|
|
971
960
|
}
|
|
972
|
-
} else if (node.value === null) {
|
|
973
|
-
return false;
|
|
974
961
|
} else if (!this.value.matchValue(node.value, [...keys, "value"])) {
|
|
975
962
|
return false;
|
|
976
963
|
}
|
|
@@ -979,8 +966,6 @@ class ClassPropertyMatcher extends Matcher {
|
|
|
979
966
|
if (node.typeAnnotation !== null) {
|
|
980
967
|
return false;
|
|
981
968
|
}
|
|
982
|
-
} else if (node.typeAnnotation === null) {
|
|
983
|
-
return false;
|
|
984
969
|
} else if (!this.typeAnnotation.matchValue(node.typeAnnotation, [
|
|
985
970
|
...keys,
|
|
986
971
|
"typeAnnotation"
|
|
@@ -992,8 +977,6 @@ class ClassPropertyMatcher extends Matcher {
|
|
|
992
977
|
if (node.decorators !== null) {
|
|
993
978
|
return false;
|
|
994
979
|
}
|
|
995
|
-
} else if (node.decorators === null) {
|
|
996
|
-
return false;
|
|
997
980
|
} else if (Array.isArray(this.decorators)) {
|
|
998
981
|
if (!tupleOf(...this.decorators).matchValue(node.decorators, [
|
|
999
982
|
...keys,
|
|
@@ -1069,8 +1052,6 @@ class ContinueStatementMatcher extends Matcher {
|
|
|
1069
1052
|
if (node.label !== null) {
|
|
1070
1053
|
return false;
|
|
1071
1054
|
}
|
|
1072
|
-
} else if (node.label === null) {
|
|
1073
|
-
return false;
|
|
1074
1055
|
} else if (!this.label.matchValue(node.label, [...keys, "label"])) {
|
|
1075
1056
|
return false;
|
|
1076
1057
|
}
|
|
@@ -1144,8 +1125,6 @@ class ForStatementMatcher extends Matcher {
|
|
|
1144
1125
|
if (node.init !== null) {
|
|
1145
1126
|
return false;
|
|
1146
1127
|
}
|
|
1147
|
-
} else if (node.init === null) {
|
|
1148
|
-
return false;
|
|
1149
1128
|
} else if (!this.init.matchValue(node.init, [...keys, "init"])) {
|
|
1150
1129
|
return false;
|
|
1151
1130
|
}
|
|
@@ -1154,8 +1133,6 @@ class ForStatementMatcher extends Matcher {
|
|
|
1154
1133
|
if (node.test !== null) {
|
|
1155
1134
|
return false;
|
|
1156
1135
|
}
|
|
1157
|
-
} else if (node.test === null) {
|
|
1158
|
-
return false;
|
|
1159
1136
|
} else if (!this.test.matchValue(node.test, [...keys, "test"])) {
|
|
1160
1137
|
return false;
|
|
1161
1138
|
}
|
|
@@ -1164,8 +1141,6 @@ class ForStatementMatcher extends Matcher {
|
|
|
1164
1141
|
if (node.update !== null) {
|
|
1165
1142
|
return false;
|
|
1166
1143
|
}
|
|
1167
|
-
} else if (node.update === null) {
|
|
1168
|
-
return false;
|
|
1169
1144
|
} else if (!this.update.matchValue(node.update, [...keys, "update"])) {
|
|
1170
1145
|
return false;
|
|
1171
1146
|
}
|
|
@@ -1200,8 +1175,6 @@ class FunctionDeclarationMatcher extends Matcher {
|
|
|
1200
1175
|
if (node.id !== null) {
|
|
1201
1176
|
return false;
|
|
1202
1177
|
}
|
|
1203
|
-
} else if (node.id === null) {
|
|
1204
|
-
return false;
|
|
1205
1178
|
} else if (!this.id.matchValue(node.id, [...keys, "id"])) {
|
|
1206
1179
|
return false;
|
|
1207
1180
|
}
|
|
@@ -1263,8 +1236,6 @@ class FunctionExpressionMatcher extends Matcher {
|
|
|
1263
1236
|
if (node.id !== null) {
|
|
1264
1237
|
return false;
|
|
1265
1238
|
}
|
|
1266
|
-
} else if (node.id === null) {
|
|
1267
|
-
return false;
|
|
1268
1239
|
} else if (!this.id.matchValue(node.id, [...keys, "id"])) {
|
|
1269
1240
|
return false;
|
|
1270
1241
|
}
|
|
@@ -1351,8 +1322,6 @@ class IfStatementMatcher extends Matcher {
|
|
|
1351
1322
|
if (node.alternate !== null) {
|
|
1352
1323
|
return false;
|
|
1353
1324
|
}
|
|
1354
|
-
} else if (node.alternate === null) {
|
|
1355
|
-
return false;
|
|
1356
1325
|
} else if (!this.alternate.matchValue(node.alternate, [...keys, "alternate"])) {
|
|
1357
1326
|
return false;
|
|
1358
1327
|
}
|
|
@@ -1434,8 +1403,6 @@ class MemberExpressionMatcher extends Matcher {
|
|
|
1434
1403
|
if (node.optional !== null) {
|
|
1435
1404
|
return false;
|
|
1436
1405
|
}
|
|
1437
|
-
} else if (node.optional === null) {
|
|
1438
|
-
return false;
|
|
1439
1406
|
} else if (!this.optional.matchValue(node.optional, [...keys, "optional"])) {
|
|
1440
1407
|
return false;
|
|
1441
1408
|
}
|
|
@@ -1649,8 +1616,6 @@ class ObjectPropertyMatcher extends Matcher {
|
|
|
1649
1616
|
if (node.decorators !== null) {
|
|
1650
1617
|
return false;
|
|
1651
1618
|
}
|
|
1652
|
-
} else if (node.decorators === null) {
|
|
1653
|
-
return false;
|
|
1654
1619
|
} else if (Array.isArray(this.decorators)) {
|
|
1655
1620
|
if (!tupleOf(...this.decorators).matchValue(node.decorators, [
|
|
1656
1621
|
...keys,
|
|
@@ -1740,8 +1705,6 @@ class ReturnStatementMatcher extends Matcher {
|
|
|
1740
1705
|
if (node.argument !== null) {
|
|
1741
1706
|
return false;
|
|
1742
1707
|
}
|
|
1743
|
-
} else if (node.argument === null) {
|
|
1744
|
-
return false;
|
|
1745
1708
|
} else if (!this.argument.matchValue(node.argument, [...keys, "argument"])) {
|
|
1746
1709
|
return false;
|
|
1747
1710
|
}
|
|
@@ -1829,8 +1792,6 @@ class SwitchCaseMatcher extends Matcher {
|
|
|
1829
1792
|
if (node.test !== null) {
|
|
1830
1793
|
return false;
|
|
1831
1794
|
}
|
|
1832
|
-
} else if (node.test === null) {
|
|
1833
|
-
return false;
|
|
1834
1795
|
} else if (!this.test.matchValue(node.test, [...keys, "test"])) {
|
|
1835
1796
|
return false;
|
|
1836
1797
|
}
|
|
@@ -1954,8 +1915,6 @@ class TryStatementMatcher extends Matcher {
|
|
|
1954
1915
|
if (node.handler !== null) {
|
|
1955
1916
|
return false;
|
|
1956
1917
|
}
|
|
1957
|
-
} else if (node.handler === null) {
|
|
1958
|
-
return false;
|
|
1959
1918
|
} else if (!this.handler.matchValue(node.handler, [...keys, "handler"])) {
|
|
1960
1919
|
return false;
|
|
1961
1920
|
}
|
|
@@ -1964,8 +1923,6 @@ class TryStatementMatcher extends Matcher {
|
|
|
1964
1923
|
if (node.finalizer !== null) {
|
|
1965
1924
|
return false;
|
|
1966
1925
|
}
|
|
1967
|
-
} else if (node.finalizer === null) {
|
|
1968
|
-
return false;
|
|
1969
1926
|
} else if (!this.finalizer.matchValue(node.finalizer, [...keys, "finalizer"])) {
|
|
1970
1927
|
return false;
|
|
1971
1928
|
}
|
|
@@ -2105,8 +2062,6 @@ class VariableDeclaratorMatcher extends Matcher {
|
|
|
2105
2062
|
if (node.init !== null) {
|
|
2106
2063
|
return false;
|
|
2107
2064
|
}
|
|
2108
|
-
} else if (node.init === null) {
|
|
2109
|
-
return false;
|
|
2110
2065
|
} else if (!this.init.matchValue(node.init, [...keys, "init"])) {
|
|
2111
2066
|
return false;
|
|
2112
2067
|
}
|
|
@@ -2136,7 +2091,7 @@ class WhileStatementMatcher extends Matcher {
|
|
|
2136
2091
|
return true;
|
|
2137
2092
|
}
|
|
2138
2093
|
}
|
|
2139
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
2094
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/or.ts
|
|
2140
2095
|
function or(...matchersOrValues) {
|
|
2141
2096
|
return new OrMatcher(...matchersOrValues);
|
|
2142
2097
|
}
|
|
@@ -2160,7 +2115,7 @@ class OrMatcher extends Matcher {
|
|
|
2160
2115
|
return false;
|
|
2161
2116
|
}
|
|
2162
2117
|
}
|
|
2163
|
-
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+
|
|
2118
|
+
// node_modules/.pnpm/@codemod+matchers@https+++gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages+match_y3mhqth3x437cu4u7tvyd2tjkm/node_modules/@codemod/matchers/src/matchers/predicate.ts
|
|
2164
2119
|
function predicate(predicate2) {
|
|
2165
2120
|
return new PredicateMatcher(predicate2);
|
|
2166
2121
|
}
|
|
@@ -2175,7 +2130,7 @@ class PredicateMatcher extends Matcher {
|
|
|
2175
2130
|
return this.predicate(value);
|
|
2176
2131
|
}
|
|
2177
2132
|
}
|
|
2178
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2133
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/ast-utils/matcher.ts
|
|
2179
2134
|
import * as t12 from "@babel/types";
|
|
2180
2135
|
function infiniteLoop(body) {
|
|
2181
2136
|
return or(forStatement(undefined, null, undefined, body), forStatement(undefined, truthyMatcher, undefined, body), whileStatement(truthyMatcher, body));
|
|
@@ -2227,7 +2182,7 @@ var trueMatcher = or(booleanLiteral(true), unaryExpression("!", numericLiteral(0
|
|
|
2227
2182
|
var falseMatcher = or(booleanLiteral(false), unaryExpression("!", arrayExpression([])));
|
|
2228
2183
|
var truthyMatcher = or(trueMatcher, arrayExpression([]));
|
|
2229
2184
|
|
|
2230
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2185
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/ast-utils/inline.ts
|
|
2231
2186
|
function inlineVariable(binding, value = anyExpression(), unsafeAssignments = false) {
|
|
2232
2187
|
const varDeclarator = binding.path.node;
|
|
2233
2188
|
const varMatcher = variableDeclarator(identifier(binding.identifier.name), value);
|
|
@@ -2242,7 +2197,11 @@ function inlineVariable(binding, value = anyExpression(), unsafeAssignments = fa
|
|
|
2242
2197
|
binding.referencePaths.forEach((ref) => {
|
|
2243
2198
|
ref.replaceWith(assignment.node.right);
|
|
2244
2199
|
});
|
|
2245
|
-
assignment.
|
|
2200
|
+
if (assignment.parentPath.isExpressionStatement()) {
|
|
2201
|
+
assignment.remove();
|
|
2202
|
+
} else {
|
|
2203
|
+
assignment.replaceWith(assignment.node.right);
|
|
2204
|
+
}
|
|
2246
2205
|
binding.path.remove();
|
|
2247
2206
|
}
|
|
2248
2207
|
}
|
|
@@ -2359,7 +2318,7 @@ function inlineVariableAliases(binding, targetName = binding.identifier.name) {
|
|
|
2359
2318
|
}
|
|
2360
2319
|
return state;
|
|
2361
2320
|
}
|
|
2362
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2321
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/ast-utils/rename.ts
|
|
2363
2322
|
import traverse6 from "@babel/traverse";
|
|
2364
2323
|
import * as t14 from "@babel/types";
|
|
2365
2324
|
function renameFast(binding, newName) {
|
|
@@ -2402,7 +2361,7 @@ function renameFast(binding, newName) {
|
|
|
2402
2361
|
binding.scope.bindings[newName] = binding;
|
|
2403
2362
|
binding.identifier.name = newName;
|
|
2404
2363
|
}
|
|
2405
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2364
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/ast-utils/transform.ts
|
|
2406
2365
|
import traverse8, {visitors} from "@babel/traverse";
|
|
2407
2366
|
import debug from "debug";
|
|
2408
2367
|
async function applyTransformAsync(ast, transform, options2) {
|
|
@@ -2414,13 +2373,13 @@ async function applyTransformAsync(ast, transform, options2) {
|
|
|
2414
2373
|
logger(`${transform.name}: finished with ${state.changes} changes`);
|
|
2415
2374
|
return state;
|
|
2416
2375
|
}
|
|
2417
|
-
function applyTransform(ast, transform, options2
|
|
2376
|
+
function applyTransform(ast, transform, options2) {
|
|
2418
2377
|
logger(`${transform.name}: started`);
|
|
2419
2378
|
const state = { changes: 0 };
|
|
2420
2379
|
transform.run?.(ast, state, options2);
|
|
2421
2380
|
if (transform.visitor) {
|
|
2422
2381
|
const visitor = transform.visitor(options2);
|
|
2423
|
-
visitor.noScope =
|
|
2382
|
+
visitor.noScope = !transform.scope;
|
|
2424
2383
|
traverse8(ast, visitor, undefined, state);
|
|
2425
2384
|
}
|
|
2426
2385
|
logger(`${transform.name}: finished with ${state.changes} changes`);
|
|
@@ -2456,7 +2415,7 @@ function mergeTransforms(options2) {
|
|
|
2456
2415
|
};
|
|
2457
2416
|
}
|
|
2458
2417
|
var logger = debug("webcrack:transforms");
|
|
2459
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2418
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/merge-strings.ts
|
|
2460
2419
|
var merge_strings_default = {
|
|
2461
2420
|
name: "merge-strings",
|
|
2462
2421
|
tags: ["safe"],
|
|
@@ -2480,7 +2439,7 @@ var merge_strings_default = {
|
|
|
2480
2439
|
}
|
|
2481
2440
|
};
|
|
2482
2441
|
|
|
2483
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2442
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/array-rotator.ts
|
|
2484
2443
|
function findArrayRotator(stringArray) {
|
|
2485
2444
|
const arrayIdentifier = capture(identifier());
|
|
2486
2445
|
const pushShift = callExpression(constMemberExpression(arrayIdentifier, "push"), [
|
|
@@ -2500,7 +2459,7 @@ function findArrayRotator(stringArray) {
|
|
|
2500
2459
|
}
|
|
2501
2460
|
}
|
|
2502
2461
|
|
|
2503
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2462
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/control-flow-object.ts
|
|
2504
2463
|
import * as t15 from "@babel/types";
|
|
2505
2464
|
var control_flow_object_default = {
|
|
2506
2465
|
name: "control-flow-object",
|
|
@@ -2535,7 +2494,8 @@ var control_flow_object_default = {
|
|
|
2535
2494
|
const assignment = expressionStatement(assignmentExpression("=", constMemberExpression(fromCapture(varId), assignedKey), assignedValue));
|
|
2536
2495
|
const looseAssignment = expressionStatement(assignmentExpression("=", constMemberExpression(fromCapture(varId), assignedKey)));
|
|
2537
2496
|
const memberAccess = constMemberExpression(or(fromCapture(varId), fromCapture(aliasId)), propertyName);
|
|
2538
|
-
const varMatcher = variableDeclarator(varId,
|
|
2497
|
+
const varMatcher = variableDeclarator(varId, objectExpression(objectProperties));
|
|
2498
|
+
const inlineMatcher = constMemberExpression(objectExpression(objectProperties), propertyName);
|
|
2539
2499
|
function isConstantBinding(binding) {
|
|
2540
2500
|
return binding.constant || binding.constantViolations[0] === binding.path;
|
|
2541
2501
|
}
|
|
@@ -2619,12 +2579,30 @@ var control_flow_object_default = {
|
|
|
2619
2579
|
exit(path) {
|
|
2620
2580
|
this.changes += transform2(path);
|
|
2621
2581
|
}
|
|
2582
|
+
},
|
|
2583
|
+
MemberExpression: {
|
|
2584
|
+
exit(path) {
|
|
2585
|
+
if (!inlineMatcher.match(path.node))
|
|
2586
|
+
return;
|
|
2587
|
+
const propName = getPropName(path.node.property);
|
|
2588
|
+
const value = objectProperties.current.find((prop) => getPropName(prop.key) === propName)?.value;
|
|
2589
|
+
if (!value)
|
|
2590
|
+
return;
|
|
2591
|
+
if (t15.isStringLiteral(value)) {
|
|
2592
|
+
path.replaceWith(value);
|
|
2593
|
+
} else if (path.parentPath.isCallExpression()) {
|
|
2594
|
+
inlineFunction(value, path.parentPath);
|
|
2595
|
+
} else {
|
|
2596
|
+
path.replaceWith(value);
|
|
2597
|
+
}
|
|
2598
|
+
this.changes++;
|
|
2599
|
+
}
|
|
2622
2600
|
}
|
|
2623
2601
|
};
|
|
2624
2602
|
}
|
|
2625
2603
|
};
|
|
2626
2604
|
|
|
2627
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2605
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/control-flow-switch.ts
|
|
2628
2606
|
import * as t16 from "@babel/types";
|
|
2629
2607
|
var control_flow_switch_default = {
|
|
2630
2608
|
name: "control-flow-switch",
|
|
@@ -2659,9 +2637,9 @@ var control_flow_switch_default = {
|
|
|
2659
2637
|
}
|
|
2660
2638
|
};
|
|
2661
2639
|
|
|
2662
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2640
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/dead-code.ts
|
|
2663
2641
|
import * as t17 from "@babel/types";
|
|
2664
|
-
|
|
2642
|
+
function replace(path, replacement) {
|
|
2665
2643
|
if (t17.isBlockStatement(replacement.node)) {
|
|
2666
2644
|
const childBindings = replacement.scope.bindings;
|
|
2667
2645
|
for (const name in childBindings) {
|
|
@@ -2676,7 +2654,7 @@ var replace = function(path, replacement) {
|
|
|
2676
2654
|
} else {
|
|
2677
2655
|
path.replaceWith(replacement);
|
|
2678
2656
|
}
|
|
2679
|
-
}
|
|
2657
|
+
}
|
|
2680
2658
|
var dead_code_default = {
|
|
2681
2659
|
name: "dead-code",
|
|
2682
2660
|
tags: ["unsafe"],
|
|
@@ -2704,7 +2682,7 @@ var dead_code_default = {
|
|
|
2704
2682
|
}
|
|
2705
2683
|
};
|
|
2706
2684
|
|
|
2707
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2685
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/decoder.ts
|
|
2708
2686
|
import {expression} from "@babel/template";
|
|
2709
2687
|
function findDecoders(stringArray) {
|
|
2710
2688
|
const decoders = [];
|
|
@@ -2773,7 +2751,7 @@ class Decoder {
|
|
|
2773
2751
|
}
|
|
2774
2752
|
}
|
|
2775
2753
|
|
|
2776
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2754
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/inline-decoded-strings.ts
|
|
2777
2755
|
import * as t18 from "@babel/types";
|
|
2778
2756
|
var inline_decoded_strings_default = {
|
|
2779
2757
|
name: "inline-decoded-strings",
|
|
@@ -2795,7 +2773,7 @@ var inline_decoded_strings_default = {
|
|
|
2795
2773
|
}
|
|
2796
2774
|
};
|
|
2797
2775
|
|
|
2798
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2776
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/inline-decoder-wrappers.ts
|
|
2799
2777
|
var inline_decoder_wrappers_default = {
|
|
2800
2778
|
name: "inline-decoder-wrappers",
|
|
2801
2779
|
tags: ["unsafe"],
|
|
@@ -2812,7 +2790,7 @@ var inline_decoder_wrappers_default = {
|
|
|
2812
2790
|
}
|
|
2813
2791
|
};
|
|
2814
2792
|
|
|
2815
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2793
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/inline-object-props.ts
|
|
2816
2794
|
var inline_object_props_default = {
|
|
2817
2795
|
name: "inline-object-props",
|
|
2818
2796
|
tags: ["safe"],
|
|
@@ -2850,7 +2828,7 @@ var inline_object_props_default = {
|
|
|
2850
2828
|
}
|
|
2851
2829
|
};
|
|
2852
2830
|
|
|
2853
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2831
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/string-array.ts
|
|
2854
2832
|
import traverse10 from "@babel/traverse";
|
|
2855
2833
|
function findStringArray(ast2) {
|
|
2856
2834
|
let result;
|
|
@@ -2900,7 +2878,7 @@ function findStringArray(ast2) {
|
|
|
2900
2878
|
return result;
|
|
2901
2879
|
}
|
|
2902
2880
|
|
|
2903
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
2881
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/deobfuscate/vm.ts
|
|
2904
2882
|
import debug2 from "debug";
|
|
2905
2883
|
class VMDecoder {
|
|
2906
2884
|
decoders;
|
|
@@ -2994,9 +2972,9 @@ var var_functions_default = {
|
|
|
2994
2972
|
|
|
2995
2973
|
// /home/mochaa/ghq/git.sr.ht/~self/delance-builder/node_modules/webcrack/src/deobfuscate/merge-object-assignments.ts
|
|
2996
2974
|
import * as t20 from "@babel/types";
|
|
2997
|
-
|
|
2975
|
+
function hasCircularReference(node, binding) {
|
|
2998
2976
|
return binding.referencePaths.some((path) => path.find((p) => p.node === node)) || containerOf(callExpression()).match(node);
|
|
2999
|
-
}
|
|
2977
|
+
}
|
|
3000
2978
|
var merge_object_assignments_default = {
|
|
3001
2979
|
name: "merge-object-assignments",
|
|
3002
2980
|
tags: ["safe"],
|
|
@@ -3045,7 +3023,7 @@ var merge_object_assignments_default = {
|
|
|
3045
3023
|
var inlineableObject = predicate((node) => or(safeLiteral, arrayExpression(arrayOf(inlineableObject)), objectExpression(arrayOf(constObjectProperty(inlineableObject)))).match(node));
|
|
3046
3024
|
|
|
3047
3025
|
// /home/mochaa/ghq/git.sr.ht/~self/delance-builder/node_modules/webcrack/src/deobfuscate/self-defending.ts
|
|
3048
|
-
|
|
3026
|
+
function removeSelfDefendingRefs(path) {
|
|
3049
3027
|
const varName = capture(anyString());
|
|
3050
3028
|
const varMatcher = variableDeclarator(identifier(varName), callExpression(identifier(path.node.name)));
|
|
3051
3029
|
const callMatcher = expressionStatement(callExpression(identifier(fromCapture(varName)), []));
|
|
@@ -3058,7 +3036,7 @@ var removeSelfDefendingRefs = function(path) {
|
|
|
3058
3036
|
});
|
|
3059
3037
|
varDecl.remove();
|
|
3060
3038
|
}
|
|
3061
|
-
}
|
|
3039
|
+
}
|
|
3062
3040
|
var self_defending_default = {
|
|
3063
3041
|
name: "self-defending",
|
|
3064
3042
|
tags: ["safe"],
|
|
@@ -3119,109 +3097,30 @@ var self_defending_default = {
|
|
|
3119
3097
|
// /home/mochaa/ghq/git.sr.ht/~self/delance-builder/node_modules/webcrack/src/unminify/transforms/index.ts
|
|
3120
3098
|
var exports_transforms = {};
|
|
3121
3099
|
__export(exports_transforms, {
|
|
3122
|
-
yoda: () =>
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
{
|
|
3144
|
-
return typeof_undefined_default;
|
|
3145
|
-
}
|
|
3146
|
-
},
|
|
3147
|
-
ternaryToIf: () => {
|
|
3148
|
-
{
|
|
3149
|
-
return ternary_to_if_default;
|
|
3150
|
-
}
|
|
3151
|
-
},
|
|
3152
|
-
splitVariableDeclarations: () => {
|
|
3153
|
-
{
|
|
3154
|
-
return split_variable_declarations_default;
|
|
3155
|
-
}
|
|
3156
|
-
},
|
|
3157
|
-
splitForLoopVars: () => {
|
|
3158
|
-
{
|
|
3159
|
-
return split_for_loop_vars_default;
|
|
3160
|
-
}
|
|
3161
|
-
},
|
|
3162
|
-
sequence: () => {
|
|
3163
|
-
{
|
|
3164
|
-
return sequence_default;
|
|
3165
|
-
}
|
|
3166
|
-
},
|
|
3167
|
-
rawLiterals: () => {
|
|
3168
|
-
{
|
|
3169
|
-
return raw_literals_default;
|
|
3170
|
-
}
|
|
3171
|
-
},
|
|
3172
|
-
numberExpressions: () => {
|
|
3173
|
-
{
|
|
3174
|
-
return number_expressions_default;
|
|
3175
|
-
}
|
|
3176
|
-
},
|
|
3177
|
-
mergeStrings: () => {
|
|
3178
|
-
{
|
|
3179
|
-
return merge_strings_default;
|
|
3180
|
-
}
|
|
3181
|
-
},
|
|
3182
|
-
mergeElseIf: () => {
|
|
3183
|
-
{
|
|
3184
|
-
return merge_else_if_default;
|
|
3185
|
-
}
|
|
3186
|
-
},
|
|
3187
|
-
logicalToIf: () => {
|
|
3188
|
-
{
|
|
3189
|
-
return logical_to_if_default;
|
|
3190
|
-
}
|
|
3191
|
-
},
|
|
3192
|
-
jsonParse: () => {
|
|
3193
|
-
{
|
|
3194
|
-
return json_parse_default;
|
|
3195
|
-
}
|
|
3196
|
-
},
|
|
3197
|
-
invertBooleanLogic: () => {
|
|
3198
|
-
{
|
|
3199
|
-
return invert_boolean_logic_default;
|
|
3200
|
-
}
|
|
3201
|
-
},
|
|
3202
|
-
infinity: () => {
|
|
3203
|
-
{
|
|
3204
|
-
return infinity_default;
|
|
3205
|
-
}
|
|
3206
|
-
},
|
|
3207
|
-
forToWhile: () => {
|
|
3208
|
-
{
|
|
3209
|
-
return for_to_while_default;
|
|
3210
|
-
}
|
|
3211
|
-
},
|
|
3212
|
-
computedProperties: () => {
|
|
3213
|
-
{
|
|
3214
|
-
return computed_properties_default;
|
|
3215
|
-
}
|
|
3216
|
-
},
|
|
3217
|
-
blockStatements: () => {
|
|
3218
|
-
{
|
|
3219
|
-
return block_statements_default;
|
|
3220
|
-
}
|
|
3221
|
-
}
|
|
3100
|
+
yoda: () => yoda_default,
|
|
3101
|
+
voidToUndefined: () => void_to_undefined_default,
|
|
3102
|
+
unminifyBooleans: () => unminify_booleans_default,
|
|
3103
|
+
unaryExpressions: () => unary_expressions_default,
|
|
3104
|
+
typeofUndefined: () => typeof_undefined_default,
|
|
3105
|
+
ternaryToIf: () => ternary_to_if_default,
|
|
3106
|
+
splitVariableDeclarations: () => split_variable_declarations_default,
|
|
3107
|
+
splitForLoopVars: () => split_for_loop_vars_default,
|
|
3108
|
+
sequence: () => sequence_default,
|
|
3109
|
+
removeDoubleNot: () => remove_double_not_default,
|
|
3110
|
+
rawLiterals: () => raw_literals_default,
|
|
3111
|
+
numberExpressions: () => number_expressions_default,
|
|
3112
|
+
mergeStrings: () => merge_strings_default,
|
|
3113
|
+
mergeElseIf: () => merge_else_if_default,
|
|
3114
|
+
logicalToIf: () => logical_to_if_default,
|
|
3115
|
+
jsonParse: () => json_parse_default,
|
|
3116
|
+
invertBooleanLogic: () => invert_boolean_logic_default,
|
|
3117
|
+
infinity: () => infinity_default,
|
|
3118
|
+
forToWhile: () => for_to_while_default,
|
|
3119
|
+
computedProperties: () => computed_properties_default,
|
|
3120
|
+
blockStatements: () => block_statements_default
|
|
3222
3121
|
});
|
|
3223
3122
|
|
|
3224
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3123
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/block-statements.ts
|
|
3225
3124
|
import * as t21 from "@babel/types";
|
|
3226
3125
|
var block_statements_default = {
|
|
3227
3126
|
name: "block-statements",
|
|
@@ -3259,7 +3158,7 @@ var block_statements_default = {
|
|
|
3259
3158
|
}
|
|
3260
3159
|
})
|
|
3261
3160
|
};
|
|
3262
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3161
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/computed-properties.ts
|
|
3263
3162
|
import {isIdentifierName} from "@babel/helper-validator-identifier";
|
|
3264
3163
|
import * as t22 from "@babel/types";
|
|
3265
3164
|
var computed_properties_default = {
|
|
@@ -3293,7 +3192,7 @@ var computed_properties_default = {
|
|
|
3293
3192
|
};
|
|
3294
3193
|
}
|
|
3295
3194
|
};
|
|
3296
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3195
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/for-to-while.ts
|
|
3297
3196
|
import * as t23 from "@babel/types";
|
|
3298
3197
|
var for_to_while_default = {
|
|
3299
3198
|
name: "for-to-while",
|
|
@@ -3312,7 +3211,7 @@ var for_to_while_default = {
|
|
|
3312
3211
|
};
|
|
3313
3212
|
}
|
|
3314
3213
|
};
|
|
3315
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3214
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/infinity.ts
|
|
3316
3215
|
import * as t24 from "@babel/types";
|
|
3317
3216
|
var infinity_default = {
|
|
3318
3217
|
name: "infinity",
|
|
@@ -3338,17 +3237,13 @@ var infinity_default = {
|
|
|
3338
3237
|
};
|
|
3339
3238
|
}
|
|
3340
3239
|
};
|
|
3341
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3240
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/invert-boolean-logic.ts
|
|
3342
3241
|
import * as t25 from "@babel/types";
|
|
3343
3242
|
var INVERTED_BINARY_OPERATORS = {
|
|
3344
3243
|
"==": "!=",
|
|
3345
3244
|
"===": "!==",
|
|
3346
3245
|
"!=": "==",
|
|
3347
|
-
"!==": "==="
|
|
3348
|
-
">": "<=",
|
|
3349
|
-
"<": ">=",
|
|
3350
|
-
">=": "<",
|
|
3351
|
-
"<=": ">"
|
|
3246
|
+
"!==": "==="
|
|
3352
3247
|
};
|
|
3353
3248
|
var INVERTED_LOGICAL_OPERATORS = {
|
|
3354
3249
|
"||": "&&",
|
|
@@ -3388,7 +3283,7 @@ var invert_boolean_logic_default = {
|
|
|
3388
3283
|
};
|
|
3389
3284
|
}
|
|
3390
3285
|
};
|
|
3391
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3286
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/json-parse.ts
|
|
3392
3287
|
import {parseExpression} from "@babel/parser";
|
|
3393
3288
|
var json_parse_default = {
|
|
3394
3289
|
name: "json-parse",
|
|
@@ -3408,7 +3303,7 @@ var json_parse_default = {
|
|
|
3408
3303
|
const parsed = parseExpression(string.current);
|
|
3409
3304
|
path.replaceWith(parsed);
|
|
3410
3305
|
this.changes++;
|
|
3411
|
-
} catch
|
|
3306
|
+
} catch {
|
|
3412
3307
|
}
|
|
3413
3308
|
}
|
|
3414
3309
|
}
|
|
@@ -3416,7 +3311,7 @@ var json_parse_default = {
|
|
|
3416
3311
|
};
|
|
3417
3312
|
}
|
|
3418
3313
|
};
|
|
3419
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3314
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/logical-to-if.ts
|
|
3420
3315
|
import {statement} from "@babel/template";
|
|
3421
3316
|
import * as t26 from "@babel/types";
|
|
3422
3317
|
var logical_to_if_default = {
|
|
@@ -3449,7 +3344,7 @@ var logical_to_if_default = {
|
|
|
3449
3344
|
};
|
|
3450
3345
|
}
|
|
3451
3346
|
};
|
|
3452
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3347
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/merge-else-if.ts
|
|
3453
3348
|
var merge_else_if_default = {
|
|
3454
3349
|
name: "merge-else-if",
|
|
3455
3350
|
tags: ["safe"],
|
|
@@ -3468,7 +3363,7 @@ var merge_else_if_default = {
|
|
|
3468
3363
|
};
|
|
3469
3364
|
}
|
|
3470
3365
|
};
|
|
3471
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3366
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/number-expressions.ts
|
|
3472
3367
|
import * as t27 from "@babel/types";
|
|
3473
3368
|
var number_expressions_default = {
|
|
3474
3369
|
name: "number-expressions",
|
|
@@ -3490,7 +3385,7 @@ var number_expressions_default = {
|
|
|
3490
3385
|
})
|
|
3491
3386
|
};
|
|
3492
3387
|
var matcher3 = or(unaryExpression("-", or(stringLiteral(), numericLiteral())), binaryExpression(or("+", "-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"), or(stringLiteral(), numericLiteral(), unaryExpression("-", numericLiteral())), or(stringLiteral(), numericLiteral(), unaryExpression("-", numericLiteral()))));
|
|
3493
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3388
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/raw-literals.ts
|
|
3494
3389
|
var raw_literals_default = {
|
|
3495
3390
|
name: "raw-literals",
|
|
3496
3391
|
tags: ["safe"],
|
|
@@ -3509,8 +3404,46 @@ var raw_literals_default = {
|
|
|
3509
3404
|
}
|
|
3510
3405
|
})
|
|
3511
3406
|
};
|
|
3512
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3407
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/remove-double-not.ts
|
|
3513
3408
|
import * as t28 from "@babel/types";
|
|
3409
|
+
var remove_double_not_default = {
|
|
3410
|
+
name: "remove-double-not",
|
|
3411
|
+
tags: ["safe"],
|
|
3412
|
+
visitor() {
|
|
3413
|
+
const expression2 = capture(anyExpression());
|
|
3414
|
+
const doubleNot = unaryExpression("!", unaryExpression("!", expression2));
|
|
3415
|
+
const tripleNot = unaryExpression("!", doubleNot);
|
|
3416
|
+
const arrayCall = callExpression(constMemberExpression(arrayExpression(), or("filter", "find", "findLast", "findIndex", "findLastIndex", "some", "every")), [arrowFunctionExpression(anything(), doubleNot)]);
|
|
3417
|
+
return {
|
|
3418
|
+
Conditional: {
|
|
3419
|
+
exit(path) {
|
|
3420
|
+
if (doubleNot.match(path.node.test)) {
|
|
3421
|
+
path.get("test").replaceWith(expression2.current);
|
|
3422
|
+
this.changes++;
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
},
|
|
3426
|
+
UnaryExpression: {
|
|
3427
|
+
exit(path) {
|
|
3428
|
+
if (tripleNot.match(path.node)) {
|
|
3429
|
+
path.replaceWith(t28.unaryExpression("!", expression2.current));
|
|
3430
|
+
this.changes++;
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
},
|
|
3434
|
+
CallExpression: {
|
|
3435
|
+
exit(path) {
|
|
3436
|
+
if (arrayCall.match(path.node)) {
|
|
3437
|
+
path.get("arguments.0.body").replaceWith(expression2.current);
|
|
3438
|
+
this.changes++;
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
};
|
|
3443
|
+
}
|
|
3444
|
+
};
|
|
3445
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/sequence.ts
|
|
3446
|
+
import * as t29 from "@babel/types";
|
|
3514
3447
|
var sequence_default = {
|
|
3515
3448
|
name: "sequence",
|
|
3516
3449
|
tags: ["safe"],
|
|
@@ -3525,90 +3458,99 @@ var sequence_default = {
|
|
|
3525
3458
|
return;
|
|
3526
3459
|
const { expressions } = assignedSequence.current;
|
|
3527
3460
|
path.node.right = expressions.pop();
|
|
3528
|
-
const newNodes = path.parentPath.isExpressionStatement() ? expressions.map(
|
|
3461
|
+
const newNodes = path.parentPath.isExpressionStatement() ? expressions.map(t29.expressionStatement) : expressions;
|
|
3529
3462
|
path.insertBefore(newNodes);
|
|
3530
3463
|
this.changes++;
|
|
3531
3464
|
}
|
|
3532
3465
|
},
|
|
3533
3466
|
ExpressionStatement: {
|
|
3534
3467
|
exit(path) {
|
|
3535
|
-
if (!
|
|
3468
|
+
if (!t29.isSequenceExpression(path.node.expression))
|
|
3536
3469
|
return;
|
|
3537
|
-
const statements = path.node.expression.expressions.map(
|
|
3470
|
+
const statements = path.node.expression.expressions.map(t29.expressionStatement);
|
|
3538
3471
|
path.replaceWithMultiple(statements);
|
|
3539
3472
|
this.changes++;
|
|
3540
3473
|
}
|
|
3541
3474
|
},
|
|
3542
3475
|
ReturnStatement: {
|
|
3543
3476
|
exit(path) {
|
|
3544
|
-
if (!
|
|
3477
|
+
if (!t29.isSequenceExpression(path.node.argument))
|
|
3545
3478
|
return;
|
|
3546
3479
|
const { expressions } = path.node.argument;
|
|
3547
3480
|
path.node.argument = expressions.pop();
|
|
3548
|
-
const statements = expressions.map(
|
|
3481
|
+
const statements = expressions.map(t29.expressionStatement);
|
|
3549
3482
|
path.insertBefore(statements);
|
|
3550
3483
|
this.changes++;
|
|
3551
3484
|
}
|
|
3552
3485
|
},
|
|
3553
3486
|
IfStatement: {
|
|
3554
3487
|
exit(path) {
|
|
3555
|
-
if (!
|
|
3488
|
+
if (!t29.isSequenceExpression(path.node.test))
|
|
3556
3489
|
return;
|
|
3557
3490
|
const { expressions } = path.node.test;
|
|
3558
3491
|
path.node.test = expressions.pop();
|
|
3559
|
-
const statements = expressions.map(
|
|
3492
|
+
const statements = expressions.map(t29.expressionStatement);
|
|
3560
3493
|
path.insertBefore(statements);
|
|
3561
3494
|
this.changes++;
|
|
3562
3495
|
}
|
|
3563
3496
|
},
|
|
3564
3497
|
SwitchStatement: {
|
|
3565
3498
|
exit(path) {
|
|
3566
|
-
if (!
|
|
3499
|
+
if (!t29.isSequenceExpression(path.node.discriminant))
|
|
3567
3500
|
return;
|
|
3568
3501
|
const { expressions } = path.node.discriminant;
|
|
3569
3502
|
path.node.discriminant = expressions.pop();
|
|
3570
|
-
const statements = expressions.map(
|
|
3503
|
+
const statements = expressions.map(t29.expressionStatement);
|
|
3571
3504
|
path.insertBefore(statements);
|
|
3572
3505
|
this.changes++;
|
|
3573
3506
|
}
|
|
3574
3507
|
},
|
|
3575
3508
|
ThrowStatement: {
|
|
3576
3509
|
exit(path) {
|
|
3577
|
-
if (!
|
|
3510
|
+
if (!t29.isSequenceExpression(path.node.argument))
|
|
3578
3511
|
return;
|
|
3579
3512
|
const { expressions } = path.node.argument;
|
|
3580
3513
|
path.node.argument = expressions.pop();
|
|
3581
|
-
const statements = expressions.map(
|
|
3514
|
+
const statements = expressions.map(t29.expressionStatement);
|
|
3582
3515
|
path.insertBefore(statements);
|
|
3583
3516
|
this.changes++;
|
|
3584
3517
|
}
|
|
3585
3518
|
},
|
|
3586
3519
|
ForInStatement: {
|
|
3587
3520
|
exit(path) {
|
|
3588
|
-
|
|
3589
|
-
const matcher4 = forInStatement(anything(), sequence);
|
|
3590
|
-
if (!matcher4.match(path.node))
|
|
3521
|
+
if (!t29.isSequenceExpression(path.node.right))
|
|
3591
3522
|
return;
|
|
3592
|
-
const { expressions } =
|
|
3523
|
+
const { expressions } = path.node.right;
|
|
3593
3524
|
path.node.right = expressions.pop();
|
|
3594
|
-
const statements = expressions.map(
|
|
3525
|
+
const statements = expressions.map(t29.expressionStatement);
|
|
3526
|
+
path.insertBefore(statements);
|
|
3527
|
+
this.changes++;
|
|
3528
|
+
}
|
|
3529
|
+
},
|
|
3530
|
+
ForOfStatement: {
|
|
3531
|
+
exit(path) {
|
|
3532
|
+
if (!t29.isSequenceExpression(path.node.right))
|
|
3533
|
+
return;
|
|
3534
|
+
const { expressions } = path.node.right;
|
|
3535
|
+
path.node.right = expressions.pop();
|
|
3536
|
+
const statements = expressions.map(t29.expressionStatement);
|
|
3595
3537
|
path.insertBefore(statements);
|
|
3596
3538
|
this.changes++;
|
|
3597
3539
|
}
|
|
3598
3540
|
},
|
|
3599
3541
|
ForStatement: {
|
|
3600
3542
|
exit(path) {
|
|
3601
|
-
if (
|
|
3602
|
-
const statements = path.node.init.expressions.map(
|
|
3543
|
+
if (t29.isSequenceExpression(path.node.init)) {
|
|
3544
|
+
const statements = path.node.init.expressions.map(t29.expressionStatement);
|
|
3603
3545
|
path.node.init = null;
|
|
3604
3546
|
path.insertBefore(statements);
|
|
3605
3547
|
this.changes++;
|
|
3606
3548
|
}
|
|
3607
|
-
if (
|
|
3549
|
+
if (t29.isSequenceExpression(path.node.update) && path.node.body.type === "EmptyStatement") {
|
|
3608
3550
|
const { expressions } = path.node.update;
|
|
3609
3551
|
path.node.update = expressions.pop();
|
|
3610
|
-
const statements = expressions.map(
|
|
3611
|
-
path.node.body =
|
|
3552
|
+
const statements = expressions.map(t29.expressionStatement);
|
|
3553
|
+
path.node.body = t29.blockStatement(statements);
|
|
3612
3554
|
this.changes++;
|
|
3613
3555
|
}
|
|
3614
3556
|
}
|
|
@@ -3623,16 +3565,25 @@ var sequence_default = {
|
|
|
3623
3565
|
return;
|
|
3624
3566
|
const { expressions } = sequence.current;
|
|
3625
3567
|
path.node.declarations[0].init = expressions.pop();
|
|
3626
|
-
const statements = expressions.map(
|
|
3568
|
+
const statements = expressions.map(t29.expressionStatement);
|
|
3627
3569
|
path.getStatementParent()?.insertBefore(statements);
|
|
3628
3570
|
this.changes++;
|
|
3629
3571
|
}
|
|
3572
|
+
},
|
|
3573
|
+
SequenceExpression: {
|
|
3574
|
+
exit(path) {
|
|
3575
|
+
const { expressions } = path.node;
|
|
3576
|
+
if (expressions.every((node) => safeLiteral.match(node))) {
|
|
3577
|
+
path.replaceWith(expressions.at(-1));
|
|
3578
|
+
this.changes++;
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3630
3581
|
}
|
|
3631
3582
|
};
|
|
3632
3583
|
}
|
|
3633
3584
|
};
|
|
3634
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3635
|
-
import * as
|
|
3585
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/split-for-loop-vars.ts
|
|
3586
|
+
import * as t30 from "@babel/types";
|
|
3636
3587
|
var matcher4 = forStatement(variableDeclaration("var", arrayOf(variableDeclarator(identifier()))));
|
|
3637
3588
|
var split_for_loop_vars_default = {
|
|
3638
3589
|
name: "split-for-loop-vars",
|
|
@@ -3653,7 +3604,7 @@ var split_for_loop_vars_default = {
|
|
|
3653
3604
|
const isUsedInTestOrUpdate = binding.constantViolations.some((reference) => reference.find((p) => p.node === test || p.node === update)) || binding.referencePaths.some((reference) => reference.find((p) => p.node === test || p.node === update));
|
|
3654
3605
|
if (isUsedInTestOrUpdate)
|
|
3655
3606
|
break;
|
|
3656
|
-
path.insertBefore(
|
|
3607
|
+
path.insertBefore(t30.variableDeclaration("var", [declarator]));
|
|
3657
3608
|
declarations.shift();
|
|
3658
3609
|
i--;
|
|
3659
3610
|
this.changes++;
|
|
@@ -3664,8 +3615,8 @@ var split_for_loop_vars_default = {
|
|
|
3664
3615
|
}
|
|
3665
3616
|
})
|
|
3666
3617
|
};
|
|
3667
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3668
|
-
import * as
|
|
3618
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/split-variable-declarations.ts
|
|
3619
|
+
import * as t31 from "@babel/types";
|
|
3669
3620
|
var split_variable_declarations_default = {
|
|
3670
3621
|
name: "split-variable-declarations",
|
|
3671
3622
|
tags: ["safe"],
|
|
@@ -3675,15 +3626,15 @@ var split_variable_declarations_default = {
|
|
|
3675
3626
|
if (path.node.declarations.length > 1) {
|
|
3676
3627
|
if (path.key === "init" && path.parentPath.isForStatement()) {
|
|
3677
3628
|
if (!path.parentPath.node.test && !path.parentPath.node.update && path.node.kind === "var") {
|
|
3678
|
-
path.parentPath.insertBefore(path.node.declarations.map((declaration) =>
|
|
3629
|
+
path.parentPath.insertBefore(path.node.declarations.map((declaration) => t31.variableDeclaration(path.node.kind, [declaration])));
|
|
3679
3630
|
path.remove();
|
|
3680
3631
|
this.changes++;
|
|
3681
3632
|
}
|
|
3682
3633
|
} else {
|
|
3683
3634
|
if (path.parentPath.isExportNamedDeclaration()) {
|
|
3684
|
-
path.parentPath.replaceWithMultiple(path.node.declarations.map((declaration) =>
|
|
3635
|
+
path.parentPath.replaceWithMultiple(path.node.declarations.map((declaration) => t31.exportNamedDeclaration(t31.variableDeclaration(path.node.kind, [declaration]))));
|
|
3685
3636
|
} else {
|
|
3686
|
-
path.replaceWithMultiple(path.node.declarations.map((declaration) =>
|
|
3637
|
+
path.replaceWithMultiple(path.node.declarations.map((declaration) => t31.variableDeclaration(path.node.kind, [declaration])));
|
|
3687
3638
|
}
|
|
3688
3639
|
this.changes++;
|
|
3689
3640
|
}
|
|
@@ -3692,7 +3643,7 @@ var split_variable_declarations_default = {
|
|
|
3692
3643
|
}
|
|
3693
3644
|
})
|
|
3694
3645
|
};
|
|
3695
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3646
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/ternary-to-if.ts
|
|
3696
3647
|
import {statement as statement2} from "@babel/template";
|
|
3697
3648
|
var ternary_to_if_default = {
|
|
3698
3649
|
name: "ternary-to-if",
|
|
@@ -3732,8 +3683,8 @@ var ternary_to_if_default = {
|
|
|
3732
3683
|
};
|
|
3733
3684
|
}
|
|
3734
3685
|
};
|
|
3735
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3736
|
-
import * as
|
|
3686
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/typeof-undefined.ts
|
|
3687
|
+
import * as t32 from "@babel/types";
|
|
3737
3688
|
var OPERATOR_MAP = {
|
|
3738
3689
|
">": "===",
|
|
3739
3690
|
"<": "!=="
|
|
@@ -3750,15 +3701,15 @@ var typeof_undefined_default = {
|
|
|
3750
3701
|
exit(path) {
|
|
3751
3702
|
if (!matcher5.match(path.node))
|
|
3752
3703
|
return;
|
|
3753
|
-
path.replaceWith(
|
|
3704
|
+
path.replaceWith(t32.binaryExpression(OPERATOR_MAP[operator.current], t32.unaryExpression("typeof", argument.current), t32.stringLiteral("undefined")));
|
|
3754
3705
|
this.changes++;
|
|
3755
3706
|
}
|
|
3756
3707
|
}
|
|
3757
3708
|
};
|
|
3758
3709
|
}
|
|
3759
3710
|
};
|
|
3760
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3761
|
-
import * as
|
|
3711
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/unary-expressions.ts
|
|
3712
|
+
import * as t33 from "@babel/types";
|
|
3762
3713
|
var unary_expressions_default = {
|
|
3763
3714
|
name: "unary-expressions",
|
|
3764
3715
|
tags: ["safe"],
|
|
@@ -3780,25 +3731,25 @@ var unary_expressions_default = {
|
|
|
3780
3731
|
if (!returnVoid.match(path.node))
|
|
3781
3732
|
return;
|
|
3782
3733
|
path.replaceWith(argument.current);
|
|
3783
|
-
path.insertAfter(
|
|
3734
|
+
path.insertAfter(t33.returnStatement());
|
|
3784
3735
|
this.changes++;
|
|
3785
3736
|
}
|
|
3786
3737
|
}
|
|
3787
3738
|
};
|
|
3788
3739
|
}
|
|
3789
3740
|
};
|
|
3790
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3791
|
-
import * as
|
|
3741
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/unminify-booleans.ts
|
|
3742
|
+
import * as t34 from "@babel/types";
|
|
3792
3743
|
var unminify_booleans_default = {
|
|
3793
3744
|
name: "unminify-booleans",
|
|
3794
3745
|
tags: ["safe"],
|
|
3795
3746
|
visitor: () => ({
|
|
3796
3747
|
UnaryExpression(path) {
|
|
3797
3748
|
if (trueMatcher2.match(path.node)) {
|
|
3798
|
-
path.replaceWith(
|
|
3749
|
+
path.replaceWith(t34.booleanLiteral(true));
|
|
3799
3750
|
this.changes++;
|
|
3800
3751
|
} else if (falseMatcher2.match(path.node)) {
|
|
3801
|
-
path.replaceWith(
|
|
3752
|
+
path.replaceWith(t34.booleanLiteral(false));
|
|
3802
3753
|
this.changes++;
|
|
3803
3754
|
}
|
|
3804
3755
|
}
|
|
@@ -3806,8 +3757,8 @@ var unminify_booleans_default = {
|
|
|
3806
3757
|
};
|
|
3807
3758
|
var trueMatcher2 = or(unaryExpression("!", numericLiteral(0)), unaryExpression("!", unaryExpression("!", numericLiteral(1))), unaryExpression("!", unaryExpression("!", arrayExpression([]))));
|
|
3808
3759
|
var falseMatcher2 = or(unaryExpression("!", numericLiteral(1)), unaryExpression("!", arrayExpression([])));
|
|
3809
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3810
|
-
import * as
|
|
3760
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/void-to-undefined.ts
|
|
3761
|
+
import * as t35 from "@babel/types";
|
|
3811
3762
|
var void_to_undefined_default = {
|
|
3812
3763
|
name: "void-to-undefined",
|
|
3813
3764
|
tags: ["safe"],
|
|
@@ -3818,7 +3769,7 @@ var void_to_undefined_default = {
|
|
|
3818
3769
|
UnaryExpression: {
|
|
3819
3770
|
exit(path) {
|
|
3820
3771
|
if (matcher5.match(path.node) && !path.scope.hasBinding("undefined", { noGlobals: true })) {
|
|
3821
|
-
path.replaceWith(
|
|
3772
|
+
path.replaceWith(t35.identifier("undefined"));
|
|
3822
3773
|
this.changes++;
|
|
3823
3774
|
}
|
|
3824
3775
|
}
|
|
@@ -3826,8 +3777,8 @@ var void_to_undefined_default = {
|
|
|
3826
3777
|
};
|
|
3827
3778
|
}
|
|
3828
3779
|
};
|
|
3829
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
3830
|
-
import * as
|
|
3780
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/unminify/transforms/yoda.ts
|
|
3781
|
+
import * as t36 from "@babel/types";
|
|
3831
3782
|
var FLIPPED_OPERATORS = {
|
|
3832
3783
|
"==": "==",
|
|
3833
3784
|
"===": "===",
|
|
@@ -3846,12 +3797,12 @@ var yoda_default = {
|
|
|
3846
3797
|
name: "yoda",
|
|
3847
3798
|
tags: ["safe"],
|
|
3848
3799
|
visitor: () => {
|
|
3849
|
-
const matcher5 = binaryExpression(or(...Object.values(FLIPPED_OPERATORS)), or(stringLiteral(), numericLiteral(), unaryExpression("-", or(numericLiteral(), identifier("Infinity"))), booleanLiteral(), nullLiteral(), identifier("undefined"), identifier("NaN"), identifier("Infinity")), predicate((node) => !
|
|
3800
|
+
const matcher5 = binaryExpression(or(...Object.values(FLIPPED_OPERATORS)), or(stringLiteral(), numericLiteral(), unaryExpression("-", or(numericLiteral(), identifier("Infinity"))), booleanLiteral(), nullLiteral(), identifier("undefined"), identifier("NaN"), identifier("Infinity")), predicate((node) => !t36.isLiteral(node)));
|
|
3850
3801
|
return {
|
|
3851
3802
|
BinaryExpression: {
|
|
3852
3803
|
exit(path) {
|
|
3853
3804
|
if (matcher5.match(path.node)) {
|
|
3854
|
-
path.replaceWith(
|
|
3805
|
+
path.replaceWith(t36.binaryExpression(FLIPPED_OPERATORS[path.node.operator], path.node.right, path.node.left));
|
|
3855
3806
|
this.changes++;
|
|
3856
3807
|
}
|
|
3857
3808
|
}
|
|
@@ -3874,7 +3825,7 @@ async function transform2(ast2) {
|
|
|
3874
3825
|
const quickjs = await getQuickJS();
|
|
3875
3826
|
await applyTransformAsync(ast2, deobfuscate_default, async (code) => quickjs.evalCode(code, {
|
|
3876
3827
|
shouldInterrupt: shouldInterruptAfterDeadline(Date.now() + 2000),
|
|
3877
|
-
memoryLimitBytes:
|
|
3828
|
+
memoryLimitBytes: 2 * 1024 * 1024
|
|
3878
3829
|
}));
|
|
3879
3830
|
applyTransform(ast2, unminify_default);
|
|
3880
3831
|
applyTransform(ast2, merge_object_assignments_default);
|
|
@@ -3883,7 +3834,7 @@ async function transform2(ast2) {
|
|
|
3883
3834
|
}
|
|
3884
3835
|
|
|
3885
3836
|
// transform/esmodule/module-helper.ts
|
|
3886
|
-
import * as
|
|
3837
|
+
import * as t37 from "@babel/types";
|
|
3887
3838
|
|
|
3888
3839
|
// utils/matchers/chunk.ts
|
|
3889
3840
|
function chunk(id) {
|
|
@@ -4132,19 +4083,19 @@ var module_helper_default = {
|
|
|
4132
4083
|
if (!$id.isIdentifier()) {
|
|
4133
4084
|
return;
|
|
4134
4085
|
}
|
|
4135
|
-
if (importStar_default.match(
|
|
4086
|
+
if (importStar_default.match(t37.cloneNode(p2.node))) {
|
|
4136
4087
|
$id.scope.rename($id.node.name, "__importStar");
|
|
4137
4088
|
$decl.get("init").replaceWith(__importStar);
|
|
4138
|
-
} else if (setModuleDefault_default.match(
|
|
4089
|
+
} else if (setModuleDefault_default.match(t37.cloneNode(p2.node))) {
|
|
4139
4090
|
$id.scope.rename($id.node.name, "__setModuleDefault");
|
|
4140
4091
|
$decl.get("init").replaceWith(__setModuleDefault);
|
|
4141
|
-
} else if (importDefault_default.match(
|
|
4092
|
+
} else if (importDefault_default.match(t37.cloneNode(p2.node))) {
|
|
4142
4093
|
$id.scope.rename($id.node.name, "__importDefault");
|
|
4143
4094
|
$decl.get("init").replaceWith(__importDefault);
|
|
4144
|
-
} else if (createBinding_default.match(
|
|
4095
|
+
} else if (createBinding_default.match(t37.cloneNode(p2.node))) {
|
|
4145
4096
|
$id.scope.rename($id.node.name, "__createBinding");
|
|
4146
4097
|
$decl.get("init").replaceWith(__createBinding);
|
|
4147
|
-
} else if (exportStar_default.match(
|
|
4098
|
+
} else if (exportStar_default.match(t37.cloneNode(p2.node))) {
|
|
4148
4099
|
$id.scope.rename($id.node.name, "__exportStar");
|
|
4149
4100
|
$decl.get("init").replaceWith(__exportStar);
|
|
4150
4101
|
} else {
|
|
@@ -4161,7 +4112,7 @@ var module_helper_default = {
|
|
|
4161
4112
|
};
|
|
4162
4113
|
|
|
4163
4114
|
// transform/esmodule/indirect-call.ts
|
|
4164
|
-
import * as
|
|
4115
|
+
import * as t38 from "@babel/types";
|
|
4165
4116
|
var indirect_call_default = {
|
|
4166
4117
|
name: "indirect-call",
|
|
4167
4118
|
tags: ["unsafe"],
|
|
@@ -4169,16 +4120,16 @@ var indirect_call_default = {
|
|
|
4169
4120
|
CallExpression: {
|
|
4170
4121
|
exit($) {
|
|
4171
4122
|
const { callee, arguments: _arguments } = $.node;
|
|
4172
|
-
if (!
|
|
4123
|
+
if (!t38.isSequenceExpression(callee)) {
|
|
4173
4124
|
return;
|
|
4174
4125
|
}
|
|
4175
4126
|
const exprs = [...callee.expressions];
|
|
4176
4127
|
const _function = exprs.pop();
|
|
4177
|
-
if (!
|
|
4128
|
+
if (!t38.isMemberExpression(_function)) {
|
|
4178
4129
|
return;
|
|
4179
4130
|
}
|
|
4180
|
-
if (exprs.every((expr) =>
|
|
4181
|
-
$.replaceWith(
|
|
4131
|
+
if (exprs.every((expr) => t38.isPureish(expr))) {
|
|
4132
|
+
$.replaceWith(t38.callExpression(_function, _arguments));
|
|
4182
4133
|
this.changes++;
|
|
4183
4134
|
}
|
|
4184
4135
|
}
|
|
@@ -4222,10 +4173,10 @@ function transform3(ast2) {
|
|
|
4222
4173
|
}
|
|
4223
4174
|
|
|
4224
4175
|
// transform/syntactic/template-literal.ts
|
|
4225
|
-
import * as
|
|
4226
|
-
|
|
4176
|
+
import * as t39 from "@babel/types";
|
|
4177
|
+
function escape(string) {
|
|
4227
4178
|
return string.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("$", "\\$").replaceAll("\t", "\\t").replaceAll("\r", "\\r").replaceAll("\0", "\\0");
|
|
4228
|
-
}
|
|
4179
|
+
}
|
|
4229
4180
|
var template_literal_default = {
|
|
4230
4181
|
name: "template-literal",
|
|
4231
4182
|
tags: ["safe"],
|
|
@@ -4245,10 +4196,10 @@ var template_literal_default = {
|
|
|
4245
4196
|
if (!last) {
|
|
4246
4197
|
throw new Error("Unexpected empty template literal");
|
|
4247
4198
|
}
|
|
4248
|
-
$left.node.quasis.push(
|
|
4199
|
+
$left.node.quasis.push(t39.templateElement({
|
|
4249
4200
|
raw: last.value.raw + $right.node.quasis[0].value.raw
|
|
4250
4201
|
}, false), ...$right.node.quasis.slice(1));
|
|
4251
|
-
$.replaceWith(
|
|
4202
|
+
$.replaceWith(t39.templateLiteral([
|
|
4252
4203
|
...$left.node.quasis
|
|
4253
4204
|
], [
|
|
4254
4205
|
...$left.node.expressions,
|
|
@@ -4259,17 +4210,17 @@ var template_literal_default = {
|
|
|
4259
4210
|
if (!last) {
|
|
4260
4211
|
throw new Error("Unexpected empty template literal");
|
|
4261
4212
|
}
|
|
4262
|
-
$left.node.quasis.push(
|
|
4213
|
+
$left.node.quasis.push(t39.templateElement({
|
|
4263
4214
|
raw: escape(last.value.raw + $right.node.value)
|
|
4264
4215
|
}, true));
|
|
4265
4216
|
$.replaceWith($left.node);
|
|
4266
4217
|
} else {
|
|
4267
|
-
$.replaceWith(
|
|
4218
|
+
$.replaceWith(t39.templateLiteral([
|
|
4268
4219
|
...$left.node.quasis.map((element) => {
|
|
4269
4220
|
element.tail = false;
|
|
4270
4221
|
return element;
|
|
4271
4222
|
}),
|
|
4272
|
-
|
|
4223
|
+
t39.templateElement({ raw: "" }, true)
|
|
4273
4224
|
], [
|
|
4274
4225
|
...$left.node.expressions,
|
|
4275
4226
|
$right.node
|
|
@@ -4283,9 +4234,9 @@ var template_literal_default = {
|
|
|
4283
4234
|
if ($right.isCallExpression() && $right.get("callee").isFunctionExpression()) {
|
|
4284
4235
|
return;
|
|
4285
4236
|
}
|
|
4286
|
-
$.replaceWith(
|
|
4287
|
-
|
|
4288
|
-
|
|
4237
|
+
$.replaceWith(t39.templateLiteral([
|
|
4238
|
+
t39.templateElement({ raw: escape($left.node.value) }, false),
|
|
4239
|
+
t39.templateElement({ raw: "" }, true)
|
|
4289
4240
|
], [
|
|
4290
4241
|
$right.node
|
|
4291
4242
|
]));
|
|
@@ -4304,43 +4255,19 @@ function transform4(ast2) {
|
|
|
4304
4255
|
return ast2;
|
|
4305
4256
|
}
|
|
4306
4257
|
|
|
4307
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
4258
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/transpile/transforms/index.ts
|
|
4308
4259
|
var exports_transforms2 = {};
|
|
4309
4260
|
__export(exports_transforms2, {
|
|
4310
|
-
templateLiterals: () =>
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
{
|
|
4317
|
-
return optional_chaining_default;
|
|
4318
|
-
}
|
|
4319
|
-
},
|
|
4320
|
-
nullishCoalescingAssignment: () => {
|
|
4321
|
-
{
|
|
4322
|
-
return nullish_coalescing_assignment_default;
|
|
4323
|
-
}
|
|
4324
|
-
},
|
|
4325
|
-
nullishCoalescing: () => {
|
|
4326
|
-
{
|
|
4327
|
-
return nullish_coalescing_default;
|
|
4328
|
-
}
|
|
4329
|
-
},
|
|
4330
|
-
logicalAssignments: () => {
|
|
4331
|
-
{
|
|
4332
|
-
return logical_assignments_default;
|
|
4333
|
-
}
|
|
4334
|
-
},
|
|
4335
|
-
defaultParameters: () => {
|
|
4336
|
-
{
|
|
4337
|
-
return default_parameters_default;
|
|
4338
|
-
}
|
|
4339
|
-
}
|
|
4261
|
+
templateLiterals: () => template_literals_default,
|
|
4262
|
+
optionalChaining: () => optional_chaining_default,
|
|
4263
|
+
nullishCoalescingAssignment: () => nullish_coalescing_assignment_default,
|
|
4264
|
+
nullishCoalescing: () => nullish_coalescing_default,
|
|
4265
|
+
logicalAssignments: () => logical_assignments_default,
|
|
4266
|
+
defaultParameters: () => default_parameters_default
|
|
4340
4267
|
});
|
|
4341
4268
|
|
|
4342
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
4343
|
-
import * as
|
|
4269
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/transpile/transforms/default-parameters.ts
|
|
4270
|
+
import * as t40 from "@babel/types";
|
|
4344
4271
|
var default_parameters_default = {
|
|
4345
4272
|
name: "default-parameters",
|
|
4346
4273
|
tags: ["safe"],
|
|
@@ -4371,13 +4298,13 @@ var default_parameters_default = {
|
|
|
4371
4298
|
VariableDeclaration: {
|
|
4372
4299
|
exit(path) {
|
|
4373
4300
|
const fn = path.parentPath.parent;
|
|
4374
|
-
if (!
|
|
4301
|
+
if (!t40.isFunction(fn) || path.key !== 0)
|
|
4375
4302
|
return;
|
|
4376
|
-
const newParam = defaultParam.match(path.node) ?
|
|
4303
|
+
const newParam = defaultParam.match(path.node) ? t40.assignmentPattern(varId.current, defaultExpression.current) : defaultFalseParam.match(path.node) ? t40.assignmentPattern(varId.current, t40.booleanLiteral(false)) : defaultTrueParam.match(path.node) ? t40.assignmentPattern(varId.current, t40.booleanLiteral(true)) : normalParam.match(path.node) ? varId.current : null;
|
|
4377
4304
|
if (!newParam)
|
|
4378
4305
|
return;
|
|
4379
4306
|
for (let i = fn.params.length;i < index.current.value; i++) {
|
|
4380
|
-
fn.params[i] =
|
|
4307
|
+
fn.params[i] = t40.identifier(path.scope.generateUid("param"));
|
|
4381
4308
|
}
|
|
4382
4309
|
fn.params[index.current.value] = newParam;
|
|
4383
4310
|
path.remove();
|
|
@@ -4387,7 +4314,7 @@ var default_parameters_default = {
|
|
|
4387
4314
|
IfStatement: {
|
|
4388
4315
|
exit(path) {
|
|
4389
4316
|
const fn = path.parentPath.parent;
|
|
4390
|
-
if (!
|
|
4317
|
+
if (!t40.isFunction(fn) || path.key !== 0)
|
|
4391
4318
|
return;
|
|
4392
4319
|
if (!defaultParamLoose.match(path.node))
|
|
4393
4320
|
return;
|
|
@@ -4397,7 +4324,7 @@ var default_parameters_default = {
|
|
|
4397
4324
|
const isFunctionParam = binding.path.listKey === "params" && binding.path.parent === fn;
|
|
4398
4325
|
if (!isFunctionParam)
|
|
4399
4326
|
return;
|
|
4400
|
-
binding.path.replaceWith(
|
|
4327
|
+
binding.path.replaceWith(t40.assignmentPattern(varName.current, defaultExpression.current));
|
|
4401
4328
|
path.remove();
|
|
4402
4329
|
this.changes++;
|
|
4403
4330
|
}
|
|
@@ -4405,8 +4332,8 @@ var default_parameters_default = {
|
|
|
4405
4332
|
};
|
|
4406
4333
|
}
|
|
4407
4334
|
};
|
|
4408
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
4409
|
-
import * as
|
|
4335
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/transpile/transforms/logical-assignments.ts
|
|
4336
|
+
import * as t41 from "@babel/types";
|
|
4410
4337
|
var logical_assignments_default = {
|
|
4411
4338
|
name: "logical-assignments",
|
|
4412
4339
|
tags: ["safe"],
|
|
@@ -4428,7 +4355,7 @@ var logical_assignments_default = {
|
|
|
4428
4355
|
LogicalExpression: {
|
|
4429
4356
|
exit(path) {
|
|
4430
4357
|
if (idMatcher.match(path.node)) {
|
|
4431
|
-
path.replaceWith(
|
|
4358
|
+
path.replaceWith(t41.assignmentExpression(operator.current + "=", left.current, right.current));
|
|
4432
4359
|
this.changes++;
|
|
4433
4360
|
} else if (memberMatcher.match(path.node)) {
|
|
4434
4361
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
@@ -4436,14 +4363,14 @@ var logical_assignments_default = {
|
|
|
4436
4363
|
return;
|
|
4437
4364
|
binding.path.remove();
|
|
4438
4365
|
member.current.object = object.current;
|
|
4439
|
-
path.replaceWith(
|
|
4366
|
+
path.replaceWith(t41.assignmentExpression(operator.current + "=", member.current, right.current));
|
|
4440
4367
|
this.changes++;
|
|
4441
4368
|
} else if (computedMemberMatcher.match(path.node)) {
|
|
4442
4369
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
4443
4370
|
if (!isTemporaryVariable(binding, 1))
|
|
4444
4371
|
return;
|
|
4445
4372
|
binding.path.remove();
|
|
4446
|
-
path.replaceWith(
|
|
4373
|
+
path.replaceWith(t41.assignmentExpression(operator.current + "=", t41.memberExpression(object.current, property.current, true), right.current));
|
|
4447
4374
|
this.changes++;
|
|
4448
4375
|
} else if (multiComputedMemberMatcher.match(path.node)) {
|
|
4449
4376
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
@@ -4452,7 +4379,7 @@ var logical_assignments_default = {
|
|
|
4452
4379
|
return;
|
|
4453
4380
|
binding.path.remove();
|
|
4454
4381
|
binding2.path.remove();
|
|
4455
|
-
path.replaceWith(
|
|
4382
|
+
path.replaceWith(t41.assignmentExpression(operator.current + "=", t41.memberExpression(object.current, property.current, true), right.current));
|
|
4456
4383
|
this.changes++;
|
|
4457
4384
|
}
|
|
4458
4385
|
}
|
|
@@ -4460,8 +4387,8 @@ var logical_assignments_default = {
|
|
|
4460
4387
|
};
|
|
4461
4388
|
}
|
|
4462
4389
|
};
|
|
4463
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
4464
|
-
import * as
|
|
4390
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/transpile/transforms/nullish-coalescing.ts
|
|
4391
|
+
import * as t42 from "@babel/types";
|
|
4465
4392
|
var nullish_coalescing_default = {
|
|
4466
4393
|
name: "nullish-coalescing",
|
|
4467
4394
|
tags: ["safe"],
|
|
@@ -4480,11 +4407,11 @@ var nullish_coalescing_default = {
|
|
|
4480
4407
|
if (idMatcher.match(path.node)) {
|
|
4481
4408
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
4482
4409
|
if (iifeMatcher.match(path.parentPath.parent) && isTemporaryVariable(binding, 2, "param")) {
|
|
4483
|
-
path.parentPath.parentPath.replaceWith(
|
|
4410
|
+
path.parentPath.parentPath.replaceWith(t42.logicalExpression("??", left.current, right.current));
|
|
4484
4411
|
this.changes++;
|
|
4485
4412
|
} else if (isTemporaryVariable(binding, 2, "var")) {
|
|
4486
4413
|
binding.path.remove();
|
|
4487
|
-
path.replaceWith(
|
|
4414
|
+
path.replaceWith(t42.logicalExpression("??", left.current, right.current));
|
|
4488
4415
|
this.changes++;
|
|
4489
4416
|
}
|
|
4490
4417
|
} else if (idLooseMatcher.match(path.node)) {
|
|
@@ -4492,10 +4419,10 @@ var nullish_coalescing_default = {
|
|
|
4492
4419
|
if (!isTemporaryVariable(binding, 1))
|
|
4493
4420
|
return;
|
|
4494
4421
|
binding.path.remove();
|
|
4495
|
-
path.replaceWith(
|
|
4422
|
+
path.replaceWith(t42.logicalExpression("??", left.current, right.current));
|
|
4496
4423
|
this.changes++;
|
|
4497
4424
|
} else if (simpleIdMatcher.match(path.node)) {
|
|
4498
|
-
path.replaceWith(
|
|
4425
|
+
path.replaceWith(t42.logicalExpression("??", left.current, right.current));
|
|
4499
4426
|
this.changes++;
|
|
4500
4427
|
}
|
|
4501
4428
|
}
|
|
@@ -4503,8 +4430,8 @@ var nullish_coalescing_default = {
|
|
|
4503
4430
|
};
|
|
4504
4431
|
}
|
|
4505
4432
|
};
|
|
4506
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
4507
|
-
import * as
|
|
4433
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/transpile/transforms/nullish-coalescing-assignment.ts
|
|
4434
|
+
import * as t43 from "@babel/types";
|
|
4508
4435
|
var nullish_coalescing_assignment_default = {
|
|
4509
4436
|
name: "nullish-coalescing-assignment",
|
|
4510
4437
|
tags: ["safe"],
|
|
@@ -4526,10 +4453,10 @@ var nullish_coalescing_assignment_default = {
|
|
|
4526
4453
|
if (!isTemporaryVariable(binding, 1))
|
|
4527
4454
|
return;
|
|
4528
4455
|
binding.path.remove();
|
|
4529
|
-
path.replaceWith(
|
|
4456
|
+
path.replaceWith(t43.assignmentExpression("??=", t43.memberExpression(leftId.current, property.current, computed.current), right.current));
|
|
4530
4457
|
this.changes++;
|
|
4531
4458
|
} else if (simpleMatcher.match(path.node)) {
|
|
4532
|
-
path.replaceWith(
|
|
4459
|
+
path.replaceWith(t43.assignmentExpression("??=", left.current, right.current));
|
|
4533
4460
|
this.changes++;
|
|
4534
4461
|
}
|
|
4535
4462
|
}
|
|
@@ -4537,8 +4464,8 @@ var nullish_coalescing_assignment_default = {
|
|
|
4537
4464
|
};
|
|
4538
4465
|
}
|
|
4539
4466
|
};
|
|
4540
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
4541
|
-
import * as
|
|
4467
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/transpile/transforms/optional-chaining.ts
|
|
4468
|
+
import * as t44 from "@babel/types";
|
|
4542
4469
|
var optional_chaining_default = {
|
|
4543
4470
|
name: "optional-chaining",
|
|
4544
4471
|
tags: ["safe"],
|
|
@@ -4555,7 +4482,7 @@ var optional_chaining_default = {
|
|
|
4555
4482
|
exit(path) {
|
|
4556
4483
|
if (simpleMatcher.match(path.node)) {
|
|
4557
4484
|
member.current.optional = true;
|
|
4558
|
-
path.replaceWith(
|
|
4485
|
+
path.replaceWith(t44.optionalMemberExpression(object.current, member.current.property, member.current.computed, true));
|
|
4559
4486
|
this.changes++;
|
|
4560
4487
|
} else if (tmpMatcher.match(path.node)) {
|
|
4561
4488
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
@@ -4563,7 +4490,7 @@ var optional_chaining_default = {
|
|
|
4563
4490
|
return;
|
|
4564
4491
|
binding.path.remove();
|
|
4565
4492
|
tmpMember.current.optional = true;
|
|
4566
|
-
path.replaceWith(
|
|
4493
|
+
path.replaceWith(t44.optionalMemberExpression(object.current, tmpMember.current.property, tmpMember.current.computed, true));
|
|
4567
4494
|
this.changes++;
|
|
4568
4495
|
}
|
|
4569
4496
|
}
|
|
@@ -4571,12 +4498,12 @@ var optional_chaining_default = {
|
|
|
4571
4498
|
};
|
|
4572
4499
|
}
|
|
4573
4500
|
};
|
|
4574
|
-
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=
|
|
4575
|
-
import * as
|
|
4576
|
-
|
|
4501
|
+
// node_modules/.pnpm/webcrack@https+++gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages+webcrack&commit=9_e74mpmskrhkukmakoww36dl47m/node_modules/webcrack/src/transpile/transforms/template-literals.ts
|
|
4502
|
+
import * as t45 from "@babel/types";
|
|
4503
|
+
function escape2(str) {
|
|
4577
4504
|
return str.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("$", "\\$").replaceAll("\0", "\\0").replaceAll("\b", "\\b").replaceAll("\f", "\\f").replaceAll("\r", "\\r").replaceAll("\t", "\\t").replaceAll("\v", "\\v");
|
|
4578
|
-
}
|
|
4579
|
-
|
|
4505
|
+
}
|
|
4506
|
+
function push(template9, value) {
|
|
4580
4507
|
if (value.type === "StringLiteral") {
|
|
4581
4508
|
const lastQuasi = template9.quasis.at(-1);
|
|
4582
4509
|
lastQuasi.value.raw += escape2(value.value);
|
|
@@ -4588,23 +4515,18 @@ var push = function(template9, value) {
|
|
|
4588
4515
|
template9.quasis.push(...value.quasis.slice(1));
|
|
4589
4516
|
} else {
|
|
4590
4517
|
template9.expressions.push(value);
|
|
4591
|
-
template9.quasis.push(
|
|
4518
|
+
template9.quasis.push(t45.templateElement({ raw: "" }));
|
|
4592
4519
|
}
|
|
4593
|
-
}
|
|
4594
|
-
|
|
4520
|
+
}
|
|
4521
|
+
function unshift(template9, value) {
|
|
4595
4522
|
if (value.type === "StringLiteral") {
|
|
4596
4523
|
const firstQuasi = template9.quasis[0];
|
|
4597
4524
|
firstQuasi.value.raw = escape2(value.value) + firstQuasi.value.raw;
|
|
4598
|
-
} else if (value.type === "TemplateLiteral") {
|
|
4599
|
-
const firstQuasi = template9.quasis[0];
|
|
4600
|
-
firstQuasi.value.raw = value.quasis[0].value.raw + firstQuasi.value.raw;
|
|
4601
|
-
template9.expressions.unshift(...value.expressions);
|
|
4602
|
-
template9.quasis.unshift(...value.quasis.slice(0, -1));
|
|
4603
4525
|
} else {
|
|
4604
4526
|
template9.expressions.unshift(value);
|
|
4605
|
-
template9.quasis.unshift(
|
|
4527
|
+
template9.quasis.unshift(t45.templateElement({ raw: "" }));
|
|
4606
4528
|
}
|
|
4607
|
-
}
|
|
4529
|
+
}
|
|
4608
4530
|
var template_literals_default = {
|
|
4609
4531
|
name: "template-literals",
|
|
4610
4532
|
tags: ["unsafe"],
|
|
@@ -4616,11 +4538,11 @@ var template_literals_default = {
|
|
|
4616
4538
|
exit(path) {
|
|
4617
4539
|
if (path.node.operator !== "+")
|
|
4618
4540
|
return;
|
|
4619
|
-
if (
|
|
4541
|
+
if (t45.isTemplateLiteral(path.node.left)) {
|
|
4620
4542
|
push(path.node.left, path.node.right);
|
|
4621
4543
|
path.replaceWith(path.node.left);
|
|
4622
4544
|
this.changes++;
|
|
4623
|
-
} else if (
|
|
4545
|
+
} else if (t45.isTemplateLiteral(path.node.right) && t45.isExpression(path.node.left)) {
|
|
4624
4546
|
unshift(path.node.right, path.node.left);
|
|
4625
4547
|
path.replaceWith(path.node.right);
|
|
4626
4548
|
this.changes++;
|
|
@@ -4630,7 +4552,7 @@ var template_literals_default = {
|
|
|
4630
4552
|
CallExpression: {
|
|
4631
4553
|
exit(path) {
|
|
4632
4554
|
if (concatMatcher.match(path.node)) {
|
|
4633
|
-
const template9 =
|
|
4555
|
+
const template9 = t45.templateLiteral([t45.templateElement({ raw: "" })], []);
|
|
4634
4556
|
push(template9, string.current);
|
|
4635
4557
|
for (const arg of path.node.arguments) {
|
|
4636
4558
|
push(template9, arg);
|
|
@@ -4652,7 +4574,7 @@ var transpile_default = mergeTransforms({
|
|
|
4652
4574
|
|
|
4653
4575
|
// transform/delance/stringaes.ts
|
|
4654
4576
|
import traverse14 from "@babel/traverse";
|
|
4655
|
-
import * as
|
|
4577
|
+
import * as t46 from "@babel/types";
|
|
4656
4578
|
|
|
4657
4579
|
// utils/crypto.ts
|
|
4658
4580
|
import crypto from "node:crypto";
|
|
@@ -4755,7 +4677,7 @@ var stringaes_default = {
|
|
|
4755
4677
|
$id.assertIdentifier();
|
|
4756
4678
|
const $string = $.get("arguments")[0];
|
|
4757
4679
|
$string.assertStringLiteral();
|
|
4758
|
-
$.replaceWith(
|
|
4680
|
+
$.replaceWith(t46.stringLiteral(decrypt($string.node.value)));
|
|
4759
4681
|
this.changes++;
|
|
4760
4682
|
}
|
|
4761
4683
|
}
|
|
@@ -4764,7 +4686,7 @@ var stringaes_default = {
|
|
|
4764
4686
|
};
|
|
4765
4687
|
|
|
4766
4688
|
// transform/delance/antifeature.ts
|
|
4767
|
-
import * as
|
|
4689
|
+
import * as t47 from "@babel/types";
|
|
4768
4690
|
import tmpl6 from "@babel/template";
|
|
4769
4691
|
var entry = capture(numericLiteral());
|
|
4770
4692
|
var requireEntry = callExpression(identifier("require"), [entry]);
|
|
@@ -4799,7 +4721,7 @@ var antifeature_default = {
|
|
|
4799
4721
|
}
|
|
4800
4722
|
});
|
|
4801
4723
|
}
|
|
4802
|
-
|
|
4724
|
+
t47.assertNumericLiteral(entry.current);
|
|
4803
4725
|
const _target = $.find((p2) => chunk_default.match(p2.node));
|
|
4804
4726
|
if (!_target) {
|
|
4805
4727
|
throw new Error("Could not find module chunk");
|