geojs 1.11.1 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/geo.min.js CHANGED
@@ -35,7 +35,7 @@ t.exports=function(){"use strict";function t(){return t=Object.assign||function(
35
35
  * @copyright 2017, Vladimir Agafonkin
36
36
  * @license ISC
37
37
  */
38
- var r=n(5638),i=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;r.htmlPrefilter=function(t){return t.replace(i,"<$1></$2>")},n(8701),t.exports=r.extend({annotationLayer:n(836),camera:n(9986),choroplethFeature:n(8719),contourFeature:n(9005),domRenderer:n(2805),event:n(5108),feature:n(6837),featureLayer:n(3715),fetchQueue:n(3705),fileReader:n(407),geo_action:n(7839),graphFeature:n(4745),heatmapFeature:n(1111),imageTile:n(4665),isolineFeature:n(2367),geojsonReader:n(3088),gridFeature:n(1109),layer:n(9105),lineFeature:n(4708),map:n(2804),mapInteractor:n(3870),markerFeature:n(7098),meshFeature:n(9146),object:n(3737),osmLayer:n(8622),pathFeature:n(6565),pointFeature:n(2557),polygonFeature:n(4343),quadFeature:n(5017),pixelmapFeature:n(6374),pixelmapLayer:n(809),renderer:n(3234),sceneObject:n(5358),textFeature:n(9757),tile:n(8418),tileCache:n(6244),tileLayer:n(1940),timestamp:n(6618),trackFeature:n(6223),transform:n(6853),typedef:n(3762),vectorFeature:n(2623),inherit:n(5699),version:n(2978),sha:n(5381),annotation:n(4213),util:n(4634),jQuery:r,canvas:n(7562),svg:n(2878),vtkjs:n(6653),webgl:n(9205),gui:n(253),vgl:n(5140)},n(4647)),window&&!window.$&&(window.$=r),window&&!window.jQuery&&(window.jQuery=r),window&&!window.geojsMap&&(window.geojsMap=function(){var t=r(".geojs-map").map((function(t,e){return r(e).data("data-geojs-map")}));return 0===t.length?void 0:1===t.length?t[0]:t})},5699:function(t){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},2367:function(t,e,n){var r=n(5699),i=n(9146),o=n(4647),a=n(4634),s={17:[{l0:1,h0:2,l1:0,h1:2}],18:[{l0:0,h0:1,l1:2,h1:1}],20:[{l0:2,h0:0,l1:1,h1:0}],22:[{l0:2,h0:0,l1:2,h1:1}],21:[{l0:1,h0:2,l1:1,h1:0}],19:[{l0:0,h0:1,l1:0,h1:2}],1:[{l0:2,h0:3,l1:1,h1:3}],2:[{l0:0,h0:2,l1:3,h1:2}],4:[{l0:3,h0:1,l1:0,h1:1}],8:[{l0:1,h0:0,l1:2,h1:0}],14:[{l0:3,h0:1,l1:3,h1:2}],13:[{l0:2,h0:3,l1:2,h1:0}],11:[{l0:1,h0:0,l1:1,h1:3}],7:[{l0:0,h0:2,l1:0,h1:1}],3:[{l0:0,h0:2,l1:1,h1:3}],10:[{l0:1,h0:0,l1:3,h1:2}],12:[{l0:3,h0:1,l1:2,h1:0}],5:[{l0:2,h0:3,l1:0,h1:1}],6:[{l0:0,h0:2,l1:0,h1:1},{l0:3,h0:1,l1:3,h1:2}],9:[{l0:1,h0:0,l1:1,h1:3},{l0:2,h0:3,l1:2,h1:0}]},u=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),u=n(6853),l=n(5108),c=n(9757);e=e||{},i.call(this,e);var h,f,d,p,m,g=this,v=this.draw,y=this._exit,x=this._init,_=this.modified,b=this._update;return this.featureType="isoline",this.contour=g.mesh,this.isoline=g.mesh,this._createIsolines=function(){var t,e=g.style.get("value"),n=void 0!==g.style("used")?g.style.get("used"):function(t,n){return a.isNonNullFinite(e(t,n))},r=!1,i=[],o=g._createMesh({used:n,value:e});return(t=g._getValueList(o)).length?(t.forEach((function(t){var e=g._isolinesForValue(o,t);e.length&&(i=i.concat(e),r=r||!!t.label)})),{lines:i,mesh:o,values:t,hasLabels:r}):{}},this._getValueList=function(t){var e,n,r,i,o,s,u,l=g.isoline,c=l.get("values")(t),h=l.get("spacing")(t),f=l.get("count")(t),d=l.get("autofit")(t),p=l.get("levels")(t);if(!t.numVertices||!t.numElements)return[];if(e=a.getMinMaxValues(t.value,l.get("min")(t),l.get("max")(t),!0),t.minValue=e.min,t.maxValue=e.max,(n=t.maxValue-t.minValue)<=0)return[];if(Array.isArray(c))c=(c=c.map((function(t,e){return{value:void 0!==t.value?t.value:t,position:e,level:t.level}}))).filter((function(e){return e.value>=t.minValue&&e.value<=t.maxValue}));else if(h||d)for(h||(r=n/(2*f/3),o=Math.floor(Math.log10(r)),s=Math.max(0,-o),h=(r=(r/=i=Math.pow(10,o))>=5?5:r>=2?2:1)*i),c=[],u=Math.ceil(t.minValue/h);u<=Math.floor(t.maxValue/h);u+=1)c.push({value:u*h,position:u,fixedDigits:s});else for(c=Array(f),u=0;u<f;u+=1)c[u]={value:t.minValue+n*(u+1)/(f+1),position:u+1};return p.length&&c.forEach((function(t,e){if(void 0===t.level){t.level=0;for(var n=0,r=p[0];n<p.length&&!(t.position%r);r*=p[n+=1])t.level=n+1}if(l.get("label")(t,t.position)){var i=l.get("labelText")(t,t.position);void 0===i&&(i=void 0!==t.fixedDigits?""+parseFloat(t.value.toFixed(t.fixedDigits)):""+t.value),i&&(t.label=i)}})),c},this._addSegment=function(t,e,n){var r,i,o,a,s,u,l=[e,n],c=t.length;for(t.push(l),i=0;i<2;i+=1){for(r=c-1;r>=0;r-=1){if(a=(o=t[r])[0],s=o[o.length-1],n[0]===a[0]&&n[1]===a[1])u=l.concat(o.slice(1));else{if(e[0]!==s[0]||e[1]!==s[1])continue;u=o.concat(l.slice(1))}t.splice(c,1),t[r]=l=u,c=r,e=l[0],n=l[l.length-1];break}if(r<0)break}return t},this._chainVertex=function(t,e,n){var r=n[0],i=n[1],o=3*r,a=3*i,s=(e.value-t.value[r])/(t.value[i]-t.value[r]),u=1-s;return{x:t.pos[o]*u+t.pos[a]*s,y:t.pos[o+1]*u+t.pos[a+1]*s,z:t.pos[o+2]*u+t.pos[a+2]*s}},this._isolinesForValue=function(t,e){var n,r,i,o,a=e.value,u=Array(t.value.length),l=[];for(n=u.length-1;n>=0;n-=1)u[n]=t.value[n]<=a?0:1;var c=t.verticesPerElement,h="square"===t.shape,f=t.elements,d=f.length;for(r=0;r<d;r+=c){if(h){if(0===(i=8*u[f[r]]+4*u[f[r+1]]+2*u[f[r+2]]+u[f[r+3]])||15===i)continue}else if(16===(i=16+4*u[f[r]]+2*u[f[r+1]]+u[f[r+2]])||23===i)continue;s[i].forEach((function(t){l=g._addSegment(l,[f[r+t.l0],f[r+t.h0]],[f[r+t.l1],f[r+t.h1]])}))}return o=l.map((function(n){var r=[];return n.forEach((function(n){var i=g._chainVertex(t,e,n);r.length&&i.x===r[r.length-1].x&&i.y===r[r.length-1].y||r.push(i)})),r.closed=r[0].x===r[r.length-1].x&&r[0].y===r[r.length-1].y,r.value=e.value,r.level=e.level,r.position=e.position,r.label=e.label,r})).filter((function(t){return t.length>1})),o},this.modified=function(){var t=_();return d&&d.modified(),m&&m.modified(),t},this.labelPositions=function(){if(g.dataTime().timestamp()>=g.buildTime().timestamp()&&g._build(),f=null,!m)return g;if(!(h&&h.hasLabels&&h.lines&&h.lines.length))return m.data([]),g;var t=g.isoline,e=t.get("labelSpacing"),n=t.get("labelOffset"),r=t.get("labelViewport")(h.mesh),i=g.gcs(),o=g.layer().map(),s=o.gcs(),l=o.rotation(),c=o.size(),d=[],p=0;return h.lines.forEach((function(t,h){if(t.label){var f,m,g,v,y,x,_,b,M,w,A,T=e(t.value,t.value.position),C=n(t.value,t.value.position)||0,E=o.gcsToDisplay(t,i),k=0;if(!(T<=0||isNaN(T))&&(p=Math.max(T,p),C=C+.5-Math.floor(C+.5),f=E.map((function(e,n){if(!t.closed&&n+1===E.length)return 0;var r=Math.sqrt(a.distance2dSquared(e,E[n+1<E.length?n+1:0]));return k+=r,r})),m=Math.floor(k/T)))for(A=u.transformCoordinates(i,s,t),v=(g=k/m)*C,y=0,x=0;x<E.length;x+=1){for(;y+f[x]>=v;)_=x+1===E.length?0:x+1,M=1-(b=(v-y)/f[x]),v+=g,r>0&&((w={x:E[x].x*M+E[_].x*b,y:E[x].y*M+E[_].y*b}).x<-r||w.x>c.width+r||w.y<-r||w.y>c.height+r)||d.push({x:A[x].x*M+A[_].x*b,y:A[x].y*M+A[_].y*b,z:A[x].z*M+A[_].z*b,line:t,rotation:Math.atan2(E[x].y-E[_].y,E[x].x-E[_].x)-l});y+=f[x]}}})),m.gcs(s),m.data(d),m.style("renderThreshold",2*p),f={zoom:o.zoom(),center:o.center(),rotation:l,size:c,labelViewport:r,maxSpacing:p,labelAutoUpdate:t.get("labelAutoUpdate")(h.mesh)},g},this.lastLabelPositions=function(){return r.extend({},f)},this._updateLabelPositions=function(){var t=f;if(!t||!t.labelAutoUpdate)return g;var e=g.layer().map(),n=e.zoom(),r=e.size(),i=!!(Math.abs(n-t.zoom)>=2);if(!i&&t.labelViewport>0){var o=Math.sqrt(a.distance2dSquared(e.gcsToDisplay(e.center()),e.gcsToDisplay(t.center)))*Math.pow(2,t.zoom-n),s=t.labelViewport/2-2*t.maxSpacing-Math.max(r.width-t.size.width,r.height-t.size.height,0);i=i||o>=s}return i&&g.labelPositions().draw(),g},this._build=function(){if((h=g._createIsolines())&&h.lines&&h.lines.length){d||(d=g.layer().createFeature("line",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{closed:function(t){return t.closed}}}),g.dependentFeatures([d]));var t=g.style();if(d.data(h.lines).style({antialiasing:t.antialiasing,lineCap:t.lineCap,lineJoin:t.lineJoin,miterLimit:t.miterLimit,strokeWidth:t.strokeWidth,strokeStyle:t.strokeStyle,strokeColor:t.strokeColor,strokeOffset:t.strokeOffset,strokeOpacity:t.strokeOpacity}),h.hasLabels){if(!m){if(!(o.registries.features[g.layer().rendererName()]||{}).text){var e=o.rendererForFeatures(["text"]);p=o.createLayer("feature",g.layer().map(),{renderer:e}),g.layer().addChild(p),g.layer().node().append(p.node())}m=(p||g.layer()).createFeature("text",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{text:function(t){return t.line.label}}}).geoOn(l.pan,g._updateLabelPositions)}c.usedStyles.forEach((function(e){"visible"!==e&&m.style(e,t[e])})),g.dependentFeatures([d,m])}}else d&&d.data([]);return g.buildTime().modified(),g.labelPositions(),g},this._update=function(){return b.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),g.updateTime().modified(),g},this.draw=function(){var t=v();return d&&d.draw(),m&&m.draw(),t},this._exit=function(){m&&((p||g.layer())&&(p||g.layer()).deleteFeature(m),p&&g.layer()&&g.layer().removeChild(p)),d&&g.layer()&&g.layer().deleteFeature(d),m=null,p=null,d=null,g.dependentFeatures([]),y()},this._init=function(e){e=e||{},x.call(g,e);var n=r.extend({},{opacity:1,value:function(t,e){return g.position()(t,e).z},rotateWithMap:!0,rotation:t.rotationFunction(),strokeWidth:function(t,e,n,r){return n.level+.5},strokeColor:{r:0,g:0,b:0},textStrokeColor:{r:1,g:1,b:1,a:.75},textStrokeWidth:2,fontSize:"12px"},void 0===e.style?{}:e.style);g.style(n),g.isoline(r.extend({},{count:15,autofit:!0,levels:[5,5],label:function(t){return t.level>=1},labelSpacing:200,labelViewport:1e4,labelAutoUpdate:!0},e.mesh||{},e.contour||{},e.isoline||{})),(e.mesh||e.contour||e.isoline)&&g.dataTime().modified()},this};u.rotationFunction=function(t,e){var n={higher:function(t){return t.rotation},lower:function(t){return t.rotation+Math.PI},map:function(t){var e=t.rotation,n=a.wrapAngle(e,!0);return(n>Math.PI/2||n<-Math.PI/2)&&(e+=Math.PI),e},screen:function(t){var n=t.rotation,r=a.wrapAngle(n+e.rotation(),!0);return(r>Math.PI/2||r<-Math.PI/2)&&(n+=Math.PI),n}};return n[t]||n.higher},r(u,i),t.exports=u},9105:function(t,e,n){var r=n(5699),i=n(5358),o=n(6837),a=n(4647).checkRenderer,s=n(4647).rendererForFeatures,u=n(4647).rendererForAnnotations,l=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},i.call(this,e);var r,o=n(5638),l=n(6618),c=n(3234),h=n(4647).createRenderer,f=n(4647).adjustLayerForRenderer,d=n(5108),p=this,m=this._exit,g=void 0===e.id?t.newLayerId():e.id,v=void 0===e.name?"":e.name,y=void 0===e.map?null:e.map,x=null,_=void 0===e.canvas?null:e.canvas,b=e.renderer instanceof c?e.renderer:null,M=!1,w=void 0!==e.renderer?e.renderer instanceof c?e.renderer.api():e.renderer:e.annotations?u(e.annotations):s(e.features),A=void 0===e.autoshareRenderer||e.autoshareRenderer,T=l(),C=l(),E=void 0===e.sticky||e.sticky,k=void 0===e.active||e.active,S=void 0===e.opacity?1:e.opacity,P=e.attribution||null,O=void 0===e.visible||e.visible,L=void 0===e.selectionAPI||e.selectionAPI;if(w=a(w),!y)throw new Error("Layers must be initialized on a map.");function R(){return(p.parent()||p.map()).children().filter((function(e){return e instanceof t}))}if(this.rendererName=function(){return w},this.autoshareRenderer=function(){return A},this.zIndex=function(t,e){return void 0===t?r:(e||R().reverse().forEach((function(e){e!==p&&e.zIndex()===t&&e.zIndex(t+1)})),t!==r&&(r=t,x.css("z-index",r),p.geoTrigger(d.layerMove,{layer:p})),p)},this.moveUp=function(t){var e,n,r,i,o=null;for(void 0===t&&(t=1),i=1,t<0&&(i=-1,t=-t),e=R().sort((function(t,e){return i*(t.zIndex()-e.zIndex())})),n=0;n<e.length;n+=1)if(null===o)e[n]===p&&(o=n);else{if(!(n-o<=t))break;r=p.zIndex(),p.zIndex(e[n].zIndex(),!0),e[n].zIndex(r,!0)}return p},this.moveDown=function(t){return void 0===t&&(t=1),p.moveUp(-t)},this.moveToTop=function(){return p.moveUp(R().length-1)},this.moveToBottom=function(){return p.moveDown(R().length-1)},this.sticky=function(){return E},this.active=function(t){return void 0===t?k:(k!==t&&(k=t,x.toggleClass("active",k)),p)},this.node=function(){return x},this.id=function(e){return void 0===e?g:(g=null===e?t.newLayerId():e,p.modified(),p)},this.name=function(t){return void 0===t?v:(v=t,x.attr("id",v),p.modified(),p)},this.map=function(){return y},this.renderer=function(){return b},this._renderer=function(t){return void 0===t?b:(b=t,p)},this.canvas=function(){return _},this._canvas=function(t){return void 0===t?_:(_=t,p)},this.dataTime=function(){return T},this.updateTime=function(){return C},this.initialized=function(t){return void 0!==t?(M=t,p):M},this.toLocal=function(t){return t},this.fromLocal=function(t){return t},this.attribution=function(t){return void 0!==t?(P=t,p.map().updateAttribution(),p):P},this.visible=function(t){return void 0===t?O:(O!==t&&(O=t,x.toggleClass("hidden",!O),p.modified()),p)},this.selectionAPI=function(t){return void 0===t?L:(L!==t&&(L=t),p)},this._init=function(t){if(M)return p;y.node().append(x);var n=o.extend({},e);return delete n.map,b?p._canvas(b.canvas()):null===w?(p._renderer(null),p._canvas(x)):_?p._renderer(h(w,p,_,n)):(p._renderer(h(w,p,void 0,n)),p._canvas(b.canvas())),x.toggleClass("active",p.active()),M=!0,t||(p.geoOn(d.resize,(function(t){p._update({event:t})})),p.geoOn(d.pan,(function(t){p._update({event:t})})),p.geoOn(d.rotate,(function(t){p._update({event:t})})),p.geoOn(d.zoom,(function(t){p._update({event:t})}))),p},this._exit=function(){p.geoOff(),b&&b._exit(),x.off(),x.remove(),e={},p._canvas(null),p._renderer(null),m()},this._update=function(t){return p},this.width=function(){return p.map().size().width},this.height=function(){return p.map().size().height},this.opacity=function(t){return void 0!==t?(S=t,x.css("opacity",S),p):S},(x=o(document.createElement("div"))).addClass("geojs-layer"),x.attr("renderer",w),v&&x.attr("id",v),p.opacity(S),p.visible(O),void 0===e.zIndex){var I=-1;R().forEach((function(t){void 0!==t.zIndex()&&(I=Math.max(I,t.zIndex()))})),e.zIndex=I+1}return p.zIndex(e.zIndex),f("all",p),p};l.newLayerId=function(){"use strict";var t=1;return function(){var e=t;return t+=1,e}}(),l.create=function(t,e){"use strict";if((e=e||{}).type=e.type||"feature",e.renderer=void 0===e.renderer?"webgl":e.renderer,e.renderer=a(e.renderer),!e.renderer)return console.warn("Invalid renderer"),null;var n=t.createLayer(e.type,e);return n?(e.features&&e.features.forEach((function(t){t.data=t.data||e.data,t.feature=o.create(n,t)})),n):(console.warn("Unable to create a layer"),null)},r(l,i),t.exports=l},4708:function(t,e,n){var r=n(5699),i=n(6837),o=n(6618),a=n(6853),s=n(4634),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638);e=e||{},i.call(this,e);var u,l=this,c=this._init,h=o();return this.featureType="line",this._subfeatureStyles={lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.line=function(t){return void 0===t?l.style("line"):(l.style("line",t),l.dataTime().modified(),l.modified(),l)},this.position=function(t){return void 0===t?l.style("position"):(l.style("position",t),l.dataTime().modified(),l.modified(),l)},this._updatePointSearchInfo=function(){if(h.timestamp()>=l.dataTime().timestamp()&&h.timestamp()>=l.timestamp())return u;h.modified(),u=[];for(var t=l.data(),e=l.line(),n=l.style.get("strokeWidth"),r=s.isFunction(l.style("strokeWidth"))?void 0:n(),i=l.position(),o=l.style.get("closed"),c=s.isFunction(l.style("closed"))?void 0:o(),f=l.style.get("uniformLine"),d=s.isFunction(l.style("uniformLine"))?void 0:f(),p=l.gcs(),m=l.layer().map().gcs(),g=a.onlyInvertedY(p,m),v=0;v<t.length;v+=1){for(var y=t[v],x=void 0===c?o(y,v):c,_=void 0,b=void 0,M=void 0,w=void 0,A=void 0,T=void 0,C=void 0,E=void 0,k=[],S=void 0===d?f(y,v):d,P=e(y,v),O=0;O<P.length;O+=1){var L=P[O],R=i(L,O,y,v);g?R={x:R.x,y:-R.y}:p!==m&&(R=a.transformCoordinates(p,m,R)),void 0===T&&(T={x:R.x,y:R.y}),void 0===C&&(C={x:R.x,y:R.y}),R.x<T.x&&(T.x=R.x),R.x>C.x&&(C.x=R.x),R.y<T.y&&(T.y=R.y),R.y>C.y&&(C.y=R.y),S&&O||(E=void 0===r?n(L,O,y,v):r);var I=Math.ceil(E/2)+2;(void 0===C.r||I>C.r)&&(C.r=I);var D=I*I;_&&k.push({u:R,v:_,r:M>I?M:I,r2:w>D?w:D,i:O,j:b}),_=R,b=O,M=I,w=D,!A&&x&&(A={p:R,r:I,r2:D,i:O})}x&&A&&(_.x!==A.p.x||_.y!==A.p.y)&&k.push({u:_,v:A.p,r:M>A.r?M:A.r,r2:w>A.r2?w:A.r2,i:b,j:A.i}),k.min=T,k.max=C,u.push(k)}return u},this.pointSearch=function(t,e){var n=l.data(),r=[],i=[],o={};if(!n||!n.length||!l.layer())return{found:i,index:r,extra:o};l._updatePointSearchInfo();var c=l.layer().map();e=null===e?c.gcs():void 0===e?c.ingcs():e;var h,f,d,p,m=c.unitsPerPixel(c.zoom()),g=m*m,v=a.transformCoordinates(e,c.gcs(),t),y=l.style.get("strokeWidth"),x=l.style.get("strokeOpacity"),_=l.line();for(f=0;f<u.length;f+=1)for(p=u[f],h=null,d=0;d<p.length;d+=1)if(s.distance2dToLineSquared(v,p[d].u,p[d].v)<=p[d].r2*g&&(h||(h=_(n[f],f)),(x(h[p[d].i],p[d].i,n[f],f)>0||x(h[p[d].j],p[d].j,n[f],f)>0)&&(y(h[p[d].i],p[d].i,n[f],f)>0||y(h[p[d].j],p[d].j,n[f],f)>0))){i.push(n[f]),r.push(f),o[f]=d;break}return{found:i,index:r,extra:o}},this.polygonSearch=function(t,e,n){var r,i,o=l.data(),c=[],h=[],f={},d=l.layer().map(),p=l.style.get("strokeWidth"),m=l.style.get("strokeOpacity"),g=l.line();if(n=null===n?d.gcs():void 0===n?d.ingcs():n,t.outer||(t={outer:t,inner:[]}),!o||!o.length||t.outer.length<3)return{found:h,index:c,extra:f};(e=e||{}).partial=e.partial||!1,(t={outer:a.transformCoordinates(n,d.gcs(),t.outer),inner:(t.inner||[]).map((function(t){return a.transformCoordinates(n,d.gcs(),t)}))}).outer.forEach((function(t){r||(r={x:t.x,y:t.y},i={x:t.x,y:t.y}),t.x<r.x&&(r.x=t.x),t.x>i.x&&(i.x=t.x),t.y<r.y&&(r.y=t.y),t.y>i.y&&(i.y=t.y)})),l._updatePointSearchInfo();var v,y,x,_,b,M,w=d.unitsPerPixel(d.zoom());for(v=0;v<u.length;v+=1)if(!(!(x=u[v]).max||x.max.x<r.x-x.max.r*w||x.min.x>i.x+x.max.r*w||x.max.y<r.y-x.max.r*w||x.min.y>i.y+x.max.r*w)){var A=void 0,T=void 0,C=void 0;for(y=0;y<x.length;y+=1)if(_=x[y].u,b=x[y].v,M=x[y].r,!(_.x<r.x-M*w&&b.x<r.x-M*w||_.x>i.x+M*w&&b.x>i.x+M*w||_.y<r.y-M*w&&b.y<r.y-M*w||_.y>i.y+M*w&&b.y>i.y+M*w||(C||(C=g(o[v],v)),m(C[x[y].i],x[y].i,o[v],v)<=0&&m(C[x[y].j],x[y].j,o[v],v)<=0||p(C[x[y].i],x[y].i,o[v],v)<=0&&p(C[x[y].j],x[y].j,o[v],v)<=0))){var E=s.distanceToPolygon2d(_,t),k=s.distanceToPolygon2d(b,t);if(E>-M*w&&E<M*w||k>-M*w&&k<M&w||E*k<0){T=!0;break}if(s.crossedLineSegmentPolygon2d(_,b,t)){T=!0;break}for(var S=M*M*w*w,P=0;P<t.outer.length&&!T;P+=1)T=s.distance2dToLineSquared(t.outer[P],_,b)<S;for(var O=0;O<t.inner.length&&!T;O+=1)for(var L=0;L<t.inner[O].length&&!T;L+=1)T=s.distance2dToLineSquared(t.inner[O][L],_,b)<S;if(T)break;E>0&&(A=!0)}(!e.partial&&A&&!T||e.partial&&(A||T))&&(c.push(v),h.push(o[v]),f[v]={partial:T,segment:y<u[v].length?y:0})}return{found:h,index:c,extra:f}},this.rdpSimplifyData=function(t,e,n,r){t=t||l.data(),n=n||l.style.get("position"),r=r||l.style.get("line");var i=l.layer().map(),o=i.gcs(),u=l.gcs(),c=l.style.get("closed");return void 0===e&&(e=.5*i.unitsPerPixel(i.zoom())),t=t.map((function(t,i){var l=r(t,i),h=a.transformCoordinates(u,o,l.map((function(e,r){return n(e,r,t,i)}))),f=s.rdpLineSimplify(h,e,c(t,i),[]);for(var d in(f.length<2||2===f.length&&s.distance2dSquared(f[0],f[1])<e*e)&&(f=[]),f=a.transformCoordinates(o,u,f),t)!t.hasOwnProperty(d)||Array.isArray(t)&&d>=0&&d<t.length||(f[d]=t[d]);return f})),l.style("position",s.identityFunction),l.style("line",s.identityFunction),l.data(t),l},this._init=function(t){t=t||{},c.call(l,t);var e=r.extend({},{strokeWidth:1,strokeColor:{r:1,g:.8431372549,b:0},strokeStyle:"solid",strokeOpacity:1,antialiasing:2,closed:!1,line:s.identityFunction,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){return t.length>=3?t.slice(0,3):[0,0,0]}},void 0===t.style?{}:t.style);return void 0!==t.line&&(e.line=t.line),void 0!==t.position&&(e.position=t.position),l.style(e),l.dataTime().modified(),l},this._init(e),this};u.create=function(t,e){"use strict";return(e=e||{}).type="line",i.create(t,e)},u.capabilities={feature:"line",basic:"line.basic",multicolor:"line.multicolor"},r(u,i),t.exports=u},2804:function(t,e,n){var r=n(5638),i=n(5699),o=n(5358),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);if(void 0===(e=e||{}).node||null===e.node)return console.warn("map creation requires a node"),this;o.call(this,e);var i,a,s,u,l,c=n(9986),h=n(6853),f=n(4634),d=n(4647),p=n(5108),m=n(3870),g=n(6408),v=this,y=this._exit,x=r(e.node),_=e.width||x.width()||512,b=e.height||x.height()||512,M=void 0===e.gcs?"EPSG:3857":e.gcs,w=void 0===e.ingcs?"EPSG:4326":e.ingcs,A={x:0,y:0},T=void 0===e.zoom?4:e.zoom,C=e.rotation?e.rotation:0,E=null,k=null,S={min:0,max:16,origMin:0},P=null,O=null,L=!!e.discreteZoom,R="function"==typeof e.allowRotation?e.allowRotation:void 0===e.allowRotation||!!e.allowRotation,I=e.maxBounds||{},D=e.camera||c(),F=e.animationQueue||[],N=void 0===e.autoResize||e.autoResize,j=e.autoshareRenderer,z=((I.left||0)+(I.right||0))/2,B=((I.bottom||0)+(I.top||0))/2;function q(){var t;void 0!==document.hidden?t="hidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden"),v.geoTrigger(document[t]?p.hidden:p.unhidden)}function V(t){var e;void 0!==document.hidden?e="visibilitychange":void 0!==document.msHidden?e="msvisibilitychange":void 0!==document.webkitHidden&&(e="webkitvisibilitychange"),document.removeEventListener(e,q),!1!==t&&document.addEventListener(e,q)}function G(t,e){var n=t.zIndex(),r=e.zIndex();if(n!==r)return n-r;var i=t.node()[0],o=e.node()[0],a=i&&i.parentNode,s=o&&o.parentNode;if(a&&s&&a===s){var u=Array.from(a.children),l=u.indexOf(i),c=u.indexOf(o);if(l>=0&&c>=0)return l-c}return a?-1:s?1:0}function U(t,e,n,r,i){t.globalAlpha=e,i&&(t.globalCompositeOperation=i);var o=n.css("transform");o&&"matrix("===o.substr(0,7)?t.setTransform.apply(t,o.substr(7,o.length-8).split(",").map(parseFloat)):t.setTransform(1,0,0,1,0,0),t.drawImage(r,0,0),t.globalCompositeOperation="source-over"}function W(){for(var t=F.splice(0,F.length),e=1;e<t.length;e+=1)try{t[e].apply(v,arguments)}catch(t){console.error(t)}}function H(t,e,n){var r=e.width/2,i=e.height/2,o=Math.sin(n),a=Math.cos(n),s={},u={},l={},c={};return s.x=t.x+-r*a- -i*o,s.y=t.y+-r*o+-i*a,u.x=t.x+r*a- -i*o,u.y=t.y+r*o+-i*a,l.x=t.x+-r*a-i*o,l.y=t.y+-r*o+i*a,c.x=t.x+r*a-i*o,c.y=t.y+r*o+i*a,{left:Math.min(s.x,u.x,l.x,c.x),right:Math.max(s.x,u.x,l.x,c.x),bottom:Math.min(s.y,u.y,l.y,c.y),top:Math.max(s.y,u.y,l.y,c.y)}}function Z(t,e){void 0===e&&(e=C),t=function(t,e){return e&&(t=H({x:(t.left+t.right)/2,y:(t.top+t.bottom)/2},{width:Math.abs(t.left-t.right),height:Math.abs(t.top-t.bottom)},e)),t}(t,e);var n=function(t){var e,n,r=t.right-t.left,i=t.top-t.bottom,o=Math.abs(r/i),a=_/b;return o>a?(e=1,n=o/a):(n=1,e=a/o),{x:e,y:n}}(t);return n.y>n.x?-Math.log2(Math.abs(t.right-t.left)*n.x/(_*i)):-Math.log2(Math.abs(t.top-t.bottom)*n.y/(b*i))}function X(){S.min=u?Math.max(S.origMin,Z(I)):S.origMin}function Q(t,e,n){if(!R)return 0;if(e||"function"!=typeof R||(t=R(t)),!n){var r=2*Math.PI;t=t%r+(t>=0?0:r),Math.min(Math.abs(t),Math.abs(t-r))<1e-5&&(t=0)}return t}function Y(t,e,n,i){if(!a&&!s)return t;var o,u,l=I;if(e){l=r.extend({},I);var c,h,f=Math.abs(t.right-t.left),d=Math.abs(t.top-t.bottom),p=Math.abs(Math.sin(e)),m=Math.abs(Math.cos(e));if(t.width&&t.height)c=t.width,h=t.height;else if(Math.abs(p-m)<5e-4)if(_&&b){var g=Math.abs(_/b),v=Math.pow(1+Math.pow(g,2),.5);h=(c=Math.max(f,d)/v)*g}else c=f*m,h=d*p;else c=(m*f-p*d)/(m*m-p*p),h=(m*d-p*f)/(m*m-p*p);var y=f-Math.max(m*c,p*h),x=d-Math.max(m*h,p*c);l.left-=y,l.right+=y,l.top+=x,l.bottom-=x}return i&&(l={left:l.left-(t.right-t.left)/2,right:l.right+(t.right-t.left)/2,top:l.top-(t.bottom-t.top)/2,bottom:l.bottom+(t.bottom-t.top)/2}),a&&(t.right-t.left>l.right-l.left?o=l.left-(t.right-t.left-(l.right-l.left))/2-t.left:t.left<l.left?o=l.left-t.left:t.right>l.right&&(o=l.right-t.right),o&&(!n||n.x*o>0)&&(n&&Math.abs(o)>Math.abs(n.x*n.unit)&&(o=Math.abs(n.x*n.unit)*o/Math.abs(o)),t={left:t.left+=o,right:t.right+=o,top:t.top,bottom:t.bottom})),s&&(t.top-t.bottom>l.top-l.bottom?u=l.bottom-(t.top-t.bottom-(l.top-l.bottom))/2-t.bottom:t.top>l.top?u=l.top-t.top:t.bottom<l.bottom&&(u=l.bottom-t.bottom),u&&(!n||-n.y*u>0)&&(n&&Math.abs(u)>Math.abs(n.y*n.unit)&&(u=Math.abs(n.y*n.unit)*u/Math.abs(u)),t={top:t.top+=u,bottom:t.bottom+=u,left:t.left,right:t.right})),t}function K(t,e){if(D.rotation=e||0,t.width&&t.height&&e){var n=(t.left+t.right)/2,r=(t.top+t.bottom)/2;D.viewFromCenterSizeRotation({x:n,y:r},t,e)}else D.bounds=t;A={x:(D.bounds.left+D.bounds.right)/2,y:(D.bounds.top+D.bounds.bottom)/2}}function J(){v.size({width:x.width(),height:x.height()})}return I.left=h.transformCoordinates(I.gcs||w,M,{x:void 0!==I.left?I.left:-180,y:B}).x,I.right=h.transformCoordinates(I.gcs||w,M,{x:void 0!==I.right?I.right:180,y:B}).x,I.top=void 0!==I.top?h.transformCoordinates(I.gcs||w,M,{x:z,y:I.top}).y:I.right,I.bottom=void 0!==I.bottom?h.transformCoordinates(I.gcs||w,M,{x:z,y:I.bottom}).y:I.left,i=e.unitsPerPixel||(I.right-I.left)/256,D.viewport={width:_,height:b,left:x.offset().left,top:x.offset().top},e.center=f.normalizeCoordinates(e.center),a=void 0!==e.clampBoundsX&&e.clampBoundsX,s=void 0===e.clampBoundsY||e.clampBoundsY,u=void 0===e.clampZoom||e.clampZoom,this.unitsPerPixel=function(t,e){return t=t||0,e?(i=Math.pow(2,t)*e,v.draw(),v):Math.pow(2,-t)*i},this.animationQueue=function(t){if(void 0===t)return F;if(t!==F){if(F.length){t.length&&t[0]!==F[0]&&window.cancelAnimationFrame(F[0]);for(var e=t.length?1:0;e<F.length;e+=1)t.push(F[e])}F=t}return v},this.autoResize=function(t){return void 0===t?N:(t!==N&&(r(window).off("resize",J),(N=t)&&r(window).on("resize",J)),v)},this.clampBoundsX=function(t){return void 0===t?a:(t!==a&&(a=!!t,v.pan({x:0,y:0})),v)},this.clampBoundsY=function(t){return void 0===t?s:(t!==s&&(s=!!t,v.pan({x:0,y:0})),v)},this.clampZoom=function(t){return void 0===t?u:(t!==u&&(u=!!t,X(),v.zoom(T)),v)},this.allowRotation=function(t){return void 0===t?R:("function"!=typeof t&&(t=!!t),t!==R&&(R=t,v.rotation(C)),v)},this.origin=function(){return r.extend({},l)},this.camera=function(){return D},this.gcs=function(t){if(void 0===t)return M;if(t!==M){var e=v.center(void 0,void 0);M=t,X();var n=v._fix_zoom(T);n!==T&&v.zoom(n),v.center(e,void 0)}return v},this.ingcs=function(t){return void 0===t?w:(w=t,v)},this.node=function(){return x},this.zoom=function(t,e,n,r){if(void 0===t)return T;var i,o,a=e&&(e.mapgcs||e.geo)&&e.map;if(a&&(r=!0),(t=v._fix_zoom(t,n))===T)return v;if(T=t,o=v.boundsFromZoomAndCenter(t,A,C,null,n,r),v.modified(),K(o,C),i={zoomLevel:T,screenPosition:e?e.map:void 0},v.geoTrigger(p.zoom,i),a){var s=v.gcsToDisplay(e.mapgcs||e.geo,e.mapgcs?null:void 0);v.pan({x:e.map.x-s.x,y:e.map.y-s.y},n,!0)}else v.pan({x:0,y:0},n,r);return v},this.pan=function(t,e,n){var r={screenDelta:t};if(t.x||t.y){var i=v.unitsPerPixel(T),o=Math.sin(C),a=Math.cos(C);D.pan({x:(t.x*a- -t.y*o)*i,y:(t.x*o+-t.y*a)*i})}var s=D.bounds;if((s=Y(s,C,"limited"===n?{x:t.x,y:t.y,unit:i}:void 0,!0===n))!==D.bounds){var u=v.gcsToDisplay({x:D.bounds.left,y:D.bounds.top},null);K(s=v.boundsFromZoomAndCenter(T,{x:(s.left+s.right)/2,y:(s.top+s.bottom)/2},C,null,e,!0),C);var l=v.gcsToDisplay({x:D.bounds.left,y:D.bounds.top},null);r.screenDelta.x+=l.x-u.x,r.screenDelta.y+=l.y-u.y}return A=D.displayToWorld({x:_/2,y:b/2}),v.geoTrigger(p.pan,r),v.modified(),v},this.rotation=function(t,e,n){if(void 0===t)return C;var r=e&&e.geo&&e.map;if((t=Q(t,n))===C)return v;C=t;var i=v.boundsFromZoomAndCenter(T,A,C,null,n,!0);v.modified(),K(i,C);var o={rotation:C,screenPosition:e?e.map:void 0};if(v.geoTrigger(p.rotate,o),r){var a=v.gcsToDisplay(e.geo);v.pan({x:e.map.x-a.x,y:e.map.y-a.y},void 0,!0)}else v.pan({x:0,y:0},void 0,!0);return X(),v.zoom(T,void 0,n),v},this.center=function(t,e,n,i){var o;return void 0===t?o=r.extend({},v.worldToGcs(A,e)):(o=v.gcsToWorld(t,e),K(v.boundsFromZoomAndCenter(T,o,C,null,n,i),C),v.modified(),v.geoTrigger(p.pan,{screenDelta:{x:0,y:0}}),v)},this.createLayer=function(t,e){e=e||{},void 0!==v.autoshareRenderer()&&(e=Object.assign({autoshareRenderer:v.autoshareRenderer()},e));var n=d.createLayer(t,v,e);return n&&(v.addChild(n),v.children().forEach((function(t){t instanceof g&&t.moveToTop()})),n._update(),v.modified(),v.geoTrigger(p.layerAdd,{target:v,layer:n})),n},this.deleteLayer=function(t){return null!=t&&(t._exit(),v.removeChild(t),v.modified(),v.geoTrigger(p.layerRemove,{target:v,layer:t})),t},this.size=function(t){if(void 0===t)return{width:_,height:b};var e=v.center();_=t.width||_,b=t.height||b,X();var n=v._fix_zoom(T);return n!==T&&v.zoom(n),v.camera().viewport={width:_,height:b,left:x.offset().left,top:x.offset().top},v.center(e),v.geoTrigger(p.resize,{target:v,width:_,height:b}),v.modified(),v},this.rotatedSize=function(){if(!this.rotation())return{width:_,height:b};var t=H({x:0,y:0},{width:_,height:b},v.rotation());return{width:Math.abs(t.right-t.left),height:Math.abs(t.top-t.bottom)}},this.gcsToWorld=function(t,e){return Array.isArray(t)?t.map((function(t){return v.gcsToWorld(t,e)})):((e=null===e?M:void 0===e?w:e)!==M&&(t=h.transformCoordinates(e,M,t)),l.x||l.y||l.z?t=h.affineForward({origin:l},[t])[0]:"z"in t||(t={x:t.x,y:t.y,z:0}),t)},this.worldToGcs=function(t,e){return Array.isArray(t)?t.map((function(t){return v.worldToGcs(t,e)})):(l.x||l.y||l.z?t=h.affineInverse({origin:l},[t])[0]:"z"in t||(t={x:t.x,y:t.y,z:0}),(e=null===e?M:void 0===e?w:e)!==M&&(t=h.transformCoordinates(M,e,t)),t)},this.gcsToDisplay=function(t,e){return t=v.gcsToWorld(t,e),v.worldToDisplay(t)},this.worldToDisplay=function(t){return Array.isArray(t)?t.map((function(t){return D.worldToDisplay(t)})):D.worldToDisplay(t)},this.displayToGcs=function(t,e){return t=v.displayToWorld(t),v.worldToGcs(t,e)},this.displayToWorld=function(t){return Array.isArray(t)?t.map((function(t){return D.displayToWorld(t)})):D.displayToWorld(t)},this.draw=function(){var t,e=v.children();for(v.geoTrigger(p.draw,{target:v}),v._update(),t=0;t<e.length;t+=1)e[t].draw();return v.geoTrigger(p.drawEnd,{target:v}),v},this.fileReader=function(t,e){return void 0===t?E:("string"==typeof t?((e=e||{}).layer||(e.layer=v.createLayer("feature",r.extend({},e))),e.renderer=e.layer.renderer().api(),E=d.createFileReader(t,e)):E=t,v)},this._init=function(t){if(null==x)throw new Error("Map require DIV node");return x.data("data-geojs-map")&&r.isFunction(x.data("data-geojs-map").exit)&&x.data("data-geojs-map").exit(),x.addClass("geojs-map"),x.data("data-geojs-map",v),V(),v},this._update=function(t){var e,n=v.children();for(e=0;e<n.length;e+=1)n[e]._update(t);return v},this.exit=function(){V(!1);var t,e=v.children();for(t=e.length-1;t>=0;t-=1)e[t]._exit(),v.removeChild(e[t]);v.interactor()&&(v.interactor().destroy(),v.interactor(null)),F=[],v.node().data("data-geojs-map",null),v.node().off(".geo"),v.node().empty(),r(window).off("resize",J),y()},this.interactor=function(t){return void 0===t?k:(k&&k!==t&&k.destroy(),(k=t)&&(x.attr("tabindex")||x.attr("tabindex",0),k.map(v)),v)},this.zoomRange=function(t,e){return void 0===t?r.extend({},S):(void 0!==t.max&&(S.max=t.max),void 0!==t.min&&(S.min=S.origMin=t.min),X(),e||v.zoom(T),v)},this.transition=function(t,e,n){if(void 0===t)return P;if(P){var i=r.extend(!0,{},P.end);return i.center&&M!==w&&(i.center=h.transformCoordinates(M,w,i.center)),O=r.extend({},i||{},O||{},t),v}var o=v.unitsPerPixel(0);function a(t){return Math.pow(2,-(t+1))*o*b}var s={center:void 0,zoom:v.zoom(),rotation:v.rotation(),duration:1e3,ease:function(t){return t},interp:function(t,e){return function(n){var i=[];return r.each(t,(function(r){i.push(function(t,e,n){return t+(e-t)*n}(t[r],e[r],n))})),i}},done:null,zCoord:!0};function u(e){var n=P.done,r=O;if(!0===P.cancel)return v.geoTrigger(p.transitioncancel,t),n&&n({cancel:!0,source:P.cancelSource,transition:P}),P=null,void(O&&(r=O,O=null,v.transition(r,void 0,e)));if(P.start.time||(P.start.time=e,P.end.time=e+t.duration),P.time=e-P.start.time,e>=P.end.time||r){if(!r){if(P.end.center){var i=T!==v._fix_zoom(P.end.zoom)||!1===t.endClamp;v.center(P.end.center,null,i,i)}v.zoom(P.end.zoom,P.zoomOrigin,!1===t.endClamp,!1===t.endClamp),v.rotation(Q(P.end.rotation))}return v.geoTrigger(p.transitionend,t),n&&n({next:!!r}),P=null,void(O&&(r=O,O=null,v.transition(r,void 0,e)))}var a=P.ease((e-P.start.time)/t.duration),s=P.interp(a);P.zCoord&&(s[2]=function(t){return-Math.log2(t/o/b)-1}(s[2])),v._fix_zoom(s[2],!0)===T?v.center({x:s[0],y:s[1]},null,!0,!0):(A=v.gcsToWorld({x:s[0],y:s[1]},null),v.zoom(s[2],P.zoomOrigin,!0,!0)),v.rotation(s[3],void 0,!0),v.scheduleAnimationFrame(u)}return t.center&&(e=null===e?M:void 0===e?w:e,(t=r.extend(!0,{},t)).center=f.normalizeCoordinates(t.center),e!==M&&(t.center=h.transformCoordinates(e,M,t.center))),t=r.extend(!0,{},s,t),(P={start:{center:v.center(void 0,null),zoom:v.zoom(),rotation:v.rotation()},end:{center:t.center,zoom:v._fix_zoom(t.zoom),rotation:Q(t.rotation,void 0,!0)},ease:t.ease,zCoord:t.zCoord,done:t.done,duration:t.duration,zoomOrigin:t.zoomOrigin,endClamp:t.endClamp}).interp=t.interp([P.start.center.x,P.start.center.y,t.zCoord?a(P.start.zoom):P.start.zoom,P.start.rotation],[P.end.center?P.end.center.x:P.start.center.x,P.end.center?P.end.center.y:P.start.center.y,t.zCoord?a(P.end.zoom):P.end.zoom,P.end.rotation]),v.geoTrigger(p.transitionstart,t),p.cancelNavigation?(P=null,v.geoTrigger(p.transitionend,t),v):(p.cancelAnimation?(t.duration=0,u(0)):n?u(n):v.scheduleAnimationFrame(u),v)},this.transitionCancel=function(t){return!(!P||!0===P.cancel&&!O)&&(P.cancel=!0,P.cancelSource=t||P.cancelSource||"",O=null,!0)},this.bounds=function(t,e){var n;if(e=null===e?M:void 0===e?w:e,void 0!==t){if(e!==M){var r=h.transformCoordinates(e,M,[{x:t.left,y:t.top},{x:t.right,y:t.bottom}]);t={left:r[0].x,top:r[0].y,right:r[1].x,bottom:r[1].y}}t=Y(t,C),n=v.zoomAndCenterFromBounds(t,C,null),v.zoom(n.zoom),v.center(n.center,null)}return v.boundsFromZoomAndCenter(T,A,C,e,!0)},this.maxBounds=function(t,e){if(e=null===e?M:void 0===e?w:e,void 0===t)return{left:h.transformCoordinates(M,e,{x:I.left,y:0}).x,right:h.transformCoordinates(M,e,{x:I.right,y:0}).x,bottom:h.transformCoordinates(M,e,{x:0,y:I.bottom}).y,top:h.transformCoordinates(M,e,{x:0,y:I.top}).y};var n=((t.left||0)+(t.right||0))/2,r=((t.bottom||0)+(t.top||0))/2;return void 0!==t.left&&(I.left=h.transformCoordinates(e,M,{x:t.left,y:r}).x),void 0!==t.right&&(I.right=h.transformCoordinates(e,M,{x:t.right,y:r}).x),void 0!==t.bottom&&(I.bottom=h.transformCoordinates(e,M,{x:n,y:t.bottom}).y),void 0!==t.top&&(I.top=h.transformCoordinates(e,M,{x:n,y:t.top}).y),X(),v.zoom(T),v.pan({x:0,y:0}),v},this.zoomAndCenterFromBounds=function(t,e,n){var r,i;if((n=null===n?M:void 0===n?w:n)!==M){var o=h.transformCoordinates(n,M,[{x:t.left,y:t.top},{x:t.right,y:t.bottom}]);t={left:o[0].x,top:o[0].y,right:o[1].x,bottom:o[1].y}}if(t.left>=t.right||t.bottom>=t.top)throw new Error("Invalid bounds provided");return i=v._fix_zoom(Z(t,e)),r={x:((t=Y(t,e)).left+t.right)/2-l.x,y:(t.top+t.bottom)/2-l.y},n!==M&&(r=h.transformCoordinates(M,n,r)),{zoom:i,center:r}},this.boundsFromZoomAndCenter=function(t,e,n,r,i,o){var a,s,u,c,f,d;if(r=null===r?M:void 0===r?w:r,t=v._fix_zoom(t,i),d=v.unitsPerPixel(t),e=v.gcsToWorld(e,null),u=(a=_*d)/2,c=(s=b*d)/2,n?(e.x+=l.x,e.y+=l.y,(f=H(e,{width:a,height:s},n)).width=a,f.height=s,f=Y(f,n,void 0,o)):f=Y(f={left:e.x-u+l.x,right:e.x+u+l.x,bottom:e.y-c+l.y,top:e.y+c+l.y},0,void 0,o),r!==M){var p=h.transformCoordinates(M,r,[[f.left,f.top],[f.right,f.bottom]]);f={left:p[0][0],top:p[0][1],right:p[1][0],bottom:p[1][1]}}return f.width=a,f.height=s,f},this.discreteZoom=function(t){return void 0===t?L:(L!==(t=!!t)&&((L=t)&&v.zoom(Math.round(v.zoom())),v.interactor()&&v.interactor().options({discreteZoom:L})),v)},this.layers=this.children,this.sortedLayers=function(){return v.children().sort(G)},this.listSceneObjects=function(t){var e=[];return(t=t||v.sortedLayers()).forEach((function(t){if(e.indexOf(t)<0&&(e.push(t),t.children)){var n=t.children();n.length&&(e=e.concat(v.listSceneObjects(n)))}})),e},this.updateAttribution=function(){v.node().find(".geo-attribution").remove();var t=r("<div/>").addClass("geo-attribution").on("mousedown",(function(t){t.stopPropagation()}));return v.children().forEach((function(e){var n=e.attribution();n&&r("<span/>").addClass("geo-attribution-layer").html(n).appendTo(t)})),r("span",t).length&&t.appendTo(v.node()),v},this.screenshot=function(t,e,n,i){var o;if(!t||Array.isArray(t)||t.renderer||(e=e||t.type,n=n||t.encoderOptions,i=i||t,t=t.layers),(i=i||{}).wait){var a=r.extend({},i,{wait:!1});o=r.Deferred();var s=function(){window.requestAnimationFrame((function(){o.resolve()}))};return"idle"===i.wait?v.onIdle(s):s(),o.then((function(){return v.screenshot(t,e,n,a)}))}o=r.when(),t?Array.isArray(t)||(t=[t]):(t=v.layers(),null!==i.attribution&&void 0!==i.attribution||(i.attribution=!0)),t=(t=t.filter((function(t){return v.layers().indexOf(t)>=0&&t.opacity()>0&&(!t.visible||t.visible())}))).sort(G);var u=document.createElement("canvas");u.width=_,u.height=b;var l=u.getContext("2d");if(!1!==i.background&&null!==i.background){var c=i.background;void 0===i.background&&(l.fillStyle="white",l.fillRect(0,0,u.width,u.height),v.node().parents().get().reverse().forEach((function(t){(c=window.getComputedStyle(t).backgroundColor)&&"transparent"!==c&&(l.fillStyle=c,l.fillRect(0,0,u.width,u.height))})),c=window.getComputedStyle(v.node()[0]).backgroundColor),c&&"transparent"!==c&&(l.fillStyle=c,l.fillRect(0,0,u.width,u.height))}return t.forEach((function(t){var e=t.opacity();t.node().children("canvas").each((function(){var n=r(this);o=o.then((function(){t.renderer()&&"webgl"===t.renderer().api()&&t.renderer()._renderFrame(),U(l,e,n,n[0],t.node().css("mix-blend-mode"))}))})),!t.node().children().not("canvas").length&&t.node().children().length||t.renderer()&&"webgl"===t.renderer().api()||(o=o.then((function(){return f.htmlToImage(t.node(),1).done((function(e){U(l,1,r([]),e,t.node().css("mix-blend-mode"))}))})))})),i.attribution&&v.node().find(".geo-attribution").each((function(){var t=r(this);o=o.then((function(){return f.htmlToImage(t,1).done((function(t){U(l,1,r([]),t)}))}))})),i.html&&r(i.html).each((function(){var t=r(this);o=o.then((function(){return f.htmlToImage(t,1).done((function(e){U(l,1,r([]),e,t.css("mix-blend-mode"))}))}))})),o=o.then((function(){var t=u;if("canvas"!==e)try{u=u.toDataURL(e,n)}catch(t){console.warn("Failed to convert screenshot to output",t);var i=r.Deferred();return i.reject(),i}return v.geoTrigger(p.screenshot.ready,{canvas:t,screenshot:u}),u}))},this.scheduleAnimationFrame=function(t,e){F.length||F.push(window.requestAnimationFrame(W));var n=F.indexOf(t,1);if(n>=0){if(!e)return;if(F.splice(n,1),"remove"===e)return}return F.push(t),F[0]},this._fix_zoom=function(t,e){return t=Math.round(1e6*t)/1e6,t=Math.max(Math.min(S.max,t),S.min),L&&!e&&(t=Math.round(t))<S.min&&(t=Math.ceil(S.min)),t},this.autoshareRenderer=function(t){return void 0===t?j:(j=null===t?void 0:t,v)},this._version=n(2978),this._geo=n(6062),this._init(e),this.node().on("dragover.geo",(function(t){var e=t.originalEvent;v.fileReader()&&(e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy")})).on("drop.geo",(function(t){var e,n,r=t.originalEvent,i=v.fileReader();function o(){v.draw()}if(i)for(r.stopPropagation(),r.preventDefault(),e=0;e<r.dataTransfer.files.length;e+=1)n=r.dataTransfer.files[e],i.canRead(n)&&i.read(n,o)})),l={x:0,y:0},this.zoomRange(e,!0),T=this._fix_zoom(T),C=Q(C),this.center(r.extend({},e.center||A),void 0),null!==e.interactor&&this.interactor(e.interactor||m({discreteZoom:L})),N&&r(window).on("resize",J),v.geoOn([p.layerAdd,p.layerRemove],v.updateAttribution),this};a.create=function(t){"use strict";var e=a(t),r=n(9105);return e&&e.zoom?(t.data=t.data||[],t.layers=t.layers||[],t.layers.forEach((function(n){n.data=n.data||t.data,n.layer=r.create(e,n)})),e):(console.warn("Could not create map."),null)},i(a,o),t.exports=a},3870:function(t,e,n){var r=n(5699),i=n(3737),o=n(4634),a=n(3345),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this);var r,s,u,l,c,h,f,d,p,m,g=n(5638),v=n(5108),y=n(7839),x=n(4634).throttle,_=n(4634).debounce,b=n(4634).actionMatch,M=n(5017),w=this,A=0,T=null,C=!1,E=!1,k=function(){};function S(t){var e=t.x,n=t.y;return Math.sqrt(e*e+n*n)}function P(){h={boundDocumentHandlers:h.boundDocumentHandlers}}function O(t,e){e=e<=0?30:e;var n=function(){var t,e,n,i;if(!r.spring.enabled)return{x:0,y:0};var o=w.map().maxBounds(void 0,null),a=w.map().gcsToDisplay({x:o.left,y:o.top},null),s=w.map().gcsToDisplay({x:o.right,y:o.bottom},null),u=r.spring.springConstant,l=w.map().node().width(),c=w.map().node().height();return t=u*Math.max(0,a.x),e=u*Math.max(0,l-s.x),n=u*Math.max(0,a.y)/2,i=u*Math.max(0,c-s.y)/2,{x:t-e,y:n-i}}(),i=S(t),o=t.x/i,a=t.y/i;return i*=Math.exp(-r.momentum.drag*e),S(n)*e+i<r.momentum.minSpeed?null:(i>0?(o*=i,a*=i):(o=0,a=0),{x:o-n.x*e,y:a-n.y*e})}return r=g.extend(!0,{},{throttle:30,discreteZoom:!1,actions:[{action:y.pan,input:"left",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button pan"},{action:y.zoom,input:"right",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button zoom"},{action:y.zoom,input:"wheel",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"wheel zoom"},{action:y.rotate,input:"left",modifiers:{shift:!1,ctrl:!0},owner:"geo.mapInteractor",name:"button rotate"},{action:y.rotate,input:"wheel",modifiers:{shift:!1,ctrl:!0},owner:"geo.mapInteractor",name:"wheel rotate"},{action:y.select,input:"left",modifiers:{shift:!0,ctrl:!0},selectionRectangle:v.select,owner:"geo.mapInteractor",name:"drag select"},{action:y.zoomselect,input:"left",modifiers:{shift:!0,ctrl:!1},selectionRectangle:v.zoomselect,owner:"geo.mapInteractor",name:"drag zoom"},{action:y.unzoomselect,input:"right",modifiers:{shift:!0,ctrl:!1},selectionRectangle:v.unzoomselect,owner:"geo.mapInteractor",name:"drag unzoom"},{action:y.pan,input:"pan",owner:"geo.mapInteractor",name:"touch pan"},{action:y.zoomrotate,input:"rotate",owner:"geo.mapInteractor",name:"touch zoom and rotate"},{action:y.pan,input:"middle",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button pan"}],click:{enabled:!0,buttons:{left:!0,right:!0,middle:!0},duration:0,cancelOnMove:!0},keyboard:{actions:{"zoom.in":["plus","shift+plus","shift+ctrl+plus","=","shift+=","shift+ctrl+="],"zoom.out":["-","shift+-","shift+ctrl+-","_","shift+_","shift+ctrl+_"],"zoom.0":["1"],"zoom.3":["2"],"zoom.6":["3"],"zoom.9":["4"],"zoom.12":["5"],"zoom.15":["6"],"zoom.18":["7"],"pan.left":["left","shift+left","shift+ctrl+left"],"pan.right":["right","shift+right","shift+ctrl+right"],"pan.up":["up","shift+up","shift+ctrl+up"],"pan.down":["down","shift+down","shift+ctrl+down"],"rotate.ccw":["<","shift+<","shift+ctrl+<",".","shift+.","shift+ctrl+."],"rotate.cw":[">","shift+>","shift+ctrl+>",",","shift+,","shift+ctrl+,"],"rotate.0":["0"]},meta:{0:{shift:!1,ctrl:!1},1:{shift:!0,ctrl:!0},2:{shift:!0,ctrl:!1}},metakeyMouseEvents:["shift","ctrl","shift+ctrl","shift+alt","shift+meta"],focusHighlight:!0},alwaysTouch:!1,wheelScaleX:1,wheelScaleY:1,zoomScale:1,rotateWheelScale:6*Math.PI/180,zoomrotateMinimumRotation:5*Math.PI/180,zoomrotateReverseRotation:4*Math.PI/180,zoomrotateMinimumZoom:.05,zoomrotateMinimumPan:5,touchPanDelay:50,momentum:{enabled:!0,maxSpeed:2.5,minSpeed:.01,stopTime:250,drag:.01,actions:[y.pan,y.zoom]},spring:{enabled:!1,springConstant:5e-5},zoomAnimation:{enabled:!0,duration:500,ease:function(t){return(2-t)*t}}},e||{}),e&&e.actions&&(r.actions=g.extend(!0,[],e.actions)),e&&e.momentum&&e.momentum.actions&&(r.momentum.actions=g.extend(!0,[],e.momentum.actions)),e&&e.keyboard&&void 0!==e.keyboard.actions&&(r.keyboard.actions=g.extend(!0,{},e.keyboard.actions)),s={page:{x:0,y:0},map:{x:0,y:0},geo:{x:0,y:0},mapgcs:{x:0,y:0},buttons:{left:!1,right:!1,middle:!1},modifiers:{alt:!1,ctrl:!1,shift:!1,meta:!1},time:new Date,deltaTime:1,velocity:{x:0,y:0}},h={},f={},this._handleKeys=function(t,e,n){n&&!0===n.simulated&&(e=n);var i,o,a=r.keyboard.meta||{0:{}},s=w.map(),u=s.size(),l=t,c="",h={};for(i in a)a.hasOwnProperty(i)&&(void 0!==a[i].shift&&e.shiftKey!==!!a[i].shift||void 0!==a[i].ctrl&&e.ctrlKey!==!!a[i].ctrl||void 0!==a[i].alt&&e.altKey!==!!a[i].alt||void 0!==a[i].meta&&e.metaKey!==!!a[i].meta||(o=i));if(void 0!==o){switch(e.stopPropagation(),e.preventDefault(),t.indexOf(".")>=0&&(l=t.substr(0,t.indexOf(".")),c=t.substr(t.indexOf(".")+1)),l){case"zoom":switch(c){case"in":h.zoomDelta=[.05,.25,1][o];break;case"out":h.zoomDelta=-[.05,.25,1][o];break;default:isNaN(parseFloat(c))||(h.zoom=parseFloat(c))}break;case"pan":switch(c){case"down":h.panY=-Math.max(1,[0,.05,.5][o]*u.height);break;case"left":h.panX=Math.max(1,[0,.05,.5][o]*u.width);break;case"right":h.panX=-Math.max(1,[0,.05,.5][o]*u.width);break;case"up":h.panY=Math.max(1,[0,.05,.5][o]*u.height)}break;case"rotate":switch(c){case"ccw":h.rotationDelta=[1,5,90][o]*Math.PI/180;break;case"cw":h.rotationDelta=-[1,5,90][o]*Math.PI/180;break;default:isNaN(parseFloat(c))||(h.rotation=parseFloat(c))}}s.geoTrigger(v.keyaction,{move:h,action:t,factor:o,event:e}),h.cancel||(void 0!==h.zoom?s.zoom(h.zoom):h.zoomDelta&&s.zoom(s.zoom()+h.zoomDelta),void 0!==h.rotation?s.rotation(h.rotation):h.rotationDelta&&s.rotation(s.rotation()+h.rotationDelta),(h.panX||h.panY)&&s.pan({x:h.panX||0,y:h.panY||0}))}},this.hasTouchSupport=function(){return"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof window.DocumentTouch||(navigator.msMaxTouchPoints||navigator.maxTouchPoints)>1},this._handleTouch=function(t){var e=!1;if("mouse"===t.pointerType&&c.touchSupport&&(e=!0),"hammer.input"===t.type){if("pan"!==c.lastEventType||1===t.pointers.length)return;e=!0,c.lastEventType=null}var n=/^(.*)(start|end|move|tap)$/.exec(t.type);if(n&&3===n.length||(e=!0),e)h.boundDocumentHandlers&&c.lastEvent&&w._handleMouseUpDocument(c.lastEvent);else{t.which=n[1];var i=(new Date).valueOf();"pan"===t.which&&"pan"!==c.lastEventType&&i-c.lastTime<r.touchPanDelay||(c.lastTime=i,c.lastEventType=t.which,c.lastEvent=t,void 0===t.pageX&&void 0!==t.center&&void 0!==t.center.x&&(t.pageX=t.center.x,t.pageY=t.center.y),"start"===n[2]&&(w._handleMouseDown(t),w._setClickMaybe(!1),h.boundDocumentHandlers&&g(document).on("mousemove.geojs",w._handleMouseUpDocument)),"start"!==n[2]&&"move"!==n[2]||(h.boundDocumentHandlers?w._handleMouseMoveDocument(t):w._handleMouseMove(t)),"end"!==n[2]&&"cancel"!==n[2]||(h.boundDocumentHandlers?w._handleMouseUpDocument(t):w._handleMouseUp(t),c.lastEvent=null),"tap"!==n[2]||h.boundDocumentHandlers||(t.which=1,c.lastEventType=null,w._handleMouseDown(t),w._handleMouseUp(t),c.lastEventType=n[2]))}},this._repeatMouseMoveEvent=function(t){if(s&&s.modifiers){var e=s.modifiers.alt,n=s.modifiers.ctrl,r=s.modifiers.meta,i=s.modifiers.shift;w._getMouseModifiers(t),s.modifiers.alt===e&&s.modifiers.ctrl===n&&s.modifiers.meta===r&&s.modifiers.shift===i||(h.boundDocumentHandlers?w.map().geoTrigger(v.actionmove,{state:w.state(),mouse:w.mouse(),event:t}):w.map().geoTrigger(v.mousemove,w.mouse()))}},this.retriggerMouseMove=function(){w.map().geoTrigger(v.mousemove,w.mouse())},this._connectEvents=function(){if(!r.map)return w;w._disconnectEvents(),d=g(r.map.node()),w._handleMouseWheel=function(){var t={};function e(e){var n,i;C||(t!==f&&(f=t={kind:"wheel",scroll:{x:0,y:0}}),e.preventDefault(),e.deltaFactor=1,1===e.originalEvent.deltaMode?e.deltaFactor=40:2===e.originalEvent.deltaMode&&(e.deltaFactor=g(window).height()),n=e.originalEvent.deltaX||0,i=e.originalEvent.deltaY||0,n=n*r.wheelScaleX*e.deltaFactor/120,i=i*r.wheelScaleY*e.deltaFactor/120,t.scroll.x+=n,t.scroll.y+=i)}function n(e){var n,i;if(t===f){if(w._getMousePosition(e),w._getMouseButton(e),w._getMouseModifiers(e),i=(b({wheel:!0},s.modifiers,r.actions)||{}).action){var o=w.map().transitionCancel("wheel."+i);switch((o|=w.cancel(y.momentum,!0))&&(s.geo=w.map().displayToGcs(s.map),s.mapgcs=w.map().displayToGcs(s.map,null)),i){case y.pan:w.map().pan({x:f.scroll.x,y:f.scroll.y},void 0,"limited");break;case y.zoom:n=-f.scroll.y,k(n,s);break;case y.rotate:w.map().rotation(w.map().rotation()+f.scroll.y*r.rotateWheelScale,s)}w.map().geoTrigger(v.actionwheel,{state:w.state(),mouse:w.mouse(),eventData:e})}f={}}}return r.throttle>0?x(r.throttle,!1,n,e):function(t){e(t),n(t)}}(),k=function(){var t,e,n,i=0,o=400;function a(o,a){var s,u=w.map();t=g.extend(!0,{},a),i+=o,void 0===n&&(e=n=u.zoom()),n+=o,u&&Math.abs(i)>=1&&r.discreteZoom&&!r.zoomAnimation.enabled&&(s=Math.round(i+u.zoom()),i=i+u.zoom()-s,u.zoom(s,t))}function s(){var o,a=w.map();a&&(r.zoomAnimation.enabled?(o=n,r.discreteZoom&&(o=Math.round(o))===e&&n!==e&&(o=e+(n>e?1:-1)),(o=Math.round(1e6*a._fix_zoom(o))/1e6)!==a.zoom()?(a.transitionCancel("debounced_zoom."+y.zoom),a.transition({zoom:o,zoomOrigin:t,duration:r.zoomAnimation.duration,ease:r.zoomAnimation.ease,done:function(t){t=t||{};var e=new RegExp("\\."+y.zoom+"$");t.next||t.cancel&&!((""+t.source).search(e)<0)||(n=void 0),r.discreteZoom&&t.cancel&&t.transition&&t.transition.end&&(""+t.source).search(e)<0&&a.zoom(t.transition.end.zoom,t.transition.end.zoomOrigin)}})):n=void 0):(o=i+a.zoom(),r.discreteZoom&&(o=Math.round(o)),a.zoom(o,t))),i=0}!0!==r.discreteZoom&&r.discreteZoom>0&&(o=r.discreteZoom);return(!0===r.discreteZoom||r.discreteZoom>0)&&!r.zoomAnimation.enabled?_(o,!1,s,a):function(t,e){(t||void 0!==n)&&(a(t,e),s())}}(),o.adjustActions(r.actions);var t={};if(["right","pan","rotate"].forEach((function(e){t[e]=r.actions.some((function(t){return t.input[e]}))})),d.on("wheel.geojs",w._handleMouseWheel),d.on("mousemove.geojs",w._handleMouseMove),d.on("mousedown.geojs",w._handleMouseDown),d.on("mouseup.geojs",w._handleMouseUp),d.on("dragstart",(function(){return!1})),t.right&&d.on("contextmenu.geojs",(function(){return!1})),r.keyboard&&r.keyboard.actions){u=a(d[0]);var e=[];for(var i in r.keyboard.actions)r.keyboard.actions.hasOwnProperty(i)&&(u.bind(r.keyboard.actions[i],function(t){return function(e,n){w._handleKeys(t,e,n)}}(i)),e=e.concat(r.keyboard.actions[i]));r.keyboard.metakeyMouseEvents&&r.keyboard.metakeyMouseEvents.forEach((function(t){u.bind(t,w._repeatMouseMoveEvent,"keydown"),u.bind(t,w._repeatMouseMoveEvent,"keyup"),e.push(t)})),l=e}if(d.toggleClass("highlight-focus",!!(l&&l.length&&r.keyboard.focusHighlight)),(w.hasTouchSupport()||r.alwaysTouch)&&(t.pan||t.rotate)){var h;try{(h=n(9549))&&h.Manager||(h=void 0)}catch(t){}if(void 0!==h){var p=[],m=["hammer.input"];t.rotate&&(p.push([h.Rotate,{enable:!0}]),m=m.concat(["rotatestart","rotateend","rotatemove"])),t.pan&&(p.push([h.Pan,{direction:h.DIRECTION_ALL}]),m=m.concat(["panstart","panend","panmove"])),p.push([h.Tap,{event:"doubletap",taps:2}]),p.push([h.Tap,{event:"singletap"},void 0,["doubletap"]]),m=m.concat(["singletap"]);var M={recognizers:p,preventDefault:!0};(c={manager:new h.Manager(d[0],M),touchSupport:w.hasTouchSupport(),lastTime:0}).manager.get("doubletap").recognizeWith("singletap"),m.forEach((function(t){c.manager.on(t,w._handleTouch)}))}}return w},this._disconnectEvents=function(){return l&&(u&&u.unbind(l),l=null,u=null),c&&(c.manager.destroy(),c=null),d&&(d.off(".geojs"),d=null),w._handleMouseWheel=function(){},k=function(){},w},this.map=function(t){return void 0!==t?(r.map=t,w._connectEvents(),w):r.map},this.options=function(t){return void 0===t?g.extend({},r):(g.extend(r,t),w._connectEvents(),w)},this._getMousePosition=function(t){if(void 0!==t.pageX&&void 0!==t.pageY){var e,n,r=d.offset();e=(n=(new Date).valueOf())-s.time,s.time=n,s.deltaTime=e,s.velocity={x:(t.pageX-s.page.x)/e,y:(t.pageY-s.page.y)/e},s.page={x:t.pageX,y:t.pageY},s.map={x:t.pageX-r.left,y:t.pageY-r.top};try{s.geo=w.map().displayToGcs(s.map),s.mapgcs=w.map().displayToGcs(s.map,null)}catch(t){s.geo=s.mapgcs=null}}},this._getMouseButton=function(t){if(void 0!==t.buttons||void 0!==t.which){for(var e in s.buttons)s.buttons.hasOwnProperty(e)&&(s.buttons[e]=!1);if(void 0!==t.buttons)s.buttons.left=!!(1&t.buttons),s.buttons.right=!!(2&t.buttons),s.buttons.middle=!!(4&t.buttons);else if("mouseup"!==t.type)switch(t.which){case 1:s.buttons.left=!0;break;case 2:s.buttons.middle=!0;break;case 3:s.buttons.right=!0}!t.which||t.which>=1&&t.which<=3||(s.buttons[t.which]=!0)}},this._getMouseModifiers=function(t){s.modifiers.alt=t.altKey,s.modifiers.ctrl=t.ctrlKey,s.modifiers.meta=t.metaKey,s.modifiers.shift=t.shiftKey},this._getSelection=function(){var t=h.origin,e=w.mouse(),n=w.map(),r={},i={},a=e.map;if(h.actionRecord&&o.isFunction(h.actionRecord.selectionConstraint)){var s=h.actionRecord.selectionConstraint(e.mapgcs,t.mapgcs);a=s?n.gcsToDisplay(s.pos,null):a}else if(e.modifiers.shift){var u=Math.pow(Math.abs((a.x-t.map.x)*(a.y-t.map.y)),.5);a={x:t.map.x+Math.sign(a.x-t.map.x)*u,y:t.map.y+Math.sign(a.y-t.map.y)*u}}return r.upperLeft={x:Math.min(t.map.x,a.x),y:Math.min(t.map.y,a.y)},r.lowerRight={x:Math.max(t.map.x,a.x),y:Math.max(t.map.y,a.y)},r.upperRight={x:r.lowerRight.x,y:r.upperLeft.y},r.lowerLeft={x:r.upperLeft.x,y:r.lowerRight.y},i.upperLeft=n.displayToGcs(r.upperLeft,null),i.lowerRight=n.displayToGcs(r.lowerRight,null),i.upperRight=n.displayToGcs(r.upperRight,null),i.lowerLeft=n.displayToGcs(r.lowerLeft,null),p.data([{ul:i.upperLeft,ur:i.upperRight,ll:i.lowerLeft,lr:i.lowerRight}]),p.draw(),{display:r,gcs:i,mouse:e,origin:g.extend({},h.origin)}},this.cancel=function(t,e){var n;return(n=t?h.action===t:!!h.action)&&(e||(f={}),P()),n},this._setClickMaybe=function(t){E=t,m&&(window.clearTimeout(m),m=null)},this._handleMouseDown=function(t){var e,n;if(!(C||c&&"tap"===c.lastEventType&&(new Date).valueOf()-c.lastTime<1e3)){w._getMousePosition(t),w._getMouseButton(t),w._getMouseModifiers(t),w.map().geoTrigger(v.mousedown,w.mouse()),!r.click.enabled||s.buttons.left&&!r.click.buttons.left||s.buttons.right&&!r.click.buttons.right||s.buttons.middle&&!r.click.buttons.middle||(w._setClickMaybe({x:s.page.x,y:s.page.y,buttons:g.extend({},s.buttons)}),r.click.duration>0&&(m=window.setTimeout((function(){E=!1,m=null}),r.click.duration))),e=((n=b(s.buttons,s.modifiers,r.actions))||{}).action;var i=w.map();i.transitionCancel("_handleMouseDown"+(e?"."+e:"")),w.cancel(y.momentum),s.velocity={x:0,y:0},e&&(f={kind:"move"},A+=1,h={action:e,actionRecord:n,origin:g.extend(!0,{},s),initialZoom:i.zoom(),initialRotation:i.rotation(),initialEventRotation:t.rotation,stateId:A,delta:{x:0,y:0}},n.selectionRectangle&&(T&&(T.clear(),i.deleteLayer(T),T=null),T=i.createLayer("feature",{features:[M.capabilities.color],autoshareRenderer:!1}),(p=T.createFeature("quad",{gcs:i.gcs()})).style({opacity:.25,color:{r:.3,g:.3,b:.3}}),i.geoTrigger(v.brushstart,w._getSelection())),i.geoTrigger(v.actiondown,{state:w.state(),mouse:w.mouse(),event:t}),r.throttle>0?g(document).on("mousemove.geojs",x(r.throttle,w._handleMouseMoveDocument)):g(document).on("mousemove.geojs",w._handleMouseMoveDocument),g(document).on("mouseup.geojs",w._handleMouseUpDocument),h.boundDocumentHandlers=!0)}},this._handleMouseMove=function(t){C||h.boundDocumentHandlers||(r.click.cancelOnMove&&E&&w._setClickMaybe(!1),w._getMousePosition(t),w._getMouseButton(t),w._getMouseModifiers(t),E||w.map().geoTrigger(v.mousemove,w.mouse()))},this._handleZoomrotate=function(t){var e=Math.log2(t.scale);if(!h.zoomrotateAllowZoom&&e&&Math.abs(e)>=Math.log2(1+r.zoomrotateMinimumZoom)&&(r.zoomrotateMinimumZoom&&(h.initialZoom-=e),h.zoomrotateAllowZoom=!0),h.zoomrotateAllowZoom&&e){var n=h.initialZoom+e;w.map().zoom(n,h.origin)}var i=(t.rotation-h.initialEventRotation)*Math.PI/180;if(!h.zoomrotateAllowRotation&&i&&Math.abs(i)>=r.zoomrotateMinimumRotation&&(r.zoomrotateMinimumRotation&&(h.initialEventRotation=t.rotation,i=0),h.zoomrotateAllowRotation=!0),h.zoomrotateAllowRotation){var a=h.initialRotation+i;(i=o.wrapAngle(a-w.map().rotation()))&&(i*(h.lastRotationDelta||0)>=0||Math.abs(i)>=r.zoomrotateReverseRotation)&&(w.map().rotation(a,h.origin),h.lastRotationDelta=i)}var s=h.origin.page;if(h.initialEventGeo){var u=d.offset();(s=w.map().gcsToDisplay(h.initialEventGeo)).x+=u.left,s.y+=u.top}var l=t.pageX-s.x,c=t.pageY-s.y,f=l*l+c*c;!h.zoomrotateAllowPan&&f&&f>=r.zoomrotateMinimumPan*r.zoomrotateMinimumPan&&(r.zoomrotateMinimumPan?(l=c=0,h.initialEventGeo=w.mouse().geo):h.initialEventGeo=h.origin.geo,h.zoomrotateAllowPan=!0),h.zoomrotateAllowPan&&(l||c)&&w.map().pan({x:l,y:c})},this._handleMouseMoveDocument=function(t){var e,n,i;if(w.map()&&!C&&"move"===f.kind){if(w._getMousePosition(t),w._getMouseButton(t),w._getMouseModifiers(t),r.click.cancelOnMove)if(void 0===E.x||void 0===E.y)w._setClickMaybe(!1);else if(!0!==r.click.cancelOnMove||s.page.x===E.x&&s.page.y===E.y){Math.sqrt(Math.pow(s.page.x-E.x,2)+Math.pow(s.page.y-E.y,2))>=r.click.cancelOnMove&&w._setClickMaybe(!1)}else w._setClickMaybe(!1);if(!E)if(h.action){if(e=s.map.x-h.origin.map.x-h.delta.x,n=s.map.y-h.origin.map.y-h.delta.y,h.delta.x+=e,h.delta.y+=n,h.action===y.pan)w.map().pan({x:e,y:n},void 0,"limited");else if(h.action===y.zoom)k(-n*r.zoomScale/120,h);else if(h.action===y.rotate){var o,a;void 0===h.origin.rotation&&(o=h.origin.map.x-w.map().size().width/2,a=h.origin.map.y-w.map().size().height/2,h.origin.rotation=w.map().rotation()-Math.atan2(a,o)),o=s.map.x-w.map().size().width/2,a=s.map.y-w.map().size().height/2,w.map().rotation(h.origin.rotation+Math.atan2(a,o))}else h.action===y.zoomrotate?w._handleZoomrotate(t):h.actionRecord.selectionRectangle&&(i=w._getSelection(),w.map().geoTrigger(v.brush,i));w.map().geoTrigger(v.actionmove,{state:w.state(),mouse:w.mouse(),event:t}),t.preventDefault()}else console.log("WARNING: Invalid state in mapInteractor.")}},this._zoomFromSelection=function(t,e,n){if((t===y.zoomselect||t===y.unzoomselect)&&e.x!==n.x&&e.y!==n.y){var r,i,o=w.map(),a=o.size(),s={x:Math.abs((n.x-e.x)/a.width),y:Math.abs((n.y-e.y)/a.height)};if(t===y.zoomselect?(i=o.displayToGcs({x:(e.x+n.x)/2,y:(e.y+n.y)/2},null),r=o.zoom()-Math.log2(Math.max(s.x,s.y))):(r=o.zoom()+Math.log2(Math.max(s.x,s.y)),i=o.center(void 0,null)),o.discreteZoom()&&(r=Math.floor(r)),o.zoom(r),t===y.zoomselect)o.center(i,null);else{var u=o.gcsToDisplay(i,null);o.pan({x:(e.x+n.x)/2-u.x,y:(e.y+n.y)/2-u.y})}}},this._handleMouseUpDocument=function(t){var e,n;if(!C&&(f={},w._setClickMaybe(!1),w._getMouseButton(t),w._getMouseModifiers(t),g(document).off(".geojs"),h.boundDocumentHandlers=!1,s.buttons.right&&t.preventDefault(),h.actionRecord&&h.actionRecord.selectionRectangle&&(w._getMousePosition(t),e=w._getSelection(),T.clear(),w.map().deleteLayer(T),T=null,p=null,w.map().geoTrigger(v.brushend,e),!0!==h.actionRecord.selectionRectangle&&w.map().geoTrigger(h.actionRecord.selectionRectangle,e),w._zoomFromSelection(h.action,e.display.lowerLeft,e.display.upperRight),w.map().geoTrigger(v.actionselection,{state:w.state(),mouse:w.mouse(),event:t,lowerLeft:e.display.lowerLeft,upperRight:e.display.upperRight})),w.map().geoTrigger(v.actionup,{state:w.state(),mouse:w.mouse(),event:t}),n=h.action,P(),r.momentum.enabled&&g.inArray(n,r.momentum.actions)>=0)){var i=(new Date).valueOf(),o=i-s.time+s.deltaTime;i-s.time<r.momentum.stopTime?(s.velocity.x*=s.deltaTime/o,s.velocity.y*=s.deltaTime/o,s.deltaTime=o):s.velocity.x=s.velocity.y=0,w.springBack(!0,n)}},this._handleMouseUp=function(t){if(!C){w._getMouseButton(t),E&&w._handleMouseClick(t);var e=w.mouse();e.buttonsDown=E.buttons,w.map().geoTrigger(v.mouseup,e)}},this._handleMouseClick=function(t){h.actionRecord&&h.actionRecord.selectionRectangle&&(T.clear(),w.map().deleteLayer(T),T=null,p=null,h.action=h.actionRecord=null),w._getMouseButton(t),w._getMouseModifiers(t),w.cancel(y.pan),g(document).off(".geojs"),h.boundDocumentHandlers=!1;var e=w.mouse();e.buttonsDown=E.buttons,w._setClickMaybe(!1),w.map().geoTrigger(v.mouseclick,e)},this._handleMouseWheel=function(){},this.springBack=function(t,e){h.action!==y.momentum&&(t||(s.velocity={x:0,y:0}),h.origAction=e,h.action=y.momentum,h.origin=w.mouse(),h.momentum=w.mouse(),h.start=new Date,h.handler=function(){var t,e,n,i;if(h.action===y.momentum&&w.map()&&!w.map().transition())if(i=Math.min(h.momentum.deltaTime,30),n=h.start.valueOf(),h.start=new Date,t=O(h.momentum.velocity,h.start-n)){if((e=S(t))>r.momentum.maxSpeed&&(e=r.momentum.maxSpeed/e,t.x=t.x*e,t.y=t.y*e),isFinite(t.x)&&isFinite(t.y)||(t.x=0,t.y=0),h.momentum.velocity.x=t.x,h.momentum.velocity.y=t.y,h.origAction===y.zoom){var o=h.momentum.velocity.y*i;k(-o*r.zoomScale/120,h)}else w.map().pan({x:h.momentum.velocity.x*i,y:h.momentum.velocity.y*i},void 0,"limited");h.handler&&w.map().scheduleAnimationFrame(h.handler)}else P()},h.handler&&w.map().scheduleAnimationFrame(h.handler))},this.destroy=function(){w._disconnectEvents(),w.map()&&g(w.map().node()).removeClass("highlight-focus"),w.map(null)},this.mouse=function(){return g.extend(!0,{},s)},this.keyboard=function(t){return void 0===t?g.extend(!0,{},r.keyboard||{}):w.options({keyboard:t})},this.state=function(){return g.extend(!0,{},h)},this.pause=function(t){return void 0===t?C:(C=!!t,w)},this.addAction=function(t,e){t&&t.action&&t.input&&(o.addAction(r.actions,t,e),r.map&&r.actions.some((function(t){return t.input.right}))&&(d.off("contextmenu.geojs"),d.on("contextmenu.geojs",(function(){return!1}))))},this.hasAction=function(t,e,n){return o.hasAction(r.actions,t,e,n)},this.removeAction=function(t,e,n){var i=o.removeAction(r.actions,t,e,n);return r.map&&!r.actions.some((function(t){return t.input.right}))&&d.off("contextmenu.geojs"),i},this.simulateEvent=function(t,e){var n,r,i,o,a;if(!w.map())return w;if("keyboard"===t&&u){var s={shiftKey:e.shift||e.shiftKey||!1,ctrlKey:e.ctrl||e.ctrlKey||!1,altKey:e.alt||e.altKey||!1,metaKey:e.meta||e.metaKey||!1,toString:function(){return e.keys},stopPropagation:function(){},preventDefault:function(){},simulated:!0};u.trigger(s,e.event)}else r=e.page||{},e.map&&(i=d.offset(),r.x=e.map.x+i.left,r.y=e.map.y+i.top),"left"===e.button?(o=1,a=1):"right"===e.button?(o=3,a=2):"middle"===e.button&&(o=2,a=4),e.modifiers=e.modifiers||[],e.wheelDelta=e.wheelDelta||{},n=g.Event(t,{pageX:r.x,pageY:r.y,which:o,buttons:a,altKey:e.modifiers.indexOf("alt")>=0,ctrlKey:e.modifiers.indexOf("ctrl")>=0,metaKey:e.modifiers.indexOf("meta")>=0,shiftKey:e.modifiers.indexOf("shift")>=0,center:e.center,rotation:e.touch?e.rotation||0:e.rotation,scale:e.touch?e.scale||1:e.scale,pointers:e.pointers,pointerType:e.pointerType,originalEvent:{deltaX:e.wheelDelta.x,deltaY:e.wheelDelta.y,deltaMode:e.wheelMode,preventDefault:function(){},stopPropagation:function(){},stopImmediatePropagation:function(){}}}),e.touch&&c?w._handleTouch(n):d.trigger(n),t.indexOf(".geojs")>=0&&g(document).trigger(n)},this._connectEvents(),this};r(s,i),t.exports=s},7098:function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a=n(5699),s=n(6837),u=n(2557),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},u.call(this,e);var o=n(5638),a=n(6618),s=n(4634),l=n(5866);l=l.__esModule?l.default:l;var c=this,h=this._init,f=null,d=a(),p=0,m=0,g=0;return this.featureType="marker",this._updateRangeTree=function(){if(!(d.timestamp()>=c.dataTime().timestamp()&&d.timestamp()>=c.timestamp())){var e,n,o=c.style.get("radius"),a=c.style.get("strokeWidth"),s=c.style.get("radiusIncludesStroke"),u=c.style.get("strokeOffset"),h=c.style.get("scaleWithZoom");n=c.position(),p=0,m=0,g=0,e=c.data().map((function(e,r){var i=n(e,r),l=h(e,r),c=o(e,r),f=a(e,r),d=Math.sign(u(e,r)),v=s(e,r),y=(v=void 0===v||v)?c+f*(d+1)/2:c+f,x=v?c+f*(d-1)/2:c;switch(l=t.scaleMode[l]||(l>=1&&l<=3?l:0)){case t.scaleMode.stroke:x>p&&(p=x),f>g&&(g=f);break;case t.scaleMode.fill:case t.scaleMode.all:y>m&&(m=y);break;default:y>p&&(p=y)}return[i.x,i.y]})),f=new l(e.length);var v,y=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(e);try{for(y.s();!(v=y.n()).done;){var x=r(v.value,2),_=x[0],b=x[1];f.add(_,b)}}catch(t){y.e(t)}finally{y.f()}f.finish(),d.modified()}},this._approximateMaxRadius=function(t){c._updateRangeTree();var e=Math.pow(2,t);return Math.max(p+g*e,m*e)},this.pointSearch=function(e,n){var r,i,o,a,s=[],u=[],l=[],h=c.gcs(),d=c.style.get("radius"),p=c.style.get("strokeWidth"),m=c.style.get("radiusIncludesStroke"),g=c.style.get("strokeOffset"),v=c.style.get("scaleWithZoom");if(!(o=c.data())||!o.length)return{found:[],index:[]};c._updateRangeTree();var y=c.layer().map();n=null===n?y.gcs():void 0===n?y.ingcs():n;var x=y.gcsToDisplay(e,n),_=y.zoom(),b=Math.pow(2,_),M=this._approximateMaxRadius(_);return a=[y.displayToGcs({x:x.x-M,y:x.y-M},h),y.displayToGcs({x:x.x+M,y:x.y-M},h),y.displayToGcs({x:x.x-M,y:x.y+M},h),y.displayToGcs({x:x.x+M,y:x.y+M},h)],r={x:Math.min(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.min(a[0].y,a[1].y,a[2].y,a[3].y)},i={x:Math.max(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.max(a[0].y,a[1].y,a[2].y,a[3].y)},(s=f.range(r.x,r.y,i.x,i.y)).sort((function(t,e){return t-e})),s.forEach((function(e){var n=o[e],r=d(o[e],e),i=v(o[e],e),a=g(o[e],e),s=i?p(o[e],e):0,f=m(n,e),_=(f=void 0===f||f)?r+s*(a-1)/2:r;r=_+s;var M,w,A,T=c.position()(n,e);switch(i=t.scaleMode[i]||(i>=1&&i<=3?i:0)){case t.scaleMode.fill:r=_*b+s;break;case t.scaleMode.stroke:r=_+s*b;break;case t.scaleMode.all:r*=b}r&&(A=r*r,(M=(T=y.gcsToDisplay(T,h)).x-x.x)*M+(w=T.y-x.y)*w<=A&&(u.push(n),l.push(e)))})),{found:u,index:l}},this.polygonSearch=function(e,n,r){var i,o,a,u,l=c.gcs(),h=[],d=[],p={},m=c.layer().map(),g=c.data(),v=c.style.get("radius"),y=c.style.get("strokeWidth"),x=c.style.get("radiusIncludesStroke"),_=c.style.get("strokeOffset"),b=c.style.get("scaleWithZoom"),M=m.zoom(),w=Math.pow(2,M),A=this._approximateMaxRadius(M);return r=null===r?m.gcs():void 0===r?m.ingcs():r,e.outer||(e={outer:e,inner:[]}),e.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((n=n||{}).partial=n.partial||!1,(e={outer:m.gcsToDisplay(e.outer,r),inner:(e.inner||[]).map((function(t){return m.gcsToDisplay(t,r)}))}).outer.forEach((function(t){o||(o={x:t.x,y:t.y},a={x:t.x,y:t.y}),t.x<o.x&&(o.x=t.x),t.x>a.x&&(a.x=t.x),t.y<o.y&&(o.y=t.y),t.y>a.y&&(a.y=t.y)})),c._updateRangeTree(),u=[m.displayToGcs({x:o.x-A,y:o.y-A},l),m.displayToGcs({x:a.x+A,y:o.y-A},l),m.displayToGcs({x:a.x+A,y:a.y+A},l),m.displayToGcs({x:o.x-A,y:a.y+A},l)],o={x:Math.min(u[0].x,u[1].x,u[2].x,u[3].x),y:Math.min(u[0].y,u[1].y,u[2].y,u[3].y)},a={x:Math.max(u[0].x,u[1].x,u[2].x,u[3].x),y:Math.max(u[0].y,u[1].y,u[2].y,u[3].y)},(i=f.range(o.x,o.y,a.x,a.y)).sort((function(t,e){return t-e})),i.forEach((function(r){var i=g[r],o=c.position()(i,r),a=v(g[r],r),u=b(g[r],r),f=_(g[r],r),M=u?y(g[r],r):0,A=x(i,r),T=(A=void 0===A||A)?a+M*(f-1)/2:a;switch(a=T+M,u=t.scaleMode[u]||(u>=1&&u<=3?u:0)){case t.scaleMode.fill:a=T*w+M;break;case t.scaleMode.stroke:a=T+M*w;break;case t.scaleMode.all:a*=w}if(a){o=m.gcsToDisplay(o,l);var C=s.distanceToPolygon2d(o,e);(C>=a||C>=0&&"center"===n.partial||C>=-a&&n.partial&&"center"!==n.partial)&&(h.push(i),d.push(r),p[r]={partial:C<a,distance:C})}})),{found:h,index:d,extra:p})},this._init=function(e){return e=o.extend(!0,{},{style:o.extend({},{radius:6.25,radiusIncludesStroke:!0,strokeColor:{r:.851,g:.604,b:0},strokeOffset:-1,strokeOpacity:1,strokeWidth:1.25,fillColor:{r:1,g:.839,b:.439},fillOpacity:.8,symbol:0,symbolValue:0,rotation:0,scaleWithZoom:t.scaleMode.none,rotateWithMap:!1},e&&void 0===e.style?{}:e.style)},e),h.call(c,e),c},c};l.create=function(t,e){"use strict";return(e=e||{}).type="marker",s.create(t,e)},l.capabilities={feature:"marker"},l.primitiveShapes=u.primitiveShapes,l.symbols={circle:0,ellipse:0,flowerBase:1,flowerMax:16,triangle:16,diamond:17,starBase:17,starMax:16,square:32,rectangle:32,crossBase:33,crossMax:16,oval:48,jackBase:49,jackMax:16,drop:64,dropBase:65,dropMax:16,arrow:80,arrowBase:81,arrowMax:16,length:96},["flower","star","cross","jack","drop","arrow"].forEach((function(t){for(var e=2;e<=l.symbols[t+"Max"];e+=1)l.symbols[t+e]=l.symbols[t+"Base"]-2+e})),l.scaleMode={none:0,fill:1,stroke:2,all:3},a(l,u),t.exports=l},9146:function(t,e,n){var r=n(5699),i=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),o=n(4634);e=e||{},i.call(this,e);var a=this,s=this._init,u={};return this.featureType="mesh",this.mesh=function(t,e){if(void 0===t)return u;if("string"==typeof t&&void 0===e)return u[t];if(void 0===e){var n=r.extend({},{gridWidth:function(){return t.gridHeight?Math.floor(a.data().length/t.gridHeight):Math.floor(Math.sqrt(a.data().length))},gridHeight:function(){return t.gridWidth?Math.floor(a.data().length/t.gridWidth):Math.floor(Math.sqrt(a.data().length))}},u,t);u=n}else u[t]=e;return a.modified(),a},this.mesh.get=function(t){if(void 0===t){var e,n={};for(e in u)u.hasOwnProperty(e)&&(n[e]=a.mesh.get(e));return n}return o.ensureFunction(u[t])},this.position=function(t){return void 0===t?a.style("position"):(a.style("position",t),a.dataTime().modified(),a.modified(),a)},this._createMesh=function(t,e){t=t||{},e=e||{};var n,r,i,o,s,u,l,c,h,f,d,p,m,g,v,y,x=a.data(),_=a.position(),b=a.mesh.get("elements")(x),M=a.mesh.get("elementPacking")(x),w=a.mesh.get("gridWidth")(x),A=a.mesh.get("gridHeight")(x),T=a.mesh.get("wrapLongitude")(x),C=a.mesh.get("x0")(x),E=a.mesh.get("y0")(x),k=a.mesh.get("dx")(x),S=a.mesh.get("dy")(x),P=w,O={shape:"square",elements:[],elementIndex:[]};if(b){var L=b.length&&Array.isArray(b[0]);if("square"===M||"triangle"!==M&&(!L&&!(b.length%4)&&b.length%3||L&&4===b[0].length))if(O.shape="square",L)for(n=0;n<b.length;n+=1)O.elements.push(b[n][0]),O.elements.push(b[n][1]),O.elements.push(b[n][3]),O.elements.push(b[n][2]),O.elements.push(b[n][3]),O.elements.push(b[n][1]),O.elementIndex.push(n),O.elementIndex.push(n);else for(n=i=0;n<b.length-3;n+=4,i+=1)O.elements.push(b[n]),O.elements.push(b[n+1]),O.elements.push(b[n+3]),O.elements.push(b[n+2]),O.elements.push(b[n+3]),O.elements.push(b[n+1]),O.elementIndex.push(i),O.elementIndex.push(i);else if(O.shape="triangle",L)for(n=0;n<b.length;n+=1)O.elements.push(b[n][0]),O.elements.push(b[n][1]),O.elements.push(b[n][2]),O.elementIndex.push(n);else for(O.elements=b.slice(0,b.length-b.length%3),n=i=0;n<b.length-2;n+=3,i+=1)O.elementIndex.push(i);u=x.length,c=!0}else{if(Object.keys(t).length?w*A>x.length&&(A=Math.floor(x.length/w)):Object.keys(e).length&&(w-1)*(A-1)>x.length&&(A=Math.floor(x.length/(w-1))+1),T=!(void 0!==T&&!T),!(c=null==C||null==E||!k||!S)&&T&&(C<-180||C>180||C+k*(w-1)<-180||C+k*(w-1)>180)&&k>-180&&k<180&&k*(w-1)<360.0001){for(p=[],m=[],n=0;n<w;n+=1){for(v=C+n*k;v<-180;)v+=360;for(;v>180;)v-=360;n&&Math.abs(v-p[p.length-1])>180&&(v>p[p.length-1]?(p.push(v-360),p.push(p[p.length-2]+360),m.push(n),m.push(n+1)):(p.push(v+360),p.push(p[p.length-2]-360),m.push(n),m.push(n+1)),g=n),p.push(v),m.push(n)}if(w+=2,Math.abs(Math.abs(P*k)-360)<.01){for(w+=1,v=C+P*k;v<-180;)v+=360;for(;v>180;)v-=360;p.push(v),m.push(0)}}if(u=w*A,void 0!==g)for(O.index=new Array(u),n=0;n<u;n+=1)y=n-(i=Math.floor(n/w))*w,(y+=y>g?-2:0)>=P&&(y-=P),y+=i*P,O.index[n]=y;for(i=s=0;i<A-1;i+=1,s+=1)for(n=0;n<w-1;n+=1,s+=1)n!==g&&(O.elements.push(s),O.elements.push(s+1),O.elements.push(s+w),O.elements.push(s+w+1),O.elements.push(s+w),O.elements.push(s+1),O.elementIndex.push(i*(w-1)+(m?m[n]:n)),O.elementIndex.push(i*(w-1)+(m?m[n]:n)))}O.verticesPerElement="triangle"===O.shape?3:6;var R=O.verticesPerElement;if(e.used){var I=new Array(O.elementIndex[O.elementIndex.length-1]+1);for(n=0;n<I.length;n+=1)I[n]=e.used(x[n],n);for(n=0;n<O.elementIndex.length&&I[O.elementIndex[n]];n+=1);if(n<O.elementIndex.length){for(i=n;n<O.elementIndex.length;n+=1)if(I[O.elementIndex[n]]){for(O.elementIndex[i]=O.elementIndex[n],o=0;o<3;o+=1)O.elements[3*i+o]=O.elements[3*n+o];i+=1}O.elements.splice(3*i),O.elementIndex.splice(i)}}if(t.used){for(n=0;n<u&&(s=O.index?O.index[n]:n,t.used(x[s],s));n+=1);if(n!==u){l=n;var D=new Array(u);for(i=0;i<l;i+=1)D[i]=i;if(D[l]=-1,!O.index)for(O.index=new Array(x.length),i=0;i<x.length;i+=1)O.index[i]=i;for(n=l+1;n<u;n+=1)s=O.index[n],t.used(x[s],s)?(D[n]=l,O.index[l]=O.index[n],l+=1):D[n]=-1;for(O.index.splice(l),n=o=0;n<O.elements.length;n+=R){for(i=0;i<R&&!(D[O.elements[n+i]]<0);i+=1)O.elements[o+i]=D[O.elements[n+i]];i===R&&(O.elementIndex[Math.floor(o/3)]=O.elementIndex[Math.floor(n/3)],6===R&&(O.elementIndex[Math.floor(o/3)+1]=O.elementIndex[Math.floor(n/3)+1]),o+=R)}O.elements.splice(o),O.elementIndex.splice(Math.floor(o/3)),u=l}}if(e.used&&void 0===g){var F=new Array(u),N=O.index;for(O.index=[],n=0;n<O.elements.length;n+=1)void 0===F[o=O.elements[n]]&&(F[o]=O.index.length,O.index.push(N?N[o]:o)),O.elements[n]=F[o];u=O.index.length}for(f in O.pos=new Array(3*u),t)"used"!==f&&t.hasOwnProperty(f)&&(O[f]=new Array(u));for(n=r=0;n<u;n+=1,r+=3)for(f in h=x[s=O.index?O.index[n]:n],c?(d=_(h,s),O.pos[r]=d.x,O.pos[r+1]=d.y,O.pos[r+2]=d.z||0):(O.pos[r]=void 0===g?C+k*(s%w):p[n%w],O.pos[r+1]=E+S*Math.floor(s/w),O.pos[r+2]=0,d={x:O.pos[r],y:O.pos[r+1],z:O.pos[r+2]}),t)"used"!==f&&t.hasOwnProperty(f)&&(O[f][n]=t[f](h,s,d));for(f in e)if("used"!==f&&e.hasOwnProperty(f)){var j=e[f];for(O[f]=new Array(O.elementIndex.length),n=0;n<O.elementIndex.length;n+=1)h=x[s=O.elementIndex[n]],O[f][n]=j(h,s)}return O.numVertices=u,O.numElements=O.elements.length/O.verticesPerElement,O},this._init=function(t){s.call(a,t),t=t||{};var e=r.extend({},{position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t}},t.style||{});a.mesh(t.mesh||{}),a.style(e)},this};r(o,i),t.exports=o},3737:function(t,e,n){var r=n(5699),i=n(6618),o=0,a=function t(){"use strict";if(!(this instanceof t))return new t;var e=n(4634),r=this,a=++o,s={},u=[],l=0;return this.onIdle=function(t){return l?u.push(t):t(),r},Object.defineProperty(this,"idle",{get:function(){return!l},configurable:!0}),Object.defineProperty(this,"_promises",{get:function(){return l},configurable:!0}),this.addPromise=function(t){function e(){t._geojsTracked&&t._geojsTracked[a]&&(l-=1,delete t._geojsTracked[a]),l||u.splice(0,u.length).forEach((function(t){t()}))}return t._geojsTracked||(t._geojsTracked={}),t._geojsTracked[a]||(t._geojsTracked[a]=!0,l+=1),t.always?t.always(e):t.then(e,e),r},this.removePromise=function(t){return t._geojsTracked&&t._geojsTracked[a]&&(l-=1,delete t._geojsTracked[a],l||u.splice(0,u.length).forEach((function(t){t()}))),r},this.geoOn=function(t,n){return Array.isArray(t)?(t.forEach((function(t){r.geoOn(t,n)})),r):e.isFunction(n)?(s.hasOwnProperty(t)||(s[t]=[]),s[t].push(n),r):(console.warn("Handler for "+t+" is not a function",n,r),r)},this.geoOnce=function(t,e){var n=function n(i){r.geoOff(t,n),e.call(r,i)};return r.geoOn(t,n),n},this.geoIsOn=function(t,e){return Array.isArray(t)?t.some((function(t){return r.geoIsOn(t,e)})):(s[t]||[]).some((function(t){return t===e||void 0===e}))},this.geoTrigger=function(t,e){return Array.isArray(t)?(t.forEach((function(t){r.geoTrigger(t,e)})),r):((e=e||{}).event=t,s.hasOwnProperty(t)&&s[t].forEach((function(n){try{n.call(r,e)}catch(e){console.warn("Event handler for "+t+" threw an error",e)}})),r)},this.geoOff=function(t,e){if(void 0===t&&(s={},u=[],l=0,a=++o),Array.isArray(t))return t.forEach((function(t){r.geoOff(t,e)})),r;if(e){if(Array.isArray(e))return e.forEach((function(e){r.geoOff(t,e)})),r}else s[t]=[];return s.hasOwnProperty(t)&&(s[t]=s[t].filter((function(t){return t!==e}))),r},this._eventHandlers=function(){return s},this._exit=function(){r.geoOff()},i.call(this),this.modified(),this};r(a,i),t.exports=a},8622:function(t,e,n){var r=n(5638),i=n(5699),o=n(1940),a=n(4647),s=n(5017),u=function t(e){var i=n(4665);if(!(this instanceof t))return new t(e);void 0!==(e=e||{}).mapOpacity&&void 0===e.opacity&&((e=r.extend({},e)).opacity=e.mapOpacity),e=r.extend(!0,{},this.constructor.defaults,t.tileSources[this.constructor.defaults.source]||{},t.tileSources[e.source]||{},{name:""},e),o.call(this,e);var a=this;this.mapOpacity=this.opacity,this._getTile=function(t,e){var n=e||t;return i({index:t,size:{x:a._options.tileWidth,y:a._options.tileHeight},queue:a._queue,overlap:a._options.tileOverlap,scale:a._options.tileScale,url:a._options.url.call(a,n.x,n.y,n.level||0,a._options.subdomains),crossDomain:a._options.crossDomain})},this.source=function(e){if(void 0!==e)return t.tileSources[e]&&(a.url(t.tileSources[e].url),a.subdomains(t.tileSources[e].subdomains||"abc"),a.attribution(t.tileSources[e].attribution||""),a._options.maxLevel=t.tileSources[e].maxLevel||18,a._options.minLevel=t.tileSources[e].minLevel||0),a;for(var n in t.tileSources)if(t.tileSources[n].url===a.url())return n}};u.defaults=r.extend({},o.defaults,{tileOffset:function(t){var e=256*Math.pow(2,t-1);return{x:e,y:e}},url:"",source:"osm"});var l='Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',c='<a href="https://carto.com"> Carto</a> Contributors <a href="https://www.openstreetmap.org/"> OpenStreetMap</a>';u.tileSources={"dark-matter-with-labels":{url:" https://{s}.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}.png",attribution:c,name:"Carto Dark Matter With Labels",minLevel:0,maxLevel:18},"dark-matter-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/dark_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Dark Matter Without Labels",minLevel:0,maxLevel:18},"nationalmap-relief":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Shaded Relief",minLevel:0,maxLevel:16},"nationalmap-satellite":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Satellite",minLevel:0,maxLevel:16},"nationalmap-satellite-topo":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Satellite and Topo",minLevel:0,maxLevel:16},"nationalmap-topo":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Topo",minLevel:0,maxLevel:16},osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'Tile data &copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',name:"OpenStreetMap",subdomains:"abc",minLevel:0,maxLevel:19},"positron-with-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png",attribution:c,name:"Carto Positron With Labels",minLevel:0,maxLevel:18},"positron-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/light_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Positron Without Labels",minLevel:0,maxLevel:18},"stamen-terrain":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png",attribution:l,name:"Stamen Terrain",subdomains:"abcd",minLevel:0,maxLevel:14},"stamen-terrain-background":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}.png",attribution:l,name:"Stamen Terrain Background",subdomains:"abcd",minLevel:0,maxLevel:14},"stamen-toner":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png",attribution:l,name:"Stamen Toner",subdomains:"abcd",minLevel:0,maxLevel:20},"stamen-toner-lite":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png",attribution:l,name:"Stamen Toner Lite",subdomains:"abcd",minLevel:0,maxLevel:20},"voyager-with-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager With Labels",minLevel:0,maxLevel:18},"voyager-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager Without Labels",minLevel:0,maxLevel:18}},i(u,o),a.registerLayer("osm",u,[s.capabilities.image]),t.exports=u},6565:function(t,e,n){var r=n(5638),i=n(5699),o=n(6837),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n=this,i=this._init;return this.featureType="path",this.position=function(t){return void 0===t?n.style("position"):(t!==n.style("position")&&(n.style("position",t),n.dataTime().modified(),n.modified()),n)},this._init=function(t){i.call(n,t);var e=r.extend({},{strokeWidth:1,strokeColor:{r:1,g:1,b:1},position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),n.style(e),e.position&&n.position(e.position),n.dataTime().modified(),n},this._init(e),this};i(a,o),t.exports=a},6374:function(t,e,n){var r=n(5638),i=n(5699),o=n(6837),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n,i=this,s=this._update,u=this._init;return this.featureType="pixelmap",this.position=function(t){return void 0===t?i.style("position"):(t!==i.style("position")&&(i.style("position",t),i.dataTime().modified(),i.modified()),i)},this.url=function(t){return void 0===t?i.style("url"):(t!==i.style("url")&&(i.m_srcImage=i.m_info=void 0,i.style("url",t),i.dataTime().modified(),i.modified()),i)},this.color=function(t){return void 0===t?i.style("color"):(t!==i.style("color")&&(i.style("color",t),i.dataTime().modified(),i.modified()),i)},this.indexModified=function(t,e){if(void 0===t){var r=n;return"clear"===e&&(n=void 0),r}return i.modified(),void 0===n&&(n=[t,t]),t<n[0]&&(n[0]=t),(e||t)>n[1]&&(n[1]=e||t),i},this._update=function(){return s.call(i),(i.buildTime().timestamp()<=i.dataTime().timestamp()||i.updateTime().timestamp()<i.timestamp())&&i._build(),i.updateTime().modified(),i},this.maxIndex=function(){if(i.m_info){if(void 0===i.m_info.maxIndex)for(var t in i.m_info.maxIndex=0,i.m_info.mappedColors)i.m_info.mappedColors.hasOwnProperty(t)&&(i.m_info.maxIndex=Math.max(i.m_info.maxIndex,t));return i.m_info.maxIndex}},this._computePixelmap=function(){},this._build=function(){if(i.m_srcImage)i.m_info&&i._computePixelmap();else{var t=i.style.get("url")();if(a.isReadyImage(t))i.m_srcImage=t,i._computePixelmap();else if(t){var e,n,o=r.Deferred();t instanceof Image?(i.m_srcImage=t,e=t.onload,n=t.onerror):(i.m_srcImage=new Image,t.indexOf(":")>=0&&t.indexOf("/")===t.indexOf(":")+1&&(i.m_srcImage.crossOrigin=i.style.get("crossDomain")()||"anonymous")),i.m_srcImage.onload=function(){e&&e.apply(i,arguments),i.style.get("url")()===t&&(i.m_info=void 0,i._computePixelmap()),o.resolve()},i.m_srcImage.onerror=function(){n&&n.apply(i,arguments),o.reject()},o.promise(i),i.layer().addPromise(i),t instanceof Image||(i.m_srcImage.src=t)}}return i.buildTime().modified(),i},this._init=function(t){t=t||{},u.call(i,t);var e=r.extend({},{color:function(t,e){return{r:(255&e)/255,g:(e>>8&255)/255,b:(e>>16&255)/255,a:1}},position:a.identityFunction},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),void 0!==t.url&&(e.url=t.url),void 0!==t.color&&(e.color=t.color),i.style(e),i.dataTime().modified(),t.quadFeature&&(i.m_srcImage=!0,i._computePixelmap()),i},this};s.create=function(t,e){"use strict";return(e=e||{}).type="pixelmap",o.create(t,e)},s.capabilities={feature:"pixelmap",lookup:"pixelmap.lookup"},i(s,o),t.exports=s},809:function(t,e,n){var r=n(5638),i=n(5699),o=n(1940),a=n(4647),s=n(5017),u=n(6374),l=function t(e){var i,a=n(4665);if(!(this instanceof t))return new t(e);(e=e||{}).data&&(i=e.data,delete e.data),e=r.extend(!0,{},this.constructor.defaults,e),o.call(this,e);var s,u=this._init,l=this;return this._getTile=function(t,e){var n=e||t;return a({index:t,size:{x:l._options.tileWidth,y:l._options.tileHeight},queue:l._queue,overlap:l._options.tileOverlap,scale:l._options.tileScale,url:l._options.url.call(l,n.x,n.y,n.level||0,l._options.subdomains),crossDomain:l._options.crossDomain})},this._init=function(){u.apply(l,arguments),l.nearestPixel(!0,!0);var t={quadFeature:l.features()[0]};e.style&&(t.style=e.style),e.color&&(t.color=e.color),s=l.createFeature("pixelmap",t),i&&s.data(i),l.style=s.style,l.data=s.data,l.indexModified=s.indexModified;var n=l.dataTime().modified;return l.dataTime().modified=function(){return s.dataTime().modified(),n()},["modified","geoOn","geoOff","geoOnce"].forEach((function(t){var e=l[t];l[t]=function(){return Array.isArray(arguments[0])||s[t].apply(this,arguments),e.apply(this,arguments)}})),l},l};l.defaults=r.extend({},o.defaults,{features:[s.capabilities.image,u.capabilities.lookup],tileOffset:function(t){var e=256*Math.pow(2,t-1);return{x:e,y:e}},url:""}),i(l,o),a.registerLayer("pixelmap",l,[s.capabilities.image]),t.exports=l},2557:function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a=n(5699),s=n(6837),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},s.call(this,e);var o=n(5638),a=n(6618),u=n(9808),l=n(5108),c=n(4634),h=n(5866);h=h.__esModule?h.default:h;var f=this,d=this._init,p=null,m=a(),g=this.data,v=0,y=e.clustering,x=null,_=[],b=null,M=!1;return this.featureType="point",this.clustering=function(t){return void 0===t?y:(y&&!t?(x=null,y=!1,g(_)):t&&y!==t&&(y=t,f._clusterData()),f)},this._clusterData=function(){if(y){var t=!0===y?{radius:10}:y,e=f.position(),n=f.layer().map(),r=n.gcsToDisplay(n.center(void 0,null),null),i=n.displayToGcs(r,f.gcs()),a=n.displayToGcs({x:r.x+t.radius,y:r.y},f.gcs()),s=Math.pow(Math.pow(a.y-i.y,2)+Math.pow(a.x-i.x,2),.5),l=n.zoom(),h=s*Math.pow(2,l);t=o.extend({},t,{radius:h}),x=new u(t),_.forEach((function(t,n){var r=c.normalizeCoordinates(e(t,n));r.index=n,x.addPoint(r)})),b=null,f._handleZoom(n.zoom())}},this._handleZoom=function(t){var e=Math.floor(t);if(y&&e!==b){b=e;var n=x.points(e).map((function(t){return _[t.index]}));x.clusters(e).forEach((function(t){t.__cluster=!0,t.__data=[],t.obj.each((function(e){t.__data.push(_[e.index])})),n.push(t)})),M=!0,f.data(n)}},this.position=function(t){if(void 0===t)return f.style("position");var e=c.isFunction(t);return f.style("position",(function(n,r){return null!=n&&n.__cluster?n:e?t(n,r):t})),f.dataTime().modified(),f.modified(),f},this._updateRangeTree=function(){if(!(m.timestamp()>=f.dataTime().timestamp()&&m.timestamp()>=f.timestamp())){var t,e,n=f.style.get("radius"),o=f.style.get("stroke"),a=f.style.get("strokeWidth");e=f.position(),v=0,t=f.data().map((function(t,r){var i=e(t,r);return v=Math.max(v,n(t,r)+(o(t,r)?a(t,r):0)),[i.x,i.y]})),p=new h(t.length);var s,u=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(t);try{for(u.s();!(s=u.n()).done;){var l=r(s.value,2),c=l[0],d=l[1];p.add(c,d)}}catch(t){u.e(t)}finally{u.f()}p.finish(),m.modified()}},this.pointSearch=function(t,e){var n,r,i,o,a,s,u=[],l=[],c=[],h=f.gcs(),d=f.style.get("fill"),m=f.style.get("stroke"),g=f.style.get("strokeWidth"),y=f.style.get("radius");return(i=f.data())&&i.length?(f._updateRangeTree(),o=f.layer().map(),a=o.gcsToDisplay(t,e),s=[o.displayToGcs({x:a.x-v,y:a.y-v},h),o.displayToGcs({x:a.x+v,y:a.y-v},h),o.displayToGcs({x:a.x-v,y:a.y+v},h),o.displayToGcs({x:a.x+v,y:a.y+v},h)],n={x:Math.min(s[0].x,s[1].x,s[2].x,s[3].x),y:Math.min(s[0].y,s[1].y,s[2].y,s[3].y)},r={x:Math.max(s[0].x,s[1].x,s[2].x,s[3].x),y:Math.max(s[0].y,s[1].y,s[2].y,s[3].y)},(u=p.range(n.x,n.y,r.x,r.y)).sort((function(t,e){return t-e})),u.forEach((function(t){var e=i[t],n=m(i[t],t);if(n||d(i[t],t)){var r,s,u,p,v=f.position()(e,t);u=y(i[t],t),(u+=n?g(i[t],t):0)&&(p=u*u,(r=(v=o.gcsToDisplay(v,h)).x-a.x)*r+(s=v.y-a.y)*s<=p&&(l.push(e),c.push(t)))}})),{found:l,index:c}):{found:[],index:[]}},this.polygonSearch=function(t,e,n){var r,i,o,a,s=f.gcs(),u=[],l=[],h={},d=f.layer().map(),m=f.data(),g=f.style.get("fill"),y=f.style.get("stroke"),x=f.style.get("strokeWidth"),_=f.style.get("radius");return t.outer||(t={outer:t,inner:[]}),t.outer.length<3||!m||!m.length?{found:[],index:[],extra:{}}:((e=e||{}).partial=e.partial||!1,(t={outer:d.gcsToDisplay(t.outer,n),inner:(t.inner||[]).map((function(t){return d.gcsToDisplay(t,n)}))}).outer.forEach((function(t){i||(i={x:t.x,y:t.y},o={x:t.x,y:t.y}),t.x<i.x&&(i.x=t.x),t.x>o.x&&(o.x=t.x),t.y<i.y&&(i.y=t.y),t.y>o.y&&(o.y=t.y)})),f._updateRangeTree(),a=[d.displayToGcs({x:i.x-v,y:i.y-v},s),d.displayToGcs({x:o.x+v,y:i.y-v},s),d.displayToGcs({x:o.x+v,y:o.y+v},s),d.displayToGcs({x:i.x-v,y:o.y+v},s)],i={x:Math.min(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.min(a[0].y,a[1].y,a[2].y,a[3].y)},o={x:Math.max(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.max(a[0].y,a[1].y,a[2].y,a[3].y)},(r=p.range(i.x,i.y,o.x,o.y)).sort((function(t,e){return t-e})),r.forEach((function(n){var r=m[n],i=y(m[n],n);if(i||g(m[n],n)){var o=f.position()(r,n),a=_(m[n],n);if(a+=i?x(m[n],n):0){o=d.gcsToDisplay(o,s);var p=c.distanceToPolygon2d(o,t);(p>=a||p>=0&&"center"===e.partial||p>=-a&&e.partial&&"center"!==e.partial)&&(u.push(r),l.push(n),h[n]={partial:p<a,distance:p})}}})),{found:u,index:l,extra:h})},this.data=function(t){return void 0===t?g():(M||(_=t),y&&!M?f._clusterData():g(t),M=!1,f)},this._init=function(t){t=t||{},d.call(f,t);var e=o.extend(!0,{},{radius:5,stroke:!0,strokeColor:{r:.851,g:.604,b:0},strokeWidth:1.25,strokeOpacity:1,fillColor:{r:1,g:.839,b:.439},fill:!0,fillOpacity:.8,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){return t.length>=3?t.slice(0,3):[0,0,0]}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),f.style(e),e.position&&f.position(e.position),f.dataTime().modified(),f.geoOn(l.zoom,(function(t){f._handleZoom(t.zoomLevel)})),f},f};u.create=function(t,e){"use strict";return(e=e||{}).type="point",s.create(t,e)},u.capabilities={feature:"point",stroke:"point.stroke"},u.primitiveShapes={auto:"auto",sprite:"sprite",triangle:"triangle",square:"square"},a(u,s),t.exports=u},4343:function(t,e,n){var r=n(5638),i=n(5699),o=n(6837),a=n(6853),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i,s=n(4634),u=this,l=this._init,c=this._exit,h=this.data,f=this.draw,d=this.modified,p=this.style,m=[];function g(t,e,n){var r=u.gcs(),i=u.layer().map().gcs();return t=t||u.data(),e=e||u.style.get("position"),n=n||u.style.get("polygon"),t.map((function(t,o){var s=n(t,o);if(s){var l,c,h,f,d,p,m,g,v,y;for(f=s.outer||(Array.isArray(s)?s:[]),l=new Array(f.length),d=0;d<f.length;d+=1)l[d]=e.call(u,f[d],d,t,o),p=l[d].x,m=l[d].y,d?(p<h.min.x&&(h.min.x=p),m<h.min.y&&(h.min.y=m),p>h.max.x&&(h.max.x=p),m>h.max.y&&(h.max.y=m)):h={min:{x:p,y:m},max:{x:p,y:m}};for(c=(s.inner||[]).map((function(n){f=n||[];var r=new Array(f.length);for(d=0;d<f.length;d+=1)r[d]=e.call(u,f[d],d,t,o);return r})),g=a.transformCoordinates(r,i,l),v=c.map((function(t){return a.transformCoordinates(r,i,t)})),d=0;d<g.length;d+=1)p=g[d].x,m=g[d].y,d?(p<y.min.x&&(y.min.x=p),m<y.min.y&&(y.min.y=m),p>y.max.x&&(y.max.x=p),m>y.max.y&&(y.max.y=m)):y={min:{x:p,y:m},max:{x:p,y:m}};return{outer:l,inner:c,range:h,mapouter:g,mapinner:v,maprange:y}}}))}function v(t){return s.isFunction(t)?function(e){return t(e[0],e[1],e[2],e[3])}:t}return this.featureType="polygon",this._subfeatureStyles={fillColor:!0,fillOpacity:!0,lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.data=function(t){var e=h(t);return void 0!==t&&(m=g(),u._checkForStroke()),e},this.polygonCoordinates=function(){return m},this.polygon=function(t){return void 0===t?u.style("polygon"):(u.style("polygon",t),u.dataTime().modified(),u.modified(),m=g(),u)},this.position=function(t){return void 0===t?u.style("position"):(u.style("position",t),u.dataTime().modified(),u.modified(),m=g(),u)},this.pointSearch=function(t,e){var n=[],r=[],o={},l=u.data(),c=u.layer().map();e=null===e?c.gcs():void 0===e?c.ingcs():e;var h=a.transformCoordinates(e,c.gcs(),t);(m.forEach((function(t,e){s.pointInPolygon(h,t.mapouter,t.mapinner,t.maprange)&&(r.push(e),o[e]=!0,n.push(l[e]))})),i)&&i.pointSearch(t).found.forEach((function(t){t.length&&4===t[0].length&&!o[t[0][3]]&&(r.push(t[0][3]),o[t[0][3]]=!0,n.push(l[t[0][3]]))}));return{index:r,found:n}},this.polygonSearch=function(t,e,n){var r,o,l=u.data(),c=[],h=[],f={},d=t,p={},g=u.layer().map();if(n=null===n?g.gcs():void 0===n?g.ingcs():n,t.outer||(t={outer:t,inner:[]}),!l||!l.length||t.outer.length<3)return{found:h,index:c,extra:f};if((e=e||{}).partial=e.partial||!1,(t={outer:a.transformCoordinates(n,g.gcs(),t.outer),inner:(t.inner||[]).map((function(t){return a.transformCoordinates(n,g.gcs(),t)}))}).outer.forEach((function(t){r||(r={x:t.x,y:t.y},o={x:t.x,y:t.y}),t.x<r.x&&(r.x=t.x),t.x>o.x&&(o.x=t.x),t.y<r.y&&(r.y=t.y),t.y>o.y&&(o.y=t.y)})),m.forEach((function(n,i){if(!(!n.mapouter.length||n.maprange&&(n.maprange.max.x<r.x||n.maprange.min.x>o.x||n.maprange.max.y<r.y||n.maprange.min.y>o.y))){for(var a,u,d=-1;d<n.mapinner.length&&!u;d+=1)for(var m=d<0?n.mapouter:n.mapinner[d],g=0,v=m.length,y=v-1;g<v;y=g,g+=1){var x=s.distanceToPolygon2d(m[g],t);if(x*s.distanceToPolygon2d(m[y],t)<0){u=!0;break}if(s.crossedLineSegmentPolygon2d(m[g],m[y],t)){u=!0;break}x>0&&(a=!0)}a||u||!s.pointInPolygon(t.outer[0],n.mapouter,n.mapinner,n.maprange)||(u=!0),(!e.partial&&a&&!u||e.partial&&(a||u))&&(c.push(i),h.push(l[i]),f[i]={partial:u},p[i]=!0)}})),i){var v=i.polygonSearch(d,e);v.found.forEach((function(t,e){t.length&&4===t[0].length&&(p[t[0][3]]||(c.push(t[0][3]),p[t[0][3]]=!0,h.push(l[t[0][3]]),f[v.index[e]]={partial:!1}),v.extra[v.index[e]].partial&&(f[t[0][3]].partial=!0))}))}return{found:h,index:c,extra:f}},this.style=function(t,e){var n=p.apply(u,arguments);return void 0===t||"string"==typeof t&&void 0===e||u._checkForStroke(),n},this.style.get=p.get,this._getLoopData=function(t,e,n){var r,i=[];for(r=0;r<n.length;r+=1)i.push([n[r],r,t,e]);return i},this._checkForStroke=function(){if(!1!==p("stroke")){if(u.layer()){i||(i=u.layer().createFeature("line",{selectionAPI:!1,gcs:u.gcs(),visible:u.visible(void 0,!0)}),u.dependentFeatures([i]));var t,e=u.style();if(s.isFunction(e.stroke)||!e.stroke){var n=u.style.get("stroke"),r=u.style.get("strokeOpacity");t=function(t){return n(t[2],t[3])?r(t[0],t[1],t[2],t[3]):0}}else t=v(e.strokeOpacity);i.style({antialiasing:v(e.antialiasing),closed:!0,lineCap:v(e.lineCap),lineJoin:v(e.lineJoin),miterLimit:v(e.miterLimit),strokeWidth:v(e.strokeWidth),strokeStyle:v(e.strokeStyle),strokeColor:v(e.strokeColor),strokeOffset:v(e.strokeOffset),strokeOpacity:t,uniformLine:v(e.uniformPolygon)});var o=u.data(),a=u.style("position");if(o!==i._lastData||a!==i._lastPosVal){var l,c,h,f=[],d=u.style.get("position"),m=u.style.get("polygon");for(l=0;l<o.length;l+=1)(c=m(o[l],l))&&(h=c.outer||(Array.isArray(c)?c:[])).length>=2&&(f.push(u._getLoopData(o[l],l,h)),c.inner&&c.inner.forEach((function(t){t.length>=2&&f.push(u._getLoopData(o[l],l,t))})));i.position((function(t,e,n,r){return d(t[0],t[1],t[2],t[3])})),i.data(f),i._lastData=o,i._lastPosVal=a}}}else i&&u.layer()&&(u.layer().deleteFeature(i),i=null,u.dependentFeatures([]))},this.draw=function(){var t=f();return i&&i.draw(),t},this.modified=function(){var t=d();return i&&i.modified(),t},this.rdpSimplifyData=function(t,e,n,r,i){var o=u.layer().map(),l=o.gcs(),c=u.gcs(),h=g(t,n,r);return void 0===e&&(e=.5*o.unitsPerPixel(o.zoom())),h=h.map((function(t){return{outer:a.transformCoordinates(c,l,t.outer),inner:t.inner.map((function(t){return a.transformCoordinates(c,l,t)}))}})),t=t.map((function(t,n){var r=h[n],i={};for(var o in t)!t.hasOwnProperty(o)||Array.isArray(t)&&o>=0&&o<t.length||(i[o]=t[o]);if(r&&r.outer.length>=3)if(i.inner=r.inner.filter((function(t){return t.length>=3})),i.outer=s.rdpLineSimplify(r.outer,e,!0,i.inner),i.outer.length>=3){var u=i.inner.slice();i.inner.map((function(t,n){u[n]=i.outer;var r=s.rdpLineSimplify(t,e,!0,u);return u[n]=r,r})).filter((function(t){return t.length>=3})),i.outer=a.transformCoordinates(l,c,i.outer),i.inner=i.inner.map((function(t){return a.transformCoordinates(l,c,t)}))}else i.outer=i.inner=[];else i.outer=[];return i})),i?t:(u.style("position",s.identityFunction),u.style("polygon",s.identityFunction),u.data(t),u)},this.mouseOverOrderClosestBorder=function(t){var e=t.feature.data(),n=t.feature.layer().map(),r=a.transformCoordinates(n.ingcs(),t.feature.gcs(),t.mouse.geo),i=t.feature.polygonCoordinates(),o={};t.over.index.forEach((function(t,e){var n,a=i[t];a.outer.forEach((function(t,e){var i=a.outer[(e+1)%a.outer.length],o=s.distance2dToLineSquared(r,t,i);(void 0===n||o<n)&&(n=o)})),a.inner.forEach((function(t){t.forEach((function(e,i){var o=t[(i+1)%t.length],a=s.distance2dToLineSquared(r,e,o);(void 0===n||a<n)&&(n=a)}))})),o[t]=n})),t.over.index.sort((function(t,e){return o[t]-o[e]})).reverse(),t.over.index.forEach((function(n,r){t.over.found[r]=e[n]}))},this.toPolygonList=function(t){var e=u.style.get("polygon"),n=u.style.get("position");return u.data().map((function(t,r){var i=e(t,r),o=i.outer||(Array.isArray(i)?i:[]);if(o.length<3)return[];var a=[o.map((function(e,i){var o=n(e,i,t,r);return[o.x,o.y]}))];return i.inner&&i.inner.forEach((function(e){a.push(e.map((function(e,i){var o=n(e,i,t,r);return[o.x,o.y]})))})),a}))},this.fromPolygonList=function(t,e){return u.style({position:function(t){return{x:t[0],y:t[1]}},polygon:function(t){return{outer:t[0],inner:t.slice(1)}}}),u.data(t),u},this._exit=function(){i&&u.layer()&&(u.layer().deleteFeature(i),i=null,u.dependentFeatures([])),c()},this._init=function(t){t=t||{},l.call(u,t);var e=r.extend({},{fill:!0,fillColor:{r:0,g:.5,b:.5},fillOpacity:1,stroke:!1,strokeWidth:1,strokeStyle:"solid",strokeColor:{r:0,g:1,b:1},strokeOpacity:1,polygon:s.identityFunction,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){for(var e=0;e<t.length;e+=1)if(t[e].vertices.length>=3)return t[e].vertices.slice(0,3);return[0,0,0]}},void 0===t.style?{}:t.style);void 0!==t.polygon&&(e.polygon=t.polygon),void 0!==t.position&&(e.position=t.position),u.style(e),u._checkForStroke()},this};s.create=function(t,e){"use strict";return(e=e||{}).type="polygon",o.create(t,e)},s.capabilities={feature:"polygon"},i(s,o),t.exports=s},5017:function(t,e,n){var r=n(5638),i=n(5699),o=n(6837),a=function t(e){"use strict";var i=n(6853),a=n(4634);if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var s,u,l=this,c=this._init,h=e.nearestPixel,f=0,d=[],p=[];return this.featureType="quad",this._objectListStart=function(t){r.each(t,(function(t,e){e.used=!1}))},this._objectListGet=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].entry===e)return t[n].used=!0,t[n].value},this._objectListAdd=function(t,e,n){t.push({entry:e,value:n,used:!0})},this._objectListEnd=function(t){for(var e=t.length-1;e>=0;e-=1)t[e].used||t.splice(e,1)},this.pointSearch=function(t,e){var n,o,s=[],c=[],h={},f=[{},{},{},{}],d=[{},{},{},{}],p=[0,1,2,0],m=[1,2,3,1],g=l.data(),v=l.layer().map();return e=null===e?v.gcs():void 0===e?v.ingcs():e,t=i.transformCoordinates(e,v.gcs(),t),u||l._generateQuads(),r.each([u.clrQuads,u.imgQuads,u.vidQuads],(function(e,r){r.forEach((function(e,r){for(n=0;n<p.length;n+=1)f[n].x=e.pos[3*p[n]],f[n].y=e.pos[3*p[n]+1],f[n].z=e.pos[3*p[n]+2],d[n].x=e.pos[3*m[n]],d[n].y=e.pos[3*m[n]+1],d[n].z=e.pos[3*m[n]+2];(a.pointInPolygon(t,f)||a.pointInPolygon(t,d))&&(c.push(e.idx),s.push(g[e.idx]),!(o=a.pointToTriangleBasis2d(t,f[0],f[1],f[2]))||o.x+o.y>1?(o=a.pointToTriangleBasis2d(t,d[2],d[1],d[0]))&&(o.x=1-o.x):o.y=1-o.y,o&&(h[e.idx]={basis:o,_quad:e}))}))})),{index:c,found:s,extra:h}},this.position=function(t){return void 0===t?l.style("position"):(l.style("position",a.ensureFunction(t)),l.dataTime().modified(),l.modified(),l)},this._positionToQuad=function(t,e,n,o){var a=t.call(l,n,o);if(a.ll&&a.ur||a.ul&&a.lr){var s=l.gcs(),u=l.layer().map().gcs(),c={};return r.each(["ll","lr","ul","ur"],(function(t,r){void 0!==a[r]&&(c[r]={},void 0===a[r].x?c[r]=[a[r][0],a[r][1],a[r][2]]:c[r]=[a[r].x,a[r].y,a[r].z],void 0===c[r][2]&&(c[r][2]=e.call(l,n,o)),s!==u&&!1!==s&&(c[r]=i.transformCoordinates(s,u,c[r])))})),c.ll=c.ll||[c.ul[0],c.lr[1],(c.ul[2]+c.lr[2])/2],c.lr=c.lr||[c.ur[0],c.ll[1],(c.ur[2]+c.ll[2])/2],c.ur=c.ur||[c.lr[0],c.ul[1],(c.lr[2]+c.ul[2])/2],c.ul=c.ul||[c.ll[0],c.ur[1],(c.ll[2]+c.ur[2])/2],c}},this._checkQuadUpdate=function(t,e){},this._generateQuads=function(){var t,e,n=l.position(),i=l.style.get("image"),o=l.style.get("video"),c=l.style.get("delayRenderWhenSeeking"),h=l.style.get("color"),m=l.style.get("depth"),g=l.style.get("opacity"),v=l.style.get("drawOnAsyncResourceLoaded"),y=l.style.get("previewColor"),x=l.style.get("previewImage"),_=l.data(),b=[],M=[],w=[],A=[0,0,0];return l._objectListStart(d),l._objectListStart(p),r.each(_,(function(u,_){if(_._cachedQuad)return e=_._cachedQuad.diag2,(void 0===t||_._cachedQuad.diag2&&_._cachedQuad.diag2<t)&&(A=_._cachedQuad.ll,t=_._cachedQuad.diag2),_._cachedQuad.clrquad&&b.push(_._cachedQuad.clrquad),_._cachedQuad.imgquad&&(_._cachedQuad.imageEntry&&l._objectListGet(d,_._cachedQuad.imageEntry),M.push(_._cachedQuad.imgquad)),void(_._cachedQuad.vidquad&&(_._cachedQuad.videoEntry&&l._objectListGet(p,_._cachedQuad.videoEntry),w.push(_._cachedQuad.vidquad)));var T,C,E,k,S,P,O,L,R,I,D,F,N={};if(O=l._positionToQuad(n,m,_,u),I=g.call(l,_,u),void 0!==O&&I&&!(I<0)){if(e=Math.pow(O.ll[0]-O.ur[0],2)+Math.pow(O.ll[1]-O.ur[1],2)+Math.pow(O.ll[2]-O.ur[0],2)+Math.pow(O.lr[0]-O.ur[0],2)+Math.pow(O.lr[1]-O.ur[1],2)+Math.pow(O.lr[2]-O.ur[0],2),N.diag2=e,N.ll=O.ll,(void 0===t||e&&e<t)&&(A=O.ll,t=e),O=[O.ll[0],O.ll[1],O.ll[2],O.lr[0],O.lr[1],O.lr[2],O.ul[0],O.ul[1],O.ul[2],O.ur[0],O.ur[1],O.ur[2]],T={idx:u,pos:O,opacity:I,zOffset:_.zOffset},_.reference&&(T.reference=_.reference),_.crop&&(T.crop=_.crop),R=(L=i.call(l,_,u))?null:o.call(l,_,u),L){if(N.imageEntry=L,void 0===(C=l._objectListGet(d,L))&&(L instanceof Image||L instanceof HTMLCanvasElement?C=L:(C=new Image).src=L,l._objectListAdd(d,L,C)),a.isReadyImage(C)||C instanceof HTMLCanvasElement)T.image=C;else if(D=void 0,(F=x.call(l,_,u))&&a.isReadyImage(F)?T.image=F:(D=y.call(l,_,u),T.color=a.convertColor(D),T.color&&void 0!==T.color.r&&void 0!==T.color.g&&void 0!==T.color.b?(b.push(T),N.clrquad=T):D=void 0),v.call(l,_,u))P=a.isReadyImage(C,!0)?null:r.Deferred(),k=C.onload,C.onload=function(){if(void 0!==D&&(r.inArray(T,b)>=0&&b.splice(r.inArray(T,b),1),delete N.clrquad),T.image=C,l.dataTime().modified(),l.modified(),l._update(),l.layer().draw(),P&&P.resolve(),k)return k.apply(l,arguments)},S=C.onerror,C.onerror=function(){if(P&&P.reject(),S)return S.apply(l,arguments)},P&&l.layer().addPromise(P.promise());else if(void 0===D&&!T.image)return;M.push(T),N.imgquad=T}else if(R){if(N.videoEntry=R,void 0===(E=l._objectListGet(p,R))&&(R instanceof HTMLVideoElement?E=R:(E=document.createElement("video")).src=R,l._objectListAdd(p,R,E),r(E).off(".geojsvideo").on("seeking.geojsvideo canplay.geojsvideo pause.geojsvideo playing.geojsvideo",(function(t){l._checkQuadUpdate(T,t)}))),T.delayRenderWhenSeeking=c.call(l,_,u),void 0===T.delayRenderWhenSeeking&&(T.delayRenderWhenSeeking=!0),a.isReadyVideo(E))T.video=E;else if(D=y.call(l,_,u),T.color=a.convertColor(D),T.color&&void 0!==T.color.r&&void 0!==T.color.g&&void 0!==T.color.b?(b.push(T),N.clrquad=T):D=void 0,v.call(l,_,u))P=a.isReadyVideo(E,!0)?null:r.Deferred(),k=E.onloadeddata,E.onloadeddata=function(){if(void 0!==D&&(r.inArray(T,b)>=0&&b.splice(r.inArray(T,b),1),delete N.clrquad),T.video=E,l.dataTime().modified(),l.modified(),l._update(),l.layer().draw(),P&&P.resolve(),k)return k.apply(l,arguments)},S=E.onerror,E.onerror=function(){if(P&&P.reject(),S)return S.apply(l,arguments)},P&&l.layer().addPromise(P.promise());else if(void 0===D&&!T.video)return;w.push(T),N.vidquad=T}else{if(T.color=a.convertColor(h.call(l,_,u)),!T.color||void 0===T.color.r||void 0===T.color.g||void 0===T.color.b)return;b.push(T),N.clrquad=T}N.clrquad&&(f+=1,N.clrquad.quadId=f),N.imgquad&&(f+=1,N.imgquad.quadId=f),N.vidquad&&(f+=1,N.vidquad.quadId=f),!1!==s&&(_._cachedQuad=N)}})),l._objectListEnd(d),l._objectListEnd(p),u={clrQuads:b,imgQuads:M,vidQuads:w,origin:new Float32Array(A)}},this.cacheUpdate=function(t){return null==t?r.each(l.data(),(function(t,e){e._cachedQuad&&delete e._cachedQuad})):(isFinite(t)&&(t=l.data()[t]),t._cachedQuad&&delete t._cachedQuad),l.modified(),l},this.video=function(t){var e,n;return isFinite(t)&&(t=l.data()[t]),t._cachedQuad?e=(t._cachedQuad.vidquad||{}).video:(u||l._generateQuads(),(n=l.data().indexOf(t))>=0&&(e=l._objectListGet(p,l.style.get("video")(t,n)))),e instanceof HTMLVideoElement?e:null},this.nearestPixel=function(t){return void 0===t?h:(h=t,l.modified(),l)},this._init=function(t){t=t||{},c.call(l,t),s=!1!==t.cacheQuads;var e=r.extend({},{color:{r:1,g:1,b:1},opacity:1,depth:0,drawOnAsyncResourceLoaded:!0,previewColor:null,previewImage:null,image:function(t){return t.image},video:function(t){return t.video},position:a.identityFunction},void 0===t.style?{}:t.style);void 0!==t.position&&(e.position=a.ensureFunction(t.position)),l.style(e),l.dataTime().modified()},l};a.create=function(t,e){"use strict";return(e=e||{}).type="quad",o.create(t,e)},a.capabilities={color:"quad.color",image:"quad.image",imageCrop:"quad.imageCrop",imageFixedScale:"quad.imageFixedScale",imageFull:"quad.imageFull",canvas:"quad.canvas",video:"quad.video"},i(a,o),t.exports=a},4647:function(t,e,n){var r=n(5638),i=n(7839),o={dom:{}},a={},s={},u={},l={},c={},h={},f={},d={},p={registerFileReader:function(t,e){h[t]=e},createFileReader:function(t,e){return h.hasOwnProperty(t)?h[t](e):null},registerRenderer:function(t,e){u[t]=e},createRenderer:function(t,e,n,r){if(u.hasOwnProperty(t)){var i=u[t]({layer:e,canvas:n,options:r});return i._init(),i}return null},checkRenderer:function(t,e){if(null===t)return t;if(u.hasOwnProperty(t)){var n=u[t];if(!n.supported||n.supported())return n.apiname||t;if(!n.fallback||e)return!1;var r=p.checkRenderer(n.fallback(),!0);return!1!==r&&console.warn(t+" renderer is unavailable, using "+r+" renderer instead"),r}return!1},rendererForFeatures:function(t){var e,n,r,i,o,a,s=["webgl","canvas","svg","vtkjs",null];for(n=0;n<s.length;n+=1)if(e=s[n],!1!==p.checkRenderer(e,!0)){if(!t)return e;if(l[e]){for(a=!0,i=0;i<t.length;i+=1){if(o=null,(r=t[i]).indexOf(".")>=0&&(o=r,r=r.substr(0,r.indexOf("."))),void 0===l[e][r]){a=!1;break}if(o&&c[e][r]&&!c[e][r][o]){a=!1;break}}if(a)return e}}return console.warn('There is no renderer available for the feature list "'+(t||[]).join(", ")+'".'),!1},registerFeature:function(t,e,n,r){t in l||(l[t]={},c[t]={});var i=l[t][e];return i&&console.warn("The "+t+"."+e+" feature is already registered"),l[t][e]=n,c[t][e]=r,i},createFeature:function(t,e,n,i){var o=n.api(),a={layer:e,renderer:n};if(o in l&&t in l[o]){void 0!==i&&r.extend(!0,a,i);var s=l[o][t](a);return void 0===e.gcs&&(e.gcs=function(){return e.map().gcs()}),s}return null},registerLayerAdjustment:function(t,e,n){t in f||(f[t]={});var r=f[t][e];return r&&console.warn("The "+t+"."+e+" layer adjustment is already registered"),f[t][e]=n,r},adjustLayerForRenderer:function(t,e){var n=e.rendererName();n&&f&&f[n]&&f[n][t]&&f[n][t].apply(e)},registerLayer:function(t,e,n){a[t]=e,s[t]=n},createLayer:function(t,e,n){var i={map:e},o=null;if(t in a){if(n.renderer||n.features||!s||(i.features=s[t]),void 0!==n){var u=n.data;delete n.data,r.extend(!0,i,n),u&&(i.data=u)}return(o=a[t](i)).layerName=t,o._init(),o}return null},registerWidget:function(t,e,n){t in o||(o[t]={});var r=o[t][e];return r&&console.warn("The "+t+"."+e+" widget is already registered"),o[t][e]=n,r},createWidget:function(t,e,n){var i={layer:e};if(t in o.dom)return void 0!==n&&r.extend(!0,i,n),o.dom[t](i);throw new Error("Cannot create unknown widget "+t)},registerAnnotation:function(t,e,n){var r=d[t];return r&&console.warn("The "+t+" annotation is already registered"),d[t]={func:e,features:n||{}},i["annotation_"+t]="geo_annotation_"+t,r},createAnnotation:function(t,e){if(d[t])return d[t].func(e);console.warn("The "+t+" annotation is not registered")},listAnnotations:function(){return Object.keys(d)},featuresForAnnotations:function(t){var e=[];return(Array.isArray(t)?t:Object.keys(t)).forEach((function(n){d[n]&&Object.keys(d[n].features).forEach((function(i){Array.isArray(t)||!0===t[n]||!Array.isArray(d[n].features[i])?e.push(i):t[n].forEach((function(t){r.inArray(t,d[n].features[i])>=0&&e.push(i)}))}))})),e},rendererForAnnotations:function(t){return p.rendererForFeatures(p.featuresForAnnotations(t))}};p.registries={annotations:d,features:l,featureCapabilities:c,fileReaders:h,layers:a,renderers:u,widgets:o},t.exports=p},3234:function(t,e,n){var r=n(5699),i=n(3737),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this);var n=this,r=0,o=0,a=void 0===(e=e||{}).layer?null:e.layer,s=void 0===e.canvas?null:e.canvas,u=!1;return this.layer=function(){return a},this.canvas=function(t){return void 0===t?s:(s=t,n.modified(),n)},this.map=function(){return a?a.map():null},this.initialized=function(t){return void 0===t?u:(u=t,n)},this.api=function(){throw new Error("Should be implemented by derived classes")},this.width=function(){return r},this.height=function(){return o},this._setWidthHeight=function(t,e){return r=t,o=e,n},this._init=function(){return n},this._resize=function(t,e,r,i){return n._setWidthHeight(r,i),n},this._render=function(){return n},this};r(o,i),t.exports=o},5358:function(t,e,n){var r=n(5699),i=n(3737),o=function t(e){"use strict";if(!(this instanceof t))return new t;i.call(this,e);var n=this,r=null,o=[],a=this._exit,s=this.geoTrigger,u=this.addPromise,l=this.removePromise;return this.addPromise=function(t){return r&&r.addPromise(t),u(t),n},this.removePromise=function(t){return r&&r.removePromise(t),l(t),n},this.parent=function(t){return void 0===t?r:(r=t,n)},this.addChild=function(t){return Array.isArray(t)?(t.forEach(n.addChild),n):(t.parent(n),o.push(t),n)},this.removeChild=function(t){return Array.isArray(t)?(t.forEach(n.removeChild),n):(o=o.filter((function(e){return e!==t})),n)},this.children=function(){return o.slice()},this.draw=function(t){return n.children().forEach((function(e){e.draw(t)})),n},this.geoTrigger=function(t,e,i){var a;return a=(e=e||{}).geo||{},e.geo=a,a.stopPropagation?n:!i&&r&&a._triggeredBy!==r?(a._triggeredBy=n,r.geoTrigger(t,e),n):(s.call(n,t,e),a.stopPropagation||o.forEach((function(r){r.geoTrigger&&(a._triggeredBy=n,r.geoTrigger(t,e))})),n)},this._exit=function(){o=[],r=null,a()},this};r(o,i),t.exports=o},5381:function(t){t.exports="190e4728c8b60b908db47954c996b369d725fd31"},9851:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(4745),a=function t(e){"use strict";var n=this;return this instanceof t?(o.call(this,e),this.select=function(){var t=n.renderer(),e={},r=n.nodeFeature(),i=n.linkFeatures();return e.nodes=t.select(r._svgid()),e.links=i.map((function(e){return t.select(e._svgid())})),e},this):new t(e)};r(a,o),i("svg","graph",a),t.exports=a},2878:function(t,e,n){n(5108).svg={rescale:n(8210)},t.exports={graphFeature:n(9851),lineFeature:n(7134),object:n(2738),pathFeature:n(5903),pointFeature:n(3365),quadFeature:n(2203),renderer:n(2531),tileLayer:n(21),trackFeature:n(1489),uniqueID:n(1946),vectorFeature:n(3398)}},7134:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(2531).d3,i=n(2738),a=n(6618),s=n(4634);e=e||{},o.call(this,e),i.call(this);var u=this,l=this._init,c=a(),h=0,f=this._update;return this._init=function(t){return l.call(u,t),u},this._build=function(){var t,e,n=u.data()||[],i=u.style(),o=u.renderer(),a=u.position();for(f.call(u),i.fill=function(){return!1},n.forEach((function(e,n){var l,c,h=u.line()(e,n),f={};function d(t){return s.isFunction(t)?function(){return t(h[0],0,e,n)}:t}for(c in i)i.hasOwnProperty(c)&&(f[c]=d(i[c]));t=r.svg.line().x((function(t){return u.featureGcsToDisplay(t).x})).y((function(t){return u.featureGcsToDisplay(t).y})).interpolate(u.style.get("closed")(e,n)&&h.length>2?"linear-closed":"linear"),l={data:[h.map((function(t,r){return a(t,r,e,n)}))],append:"path",attributes:{d:t},id:u._svgid()+n,classes:["svgLineFeature","svgSubLine-"+n],visible:u.visible,style:f},o._drawFeatures(l)})),e=n.length;e<h;e+=1)o._removeFeature(u._svgid()+e);return h=n.length,c.modified(),u.updateTime().modified(),u},this._update=function(){return f.call(u),u.timestamp()>=c.timestamp()&&u._build(),u},this._init(e),this};r(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,i("svg","line",a,s),t.exports=a},2738:function(t,e,n){t.exports=function t(e){"use strict";var r=n(3737),i=n(1946);if(!(this instanceof r))return new t(e);var o="svg-"+i(),a=this._exit,s=this,u=this.draw;return this._svgid=function(){return o},this.select=function(){return s.renderer().select(s._svgid())},this.draw=function(){return s.ready&&(s._update(),u()),s},this._exit=function(){s.renderer()._removeFeature(s._svgid()),a()},this}},5903:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(6565),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),i=n(2531).d3,a=n(2738),s=n(6618);e=e||{},o.call(this,e),a.call(this);var u=this,l=s(),c=this._update,h={style:{}};return this._build=function(){var t,e,n=u.data()||[],o=u.style.get(),a=u.style.get("position");return c.call(u),e=function(t){var e={source:t.source,target:t.target};return i.svg.diagonal()(e)},t=[],n.forEach((function(e,r){var i,o;r<n.length-1&&(i=a(e,r),o=a(n[r+1],r+1),t.push({source:u.featureGcsToDisplay(i),target:u.featureGcsToDisplay(o)}))})),h.data=t,h.attributes={d:e},h.id=u._svgid(),h.append="path",h.classes=["svgPathFeature"],h.style=r.extend({fill:function(){return!1},fillColor:{r:0,g:0,b:0}},o),h.visible=u.visible,u.renderer()._drawFeatures(h),l.modified(),u.updateTime().modified(),u},this._update=function(){return c.call(u),u.dataTime().timestamp()>=l.timestamp()&&u._build(),u},this._init(e),this};r(a,o),i("svg","path",a),t.exports=a},3365:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(2738),i=n(6618);e=e||{},o.call(this,e),r.call(this);var a=this,s=this._init,u=this._update,l=i(),c={};return this._init=function(t){return s.call(a,t),a},this._build=function(){var t=a.data(),e=a.style.get(),n=a.renderer(),r=a.position();return u.call(a),t||(t=[]),c.id=a._svgid(),c.data=t,c.append="circle",c.attributes={r:n._convertScale(e.radius),cx:function(t){return a.featureGcsToDisplay(r(t)).x},cy:function(t){return a.featureGcsToDisplay(r(t)).y}},c.style=e,c.classes=["svgPointFeature"],c.visible=a.visible,a.renderer()._drawFeatures(c),l.modified(),a.updateTime().modified(),a},this._update=function(){return u.call(a),a.timestamp()>=l.timestamp()&&a._build(),a},this._init(e),this};r(a,o);var s={};s[o.capabilities.stroke]=!0,i("svg","point",a,s),t.exports=a},2203:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),i=n(2531).d3,a=n(2738);o.call(this,e),a.call(this);var s,u=this,l=this._exit,c=this._init,h=this._update;return this._build=function(){if(this.position()){var t=u.renderer(),e=t.layer().map();s=u._generateQuads();var n=[];r.each(s.clrQuads,(function(t,e){n.push({type:"clr",quad:e,zIndex:e.pos[2]})})),r.each(s.imgQuads,(function(t,e){e.image&&n.push({type:"img",quad:e,zIndex:e.pos[2]})}));var o={id:u._svgid(),data:n,dataIndex:function(t){return t.quad.quadId},append:function(t){var e=this.namespaceURI,n="clr"===t.type?"polygon":"image";return e?document.createElementNS(e,n):document.createElement(n)},attributes:{fill:function(t){if("clr"===t.type)return i.rgb(255*t.quad.color.r,255*t.quad.color.g,255*t.quad.color.b);1!==t.quad.opacity&&i.select(this).style("opacity",t.quad.opacity)},height:function(t){return"clr"===t.type?void 0:1},points:function(n){if("clr"===n.type&&!n.points){var r,i=[];for(r=0;r<n.quad.pos.length;r+=3){var o={x:n.quad.pos[r],y:n.quad.pos[r+1],z:n.quad.pos[r+2]};o=e.gcsToDisplay(o,null),o=t.baseToLocal(o),i.push(o.x+","+o.y)}n.points=i[0]+" "+i[1]+" "+i[3]+" "+i[2]}return"clr"===n.type?n.points:void 0},preserveAspectRatio:function(t){return"clr"===t.type?void 0:"none"},reference:function(t){return t.quad.reference},stroke:!1,transform:function(n){if("img"===n.type&&n.quad.image&&!n.svgTransform){var r,i,o,a,s=[],u=-1,l=n.quad.image.width,c=n.quad.image.height;for(o=0;o<n.quad.pos.length;o+=3){var h={x:n.quad.pos[o],y:n.quad.pos[o+1],z:n.quad.pos[o+2]};h=e.gcsToDisplay(h,null),h=t.baseToLocal(h),s.push(h)}for(o=0;o<4;o+=1)(r=Math.abs(s[(o+1)%4].x*(s[(o+2)%4].y-s[(o+3)%4].y)+s[(o+2)%4].x*(s[(o+3)%4].y-s[(o+1)%4].y)+s[(o+3)%4].x*(s[(o+1)%4].y-s[(o+2)%4].y))/2)>u&&(u=r,i=o);n.svgTransform=[3===i||2===i?s[1].x-s[0].x:s[3].x-s[2].x,3===i||2===i?s[1].y-s[0].y:s[3].y-s[2].y,0===i||2===i?s[1].x-s[3].x:s[0].x-s[2].x,0===i||2===i?s[1].y-s[3].y:s[0].y-s[2].y,2===i?s[3].x+s[0].x-s[1].x:s[2].x,2===i?s[3].y+s[0].y-s[1].y:s[2].y],Math.abs(n.svgTransform[1]/l)<1e-6&&Math.abs(n.svgTransform[2]/c)<1e-6&&(a=n.svgTransform[0]/l,n.svgTransform[4]=Math.round(n.svgTransform[4]/a)*a,a=n.svgTransform[3]/c,n.svgTransform[5]=Math.round(n.svgTransform[5]/a)*a)}return"img"===n.type&&n.quad.image?"matrix("+n.svgTransform.join(" ")+")":void 0},width:function(t){return"clr"===t.type?void 0:1},x:function(t){return"clr"===t.type?void 0:0},"xlink:href":function(t){return"clr"!==t.type&&t.quad.image?t.quad.image.src:void 0},y:function(t){return"clr"===t.type?void 0:0}},style:{fillOpacity:function(t){return"clr"===t.type?t.quad.opacity:void 0}},onlyRenderNew:!this.style("previewColor")&&!this.style("previewImage"),sortByZ:!0,visible:u.visible,classes:["svgQuadFeature"]};t._drawFeatures(o),u.buildTime().modified()}},this._update=function(){return h.call(u),(u.buildTime().timestamp()<=u.dataTime().timestamp()||u.buildTime().timestamp()<u.timestamp())&&u._build(),u},this._init=function(){c.call(u,e)},this._exit=function(){l.call(u)},u._init(e),this};r(a,o);var s={};s[o.capabilities.color]=!0,s[o.capabilities.image]=!0,s[o.capabilities.imageCrop]=!1,s[o.capabilities.imageFixedScale]=!1,s[o.capabilities.imageFull]=!1,s[o.capabilities.canvas]=!1,s[o.capabilities.video]=!1,i("svg","quad",a,s),t.exports=a},8210:function(t){t.exports="geo_svg_rescale"},2531:function(t,e,n){var r=n(5699),i=n(4647).registerRenderer,o=n(3234),a=function t(e){"use strict";var r=t.d3,i=n(2738),a=n(4634),s=n(5108),u=n(8210);if(!(this instanceof t))return new t(e);o.call(this,e);var l=this._exit;i.call(this,e),e=e||{};var c=this,h=null,f={},d=null,p=null,m=1,g={dx:0,dy:0,rx:0,ry:0,rotation:0},v={},y={},x=null,_=null;function b(t){return t?x.select(".group-"+t):x.select(".group-"+c._svgid())}function M(){var t=c.layer().map(),e=t.size().width,n=t.size().height;if(!e||!n)throw new Error("Map layer has size 0");c._setWidthHeight(e,n),p=Math.pow(e*e+n*n,.5),d={upperLeft:t.displayToGcs({x:0,y:0},null),lowerRight:t.displayToGcs({x:e,y:n},null),center:t.displayToGcs({x:e/2,y:n/2},null)}}return this._convertColor=function(t,e){return t=a.ensureFunction(t),e=e||function(){return!0},function(){var n="none";return e.apply(c,arguments)&&(n=t.apply(c,arguments)).hasOwnProperty("r")&&n.hasOwnProperty("g")&&n.hasOwnProperty("b")&&(n=r.rgb(255*n.r,255*n.g,255*n.b)),n}},this._convertScale=function(t){return t=a.ensureFunction(t),function(){return t.apply(c,arguments)/m}},this._setTransform=function(){if(d||M(),h){var t,e,n,r,i,o,a=c.layer().map(),s=a.gcsToDisplay(d.upperLeft,null),u=a.gcsToDisplay(d.lowerRight,null),l=a.gcsToDisplay(d.center,null),f=b();n=Math.sqrt(Math.pow(u.y-s.y,2)+Math.pow(u.x-s.x,2))/p,r=a.rotation(),i=-c.width()/2,o=-c.height()/2,t=n*i+l.x,e=n*o+l.y,r||(t=Math.round(t),e=Math.round(e));var v="matrix("+[n,0,0,n,t,e].join()+")";r&&(v+=" rotate("+[180*r/Math.PI,-i,-o].join()+")"),f.attr("transform",v),m=n,g.dx=t,g.dy=e,g.rx=i,g.ry=o,g.rotation=r}},this.baseToLocal=function(t){if(t={x:(t.x-g.dx)/m,y:(t.y-g.dy)/m},g.rotation){var e=Math.sin(-g.rotation),n=Math.cos(-g.rotation),r=t.x+g.rx,i=t.y+g.ry;t={x:r*n-i*e-g.rx,y:r*e+i*n-g.ry}}return t},this.localToBase=function(t){if(g.rotation){var e=Math.sin(g.rotation),n=Math.cos(g.rotation),r=t.x+g.rx,i=t.y+g.ry;t={x:r*n-i*e-g.rx,y:r*e+i*n-g.ry}}return t={x:t.x*m+g.dx,y:t.y*m+g.dy}},this._init=function(t){if(!c.canvas()){var e;t.widget=t.widget||!1,(x="d3Parent"in t?r.select(t.d3Parent).append("svg"):r.select(c.layer().node().get(0)).append("svg")).attr("display","block");var n=(_=x.append("defs")).append("filter").attr("id","geo-highlight").attr("x","-100%").attr("y","-100%").attr("width","300%").attr("height","300%");n.append("feMorphology").attr("operator","dilate").attr("radius",2).attr("in","SourceAlpha").attr("result","dilateOut"),n.append("feGaussianBlur").attr("stdDeviation",5).attr("in","dilateOut").attr("result","blurOut"),n.append("feColorMatrix").attr("type","matrix").attr("values","-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0").attr("in","blurOut").attr("result","invertOut"),n.append("feBlend").attr("in","SourceGraphic").attr("in2","invertOut").attr("mode","normal"),t.widget||(e=t.canvas||x.append("g")),(n=_.append("filter").attr("id","geo-blur").attr("x","-100%").attr("y","-100%").attr("width","300%").attr("height","300%")).append("feGaussianBlur").attr("stdDeviation",20).attr("in","SourceGraphic"),h=c.layer().sticky(),x.attr("class",c._svgid()),x.attr("width",c.layer().node().width()),x.attr("height",c.layer().node().height()),t.widget?c.canvas(x):(e.attr("class","group-"+c._svgid()),c.canvas(e))}return c._setTransform(),c},this.api=function(){return t.apiname},this.scaleFactor=function(){return m},this._resize=function(t,e,n,r){return d||M(),x.attr("width",n),x.attr("height",r),c._setTransform(),c._setWidthHeight(n,r),c.layer().geoTrigger(u,{scale:m},!0),c},this._exit=function(){f={},c.canvas().remove(),x.remove(),x=void 0,_.remove(),_=void 0,v={},y={},l()},this._definitions=function(){return _},this._drawFeatures=function(t){return f[t.id]={data:t.data,index:t.dataIndex,style:t.style,visible:t.visible,attributes:t.attributes,classes:t.classes,append:t.append,onlyRenderNew:t.onlyRenderNew,sortByZ:t.sortByZ,parentId:t.parentId},c.__render(t.id,t.parentId)},this.__render=function(t,e){var n;if(void 0===t){for(n in f)f.hasOwnProperty(n)&&c.__render(n);return c}return e?c._renderFeature(t,e):(v[t]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame)),c},this._renderFrame=function(){var t;for(t in y)c.select(t).remove(),_.selectAll("."+t).remove();y={};var e=v;for(t in v={},e)e.hasOwnProperty(t)&&c._renderFeature(t)},this._renderFeature=function(t,e){if(!f[t])return c;var n,r,i=f[t].data,o=f[t].index,a=f[t].style,s=f[t].visible,u=f[t].attributes,l=f[t].classes,h=f[t].append,d=c.select(t,e).data(i,o);return n=d.enter().append(h),d.exit().remove(),function(t,e){var n;for(n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}(r=f[t].onlyRenderNew?n:d,u),r.attr("class",l.concat([t]).join(" ")),function(t,e){var n,r,i;function o(){return e.fill.apply(c,arguments)?null:"none"}function a(){return e.stroke.apply(c,arguments)?null:"none"}for(n in e)e.hasOwnProperty(n)&&(i=null,r=null,"strokeColor"===n?(r="stroke",i=c._convertColor(e[n],e.stroke)):"stroke"===n&&e[n]&&!e.hasOwnProperty("strokeColor")?(r="stroke",i=a):"strokeWidth"===n?(r="stroke-width",i=c._convertScale(e[n])):"strokeOpacity"===n?(r="stroke-opacity",i=e[n]):"fillColor"===n?(r="fill",i=c._convertColor(e[n],e.fill)):"fill"!==n||e.hasOwnProperty("fillColor")?"fillOpacity"===n?(r="fill-opacity",i=e[n]):"lineCap"===n?(r="stroke-linecap",i=e[n]):"lineJoin"===n?(r="stroke-linejoin",i=e[n]):"miterLimit"===n&&(r="stroke-miterlimit",i=e[n]):(r="fill",i=o),r&&t.style(r,i))}(r,a),s&&r.style("visibility",s()?"visible":"hidden"),n.size()&&f[t].sortByZ&&d.sort((function(t,e){return(t.zIndex||0)-(e.zIndex||0)})),c},this.select=function(t,e){return b(e).selectAll("."+t)},this._removeFeature=function(t){return y[t]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame),delete f[t],v[t]&&delete v[t],c},this.draw=function(){},this.layer().geoOn(s.pan,c._setTransform),this.layer().geoOn(s.rotate,c._setTransform),this.layer().geoOn(s.zoom,(function(){c._setTransform(),c.__render(),c.layer().geoTrigger(u,{scale:m},!0)})),this.layer().geoOn(s.resize,(function(t){c._resize(t.x,t.y,t.width,t.height)})),this._init(e),this};a.apiname="svg",r(a,o),i("svg",a),i("d3",a),a.supported=function(){delete a.d3;try{(a.d3=n(8725))&&a.d3.rgb||(a.d3=void 0)}catch(t){}return void 0!==a.d3},a.fallback=function(){return null},a.supported(),t.exports=a},21:function(t,e,n){var r=function(){"use strict";var t,e=this,n=this._init,r=this._exit,i=this._update,o=0,a=[];this._drawTile=function(n){if(t){var r=e._tileBounds(n),i=n.index.level||0,s=e._tileOffset(i),u={};u.ul=e.fromLocal(e.fromLevel({x:r.left-s.x,y:r.top-s.y},i),0),u.ll=e.fromLocal(e.fromLevel({x:r.left-s.x,y:r.bottom-s.y},i),0),u.ur=e.fromLocal(e.fromLevel({x:r.right-s.x,y:r.top-s.y},i),0),u.lr=e.fromLocal(e.fromLevel({x:r.right-s.x,y:r.bottom-s.y},i),0),u.ul.z=u.ll.z=u.ur.z=u.lr.z=i,o+=1,u.id=o,n.quadId=u.id,u.image=n.image,u.reference=n.toString(),a.push(u),t.data(a),t._update(),e.draw()}},this._remove=function(n){if(void 0!==n.quadId&&t){for(var r=0;r<a.length;r+=1)if(a[r].id===n.quadId){a.splice(r,1);break}t.data(a),t._update(),e.draw()}},this._update=function(n){return i.call(e,n),e._addBaseQuadToTiles(t,a),e},this._exit=function(){e.deleteFeature(t),t=null,a=[],r.apply(e,arguments)},this._init=function(){n.apply(e,arguments),(t=e.createFeature("quad",{previewColor:e._options.previewColor,previewImage:e._options.previewImage})).geoTrigger=void 0,t.gcs(e._options.gcs||e.map().gcs()),t.data(a),t._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("svg","tile",r),t.exports=r},1489:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(2738).call(this),this._init(e),this):new t(e)};r(a,o),i("svg","track",a),t.exports=a},1946:function(t){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t.exports=function(){var t,n=[];for(n.length=8,t=0;t<8;t+=1)n[t]=e.charAt(Math.floor(61*Math.random()));return n.join("")}},3398:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(2623),a={arrow:{attrs:{class:"geo-vector-arrow geo-vector-marker",viewBox:"0 0 10 10",refX:1,refY:5,markerHeight:5,markerWidth:5,orient:"auto"},path:"M 0 0 L 10 5 L 0 10 z"},point:{attrs:{class:"geo-vector-point geo-vector-marker",viewBox:"0 0 12 12",refX:6,refY:6,markerHeight:8,markerWidth:8,orient:"auto"},path:"M 6 3 A 3 3 0 1 1 5.99999 3 Z"},bar:{attrs:{class:"geo-vector-bar geo-vector-marker",viewBox:"0 0 10 10",refX:0,refY:5,markerHeight:6,markerWidth:6,orient:"auto"},path:"M 0 0 L 2 0 L 2 10 L 0 10 z"},wedge:{attrs:{class:"geo-vector-wedge geo-vector-marker",viewBox:"0 0 10 10",refX:10,refY:5,markerHeight:5,markerWidth:5,orient:"auto"},path:"M 0 0 L 1 0 L 10 5 L 1 10 L 0 10 L 9 5 L 0 0"}},s=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(2738),i=n(6618),s=n(2531).d3;e=e||{},o.call(this,e),r.call(this);var u=this,l=this._exit,c=this._update,h=i(),f={};function d(t,e,n){return u._svgid()+"_marker_"+e+"_"+n}function p(t,e,n,r,i){var o=u.renderer()._definitions().selectAll("g.marker-group#"+u._svgid()).data(t.length?[1]:[]);o.enter().append("g").attr("id",u._svgid).attr("class","marker-group"),o.exit().remove();var l=t.reduce((function(t,e,n){var o=a[i(e,n)],s=a[r(e,n)];return o&&t.push({data:e,dataIndex:n,head:!0}),s&&t.push({data:e,dataIndex:n,head:!1}),t}),[]),c=o.selectAll("marker.geo-vector-marker").data(l);c.enter().append("marker").append("path");var h=u.renderer();c.each((function(t){var e=s.select(this),n=t.head?a[i(t.data,t.dataIndex)]:a[r(t.data,t.dataIndex)];Object.keys(n.attrs).forEach((function(t){e.attr(t,n.attrs[t])}))})).attr("id",(function(t){return d(t.data,t.dataIndex,t.head?"head":"tail")})).style("stroke",(function(t){return h._convertColor(e)(t.data,t.dataIndex)})).style("fill",(function(t){return h._convertColor(e)(t.data,t.dataIndex)})).style("opacity",(function(t){return n(t.data,t.dataIndex)})).select("path").attr("d",(function(t){return t.head?a[i(t.data,t.dataIndex)].path:a[r(t.data,t.dataIndex)].path})),c.exit().remove()}return this._build=function(){var t,e=u.data(),n=u.style.get(),r=u.renderer(),i=u.origin(),o=u.delta(),a=u.style("scale"),s=0;function l(){return a/r.scaleFactor()}return c.call(u),e||(e=[]),t=e.map((function(t,e){var n=u.featureGcsToDisplay(i(t,e)),r=o(t,e);return s=Math.max(s,r.x*r.x+r.y*r.y),{x1:n.x,y1:n.y,dx:r.x,dy:-r.y}})),s=Math.sqrt(s),a||(a=75/(s||1)),f.id=u._svgid(),f.data=e,f.append="line",f.attributes={x1:function(e,n){return t[n].x1},y1:function(e,n){return t[n].y1},x2:function(e,n){return t[n].x1+l()*t[n].dx},y2:function(e,n){return t[n].y1+l()*t[n].dy},"marker-start":function(t,e){return"url(#"+d(0,e,"tail")+")"},"marker-end":function(t,e){return"url(#"+d(0,e,"head")+")"}},f.style={stroke:function(){return!0},strokeColor:n.strokeColor,strokeWidth:n.strokeWidth,strokeOpacity:n.strokeOpacity,originStyle:n.originStyle,endStyle:n.endStyle},f.classes=["svgVectorFeature"],f.visible=u.visible,p(e,n.strokeColor,n.strokeOpacity,n.originStyle,n.endStyle),u.renderer()._drawFeatures(f),h.modified(),u.updateTime().modified(),u},this._update=function(){return c.call(u),u.timestamp()>=h.timestamp()?u._build():p(f.data,f.style.strokeColor,f.style.strokeOpacity,f.style.originStyle,f.style.endStyle),u},this._exit=function(){l.call(u),f={},p([],null,null,null,null)},this._init(e),this};s.markerConfigs=a,r(s,o),i("svg","vector",s),t.exports=s},9757:function(t,e,n){var r=n(5699),i=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},i.call(this,e);var r=n(5638),o=this,a=this._init;return this.featureType="text",this.position=function(t){return void 0===t?o.style("position"):(t!==o.style("position")&&(o.style("position",t),o.dataTime().modified(),o.modified()),o)},this.text=function(t){return void 0===t?o.style("text"):(t!==o.style("text")&&(o.style("text",t),o.dataTime().modified(),o.modified()),o)},this._init=function(t){t=t||{},a.call(o,t);var e=r.extend({},{font:"bold 16px sans-serif",textAlign:"center",textBaseline:"middle",color:{r:0,g:0,b:0},rotation:0,rotateWithMap:!1,textScaled:!1,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},text:function(t){return t.text}},void 0===t.style?{}:t.style);void 0!==t.position&&(e.position=t.position),void 0!==t.text&&(e.text=t.text),o.style(e),e.position&&o.position(e.position),e.text&&o.text(e.text),o.dataTime().modified()},this._init(e),o};o.usedStyles=["visible","font","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily","textAlign","textBaseline","color","textOpacity","rotation","rotateWithMap","textScaled","offset","shadowColor","shadowOffset","shadowBlur","shadowRotate","textStrokeColor","textStrokeWidth"],o.create=function(t,e){"use strict";return(e=e||{}).type="text",i.create(t,e)},o.capabilities={feature:"text"},r(o,i),t.exports=o},8418:function(t,e,n){var r=n(5638);t.exports=function t(e){if(!(this instanceof t))return new t(e);this._index=e.index,this._size=e.size,this._overlap=e.overlap||{x:0,y:0},this._wrap=e.wrap||{x:1,y:1},this._url=e.url,this._fetched=!1,this._queue=e.queue||null,Object.defineProperty(this,"index",{get:function(){return this._index}}),Object.defineProperty(this,"size",{get:function(){return this._size}}),Object.defineProperty(this,"overlap",{get:function(){return this._overlap}}),this.fetch=function(){return this._fetched||r.get(this._url).done(function(){this._fetched=!0}.bind(this)).promise(this),this},this.fetched=function(){return this._fetched},this.then=function(t,e){return this.fetched()||!this._queue||!this._queue.add||this.state&&"pending"!==this.state()?this.fetch():this._queue.add(this,this.fetch),this.done&&this.fail?this.done(t).fail(e):this.then(t,e),this},this.catch=function(t){return this.then(void 0,t),this},this.toString=function(){return[this._index.level||0,this._index.y,this._index.x,this._index.reference||0].join("_")},this.bounds=function(t,e){var n,r,i,o;return r=(n=this.size.x*(this.index.x-t.x)-this.overlap.x-e.x)+this.size.x+2*this.overlap.x,i=(o=this.size.y*(this.index.y-t.y)-this.overlap.y-e.y)+this.size.y+2*this.overlap.y,this.overlap.x&&this.index.x===t.x&&(n+=this.overlap.x),this.overlap.y&&this.index.y===t.y&&(o+=this.overlap.y),{left:n,right:r,bottom:i,top:o}},Object.defineProperty(this,"bottom",{get:function(){return this.size.y*(this.index.y+1)+this.overlap.y}}),Object.defineProperty(this,"top",{get:function(){return this.size.y*this.index.y-(this.index.y?this.overlap.y:0)}}),Object.defineProperty(this,"left",{get:function(){return this.size.x*this.index.x-(this.index.x?this.overlap.x:0)}}),Object.defineProperty(this,"right",{get:function(){return this.size.x*(this.index.x+1)+this.overlap.x}}),this.fadeIn=function(t){return r.noop(t),this}}},6244:function(t){t.exports=function t(e){return this instanceof t?(e=e||{},this._size=e.size||64,Object.defineProperty(this,"size",{get:function(){return this._size},set:function(t){for(;this._atime.length>t;)this.remove(this._atime[this._atime.length-1]);this._size=t}}),Object.defineProperty(this,"length",{get:function(){return this._atime.length}}),this._access=function(t){return this._atime.indexOf(t)},this.remove=function(t){var e="string"==typeof t?t:t.toString();return e in this._cache&&(this._atime.splice(this._access(e),1),delete this._cache[e],!0)},this.clear=function(){return this._cache={},this._atime=[],this},this.get=function(t,e){return(t="string"==typeof t?t:t.toString())in this._cache?(e||(this._atime.splice(this._access(t),1),this._atime.unshift(t)),this._cache[t]):null},this.add=function(t,e,n){this.remove(t);var r=t.toString();this._cache[r]=t,this._atime.unshift(r),n||this.purge(e)},this.purge=function(t){for(var e;this._atime.length>this.size;){e=this._atime.pop();var n=this._cache[e];t&&t(n),delete this._cache[e]}},this.clear(),this):new t(e)}},1940:function(t,e,n){var r=n(5699),i=n(3715);function o(t,e){return(t%e+e)%e}function a(t){var e,n=/\$?\{(s|S|[sS]:[^{}]+|[^-{}]-[^-{}]|([^,{}]+,)+[^,{}]+)\}/,r=t.replace(new RegExp(n,"g"),"{s}").replace(/\$?\{[xX]\}/g,"{x}").replace(/\$?\{[yY]\}/g,"{y}").replace(/\$?\{[zZ]\}/g,"{z}"),i=t.match(n);if(i)if(i[2])e=i[1].split(",");else if(":"===i[1][1])e=i[1].substr(2).split("");else if("-"===i[1][1]){e=[];for(var a=i[1].charCodeAt(0),s=i[1].charCodeAt(2),u=Math.min(a,s);u<=Math.max(a,s);u+=1)e.push(String.fromCharCode(u))}return function(t,n,i,a){return r.replace(/\{s\}/g,function(t,e,n,r){return r[o(t+e+n,r.length)]}(t,n,i,e||a)).replace(/\{x\}/g,t).replace(/\{y\}/g,n).replace(/\{z\}/g,i)}}var s=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var r=n(5638),s=n(5108),u=n(6853),l=n(6244),c=n(3705),h=n(4647).adjustLayerForRenderer,f=n(8418);if((e=r.extend(!0,{},this.constructor.defaults,e||{})).cacheSize||(e.cacheSize=e.keepLower?600:200),"string"===r.type(e.subdomains)&&(e.subdomains=e.subdomains.split("")),e.baseUrl){var d=e.baseUrl;d&&"/"!==d.charAt(d.length-1)&&(d+="/"),e.url=d+"{z}/{x}/{y}."+(e.imageFormat||"png")}e.originalUrl=e.url,"string"===r.type(e.url)&&(e.url=a(e.url));var p,m,g,v=this._init,y=this._exit,x=this.visible,_=e.queueSize||6,b=e.initialQueueSize||0,M=[],w={},A=[],T=e.nearestPixel,C=this;this._options=r.extend(!0,{},e),this.attribution(e.attribution),this._activeTiles={},this._tileTree={},this._cache=l({size:e.cacheSize}),this._queue=e.queue||c({size:_,initialSize:b,track:e.cacheSize,needed:function(t){return this._tileLayers&&this._tileLayers.length?this._tileLayers.some((function(e){return t===e.cache.get(t.toString(),!0)})):t===C.cache.get(t.toString(),!0)}}),this._queue._tileLayers=this._queue._tileLayers||[],this._queue._tileLayers.push(C),this._queue.initialTrack&&this._queue.track&&(this._queue.track=this._queue.initialTrack*this._queue._tileLayers.length);var E={};return Object.defineProperty(this,"options",{get:function(){return r.extend({},C._options)}}),Object.defineProperty(this,"cache",{get:function(){return C._cache}}),Object.defineProperty(this,"activeTiles",{get:function(){return r.extend({},C._activeTiles)}}),Object.defineProperty(this,"queue",{get:function(){return C._queue},set:function(t){C._queue!==t&&(this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(C)>=0&&(this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(C),1),this._queue.initialTrack&&this._queue.track&&this._queue._tileLayers.length&&(this._queue.track=this._queue.initialTrack*this._queue._tileLayers.length)),C._queue=t,C._queue._tileLayers=C._queue._tileLayers||[],C._queue._tileLayers.push(C),C._queue.initialTrack&&C._queue.track&&(C._queue.track=C._queue.initialTrack*C._queue._tileLayers.length))}}),Object.defineProperty(this,"queueSize",{get:function(){return _},set:function(t){_=t,C._queue.size=t}}),Object.defineProperty(this,"initialQueueSize",{get:function(){return b},set:function(t){b=t||0,C._queue.initialSize=t||_}}),Object.defineProperty(this,"reference",{get:function(){return C.id()+"_"+(p||0)},set:function(t){p=t},configurable:!0}),this.tilesAtZoom=function(t){if(C._options.tilesAtZoom)return C._options.tilesAtZoom.call(C,t);var e=Math.pow(2,t);return{x:e,y:e}},this.tilesMaxBounds=function(t){return C._options.tilesMaxBounds?C._options.tilesMaxBounds.call(C,t):null},this.tileCropFromBounds=function(t){if(C._options.tilesMaxBounds){var e=t.index.level,n=C._tileBounds(t);return void 0===A[e]&&(A[e]=C.tilesMaxBounds(e)||null),A[e]&&(n.right>A[e].x||n.bottom>A[e].y)?{x:Math.max(0,Math.min(A[e].x,n.right)-n.left),y:Math.max(0,Math.min(A[e].y,n.bottom)-n.top)}:void 0}},this.isValid=function(t){return C._options.minLevel<=t.level&&t.level<=C._options.maxLevel&&(!!(C._options.wrapX||0<=t.x&&t.x<=C.tilesAtZoom(t.level).x-1)&&!!(C._options.wrapY||0<=t.y&&t.y<=C.tilesAtZoom(t.level).y-1))},this._origin=function(t){var e,n=C.toLevel(C.toLocal(C.map().origin()),t),r=C._options;return{index:e={x:Math.floor(n.x/r.tileWidth),y:Math.floor(n.y/r.tileHeight)},offset:{x:n.x-r.tileWidth*e.x,y:n.y-r.tileHeight*e.y}}},this._tileBounds=function(t){var e=C._origin(t.index.level);return t.bounds(e.index,e.offset)},this.tileAtPoint=function(t,e){var n=C._origin(e),r=C.map();t=C.displayToLevel(r.gcsToDisplay(t,null),e),isNaN(t.x)&&(t.x=0),isNaN(t.y)&&(t.y=0);var i=C._tileOffset(e);return i&&(t.x+=i.x,t.y+=i.y),{x:Math.floor(n.index.x+(n.offset.x+t.x)/C._options.tileWidth),y:Math.floor(n.index.y+(n.offset.y+t.y)/C._options.tileHeight)}},this.gcsTileBounds=function(t,e){var n=t.index?t:f({index:t,size:{x:C._options.tileWidth,y:C._options.tileHeight},url:""}),r=C._tileOffset(n.index.level),i=n.bounds({x:0,y:0},r),o=C.map(),a=o.unitsPerPixel(n.index.level),s=[{x:i.left*a,y:C._topDown()*i.top*a},{x:i.right*a,y:C._topDown()*i.bottom*a}];return(e=null===e?o.gcs():void 0===e?o.ingcs():e)!==o.gcs()&&(s=u.transformCoordinates(o.gcs(),e,s)),{left:s[0].x,top:s[0].y,right:s[1].x,bottom:s[1].y}},this._getTile=function(t,e){var n=e||t;return f({index:t,size:{x:C._options.tileWidth,y:C._options.tileHeight},queue:C._queue,url:C._options.url.call(C,n.x,n.y,n.level||0,C._options.subdomains)})},this._getTileCached=function(t,e,n){var r=C.cache.get(C._tileHash(t));return null===r&&(r=C._getTile(t,e),C.cache.add(r,C.remove,n)),r},this._tileHash=function(t){return[t.level||0,t.y,t.x,t.reference||0].join("_")},this._getTileRange=function(t,e){var n=[C.tileAtPoint({x:e.left,y:e.top},t),C.tileAtPoint({x:e.right,y:e.top},t),C.tileAtPoint({x:e.left,y:e.bottom},t),C.tileAtPoint({x:e.right,y:e.bottom},t)];return{start:{x:Math.min(n[0].x,n[1].x,n[2].x,n[3].x),y:Math.min(n[0].y,n[1].y,n[2].y,n[3].y)},end:{x:Math.max(n[0].x,n[1].x,n[2].x,n[3].x),y:Math.max(n[0].y,n[1].y,n[2].y,n[3].y)}}},this._getTiles=function(t,e,n,i){var a,s,u,l,c,h,f,d,p,m,g,v=[],y=!1,x=C._options.keepLower?C._options.minLevel:Math.min(Math.max(t,C._options.minLevel),C._options.maxLevel);for(t<x&&(t=x),g=x;g<=t&&(c=(f=C._getTileRange(g,e)).start,h=f.end,l=C.tilesAtZoom(g),C._options.wrapX||(c.x=Math.min(Math.max(c.x,0),l.x-1),h.x=Math.min(Math.max(h.x,0),l.x-1),g===x&&C._options.keepLower&&(c.x=0,h.x=l.x-1)),C._options.wrapY||(c.y=Math.min(Math.max(c.y,0),l.y-1),h.y=Math.min(Math.max(h.y,0),l.y-1),g===x&&C._options.keepLower&&(c.y=0,h.y=l.y-1)),!(C._options.gcs&&C._options.gcs!==C.map().gcs()&&g!==x&&(h.x+1-c.x)*(h.y+1-c.y)>C.map().size().width*C.map().size().height/C._options.tileWidth/C._options.tileHeight*16));g+=1)for(a=c.x;a<=h.x;a+=1)for(s=c.y;s<=h.y;s+=1)u={level:g,x:a,y:s,reference:C.reference},d={level:g,x:a,y:s,reference:C.reference},C._options.wrapX&&(d.x=o(d.x,l.x)),C._options.wrapY&&(d.y=o(d.y,l.y)),C.isValid(d)&&(i&&v.length<M.length&&(m=M[v.length],y=y||u.level!==m.level||u.x!==m.x||u.y!==m.y),v.push({index:u,source:d}));if(i){if(!y&&v.length===M.length)return;M.splice(0,M.length),r.each(v,(function(t,e){M.push(e.index)}))}if(n){p={x:(c.x+h.x)/2,y:(c.y+h.y)/2,level:t,bottomLevel:t};for(var _=Math.max(h.x-c.x,h.y-c.y)+1;_>=1;_/=2)p.bottomLevel-=1;v.sort(C._loadMetric(p)),C._queue&&C._queue.batch(!0)}for(C.cache.size<v.length&&(console.log("Increasing cache size to "+v.length),C.cache.size=v.length),a=0;a<v.length;a+=1)v[a]=C._getTileCached(v[a].index,v[a].source,!0);return C.cache.purge(C.remove),v},this.gcs=function(t){if(void 0===t)return C._options.gcs||C.map().gcs();var e=C.gcs();return null===t?delete C._options.gcs:C._options.gcs=t,C.gcs()!==e&&(C.clear(),C.gcsFeatures(C.gcs()),C.modified(),C._update()),C},this.prefetch=function(t,e){var n;return n=C._getTiles(t,e,!0),r.when.apply(r,n.map((function(t){return t.fetch()})))},this._loadMetric=function(t){return function(e,n){var r,i,o,a,s;return e=e.index||e,n=n.index||n,e.level!==n.level?t.bottomLevel&&e.level>=t.bottomLevel!=n.level>=t.bottomLevel?e.level>=t.bottomLevel?-1:1:e.level-n.level:(s=Math.pow(2,e.level-t.level),o=(t.x+.5)*s-.5,a=(t.y+.5)*s-.5,(r=e.x-o)*r+(i=e.y-a)*i-((r=n.x-o)*r+(i=n.y-a)*i))}},this.fromLevel=function(t,e){var n=Math.pow(2,-e);return{x:t.x*n,y:t.y*n}},this.toLevel=function(t,e){var n=Math.pow(2,e);return{x:t.x*n,y:t.y*n}},this.drawTile=function(t){var e=t.toString();C._activeTiles.hasOwnProperty(e)?C._moveToTop(t):C._drawTile(t),C._activeTiles[e]=t},this._drawTile=function(t){if(null!==C.renderer())throw new Error("This draw method is not valid on renderer managed layers.");var e,n=t.index.level,i=r(C._getSubLayer(n)),o=C._tileBounds(t),a=C._options.animationDuration,s=r('<div class="geo-tile-container"/>').attr("tile-reference",t.toString());s.append(t.image),s.css({left:o.left-parseInt(i.attr("offsetx")||0,10)+"px",top:o.top-parseInt(i.attr("offsety")||0,10)+"px"}),(e=C.tileCropFromBounds(t))&&s.addClass("crop").css({width:e.x+"px",height:e.y+"px"}),a>0&&t.fadeIn(a),i.append(s),t.catch((function(){console.warn("Could not load tile at "+t.toString()),C._remove(t)}))},this.remove=function(t){var e=t.toString(),n=C._activeTiles[e];return n instanceof f&&C._remove(n),delete C._activeTiles[e],n},this._remove=function(t){t.image&&(t.image.parentElement?r(t.image.parentElement).remove():console.log("No parent element to remove "+t.toString(),t),r(t.image).remove())},this._moveToTop=function(t){r.noop(t)},this._getViewBounds=function(){var t=C.map(),e=t.zoom(),n=C._options.tileRounding(e),r=Math.pow(2,e-n),i=t.size(),o=C.displayToLevel({x:0,y:0}),a=C.displayToLevel({x:i.width,y:0}),s=C.displayToLevel({x:0,y:i.height}),u=C.displayToLevel({x:i.width,y:i.height});return{level:n,scale:r,left:Math.min(o.x,a.x,s.x,u.x),right:Math.max(o.x,a.x,s.x,u.x),top:Math.min(o.y,a.y,s.y,u.y),bottom:Math.max(o.y,a.y,s.y,u.y)}},this._purge=function(t,e,n){var r,i;if(C._updating)return C;for(i in n||(n=C._getViewBounds()),C._activeTiles)r=C._activeTiles[i],C._canPurge(r,n,t,e)&&C.remove(r);return C},this.clear=function(){var t,e=[];for(t in C._activeTiles)e.push(C.remove(t));return C._tileTree={},M=[],e},this.reset=function(){return C.clear(),C._cache.clear(),C._queue.initialSize=b,C},this.toLocal=function(t,e){var n=C.map(),r=n.unitsPerPixel(void 0===e?n.zoom():e);return{x:t.x/r,y:C._topDown()*t.y/r}},this.fromLocal=function(t,e){var n=C.map(),r=n.unitsPerPixel(void 0===e?n.zoom():e);return{x:t.x*r,y:C._topDown()*t.y*r}},this._topDown=function(){return C._options.topDown?1:-1},this._getSubLayer=function(t){if(C.canvas()){var e=C.canvas().find("div[data-tile-layer="+t.toFixed()+"]").get(0);return e||(e=r('<div class=geo-tile-layer data-tile-layer="'+t.toFixed()+'"/>').get(0),C.canvas().append(e)),e}},this._updateSubLayers=function(t,e){var n=C.canvas(),i=parseInt(n.attr("lastlevel"),10),o=parseInt(n.attr("lastoffsetx")||0,10),a=parseInt(n.attr("lastoffsety")||0,10);if(i===t&&Math.abs(o-e.left)<65536&&Math.abs(a-e.top)<65536)return{x:o,y:a};var s=C.map(),u=C._tileOffset(t),l=parseInt((e.left+e.right-s.size().width)/2+u.x,10),c=parseInt((e.top+e.bottom-s.size().height)/2+u.y,10);return n.find(".geo-tile-layer").each((function(e,n){var i=r(n),o=parseInt(i.data("tileLayer"),10);i.css("transform","scale("+Math.pow(2,t-o)+")");var a=parseInt(l/Math.pow(2,t-o),10),s=parseInt(c/Math.pow(2,t-o),10),u=a-parseInt(i.attr("offsetx")||0,10),h=s-parseInt(i.attr("offsety")||0,10);i.attr({offsetx:a,offsety:s}),i.find(".geo-tile-container").each((function(t,e){r(e).css({left:parseInt(r(e).css("left"),10)-u+"px",top:parseInt(r(e).css("top"),10)-h+"px"})}))})),n.attr({lastoffsetx:l,lastoffsety:c,lastlevel:t}),{x:l,y:c}},this._update=function(t){if(t&&t.event&&(t.event.event===s.zoom||t.event.event===s.rotate))return C;if(!C.visible())return C;var e,n=C.map(),i=n.bounds(void 0,null),o=n.zoom(),a=C._options.tileRounding(o);if(C._updateSubLayers){var u=C._getViewBounds(),l=C._updateSubLayers(a,u)||{x:0,y:0},c=C._tileOffset(a);if(null===C.renderer()){var h=Math.pow(2,o-a),f=n.rotation(),d=-c.x+-(u.left+u.right)/2+l.x,p=-c.y+-(u.bottom+u.top)/2+l.y,g=d+n.size().width/2,v=p+n.size().height/2;C.canvas().css({"transform-origin":-d+"px "+-p+"px"});var y="translate("+g+"px,"+v+"px)scale("+h+")";f&&(y+="rotate("+180*f/Math.PI+"deg)"),C.canvas().css("transform",y)}C.canvas().attr({scale:Math.pow(2,o-a),dx:-c.x+-(u.left+u.right)/2,dy:-c.y+-(u.bottom+u.top)/2,offsetx:l.x,offsety:l.y,rotation:n.rotation()})}if(void 0===(e=C._getTiles(a,i,!0,!0)))return C;if(C._tileTree={},e.forEach((function(t){if(t.fetched())delete w[t.toString()],C.drawTile(t),C._setTileTree(t);else{if(t._queued)(C._queue?C._queue.get(t):-1)>=0&&C._queue.add(t);else t.then((function(){if(!m&&t===C.cache.get(t.toString())){var e=n.zoom(),r=C._options.tileRounding(e),i=C._getViewBounds();C._canPurge(t,i,r)?C.remove(t):(C.drawTile(t),C._setTileTree(t))}})),t._queued=!0;C.addPromise(t),w[t.toString()]=t}})),r.when.apply(r,e).done((function(){var t=C.map().zoom(),e=C._options.tileRounding(t);C._purge(e,!0)})),"all"!==C._options.idleAfter)for(var x in w){var _=w[x];e.indexOf(_)<0&&(C.removePromise(_),delete w[x])}return C},this._setTileTree=function(t){if(!C._options.keepLower){var e=t.index;C._tileTree[e.level]=C._tileTree[e.level]||{},C._tileTree[e.level][e.x]=C._tileTree[e.level][e.x]||{},C._tileTree[e.level][e.x][e.y]=t}},this._getTileTree=function(t){return((C._tileTree[t.level]||{})[t.x]||{})[t.y]||null},this._isCovered=function(t){var e=t.index.level,n=t.index.x,r=t.index.y,i=[];return(i=C._getTileTree({level:e-1,x:Math.floor(n/2),y:Math.floor(r/2)}))?[i]:(i=[C._getTileTree({level:e+1,x:2*n,y:2*r}),C._getTileTree({level:e+1,x:2*n+1,y:2*r}),C._getTileTree({level:e+1,x:2*n,y:2*r+1}),C._getTileTree({level:e+1,x:2*n+1,y:2*r+1})]).every((function(t){return null!==t}))?i:null},this._outOfBounds=function(t,e){var n=C._tileOffset(t.index.level),r=1;return t.index.level!==e.level&&(r=Math.pow(2,(e.level||0)-(t.index.level||0))),(t.bottom-n.y)*r<e.top||(t.left-n.x)*r>e.right||(t.top-n.y)*r>e.bottom||(t.right-n.x)*r<e.left},this._canPurge=function(t,e,n,r){if(C._options.keepLower){if((n=n||0)<t.index.level&&t.index.level!==C._options.minLevel)return!0;if(t.index.level===C._options.minLevel&&!C._options.wrapX&&!C._options.wrapY)return!1}else if((r||C._isCovered(t))&&n!==t.index.level&&(n>=C._options.minLevel||t.index.level!==C._options.minLevel)&&(n<C._options.maxLevel||t.index.level!==C._options.maxLevel))return!0;return!!e&&C._outOfBounds(t,e)},this.displayToLevel=function(t,e){var n,r=C.map(),i=r.zoom(),o=C._options.tileRounding(i),a=r.unitsPerPixel(void 0===e?o:e);if(void 0===t){var s=r.size();t={x:s.width/2,y:s.height/2}}try{n=r.displayToGcs(t,C._options.gcs||null)}catch(t){n={x:0,y:0}}return{x:n.x/a,y:C._topDown()*n.y/a}},this.url=function(t){return void 0===t?C._options.originalUrl:(t===C._options.originalUrl||(C._options.originalUrl=t,"string"===r.type(t)&&(t=a(t)),C._options.url=t,C.reset(),C.map().draw()),C)},this.subdomains=function(t){return void 0===t?C._options.subdomains:(t&&("string"===r.type(t)&&(t=t.indexOf(",")>=0?t.split(","):t.split("")),C._options.subdomains=t,C.reset(),C.map().draw()),C)},this._tileOffset=function(t){return void 0===E[t]&&(E[t]=C._options.tileOffset(t)),E[t]},this.visible=function(t){return void 0===t?x():(C.visible()!==t&&(x(t),t&&C._update()),C)},this.nearestPixel=function(t,e){return void 0===t?T:(T!==t&&(T=t,e||(C.modified(),C._update())),C)},Object.defineProperty(this,"baseQuad",{get:function(){return C._options.baseQuad},set:function(t){C._options.baseQuad=t,C._update()}}),this._addBaseQuadToTiles=function(t,e){t&&(this.baseQuad!==g&&(g&&e.splice(0,1),(g=this.baseQuad)&&(e.splice(0,0,this.baseQuad),t.cacheUpdate(0)),t.data(e)),t._update())},this._init=function(){var t;if(v.apply(C,arguments),null===C.renderer())for(t=0;t<=C._options.maxLevel;t+=1)C._getSubLayer(t);return C},this._exit=function(){return C.reset(),y.apply(C,arguments),m=!0,this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(C)>=0&&(this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(C),1),this._queue.initialTrack&&this._queue.track&&this._queue._tileLayers.length&&(this._queue.track=this._queue.initialTrack*this._queue._tileLayers.length)),C},h("tile",this),this};s.defaults={minLevel:0,maxLevel:18,tileOverlap:{x:0,y:0},tileWidth:256,tileHeight:256,wrapX:!0,wrapY:!1,url:null,subdomains:"abc",tileOffset:function(t){return{x:0,y:0}},tilesMaxBounds:null,topDown:!1,keepLower:!0,idleAfter:"view",tileRounding:Math.round,attribution:"",animationDuration:0},r(s,i),t.exports=s},6618:function(t){var e=0;t.exports=function t(){"use strict";if(!(this instanceof t))return new t;var n=this,r=0;return this.modified=function(){return r=e+=1,n},this.timestamp=function(){return r},this.getMTime=this.timestamp,this}},6223:function(t,e,n){var r=n(5699),i=n(6837),o=n(4647),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),s=n(6853);e=e||{},i.call(this,e);var u,l,c,h,f,d=this,p={},m={startTime:void 0!==e.startTime?e.startTime:null,endTime:void 0!==e.endTime?e.endTime:null,duration:void 0!==e.duration?e.duration:null,start:0,end:0},g=this.draw,v=this._exit,y=this._init,x=this.modified,_=this.style,b=this._update;return this.featureType="track",this._linePosition=function(t){return function(e,n,r,i){var o=m.timeFunc(e,n,r,i);return"past"===t&&o>=m.start||"current"===t&&o<m.start?m.startPosition[i]:"current"===t&&o>m.end||"future"===t&&o<m.end?m.endPosition[i]:m.positionFunc(e,n,r,i)}},this._headPosition=function(t,e){return m.endPosition[e]},this._headText=function(t,e){return m.text[e]},this._updateTimeRange=function(){null!==m.endTime||null===m.endTime&&(null===m.startTime||null==m.duration)?(m.end=null!==m.endTime?m.endTime:m.timeExtents.end,null!==m.startTime&&(null===m.endTime||m.startTime<=m.endTime)?m.start=m.startTime:null!==m.duration?m.start=m.end-m.duration:m.start=m.timeExtents.start):(m.start=m.startTime,m.end=m.start+m.duration)},this.calculateTimePosition=function(t,e,n){d.dataTime().timestamp()>=d.buildTime().timestamp()&&d._build(),e=null===e?d.layer().map().gcs():void 0===e?d.gcs():e;var r=s({source:d.gcs(),target:e}),i=d.data(),o=[],a=i.map((function(e,n){var r=m.trackFunc(e,n);if(o.push(r),!r.length)return{x:0,y:0,z:0,posidx:-1};var i,a,s,u,l=0,c=r.length-1;if(1===r.length)return{posidx:l,angidx0:l,angidx1:l};if((i=m.timeFunc(r[l],l,e,n))>=t)return{posidx:l,angidx0:l,angidx1:l+1};if((a=m.timeFunc(r[c],c,e,n))<=t)return{posidx:c,angidx0:c-1,angidx1:c};for(;c-l>1;){if(s=Math.floor((c+l)/2),(u=m.timeFunc(r[s],s,e,n))===t)return{posidx:s,angidx0:s-1,angidx1:s+1};u<t?(i=u,l=s):(a=u,c=s)}var h=(t-i)/(a-i);return{posidx0:l,posidx1:c,factor0:1-h,factor1:h,angidx0:l,angidx1:c}}));return a.forEach((function(t,e){var i,a,s;t.posidx<0||(void 0===t.posidx1?i=m.positionFunc(o[e][t.posidx],t.posidx,o[e],e):(a=r.forward(m.positionFunc(o[e][t.posidx0],t.posidx0,o[e],e),!0),s=r.forward(m.positionFunc(o[e][t.posidx1],t.posidx1,o[e],e),!0),i=r.inverse({x:a.x*t.factor0+s.x*t.factor1,y:a.y*t.factor0+s.y*t.factor1,z:(a.z||0)*t.factor0+(s.z||0)*t.factor1},!0)),t.x=i.x,t.y=i.y,t.z=i.z||0,n&&(void 0===t.posidx1&&(a=r.forward(t.angidx0===t.posidx?i:m.positionFunc(o[e][t.angidx0],t.angidx0,o[e],e),!0),s=r.forward(t.angidx1===t.posidx?i:m.positionFunc(o[e][t.angidx1],t.angidx1,o[e],e),!0)),t.angle=Math.atan2(s.y-a.y,s.x-a.x)))})),a},this._build=function(){d.buildTime().modified(),u||(u={past:d.layer().createFeature("line"),future:d.layer().createFeature("line"),current:d.layer().createFeature("line")},d.dependentFeatures([u.past,u.current,u.future]));var t=d.data();m.data=t,m.timeFunc=d.style.get("time"),m.positionFunc=d.style.get("position"),m.trackFunc=d.style.get("track"),m.textFunc=d.style.get("text"),["past","current","future"].forEach((function(e){u[e].style(d.style()).style(d[e+"Style"]()).line(d.style("track")).gcs(d.gcs()).data(t).position(d._linePosition(e))}));var e,n,r={};if(t.forEach((function(t,e){var n,i=m.trackFunc(t,e);i.length&&(n=m.timeFunc(i[0],0,t,e),(void 0===r.start||n<r.start)&&(r.start=n),i.length>1&&(n=m.timeFunc(i[i.length-1],i.length-1,t,e)),(void 0===r.end||n>r.end)&&(r.end=n))})),m.timeExtents=r,d._updateTimeRange(),m.startPosition=d.calculateTimePosition(m.start,null),m.endPosition=d.calculateTimePosition(m.end,null,!0),m.text=t.map((function(t,r){var i=m.textFunc(t,r);return e|=null==i,null==i||""===i?"":(n=!0,m.startPosition[r].posidx<0&&(i=""),i)})),e&&!c){if(!(o.registries.features[d.layer().rendererName()]||{}).marker){var i=o.rendererForFeatures(["marker"]);l=o.createLayer("feature",d.layer().map(),{renderer:i}),d.layer().addChild(l),d.layer().node().append(l.node())}c=(l||d.layer()).createFeature("marker");var a=d.dependentFeatures();a.push(c),d.dependentFeatures(a)}if(n&&!f){if(!(o.registries.features[d.layer().rendererName()]||{}).text){var s=o.rendererForFeatures(["text"]);h=o.createLayer("feature",d.layer().map(),{renderer:s}),d.layer().addChild(h),d.layer().node().append(h.node())}f=(h||d.layer()).createFeature("text");var p=d.dependentFeatures();p.push(f),d.dependentFeatures(p)}if(c){c.headData=m.endPosition,c.style(d.markerStyle()).gcs(d.gcs()).data(t).position(d._headPosition);var g=c.style.get("radius");c.style("radius",(function(t,e){return m.text[e]||m.startPosition[e].posidx<0?0:g(t,e)}))}return f&&(f.headData=m.endPosition,f.style(d.textStyle()).gcs(d.gcs()).data(t).text(d._headText).position(d._headPosition)),d},this._updateTimeAndPosition=function(){u&&(d._updateTimeRange(),m.startPosition=d.calculateTimePosition(m.start,null),m.endPosition=d.calculateTimePosition(m.end,null,!0),u.past.modified(),u.current.modified(),u.future.modified(),c&&c.modified(),f&&f.modified(),d.updateTime().modified(),d.modified())},this._update=function(){return b.call(d),(d.dataTime().timestamp()>=d.buildTime().timestamp()||d.updateTime().timestamp()<=d.timestamp())&&d._build(),d.updateTime().modified(),d},this.draw=function(){var t=g();return u&&(u.past.draw(),u.current.draw(),u.future.draw()),c&&c.draw(),f&&f.draw(),t},this.modified=function(){var t=x();return u&&(u.past.modified(),u.current.modified(),u.future.modified()),c&&c.modified(),f&&f.modified(),t},this.style=function(t,e,n){return"style"===(n=n||"style")?_(t,e):void 0===t?p[n]:"string"==typeof t&&void 0===e?(p[n]||{})[t]:(void 0===p[n]&&(p[n]={}),void 0===e?p[n]=r.extend(!0,p[n],t):p[n][t]=e,d.modified(),d)},this.style.get=_.get,["markerStyle","textStyle","pastStyle","currentStyle","futureStyle"].forEach((function(t){d[t]=function(e,n){return d.style(e,n,t)}})),this.track=function(t){return void 0===t?d.style("track"):(d.style("track",t),d.dataTime().modified(),d.modified(),d)},this.position=function(t){return void 0===t?d.style("position"):(d.style("position",t),d.dataTime().modified(),d.modified(),d)},this.time=function(t){return void 0===t?d.style("time"):(d.style("time",t),d.dataTime().modified(),d.modified(),d)},this.timeRange=function(t){if(void 0===t)return{startTime:m.startTime,endTime:m.endTime,duration:m.duration,start:m.start,end:m.end,minimum:(m.timeExtents||{}).start,maximum:(m.timeExtents||{}).end};var e=!1;return void 0!==t.startTime&&t.startTime!==m.startTime&&(m.startTime=null===t.startTime?t.startTime:+t.startTime,e=!0),void 0!==t.endTime&&t.endTime!==m.endTime&&(m.endTime=null===t.endTime?t.endTime:+t.endTime,e=!0),void 0!==t.duration&&t.duration!==m.duration&&(m.duration=null===t.duration?t.duration:+t.duration,e=!0),e&&d._updateTimeAndPosition(),d},this.startTime=function(t){return void 0===t?m.startTime:(t!==m.startTime&&(m.startTime=null===t?t:+t,d._updateTimeAndPosition()),d)},this.endTime=function(t){return void 0===t?m.endTime:(t!==m.endTime&&(m.endTime=null===t?t:+t,d._updateTimeAndPosition()),d)},this.duration=function(t){return void 0===t?m.duration:(t!==m.duration&&(m.duration=null===t?t:+t,d._updateTimeAndPosition()),d)},this._mergeSearchResults=function(t,e){return t.extra=t.extra||{},e.forEach((function(e){return e.value.index.forEach((function(n,r){t.index.indexOf(n)<0&&(t.index.push(n),t.found.push(e.value.found[r]),t.where=t.where||{},e.value.extra&&e.value.extra[n]&&(t.extra[n]=e.value.extra[n]),a.isObject(t.extra[n])||(t.extra[n]={value:t.extra[n]}),t.extra[n].where=e.key)}))})),t},this.pointSearch=function(t){var e=u.current.pointSearch(t),n=u.past.pointSearch(t),r=u.future.pointSearch(t),i=c?c.pointSearch(t):{index:[]};return this._mergeSearchResults(e,[{key:"marker",value:i},{key:"past",value:n},{key:"future",value:r}])},this.polygonSearch=function(t,e){var n=u.current.polygonSearch(t,e),r=u.past.polygonSearch(t,e),i=u.future.polygonSearch(t,e),o=c?c.polygonSearch(t,e):{index:[]};return this._mergeSearchResults(n,[{key:"marker",value:o},{key:"past",value:r},{key:"future",value:i}])},this._exit=function(){u&&d.layer()&&(d.layer().deleteFeature(u.past),d.layer().deleteFeature(u.current),d.layer().deleteFeature(u.future)),u=null,(l||d.layer())&&c&&(l||d.layer()).deleteFeature(c),l&&d.layer()&&d.layer().removeChild(l),l=null,(h||d.layer())&&f&&(h||d.layer()).deleteFeature(f),h&&d.layer()&&d.layer().removeChild(h),h=null,d.dependentFeatures([]),v()},this._init=function(t){t=t||{},y.call(d,t);var e=r.extend(!0,{},{track:a.identityFunction,position:a.identityFunction,time:function(t,e){return void 0!==t.t?t.t:e},uniformLine:"drop",closed:!1},void 0===t.style?{}:t.style),n=r.extend(!0,{},{rotateWithMap:!0,rotation:function(t,e){return-m.endPosition[e].angle||0}},void 0===t.markerStyle?{}:t.markerStyle),i=r.extend(!0,{},{rotateWithMap:!0,rotation:function(t,e){return void 0!==m.endPosition[e].angle?-m.endPosition[e].angle+Math.PI/2:0}},void 0===t.textStyle?{}:t.textStyle),o=r.extend(!0,{},{strokeOpacity:.25},void 0===t.pastStyle?{}:t.pastStyle),s=r.extend(!0,{},{},void 0===t.currentStyle?{}:t.currentStyle),u=r.extend(!0,{},{strokeOpacity:.25},void 0===t.futureStyle?{}:t.futureStyle);["track","position","time"].forEach((function(n){void 0!==t[n]&&(e[n]=t[n])})),d.style(e),d.markerStyle(n),d.textStyle(i),d.pastStyle(o),d.currentStyle(s),d.futureStyle(u)},this};r(s,i),t.exports=s},6853:function(t,e,n){var r=n(4252),i=n(5365),o=n(5240),a=n(4634);r=r.__esModule?r.default:r;var s=n(1103);s.keys().forEach((function(t){r.Proj.projections.add(s(t))}));var u={},l=/^(.* |)\+axis=e(n|s)u(| .*)$/,c=/(^|\s)\+(s[1-3][1-3]|[xyz]off)=\S/,h=function t(e){"use strict";if(!(this instanceof t))return(e=e||{}).source in u||(Object.keys(u).length>=10&&(u={}),u[e.source]={}),e.target in u[e.source]||(Object.keys(u[e.source]).length>=10&&(u[e.source]={}),u[e.source][e.target]=new t(e)),u[e.source][e.target];var n,s,l,h,f,d,p,m=this,g={s11:0,s12:4,s13:8,xoff:12,s21:1,s22:5,s23:9,yoff:13,s31:2,s32:6,s33:10,zoff:14};function v(t){if(!c.exec(t))return{proj:t};var e,n,r=a.mat4AsArray(),i=[];return t.split(/(\s+)/).forEach((function(t){var e=/^\+(s[1-3][1-3]|[xyz]off)=(.*)$/.exec(t);e?r[g[e[1]]]=parseFloat(e[2]):i.push(t)})),n={proj:i.join(" "),orig:t},(e=o.invert(a.mat4AsArray(),r))?(n.matrix=r,n.inverse=e):console.warn("Affine transform is not invertable and will not be used: "+t),n}function y(){var t=v(m.source()),e=v(m.target()),i=t.proj,o=e.proj;h=t.matrix,f=t.inverse,d=e.matrix,p=e.inverse,n=new r(i,o)}this.source=function(t){return void 0===t?s||"EPSG:4326":(s=t,y(),m)},this.target=function(t){return void 0===t?l||"EPSG:3857":(l=t,y(),m)},this._forward=function(t){if(h){var e=i.transformMat4(a.vec3AsArray(),[t.x,t.y,t.z||0],f);t={x:e[0],y:e[1],z:e[2]}}var r=n.forward(t,!0);if(r.z=t.z||0,d){var o=i.transformMat4(a.vec3AsArray(),[r.x,r.y,r.z],d);r={x:o[0],y:o[1],z:o[2]}}return r},this._inverse=function(t){if(d){var e=i.transformMat4(a.vec3AsArray(),[t.x,t.y,t.z||0],p);t={x:e[0],y:e[1],z:e[2]}}var r=n.inverse(t,!0);if(r.z=t.z||0,h){var o=i.transformMat4(a.vec3AsArray(),[r.x,r.y,r.z],h);r={x:o[0],y:o[1],z:o[2]}}return r},this.forward=function(t){return Array.isArray(t)?t.map(m._forward):m._forward(t)},this.inverse=function(t){return Array.isArray(t)?t.map(m._inverse):m._inverse(t)},e=e||{};try{this.source(e.source)}catch(t){console.error("Can't use transform source: "+e.source),this.source("EPSG:4326")}try{this.target(e.target)}catch(t){console.error("Can't use transform target: "+e.target),this.target("EPSG:3857")}return this};h.defs=r.defs,h.lookup=function(t){var e,i,o=n(5638),a=o.Deferred();return r.defs.hasOwnProperty(t)?a.resolve(r.defs[t]):2!==(i=t.split(":")).length||"EPSG"!==i[0].toUpperCase()?a.reject("Invalid projection code").promise():(e=i[1],o.ajax({url:"https://epsg.io/?q="+e+"&format=json"}).done((function(e){var n=(e.results||[])[0];return n&&n.proj4?(r.defs(t,n.proj4),o.when(r.defs[t])):a.reject(e).promise()})))},h.transformCoordinates=function(t,e,n,r){"use strict";if(t===e||Array.isArray(n)&&!n.length)return n;if(Array.isArray(n)&&n.length>=3&&3===r&&!a.isObject(n[0])&&!c.test(t)&&!c.test(e))return h.transformCoordinatesFlatArray3(t,e,n);if(Array.isArray(n)&&n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]){var i=t.match(l),o=e.match(l);if(i&&o&&i[1]===o[1]&&i[3]===o[3])return"z"in n[0]?n.map((function(t){return{x:+t.x,y:-t.y,z:+t.z||0}})):n.map((function(t){return{x:+t.x,y:-t.y}}))}var s,u=h({source:t,target:e});return a.isObject(n)&&"x"in n&&"y"in n?(s=u.forward({x:+n.x,y:+n.y,z:+n.z||0},!0),"z"in n?s:{x:s.x,y:s.y}):Array.isArray(n)&&1===n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]?(s=u.forward({x:+n[0].x,y:+n[0].y,z:+n[0].z||0},!0),"z"in n[0]?[s]:[{x:s.x,y:s.y}]):h.transformCoordinatesArray(u,n,r)},h.transformCoordinatesArray=function(t,e,n){var r,i,o,s,u,l,c,h,f,d={};function p(){if(Array.isArray(e[0]))if(2===e[0].length)s=function(t){return+e[t][0]},u=function(t){return+e[t][1]},c=function(t,e,n){h[t]=[e,n]};else{if(3!==e[0].length)throw new Error("Invalid coordinates. Requires two or three components per array");s=function(t){return+e[t][0]},u=function(t){return+e[t][1]},l=function(t){return+e[t][2]},c=function(t,e,n,r){h[t]=[e,n,r]}}else if(2===e.length)o=2,s=function(t){return+e[t*o]},u=function(t){return+e[t*o+1]},c=function(t,e,n){h[t]=e,h[t+1]=n};else if(3===e.length)o=3,s=function(t){return+e[t*o]},u=function(t){return+e[t*o+1]},l=function(t){return+e[t*o+2]},c=function(t,e,n,r){h[t]=e,h[t+1]=n,h[t+2]=r};else{if(!n)throw new Error("Invalid coordinates");if(2!==n&&3!==n)throw new Error("Number of components should be two or three");o=n,s=function(t){return+e[t]},u=function(t){return+e[t+1]},2===n?c=function(t,e,n){h[t]=e,h[t+1]=n}:(l=function(t){return+e[t+2]},c=function(t,e,n,r){h[t]=e,h[t+1]=n,h[t+2]=r})}}if(l=function(){return 0},!Array.isArray(e))throw new Error("Coordinates are not valid");if((h=[]).length=e.length,i=e.length,!e.length)return h;for(Array.isArray(e[0])||a.isObject(e[0])?(o=1,Array.isArray(e[0])?p():a.isObject(e[0])&&function(){if(!(e[0]&&"x"in e[0]&&"y"in e[0]))throw new Error("Invalid coordinates");s=function(t){return+e[t].x},u=function(t){return+e[t].y},"z"in e[0]?(l=function(t){return+e[t].z},c=function(t,e,n,i){h[r]={x:e,y:n,z:i}}):c=function(t,e,n){h[t]={x:e,y:n}}}()):p(),r=0;r<i;r+=o)d.x=s(r),d.y=u(r),d.z=l(r),f=t.forward(d,!0),c(r,f.x,f.y,f.z);return h},h.transformCoordinatesFlatArray3=function(t,e,n){"use strict";var i,o=t.match(l),a=e.match(l);if(o&&a&&o[1]===a[1]&&o[3]===a[3]){for(i=n.length-3+1;i>=0;i-=3)n[i]*=-1;return n}var s,u=r.Proj(t),c=r.Proj(e),h={},f=new r(u,c);for(i=n.length-3;i>=0;i-=3)h.x=+n[i],h.y=+n[i+1],h.z=+(n[i+2]||0),s=f.forward(h,!0),n[i]=s.x,n[i+1]=s.y,n[i+2]=void 0===s.z?h.z:s.z;return n},h.affineForward=function(t,e){"use strict";var n,r=t.origin,i=t.scale||{x:1,y:1,z:1};for(n=0;n<e.length;n+=1)e[n].x=(e[n].x-r.x)*i.x,e[n].y=(e[n].y-r.y)*i.y,e[n].z=((e[n].z||0)-(r.z||0))*i.z;return e},h.affineInverse=function(t,e){"use strict";var n,r=t.origin,i=t.scale||{x:1,y:1,z:1};for(n=0;n<e.length;n+=1)e[n].x=e[n].x/i.x+r.x,e[n].y=e[n].y/i.y+r.y,e[n].z=(e[n].z||0)/i.z+(r.z||0);return e},h.sphericalDistance=function(t,e,n,i,o){if(i=i||"EPSG:4326",o=o||r.WGS84,(n=n||i)!==i){var a=h.transformCoordinates(n,i,[t,e]);t=a[0],e=a[1]}var s=t.y*Math.PI/180,u=e.y*Math.PI/180,l=(e.x-t.x)*Math.PI/180,c=Math.sin(s),f=Math.cos(s),d=Math.sin(u),p=Math.cos(u),m=Math.atan2(Math.pow(Math.pow(p*Math.sin(l),2)+Math.pow(f*d-c*p*Math.cos(l),2),.5),c*d+f*p*Math.cos(l));return o.a*m},h.vincentyDistance=function(t,e,n,i,o,a){if(i=i||"EPSG:4326",o=o||r.WGS84,a=a||100,(n=n||i)!==i){var s=h.transformCoordinates(n,i,[t,e]);t=s[0],e=s[1]}var u,l,c,f,d,p,m,g,v,y,x=o.a,_=o.b||o.a*(1-(o.f||1/o.rf)),b=o.f||(o.rf?1/o.rf:1-_/x),M=t.y*Math.PI/180,w=e.y*Math.PI/180,A=((e.x-t.x)%360+360)%360*Math.PI/180,T=Math.atan((1-b)*Math.tan(M)),C=Math.atan((1-b)*Math.tan(w)),E=Math.sin(T),k=Math.cos(T),S=Math.sin(C),P=Math.cos(C),O=A,L=A+2*Math.PI;if(M===w&&!A)return{distance:0,alpha1:0,alpha2:0};for(y=a;y>0&&Math.abs(O-L)>1e-12;y-=1)u=Math.pow(Math.pow(P*Math.sin(O),2)+Math.pow(k*S-E*P*Math.cos(O),2),.5),l=E*S+k*P*Math.cos(O),c=Math.atan2(u,l),f=k*P*Math.sin(O)/u,L=O,O=A+(1-(m=b/16*(d=1-Math.pow(f,2))*(4+b*(4-3*d))))*b*f*(c+m*u*((p=l-(d?2*E*S/d:0))+m*l*(2*Math.pow(p,2)-1)));return y?{distance:_*(1+(g=d*(x*x-_*_)/(_*_))/16384*(4096+g*(g*(320-175*g)-768)))*(c-(v=g/1024*(256+g*(g*(74-47*g)-128)))*u*(p+v/4*(l*(2*Math.pow(p,2)-1)-v/6*p*(4*u*u-3)*(4*Math.pow(p,2)-3)))),alpha1:Math.atan2(P*Math.sin(O),k*S-E*P*Math.cos(O)),alpha2:Math.atan2(k*Math.sin(O),-E*P+k*S*Math.cos(O))}:void 0},h.onlyInvertedY=function(t,e){var n=t.match(l),r=e.match(l);return n&&r&&n[1]===r[1]&&n[3]===r[3]},h.proj4=r,t.exports=h},3762:function(t){t.exports={}},9219:function(t,e,n){var r=n(2531).d3,i=n(9450),o=n(5699),a=n(4647).registerWidget,s=n(4634),u=n(1946);n(2352);var l=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var n=this,o=[],a=e.width||300,l=e.ticks||6,h=this._init;return this._init=function(){h();var t=n.canvas();r.select(t).attr("class","color-legend-container"),n.popup=r.select(t).append("div").attr("class","color-legend-popup"),e.categories&&n.categories(e.categories)},this._draw=function(){if(r.select(n.canvas()).selectAll("div.geojs-color-legends").remove(),o.length){r.select(n.canvas()).style("display","block");var t=r.select(n.canvas()).append("div").attr("class","geojs-color-legends"),e=a;o.forEach((function(r,i){var o=t.append("div").attr("class","geojs-color-legend");o.append("div").attr("class","geojs-title").text(r.name);var a=o.append("svg").attr({class:"svg",width:e,height:"40px",viewBox:"-20 0 "+e+" 40"});"discrete"===r.type?n._drawDiscrete(a,e-40,r):"continuous"===r.type&&n._drawContinous(a,e-40,r)}))}else r.select(n.canvas()).style("display","none")},this.categories=function(t){return void 0===t?o:(o=n._prepareCategories(t),n._draw(),n)},this.addCategories=function(t){return o=o.concat(n._prepareCategories(t)),n._draw(),n},this.removeCategories=function(t){return o=o.filter((function(e){return-1===t.indexOf(e)})),n._draw(),n},this._prepareCategories=function(t){return t.forEach((function(t){t.color=t.colors.map((function(t){return s.convertColorToHex(t,!0)}))})),t},this._drawDiscrete=function(t,e,i){if(-1===["linear","log","sqrt","pow","quantile","ordinal"].indexOf(i.scale))throw new Error("unsupported scale");var o,a,u,h,f,d,p;if("ordinal"===i.scale)u=r.scale.ordinal().domain(i.domain).range(i.colors),n._renderDiscreteColors(t,i.domain,u,e,(function(t){return t})),h=r.scale.ordinal().domain(i.domain).rangeRoundBands([0,e]),f=r.svg.axis().scale(h).tickValues((function(){var t=Math.ceil(i.domain.length/l);return i.domain.filter((function(e,n){return n%t==0}))}));else if("quantile"===i.scale){o=[0,i.colors.length],d=s.range(0,i.colors.length-1),a=r.scale.quantile().domain(i.domain).range(d),u=r.scale.quantize().domain(o).range(i.colors),n._renderDiscreteColors(t,d,u,e,(function(t){return a.invertExtent(t).join(" - ")}));var m=[a.invertExtent(0)[0]];m=m.concat(d.map((function(t){return a.invertExtent(t)[1]}))),f=v(h=r.scale.ordinal().domain(m).rangePoints([0,e]))}else if(-1!==["linear","log","sqrt","pow"].indexOf(i.scale)){o=[0,i.colors.length],a=r.scale[i.scale]().domain(i.domain).range(o).nice(),u=r.scale.quantize().domain(o).range(i.colors),d=s.range(0,i.colors.length-1);var g=Math.max.apply(null,i.domain.map((function(t){return c(t)})));n._renderDiscreteColors(t,d,u,e,(function(t){return n._popupFormatter(a.invert(t),g)+" - "+n._popupFormatter(a.invert(t+1),g)})),(p=d.slice()).push(i.colors.length),f=v(h=r.scale.ordinal().domain(p.map((function(t){return a.invert(t)}))).rangePoints([0,e]))}function v(t){return r.svg.axis().scale(t).tickFormat(r.format(".2s")).tickValues((function(){var e=Math.ceil(t.domain().length/l);return t.domain().filter((function(t,n){return n%e==0}))}))}i.endAxisLabelOnly&&f.tickValues([h.domain()[0],h.domain()[h.domain().length-1]]),n._renderAxis(t,f)},this._renderDiscreteColors=function(t,e,r,i,o){t.selectAll("rect").data(e).enter().append("rect").attr("width",i/e.length).attr("height","20px").attr("fill",(function(t){return r(t)})).attr("transform",(function(t,n){return"translate("+n*i/e.length+" ,0)"})).on("mousemove",(function(t){n._showPopup(o(t))})).on("mouseout",n._hidePopup)},this._drawContinous=function(t,e,i){var o,a,s;if(-1===["linear","log","sqrt","pow"].indexOf(i.scale))throw new Error("unsupported scale");var h=[0];for(s=1;s<i.domain.length-1;s++)h.push(e/(i.domain.length-1)*s);h.push(e),o=r.scale[i.scale]().domain(i.domain).range(h).nice(),"log"===i.scale&&i.base&&o.base(i.base),"pow"===i.scale&&i.exponent&&o.exponent(i.exponent);var f=u(),d=Math.max.apply(null,i.domain.map((function(t){return c(t)}))),p=t.append("defs").append("linearGradient").attr("id","gradient"+f);for(p.append("stop").attr("offset","0%").attr("stop-color",i.colors[0]),s=1;s<i.colors.length-1;s++)p.append("stop").attr("offset",(100/(i.colors.length-1)*s).toFixed(6)+"%").attr("stop-color",i.colors[s]);p.append("stop").attr("offset","100%").attr("stop-color",i.colors[i.colors.length-1]),t.append("rect").attr("fill","url(#gradient"+f+")").attr("width",e).attr("height","20px").on("mousemove",(function(){var t=o.invert(r.mouse(this)[0]),e=n._popupFormatter(t,d);n._showPopup(e)})).on("mouseout",n._hidePopup),a=r.svg.axis().scale(o).ticks(l,".2s"),i.endAxisLabelOnly&&a.tickValues([i.domain[0],i.domain[i.domain.length-1]]),n._renderAxis(t,a)},this._renderAxis=function(t,e){t.append("g").attr("class","axis x").attr("transform","translate(0, 20)").call((function(t){t.call(e)}))},this._popupFormatter=function(t,e){return t=parseFloat(t.toFixed(8)),e=Math.min(e,c(t)),e=Math.min(e,Math.max(3,7-Math.trunc(t).toString().length)),r.format("."+e+"f")(t)},this._showPopup=function(t){var e=r.mouse(n.canvas());n.popup.text(t);var i=n.canvas().clientWidth,o=n.popup[0][0].clientWidth;n.popup.style({left:e[0]-(e[0]+o-i>-10?o:0)+"px",top:e[1]-22+"px"}).transition().duration(200).style("opacity",1)},this._hidePopup=function(){n.popup.transition().duration(200).style("opacity",0)},this};function c(t){if(!isFinite(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;){if(!isFinite(t*e))return 0;e*=10,n++}return n}o(l,i),a("dom","colorLegend",l),t.exports=l},9450:function(t,e,n){var r=n(8123),i=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var n=this;return this._init=function(){return e.hasOwnProperty("parent")&&e.parent.addChild(n),n._createCanvas(),n._appendCanvasToParent(),n.canvas().addEventListener("mousedown",(function(t){t.stopPropagation()})),n.reposition(),n},this._createCanvas=function(){n.canvas(document.createElement(e.el||"div"))},this};i(a,r),o("dom","dom",a),t.exports=a},253:function(t,e,n){t.exports={colorLegendWidget:n(9219),domWidget:n(9450),legendWidget:n(4364),scaleWidget:n(3362),sliderWidget:n(7093),svgWidget:n(9731),uiLayer:n(6408),widget:n(8123)}},4364:function(t,e,n){var r=n(9731),i=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i=n(2531).d3,o=n(5108),a=this,s=[],u=null,l=null,c=null;this.categories=function(t){return void 0===t?s.slice():(s=t.slice().map((function(t){return"line"===t.type&&(t.style.fill=!1,t.style.stroke=!0),t})),a.draw(),a)},this.size=function(){var t,e=1,n=i.select(a.canvas()).append("text").style("opacity",1e-6);return s.forEach((function(t){n.text(t.name),e=Math.max(e,n.node().getBBox().width)})),n.remove(),t=20*(s.length+1),{width:e+50,height:t}},this.draw=function(){function t(t){t.style("fill",(function(t){return t.style.fill||void 0===t.style.fill?t.style.fillColor:"none"})).style("fill-opacity",(function(t){return void 0===t.style.fillOpacity?1:t.style.fillOpacity})).style("stroke",(function(t){return t.style.stroke||void 0===t.style.stroke?t.style.strokeColor:"none"})).style("stroke-opacity",(function(t){return void 0===t.style.strokeOpacity?1:t.style.strokeOpacity})).style("stroke-width",(function(t){return void 0===t.style.strokeWidth?1.5:t.style.strokeWidth}))}a._init(),c.attr("height",a.size().height+24).style("display",null);var e=a._scale(),n=l.selectAll("g.geo-label").data(s,(function(t){return t.name})).enter().append("g").attr("class","geo-label").attr("transform",(function(t,n){return"translate(0,"+e.y(n)+")"}));return t(n.filter((function(t){return"point"!==t.type&&"line"!==t.type})).append("rect").attr("x",0).attr("y",-6).attr("rx",5).attr("ry",5).attr("width",40).attr("height",12)),t(n.filter((function(t){return"point"===t.type})).append("circle").attr("cx",20).attr("cy",0).attr("r",6)),t(n.filter((function(t){return"line"===t.type})).append("line").attr("x1",0).attr("y1",0).attr("x2",40).attr("y2",0)),n.append("text").attr("x","50px").attr("y",0).attr("dy","0.3em").text((function(t){return t.name})),a.reposition(),a},this._scale=function(){return{x:i.scale.linear().domain([0,1]).range([0,a.size().width]),y:i.scale.linear().domain([0,s.length-1]).range([6,a.size().height-6])}},this._init=function(){u||(a._createCanvas(),a._appendCanvasToParent());var t=a.size().width+24+4,e=a.size().height+24+4;u&&u.remove(),i.select(a.canvas()).attr("width",t).attr("height",e),u=i.select(a.canvas()).append("g"),l=u.append("g").attr("transform","translate("+[14,14]+")"),c=l.append("rect").attr("x",-12).attr("y",-12).attr("width",t-4).attr("height",e-4).attr("rx",3).attr("ry",3).style({stroke:"black","stroke-width":"1.5px",fill:"white","fill-opacity":.75,display:"none"}),l.on("mousedown",(function(){i.event.stopPropagation()})),l.on("mouseover",(function(){c.transition().duration(250).style("fill-opacity",1)})),l.on("mouseout",(function(){c.transition().duration(250).style("fill-opacity",.75)})),a.reposition()},this.geoOn(o.resize,(function(){a.draw()}))};i(a,r),o("dom","legend",a),t.exports=a},3362:function(t,e,n){var r=n(5638),i=n(5699),o=n(9731),a=n(4647).registerWidget;n(4129);var s=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e);var i=n(5108),a=n(6853),s=n(4634),u=n(2531).d3,l=this,c=this._exit,h=r.extend({},{scale:1,maxWidth:200,maxHeight:"left"===e.orientation||"right"===e.orientation?200:20,orientation:"bottom",strokeWidth:2,tickLength:10,units:"si",distance:function(t,e,n){return"+proj=longlat +axis=enu"===n?Math.sqrt(s.distance2dSquared(t,e)):a.sphericalDistance(t,e,n)}},e);this._init=function(){return l._createCanvas(),l._appendCanvasToParent(),l.reposition(),u.select(l.canvas()).attr({width:h.maxWidth,height:h.maxHeight}),l.geoOn(i.pan,l._update),l._render(),l},this._exit=function(){l.geoOff(i.pan,l._update),c()},this._vertical=function(){return"left"===h.orientation||"right"===h.orientation},this._scaleValue=function(e,n,r){var i,o,a,s=[{multiple:1,digits:1},{multiple:1.5,digits:2},{multiple:2,digits:1},{multiple:3,digits:1},{multiple:5,digits:1},{multiple:8,digits:1}],u=(r=t.unitsTable[r]||r||t.unitsTable[h.units]||h.units)[0];return r.forEach((function(t){e>=t.scale*(t.minimum||1)&&(u=t)})),o=Math.floor(Math.log(e/u.scale)/Math.log(u.basis||10)),(s=u.multiples||s).forEach((function(t){var n=u.scale*t.multiple*Math.pow(10,o);n<=e&&(i=t,a=n)})),{html:(i.multiple*Math.pow(10,o)).toFixed(Math.max(0,-o+i.digits-1))+" "+u.unit,value:a,pixels:a/e*n,power:o,multiple:i,unitRecord:u,originalValue:e,originalPixels:n}},this._render=function(){var t,e,n,i,o,a,s=u.select(l.canvas()),c=l.layer().map(),f=h.maxWidth,d=h.maxHeight,p=h.strokeWidth,m=.5*p,g=h.tickLength,v=l._vertical();if(t=(v?h.maxHeight:h.maxWidth)-p,n={x:(e={x:(e=r(s[0][0]).offset()).left+("left"===h.orientation?f-m:m),y:e.top+("top"===h.orientation?d-m:m)}).x+(v?0:t),y:e.y+(v?t:0)},(i=h.distance(c.displayToGcs(e,null),c.displayToGcs(n,null),c.gcs())*h.scale)<=0||!isFinite(i))console.warn("The distance calculated for the scale is invalid: "+i);else{switch(o=l._scaleValue(i,t),v?d=o.pixels+p:f=o.pixels+p,s.attr({width:f,height:d}),s.select("polyline").empty()&&s.append("polyline").classed("geojs-scale-widget-bar",!0).attr({fill:"none","stroke-width":p}),s.select("text").empty()&&s.append("text").classed("geojs-scale-widget-text",!0),h.orientation){case"bottom":a=[[m,g],[m,m],[f-m,m],[f-m,g]],s.select("text").attr({x:f/2,y:2*p,"text-anchor":"middle","dominant-baseline":"hanging"});break;case"top":a=[[m,d-g],[m,d-m],[f-m,d-m],[f-m,d-g]],s.select("text").attr({x:f/2,y:d-2*p,"text-anchor":"middle","dominant-baseline":"alphabetic"});break;case"left":a=[[f-g,m],[f-m,m],[f-m,d-m],[f-g,d-m]],s.select("text").attr({x:f-2*p,y:d/2,"text-anchor":"end","dominant-baseline":"middle"});break;case"right":a=[[g,m],[m,m],[m,d-m],[g,d-m]],s.select("text").attr({x:2*p,y:d/2,"text-anchor":"start","dominant-baseline":"middle"})}s.select("polyline").attr("points",a.map((function(t){return t.join(",")})).join(" ")),s.select("text").html(o.html)}},this._update=function(){l._render()},this.options=function(t,e){if(void 0===t){var n=r.extend({},h);return n.position=l.position(void 0,!0),n}return"string"==typeof t&&void 0===e?"position"===t?l.position(void 0,!0):h[t]:(void 0===e?h=r.extend(!0,h,t):h[t]=e,(t.position||"position"===t)&&l.position(t.position||e),l._render(),l)}};i(s,o),s.unitsTable={si:[{unit:"nm",scale:1e-9},{unit:"μm",scale:1e-6},{unit:"mm",scale:.001},{unit:"m",scale:1},{unit:"km",scale:1e3}],miles:[{unit:"in",scale:.0254},{unit:"in",scale:.0254,basis:12,multiples:[{multiple:1,digits:1},{multiple:1.5,digits:2},{multiple:2,digits:1},{multiple:3,digits:1},{multiple:6,digits:1},{multiple:9,digits:1}]},{unit:"ft",scale:.3048},{unit:"mi",scale:1609.344}],decmiles:[{unit:"mi",scale:1609.344}]},s.areaUnitsTable={si:[{unit:"nm²",scale:1e-18},{unit:"μm²",scale:1e-12},{unit:"mm²",scale:1e-6},{unit:"m²",scale:1},{unit:"km²",scale:1e6}],hectares:[{unit:"ha",scale:1e4}],decmiles:[{unit:"mi²",scale:2589988.110336}],miles:[{unit:"in²",scale:64516e-8},{unit:"ft²",scale:.09290304},{unit:"mi²",scale:2589988.110336}],acres:[{unit:"pl",scale:25.29285264},{unit:"rd",scale:1011.7141056},{unit:"ac",scale:4046.8564224}]},s.formatUnit=function(t,e,n,r){if(null!=t){if(!Array.isArray(e)){if(!(n=n||s.unitsTable)||!n[e||"si"])return;e=n[e||"si"]}var i;for(i=0;i<e.length-1&&!(t<e[i+1].scale);i+=1);if(t/=(e=e[i]).scale,!((r=Math.max(0,-Math.ceil(Math.log10(t))+(void 0===r||r<0?3:r)))>10)){var o=t.toFixed(r);if(r){for(;"0"===o.substr(o.length-1);)o=o.substr(0,o.length-1);"."===o.substr(o.length-1)&&(o=o.substr(0,o.length-1))}return o+" "+e.unit}}},a("dom","scale",s),t.exports=s},7093:function(t,e,n){var r=n(9731),i=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i,o,a,s,u,l,c,h=n(2531).d3,f=n(5108),d=this,p=this._exit,m=e.width||20,g=e.height||160,v=e.width?.5*e.width:10;function y(t,e,n,r,i){var o=e.append("g"),a=i/1024;return o.append("g").append("g").attr("transform","translate("+n+","+r+") scale("+a+") translate(-512,-512)").append("path").attr("d",t).attr("class","geo-glyphicon"),o}c={white:"#f4f4f4",black:"#505050"},this.size=function(){return{width:m,height:g}},this._init=function(){d._createCanvas(),d._appendCanvasToParent(),d.reposition();var t=h.select(d.canvas()),e=d.layer().map();function n(n,r){var i=o.invert(h.mouse(t.node())[1]),a=e.zoomRange();i=(1-i)*(a.max-a.min)+a.min,r?e.transition({zoom:i,ease:h.ease("cubic-in-out"),duration:500,done:d._update()}):(e.zoom(i),d._update()),n.stopPropagation()}function r(){h.select(this).attr("filter",null),l.selectAll("circle,rect,path").transition().duration(100).style("fill",(function(t){return c[t.fill]||null})).style("stroke",(function(t){return c[t.stroke]||null}))}return t.attr("width",m).attr("height",g),i=h.scale.linear().domain([-4,4]).range([0,m]),o=h.scale.linear().domain([0,1]).range([1.5*m,g-1.5*m]),t=t.append("g").classed("geo-ui-slider",!0),l=t,(a=t.append("g")).append("circle").datum({fill:"white",stroke:null}).classed("geo-zoom-in",!0).attr("cx",i(0)).attr("cy",o(0)-m+2).attr("r",(m-2)/2).style({cursor:"pointer"}).on("click",(function(){var t=e.zoom();e.transition({zoom:t+1,ease:h.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){h.event.stopPropagation()})),y("M512 81.92c-237.568 0-430.080 192.614-430.080 430.080 0 237.568 192.563 430.080 430.080 430.080s430.080-192.563 430.080-430.080c0-237.517-192.563-430.080-430.080-430.080zM564.326 564.326v206.182h-104.653v-206.182h-206.234v-104.653h206.182v-206.234h104.704v206.182h206.182v104.704h-206.182z",a,i(0),o(0)-m+2,m+4).style("cursor","pointer").style("pointer-events","none").select("path").datum({fill:"black",stroke:null}),(s=t.append("g")).append("circle").datum({fill:"white",stroke:null}).classed("geo-zoom-out",!0).attr("cx",i(0)).attr("cy",o(1)+m-2).attr("r",(m-2)/2).style({cursor:"pointer"}).on("click",(function(){var t=e.zoom();e.transition({zoom:t-1,ease:h.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){h.event.stopPropagation()})),y("M512 81.92c-237.568 0-430.080 192.614-430.080 430.080 0 237.568 192.563 430.080 430.080 430.080s430.080-192.563 430.080-430.080c0-237.517-192.563-430.080-430.080-430.080zM770.56 459.674v104.704h-517.12v-104.704h517.12z",s,i(0),o(1)+m-2,m+4).style("cursor","pointer").style("pointer-events","none").select("path").datum({fill:"black",stroke:null}),t.append("rect").datum({fill:"white",stroke:"black"}).classed("geo-zoom-track",!0).attr("x",i(0)-m/6).attr("y",o(0)).attr("rx",m/10).attr("ry",m/10).attr("width",m/3).attr("height",g-3*m).style({cursor:"pointer"}).on("click",(function(){n(h.event,!0)})),u=t.append("rect").datum({fill:"black",stroke:null}).classed("geo-zoom-nub",!0).attr("x",i(-4)).attr("y",o(.5)-v/2).attr("rx",3).attr("ry",3).attr("width",m).attr("height",v).style({cursor:"pointer"}).on("mousedown",(function(){h.select(document).on("mousemove.geo.slider",(function(){n(h.event)})),h.select(document).on("mouseup.geo.slider",(function(){n(h.event),h.select(document).on(".geo.slider",null)})),h.event.stopPropagation()})),l.selectAll("*").on("mouseover",(function(){h.select(this).attr("filter","url(#geo-highlight)"),l.selectAll("rect,path,circle").transition().duration(100).style("fill",(function(t){return t.fill||null})).style("stroke",(function(t){return t.stroke||null}))})).on("mouseout",r),d.geoOn(f.zoom,d._update),r(),d._update(),d},this._exit=function(){d.geoOff(f.zoom,d._update),l.remove(),p()},this._update=function(t){var e=d.layer().map(),n=e.zoomRange(),r=e.zoom(),i=h.scale.linear();r=(t=t||{}).value||r,i.domain([n.min,n.max]).range([1,0]).clamp(!0),u.attr("y",o(i(r))-v/2)}};i(a,r),o("dom","slider",a),t.exports=a},9731:function(t,e,n){var r=n(8123),i=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i=n(2531),o=this,a=this._exit,s=null;return this._init=function(){var t;return e.hasOwnProperty("parent")&&(e.parent.addChild(o),t=e.parent.canvas()),o._createCanvas(t),o.canvas().addEventListener("mousedown",(function(t){t.stopPropagation()})),o.reposition(),o},this._exit=function(){s&&s._exit(),a()},this._createCanvas=function(t){var e={layer:o.layer(),widget:!0};t&&(e.d3Parent=t),(s=i(e))._resize=function(){},o.canvas(s.canvas()[0][0])},this};i(a,r),o("dom","svg",a),t.exports=a},6408:function(t,e,n){var r=n(5699),i=n(4647).registerLayer,o=n(9105),a=function t(e){"use strict";var r=n(4647).createWidget;if(e.renderer="dom",e.sticky=!1,!(this instanceof t))return new t(e);o.call(this,e);var i=this,a=this._exit;this.createWidget=function(t,e){var n=r(t,i,e);return e&&"parent"in e||i.addChild(n),n._init(e),i.modified(),n},this.deleteWidget=function(t){return t._exit(),i.removeChild(t),i.modified(),i},this._exit=function(){i.children().forEach((function(t){i.deleteWidget(t)})),a()}};r(a,o),i("ui",a),t.exports=a},8123:function(t,e,n){var r=n(5699),i=n(5358),o=n(5638),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},i.call(this,e);var r=n(5108),a=this,s=this._exit,u=e.layer,l=null,c=void 0===e.position?{left:0,top:0}:e.position;if(!(void 0===e.parent||e.parent instanceof t))throw new Error("Parent must be of type geo.gui.widget");e.parent&&a.parent(e.parent),this._init=function(){return a.modified(),a},this._exit=function(){if(a.children().forEach((function(t){a.removeChild(t),t._exit()})),a.layer().geoOff(r.pan,a.repositionEvent),a.parentCanvas().removeChild&&a.canvas())try{a.parentCanvas().removeChild(a.canvas())}catch(t){}s()},this.layer=function(){return u||a.parent()&&a.parent().layer()},this._createCanvas=function(){throw new Error("Must be defined in derived classes")},this.canvas=function(t){return void 0===t?l:(l=t,a)},this._appendCanvasToParent=function(){a.parentCanvas().appendChild(a.canvas())},this.parentCanvas=function(){return a.parent()?a.parent().canvas():a.layer().canvas()},this.position=function(t,e){if(void 0!==t){a.layer().geoOff(r.pan,a.repositionEvent);var n={};for(var i in c)c.hasOwnProperty(i)&&(n[i]=null);return(c=t).hasOwnProperty("x")&&c.hasOwnProperty("y")&&a.layer().geoOn(r.pan,a.repositionEvent),a.reposition(o.extend(n,a.position())),a}if(c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&!e){var s=a.layer().map().gcsToDisplay(c);return{left:s.x,top:s.y,right:null,bottom:null}}return c},this.reposition=function(t){if(t=t||a.position(),a.canvas()&&a.canvas().style)for(var e in a.canvas().style.position="absolute",t)t.hasOwnProperty(e)&&(/^\s*(-|\+)?(\d+(\.\d*)?|\d*\.\d+)([eE](-|\+)?\d+)?\s*$/.test(t[e])?a.canvas().style[e]=parseFloat(parseFloat(t[e]).toFixed(3))+"px":a.canvas().style[e]=t[e]);return a},this.repositionEvent=function(){return a.reposition()},this.isInViewport=function(){var t=a.position(),e=a.layer();return t.left>=0&&t.top>=0&&t.left<=e.width()&&t.top<=e.height()},c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&this.layer().geoOn(r.pan,a.repositionEvent)};r(a,i),t.exports=a},9808:function(t,e,n){var r=n(5638);function i(t,e,n){this._group=t,this._zoom=e,this._points=[],this._clusters=[],this._count=0,this._parent=null,this._coord=null;var r=this;(n||[]).forEach((function(t){r._add(t)}))}function o(t){var e,o,a=n(5844);for(this._opts=r.extend({maxZoom:18,radius:5},t),this._clusters={},this._points={},e=this._opts.maxZoom;e>=0;e-=1)o=this._opts.radius*Math.pow(2,-e),this._clusters[e]=new a(o),this._points[e]=new a(o);this._topClusterLevel=new i(this,-1)}i.prototype._add=function(t){var e=1;t instanceof i?(this._clusters.push(t),e=t._count):this._points.push(t),t._parent=this,this._increment(e)},i.prototype._increment=function(t){this._coord=null,this._count+=t,this._parent&&this._parent._increment(t)},i.prototype.count=function(){return this._count},i.prototype.each=function(t){var e;for(e=0;e<this._points.length;e+=1)t.call(this,this._points[e],this._zoom);for(e=0;e<this._clusters.length;e+=1)this._clusters[e].each.call(this._clusters[e],t)},i.prototype.coords=function(){var t,e={x:0,y:0};if(this._coord)return this._coord;for(t=0;t<this._points.length;t+=1)e.x+=this._points[t].x,e.y+=this._points[t].y;for(t=0;t<this._clusters.length;t+=1)e.x+=this._clusters[t].coords().x*this._clusters[t].count(),e.y+=this._clusters[t].coords().y*this._clusters[t].count();return{x:e.x/this.count(),y:e.y/this.count()}},o.prototype.addPoint=function(t){var e,n,o,a,s,u;for(e=this._opts.maxZoom;e>=0;e-=1){if(n=this._clusters[e].getNearObject(t))return void n._add(t);if(n=this._points[e].getNearObject(t)){if(o=n._parent)for(u=o._points.length-1;u>=0;u-=1)if(o._points[u]===n){o._points.splice(u,1),o._increment(-1);break}for(o||r.noop(),a=new i(this,e,[n,t]),this._clusters[e].addObject(a,a.coords()),s=a,u=e-1;u>o._zoom;u-=1)s=new i(this,u,[s]),this._clusters[u].addObject(s,s.coords());for(o._add(s),u=e;u>=0&&this._points[u].removeObject(n,n);u-=1);return}this._points[e].addObject(t,t)}this._topClusterLevel._add(t)},o.prototype.points=function(t){return t=Math.min(Math.max(Math.floor(t),0),this._opts.maxZoom-1),this._points[Math.floor(t)].contents()},o.prototype.clusters=function(t){return t=Math.min(Math.max(Math.floor(t),0),this._opts.maxZoom-1),this._clusters[Math.floor(t)].contents()},t.exports=o},7566:function(t,e,n){var r=n(8340),i=n(1485);i=i.__esModule?i.default:i;var o={maxCount:1e3,count:0,memo:{}};function a(t,e){return o.count+=1,o.count>=o.maxCount&&(o.memo={},o.count=0),o.memo[t]=e,e}var s={convertColor:function(t){if(null==t||void 0!==t.r&&void 0!==t.g&&void 0!==t.b)return t;if(void 0!==o.memo[t])return o.memo[t];var e,n=t;if("string"==typeof t){var r=t.toLowerCase();if(i.hasOwnProperty(r))t={r:i[r][0]/255,g:i[r][1]/255,b:i[r][2]/255};else if("#"===t.charAt(0))4===t.length||5===t.length?(5===t.length&&(e=parseInt(t.slice(4),16)/15),t=4352*(3840&(t=parseInt(t.slice(1,4),16)))+272*(240&t)+17*(15&t)):7!==t.length&&9!==t.length||(9===t.length&&(e=parseInt(t.slice(7),16)/255),t=parseInt(t.slice(1,7),16));else if("transparent"===r)e=t=0;else if(r.indexOf("(")>=0)for(var u=0;u<s.cssColorConversions.length;u+=1){var l=s.cssColorConversions[u].regex.exec(r);if(l)return a(n,t=s.cssColorConversions[u].process(r,l))}}return isFinite(t)&&(t={r:((16711680&t)>>16)/255,g:((65280&t)>>8)/255,b:(255&t)/255}),void 0!==e&&t&&void 0!==t.r&&(t.a=e),a(n,t)},convertColorAndOpacity:function(t,e,n){return(t=s.convertColor(t))&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b||(t=s.convertColor(n||{r:0,g:0,b:0})),t&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b||(t={r:0,g:0,b:0}),t={r:isFinite(t.r)&&t.r>=0?t.r<=1?+t.r:1:0,g:isFinite(t.g)&&t.g>=0?t.g<=1?+t.g:1:0,b:isFinite(t.b)&&t.b>=0?t.b<=1?+t.b:1:0,a:r.isNonNullFinite(t.a)&&t.a>=0&&t.a<1?+t.a:1},r.isNonNullFinite(e)&&e<1&&(t.a=e<=0?0:t.a*e),t},convertColorToHex:function(t,e){var n,r=s.convertColor(t);return n=r.r||r.g||r.b?"#"+((1<<24)+(Math.round(255*r.r)<<16)+(Math.round(255*r.g)<<8)+Math.round(255*r.b)).toString(16).slice(1):"#000000",void 0!==r.a&&e&&(r.a<1||"needed"!==e)&&(n+=(256+Math.round(255*r.a)).toString(16).slice(1)),n},convertColorToRGBA:function(t){var e=s.convertColor(t);return e||(e={r:0,g:0,b:0}),(!r.isNonNullFinite(e.a)||e.a>1)&&(e.a=1),"rgba("+Math.round(255*e.r)+", "+Math.round(255*e.g)+", "+Math.round(255*e.b)+", "+ +(+e.a).toFixed(5)+")"},cssAngleUnitsBase:{deg:360,grad:400,rad:2*Math.PI,turn:1},cssNumberRegex:"[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?"};s.cssColorConversions=[{name:"rgb",regex:new RegExp("^\\s*rgba?\\(\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*,?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*,?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*([/,]?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*)?\\)\\s*$"),process:function(t,e){return t={r:Math.min(1,Math.max(0,+e[1]/(e[2]?100:255))),g:Math.min(1,Math.max(0,+e[3]/(e[4]?100:255))),b:Math.min(1,Math.max(0,+e[5]/(e[6]?100:255)))},e[7]&&(t.a=Math.min(1,Math.max(0,+e[8]/(e[9]?100:1)))),t}},{name:"hsl",regex:new RegExp("^\\s*hsla?\\(\\s*("+s.cssNumberRegex+")\\s*(deg|grad|rad|turn)?\\s*,?\\s*("+s.cssNumberRegex+")\\s*%\\s*,?\\s*("+s.cssNumberRegex+")\\s*%\\s*([/,]?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*)?\\)\\s*$"),process:function(t,e){var n=function(t,e,n){return 6*(n-=Math.floor(n))<1?t+(e-t)*n*6:6*n<3?e:6*n<4?t+(e-t)*(2/3-n)*6:t},r=+e[1]/(s.cssAngleUnitsBase[e[2]]||360),i=Math.min(1,Math.max(0,+e[3]/100)),o=Math.min(1,Math.max(0,+e[4]/100)),a=o<=.5?o*(i+1):o+i-o*i,u=2*o-a;return t={r:n(u,a,r+1/3),g:n(u,a,r),b:n(u,a,r-1/3)},e[5]&&(t.a=Math.min(1,Math.max(0,+e[6]/(e[7]?100:1)))),t}}],t.exports=s},8340:function(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}var i=n(5638),o=n(4252);o=o.__esModule?o.default:o;var a,s,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",l='<svg xmlns="http://www.w3.org/2000/svg"><foreignObject width="100%" height="100%"></foreignObject></svg>',c={},h=200,f=15;function d(){var t;for(t=0;t<arguments.length;t+=1)if(isFinite(arguments[t]))return arguments[t]}var p={pointInPolygon:function(t,e,n,r){return e.outer&&(n=e.inner,e=e.outer),!(e.length<3)&&(!(r&&r.min&&r.max&&(t.x<r.min.x||t.y<r.min.y||t.x>r.max.x||t.y>r.max.y))&&p.distanceToPolygon2d(t,n?{outer:e,inner:n}:e,!0)>0)},pointToTriangleBasis2d:function(t,e,n,r){var i=n.x-e.x,o=r.x-e.x,a=n.y-e.y,s=r.y-e.y,u=t.x-e.x,l=t.y-e.y,c=i*s-o*a;if(c)return{x:(u*s-l*o)/c,y:(u*-a+l*i)/c}},isReadyImage:function(t,e){return!!(t instanceof Image&&t.complete&&t.src&&(t.naturalWidth&&t.naturalHeight||e))},isReadyVideo:function(t,e){return!!(t instanceof HTMLVideoElement&&t.src&&void 0!==t.HAVE_CURRENT_DATA&&(t.videoWidth&&t.videoHeight&&t.readyState>=t.HAVE_CURRENT_DATA||e&&t.error))},isFunction:function(t){return"function"==typeof t},ensureFunction:function(t){return p.isFunction(t)?t:function(){return t}},isNonNullFinite:function(t){return isFinite(t)&&null!==t&&!1!==t&&""!==t},randomString:function(t){var e,n,r;for(t=t||8,e="",n=0;n<t;n+=1)r=Math.floor(62*Math.random()),e+=u.substring(r,r+1);return e},normalizeCoordinates:function(t){return t=t||{},Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:{x:d(t.x,t.longitude,t.lng,t.lon,0),y:d(t.y,t.latitude,t.lat,0),z:d(t.z,t.elevation,t.elev,t.height,0)}},range:function(t,e,n){n=n||1;for(var r=[],i=t;i<=e;i+=n)r.push(i);return r},compareArrays:function(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))},vec3AsArray:function(){return[0,0,0]},mat3AsArray:function(){return[1,0,0,0,1,0,0,0,1]},mat4AsArray:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},getGeomBuffer:function(t,e,n,r,i){r=void 0===r?.2:r,i=void 0===i?.1:i;var o=t.sourceByName(e),a=o.data(),s=Math.floor((r+1)*n);if((a=o.data())instanceof Float32Array&&(a.length===n||a.length>=n&&a.length<=s))return a;var u=n;return a instanceof Float32Array&&a.length&&n&&i>0&&(u=Math.floor((i+1)*n)),a=new Float32Array(u),o.setData(a),a},adjustActions:function(t){var e,n;for(n=0;n<t.length;n+=1){if(e=t[n],"string"===i.type(e.input)){var r={};r[e.input]=!0,e.input=r}if(e.modifiers||(e.modifiers={}),"string"===i.type(e.modifiers)){var o={};o[e.modifiers]=!0,e.modifiers=o}}},addAction:function(t,e,n){n?t.push(e):t.unshift(e),p.adjustActions(t)},hasAction:function(t,e,n,r){e&&e.action&&(n=e.name,r=e.owner,e=e.action);for(var i=0;i<t.length;i+=1)if(!(e&&t[i].action!==e||n&&t[i].name!==n||r&&t[i].owner!==r))return t[i];return null},removeAction:function(t,e,n,r){var o,a=0;do{(o=p.hasAction(t,e,n,r))&&(t.splice(i.inArray(o,t),1),a+=1)}while(o);return a},actionMatch:function(t,e,n){var r;if(n.some((function(n){for(var i in n.input)if(n.input.hasOwnProperty(i)&&(!1===n.input[i]&&t[i]||n.input[i]&&!t[i]))return!1;for(var o in n.modifiers)if(n.modifiers.hasOwnProperty(o)&&(!1===n.modifiers[o]&&e[o]||n.modifiers[o]&&!e[o]))return!1;return r=n,!0})))return r},pixelCoordinateParams:function(t,e,n,r,o){var a,s,u;t&&(a=(t=i(t)).innerWidth(),s=t.innerHeight()),o=o||n,u=(r=r||e)!==e||o!==n;var l=Math.min(0,Math.floor(Math.log(Math.min((a||r)/r,(s||o)/o))/Math.log(2))),c=Math.ceil(Math.log(Math.max(e/r,n/o))/Math.log(2));return{map:{node:t,ingcs:"+proj=longlat +axis=esu",gcs:"+proj=longlat +axis=enu",maxBounds:{left:0,top:0,right:e,bottom:n},unitsPerPixel:Math.pow(2,c),center:{x:e/2,y:n/2},min:l,max:c,zoom:l,clampBoundsX:!0,clampBoundsY:!0,clampZoom:!0},layer:{maxLevel:c,wrapX:!1,wrapY:!1,tileOffset:function(){return{x:0,y:0}},attribution:"",tileWidth:r,tileHeight:o,tileRounding:Math.ceil,tilesAtZoom:u?function(t){var i=Math.pow(2,c-t);return{x:Math.ceil(e/r/i),y:Math.ceil(n/o/i)}}:void 0,tilesMaxBounds:u?function(t){var r=Math.pow(2,c-t);return{x:Math.floor(e/r),y:Math.floor(n/r)}}:void 0}}},centerFromPerimeter:function(t){var e,n,r,i,o,a;if(t&&t.outer&&(t=t.outer),t&&t.length){if(1===t.length)return{x:t[0].x,y:t[0].y};for(e={x:0,y:0},o=0,n=t[t.length-1],a=0;a<t.length;a+=1)r=n,n=t[a],i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2)),e.x+=(n.x+r.x)*i,e.y+=(n.y+r.y)*i,o+=2*i;return e.x/=o,e.y/=o,o?e:{x:n.x,y:n.y}}},distance2dSquared:function(t,e){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},distance2dToLineSquared:function(t,e,n){var r=n.x-e.x,i=n.y-e.y,o=r*r+i*i,a=0;return o&&(a=((t.x-e.x)*r+(t.y-e.y)*i)/o,a=Math.max(0,Math.min(1,a))),p.distance2dSquared(t,{x:e.x+a*r,y:e.y+a*i})},distanceToPolygon2d:function(t,e,n){for(var r,i,o=e.outer||e,a=!1,s=0,u=o.length,l=u-1;s<u;l=s,s+=1){var c=o[s],h=o[l];c.y>t.y!=h.y>t.y&&t.x<(h.x-c.x)*(t.y-c.y)/(h.y-c.y)+c.x&&(a=!a),i=n?1:p.distance2dToLineSquared(t,c,h),(void 0===r||i<r)&&(r=i)}return e.inner&&e.inner.forEach((function(e){var i=p.distanceToPolygon2d(t,e,n);i*i<r&&(r=i*i),i>0&&(a=!a)})),(a?1:-1)*Math.sqrt(r)},triangleTwiceSignedArea2d:function(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)},crossedLineSegmentPolygon2d:function(t,e,n){var r,i,o=n.outer||n,a=o.length;for(r=0,i=a-1;r<a;i=r,r+=1)if(p.crossedLineSegments2d(t,e,o[r],o[i]))return!0;if(n.inner)for(r=0;r<n.inner.length;r+=1)if(p.crossedLineSegmentPolygon2d(t,e,n.inner[r]))return!0;return!1},crossedLineSegments2d:function(t,e,n,r){return!(t.x>n.x&&t.x>r.x&&e.x>n.x&&e.x>r.x||t.x<n.x&&t.x<r.x&&e.x<n.x&&e.x<r.x||t.y>n.y&&t.y>r.y&&e.y>n.y&&e.y>r.y||t.y<n.y&&t.y<r.y&&e.y<n.y&&e.y<r.y)&&(!(t.x===n.x&&t.y===n.y||t.x===r.x&&t.y===r.y||e.x===n.x&&e.y===n.y||e.x===r.x&&e.y===r.y)&&!(p.triangleTwiceSignedArea2d(t,e,n)*p.triangleTwiceSignedArea2d(t,e,r)>0||p.triangleTwiceSignedArea2d(n,r,t)*p.triangleTwiceSignedArea2d(n,r,e)>0))},segmentCrossesLineList2d:function(t,e,n){return n.some((function(n){return n.some((function(r,i){return!!i&&p.crossedLineSegments2d(t,e,n[i-1],r)}))}))},rdpLineSimplify:function(t,e,n,r){if(t.length<=2||e<0)return t;var i,o,a,s=-1,u=e*e;if(n){for(i=1;i<t.length;i+=1)(o=p.distance2dSquared(t[0],t[i]))>s&&(s=o,a=i);return 4*s<=u?t.slice(a,a+1):(t=t.slice(a).concat(t.slice(0,a+1)),(t=p.rdpLineSimplify(t,e,!1,r)).splice(t.length-1),t)}for(i=1;i<t.length-1;i+=1)(o=p.distance2dToLineSquared(t[i],t[0],t[t.length-1]))>s&&(s=o,a=i);if(s<=u&&(!r||!p.segmentCrossesLineList2d(t[0],t[t.length-1],r)))return[t[0],t[t.length-1]];var l=t.slice(0,a+1),c=t.slice(a),h=p.rdpLineSimplify(l,e,!1,r?r.concat([c]):null),f=p.rdpLineSimplify(c,e,!1,r?r.concat([l]):null);return h.slice(0,h.length-1).concat(f)},getMinMaxValues:function(t,e,n,r){if(t.length&&(r||!i.isNumeric(e)||!i.isNumeric(n))){var o,a,s=t[0],u=t[0];for(a=t.length-1;a>0;a-=1)(o=t[a])<s&&(s=o),o>u&&(u=o);(!i.isNumeric(e)||r&&s>e)&&(e=s),(!i.isNumeric(n)||r&&u<n)&&(n=u)}return{min:e,max:n}},wrapAngle:function(t){return(t%=2*Math.PI)<-Math.PI?t+=2*Math.PI:t>=Math.PI&&(t-=2*Math.PI),t},escapeUnicodeHTML:function(t){return t.replace(/./g,(function(t){var e=t.charCodeAt(0);return e<127?t:"&#"+e.toString(10)+";"}))},dereferenceElements:function(t){var e=[];return i("img,image",t).each((function(){var t=i(this),n=t.is("image")?"href":"src";if(t.attr(n)){var r=new Image;("http"===t.attr(n).substr(0,4)||t[0].crossOrigin)&&(r.crossOrigin=t[0].crossOrigin||"anonymous");var o=i.Deferred();r.onload=function(){var e=document.createElement("canvas");e.width=r.naturalWidth,e.height=r.naturalHeight,e.getContext("2d").drawImage(r,0,0),t.attr(n,e.toDataURL("image/png")),"data:image"!==t.attr(n).substr(0,10)&&t.remove(),o.resolve()},r.onerror=function(){t.remove(),o.resolve()},r.src=t.attr(n),e.push(o)}})),e},dereferenceCssUrlsRegex:/url\(["']?(http[^)"']+|[^:)"']+)["']?\)/g,dereferenceCssUrls:function(t,e,n,r,o){var a=[],s=[];if(t=(t=t.replace(/\/\*[^\0]*?\*\//g,"")).replace(/\r/g,"\n").replace(/\s+\n/g,"\n").replace(/\n\s+/g,"\n").replace(/\n\n+/g,"\n"),o){var u=/(^[^?#]*)\/[^?#/]*([?#]|$)/g.exec(o);o=u&&u[1]?u[1]+"/":null}t.replace(p.dereferenceCssUrlsRegex,(function(t,e){var n=a.length,r=i.Deferred(),u=new XMLHttpRequest;return a.push(r),s.push(""),/^[^/:][^:]*(\/|$)/g.exec(e)&&o&&(e=o+e),u.open("GET",e,!0),u.responseType="arraybuffer",u.onload=function(){if(200===this.status){var t,e=new Uint8Array(this.response),i=new Array(e.length);for(t=0;t<e.length;t+=1)i[t]=String.fromCharCode(e[t]);i=i.join(""),s[n]="url(data:"+u.getResponseHeader("content-type")+";base64,"+btoa(i)+")"}r.resolve()},u.onerror=r.resolve,u.send(),t})),i.when.apply(i,a).then((function(){var i=0;t=t.replace(p.dereferenceCssUrlsRegex,(function(t,e){return s[(i+=1)-1]})),void 0===r?e.text(t):e.style[r]=t,n.resolve()}))},htmlToImageSupported:function(){if(void 0===s){var t=i.Deferred(),e=i(l);e.attr({width:"10px",height:"10px","text-rendering":"optimizeLegibility"}),i("foreignObject",e).append("<div/>");var n=new Image;return n.onload=n.onerror=function(){var e=document.createElement("canvas");e.width=10,e.height=10,e.getContext("2d").drawImage(n,0,0);try{e.toDataURL(),s=!0}catch(t){console.warn("This browser does not support converting HTML to an image via SVG foreignObject. Some functionality will be limited.",t),s=!1}t.resolve(s)},n.src="data:image/svg+xml;base64,"+btoa(p.escapeUnicodeHTML((new XMLSerializer).serializeToString(e[0]))),t}return s},htmlToImage:function(t,e){var n,r=i.Deferred(),o=[p.htmlToImageSupported()],a=i(t);for(t=i(t).clone();e&&e>0;)(a=a.parent()).is("div")&&((n=i("<div>").attr({class:a.attr("class"),id:a.attr("id")}).css({width:"100%",height:"100%",background:"none",margin:0})).append(t),t=n),e-=1;i("canvas",t).remove(),i("*",t).addBack().each((function(){for(var t=this.style,e=0;e<t.length;e+=1){var n=this.style[e];if(this.style[n].match(p.dereferenceCssUrlsRegex)){var r=i.Deferred();p.dereferenceCssUrls(this.style[n],this,r,n),o.push(r)}}})),(n=i('<div xmlns="http://www.w3.org/1999/xhtml">')).css({width:a.width()+"px",height:a.height()+"px"}),n.append(i("<head>"));var s=i("<body>");return n.append(s),s.css({width:a.width()+"px",height:a.height()+"px",background:"none",margin:0}),s.append(t),o=o.concat(p.dereferenceElements(t)),i('style,link[rel="stylesheet"]').each((function(){var t=i('<style type="text/css">'),e=i.Deferred();if(i(this).is("style")){var r=i(this).text();p.dereferenceCssUrls(r,t,e)}else{var a=i(this).attr("href");i.get(a).done((function(n){p.dereferenceCssUrls(n,t,e,void 0,a)})).fail((function(n,r,i){console.warn("Failed to dereference "+a,r,i),t.remove(),e.resolve()}))}o.push(e),i("head",n).append(t)})),i.when.apply(i,o).then((function(){var t=i(l);t.attr({width:a.width()+"px",height:a.height()+"px","text-rendering":"optimizeLegibility"}),i("foreignObject",t).append(n);var e=new Image;p.htmlToImageSupported()?(e.onload=function(){r.resolve(e)},e.onerror=function(){console.warn("Failed to render html to image"),r.reject()},e.src="data:image/svg+xml;base64,"+btoa(p.escapeUnicodeHTML((new XMLSerializer).serializeToString(t[0])))):r.resolve(e)})),r},timeReport:function(t){return i.each(c,(function(t,e){e.count?(e.stddev=Math.sqrt(Math.abs((e.sum2-e.sum*e.sum/e.count)/e.count)),e.average=e.sum/e.count):(e.stddev=0,e.average=0)})),t?c[t]:c},timeFunctionStart:function(t,e){c[t]&&!e||(c[t]={count:0,sum:0,sum2:0,max:0,recent:[]}),c[t].start=window.performance.now()},timeFunctionStop:function(t){if(c[t]&&c[t].start){var e=window.performance.now()-c[t].start;c[t].start=null,c[t].sum+=e,c[t].sum2+=e*e,c[t].count+=1,c[t].max=Math.max(c[t].max,e),c[t].recent.push(e),c[t].recent.length>h&&c[t].recent.splice(0,c[t].recent.length-h)}},timeRequestAnimationFrame:function(t,e,n,r){c.requestAnimationFrame&&!e||(c.requestAnimationFrame={count:0,sum:0,sum2:0,max:0,above_threshold:0,recent:[],recentsub:[]}),n&&(f=n),r&&(h=r),t&&a?(window.requestAnimationFrame=a,a=null):t||a||(a=window.requestAnimationFrame,window.requestAnimationFrame=function(t){return a.call(window,(function(e){var n,r=c.requestAnimationFrame;r.timestamp!==e&&(r.nowDelta=window.performance.now()-e,Math.abs(r.nowDelta)<1e3&&(r.nowDelta=0),r.timestamp=e,r.subcalls=r.subcalls||0,r.start={sum:r.sum,sum2:r.sum2,count:r.count,max:r.max,above_threshold:r.above_threshold},r.recent.push([0]),r.recentsub.push([]),r.recent.length>h&&(r.recent.splice(0,r.recent.length-h),r.recentsub.splice(0,r.recentsub.length-h))),r.subcalls+=1,t.apply(this,arguments);var i=window.performance.now()-e;i-=r.nowDelta,r.sum=r.start.sum+i,r.sum2=r.start.sum2+i*i,r.count=r.start.count+1,r.max=Math.max(r.max,i),r.above_threshold=r.start.above_threshold+(i>=f?1:0),r.recent[r.recent.length-1]=i,(n=r.recentsub[r.recent.length-1]).push({total_duration:i,duration:i-(n.length?n[n.length-1].total_duration:0),callback:t.name||t})}))})},isObject:function(t){var e=r(t);return null!=t&&("object"===e||"function"===e)},identityFunction:function(t){return t},radiusEarth:o.WGS84.a};t.exports=p},5844:function(t,e,n){var r=n(5638),i={};i.Util={stamp:function(t){return t._leaflet_id=t._leaflet_id||++i.Util.lastId,t._leaflet_id},lastId:0};var o=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}};o.prototype={addObject:function(t,e){var n=this._getCoord(e.x),r=this._getCoord(e.y),o=this._grid,a=o[r]=o[r]||{},s=a[n]=a[n]||[],u=i.Util.stamp(t);e.obj=t,this._objectPoint[u]=e,s.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var n,r,o=this._getCoord(e.x),a=this._getCoord(e.y),s=this._grid,u=s[a]=s[a]||{},l=u[o]=u[o]||[];for(delete this._objectPoint[i.Util.stamp(t)],n=0,r=l.length;n<r;n++)if(l[n]===t)return l.splice(n,1),1===r&&delete u[o],!0},eachObject:function(t,e){var n,r,i,o,a,s,u=this._grid;for(n in u)for(r in a=u[n])for(i=0,o=(s=a[r]).length;i<o;i++)t.call(e,s[i])&&(i--,o--)},getNearObject:function(t){var e,n,r,o,a,s,u,l,c=this._getCoord(t.x),h=this._getCoord(t.y),f=this._objectPoint,d=this._sqCellSize,p=null;for(e=h-1;e<=h+1;e++)if(o=this._grid[e])for(n=c-1;n<=c+1;n++)if(a=o[n])for(r=0,s=a.length;r<s;r++)u=a[r],(l=this._sqDist(f[i.Util.stamp(u)],t))<d&&(d=l,p=u);return p},contents:function(){return r.map(this._objectPoint,(function(t){return t}))},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r}},t.exports=o},4634:function(t,e,n){t.exports=Object.assign(n(8340),n(7566),n(9215),n(895),{DistanceGrid:n(5844),ClusterGroup:n(9808),mesh:n(9244),polyops:n(6771)})},9244:function(t,e,n){t.exports={createColoredMesh:function(t,e){var r,i,o,a,s,u=n(5638),l=n(4634),c=t.mesh,h=t.style.get("value"),f={used:void 0!==t.style("used")?t.style.get("used"):function(t,e){return l.isNonNullFinite(h(t,e))},opacity:t.style.get("opacity"),value:h},d=t._createMesh(e?{}:f,e?f:{});if(d.elementValues=!!e,!d.numVertices||!d.numElements)return d;var p=c.get("stepped")(d),m=c.get("opacityRange")(d),g=c.get("rangeValues")(d);if(d.stepped=!(void 0!==p&&!p),d.colorMap=[],d.minColor=u.extend({a:c.get("minOpacity")(d)||0},l.convertColor(c.get("minColor")(d))),d.maxColor=u.extend({a:c.get("maxOpacity")(d)||0},l.convertColor(c.get("maxColor")(d))),c.get("colorRange")(d).forEach((function(t,e){d.colorMap.push(u.extend({a:m&&void 0!==m[e]?m[e]:1},l.convertColor(t)))})),r=l.getMinMaxValues(d.value,c.get("min")(d),c.get("max")(d)),d.minValue=r.min,d.maxValue=r.max,g&&d.colorMap&&(g.length===d.colorMap.length+1||!p&&g.length===d.colorMap.length)||(g=null),g)for(s=1;s<g.length;s+=1)if(g[s-1]>g[s]){g=null;break}for(g&&(d.minValue=g[0],d.maxValue=g[g.length-1]),(o=d.maxValue-d.minValue)||(d.colorMap=d.colorMap.slice(0,1),o=1,g=null),d.rangeValues=g,d.factor=(d.colorMap.length-(p?0:1))/o,a=0;a<d.value.length;a+=1)if(i=d.value[a],g&&i>=d.minValue&&i<=d.maxValue){for(s=1;s<g.length;s+=1)if(i<=g[s]){d.value[a]=s-1+(i-g[s-1])/(g[s]-g[s-1]);break}}else d.value[a]=(i-d.minValue)*d.factor;return d}}},895:function(t,e,n){var r,i,o=n(5638),a=n(2254);t.exports={},t.exports.mockWebglRenderer=function(t){"use strict";var e=n(5140);if(void 0===t&&(t=!0),e._mocked)throw new Error("webgl renderer already mocked");var s={},u=function(t){s[t]=(s[t]||0)+1},l=function(t){return function(){u(t)}},c=0,h=function(t){return function(){return u(t),c+=1}},f={activeTexture:l("activeTexture"),attachShader:l("attachShader"),bindAttribLocation:l("bindAttribLocation"),bindBuffer:l("bindBuffer"),bindFramebuffer:l("bindFramebuffer"),bindTexture:l("bindTexture"),blendFuncSeparate:l("blendFuncSeparate"),bufferData:l("bufferData"),bufferSubData:l("bufferSubData"),checkFramebufferStatus:function(t){if(u("checkFramebufferStatus"),t===e.GL.FRAMEBUFFER)return e.GL.FRAMEBUFFER_COMPLETE},clear:l("clear"),clearColor:l("clearColor"),clearDepth:l("clearDepth"),compileShader:l("compileShader"),createBuffer:h("createBuffer"),createFramebuffer:l("createFramebuffer"),createProgram:h("createProgram"),createShader:h("createShader"),createTexture:h("createTexture"),deleteBuffer:l("deleteBuffer"),deleteProgram:l("deleteProgram"),deleteShader:l("deleteShader"),deleteTexture:l("deleteTexture"),detachShader:l("detachShader"),depthFunc:l("depthFunc"),disable:l("disable"),disableVertexAttribArray:l("disableVertexAttribArray"),drawArrays:l("drawArrays"),enable:l("enable"),enableVertexAttribArray:l("enableVertexAttribArray"),finish:l("finish"),getError:l("getError"),getExtension:h("getExtension"),getParameter:function(t){switch(u("getParameter"),t){case e.GL.ALIASED_POINT_SIZE_RANGE:return[1,64];case e.GL.DEPTH_BITS:return 16;case e.GL.MAX_TEXTURE_SIZE:return 4096}},getProgramParameter:function(t,n){if(u("getProgramParameter"),n===e.GL.LINK_STATUS)return!0},getShaderInfoLog:function(){return u("getShaderInfoLog"),"log"},getShaderParameter:function(t,n){if(u("getShaderParameter"),n===e.GL.COMPILE_STATUS)return!0},getSupportedExtensions:function(){return u("getSupportedExtensions"),[]},getUniformLocation:h("getUniformLocation"),isEnabled:function(t){if(u("isEnabled"),t===e.GL.BLEND)return!0},linkProgram:l("linkProgram"),pixelStorei:l("pixelStorei"),shaderSource:l("shaderSource"),texImage2D:l("texImage2D"),texParameteri:l("texParameteri"),uniform1iv:l("uniform1iv"),uniform1fv:l("uniform1fv"),uniform2fv:l("uniform2fv"),uniform3fv:l("uniform3fv"),uniform4fv:l("uniform4fv"),uniformMatrix3fv:l("uniformMatrix3fv"),uniformMatrix4fv:l("uniformMatrix4fv"),useProgram:l("useProgram"),vertexAttribPointer:l("vertexAttribPointer"),vertexAttrib3fv:l("vertexAttrib3fv"),viewport:l("viewport")};r=e.renderWindow;e.renderWindow=function t(){e.renderWindow=r;var n,i=new e.renderWindow;return e.renderWindow=t,i._setup=function(){var t,r=i.renderers(),a=i.windowSize(),s=i.windowPosition();for(n=o.extend({},e.GL,f),t=0;t<r.length;t+=1)(r[t].width()>a[0]||0===r[t].width()||r[t].height()>a[1]||0===r[t].height())&&r[t].resize(s[0],s[1],a[0],a[1]);return!0},i.context=function(){return n},i},i=a.supported,a.supported=function(){return!!t},a._maxTextureSize=4096,a._maxPointSize=64,e._mocked=!0,e.mockCounts=function(){return s}},t.exports.restoreWebglRenderer=function(){var t=n(5140);t._mocked&&(t.renderWindow=r,a.supported=i,delete t._mocked,delete t.mockCounts)}},6771:function(t,e,n){function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var o=n(3291),a=n(2804),s=n(8340),u={"+":"union","|":"union",add:"union","-":"difference",sub:"difference",subtract:"difference",minus:"difference","*":"intersect","&":"intersect",mul:"intersect",multiply:"intersect",x:"xor","^":"xor"};function l(t,e,n){for(t="select"+t.charAt(0).toUpperCase()+t.slice(1),o.epsilon(e);n.length>1;){for(var r=[],i=Math.ceil(n.length/2),a=0;a<i;a+=1){var s=n[a];if(a+i<n.length){var u=n[a+i];try{s=o.combine(s,u)}catch(t){s=o.segments(o.polygon(s)),u=o.segments(o.polygon(u));for(var l=20;l>=6;l-=1){o.epsilon(Math.pow(.1,l));try{s=o.combine(s,u);break}catch(t){}}o.epsilon(e)}s.combined?(s.combined=s.combined.filter((function(t){return Math.abs(t.start[0]-t.end[0])>e||Math.abs(t.start[1]-t.end[1])>e})),s=o[t](s)):console.warn("Failed in polygon functions."),s.segments=s.segments.filter((function(t){return Math.abs(t.start[0]-t.end[0])>e||Math.abs(t.start[1]-t.end[1])>e}))}r.push(s)}n=r}return n}function c(t,e,n){if(e=e||{},t.toPolygonList){if(e.style=t,!(t=t.toPolygonList(n)).length)return e.min=e.max=[0,0],e.epsilon=1e-10,t}else{if(e.style="",t.outer?(e.style="-outer",t=[[t.outer].concat(r(t.inner||[]))]):t.length&&t[0].outer&&(e.style="-outer-list",t=t.map((function(t){return[t.outer].concat(r(t.inner||[]))}))),!t.length)return e.style="flat-listlist"+e.style,e.min=e.max=[0,0],e.epsilon=1e-10,t;void 0!==t[0].x?(e.style="object",t=[[t.map((function(t){return[t.x,t.y]}))]]):void 0!==t[0][0].x?(e.style="object-list"+e.style,t=[t.map((function(t){return t.map((function(t){return[t.x,t.y]}))}))]):void 0===t[0][0][0]?(e.style="flat",t=[[t]]):void 0!==t[0][0][0].x?(e.style="object-listlist"+e.style,t=t.map((function(t){return t.map((function(t){return t.map((function(t){return[t.x,t.y]}))}))}))):void 0===t[0][0][0][0]?(e.style="flat-list",t=[t]):e.style="flat-listlist"+e.style}return e.min=[t[0][0][0][0],t[0][0][0][1]],e.max=[t[0][0][0][0],t[0][0][0][1]],t.forEach((function(t){return t.forEach((function(t){return t.forEach((function(t){t[0]<e.min[0]&&(e.min[0]=t[0]),t[0]>e.max[0]&&(e.max[0]=t[0]),t[1]<e.min[1]&&(e.min[1]=t[1]),t[1]>e.max[1]&&(e.max[1]=t[1])}))}))})),e.epsilon=1e-10*Math.max(Math.max(e.max[0],e.max[1]),Math.max(Math.abs(e.min[0]),Math.abs(e.min[1]))),t}function h(t,e,n){return e.style.fromPolygonList?e.style.fromPolygonList(t,n):(e.style.includes("object")&&(t=t.map((function(t){return t.map((function(t){return t.map((function(t){return{x:t[0],y:t[1]}}))}))}))),e.style.includes("outer")&&(t=[t.map((function(t){return{outer:t[0],inner:t.slice(1)}}))]),e.style.endsWith("listlist")||(t=e.style.endsWith("list")?t[0]:t[0][0]),t)}function f(t,e,r,i){var f=n(6853);t=u[t]||t,e.poly1&&(e=(i=e).poly1,r=i.poly2);var d=(i=i||{}).ingcs||(i.map?i.map.ingcs():e.gcs?e.gcs():e.layer&&e.layer().gcs?e.layer().gcs():e.layer?e.layer().map().ingcs():e.map instanceof a?e.map().ingcs():void 0),p=i.ingcs||(i.map?i.map.ingcs():r.gcs?r.gcs():r.layer&&r.layer().gcs?r.layer().gcs():r.layer?r.layer().map().ingcs():r.map instanceof a?r.map().ingcs():d),m=i.gcs||(i.map?i.map.gcs():e.layer?e.layer().map().gcs():e.map instanceof a?e.map().gcs():void 0),g={},v={};e=c(e,g,i),r=c(r,v,i),g.epsilon=i.epsilon1||g.epsilon,v.epsilon=i.epsilon2||g.epsilon,d&&m&&d!==m&&(e=e.map((function(t){return t.map((function(t){return f.transformCoordinates(d,m,t)}))}))),p&&m&&p!==m&&(r=r.map((function(t){return t.map((function(t){return f.transformCoordinates(p,m,t)}))})));var y=e.map((function(t){return o.segments({regions:t})})),x=r.map((function(t){return o.segments({regions:t})}));y=l(i.innerOperation||"union",g.epsilon,y),x=l(i.innerOperation||"union",v.epsilon,x);var _=y;y[0]&&x[0]?(y[0].inverted=!1,x[0].inverted=!1,_=l(t,Math.max(g.epsilon,v.epsilon),[y[0],x[0]])):x[0]&&(_=x);var b,M,w=function(t){var e=[],n=[],r=[],i=[];t.forEach((function(t){return o.polygon(t).regions.forEach((function(t){var e=t.map((function(t){return{x:t[0],y:t[1]}}));e.length<3||(i.push([]),n.forEach((function(t,r){s.pointInPolygon(e[0],t)?i[n.length].push(r):s.pointInPolygon(t[0],e)&&i[r].push(n.length)})),r.push(t),n.push(e))}))}));for(var a=Array(r.length),u=0;u<r.length;){for(var l=0;l<r.length;l+=1)void 0!==a[l]||i[l].length||(a[l]=e.length,e.push([r[l].reverse()]),u+=1);for(var c=0;c<r.length;c+=1)void 0===a[c]&&1===i[c].length&&void 0!==a[i[c][0]]&&(e[a[i[c][0]]].push(r[c]),a[c]=a[i[c][0]],u+=1);for(var h=0;h<r.length;h+=1)i[h]=i[h].filter((function(t){return void 0===a[t]}))}return e.length?e:[[]]}(_);return i.correspond&&function(t,e,n,r){var i={},o=[];n.forEach((function(t,e){return t.forEach((function(t){return t.forEach((function(t){var n="_"+t[0]+"_"+t[1];i[n]?-1===i[n].indexOf(e)&&i[n].push(e):i[n]=[e],o.length<=e&&o.push(0),o[e]+=1}))}))})),["poly1","poly2"].forEach((function(a){var s="poly1"===a?t:e,u="poly1"===a?"exact1":"exact2";r[a]=Array(s.length),r[u]=Array(s.length),s.forEach((function(t,e){var s={},l=0;t.forEach((function(t){return t.forEach((function(t){var e="_"+t[0]+"_"+t[1];i[e]?i[e].forEach((function(t){s[t]=(s[t]||0)+1})):l+=1}))})),Object.keys(s).forEach((function(i){s[i]!==o[+i]||l||t.length!==n[+i].length||(r[u][e]||(r[u][e]=[]),r[u][e].push(+i)),s[i]>=2&&(r[a][e]||(r[a][e]=[]),r[a][e].push(+i))}))}))}))}(e,r,w,i.correspond),d&&m&&d!==m&&(w=w.map((function(t){return t.map((function(t){return f.transformCoordinates(m,d,t)}))}))),h(w,{style:i.style||(b=w,M=g.style,M.fromPolygonList?M:b.length>1?M.includes("outer")?M+(M.endsWith("list")?"":"-list"):M.endsWith("listlist")?M:M+(M.endsWith("list")?"list":"-listlist"):1===b.length&&b[0].length>1?M.includes("outer")||M.endsWith("list")?M:M+"-list":M)},i)}function d(t){return function(e,n,r){return f(t,e,n,r)}}t.exports={union:d("union"),intersect:d("intersect"),difference:d("difference"),xor:d("xor"),toPolygonList:c,fromPolygonList:h}},9215:function(t){var e=function(t,e,n,r,i){var o,a=0;return"boolean"!=typeof e&&(i=r,r=n,n=e,e=void 0),"function"!=typeof r&&(i=r,r=function(){}),function(){var s=this,u=+new Date-a,l=arguments;function c(){a=+new Date,n.apply(s,l)}r.apply(s,l),i&&!o&&c(),o&&clearTimeout(o),void 0===i&&u>t?c():!0!==e&&(o=setTimeout(i?function(){o=void 0}:c,void 0===i?t-u:t))}};t.exports={throttle:e,debounce:function(t,n,r,i){return"boolean"!=typeof n&&(i=r,r=n,n=!1),e(t,!1,r,i=i||function(){},!!n)}}},2623:function(t,e,n){var r=n(5699),i=n(6837),o=n(4634),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638);e=e||{},i.call(this,e);var a=this,s=this._init;this.featureType="vector",this.origin=function(t){return void 0===t?a.style("origin"):(a.style("origin",t),a.dataTime().modified(),a)},this.delta=function(t){return void 0===t?a.style("delta"):(a.style("delta",t),a.dataTime().modified(),a)},this._init=function(t){s.call(a,t);var e=r.extend({},{strokeColor:"black",strokeWidth:2,strokeOpacity:1,originStyle:"none",endStyle:"arrow",origin:{x:0,y:0,z:0},delta:o.identityFunction,scale:null},void 0===t.style?{}:t.style);return void 0!==t.origin&&(e.origin=t.origin),a.style(e),a.dataTime().modified(),a}};r(a,i),t.exports=a},2978:function(t){t.exports="1.11.1"},7514:function(t,e,n){n(5577).GL={ACTIVE_ATTRIBUTES:35721,ACTIVE_TEXTURE:34016,ACTIVE_UNIFORMS:35718,ALIASED_LINE_WIDTH_RANGE:33902,ALIASED_POINT_SIZE_RANGE:33901,ALPHA:6406,ALPHA_BITS:3413,ALWAYS:519,ARRAY_BUFFER:34962,ARRAY_BUFFER_BINDING:34964,ATTACHED_SHADERS:35717,BACK:1029,BLEND:3042,BLEND_COLOR:32773,BLEND_DST_ALPHA:32970,BLEND_DST_RGB:32968,BLEND_EQUATION:32777,BLEND_EQUATION_ALPHA:34877,BLEND_EQUATION_RGB:32777,BLEND_SRC_ALPHA:32971,BLEND_SRC_RGB:32969,BLUE_BITS:3412,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,BROWSER_DEFAULT_WEBGL:37444,BUFFER_SIZE:34660,BUFFER_USAGE:34661,BYTE:5120,CCW:2305,CLAMP_TO_EDGE:33071,COLOR_ATTACHMENT0:36064,COLOR_BUFFER_BIT:16384,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,COMPILE_STATUS:35713,COMPRESSED_TEXTURE_FORMATS:34467,CONSTANT_ALPHA:32771,CONSTANT_COLOR:32769,CONTEXT_LOST_WEBGL:37442,CULL_FACE:2884,CULL_FACE_MODE:2885,CURRENT_PROGRAM:35725,CURRENT_VERTEX_ATTRIB:34342,CW:2304,DECR:7683,DECR_WRAP:34056,DELETE_STATUS:35712,DEPTH_ATTACHMENT:36096,DEPTH_BITS:3414,DEPTH_BUFFER_BIT:256,DEPTH_CLEAR_VALUE:2931,DEPTH_COMPONENT:6402,DEPTH_COMPONENT16:33189,DEPTH_FUNC:2932,DEPTH_RANGE:2928,DEPTH_STENCIL:34041,DEPTH_STENCIL_ATTACHMENT:33306,DEPTH_TEST:2929,DEPTH_WRITEMASK:2930,DITHER:3024,DONT_CARE:4352,DST_ALPHA:772,DST_COLOR:774,DYNAMIC_DRAW:35048,ELEMENT_ARRAY_BUFFER:34963,ELEMENT_ARRAY_BUFFER_BINDING:34965,EQUAL:514,FASTEST:4353,FLOAT:5126,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,FRAGMENT_SHADER:35632,FRAMEBUFFER:36160,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_BINDING:36006,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_UNSUPPORTED:36061,FRONT:1028,FRONT_AND_BACK:1032,FRONT_FACE:2886,FUNC_ADD:32774,FUNC_REVERSE_SUBTRACT:32779,FUNC_SUBTRACT:32778,GENERATE_MIPMAP_HINT:33170,GEQUAL:518,GREATER:516,GREEN_BITS:3411,HIGH_FLOAT:36338,HIGH_INT:36341,INCR:7682,INCR_WRAP:34055,INT:5124,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,INVALID_ENUM:1280,INVALID_FRAMEBUFFER_OPERATION:1286,INVALID_OPERATION:1282,INVALID_VALUE:1281,INVERT:5386,KEEP:7680,LEQUAL:515,LESS:513,LINEAR:9729,LINEAR_MIPMAP_LINEAR:9987,LINEAR_MIPMAP_NEAREST:9985,LINES:1,LINE_LOOP:2,LINE_STRIP:3,LINE_WIDTH:2849,LINK_STATUS:35714,LOW_FLOAT:36336,LOW_INT:36339,LUMINANCE:6409,LUMINANCE_ALPHA:6410,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_CUBE_MAP_TEXTURE_SIZE:34076,MAX_FRAGMENT_UNIFORM_VECTORS:36349,MAX_RENDERBUFFER_SIZE:34024,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_TEXTURE_SIZE:3379,MAX_VARYING_VECTORS:36348,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VIEWPORT_DIMS:3386,MEDIUM_FLOAT:36337,MEDIUM_INT:36340,MIRRORED_REPEAT:33648,NEAREST:9728,NEAREST_MIPMAP_LINEAR:9986,NEAREST_MIPMAP_NEAREST:9984,NEVER:512,NICEST:4354,NONE:0,NOTEQUAL:517,NO_ERROR:0,ONE:1,ONE_MINUS_CONSTANT_ALPHA:32772,ONE_MINUS_CONSTANT_COLOR:32770,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,OUT_OF_MEMORY:1285,PACK_ALIGNMENT:3333,POINTS:0,POLYGON_OFFSET_FACTOR:32824,POLYGON_OFFSET_FILL:32823,POLYGON_OFFSET_UNITS:10752,RED_BITS:3410,RENDERBUFFER:36161,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_BINDING:36007,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_STENCIL_SIZE:36181,RENDERBUFFER_WIDTH:36162,RENDERER:7937,REPEAT:10497,REPLACE:7681,RGB:6407,RGB565:36194,RGB5_A1:32855,RGBA:6408,RGBA4:32854,SAMPLER_2D:35678,SAMPLER_CUBE:35680,SAMPLES:32937,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_BUFFERS:32936,SAMPLE_COVERAGE:32928,SAMPLE_COVERAGE_INVERT:32939,SAMPLE_COVERAGE_VALUE:32938,SCISSOR_BOX:3088,SCISSOR_TEST:3089,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,SHORT:5122,SRC_ALPHA:770,SRC_ALPHA_SATURATE:776,SRC_COLOR:768,STATIC_DRAW:35044,STENCIL_ATTACHMENT:36128,STENCIL_BACK_FAIL:34817,STENCIL_BACK_FUNC:34816,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,STENCIL_BITS:3415,STENCIL_BUFFER_BIT:1024,STENCIL_CLEAR_VALUE:2961,STENCIL_FAIL:2964,STENCIL_FUNC:2962,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_TEST:2960,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STREAM_DRAW:35040,SUBPIXEL_BITS:3408,TEXTURE:5890,TEXTURE0:33984,TEXTURE1:33985,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE2:33986,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE3:33987,TEXTURE30:34014,TEXTURE31:34015,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE_2D:3553,TEXTURE_BINDING_2D:32873,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP:34067,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TRIANGLES:4,TRIANGLE_FAN:6,TRIANGLE_STRIP:5,UNPACK_ALIGNMENT:3317,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNSIGNED_BYTE:5121,UNSIGNED_INT:5125,UNSIGNED_SHORT:5123,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,VALIDATE_STATUS:35715,VENDOR:7936,VERSION:7938,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_SHADER:35633,VIEWPORT:2978,ZERO:0}},9229:function(t,e,n){var r=n(5577),i=n(5699),o=n(5365),a=n(5240);r.actor=function(){"use strict";if(!(this instanceof r.actor))return new r.actor;r.node.call(this);var t=this,e=a.create(),n=r.boundingObject.ReferenceFrame.Relative,i=null;return this.matrix=function(){return e},this.referenceFrame=function(){return n},this.mapper=function(){return i},this.setMapper=function(e){e!==i&&(i=e,t.boundsModified())},this.computeBounds=function(){if(null!=i){var n,r,a,s,u=t.computeBoundsTimestamp();(t.boundsDirtyTimestamp().getMTime()>u.getMTime()||i.boundsDirtyTimestamp().getMTime()>u.getMTime())&&(i.computeBounds(),r=[(n=i.bounds())[0],n[2],n[4]],a=[n[1],n[3],n[5]],o.transformMat4(r,r,e),o.transformMat4(a,a,e),s=[r[0]>a[0]?a[0]:r[0],r[0]>a[0]?r[0]:a[0],r[1]>a[1]?a[1]:r[1],r[1]>a[1]?r[1]:a[1],r[2]>a[2]?a[2]:r[2],r[2]>a[2]?r[2]:a[2]],t.setBounds(s[0],s[1],s[2],s[3],s[4],s[5]),u.modified())}else t.resetBounds()},t},i(r.actor,r.node)},5147:function(t,e,n){var r=n(5577),i=n(5699);r.blendFunction=function(t,e){"use strict";if(!(this instanceof r.blendFunction))return new r.blendFunction(t,e);var n=t,i=e;return this.apply=function(t){t.m_context.blendFuncSeparate(n,i,r.GL.ONE,r.GL.ONE_MINUS_SRC_ALPHA)},this},r.blend=function(){"use strict";if(!(this instanceof r.blend))return new r.blend;r.materialAttribute.call(this,r.materialAttributeType.Blend);var t=!1,e=r.blendFunction(r.GL.SRC_ALPHA,r.GL.ONE_MINUS_SRC_ALPHA);return this.bind=function(n){return t=n.m_context.isEnabled(r.GL.BLEND),this.enabled()?(n.m_context.enable(r.GL.BLEND),e.apply(n)):n.m_context.disable(r.GL.BLEND),!0},this.undoBind=function(e){return t?e.m_context.enable(r.GL.BLEND):e.m_context.disable(r.GL.BLEND),!0},this},i(r.blend,r.materialAttribute)},4818:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.boundingObject=function(){"use strict";if(!(this instanceof r.boundingObject))return new r.boundingObject;r.object.call(this);var t=[0,0,0,0,0,0],e=o(),n=o();return e.modified(),n.modified(),this.bounds=function(){return t},this.hasValidBounds=function(t){return t[0]!==Number.MAX_VALUE&&t[1]!==-Number.MAX_VALUE&&t[2]!==Number.MAX_VALUE&&t[3]!==-Number.MAX_VALUE&&t[4]!==Number.MAX_VALUE&&t[5]!==-Number.MAX_VALUE},this.setBounds=function(n,r,i,o,a,s){if(this.hasValidBounds([n,r,i,o,a,s]))return t[0]=n,t[1]=r,t[2]=i,t[3]=o,t[4]=a,t[5]=s,this.modified(),e.modified(),!0},this.resetBounds=function(){t[0]=Number.MAX_VALUE,t[1]=-Number.MAX_VALUE,t[2]=Number.MAX_VALUE,t[3]=-Number.MAX_VALUE,t[4]=Number.MAX_VALUE,t[5]=-Number.MAX_VALUE,this.modified()},this.computeBounds=function(){},this.computeBoundsTimestamp=function(){return e},this.boundsDirtyTimestamp=function(){return n},this.resetBounds(),this},r.boundingObject.ReferenceFrame={Relative:0,Absolute:1},i(r.boundingObject,r.object)},9433:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618),a=n(5365),s=n(8608),u=n(5240);r.camera=function(t){"use strict";if(!(this instanceof r.camera))return new r.camera(t);r.groupNode.call(this),t=t||{};var e=30*Math.PI/180,n=s.fromValues(0,0,1,1),i=s.fromValues(0,0,0,1),l=s.fromValues(0,1,0,0),c=1,h=s.fromValues(0,0,-1,0),f=u.create(),d=u.create(),p=o(),m=o(),g=-1,v=1,y=1,x=-1,_={zoom:1,tilesize:256},b=!1,M=[0,0,0,0],w=r.GL.COLOR_BUFFER_BIT|r.GL.DEPTH_BUFFER_BIT;return void 0!==t.parallelProjection&&(b=!!t.parallelProjection),this.setViewAspect=function(t){c=t,this.modified()},this.parallelExtents=function(){return _},this.setParallelExtents=function(t){var e,n,r=["width","height","zoom","tilesize"],i=!1;for(e=0;e<r.length;e+=1)void 0!==t[n=r[e]]&&t[n]!==_[n]&&(_[n]=t[n],i=!0);if(i&&_.width&&_.height&&void 0!==_.zoom&&_.tilesize){var o=this.unitsPerPixel(_.zoom,_.tilesize);v=o*_.width/2,g=-v,y=o*_.height/2,x=-y,this.modified()}},this.unitsPerPixel=function(t,e){return e=e||256,360*Math.pow(2,-t)/e},this.viewMatrix=function(){return this.computeViewMatrix()},this.setViewMatrix=function(t,e){e?f=t.slice():u.copy(f,t),p.modified()},this.projectionMatrix=function(){return this.computeProjectionMatrix()},this.setProjectionMatrix=function(t){u.copy(d,t),m.modified()},this.clearMask=function(){return w},this.clearColor=function(){return M},this.clearDepth=function(){return 1},this.computeDirectionOfProjection=function(){a.subtract(h,i,n),a.normalize(h,h),this.modified()},this.computeViewMatrix=function(){return p.getMTime()<this.getMTime()&&(u.lookAt(f,n,i,l),p.modified()),f},this.computeProjectionMatrix=function(){return m.getMTime()<this.getMTime()&&(b?u.ortho(d,g,v,x,y,.01,1e4):u.perspective(d,e,c,.01,1e4),m.modified()),d},this.computeDirectionOfProjection(),this},i(r.camera,r.groupNode)},9128:function(t,e,n){var r=n(5577);r.data=function(){"use strict";if(!(this instanceof r.data))return new r.data;this.type=function(){}},r.data.raster=0,r.data.point=1,r.data.lineString=2,r.data.polygon=3,r.data.geometry=10},9050:function(t,e,n){var r=n(5577);r.event={},r.event.keyPress="vgl.event.keyPress",r.event.mousePress="vgl.event.mousePress",r.event.mouseRelease="vgl.event.mouseRelease",r.event.contextMenu="vgl.event.contextMenu",r.event.configure="vgl.event.configure",r.event.enable="vgl.event.enable",r.event.mouseWheel="vgl.event.mouseWheel",r.event.keyRelease="vgl.event.keyRelease",r.event.middleButtonPress="vgl.event.middleButtonPress",r.event.startInteraction="vgl.event.startInteraction",r.event.enter="vgl.event.enter",r.event.rightButtonPress="vgl.event.rightButtonPress",r.event.middleButtonRelease="vgl.event.middleButtonRelease",r.event.char="vgl.event.char",r.event.disable="vgl.event.disable",r.event.endInteraction="vgl.event.endInteraction",r.event.mouseMove="vgl.event.mouseMove",r.event.mouseOut="vgl.event.mouseOut",r.event.expose="vgl.event.expose",r.event.timer="vgl.event.timer",r.event.leftButtonPress="vgl.event.leftButtonPress",r.event.leave="vgl.event.leave",r.event.rightButtonRelease="vgl.event.rightButtonRelease",r.event.leftButtonRelease="vgl.event.leftButtonRelease",r.event.click="vgl.event.click",r.event.dblClick="vgl.event.dblClick"},5710:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.primitive=function(){"use strict";if(!(this instanceof r.primitive))return new r.primitive;var t=0,e=0,n=null;return this.indices=function(){return n},this.numberOfIndices=function(){return n.length},this.primitiveType=function(){return t},this.setPrimitiveType=function(e){t=e},this.indicesValueType=function(){return e},this.setIndicesValueType=function(t){e=t},this.setIndices=function(t){n=new Uint16Array(t)},this},r.triangles=function(){"use strict";return this instanceof r.triangles?(r.primitive.call(this),this.setPrimitiveType(r.GL.TRIANGLES),this.setIndicesValueType(r.GL.UNSIGNED_SHORT),this):new r.triangles},i(r.triangles,r.primitive),r.points=function(){"use strict";return this instanceof r.points?(r.primitive.call(this),this.setPrimitiveType(r.GL.POINTS),this.setIndicesValueType(r.GL.UNSIGNED_SHORT),this):new r.points},i(r.points,r.primitive),r.sourceData=function(t){"use strict";if(!(this instanceof r.sourceData))return new r.sourceData(t);var e={},n=[],i=(t=t||{}).name||"Source "+(new Date).toISOString(),o=function(){this.m_numberOfComponents=0,this.m_dataType=0,this.m_dataTypeSize=0,this.m_normalized=!1,this.m_stride=0,this.m_offset=0};return this.data=function(){return n},this.getData=function(){return this.data()},this.dataToFloat32Array=function(){return n instanceof Float32Array||(n=new Float32Array(n)),n},this.setData=function(t){t instanceof Array||t instanceof Float32Array?n=t instanceof Float32Array?t:t.slice(0):console.log("[error] Requires array")},this.addAttribute=function(t,n,r,i,a,s,u){if(!e.hasOwnProperty(t)){var l=new o;l.m_dataType=n,l.m_dataTypeSize=r,l.m_offset=i,l.m_stride=a,l.m_numberOfComponents=s,l.m_normalized=u,e[t]=l}},this.hasKey=function(t){return e.hasOwnProperty(t)},this.keys=function(){return Object.keys(e)},this.attributeNumberOfComponents=function(t){return e.hasOwnProperty(t)?e[t].m_numberOfComponents:0},this.normalized=function(t){return!!e.hasOwnProperty(t)&&e[t].m_normalized},this.attributeDataType=function(t){if(e.hasOwnProperty(t))return e[t].m_dataType},this.attributeOffset=function(t){return e.hasOwnProperty(t)?e[t].m_offset:0},this.attributeStride=function(t){return e.hasOwnProperty(t)?e[t].m_stride:0},this.pushBack=function(t){},this.insert=function(t){var e;if(!n.length&&t.length&&t instanceof Float32Array)n=t;else if(n.slice||!n.length&&t.slice||(n=Array.prototype.slice.call(n)),t.length)if(!n.length&&t.slice)n=t.slice(0);else for(e=0;e<t.length;e+=1)n[n.length]=t[e];else n[n.length]=t},this.name=function(){return i},this},r.sourceDataAnyfv=function(t,e,n){"use strict";return this instanceof r.sourceDataAnyfv?(r.sourceData.call(this,n),this.addAttribute(e,r.GL.FLOAT,4,0,4*t,t,!1),this.pushBack=function(t){this.insert(t)},this):new r.sourceDataAnyfv(t,e,n)},i(r.sourceDataAnyfv,r.sourceData),r.sourceDataP3fv=function(t){"use strict";return this instanceof r.sourceDataP3fv?(r.sourceData.call(this,t),this.addAttribute(r.vertexAttributeKeys.Position,r.GL.FLOAT,4,0,12,3,!1),this.pushBack=function(t){this.insert(t)},this):new r.sourceDataP3fv(t)},i(r.sourceDataP3fv,r.sourceData),r.sourceDataT2fv=function(t){"use strict";return this instanceof r.sourceDataT2fv?(r.sourceData.call(this,t),this.addAttribute(r.vertexAttributeKeys.TextureCoordinate,r.GL.FLOAT,4,0,8,2,!1),this.pushBack=function(t){this.insert(t)},this):new r.sourceDataT2fv(t)},i(r.sourceDataT2fv,r.sourceData),r.geometryData=function(){"use strict";if(!(this instanceof r.geometryData))return new r.geometryData;r.data.call(this);var t=[],e=[],n=[0,0,0,0,0,0],i=o(),a=o();return this.type=function(){return r.data.geometry},this.name=function(){return""},this.addSource=function(t){return-1===e.indexOf(t)&&(e.push(t),t.hasKey(r.vertexAttributeKeys.Position)&&a.modified(),!0)},this.source=function(t){return t<e.length?e[t]:0},this.sourceByName=function(t){for(var n=0;n<e.length;n+=1)if(e[n].name()===t)return e[n];return 0},this.numberOfSources=function(){return e.length},this.sourceData=function(t){var n;for(n=0;n<e.length;n+=1)if(e[n].hasKey(t))return e[n];return null},this.addPrimitive=function(e){return t.push(e),!0},this.primitive=function(e){return e<t.length?t[e]:null},this.numberOfPrimitives=function(){return t.length},this.bounds=function(){return a.getMTime()>i.getMTime()&&this.computeBounds(),n},this.boundsDirty=function(t){return t&&a.modified(),a.getMTime()>i.getMTime()},this.setBounds=function(t,e,r,o,a,s){return n[0]=t,n[1]=e,n[2]=r,n[3]=o,n[4]=a,n[5]=s,i.modified(),!0},this},i(r.geometryData,r.data)},9393:function(t,e,n){var r=n(5577),i=n(5699);r.graphicsObject=function(t){"use strict";if(!(this instanceof r.graphicsObject))return new r.graphicsObject;r.object.call(this);return this._setup=function(t){return!1},this._cleanup=function(t){return!1},this},i(r.graphicsObject,r.object)},7113:function(t,e,n){var r=n(5577),i=n(5699);r.groupNode=function(){"use strict";if(!(this instanceof r.groupNode))return new r.groupNode;r.node.call(this);var t=[];return this.addChild=function(e){return e instanceof r.node&&(-1===t.indexOf(e)&&(e.setParent(this),t.push(e),this.boundsDirtyTimestamp().modified(),!0))},this.removeChild=function(e){if(e.parent()===this){var n=t.indexOf(e);if(n>=0)return t.splice(n,1),e.setParent(null),this.boundsDirtyTimestamp().modified(),!0}},this.removeChildren=function(){for(;t.length;)this.removeChild(t[0]);this.modified()},this.children=function(){return t},this.hasChild=function(e){var n=0,r=!1;for(n=0;n<t.length;n+=1)if(t[n]===e){r=!0;break}return r},this},i(r.groupNode,r.node)},5140:function(t,e,n){t.exports=n(5577),n(7514),n(4553),n(4818),n(2206),n(9050),n(9393),n(4596),n(3612),n(9623),n(9229),n(7113),n(9433),n(5147),n(9128),n(5710),n(1637),n(1136),n(770),n(2672),n(8082),n(221),n(3811),n(7470)},2206:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.mapper=function(t){"use strict";if(!(this instanceof r.mapper))return new r.mapper(t);r.boundingObject.call(this);var e=[0,1,1],n=null,i=[],a={},s=void 0!==(t=t||{}).dynamicDraw&&t.dynamicDraw,u=o(),l=null,c=this;function h(t){a={},i=[]}function f(t){c.deleteVertexBufferObjects(t),h(),function(t){if(n){t&&(l=t.m_context);var e,o,c,h,f,d,p,m=n.numberOfSources(),g=null;for(e=0;e<m;e+=1){for(g=l.createBuffer(),l.bindBuffer(r.GL.ARRAY_BUFFER,g),(p=n.source(e).data())instanceof Float32Array||(p=new Float32Array(p)),l.bufferData(r.GL.ARRAY_BUFFER,p,s?r.GL.DYNAMIC_DRAW:r.GL.STATIC_DRAW),h=n.source(e).keys(),f=[],o=0;o<h.length;o+=1)f.push(h[o]);a[e]=f,i[e]=g}for(d=n.numberOfPrimitives(),c=0;c<d;c+=1)g=l.createBuffer(),l.bindBuffer(r.GL.ARRAY_BUFFER,g),l.bufferData(r.GL.ARRAY_BUFFER,n.primitive(c).indices(),r.GL.STATIC_DRAW),i[e]=g,e+=1;u.modified()}}(t)}return this.deleteVertexBufferObjects=function(t){var e,n=l;if(t&&(n=t.m_context),n)for(e=0;e<i.length;e+=1)n.deleteBuffer(i[e])},this._cleanup=function(t){c.deleteVertexBufferObjects(t),h(t),c.modified()},this.computeBounds=function(){if(null!=n){var t=this.computeBoundsTimestamp(),e=null;this.boundsDirtyTimestamp().getMTime()>t.getMTime()&&(e=n.bounds(),this.setBounds(e[0],e[1],e[2],e[3],e[4],e[5]),t.modified())}else this.resetBounds()},this.color=function(){return e},this.geometryData=function(){return n},this.setGeometryData=function(t){n!==t&&(n=t,this.modified(),this.boundsDirtyTimestamp().modified())},this.updateSourceBuffer=function(t,e,o){if(o&&(l=o.m_context),!l)return!1;for(var a=-1,s=0;s<n.numberOfSources();s+=1)if(n.source(s).name()===t){a=s;break}return!(a<0||a>=i.length)&&(e||(e=n.source(s).dataToFloat32Array()),l.bindBuffer(r.GL.ARRAY_BUFFER,i[a]),e instanceof Float32Array?l.bufferSubData(r.GL.ARRAY_BUFFER,0,e):l.bufferSubData(r.GL.ARRAY_BUFFER,0,new Float32Array(e)),!0)},this.getSourceBuffer=function(t){var e=n.sourceByName(t);return e?e.dataToFloat32Array():new Float32Array},this.render=function(t,e){(this.getMTime()>u.getMTime()||t.m_contextChanged)&&f(t),(l=t.m_context).vertexAttrib3fv(r.vertexAttributeKeys.Color,this.color());var o,s,c=0,h=0,d=null;for(o in a)if(a.hasOwnProperty(o)){for(l.bindBuffer(r.GL.ARRAY_BUFFER,i[c]),h=0;h<a[o].length;h+=1)t.m_material.bindVertexData(t,a[o][h]);c+=1}for(s=n.numberOfPrimitives(),h=0;h<s;h+=1,c+=1)if((d=n.primitive(h)).numberOfIndices()){switch(l.bindBuffer(r.GL.ARRAY_BUFFER,i[c]),d.primitiveType()){case r.GL.POINTS:l.drawArrays(r.GL.POINTS,0,d.numberOfIndices());break;case r.GL.LINES:l.drawArrays(r.GL.LINES,0,d.numberOfIndices());break;case r.GL.LINE_STRIP:l.drawArrays(r.GL.LINE_STRIP,0,d.numberOfIndices());break;case r.GL.TRIANGLES:l.drawArrays(r.GL.TRIANGLES,0,d.numberOfIndices());break;case r.GL.TRIANGLE_STRIP:l.drawArrays(r.GL.TRIANGLE_STRIP,0,d.numberOfIndices())}l.bindBuffer(r.GL.ARRAY_BUFFER,null)}e||this.undoBindVertexData(t)},this.undoBindVertexData=function(t){var e,n;for(e in a)if(a.hasOwnProperty(e))for(n=0;n<a[e].length;n+=1)t.m_material.undoBindVertexData(t,a[e][n])},this},i(r.mapper,r.boundingObject)},4596:function(t,e,n){var r=n(5577),i=n(5699);r.material=function(){"use strict";if(!(this instanceof r.material))return new r.material;r.graphicsObject.call(this);var t=this,e=new r.shaderProgram,n=100,i={},o={};return this.binNumber=function(){return n},this.setBinNumber=function(e){n=e,t.modified()},this.exists=function(t){return t.type()===r.materialAttributeType.Texture?i.hasOwnProperty(t.textureUnit()):o.hasOwnProperty(t.type())},this.addAttribute=function(n){return!t.exists(n)&&(n.type()===r.materialAttributeType.Texture?(i[n.textureUnit()]=n,t.modified(),!0):(n.type()===r.materialAttributeType.ShaderProgram&&(e=n),o[n.type()]=n,t.modified(),!0))},this.shaderProgram=function(){return e},this._cleanup=function(n){for(var r in o)o.hasOwnProperty(r)&&o[r]._cleanup(n);for(r in i)i.hasOwnProperty(r)&&i[r]._cleanup(n);e._cleanup(n),t.modified()},this.bind=function(t){var n=null;for(n in e.bind(t),o)o.hasOwnProperty(n)&&o[n]!==e&&o[n].bind(t);for(n in i)i.hasOwnProperty(n)&&i[n].bind(t)},this.undoBind=function(t){var e=null;for(e in o)o.hasOwnProperty(e)&&o[e].undoBind(t);for(e in i)i.hasOwnProperty(e)&&i[e].undoBind(t)},this.bindVertexData=function(t,e){var n=null;for(n in o)o.hasOwnProperty(n)&&o[n].bindVertexData(t,e)},this.undoBindVertexData=function(t,e){var n=null;for(n in o)o.hasOwnProperty(n)&&o[n].undoBindVertexData(t,e)},t},r.material.RenderBin={Base:0,Default:100,Opaque:100,Transparent:1e3,Overlay:1e4},i(r.material,r.graphicsObject)},3612:function(t,e,n){var r=n(5577),i=n(5699);r.materialAttributeType={Undefined:0,ShaderProgram:1,Texture:2,Blend:3,Depth:4},r.materialAttribute=function(t){"use strict";if(!(this instanceof r.materialAttribute))return new r.materialAttribute(t);r.graphicsObject.call(this);var e=t;return this.type=function(){return e},this.enabled=function(){return true},this.bindVertexData=function(t,e){return!1},this.undoBindVertexData=function(t,e){return!1},this},i(r.materialAttribute,r.graphicsObject)},9623:function(t,e,n){var r=n(5577),i=n(5699);r.node=function(){"use strict";if(!(this instanceof r.node))return new r.node;r.boundingObject.call(this);var t=null,e=null,n=!0;return this.material=function(){return e},this.setMaterial=function(t){return t!==e&&(e=t,this.modified(),!0)},this.visible=function(){return n},this.setVisible=function(t){return t!==n&&(n=t,this.modified(),!0)},this.parent=function(){return t},this.setParent=function(e){return e!==t&&(null!==t&&t.removeChild(this),t=e,this.modified(),!0)},this.boundsModified=function(){this.boundsDirtyTimestamp().modified(),null!==t&&t.boundsModified()},this},i(r.node,r.boundingObject)},4553:function(t,e,n){var r=n(5577),i=n(6618);r.object=function(){"use strict";if(!(this instanceof r.object))return new r.object;var t=i();return t.modified(),this.modified=function(){t.modified()},this.getMTime=function(){return t.getMTime()},this}},1637:function(t,e,n){var r=n(5577),i=n(5699);r.renderWindow=function(t){"use strict";if(!(this instanceof r.renderWindow))return new r.renderWindow(t);r.graphicsObject.call(this);var e=this,n=0,i=0,o=400,a=400,s=t,u=null,l=[],c=null;return this.windowSize=function(){return[o,a]},this.windowPosition=function(){return[n,i]},this.renderers=function(){return l},this.activeRenderer=function(){return u},this.addRenderer=function(t){return!1===e.hasRenderer(t)&&(l.push(t),t.setRenderWindow(e),null===u&&(u=t),0!==t.layer()&&t.camera().setClearMask(r.GL.DepthBufferBit),e.modified(),!0)},this.hasRenderer=function(t){var e;for(e=0;e<l.length;e+=1)if(t===l[e])return!0;return!1},this.positionAndResize=function(t,r,s,u){var c;for(n=t,i=r,o=s,a=u,c=0;c<l.length;c+=1)l[c].positionAndResize(n,i,o,a);e.modified()},this._setup=function(t){c=null;try{var e;for(c=s.getContext("webgl")||s.getContext("experimental-webgl"),e=0;e<l.length;e+=1)(l[e].width()>o||0===l[e].width()||l[e].height()>a||0===l[e].height())&&l[e].resize(n,i,o,a);return!0}catch(t){}return c||console("[ERROR] Unable to initialize WebGL. Your browser may not support it."),!1},this.context=function(){return c},this._cleanup=function(t){var n;for(n=0;n<l.length;n+=1)l[n]._cleanup(t);r.clearCachedShaders(t?t.m_context:null),e.modified()},this.render=function(){var t;for(l.sort((function(t,e){return t.layer()-e.layer()})),t=0;t<l.length;t+=1)l[t].render()},e},i(r.renderWindow,r.graphicsObject)},1136:function(t,e,n){var r=n(5577),i=n(5699),o=n(5240);r.renderState=function(){"use strict";this.m_context=null,this.m_modelViewMatrix=o.create(),this.m_normalMatrix=o.create(),this.m_projectionMatrix=null,this.m_material=null,this.m_mapper=null},r.renderer=function(t){"use strict";if(!(this instanceof r.renderer))return new r.renderer(t);r.graphicsObject.call(this),t=t||{};var e=this;return e.m_renderWindow=null,e.m_contextChanged=!1,e.m_sceneRoot=new r.groupNode,e.m_camera=new r.camera(t),e.m_nearClippingPlaneTolerance=null,e.m_x=0,e.m_y=0,e.m_width=0,e.m_height=0,e.m_resizable=!0,e.m_resetScene=!0,e.m_layer=0,e.m_renderPasses=null,e.m_resetClippingRange=!0,e.m_depthBits=null,e.m_camera.addChild(e.m_sceneRoot),this.width=function(){return e.m_width},this.height=function(){return e.m_height},this.layer=function(){return e.m_layer},this.setLayer=function(t){e.m_layer=t,e.modified()},this.renderWindow=function(){return e.m_renderWindow},this.setRenderWindow=function(t){e.m_renderWindow!==t&&(e.m_renderWindow&&e.m_renderWindow.removeRenderer(this),e.m_renderWindow=t,e.m_contextChanged=!0,e.modified())},this.camera=function(){return e.m_camera},this.render=function(){var t,n,i,a=null,s=[],u=o.create(),l=null;if((n=new r.renderState).m_renderer=e,n.m_context=e.renderWindow().context(),e.m_depthBits&&!e.m_contextChanged||(e.m_depthBits=n.m_context.getParameter(r.GL.DEPTH_BITS)),n.m_contextChanged=e.m_contextChanged,e.m_renderPasses)for(t=0;t<e.m_renderPasses.length;t+=1){if(e.m_renderPasses[t].render(n))return console.log("returning"),void e.m_renderPasses[t].remove(n);e.m_renderPasses[t].remove(n)}for(n.m_context.enable(r.GL.DEPTH_TEST),n.m_context.depthFunc(r.GL.LEQUAL),e.m_camera.clearMask()&r.GL.COLOR_BUFFER_BIT&&(l=e.m_camera.clearColor(),n.m_context.clearColor(l[0],l[1],l[2],l[3])),e.m_camera.clearMask()&r.GL.DEPTH_BUFFER_BIT&&n.m_context.clearDepth(e.m_camera.clearDepth()),n.m_context.clear(e.m_camera.clearMask()),n.m_context.viewport(e.m_x,e.m_y,e.m_width,e.m_height),(i=e.m_sceneRoot.children()).length>0&&e.m_resetScene&&(e.m_resetScene=!1),t=0;t<i.length;t+=1)(a=i[t]).computeBounds(),a.visible()&&a.material().binNumber()>=0&&s.push([a.material().binNumber(),a]);for(s.sort((function(t,e){return t[0]-e[0]})),t=0;t<s.length;t+=1){if((a=s[t][1]).referenceFrame()===r.boundingObject.ReferenceFrame.Relative){var c=e.m_camera.viewMatrix();c instanceof Array&&(n.m_modelViewMatrix=new Array(16)),o.multiply(n.m_modelViewMatrix,c,a.matrix()),n.m_projectionMatrix=e.m_camera.projectionMatrix(),n.m_modelViewAlignment=e.m_camera.viewAlignment()}else n.m_modelViewMatrix=a.matrix(),n.m_modelViewAlignment=null,n.m_projectionMatrix=o.create(),o.ortho(n.m_projectionMatrix,0,e.m_width,0,e.m_height,-1,1);o.invert(u,n.m_modelViewMatrix),o.transpose(n.m_normalMatrix,u),n.m_material=a.material(),n.m_mapper=a.mapper(),n.m_material.bind(n),n.m_mapper.render(n),n.m_material.undoBind(n)}n.m_context.finish(),e.m_contextChanged=!1,e.m_lastRenderState=n},this.resize=function(t,n){t&&n&&e.positionAndResize(e.m_x,e.m_y,t,n)},this.positionAndResize=function(t,n,r,i){var o;if(t<0||n<0||r<=0||i<=0)console.log("[error] Invalid position and resize values",t,n,r,i);else if(e.m_resizable&&(e.m_width=r,e.m_height=i,e.m_camera.setViewAspect(r/i),e.m_camera.setParallelExtents({width:r,height:i}),e.modified()),e.m_renderPasses)for(o=0;o<e.m_renderPasses.length;o+=1)e.m_renderPasses[o].resize(r,i),e.m_renderPasses[o].renderer().positionAndResize(t,n,r,i)},this.addActor=function(t){return t instanceof r.actor&&(e.m_sceneRoot.addChild(t),e.modified(),!0)},this.hasActor=function(t){return e.m_sceneRoot.hasChild(t)},this.removeActor=function(t){return-1!==e.m_sceneRoot.children().indexOf(t)&&(e.m_lastRenderState&&(t.mapper()&&t.mapper()._cleanup(e.m_lastRenderState),t.material()&&t.material()._cleanup(e.m_lastRenderState)),t.modified(),e.m_sceneRoot.removeChild(t),e.modified(),!0)},this.setResetScene=function(t){e.m_resetScene!==t&&(e.m_resetScene=t,e.modified())},this._cleanup=function(t){for(var n=e.m_sceneRoot.children(),r=0;r<n.length;r+=1){var i=n[r];i.material()._cleanup(t),i.mapper()._cleanup(t)}e.m_sceneRoot.removeChildren(),e.modified()},e},i(r.renderer,r.graphicsObject)},770:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.shader=function(t){"use strict";if(!(this instanceof r.shader))return new r.shader(t);r.object.call(this);var e=[],n=t,i="";this._getContextEntry=function(t){var n,r,i=t.m_context;for(n=0;n<e.length;n+=1)if(e[n].context===i)return e[n];return r={context:i,compileTimestamp:o()},e.push(r),r},this.removeContext=function(t){var n,r=t.m_context;for(n=0;n<e.length;n+=1)if(e[n].context===r)return void e.splice(n,1)},this.shaderHandle=function(t){return this._getContextEntry(t).shaderHandle},this.setShaderSource=function(t){i=t,this.modified()},this.compile=function(t){var e=this._getContextEntry(t);return this.getMTime()<e.compileTimestamp.getMTime()?e.shaderHandle:(t.m_context.deleteShader(e.shaderHandle),e.shaderHandle=t.m_context.createShader(n),t.m_context.shaderSource(e.shaderHandle,i),t.m_context.compileShader(e.shaderHandle),t.m_context.getShaderParameter(e.shaderHandle,r.GL.COMPILE_STATUS)?(e.compileTimestamp.modified(),e.shaderHandle):(console.log("[ERROR] An error occurred compiling the shaders: "+t.m_context.getShaderInfoLog(e.shaderHandle)),console.log(i),t.m_context.deleteShader(e.shaderHandle),null))},this.attachShader=function(t,e){t.m_context.attachShader(e,this.shaderHandle(t))}},i(r.shader,r.object),function(){"use strict";var t=[];r.getCachedShader=function(e,n,i){for(var o=0;o<t.length;o+=1)if(t[o].type===e&&t[o].context===n&&t[o].source===i)return o&&t.splice(0,0,t.splice(o,1)[0]),t[0].shader;var a=new r.shader(e);return a.setShaderSource(i),t.unshift({type:e,context:n,source:i,shader:a}),t.length>=10&&t.splice(10,t.length-10),a},r.clearCachedShaders=function(e){for(var n=t.length-1;n>=0;n-=1)null!=e&&t[n].context!==e||t.splice(n,1)}}()},2672:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.shaderProgram=function(){"use strict";if(!(this instanceof r.shaderProgram))return new r.shaderProgram;r.materialAttribute.call(this,r.materialAttributeType.ShaderProgram);var t=this,e=0,n=o(),i=o(),a=[],s=[],u={},l={},c={};return this.queryUniformLocation=function(t,n){return t.m_context.getUniformLocation(e,n)},this.queryAttributeLocation=function(t,n){return t.m_context.getAttribLocation(e,n)},this.addShader=function(e){if(a.indexOf(e)>-1)return!1;var n;for(n=a.length-2;n>=0;n-=1)a[n].shaderType()===e.shaderType()&&a.splice(n,1);return a.push(e),t.modified(),!0},this.addUniform=function(e){return!(s.indexOf(e)>-1)&&(s.push(e),t.modified(),!0)},this.addVertexAttribute=function(e,n){u[n]=e,t.modified()},this.uniformLocation=function(t){return l[t]},this.attributeLocation=function(t){return c[t]},this.uniform=function(t){var e;for(e=0;e<s.length;e+=1)if(s[e].name()===t)return s[e];return null},this.updateUniforms=function(t){var e;for(e=0;e<s.length;e+=1)s[e].callGL(t,l[s[e].name()])},this.link=function(t){return t.m_context.linkProgram(e),!!t.m_context.getProgramParameter(e,r.GL.LINK_STATUS)||(console.log("[ERROR] Unable to initialize the shader program."),!1)},this.use=function(t){t.m_context.useProgram(e)},this._setup=function(t){0===e&&(e=t.m_context.createProgram())},this._cleanup=function(e){t.deleteVertexAndFragment(e),t.deleteProgram(e),t.modified()},this.deleteProgram=function(t){e&&t.m_context.deleteProgram(e),e=0},this.deleteVertexAndFragment=function(t){var n;for(n=0;n<a.length;n+=1)a[n].shaderHandle(t)&&t.m_context.detachShader(e,a[n].shaderHandle(t)),t.m_context.deleteShader(a[n].shaderHandle(t)),a[n].removeContext(t)},this.compileAndLink=function(r){var i;if(!(n.getMTime()>=this.getMTime())){for(t._setup(r),i=0;i<a.length;i+=1)a[i].compile(r),a[i].attachShader(r,e);t.bindAttributes(r),t.link(r)||(console.log("[ERROR] Failed to link Program"),t._cleanup(r)),n.modified()}},this.bind=function(e){var n=0;for(i.getMTime()<t.getMTime()?(t.compileAndLink(e),t.use(e),t.bindUniforms(e),i.modified()):t.use(e),n=0;n<s.length;n+=1)s[n].update(e,t);t.updateUniforms(e)},this.undoBind=function(t){t.m_context.useProgram(null)},this.bindVertexData=function(t,e){u.hasOwnProperty(e)&&u[e].bindVertexData(t,e)},this.undoBindVertexData=function(t,e){u.hasOwnProperty(e)&&u[e].undoBindVertexData(t,e)},this.bindUniforms=function(t){var e;for(e=0;e<s.length;e+=1)l[s[e].name()]=this.queryUniformLocation(t,s[e].name())},this.bindAttributes=function(t){var n,r;for(n in u)u.hasOwnProperty(n)&&(r=u[n].name(),t.m_context.bindAttribLocation(e,n,r),c[r]=n)},t},i(r.shaderProgram,r.materialAttribute)},8082:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.texture=function(){"use strict";if(!(this instanceof r.texture))return new r.texture;r.materialAttribute.call(this,r.materialAttributeType.Texture),this.m_width=0,this.m_height=0,this.m_depth=0,this.m_textureHandle=null,this.m_textureUnit=0,this.m_pixelFormat=r.GL.RGBA,this.m_pixelDataType=r.GL.UNSIGNED_BYTE,this.m_internalFormat=r.GL.RGBA,this.m_nearestPixel=!1,this.m_image=null;var t=o(),e=this;function n(t){if(!(e.m_textureUnit>=0&&e.m_textureUnit<32))throw"[error] Texture unit "+e.m_textureUnit+" is not supported";t.m_context.activeTexture(r.GL.TEXTURE0+e.m_textureUnit)}return this.setup=function(e){n(e),e.m_context.deleteTexture(this.m_textureHandle),this.m_textureHandle=e.m_context.createTexture(),e.m_context.bindTexture(r.GL.TEXTURE_2D,this.m_textureHandle),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_MIN_FILTER,this.m_nearestPixel?r.GL.NEAREST:r.GL.LINEAR),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_MAG_FILTER,this.m_nearestPixel?r.GL.NEAREST:r.GL.LINEAR),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_WRAP_S,r.GL.CLAMP_TO_EDGE),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_WRAP_T,r.GL.CLAMP_TO_EDGE),null!==this.m_image?(e.m_context.pixelStorei(r.GL.UNPACK_ALIGNMENT,1),e.m_context.pixelStorei(r.GL.UNPACK_FLIP_Y_WEBGL,!0),this.updateDimensions(),this.computeInternalFormatUsingImage(),e.m_context.texImage2D(r.GL.TEXTURE_2D,0,this.m_internalFormat,this.m_pixelFormat,this.m_pixelDataType,this.m_image)):e.m_context.texImage2D(r.GL.TEXTURE_2D,0,this.m_internalFormat,this.m_width,this.m_height,0,this.m_pixelFormat,this.m_pixelDataType,null),e.m_context.bindTexture(r.GL.TEXTURE_2D,null),t.modified()},this.bind=function(e){this.getMTime()>t.getMTime()&&this.setup(e),n(e),e.m_context.bindTexture(r.GL.TEXTURE_2D,this.m_textureHandle)},this.undoBind=function(t){t.m_context.bindTexture(r.GL.TEXTURE_2D,null)},this.image=function(){return this.m_image},this.setImage=function(t){return null!==t&&(this.m_image=t,this.updateDimensions(),this.modified(),!0)},this.nearestPixel=function(){return this.m_nearestPixel},this.setNearestPixel=function(t){return(t=!!t)!==this.m_nearestPixel&&(this.m_nearestPixel=t,this.modified(),!0)},this.textureUnit=function(){return this.m_textureUnit},this.setTextureUnit=function(t){return this.m_textureUnit!==t&&(this.m_textureUnit=t,this.modified(),!0)},this.computeInternalFormatUsingImage=function(){this.m_internalFormat=r.GL.RGBA,this.m_pixelFormat=r.GL.RGBA,this.m_pixelDataType=r.GL.UNSIGNED_BYTE},this.updateDimensions=function(){null!==this.m_image&&(this.m_width=this.m_image.width,this.m_height=this.m_image.height,this.m_depth=0)},this},i(r.texture,r.materialAttribute),r.lookupTable=function(){"use strict";if(!(this instanceof r.lookupTable))return new r.lookupTable;r.texture.call(this);var t=o();return this.m_colorTable=[.07514311,.468049805,1,1,.247872569,.498782363,1,1,.339526309,.528909511,1,1,.409505078,.558608486,1,1,.468487184,.588057293,1,1,.520796675,.617435078,1,1,.568724526,.646924167,1,1,.613686735,.676713218,1,1,.656658579,.707001303,1,1,.698372844,.738002964,1,1,.739424025,.769954435,1,1,.780330104,.803121429,1,1,.821573924,.837809045,1,1,.863634967,.874374691,1,1,.907017747,.913245283,1,1,.936129275,.938743558,.983038586,1,.943467973,.943498599,.943398095,1,.990146732,.928791426,.917447482,1,1,.88332677,.861943246,1,1,.833985467,.803839606,1,1,.788626485,.750707739,1,1,.746206642,.701389973,1,1,.70590052,.654994046,1,1,.667019783,.610806959,1,1,.6289553,.568237474,1,1,.591130233,.526775617,1,1,.552955184,.485962266,1,1,.513776083,.445364274,1,1,.472800903,.404551679,1,1,.428977855,.363073592,1,1,.380759558,.320428137,1,.961891484,.313155629,.265499262,1,.916482116,.236630659,.209939162,1].map((function(t){return 255*t})),this.setup=function(e){0===this.textureUnit()?e.m_context.activeTexture(r.GL.TEXTURE0):1===this.textureUnit()&&e.m_context.activeTexture(r.GL.TEXTURE1),e.m_context.deleteTexture(this.m_textureHandle),this.m_textureHandle=e.m_context.createTexture(),e.m_context.bindTexture(r.GL.TEXTURE_2D,this.m_textureHandle),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_MIN_FILTER,r.GL.LINEAR),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_MAG_FILTER,r.GL.LINEAR),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_WRAP_S,r.GL.CLAMP_TO_EDGE),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_WRAP_T,r.GL.CLAMP_TO_EDGE),e.m_context.pixelStorei(r.GL.UNPACK_ALIGNMENT,1),this.m_width=this.m_colorTable.length/4,this.m_height=1,this.m_depth=0,e.m_context.texImage2D(r.GL.TEXTURE_2D,0,r.GL.RGBA,this.m_width,this.m_height,this.m_depth,r.GL.RGBA,r.GL.UNSIGNED_BYTE,new Uint8Array(this.m_colorTable)),e.m_context.bindTexture(r.GL.TEXTURE_2D,null),t.modified()},this.colorTable=function(){return this.m_colorTable},this.setColorTable=function(t){return this.m_colorTable!==t&&(this.m_colorTable=t,this.modified(),!0)},this.textureHandle=function(){return this.m_textureHandle},this},i(r.lookupTable,r.texture)},221:function(t,e,n){var r=n(5577),i=n(5699),o=n(5240);r.uniform=function(t,e){"use strict";if(!(this instanceof r.uniform))return new r.uniform(t,e);this.getTypeNumberOfComponents=function(t){switch(t){case r.GL.FLOAT:case r.GL.INT:case r.GL.BOOL:return 1;case r.GL.FLOAT_VEC2:case r.GL.INT_VEC2:case r.GL.BOOL_VEC2:return 2;case r.GL.FLOAT_VEC3:case r.GL.INT_VEC3:case r.GL.BOOL_VEC3:return 3;case r.GL.FLOAT_VEC4:case r.GL.INT_VEC4:case r.GL.BOOL_VEC4:return 4;case r.GL.FLOAT_MAT3:return 9;case r.GL.FLOAT_MAT4:return 16;default:return 0}};var n=t,i=e,o=[];return o.length=this.getTypeNumberOfComponents(n),this.name=function(){return i},this.set=function(t){var e=0,n=o.length;if(1!==n)for(e=0;e<n;e+=1)o[e]=t[e];else o[0]=t},this.callGL=function(t,e){switch(n){case r.GL.BOOL:case r.GL.INT:t.m_context.uniform1iv(e,o);break;case r.GL.FLOAT:t.m_context.uniform1fv(e,o);break;case r.GL.BOOL_VEC2:case r.GL.INT_VEC2:t.m_context.uniform2iv(e,o);break;case r.GL.FLOAT_VEC2:t.m_context.uniform2fv(e,o);break;case r.GL.BOOL_VEC3:case r.GL.INT_VEC3:t.m_context.uniform3iv(e,o);break;case r.GL.FLOAT_VEC3:t.m_context.uniform3fv(e,o);break;case r.GL.BOOL_VEC4:case r.GL.INT_VEC4:t.m_context.uniform4iv(e,o);break;case r.GL.FLOAT_VEC4:t.m_context.uniform4fv(e,o);break;case r.GL.FLOAT_MAT3:t.m_context.uniformMatrix3fv(e,r.GL.FALSE,o);break;case r.GL.FLOAT_MAT4:t.m_context.uniformMatrix4fv(e,r.GL.FALSE,o)}},this.update=function(t,e){},this},r.modelViewOriginUniform=function(t,e){"use strict";if(!(this instanceof r.modelViewOriginUniform))return new r.modelViewOriginUniform(t,e);t||(t="modelViewMatrix");var n=[(e=e||[0,0,0])[0],e[1],e[2]||0];return r.uniform.call(this,r.GL.FLOAT_MAT4,t),this.set(o.create()),this.setOrigin=function(t){n=[(t=t||[0,0,0])[0],t[1],t[2]||0]},this.update=function(t,e){var r=t.m_modelViewMatrix;if(t.m_modelViewAlignment){var i=t.m_modelViewAlignment;(r=r.slice?r.slice():Array.prototype.slice.call(r))[12]=Math.round(r[12]/i.roundx)*i.roundx+i.dx,r[13]=Math.round(r[13]/i.roundy)*i.roundy+i.dy}r=o.translate(o.create(),r,n),this.set(r)},this},i(r.modelViewOriginUniform,r.uniform),r.projectionUniform=function(t){"use strict";return this instanceof r.projectionUniform?(t||(t="projectionMatrix"),r.uniform.call(this,r.GL.FLOAT_MAT4,t),this.set(o.create()),this.update=function(t,e){this.set(t.m_projectionMatrix)},this):new r.projectionUniform(t)},i(r.projectionUniform,r.uniform),r.floatUniform=function(t,e){"use strict";if(!(this instanceof r.floatUniform))return new r.floatUniform(t,e);t||(t="floatUniform"),e=void 0===e?1:e,r.uniform.call(this,r.GL.FLOAT,t),this.set(e)},i(r.floatUniform,r.uniform)},3811:function(t,e,n){var r=n(5577);r.vertexAttributeKeys={Position:0,Normal:1,TextureCoordinate:2,Color:3,Scalar:4,CountAttributeIndex:5},r.vertexAttributeKeysIndexed={Zero:0,One:1,Two:2,Three:3,Four:4,Five:5,Six:6,Seven:7,Eight:8,Nine:9},r.vertexAttribute=function(t){"use strict";if(!(this instanceof r.vertexAttribute))return new r.vertexAttribute(t);var e=t;this.name=function(){return e},this.bindVertexData=function(t,n){var r=t.m_mapper.geometryData().sourceData(n),i=t.m_material.shaderProgram();t.m_context.vertexAttribPointer(i.attributeLocation(e),r.attributeNumberOfComponents(n),r.attributeDataType(n),r.normalized(n),r.attributeStride(n),r.attributeOffset(n)),t.m_context.enableVertexAttribArray(i.attributeLocation(e))},this.undoBindVertexData=function(t,n){var r=t.m_material.shaderProgram();t.m_context.disableVertexAttribArray(r.attributeLocation(e))}}},5577:function(t){t.exports={}},7470:function(t,e,n){var r=n(5638),i=n(5577),o=n(5699);i.viewer=function(t,e){"use strict";if(!(this instanceof i.viewer))return new i.viewer(t,e);i.object.call(this);var n=t,o=i.renderer(e),a=i.renderWindow(n);return this.canvas=function(){return n},this.renderWindow=function(){return a},this.init=function(){null!==a?a._setup():console.log("[ERROR] No render window attached")},this.exit=function(t){null!==a?a._cleanup(t):console.log("[ERROR] No render window attached")},this.render=function(){a.render()},this.bindEventHandlers=function(){r(n).on("mousedown",this.handleMouseDown),r(n).on("mouseup",this.handleMouseUp),r(n).on("mousemove",this.handleMouseMove),r(n).on("mousewheel",this.handleMouseWheel),r(n).on("contextmenu",this.handleContextMenu)},this.unbindEventHandlers=function(){r(n).off("mousedown",this.handleMouseDown),r(n).off("mouseup",this.handleMouseUp),r(n).off("mousemove",this.handleMouseMove),r(n).off("mousewheel",this.handleMouseWheel),r(n).off("contextmenu",this.handleContextMenu)},this._init=function(){this.bindEventHandlers(),a.addRenderer(o)},this._init(),this},o(i.viewer,i.object)},6653:function(t,e,n){t.exports={pointFeature:n(9724),vtkjsRenderer:n(9508)}},7222:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var r=this,i=this.draw;return this.draw=function(){return r.ready&&(r._update(),r.renderer()._render(),i()),r},this}},9724:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r=n(6853),i=n(7222),a=n(9508).vtkjs,s=a.Rendering.Core.vtkActor,u=a.Common.Core.vtkDataArray,l=a.Rendering.Core.vtkGlyph3DMapper,c=a.Rendering.Core.vtkMapper,h=a.Common.DataModel.vtkPointSet,f=a.Filters.Sources.vtkSphereSource;i.call(this);var d,p,m,g,v,y=this,x=this._init,_=this._exit,b=this._update;return this._createPipeline=function(){p=h.newInstance(),(m=f.newInstance()).setThetaResolution(30),m.setPhiResolution(30);var t=l.newInstance({orient:!1,colorByArrayName:"color",scalarMode:c.ScalarMode.USE_POINT_FIELD_DATA,colorMode:c.ColorMode.DIRECT_SCALARS,scaling:!0,scaleArray:"diam",scaleMode:l.ScaleModes.SCALE_BY_MAGNITUDE});t.setInputData(p,0),t.setInputConnection(m.getOutputPort(),1),(d=s.newInstance()).setMapper(t),d.getProperty().setAmbient(1),y.renderer().contextRenderer().addActor(d)},this._init=function(){x.call(y,e),y.renderer().contextRenderer().setLayer(0),y._createPipeline()},this._build=function(){var t,e,n,i,o,a,s=y.data().length,l=new Array(3*s),c=y.data(),h=y.position(),f=y.style.get("radius"),d=y.style.get("fill"),m=y.style.get("fillColor"),x=y.style.get("fillOpacity"),_=y.layer().map().unitsPerPixel(y.layer().map().zoom());for(v&&v.length===s||(v=new Float32Array(s)),g&&g.length===4*s||(g=new Uint8Array(4*s)),t=e=n=0;t<s;t+=1,e+=3,n+=4)i=h(c[t],t),l[e]=i.x,l[e+1]=i.y,l[e+2]=i.z||0,a=a||l[e+2],v[t]=f(c[t],t)*_*2,o=m(c[t],t),g[n]=255*o.r,g[n+1]=255*o.g,g[n+2]=255*o.b,g[n+3]=d(c[t],t)?255*x(c[t],t):0;if(l=r.transformCoordinates(y.gcs(),y.layer().map().gcs(),l,3),!a&&y.gcs()!==y.layer().map().gcs())for(t=e=0;t<s;t+=1,e+=3)l[e+2]=0;p.getPoints().setData(l,3),p.getPointData().addArray(u.newInstance({name:"color",values:g,numberOfComponents:4})),p.getPointData().addArray(u.newInstance({name:"diam",values:v})),y.buildTime().modified()},this._update=function(){if(b.call(y),y.dataTime().getMTime()>=y.buildTime().getMTime()||y.updateTime().getMTime()<y.getMTime())y._build();else{var t=y.data(),e=y.style.get("radius"),n=y.layer().map().unitsPerPixel(y.layer().map().zoom()),r=p.getPointData().getArray("diam"),i=r.getData().map((function(r,i){return e(t[i],i)*n*2}));r.setData(i),p.modified()}y.updateTime().modified()},this._exit=function(){y.renderer().contextRenderer().removeActor(d),_()},y._init(),this};r(a,o);var s={};s[o.capabilities.stroke]=!1,i("vtkjs","point",a,s),t.exports=a},9508:function(t,e,n){var r=n(5699),i=n(4647).registerRenderer,o=n(3234),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r=n(5240),i=n(5108),a=t.vtkjs.Rendering.Misc.vtkGenericRenderWindow,s=this,u=this._init,l=a.newInstance({background:[0,0,0,0]});l.setContainer(s.layer().node().get(0)),l.getInteractor().unbindEvents(),l.resize();var c=l.getRenderer(),h=l.getRenderWindow();return this.contextRenderer=function(){return c},this.api=function(){return t.apiname},this._init=function(){if(s.initialized())return s;u.call(s);var t=s.layer().map(),e=t.size();return s._resize(0,0,e.width,e.height),t.camera().clipbounds={near:-t.unitsPerPixel(),far:t.unitsPerPixel()},s},this._resize=function(t,e,n,r){return s._setWidthHeight(n,r),l.resize(),s._render(),s},this._render=function(){return s.layer().map().scheduleAnimationFrame(s._renderFrame,!0),s},this._renderFrame=function(){var t,e=s.layer().features();for(t=0;t<e.length;t+=1)e[t].visible()&&e[t]._update();s._updateRendererCamera(),h.render()},this._exit=function(){},this._updateRendererCamera=function(){var t=s.layer().map().camera(),e=t.view,n=t.projectionMatrix,i=r.create();r.copy(i,e);var o=r.create();r.copy(o,n),s.contextRenderer().getActiveCamera().setViewMatrix(i),s.contextRenderer().getActiveCamera().setProjectionMatrix(o)},s.layer().geoOn(i.pan,(function(t){s._render()})),s.layer().geoOn(i.parallelprojection,(function(t){})),this};a.apiname="vtkjs",r(a,o),i("vtkjs",a),a.supported=function(){delete a.vtkjs;try{a.vtkjs=n(999)}catch(t){}return a.vtkjs&&a.vtkjs.Rendering||!window.vtk||!window.vtk.Rendering||(a.vtkjs=window.vtk),a.vtkjs&&a.vtkjs.Rendering||(a.vtkjs=void 0),void 0!==a.vtkjs},a.fallback=function(){return null},a.supported(),t.exports=a},99:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(8719),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n=this,r=null,i=this._exit,a=this.draw,s=this._update;return this.draw=function(){if(n._update(),r)for(var t=0;t<r.length;t+=1)r[t].draw();return a(),n},this._build=function(){return n.buildTime().modified(),r=n.createChoropleth()},this._update=function(){s.call(n),(n.dataTime().timestamp()>=n.buildTime().timestamp()||n.updateTime().timestamp()<=n.timestamp())&&(n._wipePolygons(),n._build()),n.updateTime().modified()},this._wipePolygons=function(){r&&r.map((function(t){return t._exit()})),r=null},this._exit=function(){n._wipePolygons(),i()},this._init(e),this};r(a,o),i("webgl","choropleth",a),t.exports=a},8917:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(9005),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e),n(5651).call(this,e);var r=this;return this._build=function(){r.actors()[0]&&r.renderer().contextRenderer().removeActor(r.actors()[0]),r.createGLMeshColored(r._createContours()),r.renderer().contextRenderer().addActor(r.actors()[0]),r.buildTime().modified()},this._init(e),this};r(a,o),i("webgl","contour",a),t.exports=a},8939:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(1109),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e),n(5651).call(this,e);var r=this;return this._build=function(){r.actors()[0]&&r.renderer().contextRenderer().removeActor(r.actors()[0]),r.createGLMeshColored(r._createGrids()),r.renderer().contextRenderer().addActor(r.actors()[0]),r.buildTime().modified()},this._init(e),this};r(a,o),i("webgl","grid",a),t.exports=a},9205:function(t,e,n){t.exports={choroplethFeature:n(99),contourFeature:n(8917),gridFeature:n(8939),isolineFeature:n(9752),layer:n(5389),lineFeature:n(7390),lookupTable2D:n(8672),markerFeature:n(1848),meshColored:n(5651),pixelmapFeature:n(9685),pointFeature:n(5675),polygonFeature:n(2890),quadFeature:n(2182),tileLayer:n(7112),trackFeature:n(506),webglRenderer:n(2254)}},9752:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(2367),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(7719).call(this),this._init(e),this):new t(e)};r(a,o),i("webgl","isoline",a),t.exports=a},5389:function(t,e,n){var r=function(){"use strict";var t=n(4647).createRenderer,e=n(5108),r=n(2254),i=n(1940),o=this,a=this._init,s=this.opacity,u=this.visible,l=this.zIndex;this.opacity=function(t){var e=s.apply(o,arguments);return void 0!==t&&o.initialized()&&o.map()._updateAutoshareRenderers(),e},this.visible=function(t){if(void 0===t)return u();var e=u(),n=u.apply(o,arguments);return e!==t&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render()),n},this.zIndex=function(t,e){var n=l.apply(o,arguments);return void 0!==t&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render(),o.map()._updateAutoshareRenderers()),n},this.switchRenderer=function(t,e){if(t instanceof r&&t!==o.renderer()){var n=o.renderer(),i=[],a=[];o.map().listSceneObjects([o]).forEach((function(t){t._cleanup&&(t._cleanup(),t._update&&a.push(t)),t.actors&&(i=i.concat(t.actors()))})),i.forEach((function(e){n.contextRenderer().removeActor(e),t.contextRenderer().addActor(e)})),o._renderer(t),o._canvas(t.canvas()),e&&(i.length||a.length)&&(n._render(),a.forEach((function(t){t._update()})),t._render())}return o},this._init=function(){var n=o.map();return n._updateAutoshareRenderers||(n._updateAutoshareRenderers=function(){var e,o,a,s=n.sortedLayers(),u=[];s.forEach((function(n){var s=n.autoshareRenderer(),l=n instanceof i;s&&n.renderer()&&n.renderer().api()===r.apiname?!e||n.opacity()!==o||"more"!==s&&(n.opacity()>0&&n.opacity()<1||l&&!a)?(n.node()[0].contains(n.renderer().canvas()[0])||(n.switchRenderer(t(r.apiname,n),!1),u.push(n.renderer())),e=n.renderer(),o=n.opacity(),a=l):(n.renderer()!==e&&(u.push(n.renderer()),n.switchRenderer(e,!1),u.push(n.renderer())),a&=l):e=null})),s.forEach((function(t){u.indexOf(t.renderer())>=0&&t._update&&t._update()})),s.forEach((function(t){u.indexOf(t.renderer())>=0&&(t.renderer()._renderFrame(),u=u.filter((function(e){return e!==t.renderer()})))})),u.forEach((function(t){t._exit()}))},n.geoOn(e.layerAdd,(function(){return n._updateAutoshareRenderers()})),n.geoOn(e.layerRemove,(function(){return n._updateAutoshareRenderers()}))),a.apply(o,arguments)}};(0,n(4647).registerLayerAdjustment)("webgl","all",r),t.exports=r},7390:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=0,s=1,u=3,l={butt:0,square:1,round:2},c={passthrough:3,miter:4,bevel:5,round:6,"miter-clip":7},h={normal:0,debug:1},f=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r=n(5140),i=n(6853),f=n(4634),d=n(7719),p=n(9162),m=n(359),g=n(916);d.call(this);var v,y,x,_,b,M,w,A,T,C,E,k=this,S=this._exit,P=void 0!==e.dynamicDraw&&e.dynamicDraw,O=this._init,L=this._update;return this.featureVertices=function(){return[[0,"corner",-1,a],[0,"near",1,s],[1,"far",-1,u],[1,"corner",1,a],[1,"near",-1,s],[0,"far",1,u]]},this.verticesPerFeature=function(){return k.featureVertices().length},this._init=function(t){var e,n=r.shaderProgram(),i=((e=new r.shader(r.GL.VERTEX_SHADER)).setShaderSource(g),e),o=function(t){var e=new r.shader(r.GL.FRAGMENT_SHADER);return e.setShaderSource(t?m:p),e}(void 0!==((t||{}).style||{}).debug),a=r.vertexAttribute("pos"),s=r.vertexAttribute("prev"),u=r.vertexAttribute("next"),l=r.vertexAttribute("far"),c=r.vertexAttribute("flags"),h=r.vertexAttribute("strokeWidth"),f=r.vertexAttribute("strokeColor"),d=r.vertexAttribute("strokeOpacity"),T=new r.projectionUniform("projectionMatrix"),C=r.geometryData(),S=r.sourceDataP3fv({name:"pos"}),L=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Four,{name:"prev"}),R=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Five,{name:"next"}),I=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Six,{name:"far"}),D=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Seven,{name:"flags"}),F=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.One,{name:"strokeWidth"}),N=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Two,{name:"strokeColor"}),j=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"strokeOpacity"}),z=r.triangles();return E=new r.modelViewOriginUniform("modelViewMatrix"),_=new r.floatUniform("pixelWidth",1/k.renderer().width()),b=new r.floatUniform("aspect",k.renderer().width()/k.renderer().height()),M=new r.floatUniform("miterLimit",10),w=new r.floatUniform("antialiasing",0),A=new r.floatUniform("fixedFlags",0),O.call(k,t),x=r.material(),y=r.mapper({dynamicDraw:P}),n.addVertexAttribute(a,r.vertexAttributeKeys.Position),n.addVertexAttribute(h,r.vertexAttributeKeysIndexed.One),n.addVertexAttribute(f,r.vertexAttributeKeysIndexed.Two),n.addVertexAttribute(d,r.vertexAttributeKeysIndexed.Three),n.addVertexAttribute(s,r.vertexAttributeKeysIndexed.Four),n.addVertexAttribute(u,r.vertexAttributeKeysIndexed.Five),n.addVertexAttribute(l,r.vertexAttributeKeysIndexed.Six),n.addVertexAttribute(c,r.vertexAttributeKeysIndexed.Seven),n.addUniform(E),n.addUniform(T),n.addUniform(_),n.addUniform(b),n.addUniform(M),n.addUniform(w),n.addUniform(A),n.addShader(o),n.addShader(i),x.addAttribute(n),x.addAttribute(r.blend()),(v=r.actor()).setMaterial(x),v.setMapper(y),C.addSource(S),C.addSource(L),C.addSource(R),C.addSource(I),C.addSource(F),C.addSource(N),C.addSource(j),C.addSource(D),z.setIndices(new Uint16Array(1)),C.addPrimitive(z),C.computeBounds=function(){C.setBounds(0,0,0,0,0,0)},y.setGeometryData(C),k},this.actors=function(){return v?[v]:[]},this._build=function(){return function(t){var e,n,r,o,a,s,u,d,p,m,g,v,x,_,b,S,P,O,L,R,I,D,F,N,j,z,B,q,V,G,U,W,H,Z,X,Q,Y,K,J,$,tt=k.data(),et=0,nt=[{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0},{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0}],rt=nt[1],it=k.gcs(),ot=k.layer().map().gcs(),at=k.line(),st=k.style.get("strokeWidth"),ut=k.style.get("strokeColor"),lt=k.style.get("strokeOpacity"),ct=k.style.get("lineCap"),ht=k.style.get("lineJoin"),ft=k.style.get("strokeOffset"),dt=k.style.get("miterLimit")(tt),pt=k.style.get("antialiasing")(tt)||0,mt=k.style.get("uniformLine"),gt=k.featureVertices(),vt=gt.length,yt=h[k.style.get("debug")(tt)?"debug":"normal"]||0,xt=y.geometryData(),_t=k.style.get("closed"),bt=!0;if(J=f.isFunction(k.style("closed"))?void 0:_t()||!1,R=f.isFunction(k.style("lineCap"))?void 0:l[ct()||"butt"],I=f.isFunction(k.style("lineJoin"))?void 0:c[ht()||"miter"],O=f.isFunction(k.style("strokeColor"))?void 0:ut(),D=f.isFunction(k.style("strokeOffset"))?void 0:ft()||0,L=f.isFunction(k.style("strokeOpacity"))?void 0:lt(),P=f.isFunction(k.style("strokeWidth"))?void 0:st(),F=f.isFunction(k.style("uniformLine"))?void 0:mt(),void 0!==dt&&M.set(Math.max(1,Math.min(100,dt))),A.set(yt),w.set(pt),t)et=T.numSegments,$=T.closed,m=T.lineItemList,p=et*vt,bt=R!==T.lineCapVal||void 0===R||I!==T.lineJoinVal||void 0===I||D!==T.strokeOffsetVal||void 0===D;else{var Mt=[],wt=k.position();for(wt=wt===f.identityFunction?null:wt,m=new Array(tt.length),$=new Array(tt.length),n=0;n<tt.length;n+=1)if(g=at(e=tt[n],n),m[n]=g,!(g.length<2)){for(et+=g.length-1,r=0;r<g.length;r+=1)x=wt?wt(g[r],r,e,n):g[r],Mt.push(x.x),Mt.push(x.y),Mt.push(x.z||0),r||(b=x);g.length>2&&(void 0===J?_t(e,n):J)?x.x!==b.x||x.y!==b.y||x.z!==b.z?(et+=1,$[n]=2):$[n]=1:$[n]=0}if(Mt=i.transformCoordinates(it,ot,Mt,3),(C=new Float32Array(k.style.get("origin")(Mt)))[0]||C[1]||C[2])for(n=0;n<Mt.length;n+=3)Mt[n]-=C[0],Mt[n+1]-=C[1],Mt[n+2]-=C[2];E.setOrigin(C),p=et*vt,V=f.getGeomBuffer(xt,"pos",3*p),G=f.getGeomBuffer(xt,"prev",3*p),U=f.getGeomBuffer(xt,"next",3*p),W=f.getGeomBuffer(xt,"far",3*p),xt.primitive(0).numberOfIndices()!==p&&(xt.primitive(0).numberOfIndices=function(){return p}),T={numSegments:et,closed:$,lineItemList:m,lineCapVal:R,lineJoinVal:I,strokeOffsetVal:D}}for(H=f.getGeomBuffer(xt,"flags",p),Z=f.getGeomBuffer(xt,"strokeWidth",p),X=f.getGeomBuffer(xt,"strokeColor",3*p),Q=f.getGeomBuffer(xt,"strokeOpacity",p),n=_=Y=K=0;n<tt.length;n+=1)if(!((g=m[n]).length<2)){N=void 0===F?mt(g,n):F,e=tt[n],J=$[n],S=_,d=g.length+(2===J?1:0);var At=0;for(r=0;r<d;r+=1,_+=3)if(u=r,r===g.length&&(u=0,_-=3),v=g[u],r&&(rt=nt[0],nt[0]=nt[1],nt[1]=rt),t||(rt.pos=r===u?_:S,rt.prev=u?_-3:J?S+3*(g.length-3+J):_,rt.next=r+1<g.length?_+3:J?r!==u?S+3:S+6-3*J:_),N&&r>0?1===r&&(rt.strokeWidth=nt[0].strokeWidth,rt.strokeColor=nt[0].strokeColor,rt.strokeOpacity=nt[0].strokeOpacity):(rt.strokeWidth=void 0===P?st(v,u,e,n):P,rt.strokeColor=void 0===O?ut(v,u,e,n):O,rt.strokeOpacity=void 0===L?lt(v,u,e,n):L),bt&&(0!==D&&(N&&r>0?1===r&&(rt.strokeOffset=nt[0].strokeOffset):rt.strokeOffset=(void 0===D?ft(v,u,e,n):D)||0,rt.strokeOffset?(rt.posStrokeOffset=2047&Math.round(2048+1023*Math.min(1,Math.max(-1,rt.strokeOffset))),rt.negStrokeOffset=2047&Math.round(2048-1023*Math.min(1,Math.max(-1,rt.strokeOffset)))):rt.posStrokeOffset=rt.negStrokeOffset=0),J||r&&r!==g.length-1?rt.flags=void 0===I?c[ht(v,u,e,n)]||c.miter:I:rt.flags=void 0===R?l[ct(v,u,e,n)]||l.butt:R),r){if("drop"===N&&r>1&&Mt[nt[0].pos]===Mt[nt[1].pos]&&Mt[nt[0].pos+1]===Mt[nt[1].pos+1]){At+=1;continue}for(o=0;o<vt;o+=1,Y+=1,K+=3)"drop"===N&&nt[0].strokeOpacity<=0&&nt[1].strokeOpacity<=0?Q[Y]=-1:(a=nt[j=gt[o][0]],s=nt[1-j],t||(V[K]=Mt[a.pos],V[K+1]=Mt[a.pos+1],V[K+2]=0,z=j?"next":"prev",B=j?"prev":"next",G[K]=Mt[a[z]],G[K+1]=Mt[a[z]+1],G[K+2]=0,U[K]=Mt[a[B]],U[K+1]=Mt[a[B]+1],U[K+2]=0,W[K]=Mt[s[B]],W[K+1]=Mt[s[B]+1],W[K+2]=0),bt&&(q=j?"posStrokeOffset":"negStrokeOffset",H[Y]=gt[o][3]+4*a.flags+32*s.flags+256*a[q]),Z[Y]=a.strokeWidth,X[K]=a.strokeColor.r,X[K+1]=a.strokeColor.g,X[K+2]=a.strokeColor.b,a.strokeOpacity<=0&&s.strokeOpacity<=0||a.strokeWidth<=0&&s.strokeWidth<=0?Q[Y]=-1:Q[Y]=a.strokeOpacity)}if(At)for(o=0;o<At*vt;o+=1,Y+=1,K+=3)Q[Y]=-1}t?(bt&&y.updateSourceBuffer("flags"),y.updateSourceBuffer("strokeWidth"),y.updateSourceBuffer("strokeOpacity"),y.updateSourceBuffer("strokeColor")):(y.modified(),xt.boundsDirty(!0),y.boundsDirtyTimestamp().modified())}(!!(k.dataTime().timestamp()<k.buildTime().timestamp()&&T)),k.renderer().contextRenderer().hasActor(v)||k.renderer().contextRenderer().addActor(v),k.buildTime().modified(),k},this._update=function(){return L.call(k),(k.dataTime().timestamp()>=k.buildTime().timestamp()||k.updateTime().timestamp()<=k.timestamp())&&k._build(),_.set(1/k.renderer().width()),b.set(k.renderer().width()/k.renderer().height()),v.setVisible(k.visible()),v.material().setBinNumber(k.bin()),k.updateTime().modified(),k},this._exit=function(){k.renderer().contextRenderer().removeActor(v),v=null,S()},this._init(e),this};r(f,o);var d={};d[o.capabilities.basic]=!0,d[o.capabilities.multicolor]=!0,i("webgl","line",f,d),t.exports=f},8672:function(t,e,n){var r=n(5699),i=n(6618),o=n(5140);var a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.texture.call(this);var n,r=i(),a=e.maxWidth||4096,s=new Uint8Array([0,0,0,0]),u=this;return this.setup=function(t){!function(t,e){if(!(e>=0&&e<=31))throw Error("[error] Texture unit "+e+" is not supported");t.m_context.activeTexture(o.GL.TEXTURE0+e)}(t,u.textureUnit()),t.m_context.deleteTexture(u.m_textureHandle),u.m_textureHandle=t.m_context.createTexture(),t.m_context.bindTexture(o.GL.TEXTURE_2D,u.m_textureHandle),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MIN_FILTER,o.GL.NEAREST),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MAG_FILTER,o.GL.NEAREST),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_S,o.GL.CLAMP_TO_EDGE),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_T,o.GL.CLAMP_TO_EDGE),t.m_context.pixelStorei(o.GL.UNPACK_ALIGNMENT,1),t.m_context.pixelStorei(o.GL.UNPACK_FLIP_Y_WEBGL,!0),t.m_context.texImage2D(o.GL.TEXTURE_2D,0,o.GL.RGBA,u.width,u.height,0,o.GL.RGBA,o.GL.UNSIGNED_BYTE,s),t.m_context.bindTexture(o.GL.TEXTURE_2D,null),r.modified()},this.colorTable=function(t){return void 0===t?n:(n=t,t.length<4&&(t=[0,0,0,0]),u.width=Math.min(a,t.length/4),u.height=Math.ceil(t.length/4/a),t instanceof Uint8Array&&t.length===u.width*u.height*4?s=t:(t.length<u.width*u.height*4&&(t=t.concat(new Array(u.width*u.height*4-t.length).fill(0))),s=new Uint8Array(t)),u.modified(),u)},this.maxWidth=function(){return a},this.colorTable(e.colorTable||[]),this};r(a,o.texture),t.exports=a},1848:function(t,e,n){var r=n(5638),i=n(5699),o=n(4647).registerFeature,a=n(7098),s=n(2254),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var i=n(5140),o=n(6853),u=n(4634),l=n(7719),c=n(9892),h=n(5108),f=n(5573),d=n(468),p=n(2043),m=n(7981);l.call(this);var g,v,y=this,x=this._exit,_=null,b=null,M={},w=this._init,A=this._update,T=this.updateStyleFromArray;function C(t){var e,n,r,i,l,c,h,f,d,p,m,x,M,w=y.data().length,A=y._pointPolygon(0,0,1,1),T=new Array(3*w),E={},k={},S={},P={},O={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeOffset:0,strokeWidth:1,symbol:1,symbolValue:1,rotation:1,scaleWithZoom:0,rotateWithMap:0,radiusIncludesStroke:0},L=y.verticesPerFeature(),R=y.data(),I=b.geometryData();for(var D in l=y.position(),O)S[D]=y.style.get(D),u.isFunction(y.style(D))||(P[D]=S[D]()),O[D]&&(E[D]=u.getGeomBuffer(I,D,L*w*O[D]));if(!t){for(e=x=0;e<w;e+=1,x+=3)i=l(R[e],e),T[x]=i.x,T[x+1]=i.y,T[x+2]=0;if(T=o.transformCoordinates(y.gcs(),y.layer().map().gcs(),T,3),(v=new Float32Array(y.style.get("origin")(T)))[0]||v[1]||v[2])for(e=x=0;e<w;e+=1,x+=3)T[x]-=v[0],T[x+1]-=v[1],T[x+2]-=v[2];g.setOrigin(v),r=u.getGeomBuffer(I,"pos",L*w*3),y._primitiveShape!==a.primitiveShapes.sprite&&(h=u.getGeomBuffer(I,"unit",L*w*2)),(c=I.primitive(0).indices())instanceof Uint16Array&&c.length===L*w||(c=new Uint16Array(L*w),I.primitive(0).setIndices(c))}for(e=d=p=m=x=0;e<w;e+=1,x+=3){if(f=R[e],!t&&y._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<A.length;n+=1,m+=1)h[m]=A[n];for(var F in O)k[F]=void 0===P[F]?S[F](f,e):P[F];for(k.scaleWithZoom=a.scaleMode[k.scaleWithZoom]||(k.scaleWithZoom>=1&&k.scaleWithZoom<=3?k.scaleWithZoom:0),k.symbolComputed=k.scaleWithZoom+(k.rotateWithMap?4:0)+16*(Math.sign(void 0!==k.radiusIncludesStroke&&k.radiusIncludesStroke?k.strokeOffset:1)+1)+64*k.symbol,k.symbolValue&&k.symbol>=a.symbols.arrow&&k.symbol<a.symbols.arrow+a.symbols.arrowMax&&(k.symbolValue=(M=k.symbolValue).length?((void 0===M[0]?0:Math.floor(250*Math.abs(M[0]))+1)+252*(void 0===M[1]?0:Math.floor(250*Math.abs(M[1]))+1)+252*(void 0===M[2]?0:Math.floor(250*Math.abs(M[2]))+1)*252)*(M[3]?-1:1):void 0===M?0:Math.floor(250*Math.abs(M))+1),n=0;n<L;n+=1,d+=1,p+=3)t||(r[p]=T[x],r[p+1]=T[x+1],r[p+2]=T[x+2]),E.radius[d]=k.radius,E.fillColor[p]=k.fillColor.r,E.fillColor[p+1]=k.fillColor.g,E.fillColor[p+2]=k.fillColor.b,E.fillOpacity[d]=k.fillOpacity,E.strokeColor[p]=k.strokeColor.r,E.strokeColor[p+1]=k.strokeColor.g,E.strokeColor[p+2]=k.strokeColor.b,E.strokeOpacity[d]=k.strokeOpacity,E.strokeWidth[d]=k.strokeWidth,E.symbol[d]=k.symbolComputed,E.symbolValue[d]=k.symbolValue,E.rotation[d]=k.rotation}if(y._primitiveShapeAuto){var N=y._approximateMaxRadius(y.renderer().map().zoom());if(y._primitiveShape===a.primitiveShapes.sprite&&N>s._maxPointSize||y._primitiveShape!==a.primitiveShapes.sprite&&N<=s._maxPointSize)return y._primitiveShape=N>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,y.renderer().contextRenderer().removeActor(_),_=null,y._init(!0),void C()}t?Object.keys(E).forEach((function(t){return b.updateSourceBuffer(t)})):(I.boundsDirty(!0),b.modified(),b.boundsDirtyTimestamp().modified())}return c(y,e),this.actors=function(){return _?[_]:[]},this.updateStyleFromArray=function(t,e,n){var i,o,a={fillColor:3,fillOpacity:1,radius:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbolComputed:1,symbolValueComputed:1};if("string"==typeof t){var s={};s[t]=e,t=s}return r.each(t,(function(t,e){var n,r,s,u,l,c,h,f,d,p;if(y.visible()&&_&&a[t]&&!i&&!y.clustering())if(d=a[t],u=y.data().length,p="symbolComputed"===t?"symbol":"symbolValueComputed"===t?"symbolValue":t,s=(r=_.mapper()).getSourceBuffer(p),n=y.verticesPerFeature(),s&&u&&u*n*d===s.length){switch(a[t]){case 1:for(c=0,f=0;c<u;c+=1)for(l=e[c],h=0;h<n;h+=1,f+=1)s[f]=l;break;case 3:for(c=0,f=0;c<u;c+=1)for(l=e[c],h=0;h<n;h+=1,f+=3)s[f]=l.r,s[f+1]=l.g,s[f+2]=l.b}r.updateSourceBuffer(p),o=!0}else i=!0;else i=!0;if(t===p){var m=y.modified;i||(y.modified=function(){}),T(t,e,!1),y.modified=m}})),n&&(y.visible()&&i?y.draw():o&&y.renderer()._render()),y},this._handleZoom=function(t){y._primitiveShapeAuto&&y._primitiveShape===a.primitiveShapes.sprite&&y._approximateMaxRadius(t)>s._maxPointSize&&(y._primitiveShape=a.primitiveShapes.triangle,y.renderer().contextRenderer().removeActor(y.actors()[0]),y._init(!0),y.dataTime().modified(),y.draw())},this._init=function(t){var n,r,o=i.shaderProgram(),s=((r=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?m:p),r),u=function(){var t=new i.shader(i.GL.FRAGMENT_SHADER);return t.setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?d:f),t}(),l=i.material(),c=i.blend(),x=i.geometryData(),A=i.sourceDataP3fv({name:"pos"}),T={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbol:1,symbolValue:1,rotation:1},C={pixelWidth:i.GL.FLOAT,aspect:i.GL.FLOAT,zoom:i.GL.FLOAT,rotationUniform:i.GL.FLOAT},E=new i.projectionUniform("projectionMatrix");g=new i.modelViewOriginUniform("modelViewMatrix",v),y._primitiveShape===a.primitiveShapes.sprite?n=new i.points:(n=new i.triangles,T.unit=2),n.setIndices(new Uint16Array),t||w.call(y,e),b=i.mapper(),o.addVertexAttribute(i.vertexAttribute("pos"),i.vertexAttributeKeys.Position),x.addSource(A),Object.keys(T).forEach((function(t,e){o.addVertexAttribute(i.vertexAttribute(t),e+1),x.addSource(i.sourceDataAnyfv(T[t],e+1,{name:t}))})),M={},Object.keys(C).forEach((function(t){M[t]=new i.uniform(C[t],t),o.addUniform(M[t])})),o.addUniform(g),o.addUniform(E),o.addShader(u),o.addShader(s),l.addAttribute(o),l.addAttribute(c),(_=i.actor()).setMaterial(l),_.setMapper(b),x.addPrimitive(n),x.computeBounds=function(){x.setBounds(0,0,0,0,0,0)},b.setGeometryData(x),t||y.geoOn(h.zoom,(function(t){y._handleZoom(t.zoomLevel)}))},this._build=function(){return C(y.dataTime().timestamp()<y.buildTime().timestamp()),y.renderer().contextRenderer().hasActor(_)||y.renderer().contextRenderer().addActor(_),y.buildTime().modified(),y},this._update=function(){return A.call(y),(y.dataTime().timestamp()>=y.buildTime().timestamp()||y.updateTime().timestamp()<y.timestamp())&&y._build(),M.pixelWidth.set(2/y.renderer().width()),M.aspect.set(y.renderer().width()/y.renderer().height()),M.zoom.set(y.renderer().map().zoom()),M.rotationUniform.set(y.renderer().map().rotation()),_.setVisible(y.visible()),_.material().setBinNumber(y.bin()),y.updateTime().modified(),y},this._exit=function(){y.renderer().contextRenderer().removeActor(_),_=null,M={},x()},y._init(),this};i(u,a);o("webgl","marker",u,{}),t.exports=u},5651:function(t,e,n){t.exports=function(t){"use strict";t=t||{};var e=n(5140),r=n(6853),i=n(4634),o=n(4351),a=n(5836);n(7719).call(this);var s,u,l=this,c=this._exit,h=null,f=null,d=null,p=null,m=null,g=null,v=null,y=null,x=void 0!==t.dynamicDraw&&t.dynamicDraw,_=this._init,b=this._update;function M(){var t=new e.shader(e.GL.VERTEX_SHADER);return t.setShaderSource(a),t}function w(){var t=new e.shader(e.GL.FRAGMENT_SHADER);return t.setShaderSource(o),t}return this.createGLMeshColored=function(t){var e,n,o,a,c,h,d,x,_,b=t.elements.length,M=[],w=f.geometryData();for(m.set([t.minColor.r,t.minColor.g,t.minColor.b,t.minColor.a]),g.set([t.maxColor.r,t.maxColor.g,t.maxColor.b,t.maxColor.a]),v.set(t.colorMap.length),y.set(t.stepped),e=-1;e<t.colorMap.length+1;e+=1)o=Math.max(0,Math.min(t.colorMap.length-1,e)),M.push(255*t.colorMap[o].r),M.push(255*t.colorMap[o].g),M.push(255*t.colorMap[o].b),M.push(255*t.colorMap[o].a);if(p.setColorTable(M),t.pos=r.transformCoordinates(l.gcs(),l.layer().map().gcs(),t.pos,3),(s=new Float32Array(l.style.get("origin")(t.pos)))[0]||s[1]||s[2])for(e=0;e<t.pos.length;e+=3)t.pos[e]-=s[0],t.pos[e+1]-=s[1],t.pos[e+2]-=s[2];for(u.setOrigin(s),h=i.getGeomBuffer(w,"pos",3*b),d=i.getGeomBuffer(w,"opacity",b),x=i.getGeomBuffer(w,"value",b),e=n=0;e<b;e+=1,n+=3)a=3*(o=t.elements[e]),h[n]=t.pos[a],h[n+1]=t.pos[a+1],h[n+2]=t.pos[a+2],c=t.elementValues?Math.floor(e/3):o,d[e]=t.opacity[c],x[e]=t.value[c];(_=w.primitive(0).indices())instanceof Uint16Array&&_.length===b||(_=new Uint16Array(b),w.primitive(0).setIndices(_)),w.boundsDirty(!0),f.modified(),f.boundsDirtyTimestamp().modified()},this._init=function(t){var n=e.blend(),r=e.shaderProgram(),i=e.material(),o=e.lookupTable(),a=e.geometryData(),s=new e.projectionUniform("projectionMatrix"),c=new e.uniform(e.GL.INT,"sampler2d"),b=M(),A=w(),T=e.vertexAttribute("pos"),C=e.vertexAttribute("value"),E=e.vertexAttribute("opacity"),k=e.sourceDataP3fv({name:"pos"}),S=e.sourceDataAnyfv(1,e.vertexAttributeKeysIndexed.One,{name:"value"}),P=e.sourceDataAnyfv(1,e.vertexAttributeKeysIndexed.Two,{name:"opacity"}),O=new e.triangles;u=new e.modelViewOriginUniform("modelViewMatrix"),_.call(l,t),f=e.mapper({dynamicDraw:x}),r.addVertexAttribute(T,e.vertexAttributeKeys.Position),r.addVertexAttribute(C,e.vertexAttributeKeysIndexed.One),r.addVertexAttribute(E,e.vertexAttributeKeysIndexed.Two),r.addUniform(u),r.addUniform(s),m=new e.uniform(e.GL.FLOAT_VEC4,"minColor"),r.addUniform(m),g=new e.uniform(e.GL.FLOAT_VEC4,"maxColor"),r.addUniform(g),v=new e.uniform(e.GL.FLOAT,"steps"),r.addUniform(v),y=new e.uniform(e.GL.BOOL,"stepped"),r.addUniform(y),r.addShader(A),r.addShader(b),r.addUniform(c),o.setTextureUnit(7),c.set(7),(d=i).addAttribute(r),d.addAttribute(n),p=o,d.addAttribute(p),(h=e.actor()).setMaterial(d),h.setMapper(f),a.addSource(k),a.addSource(S),a.addSource(P),a.addPrimitive(O),a.computeBounds=function(){a.setBounds(0,0,0,0,0,0)},f.setGeometryData(a)},this.actors=function(){return h?[h]:[]},this._update=function(){b.call(l),(l.dataTime().timestamp()>=l.buildTime().timestamp()||l.updateTime().timestamp()<=l.timestamp())&&l._build(),h.setVisible(l.visible()),h.material().setBinNumber(l.bin()),l.updateTime().modified()},this._exit=function(){l.renderer().contextRenderer().removeActor(h),c()},this}},7719:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var r=this,i=this.draw;if(this.draw=function(){return r.ready&&(r._update({mayDelay:!0}),r.renderer()._render(),i()),r},this.bin){var o=this.bin;this.bin=function(t,e){if(void 0===t&&!e&&null===o(void 0,!0)){var n=r.layer&&r.layer(),i=n&&n.map&&n.map(),a=(i&&i.listSceneObjects()||[]).indexOf(r);if(a>=0)return a}return o.apply(r,arguments)}}return this}},9685:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(6374),a=n(8672),s=n(4634),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(7719).call(this);var r,i,u,l=n(5140),c=n(3953),h=this._exit,f=this;return this.pointSearch=function(t,e){if(r&&f.m_info)for(var n=r.pointSearch(t,e),i=n.index.length-1;i>=0;i-=1)if(n.extra[n.index[i]]._quad&&n.extra[n.index[i]]._quad.image){var o=n.extra[n.index[i]]._quad.image,a=n.extra[n.index[i]].basis,s=Math.floor(a.x*o.width),u=Math.floor(a.y*o.height),l=document.createElement("canvas");l.width=l.height=1;var c=l.getContext("2d");c.drawImage(o,s,u,1,1,0,0,1,1);var h=c.getImageData(0,0,1,1).data,d=h[0]+256*h[1]+256*h[2]*256;return n={index:[d],found:[f.data()[d]]}}return{index:[],found:[]}},this._computePixelmap=function(){var t=f.data()||[],e=f.style.get("color"),n=f.indexModified(void 0,"clear"),o=f.dataTime().timestamp()>=f.buildTime().timestamp()||void 0===n;u||((u=a()).setTextureUnit(1),o=!0);var h,d=Math.max(1,t.length),p=u.maxWidth();d>p&&d%p&&(d+=p-d%p),o||(o=(h=u.colorTable()).length!==4*d,n[0]=Math.max(0,n[0]),n[1]=Math.min(t.length,n[1]+1)),o&&(h=new Uint8Array(4*d),n=[0,t.length]);for(var m=n[0];m<n[1];m+=1){var g=t[m],v=s.convertColor(e.call(f,g,m));h[4*m]=255*v.r,h[4*m+1]=255*v.g,h[4*m+2]=255*v.b,h[4*m+3]=void 0===v.a?255:255*v.a}f.m_info={colors:h};var y=u.colorTable();if(y&&y.length===h.length){for(var x=4*n[0];x<4*n[1]&&h[x]===y[x];x+=1);if(x===4*n[1])return}u.colorTable(h),r||(r=f.layer().createFeature("quad",{selectionAPI:!1,gcs:f.gcs(),visible:f.visible(void 0,!0),nearestPixel:!0}),i=!1),i||(f.dependentFeatures([r]),r.setShader("image_fragment",c),r._hookBuild=function(t){var e=new l.uniform(l.GL.INT,"lutSampler");e.set(u.textureUnit()),t.addUniform(e);var n=new l.uniform(l.GL.INT,"lutWidth");n.set(u.width),t.addUniform(n);var r=new l.uniform(l.GL.INT,"lutHeight");r.set(u.height),t.addUniform(r)},r._hookRenderImageQuads=function(t,e){u.bind(t,e)},!1===i&&r.style({image:f.m_srcImage,position:f.style.get("position")}).data([{}]).draw(),i=!0)},this._exit=function(){return r&&f.layer()&&(f.layer().deleteFeature(r),r=null,f.dependentFeatures([])),h(),f},e.quadFeature&&(r=e.quadFeature).nearestPixel&&r.nearestPixel(!0),this._init(e),this};r(u,o);var l={};l[o.capabilities.lookup]=!0,i("webgl","pixelmap",u,l),t.exports=u},5675:function(t,e,n){var r=n(5638),i=n(5699),o=n(4647).registerFeature,a=n(2557),s=n(2254),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var i=n(5140),o=n(6853),u=n(4634),l=n(7719),c=n(9892),h=n(1815),f=n(4900),d=n(9713),p=n(8410);l.call(this);var m,g,v=this,y=this._exit,x=null,_=null,b=null,M=null,w=void 0!==e.dynamicDraw&&e.dynamicDraw,A=this._init,T=this._update,C=this.updateStyleFromArray;function E(t){var e,n,r,i,l,c,h,f,d,p,y,b,M,w,A,T,C,k,S,P,O,L,R,I,D,F,N,j,z,B,q,V,G,U,W,H,Z=v.data().length,X=v._pointPolygon(0,0,1,1),Q=new Array(3*Z),Y=v.verticesPerFeature(),K=v.data(),J=0,$=_.geometryData();if(l=v.position(),p=v.style.get("radius"),M=v.style.get("stroke"),T=v.style.get("strokeWidth"),S=v.style.get("strokeOpacity"),L=v.style.get("strokeColor"),D=v.style.get("fill"),j=v.style.get("fillOpacity"),q=v.style.get("fillColor"),!t){for(e=H=0;e<Z;e+=1,H+=3)i=l(K[e],e),Q[H]=i.x,Q[H+1]=i.y,Q[H+2]=0;if(Q=o.transformCoordinates(v.gcs(),v.layer().map().gcs(),Q,3),(g=new Float32Array(v.style.get("origin")(Q)))[0]||g[1]||g[2])for(e=H=0;e<Z;e+=1,H+=3)Q[H]-=g[0],Q[H+1]-=g[1],Q[H+2]-=g[2];m.setOrigin(g),r=u.getGeomBuffer($,"pos",Y*Z*3),c=u.getGeomBuffer($,"unit",Y*Z*2),(h=$.primitive(0).indices())instanceof Uint16Array&&h.length===Y*Z||(h=new Uint16Array(Y*Z),$.primitive(0).setIndices(h))}for(f=u.getGeomBuffer($,"radius",Y*Z),y=u.getGeomBuffer($,"stroke",Y*Z),w=u.getGeomBuffer($,"strokeWidth",Y*Z),C=u.getGeomBuffer($,"strokeOpacity",Y*Z),P=u.getGeomBuffer($,"strokeColor",Y*Z*3),R=u.getGeomBuffer($,"fill",Y*Z),F=u.getGeomBuffer($,"fillOpacity",Y*Z),z=u.getGeomBuffer($,"fillColor",Y*Z*3),e=G=U=W=H=0;e<Z;e+=1,H+=3){if(V=K[e],!t&&v._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<X.length;n+=1,W+=1)c[W]=X[n];for(d=p(V,e),b=M(V,e)?1:0,A=T(V,e),k=S(V,e),O=L(V,e),I=D(V,e)?1:0,N=j(V,e),B=q(V,e),v._primitiveShapeAuto&&(I&&N||b&&k)&&d+(b&&k?A:0)>J&&(J=d+(b&&k?A:0)),n=0;n<Y;n+=1,G+=1,U+=3)t||(r[U]=Q[H],r[U+1]=Q[H+1],r[U+2]=Q[H+2]),f[G]=d,y[G]=b,w[G]=A,C[G]=k,P[U]=O.r,P[U+1]=O.g,P[U+2]=O.b,R[G]=I,F[G]=N,z[U]=B.r,z[U+1]=B.g,z[U+2]=B.b}if(v._primitiveShapeAuto&&(v._primitiveShape===a.primitiveShapes.sprite&&J>s._maxPointSize||v._primitiveShape!==a.primitiveShapes.sprite&&J<=s._maxPointSize))return v._primitiveShape=J>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,v.renderer().contextRenderer().removeActor(x),x=null,v._init(!0),void E();t?(_.updateSourceBuffer("radius"),_.updateSourceBuffer("stroke"),_.updateSourceBuffer("strokeWidth"),_.updateSourceBuffer("strokeColor"),_.updateSourceBuffer("strokeOpacity"),_.updateSourceBuffer("fill"),_.updateSourceBuffer("fillColor"),_.updateSourceBuffer("fillOpacity")):($.boundsDirty(!0),_.modified(),_.boundsDirtyTimestamp().modified())}return c(v,e),this.actors=function(){return x?[x]:[]},this.updateStyleFromArray=function(t,e,n){var i,o,a={fill:"bool",fillColor:3,fillOpacity:1,radius:1,stroke:"bool",strokeColor:3,strokeOpacity:1,strokeWidth:1};if("string"==typeof t){var s={};s[t]=e,t=s}return r.each(t,(function(t,e){var n,r,s,u,l,c,h,f,d;if(v.visible()&&x&&a[t]&&!i&&!v.clustering())if(d="bool"===a[t]?1:a[t],u=v.data().length,s=(r=x.mapper()).getSourceBuffer(t),n=v.verticesPerFeature(),s&&u&&u*n*d===s.length){switch(a[t]){case 1:for(c=0,f=0;c<u;c+=1)for(l=e[c],h=0;h<n;h+=1,f+=1)s[f]=l;break;case 3:for(c=0,f=0;c<u;c+=1)for(l=e[c],h=0;h<n;h+=1,f+=3)s[f]=l.r,s[f+1]=l.g,s[f+2]=l.b;break;case"bool":for(c=0,f=0;c<u;c+=1)for(l=e[c]?1:0,h=0;h<n;h+=1,f+=1)s[f]=l}r.updateSourceBuffer(t),o=!0}else i=!0;else i=!0;var p=v.modified;i||(v.modified=function(){}),C(t,e,!1),v.modified=p})),n&&(v.visible()&&i?v.draw():o&&v.renderer()._render()),v},this._init=function(t){var n,r,o=i.shaderProgram(),s=((r=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?p:d),r),u=function(){var t=new i.shader(i.GL.FRAGMENT_SHADER);return t.setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?f:h),t}(),l=i.vertexAttribute("pos"),c=i.vertexAttribute("unit"),y=i.vertexAttribute("radius"),T=i.vertexAttribute("strokeWidth"),C=i.vertexAttribute("fillColor"),E=i.vertexAttribute("fill"),k=i.vertexAttribute("strokeColor"),S=i.vertexAttribute("stroke"),P=i.vertexAttribute("fillOpacity"),O=i.vertexAttribute("strokeOpacity"),L=new i.projectionUniform("projectionMatrix"),R=i.material(),I=i.blend(),D=i.geometryData(),F=i.sourceDataP3fv({name:"pos"}),N=i.sourceDataAnyfv(2,i.vertexAttributeKeysIndexed.One,{name:"unit"}),j=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Two,{name:"radius"}),z=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Three,{name:"strokeWidth"}),B=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Four,{name:"fillColor"}),q=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Five,{name:"fill"}),V=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Six,{name:"strokeColor"}),G=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Seven,{name:"stroke"}),U=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Eight,{name:"fillOpacity"}),W=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Nine,{name:"strokeOpacity"});m=new i.modelViewOriginUniform("modelViewMatrix",g),(n=v._primitiveShape===a.primitiveShapes.sprite?new i.points:new i.triangles).setIndices(new Uint16Array),b=new i.floatUniform("pixelWidth",2/v.renderer().width()),M=new i.floatUniform("aspect",v.renderer().width()/v.renderer().height()),t||A.call(v,e),_=i.mapper({dynamicDraw:w}),o.addVertexAttribute(l,i.vertexAttributeKeys.Position),v._primitiveShape!==a.primitiveShapes.sprite&&o.addVertexAttribute(c,i.vertexAttributeKeysIndexed.One),o.addVertexAttribute(y,i.vertexAttributeKeysIndexed.Two),o.addVertexAttribute(T,i.vertexAttributeKeysIndexed.Three),o.addVertexAttribute(C,i.vertexAttributeKeysIndexed.Four),o.addVertexAttribute(E,i.vertexAttributeKeysIndexed.Five),o.addVertexAttribute(k,i.vertexAttributeKeysIndexed.Six),o.addVertexAttribute(S,i.vertexAttributeKeysIndexed.Seven),o.addVertexAttribute(P,i.vertexAttributeKeysIndexed.Eight),o.addVertexAttribute(O,i.vertexAttributeKeysIndexed.Nine),o.addUniform(b),o.addUniform(M),o.addUniform(m),o.addUniform(L),o.addShader(u),o.addShader(s),R.addAttribute(o),R.addAttribute(I),(x=i.actor()).setMaterial(R),x.setMapper(_),D.addSource(F),D.addSource(N),D.addSource(j),D.addSource(z),D.addSource(B),D.addSource(q),D.addSource(V),D.addSource(G),D.addSource(U),D.addSource(W),D.addPrimitive(n),D.computeBounds=function(){D.setBounds(0,0,0,0,0,0)},_.setGeometryData(D)},this._build=function(){return E(v.dataTime().timestamp()<v.buildTime().timestamp()),v.renderer().contextRenderer().hasActor(x)||v.renderer().contextRenderer().addActor(x),v.buildTime().modified(),v},this._update=function(){return T.call(v),(v.dataTime().timestamp()>=v.buildTime().timestamp()||v.updateTime().timestamp()<v.timestamp())&&v._build(),b.set(2/v.renderer().width()),M.set(v.renderer().width()/v.renderer().height()),x.setVisible(v.visible()),x.material().setBinNumber(v.bin()),v.updateTime().modified(),v},this._exit=function(){v.renderer().contextRenderer().removeActor(x),x=null,y()},v._init(),this};i(u,a);var l={};l[a.capabilities.stroke]=!0,o("webgl","point",u,l),t.exports=u},9892:function(t,e,n){var r=n(2557);t.exports=function(t,e){e=e||{},t._primitiveShapeAuto=!0,t._primitiveShape=r.primitiveShapes.auto,void 0!==r.primitiveShapes[e.primitiveShape]&&(t._primitiveShape=e.primitiveShape),t._primitiveShapeAuto=t._primitiveShape===r.primitiveShapes.auto,t._primitiveShapeAuto&&(t._primitiveShape=r.primitiveShapes.sprite,t._primitiveShapeAuto=!0),t._pointPolygon=function(e,n,i,o){var a;switch(t._primitiveShape){case r.primitiveShapes.triangle:a=[e,n-2*o,e-i*Math.sqrt(3),n+o,e+i*Math.sqrt(3),n+o];break;case r.primitiveShapes.square:a=[e-i,n+o,e-i,n-o,e+i,n+o,e-i,n-o,e+i,n-o,e+i,n+o];break;default:a=[e,n]}return a},t.verticesPerFeature=function(){return t._pointPolygon(0,0,1,1).length/2},t.primitiveShape=function(e,n){if(void 0===e)return n||!t._primitiveShapeAuto?t._primitiveShape:r.primitiveShapes.auto;if(void 0!==r.primitiveShapes[e]){var i=!1;e===r.primitiveShapes.auto?(i=!t._primitiveShapeAuto,t._primitiveShapeAuto=!0):(i=t._primitiveShapeAuto||t._primitiveShape!==e,t._primitiveShapeAuto=!1,t._primitiveShape=e),i&&(t.renderer().contextRenderer().removeActor(t.actors()[0]),t._init(!0),t.dataTime().modified())}return t}}},2890:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(4343),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r=n(5140),i=n(1106),a=n(6853),s=n(4634),u=n(7719),l=n(1859),c=n(5810);u.call(this);var h,f,d,p,m,g=this,v=this._exit,y=r.actor(),x=r.mapper(),_=r.material(),b=this._init,M=this._update;function w(){var t=new r.shader(r.GL.VERTEX_SHADER);return t.setShaderSource(c),t}function A(){var t=new r.shader(r.GL.FRAGMENT_SHADER);return t.setShaderSource(l),t}return this._init=function(t){var e=r.shaderProgram(),n=r.vertexAttribute("pos"),i=r.vertexAttribute("fillColor"),o=r.vertexAttribute("fillOpacity"),a=new r.projectionUniform("projectionMatrix"),s=w(),u=A(),l=r.blend(),c=r.geometryData(),h=r.sourceDataP3fv({name:"pos"}),f=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Two,{name:"fillColor"}),p=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"fillOpacity"}),m=r.triangles();d=new r.modelViewOriginUniform("modelViewMatrix"),e.addVertexAttribute(n,r.vertexAttributeKeys.Position),e.addVertexAttribute(i,r.vertexAttributeKeysIndexed.Two),e.addVertexAttribute(o,r.vertexAttributeKeysIndexed.Three),e.addUniform(d),e.addUniform(a),e.addShader(u),e.addShader(s),_.addAttribute(e),_.addAttribute(l),y.setMaterial(_),y.setMapper(x),c.addSource(h),c.addSource(f),c.addSource(p),c.addPrimitive(m),c.computeBounds=function(){c.setBounds(0,0,0,0,0,0)},x.setGeometryData(c),b.call(g,t)},this.actors=function(){return[y]},this._build=function(){!function(t){var e,n,r,o,u,l,c,p,m,v,y,_,b,M,w,A,T,C,E,k,S,P,O,L,R,I,D,F,N,j=[],z=g.gcs(),B=g.layer().map().gcs(),q=0,V=x.geometryData();for(u=g.style.get("fillColor"),l=s.isFunction(g.style("fillColor"))?void 0:u(),p=g.style.get("fillOpacity"),m=s.isFunction(g.style("fillOpacity"))?void 0:p(),v=g.style.get("fill"),y=s.isFunction(g.style("fill"))?void 0:v(),_=g.style.get("uniformPolygon"),b=s.isFunction(g.style("uniformPolygon"))?void 0:_(),t?(j=h.items,q=h.numPts):(n=(n=g.style.get("position"))===s.identityFunction?null:n,r=(r=g.style.get("polygon"))===s.identityFunction?null:r,g.data().forEach((function(t,e){var o,s,u,l;if((o=r?r(t,e):t)&&!((s=o.outer||(Array.isArray(o)?o:[])).length<3)){for(u=new Array(3*s.length),P=k=0;P<s.length;P+=1,k+=3)l=n?n(s[P],P,t,e):s[P],u[k]=l.x,u[k+1]=l.y,u[k+2]=0;u={vertices:u,dimensions:3,holes:[]},N=s,o.inner&&o.inner.forEach((function(r){if(!(r.length<3))for(N=N.concat(r),u.holes.push(k/3),P=0;P<r.length;P+=1,k+=3)l=n?n(r[P],P,t,e):r[P],u.vertices[k]=l.x,u.vertices[k+1]=l.y,u.vertices[k+2]=0})),u.vertices=a.transformCoordinates(z,B,u.vertices,u.dimensions),(I={triangles:i(u.vertices,u.holes,u.dimensions),vertices:u.vertices,original:N,item:t,itemIndex:e}).triangles.length&&(j.push(I),q+=I.triangles.length)}})),e=s.getGeomBuffer(V,"pos",3*q),(w=V.primitive(0).indices())instanceof Uint16Array&&w.length===q||(w=new Uint16Array(q),V.primitive(0).setIndices(w)),h={items:j,numPts:q},f=new Float32Array(g.style.get("origin")(j)),d.setOrigin(f)),o=s.getGeomBuffer(V,"fillColor",3*q),c=s.getGeomBuffer(V,"fillOpacity",q),E=k=0,A=l,C=y,L=0;L<j.length;L+=1)if(R=j[L].triangles.length,S=j[L].vertices,D=j[L].item,F=j[L].itemIndex,N=j[L].original,T=m,(M=void 0===b?_(D,F):b)&&(void 0===l&&(A=u(S[0],0,D,F)),void 0===m&&(T=p(S[0],0,D,F))),void 0===y&&(C=v(D,F)),C||(T=0),M&&t&&j[L].uniform&&j[L].color&&A.r===j[L].color.r&&A.g===j[L].color.g&&A.b===j[L].color.b&&T===j[L].opacity)E+=R,k+=3*R;else{for(P=0;P<R;P+=1,E+=1,k+=3)t&&M?(o[k]=A.r,o[k+1]=A.g,o[k+2]=A.b,c[E]=T):(O=3*j[L].triangles[P],t||(e[k]=S[O]-f[0],e[k+1]=S[O+1]-f[1],e[k+2]=S[O+2]-f[2],w[E]=P),M||void 0!==l||(A=u(N[O],O,D,F)),o[k]=A.r,o[k+1]=A.g,o[k+2]=A.b,!M&&C&&void 0===m&&(T=p(N[O],O,D,F)),c[E]=T);(M||j[L].uniform)&&(j[L].uniform=M,j[L].color=A,j[L].opacity=T)}t?(x.updateSourceBuffer("fillOpacity"),x.updateSourceBuffer("fillColor")):(x.modified(),V.boundsDirty(!0),x.boundsDirtyTimestamp().modified())}(!!(g.dataTime().timestamp()<g.buildTime().timestamp()&&h)),g.renderer().contextRenderer().hasActor(y)||(g.renderer().contextRenderer().addActor(y),p=!0),g.buildTime().modified()},this._update=function(t){g.ready&&(t&&t.mayDelay&&p?m=g.layer().map().scheduleAnimationFrame(g._update):(m&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),M.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),y.setVisible(g.visible()),y.material().setBinNumber(g.bin()),g.updateTime().modified()))},this._exit=function(){m&&g.layer()&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),g.renderer().contextRenderer().removeActor(y),v()},this._init(e),this};r(a,o),i("webgl","polygon",a),t.exports=a},2182:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=n(6618),s=n(4634),u=16777216,l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e);var r=n(5638),i=n(5140),l=n(7719),c=n(7521),h=n(5804),f=n(630),d=n(1899);l.call(this);var p,m,g,v,y,x,_,b=this,M=this._exit,w=this._update,A={},T=a(),C=a();function E(t){var e=new i.mapper({dynamicDraw:!0});return e.s_modified=e.modified,e.g_timestamp=a(),e.timestamp=e.g_timestamp.timestamp,e.modified=function(){return e.s_modified(),e.g_timestamp.modified(),e},e.s_render=e.render,e.render=t,e}return this.actors=function(){var t=[];return m&&t.push(m),g&&t.push(g),t},this._build=function(){var t,e,n,r,o,a,s,u,l;b.position()&&((_=b._generateQuads()).imgQuads.length&&!m&&(b.visible(!1),t=E(b._renderImageQuads),(m=new i.actor).setMapper(t),e=new i.material,(n=new i.shaderProgram).addVertexAttribute(new i.vertexAttribute("vertexPosition"),i.vertexAttributeKeys.Position),n.addVertexAttribute(new i.vertexAttribute("textureCoord"),i.vertexAttributeKeys.TextureCoordinate),p=new i.modelViewOriginUniform("modelViewMatrix",_.origin),n.addUniform(p),n.addUniform(new i.projectionUniform("projectionMatrix")),n.addUniform(new i.floatUniform("opacity",1)),n.addUniform(new i.floatUniform("zOffset",0)),(l=new i.uniform(i.GL.INT,"sampler2d")).set(0),n.addUniform(l),u=b.renderer()._glContext(),(o=new i.uniform(u.FLOAT_VEC2,"crop")).set([1,1]),n.addUniform(o),(a=new i.uniform(u.FLOAT_VEC4,"cropsource")).set([0,0,0,0]),n.addUniform(a),n.addShader(i.getCachedShader(u.VERTEX_SHADER,u,h)),n.addShader(i.getCachedShader(u.FRAGMENT_SHADER,u,c)),b._hookBuild&&b._hookBuild(n),e.addAttribute(n),e.addAttribute(new i.blend),s=new i.geometryData,v=void 0,(r=new i.sourceDataT2fv).pushBack([0,0,1,0,0,1,1,1]),s.addSource(r),t.setGeometryData(s),m.setMaterial(e),b.renderer().contextRenderer().addActor(m),b.visible(!0)),_.clrQuads.length&&!g&&(b.visible(!1),t=E(b._renderColorQuads),(g=new i.actor).setMapper(t),e=new i.material,(n=new i.shaderProgram).addVertexAttribute(new i.vertexAttribute("vertexPosition"),i.vertexAttributeKeys.Position),x=new i.modelViewOriginUniform("modelViewMatrix",_.origin),n.addUniform(x),n.addUniform(new i.projectionUniform("projectionMatrix")),n.addUniform(new i.floatUniform("opacity",1)),n.addUniform(new i.floatUniform("zOffset",0)),u=b.renderer()._glContext(),n.addUniform(new i.uniform(u.FLOAT_VEC3,"vertexColor")),n.addShader(i.getCachedShader(u.VERTEX_SHADER,u,d)),n.addShader(i.getCachedShader(u.FRAGMENT_SHADER,u,f)),e.addAttribute(n),e.addAttribute(new i.blend),s=new i.geometryData,y=void 0,t.setGeometryData(s),g.setMaterial(e),b.renderer().contextRenderer().addActor(g),b.visible(!0)),p&&p.setOrigin(_.origin),x&&x.setOrigin(_.origin),b._updateTextures(),b.buildTime().modified())},this._updateTextures=function(){var t;r.each(_.imgQuads,(function(e,n){if(n.image)if(n.image._texture)n.texture=n.image._texture;else{(t=new i.texture).setImage(n.image);var r=b.nearestPixel();if(void 0!==r)if(!0!==r&&s.isNonNullFinite(r))r=b.layer().map().zoom()>=r;r&&t.setNearestPixel(!0),n.texture=n.image._texture=t}}))},this._renderColorQuads=function(t){if(_.clrQuads.length){var e=this;(e.timestamp()>C.timestamp()||b.dataTime().timestamp()>C.timestamp()||t.m_contextChanged||!y||12*_.clrQuads.length>y.length)&&function(t){var e=t.m_context,n=!1;_.clrQuads.length&&((!y||y.length<12*_.clrQuads.length||!A.clrQuadsPosition)&&(A.clrQuadsPosition&&e.deleteBuffer(A.clrQuadsPosition),A.clrQuadsPosition=e.createBuffer(),y=new Float32Array(12*Math.max(128,2*_.clrQuads.length)),n=!0),r.each(_.clrQuads,(function(t,e){for(var n=0;n<12;n+=1)y[12*t+n]=e.pos[n]-_.origin[n%3]})),e.bindBuffer(e.ARRAY_BUFFER,A.clrQuadsPosition),n?e.bufferData(e.ARRAY_BUFFER,y,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,y)),C.modified()}(t),e.s_render(t,!0);var n,o,a,s=t.m_context;s.bindBuffer(s.ARRAY_BUFFER,A.clrQuadsPosition),r.each(_.clrQuads,(function(e,r){r.opacity!==n&&(n=r.opacity,s.uniform1fv(t.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(r.zOffset||0)!==o&&(o=r.zOffset||0,s.uniform1fv(t.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a&&a.r===r.color.r&&a.g===r.color.g&&a.b===r.color.b||(a=r.color,s.uniform3fv(t.m_material.shaderProgram().uniformLocation("vertexColor"),new Float32Array([a.r,a.g,a.b]))),s.bindBuffer(s.ARRAY_BUFFER,A.clrQuadsPosition),s.vertexAttribPointer(i.vertexAttributeKeys.Position,3,s.FLOAT,!1,12,12*e*4),s.enableVertexAttribArray(i.vertexAttributeKeys.Position),s.drawArrays(s.TRIANGLE_STRIP,0,4)})),s.bindBuffer(s.ARRAY_BUFFER,null),e.undoBindVertexData(t)}},this._renderImageQuads=function(t){if(_.imgQuads.length){var e=this;(e.timestamp()>T.timestamp()||b.dataTime().timestamp()>T.timestamp()||t.m_contextChanged||!v||12*_.imgQuads.length>v.length)&&function(t){var e=t.m_context,n=!1;_.imgQuads.length&&((!v||v.length<12*_.imgQuads.length||!A.imgQuadsPosition)&&(A.imgQuadsPosition&&e.deleteBuffer(A.imgQuadsPosition),A.imgQuadsPosition=e.createBuffer(),v=new Float32Array(12*Math.max(128,2*_.imgQuads.length)),n=!0),r.each(_.imgQuads,(function(t,e){for(var n=0;n<12;n+=1)v[12*t+n]=e.pos[n]-_.origin[n%3]})),e.bindBuffer(e.ARRAY_BUFFER,A.imgQuadsPosition),n?e.bufferData(e.ARRAY_BUFFER,v,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,v)),T.modified()}(t),e.s_render(t,!0);var n,o,a,l,c,h,f,d,p=t.m_context,m={x:1,y:1},g={x0:0,y0:0,x1:1,y1:1},y=b.nearestPixel();if(void 0!==y){if(!0!==y&&s.isNonNullFinite(y)){var x=b.layer().map().zoom();y=x>=y}_.imgQuads.forEach((function(e){if(e.image&&e.texture&&e.texture.nearestPixel()!==y&&e.texture.textureHandle()){t.m_context.bindTexture(i.GL.TEXTURE_2D,e.texture.textureHandle()),t.m_context.texParameteri(i.GL.TEXTURE_2D,i.GL.TEXTURE_MIN_FILTER,y?i.GL.NEAREST:i.GL.LINEAR),t.m_context.texParameteri(i.GL.TEXTURE_2D,i.GL.TEXTURE_MAG_FILTER,y?i.GL.NEAREST:i.GL.LINEAR),t.m_context.bindTexture(i.GL.TEXTURE_2D,null);var n=e.texture.modified;e.texture.modified=function(){},e.texture.setNearestPixel(y),e.texture.modified=n}}))}b._hookRenderImageQuads&&b._hookRenderImageQuads(t,_.imgQuads),p.bindBuffer(p.ARRAY_BUFFER,A.imgQuadsPosition),r.each(_.imgQuads,(function(e,r){r.image&&(r.texture.bind(t),r.image.width*r.image.height>u&&(u=r.image.width*r.image.height,p.getError()===p.OUT_OF_MEMORY&&console.log("Insufficient GPU memory for texture")),r.opacity!==n&&(n=r.opacity,p.uniform1fv(t.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(r.zOffset||0)!==o&&(o=r.zOffset||0,p.uniform1fv(t.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a=r.crop||{x:1,y:1},m&&a.x===m.x&&a.y===m.y||(m=a,p.uniform2fv(t.m_material.shaderProgram().uniformLocation("crop"),new Float32Array([void 0===m.x?1:m.x,void 0===m.y?1:m.y]))),c=r.image.width,h=r.image.height,l=r.crop||{left:0,top:0,right:c,bottom:h},g&&l.left===g.left&&l.top===g.top&&l.right===g.right&&l.bottom===g.bottom&&f===c&&d===h||(g=l,f=c,d=h,p.uniform4fv(t.m_material.shaderProgram().uniformLocation("cropsource"),new Float32Array([g.left/c,g.top/h,g.right/c,g.bottom/h]))),p.bindBuffer(p.ARRAY_BUFFER,A.imgQuadsPosition),p.vertexAttribPointer(i.vertexAttributeKeys.Position,3,p.FLOAT,!1,12,12*e*4),p.enableVertexAttribArray(i.vertexAttributeKeys.Position),p.drawArrays(p.TRIANGLE_STRIP,0,4),r.texture.undoBind(t))})),p.bindBuffer(p.ARRAY_BUFFER,null),e.undoBindVertexData(t)}},this._update=function(){w.call(b),(b.buildTime().timestamp()<=b.dataTime().timestamp()||b.updateTime().timestamp()<b.timestamp())&&b._build(),g&&(g.setVisible(b.visible()),g.material().setBinNumber(b.bin())),m&&(m.setVisible(b.visible()),m.material().setBinNumber(b.bin())),b.updateTime().modified()},this._cleanup=function(){m&&(b.renderer().contextRenderer().removeActor(m),m=null),g&&(b.renderer().contextRenderer().removeActor(g),g=null),v=void 0,y=void 0,Object.keys(A).forEach((function(t){delete A[t]})),_&&_.imgQuads&&(_.imgQuads.forEach((function(t){t.texture&&(delete t.texture,delete t.image._texture)})),b._updateTextures()),b.modified()},this.setShader=function(t,e){switch(t){case"image_vertex":h=e;break;case"image_fragment":c=e;break;case"color_vertex":d=e;break;case"color_fragment":f=e;break;default:return}return b},this._exit=function(){b._cleanup(),M.call(b)},b._init(e),this};r(l,o);var c={};c[o.capabilities.color]=!0,c[o.capabilities.image]=!0,c[o.capabilities.imageCrop]=!0,c[o.capabilities.imageFixedScale]=!1,c[o.capabilities.imageFull]=!0,c[o.capabilities.canvas]=!1,c[o.capabilities.video]=!1,i("webgl","quad",l,c),t.exports=l},7112:function(t,e,n){var r=n(4647).registerLayerAdjustment,i=n(1940),o=function(){"use strict";var t,e=n(5108),r=this,o=this._init,a=this._exit,s=this._update,u=this.visible,l=this.zIndex,c=0,h=[];this._drawTile=function(e){if(t){var n,o,a=r._tileBounds(e),s=e.index.level||0,u=r._tileOffset(s),l=r.tileCropFromBounds(e),f={},d=r.renderer().contextRenderer().m_depthBits;l&&(f.crop={x:l.x/r._options.tileWidth,y:l.y/r._options.tileHeight}),f.ul=r.fromLocal(r.fromLevel({x:a.left-u.x,y:a.top-u.y},s),0),f.ll=r.fromLocal(r.fromLevel({x:a.left-u.x,y:a.bottom-u.y},s),0),f.ur=r.fromLocal(r.fromLevel({x:a.right-u.x,y:a.top-u.y},s),0),f.lr=r.fromLocal(r.fromLevel({x:a.right-u.x,y:a.bottom-u.y},s),0),f.ul.z=f.ll.z=f.ur.z=f.lr.z=0,n=r._options.keepLower?r._options.maxLevel-s+1:1,(o=(o=r.map().listSceneObjects().filter((function(t){return t instanceof i}))).slice(o.indexOf(r)+1)).forEach((function(t){n+=t._options.keepLower?t._options.maxLevel-t._options.minLevel+1:1})),f.zOffset=n*Math.pow(2,-d)*i._zOffsetMultiple,c+=1,f.id=c,e.quadId=f.id,f.image=e.image,h.push(f),t.data(h),t._update(),r.draw()}},this._remove=function(e){if(void 0!==e.quadId&&t){for(var n=0;n<h.length;n+=1)if(h[n].id===e.quadId){h.splice(n,1);break}t.data(h),t._update(),r.draw()}},this.visible=function(e){return void 0===e?u():(r.visible()!==e&&(u(e),t&&t.visible(t.visible(void 0,!0),!0)),r)},this.zIndex=function(t,e){return void 0!==t&&r._clearQuads(),l.apply(r,arguments)},this._clearQuads=function(n){(!n||n.layer&&n.layer instanceof i&&n.layer.autoshareRenderer()&&(n.event!==e.layerAdd&&n.event!==e.layerRemove||!r.map().layers().every((function(t){return t===n.layer||n.layer.zIndex()>t.zIndex()}))))&&(r.clear(),t&&t.modified(),n&&r.draw())},this._update=function(e){return s.call(r,e),t&&t.nearestPixel&&t.nearestPixel(r.nearestPixel()),r._addBaseQuadToTiles(t,h),r},this._cleanup=function(){var t;if(r.cache&&r.cache._cache){for(var e in r.cache._cache)(t=r.cache._cache[e])._image&&t._image._texture&&delete t._image._texture;r.cache.clear()}r.clear()},this._exit=function(){var n=r.map();n.geoOff(e.layerAdd,r._clearQuads),n.geoOff(e.layerRemove,r._clearQuads),r._cleanup(),r.deleteFeature(t),t=null,h=[],a.apply(r,arguments)},this._init=function(){o.apply(r,arguments),(t=r.createFeature("quad",{previewColor:r._options.previewColor,previewImage:r._options.previewImage})).geoTrigger=void 0,t.gcs(r._options.gcs||r.map().gcs()),t.data(h),t._update();var n=r.map();n.geoOn(e.layerAdd,r._clearQuads),n.geoOn(e.layerRemove,r._clearQuads),r.geoOn(e.unhidden,(function(){r.map().scheduleAnimationFrame((function(){r._clearQuads(),r.map().draw()}))}))},this._getSubLayer=function(){},this._updateSubLayers=void 0};i._zOffsetMultiple=2,r("webgl","tile",o),t.exports=o},506:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(7719).call(this),this._init(e),this):new t(e)};r(a,o),i("webgl","track",a),t.exports=a},2254:function(t,e,n){var r,i=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var r,i=n(5638),o=n(5140),s=n(5240),u=n(4634),l=n(5108),c=this,h=null,f=null,d=!1,p=this._init,m=this._exit;return this.contextRenderer=function(){return h},this.api=function(){return t.apiname},this._init=function(){if(c.initialized())return c;p.call(c);var t=e.canvas||i(document.createElement("canvas"));if(t.addClass("webgl-canvas"),i(c.layer().node().get(0)).append(t),window.overrideContextAttributes){var n=t.get(0),r=n.getContext;n.getContext=function(t,e){if(e=e||{},window.overrideContextAttributes)for(var i in window.overrideContextAttributes)window.overrideContextAttributes.hasOwnProperty(i)&&(e[i]=window.overrideContextAttributes[i]);return r.call(n,t,e)}}(f=o.viewer(t.get(0),e.options)).init(),(h=f.renderWindow().activeRenderer()).setResetScene(!1),f.renderWindow().renderers().length>0&&h.setLayer(f.renderWindow().renderers().length),c.canvas(t);var a=c.layer().map().size();return c._resize(0,0,a.width,a.height),c},this._resize=function(t,e,n,r){var i=f.renderWindow();return t===i.windowPosition[0]&&e===i.windowPosition[1]&&n===c.width()&&r===c.height()||(c._setWidthHeight(n,r),c.canvas().attr("width",n),c.canvas().attr("height",r),i.positionAndResize(t,e,n,r),d=!0,c._render()),c},this._render=function(){return c.layer().map().scheduleAnimationFrame(c._renderFrame,!0),c},this._renderFrame=function(){f&&(d&&(d=!1,c._updateRendererCamera()),f.render())},this._glContext=function(){return f&&f.renderWindow()?f.renderWindow().context():o.GL},this._exit=function(){if(c.layer().map().scheduleAnimationFrame(c._renderFrame,"remove"),c.canvas().remove(),f){var t=new o.renderState;t.m_renderer=f,t.m_context=c._glContext(),f.exit(t);var e=c._glContext();e!==o.GL&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext&&e.getExtension("WEBGL_lose_context").loseContext()}o.clearCachedShaders(o.GL),f=null,m()},this._updateRendererCamera=function(){var t=f.renderWindow(),e=c.layer().map(),n=e.camera(),i=e.rotation()||0,o=n.view,a=n.projectionMatrix;if(a[15])a=s.copy(u.mat4AsArray(),a),a=s.scale(a,a,[1,1,-.5]),a=s.translate(a,a,[0,0,n.clipbounds.far]);else{var l=n.clipbounds.near,h=n.clipbounds.far;a=s.copy(u.mat4AsArray(),a),a=s.scale(a,a,[1/l,1/l,-1/h])}var d=Math.PI/2,p=i%d,m=Math.min(Math.abs(p),Math.abs(p-d))<1e-5;t.renderers().forEach((function(t){var i=t.camera();if(!u.compareArrays(o,i.viewMatrix())||!u.compareArrays(a,i.projectionMatrix())||r!==e.zoom()){r=e.zoom(),i.setViewMatrix(o,!0),i.setProjectionMatrix(a);var s=n.viewport;a[1]||a[2]||a[3]||a[4]||a[6]||a[7]||a[8]||a[9]||a[11]||1!==a[15]||!m||s.left&&s.left%1||s.top&&s.top%1||parseFloat(r.toFixed(6))!==parseFloat(r.toFixed(0))?i.viewAlignment=function(){return null}:i.viewAlignment=function(){var t={roundx:2/s.width,roundy:2/s.height};return t.dx=s.width%2?.5*t.roundx:0,t.dy=s.height%2?.5*t.roundy:0,t}}}))},c.layer().geoOn(l.pan,(function(t){d=!0})),c.layer().geoOn(l.parallelprojection,(function(t){var e=c.contextRenderer(),n=c.layer();if(t.geo&&t.geo._triggeredBy!==n){if(!e||!e.camera())return void console.log("Parallel projection event triggered on unconnected VGL renderer.");e.camera().setEnableParallelProjection(t.parallelProjection),d=!0}})),this};s.apiname="webgl",i(s,a),o("webgl",s),o("vgl",s),s.supported=function(){if(void 0===r){var t,e;try{(e=(t=document.createElement("canvas")).getContext("webgl")||t.getContext("experimental-webgl")).getSupportedExtensions().indexOf("WEBGL_debug_renderer_info")>=0&&(s._unmaskedRenderer=e.getParameter(e.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)),s._maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),s._maxPointSize=e.getParameter(e.ALIASED_POINT_SIZE_RANGE)[1],r=!0}catch(t){console.warn("No webGL support"),r=!1}t=void 0,e=void 0,void 0}return r},s.fallback=function(){return null},t.exports=s},406:function(t,e,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o),s=n(1678),u=n.n(s),l=new URL(n(3554),n.b),c=new URL(n(4144),n.b),h=new URL(n(237),n.b),f=new URL(n(9490),n.b),d=a()(i()),p=u()(l),m=u()(c),g=u()(h),v=u()(f);d.push([t.id,'.geojs-map{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.geojs-map .geo-attribution{position:absolute;right:0;bottom:0;padding-right:5px;cursor:auto;font:11px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif;z-index:1001;background:rgba(255,255,255,0.7);clear:both;display:block;pointer-events:auto}.geojs-map .geo-attribution .geo-attribution-layer{padding-left:5px}.geojs-map .canvas-canvas{display:block;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.geojs-map .webgl-canvas{display:block}.geojs-map .geojs-layer{position:absolute;width:100%;height:100%;left:0;top:0;pointer-events:none}.geojs-map .geojs-layer.active:not(.hidden) > *{pointer-events:auto}.geojs-map .geojs-layer.hidden{display:none}.geojs-map .geojs-layer.hidden[renderer="webgl"]{display:inherit}.geojs-map .geo-tile-layer{-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;line-height:0;font-size:0}.geojs-map.annotation-input{cursor:crosshair}.geojs-map.annotation-input.annotation-intersect{cursor:url('+p+") 12 12,crosshair}.geojs-map.annotation-input.annotation-difference{cursor:url("+m+") 12 12,crosshair}.geojs-map.annotation-input.annotation-union{cursor:url("+g+") 12 12,crosshair}.geojs-map.annotation-input.annotation-xor{cursor:url("+v+") 12 12,crosshair}.geojs-map.annotation-cursor{cursor:crosshair}.geojs-map.annotation-cursor.annotation-intersect{cursor:url("+p+") 12 12,crosshair}.geojs-map.annotation-cursor.annotation-difference{cursor:url("+m+") 12 12,crosshair}.geojs-map.annotation-cursor.annotation-union{cursor:url("+g+") 12 12,crosshair}.geojs-map.annotation-cursor.annotation-xor{cursor:url("+v+') 12 12,crosshair}.geojs-map.highlight-focus:after{content:"";display:block;position:absolute;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;left:0;top:0;right:0;bottom:0;border:3px solid Highlight;opacity:1;-ms-filter:none;filter:none;-webkit-transition:opacity 0s;-moz-transition:opacity 0s;-o-transition:opacity 0s;-ms-transition:opacity 0s;transition:opacity 0s;visibility:hidden}.geojs-map.highlight-focus:focus:after{visibility:visible;-webkit-transition:opacity 2.5s ease-in;-moz-transition:opacity 2.5s ease-in;-o-transition:opacity 2.5s ease-in;-ms-transition:opacity 2.5s ease-in;transition:opacity 2.5s ease-in;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0)}.geo-tile-container{position:absolute}.geo-tile-container.crop{overflow:hidden}',"",{version:3,sources:["webpack://./main.styl","webpack://./../node_modules/nib/lib/nib/vendor.styl","webpack://./../node_modules/nib/lib/nib/overflow.styl","webpack://./../node_modules/nib/lib/nib/flex.styl","webpack://./../node_modules/nib/lib/nib/border.styl"],names:[],mappings:"AAEA,WACE,iBAAS,CCwCO,wBAAG,CAAH,qBAAG,CAAH,oBAAG,CARN,gBAAG,CChBd,eAAU,CFZZ,4BACE,iBAAS,CACT,OAAM,CACN,QAAO,CACP,iBAAc,CC4ed,WAAO,CD1eP,yDAA8B,CAC9B,YAAQ,CC6dR,gCAAW,CD3dX,UAAM,CGMN,aAAS,CHJT,mBAAe,CAEf,mDACE,gBAAa,CAEjB,0BGDE,aAAS,CFqBK,4BAAG,CAAH,yBAAG,CAAH,uBAAG,CAAH,wBAAG,CARN,oBAAG,CDThB,yBGJE,aAAS,CHOX,wBACE,iBAAS,CACT,UAAM,CACN,WAAO,CACP,MAAK,CACL,KAAI,CACJ,mBAAe,CAEb,gDACE,mBAAe,CACnB,+BGjBA,YAAS,CHmBT,iDGnBA,eAAS,CHsBX,2BCDgB,4BAAG,CAAH,yBAAG,CAAH,uBAAG,CAAH,wBAAG,CARN,oBAAG,CDWd,aAAY,CACZ,WAAU,CAEZ,4BCscE,gBAAO,CDpcP,iDCocA,8DAAO,CDlcP,kDCkcA,8DAAO,CDhcP,6CCgcA,8DAAO,CD9bP,2CC8bA,8DAAO,CD3bT,6BC2bE,gBAAO,CDzbP,kDCybA,8DAAO,CDvbP,mDCubA,8DAAO,CDrbP,8CCqbA,8DAAO,CDnbP,4CCmbA,8DAAO,CD/aP,iCACE,UAAQ,CGnDV,aAAS,CHqDP,iBAAS,CChCG,6BAAG,CAAH,0BAAG,CARN,qBAAG,CD0CZ,MAAK,CACL,KAAI,CACJ,OAAM,CACN,QAAO,CIvET,0BAAQ,CH4PV,SAAS,CAQH,eAAY,CACZ,WAAQ,CArOE,6BAAG,CAAH,0BAAG,CAAH,wBAAG,CAAH,yBAAG,CARN,qBAAG,CDqDZ,iBAAW,CACb,uCACE,kBAAW,CC/CC,uCAAG,CAAH,oCAAG,CAAH,kCAAG,CAAH,mCAAG,CARN,+BAAG,CAoOhB,SAAS,CAWH,+DAAyE,CACzE,uBAAiC,CDrLzC,oBACE,iBAAS,CACT,yBE3EE,eAAU",sourcesContent:['@import \'~nib/index.styl\'\n\n.geojs-map\n position relative\n user-select none\n overflow hidden\n\n .geo-attribution\n position absolute\n right 0\n bottom 0\n padding-right 5px\n cursor auto\n font 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif\n z-index 1001\n background rgba(255,255,255,0.7)\n clear both\n display block\n pointer-events auto\n\n .geo-attribution-layer\n padding-left 5px\n\n .canvas-canvas\n display block\n transform-origin 0px 0px\n .webgl-canvas\n display block\n\n .geojs-layer\n position absolute\n width 100%\n height 100%\n left 0\n top 0\n pointer-events none\n &.active:not(.hidden)\n > *\n pointer-events auto\n &.hidden\n display none\n &.hidden[renderer="webgl"]\n display inherit\n\n .geo-tile-layer\n transform-origin 0px 0px\n line-height 0\n font-size 0\n\n &.annotation-input\n cursor crosshair\n &.annotation-intersect\n cursor embedurl("./css/cursor-crosshair-intersect.svg") 12 12,crosshair\n &.annotation-difference\n cursor embedurl("./css/cursor-crosshair-difference.svg") 12 12,crosshair\n &.annotation-union\n cursor embedurl("./css/cursor-crosshair-union.svg") 12 12,crosshair\n &.annotation-xor\n cursor embedurl("./css/cursor-crosshair-xor.svg") 12 12,crosshair\n\n &.annotation-cursor\n cursor crosshair\n &.annotation-intersect\n cursor embedurl("./css/cursor-crosshair-intersect.svg") 12 12,crosshair\n &.annotation-difference\n cursor embedurl("./css/cursor-crosshair-difference.svg") 12 12,crosshair\n &.annotation-union\n cursor embedurl("./css/cursor-crosshair-union.svg") 12 12,crosshair\n &.annotation-xor\n cursor embedurl("./css/cursor-crosshair-xor.svg") 12 12,crosshair\n\n &.highlight-focus\n &:after\n content ""\n display block\n position absolute\n box-sizing border-box\n left 0px\n top 0px\n right 0px\n bottom 0px\n // Highlight is technically a css2 color. We may need to specify it\n // explicitly. #3B66A6 seems close\n border 3px solid Highlight\n opacity 1\n transition opacity 0s\n visibility hidden\n &:focus:after\n visibility visible\n transition opacity 2.5s ease-in\n opacity 0\n\n.geo-tile-container\n position absolute\n &.crop\n overflow hidden\n',"use('../nodes/vendor-helpers.js')\n@import 'config'\n\n/*\n * Alias \"nowrap\" as \"no-wrap\".\n */\n\nno-wrap = unquote('nowrap')\n\n/*\n * Helper to find out if a given value is a width\n */\n\nis-width(val)\n if auto == val\n return true\n else if val && 'unit' == type(val)\n // Stylus does not short circuit so we need to perform this as a distinct\n // operation to prevent errors\n return '' != unit(val)\n return false\n\n/*\n * Vendor support for the given prop / arguments, optionally specifying the\n * only prefixes to utilize, or those which should be ignored.\n */\n\nvendor(prop, args, only = null, ignore = null, vendor-property = true)\n need_normalize = !vendor-property or prop in ('transition' 'transition-property' 'border-image' 'border-image-slice')\n for prefix in vendor-prefixes\n unless (only and !(prefix in only)) or (ignore and prefix in ignore)\n if official == prefix\n if need_normalize\n {prop}: normalize(prop,('%s' % args))\n else\n {prop}: args\n else\n newprop = prop\n newprop = '-' + prefix + '-' + prop if vendor-property\n\n if need_normalize\n {newprop}: normalize(prop,('%s' % args),prefix)\n else\n {newprop}: args\n/*\n * Vendorize the given value.\n */\n\nvendor-value(arg, only = null, ignore = null)\n prop = current-property[0]\n for prefix in vendor-prefixes\n unless (only and !(prefix in only)) or (ignore and prefix in ignore) or official == prefix\n add-property(prop, '-%s-%s' % (prefix arg))\n arg\n\n/*\n * Vendor \"box-shadow\" support.\n */\n\nbox-shadow()\n vendor('box-shadow', arguments, only: webkit official)\n\n/*\n * Vendor \"user-select\" support.\n */\n\nuser-select()\n vendor('user-select', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"column-count\" support.\n */\n\ncolumn-count()\n vendor('column-count', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-gap\" support.\n */\n\ncolumn-gap()\n vendor('column-gap', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule\" support.\n */\n\ncolumn-rule()\n vendor('column-rule', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-color\" support.\n */\n\ncolumn-rule-color()\n vendor('column-rule-color', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-width\" support.\n */\n\ncolumn-rule-width()\n vendor('column-rule-width', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-style\" support.\n */\n\ncolumn-rule-style()\n vendor('column-rule-style', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-width\" support.\n */\n\ncolumn-width()\n vendor('column-width', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-span\" support.\n */\n\ncolumn-span()\n vendor('column-span', arguments, only: webkit official)\n\n/*\n * Vendor \"column-fill\" support.\n */\n\ncolumn-fill()\n vendor('column-fill', arguments, only: moz official)\n\n/*\n * Legacy syntax support for background-clip and background-origin\n */\n\nlegacy-bg-values(property, args)\n legacy_args = ()\n importance = unquote('')\n for subargs in args\n for arg in subargs\n if arg in (border-box padding-box content-box)\n arg = unquote('border') if arg == border-box\n arg = unquote('padding') if arg == padding-box\n arg = unquote('content') if arg == content-box\n if arg != '!important'\n push(legacy_args,arg)\n else\n importance = !important\n vendor(property, unquote(join(', ',legacy_args)) importance, only: moz webkit)\n\n/*\n * Vendor \"background-clip\" support.\n */\n\nbackground-clip()\n if arguments[0] == text\n vendor('background-clip', arguments, only: webkit)\n else\n legacy-bg-values('background-clip', arguments)\n background-clip: arguments\n\n/*\n * Vendor \"background-origin\" support.\n */\n\nbackground-origin()\n legacy-bg-values('background-origin', arguments)\n background-origin: arguments\n\n/*\n * Vendor \"transform\" support.\n */\n\ntransform()\n vendor('transform', arguments)\n\n/*\n * Vendor \"transform-origin\" support.\n */\ntransform-origin()\n vendor('transform-origin', arguments)\n\n/*\n * Vendor \"transform-style\" support.\n */\n\ntransform-style()\n vendor('transform-style', arguments)\n\n/*\n * Vendor \"border-image\" support.\n */\n\nborder-image()\n vendor('border-image', arguments, only: webkit moz o official)\n\n/*\n * Vendor \"transition\" support.\n */\n\ntransition()\n vendor('transition', arguments)\n\n/*\n * Vendor \"transition-property\" support.\n */\n\ntransition-property()\n vendor('transition-property', arguments)\n\n/*\n * Vendor \"transition-duration\" support.\n */\n\ntransition-duration()\n vendor('transition-duration', arguments)\n\n/*\n * Vendor \"transition-timing-function\" support.\n */\n\ntransition-timing-function()\n vendor('transition-timing-function', arguments)\n\n/*\n * Vendor \"transition-delay\" support.\n */\n\ntransition-delay()\n vendor('transition-delay', arguments)\n\n/*\n * Vendor \"backface-visibility\" support.\n */\n\nbackface-visibility()\n vendor('backface-visibility', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"perspective\" support.\n */\n\nperspective()\n if mixin\n vendor('perspective', arguments, only: webkit moz ms official)\n else\n 'perspective(%s)' % arguments\n\n/*\n * Vendor \"perspective-origin\" support.\n */\n\nperspective-origin()\n vendor('perspective-origin', arguments, only: webkit moz ms official)\n\n/*\n * Opacity with conditional IE support.\n */\n\nopacity(n, args...)\n opacity: n args\n if support-for-ie\n if n == inherit or n == initial\n -ms-filter: n args\n filter: n args\n else\n val = round(n * 100)\n if val == 100\n -ms-filter: none args\n filter: none args\n else\n -ms-filter: '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)\"' % val args\n filter: 'alpha(opacity=%s)' % val args\n\n/*\n * Vendor \"text-size-adjust\"\n */\n\ntext-size-adjust()\n vendor('text-size-adjust', arguments)\n\n/*\n * Alias the \"white-space\" property.\n */\n\nwhitespace()\n white-space: arguments\n\n/*\n * Vendor \"box-sizing\" support.\n */\n\nbox-sizing()\n vendor('box-sizing', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-orient\" support.\n */\n\nbox-orient()\n vendor('box-orient', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-flex-group\" support.\n */\n\nbox-flex-group()\n vendor('box-flex-group', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-ordinal-group\" support.\n */\n\nbox-ordinal-group()\n vendor('box-ordinal-group', arguments, only: webkit moz ms official)\n\n\n/*\n * Vendor \"box-align\" support.\n */\n\nbox-align()\n vendor('box-align', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"box-pack\" support.\n */\n\nbox-pack()\n vendor('box-pack', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"box-direction\" support.\n */\n\nbox-direction()\n vendor('box-direction', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"animation\" support.\n */\n\nanimation()\n vendor('animation', arguments)\n\n\n/*\n * Vendor \"animation-name\" support.\n */\n\nanimation-name()\n vendor('animation-name', arguments)\n\n/*\n * Vendor \"animation-duration\" support.\n */\n\nanimation-duration()\n vendor('animation-duration', arguments)\n\n/*\n * Vendor \"animation-delay\" support.\n */\n\nanimation-delay()\n vendor('animation-delay', arguments)\n\n/*\n * Vendor \"animation-direction\" support.\n */\n\nanimation-direction()\n vendor('animation-direction', arguments)\n\n/*\n * Vendor \"animation-iteration-count\" support.\n */\n\nanimation-iteration-count()\n vendor('animation-iteration-count', arguments)\n\n/*\n * Vendor \"animation-timing-function\" support.\n */\n\nanimation-timing-function()\n vendor('animation-timing-function', arguments)\n\n/*\n * Vendor \"animation-play-state\" support.\n */\n\nanimation-play-state()\n vendor('animation-play-state', arguments)\n\n/*\n * Vendor \"animation-fill-mode\" support.\n */\n\nanimation-fill-mode()\n vendor('animation-fill-mode', arguments)\n\n/*\n * Vendor \"hyphens\" support.\n */\n\nhyphens()\n vendor('hyphens', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"appearance\" support.\n */\n\nappearance()\n vendor('appearance', arguments, only: webkit moz official)\n\n/*\n * Vendor \"tab-size\" support.\n */\n\ntab-size()\n vendor('tab-size', arguments, only: moz o official)\n\n/*\n * Vendor \"overflow-scrolling\" support.\n */\n\noverflow-scrolling()\n vendor('overflow-scrolling', arguments, only: webkit official)\n\n/*\n * Vendor \"text-overflow\" support, , -o- for opera 9.* - 10.*\n */\n\ntext-overflow()\n vendor('text-overflow', arguments, only: official o)\n\n/*\n * Vendor \"text-size-adjust\" support.\n */\ntext-size-adjust()\n vendor('text-size-adjust', arguments, only: official webkit ms)\n\n/*\n * Vendor \"font-smoothing\" support, webkit only.\n */\nfont-smoothing()\n vendor('font-smoothing', arguments, only: webkit)\n\n\n/**\n * Vendor input-placeholder/placeholder support.\n *\n * Examples:\n * // Default syntax\n * body\n * placeholder(color #333, font-weight normal)\n *\n * // The comma is important\n * .placeholder-red\n * placeholder(color red,)\n *\n * // We can pass a function\n * green-placeholder()\n * color green\n * .placeholder-green\n * placeholder(green-placeholder)\n *\n * // We can pass a hash\n * textarea\n * placeholder((font-style italic) (font-weight bold) (padding '4px 10px'))\n */\nplaceholder()\n for v in ':-webkit-input' '-moz' ':-moz' '-ms-input'\n &:{v}-placeholder\n for pair in arguments\n if typeof(pair) == 'function'\n pair()\n else if pair is not null && pair[0] is not null\n {pair[0]}: type(pair[1]) == 'string' ? s(pair[1]) : pair[1]\ninput-placeholder = placeholder\n\n/*\n * Vendor background support (gradients).\n */\n\nbackground()\n if match('-gradient\\(', ''+arguments)\n vendor('background', arguments, vendor-property: false)\n else\n background arguments\n\nbackground-image()\n if match('-gradient\\(', ''+arguments)\n vendor('background-image', arguments, vendor-property: false)\n else\n background-image arguments\n\ncursor()\n if match('-gradient\\(', ''+arguments)\n vendor('cursor', arguments, vendor-property: false)\n else\n cursor arguments\n\nlist-style()\n if match('-gradient\\(', ''+arguments)\n vendor('list-style', arguments, vendor-property: false)\n else\n list-style arguments\n\nlist-style-image()\n if match('-gradient\\(', ''+arguments)\n vendor('list-style-image', arguments, vendor-property: false)\n else\n list-style-image arguments\n","/*\n * Overflow utility. Maps to regular overflow, and adds an ellipsis value.\n *\n * Synopsis:\n *\n * overflow: <type>\n *\n * Examples:\n *\n * overflow: auto\n * overflow: hidden\n * overflow: ellipsis\n *\n */\n\noverflow()\n if arguments[0] == ellipsis\n ellipsis()\n else\n overflow: arguments\n","/*\n * Vendor \"display: flex\" support with fallback to obsolete versions.\n */\n\nflex-version ?= box flex\n\n//\n// 1. Display values\n// - http://www.w3.org/TR/css3-flexbox/#flex-containers\n//\ndisplay(type, args...)\n if flex == type || inline-flex == type\n if box in flex-version\n if flex == type\n display: -ms-flexbox args\n display: vendor-value(box args, only: moz webkit)\n else\n display: -ms-inline-flexbox args\n display: vendor-value(inline-box args, only: moz webkit)\n if flex in flex-version\n display: vendor-value(arguments, only: webkit official) // overwrites old webkit\n else\n display: arguments\n\n/*\n * New syntax for browsers like Google Chrome.\n * Plus a translation to the old syntax, if possible.\n */\n\n\n//\n// 5. Ordering and Orientation\n// - http://www.w3.org/TR/css3-flexbox/#ordering-and-orientation\n//\n-flex-obsolete-direction(direction)\n if box in flex-version\n if row-reverse == direction || column-reverse == direction\n vendor('box-direction', reverse, ignore: ms official)\n\n if row == direction || row-reverse == direction\n vendor('box-orient', horizontal, ignore: ms official)\n else if column == direction || column-reverse == direction\n vendor('box-orient', vertical, ignore: ms official)\n\n-flex-obsolete-wrap(value)\n if box in flex-version\n // WARN: wrap-reverse does not have a box equivalent. This will render in different manners\n // on box vs. flex values.\n if 'wrap' == value || wrap-reverse == value\n vendor('box-lines', multiple, ignore: ms official)\n else if nowrap == value\n vendor('box-lines', single, ignore: ms official)\n\nflex-direction(direction)\n // obsolete\n -flex-obsolete-direction(direction)\n\n // new\n if flex in flex-version\n vendor('flex-direction', arguments, only: webkit ms official)\n\nflex-wrap(value)\n // obsolete\n -flex-obsolete-wrap(value)\n\n if flex in flex-version\n vendor('flex-wrap', arguments, only: webkit ms official)\n\nflex-flow()\n // obsolete\n -flex-obsolete-direction(arguments[0])\n -flex-obsolete-direction(arguments[1])\n -flex-obsolete-wrap(arguments[0])\n -flex-obsolete-wrap(arguments[1])\n\n // new\n if flex in flex-version\n vendor('flex-flow', arguments, only: webkit ms official)\n\n\norder()\n // obsolete\n if box in flex-version\n vendor('box-ordinal-group', arguments, ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-order', arguments, only: ms)\n vendor('order', arguments, only: webkit official)\n\n\n//\n// 7. Flexibility\n// - http://www.w3.org/TR/css3-flexbox/#flexibility\n//\nflex-grow(growth)\n // obsolete\n if box in flex-version\n vendor('box-flex', growth)\n\n // new\n if flex in flex-version\n vendor('flex-grow', arguments, only: webkit official)\n\nflex-basis()\n if flex in flex-version\n vendor('flex-basis', arguments, only: webkit official)\n\nflex-shrink()\n if flex in flex-version\n vendor('flex-shrink', arguments, only: webkit official)\n\nflex(growth)\n\n // obsolete\n if box in flex-version\n shrink = 1\n\n if none == growth || initial == growth\n // Well known values\n shrink = 0 if none == growth\n growth = 0\n else if is-width(growth) == true\n // Basis is defined as the first parameter\n growth = arguments[1] || 0\n shrink = arguments[2] if 3 <= length(arguments)\n else if arguments[1] && is-width(arguments[1]) == false\n // Growth is first and shrink is second\n shrink = arguments[1]\n\n // Since we can't make the distinction between growing and shrinking in the box model, take\n // the one that provides the most flexibility.\n vendor('box-flex', max(growth, shrink), ignore: ms)\n\n // new\n if flex in flex-version\n vendor('flex', arguments, only: webkit ms official)\n\n\n// converts the justification alignment\n-convert-justify(align)\n if flex-start == align\n return start\n else if flex-end == align\n return end\n else if space-around == align\n return distribute\n else if space-between == align\n return justify\n else\n return align\n\n//\n// 8. Alignment\n// - http://www.w3.org/TR/css3-flexbox/#alignment\n//\njustify-content(align)\n // obsolete\n if box in flex-version\n vendor('box-pack', -convert-justify(align), ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-pack', -convert-justify(align), only: ms)\n vendor('justify-content', align, only: webkit official)\n\nalign-content(align)\n // WARN: Obsolete spec does not allow for adjustment here\n if flex in flex-version\n vendor('flex-line-pack', -convert-justify(align), only: ms)\n vendor('align-content', align, only: webkit official)\n\n// converts alignment from 'flex' to normal value\n-convert-alignment(align)\n if flex-start == align\n return start\n else if flex-end == align\n return end\n else\n return align\n\nalign-items(align)\n // obsolete\n if box in flex-version\n vendor('box-align', -convert-alignment(align), ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-align', -convert-alignment(align), only: ms)\n vendor('align-items', arguments, only: webkit official)\n\nalign-self(align)\n // WARN: Obsolete spec does not allow for overriding alignment on individual items.\n if flex in flex-version\n vendor('align-self', align, only: webkit official)\n vendor('flex-item-align', -convert-alignment(align), only: ms)\n","/*\n * border: <color>\n * border: ...\n */\n\nborder(color, args...)\n if color is a 'color'\n border: 1px solid color args\n else\n border: arguments\n"],sourceRoot:""}]),e.Z=d},7747:function(t,e,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([t.id,".color-legend-container{display:none;padding:10px;border:1.5px solid #000;border-radius:3px;transition:250ms background linear;background-color:rgba(255,255,255,0.75)}.color-legend-container:hover{background-color:#fff}.color-legend-container .geojs-color-legends .geojs-color-legend{margin-bottom:10px}.color-legend-container .geojs-color-legends .geojs-color-legend .geojs-title{text-align:center}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg{display:block}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x path.domain,.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x line{fill:none;stroke:#000;stroke-width:.7}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x text{font-size:12px}.color-legend-container .color-legend-popup{position:absolute;background:#fff;height:22px;font-size:14px;border:solid 1px #000;padding:0 5px;pointer-events:none;white-space:nowrap;z-index:100000;opacity:0}","",{version:3,sources:["webpack://./ui/colorLegendWidget.styl"],names:[],mappings:"AAAA,wBACE,YAAQ,CACR,YAAQ,CACR,uBAAO,CACP,iBAAc,CACd,kCAAW,CACX,uCAAiB,CAEjB,8BACE,qBAAiB,CAIjB,iEACE,kBAAc,CAEd,8EACE,iBAAW,CAEb,yEACE,aAAQ,CAGN,mLACE,SAAK,CACL,WAAO,CACP,eAAa,CACf,sFACE,cAAU,CAEpB,4CACE,iBAAS,CACT,eAAW,CACX,WAAO,CACP,cAAU,CACV,qBAAO,CACP,aAAQ,CACR,mBAAe,CACf,kBAAY,CACZ,cAAQ,CACR,SAAQ",sourcesContent:[".color-legend-container\n display none\n padding 10px\n border 1.5px solid black\n border-radius 3px\n transition 250ms background linear\n background-color rgba(255, 255, 255, 0.75)\n\n &:hover\n background-color rgba(255, 255, 255, 1)\n\n .geojs-color-legends\n\n .geojs-color-legend\n margin-bottom 10px\n\n .geojs-title\n text-align center\n\n svg.svg\n display block\n\n .axis.x\n path.domain, line\n fill none\n stroke black\n stroke-width 0.7\n text\n font-size 12px\n\n .color-legend-popup\n position absolute\n background white\n height 22px\n font-size 14px\n border solid 1px black\n padding 0 5px\n pointer-events none\n white-space nowrap\n z-index 100000\n opacity 0\n"],sourceRoot:""}]),e.Z=a},1680:function(t,e,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([t.id,".geojs-scale-widget-bar{stroke:#000}.geojs-scale-widget-text{font-weight:bold;font-size:16px;font-family:serif}","",{version:3,sources:["webpack://./ui/scaleWidget.styl"],names:[],mappings:"AAAA,wBACE,WAAO,CACT,yBACE,gBAAY,CACZ,cAAU,CACV,iBAAY",sourcesContent:[".geojs-scale-widget-bar\n stroke black\n.geojs-scale-widget-text\n font-weight bold\n font-size 16px\n font-family serif\n"],sourceRoot:""}]),e.Z=a},3476:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);r&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},1678:function(t){"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},559:function(t){"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),o="/*# ".concat(i," */");return[e].concat([o]).join("\n")}return[e].join("\n")}},8725:function(t,e,n){var r,i;!function(){var o={version:"3.5.17"},a=[].slice,s=function(t){return a.call(t)},u=this.document;function l(t){return t&&(t.ownerDocument||t.document||t).documentElement}function c(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(u)try{s(u.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),u)try{u.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var h=this.Element.prototype,f=h.setAttribute,d=h.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;h.setAttribute=function(t,e){f.call(this,t,e+"")},h.setAttributeNS=function(t,e,n){d.call(this,t,e,n+"")},p.setProperty=function(t,e,n){m.call(this,t,e+"",n)}}function g(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function x(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}o.ascending=g,o.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},o.min=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&n>r&&(n=r)}return n},o.max=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&r>n&&(n=r)}return n},o.extent=function(t,e){var n,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=e.call(t,t[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e.call(t,t[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},o.sum=function(t,e){var n,r=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)y(n=+t[o])&&(r+=n);else for(;++o<i;)y(n=+e.call(t,t[o],o))&&(r+=n);return r},o.mean=function(t,e){var n,r=0,i=t.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)y(n=v(t[o]))?r+=n:--a;else for(;++o<i;)y(n=v(e.call(t,t[o],o)))?r+=n:--a;if(a)return r/a},o.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],o=n-r;return o?i+o*(t[r]-i):i},o.median=function(t,e){var n,r=[],i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)y(n=v(t[a]))&&r.push(n);else for(;++a<i;)y(n=v(e.call(t,t[a],a)))&&r.push(n);if(r.length)return o.quantile(r.sort(g),.5)},o.variance=function(t,e){var n,r,i=t.length,o=0,a=0,s=-1,u=0;if(1===arguments.length)for(;++s<i;)y(n=v(t[s]))&&(a+=(r=n-o)*(n-(o+=r/++u)));else for(;++s<i;)y(n=v(e.call(t,t[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++u)));if(u>1)return a/(u-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var _=x(g);function b(t){return t.length}o.bisectLeft=_.left,o.bisect=o.bisectRight=_.right,o.bisector=function(t){return x(1===t.length?function(e,n){return g(t(e),n)}:t)},o.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,o<2&&(e=0));for(var r,i,o=n-e;o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},o.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},o.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],i=new Array(n<0?0:n);e<n;)i[e]=[r,r=t[++e]];return i},o.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,n=o.min(t,b),r=new Array(n);++e<n;)for(var i,a=-1,s=r[e]=new Array(i);++a<i;)s[a]=t[a][e];return r},o.zip=function(){return o.transpose(arguments)},o.keys=function(t){var e=[];for(var n in t)e.push(n);return e},o.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},o.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},o.merge=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n};var M=Math.abs;function w(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function A(){this._=Object.create(null)}o.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var r,i=[],o=function(t){var e=1;for(;t*e%1;)e*=10;return e}(M(n)),a=-1;if(t*=o,e*=o,(n*=o)<0)for(;(r=t+n*++a)>e;)i.push(r/o);else for(;(r=t+n*++a)<e;)i.push(r/o);return i},o.map=function(t,e){var n=new A;if(t instanceof A)t.forEach((function(t,e){n.set(t,e)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e.call(t,r=t[i],i),r)}else for(var a in t)n.set(a,t[a]);return n};var T="__proto__",C="\0";function E(t){return(t+="")===T||t[0]===C?C+t:t}function k(t){return(t+="")[0]===C?t.slice(1):t}function S(t){return E(t)in this._}function P(t){return(t=E(t))in this._&&delete this._[t]}function O(){var t=[];for(var e in this._)t.push(k(e));return t}function L(){var t=0;for(var e in this._)++t;return t}function R(){for(var t in this._)return!1;return!0}function I(){this._=Object.create(null)}function D(t){return t}function F(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function N(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=j.length;n<r;++n){var i=j[n]+e;if(i in t)return i}}w(A,{has:S,get:function(t){return this._[E(t)]},set:function(t,e){return this._[E(t)]=e},remove:P,keys:O,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:k(e),value:this._[e]});return t},size:L,empty:R,forEach:function(t){for(var e in this._)t.call(this,k(e),this._[e])}}),o.nest=function(){var t,e,n={},r=[],i=[];function a(i,o,s){if(s>=r.length)return e?e.call(n,o):t?o.sort(t):o;for(var u,l,c,h,f=-1,d=o.length,p=r[s++],m=new A;++f<d;)(h=m.get(u=p(l=o[f])))?h.push(l):m.set(u,[l]);return i?(l=i(),c=function(t,e){l.set(t,a(i,e,s))}):(l={},c=function(t,e){l[t]=a(i,e,s)}),m.forEach(c),l}function s(t,e){if(e>=r.length)return t;var n=[],o=i[e++];return t.forEach((function(t,r){n.push({key:t,values:s(r,e)})})),o?n.sort((function(t,e){return o(t.key,e.key)})):n}return n.map=function(t,e){return a(e,t,0)},n.entries=function(t){return s(a(o.map,t,0),0)},n.key=function(t){return r.push(t),n},n.sortKeys=function(t){return i[r.length-1]=t,n},n.sortValues=function(e){return t=e,n},n.rollup=function(t){return e=t,n},n},o.set=function(t){var e=new I;if(t)for(var n=0,r=t.length;n<r;++n)e.add(t[n]);return e},w(I,{has:S,add:function(t){return this._[E(t+="")]=!0,t},remove:P,values:O,size:L,empty:R,forEach:function(t){for(var e in this._)t.call(this,k(e))}}),o.behavior={},o.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r<i;)t[n=arguments[r]]=F(t,e,e[n]);return t};var j=["webkit","ms","moz","Moz","o","O"];function z(){}function B(){}function q(t){var e=[],n=new A;function r(){for(var n,r=e,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return t}return r.on=function(r,i){var o,a=n.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,o=e.indexOf(a)).concat(e.slice(o+1)),n.remove(r)),i&&e.push(n.set(r,{on:i})),t)},r}function V(){o.event.preventDefault()}function G(){for(var t,e=o.event;t=e.sourceEvent;)e=t;return e}function U(t){for(var e=new B,n=0,r=arguments.length;++n<r;)e[arguments[n]]=q(e);return e.of=function(n,r){return function(i){try{var a=i.sourceEvent=o.event;i.target=t,o.event=i,e[i.type].apply(n,r)}finally{o.event=a}}},e}o.dispatch=function(){for(var t=new B,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=q(t);return t},B.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},o.event=null,o.requote=function(t){return t.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,H={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]};function Z(t){return H(t,K),t}var X=function(t,e){return e.querySelector(t)},Q=function(t,e){return e.querySelectorAll(t)},Y=function(t,e){var n=t.matches||t[N(t,"matchesSelector")];return Y=function(t,e){return n.call(t,e)},Y(t,e)};"function"==typeof Sizzle&&(X=function(t,e){return Sizzle(t,e)[0]||null},Q=Sizzle,Y=Sizzle.matchesSelector),o.selection=function(){return o.select(u.documentElement)};var K=o.selection.prototype=[];function J(t){return"function"==typeof t?t:function(){return X(t,this)}}function $(t){return"function"==typeof t?t:function(){return Q(t,this)}}K.select=function(t){var e,n,r,i,o=[];t=J(t);for(var a=-1,s=this.length;++a<s;){o.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var u=-1,l=r.length;++u<l;)(i=r[u])?(e.push(n=t.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):e.push(null)}return Z(o)},K.selectAll=function(t){var e,n,r=[];t=$(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],u=-1,l=a.length;++u<l;)(n=a[u])&&(r.push(e=s(t.call(n,n.__data__,u,i))),e.parentNode=n);return Z(r)};var tt="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nt(t,e){return t=o.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function rt(t){return t.trim().replace(/\s+/g," ")}function it(t){return new RegExp("(?:^|\\s+)"+o.requote(t)+"(?:\\s+|$)","g")}function ot(t){return(t+"").trim().split(/^|\s+/)}function at(t,e){var n=(t=ot(t).map(st)).length;return"function"==typeof e?function(){for(var r=-1,i=e.apply(this,arguments);++r<n;)t[r](this,i)}:function(){for(var r=-1;++r<n;)t[r](this,e)}}function st(t){var e=it(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",rt(i+" "+t))):n.setAttribute("class",rt(i.replace(e," ")))}}function ut(t,e,n){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}:function(){this.style.setProperty(t,e,n)}}function lt(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function ct(t){return"function"==typeof t?t:(t=o.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===tt&&e.documentElement.namespaceURI===tt?e.createElement(t):e.createElementNS(n,t)}}function ht(){var t=this.parentNode;t&&t.removeChild(this)}function ft(t){return{__data__:t}}function dt(t){return function(){return Y(this,t)}}function pt(t){return arguments.length||(t=g),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function mt(t,e){for(var n=0,r=t.length;n<r;n++)for(var i,o=t[n],a=0,s=o.length;a<s;a++)(i=o[a])&&e(i,a,n);return t}function gt(t){return H(t,vt),t}o.ns={prefix:et,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(n)?{space:et[n],local:t}:t}},K.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=o.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(nt(e,t[e]));return this}return this.each(nt(t,e))},K.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=ot(t)).length,i=-1;if(e=n.classList){for(;++i<r;)if(!e.contains(t[i]))return!1}else for(e=n.getAttribute("class");++i<r;)if(!it(t[i]).test(e))return!1;return!0}for(e in t)this.each(at(e,t[e]));return this}return this.each(at(t,e))},K.style=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=""),t)this.each(ut(n,t[n],e));return this}if(r<2){var i=this.node();return c(i).getComputedStyle(i,null).getPropertyValue(t)}n=""}return this.each(ut(t,e,n))},K.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(lt(e,t[e]));return this}return this.each(lt(t,e))},K.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},K.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},K.append=function(t){return t=ct(t),this.select((function(){return this.appendChild(t.apply(this,arguments))}))},K.insert=function(t,e){return t=ct(t),e=J(e),this.select((function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)}))},K.remove=function(){return this.each(ht)},K.data=function(t,e){var n,r,i=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(t[i]=r.__data__);return t}function a(t,n){var r,i,o,a=t.length,c=n.length,h=Math.min(a,c),f=new Array(c),d=new Array(c),p=new Array(a);if(e){var m,g=new A,v=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(g.has(m=e.call(i,i.__data__,r))?p[r]=i:g.set(m,i),v[r]=m);for(r=-1;++r<c;)(i=g.get(m=e.call(n,o=n[r],r)))?!0!==i&&(f[r]=i,i.__data__=o):d[r]=ft(o),g.set(m,!0);for(r=-1;++r<a;)r in v&&!0!==g.get(v[r])&&(p[r]=t[r])}else{for(r=-1;++r<h;)i=t[r],o=n[r],i?(i.__data__=o,f[r]=i):d[r]=ft(o);for(;r<c;++r)d[r]=ft(n[r]);for(;r<a;++r)p[r]=t[r]}d.update=f,d.parentNode=f.parentNode=p.parentNode=t.parentNode,s.push(d),u.push(f),l.push(p)}var s=gt([]),u=Z([]),l=Z([]);if("function"==typeof t)for(;++i<o;)a(n=this[i],t.call(n,n.parentNode.__data__,i));else for(;++i<o;)a(n=this[i],t);return u.enter=function(){return s},u.exit=function(){return l},u},K.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},K.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=dt(t));for(var o=0,a=this.length;o<a;o++){i.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;s<u;s++)(r=n[s])&&t.call(r,r.__data__,s,o)&&e.push(r)}return Z(i)},K.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,r=this[t],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},K.sort=function(t){t=pt.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},K.each=function(t){return mt(this,(function(e,n,r){t.call(e,e.__data__,n,r)}))},K.call=function(t){var e=s(arguments);return t.apply(e[0]=this,e),this},K.empty=function(){return!this.node()},K.node=function(){for(var t=0,e=this.length;t<e;t++)for(var n=this[t],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},K.size=function(){var t=0;return mt(this,(function(){++t})),t};var vt=[];function yt(t,e,n){var r="__on"+t,i=t.indexOf("."),a=_t;i>0&&(t=t.slice(0,i));var u=xt.get(t);function l(){var e=this[r];e&&(this.removeEventListener(t,e,e.$),delete this[r])}return u&&(t=u,a=bt),i?e?function(){var i=a(e,s(arguments));l.call(this),this.addEventListener(t,this[r]=i,i.$=n),i._=e}:l:e?z:function(){var e,n=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var r in this)if(e=r.match(n)){var i=this[r];this.removeEventListener(e[1],i,i.$),delete this[r]}}}o.selection.enter=gt,o.selection.enter.prototype=vt,vt.append=K.append,vt.empty=K.empty,vt.node=K.node,vt.call=K.call,vt.size=K.size,vt.select=function(t){for(var e,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(e=[]),e.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(e.push(r[l]=n=t.call(i.parentNode,o.__data__,l,s)),n.__data__=o.__data__):e.push(null)}return Z(a)},vt.insert=function(t,e){var n,r,i;return arguments.length<2&&(n=this,e=function(t,e,o){var a,s=n[o].update,u=s.length;for(o!=i&&(i=o,r=0),e>=r&&(r=e+1);!(a=s[r])&&++r<u;);return a}),K.insert.call(this,t,e)},o.select=function(t){var e;return"string"==typeof t?(e=[X(t,u)]).parentNode=u.documentElement:(e=[t]).parentNode=l(t),Z([e])},o.selectAll=function(t){var e;return"string"==typeof t?(e=s(Q(t,u))).parentNode=u.documentElement:(e=s(t)).parentNode=null,Z([e])},K.on=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=!1),t)this.each(yt(n,t[n],e));return this}if(r<2)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(yt(t,e,n))};var xt=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function _t(t,e){return function(n){var r=o.event;o.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{o.event=r}}}function bt(t,e){var n=_t(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}u&&xt.forEach((function(t){"on"+t in u&&xt.remove(t)}));var Mt,wt=0;function At(t){var e=".dragsuppress-"+ ++wt,n="click"+e,r=o.select(c(t)).on("touchmove"+e,V).on("dragstart"+e,V).on("selectstart"+e,V);if(null==Mt&&(Mt=!("onselectstart"in t)&&N(t.style,"userSelect")),Mt){var i=l(t).style,a=i[Mt];i[Mt]="none"}return function(t){if(r.on(e,null),Mt&&(i[Mt]=a),t){var o=function(){r.on(n,null)};r.on(n,(function(){V(),o()}),!0),setTimeout(o,0)}}}o.mouse=function(t){return Ct(t,G())};var Tt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ct(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(Tt<0){var i=c(t);if(i.scrollX||i.scrollY){var a=(n=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Tt=!(a.f||a.e),n.remove()}}return Tt?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function Et(){return o.event.changedTouches[0].identifier}o.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=G().changedTouches),e)for(var r,i=0,o=e.length;i<o;++i)if((r=e[i]).identifier===n)return Ct(t,r)},o.behavior.drag=function(){var t=U(i,"drag","dragstart","dragend"),e=null,n=a(z,o.mouse,c,"mousemove","mouseup"),r=a(Et,o.touch,D,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function a(n,r,i,a,s){return function(){var u,l=this,c=o.event.target.correspondingElement||o.event.target,h=l.parentNode,f=t.of(l,arguments),d=0,p=n(),m=".drag"+(null==p?"":"-"+p),g=o.select(i(c)).on(a+m,(function(){var t,e,n=r(h,p);if(!n)return;t=n[0]-y[0],e=n[1]-y[1],d|=t|e,y=n,f({type:"drag",x:n[0]+u[0],y:n[1]+u[1],dx:t,dy:e})})).on(s+m,(function(){if(!r(h,p))return;g.on(a+m,null).on(s+m,null),v(d),f({type:"dragend"})})),v=At(c),y=r(h,p);u=e?[(u=e.apply(l,arguments)).x-y[0],u.y-y[1]]:[0,0],f({type:"dragstart"})}}return i.origin=function(t){return arguments.length?(e=t,i):e},o.rebind(i,t,"on")},o.touches=function(t,e){return arguments.length<2&&(e=G().touches),e?s(e).map((function(e){var n=Ct(t,e);return n.identifier=e.identifier,n})):[]};var kt=1e-6,St=kt*kt,Pt=Math.PI,Ot=2*Pt,Lt=Ot-kt,Rt=Pt/2,It=Pt/180,Dt=180/Pt;function Ft(t){return t>0?1:t<0?-1:0}function Nt(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function jt(t){return t>1?0:t<-1?Pt:Math.acos(t)}function zt(t){return t>1?Rt:t<-1?-Rt:Math.asin(t)}function Bt(t){return((t=Math.exp(t))+1/t)/2}function qt(t){return(t=Math.sin(t/2))*t}var Vt=Math.SQRT2;o.interpolateZoom=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],l=e[2],c=s-i,h=u-o,f=c*c+h*h;if(f<St)r=Math.log(l/a)/Vt,n=function(t){return[i+t*c,o+t*h,a*Math.exp(Vt*t*r)]};else{var d=Math.sqrt(f),p=(l*l-a*a+4*f)/(2*a*2*d),m=(l*l-a*a-4*f)/(2*l*2*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(m*m+1)-m);r=(v-g)/Vt,n=function(t){var e,n=t*r,s=Bt(g),u=a/(2*d)*(s*(e=Vt*n+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+u*c,o+u*h,a*s/Bt(Vt*n+g)]}}return n.duration=1e3*r,n},o.behavior.zoom=function(){var t,e,n,r,i,a,s,l,h,f={x:0,y:0,k:1},d=[960,500],p=Wt,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",_="touchstart.zoom",b=U(M,"zoomstart","zoom","zoomend");function M(t){t.on(v,O).on(Ut+".zoom",R).on("dblclick.zoom",I).on(_,L)}function w(t){return[(t[0]-f.x)/f.k,(t[1]-f.y)/f.k]}function A(t){f.k=Math.max(p[0],Math.min(p[1],t))}function T(t,e){e=function(t){return[t[0]*f.k+f.x,t[1]*f.k+f.y]}(e),f.x+=t[0]-e[0],f.y+=t[1]-e[1]}function C(t,n,r,i){t.__chart__={x:f.x,y:f.y,k:f.k},A(Math.pow(2,i)),T(e=n,r),t=o.select(t),m>0&&(t=t.transition().duration(m)),t.call(M.event)}function E(){s&&s.domain(a.range().map((function(t){return(t-f.x)/f.k})).map(a.invert)),h&&h.domain(l.range().map((function(t){return(t-f.y)/f.k})).map(l.invert))}function k(t){g++||t({type:"zoomstart"})}function S(t){E(),t({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function P(t){--g||(t({type:"zoomend"}),e=null)}function O(){var t=this,e=b.of(t,arguments),n=0,r=o.select(c(t)).on(y,(function(){n=1,T(o.mouse(t),i),S(e)})).on(x,(function(){r.on(y,null).on(x,null),a(n),P(e)})),i=w(o.mouse(t)),a=At(t);Ls.call(t),k(e)}function L(){var t,e=this,n=b.of(e,arguments),r={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,u="touchmove"+s,l="touchend"+s,c=[],h=o.select(e),d=At(e);function p(){var n=o.touches(e);return t=f.k,n.forEach((function(t){t.identifier in r&&(r[t.identifier]=w(t))})),n}function m(){var t=o.event.target;o.select(t).on(u,g).on(l,y),c.push(t);for(var n=o.event.changedTouches,s=0,h=n.length;s<h;++s)r[n[s].identifier]=null;var d=p(),m=Date.now();if(1===d.length){if(m-i<500){var v=d[0];C(e,v,r[v.identifier],Math.floor(Math.log(f.k)/Math.LN2)+1),V()}i=m}else if(d.length>1){v=d[0];var x=d[1],_=v[0]-x[0],b=v[1]-x[1];a=_*_+b*b}}function g(){var s,u,l,c,h=o.touches(e);Ls.call(e);for(var f=0,d=h.length;f<d;++f,c=null)if(l=h[f],c=r[l.identifier]){if(u)break;s=l,u=c}if(c){var p=(p=l[0]-s[0])*p+(p=l[1]-s[1])*p,m=a&&Math.sqrt(p/a);s=[(s[0]+l[0])/2,(s[1]+l[1])/2],u=[(u[0]+c[0])/2,(u[1]+c[1])/2],A(m*t)}i=null,T(s,u),S(n)}function y(){if(o.event.touches.length){for(var t=o.event.changedTouches,e=0,i=t.length;e<i;++e)delete r[t[e].identifier];for(var a in r)return void p()}o.selectAll(c).on(s,null),h.on(v,O).on(_,L),d(),P(n)}m(),k(n),h.on(v,null).on(_,m)}function R(){var i=b.of(this,arguments);r?clearTimeout(r):(Ls.call(this),t=w(e=n||o.mouse(this)),k(i)),r=setTimeout((function(){r=null,P(i)}),50),V(),A(Math.pow(2,.002*Gt())*f.k),T(e,t),S(i)}function I(){var t=o.mouse(this),e=Math.log(f.k)/Math.LN2;C(this,t,w(t),o.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return Ut||(Ut="onwheel"in u?(Gt=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in u?(Gt=function(){return o.event.wheelDelta},"mousewheel"):(Gt=function(){return-o.event.detail},"MozMousePixelScroll")),M.event=function(t){t.each((function(){var t=b.of(this,arguments),n=f;Ds?o.select(this).transition().each("start.zoom",(function(){f=this.__chart__||{x:0,y:0,k:1},k(t)})).tween("zoom:zoom",(function(){var r=d[0],i=d[1],a=e?e[0]:r/2,s=e?e[1]:i/2,u=o.interpolateZoom([(a-f.x)/f.k,(s-f.y)/f.k,r/f.k],[(a-n.x)/n.k,(s-n.y)/n.k,r/n.k]);return function(e){var n=u(e),i=r/n[2];this.__chart__=f={x:a-n[0]*i,y:s-n[1]*i,k:i},S(t)}})).each("interrupt.zoom",(function(){P(t)})).each("end.zoom",(function(){P(t)})):(this.__chart__=f,k(t),S(t),P(t))}))},M.translate=function(t){return arguments.length?(f={x:+t[0],y:+t[1],k:f.k},E(),M):[f.x,f.y]},M.scale=function(t){return arguments.length?(f={x:f.x,y:f.y,k:null},A(+t),E(),M):f.k},M.scaleExtent=function(t){return arguments.length?(p=null==t?Wt:[+t[0],+t[1]],M):p},M.center=function(t){return arguments.length?(n=t&&[+t[0],+t[1]],M):n},M.size=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],M):d},M.duration=function(t){return arguments.length?(m=+t,M):m},M.x=function(t){return arguments.length?(s=t,a=t.copy(),f={x:0,y:0,k:1},M):s},M.y=function(t){return arguments.length?(h=t,l=t.copy(),f={x:0,y:0,k:1},M):h},o.rebind(M,b,"on")};var Gt,Ut,Wt=[0,1/0];function Ht(){}function Zt(t,e,n){return this instanceof Zt?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof Zt?new Zt(t.h,t.s,t.l):me(""+t,ge,Zt):new Zt(t,e,n)}o.color=Ht,Ht.prototype.toString=function(){return this.rgb()+""},o.hsl=Zt;var Xt=Zt.prototype=new Ht;function Qt(t,e,n){var r,i;function o(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+e):n+e-n*e),new ce(o(t+120),o(t),o(t-120))}function Yt(t,e,n){return this instanceof Yt?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof Yt?new Yt(t.h,t.c,t.l):ae(t instanceof $t?t.l:(t=ve((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Yt(t,e,n)}Xt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Zt(this.h,this.s,this.l/t)},Xt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Zt(this.h,this.s,t*this.l)},Xt.rgb=function(){return Qt(this.h,this.s,this.l)},o.hcl=Yt;var Kt=Yt.prototype=new Ht;function Jt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new $t(n,Math.cos(t*=It)*e,Math.sin(t)*e)}function $t(t,e,n){return this instanceof $t?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof $t?new $t(t.l,t.a,t.b):t instanceof Yt?Jt(t.h,t.c,t.l):ve((t=ce(t)).r,t.g,t.b):new $t(t,e,n)}Kt.brighter=function(t){return new Yt(this.h,this.c,Math.min(100,this.l+te*(arguments.length?t:1)))},Kt.darker=function(t){return new Yt(this.h,this.c,Math.max(0,this.l-te*(arguments.length?t:1)))},Kt.rgb=function(){return Jt(this.h,this.c,this.l).rgb()},o.lab=$t;var te=18,ee=.95047,ne=1,re=1.08883,ie=$t.prototype=new Ht;function oe(t,e,n){var r=(t+16)/116,i=r+e/500,o=r-n/200;return new ce(le(3.2404542*(i=se(i)*ee)-1.5371385*(r=se(r)*ne)-.4985314*(o=se(o)*re)),le(-.969266*i+1.8760108*r+.041556*o),le(.0556434*i-.2040259*r+1.0572252*o))}function ae(t,e,n){return t>0?new Yt(Math.atan2(n,e)*Dt,Math.sqrt(e*e+n*n),t):new Yt(NaN,NaN,t)}function se(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ue(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function le(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ce(t,e,n){return this instanceof ce?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof ce?new ce(t.r,t.g,t.b):me(""+t,ce,Qt):new ce(t,e,n)}function he(t){return new ce(t>>16,t>>8&255,255&t)}function fe(t){return he(t)+""}ie.brighter=function(t){return new $t(Math.min(100,this.l+te*(arguments.length?t:1)),this.a,this.b)},ie.darker=function(t){return new $t(Math.max(0,this.l-te*(arguments.length?t:1)),this.a,this.b)},ie.rgb=function(){return oe(this.l,this.a,this.b)},o.rgb=ce;var de=ce.prototype=new Ht;function pe(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function me(t,e,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(xe(i[0]),xe(i[1]),xe(i[2]))}return(o=_e.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),e(a,s,u))}function ge(t,e,n){var r,i,o=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),s=a-o,u=(a+o)/2;return s?(i=u<.5?s/(a+o):s/(2-a-o),r=t==a?(e-n)/s+(e<n?6:0):e==a?(n-t)/s+2:(t-e)/s+4,r*=60):(r=NaN,i=u>0&&u<1?0:r),new Zt(r,i,u)}function ve(t,e,n){var r=ue((.4124564*(t=ye(t))+.3575761*(e=ye(e))+.1804375*(n=ye(n)))/ee),i=ue((.2126729*t+.7151522*e+.072175*n)/ne);return $t(116*i-16,500*(r-i),200*(i-ue((.0193339*t+.119192*e+.9503041*n)/re)))}function ye(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}de.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&e<i&&(e=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new ce(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new ce(i,i,i)},de.darker=function(t){return new ce((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},de.hsl=function(){return ge(this.r,this.g,this.b)},de.toString=function(){return"#"+pe(this.r)+pe(this.g)+pe(this.b)};var _e=o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function be(t){return"function"==typeof t?t:function(){return t}}function Me(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),we(e,n,t,r)}}function we(t,e,n,r){var i={},a=o.dispatch("beforesend","progress","load","error"),u={},l=new XMLHttpRequest,c=null;function h(){var t,e=l.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(l)||e>=200&&e<300||304===e){try{t=n.call(i,l)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,l)}return this.XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=h:l.onreadystatechange=function(){l.readyState>3&&h()},l.onprogress=function(t){var e=o.event;o.event=t;try{a.progress.call(i,l)}finally{o.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(c=t,i):c},i.response=function(t){return n=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(n,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),l.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),l.setRequestHeader)for(var s in u)l.setRequestHeader(s,u[s]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=c&&(l.responseType=c),null!=o&&i.on("error",o).on("load",(function(t){o(null,t)})),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}(r))}_e.forEach((function(t,e){_e.set(t,he(e))})),o.functor=be,o.xhr=Me(D),o.dsv=function(t,e){var n=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function i(t,n,r){arguments.length<3&&(r=n,n=null);var i=we(t,e,null==n?o:a(n),r);return i.row=function(t){return arguments.length?i.response(null==(n=t)?o:a(t)):n},i}function o(t){return i.parse(t.responseText)}function a(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(u).join(t)}function u(t){return n.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var n;return i.parseRows(t,(function(t,r){if(n)return n(t,r-1);var i=new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}");n=e?function(t,n){return e(i(t),n)}:i}))},i.parseRows=function(t,e){var n,i,o={},a={},s=[],u=t.length,l=0,c=0;function h(){if(l>=u)return a;if(i)return i=!1,o;var e=l;if(34===t.charCodeAt(e)){for(var n=e;n++<u;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}return l=n+2,13===(s=t.charCodeAt(n+1))?(i=!0,10===t.charCodeAt(n+2)&&++l):10===s&&(i=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;l<u;){var s,c=1;if(10===(s=t.charCodeAt(l++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(l)&&(++l,++c);else if(s!==r)continue;return t.slice(e,l-c)}return t.slice(e)}for(;(n=h())!==a;){for(var f=[];n!==o&&n!==a;)f.push(n),n=h();e&&null==(f=e(f,c++))||s.push(f)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var n=new I,r=[];return e.forEach((function(t){for(var e in t)n.has(e)||r.push(n.add(e))})),[r.map(u).join(t)].concat(e.map((function(e){return r.map((function(t){return u(e[t])})).join(t)}))).join("\n")},i.formatRows=function(t){return t.map(s).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var Ae,Te,Ce,Ee,ke=this[N(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function Se(t,e,n){var r=arguments.length;r<2&&(e=0),r<3&&(n=Date.now());var i={c:t,t:n+e,n:null};return Te?Te.n=i:Ae=i,Te=i,Ce||(Ee=clearTimeout(Ee),Ce=1,ke(Pe)),i}function Pe(){var t=Oe(),e=Le()-t;e>24?(isFinite(e)&&(clearTimeout(Ee),Ee=setTimeout(Pe,e)),Ce=0):(Ce=1,ke(Pe))}function Oe(){for(var t=Date.now(),e=Ae;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Le(){for(var t,e=Ae,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:Ae=e.n;return Te=t,n}function Re(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}o.timer=function(){Se.apply(this,arguments)},o.timer.flush=function(){Oe(),Le()},o.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Ie=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(t,e){var n=Math.pow(10,3*M(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}));function De(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,a=r&&n?function(t,e){for(var i=t.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>e&&(s=Math.max(1,e-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>e));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:D;return function(t){var n=Fe.exec(t),r=n[1]||" ",s=n[2]||">",u=n[3]||"-",l=n[4]||"",c=n[5],h=+n[6],f=n[7],d=n[8],p=n[9],m=1,g="",v="",y=!1,x=!0;switch(d&&(d=+d.substring(1)),(c||"0"===r&&"="===s)&&(c=r="0",s="="),p){case"n":f=!0,p="g";break;case"%":m=100,v="%",p="f";break;case"p":m=100,v="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+p.toLowerCase());case"c":x=!1;case"d":y=!0,d=0;break;case"s":m=-1,p="r"}"$"===l&&(g=i[0],v=i[1]),"r"!=p||d||(p="g"),null!=d&&("g"==p?d=Math.max(1,Math.min(21,d)):"e"!=p&&"f"!=p||(d=Math.max(0,Math.min(20,d)))),p=Ne.get(p)||je;var _=c&&f;return function(t){var n=v;if(y&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===u?"":u;if(m<0){var l=o.formatPrefix(t,d);t=l.scale(t),n=l.symbol+v}else t*=m;var b,M,w=(t=p(t,d)).lastIndexOf(".");if(w<0){var A=x?t.lastIndexOf("e"):-1;A<0?(b=t,M=""):(b=t.substring(0,A),M=t.substring(A))}else b=t.substring(0,w),M=e+t.substring(w+1);!c&&f&&(b=a(b,1/0));var T=g.length+b.length+M.length+(_?0:i.length),C=T<h?new Array(T=h-T+1).join(r):"";return _&&(b=a(C+b,C.length?h-M.length:1/0)),i+=g,t=b+M,("<"===s?i+t+C:">"===s?C+i+t:"^"===s?C.substring(0,T>>=1)+i+t+C.substring(T):i+(_?t:C+t))+n}}}o.formatPrefix=function(t,e){var n=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=o.round(t,Re(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ie[8+n/3]};var Fe=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ne=o.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=o.round(t,Re(t,e))).toFixed(Math.max(0,Math.min(20,Re(t*(1+1e-15),e))))}});function je(t){return t+""}var ze=o.time={},Be=Date;function qe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}qe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Ve.setUTCDate.apply(this._,arguments)},setDay:function(){Ve.setUTCDay.apply(this._,arguments)},setFullYear:function(){Ve.setUTCFullYear.apply(this._,arguments)},setHours:function(){Ve.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Ve.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Ve.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Ve.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Ve.setUTCSeconds.apply(this._,arguments)},setTime:function(){Ve.setTime.apply(this._,arguments)}};var Ve=Date.prototype;function Ge(t,e,n){function r(e){var n=t(e),r=o(n,1);return e-n<r-e?n:r}function i(n){return e(n=t(new Be(n-1)),1),n}function o(t,n){return e(t=new Be(+t),n),t}function a(t,r,o){var a=i(t),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date(+a)),e(a,1);else for(;a<r;)s.push(new Date(+a)),e(a,1);return s}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=Ue(t);return s.floor=s,s.round=Ue(r),s.ceil=Ue(i),s.offset=Ue(o),s.range=function(t,e,n){try{Be=qe;var r=new qe;return r._=t,a(r,e,n)}finally{Be=Date}},t}function Ue(t){return function(e,n){try{Be=qe;var r=new qe;return r._=e,t(r,n)._}finally{Be=Date}}}function We(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,s=t.shortDays,u=t.months,l=t.shortMonths;function c(t){var e=t.length;function n(n){for(var r,i,o,a=[],s=-1,u=0;++s<e;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=He[r=t.charAt(++s)])&&(r=t.charAt(++s)),(o=b[r])&&(r=o(n,null==i?"e"===r?" ":"0":i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}return n.parse=function(e){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(h(n,t,e,0)!=e.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&Be!==qe,i=new(r?qe:Be);return"j"in n?i.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),i.setFullYear(n.y,0,1),i.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(i.getDay()+5)%7:n.w+7*n.U-(i.getDay()+6)%7)):i.setFullYear(n.y,n.m,n.d),i.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),r?i._:i},n.toString=function(){return t},n}function h(t,e,n,r){for(var i,o,a,s=0,u=e.length,l=n.length;s<u;){if(r>=l)return-1;if(37===(i=e.charCodeAt(s++))){if(a=e.charAt(s++),!(o=M[a in He?e.charAt(s++):a])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}c.utc=function(t){var e=c(t);function n(t){try{var n=new(Be=qe);return n._=t,e(n)}finally{Be=Date}}return n.parse=function(t){try{Be=qe;var n=e.parse(t);return n&&n._}finally{Be=Date}},n.toString=e.toString,n},c.multi=c.utc.multi=pn;var f=o.map(),d=Ye(a),p=Ke(a),m=Ye(s),g=Ke(s),v=Ye(u),y=Ke(u),x=Ye(l),_=Ke(l);i.forEach((function(t,e){f.set(t.toLowerCase(),e)}));var b={a:function(t){return s[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:c(e),d:function(t,e){return Qe(t.getDate(),e,2)},e:function(t,e){return Qe(t.getDate(),e,2)},H:function(t,e){return Qe(t.getHours(),e,2)},I:function(t,e){return Qe(t.getHours()%12||12,e,2)},j:function(t,e){return Qe(1+ze.dayOfYear(t),e,3)},L:function(t,e){return Qe(t.getMilliseconds(),e,3)},m:function(t,e){return Qe(t.getMonth()+1,e,2)},M:function(t,e){return Qe(t.getMinutes(),e,2)},p:function(t){return i[+(t.getHours()>=12)]},S:function(t,e){return Qe(t.getSeconds(),e,2)},U:function(t,e){return Qe(ze.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Qe(ze.mondayOfYear(t),e,2)},x:c(n),X:c(r),y:function(t,e){return Qe(t.getFullYear()%100,e,2)},Y:function(t,e){return Qe(t.getFullYear()%1e4,e,4)},Z:fn,"%":function(){return"%"}},M={a:function(t,e,n){m.lastIndex=0;var r=m.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){d.lastIndex=0;var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){x.lastIndex=0;var r=x.exec(e.slice(n));return r?(t.m=_.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){v.lastIndex=0;var r=v.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,n){return h(t,b.c.toString(),e,n)},d:an,e:an,H:un,I:un,j:sn,L:hn,m:on,M:ln,p:function(t,e,n){var r=f.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)},S:cn,U:$e,w:Je,W:tn,x:function(t,e,n){return h(t,b.x.toString(),e,n)},X:function(t,e,n){return h(t,b.X.toString(),e,n)},y:nn,Y:en,Z:rn,"%":dn};return c}ze.year=Ge((function(t){return(t=ze.day(t)).setMonth(0,1),t}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t){return t.getFullYear()})),ze.years=ze.year.range,ze.years.utc=ze.year.utc.range,ze.day=Ge((function(t){var e=new Be(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t){return t.getDate()-1})),ze.days=ze.day.range,ze.days.utc=ze.day.utc.range,ze.dayOfYear=function(t){var e=ze.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,e){e=7-e;var n=ze[t]=Ge((function(t){return(t=ze.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t}),(function(t,e){t.setDate(t.getDate()+7*Math.floor(e))}),(function(t){var n=ze.year(t).getDay();return Math.floor((ze.dayOfYear(t)+(n+e)%7)/7)-(n!==e)}));ze[t+"s"]=n.range,ze[t+"s"].utc=n.utc.range,ze[t+"OfYear"]=function(t){var n=ze.year(t).getDay();return Math.floor((ze.dayOfYear(t)+(n+e)%7)/7)}})),ze.week=ze.sunday,ze.weeks=ze.sunday.range,ze.weeks.utc=ze.sunday.utc.range,ze.weekOfYear=ze.sundayOfYear;var He={"-":"",_:" ",0:"0"},Ze=/^\s*\d+/,Xe=/^%/;function Qe(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Ye(t){return new RegExp("^(?:"+t.map(o.requote).join("|")+")","i")}function Ke(t){for(var e=new A,n=-1,r=t.length;++n<r;)e.set(t[n].toLowerCase(),n);return e}function Je(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function $e(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function tn(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function en(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function nn(t,e,n){Ze.lastIndex=0;var r,i=Ze.exec(e.slice(n,n+2));return i?(t.y=(r=+i[0])+(r>68?1900:2e3),n+i[0].length):-1}function rn(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function on(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function an(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function sn(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function un(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ln(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function cn(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function hn(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function fn(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=M(e)/60|0,i=M(e)%60;return n+Qe(r,"0",2)+Qe(i,"0",2)}function dn(t,e,n){Xe.lastIndex=0;var r=Xe.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function pn(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,r=t[n];!r[1](e);)r=t[++n];return r[0](e)}}o.locale=function(t){return{numberFormat:De(t),timeFormat:We(t)}};var mn=o.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gn(){}o.format=mn.numberFormat,o.geo={},gn.prototype={s:0,t:0,add:function(t){yn(t,this.t,vn),yn(vn.s,this.s,this),this.s?this.t+=vn.t:this.s=vn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var vn=new gn;function yn(t,e,n){var r=n.s=t+e,i=r-t,o=r-i;n.t=t-o+(e-i)}function xn(t,e){t&&bn.hasOwnProperty(t.type)&&bn[t.type](t,e)}o.geo.stream=function(t,e){t&&_n.hasOwnProperty(t.type)?_n[t.type](t,e):xn(t,e)};var _n={Feature:function(t,e){xn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)xn(n[r].geometry,e)}},bn={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Mn(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Mn(n[r],e,0)},Polygon:function(t,e){wn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)wn(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)xn(n[r],e)}};function Mn(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function wn(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Mn(t[n],e,1);e.polygonEnd()}o.geo.area=function(t){return An=0,o.geo.stream(t,Nn),An};var An,Tn,Cn,En,kn,Sn,Pn,On,Ln,Rn,In,Dn,Fn=new gn,Nn={sphere:function(){An+=4*Pt},point:z,lineStart:z,lineEnd:z,polygonStart:function(){Fn.reset(),Nn.lineStart=jn},polygonEnd:function(){var t=2*Fn;An+=t<0?4*Pt+t:t,Nn.lineStart=Nn.lineEnd=Nn.point=z}};function jn(){var t,e,n,r,i;function o(t,e){e=e*It/2+Pt/4;var o=(t*=It)-n,a=o>=0?1:-1,s=a*o,u=Math.cos(e),l=Math.sin(e),c=i*l,h=r*u+c*Math.cos(s),f=c*a*Math.sin(s);Fn.add(Math.atan2(f,h)),n=t,r=u,i=l}Nn.point=function(a,s){Nn.point=o,n=(t=a)*It,r=Math.cos(s=(e=s)*It/2+Pt/4),i=Math.sin(s)},Nn.lineEnd=function(){o(t,e)}}function zn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function Bn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qn(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Vn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Gn(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Un(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Wn(t){return[Math.atan2(t[1],t[0]),zt(t[2])]}function Hn(t,e){return M(t[0]-e[0])<kt&&M(t[1]-e[1])<kt}o.geo.bounds=function(){var t,e,n,r,i,a,s,u,l,c,h,f={point:d,lineStart:m,lineEnd:g,polygonStart:function(){f.point=v,f.lineStart=y,f.lineEnd=x,l=0,Nn.polygonStart()},polygonEnd:function(){Nn.polygonEnd(),f.point=d,f.lineStart=m,f.lineEnd=g,Fn<0?(t=-(n=180),e=-(r=90)):l>kt?r=90:l<-kt&&(e=-90),h[0]=t,h[1]=n}};function d(i,o){c.push(h=[t=i,n=i]),o<e&&(e=o),o>r&&(r=o)}function p(o,a){var s=zn([o*It,a*It]);if(u){var l=qn(u,s),c=qn([l[1],-l[0],0],l);Un(c),c=Wn(c);var h=o-i,f=h>0?1:-1,p=c[0]*Dt*f,m=M(h)>180;if(m^(f*i<p&&p<f*o))(g=c[1]*Dt)>r&&(r=g);else if(m^(f*i<(p=(p+360)%360-180)&&p<f*o)){var g;(g=-c[1]*Dt)<e&&(e=g)}else a<e&&(e=a),a>r&&(r=a);m?o<i?_(t,o)>_(t,n)&&(n=o):_(o,n)>_(t,n)&&(t=o):n>=t?(o<t&&(t=o),o>n&&(n=o)):o>i?_(t,o)>_(t,n)&&(n=o):_(o,n)>_(t,n)&&(t=o)}else d(o,a);u=s,i=o}function m(){f.point=p}function g(){h[0]=t,h[1]=n,f.point=d,u=null}function v(t,e){if(u){var n=t-i;l+=M(n)>180?n+(n>0?360:-360):n}else a=t,s=e;Nn.point(t,e),p(t,e)}function y(){Nn.lineStart()}function x(){v(a,s),Nn.lineEnd(),M(l)>kt&&(t=-(n=180)),h[0]=t,h[1]=n,u=null}function _(t,e){return(e-=t)<0?e+360:e}function b(t,e){return t[0]-e[0]}function w(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}return function(i){if(r=n=-(t=e=1/0),c=[],o.geo.stream(i,f),l=c.length){c.sort(b);for(var a=1,s=[m=c[0]];a<l;++a)w((d=c[a])[0],m)||w(d[1],m)?(_(m[0],d[1])>_(m[0],m[1])&&(m[1]=d[1]),_(d[0],m[1])>_(m[0],m[1])&&(m[0]=d[0])):s.push(m=d);for(var u,l,d,p=-1/0,m=(a=0,s[l=s.length-1]);a<=l;m=d,++a)d=s[a],(u=_(m[1],d[0]))>p&&(p=u,t=d[0],n=m[1])}return c=h=null,t===1/0||e===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,e],[n,r]]}}(),o.geo.centroid=function(t){Tn=Cn=En=kn=Sn=Pn=On=Ln=Rn=In=Dn=0,o.geo.stream(t,Zn);var e=Rn,n=In,r=Dn,i=e*e+n*n+r*r;return i<St&&(e=Pn,n=On,r=Ln,Cn<kt&&(e=En,n=kn,r=Sn),(i=e*e+n*n+r*r)<St)?[NaN,NaN]:[Math.atan2(n,e)*Dt,zt(r/Math.sqrt(i))*Dt]};var Zn={sphere:z,point:Xn,lineStart:Yn,lineEnd:Kn,polygonStart:function(){Zn.lineStart=Jn},polygonEnd:function(){Zn.lineStart=Yn}};function Xn(t,e){t*=It;var n=Math.cos(e*=It);Qn(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function Qn(t,e,n){++Tn,En+=(t-En)/Tn,kn+=(e-kn)/Tn,Sn+=(n-Sn)/Tn}function Yn(){var t,e,n;function r(r,i){r*=It;var o=Math.cos(i*=It),a=o*Math.cos(r),s=o*Math.sin(r),u=Math.sin(i),l=Math.atan2(Math.sqrt((l=e*u-n*s)*l+(l=n*a-t*u)*l+(l=t*s-e*a)*l),t*a+e*s+n*u);Cn+=l,Pn+=l*(t+(t=a)),On+=l*(e+(e=s)),Ln+=l*(n+(n=u)),Qn(t,e,n)}Zn.point=function(i,o){i*=It;var a=Math.cos(o*=It);t=a*Math.cos(i),e=a*Math.sin(i),n=Math.sin(o),Zn.point=r,Qn(t,e,n)}}function Kn(){Zn.point=Xn}function Jn(){var t,e,n,r,i;function o(t,e){t*=It;var o=Math.cos(e*=It),a=o*Math.cos(t),s=o*Math.sin(t),u=Math.sin(e),l=r*u-i*s,c=i*a-n*u,h=n*s-r*a,f=Math.sqrt(l*l+c*c+h*h),d=n*a+r*s+i*u,p=f&&-jt(d)/f,m=Math.atan2(f,d);Rn+=p*l,In+=p*c,Dn+=p*h,Cn+=m,Pn+=m*(n+(n=a)),On+=m*(r+(r=s)),Ln+=m*(i+(i=u)),Qn(n,r,i)}Zn.point=function(a,s){t=a,e=s,Zn.point=o,a*=It;var u=Math.cos(s*=It);n=u*Math.cos(a),r=u*Math.sin(a),i=Math.sin(s),Qn(n,r,i)},Zn.lineEnd=function(){o(t,e),Zn.lineEnd=Kn,Zn.point=Xn}}function $n(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function tr(){return!0}function er(t,e,n,r,i){var o=[],a=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],r=t[e];if(Hn(n,r)){i.lineStart();for(var s=0;s<e;++s)i.point((n=t[s])[0],n[1]);i.lineEnd()}else{var u=new rr(n,t,null,!0),l=new rr(n,null,u,!1);u.o=l,o.push(u),a.push(l),u=new rr(r,t,null,!1),l=new rr(r,null,u,!0),u.o=l,o.push(u),a.push(l)}}})),a.sort(e),nr(o),nr(a),o.length){for(var s=0,u=n,l=a.length;s<l;++s)a[s].e=u=!u;for(var c,h,f=o[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;c=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(s=0,l=c.length;s<l;++s)i.point((h=c[s])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p)for(s=(c=d.p.z).length-1;s>=0;--s)i.point((h=c[s])[0],h[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function nr(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function rr(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function ir(t,e,n,r){return function(i,a){var s,u=e(a),l=i.invert(r[0],r[1]),c={point:h,lineStart:d,lineEnd:p,polygonStart:function(){c.point=_,c.lineStart=b,c.lineEnd=M,s=[],m=[]},polygonEnd:function(){c.point=h,c.lineStart=d,c.lineEnd=p,s=o.merge(s);var t=function(t,e){var n=t[0],r=t[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Fn.reset();for(var s=0,u=e.length;s<u;++s){var l=e[s],c=l.length;if(c)for(var h=l[0],f=h[0],d=h[1]/2+Pt/4,p=Math.sin(d),m=Math.cos(d),g=1;;){g===c&&(g=0);var v=(t=l[g])[0],y=t[1]/2+Pt/4,x=Math.sin(y),_=Math.cos(y),b=v-f,M=b>=0?1:-1,w=M*b,A=w>Pt,T=p*x;if(Fn.add(Math.atan2(T*M*Math.sin(w),m*_+T*Math.cos(w))),o+=A?b+M*Ot:b,A^f>=n^v>=n){var C=qn(zn(h),zn(t));Un(C);var E=qn(i,C);Un(E);var k=(A^b>=0?-1:1)*zt(E[2]);(r>k||r===k&&(C[0]||C[1]))&&(a+=A^b>=0?1:-1)}if(!g++)break;f=v,p=x,m=_,h=t}}return(o<-kt||o<kt&&Fn<-kt)^1&a}(l,m);s.length?(x||(a.polygonStart(),x=!0),er(s,sr,t,n,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),s=m=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function h(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&a.point(e,n)}function f(t,e){var n=i(t,e);u.point(n[0],n[1])}function d(){c.point=f,u.lineStart()}function p(){c.point=h,u.lineEnd()}var m,g,v=ar(),y=e(v),x=!1;function _(t,e){g.push([t,e]);var n=i(t,e);y.point(n[0],n[1])}function b(){y.lineStart(),g=[]}function M(){_(g[0][0],g[0][1]),y.lineEnd();var t,e=y.clean(),n=v.buffer(),r=n.length;if(g.pop(),m.push(g),g=null,r)if(1&e){var i,o=-1;if((r=(t=n[0]).length-1)>0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o<r;)a.point((i=t[o])[0],i[1]);a.lineEnd()}}else r>1&&2&e&&n.push(n.pop().concat(n.shift())),s.push(n.filter(or))}return c}}function or(t){return t.length>1}function ar(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:z,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function sr(t,e){return((t=t.x)[0]<0?t[1]-Rt-kt:Rt-t[1])-((e=e.x)[0]<0?e[1]-Rt-kt:Rt-e[1])}var ur=ir(tr,(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?Pt:-Pt,u=M(o-n);M(u-Pt)<kt?(t.point(n,r=(r+a)/2>0?Rt:-Rt),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=Pt&&(M(n-i)<kt&&(n-=i*kt),M(o-s)<kt&&(o-=s*kt),r=function(t,e,n,r){var i,o,a=Math.sin(t-n);return M(a)>kt?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Rt,r.point(-Pt,i),r.point(0,i),r.point(Pt,i),r.point(Pt,0),r.point(Pt,-i),r.point(0,-i),r.point(-Pt,-i),r.point(-Pt,0),r.point(-Pt,i);else if(M(t[0]-e[0])>kt){var o=t[0]<e[0]?Pt:-Pt;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-Pt,-Pt/2]);function lr(t,e,n,r){return function(i){var o,a=i.a,s=i.b,u=a.x,l=a.y,c=0,h=1,f=s.x-u,d=s.y-l;if(o=t-u,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<h&&(h=o)}else if(f>0){if(o>h)return;o>c&&(c=o)}if(o=n-u,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<h&&(h=o)}if(o=e-l,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<h&&(h=o)}else if(d>0){if(o>h)return;o>c&&(c=o)}if(o=r-l,d||!(o<0)){if(o/=d,d<0){if(o>h)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<h&&(h=o)}return c>0&&(i.a={x:u+c*f,y:l+c*d}),h<1&&(i.b={x:u+h*f,y:l+h*d}),i}}}}}}var cr=1e9;function hr(t,e,n,r){return function(u){var l,c,h,f,d,p,m,g,v,y,x,_=u,b=ar(),M=lr(t,e,n,r),w={point:C,lineStart:function(){w.point=E,c&&c.push(h=[]);y=!0,v=!1,m=g=NaN},lineEnd:function(){l&&(E(f,d),p&&v&&b.rejoin(),l.push(b.buffer()));w.point=C,v&&u.lineEnd()},polygonStart:function(){u=b,l=[],c=[],x=!0},polygonEnd:function(){u=_,l=o.merge(l);var e=function(t){for(var e=0,n=c.length,r=t[1],i=0;i<n;++i)for(var o,a=1,s=c[i],u=s.length,l=s[0];a<u;++a)o=s[a],l[1]<=r?o[1]>r&&Nt(l,o,t)>0&&++e:o[1]<=r&&Nt(l,o,t)<0&&--e,l=o;return 0!==e}([t,r]),n=x&&e,i=l.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),A(null,null,1,u),u.lineEnd()),i&&er(l,a,e,A,u),u.polygonEnd()),l=c=h=null}};function A(o,a,u,l){var c=0,h=0;if(null==o||(c=i(o,u))!==(h=i(a,u))||s(o,a)<0^u>0)do{l.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+u+4)%4)!==h);else l.point(a[0],a[1])}function T(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function C(t,e){T(t,e)&&u.point(t,e)}function E(t,e){var n=T(t=Math.max(-cr,Math.min(cr,t)),e=Math.max(-cr,Math.min(cr,e)));if(c&&h.push([t,e]),y)f=t,d=e,p=n,y=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&v)u.point(t,e);else{var r={a:{x:m,y:g},b:{x:t,y:e}};M(r)?(v||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),x=!1):n&&(u.lineStart(),u.point(t,e),x=!1)}m=t,g=e,v=n}return w};function i(r,i){return M(r[0]-t)<kt?i>0?0:3:M(r[0]-n)<kt?i>0?2:1:M(r[1]-e)<kt?i>0?1:0:i>0?3:2}function a(t,e){return s(t.x,e.x)}function s(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}}function fr(t){var e=0,n=Pt/3,r=Fr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Pt/180,n=t[1]*Pt/180):[e/Pt*180,n/Pt*180]},i}function dr(t,e){var n=Math.sin(t),r=(n+Math.sin(e))/2,i=1+n*(2*r-n),o=Math.sqrt(i)/r;function a(t,e){var n=Math.sqrt(i-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),o-n*Math.cos(t)]}return a.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/r,zt((i-(t*t+n*n)*r*r)/(2*r))]},a}o.geo.clipExtent=function(){var t,e,n,r,i,o,a={stream:function(t){return i&&(i.valid=!1),(i=o(t)).valid=!0,i},extent:function(s){return arguments.length?(o=hr(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[t,e],[n,r]]}};return a.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return fr(dr)}).raw=dr,o.geo.albers=function(){return o.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},o.geo.albersUsa=function(){var t,e,n,r,i=o.geo.albers(),a=o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(e,n){t=[e,n]}};function l(i){var o=i[0],a=i[1];return t=null,e(o,a),t||(n(o,a),t)||r(o,a),t}return l.invert=function(t){var e=i.scale(),n=i.translate(),r=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?a:o>=.166&&o<.234&&r>=-.214&&r<-.115?s:i).invert(t)},l.stream=function(t){var e=i.stream(t),n=a.stream(t),r=s.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},l.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),s.precision(t),l):i.precision()},l.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),s.scale(t),l.translate(i.translate())):i.scale()},l.translate=function(t){if(!arguments.length)return i.translate();var o=i.scale(),c=+t[0],h=+t[1];return e=i.translate(t).clipExtent([[c-.455*o,h-.238*o],[c+.455*o,h+.238*o]]).stream(u).point,n=a.translate([c-.307*o,h+.201*o]).clipExtent([[c-.425*o+kt,h+.12*o+kt],[c-.214*o-kt,h+.234*o-kt]]).stream(u).point,r=s.translate([c-.205*o,h+.212*o]).clipExtent([[c-.214*o+kt,h+.166*o+kt],[c-.115*o-kt,h+.234*o-kt]]).stream(u).point,l},l.scale(1070)};var pr,mr,gr,vr,yr,xr,_r={point:z,lineStart:z,lineEnd:z,polygonStart:function(){mr=0,_r.lineStart=br},polygonEnd:function(){_r.lineStart=_r.lineEnd=_r.point=z,pr+=M(mr/2)}};function br(){var t,e,n,r;function i(t,e){mr+=r*t-n*e,n=t,r=e}_r.point=function(o,a){_r.point=i,t=n=o,e=r=a},_r.lineEnd=function(){i(t,e)}}var Mr={point:function(t,e){t<gr&&(gr=t);t>yr&&(yr=t);e<vr&&(vr=e);e>xr&&(xr=e)},lineStart:z,lineEnd:z,polygonStart:z,polygonEnd:z};function wr(){var t=Ar(4.5),e=[],n={point:r,lineStart:function(){n.point=i},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=r},pointRadius:function(e){return t=Ar(e),n},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function r(n,r){e.push("M",n,",",r,t)}function i(t,r){e.push("M",t,",",r),n.point=o}function o(t,n){e.push("L",t,",",n)}function a(){n.point=r}function s(){e.push("Z")}return n}function Ar(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var Tr,Cr={point:Er,lineStart:kr,lineEnd:Sr,polygonStart:function(){Cr.lineStart=Pr},polygonEnd:function(){Cr.point=Er,Cr.lineStart=kr,Cr.lineEnd=Sr}};function Er(t,e){En+=t,kn+=e,++Sn}function kr(){var t,e;function n(n,r){var i=n-t,o=r-e,a=Math.sqrt(i*i+o*o);Pn+=a*(t+n)/2,On+=a*(e+r)/2,Ln+=a,Er(t=n,e=r)}Cr.point=function(r,i){Cr.point=n,Er(t=r,e=i)}}function Sr(){Cr.point=Er}function Pr(){var t,e,n,r;function i(t,e){var i=t-n,o=e-r,a=Math.sqrt(i*i+o*o);Pn+=a*(n+t)/2,On+=a*(r+e)/2,Ln+=a,Rn+=(a=r*t-n*e)*(n+t),In+=a*(r+e),Dn+=3*a,Er(n=t,r=e)}Cr.point=function(o,a){Cr.point=i,Er(t=n=o,e=r=a)},Cr.lineEnd=function(){i(t,e)}}function Or(t){var e=4.5,n={point:r,lineStart:function(){n.point=i},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=r},pointRadius:function(t){return e=t,n},result:z};function r(n,r){t.moveTo(n+e,r),t.arc(n,r,e,0,Ot)}function i(e,r){t.moveTo(e,r),n.point=o}function o(e,n){t.lineTo(e,n)}function a(){n.point=r}function s(){t.closePath()}return n}function Lr(t){var e=.5,n=Math.cos(30*It),r=16;function i(t){return(r?a:o)(t)}function o(e){return Ir(e,(function(n,r){n=t(n,r),e.point(n[0],n[1])}))}function a(e){var n,i,o,a,u,l,c,h,f,d,p,m,g={point:v,lineStart:y,lineEnd:_,polygonStart:function(){e.polygonStart(),g.lineStart=b},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){h=NaN,g.point=x,e.lineStart()}function x(n,i){var o=zn([n,i]),a=t(n,i);s(h,f,c,d,p,m,h=a[0],f=a[1],c=n,d=o[0],p=o[1],m=o[2],r,e),e.point(h,f)}function _(){g.point=v,e.lineEnd()}function b(){y(),g.point=M,g.lineEnd=w}function M(t,e){x(n=t,e),i=h,o=f,a=d,u=p,l=m,g.point=x}function w(){s(h,f,c,d,p,m,i,o,n,a,u,l,r,e),g.lineEnd=_,_()}return g}function s(r,i,o,a,u,l,c,h,f,d,p,m,g,v){var y=c-r,x=h-i,_=y*y+x*x;if(_>4*e&&g--){var b=a+d,w=u+p,A=l+m,T=Math.sqrt(b*b+w*w+A*A),C=Math.asin(A/=T),E=M(M(A)-1)<kt||M(o-f)<kt?(o+f)/2:Math.atan2(w,b),k=t(E,C),S=k[0],P=k[1],O=S-r,L=P-i,R=x*O-y*L;(R*R/_>e||M((y*O+x*L)/_-.5)>.3||a*d+u*p+l*m<n)&&(s(r,i,o,a,u,l,S,P,E,b/=T,w/=T,A,g,v),v.point(S,P),s(S,P,E,b,w,A,c,h,f,d,p,m,g,v))}}return i.precision=function(t){return arguments.length?(r=(e=t*t)>0&&16,i):Math.sqrt(e)},i}function Rr(t){this.stream=t}function Ir(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Dr(t){return Fr((function(){return t}))()}function Fr(t){var e,n,r,i,a,s,u=Lr((function(t,n){return[(t=e(t,n))[0]*l+i,a-t[1]*l]})),l=150,c=480,h=250,f=0,d=0,p=0,m=0,g=0,v=ur,y=D,x=null,_=null;function b(t){return[(t=r(t[0]*It,t[1]*It))[0]*l+i,a-t[1]*l]}function w(t){return(t=r.invert((t[0]-i)/l,(a-t[1])/l))&&[t[0]*Dt,t[1]*Dt]}function A(){r=$n(n=Br(p,m,g),e);var t=e(f,d);return i=c-t[0]*l,a=h+t[1]*l,T()}function T(){return s&&(s.valid=!1,s=null),b}return b.stream=function(t){return s&&(s.valid=!1),(s=Nr(v(n,u(y(t))))).valid=!0,s},b.clipAngle=function(t){return arguments.length?(v=null==t?(x=t,ur):function(t){var e=Math.cos(t),n=e>0,r=M(e)>kt;return ir(i,(function(t){var e,s,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(h,f){var d,p=[h,f],m=i(h,f),g=n?m?0:a(h,f):m?a(h+(h<0?Pt:-Pt),f):0;if(!e&&(l=u=m)&&t.lineStart(),m!==u&&(d=o(e,p),(Hn(e,d)||Hn(p,d))&&(p[0]+=kt,p[1]+=kt,m=i(p[0],p[1]))),m!==u)c=0,m?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(r&&e&&n^m){var v;g&s||!(v=o(p,e,!0))||(c=0,n?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||e&&Hn(e,p)||t.point(p[0],p[1]),e=p,u=m,s=g},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return c|(l&&u)<<1}}}),Ur(t,6*It),n?[0,-t]:[-Pt,t-Pt]);function i(t,n){return Math.cos(t)*Math.cos(n)>e}function o(t,n,r){var i=[1,0,0],o=qn(zn(t),zn(n)),a=Bn(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var l=e*a/u,c=-e*s/u,h=qn(i,o),f=Gn(i,l);Vn(f,Gn(o,c));var d=h,p=Bn(f,d),m=Bn(d,d),g=p*p-m*(Bn(f,f)-1);if(!(g<0)){var v=Math.sqrt(g),y=Gn(d,(-p-v)/m);if(Vn(y,f),y=Wn(y),!r)return y;var x,_=t[0],b=n[0],w=t[1],A=n[1];b<_&&(x=_,_=b,b=x);var T=b-_,C=M(T-Pt)<kt;if(!C&&A<w&&(x=w,w=A,A=x),C||T<kt?C?w+A>0^y[1]<(M(y[0]-_)<kt?w:A):w<=y[1]&&y[1]<=A:T>Pt^(_<=y[0]&&y[0]<=b)){var E=Gn(d,(-p+v)/m);return Vn(E,f),[y,Wn(E)]}}}function a(e,r){var i=n?t:Pt-t,o=0;return e<-i?o|=1:e>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}((x=+t)*It),T()):x},b.clipExtent=function(t){return arguments.length?(_=t,y=t?hr(t[0][0],t[0][1],t[1][0],t[1][1]):D,T()):_},b.scale=function(t){return arguments.length?(l=+t,A()):l},b.translate=function(t){return arguments.length?(c=+t[0],h=+t[1],A()):[c,h]},b.center=function(t){return arguments.length?(f=t[0]%360*It,d=t[1]%360*It,A()):[f*Dt,d*Dt]},b.rotate=function(t){return arguments.length?(p=t[0]%360*It,m=t[1]%360*It,g=t.length>2?t[2]%360*It:0,A()):[p*Dt,m*Dt,g*Dt]},o.rebind(b,u,"precision"),function(){return e=t.apply(this,arguments),b.invert=e.invert&&w,A()}}function Nr(t){return Ir(t,(function(e,n){t.point(e*It,n*It)}))}function jr(t,e){return[t,e]}function zr(t,e){return[t>Pt?t-Ot:t<-Pt?t+Ot:t,e]}function Br(t,e,n){return t?e||n?$n(Vr(t),Gr(e,n)):Vr(t):e||n?Gr(e,n):zr}function qr(t){return function(e,n){return[(e+=t)>Pt?e-Ot:e<-Pt?e+Ot:e,n]}}function Vr(t){var e=qr(t);return e.invert=qr(-t),e}function Gr(t,e){var n=Math.cos(t),r=Math.sin(t),i=Math.cos(e),o=Math.sin(e);function a(t,e){var a=Math.cos(e),s=Math.cos(t)*a,u=Math.sin(t)*a,l=Math.sin(e),c=l*n+s*r;return[Math.atan2(u*i-c*o,s*n-l*r),zt(c*i+u*o)]}return a.invert=function(t,e){var a=Math.cos(e),s=Math.cos(t)*a,u=Math.sin(t)*a,l=Math.sin(e),c=l*i-u*o;return[Math.atan2(u*i+l*o,s*n+c*r),zt(c*n-s*r)]},a}function Ur(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,o,a,s){var u=a*e;null!=i?(i=Wr(n,i),o=Wr(n,o),(a>0?i<o:i>o)&&(i+=a*Ot)):(i=t+a*Ot,o=t-.5*u);for(var l,c=i;a>0?c>o:c<o;c-=u)s.point((l=Wn([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function Wr(t,e){var n=zn(e);n[0]-=t,Un(n);var r=jt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-kt)%(2*Math.PI)}function Hr(t,e,n){var r=o.range(t,e-kt,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Zr(t,e,n){var r=o.range(t,e-kt,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Xr(t){return t.source}function Qr(t){return t.target}o.geo.path=function(){var t,e,n,r,i,a=4.5;function s(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),i&&i.valid||(i=n(r)),o.geo.stream(t,i)),r.result()}function u(){return i=null,s}return s.area=function(t){return pr=0,o.geo.stream(t,n(_r)),pr},s.centroid=function(t){return En=kn=Sn=Pn=On=Ln=Rn=In=Dn=0,o.geo.stream(t,n(Cr)),Dn?[Rn/Dn,In/Dn]:Ln?[Pn/Ln,On/Ln]:Sn?[En/Sn,kn/Sn]:[NaN,NaN]},s.bounds=function(t){return yr=xr=-(gr=vr=1/0),o.geo.stream(t,n(Mr)),[[gr,vr],[yr,xr]]},s.projection=function(e){return arguments.length?(n=(t=e)?e.stream||(r=e,i=Lr((function(t,e){return r([t*Dt,e*Dt])})),function(t){return Nr(i(t))}):D,u()):t;var r,i},s.context=function(t){return arguments.length?(r=null==(e=t)?new wr:new Or(t),"function"!=typeof a&&r.pointRadius(a),u()):e},s.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),s):a},s.projection(o.geo.albersUsa()).context(null)},o.geo.transform=function(t){return{stream:function(e){var n=new Rr(e);for(var r in t)n[r]=t[r];return n}}},Rr.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},o.geo.projection=Dr,o.geo.projectionMutator=Fr,(o.geo.equirectangular=function(){return Dr(jr)}).raw=jr.invert=jr,o.geo.rotation=function(t){function e(e){return(e=t(e[0]*It,e[1]*It))[0]*=Dt,e[1]*=Dt,e}return t=Br(t[0]%360*It,t[1]*It,t.length>2?t[2]*It:0),e.invert=function(e){return(e=t.invert(e[0]*It,e[1]*It))[0]*=Dt,e[1]*=Dt,e},e},zr.invert=jr,o.geo.circle=function(){var t,e,n=[0,0],r=6;function i(){var t="function"==typeof n?n.apply(this,arguments):n,r=Br(-t[0]*It,-t[1]*It,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=r(t,e)),t[0]*=Dt,t[1]*=Dt}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(n=t,i):n},i.angle=function(n){return arguments.length?(e=Ur((t=+n)*It,r*It),i):t},i.precision=function(n){return arguments.length?(e=Ur(t*It,(r=+n)*It),i):r},i.angle(90)},o.geo.distance=function(t,e){var n,r=(e[0]-t[0])*It,i=t[1]*It,o=e[1]*It,a=Math.sin(r),s=Math.cos(r),u=Math.sin(i),l=Math.cos(i),c=Math.sin(o),h=Math.cos(o);return Math.atan2(Math.sqrt((n=h*a)*n+(n=l*c-u*h*s)*n),u*c+l*h*s)},o.geo.graticule=function(){var t,e,n,r,i,a,s,u,l,c,h,f,d=10,p=d,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return o.range(Math.ceil(r/m)*m,n,m).map(h).concat(o.range(Math.ceil(u/g)*g,s,g).map(f)).concat(o.range(Math.ceil(e/d)*d,t,d).filter((function(t){return M(t%m)>kt})).map(l)).concat(o.range(Math.ceil(a/p)*p,i,p).filter((function(t){return M(t%g)>kt})).map(c))}return y.lines=function(){return x().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(f(s).slice(1),h(n).reverse().slice(1),f(u).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],s=+t[1][1],r>n&&(t=r,r=n,n=t),u>s&&(t=u,u=s,s=t),y.precision(v)):[[r,u],[n,s]]},y.minorExtent=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),y.precision(v)):[[e,a],[t,i]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],y):[m,g]},y.minorStep=function(t){return arguments.length?(d=+t[0],p=+t[1],y):[d,p]},y.precision=function(o){return arguments.length?(v=+o,l=Hr(a,i,90),c=Zr(e,t,v),h=Hr(u,s,90),f=Zr(r,n,v),y):v},y.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},o.geo.greatArc=function(){var t,e,n=Xr,r=Qr;function i(){return{type:"LineString",coordinates:[t||n.apply(this,arguments),e||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(t||n.apply(this,arguments),e||r.apply(this,arguments))},i.source=function(e){return arguments.length?(n=e,t="function"==typeof e?null:e,i):n},i.target=function(t){return arguments.length?(r=t,e="function"==typeof t?null:t,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(t,e){return n=t[0]*It,r=t[1]*It,i=e[0]*It,o=e[1]*It,a=Math.cos(r),s=Math.sin(r),u=Math.cos(o),l=Math.sin(o),c=a*Math.cos(n),h=a*Math.sin(n),f=u*Math.cos(i),d=u*Math.sin(i),p=2*Math.asin(Math.sqrt(qt(o-r)+a*u*qt(i-n))),m=1/Math.sin(p),(g=p?function(t){var e=Math.sin(t*=p)*m,n=Math.sin(p-t)*m,r=n*c+e*f,i=n*h+e*d,o=n*s+e*l;return[Math.atan2(i,r)*Dt,Math.atan2(o,Math.sqrt(r*r+i*i))*Dt]}:function(){return[n*Dt,r*Dt]}).distance=p,g;var n,r,i,o,a,s,u,l,c,h,f,d,p,m,g},o.geo.length=function(t){return Tr=0,o.geo.stream(t,Yr),Tr};var Yr={sphere:z,point:z,lineStart:function(){var t,e,n;function r(r,i){var o=Math.sin(i*=It),a=Math.cos(i),s=M((r*=It)-t),u=Math.cos(s);Tr+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=n*o-e*a*u)*s),e*o+n*a*u),t=r,e=o,n=a}Yr.point=function(i,o){t=i*It,e=Math.sin(o*=It),n=Math.cos(o),Yr.point=r},Yr.lineEnd=function(){Yr.point=Yr.lineEnd=z}},lineEnd:z,polygonStart:z,polygonEnd:z};function Kr(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),o=t(r*i);return[o*i*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&n*o/r)]},n}var Jr=Kr((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(o.geo.azimuthalEqualArea=function(){return Dr(Jr)}).raw=Jr;var $r=Kr((function(t){var e=Math.acos(t);return e&&e/Math.sin(e)}),D);function ti(t,e){var n=Math.cos(t),r=function(t){return Math.tan(Pt/4+t/2)},i=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(r(e)/r(t)),o=n*Math.pow(r(t),i)/i;if(!i)return ri;function a(t,e){o>0?e<-Rt+kt&&(e=-Rt+kt):e>Rt-kt&&(e=Rt-kt);var n=o/Math.pow(r(e),i);return[n*Math.sin(i*t),o-n*Math.cos(i*t)]}return a.invert=function(t,e){var n=o-e,r=Ft(i)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/i,2*Math.atan(Math.pow(o/r,1/i))-Rt]},a}function ei(t,e){var n=Math.cos(t),r=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),i=n/r+t;if(M(r)<kt)return jr;function o(t,e){var n=i-e;return[n*Math.sin(r*t),i-n*Math.cos(r*t)]}return o.invert=function(t,e){var n=i-e;return[Math.atan2(t,n)/r,i-Ft(r)*Math.sqrt(t*t+n*n)]},o}(o.geo.azimuthalEquidistant=function(){return Dr($r)}).raw=$r,(o.geo.conicConformal=function(){return fr(ti)}).raw=ti,(o.geo.conicEquidistant=function(){return fr(ei)}).raw=ei;var ni=Kr((function(t){return 1/t}),Math.atan);function ri(t,e){return[t,Math.log(Math.tan(Pt/4+e/2))]}function ii(t){var e,n=Dr(t),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var a=o.apply(n,arguments);if(a===n){if(e=null==t){var s=Pt*r(),u=i();o([[u[0]-s,u[1]-s],[u[0]+s,u[1]+s]])}}else e&&(a=null);return a},n.clipExtent(null)}(o.geo.gnomonic=function(){return Dr(ni)}).raw=ni,ri.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Rt]},(o.geo.mercator=function(){return ii(ri)}).raw=ri;var oi=Kr((function(){return 1}),Math.asin);(o.geo.orthographic=function(){return Dr(oi)}).raw=oi;var ai=Kr((function(t){return 1/(1+t)}),(function(t){return 2*Math.atan(t)}));function si(t,e){return[Math.log(Math.tan(Pt/4+e/2)),-t]}function ui(t){return t[0]}function li(t){return t[1]}function ci(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;i++){for(;r>1&&Nt(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function hi(t,e){return t[0]-e[0]||t[1]-e[1]}(o.geo.stereographic=function(){return Dr(ai)}).raw=ai,si.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Rt]},(o.geo.transverseMercator=function(){var t=ii(si),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90])}).raw=si,o.geom={},o.geom.hull=function(t){var e=ui,n=li;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,i=be(e),o=be(n),a=t.length,s=[],u=[];for(r=0;r<a;r++)s.push([+i.call(this,t[r],r),+o.call(this,t[r],r),r]);for(s.sort(hi),r=0;r<a;r++)u.push([s[r][0],-s[r][1]]);var l=ci(s),c=ci(u),h=c[0]===l[0],f=c[c.length-1]===l[l.length-1],d=[];for(r=l.length-1;r>=0;--r)d.push(t[s[l[r]][2]]);for(r=+h;r<c.length-f;++r)d.push(t[s[c[r]][2]]);return d}return r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r},o.geom.polygon=function(t){return H(t,fi),t};var fi=o.geom.polygon.prototype=[];function di(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function pi(t,e,n,r){var i=t[0],o=n[0],a=e[0]-i,s=r[0]-o,u=t[1],l=n[1],c=e[1]-u,h=r[1]-l,f=(s*(u-l)-h*(i-o))/(h*a-s*c);return[i+f*a,u+f*c]}function mi(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}fi.area=function(){for(var t,e=-1,n=this.length,r=this[n-1],i=0;++e<n;)t=r,r=this[e],i+=t[1]*r[0]-t[0]*r[1];return.5*i},fi.centroid=function(t){var e,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)e=s,s=this[r],n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o*t,a*t]},fi.clip=function(t){for(var e,n,r,i,o,a,s=mi(t),u=-1,l=this.length-mi(this),c=this[l-1];++u<l;){for(e=t.slice(),t.length=0,i=this[u],o=e[(r=e.length-s)-1],n=-1;++n<r;)di(a=e[n],c,i)?(di(o,c,i)||t.push(pi(o,a,c,i)),t.push(a)):di(o,c,i)&&t.push(pi(o,a,c,i)),o=a;s&&t.push(t[0]),c=i}return t};var gi,vi,yi,xi,_i,bi=[],Mi=[];function wi(){Vi(this),this.edge=this.site=this.circle=null}function Ai(t){var e=bi.pop()||new wi;return e.site=t,e}function Ti(t){Ii(t),yi.remove(t),bi.push(t),Vi(t)}function Ci(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},o=t.P,a=t.N,s=[t];Ti(t);for(var u=o;u.circle&&M(n-u.circle.x)<kt&&M(r-u.circle.cy)<kt;)o=u.P,s.unshift(u),Ti(u),u=o;s.unshift(u),Ii(u);for(var l=a;l.circle&&M(n-l.circle.x)<kt&&M(r-l.circle.cy)<kt;)a=l.N,s.push(l),Ti(l),l=a;s.push(l),Ii(l);var c,h=s.length;for(c=1;c<h;++c)l=s[c],u=s[c-1],zi(l.edge,u.site,l.site,i);u=s[0],(l=s[h-1]).edge=Ni(u.site,l.site,null,i),Ri(u),Ri(l)}function Ei(t){for(var e,n,r,i,o=t.x,a=t.y,s=yi._;s;)if((r=ki(s,a)-o)>kt)s=s.L;else{if(!((i=o-Si(s,a))>kt)){r>-kt?(e=s.P,n=s):i>-kt?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}var u=Ai(t);if(yi.insert(e,u),e||n){if(e===n)return Ii(e),n=Ai(e.site),yi.insert(u,n),u.edge=n.edge=Ni(e.site,u.site),Ri(e),void Ri(n);if(n){Ii(e),Ii(n);var l=e.site,c=l.x,h=l.y,f=t.x-c,d=t.y-h,p=n.site,m=p.x-c,g=p.y-h,v=2*(f*g-d*m),y=f*f+d*d,x=m*m+g*g,_={x:(g*y-d*x)/v+c,y:(f*x-m*y)/v+h};zi(n.edge,l,p,_),u.edge=Ni(l,t,null,_),n.edge=Ni(t,p,null,_),Ri(e),Ri(n)}else u.edge=Ni(e.site,u.site)}}function ki(t,e){var n=t.site,r=n.x,i=n.y,o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site).x,u=n.y,l=u-e;if(!l)return s;var c=s-r,h=1/o-1/l,f=c/l;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*l)-u+l/2+i-o/2)))/h+r:(r+s)/2}function Si(t,e){var n=t.N;if(n)return ki(n,e);var r=t.site;return r.y===e?r.x:1/0}function Pi(t){this.site=t,this.edges=[]}function Oi(t,e){return e.angle-t.angle}function Li(){Vi(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ri(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,l=r.y-s,c=o.x-a,h=2*(u*(g=o.y-s)-l*c);if(!(h>=-St)){var f=u*u+l*l,d=c*c+g*g,p=(g*f-l*d)/h,m=(u*d-c*f)/h,g=m+s,v=Mi.pop()||new Li;v.arc=t,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var y=null,x=_i._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}_i.insert(y,v),y||(xi=v)}}}}function Ii(t){var e=t.circle;e&&(e.P||(xi=e.N),_i.remove(e),Mi.push(e),Vi(e),t.circle=null)}function Di(t,e){var n=t.b;if(n)return!0;var r,i,o=t.a,a=e[0][0],s=e[1][0],u=e[0][1],l=e[1][1],c=t.l,h=t.r,f=c.x,d=c.y,p=h.x,m=h.y,g=(f+p)/2,v=(d+m)/2;if(m===d){if(g<a||g>=s)return;if(f>p){if(o){if(o.y>=l)return}else o={x:g,y:u};n={x:g,y:l}}else{if(o){if(o.y<u)return}else o={x:g,y:l};n={x:g,y:u}}}else if(i=v-(r=(f-p)/(m-d))*g,r<-1||r>1)if(f>p){if(o){if(o.y>=l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else{if(o){if(o.y<u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else if(d<m){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return t.a=o,t.b=n,!0}function Fi(t,e){this.l=t,this.r=e,this.a=this.b=null}function Ni(t,e,n,r){var i=new Fi(t,e);return gi.push(i),n&&zi(i,t,e,n),r&&zi(i,e,t,r),vi[t.i].edges.push(new Bi(i,t,e)),vi[e.i].edges.push(new Bi(i,e,t)),i}function ji(t,e,n){var r=new Fi(t,null);return r.a=e,r.b=n,gi.push(r),r}function zi(t,e,n,r){t.a||t.b?t.l===n?t.b=r:t.a=r:(t.a=r,t.l=e,t.r=n)}function Bi(t,e,n){var r=t.a,i=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function qi(){this._=null}function Vi(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Gi(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ui(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Wi(t){for(;t.L;)t=t.L;return t}function Hi(t,e){var n,r,i,o=t.sort(Zi).pop();for(gi=[],vi=new Array(t.length),yi=new qi,_i=new qi;;)if(i=xi,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(vi[o.i]=new Pi(o),Ei(o),n=o.x,r=o.y),o=t.pop();else{if(!i)break;Ci(i.arc)}e&&(function(t){for(var e,n=gi,r=lr(t[0][0],t[0][1],t[1][0],t[1][1]),i=n.length;i--;)(!Di(e=n[i],t)||!r(e)||M(e.a.x-e.b.x)<kt&&M(e.a.y-e.b.y)<kt)&&(e.a=e.b=null,n.splice(i,1))}(e),function(t){for(var e,n,r,i,o,a,s,u,l,c,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],m=vi,g=m.length;g--;)if((o=m[g])&&o.prepare())for(u=(s=o.edges).length,a=0;a<u;)r=(c=s[a].end()).x,i=c.y,e=(l=s[++a%u].start()).x,n=l.y,(M(r-e)>kt||M(i-n)>kt)&&(s.splice(a,0,new Bi(ji(o.site,c,M(r-h)<kt&&p-i>kt?{x:h,y:M(e-h)<kt?n:p}:M(i-p)<kt&&f-r>kt?{x:M(n-p)<kt?e:f,y:p}:M(r-f)<kt&&i-d>kt?{x:f,y:M(e-f)<kt?n:d}:M(i-d)<kt&&r-h>kt?{x:M(n-d)<kt?e:h,y:d}:null),o.site,null)),++u)}(e));var a={cells:vi,edges:gi};return yi=_i=gi=vi=null,a}function Zi(t,e){return e.y-t.y||e.x-t.x}Pi.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)(t=e[n].edge).b&&t.a||e.splice(n,1);return e.sort(Oi),e.length},Bi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},qi.prototype={insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Wi(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Gi(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ui(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ui(this,n),n=(t=n).U),n.C=!1,r.C=!0,Gi(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?Wi(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Gi(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ui(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Gi(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ui(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Gi(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ui(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},o.geom.voronoi=function(t){var e=ui,n=li,r=e,i=n,o=Xi;if(t)return a(t);function a(t){var e=new Array(t.length),n=o[0][0],r=o[0][1],i=o[1][0],a=o[1][1];return Hi(s(t),o).cells.forEach((function(o,s){var u=o.edges,l=o.site;(e[s]=u.length?u.map((function(t){var e=t.start();return[e.x,e.y]})):l.x>=n&&l.x<=i&&l.y>=r&&l.y<=a?[[n,a],[i,a],[i,r],[n,r]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(r(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}}))}return a.links=function(t){return Hi(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},a.triangles=function(t){var e=[];return Hi(s(t)).cells.forEach((function(n,r){for(var i,o,a,s,u=n.site,l=n.edges.sort(Oi),c=-1,h=l.length,f=l[h-1].edge,d=f.l===u?f.r:f.l;++c<h;)f,i=d,d=(f=l[c].edge).l===u?f.r:f.l,r<i.i&&r<d.i&&(a=i,s=d,((o=u).x-s.x)*(a.y-o.y)-(o.x-a.x)*(s.y-o.y)<0)&&e.push([t[r],t[i.i],t[d.i]])})),e},a.x=function(t){return arguments.length?(r=be(e=t),a):e},a.y=function(t){return arguments.length?(i=be(n=t),a):n},a.clipExtent=function(t){return arguments.length?(o=null==t?Xi:t,a):o===Xi?null:o},a.size=function(t){return arguments.length?a.clipExtent(t&&[[0,0],t]):o===Xi?null:o&&o[1]},a};var Xi=[[-1e6,-1e6],[1e6,1e6]];function Qi(t){return t.x}function Yi(t){return t.y}function Ki(t,e,n,r,i,o){if(!t(e,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),u=e.nodes;u[0]&&Ki(t,u[0],n,r,a,s),u[1]&&Ki(t,u[1],a,r,i,s),u[2]&&Ki(t,u[2],n,s,a,o),u[3]&&Ki(t,u[3],a,s,i,o)}}function Ji(t,e){t=o.rgb(t),e=o.rgb(e);var n=t.r,r=t.g,i=t.b,a=e.r-n,s=e.g-r,u=e.b-i;return function(t){return"#"+pe(Math.round(n+a*t))+pe(Math.round(r+s*t))+pe(Math.round(i+u*t))}}function $i(t,e){var n,r={},i={};for(n in t)n in e?r[n]=io(t[n],e[n]):i[n]=t[n];for(n in e)n in t||(i[n]=e[n]);return function(t){for(n in r)i[n]=r[n](t);return i}}function to(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function eo(t,e){var n,r,i,o=no.lastIndex=ro.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=no.exec(t))&&(r=ro.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:to(n,r)})),o=ro.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?(e=u[0].x,function(t){return e(t)+""}):function(){return e}:(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}o.geom.delaunay=function(t){return o.geom.voronoi().triangles(t)},o.geom.quadtree=function(t,e,n,r,i){var o,a=ui,s=li;if(o=arguments.length)return a=Qi,s=Yi,3===o&&(i=n,r=e,n=e=0),u(t);function u(t){var u,l,c,h,f,d,p,m,g,v=be(a),y=be(s);if(null!=e)d=e,p=n,m=r,g=i;else if(m=g=-(d=p=1/0),l=[],c=[],f=t.length,o)for(h=0;h<f;++h)(u=t[h]).x<d&&(d=u.x),u.y<p&&(p=u.y),u.x>m&&(m=u.x),u.y>g&&(g=u.y),l.push(u.x),c.push(u.y);else for(h=0;h<f;++h){var x=+v(u=t[h],h),_=+y(u,h);x<d&&(d=x),_<p&&(p=_),x>m&&(m=x),_>g&&(g=_),l.push(x),c.push(_)}var b=m-d,w=g-p;function A(t,e,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(t.leaf){var u=t.x,l=t.y;if(null!=u)if(M(u-n)+M(l-r)<.01)T(t,e,n,r,i,o,a,s);else{var c=t.point;t.x=t.y=t.point=null,T(t,c,u,l,i,o,a,s),T(t,e,n,r,i,o,a,s)}else t.x=n,t.y=r,t.point=e}else T(t,e,n,r,i,o,a,s)}function T(t,e,n,r,i,o,a,s){var u=.5*(i+a),l=.5*(o+s),c=n>=u,h=r>=l,f=h<<1|c;t.leaf=!1,c?i=u:a=u,h?o=l:s=l,A(t=t.nodes[f]||(t.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,n,r,i,o,a,s)}b>w?g=p+b:m=d+w;var C={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){A(C,t,+v(t,++h),+y(t,h),d,p,m,g)}};if(C.visit=function(t){Ki(t,C,d,p,m,g)},C.find=function(t){return function(t,e,n,r,i,o,a){var s,u=1/0;return function t(l,c,h,f,d){if(!(c>o||h>a||f<r||d<i)){if(p=l.point){var p,m=e-l.x,g=n-l.y,v=m*m+g*g;if(v<u){var y=Math.sqrt(u=v);r=e-y,i=n-y,o=e+y,a=n+y,s=p}}for(var x=l.nodes,_=.5*(c+f),b=.5*(h+d),M=(n>=b)<<1|e>=_,w=M+4;M<w;++M)if(l=x[3&M])switch(3&M){case 0:t(l,c,h,_,b);break;case 1:t(l,_,h,f,b);break;case 2:t(l,c,b,_,d);break;case 3:t(l,_,b,f,d)}}}(t,r,i,o,a),s}(C,t[0],t[1],d,p,m,g)},h=-1,null==e){for(;++h<f;)A(C,t[h],l[h],c[h],d,p,m,g);--h}else t.forEach(C.add);return l=c=t=u=null,C}return u.x=function(t){return arguments.length?(a=t,u):a},u.y=function(t){return arguments.length?(s=t,u):s},u.extent=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),u):null==e?null:[[e,n],[r,i]]},u.size=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=n=0,r=+t[0],i=+t[1]),u):null==e?null:[r-e,i-n]},u},o.interpolateRgb=Ji,o.interpolateObject=$i,o.interpolateNumber=to,o.interpolateString=eo;var no=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ro=new RegExp(no.source,"g");function io(t,e){for(var n,r=o.interpolators.length;--r>=0&&!(n=o.interpolators[r](t,e)););return n}function oo(t,e){var n,r=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(n=0;n<s;++n)r.push(io(t[n],e[n]));for(;n<o;++n)i[n]=t[n];for(;n<a;++n)i[n]=e[n];return function(t){for(n=0;n<s;++n)i[n]=r[n](t);return i}}o.interpolate=io,o.interpolators=[function(t,e){var n=typeof e;return("string"===n?_e.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?Ji:eo:e instanceof Ht?Ji:Array.isArray(e)?oo:"object"===n&&isNaN(e)?$i:to)(t,e)}],o.interpolateArray=oo;var ao=function(){return D},so=o.map({linear:ao,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return ho},cubic:function(){return fo},sin:function(){return mo},exp:function(){return go},circle:function(){return vo},elastic:function(t,e){var n;arguments.length<2&&(e=.45);arguments.length?n=e/Ot*Math.asin(1/t):(t=1,n=e/4);return function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Ot/e)}},back:function(t){t||(t=1.70158);return function(e){return e*e*((t+1)*e-t)}},bounce:function(){return yo}}),uo=o.map({in:D,out:lo,"in-out":co,"out-in":function(t){return co(lo(t))}});function lo(t){return function(e){return 1-t(1-e)}}function co(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function ho(t){return t*t}function fo(t){return t*t*t}function po(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function mo(t){return 1-Math.cos(t*Rt)}function go(t){return Math.pow(2,10*(t-1))}function vo(t){return 1-Math.sqrt(1-t*t)}function yo(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function xo(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function _o(t){var e,n,r,i=[t.a,t.b],o=[t.c,t.d],a=Mo(i),s=bo(i,o),u=Mo(((e=o)[0]+=(r=-s)*(n=i)[0],e[1]+=r*n[1],e))||0;i[0]*o[1]<o[0]*i[1]&&(i[0]*=-1,i[1]*=-1,a*=-1,s*=-1),this.rotate=(a?Math.atan2(i[1],i[0]):Math.atan2(-o[0],o[1]))*Dt,this.translate=[t.e,t.f],this.scale=[a,u],this.skew=u?Math.atan2(s,u)*Dt:0}function bo(t,e){return t[0]*e[0]+t[1]*e[1]}function Mo(t){var e=Math.sqrt(bo(t,t));return e&&(t[0]/=e,t[1]/=e),e}o.ease=function(t){var e,n=t.indexOf("-"),r=n>=0?t.slice(0,n):t,i=n>=0?t.slice(n+1):"in";return r=so.get(r)||ao,i=uo.get(i)||D,e=i(r.apply(null,a.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},o.interpolateHcl=function(t,e){t=o.hcl(t),e=o.hcl(e);var n=t.h,r=t.c,i=t.l,a=e.h-n,s=e.c-r,u=e.l-i;isNaN(s)&&(s=0,r=isNaN(r)?e.c:r);isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:a<-180&&(a+=360);return function(t){return Jt(n+a*t,r+s*t,i+u*t)+""}},o.interpolateHsl=function(t,e){t=o.hsl(t),e=o.hsl(e);var n=t.h,r=t.s,i=t.l,a=e.h-n,s=e.s-r,u=e.l-i;isNaN(s)&&(s=0,r=isNaN(r)?e.s:r);isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:a<-180&&(a+=360);return function(t){return Qt(n+a*t,r+s*t,i+u*t)+""}},o.interpolateLab=function(t,e){t=o.lab(t),e=o.lab(e);var n=t.l,r=t.a,i=t.b,a=e.l-n,s=e.a-r,u=e.b-i;return function(t){return oe(n+a*t,r+s*t,i+u*t)+""}},o.interpolateRound=xo,o.transform=function(t){var e=u.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new _o(n?n.matrix:wo)})(t)},_o.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var wo={a:1,b:0,c:0,d:1,e:0,f:0};function Ao(t){return t.length?t.pop()+",":""}function To(t,e){var n=[],r=[];return t=o.transform(t),e=o.transform(e),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:to(t[0],e[0])},{i:i-2,x:to(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(t.translate,e.translate,n,r),function(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(Ao(n)+"rotate(",null,")")-2,x:to(t,e)})):e&&n.push(Ao(n)+"rotate("+e+")")}(t.rotate,e.rotate,n,r),function(t,e,n,r){t!==e?r.push({i:n.push(Ao(n)+"skewX(",null,")")-2,x:to(t,e)}):e&&n.push(Ao(n)+"skewX("+e+")")}(t.skew,e.skew,n,r),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push(Ao(n)+"scale(",null,",",null,")");r.push({i:i-4,x:to(t[0],e[0])},{i:i-2,x:to(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(Ao(n)+"scale("+e+")")}(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,i=-1,o=r.length;++i<o;)n[(e=r[i]).i]=e.x(t);return n.join("")}}function Co(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function Eo(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function ko(t){for(var e=t.source,n=t.target,r=function(t,e){if(t===e)return t;var n=So(t),r=So(e),i=n.pop(),o=r.pop(),a=null;for(;i===o;)a=i,i=n.pop(),o=r.pop();return a}(e,n),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function So(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function Po(t){t.fixed|=2}function Oo(t){t.fixed&=-7}function Lo(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Ro(t){t.fixed&=-5}function Io(t,e,n){var r=0,i=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,s=a.length,u=-1;++u<s;)null!=(o=a[u])&&(Io(o,e,n),t.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=e*n[t.point.index];t.charge+=t.pointCharge=l,r+=l*t.point.x,i+=l*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}o.interpolateTransform=To,o.layout={},o.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n<r;)e.push(ko(t[n]));return e}},o.layout.chord=function(){var t,e,n,r,i,a,s,u={},l=0;function c(){var u,c,f,d,p,m={},g=[],v=o.range(r),y=[];for(t=[],e=[],u=0,d=-1;++d<r;){for(c=0,p=-1;++p<r;)c+=n[d][p];g.push(c),y.push(o.range(r)),u+=c}for(i&&v.sort((function(t,e){return i(g[t],g[e])})),a&&y.forEach((function(t,e){t.sort((function(t,r){return a(n[e][t],n[e][r])}))})),u=(Ot-l*r)/u,c=0,d=-1;++d<r;){for(f=c,p=-1;++p<r;){var x=v[d],_=y[x][p],b=n[x][_],M=c,w=c+=b*u;m[x+"-"+_]={index:x,subindex:_,startAngle:M,endAngle:w,value:b}}e[x]={index:x,startAngle:f,endAngle:c,value:g[x]},c+=l}for(d=-1;++d<r;)for(p=d-1;++p<r;){var A=m[d+"-"+p],T=m[p+"-"+d];(A.value||T.value)&&t.push(A.value<T.value?{source:T,target:A}:{source:A,target:T})}s&&h()}function h(){t.sort((function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)}))}return u.matrix=function(i){return arguments.length?(r=(n=i)&&n.length,t=e=null,u):n},u.padding=function(n){return arguments.length?(l=n,t=e=null,u):l},u.sortGroups=function(n){return arguments.length?(i=n,t=e=null,u):i},u.sortSubgroups=function(e){return arguments.length?(a=e,t=null,u):a},u.sortChords=function(e){return arguments.length?(s=e,t&&h(),u):s},u.chords=function(){return t||c(),t},u.groups=function(){return e||c(),e},u},o.layout.force=function(){var t,e,n,r,i,a,s={},u=o.dispatch("start","tick","end"),l=[1,1],c=.9,h=Do,f=Fo,d=-30,p=No,m=.1,g=.64,v=[],y=[];function x(t){return function(e,n,r,i){if(e.point!==t){var o=e.cx-t.x,a=e.cy-t.y,s=i-n,u=o*o+a*a;if(s*s/g<u){if(u<p){var l=e.charge/u;t.px-=o*l,t.py-=a*l}return!0}if(e.point&&u&&u<p){l=e.pointCharge/u;t.px-=o*l,t.py-=a*l}}return!e.charge}}function _(t){t.px=o.event.x,t.py=o.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return t=null,u.end({type:"end",alpha:n=0}),!0;var e,s,h,f,p,g,_,b,M,w=v.length,A=y.length;for(s=0;s<A;++s)f=(h=y[s]).source,(g=(b=(p=h.target).x-f.x)*b+(M=p.y-f.y)*M)&&(b*=g=n*i[s]*((g=Math.sqrt(g))-r[s])/g,M*=g,p.x-=b*(_=f.weight+p.weight?f.weight/(f.weight+p.weight):.5),p.y-=M*_,f.x+=b*(_=1-_),f.y+=M*_);if((_=n*m)&&(b=l[0]/2,M=l[1]/2,s=-1,_))for(;++s<w;)(h=v[s]).x+=(b-h.x)*_,h.y+=(M-h.y)*_;if(d)for(Io(e=o.geom.quadtree(v),n,a),s=-1;++s<w;)(h=v[s]).fixed||e.visit(x(h));for(s=-1;++s<w;)(h=v[s]).fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*c,h.y-=(h.py-(h.py=h.y))*c);u.tick({type:"tick",alpha:n})},s.nodes=function(t){return arguments.length?(v=t,s):v},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(l=t,s):l},s.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(f="function"==typeof t?t:+t,s):f},s.friction=function(t){return arguments.length?(c=+t,s):c},s.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,s):d},s.chargeDistance=function(t){return arguments.length?(p=t*t,s):Math.sqrt(p)},s.gravity=function(t){return arguments.length?(m=+t,s):m},s.theta=function(t){return arguments.length?(g=t*t,s):Math.sqrt(g)},s.alpha=function(e){return arguments.length?(e=+e,n?e>0?n=e:(t.c=null,t.t=NaN,t=null,u.end({type:"end",alpha:n=0})):e>0&&(u.start({type:"start",alpha:n=e}),t=Se(s.tick)),s):n},s.start=function(){var t,e,n,o=v.length,u=y.length,c=l[0],p=l[1];for(t=0;t<o;++t)(n=v[t]).index=t,n.weight=0;for(t=0;t<u;++t)"number"==typeof(n=y[t]).source&&(n.source=v[n.source]),"number"==typeof n.target&&(n.target=v[n.target]),++n.source.weight,++n.target.weight;for(t=0;t<o;++t)n=v[t],isNaN(n.x)&&(n.x=m("x",c)),isNaN(n.y)&&(n.y=m("y",p)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof h)for(t=0;t<u;++t)r[t]=+h.call(this,y[t],t);else for(t=0;t<u;++t)r[t]=h;if(i=[],"function"==typeof f)for(t=0;t<u;++t)i[t]=+f.call(this,y[t],t);else for(t=0;t<u;++t)i[t]=f;if(a=[],"function"==typeof d)for(t=0;t<o;++t)a[t]=+d.call(this,v[t],t);else for(t=0;t<o;++t)a[t]=d;function m(n,r){if(!e){for(e=new Array(o),l=0;l<o;++l)e[l]=[];for(l=0;l<u;++l){var i=y[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,s=e[t],l=-1,c=s.length;++l<c;)if(!isNaN(a=s[l][n]))return a;return Math.random()*r}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(e||(e=o.behavior.drag().origin(D).on("dragstart.force",Po).on("drag.force",_).on("dragend.force",Oo)),!arguments.length)return e;this.on("mouseover.force",Lo).on("mouseout.force",Ro).call(e)},o.rebind(s,u,"on")};var Do=20,Fo=1,No=1/0;function jo(t,e){return o.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=Uo,t}function zo(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function Bo(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(t=r.pop());)e(t)}function qo(t){return t.children}function Vo(t){return t.value}function Go(t,e){return e.value-t.value}function Uo(t){return o.merge(t.map((function(t){return(t.children||[]).map((function(e){return{source:t,target:e}}))})))}o.layout.hierarchy=function(){var t=Go,e=qo,n=Vo;function r(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(l=e.call(r,o,o.depth))&&(u=l.length)){for(var u,l,c;--u>=0;)a.push(c=l[u]),c.parent=o,c.depth=o.depth+1;n&&(o.value=0),o.children=l}else n&&(o.value=+n.call(r,o,o.depth)||0),delete o.children;return Bo(i,(function(e){var r,i;t&&(r=e.children)&&r.sort(t),n&&(i=e.parent)&&(i.value+=e.value)})),s}return r.sort=function(e){return arguments.length?(t=e,r):t},r.children=function(t){return arguments.length?(e=t,r):e},r.value=function(t){return arguments.length?(n=t,r):n},r.revalue=function(t){return n&&(zo(t,(function(t){t.children&&(t.value=0)})),Bo(t,(function(t){var e;t.children||(t.value=+n.call(r,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},r},o.layout.partition=function(){var t=o.layout.hierarchy(),e=[1,1];function n(t,e,r,i){var o=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,u,l=-1;for(r=t.value?r/t.value:0;++l<a;)n(s=o[l],e,u=s.value*r,i),e+=u}}function r(t){var e=t.children,n=0;if(e&&(i=e.length))for(var i,o=-1;++o<i;)n=Math.max(n,r(e[o]));return 1+n}function i(i,o){var a=t.call(this,i,o);return n(a[0],0,e[0],e[1]/r(a[0])),a}return i.size=function(t){return arguments.length?(e=t,i):e},jo(i,t)},o.layout.pie=function(){var t=Number,e=Wo,n=0,r=Ot,i=0;function a(s){var u,l=s.length,c=s.map((function(e,n){return+t.call(a,e,n)})),h=+("function"==typeof n?n.apply(this,arguments):n),f=("function"==typeof r?r.apply(this,arguments):r)-h,d=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),p=d*(f<0?-1:1),m=o.sum(c),g=m?(f-l*p)/m:0,v=o.range(l),y=[];return null!=e&&v.sort(e===Wo?function(t,e){return c[e]-c[t]}:function(t,n){return e(s[t],s[n])}),v.forEach((function(t){y[t]={data:s[t],value:u=c[t],startAngle:h,endAngle:h+=u*g+p,padAngle:d}})),y}return a.value=function(e){return arguments.length?(t=e,a):t},a.sort=function(t){return arguments.length?(e=t,a):e},a.startAngle=function(t){return arguments.length?(n=t,a):n},a.endAngle=function(t){return arguments.length?(r=t,a):r},a.padAngle=function(t){return arguments.length?(i=t,a):i},a};var Wo={};function Ho(t){return t.x}function Zo(t){return t.y}function Xo(t,e,n){t.y0=e,t.y=n}o.layout.stack=function(){var t=D,e=Ko,n=Jo,r=Xo,i=Ho,a=Zo;function s(u,l){if(!(d=u.length))return u;var c=u.map((function(e,n){return t.call(s,e,n)})),h=c.map((function(t){return t.map((function(t,e){return[i.call(s,t,e),a.call(s,t,e)]}))})),f=e.call(s,h,l);c=o.permute(c,f),h=o.permute(h,f);var d,p,m,g,v=n.call(s,h,l),y=c[0].length;for(m=0;m<y;++m)for(r.call(s,c[0][m],g=v[m],h[0][m][1]),p=1;p<d;++p)r.call(s,c[p][m],g+=h[p-1][m][1],h[p][m][1]);return u}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(t){return arguments.length?(e="function"==typeof t?t:Qo.get(t)||Ko,s):e},s.offset=function(t){return arguments.length?(n="function"==typeof t?t:Yo.get(t)||Jo,s):n},s.x=function(t){return arguments.length?(i=t,s):i},s.y=function(t){return arguments.length?(a=t,s):a},s.out=function(t){return arguments.length?(r=t,s):r},s};var Qo=o.map({"inside-out":function(t){var e,n,r=t.length,i=t.map($o),a=t.map(ta),s=o.range(r).sort((function(t,e){return i[t]-i[e]})),u=0,l=0,c=[],h=[];for(e=0;e<r;++e)n=s[e],u<l?(u+=a[n],c.push(n)):(l+=a[n],h.push(n));return h.reverse().concat(c)},reverse:function(t){return o.range(t.length).reverse()},default:Ko}),Yo=o.map({silhouette:function(t){var e,n,r,i=t.length,o=t[0].length,a=[],s=0,u=[];for(n=0;n<o;++n){for(e=0,r=0;e<i;e++)r+=t[e][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)u[n]=(s-a[n])/2;return u},wiggle:function(t){var e,n,r,i,o,a,s,u,l,c=t.length,h=t[0],f=h.length,d=[];for(d[0]=u=l=0,n=1;n<f;++n){for(e=0,i=0;e<c;++e)i+=t[e][n][1];for(e=0,o=0,s=h[n][0]-h[n-1][0];e<c;++e){for(r=0,a=(t[e][n][1]-t[e][n-1][1])/(2*s);r<e;++r)a+=(t[r][n][1]-t[r][n-1][1])/s;o+=a*t[e][n][1]}d[n]=u-=i?o/i*s:0,u<l&&(l=u)}for(n=0;n<f;++n)d[n]-=l;return d},expand:function(t){var e,n,r,i=t.length,o=t[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(e=0,r=0;e<i;e++)r+=t[e][n][1];if(r)for(e=0;e<i;e++)t[e][n][1]/=r;else for(e=0;e<i;e++)t[e][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:Jo});function Ko(t){return o.range(t.length)}function Jo(t){for(var e=-1,n=t[0].length,r=[];++e<n;)r[e]=0;return r}function $o(t){for(var e,n=1,r=0,i=t[0][1],o=t.length;n<o;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function ta(t){return t.reduce(ea,0)}function ea(t,e){return t+e[1]}function na(t,e){return ra(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function ra(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,o=[];++n<=e;)o[n]=i*n+r;return o}function ia(t){return[o.min(t),o.max(t)]}function oa(t,e){return t.value-e.value}function aa(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function sa(t,e){t._pack_next=e,e._pack_prev=t}function ua(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function la(t){if((e=t.children)&&(u=e.length)){var e,n,r,i,o,a,s,u,l=1/0,c=-1/0,h=1/0,f=-1/0;if(e.forEach(ca),(n=e[0]).x=-n.r,n.y=0,x(n),u>1&&((r=e[1]).x=r.r,r.y=0,x(r),u>2))for(da(n,r,i=e[2]),x(i),aa(n,i),n._pack_prev=i,aa(i,r),r=n._pack_next,o=3;o<u;o++){da(n,r,i=e[o]);var d=0,p=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,p++)if(ua(a,i)){d=1;break}if(1==d)for(s=n._pack_prev;s!==a._pack_prev&&!ua(s,i);s=s._pack_prev,m++);d?(p<m||p==m&&r.r<n.r?sa(n,r=a):sa(n=s,r),o--):(aa(n,i),r=i,x(i))}var g=(l+c)/2,v=(h+f)/2,y=0;for(o=0;o<u;o++)(i=e[o]).x-=g,i.y-=v,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(ha)}function x(t){l=Math.min(t.x-t.r,l),c=Math.max(t.x+t.r,c),h=Math.min(t.y-t.r,h),f=Math.max(t.y+t.r,f)}}function ca(t){t._pack_next=t._pack_prev=t}function ha(t){delete t._pack_next,delete t._pack_prev}function fa(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o<a;)fa(i[o],e,n,r)}function da(t,e,n){var r=t.r+n.r,i=e.x-t.x,o=e.y-t.y;if(r&&(i||o)){var a=e.r+n.r,s=i*i+o*o,u=.5+((r*=r)-(a*=a))/(2*s),l=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=t.x+u*i+l*o,n.y=t.y+u*o-l*i}else n.x=t.x+r,n.y=t.y}function pa(t,e){return t.parent==e.parent?1:2}function ma(t){var e=t.children;return e.length?e[0]:t.t}function ga(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function va(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function ya(t,e,n){return t.a.parent===e.parent?t.a:n}function xa(t){var e=t.children;return e&&e.length?xa(e[0]):t}function _a(t){var e,n=t.children;return n&&(e=n.length)?_a(n[e-1]):t}function ba(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ma(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function wa(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}function Aa(t){return t.rangeExtent?t.rangeExtent():wa(t.range())}function Ta(t,e,n,r){var i=n(t[0],t[1]),o=r(e[0],e[1]);return function(t){return o(i(t))}}function Ca(t,e){var n,r=0,i=t.length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Ea(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:ka}o.layout.histogram=function(){var t=!0,e=Number,n=ia,r=na;function i(i,a){for(var s,u,l=[],c=i.map(e,this),h=n.call(this,c,a),f=r.call(this,h,c,a),d=(a=-1,c.length),p=f.length-1,m=t?1:1/d;++a<p;)(s=l[a]=[]).dx=f[a+1]-(s.x=f[a]),s.y=0;if(p>0)for(a=-1;++a<d;)(u=c[a])>=h[0]&&u<=h[1]&&((s=l[o.bisect(f,u,1,p)-1]).y+=m,s.push(i[a]));return l}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(n=be(t),i):n},i.bins=function(t){return arguments.length?(r="number"==typeof t?function(e){return ra(e,t)}:be(t),i):r},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},o.layout.pack=function(){var t,e=o.layout.hierarchy().sort(oa),n=0,r=[1,1];function i(i,o){var a=e.call(this,i,o),s=a[0],u=r[0],l=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,Bo(s,(function(t){t.r=+c(t.value)})),Bo(s,la),n){var h=n*(t?1:Math.max(2*s.r/u,2*s.r/l))/2;Bo(s,(function(t){t.r+=h})),Bo(s,la),Bo(s,(function(t){t.r-=h}))}return fa(s,u/2,l/2,t?1:1/Math.max(2*s.r/u,2*s.r/l)),a}return i.size=function(t){return arguments.length?(r=t,i):r},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(n=+t,i):n},jo(i,e)},o.layout.tree=function(){var t=o.layout.hierarchy().sort(null).value(null),e=pa,n=[1,1],r=null;function i(i,o){var l=t.call(this,i,o),c=l[0],h=function(t){var e,n={A:null,children:[t]},r=[n];for(;null!=(e=r.pop());)for(var i,o=e.children,a=0,s=o.length;a<s;++a)r.push((o[a]=i={_:o[a],parent:e,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}(c);if(Bo(h,a),h.parent.m=-h.z,zo(h,s),r)zo(c,u);else{var f=c,d=c,p=c;zo(c,(function(t){t.x<f.x&&(f=t),t.x>d.x&&(d=t),t.depth>p.depth&&(p=t)}));var m=e(f,d)/2-f.x,g=n[0]/(d.x+e(d,f)/2+m),v=n[1]/(p.depth||1);zo(c,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return l}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n.length){!function(t){var e,n=0,r=0,i=t.children,o=i.length;for(;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o=t,a=t,s=n,u=o.parent.children[0],l=o.m,c=a.m,h=s.m,f=u.m;s=ga(s),o=ma(o),s&&o;)u=ma(u),(a=ga(a)).a=t,(i=s.z+h-o.z-l+e(s._,o._))>0&&(va(ya(s,t,r),t,i),l+=i,c+=i),h+=s.m,l+=o.m,f+=u.m,c+=a.m;s&&!ga(a)&&(a.t=s,a.m+=h-c),o&&!ma(u)&&(u.t=o,u.m+=l-f,r=t)}return r}(t,i,t.parent.A||r[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n[0],t.y=t.depth*n[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(r=null==(n=t)?u:null,i):r?null:n},i.nodeSize=function(t){return arguments.length?(r=null==(n=t)?null:u,i):r?n:null},jo(i,t)},o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),e=pa,n=[1,1],r=!1;function i(i,a){var s,u=t.call(this,i,a),l=u[0],c=0;Bo(l,(function(t){var n=t.children;n&&n.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(n),t.y=function(t){return 1+o.max(t,(function(t){return t.y}))}(n)):(t.x=s?c+=e(t,s):0,t.y=0,s=t)}));var h=xa(l),f=_a(l),d=h.x-e(h,f)/2,p=f.x+e(f,h)/2;return Bo(l,r?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-d)/(p-d)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),u}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(r=null==(n=t),i):r?null:n},i.nodeSize=function(t){return arguments.length?(r=null!=(n=t),i):r?n:null},jo(i,t)},o.layout.treemap=function(){var t,e=o.layout.hierarchy(),n=Math.round,r=[1,1],i=null,a=ba,s=!1,u="squarify",l=.5*(1+Math.sqrt(5));function c(t,e){for(var n,r,i=-1,o=t.length;++i<o;)r=(n=t[i]).value*(e<0?0:e),n.area=isNaN(r)||r<=0?0:r}function h(t){var e=t.children;if(e&&e.length){var n,r,i,o=a(t),s=[],l=e.slice(),f=1/0,m="slice"===u?o.dx:"dice"===u?o.dy:"slice-dice"===u?1&t.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(c(l,o.dx*o.dy/t.value),s.area=0;(i=l.length)>0;)s.push(n=l[i-1]),s.area+=n.area,"squarify"!==u||(r=d(s,m))<=f?(l.pop(),f=r):(s.area-=s.pop().area,p(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,f=1/0);s.length&&(p(s,m,o,!0),s.length=s.area=0),e.forEach(h)}}function f(t){var e=t.children;if(e&&e.length){var n,r=a(t),i=e.slice(),o=[];for(c(i,r.dx*r.dy/t.value),o.area=0;n=i.pop();)o.push(n),o.area+=n.area,null!=n.z&&(p(o,n.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);e.forEach(f)}}function d(t,e){for(var n,r=t.area,i=0,o=1/0,a=-1,s=t.length;++a<s;)(n=t[a].area)&&(n<o&&(o=n),n>i&&(i=n));return e*=e,(r*=r)?Math.max(e*i*l/r,r/(e*o*l)):1/0}function p(t,e,r,i){var o,a=-1,s=t.length,u=r.x,l=r.y,c=e?n(t.area/e):0;if(e==r.dx){for((i||c>r.dy)&&(c=r.dy);++a<s;)(o=t[a]).x=u,o.y=l,o.dy=c,u+=o.dx=Math.min(r.x+r.dx-u,c?n(o.area/c):0);o.z=!0,o.dx+=r.x+r.dx-u,r.y+=c,r.dy-=c}else{for((i||c>r.dx)&&(c=r.dx);++a<s;)(o=t[a]).x=u,o.y=l,o.dx=c,l+=o.dy=Math.min(r.y+r.dy-l,c?n(o.area/c):0);o.z=!1,o.dy+=r.y+r.dy-l,r.x+=c,r.dx-=c}}function m(n){var i=t||e(n),o=i[0];return o.x=o.y=0,o.value?(o.dx=r[0],o.dy=r[1]):o.dx=o.dy=0,t&&e.revalue(o),c([o],o.dx*o.dy/o.value),(t?f:h)(o),s&&(t=i),i}return m.size=function(t){return arguments.length?(r=t,m):r},m.padding=function(t){if(!arguments.length)return i;function e(e){return Ma(e,t)}var n;return a=null==(i=t)?ba:"function"==(n=typeof t)?function(e){var n=t.call(m,e,e.depth);return null==n?ba(e):Ma(e,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(t=[t,t,t,t],e):e,m},m.round=function(t){return arguments.length?(n=t?Math.round:Number,m):n!=Number},m.sticky=function(e){return arguments.length?(s=e,t=null,m):s},m.ratio=function(t){return arguments.length?(l=t,m):l},m.mode=function(t){return arguments.length?(u=t+"",m):u},jo(m,e)},o.random={normal:function(t,e){var n=arguments.length;return n<2&&(e=1),n<1&&(t=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=o.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;n<t;n++)e+=Math.random();return e}}},o.scale={};var ka={floor:D,ceil:D};function Sa(t,e,n,r){var i=[],a=[],s=0,u=Math.min(t.length,e.length)-1;for(t[u]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=u;)i.push(n(t[s-1],t[s])),a.push(r(e[s-1],e[s]));return function(e){var n=o.bisect(t,e,1,u)-1;return a[n](i[n](e))}}function Pa(t,e,n,r){var i,o;function a(){var a=Math.min(t.length,e.length)>2?Sa:Ta,u=r?Eo:Co;return i=a(t,e,u,n),o=a(e,t,u,io),s}function s(t){return i(t)}return s.invert=function(t){return o(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},s.range=function(t){return arguments.length?(e=t,a()):e},s.rangeRound=function(t){return s.range(t).interpolate(xo)},s.clamp=function(t){return arguments.length?(r=t,a()):r},s.interpolate=function(t){return arguments.length?(n=t,a()):n},s.ticks=function(e){return Ia(t,e)},s.tickFormat=function(e,n){return Da(t,e,n)},s.nice=function(e){return La(t,e),a()},s.copy=function(){return Pa(t,e,n,r)},a()}function Oa(t,e){return o.rebind(t,e,"range","rangeRound","interpolate","clamp")}function La(t,e){return Ca(t,Ea(Ra(t,e)[2])),Ca(t,Ea(Ra(t,e)[2])),t}function Ra(t,e){null==e&&(e=10);var n=wa(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function Ia(t,e){return o.range.apply(o,Ra(t,e))}function Da(t,e,n){var r=Ra(t,e);if(n){var i=Fe.exec(n);if(i.shift(),"s"===i[8]){var a=o.formatPrefix(Math.max(M(r[0]),M(r[1])));return i[7]||(i[7]="."+Na(a.scale(r[2]))),i[8]="f",n=o.format(i.join("")),function(t){return n(a.scale(t))+a.symbol}}i[7]||(i[7]="."+function(t,e){var n=Na(e[2]);return t in Fa?Math.abs(n-Na(Math.max(M(e[0]),M(e[1]))))+ +("e"!==t):n-2*("%"===t)}(i[8],r)),n=i.join("")}else n=",."+Na(r[2])+"f";return o.format(n)}o.scale.linear=function(){return Pa([0,1],[0,1],io,!1)};var Fa={s:1,g:1,p:1,r:1,e:1};function Na(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ja(t,e,n,r){function i(t){return(n?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(i(e))}return s.invert=function(e){return a(t.invert(e))},s.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),s):r},s.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),s):e},s.nice=function(){var e=Ca(r.map(i),n?Math:Ba);return t.domain(e),r=e.map(a),s},s.ticks=function(){var t=wa(r),o=[],s=t[0],u=t[1],l=Math.floor(i(s)),c=Math.ceil(i(u)),h=e%1?2:e;if(isFinite(c-l)){if(n){for(;l<c;l++)for(var f=1;f<h;f++)o.push(a(l)*f);o.push(a(l))}else for(o.push(a(l));l++<c;)for(f=h-1;f>0;f--)o.push(a(l)*f);for(l=0;o[l]<s;l++);for(c=o.length;o[c-1]>u;c--);o=o.slice(l,c)}return o},s.tickFormat=function(t,n){if(!arguments.length)return za;arguments.length<2?n=za:"function"!=typeof n&&(n=o.format(n));var r=Math.max(1,e*t/s.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e<e-.5&&(o*=e),o<=r?n(t):""}},s.copy=function(){return ja(t.copy(),e,n,r)},Oa(s,t)}o.scale.log=function(){return ja(o.scale.linear().domain([0,1]),10,!0,[1,10])};var za=o.format(".0e"),Ba={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function qa(t,e,n){var r=Va(e),i=Va(1/e);function o(e){return t(r(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(r)),o):n},o.ticks=function(t){return Ia(n,t)},o.tickFormat=function(t,e){return Da(n,t,e)},o.nice=function(t){return o.domain(La(n,t))},o.exponent=function(a){return arguments.length?(r=Va(e=a),i=Va(1/e),t.domain(n.map(r)),o):e},o.copy=function(){return qa(t.copy(),e,n)},Oa(o,t)}function Va(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Ga(t,e){var n,r,i;function a(i){return r[((n.get(i)||("range"===e.t?n.set(i,t.push(i)):NaN))-1)%r.length]}function s(e,n){return o.range(t.length).map((function(t){return e+n*t}))}return a.domain=function(r){if(!arguments.length)return t;t=[],n=new A;for(var i,o=-1,s=r.length;++o<s;)n.has(i=r[o])||n.set(i,t.push(i));return a[e.t].apply(a,e.a)},a.range=function(t){return arguments.length?(r=t,i=0,e={t:"range",a:arguments},a):r},a.rangePoints=function(n,o){arguments.length<2&&(o=0);var u=n[0],l=n[1],c=t.length<2?(u=(u+l)/2,0):(l-u)/(t.length-1+o);return r=s(u+c*o/2,c),i=0,e={t:"rangePoints",a:arguments},a},a.rangeRoundPoints=function(n,o){arguments.length<2&&(o=0);var u=n[0],l=n[1],c=t.length<2?(u=l=Math.round((u+l)/2),0):(l-u)/(t.length-1+o)|0;return r=s(u+Math.round(c*o/2+(l-u-(t.length-1+o)*c)/2),c),i=0,e={t:"rangeRoundPoints",a:arguments},a},a.rangeBands=function(n,o,u){arguments.length<2&&(o=0),arguments.length<3&&(u=o);var l=n[1]<n[0],c=n[l-0],h=(n[1-l]-c)/(t.length-o+2*u);return r=s(c+h*u,h),l&&r.reverse(),i=h*(1-o),e={t:"rangeBands",a:arguments},a},a.rangeRoundBands=function(n,o,u){arguments.length<2&&(o=0),arguments.length<3&&(u=o);var l=n[1]<n[0],c=n[l-0],h=n[1-l],f=Math.floor((h-c)/(t.length-o+2*u));return r=s(c+Math.round((h-c-(t.length-o)*f)/2),f),l&&r.reverse(),i=Math.round(f*(1-o)),e={t:"rangeRoundBands",a:arguments},a},a.rangeBand=function(){return i},a.rangeExtent=function(){return wa(e.a[0])},a.copy=function(){return Ga(t,e)},a.domain(t)}o.scale.pow=function(){return qa(o.scale.linear(),1,[0,1])},o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return Ga([],{t:"range",a:[[]]})},o.scale.category10=function(){return o.scale.ordinal().range(Ua)},o.scale.category20=function(){return o.scale.ordinal().range(Wa)},o.scale.category20b=function(){return o.scale.ordinal().range(Ha)},o.scale.category20c=function(){return o.scale.ordinal().range(Za)};var Ua=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(fe),Wa=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(fe),Ha=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(fe),Za=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(fe);function Xa(t,e){var n;function r(){var r=0,a=e.length;for(n=[];++r<a;)n[r-1]=o.quantile(t,r/a);return i}function i(t){if(!isNaN(t=+t))return e[o.bisect(n,t)]}return i.domain=function(e){return arguments.length?(t=e.map(v).filter(y).sort(g),r()):t},i.range=function(t){return arguments.length?(e=t,r()):e},i.quantiles=function(){return n},i.invertExtent=function(r){return(r=e.indexOf(r))<0?[NaN,NaN]:[r>0?n[r-1]:t[0],r<n.length?n[r]:t[t.length-1]]},i.copy=function(){return Xa(t,e)},r()}function Qa(t,e,n){var r,i;function o(e){return n[Math.max(0,Math.min(i,Math.floor(r*(e-t))))]}function a(){return r=n.length/(e-t),i=n.length-1,o}return o.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],a()):[t,e]},o.range=function(t){return arguments.length?(n=t,a()):n},o.invertExtent=function(e){return[e=(e=n.indexOf(e))<0?NaN:e/r+t,e+1/r]},o.copy=function(){return Qa(t,e,n)},a()}function Ya(t,e){function n(n){if(n<=n)return e[o.bisect(t,n)]}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return Ya(t,e)},n}function Ka(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return Ia(t,e)},e.tickFormat=function(e,n){return Da(t,e,n)},e.copy=function(){return Ka(t)},e}function Ja(){return 0}o.scale.quantile=function(){return Xa([],[])},o.scale.quantize=function(){return Qa(0,1,[0,1])},o.scale.threshold=function(){return Ya([.5],[0,1])},o.scale.identity=function(){return Ka([0,1])},o.svg={},o.svg.arc=function(){var t=ts,e=es,n=Ja,r=$a,i=ns,o=rs,a=is;function s(){var s=Math.max(0,+t.apply(this,arguments)),l=Math.max(0,+e.apply(this,arguments)),c=i.apply(this,arguments)-Rt,h=o.apply(this,arguments)-Rt,f=Math.abs(h-c),d=c>h?0:1;if(l<s&&(p=l,l=s,s=p),f>=Lt)return u(l,d)+(s?u(s,1-d):"")+"Z";var p,m,g,v,y,x,_,b,M,w,A,T,C=0,E=0,k=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=r===$a?Math.sqrt(s*s+l*l):+r.apply(this,arguments),d||(E*=-1),l&&(E=zt(g/l*Math.sin(v))),s&&(C=zt(g/s*Math.sin(v)))),l){y=l*Math.cos(c+E),x=l*Math.sin(c+E),_=l*Math.cos(h-E),b=l*Math.sin(h-E);var S=Math.abs(h-c-2*E)<=Pt?0:1;if(E&&os(y,x,_,b)===d^S){var P=(c+h)/2;y=l*Math.cos(P),x=l*Math.sin(P),_=b=null}}else y=x=0;if(s){M=s*Math.cos(h-C),w=s*Math.sin(h-C),A=s*Math.cos(c+C),T=s*Math.sin(c+C);var O=Math.abs(c-h+2*C)<=Pt?0:1;if(C&&os(M,w,A,T)===1-d^O){var L=(c+h)/2;M=s*Math.cos(L),w=s*Math.sin(L),A=T=null}}else M=w=0;if(f>kt&&(p=Math.min(Math.abs(l-s)/2,+n.apply(this,arguments)))>.001){m=s<l^d?0:1;var R=p,I=p;if(f<Pt){var D=null==A?[M,w]:null==_?[y,x]:pi([y,x],[A,T],[_,b],[M,w]),F=y-D[0],N=x-D[1],j=_-D[0],z=b-D[1],B=1/Math.sin(Math.acos((F*j+N*z)/(Math.sqrt(F*F+N*N)*Math.sqrt(j*j+z*z)))/2),q=Math.sqrt(D[0]*D[0]+D[1]*D[1]);I=Math.min(p,(s-q)/(B-1)),R=Math.min(p,(l-q)/(B+1))}if(null!=_){var V=as(null==A?[M,w]:[A,T],[y,x],l,R,d),G=as([_,b],[M,w],l,R,d);p===R?k.push("M",V[0],"A",R,",",R," 0 0,",m," ",V[1],"A",l,",",l," 0 ",1-d^os(V[1][0],V[1][1],G[1][0],G[1][1]),",",d," ",G[1],"A",R,",",R," 0 0,",m," ",G[0]):k.push("M",V[0],"A",R,",",R," 0 1,",m," ",G[0])}else k.push("M",y,",",x);if(null!=A){var U=as([y,x],[A,T],s,-I,d),W=as([M,w],null==_?[y,x]:[_,b],s,-I,d);p===I?k.push("L",W[0],"A",I,",",I," 0 0,",m," ",W[1],"A",s,",",s," 0 ",d^os(W[1][0],W[1][1],U[1][0],U[1][1]),",",1-d," ",U[1],"A",I,",",I," 0 0,",m," ",U[0]):k.push("L",W[0],"A",I,",",I," 0 0,",m," ",U[0])}else k.push("L",M,",",w)}else k.push("M",y,",",x),null!=_&&k.push("A",l,",",l," 0 ",S,",",d," ",_,",",b),k.push("L",M,",",w),null!=A&&k.push("A",s,",",s," 0 ",O,",",1-d," ",A,",",T);return k.push("Z"),k.join("")}function u(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}return s.innerRadius=function(e){return arguments.length?(t=be(e),s):t},s.outerRadius=function(t){return arguments.length?(e=be(t),s):e},s.cornerRadius=function(t){return arguments.length?(n=be(t),s):n},s.padRadius=function(t){return arguments.length?(r=t==$a?$a:be(t),s):r},s.startAngle=function(t){return arguments.length?(i=be(t),s):i},s.endAngle=function(t){return arguments.length?(o=be(t),s):o},s.padAngle=function(t){return arguments.length?(a=be(t),s):a},s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Rt;return[Math.cos(r)*n,Math.sin(r)*n]},s};var $a="auto";function ts(t){return t.innerRadius}function es(t){return t.outerRadius}function ns(t){return t.startAngle}function rs(t){return t.endAngle}function is(t){return t&&t.padAngle}function os(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function as(t,e,n,r,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),u=s*a,l=-s*o,c=t[0]+u,h=t[1]+l,f=e[0]+u,d=e[1]+l,p=(c+f)/2,m=(h+d)/2,g=f-c,v=d-h,y=g*g+v*v,x=n-r,_=c*d-f*h,b=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-_*_)),M=(_*v-g*b)/y,w=(-_*g-v*b)/y,A=(_*v+g*b)/y,T=(-_*g+v*b)/y,C=M-p,E=w-m,k=A-p,S=T-m;return C*C+E*E>k*k+S*S&&(M=A,w=T),[[M-u,w-l],[M*n/x,w*n/x]]}function ss(t){var e=ui,n=li,r=tr,i=ls,o=i.key,a=.7;function s(o){var s,u=[],l=[],c=-1,h=o.length,f=be(e),d=be(n);function p(){u.push("M",i(t(l),a))}for(;++c<h;)r.call(this,s=o[c],c)?l.push([+f.call(this,s,c),+d.call(this,s,c)]):l.length&&(p(),l=[]);return l.length&&p(),u.length?u.join(""):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(n=t,s):n},s.defined=function(t){return arguments.length?(r=t,s):r},s.interpolate=function(t){return arguments.length?(o="function"==typeof t?i=t:(i=us.get(t)||ls).key,s):o},s.tension=function(t){return arguments.length?(a=t,s):a},s}o.svg.line=function(){return ss(D)};var us=o.map({linear:ls,"linear-closed":cs,step:function(t){var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];for(;++e<n;)i.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);n>1&&i.push("H",r[0]);return i.join("")},"step-before":hs,"step-after":fs,basis:ms,"basis-open":function(t){if(t.length<4)return ls(t);var e,n=[],r=-1,i=t.length,o=[0],a=[0];for(;++r<3;)e=t[r],o.push(e[0]),a.push(e[1]);n.push(gs(xs,o)+","+gs(xs,a)),--r;for(;++r<i;)e=t[r],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),_s(n,o,a);return n.join("")},"basis-closed":function(t){var e,n,r=-1,i=t.length,o=i+4,a=[],s=[];for(;++r<4;)n=t[r%i],a.push(n[0]),s.push(n[1]);e=[gs(xs,a),",",gs(xs,s)],--r;for(;++r<o;)n=t[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),_s(e,a,s);return e.join("")},bundle:function(t,e){var n=t.length-1;if(n)for(var r,i,o=t[0][0],a=t[0][1],s=t[n][0]-o,u=t[n][1]-a,l=-1;++l<=n;)i=l/n,(r=t[l])[0]=e*r[0]+(1-e)*(o+i*s),r[1]=e*r[1]+(1-e)*(a+i*u);return ms(t)},cardinal:function(t,e){return t.length<3?ls(t):t[0]+ds(t,ps(t,e))},"cardinal-open":function(t,e){return t.length<4?ls(t):t[1]+ds(t.slice(1,-1),ps(t,e))},"cardinal-closed":function(t,e){return t.length<3?cs(t):t[0]+ds((t.push(t[0]),t),ps([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?ls(t):t[0]+ds(t,function(t){var e,n,r,i,o=[],a=function(t){var e=0,n=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=bs(i,o);for(;++e<n;)r[e]=(a+(a=bs(i=o,o=t[e+1])))/2;return r[e]=a,r}(t),s=-1,u=t.length-1;for(;++s<u;)e=bs(t[s],t[s+1]),M(e)<kt?a[s]=a[s+1]=0:(i=(n=a[s]/e)*n+(r=a[s+1]/e)*r)>9&&(i=3*e/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r);s=-1;for(;++s<=u;)i=(t[Math.min(u,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});function ls(t){return t.length>1?t.join("L"):t+"Z"}function cs(t){return t.join("L")+"Z"}function hs(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("V",(r=t[e])[1],"H",r[0]);return i.join("")}function fs(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r=t[e])[0],"V",r[1]);return i.join("")}function ds(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return ls(t);var n=t.length!=e.length,r="",i=t[0],o=t[1],a=e[0],s=a,u=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],u=2),e.length>1){s=e[1],o=t[u],u++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var l=2;l<e.length;l++,u++)o=t[u],s=e[l],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=t[u];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function ps(t,e){for(var n,r=[],i=(1-e)/2,o=t[0],a=t[1],s=1,u=t.length;++s<u;)n=o,o=a,a=t[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function ms(t){if(t.length<3)return ls(t);var e=1,n=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],s=[o,o,o,r[1]],u=[i,",",o,"L",gs(xs,a),",",gs(xs,s)];for(t.push(t[n-1]);++e<=n;)r=t[e],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),_s(u,a,s);return t.pop(),u.push("L",r),u.join("")}function gs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}us.forEach((function(t,e){e.key=t,e.closed=/-closed$/.test(t)}));var vs=[0,2/3,1/3,0],ys=[0,1/3,2/3,0],xs=[0,1/6,2/3,1/6];function _s(t,e,n){t.push("C",gs(vs,e),",",gs(vs,n),",",gs(ys,e),",",gs(ys,n),",",gs(xs,e),",",gs(xs,n))}function bs(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Ms(t){for(var e,n,r,i=-1,o=t.length;++i<o;)n=(e=t[i])[0],r=e[1]-Rt,e[0]=n*Math.cos(r),e[1]=n*Math.sin(r);return t}function ws(t){var e=ui,n=ui,r=0,i=li,o=tr,a=ls,s=a.key,u=a,l="L",c=.7;function h(s){var h,f,d,p=[],m=[],g=[],v=-1,y=s.length,x=be(e),_=be(r),b=e===n?function(){return f}:be(n),M=r===i?function(){return d}:be(i);function w(){p.push("M",a(t(g),c),l,u(t(m.reverse()),c),"Z")}for(;++v<y;)o.call(this,h=s[v],v)?(m.push([f=+x.call(this,h,v),d=+_.call(this,h,v)]),g.push([+b.call(this,h,v),+M.call(this,h,v)])):m.length&&(w(),m=[],g=[]);return m.length&&w(),p.length?p.join(""):null}return h.x=function(t){return arguments.length?(e=n=t,h):n},h.x0=function(t){return arguments.length?(e=t,h):e},h.x1=function(t){return arguments.length?(n=t,h):n},h.y=function(t){return arguments.length?(r=i=t,h):i},h.y0=function(t){return arguments.length?(r=t,h):r},h.y1=function(t){return arguments.length?(i=t,h):i},h.defined=function(t){return arguments.length?(o=t,h):o},h.interpolate=function(t){return arguments.length?(s="function"==typeof t?a=t:(a=us.get(t)||ls).key,u=a.reverse||a,l=a.closed?"M":"L",h):s},h.tension=function(t){return arguments.length?(c=t,h):c},h}function As(t){return t.radius}function Ts(t){return[t.x,t.y]}function Cs(){return 64}function Es(){return"circle"}function ks(t){var e=Math.sqrt(t/Pt);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}o.svg.line.radial=function(){var t=ss(Ms);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},hs.reverse=fs,fs.reverse=hs,o.svg.area=function(){return ws(D)},o.svg.area.radial=function(){var t=ws(Ms);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},o.svg.chord=function(){var t=Xr,e=Qr,n=As,r=ns,i=rs;function o(n,r){var i,o,l=a(this,t,n,r),c=a(this,e,n,r);return"M"+l.p0+s(l.r,l.p1,l.a1-l.a0)+(o=c,((i=l).a0==o.a0&&i.a1==o.a1?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+s(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z")}function a(t,e,o,a){var s=e.call(t,o,a),u=n.call(t,s,a),l=r.call(t,s,a)-Rt,c=i.call(t,s,a)-Rt;return{r:u,a0:l,a1:c,p0:[u*Math.cos(l),u*Math.sin(l)],p1:[u*Math.cos(c),u*Math.sin(c)]}}function s(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Pt)+",1 "+e}function u(t,e,n,r){return"Q 0,0 "+r}return o.radius=function(t){return arguments.length?(n=be(t),o):n},o.source=function(e){return arguments.length?(t=be(e),o):t},o.target=function(t){return arguments.length?(e=be(t),o):e},o.startAngle=function(t){return arguments.length?(r=be(t),o):r},o.endAngle=function(t){return arguments.length?(i=be(t),o):i},o},o.svg.diagonal=function(){var t=Xr,e=Qr,n=Ts;function r(r,i){var o=t.call(this,r,i),a=e.call(this,r,i),s=(o.y+a.y)/2,u=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(u=u.map(n))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}return r.source=function(e){return arguments.length?(t=be(e),r):t},r.target=function(t){return arguments.length?(e=be(t),r):e},r.projection=function(t){return arguments.length?(n=t,r):n},r},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),e=Ts,n=t.projection;return t.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),n=e[0],r=e[1]-Rt;return[n*Math.cos(r),n*Math.sin(r)]}}(e=t)):e},t},o.svg.symbol=function(){var t=Es,e=Cs;function n(n,r){return(Ss.get(t.call(this,n,r))||ks)(e.call(this,n,r))}return n.type=function(e){return arguments.length?(t=be(e),n):t},n.size=function(t){return arguments.length?(e=be(t),n):e},n};var Ss=o.map({circle:ks,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Os)),n=e*Os;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Ps),n=e*Ps/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Ps),n=e*Ps/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});o.svg.symbolTypes=Ss.keys();var Ps=Math.sqrt(3),Os=Math.tan(30*It);K.transition=function(t){for(var e,n,r=Ds||++js,i=qs(t),o=[],a=Fs||{time:Date.now(),ease:po,delay:0,duration:250},s=-1,u=this.length;++s<u;){o.push(e=[]);for(var l=this[s],c=-1,h=l.length;++c<h;)(n=l[c])&&Vs(n,c,i,r,a),e.push(n)}return Is(o,i,r)},K.interrupt=function(t){return this.each(null==t?Ls:Rs(qs(t)))};var Ls=Rs(qs());function Rs(t){return function(){var e,n,r;(e=this[t])&&(r=e[n=e.active])&&(r.timer.c=null,r.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Is(t,e,n){return H(t,Ns),t.namespace=e,t.id=n,t}var Ds,Fs,Ns=[],js=0;function zs(t,e,n,r){var i=t.id,o=t.namespace;return mt(t,"function"==typeof n?function(t,a,s){t[o][i].tween.set(e,r(n.call(t,t.__data__,a,s)))}:(n=r(n),function(t){t[o][i].tween.set(e,n)}))}function Bs(t){return null==t&&(t=""),function(){this.textContent=t}}function qs(t){return null==t?"__transition__":"__transition_"+t+"__"}function Vs(t,e,n,r,i){var o,a,s,u,l,c=t[n]||(t[n]={active:0,count:0}),h=c[r];function f(n){var i=c.active,f=c[i];for(var p in f&&(f.timer.c=null,f.timer.t=NaN,--c.count,delete c[i],f.event&&f.event.interrupt.call(t,t.__data__,f.index)),c)if(+p<r){var m=c[p];m.timer.c=null,m.timer.t=NaN,--c.count,delete c[p]}a.c=d,Se((function(){return a.c&&d(n||1)&&(a.c=null,a.t=NaN),1}),0,o),c.active=r,h.event&&h.event.start.call(t,t.__data__,e),l=[],h.tween.forEach((function(n,r){(r=r.call(t,t.__data__,e))&&l.push(r)})),u=h.ease,s=h.duration}function d(i){for(var o=i/s,a=u(o),f=l.length;f>0;)l[--f].call(t,a);if(o>=1)return h.event&&h.event.end.call(t,t.__data__,e),--c.count?delete c[r]:delete t[n],1}h||(o=i.time,a=Se((function(t){var e=h.delay;if(a.t=e+o,e<=t)return f(t-e);a.c=f}),0,o),h=c[r]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++c.count)}Ns.call=K.call,Ns.empty=K.empty,Ns.node=K.node,Ns.size=K.size,o.transition=function(t,e){return t&&t.transition?Ds?t.transition(e):t:o.selection().transition(t)},o.transition.prototype=Ns,Ns.select=function(t){var e,n,r,i=this.id,o=this.namespace,a=[];t=J(t);for(var s=-1,u=this.length;++s<u;){a.push(e=[]);for(var l=this[s],c=-1,h=l.length;++c<h;)(r=l[c])&&(n=t.call(r,r.__data__,c,s))?("__data__"in r&&(n.__data__=r.__data__),Vs(n,c,o,i,r[o][i]),e.push(n)):e.push(null)}return Is(a,o,i)},Ns.selectAll=function(t){var e,n,r,i,o,a=this.id,s=this.namespace,u=[];t=$(t);for(var l=-1,c=this.length;++l<c;)for(var h=this[l],f=-1,d=h.length;++f<d;)if(r=h[f]){o=r[s][a],n=t.call(r,r.__data__,f,l),u.push(e=[]);for(var p=-1,m=n.length;++p<m;)(i=n[p])&&Vs(i,p,s,a,o),e.push(i)}return Is(u,s,a)},Ns.filter=function(t){var e,n,r=[];"function"!=typeof t&&(t=dt(t));for(var i=0,o=this.length;i<o;i++){r.push(e=[]);for(var a,s=0,u=(a=this[i]).length;s<u;s++)(n=a[s])&&t.call(n,n.__data__,s,i)&&e.push(n)}return Is(r,this.namespace,this.id)},Ns.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):mt(this,null==e?function(e){e[r][n].tween.remove(t)}:function(i){i[r][n].tween.set(t,e)})},Ns.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var n="transform"==t?To:io,r=o.ns.qualify(t);function i(){this.removeAttribute(r)}function a(){this.removeAttributeNS(r.space,r.local)}return zs(this,"attr."+t,e,r.local?function(t){return null==t?a:(t+="",function(){var e,i=this.getAttributeNS(r.space,r.local);return i!==t&&(e=n(i,t),function(t){this.setAttributeNS(r.space,r.local,e(t))})})}:function(t){return null==t?i:(t+="",function(){var e,i=this.getAttribute(r);return i!==t&&(e=n(i,t),function(t){this.setAttribute(r,e(t))})})})},Ns.attrTween=function(t,e){var n=o.ns.qualify(t);return this.tween("attr."+t,n.local?function(t,r){var i=e.call(this,t,r,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,r){var i=e.call(this,t,r,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},Ns.style=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=""),t)this.style(n,t[n],e);return this}n=""}function i(){this.style.removeProperty(t)}return zs(this,"style."+t,e,(function(e){return null==e?i:(e+="",function(){var r,i=c(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=io(i,e),function(e){this.style.setProperty(t,r(e),n)})})}))},Ns.styleTween=function(t,e,n){return arguments.length<3&&(n=""),this.tween("style."+t,(function(r,i){var o=e.call(this,r,i,c(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}}))},Ns.text=function(t){return zs(this,"text",t,Bs)},Ns.remove=function(){var t=this.namespace;return this.each("end.transition",(function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)}))},Ns.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=o.ease.apply(o,arguments)),mt(this,(function(r){r[n][e].ease=t})))},Ns.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:mt(this,"function"==typeof t?function(r,i,o){r[n][e].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[n][e].delay=t}))},Ns.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:mt(this,"function"==typeof t?function(r,i,o){r[n][e].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},Ns.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var i=Fs,a=Ds;try{Ds=n,mt(this,(function(e,i,o){Fs=e[r][n],t.call(e,e.__data__,i,o)}))}finally{Fs=i,Ds=a}}else mt(this,(function(i){var a=i[r][n];(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(t,e)}));return this},Ns.transition=function(){for(var t,e,n,r=this.id,i=++js,o=this.namespace,a=[],s=0,u=this.length;s<u;s++){a.push(t=[]);for(var l,c=0,h=(l=this[s]).length;c<h;c++)(e=l[c])&&Vs(e,c,o,i,{time:(n=e[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),t.push(e)}return Is(a,o,i)},o.svg.axis=function(){var t,e=o.scale.linear(),n=Gs,r=6,i=6,a=3,u=[10],l=null;function c(s){s.each((function(){var s,c=o.select(this),h=this.__chart__||e,f=this.__chart__=e.copy(),d=null==l?f.ticks?f.ticks.apply(f,u):f.domain():l,p=null==t?f.tickFormat?f.tickFormat.apply(f,u):D:t,m=c.selectAll(".tick").data(d,f),g=m.enter().insert("g",".domain").attr("class","tick").style("opacity",kt),v=o.transition(m.exit()).style("opacity",kt).remove(),y=o.transition(m.order()).style("opacity",1),x=Math.max(r,0)+a,_=Aa(f),b=c.selectAll(".domain").data([0]),M=(b.enter().append("path").attr("class","domain"),o.transition(b));g.append("line"),g.append("text");var w,A,T,C,E=g.select("line"),k=y.select("line"),S=m.select("text").text(p),P=g.select("text"),O=y.select("text"),L="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(s=Ws,w="x",T="y",A="x2",C="y2",S.attr("dy",L<0?"0em":".71em").style("text-anchor","middle"),M.attr("d","M"+_[0]+","+L*i+"V0H"+_[1]+"V"+L*i)):(s=Hs,w="y",T="x",A="y2",C="x2",S.attr("dy",".32em").style("text-anchor",L<0?"end":"start"),M.attr("d","M"+L*i+","+_[0]+"H0V"+_[1]+"H"+L*i)),E.attr(C,L*r),P.attr(T,L*x),k.attr(A,0).attr(C,L*r),O.attr(w,0).attr(T,L*x),f.rangeBand){var R=f,I=R.rangeBand()/2;h=f=function(t){return R(t)+I}}else h.rangeBand?h=f:v.call(s,f,h);g.call(s,h,f),y.call(s,f,f)}))}return c.scale=function(t){return arguments.length?(e=t,c):e},c.orient=function(t){return arguments.length?(n=t in Us?t+"":Gs,c):n},c.ticks=function(){return arguments.length?(u=s(arguments),c):u},c.tickValues=function(t){return arguments.length?(l=t,c):l},c.tickFormat=function(e){return arguments.length?(t=e,c):t},c.tickSize=function(t){var e=arguments.length;return e?(r=+t,i=+arguments[e-1],c):r},c.innerTickSize=function(t){return arguments.length?(r=+t,c):r},c.outerTickSize=function(t){return arguments.length?(i=+t,c):i},c.tickPadding=function(t){return arguments.length?(a=+t,c):a},c.tickSubdivide=function(){return arguments.length&&c},c};var Gs="bottom",Us={top:1,right:1,bottom:1,left:1};function Ws(t,e,n){t.attr("transform",(function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"}))}function Hs(t,e,n){t.attr("transform",(function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"}))}o.svg.brush=function(){var t,e,n=U(f,"brushstart","brush","brushend"),r=null,i=null,a=[0,0],s=[0,0],u=!0,l=!0,h=Xs[0];function f(t){t.each((function(){var t=o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",g).on("touchstart.brush",g),e=t.selectAll(".background").data([0]);e.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=t.selectAll(".resize").data(h,D);n.exit().remove(),n.enter().append("g").attr("class",(function(t){return"resize "+t})).style("cursor",(function(t){return Zs[t]})).append("rect").attr("x",(function(t){return/[ew]$/.test(t)?-3:null})).attr("y",(function(t){return/^[ns]/.test(t)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",f.empty()?"none":null);var a,s=o.transition(t),u=o.transition(e);r&&(a=Aa(r),u.attr("x",a[0]).attr("width",a[1]-a[0]),p(s)),i&&(a=Aa(i),u.attr("y",a[0]).attr("height",a[1]-a[0]),m(s)),d(s)}))}function d(t){t.selectAll(".resize").attr("transform",(function(t){return"translate("+a[+/e$/.test(t)]+","+s[+/^s/.test(t)]+")"}))}function p(t){t.select(".extent").attr("x",a[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",a[1]-a[0])}function m(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var h,g,v=this,y=o.select(o.event.target),x=n.of(v,arguments),_=o.select(v),b=y.datum(),M=!/^(n|s)$/.test(b)&&r,w=!/^(e|w)$/.test(b)&&i,A=y.classed("extent"),T=At(v),C=o.mouse(v),E=o.select(c(v)).on("keydown.brush",(function(){32==o.event.keyCode&&(A||(h=null,C[0]-=a[1],C[1]-=s[1],A=2),V())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==A&&(C[0]+=a[1],C[1]+=s[1],A=0,V())}));if(o.event.changedTouches?E.on("touchmove.brush",P).on("touchend.brush",L):E.on("mousemove.brush",P).on("mouseup.brush",L),_.interrupt().selectAll("*").interrupt(),A)C[0]=a[0]-C[0],C[1]=s[0]-C[1];else if(b){var k=+/w$/.test(b),S=+/^n/.test(b);g=[a[1-k]-C[0],s[1-S]-C[1]],C[0]=a[k],C[1]=s[S]}else o.event.altKey&&(h=C.slice());function P(){var t=o.mouse(v),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),A||(o.event.altKey?(h||(h=[(a[0]+a[1])/2,(s[0]+s[1])/2]),C[0]=a[+(t[0]<h[0])],C[1]=s[+(t[1]<h[1])]):h=null),M&&O(t,r,0)&&(p(_),e=!0),w&&O(t,i,1)&&(m(_),e=!0),e&&(d(_),x({type:"brush",mode:A?"move":"resize"}))}function O(n,r,i){var o,c,f=Aa(r),d=f[0],p=f[1],m=C[i],g=i?s:a,v=g[1]-g[0];if(A&&(d-=m,p-=v+m),o=(i?l:u)?Math.max(d,Math.min(p,n[i])):n[i],A?c=(o+=m)+v:(h&&(m=Math.max(d,Math.min(p,2*h[i]-o))),m<o?(c=o,o=m):c=m),g[0]!=o||g[1]!=c)return i?e=null:t=null,g[0]=o,g[1]=c,!0}function L(){P(),_.style("pointer-events","all").selectAll(".resize").style("display",f.empty()?"none":null),o.select("body").style("cursor",null),E.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),T(),x({type:"brushend"})}_.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",y.style("cursor")),x({type:"brushstart"}),P()}return f.event=function(r){r.each((function(){var r=n.of(this,arguments),i={x:a,y:s,i:t,j:e},u=this.__chart__||i;this.__chart__=i,Ds?o.select(this).transition().each("start.brush",(function(){t=u.i,e=u.j,a=u.x,s=u.y,r({type:"brushstart"})})).tween("brush:brush",(function(){var n=oo(a,i.x),o=oo(s,i.y);return t=e=null,function(t){a=i.x=n(t),s=i.y=o(t),r({type:"brush",mode:"resize"})}})).each("end.brush",(function(){t=i.i,e=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})})):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))}))},f.x=function(t){return arguments.length?(h=Xs[!(r=t)<<1|!i],f):r},f.y=function(t){return arguments.length?(h=Xs[!r<<1|!(i=t)],f):i},f.clamp=function(t){return arguments.length?(r&&i?(u=!!t[0],l=!!t[1]):r?u=!!t:i&&(l=!!t),f):r&&i?[u,l]:r?u:i?l:null},f.extent=function(n){var o,u,l,c,h;return arguments.length?(r&&(o=n[0],u=n[1],i&&(o=o[0],u=u[0]),t=[o,u],r.invert&&(o=r(o),u=r(u)),u<o&&(h=o,o=u,u=h),o==a[0]&&u==a[1]||(a=[o,u])),i&&(l=n[0],c=n[1],r&&(l=l[1],c=c[1]),e=[l,c],i.invert&&(l=i(l),c=i(c)),c<l&&(h=l,l=c,c=h),l==s[0]&&c==s[1]||(s=[l,c])),f):(r&&(t?(o=t[0],u=t[1]):(o=a[0],u=a[1],r.invert&&(o=r.invert(o),u=r.invert(u)),u<o&&(h=o,o=u,u=h))),i&&(e?(l=e[0],c=e[1]):(l=s[0],c=s[1],i.invert&&(l=i.invert(l),c=i.invert(c)),c<l&&(h=l,l=c,c=h))),r&&i?[[o,l],[u,c]]:r?[o,u]:i&&[l,c])},f.clear=function(){return f.empty()||(a=[0,0],s=[0,0],t=e=null),f},f.empty=function(){return!!r&&a[0]==a[1]||!!i&&s[0]==s[1]},o.rebind(f,n,"on")};var Zs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Xs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Qs=ze.format=mn.timeFormat,Ys=Qs.utc,Ks=Ys("%Y-%m-%dT%H:%M:%S.%LZ");function Js(t){return t.toISOString()}function $s(t,e,n){function r(e){return t(e)}function i(t,n){var r=(t[1]-t[0])/n,i=o.bisect(eu,r);return i==eu.length?[e.year,Ra(t.map((function(t){return t/31536e6})),n)[2]]:i?e[r/eu[i-1]<eu[i]/r?i-1:i]:[iu,Ra(t,n)[2]]}return r.invert=function(e){return tu(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(tu)},r.nice=function(t,e){var n=r.domain(),o=wa(n),a=null==t?i(o,10):"number"==typeof t&&i(o,t);function s(n){return!isNaN(n)&&!t.range(n,tu(+n+1),e).length}return a&&(t=a[0],e=a[1]),r.domain(Ca(n,e>1?{floor:function(e){for(;s(e=t.floor(e));)e=tu(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=tu(+e+1);return e}}:t))},r.ticks=function(t,e){var n=wa(r.domain()),o=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],tu(+n[1]+1),e<1?1:e)},r.tickFormat=function(){return n},r.copy=function(){return $s(t.copy(),e,n)},Oa(r,t)}function tu(t){return new Date(t)}Qs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Js:Ks,Js.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Js.toString=Ks.toString,ze.second=Ge((function(t){return new Be(1e3*Math.floor(t/1e3))}),(function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))}),(function(t){return t.getSeconds()})),ze.seconds=ze.second.range,ze.seconds.utc=ze.second.utc.range,ze.minute=Ge((function(t){return new Be(6e4*Math.floor(t/6e4))}),(function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))}),(function(t){return t.getMinutes()})),ze.minutes=ze.minute.range,ze.minutes.utc=ze.minute.utc.range,ze.hour=Ge((function(t){var e=t.getTimezoneOffset()/60;return new Be(36e5*(Math.floor(t/36e5-e)+e))}),(function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))}),(function(t){return t.getHours()})),ze.hours=ze.hour.range,ze.hours.utc=ze.hour.utc.range,ze.month=Ge((function(t){return(t=ze.day(t)).setDate(1),t}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t){return t.getMonth()})),ze.months=ze.month.range,ze.months.utc=ze.month.utc.range;var eu=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],nu=[[ze.second,1],[ze.second,5],[ze.second,15],[ze.second,30],[ze.minute,1],[ze.minute,5],[ze.minute,15],[ze.minute,30],[ze.hour,1],[ze.hour,3],[ze.hour,6],[ze.hour,12],[ze.day,1],[ze.day,2],[ze.week,1],[ze.month,1],[ze.month,3],[ze.year,1]],ru=Qs.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",tr]]),iu={range:function(t,e,n){return o.range(Math.ceil(t/n)*n,+e,n).map(tu)},floor:D,ceil:D};nu.year=ze.year,ze.scale=function(){return $s(o.scale.linear(),nu,ru)};var ou=nu.map((function(t){return[t[0].utc,t[1]]})),au=Ys.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",tr]]);function su(t){return JSON.parse(t.responseText)}function uu(t){var e=u.createRange();return e.selectNode(u.body),e.createContextualFragment(t.responseText)}ou.year=ze.year.utc,ze.scale.utc=function(){return $s(o.scale.linear(),ou,au)},o.text=Me((function(t){return t.responseText})),o.json=function(t,e){return we(t,"application/json",su,e)},o.html=function(t,e){return we(t,"text/html",uu,e)},o.xml=Me((function(t){return t.responseXML})),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)}()},1106:function(t){"use strict";function e(t,e,r){r=r||2;var o,a,s,u,h,f,p,m=e&&e.length,g=m?e[0]*r:t.length,v=n(t,0,g,r,!0),y=[];if(!v||v.next===v.prev)return y;if(m&&(v=function(t,e,r,i){var o,a,s,u=[];for(o=0,a=e.length;o<a;o++)(s=n(t,e[o]*i,o<a-1?e[o+1]*i:t.length,i,!1))===s.next&&(s.steiner=!0),u.push(d(s));for(u.sort(l),o=0;o<u.length;o++)r=c(u[o],r);return r}(t,e,v,r)),t.length>80*r){o=s=t[0],a=u=t[1];for(var x=r;x<g;x+=r)(h=t[x])<o&&(o=h),(f=t[x+1])<a&&(a=f),h>s&&(s=h),f>u&&(u=f);p=0!==(p=Math.max(s-o,u-a))?32767/p:0}return i(v,y,r,o,a,p,0),y}function n(t,e,n,r,i){var o,a;if(i===C(t,e,n,r)>0)for(o=e;o<n;o+=r)a=w(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=w(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(A(a),a=a.next),a}function r(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(A(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function i(t,e,n,l,c,h,d){if(t){!d&&h&&function(t,e,n,r){var i=t;do{0===i.z&&(i.z=f(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,l,c,h);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?a(t,l,c,h):o(t))e.push(p.i/n|0),e.push(t.i/n|0),e.push(m.i/n|0),A(t),t=m.next,g=m.next;else if((t=m)===g){d?1===d?i(t=s(r(t),e,n),e,n,l,c,h,2):2===d&&u(t,e,n,l,c,h):i(r(t),e,n,l,c,h,1);break}}}function o(t){var e=t.prev,n=t,r=t.next;if(g(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,a=r.x,s=e.y,u=n.y,l=r.y,c=i<o?i<a?i:a:o<a?o:a,h=s<u?s<l?s:l:u<l?u:l,f=i>o?i>a?i:a:o>a?o:a,d=s>u?s>l?s:l:u>l?u:l,m=r.next;m!==e;){if(m.x>=c&&m.x<=f&&m.y>=h&&m.y<=d&&p(i,s,o,u,a,l,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(t,e,n,r){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,u=o.x,l=a.x,c=i.y,h=o.y,d=a.y,m=s<u?s<l?s:l:u<l?u:l,v=c<h?c<d?c:d:h<d?h:d,y=s>u?s>l?s:l:u>l?u:l,x=c>h?c>d?c:d:h>d?h:d,_=f(m,v,e,n,r),b=f(y,x,e,n,r),M=t.prevZ,w=t.nextZ;M&&M.z>=_&&w&&w.z<=b;){if(M.x>=m&&M.x<=y&&M.y>=v&&M.y<=x&&M!==i&&M!==a&&p(s,c,u,h,l,d,M.x,M.y)&&g(M.prev,M,M.next)>=0)return!1;if(M=M.prevZ,w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==i&&w!==a&&p(s,c,u,h,l,d,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.nextZ}for(;M&&M.z>=_;){if(M.x>=m&&M.x<=y&&M.y>=v&&M.y<=x&&M!==i&&M!==a&&p(s,c,u,h,l,d,M.x,M.y)&&g(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;w&&w.z<=b;){if(w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==i&&w!==a&&p(s,c,u,h,l,d,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function s(t,e,n){var i=t;do{var o=i.prev,a=i.next.next;!v(o,a)&&y(o,i,i.next,a)&&b(o,a)&&b(a,o)&&(e.push(o.i/n|0),e.push(i.i/n|0),e.push(a.i/n|0),A(i),A(i.next),i=t=a),i=i.next}while(i!==t);return r(i)}function u(t,e,n,o,a,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&m(u,l)){var c=M(u,l);return u=r(u,u.next),c=r(c,c.next),i(u,e,n,o,a,s,0),void i(c,e,n,o,a,s,0)}l=l.next}u=u.next}while(u!==t)}function l(t,e){return t.x-e.x}function c(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===i))return n}r=r.next}while(r!==e);if(!n)return null;var u,l=n,c=n.x,f=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&p(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),b(r,t)&&(u<d||u===d&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,d=u)),r=r.next}while(r!==l);return n}(t,e);if(!n)return e;var i=M(n,t);return r(i,i.next),r(n,n.next)}function h(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function f(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function p(t,e,n,r,i,o,a,s){return(i-a)*(e-s)>=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&y(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,n,r){var i=_(g(t,e,n)),o=_(g(t,e,r)),a=_(g(n,r,t)),s=_(g(n,r,e));return i!==o&&a!==s||(!(0!==i||!x(t,n,e))||(!(0!==o||!x(t,r,e))||(!(0!==a||!x(n,t,r))||!(0!==s||!x(n,e,r)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function _(t){return t>0?1:t<0?-1:0}function b(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function M(t,e){var n=new T(t.i,t.x,t.y),r=new T(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function w(t,e,n,r){var i=new T(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=e,t.exports.default=e,e.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(C(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(C(t,l,c,n))}var h=0;for(s=0;s<r.length;s+=3){var f=r[s]*n,d=r[s+1]*n,p=r[s+2]*n;h+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},e.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},8543:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8];return t[0]=a*c-s*l,t[1]=i*l-r*c,t[2]=r*s-i*a,t[3]=s*u-o*c,t[4]=n*c-i*u,t[5]=i*o-n*s,t[6]=o*l-a*u,t[7]=r*u-n*l,t[8]=n*a-r*o,t}},4995:function(t){t.exports=function(t){var e=new Float32Array(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}},7186:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}},1871:function(t){t.exports=function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},3854:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8];return e*(l*o-a*u)+n*(a*s-l*i)+r*(u*i-o*s)}},9263:function(t){t.exports=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8])}},6503:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}},3229:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}},4523:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,h=r*s,f=i*a,d=i*s,p=i*u,m=o*a,g=o*s,v=o*u;return t[0]=1-h-p,t[3]=c-v,t[6]=f+g,t[1]=c+v,t[4]=1-l-p,t[7]=d-m,t[2]=f-g,t[5]=d+m,t[8]=1-l-h,t}},6511:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},8054:function(t,e,n){t.exports={adjoint:n(8543),clone:n(4995),copy:n(7186),create:n(1871),determinant:n(3854),frob:n(9263),fromMat2:n(6503),fromMat4:n(3229),fromQuat:n(4523),identity:n(6511),invert:n(8104),multiply:n(9063),normalFromMat4:n(3100),rotate:n(5637),scale:n(9281),str:n(6224),translate:n(1078),transpose:n(4879)}},8104:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=c*a-s*l,f=-c*o+s*u,d=l*o-a*u,p=n*h+r*f+i*d;return p?(p=1/p,t[0]=h*p,t[1]=(-c*r+i*l)*p,t[2]=(s*r-i*a)*p,t[3]=f*p,t[4]=(c*n-i*u)*p,t[5]=(-s*n+i*o)*p,t[6]=d*p,t[7]=(-l*n+r*u)*p,t[8]=(a*n-r*o)*p,t):null}},9063:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=n[0],d=n[1],p=n[2],m=n[3],g=n[4],v=n[5],y=n[6],x=n[7],_=n[8];return t[0]=f*r+d*a+p*l,t[1]=f*i+d*s+p*c,t[2]=f*o+d*u+p*h,t[3]=m*r+g*a+v*l,t[4]=m*i+g*s+v*c,t[5]=m*o+g*u+v*h,t[6]=y*r+x*a+_*l,t[7]=y*i+x*s+_*c,t[8]=y*o+x*u+_*h,t}},3100:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-r*a,x=n*u-i*a,_=n*l-o*a,b=r*u-i*s,M=r*l-o*s,w=i*l-o*u,A=c*m-h*p,T=c*g-f*p,C=c*v-d*p,E=h*g-f*m,k=h*v-d*m,S=f*v-d*g,P=y*S-x*k+_*E+b*C-M*T+w*A;return P?(P=1/P,t[0]=(s*S-u*k+l*E)*P,t[1]=(u*C-a*S-l*T)*P,t[2]=(a*k-s*C+l*A)*P,t[3]=(i*k-r*S-o*E)*P,t[4]=(n*S-i*C+o*T)*P,t[5]=(r*C-n*k-o*A)*P,t[6]=(m*w-g*M+v*b)*P,t[7]=(g*_-p*w-v*x)*P,t[8]=(p*M-m*_+v*y)*P,t):null}},5637:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*s,t[2]=d*o+f*u,t[3]=d*a-f*r,t[4]=d*s-f*i,t[5]=d*u-f*o,t[6]=l,t[7]=c,t[8]=h,t}},9281:function(t){t.exports=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}},6224:function(t){t.exports=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}},1078:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+d*a+l,t[7]=f*i+d*s+c,t[8]=f*o+d*u+h,t}},4879:function(t){t.exports=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}},316:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(f*v-d*g)-h*(u*v-l*g)+m*(u*d-l*f),t[1]=-(r*(f*v-d*g)-h*(i*v-o*g)+m*(i*d-o*f)),t[2]=r*(u*v-l*g)-s*(i*v-o*g)+m*(i*l-o*u),t[3]=-(r*(u*d-l*f)-s*(i*d-o*f)+h*(i*l-o*u)),t[4]=-(a*(f*v-d*g)-c*(u*v-l*g)+p*(u*d-l*f)),t[5]=n*(f*v-d*g)-c*(i*v-o*g)+p*(i*d-o*f),t[6]=-(n*(u*v-l*g)-a*(i*v-o*g)+p*(i*l-o*u)),t[7]=n*(u*d-l*f)-a*(i*d-o*f)+c*(i*l-o*u),t[8]=a*(h*v-d*m)-c*(s*v-l*m)+p*(s*d-l*h),t[9]=-(n*(h*v-d*m)-c*(r*v-o*m)+p*(r*d-o*h)),t[10]=n*(s*v-l*m)-a*(r*v-o*m)+p*(r*l-o*s),t[11]=-(n*(s*d-l*h)-a*(r*d-o*h)+c*(r*l-o*s)),t[12]=-(a*(h*g-f*m)-c*(s*g-u*m)+p*(s*f-u*h)),t[13]=n*(h*g-f*m)-c*(r*g-i*m)+p*(r*f-i*h),t[14]=-(n*(s*g-u*m)-a*(r*g-i*m)+p*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+c*(r*u-i*s),t}},6232:function(t){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},4408:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},703:function(t){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},3845:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8],c=t[9],h=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*a-n*o)*(h*g-f*m)-(e*s-r*o)*(c*g-f*p)+(e*u-i*o)*(c*m-h*p)+(n*s-r*a)*(l*g-f*d)-(n*u-i*a)*(l*m-h*d)+(r*u-i*s)*(l*p-c*d)}},9259:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,h=r*s,f=i*a,d=i*s,p=i*u,m=o*a,g=o*s,v=o*u;return t[0]=1-h-p,t[1]=c+v,t[2]=f-g,t[3]=0,t[4]=c-v,t[5]=1-l-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-l-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8625:function(t){t.exports=function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],l=Math.sqrt(a*a+s*s+u*u);if(Math.abs(l)<1e-6)return null;return a*=l=1/l,s*=l,u*=l,r=Math.sin(e),i=Math.cos(e),o=1-i,t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8844:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,l=o+o,c=r*s,h=r*u,f=r*l,d=i*u,p=i*l,m=o*l,g=a*s,v=a*u,y=a*l;return t[0]=1-(d+m),t[1]=h+y,t[2]=f-v,t[3]=0,t[4]=h-y,t[5]=1-(c+m),t[6]=p+g,t[7]=0,t[8]=f+v,t[9]=p-g,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}},3107:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6645:function(t){t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},1:function(t){t.exports=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8503:function(t){t.exports=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8990:function(t){t.exports=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6901:function(t){t.exports=function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),l=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*l,t[15]=0,t}},1156:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},5240:function(t,e,n){t.exports={create:n(703),clone:n(6232),copy:n(4408),identity:n(1156),transpose:n(3039),invert:n(9573),adjoint:n(316),determinant:n(3845),multiply:n(6498),translate:n(164),scale:n(1119),rotate:n(4175),rotateX:n(3116),rotateY:n(6428),rotateZ:n(9041),fromRotation:n(8625),fromRotationTranslation:n(8844),fromScaling:n(3107),fromTranslation:n(6645),fromXRotation:n(1),fromYRotation:n(8503),fromZRotation:n(8990),fromQuat:n(9259),frustum:n(6901),perspective:n(2343),perspectiveFromFieldOfView:n(7863),ortho:n(753),lookAt:n(398),str:n(6758)}},9573:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-r*a,x=n*u-i*a,_=n*l-o*a,b=r*u-i*s,M=r*l-o*s,w=i*l-o*u,A=c*m-h*p,T=c*g-f*p,C=c*v-d*p,E=h*g-f*m,k=h*v-d*m,S=f*v-d*g,P=y*S-x*k+_*E+b*C-M*T+w*A;if(!P)return null;return P=1/P,t[0]=(s*S-u*k+l*E)*P,t[1]=(i*k-r*S-o*E)*P,t[2]=(m*w-g*M+v*b)*P,t[3]=(f*M-h*w-d*b)*P,t[4]=(u*C-a*S-l*T)*P,t[5]=(n*S-i*C+o*T)*P,t[6]=(g*_-p*w-v*x)*P,t[7]=(c*w-f*_+d*x)*P,t[8]=(a*k-s*C+l*A)*P,t[9]=(r*C-n*k-o*A)*P,t[10]=(p*M-m*_+v*y)*P,t[11]=(h*_-c*M-d*y)*P,t[12]=(s*T-a*E-u*A)*P,t[13]=(n*E-r*T+i*A)*P,t[14]=(m*x-p*b-g*y)*P,t[15]=(c*b-h*x+f*y)*P,t}},398:function(t,e,n){var r=n(1156);t.exports=function(t,e,n,i){var o,a,s,u,l,c,h,f,d,p,m=e[0],g=e[1],v=e[2],y=i[0],x=i[1],_=i[2],b=n[0],M=n[1],w=n[2];if(Math.abs(m-b)<1e-6&&Math.abs(g-M)<1e-6&&Math.abs(v-w)<1e-6)return r(t);h=m-b,f=g-M,d=v-w,p=1/Math.sqrt(h*h+f*f+d*d),o=x*(d*=p)-_*(f*=p),a=_*(h*=p)-y*d,s=y*f-x*h,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0);u=f*s-d*a,l=d*o-h*s,c=h*a-f*o,(p=Math.sqrt(u*u+l*l+c*c))?(u*=p=1/p,l*=p,c*=p):(u=0,l=0,c=0);return t[0]=o,t[1]=u,t[2]=h,t[3]=0,t[4]=a,t[5]=l,t[6]=f,t[7]=0,t[8]=s,t[9]=c,t[10]=d,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(u*m+l*g+c*v),t[14]=-(h*m+f*g+d*v),t[15]=1,t}},6498:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=n[0],_=n[1],b=n[2],M=n[3];return t[0]=x*r+_*s+b*h+M*m,t[1]=x*i+_*u+b*f+M*g,t[2]=x*o+_*l+b*d+M*v,t[3]=x*a+_*c+b*p+M*y,x=n[4],_=n[5],b=n[6],M=n[7],t[4]=x*r+_*s+b*h+M*m,t[5]=x*i+_*u+b*f+M*g,t[6]=x*o+_*l+b*d+M*v,t[7]=x*a+_*c+b*p+M*y,x=n[8],_=n[9],b=n[10],M=n[11],t[8]=x*r+_*s+b*h+M*m,t[9]=x*i+_*u+b*f+M*g,t[10]=x*o+_*l+b*d+M*v,t[11]=x*a+_*c+b*p+M*y,x=n[12],_=n[13],b=n[14],M=n[15],t[12]=x*r+_*s+b*h+M*m,t[13]=x*i+_*u+b*f+M*g,t[14]=x*o+_*l+b*d+M*v,t[15]=x*a+_*c+b*p+M*y,t}},753:function(t){t.exports=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t}},2343:function(t){t.exports=function(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t}},7863:function(t){t.exports=function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),l=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}},4175:function(t){t.exports=function(t,e,n,r){var i,o,a,s,u,l,c,h,f,d,p,m,g,v,y,x,_,b,M,w,A,T,C,E,k=r[0],S=r[1],P=r[2],O=Math.sqrt(k*k+S*S+P*P);if(Math.abs(O)<1e-6)return null;k*=O=1/O,S*=O,P*=O,i=Math.sin(n),o=Math.cos(n),a=1-o,s=e[0],u=e[1],l=e[2],c=e[3],h=e[4],f=e[5],d=e[6],p=e[7],m=e[8],g=e[9],v=e[10],y=e[11],x=k*k*a+o,_=S*k*a+P*i,b=P*k*a-S*i,M=k*S*a-P*i,w=S*S*a+o,A=P*S*a+k*i,T=k*P*a+S*i,C=S*P*a-k*i,E=P*P*a+o,t[0]=s*x+h*_+m*b,t[1]=u*x+f*_+g*b,t[2]=l*x+d*_+v*b,t[3]=c*x+p*_+y*b,t[4]=s*M+h*w+m*A,t[5]=u*M+f*w+g*A,t[6]=l*M+d*w+v*A,t[7]=c*M+p*w+y*A,t[8]=s*T+h*C+m*E,t[9]=u*T+f*C+g*E,t[10]=l*T+d*C+v*E,t[11]=c*T+p*C+y*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},3116:function(t){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],h=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}},6428:function(t){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[8],c=e[9],h=e[10],f=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*i-l*r,t[1]=a*i-c*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+l*i,t[9]=a*r+c*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}},9041:function(t){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],h=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t}},1119:function(t){t.exports=function(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},6758:function(t){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},164:function(t){t.exports=function(t,e,n){var r,i,o,a,s,u,l,c,h,f,d,p,m=n[0],g=n[1],v=n[2];e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*m+s*g+h*v+e[12],t[13]=i*m+u*g+f*v+e[13],t[14]=o*m+l*g+d*v+e[14],t[15]=a*m+c*g+p*v+e[15]);return t}},3039:function(t){t.exports=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},7207:function(t){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}},3959:function(t,e,n){t.exports=function(t,e){var n=r(t[0],t[1],t[2]),a=r(e[0],e[1],e[2]);i(n,n),i(a,a);var s=o(n,a);return s>1?0:Math.acos(s)};var r=n(6534),i=n(2397),o=n(966)},9638:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},859:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1404:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},2002:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},9528:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}},6005:function(t,e,n){t.exports=n(6911)},6911:function(t){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}},133:function(t,e,n){t.exports=n(3274)},3274:function(t){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}},966:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2342:function(t){t.exports=1e-6},9883:function(t,e,n){t.exports=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r*Math.max(1,Math.abs(o),Math.abs(u))};var r=n(2342)},8259:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},7291:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},7043:function(t,e,n){t.exports=function(t,e,n,i,o,a){var s,u;e||(e=3);n||(n=0);u=i?Math.min(i*e+n,t.length):t.length;for(s=n;s<u;s+=e)r[0]=t[s],r[1]=t[s+1],r[2]=t[s+2],o(r,r,a),t[s]=r[0],t[s+1]=r[1],t[s+2]=r[2];return t};var r=n(2002)()},6534:function(t){t.exports=function(t,e,n){var r=new Float32Array(3);return r[0]=t,r[1]=e,r[2]=n,r}},5365:function(t,e,n){t.exports={EPSILON:n(2342),create:n(2002),clone:n(859),angle:n(3959),fromValues:n(6534),copy:n(1404),set:n(6952),equals:n(9883),exactEquals:n(8259),add:n(7207),subtract:n(7916),sub:n(3379),multiply:n(6381),mul:n(792),divide:n(3274),div:n(133),min:n(7324),max:n(7254),floor:n(7291),ceil:n(9638),round:n(5084),scale:n(498),scaleAndAdd:n(6993),distance:n(6911),dist:n(6005),squaredDistance:n(3440),sqrDist:n(9867),length:n(172),len:n(5446),squaredLength:n(5228),sqrLen:n(609),negate:n(9500),inverse:n(8958),normalize:n(2397),dot:n(966),cross:n(9528),lerp:n(6373),random:n(2283),transformMat4:n(2964),transformMat3:n(932),transformQuat:n(4516),rotateX:n(4871),rotateY:n(7927),rotateZ:n(2998),forEach:n(7043)}},8958:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},5446:function(t,e,n){t.exports=n(172)},172:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}},6373:function(t){t.exports=function(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}},7254:function(t){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}},7324:function(t){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}},792:function(t,e,n){t.exports=n(6381)},6381:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}},9500:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},2397:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o);return t}},2283:function(t){t.exports=function(t,e){e=e||1;var n=2*Math.random()*Math.PI,r=2*Math.random()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}},4871:function(t){t.exports=function(t,e,n,r){var i=n[1],o=n[2],a=e[1]-i,s=e[2]-o,u=Math.sin(r),l=Math.cos(r);return t[0]=e[0],t[1]=i+a*l-s*u,t[2]=o+a*u+s*l,t}},7927:function(t){t.exports=function(t,e,n,r){var i=n[0],o=n[2],a=e[0]-i,s=e[2]-o,u=Math.sin(r),l=Math.cos(r);return t[0]=i+s*u+a*l,t[1]=e[1],t[2]=o+s*l-a*u,t}},2998:function(t){t.exports=function(t,e,n,r){var i=n[0],o=n[1],a=e[0]-i,s=e[1]-o,u=Math.sin(r),l=Math.cos(r);return t[0]=i+a*l-s*u,t[1]=o+a*u+s*l,t[2]=e[2],t}},5084:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},498:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}},6993:function(t){t.exports=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}},6952:function(t){t.exports=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}},9867:function(t,e,n){t.exports=n(3440)},609:function(t,e,n){t.exports=n(5228)},3440:function(t){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}},5228:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}},3379:function(t,e,n){t.exports=n(7916)},7916:function(t){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}},932:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}},2964:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}},4516:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],l=n[3],c=l*r+s*o-u*i,h=l*i+u*r-a*o,f=l*o+a*i-s*r,d=-a*r-s*i-u*o;return t[0]=c*l+d*-a+h*-u-f*-s,t[1]=h*l+d*-s+f*-a-c*-u,t[2]=f*l+d*-u+c*-s-h*-a,t}},5492:function(t){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}},5967:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},4729:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},8922:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},3256:function(t){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+r*r+i*i+o*o)}},409:function(t){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}},3643:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},5166:function(t){t.exports=function(t,e,n,r){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}},8608:function(t,e,n){t.exports={create:n(8922),clone:n(5967),fromValues:n(5166),copy:n(4729),set:n(256),add:n(5492),subtract:n(1250),multiply:n(4683),divide:n(409),min:n(8485),max:n(6225),scale:n(7141),scaleAndAdd:n(2100),distance:n(3256),squaredDistance:n(8726),length:n(7358),squaredLength:n(3e3),negate:n(2618),inverse:n(9556),normalize:n(959),dot:n(3643),lerp:n(117),random:n(9855),transformMat4:n(161),transformQuat:n(228)}},9556:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},7358:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}},117:function(t){t.exports=function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}},6225:function(t){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}},8485:function(t){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}},4683:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}},2618:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},959:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a);return t}},9855:function(t,e,n){var r=n(959),i=n(7141);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),r(t,t),i(t,t,e),t}},7141:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}},2100:function(t){t.exports=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}},256:function(t){t.exports=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}},8726:function(t){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}},3e3:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}},1250:function(t){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}},161:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}},228:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],l=n[3],c=l*r+s*o-u*i,h=l*i+u*r-a*o,f=l*o+a*i-s*r,d=-a*r-s*i-u*o;return t[0]=c*l+d*-a+h*-u-f*-s,t[1]=h*l+d*-s+f*-a-c*-u,t[2]=f*l+d*-u+c*-s-h*-a,t[3]=e[3],t}},5638:function(t,e){var n;
38
+ var r=n(5638),i=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;r.htmlPrefilter=function(t){return t.replace(i,"<$1></$2>")},n(8701),t.exports=r.extend({annotationLayer:n(836),camera:n(9986),choroplethFeature:n(8719),contourFeature:n(9005),domRenderer:n(2805),event:n(5108),feature:n(6837),featureLayer:n(3715),fetchQueue:n(3705),fileReader:n(407),geo_action:n(7839),graphFeature:n(4745),heatmapFeature:n(1111),imageTile:n(4665),isolineFeature:n(2367),geojsonReader:n(3088),gridFeature:n(1109),layer:n(9105),lineFeature:n(4708),map:n(2804),mapInteractor:n(3870),markerFeature:n(7098),meshFeature:n(9146),object:n(3737),osmLayer:n(8622),pathFeature:n(6565),pointFeature:n(2557),polygonFeature:n(4343),quadFeature:n(5017),pixelmapFeature:n(6374),pixelmapLayer:n(809),renderer:n(3234),sceneObject:n(5358),textFeature:n(9757),tile:n(8418),tileCache:n(6244),tileLayer:n(1940),timestamp:n(6618),trackFeature:n(6223),transform:n(6853),typedef:n(3762),vectorFeature:n(2623),inherit:n(5699),version:n(2978),sha:n(5381),annotation:n(4213),util:n(4634),jQuery:r,canvas:n(7562),svg:n(2878),vtkjs:n(6653),webgl:n(9205),gui:n(253),vgl:n(5140)},n(4647)),window&&!window.$&&(window.$=r),window&&!window.jQuery&&(window.jQuery=r),window&&!window.geojsMap&&(window.geojsMap=function(){var t=r(".geojs-map").map((function(t,e){return r(e).data("data-geojs-map")}));return 0===t.length?void 0:1===t.length?t[0]:t})},5699:function(t){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},2367:function(t,e,n){var r=n(5699),i=n(9146),o=n(4647),a=n(4634),s={17:[{l0:1,h0:2,l1:0,h1:2}],18:[{l0:0,h0:1,l1:2,h1:1}],20:[{l0:2,h0:0,l1:1,h1:0}],22:[{l0:2,h0:0,l1:2,h1:1}],21:[{l0:1,h0:2,l1:1,h1:0}],19:[{l0:0,h0:1,l1:0,h1:2}],1:[{l0:2,h0:3,l1:1,h1:3}],2:[{l0:0,h0:2,l1:3,h1:2}],4:[{l0:3,h0:1,l1:0,h1:1}],8:[{l0:1,h0:0,l1:2,h1:0}],14:[{l0:3,h0:1,l1:3,h1:2}],13:[{l0:2,h0:3,l1:2,h1:0}],11:[{l0:1,h0:0,l1:1,h1:3}],7:[{l0:0,h0:2,l1:0,h1:1}],3:[{l0:0,h0:2,l1:1,h1:3}],10:[{l0:1,h0:0,l1:3,h1:2}],12:[{l0:3,h0:1,l1:2,h1:0}],5:[{l0:2,h0:3,l1:0,h1:1}],6:[{l0:0,h0:2,l1:0,h1:1},{l0:3,h0:1,l1:3,h1:2}],9:[{l0:1,h0:0,l1:1,h1:3},{l0:2,h0:3,l1:2,h1:0}]},u=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),u=n(6853),l=n(5108),c=n(9757);e=e||{},i.call(this,e);var h,f,d,p,m,g=this,v=this.draw,y=this._exit,x=this._init,_=this.modified,b=this._update;return this.featureType="isoline",this.contour=g.mesh,this.isoline=g.mesh,this._createIsolines=function(){var t,e=g.style.get("value"),n=void 0!==g.style("used")?g.style.get("used"):function(t,n){return a.isNonNullFinite(e(t,n))},r=!1,i=[],o=g._createMesh({used:n,value:e});return(t=g._getValueList(o)).length?(t.forEach((function(t){var e=g._isolinesForValue(o,t);e.length&&(i=i.concat(e),r=r||!!t.label)})),{lines:i,mesh:o,values:t,hasLabels:r}):{}},this._getValueList=function(t){var e,n,r,i,o,s,u,l=g.isoline,c=l.get("values")(t),h=l.get("spacing")(t),f=l.get("count")(t),d=l.get("autofit")(t),p=l.get("levels")(t);if(!t.numVertices||!t.numElements)return[];if(e=a.getMinMaxValues(t.value,l.get("min")(t),l.get("max")(t),!0),t.minValue=e.min,t.maxValue=e.max,(n=t.maxValue-t.minValue)<=0)return[];if(Array.isArray(c))c=(c=c.map((function(t,e){return{value:void 0!==t.value?t.value:t,position:e,level:t.level}}))).filter((function(e){return e.value>=t.minValue&&e.value<=t.maxValue}));else if(h||d)for(h||(r=n/(2*f/3),o=Math.floor(Math.log10(r)),s=Math.max(0,-o),h=(r=(r/=i=Math.pow(10,o))>=5?5:r>=2?2:1)*i),c=[],u=Math.ceil(t.minValue/h);u<=Math.floor(t.maxValue/h);u+=1)c.push({value:u*h,position:u,fixedDigits:s});else for(c=Array(f),u=0;u<f;u+=1)c[u]={value:t.minValue+n*(u+1)/(f+1),position:u+1};return p.length&&c.forEach((function(t,e){if(void 0===t.level){t.level=0;for(var n=0,r=p[0];n<p.length&&!(t.position%r);r*=p[n+=1])t.level=n+1}if(l.get("label")(t,t.position)){var i=l.get("labelText")(t,t.position);void 0===i&&(i=void 0!==t.fixedDigits?""+parseFloat(t.value.toFixed(t.fixedDigits)):""+t.value),i&&(t.label=i)}})),c},this._addSegment=function(t,e,n){var r,i,o,a,s,u,l=[e,n],c=t.length;for(t.push(l),i=0;i<2;i+=1){for(r=c-1;r>=0;r-=1){if(a=(o=t[r])[0],s=o[o.length-1],n[0]===a[0]&&n[1]===a[1])u=l.concat(o.slice(1));else{if(e[0]!==s[0]||e[1]!==s[1])continue;u=o.concat(l.slice(1))}t.splice(c,1),t[r]=l=u,c=r,e=l[0],n=l[l.length-1];break}if(r<0)break}return t},this._chainVertex=function(t,e,n){var r=n[0],i=n[1],o=3*r,a=3*i,s=(e.value-t.value[r])/(t.value[i]-t.value[r]),u=1-s;return{x:t.pos[o]*u+t.pos[a]*s,y:t.pos[o+1]*u+t.pos[a+1]*s,z:t.pos[o+2]*u+t.pos[a+2]*s}},this._isolinesForValue=function(t,e){var n,r,i,o,a=e.value,u=Array(t.value.length),l=[];for(n=u.length-1;n>=0;n-=1)u[n]=t.value[n]<=a?0:1;var c=t.verticesPerElement,h="square"===t.shape,f=t.elements,d=f.length;for(r=0;r<d;r+=c){if(h){if(0===(i=8*u[f[r]]+4*u[f[r+1]]+2*u[f[r+2]]+u[f[r+3]])||15===i)continue}else if(16===(i=16+4*u[f[r]]+2*u[f[r+1]]+u[f[r+2]])||23===i)continue;s[i].forEach((function(t){l=g._addSegment(l,[f[r+t.l0],f[r+t.h0]],[f[r+t.l1],f[r+t.h1]])}))}return o=l.map((function(n){var r=[];return n.forEach((function(n){var i=g._chainVertex(t,e,n);r.length&&i.x===r[r.length-1].x&&i.y===r[r.length-1].y||r.push(i)})),r.closed=r[0].x===r[r.length-1].x&&r[0].y===r[r.length-1].y,r.value=e.value,r.level=e.level,r.position=e.position,r.label=e.label,r})).filter((function(t){return t.length>1})),o},this.modified=function(){var t=_();return d&&d.modified(),m&&m.modified(),t},this.labelPositions=function(){if(g.dataTime().timestamp()>=g.buildTime().timestamp()&&g._build(),f=null,!m)return g;if(!(h&&h.hasLabels&&h.lines&&h.lines.length))return m.data([]),g;var t=g.isoline,e=t.get("labelSpacing"),n=t.get("labelOffset"),r=t.get("labelViewport")(h.mesh),i=g.gcs(),o=g.layer().map(),s=o.gcs(),l=o.rotation(),c=o.size(),d=[],p=0;return h.lines.forEach((function(t,h){if(t.label){var f,m,g,v,y,x,_,b,M,w,A,T=e(t.value,t.value.position),C=n(t.value,t.value.position)||0,E=o.gcsToDisplay(t,i),k=0;if(!(T<=0||isNaN(T))&&(p=Math.max(T,p),C=C+.5-Math.floor(C+.5),f=E.map((function(e,n){if(!t.closed&&n+1===E.length)return 0;var r=Math.sqrt(a.distance2dSquared(e,E[n+1<E.length?n+1:0]));return k+=r,r})),m=Math.floor(k/T)))for(A=u.transformCoordinates(i,s,t),v=(g=k/m)*C,y=0,x=0;x<E.length;x+=1){for(;y+f[x]>=v;)_=x+1===E.length?0:x+1,M=1-(b=(v-y)/f[x]),v+=g,r>0&&((w={x:E[x].x*M+E[_].x*b,y:E[x].y*M+E[_].y*b}).x<-r||w.x>c.width+r||w.y<-r||w.y>c.height+r)||d.push({x:A[x].x*M+A[_].x*b,y:A[x].y*M+A[_].y*b,z:A[x].z*M+A[_].z*b,line:t,rotation:Math.atan2(E[x].y-E[_].y,E[x].x-E[_].x)-l});y+=f[x]}}})),m.gcs(s),m.data(d),m.style("renderThreshold",2*p),f={zoom:o.zoom(),center:o.center(),rotation:l,size:c,labelViewport:r,maxSpacing:p,labelAutoUpdate:t.get("labelAutoUpdate")(h.mesh)},g},this.lastLabelPositions=function(){return r.extend({},f)},this._updateLabelPositions=function(){var t=f;if(!t||!t.labelAutoUpdate)return g;var e=g.layer().map(),n=e.zoom(),r=e.size(),i=!!(Math.abs(n-t.zoom)>=2);if(!i&&t.labelViewport>0){var o=Math.sqrt(a.distance2dSquared(e.gcsToDisplay(e.center()),e.gcsToDisplay(t.center)))*Math.pow(2,t.zoom-n),s=t.labelViewport/2-2*t.maxSpacing-Math.max(r.width-t.size.width,r.height-t.size.height,0);i=i||o>=s}return i&&g.labelPositions().draw(),g},this._build=function(){if((h=g._createIsolines())&&h.lines&&h.lines.length){d||(d=g.layer().createFeature("line",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{closed:function(t){return t.closed}}}),g.dependentFeatures([d]));var t=g.style();if(d.data(h.lines).style({antialiasing:t.antialiasing,lineCap:t.lineCap,lineJoin:t.lineJoin,miterLimit:t.miterLimit,strokeWidth:t.strokeWidth,strokeStyle:t.strokeStyle,strokeColor:t.strokeColor,strokeOffset:t.strokeOffset,strokeOpacity:t.strokeOpacity}),h.hasLabels){if(!m){if(!(o.registries.features[g.layer().rendererName()]||{}).text){var e=o.rendererForFeatures(["text"]);p=o.createLayer("feature",g.layer().map(),{renderer:e}),g.layer().addChild(p),g.layer().node().append(p.node())}m=(p||g.layer()).createFeature("text",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{text:function(t){return t.line.label}}}).geoOn(l.pan,g._updateLabelPositions)}c.usedStyles.forEach((function(e){"visible"!==e&&m.style(e,t[e])})),g.dependentFeatures([d,m])}}else d&&d.data([]);return g.buildTime().modified(),g.labelPositions(),g},this._update=function(){return b.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),g.updateTime().modified(),g},this.draw=function(){var t=v();return d&&d.draw(),m&&m.draw(),t},this._exit=function(){m&&((p||g.layer())&&(p||g.layer()).deleteFeature(m),p&&g.layer()&&g.layer().removeChild(p)),d&&g.layer()&&g.layer().deleteFeature(d),m=null,p=null,d=null,g.dependentFeatures([]),y()},this._init=function(e){e=e||{},x.call(g,e);var n=r.extend({},{opacity:1,value:function(t,e){return g.position()(t,e).z},rotateWithMap:!0,rotation:t.rotationFunction(),strokeWidth:function(t,e,n,r){return n.level+.5},strokeColor:{r:0,g:0,b:0},textStrokeColor:{r:1,g:1,b:1,a:.75},textStrokeWidth:2,fontSize:"12px"},void 0===e.style?{}:e.style);g.style(n),g.isoline(r.extend({},{count:15,autofit:!0,levels:[5,5],label:function(t){return t.level>=1},labelSpacing:200,labelViewport:1e4,labelAutoUpdate:!0},e.mesh||{},e.contour||{},e.isoline||{})),(e.mesh||e.contour||e.isoline)&&g.dataTime().modified()},this};u.rotationFunction=function(t,e){var n={higher:function(t){return t.rotation},lower:function(t){return t.rotation+Math.PI},map:function(t){var e=t.rotation,n=a.wrapAngle(e,!0);return(n>Math.PI/2||n<-Math.PI/2)&&(e+=Math.PI),e},screen:function(t){var n=t.rotation,r=a.wrapAngle(n+e.rotation(),!0);return(r>Math.PI/2||r<-Math.PI/2)&&(n+=Math.PI),n}};return n[t]||n.higher},r(u,i),t.exports=u},9105:function(t,e,n){var r=n(5699),i=n(5358),o=n(6837),a=n(4647).checkRenderer,s=n(4647).rendererForFeatures,u=n(4647).rendererForAnnotations,l=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},i.call(this,e);var r,o=n(5638),l=n(6618),c=n(3234),h=n(4647).createRenderer,f=n(4647).adjustLayerForRenderer,d=n(5108),p=this,m=this._exit,g=void 0===e.id?t.newLayerId():e.id,v=void 0===e.name?"":e.name,y=void 0===e.map?null:e.map,x=null,_=void 0===e.canvas?null:e.canvas,b=e.renderer instanceof c?e.renderer:null,M=!1,w=void 0!==e.renderer?e.renderer instanceof c?e.renderer.api():e.renderer:e.annotations?u(e.annotations):s(e.features),A=void 0===e.autoshareRenderer||e.autoshareRenderer,T=l(),C=l(),E=void 0===e.sticky||e.sticky,k=void 0===e.active||e.active,S=void 0===e.opacity?1:e.opacity,P=e.attribution||null,O=void 0===e.visible||e.visible,L=void 0===e.selectionAPI||e.selectionAPI;if(w=a(w),!y)throw new Error("Layers must be initialized on a map.");function R(){return(p.parent()||p.map()).children().filter((function(e){return e instanceof t}))}if(this.rendererName=function(){return w},this.autoshareRenderer=function(){return A},this.zIndex=function(t,e){return void 0===t?r:(e||R().reverse().forEach((function(e){e!==p&&e.zIndex()===t&&e.zIndex(t+1)})),t!==r&&(r=t,x.css("z-index",r),p.geoTrigger(d.layerMove,{layer:p})),p)},this.moveUp=function(t){var e,n,r,i,o=null;for(void 0===t&&(t=1),i=1,t<0&&(i=-1,t=-t),e=R().sort((function(t,e){return i*(t.zIndex()-e.zIndex())})),n=0;n<e.length;n+=1)if(null===o)e[n]===p&&(o=n);else{if(!(n-o<=t))break;r=p.zIndex(),p.zIndex(e[n].zIndex(),!0),e[n].zIndex(r,!0)}return p},this.moveDown=function(t){return void 0===t&&(t=1),p.moveUp(-t)},this.moveToTop=function(){return p.moveUp(R().length-1)},this.moveToBottom=function(){return p.moveDown(R().length-1)},this.sticky=function(){return E},this.active=function(t){return void 0===t?k:(k!==t&&(k=t,x.toggleClass("active",k)),p)},this.node=function(){return x},this.id=function(e){return void 0===e?g:(g=null===e?t.newLayerId():e,p.modified(),p)},this.name=function(t){return void 0===t?v:(v=t,x.attr("id",v),p.modified(),p)},this.map=function(){return y},this.renderer=function(){return b},this._renderer=function(t){return void 0===t?b:(b=t,p)},this.canvas=function(){return _},this._canvas=function(t){return void 0===t?_:(_=t,p)},this.dataTime=function(){return T},this.updateTime=function(){return C},this.initialized=function(t){return void 0!==t?(M=t,p):M},this.toLocal=function(t){return t},this.fromLocal=function(t){return t},this.attribution=function(t){return void 0!==t?(P=t,p.map().updateAttribution(),p):P},this.visible=function(t){return void 0===t?O:(O!==t&&(O=t,x.toggleClass("hidden",!O),p.modified()),p)},this.selectionAPI=function(t){return void 0===t?L:(L!==t&&(L=t),p)},this._init=function(t){if(M)return p;y.node().append(x);var n=o.extend({},e);return delete n.map,b?p._canvas(b.canvas()):null===w?(p._renderer(null),p._canvas(x)):_?p._renderer(h(w,p,_,n)):(p._renderer(h(w,p,void 0,n)),p._canvas(b.canvas())),x.toggleClass("active",p.active()),M=!0,t||(p.geoOn(d.resize,(function(t){p._update({event:t})})),p.geoOn(d.pan,(function(t){p._update({event:t})})),p.geoOn(d.rotate,(function(t){p._update({event:t})})),p.geoOn(d.zoom,(function(t){p._update({event:t})}))),p},this._exit=function(){p.geoOff(),b&&b._exit(),x.off(),x.remove(),e={},p._canvas(null),p._renderer(null),m()},this._update=function(t){return p},this.width=function(){return p.map().size().width},this.height=function(){return p.map().size().height},this.opacity=function(t){return void 0!==t?(S=t,x.css("opacity",S),p):S},(x=o(document.createElement("div"))).addClass("geojs-layer"),x.attr("renderer",w),v&&x.attr("id",v),p.opacity(S),p.visible(O),void 0===e.zIndex){var I=-1;R().forEach((function(t){void 0!==t.zIndex()&&(I=Math.max(I,t.zIndex()))})),e.zIndex=I+1}return p.zIndex(e.zIndex),f("all",p),p};l.newLayerId=function(){"use strict";var t=1;return function(){var e=t;return t+=1,e}}(),l.create=function(t,e){"use strict";if((e=e||{}).type=e.type||"feature",e.renderer=void 0===e.renderer?"webgl":e.renderer,e.renderer=a(e.renderer),!e.renderer)return console.warn("Invalid renderer"),null;var n=t.createLayer(e.type,e);return n?(e.features&&e.features.forEach((function(t){t.data=t.data||e.data,t.feature=o.create(n,t)})),n):(console.warn("Unable to create a layer"),null)},r(l,i),t.exports=l},4708:function(t,e,n){var r=n(5699),i=n(6837),o=n(6618),a=n(6853),s=n(4634),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638);e=e||{},i.call(this,e);var u,l=this,c=this._init,h=o();return this.featureType="line",this._subfeatureStyles={lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.line=function(t){return void 0===t?l.style("line"):(l.style("line",t),l.dataTime().modified(),l.modified(),l)},this.position=function(t){return void 0===t?l.style("position"):(l.style("position",t),l.dataTime().modified(),l.modified(),l)},this._updatePointSearchInfo=function(){if(h.timestamp()>=l.dataTime().timestamp()&&h.timestamp()>=l.timestamp())return u;h.modified(),u=[];for(var t=l.data(),e=l.line(),n=l.style.get("strokeWidth"),r=s.isFunction(l.style("strokeWidth"))?void 0:n(),i=l.position(),o=l.style.get("closed"),c=s.isFunction(l.style("closed"))?void 0:o(),f=l.style.get("uniformLine"),d=s.isFunction(l.style("uniformLine"))?void 0:f(),p=l.gcs(),m=l.layer().map().gcs(),g=a.onlyInvertedY(p,m),v=0;v<t.length;v+=1){for(var y=t[v],x=void 0===c?o(y,v):c,_=void 0,b=void 0,M=void 0,w=void 0,A=void 0,T=void 0,C=void 0,E=void 0,k=[],S=void 0===d?f(y,v):d,P=e(y,v),O=0;O<P.length;O+=1){var L=P[O],R=i(L,O,y,v);g?R={x:R.x,y:-R.y}:p!==m&&(R=a.transformCoordinates(p,m,R)),void 0===T&&(T={x:R.x,y:R.y}),void 0===C&&(C={x:R.x,y:R.y}),R.x<T.x&&(T.x=R.x),R.x>C.x&&(C.x=R.x),R.y<T.y&&(T.y=R.y),R.y>C.y&&(C.y=R.y),S&&O||(E=void 0===r?n(L,O,y,v):r);var I=Math.ceil(E/2)+2;(void 0===C.r||I>C.r)&&(C.r=I);var D=I*I;_&&k.push({u:R,v:_,r:M>I?M:I,r2:w>D?w:D,i:O,j:b}),_=R,b=O,M=I,w=D,!A&&x&&(A={p:R,r:I,r2:D,i:O})}x&&A&&(_.x!==A.p.x||_.y!==A.p.y)&&k.push({u:_,v:A.p,r:M>A.r?M:A.r,r2:w>A.r2?w:A.r2,i:b,j:A.i}),k.min=T,k.max=C,u.push(k)}return u},this.pointSearch=function(t,e){var n=l.data(),r=[],i=[],o={};if(!n||!n.length||!l.layer())return{found:i,index:r,extra:o};l._updatePointSearchInfo();var c=l.layer().map();e=null===e?c.gcs():void 0===e?c.ingcs():e;var h,f,d,p,m=c.unitsPerPixel(c.zoom()),g=m*m,v=a.transformCoordinates(e,c.gcs(),t),y=l.style.get("strokeWidth"),x=l.style.get("strokeOpacity"),_=l.line();for(f=0;f<u.length;f+=1)for(p=u[f],h=null,d=0;d<p.length;d+=1)if(s.distance2dToLineSquared(v,p[d].u,p[d].v)<=p[d].r2*g&&(h||(h=_(n[f],f)),(x(h[p[d].i],p[d].i,n[f],f)>0||x(h[p[d].j],p[d].j,n[f],f)>0)&&(y(h[p[d].i],p[d].i,n[f],f)>0||y(h[p[d].j],p[d].j,n[f],f)>0))){i.push(n[f]),r.push(f),o[f]=d;break}return{found:i,index:r,extra:o}},this.polygonSearch=function(t,e,n){var r,i,o=l.data(),c=[],h=[],f={},d=l.layer().map(),p=l.style.get("strokeWidth"),m=l.style.get("strokeOpacity"),g=l.line();if(n=null===n?d.gcs():void 0===n?d.ingcs():n,t.outer||(t={outer:t,inner:[]}),!o||!o.length||t.outer.length<3)return{found:h,index:c,extra:f};(e=e||{}).partial=e.partial||!1,(t={outer:a.transformCoordinates(n,d.gcs(),t.outer),inner:(t.inner||[]).map((function(t){return a.transformCoordinates(n,d.gcs(),t)}))}).outer.forEach((function(t){r||(r={x:t.x,y:t.y},i={x:t.x,y:t.y}),t.x<r.x&&(r.x=t.x),t.x>i.x&&(i.x=t.x),t.y<r.y&&(r.y=t.y),t.y>i.y&&(i.y=t.y)})),l._updatePointSearchInfo();var v,y,x,_,b,M,w=d.unitsPerPixel(d.zoom());for(v=0;v<u.length;v+=1)if(!(!(x=u[v]).max||x.max.x<r.x-x.max.r*w||x.min.x>i.x+x.max.r*w||x.max.y<r.y-x.max.r*w||x.min.y>i.y+x.max.r*w)){var A=void 0,T=void 0,C=void 0;for(y=0;y<x.length;y+=1)if(_=x[y].u,b=x[y].v,M=x[y].r,!(_.x<r.x-M*w&&b.x<r.x-M*w||_.x>i.x+M*w&&b.x>i.x+M*w||_.y<r.y-M*w&&b.y<r.y-M*w||_.y>i.y+M*w&&b.y>i.y+M*w||(C||(C=g(o[v],v)),m(C[x[y].i],x[y].i,o[v],v)<=0&&m(C[x[y].j],x[y].j,o[v],v)<=0||p(C[x[y].i],x[y].i,o[v],v)<=0&&p(C[x[y].j],x[y].j,o[v],v)<=0))){var E=s.distanceToPolygon2d(_,t),k=s.distanceToPolygon2d(b,t);if(E>-M*w&&E<M*w||k>-M*w&&k<M&w||E*k<0){T=!0;break}if(s.crossedLineSegmentPolygon2d(_,b,t)){T=!0;break}for(var S=M*M*w*w,P=0;P<t.outer.length&&!T;P+=1)T=s.distance2dToLineSquared(t.outer[P],_,b)<S;for(var O=0;O<t.inner.length&&!T;O+=1)for(var L=0;L<t.inner[O].length&&!T;L+=1)T=s.distance2dToLineSquared(t.inner[O][L],_,b)<S;if(T)break;E>0&&(A=!0)}(!e.partial&&A&&!T||e.partial&&(A||T))&&(c.push(v),h.push(o[v]),f[v]={partial:T,segment:y<u[v].length?y:0})}return{found:h,index:c,extra:f}},this.rdpSimplifyData=function(t,e,n,r){t=t||l.data(),n=n||l.style.get("position"),r=r||l.style.get("line");var i=l.layer().map(),o=i.gcs(),u=l.gcs(),c=l.style.get("closed");return void 0===e&&(e=.5*i.unitsPerPixel(i.zoom())),t=t.map((function(t,i){var l=r(t,i),h=a.transformCoordinates(u,o,l.map((function(e,r){return n(e,r,t,i)}))),f=s.rdpLineSimplify(h,e,c(t,i),[]);for(var d in(f.length<2||2===f.length&&s.distance2dSquared(f[0],f[1])<e*e)&&(f=[]),f=a.transformCoordinates(o,u,f),t)!t.hasOwnProperty(d)||Array.isArray(t)&&d>=0&&d<t.length||(f[d]=t[d]);return f})),l.style("position",s.identityFunction),l.style("line",s.identityFunction),l.data(t),l},this._init=function(t){t=t||{},c.call(l,t);var e=r.extend({},{strokeWidth:1,strokeColor:{r:1,g:.8431372549,b:0},strokeStyle:"solid",strokeOpacity:1,antialiasing:2,closed:!1,line:s.identityFunction,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){return t.length>=3?t.slice(0,3):[0,0,0]}},void 0===t.style?{}:t.style);return void 0!==t.line&&(e.line=t.line),void 0!==t.position&&(e.position=t.position),l.style(e),l.dataTime().modified(),l},this._init(e),this};u.create=function(t,e){"use strict";return(e=e||{}).type="line",i.create(t,e)},u.capabilities={feature:"line",basic:"line.basic",multicolor:"line.multicolor"},r(u,i),t.exports=u},2804:function(t,e,n){var r=n(5638),i=n(5699),o=n(5358),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);if(void 0===(e=e||{}).node||null===e.node)return console.warn("map creation requires a node"),this;o.call(this,e);var i,a,s,u,l,c=n(9986),h=n(6853),f=n(4634),d=n(4647),p=n(5108),m=n(3870),g=n(6408),v=this,y=this._exit,x=r(e.node),_=e.width||x.width()||512,b=e.height||x.height()||512,M=void 0===e.gcs?"EPSG:3857":e.gcs,w=void 0===e.ingcs?"EPSG:4326":e.ingcs,A={x:0,y:0},T=void 0===e.zoom?4:e.zoom,C=e.rotation?e.rotation:0,E=null,k=null,S={min:0,max:16,origMin:0},P=null,O=null,L=!!e.discreteZoom,R="function"==typeof e.allowRotation?e.allowRotation:void 0===e.allowRotation||!!e.allowRotation,I=e.maxBounds||{},D=e.camera||c(),F=e.animationQueue||[],N=void 0===e.autoResize||e.autoResize,j=e.autoshareRenderer,z=((I.left||0)+(I.right||0))/2,B=((I.bottom||0)+(I.top||0))/2;function q(){var t;void 0!==document.hidden?t="hidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden"),v.geoTrigger(document[t]?p.hidden:p.unhidden)}function V(t){var e;void 0!==document.hidden?e="visibilitychange":void 0!==document.msHidden?e="msvisibilitychange":void 0!==document.webkitHidden&&(e="webkitvisibilitychange"),document.removeEventListener(e,q),!1!==t&&document.addEventListener(e,q)}function G(t,e){var n=t.zIndex(),r=e.zIndex();if(n!==r)return n-r;var i=t.node()[0],o=e.node()[0],a=i&&i.parentNode,s=o&&o.parentNode;if(a&&s&&a===s){var u=Array.from(a.children),l=u.indexOf(i),c=u.indexOf(o);if(l>=0&&c>=0)return l-c}return a?-1:s?1:0}function U(t,e,n,r,i){t.globalAlpha=e,i&&(t.globalCompositeOperation=i);var o=n.css("transform");o&&"matrix("===o.substr(0,7)?t.setTransform.apply(t,o.substr(7,o.length-8).split(",").map(parseFloat)):t.setTransform(1,0,0,1,0,0),t.drawImage(r,0,0),t.globalCompositeOperation="source-over"}function W(){for(var t=F.splice(0,F.length),e=1;e<t.length;e+=1)try{t[e].apply(v,arguments)}catch(t){console.error(t)}}function H(t,e,n){var r=e.width/2,i=e.height/2,o=Math.sin(n),a=Math.cos(n),s={},u={},l={},c={};return s.x=t.x+-r*a- -i*o,s.y=t.y+-r*o+-i*a,u.x=t.x+r*a- -i*o,u.y=t.y+r*o+-i*a,l.x=t.x+-r*a-i*o,l.y=t.y+-r*o+i*a,c.x=t.x+r*a-i*o,c.y=t.y+r*o+i*a,{left:Math.min(s.x,u.x,l.x,c.x),right:Math.max(s.x,u.x,l.x,c.x),bottom:Math.min(s.y,u.y,l.y,c.y),top:Math.max(s.y,u.y,l.y,c.y)}}function Z(t,e){void 0===e&&(e=C),t=function(t,e){return e&&(t=H({x:(t.left+t.right)/2,y:(t.top+t.bottom)/2},{width:Math.abs(t.left-t.right),height:Math.abs(t.top-t.bottom)},e)),t}(t,e);var n=function(t){var e,n,r=t.right-t.left,i=t.top-t.bottom,o=Math.abs(r/i),a=_/b;return o>a?(e=1,n=o/a):(n=1,e=a/o),{x:e,y:n}}(t);return n.y>n.x?-Math.log2(Math.abs(t.right-t.left)*n.x/(_*i)):-Math.log2(Math.abs(t.top-t.bottom)*n.y/(b*i))}function X(){S.min=u?Math.max(S.origMin,Z(I)):S.origMin}function Q(t,e,n){if(!R)return 0;if(e||"function"!=typeof R||(t=R(t)),!n){var r=2*Math.PI;t=t%r+(t>=0?0:r),Math.min(Math.abs(t),Math.abs(t-r))<1e-5&&(t=0)}return t}function Y(t,e,n,i){if(!a&&!s)return t;var o,u,l=I;if(e){l=r.extend({},I);var c,h,f=Math.abs(t.right-t.left),d=Math.abs(t.top-t.bottom),p=Math.abs(Math.sin(e)),m=Math.abs(Math.cos(e));if(t.width&&t.height)c=t.width,h=t.height;else if(Math.abs(p-m)<5e-4)if(_&&b){var g=Math.abs(_/b),v=Math.pow(1+Math.pow(g,2),.5);h=(c=Math.max(f,d)/v)*g}else c=f*m,h=d*p;else c=(m*f-p*d)/(m*m-p*p),h=(m*d-p*f)/(m*m-p*p);var y=f-Math.max(m*c,p*h),x=d-Math.max(m*h,p*c);l.left-=y,l.right+=y,l.top+=x,l.bottom-=x}return i&&(l={left:l.left-(t.right-t.left)/2,right:l.right+(t.right-t.left)/2,top:l.top-(t.bottom-t.top)/2,bottom:l.bottom+(t.bottom-t.top)/2}),a&&(t.right-t.left>l.right-l.left?o=l.left-(t.right-t.left-(l.right-l.left))/2-t.left:t.left<l.left?o=l.left-t.left:t.right>l.right&&(o=l.right-t.right),o&&(!n||n.x*o>0)&&(n&&Math.abs(o)>Math.abs(n.x*n.unit)&&(o=Math.abs(n.x*n.unit)*o/Math.abs(o)),t={left:t.left+=o,right:t.right+=o,top:t.top,bottom:t.bottom})),s&&(t.top-t.bottom>l.top-l.bottom?u=l.bottom-(t.top-t.bottom-(l.top-l.bottom))/2-t.bottom:t.top>l.top?u=l.top-t.top:t.bottom<l.bottom&&(u=l.bottom-t.bottom),u&&(!n||-n.y*u>0)&&(n&&Math.abs(u)>Math.abs(n.y*n.unit)&&(u=Math.abs(n.y*n.unit)*u/Math.abs(u)),t={top:t.top+=u,bottom:t.bottom+=u,left:t.left,right:t.right})),t}function K(t,e){if(D.rotation=e||0,t.width&&t.height&&e){var n=(t.left+t.right)/2,r=(t.top+t.bottom)/2;D.viewFromCenterSizeRotation({x:n,y:r},t,e)}else D.bounds=t;A={x:(D.bounds.left+D.bounds.right)/2,y:(D.bounds.top+D.bounds.bottom)/2}}function J(){v.size({width:x.width(),height:x.height()})}return I.left=h.transformCoordinates(I.gcs||w,M,{x:void 0!==I.left?I.left:-180,y:B}).x,I.right=h.transformCoordinates(I.gcs||w,M,{x:void 0!==I.right?I.right:180,y:B}).x,I.top=void 0!==I.top?h.transformCoordinates(I.gcs||w,M,{x:z,y:I.top}).y:I.right,I.bottom=void 0!==I.bottom?h.transformCoordinates(I.gcs||w,M,{x:z,y:I.bottom}).y:I.left,i=e.unitsPerPixel||(I.right-I.left)/256,D.viewport={width:_,height:b,left:x.offset().left,top:x.offset().top},e.center=f.normalizeCoordinates(e.center),a=void 0!==e.clampBoundsX&&e.clampBoundsX,s=void 0===e.clampBoundsY||e.clampBoundsY,u=void 0===e.clampZoom||e.clampZoom,this.unitsPerPixel=function(t,e){return t=t||0,e?(i=Math.pow(2,t)*e,v.draw(),v):Math.pow(2,-t)*i},this.animationQueue=function(t){if(void 0===t)return F;if(t!==F){if(F.length){t.length&&t[0]!==F[0]&&window.cancelAnimationFrame(F[0]);for(var e=t.length?1:0;e<F.length;e+=1)t.push(F[e])}F=t}return v},this.autoResize=function(t){return void 0===t?N:(t!==N&&(r(window).off("resize",J),(N=t)&&r(window).on("resize",J)),v)},this.clampBoundsX=function(t){return void 0===t?a:(t!==a&&(a=!!t,v.pan({x:0,y:0})),v)},this.clampBoundsY=function(t){return void 0===t?s:(t!==s&&(s=!!t,v.pan({x:0,y:0})),v)},this.clampZoom=function(t){return void 0===t?u:(t!==u&&(u=!!t,X(),v.zoom(T)),v)},this.allowRotation=function(t){return void 0===t?R:("function"!=typeof t&&(t=!!t),t!==R&&(R=t,v.rotation(C)),v)},this.origin=function(){return r.extend({},l)},this.camera=function(){return D},this.gcs=function(t){if(void 0===t)return M;if(t!==M){var e=v.center(void 0,void 0);M=t,X();var n=v._fix_zoom(T);n!==T&&v.zoom(n),v.center(e,void 0)}return v},this.ingcs=function(t){return void 0===t?w:(w=t,v)},this.node=function(){return x},this.zoom=function(t,e,n,r){if(void 0===t)return T;var i,o,a=e&&(e.mapgcs||e.geo)&&e.map;if(a&&(r=!0),(t=v._fix_zoom(t,n))===T)return v;if(T=t,o=v.boundsFromZoomAndCenter(t,A,C,null,n,r),v.modified(),K(o,C),i={zoomLevel:T,screenPosition:e?e.map:void 0},v.geoTrigger(p.zoom,i),a){var s=v.gcsToDisplay(e.mapgcs||e.geo,e.mapgcs?null:void 0);v.pan({x:e.map.x-s.x,y:e.map.y-s.y},n,!0)}else v.pan({x:0,y:0},n,r);return v},this.pan=function(t,e,n){var r={screenDelta:t};if(t.x||t.y){var i=v.unitsPerPixel(T),o=Math.sin(C),a=Math.cos(C);D.pan({x:(t.x*a- -t.y*o)*i,y:(t.x*o+-t.y*a)*i})}var s=D.bounds;if((s=Y(s,C,"limited"===n?{x:t.x,y:t.y,unit:i}:void 0,!0===n))!==D.bounds){var u=v.gcsToDisplay({x:D.bounds.left,y:D.bounds.top},null);K(s=v.boundsFromZoomAndCenter(T,{x:(s.left+s.right)/2,y:(s.top+s.bottom)/2},C,null,e,!0),C);var l=v.gcsToDisplay({x:D.bounds.left,y:D.bounds.top},null);r.screenDelta.x+=l.x-u.x,r.screenDelta.y+=l.y-u.y}return A=D.displayToWorld({x:_/2,y:b/2}),v.geoTrigger(p.pan,r),v.modified(),v},this.rotation=function(t,e,n){if(void 0===t)return C;var r=e&&e.geo&&e.map;if((t=Q(t,n))===C)return v;C=t;var i=v.boundsFromZoomAndCenter(T,A,C,null,n,!0);v.modified(),K(i,C);var o={rotation:C,screenPosition:e?e.map:void 0};if(v.geoTrigger(p.rotate,o),r){var a=v.gcsToDisplay(e.geo);v.pan({x:e.map.x-a.x,y:e.map.y-a.y},void 0,!0)}else v.pan({x:0,y:0},void 0,!0);return X(),v.zoom(T,void 0,n),v},this.center=function(t,e,n,i){var o;return void 0===t?o=r.extend({},v.worldToGcs(A,e)):(o=v.gcsToWorld(t,e),K(v.boundsFromZoomAndCenter(T,o,C,null,n,i),C),v.modified(),v.geoTrigger(p.pan,{screenDelta:{x:0,y:0}}),v)},this.createLayer=function(t,e){e=e||{},void 0!==v.autoshareRenderer()&&(e=Object.assign({autoshareRenderer:v.autoshareRenderer()},e));var n=d.createLayer(t,v,e);return n&&(v.addChild(n),v.children().forEach((function(t){t instanceof g&&t.moveToTop()})),n._update(),v.modified(),v.geoTrigger(p.layerAdd,{target:v,layer:n})),n},this.deleteLayer=function(t){return null!=t&&(t._exit(),v.removeChild(t),v.modified(),v.geoTrigger(p.layerRemove,{target:v,layer:t})),t},this.size=function(t){if(void 0===t)return{width:_,height:b};var e=v.center();_=t.width||_,b=t.height||b,X();var n=v._fix_zoom(T);return n!==T&&v.zoom(n),v.camera().viewport={width:_,height:b,left:x.offset().left,top:x.offset().top},v.center(e),v.geoTrigger(p.resize,{target:v,width:_,height:b}),v.modified(),v},this.rotatedSize=function(){if(!this.rotation())return{width:_,height:b};var t=H({x:0,y:0},{width:_,height:b},v.rotation());return{width:Math.abs(t.right-t.left),height:Math.abs(t.top-t.bottom)}},this.gcsToWorld=function(t,e){return Array.isArray(t)?t.map((function(t){return v.gcsToWorld(t,e)})):((e=null===e?M:void 0===e?w:e)!==M&&(t=h.transformCoordinates(e,M,t)),l.x||l.y||l.z?t=h.affineForward({origin:l},[t])[0]:"z"in t||(t={x:t.x,y:t.y,z:0}),t)},this.worldToGcs=function(t,e){return Array.isArray(t)?t.map((function(t){return v.worldToGcs(t,e)})):(l.x||l.y||l.z?t=h.affineInverse({origin:l},[t])[0]:"z"in t||(t={x:t.x,y:t.y,z:0}),(e=null===e?M:void 0===e?w:e)!==M&&(t=h.transformCoordinates(M,e,t)),t)},this.gcsToDisplay=function(t,e){return t=v.gcsToWorld(t,e),v.worldToDisplay(t)},this.worldToDisplay=function(t){return Array.isArray(t)?t.map((function(t){return D.worldToDisplay(t)})):D.worldToDisplay(t)},this.displayToGcs=function(t,e){return t=v.displayToWorld(t),v.worldToGcs(t,e)},this.displayToWorld=function(t){return Array.isArray(t)?t.map((function(t){return D.displayToWorld(t)})):D.displayToWorld(t)},this.draw=function(){var t,e=v.children();for(v.geoTrigger(p.draw,{target:v}),v._update(),t=0;t<e.length;t+=1)e[t].draw();return v.geoTrigger(p.drawEnd,{target:v}),v},this.fileReader=function(t,e){return void 0===t?E:("string"==typeof t?((e=e||{}).layer||(e.layer=v.createLayer("feature",r.extend({},e))),e.renderer=e.layer.renderer().api(),E=d.createFileReader(t,e)):E=t,v)},this._init=function(t){if(null==x)throw new Error("Map require DIV node");return x.data("data-geojs-map")&&r.isFunction(x.data("data-geojs-map").exit)&&x.data("data-geojs-map").exit(),x.addClass("geojs-map"),x.data("data-geojs-map",v),V(),v},this._update=function(t){var e,n=v.children();for(e=0;e<n.length;e+=1)n[e]._update(t);return v},this.exit=function(){V(!1);var t,e=v.children();for(t=e.length-1;t>=0;t-=1)e[t]._exit(),v.removeChild(e[t]);v.interactor()&&(v.interactor().destroy(),v.interactor(null)),F=[],v.node().data("data-geojs-map",null),v.node().off(".geo"),v.node().empty(),r(window).off("resize",J),y()},this.interactor=function(t){return void 0===t?k:(k&&k!==t&&k.destroy(),(k=t)&&(x.attr("tabindex")||x.attr("tabindex",0),k.map(v)),v)},this.zoomRange=function(t,e){return void 0===t?r.extend({},S):(void 0!==t.max&&(S.max=t.max),void 0!==t.min&&(S.min=S.origMin=t.min),X(),e||v.zoom(T),v)},this.transition=function(t,e,n){if(void 0===t)return P;if(P){var i=r.extend(!0,{},P.end);return i.center&&M!==w&&(i.center=h.transformCoordinates(M,w,i.center)),O=r.extend({},i||{},O||{},t),v}var o=v.unitsPerPixel(0);function a(t){return Math.pow(2,-(t+1))*o*b}var s={center:void 0,zoom:v.zoom(),rotation:v.rotation(),duration:1e3,ease:function(t){return t},interp:function(t,e){return function(n){var i=[];return r.each(t,(function(r){i.push(function(t,e,n){return t+(e-t)*n}(t[r],e[r],n))})),i}},done:null,zCoord:!0};function u(e){var n=P.done,r=O;if(!0===P.cancel)return v.geoTrigger(p.transitioncancel,t),n&&n({cancel:!0,source:P.cancelSource,transition:P}),P=null,void(O&&(r=O,O=null,v.transition(r,void 0,e)));if(P.start.time||(P.start.time=e,P.end.time=e+t.duration),P.time=e-P.start.time,e>=P.end.time||r){if(!r){if(P.end.center){var i=T!==v._fix_zoom(P.end.zoom)||!1===t.endClamp;v.center(P.end.center,null,i,i)}v.zoom(P.end.zoom,P.zoomOrigin,!1===t.endClamp,!1===t.endClamp),v.rotation(Q(P.end.rotation))}return v.geoTrigger(p.transitionend,t),n&&n({next:!!r}),P=null,void(O&&(r=O,O=null,v.transition(r,void 0,e)))}var a=P.ease((e-P.start.time)/t.duration),s=P.interp(a);P.zCoord&&(s[2]=function(t){return-Math.log2(t/o/b)-1}(s[2])),v._fix_zoom(s[2],!0)===T?v.center({x:s[0],y:s[1]},null,!0,!0):(A=v.gcsToWorld({x:s[0],y:s[1]},null),v.zoom(s[2],P.zoomOrigin,!0,!0)),v.rotation(s[3],void 0,!0),v.scheduleAnimationFrame(u)}return t.center&&(e=null===e?M:void 0===e?w:e,(t=r.extend(!0,{},t)).center=f.normalizeCoordinates(t.center),e!==M&&(t.center=h.transformCoordinates(e,M,t.center))),t=r.extend(!0,{},s,t),(P={start:{center:v.center(void 0,null),zoom:v.zoom(),rotation:v.rotation()},end:{center:t.center,zoom:v._fix_zoom(t.zoom),rotation:Q(t.rotation,void 0,!0)},ease:t.ease,zCoord:t.zCoord,done:t.done,duration:t.duration,zoomOrigin:t.zoomOrigin,endClamp:t.endClamp}).interp=t.interp([P.start.center.x,P.start.center.y,t.zCoord?a(P.start.zoom):P.start.zoom,P.start.rotation],[P.end.center?P.end.center.x:P.start.center.x,P.end.center?P.end.center.y:P.start.center.y,t.zCoord?a(P.end.zoom):P.end.zoom,P.end.rotation]),v.geoTrigger(p.transitionstart,t),p.cancelNavigation?(P=null,v.geoTrigger(p.transitionend,t),v):(p.cancelAnimation?(t.duration=0,u(0)):n?u(n):v.scheduleAnimationFrame(u),v)},this.transitionCancel=function(t){return!(!P||!0===P.cancel&&!O)&&(P.cancel=!0,P.cancelSource=t||P.cancelSource||"",O=null,!0)},this.bounds=function(t,e){var n;if(e=null===e?M:void 0===e?w:e,void 0!==t){if(e!==M){var r=h.transformCoordinates(e,M,[{x:t.left,y:t.top},{x:t.right,y:t.bottom}]);t={left:r[0].x,top:r[0].y,right:r[1].x,bottom:r[1].y}}t=Y(t,C),n=v.zoomAndCenterFromBounds(t,C,null),v.zoom(n.zoom),v.center(n.center,null)}return v.boundsFromZoomAndCenter(T,A,C,e,!0)},this.maxBounds=function(t,e){if(e=null===e?M:void 0===e?w:e,void 0===t)return{left:h.transformCoordinates(M,e,{x:I.left,y:0}).x,right:h.transformCoordinates(M,e,{x:I.right,y:0}).x,bottom:h.transformCoordinates(M,e,{x:0,y:I.bottom}).y,top:h.transformCoordinates(M,e,{x:0,y:I.top}).y};var n=((t.left||0)+(t.right||0))/2,r=((t.bottom||0)+(t.top||0))/2;return void 0!==t.left&&(I.left=h.transformCoordinates(e,M,{x:t.left,y:r}).x),void 0!==t.right&&(I.right=h.transformCoordinates(e,M,{x:t.right,y:r}).x),void 0!==t.bottom&&(I.bottom=h.transformCoordinates(e,M,{x:n,y:t.bottom}).y),void 0!==t.top&&(I.top=h.transformCoordinates(e,M,{x:n,y:t.top}).y),X(),v.zoom(T),v.pan({x:0,y:0}),v},this.zoomAndCenterFromBounds=function(t,e,n){var r,i;if((n=null===n?M:void 0===n?w:n)!==M){var o=h.transformCoordinates(n,M,[{x:t.left,y:t.top},{x:t.right,y:t.bottom}]);t={left:o[0].x,top:o[0].y,right:o[1].x,bottom:o[1].y}}if(t.left>=t.right||t.bottom>=t.top)throw new Error("Invalid bounds provided");return i=v._fix_zoom(Z(t,e)),r={x:((t=Y(t,e)).left+t.right)/2-l.x,y:(t.top+t.bottom)/2-l.y},n!==M&&(r=h.transformCoordinates(M,n,r)),{zoom:i,center:r}},this.boundsFromZoomAndCenter=function(t,e,n,r,i,o){var a,s,u,c,f,d;if(r=null===r?M:void 0===r?w:r,t=v._fix_zoom(t,i),d=v.unitsPerPixel(t),e=v.gcsToWorld(e,null),u=(a=_*d)/2,c=(s=b*d)/2,n?(e.x+=l.x,e.y+=l.y,(f=H(e,{width:a,height:s},n)).width=a,f.height=s,f=Y(f,n,void 0,o)):f=Y(f={left:e.x-u+l.x,right:e.x+u+l.x,bottom:e.y-c+l.y,top:e.y+c+l.y},0,void 0,o),r!==M){var p=h.transformCoordinates(M,r,[[f.left,f.top],[f.right,f.bottom]]);f={left:p[0][0],top:p[0][1],right:p[1][0],bottom:p[1][1]}}return f.width=a,f.height=s,f},this.discreteZoom=function(t){return void 0===t?L:(L!==(t=!!t)&&((L=t)&&v.zoom(Math.round(v.zoom())),v.interactor()&&v.interactor().options({discreteZoom:L})),v)},this.layers=this.children,this.sortedLayers=function(){return v.children().sort(G)},this.listSceneObjects=function(t){var e=[];return(t=t||v.sortedLayers()).forEach((function(t){if(e.indexOf(t)<0&&(e.push(t),t.children)){var n=t.children();n.length&&(e=e.concat(v.listSceneObjects(n)))}})),e},this.updateAttribution=function(){v.node().find(".geo-attribution").remove();var t=r("<div/>").addClass("geo-attribution").on("mousedown",(function(t){t.stopPropagation()}));return v.children().forEach((function(e){var n=e.attribution();n&&r("<span/>").addClass("geo-attribution-layer").html(n).appendTo(t)})),r("span",t).length&&t.appendTo(v.node()),v},this.screenshot=function(t,e,n,i){var o;if(!t||Array.isArray(t)||t.renderer||(e=e||t.type,n=n||t.encoderOptions,i=i||t,t=t.layers),(i=i||{}).wait){var a=r.extend({},i,{wait:!1});o=r.Deferred();var s=function(){window.requestAnimationFrame((function(){o.resolve()}))};return"idle"===i.wait?v.onIdle(s):s(),o.then((function(){return v.screenshot(t,e,n,a)}))}o=r.when(),t?Array.isArray(t)||(t=[t]):(t=v.layers(),null!==i.attribution&&void 0!==i.attribution||(i.attribution=!0)),t=(t=t.filter((function(t){return v.layers().indexOf(t)>=0&&t.opacity()>0&&(!t.visible||t.visible())}))).sort(G);var u=document.createElement("canvas");u.width=_,u.height=b;var l=u.getContext("2d");if(!1!==i.background&&null!==i.background){var c=i.background;void 0===i.background&&(l.fillStyle="white",l.fillRect(0,0,u.width,u.height),v.node().parents().get().reverse().forEach((function(t){(c=window.getComputedStyle(t).backgroundColor)&&"transparent"!==c&&(l.fillStyle=c,l.fillRect(0,0,u.width,u.height))})),c=window.getComputedStyle(v.node()[0]).backgroundColor),c&&"transparent"!==c&&(l.fillStyle=c,l.fillRect(0,0,u.width,u.height))}return t.forEach((function(t){var e=t.opacity();t.node().children("canvas").each((function(){var n=r(this);o=o.then((function(){t.renderer()&&"webgl"===t.renderer().api()&&t.renderer()._renderFrame(),U(l,e,n,n[0],t.node().css("mix-blend-mode"))}))})),!t.node().children().not("canvas").length&&t.node().children().length||t.renderer()&&"webgl"===t.renderer().api()||(o=o.then((function(){return f.htmlToImage(t.node(),1).done((function(e){U(l,1,r([]),e,t.node().css("mix-blend-mode"))}))})))})),i.attribution&&v.node().find(".geo-attribution").each((function(){var t=r(this);o=o.then((function(){return f.htmlToImage(t,1).done((function(t){U(l,1,r([]),t)}))}))})),i.html&&r(i.html).each((function(){var t=r(this);o=o.then((function(){return f.htmlToImage(t,1).done((function(e){U(l,1,r([]),e,t.css("mix-blend-mode"))}))}))})),o=o.then((function(){var t=u;if("canvas"!==e)try{u=u.toDataURL(e,n)}catch(t){console.warn("Failed to convert screenshot to output",t);var i=r.Deferred();return i.reject(),i}return v.geoTrigger(p.screenshot.ready,{canvas:t,screenshot:u}),u}))},this.scheduleAnimationFrame=function(t,e){F.length||F.push(window.requestAnimationFrame(W));var n=F.indexOf(t,1);if(n>=0){if(!e)return;if(F.splice(n,1),"remove"===e)return}return F.push(t),F[0]},this._fix_zoom=function(t,e){return t=Math.round(1e6*t)/1e6,t=Math.max(Math.min(S.max,t),S.min),L&&!e&&(t=Math.round(t))<S.min&&(t=Math.ceil(S.min)),t},this.autoshareRenderer=function(t){return void 0===t?j:(j=null===t?void 0:t,v)},this._version=n(2978),this._geo=n(6062),this._init(e),this.node().on("dragover.geo",(function(t){var e=t.originalEvent;v.fileReader()&&(e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy")})).on("drop.geo",(function(t){var e,n,r=t.originalEvent,i=v.fileReader();function o(){v.draw()}if(i)for(r.stopPropagation(),r.preventDefault(),e=0;e<r.dataTransfer.files.length;e+=1)n=r.dataTransfer.files[e],i.canRead(n)&&i.read(n,o)})),l={x:0,y:0},this.zoomRange(e,!0),T=this._fix_zoom(T),C=Q(C),this.center(r.extend({},e.center||A),void 0),null!==e.interactor&&this.interactor(e.interactor||m({discreteZoom:L})),N&&r(window).on("resize",J),v.geoOn([p.layerAdd,p.layerRemove],v.updateAttribution),this};a.create=function(t){"use strict";var e=a(t),r=n(9105);return e&&e.zoom?(t.data=t.data||[],t.layers=t.layers||[],t.layers.forEach((function(n){n.data=n.data||t.data,n.layer=r.create(e,n)})),e):(console.warn("Could not create map."),null)},i(a,o),t.exports=a},3870:function(t,e,n){var r=n(5699),i=n(3737),o=n(4634),a=n(3345),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this);var r,s,u,l,c,h,f,d,p,m,g=n(5638),v=n(5108),y=n(7839),x=n(4634).throttle,_=n(4634).debounce,b=n(4634).actionMatch,M=n(5017),w=this,A=0,T=null,C=!1,E=!1,k=function(){};function S(t){var e=t.x,n=t.y;return Math.sqrt(e*e+n*n)}function P(){h={boundDocumentHandlers:h.boundDocumentHandlers}}function O(t,e){e=e<=0?30:e;var n=function(){var t,e,n,i;if(!r.spring.enabled)return{x:0,y:0};var o=w.map().maxBounds(void 0,null),a=w.map().gcsToDisplay({x:o.left,y:o.top},null),s=w.map().gcsToDisplay({x:o.right,y:o.bottom},null),u=r.spring.springConstant,l=w.map().node().width(),c=w.map().node().height();return t=u*Math.max(0,a.x),e=u*Math.max(0,l-s.x),n=u*Math.max(0,a.y)/2,i=u*Math.max(0,c-s.y)/2,{x:t-e,y:n-i}}(),i=S(t),o=t.x/i,a=t.y/i;return i*=Math.exp(-r.momentum.drag*e),S(n)*e+i<r.momentum.minSpeed?null:(i>0?(o*=i,a*=i):(o=0,a=0),{x:o-n.x*e,y:a-n.y*e})}return r=g.extend(!0,{},{throttle:30,discreteZoom:!1,actions:[{action:y.pan,input:"left",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button pan"},{action:y.zoom,input:"right",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button zoom"},{action:y.zoom,input:"wheel",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"wheel zoom"},{action:y.rotate,input:"left",modifiers:{shift:!1,ctrl:!0},owner:"geo.mapInteractor",name:"button rotate"},{action:y.rotate,input:"wheel",modifiers:{shift:!1,ctrl:!0},owner:"geo.mapInteractor",name:"wheel rotate"},{action:y.select,input:"left",modifiers:{shift:!0,ctrl:!0},selectionRectangle:v.select,owner:"geo.mapInteractor",name:"drag select"},{action:y.zoomselect,input:"left",modifiers:{shift:!0,ctrl:!1},selectionRectangle:v.zoomselect,owner:"geo.mapInteractor",name:"drag zoom"},{action:y.unzoomselect,input:"right",modifiers:{shift:!0,ctrl:!1},selectionRectangle:v.unzoomselect,owner:"geo.mapInteractor",name:"drag unzoom"},{action:y.pan,input:"pan",owner:"geo.mapInteractor",name:"touch pan"},{action:y.zoomrotate,input:"rotate",owner:"geo.mapInteractor",name:"touch zoom and rotate"},{action:y.pan,input:"middle",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button pan"}],click:{enabled:!0,buttons:{left:!0,right:!0,middle:!0},duration:0,cancelOnMove:!0},keyboard:{actions:{"zoom.in":["plus","shift+plus","shift+ctrl+plus","=","shift+=","shift+ctrl+="],"zoom.out":["-","shift+-","shift+ctrl+-","_","shift+_","shift+ctrl+_"],"zoom.0":["1"],"zoom.3":["2"],"zoom.6":["3"],"zoom.9":["4"],"zoom.12":["5"],"zoom.15":["6"],"zoom.18":["7"],"pan.left":["left","shift+left","shift+ctrl+left"],"pan.right":["right","shift+right","shift+ctrl+right"],"pan.up":["up","shift+up","shift+ctrl+up"],"pan.down":["down","shift+down","shift+ctrl+down"],"rotate.ccw":["<","shift+<","shift+ctrl+<",".","shift+.","shift+ctrl+."],"rotate.cw":[">","shift+>","shift+ctrl+>",",","shift+,","shift+ctrl+,"],"rotate.0":["0"]},meta:{0:{shift:!1,ctrl:!1},1:{shift:!0,ctrl:!0},2:{shift:!0,ctrl:!1}},metakeyMouseEvents:["shift","ctrl","shift+ctrl","shift+alt","shift+meta"],focusHighlight:!0},alwaysTouch:!1,wheelScaleX:1,wheelScaleY:1,zoomScale:1,rotateWheelScale:6*Math.PI/180,zoomrotateMinimumRotation:5*Math.PI/180,zoomrotateReverseRotation:4*Math.PI/180,zoomrotateMinimumZoom:.05,zoomrotateMinimumPan:5,touchPanDelay:50,momentum:{enabled:!0,maxSpeed:2.5,minSpeed:.01,stopTime:250,drag:.01,actions:[y.pan,y.zoom]},spring:{enabled:!1,springConstant:5e-5},zoomAnimation:{enabled:!0,duration:500,ease:function(t){return(2-t)*t}}},e||{}),e&&e.actions&&(r.actions=g.extend(!0,[],e.actions)),e&&e.momentum&&e.momentum.actions&&(r.momentum.actions=g.extend(!0,[],e.momentum.actions)),e&&e.keyboard&&void 0!==e.keyboard.actions&&(r.keyboard.actions=g.extend(!0,{},e.keyboard.actions)),s={page:{x:0,y:0},map:{x:0,y:0},geo:{x:0,y:0},mapgcs:{x:0,y:0},buttons:{left:!1,right:!1,middle:!1},modifiers:{alt:!1,ctrl:!1,shift:!1,meta:!1},time:new Date,deltaTime:1,velocity:{x:0,y:0}},h={},f={},this._handleKeys=function(t,e,n){n&&!0===n.simulated&&(e=n);var i,o,a=r.keyboard.meta||{0:{}},s=w.map(),u=s.size(),l=t,c="",h={};for(i in a)a.hasOwnProperty(i)&&(void 0!==a[i].shift&&e.shiftKey!==!!a[i].shift||void 0!==a[i].ctrl&&e.ctrlKey!==!!a[i].ctrl||void 0!==a[i].alt&&e.altKey!==!!a[i].alt||void 0!==a[i].meta&&e.metaKey!==!!a[i].meta||(o=i));if(void 0!==o){switch(e.stopPropagation(),e.preventDefault(),t.indexOf(".")>=0&&(l=t.substr(0,t.indexOf(".")),c=t.substr(t.indexOf(".")+1)),l){case"zoom":switch(c){case"in":h.zoomDelta=[.05,.25,1][o];break;case"out":h.zoomDelta=-[.05,.25,1][o];break;default:isNaN(parseFloat(c))||(h.zoom=parseFloat(c))}break;case"pan":switch(c){case"down":h.panY=-Math.max(1,[0,.05,.5][o]*u.height);break;case"left":h.panX=Math.max(1,[0,.05,.5][o]*u.width);break;case"right":h.panX=-Math.max(1,[0,.05,.5][o]*u.width);break;case"up":h.panY=Math.max(1,[0,.05,.5][o]*u.height)}break;case"rotate":switch(c){case"ccw":h.rotationDelta=[1,5,90][o]*Math.PI/180;break;case"cw":h.rotationDelta=-[1,5,90][o]*Math.PI/180;break;default:isNaN(parseFloat(c))||(h.rotation=parseFloat(c))}}s.geoTrigger(v.keyaction,{move:h,action:t,factor:o,event:e}),h.cancel||(void 0!==h.zoom?s.zoom(h.zoom):h.zoomDelta&&s.zoom(s.zoom()+h.zoomDelta),void 0!==h.rotation?s.rotation(h.rotation):h.rotationDelta&&s.rotation(s.rotation()+h.rotationDelta),(h.panX||h.panY)&&s.pan({x:h.panX||0,y:h.panY||0}))}},this.hasTouchSupport=function(){return"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof window.DocumentTouch||(navigator.msMaxTouchPoints||navigator.maxTouchPoints)>1},this._handleTouch=function(t){var e=!1;if("mouse"===t.pointerType&&c.touchSupport&&(e=!0),"hammer.input"===t.type){if("pan"!==c.lastEventType||1===t.pointers.length)return;e=!0,c.lastEventType=null}var n=/^(.*)(start|end|move|tap)$/.exec(t.type);if(n&&3===n.length||(e=!0),e)h.boundDocumentHandlers&&c.lastEvent&&w._handleMouseUpDocument(c.lastEvent);else{t.which=n[1];var i=(new Date).valueOf();"pan"===t.which&&"pan"!==c.lastEventType&&i-c.lastTime<r.touchPanDelay||(c.lastTime=i,c.lastEventType=t.which,c.lastEvent=t,void 0===t.pageX&&void 0!==t.center&&void 0!==t.center.x&&(t.pageX=t.center.x,t.pageY=t.center.y),"start"===n[2]&&(w._handleMouseDown(t),w._setClickMaybe(!1),h.boundDocumentHandlers&&g(document).on("mousemove.geojs",w._handleMouseUpDocument)),"start"!==n[2]&&"move"!==n[2]||(h.boundDocumentHandlers?w._handleMouseMoveDocument(t):w._handleMouseMove(t)),"end"!==n[2]&&"cancel"!==n[2]||(h.boundDocumentHandlers?w._handleMouseUpDocument(t):w._handleMouseUp(t),c.lastEvent=null),"tap"!==n[2]||h.boundDocumentHandlers||(t.which=1,c.lastEventType=null,w._handleMouseDown(t),w._handleMouseUp(t),c.lastEventType=n[2]))}},this._repeatMouseMoveEvent=function(t){if(s&&s.modifiers){var e=s.modifiers.alt,n=s.modifiers.ctrl,r=s.modifiers.meta,i=s.modifiers.shift;w._getMouseModifiers(t),s.modifiers.alt===e&&s.modifiers.ctrl===n&&s.modifiers.meta===r&&s.modifiers.shift===i||(h.boundDocumentHandlers?w.map().geoTrigger(v.actionmove,{state:w.state(),mouse:w.mouse(),event:t}):w.map().geoTrigger(v.mousemove,w.mouse()))}},this.retriggerMouseMove=function(){w.map().geoTrigger(v.mousemove,w.mouse())},this._connectEvents=function(){if(!r.map)return w;w._disconnectEvents(),d=g(r.map.node()),w._handleMouseWheel=function(){var t={};function e(e){var n,i;C||(t!==f&&(f=t={kind:"wheel",scroll:{x:0,y:0}}),e.preventDefault(),e.deltaFactor=1,1===e.originalEvent.deltaMode?e.deltaFactor=40:2===e.originalEvent.deltaMode&&(e.deltaFactor=g(window).height()),n=e.originalEvent.deltaX||0,i=e.originalEvent.deltaY||0,n=n*r.wheelScaleX*e.deltaFactor/120,i=i*r.wheelScaleY*e.deltaFactor/120,t.scroll.x+=n,t.scroll.y+=i)}function n(e){var n,i;if(t===f){if(w._getMousePosition(e),w._getMouseButton(e),w._getMouseModifiers(e),i=(b({wheel:!0},s.modifiers,r.actions)||{}).action){var o=w.map().transitionCancel("wheel."+i);switch((o|=w.cancel(y.momentum,!0))&&(s.geo=w.map().displayToGcs(s.map),s.mapgcs=w.map().displayToGcs(s.map,null)),i){case y.pan:w.map().pan({x:f.scroll.x,y:f.scroll.y},void 0,"limited");break;case y.zoom:n=-f.scroll.y,k(n,s);break;case y.rotate:w.map().rotation(w.map().rotation()+f.scroll.y*r.rotateWheelScale,s)}w.map().geoTrigger(v.actionwheel,{state:w.state(),mouse:w.mouse(),eventData:e})}f={}}}return r.throttle>0?x(r.throttle,!1,n,e):function(t){e(t),n(t)}}(),k=function(){var t,e,n,i=0,o=400;function a(o,a){var s,u=w.map();t=g.extend(!0,{},a),i+=o,void 0===n&&(e=n=u.zoom()),n+=o,u&&Math.abs(i)>=1&&r.discreteZoom&&!r.zoomAnimation.enabled&&(s=Math.round(i+u.zoom()),i=i+u.zoom()-s,u.zoom(s,t))}function s(){var o,a=w.map();a&&(r.zoomAnimation.enabled?(o=n,r.discreteZoom&&(o=Math.round(o))===e&&n!==e&&(o=e+(n>e?1:-1)),(o=Math.round(1e6*a._fix_zoom(o))/1e6)!==a.zoom()?(a.transitionCancel("debounced_zoom."+y.zoom),a.transition({zoom:o,zoomOrigin:t,duration:r.zoomAnimation.duration,ease:r.zoomAnimation.ease,done:function(t){t=t||{};var e=new RegExp("\\."+y.zoom+"$");t.next||t.cancel&&!((""+t.source).search(e)<0)||(n=void 0),r.discreteZoom&&t.cancel&&t.transition&&t.transition.end&&(""+t.source).search(e)<0&&a.zoom(t.transition.end.zoom,t.transition.end.zoomOrigin)}})):n=void 0):(o=i+a.zoom(),r.discreteZoom&&(o=Math.round(o)),a.zoom(o,t))),i=0}!0!==r.discreteZoom&&r.discreteZoom>0&&(o=r.discreteZoom);return(!0===r.discreteZoom||r.discreteZoom>0)&&!r.zoomAnimation.enabled?_(o,!1,s,a):function(t,e){(t||void 0!==n)&&(a(t,e),s())}}(),o.adjustActions(r.actions);var t={};if(["right","pan","rotate"].forEach((function(e){t[e]=r.actions.some((function(t){return t.input[e]}))})),d.on("wheel.geojs",w._handleMouseWheel),d.on("mousemove.geojs",w._handleMouseMove),d.on("mousedown.geojs",w._handleMouseDown),d.on("mouseup.geojs",w._handleMouseUp),d.on("dragstart",(function(){return!1})),t.right&&d.on("contextmenu.geojs",(function(){return!1})),r.keyboard&&r.keyboard.actions){u=a(d[0]);var e=[];for(var i in r.keyboard.actions)r.keyboard.actions.hasOwnProperty(i)&&(u.bind(r.keyboard.actions[i],function(t){return function(e,n){w._handleKeys(t,e,n)}}(i)),e=e.concat(r.keyboard.actions[i]));r.keyboard.metakeyMouseEvents&&r.keyboard.metakeyMouseEvents.forEach((function(t){u.bind(t,w._repeatMouseMoveEvent,"keydown"),u.bind(t,w._repeatMouseMoveEvent,"keyup"),e.push(t)})),l=e}if(d.toggleClass("highlight-focus",!!(l&&l.length&&r.keyboard.focusHighlight)),(w.hasTouchSupport()||r.alwaysTouch)&&(t.pan||t.rotate)){var h;try{(h=n(9549))&&h.Manager||(h=void 0)}catch(t){}if(void 0!==h){var p=[],m=["hammer.input"];t.rotate&&(p.push([h.Rotate,{enable:!0}]),m=m.concat(["rotatestart","rotateend","rotatemove"])),t.pan&&(p.push([h.Pan,{direction:h.DIRECTION_ALL}]),m=m.concat(["panstart","panend","panmove"])),p.push([h.Tap,{event:"doubletap",taps:2}]),p.push([h.Tap,{event:"singletap"},void 0,["doubletap"]]),m=m.concat(["singletap"]);var M={recognizers:p,preventDefault:!0};(c={manager:new h.Manager(d[0],M),touchSupport:w.hasTouchSupport(),lastTime:0}).manager.get("doubletap").recognizeWith("singletap"),m.forEach((function(t){c.manager.on(t,w._handleTouch)}))}}return w},this._disconnectEvents=function(){return l&&(u&&u.unbind(l),l=null,u=null),c&&(c.manager.destroy(),c=null),d&&(d.off(".geojs"),d=null),w._handleMouseWheel=function(){},k=function(){},w},this.map=function(t){return void 0!==t?(r.map=t,w._connectEvents(),w):r.map},this.options=function(t){return void 0===t?g.extend({},r):(g.extend(r,t),w._connectEvents(),w)},this._getMousePosition=function(t){if(void 0!==t.pageX&&void 0!==t.pageY){var e,n,r=d.offset();e=(n=(new Date).valueOf())-s.time,s.time=n,s.deltaTime=e,s.velocity={x:(t.pageX-s.page.x)/e,y:(t.pageY-s.page.y)/e},s.page={x:t.pageX,y:t.pageY},s.map={x:t.pageX-r.left,y:t.pageY-r.top};try{s.geo=w.map().displayToGcs(s.map),s.mapgcs=w.map().displayToGcs(s.map,null)}catch(t){s.geo=s.mapgcs=null}}},this._getMouseButton=function(t){if(void 0!==t.buttons||void 0!==t.which){for(var e in s.buttons)s.buttons.hasOwnProperty(e)&&(s.buttons[e]=!1);if(void 0!==t.buttons)s.buttons.left=!!(1&t.buttons),s.buttons.right=!!(2&t.buttons),s.buttons.middle=!!(4&t.buttons);else if("mouseup"!==t.type)switch(t.which){case 1:s.buttons.left=!0;break;case 2:s.buttons.middle=!0;break;case 3:s.buttons.right=!0}!t.which||t.which>=1&&t.which<=3||(s.buttons[t.which]=!0)}},this._getMouseModifiers=function(t){s.modifiers.alt=t.altKey,s.modifiers.ctrl=t.ctrlKey,s.modifiers.meta=t.metaKey,s.modifiers.shift=t.shiftKey},this._getSelection=function(){var t=h.origin,e=w.mouse(),n=w.map(),r={},i={},a=e.map;if(h.actionRecord&&o.isFunction(h.actionRecord.selectionConstraint)){var s=h.actionRecord.selectionConstraint(e.mapgcs,t.mapgcs);a=s?n.gcsToDisplay(s.pos,null):a}else if(e.modifiers.shift){var u=Math.pow(Math.abs((a.x-t.map.x)*(a.y-t.map.y)),.5);a={x:t.map.x+Math.sign(a.x-t.map.x)*u,y:t.map.y+Math.sign(a.y-t.map.y)*u}}return r.upperLeft={x:Math.min(t.map.x,a.x),y:Math.min(t.map.y,a.y)},r.lowerRight={x:Math.max(t.map.x,a.x),y:Math.max(t.map.y,a.y)},r.upperRight={x:r.lowerRight.x,y:r.upperLeft.y},r.lowerLeft={x:r.upperLeft.x,y:r.lowerRight.y},i.upperLeft=n.displayToGcs(r.upperLeft,null),i.lowerRight=n.displayToGcs(r.lowerRight,null),i.upperRight=n.displayToGcs(r.upperRight,null),i.lowerLeft=n.displayToGcs(r.lowerLeft,null),p.data([{ul:i.upperLeft,ur:i.upperRight,ll:i.lowerLeft,lr:i.lowerRight}]),p.draw(),{display:r,gcs:i,mouse:e,origin:g.extend({},h.origin)}},this.cancel=function(t,e){var n;return(n=t?h.action===t:!!h.action)&&(e||(f={}),P()),n},this._setClickMaybe=function(t){E=t,m&&(window.clearTimeout(m),m=null)},this._handleMouseDown=function(t){var e,n;if(!(C||c&&"tap"===c.lastEventType&&(new Date).valueOf()-c.lastTime<1e3)){w._getMousePosition(t),w._getMouseButton(t),w._getMouseModifiers(t),w.map().geoTrigger(v.mousedown,w.mouse()),!r.click.enabled||s.buttons.left&&!r.click.buttons.left||s.buttons.right&&!r.click.buttons.right||s.buttons.middle&&!r.click.buttons.middle||(w._setClickMaybe({x:s.page.x,y:s.page.y,buttons:g.extend({},s.buttons)}),r.click.duration>0&&(m=window.setTimeout((function(){E=!1,m=null}),r.click.duration))),e=((n=b(s.buttons,s.modifiers,r.actions))||{}).action;var i=w.map();i.transitionCancel("_handleMouseDown"+(e?"."+e:"")),w.cancel(y.momentum),s.velocity={x:0,y:0},e&&(f={kind:"move"},A+=1,h={action:e,actionRecord:n,origin:g.extend(!0,{},s),initialZoom:i.zoom(),initialRotation:i.rotation(),initialEventRotation:t.rotation,stateId:A,delta:{x:0,y:0}},n.selectionRectangle&&(T&&(T.clear(),i.deleteLayer(T),T=null),T=i.createLayer("feature",{features:[M.capabilities.color],autoshareRenderer:!1}),(p=T.createFeature("quad",{gcs:i.gcs()})).style({opacity:.25,color:{r:.3,g:.3,b:.3}}),i.geoTrigger(v.brushstart,w._getSelection())),i.geoTrigger(v.actiondown,{state:w.state(),mouse:w.mouse(),event:t}),r.throttle>0?g(document).on("mousemove.geojs",x(r.throttle,w._handleMouseMoveDocument)):g(document).on("mousemove.geojs",w._handleMouseMoveDocument),g(document).on("mouseup.geojs",w._handleMouseUpDocument),h.boundDocumentHandlers=!0)}},this._handleMouseMove=function(t){C||h.boundDocumentHandlers||(r.click.cancelOnMove&&E&&w._setClickMaybe(!1),w._getMousePosition(t),w._getMouseButton(t),w._getMouseModifiers(t),E||w.map().geoTrigger(v.mousemove,w.mouse()))},this._handleZoomrotate=function(t){var e=Math.log2(t.scale);if(!h.zoomrotateAllowZoom&&e&&Math.abs(e)>=Math.log2(1+r.zoomrotateMinimumZoom)&&(r.zoomrotateMinimumZoom&&(h.initialZoom-=e),h.zoomrotateAllowZoom=!0),h.zoomrotateAllowZoom&&e){var n=h.initialZoom+e;w.map().zoom(n,h.origin)}var i=(t.rotation-h.initialEventRotation)*Math.PI/180;if(!h.zoomrotateAllowRotation&&i&&Math.abs(i)>=r.zoomrotateMinimumRotation&&(r.zoomrotateMinimumRotation&&(h.initialEventRotation=t.rotation,i=0),h.zoomrotateAllowRotation=!0),h.zoomrotateAllowRotation){var a=h.initialRotation+i;(i=o.wrapAngle(a-w.map().rotation()))&&(i*(h.lastRotationDelta||0)>=0||Math.abs(i)>=r.zoomrotateReverseRotation)&&(w.map().rotation(a,h.origin),h.lastRotationDelta=i)}var s=h.origin.page;if(h.initialEventGeo){var u=d.offset();(s=w.map().gcsToDisplay(h.initialEventGeo)).x+=u.left,s.y+=u.top}var l=t.pageX-s.x,c=t.pageY-s.y,f=l*l+c*c;!h.zoomrotateAllowPan&&f&&f>=r.zoomrotateMinimumPan*r.zoomrotateMinimumPan&&(r.zoomrotateMinimumPan?(l=c=0,h.initialEventGeo=w.mouse().geo):h.initialEventGeo=h.origin.geo,h.zoomrotateAllowPan=!0),h.zoomrotateAllowPan&&(l||c)&&w.map().pan({x:l,y:c})},this._handleMouseMoveDocument=function(t){var e,n,i;if(w.map()&&!C&&"move"===f.kind){if(w._getMousePosition(t),w._getMouseButton(t),w._getMouseModifiers(t),r.click.cancelOnMove)if(void 0===E.x||void 0===E.y)w._setClickMaybe(!1);else if(!0!==r.click.cancelOnMove||s.page.x===E.x&&s.page.y===E.y){Math.sqrt(Math.pow(s.page.x-E.x,2)+Math.pow(s.page.y-E.y,2))>=r.click.cancelOnMove&&w._setClickMaybe(!1)}else w._setClickMaybe(!1);if(!E)if(h.action){if(e=s.map.x-h.origin.map.x-h.delta.x,n=s.map.y-h.origin.map.y-h.delta.y,h.delta.x+=e,h.delta.y+=n,h.action===y.pan)w.map().pan({x:e,y:n},void 0,"limited");else if(h.action===y.zoom)k(-n*r.zoomScale/120,h);else if(h.action===y.rotate){var o,a;void 0===h.origin.rotation&&(o=h.origin.map.x-w.map().size().width/2,a=h.origin.map.y-w.map().size().height/2,h.origin.rotation=w.map().rotation()-Math.atan2(a,o)),o=s.map.x-w.map().size().width/2,a=s.map.y-w.map().size().height/2,w.map().rotation(h.origin.rotation+Math.atan2(a,o))}else h.action===y.zoomrotate?w._handleZoomrotate(t):h.actionRecord.selectionRectangle&&(i=w._getSelection(),w.map().geoTrigger(v.brush,i));w.map().geoTrigger(v.actionmove,{state:w.state(),mouse:w.mouse(),event:t}),t.preventDefault()}else console.log("WARNING: Invalid state in mapInteractor.")}},this._zoomFromSelection=function(t,e,n){if((t===y.zoomselect||t===y.unzoomselect)&&e.x!==n.x&&e.y!==n.y){var r,i,o=w.map(),a=o.size(),s={x:Math.abs((n.x-e.x)/a.width),y:Math.abs((n.y-e.y)/a.height)};if(t===y.zoomselect?(i=o.displayToGcs({x:(e.x+n.x)/2,y:(e.y+n.y)/2},null),r=o.zoom()-Math.log2(Math.max(s.x,s.y))):(r=o.zoom()+Math.log2(Math.max(s.x,s.y)),i=o.center(void 0,null)),o.discreteZoom()&&(r=Math.floor(r)),o.zoom(r),t===y.zoomselect)o.center(i,null);else{var u=o.gcsToDisplay(i,null);o.pan({x:(e.x+n.x)/2-u.x,y:(e.y+n.y)/2-u.y})}}},this._handleMouseUpDocument=function(t){var e,n;if(!C&&(f={},w._setClickMaybe(!1),w._getMouseButton(t),w._getMouseModifiers(t),g(document).off(".geojs"),h.boundDocumentHandlers=!1,s.buttons.right&&t.preventDefault(),h.actionRecord&&h.actionRecord.selectionRectangle&&(w._getMousePosition(t),e=w._getSelection(),T.clear(),w.map().deleteLayer(T),T=null,p=null,w.map().geoTrigger(v.brushend,e),!0!==h.actionRecord.selectionRectangle&&w.map().geoTrigger(h.actionRecord.selectionRectangle,e),w._zoomFromSelection(h.action,e.display.lowerLeft,e.display.upperRight),w.map().geoTrigger(v.actionselection,{state:w.state(),mouse:w.mouse(),event:t,lowerLeft:e.display.lowerLeft,upperRight:e.display.upperRight})),w.map().geoTrigger(v.actionup,{state:w.state(),mouse:w.mouse(),event:t}),n=h.action,P(),r.momentum.enabled&&g.inArray(n,r.momentum.actions)>=0)){var i=(new Date).valueOf(),o=i-s.time+s.deltaTime;i-s.time<r.momentum.stopTime?(s.velocity.x*=s.deltaTime/o,s.velocity.y*=s.deltaTime/o,s.deltaTime=o):s.velocity.x=s.velocity.y=0,w.springBack(!0,n)}},this._handleMouseUp=function(t){if(!C){w._getMouseButton(t),E&&w._handleMouseClick(t);var e=w.mouse();e.buttonsDown=E.buttons,w.map().geoTrigger(v.mouseup,e)}},this._handleMouseClick=function(t){h.actionRecord&&h.actionRecord.selectionRectangle&&(T.clear(),w.map().deleteLayer(T),T=null,p=null,h.action=h.actionRecord=null),w._getMouseButton(t),w._getMouseModifiers(t),w.cancel(y.pan),g(document).off(".geojs"),h.boundDocumentHandlers=!1;var e=w.mouse();e.buttonsDown=E.buttons,w._setClickMaybe(!1),w.map().geoTrigger(v.mouseclick,e)},this._handleMouseWheel=function(){},this.springBack=function(t,e){h.action!==y.momentum&&(t||(s.velocity={x:0,y:0}),h.origAction=e,h.action=y.momentum,h.origin=w.mouse(),h.momentum=w.mouse(),h.start=new Date,h.handler=function(){var t,e,n,i;if(h.action===y.momentum&&w.map()&&!w.map().transition())if(i=Math.min(h.momentum.deltaTime,30),n=h.start.valueOf(),h.start=new Date,t=O(h.momentum.velocity,h.start-n)){if((e=S(t))>r.momentum.maxSpeed&&(e=r.momentum.maxSpeed/e,t.x=t.x*e,t.y=t.y*e),isFinite(t.x)&&isFinite(t.y)||(t.x=0,t.y=0),h.momentum.velocity.x=t.x,h.momentum.velocity.y=t.y,h.origAction===y.zoom){var o=h.momentum.velocity.y*i;k(-o*r.zoomScale/120,h)}else w.map().pan({x:h.momentum.velocity.x*i,y:h.momentum.velocity.y*i},void 0,"limited");h.handler&&w.map().scheduleAnimationFrame(h.handler)}else P()},h.handler&&w.map().scheduleAnimationFrame(h.handler))},this.destroy=function(){w._disconnectEvents(),w.map()&&g(w.map().node()).removeClass("highlight-focus"),w.map(null)},this.mouse=function(){return g.extend(!0,{},s)},this.keyboard=function(t){return void 0===t?g.extend(!0,{},r.keyboard||{}):w.options({keyboard:t})},this.state=function(){return g.extend(!0,{},h)},this.pause=function(t){return void 0===t?C:(C=!!t,w)},this.addAction=function(t,e){t&&t.action&&t.input&&(o.addAction(r.actions,t,e),r.map&&r.actions.some((function(t){return t.input.right}))&&(d.off("contextmenu.geojs"),d.on("contextmenu.geojs",(function(){return!1}))))},this.hasAction=function(t,e,n){return o.hasAction(r.actions,t,e,n)},this.removeAction=function(t,e,n){var i=o.removeAction(r.actions,t,e,n);return r.map&&!r.actions.some((function(t){return t.input.right}))&&d.off("contextmenu.geojs"),i},this.simulateEvent=function(t,e){var n,r,i,o,a;if(!w.map())return w;if("keyboard"===t&&u){var s={shiftKey:e.shift||e.shiftKey||!1,ctrlKey:e.ctrl||e.ctrlKey||!1,altKey:e.alt||e.altKey||!1,metaKey:e.meta||e.metaKey||!1,toString:function(){return e.keys},stopPropagation:function(){},preventDefault:function(){},simulated:!0};u.trigger(s,e.event)}else r=e.page||{},e.map&&(i=d.offset(),r.x=e.map.x+i.left,r.y=e.map.y+i.top),"left"===e.button?(o=1,a=1):"right"===e.button?(o=3,a=2):"middle"===e.button&&(o=2,a=4),e.modifiers=e.modifiers||[],e.wheelDelta=e.wheelDelta||{},n=g.Event(t,{pageX:r.x,pageY:r.y,which:o,buttons:a,altKey:e.modifiers.indexOf("alt")>=0,ctrlKey:e.modifiers.indexOf("ctrl")>=0,metaKey:e.modifiers.indexOf("meta")>=0,shiftKey:e.modifiers.indexOf("shift")>=0,center:e.center,rotation:e.touch?e.rotation||0:e.rotation,scale:e.touch?e.scale||1:e.scale,pointers:e.pointers,pointerType:e.pointerType,originalEvent:{deltaX:e.wheelDelta.x,deltaY:e.wheelDelta.y,deltaMode:e.wheelMode,preventDefault:function(){},stopPropagation:function(){},stopImmediatePropagation:function(){}}}),e.touch&&c?w._handleTouch(n):d.trigger(n),t.indexOf(".geojs")>=0&&g(document).trigger(n)},this._connectEvents(),this};r(s,i),t.exports=s},7098:function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a=n(5699),s=n(6837),u=n(2557),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},u.call(this,e);var o=n(5638),a=n(6618),s=n(4634),l=n(5866);l=l.__esModule?l.default:l;var c=this,h=this._init,f=null,d=a(),p=0,m=0,g=0;return this.featureType="marker",this._updateRangeTree=function(){if(!(d.timestamp()>=c.dataTime().timestamp()&&d.timestamp()>=c.timestamp())){var e,n,o=c.style.get("radius"),a=c.style.get("strokeWidth"),s=c.style.get("radiusIncludesStroke"),u=c.style.get("strokeOffset"),h=c.style.get("scaleWithZoom");n=c.position(),p=0,m=0,g=0,e=c.data().map((function(e,r){var i=n(e,r),l=h(e,r),c=o(e,r),f=a(e,r),d=Math.sign(u(e,r)),v=s(e,r),y=(v=void 0===v||v)?c+f*(d+1)/2:c+f,x=v?c+f*(d-1)/2:c;switch(l=t.scaleMode[l]||(l>=1&&l<=3?l:0)){case t.scaleMode.stroke:x>p&&(p=x),f>g&&(g=f);break;case t.scaleMode.fill:case t.scaleMode.all:y>m&&(m=y);break;default:y>p&&(p=y)}return[i.x,i.y]})),f=new l(e.length);var v,y=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(e);try{for(y.s();!(v=y.n()).done;){var x=r(v.value,2),_=x[0],b=x[1];f.add(_,b)}}catch(t){y.e(t)}finally{y.f()}f.finish(),d.modified()}},this._approximateMaxRadius=function(t){c._updateRangeTree();var e=Math.pow(2,t);return Math.max(p+g*e,m*e)},this.pointSearch=function(e,n){var r,i,o,a,s=[],u=[],l=[],h=c.gcs(),d=c.style.get("radius"),p=c.style.get("strokeWidth"),m=c.style.get("radiusIncludesStroke"),g=c.style.get("strokeOffset"),v=c.style.get("scaleWithZoom");if(!(o=c.data())||!o.length)return{found:[],index:[]};c._updateRangeTree();var y=c.layer().map();n=null===n?y.gcs():void 0===n?y.ingcs():n;var x=y.gcsToDisplay(e,n),_=y.zoom(),b=Math.pow(2,_),M=this._approximateMaxRadius(_);return a=[y.displayToGcs({x:x.x-M,y:x.y-M},h),y.displayToGcs({x:x.x+M,y:x.y-M},h),y.displayToGcs({x:x.x-M,y:x.y+M},h),y.displayToGcs({x:x.x+M,y:x.y+M},h)],r={x:Math.min(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.min(a[0].y,a[1].y,a[2].y,a[3].y)},i={x:Math.max(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.max(a[0].y,a[1].y,a[2].y,a[3].y)},(s=f.range(r.x,r.y,i.x,i.y)).sort((function(t,e){return t-e})),s.forEach((function(e){var n=o[e],r=d(o[e],e),i=v(o[e],e),a=g(o[e],e),s=i?p(o[e],e):0,f=m(n,e),_=(f=void 0===f||f)?r+s*(a-1)/2:r;r=_+s;var M,w,A,T=c.position()(n,e);switch(i=t.scaleMode[i]||(i>=1&&i<=3?i:0)){case t.scaleMode.fill:r=_*b+s;break;case t.scaleMode.stroke:r=_+s*b;break;case t.scaleMode.all:r*=b}r&&(A=r*r,(M=(T=y.gcsToDisplay(T,h)).x-x.x)*M+(w=T.y-x.y)*w<=A&&(u.push(n),l.push(e)))})),{found:u,index:l}},this.polygonSearch=function(e,n,r){var i,o,a,u,l=c.gcs(),h=[],d=[],p={},m=c.layer().map(),g=c.data(),v=c.style.get("radius"),y=c.style.get("strokeWidth"),x=c.style.get("radiusIncludesStroke"),_=c.style.get("strokeOffset"),b=c.style.get("scaleWithZoom"),M=m.zoom(),w=Math.pow(2,M),A=this._approximateMaxRadius(M);return r=null===r?m.gcs():void 0===r?m.ingcs():r,e.outer||(e={outer:e,inner:[]}),e.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((n=n||{}).partial=n.partial||!1,(e={outer:m.gcsToDisplay(e.outer,r),inner:(e.inner||[]).map((function(t){return m.gcsToDisplay(t,r)}))}).outer.forEach((function(t){o||(o={x:t.x,y:t.y},a={x:t.x,y:t.y}),t.x<o.x&&(o.x=t.x),t.x>a.x&&(a.x=t.x),t.y<o.y&&(o.y=t.y),t.y>a.y&&(a.y=t.y)})),c._updateRangeTree(),u=[m.displayToGcs({x:o.x-A,y:o.y-A},l),m.displayToGcs({x:a.x+A,y:o.y-A},l),m.displayToGcs({x:a.x+A,y:a.y+A},l),m.displayToGcs({x:o.x-A,y:a.y+A},l)],o={x:Math.min(u[0].x,u[1].x,u[2].x,u[3].x),y:Math.min(u[0].y,u[1].y,u[2].y,u[3].y)},a={x:Math.max(u[0].x,u[1].x,u[2].x,u[3].x),y:Math.max(u[0].y,u[1].y,u[2].y,u[3].y)},(i=f.range(o.x,o.y,a.x,a.y)).sort((function(t,e){return t-e})),i.forEach((function(r){var i=g[r],o=c.position()(i,r),a=v(g[r],r),u=b(g[r],r),f=_(g[r],r),M=u?y(g[r],r):0,A=x(i,r),T=(A=void 0===A||A)?a+M*(f-1)/2:a;switch(a=T+M,u=t.scaleMode[u]||(u>=1&&u<=3?u:0)){case t.scaleMode.fill:a=T*w+M;break;case t.scaleMode.stroke:a=T+M*w;break;case t.scaleMode.all:a*=w}if(a){o=m.gcsToDisplay(o,l);var C=s.distanceToPolygon2d(o,e);(C>=a||C>=0&&"center"===n.partial||C>=-a&&n.partial&&"center"!==n.partial)&&(h.push(i),d.push(r),p[r]={partial:C<a,distance:C})}})),{found:h,index:d,extra:p})},this._init=function(e){return e=o.extend(!0,{},{style:o.extend({},{radius:6.25,radiusIncludesStroke:!0,strokeColor:{r:.851,g:.604,b:0},strokeOffset:-1,strokeOpacity:1,strokeWidth:1.25,fillColor:{r:1,g:.839,b:.439},fillOpacity:.8,symbol:0,symbolValue:0,rotation:0,scaleWithZoom:t.scaleMode.none,rotateWithMap:!1},e&&void 0===e.style?{}:e.style)},e),h.call(c,e),c},c};l.create=function(t,e){"use strict";return(e=e||{}).type="marker",s.create(t,e)},l.capabilities={feature:"marker"},l.primitiveShapes=u.primitiveShapes,l.symbols={circle:0,ellipse:0,flowerBase:1,flowerMax:16,triangle:16,diamond:17,starBase:17,starMax:16,square:32,rectangle:32,crossBase:33,crossMax:16,oval:48,jackBase:49,jackMax:16,drop:64,dropBase:65,dropMax:16,arrow:80,arrowBase:81,arrowMax:16,length:96},["flower","star","cross","jack","drop","arrow"].forEach((function(t){for(var e=2;e<=l.symbols[t+"Max"];e+=1)l.symbols[t+e]=l.symbols[t+"Base"]-2+e})),l.scaleMode={none:0,fill:1,stroke:2,all:3},a(l,u),t.exports=l},9146:function(t,e,n){var r=n(5699),i=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),o=n(4634);e=e||{},i.call(this,e);var a=this,s=this._init,u={};return this.featureType="mesh",this.mesh=function(t,e){if(void 0===t)return u;if("string"==typeof t&&void 0===e)return u[t];if(void 0===e){var n=r.extend({},{gridWidth:function(){return t.gridHeight?Math.floor(a.data().length/t.gridHeight):Math.floor(Math.sqrt(a.data().length))},gridHeight:function(){return t.gridWidth?Math.floor(a.data().length/t.gridWidth):Math.floor(Math.sqrt(a.data().length))}},u,t);u=n}else u[t]=e;return a.modified(),a},this.mesh.get=function(t){if(void 0===t){var e,n={};for(e in u)u.hasOwnProperty(e)&&(n[e]=a.mesh.get(e));return n}return o.ensureFunction(u[t])},this.position=function(t){return void 0===t?a.style("position"):(a.style("position",t),a.dataTime().modified(),a.modified(),a)},this._createMesh=function(t,e){t=t||{},e=e||{};var n,r,i,o,s,u,l,c,h,f,d,p,m,g,v,y,x=a.data(),_=a.position(),b=a.mesh.get("elements")(x),M=a.mesh.get("elementPacking")(x),w=a.mesh.get("gridWidth")(x),A=a.mesh.get("gridHeight")(x),T=a.mesh.get("wrapLongitude")(x),C=a.mesh.get("x0")(x),E=a.mesh.get("y0")(x),k=a.mesh.get("dx")(x),S=a.mesh.get("dy")(x),P=w,O={shape:"square",elements:[],elementIndex:[]};if(b){var L=b.length&&Array.isArray(b[0]);if("square"===M||"triangle"!==M&&(!L&&!(b.length%4)&&b.length%3||L&&4===b[0].length))if(O.shape="square",L)for(n=0;n<b.length;n+=1)O.elements.push(b[n][0]),O.elements.push(b[n][1]),O.elements.push(b[n][3]),O.elements.push(b[n][2]),O.elements.push(b[n][3]),O.elements.push(b[n][1]),O.elementIndex.push(n),O.elementIndex.push(n);else for(n=i=0;n<b.length-3;n+=4,i+=1)O.elements.push(b[n]),O.elements.push(b[n+1]),O.elements.push(b[n+3]),O.elements.push(b[n+2]),O.elements.push(b[n+3]),O.elements.push(b[n+1]),O.elementIndex.push(i),O.elementIndex.push(i);else if(O.shape="triangle",L)for(n=0;n<b.length;n+=1)O.elements.push(b[n][0]),O.elements.push(b[n][1]),O.elements.push(b[n][2]),O.elementIndex.push(n);else for(O.elements=b.slice(0,b.length-b.length%3),n=i=0;n<b.length-2;n+=3,i+=1)O.elementIndex.push(i);u=x.length,c=!0}else{if(Object.keys(t).length?w*A>x.length&&(A=Math.floor(x.length/w)):Object.keys(e).length&&(w-1)*(A-1)>x.length&&(A=Math.floor(x.length/(w-1))+1),T=!(void 0!==T&&!T),!(c=null==C||null==E||!k||!S)&&T&&(C<-180||C>180||C+k*(w-1)<-180||C+k*(w-1)>180)&&k>-180&&k<180&&k*(w-1)<360.0001){for(p=[],m=[],n=0;n<w;n+=1){for(v=C+n*k;v<-180;)v+=360;for(;v>180;)v-=360;n&&Math.abs(v-p[p.length-1])>180&&(v>p[p.length-1]?(p.push(v-360),p.push(p[p.length-2]+360),m.push(n),m.push(n+1)):(p.push(v+360),p.push(p[p.length-2]-360),m.push(n),m.push(n+1)),g=n),p.push(v),m.push(n)}if(w+=2,Math.abs(Math.abs(P*k)-360)<.01){for(w+=1,v=C+P*k;v<-180;)v+=360;for(;v>180;)v-=360;p.push(v),m.push(0)}}if(u=w*A,void 0!==g)for(O.index=new Array(u),n=0;n<u;n+=1)y=n-(i=Math.floor(n/w))*w,(y+=y>g?-2:0)>=P&&(y-=P),y+=i*P,O.index[n]=y;for(i=s=0;i<A-1;i+=1,s+=1)for(n=0;n<w-1;n+=1,s+=1)n!==g&&(O.elements.push(s),O.elements.push(s+1),O.elements.push(s+w),O.elements.push(s+w+1),O.elements.push(s+w),O.elements.push(s+1),O.elementIndex.push(i*(w-1)+(m?m[n]:n)),O.elementIndex.push(i*(w-1)+(m?m[n]:n)))}O.verticesPerElement="triangle"===O.shape?3:6;var R=O.verticesPerElement;if(e.used){var I=new Array(O.elementIndex[O.elementIndex.length-1]+1);for(n=0;n<I.length;n+=1)I[n]=e.used(x[n],n);for(n=0;n<O.elementIndex.length&&I[O.elementIndex[n]];n+=1);if(n<O.elementIndex.length){for(i=n;n<O.elementIndex.length;n+=1)if(I[O.elementIndex[n]]){for(O.elementIndex[i]=O.elementIndex[n],o=0;o<3;o+=1)O.elements[3*i+o]=O.elements[3*n+o];i+=1}O.elements.splice(3*i),O.elementIndex.splice(i)}}if(t.used){for(n=0;n<u&&(s=O.index?O.index[n]:n,t.used(x[s],s));n+=1);if(n!==u){l=n;var D=new Array(u);for(i=0;i<l;i+=1)D[i]=i;if(D[l]=-1,!O.index)for(O.index=new Array(x.length),i=0;i<x.length;i+=1)O.index[i]=i;for(n=l+1;n<u;n+=1)s=O.index[n],t.used(x[s],s)?(D[n]=l,O.index[l]=O.index[n],l+=1):D[n]=-1;for(O.index.splice(l),n=o=0;n<O.elements.length;n+=R){for(i=0;i<R&&!(D[O.elements[n+i]]<0);i+=1)O.elements[o+i]=D[O.elements[n+i]];i===R&&(O.elementIndex[Math.floor(o/3)]=O.elementIndex[Math.floor(n/3)],6===R&&(O.elementIndex[Math.floor(o/3)+1]=O.elementIndex[Math.floor(n/3)+1]),o+=R)}O.elements.splice(o),O.elementIndex.splice(Math.floor(o/3)),u=l}}if(e.used&&void 0===g){var F=new Array(u),N=O.index;for(O.index=[],n=0;n<O.elements.length;n+=1)void 0===F[o=O.elements[n]]&&(F[o]=O.index.length,O.index.push(N?N[o]:o)),O.elements[n]=F[o];u=O.index.length}for(f in O.pos=new Array(3*u),t)"used"!==f&&t.hasOwnProperty(f)&&(O[f]=new Array(u));for(n=r=0;n<u;n+=1,r+=3)for(f in h=x[s=O.index?O.index[n]:n],c?(d=_(h,s),O.pos[r]=d.x,O.pos[r+1]=d.y,O.pos[r+2]=d.z||0):(O.pos[r]=void 0===g?C+k*(s%w):p[n%w],O.pos[r+1]=E+S*Math.floor(s/w),O.pos[r+2]=0,d={x:O.pos[r],y:O.pos[r+1],z:O.pos[r+2]}),t)"used"!==f&&t.hasOwnProperty(f)&&(O[f][n]=t[f](h,s,d));for(f in e)if("used"!==f&&e.hasOwnProperty(f)){var j=e[f];for(O[f]=new Array(O.elementIndex.length),n=0;n<O.elementIndex.length;n+=1)h=x[s=O.elementIndex[n]],O[f][n]=j(h,s)}return O.numVertices=u,O.numElements=O.elements.length/O.verticesPerElement,O},this._init=function(t){s.call(a,t),t=t||{};var e=r.extend({},{position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t}},t.style||{});a.mesh(t.mesh||{}),a.style(e)},this};r(o,i),t.exports=o},3737:function(t,e,n){var r=n(5699),i=n(6618),o=0,a=function t(){"use strict";if(!(this instanceof t))return new t;var e=n(4634),r=this,a=++o,s={},u=[],l=0;return this.onIdle=function(t){return l?u.push(t):t(),r},Object.defineProperty(this,"idle",{get:function(){return!l},configurable:!0}),Object.defineProperty(this,"_promises",{get:function(){return l},configurable:!0}),this.addPromise=function(t){function e(){t._geojsTracked&&t._geojsTracked[a]&&(l-=1,delete t._geojsTracked[a]),l||u.splice(0,u.length).forEach((function(t){t()}))}return t._geojsTracked||(t._geojsTracked={}),t._geojsTracked[a]||(t._geojsTracked[a]=!0,l+=1),t.always?t.always(e):t.then(e,e),r},this.removePromise=function(t){return t._geojsTracked&&t._geojsTracked[a]&&(l-=1,delete t._geojsTracked[a],l||u.splice(0,u.length).forEach((function(t){t()}))),r},this.geoOn=function(t,n){return Array.isArray(t)?(t.forEach((function(t){r.geoOn(t,n)})),r):e.isFunction(n)?(s.hasOwnProperty(t)||(s[t]=[]),s[t].push(n),r):(console.warn("Handler for "+t+" is not a function",n,r),r)},this.geoOnce=function(t,e){var n=function n(i){r.geoOff(t,n),e.call(r,i)};return r.geoOn(t,n),n},this.geoIsOn=function(t,e){return Array.isArray(t)?t.some((function(t){return r.geoIsOn(t,e)})):(s[t]||[]).some((function(t){return t===e||void 0===e}))},this.geoTrigger=function(t,e){return Array.isArray(t)?(t.forEach((function(t){r.geoTrigger(t,e)})),r):((e=e||{}).event=t,s.hasOwnProperty(t)&&s[t].forEach((function(n){try{n.call(r,e)}catch(e){console.warn("Event handler for "+t+" threw an error",e)}})),r)},this.geoOff=function(t,e){if(void 0===t&&(s={},u=[],l=0,a=++o),Array.isArray(t))return t.forEach((function(t){r.geoOff(t,e)})),r;if(e){if(Array.isArray(e))return e.forEach((function(e){r.geoOff(t,e)})),r}else s[t]=[];return s.hasOwnProperty(t)&&(s[t]=s[t].filter((function(t){return t!==e}))),r},this._eventHandlers=function(){return s},this._exit=function(){r.geoOff()},i.call(this),this.modified(),this};r(a,i),t.exports=a},8622:function(t,e,n){var r=n(5638),i=n(5699),o=n(1940),a=n(4647),s=n(5017),u=function t(e){var i=n(4665);if(!(this instanceof t))return new t(e);void 0!==(e=e||{}).mapOpacity&&void 0===e.opacity&&((e=r.extend({},e)).opacity=e.mapOpacity),e=r.extend(!0,{},this.constructor.defaults,t.tileSources[this.constructor.defaults.source]||{},t.tileSources[e.source]||{},{name:""},e),o.call(this,e);var a=this;this.mapOpacity=this.opacity,this._getTile=function(t,e){var n=e||t;return i({index:t,size:{x:a._options.tileWidth,y:a._options.tileHeight},queue:a._queue,overlap:a._options.tileOverlap,scale:a._options.tileScale,url:a._options.url.call(a,n.x,n.y,n.level||0,a._options.subdomains),crossDomain:a._options.crossDomain})},this.source=function(e){if(void 0!==e)return t.tileSources[e]&&(a.url(t.tileSources[e].url),a.subdomains(t.tileSources[e].subdomains||"abc"),a.attribution(t.tileSources[e].attribution||""),a._options.maxLevel=t.tileSources[e].maxLevel||18,a._options.minLevel=t.tileSources[e].minLevel||0),a;for(var n in t.tileSources)if(t.tileSources[n].url===a.url())return n}};u.defaults=r.extend({},o.defaults,{tileOffset:function(t){var e=256*Math.pow(2,t-1);return{x:e,y:e}},url:"",source:"osm"});var l='Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',c='<a href="https://carto.com"> Carto</a> Contributors <a href="https://www.openstreetmap.org/"> OpenStreetMap</a>';u.tileSources={"dark-matter-with-labels":{url:" https://{s}.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}.png",attribution:c,name:"Carto Dark Matter With Labels",minLevel:0,maxLevel:18},"dark-matter-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/dark_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Dark Matter Without Labels",minLevel:0,maxLevel:18},"nationalmap-relief":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Shaded Relief",minLevel:0,maxLevel:16},"nationalmap-satellite":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Satellite",minLevel:0,maxLevel:16},"nationalmap-satellite-topo":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Satellite and Topo",minLevel:0,maxLevel:16},"nationalmap-topo":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Topo",minLevel:0,maxLevel:16},osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'Tile data &copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',name:"OpenStreetMap",subdomains:"abc",minLevel:0,maxLevel:19},"positron-with-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png",attribution:c,name:"Carto Positron With Labels",minLevel:0,maxLevel:18},"positron-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/light_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Positron Without Labels",minLevel:0,maxLevel:18},"stamen-terrain":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png",attribution:l,name:"Stamen Terrain",subdomains:"abcd",minLevel:0,maxLevel:14},"stamen-terrain-background":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}.png",attribution:l,name:"Stamen Terrain Background",subdomains:"abcd",minLevel:0,maxLevel:14},"stamen-toner":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png",attribution:l,name:"Stamen Toner",subdomains:"abcd",minLevel:0,maxLevel:20},"stamen-toner-lite":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png",attribution:l,name:"Stamen Toner Lite",subdomains:"abcd",minLevel:0,maxLevel:20},"voyager-with-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager With Labels",minLevel:0,maxLevel:18},"voyager-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager Without Labels",minLevel:0,maxLevel:18}},i(u,o),a.registerLayer("osm",u,[s.capabilities.image]),t.exports=u},6565:function(t,e,n){var r=n(5638),i=n(5699),o=n(6837),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n=this,i=this._init;return this.featureType="path",this.position=function(t){return void 0===t?n.style("position"):(t!==n.style("position")&&(n.style("position",t),n.dataTime().modified(),n.modified()),n)},this._init=function(t){i.call(n,t);var e=r.extend({},{strokeWidth:1,strokeColor:{r:1,g:1,b:1},position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),n.style(e),e.position&&n.position(e.position),n.dataTime().modified(),n},this._init(e),this};i(a,o),t.exports=a},6374:function(t,e,n){var r=n(5638),i=n(5699),o=n(6837),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n,i=this,s=this._update,u=this._init;return this.featureType="pixelmap",this.position=function(t){return void 0===t?i.style("position"):(t!==i.style("position")&&(i.style("position",t),i.dataTime().modified(),i.modified()),i)},this.url=function(t){return void 0===t?i.style("url"):(t!==i.style("url")&&(i.m_srcImage=i.m_info=void 0,i.style("url",t),i.dataTime().modified(),i.modified()),i)},this.color=function(t){return void 0===t?i.style("color"):(t!==i.style("color")&&(i.style("color",t),i.dataTime().modified(),i.modified()),i)},this.indexModified=function(t,e){if(void 0===t){var r=n;return"clear"===e&&(n=void 0),r}return i.modified(),void 0===n&&(n=[t,t]),t<n[0]&&(n[0]=t),(e||t)>n[1]&&(n[1]=e||t),i},this._update=function(){return s.call(i),(i.buildTime().timestamp()<=i.dataTime().timestamp()||i.updateTime().timestamp()<i.timestamp())&&i._build(),i.updateTime().modified(),i},this.maxIndex=function(){if(i.m_info){if(void 0===i.m_info.maxIndex)for(var t in i.m_info.maxIndex=0,i.m_info.mappedColors)i.m_info.mappedColors.hasOwnProperty(t)&&(i.m_info.maxIndex=Math.max(i.m_info.maxIndex,t));return i.m_info.maxIndex}},this._computePixelmap=function(){},this._build=function(){if(i.m_srcImage)i.m_info&&i._computePixelmap();else{var t=i.style.get("url")();if(a.isReadyImage(t))i.m_srcImage=t,i._computePixelmap();else if(t){var e,n,o=r.Deferred();t instanceof Image?(i.m_srcImage=t,e=t.onload,n=t.onerror):(i.m_srcImage=new Image,t.indexOf(":")>=0&&t.indexOf("/")===t.indexOf(":")+1&&(i.m_srcImage.crossOrigin=i.style.get("crossDomain")()||"anonymous")),i.m_srcImage.onload=function(){e&&e.apply(i,arguments),i.style.get("url")()===t&&(i.m_info=void 0,i._computePixelmap()),o.resolve()},i.m_srcImage.onerror=function(){n&&n.apply(i,arguments),o.reject()},o.promise(i),i.layer().addPromise(i),t instanceof Image||(i.m_srcImage.src=t)}}return i.buildTime().modified(),i},this._init=function(t){t=t||{},u.call(i,t);var e=r.extend({},{color:function(t,e){return{r:(255&e)/255,g:(e>>8&255)/255,b:(e>>16&255)/255,a:1}},position:a.identityFunction},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),void 0!==t.url&&(e.url=t.url),void 0!==t.color&&(e.color=t.color),i.style(e),i.dataTime().modified(),t.quadFeature&&(i.m_srcImage=!0,i._computePixelmap()),i},this};s.create=function(t,e){"use strict";return(e=e||{}).type="pixelmap",o.create(t,e)},s.capabilities={feature:"pixelmap",lookup:"pixelmap.lookup"},i(s,o),t.exports=s},809:function(t,e,n){var r=n(5638),i=n(5699),o=n(1940),a=n(4647),s=n(5017),u=n(6374),l=function t(e){var i,a=n(4665);if(!(this instanceof t))return new t(e);(e=e||{}).data&&(i=e.data,delete e.data),e=r.extend(!0,{},this.constructor.defaults,e),o.call(this,e);var s,u=this._init,l=this;return this._getTile=function(t,e){var n=e||t;return a({index:t,size:{x:l._options.tileWidth,y:l._options.tileHeight},queue:l._queue,overlap:l._options.tileOverlap,scale:l._options.tileScale,url:l._options.url.call(l,n.x,n.y,n.level||0,l._options.subdomains),crossDomain:l._options.crossDomain})},this._init=function(){u.apply(l,arguments),l.nearestPixel(!0,!0);var t={quadFeature:l.features()[0]};e.style&&(t.style=e.style),e.color&&(t.color=e.color),s=l.createFeature("pixelmap",t),i&&s.data(i),l.style=s.style,l.data=s.data,l.indexModified=s.indexModified;var n=l.dataTime().modified;return l.dataTime().modified=function(){return s.dataTime().modified(),n()},["modified","geoOn","geoOff","geoOnce"].forEach((function(t){var e=l[t];l[t]=function(){return Array.isArray(arguments[0])||s[t].apply(this,arguments),e.apply(this,arguments)}})),l},l};l.defaults=r.extend({},o.defaults,{features:[s.capabilities.image,u.capabilities.lookup],tileOffset:function(t){var e=256*Math.pow(2,t-1);return{x:e,y:e}},url:""}),i(l,o),a.registerLayer("pixelmap",l,[s.capabilities.image]),t.exports=l},2557:function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a=n(5699),s=n(6837),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},s.call(this,e);var o=n(5638),a=n(6618),u=n(9808),l=n(5108),c=n(4634),h=n(5866);h=h.__esModule?h.default:h;var f=this,d=this._init,p=null,m=a(),g=this.data,v=0,y=e.clustering,x=null,_=[],b=null,M=!1;return this.featureType="point",this.clustering=function(t){return void 0===t?y:(y&&!t?(x=null,y=!1,g(_)):t&&y!==t&&(y=t,f._clusterData()),f)},this._clusterData=function(){if(y){var t=!0===y?{radius:10}:y,e=f.position(),n=f.layer().map(),r=n.gcsToDisplay(n.center(void 0,null),null),i=n.displayToGcs(r,f.gcs()),a=n.displayToGcs({x:r.x+t.radius,y:r.y},f.gcs()),s=Math.pow(Math.pow(a.y-i.y,2)+Math.pow(a.x-i.x,2),.5),l=n.zoom(),h=s*Math.pow(2,l);t=o.extend({},t,{radius:h}),x=new u(t),_.forEach((function(t,n){var r=c.normalizeCoordinates(e(t,n));r.index=n,x.addPoint(r)})),b=null,f._handleZoom(n.zoom())}},this._handleZoom=function(t){var e=Math.floor(t);if(y&&e!==b){b=e;var n=x.points(e).map((function(t){return _[t.index]}));x.clusters(e).forEach((function(t){t.__cluster=!0,t.__data=[],t.obj.each((function(e){t.__data.push(_[e.index])})),n.push(t)})),M=!0,f.data(n)}},this.position=function(t){if(void 0===t)return f.style("position");var e=c.isFunction(t);return f.style("position",(function(n,r){return null!=n&&n.__cluster?n:e?t(n,r):t})),f.dataTime().modified(),f.modified(),f},this._updateRangeTree=function(){if(!(m.timestamp()>=f.dataTime().timestamp()&&m.timestamp()>=f.timestamp())){var t,e,n=f.style.get("radius"),o=f.style.get("stroke"),a=f.style.get("strokeWidth");e=f.position(),v=0,t=f.data().map((function(t,r){var i=e(t,r);return v=Math.max(v,n(t,r)+(o(t,r)?a(t,r):0)),[i.x,i.y]})),p=new h(t.length);var s,u=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(t);try{for(u.s();!(s=u.n()).done;){var l=r(s.value,2),c=l[0],d=l[1];p.add(c,d)}}catch(t){u.e(t)}finally{u.f()}p.finish(),m.modified()}},this.pointSearch=function(t,e){var n,r,i,o,a,s,u=[],l=[],c=[],h=f.gcs(),d=f.style.get("fill"),m=f.style.get("stroke"),g=f.style.get("strokeWidth"),y=f.style.get("radius");return(i=f.data())&&i.length?(f._updateRangeTree(),o=f.layer().map(),a=o.gcsToDisplay(t,e),s=[o.displayToGcs({x:a.x-v,y:a.y-v},h),o.displayToGcs({x:a.x+v,y:a.y-v},h),o.displayToGcs({x:a.x-v,y:a.y+v},h),o.displayToGcs({x:a.x+v,y:a.y+v},h)],n={x:Math.min(s[0].x,s[1].x,s[2].x,s[3].x),y:Math.min(s[0].y,s[1].y,s[2].y,s[3].y)},r={x:Math.max(s[0].x,s[1].x,s[2].x,s[3].x),y:Math.max(s[0].y,s[1].y,s[2].y,s[3].y)},(u=p.range(n.x,n.y,r.x,r.y)).sort((function(t,e){return t-e})),u.forEach((function(t){var e=i[t],n=m(i[t],t);if(n||d(i[t],t)){var r,s,u,p,v=f.position()(e,t);u=y(i[t],t),(u+=n?g(i[t],t):0)&&(p=u*u,(r=(v=o.gcsToDisplay(v,h)).x-a.x)*r+(s=v.y-a.y)*s<=p&&(l.push(e),c.push(t)))}})),{found:l,index:c}):{found:[],index:[]}},this.polygonSearch=function(t,e,n){var r,i,o,a,s=f.gcs(),u=[],l=[],h={},d=f.layer().map(),m=f.data(),g=f.style.get("fill"),y=f.style.get("stroke"),x=f.style.get("strokeWidth"),_=f.style.get("radius");return t.outer||(t={outer:t,inner:[]}),t.outer.length<3||!m||!m.length?{found:[],index:[],extra:{}}:((e=e||{}).partial=e.partial||!1,(t={outer:d.gcsToDisplay(t.outer,n),inner:(t.inner||[]).map((function(t){return d.gcsToDisplay(t,n)}))}).outer.forEach((function(t){i||(i={x:t.x,y:t.y},o={x:t.x,y:t.y}),t.x<i.x&&(i.x=t.x),t.x>o.x&&(o.x=t.x),t.y<i.y&&(i.y=t.y),t.y>o.y&&(o.y=t.y)})),f._updateRangeTree(),a=[d.displayToGcs({x:i.x-v,y:i.y-v},s),d.displayToGcs({x:o.x+v,y:i.y-v},s),d.displayToGcs({x:o.x+v,y:o.y+v},s),d.displayToGcs({x:i.x-v,y:o.y+v},s)],i={x:Math.min(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.min(a[0].y,a[1].y,a[2].y,a[3].y)},o={x:Math.max(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.max(a[0].y,a[1].y,a[2].y,a[3].y)},(r=p.range(i.x,i.y,o.x,o.y)).sort((function(t,e){return t-e})),r.forEach((function(n){var r=m[n],i=y(m[n],n);if(i||g(m[n],n)){var o=f.position()(r,n),a=_(m[n],n);if(a+=i?x(m[n],n):0){o=d.gcsToDisplay(o,s);var p=c.distanceToPolygon2d(o,t);(p>=a||p>=0&&"center"===e.partial||p>=-a&&e.partial&&"center"!==e.partial)&&(u.push(r),l.push(n),h[n]={partial:p<a,distance:p})}}})),{found:u,index:l,extra:h})},this.data=function(t){return void 0===t?g():(M||(_=t),y&&!M?f._clusterData():g(t),M=!1,f)},this._init=function(t){t=t||{},d.call(f,t);var e=o.extend(!0,{},{radius:5,stroke:!0,strokeColor:{r:.851,g:.604,b:0},strokeWidth:1.25,strokeOpacity:1,fillColor:{r:1,g:.839,b:.439},fill:!0,fillOpacity:.8,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){return t.length>=3?t.slice(0,3):[0,0,0]}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),f.style(e),e.position&&f.position(e.position),f.dataTime().modified(),f.geoOn(l.zoom,(function(t){f._handleZoom(t.zoomLevel)})),f},f};u.create=function(t,e){"use strict";return(e=e||{}).type="point",s.create(t,e)},u.capabilities={feature:"point",stroke:"point.stroke"},u.primitiveShapes={auto:"auto",sprite:"sprite",triangle:"triangle",square:"square"},a(u,s),t.exports=u},4343:function(t,e,n){var r=n(5638),i=n(5699),o=n(6837),a=n(6853),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i,s=n(4634),u=this,l=this._init,c=this._exit,h=this.data,f=this.draw,d=this.modified,p=this.style,m=[];function g(t,e,n){var r=u.gcs(),i=u.layer().map().gcs();return t=t||u.data(),e=e||u.style.get("position"),n=n||u.style.get("polygon"),t.map((function(t,o){var s=n(t,o);if(s){var l,c,h,f,d,p,m,g,v,y;for(f=s.outer||(Array.isArray(s)?s:[]),l=new Array(f.length),d=0;d<f.length;d+=1)l[d]=e.call(u,f[d],d,t,o),p=l[d].x,m=l[d].y,d?(p<h.min.x&&(h.min.x=p),m<h.min.y&&(h.min.y=m),p>h.max.x&&(h.max.x=p),m>h.max.y&&(h.max.y=m)):h={min:{x:p,y:m},max:{x:p,y:m}};for(c=(s.inner||[]).map((function(n){f=n||[];var r=new Array(f.length);for(d=0;d<f.length;d+=1)r[d]=e.call(u,f[d],d,t,o);return r})),g=a.transformCoordinates(r,i,l),v=c.map((function(t){return a.transformCoordinates(r,i,t)})),d=0;d<g.length;d+=1)p=g[d].x,m=g[d].y,d?(p<y.min.x&&(y.min.x=p),m<y.min.y&&(y.min.y=m),p>y.max.x&&(y.max.x=p),m>y.max.y&&(y.max.y=m)):y={min:{x:p,y:m},max:{x:p,y:m}};return{outer:l,inner:c,range:h,mapouter:g,mapinner:v,maprange:y}}}))}function v(t){return s.isFunction(t)?function(e){return t(e[0],e[1],e[2],e[3])}:t}return this.featureType="polygon",this._subfeatureStyles={fillColor:!0,fillOpacity:!0,lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.data=function(t){var e=h(t);return void 0!==t&&(m=g(),u._checkForStroke()),e},this.polygonCoordinates=function(){return m},this.polygon=function(t){return void 0===t?u.style("polygon"):(u.style("polygon",t),u.dataTime().modified(),u.modified(),m=g(),u)},this.position=function(t){return void 0===t?u.style("position"):(u.style("position",t),u.dataTime().modified(),u.modified(),m=g(),u)},this.pointSearch=function(t,e){var n=[],r=[],o={},l=u.data(),c=u.layer().map();e=null===e?c.gcs():void 0===e?c.ingcs():e;var h=a.transformCoordinates(e,c.gcs(),t);(m.forEach((function(t,e){s.pointInPolygon(h,t.mapouter,t.mapinner,t.maprange)&&(r.push(e),o[e]=!0,n.push(l[e]))})),i)&&i.pointSearch(t).found.forEach((function(t){t.length&&4===t[0].length&&!o[t[0][3]]&&(r.push(t[0][3]),o[t[0][3]]=!0,n.push(l[t[0][3]]))}));return{index:r,found:n}},this.polygonSearch=function(t,e,n){var r,o,l=u.data(),c=[],h=[],f={},d=t,p={},g=u.layer().map();if(n=null===n?g.gcs():void 0===n?g.ingcs():n,t.outer||(t={outer:t,inner:[]}),!l||!l.length||t.outer.length<3)return{found:h,index:c,extra:f};if((e=e||{}).partial=e.partial||!1,(t={outer:a.transformCoordinates(n,g.gcs(),t.outer),inner:(t.inner||[]).map((function(t){return a.transformCoordinates(n,g.gcs(),t)}))}).outer.forEach((function(t){r||(r={x:t.x,y:t.y},o={x:t.x,y:t.y}),t.x<r.x&&(r.x=t.x),t.x>o.x&&(o.x=t.x),t.y<r.y&&(r.y=t.y),t.y>o.y&&(o.y=t.y)})),m.forEach((function(n,i){if(!(!n.mapouter.length||n.maprange&&(n.maprange.max.x<r.x||n.maprange.min.x>o.x||n.maprange.max.y<r.y||n.maprange.min.y>o.y))){for(var a,u,d=-1;d<n.mapinner.length&&!u;d+=1)for(var m=d<0?n.mapouter:n.mapinner[d],g=0,v=m.length,y=v-1;g<v;y=g,g+=1){var x=s.distanceToPolygon2d(m[g],t);if(x*s.distanceToPolygon2d(m[y],t)<0){u=!0;break}if(s.crossedLineSegmentPolygon2d(m[g],m[y],t)){u=!0;break}x>0&&(a=!0)}a||u||!s.pointInPolygon(t.outer[0],n.mapouter,n.mapinner,n.maprange)||(u=!0),(!e.partial&&a&&!u||e.partial&&(a||u))&&(c.push(i),h.push(l[i]),f[i]={partial:u},p[i]=!0)}})),i){var v=i.polygonSearch(d,e);v.found.forEach((function(t,e){t.length&&4===t[0].length&&(p[t[0][3]]||(c.push(t[0][3]),p[t[0][3]]=!0,h.push(l[t[0][3]]),f[v.index[e]]={partial:!1}),v.extra[v.index[e]].partial&&(f[t[0][3]].partial=!0))}))}return{found:h,index:c,extra:f}},this.style=function(t,e){var n=p.apply(u,arguments);return void 0===t||"string"==typeof t&&void 0===e||u._checkForStroke(),n},this.style.get=p.get,this._getLoopData=function(t,e,n){var r,i=[];for(r=0;r<n.length;r+=1)i.push([n[r],r,t,e]);return i},this._checkForStroke=function(){if(!1!==p("stroke")){if(u.layer()){i||(i=u.layer().createFeature("line",{selectionAPI:!1,gcs:u.gcs(),visible:u.visible(void 0,!0)}),u.dependentFeatures([i]));var t,e=u.style();if(s.isFunction(e.stroke)||!e.stroke){var n=u.style.get("stroke"),r=u.style.get("strokeOpacity");t=function(t){return n(t[2],t[3])?r(t[0],t[1],t[2],t[3]):0}}else t=v(e.strokeOpacity);i.style({antialiasing:v(e.antialiasing),closed:!0,lineCap:v(e.lineCap),lineJoin:v(e.lineJoin),miterLimit:v(e.miterLimit),strokeWidth:v(e.strokeWidth),strokeStyle:v(e.strokeStyle),strokeColor:v(e.strokeColor),strokeOffset:v(e.strokeOffset),strokeOpacity:t,uniformLine:v(e.uniformPolygon)});var o=u.data(),a=u.style("position");if(o!==i._lastData||a!==i._lastPosVal){var l,c,h,f=[],d=u.style.get("position"),m=u.style.get("polygon");for(l=0;l<o.length;l+=1)(c=m(o[l],l))&&(h=c.outer||(Array.isArray(c)?c:[])).length>=2&&(f.push(u._getLoopData(o[l],l,h)),c.inner&&c.inner.forEach((function(t){t.length>=2&&f.push(u._getLoopData(o[l],l,t))})));i.position((function(t,e,n,r){return d(t[0],t[1],t[2],t[3])})),i.data(f),i._lastData=o,i._lastPosVal=a}}}else i&&u.layer()&&(u.layer().deleteFeature(i),i=null,u.dependentFeatures([]))},this.draw=function(){var t=f();return i&&i.draw(),t},this.modified=function(){var t=d();return i&&i.modified(),t},this.rdpSimplifyData=function(t,e,n,r,i){var o=u.layer().map(),l=o.gcs(),c=u.gcs(),h=g(t,n,r);return void 0===e&&(e=.5*o.unitsPerPixel(o.zoom())),h=h.map((function(t){return{outer:a.transformCoordinates(c,l,t.outer),inner:t.inner.map((function(t){return a.transformCoordinates(c,l,t)}))}})),t=t.map((function(t,n){var r=h[n],i={};for(var o in t)!t.hasOwnProperty(o)||Array.isArray(t)&&o>=0&&o<t.length||(i[o]=t[o]);if(r&&r.outer.length>=3)if(i.inner=r.inner.filter((function(t){return t.length>=3})),i.outer=s.rdpLineSimplify(r.outer,e,!0,i.inner),i.outer.length>=3){var u=i.inner.slice();i.inner.map((function(t,n){u[n]=i.outer;var r=s.rdpLineSimplify(t,e,!0,u);return u[n]=r,r})).filter((function(t){return t.length>=3})),i.outer=a.transformCoordinates(l,c,i.outer),i.inner=i.inner.map((function(t){return a.transformCoordinates(l,c,t)}))}else i.outer=i.inner=[];else i.outer=[];return i})),i?t:(u.style("position",s.identityFunction),u.style("polygon",s.identityFunction),u.data(t),u)},this.mouseOverOrderClosestBorder=function(t){var e=t.feature.data(),n=t.feature.layer().map(),r=a.transformCoordinates(n.ingcs(),t.feature.gcs(),t.mouse.geo),i=t.feature.polygonCoordinates(),o={};t.over.index.forEach((function(t,e){var n,a=i[t];a.outer.forEach((function(t,e){var i=a.outer[(e+1)%a.outer.length],o=s.distance2dToLineSquared(r,t,i);(void 0===n||o<n)&&(n=o)})),a.inner.forEach((function(t){t.forEach((function(e,i){var o=t[(i+1)%t.length],a=s.distance2dToLineSquared(r,e,o);(void 0===n||a<n)&&(n=a)}))})),o[t]=n})),t.over.index.sort((function(t,e){return o[t]-o[e]})).reverse(),t.over.index.forEach((function(n,r){t.over.found[r]=e[n]}))},this.toPolygonList=function(t){var e=u.style.get("polygon"),n=u.style.get("position");return u.data().map((function(t,r){var i=e(t,r),o=i.outer||(Array.isArray(i)?i:[]);if(o.length<3)return[];var a=[o.map((function(e,i){var o=n(e,i,t,r);return[o.x,o.y]}))];return i.inner&&i.inner.forEach((function(e){a.push(e.map((function(e,i){var o=n(e,i,t,r);return[o.x,o.y]})))})),a}))},this.fromPolygonList=function(t,e){return u.style({position:function(t){return{x:t[0],y:t[1]}},polygon:function(t){return{outer:t[0],inner:t.slice(1)}}}),u.data(t),u},this._exit=function(){i&&u.layer()&&(u.layer().deleteFeature(i),i=null,u.dependentFeatures([])),c()},this._init=function(t){t=t||{},l.call(u,t);var e=r.extend({},{fill:!0,fillColor:{r:0,g:.5,b:.5},fillOpacity:1,stroke:!1,strokeWidth:1,strokeStyle:"solid",strokeColor:{r:0,g:1,b:1},strokeOpacity:1,polygon:s.identityFunction,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){for(var e=0;e<t.length;e+=1)if(t[e].vertices.length>=3)return t[e].vertices.slice(0,3);return[0,0,0]}},void 0===t.style?{}:t.style);void 0!==t.polygon&&(e.polygon=t.polygon),void 0!==t.position&&(e.position=t.position),u.style(e),u._checkForStroke()},this};s.create=function(t,e){"use strict";return(e=e||{}).type="polygon",o.create(t,e)},s.capabilities={feature:"polygon"},i(s,o),t.exports=s},5017:function(t,e,n){var r=n(5638),i=n(5699),o=n(6837),a=function t(e){"use strict";var i=n(6853),a=n(4634);if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var s,u,l=this,c=this._init,h=e.nearestPixel,f=0,d=[],p=[];return this.featureType="quad",this._objectListStart=function(t){r.each(t,(function(t,e){e.used=!1}))},this._objectListGet=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].entry===e)return t[n].used=!0,t[n].value},this._objectListAdd=function(t,e,n){t.push({entry:e,value:n,used:!0})},this._objectListEnd=function(t){for(var e=t.length-1;e>=0;e-=1)t[e].used||t.splice(e,1)},this.pointSearch=function(t,e){var n,o,s=[],c=[],h={},f=[{},{},{},{}],d=[{},{},{},{}],p=[0,1,2,0],m=[1,2,3,1],g=l.data(),v=l.layer().map();return e=null===e?v.gcs():void 0===e?v.ingcs():e,t=i.transformCoordinates(e,v.gcs(),t),u||l._generateQuads(),r.each([u.clrQuads,u.imgQuads,u.vidQuads],(function(e,r){r.forEach((function(e,r){for(n=0;n<p.length;n+=1)f[n].x=e.pos[3*p[n]],f[n].y=e.pos[3*p[n]+1],f[n].z=e.pos[3*p[n]+2],d[n].x=e.pos[3*m[n]],d[n].y=e.pos[3*m[n]+1],d[n].z=e.pos[3*m[n]+2];(a.pointInPolygon(t,f)||a.pointInPolygon(t,d))&&(c.push(e.idx),s.push(g[e.idx]),!(o=a.pointToTriangleBasis2d(t,f[0],f[1],f[2]))||o.x+o.y>1?(o=a.pointToTriangleBasis2d(t,d[2],d[1],d[0]))&&(o.x=1-o.x):o.y=1-o.y,o&&(h[e.idx]={basis:o,_quad:e}))}))})),{index:c,found:s,extra:h}},this.position=function(t){return void 0===t?l.style("position"):(l.style("position",a.ensureFunction(t)),l.dataTime().modified(),l.modified(),l)},this._positionToQuad=function(t,e,n,o){var a=t.call(l,n,o);if(a.ll&&a.ur||a.ul&&a.lr){var s=l.gcs(),u=l.layer().map().gcs(),c={};return r.each(["ll","lr","ul","ur"],(function(t,r){void 0!==a[r]&&(c[r]={},void 0===a[r].x?c[r]=[a[r][0],a[r][1],a[r][2]]:c[r]=[a[r].x,a[r].y,a[r].z],void 0===c[r][2]&&(c[r][2]=e.call(l,n,o)),s!==u&&!1!==s&&(c[r]=i.transformCoordinates(s,u,c[r])))})),c.ll=c.ll||[c.ul[0],c.lr[1],(c.ul[2]+c.lr[2])/2],c.lr=c.lr||[c.ur[0],c.ll[1],(c.ur[2]+c.ll[2])/2],c.ur=c.ur||[c.lr[0],c.ul[1],(c.lr[2]+c.ul[2])/2],c.ul=c.ul||[c.ll[0],c.ur[1],(c.ll[2]+c.ur[2])/2],c}},this._checkQuadUpdate=function(t,e){},this._generateQuads=function(){var t,e,n=l.position(),i=l.style.get("image"),o=l.style.get("video"),c=l.style.get("delayRenderWhenSeeking"),h=l.style.get("color"),m=l.style.get("depth"),g=l.style.get("opacity"),v=l.style.get("drawOnAsyncResourceLoaded"),y=l.style.get("previewColor"),x=l.style.get("previewImage"),_=l.data(),b=[],M=[],w=[],A=[0,0,0];return l._objectListStart(d),l._objectListStart(p),r.each(_,(function(u,_){if(_._cachedQuad)return e=_._cachedQuad.diag2,(void 0===t||_._cachedQuad.diag2&&_._cachedQuad.diag2<t)&&(A=_._cachedQuad.ll,t=_._cachedQuad.diag2),_._cachedQuad.clrquad&&b.push(_._cachedQuad.clrquad),_._cachedQuad.imgquad&&(_._cachedQuad.imageEntry&&l._objectListGet(d,_._cachedQuad.imageEntry),M.push(_._cachedQuad.imgquad)),void(_._cachedQuad.vidquad&&(_._cachedQuad.videoEntry&&l._objectListGet(p,_._cachedQuad.videoEntry),w.push(_._cachedQuad.vidquad)));var T,C,E,k,S,P,O,L,R,I,D,F,N={};if(O=l._positionToQuad(n,m,_,u),I=g.call(l,_,u),void 0!==O&&I&&!(I<0)){if(e=Math.pow(O.ll[0]-O.ur[0],2)+Math.pow(O.ll[1]-O.ur[1],2)+Math.pow(O.ll[2]-O.ur[0],2)+Math.pow(O.lr[0]-O.ur[0],2)+Math.pow(O.lr[1]-O.ur[1],2)+Math.pow(O.lr[2]-O.ur[0],2),N.diag2=e,N.ll=O.ll,(void 0===t||e&&e<t)&&(A=O.ll,t=e),O=[O.ll[0],O.ll[1],O.ll[2],O.lr[0],O.lr[1],O.lr[2],O.ul[0],O.ul[1],O.ul[2],O.ur[0],O.ur[1],O.ur[2]],T={idx:u,pos:O,opacity:I,zOffset:_.zOffset},_.reference&&(T.reference=_.reference),_.crop&&(T.crop=_.crop),R=(L=i.call(l,_,u))?null:o.call(l,_,u),L){if(N.imageEntry=L,void 0===(C=l._objectListGet(d,L))&&(L instanceof Image||L instanceof HTMLCanvasElement?C=L:(C=new Image).src=L,l._objectListAdd(d,L,C)),a.isReadyImage(C)||C instanceof HTMLCanvasElement)T.image=C;else if(D=void 0,(F=x.call(l,_,u))&&a.isReadyImage(F)?T.image=F:(D=y.call(l,_,u),T.color=a.convertColor(D),T.color&&void 0!==T.color.r&&void 0!==T.color.g&&void 0!==T.color.b?(b.push(T),N.clrquad=T):D=void 0),v.call(l,_,u))P=a.isReadyImage(C,!0)?null:r.Deferred(),k=C.onload,C.onload=function(){if(void 0!==D&&(r.inArray(T,b)>=0&&b.splice(r.inArray(T,b),1),delete N.clrquad),T.image=C,l.dataTime().modified(),l.modified(),l._update(),l.layer().draw(),P&&P.resolve(),k)return k.apply(l,arguments)},S=C.onerror,C.onerror=function(){if(P&&P.reject(),S)return S.apply(l,arguments)},P&&l.layer().addPromise(P.promise());else if(void 0===D&&!T.image)return;M.push(T),N.imgquad=T}else if(R){if(N.videoEntry=R,void 0===(E=l._objectListGet(p,R))&&(R instanceof HTMLVideoElement?E=R:(E=document.createElement("video")).src=R,l._objectListAdd(p,R,E),r(E).off(".geojsvideo").on("seeking.geojsvideo canplay.geojsvideo pause.geojsvideo playing.geojsvideo",(function(t){l._checkQuadUpdate(T,t)}))),T.delayRenderWhenSeeking=c.call(l,_,u),void 0===T.delayRenderWhenSeeking&&(T.delayRenderWhenSeeking=!0),a.isReadyVideo(E))T.video=E;else if(D=y.call(l,_,u),T.color=a.convertColor(D),T.color&&void 0!==T.color.r&&void 0!==T.color.g&&void 0!==T.color.b?(b.push(T),N.clrquad=T):D=void 0,v.call(l,_,u))P=a.isReadyVideo(E,!0)?null:r.Deferred(),k=E.onloadeddata,E.onloadeddata=function(){if(void 0!==D&&(r.inArray(T,b)>=0&&b.splice(r.inArray(T,b),1),delete N.clrquad),T.video=E,l.dataTime().modified(),l.modified(),l._update(),l.layer().draw(),P&&P.resolve(),k)return k.apply(l,arguments)},S=E.onerror,E.onerror=function(){if(P&&P.reject(),S)return S.apply(l,arguments)},P&&l.layer().addPromise(P.promise());else if(void 0===D&&!T.video)return;w.push(T),N.vidquad=T}else{if(T.color=a.convertColor(h.call(l,_,u)),!T.color||void 0===T.color.r||void 0===T.color.g||void 0===T.color.b)return;b.push(T),N.clrquad=T}N.clrquad&&(f+=1,N.clrquad.quadId=f),N.imgquad&&(f+=1,N.imgquad.quadId=f),N.vidquad&&(f+=1,N.vidquad.quadId=f),!1!==s&&(_._cachedQuad=N)}})),l._objectListEnd(d),l._objectListEnd(p),u={clrQuads:b,imgQuads:M,vidQuads:w,origin:new Float32Array(A)}},this.cacheUpdate=function(t){return null==t?r.each(l.data(),(function(t,e){e._cachedQuad&&delete e._cachedQuad})):(isFinite(t)&&(t=l.data()[t]),t._cachedQuad&&delete t._cachedQuad),l.modified(),l},this.video=function(t){var e,n;return isFinite(t)&&(t=l.data()[t]),t._cachedQuad?e=(t._cachedQuad.vidquad||{}).video:(u||l._generateQuads(),(n=l.data().indexOf(t))>=0&&(e=l._objectListGet(p,l.style.get("video")(t,n)))),e instanceof HTMLVideoElement?e:null},this.nearestPixel=function(t){return void 0===t?h:(h=t,l.modified(),l)},this._init=function(t){t=t||{},c.call(l,t),s=!1!==t.cacheQuads;var e=r.extend({},{color:{r:1,g:1,b:1},opacity:1,depth:0,drawOnAsyncResourceLoaded:!0,previewColor:null,previewImage:null,image:function(t){return t.image},video:function(t){return t.video},position:a.identityFunction},void 0===t.style?{}:t.style);void 0!==t.position&&(e.position=a.ensureFunction(t.position)),l.style(e),l.dataTime().modified()},l};a.create=function(t,e){"use strict";return(e=e||{}).type="quad",o.create(t,e)},a.capabilities={color:"quad.color",image:"quad.image",imageCrop:"quad.imageCrop",imageFixedScale:"quad.imageFixedScale",imageFull:"quad.imageFull",canvas:"quad.canvas",video:"quad.video"},i(a,o),t.exports=a},4647:function(t,e,n){var r=n(5638),i=n(7839),o={dom:{}},a={},s={},u={},l={},c={},h={},f={},d={},p={registerFileReader:function(t,e){h[t]=e},createFileReader:function(t,e){return h.hasOwnProperty(t)?h[t](e):null},registerRenderer:function(t,e){u[t]=e},createRenderer:function(t,e,n,r){if(u.hasOwnProperty(t)){var i=u[t]({layer:e,canvas:n,options:r});return i._init(),i}return null},checkRenderer:function(t,e){if(null===t)return t;if(u.hasOwnProperty(t)){var n=u[t];if(!n.supported||n.supported())return n.apiname||t;if(!n.fallback||e)return!1;var r=p.checkRenderer(n.fallback(),!0);return!1!==r&&console.warn(t+" renderer is unavailable, using "+r+" renderer instead"),r}return!1},rendererForFeatures:function(t){var e,n,r,i,o,a,s=["webgl","canvas","svg","vtkjs",null];for(n=0;n<s.length;n+=1)if(e=s[n],!1!==p.checkRenderer(e,!0)){if(!t)return e;if(l[e]){for(a=!0,i=0;i<t.length;i+=1){if(o=null,(r=t[i]).indexOf(".")>=0&&(o=r,r=r.substr(0,r.indexOf("."))),void 0===l[e][r]){a=!1;break}if(o&&c[e][r]&&!c[e][r][o]){a=!1;break}}if(a)return e}}return console.warn('There is no renderer available for the feature list "'+(t||[]).join(", ")+'".'),!1},registerFeature:function(t,e,n,r){t in l||(l[t]={},c[t]={});var i=l[t][e];return i&&console.warn("The "+t+"."+e+" feature is already registered"),l[t][e]=n,c[t][e]=r,i},createFeature:function(t,e,n,i){var o=n.api(),a={layer:e,renderer:n};if(o in l&&t in l[o]){void 0!==i&&r.extend(!0,a,i);var s=l[o][t](a);return void 0===e.gcs&&(e.gcs=function(){return e.map().gcs()}),s}return null},registerLayerAdjustment:function(t,e,n){t in f||(f[t]={});var r=f[t][e];return r&&console.warn("The "+t+"."+e+" layer adjustment is already registered"),f[t][e]=n,r},adjustLayerForRenderer:function(t,e){var n=e.rendererName();n&&f&&f[n]&&f[n][t]&&f[n][t].apply(e)},registerLayer:function(t,e,n){a[t]=e,s[t]=n},createLayer:function(t,e,n){var i={map:e},o=null;if(t in a){if(n.renderer||n.features||!s||(i.features=s[t]),void 0!==n){var u=n.data;delete n.data,r.extend(!0,i,n),u&&(i.data=u)}return(o=a[t](i)).layerName=t,o._init(),o}return null},registerWidget:function(t,e,n){t in o||(o[t]={});var r=o[t][e];return r&&console.warn("The "+t+"."+e+" widget is already registered"),o[t][e]=n,r},createWidget:function(t,e,n){var i={layer:e};if(t in o.dom)return void 0!==n&&r.extend(!0,i,n),o.dom[t](i);throw new Error("Cannot create unknown widget "+t)},registerAnnotation:function(t,e,n){var r=d[t];return r&&console.warn("The "+t+" annotation is already registered"),d[t]={func:e,features:n||{}},i["annotation_"+t]="geo_annotation_"+t,r},createAnnotation:function(t,e){if(d[t])return d[t].func(e);console.warn("The "+t+" annotation is not registered")},listAnnotations:function(){return Object.keys(d)},featuresForAnnotations:function(t){var e=[];return(Array.isArray(t)?t:Object.keys(t)).forEach((function(n){d[n]&&Object.keys(d[n].features).forEach((function(i){Array.isArray(t)||!0===t[n]||!Array.isArray(d[n].features[i])?e.push(i):t[n].forEach((function(t){r.inArray(t,d[n].features[i])>=0&&e.push(i)}))}))})),e},rendererForAnnotations:function(t){return p.rendererForFeatures(p.featuresForAnnotations(t))}};p.registries={annotations:d,features:l,featureCapabilities:c,fileReaders:h,layers:a,renderers:u,widgets:o},t.exports=p},3234:function(t,e,n){var r=n(5699),i=n(3737),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this);var n=this,r=0,o=0,a=void 0===(e=e||{}).layer?null:e.layer,s=void 0===e.canvas?null:e.canvas,u=!1;return this.layer=function(){return a},this.canvas=function(t){return void 0===t?s:(s=t,n.modified(),n)},this.map=function(){return a?a.map():null},this.initialized=function(t){return void 0===t?u:(u=t,n)},this.api=function(){throw new Error("Should be implemented by derived classes")},this.width=function(){return r},this.height=function(){return o},this._setWidthHeight=function(t,e){return r=t,o=e,n},this._init=function(){return n},this._resize=function(t,e,r,i){return n._setWidthHeight(r,i),n},this._render=function(){return n},this};r(o,i),t.exports=o},5358:function(t,e,n){var r=n(5699),i=n(3737),o=function t(e){"use strict";if(!(this instanceof t))return new t;i.call(this,e);var n=this,r=null,o=[],a=this._exit,s=this.geoTrigger,u=this.addPromise,l=this.removePromise;return this.addPromise=function(t){return r&&r.addPromise(t),u(t),n},this.removePromise=function(t){return r&&r.removePromise(t),l(t),n},this.parent=function(t){return void 0===t?r:(r=t,n)},this.addChild=function(t){return Array.isArray(t)?(t.forEach(n.addChild),n):(t.parent(n),o.push(t),n)},this.removeChild=function(t){return Array.isArray(t)?(t.forEach(n.removeChild),n):(o=o.filter((function(e){return e!==t})),n)},this.children=function(){return o.slice()},this.draw=function(t){return n.children().forEach((function(e){e.draw(t)})),n},this.geoTrigger=function(t,e,i){var a;return a=(e=e||{}).geo||{},e.geo=a,a.stopPropagation?n:!i&&r&&a._triggeredBy!==r?(a._triggeredBy=n,r.geoTrigger(t,e),n):(s.call(n,t,e),a.stopPropagation||o.forEach((function(r){r.geoTrigger&&(a._triggeredBy=n,r.geoTrigger(t,e))})),n)},this._exit=function(){o=[],r=null,a()},this};r(o,i),t.exports=o},5381:function(t){t.exports="c1123d90202a0e8629d90d57aefed8d2fc800864"},9851:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(4745),a=function t(e){"use strict";var n=this;return this instanceof t?(o.call(this,e),this.select=function(){var t=n.renderer(),e={},r=n.nodeFeature(),i=n.linkFeatures();return e.nodes=t.select(r._svgid()),e.links=i.map((function(e){return t.select(e._svgid())})),e},this):new t(e)};r(a,o),i("svg","graph",a),t.exports=a},2878:function(t,e,n){n(5108).svg={rescale:n(8210)},t.exports={graphFeature:n(9851),lineFeature:n(7134),object:n(2738),pathFeature:n(5903),pointFeature:n(3365),quadFeature:n(2203),renderer:n(2531),tileLayer:n(21),trackFeature:n(1489),uniqueID:n(1946),vectorFeature:n(3398)}},7134:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(2531).d3,i=n(2738),a=n(6618),s=n(4634);e=e||{},o.call(this,e),i.call(this);var u=this,l=this._init,c=a(),h=0,f=this._update;return this._init=function(t){return l.call(u,t),u},this._build=function(){var t,e,n=u.data()||[],i=u.style(),o=u.renderer(),a=u.position();for(f.call(u),i.fill=function(){return!1},n.forEach((function(e,n){var l,c,h=u.line()(e,n),f={};function d(t){return s.isFunction(t)?function(){return t(h[0],0,e,n)}:t}for(c in i)i.hasOwnProperty(c)&&(f[c]=d(i[c]));t=r.svg.line().x((function(t){return u.featureGcsToDisplay(t).x})).y((function(t){return u.featureGcsToDisplay(t).y})).interpolate(u.style.get("closed")(e,n)&&h.length>2?"linear-closed":"linear"),l={data:[h.map((function(t,r){return a(t,r,e,n)}))],append:"path",attributes:{d:t},id:u._svgid()+n,classes:["svgLineFeature","svgSubLine-"+n],visible:u.visible,style:f},o._drawFeatures(l)})),e=n.length;e<h;e+=1)o._removeFeature(u._svgid()+e);return h=n.length,c.modified(),u.updateTime().modified(),u},this._update=function(){return f.call(u),u.timestamp()>=c.timestamp()&&u._build(),u},this._init(e),this};r(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,i("svg","line",a,s),t.exports=a},2738:function(t,e,n){t.exports=function t(e){"use strict";var r=n(3737),i=n(1946);if(!(this instanceof r))return new t(e);var o="svg-"+i(),a=this._exit,s=this,u=this.draw;return this._svgid=function(){return o},this.select=function(){return s.renderer().select(s._svgid())},this.draw=function(){return s.ready&&(s._update(),u()),s},this._exit=function(){s.renderer()._removeFeature(s._svgid()),a()},this}},5903:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(6565),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),i=n(2531).d3,a=n(2738),s=n(6618);e=e||{},o.call(this,e),a.call(this);var u=this,l=s(),c=this._update,h={style:{}};return this._build=function(){var t,e,n=u.data()||[],o=u.style.get(),a=u.style.get("position");return c.call(u),e=function(t){var e={source:t.source,target:t.target};return i.svg.diagonal()(e)},t=[],n.forEach((function(e,r){var i,o;r<n.length-1&&(i=a(e,r),o=a(n[r+1],r+1),t.push({source:u.featureGcsToDisplay(i),target:u.featureGcsToDisplay(o)}))})),h.data=t,h.attributes={d:e},h.id=u._svgid(),h.append="path",h.classes=["svgPathFeature"],h.style=r.extend({fill:function(){return!1},fillColor:{r:0,g:0,b:0}},o),h.visible=u.visible,u.renderer()._drawFeatures(h),l.modified(),u.updateTime().modified(),u},this._update=function(){return c.call(u),u.dataTime().timestamp()>=l.timestamp()&&u._build(),u},this._init(e),this};r(a,o),i("svg","path",a),t.exports=a},3365:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(2738),i=n(6618);e=e||{},o.call(this,e),r.call(this);var a=this,s=this._init,u=this._update,l=i(),c={};return this._init=function(t){return s.call(a,t),a},this._build=function(){var t=a.data(),e=a.style.get(),n=a.renderer(),r=a.position();return u.call(a),t||(t=[]),c.id=a._svgid(),c.data=t,c.append="circle",c.attributes={r:n._convertScale(e.radius),cx:function(t){return a.featureGcsToDisplay(r(t)).x},cy:function(t){return a.featureGcsToDisplay(r(t)).y}},c.style=e,c.classes=["svgPointFeature"],c.visible=a.visible,a.renderer()._drawFeatures(c),l.modified(),a.updateTime().modified(),a},this._update=function(){return u.call(a),a.timestamp()>=l.timestamp()&&a._build(),a},this._init(e),this};r(a,o);var s={};s[o.capabilities.stroke]=!0,i("svg","point",a,s),t.exports=a},2203:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),i=n(2531).d3,a=n(2738);o.call(this,e),a.call(this);var s,u=this,l=this._exit,c=this._init,h=this._update;return this._build=function(){if(this.position()){var t=u.renderer(),e=t.layer().map();s=u._generateQuads();var n=[];r.each(s.clrQuads,(function(t,e){n.push({type:"clr",quad:e,zIndex:e.pos[2]})})),r.each(s.imgQuads,(function(t,e){e.image&&n.push({type:"img",quad:e,zIndex:e.pos[2]})}));var o={id:u._svgid(),data:n,dataIndex:function(t){return t.quad.quadId},append:function(t){var e=this.namespaceURI,n="clr"===t.type?"polygon":"image";return e?document.createElementNS(e,n):document.createElement(n)},attributes:{fill:function(t){if("clr"===t.type)return i.rgb(255*t.quad.color.r,255*t.quad.color.g,255*t.quad.color.b);1!==t.quad.opacity&&i.select(this).style("opacity",t.quad.opacity)},height:function(t){return"clr"===t.type?void 0:1},points:function(n){if("clr"===n.type&&!n.points){var r,i=[];for(r=0;r<n.quad.pos.length;r+=3){var o={x:n.quad.pos[r],y:n.quad.pos[r+1],z:n.quad.pos[r+2]};o=e.gcsToDisplay(o,null),o=t.baseToLocal(o),i.push(o.x+","+o.y)}n.points=i[0]+" "+i[1]+" "+i[3]+" "+i[2]}return"clr"===n.type?n.points:void 0},preserveAspectRatio:function(t){return"clr"===t.type?void 0:"none"},reference:function(t){return t.quad.reference},stroke:!1,transform:function(n){if("img"===n.type&&n.quad.image&&!n.svgTransform){var r,i,o,a,s=[],u=-1,l=n.quad.image.width,c=n.quad.image.height;for(o=0;o<n.quad.pos.length;o+=3){var h={x:n.quad.pos[o],y:n.quad.pos[o+1],z:n.quad.pos[o+2]};h=e.gcsToDisplay(h,null),h=t.baseToLocal(h),s.push(h)}for(o=0;o<4;o+=1)(r=Math.abs(s[(o+1)%4].x*(s[(o+2)%4].y-s[(o+3)%4].y)+s[(o+2)%4].x*(s[(o+3)%4].y-s[(o+1)%4].y)+s[(o+3)%4].x*(s[(o+1)%4].y-s[(o+2)%4].y))/2)>u&&(u=r,i=o);n.svgTransform=[3===i||2===i?s[1].x-s[0].x:s[3].x-s[2].x,3===i||2===i?s[1].y-s[0].y:s[3].y-s[2].y,0===i||2===i?s[1].x-s[3].x:s[0].x-s[2].x,0===i||2===i?s[1].y-s[3].y:s[0].y-s[2].y,2===i?s[3].x+s[0].x-s[1].x:s[2].x,2===i?s[3].y+s[0].y-s[1].y:s[2].y],Math.abs(n.svgTransform[1]/l)<1e-6&&Math.abs(n.svgTransform[2]/c)<1e-6&&(a=n.svgTransform[0]/l,n.svgTransform[4]=Math.round(n.svgTransform[4]/a)*a,a=n.svgTransform[3]/c,n.svgTransform[5]=Math.round(n.svgTransform[5]/a)*a)}return"img"===n.type&&n.quad.image?"matrix("+n.svgTransform.join(" ")+")":void 0},width:function(t){return"clr"===t.type?void 0:1},x:function(t){return"clr"===t.type?void 0:0},"xlink:href":function(t){return"clr"!==t.type&&t.quad.image?t.quad.image.src:void 0},y:function(t){return"clr"===t.type?void 0:0}},style:{fillOpacity:function(t){return"clr"===t.type?t.quad.opacity:void 0}},onlyRenderNew:!this.style("previewColor")&&!this.style("previewImage"),sortByZ:!0,visible:u.visible,classes:["svgQuadFeature"]};t._drawFeatures(o),u.buildTime().modified()}},this._update=function(){return h.call(u),(u.buildTime().timestamp()<=u.dataTime().timestamp()||u.buildTime().timestamp()<u.timestamp())&&u._build(),u},this._init=function(){c.call(u,e)},this._exit=function(){l.call(u)},u._init(e),this};r(a,o);var s={};s[o.capabilities.color]=!0,s[o.capabilities.image]=!0,s[o.capabilities.imageCrop]=!1,s[o.capabilities.imageFixedScale]=!1,s[o.capabilities.imageFull]=!1,s[o.capabilities.canvas]=!1,s[o.capabilities.video]=!1,i("svg","quad",a,s),t.exports=a},8210:function(t){t.exports="geo_svg_rescale"},2531:function(t,e,n){var r=n(5699),i=n(4647).registerRenderer,o=n(3234),a=function t(e){"use strict";var r=t.d3,i=n(2738),a=n(4634),s=n(5108),u=n(8210);if(!(this instanceof t))return new t(e);o.call(this,e);var l=this._exit;i.call(this,e),e=e||{};var c=this,h=null,f={},d=null,p=null,m=1,g={dx:0,dy:0,rx:0,ry:0,rotation:0},v={},y={},x=null,_=null;function b(t){return t?x.select(".group-"+t):x.select(".group-"+c._svgid())}function M(){var t=c.layer().map(),e=t.size().width,n=t.size().height;if(!e||!n)throw new Error("Map layer has size 0");c._setWidthHeight(e,n),p=Math.pow(e*e+n*n,.5),d={upperLeft:t.displayToGcs({x:0,y:0},null),lowerRight:t.displayToGcs({x:e,y:n},null),center:t.displayToGcs({x:e/2,y:n/2},null)}}return this._convertColor=function(t,e){return t=a.ensureFunction(t),e=e||function(){return!0},function(){var n="none";return e.apply(c,arguments)&&(n=t.apply(c,arguments)).hasOwnProperty("r")&&n.hasOwnProperty("g")&&n.hasOwnProperty("b")&&(n=r.rgb(255*n.r,255*n.g,255*n.b)),n}},this._convertScale=function(t){return t=a.ensureFunction(t),function(){return t.apply(c,arguments)/m}},this._setTransform=function(){if(d||M(),h){var t,e,n,r,i,o,a=c.layer().map(),s=a.gcsToDisplay(d.upperLeft,null),u=a.gcsToDisplay(d.lowerRight,null),l=a.gcsToDisplay(d.center,null),f=b();n=Math.sqrt(Math.pow(u.y-s.y,2)+Math.pow(u.x-s.x,2))/p,r=a.rotation(),i=-c.width()/2,o=-c.height()/2,t=n*i+l.x,e=n*o+l.y,r||(t=Math.round(t),e=Math.round(e));var v="matrix("+[n,0,0,n,t,e].join()+")";r&&(v+=" rotate("+[180*r/Math.PI,-i,-o].join()+")"),f.attr("transform",v),m=n,g.dx=t,g.dy=e,g.rx=i,g.ry=o,g.rotation=r}},this.baseToLocal=function(t){if(t={x:(t.x-g.dx)/m,y:(t.y-g.dy)/m},g.rotation){var e=Math.sin(-g.rotation),n=Math.cos(-g.rotation),r=t.x+g.rx,i=t.y+g.ry;t={x:r*n-i*e-g.rx,y:r*e+i*n-g.ry}}return t},this.localToBase=function(t){if(g.rotation){var e=Math.sin(g.rotation),n=Math.cos(g.rotation),r=t.x+g.rx,i=t.y+g.ry;t={x:r*n-i*e-g.rx,y:r*e+i*n-g.ry}}return t={x:t.x*m+g.dx,y:t.y*m+g.dy}},this._init=function(t){if(!c.canvas()){var e;t.widget=t.widget||!1,(x="d3Parent"in t?r.select(t.d3Parent).append("svg"):r.select(c.layer().node().get(0)).append("svg")).attr("display","block");var n=(_=x.append("defs")).append("filter").attr("id","geo-highlight").attr("x","-100%").attr("y","-100%").attr("width","300%").attr("height","300%");n.append("feMorphology").attr("operator","dilate").attr("radius",2).attr("in","SourceAlpha").attr("result","dilateOut"),n.append("feGaussianBlur").attr("stdDeviation",5).attr("in","dilateOut").attr("result","blurOut"),n.append("feColorMatrix").attr("type","matrix").attr("values","-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0").attr("in","blurOut").attr("result","invertOut"),n.append("feBlend").attr("in","SourceGraphic").attr("in2","invertOut").attr("mode","normal"),t.widget||(e=t.canvas||x.append("g")),(n=_.append("filter").attr("id","geo-blur").attr("x","-100%").attr("y","-100%").attr("width","300%").attr("height","300%")).append("feGaussianBlur").attr("stdDeviation",20).attr("in","SourceGraphic"),h=c.layer().sticky(),x.attr("class",c._svgid()),x.attr("width",c.layer().node().width()),x.attr("height",c.layer().node().height()),t.widget?c.canvas(x):(e.attr("class","group-"+c._svgid()),c.canvas(e))}return c._setTransform(),c},this.api=function(){return t.apiname},this.scaleFactor=function(){return m},this._resize=function(t,e,n,r){return d||M(),x.attr("width",n),x.attr("height",r),c._setTransform(),c._setWidthHeight(n,r),c.layer().geoTrigger(u,{scale:m},!0),c},this._exit=function(){f={},c.canvas().remove(),x.remove(),x=void 0,_.remove(),_=void 0,v={},y={},l()},this._definitions=function(){return _},this._drawFeatures=function(t){return f[t.id]={data:t.data,index:t.dataIndex,style:t.style,visible:t.visible,attributes:t.attributes,classes:t.classes,append:t.append,onlyRenderNew:t.onlyRenderNew,sortByZ:t.sortByZ,parentId:t.parentId},c.__render(t.id,t.parentId)},this.__render=function(t,e){var n;if(void 0===t){for(n in f)f.hasOwnProperty(n)&&c.__render(n);return c}return e?c._renderFeature(t,e):(v[t]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame)),c},this._renderFrame=function(){var t;for(t in y)c.select(t).remove(),_.selectAll("."+t).remove();y={};var e=v;for(t in v={},e)e.hasOwnProperty(t)&&c._renderFeature(t)},this._renderFeature=function(t,e){if(!f[t])return c;var n,r,i=f[t].data,o=f[t].index,a=f[t].style,s=f[t].visible,u=f[t].attributes,l=f[t].classes,h=f[t].append,d=c.select(t,e).data(i,o);return n=d.enter().append(h),d.exit().remove(),function(t,e){var n;for(n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}(r=f[t].onlyRenderNew?n:d,u),r.attr("class",l.concat([t]).join(" ")),function(t,e){var n,r,i;function o(){return e.fill.apply(c,arguments)?null:"none"}function a(){return e.stroke.apply(c,arguments)?null:"none"}for(n in e)e.hasOwnProperty(n)&&(i=null,r=null,"strokeColor"===n?(r="stroke",i=c._convertColor(e[n],e.stroke)):"stroke"===n&&e[n]&&!e.hasOwnProperty("strokeColor")?(r="stroke",i=a):"strokeWidth"===n?(r="stroke-width",i=c._convertScale(e[n])):"strokeOpacity"===n?(r="stroke-opacity",i=e[n]):"fillColor"===n?(r="fill",i=c._convertColor(e[n],e.fill)):"fill"!==n||e.hasOwnProperty("fillColor")?"fillOpacity"===n?(r="fill-opacity",i=e[n]):"lineCap"===n?(r="stroke-linecap",i=e[n]):"lineJoin"===n?(r="stroke-linejoin",i=e[n]):"miterLimit"===n&&(r="stroke-miterlimit",i=e[n]):(r="fill",i=o),r&&t.style(r,i))}(r,a),s&&r.style("visibility",s()?"visible":"hidden"),n.size()&&f[t].sortByZ&&d.sort((function(t,e){return(t.zIndex||0)-(e.zIndex||0)})),c},this.select=function(t,e){return b(e).selectAll("."+t)},this._removeFeature=function(t){return y[t]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame),delete f[t],v[t]&&delete v[t],c},this.draw=function(){},this.layer().geoOn(s.pan,c._setTransform),this.layer().geoOn(s.rotate,c._setTransform),this.layer().geoOn(s.zoom,(function(){c._setTransform(),c.__render(),c.layer().geoTrigger(u,{scale:m},!0)})),this.layer().geoOn(s.resize,(function(t){c._resize(t.x,t.y,t.width,t.height)})),this._init(e),this};a.apiname="svg",r(a,o),i("svg",a),i("d3",a),a.supported=function(){delete a.d3;try{(a.d3=n(8725))&&a.d3.rgb||(a.d3=void 0)}catch(t){}return void 0!==a.d3},a.fallback=function(){return null},a.supported(),t.exports=a},21:function(t,e,n){var r=function(){"use strict";var t,e=this,n=this._init,r=this._exit,i=this._update,o=0,a=[];this._drawTile=function(n){if(t){var r=e._tileBounds(n),i=n.index.level||0,s=e._tileOffset(i),u={};u.ul=e.fromLocal(e.fromLevel({x:r.left-s.x,y:r.top-s.y},i),0),u.ll=e.fromLocal(e.fromLevel({x:r.left-s.x,y:r.bottom-s.y},i),0),u.ur=e.fromLocal(e.fromLevel({x:r.right-s.x,y:r.top-s.y},i),0),u.lr=e.fromLocal(e.fromLevel({x:r.right-s.x,y:r.bottom-s.y},i),0),u.ul.z=u.ll.z=u.ur.z=u.lr.z=i,o+=1,u.id=o,n.quadId=u.id,u.image=n.image,u.reference=n.toString(),a.push(u),t.data(a),t._update(),e.draw()}},this._remove=function(n){if(void 0!==n.quadId&&t){for(var r=0;r<a.length;r+=1)if(a[r].id===n.quadId){a.splice(r,1);break}t.data(a),t._update(),e.draw()}},this._update=function(n){return i.call(e,n),e._addBaseQuadToTiles(t,a),e},this._exit=function(){e.deleteFeature(t),t=null,a=[],r.apply(e,arguments)},this._init=function(){n.apply(e,arguments),(t=e.createFeature("quad",{previewColor:e._options.previewColor,previewImage:e._options.previewImage})).geoTrigger=void 0,t.gcs(e._options.gcs||e.map().gcs()),t.data(a),t._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("svg","tile",r),t.exports=r},1489:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(2738).call(this),this._init(e),this):new t(e)};r(a,o),i("svg","track",a),t.exports=a},1946:function(t){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t.exports=function(){var t,n=[];for(n.length=8,t=0;t<8;t+=1)n[t]=e.charAt(Math.floor(61*Math.random()));return n.join("")}},3398:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(2623),a={arrow:{attrs:{class:"geo-vector-arrow geo-vector-marker",viewBox:"0 0 10 10",refX:1,refY:5,markerHeight:5,markerWidth:5,orient:"auto"},path:"M 0 0 L 10 5 L 0 10 z"},point:{attrs:{class:"geo-vector-point geo-vector-marker",viewBox:"0 0 12 12",refX:6,refY:6,markerHeight:8,markerWidth:8,orient:"auto"},path:"M 6 3 A 3 3 0 1 1 5.99999 3 Z"},bar:{attrs:{class:"geo-vector-bar geo-vector-marker",viewBox:"0 0 10 10",refX:0,refY:5,markerHeight:6,markerWidth:6,orient:"auto"},path:"M 0 0 L 2 0 L 2 10 L 0 10 z"},wedge:{attrs:{class:"geo-vector-wedge geo-vector-marker",viewBox:"0 0 10 10",refX:10,refY:5,markerHeight:5,markerWidth:5,orient:"auto"},path:"M 0 0 L 1 0 L 10 5 L 1 10 L 0 10 L 9 5 L 0 0"}},s=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(2738),i=n(6618),s=n(2531).d3;e=e||{},o.call(this,e),r.call(this);var u=this,l=this._exit,c=this._update,h=i(),f={};function d(t,e,n){return u._svgid()+"_marker_"+e+"_"+n}function p(t,e,n,r,i){var o=u.renderer()._definitions().selectAll("g.marker-group#"+u._svgid()).data(t.length?[1]:[]);o.enter().append("g").attr("id",u._svgid).attr("class","marker-group"),o.exit().remove();var l=t.reduce((function(t,e,n){var o=a[i(e,n)],s=a[r(e,n)];return o&&t.push({data:e,dataIndex:n,head:!0}),s&&t.push({data:e,dataIndex:n,head:!1}),t}),[]),c=o.selectAll("marker.geo-vector-marker").data(l);c.enter().append("marker").append("path");var h=u.renderer();c.each((function(t){var e=s.select(this),n=t.head?a[i(t.data,t.dataIndex)]:a[r(t.data,t.dataIndex)];Object.keys(n.attrs).forEach((function(t){e.attr(t,n.attrs[t])}))})).attr("id",(function(t){return d(t.data,t.dataIndex,t.head?"head":"tail")})).style("stroke",(function(t){return h._convertColor(e)(t.data,t.dataIndex)})).style("fill",(function(t){return h._convertColor(e)(t.data,t.dataIndex)})).style("opacity",(function(t){return n(t.data,t.dataIndex)})).select("path").attr("d",(function(t){return t.head?a[i(t.data,t.dataIndex)].path:a[r(t.data,t.dataIndex)].path})),c.exit().remove()}return this._build=function(){var t,e=u.data(),n=u.style.get(),r=u.renderer(),i=u.origin(),o=u.delta(),a=u.style("scale"),s=0;function l(){return a/r.scaleFactor()}return c.call(u),e||(e=[]),t=e.map((function(t,e){var n=u.featureGcsToDisplay(i(t,e)),r=o(t,e);return s=Math.max(s,r.x*r.x+r.y*r.y),{x1:n.x,y1:n.y,dx:r.x,dy:-r.y}})),s=Math.sqrt(s),a||(a=75/(s||1)),f.id=u._svgid(),f.data=e,f.append="line",f.attributes={x1:function(e,n){return t[n].x1},y1:function(e,n){return t[n].y1},x2:function(e,n){return t[n].x1+l()*t[n].dx},y2:function(e,n){return t[n].y1+l()*t[n].dy},"marker-start":function(t,e){return"url(#"+d(0,e,"tail")+")"},"marker-end":function(t,e){return"url(#"+d(0,e,"head")+")"}},f.style={stroke:function(){return!0},strokeColor:n.strokeColor,strokeWidth:n.strokeWidth,strokeOpacity:n.strokeOpacity,originStyle:n.originStyle,endStyle:n.endStyle},f.classes=["svgVectorFeature"],f.visible=u.visible,p(e,n.strokeColor,n.strokeOpacity,n.originStyle,n.endStyle),u.renderer()._drawFeatures(f),h.modified(),u.updateTime().modified(),u},this._update=function(){return c.call(u),u.timestamp()>=h.timestamp()?u._build():p(f.data,f.style.strokeColor,f.style.strokeOpacity,f.style.originStyle,f.style.endStyle),u},this._exit=function(){l.call(u),f={},p([],null,null,null,null)},this._init(e),this};s.markerConfigs=a,r(s,o),i("svg","vector",s),t.exports=s},9757:function(t,e,n){var r=n(5699),i=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},i.call(this,e);var r=n(5638),o=this,a=this._init;return this.featureType="text",this.position=function(t){return void 0===t?o.style("position"):(t!==o.style("position")&&(o.style("position",t),o.dataTime().modified(),o.modified()),o)},this.text=function(t){return void 0===t?o.style("text"):(t!==o.style("text")&&(o.style("text",t),o.dataTime().modified(),o.modified()),o)},this._init=function(t){t=t||{},a.call(o,t);var e=r.extend({},{font:"bold 16px sans-serif",textAlign:"center",textBaseline:"middle",color:{r:0,g:0,b:0},rotation:0,rotateWithMap:!1,textScaled:!1,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},text:function(t){return t.text}},void 0===t.style?{}:t.style);void 0!==t.position&&(e.position=t.position),void 0!==t.text&&(e.text=t.text),o.style(e),e.position&&o.position(e.position),e.text&&o.text(e.text),o.dataTime().modified()},this._init(e),o};o.usedStyles=["visible","font","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily","textAlign","textBaseline","color","textOpacity","rotation","rotateWithMap","textScaled","offset","shadowColor","shadowOffset","shadowBlur","shadowRotate","textStrokeColor","textStrokeWidth"],o.create=function(t,e){"use strict";return(e=e||{}).type="text",i.create(t,e)},o.capabilities={feature:"text"},r(o,i),t.exports=o},8418:function(t,e,n){var r=n(5638);t.exports=function t(e){if(!(this instanceof t))return new t(e);this._index=e.index,this._size=e.size,this._overlap=e.overlap||{x:0,y:0},this._wrap=e.wrap||{x:1,y:1},this._url=e.url,this._fetched=!1,this._queue=e.queue||null,Object.defineProperty(this,"index",{get:function(){return this._index}}),Object.defineProperty(this,"size",{get:function(){return this._size}}),Object.defineProperty(this,"overlap",{get:function(){return this._overlap}}),this.fetch=function(){return this._fetched||r.get(this._url).done(function(){this._fetched=!0}.bind(this)).promise(this),this},this.fetched=function(){return this._fetched},this.then=function(t,e){return this.fetched()||!this._queue||!this._queue.add||this.state&&"pending"!==this.state()?this.fetch():this._queue.add(this,this.fetch),this.done&&this.fail?this.done(t).fail(e):this.then(t,e),this},this.catch=function(t){return this.then(void 0,t),this},this.toString=function(){return[this._index.level||0,this._index.y,this._index.x,this._index.reference||0].join("_")},this.bounds=function(t,e){var n,r,i,o;return r=(n=this.size.x*(this.index.x-t.x)-this.overlap.x-e.x)+this.size.x+2*this.overlap.x,i=(o=this.size.y*(this.index.y-t.y)-this.overlap.y-e.y)+this.size.y+2*this.overlap.y,this.overlap.x&&this.index.x===t.x&&(n+=this.overlap.x),this.overlap.y&&this.index.y===t.y&&(o+=this.overlap.y),{left:n,right:r,bottom:i,top:o}},Object.defineProperty(this,"bottom",{get:function(){return this.size.y*(this.index.y+1)+this.overlap.y}}),Object.defineProperty(this,"top",{get:function(){return this.size.y*this.index.y-(this.index.y?this.overlap.y:0)}}),Object.defineProperty(this,"left",{get:function(){return this.size.x*this.index.x-(this.index.x?this.overlap.x:0)}}),Object.defineProperty(this,"right",{get:function(){return this.size.x*(this.index.x+1)+this.overlap.x}}),this.fadeIn=function(t){return r.noop(t),this}}},6244:function(t){t.exports=function t(e){return this instanceof t?(e=e||{},this._size=e.size||64,Object.defineProperty(this,"size",{get:function(){return this._size},set:function(t){for(;this._atime.length>t;)this.remove(this._atime[this._atime.length-1]);this._size=t}}),Object.defineProperty(this,"length",{get:function(){return this._atime.length}}),this._access=function(t){return this._atime.indexOf(t)},this.remove=function(t){var e="string"==typeof t?t:t.toString();return e in this._cache&&(this._atime.splice(this._access(e),1),delete this._cache[e],!0)},this.clear=function(){return this._cache={},this._atime=[],this},this.get=function(t,e){return(t="string"==typeof t?t:t.toString())in this._cache?(e||(this._atime.splice(this._access(t),1),this._atime.unshift(t)),this._cache[t]):null},this.add=function(t,e,n){this.remove(t);var r=t.toString();this._cache[r]=t,this._atime.unshift(r),n||this.purge(e)},this.purge=function(t){for(var e;this._atime.length>this.size;){e=this._atime.pop();var n=this._cache[e];t&&t(n),delete this._cache[e]}},this.clear(),this):new t(e)}},1940:function(t,e,n){var r=n(5699),i=n(3715);function o(t,e){return(t%e+e)%e}function a(t){var e,n=/\$?\{(s|S|[sS]:[^{}]+|[^-{}]-[^-{}]|([^,{}]+,)+[^,{}]+)\}/,r=t.replace(new RegExp(n,"g"),"{s}").replace(/\$?\{[xX]\}/g,"{x}").replace(/\$?\{[yY]\}/g,"{y}").replace(/\$?\{[zZ]\}/g,"{z}"),i=t.match(n);if(i)if(i[2])e=i[1].split(",");else if(":"===i[1][1])e=i[1].substr(2).split("");else if("-"===i[1][1]){e=[];for(var a=i[1].charCodeAt(0),s=i[1].charCodeAt(2),u=Math.min(a,s);u<=Math.max(a,s);u+=1)e.push(String.fromCharCode(u))}return function(t,n,i,a){return r.replace(/\{s\}/g,function(t,e,n,r){return r[o(t+e+n,r.length)]}(t,n,i,e||a)).replace(/\{x\}/g,t).replace(/\{y\}/g,n).replace(/\{z\}/g,i)}}var s=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var r=n(5638),s=n(5108),u=n(6853),l=n(6244),c=n(3705),h=n(4647).adjustLayerForRenderer,f=n(8418);if((e=r.extend(!0,{},this.constructor.defaults,e||{})).cacheSize||(e.cacheSize=e.keepLower?600:200),"string"===r.type(e.subdomains)&&(e.subdomains=e.subdomains.split("")),e.baseUrl){var d=e.baseUrl;d&&"/"!==d.charAt(d.length-1)&&(d+="/"),e.url=d+"{z}/{x}/{y}."+(e.imageFormat||"png")}e.originalUrl=e.url,"string"===r.type(e.url)&&(e.url=a(e.url));var p,m,g,v=this._init,y=this._exit,x=this.visible,_=e.queueSize||6,b=e.initialQueueSize||0,M=[],w={},A=[],T=e.nearestPixel,C=this;this._options=r.extend(!0,{},e),this.attribution(e.attribution),this._activeTiles={},this._tileTree={},this._cache=l({size:e.cacheSize}),this._queue=e.queue||c({size:_,initialSize:b,track:e.cacheSize,needed:function(t){return this._tileLayers&&this._tileLayers.length?this._tileLayers.some((function(e){return t===e.cache.get(t.toString(),!0)})):t===C.cache.get(t.toString(),!0)}}),this._queue._tileLayers=this._queue._tileLayers||[],this._queue._tileLayers.push(C),this._queue.initialTrack&&this._queue.track&&(this._queue.track=this._queue.initialTrack*this._queue._tileLayers.length);var E={};return Object.defineProperty(this,"options",{get:function(){return r.extend({},C._options)}}),Object.defineProperty(this,"cache",{get:function(){return C._cache}}),Object.defineProperty(this,"activeTiles",{get:function(){return r.extend({},C._activeTiles)}}),Object.defineProperty(this,"queue",{get:function(){return C._queue},set:function(t){C._queue!==t&&(this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(C)>=0&&(this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(C),1),this._queue.initialTrack&&this._queue.track&&this._queue._tileLayers.length&&(this._queue.track=this._queue.initialTrack*this._queue._tileLayers.length)),C._queue=t,C._queue._tileLayers=C._queue._tileLayers||[],C._queue._tileLayers.push(C),C._queue.initialTrack&&C._queue.track&&(C._queue.track=C._queue.initialTrack*C._queue._tileLayers.length))}}),Object.defineProperty(this,"queueSize",{get:function(){return _},set:function(t){_=t,C._queue.size=t}}),Object.defineProperty(this,"initialQueueSize",{get:function(){return b},set:function(t){b=t||0,C._queue.initialSize=t||_}}),Object.defineProperty(this,"reference",{get:function(){return C.id()+"_"+(p||0)},set:function(t){p=t},configurable:!0}),this.tilesAtZoom=function(t){if(C._options.tilesAtZoom)return C._options.tilesAtZoom.call(C,t);var e=Math.pow(2,t);return{x:e,y:e}},this.tilesMaxBounds=function(t){return C._options.tilesMaxBounds?C._options.tilesMaxBounds.call(C,t):null},this.tileCropFromBounds=function(t){if(C._options.tilesMaxBounds){var e=t.index.level,n=C._tileBounds(t);return void 0===A[e]&&(A[e]=C.tilesMaxBounds(e)||null),A[e]&&(n.right>A[e].x||n.bottom>A[e].y)?{x:Math.max(0,Math.min(A[e].x,n.right)-n.left),y:Math.max(0,Math.min(A[e].y,n.bottom)-n.top)}:void 0}},this.isValid=function(t){return C._options.minLevel<=t.level&&t.level<=C._options.maxLevel&&(!!(C._options.wrapX||0<=t.x&&t.x<=C.tilesAtZoom(t.level).x-1)&&!!(C._options.wrapY||0<=t.y&&t.y<=C.tilesAtZoom(t.level).y-1))},this._origin=function(t){var e,n=C.toLevel(C.toLocal(C.map().origin()),t),r=C._options;return{index:e={x:Math.floor(n.x/r.tileWidth),y:Math.floor(n.y/r.tileHeight)},offset:{x:n.x-r.tileWidth*e.x,y:n.y-r.tileHeight*e.y}}},this._tileBounds=function(t){var e=C._origin(t.index.level);return t.bounds(e.index,e.offset)},this.tileAtPoint=function(t,e){var n=C._origin(e),r=C.map();t=C.displayToLevel(r.gcsToDisplay(t,null),e),isNaN(t.x)&&(t.x=0),isNaN(t.y)&&(t.y=0);var i=C._tileOffset(e);return i&&(t.x+=i.x,t.y+=i.y),{x:Math.floor(n.index.x+(n.offset.x+t.x)/C._options.tileWidth),y:Math.floor(n.index.y+(n.offset.y+t.y)/C._options.tileHeight)}},this.gcsTileBounds=function(t,e){var n=t.index?t:f({index:t,size:{x:C._options.tileWidth,y:C._options.tileHeight},url:""}),r=C._tileOffset(n.index.level),i=n.bounds({x:0,y:0},r),o=C.map(),a=o.unitsPerPixel(n.index.level),s=[{x:i.left*a,y:C._topDown()*i.top*a},{x:i.right*a,y:C._topDown()*i.bottom*a}];return(e=null===e?o.gcs():void 0===e?o.ingcs():e)!==o.gcs()&&(s=u.transformCoordinates(o.gcs(),e,s)),{left:s[0].x,top:s[0].y,right:s[1].x,bottom:s[1].y}},this._getTile=function(t,e){var n=e||t;return f({index:t,size:{x:C._options.tileWidth,y:C._options.tileHeight},queue:C._queue,url:C._options.url.call(C,n.x,n.y,n.level||0,C._options.subdomains)})},this._getTileCached=function(t,e,n){var r=C.cache.get(C._tileHash(t));return null===r&&(r=C._getTile(t,e),C.cache.add(r,C.remove,n)),r},this._tileHash=function(t){return[t.level||0,t.y,t.x,t.reference||0].join("_")},this._getTileRange=function(t,e){var n=[C.tileAtPoint({x:e.left,y:e.top},t),C.tileAtPoint({x:e.right,y:e.top},t),C.tileAtPoint({x:e.left,y:e.bottom},t),C.tileAtPoint({x:e.right,y:e.bottom},t)];return{start:{x:Math.min(n[0].x,n[1].x,n[2].x,n[3].x),y:Math.min(n[0].y,n[1].y,n[2].y,n[3].y)},end:{x:Math.max(n[0].x,n[1].x,n[2].x,n[3].x),y:Math.max(n[0].y,n[1].y,n[2].y,n[3].y)}}},this._getTiles=function(t,e,n,i){var a,s,u,l,c,h,f,d,p,m,g,v=[],y=!1,x=C._options.keepLower?C._options.minLevel:Math.min(Math.max(t,C._options.minLevel),C._options.maxLevel);for(t<x&&(t=x),g=x;g<=t&&(c=(f=C._getTileRange(g,e)).start,h=f.end,l=C.tilesAtZoom(g),C._options.wrapX||(c.x=Math.min(Math.max(c.x,0),l.x-1),h.x=Math.min(Math.max(h.x,0),l.x-1),g===x&&C._options.keepLower&&(c.x=0,h.x=l.x-1)),C._options.wrapY||(c.y=Math.min(Math.max(c.y,0),l.y-1),h.y=Math.min(Math.max(h.y,0),l.y-1),g===x&&C._options.keepLower&&(c.y=0,h.y=l.y-1)),!(C._options.gcs&&C._options.gcs!==C.map().gcs()&&g!==x&&(h.x+1-c.x)*(h.y+1-c.y)>C.map().size().width*C.map().size().height/C._options.tileWidth/C._options.tileHeight*16));g+=1)for(a=c.x;a<=h.x;a+=1)for(s=c.y;s<=h.y;s+=1)u={level:g,x:a,y:s,reference:C.reference},d={level:g,x:a,y:s,reference:C.reference},C._options.wrapX&&(d.x=o(d.x,l.x)),C._options.wrapY&&(d.y=o(d.y,l.y)),C.isValid(d)&&(i&&v.length<M.length&&(m=M[v.length],y=y||u.level!==m.level||u.x!==m.x||u.y!==m.y),v.push({index:u,source:d}));if(i){if(!y&&v.length===M.length)return;M.splice(0,M.length),r.each(v,(function(t,e){M.push(e.index)}))}if(n){p={x:(c.x+h.x)/2,y:(c.y+h.y)/2,level:t,bottomLevel:t};for(var _=Math.max(h.x-c.x,h.y-c.y)+1;_>=1;_/=2)p.bottomLevel-=1;v.sort(C._loadMetric(p)),C._queue&&C._queue.batch(!0)}for(C.cache.size<v.length&&(console.log("Increasing cache size to "+v.length),C.cache.size=v.length),a=0;a<v.length;a+=1)v[a]=C._getTileCached(v[a].index,v[a].source,!0);return C.cache.purge(C.remove),v},this.gcs=function(t){if(void 0===t)return C._options.gcs||C.map().gcs();var e=C.gcs();return null===t?delete C._options.gcs:C._options.gcs=t,C.gcs()!==e&&(C.clear(),C.gcsFeatures(C.gcs()),C.modified(),C._update()),C},this.prefetch=function(t,e){var n;return n=C._getTiles(t,e,!0),r.when.apply(r,n.map((function(t){return t.fetch()})))},this._loadMetric=function(t){return function(e,n){var r,i,o,a,s;return e=e.index||e,n=n.index||n,e.level!==n.level?t.bottomLevel&&e.level>=t.bottomLevel!=n.level>=t.bottomLevel?e.level>=t.bottomLevel?-1:1:e.level-n.level:(s=Math.pow(2,e.level-t.level),o=(t.x+.5)*s-.5,a=(t.y+.5)*s-.5,(r=e.x-o)*r+(i=e.y-a)*i-((r=n.x-o)*r+(i=n.y-a)*i))}},this.fromLevel=function(t,e){var n=Math.pow(2,-e);return{x:t.x*n,y:t.y*n}},this.toLevel=function(t,e){var n=Math.pow(2,e);return{x:t.x*n,y:t.y*n}},this.drawTile=function(t){var e=t.toString();C._activeTiles.hasOwnProperty(e)?C._moveToTop(t):C._drawTile(t),C._activeTiles[e]=t},this._drawTile=function(t){if(null!==C.renderer())throw new Error("This draw method is not valid on renderer managed layers.");var e,n=t.index.level,i=r(C._getSubLayer(n)),o=C._tileBounds(t),a=C._options.animationDuration,s=r('<div class="geo-tile-container"/>').attr("tile-reference",t.toString());s.append(t.image),s.css({left:o.left-parseInt(i.attr("offsetx")||0,10)+"px",top:o.top-parseInt(i.attr("offsety")||0,10)+"px"}),(e=C.tileCropFromBounds(t))&&s.addClass("crop").css({width:e.x+"px",height:e.y+"px"}),a>0&&t.fadeIn(a),i.append(s),t.catch((function(){console.warn("Could not load tile at "+t.toString()),C._remove(t)}))},this.remove=function(t){var e=t.toString(),n=C._activeTiles[e];return n instanceof f&&C._remove(n),delete C._activeTiles[e],n},this._remove=function(t){t.image&&(t.image.parentElement?r(t.image.parentElement).remove():console.log("No parent element to remove "+t.toString(),t),r(t.image).remove())},this._moveToTop=function(t){r.noop(t)},this._getViewBounds=function(){var t=C.map(),e=t.zoom(),n=C._options.tileRounding(e),r=Math.pow(2,e-n),i=t.size(),o=C.displayToLevel({x:0,y:0}),a=C.displayToLevel({x:i.width,y:0}),s=C.displayToLevel({x:0,y:i.height}),u=C.displayToLevel({x:i.width,y:i.height});return{level:n,scale:r,left:Math.min(o.x,a.x,s.x,u.x),right:Math.max(o.x,a.x,s.x,u.x),top:Math.min(o.y,a.y,s.y,u.y),bottom:Math.max(o.y,a.y,s.y,u.y)}},this._purge=function(t,e,n){var r,i;if(C._updating)return C;for(i in n||(n=C._getViewBounds()),C._activeTiles)r=C._activeTiles[i],C._canPurge(r,n,t,e)&&C.remove(r);return C},this.clear=function(){var t,e=[];for(t in C._activeTiles)e.push(C.remove(t));return C._tileTree={},M=[],e},this.reset=function(){return C.clear(),C._cache.clear(),C._queue.initialSize=b,C},this.toLocal=function(t,e){var n=C.map(),r=n.unitsPerPixel(void 0===e?n.zoom():e);return{x:t.x/r,y:C._topDown()*t.y/r}},this.fromLocal=function(t,e){var n=C.map(),r=n.unitsPerPixel(void 0===e?n.zoom():e);return{x:t.x*r,y:C._topDown()*t.y*r}},this._topDown=function(){return C._options.topDown?1:-1},this._getSubLayer=function(t){if(C.canvas()){var e=C.canvas().find("div[data-tile-layer="+t.toFixed()+"]").get(0);return e||(e=r('<div class=geo-tile-layer data-tile-layer="'+t.toFixed()+'"/>').get(0),C.canvas().append(e)),e}},this._updateSubLayers=function(t,e){var n=C.canvas(),i=parseInt(n.attr("lastlevel"),10),o=parseInt(n.attr("lastoffsetx")||0,10),a=parseInt(n.attr("lastoffsety")||0,10);if(i===t&&Math.abs(o-e.left)<65536&&Math.abs(a-e.top)<65536)return{x:o,y:a};var s=C.map(),u=C._tileOffset(t),l=parseInt((e.left+e.right-s.size().width)/2+u.x,10),c=parseInt((e.top+e.bottom-s.size().height)/2+u.y,10);return n.find(".geo-tile-layer").each((function(e,n){var i=r(n),o=parseInt(i.data("tileLayer"),10);i.css("transform","scale("+Math.pow(2,t-o)+")");var a=parseInt(l/Math.pow(2,t-o),10),s=parseInt(c/Math.pow(2,t-o),10),u=a-parseInt(i.attr("offsetx")||0,10),h=s-parseInt(i.attr("offsety")||0,10);i.attr({offsetx:a,offsety:s}),i.find(".geo-tile-container").each((function(t,e){r(e).css({left:parseInt(r(e).css("left"),10)-u+"px",top:parseInt(r(e).css("top"),10)-h+"px"})}))})),n.attr({lastoffsetx:l,lastoffsety:c,lastlevel:t}),{x:l,y:c}},this._update=function(t){if(t&&t.event&&(t.event.event===s.zoom||t.event.event===s.rotate))return C;if(!C.visible())return C;var e,n=C.map(),i=n.bounds(void 0,null),o=n.zoom(),a=C._options.tileRounding(o);if(C._updateSubLayers){var u=C._getViewBounds(),l=C._updateSubLayers(a,u)||{x:0,y:0},c=C._tileOffset(a);if(null===C.renderer()){var h=Math.pow(2,o-a),f=n.rotation(),d=-c.x+-(u.left+u.right)/2+l.x,p=-c.y+-(u.bottom+u.top)/2+l.y,g=d+n.size().width/2,v=p+n.size().height/2;C.canvas().css({"transform-origin":-d+"px "+-p+"px"});var y="translate("+g+"px,"+v+"px)scale("+h+")";f&&(y+="rotate("+180*f/Math.PI+"deg)"),C.canvas().css("transform",y)}C.canvas().attr({scale:Math.pow(2,o-a),dx:-c.x+-(u.left+u.right)/2,dy:-c.y+-(u.bottom+u.top)/2,offsetx:l.x,offsety:l.y,rotation:n.rotation()})}if(void 0===(e=C._getTiles(a,i,!0,!0)))return C;if(C._tileTree={},e.forEach((function(t){if(t.fetched())delete w[t.toString()],C.drawTile(t),C._setTileTree(t);else{if(t._queued)(C._queue?C._queue.get(t):-1)>=0&&C._queue.add(t);else t.then((function(){if(!m&&t===C.cache.get(t.toString())){var e=n.zoom(),r=C._options.tileRounding(e),i=C._getViewBounds();C._canPurge(t,i,r)?C.remove(t):(C.drawTile(t),C._setTileTree(t))}})),t._queued=!0;C.addPromise(t),w[t.toString()]=t}})),r.when.apply(r,e).done((function(){var t=C.map().zoom(),e=C._options.tileRounding(t);C._purge(e,!0)})),"all"!==C._options.idleAfter)for(var x in w){var _=w[x];e.indexOf(_)<0&&(C.removePromise(_),delete w[x])}return C},this._setTileTree=function(t){if(!C._options.keepLower){var e=t.index;C._tileTree[e.level]=C._tileTree[e.level]||{},C._tileTree[e.level][e.x]=C._tileTree[e.level][e.x]||{},C._tileTree[e.level][e.x][e.y]=t}},this._getTileTree=function(t){return((C._tileTree[t.level]||{})[t.x]||{})[t.y]||null},this._isCovered=function(t){var e=t.index.level,n=t.index.x,r=t.index.y,i=[];return(i=C._getTileTree({level:e-1,x:Math.floor(n/2),y:Math.floor(r/2)}))?[i]:(i=[C._getTileTree({level:e+1,x:2*n,y:2*r}),C._getTileTree({level:e+1,x:2*n+1,y:2*r}),C._getTileTree({level:e+1,x:2*n,y:2*r+1}),C._getTileTree({level:e+1,x:2*n+1,y:2*r+1})]).every((function(t){return null!==t}))?i:null},this._outOfBounds=function(t,e){var n=C._tileOffset(t.index.level),r=1;return t.index.level!==e.level&&(r=Math.pow(2,(e.level||0)-(t.index.level||0))),(t.bottom-n.y)*r<e.top||(t.left-n.x)*r>e.right||(t.top-n.y)*r>e.bottom||(t.right-n.x)*r<e.left},this._canPurge=function(t,e,n,r){if(C._options.keepLower){if((n=n||0)<t.index.level&&t.index.level!==C._options.minLevel)return!0;if(t.index.level===C._options.minLevel&&!C._options.wrapX&&!C._options.wrapY)return!1}else if((r||C._isCovered(t))&&n!==t.index.level&&(n>=C._options.minLevel||t.index.level!==C._options.minLevel)&&(n<C._options.maxLevel||t.index.level!==C._options.maxLevel))return!0;return!!e&&C._outOfBounds(t,e)},this.displayToLevel=function(t,e){var n,r=C.map(),i=r.zoom(),o=C._options.tileRounding(i),a=r.unitsPerPixel(void 0===e?o:e);if(void 0===t){var s=r.size();t={x:s.width/2,y:s.height/2}}try{n=r.displayToGcs(t,C._options.gcs||null)}catch(t){n={x:0,y:0}}return{x:n.x/a,y:C._topDown()*n.y/a}},this.url=function(t){return void 0===t?C._options.originalUrl:(t===C._options.originalUrl||(C._options.originalUrl=t,"string"===r.type(t)&&(t=a(t)),C._options.url=t,C.reset(),C.map().draw()),C)},this.subdomains=function(t){return void 0===t?C._options.subdomains:(t&&("string"===r.type(t)&&(t=t.indexOf(",")>=0?t.split(","):t.split("")),C._options.subdomains=t,C.reset(),C.map().draw()),C)},this._tileOffset=function(t){return void 0===E[t]&&(E[t]=C._options.tileOffset(t)),E[t]},this.visible=function(t){return void 0===t?x():(C.visible()!==t&&(x(t),t&&C._update()),C)},this.nearestPixel=function(t,e){return void 0===t?T:(T!==t&&(T=t,e||(C.modified(),C._update())),C)},Object.defineProperty(this,"baseQuad",{get:function(){return C._options.baseQuad},set:function(t){C._options.baseQuad=t,C._update()}}),this._addBaseQuadToTiles=function(t,e){t&&(this.baseQuad!==g&&(g&&e.splice(0,1),(g=this.baseQuad)&&(e.splice(0,0,this.baseQuad),t.cacheUpdate(0)),t.data(e)),t._update())},this._init=function(){var t;if(v.apply(C,arguments),null===C.renderer())for(t=0;t<=C._options.maxLevel;t+=1)C._getSubLayer(t);return C},this._exit=function(){return C.reset(),y.apply(C,arguments),m=!0,this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(C)>=0&&(this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(C),1),this._queue.initialTrack&&this._queue.track&&this._queue._tileLayers.length&&(this._queue.track=this._queue.initialTrack*this._queue._tileLayers.length)),C},h("tile",this),this};s.defaults={minLevel:0,maxLevel:18,tileOverlap:{x:0,y:0},tileWidth:256,tileHeight:256,wrapX:!0,wrapY:!1,url:null,subdomains:"abc",tileOffset:function(t){return{x:0,y:0}},tilesMaxBounds:null,topDown:!1,keepLower:!0,idleAfter:"view",tileRounding:Math.round,attribution:"",animationDuration:0},r(s,i),t.exports=s},6618:function(t){var e=0;t.exports=function t(){"use strict";if(!(this instanceof t))return new t;var n=this,r=0;return this.modified=function(){return r=e+=1,n},this.timestamp=function(){return r},this.getMTime=this.timestamp,this}},6223:function(t,e,n){var r=n(5699),i=n(6837),o=n(4647),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638),s=n(6853);e=e||{},i.call(this,e);var u,l,c,h,f,d=this,p={},m={startTime:void 0!==e.startTime?e.startTime:null,endTime:void 0!==e.endTime?e.endTime:null,duration:void 0!==e.duration?e.duration:null,start:0,end:0},g=this.draw,v=this._exit,y=this._init,x=this.modified,_=this.style,b=this._update;return this.featureType="track",this._linePosition=function(t){return function(e,n,r,i){var o=m.timeFunc(e,n,r,i);return"past"===t&&o>=m.start||"current"===t&&o<m.start?m.startPosition[i]:"current"===t&&o>m.end||"future"===t&&o<m.end?m.endPosition[i]:m.positionFunc(e,n,r,i)}},this._headPosition=function(t,e){return m.endPosition[e]},this._headText=function(t,e){return m.text[e]},this._updateTimeRange=function(){null!==m.endTime||null===m.endTime&&(null===m.startTime||null==m.duration)?(m.end=null!==m.endTime?m.endTime:m.timeExtents.end,null!==m.startTime&&(null===m.endTime||m.startTime<=m.endTime)?m.start=m.startTime:null!==m.duration?m.start=m.end-m.duration:m.start=m.timeExtents.start):(m.start=m.startTime,m.end=m.start+m.duration)},this.calculateTimePosition=function(t,e,n){d.dataTime().timestamp()>=d.buildTime().timestamp()&&d._build(),e=null===e?d.layer().map().gcs():void 0===e?d.gcs():e;var r=s({source:d.gcs(),target:e}),i=d.data(),o=[],a=i.map((function(e,n){var r=m.trackFunc(e,n);if(o.push(r),!r.length)return{x:0,y:0,z:0,posidx:-1};var i,a,s,u,l=0,c=r.length-1;if(1===r.length)return{posidx:l,angidx0:l,angidx1:l};if((i=m.timeFunc(r[l],l,e,n))>=t)return{posidx:l,angidx0:l,angidx1:l+1};if((a=m.timeFunc(r[c],c,e,n))<=t)return{posidx:c,angidx0:c-1,angidx1:c};for(;c-l>1;){if(s=Math.floor((c+l)/2),(u=m.timeFunc(r[s],s,e,n))===t)return{posidx:s,angidx0:s-1,angidx1:s+1};u<t?(i=u,l=s):(a=u,c=s)}var h=(t-i)/(a-i);return{posidx0:l,posidx1:c,factor0:1-h,factor1:h,angidx0:l,angidx1:c}}));return a.forEach((function(t,e){var i,a,s;t.posidx<0||(void 0===t.posidx1?i=m.positionFunc(o[e][t.posidx],t.posidx,o[e],e):(a=r.forward(m.positionFunc(o[e][t.posidx0],t.posidx0,o[e],e),!0),s=r.forward(m.positionFunc(o[e][t.posidx1],t.posidx1,o[e],e),!0),i=r.inverse({x:a.x*t.factor0+s.x*t.factor1,y:a.y*t.factor0+s.y*t.factor1,z:(a.z||0)*t.factor0+(s.z||0)*t.factor1},!0)),t.x=i.x,t.y=i.y,t.z=i.z||0,n&&(void 0===t.posidx1&&(a=r.forward(t.angidx0===t.posidx?i:m.positionFunc(o[e][t.angidx0],t.angidx0,o[e],e),!0),s=r.forward(t.angidx1===t.posidx?i:m.positionFunc(o[e][t.angidx1],t.angidx1,o[e],e),!0)),t.angle=Math.atan2(s.y-a.y,s.x-a.x)))})),a},this._build=function(){d.buildTime().modified(),u||(u={past:d.layer().createFeature("line"),future:d.layer().createFeature("line"),current:d.layer().createFeature("line")},d.dependentFeatures([u.past,u.current,u.future]));var t=d.data();m.data=t,m.timeFunc=d.style.get("time"),m.positionFunc=d.style.get("position"),m.trackFunc=d.style.get("track"),m.textFunc=d.style.get("text"),["past","current","future"].forEach((function(e){u[e].style(d.style()).style(d[e+"Style"]()).line(d.style("track")).gcs(d.gcs()).data(t).position(d._linePosition(e))}));var e,n,r={};if(t.forEach((function(t,e){var n,i=m.trackFunc(t,e);i.length&&(n=m.timeFunc(i[0],0,t,e),(void 0===r.start||n<r.start)&&(r.start=n),i.length>1&&(n=m.timeFunc(i[i.length-1],i.length-1,t,e)),(void 0===r.end||n>r.end)&&(r.end=n))})),m.timeExtents=r,d._updateTimeRange(),m.startPosition=d.calculateTimePosition(m.start,null),m.endPosition=d.calculateTimePosition(m.end,null,!0),m.text=t.map((function(t,r){var i=m.textFunc(t,r);return e|=null==i,null==i||""===i?"":(n=!0,m.startPosition[r].posidx<0&&(i=""),i)})),e&&!c){if(!(o.registries.features[d.layer().rendererName()]||{}).marker){var i=o.rendererForFeatures(["marker"]);l=o.createLayer("feature",d.layer().map(),{renderer:i}),d.layer().addChild(l),d.layer().node().append(l.node())}c=(l||d.layer()).createFeature("marker");var a=d.dependentFeatures();a.push(c),d.dependentFeatures(a)}if(n&&!f){if(!(o.registries.features[d.layer().rendererName()]||{}).text){var s=o.rendererForFeatures(["text"]);h=o.createLayer("feature",d.layer().map(),{renderer:s}),d.layer().addChild(h),d.layer().node().append(h.node())}f=(h||d.layer()).createFeature("text");var p=d.dependentFeatures();p.push(f),d.dependentFeatures(p)}if(c){c.headData=m.endPosition,c.style(d.markerStyle()).gcs(d.gcs()).data(t).position(d._headPosition);var g=c.style.get("radius");c.style("radius",(function(t,e){return m.text[e]||m.startPosition[e].posidx<0?0:g(t,e)}))}return f&&(f.headData=m.endPosition,f.style(d.textStyle()).gcs(d.gcs()).data(t).text(d._headText).position(d._headPosition)),d},this._updateTimeAndPosition=function(){u&&(d._updateTimeRange(),m.startPosition=d.calculateTimePosition(m.start,null),m.endPosition=d.calculateTimePosition(m.end,null,!0),u.past.modified(),u.current.modified(),u.future.modified(),c&&c.modified(),f&&f.modified(),d.updateTime().modified(),d.modified())},this._update=function(){return b.call(d),(d.dataTime().timestamp()>=d.buildTime().timestamp()||d.updateTime().timestamp()<=d.timestamp())&&d._build(),d.updateTime().modified(),d},this.draw=function(){var t=g();return u&&(u.past.draw(),u.current.draw(),u.future.draw()),c&&c.draw(),f&&f.draw(),t},this.modified=function(){var t=x();return u&&(u.past.modified(),u.current.modified(),u.future.modified()),c&&c.modified(),f&&f.modified(),t},this.style=function(t,e,n){return"style"===(n=n||"style")?_(t,e):void 0===t?p[n]:"string"==typeof t&&void 0===e?(p[n]||{})[t]:(void 0===p[n]&&(p[n]={}),void 0===e?p[n]=r.extend(!0,p[n],t):p[n][t]=e,d.modified(),d)},this.style.get=_.get,["markerStyle","textStyle","pastStyle","currentStyle","futureStyle"].forEach((function(t){d[t]=function(e,n){return d.style(e,n,t)}})),this.track=function(t){return void 0===t?d.style("track"):(d.style("track",t),d.dataTime().modified(),d.modified(),d)},this.position=function(t){return void 0===t?d.style("position"):(d.style("position",t),d.dataTime().modified(),d.modified(),d)},this.time=function(t){return void 0===t?d.style("time"):(d.style("time",t),d.dataTime().modified(),d.modified(),d)},this.timeRange=function(t){if(void 0===t)return{startTime:m.startTime,endTime:m.endTime,duration:m.duration,start:m.start,end:m.end,minimum:(m.timeExtents||{}).start,maximum:(m.timeExtents||{}).end};var e=!1;return void 0!==t.startTime&&t.startTime!==m.startTime&&(m.startTime=null===t.startTime?t.startTime:+t.startTime,e=!0),void 0!==t.endTime&&t.endTime!==m.endTime&&(m.endTime=null===t.endTime?t.endTime:+t.endTime,e=!0),void 0!==t.duration&&t.duration!==m.duration&&(m.duration=null===t.duration?t.duration:+t.duration,e=!0),e&&d._updateTimeAndPosition(),d},this.startTime=function(t){return void 0===t?m.startTime:(t!==m.startTime&&(m.startTime=null===t?t:+t,d._updateTimeAndPosition()),d)},this.endTime=function(t){return void 0===t?m.endTime:(t!==m.endTime&&(m.endTime=null===t?t:+t,d._updateTimeAndPosition()),d)},this.duration=function(t){return void 0===t?m.duration:(t!==m.duration&&(m.duration=null===t?t:+t,d._updateTimeAndPosition()),d)},this._mergeSearchResults=function(t,e){return t.extra=t.extra||{},e.forEach((function(e){return e.value.index.forEach((function(n,r){t.index.indexOf(n)<0&&(t.index.push(n),t.found.push(e.value.found[r]),t.where=t.where||{},e.value.extra&&e.value.extra[n]&&(t.extra[n]=e.value.extra[n]),a.isObject(t.extra[n])||(t.extra[n]={value:t.extra[n]}),t.extra[n].where=e.key)}))})),t},this.pointSearch=function(t){var e=u.current.pointSearch(t),n=u.past.pointSearch(t),r=u.future.pointSearch(t),i=c?c.pointSearch(t):{index:[]};return this._mergeSearchResults(e,[{key:"marker",value:i},{key:"past",value:n},{key:"future",value:r}])},this.polygonSearch=function(t,e){var n=u.current.polygonSearch(t,e),r=u.past.polygonSearch(t,e),i=u.future.polygonSearch(t,e),o=c?c.polygonSearch(t,e):{index:[]};return this._mergeSearchResults(n,[{key:"marker",value:o},{key:"past",value:r},{key:"future",value:i}])},this._exit=function(){u&&d.layer()&&(d.layer().deleteFeature(u.past),d.layer().deleteFeature(u.current),d.layer().deleteFeature(u.future)),u=null,(l||d.layer())&&c&&(l||d.layer()).deleteFeature(c),l&&d.layer()&&d.layer().removeChild(l),l=null,(h||d.layer())&&f&&(h||d.layer()).deleteFeature(f),h&&d.layer()&&d.layer().removeChild(h),h=null,d.dependentFeatures([]),v()},this._init=function(t){t=t||{},y.call(d,t);var e=r.extend(!0,{},{track:a.identityFunction,position:a.identityFunction,time:function(t,e){return void 0!==t.t?t.t:e},uniformLine:"drop",closed:!1},void 0===t.style?{}:t.style),n=r.extend(!0,{},{rotateWithMap:!0,rotation:function(t,e){return-m.endPosition[e].angle||0}},void 0===t.markerStyle?{}:t.markerStyle),i=r.extend(!0,{},{rotateWithMap:!0,rotation:function(t,e){return void 0!==m.endPosition[e].angle?-m.endPosition[e].angle+Math.PI/2:0}},void 0===t.textStyle?{}:t.textStyle),o=r.extend(!0,{},{strokeOpacity:.25},void 0===t.pastStyle?{}:t.pastStyle),s=r.extend(!0,{},{},void 0===t.currentStyle?{}:t.currentStyle),u=r.extend(!0,{},{strokeOpacity:.25},void 0===t.futureStyle?{}:t.futureStyle);["track","position","time"].forEach((function(n){void 0!==t[n]&&(e[n]=t[n])})),d.style(e),d.markerStyle(n),d.textStyle(i),d.pastStyle(o),d.currentStyle(s),d.futureStyle(u)},this};r(s,i),t.exports=s},6853:function(t,e,n){var r=n(4252),i=n(5365),o=n(5240),a=n(4634);r=r.__esModule?r.default:r;var s=n(1103);s.keys().forEach((function(t){r.Proj.projections.add(s(t))}));var u={},l=/^(.* |)\+axis=e(n|s)u(| .*)$/,c=/(^|\s)\+(s[1-3][1-3]|[xyz]off)=\S/,h=function t(e){"use strict";if(!(this instanceof t))return(e=e||{}).source in u||(Object.keys(u).length>=10&&(u={}),u[e.source]={}),e.target in u[e.source]||(Object.keys(u[e.source]).length>=10&&(u[e.source]={}),u[e.source][e.target]=new t(e)),u[e.source][e.target];var n,s,l,h,f,d,p,m=this,g={s11:0,s12:4,s13:8,xoff:12,s21:1,s22:5,s23:9,yoff:13,s31:2,s32:6,s33:10,zoff:14};function v(t){if(!c.exec(t))return{proj:t};var e,n,r=a.mat4AsArray(),i=[];return t.split(/(\s+)/).forEach((function(t){var e=/^\+(s[1-3][1-3]|[xyz]off)=(.*)$/.exec(t);e?r[g[e[1]]]=parseFloat(e[2]):i.push(t)})),n={proj:i.join(" "),orig:t},(e=o.invert(a.mat4AsArray(),r))?(n.matrix=r,n.inverse=e):console.warn("Affine transform is not invertable and will not be used: "+t),n}function y(){var t=v(m.source()),e=v(m.target()),i=t.proj,o=e.proj;h=t.matrix,f=t.inverse,d=e.matrix,p=e.inverse,n=new r(i,o)}this.source=function(t){return void 0===t?s||"EPSG:4326":(s=t,y(),m)},this.target=function(t){return void 0===t?l||"EPSG:3857":(l=t,y(),m)},this._forward=function(t){if(h){var e=i.transformMat4(a.vec3AsArray(),[t.x,t.y,t.z||0],f);t={x:e[0],y:e[1],z:e[2]}}var r=n.forward(t,!0);if(r.z=t.z||0,d){var o=i.transformMat4(a.vec3AsArray(),[r.x,r.y,r.z],d);r={x:o[0],y:o[1],z:o[2]}}return r},this._inverse=function(t){if(d){var e=i.transformMat4(a.vec3AsArray(),[t.x,t.y,t.z||0],p);t={x:e[0],y:e[1],z:e[2]}}var r=n.inverse(t,!0);if(r.z=t.z||0,h){var o=i.transformMat4(a.vec3AsArray(),[r.x,r.y,r.z],h);r={x:o[0],y:o[1],z:o[2]}}return r},this.forward=function(t){return Array.isArray(t)?t.map(m._forward):m._forward(t)},this.inverse=function(t){return Array.isArray(t)?t.map(m._inverse):m._inverse(t)},e=e||{};try{this.source(e.source)}catch(t){console.error("Can't use transform source: "+e.source),this.source("EPSG:4326")}try{this.target(e.target)}catch(t){console.error("Can't use transform target: "+e.target),this.target("EPSG:3857")}return this};h.defs=r.defs,h.lookup=function(t){var e,i,o=n(5638),a=o.Deferred();return r.defs.hasOwnProperty(t)?a.resolve(r.defs[t]):2!==(i=t.split(":")).length||"EPSG"!==i[0].toUpperCase()?a.reject("Invalid projection code").promise():(e=i[1],o.ajax({url:"https://epsg.io/?q="+e+"&format=json"}).done((function(e){var n=(e.results||[])[0];return n&&n.proj4?(r.defs(t,n.proj4),o.when(r.defs[t])):a.reject(e).promise()})))},h.transformCoordinates=function(t,e,n,r){"use strict";if(t===e||Array.isArray(n)&&!n.length)return n;if(Array.isArray(n)&&n.length>=3&&3===r&&!a.isObject(n[0])&&!c.test(t)&&!c.test(e))return h.transformCoordinatesFlatArray3(t,e,n);if(Array.isArray(n)&&n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]){var i=t.match(l),o=e.match(l);if(i&&o&&i[1]===o[1]&&i[3]===o[3])return"z"in n[0]?n.map((function(t){return{x:+t.x,y:-t.y,z:+t.z||0}})):n.map((function(t){return{x:+t.x,y:-t.y}}))}var s,u=h({source:t,target:e});return a.isObject(n)&&"x"in n&&"y"in n?(s=u.forward({x:+n.x,y:+n.y,z:+n.z||0},!0),"z"in n?s:{x:s.x,y:s.y}):Array.isArray(n)&&1===n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]?(s=u.forward({x:+n[0].x,y:+n[0].y,z:+n[0].z||0},!0),"z"in n[0]?[s]:[{x:s.x,y:s.y}]):h.transformCoordinatesArray(u,n,r)},h.transformCoordinatesArray=function(t,e,n){var r,i,o,s,u,l,c,h,f,d={};function p(){if(Array.isArray(e[0]))if(2===e[0].length)s=function(t){return+e[t][0]},u=function(t){return+e[t][1]},c=function(t,e,n){h[t]=[e,n]};else{if(3!==e[0].length)throw new Error("Invalid coordinates. Requires two or three components per array");s=function(t){return+e[t][0]},u=function(t){return+e[t][1]},l=function(t){return+e[t][2]},c=function(t,e,n,r){h[t]=[e,n,r]}}else if(2===e.length)o=2,s=function(t){return+e[t*o]},u=function(t){return+e[t*o+1]},c=function(t,e,n){h[t]=e,h[t+1]=n};else if(3===e.length)o=3,s=function(t){return+e[t*o]},u=function(t){return+e[t*o+1]},l=function(t){return+e[t*o+2]},c=function(t,e,n,r){h[t]=e,h[t+1]=n,h[t+2]=r};else{if(!n)throw new Error("Invalid coordinates");if(2!==n&&3!==n)throw new Error("Number of components should be two or three");o=n,s=function(t){return+e[t]},u=function(t){return+e[t+1]},2===n?c=function(t,e,n){h[t]=e,h[t+1]=n}:(l=function(t){return+e[t+2]},c=function(t,e,n,r){h[t]=e,h[t+1]=n,h[t+2]=r})}}if(l=function(){return 0},!Array.isArray(e))throw new Error("Coordinates are not valid");if((h=[]).length=e.length,i=e.length,!e.length)return h;for(Array.isArray(e[0])||a.isObject(e[0])?(o=1,Array.isArray(e[0])?p():a.isObject(e[0])&&function(){if(!(e[0]&&"x"in e[0]&&"y"in e[0]))throw new Error("Invalid coordinates");s=function(t){return+e[t].x},u=function(t){return+e[t].y},"z"in e[0]?(l=function(t){return+e[t].z},c=function(t,e,n,i){h[r]={x:e,y:n,z:i}}):c=function(t,e,n){h[t]={x:e,y:n}}}()):p(),r=0;r<i;r+=o)d.x=s(r),d.y=u(r),d.z=l(r),f=t.forward(d,!0),c(r,f.x,f.y,f.z);return h},h.transformCoordinatesFlatArray3=function(t,e,n){"use strict";var i,o=t.match(l),a=e.match(l);if(o&&a&&o[1]===a[1]&&o[3]===a[3]){for(i=n.length-3+1;i>=0;i-=3)n[i]*=-1;return n}var s,u=r.Proj(t),c=r.Proj(e),h={},f=new r(u,c);for(i=n.length-3;i>=0;i-=3)h.x=+n[i],h.y=+n[i+1],h.z=+(n[i+2]||0),s=f.forward(h,!0),n[i]=s.x,n[i+1]=s.y,n[i+2]=void 0===s.z?h.z:s.z;return n},h.affineForward=function(t,e){"use strict";var n,r=t.origin,i=t.scale||{x:1,y:1,z:1};for(n=0;n<e.length;n+=1)e[n].x=(e[n].x-r.x)*i.x,e[n].y=(e[n].y-r.y)*i.y,e[n].z=((e[n].z||0)-(r.z||0))*i.z;return e},h.affineInverse=function(t,e){"use strict";var n,r=t.origin,i=t.scale||{x:1,y:1,z:1};for(n=0;n<e.length;n+=1)e[n].x=e[n].x/i.x+r.x,e[n].y=e[n].y/i.y+r.y,e[n].z=(e[n].z||0)/i.z+(r.z||0);return e},h.sphericalDistance=function(t,e,n,i,o){if(i=i||"EPSG:4326",o=o||r.WGS84,(n=n||i)!==i){var a=h.transformCoordinates(n,i,[t,e]);t=a[0],e=a[1]}var s=t.y*Math.PI/180,u=e.y*Math.PI/180,l=(e.x-t.x)*Math.PI/180,c=Math.sin(s),f=Math.cos(s),d=Math.sin(u),p=Math.cos(u),m=Math.atan2(Math.pow(Math.pow(p*Math.sin(l),2)+Math.pow(f*d-c*p*Math.cos(l),2),.5),c*d+f*p*Math.cos(l));return o.a*m},h.vincentyDistance=function(t,e,n,i,o,a){if(i=i||"EPSG:4326",o=o||r.WGS84,a=a||100,(n=n||i)!==i){var s=h.transformCoordinates(n,i,[t,e]);t=s[0],e=s[1]}var u,l,c,f,d,p,m,g,v,y,x=o.a,_=o.b||o.a*(1-(o.f||1/o.rf)),b=o.f||(o.rf?1/o.rf:1-_/x),M=t.y*Math.PI/180,w=e.y*Math.PI/180,A=((e.x-t.x)%360+360)%360*Math.PI/180,T=Math.atan((1-b)*Math.tan(M)),C=Math.atan((1-b)*Math.tan(w)),E=Math.sin(T),k=Math.cos(T),S=Math.sin(C),P=Math.cos(C),O=A,L=A+2*Math.PI;if(M===w&&!A)return{distance:0,alpha1:0,alpha2:0};for(y=a;y>0&&Math.abs(O-L)>1e-12;y-=1)u=Math.pow(Math.pow(P*Math.sin(O),2)+Math.pow(k*S-E*P*Math.cos(O),2),.5),l=E*S+k*P*Math.cos(O),c=Math.atan2(u,l),f=k*P*Math.sin(O)/u,L=O,O=A+(1-(m=b/16*(d=1-Math.pow(f,2))*(4+b*(4-3*d))))*b*f*(c+m*u*((p=l-(d?2*E*S/d:0))+m*l*(2*Math.pow(p,2)-1)));return y?{distance:_*(1+(g=d*(x*x-_*_)/(_*_))/16384*(4096+g*(g*(320-175*g)-768)))*(c-(v=g/1024*(256+g*(g*(74-47*g)-128)))*u*(p+v/4*(l*(2*Math.pow(p,2)-1)-v/6*p*(4*u*u-3)*(4*Math.pow(p,2)-3)))),alpha1:Math.atan2(P*Math.sin(O),k*S-E*P*Math.cos(O)),alpha2:Math.atan2(k*Math.sin(O),-E*P+k*S*Math.cos(O))}:void 0},h.onlyInvertedY=function(t,e){var n=t.match(l),r=e.match(l);return n&&r&&n[1]===r[1]&&n[3]===r[3]},h.proj4=r,t.exports=h},3762:function(t){t.exports={}},9219:function(t,e,n){var r=n(2531).d3,i=n(9450),o=n(5699),a=n(4647).registerWidget,s=n(4634),u=n(1946);n(2352);var l=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var n=this,o=[],a=e.width||300,l=e.ticks||6,h=this._init;return this._init=function(){h();var t=n.canvas();r.select(t).attr("class","color-legend-container"),n.popup=r.select(t).append("div").attr("class","color-legend-popup"),e.categories&&n.categories(e.categories)},this._draw=function(){if(r.select(n.canvas()).selectAll("div.geojs-color-legends").remove(),o.length){r.select(n.canvas()).style("display","block");var t=r.select(n.canvas()).append("div").attr("class","geojs-color-legends"),e=a;o.forEach((function(r,i){var o=t.append("div").attr("class","geojs-color-legend");o.append("div").attr("class","geojs-title").text(r.name);var a=o.append("svg").attr({class:"svg",width:e,height:"40px",viewBox:"-20 0 "+e+" 40"});"discrete"===r.type?n._drawDiscrete(a,e-40,r):"continuous"===r.type&&n._drawContinous(a,e-40,r)}))}else r.select(n.canvas()).style("display","none")},this.categories=function(t){return void 0===t?o:(o=n._prepareCategories(t),n._draw(),n)},this.addCategories=function(t){return o=o.concat(n._prepareCategories(t)),n._draw(),n},this.removeCategories=function(t){return o=o.filter((function(e){return-1===t.indexOf(e)})),n._draw(),n},this._prepareCategories=function(t){return t.forEach((function(t){t.color=t.colors.map((function(t){return s.convertColorToHex(t,!0)}))})),t},this._drawDiscrete=function(t,e,i){if(-1===["linear","log","sqrt","pow","quantile","ordinal"].indexOf(i.scale))throw new Error("unsupported scale");var o,a,u,h,f,d,p;if("ordinal"===i.scale)u=r.scale.ordinal().domain(i.domain).range(i.colors),n._renderDiscreteColors(t,i.domain,u,e,(function(t){return t})),h=r.scale.ordinal().domain(i.domain).rangeRoundBands([0,e]),f=r.svg.axis().scale(h).tickValues((function(){var t=Math.ceil(i.domain.length/l);return i.domain.filter((function(e,n){return n%t==0}))}));else if("quantile"===i.scale){o=[0,i.colors.length],d=s.range(0,i.colors.length-1),a=r.scale.quantile().domain(i.domain).range(d),u=r.scale.quantize().domain(o).range(i.colors),n._renderDiscreteColors(t,d,u,e,(function(t){return a.invertExtent(t).join(" - ")}));var m=[a.invertExtent(0)[0]];m=m.concat(d.map((function(t){return a.invertExtent(t)[1]}))),f=v(h=r.scale.ordinal().domain(m).rangePoints([0,e]))}else if(-1!==["linear","log","sqrt","pow"].indexOf(i.scale)){o=[0,i.colors.length],a=r.scale[i.scale]().domain(i.domain).range(o).nice(),u=r.scale.quantize().domain(o).range(i.colors),d=s.range(0,i.colors.length-1);var g=Math.max.apply(null,i.domain.map((function(t){return c(t)})));n._renderDiscreteColors(t,d,u,e,(function(t){return n._popupFormatter(a.invert(t),g)+" - "+n._popupFormatter(a.invert(t+1),g)})),(p=d.slice()).push(i.colors.length),f=v(h=r.scale.ordinal().domain(p.map((function(t){return a.invert(t)}))).rangePoints([0,e]))}function v(t){return r.svg.axis().scale(t).tickFormat(r.format(".2s")).tickValues((function(){var e=Math.ceil(t.domain().length/l);return t.domain().filter((function(t,n){return n%e==0}))}))}i.endAxisLabelOnly&&f.tickValues([h.domain()[0],h.domain()[h.domain().length-1]]),n._renderAxis(t,f)},this._renderDiscreteColors=function(t,e,r,i,o){t.selectAll("rect").data(e).enter().append("rect").attr("width",i/e.length).attr("height","20px").attr("fill",(function(t){return r(t)})).attr("transform",(function(t,n){return"translate("+n*i/e.length+" ,0)"})).on("mousemove",(function(t){n._showPopup(o(t))})).on("mouseout",n._hidePopup)},this._drawContinous=function(t,e,i){var o,a,s;if(-1===["linear","log","sqrt","pow"].indexOf(i.scale))throw new Error("unsupported scale");var h=[0];for(s=1;s<i.domain.length-1;s++)h.push(e/(i.domain.length-1)*s);h.push(e),o=r.scale[i.scale]().domain(i.domain).range(h).nice(),"log"===i.scale&&i.base&&o.base(i.base),"pow"===i.scale&&i.exponent&&o.exponent(i.exponent);var f=u(),d=Math.max.apply(null,i.domain.map((function(t){return c(t)}))),p=t.append("defs").append("linearGradient").attr("id","gradient"+f);for(p.append("stop").attr("offset","0%").attr("stop-color",i.colors[0]),s=1;s<i.colors.length-1;s++)p.append("stop").attr("offset",(100/(i.colors.length-1)*s).toFixed(6)+"%").attr("stop-color",i.colors[s]);p.append("stop").attr("offset","100%").attr("stop-color",i.colors[i.colors.length-1]),t.append("rect").attr("fill","url(#gradient"+f+")").attr("width",e).attr("height","20px").on("mousemove",(function(){var t=o.invert(r.mouse(this)[0]),e=n._popupFormatter(t,d);n._showPopup(e)})).on("mouseout",n._hidePopup),a=r.svg.axis().scale(o).ticks(l,".2s"),i.endAxisLabelOnly&&a.tickValues([i.domain[0],i.domain[i.domain.length-1]]),n._renderAxis(t,a)},this._renderAxis=function(t,e){t.append("g").attr("class","axis x").attr("transform","translate(0, 20)").call((function(t){t.call(e)}))},this._popupFormatter=function(t,e){return t=parseFloat(t.toFixed(8)),e=Math.min(e,c(t)),e=Math.min(e,Math.max(3,7-Math.trunc(t).toString().length)),r.format("."+e+"f")(t)},this._showPopup=function(t){var e=r.mouse(n.canvas());n.popup.text(t);var i=n.canvas().clientWidth,o=n.popup[0][0].clientWidth;n.popup.style({left:e[0]-(e[0]+o-i>-10?o:0)+"px",top:e[1]-22+"px"}).transition().duration(200).style("opacity",1)},this._hidePopup=function(){n.popup.transition().duration(200).style("opacity",0)},this};function c(t){if(!isFinite(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;){if(!isFinite(t*e))return 0;e*=10,n++}return n}o(l,i),a("dom","colorLegend",l),t.exports=l},9450:function(t,e,n){var r=n(8123),i=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var n=this;return this._init=function(){return e.hasOwnProperty("parent")&&e.parent.addChild(n),n._createCanvas(),n._appendCanvasToParent(),n.canvas().addEventListener("mousedown",(function(t){t.stopPropagation()})),n.reposition(),n},this._createCanvas=function(){n.canvas(document.createElement(e.el||"div"))},this};i(a,r),o("dom","dom",a),t.exports=a},253:function(t,e,n){t.exports={colorLegendWidget:n(9219),domWidget:n(9450),legendWidget:n(4364),scaleWidget:n(3362),sliderWidget:n(7093),svgWidget:n(9731),uiLayer:n(6408),widget:n(8123)}},4364:function(t,e,n){var r=n(9731),i=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i=n(2531).d3,o=n(5108),a=this,s=[],u=null,l=null,c=null;this.categories=function(t){return void 0===t?s.slice():(s=t.slice().map((function(t){return"line"===t.type&&(t.style.fill=!1,t.style.stroke=!0),t})),a.draw(),a)},this.size=function(){var t,e=1,n=i.select(a.canvas()).append("text").style("opacity",1e-6);return s.forEach((function(t){n.text(t.name),e=Math.max(e,n.node().getBBox().width)})),n.remove(),t=20*(s.length+1),{width:e+50,height:t}},this.draw=function(){function t(t){t.style("fill",(function(t){return t.style.fill||void 0===t.style.fill?t.style.fillColor:"none"})).style("fill-opacity",(function(t){return void 0===t.style.fillOpacity?1:t.style.fillOpacity})).style("stroke",(function(t){return t.style.stroke||void 0===t.style.stroke?t.style.strokeColor:"none"})).style("stroke-opacity",(function(t){return void 0===t.style.strokeOpacity?1:t.style.strokeOpacity})).style("stroke-width",(function(t){return void 0===t.style.strokeWidth?1.5:t.style.strokeWidth}))}a._init(),c.attr("height",a.size().height+24).style("display",null);var e=a._scale(),n=l.selectAll("g.geo-label").data(s,(function(t){return t.name})).enter().append("g").attr("class","geo-label").attr("transform",(function(t,n){return"translate(0,"+e.y(n)+")"}));return t(n.filter((function(t){return"point"!==t.type&&"line"!==t.type})).append("rect").attr("x",0).attr("y",-6).attr("rx",5).attr("ry",5).attr("width",40).attr("height",12)),t(n.filter((function(t){return"point"===t.type})).append("circle").attr("cx",20).attr("cy",0).attr("r",6)),t(n.filter((function(t){return"line"===t.type})).append("line").attr("x1",0).attr("y1",0).attr("x2",40).attr("y2",0)),n.append("text").attr("x","50px").attr("y",0).attr("dy","0.3em").text((function(t){return t.name})),a.reposition(),a},this._scale=function(){return{x:i.scale.linear().domain([0,1]).range([0,a.size().width]),y:i.scale.linear().domain([0,s.length-1]).range([6,a.size().height-6])}},this._init=function(){u||(a._createCanvas(),a._appendCanvasToParent());var t=a.size().width+24+4,e=a.size().height+24+4;u&&u.remove(),i.select(a.canvas()).attr("width",t).attr("height",e),u=i.select(a.canvas()).append("g"),l=u.append("g").attr("transform","translate("+[14,14]+")"),c=l.append("rect").attr("x",-12).attr("y",-12).attr("width",t-4).attr("height",e-4).attr("rx",3).attr("ry",3).style({stroke:"black","stroke-width":"1.5px",fill:"white","fill-opacity":.75,display:"none"}),l.on("mousedown",(function(){i.event.stopPropagation()})),l.on("mouseover",(function(){c.transition().duration(250).style("fill-opacity",1)})),l.on("mouseout",(function(){c.transition().duration(250).style("fill-opacity",.75)})),a.reposition()},this.geoOn(o.resize,(function(){a.draw()}))};i(a,r),o("dom","legend",a),t.exports=a},3362:function(t,e,n){var r=n(5638),i=n(5699),o=n(9731),a=n(4647).registerWidget;n(4129);var s=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e);var i=n(5108),a=n(6853),s=n(4634),u=n(2531).d3,l=this,c=this._exit,h=r.extend({},{scale:1,maxWidth:200,maxHeight:"left"===e.orientation||"right"===e.orientation?200:20,orientation:"bottom",strokeWidth:2,tickLength:10,units:"si",distance:function(t,e,n){return"+proj=longlat +axis=enu"===n?Math.sqrt(s.distance2dSquared(t,e)):a.sphericalDistance(t,e,n)}},e);this._init=function(){return l._createCanvas(),l._appendCanvasToParent(),l.reposition(),u.select(l.canvas()).attr({width:h.maxWidth,height:h.maxHeight}),l.geoOn(i.pan,l._update),l._render(),l},this._exit=function(){l.geoOff(i.pan,l._update),c()},this._vertical=function(){return"left"===h.orientation||"right"===h.orientation},this._scaleValue=function(e,n,r){var i,o,a,s=[{multiple:1,digits:1},{multiple:1.5,digits:2},{multiple:2,digits:1},{multiple:3,digits:1},{multiple:5,digits:1},{multiple:8,digits:1}],u=(r=t.unitsTable[r]||r||t.unitsTable[h.units]||h.units)[0];return r.forEach((function(t){e>=t.scale*(t.minimum||1)&&(u=t)})),o=Math.floor(Math.log(e/u.scale)/Math.log(u.basis||10)),(s=u.multiples||s).forEach((function(t){var n=u.scale*t.multiple*Math.pow(10,o);n<=e&&(i=t,a=n)})),{html:(i.multiple*Math.pow(10,o)).toFixed(Math.max(0,-o+i.digits-1))+" "+u.unit,value:a,pixels:a/e*n,power:o,multiple:i,unitRecord:u,originalValue:e,originalPixels:n}},this._render=function(){var t,e,n,i,o,a,s=u.select(l.canvas()),c=l.layer().map(),f=h.maxWidth,d=h.maxHeight,p=h.strokeWidth,m=.5*p,g=h.tickLength,v=l._vertical();if(t=(v?h.maxHeight:h.maxWidth)-p,n={x:(e={x:(e=r(s[0][0]).offset()).left+("left"===h.orientation?f-m:m),y:e.top+("top"===h.orientation?d-m:m)}).x+(v?0:t),y:e.y+(v?t:0)},(i=h.distance(c.displayToGcs(e,null),c.displayToGcs(n,null),c.gcs())*h.scale)<=0||!isFinite(i))console.warn("The distance calculated for the scale is invalid: "+i);else{switch(o=l._scaleValue(i,t),v?d=o.pixels+p:f=o.pixels+p,s.attr({width:f,height:d}),s.select("polyline").empty()&&s.append("polyline").classed("geojs-scale-widget-bar",!0).attr({fill:"none","stroke-width":p}),s.select("text").empty()&&s.append("text").classed("geojs-scale-widget-text",!0),h.orientation){case"bottom":a=[[m,g],[m,m],[f-m,m],[f-m,g]],s.select("text").attr({x:f/2,y:2*p,"text-anchor":"middle","dominant-baseline":"hanging"});break;case"top":a=[[m,d-g],[m,d-m],[f-m,d-m],[f-m,d-g]],s.select("text").attr({x:f/2,y:d-2*p,"text-anchor":"middle","dominant-baseline":"alphabetic"});break;case"left":a=[[f-g,m],[f-m,m],[f-m,d-m],[f-g,d-m]],s.select("text").attr({x:f-2*p,y:d/2,"text-anchor":"end","dominant-baseline":"middle"});break;case"right":a=[[g,m],[m,m],[m,d-m],[g,d-m]],s.select("text").attr({x:2*p,y:d/2,"text-anchor":"start","dominant-baseline":"middle"})}s.select("polyline").attr("points",a.map((function(t){return t.join(",")})).join(" ")),s.select("text").html(o.html)}},this._update=function(){l._render()},this.options=function(t,e){if(void 0===t){var n=r.extend({},h);return n.position=l.position(void 0,!0),n}return"string"==typeof t&&void 0===e?"position"===t?l.position(void 0,!0):h[t]:(void 0===e?h=r.extend(!0,h,t):h[t]=e,(t.position||"position"===t)&&l.position(t.position||e),l._render(),l)}};i(s,o),s.unitsTable={si:[{unit:"nm",scale:1e-9},{unit:"μm",scale:1e-6},{unit:"mm",scale:.001},{unit:"m",scale:1},{unit:"km",scale:1e3}],miles:[{unit:"in",scale:.0254},{unit:"in",scale:.0254,basis:12,multiples:[{multiple:1,digits:1},{multiple:1.5,digits:2},{multiple:2,digits:1},{multiple:3,digits:1},{multiple:6,digits:1},{multiple:9,digits:1}]},{unit:"ft",scale:.3048},{unit:"mi",scale:1609.344}],decmiles:[{unit:"mi",scale:1609.344}]},s.areaUnitsTable={si:[{unit:"nm²",scale:1e-18},{unit:"μm²",scale:1e-12},{unit:"mm²",scale:1e-6},{unit:"m²",scale:1},{unit:"km²",scale:1e6}],hectares:[{unit:"ha",scale:1e4}],decmiles:[{unit:"mi²",scale:2589988.110336}],miles:[{unit:"in²",scale:64516e-8},{unit:"ft²",scale:.09290304},{unit:"mi²",scale:2589988.110336}],acres:[{unit:"pl",scale:25.29285264},{unit:"rd",scale:1011.7141056},{unit:"ac",scale:4046.8564224}]},s.formatUnit=function(t,e,n,r){if(null!=t){if(!Array.isArray(e)){if(!(n=n||s.unitsTable)||!n[e||"si"])return;e=n[e||"si"]}var i;for(i=0;i<e.length-1&&!(t<e[i+1].scale);i+=1);if(t/=(e=e[i]).scale,!((r=Math.max(0,-Math.ceil(Math.log10(t))+(void 0===r||r<0?3:r)))>10)){var o=t.toFixed(r);if(r){for(;"0"===o.substr(o.length-1);)o=o.substr(0,o.length-1);"."===o.substr(o.length-1)&&(o=o.substr(0,o.length-1))}return o+" "+e.unit}}},a("dom","scale",s),t.exports=s},7093:function(t,e,n){var r=n(9731),i=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i,o,a,s,u,l,c,h=n(2531).d3,f=n(5108),d=this,p=this._exit,m=e.width||20,g=e.height||160,v=e.width?.5*e.width:10;function y(t,e,n,r,i){var o=e.append("g"),a=i/1024;return o.append("g").append("g").attr("transform","translate("+n+","+r+") scale("+a+") translate(-512,-512)").append("path").attr("d",t).attr("class","geo-glyphicon"),o}c={white:"#f4f4f4",black:"#505050"},this.size=function(){return{width:m,height:g}},this._init=function(){d._createCanvas(),d._appendCanvasToParent(),d.reposition();var t=h.select(d.canvas()),e=d.layer().map();function n(n,r){var i=o.invert(h.mouse(t.node())[1]),a=e.zoomRange();i=(1-i)*(a.max-a.min)+a.min,r?e.transition({zoom:i,ease:h.ease("cubic-in-out"),duration:500,done:d._update()}):(e.zoom(i),d._update()),n.stopPropagation()}function r(){h.select(this).attr("filter",null),l.selectAll("circle,rect,path").transition().duration(100).style("fill",(function(t){return c[t.fill]||null})).style("stroke",(function(t){return c[t.stroke]||null}))}return t.attr("width",m).attr("height",g),i=h.scale.linear().domain([-4,4]).range([0,m]),o=h.scale.linear().domain([0,1]).range([1.5*m,g-1.5*m]),t=t.append("g").classed("geo-ui-slider",!0),l=t,(a=t.append("g")).append("circle").datum({fill:"white",stroke:null}).classed("geo-zoom-in",!0).attr("cx",i(0)).attr("cy",o(0)-m+2).attr("r",(m-2)/2).style({cursor:"pointer"}).on("click",(function(){var t=e.zoom();e.transition({zoom:t+1,ease:h.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){h.event.stopPropagation()})),y("M512 81.92c-237.568 0-430.080 192.614-430.080 430.080 0 237.568 192.563 430.080 430.080 430.080s430.080-192.563 430.080-430.080c0-237.517-192.563-430.080-430.080-430.080zM564.326 564.326v206.182h-104.653v-206.182h-206.234v-104.653h206.182v-206.234h104.704v206.182h206.182v104.704h-206.182z",a,i(0),o(0)-m+2,m+4).style("cursor","pointer").style("pointer-events","none").select("path").datum({fill:"black",stroke:null}),(s=t.append("g")).append("circle").datum({fill:"white",stroke:null}).classed("geo-zoom-out",!0).attr("cx",i(0)).attr("cy",o(1)+m-2).attr("r",(m-2)/2).style({cursor:"pointer"}).on("click",(function(){var t=e.zoom();e.transition({zoom:t-1,ease:h.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){h.event.stopPropagation()})),y("M512 81.92c-237.568 0-430.080 192.614-430.080 430.080 0 237.568 192.563 430.080 430.080 430.080s430.080-192.563 430.080-430.080c0-237.517-192.563-430.080-430.080-430.080zM770.56 459.674v104.704h-517.12v-104.704h517.12z",s,i(0),o(1)+m-2,m+4).style("cursor","pointer").style("pointer-events","none").select("path").datum({fill:"black",stroke:null}),t.append("rect").datum({fill:"white",stroke:"black"}).classed("geo-zoom-track",!0).attr("x",i(0)-m/6).attr("y",o(0)).attr("rx",m/10).attr("ry",m/10).attr("width",m/3).attr("height",g-3*m).style({cursor:"pointer"}).on("click",(function(){n(h.event,!0)})),u=t.append("rect").datum({fill:"black",stroke:null}).classed("geo-zoom-nub",!0).attr("x",i(-4)).attr("y",o(.5)-v/2).attr("rx",3).attr("ry",3).attr("width",m).attr("height",v).style({cursor:"pointer"}).on("mousedown",(function(){h.select(document).on("mousemove.geo.slider",(function(){n(h.event)})),h.select(document).on("mouseup.geo.slider",(function(){n(h.event),h.select(document).on(".geo.slider",null)})),h.event.stopPropagation()})),l.selectAll("*").on("mouseover",(function(){h.select(this).attr("filter","url(#geo-highlight)"),l.selectAll("rect,path,circle").transition().duration(100).style("fill",(function(t){return t.fill||null})).style("stroke",(function(t){return t.stroke||null}))})).on("mouseout",r),d.geoOn(f.zoom,d._update),r(),d._update(),d},this._exit=function(){d.geoOff(f.zoom,d._update),l.remove(),p()},this._update=function(t){var e=d.layer().map(),n=e.zoomRange(),r=e.zoom(),i=h.scale.linear();r=(t=t||{}).value||r,i.domain([n.min,n.max]).range([1,0]).clamp(!0),u.attr("y",o(i(r))-v/2)}};i(a,r),o("dom","slider",a),t.exports=a},9731:function(t,e,n){var r=n(8123),i=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i=n(2531),o=this,a=this._exit,s=null;return this._init=function(){var t;return e.hasOwnProperty("parent")&&(e.parent.addChild(o),t=e.parent.canvas()),o._createCanvas(t),o.canvas().addEventListener("mousedown",(function(t){t.stopPropagation()})),o.reposition(),o},this._exit=function(){s&&s._exit(),a()},this._createCanvas=function(t){var e={layer:o.layer(),widget:!0};t&&(e.d3Parent=t),(s=i(e))._resize=function(){},o.canvas(s.canvas()[0][0])},this};i(a,r),o("dom","svg",a),t.exports=a},6408:function(t,e,n){var r=n(5699),i=n(4647).registerLayer,o=n(9105),a=function t(e){"use strict";var r=n(4647).createWidget;if(e.renderer="dom",e.sticky=!1,!(this instanceof t))return new t(e);o.call(this,e);var i=this,a=this._exit;this.createWidget=function(t,e){var n=r(t,i,e);return e&&"parent"in e||i.addChild(n),n._init(e),i.modified(),n},this.deleteWidget=function(t){return t._exit(),i.removeChild(t),i.modified(),i},this._exit=function(){i.children().forEach((function(t){i.deleteWidget(t)})),a()}};r(a,o),i("ui",a),t.exports=a},8123:function(t,e,n){var r=n(5699),i=n(5358),o=n(5638),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},i.call(this,e);var r=n(5108),a=this,s=this._exit,u=e.layer,l=null,c=void 0===e.position?{left:0,top:0}:e.position;if(!(void 0===e.parent||e.parent instanceof t))throw new Error("Parent must be of type geo.gui.widget");e.parent&&a.parent(e.parent),this._init=function(){return a.modified(),a},this._exit=function(){if(a.children().forEach((function(t){a.removeChild(t),t._exit()})),a.layer().geoOff(r.pan,a.repositionEvent),a.parentCanvas().removeChild&&a.canvas())try{a.parentCanvas().removeChild(a.canvas())}catch(t){}s()},this.layer=function(){return u||a.parent()&&a.parent().layer()},this._createCanvas=function(){throw new Error("Must be defined in derived classes")},this.canvas=function(t){return void 0===t?l:(l=t,a)},this._appendCanvasToParent=function(){a.parentCanvas().appendChild(a.canvas())},this.parentCanvas=function(){return a.parent()?a.parent().canvas():a.layer().canvas()},this.position=function(t,e){if(void 0!==t){a.layer().geoOff(r.pan,a.repositionEvent);var n={};for(var i in c)c.hasOwnProperty(i)&&(n[i]=null);return(c=t).hasOwnProperty("x")&&c.hasOwnProperty("y")&&a.layer().geoOn(r.pan,a.repositionEvent),a.reposition(o.extend(n,a.position())),a}if(c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&!e){var s=a.layer().map().gcsToDisplay(c);return{left:s.x,top:s.y,right:null,bottom:null}}return c},this.reposition=function(t){if(t=t||a.position(),a.canvas()&&a.canvas().style)for(var e in a.canvas().style.position="absolute",t)t.hasOwnProperty(e)&&(/^\s*(-|\+)?(\d+(\.\d*)?|\d*\.\d+)([eE](-|\+)?\d+)?\s*$/.test(t[e])?a.canvas().style[e]=parseFloat(parseFloat(t[e]).toFixed(3))+"px":a.canvas().style[e]=t[e]);return a},this.repositionEvent=function(){return a.reposition()},this.isInViewport=function(){var t=a.position(),e=a.layer();return t.left>=0&&t.top>=0&&t.left<=e.width()&&t.top<=e.height()},c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&this.layer().geoOn(r.pan,a.repositionEvent)};r(a,i),t.exports=a},9808:function(t,e,n){var r=n(5638);function i(t,e,n){this._group=t,this._zoom=e,this._points=[],this._clusters=[],this._count=0,this._parent=null,this._coord=null;var r=this;(n||[]).forEach((function(t){r._add(t)}))}function o(t){var e,o,a=n(5844);for(this._opts=r.extend({maxZoom:18,radius:5},t),this._clusters={},this._points={},e=this._opts.maxZoom;e>=0;e-=1)o=this._opts.radius*Math.pow(2,-e),this._clusters[e]=new a(o),this._points[e]=new a(o);this._topClusterLevel=new i(this,-1)}i.prototype._add=function(t){var e=1;t instanceof i?(this._clusters.push(t),e=t._count):this._points.push(t),t._parent=this,this._increment(e)},i.prototype._increment=function(t){this._coord=null,this._count+=t,this._parent&&this._parent._increment(t)},i.prototype.count=function(){return this._count},i.prototype.each=function(t){var e;for(e=0;e<this._points.length;e+=1)t.call(this,this._points[e],this._zoom);for(e=0;e<this._clusters.length;e+=1)this._clusters[e].each.call(this._clusters[e],t)},i.prototype.coords=function(){var t,e={x:0,y:0};if(this._coord)return this._coord;for(t=0;t<this._points.length;t+=1)e.x+=this._points[t].x,e.y+=this._points[t].y;for(t=0;t<this._clusters.length;t+=1)e.x+=this._clusters[t].coords().x*this._clusters[t].count(),e.y+=this._clusters[t].coords().y*this._clusters[t].count();return{x:e.x/this.count(),y:e.y/this.count()}},o.prototype.addPoint=function(t){var e,n,o,a,s,u;for(e=this._opts.maxZoom;e>=0;e-=1){if(n=this._clusters[e].getNearObject(t))return void n._add(t);if(n=this._points[e].getNearObject(t)){if(o=n._parent)for(u=o._points.length-1;u>=0;u-=1)if(o._points[u]===n){o._points.splice(u,1),o._increment(-1);break}for(o||r.noop(),a=new i(this,e,[n,t]),this._clusters[e].addObject(a,a.coords()),s=a,u=e-1;u>o._zoom;u-=1)s=new i(this,u,[s]),this._clusters[u].addObject(s,s.coords());for(o._add(s),u=e;u>=0&&this._points[u].removeObject(n,n);u-=1);return}this._points[e].addObject(t,t)}this._topClusterLevel._add(t)},o.prototype.points=function(t){return t=Math.min(Math.max(Math.floor(t),0),this._opts.maxZoom-1),this._points[Math.floor(t)].contents()},o.prototype.clusters=function(t){return t=Math.min(Math.max(Math.floor(t),0),this._opts.maxZoom-1),this._clusters[Math.floor(t)].contents()},t.exports=o},7566:function(t,e,n){var r=n(8340),i=n(1485);i=i.__esModule?i.default:i;var o={maxCount:1e3,count:0,memo:{}};function a(t,e){return o.count+=1,o.count>=o.maxCount&&(o.memo={},o.count=0),o.memo[t]=e,e}var s={convertColor:function(t){if(null==t||void 0!==t.r&&void 0!==t.g&&void 0!==t.b)return t;if(void 0!==o.memo[t])return o.memo[t];var e,n=t;if("string"==typeof t){var r=t.toLowerCase();if(i.hasOwnProperty(r))t={r:i[r][0]/255,g:i[r][1]/255,b:i[r][2]/255};else if("#"===t.charAt(0))4===t.length||5===t.length?(5===t.length&&(e=parseInt(t.slice(4),16)/15),t=4352*(3840&(t=parseInt(t.slice(1,4),16)))+272*(240&t)+17*(15&t)):7!==t.length&&9!==t.length||(9===t.length&&(e=parseInt(t.slice(7),16)/255),t=parseInt(t.slice(1,7),16));else if("transparent"===r)e=t=0;else if(r.indexOf("(")>=0)for(var u=0;u<s.cssColorConversions.length;u+=1){var l=s.cssColorConversions[u].regex.exec(r);if(l)return a(n,t=s.cssColorConversions[u].process(r,l))}}return isFinite(t)&&(t={r:((16711680&t)>>16)/255,g:((65280&t)>>8)/255,b:(255&t)/255}),void 0!==e&&t&&void 0!==t.r&&(t.a=e),a(n,t)},convertColorAndOpacity:function(t,e,n){return(t=s.convertColor(t))&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b||(t=s.convertColor(n||{r:0,g:0,b:0})),t&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b||(t={r:0,g:0,b:0}),t={r:isFinite(t.r)&&t.r>=0?t.r<=1?+t.r:1:0,g:isFinite(t.g)&&t.g>=0?t.g<=1?+t.g:1:0,b:isFinite(t.b)&&t.b>=0?t.b<=1?+t.b:1:0,a:r.isNonNullFinite(t.a)&&t.a>=0&&t.a<1?+t.a:1},r.isNonNullFinite(e)&&e<1&&(t.a=e<=0?0:t.a*e),t},convertColorToHex:function(t,e){var n,r=s.convertColor(t);return n=r.r||r.g||r.b?"#"+((1<<24)+(Math.round(255*r.r)<<16)+(Math.round(255*r.g)<<8)+Math.round(255*r.b)).toString(16).slice(1):"#000000",void 0!==r.a&&e&&(r.a<1||"needed"!==e)&&(n+=(256+Math.round(255*r.a)).toString(16).slice(1)),n},convertColorToRGBA:function(t){var e=s.convertColor(t);return e||(e={r:0,g:0,b:0}),(!r.isNonNullFinite(e.a)||e.a>1)&&(e.a=1),"rgba("+Math.round(255*e.r)+", "+Math.round(255*e.g)+", "+Math.round(255*e.b)+", "+ +(+e.a).toFixed(5)+")"},cssAngleUnitsBase:{deg:360,grad:400,rad:2*Math.PI,turn:1},cssNumberRegex:"[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?"};s.cssColorConversions=[{name:"rgb",regex:new RegExp("^\\s*rgba?\\(\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*,?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*,?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*([/,]?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*)?\\)\\s*$"),process:function(t,e){return t={r:Math.min(1,Math.max(0,+e[1]/(e[2]?100:255))),g:Math.min(1,Math.max(0,+e[3]/(e[4]?100:255))),b:Math.min(1,Math.max(0,+e[5]/(e[6]?100:255)))},e[7]&&(t.a=Math.min(1,Math.max(0,+e[8]/(e[9]?100:1)))),t}},{name:"hsl",regex:new RegExp("^\\s*hsla?\\(\\s*("+s.cssNumberRegex+")\\s*(deg|grad|rad|turn)?\\s*,?\\s*("+s.cssNumberRegex+")\\s*%\\s*,?\\s*("+s.cssNumberRegex+")\\s*%\\s*([/,]?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*)?\\)\\s*$"),process:function(t,e){var n=function(t,e,n){return 6*(n-=Math.floor(n))<1?t+(e-t)*n*6:6*n<3?e:6*n<4?t+(e-t)*(2/3-n)*6:t},r=+e[1]/(s.cssAngleUnitsBase[e[2]]||360),i=Math.min(1,Math.max(0,+e[3]/100)),o=Math.min(1,Math.max(0,+e[4]/100)),a=o<=.5?o*(i+1):o+i-o*i,u=2*o-a;return t={r:n(u,a,r+1/3),g:n(u,a,r),b:n(u,a,r-1/3)},e[5]&&(t.a=Math.min(1,Math.max(0,+e[6]/(e[7]?100:1)))),t}}],t.exports=s},8340:function(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}var i=n(5638),o=n(4252);o=o.__esModule?o.default:o;var a,s,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",l='<svg xmlns="http://www.w3.org/2000/svg"><foreignObject width="100%" height="100%"></foreignObject></svg>',c={},h=200,f=15;function d(){var t;for(t=0;t<arguments.length;t+=1)if(isFinite(arguments[t]))return arguments[t]}var p={pointInPolygon:function(t,e,n,r){return e.outer&&(n=e.inner,e=e.outer),!(e.length<3)&&(!(r&&r.min&&r.max&&(t.x<r.min.x||t.y<r.min.y||t.x>r.max.x||t.y>r.max.y))&&p.distanceToPolygon2d(t,n?{outer:e,inner:n}:e,!0)>0)},pointToTriangleBasis2d:function(t,e,n,r){var i=n.x-e.x,o=r.x-e.x,a=n.y-e.y,s=r.y-e.y,u=t.x-e.x,l=t.y-e.y,c=i*s-o*a;if(c)return{x:(u*s-l*o)/c,y:(u*-a+l*i)/c}},isReadyImage:function(t,e){return!!(t instanceof Image&&t.complete&&t.src&&(t.naturalWidth&&t.naturalHeight||e))},isReadyVideo:function(t,e){return!!(t instanceof HTMLVideoElement&&t.src&&void 0!==t.HAVE_CURRENT_DATA&&(t.videoWidth&&t.videoHeight&&t.readyState>=t.HAVE_CURRENT_DATA||e&&t.error))},isFunction:function(t){return"function"==typeof t},ensureFunction:function(t){return p.isFunction(t)?t:function(){return t}},isNonNullFinite:function(t){return isFinite(t)&&null!==t&&!1!==t&&""!==t},randomString:function(t){var e,n,r;for(t=t||8,e="",n=0;n<t;n+=1)r=Math.floor(62*Math.random()),e+=u.substring(r,r+1);return e},normalizeCoordinates:function(t){return t=t||{},Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:{x:d(t.x,t.longitude,t.lng,t.lon,0),y:d(t.y,t.latitude,t.lat,0),z:d(t.z,t.elevation,t.elev,t.height,0)}},range:function(t,e,n){n=n||1;for(var r=[],i=t;i<=e;i+=n)r.push(i);return r},compareArrays:function(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))},vec3AsArray:function(){return[0,0,0]},mat3AsArray:function(){return[1,0,0,0,1,0,0,0,1]},mat4AsArray:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},getGeomBuffer:function(t,e,n,r,i){r=void 0===r?.2:r,i=void 0===i?.1:i;var o=t.sourceByName(e),a=o.data(),s=Math.floor((r+1)*n);if((a=o.data())instanceof Float32Array&&(a.length===n||a.length>=n&&a.length<=s))return a;var u=n;return a instanceof Float32Array&&a.length&&n&&i>0&&(u=Math.floor((i+1)*n)),a=new Float32Array(u),o.setData(a),a},adjustActions:function(t){var e,n;for(n=0;n<t.length;n+=1){if(e=t[n],"string"===i.type(e.input)){var r={};r[e.input]=!0,e.input=r}if(e.modifiers||(e.modifiers={}),"string"===i.type(e.modifiers)){var o={};o[e.modifiers]=!0,e.modifiers=o}}},addAction:function(t,e,n){n?t.push(e):t.unshift(e),p.adjustActions(t)},hasAction:function(t,e,n,r){e&&e.action&&(n=e.name,r=e.owner,e=e.action);for(var i=0;i<t.length;i+=1)if(!(e&&t[i].action!==e||n&&t[i].name!==n||r&&t[i].owner!==r))return t[i];return null},removeAction:function(t,e,n,r){var o,a=0;do{(o=p.hasAction(t,e,n,r))&&(t.splice(i.inArray(o,t),1),a+=1)}while(o);return a},actionMatch:function(t,e,n){var r;if(n.some((function(n){for(var i in n.input)if(n.input.hasOwnProperty(i)&&(!1===n.input[i]&&t[i]||n.input[i]&&!t[i]))return!1;for(var o in n.modifiers)if(n.modifiers.hasOwnProperty(o)&&(!1===n.modifiers[o]&&e[o]||n.modifiers[o]&&!e[o]))return!1;return r=n,!0})))return r},pixelCoordinateParams:function(t,e,n,r,o){var a,s,u;t&&(a=(t=i(t)).innerWidth(),s=t.innerHeight()),o=o||n,u=(r=r||e)!==e||o!==n;var l=Math.min(0,Math.floor(Math.log(Math.min((a||r)/r,(s||o)/o))/Math.log(2))),c=Math.ceil(Math.log(Math.max(e/r,n/o))/Math.log(2));return{map:{node:t,ingcs:"+proj=longlat +axis=esu",gcs:"+proj=longlat +axis=enu",maxBounds:{left:0,top:0,right:e,bottom:n},unitsPerPixel:Math.pow(2,c),center:{x:e/2,y:n/2},min:l,max:c,zoom:l,clampBoundsX:!0,clampBoundsY:!0,clampZoom:!0},layer:{maxLevel:c,wrapX:!1,wrapY:!1,tileOffset:function(){return{x:0,y:0}},attribution:"",tileWidth:r,tileHeight:o,tileRounding:Math.ceil,tilesAtZoom:u?function(t){var i=Math.pow(2,c-t);return{x:Math.ceil(e/r/i),y:Math.ceil(n/o/i)}}:void 0,tilesMaxBounds:u?function(t){var r=Math.pow(2,c-t);return{x:Math.floor(e/r),y:Math.floor(n/r)}}:void 0}}},centerFromPerimeter:function(t){var e,n,r,i,o,a;if(t&&t.outer&&(t=t.outer),t&&t.length){if(1===t.length)return{x:t[0].x,y:t[0].y};for(e={x:0,y:0},o=0,n=t[t.length-1],a=0;a<t.length;a+=1)r=n,n=t[a],i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2)),e.x+=(n.x+r.x)*i,e.y+=(n.y+r.y)*i,o+=2*i;return e.x/=o,e.y/=o,o?e:{x:n.x,y:n.y}}},distance2dSquared:function(t,e){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},distance2dToLineSquared:function(t,e,n){var r=n.x-e.x,i=n.y-e.y,o=r*r+i*i,a=0;return o&&(a=((t.x-e.x)*r+(t.y-e.y)*i)/o,a=Math.max(0,Math.min(1,a))),p.distance2dSquared(t,{x:e.x+a*r,y:e.y+a*i})},distanceToPolygon2d:function(t,e,n){for(var r,i,o=e.outer||e,a=!1,s=0,u=o.length,l=u-1;s<u;l=s,s+=1){var c=o[s],h=o[l];c.y>t.y!=h.y>t.y&&t.x<(h.x-c.x)*(t.y-c.y)/(h.y-c.y)+c.x&&(a=!a),i=n?1:p.distance2dToLineSquared(t,c,h),(void 0===r||i<r)&&(r=i)}return e.inner&&e.inner.forEach((function(e){var i=p.distanceToPolygon2d(t,e,n);i*i<r&&(r=i*i),i>0&&(a=!a)})),(a?1:-1)*Math.sqrt(r)},triangleTwiceSignedArea2d:function(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)},crossedLineSegmentPolygon2d:function(t,e,n){var r,i,o=n.outer||n,a=o.length;for(r=0,i=a-1;r<a;i=r,r+=1)if(p.crossedLineSegments2d(t,e,o[r],o[i]))return!0;if(n.inner)for(r=0;r<n.inner.length;r+=1)if(p.crossedLineSegmentPolygon2d(t,e,n.inner[r]))return!0;return!1},crossedLineSegments2d:function(t,e,n,r){return!(t.x>n.x&&t.x>r.x&&e.x>n.x&&e.x>r.x||t.x<n.x&&t.x<r.x&&e.x<n.x&&e.x<r.x||t.y>n.y&&t.y>r.y&&e.y>n.y&&e.y>r.y||t.y<n.y&&t.y<r.y&&e.y<n.y&&e.y<r.y)&&(!(t.x===n.x&&t.y===n.y||t.x===r.x&&t.y===r.y||e.x===n.x&&e.y===n.y||e.x===r.x&&e.y===r.y)&&!(p.triangleTwiceSignedArea2d(t,e,n)*p.triangleTwiceSignedArea2d(t,e,r)>0||p.triangleTwiceSignedArea2d(n,r,t)*p.triangleTwiceSignedArea2d(n,r,e)>0))},segmentCrossesLineList2d:function(t,e,n){return n.some((function(n){return n.some((function(r,i){return!!i&&p.crossedLineSegments2d(t,e,n[i-1],r)}))}))},rdpLineSimplify:function(t,e,n,r){if(t.length<=2||e<0)return t;var i,o,a,s=-1,u=e*e;if(n){for(i=1;i<t.length;i+=1)(o=p.distance2dSquared(t[0],t[i]))>s&&(s=o,a=i);return 4*s<=u?t.slice(a,a+1):(t=t.slice(a).concat(t.slice(0,a+1)),(t=p.rdpLineSimplify(t,e,!1,r)).splice(t.length-1),t)}for(i=1;i<t.length-1;i+=1)(o=p.distance2dToLineSquared(t[i],t[0],t[t.length-1]))>s&&(s=o,a=i);if(s<=u&&(!r||!p.segmentCrossesLineList2d(t[0],t[t.length-1],r)))return[t[0],t[t.length-1]];var l=t.slice(0,a+1),c=t.slice(a),h=p.rdpLineSimplify(l,e,!1,r?r.concat([c]):null),f=p.rdpLineSimplify(c,e,!1,r?r.concat([l]):null);return h.slice(0,h.length-1).concat(f)},getMinMaxValues:function(t,e,n,r){if(t.length&&(r||!i.isNumeric(e)||!i.isNumeric(n))){var o,a,s=t[0],u=t[0];for(a=t.length-1;a>0;a-=1)(o=t[a])<s&&(s=o),o>u&&(u=o);(!i.isNumeric(e)||r&&s>e)&&(e=s),(!i.isNumeric(n)||r&&u<n)&&(n=u)}return{min:e,max:n}},wrapAngle:function(t){return(t%=2*Math.PI)<-Math.PI?t+=2*Math.PI:t>=Math.PI&&(t-=2*Math.PI),t},escapeUnicodeHTML:function(t){return t.replace(/./g,(function(t){var e=t.charCodeAt(0);return e<127?t:"&#"+e.toString(10)+";"}))},dereferenceElements:function(t){var e=[];return i("img,image",t).each((function(){var t=i(this),n=t.is("image")?"href":"src";if(t.attr(n)){var r=new Image;("http"===t.attr(n).substr(0,4)||t[0].crossOrigin)&&(r.crossOrigin=t[0].crossOrigin||"anonymous");var o=i.Deferred();r.onload=function(){var e=document.createElement("canvas");e.width=r.naturalWidth,e.height=r.naturalHeight,e.getContext("2d").drawImage(r,0,0),t.attr(n,e.toDataURL("image/png")),"data:image"!==t.attr(n).substr(0,10)&&t.remove(),o.resolve()},r.onerror=function(){t.remove(),o.resolve()},r.src=t.attr(n),e.push(o)}})),e},dereferenceCssUrlsRegex:/url\(["']?(http[^)"']+|[^:)"']+)["']?\)/g,dereferenceCssUrls:function(t,e,n,r,o){var a=[],s=[];if(t=(t=t.replace(/\/\*[^\0]*?\*\//g,"")).replace(/\r/g,"\n").replace(/\s+\n/g,"\n").replace(/\n\s+/g,"\n").replace(/\n\n+/g,"\n"),o){var u=/(^[^?#]*)\/[^?#/]*([?#]|$)/g.exec(o);o=u&&u[1]?u[1]+"/":null}t.replace(p.dereferenceCssUrlsRegex,(function(t,e){var n=a.length,r=i.Deferred(),u=new XMLHttpRequest;return a.push(r),s.push(""),/^[^/:][^:]*(\/|$)/g.exec(e)&&o&&(e=o+e),u.open("GET",e,!0),u.responseType="arraybuffer",u.onload=function(){if(200===this.status){var t,e=new Uint8Array(this.response),i=new Array(e.length);for(t=0;t<e.length;t+=1)i[t]=String.fromCharCode(e[t]);i=i.join(""),s[n]="url(data:"+u.getResponseHeader("content-type")+";base64,"+btoa(i)+")"}r.resolve()},u.onerror=r.resolve,u.send(),t})),i.when.apply(i,a).then((function(){var i=0;t=t.replace(p.dereferenceCssUrlsRegex,(function(t,e){return s[(i+=1)-1]})),void 0===r?e.text(t):e.style[r]=t,n.resolve()}))},htmlToImageSupported:function(){if(void 0===s){var t=i.Deferred(),e=i(l);e.attr({width:"10px",height:"10px","text-rendering":"optimizeLegibility"}),i("foreignObject",e).append("<div/>");var n=new Image;return n.onload=n.onerror=function(){var e=document.createElement("canvas");e.width=10,e.height=10,e.getContext("2d").drawImage(n,0,0);try{e.toDataURL(),s=!0}catch(t){console.warn("This browser does not support converting HTML to an image via SVG foreignObject. Some functionality will be limited.",t),s=!1}t.resolve(s)},n.src="data:image/svg+xml;base64,"+btoa(p.escapeUnicodeHTML((new XMLSerializer).serializeToString(e[0]))),t}return s},htmlToImage:function(t,e){var n,r=i.Deferred(),o=[p.htmlToImageSupported()],a=i(t);for(t=i(t).clone();e&&e>0;)(a=a.parent()).is("div")&&((n=i("<div>").attr({class:a.attr("class"),id:a.attr("id")}).css({width:"100%",height:"100%",background:"none",margin:0})).append(t),t=n),e-=1;i("canvas",t).remove(),i("*",t).addBack().each((function(){for(var t=this.style,e=0;e<t.length;e+=1){var n=this.style[e];if(this.style[n].match(p.dereferenceCssUrlsRegex)){var r=i.Deferred();p.dereferenceCssUrls(this.style[n],this,r,n),o.push(r)}}})),(n=i('<div xmlns="http://www.w3.org/1999/xhtml">')).css({width:a.width()+"px",height:a.height()+"px"}),n.append(i("<head>"));var s=i("<body>");return n.append(s),s.css({width:a.width()+"px",height:a.height()+"px",background:"none",margin:0}),s.append(t),o=o.concat(p.dereferenceElements(t)),i('style,link[rel="stylesheet"]').each((function(){var t=i('<style type="text/css">'),e=i.Deferred();if(i(this).is("style")){var r=i(this).text();p.dereferenceCssUrls(r,t,e)}else{var a=i(this).attr("href");i.get(a).done((function(n){p.dereferenceCssUrls(n,t,e,void 0,a)})).fail((function(n,r,i){console.warn("Failed to dereference "+a,r,i),t.remove(),e.resolve()}))}o.push(e),i("head",n).append(t)})),i.when.apply(i,o).then((function(){var t=i(l);t.attr({width:a.width()+"px",height:a.height()+"px","text-rendering":"optimizeLegibility"}),i("foreignObject",t).append(n);var e=new Image;p.htmlToImageSupported()?(e.onload=function(){r.resolve(e)},e.onerror=function(){console.warn("Failed to render html to image"),r.reject()},e.src="data:image/svg+xml;base64,"+btoa(p.escapeUnicodeHTML((new XMLSerializer).serializeToString(t[0])))):r.resolve(e)})),r},timeReport:function(t){return i.each(c,(function(t,e){e.count?(e.stddev=Math.sqrt(Math.abs((e.sum2-e.sum*e.sum/e.count)/e.count)),e.average=e.sum/e.count):(e.stddev=0,e.average=0)})),t?c[t]:c},timeFunctionStart:function(t,e){c[t]&&!e||(c[t]={count:0,sum:0,sum2:0,max:0,recent:[]}),c[t].start=window.performance.now()},timeFunctionStop:function(t){if(c[t]&&c[t].start){var e=window.performance.now()-c[t].start;c[t].start=null,c[t].sum+=e,c[t].sum2+=e*e,c[t].count+=1,c[t].max=Math.max(c[t].max,e),c[t].recent.push(e),c[t].recent.length>h&&c[t].recent.splice(0,c[t].recent.length-h)}},timeRequestAnimationFrame:function(t,e,n,r){c.requestAnimationFrame&&!e||(c.requestAnimationFrame={count:0,sum:0,sum2:0,max:0,above_threshold:0,recent:[],recentsub:[]}),n&&(f=n),r&&(h=r),t&&a?(window.requestAnimationFrame=a,a=null):t||a||(a=window.requestAnimationFrame,window.requestAnimationFrame=function(t){return a.call(window,(function(e){var n,r=c.requestAnimationFrame;r.timestamp!==e&&(r.nowDelta=window.performance.now()-e,Math.abs(r.nowDelta)<1e3&&(r.nowDelta=0),r.timestamp=e,r.subcalls=r.subcalls||0,r.start={sum:r.sum,sum2:r.sum2,count:r.count,max:r.max,above_threshold:r.above_threshold},r.recent.push([0]),r.recentsub.push([]),r.recent.length>h&&(r.recent.splice(0,r.recent.length-h),r.recentsub.splice(0,r.recentsub.length-h))),r.subcalls+=1,t.apply(this,arguments);var i=window.performance.now()-e;i-=r.nowDelta,r.sum=r.start.sum+i,r.sum2=r.start.sum2+i*i,r.count=r.start.count+1,r.max=Math.max(r.max,i),r.above_threshold=r.start.above_threshold+(i>=f?1:0),r.recent[r.recent.length-1]=i,(n=r.recentsub[r.recent.length-1]).push({total_duration:i,duration:i-(n.length?n[n.length-1].total_duration:0),callback:t.name||t})}))})},isObject:function(t){var e=r(t);return null!=t&&("object"===e||"function"===e)},identityFunction:function(t){return t},radiusEarth:o.WGS84.a};t.exports=p},5844:function(t,e,n){var r=n(5638),i={};i.Util={stamp:function(t){return t._leaflet_id=t._leaflet_id||++i.Util.lastId,t._leaflet_id},lastId:0};var o=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}};o.prototype={addObject:function(t,e){var n=this._getCoord(e.x),r=this._getCoord(e.y),o=this._grid,a=o[r]=o[r]||{},s=a[n]=a[n]||[],u=i.Util.stamp(t);e.obj=t,this._objectPoint[u]=e,s.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var n,r,o=this._getCoord(e.x),a=this._getCoord(e.y),s=this._grid,u=s[a]=s[a]||{},l=u[o]=u[o]||[];for(delete this._objectPoint[i.Util.stamp(t)],n=0,r=l.length;n<r;n++)if(l[n]===t)return l.splice(n,1),1===r&&delete u[o],!0},eachObject:function(t,e){var n,r,i,o,a,s,u=this._grid;for(n in u)for(r in a=u[n])for(i=0,o=(s=a[r]).length;i<o;i++)t.call(e,s[i])&&(i--,o--)},getNearObject:function(t){var e,n,r,o,a,s,u,l,c=this._getCoord(t.x),h=this._getCoord(t.y),f=this._objectPoint,d=this._sqCellSize,p=null;for(e=h-1;e<=h+1;e++)if(o=this._grid[e])for(n=c-1;n<=c+1;n++)if(a=o[n])for(r=0,s=a.length;r<s;r++)u=a[r],(l=this._sqDist(f[i.Util.stamp(u)],t))<d&&(d=l,p=u);return p},contents:function(){return r.map(this._objectPoint,(function(t){return t}))},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r}},t.exports=o},4634:function(t,e,n){t.exports=Object.assign(n(8340),n(7566),n(9215),n(895),{DistanceGrid:n(5844),ClusterGroup:n(9808),mesh:n(9244),polyops:n(6771)})},9244:function(t,e,n){t.exports={createColoredMesh:function(t,e){var r,i,o,a,s,u=n(5638),l=n(4634),c=t.mesh,h=t.style.get("value"),f={used:void 0!==t.style("used")?t.style.get("used"):function(t,e){return l.isNonNullFinite(h(t,e))},opacity:t.style.get("opacity"),value:h},d=t._createMesh(e?{}:f,e?f:{});if(d.elementValues=!!e,!d.numVertices||!d.numElements)return d;var p=c.get("stepped")(d),m=c.get("opacityRange")(d),g=c.get("rangeValues")(d);if(d.stepped=!(void 0!==p&&!p),d.colorMap=[],d.minColor=u.extend({a:c.get("minOpacity")(d)||0},l.convertColor(c.get("minColor")(d))),d.maxColor=u.extend({a:c.get("maxOpacity")(d)||0},l.convertColor(c.get("maxColor")(d))),c.get("colorRange")(d).forEach((function(t,e){d.colorMap.push(u.extend({a:m&&void 0!==m[e]?m[e]:1},l.convertColor(t)))})),r=l.getMinMaxValues(d.value,c.get("min")(d),c.get("max")(d)),d.minValue=r.min,d.maxValue=r.max,g&&d.colorMap&&(g.length===d.colorMap.length+1||!p&&g.length===d.colorMap.length)||(g=null),g)for(s=1;s<g.length;s+=1)if(g[s-1]>g[s]){g=null;break}for(g&&(d.minValue=g[0],d.maxValue=g[g.length-1]),(o=d.maxValue-d.minValue)||(d.colorMap=d.colorMap.slice(0,1),o=1,g=null),d.rangeValues=g,d.factor=(d.colorMap.length-(p?0:1))/o,a=0;a<d.value.length;a+=1)if(i=d.value[a],g&&i>=d.minValue&&i<=d.maxValue){for(s=1;s<g.length;s+=1)if(i<=g[s]){d.value[a]=s-1+(i-g[s-1])/(g[s]-g[s-1]);break}}else d.value[a]=(i-d.minValue)*d.factor;return d}}},895:function(t,e,n){var r,i,o=n(5638),a=n(2254);t.exports={},t.exports.mockWebglRenderer=function(t){"use strict";var e=n(5140);if(void 0===t&&(t=!0),e._mocked)throw new Error("webgl renderer already mocked");var s={},u=function(t){s[t]=(s[t]||0)+1},l=function(t){return function(){u(t)}},c=0,h=function(t){return function(){return u(t),c+=1}},f={activeTexture:l("activeTexture"),attachShader:l("attachShader"),bindAttribLocation:l("bindAttribLocation"),bindBuffer:l("bindBuffer"),bindFramebuffer:l("bindFramebuffer"),bindTexture:l("bindTexture"),blendFuncSeparate:l("blendFuncSeparate"),bufferData:l("bufferData"),bufferSubData:l("bufferSubData"),checkFramebufferStatus:function(t){if(u("checkFramebufferStatus"),t===e.GL.FRAMEBUFFER)return e.GL.FRAMEBUFFER_COMPLETE},clear:l("clear"),clearColor:l("clearColor"),clearDepth:l("clearDepth"),compileShader:l("compileShader"),createBuffer:h("createBuffer"),createFramebuffer:l("createFramebuffer"),createProgram:h("createProgram"),createShader:h("createShader"),createTexture:h("createTexture"),deleteBuffer:l("deleteBuffer"),deleteProgram:l("deleteProgram"),deleteShader:l("deleteShader"),deleteTexture:l("deleteTexture"),detachShader:l("detachShader"),depthFunc:l("depthFunc"),disable:l("disable"),disableVertexAttribArray:l("disableVertexAttribArray"),drawArrays:l("drawArrays"),enable:l("enable"),enableVertexAttribArray:l("enableVertexAttribArray"),finish:l("finish"),getError:l("getError"),getExtension:h("getExtension"),getParameter:function(t){switch(u("getParameter"),t){case e.GL.ALIASED_POINT_SIZE_RANGE:return[1,64];case e.GL.DEPTH_BITS:return 16;case e.GL.MAX_TEXTURE_SIZE:return 4096}},getProgramParameter:function(t,n){if(u("getProgramParameter"),n===e.GL.LINK_STATUS)return!0},getShaderInfoLog:function(){return u("getShaderInfoLog"),"log"},getShaderParameter:function(t,n){if(u("getShaderParameter"),n===e.GL.COMPILE_STATUS)return!0},getSupportedExtensions:function(){return u("getSupportedExtensions"),[]},getUniformLocation:h("getUniformLocation"),isEnabled:function(t){if(u("isEnabled"),t===e.GL.BLEND)return!0},linkProgram:l("linkProgram"),pixelStorei:l("pixelStorei"),shaderSource:l("shaderSource"),texImage2D:l("texImage2D"),texParameteri:l("texParameteri"),uniform1iv:l("uniform1iv"),uniform1fv:l("uniform1fv"),uniform2fv:l("uniform2fv"),uniform3fv:l("uniform3fv"),uniform4fv:l("uniform4fv"),uniformMatrix3fv:l("uniformMatrix3fv"),uniformMatrix4fv:l("uniformMatrix4fv"),useProgram:l("useProgram"),vertexAttribPointer:l("vertexAttribPointer"),vertexAttrib3fv:l("vertexAttrib3fv"),viewport:l("viewport")};r=e.renderWindow;e.renderWindow=function t(){e.renderWindow=r;var n,i=new e.renderWindow;return e.renderWindow=t,i._setup=function(){var t,r=i.renderers(),a=i.windowSize(),s=i.windowPosition();for(n=o.extend({},e.GL,f),t=0;t<r.length;t+=1)(r[t].width()>a[0]||0===r[t].width()||r[t].height()>a[1]||0===r[t].height())&&r[t].resize(s[0],s[1],a[0],a[1]);return!0},i.context=function(){return n},i},i=a.supported,a.supported=function(){return!!t},a._maxTextureSize=4096,a._maxPointSize=64,e._mocked=!0,e.mockCounts=function(){return s}},t.exports.restoreWebglRenderer=function(){var t=n(5140);t._mocked&&(t.renderWindow=r,a.supported=i,delete t._mocked,delete t.mockCounts)}},6771:function(t,e,n){function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var o=n(3291),a=n(2804),s=n(8340),u={"+":"union","|":"union",add:"union","-":"difference",sub:"difference",subtract:"difference",minus:"difference","*":"intersect","&":"intersect",mul:"intersect",multiply:"intersect",x:"xor","^":"xor"};function l(t,e,n){for(t="select"+t.charAt(0).toUpperCase()+t.slice(1),o.epsilon(e);n.length>1;){for(var r=[],i=Math.ceil(n.length/2),a=0;a<i;a+=1){var s=n[a];if(a+i<n.length){var u=n[a+i];try{s=o.combine(s,u)}catch(t){s=o.segments(o.polygon(s)),u=o.segments(o.polygon(u));for(var l=20;l>=6;l-=1){o.epsilon(Math.pow(.1,l));try{s=o.combine(s,u);break}catch(t){}}o.epsilon(e)}s.combined?(s.combined=s.combined.filter((function(t){return Math.abs(t.start[0]-t.end[0])>e||Math.abs(t.start[1]-t.end[1])>e})),s=o[t](s)):console.warn("Failed in polygon functions."),s.segments=s.segments.filter((function(t){return Math.abs(t.start[0]-t.end[0])>e||Math.abs(t.start[1]-t.end[1])>e}))}r.push(s)}n=r}return n}function c(t,e,n){if(e=e||{},t.toPolygonList){if(e.style=t,!(t=t.toPolygonList(n)).length)return e.min=e.max=[0,0],e.epsilon=1e-10,t}else{if(e.style="",t.outer?(e.style="-outer",t=[[t.outer].concat(r(t.inner||[]))]):t.length&&t[0].outer&&(e.style="-outer-list",t=t.map((function(t){return[t.outer].concat(r(t.inner||[]))}))),!t.length)return e.style="flat-listlist"+e.style,e.min=e.max=[0,0],e.epsilon=1e-10,t;void 0!==t[0].x?(e.style="object",t=[[t.map((function(t){return[t.x,t.y]}))]]):void 0!==t[0][0].x?(e.style="object-list"+e.style,t=[t.map((function(t){return t.map((function(t){return[t.x,t.y]}))}))]):void 0===t[0][0][0]?(e.style="flat",t=[[t]]):void 0!==t[0][0][0].x?(e.style="object-listlist"+e.style,t=t.map((function(t){return t.map((function(t){return t.map((function(t){return[t.x,t.y]}))}))}))):void 0===t[0][0][0][0]?(e.style="flat-list",t=[t]):e.style="flat-listlist"+e.style}return e.min=[t[0][0][0][0],t[0][0][0][1]],e.max=[t[0][0][0][0],t[0][0][0][1]],t.forEach((function(t){return t.forEach((function(t){return t.forEach((function(t){t[0]<e.min[0]&&(e.min[0]=t[0]),t[0]>e.max[0]&&(e.max[0]=t[0]),t[1]<e.min[1]&&(e.min[1]=t[1]),t[1]>e.max[1]&&(e.max[1]=t[1])}))}))})),e.epsilon=1e-10*Math.max(Math.max(e.max[0],e.max[1]),Math.max(Math.abs(e.min[0]),Math.abs(e.min[1]))),t}function h(t,e,n){return e.style.fromPolygonList?e.style.fromPolygonList(t,n):(e.style.includes("object")&&(t=t.map((function(t){return t.map((function(t){return t.map((function(t){return{x:t[0],y:t[1]}}))}))}))),e.style.includes("outer")&&(t=[t.map((function(t){return{outer:t[0],inner:t.slice(1)}}))]),e.style.endsWith("listlist")||(t=e.style.endsWith("list")?t[0]:t[0][0]),t)}function f(t,e,r,i){var f=n(6853);t=u[t]||t,e.poly1&&(e=(i=e).poly1,r=i.poly2);var d=(i=i||{}).ingcs||(i.map?i.map.ingcs():e.gcs?e.gcs():e.layer&&e.layer().gcs?e.layer().gcs():e.layer?e.layer().map().ingcs():e.map instanceof a?e.map().ingcs():void 0),p=i.ingcs||(i.map?i.map.ingcs():r.gcs?r.gcs():r.layer&&r.layer().gcs?r.layer().gcs():r.layer?r.layer().map().ingcs():r.map instanceof a?r.map().ingcs():d),m=i.gcs||(i.map?i.map.gcs():e.layer?e.layer().map().gcs():e.map instanceof a?e.map().gcs():void 0),g={},v={};e=c(e,g,i),r=c(r,v,i),g.epsilon=i.epsilon1||g.epsilon,v.epsilon=i.epsilon2||g.epsilon,d&&m&&d!==m&&(e=e.map((function(t){return t.map((function(t){return f.transformCoordinates(d,m,t)}))}))),p&&m&&p!==m&&(r=r.map((function(t){return t.map((function(t){return f.transformCoordinates(p,m,t)}))})));var y=e.map((function(t){return o.segments({regions:t})})),x=r.map((function(t){return o.segments({regions:t})}));y=l(i.innerOperation||"union",g.epsilon,y),x=l(i.innerOperation||"union",v.epsilon,x);var _=y;y[0]&&x[0]?(y[0].inverted=!1,x[0].inverted=!1,_=l(t,Math.max(g.epsilon,v.epsilon),[y[0],x[0]])):x[0]&&(_=x);var b,M,w=function(t){var e=[],n=[],r=[],i=[];t.forEach((function(t){return o.polygon(t).regions.forEach((function(t){var e=t.map((function(t){return{x:t[0],y:t[1]}}));e.length<3||(i.push([]),n.forEach((function(t,r){s.pointInPolygon(e[0],t)?i[n.length].push(r):s.pointInPolygon(t[0],e)&&i[r].push(n.length)})),r.push(t),n.push(e))}))}));for(var a=Array(r.length),u=0;u<r.length;){for(var l=0;l<r.length;l+=1)void 0!==a[l]||i[l].length||(a[l]=e.length,e.push([r[l].reverse()]),u+=1);for(var c=0;c<r.length;c+=1)void 0===a[c]&&1===i[c].length&&void 0!==a[i[c][0]]&&(e[a[i[c][0]]].push(r[c]),a[c]=a[i[c][0]],u+=1);for(var h=0;h<r.length;h+=1)i[h]=i[h].filter((function(t){return void 0===a[t]}))}return e.length?e:[[]]}(_);return i.correspond&&function(t,e,n,r){var i={},o=[];n.forEach((function(t,e){return t.forEach((function(t){return t.forEach((function(t){var n="_"+t[0]+"_"+t[1];i[n]?-1===i[n].indexOf(e)&&i[n].push(e):i[n]=[e],o.length<=e&&o.push(0),o[e]+=1}))}))})),["poly1","poly2"].forEach((function(a){var s="poly1"===a?t:e,u="poly1"===a?"exact1":"exact2";r[a]=Array(s.length),r[u]=Array(s.length),s.forEach((function(t,e){var s={},l=0;t.forEach((function(t){return t.forEach((function(t){var e="_"+t[0]+"_"+t[1];i[e]?i[e].forEach((function(t){s[t]=(s[t]||0)+1})):l+=1}))})),Object.keys(s).forEach((function(i){s[i]!==o[+i]||l||t.length!==n[+i].length||(r[u][e]||(r[u][e]=[]),r[u][e].push(+i)),s[i]>=2&&(r[a][e]||(r[a][e]=[]),r[a][e].push(+i))}))}))}))}(e,r,w,i.correspond),d&&m&&d!==m&&(w=w.map((function(t){return t.map((function(t){return f.transformCoordinates(m,d,t)}))}))),h(w,{style:i.style||(b=w,M=g.style,M.fromPolygonList?M:b.length>1?M.includes("outer")?M+(M.endsWith("list")?"":"-list"):M.endsWith("listlist")?M:M+(M.endsWith("list")?"list":"-listlist"):1===b.length&&b[0].length>1?M.includes("outer")||M.endsWith("list")?M:M+"-list":M)},i)}function d(t){return function(e,n,r){return f(t,e,n,r)}}t.exports={union:d("union"),intersect:d("intersect"),difference:d("difference"),xor:d("xor"),toPolygonList:c,fromPolygonList:h}},9215:function(t){var e=function(t,e,n,r,i){var o,a=0;return"boolean"!=typeof e&&(i=r,r=n,n=e,e=void 0),"function"!=typeof r&&(i=r,r=function(){}),function(){var s=this,u=+new Date-a,l=arguments;function c(){a=+new Date,n.apply(s,l)}r.apply(s,l),i&&!o&&c(),o&&clearTimeout(o),void 0===i&&u>t?c():!0!==e&&(o=setTimeout(i?function(){o=void 0}:c,void 0===i?t-u:t))}};t.exports={throttle:e,debounce:function(t,n,r,i){return"boolean"!=typeof n&&(i=r,r=n,n=!1),e(t,!1,r,i=i||function(){},!!n)}}},2623:function(t,e,n){var r=n(5699),i=n(6837),o=n(4634),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var r=n(5638);e=e||{},i.call(this,e);var a=this,s=this._init;this.featureType="vector",this.origin=function(t){return void 0===t?a.style("origin"):(a.style("origin",t),a.dataTime().modified(),a)},this.delta=function(t){return void 0===t?a.style("delta"):(a.style("delta",t),a.dataTime().modified(),a)},this._init=function(t){s.call(a,t);var e=r.extend({},{strokeColor:"black",strokeWidth:2,strokeOpacity:1,originStyle:"none",endStyle:"arrow",origin:{x:0,y:0,z:0},delta:o.identityFunction,scale:null},void 0===t.style?{}:t.style);return void 0!==t.origin&&(e.origin=t.origin),a.style(e),a.dataTime().modified(),a}};r(a,i),t.exports=a},2978:function(t){t.exports="1.11.2"},7514:function(t,e,n){n(5577).GL={ACTIVE_ATTRIBUTES:35721,ACTIVE_TEXTURE:34016,ACTIVE_UNIFORMS:35718,ALIASED_LINE_WIDTH_RANGE:33902,ALIASED_POINT_SIZE_RANGE:33901,ALPHA:6406,ALPHA_BITS:3413,ALWAYS:519,ARRAY_BUFFER:34962,ARRAY_BUFFER_BINDING:34964,ATTACHED_SHADERS:35717,BACK:1029,BLEND:3042,BLEND_COLOR:32773,BLEND_DST_ALPHA:32970,BLEND_DST_RGB:32968,BLEND_EQUATION:32777,BLEND_EQUATION_ALPHA:34877,BLEND_EQUATION_RGB:32777,BLEND_SRC_ALPHA:32971,BLEND_SRC_RGB:32969,BLUE_BITS:3412,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,BROWSER_DEFAULT_WEBGL:37444,BUFFER_SIZE:34660,BUFFER_USAGE:34661,BYTE:5120,CCW:2305,CLAMP_TO_EDGE:33071,COLOR_ATTACHMENT0:36064,COLOR_BUFFER_BIT:16384,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,COMPILE_STATUS:35713,COMPRESSED_TEXTURE_FORMATS:34467,CONSTANT_ALPHA:32771,CONSTANT_COLOR:32769,CONTEXT_LOST_WEBGL:37442,CULL_FACE:2884,CULL_FACE_MODE:2885,CURRENT_PROGRAM:35725,CURRENT_VERTEX_ATTRIB:34342,CW:2304,DECR:7683,DECR_WRAP:34056,DELETE_STATUS:35712,DEPTH_ATTACHMENT:36096,DEPTH_BITS:3414,DEPTH_BUFFER_BIT:256,DEPTH_CLEAR_VALUE:2931,DEPTH_COMPONENT:6402,DEPTH_COMPONENT16:33189,DEPTH_FUNC:2932,DEPTH_RANGE:2928,DEPTH_STENCIL:34041,DEPTH_STENCIL_ATTACHMENT:33306,DEPTH_TEST:2929,DEPTH_WRITEMASK:2930,DITHER:3024,DONT_CARE:4352,DST_ALPHA:772,DST_COLOR:774,DYNAMIC_DRAW:35048,ELEMENT_ARRAY_BUFFER:34963,ELEMENT_ARRAY_BUFFER_BINDING:34965,EQUAL:514,FASTEST:4353,FLOAT:5126,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,FRAGMENT_SHADER:35632,FRAMEBUFFER:36160,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_BINDING:36006,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_UNSUPPORTED:36061,FRONT:1028,FRONT_AND_BACK:1032,FRONT_FACE:2886,FUNC_ADD:32774,FUNC_REVERSE_SUBTRACT:32779,FUNC_SUBTRACT:32778,GENERATE_MIPMAP_HINT:33170,GEQUAL:518,GREATER:516,GREEN_BITS:3411,HIGH_FLOAT:36338,HIGH_INT:36341,INCR:7682,INCR_WRAP:34055,INT:5124,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,INVALID_ENUM:1280,INVALID_FRAMEBUFFER_OPERATION:1286,INVALID_OPERATION:1282,INVALID_VALUE:1281,INVERT:5386,KEEP:7680,LEQUAL:515,LESS:513,LINEAR:9729,LINEAR_MIPMAP_LINEAR:9987,LINEAR_MIPMAP_NEAREST:9985,LINES:1,LINE_LOOP:2,LINE_STRIP:3,LINE_WIDTH:2849,LINK_STATUS:35714,LOW_FLOAT:36336,LOW_INT:36339,LUMINANCE:6409,LUMINANCE_ALPHA:6410,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_CUBE_MAP_TEXTURE_SIZE:34076,MAX_FRAGMENT_UNIFORM_VECTORS:36349,MAX_RENDERBUFFER_SIZE:34024,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_TEXTURE_SIZE:3379,MAX_VARYING_VECTORS:36348,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VIEWPORT_DIMS:3386,MEDIUM_FLOAT:36337,MEDIUM_INT:36340,MIRRORED_REPEAT:33648,NEAREST:9728,NEAREST_MIPMAP_LINEAR:9986,NEAREST_MIPMAP_NEAREST:9984,NEVER:512,NICEST:4354,NONE:0,NOTEQUAL:517,NO_ERROR:0,ONE:1,ONE_MINUS_CONSTANT_ALPHA:32772,ONE_MINUS_CONSTANT_COLOR:32770,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,OUT_OF_MEMORY:1285,PACK_ALIGNMENT:3333,POINTS:0,POLYGON_OFFSET_FACTOR:32824,POLYGON_OFFSET_FILL:32823,POLYGON_OFFSET_UNITS:10752,RED_BITS:3410,RENDERBUFFER:36161,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_BINDING:36007,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_STENCIL_SIZE:36181,RENDERBUFFER_WIDTH:36162,RENDERER:7937,REPEAT:10497,REPLACE:7681,RGB:6407,RGB565:36194,RGB5_A1:32855,RGBA:6408,RGBA4:32854,SAMPLER_2D:35678,SAMPLER_CUBE:35680,SAMPLES:32937,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_BUFFERS:32936,SAMPLE_COVERAGE:32928,SAMPLE_COVERAGE_INVERT:32939,SAMPLE_COVERAGE_VALUE:32938,SCISSOR_BOX:3088,SCISSOR_TEST:3089,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,SHORT:5122,SRC_ALPHA:770,SRC_ALPHA_SATURATE:776,SRC_COLOR:768,STATIC_DRAW:35044,STENCIL_ATTACHMENT:36128,STENCIL_BACK_FAIL:34817,STENCIL_BACK_FUNC:34816,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,STENCIL_BITS:3415,STENCIL_BUFFER_BIT:1024,STENCIL_CLEAR_VALUE:2961,STENCIL_FAIL:2964,STENCIL_FUNC:2962,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_TEST:2960,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STREAM_DRAW:35040,SUBPIXEL_BITS:3408,TEXTURE:5890,TEXTURE0:33984,TEXTURE1:33985,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE2:33986,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE3:33987,TEXTURE30:34014,TEXTURE31:34015,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE_2D:3553,TEXTURE_BINDING_2D:32873,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP:34067,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TRIANGLES:4,TRIANGLE_FAN:6,TRIANGLE_STRIP:5,UNPACK_ALIGNMENT:3317,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNSIGNED_BYTE:5121,UNSIGNED_INT:5125,UNSIGNED_SHORT:5123,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,VALIDATE_STATUS:35715,VENDOR:7936,VERSION:7938,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_SHADER:35633,VIEWPORT:2978,ZERO:0}},9229:function(t,e,n){var r=n(5577),i=n(5699),o=n(5365),a=n(5240);r.actor=function(){"use strict";if(!(this instanceof r.actor))return new r.actor;r.node.call(this);var t=this,e=a.create(),n=r.boundingObject.ReferenceFrame.Relative,i=null;return this.matrix=function(){return e},this.referenceFrame=function(){return n},this.mapper=function(){return i},this.setMapper=function(e){e!==i&&(i=e,t.boundsModified())},this.computeBounds=function(){if(null!=i){var n,r,a,s,u=t.computeBoundsTimestamp();(t.boundsDirtyTimestamp().getMTime()>u.getMTime()||i.boundsDirtyTimestamp().getMTime()>u.getMTime())&&(i.computeBounds(),r=[(n=i.bounds())[0],n[2],n[4]],a=[n[1],n[3],n[5]],o.transformMat4(r,r,e),o.transformMat4(a,a,e),s=[r[0]>a[0]?a[0]:r[0],r[0]>a[0]?r[0]:a[0],r[1]>a[1]?a[1]:r[1],r[1]>a[1]?r[1]:a[1],r[2]>a[2]?a[2]:r[2],r[2]>a[2]?r[2]:a[2]],t.setBounds(s[0],s[1],s[2],s[3],s[4],s[5]),u.modified())}else t.resetBounds()},t},i(r.actor,r.node)},5147:function(t,e,n){var r=n(5577),i=n(5699);r.blendFunction=function(t,e){"use strict";if(!(this instanceof r.blendFunction))return new r.blendFunction(t,e);var n=t,i=e;return this.apply=function(t){t.m_context.blendFuncSeparate(n,i,r.GL.ONE,r.GL.ONE_MINUS_SRC_ALPHA)},this},r.blend=function(){"use strict";if(!(this instanceof r.blend))return new r.blend;r.materialAttribute.call(this,r.materialAttributeType.Blend);var t=!1,e=r.blendFunction(r.GL.SRC_ALPHA,r.GL.ONE_MINUS_SRC_ALPHA);return this.bind=function(n){return t=n.m_context.isEnabled(r.GL.BLEND),this.enabled()?(n.m_context.enable(r.GL.BLEND),e.apply(n)):n.m_context.disable(r.GL.BLEND),!0},this.undoBind=function(e){return t?e.m_context.enable(r.GL.BLEND):e.m_context.disable(r.GL.BLEND),!0},this},i(r.blend,r.materialAttribute)},4818:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.boundingObject=function(){"use strict";if(!(this instanceof r.boundingObject))return new r.boundingObject;r.object.call(this);var t=[0,0,0,0,0,0],e=o(),n=o();return e.modified(),n.modified(),this.bounds=function(){return t},this.hasValidBounds=function(t){return t[0]!==Number.MAX_VALUE&&t[1]!==-Number.MAX_VALUE&&t[2]!==Number.MAX_VALUE&&t[3]!==-Number.MAX_VALUE&&t[4]!==Number.MAX_VALUE&&t[5]!==-Number.MAX_VALUE},this.setBounds=function(n,r,i,o,a,s){if(this.hasValidBounds([n,r,i,o,a,s]))return t[0]=n,t[1]=r,t[2]=i,t[3]=o,t[4]=a,t[5]=s,this.modified(),e.modified(),!0},this.resetBounds=function(){t[0]=Number.MAX_VALUE,t[1]=-Number.MAX_VALUE,t[2]=Number.MAX_VALUE,t[3]=-Number.MAX_VALUE,t[4]=Number.MAX_VALUE,t[5]=-Number.MAX_VALUE,this.modified()},this.computeBounds=function(){},this.computeBoundsTimestamp=function(){return e},this.boundsDirtyTimestamp=function(){return n},this.resetBounds(),this},r.boundingObject.ReferenceFrame={Relative:0,Absolute:1},i(r.boundingObject,r.object)},9433:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618),a=n(5365),s=n(8608),u=n(5240);r.camera=function(t){"use strict";if(!(this instanceof r.camera))return new r.camera(t);r.groupNode.call(this),t=t||{};var e=30*Math.PI/180,n=s.fromValues(0,0,1,1),i=s.fromValues(0,0,0,1),l=s.fromValues(0,1,0,0),c=1,h=s.fromValues(0,0,-1,0),f=u.create(),d=u.create(),p=o(),m=o(),g=-1,v=1,y=1,x=-1,_={zoom:1,tilesize:256},b=!1,M=[0,0,0,0],w=r.GL.COLOR_BUFFER_BIT|r.GL.DEPTH_BUFFER_BIT;return void 0!==t.parallelProjection&&(b=!!t.parallelProjection),this.setViewAspect=function(t){c=t,this.modified()},this.parallelExtents=function(){return _},this.setParallelExtents=function(t){var e,n,r=["width","height","zoom","tilesize"],i=!1;for(e=0;e<r.length;e+=1)void 0!==t[n=r[e]]&&t[n]!==_[n]&&(_[n]=t[n],i=!0);if(i&&_.width&&_.height&&void 0!==_.zoom&&_.tilesize){var o=this.unitsPerPixel(_.zoom,_.tilesize);v=o*_.width/2,g=-v,y=o*_.height/2,x=-y,this.modified()}},this.unitsPerPixel=function(t,e){return e=e||256,360*Math.pow(2,-t)/e},this.viewMatrix=function(){return this.computeViewMatrix()},this.setViewMatrix=function(t,e){e?f=t.slice():u.copy(f,t),p.modified()},this.projectionMatrix=function(){return this.computeProjectionMatrix()},this.setProjectionMatrix=function(t){u.copy(d,t),m.modified()},this.clearMask=function(){return w},this.clearColor=function(){return M},this.clearDepth=function(){return 1},this.computeDirectionOfProjection=function(){a.subtract(h,i,n),a.normalize(h,h),this.modified()},this.computeViewMatrix=function(){return p.getMTime()<this.getMTime()&&(u.lookAt(f,n,i,l),p.modified()),f},this.computeProjectionMatrix=function(){return m.getMTime()<this.getMTime()&&(b?u.ortho(d,g,v,x,y,.01,1e4):u.perspective(d,e,c,.01,1e4),m.modified()),d},this.computeDirectionOfProjection(),this},i(r.camera,r.groupNode)},9128:function(t,e,n){var r=n(5577);r.data=function(){"use strict";if(!(this instanceof r.data))return new r.data;this.type=function(){}},r.data.raster=0,r.data.point=1,r.data.lineString=2,r.data.polygon=3,r.data.geometry=10},9050:function(t,e,n){var r=n(5577);r.event={},r.event.keyPress="vgl.event.keyPress",r.event.mousePress="vgl.event.mousePress",r.event.mouseRelease="vgl.event.mouseRelease",r.event.contextMenu="vgl.event.contextMenu",r.event.configure="vgl.event.configure",r.event.enable="vgl.event.enable",r.event.mouseWheel="vgl.event.mouseWheel",r.event.keyRelease="vgl.event.keyRelease",r.event.middleButtonPress="vgl.event.middleButtonPress",r.event.startInteraction="vgl.event.startInteraction",r.event.enter="vgl.event.enter",r.event.rightButtonPress="vgl.event.rightButtonPress",r.event.middleButtonRelease="vgl.event.middleButtonRelease",r.event.char="vgl.event.char",r.event.disable="vgl.event.disable",r.event.endInteraction="vgl.event.endInteraction",r.event.mouseMove="vgl.event.mouseMove",r.event.mouseOut="vgl.event.mouseOut",r.event.expose="vgl.event.expose",r.event.timer="vgl.event.timer",r.event.leftButtonPress="vgl.event.leftButtonPress",r.event.leave="vgl.event.leave",r.event.rightButtonRelease="vgl.event.rightButtonRelease",r.event.leftButtonRelease="vgl.event.leftButtonRelease",r.event.click="vgl.event.click",r.event.dblClick="vgl.event.dblClick"},5710:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.primitive=function(){"use strict";if(!(this instanceof r.primitive))return new r.primitive;var t=0,e=0,n=null;return this.indices=function(){return n},this.numberOfIndices=function(){return n.length},this.primitiveType=function(){return t},this.setPrimitiveType=function(e){t=e},this.indicesValueType=function(){return e},this.setIndicesValueType=function(t){e=t},this.setIndices=function(t){n=new Uint16Array(t)},this},r.triangles=function(){"use strict";return this instanceof r.triangles?(r.primitive.call(this),this.setPrimitiveType(r.GL.TRIANGLES),this.setIndicesValueType(r.GL.UNSIGNED_SHORT),this):new r.triangles},i(r.triangles,r.primitive),r.points=function(){"use strict";return this instanceof r.points?(r.primitive.call(this),this.setPrimitiveType(r.GL.POINTS),this.setIndicesValueType(r.GL.UNSIGNED_SHORT),this):new r.points},i(r.points,r.primitive),r.sourceData=function(t){"use strict";if(!(this instanceof r.sourceData))return new r.sourceData(t);var e={},n=[],i=(t=t||{}).name||"Source "+(new Date).toISOString(),o=function(){this.m_numberOfComponents=0,this.m_dataType=0,this.m_dataTypeSize=0,this.m_normalized=!1,this.m_stride=0,this.m_offset=0};return this.data=function(){return n},this.getData=function(){return this.data()},this.dataToFloat32Array=function(){return n instanceof Float32Array||(n=new Float32Array(n)),n},this.setData=function(t){t instanceof Array||t instanceof Float32Array?n=t instanceof Float32Array?t:t.slice(0):console.log("[error] Requires array")},this.addAttribute=function(t,n,r,i,a,s,u){if(!e.hasOwnProperty(t)){var l=new o;l.m_dataType=n,l.m_dataTypeSize=r,l.m_offset=i,l.m_stride=a,l.m_numberOfComponents=s,l.m_normalized=u,e[t]=l}},this.hasKey=function(t){return e.hasOwnProperty(t)},this.keys=function(){return Object.keys(e)},this.attributeNumberOfComponents=function(t){return e.hasOwnProperty(t)?e[t].m_numberOfComponents:0},this.normalized=function(t){return!!e.hasOwnProperty(t)&&e[t].m_normalized},this.attributeDataType=function(t){if(e.hasOwnProperty(t))return e[t].m_dataType},this.attributeOffset=function(t){return e.hasOwnProperty(t)?e[t].m_offset:0},this.attributeStride=function(t){return e.hasOwnProperty(t)?e[t].m_stride:0},this.pushBack=function(t){},this.insert=function(t){var e;if(!n.length&&t.length&&t instanceof Float32Array)n=t;else if(n.slice||!n.length&&t.slice||(n=Array.prototype.slice.call(n)),t.length)if(!n.length&&t.slice)n=t.slice(0);else for(e=0;e<t.length;e+=1)n[n.length]=t[e];else n[n.length]=t},this.name=function(){return i},this},r.sourceDataAnyfv=function(t,e,n){"use strict";return this instanceof r.sourceDataAnyfv?(r.sourceData.call(this,n),this.addAttribute(e,r.GL.FLOAT,4,0,4*t,t,!1),this.pushBack=function(t){this.insert(t)},this):new r.sourceDataAnyfv(t,e,n)},i(r.sourceDataAnyfv,r.sourceData),r.sourceDataP3fv=function(t){"use strict";return this instanceof r.sourceDataP3fv?(r.sourceData.call(this,t),this.addAttribute(r.vertexAttributeKeys.Position,r.GL.FLOAT,4,0,12,3,!1),this.pushBack=function(t){this.insert(t)},this):new r.sourceDataP3fv(t)},i(r.sourceDataP3fv,r.sourceData),r.sourceDataT2fv=function(t){"use strict";return this instanceof r.sourceDataT2fv?(r.sourceData.call(this,t),this.addAttribute(r.vertexAttributeKeys.TextureCoordinate,r.GL.FLOAT,4,0,8,2,!1),this.pushBack=function(t){this.insert(t)},this):new r.sourceDataT2fv(t)},i(r.sourceDataT2fv,r.sourceData),r.geometryData=function(){"use strict";if(!(this instanceof r.geometryData))return new r.geometryData;r.data.call(this);var t=[],e=[],n=[0,0,0,0,0,0],i=o(),a=o();return this.type=function(){return r.data.geometry},this.name=function(){return""},this.addSource=function(t){return-1===e.indexOf(t)&&(e.push(t),t.hasKey(r.vertexAttributeKeys.Position)&&a.modified(),!0)},this.source=function(t){return t<e.length?e[t]:0},this.sourceByName=function(t){for(var n=0;n<e.length;n+=1)if(e[n].name()===t)return e[n];return 0},this.numberOfSources=function(){return e.length},this.sourceData=function(t){var n;for(n=0;n<e.length;n+=1)if(e[n].hasKey(t))return e[n];return null},this.addPrimitive=function(e){return t.push(e),!0},this.primitive=function(e){return e<t.length?t[e]:null},this.numberOfPrimitives=function(){return t.length},this.bounds=function(){return a.getMTime()>i.getMTime()&&this.computeBounds(),n},this.boundsDirty=function(t){return t&&a.modified(),a.getMTime()>i.getMTime()},this.setBounds=function(t,e,r,o,a,s){return n[0]=t,n[1]=e,n[2]=r,n[3]=o,n[4]=a,n[5]=s,i.modified(),!0},this},i(r.geometryData,r.data)},9393:function(t,e,n){var r=n(5577),i=n(5699);r.graphicsObject=function(t){"use strict";if(!(this instanceof r.graphicsObject))return new r.graphicsObject;r.object.call(this);return this._setup=function(t){return!1},this._cleanup=function(t){return!1},this},i(r.graphicsObject,r.object)},7113:function(t,e,n){var r=n(5577),i=n(5699);r.groupNode=function(){"use strict";if(!(this instanceof r.groupNode))return new r.groupNode;r.node.call(this);var t=[];return this.addChild=function(e){return e instanceof r.node&&(-1===t.indexOf(e)&&(e.setParent(this),t.push(e),this.boundsDirtyTimestamp().modified(),!0))},this.removeChild=function(e){if(e.parent()===this){var n=t.indexOf(e);if(n>=0)return t.splice(n,1),e.setParent(null),this.boundsDirtyTimestamp().modified(),!0}},this.removeChildren=function(){for(;t.length;)this.removeChild(t[0]);this.modified()},this.children=function(){return t},this.hasChild=function(e){var n=0,r=!1;for(n=0;n<t.length;n+=1)if(t[n]===e){r=!0;break}return r},this},i(r.groupNode,r.node)},5140:function(t,e,n){t.exports=n(5577),n(7514),n(4553),n(4818),n(2206),n(9050),n(9393),n(4596),n(3612),n(9623),n(9229),n(7113),n(9433),n(5147),n(9128),n(5710),n(1637),n(1136),n(770),n(2672),n(8082),n(221),n(3811),n(7470)},2206:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.mapper=function(t){"use strict";if(!(this instanceof r.mapper))return new r.mapper(t);r.boundingObject.call(this);var e=[0,1,1],n=null,i=[],a={},s=void 0!==(t=t||{}).dynamicDraw&&t.dynamicDraw,u=o(),l=null,c=this;function h(t){a={},i=[]}function f(t){c.deleteVertexBufferObjects(t),h(),function(t){if(n){t&&(l=t.m_context);var e,o,c,h,f,d,p,m=n.numberOfSources(),g=null;for(e=0;e<m;e+=1){for(g=l.createBuffer(),l.bindBuffer(r.GL.ARRAY_BUFFER,g),(p=n.source(e).data())instanceof Float32Array||(p=new Float32Array(p)),l.bufferData(r.GL.ARRAY_BUFFER,p,s?r.GL.DYNAMIC_DRAW:r.GL.STATIC_DRAW),h=n.source(e).keys(),f=[],o=0;o<h.length;o+=1)f.push(h[o]);a[e]=f,i[e]=g}for(d=n.numberOfPrimitives(),c=0;c<d;c+=1)g=l.createBuffer(),l.bindBuffer(r.GL.ARRAY_BUFFER,g),l.bufferData(r.GL.ARRAY_BUFFER,n.primitive(c).indices(),r.GL.STATIC_DRAW),i[e]=g,e+=1;u.modified()}}(t)}return this.deleteVertexBufferObjects=function(t){var e,n=l;if(t&&(n=t.m_context),n)for(e=0;e<i.length;e+=1)n.deleteBuffer(i[e])},this._cleanup=function(t){c.deleteVertexBufferObjects(t),h(t),c.modified()},this.computeBounds=function(){if(null!=n){var t=this.computeBoundsTimestamp(),e=null;this.boundsDirtyTimestamp().getMTime()>t.getMTime()&&(e=n.bounds(),this.setBounds(e[0],e[1],e[2],e[3],e[4],e[5]),t.modified())}else this.resetBounds()},this.color=function(){return e},this.geometryData=function(){return n},this.setGeometryData=function(t){n!==t&&(n=t,this.modified(),this.boundsDirtyTimestamp().modified())},this.updateSourceBuffer=function(t,e,o){if(o&&(l=o.m_context),!l)return!1;for(var a=-1,s=0;s<n.numberOfSources();s+=1)if(n.source(s).name()===t){a=s;break}return!(a<0||a>=i.length)&&(e||(e=n.source(s).dataToFloat32Array()),l.bindBuffer(r.GL.ARRAY_BUFFER,i[a]),e instanceof Float32Array?l.bufferSubData(r.GL.ARRAY_BUFFER,0,e):l.bufferSubData(r.GL.ARRAY_BUFFER,0,new Float32Array(e)),!0)},this.getSourceBuffer=function(t){var e=n.sourceByName(t);return e?e.dataToFloat32Array():new Float32Array},this.render=function(t,e){(this.getMTime()>u.getMTime()||t.m_contextChanged)&&f(t),(l=t.m_context).vertexAttrib3fv(r.vertexAttributeKeys.Color,this.color());var o,s,c=0,h=0,d=null;for(o in a)if(a.hasOwnProperty(o)){for(l.bindBuffer(r.GL.ARRAY_BUFFER,i[c]),h=0;h<a[o].length;h+=1)t.m_material.bindVertexData(t,a[o][h]);c+=1}for(s=n.numberOfPrimitives(),h=0;h<s;h+=1,c+=1)if((d=n.primitive(h)).numberOfIndices()){switch(l.bindBuffer(r.GL.ARRAY_BUFFER,i[c]),d.primitiveType()){case r.GL.POINTS:l.drawArrays(r.GL.POINTS,0,d.numberOfIndices());break;case r.GL.LINES:l.drawArrays(r.GL.LINES,0,d.numberOfIndices());break;case r.GL.LINE_STRIP:l.drawArrays(r.GL.LINE_STRIP,0,d.numberOfIndices());break;case r.GL.TRIANGLES:l.drawArrays(r.GL.TRIANGLES,0,d.numberOfIndices());break;case r.GL.TRIANGLE_STRIP:l.drawArrays(r.GL.TRIANGLE_STRIP,0,d.numberOfIndices())}l.bindBuffer(r.GL.ARRAY_BUFFER,null)}e||this.undoBindVertexData(t)},this.undoBindVertexData=function(t){var e,n;for(e in a)if(a.hasOwnProperty(e))for(n=0;n<a[e].length;n+=1)t.m_material.undoBindVertexData(t,a[e][n])},this},i(r.mapper,r.boundingObject)},4596:function(t,e,n){var r=n(5577),i=n(5699);r.material=function(){"use strict";if(!(this instanceof r.material))return new r.material;r.graphicsObject.call(this);var t=this,e=new r.shaderProgram,n=100,i={},o={};return this.binNumber=function(){return n},this.setBinNumber=function(e){n=e,t.modified()},this.exists=function(t){return t.type()===r.materialAttributeType.Texture?i.hasOwnProperty(t.textureUnit()):o.hasOwnProperty(t.type())},this.addAttribute=function(n){return!t.exists(n)&&(n.type()===r.materialAttributeType.Texture?(i[n.textureUnit()]=n,t.modified(),!0):(n.type()===r.materialAttributeType.ShaderProgram&&(e=n),o[n.type()]=n,t.modified(),!0))},this.shaderProgram=function(){return e},this._cleanup=function(n){for(var r in o)o.hasOwnProperty(r)&&o[r]._cleanup(n);for(r in i)i.hasOwnProperty(r)&&i[r]._cleanup(n);e._cleanup(n),t.modified()},this.bind=function(t){var n=null;for(n in e.bind(t),o)o.hasOwnProperty(n)&&o[n]!==e&&o[n].bind(t);for(n in i)i.hasOwnProperty(n)&&i[n].bind(t)},this.undoBind=function(t){var e=null;for(e in o)o.hasOwnProperty(e)&&o[e].undoBind(t);for(e in i)i.hasOwnProperty(e)&&i[e].undoBind(t)},this.bindVertexData=function(t,e){var n=null;for(n in o)o.hasOwnProperty(n)&&o[n].bindVertexData(t,e)},this.undoBindVertexData=function(t,e){var n=null;for(n in o)o.hasOwnProperty(n)&&o[n].undoBindVertexData(t,e)},t},r.material.RenderBin={Base:0,Default:100,Opaque:100,Transparent:1e3,Overlay:1e4},i(r.material,r.graphicsObject)},3612:function(t,e,n){var r=n(5577),i=n(5699);r.materialAttributeType={Undefined:0,ShaderProgram:1,Texture:2,Blend:3,Depth:4},r.materialAttribute=function(t){"use strict";if(!(this instanceof r.materialAttribute))return new r.materialAttribute(t);r.graphicsObject.call(this);var e=t;return this.type=function(){return e},this.enabled=function(){return true},this.bindVertexData=function(t,e){return!1},this.undoBindVertexData=function(t,e){return!1},this},i(r.materialAttribute,r.graphicsObject)},9623:function(t,e,n){var r=n(5577),i=n(5699);r.node=function(){"use strict";if(!(this instanceof r.node))return new r.node;r.boundingObject.call(this);var t=null,e=null,n=!0;return this.material=function(){return e},this.setMaterial=function(t){return t!==e&&(e=t,this.modified(),!0)},this.visible=function(){return n},this.setVisible=function(t){return t!==n&&(n=t,this.modified(),!0)},this.parent=function(){return t},this.setParent=function(e){return e!==t&&(null!==t&&t.removeChild(this),t=e,this.modified(),!0)},this.boundsModified=function(){this.boundsDirtyTimestamp().modified(),null!==t&&t.boundsModified()},this},i(r.node,r.boundingObject)},4553:function(t,e,n){var r=n(5577),i=n(6618);r.object=function(){"use strict";if(!(this instanceof r.object))return new r.object;var t=i();return t.modified(),this.modified=function(){t.modified()},this.getMTime=function(){return t.getMTime()},this}},1637:function(t,e,n){var r=n(5577),i=n(5699);r.renderWindow=function(t){"use strict";if(!(this instanceof r.renderWindow))return new r.renderWindow(t);r.graphicsObject.call(this);var e=this,n=0,i=0,o=400,a=400,s=t,u=null,l=[],c=null;return this.windowSize=function(){return[o,a]},this.windowPosition=function(){return[n,i]},this.renderers=function(){return l},this.activeRenderer=function(){return u},this.addRenderer=function(t){return!1===e.hasRenderer(t)&&(l.push(t),t.setRenderWindow(e),null===u&&(u=t),0!==t.layer()&&t.camera().setClearMask(r.GL.DepthBufferBit),e.modified(),!0)},this.hasRenderer=function(t){var e;for(e=0;e<l.length;e+=1)if(t===l[e])return!0;return!1},this.positionAndResize=function(t,r,s,u){var c;for(n=t,i=r,o=s,a=u,c=0;c<l.length;c+=1)l[c].positionAndResize(n,i,o,a);e.modified()},this._setup=function(t){c=null;try{var e;for(c=s.getContext("webgl")||s.getContext("experimental-webgl"),e=0;e<l.length;e+=1)(l[e].width()>o||0===l[e].width()||l[e].height()>a||0===l[e].height())&&l[e].resize(n,i,o,a);return!0}catch(t){}return c||console("[ERROR] Unable to initialize WebGL. Your browser may not support it."),!1},this.context=function(){return c},this._cleanup=function(t){var n;for(n=0;n<l.length;n+=1)l[n]._cleanup(t);r.clearCachedShaders(t?t.m_context:null),e.modified()},this.render=function(){var t;for(l.sort((function(t,e){return t.layer()-e.layer()})),t=0;t<l.length;t+=1)l[t].render()},e},i(r.renderWindow,r.graphicsObject)},1136:function(t,e,n){var r=n(5577),i=n(5699),o=n(5240);r.renderState=function(){"use strict";this.m_context=null,this.m_modelViewMatrix=o.create(),this.m_normalMatrix=o.create(),this.m_projectionMatrix=null,this.m_material=null,this.m_mapper=null},r.renderer=function(t){"use strict";if(!(this instanceof r.renderer))return new r.renderer(t);r.graphicsObject.call(this),t=t||{};var e=this;return e.m_renderWindow=null,e.m_contextChanged=!1,e.m_sceneRoot=new r.groupNode,e.m_camera=new r.camera(t),e.m_nearClippingPlaneTolerance=null,e.m_x=0,e.m_y=0,e.m_width=0,e.m_height=0,e.m_resizable=!0,e.m_resetScene=!0,e.m_layer=0,e.m_renderPasses=null,e.m_resetClippingRange=!0,e.m_depthBits=null,e.m_camera.addChild(e.m_sceneRoot),this.width=function(){return e.m_width},this.height=function(){return e.m_height},this.layer=function(){return e.m_layer},this.setLayer=function(t){e.m_layer=t,e.modified()},this.renderWindow=function(){return e.m_renderWindow},this.setRenderWindow=function(t){e.m_renderWindow!==t&&(e.m_renderWindow&&e.m_renderWindow.removeRenderer(this),e.m_renderWindow=t,e.m_contextChanged=!0,e.modified())},this.camera=function(){return e.m_camera},this.render=function(){var t,n,i,a=null,s=[],u=o.create(),l=null;if((n=new r.renderState).m_renderer=e,n.m_context=e.renderWindow().context(),e.m_depthBits&&!e.m_contextChanged||(e.m_depthBits=n.m_context.getParameter(r.GL.DEPTH_BITS)),n.m_contextChanged=e.m_contextChanged,e.m_renderPasses)for(t=0;t<e.m_renderPasses.length;t+=1){if(e.m_renderPasses[t].render(n))return console.log("returning"),void e.m_renderPasses[t].remove(n);e.m_renderPasses[t].remove(n)}for(n.m_context.enable(r.GL.DEPTH_TEST),n.m_context.depthFunc(r.GL.LEQUAL),e.m_camera.clearMask()&r.GL.COLOR_BUFFER_BIT&&(l=e.m_camera.clearColor(),n.m_context.clearColor(l[0],l[1],l[2],l[3])),e.m_camera.clearMask()&r.GL.DEPTH_BUFFER_BIT&&n.m_context.clearDepth(e.m_camera.clearDepth()),n.m_context.clear(e.m_camera.clearMask()),n.m_context.viewport(e.m_x,e.m_y,e.m_width,e.m_height),(i=e.m_sceneRoot.children()).length>0&&e.m_resetScene&&(e.m_resetScene=!1),t=0;t<i.length;t+=1)(a=i[t]).computeBounds(),a.visible()&&a.material().binNumber()>=0&&s.push([a.material().binNumber(),a]);for(s.sort((function(t,e){return t[0]-e[0]})),t=0;t<s.length;t+=1){if((a=s[t][1]).referenceFrame()===r.boundingObject.ReferenceFrame.Relative){var c=e.m_camera.viewMatrix();c instanceof Array&&(n.m_modelViewMatrix=new Array(16)),o.multiply(n.m_modelViewMatrix,c,a.matrix()),n.m_projectionMatrix=e.m_camera.projectionMatrix(),n.m_modelViewAlignment=e.m_camera.viewAlignment()}else n.m_modelViewMatrix=a.matrix(),n.m_modelViewAlignment=null,n.m_projectionMatrix=o.create(),o.ortho(n.m_projectionMatrix,0,e.m_width,0,e.m_height,-1,1);o.invert(u,n.m_modelViewMatrix),o.transpose(n.m_normalMatrix,u),n.m_material=a.material(),n.m_mapper=a.mapper(),n.m_material.bind(n),n.m_mapper.render(n),n.m_material.undoBind(n)}n.m_context.finish(),e.m_contextChanged=!1,e.m_lastRenderState=n},this.resize=function(t,n){t&&n&&e.positionAndResize(e.m_x,e.m_y,t,n)},this.positionAndResize=function(t,n,r,i){var o;if(t<0||n<0||r<=0||i<=0)console.log("[error] Invalid position and resize values",t,n,r,i);else if(e.m_resizable&&(e.m_width=r,e.m_height=i,e.m_camera.setViewAspect(r/i),e.m_camera.setParallelExtents({width:r,height:i}),e.modified()),e.m_renderPasses)for(o=0;o<e.m_renderPasses.length;o+=1)e.m_renderPasses[o].resize(r,i),e.m_renderPasses[o].renderer().positionAndResize(t,n,r,i)},this.addActor=function(t){return t instanceof r.actor&&(e.m_sceneRoot.addChild(t),e.modified(),!0)},this.hasActor=function(t){return e.m_sceneRoot.hasChild(t)},this.removeActor=function(t){return-1!==e.m_sceneRoot.children().indexOf(t)&&(e.m_lastRenderState&&(t.mapper()&&t.mapper()._cleanup(e.m_lastRenderState),t.material()&&t.material()._cleanup(e.m_lastRenderState)),t.modified(),e.m_sceneRoot.removeChild(t),e.modified(),!0)},this.setResetScene=function(t){e.m_resetScene!==t&&(e.m_resetScene=t,e.modified())},this._cleanup=function(t){for(var n=e.m_sceneRoot.children(),r=0;r<n.length;r+=1){var i=n[r];i.material()._cleanup(t),i.mapper()._cleanup(t)}e.m_sceneRoot.removeChildren(),e.modified()},e},i(r.renderer,r.graphicsObject)},770:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.shader=function(t){"use strict";if(!(this instanceof r.shader))return new r.shader(t);r.object.call(this);var e=[],n=t,i="";this._getContextEntry=function(t){var n,r,i=t.m_context;for(n=0;n<e.length;n+=1)if(e[n].context===i)return e[n];return r={context:i,compileTimestamp:o()},e.push(r),r},this.removeContext=function(t){var n,r=t.m_context;for(n=0;n<e.length;n+=1)if(e[n].context===r)return void e.splice(n,1)},this.shaderHandle=function(t){return this._getContextEntry(t).shaderHandle},this.setShaderSource=function(t){i=t,this.modified()},this.compile=function(t){var e=this._getContextEntry(t);return this.getMTime()<e.compileTimestamp.getMTime()?e.shaderHandle:(t.m_context.deleteShader(e.shaderHandle),e.shaderHandle=t.m_context.createShader(n),t.m_context.shaderSource(e.shaderHandle,i),t.m_context.compileShader(e.shaderHandle),t.m_context.getShaderParameter(e.shaderHandle,r.GL.COMPILE_STATUS)?(e.compileTimestamp.modified(),e.shaderHandle):(console.log("[ERROR] An error occurred compiling the shaders: "+t.m_context.getShaderInfoLog(e.shaderHandle)),console.log(i),t.m_context.deleteShader(e.shaderHandle),null))},this.attachShader=function(t,e){t.m_context.attachShader(e,this.shaderHandle(t))}},i(r.shader,r.object),function(){"use strict";var t=[];r.getCachedShader=function(e,n,i){for(var o=0;o<t.length;o+=1)if(t[o].type===e&&t[o].context===n&&t[o].source===i)return o&&t.splice(0,0,t.splice(o,1)[0]),t[0].shader;var a=new r.shader(e);return a.setShaderSource(i),t.unshift({type:e,context:n,source:i,shader:a}),t.length>=10&&t.splice(10,t.length-10),a},r.clearCachedShaders=function(e){for(var n=t.length-1;n>=0;n-=1)null!=e&&t[n].context!==e||t.splice(n,1)}}()},2672:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.shaderProgram=function(){"use strict";if(!(this instanceof r.shaderProgram))return new r.shaderProgram;r.materialAttribute.call(this,r.materialAttributeType.ShaderProgram);var t=this,e=0,n=o(),i=o(),a=[],s=[],u={},l={},c={};return this.queryUniformLocation=function(t,n){return t.m_context.getUniformLocation(e,n)},this.queryAttributeLocation=function(t,n){return t.m_context.getAttribLocation(e,n)},this.addShader=function(e){if(a.indexOf(e)>-1)return!1;var n;for(n=a.length-2;n>=0;n-=1)a[n].shaderType()===e.shaderType()&&a.splice(n,1);return a.push(e),t.modified(),!0},this.addUniform=function(e){return!(s.indexOf(e)>-1)&&(s.push(e),t.modified(),!0)},this.addVertexAttribute=function(e,n){u[n]=e,t.modified()},this.uniformLocation=function(t){return l[t]},this.attributeLocation=function(t){return c[t]},this.uniform=function(t){var e;for(e=0;e<s.length;e+=1)if(s[e].name()===t)return s[e];return null},this.updateUniforms=function(t){var e;for(e=0;e<s.length;e+=1)s[e].callGL(t,l[s[e].name()])},this.link=function(t){return t.m_context.linkProgram(e),!!t.m_context.getProgramParameter(e,r.GL.LINK_STATUS)||(console.log("[ERROR] Unable to initialize the shader program."),!1)},this.use=function(t){t.m_context.useProgram(e)},this._setup=function(t){0===e&&(e=t.m_context.createProgram())},this._cleanup=function(e){t.deleteVertexAndFragment(e),t.deleteProgram(e),t.modified()},this.deleteProgram=function(t){e&&t.m_context.deleteProgram(e),e=0},this.deleteVertexAndFragment=function(t){var n;for(n=0;n<a.length;n+=1)a[n].shaderHandle(t)&&t.m_context.detachShader(e,a[n].shaderHandle(t)),t.m_context.deleteShader(a[n].shaderHandle(t)),a[n].removeContext(t)},this.compileAndLink=function(r){var i;if(!(n.getMTime()>=this.getMTime())){for(t._setup(r),i=0;i<a.length;i+=1)a[i].compile(r),a[i].attachShader(r,e);t.bindAttributes(r),t.link(r)||(console.log("[ERROR] Failed to link Program"),t._cleanup(r)),n.modified()}},this.bind=function(e){var n=0;for(i.getMTime()<t.getMTime()?(t.compileAndLink(e),t.use(e),t.bindUniforms(e),i.modified()):t.use(e),n=0;n<s.length;n+=1)s[n].update(e,t);t.updateUniforms(e)},this.undoBind=function(t){t.m_context.useProgram(null)},this.bindVertexData=function(t,e){u.hasOwnProperty(e)&&u[e].bindVertexData(t,e)},this.undoBindVertexData=function(t,e){u.hasOwnProperty(e)&&u[e].undoBindVertexData(t,e)},this.bindUniforms=function(t){var e;for(e=0;e<s.length;e+=1)l[s[e].name()]=this.queryUniformLocation(t,s[e].name())},this.bindAttributes=function(t){var n,r;for(n in u)u.hasOwnProperty(n)&&(r=u[n].name(),t.m_context.bindAttribLocation(e,n,r),c[r]=n)},t},i(r.shaderProgram,r.materialAttribute)},8082:function(t,e,n){var r=n(5577),i=n(5699),o=n(6618);r.texture=function(){"use strict";if(!(this instanceof r.texture))return new r.texture;r.materialAttribute.call(this,r.materialAttributeType.Texture),this.m_width=0,this.m_height=0,this.m_depth=0,this.m_textureHandle=null,this.m_textureUnit=0,this.m_pixelFormat=r.GL.RGBA,this.m_pixelDataType=r.GL.UNSIGNED_BYTE,this.m_internalFormat=r.GL.RGBA,this.m_nearestPixel=!1,this.m_image=null;var t=o(),e=this;function n(t){if(!(e.m_textureUnit>=0&&e.m_textureUnit<32))throw"[error] Texture unit "+e.m_textureUnit+" is not supported";t.m_context.activeTexture(r.GL.TEXTURE0+e.m_textureUnit)}return this.setup=function(e){n(e),e.m_context.deleteTexture(this.m_textureHandle),this.m_textureHandle=e.m_context.createTexture(),e.m_context.bindTexture(r.GL.TEXTURE_2D,this.m_textureHandle),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_MIN_FILTER,this.m_nearestPixel?r.GL.NEAREST:r.GL.LINEAR),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_MAG_FILTER,this.m_nearestPixel?r.GL.NEAREST:r.GL.LINEAR),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_WRAP_S,r.GL.CLAMP_TO_EDGE),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_WRAP_T,r.GL.CLAMP_TO_EDGE),null!==this.m_image?(e.m_context.pixelStorei(r.GL.UNPACK_ALIGNMENT,1),e.m_context.pixelStorei(r.GL.UNPACK_FLIP_Y_WEBGL,!0),this.updateDimensions(),this.computeInternalFormatUsingImage(),e.m_context.texImage2D(r.GL.TEXTURE_2D,0,this.m_internalFormat,this.m_pixelFormat,this.m_pixelDataType,this.m_image)):e.m_context.texImage2D(r.GL.TEXTURE_2D,0,this.m_internalFormat,this.m_width,this.m_height,0,this.m_pixelFormat,this.m_pixelDataType,null),e.m_context.bindTexture(r.GL.TEXTURE_2D,null),t.modified()},this.bind=function(e){this.getMTime()>t.getMTime()&&this.setup(e),n(e),e.m_context.bindTexture(r.GL.TEXTURE_2D,this.m_textureHandle)},this.undoBind=function(t){t.m_context.bindTexture(r.GL.TEXTURE_2D,null)},this.image=function(){return this.m_image},this.setImage=function(t){return null!==t&&(this.m_image=t,this.updateDimensions(),this.modified(),!0)},this.nearestPixel=function(){return this.m_nearestPixel},this.setNearestPixel=function(t){return(t=!!t)!==this.m_nearestPixel&&(this.m_nearestPixel=t,this.modified(),!0)},this.textureUnit=function(){return this.m_textureUnit},this.setTextureUnit=function(t){return this.m_textureUnit!==t&&(this.m_textureUnit=t,this.modified(),!0)},this.computeInternalFormatUsingImage=function(){this.m_internalFormat=r.GL.RGBA,this.m_pixelFormat=r.GL.RGBA,this.m_pixelDataType=r.GL.UNSIGNED_BYTE},this.updateDimensions=function(){null!==this.m_image&&(this.m_width=this.m_image.width,this.m_height=this.m_image.height,this.m_depth=0)},this.textureHandle=function(){return this.m_textureHandle},this},i(r.texture,r.materialAttribute),r.lookupTable=function(){"use strict";if(!(this instanceof r.lookupTable))return new r.lookupTable;r.texture.call(this);var t=o();return this.m_colorTable=[.07514311,.468049805,1,1,.247872569,.498782363,1,1,.339526309,.528909511,1,1,.409505078,.558608486,1,1,.468487184,.588057293,1,1,.520796675,.617435078,1,1,.568724526,.646924167,1,1,.613686735,.676713218,1,1,.656658579,.707001303,1,1,.698372844,.738002964,1,1,.739424025,.769954435,1,1,.780330104,.803121429,1,1,.821573924,.837809045,1,1,.863634967,.874374691,1,1,.907017747,.913245283,1,1,.936129275,.938743558,.983038586,1,.943467973,.943498599,.943398095,1,.990146732,.928791426,.917447482,1,1,.88332677,.861943246,1,1,.833985467,.803839606,1,1,.788626485,.750707739,1,1,.746206642,.701389973,1,1,.70590052,.654994046,1,1,.667019783,.610806959,1,1,.6289553,.568237474,1,1,.591130233,.526775617,1,1,.552955184,.485962266,1,1,.513776083,.445364274,1,1,.472800903,.404551679,1,1,.428977855,.363073592,1,1,.380759558,.320428137,1,.961891484,.313155629,.265499262,1,.916482116,.236630659,.209939162,1].map((function(t){return 255*t})),this.setup=function(e){0===this.textureUnit()?e.m_context.activeTexture(r.GL.TEXTURE0):1===this.textureUnit()&&e.m_context.activeTexture(r.GL.TEXTURE1),e.m_context.deleteTexture(this.m_textureHandle),this.m_textureHandle=e.m_context.createTexture(),e.m_context.bindTexture(r.GL.TEXTURE_2D,this.m_textureHandle),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_MIN_FILTER,r.GL.LINEAR),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_MAG_FILTER,r.GL.LINEAR),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_WRAP_S,r.GL.CLAMP_TO_EDGE),e.m_context.texParameteri(r.GL.TEXTURE_2D,r.GL.TEXTURE_WRAP_T,r.GL.CLAMP_TO_EDGE),e.m_context.pixelStorei(r.GL.UNPACK_ALIGNMENT,1),this.m_width=this.m_colorTable.length/4,this.m_height=1,this.m_depth=0,e.m_context.texImage2D(r.GL.TEXTURE_2D,0,r.GL.RGBA,this.m_width,this.m_height,this.m_depth,r.GL.RGBA,r.GL.UNSIGNED_BYTE,new Uint8Array(this.m_colorTable)),e.m_context.bindTexture(r.GL.TEXTURE_2D,null),t.modified()},this.colorTable=function(){return this.m_colorTable},this.setColorTable=function(t){return this.m_colorTable!==t&&(this.m_colorTable=t,this.modified(),!0)},this},i(r.lookupTable,r.texture)},221:function(t,e,n){var r=n(5577),i=n(5699),o=n(5240);r.uniform=function(t,e){"use strict";if(!(this instanceof r.uniform))return new r.uniform(t,e);this.getTypeNumberOfComponents=function(t){switch(t){case r.GL.FLOAT:case r.GL.INT:case r.GL.BOOL:return 1;case r.GL.FLOAT_VEC2:case r.GL.INT_VEC2:case r.GL.BOOL_VEC2:return 2;case r.GL.FLOAT_VEC3:case r.GL.INT_VEC3:case r.GL.BOOL_VEC3:return 3;case r.GL.FLOAT_VEC4:case r.GL.INT_VEC4:case r.GL.BOOL_VEC4:return 4;case r.GL.FLOAT_MAT3:return 9;case r.GL.FLOAT_MAT4:return 16;default:return 0}};var n=t,i=e,o=[];return o.length=this.getTypeNumberOfComponents(n),this.name=function(){return i},this.set=function(t){var e=0,n=o.length;if(1!==n)for(e=0;e<n;e+=1)o[e]=t[e];else o[0]=t},this.callGL=function(t,e){switch(n){case r.GL.BOOL:case r.GL.INT:t.m_context.uniform1iv(e,o);break;case r.GL.FLOAT:t.m_context.uniform1fv(e,o);break;case r.GL.BOOL_VEC2:case r.GL.INT_VEC2:t.m_context.uniform2iv(e,o);break;case r.GL.FLOAT_VEC2:t.m_context.uniform2fv(e,o);break;case r.GL.BOOL_VEC3:case r.GL.INT_VEC3:t.m_context.uniform3iv(e,o);break;case r.GL.FLOAT_VEC3:t.m_context.uniform3fv(e,o);break;case r.GL.BOOL_VEC4:case r.GL.INT_VEC4:t.m_context.uniform4iv(e,o);break;case r.GL.FLOAT_VEC4:t.m_context.uniform4fv(e,o);break;case r.GL.FLOAT_MAT3:t.m_context.uniformMatrix3fv(e,r.GL.FALSE,o);break;case r.GL.FLOAT_MAT4:t.m_context.uniformMatrix4fv(e,r.GL.FALSE,o)}},this.update=function(t,e){},this},r.modelViewOriginUniform=function(t,e){"use strict";if(!(this instanceof r.modelViewOriginUniform))return new r.modelViewOriginUniform(t,e);t||(t="modelViewMatrix");var n=[(e=e||[0,0,0])[0],e[1],e[2]||0];return r.uniform.call(this,r.GL.FLOAT_MAT4,t),this.set(o.create()),this.setOrigin=function(t){n=[(t=t||[0,0,0])[0],t[1],t[2]||0]},this.update=function(t,e){var r=t.m_modelViewMatrix;if(t.m_modelViewAlignment){var i=t.m_modelViewAlignment;(r=r.slice?r.slice():Array.prototype.slice.call(r))[12]=Math.round(r[12]/i.roundx)*i.roundx+i.dx,r[13]=Math.round(r[13]/i.roundy)*i.roundy+i.dy}r=o.translate(o.create(),r,n),this.set(r)},this},i(r.modelViewOriginUniform,r.uniform),r.projectionUniform=function(t){"use strict";return this instanceof r.projectionUniform?(t||(t="projectionMatrix"),r.uniform.call(this,r.GL.FLOAT_MAT4,t),this.set(o.create()),this.update=function(t,e){this.set(t.m_projectionMatrix)},this):new r.projectionUniform(t)},i(r.projectionUniform,r.uniform),r.floatUniform=function(t,e){"use strict";if(!(this instanceof r.floatUniform))return new r.floatUniform(t,e);t||(t="floatUniform"),e=void 0===e?1:e,r.uniform.call(this,r.GL.FLOAT,t),this.set(e)},i(r.floatUniform,r.uniform)},3811:function(t,e,n){var r=n(5577);r.vertexAttributeKeys={Position:0,Normal:1,TextureCoordinate:2,Color:3,Scalar:4,CountAttributeIndex:5},r.vertexAttributeKeysIndexed={Zero:0,One:1,Two:2,Three:3,Four:4,Five:5,Six:6,Seven:7,Eight:8,Nine:9},r.vertexAttribute=function(t){"use strict";if(!(this instanceof r.vertexAttribute))return new r.vertexAttribute(t);var e=t;this.name=function(){return e},this.bindVertexData=function(t,n){var r=t.m_mapper.geometryData().sourceData(n),i=t.m_material.shaderProgram();t.m_context.vertexAttribPointer(i.attributeLocation(e),r.attributeNumberOfComponents(n),r.attributeDataType(n),r.normalized(n),r.attributeStride(n),r.attributeOffset(n)),t.m_context.enableVertexAttribArray(i.attributeLocation(e))},this.undoBindVertexData=function(t,n){var r=t.m_material.shaderProgram();t.m_context.disableVertexAttribArray(r.attributeLocation(e))}}},5577:function(t){t.exports={}},7470:function(t,e,n){var r=n(5638),i=n(5577),o=n(5699);i.viewer=function(t,e){"use strict";if(!(this instanceof i.viewer))return new i.viewer(t,e);i.object.call(this);var n=t,o=i.renderer(e),a=i.renderWindow(n);return this.canvas=function(){return n},this.renderWindow=function(){return a},this.init=function(){null!==a?a._setup():console.log("[ERROR] No render window attached")},this.exit=function(t){null!==a?a._cleanup(t):console.log("[ERROR] No render window attached")},this.render=function(){a.render()},this.bindEventHandlers=function(){r(n).on("mousedown",this.handleMouseDown),r(n).on("mouseup",this.handleMouseUp),r(n).on("mousemove",this.handleMouseMove),r(n).on("mousewheel",this.handleMouseWheel),r(n).on("contextmenu",this.handleContextMenu)},this.unbindEventHandlers=function(){r(n).off("mousedown",this.handleMouseDown),r(n).off("mouseup",this.handleMouseUp),r(n).off("mousemove",this.handleMouseMove),r(n).off("mousewheel",this.handleMouseWheel),r(n).off("contextmenu",this.handleContextMenu)},this._init=function(){this.bindEventHandlers(),a.addRenderer(o)},this._init(),this},o(i.viewer,i.object)},6653:function(t,e,n){t.exports={pointFeature:n(9724),vtkjsRenderer:n(9508)}},7222:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var r=this,i=this.draw;return this.draw=function(){return r.ready&&(r._update(),r.renderer()._render(),i()),r},this}},9724:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r=n(6853),i=n(7222),a=n(9508).vtkjs,s=a.Rendering.Core.vtkActor,u=a.Common.Core.vtkDataArray,l=a.Rendering.Core.vtkGlyph3DMapper,c=a.Rendering.Core.vtkMapper,h=a.Common.DataModel.vtkPointSet,f=a.Filters.Sources.vtkSphereSource;i.call(this);var d,p,m,g,v,y=this,x=this._init,_=this._exit,b=this._update;return this._createPipeline=function(){p=h.newInstance(),(m=f.newInstance()).setThetaResolution(30),m.setPhiResolution(30);var t=l.newInstance({orient:!1,colorByArrayName:"color",scalarMode:c.ScalarMode.USE_POINT_FIELD_DATA,colorMode:c.ColorMode.DIRECT_SCALARS,scaling:!0,scaleArray:"diam",scaleMode:l.ScaleModes.SCALE_BY_MAGNITUDE});t.setInputData(p,0),t.setInputConnection(m.getOutputPort(),1),(d=s.newInstance()).setMapper(t),d.getProperty().setAmbient(1),y.renderer().contextRenderer().addActor(d)},this._init=function(){x.call(y,e),y.renderer().contextRenderer().setLayer(0),y._createPipeline()},this._build=function(){var t,e,n,i,o,a,s=y.data().length,l=new Array(3*s),c=y.data(),h=y.position(),f=y.style.get("radius"),d=y.style.get("fill"),m=y.style.get("fillColor"),x=y.style.get("fillOpacity"),_=y.layer().map().unitsPerPixel(y.layer().map().zoom());for(v&&v.length===s||(v=new Float32Array(s)),g&&g.length===4*s||(g=new Uint8Array(4*s)),t=e=n=0;t<s;t+=1,e+=3,n+=4)i=h(c[t],t),l[e]=i.x,l[e+1]=i.y,l[e+2]=i.z||0,a=a||l[e+2],v[t]=f(c[t],t)*_*2,o=m(c[t],t),g[n]=255*o.r,g[n+1]=255*o.g,g[n+2]=255*o.b,g[n+3]=d(c[t],t)?255*x(c[t],t):0;if(l=r.transformCoordinates(y.gcs(),y.layer().map().gcs(),l,3),!a&&y.gcs()!==y.layer().map().gcs())for(t=e=0;t<s;t+=1,e+=3)l[e+2]=0;p.getPoints().setData(l,3),p.getPointData().addArray(u.newInstance({name:"color",values:g,numberOfComponents:4})),p.getPointData().addArray(u.newInstance({name:"diam",values:v})),y.buildTime().modified()},this._update=function(){if(b.call(y),y.dataTime().getMTime()>=y.buildTime().getMTime()||y.updateTime().getMTime()<y.getMTime())y._build();else{var t=y.data(),e=y.style.get("radius"),n=y.layer().map().unitsPerPixel(y.layer().map().zoom()),r=p.getPointData().getArray("diam"),i=r.getData().map((function(r,i){return e(t[i],i)*n*2}));r.setData(i),p.modified()}y.updateTime().modified()},this._exit=function(){y.renderer().contextRenderer().removeActor(d),_()},y._init(),this};r(a,o);var s={};s[o.capabilities.stroke]=!1,i("vtkjs","point",a,s),t.exports=a},9508:function(t,e,n){var r=n(5699),i=n(4647).registerRenderer,o=n(3234),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r=n(5240),i=n(5108),a=t.vtkjs.Rendering.Misc.vtkGenericRenderWindow,s=this,u=this._init,l=a.newInstance({background:[0,0,0,0]});l.setContainer(s.layer().node().get(0)),l.getInteractor().unbindEvents(),l.resize();var c=l.getRenderer(),h=l.getRenderWindow();return this.contextRenderer=function(){return c},this.api=function(){return t.apiname},this._init=function(){if(s.initialized())return s;u.call(s);var t=s.layer().map(),e=t.size();return s._resize(0,0,e.width,e.height),t.camera().clipbounds={near:-t.unitsPerPixel(),far:t.unitsPerPixel()},s},this._resize=function(t,e,n,r){return s._setWidthHeight(n,r),l.resize(),s._render(),s},this._render=function(){return s.layer().map().scheduleAnimationFrame(s._renderFrame,!0),s},this._renderFrame=function(){var t,e=s.layer().features();for(t=0;t<e.length;t+=1)e[t].visible()&&e[t]._update();s._updateRendererCamera(),h.render()},this._exit=function(){},this._updateRendererCamera=function(){var t=s.layer().map().camera(),e=t.view,n=t.projectionMatrix,i=r.create();r.copy(i,e);var o=r.create();r.copy(o,n),s.contextRenderer().getActiveCamera().setViewMatrix(i),s.contextRenderer().getActiveCamera().setProjectionMatrix(o)},s.layer().geoOn(i.pan,(function(t){s._render()})),s.layer().geoOn(i.parallelprojection,(function(t){})),this};a.apiname="vtkjs",r(a,o),i("vtkjs",a),a.supported=function(){delete a.vtkjs;try{a.vtkjs=n(999)}catch(t){}return a.vtkjs&&a.vtkjs.Rendering||!window.vtk||!window.vtk.Rendering||(a.vtkjs=window.vtk),a.vtkjs&&a.vtkjs.Rendering||(a.vtkjs=void 0),void 0!==a.vtkjs},a.fallback=function(){return null},a.supported(),t.exports=a},99:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(8719),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n=this,r=null,i=this._exit,a=this.draw,s=this._update;return this.draw=function(){if(n._update(),r)for(var t=0;t<r.length;t+=1)r[t].draw();return a(),n},this._build=function(){return n.buildTime().modified(),r=n.createChoropleth()},this._update=function(){s.call(n),(n.dataTime().timestamp()>=n.buildTime().timestamp()||n.updateTime().timestamp()<=n.timestamp())&&(n._wipePolygons(),n._build()),n.updateTime().modified()},this._wipePolygons=function(){r&&r.map((function(t){return t._exit()})),r=null},this._exit=function(){n._wipePolygons(),i()},this._init(e),this};r(a,o),i("webgl","choropleth",a),t.exports=a},8917:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(9005),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e),n(5651).call(this,e);var r=this;return this._build=function(){r.actors()[0]&&r.renderer().contextRenderer().removeActor(r.actors()[0]),r.createGLMeshColored(r._createContours()),r.renderer().contextRenderer().addActor(r.actors()[0]),r.buildTime().modified()},this._init(e),this};r(a,o),i("webgl","contour",a),t.exports=a},8939:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(1109),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e),n(5651).call(this,e);var r=this;return this._build=function(){r.actors()[0]&&r.renderer().contextRenderer().removeActor(r.actors()[0]),r.createGLMeshColored(r._createGrids()),r.renderer().contextRenderer().addActor(r.actors()[0]),r.buildTime().modified()},this._init(e),this};r(a,o),i("webgl","grid",a),t.exports=a},9205:function(t,e,n){t.exports={choroplethFeature:n(99),contourFeature:n(8917),gridFeature:n(8939),isolineFeature:n(9752),layer:n(5389),lineFeature:n(7390),lookupTable2D:n(8672),markerFeature:n(1848),meshColored:n(5651),pixelmapFeature:n(9685),pointFeature:n(5675),polygonFeature:n(2890),quadFeature:n(2182),tileLayer:n(7112),trackFeature:n(506),webglRenderer:n(2254)}},9752:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(2367),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(7719).call(this),this._init(e),this):new t(e)};r(a,o),i("webgl","isoline",a),t.exports=a},5389:function(t,e,n){var r=function(){"use strict";var t=n(4647).createRenderer,e=n(5108),r=n(2254),i=n(1940),o=this,a=this._init,s=this.opacity,u=this.visible,l=this.zIndex;this.opacity=function(t){var e=s.apply(o,arguments);return void 0!==t&&o.initialized()&&o.map()._updateAutoshareRenderers(),e},this.visible=function(t){if(void 0===t)return u();var e=u(),n=u.apply(o,arguments);return e!==t&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render()),n},this.zIndex=function(t,e){var n=l.apply(o,arguments);return void 0!==t&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render(),o.map()._updateAutoshareRenderers()),n},this.switchRenderer=function(t,e){if(t instanceof r&&t!==o.renderer()){var n=o.renderer(),i=[],a=[];o.map().listSceneObjects([o]).forEach((function(t){t._cleanup&&(t._cleanup(),t._update&&a.push(t)),t.actors&&(i=i.concat(t.actors()))})),i.forEach((function(e){n.contextRenderer().removeActor(e),t.contextRenderer().addActor(e)})),o._renderer(t),o._canvas(t.canvas()),e&&(i.length||a.length)&&(n._render(),a.forEach((function(t){t._update()})),t._render())}return o},this._init=function(){var n=o.map();return n._updateAutoshareRenderers||(n._updateAutoshareRenderers=function(){var e,o,a,s=n.sortedLayers(),u=[];s.forEach((function(n){var s=n.autoshareRenderer(),l=n instanceof i;s&&n.renderer()&&n.renderer().api()===r.apiname?!e||n.opacity()!==o||"more"!==s&&(n.opacity()>0&&n.opacity()<1||l&&!a)?(n.node()[0].contains(n.renderer().canvas()[0])||(n.switchRenderer(t(r.apiname,n),!1),u.push(n.renderer())),e=n.renderer(),o=n.opacity(),a=l):(n.renderer()!==e&&(u.push(n.renderer()),n.switchRenderer(e,!1),u.push(n.renderer())),a&=l):e=null})),s.forEach((function(t){u.indexOf(t.renderer())>=0&&t._update&&t._update()})),s.forEach((function(t){u.indexOf(t.renderer())>=0&&(t.renderer()._renderFrame(),u=u.filter((function(e){return e!==t.renderer()})))})),u.forEach((function(t){t._exit()}))},n.geoOn(e.layerAdd,(function(){return n._updateAutoshareRenderers()})),n.geoOn(e.layerRemove,(function(){return n._updateAutoshareRenderers()}))),a.apply(o,arguments)}};(0,n(4647).registerLayerAdjustment)("webgl","all",r),t.exports=r},7390:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=0,s=1,u=3,l={butt:0,square:1,round:2},c={passthrough:3,miter:4,bevel:5,round:6,"miter-clip":7},h={normal:0,debug:1},f=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r=n(5140),i=n(6853),f=n(4634),d=n(7719),p=n(9162),m=n(359),g=n(916);d.call(this);var v,y,x,_,b,M,w,A,T,C,E,k=this,S=this._exit,P=void 0!==e.dynamicDraw&&e.dynamicDraw,O=this._init,L=this._update;return this.featureVertices=function(){return[[0,"corner",-1,a],[0,"near",1,s],[1,"far",-1,u],[1,"corner",1,a],[1,"near",-1,s],[0,"far",1,u]]},this.verticesPerFeature=function(){return k.featureVertices().length},this._init=function(t){var e,n=r.shaderProgram(),i=((e=new r.shader(r.GL.VERTEX_SHADER)).setShaderSource(g),e),o=function(t){var e=new r.shader(r.GL.FRAGMENT_SHADER);return e.setShaderSource(t?m:p),e}(void 0!==((t||{}).style||{}).debug),a=r.vertexAttribute("pos"),s=r.vertexAttribute("prev"),u=r.vertexAttribute("next"),l=r.vertexAttribute("far"),c=r.vertexAttribute("flags"),h=r.vertexAttribute("strokeWidth"),f=r.vertexAttribute("strokeColor"),d=r.vertexAttribute("strokeOpacity"),T=new r.projectionUniform("projectionMatrix"),C=r.geometryData(),S=r.sourceDataP3fv({name:"pos"}),L=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Four,{name:"prev"}),R=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Five,{name:"next"}),I=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Six,{name:"far"}),D=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Seven,{name:"flags"}),F=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.One,{name:"strokeWidth"}),N=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Two,{name:"strokeColor"}),j=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"strokeOpacity"}),z=r.triangles();return E=new r.modelViewOriginUniform("modelViewMatrix"),_=new r.floatUniform("pixelWidth",1/k.renderer().width()),b=new r.floatUniform("aspect",k.renderer().width()/k.renderer().height()),M=new r.floatUniform("miterLimit",10),w=new r.floatUniform("antialiasing",0),A=new r.floatUniform("fixedFlags",0),O.call(k,t),x=r.material(),y=r.mapper({dynamicDraw:P}),n.addVertexAttribute(a,r.vertexAttributeKeys.Position),n.addVertexAttribute(h,r.vertexAttributeKeysIndexed.One),n.addVertexAttribute(f,r.vertexAttributeKeysIndexed.Two),n.addVertexAttribute(d,r.vertexAttributeKeysIndexed.Three),n.addVertexAttribute(s,r.vertexAttributeKeysIndexed.Four),n.addVertexAttribute(u,r.vertexAttributeKeysIndexed.Five),n.addVertexAttribute(l,r.vertexAttributeKeysIndexed.Six),n.addVertexAttribute(c,r.vertexAttributeKeysIndexed.Seven),n.addUniform(E),n.addUniform(T),n.addUniform(_),n.addUniform(b),n.addUniform(M),n.addUniform(w),n.addUniform(A),n.addShader(o),n.addShader(i),x.addAttribute(n),x.addAttribute(r.blend()),(v=r.actor()).setMaterial(x),v.setMapper(y),C.addSource(S),C.addSource(L),C.addSource(R),C.addSource(I),C.addSource(F),C.addSource(N),C.addSource(j),C.addSource(D),z.setIndices(new Uint16Array(1)),C.addPrimitive(z),C.computeBounds=function(){C.setBounds(0,0,0,0,0,0)},y.setGeometryData(C),k},this.actors=function(){return v?[v]:[]},this._build=function(){return function(t){var e,n,r,o,a,s,u,d,p,m,g,v,x,_,b,S,P,O,L,R,I,D,F,N,j,z,B,q,V,G,U,W,H,Z,X,Q,Y,K,J,$,tt=k.data(),et=0,nt=[{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0},{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0}],rt=nt[1],it=k.gcs(),ot=k.layer().map().gcs(),at=k.line(),st=k.style.get("strokeWidth"),ut=k.style.get("strokeColor"),lt=k.style.get("strokeOpacity"),ct=k.style.get("lineCap"),ht=k.style.get("lineJoin"),ft=k.style.get("strokeOffset"),dt=k.style.get("miterLimit")(tt),pt=k.style.get("antialiasing")(tt)||0,mt=k.style.get("uniformLine"),gt=k.featureVertices(),vt=gt.length,yt=h[k.style.get("debug")(tt)?"debug":"normal"]||0,xt=y.geometryData(),_t=k.style.get("closed"),bt=!0;if(J=f.isFunction(k.style("closed"))?void 0:_t()||!1,R=f.isFunction(k.style("lineCap"))?void 0:l[ct()||"butt"],I=f.isFunction(k.style("lineJoin"))?void 0:c[ht()||"miter"],O=f.isFunction(k.style("strokeColor"))?void 0:ut(),D=f.isFunction(k.style("strokeOffset"))?void 0:ft()||0,L=f.isFunction(k.style("strokeOpacity"))?void 0:lt(),P=f.isFunction(k.style("strokeWidth"))?void 0:st(),F=f.isFunction(k.style("uniformLine"))?void 0:mt(),void 0!==dt&&M.set(Math.max(1,Math.min(100,dt))),A.set(yt),w.set(pt),t)et=T.numSegments,$=T.closed,m=T.lineItemList,p=et*vt,bt=R!==T.lineCapVal||void 0===R||I!==T.lineJoinVal||void 0===I||D!==T.strokeOffsetVal||void 0===D;else{var Mt=[],wt=k.position();for(wt=wt===f.identityFunction?null:wt,m=new Array(tt.length),$=new Array(tt.length),n=0;n<tt.length;n+=1)if(g=at(e=tt[n],n),m[n]=g,!(g.length<2)){for(et+=g.length-1,r=0;r<g.length;r+=1)x=wt?wt(g[r],r,e,n):g[r],Mt.push(x.x),Mt.push(x.y),Mt.push(x.z||0),r||(b=x);g.length>2&&(void 0===J?_t(e,n):J)?x.x!==b.x||x.y!==b.y||x.z!==b.z?(et+=1,$[n]=2):$[n]=1:$[n]=0}if(Mt=i.transformCoordinates(it,ot,Mt,3),(C=new Float32Array(k.style.get("origin")(Mt)))[0]||C[1]||C[2])for(n=0;n<Mt.length;n+=3)Mt[n]-=C[0],Mt[n+1]-=C[1],Mt[n+2]-=C[2];E.setOrigin(C),p=et*vt,V=f.getGeomBuffer(xt,"pos",3*p),G=f.getGeomBuffer(xt,"prev",3*p),U=f.getGeomBuffer(xt,"next",3*p),W=f.getGeomBuffer(xt,"far",3*p),xt.primitive(0).numberOfIndices()!==p&&(xt.primitive(0).numberOfIndices=function(){return p}),T={numSegments:et,closed:$,lineItemList:m,lineCapVal:R,lineJoinVal:I,strokeOffsetVal:D}}for(H=f.getGeomBuffer(xt,"flags",p),Z=f.getGeomBuffer(xt,"strokeWidth",p),X=f.getGeomBuffer(xt,"strokeColor",3*p),Q=f.getGeomBuffer(xt,"strokeOpacity",p),n=_=Y=K=0;n<tt.length;n+=1)if(!((g=m[n]).length<2)){N=void 0===F?mt(g,n):F,e=tt[n],J=$[n],S=_,d=g.length+(2===J?1:0);var At=0;for(r=0;r<d;r+=1,_+=3)if(u=r,r===g.length&&(u=0,_-=3),v=g[u],r&&(rt=nt[0],nt[0]=nt[1],nt[1]=rt),t||(rt.pos=r===u?_:S,rt.prev=u?_-3:J?S+3*(g.length-3+J):_,rt.next=r+1<g.length?_+3:J?r!==u?S+3:S+6-3*J:_),N&&r>0?1===r&&(rt.strokeWidth=nt[0].strokeWidth,rt.strokeColor=nt[0].strokeColor,rt.strokeOpacity=nt[0].strokeOpacity):(rt.strokeWidth=void 0===P?st(v,u,e,n):P,rt.strokeColor=void 0===O?ut(v,u,e,n):O,rt.strokeOpacity=void 0===L?lt(v,u,e,n):L),bt&&(0!==D&&(N&&r>0?1===r&&(rt.strokeOffset=nt[0].strokeOffset):rt.strokeOffset=(void 0===D?ft(v,u,e,n):D)||0,rt.strokeOffset?(rt.posStrokeOffset=2047&Math.round(2048+1023*Math.min(1,Math.max(-1,rt.strokeOffset))),rt.negStrokeOffset=2047&Math.round(2048-1023*Math.min(1,Math.max(-1,rt.strokeOffset)))):rt.posStrokeOffset=rt.negStrokeOffset=0),J||r&&r!==g.length-1?rt.flags=void 0===I?c[ht(v,u,e,n)]||c.miter:I:rt.flags=void 0===R?l[ct(v,u,e,n)]||l.butt:R),r){if("drop"===N&&r>1&&Mt[nt[0].pos]===Mt[nt[1].pos]&&Mt[nt[0].pos+1]===Mt[nt[1].pos+1]){At+=1;continue}for(o=0;o<vt;o+=1,Y+=1,K+=3)"drop"===N&&nt[0].strokeOpacity<=0&&nt[1].strokeOpacity<=0?Q[Y]=-1:(a=nt[j=gt[o][0]],s=nt[1-j],t||(V[K]=Mt[a.pos],V[K+1]=Mt[a.pos+1],V[K+2]=0,z=j?"next":"prev",B=j?"prev":"next",G[K]=Mt[a[z]],G[K+1]=Mt[a[z]+1],G[K+2]=0,U[K]=Mt[a[B]],U[K+1]=Mt[a[B]+1],U[K+2]=0,W[K]=Mt[s[B]],W[K+1]=Mt[s[B]+1],W[K+2]=0),bt&&(q=j?"posStrokeOffset":"negStrokeOffset",H[Y]=gt[o][3]+4*a.flags+32*s.flags+256*a[q]),Z[Y]=a.strokeWidth,X[K]=a.strokeColor.r,X[K+1]=a.strokeColor.g,X[K+2]=a.strokeColor.b,a.strokeOpacity<=0&&s.strokeOpacity<=0||a.strokeWidth<=0&&s.strokeWidth<=0?Q[Y]=-1:Q[Y]=a.strokeOpacity)}if(At)for(o=0;o<At*vt;o+=1,Y+=1,K+=3)Q[Y]=-1}t?(bt&&y.updateSourceBuffer("flags"),y.updateSourceBuffer("strokeWidth"),y.updateSourceBuffer("strokeOpacity"),y.updateSourceBuffer("strokeColor")):(y.modified(),xt.boundsDirty(!0),y.boundsDirtyTimestamp().modified())}(!!(k.dataTime().timestamp()<k.buildTime().timestamp()&&T)),k.renderer().contextRenderer().hasActor(v)||k.renderer().contextRenderer().addActor(v),k.buildTime().modified(),k},this._update=function(){return L.call(k),(k.dataTime().timestamp()>=k.buildTime().timestamp()||k.updateTime().timestamp()<=k.timestamp())&&k._build(),_.set(1/k.renderer().width()),b.set(k.renderer().width()/k.renderer().height()),v.setVisible(k.visible()),v.material().setBinNumber(k.bin()),k.updateTime().modified(),k},this._exit=function(){k.renderer().contextRenderer().removeActor(v),v=null,S()},this._init(e),this};r(f,o);var d={};d[o.capabilities.basic]=!0,d[o.capabilities.multicolor]=!0,i("webgl","line",f,d),t.exports=f},8672:function(t,e,n){var r=n(5699),i=n(6618),o=n(5140);var a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.texture.call(this);var n,r=i(),a=e.maxWidth||4096,s=new Uint8Array([0,0,0,0]),u=this;return this.setup=function(t){!function(t,e){if(!(e>=0&&e<=31))throw Error("[error] Texture unit "+e+" is not supported");t.m_context.activeTexture(o.GL.TEXTURE0+e)}(t,u.textureUnit()),t.m_context.deleteTexture(u.m_textureHandle),u.m_textureHandle=t.m_context.createTexture(),t.m_context.bindTexture(o.GL.TEXTURE_2D,u.m_textureHandle),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MIN_FILTER,o.GL.NEAREST),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MAG_FILTER,o.GL.NEAREST),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_S,o.GL.CLAMP_TO_EDGE),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_T,o.GL.CLAMP_TO_EDGE),t.m_context.pixelStorei(o.GL.UNPACK_ALIGNMENT,1),t.m_context.pixelStorei(o.GL.UNPACK_FLIP_Y_WEBGL,!0),t.m_context.texImage2D(o.GL.TEXTURE_2D,0,o.GL.RGBA,u.width,u.height,0,o.GL.RGBA,o.GL.UNSIGNED_BYTE,s),t.m_context.bindTexture(o.GL.TEXTURE_2D,null),r.modified()},this.colorTable=function(t){return void 0===t?n:(n=t,t.length<4&&(t=[0,0,0,0]),u.width=Math.min(a,t.length/4),u.height=Math.ceil(t.length/4/a),t instanceof Uint8Array&&t.length===u.width*u.height*4?s=t:(t.length<u.width*u.height*4&&(t=t.concat(new Array(u.width*u.height*4-t.length).fill(0))),s=new Uint8Array(t)),u.modified(),u)},this.maxWidth=function(){return a},this.colorTable(e.colorTable||[]),this};r(a,o.texture),t.exports=a},1848:function(t,e,n){var r=n(5638),i=n(5699),o=n(4647).registerFeature,a=n(7098),s=n(2254),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var i=n(5140),o=n(6853),u=n(4634),l=n(7719),c=n(9892),h=n(5108),f=n(5573),d=n(468),p=n(2043),m=n(7981);l.call(this);var g,v,y=this,x=this._exit,_=null,b=null,M={},w=this._init,A=this._update,T=this.updateStyleFromArray;function C(t){var e,n,r,i,l,c,h,f,d,p,m,x,M,w=y.data().length,A=y._pointPolygon(0,0,1,1),T=new Array(3*w),E={},k={},S={},P={},O={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeOffset:0,strokeWidth:1,symbol:1,symbolValue:1,rotation:1,scaleWithZoom:0,rotateWithMap:0,radiusIncludesStroke:0},L=y.verticesPerFeature(),R=y.data(),I=b.geometryData();for(var D in l=y.position(),O)S[D]=y.style.get(D),u.isFunction(y.style(D))||(P[D]=S[D]()),O[D]&&(E[D]=u.getGeomBuffer(I,D,L*w*O[D]));if(!t){for(e=x=0;e<w;e+=1,x+=3)i=l(R[e],e),T[x]=i.x,T[x+1]=i.y,T[x+2]=0;if(T=o.transformCoordinates(y.gcs(),y.layer().map().gcs(),T,3),(v=new Float32Array(y.style.get("origin")(T)))[0]||v[1]||v[2])for(e=x=0;e<w;e+=1,x+=3)T[x]-=v[0],T[x+1]-=v[1],T[x+2]-=v[2];g.setOrigin(v),r=u.getGeomBuffer(I,"pos",L*w*3),y._primitiveShape!==a.primitiveShapes.sprite&&(h=u.getGeomBuffer(I,"unit",L*w*2)),(c=I.primitive(0).indices())instanceof Uint16Array&&c.length===L*w||(c=new Uint16Array(L*w),I.primitive(0).setIndices(c))}for(e=d=p=m=x=0;e<w;e+=1,x+=3){if(f=R[e],!t&&y._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<A.length;n+=1,m+=1)h[m]=A[n];for(var F in O)k[F]=void 0===P[F]?S[F](f,e):P[F];for(k.scaleWithZoom=a.scaleMode[k.scaleWithZoom]||(k.scaleWithZoom>=1&&k.scaleWithZoom<=3?k.scaleWithZoom:0),k.symbolComputed=k.scaleWithZoom+(k.rotateWithMap?4:0)+16*(Math.sign(void 0!==k.radiusIncludesStroke&&k.radiusIncludesStroke?k.strokeOffset:1)+1)+64*k.symbol,k.symbolValue&&k.symbol>=a.symbols.arrow&&k.symbol<a.symbols.arrow+a.symbols.arrowMax&&(k.symbolValue=(M=k.symbolValue).length?((void 0===M[0]?0:Math.floor(250*Math.abs(M[0]))+1)+252*(void 0===M[1]?0:Math.floor(250*Math.abs(M[1]))+1)+252*(void 0===M[2]?0:Math.floor(250*Math.abs(M[2]))+1)*252)*(M[3]?-1:1):void 0===M?0:Math.floor(250*Math.abs(M))+1),n=0;n<L;n+=1,d+=1,p+=3)t||(r[p]=T[x],r[p+1]=T[x+1],r[p+2]=T[x+2]),E.radius[d]=k.radius,E.fillColor[p]=k.fillColor.r,E.fillColor[p+1]=k.fillColor.g,E.fillColor[p+2]=k.fillColor.b,E.fillOpacity[d]=k.fillOpacity,E.strokeColor[p]=k.strokeColor.r,E.strokeColor[p+1]=k.strokeColor.g,E.strokeColor[p+2]=k.strokeColor.b,E.strokeOpacity[d]=k.strokeOpacity,E.strokeWidth[d]=k.strokeWidth,E.symbol[d]=k.symbolComputed,E.symbolValue[d]=k.symbolValue,E.rotation[d]=k.rotation}if(y._primitiveShapeAuto){var N=y._approximateMaxRadius(y.renderer().map().zoom());if(y._primitiveShape===a.primitiveShapes.sprite&&N>s._maxPointSize||y._primitiveShape!==a.primitiveShapes.sprite&&N<=s._maxPointSize)return y._primitiveShape=N>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,y.renderer().contextRenderer().removeActor(_),_=null,y._init(!0),void C()}t?Object.keys(E).forEach((function(t){return b.updateSourceBuffer(t)})):(I.boundsDirty(!0),b.modified(),b.boundsDirtyTimestamp().modified())}return c(y,e),this.actors=function(){return _?[_]:[]},this.updateStyleFromArray=function(t,e,n){var i,o,a={fillColor:3,fillOpacity:1,radius:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbolComputed:1,symbolValueComputed:1};if("string"==typeof t){var s={};s[t]=e,t=s}return r.each(t,(function(t,e){var n,r,s,u,l,c,h,f,d,p;if(y.visible()&&_&&a[t]&&!i&&!y.clustering())if(d=a[t],u=y.data().length,p="symbolComputed"===t?"symbol":"symbolValueComputed"===t?"symbolValue":t,s=(r=_.mapper()).getSourceBuffer(p),n=y.verticesPerFeature(),s&&u&&u*n*d===s.length){switch(a[t]){case 1:for(c=0,f=0;c<u;c+=1)for(l=e[c],h=0;h<n;h+=1,f+=1)s[f]=l;break;case 3:for(c=0,f=0;c<u;c+=1)for(l=e[c],h=0;h<n;h+=1,f+=3)s[f]=l.r,s[f+1]=l.g,s[f+2]=l.b}r.updateSourceBuffer(p),o=!0}else i=!0;else i=!0;if(t===p){var m=y.modified;i||(y.modified=function(){}),T(t,e,!1),y.modified=m}})),n&&(y.visible()&&i?y.draw():o&&y.renderer()._render()),y},this._handleZoom=function(t){y._primitiveShapeAuto&&y._primitiveShape===a.primitiveShapes.sprite&&y._approximateMaxRadius(t)>s._maxPointSize&&(y._primitiveShape=a.primitiveShapes.triangle,y.renderer().contextRenderer().removeActor(y.actors()[0]),y._init(!0),y.dataTime().modified(),y.draw())},this._init=function(t){var n,r,o=i.shaderProgram(),s=((r=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?m:p),r),u=function(){var t=new i.shader(i.GL.FRAGMENT_SHADER);return t.setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?d:f),t}(),l=i.material(),c=i.blend(),x=i.geometryData(),A=i.sourceDataP3fv({name:"pos"}),T={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbol:1,symbolValue:1,rotation:1},C={pixelWidth:i.GL.FLOAT,aspect:i.GL.FLOAT,zoom:i.GL.FLOAT,rotationUniform:i.GL.FLOAT},E=new i.projectionUniform("projectionMatrix");g=new i.modelViewOriginUniform("modelViewMatrix",v),y._primitiveShape===a.primitiveShapes.sprite?n=new i.points:(n=new i.triangles,T.unit=2),n.setIndices(new Uint16Array),t||w.call(y,e),b=i.mapper(),o.addVertexAttribute(i.vertexAttribute("pos"),i.vertexAttributeKeys.Position),x.addSource(A),Object.keys(T).forEach((function(t,e){o.addVertexAttribute(i.vertexAttribute(t),e+1),x.addSource(i.sourceDataAnyfv(T[t],e+1,{name:t}))})),M={},Object.keys(C).forEach((function(t){M[t]=new i.uniform(C[t],t),o.addUniform(M[t])})),o.addUniform(g),o.addUniform(E),o.addShader(u),o.addShader(s),l.addAttribute(o),l.addAttribute(c),(_=i.actor()).setMaterial(l),_.setMapper(b),x.addPrimitive(n),x.computeBounds=function(){x.setBounds(0,0,0,0,0,0)},b.setGeometryData(x),t||y.geoOn(h.zoom,(function(t){y._handleZoom(t.zoomLevel)}))},this._build=function(){return C(y.dataTime().timestamp()<y.buildTime().timestamp()),y.renderer().contextRenderer().hasActor(_)||y.renderer().contextRenderer().addActor(_),y.buildTime().modified(),y},this._update=function(){return A.call(y),(y.dataTime().timestamp()>=y.buildTime().timestamp()||y.updateTime().timestamp()<y.timestamp())&&y._build(),M.pixelWidth.set(2/y.renderer().width()),M.aspect.set(y.renderer().width()/y.renderer().height()),M.zoom.set(y.renderer().map().zoom()),M.rotationUniform.set(y.renderer().map().rotation()),_.setVisible(y.visible()),_.material().setBinNumber(y.bin()),y.updateTime().modified(),y},this._exit=function(){y.renderer().contextRenderer().removeActor(_),_=null,M={},x()},y._init(),this};i(u,a);o("webgl","marker",u,{}),t.exports=u},5651:function(t,e,n){t.exports=function(t){"use strict";t=t||{};var e=n(5140),r=n(6853),i=n(4634),o=n(4351),a=n(5836);n(7719).call(this);var s,u,l=this,c=this._exit,h=null,f=null,d=null,p=null,m=null,g=null,v=null,y=null,x=void 0!==t.dynamicDraw&&t.dynamicDraw,_=this._init,b=this._update;function M(){var t=new e.shader(e.GL.VERTEX_SHADER);return t.setShaderSource(a),t}function w(){var t=new e.shader(e.GL.FRAGMENT_SHADER);return t.setShaderSource(o),t}return this.createGLMeshColored=function(t){var e,n,o,a,c,h,d,x,_,b=t.elements.length,M=[],w=f.geometryData();for(m.set([t.minColor.r,t.minColor.g,t.minColor.b,t.minColor.a]),g.set([t.maxColor.r,t.maxColor.g,t.maxColor.b,t.maxColor.a]),v.set(t.colorMap.length),y.set(t.stepped),e=-1;e<t.colorMap.length+1;e+=1)o=Math.max(0,Math.min(t.colorMap.length-1,e)),M.push(255*t.colorMap[o].r),M.push(255*t.colorMap[o].g),M.push(255*t.colorMap[o].b),M.push(255*t.colorMap[o].a);if(p.setColorTable(M),t.pos=r.transformCoordinates(l.gcs(),l.layer().map().gcs(),t.pos,3),(s=new Float32Array(l.style.get("origin")(t.pos)))[0]||s[1]||s[2])for(e=0;e<t.pos.length;e+=3)t.pos[e]-=s[0],t.pos[e+1]-=s[1],t.pos[e+2]-=s[2];for(u.setOrigin(s),h=i.getGeomBuffer(w,"pos",3*b),d=i.getGeomBuffer(w,"opacity",b),x=i.getGeomBuffer(w,"value",b),e=n=0;e<b;e+=1,n+=3)a=3*(o=t.elements[e]),h[n]=t.pos[a],h[n+1]=t.pos[a+1],h[n+2]=t.pos[a+2],c=t.elementValues?Math.floor(e/3):o,d[e]=t.opacity[c],x[e]=t.value[c];(_=w.primitive(0).indices())instanceof Uint16Array&&_.length===b||(_=new Uint16Array(b),w.primitive(0).setIndices(_)),w.boundsDirty(!0),f.modified(),f.boundsDirtyTimestamp().modified()},this._init=function(t){var n=e.blend(),r=e.shaderProgram(),i=e.material(),o=e.lookupTable(),a=e.geometryData(),s=new e.projectionUniform("projectionMatrix"),c=new e.uniform(e.GL.INT,"sampler2d"),b=M(),A=w(),T=e.vertexAttribute("pos"),C=e.vertexAttribute("value"),E=e.vertexAttribute("opacity"),k=e.sourceDataP3fv({name:"pos"}),S=e.sourceDataAnyfv(1,e.vertexAttributeKeysIndexed.One,{name:"value"}),P=e.sourceDataAnyfv(1,e.vertexAttributeKeysIndexed.Two,{name:"opacity"}),O=new e.triangles;u=new e.modelViewOriginUniform("modelViewMatrix"),_.call(l,t),f=e.mapper({dynamicDraw:x}),r.addVertexAttribute(T,e.vertexAttributeKeys.Position),r.addVertexAttribute(C,e.vertexAttributeKeysIndexed.One),r.addVertexAttribute(E,e.vertexAttributeKeysIndexed.Two),r.addUniform(u),r.addUniform(s),m=new e.uniform(e.GL.FLOAT_VEC4,"minColor"),r.addUniform(m),g=new e.uniform(e.GL.FLOAT_VEC4,"maxColor"),r.addUniform(g),v=new e.uniform(e.GL.FLOAT,"steps"),r.addUniform(v),y=new e.uniform(e.GL.BOOL,"stepped"),r.addUniform(y),r.addShader(A),r.addShader(b),r.addUniform(c),o.setTextureUnit(7),c.set(7),(d=i).addAttribute(r),d.addAttribute(n),p=o,d.addAttribute(p),(h=e.actor()).setMaterial(d),h.setMapper(f),a.addSource(k),a.addSource(S),a.addSource(P),a.addPrimitive(O),a.computeBounds=function(){a.setBounds(0,0,0,0,0,0)},f.setGeometryData(a)},this.actors=function(){return h?[h]:[]},this._update=function(){b.call(l),(l.dataTime().timestamp()>=l.buildTime().timestamp()||l.updateTime().timestamp()<=l.timestamp())&&l._build(),h.setVisible(l.visible()),h.material().setBinNumber(l.bin()),l.updateTime().modified()},this._exit=function(){l.renderer().contextRenderer().removeActor(h),c()},this}},7719:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var r=this,i=this.draw;if(this.draw=function(){return r.ready&&(r._update({mayDelay:!0}),r.renderer()._render(),i()),r},this.bin){var o=this.bin;this.bin=function(t,e){if(void 0===t&&!e&&null===o(void 0,!0)){var n=r.layer&&r.layer(),i=n&&n.map&&n.map(),a=(i&&i.listSceneObjects()||[]).indexOf(r);if(a>=0)return a}return o.apply(r,arguments)}}return this}},9685:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(6374),a=n(8672),s=n(4634),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(7719).call(this);var r,i,u,l=n(5140),c=n(3953),h=this._exit,f=this;return this.pointSearch=function(t,e){if(r&&f.m_info)for(var n=r.pointSearch(t,e),i=n.index.length-1;i>=0;i-=1)if(n.extra[n.index[i]]._quad&&n.extra[n.index[i]]._quad.image){var o=n.extra[n.index[i]]._quad.image,a=n.extra[n.index[i]].basis,s=Math.floor(a.x*o.width),u=Math.floor(a.y*o.height),l=document.createElement("canvas");l.width=l.height=1;var c=l.getContext("2d");c.drawImage(o,s,u,1,1,0,0,1,1);var h=c.getImageData(0,0,1,1).data,d=h[0]+256*h[1]+256*h[2]*256;return n={index:[d],found:[f.data()[d]]}}return{index:[],found:[]}},this._computePixelmap=function(){var t=f.data()||[],e=f.style.get("color"),n=f.indexModified(void 0,"clear"),o=f.dataTime().timestamp()>=f.buildTime().timestamp()||void 0===n;u||((u=a()).setTextureUnit(1),o=!0);var h,d=Math.max(1,t.length),p=u.maxWidth();d>p&&d%p&&(d+=p-d%p),o||(o=(h=u.colorTable()).length!==4*d,n[0]=Math.max(0,n[0]),n[1]=Math.min(t.length,n[1]+1)),o&&(h=new Uint8Array(4*d),n=[0,t.length]);for(var m=n[0];m<n[1];m+=1){var g=t[m],v=s.convertColor(e.call(f,g,m));h[4*m]=255*v.r,h[4*m+1]=255*v.g,h[4*m+2]=255*v.b,h[4*m+3]=void 0===v.a?255:255*v.a}f.m_info={colors:h};var y=u.colorTable();if(y&&y.length===h.length){for(var x=4*n[0];x<4*n[1]&&h[x]===y[x];x+=1);if(x===4*n[1])return}u.colorTable(h),r||(r=f.layer().createFeature("quad",{selectionAPI:!1,gcs:f.gcs(),visible:f.visible(void 0,!0),nearestPixel:!0}),i=!1),i||(f.dependentFeatures([r]),r.setShader("image_fragment",c),r._hookBuild=function(t){var e=new l.uniform(l.GL.INT,"lutSampler");e.set(u.textureUnit()),t.addUniform(e);var n=new l.uniform(l.GL.INT,"lutWidth");n.set(u.width),t.addUniform(n);var r=new l.uniform(l.GL.INT,"lutHeight");r.set(u.height),t.addUniform(r)},r._hookRenderImageQuads=function(t,e){u.bind(t,e)},!1===i&&r.style({image:f.m_srcImage,position:f.style.get("position")}).data([{}]).draw(),i=!0)},this._exit=function(){return r&&f.layer()&&(f.layer().deleteFeature(r),r=null,f.dependentFeatures([])),h(),f},e.quadFeature&&(r=e.quadFeature).nearestPixel&&r.nearestPixel(!0),this._init(e),this};r(u,o);var l={};l[o.capabilities.lookup]=!0,i("webgl","pixelmap",u,l),t.exports=u},5675:function(t,e,n){var r=n(5638),i=n(5699),o=n(4647).registerFeature,a=n(2557),s=n(2254),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var i=n(5140),o=n(6853),u=n(4634),l=n(7719),c=n(9892),h=n(1815),f=n(4900),d=n(9713),p=n(8410);l.call(this);var m,g,v=this,y=this._exit,x=null,_=null,b=null,M=null,w=void 0!==e.dynamicDraw&&e.dynamicDraw,A=this._init,T=this._update,C=this.updateStyleFromArray;function E(t){var e,n,r,i,l,c,h,f,d,p,y,b,M,w,A,T,C,k,S,P,O,L,R,I,D,F,N,j,z,B,q,V,G,U,W,H,Z=v.data().length,X=v._pointPolygon(0,0,1,1),Q=new Array(3*Z),Y=v.verticesPerFeature(),K=v.data(),J=0,$=_.geometryData();if(l=v.position(),p=v.style.get("radius"),M=v.style.get("stroke"),T=v.style.get("strokeWidth"),S=v.style.get("strokeOpacity"),L=v.style.get("strokeColor"),D=v.style.get("fill"),j=v.style.get("fillOpacity"),q=v.style.get("fillColor"),!t){for(e=H=0;e<Z;e+=1,H+=3)i=l(K[e],e),Q[H]=i.x,Q[H+1]=i.y,Q[H+2]=0;if(Q=o.transformCoordinates(v.gcs(),v.layer().map().gcs(),Q,3),(g=new Float32Array(v.style.get("origin")(Q)))[0]||g[1]||g[2])for(e=H=0;e<Z;e+=1,H+=3)Q[H]-=g[0],Q[H+1]-=g[1],Q[H+2]-=g[2];m.setOrigin(g),r=u.getGeomBuffer($,"pos",Y*Z*3),c=u.getGeomBuffer($,"unit",Y*Z*2),(h=$.primitive(0).indices())instanceof Uint16Array&&h.length===Y*Z||(h=new Uint16Array(Y*Z),$.primitive(0).setIndices(h))}for(f=u.getGeomBuffer($,"radius",Y*Z),y=u.getGeomBuffer($,"stroke",Y*Z),w=u.getGeomBuffer($,"strokeWidth",Y*Z),C=u.getGeomBuffer($,"strokeOpacity",Y*Z),P=u.getGeomBuffer($,"strokeColor",Y*Z*3),R=u.getGeomBuffer($,"fill",Y*Z),F=u.getGeomBuffer($,"fillOpacity",Y*Z),z=u.getGeomBuffer($,"fillColor",Y*Z*3),e=G=U=W=H=0;e<Z;e+=1,H+=3){if(V=K[e],!t&&v._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<X.length;n+=1,W+=1)c[W]=X[n];for(d=p(V,e),b=M(V,e)?1:0,A=T(V,e),k=S(V,e),O=L(V,e),I=D(V,e)?1:0,N=j(V,e),B=q(V,e),v._primitiveShapeAuto&&(I&&N||b&&k)&&d+(b&&k?A:0)>J&&(J=d+(b&&k?A:0)),n=0;n<Y;n+=1,G+=1,U+=3)t||(r[U]=Q[H],r[U+1]=Q[H+1],r[U+2]=Q[H+2]),f[G]=d,y[G]=b,w[G]=A,C[G]=k,P[U]=O.r,P[U+1]=O.g,P[U+2]=O.b,R[G]=I,F[G]=N,z[U]=B.r,z[U+1]=B.g,z[U+2]=B.b}if(v._primitiveShapeAuto&&(v._primitiveShape===a.primitiveShapes.sprite&&J>s._maxPointSize||v._primitiveShape!==a.primitiveShapes.sprite&&J<=s._maxPointSize))return v._primitiveShape=J>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,v.renderer().contextRenderer().removeActor(x),x=null,v._init(!0),void E();t?(_.updateSourceBuffer("radius"),_.updateSourceBuffer("stroke"),_.updateSourceBuffer("strokeWidth"),_.updateSourceBuffer("strokeColor"),_.updateSourceBuffer("strokeOpacity"),_.updateSourceBuffer("fill"),_.updateSourceBuffer("fillColor"),_.updateSourceBuffer("fillOpacity")):($.boundsDirty(!0),_.modified(),_.boundsDirtyTimestamp().modified())}return c(v,e),this.actors=function(){return x?[x]:[]},this.updateStyleFromArray=function(t,e,n){var i,o,a={fill:"bool",fillColor:3,fillOpacity:1,radius:1,stroke:"bool",strokeColor:3,strokeOpacity:1,strokeWidth:1};if("string"==typeof t){var s={};s[t]=e,t=s}return r.each(t,(function(t,e){var n,r,s,u,l,c,h,f,d;if(v.visible()&&x&&a[t]&&!i&&!v.clustering())if(d="bool"===a[t]?1:a[t],u=v.data().length,s=(r=x.mapper()).getSourceBuffer(t),n=v.verticesPerFeature(),s&&u&&u*n*d===s.length){switch(a[t]){case 1:for(c=0,f=0;c<u;c+=1)for(l=e[c],h=0;h<n;h+=1,f+=1)s[f]=l;break;case 3:for(c=0,f=0;c<u;c+=1)for(l=e[c],h=0;h<n;h+=1,f+=3)s[f]=l.r,s[f+1]=l.g,s[f+2]=l.b;break;case"bool":for(c=0,f=0;c<u;c+=1)for(l=e[c]?1:0,h=0;h<n;h+=1,f+=1)s[f]=l}r.updateSourceBuffer(t),o=!0}else i=!0;else i=!0;var p=v.modified;i||(v.modified=function(){}),C(t,e,!1),v.modified=p})),n&&(v.visible()&&i?v.draw():o&&v.renderer()._render()),v},this._init=function(t){var n,r,o=i.shaderProgram(),s=((r=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?p:d),r),u=function(){var t=new i.shader(i.GL.FRAGMENT_SHADER);return t.setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?f:h),t}(),l=i.vertexAttribute("pos"),c=i.vertexAttribute("unit"),y=i.vertexAttribute("radius"),T=i.vertexAttribute("strokeWidth"),C=i.vertexAttribute("fillColor"),E=i.vertexAttribute("fill"),k=i.vertexAttribute("strokeColor"),S=i.vertexAttribute("stroke"),P=i.vertexAttribute("fillOpacity"),O=i.vertexAttribute("strokeOpacity"),L=new i.projectionUniform("projectionMatrix"),R=i.material(),I=i.blend(),D=i.geometryData(),F=i.sourceDataP3fv({name:"pos"}),N=i.sourceDataAnyfv(2,i.vertexAttributeKeysIndexed.One,{name:"unit"}),j=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Two,{name:"radius"}),z=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Three,{name:"strokeWidth"}),B=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Four,{name:"fillColor"}),q=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Five,{name:"fill"}),V=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Six,{name:"strokeColor"}),G=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Seven,{name:"stroke"}),U=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Eight,{name:"fillOpacity"}),W=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Nine,{name:"strokeOpacity"});m=new i.modelViewOriginUniform("modelViewMatrix",g),(n=v._primitiveShape===a.primitiveShapes.sprite?new i.points:new i.triangles).setIndices(new Uint16Array),b=new i.floatUniform("pixelWidth",2/v.renderer().width()),M=new i.floatUniform("aspect",v.renderer().width()/v.renderer().height()),t||A.call(v,e),_=i.mapper({dynamicDraw:w}),o.addVertexAttribute(l,i.vertexAttributeKeys.Position),v._primitiveShape!==a.primitiveShapes.sprite&&o.addVertexAttribute(c,i.vertexAttributeKeysIndexed.One),o.addVertexAttribute(y,i.vertexAttributeKeysIndexed.Two),o.addVertexAttribute(T,i.vertexAttributeKeysIndexed.Three),o.addVertexAttribute(C,i.vertexAttributeKeysIndexed.Four),o.addVertexAttribute(E,i.vertexAttributeKeysIndexed.Five),o.addVertexAttribute(k,i.vertexAttributeKeysIndexed.Six),o.addVertexAttribute(S,i.vertexAttributeKeysIndexed.Seven),o.addVertexAttribute(P,i.vertexAttributeKeysIndexed.Eight),o.addVertexAttribute(O,i.vertexAttributeKeysIndexed.Nine),o.addUniform(b),o.addUniform(M),o.addUniform(m),o.addUniform(L),o.addShader(u),o.addShader(s),R.addAttribute(o),R.addAttribute(I),(x=i.actor()).setMaterial(R),x.setMapper(_),D.addSource(F),D.addSource(N),D.addSource(j),D.addSource(z),D.addSource(B),D.addSource(q),D.addSource(V),D.addSource(G),D.addSource(U),D.addSource(W),D.addPrimitive(n),D.computeBounds=function(){D.setBounds(0,0,0,0,0,0)},_.setGeometryData(D)},this._build=function(){return E(v.dataTime().timestamp()<v.buildTime().timestamp()),v.renderer().contextRenderer().hasActor(x)||v.renderer().contextRenderer().addActor(x),v.buildTime().modified(),v},this._update=function(){return T.call(v),(v.dataTime().timestamp()>=v.buildTime().timestamp()||v.updateTime().timestamp()<v.timestamp())&&v._build(),b.set(2/v.renderer().width()),M.set(v.renderer().width()/v.renderer().height()),x.setVisible(v.visible()),x.material().setBinNumber(v.bin()),v.updateTime().modified(),v},this._exit=function(){v.renderer().contextRenderer().removeActor(x),x=null,y()},v._init(),this};i(u,a);var l={};l[a.capabilities.stroke]=!0,o("webgl","point",u,l),t.exports=u},9892:function(t,e,n){var r=n(2557);t.exports=function(t,e){e=e||{},t._primitiveShapeAuto=!0,t._primitiveShape=r.primitiveShapes.auto,void 0!==r.primitiveShapes[e.primitiveShape]&&(t._primitiveShape=e.primitiveShape),t._primitiveShapeAuto=t._primitiveShape===r.primitiveShapes.auto,t._primitiveShapeAuto&&(t._primitiveShape=r.primitiveShapes.sprite,t._primitiveShapeAuto=!0),t._pointPolygon=function(e,n,i,o){var a;switch(t._primitiveShape){case r.primitiveShapes.triangle:a=[e,n-2*o,e-i*Math.sqrt(3),n+o,e+i*Math.sqrt(3),n+o];break;case r.primitiveShapes.square:a=[e-i,n+o,e-i,n-o,e+i,n+o,e-i,n-o,e+i,n-o,e+i,n+o];break;default:a=[e,n]}return a},t.verticesPerFeature=function(){return t._pointPolygon(0,0,1,1).length/2},t.primitiveShape=function(e,n){if(void 0===e)return n||!t._primitiveShapeAuto?t._primitiveShape:r.primitiveShapes.auto;if(void 0!==r.primitiveShapes[e]){var i=!1;e===r.primitiveShapes.auto?(i=!t._primitiveShapeAuto,t._primitiveShapeAuto=!0):(i=t._primitiveShapeAuto||t._primitiveShape!==e,t._primitiveShapeAuto=!1,t._primitiveShape=e),i&&(t.renderer().contextRenderer().removeActor(t.actors()[0]),t._init(!0),t.dataTime().modified())}return t}}},2890:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(4343),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r=n(5140),i=n(1106),a=n(6853),s=n(4634),u=n(7719),l=n(1859),c=n(5810);u.call(this);var h,f,d,p,m,g=this,v=this._exit,y=r.actor(),x=r.mapper(),_=r.material(),b=this._init,M=this._update;function w(){var t=new r.shader(r.GL.VERTEX_SHADER);return t.setShaderSource(c),t}function A(){var t=new r.shader(r.GL.FRAGMENT_SHADER);return t.setShaderSource(l),t}return this._init=function(t){var e=r.shaderProgram(),n=r.vertexAttribute("pos"),i=r.vertexAttribute("fillColor"),o=r.vertexAttribute("fillOpacity"),a=new r.projectionUniform("projectionMatrix"),s=w(),u=A(),l=r.blend(),c=r.geometryData(),h=r.sourceDataP3fv({name:"pos"}),f=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Two,{name:"fillColor"}),p=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"fillOpacity"}),m=r.triangles();d=new r.modelViewOriginUniform("modelViewMatrix"),e.addVertexAttribute(n,r.vertexAttributeKeys.Position),e.addVertexAttribute(i,r.vertexAttributeKeysIndexed.Two),e.addVertexAttribute(o,r.vertexAttributeKeysIndexed.Three),e.addUniform(d),e.addUniform(a),e.addShader(u),e.addShader(s),_.addAttribute(e),_.addAttribute(l),y.setMaterial(_),y.setMapper(x),c.addSource(h),c.addSource(f),c.addSource(p),c.addPrimitive(m),c.computeBounds=function(){c.setBounds(0,0,0,0,0,0)},x.setGeometryData(c),b.call(g,t)},this.actors=function(){return[y]},this._build=function(){!function(t){var e,n,r,o,u,l,c,p,m,v,y,_,b,M,w,A,T,C,E,k,S,P,O,L,R,I,D,F,N,j=[],z=g.gcs(),B=g.layer().map().gcs(),q=0,V=x.geometryData();for(u=g.style.get("fillColor"),l=s.isFunction(g.style("fillColor"))?void 0:u(),p=g.style.get("fillOpacity"),m=s.isFunction(g.style("fillOpacity"))?void 0:p(),v=g.style.get("fill"),y=s.isFunction(g.style("fill"))?void 0:v(),_=g.style.get("uniformPolygon"),b=s.isFunction(g.style("uniformPolygon"))?void 0:_(),t?(j=h.items,q=h.numPts):(n=(n=g.style.get("position"))===s.identityFunction?null:n,r=(r=g.style.get("polygon"))===s.identityFunction?null:r,g.data().forEach((function(t,e){var o,s,u,l;if((o=r?r(t,e):t)&&!((s=o.outer||(Array.isArray(o)?o:[])).length<3)){for(u=new Array(3*s.length),P=k=0;P<s.length;P+=1,k+=3)l=n?n(s[P],P,t,e):s[P],u[k]=l.x,u[k+1]=l.y,u[k+2]=0;u={vertices:u,dimensions:3,holes:[]},N=s,o.inner&&o.inner.forEach((function(r){if(!(r.length<3))for(N=N.concat(r),u.holes.push(k/3),P=0;P<r.length;P+=1,k+=3)l=n?n(r[P],P,t,e):r[P],u.vertices[k]=l.x,u.vertices[k+1]=l.y,u.vertices[k+2]=0})),u.vertices=a.transformCoordinates(z,B,u.vertices,u.dimensions),(I={triangles:i(u.vertices,u.holes,u.dimensions),vertices:u.vertices,original:N,item:t,itemIndex:e}).triangles.length&&(j.push(I),q+=I.triangles.length)}})),e=s.getGeomBuffer(V,"pos",3*q),(w=V.primitive(0).indices())instanceof Uint16Array&&w.length===q||(w=new Uint16Array(q),V.primitive(0).setIndices(w)),h={items:j,numPts:q},f=new Float32Array(g.style.get("origin")(j)),d.setOrigin(f)),o=s.getGeomBuffer(V,"fillColor",3*q),c=s.getGeomBuffer(V,"fillOpacity",q),E=k=0,A=l,C=y,L=0;L<j.length;L+=1)if(R=j[L].triangles.length,S=j[L].vertices,D=j[L].item,F=j[L].itemIndex,N=j[L].original,T=m,(M=void 0===b?_(D,F):b)&&(void 0===l&&(A=u(S[0],0,D,F)),void 0===m&&(T=p(S[0],0,D,F))),void 0===y&&(C=v(D,F)),C||(T=0),M&&t&&j[L].uniform&&j[L].color&&A.r===j[L].color.r&&A.g===j[L].color.g&&A.b===j[L].color.b&&T===j[L].opacity)E+=R,k+=3*R;else{for(P=0;P<R;P+=1,E+=1,k+=3)t&&M?(o[k]=A.r,o[k+1]=A.g,o[k+2]=A.b,c[E]=T):(O=3*j[L].triangles[P],t||(e[k]=S[O]-f[0],e[k+1]=S[O+1]-f[1],e[k+2]=S[O+2]-f[2],w[E]=P),M||void 0!==l||(A=u(N[O],O,D,F)),o[k]=A.r,o[k+1]=A.g,o[k+2]=A.b,!M&&C&&void 0===m&&(T=p(N[O],O,D,F)),c[E]=T);(M||j[L].uniform)&&(j[L].uniform=M,j[L].color=A,j[L].opacity=T)}t?(x.updateSourceBuffer("fillOpacity"),x.updateSourceBuffer("fillColor")):(x.modified(),V.boundsDirty(!0),x.boundsDirtyTimestamp().modified())}(!!(g.dataTime().timestamp()<g.buildTime().timestamp()&&h)),g.renderer().contextRenderer().hasActor(y)||(g.renderer().contextRenderer().addActor(y),p=!0),g.buildTime().modified()},this._update=function(t){g.ready&&(t&&t.mayDelay&&p?m=g.layer().map().scheduleAnimationFrame(g._update):(m&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),M.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),y.setVisible(g.visible()),y.material().setBinNumber(g.bin()),g.updateTime().modified()))},this._exit=function(){m&&g.layer()&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),g.renderer().contextRenderer().removeActor(y),v()},this._init(e),this};r(a,o),i("webgl","polygon",a),t.exports=a},2182:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=n(6618),s=n(4634),u=16777216,l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e);var r=n(5638),i=n(5140),l=n(7719),c=n(7521),h=n(5804),f=n(630),d=n(1899);l.call(this);var p,m,g,v,y,x,_,b=this,M=this._exit,w=this._update,A={},T=a(),C=a();function E(t){var e=new i.mapper({dynamicDraw:!0});return e.s_modified=e.modified,e.g_timestamp=a(),e.timestamp=e.g_timestamp.timestamp,e.modified=function(){return e.s_modified(),e.g_timestamp.modified(),e},e.s_render=e.render,e.render=t,e}return this.actors=function(){var t=[];return m&&t.push(m),g&&t.push(g),t},this._build=function(){var t,e,n,r,o,a,s,u,l;b.position()&&((_=b._generateQuads()).imgQuads.length&&!m&&(b.visible(!1),t=E(b._renderImageQuads),(m=new i.actor).setMapper(t),e=new i.material,(n=new i.shaderProgram).addVertexAttribute(new i.vertexAttribute("vertexPosition"),i.vertexAttributeKeys.Position),n.addVertexAttribute(new i.vertexAttribute("textureCoord"),i.vertexAttributeKeys.TextureCoordinate),p=new i.modelViewOriginUniform("modelViewMatrix",_.origin),n.addUniform(p),n.addUniform(new i.projectionUniform("projectionMatrix")),n.addUniform(new i.floatUniform("opacity",1)),n.addUniform(new i.floatUniform("zOffset",0)),(l=new i.uniform(i.GL.INT,"sampler2d")).set(0),n.addUniform(l),u=b.renderer()._glContext(),(o=new i.uniform(u.FLOAT_VEC2,"crop")).set([1,1]),n.addUniform(o),(a=new i.uniform(u.FLOAT_VEC4,"cropsource")).set([0,0,0,0]),n.addUniform(a),n.addShader(i.getCachedShader(u.VERTEX_SHADER,u,h)),n.addShader(i.getCachedShader(u.FRAGMENT_SHADER,u,c)),b._hookBuild&&b._hookBuild(n),e.addAttribute(n),e.addAttribute(new i.blend),s=new i.geometryData,v=void 0,(r=new i.sourceDataT2fv).pushBack([0,0,1,0,0,1,1,1]),s.addSource(r),t.setGeometryData(s),m.setMaterial(e),b.renderer().contextRenderer().addActor(m),b.visible(!0)),_.clrQuads.length&&!g&&(b.visible(!1),t=E(b._renderColorQuads),(g=new i.actor).setMapper(t),e=new i.material,(n=new i.shaderProgram).addVertexAttribute(new i.vertexAttribute("vertexPosition"),i.vertexAttributeKeys.Position),x=new i.modelViewOriginUniform("modelViewMatrix",_.origin),n.addUniform(x),n.addUniform(new i.projectionUniform("projectionMatrix")),n.addUniform(new i.floatUniform("opacity",1)),n.addUniform(new i.floatUniform("zOffset",0)),u=b.renderer()._glContext(),n.addUniform(new i.uniform(u.FLOAT_VEC3,"vertexColor")),n.addShader(i.getCachedShader(u.VERTEX_SHADER,u,d)),n.addShader(i.getCachedShader(u.FRAGMENT_SHADER,u,f)),e.addAttribute(n),e.addAttribute(new i.blend),s=new i.geometryData,y=void 0,t.setGeometryData(s),g.setMaterial(e),b.renderer().contextRenderer().addActor(g),b.visible(!0)),p&&p.setOrigin(_.origin),x&&x.setOrigin(_.origin),b._updateTextures(),b.buildTime().modified())},this._updateTextures=function(){var t;r.each(_.imgQuads,(function(e,n){if(n.image)if(n.image._texture)n.texture=n.image._texture;else{(t=new i.texture).setImage(n.image);var r=b.nearestPixel();if(void 0!==r)if(!0!==r&&s.isNonNullFinite(r))r=b.layer().map().zoom()>=r;r&&t.setNearestPixel(!0),n.texture=n.image._texture=t}}))},this._renderColorQuads=function(t){if(_.clrQuads.length){var e=this;(e.timestamp()>C.timestamp()||b.dataTime().timestamp()>C.timestamp()||t.m_contextChanged||!y||12*_.clrQuads.length>y.length)&&function(t){var e=t.m_context,n=!1;_.clrQuads.length&&((!y||y.length<12*_.clrQuads.length||!A.clrQuadsPosition)&&(A.clrQuadsPosition&&e.deleteBuffer(A.clrQuadsPosition),A.clrQuadsPosition=e.createBuffer(),y=new Float32Array(12*Math.max(128,2*_.clrQuads.length)),n=!0),r.each(_.clrQuads,(function(t,e){for(var n=0;n<12;n+=1)y[12*t+n]=e.pos[n]-_.origin[n%3]})),e.bindBuffer(e.ARRAY_BUFFER,A.clrQuadsPosition),n?e.bufferData(e.ARRAY_BUFFER,y,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,y)),C.modified()}(t),e.s_render(t,!0);var n,o,a,s=t.m_context;s.bindBuffer(s.ARRAY_BUFFER,A.clrQuadsPosition),r.each(_.clrQuads,(function(e,r){r.opacity!==n&&(n=r.opacity,s.uniform1fv(t.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(r.zOffset||0)!==o&&(o=r.zOffset||0,s.uniform1fv(t.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a&&a.r===r.color.r&&a.g===r.color.g&&a.b===r.color.b||(a=r.color,s.uniform3fv(t.m_material.shaderProgram().uniformLocation("vertexColor"),new Float32Array([a.r,a.g,a.b]))),s.bindBuffer(s.ARRAY_BUFFER,A.clrQuadsPosition),s.vertexAttribPointer(i.vertexAttributeKeys.Position,3,s.FLOAT,!1,12,12*e*4),s.enableVertexAttribArray(i.vertexAttributeKeys.Position),s.drawArrays(s.TRIANGLE_STRIP,0,4)})),s.bindBuffer(s.ARRAY_BUFFER,null),e.undoBindVertexData(t)}},this._renderImageQuads=function(t){if(_.imgQuads.length){var e=this;(e.timestamp()>T.timestamp()||b.dataTime().timestamp()>T.timestamp()||t.m_contextChanged||!v||12*_.imgQuads.length>v.length)&&function(t){var e=t.m_context,n=!1;_.imgQuads.length&&((!v||v.length<12*_.imgQuads.length||!A.imgQuadsPosition)&&(A.imgQuadsPosition&&e.deleteBuffer(A.imgQuadsPosition),A.imgQuadsPosition=e.createBuffer(),v=new Float32Array(12*Math.max(128,2*_.imgQuads.length)),n=!0),r.each(_.imgQuads,(function(t,e){for(var n=0;n<12;n+=1)v[12*t+n]=e.pos[n]-_.origin[n%3]})),e.bindBuffer(e.ARRAY_BUFFER,A.imgQuadsPosition),n?e.bufferData(e.ARRAY_BUFFER,v,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,v)),T.modified()}(t),e.s_render(t,!0);var n,o,a,l,c,h,f,d,p=t.m_context,m={x:1,y:1},g={x0:0,y0:0,x1:1,y1:1},y=b.nearestPixel();if(void 0!==y){if(!0!==y&&s.isNonNullFinite(y)){var x=b.layer().map().zoom();y=x>=y}_.imgQuads.forEach((function(e){if(e.image&&e.texture&&e.texture.nearestPixel()!==y&&e.texture.textureHandle()){t.m_context.bindTexture(i.GL.TEXTURE_2D,e.texture.textureHandle()),t.m_context.texParameteri(i.GL.TEXTURE_2D,i.GL.TEXTURE_MIN_FILTER,y?i.GL.NEAREST:i.GL.LINEAR),t.m_context.texParameteri(i.GL.TEXTURE_2D,i.GL.TEXTURE_MAG_FILTER,y?i.GL.NEAREST:i.GL.LINEAR),t.m_context.bindTexture(i.GL.TEXTURE_2D,null);var n=e.texture.modified;e.texture.modified=function(){},e.texture.setNearestPixel(y),e.texture.modified=n}}))}b._hookRenderImageQuads&&b._hookRenderImageQuads(t,_.imgQuads),p.bindBuffer(p.ARRAY_BUFFER,A.imgQuadsPosition),r.each(_.imgQuads,(function(e,r){r.image&&(r.texture.bind(t),r.image.width*r.image.height>u&&(u=r.image.width*r.image.height,p.getError()===p.OUT_OF_MEMORY&&console.log("Insufficient GPU memory for texture")),r.opacity!==n&&(n=r.opacity,p.uniform1fv(t.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(r.zOffset||0)!==o&&(o=r.zOffset||0,p.uniform1fv(t.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a=r.crop||{x:1,y:1},m&&a.x===m.x&&a.y===m.y||(m=a,p.uniform2fv(t.m_material.shaderProgram().uniformLocation("crop"),new Float32Array([void 0===m.x?1:m.x,void 0===m.y?1:m.y]))),c=r.image.width,h=r.image.height,l=r.crop||{left:0,top:0,right:c,bottom:h},g&&l.left===g.left&&l.top===g.top&&l.right===g.right&&l.bottom===g.bottom&&f===c&&d===h||(g=l,f=c,d=h,p.uniform4fv(t.m_material.shaderProgram().uniformLocation("cropsource"),new Float32Array([g.left/c,g.top/h,g.right/c,g.bottom/h]))),p.bindBuffer(p.ARRAY_BUFFER,A.imgQuadsPosition),p.vertexAttribPointer(i.vertexAttributeKeys.Position,3,p.FLOAT,!1,12,12*e*4),p.enableVertexAttribArray(i.vertexAttributeKeys.Position),p.drawArrays(p.TRIANGLE_STRIP,0,4),r.texture.undoBind(t))})),p.bindBuffer(p.ARRAY_BUFFER,null),e.undoBindVertexData(t)}},this._update=function(){w.call(b),(b.buildTime().timestamp()<=b.dataTime().timestamp()||b.updateTime().timestamp()<b.timestamp())&&b._build(),g&&(g.setVisible(b.visible()),g.material().setBinNumber(b.bin())),m&&(m.setVisible(b.visible()),m.material().setBinNumber(b.bin())),b.updateTime().modified()},this._cleanup=function(){m&&(b.renderer().contextRenderer().removeActor(m),m=null),g&&(b.renderer().contextRenderer().removeActor(g),g=null),v=void 0,y=void 0,Object.keys(A).forEach((function(t){delete A[t]})),_&&_.imgQuads&&(_.imgQuads.forEach((function(t){t.texture&&(delete t.texture,delete t.image._texture)})),b._updateTextures()),b.modified()},this.setShader=function(t,e){switch(t){case"image_vertex":h=e;break;case"image_fragment":c=e;break;case"color_vertex":d=e;break;case"color_fragment":f=e;break;default:return}return b},this._exit=function(){b._cleanup(),M.call(b)},b._init(e),this};r(l,o);var c={};c[o.capabilities.color]=!0,c[o.capabilities.image]=!0,c[o.capabilities.imageCrop]=!0,c[o.capabilities.imageFixedScale]=!1,c[o.capabilities.imageFull]=!0,c[o.capabilities.canvas]=!1,c[o.capabilities.video]=!1,i("webgl","quad",l,c),t.exports=l},7112:function(t,e,n){var r=n(4647).registerLayerAdjustment,i=n(1940),o=function(){"use strict";var t,e=n(5108),r=this,o=this._init,a=this._exit,s=this._update,u=this.visible,l=this.zIndex,c=0,h=[];this._drawTile=function(e){if(t){var n,o,a=r._tileBounds(e),s=e.index.level||0,u=r._tileOffset(s),l=r.tileCropFromBounds(e),f={},d=r.renderer().contextRenderer().m_depthBits;l&&(f.crop={x:l.x/r._options.tileWidth,y:l.y/r._options.tileHeight}),f.ul=r.fromLocal(r.fromLevel({x:a.left-u.x,y:a.top-u.y},s),0),f.ll=r.fromLocal(r.fromLevel({x:a.left-u.x,y:a.bottom-u.y},s),0),f.ur=r.fromLocal(r.fromLevel({x:a.right-u.x,y:a.top-u.y},s),0),f.lr=r.fromLocal(r.fromLevel({x:a.right-u.x,y:a.bottom-u.y},s),0),f.ul.z=f.ll.z=f.ur.z=f.lr.z=0,n=r._options.keepLower?r._options.maxLevel-s+1:1,(o=(o=r.map().listSceneObjects().filter((function(t){return t instanceof i}))).slice(o.indexOf(r)+1)).forEach((function(t){n+=t._options.keepLower?t._options.maxLevel-t._options.minLevel+1:1})),f.zOffset=n*Math.pow(2,-d)*i._zOffsetMultiple,c+=1,f.id=c,e.quadId=f.id,f.image=e.image,h.push(f),t.data(h),t._update(),r.draw()}},this._remove=function(e){if(void 0!==e.quadId&&t){for(var n=0;n<h.length;n+=1)if(h[n].id===e.quadId){h.splice(n,1);break}t.data(h),t._update(),r.draw()}},this.visible=function(e){return void 0===e?u():(r.visible()!==e&&(u(e),t&&t.visible(t.visible(void 0,!0),!0)),r)},this.zIndex=function(t,e){return void 0!==t&&r._clearQuads(),l.apply(r,arguments)},this._clearQuads=function(n){(!n||n.layer&&n.layer instanceof i&&n.layer.autoshareRenderer()&&(n.event!==e.layerAdd&&n.event!==e.layerRemove||!r.map().layers().every((function(t){return t===n.layer||n.layer.zIndex()>t.zIndex()}))))&&(r.clear(),t&&t.modified(),n&&r.draw())},this._update=function(e){return s.call(r,e),t&&t.nearestPixel&&t.nearestPixel(r.nearestPixel()),r._addBaseQuadToTiles(t,h),r},this._cleanup=function(){var t;if(r.cache&&r.cache._cache){for(var e in r.cache._cache)(t=r.cache._cache[e])._image&&t._image._texture&&delete t._image._texture;r.cache.clear()}r.clear()},this._exit=function(){var n=r.map();n.geoOff(e.layerAdd,r._clearQuads),n.geoOff(e.layerRemove,r._clearQuads),r._cleanup(),r.deleteFeature(t),t=null,h=[],a.apply(r,arguments)},this._init=function(){o.apply(r,arguments),(t=r.createFeature("quad",{previewColor:r._options.previewColor,previewImage:r._options.previewImage})).geoTrigger=void 0,t.gcs(r._options.gcs||r.map().gcs()),t.data(h),t._update();var n=r.map();n.geoOn(e.layerAdd,r._clearQuads),n.geoOn(e.layerRemove,r._clearQuads),r.geoOn(e.unhidden,(function(){r.map().scheduleAnimationFrame((function(){r._clearQuads(),r.map().draw()}))}))},this._getSubLayer=function(){},this._updateSubLayers=void 0};i._zOffsetMultiple=2,r("webgl","tile",o),t.exports=o},506:function(t,e,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(7719).call(this),this._init(e),this):new t(e)};r(a,o),i("webgl","track",a),t.exports=a},2254:function(t,e,n){var r,i=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var r,i=n(5638),o=n(5140),s=n(5240),u=n(4634),l=n(5108),c=this,h=null,f=null,d=!1,p=this._init,m=this._exit;return this.contextRenderer=function(){return h},this.api=function(){return t.apiname},this._init=function(){if(c.initialized())return c;p.call(c);var t=e.canvas||i(document.createElement("canvas"));if(t.addClass("webgl-canvas"),i(c.layer().node().get(0)).append(t),window.overrideContextAttributes){var n=t.get(0),r=n.getContext;n.getContext=function(t,e){if(e=e||{},window.overrideContextAttributes)for(var i in window.overrideContextAttributes)window.overrideContextAttributes.hasOwnProperty(i)&&(e[i]=window.overrideContextAttributes[i]);return r.call(n,t,e)}}(f=o.viewer(t.get(0),e.options)).init(),(h=f.renderWindow().activeRenderer()).setResetScene(!1),f.renderWindow().renderers().length>0&&h.setLayer(f.renderWindow().renderers().length),c.canvas(t);var a=c.layer().map().size();return c._resize(0,0,a.width,a.height),c},this._resize=function(t,e,n,r){var i=f.renderWindow();return t===i.windowPosition[0]&&e===i.windowPosition[1]&&n===c.width()&&r===c.height()||(c._setWidthHeight(n,r),c.canvas().attr("width",n),c.canvas().attr("height",r),i.positionAndResize(t,e,n,r),d=!0,c._render()),c},this._render=function(){return c.layer().map().scheduleAnimationFrame(c._renderFrame,!0),c},this._renderFrame=function(){f&&(d&&(d=!1,c._updateRendererCamera()),f.render())},this._glContext=function(){return f&&f.renderWindow()?f.renderWindow().context():o.GL},this._exit=function(){if(c.layer().map().scheduleAnimationFrame(c._renderFrame,"remove"),c.canvas().remove(),f){var t=new o.renderState;t.m_renderer=f,t.m_context=c._glContext(),f.exit(t);var e=c._glContext();e!==o.GL&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext&&e.getExtension("WEBGL_lose_context").loseContext()}o.clearCachedShaders(o.GL),f=null,m()},this._updateRendererCamera=function(){var t=f.renderWindow(),e=c.layer().map(),n=e.camera(),i=e.rotation()||0,o=n.view,a=n.projectionMatrix;if(a[15])a=s.copy(u.mat4AsArray(),a),a=s.scale(a,a,[1,1,-.5]),a=s.translate(a,a,[0,0,n.clipbounds.far]);else{var l=n.clipbounds.near,h=n.clipbounds.far;a=s.copy(u.mat4AsArray(),a),a=s.scale(a,a,[1/l,1/l,-1/h])}var d=Math.PI/2,p=i%d,m=Math.min(Math.abs(p),Math.abs(p-d))<1e-5;t.renderers().forEach((function(t){var i=t.camera();if(!u.compareArrays(o,i.viewMatrix())||!u.compareArrays(a,i.projectionMatrix())||r!==e.zoom()){r=e.zoom(),i.setViewMatrix(o,!0),i.setProjectionMatrix(a);var s=n.viewport;a[1]||a[2]||a[3]||a[4]||a[6]||a[7]||a[8]||a[9]||a[11]||1!==a[15]||!m||s.left&&s.left%1||s.top&&s.top%1||parseFloat(r.toFixed(6))!==parseFloat(r.toFixed(0))?i.viewAlignment=function(){return null}:i.viewAlignment=function(){var t={roundx:2/s.width,roundy:2/s.height};return t.dx=s.width%2?.5*t.roundx:0,t.dy=s.height%2?.5*t.roundy:0,t}}}))},c.layer().geoOn(l.pan,(function(t){d=!0})),c.layer().geoOn(l.parallelprojection,(function(t){var e=c.contextRenderer(),n=c.layer();if(t.geo&&t.geo._triggeredBy!==n){if(!e||!e.camera())return void console.log("Parallel projection event triggered on unconnected VGL renderer.");e.camera().setEnableParallelProjection(t.parallelProjection),d=!0}})),this};s.apiname="webgl",i(s,a),o("webgl",s),o("vgl",s),s.supported=function(){if(void 0===r){var t,e;try{(e=(t=document.createElement("canvas")).getContext("webgl")||t.getContext("experimental-webgl")).getSupportedExtensions().indexOf("WEBGL_debug_renderer_info")>=0&&(s._unmaskedRenderer=e.getParameter(e.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)),s._maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),s._maxPointSize=e.getParameter(e.ALIASED_POINT_SIZE_RANGE)[1],r=!0}catch(t){console.warn("No webGL support"),r=!1}t=void 0,e=void 0,void 0}return r},s.fallback=function(){return null},t.exports=s},406:function(t,e,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o),s=n(1678),u=n.n(s),l=new URL(n(3554),n.b),c=new URL(n(4144),n.b),h=new URL(n(237),n.b),f=new URL(n(9490),n.b),d=a()(i()),p=u()(l),m=u()(c),g=u()(h),v=u()(f);d.push([t.id,'.geojs-map{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.geojs-map .geo-attribution{position:absolute;right:0;bottom:0;padding-right:5px;cursor:auto;font:11px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif;z-index:1001;background:rgba(255,255,255,0.7);clear:both;display:block;pointer-events:auto}.geojs-map .geo-attribution .geo-attribution-layer{padding-left:5px}.geojs-map .canvas-canvas{display:block;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.geojs-map .webgl-canvas{display:block}.geojs-map .geojs-layer{position:absolute;width:100%;height:100%;left:0;top:0;pointer-events:none}.geojs-map .geojs-layer.active:not(.hidden) > *{pointer-events:auto}.geojs-map .geojs-layer.hidden{display:none}.geojs-map .geojs-layer.hidden[renderer="webgl"]{display:inherit}.geojs-map .geo-tile-layer{-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;line-height:0;font-size:0}.geojs-map.annotation-input{cursor:crosshair}.geojs-map.annotation-input.annotation-intersect{cursor:url('+p+") 12 12,crosshair}.geojs-map.annotation-input.annotation-difference{cursor:url("+m+") 12 12,crosshair}.geojs-map.annotation-input.annotation-union{cursor:url("+g+") 12 12,crosshair}.geojs-map.annotation-input.annotation-xor{cursor:url("+v+") 12 12,crosshair}.geojs-map.annotation-cursor{cursor:crosshair}.geojs-map.annotation-cursor.annotation-intersect{cursor:url("+p+") 12 12,crosshair}.geojs-map.annotation-cursor.annotation-difference{cursor:url("+m+") 12 12,crosshair}.geojs-map.annotation-cursor.annotation-union{cursor:url("+g+") 12 12,crosshair}.geojs-map.annotation-cursor.annotation-xor{cursor:url("+v+') 12 12,crosshair}.geojs-map.highlight-focus:after{content:"";display:block;position:absolute;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;left:0;top:0;right:0;bottom:0;border:3px solid Highlight;opacity:1;-ms-filter:none;filter:none;-webkit-transition:opacity 0s;-moz-transition:opacity 0s;-o-transition:opacity 0s;-ms-transition:opacity 0s;transition:opacity 0s;visibility:hidden}.geojs-map.highlight-focus:focus:after{visibility:visible;-webkit-transition:opacity 2.5s ease-in;-moz-transition:opacity 2.5s ease-in;-o-transition:opacity 2.5s ease-in;-ms-transition:opacity 2.5s ease-in;transition:opacity 2.5s ease-in;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0)}.geo-tile-container{position:absolute}.geo-tile-container.crop{overflow:hidden}',"",{version:3,sources:["webpack://./main.styl","webpack://./../node_modules/nib/lib/nib/vendor.styl","webpack://./../node_modules/nib/lib/nib/overflow.styl","webpack://./../node_modules/nib/lib/nib/flex.styl","webpack://./../node_modules/nib/lib/nib/border.styl"],names:[],mappings:"AAEA,WACE,iBAAS,CCwCO,wBAAG,CAAH,qBAAG,CAAH,oBAAG,CARN,gBAAG,CChBd,eAAU,CFZZ,4BACE,iBAAS,CACT,OAAM,CACN,QAAO,CACP,iBAAc,CC4ed,WAAO,CD1eP,yDAA8B,CAC9B,YAAQ,CC6dR,gCAAW,CD3dX,UAAM,CGMN,aAAS,CHJT,mBAAe,CAEf,mDACE,gBAAa,CAEjB,0BGDE,aAAS,CFqBK,4BAAG,CAAH,yBAAG,CAAH,uBAAG,CAAH,wBAAG,CARN,oBAAG,CDThB,yBGJE,aAAS,CHOX,wBACE,iBAAS,CACT,UAAM,CACN,WAAO,CACP,MAAK,CACL,KAAI,CACJ,mBAAe,CAEb,gDACE,mBAAe,CACnB,+BGjBA,YAAS,CHmBT,iDGnBA,eAAS,CHsBX,2BCDgB,4BAAG,CAAH,yBAAG,CAAH,uBAAG,CAAH,wBAAG,CARN,oBAAG,CDWd,aAAY,CACZ,WAAU,CAEZ,4BCscE,gBAAO,CDpcP,iDCocA,8DAAO,CDlcP,kDCkcA,8DAAO,CDhcP,6CCgcA,8DAAO,CD9bP,2CC8bA,8DAAO,CD3bT,6BC2bE,gBAAO,CDzbP,kDCybA,8DAAO,CDvbP,mDCubA,8DAAO,CDrbP,8CCqbA,8DAAO,CDnbP,4CCmbA,8DAAO,CD/aP,iCACE,UAAQ,CGnDV,aAAS,CHqDP,iBAAS,CChCG,6BAAG,CAAH,0BAAG,CARN,qBAAG,CD0CZ,MAAK,CACL,KAAI,CACJ,OAAM,CACN,QAAO,CIvET,0BAAQ,CH4PV,SAAS,CAQH,eAAY,CACZ,WAAQ,CArOE,6BAAG,CAAH,0BAAG,CAAH,wBAAG,CAAH,yBAAG,CARN,qBAAG,CDqDZ,iBAAW,CACb,uCACE,kBAAW,CC/CC,uCAAG,CAAH,oCAAG,CAAH,kCAAG,CAAH,mCAAG,CARN,+BAAG,CAoOhB,SAAS,CAWH,+DAAyE,CACzE,uBAAiC,CDrLzC,oBACE,iBAAS,CACT,yBE3EE,eAAU",sourcesContent:['@import \'~nib/index.styl\'\n\n.geojs-map\n position relative\n user-select none\n overflow hidden\n\n .geo-attribution\n position absolute\n right 0\n bottom 0\n padding-right 5px\n cursor auto\n font 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif\n z-index 1001\n background rgba(255,255,255,0.7)\n clear both\n display block\n pointer-events auto\n\n .geo-attribution-layer\n padding-left 5px\n\n .canvas-canvas\n display block\n transform-origin 0px 0px\n .webgl-canvas\n display block\n\n .geojs-layer\n position absolute\n width 100%\n height 100%\n left 0\n top 0\n pointer-events none\n &.active:not(.hidden)\n > *\n pointer-events auto\n &.hidden\n display none\n &.hidden[renderer="webgl"]\n display inherit\n\n .geo-tile-layer\n transform-origin 0px 0px\n line-height 0\n font-size 0\n\n &.annotation-input\n cursor crosshair\n &.annotation-intersect\n cursor embedurl("./css/cursor-crosshair-intersect.svg") 12 12,crosshair\n &.annotation-difference\n cursor embedurl("./css/cursor-crosshair-difference.svg") 12 12,crosshair\n &.annotation-union\n cursor embedurl("./css/cursor-crosshair-union.svg") 12 12,crosshair\n &.annotation-xor\n cursor embedurl("./css/cursor-crosshair-xor.svg") 12 12,crosshair\n\n &.annotation-cursor\n cursor crosshair\n &.annotation-intersect\n cursor embedurl("./css/cursor-crosshair-intersect.svg") 12 12,crosshair\n &.annotation-difference\n cursor embedurl("./css/cursor-crosshair-difference.svg") 12 12,crosshair\n &.annotation-union\n cursor embedurl("./css/cursor-crosshair-union.svg") 12 12,crosshair\n &.annotation-xor\n cursor embedurl("./css/cursor-crosshair-xor.svg") 12 12,crosshair\n\n &.highlight-focus\n &:after\n content ""\n display block\n position absolute\n box-sizing border-box\n left 0px\n top 0px\n right 0px\n bottom 0px\n // Highlight is technically a css2 color. We may need to specify it\n // explicitly. #3B66A6 seems close\n border 3px solid Highlight\n opacity 1\n transition opacity 0s\n visibility hidden\n &:focus:after\n visibility visible\n transition opacity 2.5s ease-in\n opacity 0\n\n.geo-tile-container\n position absolute\n &.crop\n overflow hidden\n',"use('../nodes/vendor-helpers.js')\n@import 'config'\n\n/*\n * Alias \"nowrap\" as \"no-wrap\".\n */\n\nno-wrap = unquote('nowrap')\n\n/*\n * Helper to find out if a given value is a width\n */\n\nis-width(val)\n if auto == val\n return true\n else if val && 'unit' == type(val)\n // Stylus does not short circuit so we need to perform this as a distinct\n // operation to prevent errors\n return '' != unit(val)\n return false\n\n/*\n * Vendor support for the given prop / arguments, optionally specifying the\n * only prefixes to utilize, or those which should be ignored.\n */\n\nvendor(prop, args, only = null, ignore = null, vendor-property = true)\n need_normalize = !vendor-property or prop in ('transition' 'transition-property' 'border-image' 'border-image-slice')\n for prefix in vendor-prefixes\n unless (only and !(prefix in only)) or (ignore and prefix in ignore)\n if official == prefix\n if need_normalize\n {prop}: normalize(prop,('%s' % args))\n else\n {prop}: args\n else\n newprop = prop\n newprop = '-' + prefix + '-' + prop if vendor-property\n\n if need_normalize\n {newprop}: normalize(prop,('%s' % args),prefix)\n else\n {newprop}: args\n/*\n * Vendorize the given value.\n */\n\nvendor-value(arg, only = null, ignore = null)\n prop = current-property[0]\n for prefix in vendor-prefixes\n unless (only and !(prefix in only)) or (ignore and prefix in ignore) or official == prefix\n add-property(prop, '-%s-%s' % (prefix arg))\n arg\n\n/*\n * Vendor \"box-shadow\" support.\n */\n\nbox-shadow()\n vendor('box-shadow', arguments, only: webkit official)\n\n/*\n * Vendor \"user-select\" support.\n */\n\nuser-select()\n vendor('user-select', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"column-count\" support.\n */\n\ncolumn-count()\n vendor('column-count', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-gap\" support.\n */\n\ncolumn-gap()\n vendor('column-gap', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule\" support.\n */\n\ncolumn-rule()\n vendor('column-rule', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-color\" support.\n */\n\ncolumn-rule-color()\n vendor('column-rule-color', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-width\" support.\n */\n\ncolumn-rule-width()\n vendor('column-rule-width', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-style\" support.\n */\n\ncolumn-rule-style()\n vendor('column-rule-style', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-width\" support.\n */\n\ncolumn-width()\n vendor('column-width', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-span\" support.\n */\n\ncolumn-span()\n vendor('column-span', arguments, only: webkit official)\n\n/*\n * Vendor \"column-fill\" support.\n */\n\ncolumn-fill()\n vendor('column-fill', arguments, only: moz official)\n\n/*\n * Legacy syntax support for background-clip and background-origin\n */\n\nlegacy-bg-values(property, args)\n legacy_args = ()\n importance = unquote('')\n for subargs in args\n for arg in subargs\n if arg in (border-box padding-box content-box)\n arg = unquote('border') if arg == border-box\n arg = unquote('padding') if arg == padding-box\n arg = unquote('content') if arg == content-box\n if arg != '!important'\n push(legacy_args,arg)\n else\n importance = !important\n vendor(property, unquote(join(', ',legacy_args)) importance, only: moz webkit)\n\n/*\n * Vendor \"background-clip\" support.\n */\n\nbackground-clip()\n if arguments[0] == text\n vendor('background-clip', arguments, only: webkit)\n else\n legacy-bg-values('background-clip', arguments)\n background-clip: arguments\n\n/*\n * Vendor \"background-origin\" support.\n */\n\nbackground-origin()\n legacy-bg-values('background-origin', arguments)\n background-origin: arguments\n\n/*\n * Vendor \"transform\" support.\n */\n\ntransform()\n vendor('transform', arguments)\n\n/*\n * Vendor \"transform-origin\" support.\n */\ntransform-origin()\n vendor('transform-origin', arguments)\n\n/*\n * Vendor \"transform-style\" support.\n */\n\ntransform-style()\n vendor('transform-style', arguments)\n\n/*\n * Vendor \"border-image\" support.\n */\n\nborder-image()\n vendor('border-image', arguments, only: webkit moz o official)\n\n/*\n * Vendor \"transition\" support.\n */\n\ntransition()\n vendor('transition', arguments)\n\n/*\n * Vendor \"transition-property\" support.\n */\n\ntransition-property()\n vendor('transition-property', arguments)\n\n/*\n * Vendor \"transition-duration\" support.\n */\n\ntransition-duration()\n vendor('transition-duration', arguments)\n\n/*\n * Vendor \"transition-timing-function\" support.\n */\n\ntransition-timing-function()\n vendor('transition-timing-function', arguments)\n\n/*\n * Vendor \"transition-delay\" support.\n */\n\ntransition-delay()\n vendor('transition-delay', arguments)\n\n/*\n * Vendor \"backface-visibility\" support.\n */\n\nbackface-visibility()\n vendor('backface-visibility', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"perspective\" support.\n */\n\nperspective()\n if mixin\n vendor('perspective', arguments, only: webkit moz ms official)\n else\n 'perspective(%s)' % arguments\n\n/*\n * Vendor \"perspective-origin\" support.\n */\n\nperspective-origin()\n vendor('perspective-origin', arguments, only: webkit moz ms official)\n\n/*\n * Opacity with conditional IE support.\n */\n\nopacity(n, args...)\n opacity: n args\n if support-for-ie\n if n == inherit or n == initial\n -ms-filter: n args\n filter: n args\n else\n val = round(n * 100)\n if val == 100\n -ms-filter: none args\n filter: none args\n else\n -ms-filter: '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)\"' % val args\n filter: 'alpha(opacity=%s)' % val args\n\n/*\n * Vendor \"text-size-adjust\"\n */\n\ntext-size-adjust()\n vendor('text-size-adjust', arguments)\n\n/*\n * Alias the \"white-space\" property.\n */\n\nwhitespace()\n white-space: arguments\n\n/*\n * Vendor \"box-sizing\" support.\n */\n\nbox-sizing()\n vendor('box-sizing', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-orient\" support.\n */\n\nbox-orient()\n vendor('box-orient', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-flex-group\" support.\n */\n\nbox-flex-group()\n vendor('box-flex-group', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-ordinal-group\" support.\n */\n\nbox-ordinal-group()\n vendor('box-ordinal-group', arguments, only: webkit moz ms official)\n\n\n/*\n * Vendor \"box-align\" support.\n */\n\nbox-align()\n vendor('box-align', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"box-pack\" support.\n */\n\nbox-pack()\n vendor('box-pack', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"box-direction\" support.\n */\n\nbox-direction()\n vendor('box-direction', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"animation\" support.\n */\n\nanimation()\n vendor('animation', arguments)\n\n\n/*\n * Vendor \"animation-name\" support.\n */\n\nanimation-name()\n vendor('animation-name', arguments)\n\n/*\n * Vendor \"animation-duration\" support.\n */\n\nanimation-duration()\n vendor('animation-duration', arguments)\n\n/*\n * Vendor \"animation-delay\" support.\n */\n\nanimation-delay()\n vendor('animation-delay', arguments)\n\n/*\n * Vendor \"animation-direction\" support.\n */\n\nanimation-direction()\n vendor('animation-direction', arguments)\n\n/*\n * Vendor \"animation-iteration-count\" support.\n */\n\nanimation-iteration-count()\n vendor('animation-iteration-count', arguments)\n\n/*\n * Vendor \"animation-timing-function\" support.\n */\n\nanimation-timing-function()\n vendor('animation-timing-function', arguments)\n\n/*\n * Vendor \"animation-play-state\" support.\n */\n\nanimation-play-state()\n vendor('animation-play-state', arguments)\n\n/*\n * Vendor \"animation-fill-mode\" support.\n */\n\nanimation-fill-mode()\n vendor('animation-fill-mode', arguments)\n\n/*\n * Vendor \"hyphens\" support.\n */\n\nhyphens()\n vendor('hyphens', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"appearance\" support.\n */\n\nappearance()\n vendor('appearance', arguments, only: webkit moz official)\n\n/*\n * Vendor \"tab-size\" support.\n */\n\ntab-size()\n vendor('tab-size', arguments, only: moz o official)\n\n/*\n * Vendor \"overflow-scrolling\" support.\n */\n\noverflow-scrolling()\n vendor('overflow-scrolling', arguments, only: webkit official)\n\n/*\n * Vendor \"text-overflow\" support, , -o- for opera 9.* - 10.*\n */\n\ntext-overflow()\n vendor('text-overflow', arguments, only: official o)\n\n/*\n * Vendor \"text-size-adjust\" support.\n */\ntext-size-adjust()\n vendor('text-size-adjust', arguments, only: official webkit ms)\n\n/*\n * Vendor \"font-smoothing\" support, webkit only.\n */\nfont-smoothing()\n vendor('font-smoothing', arguments, only: webkit)\n\n\n/**\n * Vendor input-placeholder/placeholder support.\n *\n * Examples:\n * // Default syntax\n * body\n * placeholder(color #333, font-weight normal)\n *\n * // The comma is important\n * .placeholder-red\n * placeholder(color red,)\n *\n * // We can pass a function\n * green-placeholder()\n * color green\n * .placeholder-green\n * placeholder(green-placeholder)\n *\n * // We can pass a hash\n * textarea\n * placeholder((font-style italic) (font-weight bold) (padding '4px 10px'))\n */\nplaceholder()\n for v in ':-webkit-input' '-moz' ':-moz' '-ms-input'\n &:{v}-placeholder\n for pair in arguments\n if typeof(pair) == 'function'\n pair()\n else if pair is not null && pair[0] is not null\n {pair[0]}: type(pair[1]) == 'string' ? s(pair[1]) : pair[1]\ninput-placeholder = placeholder\n\n/*\n * Vendor background support (gradients).\n */\n\nbackground()\n if match('-gradient\\(', ''+arguments)\n vendor('background', arguments, vendor-property: false)\n else\n background arguments\n\nbackground-image()\n if match('-gradient\\(', ''+arguments)\n vendor('background-image', arguments, vendor-property: false)\n else\n background-image arguments\n\ncursor()\n if match('-gradient\\(', ''+arguments)\n vendor('cursor', arguments, vendor-property: false)\n else\n cursor arguments\n\nlist-style()\n if match('-gradient\\(', ''+arguments)\n vendor('list-style', arguments, vendor-property: false)\n else\n list-style arguments\n\nlist-style-image()\n if match('-gradient\\(', ''+arguments)\n vendor('list-style-image', arguments, vendor-property: false)\n else\n list-style-image arguments\n","/*\n * Overflow utility. Maps to regular overflow, and adds an ellipsis value.\n *\n * Synopsis:\n *\n * overflow: <type>\n *\n * Examples:\n *\n * overflow: auto\n * overflow: hidden\n * overflow: ellipsis\n *\n */\n\noverflow()\n if arguments[0] == ellipsis\n ellipsis()\n else\n overflow: arguments\n","/*\n * Vendor \"display: flex\" support with fallback to obsolete versions.\n */\n\nflex-version ?= box flex\n\n//\n// 1. Display values\n// - http://www.w3.org/TR/css3-flexbox/#flex-containers\n//\ndisplay(type, args...)\n if flex == type || inline-flex == type\n if box in flex-version\n if flex == type\n display: -ms-flexbox args\n display: vendor-value(box args, only: moz webkit)\n else\n display: -ms-inline-flexbox args\n display: vendor-value(inline-box args, only: moz webkit)\n if flex in flex-version\n display: vendor-value(arguments, only: webkit official) // overwrites old webkit\n else\n display: arguments\n\n/*\n * New syntax for browsers like Google Chrome.\n * Plus a translation to the old syntax, if possible.\n */\n\n\n//\n// 5. Ordering and Orientation\n// - http://www.w3.org/TR/css3-flexbox/#ordering-and-orientation\n//\n-flex-obsolete-direction(direction)\n if box in flex-version\n if row-reverse == direction || column-reverse == direction\n vendor('box-direction', reverse, ignore: ms official)\n\n if row == direction || row-reverse == direction\n vendor('box-orient', horizontal, ignore: ms official)\n else if column == direction || column-reverse == direction\n vendor('box-orient', vertical, ignore: ms official)\n\n-flex-obsolete-wrap(value)\n if box in flex-version\n // WARN: wrap-reverse does not have a box equivalent. This will render in different manners\n // on box vs. flex values.\n if 'wrap' == value || wrap-reverse == value\n vendor('box-lines', multiple, ignore: ms official)\n else if nowrap == value\n vendor('box-lines', single, ignore: ms official)\n\nflex-direction(direction)\n // obsolete\n -flex-obsolete-direction(direction)\n\n // new\n if flex in flex-version\n vendor('flex-direction', arguments, only: webkit ms official)\n\nflex-wrap(value)\n // obsolete\n -flex-obsolete-wrap(value)\n\n if flex in flex-version\n vendor('flex-wrap', arguments, only: webkit ms official)\n\nflex-flow()\n // obsolete\n -flex-obsolete-direction(arguments[0])\n -flex-obsolete-direction(arguments[1])\n -flex-obsolete-wrap(arguments[0])\n -flex-obsolete-wrap(arguments[1])\n\n // new\n if flex in flex-version\n vendor('flex-flow', arguments, only: webkit ms official)\n\n\norder()\n // obsolete\n if box in flex-version\n vendor('box-ordinal-group', arguments, ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-order', arguments, only: ms)\n vendor('order', arguments, only: webkit official)\n\n\n//\n// 7. Flexibility\n// - http://www.w3.org/TR/css3-flexbox/#flexibility\n//\nflex-grow(growth)\n // obsolete\n if box in flex-version\n vendor('box-flex', growth)\n\n // new\n if flex in flex-version\n vendor('flex-grow', arguments, only: webkit official)\n\nflex-basis()\n if flex in flex-version\n vendor('flex-basis', arguments, only: webkit official)\n\nflex-shrink()\n if flex in flex-version\n vendor('flex-shrink', arguments, only: webkit official)\n\nflex(growth)\n\n // obsolete\n if box in flex-version\n shrink = 1\n\n if none == growth || initial == growth\n // Well known values\n shrink = 0 if none == growth\n growth = 0\n else if is-width(growth) == true\n // Basis is defined as the first parameter\n growth = arguments[1] || 0\n shrink = arguments[2] if 3 <= length(arguments)\n else if arguments[1] && is-width(arguments[1]) == false\n // Growth is first and shrink is second\n shrink = arguments[1]\n\n // Since we can't make the distinction between growing and shrinking in the box model, take\n // the one that provides the most flexibility.\n vendor('box-flex', max(growth, shrink), ignore: ms)\n\n // new\n if flex in flex-version\n vendor('flex', arguments, only: webkit ms official)\n\n\n// converts the justification alignment\n-convert-justify(align)\n if flex-start == align\n return start\n else if flex-end == align\n return end\n else if space-around == align\n return distribute\n else if space-between == align\n return justify\n else\n return align\n\n//\n// 8. Alignment\n// - http://www.w3.org/TR/css3-flexbox/#alignment\n//\njustify-content(align)\n // obsolete\n if box in flex-version\n vendor('box-pack', -convert-justify(align), ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-pack', -convert-justify(align), only: ms)\n vendor('justify-content', align, only: webkit official)\n\nalign-content(align)\n // WARN: Obsolete spec does not allow for adjustment here\n if flex in flex-version\n vendor('flex-line-pack', -convert-justify(align), only: ms)\n vendor('align-content', align, only: webkit official)\n\n// converts alignment from 'flex' to normal value\n-convert-alignment(align)\n if flex-start == align\n return start\n else if flex-end == align\n return end\n else\n return align\n\nalign-items(align)\n // obsolete\n if box in flex-version\n vendor('box-align', -convert-alignment(align), ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-align', -convert-alignment(align), only: ms)\n vendor('align-items', arguments, only: webkit official)\n\nalign-self(align)\n // WARN: Obsolete spec does not allow for overriding alignment on individual items.\n if flex in flex-version\n vendor('align-self', align, only: webkit official)\n vendor('flex-item-align', -convert-alignment(align), only: ms)\n","/*\n * border: <color>\n * border: ...\n */\n\nborder(color, args...)\n if color is a 'color'\n border: 1px solid color args\n else\n border: arguments\n"],sourceRoot:""}]),e.Z=d},7747:function(t,e,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([t.id,".color-legend-container{display:none;padding:10px;border:1.5px solid #000;border-radius:3px;transition:250ms background linear;background-color:rgba(255,255,255,0.75)}.color-legend-container:hover{background-color:#fff}.color-legend-container .geojs-color-legends .geojs-color-legend{margin-bottom:10px}.color-legend-container .geojs-color-legends .geojs-color-legend .geojs-title{text-align:center}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg{display:block}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x path.domain,.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x line{fill:none;stroke:#000;stroke-width:.7}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x text{font-size:12px}.color-legend-container .color-legend-popup{position:absolute;background:#fff;height:22px;font-size:14px;border:solid 1px #000;padding:0 5px;pointer-events:none;white-space:nowrap;z-index:100000;opacity:0}","",{version:3,sources:["webpack://./ui/colorLegendWidget.styl"],names:[],mappings:"AAAA,wBACE,YAAQ,CACR,YAAQ,CACR,uBAAO,CACP,iBAAc,CACd,kCAAW,CACX,uCAAiB,CAEjB,8BACE,qBAAiB,CAIjB,iEACE,kBAAc,CAEd,8EACE,iBAAW,CAEb,yEACE,aAAQ,CAGN,mLACE,SAAK,CACL,WAAO,CACP,eAAa,CACf,sFACE,cAAU,CAEpB,4CACE,iBAAS,CACT,eAAW,CACX,WAAO,CACP,cAAU,CACV,qBAAO,CACP,aAAQ,CACR,mBAAe,CACf,kBAAY,CACZ,cAAQ,CACR,SAAQ",sourcesContent:[".color-legend-container\n display none\n padding 10px\n border 1.5px solid black\n border-radius 3px\n transition 250ms background linear\n background-color rgba(255, 255, 255, 0.75)\n\n &:hover\n background-color rgba(255, 255, 255, 1)\n\n .geojs-color-legends\n\n .geojs-color-legend\n margin-bottom 10px\n\n .geojs-title\n text-align center\n\n svg.svg\n display block\n\n .axis.x\n path.domain, line\n fill none\n stroke black\n stroke-width 0.7\n text\n font-size 12px\n\n .color-legend-popup\n position absolute\n background white\n height 22px\n font-size 14px\n border solid 1px black\n padding 0 5px\n pointer-events none\n white-space nowrap\n z-index 100000\n opacity 0\n"],sourceRoot:""}]),e.Z=a},1680:function(t,e,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([t.id,".geojs-scale-widget-bar{stroke:#000}.geojs-scale-widget-text{font-weight:bold;font-size:16px;font-family:serif}","",{version:3,sources:["webpack://./ui/scaleWidget.styl"],names:[],mappings:"AAAA,wBACE,WAAO,CACT,yBACE,gBAAY,CACZ,cAAU,CACV,iBAAY",sourcesContent:[".geojs-scale-widget-bar\n stroke black\n.geojs-scale-widget-text\n font-weight bold\n font-size 16px\n font-family serif\n"],sourceRoot:""}]),e.Z=a},3476:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);r&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},1678:function(t){"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},559:function(t){"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),o="/*# ".concat(i," */");return[e].concat([o]).join("\n")}return[e].join("\n")}},8725:function(t,e,n){var r,i;!function(){var o={version:"3.5.17"},a=[].slice,s=function(t){return a.call(t)},u=this.document;function l(t){return t&&(t.ownerDocument||t.document||t).documentElement}function c(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(u)try{s(u.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),u)try{u.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var h=this.Element.prototype,f=h.setAttribute,d=h.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;h.setAttribute=function(t,e){f.call(this,t,e+"")},h.setAttributeNS=function(t,e,n){d.call(this,t,e,n+"")},p.setProperty=function(t,e,n){m.call(this,t,e+"",n)}}function g(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function x(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}o.ascending=g,o.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},o.min=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&n>r&&(n=r)}return n},o.max=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&r>n&&(n=r)}return n},o.extent=function(t,e){var n,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=e.call(t,t[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e.call(t,t[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},o.sum=function(t,e){var n,r=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)y(n=+t[o])&&(r+=n);else for(;++o<i;)y(n=+e.call(t,t[o],o))&&(r+=n);return r},o.mean=function(t,e){var n,r=0,i=t.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)y(n=v(t[o]))?r+=n:--a;else for(;++o<i;)y(n=v(e.call(t,t[o],o)))?r+=n:--a;if(a)return r/a},o.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],o=n-r;return o?i+o*(t[r]-i):i},o.median=function(t,e){var n,r=[],i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)y(n=v(t[a]))&&r.push(n);else for(;++a<i;)y(n=v(e.call(t,t[a],a)))&&r.push(n);if(r.length)return o.quantile(r.sort(g),.5)},o.variance=function(t,e){var n,r,i=t.length,o=0,a=0,s=-1,u=0;if(1===arguments.length)for(;++s<i;)y(n=v(t[s]))&&(a+=(r=n-o)*(n-(o+=r/++u)));else for(;++s<i;)y(n=v(e.call(t,t[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++u)));if(u>1)return a/(u-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var _=x(g);function b(t){return t.length}o.bisectLeft=_.left,o.bisect=o.bisectRight=_.right,o.bisector=function(t){return x(1===t.length?function(e,n){return g(t(e),n)}:t)},o.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,o<2&&(e=0));for(var r,i,o=n-e;o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},o.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},o.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],i=new Array(n<0?0:n);e<n;)i[e]=[r,r=t[++e]];return i},o.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,n=o.min(t,b),r=new Array(n);++e<n;)for(var i,a=-1,s=r[e]=new Array(i);++a<i;)s[a]=t[a][e];return r},o.zip=function(){return o.transpose(arguments)},o.keys=function(t){var e=[];for(var n in t)e.push(n);return e},o.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},o.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},o.merge=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n};var M=Math.abs;function w(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function A(){this._=Object.create(null)}o.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var r,i=[],o=function(t){var e=1;for(;t*e%1;)e*=10;return e}(M(n)),a=-1;if(t*=o,e*=o,(n*=o)<0)for(;(r=t+n*++a)>e;)i.push(r/o);else for(;(r=t+n*++a)<e;)i.push(r/o);return i},o.map=function(t,e){var n=new A;if(t instanceof A)t.forEach((function(t,e){n.set(t,e)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e.call(t,r=t[i],i),r)}else for(var a in t)n.set(a,t[a]);return n};var T="__proto__",C="\0";function E(t){return(t+="")===T||t[0]===C?C+t:t}function k(t){return(t+="")[0]===C?t.slice(1):t}function S(t){return E(t)in this._}function P(t){return(t=E(t))in this._&&delete this._[t]}function O(){var t=[];for(var e in this._)t.push(k(e));return t}function L(){var t=0;for(var e in this._)++t;return t}function R(){for(var t in this._)return!1;return!0}function I(){this._=Object.create(null)}function D(t){return t}function F(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function N(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=j.length;n<r;++n){var i=j[n]+e;if(i in t)return i}}w(A,{has:S,get:function(t){return this._[E(t)]},set:function(t,e){return this._[E(t)]=e},remove:P,keys:O,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:k(e),value:this._[e]});return t},size:L,empty:R,forEach:function(t){for(var e in this._)t.call(this,k(e),this._[e])}}),o.nest=function(){var t,e,n={},r=[],i=[];function a(i,o,s){if(s>=r.length)return e?e.call(n,o):t?o.sort(t):o;for(var u,l,c,h,f=-1,d=o.length,p=r[s++],m=new A;++f<d;)(h=m.get(u=p(l=o[f])))?h.push(l):m.set(u,[l]);return i?(l=i(),c=function(t,e){l.set(t,a(i,e,s))}):(l={},c=function(t,e){l[t]=a(i,e,s)}),m.forEach(c),l}function s(t,e){if(e>=r.length)return t;var n=[],o=i[e++];return t.forEach((function(t,r){n.push({key:t,values:s(r,e)})})),o?n.sort((function(t,e){return o(t.key,e.key)})):n}return n.map=function(t,e){return a(e,t,0)},n.entries=function(t){return s(a(o.map,t,0),0)},n.key=function(t){return r.push(t),n},n.sortKeys=function(t){return i[r.length-1]=t,n},n.sortValues=function(e){return t=e,n},n.rollup=function(t){return e=t,n},n},o.set=function(t){var e=new I;if(t)for(var n=0,r=t.length;n<r;++n)e.add(t[n]);return e},w(I,{has:S,add:function(t){return this._[E(t+="")]=!0,t},remove:P,values:O,size:L,empty:R,forEach:function(t){for(var e in this._)t.call(this,k(e))}}),o.behavior={},o.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r<i;)t[n=arguments[r]]=F(t,e,e[n]);return t};var j=["webkit","ms","moz","Moz","o","O"];function z(){}function B(){}function q(t){var e=[],n=new A;function r(){for(var n,r=e,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return t}return r.on=function(r,i){var o,a=n.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,o=e.indexOf(a)).concat(e.slice(o+1)),n.remove(r)),i&&e.push(n.set(r,{on:i})),t)},r}function V(){o.event.preventDefault()}function G(){for(var t,e=o.event;t=e.sourceEvent;)e=t;return e}function U(t){for(var e=new B,n=0,r=arguments.length;++n<r;)e[arguments[n]]=q(e);return e.of=function(n,r){return function(i){try{var a=i.sourceEvent=o.event;i.target=t,o.event=i,e[i.type].apply(n,r)}finally{o.event=a}}},e}o.dispatch=function(){for(var t=new B,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=q(t);return t},B.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},o.event=null,o.requote=function(t){return t.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,H={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]};function Z(t){return H(t,K),t}var X=function(t,e){return e.querySelector(t)},Q=function(t,e){return e.querySelectorAll(t)},Y=function(t,e){var n=t.matches||t[N(t,"matchesSelector")];return Y=function(t,e){return n.call(t,e)},Y(t,e)};"function"==typeof Sizzle&&(X=function(t,e){return Sizzle(t,e)[0]||null},Q=Sizzle,Y=Sizzle.matchesSelector),o.selection=function(){return o.select(u.documentElement)};var K=o.selection.prototype=[];function J(t){return"function"==typeof t?t:function(){return X(t,this)}}function $(t){return"function"==typeof t?t:function(){return Q(t,this)}}K.select=function(t){var e,n,r,i,o=[];t=J(t);for(var a=-1,s=this.length;++a<s;){o.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var u=-1,l=r.length;++u<l;)(i=r[u])?(e.push(n=t.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):e.push(null)}return Z(o)},K.selectAll=function(t){var e,n,r=[];t=$(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],u=-1,l=a.length;++u<l;)(n=a[u])&&(r.push(e=s(t.call(n,n.__data__,u,i))),e.parentNode=n);return Z(r)};var tt="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nt(t,e){return t=o.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function rt(t){return t.trim().replace(/\s+/g," ")}function it(t){return new RegExp("(?:^|\\s+)"+o.requote(t)+"(?:\\s+|$)","g")}function ot(t){return(t+"").trim().split(/^|\s+/)}function at(t,e){var n=(t=ot(t).map(st)).length;return"function"==typeof e?function(){for(var r=-1,i=e.apply(this,arguments);++r<n;)t[r](this,i)}:function(){for(var r=-1;++r<n;)t[r](this,e)}}function st(t){var e=it(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",rt(i+" "+t))):n.setAttribute("class",rt(i.replace(e," ")))}}function ut(t,e,n){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}:function(){this.style.setProperty(t,e,n)}}function lt(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function ct(t){return"function"==typeof t?t:(t=o.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===tt&&e.documentElement.namespaceURI===tt?e.createElement(t):e.createElementNS(n,t)}}function ht(){var t=this.parentNode;t&&t.removeChild(this)}function ft(t){return{__data__:t}}function dt(t){return function(){return Y(this,t)}}function pt(t){return arguments.length||(t=g),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function mt(t,e){for(var n=0,r=t.length;n<r;n++)for(var i,o=t[n],a=0,s=o.length;a<s;a++)(i=o[a])&&e(i,a,n);return t}function gt(t){return H(t,vt),t}o.ns={prefix:et,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(n)?{space:et[n],local:t}:t}},K.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=o.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(nt(e,t[e]));return this}return this.each(nt(t,e))},K.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=ot(t)).length,i=-1;if(e=n.classList){for(;++i<r;)if(!e.contains(t[i]))return!1}else for(e=n.getAttribute("class");++i<r;)if(!it(t[i]).test(e))return!1;return!0}for(e in t)this.each(at(e,t[e]));return this}return this.each(at(t,e))},K.style=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=""),t)this.each(ut(n,t[n],e));return this}if(r<2){var i=this.node();return c(i).getComputedStyle(i,null).getPropertyValue(t)}n=""}return this.each(ut(t,e,n))},K.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(lt(e,t[e]));return this}return this.each(lt(t,e))},K.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},K.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},K.append=function(t){return t=ct(t),this.select((function(){return this.appendChild(t.apply(this,arguments))}))},K.insert=function(t,e){return t=ct(t),e=J(e),this.select((function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)}))},K.remove=function(){return this.each(ht)},K.data=function(t,e){var n,r,i=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(t[i]=r.__data__);return t}function a(t,n){var r,i,o,a=t.length,c=n.length,h=Math.min(a,c),f=new Array(c),d=new Array(c),p=new Array(a);if(e){var m,g=new A,v=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(g.has(m=e.call(i,i.__data__,r))?p[r]=i:g.set(m,i),v[r]=m);for(r=-1;++r<c;)(i=g.get(m=e.call(n,o=n[r],r)))?!0!==i&&(f[r]=i,i.__data__=o):d[r]=ft(o),g.set(m,!0);for(r=-1;++r<a;)r in v&&!0!==g.get(v[r])&&(p[r]=t[r])}else{for(r=-1;++r<h;)i=t[r],o=n[r],i?(i.__data__=o,f[r]=i):d[r]=ft(o);for(;r<c;++r)d[r]=ft(n[r]);for(;r<a;++r)p[r]=t[r]}d.update=f,d.parentNode=f.parentNode=p.parentNode=t.parentNode,s.push(d),u.push(f),l.push(p)}var s=gt([]),u=Z([]),l=Z([]);if("function"==typeof t)for(;++i<o;)a(n=this[i],t.call(n,n.parentNode.__data__,i));else for(;++i<o;)a(n=this[i],t);return u.enter=function(){return s},u.exit=function(){return l},u},K.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},K.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=dt(t));for(var o=0,a=this.length;o<a;o++){i.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;s<u;s++)(r=n[s])&&t.call(r,r.__data__,s,o)&&e.push(r)}return Z(i)},K.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,r=this[t],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},K.sort=function(t){t=pt.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},K.each=function(t){return mt(this,(function(e,n,r){t.call(e,e.__data__,n,r)}))},K.call=function(t){var e=s(arguments);return t.apply(e[0]=this,e),this},K.empty=function(){return!this.node()},K.node=function(){for(var t=0,e=this.length;t<e;t++)for(var n=this[t],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},K.size=function(){var t=0;return mt(this,(function(){++t})),t};var vt=[];function yt(t,e,n){var r="__on"+t,i=t.indexOf("."),a=_t;i>0&&(t=t.slice(0,i));var u=xt.get(t);function l(){var e=this[r];e&&(this.removeEventListener(t,e,e.$),delete this[r])}return u&&(t=u,a=bt),i?e?function(){var i=a(e,s(arguments));l.call(this),this.addEventListener(t,this[r]=i,i.$=n),i._=e}:l:e?z:function(){var e,n=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var r in this)if(e=r.match(n)){var i=this[r];this.removeEventListener(e[1],i,i.$),delete this[r]}}}o.selection.enter=gt,o.selection.enter.prototype=vt,vt.append=K.append,vt.empty=K.empty,vt.node=K.node,vt.call=K.call,vt.size=K.size,vt.select=function(t){for(var e,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(e=[]),e.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(e.push(r[l]=n=t.call(i.parentNode,o.__data__,l,s)),n.__data__=o.__data__):e.push(null)}return Z(a)},vt.insert=function(t,e){var n,r,i;return arguments.length<2&&(n=this,e=function(t,e,o){var a,s=n[o].update,u=s.length;for(o!=i&&(i=o,r=0),e>=r&&(r=e+1);!(a=s[r])&&++r<u;);return a}),K.insert.call(this,t,e)},o.select=function(t){var e;return"string"==typeof t?(e=[X(t,u)]).parentNode=u.documentElement:(e=[t]).parentNode=l(t),Z([e])},o.selectAll=function(t){var e;return"string"==typeof t?(e=s(Q(t,u))).parentNode=u.documentElement:(e=s(t)).parentNode=null,Z([e])},K.on=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=!1),t)this.each(yt(n,t[n],e));return this}if(r<2)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(yt(t,e,n))};var xt=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function _t(t,e){return function(n){var r=o.event;o.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{o.event=r}}}function bt(t,e){var n=_t(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}u&&xt.forEach((function(t){"on"+t in u&&xt.remove(t)}));var Mt,wt=0;function At(t){var e=".dragsuppress-"+ ++wt,n="click"+e,r=o.select(c(t)).on("touchmove"+e,V).on("dragstart"+e,V).on("selectstart"+e,V);if(null==Mt&&(Mt=!("onselectstart"in t)&&N(t.style,"userSelect")),Mt){var i=l(t).style,a=i[Mt];i[Mt]="none"}return function(t){if(r.on(e,null),Mt&&(i[Mt]=a),t){var o=function(){r.on(n,null)};r.on(n,(function(){V(),o()}),!0),setTimeout(o,0)}}}o.mouse=function(t){return Ct(t,G())};var Tt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ct(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(Tt<0){var i=c(t);if(i.scrollX||i.scrollY){var a=(n=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Tt=!(a.f||a.e),n.remove()}}return Tt?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function Et(){return o.event.changedTouches[0].identifier}o.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=G().changedTouches),e)for(var r,i=0,o=e.length;i<o;++i)if((r=e[i]).identifier===n)return Ct(t,r)},o.behavior.drag=function(){var t=U(i,"drag","dragstart","dragend"),e=null,n=a(z,o.mouse,c,"mousemove","mouseup"),r=a(Et,o.touch,D,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function a(n,r,i,a,s){return function(){var u,l=this,c=o.event.target.correspondingElement||o.event.target,h=l.parentNode,f=t.of(l,arguments),d=0,p=n(),m=".drag"+(null==p?"":"-"+p),g=o.select(i(c)).on(a+m,(function(){var t,e,n=r(h,p);if(!n)return;t=n[0]-y[0],e=n[1]-y[1],d|=t|e,y=n,f({type:"drag",x:n[0]+u[0],y:n[1]+u[1],dx:t,dy:e})})).on(s+m,(function(){if(!r(h,p))return;g.on(a+m,null).on(s+m,null),v(d),f({type:"dragend"})})),v=At(c),y=r(h,p);u=e?[(u=e.apply(l,arguments)).x-y[0],u.y-y[1]]:[0,0],f({type:"dragstart"})}}return i.origin=function(t){return arguments.length?(e=t,i):e},o.rebind(i,t,"on")},o.touches=function(t,e){return arguments.length<2&&(e=G().touches),e?s(e).map((function(e){var n=Ct(t,e);return n.identifier=e.identifier,n})):[]};var kt=1e-6,St=kt*kt,Pt=Math.PI,Ot=2*Pt,Lt=Ot-kt,Rt=Pt/2,It=Pt/180,Dt=180/Pt;function Ft(t){return t>0?1:t<0?-1:0}function Nt(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function jt(t){return t>1?0:t<-1?Pt:Math.acos(t)}function zt(t){return t>1?Rt:t<-1?-Rt:Math.asin(t)}function Bt(t){return((t=Math.exp(t))+1/t)/2}function qt(t){return(t=Math.sin(t/2))*t}var Vt=Math.SQRT2;o.interpolateZoom=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],l=e[2],c=s-i,h=u-o,f=c*c+h*h;if(f<St)r=Math.log(l/a)/Vt,n=function(t){return[i+t*c,o+t*h,a*Math.exp(Vt*t*r)]};else{var d=Math.sqrt(f),p=(l*l-a*a+4*f)/(2*a*2*d),m=(l*l-a*a-4*f)/(2*l*2*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(m*m+1)-m);r=(v-g)/Vt,n=function(t){var e,n=t*r,s=Bt(g),u=a/(2*d)*(s*(e=Vt*n+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+u*c,o+u*h,a*s/Bt(Vt*n+g)]}}return n.duration=1e3*r,n},o.behavior.zoom=function(){var t,e,n,r,i,a,s,l,h,f={x:0,y:0,k:1},d=[960,500],p=Wt,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",_="touchstart.zoom",b=U(M,"zoomstart","zoom","zoomend");function M(t){t.on(v,O).on(Ut+".zoom",R).on("dblclick.zoom",I).on(_,L)}function w(t){return[(t[0]-f.x)/f.k,(t[1]-f.y)/f.k]}function A(t){f.k=Math.max(p[0],Math.min(p[1],t))}function T(t,e){e=function(t){return[t[0]*f.k+f.x,t[1]*f.k+f.y]}(e),f.x+=t[0]-e[0],f.y+=t[1]-e[1]}function C(t,n,r,i){t.__chart__={x:f.x,y:f.y,k:f.k},A(Math.pow(2,i)),T(e=n,r),t=o.select(t),m>0&&(t=t.transition().duration(m)),t.call(M.event)}function E(){s&&s.domain(a.range().map((function(t){return(t-f.x)/f.k})).map(a.invert)),h&&h.domain(l.range().map((function(t){return(t-f.y)/f.k})).map(l.invert))}function k(t){g++||t({type:"zoomstart"})}function S(t){E(),t({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function P(t){--g||(t({type:"zoomend"}),e=null)}function O(){var t=this,e=b.of(t,arguments),n=0,r=o.select(c(t)).on(y,(function(){n=1,T(o.mouse(t),i),S(e)})).on(x,(function(){r.on(y,null).on(x,null),a(n),P(e)})),i=w(o.mouse(t)),a=At(t);Ls.call(t),k(e)}function L(){var t,e=this,n=b.of(e,arguments),r={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,u="touchmove"+s,l="touchend"+s,c=[],h=o.select(e),d=At(e);function p(){var n=o.touches(e);return t=f.k,n.forEach((function(t){t.identifier in r&&(r[t.identifier]=w(t))})),n}function m(){var t=o.event.target;o.select(t).on(u,g).on(l,y),c.push(t);for(var n=o.event.changedTouches,s=0,h=n.length;s<h;++s)r[n[s].identifier]=null;var d=p(),m=Date.now();if(1===d.length){if(m-i<500){var v=d[0];C(e,v,r[v.identifier],Math.floor(Math.log(f.k)/Math.LN2)+1),V()}i=m}else if(d.length>1){v=d[0];var x=d[1],_=v[0]-x[0],b=v[1]-x[1];a=_*_+b*b}}function g(){var s,u,l,c,h=o.touches(e);Ls.call(e);for(var f=0,d=h.length;f<d;++f,c=null)if(l=h[f],c=r[l.identifier]){if(u)break;s=l,u=c}if(c){var p=(p=l[0]-s[0])*p+(p=l[1]-s[1])*p,m=a&&Math.sqrt(p/a);s=[(s[0]+l[0])/2,(s[1]+l[1])/2],u=[(u[0]+c[0])/2,(u[1]+c[1])/2],A(m*t)}i=null,T(s,u),S(n)}function y(){if(o.event.touches.length){for(var t=o.event.changedTouches,e=0,i=t.length;e<i;++e)delete r[t[e].identifier];for(var a in r)return void p()}o.selectAll(c).on(s,null),h.on(v,O).on(_,L),d(),P(n)}m(),k(n),h.on(v,null).on(_,m)}function R(){var i=b.of(this,arguments);r?clearTimeout(r):(Ls.call(this),t=w(e=n||o.mouse(this)),k(i)),r=setTimeout((function(){r=null,P(i)}),50),V(),A(Math.pow(2,.002*Gt())*f.k),T(e,t),S(i)}function I(){var t=o.mouse(this),e=Math.log(f.k)/Math.LN2;C(this,t,w(t),o.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return Ut||(Ut="onwheel"in u?(Gt=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in u?(Gt=function(){return o.event.wheelDelta},"mousewheel"):(Gt=function(){return-o.event.detail},"MozMousePixelScroll")),M.event=function(t){t.each((function(){var t=b.of(this,arguments),n=f;Ds?o.select(this).transition().each("start.zoom",(function(){f=this.__chart__||{x:0,y:0,k:1},k(t)})).tween("zoom:zoom",(function(){var r=d[0],i=d[1],a=e?e[0]:r/2,s=e?e[1]:i/2,u=o.interpolateZoom([(a-f.x)/f.k,(s-f.y)/f.k,r/f.k],[(a-n.x)/n.k,(s-n.y)/n.k,r/n.k]);return function(e){var n=u(e),i=r/n[2];this.__chart__=f={x:a-n[0]*i,y:s-n[1]*i,k:i},S(t)}})).each("interrupt.zoom",(function(){P(t)})).each("end.zoom",(function(){P(t)})):(this.__chart__=f,k(t),S(t),P(t))}))},M.translate=function(t){return arguments.length?(f={x:+t[0],y:+t[1],k:f.k},E(),M):[f.x,f.y]},M.scale=function(t){return arguments.length?(f={x:f.x,y:f.y,k:null},A(+t),E(),M):f.k},M.scaleExtent=function(t){return arguments.length?(p=null==t?Wt:[+t[0],+t[1]],M):p},M.center=function(t){return arguments.length?(n=t&&[+t[0],+t[1]],M):n},M.size=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],M):d},M.duration=function(t){return arguments.length?(m=+t,M):m},M.x=function(t){return arguments.length?(s=t,a=t.copy(),f={x:0,y:0,k:1},M):s},M.y=function(t){return arguments.length?(h=t,l=t.copy(),f={x:0,y:0,k:1},M):h},o.rebind(M,b,"on")};var Gt,Ut,Wt=[0,1/0];function Ht(){}function Zt(t,e,n){return this instanceof Zt?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof Zt?new Zt(t.h,t.s,t.l):me(""+t,ge,Zt):new Zt(t,e,n)}o.color=Ht,Ht.prototype.toString=function(){return this.rgb()+""},o.hsl=Zt;var Xt=Zt.prototype=new Ht;function Qt(t,e,n){var r,i;function o(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+e):n+e-n*e),new ce(o(t+120),o(t),o(t-120))}function Yt(t,e,n){return this instanceof Yt?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof Yt?new Yt(t.h,t.c,t.l):ae(t instanceof $t?t.l:(t=ve((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Yt(t,e,n)}Xt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Zt(this.h,this.s,this.l/t)},Xt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Zt(this.h,this.s,t*this.l)},Xt.rgb=function(){return Qt(this.h,this.s,this.l)},o.hcl=Yt;var Kt=Yt.prototype=new Ht;function Jt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new $t(n,Math.cos(t*=It)*e,Math.sin(t)*e)}function $t(t,e,n){return this instanceof $t?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof $t?new $t(t.l,t.a,t.b):t instanceof Yt?Jt(t.h,t.c,t.l):ve((t=ce(t)).r,t.g,t.b):new $t(t,e,n)}Kt.brighter=function(t){return new Yt(this.h,this.c,Math.min(100,this.l+te*(arguments.length?t:1)))},Kt.darker=function(t){return new Yt(this.h,this.c,Math.max(0,this.l-te*(arguments.length?t:1)))},Kt.rgb=function(){return Jt(this.h,this.c,this.l).rgb()},o.lab=$t;var te=18,ee=.95047,ne=1,re=1.08883,ie=$t.prototype=new Ht;function oe(t,e,n){var r=(t+16)/116,i=r+e/500,o=r-n/200;return new ce(le(3.2404542*(i=se(i)*ee)-1.5371385*(r=se(r)*ne)-.4985314*(o=se(o)*re)),le(-.969266*i+1.8760108*r+.041556*o),le(.0556434*i-.2040259*r+1.0572252*o))}function ae(t,e,n){return t>0?new Yt(Math.atan2(n,e)*Dt,Math.sqrt(e*e+n*n),t):new Yt(NaN,NaN,t)}function se(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ue(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function le(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ce(t,e,n){return this instanceof ce?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof ce?new ce(t.r,t.g,t.b):me(""+t,ce,Qt):new ce(t,e,n)}function he(t){return new ce(t>>16,t>>8&255,255&t)}function fe(t){return he(t)+""}ie.brighter=function(t){return new $t(Math.min(100,this.l+te*(arguments.length?t:1)),this.a,this.b)},ie.darker=function(t){return new $t(Math.max(0,this.l-te*(arguments.length?t:1)),this.a,this.b)},ie.rgb=function(){return oe(this.l,this.a,this.b)},o.rgb=ce;var de=ce.prototype=new Ht;function pe(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function me(t,e,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(xe(i[0]),xe(i[1]),xe(i[2]))}return(o=_e.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),e(a,s,u))}function ge(t,e,n){var r,i,o=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),s=a-o,u=(a+o)/2;return s?(i=u<.5?s/(a+o):s/(2-a-o),r=t==a?(e-n)/s+(e<n?6:0):e==a?(n-t)/s+2:(t-e)/s+4,r*=60):(r=NaN,i=u>0&&u<1?0:r),new Zt(r,i,u)}function ve(t,e,n){var r=ue((.4124564*(t=ye(t))+.3575761*(e=ye(e))+.1804375*(n=ye(n)))/ee),i=ue((.2126729*t+.7151522*e+.072175*n)/ne);return $t(116*i-16,500*(r-i),200*(i-ue((.0193339*t+.119192*e+.9503041*n)/re)))}function ye(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}de.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&e<i&&(e=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new ce(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new ce(i,i,i)},de.darker=function(t){return new ce((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},de.hsl=function(){return ge(this.r,this.g,this.b)},de.toString=function(){return"#"+pe(this.r)+pe(this.g)+pe(this.b)};var _e=o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function be(t){return"function"==typeof t?t:function(){return t}}function Me(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),we(e,n,t,r)}}function we(t,e,n,r){var i={},a=o.dispatch("beforesend","progress","load","error"),u={},l=new XMLHttpRequest,c=null;function h(){var t,e=l.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(l)||e>=200&&e<300||304===e){try{t=n.call(i,l)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,l)}return this.XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=h:l.onreadystatechange=function(){l.readyState>3&&h()},l.onprogress=function(t){var e=o.event;o.event=t;try{a.progress.call(i,l)}finally{o.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(c=t,i):c},i.response=function(t){return n=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(n,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),l.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),l.setRequestHeader)for(var s in u)l.setRequestHeader(s,u[s]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=c&&(l.responseType=c),null!=o&&i.on("error",o).on("load",(function(t){o(null,t)})),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}(r))}_e.forEach((function(t,e){_e.set(t,he(e))})),o.functor=be,o.xhr=Me(D),o.dsv=function(t,e){var n=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function i(t,n,r){arguments.length<3&&(r=n,n=null);var i=we(t,e,null==n?o:a(n),r);return i.row=function(t){return arguments.length?i.response(null==(n=t)?o:a(t)):n},i}function o(t){return i.parse(t.responseText)}function a(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(u).join(t)}function u(t){return n.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var n;return i.parseRows(t,(function(t,r){if(n)return n(t,r-1);var i=new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}");n=e?function(t,n){return e(i(t),n)}:i}))},i.parseRows=function(t,e){var n,i,o={},a={},s=[],u=t.length,l=0,c=0;function h(){if(l>=u)return a;if(i)return i=!1,o;var e=l;if(34===t.charCodeAt(e)){for(var n=e;n++<u;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}return l=n+2,13===(s=t.charCodeAt(n+1))?(i=!0,10===t.charCodeAt(n+2)&&++l):10===s&&(i=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;l<u;){var s,c=1;if(10===(s=t.charCodeAt(l++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(l)&&(++l,++c);else if(s!==r)continue;return t.slice(e,l-c)}return t.slice(e)}for(;(n=h())!==a;){for(var f=[];n!==o&&n!==a;)f.push(n),n=h();e&&null==(f=e(f,c++))||s.push(f)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var n=new I,r=[];return e.forEach((function(t){for(var e in t)n.has(e)||r.push(n.add(e))})),[r.map(u).join(t)].concat(e.map((function(e){return r.map((function(t){return u(e[t])})).join(t)}))).join("\n")},i.formatRows=function(t){return t.map(s).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var Ae,Te,Ce,Ee,ke=this[N(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function Se(t,e,n){var r=arguments.length;r<2&&(e=0),r<3&&(n=Date.now());var i={c:t,t:n+e,n:null};return Te?Te.n=i:Ae=i,Te=i,Ce||(Ee=clearTimeout(Ee),Ce=1,ke(Pe)),i}function Pe(){var t=Oe(),e=Le()-t;e>24?(isFinite(e)&&(clearTimeout(Ee),Ee=setTimeout(Pe,e)),Ce=0):(Ce=1,ke(Pe))}function Oe(){for(var t=Date.now(),e=Ae;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Le(){for(var t,e=Ae,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:Ae=e.n;return Te=t,n}function Re(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}o.timer=function(){Se.apply(this,arguments)},o.timer.flush=function(){Oe(),Le()},o.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Ie=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(t,e){var n=Math.pow(10,3*M(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}));function De(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,a=r&&n?function(t,e){for(var i=t.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>e&&(s=Math.max(1,e-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>e));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:D;return function(t){var n=Fe.exec(t),r=n[1]||" ",s=n[2]||">",u=n[3]||"-",l=n[4]||"",c=n[5],h=+n[6],f=n[7],d=n[8],p=n[9],m=1,g="",v="",y=!1,x=!0;switch(d&&(d=+d.substring(1)),(c||"0"===r&&"="===s)&&(c=r="0",s="="),p){case"n":f=!0,p="g";break;case"%":m=100,v="%",p="f";break;case"p":m=100,v="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+p.toLowerCase());case"c":x=!1;case"d":y=!0,d=0;break;case"s":m=-1,p="r"}"$"===l&&(g=i[0],v=i[1]),"r"!=p||d||(p="g"),null!=d&&("g"==p?d=Math.max(1,Math.min(21,d)):"e"!=p&&"f"!=p||(d=Math.max(0,Math.min(20,d)))),p=Ne.get(p)||je;var _=c&&f;return function(t){var n=v;if(y&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===u?"":u;if(m<0){var l=o.formatPrefix(t,d);t=l.scale(t),n=l.symbol+v}else t*=m;var b,M,w=(t=p(t,d)).lastIndexOf(".");if(w<0){var A=x?t.lastIndexOf("e"):-1;A<0?(b=t,M=""):(b=t.substring(0,A),M=t.substring(A))}else b=t.substring(0,w),M=e+t.substring(w+1);!c&&f&&(b=a(b,1/0));var T=g.length+b.length+M.length+(_?0:i.length),C=T<h?new Array(T=h-T+1).join(r):"";return _&&(b=a(C+b,C.length?h-M.length:1/0)),i+=g,t=b+M,("<"===s?i+t+C:">"===s?C+i+t:"^"===s?C.substring(0,T>>=1)+i+t+C.substring(T):i+(_?t:C+t))+n}}}o.formatPrefix=function(t,e){var n=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=o.round(t,Re(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ie[8+n/3]};var Fe=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ne=o.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=o.round(t,Re(t,e))).toFixed(Math.max(0,Math.min(20,Re(t*(1+1e-15),e))))}});function je(t){return t+""}var ze=o.time={},Be=Date;function qe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}qe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Ve.setUTCDate.apply(this._,arguments)},setDay:function(){Ve.setUTCDay.apply(this._,arguments)},setFullYear:function(){Ve.setUTCFullYear.apply(this._,arguments)},setHours:function(){Ve.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Ve.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Ve.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Ve.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Ve.setUTCSeconds.apply(this._,arguments)},setTime:function(){Ve.setTime.apply(this._,arguments)}};var Ve=Date.prototype;function Ge(t,e,n){function r(e){var n=t(e),r=o(n,1);return e-n<r-e?n:r}function i(n){return e(n=t(new Be(n-1)),1),n}function o(t,n){return e(t=new Be(+t),n),t}function a(t,r,o){var a=i(t),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date(+a)),e(a,1);else for(;a<r;)s.push(new Date(+a)),e(a,1);return s}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=Ue(t);return s.floor=s,s.round=Ue(r),s.ceil=Ue(i),s.offset=Ue(o),s.range=function(t,e,n){try{Be=qe;var r=new qe;return r._=t,a(r,e,n)}finally{Be=Date}},t}function Ue(t){return function(e,n){try{Be=qe;var r=new qe;return r._=e,t(r,n)._}finally{Be=Date}}}function We(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,s=t.shortDays,u=t.months,l=t.shortMonths;function c(t){var e=t.length;function n(n){for(var r,i,o,a=[],s=-1,u=0;++s<e;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=He[r=t.charAt(++s)])&&(r=t.charAt(++s)),(o=b[r])&&(r=o(n,null==i?"e"===r?" ":"0":i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}return n.parse=function(e){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(h(n,t,e,0)!=e.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&Be!==qe,i=new(r?qe:Be);return"j"in n?i.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),i.setFullYear(n.y,0,1),i.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(i.getDay()+5)%7:n.w+7*n.U-(i.getDay()+6)%7)):i.setFullYear(n.y,n.m,n.d),i.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),r?i._:i},n.toString=function(){return t},n}function h(t,e,n,r){for(var i,o,a,s=0,u=e.length,l=n.length;s<u;){if(r>=l)return-1;if(37===(i=e.charCodeAt(s++))){if(a=e.charAt(s++),!(o=M[a in He?e.charAt(s++):a])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}c.utc=function(t){var e=c(t);function n(t){try{var n=new(Be=qe);return n._=t,e(n)}finally{Be=Date}}return n.parse=function(t){try{Be=qe;var n=e.parse(t);return n&&n._}finally{Be=Date}},n.toString=e.toString,n},c.multi=c.utc.multi=pn;var f=o.map(),d=Ye(a),p=Ke(a),m=Ye(s),g=Ke(s),v=Ye(u),y=Ke(u),x=Ye(l),_=Ke(l);i.forEach((function(t,e){f.set(t.toLowerCase(),e)}));var b={a:function(t){return s[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:c(e),d:function(t,e){return Qe(t.getDate(),e,2)},e:function(t,e){return Qe(t.getDate(),e,2)},H:function(t,e){return Qe(t.getHours(),e,2)},I:function(t,e){return Qe(t.getHours()%12||12,e,2)},j:function(t,e){return Qe(1+ze.dayOfYear(t),e,3)},L:function(t,e){return Qe(t.getMilliseconds(),e,3)},m:function(t,e){return Qe(t.getMonth()+1,e,2)},M:function(t,e){return Qe(t.getMinutes(),e,2)},p:function(t){return i[+(t.getHours()>=12)]},S:function(t,e){return Qe(t.getSeconds(),e,2)},U:function(t,e){return Qe(ze.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Qe(ze.mondayOfYear(t),e,2)},x:c(n),X:c(r),y:function(t,e){return Qe(t.getFullYear()%100,e,2)},Y:function(t,e){return Qe(t.getFullYear()%1e4,e,4)},Z:fn,"%":function(){return"%"}},M={a:function(t,e,n){m.lastIndex=0;var r=m.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){d.lastIndex=0;var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){x.lastIndex=0;var r=x.exec(e.slice(n));return r?(t.m=_.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){v.lastIndex=0;var r=v.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,n){return h(t,b.c.toString(),e,n)},d:an,e:an,H:un,I:un,j:sn,L:hn,m:on,M:ln,p:function(t,e,n){var r=f.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)},S:cn,U:$e,w:Je,W:tn,x:function(t,e,n){return h(t,b.x.toString(),e,n)},X:function(t,e,n){return h(t,b.X.toString(),e,n)},y:nn,Y:en,Z:rn,"%":dn};return c}ze.year=Ge((function(t){return(t=ze.day(t)).setMonth(0,1),t}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t){return t.getFullYear()})),ze.years=ze.year.range,ze.years.utc=ze.year.utc.range,ze.day=Ge((function(t){var e=new Be(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t){return t.getDate()-1})),ze.days=ze.day.range,ze.days.utc=ze.day.utc.range,ze.dayOfYear=function(t){var e=ze.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,e){e=7-e;var n=ze[t]=Ge((function(t){return(t=ze.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t}),(function(t,e){t.setDate(t.getDate()+7*Math.floor(e))}),(function(t){var n=ze.year(t).getDay();return Math.floor((ze.dayOfYear(t)+(n+e)%7)/7)-(n!==e)}));ze[t+"s"]=n.range,ze[t+"s"].utc=n.utc.range,ze[t+"OfYear"]=function(t){var n=ze.year(t).getDay();return Math.floor((ze.dayOfYear(t)+(n+e)%7)/7)}})),ze.week=ze.sunday,ze.weeks=ze.sunday.range,ze.weeks.utc=ze.sunday.utc.range,ze.weekOfYear=ze.sundayOfYear;var He={"-":"",_:" ",0:"0"},Ze=/^\s*\d+/,Xe=/^%/;function Qe(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Ye(t){return new RegExp("^(?:"+t.map(o.requote).join("|")+")","i")}function Ke(t){for(var e=new A,n=-1,r=t.length;++n<r;)e.set(t[n].toLowerCase(),n);return e}function Je(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function $e(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function tn(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function en(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function nn(t,e,n){Ze.lastIndex=0;var r,i=Ze.exec(e.slice(n,n+2));return i?(t.y=(r=+i[0])+(r>68?1900:2e3),n+i[0].length):-1}function rn(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function on(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function an(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function sn(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function un(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ln(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function cn(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function hn(t,e,n){Ze.lastIndex=0;var r=Ze.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function fn(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=M(e)/60|0,i=M(e)%60;return n+Qe(r,"0",2)+Qe(i,"0",2)}function dn(t,e,n){Xe.lastIndex=0;var r=Xe.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function pn(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,r=t[n];!r[1](e);)r=t[++n];return r[0](e)}}o.locale=function(t){return{numberFormat:De(t),timeFormat:We(t)}};var mn=o.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gn(){}o.format=mn.numberFormat,o.geo={},gn.prototype={s:0,t:0,add:function(t){yn(t,this.t,vn),yn(vn.s,this.s,this),this.s?this.t+=vn.t:this.s=vn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var vn=new gn;function yn(t,e,n){var r=n.s=t+e,i=r-t,o=r-i;n.t=t-o+(e-i)}function xn(t,e){t&&bn.hasOwnProperty(t.type)&&bn[t.type](t,e)}o.geo.stream=function(t,e){t&&_n.hasOwnProperty(t.type)?_n[t.type](t,e):xn(t,e)};var _n={Feature:function(t,e){xn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)xn(n[r].geometry,e)}},bn={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Mn(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Mn(n[r],e,0)},Polygon:function(t,e){wn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)wn(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)xn(n[r],e)}};function Mn(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function wn(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Mn(t[n],e,1);e.polygonEnd()}o.geo.area=function(t){return An=0,o.geo.stream(t,Nn),An};var An,Tn,Cn,En,kn,Sn,Pn,On,Ln,Rn,In,Dn,Fn=new gn,Nn={sphere:function(){An+=4*Pt},point:z,lineStart:z,lineEnd:z,polygonStart:function(){Fn.reset(),Nn.lineStart=jn},polygonEnd:function(){var t=2*Fn;An+=t<0?4*Pt+t:t,Nn.lineStart=Nn.lineEnd=Nn.point=z}};function jn(){var t,e,n,r,i;function o(t,e){e=e*It/2+Pt/4;var o=(t*=It)-n,a=o>=0?1:-1,s=a*o,u=Math.cos(e),l=Math.sin(e),c=i*l,h=r*u+c*Math.cos(s),f=c*a*Math.sin(s);Fn.add(Math.atan2(f,h)),n=t,r=u,i=l}Nn.point=function(a,s){Nn.point=o,n=(t=a)*It,r=Math.cos(s=(e=s)*It/2+Pt/4),i=Math.sin(s)},Nn.lineEnd=function(){o(t,e)}}function zn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function Bn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qn(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Vn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Gn(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Un(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Wn(t){return[Math.atan2(t[1],t[0]),zt(t[2])]}function Hn(t,e){return M(t[0]-e[0])<kt&&M(t[1]-e[1])<kt}o.geo.bounds=function(){var t,e,n,r,i,a,s,u,l,c,h,f={point:d,lineStart:m,lineEnd:g,polygonStart:function(){f.point=v,f.lineStart=y,f.lineEnd=x,l=0,Nn.polygonStart()},polygonEnd:function(){Nn.polygonEnd(),f.point=d,f.lineStart=m,f.lineEnd=g,Fn<0?(t=-(n=180),e=-(r=90)):l>kt?r=90:l<-kt&&(e=-90),h[0]=t,h[1]=n}};function d(i,o){c.push(h=[t=i,n=i]),o<e&&(e=o),o>r&&(r=o)}function p(o,a){var s=zn([o*It,a*It]);if(u){var l=qn(u,s),c=qn([l[1],-l[0],0],l);Un(c),c=Wn(c);var h=o-i,f=h>0?1:-1,p=c[0]*Dt*f,m=M(h)>180;if(m^(f*i<p&&p<f*o))(g=c[1]*Dt)>r&&(r=g);else if(m^(f*i<(p=(p+360)%360-180)&&p<f*o)){var g;(g=-c[1]*Dt)<e&&(e=g)}else a<e&&(e=a),a>r&&(r=a);m?o<i?_(t,o)>_(t,n)&&(n=o):_(o,n)>_(t,n)&&(t=o):n>=t?(o<t&&(t=o),o>n&&(n=o)):o>i?_(t,o)>_(t,n)&&(n=o):_(o,n)>_(t,n)&&(t=o)}else d(o,a);u=s,i=o}function m(){f.point=p}function g(){h[0]=t,h[1]=n,f.point=d,u=null}function v(t,e){if(u){var n=t-i;l+=M(n)>180?n+(n>0?360:-360):n}else a=t,s=e;Nn.point(t,e),p(t,e)}function y(){Nn.lineStart()}function x(){v(a,s),Nn.lineEnd(),M(l)>kt&&(t=-(n=180)),h[0]=t,h[1]=n,u=null}function _(t,e){return(e-=t)<0?e+360:e}function b(t,e){return t[0]-e[0]}function w(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}return function(i){if(r=n=-(t=e=1/0),c=[],o.geo.stream(i,f),l=c.length){c.sort(b);for(var a=1,s=[m=c[0]];a<l;++a)w((d=c[a])[0],m)||w(d[1],m)?(_(m[0],d[1])>_(m[0],m[1])&&(m[1]=d[1]),_(d[0],m[1])>_(m[0],m[1])&&(m[0]=d[0])):s.push(m=d);for(var u,l,d,p=-1/0,m=(a=0,s[l=s.length-1]);a<=l;m=d,++a)d=s[a],(u=_(m[1],d[0]))>p&&(p=u,t=d[0],n=m[1])}return c=h=null,t===1/0||e===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,e],[n,r]]}}(),o.geo.centroid=function(t){Tn=Cn=En=kn=Sn=Pn=On=Ln=Rn=In=Dn=0,o.geo.stream(t,Zn);var e=Rn,n=In,r=Dn,i=e*e+n*n+r*r;return i<St&&(e=Pn,n=On,r=Ln,Cn<kt&&(e=En,n=kn,r=Sn),(i=e*e+n*n+r*r)<St)?[NaN,NaN]:[Math.atan2(n,e)*Dt,zt(r/Math.sqrt(i))*Dt]};var Zn={sphere:z,point:Xn,lineStart:Yn,lineEnd:Kn,polygonStart:function(){Zn.lineStart=Jn},polygonEnd:function(){Zn.lineStart=Yn}};function Xn(t,e){t*=It;var n=Math.cos(e*=It);Qn(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function Qn(t,e,n){++Tn,En+=(t-En)/Tn,kn+=(e-kn)/Tn,Sn+=(n-Sn)/Tn}function Yn(){var t,e,n;function r(r,i){r*=It;var o=Math.cos(i*=It),a=o*Math.cos(r),s=o*Math.sin(r),u=Math.sin(i),l=Math.atan2(Math.sqrt((l=e*u-n*s)*l+(l=n*a-t*u)*l+(l=t*s-e*a)*l),t*a+e*s+n*u);Cn+=l,Pn+=l*(t+(t=a)),On+=l*(e+(e=s)),Ln+=l*(n+(n=u)),Qn(t,e,n)}Zn.point=function(i,o){i*=It;var a=Math.cos(o*=It);t=a*Math.cos(i),e=a*Math.sin(i),n=Math.sin(o),Zn.point=r,Qn(t,e,n)}}function Kn(){Zn.point=Xn}function Jn(){var t,e,n,r,i;function o(t,e){t*=It;var o=Math.cos(e*=It),a=o*Math.cos(t),s=o*Math.sin(t),u=Math.sin(e),l=r*u-i*s,c=i*a-n*u,h=n*s-r*a,f=Math.sqrt(l*l+c*c+h*h),d=n*a+r*s+i*u,p=f&&-jt(d)/f,m=Math.atan2(f,d);Rn+=p*l,In+=p*c,Dn+=p*h,Cn+=m,Pn+=m*(n+(n=a)),On+=m*(r+(r=s)),Ln+=m*(i+(i=u)),Qn(n,r,i)}Zn.point=function(a,s){t=a,e=s,Zn.point=o,a*=It;var u=Math.cos(s*=It);n=u*Math.cos(a),r=u*Math.sin(a),i=Math.sin(s),Qn(n,r,i)},Zn.lineEnd=function(){o(t,e),Zn.lineEnd=Kn,Zn.point=Xn}}function $n(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function tr(){return!0}function er(t,e,n,r,i){var o=[],a=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],r=t[e];if(Hn(n,r)){i.lineStart();for(var s=0;s<e;++s)i.point((n=t[s])[0],n[1]);i.lineEnd()}else{var u=new rr(n,t,null,!0),l=new rr(n,null,u,!1);u.o=l,o.push(u),a.push(l),u=new rr(r,t,null,!1),l=new rr(r,null,u,!0),u.o=l,o.push(u),a.push(l)}}})),a.sort(e),nr(o),nr(a),o.length){for(var s=0,u=n,l=a.length;s<l;++s)a[s].e=u=!u;for(var c,h,f=o[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;c=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(s=0,l=c.length;s<l;++s)i.point((h=c[s])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p)for(s=(c=d.p.z).length-1;s>=0;--s)i.point((h=c[s])[0],h[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function nr(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function rr(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function ir(t,e,n,r){return function(i,a){var s,u=e(a),l=i.invert(r[0],r[1]),c={point:h,lineStart:d,lineEnd:p,polygonStart:function(){c.point=_,c.lineStart=b,c.lineEnd=M,s=[],m=[]},polygonEnd:function(){c.point=h,c.lineStart=d,c.lineEnd=p,s=o.merge(s);var t=function(t,e){var n=t[0],r=t[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Fn.reset();for(var s=0,u=e.length;s<u;++s){var l=e[s],c=l.length;if(c)for(var h=l[0],f=h[0],d=h[1]/2+Pt/4,p=Math.sin(d),m=Math.cos(d),g=1;;){g===c&&(g=0);var v=(t=l[g])[0],y=t[1]/2+Pt/4,x=Math.sin(y),_=Math.cos(y),b=v-f,M=b>=0?1:-1,w=M*b,A=w>Pt,T=p*x;if(Fn.add(Math.atan2(T*M*Math.sin(w),m*_+T*Math.cos(w))),o+=A?b+M*Ot:b,A^f>=n^v>=n){var C=qn(zn(h),zn(t));Un(C);var E=qn(i,C);Un(E);var k=(A^b>=0?-1:1)*zt(E[2]);(r>k||r===k&&(C[0]||C[1]))&&(a+=A^b>=0?1:-1)}if(!g++)break;f=v,p=x,m=_,h=t}}return(o<-kt||o<kt&&Fn<-kt)^1&a}(l,m);s.length?(x||(a.polygonStart(),x=!0),er(s,sr,t,n,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),s=m=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function h(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&a.point(e,n)}function f(t,e){var n=i(t,e);u.point(n[0],n[1])}function d(){c.point=f,u.lineStart()}function p(){c.point=h,u.lineEnd()}var m,g,v=ar(),y=e(v),x=!1;function _(t,e){g.push([t,e]);var n=i(t,e);y.point(n[0],n[1])}function b(){y.lineStart(),g=[]}function M(){_(g[0][0],g[0][1]),y.lineEnd();var t,e=y.clean(),n=v.buffer(),r=n.length;if(g.pop(),m.push(g),g=null,r)if(1&e){var i,o=-1;if((r=(t=n[0]).length-1)>0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o<r;)a.point((i=t[o])[0],i[1]);a.lineEnd()}}else r>1&&2&e&&n.push(n.pop().concat(n.shift())),s.push(n.filter(or))}return c}}function or(t){return t.length>1}function ar(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:z,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function sr(t,e){return((t=t.x)[0]<0?t[1]-Rt-kt:Rt-t[1])-((e=e.x)[0]<0?e[1]-Rt-kt:Rt-e[1])}var ur=ir(tr,(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?Pt:-Pt,u=M(o-n);M(u-Pt)<kt?(t.point(n,r=(r+a)/2>0?Rt:-Rt),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=Pt&&(M(n-i)<kt&&(n-=i*kt),M(o-s)<kt&&(o-=s*kt),r=function(t,e,n,r){var i,o,a=Math.sin(t-n);return M(a)>kt?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Rt,r.point(-Pt,i),r.point(0,i),r.point(Pt,i),r.point(Pt,0),r.point(Pt,-i),r.point(0,-i),r.point(-Pt,-i),r.point(-Pt,0),r.point(-Pt,i);else if(M(t[0]-e[0])>kt){var o=t[0]<e[0]?Pt:-Pt;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-Pt,-Pt/2]);function lr(t,e,n,r){return function(i){var o,a=i.a,s=i.b,u=a.x,l=a.y,c=0,h=1,f=s.x-u,d=s.y-l;if(o=t-u,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<h&&(h=o)}else if(f>0){if(o>h)return;o>c&&(c=o)}if(o=n-u,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<h&&(h=o)}if(o=e-l,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<h&&(h=o)}else if(d>0){if(o>h)return;o>c&&(c=o)}if(o=r-l,d||!(o<0)){if(o/=d,d<0){if(o>h)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<h&&(h=o)}return c>0&&(i.a={x:u+c*f,y:l+c*d}),h<1&&(i.b={x:u+h*f,y:l+h*d}),i}}}}}}var cr=1e9;function hr(t,e,n,r){return function(u){var l,c,h,f,d,p,m,g,v,y,x,_=u,b=ar(),M=lr(t,e,n,r),w={point:C,lineStart:function(){w.point=E,c&&c.push(h=[]);y=!0,v=!1,m=g=NaN},lineEnd:function(){l&&(E(f,d),p&&v&&b.rejoin(),l.push(b.buffer()));w.point=C,v&&u.lineEnd()},polygonStart:function(){u=b,l=[],c=[],x=!0},polygonEnd:function(){u=_,l=o.merge(l);var e=function(t){for(var e=0,n=c.length,r=t[1],i=0;i<n;++i)for(var o,a=1,s=c[i],u=s.length,l=s[0];a<u;++a)o=s[a],l[1]<=r?o[1]>r&&Nt(l,o,t)>0&&++e:o[1]<=r&&Nt(l,o,t)<0&&--e,l=o;return 0!==e}([t,r]),n=x&&e,i=l.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),A(null,null,1,u),u.lineEnd()),i&&er(l,a,e,A,u),u.polygonEnd()),l=c=h=null}};function A(o,a,u,l){var c=0,h=0;if(null==o||(c=i(o,u))!==(h=i(a,u))||s(o,a)<0^u>0)do{l.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+u+4)%4)!==h);else l.point(a[0],a[1])}function T(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function C(t,e){T(t,e)&&u.point(t,e)}function E(t,e){var n=T(t=Math.max(-cr,Math.min(cr,t)),e=Math.max(-cr,Math.min(cr,e)));if(c&&h.push([t,e]),y)f=t,d=e,p=n,y=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&v)u.point(t,e);else{var r={a:{x:m,y:g},b:{x:t,y:e}};M(r)?(v||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),x=!1):n&&(u.lineStart(),u.point(t,e),x=!1)}m=t,g=e,v=n}return w};function i(r,i){return M(r[0]-t)<kt?i>0?0:3:M(r[0]-n)<kt?i>0?2:1:M(r[1]-e)<kt?i>0?1:0:i>0?3:2}function a(t,e){return s(t.x,e.x)}function s(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}}function fr(t){var e=0,n=Pt/3,r=Fr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Pt/180,n=t[1]*Pt/180):[e/Pt*180,n/Pt*180]},i}function dr(t,e){var n=Math.sin(t),r=(n+Math.sin(e))/2,i=1+n*(2*r-n),o=Math.sqrt(i)/r;function a(t,e){var n=Math.sqrt(i-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),o-n*Math.cos(t)]}return a.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/r,zt((i-(t*t+n*n)*r*r)/(2*r))]},a}o.geo.clipExtent=function(){var t,e,n,r,i,o,a={stream:function(t){return i&&(i.valid=!1),(i=o(t)).valid=!0,i},extent:function(s){return arguments.length?(o=hr(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[t,e],[n,r]]}};return a.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return fr(dr)}).raw=dr,o.geo.albers=function(){return o.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},o.geo.albersUsa=function(){var t,e,n,r,i=o.geo.albers(),a=o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(e,n){t=[e,n]}};function l(i){var o=i[0],a=i[1];return t=null,e(o,a),t||(n(o,a),t)||r(o,a),t}return l.invert=function(t){var e=i.scale(),n=i.translate(),r=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?a:o>=.166&&o<.234&&r>=-.214&&r<-.115?s:i).invert(t)},l.stream=function(t){var e=i.stream(t),n=a.stream(t),r=s.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},l.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),s.precision(t),l):i.precision()},l.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),s.scale(t),l.translate(i.translate())):i.scale()},l.translate=function(t){if(!arguments.length)return i.translate();var o=i.scale(),c=+t[0],h=+t[1];return e=i.translate(t).clipExtent([[c-.455*o,h-.238*o],[c+.455*o,h+.238*o]]).stream(u).point,n=a.translate([c-.307*o,h+.201*o]).clipExtent([[c-.425*o+kt,h+.12*o+kt],[c-.214*o-kt,h+.234*o-kt]]).stream(u).point,r=s.translate([c-.205*o,h+.212*o]).clipExtent([[c-.214*o+kt,h+.166*o+kt],[c-.115*o-kt,h+.234*o-kt]]).stream(u).point,l},l.scale(1070)};var pr,mr,gr,vr,yr,xr,_r={point:z,lineStart:z,lineEnd:z,polygonStart:function(){mr=0,_r.lineStart=br},polygonEnd:function(){_r.lineStart=_r.lineEnd=_r.point=z,pr+=M(mr/2)}};function br(){var t,e,n,r;function i(t,e){mr+=r*t-n*e,n=t,r=e}_r.point=function(o,a){_r.point=i,t=n=o,e=r=a},_r.lineEnd=function(){i(t,e)}}var Mr={point:function(t,e){t<gr&&(gr=t);t>yr&&(yr=t);e<vr&&(vr=e);e>xr&&(xr=e)},lineStart:z,lineEnd:z,polygonStart:z,polygonEnd:z};function wr(){var t=Ar(4.5),e=[],n={point:r,lineStart:function(){n.point=i},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=r},pointRadius:function(e){return t=Ar(e),n},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function r(n,r){e.push("M",n,",",r,t)}function i(t,r){e.push("M",t,",",r),n.point=o}function o(t,n){e.push("L",t,",",n)}function a(){n.point=r}function s(){e.push("Z")}return n}function Ar(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var Tr,Cr={point:Er,lineStart:kr,lineEnd:Sr,polygonStart:function(){Cr.lineStart=Pr},polygonEnd:function(){Cr.point=Er,Cr.lineStart=kr,Cr.lineEnd=Sr}};function Er(t,e){En+=t,kn+=e,++Sn}function kr(){var t,e;function n(n,r){var i=n-t,o=r-e,a=Math.sqrt(i*i+o*o);Pn+=a*(t+n)/2,On+=a*(e+r)/2,Ln+=a,Er(t=n,e=r)}Cr.point=function(r,i){Cr.point=n,Er(t=r,e=i)}}function Sr(){Cr.point=Er}function Pr(){var t,e,n,r;function i(t,e){var i=t-n,o=e-r,a=Math.sqrt(i*i+o*o);Pn+=a*(n+t)/2,On+=a*(r+e)/2,Ln+=a,Rn+=(a=r*t-n*e)*(n+t),In+=a*(r+e),Dn+=3*a,Er(n=t,r=e)}Cr.point=function(o,a){Cr.point=i,Er(t=n=o,e=r=a)},Cr.lineEnd=function(){i(t,e)}}function Or(t){var e=4.5,n={point:r,lineStart:function(){n.point=i},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=r},pointRadius:function(t){return e=t,n},result:z};function r(n,r){t.moveTo(n+e,r),t.arc(n,r,e,0,Ot)}function i(e,r){t.moveTo(e,r),n.point=o}function o(e,n){t.lineTo(e,n)}function a(){n.point=r}function s(){t.closePath()}return n}function Lr(t){var e=.5,n=Math.cos(30*It),r=16;function i(t){return(r?a:o)(t)}function o(e){return Ir(e,(function(n,r){n=t(n,r),e.point(n[0],n[1])}))}function a(e){var n,i,o,a,u,l,c,h,f,d,p,m,g={point:v,lineStart:y,lineEnd:_,polygonStart:function(){e.polygonStart(),g.lineStart=b},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){h=NaN,g.point=x,e.lineStart()}function x(n,i){var o=zn([n,i]),a=t(n,i);s(h,f,c,d,p,m,h=a[0],f=a[1],c=n,d=o[0],p=o[1],m=o[2],r,e),e.point(h,f)}function _(){g.point=v,e.lineEnd()}function b(){y(),g.point=M,g.lineEnd=w}function M(t,e){x(n=t,e),i=h,o=f,a=d,u=p,l=m,g.point=x}function w(){s(h,f,c,d,p,m,i,o,n,a,u,l,r,e),g.lineEnd=_,_()}return g}function s(r,i,o,a,u,l,c,h,f,d,p,m,g,v){var y=c-r,x=h-i,_=y*y+x*x;if(_>4*e&&g--){var b=a+d,w=u+p,A=l+m,T=Math.sqrt(b*b+w*w+A*A),C=Math.asin(A/=T),E=M(M(A)-1)<kt||M(o-f)<kt?(o+f)/2:Math.atan2(w,b),k=t(E,C),S=k[0],P=k[1],O=S-r,L=P-i,R=x*O-y*L;(R*R/_>e||M((y*O+x*L)/_-.5)>.3||a*d+u*p+l*m<n)&&(s(r,i,o,a,u,l,S,P,E,b/=T,w/=T,A,g,v),v.point(S,P),s(S,P,E,b,w,A,c,h,f,d,p,m,g,v))}}return i.precision=function(t){return arguments.length?(r=(e=t*t)>0&&16,i):Math.sqrt(e)},i}function Rr(t){this.stream=t}function Ir(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Dr(t){return Fr((function(){return t}))()}function Fr(t){var e,n,r,i,a,s,u=Lr((function(t,n){return[(t=e(t,n))[0]*l+i,a-t[1]*l]})),l=150,c=480,h=250,f=0,d=0,p=0,m=0,g=0,v=ur,y=D,x=null,_=null;function b(t){return[(t=r(t[0]*It,t[1]*It))[0]*l+i,a-t[1]*l]}function w(t){return(t=r.invert((t[0]-i)/l,(a-t[1])/l))&&[t[0]*Dt,t[1]*Dt]}function A(){r=$n(n=Br(p,m,g),e);var t=e(f,d);return i=c-t[0]*l,a=h+t[1]*l,T()}function T(){return s&&(s.valid=!1,s=null),b}return b.stream=function(t){return s&&(s.valid=!1),(s=Nr(v(n,u(y(t))))).valid=!0,s},b.clipAngle=function(t){return arguments.length?(v=null==t?(x=t,ur):function(t){var e=Math.cos(t),n=e>0,r=M(e)>kt;return ir(i,(function(t){var e,s,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(h,f){var d,p=[h,f],m=i(h,f),g=n?m?0:a(h,f):m?a(h+(h<0?Pt:-Pt),f):0;if(!e&&(l=u=m)&&t.lineStart(),m!==u&&(d=o(e,p),(Hn(e,d)||Hn(p,d))&&(p[0]+=kt,p[1]+=kt,m=i(p[0],p[1]))),m!==u)c=0,m?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(r&&e&&n^m){var v;g&s||!(v=o(p,e,!0))||(c=0,n?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||e&&Hn(e,p)||t.point(p[0],p[1]),e=p,u=m,s=g},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return c|(l&&u)<<1}}}),Ur(t,6*It),n?[0,-t]:[-Pt,t-Pt]);function i(t,n){return Math.cos(t)*Math.cos(n)>e}function o(t,n,r){var i=[1,0,0],o=qn(zn(t),zn(n)),a=Bn(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var l=e*a/u,c=-e*s/u,h=qn(i,o),f=Gn(i,l);Vn(f,Gn(o,c));var d=h,p=Bn(f,d),m=Bn(d,d),g=p*p-m*(Bn(f,f)-1);if(!(g<0)){var v=Math.sqrt(g),y=Gn(d,(-p-v)/m);if(Vn(y,f),y=Wn(y),!r)return y;var x,_=t[0],b=n[0],w=t[1],A=n[1];b<_&&(x=_,_=b,b=x);var T=b-_,C=M(T-Pt)<kt;if(!C&&A<w&&(x=w,w=A,A=x),C||T<kt?C?w+A>0^y[1]<(M(y[0]-_)<kt?w:A):w<=y[1]&&y[1]<=A:T>Pt^(_<=y[0]&&y[0]<=b)){var E=Gn(d,(-p+v)/m);return Vn(E,f),[y,Wn(E)]}}}function a(e,r){var i=n?t:Pt-t,o=0;return e<-i?o|=1:e>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}((x=+t)*It),T()):x},b.clipExtent=function(t){return arguments.length?(_=t,y=t?hr(t[0][0],t[0][1],t[1][0],t[1][1]):D,T()):_},b.scale=function(t){return arguments.length?(l=+t,A()):l},b.translate=function(t){return arguments.length?(c=+t[0],h=+t[1],A()):[c,h]},b.center=function(t){return arguments.length?(f=t[0]%360*It,d=t[1]%360*It,A()):[f*Dt,d*Dt]},b.rotate=function(t){return arguments.length?(p=t[0]%360*It,m=t[1]%360*It,g=t.length>2?t[2]%360*It:0,A()):[p*Dt,m*Dt,g*Dt]},o.rebind(b,u,"precision"),function(){return e=t.apply(this,arguments),b.invert=e.invert&&w,A()}}function Nr(t){return Ir(t,(function(e,n){t.point(e*It,n*It)}))}function jr(t,e){return[t,e]}function zr(t,e){return[t>Pt?t-Ot:t<-Pt?t+Ot:t,e]}function Br(t,e,n){return t?e||n?$n(Vr(t),Gr(e,n)):Vr(t):e||n?Gr(e,n):zr}function qr(t){return function(e,n){return[(e+=t)>Pt?e-Ot:e<-Pt?e+Ot:e,n]}}function Vr(t){var e=qr(t);return e.invert=qr(-t),e}function Gr(t,e){var n=Math.cos(t),r=Math.sin(t),i=Math.cos(e),o=Math.sin(e);function a(t,e){var a=Math.cos(e),s=Math.cos(t)*a,u=Math.sin(t)*a,l=Math.sin(e),c=l*n+s*r;return[Math.atan2(u*i-c*o,s*n-l*r),zt(c*i+u*o)]}return a.invert=function(t,e){var a=Math.cos(e),s=Math.cos(t)*a,u=Math.sin(t)*a,l=Math.sin(e),c=l*i-u*o;return[Math.atan2(u*i+l*o,s*n+c*r),zt(c*n-s*r)]},a}function Ur(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,o,a,s){var u=a*e;null!=i?(i=Wr(n,i),o=Wr(n,o),(a>0?i<o:i>o)&&(i+=a*Ot)):(i=t+a*Ot,o=t-.5*u);for(var l,c=i;a>0?c>o:c<o;c-=u)s.point((l=Wn([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function Wr(t,e){var n=zn(e);n[0]-=t,Un(n);var r=jt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-kt)%(2*Math.PI)}function Hr(t,e,n){var r=o.range(t,e-kt,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Zr(t,e,n){var r=o.range(t,e-kt,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Xr(t){return t.source}function Qr(t){return t.target}o.geo.path=function(){var t,e,n,r,i,a=4.5;function s(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),i&&i.valid||(i=n(r)),o.geo.stream(t,i)),r.result()}function u(){return i=null,s}return s.area=function(t){return pr=0,o.geo.stream(t,n(_r)),pr},s.centroid=function(t){return En=kn=Sn=Pn=On=Ln=Rn=In=Dn=0,o.geo.stream(t,n(Cr)),Dn?[Rn/Dn,In/Dn]:Ln?[Pn/Ln,On/Ln]:Sn?[En/Sn,kn/Sn]:[NaN,NaN]},s.bounds=function(t){return yr=xr=-(gr=vr=1/0),o.geo.stream(t,n(Mr)),[[gr,vr],[yr,xr]]},s.projection=function(e){return arguments.length?(n=(t=e)?e.stream||(r=e,i=Lr((function(t,e){return r([t*Dt,e*Dt])})),function(t){return Nr(i(t))}):D,u()):t;var r,i},s.context=function(t){return arguments.length?(r=null==(e=t)?new wr:new Or(t),"function"!=typeof a&&r.pointRadius(a),u()):e},s.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),s):a},s.projection(o.geo.albersUsa()).context(null)},o.geo.transform=function(t){return{stream:function(e){var n=new Rr(e);for(var r in t)n[r]=t[r];return n}}},Rr.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},o.geo.projection=Dr,o.geo.projectionMutator=Fr,(o.geo.equirectangular=function(){return Dr(jr)}).raw=jr.invert=jr,o.geo.rotation=function(t){function e(e){return(e=t(e[0]*It,e[1]*It))[0]*=Dt,e[1]*=Dt,e}return t=Br(t[0]%360*It,t[1]*It,t.length>2?t[2]*It:0),e.invert=function(e){return(e=t.invert(e[0]*It,e[1]*It))[0]*=Dt,e[1]*=Dt,e},e},zr.invert=jr,o.geo.circle=function(){var t,e,n=[0,0],r=6;function i(){var t="function"==typeof n?n.apply(this,arguments):n,r=Br(-t[0]*It,-t[1]*It,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=r(t,e)),t[0]*=Dt,t[1]*=Dt}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(n=t,i):n},i.angle=function(n){return arguments.length?(e=Ur((t=+n)*It,r*It),i):t},i.precision=function(n){return arguments.length?(e=Ur(t*It,(r=+n)*It),i):r},i.angle(90)},o.geo.distance=function(t,e){var n,r=(e[0]-t[0])*It,i=t[1]*It,o=e[1]*It,a=Math.sin(r),s=Math.cos(r),u=Math.sin(i),l=Math.cos(i),c=Math.sin(o),h=Math.cos(o);return Math.atan2(Math.sqrt((n=h*a)*n+(n=l*c-u*h*s)*n),u*c+l*h*s)},o.geo.graticule=function(){var t,e,n,r,i,a,s,u,l,c,h,f,d=10,p=d,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return o.range(Math.ceil(r/m)*m,n,m).map(h).concat(o.range(Math.ceil(u/g)*g,s,g).map(f)).concat(o.range(Math.ceil(e/d)*d,t,d).filter((function(t){return M(t%m)>kt})).map(l)).concat(o.range(Math.ceil(a/p)*p,i,p).filter((function(t){return M(t%g)>kt})).map(c))}return y.lines=function(){return x().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(f(s).slice(1),h(n).reverse().slice(1),f(u).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],s=+t[1][1],r>n&&(t=r,r=n,n=t),u>s&&(t=u,u=s,s=t),y.precision(v)):[[r,u],[n,s]]},y.minorExtent=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),y.precision(v)):[[e,a],[t,i]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],y):[m,g]},y.minorStep=function(t){return arguments.length?(d=+t[0],p=+t[1],y):[d,p]},y.precision=function(o){return arguments.length?(v=+o,l=Hr(a,i,90),c=Zr(e,t,v),h=Hr(u,s,90),f=Zr(r,n,v),y):v},y.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},o.geo.greatArc=function(){var t,e,n=Xr,r=Qr;function i(){return{type:"LineString",coordinates:[t||n.apply(this,arguments),e||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(t||n.apply(this,arguments),e||r.apply(this,arguments))},i.source=function(e){return arguments.length?(n=e,t="function"==typeof e?null:e,i):n},i.target=function(t){return arguments.length?(r=t,e="function"==typeof t?null:t,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(t,e){return n=t[0]*It,r=t[1]*It,i=e[0]*It,o=e[1]*It,a=Math.cos(r),s=Math.sin(r),u=Math.cos(o),l=Math.sin(o),c=a*Math.cos(n),h=a*Math.sin(n),f=u*Math.cos(i),d=u*Math.sin(i),p=2*Math.asin(Math.sqrt(qt(o-r)+a*u*qt(i-n))),m=1/Math.sin(p),(g=p?function(t){var e=Math.sin(t*=p)*m,n=Math.sin(p-t)*m,r=n*c+e*f,i=n*h+e*d,o=n*s+e*l;return[Math.atan2(i,r)*Dt,Math.atan2(o,Math.sqrt(r*r+i*i))*Dt]}:function(){return[n*Dt,r*Dt]}).distance=p,g;var n,r,i,o,a,s,u,l,c,h,f,d,p,m,g},o.geo.length=function(t){return Tr=0,o.geo.stream(t,Yr),Tr};var Yr={sphere:z,point:z,lineStart:function(){var t,e,n;function r(r,i){var o=Math.sin(i*=It),a=Math.cos(i),s=M((r*=It)-t),u=Math.cos(s);Tr+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=n*o-e*a*u)*s),e*o+n*a*u),t=r,e=o,n=a}Yr.point=function(i,o){t=i*It,e=Math.sin(o*=It),n=Math.cos(o),Yr.point=r},Yr.lineEnd=function(){Yr.point=Yr.lineEnd=z}},lineEnd:z,polygonStart:z,polygonEnd:z};function Kr(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),o=t(r*i);return[o*i*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&n*o/r)]},n}var Jr=Kr((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(o.geo.azimuthalEqualArea=function(){return Dr(Jr)}).raw=Jr;var $r=Kr((function(t){var e=Math.acos(t);return e&&e/Math.sin(e)}),D);function ti(t,e){var n=Math.cos(t),r=function(t){return Math.tan(Pt/4+t/2)},i=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(r(e)/r(t)),o=n*Math.pow(r(t),i)/i;if(!i)return ri;function a(t,e){o>0?e<-Rt+kt&&(e=-Rt+kt):e>Rt-kt&&(e=Rt-kt);var n=o/Math.pow(r(e),i);return[n*Math.sin(i*t),o-n*Math.cos(i*t)]}return a.invert=function(t,e){var n=o-e,r=Ft(i)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/i,2*Math.atan(Math.pow(o/r,1/i))-Rt]},a}function ei(t,e){var n=Math.cos(t),r=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),i=n/r+t;if(M(r)<kt)return jr;function o(t,e){var n=i-e;return[n*Math.sin(r*t),i-n*Math.cos(r*t)]}return o.invert=function(t,e){var n=i-e;return[Math.atan2(t,n)/r,i-Ft(r)*Math.sqrt(t*t+n*n)]},o}(o.geo.azimuthalEquidistant=function(){return Dr($r)}).raw=$r,(o.geo.conicConformal=function(){return fr(ti)}).raw=ti,(o.geo.conicEquidistant=function(){return fr(ei)}).raw=ei;var ni=Kr((function(t){return 1/t}),Math.atan);function ri(t,e){return[t,Math.log(Math.tan(Pt/4+e/2))]}function ii(t){var e,n=Dr(t),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var a=o.apply(n,arguments);if(a===n){if(e=null==t){var s=Pt*r(),u=i();o([[u[0]-s,u[1]-s],[u[0]+s,u[1]+s]])}}else e&&(a=null);return a},n.clipExtent(null)}(o.geo.gnomonic=function(){return Dr(ni)}).raw=ni,ri.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Rt]},(o.geo.mercator=function(){return ii(ri)}).raw=ri;var oi=Kr((function(){return 1}),Math.asin);(o.geo.orthographic=function(){return Dr(oi)}).raw=oi;var ai=Kr((function(t){return 1/(1+t)}),(function(t){return 2*Math.atan(t)}));function si(t,e){return[Math.log(Math.tan(Pt/4+e/2)),-t]}function ui(t){return t[0]}function li(t){return t[1]}function ci(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;i++){for(;r>1&&Nt(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function hi(t,e){return t[0]-e[0]||t[1]-e[1]}(o.geo.stereographic=function(){return Dr(ai)}).raw=ai,si.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Rt]},(o.geo.transverseMercator=function(){var t=ii(si),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90])}).raw=si,o.geom={},o.geom.hull=function(t){var e=ui,n=li;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,i=be(e),o=be(n),a=t.length,s=[],u=[];for(r=0;r<a;r++)s.push([+i.call(this,t[r],r),+o.call(this,t[r],r),r]);for(s.sort(hi),r=0;r<a;r++)u.push([s[r][0],-s[r][1]]);var l=ci(s),c=ci(u),h=c[0]===l[0],f=c[c.length-1]===l[l.length-1],d=[];for(r=l.length-1;r>=0;--r)d.push(t[s[l[r]][2]]);for(r=+h;r<c.length-f;++r)d.push(t[s[c[r]][2]]);return d}return r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r},o.geom.polygon=function(t){return H(t,fi),t};var fi=o.geom.polygon.prototype=[];function di(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function pi(t,e,n,r){var i=t[0],o=n[0],a=e[0]-i,s=r[0]-o,u=t[1],l=n[1],c=e[1]-u,h=r[1]-l,f=(s*(u-l)-h*(i-o))/(h*a-s*c);return[i+f*a,u+f*c]}function mi(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}fi.area=function(){for(var t,e=-1,n=this.length,r=this[n-1],i=0;++e<n;)t=r,r=this[e],i+=t[1]*r[0]-t[0]*r[1];return.5*i},fi.centroid=function(t){var e,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)e=s,s=this[r],n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o*t,a*t]},fi.clip=function(t){for(var e,n,r,i,o,a,s=mi(t),u=-1,l=this.length-mi(this),c=this[l-1];++u<l;){for(e=t.slice(),t.length=0,i=this[u],o=e[(r=e.length-s)-1],n=-1;++n<r;)di(a=e[n],c,i)?(di(o,c,i)||t.push(pi(o,a,c,i)),t.push(a)):di(o,c,i)&&t.push(pi(o,a,c,i)),o=a;s&&t.push(t[0]),c=i}return t};var gi,vi,yi,xi,_i,bi=[],Mi=[];function wi(){Vi(this),this.edge=this.site=this.circle=null}function Ai(t){var e=bi.pop()||new wi;return e.site=t,e}function Ti(t){Ii(t),yi.remove(t),bi.push(t),Vi(t)}function Ci(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},o=t.P,a=t.N,s=[t];Ti(t);for(var u=o;u.circle&&M(n-u.circle.x)<kt&&M(r-u.circle.cy)<kt;)o=u.P,s.unshift(u),Ti(u),u=o;s.unshift(u),Ii(u);for(var l=a;l.circle&&M(n-l.circle.x)<kt&&M(r-l.circle.cy)<kt;)a=l.N,s.push(l),Ti(l),l=a;s.push(l),Ii(l);var c,h=s.length;for(c=1;c<h;++c)l=s[c],u=s[c-1],zi(l.edge,u.site,l.site,i);u=s[0],(l=s[h-1]).edge=Ni(u.site,l.site,null,i),Ri(u),Ri(l)}function Ei(t){for(var e,n,r,i,o=t.x,a=t.y,s=yi._;s;)if((r=ki(s,a)-o)>kt)s=s.L;else{if(!((i=o-Si(s,a))>kt)){r>-kt?(e=s.P,n=s):i>-kt?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}var u=Ai(t);if(yi.insert(e,u),e||n){if(e===n)return Ii(e),n=Ai(e.site),yi.insert(u,n),u.edge=n.edge=Ni(e.site,u.site),Ri(e),void Ri(n);if(n){Ii(e),Ii(n);var l=e.site,c=l.x,h=l.y,f=t.x-c,d=t.y-h,p=n.site,m=p.x-c,g=p.y-h,v=2*(f*g-d*m),y=f*f+d*d,x=m*m+g*g,_={x:(g*y-d*x)/v+c,y:(f*x-m*y)/v+h};zi(n.edge,l,p,_),u.edge=Ni(l,t,null,_),n.edge=Ni(t,p,null,_),Ri(e),Ri(n)}else u.edge=Ni(e.site,u.site)}}function ki(t,e){var n=t.site,r=n.x,i=n.y,o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site).x,u=n.y,l=u-e;if(!l)return s;var c=s-r,h=1/o-1/l,f=c/l;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*l)-u+l/2+i-o/2)))/h+r:(r+s)/2}function Si(t,e){var n=t.N;if(n)return ki(n,e);var r=t.site;return r.y===e?r.x:1/0}function Pi(t){this.site=t,this.edges=[]}function Oi(t,e){return e.angle-t.angle}function Li(){Vi(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ri(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,l=r.y-s,c=o.x-a,h=2*(u*(g=o.y-s)-l*c);if(!(h>=-St)){var f=u*u+l*l,d=c*c+g*g,p=(g*f-l*d)/h,m=(u*d-c*f)/h,g=m+s,v=Mi.pop()||new Li;v.arc=t,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var y=null,x=_i._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}_i.insert(y,v),y||(xi=v)}}}}function Ii(t){var e=t.circle;e&&(e.P||(xi=e.N),_i.remove(e),Mi.push(e),Vi(e),t.circle=null)}function Di(t,e){var n=t.b;if(n)return!0;var r,i,o=t.a,a=e[0][0],s=e[1][0],u=e[0][1],l=e[1][1],c=t.l,h=t.r,f=c.x,d=c.y,p=h.x,m=h.y,g=(f+p)/2,v=(d+m)/2;if(m===d){if(g<a||g>=s)return;if(f>p){if(o){if(o.y>=l)return}else o={x:g,y:u};n={x:g,y:l}}else{if(o){if(o.y<u)return}else o={x:g,y:l};n={x:g,y:u}}}else if(i=v-(r=(f-p)/(m-d))*g,r<-1||r>1)if(f>p){if(o){if(o.y>=l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else{if(o){if(o.y<u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else if(d<m){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return t.a=o,t.b=n,!0}function Fi(t,e){this.l=t,this.r=e,this.a=this.b=null}function Ni(t,e,n,r){var i=new Fi(t,e);return gi.push(i),n&&zi(i,t,e,n),r&&zi(i,e,t,r),vi[t.i].edges.push(new Bi(i,t,e)),vi[e.i].edges.push(new Bi(i,e,t)),i}function ji(t,e,n){var r=new Fi(t,null);return r.a=e,r.b=n,gi.push(r),r}function zi(t,e,n,r){t.a||t.b?t.l===n?t.b=r:t.a=r:(t.a=r,t.l=e,t.r=n)}function Bi(t,e,n){var r=t.a,i=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function qi(){this._=null}function Vi(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Gi(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ui(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Wi(t){for(;t.L;)t=t.L;return t}function Hi(t,e){var n,r,i,o=t.sort(Zi).pop();for(gi=[],vi=new Array(t.length),yi=new qi,_i=new qi;;)if(i=xi,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(vi[o.i]=new Pi(o),Ei(o),n=o.x,r=o.y),o=t.pop();else{if(!i)break;Ci(i.arc)}e&&(function(t){for(var e,n=gi,r=lr(t[0][0],t[0][1],t[1][0],t[1][1]),i=n.length;i--;)(!Di(e=n[i],t)||!r(e)||M(e.a.x-e.b.x)<kt&&M(e.a.y-e.b.y)<kt)&&(e.a=e.b=null,n.splice(i,1))}(e),function(t){for(var e,n,r,i,o,a,s,u,l,c,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],m=vi,g=m.length;g--;)if((o=m[g])&&o.prepare())for(u=(s=o.edges).length,a=0;a<u;)r=(c=s[a].end()).x,i=c.y,e=(l=s[++a%u].start()).x,n=l.y,(M(r-e)>kt||M(i-n)>kt)&&(s.splice(a,0,new Bi(ji(o.site,c,M(r-h)<kt&&p-i>kt?{x:h,y:M(e-h)<kt?n:p}:M(i-p)<kt&&f-r>kt?{x:M(n-p)<kt?e:f,y:p}:M(r-f)<kt&&i-d>kt?{x:f,y:M(e-f)<kt?n:d}:M(i-d)<kt&&r-h>kt?{x:M(n-d)<kt?e:h,y:d}:null),o.site,null)),++u)}(e));var a={cells:vi,edges:gi};return yi=_i=gi=vi=null,a}function Zi(t,e){return e.y-t.y||e.x-t.x}Pi.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)(t=e[n].edge).b&&t.a||e.splice(n,1);return e.sort(Oi),e.length},Bi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},qi.prototype={insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Wi(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Gi(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ui(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ui(this,n),n=(t=n).U),n.C=!1,r.C=!0,Gi(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?Wi(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Gi(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ui(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Gi(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ui(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Gi(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ui(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},o.geom.voronoi=function(t){var e=ui,n=li,r=e,i=n,o=Xi;if(t)return a(t);function a(t){var e=new Array(t.length),n=o[0][0],r=o[0][1],i=o[1][0],a=o[1][1];return Hi(s(t),o).cells.forEach((function(o,s){var u=o.edges,l=o.site;(e[s]=u.length?u.map((function(t){var e=t.start();return[e.x,e.y]})):l.x>=n&&l.x<=i&&l.y>=r&&l.y<=a?[[n,a],[i,a],[i,r],[n,r]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(r(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}}))}return a.links=function(t){return Hi(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},a.triangles=function(t){var e=[];return Hi(s(t)).cells.forEach((function(n,r){for(var i,o,a,s,u=n.site,l=n.edges.sort(Oi),c=-1,h=l.length,f=l[h-1].edge,d=f.l===u?f.r:f.l;++c<h;)f,i=d,d=(f=l[c].edge).l===u?f.r:f.l,r<i.i&&r<d.i&&(a=i,s=d,((o=u).x-s.x)*(a.y-o.y)-(o.x-a.x)*(s.y-o.y)<0)&&e.push([t[r],t[i.i],t[d.i]])})),e},a.x=function(t){return arguments.length?(r=be(e=t),a):e},a.y=function(t){return arguments.length?(i=be(n=t),a):n},a.clipExtent=function(t){return arguments.length?(o=null==t?Xi:t,a):o===Xi?null:o},a.size=function(t){return arguments.length?a.clipExtent(t&&[[0,0],t]):o===Xi?null:o&&o[1]},a};var Xi=[[-1e6,-1e6],[1e6,1e6]];function Qi(t){return t.x}function Yi(t){return t.y}function Ki(t,e,n,r,i,o){if(!t(e,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),u=e.nodes;u[0]&&Ki(t,u[0],n,r,a,s),u[1]&&Ki(t,u[1],a,r,i,s),u[2]&&Ki(t,u[2],n,s,a,o),u[3]&&Ki(t,u[3],a,s,i,o)}}function Ji(t,e){t=o.rgb(t),e=o.rgb(e);var n=t.r,r=t.g,i=t.b,a=e.r-n,s=e.g-r,u=e.b-i;return function(t){return"#"+pe(Math.round(n+a*t))+pe(Math.round(r+s*t))+pe(Math.round(i+u*t))}}function $i(t,e){var n,r={},i={};for(n in t)n in e?r[n]=io(t[n],e[n]):i[n]=t[n];for(n in e)n in t||(i[n]=e[n]);return function(t){for(n in r)i[n]=r[n](t);return i}}function to(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function eo(t,e){var n,r,i,o=no.lastIndex=ro.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=no.exec(t))&&(r=ro.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:to(n,r)})),o=ro.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?(e=u[0].x,function(t){return e(t)+""}):function(){return e}:(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}o.geom.delaunay=function(t){return o.geom.voronoi().triangles(t)},o.geom.quadtree=function(t,e,n,r,i){var o,a=ui,s=li;if(o=arguments.length)return a=Qi,s=Yi,3===o&&(i=n,r=e,n=e=0),u(t);function u(t){var u,l,c,h,f,d,p,m,g,v=be(a),y=be(s);if(null!=e)d=e,p=n,m=r,g=i;else if(m=g=-(d=p=1/0),l=[],c=[],f=t.length,o)for(h=0;h<f;++h)(u=t[h]).x<d&&(d=u.x),u.y<p&&(p=u.y),u.x>m&&(m=u.x),u.y>g&&(g=u.y),l.push(u.x),c.push(u.y);else for(h=0;h<f;++h){var x=+v(u=t[h],h),_=+y(u,h);x<d&&(d=x),_<p&&(p=_),x>m&&(m=x),_>g&&(g=_),l.push(x),c.push(_)}var b=m-d,w=g-p;function A(t,e,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(t.leaf){var u=t.x,l=t.y;if(null!=u)if(M(u-n)+M(l-r)<.01)T(t,e,n,r,i,o,a,s);else{var c=t.point;t.x=t.y=t.point=null,T(t,c,u,l,i,o,a,s),T(t,e,n,r,i,o,a,s)}else t.x=n,t.y=r,t.point=e}else T(t,e,n,r,i,o,a,s)}function T(t,e,n,r,i,o,a,s){var u=.5*(i+a),l=.5*(o+s),c=n>=u,h=r>=l,f=h<<1|c;t.leaf=!1,c?i=u:a=u,h?o=l:s=l,A(t=t.nodes[f]||(t.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,n,r,i,o,a,s)}b>w?g=p+b:m=d+w;var C={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){A(C,t,+v(t,++h),+y(t,h),d,p,m,g)}};if(C.visit=function(t){Ki(t,C,d,p,m,g)},C.find=function(t){return function(t,e,n,r,i,o,a){var s,u=1/0;return function t(l,c,h,f,d){if(!(c>o||h>a||f<r||d<i)){if(p=l.point){var p,m=e-l.x,g=n-l.y,v=m*m+g*g;if(v<u){var y=Math.sqrt(u=v);r=e-y,i=n-y,o=e+y,a=n+y,s=p}}for(var x=l.nodes,_=.5*(c+f),b=.5*(h+d),M=(n>=b)<<1|e>=_,w=M+4;M<w;++M)if(l=x[3&M])switch(3&M){case 0:t(l,c,h,_,b);break;case 1:t(l,_,h,f,b);break;case 2:t(l,c,b,_,d);break;case 3:t(l,_,b,f,d)}}}(t,r,i,o,a),s}(C,t[0],t[1],d,p,m,g)},h=-1,null==e){for(;++h<f;)A(C,t[h],l[h],c[h],d,p,m,g);--h}else t.forEach(C.add);return l=c=t=u=null,C}return u.x=function(t){return arguments.length?(a=t,u):a},u.y=function(t){return arguments.length?(s=t,u):s},u.extent=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),u):null==e?null:[[e,n],[r,i]]},u.size=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=n=0,r=+t[0],i=+t[1]),u):null==e?null:[r-e,i-n]},u},o.interpolateRgb=Ji,o.interpolateObject=$i,o.interpolateNumber=to,o.interpolateString=eo;var no=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ro=new RegExp(no.source,"g");function io(t,e){for(var n,r=o.interpolators.length;--r>=0&&!(n=o.interpolators[r](t,e)););return n}function oo(t,e){var n,r=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(n=0;n<s;++n)r.push(io(t[n],e[n]));for(;n<o;++n)i[n]=t[n];for(;n<a;++n)i[n]=e[n];return function(t){for(n=0;n<s;++n)i[n]=r[n](t);return i}}o.interpolate=io,o.interpolators=[function(t,e){var n=typeof e;return("string"===n?_e.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?Ji:eo:e instanceof Ht?Ji:Array.isArray(e)?oo:"object"===n&&isNaN(e)?$i:to)(t,e)}],o.interpolateArray=oo;var ao=function(){return D},so=o.map({linear:ao,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return ho},cubic:function(){return fo},sin:function(){return mo},exp:function(){return go},circle:function(){return vo},elastic:function(t,e){var n;arguments.length<2&&(e=.45);arguments.length?n=e/Ot*Math.asin(1/t):(t=1,n=e/4);return function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Ot/e)}},back:function(t){t||(t=1.70158);return function(e){return e*e*((t+1)*e-t)}},bounce:function(){return yo}}),uo=o.map({in:D,out:lo,"in-out":co,"out-in":function(t){return co(lo(t))}});function lo(t){return function(e){return 1-t(1-e)}}function co(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function ho(t){return t*t}function fo(t){return t*t*t}function po(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function mo(t){return 1-Math.cos(t*Rt)}function go(t){return Math.pow(2,10*(t-1))}function vo(t){return 1-Math.sqrt(1-t*t)}function yo(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function xo(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function _o(t){var e,n,r,i=[t.a,t.b],o=[t.c,t.d],a=Mo(i),s=bo(i,o),u=Mo(((e=o)[0]+=(r=-s)*(n=i)[0],e[1]+=r*n[1],e))||0;i[0]*o[1]<o[0]*i[1]&&(i[0]*=-1,i[1]*=-1,a*=-1,s*=-1),this.rotate=(a?Math.atan2(i[1],i[0]):Math.atan2(-o[0],o[1]))*Dt,this.translate=[t.e,t.f],this.scale=[a,u],this.skew=u?Math.atan2(s,u)*Dt:0}function bo(t,e){return t[0]*e[0]+t[1]*e[1]}function Mo(t){var e=Math.sqrt(bo(t,t));return e&&(t[0]/=e,t[1]/=e),e}o.ease=function(t){var e,n=t.indexOf("-"),r=n>=0?t.slice(0,n):t,i=n>=0?t.slice(n+1):"in";return r=so.get(r)||ao,i=uo.get(i)||D,e=i(r.apply(null,a.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},o.interpolateHcl=function(t,e){t=o.hcl(t),e=o.hcl(e);var n=t.h,r=t.c,i=t.l,a=e.h-n,s=e.c-r,u=e.l-i;isNaN(s)&&(s=0,r=isNaN(r)?e.c:r);isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:a<-180&&(a+=360);return function(t){return Jt(n+a*t,r+s*t,i+u*t)+""}},o.interpolateHsl=function(t,e){t=o.hsl(t),e=o.hsl(e);var n=t.h,r=t.s,i=t.l,a=e.h-n,s=e.s-r,u=e.l-i;isNaN(s)&&(s=0,r=isNaN(r)?e.s:r);isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:a<-180&&(a+=360);return function(t){return Qt(n+a*t,r+s*t,i+u*t)+""}},o.interpolateLab=function(t,e){t=o.lab(t),e=o.lab(e);var n=t.l,r=t.a,i=t.b,a=e.l-n,s=e.a-r,u=e.b-i;return function(t){return oe(n+a*t,r+s*t,i+u*t)+""}},o.interpolateRound=xo,o.transform=function(t){var e=u.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new _o(n?n.matrix:wo)})(t)},_o.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var wo={a:1,b:0,c:0,d:1,e:0,f:0};function Ao(t){return t.length?t.pop()+",":""}function To(t,e){var n=[],r=[];return t=o.transform(t),e=o.transform(e),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:to(t[0],e[0])},{i:i-2,x:to(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(t.translate,e.translate,n,r),function(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(Ao(n)+"rotate(",null,")")-2,x:to(t,e)})):e&&n.push(Ao(n)+"rotate("+e+")")}(t.rotate,e.rotate,n,r),function(t,e,n,r){t!==e?r.push({i:n.push(Ao(n)+"skewX(",null,")")-2,x:to(t,e)}):e&&n.push(Ao(n)+"skewX("+e+")")}(t.skew,e.skew,n,r),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push(Ao(n)+"scale(",null,",",null,")");r.push({i:i-4,x:to(t[0],e[0])},{i:i-2,x:to(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(Ao(n)+"scale("+e+")")}(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,i=-1,o=r.length;++i<o;)n[(e=r[i]).i]=e.x(t);return n.join("")}}function Co(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function Eo(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function ko(t){for(var e=t.source,n=t.target,r=function(t,e){if(t===e)return t;var n=So(t),r=So(e),i=n.pop(),o=r.pop(),a=null;for(;i===o;)a=i,i=n.pop(),o=r.pop();return a}(e,n),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function So(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function Po(t){t.fixed|=2}function Oo(t){t.fixed&=-7}function Lo(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Ro(t){t.fixed&=-5}function Io(t,e,n){var r=0,i=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,s=a.length,u=-1;++u<s;)null!=(o=a[u])&&(Io(o,e,n),t.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=e*n[t.point.index];t.charge+=t.pointCharge=l,r+=l*t.point.x,i+=l*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}o.interpolateTransform=To,o.layout={},o.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n<r;)e.push(ko(t[n]));return e}},o.layout.chord=function(){var t,e,n,r,i,a,s,u={},l=0;function c(){var u,c,f,d,p,m={},g=[],v=o.range(r),y=[];for(t=[],e=[],u=0,d=-1;++d<r;){for(c=0,p=-1;++p<r;)c+=n[d][p];g.push(c),y.push(o.range(r)),u+=c}for(i&&v.sort((function(t,e){return i(g[t],g[e])})),a&&y.forEach((function(t,e){t.sort((function(t,r){return a(n[e][t],n[e][r])}))})),u=(Ot-l*r)/u,c=0,d=-1;++d<r;){for(f=c,p=-1;++p<r;){var x=v[d],_=y[x][p],b=n[x][_],M=c,w=c+=b*u;m[x+"-"+_]={index:x,subindex:_,startAngle:M,endAngle:w,value:b}}e[x]={index:x,startAngle:f,endAngle:c,value:g[x]},c+=l}for(d=-1;++d<r;)for(p=d-1;++p<r;){var A=m[d+"-"+p],T=m[p+"-"+d];(A.value||T.value)&&t.push(A.value<T.value?{source:T,target:A}:{source:A,target:T})}s&&h()}function h(){t.sort((function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)}))}return u.matrix=function(i){return arguments.length?(r=(n=i)&&n.length,t=e=null,u):n},u.padding=function(n){return arguments.length?(l=n,t=e=null,u):l},u.sortGroups=function(n){return arguments.length?(i=n,t=e=null,u):i},u.sortSubgroups=function(e){return arguments.length?(a=e,t=null,u):a},u.sortChords=function(e){return arguments.length?(s=e,t&&h(),u):s},u.chords=function(){return t||c(),t},u.groups=function(){return e||c(),e},u},o.layout.force=function(){var t,e,n,r,i,a,s={},u=o.dispatch("start","tick","end"),l=[1,1],c=.9,h=Do,f=Fo,d=-30,p=No,m=.1,g=.64,v=[],y=[];function x(t){return function(e,n,r,i){if(e.point!==t){var o=e.cx-t.x,a=e.cy-t.y,s=i-n,u=o*o+a*a;if(s*s/g<u){if(u<p){var l=e.charge/u;t.px-=o*l,t.py-=a*l}return!0}if(e.point&&u&&u<p){l=e.pointCharge/u;t.px-=o*l,t.py-=a*l}}return!e.charge}}function _(t){t.px=o.event.x,t.py=o.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return t=null,u.end({type:"end",alpha:n=0}),!0;var e,s,h,f,p,g,_,b,M,w=v.length,A=y.length;for(s=0;s<A;++s)f=(h=y[s]).source,(g=(b=(p=h.target).x-f.x)*b+(M=p.y-f.y)*M)&&(b*=g=n*i[s]*((g=Math.sqrt(g))-r[s])/g,M*=g,p.x-=b*(_=f.weight+p.weight?f.weight/(f.weight+p.weight):.5),p.y-=M*_,f.x+=b*(_=1-_),f.y+=M*_);if((_=n*m)&&(b=l[0]/2,M=l[1]/2,s=-1,_))for(;++s<w;)(h=v[s]).x+=(b-h.x)*_,h.y+=(M-h.y)*_;if(d)for(Io(e=o.geom.quadtree(v),n,a),s=-1;++s<w;)(h=v[s]).fixed||e.visit(x(h));for(s=-1;++s<w;)(h=v[s]).fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*c,h.y-=(h.py-(h.py=h.y))*c);u.tick({type:"tick",alpha:n})},s.nodes=function(t){return arguments.length?(v=t,s):v},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(l=t,s):l},s.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(f="function"==typeof t?t:+t,s):f},s.friction=function(t){return arguments.length?(c=+t,s):c},s.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,s):d},s.chargeDistance=function(t){return arguments.length?(p=t*t,s):Math.sqrt(p)},s.gravity=function(t){return arguments.length?(m=+t,s):m},s.theta=function(t){return arguments.length?(g=t*t,s):Math.sqrt(g)},s.alpha=function(e){return arguments.length?(e=+e,n?e>0?n=e:(t.c=null,t.t=NaN,t=null,u.end({type:"end",alpha:n=0})):e>0&&(u.start({type:"start",alpha:n=e}),t=Se(s.tick)),s):n},s.start=function(){var t,e,n,o=v.length,u=y.length,c=l[0],p=l[1];for(t=0;t<o;++t)(n=v[t]).index=t,n.weight=0;for(t=0;t<u;++t)"number"==typeof(n=y[t]).source&&(n.source=v[n.source]),"number"==typeof n.target&&(n.target=v[n.target]),++n.source.weight,++n.target.weight;for(t=0;t<o;++t)n=v[t],isNaN(n.x)&&(n.x=m("x",c)),isNaN(n.y)&&(n.y=m("y",p)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof h)for(t=0;t<u;++t)r[t]=+h.call(this,y[t],t);else for(t=0;t<u;++t)r[t]=h;if(i=[],"function"==typeof f)for(t=0;t<u;++t)i[t]=+f.call(this,y[t],t);else for(t=0;t<u;++t)i[t]=f;if(a=[],"function"==typeof d)for(t=0;t<o;++t)a[t]=+d.call(this,v[t],t);else for(t=0;t<o;++t)a[t]=d;function m(n,r){if(!e){for(e=new Array(o),l=0;l<o;++l)e[l]=[];for(l=0;l<u;++l){var i=y[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,s=e[t],l=-1,c=s.length;++l<c;)if(!isNaN(a=s[l][n]))return a;return Math.random()*r}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(e||(e=o.behavior.drag().origin(D).on("dragstart.force",Po).on("drag.force",_).on("dragend.force",Oo)),!arguments.length)return e;this.on("mouseover.force",Lo).on("mouseout.force",Ro).call(e)},o.rebind(s,u,"on")};var Do=20,Fo=1,No=1/0;function jo(t,e){return o.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=Uo,t}function zo(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function Bo(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(t=r.pop());)e(t)}function qo(t){return t.children}function Vo(t){return t.value}function Go(t,e){return e.value-t.value}function Uo(t){return o.merge(t.map((function(t){return(t.children||[]).map((function(e){return{source:t,target:e}}))})))}o.layout.hierarchy=function(){var t=Go,e=qo,n=Vo;function r(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(l=e.call(r,o,o.depth))&&(u=l.length)){for(var u,l,c;--u>=0;)a.push(c=l[u]),c.parent=o,c.depth=o.depth+1;n&&(o.value=0),o.children=l}else n&&(o.value=+n.call(r,o,o.depth)||0),delete o.children;return Bo(i,(function(e){var r,i;t&&(r=e.children)&&r.sort(t),n&&(i=e.parent)&&(i.value+=e.value)})),s}return r.sort=function(e){return arguments.length?(t=e,r):t},r.children=function(t){return arguments.length?(e=t,r):e},r.value=function(t){return arguments.length?(n=t,r):n},r.revalue=function(t){return n&&(zo(t,(function(t){t.children&&(t.value=0)})),Bo(t,(function(t){var e;t.children||(t.value=+n.call(r,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},r},o.layout.partition=function(){var t=o.layout.hierarchy(),e=[1,1];function n(t,e,r,i){var o=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,u,l=-1;for(r=t.value?r/t.value:0;++l<a;)n(s=o[l],e,u=s.value*r,i),e+=u}}function r(t){var e=t.children,n=0;if(e&&(i=e.length))for(var i,o=-1;++o<i;)n=Math.max(n,r(e[o]));return 1+n}function i(i,o){var a=t.call(this,i,o);return n(a[0],0,e[0],e[1]/r(a[0])),a}return i.size=function(t){return arguments.length?(e=t,i):e},jo(i,t)},o.layout.pie=function(){var t=Number,e=Wo,n=0,r=Ot,i=0;function a(s){var u,l=s.length,c=s.map((function(e,n){return+t.call(a,e,n)})),h=+("function"==typeof n?n.apply(this,arguments):n),f=("function"==typeof r?r.apply(this,arguments):r)-h,d=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),p=d*(f<0?-1:1),m=o.sum(c),g=m?(f-l*p)/m:0,v=o.range(l),y=[];return null!=e&&v.sort(e===Wo?function(t,e){return c[e]-c[t]}:function(t,n){return e(s[t],s[n])}),v.forEach((function(t){y[t]={data:s[t],value:u=c[t],startAngle:h,endAngle:h+=u*g+p,padAngle:d}})),y}return a.value=function(e){return arguments.length?(t=e,a):t},a.sort=function(t){return arguments.length?(e=t,a):e},a.startAngle=function(t){return arguments.length?(n=t,a):n},a.endAngle=function(t){return arguments.length?(r=t,a):r},a.padAngle=function(t){return arguments.length?(i=t,a):i},a};var Wo={};function Ho(t){return t.x}function Zo(t){return t.y}function Xo(t,e,n){t.y0=e,t.y=n}o.layout.stack=function(){var t=D,e=Ko,n=Jo,r=Xo,i=Ho,a=Zo;function s(u,l){if(!(d=u.length))return u;var c=u.map((function(e,n){return t.call(s,e,n)})),h=c.map((function(t){return t.map((function(t,e){return[i.call(s,t,e),a.call(s,t,e)]}))})),f=e.call(s,h,l);c=o.permute(c,f),h=o.permute(h,f);var d,p,m,g,v=n.call(s,h,l),y=c[0].length;for(m=0;m<y;++m)for(r.call(s,c[0][m],g=v[m],h[0][m][1]),p=1;p<d;++p)r.call(s,c[p][m],g+=h[p-1][m][1],h[p][m][1]);return u}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(t){return arguments.length?(e="function"==typeof t?t:Qo.get(t)||Ko,s):e},s.offset=function(t){return arguments.length?(n="function"==typeof t?t:Yo.get(t)||Jo,s):n},s.x=function(t){return arguments.length?(i=t,s):i},s.y=function(t){return arguments.length?(a=t,s):a},s.out=function(t){return arguments.length?(r=t,s):r},s};var Qo=o.map({"inside-out":function(t){var e,n,r=t.length,i=t.map($o),a=t.map(ta),s=o.range(r).sort((function(t,e){return i[t]-i[e]})),u=0,l=0,c=[],h=[];for(e=0;e<r;++e)n=s[e],u<l?(u+=a[n],c.push(n)):(l+=a[n],h.push(n));return h.reverse().concat(c)},reverse:function(t){return o.range(t.length).reverse()},default:Ko}),Yo=o.map({silhouette:function(t){var e,n,r,i=t.length,o=t[0].length,a=[],s=0,u=[];for(n=0;n<o;++n){for(e=0,r=0;e<i;e++)r+=t[e][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)u[n]=(s-a[n])/2;return u},wiggle:function(t){var e,n,r,i,o,a,s,u,l,c=t.length,h=t[0],f=h.length,d=[];for(d[0]=u=l=0,n=1;n<f;++n){for(e=0,i=0;e<c;++e)i+=t[e][n][1];for(e=0,o=0,s=h[n][0]-h[n-1][0];e<c;++e){for(r=0,a=(t[e][n][1]-t[e][n-1][1])/(2*s);r<e;++r)a+=(t[r][n][1]-t[r][n-1][1])/s;o+=a*t[e][n][1]}d[n]=u-=i?o/i*s:0,u<l&&(l=u)}for(n=0;n<f;++n)d[n]-=l;return d},expand:function(t){var e,n,r,i=t.length,o=t[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(e=0,r=0;e<i;e++)r+=t[e][n][1];if(r)for(e=0;e<i;e++)t[e][n][1]/=r;else for(e=0;e<i;e++)t[e][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:Jo});function Ko(t){return o.range(t.length)}function Jo(t){for(var e=-1,n=t[0].length,r=[];++e<n;)r[e]=0;return r}function $o(t){for(var e,n=1,r=0,i=t[0][1],o=t.length;n<o;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function ta(t){return t.reduce(ea,0)}function ea(t,e){return t+e[1]}function na(t,e){return ra(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function ra(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,o=[];++n<=e;)o[n]=i*n+r;return o}function ia(t){return[o.min(t),o.max(t)]}function oa(t,e){return t.value-e.value}function aa(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function sa(t,e){t._pack_next=e,e._pack_prev=t}function ua(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function la(t){if((e=t.children)&&(u=e.length)){var e,n,r,i,o,a,s,u,l=1/0,c=-1/0,h=1/0,f=-1/0;if(e.forEach(ca),(n=e[0]).x=-n.r,n.y=0,x(n),u>1&&((r=e[1]).x=r.r,r.y=0,x(r),u>2))for(da(n,r,i=e[2]),x(i),aa(n,i),n._pack_prev=i,aa(i,r),r=n._pack_next,o=3;o<u;o++){da(n,r,i=e[o]);var d=0,p=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,p++)if(ua(a,i)){d=1;break}if(1==d)for(s=n._pack_prev;s!==a._pack_prev&&!ua(s,i);s=s._pack_prev,m++);d?(p<m||p==m&&r.r<n.r?sa(n,r=a):sa(n=s,r),o--):(aa(n,i),r=i,x(i))}var g=(l+c)/2,v=(h+f)/2,y=0;for(o=0;o<u;o++)(i=e[o]).x-=g,i.y-=v,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(ha)}function x(t){l=Math.min(t.x-t.r,l),c=Math.max(t.x+t.r,c),h=Math.min(t.y-t.r,h),f=Math.max(t.y+t.r,f)}}function ca(t){t._pack_next=t._pack_prev=t}function ha(t){delete t._pack_next,delete t._pack_prev}function fa(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o<a;)fa(i[o],e,n,r)}function da(t,e,n){var r=t.r+n.r,i=e.x-t.x,o=e.y-t.y;if(r&&(i||o)){var a=e.r+n.r,s=i*i+o*o,u=.5+((r*=r)-(a*=a))/(2*s),l=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=t.x+u*i+l*o,n.y=t.y+u*o-l*i}else n.x=t.x+r,n.y=t.y}function pa(t,e){return t.parent==e.parent?1:2}function ma(t){var e=t.children;return e.length?e[0]:t.t}function ga(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function va(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function ya(t,e,n){return t.a.parent===e.parent?t.a:n}function xa(t){var e=t.children;return e&&e.length?xa(e[0]):t}function _a(t){var e,n=t.children;return n&&(e=n.length)?_a(n[e-1]):t}function ba(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ma(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function wa(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}function Aa(t){return t.rangeExtent?t.rangeExtent():wa(t.range())}function Ta(t,e,n,r){var i=n(t[0],t[1]),o=r(e[0],e[1]);return function(t){return o(i(t))}}function Ca(t,e){var n,r=0,i=t.length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Ea(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:ka}o.layout.histogram=function(){var t=!0,e=Number,n=ia,r=na;function i(i,a){for(var s,u,l=[],c=i.map(e,this),h=n.call(this,c,a),f=r.call(this,h,c,a),d=(a=-1,c.length),p=f.length-1,m=t?1:1/d;++a<p;)(s=l[a]=[]).dx=f[a+1]-(s.x=f[a]),s.y=0;if(p>0)for(a=-1;++a<d;)(u=c[a])>=h[0]&&u<=h[1]&&((s=l[o.bisect(f,u,1,p)-1]).y+=m,s.push(i[a]));return l}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(n=be(t),i):n},i.bins=function(t){return arguments.length?(r="number"==typeof t?function(e){return ra(e,t)}:be(t),i):r},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},o.layout.pack=function(){var t,e=o.layout.hierarchy().sort(oa),n=0,r=[1,1];function i(i,o){var a=e.call(this,i,o),s=a[0],u=r[0],l=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,Bo(s,(function(t){t.r=+c(t.value)})),Bo(s,la),n){var h=n*(t?1:Math.max(2*s.r/u,2*s.r/l))/2;Bo(s,(function(t){t.r+=h})),Bo(s,la),Bo(s,(function(t){t.r-=h}))}return fa(s,u/2,l/2,t?1:1/Math.max(2*s.r/u,2*s.r/l)),a}return i.size=function(t){return arguments.length?(r=t,i):r},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(n=+t,i):n},jo(i,e)},o.layout.tree=function(){var t=o.layout.hierarchy().sort(null).value(null),e=pa,n=[1,1],r=null;function i(i,o){var l=t.call(this,i,o),c=l[0],h=function(t){var e,n={A:null,children:[t]},r=[n];for(;null!=(e=r.pop());)for(var i,o=e.children,a=0,s=o.length;a<s;++a)r.push((o[a]=i={_:o[a],parent:e,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}(c);if(Bo(h,a),h.parent.m=-h.z,zo(h,s),r)zo(c,u);else{var f=c,d=c,p=c;zo(c,(function(t){t.x<f.x&&(f=t),t.x>d.x&&(d=t),t.depth>p.depth&&(p=t)}));var m=e(f,d)/2-f.x,g=n[0]/(d.x+e(d,f)/2+m),v=n[1]/(p.depth||1);zo(c,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return l}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n.length){!function(t){var e,n=0,r=0,i=t.children,o=i.length;for(;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o=t,a=t,s=n,u=o.parent.children[0],l=o.m,c=a.m,h=s.m,f=u.m;s=ga(s),o=ma(o),s&&o;)u=ma(u),(a=ga(a)).a=t,(i=s.z+h-o.z-l+e(s._,o._))>0&&(va(ya(s,t,r),t,i),l+=i,c+=i),h+=s.m,l+=o.m,f+=u.m,c+=a.m;s&&!ga(a)&&(a.t=s,a.m+=h-c),o&&!ma(u)&&(u.t=o,u.m+=l-f,r=t)}return r}(t,i,t.parent.A||r[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n[0],t.y=t.depth*n[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(r=null==(n=t)?u:null,i):r?null:n},i.nodeSize=function(t){return arguments.length?(r=null==(n=t)?null:u,i):r?n:null},jo(i,t)},o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),e=pa,n=[1,1],r=!1;function i(i,a){var s,u=t.call(this,i,a),l=u[0],c=0;Bo(l,(function(t){var n=t.children;n&&n.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(n),t.y=function(t){return 1+o.max(t,(function(t){return t.y}))}(n)):(t.x=s?c+=e(t,s):0,t.y=0,s=t)}));var h=xa(l),f=_a(l),d=h.x-e(h,f)/2,p=f.x+e(f,h)/2;return Bo(l,r?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-d)/(p-d)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),u}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(r=null==(n=t),i):r?null:n},i.nodeSize=function(t){return arguments.length?(r=null!=(n=t),i):r?n:null},jo(i,t)},o.layout.treemap=function(){var t,e=o.layout.hierarchy(),n=Math.round,r=[1,1],i=null,a=ba,s=!1,u="squarify",l=.5*(1+Math.sqrt(5));function c(t,e){for(var n,r,i=-1,o=t.length;++i<o;)r=(n=t[i]).value*(e<0?0:e),n.area=isNaN(r)||r<=0?0:r}function h(t){var e=t.children;if(e&&e.length){var n,r,i,o=a(t),s=[],l=e.slice(),f=1/0,m="slice"===u?o.dx:"dice"===u?o.dy:"slice-dice"===u?1&t.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(c(l,o.dx*o.dy/t.value),s.area=0;(i=l.length)>0;)s.push(n=l[i-1]),s.area+=n.area,"squarify"!==u||(r=d(s,m))<=f?(l.pop(),f=r):(s.area-=s.pop().area,p(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,f=1/0);s.length&&(p(s,m,o,!0),s.length=s.area=0),e.forEach(h)}}function f(t){var e=t.children;if(e&&e.length){var n,r=a(t),i=e.slice(),o=[];for(c(i,r.dx*r.dy/t.value),o.area=0;n=i.pop();)o.push(n),o.area+=n.area,null!=n.z&&(p(o,n.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);e.forEach(f)}}function d(t,e){for(var n,r=t.area,i=0,o=1/0,a=-1,s=t.length;++a<s;)(n=t[a].area)&&(n<o&&(o=n),n>i&&(i=n));return e*=e,(r*=r)?Math.max(e*i*l/r,r/(e*o*l)):1/0}function p(t,e,r,i){var o,a=-1,s=t.length,u=r.x,l=r.y,c=e?n(t.area/e):0;if(e==r.dx){for((i||c>r.dy)&&(c=r.dy);++a<s;)(o=t[a]).x=u,o.y=l,o.dy=c,u+=o.dx=Math.min(r.x+r.dx-u,c?n(o.area/c):0);o.z=!0,o.dx+=r.x+r.dx-u,r.y+=c,r.dy-=c}else{for((i||c>r.dx)&&(c=r.dx);++a<s;)(o=t[a]).x=u,o.y=l,o.dx=c,l+=o.dy=Math.min(r.y+r.dy-l,c?n(o.area/c):0);o.z=!1,o.dy+=r.y+r.dy-l,r.x+=c,r.dx-=c}}function m(n){var i=t||e(n),o=i[0];return o.x=o.y=0,o.value?(o.dx=r[0],o.dy=r[1]):o.dx=o.dy=0,t&&e.revalue(o),c([o],o.dx*o.dy/o.value),(t?f:h)(o),s&&(t=i),i}return m.size=function(t){return arguments.length?(r=t,m):r},m.padding=function(t){if(!arguments.length)return i;function e(e){return Ma(e,t)}var n;return a=null==(i=t)?ba:"function"==(n=typeof t)?function(e){var n=t.call(m,e,e.depth);return null==n?ba(e):Ma(e,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(t=[t,t,t,t],e):e,m},m.round=function(t){return arguments.length?(n=t?Math.round:Number,m):n!=Number},m.sticky=function(e){return arguments.length?(s=e,t=null,m):s},m.ratio=function(t){return arguments.length?(l=t,m):l},m.mode=function(t){return arguments.length?(u=t+"",m):u},jo(m,e)},o.random={normal:function(t,e){var n=arguments.length;return n<2&&(e=1),n<1&&(t=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=o.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;n<t;n++)e+=Math.random();return e}}},o.scale={};var ka={floor:D,ceil:D};function Sa(t,e,n,r){var i=[],a=[],s=0,u=Math.min(t.length,e.length)-1;for(t[u]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=u;)i.push(n(t[s-1],t[s])),a.push(r(e[s-1],e[s]));return function(e){var n=o.bisect(t,e,1,u)-1;return a[n](i[n](e))}}function Pa(t,e,n,r){var i,o;function a(){var a=Math.min(t.length,e.length)>2?Sa:Ta,u=r?Eo:Co;return i=a(t,e,u,n),o=a(e,t,u,io),s}function s(t){return i(t)}return s.invert=function(t){return o(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},s.range=function(t){return arguments.length?(e=t,a()):e},s.rangeRound=function(t){return s.range(t).interpolate(xo)},s.clamp=function(t){return arguments.length?(r=t,a()):r},s.interpolate=function(t){return arguments.length?(n=t,a()):n},s.ticks=function(e){return Ia(t,e)},s.tickFormat=function(e,n){return Da(t,e,n)},s.nice=function(e){return La(t,e),a()},s.copy=function(){return Pa(t,e,n,r)},a()}function Oa(t,e){return o.rebind(t,e,"range","rangeRound","interpolate","clamp")}function La(t,e){return Ca(t,Ea(Ra(t,e)[2])),Ca(t,Ea(Ra(t,e)[2])),t}function Ra(t,e){null==e&&(e=10);var n=wa(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function Ia(t,e){return o.range.apply(o,Ra(t,e))}function Da(t,e,n){var r=Ra(t,e);if(n){var i=Fe.exec(n);if(i.shift(),"s"===i[8]){var a=o.formatPrefix(Math.max(M(r[0]),M(r[1])));return i[7]||(i[7]="."+Na(a.scale(r[2]))),i[8]="f",n=o.format(i.join("")),function(t){return n(a.scale(t))+a.symbol}}i[7]||(i[7]="."+function(t,e){var n=Na(e[2]);return t in Fa?Math.abs(n-Na(Math.max(M(e[0]),M(e[1]))))+ +("e"!==t):n-2*("%"===t)}(i[8],r)),n=i.join("")}else n=",."+Na(r[2])+"f";return o.format(n)}o.scale.linear=function(){return Pa([0,1],[0,1],io,!1)};var Fa={s:1,g:1,p:1,r:1,e:1};function Na(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ja(t,e,n,r){function i(t){return(n?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(i(e))}return s.invert=function(e){return a(t.invert(e))},s.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),s):r},s.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),s):e},s.nice=function(){var e=Ca(r.map(i),n?Math:Ba);return t.domain(e),r=e.map(a),s},s.ticks=function(){var t=wa(r),o=[],s=t[0],u=t[1],l=Math.floor(i(s)),c=Math.ceil(i(u)),h=e%1?2:e;if(isFinite(c-l)){if(n){for(;l<c;l++)for(var f=1;f<h;f++)o.push(a(l)*f);o.push(a(l))}else for(o.push(a(l));l++<c;)for(f=h-1;f>0;f--)o.push(a(l)*f);for(l=0;o[l]<s;l++);for(c=o.length;o[c-1]>u;c--);o=o.slice(l,c)}return o},s.tickFormat=function(t,n){if(!arguments.length)return za;arguments.length<2?n=za:"function"!=typeof n&&(n=o.format(n));var r=Math.max(1,e*t/s.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e<e-.5&&(o*=e),o<=r?n(t):""}},s.copy=function(){return ja(t.copy(),e,n,r)},Oa(s,t)}o.scale.log=function(){return ja(o.scale.linear().domain([0,1]),10,!0,[1,10])};var za=o.format(".0e"),Ba={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function qa(t,e,n){var r=Va(e),i=Va(1/e);function o(e){return t(r(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(r)),o):n},o.ticks=function(t){return Ia(n,t)},o.tickFormat=function(t,e){return Da(n,t,e)},o.nice=function(t){return o.domain(La(n,t))},o.exponent=function(a){return arguments.length?(r=Va(e=a),i=Va(1/e),t.domain(n.map(r)),o):e},o.copy=function(){return qa(t.copy(),e,n)},Oa(o,t)}function Va(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Ga(t,e){var n,r,i;function a(i){return r[((n.get(i)||("range"===e.t?n.set(i,t.push(i)):NaN))-1)%r.length]}function s(e,n){return o.range(t.length).map((function(t){return e+n*t}))}return a.domain=function(r){if(!arguments.length)return t;t=[],n=new A;for(var i,o=-1,s=r.length;++o<s;)n.has(i=r[o])||n.set(i,t.push(i));return a[e.t].apply(a,e.a)},a.range=function(t){return arguments.length?(r=t,i=0,e={t:"range",a:arguments},a):r},a.rangePoints=function(n,o){arguments.length<2&&(o=0);var u=n[0],l=n[1],c=t.length<2?(u=(u+l)/2,0):(l-u)/(t.length-1+o);return r=s(u+c*o/2,c),i=0,e={t:"rangePoints",a:arguments},a},a.rangeRoundPoints=function(n,o){arguments.length<2&&(o=0);var u=n[0],l=n[1],c=t.length<2?(u=l=Math.round((u+l)/2),0):(l-u)/(t.length-1+o)|0;return r=s(u+Math.round(c*o/2+(l-u-(t.length-1+o)*c)/2),c),i=0,e={t:"rangeRoundPoints",a:arguments},a},a.rangeBands=function(n,o,u){arguments.length<2&&(o=0),arguments.length<3&&(u=o);var l=n[1]<n[0],c=n[l-0],h=(n[1-l]-c)/(t.length-o+2*u);return r=s(c+h*u,h),l&&r.reverse(),i=h*(1-o),e={t:"rangeBands",a:arguments},a},a.rangeRoundBands=function(n,o,u){arguments.length<2&&(o=0),arguments.length<3&&(u=o);var l=n[1]<n[0],c=n[l-0],h=n[1-l],f=Math.floor((h-c)/(t.length-o+2*u));return r=s(c+Math.round((h-c-(t.length-o)*f)/2),f),l&&r.reverse(),i=Math.round(f*(1-o)),e={t:"rangeRoundBands",a:arguments},a},a.rangeBand=function(){return i},a.rangeExtent=function(){return wa(e.a[0])},a.copy=function(){return Ga(t,e)},a.domain(t)}o.scale.pow=function(){return qa(o.scale.linear(),1,[0,1])},o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return Ga([],{t:"range",a:[[]]})},o.scale.category10=function(){return o.scale.ordinal().range(Ua)},o.scale.category20=function(){return o.scale.ordinal().range(Wa)},o.scale.category20b=function(){return o.scale.ordinal().range(Ha)},o.scale.category20c=function(){return o.scale.ordinal().range(Za)};var Ua=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(fe),Wa=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(fe),Ha=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(fe),Za=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(fe);function Xa(t,e){var n;function r(){var r=0,a=e.length;for(n=[];++r<a;)n[r-1]=o.quantile(t,r/a);return i}function i(t){if(!isNaN(t=+t))return e[o.bisect(n,t)]}return i.domain=function(e){return arguments.length?(t=e.map(v).filter(y).sort(g),r()):t},i.range=function(t){return arguments.length?(e=t,r()):e},i.quantiles=function(){return n},i.invertExtent=function(r){return(r=e.indexOf(r))<0?[NaN,NaN]:[r>0?n[r-1]:t[0],r<n.length?n[r]:t[t.length-1]]},i.copy=function(){return Xa(t,e)},r()}function Qa(t,e,n){var r,i;function o(e){return n[Math.max(0,Math.min(i,Math.floor(r*(e-t))))]}function a(){return r=n.length/(e-t),i=n.length-1,o}return o.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],a()):[t,e]},o.range=function(t){return arguments.length?(n=t,a()):n},o.invertExtent=function(e){return[e=(e=n.indexOf(e))<0?NaN:e/r+t,e+1/r]},o.copy=function(){return Qa(t,e,n)},a()}function Ya(t,e){function n(n){if(n<=n)return e[o.bisect(t,n)]}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return Ya(t,e)},n}function Ka(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return Ia(t,e)},e.tickFormat=function(e,n){return Da(t,e,n)},e.copy=function(){return Ka(t)},e}function Ja(){return 0}o.scale.quantile=function(){return Xa([],[])},o.scale.quantize=function(){return Qa(0,1,[0,1])},o.scale.threshold=function(){return Ya([.5],[0,1])},o.scale.identity=function(){return Ka([0,1])},o.svg={},o.svg.arc=function(){var t=ts,e=es,n=Ja,r=$a,i=ns,o=rs,a=is;function s(){var s=Math.max(0,+t.apply(this,arguments)),l=Math.max(0,+e.apply(this,arguments)),c=i.apply(this,arguments)-Rt,h=o.apply(this,arguments)-Rt,f=Math.abs(h-c),d=c>h?0:1;if(l<s&&(p=l,l=s,s=p),f>=Lt)return u(l,d)+(s?u(s,1-d):"")+"Z";var p,m,g,v,y,x,_,b,M,w,A,T,C=0,E=0,k=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=r===$a?Math.sqrt(s*s+l*l):+r.apply(this,arguments),d||(E*=-1),l&&(E=zt(g/l*Math.sin(v))),s&&(C=zt(g/s*Math.sin(v)))),l){y=l*Math.cos(c+E),x=l*Math.sin(c+E),_=l*Math.cos(h-E),b=l*Math.sin(h-E);var S=Math.abs(h-c-2*E)<=Pt?0:1;if(E&&os(y,x,_,b)===d^S){var P=(c+h)/2;y=l*Math.cos(P),x=l*Math.sin(P),_=b=null}}else y=x=0;if(s){M=s*Math.cos(h-C),w=s*Math.sin(h-C),A=s*Math.cos(c+C),T=s*Math.sin(c+C);var O=Math.abs(c-h+2*C)<=Pt?0:1;if(C&&os(M,w,A,T)===1-d^O){var L=(c+h)/2;M=s*Math.cos(L),w=s*Math.sin(L),A=T=null}}else M=w=0;if(f>kt&&(p=Math.min(Math.abs(l-s)/2,+n.apply(this,arguments)))>.001){m=s<l^d?0:1;var R=p,I=p;if(f<Pt){var D=null==A?[M,w]:null==_?[y,x]:pi([y,x],[A,T],[_,b],[M,w]),F=y-D[0],N=x-D[1],j=_-D[0],z=b-D[1],B=1/Math.sin(Math.acos((F*j+N*z)/(Math.sqrt(F*F+N*N)*Math.sqrt(j*j+z*z)))/2),q=Math.sqrt(D[0]*D[0]+D[1]*D[1]);I=Math.min(p,(s-q)/(B-1)),R=Math.min(p,(l-q)/(B+1))}if(null!=_){var V=as(null==A?[M,w]:[A,T],[y,x],l,R,d),G=as([_,b],[M,w],l,R,d);p===R?k.push("M",V[0],"A",R,",",R," 0 0,",m," ",V[1],"A",l,",",l," 0 ",1-d^os(V[1][0],V[1][1],G[1][0],G[1][1]),",",d," ",G[1],"A",R,",",R," 0 0,",m," ",G[0]):k.push("M",V[0],"A",R,",",R," 0 1,",m," ",G[0])}else k.push("M",y,",",x);if(null!=A){var U=as([y,x],[A,T],s,-I,d),W=as([M,w],null==_?[y,x]:[_,b],s,-I,d);p===I?k.push("L",W[0],"A",I,",",I," 0 0,",m," ",W[1],"A",s,",",s," 0 ",d^os(W[1][0],W[1][1],U[1][0],U[1][1]),",",1-d," ",U[1],"A",I,",",I," 0 0,",m," ",U[0]):k.push("L",W[0],"A",I,",",I," 0 0,",m," ",U[0])}else k.push("L",M,",",w)}else k.push("M",y,",",x),null!=_&&k.push("A",l,",",l," 0 ",S,",",d," ",_,",",b),k.push("L",M,",",w),null!=A&&k.push("A",s,",",s," 0 ",O,",",1-d," ",A,",",T);return k.push("Z"),k.join("")}function u(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}return s.innerRadius=function(e){return arguments.length?(t=be(e),s):t},s.outerRadius=function(t){return arguments.length?(e=be(t),s):e},s.cornerRadius=function(t){return arguments.length?(n=be(t),s):n},s.padRadius=function(t){return arguments.length?(r=t==$a?$a:be(t),s):r},s.startAngle=function(t){return arguments.length?(i=be(t),s):i},s.endAngle=function(t){return arguments.length?(o=be(t),s):o},s.padAngle=function(t){return arguments.length?(a=be(t),s):a},s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Rt;return[Math.cos(r)*n,Math.sin(r)*n]},s};var $a="auto";function ts(t){return t.innerRadius}function es(t){return t.outerRadius}function ns(t){return t.startAngle}function rs(t){return t.endAngle}function is(t){return t&&t.padAngle}function os(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function as(t,e,n,r,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),u=s*a,l=-s*o,c=t[0]+u,h=t[1]+l,f=e[0]+u,d=e[1]+l,p=(c+f)/2,m=(h+d)/2,g=f-c,v=d-h,y=g*g+v*v,x=n-r,_=c*d-f*h,b=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-_*_)),M=(_*v-g*b)/y,w=(-_*g-v*b)/y,A=(_*v+g*b)/y,T=(-_*g+v*b)/y,C=M-p,E=w-m,k=A-p,S=T-m;return C*C+E*E>k*k+S*S&&(M=A,w=T),[[M-u,w-l],[M*n/x,w*n/x]]}function ss(t){var e=ui,n=li,r=tr,i=ls,o=i.key,a=.7;function s(o){var s,u=[],l=[],c=-1,h=o.length,f=be(e),d=be(n);function p(){u.push("M",i(t(l),a))}for(;++c<h;)r.call(this,s=o[c],c)?l.push([+f.call(this,s,c),+d.call(this,s,c)]):l.length&&(p(),l=[]);return l.length&&p(),u.length?u.join(""):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(n=t,s):n},s.defined=function(t){return arguments.length?(r=t,s):r},s.interpolate=function(t){return arguments.length?(o="function"==typeof t?i=t:(i=us.get(t)||ls).key,s):o},s.tension=function(t){return arguments.length?(a=t,s):a},s}o.svg.line=function(){return ss(D)};var us=o.map({linear:ls,"linear-closed":cs,step:function(t){var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];for(;++e<n;)i.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);n>1&&i.push("H",r[0]);return i.join("")},"step-before":hs,"step-after":fs,basis:ms,"basis-open":function(t){if(t.length<4)return ls(t);var e,n=[],r=-1,i=t.length,o=[0],a=[0];for(;++r<3;)e=t[r],o.push(e[0]),a.push(e[1]);n.push(gs(xs,o)+","+gs(xs,a)),--r;for(;++r<i;)e=t[r],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),_s(n,o,a);return n.join("")},"basis-closed":function(t){var e,n,r=-1,i=t.length,o=i+4,a=[],s=[];for(;++r<4;)n=t[r%i],a.push(n[0]),s.push(n[1]);e=[gs(xs,a),",",gs(xs,s)],--r;for(;++r<o;)n=t[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),_s(e,a,s);return e.join("")},bundle:function(t,e){var n=t.length-1;if(n)for(var r,i,o=t[0][0],a=t[0][1],s=t[n][0]-o,u=t[n][1]-a,l=-1;++l<=n;)i=l/n,(r=t[l])[0]=e*r[0]+(1-e)*(o+i*s),r[1]=e*r[1]+(1-e)*(a+i*u);return ms(t)},cardinal:function(t,e){return t.length<3?ls(t):t[0]+ds(t,ps(t,e))},"cardinal-open":function(t,e){return t.length<4?ls(t):t[1]+ds(t.slice(1,-1),ps(t,e))},"cardinal-closed":function(t,e){return t.length<3?cs(t):t[0]+ds((t.push(t[0]),t),ps([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?ls(t):t[0]+ds(t,function(t){var e,n,r,i,o=[],a=function(t){var e=0,n=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=bs(i,o);for(;++e<n;)r[e]=(a+(a=bs(i=o,o=t[e+1])))/2;return r[e]=a,r}(t),s=-1,u=t.length-1;for(;++s<u;)e=bs(t[s],t[s+1]),M(e)<kt?a[s]=a[s+1]=0:(i=(n=a[s]/e)*n+(r=a[s+1]/e)*r)>9&&(i=3*e/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r);s=-1;for(;++s<=u;)i=(t[Math.min(u,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});function ls(t){return t.length>1?t.join("L"):t+"Z"}function cs(t){return t.join("L")+"Z"}function hs(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("V",(r=t[e])[1],"H",r[0]);return i.join("")}function fs(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r=t[e])[0],"V",r[1]);return i.join("")}function ds(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return ls(t);var n=t.length!=e.length,r="",i=t[0],o=t[1],a=e[0],s=a,u=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],u=2),e.length>1){s=e[1],o=t[u],u++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var l=2;l<e.length;l++,u++)o=t[u],s=e[l],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=t[u];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function ps(t,e){for(var n,r=[],i=(1-e)/2,o=t[0],a=t[1],s=1,u=t.length;++s<u;)n=o,o=a,a=t[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function ms(t){if(t.length<3)return ls(t);var e=1,n=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],s=[o,o,o,r[1]],u=[i,",",o,"L",gs(xs,a),",",gs(xs,s)];for(t.push(t[n-1]);++e<=n;)r=t[e],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),_s(u,a,s);return t.pop(),u.push("L",r),u.join("")}function gs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}us.forEach((function(t,e){e.key=t,e.closed=/-closed$/.test(t)}));var vs=[0,2/3,1/3,0],ys=[0,1/3,2/3,0],xs=[0,1/6,2/3,1/6];function _s(t,e,n){t.push("C",gs(vs,e),",",gs(vs,n),",",gs(ys,e),",",gs(ys,n),",",gs(xs,e),",",gs(xs,n))}function bs(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Ms(t){for(var e,n,r,i=-1,o=t.length;++i<o;)n=(e=t[i])[0],r=e[1]-Rt,e[0]=n*Math.cos(r),e[1]=n*Math.sin(r);return t}function ws(t){var e=ui,n=ui,r=0,i=li,o=tr,a=ls,s=a.key,u=a,l="L",c=.7;function h(s){var h,f,d,p=[],m=[],g=[],v=-1,y=s.length,x=be(e),_=be(r),b=e===n?function(){return f}:be(n),M=r===i?function(){return d}:be(i);function w(){p.push("M",a(t(g),c),l,u(t(m.reverse()),c),"Z")}for(;++v<y;)o.call(this,h=s[v],v)?(m.push([f=+x.call(this,h,v),d=+_.call(this,h,v)]),g.push([+b.call(this,h,v),+M.call(this,h,v)])):m.length&&(w(),m=[],g=[]);return m.length&&w(),p.length?p.join(""):null}return h.x=function(t){return arguments.length?(e=n=t,h):n},h.x0=function(t){return arguments.length?(e=t,h):e},h.x1=function(t){return arguments.length?(n=t,h):n},h.y=function(t){return arguments.length?(r=i=t,h):i},h.y0=function(t){return arguments.length?(r=t,h):r},h.y1=function(t){return arguments.length?(i=t,h):i},h.defined=function(t){return arguments.length?(o=t,h):o},h.interpolate=function(t){return arguments.length?(s="function"==typeof t?a=t:(a=us.get(t)||ls).key,u=a.reverse||a,l=a.closed?"M":"L",h):s},h.tension=function(t){return arguments.length?(c=t,h):c},h}function As(t){return t.radius}function Ts(t){return[t.x,t.y]}function Cs(){return 64}function Es(){return"circle"}function ks(t){var e=Math.sqrt(t/Pt);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}o.svg.line.radial=function(){var t=ss(Ms);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},hs.reverse=fs,fs.reverse=hs,o.svg.area=function(){return ws(D)},o.svg.area.radial=function(){var t=ws(Ms);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},o.svg.chord=function(){var t=Xr,e=Qr,n=As,r=ns,i=rs;function o(n,r){var i,o,l=a(this,t,n,r),c=a(this,e,n,r);return"M"+l.p0+s(l.r,l.p1,l.a1-l.a0)+(o=c,((i=l).a0==o.a0&&i.a1==o.a1?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+s(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z")}function a(t,e,o,a){var s=e.call(t,o,a),u=n.call(t,s,a),l=r.call(t,s,a)-Rt,c=i.call(t,s,a)-Rt;return{r:u,a0:l,a1:c,p0:[u*Math.cos(l),u*Math.sin(l)],p1:[u*Math.cos(c),u*Math.sin(c)]}}function s(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Pt)+",1 "+e}function u(t,e,n,r){return"Q 0,0 "+r}return o.radius=function(t){return arguments.length?(n=be(t),o):n},o.source=function(e){return arguments.length?(t=be(e),o):t},o.target=function(t){return arguments.length?(e=be(t),o):e},o.startAngle=function(t){return arguments.length?(r=be(t),o):r},o.endAngle=function(t){return arguments.length?(i=be(t),o):i},o},o.svg.diagonal=function(){var t=Xr,e=Qr,n=Ts;function r(r,i){var o=t.call(this,r,i),a=e.call(this,r,i),s=(o.y+a.y)/2,u=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(u=u.map(n))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}return r.source=function(e){return arguments.length?(t=be(e),r):t},r.target=function(t){return arguments.length?(e=be(t),r):e},r.projection=function(t){return arguments.length?(n=t,r):n},r},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),e=Ts,n=t.projection;return t.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),n=e[0],r=e[1]-Rt;return[n*Math.cos(r),n*Math.sin(r)]}}(e=t)):e},t},o.svg.symbol=function(){var t=Es,e=Cs;function n(n,r){return(Ss.get(t.call(this,n,r))||ks)(e.call(this,n,r))}return n.type=function(e){return arguments.length?(t=be(e),n):t},n.size=function(t){return arguments.length?(e=be(t),n):e},n};var Ss=o.map({circle:ks,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Os)),n=e*Os;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Ps),n=e*Ps/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Ps),n=e*Ps/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});o.svg.symbolTypes=Ss.keys();var Ps=Math.sqrt(3),Os=Math.tan(30*It);K.transition=function(t){for(var e,n,r=Ds||++js,i=qs(t),o=[],a=Fs||{time:Date.now(),ease:po,delay:0,duration:250},s=-1,u=this.length;++s<u;){o.push(e=[]);for(var l=this[s],c=-1,h=l.length;++c<h;)(n=l[c])&&Vs(n,c,i,r,a),e.push(n)}return Is(o,i,r)},K.interrupt=function(t){return this.each(null==t?Ls:Rs(qs(t)))};var Ls=Rs(qs());function Rs(t){return function(){var e,n,r;(e=this[t])&&(r=e[n=e.active])&&(r.timer.c=null,r.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Is(t,e,n){return H(t,Ns),t.namespace=e,t.id=n,t}var Ds,Fs,Ns=[],js=0;function zs(t,e,n,r){var i=t.id,o=t.namespace;return mt(t,"function"==typeof n?function(t,a,s){t[o][i].tween.set(e,r(n.call(t,t.__data__,a,s)))}:(n=r(n),function(t){t[o][i].tween.set(e,n)}))}function Bs(t){return null==t&&(t=""),function(){this.textContent=t}}function qs(t){return null==t?"__transition__":"__transition_"+t+"__"}function Vs(t,e,n,r,i){var o,a,s,u,l,c=t[n]||(t[n]={active:0,count:0}),h=c[r];function f(n){var i=c.active,f=c[i];for(var p in f&&(f.timer.c=null,f.timer.t=NaN,--c.count,delete c[i],f.event&&f.event.interrupt.call(t,t.__data__,f.index)),c)if(+p<r){var m=c[p];m.timer.c=null,m.timer.t=NaN,--c.count,delete c[p]}a.c=d,Se((function(){return a.c&&d(n||1)&&(a.c=null,a.t=NaN),1}),0,o),c.active=r,h.event&&h.event.start.call(t,t.__data__,e),l=[],h.tween.forEach((function(n,r){(r=r.call(t,t.__data__,e))&&l.push(r)})),u=h.ease,s=h.duration}function d(i){for(var o=i/s,a=u(o),f=l.length;f>0;)l[--f].call(t,a);if(o>=1)return h.event&&h.event.end.call(t,t.__data__,e),--c.count?delete c[r]:delete t[n],1}h||(o=i.time,a=Se((function(t){var e=h.delay;if(a.t=e+o,e<=t)return f(t-e);a.c=f}),0,o),h=c[r]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++c.count)}Ns.call=K.call,Ns.empty=K.empty,Ns.node=K.node,Ns.size=K.size,o.transition=function(t,e){return t&&t.transition?Ds?t.transition(e):t:o.selection().transition(t)},o.transition.prototype=Ns,Ns.select=function(t){var e,n,r,i=this.id,o=this.namespace,a=[];t=J(t);for(var s=-1,u=this.length;++s<u;){a.push(e=[]);for(var l=this[s],c=-1,h=l.length;++c<h;)(r=l[c])&&(n=t.call(r,r.__data__,c,s))?("__data__"in r&&(n.__data__=r.__data__),Vs(n,c,o,i,r[o][i]),e.push(n)):e.push(null)}return Is(a,o,i)},Ns.selectAll=function(t){var e,n,r,i,o,a=this.id,s=this.namespace,u=[];t=$(t);for(var l=-1,c=this.length;++l<c;)for(var h=this[l],f=-1,d=h.length;++f<d;)if(r=h[f]){o=r[s][a],n=t.call(r,r.__data__,f,l),u.push(e=[]);for(var p=-1,m=n.length;++p<m;)(i=n[p])&&Vs(i,p,s,a,o),e.push(i)}return Is(u,s,a)},Ns.filter=function(t){var e,n,r=[];"function"!=typeof t&&(t=dt(t));for(var i=0,o=this.length;i<o;i++){r.push(e=[]);for(var a,s=0,u=(a=this[i]).length;s<u;s++)(n=a[s])&&t.call(n,n.__data__,s,i)&&e.push(n)}return Is(r,this.namespace,this.id)},Ns.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):mt(this,null==e?function(e){e[r][n].tween.remove(t)}:function(i){i[r][n].tween.set(t,e)})},Ns.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var n="transform"==t?To:io,r=o.ns.qualify(t);function i(){this.removeAttribute(r)}function a(){this.removeAttributeNS(r.space,r.local)}return zs(this,"attr."+t,e,r.local?function(t){return null==t?a:(t+="",function(){var e,i=this.getAttributeNS(r.space,r.local);return i!==t&&(e=n(i,t),function(t){this.setAttributeNS(r.space,r.local,e(t))})})}:function(t){return null==t?i:(t+="",function(){var e,i=this.getAttribute(r);return i!==t&&(e=n(i,t),function(t){this.setAttribute(r,e(t))})})})},Ns.attrTween=function(t,e){var n=o.ns.qualify(t);return this.tween("attr."+t,n.local?function(t,r){var i=e.call(this,t,r,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,r){var i=e.call(this,t,r,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},Ns.style=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=""),t)this.style(n,t[n],e);return this}n=""}function i(){this.style.removeProperty(t)}return zs(this,"style."+t,e,(function(e){return null==e?i:(e+="",function(){var r,i=c(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=io(i,e),function(e){this.style.setProperty(t,r(e),n)})})}))},Ns.styleTween=function(t,e,n){return arguments.length<3&&(n=""),this.tween("style."+t,(function(r,i){var o=e.call(this,r,i,c(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}}))},Ns.text=function(t){return zs(this,"text",t,Bs)},Ns.remove=function(){var t=this.namespace;return this.each("end.transition",(function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)}))},Ns.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=o.ease.apply(o,arguments)),mt(this,(function(r){r[n][e].ease=t})))},Ns.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:mt(this,"function"==typeof t?function(r,i,o){r[n][e].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[n][e].delay=t}))},Ns.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:mt(this,"function"==typeof t?function(r,i,o){r[n][e].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},Ns.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var i=Fs,a=Ds;try{Ds=n,mt(this,(function(e,i,o){Fs=e[r][n],t.call(e,e.__data__,i,o)}))}finally{Fs=i,Ds=a}}else mt(this,(function(i){var a=i[r][n];(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(t,e)}));return this},Ns.transition=function(){for(var t,e,n,r=this.id,i=++js,o=this.namespace,a=[],s=0,u=this.length;s<u;s++){a.push(t=[]);for(var l,c=0,h=(l=this[s]).length;c<h;c++)(e=l[c])&&Vs(e,c,o,i,{time:(n=e[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),t.push(e)}return Is(a,o,i)},o.svg.axis=function(){var t,e=o.scale.linear(),n=Gs,r=6,i=6,a=3,u=[10],l=null;function c(s){s.each((function(){var s,c=o.select(this),h=this.__chart__||e,f=this.__chart__=e.copy(),d=null==l?f.ticks?f.ticks.apply(f,u):f.domain():l,p=null==t?f.tickFormat?f.tickFormat.apply(f,u):D:t,m=c.selectAll(".tick").data(d,f),g=m.enter().insert("g",".domain").attr("class","tick").style("opacity",kt),v=o.transition(m.exit()).style("opacity",kt).remove(),y=o.transition(m.order()).style("opacity",1),x=Math.max(r,0)+a,_=Aa(f),b=c.selectAll(".domain").data([0]),M=(b.enter().append("path").attr("class","domain"),o.transition(b));g.append("line"),g.append("text");var w,A,T,C,E=g.select("line"),k=y.select("line"),S=m.select("text").text(p),P=g.select("text"),O=y.select("text"),L="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(s=Ws,w="x",T="y",A="x2",C="y2",S.attr("dy",L<0?"0em":".71em").style("text-anchor","middle"),M.attr("d","M"+_[0]+","+L*i+"V0H"+_[1]+"V"+L*i)):(s=Hs,w="y",T="x",A="y2",C="x2",S.attr("dy",".32em").style("text-anchor",L<0?"end":"start"),M.attr("d","M"+L*i+","+_[0]+"H0V"+_[1]+"H"+L*i)),E.attr(C,L*r),P.attr(T,L*x),k.attr(A,0).attr(C,L*r),O.attr(w,0).attr(T,L*x),f.rangeBand){var R=f,I=R.rangeBand()/2;h=f=function(t){return R(t)+I}}else h.rangeBand?h=f:v.call(s,f,h);g.call(s,h,f),y.call(s,f,f)}))}return c.scale=function(t){return arguments.length?(e=t,c):e},c.orient=function(t){return arguments.length?(n=t in Us?t+"":Gs,c):n},c.ticks=function(){return arguments.length?(u=s(arguments),c):u},c.tickValues=function(t){return arguments.length?(l=t,c):l},c.tickFormat=function(e){return arguments.length?(t=e,c):t},c.tickSize=function(t){var e=arguments.length;return e?(r=+t,i=+arguments[e-1],c):r},c.innerTickSize=function(t){return arguments.length?(r=+t,c):r},c.outerTickSize=function(t){return arguments.length?(i=+t,c):i},c.tickPadding=function(t){return arguments.length?(a=+t,c):a},c.tickSubdivide=function(){return arguments.length&&c},c};var Gs="bottom",Us={top:1,right:1,bottom:1,left:1};function Ws(t,e,n){t.attr("transform",(function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"}))}function Hs(t,e,n){t.attr("transform",(function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"}))}o.svg.brush=function(){var t,e,n=U(f,"brushstart","brush","brushend"),r=null,i=null,a=[0,0],s=[0,0],u=!0,l=!0,h=Xs[0];function f(t){t.each((function(){var t=o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",g).on("touchstart.brush",g),e=t.selectAll(".background").data([0]);e.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=t.selectAll(".resize").data(h,D);n.exit().remove(),n.enter().append("g").attr("class",(function(t){return"resize "+t})).style("cursor",(function(t){return Zs[t]})).append("rect").attr("x",(function(t){return/[ew]$/.test(t)?-3:null})).attr("y",(function(t){return/^[ns]/.test(t)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",f.empty()?"none":null);var a,s=o.transition(t),u=o.transition(e);r&&(a=Aa(r),u.attr("x",a[0]).attr("width",a[1]-a[0]),p(s)),i&&(a=Aa(i),u.attr("y",a[0]).attr("height",a[1]-a[0]),m(s)),d(s)}))}function d(t){t.selectAll(".resize").attr("transform",(function(t){return"translate("+a[+/e$/.test(t)]+","+s[+/^s/.test(t)]+")"}))}function p(t){t.select(".extent").attr("x",a[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",a[1]-a[0])}function m(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var h,g,v=this,y=o.select(o.event.target),x=n.of(v,arguments),_=o.select(v),b=y.datum(),M=!/^(n|s)$/.test(b)&&r,w=!/^(e|w)$/.test(b)&&i,A=y.classed("extent"),T=At(v),C=o.mouse(v),E=o.select(c(v)).on("keydown.brush",(function(){32==o.event.keyCode&&(A||(h=null,C[0]-=a[1],C[1]-=s[1],A=2),V())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==A&&(C[0]+=a[1],C[1]+=s[1],A=0,V())}));if(o.event.changedTouches?E.on("touchmove.brush",P).on("touchend.brush",L):E.on("mousemove.brush",P).on("mouseup.brush",L),_.interrupt().selectAll("*").interrupt(),A)C[0]=a[0]-C[0],C[1]=s[0]-C[1];else if(b){var k=+/w$/.test(b),S=+/^n/.test(b);g=[a[1-k]-C[0],s[1-S]-C[1]],C[0]=a[k],C[1]=s[S]}else o.event.altKey&&(h=C.slice());function P(){var t=o.mouse(v),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),A||(o.event.altKey?(h||(h=[(a[0]+a[1])/2,(s[0]+s[1])/2]),C[0]=a[+(t[0]<h[0])],C[1]=s[+(t[1]<h[1])]):h=null),M&&O(t,r,0)&&(p(_),e=!0),w&&O(t,i,1)&&(m(_),e=!0),e&&(d(_),x({type:"brush",mode:A?"move":"resize"}))}function O(n,r,i){var o,c,f=Aa(r),d=f[0],p=f[1],m=C[i],g=i?s:a,v=g[1]-g[0];if(A&&(d-=m,p-=v+m),o=(i?l:u)?Math.max(d,Math.min(p,n[i])):n[i],A?c=(o+=m)+v:(h&&(m=Math.max(d,Math.min(p,2*h[i]-o))),m<o?(c=o,o=m):c=m),g[0]!=o||g[1]!=c)return i?e=null:t=null,g[0]=o,g[1]=c,!0}function L(){P(),_.style("pointer-events","all").selectAll(".resize").style("display",f.empty()?"none":null),o.select("body").style("cursor",null),E.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),T(),x({type:"brushend"})}_.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",y.style("cursor")),x({type:"brushstart"}),P()}return f.event=function(r){r.each((function(){var r=n.of(this,arguments),i={x:a,y:s,i:t,j:e},u=this.__chart__||i;this.__chart__=i,Ds?o.select(this).transition().each("start.brush",(function(){t=u.i,e=u.j,a=u.x,s=u.y,r({type:"brushstart"})})).tween("brush:brush",(function(){var n=oo(a,i.x),o=oo(s,i.y);return t=e=null,function(t){a=i.x=n(t),s=i.y=o(t),r({type:"brush",mode:"resize"})}})).each("end.brush",(function(){t=i.i,e=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})})):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))}))},f.x=function(t){return arguments.length?(h=Xs[!(r=t)<<1|!i],f):r},f.y=function(t){return arguments.length?(h=Xs[!r<<1|!(i=t)],f):i},f.clamp=function(t){return arguments.length?(r&&i?(u=!!t[0],l=!!t[1]):r?u=!!t:i&&(l=!!t),f):r&&i?[u,l]:r?u:i?l:null},f.extent=function(n){var o,u,l,c,h;return arguments.length?(r&&(o=n[0],u=n[1],i&&(o=o[0],u=u[0]),t=[o,u],r.invert&&(o=r(o),u=r(u)),u<o&&(h=o,o=u,u=h),o==a[0]&&u==a[1]||(a=[o,u])),i&&(l=n[0],c=n[1],r&&(l=l[1],c=c[1]),e=[l,c],i.invert&&(l=i(l),c=i(c)),c<l&&(h=l,l=c,c=h),l==s[0]&&c==s[1]||(s=[l,c])),f):(r&&(t?(o=t[0],u=t[1]):(o=a[0],u=a[1],r.invert&&(o=r.invert(o),u=r.invert(u)),u<o&&(h=o,o=u,u=h))),i&&(e?(l=e[0],c=e[1]):(l=s[0],c=s[1],i.invert&&(l=i.invert(l),c=i.invert(c)),c<l&&(h=l,l=c,c=h))),r&&i?[[o,l],[u,c]]:r?[o,u]:i&&[l,c])},f.clear=function(){return f.empty()||(a=[0,0],s=[0,0],t=e=null),f},f.empty=function(){return!!r&&a[0]==a[1]||!!i&&s[0]==s[1]},o.rebind(f,n,"on")};var Zs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Xs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Qs=ze.format=mn.timeFormat,Ys=Qs.utc,Ks=Ys("%Y-%m-%dT%H:%M:%S.%LZ");function Js(t){return t.toISOString()}function $s(t,e,n){function r(e){return t(e)}function i(t,n){var r=(t[1]-t[0])/n,i=o.bisect(eu,r);return i==eu.length?[e.year,Ra(t.map((function(t){return t/31536e6})),n)[2]]:i?e[r/eu[i-1]<eu[i]/r?i-1:i]:[iu,Ra(t,n)[2]]}return r.invert=function(e){return tu(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(tu)},r.nice=function(t,e){var n=r.domain(),o=wa(n),a=null==t?i(o,10):"number"==typeof t&&i(o,t);function s(n){return!isNaN(n)&&!t.range(n,tu(+n+1),e).length}return a&&(t=a[0],e=a[1]),r.domain(Ca(n,e>1?{floor:function(e){for(;s(e=t.floor(e));)e=tu(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=tu(+e+1);return e}}:t))},r.ticks=function(t,e){var n=wa(r.domain()),o=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],tu(+n[1]+1),e<1?1:e)},r.tickFormat=function(){return n},r.copy=function(){return $s(t.copy(),e,n)},Oa(r,t)}function tu(t){return new Date(t)}Qs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Js:Ks,Js.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Js.toString=Ks.toString,ze.second=Ge((function(t){return new Be(1e3*Math.floor(t/1e3))}),(function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))}),(function(t){return t.getSeconds()})),ze.seconds=ze.second.range,ze.seconds.utc=ze.second.utc.range,ze.minute=Ge((function(t){return new Be(6e4*Math.floor(t/6e4))}),(function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))}),(function(t){return t.getMinutes()})),ze.minutes=ze.minute.range,ze.minutes.utc=ze.minute.utc.range,ze.hour=Ge((function(t){var e=t.getTimezoneOffset()/60;return new Be(36e5*(Math.floor(t/36e5-e)+e))}),(function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))}),(function(t){return t.getHours()})),ze.hours=ze.hour.range,ze.hours.utc=ze.hour.utc.range,ze.month=Ge((function(t){return(t=ze.day(t)).setDate(1),t}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t){return t.getMonth()})),ze.months=ze.month.range,ze.months.utc=ze.month.utc.range;var eu=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],nu=[[ze.second,1],[ze.second,5],[ze.second,15],[ze.second,30],[ze.minute,1],[ze.minute,5],[ze.minute,15],[ze.minute,30],[ze.hour,1],[ze.hour,3],[ze.hour,6],[ze.hour,12],[ze.day,1],[ze.day,2],[ze.week,1],[ze.month,1],[ze.month,3],[ze.year,1]],ru=Qs.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",tr]]),iu={range:function(t,e,n){return o.range(Math.ceil(t/n)*n,+e,n).map(tu)},floor:D,ceil:D};nu.year=ze.year,ze.scale=function(){return $s(o.scale.linear(),nu,ru)};var ou=nu.map((function(t){return[t[0].utc,t[1]]})),au=Ys.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",tr]]);function su(t){return JSON.parse(t.responseText)}function uu(t){var e=u.createRange();return e.selectNode(u.body),e.createContextualFragment(t.responseText)}ou.year=ze.year.utc,ze.scale.utc=function(){return $s(o.scale.linear(),ou,au)},o.text=Me((function(t){return t.responseText})),o.json=function(t,e){return we(t,"application/json",su,e)},o.html=function(t,e){return we(t,"text/html",uu,e)},o.xml=Me((function(t){return t.responseXML})),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)}()},1106:function(t){"use strict";function e(t,e,r){r=r||2;var o,a,s,u,h,f,p,m=e&&e.length,g=m?e[0]*r:t.length,v=n(t,0,g,r,!0),y=[];if(!v||v.next===v.prev)return y;if(m&&(v=function(t,e,r,i){var o,a,s,u=[];for(o=0,a=e.length;o<a;o++)(s=n(t,e[o]*i,o<a-1?e[o+1]*i:t.length,i,!1))===s.next&&(s.steiner=!0),u.push(d(s));for(u.sort(l),o=0;o<u.length;o++)r=c(u[o],r);return r}(t,e,v,r)),t.length>80*r){o=s=t[0],a=u=t[1];for(var x=r;x<g;x+=r)(h=t[x])<o&&(o=h),(f=t[x+1])<a&&(a=f),h>s&&(s=h),f>u&&(u=f);p=0!==(p=Math.max(s-o,u-a))?32767/p:0}return i(v,y,r,o,a,p,0),y}function n(t,e,n,r,i){var o,a;if(i===C(t,e,n,r)>0)for(o=e;o<n;o+=r)a=w(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=w(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(A(a),a=a.next),a}function r(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(A(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function i(t,e,n,l,c,h,d){if(t){!d&&h&&function(t,e,n,r){var i=t;do{0===i.z&&(i.z=f(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,l,c,h);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?a(t,l,c,h):o(t))e.push(p.i/n|0),e.push(t.i/n|0),e.push(m.i/n|0),A(t),t=m.next,g=m.next;else if((t=m)===g){d?1===d?i(t=s(r(t),e,n),e,n,l,c,h,2):2===d&&u(t,e,n,l,c,h):i(r(t),e,n,l,c,h,1);break}}}function o(t){var e=t.prev,n=t,r=t.next;if(g(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,a=r.x,s=e.y,u=n.y,l=r.y,c=i<o?i<a?i:a:o<a?o:a,h=s<u?s<l?s:l:u<l?u:l,f=i>o?i>a?i:a:o>a?o:a,d=s>u?s>l?s:l:u>l?u:l,m=r.next;m!==e;){if(m.x>=c&&m.x<=f&&m.y>=h&&m.y<=d&&p(i,s,o,u,a,l,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(t,e,n,r){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,u=o.x,l=a.x,c=i.y,h=o.y,d=a.y,m=s<u?s<l?s:l:u<l?u:l,v=c<h?c<d?c:d:h<d?h:d,y=s>u?s>l?s:l:u>l?u:l,x=c>h?c>d?c:d:h>d?h:d,_=f(m,v,e,n,r),b=f(y,x,e,n,r),M=t.prevZ,w=t.nextZ;M&&M.z>=_&&w&&w.z<=b;){if(M.x>=m&&M.x<=y&&M.y>=v&&M.y<=x&&M!==i&&M!==a&&p(s,c,u,h,l,d,M.x,M.y)&&g(M.prev,M,M.next)>=0)return!1;if(M=M.prevZ,w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==i&&w!==a&&p(s,c,u,h,l,d,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.nextZ}for(;M&&M.z>=_;){if(M.x>=m&&M.x<=y&&M.y>=v&&M.y<=x&&M!==i&&M!==a&&p(s,c,u,h,l,d,M.x,M.y)&&g(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;w&&w.z<=b;){if(w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==i&&w!==a&&p(s,c,u,h,l,d,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function s(t,e,n){var i=t;do{var o=i.prev,a=i.next.next;!v(o,a)&&y(o,i,i.next,a)&&b(o,a)&&b(a,o)&&(e.push(o.i/n|0),e.push(i.i/n|0),e.push(a.i/n|0),A(i),A(i.next),i=t=a),i=i.next}while(i!==t);return r(i)}function u(t,e,n,o,a,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&m(u,l)){var c=M(u,l);return u=r(u,u.next),c=r(c,c.next),i(u,e,n,o,a,s,0),void i(c,e,n,o,a,s,0)}l=l.next}u=u.next}while(u!==t)}function l(t,e){return t.x-e.x}function c(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===i))return n}r=r.next}while(r!==e);if(!n)return null;var u,l=n,c=n.x,f=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&p(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),b(r,t)&&(u<d||u===d&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,d=u)),r=r.next}while(r!==l);return n}(t,e);if(!n)return e;var i=M(n,t);return r(i,i.next),r(n,n.next)}function h(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function f(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function p(t,e,n,r,i,o,a,s){return(i-a)*(e-s)>=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&y(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,n,r){var i=_(g(t,e,n)),o=_(g(t,e,r)),a=_(g(n,r,t)),s=_(g(n,r,e));return i!==o&&a!==s||(!(0!==i||!x(t,n,e))||(!(0!==o||!x(t,r,e))||(!(0!==a||!x(n,t,r))||!(0!==s||!x(n,e,r)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function _(t){return t>0?1:t<0?-1:0}function b(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function M(t,e){var n=new T(t.i,t.x,t.y),r=new T(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function w(t,e,n,r){var i=new T(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=e,t.exports.default=e,e.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(C(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(C(t,l,c,n))}var h=0;for(s=0;s<r.length;s+=3){var f=r[s]*n,d=r[s+1]*n,p=r[s+2]*n;h+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},e.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},8543:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8];return t[0]=a*c-s*l,t[1]=i*l-r*c,t[2]=r*s-i*a,t[3]=s*u-o*c,t[4]=n*c-i*u,t[5]=i*o-n*s,t[6]=o*l-a*u,t[7]=r*u-n*l,t[8]=n*a-r*o,t}},4995:function(t){t.exports=function(t){var e=new Float32Array(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}},7186:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}},1871:function(t){t.exports=function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},3854:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8];return e*(l*o-a*u)+n*(a*s-l*i)+r*(u*i-o*s)}},9263:function(t){t.exports=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8])}},6503:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}},3229:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}},4523:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,h=r*s,f=i*a,d=i*s,p=i*u,m=o*a,g=o*s,v=o*u;return t[0]=1-h-p,t[3]=c-v,t[6]=f+g,t[1]=c+v,t[4]=1-l-p,t[7]=d-m,t[2]=f-g,t[5]=d+m,t[8]=1-l-h,t}},6511:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},8054:function(t,e,n){t.exports={adjoint:n(8543),clone:n(4995),copy:n(7186),create:n(1871),determinant:n(3854),frob:n(9263),fromMat2:n(6503),fromMat4:n(3229),fromQuat:n(4523),identity:n(6511),invert:n(8104),multiply:n(9063),normalFromMat4:n(3100),rotate:n(5637),scale:n(9281),str:n(6224),translate:n(1078),transpose:n(4879)}},8104:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=c*a-s*l,f=-c*o+s*u,d=l*o-a*u,p=n*h+r*f+i*d;return p?(p=1/p,t[0]=h*p,t[1]=(-c*r+i*l)*p,t[2]=(s*r-i*a)*p,t[3]=f*p,t[4]=(c*n-i*u)*p,t[5]=(-s*n+i*o)*p,t[6]=d*p,t[7]=(-l*n+r*u)*p,t[8]=(a*n-r*o)*p,t):null}},9063:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=n[0],d=n[1],p=n[2],m=n[3],g=n[4],v=n[5],y=n[6],x=n[7],_=n[8];return t[0]=f*r+d*a+p*l,t[1]=f*i+d*s+p*c,t[2]=f*o+d*u+p*h,t[3]=m*r+g*a+v*l,t[4]=m*i+g*s+v*c,t[5]=m*o+g*u+v*h,t[6]=y*r+x*a+_*l,t[7]=y*i+x*s+_*c,t[8]=y*o+x*u+_*h,t}},3100:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-r*a,x=n*u-i*a,_=n*l-o*a,b=r*u-i*s,M=r*l-o*s,w=i*l-o*u,A=c*m-h*p,T=c*g-f*p,C=c*v-d*p,E=h*g-f*m,k=h*v-d*m,S=f*v-d*g,P=y*S-x*k+_*E+b*C-M*T+w*A;return P?(P=1/P,t[0]=(s*S-u*k+l*E)*P,t[1]=(u*C-a*S-l*T)*P,t[2]=(a*k-s*C+l*A)*P,t[3]=(i*k-r*S-o*E)*P,t[4]=(n*S-i*C+o*T)*P,t[5]=(r*C-n*k-o*A)*P,t[6]=(m*w-g*M+v*b)*P,t[7]=(g*_-p*w-v*x)*P,t[8]=(p*M-m*_+v*y)*P,t):null}},5637:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*s,t[2]=d*o+f*u,t[3]=d*a-f*r,t[4]=d*s-f*i,t[5]=d*u-f*o,t[6]=l,t[7]=c,t[8]=h,t}},9281:function(t){t.exports=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}},6224:function(t){t.exports=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}},1078:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+d*a+l,t[7]=f*i+d*s+c,t[8]=f*o+d*u+h,t}},4879:function(t){t.exports=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}},316:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(f*v-d*g)-h*(u*v-l*g)+m*(u*d-l*f),t[1]=-(r*(f*v-d*g)-h*(i*v-o*g)+m*(i*d-o*f)),t[2]=r*(u*v-l*g)-s*(i*v-o*g)+m*(i*l-o*u),t[3]=-(r*(u*d-l*f)-s*(i*d-o*f)+h*(i*l-o*u)),t[4]=-(a*(f*v-d*g)-c*(u*v-l*g)+p*(u*d-l*f)),t[5]=n*(f*v-d*g)-c*(i*v-o*g)+p*(i*d-o*f),t[6]=-(n*(u*v-l*g)-a*(i*v-o*g)+p*(i*l-o*u)),t[7]=n*(u*d-l*f)-a*(i*d-o*f)+c*(i*l-o*u),t[8]=a*(h*v-d*m)-c*(s*v-l*m)+p*(s*d-l*h),t[9]=-(n*(h*v-d*m)-c*(r*v-o*m)+p*(r*d-o*h)),t[10]=n*(s*v-l*m)-a*(r*v-o*m)+p*(r*l-o*s),t[11]=-(n*(s*d-l*h)-a*(r*d-o*h)+c*(r*l-o*s)),t[12]=-(a*(h*g-f*m)-c*(s*g-u*m)+p*(s*f-u*h)),t[13]=n*(h*g-f*m)-c*(r*g-i*m)+p*(r*f-i*h),t[14]=-(n*(s*g-u*m)-a*(r*g-i*m)+p*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+c*(r*u-i*s),t}},6232:function(t){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},4408:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},703:function(t){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},3845:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8],c=t[9],h=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*a-n*o)*(h*g-f*m)-(e*s-r*o)*(c*g-f*p)+(e*u-i*o)*(c*m-h*p)+(n*s-r*a)*(l*g-f*d)-(n*u-i*a)*(l*m-h*d)+(r*u-i*s)*(l*p-c*d)}},9259:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,h=r*s,f=i*a,d=i*s,p=i*u,m=o*a,g=o*s,v=o*u;return t[0]=1-h-p,t[1]=c+v,t[2]=f-g,t[3]=0,t[4]=c-v,t[5]=1-l-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-l-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8625:function(t){t.exports=function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],l=Math.sqrt(a*a+s*s+u*u);if(Math.abs(l)<1e-6)return null;return a*=l=1/l,s*=l,u*=l,r=Math.sin(e),i=Math.cos(e),o=1-i,t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8844:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,l=o+o,c=r*s,h=r*u,f=r*l,d=i*u,p=i*l,m=o*l,g=a*s,v=a*u,y=a*l;return t[0]=1-(d+m),t[1]=h+y,t[2]=f-v,t[3]=0,t[4]=h-y,t[5]=1-(c+m),t[6]=p+g,t[7]=0,t[8]=f+v,t[9]=p-g,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}},3107:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6645:function(t){t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},1:function(t){t.exports=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8503:function(t){t.exports=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8990:function(t){t.exports=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6901:function(t){t.exports=function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),l=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*l,t[15]=0,t}},1156:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},5240:function(t,e,n){t.exports={create:n(703),clone:n(6232),copy:n(4408),identity:n(1156),transpose:n(3039),invert:n(9573),adjoint:n(316),determinant:n(3845),multiply:n(6498),translate:n(164),scale:n(1119),rotate:n(4175),rotateX:n(3116),rotateY:n(6428),rotateZ:n(9041),fromRotation:n(8625),fromRotationTranslation:n(8844),fromScaling:n(3107),fromTranslation:n(6645),fromXRotation:n(1),fromYRotation:n(8503),fromZRotation:n(8990),fromQuat:n(9259),frustum:n(6901),perspective:n(2343),perspectiveFromFieldOfView:n(7863),ortho:n(753),lookAt:n(398),str:n(6758)}},9573:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-r*a,x=n*u-i*a,_=n*l-o*a,b=r*u-i*s,M=r*l-o*s,w=i*l-o*u,A=c*m-h*p,T=c*g-f*p,C=c*v-d*p,E=h*g-f*m,k=h*v-d*m,S=f*v-d*g,P=y*S-x*k+_*E+b*C-M*T+w*A;if(!P)return null;return P=1/P,t[0]=(s*S-u*k+l*E)*P,t[1]=(i*k-r*S-o*E)*P,t[2]=(m*w-g*M+v*b)*P,t[3]=(f*M-h*w-d*b)*P,t[4]=(u*C-a*S-l*T)*P,t[5]=(n*S-i*C+o*T)*P,t[6]=(g*_-p*w-v*x)*P,t[7]=(c*w-f*_+d*x)*P,t[8]=(a*k-s*C+l*A)*P,t[9]=(r*C-n*k-o*A)*P,t[10]=(p*M-m*_+v*y)*P,t[11]=(h*_-c*M-d*y)*P,t[12]=(s*T-a*E-u*A)*P,t[13]=(n*E-r*T+i*A)*P,t[14]=(m*x-p*b-g*y)*P,t[15]=(c*b-h*x+f*y)*P,t}},398:function(t,e,n){var r=n(1156);t.exports=function(t,e,n,i){var o,a,s,u,l,c,h,f,d,p,m=e[0],g=e[1],v=e[2],y=i[0],x=i[1],_=i[2],b=n[0],M=n[1],w=n[2];if(Math.abs(m-b)<1e-6&&Math.abs(g-M)<1e-6&&Math.abs(v-w)<1e-6)return r(t);h=m-b,f=g-M,d=v-w,p=1/Math.sqrt(h*h+f*f+d*d),o=x*(d*=p)-_*(f*=p),a=_*(h*=p)-y*d,s=y*f-x*h,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0);u=f*s-d*a,l=d*o-h*s,c=h*a-f*o,(p=Math.sqrt(u*u+l*l+c*c))?(u*=p=1/p,l*=p,c*=p):(u=0,l=0,c=0);return t[0]=o,t[1]=u,t[2]=h,t[3]=0,t[4]=a,t[5]=l,t[6]=f,t[7]=0,t[8]=s,t[9]=c,t[10]=d,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(u*m+l*g+c*v),t[14]=-(h*m+f*g+d*v),t[15]=1,t}},6498:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=n[0],_=n[1],b=n[2],M=n[3];return t[0]=x*r+_*s+b*h+M*m,t[1]=x*i+_*u+b*f+M*g,t[2]=x*o+_*l+b*d+M*v,t[3]=x*a+_*c+b*p+M*y,x=n[4],_=n[5],b=n[6],M=n[7],t[4]=x*r+_*s+b*h+M*m,t[5]=x*i+_*u+b*f+M*g,t[6]=x*o+_*l+b*d+M*v,t[7]=x*a+_*c+b*p+M*y,x=n[8],_=n[9],b=n[10],M=n[11],t[8]=x*r+_*s+b*h+M*m,t[9]=x*i+_*u+b*f+M*g,t[10]=x*o+_*l+b*d+M*v,t[11]=x*a+_*c+b*p+M*y,x=n[12],_=n[13],b=n[14],M=n[15],t[12]=x*r+_*s+b*h+M*m,t[13]=x*i+_*u+b*f+M*g,t[14]=x*o+_*l+b*d+M*v,t[15]=x*a+_*c+b*p+M*y,t}},753:function(t){t.exports=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t}},2343:function(t){t.exports=function(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t}},7863:function(t){t.exports=function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),l=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}},4175:function(t){t.exports=function(t,e,n,r){var i,o,a,s,u,l,c,h,f,d,p,m,g,v,y,x,_,b,M,w,A,T,C,E,k=r[0],S=r[1],P=r[2],O=Math.sqrt(k*k+S*S+P*P);if(Math.abs(O)<1e-6)return null;k*=O=1/O,S*=O,P*=O,i=Math.sin(n),o=Math.cos(n),a=1-o,s=e[0],u=e[1],l=e[2],c=e[3],h=e[4],f=e[5],d=e[6],p=e[7],m=e[8],g=e[9],v=e[10],y=e[11],x=k*k*a+o,_=S*k*a+P*i,b=P*k*a-S*i,M=k*S*a-P*i,w=S*S*a+o,A=P*S*a+k*i,T=k*P*a+S*i,C=S*P*a-k*i,E=P*P*a+o,t[0]=s*x+h*_+m*b,t[1]=u*x+f*_+g*b,t[2]=l*x+d*_+v*b,t[3]=c*x+p*_+y*b,t[4]=s*M+h*w+m*A,t[5]=u*M+f*w+g*A,t[6]=l*M+d*w+v*A,t[7]=c*M+p*w+y*A,t[8]=s*T+h*C+m*E,t[9]=u*T+f*C+g*E,t[10]=l*T+d*C+v*E,t[11]=c*T+p*C+y*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},3116:function(t){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],h=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}},6428:function(t){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[8],c=e[9],h=e[10],f=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*i-l*r,t[1]=a*i-c*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+l*i,t[9]=a*r+c*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}},9041:function(t){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],h=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t}},1119:function(t){t.exports=function(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},6758:function(t){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},164:function(t){t.exports=function(t,e,n){var r,i,o,a,s,u,l,c,h,f,d,p,m=n[0],g=n[1],v=n[2];e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*m+s*g+h*v+e[12],t[13]=i*m+u*g+f*v+e[13],t[14]=o*m+l*g+d*v+e[14],t[15]=a*m+c*g+p*v+e[15]);return t}},3039:function(t){t.exports=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},7207:function(t){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}},3959:function(t,e,n){t.exports=function(t,e){var n=r(t[0],t[1],t[2]),a=r(e[0],e[1],e[2]);i(n,n),i(a,a);var s=o(n,a);return s>1?0:Math.acos(s)};var r=n(6534),i=n(2397),o=n(966)},9638:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},859:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1404:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},2002:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},9528:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}},6005:function(t,e,n){t.exports=n(6911)},6911:function(t){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}},133:function(t,e,n){t.exports=n(3274)},3274:function(t){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}},966:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2342:function(t){t.exports=1e-6},9883:function(t,e,n){t.exports=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r*Math.max(1,Math.abs(o),Math.abs(u))};var r=n(2342)},8259:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},7291:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},7043:function(t,e,n){t.exports=function(t,e,n,i,o,a){var s,u;e||(e=3);n||(n=0);u=i?Math.min(i*e+n,t.length):t.length;for(s=n;s<u;s+=e)r[0]=t[s],r[1]=t[s+1],r[2]=t[s+2],o(r,r,a),t[s]=r[0],t[s+1]=r[1],t[s+2]=r[2];return t};var r=n(2002)()},6534:function(t){t.exports=function(t,e,n){var r=new Float32Array(3);return r[0]=t,r[1]=e,r[2]=n,r}},5365:function(t,e,n){t.exports={EPSILON:n(2342),create:n(2002),clone:n(859),angle:n(3959),fromValues:n(6534),copy:n(1404),set:n(6952),equals:n(9883),exactEquals:n(8259),add:n(7207),subtract:n(7916),sub:n(3379),multiply:n(6381),mul:n(792),divide:n(3274),div:n(133),min:n(7324),max:n(7254),floor:n(7291),ceil:n(9638),round:n(5084),scale:n(498),scaleAndAdd:n(6993),distance:n(6911),dist:n(6005),squaredDistance:n(3440),sqrDist:n(9867),length:n(172),len:n(5446),squaredLength:n(5228),sqrLen:n(609),negate:n(9500),inverse:n(8958),normalize:n(2397),dot:n(966),cross:n(9528),lerp:n(6373),random:n(2283),transformMat4:n(2964),transformMat3:n(932),transformQuat:n(4516),rotateX:n(4871),rotateY:n(7927),rotateZ:n(2998),forEach:n(7043)}},8958:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},5446:function(t,e,n){t.exports=n(172)},172:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}},6373:function(t){t.exports=function(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}},7254:function(t){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}},7324:function(t){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}},792:function(t,e,n){t.exports=n(6381)},6381:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}},9500:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},2397:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o);return t}},2283:function(t){t.exports=function(t,e){e=e||1;var n=2*Math.random()*Math.PI,r=2*Math.random()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}},4871:function(t){t.exports=function(t,e,n,r){var i=n[1],o=n[2],a=e[1]-i,s=e[2]-o,u=Math.sin(r),l=Math.cos(r);return t[0]=e[0],t[1]=i+a*l-s*u,t[2]=o+a*u+s*l,t}},7927:function(t){t.exports=function(t,e,n,r){var i=n[0],o=n[2],a=e[0]-i,s=e[2]-o,u=Math.sin(r),l=Math.cos(r);return t[0]=i+s*u+a*l,t[1]=e[1],t[2]=o+s*l-a*u,t}},2998:function(t){t.exports=function(t,e,n,r){var i=n[0],o=n[1],a=e[0]-i,s=e[1]-o,u=Math.sin(r),l=Math.cos(r);return t[0]=i+a*l-s*u,t[1]=o+a*u+s*l,t[2]=e[2],t}},5084:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},498:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}},6993:function(t){t.exports=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}},6952:function(t){t.exports=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}},9867:function(t,e,n){t.exports=n(3440)},609:function(t,e,n){t.exports=n(5228)},3440:function(t){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}},5228:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}},3379:function(t,e,n){t.exports=n(7916)},7916:function(t){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}},932:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}},2964:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}},4516:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],l=n[3],c=l*r+s*o-u*i,h=l*i+u*r-a*o,f=l*o+a*i-s*r,d=-a*r-s*i-u*o;return t[0]=c*l+d*-a+h*-u-f*-s,t[1]=h*l+d*-s+f*-a-c*-u,t[2]=f*l+d*-u+c*-s-h*-a,t}},5492:function(t){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}},5967:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},4729:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},8922:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},3256:function(t){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+r*r+i*i+o*o)}},409:function(t){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}},3643:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},5166:function(t){t.exports=function(t,e,n,r){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}},8608:function(t,e,n){t.exports={create:n(8922),clone:n(5967),fromValues:n(5166),copy:n(4729),set:n(256),add:n(5492),subtract:n(1250),multiply:n(4683),divide:n(409),min:n(8485),max:n(6225),scale:n(7141),scaleAndAdd:n(2100),distance:n(3256),squaredDistance:n(8726),length:n(7358),squaredLength:n(3e3),negate:n(2618),inverse:n(9556),normalize:n(959),dot:n(3643),lerp:n(117),random:n(9855),transformMat4:n(161),transformQuat:n(228)}},9556:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},7358:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}},117:function(t){t.exports=function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}},6225:function(t){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}},8485:function(t){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}},4683:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}},2618:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},959:function(t){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a);return t}},9855:function(t,e,n){var r=n(959),i=n(7141);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),r(t,t),i(t,t,e),t}},7141:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}},2100:function(t){t.exports=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}},256:function(t){t.exports=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}},8726:function(t){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}},3e3:function(t){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}},1250:function(t){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}},161:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}},228:function(t){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],l=n[3],c=l*r+s*o-u*i,h=l*i+u*r-a*o,f=l*o+a*i-s*r,d=-a*r-s*i-u*o;return t[0]=c*l+d*-a+h*-u-f*-s,t[1]=h*l+d*-s+f*-a-c*-u,t[2]=f*l+d*-u+c*-s-h*-a,t[3]=e[3],t}},5638:function(t,e){var n;
39
39
  /*!
40
40
  * jQuery JavaScript Library v3.7.1
41
41
  * https://jquery.com/