First, I've just used a makeshift regex in a sublime plugin to split by functions. Split after and until the next match or file end:
Python:
r"function\(e\, t\, o\) \{\s+\"use strict\"\;\s+function n\(e\, t\) \{\s+return Object\.freeze\(Object\.defineProperties\(e\, \{\s+raw\: \{\s+value\: Object\.freeze\(t\)\s+\}\s+\}\)\)\s+\}"
Afterwards I cleaned the file by using a JSFormatter plugin and further regex operations.
Nowadays, I just use the npm package
You must be registered to see the links
which does pretty much the same, just a bit more straight forward:
Bash:
retidy -i .\main.js -t webpack-jsonp -o .\test
You can remove the duplicate paragraphs of text (or at least most of them) by another makeshift regex, something like this:
JavaScript:
(?<![\[\n])(\[\n+.*?\n\]\,)(?=\s+\[)\s+\[\n+.*?\n\]\)
Find and replace the above with the first capture group ($1). (.) matches newline flag required.
The end result still needs quite a bit of work, but I'm not knowledgeable or motivated enough to improve it further for a game that is ultimately still pretty bare-bones. The developers evidently don't appreciate their player base judging by their needless obfuscation and the complete lack of transparency afforded to the wiki, save editors, mods or just any interested individual.