Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/textures

Package Overview
Dependencies
Maintainers
7
Versions
207
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/textures - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

2

dist/basis-worker.js

@@ -1,2 +0,2 @@

!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=18)}([function(t,e,r){t.exports=r(10)},function(t,e){function r(t,e,r,n,o,a,i){try{var s=t[a](i),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function s(t){r(i,o,a,s,u,"next",t)}function u(t){r(i,o,a,s,u,"throw",t)}s(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return s})),r.d(e,"c",(function(){return u}));var o=r(3),a={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},i=a.global||a.self||a.window||{},s="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,u="function"==typeof importScripts,c=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));c&&parseFloat(c[1])}).call(this,r(16),r(17))},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(11),o=r(12),a=r(13),i=r(15);t.exports=function(t,e){return n(t)||o(t,e)||a(t,e)||i()},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,a=Object.create(o.prototype),i=new j(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return E()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=x(i,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function l(){}function p(){}function d(){}var h={};h[o]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(_([])));m&&m!==e&&r.call(m,o)&&(h=m);var v=d.prototype=l.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,s){var u=c(t[o],t,a);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,i,s)}),(function(t){n("throw",t,i,s)})):e.resolve(l).then((function(t){f.value=t,i(f)}),(function(t){return n("throw",t,i,s)}))}s(u.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=v.constructor=d,d.constructor=p,p.displayName=s(d,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(g.prototype),g.prototype[a]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new g(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(v),s(v,i,"Generator"),v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(t){s=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(14);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){var r,n,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(t){n=i}}();var u,c=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!f){var t=s(p);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new h(t,e)),1!==c.length||f||s(d)},h.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(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";r.r(e);var n=r(5),o=r.n(n),a=r(1),i=r.n(a),s=r(0),u=r.n(s),c=r(6),f=r.n(c),l=r(7),p=r.n(l),d=r(3),h=r.n(d);function y(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var m=new Map,v=function(){function t(){f()(this,t)}return p()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}}},{key:"addEventListener",value:function(t){var e=m.get(t);e||(e=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=m.get(t);m.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var r={source:"loaders.gl",type:t,payload:e},n=function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(e){if(y(e))o.add(e);else if(y(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(r&&"object"===h()(e))for(var a in e)t(e[a],r,o)}else;return void 0===n?Array.from(o):[]}(e);self.postMessage(r,n)}}}]),t}();function b(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var w=0;function O(t,e){return new Promise((function(r,n){var o=w++;v.addEventListener((function t(e,a){if(a.id===o)switch(e){case"done":v.removeEventListener(t),r(a.result);break;case"error":v.removeEventListener(t),n(a.error)}}));var a={id:o,input:t,options:e};v.postMessage("process",a)}))}function j(t){return _.apply(this,arguments)}function _(){return(_=i()(u.a.mark((function t(e){var r,n,o,a,i,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.loader,n=e.arrayBuffer,o=e.options,a=e.context,!r.parseSync&&!r.parse){t.next=6;break}i=n,s=r.parseSync||r.parse,t.next=13;break;case 6:if(!r.parseTextSync){t.next=12;break}c=new TextDecoder,i=c.decode(n),s=r.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=x(x({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),t.next=16,s(i,x({},o),a,r);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var E=r(8),L=r.n(E),k=r(2),S=r(4);var P,F={};function T(t){return M.apply(this,arguments)}function M(){return(M=i()(u.a.mark((function t(e){var r,n,o=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]?o[2]:{},r&&(e=A(e,r,n)),F[e]=F[e]||B(e),t.next=6,F[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t,e,r){if(t.startsWith("http"))return t;var n=r.modules||{};return n[t]?n[t]:k.b?r.CDN?(function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),"".concat(r.CDN,"/").concat(e,"@").concat("3.0.3","/dist/libs/").concat(t)):k.c?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function B(t){return I.apply(this,arguments)}function I(){return(I=i()(u.a.mark((function t(e){var r,n,o;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return r=t.sent,t.next=6,r.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(k.b){t.next=14;break}if(t.t0=S.requireFromFile,!t.t0){t.next=13;break}return t.next=12,S.requireFromFile(e);case 12:t.t0=t.sent;case 13:return t.abrupt("return",t.t0);case 14:if(!k.c){t.next=16;break}return t.abrupt("return",importScripts(e));case 16:return t.next=18,fetch(e);case 18:return n=t.sent,t.next=21,n.text();case 21:return o=t.sent,t.abrupt("return",N(o,e));case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(t,e){if(!k.b)return S.requireFromString&&S.requireFromString(t,e);if(k.c)return eval.call(k.a,t),null;var r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}function D(t){return C.apply(this,arguments)}function C(){return(C=i()(u.a.mark((function t(e){var r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.modules||{}).basis){t.next=3;break}return t.abrupt("return",r.basis);case 3:return P=P||G(e),t.next=6,P;case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(t){return q.apply(this,arguments)}function q(){return(q=i()(u.a.mark((function t(e){var r,n,o,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,n=null,t.t0=Promise,t.next=5,T("basis_transcoder.js","textures",e);case 5:return t.t1=t.sent,t.next=8,T("basis_transcoder.wasm","textures",e);case 8:return t.t2=t.sent,t.t3=[t.t1,t.t2],t.next=12,t.t0.all.call(t.t0,t.t3);case 12:return o=t.sent,a=L()(o,2),r=a[0],n=a[1],r=r||globalThis.BASIS,t.next=19,W(r,n);case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(t,e){var r={};return e&&(r.wasmBinary=e),new Promise((function(e){t(r).then((function(t){var r=t.BasisFile;(0,t.initializeBasis)(),e({BasisFile:r})}))}))}var U={etc1:{basisFormat:0,compressed:!0},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:33776},bc3:{basisFormat:3,compressed:!0,format:33779},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0},"astc-4x4":{basisFormat:10,compressed:!0},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function z(){return(z=i()(u.a.mark((function t(e,r){var n,o,a,i,s,c,f,l,p;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,D(r);case 2:if(n=t.sent,o=n.BasisFile,a=new o(new Uint8Array(e)),t.prev=5,a.startTranscoding()){t.next=8;break}return t.abrupt("return",null);case 8:for(i=a.getNumImages(),s=[],c=0;c<i;c++){for(f=a.getNumLevels(c),l=[],p=0;p<f;p++)l.push(H(a,c,p,r));s.push(l)}return t.abrupt("return",s);case 12:return t.prev=12,a.close(),a.delete(),t.finish(12);case 16:case"end":return t.stop()}}),t,null,[[5,,12,16]])})))).apply(this,arguments)}function H(t,e,r,n){var o=t.getImageWidth(e,r),a=t.getImageHeight(e,r),i=t.getHasAlpha(),s=function(t,e){var r=t&&t.basis&&t.basis.format;return"object"===h()(r)&&(r=e?r.alpha:r.noAlpha),r=r.toLowerCase(),U[r]}(n,i),u=s.compressed,c=s.format,f=s.basisFormat,l=t.getImageTranscodedSizeInBytes(e,r,f),p=new Uint8Array(l);return t.transcodeImage(p,e,r,f,0,0)?{width:o,height:a,data:p,compressed:u,hasAlpha:i,format:c}:null}function R(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var V,$={name:"Basis",id:"basis",module:"textures",version:"3.0.3",worker:!0,extensions:["basis"],mimeTypes:["application/octet-stream"],tests:["sB"],binary:!0,options:{basis:{format:"rgb565",libraryPath:"libs/"}}},J=Y(Y({},$),{},{parse:function(t,e){return z.apply(this,arguments)}});V=J,"undefined"!=typeof self&&(v.onmessage=function(){var t=i()(u.a.mark((function t(e,r){var n,o,a,i,s;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,n=r.input,o=r.options,a=void 0===o?{}:o,t.next=7,j({loader:V,arrayBuffer:n,options:a,context:{parse:O}});case 7:i=t.sent,v.postMessage("done",{result:i}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),s=t.t1 instanceof Error?t.t1.message:"",v.postMessage("error",{error:s});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,r){return t.apply(this,arguments)}}())}]);
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=18)}([function(t,e,r){t.exports=r(10)},function(t,e){function r(t,e,r,n,o,a,i){try{var s=t[a](i),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function s(t){r(i,o,a,s,u,"next",t)}function u(t){r(i,o,a,s,u,"throw",t)}s(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return s})),r.d(e,"c",(function(){return u}));var o=r(3),a={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},i=a.global||a.self||a.window||{},s="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,u="function"==typeof importScripts,c=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));c&&parseFloat(c[1])}).call(this,r(16),r(17))},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(11),o=r(12),a=r(13),i=r(15);t.exports=function(t,e){return n(t)||o(t,e)||a(t,e)||i()},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,a=Object.create(o.prototype),i=new j(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return E()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=x(i,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function l(){}function p(){}function d(){}var h={};h[o]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(_([])));m&&m!==e&&r.call(m,o)&&(h=m);var v=d.prototype=l.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(o,a){function i(){return new e((function(n,i){!function n(o,a,i,s){var u=c(t[o],t,a);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,i,s)}),(function(t){n("throw",t,i,s)})):e.resolve(l).then((function(t){f.value=t,i(f)}),(function(t){return n("throw",t,i,s)}))}s(u.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=v.constructor=d,d.constructor=p,p.displayName=s(d,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(g.prototype),g.prototype[a]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new g(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(v),s(v,i,"Generator"),v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(t){s=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(14);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){var r,n,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(t){n=i}}();var u,c=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!f){var t=s(p);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new h(t,e)),1!==c.length||f||s(d)},h.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(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";r.r(e);var n=r(5),o=r.n(n),a=r(1),i=r.n(a),s=r(0),u=r.n(s),c=r(6),f=r.n(c),l=r(7),p=r.n(l),d=r(3),h=r.n(d);function y(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var m=new Map,v=function(){function t(){f()(this,t)}return p()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}}},{key:"addEventListener",value:function(t){var e=m.get(t);e||(e=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=m.get(t);m.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var r={source:"loaders.gl",type:t,payload:e},n=function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(e){if(y(e))o.add(e);else if(y(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(r&&"object"===h()(e))for(var a in e)t(e[a],r,o)}else;return void 0===n?Array.from(o):[]}(e);self.postMessage(r,n)}}}]),t}();function b(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var w=0;function O(t,e){return new Promise((function(r,n){var o=w++;v.addEventListener((function t(e,a){if(a.id===o)switch(e){case"done":v.removeEventListener(t),r(a.result);break;case"error":v.removeEventListener(t),n(a.error)}}));var a={id:o,input:t,options:e};v.postMessage("process",a)}))}function j(t){return _.apply(this,arguments)}function _(){return(_=i()(u.a.mark((function t(e){var r,n,o,a,i,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.loader,n=e.arrayBuffer,o=e.options,a=e.context,!r.parseSync&&!r.parse){t.next=6;break}i=n,s=r.parseSync||r.parse,t.next=13;break;case 6:if(!r.parseTextSync){t.next=12;break}c=new TextDecoder,i=c.decode(n),s=r.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=x(x({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),t.next=16,s(i,x({},o),a,r);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var E=r(8),L=r.n(E),k=r(2),S=r(4);var P,F={};function T(t){return M.apply(this,arguments)}function M(){return(M=i()(u.a.mark((function t(e){var r,n,o=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]?o[2]:{},r&&(e=A(e,r,n)),F[e]=F[e]||B(e),t.next=6,F[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t,e,r){if(t.startsWith("http"))return t;var n=r.modules||{};return n[t]?n[t]:k.b?r.CDN?(function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),"".concat(r.CDN,"/").concat(e,"@").concat("3.0.4","/dist/libs/").concat(t)):k.c?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function B(t){return I.apply(this,arguments)}function I(){return(I=i()(u.a.mark((function t(e){var r,n,o;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return r=t.sent,t.next=6,r.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(k.b){t.next=14;break}if(t.t0=S.requireFromFile,!t.t0){t.next=13;break}return t.next=12,S.requireFromFile(e);case 12:t.t0=t.sent;case 13:return t.abrupt("return",t.t0);case 14:if(!k.c){t.next=16;break}return t.abrupt("return",importScripts(e));case 16:return t.next=18,fetch(e);case 18:return n=t.sent,t.next=21,n.text();case 21:return o=t.sent,t.abrupt("return",N(o,e));case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(t,e){if(!k.b)return S.requireFromString&&S.requireFromString(t,e);if(k.c)return eval.call(k.a,t),null;var r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}function D(t){return C.apply(this,arguments)}function C(){return(C=i()(u.a.mark((function t(e){var r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.modules||{}).basis){t.next=3;break}return t.abrupt("return",r.basis);case 3:return P=P||G(e),t.next=6,P;case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(t){return q.apply(this,arguments)}function q(){return(q=i()(u.a.mark((function t(e){var r,n,o,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,n=null,t.t0=Promise,t.next=5,T("basis_transcoder.js","textures",e);case 5:return t.t1=t.sent,t.next=8,T("basis_transcoder.wasm","textures",e);case 8:return t.t2=t.sent,t.t3=[t.t1,t.t2],t.next=12,t.t0.all.call(t.t0,t.t3);case 12:return o=t.sent,a=L()(o,2),r=a[0],n=a[1],r=r||globalThis.BASIS,t.next=19,W(r,n);case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(t,e){var r={};return e&&(r.wasmBinary=e),new Promise((function(e){t(r).then((function(t){var r=t.BasisFile;(0,t.initializeBasis)(),e({BasisFile:r})}))}))}var U={etc1:{basisFormat:0,compressed:!0},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:33776},bc3:{basisFormat:3,compressed:!0,format:33779},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0},"astc-4x4":{basisFormat:10,compressed:!0},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function z(){return(z=i()(u.a.mark((function t(e,r){var n,o,a,i,s,c,f,l,p;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,D(r);case 2:if(n=t.sent,o=n.BasisFile,a=new o(new Uint8Array(e)),t.prev=5,a.startTranscoding()){t.next=8;break}return t.abrupt("return",null);case 8:for(i=a.getNumImages(),s=[],c=0;c<i;c++){for(f=a.getNumLevels(c),l=[],p=0;p<f;p++)l.push(H(a,c,p,r));s.push(l)}return t.abrupt("return",s);case 12:return t.prev=12,a.close(),a.delete(),t.finish(12);case 16:case"end":return t.stop()}}),t,null,[[5,,12,16]])})))).apply(this,arguments)}function H(t,e,r,n){var o=t.getImageWidth(e,r),a=t.getImageHeight(e,r),i=t.getHasAlpha(),s=function(t,e){var r=t&&t.basis&&t.basis.format;return"object"===h()(r)&&(r=e?r.alpha:r.noAlpha),r=r.toLowerCase(),U[r]}(n,i),u=s.compressed,c=s.format,f=s.basisFormat,l=t.getImageTranscodedSizeInBytes(e,r,f),p=new Uint8Array(l);return t.transcodeImage(p,e,r,f,0,0)?{width:o,height:a,data:p,compressed:u,hasAlpha:i,format:c}:null}function R(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var V,$={name:"Basis",id:"basis",module:"textures",version:"3.0.4",worker:!0,extensions:["basis"],mimeTypes:["application/octet-stream"],tests:["sB"],binary:!0,options:{basis:{format:"rgb565",libraryPath:"libs/"}}},J=Y(Y({},$),{},{parse:function(t,e){return z.apply(this,arguments)}});V=J,"undefined"!=typeof self&&(v.onmessage=function(){var t=i()(u.a.mark((function t(e,r){var n,o,a,i,s;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,n=r.input,o=r.options,a=void 0===o?{}:o,t.next=7,j({loader:V,arrayBuffer:n,options:a,context:{parse:O}});case 7:i=t.sent,v.postMessage("done",{result:i}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),s=t.t1 instanceof Error?t.t1.message:"",v.postMessage("error",{error:s});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,r){return t.apply(this,arguments)}}())}]);
//# sourceMappingURL=basis-worker.js.map

@@ -1,2 +0,2 @@

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var _=e[r]={i:r,l:!1,exports:{}};return t[r].call(_.exports,_,_.exports,n),_.l=!0,_.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var _ in t)n.d(r,_,function(e){return t[e]}.bind(null,_));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){t.exports=n(7)},function(t,e){function n(t,e,n,r,_,o,i){try{var a=t[o](i),S=a.value}catch(t){return void n(t)}a.done?e(S):Promise.resolve(S).then(r,_)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(_,o){var i=t.apply(e,r);function a(t){n(i,_,o,a,S,"next",t)}function S(t){n(i,_,o,a,S,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},_=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function S(t,e,n,r){var _=e&&e.prototype instanceof s?e:s,o=Object.create(_.prototype),i=new M(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(_,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===_)throw o;return G()}for(n.method=_,n.arg=o;;){var i=n.delegate;if(i){var a=D(i,n);if(a){if(a===R)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var S=E(t,e,n);if("normal"===S.type){if(r=n.done?"completed":"suspendedYield",S.arg===R)continue;return{value:S.arg,done:n.done}}"throw"===S.type&&(r="completed",n.method="throw",n.arg=S.arg)}}}(t,n,i),o}function E(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=S;var R={};function s(){}function f(){}function u(){}var c={};c[_]=function(){return this};var A=Object.getPrototypeOf,C=A&&A(A(O([])));C&&C!==e&&n.call(C,_)&&(c=C);var l=u.prototype=s.prototype=Object.create(c);function P(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function p(t,e){var r;this._invoke=function(_,o){function i(){return new e((function(r,i){!function r(_,o,i,a){var S=E(t[_],t,o);if("throw"!==S.type){var R=S.arg,s=R.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):e.resolve(s).then((function(t){R.value=t,i(R)}),(function(t){return r("throw",t,i,a)}))}a(S.arg)}(_,o,r,i)}))}return r=r?r.then(i,i):i()}}function D(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,D(t,e),"throw"===e.method))return R;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return R}var r=E(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,R;var _=r.arg;return _?_.done?(e[t.resultName]=_.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,R):_:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,R)}function h(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(h,this),this.reset(!0)}function O(t){if(t){var e=t[_];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:G}}function G(){return{value:void 0,done:!0}}return f.prototype=l.constructor=u,u.constructor=f,f.displayName=a(u,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,a(t,i,"GeneratorFunction")),t.prototype=Object.create(l),t},t.awrap=function(t){return{__await:t}},P(p.prototype),p.prototype[o]=function(){return this},t.AsyncIterator=p,t.async=function(e,n,r,_,o){void 0===o&&(o=Promise);var i=new p(S(e,n,r,_),o);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},P(l),a(l,i,"Generator"),l[_]=function(){return this},l.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var _=this.tryEntries.length-1;_>=0;--_){var o=this.tryEntries[_],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),S=n.call(o,"finallyLoc");if(a&&S){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var _=this.tryEntries[r];if(_.tryLoc<=this.prev&&n.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var o=_;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,R):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),R},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),R}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var _=r.arg;T(n)}return _}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),R}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";n.r(e);var r=n(2),_=n.n(r),o=n(1),i=n.n(o),a=n(0),S=n.n(a),E=n(3),R=n.n(E),s=n(4),f=n.n(s),u=n(5),c=n.n(u);function A(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var C=new Map,l=function(){function t(){R()(this,t)}return f()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(P(e)){var n=e.data,r=n.type,_=n.payload;t(r,_)}}}},{key:"addEventListener",value:function(t){var e=C.get(t);e||(e=function(e){if(P(e)){var n=e.data,r=n.type,_=n.payload;t(r,_)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=C.get(t);C.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var n={source:"loaders.gl",type:t,payload:e},r=function t(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,_=r||new Set;if(e){if(A(e))_.add(e);else if(A(e.buffer))_.add(e.buffer);else if(ArrayBuffer.isView(e));else if(n&&"object"===c()(e))for(var o in e)t(e[o],n,_)}else;return void 0===r?Array.from(_):[]}(e);self.postMessage(n,r)}}}]),t}();function P(t){var e=t.type,n=t.data;return"message"===e&&n&&"string"==typeof n.source&&n.source.startsWith("loaders.gl")}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){_()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var h=0;function T(t,e){return new Promise((function(n,r){var _=h++;l.addEventListener((function t(e,o){if(o.id===_)switch(e){case"done":l.removeEventListener(t),n(o.result);break;case"error":l.removeEventListener(t),r(o.error)}}));var o={id:_,input:t,options:e};l.postMessage("process",o)}))}function M(t){return O.apply(this,arguments)}function O(){return(O=i()(S.a.mark((function t(e){var n,r,_,o,i,a,E;return S.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.loader,r=e.arrayBuffer,_=e.options,o=e.context,!n.parseSync&&!n.parse){t.next=6;break}i=r,a=n.parseSync||n.parse,t.next=13;break;case 6:if(!n.parseTextSync){t.next=12;break}E=new TextDecoder,i=E.decode(r),a=n.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(n.name," loader"));case 13:return _=D(D({},_),{},{modules:n&&n.options&&n.options.modules||{},worker:!1}),t.next=16,a(i,D({},_),o,n);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}new Uint8Array([0]);const G=[171,75,84,88,32,50,48,187,13,10,26,10];var d,y,x,B,H,v,m,g;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(d||(d={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(y||(y={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(x||(x={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(B||(B={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(H||(H={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(v||(v={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(m||(m={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(g||(g={}));class L{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=d.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:y.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:x.UNSPECIFIED,colorPrimaries:B.SRGB,transferFunction:B.SRGB,flags:v.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class X{constructor(t,e,n,r){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=r,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==e&&r<t;)r++,this._offset++;return r<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,r)}}function w(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function b(t,e){for(var n=new Array(e.mipMapLevels),r=e.width,_=e.height,o=0,i=0;i<e.mipMapLevels;++i){var a=I(e,r,_,t,i),S=U(t,i,o,a);n[i]={compressed:!0,format:e.internalFormat,data:S,width:r,height:_,levelSize:a},r=Math.max(1,r>>1),_=Math.max(1,_>>1),o+=a}return n}function U(t,e,n,r){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+n,r)}function I(t,e,n,r,_){return Array.isArray(r)?t.sizeFunction(r[_]):t.sizeFunction(e,n)}var K={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},N={131:K.COMPRESSED_RGB_S3TC_DXT1_EXT,132:K.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:K.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:K.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:K.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:K.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:K.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:K.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:K.COMPRESSED_RED_RGTC1_EXT,140:K.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:K.COMPRESSED_RED_GREEN_RGTC2_EXT,142:K.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:K.COMPRESSED_RGB8_ETC2,148:K.COMPRESSED_SRGB8_ETC2,149:K.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:K.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:K.COMPRESSED_RGBA8_ETC2_EAC,152:K.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:K.COMPRESSED_R11_EAC,154:K.COMPRESSED_SIGNED_R11_EAC,155:K.COMPRESSED_RG11_EAC,156:K.COMPRESSED_SIGNED_RG11_EAC,157:K.COMPRESSED_RGBA_ASTC_4x4_KHR,158:K.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:K.COMPRESSED_RGBA_ASTC_5x4_KHR,160:K.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:K.COMPRESSED_RGBA_ASTC_5x5_KHR,162:K.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:K.COMPRESSED_RGBA_ASTC_6x5_KHR,164:K.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:K.COMPRESSED_RGBA_ASTC_6x6_KHR,166:K.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:K.COMPRESSED_RGBA_ASTC_8x5_KHR,168:K.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:K.COMPRESSED_RGBA_ASTC_8x6_KHR,170:K.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:K.COMPRESSED_RGBA_ASTC_8x8_KHR,172:K.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:K.COMPRESSED_RGBA_ASTC_10x5_KHR,174:K.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:K.COMPRESSED_RGBA_ASTC_10x6_KHR,176:K.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:K.COMPRESSED_RGBA_ASTC_10x8_KHR,178:K.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:K.COMPRESSED_RGBA_ASTC_10x10_KHR,180:K.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:K.COMPRESSED_RGBA_ASTC_12x10_KHR,182:K.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:K.COMPRESSED_RGBA_ASTC_12x12_KHR,184:K.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:K.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:K.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:K.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:K.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:K.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:K.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:K.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:K.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:K.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:K.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:K.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:K.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:K.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:K.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:K.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:K.COMPRESSED_RGBA_ASTC_12x12_KHR};var F=[171,75,84,88,32,50,48,187,13,10,26,10];function k(t){var e,n=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,G.length);if(e[0]!==G[0]||e[1]!==G[1]||e[2]!==G[2]||e[3]!==G[3]||e[4]!==G[4]||e[5]!==G[5]||e[6]!==G[6]||e[7]!==G[7]||e[8]!==G[8]||e[9]!==G[9]||e[10]!==G[10]||e[11]!==G[11])throw new Error("Missing KTX 2.0 identifier.");const n=new L,r=17*Uint32Array.BYTES_PER_ELEMENT,_=new X(t,G.length,r,!0);n.vkFormat=_._nextUint32(),n.typeSize=_._nextUint32(),n.pixelWidth=_._nextUint32(),n.pixelHeight=_._nextUint32(),n.pixelDepth=_._nextUint32(),n.layerCount=_._nextUint32(),n.faceCount=_._nextUint32();const o=_._nextUint32();n.supercompressionScheme=_._nextUint32();const i=_._nextUint32(),a=_._nextUint32(),S=_._nextUint32(),E=_._nextUint32(),R=_._nextUint64(),s=_._nextUint64(),f=new X(t,G.length+r,3*o*8,!0);for(let e=0;e<o;e++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+f._nextUint64(),f._nextUint64()),uncompressedByteLength:f._nextUint64()});const u=new X(t,i,a,!0),c={vendorId:u._skip(4)._nextUint16(),descriptorType:u._nextUint16(),versionNumber:u._nextUint16(),descriptorBlockSize:u._nextUint16(),colorModel:u._nextUint8(),colorPrimaries:u._nextUint8(),transferFunction:u._nextUint8(),flags:u._nextUint8(),texelBlockDimension:{x:u._nextUint8()+1,y:u._nextUint8()+1,z:u._nextUint8()+1,w:u._nextUint8()+1},bytesPlane:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],samples:[]},A=(c.descriptorBlockSize/4-6)/4;for(let t=0;t<A;t++)c.samples[t]={bitOffset:u._nextUint16(),bitLength:u._nextUint8(),channelID:u._nextUint8(),samplePosition:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],sampleLower:u._nextUint32(),sampleUpper:u._nextUint32()};n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(c);const C=new X(t,S,E,!0);for(;C._offset<E;){const t=C._nextUint32(),e=C._scan(t),r=w(e),_=C._scan(t-e.byteLength);n.keyValue[r]=r.match(/^ktx/i)?w(_):_,t%4&&C._skip(4-t%4)}if(s<=0)return n;const l=new X(t,R,s,!0),P=l._nextUint16(),p=l._nextUint16(),D=l._nextUint32(),h=l._nextUint32(),T=l._nextUint32(),M=l._nextUint32(),O=[];for(let t=0;t<o;t++)O.push({imageFlags:l._nextUint32(),rgbSliceByteOffset:l._nextUint32(),rgbSliceByteLength:l._nextUint32(),alphaSliceByteOffset:l._nextUint32(),alphaSliceByteLength:l._nextUint32()});const d=R+l._offset,y=d+D,x=y+h,B=x+T,H=new Uint8Array(t.buffer,t.byteOffset+d,D),v=new Uint8Array(t.buffer,t.byteOffset+y,h),m=new Uint8Array(t.buffer,t.byteOffset+x,T),g=new Uint8Array(t.buffer,t.byteOffset+B,M);return n.globalData={endpointCount:P,selectorCount:p,imageDescs:O,endpointsData:H,selectorsData:v,tablesData:m,extendedData:g},n}(new Uint8Array(t)),r=Math.max(1,n.levels.length),_=n.pixelWidth,o=n.pixelHeight,i=(e=n.vkFormat,N[e]);return b(n.levels,{mipMapLevels:r,width:_,height:o,sizeFunction:function(t){return t.uncompressedByteLength},internalFormat:i})}function j(t,e){if(!t)throw new Error(e||"loader assertion failed.")}var V={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:K.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:K.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:K.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":K.COMPRESSED_RGB_ATC_WEBGL,ATCA:K.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:K.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:W,DXT3:Z,DXT5:Z,"ATC ":W,ATCA:Z,ATCI:Z}};function z(t){var e=new Int32Array(t,0,V.HEADER_LENGTH),n=e[V.HEADER_PF_FOURCC_INDEX];j(Boolean(e[V.HEADER_PF_FLAGS_INDEX]&V.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");var r,_=(r=n,String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)),o=V.PIXEL_FORMATS[_],i=V.SIZE_FUNCTIONS[_];j(o&&i,"DDS: Unknown pixel format ".concat(n));var a=1;e[V.HEADER_FLAGS_INDEX]&V.DDSD_MIPMAPCOUNT&&(a=Math.max(1,e[V.MIPMAPCOUNT_INDEX]));var S=e[V.HEADER_WIDTH_INDEX],E=e[V.HEADER_HEIGHT_INDEX],R=e[V.HEADER_SIZE_INDEX]+4;return b(new Uint8Array(t,R),{mipMapLevels:a,width:S,height:E,sizeFunction:i,internalFormat:o})}function W(t,e){return(t+3>>2)*(e+3>>2)*8}function Z(t,e){return(t+3>>2)*(e+3>>2)*16}var Y=55727696,q=1347834371,J=13,Q=52,$=0,tt=2,et=4,nt=6,rt=7,_t=11,ot=12,it={0:[K.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[K.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[K.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[K.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[K.COMPRESSED_RGB_ETC1_WEBGL],7:[K.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[K.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[K.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[K.COMPRESSED_RGB8_ETC2],23:[K.COMPRESSED_RGBA8_ETC2_EAC],24:[K.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[K.COMPRESSED_R11_EAC],26:[K.COMPRESSED_RG11_EAC],27:[K.COMPRESSED_RGBA_ASTC_4X4_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[K.COMPRESSED_RGBA_ASTC_5X4_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[K.COMPRESSED_RGBA_ASTC_5X5_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[K.COMPRESSED_RGBA_ASTC_6X5_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[K.COMPRESSED_RGBA_ASTC_6X6_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[K.COMPRESSED_RGBA_ASTC_8X5_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[K.COMPRESSED_RGBA_ASTC_8X6_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[K.COMPRESSED_RGBA_ASTC_8X8_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[K.COMPRESSED_RGBA_ASTC_10X5_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[K.COMPRESSED_RGBA_ASTC_10X6_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[K.COMPRESSED_RGBA_ASTC_10X8_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[K.COMPRESSED_RGBA_ASTC_10X10_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[K.COMPRESSED_RGBA_ASTC_12X10_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[K.COMPRESSED_RGBA_ASTC_12X12_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},at={0:St,1:St,2:Et,3:Et,6:Rt,7:Rt,9:st,11:st,22:Rt,23:st,24:Rt,25:Rt,26:st,27:st,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function St(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function Et(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function Rt(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function st(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function ft(t){if(function(t){var e=new Uint8Array(t.buffer||t,t.byteOffset||0,F.length);return!(e[0]!==F[0]||e[1]!==F[1]||e[2]!==F[2]||e[3]!==F[3]||e[4]!==F[4]||e[5]!==F[5]||e[6]!==F[6]||e[7]!==F[7]||e[8]!==F[8]||e[9]!==F[9]||e[10]!==F[10]||e[11]!==F[11])}(t))return k(t);if(function(t){return new Uint32Array(t,0,V.HEADER_LENGTH)[V.MAGIC_NUMBER_INDEX]===V.MAGIC_NUMBER}(t))return z(t);if(function(t){var e=new Uint32Array(t,0,J)[$];return e===Y||e===q}(t))return function(t){var e=new Uint32Array(t,0,J),n=e[tt],r=e[et],_=it[n]||[],o=_.length>1&&r?_[1]:_[0],i=at[n],a=e[_t],S=e[rt],E=e[nt],R=Q+e[ot];return b(new Uint8Array(t,R),{mipMapLevels:a,width:S,height:E,sizeFunction:i,internalFormat:o})}(t);throw new Error("Texture container format not recognized")}function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(n),!0).forEach((function(e){_()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var At,Ct,lt={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.0.3",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/"}}},Pt=ct(ct({},lt),{},{parse:(At=i()(S.a.mark((function t(e){return S.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ft(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return At.apply(this,arguments)})});Ct=Pt,"undefined"!=typeof self&&(l.onmessage=function(){var t=i()(S.a.mark((function t(e,n){var r,_,o,i,a;return S.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,r=n.input,_=n.options,o=void 0===_?{}:_,t.next=7,M({loader:Ct,arrayBuffer:r,options:o,context:{parse:T}});case 7:i=t.sent,l.postMessage("done",{result:i}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),a=t.t1 instanceof Error?t.t1.message:"",l.postMessage("error",{error:a});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,n){return t.apply(this,arguments)}}())}]);
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var _=e[r]={i:r,l:!1,exports:{}};return t[r].call(_.exports,_,_.exports,n),_.l=!0,_.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var _ in t)n.d(r,_,function(e){return t[e]}.bind(null,_));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){t.exports=n(7)},function(t,e){function n(t,e,n,r,_,o,i){try{var a=t[o](i),S=a.value}catch(t){return void n(t)}a.done?e(S):Promise.resolve(S).then(r,_)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(_,o){var i=t.apply(e,r);function a(t){n(i,_,o,a,S,"next",t)}function S(t){n(i,_,o,a,S,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},_=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function S(t,e,n,r){var _=e&&e.prototype instanceof s?e:s,o=Object.create(_.prototype),i=new M(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(_,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===_)throw o;return G()}for(n.method=_,n.arg=o;;){var i=n.delegate;if(i){var a=D(i,n);if(a){if(a===R)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var S=E(t,e,n);if("normal"===S.type){if(r=n.done?"completed":"suspendedYield",S.arg===R)continue;return{value:S.arg,done:n.done}}"throw"===S.type&&(r="completed",n.method="throw",n.arg=S.arg)}}}(t,n,i),o}function E(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=S;var R={};function s(){}function f(){}function u(){}var c={};c[_]=function(){return this};var A=Object.getPrototypeOf,C=A&&A(A(O([])));C&&C!==e&&n.call(C,_)&&(c=C);var l=u.prototype=s.prototype=Object.create(c);function P(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function p(t,e){var r;this._invoke=function(_,o){function i(){return new e((function(r,i){!function r(_,o,i,a){var S=E(t[_],t,o);if("throw"!==S.type){var R=S.arg,s=R.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):e.resolve(s).then((function(t){R.value=t,i(R)}),(function(t){return r("throw",t,i,a)}))}a(S.arg)}(_,o,r,i)}))}return r=r?r.then(i,i):i()}}function D(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,D(t,e),"throw"===e.method))return R;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return R}var r=E(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,R;var _=r.arg;return _?_.done?(e[t.resultName]=_.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,R):_:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,R)}function h(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(h,this),this.reset(!0)}function O(t){if(t){var e=t[_];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:G}}function G(){return{value:void 0,done:!0}}return f.prototype=l.constructor=u,u.constructor=f,f.displayName=a(u,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,a(t,i,"GeneratorFunction")),t.prototype=Object.create(l),t},t.awrap=function(t){return{__await:t}},P(p.prototype),p.prototype[o]=function(){return this},t.AsyncIterator=p,t.async=function(e,n,r,_,o){void 0===o&&(o=Promise);var i=new p(S(e,n,r,_),o);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},P(l),a(l,i,"Generator"),l[_]=function(){return this},l.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var _=this.tryEntries.length-1;_>=0;--_){var o=this.tryEntries[_],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),S=n.call(o,"finallyLoc");if(a&&S){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var _=this.tryEntries[r];if(_.tryLoc<=this.prev&&n.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var o=_;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,R):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),R},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),R}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var _=r.arg;T(n)}return _}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),R}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";n.r(e);var r=n(2),_=n.n(r),o=n(1),i=n.n(o),a=n(0),S=n.n(a),E=n(3),R=n.n(E),s=n(4),f=n.n(s),u=n(5),c=n.n(u);function A(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var C=new Map,l=function(){function t(){R()(this,t)}return f()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(P(e)){var n=e.data,r=n.type,_=n.payload;t(r,_)}}}},{key:"addEventListener",value:function(t){var e=C.get(t);e||(e=function(e){if(P(e)){var n=e.data,r=n.type,_=n.payload;t(r,_)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=C.get(t);C.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var n={source:"loaders.gl",type:t,payload:e},r=function t(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,_=r||new Set;if(e){if(A(e))_.add(e);else if(A(e.buffer))_.add(e.buffer);else if(ArrayBuffer.isView(e));else if(n&&"object"===c()(e))for(var o in e)t(e[o],n,_)}else;return void 0===r?Array.from(_):[]}(e);self.postMessage(n,r)}}}]),t}();function P(t){var e=t.type,n=t.data;return"message"===e&&n&&"string"==typeof n.source&&n.source.startsWith("loaders.gl")}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){_()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var h=0;function T(t,e){return new Promise((function(n,r){var _=h++;l.addEventListener((function t(e,o){if(o.id===_)switch(e){case"done":l.removeEventListener(t),n(o.result);break;case"error":l.removeEventListener(t),r(o.error)}}));var o={id:_,input:t,options:e};l.postMessage("process",o)}))}function M(t){return O.apply(this,arguments)}function O(){return(O=i()(S.a.mark((function t(e){var n,r,_,o,i,a,E;return S.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.loader,r=e.arrayBuffer,_=e.options,o=e.context,!n.parseSync&&!n.parse){t.next=6;break}i=r,a=n.parseSync||n.parse,t.next=13;break;case 6:if(!n.parseTextSync){t.next=12;break}E=new TextDecoder,i=E.decode(r),a=n.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(n.name," loader"));case 13:return _=D(D({},_),{},{modules:n&&n.options&&n.options.modules||{},worker:!1}),t.next=16,a(i,D({},_),o,n);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}new Uint8Array([0]);const G=[171,75,84,88,32,50,48,187,13,10,26,10];var d,y,x,B,H,v,m,g;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(d||(d={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(y||(y={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(x||(x={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(B||(B={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(H||(H={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(v||(v={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(m||(m={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(g||(g={}));class L{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=d.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:y.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:x.UNSPECIFIED,colorPrimaries:B.SRGB,transferFunction:B.SRGB,flags:v.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class X{constructor(t,e,n,r){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=r,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==e&&r<t;)r++,this._offset++;return r<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,r)}}function w(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function b(t,e){for(var n=new Array(e.mipMapLevels),r=e.width,_=e.height,o=0,i=0;i<e.mipMapLevels;++i){var a=I(e,r,_,t,i),S=U(t,i,o,a);n[i]={compressed:!0,format:e.internalFormat,data:S,width:r,height:_,levelSize:a},r=Math.max(1,r>>1),_=Math.max(1,_>>1),o+=a}return n}function U(t,e,n,r){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+n,r)}function I(t,e,n,r,_){return Array.isArray(r)?t.sizeFunction(r[_]):t.sizeFunction(e,n)}var K={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},N={131:K.COMPRESSED_RGB_S3TC_DXT1_EXT,132:K.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:K.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:K.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:K.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:K.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:K.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:K.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:K.COMPRESSED_RED_RGTC1_EXT,140:K.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:K.COMPRESSED_RED_GREEN_RGTC2_EXT,142:K.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:K.COMPRESSED_RGB8_ETC2,148:K.COMPRESSED_SRGB8_ETC2,149:K.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:K.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:K.COMPRESSED_RGBA8_ETC2_EAC,152:K.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:K.COMPRESSED_R11_EAC,154:K.COMPRESSED_SIGNED_R11_EAC,155:K.COMPRESSED_RG11_EAC,156:K.COMPRESSED_SIGNED_RG11_EAC,157:K.COMPRESSED_RGBA_ASTC_4x4_KHR,158:K.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:K.COMPRESSED_RGBA_ASTC_5x4_KHR,160:K.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:K.COMPRESSED_RGBA_ASTC_5x5_KHR,162:K.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:K.COMPRESSED_RGBA_ASTC_6x5_KHR,164:K.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:K.COMPRESSED_RGBA_ASTC_6x6_KHR,166:K.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:K.COMPRESSED_RGBA_ASTC_8x5_KHR,168:K.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:K.COMPRESSED_RGBA_ASTC_8x6_KHR,170:K.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:K.COMPRESSED_RGBA_ASTC_8x8_KHR,172:K.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:K.COMPRESSED_RGBA_ASTC_10x5_KHR,174:K.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:K.COMPRESSED_RGBA_ASTC_10x6_KHR,176:K.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:K.COMPRESSED_RGBA_ASTC_10x8_KHR,178:K.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:K.COMPRESSED_RGBA_ASTC_10x10_KHR,180:K.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:K.COMPRESSED_RGBA_ASTC_12x10_KHR,182:K.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:K.COMPRESSED_RGBA_ASTC_12x12_KHR,184:K.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:K.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:K.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:K.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:K.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:K.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:K.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:K.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:K.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:K.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:K.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:K.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:K.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:K.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:K.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:K.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:K.COMPRESSED_RGBA_ASTC_12x12_KHR};var F=[171,75,84,88,32,50,48,187,13,10,26,10];function k(t){var e,n=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,G.length);if(e[0]!==G[0]||e[1]!==G[1]||e[2]!==G[2]||e[3]!==G[3]||e[4]!==G[4]||e[5]!==G[5]||e[6]!==G[6]||e[7]!==G[7]||e[8]!==G[8]||e[9]!==G[9]||e[10]!==G[10]||e[11]!==G[11])throw new Error("Missing KTX 2.0 identifier.");const n=new L,r=17*Uint32Array.BYTES_PER_ELEMENT,_=new X(t,G.length,r,!0);n.vkFormat=_._nextUint32(),n.typeSize=_._nextUint32(),n.pixelWidth=_._nextUint32(),n.pixelHeight=_._nextUint32(),n.pixelDepth=_._nextUint32(),n.layerCount=_._nextUint32(),n.faceCount=_._nextUint32();const o=_._nextUint32();n.supercompressionScheme=_._nextUint32();const i=_._nextUint32(),a=_._nextUint32(),S=_._nextUint32(),E=_._nextUint32(),R=_._nextUint64(),s=_._nextUint64(),f=new X(t,G.length+r,3*o*8,!0);for(let e=0;e<o;e++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+f._nextUint64(),f._nextUint64()),uncompressedByteLength:f._nextUint64()});const u=new X(t,i,a,!0),c={vendorId:u._skip(4)._nextUint16(),descriptorType:u._nextUint16(),versionNumber:u._nextUint16(),descriptorBlockSize:u._nextUint16(),colorModel:u._nextUint8(),colorPrimaries:u._nextUint8(),transferFunction:u._nextUint8(),flags:u._nextUint8(),texelBlockDimension:{x:u._nextUint8()+1,y:u._nextUint8()+1,z:u._nextUint8()+1,w:u._nextUint8()+1},bytesPlane:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],samples:[]},A=(c.descriptorBlockSize/4-6)/4;for(let t=0;t<A;t++)c.samples[t]={bitOffset:u._nextUint16(),bitLength:u._nextUint8(),channelID:u._nextUint8(),samplePosition:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],sampleLower:u._nextUint32(),sampleUpper:u._nextUint32()};n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(c);const C=new X(t,S,E,!0);for(;C._offset<E;){const t=C._nextUint32(),e=C._scan(t),r=w(e),_=C._scan(t-e.byteLength);n.keyValue[r]=r.match(/^ktx/i)?w(_):_,t%4&&C._skip(4-t%4)}if(s<=0)return n;const l=new X(t,R,s,!0),P=l._nextUint16(),p=l._nextUint16(),D=l._nextUint32(),h=l._nextUint32(),T=l._nextUint32(),M=l._nextUint32(),O=[];for(let t=0;t<o;t++)O.push({imageFlags:l._nextUint32(),rgbSliceByteOffset:l._nextUint32(),rgbSliceByteLength:l._nextUint32(),alphaSliceByteOffset:l._nextUint32(),alphaSliceByteLength:l._nextUint32()});const d=R+l._offset,y=d+D,x=y+h,B=x+T,H=new Uint8Array(t.buffer,t.byteOffset+d,D),v=new Uint8Array(t.buffer,t.byteOffset+y,h),m=new Uint8Array(t.buffer,t.byteOffset+x,T),g=new Uint8Array(t.buffer,t.byteOffset+B,M);return n.globalData={endpointCount:P,selectorCount:p,imageDescs:O,endpointsData:H,selectorsData:v,tablesData:m,extendedData:g},n}(new Uint8Array(t)),r=Math.max(1,n.levels.length),_=n.pixelWidth,o=n.pixelHeight,i=(e=n.vkFormat,N[e]);return b(n.levels,{mipMapLevels:r,width:_,height:o,sizeFunction:function(t){return t.uncompressedByteLength},internalFormat:i})}function j(t,e){if(!t)throw new Error(e||"loader assertion failed.")}var V={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:K.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:K.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:K.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":K.COMPRESSED_RGB_ATC_WEBGL,ATCA:K.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:K.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:W,DXT3:Z,DXT5:Z,"ATC ":W,ATCA:Z,ATCI:Z}};function z(t){var e=new Int32Array(t,0,V.HEADER_LENGTH),n=e[V.HEADER_PF_FOURCC_INDEX];j(Boolean(e[V.HEADER_PF_FLAGS_INDEX]&V.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");var r,_=(r=n,String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)),o=V.PIXEL_FORMATS[_],i=V.SIZE_FUNCTIONS[_];j(o&&i,"DDS: Unknown pixel format ".concat(n));var a=1;e[V.HEADER_FLAGS_INDEX]&V.DDSD_MIPMAPCOUNT&&(a=Math.max(1,e[V.MIPMAPCOUNT_INDEX]));var S=e[V.HEADER_WIDTH_INDEX],E=e[V.HEADER_HEIGHT_INDEX],R=e[V.HEADER_SIZE_INDEX]+4;return b(new Uint8Array(t,R),{mipMapLevels:a,width:S,height:E,sizeFunction:i,internalFormat:o})}function W(t,e){return(t+3>>2)*(e+3>>2)*8}function Z(t,e){return(t+3>>2)*(e+3>>2)*16}var Y=55727696,q=1347834371,J=13,Q=52,$=0,tt=2,et=4,nt=6,rt=7,_t=11,ot=12,it={0:[K.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[K.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[K.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[K.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[K.COMPRESSED_RGB_ETC1_WEBGL],7:[K.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[K.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[K.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[K.COMPRESSED_RGB8_ETC2],23:[K.COMPRESSED_RGBA8_ETC2_EAC],24:[K.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[K.COMPRESSED_R11_EAC],26:[K.COMPRESSED_RG11_EAC],27:[K.COMPRESSED_RGBA_ASTC_4X4_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[K.COMPRESSED_RGBA_ASTC_5X4_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[K.COMPRESSED_RGBA_ASTC_5X5_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[K.COMPRESSED_RGBA_ASTC_6X5_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[K.COMPRESSED_RGBA_ASTC_6X6_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[K.COMPRESSED_RGBA_ASTC_8X5_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[K.COMPRESSED_RGBA_ASTC_8X6_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[K.COMPRESSED_RGBA_ASTC_8X8_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[K.COMPRESSED_RGBA_ASTC_10X5_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[K.COMPRESSED_RGBA_ASTC_10X6_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[K.COMPRESSED_RGBA_ASTC_10X8_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[K.COMPRESSED_RGBA_ASTC_10X10_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[K.COMPRESSED_RGBA_ASTC_12X10_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[K.COMPRESSED_RGBA_ASTC_12X12_KHR,K.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},at={0:St,1:St,2:Et,3:Et,6:Rt,7:Rt,9:st,11:st,22:Rt,23:st,24:Rt,25:Rt,26:st,27:st,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function St(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function Et(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function Rt(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function st(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function ft(t){if(function(t){var e=new Uint8Array(t.buffer||t,t.byteOffset||0,F.length);return!(e[0]!==F[0]||e[1]!==F[1]||e[2]!==F[2]||e[3]!==F[3]||e[4]!==F[4]||e[5]!==F[5]||e[6]!==F[6]||e[7]!==F[7]||e[8]!==F[8]||e[9]!==F[9]||e[10]!==F[10]||e[11]!==F[11])}(t))return k(t);if(function(t){return new Uint32Array(t,0,V.HEADER_LENGTH)[V.MAGIC_NUMBER_INDEX]===V.MAGIC_NUMBER}(t))return z(t);if(function(t){var e=new Uint32Array(t,0,J)[$];return e===Y||e===q}(t))return function(t){var e=new Uint32Array(t,0,J),n=e[tt],r=e[et],_=it[n]||[],o=_.length>1&&r?_[1]:_[0],i=at[n],a=e[_t],S=e[rt],E=e[nt],R=Q+e[ot];return b(new Uint8Array(t,R),{mipMapLevels:a,width:S,height:E,sizeFunction:i,internalFormat:o})}(t);throw new Error("Texture container format not recognized")}function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(n),!0).forEach((function(e){_()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var At,Ct,lt={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.0.4",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/"}}},Pt=ct(ct({},lt),{},{parse:(At=i()(S.a.mark((function t(e){return S.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ft(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return At.apply(this,arguments)})});Ct=Pt,"undefined"!=typeof self&&(l.onmessage=function(){var t=i()(S.a.mark((function t(e,n){var r,_,o,i,a;return S.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,r=n.input,_=n.options,o=void 0===_?{}:_,t.next=7,M({loader:Ct,arrayBuffer:r,options:o,context:{parse:T}});case 7:i=t.sent,l.postMessage("done",{result:i}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),a=t.t1 instanceof Error?t.t1.message:"",l.postMessage("error",{error:a});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,n){return t.apply(this,arguments)}}())}]);
//# sourceMappingURL=compressed-texture-worker.js.map

@@ -1,2 +0,2 @@

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=13)}([function(e,t,r){e.exports=r(10)},function(e,t){function r(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,c,"next",e)}function c(e){r(a,o,i,u,c,"throw",e)}u(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(e,n){r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return c}));var o=r(5),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window||{},u="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,c="function"==typeof importScripts,s=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));s&&parseFloat(s[1])}).call(this,r(11),r(12))},function(e,t){},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t,r){var n=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof l?t:l,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};d[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==t&&r.call(v,o)&&(d=v);var m=h.prototype=l.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,u){var c=s(e[o],e,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function j(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=m.constructor=h,h.constructor=p,p.displayName=u(h,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},g(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=j,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,s=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?s=c.concat(s):l=-1,s.length&&h())}function h(){if(!f){var e=u(p);f=!0;for(var t=s.length;t;){for(c=s,s=[];++l<t;)c&&c[l].run();l=-1,t=s.length}c=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(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 r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new d(e,t)),1!==s.length||f||u(h)},d.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,r){"use strict";r.r(t),r.d(t,"CrunchLoaderWithParser",(function(){return ie}));var n=r(4),o=r.n(n),i=r(1),a=r.n(i),u=r(0),c=r.n(u),s=r(7),f=r.n(s),l=r(8),p=r.n(l),h=r(5),d=r.n(h);function y(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}var v=new Map,m=function(){function e(){f()(this,e)}return p()(e,null,[{key:"onmessage",set:function(e){self.onmessage=function(t){if(g(t)){var r=t.data,n=r.type,o=r.payload;e(n,o)}}}},{key:"addEventListener",value:function(e){var t=v.get(e);t||(t=function(t){if(g(t)){var r=t.data,n=r.type,o=r.payload;e(n,o)}}),self.addEventListener("message",t)}},{key:"removeEventListener",value:function(e){var t=v.get(e);v.delete(e),self.removeEventListener("message",t)}},{key:"postMessage",value:function(e,t){if(self){var r={source:"loaders.gl",type:e,payload:t},n=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(t){if(y(t))o.add(t);else if(y(t.buffer))o.add(t.buffer);else if(ArrayBuffer.isView(t));else if(r&&"object"===d()(t))for(var i in t)e(t[i],r,o)}else;return void 0===n?Array.from(o):[]}(t);self.postMessage(r,n)}}}]),e}();function g(e){var t=e.type,r=e.data;return"message"===t&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=0;function O(e,t){return new Promise((function(r,n){var o=x++;m.addEventListener((function e(t,i){if(i.id===o)switch(t){case"done":m.removeEventListener(e),r(i.result);break;case"error":m.removeEventListener(e),n(i.error)}}));var i={id:o,input:e,options:t};m.postMessage("process",i)}))}function _(e){return j.apply(this,arguments)}function j(){return(j=a()(c.a.mark((function e(t){var r,n,o,i,a,u,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.loader,n=t.arrayBuffer,o=t.options,i=t.context,!r.parseSync&&!r.parse){e.next=6;break}a=n,u=r.parseSync||r.parse,e.next=13;break;case 6:if(!r.parseTextSync){e.next=12;break}s=new TextDecoder,a=s.decode(n),u=r.parseTextSync,e.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=w(w({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),e.next=16,u(a,w({},o),i,r);case 16:return e.abrupt("return",e.sent);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var E={id:"crunch",name:"Crunch",module:"textures",version:"3.0.3",worker:!0,extensions:["crn"],mimeTypes:["image/crn","image/x-crn","application/octet-stream"],binary:!0,options:{crunch:{libraryPath:"libs/"}}},L=r(2),k=r(3);var P,S={};function T(e){return F.apply(this,arguments)}function F(){return(F=a()(c.a.mark((function e(t){var r,n,o=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]?o[2]:{},r&&(t=M(t,r,n)),S[t]=S[t]||A(t),e.next=6,S[t];case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,t,r){if(e.startsWith("http"))return e;var n=r.modules||{};return n[e]?n[e]:L.b?r.CDN?(function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),"".concat(r.CDN,"/").concat(t,"@").concat("3.0.3","/dist/libs/").concat(e)):L.c?"../src/libs/".concat(e):"modules/".concat(t,"/src/libs/").concat(e):"modules/".concat(t,"/dist/libs/").concat(e)}function A(e){return D.apply(this,arguments)}function D(){return(D=a()(c.a.mark((function e(t){var r,n,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith("wasm")){e.next=7;break}return e.next=3,fetch(t);case 3:return r=e.sent,e.next=6,r.arrayBuffer();case 6:return e.abrupt("return",e.sent);case 7:if(L.b){e.next=14;break}if(e.t0=k.requireFromFile,!e.t0){e.next=13;break}return e.next=12,k.requireFromFile(t);case 12:e.t0=e.sent;case 13:return e.abrupt("return",e.t0);case 14:if(!L.c){e.next=16;break}return e.abrupt("return",importScripts(t));case 16:return e.next=18,fetch(t);case 18:return n=e.sent,e.next=21,n.text();case 21:return o=e.sent,e.abrupt("return",C(o,t));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e,t){if(!L.b)return k.requireFromString&&k.requireFromString(e,t);if(L.c)return eval.call(L.a,e),null;var r=document.createElement("script");r.id=t;try{r.appendChild(document.createTextNode(e))}catch(t){r.text=e}return document.body.appendChild(r),null}function N(e){return z.apply(this,arguments)}function z(){return(z=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.modules||{}).crunch){e.next=3;break}return e.abrupt("return",r.crunch);case 3:return e.abrupt("return",B(t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e){return G.apply(this,arguments)}function G(){return(G=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=2;break}return e.abrupt("return",P);case 2:return e.next=4,T("crunch.js","textures",t);case 4:return r=(r=e.sent)||globalThis.loadCrunchDecoder,P=r(),e.abrupt("return",P);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var U=33776,I=33778,W=33779;function q(e,t){if(!e)throw new Error(t||"loader assertion failed.")}function H(e,t){for(var r=new Array(t.mipMapLevels),n=t.width,o=t.height,i=0,a=0;a<t.mipMapLevels;++a){var u=Y(t,n,o,e,a),c=R(e,a,i,u);r[a]={compressed:!0,format:t.internalFormat,data:c,width:n,height:o,levelSize:u},n=Math.max(1,n>>1),o=Math.max(1,o>>1),i+=u}return r}function R(e,t,r,n){return Array.isArray(e)?e[t].levelData:new Uint8Array(e.buffer,e.byteOffset+r,n)}function Y(e,t,r,n,o){return Array.isArray(n)?e.sizeFunction(n[o]):e.sizeFunction(t,r)}function V(e,t){return(e+3>>2)*(t+3>>2)*8}function J(e,t){return(e+3>>2)*(t+3>>2)*16}var K=1,Q=2,X={};X[0]={pixelFormat:U,sizeFunction:V},X[K]={pixelFormat:I,sizeFunction:J},X[Q]={pixelFormat:W,sizeFunction:J};var Z,$=0;function ee(){return(ee=a()(c.a.mark((function e(t,r){var n,o,i,a,u,s,f,l,p,h,d,y;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N(r);case 2:for(n=e.sent,o=t.byteLength,i=new Uint8Array(t),a=n._malloc(o),te(i,n.HEAPU8,a,o),u=n._crn_get_dxt_format(a,o),q(Boolean(X[u]),"Unsupported format"),s=n._crn_get_levels(a,o),f=n._crn_get_width(a,o),l=n._crn_get_height(a,o),p=X[u].sizeFunction,h=0,d=0;d<s;++d)h+=p(f>>d,l>>d);return $<h&&(Z&&n._free(Z),Z=n._malloc(h),$=h),n._crn_decompress(a,o,Z,h,0,s),n._free(a),y=new Uint8Array(n.HEAPU8.buffer,Z,h).slice(),e.abrupt("return",H(y,{mipMapLevels:s,width:f,height:l,sizeFunction:p,internalFormat:X[u].pixelFormat}));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(e,t,r,n){var o,i=r/4,a=n%4,u=new Uint32Array(e.buffer,0,(n-a)/4),c=new Uint32Array(t.buffer);for(o=0;o<u.length;o++)c[i+o]=u[o];for(o=n-a;o<n;o++)t[r+o]=e[o]}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var oe,ie=ne(ne({},E),{},{parse:function(e,t){return ee.apply(this,arguments)}});oe=ie,"undefined"!=typeof self&&(m.onmessage=function(){var e=a()(c.a.mark((function e(t,r){var n,o,i,a,u;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="process"===e.t0?3:16;break;case 3:return e.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,e.next=7,_({loader:oe,arrayBuffer:n,options:i,context:{parse:O}});case 7:a=e.sent,m.postMessage("done",{result:a}),e.next=15;break;case 11:e.prev=11,e.t1=e.catch(3),u=e.t1 instanceof Error?e.t1.message:"",m.postMessage("error",{error:u});case 15:return e.abrupt("break",16);case 16:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,r){return e.apply(this,arguments)}}())}]);
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=13)}([function(e,t,r){e.exports=r(10)},function(e,t){function r(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,c,"next",e)}function c(e){r(a,o,i,u,c,"throw",e)}u(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(e,n){r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return c}));var o=r(5),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window||{},u="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,c="function"==typeof importScripts,s=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));s&&parseFloat(s[1])}).call(this,r(11),r(12))},function(e,t){},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t,r){var n=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof l?t:l,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};d[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==t&&r.call(v,o)&&(d=v);var m=h.prototype=l.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,u){var c=s(e[o],e,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function j(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=m.constructor=h,h.constructor=p,p.displayName=u(h,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},g(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=j,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,s=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?s=c.concat(s):l=-1,s.length&&h())}function h(){if(!f){var e=u(p);f=!0;for(var t=s.length;t;){for(c=s,s=[];++l<t;)c&&c[l].run();l=-1,t=s.length}c=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(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 r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new d(e,t)),1!==s.length||f||u(h)},d.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,r){"use strict";r.r(t),r.d(t,"CrunchLoaderWithParser",(function(){return ie}));var n=r(4),o=r.n(n),i=r(1),a=r.n(i),u=r(0),c=r.n(u),s=r(7),f=r.n(s),l=r(8),p=r.n(l),h=r(5),d=r.n(h);function y(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}var v=new Map,m=function(){function e(){f()(this,e)}return p()(e,null,[{key:"onmessage",set:function(e){self.onmessage=function(t){if(g(t)){var r=t.data,n=r.type,o=r.payload;e(n,o)}}}},{key:"addEventListener",value:function(e){var t=v.get(e);t||(t=function(t){if(g(t)){var r=t.data,n=r.type,o=r.payload;e(n,o)}}),self.addEventListener("message",t)}},{key:"removeEventListener",value:function(e){var t=v.get(e);v.delete(e),self.removeEventListener("message",t)}},{key:"postMessage",value:function(e,t){if(self){var r={source:"loaders.gl",type:e,payload:t},n=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(t){if(y(t))o.add(t);else if(y(t.buffer))o.add(t.buffer);else if(ArrayBuffer.isView(t));else if(r&&"object"===d()(t))for(var i in t)e(t[i],r,o)}else;return void 0===n?Array.from(o):[]}(t);self.postMessage(r,n)}}}]),e}();function g(e){var t=e.type,r=e.data;return"message"===t&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=0;function O(e,t){return new Promise((function(r,n){var o=x++;m.addEventListener((function e(t,i){if(i.id===o)switch(t){case"done":m.removeEventListener(e),r(i.result);break;case"error":m.removeEventListener(e),n(i.error)}}));var i={id:o,input:e,options:t};m.postMessage("process",i)}))}function _(e){return j.apply(this,arguments)}function j(){return(j=a()(c.a.mark((function e(t){var r,n,o,i,a,u,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.loader,n=t.arrayBuffer,o=t.options,i=t.context,!r.parseSync&&!r.parse){e.next=6;break}a=n,u=r.parseSync||r.parse,e.next=13;break;case 6:if(!r.parseTextSync){e.next=12;break}s=new TextDecoder,a=s.decode(n),u=r.parseTextSync,e.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=w(w({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),e.next=16,u(a,w({},o),i,r);case 16:return e.abrupt("return",e.sent);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var E={id:"crunch",name:"Crunch",module:"textures",version:"3.0.4",worker:!0,extensions:["crn"],mimeTypes:["image/crn","image/x-crn","application/octet-stream"],binary:!0,options:{crunch:{libraryPath:"libs/"}}},L=r(2),k=r(3);var P,S={};function T(e){return F.apply(this,arguments)}function F(){return(F=a()(c.a.mark((function e(t){var r,n,o=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]?o[2]:{},r&&(t=M(t,r,n)),S[t]=S[t]||A(t),e.next=6,S[t];case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,t,r){if(e.startsWith("http"))return e;var n=r.modules||{};return n[e]?n[e]:L.b?r.CDN?(function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),"".concat(r.CDN,"/").concat(t,"@").concat("3.0.4","/dist/libs/").concat(e)):L.c?"../src/libs/".concat(e):"modules/".concat(t,"/src/libs/").concat(e):"modules/".concat(t,"/dist/libs/").concat(e)}function A(e){return D.apply(this,arguments)}function D(){return(D=a()(c.a.mark((function e(t){var r,n,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith("wasm")){e.next=7;break}return e.next=3,fetch(t);case 3:return r=e.sent,e.next=6,r.arrayBuffer();case 6:return e.abrupt("return",e.sent);case 7:if(L.b){e.next=14;break}if(e.t0=k.requireFromFile,!e.t0){e.next=13;break}return e.next=12,k.requireFromFile(t);case 12:e.t0=e.sent;case 13:return e.abrupt("return",e.t0);case 14:if(!L.c){e.next=16;break}return e.abrupt("return",importScripts(t));case 16:return e.next=18,fetch(t);case 18:return n=e.sent,e.next=21,n.text();case 21:return o=e.sent,e.abrupt("return",C(o,t));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e,t){if(!L.b)return k.requireFromString&&k.requireFromString(e,t);if(L.c)return eval.call(L.a,e),null;var r=document.createElement("script");r.id=t;try{r.appendChild(document.createTextNode(e))}catch(t){r.text=e}return document.body.appendChild(r),null}function N(e){return z.apply(this,arguments)}function z(){return(z=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.modules||{}).crunch){e.next=3;break}return e.abrupt("return",r.crunch);case 3:return e.abrupt("return",B(t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e){return G.apply(this,arguments)}function G(){return(G=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=2;break}return e.abrupt("return",P);case 2:return e.next=4,T("crunch.js","textures",t);case 4:return r=(r=e.sent)||globalThis.loadCrunchDecoder,P=r(),e.abrupt("return",P);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var U=33776,I=33778,W=33779;function q(e,t){if(!e)throw new Error(t||"loader assertion failed.")}function H(e,t){for(var r=new Array(t.mipMapLevels),n=t.width,o=t.height,i=0,a=0;a<t.mipMapLevels;++a){var u=Y(t,n,o,e,a),c=R(e,a,i,u);r[a]={compressed:!0,format:t.internalFormat,data:c,width:n,height:o,levelSize:u},n=Math.max(1,n>>1),o=Math.max(1,o>>1),i+=u}return r}function R(e,t,r,n){return Array.isArray(e)?e[t].levelData:new Uint8Array(e.buffer,e.byteOffset+r,n)}function Y(e,t,r,n,o){return Array.isArray(n)?e.sizeFunction(n[o]):e.sizeFunction(t,r)}function V(e,t){return(e+3>>2)*(t+3>>2)*8}function J(e,t){return(e+3>>2)*(t+3>>2)*16}var K=1,Q=2,X={};X[0]={pixelFormat:U,sizeFunction:V},X[K]={pixelFormat:I,sizeFunction:J},X[Q]={pixelFormat:W,sizeFunction:J};var Z,$=0;function ee(){return(ee=a()(c.a.mark((function e(t,r){var n,o,i,a,u,s,f,l,p,h,d,y;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N(r);case 2:for(n=e.sent,o=t.byteLength,i=new Uint8Array(t),a=n._malloc(o),te(i,n.HEAPU8,a,o),u=n._crn_get_dxt_format(a,o),q(Boolean(X[u]),"Unsupported format"),s=n._crn_get_levels(a,o),f=n._crn_get_width(a,o),l=n._crn_get_height(a,o),p=X[u].sizeFunction,h=0,d=0;d<s;++d)h+=p(f>>d,l>>d);return $<h&&(Z&&n._free(Z),Z=n._malloc(h),$=h),n._crn_decompress(a,o,Z,h,0,s),n._free(a),y=new Uint8Array(n.HEAPU8.buffer,Z,h).slice(),e.abrupt("return",H(y,{mipMapLevels:s,width:f,height:l,sizeFunction:p,internalFormat:X[u].pixelFormat}));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(e,t,r,n){var o,i=r/4,a=n%4,u=new Uint32Array(e.buffer,0,(n-a)/4),c=new Uint32Array(t.buffer);for(o=0;o<u.length;o++)c[i+o]=u[o];for(o=n-a;o<n;o++)t[r+o]=e[o]}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var oe,ie=ne(ne({},E),{},{parse:function(e,t){return ee.apply(this,arguments)}});oe=ie,"undefined"!=typeof self&&(m.onmessage=function(){var e=a()(c.a.mark((function e(t,r){var n,o,i,a,u;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="process"===e.t0?3:16;break;case 3:return e.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,e.next=7,_({loader:oe,arrayBuffer:n,options:i,context:{parse:O}});case 7:a=e.sent,m.postMessage("done",{result:a}),e.next=15;break;case 11:e.prev=11,e.t1=e.catch(3),u=e.t1 instanceof Error?e.t1.message:"",m.postMessage("error",{error:u});case 15:return e.abrupt("break",16);case 16:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,r){return e.apply(this,arguments)}}())}]);
//# sourceMappingURL=crunch-worker.js.map

@@ -1,2 +0,2 @@

!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return _})),n.d(e,"c",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},_="object"!=typeof r||"[object process]"!==String(r)||r.browser,s="function"==typeof importScripts,a=("undefined"!=typeof window&&window.orientation,void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version));a&&parseFloat(a[1])}).call(this,n(4),n(5))},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return _}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window,_="object"!=typeof r||"[object process]"!==String(r)||r.browser,s=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);s&&parseFloat(s[1])}).call(this,n(4),n(5))},function(t,e){},function(t,e){},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function _(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:_}catch(t){r=_}}();var a,c=[],S=!1,u=-1;function E(){S&&a&&(S=!1,a.length?c=a.concat(c):u=-1,c.length&&R())}function R(){if(!S){var t=s(E);S=!0;for(var e=c.length;e;){for(a=c,c=[];++u<e;)a&&a[u].run();u=-1,e=c.length}a=null,S=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===_||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function l(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||S||s(R)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=l,i.addListener=l,i.once=l,i.off=l,i.removeListener=l,i.removeAllListeners=l,i.emit=l,i.prependListener=l,i.prependOnceListener=l,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return o}));var r=n(13);const i=t+"/../../..";async function o(t,e){const n=["texture-compressor","--type","s3tc","--compression","DXT1","--quality","normal","--input",t,"--output",e],o=new r.a;return await o.start({command:"npx",arguments:n,spawn:{cwd:i}}),e}}).call(this,"/")},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(3),i=n.n(r);function o(t=3e3){return new Promise(e=>{i.a.exec("lsof -i -P -n | grep LISTEN",(n,r)=>{if(n)return void e(t);const i=[],o=/:(\d+) \(LISTEN\)/;r.split("\n").forEach(t=>{const e=o.exec(t);e&&i.push(Number(e[1]))});let _=t;for(;i.includes(_);)_++;e(_)})})}},function(t,e,n){(function(e){const r=n(12),i="undefined"==typeof window?e:window;i.loaders=i.loaders||{},t.exports=Object.assign(i.loaders,r)}).call(this,n(4))},,function(t,e,n){"use strict";n.r(e),n.d(e,"BasisLoader",(function(){return R})),n.d(e,"BasisWorkerLoader",(function(){return E})),n.d(e,"CompressedTextureLoader",(function(){return ot})),n.d(e,"CompressedTextureWorkerLoader",(function(){return it})),n.d(e,"CrunchLoader",(function(){return _t})),n.d(e,"NPYLoader",(function(){return ut})),n.d(e,"NPYWorkerLoader",(function(){return St})),n.d(e,"CompressedTextureWriter",(function(){return Et})),n.d(e,"loadImageTexture",(function(){return vt})),n.d(e,"loadImageTextureArray",(function(){return Ft})),n.d(e,"loadImageTextureCube",(function(){return Vt})),n.d(e,"GL_CONSTANTS",(function(){return c})),n.d(e,"getSupportedGPUTextureFormats",(function(){return zt})),n.d(e,"CrunchWorkerLoader",(function(){return _t}));var r=n(0),i=n(2);const o={};async function _(t,e=null,n={}){return e&&(t=function(t,e,n){if(t.startsWith("http"))return t;const i=n.modules||{};if(i[t])return i[t];if(!r.b)return`modules/${e}/dist/libs/${t}`;if(n.CDN)return function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(n.CDN.startsWith("http")),`${n.CDN}/${e}@3.0.3/dist/libs/${t}`;if(r.c)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,n)),o[t]=o[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!r.b)return i.requireFromFile&&await i.requireFromFile(t);if(r.c)return importScripts(t);const e=await fetch(t);return function(t,e){if(!r.b)return i.requireFromString&&i.requireFromString(t,e);if(r.c)return eval.call(r.a,t),null;const n=document.createElement("script");n.id=e;try{n.appendChild(document.createTextNode(t))}catch(e){n.text=t}return document.body.appendChild(n),null}(await e.text(),t)}(t),await o[t]}let s;async function a(t){const e=t.modules||{};return e.basis?e.basis:(s=s||async function(t){let e=null,n=null;return[e,n]=await Promise.all([await _("basis_transcoder.js","textures",t),await _("basis_transcoder.wasm","textures",t)]),e=e||globalThis.BASIS,await function(t,e){const n={};e&&(n.wasmBinary=e);return new Promise(e=>{t(n).then(t=>{const{BasisFile:n,initializeBasis:r}=t;r(),e({BasisFile:n})})})}(e,n)}(t),await s)}const c={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},S={etc1:{basisFormat:0,compressed:!0},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:c.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:c.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0},"astc-4x4":{basisFormat:10,compressed:!0},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function u(t,e,n,r){const i=t.getImageWidth(e,n),o=t.getImageHeight(e,n),_=t.getHasAlpha(),{compressed:s,format:a,basisFormat:c}=function(t,e){let n=t&&t.basis&&t.basis.format;return"object"==typeof n&&(n=e?n.alpha:n.noAlpha),n=n.toLowerCase(),S[n]}(r,_),u=t.getImageTranscodedSizeInBytes(e,n,c),E=new Uint8Array(u);return t.transcodeImage(E,e,n,c,0,0)?{width:i,height:o,data:E,compressed:s,hasAlpha:_,format:a}:null}const E={name:"Basis",id:"basis",module:"textures",version:"3.0.3",worker:!0,extensions:["basis"],mimeTypes:["application/octet-stream"],tests:["sB"],binary:!0,options:{basis:{format:"rgb565",libraryPath:"libs/"}}},R={...E,parse:async function(t,e){const{BasisFile:n}=await a(e),r=new n(new Uint8Array(t));try{if(!r.startTranscoding())return null;const t=r.getNumImages(),n=[];for(let i=0;i<t;i++){const t=r.getNumLevels(i),o=[];for(let n=0;n<t;n++)o.push(u(r,i,n,e));n.push(o)}return n}finally{r.close(),r.delete()}}},f=(new Uint8Array([0]),[171,75,84,88,32,50,48,187,13,10,26,10]);var l,A,C,d,T,m,P,h;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(l||(l={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(A||(A={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(C||(C={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(d||(d={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(T||(T={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(m||(m={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(P||(P={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(h||(h={}));class p{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=l.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:A.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:C.UNSPECIFIED,colorPrimaries:d.SRGB,transferFunction:d.SRGB,flags:m.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class D{constructor(t,e,n,r){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=r,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==e&&r<t;)r++,this._offset++;return r<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,r)}}function M(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function g(t,e){const n=new Array(e.mipMapLevels);let r=e.width,i=e.height,o=0;for(let _=0;_<e.mipMapLevels;++_){const s=w(e,r,i,t,_),a=G(t,_,o,s);n[_]={compressed:!0,format:e.internalFormat,data:a,width:r,height:i,levelSize:s},r=Math.max(1,r>>1),i=Math.max(1,i>>1),o+=s}return n}function G(t,e,n,r){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+n,r)}function w(t,e,n,r,i){return Array.isArray(r)?t.sizeFunction(r[i]):t.sizeFunction(e,n)}const B={131:c.COMPRESSED_RGB_S3TC_DXT1_EXT,132:c.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:c.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:c.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:c.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:c.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:c.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:c.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:c.COMPRESSED_RED_RGTC1_EXT,140:c.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:c.COMPRESSED_RED_GREEN_RGTC2_EXT,142:c.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:c.COMPRESSED_RGB8_ETC2,148:c.COMPRESSED_SRGB8_ETC2,149:c.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:c.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:c.COMPRESSED_RGBA8_ETC2_EAC,152:c.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:c.COMPRESSED_R11_EAC,154:c.COMPRESSED_SIGNED_R11_EAC,155:c.COMPRESSED_RG11_EAC,156:c.COMPRESSED_SIGNED_RG11_EAC,157:c.COMPRESSED_RGBA_ASTC_4x4_KHR,158:c.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:c.COMPRESSED_RGBA_ASTC_5x4_KHR,160:c.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:c.COMPRESSED_RGBA_ASTC_5x5_KHR,162:c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:c.COMPRESSED_RGBA_ASTC_6x5_KHR,164:c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:c.COMPRESSED_RGBA_ASTC_6x6_KHR,166:c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:c.COMPRESSED_RGBA_ASTC_8x5_KHR,168:c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:c.COMPRESSED_RGBA_ASTC_8x6_KHR,170:c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:c.COMPRESSED_RGBA_ASTC_8x8_KHR,172:c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:c.COMPRESSED_RGBA_ASTC_10x5_KHR,174:c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:c.COMPRESSED_RGBA_ASTC_10x6_KHR,176:c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:c.COMPRESSED_RGBA_ASTC_10x8_KHR,178:c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:c.COMPRESSED_RGBA_ASTC_10x10_KHR,180:c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:c.COMPRESSED_RGBA_ASTC_12x10_KHR,182:c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:c.COMPRESSED_RGBA_ASTC_12x12_KHR,184:c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:c.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:c.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:c.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:c.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:c.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:c.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:c.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:c.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:c.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:c.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:c.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:c.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:c.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:c.COMPRESSED_RGBA_ASTC_12x12_KHR};const O=[171,75,84,88,32,50,48,187,13,10,26,10];function x(t){const e=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,f.length);if(e[0]!==f[0]||e[1]!==f[1]||e[2]!==f[2]||e[3]!==f[3]||e[4]!==f[4]||e[5]!==f[5]||e[6]!==f[6]||e[7]!==f[7]||e[8]!==f[8]||e[9]!==f[9]||e[10]!==f[10]||e[11]!==f[11])throw new Error("Missing KTX 2.0 identifier.");const n=new p,r=17*Uint32Array.BYTES_PER_ELEMENT,i=new D(t,f.length,r,!0);n.vkFormat=i._nextUint32(),n.typeSize=i._nextUint32(),n.pixelWidth=i._nextUint32(),n.pixelHeight=i._nextUint32(),n.pixelDepth=i._nextUint32(),n.layerCount=i._nextUint32(),n.faceCount=i._nextUint32();const o=i._nextUint32();n.supercompressionScheme=i._nextUint32();const _=i._nextUint32(),s=i._nextUint32(),a=i._nextUint32(),c=i._nextUint32(),S=i._nextUint64(),u=i._nextUint64(),E=new D(t,f.length+r,3*o*8,!0);for(let e=0;e<o;e++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+E._nextUint64(),E._nextUint64()),uncompressedByteLength:E._nextUint64()});const R=new D(t,_,s,!0),l={vendorId:R._skip(4)._nextUint16(),descriptorType:R._nextUint16(),versionNumber:R._nextUint16(),descriptorBlockSize:R._nextUint16(),colorModel:R._nextUint8(),colorPrimaries:R._nextUint8(),transferFunction:R._nextUint8(),flags:R._nextUint8(),texelBlockDimension:{x:R._nextUint8()+1,y:R._nextUint8()+1,z:R._nextUint8()+1,w:R._nextUint8()+1},bytesPlane:[R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8()],samples:[]},A=(l.descriptorBlockSize/4-6)/4;for(let t=0;t<A;t++)l.samples[t]={bitOffset:R._nextUint16(),bitLength:R._nextUint8(),channelID:R._nextUint8(),samplePosition:[R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8()],sampleLower:R._nextUint32(),sampleUpper:R._nextUint32()};n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(l);const C=new D(t,a,c,!0);for(;C._offset<c;){const t=C._nextUint32(),e=C._scan(t),r=M(e),i=C._scan(t-e.byteLength);n.keyValue[r]=r.match(/^ktx/i)?M(i):i,t%4&&C._skip(4-t%4)}if(u<=0)return n;const d=new D(t,S,u,!0),T=d._nextUint16(),m=d._nextUint16(),P=d._nextUint32(),h=d._nextUint32(),g=d._nextUint32(),G=d._nextUint32(),w=[];for(let t=0;t<o;t++)w.push({imageFlags:d._nextUint32(),rgbSliceByteOffset:d._nextUint32(),rgbSliceByteLength:d._nextUint32(),alphaSliceByteOffset:d._nextUint32(),alphaSliceByteLength:d._nextUint32()});const B=S+d._offset,O=B+P,x=O+h,y=x+g,H=new Uint8Array(t.buffer,t.byteOffset+B,P),b=new Uint8Array(t.buffer,t.byteOffset+O,h),U=new Uint8Array(t.buffer,t.byteOffset+x,g),L=new Uint8Array(t.buffer,t.byteOffset+y,G);return n.globalData={endpointCount:T,selectorCount:m,imageDescs:w,endpointsData:H,selectorsData:b,tablesData:U,extendedData:L},n}(new Uint8Array(t)),n=Math.max(1,e.levels.length),r=e.pixelWidth,i=e.pixelHeight,o=(_=e.vkFormat,B[_]);var _;return g(e.levels,{mipMapLevels:n,width:r,height:i,sizeFunction:t=>t.uncompressedByteLength,internalFormat:o})}function y(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const H=I,b=K,U=K,L={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:c.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:c.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:c.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":c.COMPRESSED_RGB_ATC_WEBGL,ATCA:c.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:c.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:I,DXT3:K,DXT5:K,"ATC ":H,ATCA:b,ATCI:U}};function X(t){const e=new Int32Array(t,0,L.HEADER_LENGTH),n=e[L.HEADER_PF_FOURCC_INDEX];y(Boolean(e[L.HEADER_PF_FLAGS_INDEX]&L.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");const r=(i=n,String.fromCharCode(255&i,i>>8&255,i>>16&255,i>>24&255));var i;const o=L.PIXEL_FORMATS[r],_=L.SIZE_FUNCTIONS[r];y(o&&_,"DDS: Unknown pixel format "+n);let s=1;e[L.HEADER_FLAGS_INDEX]&L.DDSD_MIPMAPCOUNT&&(s=Math.max(1,e[L.MIPMAPCOUNT_INDEX]));const a=e[L.HEADER_WIDTH_INDEX],c=e[L.HEADER_HEIGHT_INDEX],S=e[L.HEADER_SIZE_INDEX]+4;return g(new Uint8Array(t,S),{mipMapLevels:s,width:a,height:c,sizeFunction:_,internalFormat:o})}function I(t,e){return(t+3>>2)*(e+3>>2)*8}function K(t,e){return(t+3>>2)*(e+3>>2)*16}const v=55727696,N=1347834371,F=13,k=52,V=0,W=2,j=4,$=6,z=7,Z=11,q=12,Y={0:[c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[c.COMPRESSED_RGB_ETC1_WEBGL],7:[c.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[c.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[c.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[c.COMPRESSED_RGB8_ETC2],23:[c.COMPRESSED_RGBA8_ETC2_EAC],24:[c.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[c.COMPRESSED_R11_EAC],26:[c.COMPRESSED_RG11_EAC],27:[c.COMPRESSED_RGBA_ASTC_4X4_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[c.COMPRESSED_RGBA_ASTC_5X4_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[c.COMPRESSED_RGBA_ASTC_5X5_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[c.COMPRESSED_RGBA_ASTC_6X5_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[c.COMPRESSED_RGBA_ASTC_6X6_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[c.COMPRESSED_RGBA_ASTC_8X5_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[c.COMPRESSED_RGBA_ASTC_8X6_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[c.COMPRESSED_RGBA_ASTC_8X8_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[c.COMPRESSED_RGBA_ASTC_10X5_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[c.COMPRESSED_RGBA_ASTC_10X6_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[c.COMPRESSED_RGBA_ASTC_10X8_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[c.COMPRESSED_RGBA_ASTC_10X10_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[c.COMPRESSED_RGBA_ASTC_12X10_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[c.COMPRESSED_RGBA_ASTC_12X12_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},J={0:Q,1:Q,2:tt,3:tt,6:et,7:et,9:nt,11:nt,22:et,23:nt,24:et,25:et,26:nt,27:nt,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function Q(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function tt(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function et(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function nt(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function rt(t){if(function(t){const e=new Uint8Array(t.buffer||t,t.byteOffset||0,O.length);return!(e[0]!==O[0]||e[1]!==O[1]||e[2]!==O[2]||e[3]!==O[3]||e[4]!==O[4]||e[5]!==O[5]||e[6]!==O[6]||e[7]!==O[7]||e[8]!==O[8]||e[9]!==O[9]||e[10]!==O[10]||e[11]!==O[11])}(t))return x(t);if(function(t){return new Uint32Array(t,0,L.HEADER_LENGTH)[L.MAGIC_NUMBER_INDEX]===L.MAGIC_NUMBER}(t))return X(t);if(function(t){const e=new Uint32Array(t,0,F)[V];return e===v||e===N}(t))return function(t){const e=new Uint32Array(t,0,F),n=e[W],r=e[j],i=Y[n]||[],o=i.length>1&&r?i[1]:i[0],_=J[n],s=e[Z],a=e[z],c=e[$],S=k+e[q];return g(new Uint8Array(t,S),{mipMapLevels:s,width:a,height:c,sizeFunction:_,internalFormat:o})}(t);throw new Error("Texture container format not recognized")}const it={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.0.3",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/"}}},ot={...it,parse:async t=>rt(t)},_t={id:"crunch",name:"Crunch",module:"textures",version:"3.0.3",worker:!0,extensions:["crn"],mimeTypes:["image/crn","image/x-crn","application/octet-stream"],binary:!0,options:{crunch:{libraryPath:"libs/"}}};const st=function(){const t=new Uint32Array([305419896]);return!(18===new Uint8Array(t.buffer,t.byteOffset,t.byteLength)[0])}(),at={u1:Uint8Array,i1:Int8Array,u2:Uint16Array,i2:Int16Array,u4:Uint32Array,i4:Int32Array,f4:Float32Array,f8:Float64Array};function ct(t,e){if(!t)return null;const n=new DataView(t),{header:r,headerEndOffset:i}=function(t){const e=t.getUint8(6);let n,r=8;e>=2?(n=t.getUint32(8,!0),r+=4):(n=t.getUint16(8,!0),r+=2);const i=new TextDecoder(e<=2?"latin1":"utf-8"),o=new Uint8Array(t.buffer,r,n),_=i.decode(o);r+=n;return{header:JSON.parse(_.replace(/'/g,'"').replace("False","false").replace("(","[").replace(/,*\),*/g,"]")),headerEndOffset:r}}(n),o=r.descr,_=at[o.slice(1,3)];if(!_)return console.warn("Decoding of npy dtype not implemented: "+o),null;const s=r.shape.reduce((t,e)=>t*e)*_.BYTES_PER_ELEMENT,a=new _(t.slice(i,i+s));return(">"===o[0]&&st||"<"===o[0]&&!st)&&console.warn("Data is wrong endianness, byte swapping not yet implemented."),{data:a,header:r}}const St={name:"NPY",id:"npy",module:"textures",version:"3.0.3",worker:!0,extensions:["npy"],mimeTypes:[],tests:[new Uint8Array([147,78,85,77,80,89]).buffer],options:{npy:{}}},ut={...St,parseSync:ct,parse:async(t,e)=>ct(t)};const Et={name:"DDS Texture Container",id:"dds",module:"textures",version:"3.0.3",extensions:["dds"],options:{texture:{format:"auto",compression:"auto",quality:"auto",mipmap:!1,flipY:!1,toolFlags:""}},encodeURLtoURL:n(8).a};function Rt(t,e){if(!t)throw new Error(e)}var ft=n(1);const{_parseImageNode:lt}=ft.a,At="undefined"!=typeof Image,Ct="undefined"!=typeof ImageBitmap,dt=Boolean(lt),Tt=!!ft.b||dt;function mt(t){const e=ht(t);if(!e)throw new Error("Not an image");return e}function Pt(t){switch(mt(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),n=e.getContext("2d");if(!n)throw new Error("getImageData");return e.width=t.width,e.height=t.height,n.drawImage(t,0,0),n.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function ht(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}const pt=/^data:image\/svg\+xml/,Dt=/\.svg((\?|#).*)?$/;function Mt(t){return t&&(pt.test(t)||Dt.test(t))}function gt(t,e){if(Mt(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function Gt(t,e,n){const r=function(t,e){if(Mt(e)){const e=(new TextDecoder).decode(t);return"data:image/svg+xml;base64,"+btoa(e)}return gt(t,e)}(t,n),i=self.URL||self.webkitURL,o="string"!=typeof r&&i.createObjectURL(r);try{return await async function(t,e){const n=new Image;if(n.src=t,e.image&&e.image.decode&&n.decode)return await n.decode(),n;return await new Promise((e,r)=>{try{n.onload=()=>e(n),n.onerror=e=>r(new Error(`Could not load image ${t}: ${e}`))}catch(t){r(t)}})}(o||r,e)}finally{o&&i.revokeObjectURL(o)}}const wt={};let Bt=!0;async function Ot(t,e,n){let r;if(Mt(n)){r=await Gt(t,e,n)}else r=gt(t,n);const i=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||wt)return!1;return!0}(e)&&Bt||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),Bt=!1}return await createImageBitmap(t)}(r,i)}function xt(t){const e=yt(t);return function(t){const e=yt(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=yt(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:n,sofMarkers:r}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let i=2;for(;i+9<e.byteLength;){const t=e.getUint16(i,!1);if(r.has(t))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!n.has(t))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){const e=yt(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=yt(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function yt(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const Ht={id:"image",module:"images",name:"Images",version:"3.0.3",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(t,e,n){const r=((e=e||{}).image||{}).type||"auto",{url:i}=n||{};let o;switch(function(t){switch(t){case"auto":case"data":return function(){if(Ct)return"imagebitmap";if(At)return"image";if(Tt)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return Ct||At||Tt;case"imagebitmap":return Ct;case"image":return At;case"data":return Tt;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(r)){case"imagebitmap":o=await Ot(t,e,i);break;case"image":o=await Gt(t,e,i);break;case"data":o=await function(t,e){const{mimeType:n}=xt(t)||{},{_parseImageNode:r}=ft.a;return Rt(r),r(t,n,e)}(t,e);break;default:Rt(!1)}return"data"===r&&(o=Pt(o)),o},tests:[t=>Boolean(xt(new DataView(t)))],options:{image:{type:"auto",decode:!0}}};let bt="";const Ut={};function Lt(t,e,n){let r=t;"function"==typeof t&&(r=t({...e,...n})),y("string"==typeof r);const{baseUrl:i}=e;return i&&(r="/"===i[i.length-1]?`${i}${r}`:`${i}/${r}`),function(t){for(const e in Ut)if(t.startsWith(e)){const n=Ut[e];t=t.replace(e,n)}return t.startsWith("http://")||t.startsWith("https://")||(t=`${bt}${t}`),t}(r)}async function Xt(t,e,n){if(Array.isArray(t))return await async function(t,e,n={}){const r=t.map(t=>Xt(t,e,n));return await Promise.all(r)}(t,e,n);if((r=t)&&"object"==typeof r)return await async function(t,e,n){const r=[],i={};for(const o in t){const _=Xt(t[o],e,n).then(t=>{i[o]=t});r.push(_)}return await Promise.all(r),i}(t,e,n);var r;const i=t;return await e(i,n)}async function It(t,e,n){return await async function(t,e,n={}){return await Xt(t,e,n)}(t,t=>Kt(t,e,n))}async function Kt(t,e,n){const r=await fetch(t,n.fetch),i=await r.arrayBuffer();return await e(i,n)}async function vt(t,e={}){const n=await Nt(t,e);return await It(n,Ht.parse,e)}async function Nt(t,e,n={}){const r=e&&e.image&&e.image.mipLevels||0;return 0!==r?await async function(t,e,n,r){const i=[];if("auto"===e){const o=Lt(t,n,{...r,lod:0}),_=await Kt(o,Ht.parse,n),{width:s,height:a}=function(t){return Pt(t)}(_);e=function({width:t,height:e}){return 1+Math.floor(Math.log2(Math.max(t,e)))}({width:s,height:a}),i.push(o)}y(e>0);for(let o=i.length;o<e;++o){const e=Lt(t,n,{...r,lod:o});i.push(e)}return i}(t,r,e,n):Lt(t,e,n)}async function Ft(t,e,n={}){const r=await async function(t,e,n={}){const r=[];for(let i=0;i<t;i++){const t=Nt(e,n,{index:i});r.push(t)}return await Promise.all(r)}(t,e,n);return await It(r,Ht.parse,n)}const kt=[{face:34069,direction:"right",axis:"x",sign:"positive"},{face:34070,direction:"left",axis:"x",sign:"negative"},{face:34071,direction:"top",axis:"y",sign:"positive"},{face:34072,direction:"bottom",axis:"y",sign:"negative"},{face:34073,direction:"front",axis:"z",sign:"positive"},{face:34074,direction:"back",axis:"z",sign:"negative"}];async function Vt(t,e={}){const n=await async function(t,e){const n={},r=[];let i=0;for(let o=0;o<kt.length;++o){const o=kt[i],_=Nt(t,e,{...o,index:i++}).then(t=>{n[o.face]=t});r.push(_)}return await Promise.all(r),n}(t,e);return await It(n,Ht.parse,e)}const Wt=["","WEBKIT_","MOZ_"],jt={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let $t=null;function zt(t){if(!$t){t=t||function(){try{return document.createElement("canvas").getContext("webgl")}catch(t){return null}}()||void 0,$t=new Set;for(const e of Wt)for(const n in jt)if(t&&t.getExtension(`${e}${n}`)){const t=jt[n];$t.add(t)}}return $t}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return s}));var r=n(3),i=n(9);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const _={command:"",arguments:[],port:5e3,autoPort:!0,wait:2e3,onSuccess:t=>{console.log("Started "+t.props.command)}};class s{constructor({id:t="browser-driver"}={}){o(this,"id",void 0),o(this,"props",{..._}),o(this,"childProcess",null),o(this,"port",0),o(this,"successTimer",void 0),this.id=t}async start(t){t={..._,...t},this.props=t;const e=[...t.arguments];return this.port=Number(t.port),t.portArg&&(t.autoPort&&(this.port=await Object(i.a)(t.port)),e.push(t.portArg,String(this.port))),await new Promise((n,i)=>{try{this._setTimeout(()=>{t.onSuccess&&t.onSuccess(this),n({})}),console.log(`Spawning ${t.command} ${t.arguments.join(" ")}`);const o=Object(r.spawn)(t.command,e,t.spawn);this.childProcess=o,o.stdout.on("data",t=>{console.log(t.toString())}),o.stderr.on("data",t=>{console.log(`Child process wrote to stderr: "${t}".`),this._clearTimeout(),i(new Error(t))}),o.on("error",t=>{console.log("Child process errored with "+t),this._clearTimeout(),i(t)}),o.on("close",t=>{console.log("Child process exited with "+t),this.childProcess=null,this._clearTimeout(),n({})})}catch(t){i(t)}})}async stop(){this.childProcess&&(this.childProcess.kill(),this.childProcess=null)}async exit(e=0){try{await this.stop(),t.exit(e)}catch(e){console.error(e.message||e),t.exit(1)}}_setTimeout(t){Number(this.props.wait)>0&&(this.successTimer=setTimeout(t,this.props.wait))}_clearTimeout(){this.successTimer&&clearTimeout(this.successTimer)}}}).call(this,n(5))}])}));
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return _})),n.d(e,"c",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},_="object"!=typeof r||"[object process]"!==String(r)||r.browser,s="function"==typeof importScripts,a=("undefined"!=typeof window&&window.orientation,void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version));a&&parseFloat(a[1])}).call(this,n(4),n(5))},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return _}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window,_="object"!=typeof r||"[object process]"!==String(r)||r.browser,s=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);s&&parseFloat(s[1])}).call(this,n(4),n(5))},function(t,e){},function(t,e){},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function _(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:_}catch(t){r=_}}();var a,c=[],S=!1,u=-1;function E(){S&&a&&(S=!1,a.length?c=a.concat(c):u=-1,c.length&&R())}function R(){if(!S){var t=s(E);S=!0;for(var e=c.length;e;){for(a=c,c=[];++u<e;)a&&a[u].run();u=-1,e=c.length}a=null,S=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===_||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function l(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||S||s(R)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=l,i.addListener=l,i.once=l,i.off=l,i.removeListener=l,i.removeAllListeners=l,i.emit=l,i.prependListener=l,i.prependOnceListener=l,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return o}));var r=n(13);const i=t+"/../../..";async function o(t,e){const n=["texture-compressor","--type","s3tc","--compression","DXT1","--quality","normal","--input",t,"--output",e],o=new r.a;return await o.start({command:"npx",arguments:n,spawn:{cwd:i}}),e}}).call(this,"/")},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(3),i=n.n(r);function o(t=3e3){return new Promise(e=>{i.a.exec("lsof -i -P -n | grep LISTEN",(n,r)=>{if(n)return void e(t);const i=[],o=/:(\d+) \(LISTEN\)/;r.split("\n").forEach(t=>{const e=o.exec(t);e&&i.push(Number(e[1]))});let _=t;for(;i.includes(_);)_++;e(_)})})}},function(t,e,n){(function(e){const r=n(12),i="undefined"==typeof window?e:window;i.loaders=i.loaders||{},t.exports=Object.assign(i.loaders,r)}).call(this,n(4))},,function(t,e,n){"use strict";n.r(e),n.d(e,"BasisLoader",(function(){return R})),n.d(e,"BasisWorkerLoader",(function(){return E})),n.d(e,"CompressedTextureLoader",(function(){return ot})),n.d(e,"CompressedTextureWorkerLoader",(function(){return it})),n.d(e,"CrunchLoader",(function(){return _t})),n.d(e,"NPYLoader",(function(){return ut})),n.d(e,"NPYWorkerLoader",(function(){return St})),n.d(e,"CompressedTextureWriter",(function(){return Et})),n.d(e,"loadImageTexture",(function(){return vt})),n.d(e,"loadImageTextureArray",(function(){return Ft})),n.d(e,"loadImageTextureCube",(function(){return Vt})),n.d(e,"GL_CONSTANTS",(function(){return c})),n.d(e,"getSupportedGPUTextureFormats",(function(){return zt})),n.d(e,"CrunchWorkerLoader",(function(){return _t}));var r=n(0),i=n(2);const o={};async function _(t,e=null,n={}){return e&&(t=function(t,e,n){if(t.startsWith("http"))return t;const i=n.modules||{};if(i[t])return i[t];if(!r.b)return`modules/${e}/dist/libs/${t}`;if(n.CDN)return function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(n.CDN.startsWith("http")),`${n.CDN}/${e}@3.0.4/dist/libs/${t}`;if(r.c)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,n)),o[t]=o[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!r.b)return i.requireFromFile&&await i.requireFromFile(t);if(r.c)return importScripts(t);const e=await fetch(t);return function(t,e){if(!r.b)return i.requireFromString&&i.requireFromString(t,e);if(r.c)return eval.call(r.a,t),null;const n=document.createElement("script");n.id=e;try{n.appendChild(document.createTextNode(t))}catch(e){n.text=t}return document.body.appendChild(n),null}(await e.text(),t)}(t),await o[t]}let s;async function a(t){const e=t.modules||{};return e.basis?e.basis:(s=s||async function(t){let e=null,n=null;return[e,n]=await Promise.all([await _("basis_transcoder.js","textures",t),await _("basis_transcoder.wasm","textures",t)]),e=e||globalThis.BASIS,await function(t,e){const n={};e&&(n.wasmBinary=e);return new Promise(e=>{t(n).then(t=>{const{BasisFile:n,initializeBasis:r}=t;r(),e({BasisFile:n})})})}(e,n)}(t),await s)}const c={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},S={etc1:{basisFormat:0,compressed:!0},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:c.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:c.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0},"astc-4x4":{basisFormat:10,compressed:!0},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function u(t,e,n,r){const i=t.getImageWidth(e,n),o=t.getImageHeight(e,n),_=t.getHasAlpha(),{compressed:s,format:a,basisFormat:c}=function(t,e){let n=t&&t.basis&&t.basis.format;return"object"==typeof n&&(n=e?n.alpha:n.noAlpha),n=n.toLowerCase(),S[n]}(r,_),u=t.getImageTranscodedSizeInBytes(e,n,c),E=new Uint8Array(u);return t.transcodeImage(E,e,n,c,0,0)?{width:i,height:o,data:E,compressed:s,hasAlpha:_,format:a}:null}const E={name:"Basis",id:"basis",module:"textures",version:"3.0.4",worker:!0,extensions:["basis"],mimeTypes:["application/octet-stream"],tests:["sB"],binary:!0,options:{basis:{format:"rgb565",libraryPath:"libs/"}}},R={...E,parse:async function(t,e){const{BasisFile:n}=await a(e),r=new n(new Uint8Array(t));try{if(!r.startTranscoding())return null;const t=r.getNumImages(),n=[];for(let i=0;i<t;i++){const t=r.getNumLevels(i),o=[];for(let n=0;n<t;n++)o.push(u(r,i,n,e));n.push(o)}return n}finally{r.close(),r.delete()}}},f=(new Uint8Array([0]),[171,75,84,88,32,50,48,187,13,10,26,10]);var l,A,C,d,T,m,P,h;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(l||(l={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(A||(A={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(C||(C={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(d||(d={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(T||(T={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(m||(m={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(P||(P={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(h||(h={}));class p{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=l.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:A.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:C.UNSPECIFIED,colorPrimaries:d.SRGB,transferFunction:d.SRGB,flags:m.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class D{constructor(t,e,n,r){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=r,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==e&&r<t;)r++,this._offset++;return r<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,r)}}function M(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function g(t,e){const n=new Array(e.mipMapLevels);let r=e.width,i=e.height,o=0;for(let _=0;_<e.mipMapLevels;++_){const s=w(e,r,i,t,_),a=G(t,_,o,s);n[_]={compressed:!0,format:e.internalFormat,data:a,width:r,height:i,levelSize:s},r=Math.max(1,r>>1),i=Math.max(1,i>>1),o+=s}return n}function G(t,e,n,r){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+n,r)}function w(t,e,n,r,i){return Array.isArray(r)?t.sizeFunction(r[i]):t.sizeFunction(e,n)}const B={131:c.COMPRESSED_RGB_S3TC_DXT1_EXT,132:c.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:c.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:c.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:c.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:c.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:c.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:c.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:c.COMPRESSED_RED_RGTC1_EXT,140:c.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:c.COMPRESSED_RED_GREEN_RGTC2_EXT,142:c.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:c.COMPRESSED_RGB8_ETC2,148:c.COMPRESSED_SRGB8_ETC2,149:c.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:c.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:c.COMPRESSED_RGBA8_ETC2_EAC,152:c.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:c.COMPRESSED_R11_EAC,154:c.COMPRESSED_SIGNED_R11_EAC,155:c.COMPRESSED_RG11_EAC,156:c.COMPRESSED_SIGNED_RG11_EAC,157:c.COMPRESSED_RGBA_ASTC_4x4_KHR,158:c.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:c.COMPRESSED_RGBA_ASTC_5x4_KHR,160:c.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:c.COMPRESSED_RGBA_ASTC_5x5_KHR,162:c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:c.COMPRESSED_RGBA_ASTC_6x5_KHR,164:c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:c.COMPRESSED_RGBA_ASTC_6x6_KHR,166:c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:c.COMPRESSED_RGBA_ASTC_8x5_KHR,168:c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:c.COMPRESSED_RGBA_ASTC_8x6_KHR,170:c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:c.COMPRESSED_RGBA_ASTC_8x8_KHR,172:c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:c.COMPRESSED_RGBA_ASTC_10x5_KHR,174:c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:c.COMPRESSED_RGBA_ASTC_10x6_KHR,176:c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:c.COMPRESSED_RGBA_ASTC_10x8_KHR,178:c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:c.COMPRESSED_RGBA_ASTC_10x10_KHR,180:c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:c.COMPRESSED_RGBA_ASTC_12x10_KHR,182:c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:c.COMPRESSED_RGBA_ASTC_12x12_KHR,184:c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:c.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:c.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:c.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:c.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:c.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:c.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:c.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:c.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:c.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:c.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:c.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:c.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:c.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:c.COMPRESSED_RGBA_ASTC_12x12_KHR};const O=[171,75,84,88,32,50,48,187,13,10,26,10];function x(t){const e=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,f.length);if(e[0]!==f[0]||e[1]!==f[1]||e[2]!==f[2]||e[3]!==f[3]||e[4]!==f[4]||e[5]!==f[5]||e[6]!==f[6]||e[7]!==f[7]||e[8]!==f[8]||e[9]!==f[9]||e[10]!==f[10]||e[11]!==f[11])throw new Error("Missing KTX 2.0 identifier.");const n=new p,r=17*Uint32Array.BYTES_PER_ELEMENT,i=new D(t,f.length,r,!0);n.vkFormat=i._nextUint32(),n.typeSize=i._nextUint32(),n.pixelWidth=i._nextUint32(),n.pixelHeight=i._nextUint32(),n.pixelDepth=i._nextUint32(),n.layerCount=i._nextUint32(),n.faceCount=i._nextUint32();const o=i._nextUint32();n.supercompressionScheme=i._nextUint32();const _=i._nextUint32(),s=i._nextUint32(),a=i._nextUint32(),c=i._nextUint32(),S=i._nextUint64(),u=i._nextUint64(),E=new D(t,f.length+r,3*o*8,!0);for(let e=0;e<o;e++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+E._nextUint64(),E._nextUint64()),uncompressedByteLength:E._nextUint64()});const R=new D(t,_,s,!0),l={vendorId:R._skip(4)._nextUint16(),descriptorType:R._nextUint16(),versionNumber:R._nextUint16(),descriptorBlockSize:R._nextUint16(),colorModel:R._nextUint8(),colorPrimaries:R._nextUint8(),transferFunction:R._nextUint8(),flags:R._nextUint8(),texelBlockDimension:{x:R._nextUint8()+1,y:R._nextUint8()+1,z:R._nextUint8()+1,w:R._nextUint8()+1},bytesPlane:[R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8()],samples:[]},A=(l.descriptorBlockSize/4-6)/4;for(let t=0;t<A;t++)l.samples[t]={bitOffset:R._nextUint16(),bitLength:R._nextUint8(),channelID:R._nextUint8(),samplePosition:[R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8()],sampleLower:R._nextUint32(),sampleUpper:R._nextUint32()};n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(l);const C=new D(t,a,c,!0);for(;C._offset<c;){const t=C._nextUint32(),e=C._scan(t),r=M(e),i=C._scan(t-e.byteLength);n.keyValue[r]=r.match(/^ktx/i)?M(i):i,t%4&&C._skip(4-t%4)}if(u<=0)return n;const d=new D(t,S,u,!0),T=d._nextUint16(),m=d._nextUint16(),P=d._nextUint32(),h=d._nextUint32(),g=d._nextUint32(),G=d._nextUint32(),w=[];for(let t=0;t<o;t++)w.push({imageFlags:d._nextUint32(),rgbSliceByteOffset:d._nextUint32(),rgbSliceByteLength:d._nextUint32(),alphaSliceByteOffset:d._nextUint32(),alphaSliceByteLength:d._nextUint32()});const B=S+d._offset,O=B+P,x=O+h,y=x+g,H=new Uint8Array(t.buffer,t.byteOffset+B,P),b=new Uint8Array(t.buffer,t.byteOffset+O,h),U=new Uint8Array(t.buffer,t.byteOffset+x,g),L=new Uint8Array(t.buffer,t.byteOffset+y,G);return n.globalData={endpointCount:T,selectorCount:m,imageDescs:w,endpointsData:H,selectorsData:b,tablesData:U,extendedData:L},n}(new Uint8Array(t)),n=Math.max(1,e.levels.length),r=e.pixelWidth,i=e.pixelHeight,o=(_=e.vkFormat,B[_]);var _;return g(e.levels,{mipMapLevels:n,width:r,height:i,sizeFunction:t=>t.uncompressedByteLength,internalFormat:o})}function y(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const H=I,b=K,U=K,L={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:c.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:c.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:c.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":c.COMPRESSED_RGB_ATC_WEBGL,ATCA:c.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:c.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:I,DXT3:K,DXT5:K,"ATC ":H,ATCA:b,ATCI:U}};function X(t){const e=new Int32Array(t,0,L.HEADER_LENGTH),n=e[L.HEADER_PF_FOURCC_INDEX];y(Boolean(e[L.HEADER_PF_FLAGS_INDEX]&L.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");const r=(i=n,String.fromCharCode(255&i,i>>8&255,i>>16&255,i>>24&255));var i;const o=L.PIXEL_FORMATS[r],_=L.SIZE_FUNCTIONS[r];y(o&&_,"DDS: Unknown pixel format "+n);let s=1;e[L.HEADER_FLAGS_INDEX]&L.DDSD_MIPMAPCOUNT&&(s=Math.max(1,e[L.MIPMAPCOUNT_INDEX]));const a=e[L.HEADER_WIDTH_INDEX],c=e[L.HEADER_HEIGHT_INDEX],S=e[L.HEADER_SIZE_INDEX]+4;return g(new Uint8Array(t,S),{mipMapLevels:s,width:a,height:c,sizeFunction:_,internalFormat:o})}function I(t,e){return(t+3>>2)*(e+3>>2)*8}function K(t,e){return(t+3>>2)*(e+3>>2)*16}const v=55727696,N=1347834371,F=13,k=52,V=0,W=2,j=4,$=6,z=7,Z=11,q=12,Y={0:[c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[c.COMPRESSED_RGB_ETC1_WEBGL],7:[c.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[c.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[c.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[c.COMPRESSED_RGB8_ETC2],23:[c.COMPRESSED_RGBA8_ETC2_EAC],24:[c.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[c.COMPRESSED_R11_EAC],26:[c.COMPRESSED_RG11_EAC],27:[c.COMPRESSED_RGBA_ASTC_4X4_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[c.COMPRESSED_RGBA_ASTC_5X4_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[c.COMPRESSED_RGBA_ASTC_5X5_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[c.COMPRESSED_RGBA_ASTC_6X5_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[c.COMPRESSED_RGBA_ASTC_6X6_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[c.COMPRESSED_RGBA_ASTC_8X5_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[c.COMPRESSED_RGBA_ASTC_8X6_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[c.COMPRESSED_RGBA_ASTC_8X8_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[c.COMPRESSED_RGBA_ASTC_10X5_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[c.COMPRESSED_RGBA_ASTC_10X6_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[c.COMPRESSED_RGBA_ASTC_10X8_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[c.COMPRESSED_RGBA_ASTC_10X10_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[c.COMPRESSED_RGBA_ASTC_12X10_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[c.COMPRESSED_RGBA_ASTC_12X12_KHR,c.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},J={0:Q,1:Q,2:tt,3:tt,6:et,7:et,9:nt,11:nt,22:et,23:nt,24:et,25:et,26:nt,27:nt,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function Q(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function tt(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function et(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function nt(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function rt(t){if(function(t){const e=new Uint8Array(t.buffer||t,t.byteOffset||0,O.length);return!(e[0]!==O[0]||e[1]!==O[1]||e[2]!==O[2]||e[3]!==O[3]||e[4]!==O[4]||e[5]!==O[5]||e[6]!==O[6]||e[7]!==O[7]||e[8]!==O[8]||e[9]!==O[9]||e[10]!==O[10]||e[11]!==O[11])}(t))return x(t);if(function(t){return new Uint32Array(t,0,L.HEADER_LENGTH)[L.MAGIC_NUMBER_INDEX]===L.MAGIC_NUMBER}(t))return X(t);if(function(t){const e=new Uint32Array(t,0,F)[V];return e===v||e===N}(t))return function(t){const e=new Uint32Array(t,0,F),n=e[W],r=e[j],i=Y[n]||[],o=i.length>1&&r?i[1]:i[0],_=J[n],s=e[Z],a=e[z],c=e[$],S=k+e[q];return g(new Uint8Array(t,S),{mipMapLevels:s,width:a,height:c,sizeFunction:_,internalFormat:o})}(t);throw new Error("Texture container format not recognized")}const it={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.0.4",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/"}}},ot={...it,parse:async t=>rt(t)},_t={id:"crunch",name:"Crunch",module:"textures",version:"3.0.4",worker:!0,extensions:["crn"],mimeTypes:["image/crn","image/x-crn","application/octet-stream"],binary:!0,options:{crunch:{libraryPath:"libs/"}}};const st=function(){const t=new Uint32Array([305419896]);return!(18===new Uint8Array(t.buffer,t.byteOffset,t.byteLength)[0])}(),at={u1:Uint8Array,i1:Int8Array,u2:Uint16Array,i2:Int16Array,u4:Uint32Array,i4:Int32Array,f4:Float32Array,f8:Float64Array};function ct(t,e){if(!t)return null;const n=new DataView(t),{header:r,headerEndOffset:i}=function(t){const e=t.getUint8(6);let n,r=8;e>=2?(n=t.getUint32(8,!0),r+=4):(n=t.getUint16(8,!0),r+=2);const i=new TextDecoder(e<=2?"latin1":"utf-8"),o=new Uint8Array(t.buffer,r,n),_=i.decode(o);r+=n;return{header:JSON.parse(_.replace(/'/g,'"').replace("False","false").replace("(","[").replace(/,*\),*/g,"]")),headerEndOffset:r}}(n),o=r.descr,_=at[o.slice(1,3)];if(!_)return console.warn("Decoding of npy dtype not implemented: "+o),null;const s=r.shape.reduce((t,e)=>t*e)*_.BYTES_PER_ELEMENT,a=new _(t.slice(i,i+s));return(">"===o[0]&&st||"<"===o[0]&&!st)&&console.warn("Data is wrong endianness, byte swapping not yet implemented."),{data:a,header:r}}const St={name:"NPY",id:"npy",module:"textures",version:"3.0.4",worker:!0,extensions:["npy"],mimeTypes:[],tests:[new Uint8Array([147,78,85,77,80,89]).buffer],options:{npy:{}}},ut={...St,parseSync:ct,parse:async(t,e)=>ct(t)};const Et={name:"DDS Texture Container",id:"dds",module:"textures",version:"3.0.4",extensions:["dds"],options:{texture:{format:"auto",compression:"auto",quality:"auto",mipmap:!1,flipY:!1,toolFlags:""}},encodeURLtoURL:n(8).a};function Rt(t,e){if(!t)throw new Error(e)}var ft=n(1);const{_parseImageNode:lt}=ft.a,At="undefined"!=typeof Image,Ct="undefined"!=typeof ImageBitmap,dt=Boolean(lt),Tt=!!ft.b||dt;function mt(t){const e=ht(t);if(!e)throw new Error("Not an image");return e}function Pt(t){switch(mt(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),n=e.getContext("2d");if(!n)throw new Error("getImageData");return e.width=t.width,e.height=t.height,n.drawImage(t,0,0),n.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function ht(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}const pt=/^data:image\/svg\+xml/,Dt=/\.svg((\?|#).*)?$/;function Mt(t){return t&&(pt.test(t)||Dt.test(t))}function gt(t,e){if(Mt(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function Gt(t,e,n){const r=function(t,e){if(Mt(e)){const e=(new TextDecoder).decode(t);return"data:image/svg+xml;base64,"+btoa(e)}return gt(t,e)}(t,n),i=self.URL||self.webkitURL,o="string"!=typeof r&&i.createObjectURL(r);try{return await async function(t,e){const n=new Image;if(n.src=t,e.image&&e.image.decode&&n.decode)return await n.decode(),n;return await new Promise((e,r)=>{try{n.onload=()=>e(n),n.onerror=e=>r(new Error(`Could not load image ${t}: ${e}`))}catch(t){r(t)}})}(o||r,e)}finally{o&&i.revokeObjectURL(o)}}const wt={};let Bt=!0;async function Ot(t,e,n){let r;if(Mt(n)){r=await Gt(t,e,n)}else r=gt(t,n);const i=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||wt)return!1;return!0}(e)&&Bt||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),Bt=!1}return await createImageBitmap(t)}(r,i)}function xt(t){const e=yt(t);return function(t){const e=yt(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=yt(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:n,sofMarkers:r}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let i=2;for(;i+9<e.byteLength;){const t=e.getUint16(i,!1);if(r.has(t))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!n.has(t))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){const e=yt(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=yt(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function yt(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const Ht={id:"image",module:"images",name:"Images",version:"3.0.4",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(t,e,n){const r=((e=e||{}).image||{}).type||"auto",{url:i}=n||{};let o;switch(function(t){switch(t){case"auto":case"data":return function(){if(Ct)return"imagebitmap";if(At)return"image";if(Tt)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return Ct||At||Tt;case"imagebitmap":return Ct;case"image":return At;case"data":return Tt;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(r)){case"imagebitmap":o=await Ot(t,e,i);break;case"image":o=await Gt(t,e,i);break;case"data":o=await function(t,e){const{mimeType:n}=xt(t)||{},{_parseImageNode:r}=ft.a;return Rt(r),r(t,n,e)}(t,e);break;default:Rt(!1)}return"data"===r&&(o=Pt(o)),o},tests:[t=>Boolean(xt(new DataView(t)))],options:{image:{type:"auto",decode:!0}}};let bt="";const Ut={};function Lt(t,e,n){let r=t;"function"==typeof t&&(r=t({...e,...n})),y("string"==typeof r);const{baseUrl:i}=e;return i&&(r="/"===i[i.length-1]?`${i}${r}`:`${i}/${r}`),function(t){for(const e in Ut)if(t.startsWith(e)){const n=Ut[e];t=t.replace(e,n)}return t.startsWith("http://")||t.startsWith("https://")||(t=`${bt}${t}`),t}(r)}async function Xt(t,e,n){if(Array.isArray(t))return await async function(t,e,n={}){const r=t.map(t=>Xt(t,e,n));return await Promise.all(r)}(t,e,n);if((r=t)&&"object"==typeof r)return await async function(t,e,n){const r=[],i={};for(const o in t){const _=Xt(t[o],e,n).then(t=>{i[o]=t});r.push(_)}return await Promise.all(r),i}(t,e,n);var r;const i=t;return await e(i,n)}async function It(t,e,n){return await async function(t,e,n={}){return await Xt(t,e,n)}(t,t=>Kt(t,e,n))}async function Kt(t,e,n){const r=await fetch(t,n.fetch),i=await r.arrayBuffer();return await e(i,n)}async function vt(t,e={}){const n=await Nt(t,e);return await It(n,Ht.parse,e)}async function Nt(t,e,n={}){const r=e&&e.image&&e.image.mipLevels||0;return 0!==r?await async function(t,e,n,r){const i=[];if("auto"===e){const o=Lt(t,n,{...r,lod:0}),_=await Kt(o,Ht.parse,n),{width:s,height:a}=function(t){return Pt(t)}(_);e=function({width:t,height:e}){return 1+Math.floor(Math.log2(Math.max(t,e)))}({width:s,height:a}),i.push(o)}y(e>0);for(let o=i.length;o<e;++o){const e=Lt(t,n,{...r,lod:o});i.push(e)}return i}(t,r,e,n):Lt(t,e,n)}async function Ft(t,e,n={}){const r=await async function(t,e,n={}){const r=[];for(let i=0;i<t;i++){const t=Nt(e,n,{index:i});r.push(t)}return await Promise.all(r)}(t,e,n);return await It(r,Ht.parse,n)}const kt=[{face:34069,direction:"right",axis:"x",sign:"positive"},{face:34070,direction:"left",axis:"x",sign:"negative"},{face:34071,direction:"top",axis:"y",sign:"positive"},{face:34072,direction:"bottom",axis:"y",sign:"negative"},{face:34073,direction:"front",axis:"z",sign:"positive"},{face:34074,direction:"back",axis:"z",sign:"negative"}];async function Vt(t,e={}){const n=await async function(t,e){const n={},r=[];let i=0;for(let o=0;o<kt.length;++o){const o=kt[i],_=Nt(t,e,{...o,index:i++}).then(t=>{n[o.face]=t});r.push(_)}return await Promise.all(r),n}(t,e);return await It(n,Ht.parse,e)}const Wt=["","WEBKIT_","MOZ_"],jt={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let $t=null;function zt(t){if(!$t){t=t||function(){try{return document.createElement("canvas").getContext("webgl")}catch(t){return null}}()||void 0,$t=new Set;for(const e of Wt)for(const n in jt)if(t&&t.getExtension(`${e}${n}`)){const t=jt[n];$t.add(t)}}return $t}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return s}));var r=n(3),i=n(9);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const _={command:"",arguments:[],port:5e3,autoPort:!0,wait:2e3,onSuccess:t=>{console.log("Started "+t.props.command)}};class s{constructor({id:t="browser-driver"}={}){o(this,"id",void 0),o(this,"props",{..._}),o(this,"childProcess",null),o(this,"port",0),o(this,"successTimer",void 0),this.id=t}async start(t){t={..._,...t},this.props=t;const e=[...t.arguments];return this.port=Number(t.port),t.portArg&&(t.autoPort&&(this.port=await Object(i.a)(t.port)),e.push(t.portArg,String(this.port))),await new Promise((n,i)=>{try{this._setTimeout(()=>{t.onSuccess&&t.onSuccess(this),n({})}),console.log(`Spawning ${t.command} ${t.arguments.join(" ")}`);const o=Object(r.spawn)(t.command,e,t.spawn);this.childProcess=o,o.stdout.on("data",t=>{console.log(t.toString())}),o.stderr.on("data",t=>{console.log(`Child process wrote to stderr: "${t}".`),this._clearTimeout(),i(new Error(t))}),o.on("error",t=>{console.log("Child process errored with "+t),this._clearTimeout(),i(t)}),o.on("close",t=>{console.log("Child process exited with "+t),this.childProcess=null,this._clearTimeout(),n({})})}catch(t){i(t)}})}async stop(){this.childProcess&&(this.childProcess.kill(),this.childProcess=null)}async exit(e=0){try{await this.stop(),t.exit(e)}catch(e){console.error(e.message||e),t.exit(1)}}_setTimeout(t){Number(this.props.wait)>0&&(this.successTimer=setTimeout(t,this.props.wait))}_clearTimeout(){this.successTimer&&clearTimeout(this.successTimer)}}}).call(this,n(5))}])}));
//# sourceMappingURL=dist.min.js.map

@@ -7,4 +7,4 @@ "use strict";

exports.VERSION = void 0;
var VERSION = typeof "3.0.3" !== 'undefined' ? "3.0.3" : 'beta';
var VERSION = typeof "3.0.4" !== 'undefined' ? "3.0.4" : 'beta';
exports.VERSION = VERSION;
//# sourceMappingURL=version.js.map

@@ -1,2 +0,2 @@

export const VERSION = typeof "3.0.3" !== 'undefined' ? "3.0.3" : 'beta';
export const VERSION = typeof "3.0.4" !== 'undefined' ? "3.0.4" : 'beta';
//# sourceMappingURL=version.js.map

@@ -1,2 +0,2 @@

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t,r){e.exports=r(6)},function(e,t){function r(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function c(e){r(a,o,i,c,u,"next",e)}function u(e){r(a,o,i,c,u,"throw",e)}c(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof l?t:l,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function l(){}function p(){}function y(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(E([])));v&&v!==t&&r.call(v,o)&&(d=v);var g=y.prototype=l.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,c){var u=s(e[o],e,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=g.constructor=y,y.constructor=p,p.displayName=c(y,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},m(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(g),c(g,a,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),i=r(2),a=r.n(i),c=r(0),u=r.n(c);var s,f=(s=new Uint32Array([305419896]),!(18===new Uint8Array(s.buffer,s.byteOffset,s.byteLength)[0])),l={u1:Uint8Array,i1:Int8Array,u2:Uint16Array,i2:Int16Array,u4:Uint32Array,i4:Int32Array,f4:Float32Array,f8:Float64Array};function p(e,t){if(!e)return null;var r=function(e){var t,r=e.getUint8(6),n=8;r>=2?(t=e.getUint32(8,!0),n+=4):(t=e.getUint16(8,!0),n+=2);var o=new TextDecoder(r<=2?"latin1":"utf-8"),i=new Uint8Array(e.buffer,n,t),a=o.decode(i);return n+=t,{header:JSON.parse(a.replace(/'/g,'"').replace("False","false").replace("(","[").replace(/,*\),*/g,"]")),headerEndOffset:n}}(new DataView(e)),n=r.header,o=r.headerEndOffset,i=n.descr,a=l[i.slice(1,3)];if(!a)return console.warn("Decoding of npy dtype not implemented: ".concat(i)),null;var c=n.shape.reduce((function(e,t){return e*t}))*a.BYTES_PER_ELEMENT,u=new a(e.slice(o,o+c));return(">"===i[0]&&f||"<"===i[0]&&!f)&&console.warn("Data is wrong endianness, byte swapping not yet implemented."),{data:u,header:n}}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h,v={name:"NPY",id:"npy",module:"textures",version:"3.0.3",worker:!0,extensions:["npy"],mimeTypes:[],tests:[new Uint8Array([147,78,85,77,80,89]).buffer],options:{npy:{}}},g=d(d({},v),{},{parseSync:p,parse:(h=o()(u.a.mark((function e(t,r){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",p(t));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return h.apply(this,arguments)})}),m=r(3),b=r.n(m),w=r(4),x=r.n(w),O=r(5),j=r.n(O);function E(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}var L=new Map,_=function(){function e(){b()(this,e)}return x()(e,null,[{key:"onmessage",set:function(e){self.onmessage=function(t){if(P(t)){var r=t.data,n=r.type,o=r.payload;e(n,o)}}}},{key:"addEventListener",value:function(e){var t=L.get(e);t||(t=function(t){if(P(t)){var r=t.data,n=r.type,o=r.payload;e(n,o)}}),self.addEventListener("message",t)}},{key:"removeEventListener",value:function(e){var t=L.get(e);L.delete(e),self.removeEventListener("message",t)}},{key:"postMessage",value:function(e,t){if(self){var r={source:"loaders.gl",type:e,payload:t},n=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(t){if(E(t))o.add(t);else if(E(t.buffer))o.add(t.buffer);else if(ArrayBuffer.isView(t));else if(r&&"object"===j()(t))for(var i in t)e(t[i],r,o)}else;return void 0===n?Array.from(o):[]}(t);self.postMessage(r,n)}}}]),e}();function P(e){var t=e.type,r=e.data;return"message"===t&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var M,A=0;function T(e,t){return new Promise((function(r,n){var o=A++;_.addEventListener((function e(t,i){if(i.id===o)switch(t){case"done":_.removeEventListener(e),r(i.result);break;case"error":_.removeEventListener(e),n(i.error)}}));var i={id:o,input:e,options:t};_.postMessage("process",i)}))}function D(e){return N.apply(this,arguments)}function N(){return(N=o()(u.a.mark((function e(t){var r,n,o,i,a,c,s;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.loader,n=t.arrayBuffer,o=t.options,i=t.context,!r.parseSync&&!r.parse){e.next=6;break}a=n,c=r.parseSync||r.parse,e.next=13;break;case 6:if(!r.parseTextSync){e.next=12;break}s=new TextDecoder,a=s.decode(n),c=r.parseTextSync,e.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=k(k({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),e.next=16,c(a,k({},o),i,r);case 16:return e.abrupt("return",e.sent);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}M=g,"undefined"!=typeof self&&(_.onmessage=function(){var e=o()(u.a.mark((function e(t,r){var n,o,i,a,c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="process"===e.t0?3:16;break;case 3:return e.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,e.next=7,D({loader:M,arrayBuffer:n,options:i,context:{parse:T}});case 7:a=e.sent,_.postMessage("done",{result:a}),e.next=15;break;case 11:e.prev=11,e.t1=e.catch(3),c=e.t1 instanceof Error?e.t1.message:"",_.postMessage("error",{error:c});case 15:return e.abrupt("break",16);case 16:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,r){return e.apply(this,arguments)}}())}]);
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t,r){e.exports=r(6)},function(e,t){function r(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function c(e){r(a,o,i,c,u,"next",e)}function u(e){r(a,o,i,c,u,"throw",e)}c(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof l?t:l,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function l(){}function p(){}function y(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(E([])));v&&v!==t&&r.call(v,o)&&(d=v);var g=y.prototype=l.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,c){var u=s(e[o],e,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=g.constructor=y,y.constructor=p,p.displayName=c(y,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},m(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(g),c(g,a,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),i=r(2),a=r.n(i),c=r(0),u=r.n(c);var s,f=(s=new Uint32Array([305419896]),!(18===new Uint8Array(s.buffer,s.byteOffset,s.byteLength)[0])),l={u1:Uint8Array,i1:Int8Array,u2:Uint16Array,i2:Int16Array,u4:Uint32Array,i4:Int32Array,f4:Float32Array,f8:Float64Array};function p(e,t){if(!e)return null;var r=function(e){var t,r=e.getUint8(6),n=8;r>=2?(t=e.getUint32(8,!0),n+=4):(t=e.getUint16(8,!0),n+=2);var o=new TextDecoder(r<=2?"latin1":"utf-8"),i=new Uint8Array(e.buffer,n,t),a=o.decode(i);return n+=t,{header:JSON.parse(a.replace(/'/g,'"').replace("False","false").replace("(","[").replace(/,*\),*/g,"]")),headerEndOffset:n}}(new DataView(e)),n=r.header,o=r.headerEndOffset,i=n.descr,a=l[i.slice(1,3)];if(!a)return console.warn("Decoding of npy dtype not implemented: ".concat(i)),null;var c=n.shape.reduce((function(e,t){return e*t}))*a.BYTES_PER_ELEMENT,u=new a(e.slice(o,o+c));return(">"===i[0]&&f||"<"===i[0]&&!f)&&console.warn("Data is wrong endianness, byte swapping not yet implemented."),{data:u,header:n}}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h,v={name:"NPY",id:"npy",module:"textures",version:"3.0.4",worker:!0,extensions:["npy"],mimeTypes:[],tests:[new Uint8Array([147,78,85,77,80,89]).buffer],options:{npy:{}}},g=d(d({},v),{},{parseSync:p,parse:(h=o()(u.a.mark((function e(t,r){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",p(t));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return h.apply(this,arguments)})}),m=r(3),b=r.n(m),w=r(4),x=r.n(w),O=r(5),j=r.n(O);function E(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}var L=new Map,_=function(){function e(){b()(this,e)}return x()(e,null,[{key:"onmessage",set:function(e){self.onmessage=function(t){if(P(t)){var r=t.data,n=r.type,o=r.payload;e(n,o)}}}},{key:"addEventListener",value:function(e){var t=L.get(e);t||(t=function(t){if(P(t)){var r=t.data,n=r.type,o=r.payload;e(n,o)}}),self.addEventListener("message",t)}},{key:"removeEventListener",value:function(e){var t=L.get(e);L.delete(e),self.removeEventListener("message",t)}},{key:"postMessage",value:function(e,t){if(self){var r={source:"loaders.gl",type:e,payload:t},n=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(t){if(E(t))o.add(t);else if(E(t.buffer))o.add(t.buffer);else if(ArrayBuffer.isView(t));else if(r&&"object"===j()(t))for(var i in t)e(t[i],r,o)}else;return void 0===n?Array.from(o):[]}(t);self.postMessage(r,n)}}}]),e}();function P(e){var t=e.type,r=e.data;return"message"===t&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var M,A=0;function T(e,t){return new Promise((function(r,n){var o=A++;_.addEventListener((function e(t,i){if(i.id===o)switch(t){case"done":_.removeEventListener(e),r(i.result);break;case"error":_.removeEventListener(e),n(i.error)}}));var i={id:o,input:e,options:t};_.postMessage("process",i)}))}function D(e){return N.apply(this,arguments)}function N(){return(N=o()(u.a.mark((function e(t){var r,n,o,i,a,c,s;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.loader,n=t.arrayBuffer,o=t.options,i=t.context,!r.parseSync&&!r.parse){e.next=6;break}a=n,c=r.parseSync||r.parse,e.next=13;break;case 6:if(!r.parseTextSync){e.next=12;break}s=new TextDecoder,a=s.decode(n),c=r.parseTextSync,e.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=k(k({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),e.next=16,c(a,k({},o),i,r);case 16:return e.abrupt("return",e.sent);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}M=g,"undefined"!=typeof self&&(_.onmessage=function(){var e=o()(u.a.mark((function e(t,r){var n,o,i,a,c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="process"===e.t0?3:16;break;case 3:return e.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,e.next=7,D({loader:M,arrayBuffer:n,options:i,context:{parse:T}});case 7:a=e.sent,_.postMessage("done",{result:a}),e.next=15;break;case 11:e.prev=11,e.t1=e.catch(3),c=e.t1 instanceof Error?e.t1.message:"",_.postMessage("error",{error:c});case 15:return e.abrupt("break",16);case 16:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,r){return e.apply(this,arguments)}}())}]);
//# sourceMappingURL=npy-worker.js.map
{
"name": "@loaders.gl/textures",
"version": "3.0.3",
"version": "3.0.4",
"description": "Framework-independent loaders for compressed and super compressed (basis) textures ",

@@ -46,5 +46,5 @@ "license": "MIT",

"@loaders.gl/core": "3.0.0-alpha.18",
"@loaders.gl/images": "3.0.3",
"@loaders.gl/loader-utils": "3.0.3",
"@loaders.gl/worker-utils": "3.0.3",
"@loaders.gl/images": "3.0.4",
"@loaders.gl/loader-utils": "3.0.4",
"@loaders.gl/worker-utils": "3.0.4",
"ktx-parse": "^0.0.4",

@@ -56,3 +56,3 @@ "texture-compressor": "^1.0.2"

},
"gitHead": "923a3b0c3c720dcfb5cc17e5d7bcc13e66b356c6"
"gitHead": "03447de06ec59ac283bb1ee807b95ab73f117f9a"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc