add worker

This commit is contained in:
Harvey Zack committed 2022-05-01 22:45:24 +08:00
1 parent 09d1c2ed08
commit 5ff4a8f70b
6 files changed
+64 -31

No files matched your search

@@ -0,0 +1 @@
data:application/javascript,%2F%2F%20modules%20are%20defined%20as%20an%20array%0A%2F%2F%20%5B%20module%20function%2C%20map%20of%20requires%20%5D%0A%2F%2F%0A%2F%2F%20map%20of%20requires%20is%20short%20require%20name%20-%3E%20numeric%20require%0A%2F%2F%0A%2F%2F%20anything%20defined%20in%20a%20previous%20bundle%20is%20accessed%20via%20the%0A%2F%2F%20orig%20method%20which%20is%20the%20require%20for%20previous%20bundles%0A%0A%28function%20%28modules%2C%20entry%2C%20mainEntry%2C%20parcelRequireName%2C%20globalName%29%20%7B%0A%20%20%2F%2a%20eslint-disable%20no-undef%20%2a%2F%0A%20%20var%20globalObject%20%3D%0A%20%20%20%20typeof%20globalThis%20%21%3D%3D%20%27undefined%27%0A%20%20%20%20%20%20%3F%20globalThis%0A%20%20%20%20%20%20%3A%20typeof%20self%20%21%3D%3D%20%27undefined%27%0A%20%20%20%20%20%20%3F%20self%0A%20%20%20%20%20%20%3A%20typeof%20window%20%21%3D%3D%20%27undefined%27%0A%20%20%20%20%20%20%3F%20window%0A%20%20%20%20%20%20%3A%20typeof%20global%20%21%3D%3D%20%27undefined%27%0A%20%20%20%20%20%20%3F%20global%0A%20%20%20%20%20%20%3A%20%7B%7D%3B%0A%20%20%2F%2a%20eslint-enable%20no-undef%20%2a%2F%0A%0A%20%20%2F%2F%20Save%20the%20require%20from%20previous%20bundle%20to%20this%20closure%20if%20any%0A%20%20var%20previousRequire%20%3D%0A%20%20%20%20typeof%20globalObject%5BparcelRequireName%5D%20%3D%3D%3D%20%27function%27%20%26%26%0A%20%20%20%20globalObject%5BparcelRequireName%5D%3B%0A%0A%20%20var%20cache%20%3D%20previousRequire.cache%20%7C%7C%20%7B%7D%3B%0A%20%20%2F%2F%20Do%20not%20use%20%60require%60%20to%20prevent%20Webpack%20from%20trying%20to%20bundle%20this%20call%0A%20%20var%20nodeRequire%20%3D%0A%20%20%20%20typeof%20module%20%21%3D%3D%20%27undefined%27%20%26%26%0A%20%20%20%20typeof%20module.require%20%3D%3D%3D%20%27function%27%20%26%26%0A%20%20%20%20module.require.bind%28module%29%3B%0A%0A%20%20function%20newRequire%28name%2C%20jumped%29%20%7B%0A%20%20%20%20if%20%28%21cache%5Bname%5D%29%20%7B%0A%20%20%20%20%20%20if%20%28%21modules%5Bname%5D%29%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20if%20we%20cannot%20find%20the%20module%20within%20our%20internal%20map%20or%0A%20%20%20%20%20%20%20%20%2F%2F%20cache%20jump%20to%20the%20current%20global%20require%20ie.%20the%20last%20bundle%0A%20%20%20%20%20%20%20%20%2F%2F%20that%20was%20added%20to%20the%20page.%0A%20%20%20%20%20%20%20%20var%20currentRequire%20%3D%0A%20%20%20%20%20%20%20%20%20%20typeof%20globalObject%5BparcelRequireName%5D%20%3D%3D%3D%20%27function%27%20%26%26%0A%20%20%20%20%20%20%20%20%20%20globalObject%5BparcelRequireName%5D%3B%0A%20%20%20%20%20%20%20%20if%20%28%21jumped%20%26%26%20currentRequire%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20currentRequire%28name%2C%20true%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20If%20there%20are%20other%20bundles%20on%20this%20page%20the%20require%20from%20the%0A%20%20%20%20%20%20%20%20%2F%2F%20previous%20one%20is%20saved%20to%20%27previousRequire%27.%20Repeat%20this%20as%0A%20%20%20%20%20%20%20%20%2F%2F%20many%20times%20as%20there%20are%20bundles%20until%20the%20module%20is%20found%20or%0A%20%20%20%20%20%20%20%20%2F%2F%20we%20exhaust%20the%20require%20chain.%0A%20%20%20%20%20%20%20%20if%20%28previousRequire%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20previousRequire%28name%2C%20true%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Try%20the%20node%20require%20function%20if%20it%20exists.%0A%20%20%20%20%20%20%20%20if%20%28nodeRequire%20%26%26%20typeof%20name%20%3D%3D%3D%20%27string%27%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20nodeRequire%28name%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20var%20err%20%3D%20new%20Error%28%22Cannot%20find%20module%20%27%22%20%2B%20name%20%2B%20%22%27%22%29%3B%0A%20%20%20%20%20%20%20%20err.code%20%3D%20%27MODULE_NOT_FOUND%27%3B%0A%20%20%20%20%20%20%20%20throw%20err%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20localRequire.resolve%20%3D%20resolve%3B%0A%20%20%20%20%20%20localRequire.cache%20%3D%20%7B%7D%3B%0A%0A%20%20%20%20%20%20var%20module%20%3D%20%28cache%5Bname%5D%20%3D%20new%20newRequire.Module%28name%29%29%3B%0A%0A%20%20%20%20%20%20modules%5Bname%5D%5B0%5D.call%28%0A%20%20%20%20%20%20%20%20module.exports%2C%0A%20%20%20%20%20%20%20%20localRequire%2C%0A%20%20%20%20%20%20%20%20module%2C%0A%20%20%20%20%20%20%20%20module.exports%2C%0A%20%20%20%20%20%20%20%20this%0A%20%20%20%20%20%20%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20cache%5Bname%5D.exports%3B%0A%0A%20%20%20%20function%20localRequire%28x%29%20%7B%0A%20%20%20%20%20%20var%20res%20%3D%20localRequire.resolve%28x%29%3B%0A%20%20%20%20%20%20return%20res%20%3D%3D%3D%20false%20%3F%20%7B%7D%20%3A%20newRequire%28res%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20function%20resolve%28x%29%20%7B%0A%20%20%20%20%20%20var%20id%20%3D%20modules%5Bname%5D%5B1%5D%5Bx%5D%3B%0A%20%20%20%20%20%20return%20id%20%21%3D%20null%20%3F%20id%20%3A%20x%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20function%20Module%28moduleName%29%20%7B%0A%20%20%20%20this.id%20%3D%20modulLine truncated