@loaders.gl/core 3.1.0-alpha.1 → 3.1.0-alpha.5
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/dist.min.js +1 -1
- package/dist/dist.min.js.map +1 -1
- package/dist/es5/bundle.js +7 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/{core-addons → es5/core-addons}/README.md +0 -0
- package/dist/es5/core-addons/write-file-browser.js +2 -0
- package/dist/{core-addons → es5/core-addons}/write-file-browser.js.map +0 -0
- package/dist/es5/index.js +390 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/iterators/batch-iterators/timed-batch-iterator.js +26 -0
- package/dist/es5/iterators/batch-iterators/timed-batch-iterator.js.map +1 -0
- package/dist/es5/iterators/make-iterator/make-array-buffer-iterator.js +25 -0
- package/dist/es5/iterators/make-iterator/make-array-buffer-iterator.js.map +1 -0
- package/dist/es5/iterators/make-iterator/make-blob-iterator.js +20 -0
- package/dist/es5/iterators/make-iterator/make-blob-iterator.js.map +1 -0
- package/dist/es5/iterators/make-iterator/make-iterator.js +42 -0
- package/dist/es5/iterators/make-iterator/make-iterator.js.map +1 -0
- package/dist/es5/iterators/make-iterator/make-stream-iterator.js +47 -0
- package/dist/es5/iterators/make-iterator/make-stream-iterator.js.map +1 -0
- package/dist/es5/iterators/make-iterator/make-string-iterator.js +21 -0
- package/dist/es5/iterators/make-iterator/make-string-iterator.js.map +1 -0
- package/dist/es5/iterators/make-stream/make-dom-stream.js +41 -0
- package/dist/es5/iterators/make-stream/make-dom-stream.js.map +1 -0
- package/dist/es5/iterators/make-stream/make-node-stream.js +84 -0
- package/dist/es5/iterators/make-stream/make-node-stream.js.map +1 -0
- package/dist/es5/iterators/make-stream/make-stream.js +19 -0
- package/dist/es5/iterators/make-stream/make-stream.js.map +1 -0
- package/dist/es5/javascript-utils/is-type.js +75 -0
- package/dist/es5/javascript-utils/is-type.js.map +1 -0
- package/dist/es5/lib/api/encode.js +108 -0
- package/dist/es5/lib/api/encode.js.map +1 -0
- package/dist/es5/lib/api/load-in-batches.js +40 -0
- package/dist/es5/lib/api/load-in-batches.js.map +1 -0
- package/dist/es5/lib/api/load.js +36 -0
- package/dist/es5/lib/api/load.js.map +1 -0
- package/dist/es5/lib/api/parse-in-batches.js +114 -0
- package/dist/es5/lib/api/parse-in-batches.js.map +1 -0
- package/dist/es5/lib/api/parse-sync.js +71 -0
- package/dist/es5/lib/api/parse-sync.js.map +1 -0
- package/dist/es5/lib/api/parse.js +79 -0
- package/dist/es5/lib/api/parse.js.map +1 -0
- package/dist/es5/lib/api/register-loaders.js +41 -0
- package/dist/es5/lib/api/register-loaders.js.map +1 -0
- package/dist/es5/lib/api/save.js +22 -0
- package/dist/es5/lib/api/save.js.map +1 -0
- package/dist/es5/lib/api/select-loader.js +243 -0
- package/dist/es5/lib/api/select-loader.js.map +1 -0
- package/dist/es5/lib/api/set-loader-options.js +13 -0
- package/dist/es5/lib/api/set-loader-options.js.map +1 -0
- package/dist/es5/lib/common.js +2 -0
- package/dist/{lib → es5/lib}/common.js.map +0 -0
- package/dist/es5/lib/fetch/fetch-error-message.js +30 -0
- package/dist/es5/lib/fetch/fetch-error-message.js.map +1 -0
- package/dist/es5/lib/fetch/fetch-file.js +26 -0
- package/dist/es5/lib/fetch/fetch-file.js.map +1 -0
- package/dist/es5/lib/fetch/read-array-buffer.js +39 -0
- package/dist/es5/lib/fetch/read-array-buffer.js.map +1 -0
- package/dist/es5/lib/fetch/read-file.js +25 -0
- package/dist/es5/lib/fetch/read-file.js.map +1 -0
- package/dist/es5/lib/fetch/write-file.js +34 -0
- package/dist/es5/lib/fetch/write-file.js.map +1 -0
- package/dist/es5/lib/filesystems/browser-filesystem.js +123 -0
- package/dist/es5/lib/filesystems/browser-filesystem.js.map +1 -0
- package/dist/es5/lib/filesystems/filesystem.js +2 -0
- package/dist/{lib → es5/lib}/filesystems/filesystem.js.map +0 -0
- package/dist/es5/lib/filesystems/read-array-buffer.js +16 -0
- package/dist/es5/lib/filesystems/read-array-buffer.js.map +1 -0
- package/dist/es5/lib/init.js +13 -0
- package/dist/es5/lib/init.js.map +1 -0
- package/dist/es5/lib/loader-utils/check-errors.js +35 -0
- package/dist/es5/lib/loader-utils/check-errors.js.map +1 -0
- package/dist/es5/lib/loader-utils/get-data.js +147 -0
- package/dist/es5/lib/loader-utils/get-data.js.map +1 -0
- package/dist/es5/lib/loader-utils/loader-context.js +46 -0
- package/dist/es5/lib/loader-utils/loader-context.js.map +1 -0
- package/dist/es5/lib/loader-utils/loggers.js +65 -0
- package/dist/es5/lib/loader-utils/loggers.js.map +1 -0
- package/dist/es5/lib/loader-utils/normalize-loader.js +53 -0
- package/dist/es5/lib/loader-utils/normalize-loader.js.map +1 -0
- package/dist/es5/lib/loader-utils/option-defaults.js +47 -0
- package/dist/es5/lib/loader-utils/option-defaults.js.map +1 -0
- package/dist/es5/lib/loader-utils/option-utils.js +157 -0
- package/dist/es5/lib/loader-utils/option-utils.js.map +1 -0
- package/dist/es5/lib/progress/fetch-progress.js +68 -0
- package/dist/es5/lib/progress/fetch-progress.js.map +1 -0
- package/dist/es5/lib/utils/mime-type-utils.js +30 -0
- package/dist/es5/lib/utils/mime-type-utils.js.map +1 -0
- package/dist/es5/lib/utils/resource-utils.js +72 -0
- package/dist/es5/lib/utils/resource-utils.js.map +1 -0
- package/dist/es5/lib/utils/response-utils.js +128 -0
- package/dist/es5/lib/utils/response-utils.js.map +1 -0
- package/dist/es5/null-loader.js +42 -0
- package/dist/{null-loader.js.map → es5/null-loader.js.map} +1 -1
- package/dist/es5/workers/null-worker.js +8 -0
- package/dist/es5/workers/null-worker.js.map +1 -0
- package/dist/esm/bundle.js +5 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/core-addons/README.md +1 -0
- package/dist/{core-addons → esm/core-addons}/write-file-browser.js +0 -0
- package/dist/esm/core-addons/write-file-browser.js.map +1 -0
- package/dist/{index.js → esm/index.js} +0 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/{iterators → esm/iterators}/batch-iterators/timed-batch-iterator.js +0 -0
- package/dist/esm/iterators/batch-iterators/timed-batch-iterator.js.map +1 -0
- package/dist/{iterators → esm/iterators}/make-iterator/make-array-buffer-iterator.js +0 -0
- package/dist/esm/iterators/make-iterator/make-array-buffer-iterator.js.map +1 -0
- package/dist/{iterators → esm/iterators}/make-iterator/make-blob-iterator.js +0 -0
- package/dist/esm/iterators/make-iterator/make-blob-iterator.js.map +1 -0
- package/dist/{iterators → esm/iterators}/make-iterator/make-iterator.js +0 -0
- package/dist/esm/iterators/make-iterator/make-iterator.js.map +1 -0
- package/dist/{iterators → esm/iterators}/make-iterator/make-stream-iterator.js +0 -0
- package/dist/esm/iterators/make-iterator/make-stream-iterator.js.map +1 -0
- package/dist/{iterators → esm/iterators}/make-iterator/make-string-iterator.js +0 -0
- package/dist/esm/iterators/make-iterator/make-string-iterator.js.map +1 -0
- package/dist/{iterators → esm/iterators}/make-stream/make-dom-stream.js +0 -0
- package/dist/esm/iterators/make-stream/make-dom-stream.js.map +1 -0
- package/dist/{iterators → esm/iterators}/make-stream/make-node-stream.js +0 -0
- package/dist/esm/iterators/make-stream/make-node-stream.js.map +1 -0
- package/dist/{iterators → esm/iterators}/make-stream/make-stream.js +0 -0
- package/dist/esm/iterators/make-stream/make-stream.js.map +1 -0
- package/dist/{javascript-utils → esm/javascript-utils}/is-type.js +0 -0
- package/dist/esm/javascript-utils/is-type.js.map +1 -0
- package/dist/{lib → esm/lib}/api/encode.js +1 -1
- package/dist/esm/lib/api/encode.js.map +1 -0
- package/dist/{lib → esm/lib}/api/load-in-batches.js +0 -0
- package/dist/esm/lib/api/load-in-batches.js.map +1 -0
- package/dist/{lib → esm/lib}/api/load.js +0 -0
- package/dist/esm/lib/api/load.js.map +1 -0
- package/dist/{lib → esm/lib}/api/parse-in-batches.js +0 -0
- package/dist/esm/lib/api/parse-in-batches.js.map +1 -0
- package/dist/{lib → esm/lib}/api/parse-sync.js +1 -1
- package/dist/esm/lib/api/parse-sync.js.map +1 -0
- package/dist/{lib → esm/lib}/api/parse.js +1 -1
- package/dist/esm/lib/api/parse.js.map +1 -0
- package/dist/{lib → esm/lib}/api/register-loaders.js +0 -0
- package/dist/esm/lib/api/register-loaders.js.map +1 -0
- package/dist/{lib → esm/lib}/api/save.js +0 -0
- package/dist/esm/lib/api/save.js.map +1 -0
- package/dist/{lib → esm/lib}/api/select-loader.js +8 -12
- package/dist/esm/lib/api/select-loader.js.map +1 -0
- package/dist/{lib → esm/lib}/api/set-loader-options.js +0 -0
- package/dist/esm/lib/api/set-loader-options.js.map +1 -0
- package/dist/{lib → esm/lib}/common.js +0 -0
- package/dist/esm/lib/common.js.map +1 -0
- package/dist/{lib → esm/lib}/fetch/fetch-error-message.js +2 -2
- package/dist/esm/lib/fetch/fetch-error-message.js.map +1 -0
- package/dist/{lib → esm/lib}/fetch/fetch-file.js +0 -0
- package/dist/esm/lib/fetch/fetch-file.js.map +1 -0
- package/dist/{lib → esm/lib}/fetch/read-array-buffer.js +0 -0
- package/dist/esm/lib/fetch/read-array-buffer.js.map +1 -0
- package/dist/{lib → esm/lib}/fetch/read-file.js +0 -0
- package/dist/esm/lib/fetch/read-file.js.map +1 -0
- package/dist/{lib → esm/lib}/fetch/write-file.js +0 -0
- package/dist/esm/lib/fetch/write-file.js.map +1 -0
- package/dist/{lib → esm/lib}/filesystems/browser-filesystem.js +0 -0
- package/dist/esm/lib/filesystems/browser-filesystem.js.map +1 -0
- package/dist/{lib → esm/lib}/filesystems/filesystem.js +0 -0
- package/dist/esm/lib/filesystems/filesystem.js.map +1 -0
- package/dist/{lib → esm/lib}/filesystems/read-array-buffer.js +0 -0
- package/dist/esm/lib/filesystems/read-array-buffer.js.map +1 -0
- package/dist/esm/lib/init.js +6 -0
- package/dist/esm/lib/init.js.map +1 -0
- package/dist/{lib → esm/lib}/loader-utils/check-errors.js +4 -4
- package/dist/esm/lib/loader-utils/check-errors.js.map +1 -0
- package/dist/{lib → esm/lib}/loader-utils/get-data.js +0 -0
- package/dist/esm/lib/loader-utils/get-data.js.map +1 -0
- package/dist/{lib → esm/lib}/loader-utils/loader-context.js +0 -0
- package/dist/esm/lib/loader-utils/loader-context.js.map +1 -0
- package/dist/{lib → esm/lib}/loader-utils/loggers.js +0 -0
- package/dist/esm/lib/loader-utils/loggers.js.map +1 -0
- package/dist/{lib → esm/lib}/loader-utils/normalize-loader.js +0 -0
- package/dist/esm/lib/loader-utils/normalize-loader.js.map +1 -0
- package/dist/{lib → esm/lib}/loader-utils/option-defaults.js +0 -0
- package/dist/esm/lib/loader-utils/option-defaults.js.map +1 -0
- package/dist/{lib → esm/lib}/loader-utils/option-utils.js +7 -8
- package/dist/esm/lib/loader-utils/option-utils.js.map +1 -0
- package/dist/{lib → esm/lib}/progress/fetch-progress.js +0 -0
- package/dist/esm/lib/progress/fetch-progress.js.map +1 -0
- package/dist/{lib → esm/lib}/utils/mime-type-utils.js +0 -0
- package/dist/esm/lib/utils/mime-type-utils.js.map +1 -0
- package/dist/{lib → esm/lib}/utils/resource-utils.js +0 -0
- package/dist/esm/lib/utils/resource-utils.js.map +1 -0
- package/dist/{lib → esm/lib}/utils/response-utils.js +7 -7
- package/dist/esm/lib/utils/response-utils.js.map +1 -0
- package/dist/{null-loader.js → esm/null-loader.js} +1 -1
- package/dist/esm/null-loader.js.map +1 -0
- package/dist/{workers → esm/workers}/null-worker.js +0 -0
- package/dist/esm/workers/null-worker.js.map +1 -0
- package/dist/null-worker.js +1 -1
- package/dist/null-worker.js.map +1 -1
- package/package.json +6 -6
- package/src/bundle.ts +2 -3
- package/src/lib/api/encode.ts +1 -0
- package/src/lib/api/select-loader.ts +10 -9
- package/src/lib/init.js +2 -3
- package/src/lib/loader-utils/option-utils.ts +3 -4
- package/dist/bundle.js +0 -7
- package/dist/bundle.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/iterators/batch-iterators/timed-batch-iterator.js.map +0 -1
- package/dist/iterators/make-iterator/make-array-buffer-iterator.js.map +0 -1
- package/dist/iterators/make-iterator/make-blob-iterator.js.map +0 -1
- package/dist/iterators/make-iterator/make-iterator.js.map +0 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js.map +0 -1
- package/dist/iterators/make-iterator/make-string-iterator.js.map +0 -1
- package/dist/iterators/make-stream/make-dom-stream.js.map +0 -1
- package/dist/iterators/make-stream/make-node-stream.js.map +0 -1
- package/dist/iterators/make-stream/make-stream.js.map +0 -1
- package/dist/javascript-utils/is-type.js.map +0 -1
- package/dist/lib/api/encode.js.map +0 -1
- package/dist/lib/api/load-in-batches.js.map +0 -1
- package/dist/lib/api/load.js.map +0 -1
- package/dist/lib/api/parse-in-batches.js.map +0 -1
- package/dist/lib/api/parse-sync.js.map +0 -1
- package/dist/lib/api/parse.js.map +0 -1
- package/dist/lib/api/register-loaders.js.map +0 -1
- package/dist/lib/api/save.js.map +0 -1
- package/dist/lib/api/select-loader.js.map +0 -1
- package/dist/lib/api/set-loader-options.js.map +0 -1
- package/dist/lib/fetch/fetch-error-message.js.map +0 -1
- package/dist/lib/fetch/fetch-file.js.map +0 -1
- package/dist/lib/fetch/read-array-buffer.js.map +0 -1
- package/dist/lib/fetch/read-file.js.map +0 -1
- package/dist/lib/fetch/write-file.js.map +0 -1
- package/dist/lib/filesystems/browser-filesystem.js.map +0 -1
- package/dist/lib/filesystems/read-array-buffer.js.map +0 -1
- package/dist/lib/init.js +0 -7
- package/dist/lib/init.js.map +0 -1
- package/dist/lib/loader-utils/check-errors.js.map +0 -1
- package/dist/lib/loader-utils/get-data.js.map +0 -1
- package/dist/lib/loader-utils/loader-context.js.map +0 -1
- package/dist/lib/loader-utils/loggers.js.map +0 -1
- package/dist/lib/loader-utils/normalize-loader.js.map +0 -1
- package/dist/lib/loader-utils/option-defaults.js.map +0 -1
- package/dist/lib/loader-utils/option-utils.js.map +0 -1
- package/dist/lib/progress/fetch-progress.js.map +0 -1
- package/dist/lib/utils/mime-type-utils.js.map +0 -1
- package/dist/lib/utils/resource-utils.js.map +0 -1
- package/dist/lib/utils/response-utils.js.map +0 -1
- package/dist/workers/null-worker.js.map +0 -1
package/dist/dist.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";(function(e,r){n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return f}));const o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},s=o.self||o.window||o.global||{},i=o.window||o.self||o.global||{},a=o.global||o.self||o.window||{},u=o.document||{},c="object"!=typeof r||"[object process]"!==String(r)||r.browser,f="function"==typeof importScripts,l=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);l&&parseFloat(l[1])}).call(this,n(4),n(2))},function(e,t,n){"use strict";(function(e,r){n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return i}));const o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document,process:"object"==typeof r&&r},s=o.window||o.self||o.global,i=o.process||{};console}).call(this,n(4),n(2))},function(e,t){var n,r,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,c=[],f=!1,l=-1;function d(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&h())}function h(){if(!f){var e=a(d);f=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||f||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){function r(){let t;if("undefined"!=typeof window&&window.performance)t=window.performance.now();else if(void 0!==e&&e.hrtime){const n=e.hrtime();t=1e3*n[0]+n[1]/1e6}else t=Date.now();return t}n.d(t,"a",(function(){return r}))}).call(this,n(2))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,function(e,t){},,,function(e,t){},function(e,t){},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(13);function o(){return!("object"==typeof e&&"[object process]"===String(e)&&!e.browser)||Object(r.a)()}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){function r(t){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if(void 0!==e&&"object"==typeof e.versions&&Boolean(e.versions.electron))return!0;const n="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,r=t||n;return!!(r&&r.indexOf("Electron")>=0)}n.d(t,"a",(function(){return r}))}).call(this,n(2))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return o}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document,"object"!=typeof r||"[object process]"!==String(r)||r.browser;const o="undefined"!=typeof window&&void 0!==window.orientation,s=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);s&&parseFloat(s[1])}).call(this,n(4),n(2))},function(e,t){},function(e,t,n){(function(t){const r=n(22),o="undefined"==typeof window?t:window;o.loaders=o.loaders||{},e.exports=Object.assign(o.loaders,r)}).call(this,n(4))},,,,,function(e,t){},function(e,t,n){"use strict";n.r(t),n.d(t,"fetchFile",(function(){return E})),n.d(t,"readArrayBuffer",(function(){return B})),n.d(t,"readFileSync",(function(){return U})),n.d(t,"writeFile",(function(){return q})),n.d(t,"writeFileSync",(function(){return N})),n.d(t,"setLoaderOptions",(function(){return we})),n.d(t,"registerLoaders",(function(){return Te})),n.d(t,"selectLoader",(function(){return Se})),n.d(t,"selectLoaderSync",(function(){return ke})),n.d(t,"parse",(function(){return at})),n.d(t,"parseSync",(function(){return ut})),n.d(t,"parseInBatches",(function(){return ct})),n.d(t,"load",(function(){return ft})),n.d(t,"loadInBatches",(function(){return lt})),n.d(t,"encode",(function(){return ht})),n.d(t,"encodeSync",(function(){return pt})),n.d(t,"encodeInBatches",(function(){return gt})),n.d(t,"encodeText",(function(){return yt})),n.d(t,"encodeURLtoURL",(function(){return mt})),n.d(t,"save",(function(){return bt})),n.d(t,"saveSync",(function(){return vt})),n.d(t,"setPathPrefix",(function(){return s})),n.d(t,"getPathPrefix",(function(){return i})),n.d(t,"resolvePath",(function(){return a})),n.d(t,"RequestScheduler",(function(){return kt})),n.d(t,"makeIterator",(function(){return tt})),n.d(t,"makeStream",(function(){return jt})),n.d(t,"makeDOMStream",(function(){return Lt})),n.d(t,"makeNodeStream",(function(){return Ct.a})),n.d(t,"NullWorkerLoader",(function(){return Ot})),n.d(t,"NullLoader",(function(){return Pt})),n.d(t,"JSONLoader",(function(){return Mt})),n.d(t,"_fetchProgress",(function(){return It})),n.d(t,"_BrowserFileSystem",(function(){return Ut})),n.d(t,"_unregisterLoaders",(function(){return xe})),n.d(t,"isBrowser",(function(){return C.c})),n.d(t,"isWorker",(function(){return C.d})),n.d(t,"self",(function(){return C.e})),n.d(t,"window",(function(){return C.f})),n.d(t,"global",(function(){return C.b})),n.d(t,"document",(function(){return C.a})),n.d(t,"assert",(function(){return W})),n.d(t,"forEach",(function(){return Ke})),n.d(t,"concatenateArrayBuffersAsync",(function(){return Xe})),n.d(t,"makeTextDecoderIterator",(function(){return qt})),n.d(t,"makeTextEncoderIterator",(function(){return Nt})),n.d(t,"makeLineIterator",(function(){return $t})),n.d(t,"makeNumberedLineIterator",(function(){return Dt})),n.d(t,"isPureObject",(function(){return l})),n.d(t,"isPromise",(function(){return d})),n.d(t,"isIterable",(function(){return h})),n.d(t,"isAsyncIterable",(function(){return p})),n.d(t,"isIterator",(function(){return y})),n.d(t,"isResponse",(function(){return g})),n.d(t,"isReadableStream",(function(){return w})),n.d(t,"isWritableStream",(function(){return b}));let r="";const o={};function s(e){r=e}function i(){return r}function a(e){for(const t in o)if(e.startsWith(t)){const n=o[t];e=e.replace(t,n)}return e.startsWith("http://")||e.startsWith("https://")||(e=`${r}${e}`),e}const u=e=>"boolean"==typeof e,c=e=>"function"==typeof e,f=e=>null!==e&&"object"==typeof e,l=e=>f(e)&&e.constructor==={}.constructor,d=e=>f(e)&&c(e.then),h=e=>e&&"function"==typeof e[Symbol.iterator],p=e=>e&&"function"==typeof e[Symbol.asyncIterator],y=e=>e&&c(e.next),g=e=>"undefined"!=typeof Response&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json,m=e=>"undefined"!=typeof Blob&&e instanceof Blob,w=e=>(e=>"undefined"!=typeof ReadableStream&&e instanceof ReadableStream||f(e)&&c(e.tee)&&c(e.cancel)&&c(e.getReader))(e)||(e=>f(e)&&c(e.read)&&c(e.pipe)&&u(e.readable))(e),b=e=>(e=>f(e)&&c(e.abort)&&c(e.getWriter))(e)||(e=>f(e)&&c(e.end)&&c(e.write)&&u(e.writable))(e),v=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,_=/^([-\w.]+\/[-\w.+]+)/;function T(e){const t=_.exec(e);return t?t[1]:e}function x(e){const t=v.exec(e);return t?t[1]:""}const A=/\?.*/;function S(e){if(g(e)){const t=k(e.url||"");return{url:t,type:T(e.headers.get("content-type")||"")||x(t)}}return m(e)?{url:k(e.name||""),type:e.type||""}:"string"==typeof e?{url:k(e),type:x(e)}:{url:"",type:""}}function k(e){return e.replace(A,"")}async function L(e){if(g(e))return e;const t={},n=function(e){return g(e)?e.headers["content-length"]||-1:m(e)?e.size:"string"==typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}(e);n>=0&&(t["content-length"]=String(n));const{url:r,type:o}=S(e);o&&(t["content-type"]=o);const s=await async function(e){if("string"==typeof e)return"data:,"+e.slice(0,5);if(e instanceof Blob){const t=e.slice(0,5);return await new Promise(e=>{const n=new FileReader;n.onload=t=>{var n;return e(null==t||null===(n=t.target)||void 0===n?void 0:n.result)},n.readAsDataURL(t)})}if(e instanceof ArrayBuffer){const t=e.slice(0,5);return"data:base64,"+function(e){let t="";const n=new Uint8Array(e);for(let e=0;e<n.byteLength;e++)t+=String.fromCharCode(n[e]);return btoa(t)}(t)}return null}(e);s&&(t["x-first-bytes"]=s),"string"==typeof e&&(e=(new TextEncoder).encode(e));const i=new Response(e,{headers:t});return Object.defineProperty(i,"url",{value:r}),i}async function R(e){if(!e.ok){const t=await async function(e){let t=`Failed to fetch resource ${e.url} (${e.status}): `;try{const n=e.headers.get("Content-Type");let r=e.statusText;n.includes("application/json")&&(r+=" "+await e.text()),t+=r,t=t.length>60?t.slice(60)+"...":t}catch(e){}return t}(e);throw new Error(t)}}async function E(e,t){if("string"==typeof e){e=a(e);let n=t;return null!=t&&t.fetch&&"function"!=typeof(null==t?void 0:t.fetch)&&(n=t.fetch),await fetch(e,n)}return await L(e)}var j=n(10);async function B(e,t,n){if("number"==typeof e)return await j._readToArrayBuffer(e,t,n);e instanceof Blob||(e=new Blob([e]));const r=e.slice(t,t+n);return await async function(e){return await new Promise((t,n)=>{const r=new FileReader;r.onload=e=>{var n;return t(null==e||null===(n=e.target)||void 0===n?void 0:n.result)},r.onerror=e=>n(e),r.readAsArrayBuffer(e)})}(r)}var C=n(0),O=n(7);function P(e){return e&&"object"==typeof e&&e.isBuffer}function M(e){return O.toBuffer?O.toBuffer(e):e}function F(e){if(P(e))return function(e){if(P(e)){return new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer}return e}(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if("string"==typeof e){const t=e;return(new TextEncoder).encode(t).buffer}if(e&&"object"==typeof e&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function I(...e){const t=e.map(e=>e instanceof ArrayBuffer?new Uint8Array(e):e),n=t.reduce((e,t)=>e+t.byteLength,0),r=new Uint8Array(n);let o=0;for(const e of t)r.set(e,o),o+=e.byteLength;return r.buffer}function W(e,t){if(!e)throw new Error(t||"loader assertion failed.")}function U(e,t={}){if(e=a(e),!C.c){const n=j.readFileSync(e,t);return"string"!=typeof n?F(n):n}return t.nothrow||W(!1),null}async function q(e,t,n){e=a(e),C.c||await j.writeFile(e,M(t),{flag:"w"}),W(!1)}function N(e,t,n){e=a(e),C.c||j.writeFileSync(e,M(t),{flag:"w"}),W(!1)}var $=n(12);const D=Object($.a)();class z{constructor(e,t,n="sessionStorage"){this.storage=function(e){try{const t=window[e],n="__storage_test__";return t.setItem(n,n),t.removeItem(n),t}catch(e){return null}}(n),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function Q(e,t,n,r=600){const o=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>r&&(n=Math.min(n,r/e.width));const s=e.width*n,i=e.height*n,a=["font-size:1px;","padding:".concat(Math.floor(i/2),"px ").concat(Math.floor(s/2),"px;"),"line-height:".concat(i,"px;"),"background:url(".concat(o,");"),"background-size:".concat(s,"px ").concat(i,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}const H={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function G(e){return"string"==typeof e?H[e.toUpperCase()]||H.WHITE:e}function J(e,t){if(!e)throw new Error(t||"Assertion failed")}var V=n(1);function Y(){let e;if(D&&V.b.performance)e=V.b.performance.now();else if(V.a.hrtime){const t=V.a.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}const K={debug:D&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},X={enabled:!0,level:0};function Z(){}const ee={},te={once:!0};function ne(e){for(const t in e)for(const n in e[t])return n||"untitled";return"empty"}class re{constructor({id:e}={id:""}){this.id=e,this.VERSION="3.1.0-alpha.1",this._startTs=Y(),this._deltaTs=Y(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new z("__probe-".concat(this.id,"__"),X),this.userData={},this.timeStamp("".concat(this.id," started")),function(e,t=["constructor"]){const n=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(n);for(const n of r)"function"==typeof e[n]&&(t.find(e=>n===e)||(e[n]=e[n].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Y()-this._startTs).toPrecision(10))}getDelta(){return Number((Y()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}assert(e,t){J(e,t)}warn(e){return this._getLogFunction(0,e,K.warn,arguments,te)}error(e){return this._getLogFunction(0,e,K.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,K.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,K.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,K.debug||K.info,arguments,te)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||Z,n&&[n],{tag:ne(t)}):Z}image({logLevel:e,priority:t,image:r,message:o="",scale:s=1}){return this._shouldLog(e||t)?D?function({image:e,message:t="",scale:n=1}){if("string"==typeof e){const r=new Image;return r.onload=()=>{const e=Q(r,t,n);console.log(...e)},r.src=e,Z}const r=e.nodeName||"";if("img"===r.toLowerCase())return console.log(...Q(e,t,n)),Z;if("canvas"===r.toLowerCase()){const r=new Image;return r.onload=()=>console.log(...Q(r,t,n)),r.src=e.toDataURL(),Z}return Z}({image:r,message:o,scale:s}):function({image:e,message:t="",scale:r=1}){let o=null;try{o=n(21)}catch(e){}if(o)return()=>o(e,{fit:"box",width:"".concat(Math.round(80*r),"%")}).then(e=>console.log(e));return Z}({image:r,message:o,scale:s}):Z}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||Z)}group(e,t,n={collapsed:!1}){n=se({logLevel:e,message:t,opts:n});const{collapsed:r}=n;return n.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||Z)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=oe(e)}_getLogFunction(e,t,n,r=[],o){if(this._shouldLog(e)){o=se({logLevel:e,message:t,args:r,opts:o}),J(n=n||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Y();const s=o.tag||o.message;if(o.once){if(ee[s])return Z;ee[s]=Y()}return t=function(e,t,n){if("string"==typeof t){const i=n.time?function(e,t=8){const n=Math.max(t-e.length,0);return"".concat(" ".repeat(n)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(n.total)):"";t=n.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),r=t,o=n.color,s=n.background,D||"string"!=typeof r||(o&&(o=G(o),r="[".concat(o,"m").concat(r,"[39m")),s&&(o=G(s),r="[".concat(s+10,"m").concat(r,"[49m"))),t=r}var r,o,s;return t}(this.id,o.message,o),n.bind(console,t,...o.args)}return Z}}function oe(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return J(Number.isFinite(t)&&t>=0),t}function se(e){const{logLevel:t,message:n}=e;e.logLevel=oe(t);const r=e.args?Array.from(e.args):[];for(;r.length&&r.shift()!==n;);switch(e.args=r,typeof t){case"string":case"function":void 0!==n&&r.unshift(n),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const o=typeof e.message;return J("string"===o||"object"===o),Object.assign(e,e.opts)}re.VERSION="3.1.0-alpha.1";const ie=new re({id:"loaders.gl"});class ae{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}const ue={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){var e,t,n;n=void 0,(t="console")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}},CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},ce={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function fe(){C.b.loaders=C.b.loaders||{};const{loaders:e}=C.b;return e._state=e._state||{},e._state}const le=()=>{const e=fe();return e.globalOptions=e.globalOptions||{...ue},e.globalOptions};function de(e,t,n,r){return n=n||[],function(e,t){pe(e,null,ue,ce,t);for(const n of t){const r=e&&e[n.id]||{},o=n.options&&n.options[n.id]||{},s=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};pe(r,n.id,o,s,t)}}(e,n=Array.isArray(n)?n:[n]),ge(t,e,r)}function he(e,t){const n=le(),r=e||n;return"function"==typeof r.fetch?r.fetch:f(r.fetch)?e=>E(e,r):null!=t&&t.fetch?null==t?void 0:t.fetch:E}function pe(e,t,n,r,o){const s=t||"Top level",i=t?t+".":"";for(const a in e){const u=!t&&f(e[a]),c="baseUri"===a&&!t,l="workerUrl"===a&&t;if(!(a in n)&&!c&&!l)if(a in r)ie.warn(`${s} loader option '${i}${a}' no longer supported, use '${r[a]}'`)();else if(!u){const e=ye(a,o);ie.warn(`${s} loader option '${i}${a}' not recognized. ${e}`)()}}}function ye(e,t){const n=e.toLowerCase();let r="";for(const o of t)for(const t in o.options){if(e===t)return`Did you mean '${o.id}.${t}'?`;const s=t.toLowerCase();(n.startsWith(s)||s.startsWith(n))&&(r=r||`Did you mean '${o.id}.${t}'?`)}return r}function ge(e,t,n){const r={...e.options||{}};return function(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)}(r,n),null===r.log&&(r.log=new ae),me(r,le()),me(r,t),r}function me(e,t){for(const n in t)if(n in t){const r=t[n];l(r)&&l(e[n])?e[n]={...e[n],...t[n]}:e[n]=t[n]}}function we(e){!function(e){const t=fe(),n=le();t.globalOptions=ge(n,e)}(e)}function be(e){var t;if(!e)return!1;Array.isArray(e)&&(e=e[0]);return Array.isArray(null===(t=e)||void 0===t?void 0:t.extensions)}function ve(e){var t,n;let r;return W(e,"null loader"),W(be(e),"invalid loader"),Array.isArray(e)&&(r=e[1],e=e[0],e={...e,options:{...e.options,...r}}),(null!==(t=e)&&void 0!==t&&t.parseTextSync||null!==(n=e)&&void 0!==n&&n.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}const _e=()=>{const e=fe();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function Te(e){const t=_e();e=Array.isArray(e)?e:[e];for(const n of e){const e=ve(n);t.find(t=>e===t)||t.unshift(e)}}function xe(){fe().loaderRegistry=[]}const Ae=/\.([^.]+)$/;async function Se(e,t=[],n,r){if(!Le(e))return null;let o=ke(e,t,{...n,nothrow:!0},r);if(o)return o;if(m(e)&&(o=ke(e=await e.slice(0,10).arrayBuffer(),t,n,r)),!(o||null!=n&&n.nothrow))throw new Error(Re(e));return o}function ke(e,t=[],n,r){if(!Le(e))return null;if(t&&!Array.isArray(t))return ve(t);let o=[];t&&(o=o.concat(t)),null!=n&&n.ignoreRegisteredLoaders||o.push(..._e()),function(e){for(const t of e)ve(t)}(o);const s=function(e,t,n,r){const{url:o,type:s}=S(e),i=o||(null==r?void 0:r.url);let a=null;null!=n&&n.mimeType&&(a=Ee(t,null==n?void 0:n.mimeType));return a=a||function(e,t){const n=t&&Ae.exec(t),r=n&&n[1];return r?function(e,t){t=t.toLowerCase();for(const n of e)for(const e of n.extensions)if(e.toLowerCase()===t)return n;return null}(e,r):null}(t,i),a=a||Ee(t,s),a=a||function(e,t){if(!t)return null;for(const n of e)if("string"==typeof t){if(je(t,n))return n}else if(ArrayBuffer.isView(t)){if(Be(t.buffer,t.byteOffset,n))return n}else if(t instanceof ArrayBuffer){if(Be(t,0,n))return n}return null}(t,e),a=a||Ee(t,null==n?void 0:n.fallbackMimeType),a}(e,o,n,r);if(!(s||null!=n&&n.nothrow))throw new Error(Re(e));return s}function Le(e){return!(e instanceof Response&&204===e.status)}function Re(e){const{url:t,type:n}=S(e);let r="No valid loader found";return e&&(r+=` data: "${function(e,t=5){if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return Ce(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return Ce(e,0,t)}return""}(e)}", contentType: "${n}"`),t&&(r+=" url: "+t),r}function Ee(e,t){for(const n of e){if(n.mimeTypes&&n.mimeTypes.includes(t))return n;if(t==="application/x."+n.id)return n}return null}function je(e,t){if(t.testText)return t.testText(e);return(Array.isArray(t.tests)?t.tests:[t.tests]).some(t=>e.startsWith(t))}function Be(e,t,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some(r=>function(e,t,n,r){if(r instanceof ArrayBuffer)return function(e,t,n){if(n=n||e.byteLength,e.byteLength<n||t.byteLength<n)return!1;const r=new Uint8Array(e),o=new Uint8Array(t);for(let e=0;e<r.length;++e)if(r[e]!==o[e])return!1;return!0}(r,e,r.byteLength);switch(typeof r){case"function":return r(e,n);case"string":const o=Ce(e,t,r.length);return r===o;default:return!1}}(e,t,n,r))}function Ce(e,t,n){if(e.byteLength<t+n)return"";const r=new DataView(e);let o="";for(let e=0;e<n;e++)o+=String.fromCharCode(r.getUint8(t+e));return o}function Oe(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}var Pe=n(14);const Me=new Map;function Fe(e){Oe(e.source&&!e.url||!e.source&&e.url);let t=Me.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return Ie((t=e,`try {\n importScripts('${t}');\n} catch (error) {\n console.error(error);\n throw error;\n}`));var t}(e.url),Me.set(e.url,t)),e.source&&(t=Ie(e.source),Me.set(e.source,t))),Oe(t),t}function Ie(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function We(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qe=()=>{};class Ne{static isSupported(){return"undefined"!=typeof Worker}constructor(e){Ue(this,"name",void 0),Ue(this,"source",void 0),Ue(this,"url",void 0),Ue(this,"terminated",!1),Ue(this,"worker",void 0),Ue(this,"onMessage",void 0),Ue(this,"onError",void 0),Ue(this,"_loadableURL","");const{name:t,source:n,url:r}=e;Oe(n||r),this.name=t,this.source=n,this.url=r,this.onMessage=qe,this.onError=e=>console.log(e),this.worker=this._createBrowserWorker()}destroy(){this.onMessage=qe,this.onError=qe,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||function e(t,n=!0,r){const o=r||new Set;if(t){if(We(t))o.add(t);else if(We(t.buffer))o.add(t.buffer);else if(ArrayBuffer.isView(t));else if(n&&"object"==typeof t)for(const r in t)e(t[r],n,o)}else;return void 0===r?Array.from(o):[]}(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=e.message+" in "),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=Fe({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}}function $e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class De{constructor(e,t){$e(this,"name",void 0),$e(this,"workerThread",void 0),$e(this,"isRunning",void 0),$e(this,"result",void 0),$e(this,"_resolve",void 0),$e(this,"_reject",void 0),this.name=e,this.workerThread=t,this.isRunning=!0,this._resolve=()=>{},this._reject=()=>{},this.result=new Promise((e,t)=>{this._resolve=e,this._reject=t})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){Oe(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Oe(this.isRunning),this.isRunning=!1,this._reject(e)}}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Qe{constructor(e){ze(this,"name","unnamed"),ze(this,"source",void 0),ze(this,"url",void 0),ze(this,"maxConcurrency",1),ze(this,"maxMobileConcurrency",1),ze(this,"onDebug",()=>{}),ze(this,"reuseWorkers",!0),ze(this,"props",{}),ze(this,"jobQueue",[]),ze(this,"idleQueue",[]),ze(this,"count",0),ze(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e,t=((e,t,n)=>e.done(n)),n=((e,t)=>e.error(t))){const r=new Promise(r=>(this.jobQueue.push({name:e,onMessage:t,onError:n,onStart:r}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const n=new De(t.name,e);e.onMessage=e=>t.onMessage(n,e.type,e.payload),e.onError=e=>t.onError(n,e),t.onStart(n);try{await n.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new Ne({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return Pe.a?this.maxMobileConcurrency:this.maxConcurrency}}function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ge={maxConcurrency:3,maxMobileConcurrency:1,onDebug:()=>{},reuseWorkers:!0};class Je{static isSupported(){return Ne.isSupported()}static getWorkerFarm(e={}){return Je._workerFarm=Je._workerFarm||new Je({}),Je._workerFarm.setProps(e),Je._workerFarm}constructor(e){He(this,"props",void 0),He(this,"workerPools",new Map),this.props={...Ge},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy()}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:r}=e;let o=this.workerPools.get(t);return o||(o=new Qe({name:t,source:n,url:r}),o.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,o)),o}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}He(Je,"_workerFarm",void 0);async function Ve(e,t,n,r,o){const s=e.id,i=function(e,t={}){const n=t[e.id]||{},r=e.id+"-worker.js";let o=n.workerUrl;if("test"===t._workerType&&(o=`modules/${e.module}/dist/${r}`),!o){let t=e.version;"latest"===t&&(t="beta");const n=t?"@"+t:"";o=`https://unpkg.com/@loaders.gl/${e.module}${n}/dist/${r}`}return Oe(o),o}(e,n),a=Je.getWorkerFarm(n).getWorkerPool({name:s,url:i});n=JSON.parse(JSON.stringify(n));const u=await a.startJob("process-on-worker",Ye.bind(null,o));u.postMessage("process",{input:t,options:n});const c=await u.result;return await c.result}async function Ye(e,t,n,r){switch(n){case"done":t.done(r);break;case"error":t.error(r.error);break;case"process":const{id:o,input:s,options:i}=r;try{const n=await e(s,i);t.postMessage("done",{id:o,result:n})}catch(e){const n=e instanceof Error?e.message:"unknown error";t.postMessage("error",{id:o,error:n})}break;default:console.warn("parse-with-worker unknown message "+n)}}async function Ke(e,t){for(;;){const{done:n,value:r}=await e.next();if(n)return void e.return();if(t(r))return}}async function Xe(e){const t=[];for await(const n of e)t.push(n);return I(...t)}const Ze=262144;function et(e,t){return C.c?async function*(e,t){const n=e.getReader();let r;try{for(;;){const e=r||n.read();null!=t&&t._streamReadAhead&&(r=n.read());const{done:o,value:s}=await e;if(o)return;yield F(s)}}catch(e){n.releaseLock()}}(e,t):async function*(e,t){for await(const t of e)yield F(t)}(e)}function tt(e,t){if("string"==typeof e)return function*(e,t){const n=(null==t?void 0:t.chunkSize)||262144;let r=0;const o=new TextEncoder;for(;r<e.length;){const t=Math.min(e.length-r,n),s=e.slice(r,r+t);r+=t,yield o.encode(s)}}(e,t);if(e instanceof ArrayBuffer)return function*(e,t={}){const{chunkSize:n=Ze}=t;let r=0;for(;r<e.byteLength;){const t=Math.min(e.byteLength-r,n),o=new ArrayBuffer(t),s=new Uint8Array(e,r,t);new Uint8Array(o).set(s),r+=t,yield o}}(e,t);if(m(e))return async function*(e,t){const n=(null==t?void 0:t.chunkSize)||1048576;let r=0;for(;r<e.size;){const t=r+n,o=await e.slice(r,t).arrayBuffer();r=t,yield o}}(e,t);if(w(e))return et(e,t);if(g(e)){return et(e.body,t)}throw new Error("makeIterator")}const nt="Cannot convert supplied data type";function rt(e,t,n){if(t.text&&"string"==typeof e)return e;var r;if((r=e)&&"object"==typeof r&&r.isBuffer&&(e=e.buffer),e instanceof ArrayBuffer){const n=e;if(t.text&&!t.binary){return new TextDecoder("utf8").decode(n)}return n}if(ArrayBuffer.isView(e)){if(t.text&&!t.binary){return new TextDecoder("utf8").decode(e)}let n=e.buffer;const r=e.byteLength||e.length;return 0===e.byteOffset&&r===n.byteLength||(n=n.slice(e.byteOffset,e.byteOffset+r)),n}throw new Error(nt)}async function ot(e,t){if(y(e))return e;if(g(e)){const n=e;await R(n);return tt(await n.body,t)}return m(e)||w(e)?tt(e,t):p(e)?e[Symbol.asyncIterator]():function(e){if(ArrayBuffer.isView(e))return function*(){yield e.buffer}();if(e instanceof ArrayBuffer)return function*(){yield e}();if(y(e))return e;if(h(e))return e[Symbol.iterator]();throw new Error(nt)}(e)}function st(e,t,n=null){if(n)return n;const r={fetch:he(t,e),...e};return Array.isArray(r.loaders)||(r.loaders=null),r}function it(e,t){if(!t&&e&&!Array.isArray(e))return e;let n;if(e&&(n=Array.isArray(e)?e:[e]),t&&t.loaders){const e=Array.isArray(t.loaders)?t.loaders:[t.loaders];n=n?[...n,...e]:e}return n&&n.length?n:null}async function at(e,t,n,r){Oe(!r||"object"==typeof r),!t||Array.isArray(t)||be(t)||(r=void 0,n=t,t=void 0),e=await e,n=n||{};const{url:o}=S(e),s=it(t,r),i=await Se(e,s,n);return i?(r=st({url:o,parse:at,loaders:s},n=de(n,i,s,o),r),await async function(e,t,n,r){if(function(e,t="3.1.0-alpha.1"){Oe(e,"no worker provided");const n=e.version}(e),t=await async function(e,t,n){const r=e instanceof ArrayBuffer||ArrayBuffer.isView(e);if("string"==typeof e||r)return rt(e,t);if(m(e)&&(e=await L(e)),g(e)){const n=e;return await R(n),t.binary?await n.arrayBuffer():await n.text()}if(w(e)&&(e=tt(e,n)),h(e)||p(e))return Xe(e);throw new Error(nt)}(t,e,n),e.parseTextSync&&"string"==typeof t)return n.dataType="text",e.parseTextSync(t,n,r,e);if(function(e,t){return!!Je.isSupported()&&(e.worker&&(null==t?void 0:t.worker))}(e,n))return await Ve(e,t,n,0,at);if(e.parseText&&"string"==typeof t)return await e.parseText(t,n,r,e);if(e.parse)return await e.parse(t,n,r,e);throw Oe(!e.parseSync),new Error(e.id+" loader - no parser found and worker is disabled")}(i,e,n,r)):null}function ut(e,t,n,r){W(!r||"object"==typeof r),Array.isArray(t)||be(t)||(r=void 0,n=t,t=void 0),n=n||{};const o=it(t,r),s=ke(e,o,n);if(!s)return null;n=de(n,s,o);const{url:i}=S(e);return function(e,t,n,r){if(t=rt(t,e),e.parseTextSync&&"string"==typeof t)return e.parseTextSync(t,n);if(e.parseSync&&t instanceof ArrayBuffer)return e.parseSync(t,n,r);throw new Error(`${e.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${r.url||""}`)}(s,e,n,r=st({url:i,parseSync:ut,parse:()=>{throw new Error("parseSync called parse")},loaders:t},n))}async function ct(e,t,n,r){W(!r||"object"==typeof r),Array.isArray(t)||be(t)||(r=void 0,n=t,t=void 0),e=await e,n=n||{};const{url:o}=S(e),s=await Se(e,t,n);return s?(r=st({url:o,parseInBatches:ct,parse:at,loaders:t},n=de(n,s,t,o),r),await async function(e,t,n,r){const o=await async function(e,t,n,r){const o=await ot(t,n),s=await async function(e,t=[]){let n=e;for await(const e of t)n=e(n);return n}(o,(null==n?void 0:n.transforms)||[]);if(e.parseInBatches)return e.parseInBatches(s,n,r);return async function*(){const t=await Xe(s),o=await at(t,e,{...n,mimeType:e.mimeTypes[0]},r),i={mimeType:e.mimeTypes[0],shape:Array.isArray(o)?"row-table":"unknown",batchType:"data",data:o,length:Array.isArray(o)?o.length:1};yield i}()}(e,t,n,r);if(!n.metadata)return o;const s={batchType:"metadata",metadata:{_loader:e,_context:r},data:[],bytesUsed:0};return async function*(e){yield s,yield*e}(o)}(s,e,n,r)):null}async function ft(e,t,n,r){Array.isArray(t)||be(t)||(void 0,n=t,t=void 0);const o=he(n);let s=e;return"string"==typeof e&&(s=await o(e)),m(e)&&(s=await o(e)),await at(s,t,n)}function lt(e,t,n,r){Array.isArray(t)||be(t)||(void 0,n=t,t=null);const o=he(n||{});if(!Array.isArray(e))return dt(e,t,n,o);return e.map(e=>dt(e,t,n,o))}async function dt(e,t,n,r){if("string"==typeof e){const o=e,s=await r(o);return await ct(s,t,n)}return await ct(e,t,n)}async function ht(e,t,n){if(t.encode)return await t.encode(e,n);if(t.encodeSync)return t.encodeSync(e,n);if(t.encodeText)return(new TextEncoder).encode(await t.encodeText(e,n));if(t.encodeInBatches){const r=gt(e,t,n),o=[];for await(const e of r)o.push(e);return I(...o)}if(!C.c&&t.encodeURLtoURL){const r=wt("input");await q(r,e);const o=wt("output"),s=await mt(r,o,t,n);return(await E(s)).arrayBuffer()}throw new Error("Writer could not encode data")}function pt(e,t,n){if(t.encodeSync)return t.encodeSync(e,n);throw new Error("Writer could not synchronously encode data")}async function yt(e,t,n){if(t.text&&t.encodeText)return await t.encodeText(e,n);if(t.text&&(t.encode||t.encodeInBatches)){const r=await ht(e,t,n);return(new TextDecoder).decode(r)}throw new Error("Writer could not encode data as text")}function gt(e,t,n){if(t.encodeInBatches){const r=function(e){return[{table:e,start:0,end:e.length}]}(e);return t.encodeInBatches(r,n)}throw new Error("Writer could not encode data in batches")}async function mt(e,t,n,r){if(e=a(e),t=a(t),C.c||!n.encodeURLtoURL)throw new Error;return await n.encodeURLtoURL(e,t,r)}function wt(e){return"/tmp/"+e}async function bt(e,t,n,r){const o=await ht(e,n,r);return await q(t,o)}function vt(e,t,n,r){return N(t,pt(e,n,r))}var _t=n(3);class Tt{constructor(e,t){this.name=e,this.type=t,this.sampleSize=1,this.reset()}setSampleSize(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Object(_t.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(_t.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class xt{constructor({id:e,stats:t}){this.id=e,this.stats={},this._initializeStats(t),Object.seal(this)}get(e,t="count"){return this._getOrCreate({name:e,type:t})}get size(){return Object.keys(this.stats).length}reset(){for(const e in this.stats)this.stats[e].reset();return this}forEach(e){for(const t in this.stats)e(this.stats[t])}getTable(){const e={};return this.forEach(t=>{e[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}}),e}_initializeStats(e=[]){e.forEach(e=>this._getOrCreate(e))}_getOrCreate(e){if(!e||!e.name)return null;const{name:t,type:n}=e;return this.stats[t]||(this.stats[t]=e instanceof Tt?e:new Tt(t,n)),this.stats[t]}}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const St={id:"request-scheduler",throttleRequests:!0,maxRequests:6};class kt{constructor(e={}){At(this,"props",void 0),At(this,"stats",void 0),At(this,"activeRequestCount",0),At(this,"requestQueue",[]),At(this,"requestMap",new Map),At(this,"deferredUpdate",null),this.props={...St,...e},this.stats=new xt({id:this.props.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever")}scheduleRequest(e,t=(()=>0)){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(e))return this.requestMap.get(e);const n={handle:e,priority:0,getPriority:t},r=new Promise(e=>(n.resolve=e,n));return this.requestQueue.push(n),this.requestMap.set(e,r),this._issueNewRequests(),r}_issueRequest(e){const{handle:t,resolve:n}=e;let r=!1;const o=()=>{r||(r=!0,this.requestMap.delete(t),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:o}):Promise.resolve({done:o})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const e=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==e){this._updateAllRequests();for(let t=0;t<e;++t){const e=this.requestQueue.shift();e&&this._issueRequest(e)}}}_updateAllRequests(){const e=this.requestQueue;for(let t=0;t<e.length;++t){const n=e[t];this._updateRequest(n)||(e.splice(t,1),this.requestMap.delete(n.handle),t--)}e.sort((e,t)=>e.priority-t.priority)}_updateRequest(e){return e.priority=e.getPriority(e.handle),!(e.priority<0)||(e.resolve(null),!1)}}function Lt(e,t){const n=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new ReadableStream({type:"bytes",async pull(e){try{const{done:t,value:r}=await n.next();t?e.close():e.enqueue(new Uint8Array(r))}catch(t){e.error(t)}},async cancel(){var e;await(null==n||null===(e=n.return)||void 0===e?void 0:e.call(n))}},{highWaterMark:2**24,...t})}var Rt=n(15),Et=n.n(Rt);function jt(e,t){return C.c?Lt(e,t):Et()(e,t)}var Bt=n(11),Ct=n.n(Bt);const Ot={name:"Null loader",id:"null",module:"core",version:"3.1.0-alpha.1",worker:!0,mimeTypes:["application/x.empty"],extensions:["null"],tests:[()=>!1],options:{null:{}}},Pt={name:"Null loader",id:"null",module:"core",version:"3.1.0-alpha.1",mimeTypes:["application/x.empty"],extensions:["null"],parse:async e=>e,parseSync:e=>e,parseInBatches:async function*(e){for await(const t of e)yield t},tests:[()=>!1],options:{null:{}}},Mt={name:"JSON",id:"json",module:"json",version:"3.1.0-alpha.1",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:Ft,parse:async e=>Ft((new TextDecoder).decode(e)),options:{}};function Ft(e){return JSON.parse(e)}async function It(e,t,n=(()=>{}),r=(()=>{})){if(!(e=await e).ok)return e;const o=e.body;if(!o)return e;const s=e.headers.get("content-length")||0,i=s&&parseInt(s);if(!(s>0))return e;if("undefined"==typeof ReadableStream||!o.getReader)return e;const a=new ReadableStream({async start(e){const s=o.getReader();await async function e(t,n,r,o,s,i,a){try{const{done:u,value:c}=await n.read();if(u)return i(),void t.close();r+=c.byteLength;const f=Math.round(r/o*100);s(f,{loadedBytes:r,totalBytes:o}),t.enqueue(c),await e(t,n,r,o,s,i,a)}catch(e){t.error(e),a(e)}}(e,s,0,i,t,n,r)}});return new Response(a)}function Wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ut{constructor(e,t){Wt(this,"_fetch",void 0),Wt(this,"files",{}),Wt(this,"lowerCaseFiles",{}),Wt(this,"usedFiles",{}),this._fetch=(null==t?void 0:t.fetch)||fetch;for(let t=0;t<e.length;++t){const n=e[t];this.files[n.name]=n,this.lowerCaseFiles[n.name.toLowerCase()]=n,this.usedFiles[n.name]=!1}this.fetch=this.fetch.bind(this)}async fetch(e,t){if(e.includes("://"))return this._fetch(e,t);const n=this.files[e];if(!n)return new Response(e,{status:400,statusText:"NOT FOUND"});const r=new Headers(null==t?void 0:t.headers).get("Range"),o=r&&/bytes=($1)-($2)/.exec(r);if(o){const t=parseInt(o[1]),r=parseInt(o[2]),s=await n.slice(t,r).arrayBuffer(),i=new Response(s);return Object.defineProperty(i,"url",{value:e}),i}const s=new Response(n);return Object.defineProperty(s,"url",{value:e}),s}async readdir(e){const t=[];for(const e in this.files)t.push(e);return t}async stat(e,t){const n=this.files[e];if(!n)throw new Error(e);return{size:n.size}}async unlink(e){delete this.files[e],delete this.lowerCaseFiles[e],this.usedFiles[e]=!0}async open(e,t,n){return this.files[e]}async read(e,t,n=0,r=t.byteLength,o=null){const s=e;return{bytesRead:r,buffer:await s.slice(0,0+r).arrayBuffer()}}async close(e){}_getFile(e,t){const n=this.files[e]||this.lowerCaseFiles[e];return n&&t&&(this.usedFiles[e]=!0),n}}async function*qt(e,t={}){const n=new TextDecoder(void 0,t);for await(const t of e)yield"string"==typeof t?t:n.decode(t,{stream:!0})}async function*Nt(e){const t=new TextEncoder;for await(const n of e)yield"string"==typeof n?t.encode(n):n}async function*$t(e){let t="";for await(const n of e){let e;for(t+=n;(e=t.indexOf("\n"))>=0;){const n=t.slice(0,e+1);t=t.slice(e+1),yield n}}t.length>0&&(yield t)}async function*Dt(e){let t=1;for await(const n of e)yield{counter:t,line:n},t++}}])}));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=17)}([function(e,t,n){"use strict";(function(e,r){n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l}));const o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},s=o.self||o.window||o.global||{},i=o.window||o.self||o.global||{},a=o.global||o.self||o.window||{},u=o.document||{},c=Boolean("object"!=typeof r||"[object process]"!==String(r)||r.browser),l="function"==typeof importScripts,f=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);f&&parseFloat(f[1])}).call(this,n(7),n(2))},function(e,t,n){"use strict";(function(e,r){n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return i}));const o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document,process:"object"==typeof r&&r},s=o.window||o.self||o.global,i=o.process||{};console}).call(this,n(7),n(2))},function(e,t){var n,r,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=a(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){function r(){let t;if("undefined"!=typeof window&&window.performance)t=window.performance.now();else if(void 0!==e&&e.hrtime){const n=e.hrtime();t=1e3*n[0]+n[1]/1e6}else t=Date.now();return t}n.d(t,"a",(function(){return r}))}).call(this,n(2))},function(e,t){},,,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},,,function(e,t){},function(e,t){},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(14);function o(){return!("object"==typeof e&&"[object process]"===String(e)&&!e.browser)||Object(r.a)()}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){function r(t){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if(void 0!==e&&"object"==typeof e.versions&&Boolean(e.versions.electron))return!0;const n="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,r=t||n;return!!(r&&r.indexOf("Electron")>=0)}n.d(t,"a",(function(){return r}))}).call(this,n(2))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return o}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document,"object"!=typeof r||"[object process]"!==String(r)||r.browser;const o="undefined"!=typeof window&&void 0!==window.orientation,s=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);s&&parseFloat(s[1])}).call(this,n(7),n(2))},function(e,t){},function(e,t,n){const r=n(23);globalThis.loaders=globalThis.loaders||{},e.exports=Object.assign(globalThis.loaders,r)},,,,,function(e,t){},function(e,t,n){"use strict";n.r(t),n.d(t,"fetchFile",(function(){return j})),n.d(t,"readArrayBuffer",(function(){return M})),n.d(t,"readFileSync",(function(){return D})),n.d(t,"writeFile",(function(){return z})),n.d(t,"writeFileSync",(function(){return Q})),n.d(t,"setLoaderOptions",(function(){return Te})),n.d(t,"registerLoaders",(function(){return ke})),n.d(t,"selectLoader",(function(){return Ee})),n.d(t,"selectLoaderSync",(function(){return je})),n.d(t,"parse",(function(){return ft})),n.d(t,"parseSync",(function(){return dt})),n.d(t,"parseInBatches",(function(){return ht})),n.d(t,"load",(function(){return pt})),n.d(t,"loadInBatches",(function(){return yt})),n.d(t,"encode",(function(){return mt})),n.d(t,"encodeSync",(function(){return wt})),n.d(t,"encodeInBatches",(function(){return vt})),n.d(t,"encodeText",(function(){return bt})),n.d(t,"encodeURLtoURL",(function(){return _t})),n.d(t,"save",(function(){return xt})),n.d(t,"saveSync",(function(){return At})),n.d(t,"setPathPrefix",(function(){return i})),n.d(t,"getPathPrefix",(function(){return a})),n.d(t,"resolvePath",(function(){return u})),n.d(t,"RequestScheduler",(function(){return jt})),n.d(t,"makeIterator",(function(){return st})),n.d(t,"makeStream",(function(){return Pt})),n.d(t,"makeDOMStream",(function(){return Bt})),n.d(t,"makeNodeStream",(function(){return Ft.a})),n.d(t,"NullWorkerLoader",(function(){return It})),n.d(t,"NullLoader",(function(){return Wt})),n.d(t,"JSONLoader",(function(){return Ut})),n.d(t,"_fetchProgress",(function(){return $t})),n.d(t,"_BrowserFileSystem",(function(){return Dt})),n.d(t,"_unregisterLoaders",(function(){return Le})),n.d(t,"isBrowser",(function(){return F.c})),n.d(t,"isWorker",(function(){return F.d})),n.d(t,"self",(function(){return F.e})),n.d(t,"window",(function(){return F.f})),n.d(t,"global",(function(){return F.b})),n.d(t,"document",(function(){return F.a})),n.d(t,"assert",(function(){return N})),n.d(t,"forEach",(function(){return tt})),n.d(t,"concatenateArrayBuffersAsync",(function(){return nt})),n.d(t,"makeTextDecoderIterator",(function(){return zt})),n.d(t,"makeTextEncoderIterator",(function(){return Qt})),n.d(t,"makeLineIterator",(function(){return Ht})),n.d(t,"makeNumberedLineIterator",(function(){return Gt})),n.d(t,"isPureObject",(function(){return d})),n.d(t,"isPromise",(function(){return h})),n.d(t,"isIterable",(function(){return p})),n.d(t,"isAsyncIterable",(function(){return y})),n.d(t,"isIterator",(function(){return g})),n.d(t,"isResponse",(function(){return m})),n.d(t,"isReadableStream",(function(){return b})),n.d(t,"isWritableStream",(function(){return v}));var r={};n.r(r),n.d(r,"filename",(function(){return B})),n.d(r,"dirname",(function(){return O})),n.d(r,"join",(function(){return C}));let o="";const s={};function i(e){o=e}function a(){return o}function u(e){for(const t in s)if(e.startsWith(t)){const n=s[t];e=e.replace(t,n)}return e.startsWith("http://")||e.startsWith("https://")||(e=`${o}${e}`),e}const c=e=>"boolean"==typeof e,l=e=>"function"==typeof e,f=e=>null!==e&&"object"==typeof e,d=e=>f(e)&&e.constructor==={}.constructor,h=e=>f(e)&&l(e.then),p=e=>e&&"function"==typeof e[Symbol.iterator],y=e=>e&&"function"==typeof e[Symbol.asyncIterator],g=e=>e&&l(e.next),m=e=>"undefined"!=typeof Response&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json,w=e=>"undefined"!=typeof Blob&&e instanceof Blob,b=e=>(e=>"undefined"!=typeof ReadableStream&&e instanceof ReadableStream||f(e)&&l(e.tee)&&l(e.cancel)&&l(e.getReader))(e)||(e=>f(e)&&l(e.read)&&l(e.pipe)&&c(e.readable))(e),v=e=>(e=>f(e)&&l(e.abort)&&l(e.getWriter))(e)||(e=>f(e)&&l(e.end)&&l(e.write)&&c(e.writable))(e),_=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,T=/^([-\w.]+\/[-\w.+]+)/;function x(e){const t=T.exec(e);return t?t[1]:e}function A(e){const t=_.exec(e);return t?t[1]:""}const S=/\?.*/;function k(e){if(m(e)){const t=L(e.url||"");return{url:t,type:x(e.headers.get("content-type")||"")||A(t)}}return w(e)?{url:L(e.name||""),type:e.type||""}:"string"==typeof e?{url:L(e),type:A(e)}:{url:"",type:""}}function L(e){return e.replace(S,"")}async function R(e){if(m(e))return e;const t={},n=function(e){return m(e)?e.headers["content-length"]||-1:w(e)?e.size:"string"==typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}(e);n>=0&&(t["content-length"]=String(n));const{url:r,type:o}=k(e);o&&(t["content-type"]=o);const s=await async function(e){if("string"==typeof e)return"data:,"+e.slice(0,5);if(e instanceof Blob){const t=e.slice(0,5);return await new Promise(e=>{const n=new FileReader;n.onload=t=>{var n;return e(null==t||null===(n=t.target)||void 0===n?void 0:n.result)},n.readAsDataURL(t)})}if(e instanceof ArrayBuffer){const t=e.slice(0,5);return"data:base64,"+function(e){let t="";const n=new Uint8Array(e);for(let e=0;e<n.byteLength;e++)t+=String.fromCharCode(n[e]);return btoa(t)}(t)}return null}(e);s&&(t["x-first-bytes"]=s),"string"==typeof e&&(e=(new TextEncoder).encode(e));const i=new Response(e,{headers:t});return Object.defineProperty(i,"url",{value:r}),i}async function E(e){if(!e.ok){const t=await async function(e){let t=`Failed to fetch resource ${e.url} (${e.status}): `;try{const n=e.headers.get("Content-Type");let r=e.statusText;n.includes("application/json")&&(r+=" "+await e.text()),t+=r,t=t.length>60?t.slice(60)+"...":t}catch(e){}return t}(e);throw new Error(t)}}async function j(e,t){if("string"==typeof e){e=u(e);let n=t;return null!=t&&t.fetch&&"function"!=typeof(null==t?void 0:t.fetch)&&(n=t.fetch),await fetch(e,n)}return await R(e)}function B(e){const t=e&&e.lastIndexOf("/");return t>=0?e.substr(t+1):""}function O(e){const t=e&&e.lastIndexOf("/");return t>=0?e.substr(0,t):""}function C(...e){return(e=e.map((t,n)=>(n&&(t=t.replace(new RegExp("^/"),"")),n!==e.length-1&&(t=t.replace(new RegExp("/$"),"")),t))).join("/")}n(4);var P=n(11);async function M(e,t,n){if("number"==typeof e)return await P._readToArrayBuffer(e,t,n);e instanceof Blob||(e=new Blob([e]));const r=e.slice(t,t+n);return await async function(e){return await new Promise((t,n)=>{const r=new FileReader;r.onload=e=>{var n;return t(null==e||null===(n=e.target)||void 0===n?void 0:n.result)},r.onerror=e=>n(e),r.readAsArrayBuffer(e)})}(r)}var F=n(0),I=n(8);function W(e){return e&&"object"==typeof e&&e.isBuffer}function U(e){return I.toBuffer?I.toBuffer(e):e}function q(e){if(W(e))return function(e){if(W(e)){return new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer}return e}(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if("string"==typeof e){const t=e;return(new TextEncoder).encode(t).buffer}if(e&&"object"==typeof e&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function $(...e){const t=e.map(e=>e instanceof ArrayBuffer?new Uint8Array(e):e),n=t.reduce((e,t)=>e+t.byteLength,0),r=new Uint8Array(n);let o=0;for(const e of t)r.set(e,o),o+=e.byteLength;return r.buffer}function N(e,t){if(!e)throw new Error(t||"loader assertion failed.")}function D(e,t={}){if(e=u(e),!F.c){const n=P.readFileSync(e,t);return"string"!=typeof n?q(n):n}return t.nothrow||N(!1),null}async function z(e,t,n){e=u(e),F.c||await P.writeFile(e,U(t),{flag:"w"}),N(!1)}function Q(e,t,n){e=u(e),F.c||P.writeFileSync(e,U(t),{flag:"w"}),N(!1)}var H=n(13);const G=Object(H.a)();class J{constructor(e,t,n="sessionStorage"){this.storage=function(e){try{const t=window[e],n="__storage_test__";return t.setItem(n,n),t.removeItem(n),t}catch(e){return null}}(n),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function V(e,t,n,r=600){const o=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>r&&(n=Math.min(n,r/e.width));const s=e.width*n,i=e.height*n,a=["font-size:1px;","padding:".concat(Math.floor(i/2),"px ").concat(Math.floor(s/2),"px;"),"line-height:".concat(i,"px;"),"background:url(".concat(o,");"),"background-size:".concat(s,"px ").concat(i,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}const Y={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function K(e){return"string"==typeof e?Y[e.toUpperCase()]||Y.WHITE:e}function X(e,t){if(!e)throw new Error(t||"Assertion failed")}var Z=n(1);function ee(){let e;if(G&&Z.b.performance)e=Z.b.performance.now();else if(Z.a.hrtime){const t=Z.a.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}const te={debug:G&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},ne={enabled:!0,level:0};function re(){}const oe={},se={once:!0};function ie(e){for(const t in e)for(const n in e[t])return n||"untitled";return"empty"}class ae{constructor({id:e}={id:""}){this.id=e,this.VERSION="3.1.0-alpha.5",this._startTs=ee(),this._deltaTs=ee(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new J("__probe-".concat(this.id,"__"),ne),this.userData={},this.timeStamp("".concat(this.id," started")),function(e,t=["constructor"]){const n=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(n);for(const n of r)"function"==typeof e[n]&&(t.find(e=>n===e)||(e[n]=e[n].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((ee()-this._startTs).toPrecision(10))}getDelta(){return Number((ee()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}assert(e,t){X(e,t)}warn(e){return this._getLogFunction(0,e,te.warn,arguments,se)}error(e){return this._getLogFunction(0,e,te.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,te.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,te.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,te.debug||te.info,arguments,se)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||re,n&&[n],{tag:ie(t)}):re}image({logLevel:e,priority:t,image:r,message:o="",scale:s=1}){return this._shouldLog(e||t)?G?function({image:e,message:t="",scale:n=1}){if("string"==typeof e){const r=new Image;return r.onload=()=>{const e=V(r,t,n);console.log(...e)},r.src=e,re}const r=e.nodeName||"";if("img"===r.toLowerCase())return console.log(...V(e,t,n)),re;if("canvas"===r.toLowerCase()){const r=new Image;return r.onload=()=>console.log(...V(r,t,n)),r.src=e.toDataURL(),re}return re}({image:r,message:o,scale:s}):function({image:e,message:t="",scale:r=1}){let o=null;try{o=n(22)}catch(e){}if(o)return()=>o(e,{fit:"box",width:"".concat(Math.round(80*r),"%")}).then(e=>console.log(e));return re}({image:r,message:o,scale:s}):re}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||re)}group(e,t,n={collapsed:!1}){n=ce({logLevel:e,message:t,opts:n});const{collapsed:r}=n;return n.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||re)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ue(e)}_getLogFunction(e,t,n,r=[],o){if(this._shouldLog(e)){o=ce({logLevel:e,message:t,args:r,opts:o}),X(n=n||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=ee();const s=o.tag||o.message;if(o.once){if(oe[s])return re;oe[s]=ee()}return t=function(e,t,n){if("string"==typeof t){const i=n.time?function(e,t=8){const n=Math.max(t-e.length,0);return"".concat(" ".repeat(n)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(n.total)):"";t=n.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),r=t,o=n.color,s=n.background,G||"string"!=typeof r||(o&&(o=K(o),r="[".concat(o,"m").concat(r,"[39m")),s&&(o=K(s),r="[".concat(s+10,"m").concat(r,"[49m"))),t=r}var r,o,s;return t}(this.id,o.message,o),n.bind(console,t,...o.args)}return re}}function ue(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return X(Number.isFinite(t)&&t>=0),t}function ce(e){const{logLevel:t,message:n}=e;e.logLevel=ue(t);const r=e.args?Array.from(e.args):[];for(;r.length&&r.shift()!==n;);switch(e.args=r,typeof t){case"string":case"function":void 0!==n&&r.unshift(n),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const o=typeof e.message;return X("string"===o||"object"===o),Object.assign(e,e.opts)}ae.VERSION="3.1.0-alpha.5";const le=new ae({id:"loaders.gl"});class fe{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}const de={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){var e,t,n;n=void 0,(t="console")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}},CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},he={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function pe(){globalThis.loaders=globalThis.loaders||{};const{loaders:e}=globalThis;return e._state=e._state||{},e._state}const ye=()=>{const e=pe();return e.globalOptions=e.globalOptions||{...de},e.globalOptions};function ge(e,t,n,r){return n=n||[],function(e,t){we(e,null,de,he,t);for(const n of t){const r=e&&e[n.id]||{},o=n.options&&n.options[n.id]||{},s=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};we(r,n.id,o,s,t)}}(e,n=Array.isArray(n)?n:[n]),ve(t,e,r)}function me(e,t){const n=ye(),r=e||n;return"function"==typeof r.fetch?r.fetch:f(r.fetch)?e=>j(e,r):null!=t&&t.fetch?null==t?void 0:t.fetch:j}function we(e,t,n,r,o){const s=t||"Top level",i=t?t+".":"";for(const a in e){const u=!t&&f(e[a]),c="baseUri"===a&&!t,l="workerUrl"===a&&t;if(!(a in n)&&!c&&!l)if(a in r)le.warn(`${s} loader option '${i}${a}' no longer supported, use '${r[a]}'`)();else if(!u){const e=be(a,o);le.warn(`${s} loader option '${i}${a}' not recognized. ${e}`)()}}}function be(e,t){const n=e.toLowerCase();let r="";for(const o of t)for(const t in o.options){if(e===t)return`Did you mean '${o.id}.${t}'?`;const s=t.toLowerCase();(n.startsWith(s)||s.startsWith(n))&&(r=r||`Did you mean '${o.id}.${t}'?`)}return r}function ve(e,t,n){const r={...e.options||{}};return function(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)}(r,n),null===r.log&&(r.log=new fe),_e(r,ye()),_e(r,t),r}function _e(e,t){for(const n in t)if(n in t){const r=t[n];d(r)&&d(e[n])?e[n]={...e[n],...t[n]}:e[n]=t[n]}}function Te(e){!function(e){const t=pe(),n=ye();t.globalOptions=ve(n,e)}(e)}function xe(e){var t;if(!e)return!1;Array.isArray(e)&&(e=e[0]);return Array.isArray(null===(t=e)||void 0===t?void 0:t.extensions)}function Ae(e){var t,n;let r;return N(e,"null loader"),N(xe(e),"invalid loader"),Array.isArray(e)&&(r=e[1],e=e[0],e={...e,options:{...e.options,...r}}),(null!==(t=e)&&void 0!==t&&t.parseTextSync||null!==(n=e)&&void 0!==n&&n.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}const Se=()=>{const e=pe();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function ke(e){const t=Se();e=Array.isArray(e)?e:[e];for(const n of e){const e=Ae(n);t.find(t=>e===t)||t.unshift(e)}}function Le(){pe().loaderRegistry=[]}const Re=/\.([^.]+)$/;async function Ee(e,t=[],n,r){if(!Be(e))return null;let o=je(e,t,{...n,nothrow:!0},r);if(o)return o;if(w(e)&&(o=je(e=await e.slice(0,10).arrayBuffer(),t,n,r)),!(o||null!=n&&n.nothrow))throw new Error(Oe(e));return o}function je(e,t=[],n,r){if(!Be(e))return null;if(t&&!Array.isArray(t))return Ae(t);let o=[];t&&(o=o.concat(t)),null!=n&&n.ignoreRegisteredLoaders||o.push(...Se()),function(e){for(const t of e)Ae(t)}(o);const s=function(e,t,n,r){const{url:o,type:s}=k(e),i=o||(null==r?void 0:r.url);let a=null;null!=n&&n.mimeType&&(a=Ce(t,null==n?void 0:n.mimeType));return a=a||function(e,t){const n=t&&Re.exec(t),r=n&&n[1];return r?function(e,t){t=t.toLowerCase();for(const n of e)for(const e of n.extensions)if(e.toLowerCase()===t)return n;return null}(e,r):null}(t,i),a=a||Ce(t,s),a=a||function(e,t){if(!t)return null;for(const n of e)if("string"==typeof t){if(Pe(t,n))return n}else if(ArrayBuffer.isView(t)){if(Me(t.buffer,t.byteOffset,n))return n}else if(t instanceof ArrayBuffer){if(Me(t,0,n))return n}return null}(t,e),a=a||Ce(t,null==n?void 0:n.fallbackMimeType),a}(e,o,n,r);if(!(s||null!=n&&n.nothrow))throw new Error(Oe(e));return s}function Be(e){return!(e instanceof Response&&204===e.status)}function Oe(e){const{url:t,type:n}=k(e);let o="No valid loader found (";o+=t?r.filename(t)+", ":"no url provided, ",o+=`MIME type: ${n?`"${n}"`:"not provided"}, `;const s=e?function(e,t=5){if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return Fe(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return Fe(e,0,t)}return""}(e):"";return o+=s?` first bytes: "${s}"`:"first bytes: not available",o+=")",o}function Ce(e,t){for(const n of e){if(n.mimeTypes&&n.mimeTypes.includes(t))return n;if(t==="application/x."+n.id)return n}return null}function Pe(e,t){if(t.testText)return t.testText(e);return(Array.isArray(t.tests)?t.tests:[t.tests]).some(t=>e.startsWith(t))}function Me(e,t,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some(r=>function(e,t,n,r){if(r instanceof ArrayBuffer)return function(e,t,n){if(n=n||e.byteLength,e.byteLength<n||t.byteLength<n)return!1;const r=new Uint8Array(e),o=new Uint8Array(t);for(let e=0;e<r.length;++e)if(r[e]!==o[e])return!1;return!0}(r,e,r.byteLength);switch(typeof r){case"function":return r(e,n);case"string":const o=Fe(e,t,r.length);return r===o;default:return!1}}(e,t,n,r))}function Fe(e,t,n){if(e.byteLength<t+n)return"";const r=new DataView(e);let o="";for(let e=0;e<n;e++)o+=String.fromCharCode(r.getUint8(t+e));return o}function Ie(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}var We=n(15);const Ue=new Map;function qe(e){Ie(e.source&&!e.url||!e.source&&e.url);let t=Ue.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return $e((t=e,`try {\n importScripts('${t}');\n} catch (error) {\n console.error(error);\n throw error;\n}`));var t}(e.url),Ue.set(e.url,t)),e.source&&(t=$e(e.source),Ue.set(e.source,t))),Ie(t),t}function $e(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function Ne(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}function De(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ze=()=>{};class Qe{static isSupported(){return"undefined"!=typeof Worker}constructor(e){De(this,"name",void 0),De(this,"source",void 0),De(this,"url",void 0),De(this,"terminated",!1),De(this,"worker",void 0),De(this,"onMessage",void 0),De(this,"onError",void 0),De(this,"_loadableURL","");const{name:t,source:n,url:r}=e;Ie(n||r),this.name=t,this.source=n,this.url=r,this.onMessage=ze,this.onError=e=>console.log(e),this.worker=this._createBrowserWorker()}destroy(){this.onMessage=ze,this.onError=ze,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||function e(t,n=!0,r){const o=r||new Set;if(t){if(Ne(t))o.add(t);else if(Ne(t.buffer))o.add(t.buffer);else if(ArrayBuffer.isView(t));else if(n&&"object"==typeof t)for(const r in t)e(t[r],n,o)}else;return void 0===r?Array.from(o):[]}(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=e.message+" in "),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=qe({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}}function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ge{constructor(e,t){He(this,"name",void 0),He(this,"workerThread",void 0),He(this,"isRunning",void 0),He(this,"result",void 0),He(this,"_resolve",void 0),He(this,"_reject",void 0),this.name=e,this.workerThread=t,this.isRunning=!0,this._resolve=()=>{},this._reject=()=>{},this.result=new Promise((e,t)=>{this._resolve=e,this._reject=t})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){Ie(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Ie(this.isRunning),this.isRunning=!1,this._reject(e)}}function Je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ve{constructor(e){Je(this,"name","unnamed"),Je(this,"source",void 0),Je(this,"url",void 0),Je(this,"maxConcurrency",1),Je(this,"maxMobileConcurrency",1),Je(this,"onDebug",()=>{}),Je(this,"reuseWorkers",!0),Je(this,"props",{}),Je(this,"jobQueue",[]),Je(this,"idleQueue",[]),Je(this,"count",0),Je(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e,t=((e,t,n)=>e.done(n)),n=((e,t)=>e.error(t))){const r=new Promise(r=>(this.jobQueue.push({name:e,onMessage:t,onError:n,onStart:r}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const n=new Ge(t.name,e);e.onMessage=e=>t.onMessage(n,e.type,e.payload),e.onError=e=>t.onError(n,e),t.onStart(n);try{await n.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new Qe({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return We.a?this.maxMobileConcurrency:this.maxConcurrency}}function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ke={maxConcurrency:3,maxMobileConcurrency:1,onDebug:()=>{},reuseWorkers:!0};class Xe{static isSupported(){return Qe.isSupported()}static getWorkerFarm(e={}){return Xe._workerFarm=Xe._workerFarm||new Xe({}),Xe._workerFarm.setProps(e),Xe._workerFarm}constructor(e){Ye(this,"props",void 0),Ye(this,"workerPools",new Map),this.props={...Ke},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy()}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:r}=e;let o=this.workerPools.get(t);return o||(o=new Ve({name:t,source:n,url:r}),o.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,o)),o}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}Ye(Xe,"_workerFarm",void 0);async function Ze(e,t,n,r,o){const s=e.id,i=function(e,t={}){const n=t[e.id]||{},r=e.id+"-worker.js";let o=n.workerUrl;if("test"===t._workerType&&(o=`modules/${e.module}/dist/${r}`),!o){let t=e.version;"latest"===t&&(t="beta");const n=t?"@"+t:"";o=`https://unpkg.com/@loaders.gl/${e.module}${n}/dist/${r}`}return Ie(o),o}(e,n),a=Xe.getWorkerFarm(n).getWorkerPool({name:s,url:i});n=JSON.parse(JSON.stringify(n));const u=await a.startJob("process-on-worker",et.bind(null,o));u.postMessage("process",{input:t,options:n});const c=await u.result;return await c.result}async function et(e,t,n,r){switch(n){case"done":t.done(r);break;case"error":t.error(r.error);break;case"process":const{id:o,input:s,options:i}=r;try{const n=await e(s,i);t.postMessage("done",{id:o,result:n})}catch(e){const n=e instanceof Error?e.message:"unknown error";t.postMessage("error",{id:o,error:n})}break;default:console.warn("parse-with-worker unknown message "+n)}}async function tt(e,t){for(;;){const{done:n,value:r}=await e.next();if(n)return void e.return();if(t(r))return}}async function nt(e){const t=[];for await(const n of e)t.push(n);return $(...t)}const rt=262144;function ot(e,t){return F.c?async function*(e,t){const n=e.getReader();let r;try{for(;;){const e=r||n.read();null!=t&&t._streamReadAhead&&(r=n.read());const{done:o,value:s}=await e;if(o)return;yield q(s)}}catch(e){n.releaseLock()}}(e,t):async function*(e,t){for await(const t of e)yield q(t)}(e)}function st(e,t){if("string"==typeof e)return function*(e,t){const n=(null==t?void 0:t.chunkSize)||262144;let r=0;const o=new TextEncoder;for(;r<e.length;){const t=Math.min(e.length-r,n),s=e.slice(r,r+t);r+=t,yield o.encode(s)}}(e,t);if(e instanceof ArrayBuffer)return function*(e,t={}){const{chunkSize:n=rt}=t;let r=0;for(;r<e.byteLength;){const t=Math.min(e.byteLength-r,n),o=new ArrayBuffer(t),s=new Uint8Array(e,r,t);new Uint8Array(o).set(s),r+=t,yield o}}(e,t);if(w(e))return async function*(e,t){const n=(null==t?void 0:t.chunkSize)||1048576;let r=0;for(;r<e.size;){const t=r+n,o=await e.slice(r,t).arrayBuffer();r=t,yield o}}(e,t);if(b(e))return ot(e,t);if(m(e)){return ot(e.body,t)}throw new Error("makeIterator")}const it="Cannot convert supplied data type";function at(e,t,n){if(t.text&&"string"==typeof e)return e;var r;if((r=e)&&"object"==typeof r&&r.isBuffer&&(e=e.buffer),e instanceof ArrayBuffer){const n=e;if(t.text&&!t.binary){return new TextDecoder("utf8").decode(n)}return n}if(ArrayBuffer.isView(e)){if(t.text&&!t.binary){return new TextDecoder("utf8").decode(e)}let n=e.buffer;const r=e.byteLength||e.length;return 0===e.byteOffset&&r===n.byteLength||(n=n.slice(e.byteOffset,e.byteOffset+r)),n}throw new Error(it)}async function ut(e,t){if(g(e))return e;if(m(e)){const n=e;await E(n);return st(await n.body,t)}return w(e)||b(e)?st(e,t):y(e)?e[Symbol.asyncIterator]():function(e){if(ArrayBuffer.isView(e))return function*(){yield e.buffer}();if(e instanceof ArrayBuffer)return function*(){yield e}();if(g(e))return e;if(p(e))return e[Symbol.iterator]();throw new Error(it)}(e)}function ct(e,t,n=null){if(n)return n;const r={fetch:me(t,e),...e};return Array.isArray(r.loaders)||(r.loaders=null),r}function lt(e,t){if(!t&&e&&!Array.isArray(e))return e;let n;if(e&&(n=Array.isArray(e)?e:[e]),t&&t.loaders){const e=Array.isArray(t.loaders)?t.loaders:[t.loaders];n=n?[...n,...e]:e}return n&&n.length?n:null}async function ft(e,t,n,r){Ie(!r||"object"==typeof r),!t||Array.isArray(t)||xe(t)||(r=void 0,n=t,t=void 0),e=await e,n=n||{};const{url:o}=k(e),s=lt(t,r),i=await Ee(e,s,n);return i?(r=ct({url:o,parse:ft,loaders:s},n=ge(n,i,s,o),r),await async function(e,t,n,r){if(function(e,t="3.1.0-alpha.5"){Ie(e,"no worker provided");const n=e.version}(e),t=await async function(e,t,n){const r=e instanceof ArrayBuffer||ArrayBuffer.isView(e);if("string"==typeof e||r)return at(e,t);if(w(e)&&(e=await R(e)),m(e)){const n=e;return await E(n),t.binary?await n.arrayBuffer():await n.text()}if(b(e)&&(e=st(e,n)),p(e)||y(e))return nt(e);throw new Error(it)}(t,e,n),e.parseTextSync&&"string"==typeof t)return n.dataType="text",e.parseTextSync(t,n,r,e);if(function(e,t){return!!Xe.isSupported()&&(e.worker&&(null==t?void 0:t.worker))}(e,n))return await Ze(e,t,n,0,ft);if(e.parseText&&"string"==typeof t)return await e.parseText(t,n,r,e);if(e.parse)return await e.parse(t,n,r,e);throw Ie(!e.parseSync),new Error(e.id+" loader - no parser found and worker is disabled")}(i,e,n,r)):null}function dt(e,t,n,r){N(!r||"object"==typeof r),Array.isArray(t)||xe(t)||(r=void 0,n=t,t=void 0),n=n||{};const o=lt(t,r),s=je(e,o,n);if(!s)return null;n=ge(n,s,o);const{url:i}=k(e);return function(e,t,n,r){if(t=at(t,e),e.parseTextSync&&"string"==typeof t)return e.parseTextSync(t,n);if(e.parseSync&&t instanceof ArrayBuffer)return e.parseSync(t,n,r);throw new Error(`${e.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${r.url||""}`)}(s,e,n,r=ct({url:i,parseSync:dt,parse:()=>{throw new Error("parseSync called parse")},loaders:t},n))}async function ht(e,t,n,r){N(!r||"object"==typeof r),Array.isArray(t)||xe(t)||(r=void 0,n=t,t=void 0),e=await e,n=n||{};const{url:o}=k(e),s=await Ee(e,t,n);return s?(r=ct({url:o,parseInBatches:ht,parse:ft,loaders:t},n=ge(n,s,t,o),r),await async function(e,t,n,r){const o=await async function(e,t,n,r){const o=await ut(t,n),s=await async function(e,t=[]){let n=e;for await(const e of t)n=e(n);return n}(o,(null==n?void 0:n.transforms)||[]);if(e.parseInBatches)return e.parseInBatches(s,n,r);return async function*(){const t=await nt(s),o=await ft(t,e,{...n,mimeType:e.mimeTypes[0]},r),i={mimeType:e.mimeTypes[0],shape:Array.isArray(o)?"row-table":"unknown",batchType:"data",data:o,length:Array.isArray(o)?o.length:1};yield i}()}(e,t,n,r);if(!n.metadata)return o;const s={batchType:"metadata",metadata:{_loader:e,_context:r},data:[],bytesUsed:0};return async function*(e){yield s,yield*e}(o)}(s,e,n,r)):null}async function pt(e,t,n,r){Array.isArray(t)||xe(t)||(void 0,n=t,t=void 0);const o=me(n);let s=e;return"string"==typeof e&&(s=await o(e)),w(e)&&(s=await o(e)),await ft(s,t,n)}function yt(e,t,n,r){Array.isArray(t)||xe(t)||(void 0,n=t,t=null);const o=me(n||{});if(!Array.isArray(e))return gt(e,t,n,o);return e.map(e=>gt(e,t,n,o))}async function gt(e,t,n,r){if("string"==typeof e){const o=e,s=await r(o);return await ht(s,t,n)}return await ht(e,t,n)}async function mt(e,t,n){if(t.encode)return await t.encode(e,n);if(t.encodeSync)return t.encodeSync(e,n);if(t.encodeText)return(new TextEncoder).encode(await t.encodeText(e,n));if(t.encodeInBatches){const r=vt(e,t,n),o=[];for await(const e of r)o.push(e);return $(...o)}if(!F.c&&t.encodeURLtoURL){const r=Tt("input");await z(r,e);const o=Tt("output"),s=await _t(r,o,t,n);return(await j(s)).arrayBuffer()}throw new Error("Writer could not encode data")}function wt(e,t,n){if(t.encodeSync)return t.encodeSync(e,n);throw new Error("Writer could not synchronously encode data")}async function bt(e,t,n){if(t.text&&t.encodeText)return await t.encodeText(e,n);if(t.text&&(t.encode||t.encodeInBatches)){const r=await mt(e,t,n);return(new TextDecoder).decode(r)}throw new Error("Writer could not encode data as text")}function vt(e,t,n){if(t.encodeInBatches){const r=function(e){return[{table:e,start:0,end:e.length}]}(e);return t.encodeInBatches(r,n)}throw new Error("Writer could not encode data in batches")}async function _t(e,t,n,r){if(e=u(e),t=u(t),F.c||!n.encodeURLtoURL)throw new Error;return await n.encodeURLtoURL(e,t,r)}function Tt(e){return"/tmp/"+e}async function xt(e,t,n,r){const o=await mt(e,n,r);return await z(t,o)}function At(e,t,n,r){return Q(t,wt(e,n,r))}var St=n(3);class kt{constructor(e,t){this.name=e,this.type=t,this.sampleSize=1,this.reset()}setSampleSize(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Object(St.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(St.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class Lt{constructor({id:e,stats:t}){this.id=e,this.stats={},this._initializeStats(t),Object.seal(this)}get(e,t="count"){return this._getOrCreate({name:e,type:t})}get size(){return Object.keys(this.stats).length}reset(){for(const e in this.stats)this.stats[e].reset();return this}forEach(e){for(const t in this.stats)e(this.stats[t])}getTable(){const e={};return this.forEach(t=>{e[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}}),e}_initializeStats(e=[]){e.forEach(e=>this._getOrCreate(e))}_getOrCreate(e){if(!e||!e.name)return null;const{name:t,type:n}=e;return this.stats[t]||(this.stats[t]=e instanceof kt?e:new kt(t,n)),this.stats[t]}}function Rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Et={id:"request-scheduler",throttleRequests:!0,maxRequests:6};class jt{constructor(e={}){Rt(this,"props",void 0),Rt(this,"stats",void 0),Rt(this,"activeRequestCount",0),Rt(this,"requestQueue",[]),Rt(this,"requestMap",new Map),Rt(this,"deferredUpdate",null),this.props={...Et,...e},this.stats=new Lt({id:this.props.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever")}scheduleRequest(e,t=(()=>0)){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(e))return this.requestMap.get(e);const n={handle:e,priority:0,getPriority:t},r=new Promise(e=>(n.resolve=e,n));return this.requestQueue.push(n),this.requestMap.set(e,r),this._issueNewRequests(),r}_issueRequest(e){const{handle:t,resolve:n}=e;let r=!1;const o=()=>{r||(r=!0,this.requestMap.delete(t),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:o}):Promise.resolve({done:o})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const e=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==e){this._updateAllRequests();for(let t=0;t<e;++t){const e=this.requestQueue.shift();e&&this._issueRequest(e)}}}_updateAllRequests(){const e=this.requestQueue;for(let t=0;t<e.length;++t){const n=e[t];this._updateRequest(n)||(e.splice(t,1),this.requestMap.delete(n.handle),t--)}e.sort((e,t)=>e.priority-t.priority)}_updateRequest(e){return e.priority=e.getPriority(e.handle),!(e.priority<0)||(e.resolve(null),!1)}}function Bt(e,t){const n=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new ReadableStream({type:"bytes",async pull(e){try{const{done:t,value:r}=await n.next();t?e.close():e.enqueue(new Uint8Array(r))}catch(t){e.error(t)}},async cancel(){var e;await(null==n||null===(e=n.return)||void 0===e?void 0:e.call(n))}},{highWaterMark:2**24,...t})}var Ot=n(16),Ct=n.n(Ot);function Pt(e,t){return F.c?Bt(e,t):Ct()(e,t)}var Mt=n(12),Ft=n.n(Mt);const It={name:"Null loader",id:"null",module:"core",version:"3.1.0-alpha.5",worker:!0,mimeTypes:["application/x.empty"],extensions:["null"],tests:[()=>!1],options:{null:{}}},Wt={name:"Null loader",id:"null",module:"core",version:"3.1.0-alpha.5",mimeTypes:["application/x.empty"],extensions:["null"],parse:async e=>e,parseSync:e=>e,parseInBatches:async function*(e){for await(const t of e)yield t},tests:[()=>!1],options:{null:{}}},Ut={name:"JSON",id:"json",module:"json",version:"3.1.0-alpha.5",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:qt,parse:async e=>qt((new TextDecoder).decode(e)),options:{}};function qt(e){return JSON.parse(e)}async function $t(e,t,n=(()=>{}),r=(()=>{})){if(!(e=await e).ok)return e;const o=e.body;if(!o)return e;const s=e.headers.get("content-length")||0,i=s&&parseInt(s);if(!(s>0))return e;if("undefined"==typeof ReadableStream||!o.getReader)return e;const a=new ReadableStream({async start(e){const s=o.getReader();await async function e(t,n,r,o,s,i,a){try{const{done:u,value:c}=await n.read();if(u)return i(),void t.close();r+=c.byteLength;const l=Math.round(r/o*100);s(l,{loadedBytes:r,totalBytes:o}),t.enqueue(c),await e(t,n,r,o,s,i,a)}catch(e){t.error(e),a(e)}}(e,s,0,i,t,n,r)}});return new Response(a)}function Nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Dt{constructor(e,t){Nt(this,"_fetch",void 0),Nt(this,"files",{}),Nt(this,"lowerCaseFiles",{}),Nt(this,"usedFiles",{}),this._fetch=(null==t?void 0:t.fetch)||fetch;for(let t=0;t<e.length;++t){const n=e[t];this.files[n.name]=n,this.lowerCaseFiles[n.name.toLowerCase()]=n,this.usedFiles[n.name]=!1}this.fetch=this.fetch.bind(this)}async fetch(e,t){if(e.includes("://"))return this._fetch(e,t);const n=this.files[e];if(!n)return new Response(e,{status:400,statusText:"NOT FOUND"});const r=new Headers(null==t?void 0:t.headers).get("Range"),o=r&&/bytes=($1)-($2)/.exec(r);if(o){const t=parseInt(o[1]),r=parseInt(o[2]),s=await n.slice(t,r).arrayBuffer(),i=new Response(s);return Object.defineProperty(i,"url",{value:e}),i}const s=new Response(n);return Object.defineProperty(s,"url",{value:e}),s}async readdir(e){const t=[];for(const e in this.files)t.push(e);return t}async stat(e,t){const n=this.files[e];if(!n)throw new Error(e);return{size:n.size}}async unlink(e){delete this.files[e],delete this.lowerCaseFiles[e],this.usedFiles[e]=!0}async open(e,t,n){return this.files[e]}async read(e,t,n=0,r=t.byteLength,o=null){const s=e;return{bytesRead:r,buffer:await s.slice(0,0+r).arrayBuffer()}}async close(e){}_getFile(e,t){const n=this.files[e]||this.lowerCaseFiles[e];return n&&t&&(this.usedFiles[e]=!0),n}}async function*zt(e,t={}){const n=new TextDecoder(void 0,t);for await(const t of e)yield"string"==typeof t?t:n.decode(t,{stream:!0})}async function*Qt(e){const t=new TextEncoder;for await(const n of e)yield"string"==typeof n?t.encode(n):n}async function*Ht(e){let t="";for await(const n of e){let e;for(t+=n;(e=t.indexOf("\n"))>=0;){const n=t.slice(0,e+1);t=t.slice(e+1),yield n}}t.length>0&&(yield t)}async function*Gt(e){let t=1;for await(const n of e)yield{counter:t,line:n},t++}}])}));
|
|
2
2
|
//# sourceMappingURL=dist.min.js.map
|