@deck.gl/google-maps
Advanced tools
Comparing version 8.7.11 to 8.7.12
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("luma"),require("deck")):"function"==typeof define&&define.amd?define(["luma","deck"],e):"object"==typeof exports?exports.deck=e(require("luma"),require("deck")):t.deck=e(t.luma,t.deck)}(window,(function(t,e){return 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}return 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){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(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){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(8);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(7).default,o=r(20);t.exports=function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return o(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(e,r){e.exports=t},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}},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 r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,r(e,n)}t.exports=r,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,r){var n=r(9);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,r){var n=r(19);t.exports=function(t,e){if(null==t)return{};var r,o,i=n(t,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)r=u[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},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}},function(t,r){t.exports=e},function(t,e,r){var n=r(8),o=r(21);function i(e,r,u){return o()?(t.exports=i=Reflect.construct,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t,e,r){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return r&&n(i,r.prototype),i},t.exports.default=t.exports,t.exports.__esModule=!0),i.apply(null,arguments)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(22),o=r(23),i=r(10),u=r(24);t.exports=function(t){return n(t)||o(t)||i(t)||u()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(25),o=r(26),i=r(10),u=r(27);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||u()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(28),o=globalThis.deck||{};if(!o.Layer)throw new Error("@deck.gl/core is not found");t.exports=Object.assign(o,n)},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(9);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.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.")},t.exports.default=t.exports,t.exports.__esModule=!0},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=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}},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,r){"use strict";r.r(e);var n=r(11),o=r.n(n),i=r(6),u=r.n(i),a=r(12),s=r.n(a),c=r(13),h=r.n(c),f=r(5),l=r(14),p=r(1),v=r.n(p),y=r(2),d=r.n(y),k=r(3),g=r.n(k),m=r(4),b=r.n(m),x=r(0),O=r.n(x);r(7),r(15),r(16);function E(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}Math.PI,Math.PI;var _={};function M(t){return Math.round(t/_.EPSILON)*_.EPSILON}function w(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.precision,n=void 0===r?_.precision||4:r;return t=M(t),"".concat(parseFloat(t.toPrecision(n)))}function S(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function P(t,e,r){var n=_.EPSILON;r&&(_.EPSILON=r);try{if(t===e)return!0;if(S(t)&&S(e)){if(t.length!==e.length)return!1;for(var o=0;o<t.length;++o)if(!P(t[o],e[o]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=_.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{_.EPSILON=n}}function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var o=O()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b()(this,r)}}_.EPSILON=1e-12,_.debug=!1,_.precision=4,_.printTypes=!1,_.printDegrees=!1,_.printRowMajor=!0;var L=function(t){g()(r,t);var e=R(r);function r(){return v()(this,r),e.apply(this,arguments)}return d()(r,[{key:"ELEMENTS",get:function(){return E(!1),0}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}},{key:"to",value:function(t){return t===this?this:S(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(_)}},{key:"formatString",value:function(t){for(var e="",r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+w(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!P(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,r){void 0===r&&(r=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var o=t[n];this[n]=o+r*(e[n]-o)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,o=e;n<o.length;n++)for(var i=o[n],u=0;u<this.ELEMENTS;++u)this[u]+=i[u];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,o=e;n<o.length;n++)for(var i=o[n],u=0;u<this.ELEMENTS;++u)this[u]-=i[u];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"elements",get:function(){return this}},{key:"check",value:function(){if(_.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}]),r}(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array));function j(t,e){if(t.length!==e)return!1;for(var r=0;r<t.length;++r)if(!Number.isFinite(t[r]))return!1;return!0}function A(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function T(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(_.debug&&!j(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}var N={};function I(t,e){N[t]||(N[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}function C(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var o=O()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b()(this,r)}}var D=function(t){g()(r,t);var e=C(r);function r(){return v()(this,r),e.apply(this,arguments)}return d()(r,[{key:"ELEMENTS",get:function(){return E(!1),0}},{key:"copy",value:function(t){return E(!1),this}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=A(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=A(t)}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,r=0;r<this.ELEMENTS;++r){var n=this[r]-t[r];e+=n*n}return A(e)}},{key:"dot",value:function(t){for(var e=0,r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return A(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,o=e;n<o.length;n++)for(var i=o[n],u=0;u<this.ELEMENTS;++u)this[u]*=i[u];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,o=e;n<o.length;n++)for(var i=o[n],u=0;u<this.ELEMENTS;++u)this[u]/=i[u];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return E(t>=0&&t<this.ELEMENTS,"index is out of range"),A(this[t])}},{key:"setComponent",value:function(t,e){return E(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}]),r}(L),q="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI;function V(t,e,r){var n=e[0],o=e[1];return t[0]=r[0]*n+r[4]*o+r[12],t[1]=r[1]*n+r[5]*o+r[13],t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var W,B;W=new q(2),q!=Float32Array&&(W[0]=0,W[1]=0),B=W;function F(t,e,r){var n=e[0],o=e[1],i=r[3]*n+r[7]*o||1;return t[0]=(r[0]*n+r[4]*o)/i,t[1]=(r[1]*n+r[5]*o)/i,t}function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var o=O()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b()(this,r)}}var K=function(t){g()(r,t);var e=z(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return v()(this,r),t=e.call(this,2),S(n)&&1===arguments.length?t.copy(n):(_.debug&&(A(n),A(o)),t[0]=n,t[1]=o),t}return d()(r,[{key:"set",value:function(t,e){return this[0]=t,this[1]=e,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this.check()}},{key:"fromObject",value:function(t){return _.debug&&(A(t.x),A(t.y)),this[0]=t.x,this[1]=t.y,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t}},{key:"ELEMENTS",get:function(){return 2}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return V(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return F(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return function(t,e,r){var n=e[0],o=e[1];t[0]=r[0]*n+r[3]*o+r[6],t[1]=r[1]*n+r[4]*o+r[7]}(this,this,t),this.check()}},{key:"transformByMatrix2x3",value:function(t){return function(t,e,r){var n=e[0],o=e[1];t[0]=r[0]*n+r[2]*o+r[4],t[1]=r[1]*n+r[3]*o+r[5]}(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return function(t,e,r){var n=e[0],o=e[1];t[0]=r[0]*n+r[2]*o,t[1]=r[1]*n+r[3]*o}(this,this,t),this.check()}}]),r}(D),Z=r(17),Y=r.n(Z);function X(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var o=O()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b()(this,r)}}var G=function(t){g()(r,t);var e=X(r);function r(){return v()(this,r),e.apply(this,arguments)}return d()(r,[{key:"ELEMENTS",get:function(){return E(!1),0}},{key:"RANK",get:function(){return E(!1),0}},{key:"toString",value:function(){var t="[";if(_.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,r){return this[e*this.RANK+t]=A(r),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),r=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[r+n];return e}},{key:"setColumn",value:function(t,e){for(var r=t*this.RANK,n=0;n<this.RANK;++n)this[r+n]=e[n];return this}}]),r}(L);function U(t,e,r){var n=e[0],o=e[1],i=e[2],u=e[3],a=e[4],s=e[5],c=e[6],h=e[7],f=e[8],l=e[9],p=e[10],v=e[11],y=e[12],d=e[13],k=e[14],g=e[15],m=r[0],b=r[1],x=r[2],O=r[3];return t[0]=m*n+b*a+x*f+O*y,t[1]=m*o+b*s+x*l+O*d,t[2]=m*i+b*c+x*p+O*k,t[3]=m*u+b*h+x*v+O*g,m=r[4],b=r[5],x=r[6],O=r[7],t[4]=m*n+b*a+x*f+O*y,t[5]=m*o+b*s+x*l+O*d,t[6]=m*i+b*c+x*p+O*k,t[7]=m*u+b*h+x*v+O*g,m=r[8],b=r[9],x=r[10],O=r[11],t[8]=m*n+b*a+x*f+O*y,t[9]=m*o+b*s+x*l+O*d,t[10]=m*i+b*c+x*p+O*k,t[11]=m*u+b*h+x*v+O*g,m=r[12],b=r[13],x=r[14],O=r[15],t[12]=m*n+b*a+x*f+O*y,t[13]=m*o+b*s+x*l+O*d,t[14]=m*i+b*c+x*p+O*k,t[15]=m*u+b*h+x*v+O*g,t}function H(t,e,r){var n=r[0],o=r[1],i=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Q(t,e,r,n,o){var i,u=1/Math.tan(e/2);return t[0]=u/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(n-o),t[10]=(o+n)*i,t[14]=2*o*n*i):(t[10]=-1,t[14]=-2*n),t}function $(t,e,r,n){var o,i,u,a,s,c,h,f,l,p,v=e[0],y=e[1],d=e[2],k=n[0],g=n[1],m=n[2],b=r[0],x=r[1],O=r[2];return Math.abs(v-b)<1e-6&&Math.abs(y-x)<1e-6&&Math.abs(d-O)<1e-6?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(h=v-b,f=y-x,l=d-O,o=g*(l*=p=1/Math.hypot(h,f,l))-m*(f*=p),i=m*(h*=p)-k*l,u=k*f-g*h,(p=Math.hypot(o,i,u))?(o*=p=1/p,i*=p,u*=p):(o=0,i=0,u=0),a=f*u-l*i,s=l*o-h*u,c=h*i-f*o,(p=Math.hypot(a,s,c))?(a*=p=1/p,s*=p,c*=p):(a=0,s=0,c=0),t[0]=o,t[1]=a,t[2]=h,t[3]=0,t[4]=i,t[5]=s,t[6]=f,t[7]=0,t[8]=u,t[9]=c,t[10]=l,t[11]=0,t[12]=-(o*v+i*y+u*d),t[13]=-(a*v+s*y+c*d),t[14]=-(h*v+f*y+l*d),t[15]=1,t)}!function(){var t=function(){var t=new q(3);return q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}()}();!function(){var t=function(){var t=new q(4);return q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var o=O()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b()(this,r)}}var tt=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),et=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),rt=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),nt={},ot=function(t){g()(r,t);var e=J(r);function r(t){var n;return v()(this,r),n=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return d()(r,[{key:"INDICES",get:function(){return rt}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,r,n,o,i,u,a,s,c,h,f,l,p,v,y){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=o,this[5]=i,this[6]=u,this[7]=a,this[8]=s,this[9]=c,this[10]=h,this[11]=f,this[12]=l,this[13]=p,this[14]=v,this[15]=y,this.check()}},{key:"setRowMajor",value:function(t,e,r,n,o,i,u,a,s,c,h,f,l,p,v,y){return this[0]=t,this[1]=o,this[2]=s,this[3]=l,this[4]=e,this[5]=i,this[6]=c,this[7]=p,this[8]=r,this[9]=u,this[10]=h,this[11]=v,this[12]=n,this[13]=a,this[14]=f,this[15]=y,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(tt)}},{key:"fromQuaternion",value:function(t){return function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],u=r+r,a=n+n,s=o+o,c=r*u,h=n*u,f=n*a,l=o*u,p=o*a,v=o*s,y=i*u,d=i*a,k=i*s;t[0]=1-f-v,t[1]=h+k,t[2]=l-d,t[3]=0,t[4]=h-k,t[5]=1-c-v,t[6]=p+y,t[7]=0,t[8]=l+d,t[9]=p-y,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(this,t),this.check()}},{key:"frustum",value:function(t){var e=t.left,n=t.right,o=t.bottom,i=t.top,u=t.near,a=t.far;return a===1/0?r._computeInfinitePerspectiveOffCenter(this,e,n,o,i,u):function(t,e,r,n,o,i,u){var a=1/(r-e),s=1/(o-n),c=1/(i-u);t[0]=2*i*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*s,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(o+n)*s,t[10]=(u+i)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=u*i*2*c,t[15]=0}(this,e,n,o,i,u,a),this.check()}},{key:"lookAt",value:function(t,e,r){if(1===arguments.length){var n=t;t=n.eye,e=n.center,r=n.up}return $(this,t,e=e||[0,0,0],r=r||[0,1,0]),this.check()}},{key:"ortho",value:function(t){var e=t.left,r=t.right,n=t.bottom,o=t.top,i=t.near,u=void 0===i?.1:i,a=t.far;return function(t,e,r,n,o,i,u){var a=1/(e-r),s=1/(n-o),c=1/(i-u);t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*a,t[13]=(o+n)*s,t[14]=(u+i)*c,t[15]=1}(this,e,r,n,o,u,void 0===a?500:a),this.check()}},{key:"orthographic",value:function(t){var e=t.fovy,n=void 0===e?45*Math.PI/180:e,o=t.aspect,i=void 0===o?1:o,u=t.focalDistance,a=void 0===u?1:u,s=t.near,c=void 0===s?.1:s,h=t.far,f=void 0===h?500:h;if(n>2*Math.PI)throw Error("radians");var l=n/2,p=a*Math.tan(l),v=p*i;return(new r).ortho({left:-v,right:v,bottom:-p,top:p,near:c,far:f})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,r=void 0===e?void 0:e,n=t.fov,o=void 0===n?45*Math.PI/180:n,i=t.aspect,u=void 0===i?1:i,a=t.near,s=void 0===a?.1:a,c=t.far,h=void 0===c?500:c;if((r=r||o)>2*Math.PI)throw Error("radians");return Q(this,r,u,s,h),this.check()}},{key:"determinant",value:function(){return e=(t=this)[0],r=t[1],n=t[2],o=t[3],i=t[4],u=t[5],a=t[6],s=t[7],c=t[8],h=t[9],f=t[10],l=t[11],p=t[12],v=t[13],y=t[14],d=t[15],(e*u-r*i)*(f*d-l*y)-(e*a-n*i)*(h*d-l*v)+(e*s-o*i)*(h*y-f*v)+(r*a-n*u)*(c*d-l*p)-(r*s-o*u)*(c*y-f*p)+(n*s-o*a)*(c*v-h*p);var t,e,r,n,o,i,u,a,s,c,h,f,l,p,v,y,d}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getScale(e||[-0,-0,-0]),n=1/r[0],o=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*o,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*o,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*o,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getScale(e||[-0,-0,-0]),n=1/r[0],o=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*o,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*o,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*o,t[8]=this[10]*i,t}},{key:"transpose",value:function(){return function(t,e){if(t===e){var r=e[1],n=e[2],o=e[3],i=e[6],u=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=o,t[13]=u,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]}(this,this),this.check()}},{key:"invert",value:function(){return function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],u=e[4],a=e[5],s=e[6],c=e[7],h=e[8],f=e[9],l=e[10],p=e[11],v=e[12],y=e[13],d=e[14],k=e[15],g=r*a-n*u,m=r*s-o*u,b=r*c-i*u,x=n*s-o*a,O=n*c-i*a,E=o*c-i*s,_=h*y-f*v,M=h*d-l*v,w=h*k-p*v,S=f*d-l*y,P=f*k-p*y,R=l*k-p*d,L=g*R-m*P+b*S+x*w-O*M+E*_;L&&(L=1/L,t[0]=(a*R-s*P+c*S)*L,t[1]=(o*P-n*R-i*S)*L,t[2]=(y*E-d*O+k*x)*L,t[3]=(l*O-f*E-p*x)*L,t[4]=(s*w-u*R-c*M)*L,t[5]=(r*R-o*w+i*M)*L,t[6]=(d*b-v*E-k*m)*L,t[7]=(h*E-l*b+p*m)*L,t[8]=(u*P-a*w+c*_)*L,t[9]=(n*w-r*P-i*_)*L,t[10]=(v*O-y*b+k*g)*L,t[11]=(f*b-h*O-p*g)*L,t[12]=(a*M-u*S-s*_)*L,t[13]=(r*S-n*M+o*_)*L,t[14]=(y*m-v*x-d*g)*L,t[15]=(h*x-f*m+l*g)*L)}(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return U(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return U(this,this,t),this.check()}},{key:"rotateX",value:function(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[4],u=e[5],a=e[6],s=e[7],c=e[8],h=e[9],f=e[10],l=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*o+c*n,t[5]=u*o+h*n,t[6]=a*o+f*n,t[7]=s*o+l*n,t[8]=c*o-i*n,t[9]=h*o-u*n,t[10]=f*o-a*n,t[11]=l*o-s*n}(this,this,t),this.check()}},{key:"rotateY",value:function(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[0],u=e[1],a=e[2],s=e[3],c=e[8],h=e[9],f=e[10],l=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*o-c*n,t[1]=u*o-h*n,t[2]=a*o-f*n,t[3]=s*o-l*n,t[8]=i*n+c*o,t[9]=u*n+h*o,t[10]=a*n+f*o,t[11]=s*n+l*o}(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[0],u=e[1],a=e[2],s=e[3],c=e[4],h=e[5],f=e[6],l=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*o+c*n,t[1]=u*o+h*n,t[2]=a*o+f*n,t[3]=s*o+l*n,t[4]=c*o-i*n,t[5]=h*o-u*n,t[6]=f*o-a*n,t[7]=l*o-s*n}(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=Y()(t,3),r=e[0],n=e[1],o=e[2];return this.rotateX(r).rotateY(n).rotateZ(o)}},{key:"rotateAxis",value:function(t,e){return function(t,e,r,n){var o,i,u,a,s,c,h,f,l,p,v,y,d,k,g,m,b,x,O,E,_,M,w,S,P=n[0],R=n[1],L=n[2],j=Math.hypot(P,R,L);j<1e-6||(P*=j=1/j,R*=j,L*=j,o=Math.sin(r),u=1-(i=Math.cos(r)),a=e[0],s=e[1],c=e[2],h=e[3],f=e[4],l=e[5],p=e[6],v=e[7],y=e[8],d=e[9],k=e[10],g=e[11],m=P*P*u+i,b=R*P*u+L*o,x=L*P*u-R*o,O=P*R*u-L*o,E=R*R*u+i,_=L*R*u+P*o,M=P*L*u+R*o,w=R*L*u-P*o,S=L*L*u+i,t[0]=a*m+f*b+y*x,t[1]=s*m+l*b+d*x,t[2]=c*m+p*b+k*x,t[3]=h*m+v*b+g*x,t[4]=a*O+f*E+y*_,t[5]=s*O+l*E+d*_,t[6]=c*O+p*E+k*_,t[7]=h*O+v*E+g*_,t[8]=a*M+f*w+y*S,t[9]=s*M+l*w+d*S,t[10]=c*M+p*w+k*S,t[11]=h*M+v*w+g*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]))}(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?H(this,this,t):H(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return function(t,e,r){var n,o,i,u,a,s,c,h,f,l,p,v,y=r[0],d=r[1],k=r[2];e===t?(t[12]=e[0]*y+e[4]*d+e[8]*k+e[12],t[13]=e[1]*y+e[5]*d+e[9]*k+e[13],t[14]=e[2]*y+e[6]*d+e[10]*k+e[14],t[15]=e[3]*y+e[7]*d+e[11]*k+e[15]):(n=e[0],o=e[1],i=e[2],u=e[3],a=e[4],s=e[5],c=e[6],h=e[7],f=e[8],l=e[9],p=e[10],v=e[11],t[0]=n,t[1]=o,t[2]=i,t[3]=u,t[4]=a,t[5]=s,t[6]=c,t[7]=h,t[8]=f,t[9]=l,t[10]=p,t[11]=v,t[12]=n*y+a*d+f*k+e[12],t[13]=o*y+s*d+l*k+e[13],t[14]=i*y+c*d+p*k+e[14],t[15]=u*y+h*d+v*k+e[15])}(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(T(e=function(t,e,r){var n=e[0],o=e[1],i=e[2],u=e[3];return t[0]=r[0]*n+r[4]*o+r[8]*i+r[12]*u,t[1]=r[1]*n+r[5]*o+r[9]*i+r[13]*u,t[2]=r[2]*n+r[6]*o+r[10]*i+r[14]*u,t[3]=r[3]*n+r[7]*o+r[11]*i+r[15]*u,t}(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=V(e||[-0,-0],t,this);break;case 3:e=function(t,e,r){var n=e[0],o=e[1],i=e[2],u=r[3]*n+r[7]*o+r[11]*i+r[15];return u=u||1,t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/u,t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/u,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/u,t}(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return T(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=F(e||[-0,-0],t,this);break;case 3:e=function(t,e,r){var n=e[0],o=e[1],i=e[2],u=r[3]*n+r[7]*o+r[11]*i||1;return t[0]=(r[0]*n+r[4]*o+r[8]*i)/u,t[1]=(r[1]*n+r[5]*o+r[9]*i)/u,t[2]=(r[2]*n+r[6]*o+r[10]*i)/u,t}(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return T(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,r){return this.identity().translate([t,e,r])}},{key:"transformPoint",value:function(t,e){return I("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return I("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return I("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"IDENTITY",get:function(){return nt.IDENTITY=nt.IDENTITY||Object.freeze(new r(tt)),nt.IDENTITY}},{key:"ZERO",get:function(){return nt.ZERO=nt.ZERO||Object.freeze(new r(et)),nt.ZERO}},{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,r,n,o,i){var u=2*i/(r-e),a=2*i/(o-n),s=(r+e)/(r-e),c=(o+n)/(o-n),h=-2*i;return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0,t}}]),r}(G);function it(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 ut(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?it(Object(r),!0).forEach((function(e){u()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):it(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function at(t,e,r,n){if(r){if(r.props.userData._googleMap===t)return r;ct(r)}var o={click:null,dblclick:null,mousemove:null,mouseout:null};r=new l.Deck(ut(ut({},n),{},{style:n.interleaved?null:{pointerEvents:"none"},parent:st(e,n.style),initialViewState:{longitude:0,latitude:0,zoom:1},controller:!1,userData:{_googleMap:t,_eventListeners:o}}));var i=function(e){o[e]=t.addListener(e,(function(t){return function(t,e,r){var n={type:e,offsetCenter:pt(r,t),srcEvent:r};switch(e){case"click":t._lastPointerDownInfo=t.pickObject(ut(ut({},n.offsetCenter),{},{radius:t.props.pickingRadius})),n.tapCount=1,t._onEvent(n);break;case"dblclick":n.type="click",n.tapCount=2,t._onEvent(n);break;case"mousemove":n.type="pointermove",t._onPointerMove(n);break;case"mouseout":n.type="pointerleave",t._onPointerMove(n);break;default:return}}(r,e,t)}))};for(var u in o)i(u);return r}function st(t,e){var r=document.createElement("div");return r.style.position="absolute",Object.assign(r.style,e),t.getPanes?t.getPanes().overlayLayer.appendChild(r):t.getMap().getDiv().appendChild(r),r}function ct(t){var e=t.props.userData._eventListeners;for(var r in e)e[r].remove();t.finalize()}function ht(t,e){var r=ft(t),n=r.width,o=r.height,i=e.getCameraParams(),u=i.center,a=i.heading,s=i.tilt,c=i.zoom,h=o?n/o:1,f=(new ot).perspective({fovy:25*Math.PI/180,aspect:h,near:.75,far:3e14});return{width:n,height:o,viewState:{altitude:.5*f[5],bearing:a,latitude:u.lat(),longitude:u.lng(),pitch:s,projectionMatrix:f,repeat:!0,zoom:c-1}}}function ft(t){var e=t.getDiv().firstChild;return{width:e.offsetWidth,height:e.offsetHeight}}function lt(t,e,r){var n=new google.maps.Point(e,r),o=t.fromContainerPixelToLatLng(n);return[o.lng(),o.lat()]}function pt(t,e){if(t.pixel)return t.pixel;var r=e.getViewports()[0].project([t.latLng.lng(),t.latLng.lat()]);return{x:r[0],y:r[1]}}var vt=["width","height","left","top"];function yt(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 dt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach((function(e){u()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var kt=function(){return!1},gt={depthMask:!0,depthTest:!0,blend:!0,blendFunc:[770,771,1,771],blendEquation:32774};function mt(){}var bt={interleaved:!0},xt=function(){function t(e){s()(this,t),this.props={},this._map=null,this.setProps(dt(dt({},bt),e))}return h()(t,[{key:"setMap",value:function(t){var e=this;if(t!==this._map&&(this._map&&(this._overlay.setMap(null),this._map=null),t)){this._map=t;var r=google.maps.RenderingType.UNINITIALIZED;t.getRenderingType()!==r?this._createOverlay(t):t.addListener("renderingtype_changed",(function(){e._createOverlay(t)}))}}},{key:"setProps",value:function(t){Object.assign(this.props,t),this._deck&&(t.style&&(Object.assign(this._deck.canvas.parentElement.style,t.style),t.style=null),this._deck.setProps(t))}},{key:"pickObject",value:function(t){return this._deck&&this._deck.pickObject(t)}},{key:"pickMultipleObjects",value:function(t){return this._deck&&this._deck.pickMultipleObjects(t)}},{key:"pickObjects",value:function(t){return this._deck&&this._deck.pickObjects(t)}},{key:"finalize",value:function(){this.setMap(null),this._deck&&(ct(this._deck),this._deck=null)}},{key:"_createOverlay",value:function(t){var e=this.props.interleaved,r=google.maps.RenderingType,n=r.VECTOR,o=r.UNINITIALIZED,i=t.getRenderingType();if(i!==o){var u=i===n&&google.maps.WebGLOverlayView,a=new(u?google.maps.WebGLOverlayView:google.maps.OverlayView);u?(e?(a.onAdd=mt,a.onContextRestored=this._onContextRestored.bind(this),a.onDraw=this._onDrawVectorInterleaved.bind(this)):(a.onAdd=this._onAdd.bind(this),a.onContextRestored=mt,a.onDraw=this._onDrawVectorOverlay.bind(this)),a.onContextLost=this._onContextLost.bind(this)):(a.onAdd=this._onAdd.bind(this),a.draw=this._onDrawRaster.bind(this)),a.onRemove=this._onRemove.bind(this),this._overlay=a,this._overlay.setMap(t)}}},{key:"_onAdd",value:function(){this._deck=at(this._map,this._overlay,this._deck,this.props)}},{key:"_onContextRestored",value:function(t){var e=this,r=t.gl,n=at(this._map,this._overlay,this._deck,dt({gl:r,_customRender:function(){e._overlay.requestRedraw()}},this.props));this._deck=n,n.animationLoop._renderFrame=function(){var t=r.getParameter(34964);Object(f.withParameters)(r,{},(function(){n.animationLoop.onRender()})),r.bindBuffer(34962,t)}}},{key:"_onContextLost",value:function(){this._deck&&(ct(this._deck),this._deck=null)}},{key:"_onRemove",value:function(){this._deck.setProps({layerFilter:kt})}},{key:"_onDrawRaster",value:function(){var t=this._deck,e=function(t,e){var r=ft(t),n=r.width,o=r.height,i=e.getProjection(),u=t.getBounds(),a=u.getNorthEast(),s=u.getSouthWest(),c=i.fromLatLngToDivPixel(a),h=i.fromLatLngToDivPixel(s),f=lt(i,n/2,o/2),l=new google.maps.LatLng(0,f[0]),p=i.fromLatLngToContainerPixel(l),v=i.fromLatLngToDivPixel(l),y=Math.round(v.x-p.x),d=v.y-p.y,k=lt(i,n/2,0),g=lt(i,n/2,o),m=f[1],b=f[0];if(Math.abs(m)>85.05113){m=m>0?85.05113:-85.05113;var x=new google.maps.LatLng(m,b);d+=i.fromLatLngToContainerPixel(x).y-o/2}d=Math.round(d);var O=180*new K(k).sub(g).verticalAngle()/Math.PI;O<0&&(O+=360);var E,_=t.getHeading()||0,M=t.getZoom()-1;if(0===O)E=o?(h.y-c.y)/o:1;else if(O===_){var w=new K([c.x,c.y]).sub([h.x,h.y]).len(),S=new K([n,-o]).len();E=S?w/S:1}return{width:n,height:o,left:y,top:d,zoom:M+=Math.log2(E||1),bearing:O,pitch:t.getTilt(),latitude:m,longitude:b}}(this._map,this._overlay),r=e.width,n=e.height,i=e.left,u=e.top,a=o()(e,vt),s=t.canvas.parentElement.style;s.left="".concat(i,"px"),s.top="".concat(u,"px");t.setProps({width:r,height:n,viewState:dt({altitude:1e4,repeat:!0},a)}),t.redraw()}},{key:"_onDrawVectorInterleaved",value:function(t){var e=t.gl,r=t.transformer;if(this._deck&&this._map){var n=this._deck;if(n.setProps(dt(dt({},ht(this._map,r)),{},{width:!1,height:!1})),n.layerManager){var o=Object(f.getParameters)(e,36006);n.setProps({_framebuffer:o}),n.needsRedraw({clearRedrawFlags:!0}),Object(f.setParameters)(e,{viewport:[0,0,e.canvas.width,e.canvas.height],scissor:[0,0,e.canvas.width,e.canvas.height],stencilFunc:[519,0,255,519,0,255]}),Object(f.withParameters)(e,gt,(function(){n._drawLayers("google-vector",{clearCanvas:!1})}))}}}},{key:"_onDrawVectorOverlay",value:function(t){t.gl;var e=t.transformer;if(this._deck&&this._map){var r=this._deck;r.setProps(dt({},ht(this._map,e))),r.redraw()}}}]),t}();r.d(e,"GoogleMapsOverlay",(function(){return xt}))}])})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("luma"),require("deck")):"function"==typeof define&&define.amd?define(["luma","deck"],e):"object"==typeof exports?exports.deck=e(require("luma"),require("deck")):t.deck=e(t.luma,t.deck)}(window,(function(t,e){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return 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 i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));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){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(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){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(8);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(7).default,i=r(20);t.exports=function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(e,r){e.exports=t},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}},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 r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,r(e,n)}t.exports=r,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,r){var n=r(9);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,r){var n=r(19);t.exports=function(t,e){if(null==t)return{};var r,i,o=n(t,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(i=0;i<u.length;i++)r=u[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},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}},function(t,r){t.exports=e},function(t,e,r){var n=r(8),i=r(21);function o(e,r,u){return i()?(t.exports=o=Reflect.construct,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=o=function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},t.exports.default=t.exports,t.exports.__esModule=!0),o.apply(null,arguments)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(22),i=r(23),o=r(10),u=r(24);t.exports=function(t){return n(t)||i(t)||o(t)||u()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(25),i=r(26),o=r(10),u=r(27);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||u()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(28),i=globalThis.deck||{};if(!i.Layer)throw new Error("@deck.gl/core is not found");t.exports=Object.assign(i,n)},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(9);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.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.")},t.exports.default=t.exports,t.exports.__esModule=!0},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=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);u=!0);}catch(t){a=!0,i=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw i}}return o}},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,r){"use strict";r.r(e);var n=r(11),i=r.n(n),o=r(6),u=r.n(o),a=r(12),s=r.n(a),c=r(13),h=r.n(c),l=r(5),f=r(14),p=r(1),v=r.n(p),y=r(2),d=r.n(y),k=r(3),g=r.n(k),m=r(4),b=r.n(m),x=r(0),O=r.n(x);r(7),r(15),r(16);function E(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}Math.PI,Math.PI;var _={};function M(t){return Math.round(t/_.EPSILON)*_.EPSILON}function w(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.precision,n=void 0===r?_.precision||4:r;return t=M(t),"".concat(parseFloat(t.toPrecision(n)))}function S(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function P(t,e,r){var n=_.EPSILON;r&&(_.EPSILON=r);try{if(t===e)return!0;if(S(t)&&S(e)){if(t.length!==e.length)return!1;for(var i=0;i<t.length;++i)if(!P(t[i],e[i]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=_.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{_.EPSILON=n}}function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var i=O()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b()(this,r)}}_.EPSILON=1e-12,_.debug=!1,_.precision=4,_.printTypes=!1,_.printDegrees=!1,_.printRowMajor=!0;var L=function(t){g()(r,t);var e=R(r);function r(){return v()(this,r),e.apply(this,arguments)}return d()(r,[{key:"ELEMENTS",get:function(){return E(!1),0}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}},{key:"to",value:function(t){return t===this?this:S(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(_)}},{key:"formatString",value:function(t){for(var e="",r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+w(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!P(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,r){void 0===r&&(r=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var i=t[n];this[n]=i+r*(e[n]-i)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,i=e;n<i.length;n++)for(var o=i[n],u=0;u<this.ELEMENTS;++u)this[u]+=o[u];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,i=e;n<i.length;n++)for(var o=i[n],u=0;u<this.ELEMENTS;++u)this[u]-=o[u];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"elements",get:function(){return this}},{key:"check",value:function(){if(_.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}]),r}(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array));function j(t,e){if(t.length!==e)return!1;for(var r=0;r<t.length;++r)if(!Number.isFinite(t[r]))return!1;return!0}function A(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function T(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(_.debug&&!j(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}var N={};function I(t,e){N[t]||(N[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}function C(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var i=O()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b()(this,r)}}var D=function(t){g()(r,t);var e=C(r);function r(){return v()(this,r),e.apply(this,arguments)}return d()(r,[{key:"ELEMENTS",get:function(){return E(!1),0}},{key:"copy",value:function(t){return E(!1),this}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=A(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=A(t)}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,r=0;r<this.ELEMENTS;++r){var n=this[r]-t[r];e+=n*n}return A(e)}},{key:"dot",value:function(t){for(var e=0,r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return A(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,i=e;n<i.length;n++)for(var o=i[n],u=0;u<this.ELEMENTS;++u)this[u]*=o[u];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,i=e;n<i.length;n++)for(var o=i[n],u=0;u<this.ELEMENTS;++u)this[u]/=o[u];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return E(t>=0&&t<this.ELEMENTS,"index is out of range"),A(this[t])}},{key:"setComponent",value:function(t,e){return E(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}]),r}(L),q="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI;function V(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var W,B;W=new q(2),q!=Float32Array&&(W[0]=0,W[1]=0),B=W;function F(t,e,r){var n=e[0],i=e[1],o=r[3]*n+r[7]*i||1;return t[0]=(r[0]*n+r[4]*i)/o,t[1]=(r[1]*n+r[5]*i)/o,t}function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var i=O()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b()(this,r)}}var K=function(t){g()(r,t);var e=z(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return v()(this,r),t=e.call(this,2),S(n)&&1===arguments.length?t.copy(n):(_.debug&&(A(n),A(i)),t[0]=n,t[1]=i),t}return d()(r,[{key:"set",value:function(t,e){return this[0]=t,this[1]=e,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this.check()}},{key:"fromObject",value:function(t){return _.debug&&(A(t.x),A(t.y)),this[0]=t.x,this[1]=t.y,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t}},{key:"ELEMENTS",get:function(){return 2}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return V(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return F(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7]}(this,this,t),this.check()}},{key:"transformByMatrix2x3",value:function(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5]}(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i}(this,this,t),this.check()}}]),r}(D),Z=r(17),Y=r.n(Z);function X(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var i=O()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b()(this,r)}}var G=function(t){g()(r,t);var e=X(r);function r(){return v()(this,r),e.apply(this,arguments)}return d()(r,[{key:"ELEMENTS",get:function(){return E(!1),0}},{key:"RANK",get:function(){return E(!1),0}},{key:"toString",value:function(){var t="[";if(_.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,r){return this[e*this.RANK+t]=A(r),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),r=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[r+n];return e}},{key:"setColumn",value:function(t,e){for(var r=t*this.RANK,n=0;n<this.RANK;++n)this[r+n]=e[n];return this}}]),r}(L);function U(t,e,r){var n=e[0],i=e[1],o=e[2],u=e[3],a=e[4],s=e[5],c=e[6],h=e[7],l=e[8],f=e[9],p=e[10],v=e[11],y=e[12],d=e[13],k=e[14],g=e[15],m=r[0],b=r[1],x=r[2],O=r[3];return t[0]=m*n+b*a+x*l+O*y,t[1]=m*i+b*s+x*f+O*d,t[2]=m*o+b*c+x*p+O*k,t[3]=m*u+b*h+x*v+O*g,m=r[4],b=r[5],x=r[6],O=r[7],t[4]=m*n+b*a+x*l+O*y,t[5]=m*i+b*s+x*f+O*d,t[6]=m*o+b*c+x*p+O*k,t[7]=m*u+b*h+x*v+O*g,m=r[8],b=r[9],x=r[10],O=r[11],t[8]=m*n+b*a+x*l+O*y,t[9]=m*i+b*s+x*f+O*d,t[10]=m*o+b*c+x*p+O*k,t[11]=m*u+b*h+x*v+O*g,m=r[12],b=r[13],x=r[14],O=r[15],t[12]=m*n+b*a+x*l+O*y,t[13]=m*i+b*s+x*f+O*d,t[14]=m*o+b*c+x*p+O*k,t[15]=m*u+b*h+x*v+O*g,t}function H(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Q(t,e,r,n,i){var o,u=1/Math.tan(e/2);return t[0]=u/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(n-i),t[10]=(i+n)*o,t[14]=2*i*n*o):(t[10]=-1,t[14]=-2*n),t}function $(t,e,r,n){var i,o,u,a,s,c,h,l,f,p,v=e[0],y=e[1],d=e[2],k=n[0],g=n[1],m=n[2],b=r[0],x=r[1],O=r[2];return Math.abs(v-b)<1e-6&&Math.abs(y-x)<1e-6&&Math.abs(d-O)<1e-6?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(h=v-b,l=y-x,f=d-O,i=g*(f*=p=1/Math.hypot(h,l,f))-m*(l*=p),o=m*(h*=p)-k*f,u=k*l-g*h,(p=Math.hypot(i,o,u))?(i*=p=1/p,o*=p,u*=p):(i=0,o=0,u=0),a=l*u-f*o,s=f*i-h*u,c=h*o-l*i,(p=Math.hypot(a,s,c))?(a*=p=1/p,s*=p,c*=p):(a=0,s=0,c=0),t[0]=i,t[1]=a,t[2]=h,t[3]=0,t[4]=o,t[5]=s,t[6]=l,t[7]=0,t[8]=u,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*v+o*y+u*d),t[13]=-(a*v+s*y+c*d),t[14]=-(h*v+l*y+f*d),t[15]=1,t)}!function(){var t=function(){var t=new q(3);return q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}()}();!function(){var t=function(){var t=new q(4);return q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O()(t);if(e){var i=O()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b()(this,r)}}var tt=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),et=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),rt=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),nt={},it=function(t){g()(r,t);var e=J(r);function r(t){var n;return v()(this,r),n=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return d()(r,[{key:"INDICES",get:function(){return rt}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,r,n,i,o,u,a,s,c,h,l,f,p,v,y){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=i,this[5]=o,this[6]=u,this[7]=a,this[8]=s,this[9]=c,this[10]=h,this[11]=l,this[12]=f,this[13]=p,this[14]=v,this[15]=y,this.check()}},{key:"setRowMajor",value:function(t,e,r,n,i,o,u,a,s,c,h,l,f,p,v,y){return this[0]=t,this[1]=i,this[2]=s,this[3]=f,this[4]=e,this[5]=o,this[6]=c,this[7]=p,this[8]=r,this[9]=u,this[10]=h,this[11]=v,this[12]=n,this[13]=a,this[14]=l,this[15]=y,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(tt)}},{key:"fromQuaternion",value:function(t){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],u=r+r,a=n+n,s=i+i,c=r*u,h=n*u,l=n*a,f=i*u,p=i*a,v=i*s,y=o*u,d=o*a,k=o*s;t[0]=1-l-v,t[1]=h+k,t[2]=f-d,t[3]=0,t[4]=h-k,t[5]=1-c-v,t[6]=p+y,t[7]=0,t[8]=f+d,t[9]=p-y,t[10]=1-c-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(this,t),this.check()}},{key:"frustum",value:function(t){var e=t.left,n=t.right,i=t.bottom,o=t.top,u=t.near,a=t.far;return a===1/0?r._computeInfinitePerspectiveOffCenter(this,e,n,i,o,u):function(t,e,r,n,i,o,u){var a=1/(r-e),s=1/(i-n),c=1/(o-u);t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(i+n)*s,t[10]=(u+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=u*o*2*c,t[15]=0}(this,e,n,i,o,u,a),this.check()}},{key:"lookAt",value:function(t,e,r){if(1===arguments.length){var n=t;t=n.eye,e=n.center,r=n.up}return $(this,t,e=e||[0,0,0],r=r||[0,1,0]),this.check()}},{key:"ortho",value:function(t){var e=t.left,r=t.right,n=t.bottom,i=t.top,o=t.near,u=void 0===o?.1:o,a=t.far;return function(t,e,r,n,i,o,u){var a=1/(e-r),s=1/(n-i),c=1/(o-u);t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*a,t[13]=(i+n)*s,t[14]=(u+o)*c,t[15]=1}(this,e,r,n,i,u,void 0===a?500:a),this.check()}},{key:"orthographic",value:function(t){var e=t.fovy,n=void 0===e?45*Math.PI/180:e,i=t.aspect,o=void 0===i?1:i,u=t.focalDistance,a=void 0===u?1:u,s=t.near,c=void 0===s?.1:s,h=t.far,l=void 0===h?500:h;if(n>2*Math.PI)throw Error("radians");var f=n/2,p=a*Math.tan(f),v=p*o;return(new r).ortho({left:-v,right:v,bottom:-p,top:p,near:c,far:l})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,r=void 0===e?void 0:e,n=t.fov,i=void 0===n?45*Math.PI/180:n,o=t.aspect,u=void 0===o?1:o,a=t.near,s=void 0===a?.1:a,c=t.far,h=void 0===c?500:c;if((r=r||i)>2*Math.PI)throw Error("radians");return Q(this,r,u,s,h),this.check()}},{key:"determinant",value:function(){return e=(t=this)[0],r=t[1],n=t[2],i=t[3],o=t[4],u=t[5],a=t[6],s=t[7],c=t[8],h=t[9],l=t[10],f=t[11],p=t[12],v=t[13],y=t[14],d=t[15],(e*u-r*o)*(l*d-f*y)-(e*a-n*o)*(h*d-f*v)+(e*s-i*o)*(h*y-l*v)+(r*a-n*u)*(c*d-f*p)-(r*s-i*u)*(c*y-l*p)+(n*s-i*a)*(c*v-h*p);var t,e,r,n,i,o,u,a,s,c,h,l,f,p,v,y,d}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getScale(e||[-0,-0,-0]),n=1/r[0],i=1/r[1],o=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getScale(e||[-0,-0,-0]),n=1/r[0],i=1/r[1],o=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*n,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*n,t[7]=this[9]*i,t[8]=this[10]*o,t}},{key:"transpose",value:function(){return function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],u=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=u,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]}(this,this),this.check()}},{key:"invert",value:function(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],u=e[4],a=e[5],s=e[6],c=e[7],h=e[8],l=e[9],f=e[10],p=e[11],v=e[12],y=e[13],d=e[14],k=e[15],g=r*a-n*u,m=r*s-i*u,b=r*c-o*u,x=n*s-i*a,O=n*c-o*a,E=i*c-o*s,_=h*y-l*v,M=h*d-f*v,w=h*k-p*v,S=l*d-f*y,P=l*k-p*y,R=f*k-p*d,L=g*R-m*P+b*S+x*w-O*M+E*_;L&&(L=1/L,t[0]=(a*R-s*P+c*S)*L,t[1]=(i*P-n*R-o*S)*L,t[2]=(y*E-d*O+k*x)*L,t[3]=(f*O-l*E-p*x)*L,t[4]=(s*w-u*R-c*M)*L,t[5]=(r*R-i*w+o*M)*L,t[6]=(d*b-v*E-k*m)*L,t[7]=(h*E-f*b+p*m)*L,t[8]=(u*P-a*w+c*_)*L,t[9]=(n*w-r*P-o*_)*L,t[10]=(v*O-y*b+k*g)*L,t[11]=(l*b-h*O-p*g)*L,t[12]=(a*M-u*S-s*_)*L,t[13]=(r*S-n*M+i*_)*L,t[14]=(y*m-v*x-d*g)*L,t[15]=(h*x-l*m+f*g)*L)}(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return U(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return U(this,this,t),this.check()}},{key:"rotateX",value:function(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],u=e[5],a=e[6],s=e[7],c=e[8],h=e[9],l=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=u*i+h*n,t[6]=a*i+l*n,t[7]=s*i+f*n,t[8]=c*i-o*n,t[9]=h*i-u*n,t[10]=l*i-a*n,t[11]=f*i-s*n}(this,this,t),this.check()}},{key:"rotateY",value:function(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],u=e[1],a=e[2],s=e[3],c=e[8],h=e[9],l=e[10],f=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=u*i-h*n,t[2]=a*i-l*n,t[3]=s*i-f*n,t[8]=o*n+c*i,t[9]=u*n+h*i,t[10]=a*n+l*i,t[11]=s*n+f*i}(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],u=e[1],a=e[2],s=e[3],c=e[4],h=e[5],l=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=u*i+h*n,t[2]=a*i+l*n,t[3]=s*i+f*n,t[4]=c*i-o*n,t[5]=h*i-u*n,t[6]=l*i-a*n,t[7]=f*i-s*n}(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=Y()(t,3),r=e[0],n=e[1],i=e[2];return this.rotateX(r).rotateY(n).rotateZ(i)}},{key:"rotateAxis",value:function(t,e){return function(t,e,r,n){var i,o,u,a,s,c,h,l,f,p,v,y,d,k,g,m,b,x,O,E,_,M,w,S,P=n[0],R=n[1],L=n[2],j=Math.hypot(P,R,L);j<1e-6||(P*=j=1/j,R*=j,L*=j,i=Math.sin(r),u=1-(o=Math.cos(r)),a=e[0],s=e[1],c=e[2],h=e[3],l=e[4],f=e[5],p=e[6],v=e[7],y=e[8],d=e[9],k=e[10],g=e[11],m=P*P*u+o,b=R*P*u+L*i,x=L*P*u-R*i,O=P*R*u-L*i,E=R*R*u+o,_=L*R*u+P*i,M=P*L*u+R*i,w=R*L*u-P*i,S=L*L*u+o,t[0]=a*m+l*b+y*x,t[1]=s*m+f*b+d*x,t[2]=c*m+p*b+k*x,t[3]=h*m+v*b+g*x,t[4]=a*O+l*E+y*_,t[5]=s*O+f*E+d*_,t[6]=c*O+p*E+k*_,t[7]=h*O+v*E+g*_,t[8]=a*M+l*w+y*S,t[9]=s*M+f*w+d*S,t[10]=c*M+p*w+k*S,t[11]=h*M+v*w+g*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]))}(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?H(this,this,t):H(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return function(t,e,r){var n,i,o,u,a,s,c,h,l,f,p,v,y=r[0],d=r[1],k=r[2];e===t?(t[12]=e[0]*y+e[4]*d+e[8]*k+e[12],t[13]=e[1]*y+e[5]*d+e[9]*k+e[13],t[14]=e[2]*y+e[6]*d+e[10]*k+e[14],t[15]=e[3]*y+e[7]*d+e[11]*k+e[15]):(n=e[0],i=e[1],o=e[2],u=e[3],a=e[4],s=e[5],c=e[6],h=e[7],l=e[8],f=e[9],p=e[10],v=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=u,t[4]=a,t[5]=s,t[6]=c,t[7]=h,t[8]=l,t[9]=f,t[10]=p,t[11]=v,t[12]=n*y+a*d+l*k+e[12],t[13]=i*y+s*d+f*k+e[13],t[14]=o*y+c*d+p*k+e[14],t[15]=u*y+h*d+v*k+e[15])}(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(T(e=function(t,e,r){var n=e[0],i=e[1],o=e[2],u=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*u,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*u,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*u,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*u,t}(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=V(e||[-0,-0],t,this);break;case 3:e=function(t,e,r){var n=e[0],i=e[1],o=e[2],u=r[3]*n+r[7]*i+r[11]*o+r[15];return u=u||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/u,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/u,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/u,t}(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return T(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=F(e||[-0,-0],t,this);break;case 3:e=function(t,e,r){var n=e[0],i=e[1],o=e[2],u=r[3]*n+r[7]*i+r[11]*o||1;return t[0]=(r[0]*n+r[4]*i+r[8]*o)/u,t[1]=(r[1]*n+r[5]*i+r[9]*o)/u,t[2]=(r[2]*n+r[6]*i+r[10]*o)/u,t}(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return T(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,r){return this.identity().translate([t,e,r])}},{key:"transformPoint",value:function(t,e){return I("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return I("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return I("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"IDENTITY",get:function(){return nt.IDENTITY=nt.IDENTITY||Object.freeze(new r(tt)),nt.IDENTITY}},{key:"ZERO",get:function(){return nt.ZERO=nt.ZERO||Object.freeze(new r(et)),nt.ZERO}},{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,r,n,i,o){var u=2*o/(r-e),a=2*o/(i-n),s=(r+e)/(r-e),c=(i+n)/(i-n),h=-2*o;return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0,t}}]),r}(G);function ot(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 ut(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ot(Object(r),!0).forEach((function(e){u()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function at(t,e,r,n){if(r){if(r.props.userData._googleMap===t)return r;ct(r)}var i={click:null,dblclick:null,mousemove:null,mouseout:null};r=new f.Deck(ut(ut({},n),{},{useDevicePixels:!!n.interleaved||n.useDevicePixels,style:n.interleaved?null:{pointerEvents:"none"},parent:st(e,n.style),initialViewState:{longitude:0,latitude:0,zoom:1},controller:!1,userData:{_googleMap:t,_eventListeners:i}}));var o=function(e){i[e]=t.addListener(e,(function(t){return function(t,e,r){var n={type:e,offsetCenter:pt(r,t),srcEvent:r};switch(e){case"click":t._lastPointerDownInfo=t.pickObject(ut(ut({},n.offsetCenter),{},{radius:t.props.pickingRadius})),n.tapCount=1,t._onEvent(n);break;case"dblclick":n.type="click",n.tapCount=2,t._onEvent(n);break;case"mousemove":n.type="pointermove",t._onPointerMove(n);break;case"mouseout":n.type="pointerleave",t._onPointerMove(n);break;default:return}}(r,e,t)}))};for(var u in i)o(u);return r}function st(t,e){var r=document.createElement("div");return r.style.position="absolute",Object.assign(r.style,e),t.getPanes?t.getPanes().overlayLayer.appendChild(r):t.getMap().getDiv().appendChild(r),r}function ct(t){var e=t.props.userData._eventListeners;for(var r in e)e[r].remove();t.finalize()}function ht(t,e){var r=lt(t),n=r.width,i=r.height,o=e.getCameraParams(),u=o.center,a=o.heading,s=o.tilt,c=o.zoom,h=i?n/i:1,l=(new it).perspective({fovy:25*Math.PI/180,aspect:h,near:.75,far:3e14});return{width:n,height:i,viewState:{altitude:.5*l[5],bearing:a,latitude:u.lat(),longitude:u.lng(),pitch:s,projectionMatrix:l,repeat:!0,zoom:c-1}}}function lt(t){var e=t.getDiv().firstChild;return{width:e.offsetWidth,height:e.offsetHeight}}function ft(t,e,r){var n=new google.maps.Point(e,r),i=t.fromContainerPixelToLatLng(n);return[i.lng(),i.lat()]}function pt(t,e){if(t.pixel)return t.pixel;var r=e.getViewports()[0].project([t.latLng.lng(),t.latLng.lat()]);return{x:r[0],y:r[1]}}var vt=["width","height","left","top"];function yt(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 dt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach((function(e){u()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var kt=function(){return!1},gt={depthMask:!0,depthTest:!0,blend:!0,blendFunc:[770,771,1,771],blendEquation:32774};function mt(){}var bt={interleaved:!0},xt=function(){function t(e){s()(this,t),this.props={},this._map=null,this.setProps(dt(dt({},bt),e))}return h()(t,[{key:"setMap",value:function(t){var e=this;if(t!==this._map&&(this._map&&(this._overlay.setMap(null),this._map=null),t)){this._map=t;var r=google.maps.RenderingType.UNINITIALIZED;t.getRenderingType()!==r?this._createOverlay(t):t.addListener("renderingtype_changed",(function(){e._createOverlay(t)}))}}},{key:"setProps",value:function(t){Object.assign(this.props,t),this._deck&&(t.style&&(Object.assign(this._deck.canvas.parentElement.style,t.style),t.style=null),this._deck.setProps(t))}},{key:"pickObject",value:function(t){return this._deck&&this._deck.pickObject(t)}},{key:"pickMultipleObjects",value:function(t){return this._deck&&this._deck.pickMultipleObjects(t)}},{key:"pickObjects",value:function(t){return this._deck&&this._deck.pickObjects(t)}},{key:"finalize",value:function(){this.setMap(null),this._deck&&(ct(this._deck),this._deck=null)}},{key:"_createOverlay",value:function(t){var e=this.props.interleaved,r=google.maps.RenderingType,n=r.VECTOR,i=r.UNINITIALIZED,o=t.getRenderingType();if(o!==i){var u=o===n&&google.maps.WebGLOverlayView,a=new(u?google.maps.WebGLOverlayView:google.maps.OverlayView);u?(e?(a.onAdd=mt,a.onContextRestored=this._onContextRestored.bind(this),a.onDraw=this._onDrawVectorInterleaved.bind(this)):(a.onAdd=this._onAdd.bind(this),a.onContextRestored=mt,a.onDraw=this._onDrawVectorOverlay.bind(this)),a.onContextLost=this._onContextLost.bind(this)):(a.onAdd=this._onAdd.bind(this),a.draw=this._onDrawRaster.bind(this)),a.onRemove=this._onRemove.bind(this),this._overlay=a,this._overlay.setMap(t)}}},{key:"_onAdd",value:function(){this._deck=at(this._map,this._overlay,this._deck,this.props)}},{key:"_onContextRestored",value:function(t){var e=this,r=t.gl,n=at(this._map,this._overlay,this._deck,dt({gl:r,_customRender:function(){e._overlay.requestRedraw()}},this.props));this._deck=n,n.animationLoop._renderFrame=function(){var t=r.getParameter(34964);Object(l.withParameters)(r,{},(function(){n.animationLoop.onRender()})),r.bindBuffer(34962,t)}}},{key:"_onContextLost",value:function(){this._deck&&(ct(this._deck),this._deck=null)}},{key:"_onRemove",value:function(){this._deck.setProps({layerFilter:kt})}},{key:"_onDrawRaster",value:function(){var t=this._deck,e=function(t,e){var r=lt(t),n=r.width,i=r.height,o=e.getProjection(),u=t.getBounds(),a=u.getNorthEast(),s=u.getSouthWest(),c=o.fromLatLngToDivPixel(a),h=o.fromLatLngToDivPixel(s),l=ft(o,n/2,i/2),f=new google.maps.LatLng(0,l[0]),p=o.fromLatLngToContainerPixel(f),v=o.fromLatLngToDivPixel(f),y=Math.round(v.x-p.x),d=v.y-p.y,k=ft(o,n/2,0),g=ft(o,n/2,i),m=l[1],b=l[0];if(Math.abs(m)>85.05113){m=m>0?85.05113:-85.05113;var x=new google.maps.LatLng(m,b);d+=o.fromLatLngToContainerPixel(x).y-i/2}d=Math.round(d);var O=180*new K(k).sub(g).verticalAngle()/Math.PI;O<0&&(O+=360);var E,_=t.getHeading()||0,M=t.getZoom()-1;if(0===O)E=i?(h.y-c.y)/i:1;else if(O===_){var w=new K([c.x,c.y]).sub([h.x,h.y]).len(),S=new K([n,-i]).len();E=S?w/S:1}return{width:n,height:i,left:y,top:d,zoom:M+=Math.log2(E||1),bearing:O,pitch:t.getTilt(),latitude:m,longitude:b}}(this._map,this._overlay),r=e.width,n=e.height,o=e.left,u=e.top,a=i()(e,vt),s=t.canvas.parentElement.style;s.left="".concat(o,"px"),s.top="".concat(u,"px");t.setProps({width:r,height:n,viewState:dt({altitude:1e4,repeat:!0},a)}),t.redraw()}},{key:"_onDrawVectorInterleaved",value:function(t){var e=t.gl,r=t.transformer;if(this._deck&&this._map){var n=this._deck;if(n.setProps(dt(dt({},ht(this._map,r)),{},{width:!1,height:!1})),n.layerManager){var i=Object(l.getParameters)(e,36006);n.setProps({_framebuffer:i}),n.needsRedraw({clearRedrawFlags:!0}),Object(l.setParameters)(e,{viewport:[0,0,e.canvas.width,e.canvas.height],scissor:[0,0,e.canvas.width,e.canvas.height],stencilFunc:[519,0,255,519,0,255]}),Object(l.withParameters)(e,gt,(function(){n._drawLayers("google-vector",{clearCanvas:!1})}))}}}},{key:"_onDrawVectorOverlay",value:function(t){t.gl;var e=t.transformer;if(this._deck&&this._map){var r=this._deck;r.setProps(dt({},ht(this._map,e))),r.redraw()}}}]),t}();r.d(e,"GoogleMapsOverlay",(function(){return xt}))}])})); |
@@ -41,2 +41,3 @@ "use strict"; | ||
deck = new _core.Deck(_objectSpread(_objectSpread({}, props), {}, { | ||
useDevicePixels: props.interleaved ? true : props.useDevicePixels, | ||
style: props.interleaved ? null : { | ||
@@ -43,0 +44,0 @@ pointerEvents: 'none' |
@@ -20,2 +20,3 @@ import { Deck } from '@deck.gl/core'; | ||
deck = new Deck({ ...props, | ||
useDevicePixels: props.interleaved ? true : props.useDevicePixels, | ||
style: props.interleaved ? null : { | ||
@@ -22,0 +23,0 @@ pointerEvents: 'none' |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "8.7.11", | ||
"version": "8.7.12", | ||
"publishConfig": { | ||
@@ -35,3 +35,3 @@ "access": "public" | ||
}, | ||
"gitHead": "05d5d8024eaf3ad161848088b8f1eda8679e9c2e" | ||
"gitHead": "8982b5d2b1add585af1f7144bc259e2216707319" | ||
} |
@@ -32,2 +32,3 @@ /* global google, document */ | ||
...props, | ||
useDevicePixels: props.interleaved ? true : props.useDevicePixels, | ||
style: props.interleaved ? null : {pointerEvents: 'none'}, | ||
@@ -34,0 +35,0 @@ parent: getContainer(overlay, props.style), |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
465972
10561