{"mappings":"AA8BA,gCAAgC,OAAO,OAAO,MAAM,CAAC","sources":["src/src/index.ts","src/index.ts"],"sourcesContent":[null,"// Patch Worker to allow loading scripts from remote URLs\n// \n// It's a workaround for the fact that the Worker constructor\n// accepts only local URLs, not remote URLs:\n// https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker \n//\n// As a workaround this patched Worker constructor will\n// use `importScripts` to load the remote script.\n// https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts\n//\n// Compatibility: Chrome 4+, Firefox 4+, Safari 4+\n//\n// Usage:\n// ```ts\n// import \"remote-web-worker\";\n// ```\ntypeof window !== \"undefined\" && (\n    window.Worker = ((BaseWorker: typeof window.Worker) =>\n        class Worker extends BaseWorker {\n            constructor(scriptURL: string | URL, options?: WorkerOptions) {\n                if (/^(http|\\/\\/)/.test(String(scriptURL))) {\n                    super(URL.createObjectURL(new Blob([`importScripts( \"${scriptURL}\" );`], { type: \"text/javascript\" })));\n                } else {\n                    super(scriptURL, options);\n                }\n            }\n        }\n    )(window.Worker)\n);\n\nexport type WorkerConstructor = typeof window.Worker;"],"names":[],"version":3,"file":"types.d.ts.map"}