UNPKG

@luma.gl/core

Version:

WebGL2 Components for High Performance Rendering and Computation

1 lines 325 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(26);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(9),i=n(8);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t,n){var r=n(30),i=n(31),a=n(25),o=n(32);e.exports=function(e){return r(e)||i(e)||a(e)||o()}},function(e,t,n){var r=n(34),i=n(35),a=n(25),o=n(36);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},,function(e,t,n){"use strict";(function(e,r){n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var i=n(9),a={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document,process:"object"===(void 0===r?"undefined":n.n(i)()(r))&&r},o=(globalThis,a.window||a.self||a.global),s=a.process||{};console}).call(this,n(23),n(18))},,function(e,t,n){var r=n(38);function i(t,n,a){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=i=Reflect.get:e.exports=i=function(e,t,n){var i=r(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(n):a.value}},i(t,n,a||t)}e.exports=i},function(e,t,n){e.exports=n(39)},function(e,t,n){"use strict";(function(e){function r(){var t;if("undefined"!=typeof window&&window.performance)t=window.performance.now();else if(void 0!==e&&e.hrtime){var n=e.hrtime();t=1e3*n[0]+n[1]/1e6}else t=Date.now();return t}n.d(t,"a",(function(){return r}))}).call(this,n(18))},,,function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new v(e,t)),1!==c.length||l||s(d)},v.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=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(9),i=n.n(r),a=n(20);function o(){return!("object"===(void 0===e?"undefined":i()(e))&&"[object process]"===String(e)&&!e.browser)||Object(a.a)()}}).call(this,n(18))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(9),i=n.n(r);function a(t){if("undefined"!=typeof window&&"object"===i()(window.process)&&"renderer"===window.process.type)return!0;if(void 0!==e&&"object"===i()(e.versions)&&Boolean(e.versions.electron))return!0;var n="object"===("undefined"==typeof navigator?"undefined":i()(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent,r=t||n;return!!(r&&r.indexOf("Electron")>=0)}}).call(this,n(18))},function(e,t,n){var r=n(26),i=n(37);function a(t,n,o){return i()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t){function n(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,u,"next",e)}function u(e){n(o,i,a,s,u,"throw",e)}s(void 0)}))}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(24);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){(function(t){var r=n(40),i="undefined"==typeof window?t:window;i.luma=i.luma||{},e.exports=Object.assign(i.luma,r)}).call(this,n(23))},,,function(e,t,n){var r=n(24);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},function(e,t){e.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.")}},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(3);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),o=new E(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return k()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=b(o,n);if(s){if(s===l)continue;return s}}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 u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l={};function f(){}function h(){}function d(){}var v={};v[i]=function(){return this};var g=Object.getPrototypeOf,p=g&&g(g(T([])));p&&p!==t&&n.call(p,i)&&(v=p);var m=d.prototype=f.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var r;this._invoke=function(i,a){function o(){return new t((function(r,o){!function r(i,a,o,s){var u=c(e[i],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(f).then((function(e){l.value=e,o(l)}),(function(e){return r("throw",e,o,s)}))}s(u.arg)}(i,a,r,o)}))}return r=r?r.then(o,o):o()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function A(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=m.constructor=d,d.constructor=h,h.displayName=s(d,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(_.prototype),_.prototype[a]=function(){return this},e.AsyncIterator=_,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new _(u(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},y(m),s(m,o,"Generator"),m[i]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=T,E.prototype={constructor:E,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(x),!e)for(var t in this)"t"===t.charAt(0)&&n.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 r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(o)},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),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";n.r(t),n.d(t,"createGLContext",(function(){return je})),n.d(t,"instrumentGLContext",(function(){return Ue})),n.d(t,"isWebGL",(function(){return N})),n.d(t,"isWebGL2",(function(){return D})),n.d(t,"getParameters",(function(){return Oe})),n.d(t,"setParameters",(function(){return we})),n.d(t,"withParameters",(function(){return Le})),n.d(t,"resetParameters",(function(){return Se})),n.d(t,"cssToDeviceRatio",(function(){return Ie})),n.d(t,"cssToDevicePixels",(function(){return Pe})),n.d(t,"lumaStats",(function(){return Ye})),n.d(t,"FEATURES",(function(){return Fn})),n.d(t,"hasFeature",(function(){return kn})),n.d(t,"hasFeatures",(function(){return wn})),n.d(t,"Buffer",(function(){return Bt})),n.d(t,"Program",(function(){return yr})),n.d(t,"Framebuffer",(function(){return Pn})),n.d(t,"Renderbuffer",(function(){return nn})),n.d(t,"Texture2D",(function(){return $t})),n.d(t,"TextureCube",(function(){return dn})),n.d(t,"VertexShader",(function(){return sr})),n.d(t,"FragmentShader",(function(){return ur})),n.d(t,"clear",(function(){return rn})),n.d(t,"readPixelsToArray",(function(){return mn})),n.d(t,"readPixelsToBuffer",(function(){return yn})),n.d(t,"cloneTextureFrom",(function(){return pn})),n.d(t,"copyToTexture",(function(){return bn})),n.d(t,"Texture3D",(function(){return gn})),n.d(t,"TransformFeedback",(function(){return br})),n.d(t,"AnimationLoop",(function(){return Or})),n.d(t,"Model",(function(){return Zi})),n.d(t,"Transform",(function(){return ya})),n.d(t,"ProgramManager",(function(){return xi})),n.d(t,"Timeline",(function(){return Ea})),n.d(t,"Geometry",(function(){return wa})),n.d(t,"ClipSpace",(function(){return La})),n.d(t,"ConeGeometry",(function(){return ja})),n.d(t,"CubeGeometry",(function(){return Ka})),n.d(t,"CylinderGeometry",(function(){return Za})),n.d(t,"IcoSphereGeometry",(function(){return Io})),n.d(t,"PlaneGeometry",(function(){return Bo})),n.d(t,"SphereGeometry",(function(){return Uo})),n.d(t,"TruncatedConeGeometry",(function(){return Ca})),n.d(t,"normalizeShaderModule",(function(){return Fr})),n.d(t,"fp32",(function(){return Vo})),n.d(t,"fp64",(function(){return qo})),n.d(t,"project",(function(){return cs})),n.d(t,"dirlight",(function(){return fs})),n.d(t,"picking",(function(){return ds})),n.d(t,"gouraudLighting",(function(){return ks})),n.d(t,"phongLighting",(function(){return ws})),n.d(t,"pbr",(function(){return Os})),n.d(t,"log",(function(){return B})),n.d(t,"assert",(function(){return ot})),n.d(t,"uid",(function(){return lt}));var r=n(9),i=n.n(r),a=n(6),o=n.n(a),s=n(0),u=n.n(s),c=n(1),l=n.n(c),f=n(2),h=n.n(f);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=n(19);Object(v.a)();function g(e){try{var t=window[e],n="__storage_test__";return t.setItem(n,n),t.removeItem(n),t}catch(e){return null}}var p,m=function(){function e(t){l()(this,e);var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";d(this,"storage",void 0),d(this,"id",void 0),d(this,"config",{}),this.storage=g(r),this.id=t,this.config={},Object.assign(this.config,n),this._loadConfiguration()}return h()(e,[{key:"getConfiguration",value:function(){return this.config}},{key:"setConfiguration",value:function(e){return this.config={},this.updateConfiguration(e)}},{key:"updateConfiguration",value:function(e){if(Object.assign(this.config,e),this.storage){var t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}return this}},{key:"_loadConfiguration",value:function(){var e={};if(this.storage){var t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}]),e}();function y(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600,i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>r&&(n=Math.min(n,r/e.width));var a=e.width*n,o=e.height*n,s=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(i,");"),"background-size:".concat(a,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),s]}function _(e){return"string"==typeof e?p[e.toUpperCase()]||p.WHITE:e}function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"],r=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(r),a=b(i);try{var o=function(){var r=t.value;"function"==typeof e[r]&&(n.find((function(e){return r===e}))||(e[r]=e[r].bind(e)))};for(a.s();!(t=a.n()).done;)o()}catch(e){a.e(e)}finally{a.f()}}function E(e,t){if(!e)throw new Error(t||"Assertion failed")}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(p||(p={}));var T=n(11);function k(){var e,t,n;if(v.a&&"performance"in T.b)e=null===T.b||void 0===T.b||null===(t=T.b.performance)||void 0===t||null===(n=t.now)||void 0===n?void 0:n.call(t);else if("hrtime"in T.a){var r,i=null===T.a||void 0===T.a||null===(r=T.a.hrtime)||void 0===r?void 0:r.call(T.a);e=1e3*i[0]+i[1]/1e6}else e=Date.now();return e}var w={debug:v.a&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},O={enabled:!0,level:0};function S(){}var L={},I={once:!0},P=function(){function e(){l()(this,e);var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""},n=t.id;d(this,"id",void 0),d(this,"VERSION","8.5.16"),d(this,"_startTs",k()),d(this,"_deltaTs",k()),d(this,"_storage",void 0),d(this,"userData",{}),d(this,"LOG_THROTTLE_TIMEOUT",0),this.id=n,this._storage=new m("__probe-".concat(this.id,"__"),O),this.userData={},this.timeStamp("".concat(this.id," started")),x(this),Object.seal(this)}return h()(e,[{key:"level",get:function(){return this.getLevel()},set:function(e){this.setLevel(e)}},{key:"isEnabled",value:function(){return this._storage.config.enabled}},{key:"getLevel",value:function(){return this._storage.config.level}},{key:"getTotal",value:function(){return Number((k()-this._startTs).toPrecision(10))}},{key:"getDelta",value:function(){return Number((k()-this._deltaTs).toPrecision(10))}},{key:"priority",get:function(){return this.level},set:function(e){this.level=e}},{key:"getPriority",value:function(){return this.level}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:e}),this}},{key:"setLevel",value:function(e){return this._storage.updateConfiguration({level:e}),this}},{key:"get",value:function(e){return this._storage.config[e]}},{key:"set",value:function(e,t){this._storage.updateConfiguration(u()({},e,t))}},{key:"settings",value:function(){console.table?console.table(this._storage.config):console.log(this._storage.config)}},{key:"assert",value:function(e,t){E(e,t)}},{key:"warn",value:function(e){return this._getLogFunction(0,e,w.warn,arguments,I)}},{key:"error",value:function(e){return this._getLogFunction(0,e,w.error,arguments)}},{key:"deprecated",value:function(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}},{key:"removed",value:function(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}},{key:"probe",value:function(e,t){return this._getLogFunction(e,t,w.log,arguments,{time:!0,once:!0})}},{key:"log",value:function(e,t){return this._getLogFunction(e,t,w.debug,arguments)}},{key:"info",value:function(e,t){return this._getLogFunction(e,t,console.info,arguments)}},{key:"once",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return this._getLogFunction(e,t,w.debug||w.info,arguments,I)}},{key:"table",value:function(e,t,n){return t?this._getLogFunction(e,t,console.table||S,n&&[n],{tag:C(t)}):S}},{key:"image",value:function(e){var t=e.logLevel,r=e.priority,i=e.image,a=e.message,s=void 0===a?"":a,u=e.scale,c=void 0===u?1:u;return this._shouldLog(t||r)?v.a?function(e){var t=e.image,n=e.message,r=void 0===n?"":n,i=e.scale,a=void 0===i?1:i;if("string"==typeof t){var s=new Image;return s.onload=function(){var e,t=y(s,r,a);(e=console).log.apply(e,o()(t))},s.src=t,S}var u=t.nodeName||"";if("img"===u.toLowerCase()){var c;return(c=console).log.apply(c,o()(y(t,r,a))),S}if("canvas"===u.toLowerCase()){var l=new Image;return l.onload=function(){var e;return(e=console).log.apply(e,o()(y(l,r,a)))},l.src=t.toDataURL(),S}return S}({image:i,message:s,scale:c}):function(e){var t=e.image,r=(e.message,e.scale),i=void 0===r?1:r,a=null;try{a=n(33)}catch(e){}if(a)return function(){return a(t,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((function(e){return console.log(e)}))};return S}({image:i,message:s,scale:c}):S}},{key:"time",value:function(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}},{key:"timeEnd",value:function(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}},{key:"timeStamp",value:function(e,t){return this._getLogFunction(e,t,console.timeStamp||S)}},{key:"group",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1},r=F({logLevel:e,message:t,opts:n}),i=n.collapsed;return r.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}},{key:"groupCollapsed",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},n,{collapsed:!0}))}},{key:"groupEnd",value:function(e){return this._getLogFunction(e,"",console.groupEnd||S)}},{key:"withGroup",value:function(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}},{key:"trace",value:function(){console.trace&&console.trace()}},{key:"_shouldLog",value:function(e){return this.isEnabled()&&this.getLevel()>=R(e)}},{key:"_getLogFunction",value:function(e,t,n,r,i){if(this._shouldLog(e)){var a;i=F({logLevel:e,message:t,args:r,opts:i}),E(n=n||i.method),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=k();var s=i.tag||i.message;if(i.once){if(L[s])return S;L[s]=k()}return t=function(e,t,n){if("string"==typeof t){var r=n.time?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=Math.max(t-e.length,0);return"".concat(" ".repeat(n)).concat(e)}((s=n.total)<10?"".concat(s.toFixed(2),"ms"):s<100?"".concat(s.toFixed(1),"ms"):s<1e3?"".concat(s.toFixed(0),"ms"):"".concat((s/1e3).toFixed(2),"s")):"";t=n.time?"".concat(e,": ").concat(r," ").concat(t):"".concat(e,": ").concat(t),i=t,a=n.color,o=n.background,v.a||"string"!=typeof i||(a&&(a=_(a),i="[".concat(a,"m").concat(i,"")),o&&(a=_(o),i="[".concat(o+10,"m").concat(i,""))),t=i}var i,a,o;var s;return t}(this.id,i.message,i),(a=n).bind.apply(a,[console,t].concat(o()(i.args)))}return S}}]),e}();function R(e){if(!e)return 0;var t;switch(i()(e)){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return E(Number.isFinite(t)&&t>=0),t}function F(e){var t=e.logLevel,n=e.message;e.logLevel=R(t);for(var r=e.args?Array.from(e.args):[];r.length&&r.shift()!==n;);switch(i()(t)){case"string":case"function":void 0!==n&&r.unshift(n),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());var a=i()(e.message);return E("string"===a||"object"===a),Object.assign(e,{args:r},e.opts)}function C(e){for(var t in e)for(var n in e[t])return n||"untitled";return"empty"}d(P,"VERSION","8.5.16");var B=new P({id:"luma.gl"});function M(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}function N(e){return"undefined"!=typeof WebGLRenderingContext&&e instanceof WebGLRenderingContext||("undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&Number.isFinite(e._version)))}function D(e){return"undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&2===e._version)}function j(e){return M(N(e),"Invalid WebGLRenderingContext"),e}function U(e){return M(D(e),"Requires WebGL2"),e}var G={};function V(e,t){var n;G[e]=!0,void 0!==t&&(n=t,globalThis.console&&globalThis.console.error&&globalThis.console.error(n))}var z=function e(t){var n=t.gl;this.ext=t,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(t.maxVertexAttribs);for(var r=0;r<this.attribs.length;r++){var i=new e.VertexAttrib(n);this.attribs[r]=i}this.maxAttrib=0};(z.VertexAttrib=function(e){this.enabled=!1,this.buffer=null,this.size=4,this.type=5126,this.normalized=!1,this.stride=16,this.offset=0,this.cached="",this.recache()}).prototype.recache=function(){this.cached=[this.size,this.type,this.normalized,this.stride,this.offset].join(":")};var H,W=function(e){var t=this;this.gl=e,function(e){var t=e.getError;e.getError=function(){var n;do{0!==(n=t.apply(e))&&(G[n]=!0)}while(0!==n);for(n in G)if(G[n])return delete G[n],parseInt(n,10);return 0}}(e);var n=this.original={getParameter:e.getParameter,enableVertexAttribArray:e.enableVertexAttribArray,disableVertexAttribArray:e.disableVertexAttribArray,bindBuffer:e.bindBuffer,getVertexAttrib:e.getVertexAttrib,vertexAttribPointer:e.vertexAttribPointer};e.getParameter=function(e){return e===t.VERTEX_ARRAY_BINDING_OES?t.currentVertexArrayObject===t.defaultVertexArrayObject?null:t.currentVertexArrayObject:n.getParameter.apply(this,arguments)},e.enableVertexAttribArray=function(e){var r=t.currentVertexArrayObject;r.maxAttrib=Math.max(r.maxAttrib,e);var i=r.attribs[e];return i.enabled=!0,n.enableVertexAttribArray.apply(this,arguments)},e.disableVertexAttribArray=function(e){var r=t.currentVertexArrayObject;r.maxAttrib=Math.max(r.maxAttrib,e);var i=r.attribs[e];return i.enabled=!1,n.disableVertexAttribArray.apply(this,arguments)},e.bindBuffer=function(e,r){switch(e){case 34962:t.currentArrayBuffer=r;break;case 34963:t.currentVertexArrayObject.elementArrayBuffer=r}return n.bindBuffer.apply(this,arguments)},e.getVertexAttrib=function(e,r){var i=t.currentVertexArrayObject,a=i.attribs[e];switch(r){case 34975:return a.buffer;case 34338:return a.enabled;case 34339:return a.size;case 34340:return a.stride;case 34341:return a.type;case 34922:return a.normalized;default:return n.getVertexAttrib.apply(this,arguments)}},e.vertexAttribPointer=function(e,r,i,a,o,s){var u=t.currentVertexArrayObject;u.maxAttrib=Math.max(u.maxAttrib,e);var c=u.attribs[e];return c.buffer=t.currentArrayBuffer,c.size=r,c.type=i,c.normalized=a,c.stride=o,c.offset=s,c.recache(),n.vertexAttribPointer.apply(this,arguments)},e.instrumentExtension&&e.instrumentExtension(this,"OES_vertex_array_object"),e.canvas&&e.canvas.addEventListener("webglcontextrestored",(function(){var e;e="OESVertexArrayObject emulation library context restored",globalThis.console&&globalThis.console.log&&globalThis.console.log(e),t.reset_()}),!0),this.reset_()};W.prototype.VERTEX_ARRAY_BINDING_OES=34229,W.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(var e=0;e<this.vertexArrayObjects.length;++e)this.vertexArrayObjects.isAlive=!1;var t=this.gl;this.maxVertexAttribs=t.getParameter(34921),this.defaultVertexArrayObject=new z(this),this.currentVertexArrayObject=null,this.currentArrayBuffer=null,this.vertexArrayObjects=[this.defaultVertexArrayObject],this.bindVertexArrayOES(null)},W.prototype.createVertexArrayOES=function(){var e=new z(this);return this.vertexArrayObjects.push(e),e},W.prototype.deleteVertexArrayOES=function(e){e.isAlive=!1,this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(e),1),this.currentVertexArrayObject===e&&this.bindVertexArrayOES(null)},W.prototype.isVertexArrayOES=function(e){return!!(e&&e instanceof z&&e.hasBeenBound&&e.ext===this)},W.prototype.bindVertexArrayOES=function(e){var t=this.gl;if(!e||e.isAlive){var n=this.original,r=this.currentVertexArrayObject;this.currentVertexArrayObject=e||this.defaultVertexArrayObject,this.currentVertexArrayObject.hasBeenBound=!0;var i=this.currentVertexArrayObject;if(r!==i){r&&i.elementArrayBuffer===r.elementArrayBuffer||n.bindBuffer.call(t,34963,i.elementArrayBuffer);for(var a=this.currentArrayBuffer,o=Math.max(r?r.maxAttrib:0,i.maxAttrib),s=0;s<=o;s++){var u=i.attribs[s],c=r?r.attribs[s]:null;if(r&&u.enabled===c.enabled||(u.enabled?n.enableVertexAttribArray.call(t,s):n.disableVertexAttribArray.call(t,s)),u.enabled){var l=!1;r&&u.buffer===c.buffer||(a!==u.buffer&&(n.bindBuffer.call(t,34962,u.buffer),a=u.buffer),l=!0),(l||u.cached!==c.cached)&&n.vertexAttribPointer.call(t,s,u.size,u.type,u.normalized,u.stride,u.offset)}}this.currentArrayBuffer!==a&&n.bindBuffer.call(t,34962,this.currentArrayBuffer)}}else V(1282,"bindVertexArrayOES: attempt to bind deleted arrayObject")};var X,q=function(e){return D(e)?void 0:0},K=(H={},u()(H,3074,(function(e){return D(e)?void 0:36064})),u()(H,35723,(function(e){return D(e)?void 0:4352})),u()(H,35977,q),u()(H,32937,q),u()(H,36795,(function(e,t){var n=D(e)?e.getExtension("EXT_disjoint_timer_query_webgl2"):e.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?t(n.GPU_DISJOINT_EXT):0})),u()(H,37445,(function(e,t){var n=e.getExtension("WEBGL_debug_renderer_info");return t(n&&n.UNMASKED_VENDOR_WEBGL||7936)})),u()(H,37446,(function(e,t){var n=e.getExtension("WEBGL_debug_renderer_info");return t(n&&n.UNMASKED_RENDERER_WEBGL||7937)})),u()(H,34047,(function(e,t){var n=e.luma.extensions.EXT_texture_filter_anisotropic;return n?t(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1})),u()(H,32883,q),u()(H,35071,q),u()(H,37447,q),u()(H,36063,(function(e,t){if(!D(e)){var n=e.getExtension("WEBGL_draw_buffers");return n?t(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}})),u()(H,35379,q),u()(H,35374,q),u()(H,35377,q),u()(H,34852,(function(e){if(!D(e)){var t=e.getExtension("WEBGL_draw_buffers");return t?t.MAX_DRAW_BUFFERS_WEBGL:0}})),u()(H,36203,(function(e){return e.getExtension("OES_element_index")?2147483647:65535})),u()(H,33001,(function(e){return e.getExtension("OES_element_index")?16777216:65535})),u()(H,33e3,(function(e){return 16777216})),u()(H,37157,q),u()(H,35373,q),u()(H,35657,q),u()(H,36183,q),u()(H,37137,q),u()(H,34045,q),u()(H,35978,q),u()(H,35979,q),u()(H,35968,q),u()(H,35376,q),u()(H,35375,q),u()(H,35659,q),u()(H,37154,q),u()(H,35371,q),u()(H,35658,q),u()(H,35076,q),u()(H,35077,q),u()(H,35380,q),H);var Y=(X={},u()(X,"OES_vertex_array_object",{meta:{suffix:"OES"},createVertexArray:function(){M(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:function(){},bindVertexArray:function(){},isVertexArray:function(){return!1}}),u()(X,"ANGLE_instanced_arrays",{meta:{suffix:"ANGLE"},vertexAttribDivisor:function(e,t){M(0===t,"WebGL instanced rendering not supported")},drawElementsInstanced:function(){},drawArraysInstanced:function(){}}),u()(X,"WEBGL_draw_buffers",{meta:{suffix:"WEBGL"},drawBuffers:function(){M(!1)}}),u()(X,"EXT_disjoint_timer_query",{meta:{suffix:"EXT"},createQuery:function(){M(!1)},deleteQuery:function(){M(!1)},beginQuery:function(){M(!1)},endQuery:function(){},getQuery:function(e,t){return this.getQueryObject(e,t)},getQueryParameter:function(e,t){return this.getQueryObject(e,t)},getQueryObject:function(){}}),X),Q={readBuffer:function(e,t,n){D(e)&&t(n)},getVertexAttrib:function(e,t,n,r){var i,a=function(e,t){return{webgl2:D(e),ext:e.getExtension(t)}}(e,"ANGLE_instanced_arrays"),o=a.webgl2,s=a.ext;switch(r){case 35069:i=!!o&&void 0;break;case 35070:i=o||s?void 0:0}return void 0!==i?i:t(n,r)},getProgramParameter:function(e,t,n,r){if(!D(e))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return t(n,r)},getInternalformatParameter:function(e,t,n,r,i){if(!D(e))switch(i){case 32937:return new Int32Array([0])}return e.getInternalformatParameter(n,r,i)},getTexParameter:function(e,t,n,r){switch(r){case 34046:var i=e.luma.extensions.EXT_texture_filter_anisotropic;r=i&&i.TEXTURE_MAX_ANISOTROPY_EXT||34046}return t(n,r)},getParameter:function(e,t,n){var r=K[n],i="function"==typeof r?r(e,t,n):r;return void 0!==i?i:t(n)},hint:function(e,t,n,r){return t(n,r)}};function $(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J(e,t){var n=t.extension,r=t.target,i=t.target2,a=Y[n];M(a);for(var o=a.meta,s=(void 0===o?{}:o).suffix,u=void 0===s?"":s,c=e.getExtension(n),l=function(){var t=h[f],n="".concat(t).concat(u),o=null;"meta"===t||"function"==typeof e[t]||(c&&"function"==typeof c[n]?o=function(){return c[n].apply(c,arguments)}:"function"==typeof a[t]&&(o=a[t].bind(r))),o&&(r[t]=o,i[t]=o)},f=0,h=Object.keys(a);f<h.length;f++)l()}globalThis.polyfillContext=function(e){e.luma=e.luma||{};var t=e.luma;return t.polyfilled||(!function(e){if("function"!=typeof e.createVertexArray){var t=e.getSupportedExtensions;e.getSupportedExtensions=function(){var e=t.call(this)||[];return e.indexOf("OES_vertex_array_object")<0&&e.push("OES_vertex_array_object"),e};var n=e.getExtension;e.getExtension=function(t){var r=n.call(this,t);return r||("OES_vertex_array_object"!==t?null:(e.__OESVertexArrayObject||(this.__OESVertexArrayObject=new W(this)),this.__OESVertexArrayObject))}}}(e),function(e){e.luma.extensions={};var t,n=$(e.getSupportedExtensions()||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.luma[r]=e.getExtension(r)}}catch(e){n.e(e)}finally{n.f()}}(e),function(e,t){var n,r=$(Object.getOwnPropertyNames(t));try{for(r.s();!(n=r.n()).done;){var i=n.value;"overrides"!==i&&J(e,{extension:i,target:e.luma,target2:e})}}catch(e){r.e(e)}finally{r.f()}}(e,Y),function(e,t){var n=t.target,r=t.target2;Object.keys(Q).forEach((function(t){if("function"==typeof Q[t]){var i=e[t]?e[t].bind(e):function(){},a=Q[t].bind(null,e,i);n[t]=a,r[t]=a}}))}(e,{target:t,target2:e}),t.polyfilled=!0),e};var ee,te,ne,re=n(7),ie=n.n(re),ae=(ee={},u()(ee,3042,!1),u()(ee,32773,new Float32Array([0,0,0,0])),u()(ee,32777,32774),u()(ee,34877,32774),u()(ee,32969,1),u()(ee,32968,0),u()(ee,32971,1),u()(ee,32970,0),u()(ee,3106,new Float32Array([0,0,0,0])),u()(ee,3107,[!0,!0,!0,!0]),u()(ee,2884,!1),u()(ee,2885,1029),u()(ee,2929,!1),u()(ee,2931,1),u()(ee,2932,513),u()(ee,2928,new Float32Array([0,1])),u()(ee,2930,!0),u()(ee,3024,!0),u()(ee,36006,null),u()(ee,2886,2305),u()(ee,33170,4352),u()(ee,2849,1),u()(ee,32823,!1),u()(ee,32824,0),u()(ee,10752,0),u()(ee,32938,1),u()(ee,32939,!1),u()(ee,3089,!1),u()(ee,3088,new Int32Array([0,0,1024,1024])),u()(ee,2960,!1),u()(ee,2961,0),u()(ee,2968,4294967295),u()(ee,36005,4294967295),u()(ee,2962,519),u()(ee,2967,0),u()(ee,2963,4294967295),u()(ee,34816,519),u()(ee,36003,0),u()(ee,36004,4294967295),u()(ee,2964,7680),u()(ee,2965,7680),u()(ee,2966,7680),u()(ee,34817,7680),u()(ee,34818,7680),u()(ee,34819,7680),u()(ee,2978,[0,0,1024,1024]),u()(ee,3333,4),u()(ee,3317,4),u()(ee,37440,!1),u()(ee,37441,!1),u()(ee,37443,37444),u()(ee,35723,4352),u()(ee,36010,null),u()(ee,35977,!1),u()(ee,3330,0),u()(ee,3332,0),u()(ee,3331,0),u()(ee,3314,0),u()(ee,32878,0),u()(ee,3316,0),u()(ee,3315,0),u()(ee,32877,0),ee),oe=function(e,t,n){return t?e.enable(n):e.disable(n)},se=function(e,t,n){return e.hint(n,t)},ue=function(e,t,n){return e.pixelStorei(n,t)};function ce(e){return Array.isArray(e)||ArrayBuffer.isView(e)}var le=(te={},u()(te,3042,oe),u()(te,32773,(function(e,t){return e.blendColor.apply(e,o()(t))})),u()(te,32777,"blendEquation"),u()(te,34877,"blendEquation"),u()(te,32969,"blendFunc"),u()(te,32968,"blendFunc"),u()(te,32971,"blendFunc"),u()(te,32970,"blendFunc"),u()(te,3106,(function(e,t){return e.clearColor.apply(e,o()(t))})),u()(te,3107,(function(e,t){return e.colorMask.apply(e,o()(t))})),u()(te,2884,oe),u()(te,2885,(function(e,t){return e.cullFace(t)})),u()(te,2929,oe),u()(te,2931,(function(e,t){return e.clearDepth(t)})),u()(te,2932,(function(e,t){return e.depthFunc(t)})),u()(te,2928,(function(e,t){return e.depthRange.apply(e,o()(t))})),u()(te,2930,(function(e,t){return e.depthMask(t)})),u()(te,3024,oe),u()(te,35723,se),u()(te,36006,(function(e,t){var n=D(e)?36009:36160;return e.bindFramebuffer(n,t)})),u()(te,2886,(function(e,t){return e.frontFace(t)})),u()(te,33170,se),u()(te,2849,(function(e,t){return e.lineWidth(t)})),u()(te,32823,oe),u()(te,32824,"polygonOffset"),u()(te,10752,"polygonOffset"),u()(te,35977,oe),u()(te,32938,"sampleCoverage"),u()(te,32939,"sampleCoverage"),u()(te,3089,oe),u()(te,3088,(function(e,t){return e.scissor.apply(e,o()(t))})),u()(te,2960,oe),u()(te,2961,(function(e,t){return e.clearStencil(t)})),u()(te,2968,(function(e,t){return e.stencilMaskSeparate(1028,t)})),u()(te,36005,(function(e,t){return e.stencilMaskSeparate(1029,t)})),u()(te,2962,"stencilFuncFront"),u()(te,2967,"stencilFuncFront"),u()(te,2963,"stencilFuncFront"),u()(te,34816,"stencilFuncBack"),u()(te,36003,"stencilFuncBack"),u()(te,36004,"stencilFuncBack"),u()(te,2964,"stencilOpFront"),u()(te,2965,"stencilOpFront"),u()(te,2966,"stencilOpFront"),u()(te,34817,"stencilOpBack"),u()(te,34818,"stencilOpBack"),u()(te,34819,"stencilOpBack"),u()(te,2978,(function(e,t){return e.viewport.apply(e,o()(t))})),u()(te,3333,ue),u()(te,3317,ue),u()(te,37440,ue),u()(te,37441,ue),u()(te,37443,ue),u()(te,3330,ue),u()(te,3332,ue),u()(te,3331,ue),u()(te,36010,(function(e,t){return e.bindFramebuffer(36008,t)})),u()(te,3314,ue),u()(te,32878,ue),u()(te,3316,ue),u()(te,3315,ue),u()(te,32877,ue),u()(te,"framebuffer",(function(e,t){var n=t&&"handle"in t?t.handle:t;return e.bindFramebuffer(36160,n)})),u()(te,"blend",(function(e,t){return t?e.enable(3042):e.disable(3042)})),u()(te,"blendColor",(function(e,t){return e.blendColor.apply(e,o()(t))})),u()(te,"blendEquation",(function(e,t){t=ce(t)?t:[t,t],e.blendEquationSeparate.apply(e,o()(t))})),u()(te,"blendFunc",(function(e,t){t=ce(t)&&2===t.length?[].concat(o()(t),o()(t)):t,e.blendFuncSeparate.apply(e,o()(t))})),u()(te,"clearColor",(function(e,t){return e.clearColor.apply(e,o()(t))})),u()(te,"clearDepth",(function(e,t){return e.clearDepth(t)})),u()(te,"clearStencil",(function(e,t){return e.clearStencil(t)})),u()(te,"colorMask",(function(e,t){return e.colorMask.apply(e,o()(t))})),u()(te,"cull",(function(e,t){return t?e.enable(2884):e.disable(2884)})),u()(te,"cullFace",(function(e,t){return e.cullFace(t)})),u()(te,"depthTest",(function(e,t){return t?e.enable(2929):e.disable(2929)})),u()(te,"depthFunc",(function(e,t){return e.depthFunc(t)})),u()(te,"depthMask",(function(e,t){return e.depthMask(t)})),u()(te,"depthRange",(function(e,t){return e.depthRange.apply(e,o()(t))})),u()(te,"dither",(function(e,t){return t?e.enable(3024):e.disable(3024)})),u()(te,"derivativeHint",(function(e,t){e.hint(35723,t)})),u()(te,"frontFace",(function(e,t){return e.frontFace(t)})),u()(te,"mipmapHint",(function(e,t){return e.hint(33170,t)})),u()(te,"lineWidth",(function(e,t){return e.lineWidth(t)})),u()(te,"polygonOffsetFill",(function(e,t){return t?e.enable(32823):e.disable(32823)})),u()(te,"polygonOffset",(function(e,t){return e.polygonOffset.apply(e,o()(t))})),u()(te,"sampleCoverage",(function(e,t){return e.sampleCoverage.apply(e,o()(t))})),u()(te,"scissorTest",(function(e,t){return t?e.enable(3089):e.disable(3089)})),u()(te,"scissor",(function(e,t){return e.scissor.apply(e,o()(t))})),u()(te,"stencilTest",(function(e,t){return t?e.enable(2960):e.disable(2960)})),u()(te,"stencilMask",(function(e,t){var n=t=ce(t)?t:[t,t],r=ie()(n,2),i=r[0],a=r[1];e.stencilMaskSeparate(1028,i),e.stencilMaskSeparate(1029,a)})),u()(te,"stencilFunc",(function(e,t){var n=t=ce(t)&&3===t.length?[].concat(o()(t),o()(t)):t,r=ie()(n,6),i=r[0],a=r[1],s=r[2],u=r[3],c=r[4],l=r[5];e.stencilFuncSeparate(1028,i,a,s),e.stencilFuncSeparate(1029,u,c,l)})),u()(te,"stencilOp",(function(e,t){var n=t=ce(t)&&3===t.length?[].concat(o()(t),o()(t)):t,r=ie()(n,6),i=r[0],a=r[1],s=r[2],u=r[3],c=r[4],l=r[5];e.stencilOpSeparate(1028,i,a,s),e.stencilOpSeparate(1029,u,c,l)})),u()(te,"viewport",(function(e,t){return e.viewport.apply(e,o()(t))})),te);function fe(e,t,n){return void 0!==t[e]?t[e]:n[e]}var he={blendEquation:function(e,t,n){return e.blendEquationSeparate(fe(32777,t,n),fe(34877,t,n))},blendFunc:function(e,t,n){return e.blendFuncSeparate(fe(32969,t,n),fe(32968,t,n),fe(32971,t,n),fe(32970,t,n))},polygonOffset:function(e,t,n){return e.polygonOffset(fe(32824,t,n),fe(10752,t,n))},sampleCoverage:function(e,t,n){return e.sampleCoverage(fe(32938,t,n),fe(32939,t,n))},stencilFuncFront:function(e,t,n){return e.stencilFuncSeparate(1028,fe(2962,t,n),fe(2967,t,n),fe(2963,t,n))},stencilFuncBack:function(e,t,n){return e.stencilFuncSeparate(1029,fe(34816,t,n),fe(36003,t,n),fe(36004,t,n))},stencilOpFront:function(e,t,n){return e.stencilOpSeparate(1028,fe(2964,t,n),fe(2965,t,n),fe(2966,t,n))},stencilOpBack:function(e,t,n){return e.stencilOpSeparate(1029,fe(34817,t,n),fe(34818,t,n),fe(34819,t,n))}},de={enable:function(e,t){return e(u()({},t,!0))},disable:function(e,t){return e(u()({},t,!1))},pixelStorei:function(e,t,n){return e(u()({},t,n))},hint:function(e,t,n){return e(u()({},t,n))},bindFramebuffer:function(e,t,n){var r;switch(t){case 36160:return e((r={},u()(r,36006,n),u()(r,36010,n),r));case 36009:return e(u()({},36006,n));case 36008:return e(u()({},36010,n));default:return null}},blendColor:function(e,t,n,r,i){return e(u()({},32773,new Float32Array([t,n,r,i])))},blendEquation:function(e,t){var n;return e((n={},u()(n,32777,t),u()(n,34877,t),n))},blendEquationSeparate:function(e,t,n){var r;return e((r={},u()(r,32777,t),u()(r,34877,n),r))},blendFunc:function(e,t,n){var r;return e((r={},u()(r,32969,t),u()(r,32968,n),u()(r,32971,t),u()(r,32970,n),r))},blendFuncSeparate:function(e,t,n,r,i){var a;return e((a={},u()(a,32969,t),u()(a,32968,n),u()(a,32971,r),u()(a,32970,i),a))},clearColor:function(e,t,n,r,i){return e(u()({},3106,new Float32Array([t,n,r,i])))},clearDepth:function(e,t){return e(u()({},2931,t))},clearStencil:function(e,t){return e(u()({},2961,t))},colorMask:function(e,t,n,r,i){return e(u()({},3107,[t,n,r,i]))},cullFace:function(e,t){return e(u()({},2885,t))},depthFunc:function(e,t){return e(u()({},2932,t))},depthRange:function(e,t,n){return e(u()({},2928,new Float32Array([t,n])))},depthMask:function(e,t){return e(u()({},2930,t))},frontFace:function(e,t){return e(u()({},2886,t))},lineWidth:function(e,t){return e(u()({},2849,t))},polygonOffset:function(e,t,n){var r;return e((r={},u()(r,32824,t),u()(r,10752,n),r))},sampleCoverage:function(e,t,n){var r;return e((r={},u()(r,32938,t),u()(r,32939,n),r))},scissor:function(e,t,n,r,i){return e(u()({},3088,new Int32Array([t,n,r,i])))},stencilMask:function(e,t){var n;return e((n={},u()(n,2968,t),u()(n,36005,t),n))},stencilMaskSeparate:function(e,t,n){return e(u()({},1028===t?2968:36005,n))},stencilFunc:function(e,t,n,r){var i;return e((i={},u()(i,2962,t),u()(i,2967,n),u()(i,2963,r),u()(i,34816,t),u()(i,36003,n),u()(i,36004,r),i))},stencilFuncSeparate:function(e,t,n,r,i){var a;return e((a={},u()(a,1028===t?2962:34816,n),u()(a,1028===t?2967:36003,r),u()(a,1028===t?2963:36004,i),a))},stencilOp:function(e,t,n,r){var i;return e((i={},u()(i,2964,t),u()(i,2965,n),u()(i,2966,r),u()(i,34817,t),u()(i,34818,n),u()(i,34819,r),i))},stencilOpSeparate:function(e,t,n,r,i){var a;return e((a={},u()(a,1028===t?2964:34817,n),u()(a,1028===t?2965:34818,r),u()(a,1028===t?2966:34819,i),a))},viewport:function(e,t,n,r,i){return e(u()({},2978,[t,n,r,i]))}},ve=function(e,t){return e.isEnabled(t)},ge=(ne={},u()(ne,3042,ve),u()(ne,2884,ve),u()(ne,2929,ve),u()(ne,3024,ve),u()(ne,32823,ve),u()(ne,32926,ve),u()(ne,32928,ve),u()(ne,3089,ve),u()(ne,2960,ve),u()(ne,35977,ve),ne);function pe(e){for(var t in e)return!1;return!0}function me(e,t){if(e===t)return!0;var n=Array.isArray(e)||ArrayBuffer.isView(e),r=Array.isArray(t)||ArrayBuffer.isView(t);if(n&&r&&e.length===t.length){for(var i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}return!1}function ye(e,t){var n=e[t].bind(e);e[t]=function(){var t=arguments.length<=0?void 0:arguments[0];return t in e.state.cache&&e.state.enable?e.state.cache[t]:n.apply(void 0,arguments)},Object.defineProperty(e[t],"name",{value:"".concat(t,"-from-cache"),configurable:!1})}function _e(e,t,n){var r=e[t].b