vizicities/dist/vizicities.min.js

10 wiersze
230 KiB
JavaScript
Czysty Wina Historia

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("proj4"),require("THREE")):"function"==typeof define&&define.amd?define(["proj4","THREE"],t):"object"==typeof exports?exports.VIZI=t(require("proj4"),require("THREE")):e.VIZI=t(e.proj4,e.THREE)}(this,function(__WEBPACK_EXTERNAL_MODULE_22__,__WEBPACK_EXTERNAL_MODULE_24__){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=i(r),s=n(51),a=i(s),u=n(46),l=i(u),c=n(45),f=i(c),h=n(57),p=i(h),d=n(72),v=i(d),_=n(90),m=i(_),y=n(74),g=i(y),b=n(91),w=i(b),x=n(87),T=i(x),M=n(88),P=i(M),k=n(89),E=i(k),O=n(11),S=i(O),j=n(10),A=i(j),C=n(92),D=i(C),L={version:"0.3",World:o["default"],world:r.world,Controls:a["default"],Layer:l["default"],layer:u.layer,EnvironmentLayer:f["default"],environmentLayer:c.environmentLayer,ImageTileLayer:p["default"],imageTileLayer:h.imageTileLayer,GeoJSONTileLayer:v["default"],geoJSONTileLayer:d.geoJSONTileLayer,TopoJSONTileLayer:m["default"],topoJSONTileLayer:_.topoJSONTileLayer,GeoJSONLayer:g["default"],geoJSONLayer:y.geoJSONLayer,TopoJSONLayer:w["default"],topoJSONLayer:b.topoJSONLayer,PolygonLayer:T["default"],polygonLayer:x.polygonLayer,PolylineLayer:P["default"],polylineLayer:M.polylineLayer,PointLayer:E["default"],pointLayer:k.pointLayer,Point:S["default"],point:O.point,LatLon:A["default"],latLon:j.latLon,Util:D["default"]};t["default"]=L,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(2),l=i(u),c=n(3),f=i(c),h=n(6),p=i(h),d=n(11),v=n(10),_=n(23),m=i(_),y=n(45),g=i(y),b=function(e){function t(e,n){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var i={crs:p["default"].EPSG3857,skybox:!1,postProcessing:!1};this.options=(0,f["default"])({},i,n),this._layers=[],this._controls=[],this._initContainer(e),this._initEngine(),this._initEnvironment(),this._initEvents(),this._pause=!1,this._update()}return o(t,e),s(t,[{key:"_initContainer",value:function(e){this._container=document.getElementById(e)}},{key:"_initEngine",value:function(){this._engine=new m["default"](this._container,this)}},{key:"_initEnvironment",value:function(){this._environment=new g["default"]({skybox:this.options.skybox}).addTo(this)}},{key:"_initEvents",value:function(){this.on("controlsMoveEnd",this._onControlsMoveEnd)}},{key:"_onControlsMoveEnd",value:function(e){var t=(0,d.point)(e.x,e.z);this._resetView(this.pointToLatLon(t),t)}},{key:"_resetView",value:function(e,t){this.emit("preResetView"),this._moveStart(),this._move(e,t),this._moveEnd(),this.emit("postResetView")}},{key:"_moveStart",value:function(){this.emit("moveStart")}},{key:"_move",value:function(e,t){this._lastPosition=e,this.emit("move",e,t)}},{key:"_moveEnd",value:function(){this.emit("moveEnd")}},{key:"_update",value:function(){if(!this._pause){var e=this._engine.clock.getDelta();window.requestAnimationFrame(this._update.bind(this)),this._controls.forEach(function(t){t.update(e)}),this.emit("preUpdate",e),this._engine.update(e),this.emit("postUpdate",e)}}},{key:"setView",value:function(e){return this._originLatlon=e,this._originPoint=this.project(e),this._resetView(e),this}},{key:"getPosition",value:function(){return this._lastPosition}},{key:"project",value:function(e){return this.options.crs.latLonToPoint((0,v.latLon)(e))}},{key:"unproject",value:function(e){return this.options.crs.pointToLatLon((0,d.point)(e))}},{key:"latLonToPoint",value:function(e){var t=this.project((0,v.latLon)(e));return t._subtract(this._originPoint)}},{key:"pointToLatLon",value:function(e){var t=(0,d.point)(e).add(this._originPoint);return this.unproject(t)}},{key:"pointScale",value:function(e,t){return this.options.crs.pointScale(e,t)}},{key:"metresToWorld",value:function(e,t,n){return this.options.crs.metresToWorld(e,t,n)}},{key:"worldToMetres",value:function(e,t,n){return this.options.crs.worldToMetres(e,t,n)}},{key:"getCamera",value:function(){return this._engine._camera}},{key:"addLayer",value:function(e){return e._addToWorld(this),this._layers.push(e),e.isOutput()&&e.isOutputToScene()&&(this._engine._scene.add(e._object3D),this._engine._domScene3D.add(e._domObject3D),this._engine._domScene2D.add(e._domObject2D)),this.emit("layerAdded",e),this}},{key:"removeLayer",value:function(e){var t=this._layers.indexOf(e);return t>-1&&this._layers.splice(t,1),e.isOutput()&&e.isOutputToScene()&&(this._engine._scene.remove(e._object3D),this._engine._domScene3D.remove(e._domObject3D),this._engine._domScene2D.remove(e._domObject2D)),this.emit("layerRemoved"),this}},{key:"addControls",value:function(e){return e._addToWorld(this),this._controls.push(e),this.emit("controlsAdded",e),this}},{key:"removeControls",value:function(e){var t=this._controls.indexOf(t);return t>-1&&this._controls.splice(t,1),this.emit("controlsRemoved",e),this}},{key:"stop",value:function(){this._pause=!0}},{key:"start",value:function(){this._pause=!1,this._update()}},{key:"destroy",value:function(){this.stop(),this.off("controlsMoveEnd",this._onControlsMoveEnd);var e,t;for(e=this._controls.length-1;e>=0;e--)t=this._controls[0],this.removeControls(t),t.destroy();var n;for(e=this._layers.length-1;e>=0;e--)n=this._layers[0],this.removeLayer(n),n.destroy();for(this._environment=null,this._engine.destroy(),this._engine=null;this._container.firstChild;)this._container.removeChild(this._container.firstChild);this._container=null}}]),t}(l["default"]);t["default"]=b;var w=function(e,t){return new b(e,t)};t.world=w},function(e,t,n){"use strict";function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function r(){}var o="function"!=typeof Object.create?"~":!1;r.prototype._events=void 0,r.prototype.listeners=function(e,t){var n=o?o+e:e,i=this._events&&this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var r=0,s=i.length,a=new Array(s);s>r;r++)a[r]=i[r].fn;return a},r.prototype.emit=function(e,t,n,i,r,s){var a=o?o+e:e;if(!this._events||!this._events[a])return!1;var u,l,c=this._events[a],f=arguments.length;if("function"==typeof c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,r),!0;case 6:return c.fn.call(c.context,t,n,i,r,s),!0}for(l=1,u=new Array(f-1);f>l;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;p>l;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;default:if(!u)for(h=1,u=new Array(f-1);f>h;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},r.prototype.on=function(e,t,n){var r=new i(t,n||this),s=o?o+e:e;return this._events||(this._events=o?{}:Object.create(null)),this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],r]:this._events[s].push(r):this._events[s]=r,this},r.prototype.once=function(e,t,n){var r=new i(t,n||this,!0),s=o?o+e:e;return this._events||(this._events=o?{}:Object.create(null)),this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],r]:this._events[s].push(r):this._events[s]=r,this},r.prototype.removeListener=function(e,t,n,i){var r=o?o+e:e;if(!this._events||!this._events[r])return this;var s=this._events[r],a=[];if(t)if(s.fn)(s.fn!==t||i&&!s.once||n&&s.context!==n)&&a.push(s);else for(var u=0,l=s.length;l>u;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&a.push(s[u]);return a.length?this._events[r]=1===a.length?a[0]:a:delete this._events[r],this},r.prototype.removeAllListeners=function(e){return this._events?(e?delete this._events[o?o+e:e]:this._events=o?{}:Object.create(null),this):this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=o,e.exports=r},function(e,t,n){function i(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function r(e,t,n){var i=e[t];(!c(i,n)||c(i,w[t])&&!x.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e,t,n){return a(e,t,n)}function a(e,t,n,i){n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],u=i?i(n[a],e[a],a,n,e):e[a];r(n,a,u)}return n}function u(e){return _(function(t,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o="function"==typeof o?(r--,o):void 0,s&&l(n[0],n[1],s)&&(o=3>r?void 0:o,r=1),t=Object(t);++i<r;){var a=n[i];a&&e(t,a,i,o)}return t})}function l(e,t,n){if(!d(n))return!1;var r=typeof t;return("number"==r?f(n)&&i(t,n.length):"string"==r&&t in n)?c(n[t],e):!1}function c(e,t){return e===t||e!==e&&t!==t}function f(e){return null!=e&&!("function"==typeof e&&h(e))&&p(M(e))}function h(e){var t=d(e)?T.call(e):"";return t==y||t==g}function p(e){return"number"==typeof e&&e>-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(4),_=n(5),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,w=Object.prototype,x=w.hasOwnProperty,T=w.toString,M=o("length"),P=u(function(e,t){s(t,v(t),e)});e.exports=P},function(e,t){function n(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function i(e,t){return e="number"==typeof e||T.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function r(e,t){return P.call(e,t)||"object"==typeof e&&t in e&&null===E(e)}function o(e){return S(Object(e))}function s(e){return function(t){return null==t?void 0:t[e]}}function a(e){var t=e?e.length:void 0;return p(t)&&(A(e)||_(e)||l(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||M;return e===n}function l(e){return f(e)&&P.call(e,"callee")&&(!O.call(e,"callee")||k.call(e)==g)}function c(e){return null!=e&&!("function"==typeof e&&h(e))&&p(j(e))}function f(e){return v(e)&&c(e)}function h(e){var t=d(e)?k.call(e):"";return t==b||t==w}function p(e){return"number"==typeof e&&e>-1&&e%1==0&&y>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function _(e){return"string"==typeof e||!A(e)&&v(e)&&k.call(e)==x}function m(e){var t=u(e);if(!t&&!c(e))return o(e);var n=a(e),s=!!n,l=n||[],f=l.length;for(var h in e)!r(e,h)||s&&("length"==h||i(h,f))||t&&"constructor"==h||l.push(h);return l}var y=9007199254740991,g="[object Arguments]",b="[object Function]",w="[object GeneratorFunction]",x="[object String]",T=/^(?:0|[1-9]\d*)$/,M=Object.prototype,P=M.hasOwnProperty,k=M.toString,E=Object.getPrototypeOf,O=M.propertyIsEnumerable,S=Object.keys,j=s("length"),A=Array.isArray;e.exports=m},function(e,t){function n(e,t,n){var i=n.length;switch(i){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t){if("function"!=typeof e)throw new TypeError(u);return t=w(void 0===t?e.length-1:s(t),0),function(){for(var i=arguments,r=-1,o=w(i.length-t,0),s=Array(o);++r<o;)s[r]=i[t+r];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,i[0],s);case 2:return e.call(this,i[0],i[1],s)}var a=Array(t+1);for(r=-1;++r<t;)a[r]=i[r];return a[t]=s,n(e,this,a)}}function r(e){var t=o(e)?b.call(e):"";return t==h||t==p}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){if(!e)return 0===e?e:0;if(e=a(e),e===l||e===-l){var t=0>e?-1:1;return t*c}var n=e%1;return e===e?n?e-n:e:0}function a(e){if(o(e)){var t=r(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=_.test(e);return n||m.test(e)?y(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",l=1/0,c=1.7976931348623157e308,f=NaN,h="[object Function]",p="[object GeneratorFunction]",d=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,m=/^0o[0-7]+$/i,y=parseInt,g=Object.prototype,b=g.toString,w=Math.max;e.exports=i},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),o=i(r),s=n(15),a=i(s),u=n(17),l=i(u),c=n(19),f=i(c),h=n(20),p=i(h),d={};d.EPSG3857=o["default"],d.EPSG900913=r.EPSG900913,d.EPSG3395=a["default"],d.EPSG4326=l["default"],d.Simple=f["default"],d.Proj4=p["default"],t["default"]=d,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(8),a=i(s),u=n(13),l=i(u),c=n(14),f=i(c),h={code:"EPSG:3857",projection:l["default"],transformScale:1/(Math.PI*l["default"].R),transformation:function(){var e=1/(Math.PI*l["default"].R);return new f["default"](e,0,-e,0)}()},p=(0,o["default"])({},a["default"],h),d=(0,o["default"])({},p,{code:"EPSG:900913"});t.EPSG900913=d,t["default"]=p},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(9),a=i(s),u=(n(10),{wrapLon:[-180,180],R:6378137,distance:function(e,t,n){var i,r,o,s=Math.PI/180;if(n){i=e.lat*s,r=t.lat*s;var a=e.lon*s,u=t.lon*s,l=r-i,c=u-a,f=l/2,h=c/2;o=Math.sin(f)*Math.sin(f)+Math.cos(i)*Math.cos(r)*Math.sin(h)*Math.sin(h);var p=2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o));return this.R*p}return i=e.lat*s,r=t.lat*s,o=Math.sin(i)*Math.sin(r)+Math.cos(i)*Math.cos(r)*Math.cos((t.lon-e.lon)*s),this.R*Math.acos(Math.min(o,1))},pointScale:function(e,t){return this.projection.pointScale?this.projection.pointScale(e,t):[1,1]},metresToProjected:function(e,t){return e*t[1]},projectedToMetres:function(e,t){return e/t[1]},metresToWorld:function(e,t,n){var i=this.metresToProjected(e,t),r=this.scale(n);n&&(r/=2);var o=r*(this.transformScale*i);return n&&(o/=t[1]),o},worldToMetres:function(e,t,n){var i=this.scale(n);n&&(i/=2);var r=e/i/this.transformScale,o=this.projectedToMetres(r,t);return n&&(o*=t[1]),o}});t["default"]=(0,o["default"])({},a["default"],u),e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(11),s=n(12),a=i(s),u={scaleFactor:1e6,latLonToPoint:function(e,t){var n=this.projection.project(e),i=this.scale(t);return t&&(i/=2),this.transformation._transform(n,i)},pointToLatLon:function(e,t){var n=this.scale(t);t&&(n/=2);var i=this.transformation.untransform(e,n);return this.projection.unproject(i)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return e>=0?256*Math.pow(2,e):this.scaleFactor},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);e&&(n/=2);var i=this.transformation.transform((0,o.point)(t[0]),n),r=this.transformation.transform((0,o.point)(t[1]),n);return[i,r]},wrapLatLon:function(e){var t=this.wrapLat?(0,a["default"])(e.lat,this.wrapLat,!0):e.lat,n=this.wrapLon?(0,a["default"])(e.lon,this.wrapLon,!0):e.lon,i=e.alt;return(0,r.latLon)(t,n,i)}};t["default"]=u,e.exports=t["default"]},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t,i,r){if(n(this,e),isNaN(t)||isNaN(i))throw new Error("Invalid LatLon object: ("+t+", "+i+")");this.lat=+t,this.lon=+i,void 0!==r&&(this.alt=+r)}return i(e,[{key:"clone",value:function(){return new e(this.lat,this.lon,this.alt)}}]),e}();t["default"]=r;var o=function(e,t,n){return e instanceof r?e:Array.isArray(e)&&"object"!=typeof e[0]?3===e.length?new r(e[0],e[1],e[2]):2===e.length?new r(e[0],e[1]):null:void 0===e||null===e?e:"object"==typeof e&&"lat"in e?new r(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new r(e,t,n)};t.latLon=o},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t,i,r){n(this,e),this.x=r?Math.round(t):t,this.y=r?Math.round(i):i}return i(e,[{key:"clone",value:function(){return new e(this.x,this.y)}},{key:"add",value:function(e){return this.clone()._add(o(e))}},{key:"_add",value:function(e){return this.x+=e.x,this.y+=e.y,this}},{key:"subtract",value:function(e){return this.clone()._subtract(o(e))}},{key:"_subtract",value:function(e){return this.x-=e.x,this.y-=e.y,this}}]),e}();t["default"]=r;var o=function(e,t,n){return e instanceof r?e:Array.isArray(e)?new r(e[0],e[1]):void 0===e||null===e?e:new r(e,t,n)};t.point=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){var i=t[1],r=t[0],o=i-r;return e===i&&n?e:((e-r)%o+o)%o+r};t["default"]=n,e.exports=t["default"]},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(11),o={R:6378137,MAX_LATITUDE:85.0511287798,ECC:.081819191,ECC2:.006694380015894481,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,e.lat),-n),o=Math.sin(i*t);return(0,r.point)(this.R*e.lon*t,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(e){var t=180/Math.PI;return(0,i.latLon)((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},pointScale:function(e,t){var n,i=Math.PI/180;if(t){var r=e.lat*i,o=(e.lon*i,this.R),s=Math.sin(r),a=s*s,u=Math.cos(r),l=o*(1-this.ECC2)/Math.pow(1-this.ECC2*a,1.5),c=o/Math.sqrt(1-this.ECC2*a),f=o/l/u;return n=o/c/u,[n,f]}return n=1/Math.cos(e.lat*i),[n,n]},bounds:function(){var e=6378137*Math.PI;return[[-e,-e],[e,e]]}()};t["default"]=o,e.exports=t["default"]},function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(11),s=function(){function e(t,n,r,o){i(this,e),this._a=t,this._b=n,this._c=r,this._d=o}return r(e,[{key:"transform",value:function(e,t){return this._transform(e.clone(),t)}},{key:"_transform",value:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e}},{key:"untransform",value:function(e,t){return t=t||1,(0,o.point)((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}}]),e}();t["default"]=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(8),a=i(s),u=n(16),l=i(u),c=n(14),f=i(c),h={code:"EPSG:3395",projection:l["default"],transformScale:1/(Math.PI*l["default"].R),transformation:function(){var e=1/(Math.PI*l["default"].R);return new f["default"](e,0,-e,0)}()},p=(0,o["default"])({},a["default"],h);t["default"]=p,e.exports=t["default"]},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(11),o={R:6378137,R_MINOR:6356752.314245179,ECC:.081819191,ECC2:.006694380015894481,project:function(e){var t=Math.PI/180,n=this.R,i=e.lat*t,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),a=s*Math.sin(i),u=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),s/2);return i=-n*Math.log(Math.max(u,1e-10)),(0,r.point)(e.lon*t*n,i)},unproject:function(e){for(var t,n=180/Math.PI,r=this.R,o=this.R_MINOR/r,s=Math.sqrt(1-o*o),a=Math.exp(-e.y/r),u=Math.PI/2-2*Math.atan(a),l=0,c=.1;15>l&&Math.abs(c)>1e-7;l++)t=s*Math.sin(u),t=Math.pow((1-t)/(1+t),s/2),c=Math.PI/2-2*Math.atan(a*t)-u,u+=c;return(0,i.latLon)(u*n,e.x*n/r)},pointScale:function(e){var t=Math.PI/180,n=e.lat*t,i=Math.sin(n),r=i*i,o=Math.cos(n),s=Math.sqrt(1-this.ECC2*r)/o;return[s,s]},bounds:[[-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]]};t["default"]=o,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(8),a=i(s),u=n(18),l=i(u),c=n(14),f=i(c),h={code:"EPSG:4326",projection:l["default"],transformScale:1/180,transformation:new f["default"](1/180,0,-1/180,0)},p=(0,o["default"])({},a["default"],h);t["default"]=p,e.exports=t["default"]},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(11),o={project:function(e){return(0,r.point)(e.lon,e.lat)},unproject:function(e){return(0,i.latLon)(e.y,e.x)},pointScale:function(e){var t=111132.92,n=-559.82,i=1.175,r=-.0023,o=111412.84,s=-93.5,a=.118,u=Math.PI/180,l=e.lat*u,c=t+n*Math.cos(2*l)+i*Math.cos(4*l)+r*Math.cos(6*l),f=o*Math.cos(l)+s*Math.cos(3*l)+a*Math.cos(5*l);return[1/c,1/f]},bounds:[[-180,-90],[180,90]]};t["default"]=o,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(9),a=i(s),u=n(18),l=i(u),c=n(14),f=i(c),h={projection:l["default"],transformation:new f["default"](1,0,1,0),scale:function(e){return e?Math.pow(2,e):1},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lon-e.lon,i=t.lat-e.lat;return Math.sqrt(n*n+i*i)},infinite:!0},p=(0,o["default"])({},a["default"],h);t["default"]=p,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=i(r),s=n(8),a=i(s),u=n(21),l=i(u),c=n(14),f=i(c),h=function(e,t,n){var i=(0,l["default"])(t,n),r=i.bounds[1][0]-i.bounds[0][0],o=i.bounds[1][1]-i.bounds[0][1],s=r/2,a=o/2,u=1/s,c=1/a,h=Math.min(u,c),p=h*(i.bounds[0][0]+s),d=h*(i.bounds[0][1]+a);return{code:e,projection:i,transformScale:h,transformation:new f["default"](h,-p,-h,d)}},p=function(e,t,n){return(0,o["default"])({},a["default"],h(e,t,n))};t["default"]=p,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),o=i(r),s=n(10),a=n(11),u=function(e,t){var n=(0,o["default"])(e),i=function(e){return(0,a.point)(n.forward([e.lon,e.lat]))},r=function(e){var t=n.inverse([e.x,e.y]);return(0,s.latLon)(t[1],t[0])};return{project:i,unproject:r,pointScale:function(e,t){return[1,1]},bounds:function(){if(t)return t;var e=i([-90,-180]),n=i([90,180]);return[e,n]}()}};t["default"]=u,e.exports=t["default"]},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE_22__},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(2),l=i(u),c=n(24),f=i(c),h=n(25),p=i(h),d=n(26),v=i(d),_=n(27),m=i(_),y=n(28),g=i(y),b=n(29),w=i(b),x=n(31),T=i(x),M=n(33),P=i(M),k=n(34),E=i(k),O=n(36),S=i(O),j=n(41),A=i(j),C=n(39),D=i(C),L=n(38),R=i(L),I=n(42),B=i(I),F=n(43),z=i(F),N=n(44),U=i(N),H=function(e){function t(e,n){r(this,t),console.log("Init Engine"),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this._world=n,this._scene=p["default"],this._domScene3D=v["default"],this._domScene2D=m["default"];var i=this._world.options.postProcessing?!1:!0;this._renderer=(0,g["default"])(e,i),this._domRenderer3D=(0,w["default"])(e),this._domRenderer2D=(0,T["default"])(e),this._camera=(0,P["default"])(e),this._container=e,this._picking=(0,E["default"])(this._world,this._renderer,this._camera),this.clock=new f["default"].Clock,this._frustum=new f["default"].Frustum,this._world.options.postProcessing&&this._initPostProcessing()}return o(t,e),s(t,[{key:"_initPostProcessing",value:function(){var e=new A["default"](this._scene,this._camera),t=new D["default"](U["default"]),n=new D["default"](B["default"]),i=new D["default"](z["default"]),r=5;n.uniforms.r.value=i.uniforms.r.value=.6;var o=new D["default"](R["default"]);o.renderToScreen=!0,this._composer=(0,S["default"])(this._renderer,this._container),this._composer.addPass(e),this._composer.addPass(t),this._composer.addPass(n),this._composer.addPass(i),this._composer.addPass(o);var s=this,a=function(){var e=s._container.clientWidth,o=s._container.clientHeight,a=window.devicePixelRatio;t.uniforms.resolution.value.set(1/(e*a),1/(o*a)),n.uniforms.h.value=r/(e*a),i.uniforms.v.value=r/(o*a)};a(),window.addEventListener("resize",a,!1)}},{key:"update",value:function(e){this.emit("preRender"),this._world.options.postProcessing?this._composer.render(e):this._renderer.render(this._scene,this._camera),this._domRenderer3D.render(this._domScene3D,this._camera),this._domRenderer2D.render(this._domScene2D,this._camera),this.emit("postRender")}},{key:"destroy",value:function(){for(var e,t=this._scene.children.length-1;t>=0;t--)e=this._scene.children[t],e&&(this._scene.remove(e),e.geometry&&(e.geometry.dispose(),e.geometry=null),e.material&&(e.material.map&&(e.material.map.dispose(),e.material.map=null),e.material.dispose(),e.material=null));for(var t=this._domScene3D.children.length-1;t>=0;t--)e=this._domScene3D.children[t],e&&this._domScene3D.remove(e);for(var t=this._domScene2D.children.length-1;t>=0;t--)e=this._domScene2D.children[t],e&&this._domScene2D.remove(e);this._picking.destroy(),this._picking=null,this._world=null,this._scene=null,this._domScene3D=null,this._domScene2D=null,this._composer=null,this._renderer=null,this._domRenderer3D=null,this._domRenderer2D=null,this._camera=null,this._clock=null,this._frustum=null}}]),t}(l["default"]);t["default"]=H,e.exports=t["default"]},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE_24__},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r);t["default"]=function(){var e=new o["default"].Scene;return e}(),e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r);t["default"]=function(){var e=new o["default"].Scene;return e}(),e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r);t["default"]=function(){var e=new o["default"].Scene;return e}(),e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=n(25);i(s);t["default"]=function(e,t){var n=new o["default"].WebGLRenderer({antialias:t});n.setClearColor(16777215,1),n.setPixelRatio(window.devicePixelRatio),n.gammaInput=!0,n.gammaOutput=!0,n.shadowMap.enabled=!0,e.appendChild(n.domElement);var i=function(){n.setSize(e.clientWidth,e.clientHeight)};return window.addEventListener("resize",i,!1),i(),n},e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=(i(r),n(30)),s=n(26);i(s);t["default"]=function(e){var t=new o.CSS3DRenderer;t.domElement.style.position="absolute",t.domElement.style.top=0,e.appendChild(t.domElement);var n=function(){t.setSize(e.clientWidth,e.clientHeight)};return window.addEventListener("resize",n,!1),n(),t},e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=function(e){o["default"].Object3D.call(this),this.element=e,this.element.style.position="absolute",this.addEventListener("removed",function(e){null!==this.element.parentNode&&this.element.parentNode.removeChild(this.element)})};s.prototype=Object.create(o["default"].Object3D.prototype),s.prototype.constructor=s;var a=function(e){s.call(this,e)};a.prototype=Object.create(s.prototype),a.prototype.constructor=a;var u=function(){console.log("THREE.CSS3DRenderer",o["default"].REVISION);var e,t,n,i,r=new o["default"].Matrix4,u={camera:{fov:0,style:""},objects:{}},l=document.createElement("div");l.style.overflow="hidden",l.style.WebkitTransformStyle="preserve-3d",l.style.MozTransformStyle="preserve-3d",l.style.oTransformStyle="preserve-3d",l.style.transformStyle="preserve-3d",this.domElement=l;var c=document.createElement("div");c.style.WebkitTransformStyle="preserve-3d",c.style.MozTransformStyle="preserve-3d",c.style.oTransformStyle="preserve-3d",c.style.transformStyle="preserve-3d",l.appendChild(c),this.setClearColor=function(){},this.getSize=function(){return{width:e,height:t}},this.setSize=function(r,o){e=r,t=o,n=e/2,i=t/2,l.style.width=r+"px",l.style.height=o+"px",c.style.width=r+"px",c.style.height=o+"px"};var f=function(e){return Math.abs(e)<Number.EPSILON?0:e},h=function(e){var t=e.elements;return"matrix3d("+f(t[0])+","+f(-t[1])+","+f(t[2])+","+f(t[3])+","+f(t[4])+","+f(-t[5])+","+f(t[6])+","+f(t[7])+","+f(t[8])+","+f(-t[9])+","+f(t[10])+","+f(t[11])+","+f(t[12])+","+f(-t[13])+","+f(t[14])+","+f(t[15])+")"},p=function(e){var t=e.elements;return"translate3d(-50%,-50%,0) matrix3d("+f(t[0])+","+f(t[1])+","+f(t[2])+","+f(t[3])+","+f(-t[4])+","+f(-t[5])+","+f(-t[6])+","+f(-t[7])+","+f(t[8])+","+f(t[9])+","+f(t[10])+","+f(t[11])+","+f(t[12])+","+f(t[13])+","+f(t[14])+","+f(t[15])+")"},d=function v(e,t){if(e instanceof s){var n;e instanceof a?(r.copy(t.matrixWorldInverse),r.transpose(),r.copyPosition(e.matrixWorld),r.scale(e.scale),r.elements[3]=0,r.elements[7]=0,r.elements[11]=0,r.elements[15]=1,n=p(r)):n=p(e.matrixWorld);var i=e.element,o=u.objects[e.id];(void 0===o||o!==n)&&(i.style.WebkitTransform=n,i.style.MozTransform=n,i.style.oTransform=n,
i.style.transform=n,u.objects[e.id]=n),i.parentNode!==c&&c.appendChild(i)}for(var l=0,f=e.children.length;f>l;l++)v(e.children[l],t)};this.render=function(e,r){var s=.5/Math.tan(o["default"].Math.degToRad(.5*r.fov))*t;u.camera.fov!==s&&(l.style.WebkitPerspective=s+"px",l.style.MozPerspective=s+"px",l.style.oPerspective=s+"px",l.style.perspective=s+"px",u.camera.fov=s),e.updateMatrixWorld(),null===r.parent&&r.updateMatrixWorld(),r.matrixWorldInverse.getInverse(r.matrixWorld);var a="translate3d(0,0,"+s+"px)"+h(r.matrixWorldInverse)+" translate3d("+n+"px,"+i+"px, 0)";u.camera.style!==a&&(c.style.WebkitTransform=a,c.style.MozTransform=a,c.style.oTransform=a,c.style.transform=a,u.camera.style=a),d(e,r)}};t.CSS3DObject=s,t.CSS3DSprite=a,t.CSS3DRenderer=u,o["default"].CSS3DObject=s,o["default"].CSS3DSprite=a,o["default"].CSS3DRenderer=u},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=(i(r),n(32)),s=n(27);i(s);t["default"]=function(e){var t=new o.CSS2DRenderer;t.domElement.style.position="absolute",t.domElement.style.top=0,e.appendChild(t.domElement);var n=function(){t.setSize(e.clientWidth,e.clientHeight)};return window.addEventListener("resize",n,!1),n(),t},e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=function(e){o["default"].Object3D.call(this),this.element=e,this.element.style.position="absolute",this.addEventListener("removed",function(e){null!==this.element.parentNode&&this.element.parentNode.removeChild(this.element)})};s.prototype=Object.create(o["default"].Object3D.prototype),s.prototype.constructor=s;var a=function(){console.log("THREE.CSS2DRenderer",o["default"].REVISION);var e,t,n,i,r=new o["default"].Vector3,a=new o["default"].Matrix4,u=new o["default"].Matrix4,l=document.createElement("div");l.style.overflow="hidden",this.domElement=l,this.setSize=function(r,o){e=r,t=o,n=e/2,i=t/2,l.style.width=r+"px",l.style.height=o+"px"};var c=function f(e,t){if(e instanceof s){r.setFromMatrixPosition(e.matrixWorld),r.applyProjection(u);var o=e.element,a="translate(-50%,-50%) translate("+(r.x*n+n)+"px,"+(-r.y*i+i)+"px)";o.style.WebkitTransform=a,o.style.MozTransform=a,o.style.oTransform=a,o.style.transform=a,o.parentNode!==l&&l.appendChild(o)}for(var c=0,h=e.children.length;h>c;c++)f(e.children[c],t)};this.render=function(e,t){e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),t.matrixWorldInverse.getInverse(t.matrixWorld),a.copy(t.matrixWorldInverse.getInverse(t.matrixWorld)),u.multiplyMatrices(t.projectionMatrix,a),c(e,t)}};t.CSS2DObject=s,t.CSS2DRenderer=a,o["default"].CSS2DObject=s,o["default"].CSS2DRenderer=a},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r);t["default"]=function(e){var t=new o["default"].PerspectiveCamera(45,1,1,2e5);t.position.y=400,t.position.z=400;var n=function(){t.aspect=e.clientWidth/e.clientHeight,t.updateProjectionMatrix()};return window.addEventListener("resize",n,!1),n(),t},e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(24),a=i(s),u=n(11),l=n(35),c=i(l),f=1,h=function(){function e(t,n,i){r(this,e),this._world=t,this._renderer=n,this._camera=i,this._raycaster=new a["default"].Raycaster,this._raycaster.linePrecision=3,this._pickingScene=c["default"],this._pickingTexture=new a["default"].WebGLRenderTarget,this._pickingTexture.texture.minFilter=a["default"].LinearFilter,this._pickingTexture.texture.generateMipmaps=!1,this._nextId=1,this._resizeTexture(),this._initEvents()}return o(e,[{key:"_initEvents",value:function(){this._resizeHandler=this._resizeTexture.bind(this),window.addEventListener("resize",this._resizeHandler,!1),this._mouseUpHandler=this._resizeTexture.bind(this),this._world._container.addEventListener("mouseup",this._mouseUpHandler,!1),this._world.on("move",this._onWorldMove,this)}},{key:"_onMouseUp",value:function(e){if(0===e.button){var t=(0,u.point)(e.clientX,e.clientY),n=(0,u.point)(0,0);n.x=t.x/this._width*2-1,n.y=2*-(t.y/this._height)+1,this._pick(t,n)}}},{key:"_onWorldMove",value:function(){this._needUpdate=!0}},{key:"_resizeTexture",value:function(){var e=this._renderer.getSize();this._width=e.width,this._height=e.height,this._pickingTexture.setSize(this._width,this._height),this._pixelBuffer=new Uint8Array(4*this._width*this._height),this._needUpdate=!0}},{key:"_update",value:function(){if(this._needUpdate){var e=this._pickingTexture;this._renderer.render(this._pickingScene,this._camera,this._pickingTexture),this._renderer.readRenderTargetPixels(e,0,0,e.width,e.height,this._pixelBuffer),this._needUpdate=!1}}},{key:"_pick",value:function(e,t){this._update();var n=e.x+(this._pickingTexture.height-e.y)*this._pickingTexture.width,i=255*this._pixelBuffer[4*n+2]*255+255*this._pixelBuffer[4*n+1]+this._pixelBuffer[4*n+0];if(16646655!==i){this._raycaster.setFromCamera(t,this._camera);var r,o=this._raycaster.intersectObjects(this._pickingScene.children,!0),s=e.clone();o.length>0&&(r=o[0].point.clone()),this._world.emit("pick",i,s,r,o),this._world.emit("pick-"+i,s,r,o)}}},{key:"add",value:function(e){this._pickingScene.add(e),this._needUpdate=!0}},{key:"remove",value:function(e){this._pickingScene.remove(e),this._needUpdate=!0}},{key:"getNextId",value:function(){return f++}},{key:"destroy",value:function(){if(window.removeEventListener("resize",this._resizeHandler,!1),this._world._container.removeEventListener("mouseup",this._mouseUpHandler,!1),this._world.off("move",this._onWorldMove),this._pickingScene.children)for(var e,t=this._pickingScene.children.length-1;t>=0;t--)e=this._pickingScene.children[t],e&&(this._pickingScene.remove(e),e.material&&(e.material.map&&(e.material.map.dispose(),e.material.map=null),e.material.dispose(),e.material=null));this._pickingScene=null,this._pickingTexture=null,this._pixelBuffer=null,this._world=null,this._renderer=null,this._camera=null}}]),e}();t["default"]=function(e,t,n){return new h(e,t,n)},e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r);t["default"]=function(){var e=new o["default"].Scene;return e}(),e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=(i(r),n(37)),s=i(o);t["default"]=function(e,t){var n=new s["default"](e),i=function(){var e=window.devicePixelRatio;n.setSize(t.clientWidth*e,t.clientHeight*e)};return window.addEventListener("resize",i,!1),i(),n},e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=n(38),a=i(s),u=n(39),l=i(u),c=n(40),f=i(c),h=function(e,t){if(this.renderer=e,void 0===t){var n=e.getPixelRatio(),i=Math.floor(e.context.canvas.width/n)||1,r=Math.floor(e.context.canvas.height/n)||1,s={minFilter:o["default"].LinearFilter,magFilter:o["default"].LinearFilter,format:o["default"].RGBAFormat,stencilBuffer:!1};t=new o["default"].WebGLRenderTarget(i,r,s)}this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.passes=[],void 0===a["default"]&&console.error("EffectComposer relies on THREE.CopyShader"),this.copyPass=new l["default"](a["default"])};h.prototype={swapBuffers:function(){var e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e},addPass:function(e){this.passes.push(e)},insertPass:function(e,t){this.passes.splice(t,0,e)},render:function(e){this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2;var t,n,i=!1,r=this.passes.length;for(n=0;r>n;n++)if(t=this.passes[n],t.enabled){if(t.render(this.renderer,this.writeBuffer,this.readBuffer,e,i),t.needsSwap){if(i){var o=this.renderer.context;o.stencilFunc(o.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),o.stencilFunc(o.EQUAL,1,4294967295)}this.swapBuffers()}t instanceof f["default"]?i=!0:t instanceof c.ClearMaskPass&&(i=!1)}},reset:function(e){if(void 0===e){e=this.renderTarget1.clone();var t=this.renderer.getPixelRatio();e.setSize(Math.floor(this.renderer.context.canvas.width/t),Math.floor(this.renderer.context.canvas.height/t))}this.renderTarget1.dispose(),this.renderTarget1=e,this.renderTarget2.dispose(),this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2},setSize:function(e,t){this.renderTarget1.setSize(e,t),this.renderTarget2.setSize(e,t)}},t["default"]=h,o["default"].EffectComposer=h,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s={uniforms:{tDiffuse:{type:"t",value:null},opacity:{type:"f",value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","gl_FragColor = opacity * texel;","}"].join("\n")};t["default"]=s,o["default"].CopyShader=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=function(e,t){this.textureID=void 0!==t?t:"tDiffuse",e instanceof o["default"].ShaderMaterial?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=o["default"].UniformsUtils.clone(e.uniforms),this.material=new o["default"].ShaderMaterial({defines:e.defines||{},uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.renderToScreen=!1,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.camera=new o["default"].OrthographicCamera(-1,1,1,-1,0,1),this.scene=new o["default"].Scene,this.quad=new o["default"].Mesh(new o["default"].PlaneBufferGeometry(2,2),null),this.scene.add(this.quad)};s.prototype={render:function(e,t,n,i){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n),this.quad.material=this.material,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)}},t["default"]=s,o["default"].ShaderPass=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=function(e,t){this.scene=e,this.camera=t,this.enabled=!0,this.clear=!0,this.needsSwap=!1,this.inverse=!1};s.prototype={render:function(e,t,n,i){var r=e.context;r.colorMask(!1,!1,!1,!1),r.depthMask(!1);var o,s;this.inverse?(o=0,s=1):(o=1,s=0),r.enable(r.STENCIL_TEST),r.stencilOp(r.REPLACE,r.REPLACE,r.REPLACE),r.stencilFunc(r.ALWAYS,o,4294967295),r.clearStencil(s),e.render(this.scene,this.camera,n,this.clear),e.render(this.scene,this.camera,t,this.clear),r.colorMask(!0,!0,!0,!0),r.depthMask(!0),r.stencilFunc(r.EQUAL,1,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)}};var a=function(){this.enabled=!0};a.prototype={render:function(e,t,n,i){var r=e.context;r.disable(r.STENCIL_TEST)}},t["default"]=s,t.ClearMaskPass=a,o["default"].MaskPass=s,o["default"].ClearMaskPass=a},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=function(e,t,n,i,r){this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=i,this.clearAlpha=void 0!==r?r:1,this.oldClearColor=new o["default"].Color,this.oldClearAlpha=1,this.enabled=!0,this.clear=!0,this.needsSwap=!1};s.prototype={render:function(e,t,n,i){this.scene.overrideMaterial=this.overrideMaterial,this.clearColor&&(this.oldClearColor.copy(e.getClearColor()),this.oldClearAlpha=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),e.render(this.scene,this.camera,n,this.clear),this.clearColor&&e.setClearColor(this.oldClearColor,this.oldClearAlpha),this.scene.overrideMaterial=null}},t["default"]=s,o["default"].RenderPass=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s={uniforms:{tDiffuse:{type:"t",value:null},h:{type:"f",value:1/512},r:{type:"f",value:.35}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float h;","uniform float r;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","float hh = h * abs( r - vUv.y );","sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * hh, vUv.y ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * hh, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * hh, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * hh, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * hh, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * hh, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * hh, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * hh, vUv.y ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")};t["default"]=s,o["default"].HorizontalTiltShiftShader=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s={uniforms:{tDiffuse:{type:"t",value:null},v:{type:"f",value:1/512},r:{type:"f",value:.35}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float v;","uniform float r;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","float vv = v * abs( r - vUv.y );","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * vv ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * vv ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * vv ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * vv ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * vv ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * vv ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * vv ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * vv ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")};t["default"]=s,o["default"].VerticalTiltShiftShader=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s={uniforms:{tDiffuse:{type:"t",value:null},resolution:{type:"v2",value:new o["default"].Vector2(1/1024,1/512)}},vertexShader:["void main() {","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec2 resolution;","#define FXAA_REDUCE_MIN (1.0/128.0)","#define FXAA_REDUCE_MUL (1.0/8.0)","#define FXAA_SPAN_MAX 8.0","void main() {","vec3 rgbNW = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ).xyz;","vec3 rgbNE = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ).xyz;","vec3 rgbSW = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ).xyz;","vec3 rgbSE = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ).xyz;","vec4 rgbaM = texture2D( tDiffuse, gl_FragCoord.xy * resolution );","vec3 rgbM = rgbaM.xyz;","vec3 luma = vec3( 0.299, 0.587, 0.114 );","float lumaNW = dot( rgbNW, luma );","float lumaNE = dot( rgbNE, luma );","float lumaSW = dot( rgbSW, luma );","float lumaSE = dot( rgbSE, luma );","float lumaM = dot( rgbM, luma );","float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );","float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );","vec2 dir;","dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));","dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));","float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );","float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );","dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),","max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),","dir * rcpDirMin)) * resolution;","vec4 rgbA = (1.0/2.0) * (","texture2D(tDiffuse, gl_FragCoord.xy * resolution + dir * (1.0/3.0 - 0.5)) +","texture2D(tDiffuse, gl_FragCoord.xy * resolution + dir * (2.0/3.0 - 0.5)));","vec4 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * (","texture2D(tDiffuse, gl_FragCoord.xy * resolution + dir * (0.0/3.0 - 0.5)) +","texture2D(tDiffuse, gl_FragCoord.xy * resolution + dir * (3.0/3.0 - 0.5)));","float lumaB = dot(rgbB, vec4(luma, 0.0));","if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) ) {","gl_FragColor = rgbA;","} else {","gl_FragColor = rgbB;","}","}"].join("\n")};t["default"]=s,o["default"].FXAAShader=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(46),l=i(u),c=n(3),f=i(c),h=n(24),p=i(h),d=n(47),v=i(d),_=function(e){function t(e){r(this,t);var n={skybox:!1},i=(0,f["default"])({},n,e);a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,i)}return o(t,e),s(t,[{key:"_onAdd",value:function(){this._initLights(),this._options.skybox&&this._initSkybox()}},{key:"_initLights",value:function(){if(this._options.skybox){this._skyboxLight=new p["default"].DirectionalLight(16777215,1),this._skyboxLight.castShadow=!0;var e=1e3;this._skyboxLight.shadow.camera.left=-e,this._skyboxLight.shadow.camera.right=e,this._skyboxLight.shadow.camera.top=e,this._skyboxLight.shadow.camera.bottom=-e,this._skyboxLight.shadow.camera.near=1e4,this._skyboxLight.shadow.camera.far=7e4,this._skyboxLight.shadow.mapSize.width=2048,this._skyboxLight.shadow.mapSize.height=2048,this.add(this._skyboxLight)}else{var t=new p["default"].DirectionalLight(16777215,1);t.position.x=1e3,t.position.y=1e3,t.position.z=1e3;var n=new p["default"].DirectionalLight(16777215,.5);n.position.x=-1e3,n.position.y=1e3,n.position.z=-1e3,this.add(t),this.add(n)}}},{key:"_initSkybox",value:function(){this._skybox=new v["default"](this._world,this._skyboxLight),this.add(this._skybox._mesh)}},{key:"_initGrid",value:function(){var e=4e3,t=100,n=new p["default"].GridHelper(e,t);this.add(n)}},{key:"destroy",value:function(){this._skyboxLight=null,this.remove(this._skybox._mesh),this._skybox.destroy(),this._skybox=null,a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(l["default"]);t["default"]=_;var m=function(e){return new _(e)};t.environmentLayer=m},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(2),l=i(u),c=n(3),f=i(c),h=n(24),p=i(h),d=n(25),v=(i(d),n(30)),_=n(32),m=function(e){function t(e){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var n={output:!0,outputToScene:!0};this._options=(0,f["default"])({},n,e),this.isOutput()&&(this._object3D=new p["default"].Object3D,this._dom3D=document.createElement("div"),this._domObject3D=new v.CSS3DObject(this._dom3D),this._dom2D=document.createElement("div"),this._domObject2D=new _.CSS2DObject(this._dom2D))}return o(t,e),s(t,[{key:"add",value:function(e){this._object3D.add(e)}},{key:"remove",value:function(e){this._object3D.remove(e)}},{key:"addDOM3D",value:function(e){this._domObject3D.add(e)}},{key:"removeDOM3D",value:function(e){this._domObject3D.remove(e)}},{key:"addDOM2D",value:function(e){this._domObject2D.add(e)}},{key:"removeDOM2D",value:function(e){this._domObject2D.remove(e)}},{key:"addTo",value:function(e){return e.addLayer(this),this}},{key:"_addToWorld",value:function(e){this._world=e,this._onAdd(e),this.emit("added")}},{key:"_onAdd",value:function(e){}},{key:"getPickingId",value:function(){return this._world._engine._picking?this._world._engine._picking.getNextId():!1}},{key:"addToPicking",value:function(e){this._world._engine._picking&&this._world._engine._picking.add(e)}},{key:"removeFromPicking",value:function(e){this._world._engine._picking&&this._world._engine._picking.remove(e)}},{key:"isOutput",value:function(){return this._options.output}},{key:"isOutputToScene",value:function(){return this._options.outputToScene}},{key:"destroy",value:function(){if(this._object3D&&this._object3D.children)for(var e,t=this._object3D.children.length-1;t>=0;t--)e=this._object3D.children[t],e&&(this.remove(e),e.geometry&&(e.geometry.dispose(),e.geometry=null),e.material&&(e.material.map&&(e.material.map.dispose(),e.material.map=null),e.material.dispose(),e.material=null));if(this._domObject3D&&this._domObject3D.children)for(var e,t=this._domObject3D.children.length-1;t>=0;t--)e=this._domObject3D.children[t],e&&this.removeDOM3D(e);if(this._domObject2D&&this._domObject2D.children)for(var e,t=this._domObject2D.children.length-1;t>=0;t--)e=this._domObject2D.children[t],e&&this.removeDOM2D(e);this._domObject3D=null,this._domObject2D=null,this._world=null,this._object3D=null}}]),t}(l["default"]);t["default"]=m;var y=function(e){return new m(e)};t.layer=y},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(24),a=i(s),u=n(48),l=i(u),c=n(49),f=i(c),h={vertexShader:["varying vec3 vPosition;","void main() {","vPosition = position;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform samplerCube cubemap;","varying vec3 vPosition;","void main() {","gl_FragColor = textureCube(cubemap, normalize(vPosition));","}"].join("\n")},p=function(){function e(t,n){r(this,e),this._world=t,this._light=n,this._settings={distance:38e3,turbidity:10,reileigh:2,mieCoefficient:.005,mieDirectionalG:.8,luminance:1,inclination:.48,azimuth:.25},this._initSkybox(),this._updateUniforms(),this._initEvents()}return o(e,[{key:"_initEvents",value:function(){this._throttledWorldUpdate=(0,f["default"])(this._update,100),this._world.on("preUpdate",this._throttledWorldUpdate,this)}},{key:"_initSkybox",value:function(){this._cubeCamera=new a["default"].CubeCamera(1,2e6,128);var e=this._cubeCamera.renderTarget;this._sky=new l["default"],this._skyScene=new a["default"].Scene,this._skyScene.add(this._sky.mesh),this._sunSphere=new a["default"].Mesh(new a["default"].SphereBufferGeometry(2e3,16,8),new a["default"].MeshBasicMaterial({color:16777215}));var t={cubemap:{type:"t",value:e}},n=new a["default"].ShaderMaterial({uniforms:t,vertexShader:h.vertexShader,fragmentShader:h.fragmentShader,side:a["default"].BackSide});this._mesh=new a["default"].Mesh(new a["default"].BoxGeometry(19e4,19e4,19e4),n),this._updateSkybox=!0}},{key:"_updateUniforms",value:function(){var e=this._settings,t=this._sky.uniforms;t.turbidity.value=e.turbidity,t.reileigh.value=e.reileigh,t.luminance.value=e.luminance,t.mieCoefficient.value=e.mieCoefficient,t.mieDirectionalG.value=e.mieDirectionalG;var n=Math.PI*(e.inclination-.5),i=2*Math.PI*(e.azimuth-.5);this._sunSphere.position.x=e.distance*Math.cos(i),this._sunSphere.position.y=e.distance*Math.sin(i)*Math.sin(n),this._sunSphere.position.z=e.distance*Math.sin(i)*Math.cos(n),this._light.position.copy(this._sunSphere.position),this._sky.uniforms.sunPosition.value.copy(this._sunSphere.position)}},{key:"_update",value:function(e){this._updateSkybox&&(this._updateSkybox=!1,this._light.intensity=1-.95*(this._settings.inclination/.5),this._updateUniforms(),this._cubeCamera.updateCubeMap(this._world._engine._renderer,this._skyScene))}},{key:"getRenderTarget",value:function(){return this._cubeCamera.renderTarget}},{key:"setInclination",value:function(e){this._settings.inclination=e,this._updateSkybox=!0}},{key:"destroy",value:function(){this._world.off("preUpdate",this._throttledWorldUpdate),this._throttledWorldUpdate=null,this._world=null,this._light=null,this._cubeCamera=null,this._sky.mesh.geometry.dispose(),this._sky.mesh.geometry=null,this._sky.mesh.material.map&&(this._sky.mesh.material.map.dispose(),this._sky.mesh.material.map=null),this._sky.mesh.material.dispose(),this._sky.mesh.material=null,this._sky.mesh=null,this._sky=null,this._skyScene=null,this._sunSphere.geometry.dispose(),this._sunSphere.geometry=null,this._sunSphere.material.map&&(this._sunSphere.material.map.dispose(),this._sunSphere.material.map=null),this._sunSphere.material.dispose(),this._sunSphere.material=null,this._sunSphere=null,this._mesh.geometry.dispose(),this._mesh.geometry=null,this._mesh.material.map&&(this._mesh.material.map.dispose(),this._mesh.material.map=null),this._mesh.material.dispose(),this._mesh.material=null}}]),e}();t["default"]=p;var d=function(e,t){return new p(e,t)};t.skybox=d},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r);o["default"].ShaderLib.sky={uniforms:{luminance:{type:"f",value:1},turbidity:{type:"f",value:2},reileigh:{type:"f",value:1},mieCoefficient:{type:"f",value:.005},mieDirectionalG:{type:"f",value:.8},sunPosition:{type:"v3",value:new o["default"].Vector3}},vertexShader:["varying vec3 vWorldPosition;","void main() {","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vWorldPosition = worldPosition.xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D skySampler;","uniform vec3 sunPosition;","varying vec3 vWorldPosition;","vec3 cameraPos = vec3(0., 0., 0.);","// uniform sampler2D sDiffuse;","// const float turbidity = 10.0; //","// const float reileigh = 2.; //","// const float luminance = 1.0; //","// const float mieCoefficient = 0.005;","// const float mieDirectionalG = 0.8;","uniform float luminance;","uniform float turbidity;","uniform float reileigh;","uniform float mieCoefficient;","uniform float mieDirectionalG;","// constants for atmospheric scattering","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003; // refractive index of air","const float N = 2.545E25; // number of molecules per unit volume for air at","// 288.15K and 1013mb (sea level -45 celsius)","const float pn = 0.035; // depolatization factor for standard air","// wavelength of used primaries, according to preetham","const vec3 lambda = vec3(680E-9, 550E-9, 450E-9);","// mie stuff","// K coefficient for the primaries","const vec3 K = vec3(0.686, 0.678, 0.666);","const float v = 4.0;","// optical length at zenith for molecules","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const vec3 up = vec3(0.0, 1.0, 0.0);","const float EE = 1000.0;","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","// 66 arc seconds -> degrees, and the cosine of that","// earth shadow hack","const float cutoffAngle = pi/1.95;","const float steepness = 1.5;","vec3 totalRayleigh(vec3 lambda)","{","return (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn));","}","// A simplied version of the total Reayleigh scattering to works on browsers that use ANGLE","vec3 simplifiedRayleigh()","{","return 0.0005 / vec3(94, 40, 18);","}","float rayleighPhase(float cosTheta)","{ ","return (3.0 / (16.0*pi)) * (1.0 + pow(cosTheta, 2.0));","// return (1.0 / (3.0*pi)) * (1.0 + pow(cosTheta, 2.0));","// return (3.0 / 4.0) * (1.0 + pow(cosTheta, 2.0));","}","vec3 totalMie(vec3 lambda, vec3 K, float T)","{","float c = (0.2 * T ) * 10E-18;","return 0.434 * c * pi * pow((2.0 * pi) / lambda, vec3(v - 2.0)) * K;","}","float hgPhase(float cosTheta, float g)","{","return (1.0 / (4.0*pi)) * ((1.0 - pow(g, 2.0)) / pow(1.0 - 2.0*g*cosTheta + pow(g, 2.0), 1.5));","}","float sunIntensity(float zenithAngleCos)","{","return EE * max(0.0, 1.0 - exp(-((cutoffAngle - acos(zenithAngleCos))/steepness)));","}","// float logLuminance(vec3 c)","// {","// return log(c.r * 0.2126 + c.g * 0.7152 + c.b * 0.0722);","// }","// Filmic ToneMapping http://filmicgames.com/archives/75","float A = 0.15;","float B = 0.50;","float C = 0.10;","float D = 0.20;","float E = 0.02;","float F = 0.30;","float W = 1000.0;","vec3 Uncharted2Tonemap(vec3 x)","{","return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;","}","void main() ","{","float sunfade = 1.0-clamp(1.0-exp((sunPosition.y/450000.0)),0.0,1.0);","// luminance = 1.0 ;// vWorldPosition.y / 450000. + 0.5; //sunPosition.y / 450000. * 1. + 0.5;","// gl_FragColor = vec4(sunfade, sunfade, sunfade, 1.0);","float reileighCoefficient = reileigh - (1.0* (1.0-sunfade));","vec3 sunDirection = normalize(sunPosition);","float sunE = sunIntensity(dot(sunDirection, up));","// extinction (absorbtion + out scattering) ","// rayleigh coefficients","vec3 betaR = simplifiedRayleigh() * reileighCoefficient;","// mie coefficients","vec3 betaM = totalMie(lambda, K, turbidity) * mieCoefficient;","// optical length","// cutoff angle at 90 to avoid singularity in next formula.","float zenithAngle = acos(max(0.0, dot(up, normalize(vWorldPosition - cameraPos))));","float sR = rayleighZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","float sM = mieZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","// combined extinction factor ","vec3 Fex = exp(-(betaR * sR + betaM * sM));","// in scattering","float cosTheta = dot(normalize(vWorldPosition - cameraPos), sunDirection);","float rPhase = rayleighPhase(cosTheta*0.5+0.5);","vec3 betaRTheta = betaR * rPhase;","float mPhase = hgPhase(cosTheta, mieDirectionalG);","vec3 betaMTheta = betaM * mPhase;","vec3 Lin = pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * (1.0 - Fex),vec3(1.5));","Lin *= mix(vec3(1.0),pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * Fex,vec3(1.0/2.0)),clamp(pow(1.0-dot(up, sunDirection),5.0),0.0,1.0));","//nightsky","vec3 direction = normalize(vWorldPosition - cameraPos);","float theta = acos(direction.y); // elevation --> y-axis, [-pi/2, pi/2]","float phi = atan(direction.z, direction.x); // azimuth --> x-axis [-pi/2, pi/2]","vec2 uv = vec2(phi, theta) / vec2(2.0*pi, pi) + vec2(0.5, 0.0);","// vec3 L0 = texture2D(skySampler, uv).rgb+0.1 * Fex;","vec3 L0 = vec3(0.1) * Fex;","// composition + solar disc","//if (cosTheta > sunAngularDiameterCos)","float sundisk = smoothstep(sunAngularDiameterCos,sunAngularDiameterCos+0.00002,cosTheta);","// if (normalize(vWorldPosition - cameraPos).y>0.0)","L0 += (sunE * 19000.0 * Fex)*sundisk;","vec3 whiteScale = 1.0/Uncharted2Tonemap(vec3(W));","vec3 texColor = (Lin+L0); ","texColor *= 0.04 ;","texColor += vec3(0.0,0.001,0.0025)*0.3;","float g_fMaxLuminance = 1.0;","float fLumScaled = 0.1 / luminance; ","float fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (g_fMaxLuminance * g_fMaxLuminance)))) / (1.0 + fLumScaled); ","float ExposureBias = fLumCompressed;","vec3 curr = Uncharted2Tonemap((log2(2.0/pow(luminance,4.0)))*texColor);","vec3 color = curr*whiteScale;","vec3 retColor = pow(color,vec3(1.0/(1.2+(1.2*sunfade))));","gl_FragColor.rgb = retColor;","gl_FragColor.a = 1.0;","}"].join("\n")
};var s=function(){var e=o["default"].ShaderLib.sky,t=o["default"].UniformsUtils.clone(e.uniforms),n=new o["default"].ShaderMaterial({fragmentShader:e.fragmentShader,vertexShader:e.vertexShader,uniforms:t,side:o["default"].BackSide}),i=new o["default"].SphereBufferGeometry(45e4,32,15),r=new o["default"].Mesh(i,n);this.mesh=r,this.uniforms=t};t["default"]=s,e.exports=t["default"]},function(e,t,n){function i(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(s);return r(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),o(e,t,{leading:i,maxWait:t,trailing:a})}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var o=n(50),s="Expected a function";e.exports=i},function(e,t){function n(e,t,n){function i(){g&&clearTimeout(g),p&&clearTimeout(p),w=0,h=p=_=g=b=void 0}function a(t,n){n&&clearTimeout(n),p=g=b=void 0,t&&(w=y(),d=e.apply(_,h),g||p||(h=_=void 0))}function u(){var e=t-(y()-v);0>=e||e>t?a(b,p):g=setTimeout(u,e)}function l(){return(g&&b||p&&M)&&(d=e.apply(_,h)),i(),d}function c(){a(M,g)}function f(){if(h=arguments,v=y(),_=this,b=M&&(g||!x),T===!1)var n=x&&!g;else{p||x||(w=v);var i=T-(v-w),r=0>=i||i>T;r?(p&&(p=clearTimeout(p)),w=v,d=e.apply(_,h)):p||(p=setTimeout(c,i))}return r&&g?g=clearTimeout(g):g||t===T||(g=setTimeout(u,t)),n&&(r=!0,d=e.apply(_,h)),!r||g||p||(h=_=void 0),d}var h,p,d,v,_,g,b,w=0,x=!1,T=!1,M=!0;if("function"!=typeof e)throw new TypeError(s);return t=o(t)||0,r(n)&&(x=!!n.leading,T="maxWait"in n&&m(o(n.maxWait)||0,t),M="trailing"in n?!!n.trailing:M),f.cancel=i,f.flush=l,f}function i(e){var t=r(e)?_.call(e):"";return t==u||t==l}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){if(r(e)){var t=i(e.valueOf)?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=h.test(e);return n||p.test(e)?d(e.slice(2),n?2:8):f.test(e)?a:+e}var s="Expected a function",a=NaN,u="[object Function]",l="[object GeneratorFunction]",c=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,p=/^0o[0-7]+$/i,d=parseInt,v=Object.prototype,_=v.toString,m=Math.max,y=Date.now;e.exports=n},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(52),o=i(r),s={Orbit:o["default"],orbit:r.orbit,orbit:r.orbit};t["default"]=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(2),l=i(u),c=n(24),f=i(c),h=n(53),p=i(h),d=n(55),v=i(d);v["default"].lagSmoothing(0);var _=function(e){function t(){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this)}return o(t,e),s(t,[{key:"_initEvents",value:function(){var e=this;this._controls.addEventListener("start",function(t){e._world.emit("controlsMoveStart",t.target.target)}),this._controls.addEventListener("change",function(t){e._world.emit("controlsMove",t.target.target)}),this._controls.addEventListener("end",function(t){e._world.emit("controlsMoveEnd",t.target.target)})}},{key:"panTo",value:function(e,t){}},{key:"panBy",value:function(e,t){}},{key:"zoomTo",value:function(e,t){}},{key:"zoomBy",value:function(e,t){}},{key:"lookAt",value:function(e,t){}},{key:"lookAtTarget",value:function(){}},{key:"tiltTo",value:function(e,t){}},{key:"tiltBy",value:function(e,t){}},{key:"rotateTo",value:function(e,t){}},{key:"rotateBy",value:function(e,t){}},{key:"flyToPoint",value:function(e,t,n){var i=t||3;this._flyTarget=new f["default"].Vector3(e.x,0,e.y);var r=(new f["default"].Vector3).subVectors(this._controls.target,this._flyTarget);this._flyTween=new v["default"]({x:0,z:0,prev:{x:0,z:0}},i,{x:r.x,z:r.z,onUpdate:function(e){var t=this._controls,n=e.target.x-e.target.prev.x,i=e.target.z-e.target.prev.z;t.panLeft(n,t.object.matrix),t.panUp(i,t.object.matrix),e.target.prev.x=e.target.x,e.target.prev.z=e.target.z},onComplete:function(e){console.log("Arrived at flyTarget"),this._flyTarget=null},onUpdateParams:["{self}"],onCompleteParams:["{self}"],callbackScope:this,ease:Power1.easeInOut})}},{key:"flyToLatLon",value:function(e,t,n){var i=this._world.latLonToPoint(e);this.flyToPoint(i,t,n)}},{key:"update",value:function(e){this._controls.update(e)}},{key:"addTo",value:function(e){return e.addControls(this),this}},{key:"_addToWorld",value:function(e){this._world=e,this._controls=new p["default"](e._engine._camera,e._container),this._controls.keys=!1,this._controls.maxPolarAngle=1.5533,this._initEvents(),this.emit("added")}},{key:"destroy",value:function(){this._controls.dispose(),this._world=null,this._controls=null}}]),t}(l["default"]);t["default"]=_;var m=function(){return new _};t.orbit=m},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=n(54),a=i(s),u=function(e,t){function n(){return 2*Math.PI/60/60*B.autoRotateSpeed}function i(){return Math.pow(.95,B.zoomSpeed)}function r(e){V-=e}function s(e){q-=e}function u(e){B.object instanceof o["default"].PerspectiveCamera?G/=e:B.object instanceof o["default"].OrthographicCamera?(B.object.zoom=Math.max(B.minZoom,Math.min(B.maxZoom,B.object.zoom*e)),B.object.updateProjectionMatrix(),Z=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),B.enableZoom=!1)}function l(e){B.object instanceof o["default"].PerspectiveCamera?G*=e:B.object instanceof o["default"].OrthographicCamera?(B.object.zoom=Math.max(B.minZoom,Math.min(B.maxZoom,B.object.zoom/e)),B.object.updateProjectionMatrix(),Z=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),B.enableZoom=!1)}function c(e){Y.set(e.clientX,e.clientY)}function f(e){te.set(e.clientX,e.clientY)}function h(e){Q.set(e.clientX,e.clientY)}function p(e){K.set(e.clientX,e.clientY),J.subVectors(K,Y);var t=B.domElement===document?B.domElement.body:B.domElement;r(2*Math.PI*J.x/t.clientWidth*B.rotateSpeed),s(2*Math.PI*J.y/t.clientHeight*B.rotateSpeed),Y.copy(K),B.update()}function d(e){ne.set(e.clientX,e.clientY),ie.subVectors(ne,te),ie.y>0?u(i()):ie.y<0&&l(i()),te.copy(ne),B.update()}function v(e){$.set(e.clientX,e.clientY),ee.subVectors($,Q),se(ee.x,ee.y),Q.copy($),B.update()}function _(e){}function m(e){var t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),t>0?l(i()):0>t&&u(i()),B.update()}function y(e){switch(e.keyCode){case B.keys.UP:se(0,B.keyPanSpeed),B.update();break;case B.keys.BOTTOM:se(0,-B.keyPanSpeed),B.update();break;case B.keys.LEFT:se(B.keyPanSpeed,0),B.update();break;case B.keys.RIGHT:se(-B.keyPanSpeed,0),B.update()}}function g(e){Y.set(e.pointers[0].pageX,e.pointers[0].pageY)}function b(e){var t=e.pointers[0].pageX-e.pointers[1].pageX,n=e.pointers[0].pageY-e.pointers[1].pageY,i=Math.sqrt(t*t+n*n);te.set(0,i)}function w(e){Q.set(e.deltaX,e.deltaY)}function x(e){K.set(e.pointers[0].pageX,e.pointers[0].pageY),J.subVectors(K,Y);var t=B.domElement===document?B.domElement.body:B.domElement;r(2*Math.PI*J.x/t.clientWidth*B.rotateSpeed),s(2*Math.PI*J.y/t.clientHeight*B.rotateSpeed),Y.copy(K),B.update()}function T(e){var t=e.pointers[0].pageX-e.pointers[1].pageX,n=e.pointers[0].pageY-e.pointers[1].pageY,r=Math.sqrt(t*t+n*n);ne.set(0,r),ie.subVectors(ne,te),ie.y>0?l(i()):ie.y<0&&u(i()),te.copy(ne),B.update()}function M(e){$.set(e.deltaX,e.deltaY),ee.subVectors($,Q),se(ee.x,ee.y),Q.copy($),B.update()}function P(e){}function k(e){if(B.enabled!==!1){if(e.preventDefault(),e.button===B.mouseButtons.ORBIT){if(B.enableRotate===!1)return;c(e),H=U.ROTATE}else if(e.button===B.mouseButtons.ZOOM){if(B.enableZoom===!1)return;f(e),H=U.DOLLY}else if(e.button===B.mouseButtons.PAN){if(B.enablePan===!1)return;h(e),H=U.PAN}H!==U.NONE&&(document.addEventListener("mousemove",E,!1),document.addEventListener("mouseup",O,!1),document.addEventListener("mouseout",O,!1),B.dispatchEvent(z))}}function E(e){if(B.enabled!==!1)if(e.preventDefault(),H===U.ROTATE){if(B.enableRotate===!1)return;p(e)}else if(H===U.DOLLY){if(B.enableZoom===!1)return;d(e)}else if(H===U.PAN){if(B.enablePan===!1)return;v(e)}}function O(e){B.enabled!==!1&&(_(e),document.removeEventListener("mousemove",E,!1),document.removeEventListener("mouseup",O,!1),document.removeEventListener("mouseout",O,!1),B.dispatchEvent(N),H=U.NONE)}function S(e){B.enabled!==!1&&B.enableZoom!==!1&&H===U.NONE&&(e.preventDefault(),e.stopPropagation(),m(e),B.dispatchEvent(z),B.dispatchEvent(N))}function j(e){B.enabled!==!1&&B.enableKeys!==!1&&B.enablePan!==!1&&y(e)}function A(e){if(B.enabled!==!1){switch(e.touches.length){case 1:if(B.enableRotate===!1)return;g(e),H=U.TOUCH_ROTATE;break;case 2:if(B.enableZoom===!1)return;b(e),H=U.TOUCH_DOLLY;break;case 3:if(B.enablePan===!1)return;w(e),H=U.TOUCH_PAN;break;default:H=U.NONE}H!==U.NONE&&B.dispatchEvent(z)}}function C(e){if(B.enabled!==!1)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(B.enableRotate===!1)return;if(H!==U.TOUCH_ROTATE)return;x(e);break;case 2:if(B.enableZoom===!1)return;if(H!==U.TOUCH_DOLLY)return;T(e);break;case 3:if(B.enablePan===!1)return;if(H!==U.TOUCH_PAN)return;M(e);break;default:H=U.NONE}}function D(e){B.enabled!==!1&&(P(e),B.dispatchEvent(N),H=U.NONE)}function L(e){e.preventDefault()}this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new o["default"].Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-(1/0),this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:o["default"].MOUSE.LEFT,ZOOM:o["default"].MOUSE.MIDDLE,PAN:o["default"].MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return I},this.getAzimuthalAngle=function(){return R},this.reset=function(){B.target.copy(B.target0),B.object.position.copy(B.position0),B.object.zoom=B.zoom0,B.object.updateProjectionMatrix(),B.dispatchEvent(F),B.update(),H=U.NONE},this.update=function(){var t=new o["default"].Vector3,i=(new o["default"].Quaternion).setFromUnitVectors(e.up,new o["default"].Vector3(0,1,0)),s=i.clone().inverse(),a=new o["default"].Vector3,u=new o["default"].Quaternion;return function(){var e=B.object.position;t.copy(e).sub(B.target),t.applyQuaternion(i),R=Math.atan2(t.x,t.z),I=Math.atan2(Math.sqrt(t.x*t.x+t.z*t.z),t.y),B.autoRotate&&H===U.NONE&&r(n()),R+=V,I+=q,R=Math.max(B.minAzimuthAngle,Math.min(B.maxAzimuthAngle,R)),I=Math.max(B.minPolarAngle,Math.min(B.maxPolarAngle,I)),I=Math.max(W,Math.min(Math.PI-W,I));var o=t.length()*G;return o=Math.max(B.minDistance,Math.min(B.maxDistance,o)),B.target.add(X),t.x=o*Math.sin(I)*Math.sin(R),t.y=o*Math.cos(I),t.z=o*Math.sin(I)*Math.cos(R),t.applyQuaternion(s),e.copy(B.target).add(t),B.object.lookAt(B.target),B.enableDamping===!0?(V*=1-B.dampingFactor,q*=1-B.dampingFactor):(V=0,q=0),G=1,X.set(0,0,0),Z||a.distanceToSquared(B.object.position)>W||8*(1-u.dot(B.object.quaternion))>W?(B.dispatchEvent(F),a.copy(B.object.position),u.copy(B.object.quaternion),Z=!1,!0):!1}}(),this.dispose=function(){B.domElement.removeEventListener("contextmenu",L,!1),B.domElement.removeEventListener("mousedown",k,!1),B.domElement.removeEventListener("mousewheel",S,!1),B.domElement.removeEventListener("MozMousePixelScroll",S,!1),B.domElement.removeEventListener("touchstart",A,!1),B.domElement.removeEventListener("touchend",D,!1),B.domElement.removeEventListener("touchmove",C,!1),document.removeEventListener("mousemove",E,!1),document.removeEventListener("mouseup",O,!1),document.removeEventListener("mouseout",O,!1),window.removeEventListener("keydown",j,!1)};var R,I,B=this,F={type:"change"},z={type:"start"},N={type:"end"},U={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},H=U.NONE,W=1e-6,q=0,V=0,G=1,X=new o["default"].Vector3,Z=!1,Y=new o["default"].Vector2,K=new o["default"].Vector2,J=new o["default"].Vector2,Q=new o["default"].Vector2,$=new o["default"].Vector2,ee=new o["default"].Vector2,te=new o["default"].Vector2,ne=new o["default"].Vector2,ie=new o["default"].Vector2,re=function(){var e=new o["default"].Vector3;return function(t,n){var i=n.elements;e.set(i[0],0,i[2]),e.multiplyScalar(-t),X.add(e)}}(),oe=function(){var e=new o["default"].Vector3;return function(t,n){var i=n.elements,r=t/Math.cos(I);e.set(i[4],0,i[6]),e.multiplyScalar(r),X.add(e)}}(),se=function(){var e=new o["default"].Vector3;return function(t,n){var i=B.domElement===document?B.domElement.body:B.domElement;if(B.object instanceof o["default"].PerspectiveCamera){var r=B.object.position;e.copy(r).sub(B.target);var s=e.length();s*=Math.tan(B.object.fov/2*Math.PI/180),re(2*t*s/i.clientHeight,B.object.matrix),oe(2*n*s/i.clientHeight,B.object.matrix)}else B.object instanceof o["default"].OrthographicCamera?(re(t*(B.object.right-B.object.left)/i.clientWidth,B.object.matrix),oe(n*(B.object.top-B.object.bottom)/i.clientHeight,B.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),B.enablePan=!1)}}();B.domElement.addEventListener("contextmenu",L,!1),B.domElement.addEventListener("mousedown",k,!1),B.domElement.addEventListener("mousewheel",S,!1),B.domElement.addEventListener("MozMousePixelScroll",S,!1),B.hammer=new a["default"](B.domElement),B.hammer.get("pan").set({pointers:0,direction:a["default"].DIRECTION_ALL}),B.hammer.get("pinch").set({enable:!0,threshold:.1}),B.hammer.on("panstart",function(e){if(B.enabled!==!1&&"mouse"!==e.pointerType){if(1===e.pointers.length){if(B.enablePan===!1)return;w(e),H=U.TOUCH_PAN}else if(2===e.pointers.length){if(B.enableRotate===!1)return;g(e),H=U.TOUCH_ROTATE}H!==U.NONE&&B.dispatchEvent(z)}}),B.hammer.on("panend",function(e){"mouse"!==e.pointerType&&D(e)}),B.hammer.on("panmove",function(e){if(B.enabled!==!1&&"mouse"!==e.pointerType)if(1===e.pointers.length){if(B.enablePan===!1)return;if(H!==U.TOUCH_PAN)return;M(e)}else if(2===e.pointers.length){if(B.enableRotate===!1)return;if(H!==U.TOUCH_ROTATE)return;x(e)}}),B.hammer.on("pinchstart",function(e){B.enabled!==!1&&"mouse"!==e.pointerType&&B.enableZoom!==!1&&(b(e),H=U.TOUCH_DOLLY,H!==U.NONE&&B.dispatchEvent(z))}),B.hammer.on("pinchend",function(e){"mouse"!==e.pointerType&&D(e)}),B.hammer.on("pinchmove",function(e){B.enabled!==!1&&"mouse"!==e.pointerType&&B.enableZoom!==!1&&H===U.TOUCH_DOLLY&&T(e)}),window.addEventListener("keydown",j,!1),this.panLeft=re,this.panUp=oe,this.pan=se,this.dollyIn=u,this.dollyOut=l,this.getZoomScale=i,this.rotateLeft=r,this.rotateUp=s,this.update()};u.prototype=Object.create(o["default"].EventDispatcher.prototype),u.prototype.constructor=o["default"].OrbitControls,Object.defineProperties(u.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.constraint.enableDamping},set:function(e){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.constraint.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.constraint.dampingFactor},set:function(e){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.constraint.dampingFactor=e}}}),t["default"]=u,e.exports=t["default"]},function(e,t,n){var i;!function(r,o,s,a){"use strict";function u(e,t,n){return setTimeout(p(e,n),t)}function l(e,t,n){return Array.isArray(e)?(c(e,n[t],n),!0):!1}function c(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==a)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function f(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),e.apply(this,arguments)}}function h(e,t,n){var i,r=t.prototype;i=e.prototype=Object.create(r),i.constructor=e,i._super=r,n&&fe(i,n)}function p(e,t){return function(){return e.apply(t,arguments)}}function d(e,t){return typeof e==de?e.apply(t?t[0]||a:a,t):e}function v(e,t){return e===a?t:e}function _(e,t,n){c(b(t),function(t){e.addEventListener(t,n,!1)})}function m(e,t,n){c(b(t),function(t){e.removeEventListener(t,n,!1)})}function y(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function g(e,t){return e.indexOf(t)>-1}function b(e){return e.trim().split(/\s+/g)}function w(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function x(e){return Array.prototype.slice.call(e,0)}function T(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var s=t?e[o][t]:e[o];w(r,s)<0&&i.push(e[o]),r[o]=s,o++}return n&&(i=t?i.sort(function(e,n){return e[t]>n[t]}):i.sort()),i}function M(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o<he.length;){if(n=he[o],i=n?n+r:t,i in e)return i;o++}return a}function P(){return be++}function k(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||r}function E(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){d(e.options.enable,[e])&&n.handler(t)},this.init()}function O(e){var t,n=e.options.inputClass;return new(t=n?n:Te?H:Me?V:xe?X:U)(e,S)}function S(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&je&&i-r===0,s=t&(Ce|De)&&i-r===0;n.isFirst=!!o,n.isFinal=!!s,o&&(e.session={}),n.eventType=t,j(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function j(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=D(t)),r>1&&!n.firstMultiple?n.firstMultiple=D(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,a=s?s.center:o.center,u=t.center=L(i);t.timeStamp=me(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=F(a,u),t.distance=B(a,u),A(n,t),t.offsetDirection=I(t.deltaX,t.deltaY);var l=R(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=_e(l.x)>_e(l.y)?l.x:l.y,t.scale=s?N(s.pointers,i):1,t.rotation=s?z(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,C(n,t);var c=e.element;y(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}function A(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};(t.eventType===je||o.eventType===Ce)&&(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}function C(e,t){var n,i,r,o,s=e.lastInterval||t,u=t.timeStamp-s.timeStamp;if(t.eventType!=De&&(u>Se||s.velocity===a)){var l=t.deltaX-s.deltaX,c=t.deltaY-s.deltaY,f=R(u,l,c);i=f.x,r=f.y,n=_e(f.x)>_e(f.y)?f.x:f.y,o=I(l,c),e.lastInterval=t}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}function D(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:ve(e.pointers[n].clientX),clientY:ve(e.pointers[n].clientY)},n++;return{timeStamp:me(),pointers:t,center:L(t),deltaX:e.deltaX,deltaY:e.deltaY}}function L(e){var t=e.length;if(1===t)return{x:ve(e[0].clientX),y:ve(e[0].clientY)};for(var n=0,i=0,r=0;t>r;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:ve(n/t),y:ve(i/t)}}function R(e,t,n){return{x:t/e||0,y:n/e||0}}function I(e,t){return e===t?Le:_e(e)>=_e(t)?0>e?Re:Ie:0>t?Be:Fe}function B(e,t,n){n||(n=He);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function F(e,t,n){n||(n=He);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}function z(e,t){return F(t[1],t[0],We)+F(e[1],e[0],We)}function N(e,t){return B(t[0],t[1],We)/B(e[0],e[1],We)}function U(){this.evEl=Ve,this.evWin=Ge,this.allow=!0,this.pressed=!1,E.apply(this,arguments)}function H(){this.evEl=Ye,this.evWin=Ke,E.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function W(){this.evTarget=Qe,this.evWin=$e,this.started=!1,E.apply(this,arguments)}function q(e,t){var n=x(e.touches),i=x(e.changedTouches);return t&(Ce|De)&&(n=T(n.concat(i),"identifier",!0)),[n,i]}function V(){this.evTarget=tt,this.targetIds={},E.apply(this,arguments)}function G(e,t){var n=x(e.touches),i=this.targetIds;if(t&(je|Ae)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=x(e.changedTouches),a=[],u=this.target;if(o=n.filter(function(e){return y(e.target,u)}),t===je)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),t&(Ce|De)&&delete i[s[r].identifier],r++;return a.length?[T(o.concat(a),"identifier",!0),a]:void 0}function X(){E.apply(this,arguments);var e=p(this.handler,this);this.touch=new V(this.manager,e),this.mouse=new U(this.manager,e)}function Z(e,t){this.manager=e,this.set(t)}function Y(e){if(g(e,at))return at;var t=g(e,ut),n=g(e,lt);return t&&n?at:t||n?t?ut:lt:g(e,st)?st:ot}function K(e){this.options=fe({},this.defaults,e||{}),this.id=P(),this.manager=null,this.options.enable=v(this.options.enable,!0),this.state=ct,this.simultaneous={},this.requireFail=[]}function J(e){return e&vt?"cancel":e&pt?"end":e&ht?"move":e&ft?"start":""}function Q(e){return e==Fe?"down":e==Be?"up":e==Re?"left":e==Ie?"right":""}function $(e,t){var n=t.manager;return n?n.get(e):e}function ee(){K.apply(this,arguments)}function te(){ee.apply(this,arguments),this.pX=null,this.pY=null}function ne(){ee.apply(this,arguments)}function ie(){K.apply(this,arguments),this._timer=null,this._input=null}function re(){ee.apply(this,arguments)}function oe(){ee.apply(this,arguments)}function se(){K.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ae(e,t){return t=t||{},t.recognizers=v(t.recognizers,ae.defaults.preset),new ue(e,t)}function ue(e,t){this.options=fe({},ae.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.element=e,this.input=O(this),this.touchAction=new Z(this,this.options.touchAction),le(this,!0),c(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function le(e,t){var n=e.element;n.style&&c(e.options.cssProps,function(e,i){n.style[M(n.style,i)]=t?e:""})}function ce(e,t){var n=o.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var fe,he=["","webkit","Moz","MS","ms","o"],pe=o.createElement("div"),de="function",ve=Math.round,_e=Math.abs,me=Date.now;fe="function"!=typeof Object.assign?function(e){if(e===a||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var ye=f(function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&e[i[r]]===a)&&(e[i[r]]=t[i[r]]),r++;return e},"extend","Use `assign`."),ge=f(function(e,t){return ye(e,t,!0)},"merge","Use `assign`."),be=1,we=/mobile|tablet|ip(ad|hone|od)|android/i,xe="ontouchstart"in r,Te=M(r,"PointerEvent")!==a,Me=xe&&we.test(navigator.userAgent),Pe="touch",ke="pen",Ee="mouse",Oe="kinect",Se=25,je=1,Ae=2,Ce=4,De=8,Le=1,Re=2,Ie=4,Be=8,Fe=16,ze=Re|Ie,Ne=Be|Fe,Ue=ze|Ne,He=["x","y"],We=["clientX","clientY"];E.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(k(this.element),this.evWin,this.domHandler)}};var qe={mousedown:je,mousemove:Ae,mouseup:Ce},Ve="mousedown",Ge="mousemove mouseup";h(U,E,{handler:function(e){var t=qe[e.type];t&je&&0===e.button&&(this.pressed=!0),t&Ae&&1!==e.which&&(t=Ce),this.pressed&&this.allow&&(t&Ce&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Ee,srcEvent:e}))}});var Xe={pointerdown:je,pointermove:Ae,pointerup:Ce,pointercancel:De,pointerout:De},Ze={2:Pe,3:ke,4:Ee,5:Oe},Ye="pointerdown",Ke="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(Ye="MSPointerDown",Ke="MSPointerMove MSPointerUp MSPointerCancel"),h(H,E,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=Xe[i],o=Ze[e.pointerType]||e.pointerType,s=o==Pe,a=w(t,e.pointerId,"pointerId");r&je&&(0===e.button||s)?0>a&&(t.push(e),a=t.length-1):r&(Ce|De)&&(n=!0),0>a||(t[a]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(a,1))}});var Je={touchstart:je,touchmove:Ae,touchend:Ce,touchcancel:De},Qe="touchstart",$e="touchstart touchmove touchend touchcancel";h(W,E,{handler:function(e){var t=Je[e.type];if(t===je&&(this.started=!0),this.started){var n=q.call(this,e,t);t&(Ce|De)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Pe,srcEvent:e})}}});var et={touchstart:je,touchmove:Ae,touchend:Ce,touchcancel:De},tt="touchstart touchmove touchend touchcancel";h(V,E,{handler:function(e){var t=et[e.type],n=G.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Pe,srcEvent:e})}}),h(X,E,{handler:function(e,t,n){var i=n.pointerType==Pe,r=n.pointerType==Ee;if(i)this.mouse.allow=!1;else if(r&&!this.mouse.allow)return;t&(Ce|De)&&(this.mouse.allow=!0),this.callback(e,t,n)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var nt=M(pe.style,"touchAction"),it=nt!==a,rt="compute",ot="auto",st="manipulation",at="none",ut="pan-x",lt="pan-y";Z.prototype={set:function(e){e==rt&&(e=this.compute()),it&&this.manager.element.style&&(this.manager.element.style[nt]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return c(this.manager.recognizers,function(t){d(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),Y(e.join(" "))},preventDefaults:function(e){if(!it){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)return void t.preventDefault();var i=this.actions,r=g(i,at),o=g(i,lt),s=g(i,ut);if(r){var a=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(a&&u&&l)return}if(!s||!o)return r||o&&n&ze||s&&n&Ne?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var ct=1,ft=2,ht=4,pt=8,dt=pt,vt=16,_t=32;K.prototype={defaults:{},set:function(e){return fe(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(l(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=$(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return l(e,"dropRecognizeWith",this)?this:(e=$(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(l(e,"requireFailure",this))return this;var t=this.requireFail;return e=$(e,this),-1===w(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(l(e,"dropRequireFailure",this))return this;e=$(e,this);var t=w(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,i=this.state;pt>i&&t(n.options.event+J(i)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),i>=pt&&t(n.options.event+J(i))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=_t)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(_t|ct)))return!1;e++}return!0},recognize:function(e){var t=fe({},e);return d(this.options.enable,[this,t])?(this.state&(dt|vt|_t)&&(this.state=ct),this.state=this.process(t),void(this.state&(ft|ht|pt|vt)&&this.tryEmit(t))):(this.reset(),void(this.state=_t))},process:function(e){},getTouchAction:function(){},reset:function(){}},h(ee,K,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=t&(ft|ht),r=this.attrTest(e);return i&&(n&De||!r)?t|vt:i||r?n&Ce?t|pt:t&ft?t|ht:ft:_t}}),h(te,ee,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ue},getTouchAction:function(){var e=this.options.direction,t=[];return e&ze&&t.push(lt),e&Ne&&t.push(ut),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,s=e.deltaY;return r&t.direction||(t.direction&ze?(r=0===o?Le:0>o?Re:Ie,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===s?Le:0>s?Be:Fe,n=s!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return ee.prototype.attrTest.call(this,e)&&(this.state&ft||!(this.state&ft)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Q(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),h(ne,ee,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[at]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&ft)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";
e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),h(ie,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ot]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||e.eventType&(Ce|De)&&!r)this.reset();else if(e.eventType&je)this.reset(),this._timer=u(function(){this.state=dt,this.tryEmit()},t.time,this);else if(e.eventType&Ce)return dt;return _t},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===dt&&(e&&e.eventType&Ce?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=me(),this.manager.emit(this.options.event,this._input)))}}),h(re,ee,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[at]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&ft)}}),h(oe,ee,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:ze|Ne,pointers:1},getTouchAction:function(){return te.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(ze|Ne)?t=e.overallVelocity:n&ze?t=e.overallVelocityX:n&Ne&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&_e(t)>this.options.velocity&&e.eventType&Ce},emit:function(e){var t=Q(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),h(se,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[st]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),e.eventType&je&&0===this.count)return this.failTimeout();if(i&&r&&n){if(e.eventType!=Ce)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<t.interval:!0,s=!this.pCenter||B(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e;var a=this.count%t.taps;if(0===a)return this.hasRequireFailures()?(this._timer=u(function(){this.state=dt,this.tryEmit()},t.interval,this),ft):dt}return _t},failTimeout:function(){return this._timer=u(function(){this.state=_t},this.options.interval,this),_t},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==dt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ae.VERSION="2.0.6",ae.defaults={domEvents:!1,touchAction:rt,enable:!0,inputTarget:null,inputClass:null,preset:[[re,{enable:!1}],[ne,{enable:!1},["rotate"]],[oe,{direction:ze}],[te,{direction:ze},["swipe"]],[se],[se,{event:"doubletap",taps:2},["tap"]],[ie]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var mt=1,yt=2;ue.prototype={set:function(e){return fe(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?yt:mt},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,i=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&dt)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],t.stopped===yt||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&n.state&(ft|ht|pt)&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof K)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(l(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(l(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=w(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){var n=this.handlers;return c(b(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},off:function(e,t){var n=this.handlers;return c(b(e),function(e){t?n[e]&&n[e].splice(w(n[e],t),1):delete n[e]}),this},emit:function(e,t){this.options.domEvents&&ce(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&le(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},fe(ae,{INPUT_START:je,INPUT_MOVE:Ae,INPUT_END:Ce,INPUT_CANCEL:De,STATE_POSSIBLE:ct,STATE_BEGAN:ft,STATE_CHANGED:ht,STATE_ENDED:pt,STATE_RECOGNIZED:dt,STATE_CANCELLED:vt,STATE_FAILED:_t,DIRECTION_NONE:Le,DIRECTION_LEFT:Re,DIRECTION_RIGHT:Ie,DIRECTION_UP:Be,DIRECTION_DOWN:Fe,DIRECTION_HORIZONTAL:ze,DIRECTION_VERTICAL:Ne,DIRECTION_ALL:Ue,Manager:ue,Input:E,TouchAction:Z,TouchInput:V,MouseInput:U,PointerEventInput:H,TouchMouseInput:X,SingleTouchInput:W,Recognizer:K,AttrRecognizer:ee,Tap:se,Pan:te,Swipe:oe,Pinch:ne,Rotate:re,Press:ie,on:_,off:m,each:c,merge:ge,extend:ye,assign:fe,inherit:h,bindFn:p,prefixed:M});var gt="undefined"!=typeof r?r:"undefined"!=typeof self?self:{};gt.Hammer=ae,i=function(){return ae}.call(t,n,t,e),!(i!==a&&(e.exports=i))}(window,document,"Hammer")},function(e,t,n){var i,r;(function(o){!function(o,s){"use strict";var a=o.GreenSockGlobals=o.GreenSockGlobals||o;if(!a.TweenLite){var u,l,c,f,h,p=function(e){var t,n=e.split("."),i=a;for(t=0;t<n.length;t++)i[n[t]]=i=i[n[t]]||{};return i},d=p("com.greensock"),v=1e-10,_=function(e){var t,n=[],i=e.length;for(t=0;t!==i;n.push(e[t++]));return n},m=function(){},y=function(){var e=Object.prototype.toString,t=e.call([]);return function(n){return null!=n&&(n instanceof Array||"object"==typeof n&&!!n.push&&e.call(n)===t)}}(),g={},b=function(o,u,l,c){this.sc=g[o]?g[o].sc:[],g[o]=this,this.gsClass=null,this.func=l;var f=[];this.check=function(h){for(var d,v,_,m,y,w=u.length,x=w;--w>-1;)(d=g[u[w]]||new b(u[w],[])).gsClass?(f[w]=d.gsClass,x--):h&&d.sc.push(this);if(0===x&&l)for(v=("com.greensock."+o).split("."),_=v.pop(),m=p(v.join("."))[_]=this.gsClass=l.apply(l,f),c&&(a[_]=m,y="undefined"!=typeof e&&e.exports,!y&&n(56)?(i=[],r=function(){return m}.apply(t,i),!(void 0!==r&&(e.exports=r))):o===s&&y&&(e.exports=m)),w=0;w<this.sc.length;w++)this.sc[w].check()},this.check(!0)},w=o._gsDefine=function(e,t,n,i){return new b(e,t,n,i)},x=d._class=function(e,t,n){return t=t||function(){},w(e,[],function(){return t},n),t};w.globals=a;var T=[0,0,1,1],M=[],P=x("easing.Ease",function(e,t,n,i){this._func=e,this._type=n||0,this._power=i||0,this._params=t?T.concat(t):T},!0),k=P.map={},E=P.register=function(e,t,n,i){for(var r,o,s,a,u=t.split(","),l=u.length,c=(n||"easeIn,easeOut,easeInOut").split(",");--l>-1;)for(o=u[l],r=i?x("easing."+o,null,!0):d.easing[o]||{},s=c.length;--s>-1;)a=c[s],k[o+"."+a]=k[a+o]=r[a]=e.getRatio?e:e[a]||new e};for(c=P.prototype,c._calcEnd=!1,c.getRatio=function(e){if(this._func)return this._params[0]=e,this._func.apply(null,this._params);var t=this._type,n=this._power,i=1===t?1-e:2===t?e:.5>e?2*e:2*(1-e);return 1===n?i*=i:2===n?i*=i*i:3===n?i*=i*i*i:4===n&&(i*=i*i*i*i),1===t?1-i:2===t?i:.5>e?i/2:1-i/2},u=["Linear","Quad","Cubic","Quart","Quint,Strong"],l=u.length;--l>-1;)c=u[l]+",Power"+l,E(new P(null,null,1,l),c,"easeOut",!0),E(new P(null,null,2,l),c,"easeIn"+(0===l?",easeNone":"")),E(new P(null,null,3,l),c,"easeInOut");k.linear=d.easing.Linear.easeIn,k.swing=d.easing.Quad.easeInOut;var O=x("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});c=O.prototype,c.addEventListener=function(e,t,n,i,r){r=r||0;var o,s,a=this._listeners[e],u=0;for(null==a&&(this._listeners[e]=a=[]),s=a.length;--s>-1;)o=a[s],o.c===t&&o.s===n?a.splice(s,1):0===u&&o.pr<r&&(u=s+1);a.splice(u,0,{c:t,s:n,up:i,pr:r}),this!==f||h||f.wake()},c.removeEventListener=function(e,t){var n,i=this._listeners[e];if(i)for(n=i.length;--n>-1;)if(i[n].c===t)return void i.splice(n,1)},c.dispatchEvent=function(e){var t,n,i,r=this._listeners[e];if(r)for(t=r.length,n=this._eventTarget;--t>-1;)i=r[t],i&&(i.up?i.c.call(i.s||n,{type:e,target:n}):i.c.call(i.s||n))};var S=o.requestAnimationFrame,j=o.cancelAnimationFrame,A=Date.now||function(){return(new Date).getTime()},C=A();for(u=["ms","moz","webkit","o"],l=u.length;--l>-1&&!S;)S=o[u[l]+"RequestAnimationFrame"],j=o[u[l]+"CancelAnimationFrame"]||o[u[l]+"CancelRequestAnimationFrame"];x("Ticker",function(e,t){var n,i,r,o,s,a=this,u=A(),l=t!==!1&&S?"auto":!1,c=500,p=33,d="tick",_=function(e){var t,l,f=A()-C;f>c&&(u+=f-p),C+=f,a.time=(C-u)/1e3,t=a.time-s,(!n||t>0||e===!0)&&(a.frame++,s+=t+(t>=o?.004:o-t),l=!0),e!==!0&&(r=i(_)),l&&a.dispatchEvent(d)};O.call(a),a.time=a.frame=0,a.tick=function(){_(!0)},a.lagSmoothing=function(e,t){c=e||1/v,p=Math.min(t,c,0)},a.sleep=function(){null!=r&&(l&&j?j(r):clearTimeout(r),i=m,r=null,a===f&&(h=!1))},a.wake=function(e){null!==r?a.sleep():e?u+=-C+(C=A()):a.frame>10&&(C=A()-c+5),i=0===n?m:l&&S?S:function(e){return setTimeout(e,1e3*(s-a.time)+1|0)},a===f&&(h=!0),_(2)},a.fps=function(e){return arguments.length?(n=e,o=1/(n||60),s=this.time+o,void a.wake()):n},a.useRAF=function(e){return arguments.length?(a.sleep(),l=e,void a.fps(n)):l},a.fps(e),setTimeout(function(){"auto"===l&&a.frame<5&&"hidden"!==document.visibilityState&&a.useRAF(!1)},1500)}),c=d.Ticker.prototype=new d.events.EventDispatcher,c.constructor=d.Ticker;var D=x("core.Animation",function(e,t){if(this.vars=t=t||{},this._duration=this._totalDuration=e||0,this._delay=Number(t.delay)||0,this._timeScale=1,this._active=t.immediateRender===!0,this.data=t.data,this._reversed=t.reversed===!0,Q){h||f.wake();var n=this.vars.useFrames?J:Q;n.add(this,n._time),this.vars.paused&&this.paused(!0)}});f=D.ticker=new d.Ticker,c=D.prototype,c._dirty=c._gc=c._initted=c._paused=!1,c._totalTime=c._time=0,c._rawPrevTime=-1,c._next=c._last=c._onUpdate=c._timeline=c.timeline=null,c._paused=!1;var L=function(){h&&A()-C>2e3&&f.wake(),setTimeout(L,2e3)};L(),c.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},c.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},c.resume=function(e,t){return null!=e&&this.seek(e,t),this.paused(!1)},c.seek=function(e,t){return this.totalTime(Number(e),t!==!1)},c.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,t!==!1,!0)},c.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},c.render=function(e,t,n){},c.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},c.isActive=function(){var e,t=this._timeline,n=this._startTime;return!t||!this._gc&&!this._paused&&t.isActive()&&(e=t.rawTime())>=n&&e<n+this.totalDuration()/this._timeScale},c._enabled=function(e,t){return h||f.wake(),this._gc=!e,this._active=this.isActive(),t!==!0&&(e&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!e&&this.timeline&&this._timeline._remove(this,!0)),!1},c._kill=function(e,t){return this._enabled(!1,!1)},c.kill=function(e,t){return this._kill(e,t),this},c._uncache=function(e){for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},c._swapSelfInParams=function(e){for(var t=e.length,n=e.concat();--t>-1;)"{self}"===e[t]&&(n[t]=this);return n},c._callback=function(e){var t=this.vars;t[e].apply(t[e+"Scope"]||t.callbackScope||this,t[e+"Params"]||M)},c.eventCallback=function(e,t,n,i){if("on"===(e||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[e];null==t?delete r[e]:(r[e]=t,r[e+"Params"]=y(n)&&-1!==n.join("").indexOf("{self}")?this._swapSelfInParams(n):n,r[e+"Scope"]=i),"onUpdate"===e&&(this._onUpdate=t)}return this},c.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},c.duration=function(e){return arguments.length?(this._duration=this._totalDuration=e,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==e&&this.totalTime(this._totalTime*(e/this._duration),!0),this):(this._dirty=!1,this._duration)},c.totalDuration=function(e){return this._dirty=!1,arguments.length?this.duration(e):this._totalDuration},c.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},c.totalTime=function(e,t,n){if(h||f.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>e&&!n&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var i=this._totalDuration,r=this._timeline;if(e>i&&!n&&(e=i),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?i-e:e)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==e||0===this._duration)&&(z.length&&ee(),this.render(e,t,!1),z.length&&ee())}return this},c.progress=c.totalProgress=function(e,t){var n=this.duration();return arguments.length?this.totalTime(n*e,t):n?this._time/n:this.ratio},c.startTime=function(e){return arguments.length?(e!==this._startTime&&(this._startTime=e,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,e-this._delay)),this):this._startTime},c.endTime=function(e){return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},c.timeScale=function(e){if(!arguments.length)return this._timeScale;if(e=e||v,this._timeline&&this._timeline.smoothChildTiming){var t=this._pauseTime,n=t||0===t?t:this._timeline.totalTime();this._startTime=n-(n-this._startTime)*this._timeScale/e}return this._timeScale=e,this._uncache(!1)},c.reversed=function(e){return arguments.length?(e!=this._reversed&&(this._reversed=e,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},c.paused=function(e){if(!arguments.length)return this._paused;var t,n,i=this._timeline;return e!=this._paused&&i&&(h||e||f.wake(),t=i.rawTime(),n=t-this._pauseTime,!e&&i.smoothChildTiming&&(this._startTime+=n,this._uncache(!1)),this._pauseTime=e?t:null,this._paused=e,this._active=this.isActive(),!e&&0!==n&&this._initted&&this.duration()&&(t=i.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,this.render(t,t===this._totalTime,!0))),this._gc&&!e&&this._enabled(!0,!1),this};var R=x("core.SimpleTimeline",function(e){D.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});c=R.prototype=new D,c.constructor=R,c.kill()._gc=!1,c._first=c._last=c._recent=null,c._sortChildren=!1,c.add=c.insert=function(e,t,n,i){var r,o;if(e._startTime=Number(t||0)+e._delay,e._paused&&this!==e._timeline&&(e._pauseTime=e._startTime+(this.rawTime()-e._startTime)/e._timeScale),e.timeline&&e.timeline._remove(e,!0),e.timeline=e._timeline=this,e._gc&&e._enabled(!0,!0),r=this._last,this._sortChildren)for(o=e._startTime;r&&r._startTime>o;)r=r._prev;return r?(e._next=r._next,r._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=r,this._recent=e,this._timeline&&this._uncache(!0),this},c._remove=function(e,t){return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},c.render=function(e,t,n){var i,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;r;)i=r._next,(r._active||e>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,n):r.render((e-r._startTime)*r._timeScale,t,n)),r=i},c.rawTime=function(){return h||f.wake(),this._totalTime};var I=x("TweenLite",function(e,t,n){if(D.call(this,t,n),this.render=I.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:I.selector(e)||e;var i,r,s,a=e.jquery||e.length&&e!==o&&e[0]&&(e[0]===o||e[0].nodeType&&e[0].style&&!e.nodeType),u=this.vars.overwrite;if(this._overwrite=u=null==u?K[I.defaultOverwrite]:"number"==typeof u?u>>0:K[u],(a||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=s=_(e),this._propLookup=[],this._siblings=[],i=0;i<s.length;i++)r=s[i],r?"string"!=typeof r?r.length&&r!==o&&r[0]&&(r[0]===o||r[0].nodeType&&r[0].style&&!r.nodeType)?(s.splice(i--,1),this._targets=s=s.concat(_(r))):(this._siblings[i]=te(r,this,!1),1===u&&this._siblings[i].length>1&&ie(r,this,null,1,this._siblings[i])):(r=s[i--]=I.selector(r),"string"==typeof r&&s.splice(i+1,1)):s.splice(i--,1);else this._propLookup={},this._siblings=te(e,this,!1),1===u&&this._siblings.length>1&&ie(e,this,null,1,this._siblings);(this.vars.immediateRender||0===t&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-v,this.render(-this._delay))},!0),B=function(e){return e&&e.length&&e!==o&&e[0]&&(e[0]===o||e[0].nodeType&&e[0].style&&!e.nodeType)},F=function(e,t){var n,i={};for(n in e)Y[n]||n in t&&"transform"!==n&&"x"!==n&&"y"!==n&&"width"!==n&&"height"!==n&&"className"!==n&&"border"!==n||!(!G[n]||G[n]&&G[n]._autoCSS)||(i[n]=e[n],delete e[n]);e.css=i};c=I.prototype=new D,c.constructor=I,c.kill()._gc=!1,c.ratio=0,c._firstPT=c._targets=c._overwrittenProps=c._startAt=null,c._notifyPluginsOfEnabled=c._lazy=!1,I.version="1.18.2",I.defaultEase=c._ease=new P(null,null,1,1),I.defaultOverwrite="auto",I.ticker=f,I.autoSleep=120,I.lagSmoothing=function(e,t){f.lagSmoothing(e,t)},I.selector=o.$||o.jQuery||function(e){var t=o.$||o.jQuery;return t?(I.selector=t,t(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var z=[],N={},U=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,H=function(e){for(var t,n=this._firstPT,i=1e-6;n;)t=n.blob?e?this.join(""):this.start:n.c*e+n.s,n.r?t=Math.round(t):i>t&&t>-i&&(t=0),n.f?n.fp?n.t[n.p](n.fp,t):n.t[n.p](t):n.t[n.p]=t,n=n._next},W=function(e,t,n,i){var r,o,s,a,u,l,c,f=[e,t],h=0,p="",d=0;for(f.start=e,n&&(n(f),e=f[0],t=f[1]),f.length=0,r=e.match(U)||[],o=t.match(U)||[],i&&(i._next=null,i.blob=1,f._firstPT=i),u=o.length,a=0;u>a;a++)c=o[a],l=t.substr(h,t.indexOf(c,h)-h),p+=l||!a?l:",",h+=l.length,d?d=(d+1)%5:"rgba("===l.substr(-5)&&(d=1),c===r[a]||r.length<=a?p+=c:(p&&(f.push(p),p=""),s=parseFloat(r[a]),f.push(s),f._firstPT={_next:f._firstPT,t:f,p:f.length-1,s:s,c:("="===c.charAt(1)?parseInt(c.charAt(0)+"1",10)*parseFloat(c.substr(2)):parseFloat(c)-s)||0,f:0,r:d&&4>d}),h+=c.length;return p+=t.substr(h),p&&f.push(p),f.setRatio=H,f},q=function(e,t,n,i,r,o,s,a){var u,l,c="get"===n?e[t]:n,f=typeof e[t],h="string"==typeof i&&"="===i.charAt(1),p={t:e,p:t,s:c,f:"function"===f,pg:0,n:r||t,r:o,pr:0,c:h?parseInt(i.charAt(0)+"1",10)*parseFloat(i.substr(2)):parseFloat(i)-c||0};return"number"!==f&&("function"===f&&"get"===n&&(l=t.indexOf("set")||"function"!=typeof e["get"+t.substr(3)]?t:"get"+t.substr(3),p.s=c=s?e[l](s):e[l]()),"string"==typeof c&&(s||isNaN(c))?(p.fp=s,u=W(c,i,a||I.defaultStringFilter,p),p={t:u,p:"setRatio",s:0,c:1,f:2,pg:0,n:r||t,pr:0}):h||(p.s=parseFloat(c),p.c=parseFloat(i)-p.s||0)),p.c?((p._next=this._firstPT)&&(p._next._prev=p),this._firstPT=p,p):void 0},V=I._internals={isArray:y,isSelector:B,lazyTweens:z,blobDif:W},G=I._plugins={},X=V.tweenLookup={},Z=0,Y=V.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1},K={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},J=D._rootFramesTimeline=new R,Q=D._rootTimeline=new R,$=30,ee=V.lazyRender=function(){var e,t=z.length;for(N={};--t>-1;)e=z[t],e&&e._lazy!==!1&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);z.length=0};Q._startTime=f.time,J._startTime=f.frame,Q._active=J._active=!0,setTimeout(ee,1),D._updateRoot=I.render=function(){var e,t,n;if(z.length&&ee(),Q.render((f.time-Q._startTime)*Q._timeScale,!1,!1),J.render((f.frame-J._startTime)*J._timeScale,!1,!1),z.length&&ee(),f.frame>=$){$=f.frame+(parseInt(I.autoSleep,10)||120);for(n in X){for(t=X[n].tweens,e=t.length;--e>-1;)t[e]._gc&&t.splice(e,1);0===t.length&&delete X[n]}if(n=Q._first,(!n||n._paused)&&I.autoSleep&&!J._first&&1===f._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||f.sleep()}}},f.addEventListener("tick",D._updateRoot);var te=function(e,t,n){var i,r,o=e._gsTweenID;if(X[o||(e._gsTweenID=o="t"+Z++)]||(X[o]={target:e,tweens:[]}),t&&(i=X[o].tweens,i[r=i.length]=t,n))for(;--r>-1;)i[r]===t&&i.splice(r,1);return X[o].tweens},ne=function(e,t,n,i){var r,o,s=e.vars.onOverwrite;return s&&(r=s(e,t,n,i)),s=I.onOverwrite,s&&(o=s(e,t,n,i)),r!==!1&&o!==!1},ie=function(e,t,n,i,r){var o,s,a,u;if(1===i||i>=4){for(u=r.length,o=0;u>o;o++)if((a=r[o])!==t)a._gc||a._kill(null,e,t)&&(s=!0);else if(5===i)break;return s}var l,c=t._startTime+v,f=[],h=0,p=0===t._duration;for(o=r.length;--o>-1;)(a=r[o])===t||a._gc||a._paused||(a._timeline!==t._timeline?(l=l||re(t,0,p),0===re(a,l,p)&&(f[h++]=a)):a._startTime<=c&&a._startTime+a.totalDuration()/a._timeScale>c&&((p||!a._initted)&&c-a._startTime<=2e-10||(f[h++]=a)));for(o=h;--o>-1;)if(a=f[o],2===i&&a._kill(n,e,t)&&(s=!0),2!==i||!a._firstPT&&a._initted){if(2!==i&&!ne(a,t))continue;a._enabled(!1,!1)&&(s=!0)}return s},re=function(e,t,n){for(var i=e._timeline,r=i._timeScale,o=e._startTime;i._timeline;){if(o+=i._startTime,r*=i._timeScale,i._paused)return-100;i=i._timeline}return o/=r,o>t?o-t:n&&o===t||!e._initted&&2*v>o-t?v:(o+=e.totalDuration()/e._timeScale/r)>t+v?0:o-t-v};c._init=function(){var e,t,n,i,r,o=this.vars,s=this._overwrittenProps,a=this._duration,u=!!o.immediateRender,l=o.ease;if(o.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),r={};for(i in o.startAt)r[i]=o.startAt[i];if(r.overwrite=!1,r.immediateRender=!0,r.lazy=u&&o.lazy!==!1,r.startAt=r.delay=null,this._startAt=I.to(this.target,0,r),u)if(this._time>0)this._startAt=null;else if(0!==a)return}else if(o.runBackwards&&0!==a)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(u=!1),n={};for(i in o)Y[i]&&"autoCSS"!==i||(n[i]=o[i]);if(n.overwrite=0,n.data="isFromStart",n.lazy=u&&o.lazy!==!1,n.immediateRender=u,this._startAt=I.to(this.target,0,n),u){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=l=l?l instanceof P?l:"function"==typeof l?new P(l,o.easeParams):k[l]||I.defaultEase:I.defaultEase,o.easeParams instanceof Array&&l.config&&(this._ease=l.config.apply(l,o.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(e=this._targets.length;--e>-1;)this._initProps(this._targets[e],this._propLookup[e]={},this._siblings[e],s?s[e]:null)&&(t=!0);else t=this._initProps(this.target,this._propLookup,this._siblings,s);if(t&&I._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),o.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=o.onUpdate,this._initted=!0},c._initProps=function(e,t,n,i){var r,s,a,u,l,c;if(null==e)return!1;N[e._gsTweenID]&&ee(),this.vars.css||e.style&&e!==o&&e.nodeType&&G.css&&this.vars.autoCSS!==!1&&F(this.vars,e);for(r in this.vars)if(c=this.vars[r],Y[r])c&&(c instanceof Array||c.push&&y(c))&&-1!==c.join("").indexOf("{self}")&&(this.vars[r]=c=this._swapSelfInParams(c,this));else if(G[r]&&(u=new G[r])._onInitTween(e,this.vars[r],this)){for(this._firstPT=l={_next:this._firstPT,t:u,p:"setRatio",s:0,c:1,f:1,n:r,pg:1,pr:u._priority},s=u._overwriteProps.length;--s>-1;)t[u._overwriteProps[s]]=this._firstPT;(u._priority||u._onInitAllProps)&&(a=!0),(u._onDisable||u._onEnable)&&(this._notifyPluginsOfEnabled=!0),l._next&&(l._next._prev=l)}else t[r]=q.call(this,e,r,"get",c,r,0,null,this.vars.stringFilter);return i&&this._kill(i,e)?this._initProps(e,t,n,i):this._overwrite>1&&this._firstPT&&n.length>1&&ie(e,this,t,this._overwrite,n)?(this._kill(t,e),this._initProps(e,t,n,i)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(N[e._gsTweenID]=!0),a)},c.render=function(e,t,n){var i,r,o,s,a=this._time,u=this._duration,l=this._rawPrevTime;if(e>=u-1e-7)this._totalTime=this._time=u,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(i=!0,r="onComplete",n=n||this._timeline.autoRemoveChildren),0===u&&(this._initted||!this.vars.lazy||n)&&(this._startTime===this._timeline._duration&&(e=0),(0>l||0>=e&&e>=-1e-7||l===v&&"isPause"!==this.data)&&l!==e&&(n=!0,l>v&&(r="onReverseComplete")),this._rawPrevTime=s=!t||e||l===e?e:v);else if(1e-7>e)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==a||0===u&&l>0)&&(r="onReverseComplete",i=this._reversed),0>e&&(this._active=!1,0===u&&(this._initted||!this.vars.lazy||n)&&(l>=0&&(l!==v||"isPause"!==this.data)&&(n=!0),this._rawPrevTime=s=!t||e||l===e?e:v)),this._initted||(n=!0);else if(this._totalTime=this._time=e,this._easeType){var c=e/u,f=this._easeType,h=this._easePower;(1===f||3===f&&c>=.5)&&(c=1-c),3===f&&(c*=2),1===h?c*=c:2===h?c*=c*c:3===h?c*=c*c*c:4===h&&(c*=c*c*c*c),1===f?this.ratio=1-c:2===f?this.ratio=c:.5>e/u?this.ratio=c/2:this.ratio=1-c/2}else this.ratio=this._ease.getRatio(e/u);if(this._time!==a||n){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!n&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=a,this._rawPrevTime=l,z.push(this),void(this._lazy=[e,t]);this._time&&!i?this.ratio=this._ease.getRatio(this._time/u):i&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==a&&e>=0&&(this._active=!0),0===a&&(this._startAt&&(e>=0?this._startAt.render(e,t,n):r||(r="_dummyGS")),this.vars.onStart&&(0!==this._time||0===u)&&(t||this._callback("onStart"))),o=this._firstPT;o;)o.f?o.t[o.p](o.c*this.ratio+o.s):o.t[o.p]=o.c*this.ratio+o.s,o=o._next;this._onUpdate&&(0>e&&this._startAt&&e!==-1e-4&&this._startAt.render(e,t,n),t||(this._time!==a||i)&&this._callback("onUpdate")),r&&(!this._gc||n)&&(0>e&&this._startAt&&!this._onUpdate&&e!==-1e-4&&this._startAt.render(e,t,n),i&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[r]&&this._callback(r),0===u&&this._rawPrevTime===v&&s!==v&&(this._rawPrevTime=0))}},c._kill=function(e,t,n){if("all"===e&&(e=null),null==e&&(null==t||t===this.target))return this._lazy=!1,this._enabled(!1,!1);t="string"!=typeof t?t||this._targets||this.target:I.selector(t)||t;var i,r,o,s,a,u,l,c,f,h=n&&this._time&&n._startTime===this._startTime&&this._timeline===n._timeline;if((y(t)||B(t))&&"number"!=typeof t[0])for(i=t.length;--i>-1;)this._kill(e,t[i],n)&&(u=!0);else{if(this._targets){for(i=this._targets.length;--i>-1;)if(t===this._targets[i]){a=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],r=this._overwrittenProps[i]=e?this._overwrittenProps[i]||{}:"all";break}}else{if(t!==this.target)return!1;a=this._propLookup,r=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(a){if(l=e||a,c=e!==r&&"all"!==r&&e!==a&&("object"!=typeof e||!e._tempKill),n&&(I.onOverwrite||this.vars.onOverwrite)){for(o in l)a[o]&&(f||(f=[]),f.push(o));if((f||!e)&&!ne(this,n,t,f))return!1}for(o in l)(s=a[o])&&(h&&(s.f?s.t[s.p](s.s):s.t[s.p]=s.s,u=!0),s.pg&&s.t._kill(l)&&(u=!0),s.pg&&0!==s.t._overwriteProps.length||(s._prev?s._prev._next=s._next:s===this._firstPT&&(this._firstPT=s._next),s._next&&(s._next._prev=s._prev),s._next=s._prev=null),delete a[o]),c&&(r[o]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return u},c.invalidate=function(){return this._notifyPluginsOfEnabled&&I._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-v,this.render(-this._delay)),this},c._enabled=function(e,t){if(h||f.wake(),e&&this._gc){var n,i=this._targets;if(i)for(n=i.length;--n>-1;)this._siblings[n]=te(i[n],this,!0);else this._siblings=te(this.target,this,!0)}return D.prototype._enabled.call(this,e,t),this._notifyPluginsOfEnabled&&this._firstPT?I._onPluginEvent(e?"_onEnable":"_onDisable",this):!1},I.to=function(e,t,n){return new I(e,t,n)},I.from=function(e,t,n){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,new I(e,t,n)},I.fromTo=function(e,t,n,i){return i.startAt=n,i.immediateRender=0!=i.immediateRender&&0!=n.immediateRender,new I(e,t,i)},I.delayedCall=function(e,t,n,i,r){return new I(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:i,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,lazy:!1,useFrames:r,overwrite:0})},I.set=function(e,t){return new I(e,0,t)},I.getTweensOf=function(e,t){if(null==e)return[];e="string"!=typeof e?e:I.selector(e)||e;var n,i,r,o;if((y(e)||B(e))&&"number"!=typeof e[0]){for(n=e.length,i=[];--n>-1;)i=i.concat(I.getTweensOf(e[n],t));for(n=i.length;--n>-1;)for(o=i[n],r=n;--r>-1;)o===i[r]&&i.splice(n,1)}else for(i=te(e).concat(),n=i.length;--n>-1;)(i[n]._gc||t&&!i[n].isActive())&&i.splice(n,1);return i},I.killTweensOf=I.killDelayedCallsTo=function(e,t,n){"object"==typeof t&&(n=t,t=!1);for(var i=I.getTweensOf(e,t),r=i.length;--r>-1;)i[r]._kill(n,e)};var oe=x("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),this._propName=this._overwriteProps[0],this._priority=t||0,this._super=oe.prototype},!0);if(c=oe.prototype,oe.version="1.18.0",oe.API=2,c._firstPT=null,c._addTween=q,c.setRatio=H,c._kill=function(e){var t,n=this._overwriteProps,i=this._firstPT;if(null!=e[this._propName])this._overwriteProps=[];else for(t=n.length;--t>-1;)null!=e[n[t]]&&n.splice(t,1);for(;i;)null!=e[i.n]&&(i._next&&(i._next._prev=i._prev),i._prev?(i._prev._next=i._next,i._prev=null):this._firstPT===i&&(this._firstPT=i._next)),i=i._next;return!1},c._roundProps=function(e,t){for(var n=this._firstPT;n;)(e[this._propName]||null!=n.n&&e[n.n.split(this._propName+"_").join("")])&&(n.r=t),n=n._next},I._onPluginEvent=function(e,t){var n,i,r,o,s,a=t._firstPT;if("_onInitAllProps"===e){for(;a;){for(s=a._next,i=r;i&&i.pr>a.pr;)i=i._next;(a._prev=i?i._prev:o)?a._prev._next=a:r=a,(a._next=i)?i._prev=a:o=a,a=s}a=t._firstPT=r}for(;a;)a.pg&&"function"==typeof a.t[e]&&a.t[e]()&&(n=!0),a=a._next;return n},oe.activate=function(e){for(var t=e.length;--t>-1;)e[t].API===oe.API&&(G[(new e[t])._propName]=e[t]);return!0},w.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,n=e.propName,i=e.priority||0,r=e.overwriteProps,o={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},s=x("plugins."+n.charAt(0).toUpperCase()+n.substr(1)+"Plugin",function(){oe.call(this,n,i),this._overwriteProps=r||[]},e.global===!0),a=s.prototype=new oe(n);a.constructor=s,s.API=e.API;for(t in o)"function"==typeof e[t]&&(a[o[t]]=e[t]);return s.version=e.version,oe.activate([s]),s},u=o._gsQueue){for(l=0;l<u.length;l++)u[l]();for(c in g)g[c].func||o.console.log("GSAP encountered missing dependency: com.greensock."+c)}h=!1;
}}("undefined"!=typeof e&&e.exports&&"undefined"!=typeof o?o:this||window,"TweenLite")}).call(t,function(){return this}())},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(58),l=i(u),c=n(68),f=i(c),h=n(71),p=i(h),d=n(49),v=i(d),_=n(24),m=i(_),y=n(3),g=i(y),b=function(e){function t(e,n){r(this,t);var i={distance:4e4};n=(0,g["default"])({},i,n),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n),this._path=e}return o(t,e),s(t,[{key:"_onAdd",value:function(e){var n=this;a(Object.getPrototypeOf(t.prototype),"_onAdd",this).call(this,e);var i,r=new m["default"].PlaneBufferGeometry(2e5,2e5,1);i=this._world._environment._skybox?(0,p["default"])("#f5f5f3",this._world._environment._skybox.getRenderTarget()):(0,p["default"])("#f5f5f3");var o=new m["default"].Mesh(r,i);o.renderOrder=0,o.rotation.x=-90*Math.PI/180,o.receiveShadow=!0,this._baseLayer=o,this.add(o),setTimeout(function(){n._calculateLOD(),n._initEvents()},0)}},{key:"_initEvents",value:function(){this._throttledWorldUpdate=(0,v["default"])(this._onWorldUpdate,100),this._world.on("preUpdate",this._throttledWorldUpdate,this),this._world.on("move",this._onWorldMove,this)}},{key:"_onWorldUpdate",value:function(){this._calculateLOD(),this._outputTiles()}},{key:"_onWorldMove",value:function(e,t){this._moveBaseLayer(t)}},{key:"_moveBaseLayer",value:function(e){this._baseLayer.position.x=e.x,this._baseLayer.position.z=e.y}},{key:"_createTile",value:function(e,t){return new f["default"](e,this._path,t)}},{key:"destroy",value:function(){this._world.off("preUpdate",this._throttledWorldUpdate),this._world.off("move",this._onWorldMove),this._throttledWorldUpdate=null,this._baseLayer.geometry.dispose(),this._baseLayer.geometry=null,this._baseLayer.material.map&&(this._baseLayer.material.map.dispose(),this._baseLayer.material.map=null),this._baseLayer.material.dispose(),this._baseLayer.material=null,this._baseLayer=null,a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(l["default"]);t["default"]=b;var w=function(e,t){return new b(e,t)};t.imageTileLayer=w},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(46),l=i(u),c=n(3),f=i(c),h=n(59),p=i(h),d=n(24),v=i(d),_=function(e){function t(e){var n=this;r(this,t);var i={picking:!1,maxCache:1e3,maxLOD:18},o=(0,f["default"])({},i,e);a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,o),this._tileCache=new p["default"](this._options.maxCache,function(e){n._destroyTile(e)}),this._tileList=[],this._minLOD=3,this._maxLOD=this._options.maxLOD,this._frustum=new v["default"].Frustum,this._tiles=new v["default"].Object3D,this._tilesPicking=new v["default"].Object3D}return o(t,e),s(t,[{key:"_onAdd",value:function(e){this.addToPicking(this._tilesPicking),this.add(this._tiles)}},{key:"_updateFrustum",value:function(){var e=this._world.getCamera(),t=new v["default"].Matrix4;t.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromMatrix(e.projectionMatrix),this._frustum.setFromMatrix((new v["default"].Matrix4).multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse))}},{key:"_tileInFrustum",value:function(e){var t=e.getBounds();return this._frustum.intersectsBox(new v["default"].Box3(new v["default"].Vector3(t[0],0,t[3]),new v["default"].Vector3(t[2],0,t[1])))}},{key:"_outputTiles",value:function(){var e=this;this._tiles&&(this._removeTiles(),this._tileList.forEach(function(t){t.isReady()&&(e._tiles.add(t.getMesh()),t.getPickingMesh()&&e._tilesPicking.add(t.getPickingMesh()))}))}},{key:"_calculateLOD",value:function(){var e=this;if(!this._stop&&this._world){var t=this._world.getCamera();this._updateFrustum(this._frustum,t);var n=this._checklist;n=[],n.push(this._requestTile("0",this)),n.push(this._requestTile("1",this)),n.push(this._requestTile("2",this)),n.push(this._requestTile("3",this)),this._divide(n),n.sort(function(e,t){return e._quadcode.length<t._quadcode.length}),this._tileList=n.filter(function(n,i){if(!e._tileInFrustum(n))return!1;if(e._options.distance&&e._options.distance>0){var r=n.getCenter(),o=new v["default"].Vector3(r[0],0,r[1]).sub(t.position).length();if(o>e._options.distance)return!1}return n.getMesh()||n.requestTileAsync(),!0})}}},{key:"_divide",value:function(e){for(var t,n,i=0;i!=e.length;)t=e[i],n=t.getQuadcode(),t.length!==this._maxLOD&&this._screenSpaceError(t)?(e.splice(i,1),e.push(this._requestTile(n+"0",this)),e.push(this._requestTile(n+"1",this)),e.push(this._requestTile(n+"2",this)),e.push(this._requestTile(n+"3",this))):i++}},{key:"_screenSpaceError",value:function(e){var t=this._minLOD,n=this._maxLOD,i=e.getQuadcode(),r=this._world.getCamera(),o=3;if(i.length===n)return!1;if(i.length<t)return!0;if(!this._tileInFrustum(e))return!1;var s=e.getCenter(),a=new v["default"].Vector3(s[0],0,s[1]).sub(r.position).length(),u=o*e.getSide()/a;return u>1}},{key:"_removeTiles",value:function(){if(this._tiles&&this._tiles.children){for(var e=this._tiles.children.length-1;e>=0;e--)this._tiles.remove(this._tiles.children[e]);if(this._tilesPicking&&this._tilesPicking.children)for(var e=this._tilesPicking.children.length-1;e>=0;e--)this._tilesPicking.remove(this._tilesPicking.children[e])}}},{key:"_createTile",value:function(e,t){}},{key:"_requestTile",value:function(e,t){var n=this._tileCache.getTile(e);return n||(n=this._createTile(e,t),this._tileCache.setTile(e,n)),n}},{key:"_destroyTile",value:function(e){this._tiles.remove(e.getMesh()),e.destroy()}},{key:"destroy",value:function(){if(this._tiles.children)for(var e=this._tiles.children.length-1;e>=0;e--)this._tiles.remove(this._tiles.children[e]);if(this.removeFromPicking(this._tilesPicking),this._tilesPicking.children)for(var e=this._tilesPicking.children.length-1;e>=0;e--)this._tilesPicking.remove(this._tilesPicking.children[e]);this._tileCache.destroy(),this._tileCache=null,this._tiles=null,this._tilesPicking=null,this._frustum=null,a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(l["default"]);t["default"]=_,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(60),a=i(s),u=function(){function e(t,n){r(this,e),this._cache=(0,a["default"])({max:t,dispose:function(e,t){n(t)}})}return o(e,[{key:"isReady",value:function(){return!1}},{key:"getTile",value:function(e){return this._cache.get(e)}},{key:"setTile",value:function(e,t){this._cache.set(e,t)}},{key:"destroy",value:function(){this._cache.reset(),this._cache=null}}]),e}();t["default"]=u;var l=function(e,t){return new u(e,t)};t.tileCache=l},function(e,t,n){function i(e,t,n){var i;return _[t]?i=_[t]:(i=h(t),_[t]=i),2===arguments.length?e[i]:(e[i]=n,n)}function r(){return 1}function o(e){if(!(this instanceof o))return new o(e);"number"==typeof e&&(e={max:e}),e||(e={});var t=i(this,"max",e.max);(!t||"number"!=typeof t||0>=t)&&i(this,"max",1/0);var n=e.length||r;"function"!=typeof n&&(n=r),i(this,"lengthCalculator",n),i(this,"allowStale",e.stale||!1),i(this,"maxAge",e.maxAge||0),i(this,"dispose",e.dispose),this.reset()}function s(e,t,n,r){var o=n.value;u(e,o)&&(c(e,n),i(e,"allowStale")||(o=void 0)),o&&t.call(r,o.value,o.key,e)}function a(e,t,n){var r=i(e,"cache").get(t);if(r){var o=r.value;u(e,o)?(c(e,r),i(e,"allowStale")||(o=void 0)):n&&i(e,"lruList").unshiftNode(r),o&&(o=o.value)}return o}function u(e,t){if(!t||!t.maxAge&&!i(e,"maxAge"))return!1;var n=!1,r=Date.now()-t.now;return n=t.maxAge?r>t.maxAge:i(e,"maxAge")&&r>i(e,"maxAge")}function l(e){if(i(e,"length")>i(e,"max"))for(var t=i(e,"lruList").tail;i(e,"length")>i(e,"max")&&null!==t;){var n=t.prev;c(e,t),t=n}}function c(e,t){if(t){var n=t.value;i(e,"dispose")&&i(e,"dispose").call(this,n.key,n.value),i(e,"length",i(e,"length")-n.length),i(e,"cache")["delete"](n.key),i(e,"lruList").removeNode(t)}}function f(e,t,n,i,r){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=r||0}e.exports=o;var h,p=n(61),d=n(64),v=n(67),_={},m="function"==typeof Symbol;h=m?function(e){return Symbol["for"](e)}:function(e){return"_"+e},Object.defineProperty(o.prototype,"max",{set:function(e){(!e||"number"!=typeof e||0>=e)&&(e=1/0),i(this,"max",e),l(this)},get:function(){return i(this,"max")},enumerable:!0}),Object.defineProperty(o.prototype,"allowStale",{set:function(e){i(this,"allowStale",!!e)},get:function(){return i(this,"allowStale")},enumerable:!0}),Object.defineProperty(o.prototype,"maxAge",{set:function(e){(!e||"number"!=typeof e||0>e)&&(e=0),i(this,"maxAge",e),l(this)},get:function(){return i(this,"maxAge")},enumerable:!0}),Object.defineProperty(o.prototype,"lengthCalculator",{set:function(e){"function"!=typeof e&&(e=r),e!==i(this,"lengthCalculator")&&(i(this,"lengthCalculator",e),i(this,"length",0),i(this,"lruList").forEach(function(e){e.length=i(this,"lengthCalculator").call(this,e.value,e.key),i(this,"length",i(this,"length")+e.length)},this)),l(this)},get:function(){return i(this,"lengthCalculator")},enumerable:!0}),Object.defineProperty(o.prototype,"length",{get:function(){return i(this,"length")},enumerable:!0}),Object.defineProperty(o.prototype,"itemCount",{get:function(){return i(this,"lruList").length},enumerable:!0}),o.prototype.rforEach=function(e,t){t=t||this;for(var n=i(this,"lruList").tail;null!==n;){var r=n.prev;s(this,e,n,t),n=r}},o.prototype.forEach=function(e,t){t=t||this;for(var n=i(this,"lruList").head;null!==n;){var r=n.next;s(this,e,n,t),n=r}},o.prototype.keys=function(){return i(this,"lruList").toArray().map(function(e){return e.key},this)},o.prototype.values=function(){return i(this,"lruList").toArray().map(function(e){return e.value},this)},o.prototype.reset=function(){i(this,"dispose")&&i(this,"lruList")&&i(this,"lruList").length&&i(this,"lruList").forEach(function(e){i(this,"dispose").call(this,e.key,e.value)},this),i(this,"cache",new p),i(this,"lruList",new v),i(this,"length",0)},o.prototype.dump=function(){return i(this,"lruList").map(function(e){return u(this,e)?void 0:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}},this).toArray().filter(function(e){return e})},o.prototype.dumpLru=function(){return i(this,"lruList")},o.prototype.inspect=function(e,t){var n="LRUCache {",o=!1,s=i(this,"allowStale");s&&(n+="\n allowStale: true",o=!0);var a=i(this,"max");a&&a!==1/0&&(o&&(n+=","),n+="\n max: "+d.inspect(a,t),o=!0);var l=i(this,"maxAge");l&&(o&&(n+=","),n+="\n maxAge: "+d.inspect(l,t),o=!0);var c=i(this,"lengthCalculator");c&&c!==r&&(o&&(n+=","),n+="\n length: "+d.inspect(i(this,"length"),t),o=!0);var f=!1;return i(this,"lruList").forEach(function(e){f?n+=",\n ":(o&&(n+=",\n"),f=!0,n+="\n ");var i=d.inspect(e.key).split("\n").join("\n "),s={value:e.value};e.maxAge!==l&&(s.maxAge=e.maxAge),c!==r&&(s.length=e.length),u(this,e)&&(s.stale=!0),s=d.inspect(s,t).split("\n").join("\n "),n+=i+" => "+s}),(f||o)&&(n+="\n"),n+="}"},o.prototype.set=function(e,t,n){n=n||i(this,"maxAge");var r=n?Date.now():0,o=i(this,"lengthCalculator").call(this,t,e);if(i(this,"cache").has(e)){if(o>i(this,"max"))return c(this,i(this,"cache").get(e)),!1;var s=i(this,"cache").get(e),a=s.value;return i(this,"dispose")&&i(this,"dispose").call(this,e,a.value),a.now=r,a.maxAge=n,a.value=t,i(this,"length",i(this,"length")+(o-a.length)),a.length=o,this.get(e),l(this),!0}var u=new f(e,t,o,r,n);return u.length>i(this,"max")?(i(this,"dispose")&&i(this,"dispose").call(this,e,t),!1):(i(this,"length",i(this,"length")+u.length),i(this,"lruList").unshift(u),i(this,"cache").set(e,i(this,"lruList").head),l(this),!0)},o.prototype.has=function(e){if(!i(this,"cache").has(e))return!1;var t=i(this,"cache").get(e).value;return u(this,t)?!1:!0},o.prototype.get=function(e){return a(this,e,!0)},o.prototype.peek=function(e){return a(this,e,!1)},o.prototype.pop=function(){var e=i(this,"lruList").tail;return e?(c(this,e),e.value):null},o.prototype.del=function(e){c(this,i(this,"cache").get(e))},o.prototype.load=function(e){this.reset();for(var t=Date.now(),n=e.length-1;n>=0;n--){var i=e[n],r=i.e||0;if(0===r)this.set(i.k,i.v);else{var o=r-t;o>0&&this.set(i.k,i.v,o)}}},o.prototype.prune=function(){var e=this;i(this,"cache").forEach(function(t,n){a(e,n,!1)})}},function(e,t,n){(function(t){"pseudomap"===t.env.npm_package_name&&"test"===t.env.npm_lifecycle_script&&(t.env.TEST_PSEUDOMAP="true"),"function"!=typeof Map||t.env.TEST_PSEUDOMAP?e.exports=n(63):e.exports=Map}).call(t,n(62))},function(e,t){function n(){l=!1,s.length?u=s.concat(u):c=-1,u.length&&i()}function i(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,l=!1,clearTimeout(e)}}function r(e,t){this.fun=e,this.array=t}function o(){}var s,a=e.exports={},u=[],l=!1,c=-1;a.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];u.push(new r(e,t)),1!==u.length||l||setTimeout(i,0)},r.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t){function n(e){if(!(this instanceof n))throw new TypeError("Constructor PseudoMap requires 'new'");if(this.clear(),e)if(e instanceof n||"function"==typeof Map&&e instanceof Map)e.forEach(function(e,t){this.set(t,e)},this);else{if(!Array.isArray(e))throw new TypeError("invalid argument");e.forEach(function(e){this.set(e[0],e[1])},this)}}function i(e,t){return e===t||e!==e&&t!==t}function r(e,t,n){this.key=e,this.value=t,this._index=n}function o(e,t){for(var n=0,r="_"+t,o=r;a.call(e,o);o=r+n++)if(i(e[o].key,t))return e[o]}function s(e,t,n){for(var o=0,s="_"+t,u=s;a.call(e,u);u=s+o++)if(i(e[u].key,t))return void(e[u].value=n);e.size++,e[u]=new r(t,n,u)}var a=Object.prototype.hasOwnProperty;e.exports=n,n.prototype.forEach=function(e,t){t=t||this,Object.keys(this._data).forEach(function(n){"size"!==n&&e.call(t,this._data[n].value,this._data[n].key)},this)},n.prototype.has=function(e){return!!o(this._data,e)},n.prototype.get=function(e){var t=o(this._data,e);return t&&t.value},n.prototype.set=function(e,t){s(this._data,e,t)},n.prototype["delete"]=function(e){var t=o(this._data,e);t&&(delete this._data[t._index],this._data.size--)},n.prototype.clear=function(){var e=Object.create(null);e.size=0,Object.defineProperty(this,"_data",{value:e,enumerable:!1,configurable:!0,writable:!1})},Object.defineProperty(n.prototype,"size",{get:function(){return this._data.size},set:function(e){},enumerable:!0,configurable:!0}),n.prototype.values=n.prototype.keys=n.prototype.entries=function(){throw new Error("iterators are not implemented in this version")}},function(e,t,n){(function(e,i){function r(e,n){var i={seen:[],stylize:s};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),v(n)?i.showHidden=n:n&&t._extend(i,n),w(i.showHidden)&&(i.showHidden=!1),w(i.depth)&&(i.depth=2),w(i.colors)&&(i.colors=!1),w(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),u(i,e,i.depth)}function o(e,t){var n=r.styles[t];return n?"["+r.colors[n][0]+"m"+e+"["+r.colors[n][1]+"m":e}function s(e,t){return e}function a(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,i){if(e.customInspect&&n&&k(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var r=n.inspect(i,e);return g(r)||(r=u(e,r,i)),r}var o=l(e,n);if(o)return o;var s=Object.keys(n),v=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),P(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(n);if(0===s.length){if(k(n)){var _=n.name?": "+n.name:"";return e.stylize("[Function"+_+"]","special")}if(x(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(M(n))return e.stylize(Date.prototype.toString.call(n),"date");if(P(n))return c(n)}var m="",y=!1,b=["{","}"];if(d(n)&&(y=!0,b=["[","]"]),k(n)){var w=n.name?": "+n.name:"";m=" [Function"+w+"]"}if(x(n)&&(m=" "+RegExp.prototype.toString.call(n)),M(n)&&(m=" "+Date.prototype.toUTCString.call(n)),P(n)&&(m=" "+c(n)),0===s.length&&(!y||0==n.length))return b[0]+m+b[1];if(0>i)return x(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var T;return T=y?f(e,n,i,v,s):s.map(function(t){return h(e,n,i,v,t,y)}),e.seen.pop(),p(T,m,b)}function l(e,t){if(w(t))return e.stylize("undefined","undefined");if(g(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):_(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,i,r){for(var o=[],s=0,a=t.length;a>s;++s)A(t,String(s))?o.push(h(e,t,n,i,String(s),!0)):o.push("");return r.forEach(function(r){r.match(/^\d+$/)||o.push(h(e,t,n,i,r,!0))}),o}function h(e,t,n,i,r,o){var s,a,l;if(l=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]},l.get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),A(i,r)||(s="["+r+"]"),a||(e.seen.indexOf(l.value)<0?(a=_(n)?u(e,l.value,null):u(e,l.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),w(s)){if(o&&r.match(/^\d+$/))return a;s=JSON.stringify(""+r),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e,t,n){var i=0,r=e.reduce(function(e,t){return i++,t.indexOf("\n")>=0&&i++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function _(e){return null===e}function m(e){return null==e}function y(e){return"number"==typeof e}function g(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function w(e){return void 0===e}function x(e){return T(e)&&"[object RegExp]"===O(e)}function T(e){return"object"==typeof e&&null!==e}function M(e){return T(e)&&"[object Date]"===O(e)}function P(e){return T(e)&&("[object Error]"===O(e)||e instanceof Error)}function k(e){return"function"==typeof e}function E(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function O(e){return Object.prototype.toString.call(e)}function S(e){return 10>e?"0"+e.toString(10):e.toString(10)}function j(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var C=/%[sdj%]/g;t.format=function(e){if(!g(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(r(arguments[n]));return t.join(" ")}for(var n=1,i=arguments,o=i.length,s=String(e).replace(C,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(t){return"[Circular]"}default:return e}}),a=i[n];o>n;a=i[++n])s+=_(a)||!T(a)?" "+a:" "+r(a);return s},t.deprecate=function(n,r){function o(){if(!s){if(i.throwDeprecation)throw new Error(r);i.traceDeprecation?console.trace(r):console.error(r),s=!0}return n.apply(this,arguments)}if(w(e.process))return function(){return t.deprecate(n,r).apply(this,arguments)};if(i.noDeprecation===!0)return n;var s=!1;return o};var D,L={};t.debuglog=function(e){if(w(D)&&(D=i.env.NODE_DEBUG||""),e=e.toUpperCase(),!L[e])if(new RegExp("\\b"+e+"\\b","i").test(D)){var n=i.pid;L[e]=function(){var i=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,i)}}else L[e]=function(){};return L[e]},t.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=v,t.isNull=_,t.isNullOrUndefined=m,t.isNumber=y,t.isString=g,t.isSymbol=b,t.isUndefined=w,t.isRegExp=x,t.isObject=T,t.isDate=M,t.isError=P,t.isFunction=k,t.isPrimitive=E,t.isBuffer=n(65);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",j(),t.format.apply(t,arguments))},t.inherits=n(66),t._extend=function(e,t){if(!t||!T(t))return e;for(var n=Object.keys(t),i=n.length;i--;)e[n[i]]=t[n[i]];return e}}).call(t,function(){return this}(),n(62))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach(function(e){t.push(e)});else if(arguments.length>0)for(var i=0,r=arguments.length;r>i;i++)t.push(arguments[i]);return t}function i(e,t){e.tail=new o(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function r(e,t){e.head=new o(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function o(e,t,n,i){return this instanceof o?(this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,void(n?(n.prev=this,this.next=n):this.next=null)):new o(e,t,n,i)}e.exports=n,n.Node=o,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;t>e;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;t>e;e++)r(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail.next=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head.prev=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;null!==n;i++)e.call(t,n.value,i,this),n=n.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;null!==n;i--)e.call(t,n.value,i,this),n=n.prev},n.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&e>t;t++)n=n.next;return t===e&&null!==n?n.value:void 0},n.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&e>t;t++)n=n.prev;return t===e&&null!==n?n.value:void 0},n.prototype.map=function(e,t){t=t||this;for(var i=new n,r=this.head;null!==r;)i.push(e.call(t,r.value,this)),r=r.next;return i},n.prototype.mapReverse=function(e,t){t=t||this;for(var i=new n,r=this.tail;null!==r;)i.push(e.call(t,r.value,this)),r=r.prev;return i},n.prototype.reduce=function(e,t){var n,i=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,n=this.head.value}for(var r=0;null!==i;r++)n=e(n,i.value,r),i=i.next;return n},n.prototype.reduceReverse=function(e,t){var n,i=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,n=this.tail.value}for(var r=this.length-1;null!==i;r--)n=e(n,i.value,r),i=i.prev;return n},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},n.prototype.slice=function(e,t){t=t||this.length,0>t&&(t+=this.length),e=e||0,0>e&&(e+=this.length);var i=new n;if(e>t||0>t)return i;0>e&&(e=0),t>this.length&&(t=this.length);for(var r=0,o=this.head;null!==o&&e>r;r++)o=o.next;for(;null!==o&&t>r;r++,o=o.next)i.push(o.value);return i},n.prototype.sliceReverse=function(e,t){t=t||this.length,0>t&&(t+=this.length),e=e||0,0>e&&(e+=this.length);var i=new n;if(e>t||0>t)return i;0>e&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,o=this.tail;null!==o&&r>t;r--)o=o.prev;for(;null!==o&&r>e;r--,o=o.prev)i.push(o.value);return i},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var i=n.prev;n.prev=n.next,n.next=i}return this.head=t,this.tail=e,this}},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(69),l=i(u),c=n(70),f=(i(c),n(24)),h=i(f),p=function(e){function t(e,n,i){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n,i)}return o(t,e),s(t,[{key:"requestTileAsync",value:function(){var e=this;setTimeout(function(){e._mesh||(e._mesh=e._createMesh(),e._requestTile())},0)}},{key:"destroy",value:function(){this._abortRequest(),this._image=null,a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"_createMesh",value:function(){if(this._center){var e,t=new h["default"].Object3D,n=new h["default"].PlaneBufferGeometry(this._side,this._side,1);this._world._environment._skybox?(e=new h["default"].MeshStandardMaterial({depthWrite:!1}),e.roughness=1,e.metalness=.1,e.envMap=this._world._environment._skybox.getRenderTarget()):e=new h["default"].MeshBasicMaterial({depthWrite:!1});var i=new h["default"].Mesh(n,e);return i.rotation.x=-90*Math.PI/180,i.receiveShadow=!0,t.add(i),t.renderOrder=.1,t.position.x=this._center[0],t.position.z=this._center[1],t}}},{key:"_createDebugMesh",value:function(){var e=document.createElement("canvas");e.width=256,e.height=256;var t=e.getContext("2d");t.font="Bold 20px Helvetica Neue, Verdana, Arial",t.fillStyle="#ff0000",t.fillText(this._quadcode,20,e.width/2-5),t.fillText(this._tile.toString(),20,e.width/2+25);var n=new h["default"].Texture(e);n.magFilter=h["default"].LinearFilter,n.minFilter=h["default"].LinearMipMapLinearFilter,n.anisotropy=4,n.needsUpdate=!0;var i=new h["default"].MeshBasicMaterial({map:n,transparent:!0,depthWrite:!1}),r=new h["default"].PlaneBufferGeometry(this._side,this._side,1),o=new h["default"].Mesh(r,i);return o.rotation.x=-90*Math.PI/180,o.position.y=.1,o}},{key:"_requestTile",value:function(){var e=this,t={x:this._tile[0],y:this._tile[1],z:this._tile[2]},n=this._getTileURL(t),i=document.createElement("img");i.addEventListener("load",function(t){var n=new h["default"].Texture;n.image=i,n.needsUpdate=!0,n.magFilter=h["default"].LinearFilter,n.minFilter=h["default"].LinearMipMapLinearFilter,n.anisotropy=4,n.needsUpdate=!0,e._mesh&&e._mesh.children[0]&&e._mesh.children[0].material&&(e._mesh.children[0].material.map=n,e._mesh.children[0].material.needsUpdate=!0,e._texture=n,e._ready=!0)},!1),i.crossOrigin="",i.src=n,this._image=i}},{key:"_abortRequest",value:function(){this._image&&(this._image.src="")}}]),t}(l["default"]);t["default"]=p;var d=function(e,t,n){return new p(e,t,n)};t.imageTile=d},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(11),a=n(10),u=n(24),l=i(u),c=180/Math.PI,f=/\{([szxy])\}/g,h=function(){
function e(t,n,i){r(this,e),this._layer=i,this._world=i._world,this._quadcode=t,this._path=n,this._ready=!1,this._tile=this._quadcodeToTile(t),this._boundsLatLon=this._tileBoundsWGS84(this._tile),this._boundsWorld=this._tileBoundsFromWGS84(this._boundsLatLon),this._center=this._boundsToCenter(this._boundsWorld),this._centerLatlon=this._world.pointToLatLon((0,s.point)(this._center[0],this._center[1])),this._side=this._getSide(this._boundsWorld),this._pointScale=this._world.pointScale(this._centerLatlon)}return o(e,[{key:"isReady",value:function(){return this._ready}},{key:"requestTileAsync",value:function(){}},{key:"getQuadcode",value:function(){return this._quadcode}},{key:"getBounds",value:function(){return this._boundsWorld}},{key:"getCenter",value:function(){return this._center}},{key:"getSide",value:function(){return this._side}},{key:"getMesh",value:function(){return this._mesh}},{key:"getPickingMesh",value:function(){return this._pickingMesh}},{key:"destroy",value:function(){this._layer=null,this._world=null,this._boundsLatLon=null,this._boundsWorld=null,this._center=null,this._mesh&&(this._mesh.children?this._mesh.children.forEach(function(e){e.geometry.dispose(),e.geometry=null,e.material.map&&(e.material.map.dispose(),e.material.map=null),e.material.dispose(),e.material=null}):(this._mesh.geometry.dispose(),this._mesh.geometry=null,this._mesh.material.map&&(this._mesh.material.map.dispose(),this._mesh.material.map=null),this._mesh.material.dispose(),this._mesh.material=null))}},{key:"_createMesh",value:function(){}},{key:"_createDebugMesh",value:function(){}},{key:"_getTileURL",value:function(e){return e.s||(e.s=String.fromCharCode(97+Math.floor(3*Math.random()))),f.lastIndex=0,this._path.replace(f,function(t,n){return e[n]})}},{key:"_quadcodeToTile",value:function(e){for(var t=0,n=0,i=e.length,r=i;r>0;r--){var o=1<<r-1,s=+e[i-r];1===s&&(t|=o),2===s&&(n|=o),3===s&&(t|=o,n|=o)}return[t,n,i]}},{key:"_tileBoundsFromWGS84",value:function(e){var t=this._layer._world.latLonToPoint((0,a.latLon)(e[1],e[0])),n=this._layer._world.latLonToPoint((0,a.latLon)(e[3],e[2]));return[t.x,t.y,n.x,n.y]}},{key:"_tileBoundsWGS84",value:function(e){var t=this._tile2lon(e[0]+1,e[2]),n=this._tile2lon(e[0],e[2]),i=this._tile2lat(e[1]+1,e[2]),r=this._tile2lat(e[1],e[2]);return[n,i,t,r]}},{key:"_tile2lon",value:function(e,t){return e/Math.pow(2,t)*360-180}},{key:"_tile2lat",value:function(e,t){var n=Math.PI-2*Math.PI*e/Math.pow(2,t);return c*Math.atan(.5*(Math.exp(n)-Math.exp(-n)))}},{key:"_boundsToCenter",value:function(e){var t=e[0]+(e[2]-e[0])/2,n=e[1]+(e[3]-e[1])/2;return[t,n]}},{key:"_getSide",value:function(e){return new l["default"].Vector3(e[0],0,e[3]).sub(new l["default"].Vector3(e[0],0,e[1])).length()}}]),e}();t["default"]=h,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r);BoxHelper=function(e){var t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),i=new o["default"].BufferGeometry;i.setIndex(new o["default"].BufferAttribute(t,1)),i.addAttribute("position",new o["default"].BufferAttribute(n,3)),o["default"].LineSegments.call(this,i,new o["default"].LineBasicMaterial({linewidth:2,color:16711680})),void 0!==e&&this.update(e)},BoxHelper.prototype=Object.create(o["default"].LineSegments.prototype),BoxHelper.prototype.constructor=BoxHelper,BoxHelper.prototype.update=function(){var e=new o["default"].Box3;return function(t){if(e.setFromObject(t),!e.isEmpty()){var n=e.min,i=e.max,r=this.geometry.attributes.position,o=r.array;o[0]=i.x,o[1]=i.y,o[2]=i.z,o[3]=n.x,o[4]=i.y,o[5]=i.z,o[6]=n.x,o[7]=n.y,o[8]=i.z,o[9]=i.x,o[10]=n.y,o[11]=i.z,o[12]=i.x,o[13]=i.y,o[14]=n.z,o[15]=n.x,o[16]=i.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=i.x,o[22]=n.y,o[23]=n.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),t["default"]=BoxHelper,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r);t["default"]=function(e,t){var n=document.createElement("canvas");n.width=1,n.height=1;var i=n.getContext("2d");i.fillStyle=e,i.fillRect(0,0,n.width,n.height);var r=new o["default"].Texture(n);r.needsUpdate=!0;var s;return t?(s=new o["default"].MeshStandardMaterial({depthWrite:!1}),s.roughness=1,s.metalness=.1,s.envMap=t):s=new o["default"].MeshBasicMaterial({map:r,depthWrite:!1}),s},e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(58),l=i(u),c=n(3),f=i(c),h=n(73),p=i(h),d=n(49),v=i(d),_=n(24),m=(i(_),function(e){function t(e,n){r(this,t);var i={maxLOD:14,distance:2e3};n=(0,f["default"])({},i,n),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n),this._path=e}return o(t,e),s(t,[{key:"_onAdd",value:function(e){var n=this;a(Object.getPrototypeOf(t.prototype),"_onAdd",this).call(this,e),setTimeout(function(){n._calculateLOD(),n._initEvents()},0)}},{key:"_initEvents",value:function(){this._throttledWorldUpdate=(0,v["default"])(this._onWorldUpdate,100),this._world.on("preUpdate",this._throttledWorldUpdate,this),this._world.on("move",this._onWorldMove,this),this._world.on("controlsMove",this._onControlsMove,this)}},{key:"_onWorldUpdate",value:function(){this._pauseOutput||this._outputTiles()}},{key:"_onWorldMove",value:function(e,t){this._pauseOutput=!1,this._calculateLOD()}},{key:"_onControlsMove",value:function(){this._pauseOutput=!0}},{key:"_createTile",value:function(e,t){return new p["default"](e,this._path,t,this._options)}},{key:"destroy",value:function(){this._world.off("preUpdate",this._throttledWorldUpdate),this._world.off("move",this._onWorldMove),this._throttledWorldUpdate=null,a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(l["default"]));t["default"]=m;var y=function(e,t){return new m(e,t)};t.geoJSONTileLayer=y},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(69),l=i(u),c=n(74),f=n(70),h=(i(f),n(24)),p=i(h),d=n(76),v=i(d),_=(n(11),n(10),n(3)),m=i(_),y=n(78),g=i(y),b=n(84),w=(i(b),n(85)),x=(i(w),function(e){function t(e,n,i,o){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n,i),this._defaultStyle=g["default"].defaultStyle;var s={output:!0,outputToScene:!1,interactive:!1,topojson:!1,filter:null,onEachFeature:null,polygonMaterial:null,onPolygonMesh:null,onPolygonBufferAttributes:null,polylineMaterial:null,onPolylineMesh:null,onPolylineBufferAttributes:null,pointGeometry:null,pointMaterial:null,onPointMesh:null,style:g["default"].defaultStyle,keepFeatures:!1},u=(0,m["default"])({},s,o);"function"==typeof o.style?u.style=o.style:u.style=(0,m["default"])({},s.style,o.style),this._options=u}return o(t,e),s(t,[{key:"requestTileAsync",value:function(){var e=this;setTimeout(function(){e._mesh||(e._mesh=e._createMesh(),e._requestTile())},0)}},{key:"destroy",value:function(){this._abortRequest(),this._request=null,this._geojsonLayer&&(this._geojsonLayer.destroy(),this._geojsonLayer=null),this._mesh=null,this._pickingMesh=null,a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"_createMesh",value:function(){if(this._center){var e=new p["default"].Object3D;return e}}},{key:"_createDebugMesh",value:function(){var e=document.createElement("canvas");e.width=256,e.height=256;var t=e.getContext("2d");t.font="Bold 20px Helvetica Neue, Verdana, Arial",t.fillStyle="#ff0000",t.fillText(this._quadcode,20,e.width/2-5),t.fillText(this._tile.toString(),20,e.width/2+25);var n=new p["default"].Texture(e);n.magFilter=p["default"].LinearFilter,n.minFilter=p["default"].LinearMipMapLinearFilter,n.anisotropy=4,n.needsUpdate=!0;var i=new p["default"].MeshBasicMaterial({map:n,transparent:!0,depthWrite:!1}),r=new p["default"].PlaneBufferGeometry(this._side,this._side,1),o=new p["default"].Mesh(r,i);return o.rotation.x=-90*Math.PI/180,o.position.y=.1,o}},{key:"_requestTile",value:function(){var e=this,t={x:this._tile[0],y:this._tile[1],z:this._tile[2]},n=this._getTileURL(t);this._request=(0,v["default"])({url:n,type:"json",crossOrigin:!0}).then(function(t){e._request=null,e._processTileData(t)})["catch"](function(t){console.error(t),e._request=null})}},{key:"_processTileData",value:function(e){console.time(this._tile),this._geojsonLayer=(0,c.geoJSONLayer)(e,this._options).addTo(this._world),this._mesh=this._geojsonLayer._object3D,this._pickingMesh=this._geojsonLayer._pickingMesh,this._geojsonLayer._geojson=null,this._ready=!0,console.timeEnd(this._tile)}},{key:"_abortRequest",value:function(){this._request&&this._request.abort()}}]),t}(l["default"]));t["default"]=x;var T=function(e,t,n,i){return new x(e,t,n,i)};t.geoJSONTile=T},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(75),l=i(u),c=n(3),f=i(c),h=n(76),p=i(h),d=n(78),v=i(d),_=n(84),m=i(_),y=n(85),g=i(y),b=n(87),w=i(b),x=n(88),T=i(x),M=n(89),P=i(M),k=function(e){function t(e,n){r(this,t);var i={output:!1,interactive:!1,topojson:!1,filter:null,onEachFeature:null,polygonMaterial:null,onPolygonMesh:null,onPolygonBufferAttributes:null,polylineMaterial:null,onPolylineMesh:null,onPolylineBufferAttributes:null,pointGeometry:null,pointMaterial:null,onPointMesh:null,style:v["default"].defaultStyle,keepFeatures:!0},o=(0,f["default"])({},i,n);"function"==typeof n.style?o.style=n.style:o.style=(0,f["default"])({},i.style,n.style),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,o),this._geojson=e}return o(t,e),s(t,[{key:"_onAdd",value:function(e){this.isOutput()&&(this._pickingMesh=new THREE.Object3D,this.addToPicking(this._pickingMesh)),"string"==typeof this._geojson?this._requestData(this._geojson):this._processData(this._geojson)}},{key:"_requestData",value:function(e){var t=this;this._request=(0,p["default"])({url:e,type:"json",crossOrigin:!0}).then(function(e){t._request=null,t._processData(e)})["catch"](function(e){console.error(e),t._request=null})}},{key:"_processData",value:function(e){var t=this;this._geojson=v["default"].collectFeatures(e,this._options.topojson);var n=this._geojson.features;this._options.filter&&(n=this._geojson.features.filter(this._options.filter));var i,r={},o=this._options.style;if(n.forEach(function(e){"function"==typeof t._options.style&&(o=(0,f["default"])({},v["default"].defaultStyle,t._options.style(e))),i=(0,f["default"])({},r,{output:!t.isOutput(),interactive:t._options.interactive,style:o});var n=t._featureToLayer(e,i);n&&(t._options.keepFeatures&&(n.feature=e),t._options.onEachFeature&&t._options.onEachFeature(e,n),t.addLayer(n))}),this.isOutput()){var s=[],a=!0,u=[],l=[];if(this._layers.forEach(function(e){e instanceof w["default"]?(s.push(e.getBufferAttributes()),a&&!e.isFlat()&&(a=!1)):e instanceof T["default"]?u.push(e.getBufferAttributes()):e instanceof P["default"]&&l.push(e.getBufferAttributes())}),s.length>0){var c=m["default"].mergeAttributes(s);this._setPolygonMesh(c,a),this.add(this._polygonMesh)}if(u.length>0){var h=m["default"].mergeAttributes(u);this._setPolylineMesh(h),this.add(this._polylineMesh)}if(l.length>0){var p=m["default"].mergeAttributes(l);this._setPointMesh(p),this.add(this._pointMesh)}this._layers.forEach(function(e){e.clearBufferAttributes(),e.clearCoordinates()})}}},{key:"_setPolygonMesh",value:function(e,t){var n=new THREE.BufferGeometry;n.addAttribute("position",new THREE.BufferAttribute(e.vertices,3)),n.addAttribute("normal",new THREE.BufferAttribute(e.normals,3)),n.addAttribute("color",new THREE.BufferAttribute(e.colours,3)),e.pickingIds&&n.addAttribute("pickingId",new THREE.BufferAttribute(e.pickingIds,1)),n.computeBoundingBox();var i="function"==typeof this._options.style?this._options.style(this._geojson.features[0]):this._options.style;i=(0,f["default"])({},v["default"].defaultStyle,i);var r;this._options.polygonMaterial&&this._options.polygonMaterial instanceof THREE.Material?r=this._options.polygonMaterial:this._world._environment._skybox?(r=new THREE.MeshStandardMaterial({vertexColors:THREE.VertexColors,side:THREE.BackSide,transparent:i.transparent,opacity:i.opacity,blending:i.blending}),r.roughness=1,r.metalness=.1,r.envMapIntensity=3,r.envMap=this._world._environment._skybox.getRenderTarget()):r=new THREE.MeshPhongMaterial({vertexColors:THREE.VertexColors,side:THREE.BackSide,transparent:i.transparent,opacity:i.opacity,blending:i.blending});var o;if("function"==typeof this._options.onPolygonMesh?o=this._options.onPolygonMesh(n,r):(o=new THREE.Mesh(n,r),o.castShadow=!0,o.receiveShadow=!0),t&&(r.depthWrite=!1,o.renderOrder=1),this._options.interactive&&this._pickingMesh){r=new g["default"],r.side=THREE.BackSide;var s=new THREE.Mesh(n,r);this._pickingMesh.add(s)}this._polygonMesh=o}},{key:"_setPolylineMesh",value:function(e){var t=new THREE.BufferGeometry;t.addAttribute("position",new THREE.BufferAttribute(e.vertices,3)),e.normals&&t.addAttribute("normal",new THREE.BufferAttribute(e.normals,3)),t.addAttribute("color",new THREE.BufferAttribute(e.colours,3)),e.pickingIds&&t.addAttribute("pickingId",new THREE.BufferAttribute(e.pickingIds,1)),t.computeBoundingBox();var n="function"==typeof this._options.style?this._options.style(this._geojson.features[0]):this._options.style;n=(0,f["default"])({},v["default"].defaultStyle,n);var i;i=this._options.polylineMaterial&&this._options.polylineMaterial instanceof THREE.Material?this._options.polylineMaterial:new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors,linewidth:n.lineWidth,transparent:n.lineTransparent,opacity:n.lineOpacity,blending:n.lineBlending});var r;if("function"==typeof this._options.onPolylineMesh?r=this._options.onPolylineMesh(t,i):(r=new THREE.LineSegments(t,i),void 0!==n.lineRenderOrder&&(i.depthWrite=!1,r.renderOrder=n.lineRenderOrder),r.castShadow=!0),this._options.interactive&&this._pickingMesh){i=new g["default"],i.linewidth=n.lineWidth+i.linePadding;var o=new THREE.LineSegments(t,i);this._pickingMesh.add(o)}this._polylineMesh=r}},{key:"_setPointMesh",value:function(e){var t=new THREE.BufferGeometry;t.addAttribute("position",new THREE.BufferAttribute(e.vertices,3)),t.addAttribute("normal",new THREE.BufferAttribute(e.normals,3)),t.addAttribute("color",new THREE.BufferAttribute(e.colours,3)),e.pickingIds&&t.addAttribute("pickingId",new THREE.BufferAttribute(e.pickingIds,1)),t.computeBoundingBox();var n;this._options.pointMaterial&&this._options.pointMaterial instanceof THREE.Material?n=this._options.pointMaterial:this._world._environment._skybox?(n=new THREE.MeshStandardMaterial({vertexColors:THREE.VertexColors}),n.roughness=1,n.metalness=.1,n.envMapIntensity=3,n.envMap=this._world._environment._skybox.getRenderTarget()):n=new THREE.MeshPhongMaterial({vertexColors:THREE.VertexColors});var i;if("function"==typeof this._options.onPointMesh?i=this._options.onPointMesh(t,n):(i=new THREE.Mesh(t,n),i.castShadow=!0),this._options.interactive&&this._pickingMesh){n=new g["default"];var r=new THREE.Mesh(t,n);this._pickingMesh.add(r)}this._pointMesh=i}},{key:"_featureToLayer",value:function(e,t){var n=e.geometry,i=n.coordinates?n.coordinates:null;return i&&n?"Polygon"===n.type||"MultiPolygon"===n.type?("function"==typeof this._options.polygonMaterial&&(t.geometry=this._options.polygonMaterial(e)),"function"==typeof this._options.onPolygonMesh&&(t.onMesh=this._options.onPolygonMesh),"function"==typeof this._options.onPolygonBufferAttributes&&(t.onBufferAttributes=this._options.onPolygonBufferAttributes),new w["default"](i,t)):"LineString"===n.type||"MultiLineString"===n.type?("function"==typeof this._options.lineMaterial&&(t.geometry=this._options.lineMaterial(e)),"function"==typeof this._options.onPolylineMesh&&(t.onMesh=this._options.onPolylineMesh),"function"==typeof this._options.onPolylineBufferAttributes&&(t.onBufferAttributes=this._options.onPolylineBufferAttributes),new T["default"](i,t)):"Point"===n.type||"MultiPoint"===n.type?("function"==typeof this._options.pointGeometry&&(t.geometry=this._options.pointGeometry(e)),"function"==typeof this._options.pointMaterial&&(t.geometry=this._options.pointMaterial(e)),"function"==typeof this._options.onPointMesh&&(t.onMesh=this._options.onPointMesh),new P["default"](i,t)):void 0:void 0}},{key:"_abortRequest",value:function(){this._request&&this._request.abort()}},{key:"destroy",value:function(){this._abortRequest(),this._request=null,this._geojson=null,this._pickingMesh&&(this._pickingMesh=null),this._polygonMesh&&(this._polygonMesh=null),this._polylineMesh&&(this._polylineMesh=null),this._pointMesh&&(this._pointMesh=null),a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(l["default"]);t["default"]=k;var E=function(e,t){return new k(e,t)};t.geoJSONLayer=E},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(46),l=i(u),c=n(3),f=i(c),h=function(e){function t(e){r(this,t);var n={output:!1},i=(0,f["default"])({},n,e);a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,i),this._layers=[]}return o(t,e),s(t,[{key:"addLayer",value:function(e){this._layers.push(e),this._world.addLayer(e)}},{key:"removeLayer",value:function(e){var t=this._layers.indexOf(e);t>-1&&this._layers.splice(t,1),this._world.removeLayer(e)}},{key:"_onAdd",value:function(e){}},{key:"destroy",value:function(){if(this._layers){for(var e=0;e<this._layers.length;e++)this._layers[e].destroy();this._layers=null}a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(l["default"]);t["default"]=h;var p=function(e){return new h(e)};t.layerGroup=p},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(e,t,n){"undefined"!=typeof module&&module.exports?module.exports=n():(__WEBPACK_AMD_DEFINE_FACTORY__=n,__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof __WEBPACK_AMD_DEFINE_FACTORY__?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}("reqwest",this,function(){function succeed(e){var t=protocolRe.exec(e.url);return t=t&&t[1]||context.location.protocol,httpsRe.test(t)?twoHundo.test(e.request.status):!!e.request.response}function handleReadyState(e,t,n){return function(){return e._aborted?n(e.request):e._timedOut?n(e.request,"Request is aborted: timeout"):void(e.request&&4==e.request[readyState]&&(e.request.onreadystatechange=noop,succeed(e)?t(e.request):n(e.request)))}}function setHeaders(e,t){var n,i=t.headers||{};i.Accept=i.Accept||defaultHeaders.accept[t.type]||defaultHeaders.accept["*"];var r="undefined"!=typeof FormData&&t.data instanceof FormData;t.crossOrigin||i[requestedWith]||(i[requestedWith]=defaultHeaders.requestedWith),i[contentType]||r||(i[contentType]=t.contentType||defaultHeaders.contentType);for(n in i)i.hasOwnProperty(n)&&"setRequestHeader"in e&&e.setRequestHeader(n,i[n])}function setCredentials(e,t){"undefined"!=typeof t.withCredentials&&"undefined"!=typeof e.withCredentials&&(e.withCredentials=!!t.withCredentials)}function generalCallback(e){lastValue=e}function urlappend(e,t){return e+(/\?/.test(e)?"&":"?")+t}function handleJsonp(e,t,n,i){var r=uniqid++,o=e.jsonpCallback||"callback",s=e.jsonpCallbackName||reqwest.getcallbackPrefix(r),a=new RegExp("((^|\\?|&)"+o+")=([^&]+)"),u=i.match(a),l=doc.createElement("script"),c=0,f=-1!==navigator.userAgent.indexOf("MSIE 10.0");return u?"?"===u[3]?i=i.replace(a,"$1="+s):s=u[3]:i=urlappend(i,o+"="+s),context[s]=generalCallback,l.type="text/javascript",l.src=i,l.async=!0,"undefined"==typeof l.onreadystatechange||f||(l.htmlFor=l.id="_reqwest_"+r),l.onload=l.onreadystatechange=function(){return l[readyState]&&"complete"!==l[readyState]&&"loaded"!==l[readyState]||c?!1:(l.onload=l.onreadystatechange=null,l.onclick&&l.onclick(),t(lastValue),lastValue=void 0,head.removeChild(l),void(c=1))},head.appendChild(l),{abort:function(){l.onload=l.onreadystatechange=null,n({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(l),c=1}}}function getRequest(e,t){var n,i=this.o,r=(i.method||"GET").toUpperCase(),o="string"==typeof i?i:i.url,s=i.processData!==!1&&i.data&&"string"!=typeof i.data?reqwest.toQueryString(i.data):i.data||null,a=!1;return"jsonp"!=i.type&&"GET"!=r||!s||(o=urlappend(o,s),s=null),"jsonp"==i.type?handleJsonp(i,e,t,o):(n=i.xhr&&i.xhr(i)||xhr(i),n.open(r,o,i.async===!1?!1:!0),setHeaders(n,i),setCredentials(n,i),context[xDomainRequest]&&n instanceof context[xDomainRequest]?(n.onload=e,n.onerror=t,n.onprogress=function(){},a=!0):n.onreadystatechange=handleReadyState(this,e,t),i.before&&i.before(n),a?setTimeout(function(){n.send(s)},200):n.send(s),n)}function Reqwest(e,t){this.o=e,this.fn=t,init.apply(this,arguments)}function setType(e){return null!==e?e.match("json")?"json":e.match("javascript")?"js":e.match("text")?"html":e.match("xml")?"xml":void 0:void 0}function init(o,fn){function complete(e){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(e)}function success(resp){var type=o.type||resp&&setType(resp.getResponseHeader("Content-Type"));resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=context.JSON?context.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function timedOut(){self._timedOut=!0,self.request.abort()}function error(e,t,n){for(e=self.request,self._responseArgs.resp=e,self._responseArgs.msg=t,self._responseArgs.t=n,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(e,t,n);complete(e)}this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){timedOut()},o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(e,t){return new Reqwest(e,t)}function normalize(e){return e?e.replace(/\r?\n/g,"\r\n"):""}function serial(e,t){var n,i,r,o,s=e.name,a=e.tagName.toLowerCase(),u=function(e){e&&!e.disabled&&t(s,normalize(e.attributes.value&&e.attributes.value.specified?e.value:e.text))};if(!e.disabled&&s)switch(a){case"input":/reset|button|image|file/i.test(e.type)||(n=/checkbox/i.test(e.type),i=/radio/i.test(e.type),r=e.value,(!(n||i)||e.checked)&&t(s,normalize(n&&""===r?"on":r)));break;case"textarea":t(s,normalize(e.value));break;case"select":if("select-one"===e.type.toLowerCase())u(e.selectedIndex>=0?e.options[e.selectedIndex]:null);else for(o=0;e.length&&o<e.length;o++)e.options[o].selected&&u(e.options[o])}}function eachFormElement(){var e,t,n=this,i=function(e,t){var i,r,o;for(i=0;i<t.length;i++)for(o=e[byTag](t[i]),r=0;r<o.length;r++)serial(o[r],n)};for(t=0;t<arguments.length;t++)e=arguments[t],/input|select|textarea/i.test(e.tagName)&&serial(e,n),i(e,["input","select","textarea"])}function serializeQueryString(){return reqwest.toQueryString(reqwest.serializeArray.apply(null,arguments))}function serializeHash(){var e={};return eachFormElement.apply(function(t,n){t in e?(e[t]&&!isArray(e[t])&&(e[t]=[e[t]]),e[t].push(n)):e[t]=n},arguments),e}function buildParams(e,t,n,i){var r,o,s,a=/\[\]$/;if(isArray(t))for(o=0;t&&o<t.length;o++)s=t[o],n||a.test(e)?i(e,s):buildParams(e+"["+("object"==typeof s?o:"")+"]",s,n,i);else if(t&&"[object Object]"===t.toString())for(r in t)buildParams(e+"["+r+"]",t[r],n,i);else i(e,t)}var context=this;if("window"in context)var doc=document,byTag="getElementsByTagName",head=doc[byTag]("head")[0];else{var XHR2;try{XHR2=__webpack_require__(77)}catch(ex){throw new Error("Peer dependency `xhr2` required! Please npm install xhr2")}}var httpsRe=/^http/,protocolRe=/(^\w+):\/\//,twoHundo=/^(20\d|1223)$/,readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",uniqid=0,callbackPrefix="reqwest_"+ +new Date,lastValue,xmlHttpRequest="XMLHttpRequest",xDomainRequest="XDomainRequest",noop=function(){},isArray="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",requestedWith:xmlHttpRequest,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"}},xhr=function(e){if(e.crossOrigin===!0){var t=context[xmlHttpRequest]?new XMLHttpRequest:null;if(t&&"withCredentials"in t)return t;if(context[xDomainRequest])return new XDomainRequest;throw new Error("Browser does not support cross-origin requests")}return context[xmlHttpRequest]?new XMLHttpRequest:XHR2?new XHR2:new ActiveXObject("Microsoft.XMLHTTP")},globalSetupOptions={dataFilter:function(e){return e}};return Reqwest.prototype={abort:function(){this._aborted=!0,this.request.abort()},retry:function(){init.call(this,this.o,this.fn)},then:function(e,t){return e=e||function(){},t=t||function(){},this._fulfilled?this._responseArgs.resp=e(this._responseArgs.resp):this._erred?t(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):(this._fulfillmentHandlers.push(e),this._errorHandlers.push(t)),this},always:function(e){return this._fulfilled||this._erred?e(this._responseArgs.resp):this._completeHandlers.push(e),this},fail:function(e){return this._erred?e(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):this._errorHandlers.push(e),this},"catch":function(e){return this.fail(e)}},reqwest.serializeArray=function(){var e=[];return eachFormElement.apply(function(t,n){e.push({name:t,value:n})},arguments),e},reqwest.serialize=function(){if(0===arguments.length)return"";var e,t,n=Array.prototype.slice.call(arguments,0);return e=n.pop(),e&&e.nodeType&&n.push(e)&&(e=null),e&&(e=e.type),t="map"==e?serializeHash:"array"==e?reqwest.serializeArray:serializeQueryString,t.apply(null,n)},reqwest.toQueryString=function(e,t){var n,i,r=t||!1,o=[],s=encodeURIComponent,a=function(e,t){t="function"==typeof t?t():null==t?"":t,o[o.length]=s(e)+"="+s(t)};if(isArray(e))for(i=0;e&&i<e.length;i++)a(e[i].name,e[i].value);else for(n in e)e.hasOwnProperty(n)&&buildParams(n,e[n],r,a);return o.join("&").replace(/%20/g,"+")},reqwest.getcallbackPrefix=function(){return callbackPrefix},reqwest.compat=function(e,t){return e&&(e.type&&(e.method=e.type)&&delete e.type,e.dataType&&(e.type=e.dataType),e.jsonpCallback&&(e.jsonpCallbackName=e.jsonpCallback)&&delete e.jsonpCallback,e.jsonp&&(e.jsonpCallback=e.jsonp)),new Reqwest(e,t)},reqwest.ajaxSetup=function(e){e=e||{};for(var t in e)globalSetupOptions[t]=e[t]},reqwest})},function(e,t){},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(24),s=r(o),a=n(79),u=r(a),l=n(80),c=r(l),f=n(82),h=r(f),p=n(83),d=r(p),v=new s["default"].Color(16777215),_=new s["default"].Color(6710886),m=function(){var e={color:"#ffffff",transparent:!1,opacity:1,blending:s["default"].NormalBlending,height:0,lineOpacity:1,lineTransparent:!1,lineColor:"#ffffff",lineWidth:1,lineBlending:s["default"].NormalBlending
},t=function(e,t){var n=[];if(t){for(var i in e.objects)n.push(u["default"].feature(e,e.objects[i]));return(0,c["default"])(n)}if(e.type)return Array.isArray(e)?(0,c["default"])(e):e;for(var r in e)e[r].type&&n.push(e[r]);return(0,c["default"])(n)},n=function(e,t,n){var i,r=[],o=[];return e.forEach(function(s,a){o.push([t.r,t.g,t.b]),r.push([s[0],n,s[1]]),i=e[a+1]?e[a+1]:s,o.push([t.r,t.g,t.b]),r.push([i[0],n,i[1]])}),{vertices:r,colours:o}},r=function(e,t,i){var r,o=[],s=[];return e.forEach(function(e){r=n(e,t,i),r.vertices.forEach(function(e){o.push(e)}),r.colours.forEach(function(e){s.push(e)})}),{vertices:o,colours:s}},o=function(e,t,n){var r=a(e),o=l(r.vertices,r.holes,r.dimensions),s=[];for(i=0,il=r.vertices.length;i<il;i+=r.dimensions)s.push(r.vertices.slice(i,i+r.dimensions));var u,c=(0,d["default"])(s,o,{bottom:0,top:n}),f=t.clone().multiply(v),h=t.clone().multiply(_),p=c.positions,m=[],y=[];c.top.forEach(function(e,n){u=[],u.push([t.r,t.g,t.b]),u.push([t.r,t.g,t.b]),u.push([t.r,t.g,t.b]),m.push(e),y.push(u)});var g=!0;return c.sides&&(g&&(g=!1),c.sides.forEach(function(e,t){u=[],t%2===0?(u.push([h.r,h.g,h.b]),u.push([h.r,h.g,h.b]),u.push([f.r,f.g,f.b])):(u.push([f.r,f.g,f.b]),u.push([f.r,f.g,f.b]),u.push([h.r,h.g,h.b])),m.push(e),y.push(u)})),{vertices:p,faces:m,colours:y,flat:g}},a=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},i=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var s=0;t>s;s++)n.vertices.push(e[r][o][s]);r>0&&(i+=e[r-1].length,n.holes.push(i))}return n},l=function(e,t,n){var r=(0,h["default"])(e,t,n),o=[];for(i=0,il=r.length;i<il;i+=3)o.push(r.slice(i,i+3));return o};return{defaultStyle:e,collectFeatures:t,lineStringAttributes:n,multiLineStringAttributes:r,polygonAttributes:o}}();t["default"]=m,e.exports=t["default"]},function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(){}function n(e){if(!e)return t;var n,i,r=e.scale[0],o=e.scale[1],s=e.translate[0],a=e.translate[1];return function(e,t){t||(n=i=0),e[0]=(n+=e[0])*r+s,e[1]=(i+=e[1])*o+a}}function i(e){if(!e)return t;var n,i,r=e.scale[0],o=e.scale[1],s=e.translate[0],a=e.translate[1];return function(e,t){t||(n=i=0);var u=(e[0]-s)/r|0,l=(e[1]-a)/o|0;e[0]=u-n,e[1]=l-i,n=u,i=l}}function r(e,t){for(var n,i=e.length,r=i-t;r<--i;)n=e[r],e[r++]=e[i],e[i]=n}function o(e,t){for(var n=0,i=e.length;i>n;){var r=n+i>>>1;e[r]<t?n=r+1:i=r}return n}function s(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return a(e,t)})}:a(e,t)}function a(e,t){var n={type:"Feature",id:t.id,properties:t.properties||{},geometry:u(e,t)};return null==t.id&&delete n.id,n}function u(e,t){function i(e,t){t.length&&t.pop();for(var n,i=f[0>e?~e:e],o=0,s=i.length;s>o;++o)t.push(n=i[o].slice()),c(n,o);0>e&&r(t,s)}function o(e){return e=e.slice(),c(e,0),e}function s(e){for(var t=[],n=0,r=e.length;r>n;++n)i(e[n],t);return t.length<2&&t.push(t[0].slice()),t}function a(e){for(var t=s(e);t.length<4;)t.push(t[0].slice());return t}function u(e){return e.map(a)}function l(e){var t=e.type;return"GeometryCollection"===t?{type:t,geometries:e.geometries.map(l)}:t in h?{type:t,coordinates:h[t](e)}:null}var c=n(e.transform),f=e.arcs,h={Point:function(e){return o(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(o)},LineString:function(e){return s(e.arcs)},MultiLineString:function(e){return e.arcs.map(s)},Polygon:function(e){return u(e.arcs)},MultiPolygon:function(e){return e.arcs.map(u)}};return l(t)}function l(e,t){function n(t){var n,i=e.arcs[0>t?~t:t],r=i[0];return e.transform?(n=[0,0],i.forEach(function(e){n[0]+=e[0],n[1]+=e[1]})):n=i[i.length-1],0>t?[n,r]:[r,n]}function i(e,t){for(var n in e){var i=e[n];delete t[i.start],delete i.start,delete i.end,i.forEach(function(e){r[0>e?~e:e]=1}),a.push(i)}}var r={},o={},s={},a=[],u=-1;return t.forEach(function(n,i){var r,o=e.arcs[0>n?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(r=t[++u],t[u]=n,t[i]=r)}),t.forEach(function(e){var t,i,r=n(e),a=r[0],u=r[1];if(t=s[a])if(delete s[t.end],t.push(e),t.end=u,i=o[u]){delete o[i.start];var l=i===t?t:t.concat(i);o[l.start=t.start]=s[l.end=i.end]=l}else o[t.start]=s[t.end]=t;else if(t=o[u])if(delete o[t.start],t.unshift(e),t.start=a,i=s[a]){delete s[i.end];var c=i===t?t:i.concat(t);o[c.start=i.start]=s[c.end=t.end]=c}else o[t.start]=s[t.end]=t;else t=[e],o[t.start=a]=s[t.end=u]=t}),i(s,o),i(o,s),t.forEach(function(e){r[0>e?~e:e]||a.push([e])}),a}function c(e){return u(e,f.apply(this,arguments))}function f(e,t,n){function i(e){var t=0>e?~e:e;(c[t]||(c[t]=[])).push({i:e,g:u})}function r(e){e.forEach(i)}function o(e){e.forEach(r)}function s(e){"GeometryCollection"===e.type?e.geometries.forEach(s):e.type in f&&(u=e,f[e.type](e.arcs))}var a=[];if(arguments.length>1){var u,c=[],f={LineString:r,MultiLineString:o,Polygon:o,MultiPolygon:function(e){e.forEach(o)}};s(t),c.forEach(arguments.length<3?function(e){a.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&a.push(e[0].i)})}else for(var h=0,p=e.arcs.length;p>h;++h)a.push(h);return{type:"MultiLineString",arcs:l(e,a)}}function h(e){var t=e[0],n=e[1],i=e[2];return Math.abs((t[0]-i[0])*(n[1]-t[1])-(t[0]-n[0])*(i[1]-t[1]))}function p(e){for(var t,n=-1,i=e.length,r=e[i-1],o=0;++n<i;)t=r,r=e[n],o+=t[0]*r[1]-t[1]*r[0];return o/2}function d(e){return u(e,v.apply(this,arguments))}function v(e,t){function n(e){e.forEach(function(t){t.forEach(function(t){(r[t=0>t?~t:t]||(r[t]=[])).push(e)})}),o.push(e)}function i(t){return p(u(e,{type:"Polygon",arcs:[t]}).coordinates[0])>0}var r={},o=[],s=[];return t.forEach(function(e){"Polygon"===e.type?n(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(n)}),o.forEach(function(e){if(!e._){var t=[],n=[e];for(e._=1,s.push(t);e=n.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){r[0>e?~e:e].forEach(function(e){e._||(e._=1,n.push(e))})})})}}),o.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:s.map(function(t){var n,o=[];if(t.forEach(function(e){e.forEach(function(e){e.forEach(function(e){r[0>e?~e:e].length<2&&o.push(e)})})}),o=l(e,o),(n=o.length)>1)for(var s,a=i(t[0][0]),u=0;n>u;++u)if(a===i(o[u])){s=o[0],o[0]=o[u],o[u]=s;break}return o})}}function _(e){function t(e,t){e.forEach(function(e){0>e&&(e=~e);var n=r[e];n?n.push(t):r[e]=[t]})}function n(e,n){e.forEach(function(e){t(e,n)})}function i(e,t){"GeometryCollection"===e.type?e.geometries.forEach(function(e){i(e,t)}):e.type in a&&a[e.type](e.arcs,t)}var r={},s=e.map(function(){return[]}),a={LineString:t,MultiLineString:n,Polygon:n,MultiPolygon:function(e,t){e.forEach(function(e){n(e,t)})}};e.forEach(i);for(var u in r)for(var l=r[u],c=l.length,f=0;c>f;++f)for(var h=f+1;c>h;++h){var p,d=l[f],v=l[h];(p=s[d])[u=o(p,v)]!==v&&p.splice(u,0,v),(p=s[v])[u=o(p,d)]!==d&&p.splice(u,0,d)}return s}function m(e,t){return e[1][2]-t[1][2]}function y(){function e(e,t){for(;t>0;){var n=(t+1>>1)-1,r=i[n];if(m(e,r)>=0)break;i[r._=t]=r,i[e._=t=n]=e}}function t(e,t){for(;;){var n=t+1<<1,o=n-1,s=t,a=i[s];if(r>o&&m(i[o],a)<0&&(a=i[s=o]),r>n&&m(i[n],a)<0&&(a=i[s=n]),s===t)break;i[a._=t]=a,i[e._=t=s]=e}}var n={},i=[],r=0;return n.push=function(t){return e(i[t._=r]=t,r++),r},n.pop=function(){if(!(0>=r)){var e,n=i[0];return--r>0&&(e=i[r],t(i[e._=0]=e,0)),n}},n.remove=function(n){var o,s=n._;if(i[s]===n)return s!==--r&&(o=i[r],(m(o,n)<0?e:t)(i[o._=s]=o,s)),s},n}function g(e,t){function r(e){a.remove(e),e[1][2]=t(e),a.push(e)}var o=n(e.transform),s=i(e.transform),a=y();return t||(t=h),e.arcs.forEach(function(e){var n,i,u,l,c=[],f=0;for(i=0,u=e.length;u>i;++i)l=e[i],o(e[i]=[l[0],l[1],1/0],i);for(i=1,u=e.length-1;u>i;++i)n=e.slice(i-1,i+2),n[1][2]=t(n),c.push(n),a.push(n);for(i=0,u=c.length;u>i;++i)n=c[i],n.previous=c[i-1],n.next=c[i+1];for(;n=a.pop();){var h=n.previous,p=n.next;n[1][2]<f?n[1][2]=f:f=n[1][2],h&&(h.next=p,h[2]=n[2],r(h)),p&&(p.previous=h,p[0]=n[0],r(p))}e.forEach(s)}),e}var b="1.6.24";e.version=b,e.mesh=c,e.meshArcs=f,e.merge=d,e.mergeArcs=v,e.feature=s,e.neighbors=_,e.presimplify=g})},function(e,t,n){var i=n(81);e.exports=function(e){return{type:"FeatureCollection",features:e.reduce(function(e,t){return e.concat(i(t).features)},[])}}},function(e,t){function n(e){if(!e||!e.type)return null;var t=i[e.type];return t?"geometry"===t?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:e}]}:"feature"===t?{type:"FeatureCollection",features:[e]}:"featurecollection"===t?e:void 0:null}e.exports=n;var i={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"}},function(e,t){"use strict";function n(e,t,n){n=n||2;var r=t&&t.length,s=r?t[0]*n:e.length,a=i(e,0,s,n,!0),u=[];if(!a)return u;var l,f,h,p,d,v,_;if(r&&(a=c(e,t,a,n)),e.length>80*n){l=h=e[0],f=p=e[1];for(var m=n;s>m;m+=n)d=e[m],v=e[m+1],l>d&&(l=d),f>v&&(f=v),d>h&&(h=d),v>p&&(p=v);_=Math.max(h-l,p-f)}return o(a,u,n,l,f,_),u}function i(e,t,n,i,r){var o,s,a,u=0;for(o=t,s=n-i;n>o;o+=i)u+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;if(r===u>0)for(o=t;n>o;o+=i)a=E(o,e[o],e[o+1],a);else for(o=n-i;o>=t;o-=i)a=E(o,e[o],e[o+1],a);return a}function r(e,t){if(!e)return e;t||(t=e);var n,i=e;do if(n=!1,i.steiner||!w(i,i.next)&&0!==b(i.prev,i,i.next))i=i.next;else{if(O(i),i=t=i.prev,i===i.next)return null;n=!0}while(n||i!==t);return t}function o(e,t,n,i,c,f,h){if(e){!h&&f&&d(e,i,c,f);for(var p,v,_=e;e.prev!==e.next;)if(p=e.prev,v=e.next,f?a(e,i,c,f):s(e))t.push(p.i/n),t.push(e.i/n),t.push(v.i/n),O(e),e=v.next,_=v.next;else if(e=v,e===_){h?1===h?(e=u(e,t,n),o(e,t,n,i,c,f,2)):2===h&&l(e,t,n,i,c,f):o(r(e),t,n,i,c,f,1);break}}}function s(e){var t=e.prev,n=e,i=e.next;if(b(t,n,i)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(y(t.x,t.y,n.x,n.y,i.x,i.y,r.x,r.y)&&b(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function a(e,t,n,i){var r=e.prev,o=e,s=e.next;if(b(r,o,s)>=0)return!1;for(var a=r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,u=r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,l=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,c=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,f=_(a,u,t,n,i),h=_(l,c,t,n,i),p=e.nextZ;p&&p.z<=h;){if(p!==e.prev&&p!==e.next&&y(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=e.prevZ;p&&p.z>=f;){if(p!==e.prev&&p!==e.next&&y(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(e,t,n){var i=e;do{var r=i.prev,o=i.next.next;x(r,i,i.next,o)&&M(r,o)&&M(o,r)&&(t.push(r.i/n),t.push(i.i/n),t.push(o.i/n),O(i),O(i.next),i=e=o),i=i.next}while(i!==e);return i}function l(e,t,n,i,s,a){var u=e;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&g(u,l)){var c=k(u,l);return u=r(u,u.next),c=r(c,c.next),o(u,t,n,i,s,a),void o(c,t,n,i,s,a)}l=l.next}u=u.next}while(u!==e)}function c(e,t,n,o){var s,a,u,l,c,p=[];for(s=0,a=t.length;a>s;s++)u=t[s]*o,l=a-1>s?t[s+1]*o:e.length,c=i(e,u,l,o,!1),c===c.next&&(c.steiner=!0),p.push(m(c));for(p.sort(f),s=0;s<p.length;s++)h(p[s],n),n=r(n,n.next);return n}function f(e,t){return e.x-t.x}function h(e,t){if(t=p(e,t)){var n=k(t,e);r(n,n.next)}}function p(e,t){var n,i=t,r=e.x,o=e.y,s=-(1/0);do{if(o<=i.y&&o>=i.next.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);r>=a&&a>s&&(s=a,n=i.x<i.next.x?i:i.next)}i=i.next}while(i!==t);if(!n)return null;if(e.x===n.x)return n.prev;var u,l=n,c=1/0;for(i=n.next;i!==l;)r>=i.x&&i.x>=n.x&&y(o<n.y?r:s,o,n.x,n.y,o<n.y?s:r,o,i.x,i.y)&&(u=Math.abs(o-i.y)/(r-i.x),(c>u||u===c&&i.x>n.x)&&M(i,e)&&(n=i,c=u)),i=i.next;return n}function d(e,t,n,i){var r=e;do null===r.z&&(r.z=_(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,v(r)}function v(e){var t,n,i,r,o,s,a,u,l=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,i=n,a=0,t=0;l>t&&(a++,i=i.nextZ,i);t++);for(u=l;a>0||u>0&&i;)0===a?(r=i,i=i.nextZ,u--):0!==u&&i?n.z<=i.z?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,u--):(r=n,n=n.nextZ,a--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;n=i}o.nextZ=null,l*=2}while(s>1);return e}function _(e,t,n,i,r){return e=32767*(e-n)/r,t=32767*(t-i)/r,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1}function m(e){var t=e,n=e;do t.x<n.x&&(n=t),t=t.next;while(t!==e);return n}function y(e,t,n,i,r,o,s,a){return(r-s)*(t-a)-(e-s)*(o-a)>=0&&(e-s)*(i-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(r-s)*(i-a)>=0}function g(e,t){return w(e,t)||e.next.i!==t.i&&e.prev.i!==t.i&&!T(e,t)&&M(e,t)&&M(t,e)&&P(e,t)}function b(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function w(e,t){return e.x===t.x&&e.y===t.y}function x(e,t,n,i){return b(e,t,n)>0!=b(e,t,i)>0&&b(n,i,e)>0!=b(n,i,t)>0}function T(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&x(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function M(e,t){return b(e.prev,e,e.next)<0?b(e,t,e.next)>=0&&b(e,e.prev,t)>=0:b(e,t,e.prev)<0||b(e,e.next,t)<0}function P(e,t){var n=e,i=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do n.y>o!=n.next.y>o&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function k(e,t){var n=new S(e.i,e.x,e.y),i=new S(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function E(e,t,n,i){var r=new S(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function O(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function S(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}e.exports=n},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=i(r),s=function(e,t,n){function i(){s=e.map(function(e){return[e[0],h.top,e[1]]}),a=t,u=t}function r(){s=[],e.forEach(function(e){s.push([e[0],h.top,e[1]])}),e.forEach(function(e){s.push([e[0],h.bottom,e[1]])}),a=[];for(var n=0;p>n;n++)n===p-1?(a.push([n+p,p,n]),a.push([0,n,p])):(a.push([n+p,n+p+1,n]),a.push([n+1,n,n+p+1]));if(c=[].concat(a),h.closed){var i=t,r=i.map(function(e){return e.map(function(e){return e+p})});r=r.map(function(e){return[e[0],e[2],e[1]]}),a=a.concat(i).concat(r),u=i,l=r}}var s,a,u,l,c,f={top:1,bottom:0,closed:!0},h=(0,o["default"])({},f,n),p=e.length;return h.top===h.bottom?i():r(),{positions:s,faces:a,top:u,bottom:l,sides:c}};t["default"]=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=function(){var e=function(e){var t={};e.forEach(function(e){for(var n in e)t[n]||(t[n]=0),t[n]+=e[n].length});var n={};for(var i in t)n[i]=new Float32Array(t[i]);var r={};return e.forEach(function(e){for(var t in e)r[t]||(r[t]=0),n[t].set(e[t],r[t]),r[t]+=e[t].length}),n},t=function(e,t){var n,i=new o["default"].BufferGeometry,r=new Float32Array(3*e.verticesCount),s=new Float32Array(3*e.verticesCount);e.pickingIds&&(n=new Float32Array(e.verticesCount));for(var a,u,l,c=0,f=0;f<e.vertices.length;f++){a=e.vertices[f],u=e.colours[f],n&&(l=e.pickingIds[f]);for(var h=0;h<a.length;h++){var p=a[h][0]+t.x,d=a[h][1],v=a[h][2]+t.y,_=u[h];r[3*c+0]=p,r[3*c+1]=d,r[3*c+2]=v,s[3*c+0]=_[0],s[3*c+1]=_[1],s[3*c+2]=_[2],n&&(n[c]=l),c++}}return i.addAttribute("position",new o["default"].BufferAttribute(r,3)),i.addAttribute("color",new o["default"].BufferAttribute(s,3)),n&&i.addAttribute("pickingId",new o["default"].BufferAttribute(n,1)),i.computeBoundingBox(),i},n=function(e,t){var n,i=new o["default"].BufferGeometry,r=new Float32Array(9*e.facesCount),s=new Float32Array(9*e.facesCount),a=new Float32Array(9*e.facesCount);e.pickingIds&&(n=new Float32Array(3*e.facesCount));for(var u,l,c,f,h,p=new o["default"].Vector3,d=new o["default"].Vector3,v=new o["default"].Vector3,_=new o["default"].Vector3,m=new o["default"].Vector3,y=0,g=0;g<e.faces.length;g++){l=e.faces[g],c=e.vertices[g],f=e.colours[g],n&&(h=e.pickingIds[g]);for(var b=0;b<l.length;b++){u=l[b][0];var w=c[u][0]+t.x,x=c[u][1],T=c[u][2]+t.y,M=f[b][0];u=l[b][1];var P=c[u][0]+t.x,k=c[u][1],E=c[u][2]+t.y,O=f[b][1];u=l[b][2];var S=c[u][0]+t.x,j=c[u][1],A=c[u][2]+t.y,C=f[b][2];p.set(w,x,T),d.set(P,k,E),v.set(S,j,A),_.subVectors(v,d),m.subVectors(p,d),_.cross(m),_.normalize();var D=_.x,L=_.y,R=_.z;r[9*y+0]=w,r[9*y+1]=x,r[9*y+2]=T,s[9*y+0]=D,s[9*y+1]=L,s[9*y+2]=R,a[9*y+0]=M[0],a[9*y+1]=M[1],a[9*y+2]=M[2],r[9*y+3]=P,r[9*y+4]=k,r[9*y+5]=E,s[9*y+3]=D,s[9*y+4]=L,s[9*y+5]=R,a[9*y+3]=O[0],a[9*y+4]=O[1],a[9*y+5]=O[2],r[9*y+6]=S,r[9*y+7]=j,r[9*y+8]=A,s[9*y+6]=D,s[9*y+7]=L,s[9*y+8]=R,a[9*y+6]=C[0],a[9*y+7]=C[1],a[9*y+8]=C[2],n&&(n[3*y+0]=h,n[3*y+1]=h,n[3*y+2]=h),y++}}return i.addAttribute("position",new o["default"].BufferAttribute(r,3)),i.addAttribute("normal",new o["default"].BufferAttribute(s,3)),i.addAttribute("color",new o["default"].BufferAttribute(a,3)),n&&i.addAttribute("pickingId",new o["default"].BufferAttribute(n,1)),i.computeBoundingBox(),i};return{mergeAttributes:e,createLineGeometry:t,createGeometry:n}}();t["default"]=s,e.exports=t["default"]},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=i(r),s=n(86),a=i(s),u=function(){o["default"].ShaderMaterial.call(this,{uniforms:{size:{type:"f",value:.01},scale:{type:"f",value:400}},vertexShader:a["default"].vertexShader,fragmentShader:a["default"].fragmentShader}),this.linePadding=2};u.prototype=Object.create(o["default"].ShaderMaterial.prototype),u.prototype.constructor=u,u.prototype.setPointSize=function(e){this.uniforms.size.value=e},u.prototype.setPointScale=function(e){this.uniforms.scale.value=e},t["default"]=u,e.exports=t["default"]},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={vertexShader:["attribute float pickingId;","","varying vec4 worldId;","","void main() {"," vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );"," vec3 a = fract(vec3(1.0/255.0, 1.0/(255.0*255.0), 1.0/(255.0*255.0*255.0)) * pickingId);"," a -= a.xxy * vec3(0.0, 1.0/255.0, 1.0/255.0);"," worldId = vec4(a,1);"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#ifdef GL_ES\n","precision highp float;\n","#endif\n","","varying vec4 worldId;","","void main() {"," gl_FragColor = worldId;","}"].join("\n")};t["default"]=n,e.exports=t["default"]},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},l=n(46),c=r(l),f=n(3),h=r(f),p=n(24),d=r(p),v=n(10),_=n(11),m=n(82),y=r(m),g=n(83),b=r(g),w=n(85),x=r(w),T=n(84),M=r(T),P=function(e){function t(e,n){o(this,t);var i={output:!0,interactive:!1,material:null,onMesh:null,onBufferAttributes:null,style:{color:"#ffffff",transparent:!1,opacity:1,blending:d["default"].NormalBlending,height:0}},r=(0,h["default"])({},i,n);u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,r),this._coordinates=t.isSingle(e)?[e]:e}return s(t,e),a(t,[{key:"_onAdd",value:function(e){this._setCoordinates(),this._options.interactive&&(this.isOutput()&&(this._pickingMesh=new d["default"].Object3D,this.addToPicking(this._pickingMesh)),this._setPickingId(),this._addPickingEvents()),this._setBufferAttributes(),this.isOutput()&&(this._setMesh(this._bufferAttributes),this.add(this._mesh))}},{key:"getCenter",value:function(){return this._center}},{key:"getBounds",value:function(){}},{key:"_setPickingId",value:function(){this._pickingId=this.getPickingId()}},{key:"_addPickingEvents",value:function(){var e=this;this._world.on("pick-"+this._pickingId,function(t,n,i){e.emit("click",e,t,n,i)})}},{key:"_setBufferAttributes",value:function(){var e,t=this;if("function"==typeof this._options.onBufferAttributes)e=this._options.onBufferAttributes(this);else{var n=0;this._options.style.height&&0!==this._options.style.height&&(n=this._world.metresToWorld(this._options.style.height,this._pointScale));var r=new d["default"].Color;r.set(this._options.style.color);var o=new d["default"].Color(16777215),s=new d["default"].Color(6710886);e=this._projectedCoordinates.map(function(e){var a=t._toEarcut(e),u=t._triangulate(a.vertices,a.holes,a.dimensions),l=[];for(i=0,il=a.vertices.length;i<il;i+=a.dimensions)l.push(a.vertices.slice(i,i+a.dimensions));var c,f=(0,b["default"])(l,u,{bottom:0,top:n}),h=r.clone().multiply(o),p=r.clone().multiply(s),d=f.positions,v=[],_=[];f.top.forEach(function(e,t){c=[],c.push([r.r,r.g,r.b]),c.push([r.r,r.g,r.b]),c.push([r.r,r.g,r.b]),v.push(e),_.push(c)}),t._flat=!0,f.sides&&(t._flat=!1,f.sides.forEach(function(e,t){c=[],t%2===0?(c.push([p.r,p.g,p.b]),c.push([p.r,p.g,p.b]),c.push([h.r,h.g,h.b])):(c.push([h.r,h.g,h.b]),c.push([h.r,h.g,h.b]),c.push([p.r,p.g,p.b])),v.push(e),_.push(c)}));var m={vertices:d,faces:v,colours:_,facesCount:v.length};return t._options.interactive&&t._pickingId&&(m.pickingId=t._pickingId),t._toAttributes(m)})}this._bufferAttributes=M["default"].mergeAttributes(e),e=null}},{key:"getBufferAttributes",value:function(){return this._bufferAttributes}},{key:"clearBufferAttributes",value:function(){this._bufferAttributes=null}},{key:"clearCoordinates",value:function(){this._coordinates=null,this._projectedCoordinates=null}},{key:"_setMesh",value:function(e){var t=new d["default"].BufferGeometry;t.addAttribute("position",new d["default"].BufferAttribute(e.vertices,3)),t.addAttribute("normal",new d["default"].BufferAttribute(e.normals,3)),t.addAttribute("color",new d["default"].BufferAttribute(e.colours,3)),e.pickingIds&&t.addAttribute("pickingId",new d["default"].BufferAttribute(e.pickingIds,1)),t.computeBoundingBox();var n;this._options.material&&this._options.material instanceof d["default"].Material?n=this._options.material:this._world._environment._skybox?(n=new d["default"].MeshStandardMaterial({vertexColors:d["default"].VertexColors,side:d["default"].BackSide,transparent:this._options.style.transparent,opacity:this._options.style.opacity,blending:this._options.style.blending}),n.roughness=1,n.metalness=.1,n.envMapIntensity=3,n.envMap=this._world._environment._skybox.getRenderTarget()):n=new d["default"].MeshPhongMaterial({vertexColors:d["default"].VertexColors,side:d["default"].BackSide,transparent:this._options.style.transparent,opacity:this._options.style.opacity,blending:this._options.style.blending});var i;if("function"==typeof this._options.onMesh?i=this._options.onMesh(t,n):(i=new d["default"].Mesh(t,n),i.castShadow=!0,i.receiveShadow=!0),this.isFlat()&&(n.depthWrite=!1,i.renderOrder=1),this._options.interactive&&this._pickingMesh){n=new x["default"],n.side=d["default"].BackSide;var r=new d["default"].Mesh(t,n);this._pickingMesh.add(r)}this._mesh=i}},{key:"_setCoordinates",value:function(){this._bounds=[],this._coordinates=this._convertCoordinates(this._coordinates),this._projectedBounds=[],this._projectedCoordinates=this._projectCoordinates(),this._center=this._coordinates[0][0][0]}},{key:"_convertCoordinates",value:function(e){return e.map(function(e){return e.map(function(e){return e.map(function(e){return(0,v.latLon)(e[1],e[0])})})})}},{key:"_projectCoordinates",value:function(){var e,t=this;return this._coordinates.map(function(n){return n.map(function(n){return n.map(function(n){return e=t._world.latLonToPoint(n),t._offset||(t._offset=(0,_.point)(0,0),t._offset.x=-1*e.x,t._offset.y=-1*e.y,t._pointScale=t._world.pointScale(n)),e})})})}},{key:"_toEarcut",value:function(e){for(var t=2,n={vertices:[],holes:[],dimensions:t},i=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)n.vertices.push(e[r][o].x),n.vertices.push(e[r][o].y);r>0&&(i+=e[r-1].length,n.holes.push(i))}return n}},{key:"_triangulate",value:function(e,t,n){var r=(0,y["default"])(e,t,n),o=[];for(i=0,il=r.length;i<il;i+=3)o.push(r.slice(i,i+3));return o}},{key:"_toAttributes",value:function(e){var t,n=new Float32Array(9*e.facesCount),i=new Float32Array(9*e.facesCount),r=new Float32Array(9*e.facesCount);e.pickingId&&(t=new Float32Array(3*e.facesCount));var o,s,a=new d["default"].Vector3,u=new d["default"].Vector3,l=new d["default"].Vector3,c=new d["default"].Vector3,f=new d["default"].Vector3,h=e.faces,p=e.vertices,v=e.colours;t&&(s=e.pickingId);for(var _=0,m=0;m<h.length;m++){o=h[m][0];var y=p[o][0],g=p[o][1],b=p[o][2],w=v[m][0];o=h[m][1];var x=p[o][0],T=p[o][1],M=p[o][2],P=v[m][1];o=h[m][2];var k=p[o][0],E=p[o][1],O=p[o][2],S=v[m][2];a.set(y,g,b),u.set(x,T,M),l.set(k,E,O),c.subVectors(l,u),f.subVectors(a,u),c.cross(f),c.normalize();var j=c.x,A=c.y,C=c.z;n[9*_+0]=y,n[9*_+1]=g,n[9*_+2]=b,i[9*_+0]=j,i[9*_+1]=A,i[9*_+2]=C,r[9*_+0]=w[0],r[9*_+1]=w[1],r[9*_+2]=w[2],n[9*_+3]=x,n[9*_+4]=T,n[9*_+5]=M,i[9*_+3]=j,i[9*_+4]=A,i[9*_+5]=C,r[9*_+3]=P[0],r[9*_+4]=P[1],r[9*_+5]=P[2],n[9*_+6]=k,n[9*_+7]=E,n[9*_+8]=O,i[9*_+6]=j,i[9*_+7]=A,i[9*_+8]=C,r[9*_+6]=S[0],r[9*_+7]=S[1],r[9*_+8]=S[2],t&&(t[3*_+0]=s,t[3*_+1]=s,t[3*_+2]=s),_++}var D={vertices:n,normals:i,colours:r};return t&&(D.pickingIds=t),D}},{key:"isFlat",value:function(){return this._flat}},{key:"destroy",value:function(){this._pickingMesh&&(this._pickingMesh=null),this.clearCoordinates(),this.clearBufferAttributes(),u(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}],[{key:"isSingle",value:function(e){return!Array.isArray(e[0][0][0])}}]),t}(c["default"]);t["default"]=P;var k=function(e,t){return new P(e,t)};t.polygonLayer=k},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(46),l=i(u),c=n(3),f=i(c),h=n(24),p=i(h),d=n(10),v=n(11),_=n(85),m=i(_),y=n(84),g=i(y),b=function(e){function t(e,n){r(this,t);var i={output:!0,interactive:!1,material:null,onMesh:null,onBufferAttributes:null,style:{lineOpacity:1,lineTransparent:!1,lineColor:"#ffffff",lineWidth:1,lineBlending:p["default"].NormalBlending}},o=(0,f["default"])({},i,n);a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,o),this._coordinates=t.isSingle(e)?[e]:e,this._flat=!0}return o(t,e),s(t,[{key:"_onAdd",value:function(e){this._setCoordinates(),this._options.interactive&&(this.isOutput()&&(this._pickingMesh=new p["default"].Object3D,this.addToPicking(this._pickingMesh)),this._setPickingId(),this._addPickingEvents()),this._setBufferAttributes(),this.isOutput()&&(this._setMesh(this._bufferAttributes),this.add(this._mesh))}},{key:"getCenter",value:function(){return this._center}},{key:"getBounds",value:function(){}},{key:"_setPickingId",value:function(){this._pickingId=this.getPickingId()}},{key:"_addPickingEvents",value:function(){var e=this;this._world.on("pick-"+this._pickingId,function(t,n,i){e.emit("click",e,t,n,i)})}},{key:"_setBufferAttributes",value:function(){var e,t=this;if("function"==typeof this._options.onBufferAttributes)e=this._options.onBufferAttributes(this);else{var n=0;this._options.style.lineHeight&&(n=this._world.metresToWorld(this._options.style.lineHeight,this._pointScale));var i=new p["default"].Color;i.set(this._options.style.lineColor),e=this._projectedCoordinates.map(function(e){var r,o=[],s=[];e.forEach(function(t,a){s.push([i.r,i.g,i.b]),o.push([t.x,n,t.y]),r=e[a+1]?e[a+1]:t,s.push([i.r,i.g,i.b]),o.push([r.x,n,r.y])});var a={vertices:o,colours:s,verticesCount:o.length};return t._options.interactive&&t._pickingId&&(a.pickingId=t._pickingId),t._toAttributes(a)})}this._bufferAttributes=g["default"].mergeAttributes(e),e=null}},{key:"getBufferAttributes",value:function(){return this._bufferAttributes}},{key:"clearBufferAttributes",value:function(){this._bufferAttributes=null}},{key:"clearCoordinates",value:function(){this._coordinates=null,this._projectedCoordinates=null}},{key:"_setMesh",value:function(e){var t=new p["default"].BufferGeometry;t.addAttribute("position",new p["default"].BufferAttribute(e.vertices,3)),e.normals&&t.addAttribute("normal",new p["default"].BufferAttribute(e.normals,3)),t.addAttribute("color",new p["default"].BufferAttribute(e.colours,3)),e.pickingIds&&t.addAttribute("pickingId",new p["default"].BufferAttribute(e.pickingIds,1)),t.computeBoundingBox();var n,i=this._options.style;n=this._options.material&&this._options.material instanceof p["default"].Material?this._options.material:new p["default"].LineBasicMaterial({vertexColors:p["default"].VertexColors,linewidth:i.lineWidth,transparent:i.lineTransparent,opacity:i.lineOpacity,blending:i.lineBlending});var r;if("function"==typeof this._options.onMesh?r=this._options.onMesh(t,n):(r=new p["default"].LineSegments(t,n),void 0!==i.lineRenderOrder&&(n.depthWrite=!1,r.renderOrder=i.lineRenderOrder),r.castShadow=!0),this._options.interactive&&this._pickingMesh){n=new m["default"],n.linewidth=i.lineWidth+n.linePadding;var o=new p["default"].LineSegments(t,n);this._pickingMesh.add(o)}this._mesh=r}},{key:"_setCoordinates",value:function(){this._bounds=[],this._coordinates=this._convertCoordinates(this._coordinates),this._projectedBounds=[],this._projectedCoordinates=this._projectCoordinates(),this._center=this._coordinates[0][0]}},{key:"_convertCoordinates",value:function(e){return e.map(function(e){return e.map(function(e){return(0,d.latLon)(e[1],e[0])})})}},{key:"_projectCoordinates",value:function(){var e,t=this;return this._coordinates.map(function(n){return n.map(function(n){return e=t._world.latLonToPoint(n),t._offset||(t._offset=(0,v.point)(0,0),t._offset.x=-1*e.x,t._offset.y=-1*e.y,t._pointScale=t._world.pointScale(n)),e})})}},{key:"_toAttributes",value:function(e){var t,n=new Float32Array(3*e.verticesCount),i=new Float32Array(3*e.verticesCount);e.pickingId&&(t=new Float32Array(e.verticesCount));var r,o,s=e.vertices,a=e.colours;e.normals&&(r=new Float32Array(3*e.verticesCount),o=e.normals);var u;t&&(u=e.pickingId);for(var l=0,c=0;c<s.length;c++){var f,h,p,d=s[c][0],v=s[c][1],_=s[c][2];o&&(f=o[c][0],h=o[c][1],p=o[c][2]);var m=a[c];n[3*l+0]=d,n[3*l+1]=v,n[3*l+2]=_,r&&(r[3*l+0]=f,r[3*l+1]=h,r[3*l+2]=p),i[3*l+0]=m[0],i[3*l+1]=m[1],i[3*l+2]=m[2],t&&(t[l]=u),l++}var y={vertices:n,colours:i};return r&&(y.normals=r),t&&(y.pickingIds=t),y}},{key:"isFlat",value:function(){return this._flat}},{
key:"destroy",value:function(){this._pickingMesh&&(this._pickingMesh=null),this.clearCoordinates(),this.clearBufferAttributes(),a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}],[{key:"isSingle",value:function(e){return!Array.isArray(e[0][0])}}]),t}(l["default"]);t["default"]=b;var w=function(e,t){return new b(e,t)};t.polylineLayer=w},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},u=n(46),l=i(u),c=n(3),f=i(c),h=n(24),p=i(h),d=n(10),v=n(11),_=n(85),m=i(_),y=n(84),g=i(y),b=function(e){function t(e,n){r(this,t);var i={output:!0,interactive:!1,geometry:null,material:null,onMesh:null,style:{pointColor:"#ff0000"}},o=(0,f["default"])({},i,n);a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,o),this._coordinates=t.isSingle(e)?[e]:e,this._flat=!0}return o(t,e),s(t,[{key:"_onAdd",value:function(e){this._setCoordinates(),this._options.interactive&&(this.isOutput()&&(this._pickingMesh=new p["default"].Object3D,this.addToPicking(this._pickingMesh)),this._setPickingId(),this._addPickingEvents()),this._setBufferAttributes(),this.isOutput()&&(this._setMesh(this._bufferAttributes),this.add(this._mesh))}},{key:"getCenter",value:function(){return this._center}},{key:"getBounds",value:function(){}},{key:"_setPickingId",value:function(){this._pickingId=this.getPickingId()}},{key:"_addPickingEvents",value:function(){var e=this;this._world.on("pick-"+this._pickingId,function(t,n,i){e.emit("click",e,t,n,i)})}},{key:"_setBufferAttributes",value:function(){var e=this,t=0;this._options.style.pointHeight&&(t=this._world.metresToWorld(this._options.style.pointHeight,this._pointScale));var n=new p["default"].Color;n.set(this._options.style.pointColor);var i;if(!this._options.geometry||!this._options.geometry instanceof p["default"].Geometry||!this._options.geometry instanceof p["default"].BufferGeometry){var r=this._world.metresToWorld(25,this._pointScale),o=this._world.metresToWorld(200,this._pointScale),s=new p["default"].BoxGeometry(r,o,r);s.translate(0,.5*o,0),i=(new p["default"].BufferGeometry).fromGeometry(s)}else i=this._options.geometry instanceof p["default"].BufferGeometry?this._options.geometry:(new p["default"].BufferGeometry).fromGeometry(this._options.geometry);var a=this._projectedCoordinates.map(function(r){var o=[],s=[],a=[],u=i.clone();u.translate(r.x,t,r.y);for(var o=u.attributes.position.clone().array,s=u.attributes.normal.clone().array,a=u.attributes.color.clone().array,l=0;l<a.length;l+=3)a[l]=n.r,a[l+1]=n.g,a[l+2]=n.b;var c={vertices:o,normals:s,colours:a};if(e._options.interactive&&e._pickingId){c.pickingIds=new Float32Array(o.length/3);for(var l=0;l<c.pickingIds.length;l++)c.pickingIds[l]=e._pickingId}return c});this._bufferAttributes=g["default"].mergeAttributes(a),a=null}},{key:"getBufferAttributes",value:function(){return this._bufferAttributes}},{key:"clearBufferAttributes",value:function(){this._bufferAttributes=null}},{key:"clearCoordinates",value:function(){this._coordinates=null,this._projectedCoordinates=null}},{key:"_setMesh",value:function(e){var t=new p["default"].BufferGeometry;t.addAttribute("position",new p["default"].BufferAttribute(e.vertices,3)),t.addAttribute("normal",new p["default"].BufferAttribute(e.normals,3)),t.addAttribute("color",new p["default"].BufferAttribute(e.colours,3)),e.pickingIds&&t.addAttribute("pickingId",new p["default"].BufferAttribute(e.pickingIds,1)),t.computeBoundingBox();var n;this._options.material&&this._options.material instanceof p["default"].Material?n=this._options.material:this._world._environment._skybox?(n=new p["default"].MeshStandardMaterial({vertexColors:p["default"].VertexColors}),n.roughness=1,n.metalness=.1,n.envMapIntensity=3,n.envMap=this._world._environment._skybox.getRenderTarget()):n=new p["default"].MeshBasicMaterial({vertexColors:p["default"].VertexColors});var i;if("function"==typeof this._options.onMesh?i=this._options.onMesh(t,n):(i=new p["default"].Mesh(t,n),i.castShadow=!0),this._options.interactive&&this._pickingMesh){n=new m["default"];var r=new p["default"].Mesh(t,n);this._pickingMesh.add(r)}this._mesh=i}},{key:"_setCoordinates",value:function(){this._bounds=[],this._coordinates=this._convertCoordinates(this._coordinates),this._projectedBounds=[],this._projectedCoordinates=this._projectCoordinates(),this._center=this._coordinates}},{key:"_convertCoordinates",value:function(e){return e.map(function(e){return(0,d.latLon)(e[1],e[0])})}},{key:"_projectCoordinates",value:function(){var e,t=this;return this._coordinates.map(function(n){return e=t._world.latLonToPoint(n),t._offset||(t._offset=(0,v.point)(0,0),t._offset.x=-1*e.x,t._offset.y=-1*e.y,t._pointScale=t._world.pointScale(n)),e})}},{key:"_toAttributes",value:function(e){var t,n=new Float32Array(3*e.verticesCount),i=new Float32Array(3*e.verticesCount);e.pickingId&&(t=new Float32Array(e.verticesCount));var r,o=e.vertices,s=e.colours;t&&(r=e.pickingId);for(var a=0,u=0;u<o.length;u++){var l=o[u][0],c=o[u][1],f=o[u][2],h=s[u];n[3*a+0]=l,n[3*a+1]=c,n[3*a+2]=f,i[3*a+0]=h[0],i[3*a+1]=h[1],i[3*a+2]=h[2],t&&(t[a]=r),a++}var p={vertices:n,colours:i};return t&&(p.pickingIds=t),p}},{key:"isFlat",value:function(){return this._flat}},{key:"destroy",value:function(){this._pickingMesh&&(this._pickingMesh=null),this.clearCoordinates(),this.clearBufferAttributes(),a(Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}],[{key:"isSingle",value:function(e){return!Array.isArray(e[0])}}]),t}(l["default"]);t["default"]=b;var w=function(e,t){return new b(e,t)};t.pointLayer=w},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},a=n(72),u=i(a),l=n(3),c=i(l),f=function(e){function t(e,n){r(this,t);var i={topojson:!0};n=(0,c["default"])({},i,n),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n)}return o(t,e),t}(u["default"]);t["default"]=f;var h=function(e,t){return new f(e,t)};t.topoJSONTileLayer=h},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var i=!0;i;){var r=e,o=t,s=n;i=!1,null===r&&(r=Function.prototype);var a=Object.getOwnPropertyDescriptor(r,o);if(void 0!==a){if("value"in a)return a.value;var u=a.get;if(void 0===u)return;return u.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;e=l,t=o,n=s,i=!0,a=l=void 0}},a=n(74),u=i(a),l=n(3),c=i(l),f=function(e){function t(e,n){r(this,t);var i={topojson:!0};n=(0,c["default"])({},i,n),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n)}return o(t,e),t}(u["default"]);t["default"]=f;var h=function(e,t){return new f(e,t)};t.topoJSONLayer=h},function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),o=i(r),s=n(12),a=i(s),u=n(83),l=i(u),c=n(78),f=i(c),h=n(84),p=i(h),d={};d.Transformation=o["default"],d.wrapNum=a["default"],d.extrudePolygon=l["default"],d.GeoJSON=f["default"],d.Buffer=p["default"],t["default"]=d,e.exports=t["default"]}])});
//# sourceMappingURL=vizicities.min.js.map