Update Files
This commit is contained in:
456
lib/leenkx_tools/uglifyjs/tools/domprops.html
Normal file
456
lib/leenkx_tools/uglifyjs/tools/domprops.html
Normal file
@ -0,0 +1,456 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<script>
|
||||
!function(G) {
|
||||
var domprops = [];
|
||||
var objs = [ G ];
|
||||
var tagNames = [
|
||||
"a",
|
||||
"abbr",
|
||||
"acronym",
|
||||
"address",
|
||||
"applet",
|
||||
"area",
|
||||
"article",
|
||||
"aside",
|
||||
"audio",
|
||||
"b",
|
||||
"base",
|
||||
"basefont",
|
||||
"bdi",
|
||||
"bdo",
|
||||
"bgsound",
|
||||
"big",
|
||||
"blink",
|
||||
"blockquote",
|
||||
"body",
|
||||
"br",
|
||||
"button",
|
||||
"canvas",
|
||||
"caption",
|
||||
"center",
|
||||
"checked",
|
||||
"cite",
|
||||
"code",
|
||||
"col",
|
||||
"colgroup",
|
||||
"command",
|
||||
"comment",
|
||||
"compact",
|
||||
"content",
|
||||
"data",
|
||||
"datalist",
|
||||
"dd",
|
||||
"declare",
|
||||
"defer",
|
||||
"del",
|
||||
"details",
|
||||
"dfn",
|
||||
"dialog",
|
||||
"dir",
|
||||
"disabled",
|
||||
"div",
|
||||
"dl",
|
||||
"dt",
|
||||
"element",
|
||||
"em",
|
||||
"embed",
|
||||
"fieldset",
|
||||
"figcaption",
|
||||
"figure",
|
||||
"font",
|
||||
"footer",
|
||||
"form",
|
||||
"frame",
|
||||
"frameset",
|
||||
"h1",
|
||||
"h2",
|
||||
"h3",
|
||||
"h4",
|
||||
"h5",
|
||||
"h6",
|
||||
"head",
|
||||
"header",
|
||||
"hgroup",
|
||||
"hr",
|
||||
"html",
|
||||
"i",
|
||||
"iframe",
|
||||
"image",
|
||||
"img",
|
||||
"input",
|
||||
"ins",
|
||||
"isindex",
|
||||
"ismap",
|
||||
"kbd",
|
||||
"keygen",
|
||||
"label",
|
||||
"legend",
|
||||
"li",
|
||||
"link",
|
||||
"listing",
|
||||
"main",
|
||||
"map",
|
||||
"mark",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menuitem",
|
||||
"meta",
|
||||
"meter",
|
||||
"multicol",
|
||||
"multiple",
|
||||
"nav",
|
||||
"nextid",
|
||||
"nobr",
|
||||
"noembed",
|
||||
"noframes",
|
||||
"nohref",
|
||||
"noresize",
|
||||
"noscript",
|
||||
"noshade",
|
||||
"nowrap",
|
||||
"object",
|
||||
"ol",
|
||||
"optgroup",
|
||||
"option",
|
||||
"output",
|
||||
"p",
|
||||
"param",
|
||||
"picture",
|
||||
"plaintext",
|
||||
"pre",
|
||||
"progress",
|
||||
"q",
|
||||
"rb",
|
||||
"readonly",
|
||||
"rp",
|
||||
"rt",
|
||||
"rtc",
|
||||
"ruby",
|
||||
"s",
|
||||
"samp",
|
||||
"script",
|
||||
"section",
|
||||
"select",
|
||||
"selected",
|
||||
"shadow",
|
||||
"slot",
|
||||
"small",
|
||||
"source",
|
||||
"spacer",
|
||||
"span",
|
||||
"strike",
|
||||
"strong",
|
||||
"style",
|
||||
"sub",
|
||||
"summary",
|
||||
"sup",
|
||||
"svg",
|
||||
"table",
|
||||
"tbody",
|
||||
"td",
|
||||
"template",
|
||||
"textarea",
|
||||
"tfoot",
|
||||
"th",
|
||||
"thead",
|
||||
"time",
|
||||
"title",
|
||||
"tr",
|
||||
"track",
|
||||
"tt",
|
||||
"u",
|
||||
"ul",
|
||||
"var",
|
||||
"video",
|
||||
"wbr",
|
||||
"xmp",
|
||||
"XXX",
|
||||
];
|
||||
for (var n = 0; n < tagNames.length; n++) {
|
||||
add(document.createElement(tagNames[n]));
|
||||
}
|
||||
var nsNames = {
|
||||
"http://www.w3.org/1998/Math/MathML": [
|
||||
"annotation",
|
||||
"annotation-xml",
|
||||
"maction",
|
||||
"maligngroup",
|
||||
"malignmark",
|
||||
"math",
|
||||
"menclose",
|
||||
"merror",
|
||||
"mfenced",
|
||||
"mfrac",
|
||||
"mglyph",
|
||||
"mi",
|
||||
"mlabeledtr",
|
||||
"mlongdiv",
|
||||
"mmultiscripts",
|
||||
"mn",
|
||||
"mo",
|
||||
"mover",
|
||||
"mpadded",
|
||||
"mphantom",
|
||||
"mprescripts",
|
||||
"mroot",
|
||||
"mrow",
|
||||
"ms",
|
||||
"mscarries",
|
||||
"mscarry",
|
||||
"msgroup",
|
||||
"msline",
|
||||
"mspace",
|
||||
"msqrt",
|
||||
"msrow",
|
||||
"mstack",
|
||||
"mstyle",
|
||||
"msub",
|
||||
"msubsup",
|
||||
"msup",
|
||||
"mtable",
|
||||
"mtd",
|
||||
"mtext",
|
||||
"mtr",
|
||||
"munder",
|
||||
"munderover",
|
||||
"none",
|
||||
"semantics",
|
||||
],
|
||||
"http://www.w3.org/2000/svg": [
|
||||
"a",
|
||||
"altGlyph",
|
||||
"altGlyphDef",
|
||||
"altGlyphItem",
|
||||
"animate",
|
||||
"animateColor",
|
||||
"animateMotion",
|
||||
"animateTransform",
|
||||
"circle",
|
||||
"clipPath",
|
||||
"color-profile",
|
||||
"cursor",
|
||||
"defs",
|
||||
"desc",
|
||||
"discard",
|
||||
"ellipse",
|
||||
"feBlend",
|
||||
"feColorMatrix",
|
||||
"feComponentTransfer",
|
||||
"feComposite",
|
||||
"feConvolveMatrix",
|
||||
"feDiffuseLighting",
|
||||
"feDisplacementMap",
|
||||
"feDistantLight",
|
||||
"feDropShadow",
|
||||
"feFlood",
|
||||
"feFuncA",
|
||||
"feFuncB",
|
||||
"feFuncG",
|
||||
"feFuncR",
|
||||
"feGaussianBlur",
|
||||
"feImage",
|
||||
"feMerge",
|
||||
"feMergeNode",
|
||||
"feMorphology",
|
||||
"feOffset",
|
||||
"fePointLight",
|
||||
"feSpecularLighting",
|
||||
"feSpotLight",
|
||||
"feTile",
|
||||
"feTurbulence",
|
||||
"filter",
|
||||
"font",
|
||||
"font-face",
|
||||
"font-face-format",
|
||||
"font-face-name",
|
||||
"font-face-src",
|
||||
"font-face-uri",
|
||||
"foreignObject",
|
||||
"g",
|
||||
"glyph",
|
||||
"glyphRef",
|
||||
"hatch",
|
||||
"hatchpath",
|
||||
"hkern",
|
||||
"image",
|
||||
"line",
|
||||
"linearGradient",
|
||||
"marker",
|
||||
"mask",
|
||||
"mesh",
|
||||
"meshgradient",
|
||||
"meshpatch",
|
||||
"meshrow",
|
||||
"metadata",
|
||||
"missing-glyph",
|
||||
"mpath",
|
||||
"path",
|
||||
"pattern",
|
||||
"polygon",
|
||||
"polyline",
|
||||
"radialGradient",
|
||||
"rect",
|
||||
"script",
|
||||
"set",
|
||||
"solidcolor",
|
||||
"stop",
|
||||
"style",
|
||||
"svg",
|
||||
"switch",
|
||||
"symbol",
|
||||
"text",
|
||||
"textPath",
|
||||
"title",
|
||||
"tref",
|
||||
"tspan",
|
||||
"unknown",
|
||||
"use",
|
||||
"view",
|
||||
"vkern",
|
||||
],
|
||||
};
|
||||
if (document.createElementNS) for (var ns in nsNames) {
|
||||
for (var n = 0; n < nsNames[ns].length; n++) {
|
||||
add(document.createElementNS(ns, nsNames[ns][n]));
|
||||
}
|
||||
}
|
||||
var skips = [
|
||||
G.alert,
|
||||
G.back,
|
||||
G.blur,
|
||||
G.captureEvents,
|
||||
G.clearImmediate,
|
||||
G.clearInterval,
|
||||
G.clearTimeout,
|
||||
G.close,
|
||||
G.confirm,
|
||||
G.console,
|
||||
G.dump,
|
||||
G.fetch,
|
||||
G.find,
|
||||
G.focus,
|
||||
G.forward,
|
||||
G.getAttention,
|
||||
G.history,
|
||||
G.home,
|
||||
G.location,
|
||||
G.moveBy,
|
||||
G.moveTo,
|
||||
G.navigator,
|
||||
G.open,
|
||||
G.openDialog,
|
||||
G.print,
|
||||
G.process,
|
||||
G.prompt,
|
||||
G.resizeBy,
|
||||
G.resizeTo,
|
||||
G.setImmediate,
|
||||
G.setInterval,
|
||||
G.setTimeout,
|
||||
G.showModalDialog,
|
||||
G.sizeToContent,
|
||||
G.stop,
|
||||
];
|
||||
var types = [];
|
||||
var interfaces = [
|
||||
"beforeunloadevent",
|
||||
"compositionevent",
|
||||
"customevent",
|
||||
"devicemotionevent",
|
||||
"deviceorientationevent",
|
||||
"dragevent",
|
||||
"event",
|
||||
"events",
|
||||
"focusevent",
|
||||
"hashchangeevent",
|
||||
"htmlevents",
|
||||
"keyboardevent",
|
||||
"messageevent",
|
||||
"mouseevent",
|
||||
"mouseevents",
|
||||
"storageevent",
|
||||
"svgevents",
|
||||
"textevent",
|
||||
"touchevent",
|
||||
"uievent",
|
||||
"uievents",
|
||||
];
|
||||
var i = 0, full = false;
|
||||
var addEvent = document.createEvent ? function(type) {
|
||||
if (~indexOf(types, type)) return;
|
||||
types.push(type);
|
||||
for (var j = 0; j < interfaces.length; j++) try {
|
||||
var event = document.createEvent(interfaces[j]);
|
||||
event.initEvent(type, true, true);
|
||||
add(event);
|
||||
} catch (e) {}
|
||||
} : function() {};
|
||||
var scanProperties = Object.getOwnPropertyNames ? function(o, fn) {
|
||||
var names = Object.getOwnPropertyNames(o);
|
||||
names.forEach(fn);
|
||||
for (var k in o) if (!~indexOf(names, k)) fn(k);
|
||||
} : function(o, fn) {
|
||||
for (var k in o) fn(k);
|
||||
};
|
||||
setTimeout(function next() {
|
||||
for (var j = 10; --j >= 0 && i < objs.length; i++) {
|
||||
var o = objs[i];
|
||||
var skip = ~indexOf(skips, o);
|
||||
try {
|
||||
scanProperties(o, function(k) {
|
||||
if (!~indexOf(domprops, k)) domprops.push(k);
|
||||
if (/^on/.test(k)) addEvent(k.slice(2));
|
||||
if (!full) try {
|
||||
add(o[k]);
|
||||
} catch (e) {}
|
||||
});
|
||||
} catch (e) {}
|
||||
if (skip || full) continue;
|
||||
try {
|
||||
add(o.__proto__);
|
||||
} catch (e) {}
|
||||
try {
|
||||
add(o.prototype);
|
||||
} catch (e) {}
|
||||
try {
|
||||
add(new o());
|
||||
} catch (e) {}
|
||||
try {
|
||||
add(o());
|
||||
} catch (e) {}
|
||||
}
|
||||
if (!full && objs.length > 20000) {
|
||||
alert(objs.length);
|
||||
full = true;
|
||||
}
|
||||
if (i < objs.length) {
|
||||
setTimeout(next, 0);
|
||||
} else {
|
||||
document.write('<pre>[\n "' + domprops.sort().join('",\n "').replace(/&/g, "&").replace(/</g, "<") + '"\n]</pre>');
|
||||
}
|
||||
}, 0);
|
||||
|
||||
function add(o) {
|
||||
if (o) switch (typeof o) {
|
||||
case "function":
|
||||
case "object":
|
||||
if (!~indexOf(objs, o)) objs.push(o);
|
||||
}
|
||||
}
|
||||
|
||||
function indexOf(list, value) {
|
||||
var j = list.length;
|
||||
while (--j >= 0) {
|
||||
if (list[j] === value) break;
|
||||
}
|
||||
return j;
|
||||
}
|
||||
}(function() {
|
||||
return this;
|
||||
}());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
8325
lib/leenkx_tools/uglifyjs/tools/domprops.json
Normal file
8325
lib/leenkx_tools/uglifyjs/tools/domprops.json
Normal file
File diff suppressed because it is too large
Load Diff
8
lib/leenkx_tools/uglifyjs/tools/exports.js
Normal file
8
lib/leenkx_tools/uglifyjs/tools/exports.js
Normal file
@ -0,0 +1,8 @@
|
||||
exports["Dictionary"] = Dictionary;
|
||||
exports["is_statement"] = is_statement;
|
||||
exports["List"] = List;
|
||||
exports["minify"] = minify;
|
||||
exports["parse"] = parse;
|
||||
exports["push_uniq"] = push_uniq;
|
||||
exports["TreeTransformer"] = TreeTransformer;
|
||||
exports["TreeWalker"] = TreeWalker;
|
110
lib/leenkx_tools/uglifyjs/tools/node.js
Normal file
110
lib/leenkx_tools/uglifyjs/tools/node.js
Normal file
@ -0,0 +1,110 @@
|
||||
var fs = require("fs");
|
||||
|
||||
exports.FILES = [
|
||||
require.resolve("../lib/utils.js"),
|
||||
require.resolve("../lib/ast.js"),
|
||||
require.resolve("../lib/transform.js"),
|
||||
require.resolve("../lib/parse.js"),
|
||||
require.resolve("../lib/scope.js"),
|
||||
require.resolve("../lib/compress.js"),
|
||||
require.resolve("../lib/output.js"),
|
||||
require.resolve("../lib/sourcemap.js"),
|
||||
require.resolve("../lib/mozilla-ast.js"),
|
||||
require.resolve("../lib/propmangle.js"),
|
||||
require.resolve("../lib/minify.js"),
|
||||
require.resolve("./exports.js"),
|
||||
];
|
||||
|
||||
new Function("exports", function() {
|
||||
var code = exports.FILES.map(function(file) {
|
||||
return fs.readFileSync(file, "utf8");
|
||||
});
|
||||
code.push("exports.describe_ast = " + describe_ast.toString());
|
||||
return code.join("\n\n");
|
||||
}())(exports);
|
||||
|
||||
function to_comment(value) {
|
||||
if (typeof value != "string") value = JSON.stringify(value, function(key, value) {
|
||||
return typeof value == "function" ? "<[ " + value + " ]>" : value;
|
||||
}, 2);
|
||||
return "// " + value.replace(/\n/g, "\n// ");
|
||||
}
|
||||
|
||||
if (+process.env["UGLIFY_BUG_REPORT"]) exports.minify = function(files, options) {
|
||||
if (typeof options == "undefined") options = "<<undefined>>";
|
||||
var code = [
|
||||
"// UGLIFY_BUG_REPORT",
|
||||
to_comment(options),
|
||||
];
|
||||
if (typeof files == "string") {
|
||||
code.push("");
|
||||
code.push("//-------------------------------------------------------------")
|
||||
code.push("// INPUT CODE", files);
|
||||
} else for (var name in files) {
|
||||
code.push("");
|
||||
code.push("//-------------------------------------------------------------")
|
||||
code.push(to_comment(name), files[name]);
|
||||
}
|
||||
if (options.sourceMap && options.sourceMap.url) {
|
||||
code.push("");
|
||||
code.push("//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9");
|
||||
}
|
||||
var result = { code: code.join("\n") };
|
||||
if (options.sourceMap) result.map = '{"version":3,"sources":[],"names":[],"mappings":""}';
|
||||
return result;
|
||||
};
|
||||
|
||||
function describe_ast() {
|
||||
var out = OutputStream({ beautify: true });
|
||||
doitem(AST_Node);
|
||||
return out.get() + "\n";
|
||||
|
||||
function doitem(ctor) {
|
||||
out.print("AST_" + ctor.TYPE);
|
||||
var props = ctor.SELF_PROPS.filter(function(prop) {
|
||||
return !/^\$/.test(prop);
|
||||
});
|
||||
if (props.length > 0) {
|
||||
out.space();
|
||||
out.with_parens(function() {
|
||||
props.forEach(function(prop, i) {
|
||||
if (i) out.space();
|
||||
out.print(prop);
|
||||
});
|
||||
});
|
||||
}
|
||||
if (ctor.documentation) {
|
||||
out.space();
|
||||
out.print_string(ctor.documentation);
|
||||
}
|
||||
if (ctor.SUBCLASSES.length > 0) {
|
||||
out.space();
|
||||
out.with_block(function() {
|
||||
ctor.SUBCLASSES.sort(function(a, b) {
|
||||
return a.TYPE < b.TYPE ? -1 : 1;
|
||||
}).forEach(function(ctor, i) {
|
||||
out.indent();
|
||||
doitem(ctor);
|
||||
out.newline();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function infer_options(options) {
|
||||
var result = exports.minify("", options);
|
||||
return result.error && result.error.defs;
|
||||
}
|
||||
|
||||
exports.default_options = function() {
|
||||
var defs = infer_options({ 0: 0 });
|
||||
Object.keys(defs).forEach(function(component) {
|
||||
var options = {};
|
||||
options[component] = { 0: 0 };
|
||||
if (options = infer_options(options)) {
|
||||
defs[component] = options;
|
||||
}
|
||||
});
|
||||
return defs;
|
||||
};
|
22
lib/leenkx_tools/uglifyjs/tools/tty.js
Normal file
22
lib/leenkx_tools/uglifyjs/tools/tty.js
Normal file
@ -0,0 +1,22 @@
|
||||
// workaround for tty output truncation on Node.js
|
||||
try {
|
||||
// prevent buffer overflow and other asynchronous bugs
|
||||
process.stdout._handle.setBlocking(true);
|
||||
process.stderr._handle.setBlocking(true);
|
||||
} catch (e) {
|
||||
// ensure output buffers are flushed before process termination
|
||||
var exit = process.exit;
|
||||
process.exit = function() {
|
||||
var args = [].slice.call(arguments);
|
||||
process.once("uncaughtException", function() {
|
||||
(function callback() {
|
||||
if (process.stdout.bufferSize || process.stderr.bufferSize) {
|
||||
setTimeout(callback, 1);
|
||||
} else {
|
||||
exit.apply(process, args);
|
||||
}
|
||||
})();
|
||||
});
|
||||
throw exit;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user